summaryrefslogtreecommitdiff
path: root/vendor/modernc.org/sqlite/lib/sqlite_linux_386.go
diff options
context:
space:
mode:
Diffstat (limited to 'vendor/modernc.org/sqlite/lib/sqlite_linux_386.go')
-rw-r--r--vendor/modernc.org/sqlite/lib/sqlite_linux_386.go9523
1 files changed, 5001 insertions, 4522 deletions
diff --git a/vendor/modernc.org/sqlite/lib/sqlite_linux_386.go b/vendor/modernc.org/sqlite/lib/sqlite_linux_386.go
index 1dd64743c..0840f855f 100644
--- a/vendor/modernc.org/sqlite/lib/sqlite_linux_386.go
+++ b/vendor/modernc.org/sqlite/lib/sqlite_linux_386.go
@@ -34,7 +34,6 @@ const BITVEC_MXHASH = 0
const BITVEC_NBIT = 0
const BITVEC_NELEM = 0
const BITVEC_NINT = 0
-const BITVEC_NPTR = 0
const BITVEC_SZ = 512
const BITVEC_SZELEM = 8
const BITVEC_TELEM = 0
@@ -88,6 +87,7 @@ const BTS_PAGESIZE_FIXED = 2
const BTS_PENDING = 128
const BTS_READ_ONLY = 1
const BTS_SECURE_DELETE = 4
+const BT_MAX_LOCAL = 65501
const BUFSIZ = 1024
const BYTE_ORDER = 1234
const CACHE_STALE = 0
@@ -1562,6 +1562,7 @@ const SQLITE_ACCESS_EXISTS = 0
const SQLITE_ACCESS_READ = 2
const SQLITE_ACCESS_READWRITE = 1
const SQLITE_AFF_BLOB = 65
+const SQLITE_AFF_DEFER = 88
const SQLITE_AFF_FLEXNUM = 70
const SQLITE_AFF_INTEGER = 68
const SQLITE_AFF_MASK = 71
@@ -1801,6 +1802,7 @@ const SQLITE_FAIL = 3
const SQLITE_FAULTINJECTOR_COUNT = 1
const SQLITE_FAULTINJECTOR_MALLOC = 0
const SQLITE_FCNTL_BEGIN_ATOMIC_WRITE = 31
+const SQLITE_FCNTL_BLOCK_ON_CONNECT = 44
const SQLITE_FCNTL_BUSYHANDLER = 15
const SQLITE_FCNTL_CHUNK_SIZE = 6
const SQLITE_FCNTL_CKPT_DONE = 37
@@ -2011,6 +2013,7 @@ const SQLITE_MAX_FILE_FORMAT = 4
const SQLITE_MAX_FUNCTION_ARG = 1000
const SQLITE_MAX_LENGTH = 1000000000
const SQLITE_MAX_LIKE_PATTERN_LENGTH = 50000
+const SQLITE_MAX_LOG_MESSAGE = 700
const SQLITE_MAX_MEMORY = 0
const SQLITE_MAX_MMAP_SIZE = 2147418112
const SQLITE_MAX_PAGE_COUNT = 4294967294
@@ -2173,6 +2176,7 @@ const SQLITE_SERIALIZE_NOCOPY = 1
const SQLITE_SESSION_CONFIG_STRMSIZE = 1
const SQLITE_SESSION_OBJCONFIG_ROWID = 2
const SQLITE_SESSION_OBJCONFIG_SIZE = 1
+const SQLITE_SETLK_BLOCK_ON_CONNECT = 1
const SQLITE_SET_LOCKPROXYFILE = 3
const SQLITE_SHM_EXCLUSIVE = 8
const SQLITE_SHM_LOCK = 2
@@ -2181,7 +2185,7 @@ const SQLITE_SHM_SHARED = 4
const SQLITE_SHM_UNLOCK = 1
const SQLITE_SORTER_PMASZ = 250
const SQLITE_SOUNDEX = 1
-const SQLITE_SOURCE_ID = "2025-05-07 10:39:52 17144570b0d96ae63cd6f3edca39e27ebd74925252bbaf6723bcb2f6b4861fb1"
+const SQLITE_SOURCE_ID = "2025-06-06 14:52:32 b77dc5e0f596d2140d9ac682b2893ff65d3a4140aa86067a3efebe29dc914c95"
const SQLITE_SO_ASC = 0
const SQLITE_SO_DESC = 1
const SQLITE_SO_UNDEFINED = -1
@@ -2292,8 +2296,8 @@ const SQLITE_UTF16LE = 2
const SQLITE_UTF16NATIVE = 2
const SQLITE_UTF16_ALIGNED = 8
const SQLITE_UTF8 = 1
-const SQLITE_VERSION = "3.49.2"
-const SQLITE_VERSION_NUMBER = 3049002
+const SQLITE_VERSION = "3.50.1"
+const SQLITE_VERSION_NUMBER = 3050001
const SQLITE_VTABRISK_High = 2
const SQLITE_VTABRISK_Low = 0
const SQLITE_VTABRISK_Normal = 1
@@ -3459,6 +3463,9 @@ const etBUFSIZE = 70
const etCHARX = 8
const etDECIMAL = 16
const etDYNSTRING = 6
+const etESCAPE_Q = 10
+const etESCAPE_q = 9
+const etESCAPE_w = 14
const etEXP = 2
const etFLOAT = 1
const etGENERIC = 3
@@ -3468,9 +3475,6 @@ const etPERCENT = 7
const etPOINTER = 13
const etRADIX = 0
const etSIZE = 4
-const etSQLESCAPE = 9
-const etSQLESCAPE2 = 10
-const etSQLESCAPE3 = 14
const etSRCITEM = 12
const etSTRING = 5
const etTOKEN = 11
@@ -4371,6 +4375,12 @@ type sqlite3_io_methods1 = Tsqlite3_io_methods1
** the value that M is to be set to. Before returning, the 32-bit signed
** integer is overwritten with the previous value of M.
**
+** <li>[[SQLITE_FCNTL_BLOCK_ON_CONNECT]]
+** The [SQLITE_FCNTL_BLOCK_ON_CONNECT] opcode is used to configure the
+** VFS to block when taking a SHARED lock to connect to a wal mode database.
+** This is used to implement the functionality associated with
+** SQLITE_SETLK_BLOCK_ON_CONNECT.
+**
** <li>[[SQLITE_FCNTL_DATA_VERSION]]
** The [SQLITE_FCNTL_DATA_VERSION] opcode is used to detect changes to
** a database file. The argument is a pointer to a 32-bit unsigned integer.
@@ -4727,6 +4737,7 @@ type Tsqlite3_api_routines = struct {
Fstmt_explain uintptr
Fget_clientdata uintptr
Fset_clientdata uintptr
+ Fsetlk_timeout uintptr
}
type sqlite3_api_routines = Tsqlite3_api_routines
@@ -5159,7 +5170,6 @@ type Tsqlite3_context = struct {
Fenc Tu8
FskipFlag Tu8
Fargc Tu16
- Fargv [1]uintptr
}
type sqlite3_context = Tsqlite3_context
@@ -6900,11 +6910,17 @@ type fts5_api1 = Tfts5_api1
** * Terms in the GROUP BY or ORDER BY clauses of a SELECT statement.
** * Terms in the VALUES clause of an INSERT statement
**
-** The hard upper limit here is 32676. Most database people will
+** The hard upper limit here is 32767. Most database people will
** tell you that in a well-normalized database, you usually should
** not have more than a dozen or so columns in any table. And if
** that is the case, there is no point in having more than a few
** dozen values in any of the other situations described above.
+**
+** An index can only have SQLITE_MAX_COLUMN columns from the user
+** point of view, but the underlying b-tree that implements the index
+** might have up to twice as many columns in a WITHOUT ROWID table,
+** since must also store the primary key at the end. Hence the
+** column count for Index is u16 instead of i16.
*/
/*
@@ -7278,6 +7294,7 @@ type THashElem = struct {
Fprev uintptr
Fdata uintptr
FpKey uintptr
+ Fh uint32
}
type HashElem = THashElem
@@ -7323,6 +7340,7 @@ type THashElem1 = struct {
Fprev uintptr
Fdata uintptr
FpKey uintptr
+ Fh uint32
}
type HashElem1 = THashElem1
@@ -7474,6 +7492,11 @@ type ptrdiff_t = Tptrdiff_t
*/
/*
+** Work around C99 "flex-array" syntax for pre-C99 compilers, so as
+** to avoid complaints from -fsanitize=strict-bounds.
+ */
+
+/*
** Macros to compute minimum and maximum of two numbers.
*/
@@ -7531,6 +7554,17 @@ type i8 = Ti8
/* 1-byte signed integer */
+// C documentation
+//
+// /* A bitfield type for use inside of structures. Always follow with :N where
+// ** N is the number of bits.
+// */
+type Tbft = uint32
+
+type bft = Tbft
+
+/* Bit Field Type */
+
/*
** SQLITE_MAX_U32 is a u64 constant that is the maximum u64 value
** that can be stored in a u32 without loss of data. The value
@@ -7834,7 +7868,6 @@ type TDbClientData = struct {
FpNext uintptr
FpData uintptr
FxDestructor uintptr
- FzName [1]int8
}
type DbClientData = TDbClientData
@@ -7907,7 +7940,6 @@ type Expr = TExpr
type TExprList = struct {
FnExpr int32
FnAlloc int32
- Fa [1]TExprList_item
}
type ExprList = TExprList
@@ -7922,7 +7954,6 @@ type TFKey = struct {
FisDeferred Tu8
FaAction [2]Tu8
FapTrigger [2]uintptr
- FaCol [1]TsColMap
}
type FKey = TFKey
@@ -7972,7 +8003,6 @@ type FuncDefHash = TFuncDefHash
type TIdList = struct {
FnId int32
- Fa [1]TIdList_item
}
type IdList = TIdList
@@ -8036,7 +8066,6 @@ type TKeyInfo = struct {
FnAllField Tu16
Fdb uintptr
FaSortFlags uintptr
- FaColl [1]uintptr
}
type KeyInfo = TKeyInfo
@@ -8108,19 +8137,22 @@ type TParse = struct {
FzErrMsg uintptr
FpVdbe uintptr
Frc int32
- FcolNamesSet Tu8
- FcheckSchema Tu8
+ FnQueryLoop TLogEst
Fnested Tu8
FnTempReg Tu8
FisMultiWrite Tu8
FmayAbort Tu8
FhasCompound Tu8
- FokConstFactor Tu8
FdisableLookaside Tu8
FprepFlags Tu8
FwithinRJSubrtn Tu8
- FbHasWith Tu8
FmSubrtnSig Tu8
+ FeTriggerOp Tu8
+ FbReturning Tu8
+ FeOrconf Tu8
+ FdisableTriggers Tu8
+ F__ccgo_align18 [1]byte
+ F__ccgo32 uint8
FnRangeReg int32
FiRangeReg int32
FnErr int32
@@ -8134,11 +8166,8 @@ type TParse = struct {
FpConstExpr uintptr
FpIdxEpr uintptr
FpIdxPartExpr uintptr
- FconstraintName TToken
FwriteMask TyDbMask
FcookieMask TyDbMask
- FregRowid int32
- FregRoot int32
FnMaxArg int32
FnSelect int32
FnProgressSteps Tu32
@@ -8149,39 +8178,41 @@ type TParse = struct {
FpTriggerTab uintptr
FpTriggerPrg uintptr
FpCleanup uintptr
+ FaTempReg [8]int32
+ FpOuterParse uintptr
+ FsNameToken TToken
+ Foldmask Tu32
+ Fnewmask Tu32
Fu1 struct {
- FpReturning [0]uintptr
- FaddrCrTab int32
- }
- Foldmask Tu32
- Fnewmask Tu32
- FnQueryLoop TLogEst
- FeTriggerOp Tu8
- FbReturning Tu8
- FeOrconf Tu8
- FdisableTriggers Tu8
- FaTempReg [8]int32
- FpOuterParse uintptr
- FsNameToken TToken
- FsLastToken TToken
- FnVar TynVar
- FiPkSortOrder Tu8
- Fexplain Tu8
- FeParseMode Tu8
- FnVtabLock int32
- FnHeight int32
- FaddrExplain int32
- FpVList uintptr
- FpReprepare uintptr
- FzTail uintptr
- FpNewTable uintptr
- FpNewIndex uintptr
- FpNewTrigger uintptr
- FzAuthContext uintptr
- FsArg TToken
- FapVtabLock uintptr
- FpWith uintptr
- FpRename uintptr
+ Fd [0]struct {
+ FpReturning uintptr
+ }
+ Fcr struct {
+ FaddrCrTab int32
+ FregRowid int32
+ FregRoot int32
+ FconstraintName TToken
+ }
+ }
+ FsLastToken TToken
+ FnVar TynVar
+ FiPkSortOrder Tu8
+ Fexplain Tu8
+ FeParseMode Tu8
+ FnVtabLock int32
+ FnHeight int32
+ FaddrExplain int32
+ FpVList uintptr
+ FpReprepare uintptr
+ FzTail uintptr
+ FpNewTable uintptr
+ FpNewIndex uintptr
+ FpNewTrigger uintptr
+ FzAuthContext uintptr
+ FsArg TToken
+ FapVtabLock uintptr
+ FpWith uintptr
+ FpRename uintptr
}
type Parse = TParse
@@ -8199,7 +8230,7 @@ type TPreUpdate = struct {
FpCsr uintptr
Fop int32
FaRecord uintptr
- Fkeyinfo TKeyInfo
+ FpKeyinfo uintptr
FpUnpacked uintptr
FpNewUnpacked uintptr
FiNewReg int32
@@ -8211,6 +8242,7 @@ type TPreUpdate = struct {
FpTab uintptr
FpPk uintptr
FapDflt uintptr
+ FkeyinfoSpace [20]Tu8
}
type PreUpdate = TPreUpdate
@@ -8363,7 +8395,6 @@ type SrcItem = TSrcItem
type TSrcList = struct {
FnSrc int32
FnAlloc Tu32
- Fa [1]TSrcItem
}
type SrcList = TSrcList
@@ -8418,6 +8449,7 @@ type TTable = struct {
}
FpTrigger uintptr
FpSchema uintptr
+ FaHx [16]Tu8
}
type Table = TTable
@@ -8599,7 +8631,6 @@ type TWhereInfo = struct {
FrevMask TBitmask
FsWC TWhereClause
FsMaskSet TWhereMaskSet
- Fa [1]TWhereLevel
}
type WhereInfo = TWhereInfo
@@ -8641,7 +8672,6 @@ type TWith = struct {
FnCte int32
FbView int32
FpOuter uintptr
- Fa [1]TCte
}
type With = TWith
@@ -9211,8 +9241,8 @@ type TRecordCompare = uintptr
type RecordCompare = TRecordCompare
-/* Use SQLITE_ENABLE_COMMENTS to enable generation of extra comments on
-** each VDBE opcode.
+/* Use SQLITE_ENABLE_EXPLAIN_COMMENTS to enable generation of extra
+** comments on each VDBE opcode.
**
** Use the SQLITE_ENABLE_MODULE_COMMENTS macro to see some extra no-op
** comments in VDBE programs that show key decision points in the code
@@ -10059,6 +10089,7 @@ type TTable1 = struct {
}
FpTrigger uintptr
FpSchema uintptr
+ FaHx [16]Tu8
}
type Table1 = TTable1
@@ -10140,11 +10171,13 @@ type TFKey1 = struct {
FisDeferred Tu8
FaAction [2]Tu8
FapTrigger [2]uintptr
- FaCol [1]TsColMap
}
type FKey1 = TFKey1
+/* The size (in bytes) of an FKey object holding N columns. The answer
+** does NOT include space to hold the zTo name. */
+
/*
** SQLite supports many different ways to resolve a constraint
** error. ROLLBACK processing means that a constraint violation
@@ -10193,11 +10226,12 @@ type TKeyInfo1 = struct {
FnAllField Tu16
Fdb uintptr
FaSortFlags uintptr
- FaColl [1]uintptr
}
type KeyInfo1 = TKeyInfo1
+/* The size (in bytes) of a KeyInfo object with up to N fields */
+
/*
** Allowed bit values for entries in the KeyInfo.aSortFlags[] array.
*/
@@ -10603,11 +10637,13 @@ type Expr1 = TExpr1
type TExprList1 = struct {
FnExpr int32
FnAlloc int32
- Fa [1]TExprList_item
}
type ExprList1 = TExprList1
+/* The size (in bytes) of an ExprList object that is big enough to hold
+** as many as N expressions. */
+
/*
** Allowed values for Expr.a.eEName
*/
@@ -10629,11 +10665,12 @@ type ExprList1 = TExprList1
*/
type TIdList1 = struct {
FnId int32
- Fa [1]TIdList_item
}
type IdList1 = TIdList1
+/* The size (in bytes) of an IdList object that can hold up to N IDs. */
+
/*
** Allowed values for IdList.eType, which determines which value of the a.u4
** is valid.
@@ -10741,11 +10778,16 @@ type OnOrUsing1 = TOnOrUsing1
type TSrcList1 = struct {
FnSrc int32
FnAlloc Tu32
- Fa [1]TSrcItem
}
type SrcList1 = TSrcList1
+/* Size (in bytes) of a SrcList object that can hold as many as N
+** SrcItem objects. */
+
+/* Size (in bytes( of a SrcList object that holds 1 SrcItem. This is a
+** special case of SZ_SRCITEM(1) that comes up often. */
+
/*
** Permitted values of the SrcList.a.jointype field
*/
@@ -11106,19 +11148,22 @@ type TParse1 = struct {
FzErrMsg uintptr
FpVdbe uintptr
Frc int32
- FcolNamesSet Tu8
- FcheckSchema Tu8
+ FnQueryLoop TLogEst
Fnested Tu8
FnTempReg Tu8
FisMultiWrite Tu8
FmayAbort Tu8
FhasCompound Tu8
- FokConstFactor Tu8
FdisableLookaside Tu8
FprepFlags Tu8
FwithinRJSubrtn Tu8
- FbHasWith Tu8
FmSubrtnSig Tu8
+ FeTriggerOp Tu8
+ FbReturning Tu8
+ FeOrconf Tu8
+ FdisableTriggers Tu8
+ F__ccgo_align18 [1]byte
+ F__ccgo32 uint8
FnRangeReg int32
FiRangeReg int32
FnErr int32
@@ -11132,11 +11177,8 @@ type TParse1 = struct {
FpConstExpr uintptr
FpIdxEpr uintptr
FpIdxPartExpr uintptr
- FconstraintName TToken
FwriteMask TyDbMask
FcookieMask TyDbMask
- FregRowid int32
- FregRoot int32
FnMaxArg int32
FnSelect int32
FnProgressSteps Tu32
@@ -11147,39 +11189,41 @@ type TParse1 = struct {
FpTriggerTab uintptr
FpTriggerPrg uintptr
FpCleanup uintptr
+ FaTempReg [8]int32
+ FpOuterParse uintptr
+ FsNameToken TToken
+ Foldmask Tu32
+ Fnewmask Tu32
Fu1 struct {
- FpReturning [0]uintptr
- FaddrCrTab int32
- }
- Foldmask Tu32
- Fnewmask Tu32
- FnQueryLoop TLogEst
- FeTriggerOp Tu8
- FbReturning Tu8
- FeOrconf Tu8
- FdisableTriggers Tu8
- FaTempReg [8]int32
- FpOuterParse uintptr
- FsNameToken TToken
- FsLastToken TToken
- FnVar TynVar
- FiPkSortOrder Tu8
- Fexplain Tu8
- FeParseMode Tu8
- FnVtabLock int32
- FnHeight int32
- FaddrExplain int32
- FpVList uintptr
- FpReprepare uintptr
- FzTail uintptr
- FpNewTable uintptr
- FpNewIndex uintptr
- FpNewTrigger uintptr
- FzAuthContext uintptr
- FsArg TToken
- FapVtabLock uintptr
- FpWith uintptr
- FpRename uintptr
+ Fd [0]struct {
+ FpReturning uintptr
+ }
+ Fcr struct {
+ FaddrCrTab int32
+ FregRowid int32
+ FregRoot int32
+ FconstraintName TToken
+ }
+ }
+ FsLastToken TToken
+ FnVar TynVar
+ FiPkSortOrder Tu8
+ Fexplain Tu8
+ FeParseMode Tu8
+ FnVtabLock int32
+ FnHeight int32
+ FaddrExplain int32
+ FpVList uintptr
+ FpReprepare uintptr
+ FzTail uintptr
+ FpNewTable uintptr
+ FpNewIndex uintptr
+ FpNewTrigger uintptr
+ FzAuthContext uintptr
+ FsArg TToken
+ FapVtabLock uintptr
+ FpWith uintptr
+ FpRename uintptr
}
type Parse1 = TParse1
@@ -11545,11 +11589,13 @@ type TWith1 = struct {
FnCte int32
FbView int32
FpOuter uintptr
- Fa [1]TCte
}
type With1 = TWith1
+/* The size (in bytes) of a With object that can hold as many
+** as N different CTEs. */
+
/*
** The Cte object is not guaranteed to persist for the entire duration
** of code generation. (The query flattener or other parser tree
@@ -11579,11 +11625,13 @@ type TDbClientData1 = struct {
FpNext uintptr
FpData uintptr
FxDestructor uintptr
- FzName [1]int8
}
type DbClientData1 = TDbClientData1
+/* The size (in bytes) of a DbClientData object that can has a name
+** that is N bytes long, including the zero-terminator. */
+
/*
** This object is used in various ways, most (but not all) related to window
** functions.
@@ -12749,7 +12797,6 @@ type TVdbeSorter = struct {
FiPrev Tu8
FnTask Tu8
FtypeMask Tu8
- FaTask [1]TSortSubtask
}
type VdbeSorter = TVdbeSorter
@@ -12827,7 +12874,6 @@ type TVdbeCursor = struct {
FpayloadSize Tu32
FszRow Tu32
FpCache uintptr
- FaType [1]Tu32
}
type VdbeCursor = TVdbeCursor
@@ -12865,11 +12911,16 @@ type TVdbeCursor1 = struct {
FpayloadSize Tu32
FszRow Tu32
FpCache uintptr
- FaType [1]Tu32
}
type VdbeCursor1 = TVdbeCursor1
+/*
+** The size (in bytes) of a VdbeCursor object that has an nField value of N
+** or less. The value of SZ_VDBECURSOR(n) is guaranteed to be a multiple
+** of 8.
+ */
+
/* Return true if P is a null-only cursor
*/
@@ -13080,21 +13131,14 @@ type Tsqlite3_context1 = struct {
Fenc Tu8
FskipFlag Tu8
Fargc Tu16
- Fargv [1]uintptr
}
type sqlite3_context1 = Tsqlite3_context1
-// C documentation
-//
-// /* A bitfield type for use inside of structures. Always follow with :N where
-// ** N is the number of bits.
-// */
-type Tbft = uint32
-
-type bft = Tbft
-
-/* Bit Field Type */
+/*
+** The size (in bytes) of an sqlite3_context object that holds N
+** argv[] arguments.
+ */
// C documentation
//
@@ -13227,7 +13271,7 @@ type TPreUpdate1 = struct {
FpCsr uintptr
Fop int32
FaRecord uintptr
- Fkeyinfo TKeyInfo
+ FpKeyinfo uintptr
FpUnpacked uintptr
FpNewUnpacked uintptr
FiNewReg int32
@@ -13239,6 +13283,7 @@ type TPreUpdate1 = struct {
FpTab uintptr
FpPk uintptr
FapDflt uintptr
+ FkeyinfoSpace [20]Tu8
}
type PreUpdate1 = TPreUpdate1
@@ -13376,7 +13421,7 @@ func Xsqlite3_status64(tls *libc.TLS, op int32, pCurrent uintptr, pHighwater uin
var pMutex, v1 uintptr
_, _ = pMutex, v1
if op < 0 || op >= libc.Int32FromUint32(libc.Uint32FromInt64(40)/libc.Uint32FromInt64(4)) {
- return _sqlite3MisuseError(tls, int32(24299))
+ return _sqlite3MisuseError(tls, int32(24453))
}
if _statMutex[op] != 0 {
v1 = _sqlite3Pcache1Mutex(tls)
@@ -13548,7 +13593,7 @@ func Xsqlite3_db_status(tls *libc.TLS, db uintptr, op int32, pCurrent uintptr, p
}
pSchema = (*(*TDb)(unsafe.Pointer((*Tsqlite3)(unsafe.Pointer(db)).FaDb + uintptr(i1)*16))).FpSchema
if pSchema != uintptr(0) {
- *(*int32)(unsafe.Pointer(bp)) = int32(uint32(*(*int32)(unsafe.Pointer(bp))) + libc.Uint32FromInt32((*(*func(*libc.TLS, int32) int32)(unsafe.Pointer(&struct{ uintptr }{_sqlite3Config.Fm.FxRoundup})))(tls, int32(16)))*((*TSchema)(unsafe.Pointer(pSchema)).FtblHash.Fcount+(*TSchema)(unsafe.Pointer(pSchema)).FtrigHash.Fcount+(*TSchema)(unsafe.Pointer(pSchema)).FidxHash.Fcount+(*TSchema)(unsafe.Pointer(pSchema)).FfkeyHash.Fcount))
+ *(*int32)(unsafe.Pointer(bp)) = int32(uint32(*(*int32)(unsafe.Pointer(bp))) + libc.Uint32FromInt32((*(*func(*libc.TLS, int32) int32)(unsafe.Pointer(&struct{ uintptr }{_sqlite3Config.Fm.FxRoundup})))(tls, int32(20)))*((*TSchema)(unsafe.Pointer(pSchema)).FtblHash.Fcount+(*TSchema)(unsafe.Pointer(pSchema)).FtrigHash.Fcount+(*TSchema)(unsafe.Pointer(pSchema)).FidxHash.Fcount+(*TSchema)(unsafe.Pointer(pSchema)).FfkeyHash.Fcount))
*(*int32)(unsafe.Pointer(bp)) = int32(uint64(*(*int32)(unsafe.Pointer(bp))) + Xsqlite3_msize(tls, (*TSchema)(unsafe.Pointer(pSchema)).FtblHash.Fht))
*(*int32)(unsafe.Pointer(bp)) = int32(uint64(*(*int32)(unsafe.Pointer(bp))) + Xsqlite3_msize(tls, (*TSchema)(unsafe.Pointer(pSchema)).FtrigHash.Fht))
*(*int32)(unsafe.Pointer(bp)) = int32(uint64(*(*int32)(unsafe.Pointer(bp))) + Xsqlite3_msize(tls, (*TSchema)(unsafe.Pointer(pSchema)).FidxHash.Fht))
@@ -15237,7 +15282,7 @@ func _daysAfterMonday(tls *libc.TLS, pDate uintptr) (r int32) {
// ** In other words, return the day of the week according
// ** to this code:
// **
-// ** 0=Sunday, 1=Monday, 2=Tues, ..., 6=Saturday
+// ** 0=Sunday, 1=Monday, 2=Tuesday, ..., 6=Saturday
// */
func _daysAfterSunday(tls *libc.TLS, pDate uintptr) (r int32) {
return int32(((*TDateTime)(unsafe.Pointer(pDate)).FiJD+libc.Int64FromInt32(129600000))/libc.Int64FromInt32(86400000)) % int32(7)
@@ -18242,17 +18287,17 @@ var _fmtinfo = [23]Tet_info{
4: {
Ffmttype: int8('q'),
Fflags: uint8(4),
- Ftype1: uint8(etSQLESCAPE),
+ Ftype1: uint8(etESCAPE_q),
},
5: {
Ffmttype: int8('Q'),
Fflags: uint8(4),
- Ftype1: uint8(etSQLESCAPE2),
+ Ftype1: uint8(etESCAPE_Q),
},
6: {
Ffmttype: int8('w'),
Fflags: uint8(4),
- Ftype1: uint8(etSQLESCAPE3),
+ Ftype1: uint8(etESCAPE_w),
},
7: {
Ffmttype: int8('c'),
@@ -18449,22 +18494,23 @@ func Xsqlite3_str_vappendf(tls *libc.TLS, pAccum uintptr, fmt uintptr, ap Tva_li
bp := tls.Alloc(128)
defer tls.Free(128)
var bArgList, base Tu8
- var bufpt, cset, escarg, infop, pArgList, pExpr, pItem, pSel, pToken, pre, z, zExtra, zOut, v103, v11, v14, v15, v17, v20, v21, v23, v24, v4, v45, v46, v47, v48, v49, v52, v55, v57, v59, v61, v62, v64, v67, v68, v70, v72, v75, v76, v77, v78, v79, v80, v81, v82, v83, v89, v91, v94, v98, p92 uintptr
- var c, e2, exp, i, iRound, idx, ii, isnull, ix, j, length, nOut, nPad, needQuote, nn, precision, width, x, v10, v110, v111, v16, v18, v19, v2, v22, v3, v51, v56, v58, v60, v65, v66, v71, v73, v74, v85, v86, v87, v88, v90, v93, v96, v97 int32
+ var bufpt, cset, escarg, infop, pArgList, pExpr, pItem, pSel, pToken, pre, z, zExtra, zOut, v103, v11, v14, v15, v17, v20, v21, v23, v24, v4, v45, v46, v47, v48, v49, v52, v55, v57, v59, v61, v62, v64, v67, v68, v70, v72, v75, v76, v77, v78, v79, v80, v81, v82, v83, v89, v91, v94, v97, p92 uintptr
+ var c, e2, exp, i, iRound, idx, ii, ix, j, length, nOut, nPad, needQuote, nn, precision, width, x, v10, v114, v122, v123, v16, v18, v19, v2, v22, v3, v51, v56, v58, v60, v65, v66, v71, v73, v74, v85, v86, v87, v88, v90, v93, v96 int32
var cThousand, done, flag_alternateform, flag_altform2, flag_dp, flag_leftjustify, flag_long, flag_prefix, flag_rtz, flag_zeropad, xtype, v5, v6, v7, v8, v9 TetByte
var ch, px, wx uint32
- var ch1, prefix, q, x1, v101, v107, v54 int8
- var i1, j1, k, n1, nCopyBytes, nPrior, szBufNeeded, v, v100, v104, v106, v108, v109 Ti64
+ var ch1, prefix, q, x1, v100, v107, v118, v54 int8
+ var i1, j1, k, n1, nCopyBytes, nPrior, szBufNeeded, v, v104, v106, v108, v109, v110, v111, v112, v113, v115, v117, v119, v120, v121, v99 Ti64
var longvalue Tsqlite_uint64
var n Tu64
+ var nBack, nCtrl Tu32
var realvalue float64
- var v102, v12 bool
+ var v101, v12 bool
var _ /* buf at bp+0 */ [70]int8
var _ /* s at bp+72 */ TFpDecode
- _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _ = bArgList, base, bufpt, c, cThousand, ch, ch1, cset, done, e2, escarg, exp, flag_alternateform, flag_altform2, flag_dp, flag_leftjustify, flag_long, flag_prefix, flag_rtz, flag_zeropad, i, i1, iRound, idx, ii, infop, isnull, ix, j, j1, k, length, longvalue, n, n1, nCopyBytes, nOut, nPad, nPrior, needQuote, nn, pArgList, pExpr, pItem, pSel, pToken, pre, precision, prefix, px, q, realvalue, szBufNeeded, v, width, wx, x, x1, xtype, z, zExtra, zOut, v10, v100, v101, v102, v103, v104, v106, v107, v108, v109, v11, v110, v111, v12, v14, v15, v16, v17, v18, v19, v2, v20, v21, v22, v23, v24, v3, v4, v45, v46, v47, v48, v49, v5, v51, v52, v54, v55, v56, v57, v58, v59, v6, v60, v61, v62, v64, v65, v66, v67, v68, v7, v70, v71, v72, v73, v74, v75, v76, v77, v78, v79, v8, v80, v81, v82, v83, v85, v86, v87, v88, v89, v9, v90, v91, v93, v94, v96, v97, v98, p92 /* Thousands separator for %d and %u */
- xtype = uint8(etINVALID) /* Size of the rendering buffer */
- zExtra = uintptr(0) /* True if trailing zeros should be removed */
- pArgList = uintptr(0) /* Conversion buffer */
+ _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _ = bArgList, base, bufpt, c, cThousand, ch, ch1, cset, done, e2, escarg, exp, flag_alternateform, flag_altform2, flag_dp, flag_leftjustify, flag_long, flag_prefix, flag_rtz, flag_zeropad, i, i1, iRound, idx, ii, infop, ix, j, j1, k, length, longvalue, n, n1, nBack, nCopyBytes, nCtrl, nOut, nPad, nPrior, needQuote, nn, pArgList, pExpr, pItem, pSel, pToken, pre, precision, prefix, px, q, realvalue, szBufNeeded, v, width, wx, x, x1, xtype, z, zExtra, zOut, v10, v100, v101, v103, v104, v106, v107, v108, v109, v11, v110, v111, v112, v113, v114, v115, v117, v118, v119, v12, v120, v121, v122, v123, v14, v15, v16, v17, v18, v19, v2, v20, v21, v22, v23, v24, v3, v4, v45, v46, v47, v48, v49, v5, v51, v52, v54, v55, v56, v57, v58, v59, v6, v60, v61, v62, v64, v65, v66, v67, v68, v7, v70, v71, v72, v73, v74, v75, v76, v77, v78, v79, v8, v80, v81, v82, v83, v85, v86, v87, v88, v89, v9, v90, v91, v93, v94, v96, v97, v99, p92 /* Thousands separator for %d and %u */
+ xtype = uint8(etINVALID) /* Size of the rendering buffer */
+ zExtra = uintptr(0) /* True if trailing zeros should be removed */
+ pArgList = uintptr(0) /* Conversion buffer */
/* pAccum never starts out with an empty buffer that was obtained from
** malloc(). This precondition is required by the mprintf("%z...")
** optimization. */
@@ -18713,11 +18759,11 @@ func Xsqlite3_str_vappendf(tls *libc.TLS, pAccum uintptr, fmt uintptr, ap Tva_li
goto _36
case int32(etSTRING):
goto _37
- case int32(etSQLESCAPE3):
+ case int32(etESCAPE_w):
goto _38
- case int32(etSQLESCAPE2):
+ case int32(etESCAPE_Q):
goto _39
- case int32(etSQLESCAPE):
+ case int32(etESCAPE_q):
goto _40
case int32(etTOKEN):
goto _41
@@ -19194,29 +19240,7 @@ func Xsqlite3_str_vappendf(tls *libc.TLS, pAccum uintptr, fmt uintptr, ap Tva_li
}
} else {
ch = libc.VaUint32(&ap)
- if ch < uint32(0x00080) {
- (*(*[70]int8)(unsafe.Pointer(bp)))[0] = libc.Int8FromUint32(ch & uint32(0xff))
- length = int32(1)
- } else {
- if ch < uint32(0x00800) {
- (*(*[70]int8)(unsafe.Pointer(bp)))[0] = int8(int32(0xc0) + libc.Int32FromUint8(uint8(ch>>libc.Int32FromInt32(6)&libc.Uint32FromInt32(0x1f))))
- (*(*[70]int8)(unsafe.Pointer(bp)))[int32(1)] = int8(int32(0x80) + libc.Int32FromUint8(uint8(ch&libc.Uint32FromInt32(0x3f))))
- length = int32(2)
- } else {
- if ch < uint32(0x10000) {
- (*(*[70]int8)(unsafe.Pointer(bp)))[0] = int8(int32(0xe0) + libc.Int32FromUint8(uint8(ch>>libc.Int32FromInt32(12)&libc.Uint32FromInt32(0x0f))))
- (*(*[70]int8)(unsafe.Pointer(bp)))[int32(1)] = int8(int32(0x80) + libc.Int32FromUint8(uint8(ch>>libc.Int32FromInt32(6)&libc.Uint32FromInt32(0x3f))))
- (*(*[70]int8)(unsafe.Pointer(bp)))[int32(2)] = int8(int32(0x80) + libc.Int32FromUint8(uint8(ch&libc.Uint32FromInt32(0x3f))))
- length = int32(3)
- } else {
- (*(*[70]int8)(unsafe.Pointer(bp)))[0] = int8(int32(0xf0) + libc.Int32FromUint8(uint8(ch>>libc.Int32FromInt32(18)&libc.Uint32FromInt32(0x07))))
- (*(*[70]int8)(unsafe.Pointer(bp)))[int32(1)] = int8(int32(0x80) + libc.Int32FromUint8(uint8(ch>>libc.Int32FromInt32(12)&libc.Uint32FromInt32(0x3f))))
- (*(*[70]int8)(unsafe.Pointer(bp)))[int32(2)] = int8(int32(0x80) + libc.Int32FromUint8(uint8(ch>>libc.Int32FromInt32(6)&libc.Uint32FromInt32(0x3f))))
- (*(*[70]int8)(unsafe.Pointer(bp)))[int32(3)] = int8(int32(0x80) + libc.Int32FromUint8(uint8(ch&libc.Uint32FromInt32(0x3f))))
- length = int32(4)
- }
- }
- }
+ length = _sqlite3AppendOneUtf8Character(tls, bp, ch)
}
if precision > int32(1) {
nPrior = int64(1)
@@ -19331,25 +19355,29 @@ func Xsqlite3_str_vappendf(tls *libc.TLS, pAccum uintptr, fmt uintptr, ap Tva_li
; /* %Q: Escape ' and enclose in '...' */
_38:
;
- if libc.Int32FromUint8(xtype) == int32(etSQLESCAPE3) {
- v97 = int32('"')
- } else {
- v97 = int32('\'')
- }
- q = int8(v97)
+ needQuote = 0
if bArgList != 0 {
escarg = _getTextArg(tls, pArgList)
} else {
escarg = libc.VaUintptr(&ap)
}
- isnull = libc.BoolInt32(escarg == uintptr(0))
- if isnull != 0 {
- if libc.Int32FromUint8(xtype) == int32(etSQLESCAPE2) {
- v98 = __ccgo_ts + 1668
+ if escarg == uintptr(0) {
+ if libc.Int32FromUint8(xtype) == int32(etESCAPE_Q) {
+ v97 = __ccgo_ts + 1668
} else {
- v98 = __ccgo_ts + 1673
+ v97 = __ccgo_ts + 1673
+ }
+ escarg = v97
+ } else {
+ if libc.Int32FromUint8(xtype) == int32(etESCAPE_Q) {
+ needQuote = int32(1)
}
- escarg = v98
+ }
+ if libc.Int32FromUint8(xtype) == int32(etESCAPE_w) {
+ q = int8('"')
+ flag_alternateform = uint8(0)
+ } else {
+ q = int8('\'')
}
/* For %q, %Q, and %w, the precision is the number of bytes (or
** characters if the ! flags is present) to use from the input.
@@ -19357,15 +19385,15 @@ func Xsqlite3_str_vappendf(tls *libc.TLS, pAccum uintptr, fmt uintptr, ap Tva_li
** of output characters may be larger than the precision.
*/
k = int64(precision)
- v100 = libc.Int64FromInt32(0)
- n1 = v100
- i1 = v100
+ v99 = libc.Int64FromInt32(0)
+ n1 = v99
+ i1 = v99
for {
- if v102 = k != 0; v102 {
- v101 = *(*int8)(unsafe.Pointer(escarg + uintptr(i1)))
- ch1 = v101
+ if v101 = k != 0; v101 {
+ v100 = *(*int8)(unsafe.Pointer(escarg + uintptr(i1)))
+ ch1 = v100
}
- if !(v102 && int32(v101) != 0) {
+ if !(v101 && int32(v100) != 0) {
break
}
if int32(ch1) == int32(q) {
@@ -19376,13 +19404,46 @@ func Xsqlite3_str_vappendf(tls *libc.TLS, pAccum uintptr, fmt uintptr, ap Tva_li
i1++
}
}
- goto _99
- _99:
+ goto _98
+ _98:
;
i1++
k--
}
- needQuote = libc.BoolInt32(!(isnull != 0) && libc.Int32FromUint8(xtype) == int32(etSQLESCAPE2))
+ if flag_alternateform != 0 {
+ /* For %#q, do unistr()-style backslash escapes for
+ ** all control characters, and for backslash itself.
+ ** For %#Q, do the same but only if there is at least
+ ** one control character. */
+ nBack = uint32(0)
+ nCtrl = uint32(0)
+ k = 0
+ for {
+ if !(k < i1) {
+ break
+ }
+ if int32(*(*int8)(unsafe.Pointer(escarg + uintptr(k)))) == int32('\\') {
+ nBack++
+ } else {
+ if libc.Int32FromUint8(*(*Tu8)(unsafe.Pointer(escarg + uintptr(k)))) <= int32(0x1f) {
+ nCtrl++
+ }
+ }
+ goto _102
+ _102:
+ ;
+ k++
+ }
+ if nCtrl != 0 || libc.Int32FromUint8(xtype) == int32(etESCAPE_q) {
+ n1 += libc.Int64FromUint32(nBack + uint32(5)*nCtrl)
+ if libc.Int32FromUint8(xtype) == int32(etESCAPE_Q) {
+ n1 += int64(10)
+ needQuote = int32(2)
+ }
+ } else {
+ flag_alternateform = uint8(0)
+ }
+ }
n1 += i1 + int64(3)
if n1 > int64(SQLITE_PRINT_BUF_SIZE) {
v103 = _printfTempBuf(tls, pAccum, n1)
@@ -19396,35 +19457,98 @@ func Xsqlite3_str_vappendf(tls *libc.TLS, pAccum uintptr, fmt uintptr, ap Tva_li
}
j1 = 0
if needQuote != 0 {
- v104 = j1
- j1++
- *(*int8)(unsafe.Pointer(bufpt + uintptr(v104))) = q
+ if needQuote == int32(2) {
+ libc.Xmemcpy(tls, bufpt+uintptr(j1), __ccgo_ts+1680, uint32(8))
+ j1 += int64(8)
+ } else {
+ v104 = j1
+ j1++
+ *(*int8)(unsafe.Pointer(bufpt + uintptr(v104))) = int8('\'')
+ }
}
k = i1
- i1 = 0
- for {
- if !(i1 < k) {
- break
+ if flag_alternateform != 0 {
+ i1 = 0
+ for {
+ if !(i1 < k) {
+ break
+ }
+ v106 = j1
+ j1++
+ v107 = *(*int8)(unsafe.Pointer(escarg + uintptr(i1)))
+ ch1 = v107
+ *(*int8)(unsafe.Pointer(bufpt + uintptr(v106))) = v107
+ if int32(ch1) == int32(q) {
+ v108 = j1
+ j1++
+ *(*int8)(unsafe.Pointer(bufpt + uintptr(v108))) = ch1
+ } else {
+ if int32(ch1) == int32('\\') {
+ v109 = j1
+ j1++
+ *(*int8)(unsafe.Pointer(bufpt + uintptr(v109))) = int8('\\')
+ } else {
+ if libc.Int32FromUint8(libc.Uint8FromInt8(ch1)) <= int32(0x1f) {
+ *(*int8)(unsafe.Pointer(bufpt + uintptr(j1-int64(1)))) = int8('\\')
+ v110 = j1
+ j1++
+ *(*int8)(unsafe.Pointer(bufpt + uintptr(v110))) = int8('u')
+ v111 = j1
+ j1++
+ *(*int8)(unsafe.Pointer(bufpt + uintptr(v111))) = int8('0')
+ v112 = j1
+ j1++
+ *(*int8)(unsafe.Pointer(bufpt + uintptr(v112))) = int8('0')
+ v113 = j1
+ j1++
+ if int32(ch1) >= int32(0x10) {
+ v114 = int32('1')
+ } else {
+ v114 = int32('0')
+ }
+ *(*int8)(unsafe.Pointer(bufpt + uintptr(v113))) = int8(v114)
+ v115 = j1
+ j1++
+ *(*int8)(unsafe.Pointer(bufpt + uintptr(v115))) = *(*int8)(unsafe.Pointer(__ccgo_ts + 1689 + uintptr(int32(ch1)&int32(0xf))))
+ }
+ }
+ }
+ goto _105
+ _105:
+ ;
+ i1++
}
- v106 = j1
- j1++
- v107 = *(*int8)(unsafe.Pointer(escarg + uintptr(i1)))
- ch1 = v107
- *(*int8)(unsafe.Pointer(bufpt + uintptr(v106))) = v107
- if int32(ch1) == int32(q) {
- v108 = j1
+ } else {
+ i1 = 0
+ for {
+ if !(i1 < k) {
+ break
+ }
+ v117 = j1
j1++
- *(*int8)(unsafe.Pointer(bufpt + uintptr(v108))) = ch1
+ v118 = *(*int8)(unsafe.Pointer(escarg + uintptr(i1)))
+ ch1 = v118
+ *(*int8)(unsafe.Pointer(bufpt + uintptr(v117))) = v118
+ if int32(ch1) == int32(q) {
+ v119 = j1
+ j1++
+ *(*int8)(unsafe.Pointer(bufpt + uintptr(v119))) = ch1
+ }
+ goto _116
+ _116:
+ ;
+ i1++
}
- goto _105
- _105:
- ;
- i1++
}
if needQuote != 0 {
- v109 = j1
+ v120 = j1
j1++
- *(*int8)(unsafe.Pointer(bufpt + uintptr(v109))) = q
+ *(*int8)(unsafe.Pointer(bufpt + uintptr(v120))) = int8('\'')
+ if needQuote == int32(2) {
+ v121 = j1
+ j1++
+ *(*int8)(unsafe.Pointer(bufpt + uintptr(v121))) = int8(')')
+ }
}
*(*int8)(unsafe.Pointer(bufpt + uintptr(j1))) = 0
length = int32(j1)
@@ -19449,9 +19573,9 @@ func Xsqlite3_str_vappendf(tls *libc.TLS, pAccum uintptr, fmt uintptr, ap Tva_li
_sqlite3RecordErrorByteOffset(tls, (*Tsqlite3_str)(unsafe.Pointer(pAccum)).Fdb, (*TToken)(unsafe.Pointer(pToken)).Fz)
}
}
- v110 = libc.Int32FromInt32(0)
- width = v110
- length = v110
+ v122 = libc.Int32FromInt32(0)
+ width = v122
+ length = v122
goto _44
_42:
;
@@ -19465,7 +19589,7 @@ func Xsqlite3_str_vappendf(tls *libc.TLS, pAccum uintptr, fmt uintptr, ap Tva_li
if (*TSrcItem)(unsafe.Pointer(pItem)).FzName != 0 {
if int32(*(*uint32)(unsafe.Pointer(pItem + 12 + 4))&0x10000>>16) == 0 && int32(*(*uint32)(unsafe.Pointer(pItem + 12 + 4))&0x4>>2) == 0 && *(*uintptr)(unsafe.Pointer(pItem + 44)) != uintptr(0) {
Xsqlite3_str_appendall(tls, pAccum, *(*uintptr)(unsafe.Pointer(pItem + 44)))
- Xsqlite3_str_append(tls, pAccum, __ccgo_ts+1680, int32(1))
+ Xsqlite3_str_append(tls, pAccum, __ccgo_ts+1706, int32(1))
}
Xsqlite3_str_appendall(tls, pAccum, (*TSrcItem)(unsafe.Pointer(pItem)).FzName)
} else {
@@ -19475,21 +19599,21 @@ func Xsqlite3_str_vappendf(tls *libc.TLS, pAccum uintptr, fmt uintptr, ap Tva_li
if int32(*(*uint32)(unsafe.Pointer(pItem + 12 + 4))&0x4>>2) != 0 { /* Because of tag-20240424-1 */
pSel = (*TSubquery)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(pItem + 44)))).FpSelect
if (*TSelect)(unsafe.Pointer(pSel)).FselFlags&uint32(SF_NestedFrom) != 0 {
- Xsqlite3_str_appendf(tls, pAccum, __ccgo_ts+1682, libc.VaList(bp+120, (*TSelect)(unsafe.Pointer(pSel)).FselId))
+ Xsqlite3_str_appendf(tls, pAccum, __ccgo_ts+1708, libc.VaList(bp+120, (*TSelect)(unsafe.Pointer(pSel)).FselId))
} else {
if (*TSelect)(unsafe.Pointer(pSel)).FselFlags&uint32(SF_MultiValue) != 0 {
- Xsqlite3_str_appendf(tls, pAccum, __ccgo_ts+1692, libc.VaList(bp+120, *(*Tu32)(unsafe.Pointer(pItem + 32))))
+ Xsqlite3_str_appendf(tls, pAccum, __ccgo_ts+1718, libc.VaList(bp+120, *(*Tu32)(unsafe.Pointer(pItem + 32))))
} else {
- Xsqlite3_str_appendf(tls, pAccum, __ccgo_ts+1713, libc.VaList(bp+120, (*TSelect)(unsafe.Pointer(pSel)).FselId))
+ Xsqlite3_str_appendf(tls, pAccum, __ccgo_ts+1739, libc.VaList(bp+120, (*TSelect)(unsafe.Pointer(pSel)).FselId))
}
}
}
}
}
}
- v111 = libc.Int32FromInt32(0)
- width = v111
- length = v111
+ v123 = libc.Int32FromInt32(0)
+ width = v123
+ length = v123
goto _44
_43:
;
@@ -19728,7 +19852,7 @@ func Xsqlite3_str_appendall(tls *libc.TLS, p uintptr, z uintptr) {
func _strAccumFinishRealloc(tls *libc.TLS, p uintptr) (r uintptr) {
var zText, p1 uintptr
_, _ = zText, p1
- zText = _sqlite3DbMallocRaw(tls, (*TStrAccum)(unsafe.Pointer(p)).Fdb, uint64((*TStrAccum)(unsafe.Pointer(p)).FnChar+uint32(1)))
+ zText = _sqlite3DbMallocRaw(tls, (*TStrAccum)(unsafe.Pointer(p)).Fdb, uint64(1)+uint64((*TStrAccum)(unsafe.Pointer(p)).FnChar))
if zText != 0 {
libc.Xmemcpy(tls, zText, (*TStrAccum)(unsafe.Pointer(p)).FzText, (*TStrAccum)(unsafe.Pointer(p)).FnChar+uint32(1))
p1 = p + 21
@@ -20027,6 +20151,8 @@ func Xsqlite3_snprintf(tls *libc.TLS, n int32, zBuf uintptr, zFormat uintptr, va
return zBuf
}
+/* Maximum size of an sqlite3_log() message. */
+
// C documentation
//
// /*
@@ -20044,11 +20170,11 @@ func Xsqlite3_snprintf(tls *libc.TLS, n int32, zBuf uintptr, zFormat uintptr, va
// ** memory mutex is held do not use these mechanisms.
// */
func _renderLogMsg(tls *libc.TLS, iErrCode int32, zFormat uintptr, ap Tva_list) {
- bp := tls.Alloc(240)
- defer tls.Free(240)
+ bp := tls.Alloc(736)
+ defer tls.Free(736)
var _ /* acc at bp+0 */ TStrAccum
- var _ /* zMsg at bp+24 */ [210]int8 /* Complete log message */
- _sqlite3StrAccumInit(tls, bp, uintptr(0), bp+24, int32(210), 0)
+ var _ /* zMsg at bp+24 */ [700]int8 /* Complete log message */
+ _sqlite3StrAccumInit(tls, bp, uintptr(0), bp+24, int32(700), 0)
Xsqlite3_str_vappendf(tls, bp, zFormat, ap)
(*(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(&struct{ uintptr }{_sqlite3Config.FxLog})))(tls, _sqlite3Config.FpLogArg, iErrCode, _sqlite3StrAccumFinish(tls, bp))
}
@@ -20703,6 +20829,37 @@ var _sqlite3Utf8Trans1 = [64]uint8{
// C documentation
//
// /*
+// ** Write a single UTF8 character whose value is v into the
+// ** buffer starting at zOut. zOut must be sized to hold at
+// ** least four bytes. Return the number of bytes needed
+// ** to encode the new character.
+// */
+func _sqlite3AppendOneUtf8Character(tls *libc.TLS, zOut uintptr, v Tu32) (r int32) {
+ if v < uint32(0x00080) {
+ *(*int8)(unsafe.Pointer(zOut)) = libc.Int8FromUint8(uint8(v & libc.Uint32FromInt32(0xff)))
+ return int32(1)
+ }
+ if v < uint32(0x00800) {
+ *(*int8)(unsafe.Pointer(zOut)) = int8(int32(0xc0) + libc.Int32FromUint8(uint8(v>>libc.Int32FromInt32(6)&libc.Uint32FromInt32(0x1f))))
+ *(*int8)(unsafe.Pointer(zOut + 1)) = int8(int32(0x80) + libc.Int32FromUint8(uint8(v&libc.Uint32FromInt32(0x3f))))
+ return int32(2)
+ }
+ if v < uint32(0x10000) {
+ *(*int8)(unsafe.Pointer(zOut)) = int8(int32(0xe0) + libc.Int32FromUint8(uint8(v>>libc.Int32FromInt32(12)&libc.Uint32FromInt32(0x0f))))
+ *(*int8)(unsafe.Pointer(zOut + 1)) = int8(int32(0x80) + libc.Int32FromUint8(uint8(v>>libc.Int32FromInt32(6)&libc.Uint32FromInt32(0x3f))))
+ *(*int8)(unsafe.Pointer(zOut + 2)) = int8(int32(0x80) + libc.Int32FromUint8(uint8(v&libc.Uint32FromInt32(0x3f))))
+ return int32(3)
+ }
+ *(*int8)(unsafe.Pointer(zOut)) = int8(int32(0xf0) + libc.Int32FromUint8(uint8(v>>libc.Int32FromInt32(18)&libc.Uint32FromInt32(0x07))))
+ *(*int8)(unsafe.Pointer(zOut + 1)) = int8(int32(0x80) + libc.Int32FromUint8(uint8(v>>libc.Int32FromInt32(12)&libc.Uint32FromInt32(0x3f))))
+ *(*int8)(unsafe.Pointer(zOut + 2)) = int8(int32(0x80) + libc.Int32FromUint8(uint8(v>>libc.Int32FromInt32(6)&libc.Uint32FromInt32(0x3f))))
+ *(*int8)(unsafe.Pointer(zOut + 3)) = int8(int32(0x80) + libc.Int32FromUint8(uint8(v&libc.Uint32FromInt32(0x3f))))
+ return int32(4)
+}
+
+// C documentation
+//
+// /*
// ** Translate a single UTF-8 character. Return the unicode value.
// **
// ** During translation, assume that the byte that zTerm points
@@ -21450,7 +21607,7 @@ func _sqlite3ProgressCheck(tls *libc.TLS, p uintptr) {
if (*TParse)(unsafe.Pointer(p)).Frc == int32(SQLITE_INTERRUPT) {
(*TParse)(unsafe.Pointer(p)).FnProgressSteps = uint32(0)
} else {
- v2 = p + 116
+ v2 = p + 104
*(*Tu32)(unsafe.Pointer(v2))++
v1 = *(*Tu32)(unsafe.Pointer(v2))
if v1 >= (*Tsqlite3)(unsafe.Pointer(db)).FnProgressOps {
@@ -21625,7 +21782,7 @@ func _sqlite3DequoteNumber(tls *libc.TLS, pParse uintptr, p uintptr) {
}
} else {
if bHex == 0 && (!(libc.Int32FromUint8(_sqlite3CtypeMap[libc.Uint8FromInt8(*(*int8)(unsafe.Pointer(pIn + uintptr(-libc.Int32FromInt32(1)))))])&libc.Int32FromInt32(0x04) != 0) || !(libc.Int32FromUint8(_sqlite3CtypeMap[libc.Uint8FromInt8(*(*int8)(unsafe.Pointer(pIn + 1)))])&libc.Int32FromInt32(0x04) != 0)) || bHex == int32(1) && (!(libc.Int32FromUint8(_sqlite3CtypeMap[libc.Uint8FromInt8(*(*int8)(unsafe.Pointer(pIn + uintptr(-libc.Int32FromInt32(1)))))])&libc.Int32FromInt32(0x08) != 0) || !(libc.Int32FromUint8(_sqlite3CtypeMap[libc.Uint8FromInt8(*(*int8)(unsafe.Pointer(pIn + 1)))])&libc.Int32FromInt32(0x08) != 0)) {
- _sqlite3ErrorMsg(tls, pParse, __ccgo_ts+1727, libc.VaList(bp+16, *(*uintptr)(unsafe.Pointer(p + 8))))
+ _sqlite3ErrorMsg(tls, pParse, __ccgo_ts+1753, libc.VaList(bp+16, *(*uintptr)(unsafe.Pointer(p + 8))))
}
}
goto _2
@@ -22167,7 +22324,7 @@ func _compare2pow63(tls *libc.TLS, zNum uintptr, incr int32) (r int32) {
_, _, _ = c, i, pow63
c = 0
/* 012345678901234567 */
- pow63 = __ccgo_ts + 1752
+ pow63 = __ccgo_ts + 1778
i = 0
for {
if !(c == 0 && i < int32(18)) {
@@ -22394,7 +22551,7 @@ func _sqlite3DecOrHexToI64(tls *libc.TLS, z uintptr, pOut uintptr) (r int32) {
}
return 0
} else {
- n = libc.Int32FromUint32(libc.Uint32FromInt32(0x3fffffff) & libc.Xstrspn(tls, z, __ccgo_ts+1771))
+ n = libc.Int32FromUint32(libc.Uint32FromInt32(0x3fffffff) & libc.Xstrspn(tls, z, __ccgo_ts+1797))
if *(*int8)(unsafe.Pointer(z + uintptr(n))) != 0 {
n++
}
@@ -22554,7 +22711,7 @@ func _sqlite3FpDecode(tls *libc.TLS, p uintptr, _r float64, iRound int32, mxRoun
(*TFpDecode)(unsafe.Pointer(p)).Fsign = int8('+')
(*TFpDecode)(unsafe.Pointer(p)).Fn = int32(1)
(*TFpDecode)(unsafe.Pointer(p)).FiDP = int32(1)
- (*TFpDecode)(unsafe.Pointer(p)).Fz = __ccgo_ts + 1787
+ (*TFpDecode)(unsafe.Pointer(p)).Fz = __ccgo_ts + 1813
return
} else {
(*TFpDecode)(unsafe.Pointer(p)).Fsign = int8('+')
@@ -22663,7 +22820,7 @@ func _sqlite3FpDecode(tls *libc.TLS, p uintptr, _r float64, iRound int32, mxRoun
}
}
(*TFpDecode)(unsafe.Pointer(p)).Fz = p + 16 + uintptr(i+int32(1))
- for (*TFpDecode)(unsafe.Pointer(p)).Fn > 0 && int32(*(*int8)(unsafe.Pointer((*TFpDecode)(unsafe.Pointer(p)).Fz + uintptr((*TFpDecode)(unsafe.Pointer(p)).Fn-int32(1))))) == int32('0') {
+ for int32(*(*int8)(unsafe.Pointer((*TFpDecode)(unsafe.Pointer(p)).Fz + uintptr((*TFpDecode)(unsafe.Pointer(p)).Fn-int32(1))))) == int32('0') {
(*TFpDecode)(unsafe.Pointer(p)).Fn--
}
}
@@ -23079,7 +23236,7 @@ func _sqlite3HexToBlob(tls *libc.TLS, db uintptr, z uintptr, n int32) (r uintptr
func _logBadConnection(tls *libc.TLS, zType uintptr) {
bp := tls.Alloc(16)
defer tls.Free(16)
- Xsqlite3_log(tls, int32(SQLITE_MISUSE), __ccgo_ts+1789, libc.VaList(bp+8, zType))
+ Xsqlite3_log(tls, int32(SQLITE_MISUSE), __ccgo_ts+1815, libc.VaList(bp+8, zType))
}
// C documentation
@@ -23108,7 +23265,7 @@ func _sqlite3SafetyCheckOk(tls *libc.TLS, db uintptr) (r int32) {
eOpenState = (*Tsqlite3)(unsafe.Pointer(db)).FeOpenState
if libc.Int32FromUint8(eOpenState) != int32(SQLITE_STATE_OPEN) {
if _sqlite3SafetyCheckSickOrOk(tls, db) != 0 {
- _logBadConnection(tls, __ccgo_ts+1834)
+ _logBadConnection(tls, __ccgo_ts+1860)
}
return 0
} else {
@@ -23122,7 +23279,7 @@ func _sqlite3SafetyCheckSickOrOk(tls *libc.TLS, db uintptr) (r int32) {
_ = eOpenState
eOpenState = (*Tsqlite3)(unsafe.Pointer(db)).FeOpenState
if libc.Int32FromUint8(eOpenState) != int32(SQLITE_STATE_SICK) && libc.Int32FromUint8(eOpenState) != int32(SQLITE_STATE_OPEN) && libc.Int32FromUint8(eOpenState) != int32(SQLITE_STATE_BUSY) {
- _logBadConnection(tls, __ccgo_ts+1843)
+ _logBadConnection(tls, __ccgo_ts+1869)
return 0
} else {
return int32(1)
@@ -23153,7 +23310,7 @@ func _sqlite3MulInt64(tls *libc.TLS, pA uintptr, iB Ti64) (r int32) {
// C documentation
//
// /*
-// ** Compute the absolute value of a 32-bit signed integer, of possible. Or
+// ** Compute the absolute value of a 32-bit signed integer, if possible. Or
// ** if the integer has a value of -2147483648, return +2147483647
// */
func _sqlite3AbsInt32(tls *libc.TLS, x int32) (r int32) {
@@ -23504,23 +23661,21 @@ func _sqlite3HashClear(tls *libc.TLS, pH uintptr) {
// ** The hashing function.
// */
func _strHash(tls *libc.TLS, z uintptr) (r uint32) {
- var c, v1 uint8
var h uint32
- var v2 uintptr
- _, _, _, _ = c, h, v1, v2
+ var v1 uintptr
+ _, _ = h, v1
h = uint32(0)
- for {
- v2 = z
- z++
- v1 = libc.Uint8FromInt8(*(*int8)(unsafe.Pointer(v2)))
- c = v1
- if !(libc.Int32FromUint8(v1) != 0) {
- break
- } /*OPTIMIZATION-IF-TRUE*/
+ for *(*int8)(unsafe.Pointer(z)) != 0 { /*OPTIMIZATION-IF-TRUE*/
/* Knuth multiplicative hashing. (Sorting & Searching, p. 510).
** 0x9e3779b1 is 2654435761 which is the closest prime number to
- ** (2**32)*golden_ratio, where golden_ratio = (sqrt(5) - 1)/2. */
- h += uint32(_sqlite3UpperToLower[c])
+ ** (2**32)*golden_ratio, where golden_ratio = (sqrt(5) - 1)/2.
+ **
+ ** Only bits 0xdf for ASCII and bits 0xbf for EBCDIC each octet are
+ ** hashed since the omitted bits determine the upper/lower case difference.
+ */
+ v1 = z
+ z++
+ h += libc.Uint32FromInt32(int32(0xdf) & libc.Int32FromUint8(libc.Uint8FromInt8(*(*int8)(unsafe.Pointer(v1)))))
h *= uint32(0x9e3779b1)
}
return h
@@ -23575,8 +23730,8 @@ func _insertElement(tls *libc.TLS, pH uintptr, pEntry uintptr, pNew uintptr) {
// */
func _rehash(tls *libc.TLS, pH uintptr, new_size uint32) (r int32) {
var elem, new_ht, next_elem uintptr
- var h, v1 uint32
- _, _, _, _, _ = elem, h, new_ht, next_elem, v1 /* For looping over existing elements */
+ var v1 uint32
+ _, _, _, _ = elem, new_ht, next_elem, v1 /* For looping over existing elements */
if new_size*uint32(8) > uint32(SQLITE_MALLOC_SOFT_LIMIT) {
new_size = libc.Uint32FromInt32(SQLITE_MALLOC_SOFT_LIMIT) / libc.Uint32FromInt64(8)
}
@@ -23609,9 +23764,8 @@ func _rehash(tls *libc.TLS, pH uintptr, new_size uint32) (r int32) {
if !(elem != 0) {
break
}
- h = _strHash(tls, (*THashElem)(unsafe.Pointer(elem)).FpKey) % new_size
next_elem = (*THashElem)(unsafe.Pointer(elem)).Fnext
- _insertElement(tls, pH, new_ht+uintptr(h)*8, elem)
+ _insertElement(tls, pH, new_ht+uintptr((*THashElem)(unsafe.Pointer(elem)).Fh%new_size)*8, elem)
goto _2
_2:
;
@@ -23631,13 +23785,12 @@ func _findElementWithHash(tls *libc.TLS, pH uintptr, pKey uintptr, pHash uintptr
var count, h uint32
var elem, pEntry uintptr
_, _, _, _ = count, elem, h, pEntry /* The computed hash */
+ h = _strHash(tls, pKey)
if (*THash)(unsafe.Pointer(pH)).Fht != 0 {
- h = _strHash(tls, pKey) % (*THash)(unsafe.Pointer(pH)).Fhtsize
- pEntry = (*THash)(unsafe.Pointer(pH)).Fht + uintptr(h)*8
+ pEntry = (*THash)(unsafe.Pointer(pH)).Fht + uintptr(h%(*THash)(unsafe.Pointer(pH)).Fhtsize)*8
elem = (*T_ht)(unsafe.Pointer(pEntry)).Fchain
count = (*T_ht)(unsafe.Pointer(pEntry)).Fcount
} else {
- h = uint32(0)
elem = (*THash)(unsafe.Pointer(pH)).Ffirst
count = (*THash)(unsafe.Pointer(pH)).Fcount
}
@@ -23645,7 +23798,7 @@ func _findElementWithHash(tls *libc.TLS, pH uintptr, pKey uintptr, pHash uintptr
*(*uint32)(unsafe.Pointer(pHash)) = h
}
for count != 0 {
- if _sqlite3StrICmp(tls, (*THashElem)(unsafe.Pointer(elem)).FpKey, pKey) == 0 {
+ if h == (*THashElem)(unsafe.Pointer(elem)).Fh && _sqlite3StrICmp(tls, (*THashElem)(unsafe.Pointer(elem)).FpKey, pKey) == 0 {
return elem
}
elem = (*THashElem)(unsafe.Pointer(elem)).Fnext
@@ -23661,7 +23814,7 @@ var _nullElement = THashElem{}
// /* Remove a single entry from the hash table given a pointer to that
// ** element and a hash on the element's key.
// */
-func _removeElementGivenHash(tls *libc.TLS, pH uintptr, elem uintptr, h uint32) {
+func _removeElement(tls *libc.TLS, pH uintptr, elem uintptr) {
var pEntry uintptr
_ = pEntry
if (*THashElem)(unsafe.Pointer(elem)).Fprev != 0 {
@@ -23673,7 +23826,7 @@ func _removeElementGivenHash(tls *libc.TLS, pH uintptr, elem uintptr, h uint32)
(*THashElem)(unsafe.Pointer((*THashElem)(unsafe.Pointer(elem)).Fnext)).Fprev = (*THashElem)(unsafe.Pointer(elem)).Fprev
}
if (*THash)(unsafe.Pointer(pH)).Fht != 0 {
- pEntry = (*THash)(unsafe.Pointer(pH)).Fht + uintptr(h)*8
+ pEntry = (*THash)(unsafe.Pointer(pH)).Fht + uintptr((*THashElem)(unsafe.Pointer(elem)).Fh%(*THash)(unsafe.Pointer(pH)).Fhtsize)*8
if (*T_ht)(unsafe.Pointer(pEntry)).Fchain == elem {
(*T_ht)(unsafe.Pointer(pEntry)).Fchain = (*THashElem)(unsafe.Pointer(elem)).Fnext
}
@@ -23722,7 +23875,7 @@ func _sqlite3HashInsert(tls *libc.TLS, pH uintptr, pKey uintptr, data uintptr) (
if (*THashElem)(unsafe.Pointer(elem)).Fdata != 0 {
old_data = (*THashElem)(unsafe.Pointer(elem)).Fdata
if data == uintptr(0) {
- _removeElementGivenHash(tls, pH, elem, *(*uint32)(unsafe.Pointer(bp)))
+ _removeElement(tls, pH, elem)
} else {
(*THashElem)(unsafe.Pointer(elem)).Fdata = data
(*THashElem)(unsafe.Pointer(elem)).FpKey = pKey
@@ -23732,20 +23885,19 @@ func _sqlite3HashInsert(tls *libc.TLS, pH uintptr, pKey uintptr, data uintptr) (
if data == uintptr(0) {
return uintptr(0)
}
- new_elem = _sqlite3Malloc(tls, uint64(16))
+ new_elem = _sqlite3Malloc(tls, uint64(20))
if new_elem == uintptr(0) {
return data
}
(*THashElem)(unsafe.Pointer(new_elem)).FpKey = pKey
+ (*THashElem)(unsafe.Pointer(new_elem)).Fh = *(*uint32)(unsafe.Pointer(bp))
(*THashElem)(unsafe.Pointer(new_elem)).Fdata = data
(*THash)(unsafe.Pointer(pH)).Fcount++
- if (*THash)(unsafe.Pointer(pH)).Fcount >= uint32(10) && (*THash)(unsafe.Pointer(pH)).Fcount > uint32(2)*(*THash)(unsafe.Pointer(pH)).Fhtsize {
- if _rehash(tls, pH, (*THash)(unsafe.Pointer(pH)).Fcount*uint32(2)) != 0 {
- *(*uint32)(unsafe.Pointer(bp)) = _strHash(tls, pKey) % (*THash)(unsafe.Pointer(pH)).Fhtsize
- }
+ if (*THash)(unsafe.Pointer(pH)).Fcount >= uint32(5) && (*THash)(unsafe.Pointer(pH)).Fcount > uint32(2)*(*THash)(unsafe.Pointer(pH)).Fhtsize {
+ _rehash(tls, pH, (*THash)(unsafe.Pointer(pH)).Fcount*uint32(3))
}
if (*THash)(unsafe.Pointer(pH)).Fht != 0 {
- v1 = (*THash)(unsafe.Pointer(pH)).Fht + uintptr(*(*uint32)(unsafe.Pointer(bp)))*8
+ v1 = (*THash)(unsafe.Pointer(pH)).Fht + uintptr((*THashElem)(unsafe.Pointer(new_elem)).Fh%(*THash)(unsafe.Pointer(pH)).Fhtsize)*8
} else {
v1 = uintptr(0)
}
@@ -23764,196 +23916,196 @@ func _sqlite3OpcodeName(tls *libc.TLS, i int32) (r uintptr) {
}
var _azName = [190]uintptr{
- 0: __ccgo_ts + 1851,
- 1: __ccgo_ts + 1861,
- 2: __ccgo_ts + 1872,
- 3: __ccgo_ts + 1884,
- 4: __ccgo_ts + 1895,
- 5: __ccgo_ts + 1907,
- 6: __ccgo_ts + 1914,
- 7: __ccgo_ts + 1922,
- 8: __ccgo_ts + 1930,
- 9: __ccgo_ts + 1935,
- 10: __ccgo_ts + 1940,
- 11: __ccgo_ts + 1946,
- 12: __ccgo_ts + 1960,
- 13: __ccgo_ts + 1966,
- 14: __ccgo_ts + 1976,
- 15: __ccgo_ts + 1981,
- 16: __ccgo_ts + 1986,
- 17: __ccgo_ts + 1989,
- 18: __ccgo_ts + 1995,
- 19: __ccgo_ts + 2002,
- 20: __ccgo_ts + 2006,
- 21: __ccgo_ts + 2016,
- 22: __ccgo_ts + 2023,
- 23: __ccgo_ts + 2030,
- 24: __ccgo_ts + 2037,
- 25: __ccgo_ts + 2044,
- 26: __ccgo_ts + 2054,
- 27: __ccgo_ts + 2063,
- 28: __ccgo_ts + 2074,
- 29: __ccgo_ts + 2083,
- 30: __ccgo_ts + 2089,
- 31: __ccgo_ts + 2099,
- 32: __ccgo_ts + 2109,
- 33: __ccgo_ts + 2114,
- 34: __ccgo_ts + 2128,
- 35: __ccgo_ts + 2139,
- 36: __ccgo_ts + 2144,
- 37: __ccgo_ts + 2151,
- 38: __ccgo_ts + 2162,
- 39: __ccgo_ts + 2167,
- 40: __ccgo_ts + 2172,
- 41: __ccgo_ts + 2178,
- 42: __ccgo_ts + 2184,
- 43: __ccgo_ts + 2190,
- 44: __ccgo_ts + 2193,
- 45: __ccgo_ts + 2197,
- 46: __ccgo_ts + 2203,
- 47: __ccgo_ts + 2214,
- 48: __ccgo_ts + 2225,
- 49: __ccgo_ts + 2233,
- 50: __ccgo_ts + 2242,
- 51: __ccgo_ts + 2248,
- 52: __ccgo_ts + 2255,
- 53: __ccgo_ts + 2263,
- 54: __ccgo_ts + 2266,
- 55: __ccgo_ts + 2269,
- 56: __ccgo_ts + 2272,
- 57: __ccgo_ts + 2275,
- 58: __ccgo_ts + 2278,
- 59: __ccgo_ts + 2281,
- 60: __ccgo_ts + 2288,
- 61: __ccgo_ts + 2298,
- 62: __ccgo_ts + 2311,
- 63: __ccgo_ts + 2322,
- 64: __ccgo_ts + 2328,
- 65: __ccgo_ts + 2335,
- 66: __ccgo_ts + 2344,
- 67: __ccgo_ts + 2353,
- 68: __ccgo_ts + 2360,
- 69: __ccgo_ts + 2373,
- 70: __ccgo_ts + 2384,
- 71: __ccgo_ts + 2389,
- 72: __ccgo_ts + 2397,
- 73: __ccgo_ts + 2403,
- 74: __ccgo_ts + 2410,
- 75: __ccgo_ts + 2422,
- 76: __ccgo_ts + 2427,
- 77: __ccgo_ts + 2436,
- 78: __ccgo_ts + 2441,
- 79: __ccgo_ts + 2450,
- 80: __ccgo_ts + 2455,
- 81: __ccgo_ts + 2460,
- 82: __ccgo_ts + 2466,
- 83: __ccgo_ts + 2474,
- 84: __ccgo_ts + 2482,
- 85: __ccgo_ts + 2492,
- 86: __ccgo_ts + 2500,
- 87: __ccgo_ts + 2507,
- 88: __ccgo_ts + 2520,
- 89: __ccgo_ts + 2525,
- 90: __ccgo_ts + 2537,
- 91: __ccgo_ts + 2545,
- 92: __ccgo_ts + 2552,
- 93: __ccgo_ts + 2563,
- 94: __ccgo_ts + 2570,
- 95: __ccgo_ts + 2577,
- 96: __ccgo_ts + 2587,
- 97: __ccgo_ts + 2596,
- 98: __ccgo_ts + 2607,
- 99: __ccgo_ts + 2613,
- 100: __ccgo_ts + 2624,
- 101: __ccgo_ts + 2634,
- 102: __ccgo_ts + 2644,
- 103: __ccgo_ts + 2653,
- 104: __ccgo_ts + 2660,
- 105: __ccgo_ts + 2666,
- 106: __ccgo_ts + 2676,
- 107: __ccgo_ts + 2687,
- 108: __ccgo_ts + 2691,
- 109: __ccgo_ts + 2700,
- 110: __ccgo_ts + 2709,
- 111: __ccgo_ts + 2716,
- 112: __ccgo_ts + 2726,
- 113: __ccgo_ts + 2733,
- 114: __ccgo_ts + 2743,
- 115: __ccgo_ts + 2751,
- 116: __ccgo_ts + 2758,
- 117: __ccgo_ts + 2772,
- 118: __ccgo_ts + 2786,
- 119: __ccgo_ts + 2794,
- 120: __ccgo_ts + 2805,
- 121: __ccgo_ts + 2818,
- 122: __ccgo_ts + 2829,
- 123: __ccgo_ts + 2835,
- 124: __ccgo_ts + 2847,
- 125: __ccgo_ts + 2856,
- 126: __ccgo_ts + 2864,
- 127: __ccgo_ts + 2873,
- 128: __ccgo_ts + 2882,
- 129: __ccgo_ts + 2889,
- 130: __ccgo_ts + 2897,
- 131: __ccgo_ts + 2904,
- 132: __ccgo_ts + 2915,
- 133: __ccgo_ts + 2929,
- 134: __ccgo_ts + 2940,
- 135: __ccgo_ts + 2948,
- 136: __ccgo_ts + 2954,
- 137: __ccgo_ts + 2962,
- 138: __ccgo_ts + 2970,
- 139: __ccgo_ts + 2980,
- 140: __ccgo_ts + 2993,
- 141: __ccgo_ts + 3003,
- 142: __ccgo_ts + 3016,
- 143: __ccgo_ts + 3025,
- 144: __ccgo_ts + 3036,
- 145: __ccgo_ts + 3044,
- 146: __ccgo_ts + 3050,
- 147: __ccgo_ts + 3062,
- 148: __ccgo_ts + 3074,
- 149: __ccgo_ts + 3082,
- 150: __ccgo_ts + 3094,
- 151: __ccgo_ts + 3107,
- 152: __ccgo_ts + 3117,
- 153: __ccgo_ts + 3127,
- 154: __ccgo_ts + 3139,
- 155: __ccgo_ts + 3144,
- 156: __ccgo_ts + 3156,
- 157: __ccgo_ts + 3166,
- 158: __ccgo_ts + 3172,
- 159: __ccgo_ts + 3182,
- 160: __ccgo_ts + 3189,
- 161: __ccgo_ts + 3201,
- 162: __ccgo_ts + 3212,
- 163: __ccgo_ts + 3220,
- 164: __ccgo_ts + 3229,
- 165: __ccgo_ts + 3238,
- 166: __ccgo_ts + 3247,
- 167: __ccgo_ts + 3254,
- 168: __ccgo_ts + 3265,
- 169: __ccgo_ts + 3278,
- 170: __ccgo_ts + 3288,
- 171: __ccgo_ts + 3295,
- 172: __ccgo_ts + 3303,
- 173: __ccgo_ts + 3312,
- 174: __ccgo_ts + 3318,
- 175: __ccgo_ts + 3325,
- 176: __ccgo_ts + 3333,
- 177: __ccgo_ts + 3341,
- 178: __ccgo_ts + 3349,
- 179: __ccgo_ts + 3359,
- 180: __ccgo_ts + 3368,
- 181: __ccgo_ts + 3379,
- 182: __ccgo_ts + 3390,
- 183: __ccgo_ts + 3401,
- 184: __ccgo_ts + 3411,
- 185: __ccgo_ts + 3417,
- 186: __ccgo_ts + 3428,
- 187: __ccgo_ts + 3439,
- 188: __ccgo_ts + 3444,
- 189: __ccgo_ts + 3452,
+ 0: __ccgo_ts + 1877,
+ 1: __ccgo_ts + 1887,
+ 2: __ccgo_ts + 1898,
+ 3: __ccgo_ts + 1910,
+ 4: __ccgo_ts + 1921,
+ 5: __ccgo_ts + 1933,
+ 6: __ccgo_ts + 1940,
+ 7: __ccgo_ts + 1948,
+ 8: __ccgo_ts + 1956,
+ 9: __ccgo_ts + 1961,
+ 10: __ccgo_ts + 1966,
+ 11: __ccgo_ts + 1972,
+ 12: __ccgo_ts + 1986,
+ 13: __ccgo_ts + 1992,
+ 14: __ccgo_ts + 2002,
+ 15: __ccgo_ts + 2007,
+ 16: __ccgo_ts + 2012,
+ 17: __ccgo_ts + 2015,
+ 18: __ccgo_ts + 2021,
+ 19: __ccgo_ts + 2028,
+ 20: __ccgo_ts + 2032,
+ 21: __ccgo_ts + 2042,
+ 22: __ccgo_ts + 2049,
+ 23: __ccgo_ts + 2056,
+ 24: __ccgo_ts + 2063,
+ 25: __ccgo_ts + 2070,
+ 26: __ccgo_ts + 2080,
+ 27: __ccgo_ts + 2089,
+ 28: __ccgo_ts + 2100,
+ 29: __ccgo_ts + 2109,
+ 30: __ccgo_ts + 2115,
+ 31: __ccgo_ts + 2125,
+ 32: __ccgo_ts + 2135,
+ 33: __ccgo_ts + 2140,
+ 34: __ccgo_ts + 2154,
+ 35: __ccgo_ts + 2165,
+ 36: __ccgo_ts + 2170,
+ 37: __ccgo_ts + 2177,
+ 38: __ccgo_ts + 2188,
+ 39: __ccgo_ts + 2193,
+ 40: __ccgo_ts + 2198,
+ 41: __ccgo_ts + 2204,
+ 42: __ccgo_ts + 2210,
+ 43: __ccgo_ts + 2216,
+ 44: __ccgo_ts + 2219,
+ 45: __ccgo_ts + 2223,
+ 46: __ccgo_ts + 2229,
+ 47: __ccgo_ts + 2240,
+ 48: __ccgo_ts + 2251,
+ 49: __ccgo_ts + 2259,
+ 50: __ccgo_ts + 2268,
+ 51: __ccgo_ts + 2274,
+ 52: __ccgo_ts + 2281,
+ 53: __ccgo_ts + 2289,
+ 54: __ccgo_ts + 2292,
+ 55: __ccgo_ts + 2295,
+ 56: __ccgo_ts + 2298,
+ 57: __ccgo_ts + 2301,
+ 58: __ccgo_ts + 2304,
+ 59: __ccgo_ts + 2307,
+ 60: __ccgo_ts + 2314,
+ 61: __ccgo_ts + 2324,
+ 62: __ccgo_ts + 2337,
+ 63: __ccgo_ts + 2348,
+ 64: __ccgo_ts + 2354,
+ 65: __ccgo_ts + 2361,
+ 66: __ccgo_ts + 2370,
+ 67: __ccgo_ts + 2379,
+ 68: __ccgo_ts + 2386,
+ 69: __ccgo_ts + 2399,
+ 70: __ccgo_ts + 2410,
+ 71: __ccgo_ts + 2415,
+ 72: __ccgo_ts + 2423,
+ 73: __ccgo_ts + 2429,
+ 74: __ccgo_ts + 2436,
+ 75: __ccgo_ts + 2448,
+ 76: __ccgo_ts + 2453,
+ 77: __ccgo_ts + 2462,
+ 78: __ccgo_ts + 2467,
+ 79: __ccgo_ts + 2476,
+ 80: __ccgo_ts + 2481,
+ 81: __ccgo_ts + 2486,
+ 82: __ccgo_ts + 2492,
+ 83: __ccgo_ts + 2500,
+ 84: __ccgo_ts + 2508,
+ 85: __ccgo_ts + 2518,
+ 86: __ccgo_ts + 2526,
+ 87: __ccgo_ts + 2533,
+ 88: __ccgo_ts + 2546,
+ 89: __ccgo_ts + 2551,
+ 90: __ccgo_ts + 2563,
+ 91: __ccgo_ts + 2571,
+ 92: __ccgo_ts + 2578,
+ 93: __ccgo_ts + 2589,
+ 94: __ccgo_ts + 2596,
+ 95: __ccgo_ts + 2603,
+ 96: __ccgo_ts + 2613,
+ 97: __ccgo_ts + 2622,
+ 98: __ccgo_ts + 2633,
+ 99: __ccgo_ts + 2639,
+ 100: __ccgo_ts + 2650,
+ 101: __ccgo_ts + 2660,
+ 102: __ccgo_ts + 2670,
+ 103: __ccgo_ts + 2679,
+ 104: __ccgo_ts + 2686,
+ 105: __ccgo_ts + 2692,
+ 106: __ccgo_ts + 2702,
+ 107: __ccgo_ts + 2713,
+ 108: __ccgo_ts + 2717,
+ 109: __ccgo_ts + 2726,
+ 110: __ccgo_ts + 2735,
+ 111: __ccgo_ts + 2742,
+ 112: __ccgo_ts + 2752,
+ 113: __ccgo_ts + 2759,
+ 114: __ccgo_ts + 2769,
+ 115: __ccgo_ts + 2777,
+ 116: __ccgo_ts + 2784,
+ 117: __ccgo_ts + 2798,
+ 118: __ccgo_ts + 2812,
+ 119: __ccgo_ts + 2820,
+ 120: __ccgo_ts + 2831,
+ 121: __ccgo_ts + 2844,
+ 122: __ccgo_ts + 2855,
+ 123: __ccgo_ts + 2861,
+ 124: __ccgo_ts + 2873,
+ 125: __ccgo_ts + 2882,
+ 126: __ccgo_ts + 2890,
+ 127: __ccgo_ts + 2899,
+ 128: __ccgo_ts + 2908,
+ 129: __ccgo_ts + 2915,
+ 130: __ccgo_ts + 2923,
+ 131: __ccgo_ts + 2930,
+ 132: __ccgo_ts + 2941,
+ 133: __ccgo_ts + 2955,
+ 134: __ccgo_ts + 2966,
+ 135: __ccgo_ts + 2974,
+ 136: __ccgo_ts + 2980,
+ 137: __ccgo_ts + 2988,
+ 138: __ccgo_ts + 2996,
+ 139: __ccgo_ts + 3006,
+ 140: __ccgo_ts + 3019,
+ 141: __ccgo_ts + 3029,
+ 142: __ccgo_ts + 3042,
+ 143: __ccgo_ts + 3051,
+ 144: __ccgo_ts + 3062,
+ 145: __ccgo_ts + 3070,
+ 146: __ccgo_ts + 3076,
+ 147: __ccgo_ts + 3088,
+ 148: __ccgo_ts + 3100,
+ 149: __ccgo_ts + 3108,
+ 150: __ccgo_ts + 3120,
+ 151: __ccgo_ts + 3133,
+ 152: __ccgo_ts + 3143,
+ 153: __ccgo_ts + 3153,
+ 154: __ccgo_ts + 3165,
+ 155: __ccgo_ts + 3170,
+ 156: __ccgo_ts + 3182,
+ 157: __ccgo_ts + 3192,
+ 158: __ccgo_ts + 3198,
+ 159: __ccgo_ts + 3208,
+ 160: __ccgo_ts + 3215,
+ 161: __ccgo_ts + 3227,
+ 162: __ccgo_ts + 3238,
+ 163: __ccgo_ts + 3246,
+ 164: __ccgo_ts + 3255,
+ 165: __ccgo_ts + 3264,
+ 166: __ccgo_ts + 3273,
+ 167: __ccgo_ts + 3280,
+ 168: __ccgo_ts + 3291,
+ 169: __ccgo_ts + 3304,
+ 170: __ccgo_ts + 3314,
+ 171: __ccgo_ts + 3321,
+ 172: __ccgo_ts + 3329,
+ 173: __ccgo_ts + 3338,
+ 174: __ccgo_ts + 3344,
+ 175: __ccgo_ts + 3351,
+ 176: __ccgo_ts + 3359,
+ 177: __ccgo_ts + 3367,
+ 178: __ccgo_ts + 3375,
+ 179: __ccgo_ts + 3385,
+ 180: __ccgo_ts + 3394,
+ 181: __ccgo_ts + 3405,
+ 182: __ccgo_ts + 3416,
+ 183: __ccgo_ts + 3427,
+ 184: __ccgo_ts + 3437,
+ 185: __ccgo_ts + 3443,
+ 186: __ccgo_ts + 3454,
+ 187: __ccgo_ts + 3465,
+ 188: __ccgo_ts + 3470,
+ 189: __ccgo_ts + 3478,
}
type Tregister_t = int32
@@ -24502,91 +24654,91 @@ type unix_syscall = Tunix_syscall
// */
var _aSyscall = [29]Tunix_syscall{
0: {
- FzName: __ccgo_ts + 3462,
+ FzName: __ccgo_ts + 3488,
},
1: {
- FzName: __ccgo_ts + 3467,
+ FzName: __ccgo_ts + 3493,
},
2: {
- FzName: __ccgo_ts + 3473,
+ FzName: __ccgo_ts + 3499,
},
3: {
- FzName: __ccgo_ts + 3480,
+ FzName: __ccgo_ts + 3506,
},
4: {
- FzName: __ccgo_ts + 3487,
+ FzName: __ccgo_ts + 3513,
},
5: {
- FzName: __ccgo_ts + 3492,
+ FzName: __ccgo_ts + 3518,
},
6: {
- FzName: __ccgo_ts + 3498,
+ FzName: __ccgo_ts + 3524,
},
7: {
- FzName: __ccgo_ts + 3508,
+ FzName: __ccgo_ts + 3534,
},
8: {
- FzName: __ccgo_ts + 3514,
+ FzName: __ccgo_ts + 3540,
},
9: {
- FzName: __ccgo_ts + 3519,
+ FzName: __ccgo_ts + 3545,
},
10: {
- FzName: __ccgo_ts + 3525,
+ FzName: __ccgo_ts + 3551,
},
11: {
- FzName: __ccgo_ts + 3533,
+ FzName: __ccgo_ts + 3559,
},
12: {
- FzName: __ccgo_ts + 3539,
+ FzName: __ccgo_ts + 3565,
},
13: {
- FzName: __ccgo_ts + 3546,
+ FzName: __ccgo_ts + 3572,
},
14: {
- FzName: __ccgo_ts + 3555,
+ FzName: __ccgo_ts + 3581,
},
15: {
- FzName: __ccgo_ts + 3562,
+ FzName: __ccgo_ts + 3588,
},
16: {
- FzName: __ccgo_ts + 3572,
+ FzName: __ccgo_ts + 3598,
},
17: {
- FzName: __ccgo_ts + 3579,
+ FzName: __ccgo_ts + 3605,
},
18: {
- FzName: __ccgo_ts + 3593,
+ FzName: __ccgo_ts + 3619,
},
19: {
- FzName: __ccgo_ts + 3599,
+ FzName: __ccgo_ts + 3625,
},
20: {
- FzName: __ccgo_ts + 3605,
+ FzName: __ccgo_ts + 3631,
},
21: {
- FzName: __ccgo_ts + 3612,
+ FzName: __ccgo_ts + 3638,
},
22: {
- FzName: __ccgo_ts + 3620,
+ FzName: __ccgo_ts + 3646,
},
23: {
- FzName: __ccgo_ts + 3625,
+ FzName: __ccgo_ts + 3651,
},
24: {
- FzName: __ccgo_ts + 3632,
+ FzName: __ccgo_ts + 3658,
},
25: {
- FzName: __ccgo_ts + 3639,
+ FzName: __ccgo_ts + 3665,
},
26: {
- FzName: __ccgo_ts + 3651,
+ FzName: __ccgo_ts + 3677,
},
27: {
- FzName: __ccgo_ts + 3660,
+ FzName: __ccgo_ts + 3686,
},
28: {
- FzName: __ccgo_ts + 3666,
+ FzName: __ccgo_ts + 3692,
},
}
@@ -24825,9 +24977,9 @@ func _robust_open(tls *libc.TLS, z uintptr, f int32, m Tmode_t) (r int32) {
(*(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(&struct{ uintptr }{_aSyscall[int32(16)].FpCurrent})))(tls, z)
}
(*(*func(*libc.TLS, int32) int32)(unsafe.Pointer(&struct{ uintptr }{_aSyscall[int32(1)].FpCurrent})))(tls, fd)
- Xsqlite3_log(tls, int32(SQLITE_WARNING), __ccgo_ts+3672, libc.VaList(bp+152, z, fd))
+ Xsqlite3_log(tls, int32(SQLITE_WARNING), __ccgo_ts+3698, libc.VaList(bp+152, z, fd))
fd = -int32(1)
- if (*(*func(*libc.TLS, uintptr, int32, int32) int32)(unsafe.Pointer(&struct{ uintptr }{_aSyscall[0].FpCurrent})))(tls, __ccgo_ts+3715, O_RDONLY, libc.Int32FromUint32(m)) < 0 {
+ if (*(*func(*libc.TLS, uintptr, int32, int32) int32)(unsafe.Pointer(&struct{ uintptr }{_aSyscall[0].FpCurrent})))(tls, __ccgo_ts+3741, O_RDONLY, libc.Int32FromUint32(m)) < 0 {
break
}
}
@@ -25147,7 +25299,7 @@ func _unixLogErrorAtLine(tls *libc.TLS, errcode int32, zFunc uintptr, zPath uint
if zPath == uintptr(0) {
zPath = __ccgo_ts + 1667
}
- Xsqlite3_log(tls, errcode, __ccgo_ts+3725, libc.VaList(bp+8, iLine, iErrno, zFunc, zPath, zErr))
+ Xsqlite3_log(tls, errcode, __ccgo_ts+3751, libc.VaList(bp+8, iLine, iErrno, zFunc, zPath, zErr))
return errcode
}
@@ -25175,7 +25327,7 @@ func _robust_close(tls *libc.TLS, pFile uintptr, h int32, lineno int32) {
} else {
v1 = uintptr(0)
}
- _unixLogErrorAtLine(tls, libc.Int32FromInt32(SQLITE_IOERR)|libc.Int32FromInt32(16)<<libc.Int32FromInt32(8), __ccgo_ts+3467, v1, lineno)
+ _unixLogErrorAtLine(tls, libc.Int32FromInt32(SQLITE_IOERR)|libc.Int32FromInt32(16)<<libc.Int32FromInt32(8), __ccgo_ts+3493, v1, lineno)
}
}
@@ -25204,7 +25356,7 @@ func _closePendingFds(tls *libc.TLS, pFile uintptr) {
break
}
pNext = (*TUnixUnusedFd)(unsafe.Pointer(p)).FpNext
- _robust_close(tls, pFile, (*TUnixUnusedFd)(unsafe.Pointer(p)).Ffd, int32(39960))
+ _robust_close(tls, pFile, (*TUnixUnusedFd)(unsafe.Pointer(p)).Ffd, int32(40204))
Xsqlite3_free(tls, p)
goto _1
_1:
@@ -25345,19 +25497,19 @@ func _verifyDbFile(tls *libc.TLS, pFile uintptr) {
}
rc = (*(*func(*libc.TLS, int32, uintptr) int32)(unsafe.Pointer(&struct{ uintptr }{_aSyscall[int32(5)].FpCurrent})))(tls, (*TunixFile)(unsafe.Pointer(pFile)).Fh, bp)
if rc != 0 {
- Xsqlite3_log(tls, int32(SQLITE_WARNING), __ccgo_ts+3756, libc.VaList(bp+152, (*TunixFile)(unsafe.Pointer(pFile)).FzPath))
+ Xsqlite3_log(tls, int32(SQLITE_WARNING), __ccgo_ts+3782, libc.VaList(bp+152, (*TunixFile)(unsafe.Pointer(pFile)).FzPath))
return
}
if (*(*Tstat)(unsafe.Pointer(bp))).Fst_nlink == uint32(0) {
- Xsqlite3_log(tls, int32(SQLITE_WARNING), __ccgo_ts+3780, libc.VaList(bp+152, (*TunixFile)(unsafe.Pointer(pFile)).FzPath))
+ Xsqlite3_log(tls, int32(SQLITE_WARNING), __ccgo_ts+3806, libc.VaList(bp+152, (*TunixFile)(unsafe.Pointer(pFile)).FzPath))
return
}
if (*(*Tstat)(unsafe.Pointer(bp))).Fst_nlink > uint32(1) {
- Xsqlite3_log(tls, int32(SQLITE_WARNING), __ccgo_ts+3809, libc.VaList(bp+152, (*TunixFile)(unsafe.Pointer(pFile)).FzPath))
+ Xsqlite3_log(tls, int32(SQLITE_WARNING), __ccgo_ts+3835, libc.VaList(bp+152, (*TunixFile)(unsafe.Pointer(pFile)).FzPath))
return
}
if _fileHasMoved(tls, pFile) != 0 {
- Xsqlite3_log(tls, int32(SQLITE_WARNING), __ccgo_ts+3836, libc.VaList(bp+152, (*TunixFile)(unsafe.Pointer(pFile)).FzPath))
+ Xsqlite3_log(tls, int32(SQLITE_WARNING), __ccgo_ts+3862, libc.VaList(bp+152, (*TunixFile)(unsafe.Pointer(pFile)).FzPath))
return
}
}
@@ -25834,7 +25986,7 @@ func _closeUnixFile(tls *libc.TLS, id uintptr) (r int32) {
pFile = id
_unixUnmapfile(tls, pFile)
if (*TunixFile)(unsafe.Pointer(pFile)).Fh >= 0 {
- _robust_close(tls, pFile, (*TunixFile)(unsafe.Pointer(pFile)).Fh, int32(40744))
+ _robust_close(tls, pFile, (*TunixFile)(unsafe.Pointer(pFile)).Fh, int32(40995))
(*TunixFile)(unsafe.Pointer(pFile)).Fh = -int32(1)
}
Xsqlite3_free(tls, (*TunixFile)(unsafe.Pointer(pFile)).FpPreallocatedUnused)
@@ -26439,7 +26591,7 @@ func _openDirectory(tls *libc.TLS, zFilename uintptr, pFd uintptr) (r int32) {
var _ /* zDirname at bp+0 */ [513]int8
_, _ = fd, ii
fd = -int32(1)
- Xsqlite3_snprintf(tls, int32(MAX_PATHNAME), bp, __ccgo_ts+3864, libc.VaList(bp+528, zFilename))
+ Xsqlite3_snprintf(tls, int32(MAX_PATHNAME), bp, __ccgo_ts+3890, libc.VaList(bp+528, zFilename))
ii = libc.Int32FromUint32(libc.Xstrlen(tls, bp))
for {
if !(ii > 0 && int32((*(*[513]int8)(unsafe.Pointer(bp)))[ii]) != int32('/')) {
@@ -26465,7 +26617,7 @@ func _openDirectory(tls *libc.TLS, zFilename uintptr, pFd uintptr) (r int32) {
if fd >= 0 {
return SQLITE_OK
}
- return _unixLogErrorAtLine(tls, _sqlite3CantopenError(tls, int32(42325)), __ccgo_ts+3579, bp, int32(42325))
+ return _unixLogErrorAtLine(tls, _sqlite3CantopenError(tls, int32(42576)), __ccgo_ts+3605, bp, int32(42576))
}
// C documentation
@@ -26502,7 +26654,7 @@ func _unixSync(tls *libc.TLS, id uintptr, flags int32) (r int32) {
rc = _full_fsync(tls, (*TunixFile)(unsafe.Pointer(pFile)).Fh, isFullsync, isDataOnly)
if rc != 0 {
_storeLastErrno(tls, pFile, *(*int32)(unsafe.Pointer(libc.X__errno_location(tls))))
- return _unixLogErrorAtLine(tls, libc.Int32FromInt32(SQLITE_IOERR)|libc.Int32FromInt32(4)<<libc.Int32FromInt32(8), __ccgo_ts+3867, (*TunixFile)(unsafe.Pointer(pFile)).FzPath, int32(42366))
+ return _unixLogErrorAtLine(tls, libc.Int32FromInt32(SQLITE_IOERR)|libc.Int32FromInt32(4)<<libc.Int32FromInt32(8), __ccgo_ts+3893, (*TunixFile)(unsafe.Pointer(pFile)).FzPath, int32(42617))
}
/* Also fsync the directory containing the file if the DIRSYNC flag
** is set. This is a one-time occurrence. Many systems (examples: AIX)
@@ -26512,7 +26664,7 @@ func _unixSync(tls *libc.TLS, id uintptr, flags int32) (r int32) {
rc = (*(*func(*libc.TLS, uintptr, uintptr) int32)(unsafe.Pointer(&struct{ uintptr }{_aSyscall[int32(17)].FpCurrent})))(tls, (*TunixFile)(unsafe.Pointer(pFile)).FzPath, bp)
if rc == SQLITE_OK {
_full_fsync(tls, *(*int32)(unsafe.Pointer(bp)), 0, 0)
- _robust_close(tls, pFile, *(*int32)(unsafe.Pointer(bp)), int32(42380))
+ _robust_close(tls, pFile, *(*int32)(unsafe.Pointer(bp)), int32(42631))
} else {
rc = SQLITE_OK
}
@@ -26543,7 +26695,7 @@ func _unixTruncate(tls *libc.TLS, id uintptr, nByte Ti64) (r int32) {
rc = _robust_ftruncate(tls, (*TunixFile)(unsafe.Pointer(pFile)).Fh, nByte)
if rc != 0 {
_storeLastErrno(tls, pFile, *(*int32)(unsafe.Pointer(libc.X__errno_location(tls))))
- return _unixLogErrorAtLine(tls, libc.Int32FromInt32(SQLITE_IOERR)|libc.Int32FromInt32(6)<<libc.Int32FromInt32(8), __ccgo_ts+3498, (*TunixFile)(unsafe.Pointer(pFile)).FzPath, int32(42411))
+ return _unixLogErrorAtLine(tls, libc.Int32FromInt32(SQLITE_IOERR)|libc.Int32FromInt32(6)<<libc.Int32FromInt32(8), __ccgo_ts+3524, (*TunixFile)(unsafe.Pointer(pFile)).FzPath, int32(42662))
} else {
/* If the file was just truncated to a size smaller than the currently
** mapped region, reduce the effective mapping size as well. SQLite will
@@ -26639,7 +26791,7 @@ func _fcntlSizeHint(tls *libc.TLS, pFile uintptr, nByte Ti64) (r int32) {
if (*TunixFile)(unsafe.Pointer(pFile)).FszChunk <= 0 {
if _robust_ftruncate(tls, (*TunixFile)(unsafe.Pointer(pFile)).Fh, nByte) != 0 {
_storeLastErrno(tls, pFile, *(*int32)(unsafe.Pointer(libc.X__errno_location(tls))))
- return _unixLogErrorAtLine(tls, libc.Int32FromInt32(SQLITE_IOERR)|libc.Int32FromInt32(6)<<libc.Int32FromInt32(8), __ccgo_ts+3498, (*TunixFile)(unsafe.Pointer(pFile)).FzPath, int32(42532))
+ return _unixLogErrorAtLine(tls, libc.Int32FromInt32(SQLITE_IOERR)|libc.Int32FromInt32(6)<<libc.Int32FromInt32(8), __ccgo_ts+3524, (*TunixFile)(unsafe.Pointer(pFile)).FzPath, int32(42783))
}
}
rc = _unixMapfile(tls, pFile, nByte)
@@ -26709,7 +26861,7 @@ func _unixFileControl(tls *libc.TLS, id uintptr, op int32, pArg uintptr) (r int3
_unixModeBit(tls, pFile, uint8(UNIXFILE_PSOW), pArg)
return SQLITE_OK
case int32(SQLITE_FCNTL_VFSNAME):
- *(*uintptr)(unsafe.Pointer(pArg)) = Xsqlite3_mprintf(tls, __ccgo_ts+3864, libc.VaList(bp+8, (*Tsqlite3_vfs)(unsafe.Pointer((*TunixFile)(unsafe.Pointer(pFile)).FpVfs)).FzName))
+ *(*uintptr)(unsafe.Pointer(pArg)) = Xsqlite3_mprintf(tls, __ccgo_ts+3890, libc.VaList(bp+8, (*Tsqlite3_vfs)(unsafe.Pointer((*TunixFile)(unsafe.Pointer(pFile)).FpVfs)).FzName))
return SQLITE_OK
case int32(SQLITE_FCNTL_TEMPFILENAME):
zTFile = Xsqlite3_malloc64(tls, libc.Uint64FromInt32((*Tsqlite3_vfs)(unsafe.Pointer((*TunixFile)(unsafe.Pointer(pFile)).FpVfs)).FmxPathname))
@@ -27050,7 +27202,7 @@ func _unixShmPurge(tls *libc.TLS, pFd uintptr) {
}
Xsqlite3_free(tls, (*TunixShmNode)(unsafe.Pointer(p)).FapRegion)
if (*TunixShmNode)(unsafe.Pointer(p)).FhShm >= 0 {
- _robust_close(tls, pFd, (*TunixShmNode)(unsafe.Pointer(p)).FhShm, int32(43136))
+ _robust_close(tls, pFd, (*TunixShmNode)(unsafe.Pointer(p)).FhShm, int32(43393))
(*TunixShmNode)(unsafe.Pointer(p)).FhShm = -int32(1)
}
(*TunixInodeInfo)(unsafe.Pointer((*TunixShmNode)(unsafe.Pointer(p)).FpInode)).FpShmNode = uintptr(0)
@@ -27113,7 +27265,7 @@ func _unixLockSharedMemory(tls *libc.TLS, pDbFd uintptr, pShmNode uintptr) (r in
** help detect if a -shm file truncation is legitimate or is the work
** or a rogue process. */
if rc == SQLITE_OK && _robust_ftruncate(tls, (*TunixShmNode)(unsafe.Pointer(pShmNode)).FhShm, int64(3)) != 0 {
- rc = _unixLogErrorAtLine(tls, libc.Int32FromInt32(SQLITE_IOERR)|libc.Int32FromInt32(18)<<libc.Int32FromInt32(8), __ccgo_ts+3498, (*TunixShmNode)(unsafe.Pointer(pShmNode)).FzFilename, int32(43206))
+ rc = _unixLogErrorAtLine(tls, libc.Int32FromInt32(SQLITE_IOERR)|libc.Int32FromInt32(18)<<libc.Int32FromInt32(8), __ccgo_ts+3524, (*TunixShmNode)(unsafe.Pointer(pShmNode)).FzFilename, int32(43463))
}
}
} else {
@@ -27206,7 +27358,7 @@ func _unixOpenSharedMemory(tls *libc.TLS, pDbFd uintptr) (r int32) {
v1 = pShmNode + 1*68
(*TunixShmNode1)(unsafe.Pointer(pShmNode)).FzFilename = v1
zShm = v1
- Xsqlite3_snprintf(tls, nShmFilename, zShm, __ccgo_ts+3878, libc.VaList(bp+152, zBasePath))
+ Xsqlite3_snprintf(tls, nShmFilename, zShm, __ccgo_ts+3904, libc.VaList(bp+152, zBasePath))
(*TunixShmNode1)(unsafe.Pointer(pShmNode)).FhShm = -int32(1)
(*TunixInodeInfo)(unsafe.Pointer((*TunixFile)(unsafe.Pointer(pDbFd)).FpInode)).FpShmNode = pShmNode
(*TunixShmNode1)(unsafe.Pointer(pShmNode)).FpInode = (*TunixFile)(unsafe.Pointer(pDbFd)).FpInode
@@ -27218,13 +27370,13 @@ func _unixOpenSharedMemory(tls *libc.TLS, pDbFd uintptr) (r int32) {
}
}
if libc.Int32FromUint8((*TunixInodeInfo)(unsafe.Pointer(pInode)).FbProcessLock) == 0 {
- if 0 == Xsqlite3_uri_boolean(tls, (*TunixFile)(unsafe.Pointer(pDbFd)).FzPath, __ccgo_ts+3885, 0) {
+ if 0 == Xsqlite3_uri_boolean(tls, (*TunixFile)(unsafe.Pointer(pDbFd)).FzPath, __ccgo_ts+3911, 0) {
(*TunixShmNode1)(unsafe.Pointer(pShmNode)).FhShm = _robust_open(tls, zShm, libc.Int32FromInt32(O_RDWR)|libc.Int32FromInt32(O_CREAT)|libc.Int32FromInt32(O_NOFOLLOW), (*(*Tstat)(unsafe.Pointer(bp))).Fst_mode&libc.Uint32FromInt32(0777))
}
if (*TunixShmNode1)(unsafe.Pointer(pShmNode)).FhShm < 0 {
(*TunixShmNode1)(unsafe.Pointer(pShmNode)).FhShm = _robust_open(tls, zShm, libc.Int32FromInt32(O_RDONLY)|libc.Int32FromInt32(O_NOFOLLOW), (*(*Tstat)(unsafe.Pointer(bp))).Fst_mode&libc.Uint32FromInt32(0777))
if (*TunixShmNode1)(unsafe.Pointer(pShmNode)).FhShm < 0 {
- rc = _unixLogErrorAtLine(tls, _sqlite3CantopenError(tls, int32(43343)), __ccgo_ts+3462, zShm, int32(43343))
+ rc = _unixLogErrorAtLine(tls, _sqlite3CantopenError(tls, int32(43600)), __ccgo_ts+3488, zShm, int32(43600))
goto shm_open_err
}
(*TunixShmNode1)(unsafe.Pointer(pShmNode)).FisReadonly = uint8(1)
@@ -27346,7 +27498,7 @@ func _unixShmMap(tls *libc.TLS, fd uintptr, iRegion int32, szRegion int32, bExte
*(*int32)(unsafe.Pointer(bp + 144)) = 0
if _seekAndWriteFd(tls, (*TunixShmNode)(unsafe.Pointer(pShmNode)).FhShm, int64(iPg*_pgsz+_pgsz-int32(1)), __ccgo_ts+1667, int32(1), bp+144) != int32(1) {
zFile = (*TunixShmNode)(unsafe.Pointer(pShmNode)).FzFilename
- rc = _unixLogErrorAtLine(tls, libc.Int32FromInt32(SQLITE_IOERR)|libc.Int32FromInt32(19)<<libc.Int32FromInt32(8), __ccgo_ts+3533, zFile, int32(43487))
+ rc = _unixLogErrorAtLine(tls, libc.Int32FromInt32(SQLITE_IOERR)|libc.Int32FromInt32(19)<<libc.Int32FromInt32(8), __ccgo_ts+3559, zFile, int32(43744))
goto shmpage_out
}
goto _1
@@ -27374,7 +27526,7 @@ func _unixShmMap(tls *libc.TLS, fd uintptr, iRegion int32, szRegion int32, bExte
}
pMem = (*(*func(*libc.TLS, uintptr, Tsize_t, int32, int32, int32, Toff_t) uintptr)(unsafe.Pointer(&struct{ uintptr }{_aSyscall[int32(22)].FpCurrent})))(tls, uintptr(0), libc.Uint32FromInt32(nMap), v2, int32(MAP_SHARED), (*TunixShmNode)(unsafe.Pointer(pShmNode)).FhShm, int64(szRegion)*libc.Int64FromUint16((*TunixShmNode)(unsafe.Pointer(pShmNode)).FnRegion))
if pMem == uintptr(-libc.Int32FromInt32(1)) {
- rc = _unixLogErrorAtLine(tls, libc.Int32FromInt32(SQLITE_IOERR)|libc.Int32FromInt32(21)<<libc.Int32FromInt32(8), __ccgo_ts+3620, (*TunixShmNode)(unsafe.Pointer(pShmNode)).FzFilename, int32(43514))
+ rc = _unixLogErrorAtLine(tls, libc.Int32FromInt32(SQLITE_IOERR)|libc.Int32FromInt32(21)<<libc.Int32FromInt32(8), __ccgo_ts+3646, (*TunixShmNode)(unsafe.Pointer(pShmNode)).FzFilename, int32(43771))
goto shmpage_out
}
} else {
@@ -27455,15 +27607,14 @@ func _unixShmLock(tls *libc.TLS, fd uintptr, ofst int32, n int32, flags int32) (
/* Check that, if this to be a blocking lock, no locks that occur later
** in the following list than the lock being obtained are already held:
**
- ** 1. Checkpointer lock (ofst==1).
- ** 2. Write lock (ofst==0).
- ** 3. Read locks (ofst>=3 && ofst<SQLITE_SHM_NLOCK).
+ ** 1. Recovery lock (ofst==2).
+ ** 2. Checkpointer lock (ofst==1).
+ ** 3. Write lock (ofst==0).
+ ** 4. Read locks (ofst>=3 && ofst<SQLITE_SHM_NLOCK).
**
** In other words, if this is a blocking lock, none of the locks that
** occur later in the above list than the lock being obtained may be
** held.
- **
- ** It is not permitted to block on the RECOVER lock.
*/
/* Check if there is any work to do. There are three cases:
**
@@ -27682,7 +27833,7 @@ func _unixRemapfile(tls *libc.TLS, pFd uintptr, nNew Ti64) {
var pNew, pOrig, pReq, zErr uintptr
var v1 Tsqlite3_int64
_, _, _, _, _, _, _, _, _ = flags, h, nOrig, nReuse, pNew, pOrig, pReq, zErr, v1
- zErr = __ccgo_ts + 3620
+ zErr = __ccgo_ts + 3646
h = (*TunixFile)(unsafe.Pointer(pFd)).Fh /* File descriptor open on db file */
pOrig = (*TunixFile)(unsafe.Pointer(pFd)).FpMapRegion /* Pointer to current file mapping */
nOrig = (*TunixFile)(unsafe.Pointer(pFd)).FmmapSizeActual /* Size of pOrig region in bytes */
@@ -27696,7 +27847,7 @@ func _unixRemapfile(tls *libc.TLS, pFd uintptr, nNew Ti64) {
(*(*func(*libc.TLS, uintptr, Tsize_t) int32)(unsafe.Pointer(&struct{ uintptr }{_aSyscall[int32(23)].FpCurrent})))(tls, pReq, libc.Uint32FromInt64(nOrig-nReuse))
}
pNew = (*(*func(*libc.TLS, uintptr, Tsize_t, Tsize_t, int32, uintptr) uintptr)(unsafe.Pointer(&struct{ uintptr }{_aSyscall[int32(24)].FpCurrent})))(tls, pOrig, libc.Uint32FromInt64(nReuse), libc.Uint32FromInt64(nNew), int32(MREMAP_MAYMOVE), 0)
- zErr = __ccgo_ts + 3632
+ zErr = __ccgo_ts + 3658
/* The attempt to extend the existing mapping failed. Free it. */
if pNew == uintptr(-libc.Int32FromInt32(1)) || pNew == uintptr(0) {
(*(*func(*libc.TLS, uintptr, Tsize_t) int32)(unsafe.Pointer(&struct{ uintptr }{_aSyscall[int32(23)].FpCurrent})))(tls, pOrig, libc.Uint32FromInt64(nReuse))
@@ -27709,7 +27860,7 @@ func _unixRemapfile(tls *libc.TLS, pFd uintptr, nNew Ti64) {
if pNew == uintptr(-libc.Int32FromInt32(1)) {
pNew = uintptr(0)
nNew = 0
- _unixLogErrorAtLine(tls, SQLITE_OK, zErr, (*TunixFile)(unsafe.Pointer(pFd)).FzPath, int32(43954))
+ _unixLogErrorAtLine(tls, SQLITE_OK, zErr, (*TunixFile)(unsafe.Pointer(pFd)).FzPath, int32(44210))
/* If the mmap() above failed, assume that all subsequent mmap() calls
** will probably fail too. Fall back to using xRead/xWrite exclusively
** in this case. */
@@ -28045,11 +28196,11 @@ func _fillInUnixFile(tls *libc.TLS, pVfs uintptr, h int32, pId uintptr, zFilenam
} else {
v1 = uintptr(0)
}
- if Xsqlite3_uri_boolean(tls, v1, __ccgo_ts+3898, int32(SQLITE_POWERSAFE_OVERWRITE)) != 0 {
+ if Xsqlite3_uri_boolean(tls, v1, __ccgo_ts+3924, int32(SQLITE_POWERSAFE_OVERWRITE)) != 0 {
p2 = pNew + 18
*(*uint16)(unsafe.Pointer(p2)) = uint16(int32(*(*uint16)(unsafe.Pointer(p2))) | libc.Int32FromInt32(UNIXFILE_PSOW))
}
- if libc.Xstrcmp(tls, (*Tsqlite3_vfs)(unsafe.Pointer(pVfs)).FzName, __ccgo_ts+3903) == 0 {
+ if libc.Xstrcmp(tls, (*Tsqlite3_vfs)(unsafe.Pointer(pVfs)).FzName, __ccgo_ts+3929) == 0 {
p3 = pNew + 18
*(*uint16)(unsafe.Pointer(p3)) = uint16(int32(*(*uint16)(unsafe.Pointer(p3))) | libc.Int32FromInt32(UNIXFILE_EXCL))
}
@@ -28080,7 +28231,7 @@ func _fillInUnixFile(tls *libc.TLS, pVfs uintptr, h int32, pId uintptr, zFilenam
** implicit assumption here is that if fstat() fails, things are in
** such bad shape that dropping a lock or two doesn't matter much.
*/
- _robust_close(tls, pNew, h, int32(44462))
+ _robust_close(tls, pNew, h, int32(44718))
h = -int32(1)
}
_unixLeaveMutex(tls)
@@ -28091,7 +28242,7 @@ func _fillInUnixFile(tls *libc.TLS, pVfs uintptr, h int32, pId uintptr, zFilenam
if zLockFile == uintptr(0) {
rc = int32(SQLITE_NOMEM)
} else {
- Xsqlite3_snprintf(tls, nFilename, zLockFile, __ccgo_ts+3913, libc.VaList(bp+8, zFilename))
+ Xsqlite3_snprintf(tls, nFilename, zLockFile, __ccgo_ts+3939, libc.VaList(bp+8, zFilename))
}
(*TunixFile)(unsafe.Pointer(pNew)).FlockingContext = zLockFile
}
@@ -28099,7 +28250,7 @@ func _fillInUnixFile(tls *libc.TLS, pVfs uintptr, h int32, pId uintptr, zFilenam
_storeLastErrno(tls, pNew, 0)
if rc != SQLITE_OK {
if h >= 0 {
- _robust_close(tls, pNew, h, int32(44547))
+ _robust_close(tls, pNew, h, int32(44803))
}
} else {
(*Tsqlite3_file)(unsafe.Pointer(pId)).FpMethods = pLockingStyle
@@ -28114,10 +28265,10 @@ func _fillInUnixFile(tls *libc.TLS, pVfs uintptr, h int32, pId uintptr, zFilenam
// ** Directories to consider for temp files.
// */
var _azTempDirs = [6]uintptr{
- 2: __ccgo_ts + 3921,
- 3: __ccgo_ts + 3930,
- 4: __ccgo_ts + 3939,
- 5: __ccgo_ts + 1680,
+ 2: __ccgo_ts + 3947,
+ 3: __ccgo_ts + 3956,
+ 4: __ccgo_ts + 3965,
+ 5: __ccgo_ts + 1706,
}
// C documentation
@@ -28126,8 +28277,8 @@ var _azTempDirs = [6]uintptr{
// ** Initialize first two members of azTempDirs[] array.
// */
func _unixTempFileInit(tls *libc.TLS) {
- _azTempDirs[0] = libc.Xgetenv(tls, __ccgo_ts+3944)
- _azTempDirs[int32(1)] = libc.Xgetenv(tls, __ccgo_ts+3958)
+ _azTempDirs[0] = libc.Xgetenv(tls, __ccgo_ts+3970)
+ _azTempDirs[int32(1)] = libc.Xgetenv(tls, __ccgo_ts+3984)
}
// C documentation
@@ -28189,7 +28340,7 @@ func _unixGetTempname(tls *libc.TLS, nBuf int32, zBuf uintptr) (r int32) {
for cond := true; cond; cond = (*(*func(*libc.TLS, uintptr, int32) int32)(unsafe.Pointer(&struct{ uintptr }{_aSyscall[int32(2)].FpCurrent})))(tls, zBuf, 0) == 0 {
Xsqlite3_randomness(tls, int32(8), bp)
*(*int8)(unsafe.Pointer(zBuf + uintptr(nBuf-int32(2)))) = 0
- Xsqlite3_snprintf(tls, nBuf, zBuf, __ccgo_ts+3965, libc.VaList(bp+16, zDir, *(*Tu64)(unsafe.Pointer(bp)), 0))
+ Xsqlite3_snprintf(tls, nBuf, zBuf, __ccgo_ts+3991, libc.VaList(bp+16, zDir, *(*Tu64)(unsafe.Pointer(bp)), 0))
if v2 = int32(*(*int8)(unsafe.Pointer(zBuf + uintptr(nBuf-int32(2))))) != 0; !v2 {
v1 = iLimit
iLimit++
@@ -28361,7 +28512,7 @@ func _findCreateFileMode(tls *libc.TLS, zPath uintptr, flags int32, pMode uintpt
** filename, check for the "modeof" parameter. If present, interpret
** its value as a filename and try to copy the mode, uid and gid from
** that file. */
- z = Xsqlite3_uri_parameter(tls, zPath, __ccgo_ts+3982)
+ z = Xsqlite3_uri_parameter(tls, zPath, __ccgo_ts+4008)
if z != 0 {
rc = _getFileMode(tls, z, pMode, pUid, pGid)
}
@@ -28516,7 +28667,7 @@ func _unixOpen(tls *libc.TLS, pVfs uintptr, zPath uintptr, pFile uintptr, flags
}
}
if fd < 0 {
- rc2 = _unixLogErrorAtLine(tls, _sqlite3CantopenError(tls, int32(44995)), __ccgo_ts+3462, zName, int32(44995))
+ rc2 = _unixLogErrorAtLine(tls, _sqlite3CantopenError(tls, int32(45251)), __ccgo_ts+3488, zName, int32(45251))
if rc == SQLITE_OK {
rc = rc2
}
@@ -28593,7 +28744,7 @@ func _unixDelete(tls *libc.TLS, NotUsed uintptr, zPath uintptr, dirSync int32) (
if *(*int32)(unsafe.Pointer(libc.X__errno_location(tls))) == int32(ENOENT) {
rc = libc.Int32FromInt32(SQLITE_IOERR) | libc.Int32FromInt32(23)<<libc.Int32FromInt32(8)
} else {
- rc = _unixLogErrorAtLine(tls, libc.Int32FromInt32(SQLITE_IOERR)|libc.Int32FromInt32(10)<<libc.Int32FromInt32(8), __ccgo_ts+3572, zPath, int32(45134))
+ rc = _unixLogErrorAtLine(tls, libc.Int32FromInt32(SQLITE_IOERR)|libc.Int32FromInt32(10)<<libc.Int32FromInt32(8), __ccgo_ts+3598, zPath, int32(45390))
}
return rc
}
@@ -28601,9 +28752,9 @@ func _unixDelete(tls *libc.TLS, NotUsed uintptr, zPath uintptr, dirSync int32) (
rc = (*(*func(*libc.TLS, uintptr, uintptr) int32)(unsafe.Pointer(&struct{ uintptr }{_aSyscall[int32(17)].FpCurrent})))(tls, zPath, bp)
if rc == SQLITE_OK {
if _full_fsync(tls, *(*int32)(unsafe.Pointer(bp)), 0, 0) != 0 {
- rc = _unixLogErrorAtLine(tls, libc.Int32FromInt32(SQLITE_IOERR)|libc.Int32FromInt32(5)<<libc.Int32FromInt32(8), __ccgo_ts+3989, zPath, int32(45144))
+ rc = _unixLogErrorAtLine(tls, libc.Int32FromInt32(SQLITE_IOERR)|libc.Int32FromInt32(5)<<libc.Int32FromInt32(8), __ccgo_ts+4015, zPath, int32(45400))
}
- _robust_close(tls, uintptr(0), *(*int32)(unsafe.Pointer(bp)), int32(45146))
+ _robust_close(tls, uintptr(0), *(*int32)(unsafe.Pointer(bp)), int32(45402))
} else {
rc = SQLITE_OK
}
@@ -28710,7 +28861,7 @@ func _appendOnePathElement(tls *libc.TLS, pPath uintptr, zName uintptr, nName in
zIn = (*TDbPath)(unsafe.Pointer(pPath)).FzOut
if (*(*func(*libc.TLS, uintptr, uintptr) int32)(unsafe.Pointer(&struct{ uintptr }{_aSyscall[int32(27)].FpCurrent})))(tls, zIn, bp) != 0 {
if *(*int32)(unsafe.Pointer(libc.X__errno_location(tls))) != int32(ENOENT) {
- (*TDbPath)(unsafe.Pointer(pPath)).Frc = _unixLogErrorAtLine(tls, _sqlite3CantopenError(tls, int32(45240)), __ccgo_ts+3660, zIn, int32(45240))
+ (*TDbPath)(unsafe.Pointer(pPath)).Frc = _unixLogErrorAtLine(tls, _sqlite3CantopenError(tls, int32(45496)), __ccgo_ts+3686, zIn, int32(45496))
}
} else {
if (*(*Tstat)(unsafe.Pointer(bp))).Fst_mode&uint32(S_IFMT) == uint32(S_IFLNK) {
@@ -28718,12 +28869,12 @@ func _appendOnePathElement(tls *libc.TLS, pPath uintptr, zName uintptr, nName in
v5 = *(*int32)(unsafe.Pointer(v6))
*(*int32)(unsafe.Pointer(v6))++
if v5 > int32(SQLITE_MAX_SYMLINK) {
- (*TDbPath)(unsafe.Pointer(pPath)).Frc = _sqlite3CantopenError(tls, int32(45246))
+ (*TDbPath)(unsafe.Pointer(pPath)).Frc = _sqlite3CantopenError(tls, int32(45502))
return
}
got = (*(*func(*libc.TLS, uintptr, uintptr, Tsize_t) Tssize_t)(unsafe.Pointer(&struct{ uintptr }{_aSyscall[int32(26)].FpCurrent})))(tls, zIn, bp+144, libc.Uint32FromInt64(4098)-libc.Uint32FromInt32(2))
if got <= 0 || got >= libc.Int32FromInt64(4098)-libc.Int32FromInt32(2) {
- (*TDbPath)(unsafe.Pointer(pPath)).Frc = _unixLogErrorAtLine(tls, _sqlite3CantopenError(tls, int32(45251)), __ccgo_ts+3651, zIn, int32(45251))
+ (*TDbPath)(unsafe.Pointer(pPath)).Frc = _unixLogErrorAtLine(tls, _sqlite3CantopenError(tls, int32(45507)), __ccgo_ts+3677, zIn, int32(45507))
return
}
(*(*[4098]int8)(unsafe.Pointer(bp + 144)))[got] = 0
@@ -28791,14 +28942,14 @@ func _unixFullPathname(tls *libc.TLS, pVfs uintptr, zPath uintptr, nOut int32, z
(*(*TDbPath)(unsafe.Pointer(bp))).FzOut = zOut
if int32(*(*int8)(unsafe.Pointer(zPath))) != int32('/') {
if (*(*func(*libc.TLS, uintptr, Tsize_t) uintptr)(unsafe.Pointer(&struct{ uintptr }{_aSyscall[int32(3)].FpCurrent})))(tls, bp+20, libc.Uint32FromInt64(4098)-libc.Uint32FromInt32(2)) == uintptr(0) {
- return _unixLogErrorAtLine(tls, _sqlite3CantopenError(tls, int32(45309)), __ccgo_ts+3480, zPath, int32(45309))
+ return _unixLogErrorAtLine(tls, _sqlite3CantopenError(tls, int32(45565)), __ccgo_ts+3506, zPath, int32(45565))
}
_appendAllPathElements(tls, bp, bp+20)
}
_appendAllPathElements(tls, bp, zPath)
*(*int8)(unsafe.Pointer(zOut + uintptr((*(*TDbPath)(unsafe.Pointer(bp))).FnUsed))) = 0
if (*(*TDbPath)(unsafe.Pointer(bp))).Frc != 0 || (*(*TDbPath)(unsafe.Pointer(bp))).FnUsed < int32(2) {
- return _sqlite3CantopenError(tls, int32(45315))
+ return _sqlite3CantopenError(tls, int32(45571))
}
if (*(*TDbPath)(unsafe.Pointer(bp))).FnSymlink != 0 {
return libc.Int32FromInt32(SQLITE_OK) | libc.Int32FromInt32(2)<<libc.Int32FromInt32(8)
@@ -28838,7 +28989,7 @@ func _unixDlError(tls *libc.TLS, NotUsed uintptr, nBuf int32, zBufOut uintptr) {
_unixEnterMutex(tls)
zErr = libc.Xdlerror(tls)
if zErr != 0 {
- Xsqlite3_snprintf(tls, nBuf, zBufOut, __ccgo_ts+3864, libc.VaList(bp+8, zErr))
+ Xsqlite3_snprintf(tls, nBuf, zBufOut, __ccgo_ts+3890, libc.VaList(bp+8, zErr))
}
_unixLeaveMutex(tls)
}
@@ -28883,7 +29034,7 @@ func _unixRandomness(tls *libc.TLS, NotUsed uintptr, nBuf int32, zBuf uintptr) (
*/
libc.Xmemset(tls, zBuf, 0, libc.Uint32FromInt32(nBuf))
libc.AtomicStorePInt32(uintptr(unsafe.Pointer(&_randomnessPid)), libc.Xgetpid(tls))
- fd = _robust_open(tls, __ccgo_ts+3995, O_RDONLY, uint32(0))
+ fd = _robust_open(tls, __ccgo_ts+4021, O_RDONLY, uint32(0))
if fd < 0 {
libc.Xtime(tls, bp)
libc.Xmemcpy(tls, zBuf, bp, uint32(8))
@@ -28894,7 +29045,7 @@ func _unixRandomness(tls *libc.TLS, NotUsed uintptr, nBuf int32, zBuf uintptr) (
for cond := true; cond; cond = got < 0 && *(*int32)(unsafe.Pointer(libc.X__errno_location(tls))) == int32(EINTR) {
got = (*(*func(*libc.TLS, int32, uintptr, Tsize_t) Tssize_t)(unsafe.Pointer(&struct{ uintptr }{_aSyscall[int32(8)].FpCurrent})))(tls, fd, zBuf, libc.Uint32FromInt32(nBuf))
}
- _robust_close(tls, uintptr(0), fd, int32(45417))
+ _robust_close(tls, uintptr(0), fd, int32(45673))
}
return nBuf
}
@@ -28917,7 +29068,7 @@ func _unixSleep(tls *libc.TLS, NotUsed uintptr, microseconds int32) (r int32) {
(*(*Ttimespec)(unsafe.Pointer(bp))).Ftv_nsec = microseconds % int32(1000000) * int32(1000)
/* Almost all modern unix systems support nanosleep(). But if you are
** compiling for one of the rare exceptions, you can use
- ** -DHAVE_NANOSLEEP=0 (perhaps in conjuction with -DHAVE_USLEEP if
+ ** -DHAVE_NANOSLEEP=0 (perhaps in conjunction with -DHAVE_USLEEP if
** usleep() is available) in order to bypass the use of nanosleep() */
libc.Xnanosleep(tls, bp, libc.UintptrFromInt32(0))
_ = NotUsed
@@ -29244,25 +29395,25 @@ var _aVfs = [4]Tsqlite3_vfs{
FiVersion: int32(3),
FszOsFile: int32(84),
FmxPathname: int32(MAX_PATHNAME),
- FzName: __ccgo_ts + 4008,
+ FzName: __ccgo_ts + 4034,
},
1: {
FiVersion: int32(3),
FszOsFile: int32(84),
FmxPathname: int32(MAX_PATHNAME),
- FzName: __ccgo_ts + 4013,
+ FzName: __ccgo_ts + 4039,
},
2: {
FiVersion: int32(3),
FszOsFile: int32(84),
FmxPathname: int32(MAX_PATHNAME),
- FzName: __ccgo_ts + 4023,
+ FzName: __ccgo_ts + 4049,
},
3: {
FiVersion: int32(3),
FszOsFile: int32(84),
FmxPathname: int32(MAX_PATHNAME),
- FzName: __ccgo_ts + 3903,
+ FzName: __ccgo_ts + 3929,
},
}
@@ -29541,7 +29692,7 @@ var _memdb_g TMemFS
var _memdb_vfs = Tsqlite3_vfs{
FiVersion: int32(2),
FmxPathname: int32(1024),
- FzName: __ccgo_ts + 4036,
+ FzName: __ccgo_ts + 4062,
}
func init() {
@@ -29887,7 +30038,7 @@ func _memdbFileControl(tls *libc.TLS, pFile uintptr, op int32, pArg uintptr) (r
rc = int32(SQLITE_NOTFOUND)
_memdbEnter(tls, p)
if op == int32(SQLITE_FCNTL_VFSNAME) {
- *(*uintptr)(unsafe.Pointer(pArg)) = Xsqlite3_mprintf(tls, __ccgo_ts+4042, libc.VaList(bp+8, (*TMemStore)(unsafe.Pointer(p)).FaData, (*TMemStore)(unsafe.Pointer(p)).Fsz))
+ *(*uintptr)(unsafe.Pointer(pArg)) = Xsqlite3_mprintf(tls, __ccgo_ts+4068, libc.VaList(bp+8, (*TMemStore)(unsafe.Pointer(p)).FaData, (*TMemStore)(unsafe.Pointer(p)).Fsz))
rc = SQLITE_OK
}
if op == int32(SQLITE_FCNTL_SIZE_LIMIT) {
@@ -29982,12 +30133,12 @@ func _memdbOpen(tls *libc.TLS, pVfs uintptr, zName uintptr, pFd uintptr, flags i
i++
}
if p == uintptr(0) {
- p = _sqlite3Malloc(tls, uint64(uint32(56)+libc.Uint32FromInt32(szName)+uint32(3)))
+ p = _sqlite3Malloc(tls, libc.Uint64FromInt64(int64(56)+int64(szName)+int64(3)))
if p == uintptr(0) {
Xsqlite3_mutex_leave(tls, pVfsMutex)
return int32(SQLITE_NOMEM)
}
- apNew = _sqlite3Realloc(tls, _memdb_g.FapMemStore, uint64(uint32(4)*libc.Uint32FromInt32(_memdb_g.FnMemStore+libc.Int32FromInt32(1))))
+ apNew = _sqlite3Realloc(tls, _memdb_g.FapMemStore, libc.Uint64FromInt64(int64(4)*(int64(1)+int64(_memdb_g.FnMemStore))))
if apNew == uintptr(0) {
Xsqlite3_free(tls, p)
Xsqlite3_mutex_leave(tls, pVfsMutex)
@@ -30062,7 +30213,7 @@ func _memdbFullPathname(tls *libc.TLS, pVfs uintptr, zPath uintptr, nOut int32,
bp := tls.Alloc(16)
defer tls.Free(16)
_ = pVfs
- Xsqlite3_snprintf(tls, nOut, zOut, __ccgo_ts+3864, libc.VaList(bp+8, zPath))
+ Xsqlite3_snprintf(tls, nOut, zOut, __ccgo_ts+3890, libc.VaList(bp+8, zPath))
return SQLITE_OK
}
@@ -30209,7 +30360,7 @@ func Xsqlite3_serialize(tls *libc.TLS, db uintptr, zSchema uintptr, piSize uintp
return uintptr(0)
}
szPage = _sqlite3BtreeGetPageSize(tls, pBt)
- zSql = Xsqlite3_mprintf(tls, __ccgo_ts+4057, libc.VaList(bp+16, zSchema))
+ zSql = Xsqlite3_mprintf(tls, __ccgo_ts+4083, libc.VaList(bp+16, zSchema))
if zSql != 0 {
v1 = Xsqlite3_prepare_v2(tls, db, zSql, -int32(1), bp, uintptr(0))
} else {
@@ -30227,7 +30378,7 @@ func Xsqlite3_serialize(tls *libc.TLS, db uintptr, zSchema uintptr, piSize uintp
sz = Xsqlite3_column_int64(tls, *(*uintptr)(unsafe.Pointer(bp)), 0) * int64(szPage)
if sz == 0 {
Xsqlite3_reset(tls, *(*uintptr)(unsafe.Pointer(bp)))
- Xsqlite3_exec(tls, db, __ccgo_ts+4080, uintptr(0), uintptr(0), uintptr(0))
+ Xsqlite3_exec(tls, db, __ccgo_ts+4106, uintptr(0), uintptr(0), uintptr(0))
rc = Xsqlite3_step(tls, *(*uintptr)(unsafe.Pointer(bp)))
if rc == int32(SQLITE_ROW) {
sz = Xsqlite3_column_int64(tls, *(*uintptr)(unsafe.Pointer(bp)), 0) * int64(szPage)
@@ -30290,7 +30441,7 @@ func Xsqlite3_deserialize(tls *libc.TLS, db uintptr, zSchema uintptr, pData uint
rc = int32(SQLITE_ERROR)
goto end_deserialize
}
- zSql = Xsqlite3_mprintf(tls, __ccgo_ts+4105, libc.VaList(bp+16, zSchema))
+ zSql = Xsqlite3_mprintf(tls, __ccgo_ts+4131, libc.VaList(bp+16, zSchema))
if zSql == uintptr(0) {
rc = int32(SQLITE_NOMEM)
} else {
@@ -30657,7 +30808,7 @@ func _sqlite3BitvecClear(tls *libc.TLS, p uintptr, i Tu32, pBuf uintptr) {
}
if (*TBitvec)(unsafe.Pointer(p)).FiSize <= (libc.Uint32FromInt32(BITVEC_SZ)-libc.Uint32FromInt32(3)*libc.Uint32FromInt64(4))/libc.Uint32FromInt64(4)*libc.Uint32FromInt64(4)/libc.Uint32FromInt64(1)*libc.Uint32FromInt32(BITVEC_SZELEM) {
p1 = p + 12 + uintptr(i/uint32(BITVEC_SZELEM))
- *(*Tu8)(unsafe.Pointer(p1)) = Tu8(int32(*(*Tu8)(unsafe.Pointer(p1))) & ^(libc.Int32FromInt32(1) << (i & libc.Uint32FromInt32(libc.Int32FromInt32(BITVEC_SZELEM)-libc.Int32FromInt32(1)))))
+ *(*Tu8)(unsafe.Pointer(p1)) = Tu8(int32(*(*Tu8)(unsafe.Pointer(p1))) & ^libc.Int32FromUint8(libc.Uint8FromInt32(libc.Int32FromInt32(1)<<(i&libc.Uint32FromInt32(libc.Int32FromInt32(BITVEC_SZELEM)-libc.Int32FromInt32(1))))))
} else {
aiValues = pBuf
libc.Xmemcpy(tls, aiValues, p+12, uint32(500))
@@ -30776,7 +30927,7 @@ func _sqlite3BitvecBuiltinTest(tls *libc.TLS, sz int32, aOp uintptr) (r int32) {
/* Allocate the Bitvec to be tested and a linear array of
** bits to act as the reference */
pBitvec = _sqlite3BitvecCreate(tls, libc.Uint32FromInt32(sz))
- pV = _sqlite3MallocZero(tls, libc.Uint64FromInt32((sz+int32(7))/int32(8)+int32(1)))
+ pV = _sqlite3MallocZero(tls, libc.Uint64FromInt64((int64(7)+int64(sz))/int64(8)+int64(1)))
pTmpSpace = Xsqlite3_malloc64(tls, uint64(BITVEC_SZ))
if pBitvec == uintptr(0) || pV == uintptr(0) || pTmpSpace == uintptr(0) {
goto bitvec_end
@@ -30830,7 +30981,7 @@ func _sqlite3BitvecBuiltinTest(tls *libc.TLS, sz int32, aOp uintptr) (r int32) {
}
} else {
p6 = pV + uintptr((*(*int32)(unsafe.Pointer(bp))+int32(1))>>int32(3))
- *(*uint8)(unsafe.Pointer(p6)) = uint8(int32(*(*uint8)(unsafe.Pointer(p6))) & ^(libc.Int32FromInt32(1) << ((*(*int32)(unsafe.Pointer(bp)) + libc.Int32FromInt32(1)) & libc.Int32FromInt32(7))))
+ *(*uint8)(unsafe.Pointer(p6)) = uint8(int32(*(*uint8)(unsafe.Pointer(p6))) & ^libc.Int32FromUint8(libc.Uint8FromInt32(libc.Int32FromInt32(1)<<((*(*int32)(unsafe.Pointer(bp))+libc.Int32FromInt32(1))&libc.Int32FromInt32(7)))))
_sqlite3BitvecClear(tls, pBitvec, libc.Uint32FromInt32(*(*int32)(unsafe.Pointer(bp))+int32(1)), pTmpSpace)
}
}
@@ -32117,7 +32268,7 @@ func _sqlite3PCacheBufferSetup(tls *libc.TLS, pBuf uintptr, sz int32, n int32) {
_pcache1_g.FnReserve = v3
_pcache1_g.FpStart = pBuf
_pcache1_g.FpFree = uintptr(0)
- libc.AtomicStorePInt32(uintptr(unsafe.Pointer(&_pcache1_g))+96, 0)
+ libc.AtomicStoreNInt32(uintptr(unsafe.Pointer(&_pcache1_g))+96, libc.Int32FromInt32(0), libc.Int32FromInt32(__ATOMIC_RELAXED))
for {
v4 = n
n--
@@ -32211,7 +32362,7 @@ func _pcache1Alloc(tls *libc.TLS, nByte int32) (r uintptr) {
if p != 0 {
_pcache1_g.FpFree = (*TPgFreeslot)(unsafe.Pointer(_pcache1_g.FpFree)).FpNext
_pcache1_g.FnFreeSlot--
- libc.AtomicStorePInt32(uintptr(unsafe.Pointer(&_pcache1_g))+96, libc.BoolInt32(_pcache1_g.FnFreeSlot < _pcache1_g.FnReserve))
+ libc.AtomicStoreNInt32(uintptr(unsafe.Pointer(&_pcache1_g))+96, libc.BoolInt32(_pcache1_g.FnFreeSlot < _pcache1_g.FnReserve), libc.Int32FromInt32(__ATOMIC_RELAXED))
_sqlite3StatusHighwater(tls, int32(SQLITE_STATUS_PAGECACHE_SIZE), nByte)
_sqlite3StatusUp(tls, int32(SQLITE_STATUS_PAGECACHE_USED), int32(1))
}
@@ -32252,7 +32403,7 @@ func _pcache1Free(tls *libc.TLS, p uintptr) {
(*TPgFreeslot)(unsafe.Pointer(pSlot)).FpNext = _pcache1_g.FpFree
_pcache1_g.FpFree = pSlot
_pcache1_g.FnFreeSlot++
- libc.AtomicStorePInt32(uintptr(unsafe.Pointer(&_pcache1_g))+96, libc.BoolInt32(_pcache1_g.FnFreeSlot < _pcache1_g.FnReserve))
+ libc.AtomicStoreNInt32(uintptr(unsafe.Pointer(&_pcache1_g))+96, libc.BoolInt32(_pcache1_g.FnFreeSlot < _pcache1_g.FnReserve), libc.Int32FromInt32(__ATOMIC_RELAXED))
Xsqlite3_mutex_leave(tls, _pcache1_g.Fmutex)
} else {
nFreed = 0
@@ -32380,7 +32531,7 @@ func _sqlite3PageFree(tls *libc.TLS, p uintptr) {
// */
func _pcache1UnderMemoryPressure(tls *libc.TLS, pCache uintptr) (r int32) {
if _pcache1_g.FnSlot != 0 && (*TPCache1)(unsafe.Pointer(pCache)).FszPage+(*TPCache1)(unsafe.Pointer(pCache)).FszExtra <= _pcache1_g.FszSlot {
- return libc.AtomicLoadPInt32(uintptr(unsafe.Pointer(&_pcache1_g)) + 96)
+ return libc.AtomicLoadNInt32(uintptr(unsafe.Pointer(&_pcache1_g))+96, libc.Int32FromInt32(__ATOMIC_RELAXED))
} else {
return _sqlite3HeapNearlyFull(tls)
}
@@ -32400,17 +32551,19 @@ func _pcache1UnderMemoryPressure(tls *libc.TLS, pCache uintptr) (r int32) {
// */
func _pcache1ResizeHash(tls *libc.TLS, p uintptr) {
var apNew, pNext, pPage, v2 uintptr
- var h, i, nNew uint32
+ var h uint32
+ var i Tu32
+ var nNew Tu64
_, _, _, _, _, _, _ = apNew, h, i, nNew, pNext, pPage, v2
- nNew = (*TPCache1)(unsafe.Pointer(p)).FnHash * uint32(2)
- if nNew < uint32(256) {
- nNew = uint32(256)
+ nNew = uint64(2) * uint64((*TPCache1)(unsafe.Pointer(p)).FnHash)
+ if nNew < uint64(256) {
+ nNew = uint64(256)
}
Xsqlite3_mutex_leave(tls, (*TPGroup)(unsafe.Pointer((*TPCache1)(unsafe.Pointer(p)).FpGroup)).Fmutex)
if (*TPCache1)(unsafe.Pointer(p)).FnHash != 0 {
_sqlite3BeginBenignMalloc(tls)
}
- apNew = _sqlite3MallocZero(tls, uint64(uint32(4)*nNew))
+ apNew = _sqlite3MallocZero(tls, uint64(4)*nNew)
if (*TPCache1)(unsafe.Pointer(p)).FnHash != 0 {
_sqlite3EndBenignMalloc(tls)
}
@@ -32428,7 +32581,7 @@ func _pcache1ResizeHash(tls *libc.TLS, p uintptr) {
if !(v2 != uintptr(0)) {
break
}
- h = (*TPgHdr1)(unsafe.Pointer(pPage)).FiKey % nNew
+ h = uint32(uint64((*TPgHdr1)(unsafe.Pointer(pPage)).FiKey) % nNew)
pNext = (*TPgHdr1)(unsafe.Pointer(pPage)).FpNext
(*TPgHdr1)(unsafe.Pointer(pPage)).FpNext = *(*uintptr)(unsafe.Pointer(apNew + uintptr(h)*4))
*(*uintptr)(unsafe.Pointer(apNew + uintptr(h)*4)) = pPage
@@ -32440,7 +32593,7 @@ func _pcache1ResizeHash(tls *libc.TLS, p uintptr) {
}
Xsqlite3_free(tls, (*TPCache1)(unsafe.Pointer(p)).FapHash)
(*TPCache1)(unsafe.Pointer(p)).FapHash = apNew
- (*TPCache1)(unsafe.Pointer(p)).FnHash = nNew
+ (*TPCache1)(unsafe.Pointer(p)).FnHash = uint32(nNew)
}
}
@@ -32641,10 +32794,11 @@ func _pcache1Shutdown(tls *libc.TLS, NotUsed uintptr) {
// */
func _pcache1Create(tls *libc.TLS, szPage int32, szExtra int32, bPurgeable int32) (r uintptr) {
var pCache, pGroup, v1 uintptr
- var sz, v2 int32
+ var sz Ti64
+ var v2 int32
_, _, _, _, _ = pCache, pGroup, sz, v1, v2 /* Bytes of memory required to allocate the new cache */
- sz = libc.Int32FromUint32(uint32(68) + uint32(52)*libc.Uint32FromInt32(_pcache1_g.FseparateCache))
- pCache = _sqlite3MallocZero(tls, libc.Uint64FromInt32(sz))
+ sz = libc.Int64FromUint32(uint32(68) + uint32(52)*libc.Uint32FromInt32(_pcache1_g.FseparateCache))
+ pCache = _sqlite3MallocZero(tls, libc.Uint64FromInt64(sz))
if pCache != 0 {
if _pcache1_g.FseparateCache != 0 {
pGroup = pCache + 1*68
@@ -34789,7 +34943,7 @@ func _jrnlBufferSize(tls *libc.TLS, pPager uintptr) (r int32) {
// ** If an error occurs while reading from the journal file, an SQLite
// ** error code is returned.
// */
-func _readSuperJournal(tls *libc.TLS, pJrnl uintptr, zSuper uintptr, nSuper Tu32) (r int32) {
+func _readSuperJournal(tls *libc.TLS, pJrnl uintptr, zSuper uintptr, nSuper Tu64) (r int32) {
bp := tls.Alloc(32)
defer tls.Free(32)
var rc, v1, v2, v4, v6, v8 int32
@@ -34807,7 +34961,7 @@ func _readSuperJournal(tls *libc.TLS, pJrnl uintptr, zSuper uintptr, nSuper Tu32
v2 = _read32bits(tls, pJrnl, *(*Ti64)(unsafe.Pointer(bp + 8))-int64(16), bp)
rc = v2
}
- if v5 = v3 || SQLITE_OK != v2 || *(*Tu32)(unsafe.Pointer(bp)) >= nSuper || libc.Int64FromUint32(*(*Tu32)(unsafe.Pointer(bp))) > *(*Ti64)(unsafe.Pointer(bp + 8))-int64(16) || *(*Tu32)(unsafe.Pointer(bp)) == uint32(0); !v5 {
+ if v5 = v3 || SQLITE_OK != v2 || uint64(*(*Tu32)(unsafe.Pointer(bp))) >= nSuper || libc.Int64FromUint32(*(*Tu32)(unsafe.Pointer(bp))) > *(*Ti64)(unsafe.Pointer(bp + 8))-int64(16) || *(*Tu32)(unsafe.Pointer(bp)) == uint32(0); !v5 {
v4 = _read32bits(tls, pJrnl, *(*Ti64)(unsafe.Pointer(bp + 8))-int64(12), bp+16)
rc = v4
}
@@ -35380,6 +35534,15 @@ func _pager_unlock(tls *libc.TLS, pPager uintptr) {
(*TPager)(unsafe.Pointer(pPager)).FpInJournal = uintptr(0)
_releaseAllSavepoints(tls, pPager)
if (*TPager)(unsafe.Pointer(pPager)).FpWal != uintptr(0) {
+ if libc.Int32FromUint8((*TPager)(unsafe.Pointer(pPager)).FeState) == int32(PAGER_ERROR) {
+ /* If an IO error occurs in wal.c while attempting to wrap the wal file,
+ ** then the Wal object may be holding a write-lock but no read-lock.
+ ** This call ensures that the write-lock is dropped as well. We cannot
+ ** have sqlite3WalEndReadTransaction() drop the write-lock, as it once
+ ** did, because this would break "BEGIN EXCLUSIVE" handling for
+ ** SQLITE_ENABLE_SETLK_TIMEOUT builds. */
+ _sqlite3WalEndWriteTransaction(tls, (*TPager)(unsafe.Pointer(pPager)).FpWal)
+ }
_sqlite3WalEndReadTransaction(tls, (*TPager)(unsafe.Pointer(pPager)).FpWal)
(*TPager)(unsafe.Pointer(pPager)).FeState = uint8(PAGER_OPEN)
} else {
@@ -36026,7 +36189,8 @@ func _pager_playback_one_page(tls *libc.TLS, pPager uintptr, pOffset uintptr, pD
func _pager_delsuper(tls *libc.TLS, pPager uintptr, zSuper uintptr) (r int32) {
bp := tls.Alloc(16)
defer tls.Free(16)
- var c, flags, flags1, nSuperPtr, rc int32
+ var c, flags, flags1, rc int32
+ var nSuperPtr Ti64
var pJournal, pSuper, pVfs, zFree, zJournal, zSuperJournal, zSuperPtr uintptr
var v1, v2, v3 int8
var _ /* exists at bp+8 */ int32
@@ -36038,7 +36202,7 @@ func _pager_delsuper(tls *libc.TLS, pPager uintptr, zSuper uintptr) (r int32) {
/* Allocate space for both the pJournal and pSuper file descriptors.
** If successful, open the super-journal file for reading.
*/
- pSuper = _sqlite3MallocZero(tls, libc.Uint64FromInt32((*Tsqlite3_vfs)(unsafe.Pointer(pVfs)).FszOsFile*int32(2)))
+ pSuper = _sqlite3MallocZero(tls, libc.Uint64FromInt64(int64(2)*int64((*Tsqlite3_vfs)(unsafe.Pointer(pVfs)).FszOsFile)))
if !(pSuper != 0) {
rc = int32(SQLITE_NOMEM)
pJournal = uintptr(0)
@@ -36059,11 +36223,12 @@ func _pager_delsuper(tls *libc.TLS, pPager uintptr, zSuper uintptr) (r int32) {
if rc != SQLITE_OK {
goto delsuper_out
}
- nSuperPtr = (*Tsqlite3_vfs)(unsafe.Pointer(pVfs)).FmxPathname + int32(1)
- zFree = _sqlite3Malloc(tls, libc.Uint64FromInt64(int64(4)+*(*Ti64)(unsafe.Pointer(bp))+int64(nSuperPtr)+int64(2)))
+ nSuperPtr = int64(1) + int64((*Tsqlite3_vfs)(unsafe.Pointer(pVfs)).FmxPathname)
+ zFree = _sqlite3Malloc(tls, libc.Uint64FromInt64(int64(4)+*(*Ti64)(unsafe.Pointer(bp))+nSuperPtr+int64(2)))
if !(zFree != 0) {
rc = int32(SQLITE_NOMEM)
goto delsuper_out
+ } else {
}
v3 = libc.Int8FromInt32(0)
*(*int8)(unsafe.Pointer(zFree + 3)) = v3
@@ -36092,7 +36257,7 @@ func _pager_delsuper(tls *libc.TLS, pPager uintptr, zSuper uintptr) (r int32) {
if rc != SQLITE_OK {
goto delsuper_out
}
- rc = _readSuperJournal(tls, pJournal, zSuperPtr, libc.Uint32FromInt32(nSuperPtr))
+ rc = _readSuperJournal(tls, pJournal, zSuperPtr, libc.Uint64FromInt64(nSuperPtr))
_sqlite3OsClose(tls, pJournal)
if rc != SQLITE_OK {
goto delsuper_out
@@ -36325,7 +36490,7 @@ func _pager_playback(tls *libc.TLS, pPager uintptr, isHot int32) (r int32) {
** for pageSize.
*/
zSuper = (*TPager)(unsafe.Pointer(pPager)).FpTmpSpace
- rc = _readSuperJournal(tls, (*TPager)(unsafe.Pointer(pPager)).Fjfd, zSuper, libc.Uint32FromInt32((*Tsqlite3_vfs)(unsafe.Pointer((*TPager)(unsafe.Pointer(pPager)).FpVfs)).FmxPathname+int32(1)))
+ rc = _readSuperJournal(tls, (*TPager)(unsafe.Pointer(pPager)).Fjfd, zSuper, libc.Uint64FromInt64(int64(1)+int64((*Tsqlite3_vfs)(unsafe.Pointer((*TPager)(unsafe.Pointer(pPager)).FpVfs)).FmxPathname)))
if rc == SQLITE_OK && *(*int8)(unsafe.Pointer(zSuper)) != 0 {
rc = _sqlite3OsAccess(tls, pVfs, zSuper, SQLITE_ACCESS_EXISTS, bp+16)
}
@@ -36462,7 +36627,7 @@ end_playback:
** which case it requires 4 0x00 bytes in memory immediately before
** the filename. */
zSuper = (*TPager)(unsafe.Pointer(pPager)).FpTmpSpace + 4
- rc = _readSuperJournal(tls, (*TPager)(unsafe.Pointer(pPager)).Fjfd, zSuper, libc.Uint32FromInt32((*Tsqlite3_vfs)(unsafe.Pointer((*TPager)(unsafe.Pointer(pPager)).FpVfs)).FmxPathname+int32(1)))
+ rc = _readSuperJournal(tls, (*TPager)(unsafe.Pointer(pPager)).Fjfd, zSuper, libc.Uint64FromInt64(int64(1)+int64((*Tsqlite3_vfs)(unsafe.Pointer((*TPager)(unsafe.Pointer(pPager)).FpVfs)).FmxPathname)))
}
if rc == SQLITE_OK && (libc.Int32FromUint8((*TPager)(unsafe.Pointer(pPager)).FeState) >= int32(PAGER_WRITER_DBMOD) || libc.Int32FromUint8((*TPager)(unsafe.Pointer(pPager)).FeState) == PAGER_OPEN) {
rc = _sqlite3PagerSync(tls, pPager, uintptr(0))
@@ -36478,7 +36643,7 @@ end_playback:
rc = _pager_delsuper(tls, pPager, zSuper)
}
if isHot != 0 && nPlayback != 0 {
- Xsqlite3_log(tls, libc.Int32FromInt32(SQLITE_NOTICE)|libc.Int32FromInt32(2)<<libc.Int32FromInt32(8), __ccgo_ts+4120, libc.VaList(bp+32, nPlayback, (*TPager)(unsafe.Pointer(pPager)).FzJournal))
+ Xsqlite3_log(tls, libc.Int32FromInt32(SQLITE_NOTICE)|libc.Int32FromInt32(2)<<libc.Int32FromInt32(8), __ccgo_ts+4146, libc.VaList(bp+32, nPlayback, (*TPager)(unsafe.Pointer(pPager)).FzJournal))
}
/* The Pager.sectorSize variable may have been updated while rolling
** back a journal created by a process with a different sector size
@@ -38173,7 +38338,7 @@ func _sqlite3PagerOpen(tls *libc.TLS, pVfs uintptr, ppPager uintptr, zFilename u
*/
if zFilename != 0 && *(*int8)(unsafe.Pointer(zFilename)) != 0 {
nPathname = (*Tsqlite3_vfs)(unsafe.Pointer(pVfs)).FmxPathname + int32(1)
- zPathname = _sqlite3DbMallocRaw(tls, uintptr(0), libc.Uint64FromInt32(nPathname*int32(2)))
+ zPathname = _sqlite3DbMallocRaw(tls, uintptr(0), libc.Uint64FromInt64(int64(2)*int64(nPathname)))
if zPathname == uintptr(0) {
return int32(SQLITE_NOMEM)
}
@@ -38204,7 +38369,7 @@ func _sqlite3PagerOpen(tls *libc.TLS, pVfs uintptr, ppPager uintptr, zFilename u
** as it will not be possible to open the journal file or even
** check for a hot-journal before reading.
*/
- rc = _sqlite3CantopenError(tls, int32(62121))
+ rc = _sqlite3CantopenError(tls, int32(62854))
}
if rc != SQLITE_OK {
_sqlite3DbFree(tls, uintptr(0), zPathname)
@@ -38255,7 +38420,7 @@ func _sqlite3PagerOpen(tls *libc.TLS, pVfs uintptr, ppPager uintptr, zFilename u
** specific formatting and order of the various filenames, so if the format
** changes here, be sure to change it there as well.
*/
- pPtr = _sqlite3MallocZero(tls, uint64((libc.Uint32FromInt64(232)+libc.Uint32FromInt32(7))&libc.Uint32FromInt32(^libc.Int32FromInt32(7))+libc.Uint32FromInt32((pcacheSize+libc.Int32FromInt32(7)) & ^libc.Int32FromInt32(7))+libc.Uint32FromInt32(((*Tsqlite3_vfs)(unsafe.Pointer(pVfs)).FszOsFile+libc.Int32FromInt32(7)) & ^libc.Int32FromInt32(7))+libc.Uint32FromInt32(journalFileSize*int32(2))+uint32(__SIZEOF_POINTER__)+uint32(4)+libc.Uint32FromInt32(nPathname)+uint32(1)+libc.Uint32FromInt32(nUriByte)+libc.Uint32FromInt32(nPathname)+uint32(8)+uint32(1)+libc.Uint32FromInt32(nPathname)+uint32(4)+uint32(1)+uint32(3)))
+ pPtr = _sqlite3MallocZero(tls, uint64((libc.Uint32FromInt64(232)+libc.Uint32FromInt32(7))&libc.Uint32FromInt32(^libc.Int32FromInt32(7))+libc.Uint32FromInt32((pcacheSize+libc.Int32FromInt32(7)) & ^libc.Int32FromInt32(7))+libc.Uint32FromInt32(((*Tsqlite3_vfs)(unsafe.Pointer(pVfs)).FszOsFile+libc.Int32FromInt32(7)) & ^libc.Int32FromInt32(7)))+libc.Uint64FromInt32(journalFileSize)*uint64(2)+uint64(__SIZEOF_POINTER__)+uint64(4)+libc.Uint64FromInt32(nPathname)+uint64(1)+libc.Uint64FromInt32(nUriByte)+libc.Uint64FromInt32(nPathname)+uint64(8)+uint64(1)+libc.Uint64FromInt32(nPathname)+uint64(4)+uint64(1)+uint64(3))
if !(pPtr != 0) {
_sqlite3DbFree(tls, uintptr(0), zPathname)
return int32(SQLITE_NOMEM)
@@ -38290,7 +38455,7 @@ func _sqlite3PagerOpen(tls *libc.TLS, pVfs uintptr, ppPager uintptr, zFilename u
(*TPager)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp)))).FzJournal = pPtr
libc.Xmemcpy(tls, pPtr, zPathname, libc.Uint32FromInt32(nPathname))
pPtr += uintptr(nPathname)
- libc.Xmemcpy(tls, pPtr, __ccgo_ts+4147, uint32(8))
+ libc.Xmemcpy(tls, pPtr, __ccgo_ts+4173, uint32(8))
pPtr += uintptr(libc.Int32FromInt32(8) + libc.Int32FromInt32(1))
} else {
(*TPager)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp)))).FzJournal = uintptr(0)
@@ -38300,7 +38465,7 @@ func _sqlite3PagerOpen(tls *libc.TLS, pVfs uintptr, ppPager uintptr, zFilename u
(*TPager)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp)))).FzWal = pPtr
libc.Xmemcpy(tls, pPtr, zPathname, libc.Uint32FromInt32(nPathname))
pPtr += uintptr(nPathname)
- libc.Xmemcpy(tls, pPtr, __ccgo_ts+4156, uint32(4))
+ libc.Xmemcpy(tls, pPtr, __ccgo_ts+4182, uint32(4))
pPtr += uintptr(libc.Int32FromInt32(4) + libc.Int32FromInt32(1))
} else {
(*TPager)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp)))).FzWal = uintptr(0)
@@ -38342,8 +38507,8 @@ func _sqlite3PagerOpen(tls *libc.TLS, pVfs uintptr, ppPager uintptr, zFilename u
}
}
}
- (*TPager)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp)))).FnoLock = libc.Uint8FromInt32(Xsqlite3_uri_boolean(tls, (*TPager)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp)))).FzFilename, __ccgo_ts+4161, 0))
- if iDc&int32(SQLITE_IOCAP_IMMUTABLE) != 0 || Xsqlite3_uri_boolean(tls, (*TPager)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp)))).FzFilename, __ccgo_ts+4168, 0) != 0 {
+ (*TPager)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp)))).FnoLock = libc.Uint8FromInt32(Xsqlite3_uri_boolean(tls, (*TPager)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp)))).FzFilename, __ccgo_ts+4187, 0))
+ if iDc&int32(SQLITE_IOCAP_IMMUTABLE) != 0 || Xsqlite3_uri_boolean(tls, (*TPager)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp)))).FzFilename, __ccgo_ts+4194, 0) != 0 {
vfsFlags |= int32(SQLITE_OPEN_READONLY)
goto act_like_temp_file
}
@@ -38682,7 +38847,7 @@ func _sqlite3PagerSharedLock(tls *libc.TLS, pPager uintptr) (r int32) {
f = libc.Int32FromInt32(SQLITE_OPEN_READWRITE) | libc.Int32FromInt32(SQLITE_OPEN_MAIN_JOURNAL)
rc = _sqlite3OsOpen(tls, pVfs, (*TPager)(unsafe.Pointer(pPager)).FzJournal, (*TPager)(unsafe.Pointer(pPager)).Fjfd, f, bp+8)
if rc == SQLITE_OK && *(*int32)(unsafe.Pointer(bp + 8))&int32(SQLITE_OPEN_READONLY) != 0 {
- rc = _sqlite3CantopenError(tls, int32(62642))
+ rc = _sqlite3CantopenError(tls, int32(63375))
_sqlite3OsClose(tls, (*TPager)(unsafe.Pointer(pPager)).Fjfd)
}
}
@@ -38857,7 +39022,7 @@ func _getPageNormal(tls *libc.TLS, pPager uintptr, pgno TPgno, ppPage uintptr, f
_, _, _, _ = noContent, pPg, rc, v1
rc = SQLITE_OK
if pgno == uint32(0) {
- return _sqlite3CorruptError(tls, int32(62855))
+ return _sqlite3CorruptError(tls, int32(63588))
}
*(*uintptr)(unsafe.Pointer(bp)) = _sqlite3PcacheFetch(tls, (*TPager)(unsafe.Pointer(pPager)).FpPCache, pgno, int32(3))
if *(*uintptr)(unsafe.Pointer(bp)) == uintptr(0) {
@@ -38888,7 +39053,7 @@ func _getPageNormal(tls *libc.TLS, pPager uintptr, pgno TPgno, ppPage uintptr, f
** (2) Never try to fetch the locking page
*/
if pgno == (*TPager)(unsafe.Pointer(pPager)).FlckPgno {
- rc = _sqlite3CorruptError(tls, int32(62887))
+ rc = _sqlite3CorruptError(tls, int32(63620))
goto pager_acquire_err
}
(*TPgHdr)(unsafe.Pointer(pPg)).FpPager = pPager
@@ -38960,7 +39125,7 @@ func _getPageMMap(tls *libc.TLS, pPager uintptr, pgno TPgno, ppPage uintptr, fla
** test in the previous statement, and avoid testing pgno==0 in the
** common case where pgno is large. */
if pgno <= uint32(1) && pgno == uint32(0) {
- return _sqlite3CorruptError(tls, int32(62970))
+ return _sqlite3CorruptError(tls, int32(63703))
}
if bMmapOk != 0 && (*TPager)(unsafe.Pointer(pPager)).FpWal != uintptr(0) {
rc = _sqlite3WalFindFrame(tls, (*TPager)(unsafe.Pointer(pPager)).FpWal, pgno, bp+4)
@@ -40317,7 +40482,7 @@ func _sqlite3PagerMovepage(tls *libc.TLS, pPager uintptr, pPg uintptr, pgno TPgn
if pPgOld != 0 {
if (*TPgHdr)(unsafe.Pointer(pPgOld)).FnRef > int64(1) {
_sqlite3PagerUnrefNotNull(tls, pPgOld)
- return _sqlite3CorruptError(tls, int32(64536))
+ return _sqlite3CorruptError(tls, int32(65269))
}
p4 = pPg + 28
*(*Tu16)(unsafe.Pointer(p4)) = Tu16(int32(*(*Tu16)(unsafe.Pointer(p4))) | libc.Int32FromUint16((*TPgHdr)(unsafe.Pointer(pPgOld)).Fflags)&libc.Int32FromInt32(PGHDR_NEED_SYNC))
@@ -40585,7 +40750,7 @@ func _sqlite3PagerCheckpoint(tls *libc.TLS, pPager uintptr, db uintptr, eMode in
** sqlite3_wal_checkpoint() call, but it happens very rarely.
** https://sqlite.org/forum/forumpost/fd0f19d229156939
*/
- Xsqlite3_exec(tls, db, __ccgo_ts+4178, uintptr(0), uintptr(0), uintptr(0))
+ Xsqlite3_exec(tls, db, __ccgo_ts+4204, uintptr(0), uintptr(0), uintptr(0))
}
if (*TPager)(unsafe.Pointer(pPager)).FpWal != 0 {
if eMode == SQLITE_CHECKPOINT_PASSIVE {
@@ -41151,7 +41316,6 @@ type WalIndexHdr = TWalIndexHdr
type TWalIterator = struct {
FiPrior Tu32
FnSegment int32
- FaSegment [1]TWalSegment
}
type WalIterator = TWalIterator
@@ -41355,6 +41519,11 @@ type WalCkptInfo1 = TWalCkptInfo1
/*
** An open write-ahead log file is represented by an instance of the
** following object.
+**
+** writeLock:
+** This is usually set to 1 whenever the WRITER lock is held. However,
+** if it is set to 2, then the WRITER lock is held but must be released
+** by walHandleException() if a SEH exception is thrown.
*/
type TWal1 = struct {
FpVfs uintptr
@@ -41423,11 +41592,12 @@ type ht_slot = Tht_slot
type TWalIterator1 = struct {
FiPrior Tu32
FnSegment int32
- FaSegment [1]TWalSegment
}
type WalIterator1 = TWalIterator1
+/* Size (in bytes) of a WalIterator object suitable for N or fewer segments */
+
/*
** Define the parameters of the hash tables in the wal-index file. There
** is a hash-table following every HASHTABLE_NPAGE page numbers in the
@@ -41485,7 +41655,7 @@ func _walIndexPageRealloc(tls *libc.TLS, pWal uintptr, iPage int32, ppPage uintp
rc = SQLITE_OK
/* Enlarge the pWal->apWiData[] array if required */
if (*TWal)(unsafe.Pointer(pWal)).FnWiData <= iPage {
- nByte = libc.Int64FromUint32(uint32(4) * libc.Uint32FromInt32(iPage+libc.Int32FromInt32(1)))
+ nByte = int64(4) * (int64(1) + int64(iPage))
apNew = _sqlite3Realloc(tls, (*TWal)(unsafe.Pointer(pWal)).FapWiData, libc.Uint64FromInt64(nByte))
if !(apNew != 0) {
*(*uintptr)(unsafe.Pointer(ppPage)) = uintptr(0)
@@ -41586,6 +41756,7 @@ func _walChecksumBytes(tls *libc.TLS, nativeCksum int32, a uintptr, nByte int32,
s2 = v1
s1 = v1
}
+ /* nByte is a multiple of 8 between 8 and 65536 */
if !(nativeCksum != 0) {
for cond := true; cond; cond = aData < aEnd {
s1 += *(*Tu32)(unsafe.Pointer(aData))&uint32(0x000000FF)<<int32(24) + *(*Tu32)(unsafe.Pointer(aData))&uint32(0x0000FF00)<<int32(8) + *(*Tu32)(unsafe.Pointer(aData))&uint32(0x00FF0000)>>int32(8) + *(*Tu32)(unsafe.Pointer(aData))&uint32(0xFF000000)>>int32(24) + s2
@@ -42027,7 +42198,7 @@ func _walIndexAppend(tls *libc.TLS, pWal uintptr, iFrame Tu32, iPage Tu32) (r in
v2 = nCollide
nCollide--
if v2 == 0 {
- return _sqlite3CorruptError(tls, int32(66463))
+ return _sqlite3CorruptError(tls, int32(67209))
}
goto _1
_1:
@@ -42115,7 +42286,7 @@ func _walIndexRecover(tls *libc.TLS, pWal uintptr) (r int32) {
** are able to understand */
version = _sqlite3Get4byte(tls, bp+8+4)
if version != uint32(WAL_MAX_VERSION) {
- rc = _sqlite3CantopenError(tls, int32(66595))
+ rc = _sqlite3CantopenError(tls, int32(67341))
goto finished
}
/* Malloc a buffer to read frames into. */
@@ -42254,7 +42425,7 @@ finished:
** checkpointing the log file.
*/
if (*TWal)(unsafe.Pointer(pWal)).Fhdr.FnPage != 0 {
- Xsqlite3_log(tls, libc.Int32FromInt32(SQLITE_NOTICE)|libc.Int32FromInt32(1)<<libc.Int32FromInt32(8), __ccgo_ts+4196, libc.VaList(bp+64, (*TWal)(unsafe.Pointer(pWal)).Fhdr.FmxFrame, (*TWal)(unsafe.Pointer(pWal)).FzWalName))
+ Xsqlite3_log(tls, libc.Int32FromInt32(SQLITE_NOTICE)|libc.Int32FromInt32(1)<<libc.Int32FromInt32(8), __ccgo_ts+4222, libc.VaList(bp+64, (*TWal)(unsafe.Pointer(pWal)).Fhdr.FmxFrame, (*TWal)(unsafe.Pointer(pWal)).FzWalName))
}
}
goto recovery_error
@@ -42630,7 +42801,7 @@ func _walIteratorInit(tls *libc.TLS, pWal uintptr, nBackfill Tu32, pp uintptr) (
iLast = (*TWal)(unsafe.Pointer(pWal)).Fhdr.FmxFrame
/* Allocate space for the WalIterator object. */
nSegment = _walFramePage(tls, iLast) + int32(1)
- nByte = libc.Int64FromUint32(uint32(28) + libc.Uint32FromInt32(nSegment-libc.Int32FromInt32(1))*uint32(20) + iLast*uint32(2))
+ nByte = libc.Int64FromUint32(uint32(libc.UintptrFromInt32(0)+8)*libc.Uint32FromInt32(nSegment)*uint32(20) + iLast*uint32(2))
if iLast > uint32(HASHTABLE_NPAGE) {
v1 = uint32(HASHTABLE_NPAGE)
} else {
@@ -42885,7 +43056,7 @@ func _walCheckpoint(tls *libc.TLS, pWal uintptr, db uintptr, eMode int32, xBusy
** database plus the amount of data in the wal file, plus the
** maximum size of the pending-byte page (65536 bytes), then
** must be corruption somewhere. */
- rc = _sqlite3CorruptError(tls, int32(67405))
+ rc = _sqlite3CorruptError(tls, int32(68150))
} else {
_sqlite3OsFileControlHint(tls, (*TWal)(unsafe.Pointer(pWal)).FpDbFd, int32(SQLITE_FCNTL_SIZE_HINT), bp+16)
}
@@ -43001,7 +43172,7 @@ func _walLimitSize(tls *libc.TLS, pWal uintptr, nMax Ti64) {
}
_sqlite3EndBenignMalloc(tls)
if rx != 0 {
- Xsqlite3_log(tls, rx, __ccgo_ts+4233, libc.VaList(bp+16, (*TWal)(unsafe.Pointer(pWal)).FzWalName))
+ Xsqlite3_log(tls, rx, __ccgo_ts+4259, libc.VaList(bp+16, (*TWal)(unsafe.Pointer(pWal)).FzWalName))
}
}
@@ -43216,7 +43387,14 @@ func _walIndexReadHdr(tls *libc.TLS, pWal uintptr, pChanged uintptr) (r int32) {
rc = v3
}
if v4 || SQLITE_OK == v3 {
- (*TWal)(unsafe.Pointer(pWal)).FwriteLock = uint8(1)
+ /* If the write-lock was just obtained, set writeLock to 2 instead of
+ ** the usual 1. This causes walIndexPage() to behave as if the
+ ** write-lock were held (so that it allocates new pages as required),
+ ** and walHandleException() to unlock the write-lock if a SEH exception
+ ** is thrown. */
+ if !(bWriteLock != 0) {
+ (*TWal)(unsafe.Pointer(pWal)).FwriteLock = uint8(2)
+ }
v5 = _walIndexPage(tls, pWal, 0, bp)
rc = v5
if SQLITE_OK == v5 {
@@ -43242,7 +43420,7 @@ func _walIndexReadHdr(tls *libc.TLS, pWal uintptr, pChanged uintptr) (r int32) {
** this version of SQLite cannot understand.
*/
if badHdr == 0 && (*TWal)(unsafe.Pointer(pWal)).Fhdr.FiVersion != uint32(WALINDEX_MAX_VERSION) {
- rc = _sqlite3CantopenError(tls, int32(67849))
+ rc = _sqlite3CantopenError(tls, int32(68601))
}
if (*TWal)(unsafe.Pointer(pWal)).FbShmUnreliable != 0 {
if rc != SQLITE_OK {
@@ -43965,8 +44143,8 @@ func _sqlite3WalBeginReadTransaction(tls *libc.TLS, pWal uintptr, pChanged uintp
// ** read-lock.
// */
func _sqlite3WalEndReadTransaction(tls *libc.TLS, pWal uintptr) {
- _sqlite3WalEndWriteTransaction(tls, pWal)
if int32((*TWal)(unsafe.Pointer(pWal)).FreadLock) >= 0 {
+ _sqlite3WalEndWriteTransaction(tls, pWal)
_walUnlockShared(tls, pWal, int32(3)+int32((*TWal)(unsafe.Pointer(pWal)).FreadLock))
(*TWal)(unsafe.Pointer(pWal)).FreadLock = int16(-int32(1))
}
@@ -44053,7 +44231,7 @@ func _walFindFrame(tls *libc.TLS, pWal uintptr, pgno TPgno, piRead uintptr) (r i
nCollide--
if v3 == 0 {
*(*Tu32)(unsafe.Pointer(piRead)) = uint32(0)
- return _sqlite3CorruptError(tls, int32(68695))
+ return _sqlite3CorruptError(tls, int32(69451))
}
iKey = _walNextHash(tls, iKey)
}
@@ -44550,7 +44728,7 @@ func _walFrames(tls *libc.TLS, pWal uintptr, szPage int32, pList uintptr, nTrunc
}
}
if libc.Int32FromUint32((*TWal)(unsafe.Pointer(pWal)).FszPage) != szPage {
- return _sqlite3CorruptError(tls, int32(69218)) /* TH3 test case: cov1/corrupt155.test */
+ return _sqlite3CorruptError(tls, int32(69974)) /* TH3 test case: cov1/corrupt155.test */
}
/* Setup information needed to write frames into the WAL */
(*(*TWalWriter)(unsafe.Pointer(bp))).FpWal = pWal
@@ -44799,7 +44977,7 @@ func _sqlite3WalCheckpoint(tls *libc.TLS, pWal uintptr, db uintptr, eMode int32,
/* Copy data from the log to the database file. */
if rc == SQLITE_OK {
if (*TWal)(unsafe.Pointer(pWal)).Fhdr.FmxFrame != 0 && _walPagesize(tls, pWal) != nBuf {
- rc = _sqlite3CorruptError(tls, int32(69478))
+ rc = _sqlite3CorruptError(tls, int32(70234))
} else {
rc = _walCheckpoint(tls, pWal, db, eMode2, xBusy2, pBusyArg, sync_flags, zBuf)
}
@@ -45572,6 +45750,11 @@ type CellInfo1 = TCellInfo1
*/
/*
+** Maximum amount of storage local to a database page, regardless of
+** page size.
+ */
+
+/*
** A cursor is a pointer to a particular entry within a particular
** b-tree within a database file.
**
@@ -45937,10 +46120,11 @@ func _sqlite3BtreeLeave(tls *libc.TLS, p uintptr) {
// ** at the same instant.
// */
func _btreeEnterAll(tls *libc.TLS, db uintptr) {
- var i, skipOk int32
+ var i int32
var p uintptr
+ var skipOk Tu8
_, _, _ = i, p, skipOk
- skipOk = int32(1)
+ skipOk = uint8(1)
i = 0
for {
if !(i < (*Tsqlite3)(unsafe.Pointer(db)).FnDb) {
@@ -45949,14 +46133,14 @@ func _btreeEnterAll(tls *libc.TLS, db uintptr) {
p = (*(*TDb)(unsafe.Pointer((*Tsqlite3)(unsafe.Pointer(db)).FaDb + uintptr(i)*16))).FpBt
if p != 0 && (*TBtree)(unsafe.Pointer(p)).Fsharable != 0 {
_sqlite3BtreeEnter(tls, p)
- skipOk = 0
+ skipOk = uint8(0)
}
goto _1
_1:
;
i++
}
- (*Tsqlite3)(unsafe.Pointer(db)).FnoSharedCache = libc.Uint8FromInt32(skipOk)
+ (*Tsqlite3)(unsafe.Pointer(db)).FnoSharedCache = skipOk
}
func _sqlite3BtreeEnterAll(tls *libc.TLS, db uintptr) {
@@ -46656,7 +46840,7 @@ func _btreeMoveto(tls *libc.TLS, pCur uintptr, pKey uintptr, nKey Ti64, bias int
}
_sqlite3VdbeRecordUnpack(tls, pKeyInfo, int32(nKey), pKey, pIdxKey)
if libc.Int32FromUint16((*TUnpackedRecord)(unsafe.Pointer(pIdxKey)).FnField) == 0 || libc.Int32FromUint16((*TUnpackedRecord)(unsafe.Pointer(pIdxKey)).FnField) > libc.Int32FromUint16((*TKeyInfo)(unsafe.Pointer(pKeyInfo)).FnAllField) {
- rc = _sqlite3CorruptError(tls, int32(71660))
+ rc = _sqlite3CorruptError(tls, int32(72422))
} else {
rc = _sqlite3BtreeIndexMoveto(tls, pCur, pIdxKey, pRes)
}
@@ -46834,7 +47018,7 @@ func _ptrmapPut(tls *libc.TLS, pBt uintptr, key TPgno, eType Tu8, parent TPgno,
}
/* The super-journal page number must never be used as a pointer map page */
if key == uint32(0) {
- *(*int32)(unsafe.Pointer(pRC)) = _sqlite3CorruptError(tls, int32(71858))
+ *(*int32)(unsafe.Pointer(pRC)) = _sqlite3CorruptError(tls, int32(72620))
return
}
iPtrmap = _ptrmapPageno(tls, pBt, key)
@@ -46847,12 +47031,12 @@ func _ptrmapPut(tls *libc.TLS, pBt uintptr, key TPgno, eType Tu8, parent TPgno,
/* The first byte of the extra data is the MemPage.isInit byte.
** If that byte is set, it means this page is also being used
** as a btree page. */
- *(*int32)(unsafe.Pointer(pRC)) = _sqlite3CorruptError(tls, int32(71871))
+ *(*int32)(unsafe.Pointer(pRC)) = _sqlite3CorruptError(tls, int32(72633))
goto ptrmap_exit
}
offset = libc.Int32FromUint32(libc.Uint32FromInt32(5) * (key - iPtrmap - libc.Uint32FromInt32(1)))
if offset < 0 {
- *(*int32)(unsafe.Pointer(pRC)) = _sqlite3CorruptError(tls, int32(71876))
+ *(*int32)(unsafe.Pointer(pRC)) = _sqlite3CorruptError(tls, int32(72638))
goto ptrmap_exit
}
pPtrmap = _sqlite3PagerGetData(tls, *(*uintptr)(unsafe.Pointer(bp)))
@@ -46896,7 +47080,7 @@ func _ptrmapGet(tls *libc.TLS, pBt uintptr, key TPgno, pEType uintptr, pPgno uin
offset = libc.Int32FromUint32(libc.Uint32FromInt32(5) * (key - libc.Uint32FromInt32(iPtrmap) - libc.Uint32FromInt32(1)))
if offset < 0 {
_sqlite3PagerUnref(tls, *(*uintptr)(unsafe.Pointer(bp)))
- return _sqlite3CorruptError(tls, int32(71921))
+ return _sqlite3CorruptError(tls, int32(72683))
}
*(*Tu8)(unsafe.Pointer(pEType)) = *(*Tu8)(unsafe.Pointer(pPtrmap + uintptr(offset)))
if pPgno != 0 {
@@ -46904,7 +47088,7 @@ func _ptrmapGet(tls *libc.TLS, pBt uintptr, key TPgno, pEType uintptr, pPgno uin
}
_sqlite3PagerUnref(tls, *(*uintptr)(unsafe.Pointer(bp)))
if libc.Int32FromUint8(*(*Tu8)(unsafe.Pointer(pEType))) < int32(1) || libc.Int32FromUint8(*(*Tu8)(unsafe.Pointer(pEType))) > int32(5) {
- return _sqlite3CorruptError(tls, int32(71929))
+ return _sqlite3CorruptError(tls, int32(72691))
}
return SQLITE_OK
}
@@ -47092,7 +47276,7 @@ func _btreeParseCellPtr(tls *libc.TLS, pPage uintptr, pCell uintptr, pInfo uintp
/* This is the (easy) common case where the entire payload fits
** on the local page. No overflow is required.
*/
- (*TCellInfo)(unsafe.Pointer(pInfo)).FnSize = uint16(nPayload + uint32(libc.Uint16FromInt32(int32(pIter)-int32(pCell))))
+ (*TCellInfo)(unsafe.Pointer(pInfo)).FnSize = libc.Uint16FromInt32(libc.Int32FromUint16(uint16(nPayload)) + libc.Int32FromUint16(libc.Uint16FromInt32(int32(pIter)-int32(pCell))))
if libc.Int32FromUint16((*TCellInfo)(unsafe.Pointer(pInfo)).FnSize) < int32(4) {
(*TCellInfo)(unsafe.Pointer(pInfo)).FnSize = uint16(4)
}
@@ -47125,7 +47309,7 @@ func _btreeParseCellPtrIndex(tls *libc.TLS, pPage uintptr, pCell uintptr, pInfo
/* This is the (easy) common case where the entire payload fits
** on the local page. No overflow is required.
*/
- (*TCellInfo)(unsafe.Pointer(pInfo)).FnSize = uint16(nPayload + uint32(libc.Uint16FromInt32(int32(pIter)-int32(pCell))))
+ (*TCellInfo)(unsafe.Pointer(pInfo)).FnSize = libc.Uint16FromInt32(libc.Int32FromUint16(uint16(nPayload)) + libc.Int32FromUint16(libc.Uint16FromInt32(int32(pIter)-int32(pCell))))
if libc.Int32FromUint16((*TCellInfo)(unsafe.Pointer(pInfo)).FnSize) < int32(4) {
(*TCellInfo)(unsafe.Pointer(pInfo)).FnSize = uint16(4)
}
@@ -47324,7 +47508,7 @@ func _ptrmapPutOvflPtr(tls *libc.TLS, pPage uintptr, pSrc uintptr, pCell uintptr
(*(*func(*libc.TLS, uintptr, uintptr, uintptr))(unsafe.Pointer(&struct{ uintptr }{(*TMemPage)(unsafe.Pointer(pPage)).FxParseCell})))(tls, pPage, pCell, bp)
if uint32((*(*TCellInfo)(unsafe.Pointer(bp))).FnLocal) < (*(*TCellInfo)(unsafe.Pointer(bp))).FnPayload {
if uint32(pCell) < uint32((*TMemPage)(unsafe.Pointer(pSrc)).FaDataEnd) && uint32(pCell+uintptr((*(*TCellInfo)(unsafe.Pointer(bp))).FnLocal)) > uint32((*TMemPage)(unsafe.Pointer(pSrc)).FaDataEnd) {
- *(*int32)(unsafe.Pointer(pRC)) = _sqlite3CorruptError(tls, int32(72369))
+ *(*int32)(unsafe.Pointer(pRC)) = _sqlite3CorruptError(tls, int32(73136))
return
}
ovfl = _sqlite3Get4byte(tls, pCell+uintptr(libc.Int32FromUint16((*(*TCellInfo)(unsafe.Pointer(bp))).FnSize)-int32(4)))
@@ -47364,12 +47548,12 @@ func _defragmentPage(tls *libc.TLS, pPage uintptr, nMaxFrag int32) (r int32) {
if libc.Int32FromUint8(*(*uint8)(unsafe.Pointer(data + uintptr(hdr+int32(7))))) <= nMaxFrag {
iFree = libc.Int32FromUint8(*(*uint8)(unsafe.Pointer(data + uintptr(hdr+int32(1)))))<<int32(8) | libc.Int32FromUint8(*(*uint8)(unsafe.Pointer(data + uintptr(hdr+int32(1)) + 1)))
if iFree > usableSize-int32(4) {
- return _sqlite3CorruptError(tls, int32(72427))
+ return _sqlite3CorruptError(tls, int32(73194))
}
if iFree != 0 {
iFree2 = libc.Int32FromUint8(*(*uint8)(unsafe.Pointer(data + uintptr(iFree))))<<int32(8) | libc.Int32FromUint8(*(*uint8)(unsafe.Pointer(data + uintptr(iFree) + 1)))
if iFree2 > usableSize-int32(4) {
- return _sqlite3CorruptError(tls, int32(72430))
+ return _sqlite3CorruptError(tls, int32(73197))
}
if 0 == iFree2 || libc.Int32FromUint8(*(*uint8)(unsafe.Pointer(data + uintptr(iFree2)))) == 0 && libc.Int32FromUint8(*(*uint8)(unsafe.Pointer(data + uintptr(iFree2+int32(1))))) == 0 {
pEnd = data + uintptr(cellOffset+nCell*int32(2))
@@ -47377,21 +47561,21 @@ func _defragmentPage(tls *libc.TLS, pPage uintptr, nMaxFrag int32) (r int32) {
sz = libc.Int32FromUint8(*(*uint8)(unsafe.Pointer(data + uintptr(iFree+int32(2)))))<<int32(8) | libc.Int32FromUint8(*(*uint8)(unsafe.Pointer(data + uintptr(iFree+int32(2)) + 1)))
top = libc.Int32FromUint8(*(*uint8)(unsafe.Pointer(data + uintptr(hdr+int32(5)))))<<int32(8) | libc.Int32FromUint8(*(*uint8)(unsafe.Pointer(data + uintptr(hdr+int32(5)) + 1)))
if top >= iFree {
- return _sqlite3CorruptError(tls, int32(72438))
+ return _sqlite3CorruptError(tls, int32(73205))
}
if iFree2 != 0 {
if iFree+sz > iFree2 {
- return _sqlite3CorruptError(tls, int32(72441))
+ return _sqlite3CorruptError(tls, int32(73208))
}
sz2 = libc.Int32FromUint8(*(*uint8)(unsafe.Pointer(data + uintptr(iFree2+int32(2)))))<<int32(8) | libc.Int32FromUint8(*(*uint8)(unsafe.Pointer(data + uintptr(iFree2+int32(2)) + 1)))
if iFree2+sz2 > usableSize {
- return _sqlite3CorruptError(tls, int32(72443))
+ return _sqlite3CorruptError(tls, int32(73210))
}
libc.Xmemmove(tls, data+uintptr(iFree+sz+sz2), data+uintptr(iFree+sz), libc.Uint32FromInt32(iFree2-(iFree+sz)))
sz += sz2
} else {
if iFree+sz > usableSize {
- return _sqlite3CorruptError(tls, int32(72447))
+ return _sqlite3CorruptError(tls, int32(73214))
}
}
cbrk = top + sz
@@ -47438,12 +47622,12 @@ func _defragmentPage(tls *libc.TLS, pPage uintptr, nMaxFrag int32) (r int32) {
** if PRAGMA cell_size_check=ON.
*/
if pc > iCellLast {
- return _sqlite3CorruptError(tls, int32(72480))
+ return _sqlite3CorruptError(tls, int32(73247))
}
size = libc.Int32FromUint16((*(*func(*libc.TLS, uintptr, uintptr) Tu16)(unsafe.Pointer(&struct{ uintptr }{(*TMemPage)(unsafe.Pointer(pPage)).FxCellSize})))(tls, pPage, src+uintptr(pc)))
cbrk -= size
if cbrk < iCellStart || pc+size > usableSize {
- return _sqlite3CorruptError(tls, int32(72486))
+ return _sqlite3CorruptError(tls, int32(73253))
}
*(*Tu8)(unsafe.Pointer(pAddr1)) = libc.Uint8FromInt32(cbrk >> libc.Int32FromInt32(8))
*(*Tu8)(unsafe.Pointer(pAddr1 + 1)) = libc.Uint8FromInt32(cbrk)
@@ -47459,7 +47643,7 @@ func _defragmentPage(tls *libc.TLS, pPage uintptr, nMaxFrag int32) (r int32) {
defragment_out:
;
if libc.Int32FromUint8(*(*uint8)(unsafe.Pointer(data + uintptr(hdr+int32(7)))))+cbrk-iCellFirst != (*TMemPage)(unsafe.Pointer(pPage)).FnFree {
- return _sqlite3CorruptError(tls, int32(72500))
+ return _sqlite3CorruptError(tls, int32(73267))
}
*(*uint8)(unsafe.Pointer(data + uintptr(hdr+int32(5)))) = libc.Uint8FromInt32(cbrk >> libc.Int32FromInt32(8))
*(*uint8)(unsafe.Pointer(data + uintptr(hdr+int32(5)) + 1)) = libc.Uint8FromInt32(cbrk)
@@ -47519,7 +47703,7 @@ func _pageFindSlot(tls *libc.TLS, pPg uintptr, nByte int32, pRc uintptr) (r uint
} else {
if x+pc > maxPC {
/* This slot extends off the end of the usable part of the page */
- *(*int32)(unsafe.Pointer(pRc)) = _sqlite3CorruptError(tls, int32(72557))
+ *(*int32)(unsafe.Pointer(pRc)) = _sqlite3CorruptError(tls, int32(73324))
return uintptr(0)
} else {
/* The slot remains on the free-list. Reduce its size to account
@@ -47536,14 +47720,14 @@ func _pageFindSlot(tls *libc.TLS, pPg uintptr, nByte int32, pRc uintptr) (r uint
if pc <= iAddr {
if pc != 0 {
/* The next slot in the chain comes before the current slot */
- *(*int32)(unsafe.Pointer(pRc)) = _sqlite3CorruptError(tls, int32(72572))
+ *(*int32)(unsafe.Pointer(pRc)) = _sqlite3CorruptError(tls, int32(73339))
}
return uintptr(0)
}
}
if pc > maxPC+nByte-int32(4) {
/* The free slot chain extends off the end of the page */
- *(*int32)(unsafe.Pointer(pRc)) = _sqlite3CorruptError(tls, int32(72579))
+ *(*int32)(unsafe.Pointer(pRc)) = _sqlite3CorruptError(tls, int32(73346))
}
return uintptr(0)
}
@@ -47586,11 +47770,11 @@ func _allocateSpace(tls *libc.TLS, pPage uintptr, nByte int32, pIdx uintptr) (r
if top == 0 && (*TBtShared)(unsafe.Pointer((*TMemPage)(unsafe.Pointer(pPage)).FpBt)).FusableSize == uint32(65536) {
top = int32(65536)
} else {
- return _sqlite3CorruptError(tls, int32(72627))
+ return _sqlite3CorruptError(tls, int32(73394))
}
} else {
if top > libc.Int32FromUint32((*TBtShared)(unsafe.Pointer((*TMemPage)(unsafe.Pointer(pPage)).FpBt)).FusableSize) {
- return _sqlite3CorruptError(tls, int32(72630))
+ return _sqlite3CorruptError(tls, int32(73397))
}
}
/* If there is enough space between gap and top for one more cell pointer,
@@ -47604,7 +47788,7 @@ func _allocateSpace(tls *libc.TLS, pPage uintptr, nByte int32, pIdx uintptr) (r
g2 = v1
*(*int32)(unsafe.Pointer(pIdx)) = v1
if g2 <= gap {
- return _sqlite3CorruptError(tls, int32(72647))
+ return _sqlite3CorruptError(tls, int32(73414))
} else {
return SQLITE_OK
}
@@ -47657,42 +47841,40 @@ func _allocateSpace(tls *libc.TLS, pPage uintptr, nByte int32, pIdx uintptr) (r
// ** at the end of the page. So do additional corruption checks inside this
// ** routine and return SQLITE_CORRUPT if any problems are found.
// */
-func _freeSpace(tls *libc.TLS, pPage uintptr, iStart Tu16, iSize Tu16) (r int32) {
+func _freeSpace(tls *libc.TLS, pPage uintptr, iStart int32, iSize int32) (r int32) {
var data, pTmp, p2 uintptr
- var hdr, nFrag Tu8
- var iEnd Tu32
- var iFreeBlk, iOrigSize, iPtr, x, v1 Tu16
- var iPtrEnd int32
+ var hdr Tu8
+ var iEnd, iFreeBlk, iOrigSize, iPtr, iPtrEnd, nFrag, x, v1 int32
_, _, _, _, _, _, _, _, _, _, _, _ = data, hdr, iEnd, iFreeBlk, iOrigSize, iPtr, iPtrEnd, nFrag, pTmp, x, v1, p2 /* Page header size. 0 or 100 */
- nFrag = uint8(0) /* Reduction in fragmentation */
+ nFrag = 0 /* Reduction in fragmentation */
iOrigSize = iSize /* Offset to cell content area */
- iEnd = libc.Uint32FromInt32(libc.Int32FromUint16(iStart) + libc.Int32FromUint16(iSize)) /* First byte past the iStart buffer */
+ iEnd = iStart + iSize /* First byte past the iStart buffer */
data = (*TMemPage)(unsafe.Pointer(pPage)).FaData /* Temporary ptr into data[] */
/* Minimum cell size is 4 */
/* The list of freeblocks must be in ascending order. Find the
** spot on the list where iStart should be inserted.
*/
hdr = (*TMemPage)(unsafe.Pointer(pPage)).FhdrOffset
- iPtr = libc.Uint16FromInt32(libc.Int32FromUint8(hdr) + int32(1))
- if libc.Int32FromUint8(*(*uint8)(unsafe.Pointer(data + uintptr(libc.Int32FromUint16(iPtr)+int32(1))))) == 0 && libc.Int32FromUint8(*(*uint8)(unsafe.Pointer(data + uintptr(iPtr)))) == 0 {
- iFreeBlk = uint16(0) /* Shortcut for the case when the freelist is empty */
+ iPtr = libc.Int32FromUint8(hdr) + int32(1)
+ if libc.Int32FromUint8(*(*uint8)(unsafe.Pointer(data + uintptr(iPtr+int32(1))))) == 0 && libc.Int32FromUint8(*(*uint8)(unsafe.Pointer(data + uintptr(iPtr)))) == 0 {
+ iFreeBlk = 0 /* Shortcut for the case when the freelist is empty */
} else {
for {
- v1 = libc.Uint16FromInt32(libc.Int32FromUint8(*(*uint8)(unsafe.Pointer(data + uintptr(iPtr))))<<libc.Int32FromInt32(8) | libc.Int32FromUint8(*(*uint8)(unsafe.Pointer(data + uintptr(iPtr) + 1))))
+ v1 = libc.Int32FromUint8(*(*uint8)(unsafe.Pointer(data + uintptr(iPtr))))<<libc.Int32FromInt32(8) | libc.Int32FromUint8(*(*uint8)(unsafe.Pointer(data + uintptr(iPtr) + 1)))
iFreeBlk = v1
- if !(libc.Int32FromUint16(v1) < libc.Int32FromUint16(iStart)) {
+ if !(v1 < iStart) {
break
}
- if libc.Int32FromUint16(iFreeBlk) <= libc.Int32FromUint16(iPtr) {
- if libc.Int32FromUint16(iFreeBlk) == 0 {
+ if iFreeBlk <= iPtr {
+ if iFreeBlk == 0 {
break
} /* TH3: corrupt082.100 */
- return _sqlite3CorruptError(tls, int32(72726))
+ return _sqlite3CorruptError(tls, int32(73493))
}
iPtr = iFreeBlk
}
- if uint32(iFreeBlk) > (*TBtShared)(unsafe.Pointer((*TMemPage)(unsafe.Pointer(pPage)).FpBt)).FusableSize-uint32(4) { /* TH3: corrupt081.100 */
- return _sqlite3CorruptError(tls, int32(72731))
+ if iFreeBlk > libc.Int32FromUint32((*TBtShared)(unsafe.Pointer((*TMemPage)(unsafe.Pointer(pPage)).FpBt)).FusableSize)-int32(4) { /* TH3: corrupt081.100 */
+ return _sqlite3CorruptError(tls, int32(73498))
}
/* At this point:
** iFreeBlk: First freeblock after iStart, or zero if none
@@ -47700,70 +47882,70 @@ func _freeSpace(tls *libc.TLS, pPage uintptr, iStart Tu16, iSize Tu16) (r int32)
**
** Check to see if iFreeBlk should be coalesced onto the end of iStart.
*/
- if iFreeBlk != 0 && iEnd+uint32(3) >= uint32(iFreeBlk) {
- nFrag = uint8(uint32(iFreeBlk) - iEnd)
- if iEnd > uint32(iFreeBlk) {
- return _sqlite3CorruptError(tls, int32(72743))
+ if iFreeBlk != 0 && iEnd+int32(3) >= iFreeBlk {
+ nFrag = iFreeBlk - iEnd
+ if iEnd > iFreeBlk {
+ return _sqlite3CorruptError(tls, int32(73510))
}
- iEnd = libc.Uint32FromInt32(libc.Int32FromUint16(iFreeBlk) + (libc.Int32FromUint8(*(*uint8)(unsafe.Pointer(data + uintptr(libc.Int32FromUint16(iFreeBlk)+int32(2)))))<<int32(8) | libc.Int32FromUint8(*(*uint8)(unsafe.Pointer(data + uintptr(libc.Int32FromUint16(iFreeBlk)+int32(2)) + 1)))))
- if iEnd > (*TBtShared)(unsafe.Pointer((*TMemPage)(unsafe.Pointer(pPage)).FpBt)).FusableSize {
- return _sqlite3CorruptError(tls, int32(72746))
+ iEnd = iFreeBlk + (libc.Int32FromUint8(*(*uint8)(unsafe.Pointer(data + uintptr(iFreeBlk+int32(2)))))<<int32(8) | libc.Int32FromUint8(*(*uint8)(unsafe.Pointer(data + uintptr(iFreeBlk+int32(2)) + 1))))
+ if iEnd > libc.Int32FromUint32((*TBtShared)(unsafe.Pointer((*TMemPage)(unsafe.Pointer(pPage)).FpBt)).FusableSize) {
+ return _sqlite3CorruptError(tls, int32(73513))
}
- iSize = uint16(iEnd - uint32(iStart))
- iFreeBlk = libc.Uint16FromInt32(libc.Int32FromUint8(*(*uint8)(unsafe.Pointer(data + uintptr(iFreeBlk))))<<libc.Int32FromInt32(8) | libc.Int32FromUint8(*(*uint8)(unsafe.Pointer(data + uintptr(iFreeBlk) + 1))))
+ iSize = iEnd - iStart
+ iFreeBlk = libc.Int32FromUint8(*(*uint8)(unsafe.Pointer(data + uintptr(iFreeBlk))))<<int32(8) | libc.Int32FromUint8(*(*uint8)(unsafe.Pointer(data + uintptr(iFreeBlk) + 1)))
}
/* If iPtr is another freeblock (that is, if iPtr is not the freelist
** pointer in the page header) then check to see if iStart should be
** coalesced onto the end of iPtr.
*/
- if libc.Int32FromUint16(iPtr) > libc.Int32FromUint8(hdr)+int32(1) {
- iPtrEnd = libc.Int32FromUint16(iPtr) + (libc.Int32FromUint8(*(*uint8)(unsafe.Pointer(data + uintptr(libc.Int32FromUint16(iPtr)+int32(2)))))<<int32(8) | libc.Int32FromUint8(*(*uint8)(unsafe.Pointer(data + uintptr(libc.Int32FromUint16(iPtr)+int32(2)) + 1))))
- if iPtrEnd+int32(3) >= libc.Int32FromUint16(iStart) {
- if iPtrEnd > libc.Int32FromUint16(iStart) {
- return _sqlite3CorruptError(tls, int32(72759))
+ if iPtr > libc.Int32FromUint8(hdr)+int32(1) {
+ iPtrEnd = iPtr + (libc.Int32FromUint8(*(*uint8)(unsafe.Pointer(data + uintptr(iPtr+int32(2)))))<<int32(8) | libc.Int32FromUint8(*(*uint8)(unsafe.Pointer(data + uintptr(iPtr+int32(2)) + 1))))
+ if iPtrEnd+int32(3) >= iStart {
+ if iPtrEnd > iStart {
+ return _sqlite3CorruptError(tls, int32(73526))
}
- nFrag = Tu8(int32(nFrag) + (libc.Int32FromUint16(iStart) - iPtrEnd))
- iSize = uint16(iEnd - uint32(iPtr))
+ nFrag += iStart - iPtrEnd
+ iSize = iEnd - iPtr
iStart = iPtr
}
}
- if libc.Int32FromUint8(nFrag) > libc.Int32FromUint8(*(*uint8)(unsafe.Pointer(data + uintptr(libc.Int32FromUint8(hdr)+int32(7))))) {
- return _sqlite3CorruptError(tls, int32(72765))
+ if nFrag > libc.Int32FromUint8(*(*uint8)(unsafe.Pointer(data + uintptr(libc.Int32FromUint8(hdr)+int32(7))))) {
+ return _sqlite3CorruptError(tls, int32(73532))
}
p2 = data + uintptr(libc.Int32FromUint8(hdr)+int32(7))
- *(*uint8)(unsafe.Pointer(p2)) = uint8(int32(*(*uint8)(unsafe.Pointer(p2))) - libc.Int32FromUint8(nFrag))
+ *(*uint8)(unsafe.Pointer(p2)) = uint8(int32(*(*uint8)(unsafe.Pointer(p2))) - libc.Int32FromUint8(libc.Uint8FromInt32(nFrag)))
}
pTmp = data + uintptr(libc.Int32FromUint8(hdr)+int32(5))
- x = libc.Uint16FromInt32(libc.Int32FromUint8(*(*Tu8)(unsafe.Pointer(pTmp)))<<libc.Int32FromInt32(8) | libc.Int32FromUint8(*(*Tu8)(unsafe.Pointer(pTmp + 1))))
+ x = libc.Int32FromUint8(*(*Tu8)(unsafe.Pointer(pTmp)))<<int32(8) | libc.Int32FromUint8(*(*Tu8)(unsafe.Pointer(pTmp + 1)))
if libc.Int32FromUint16((*TBtShared)(unsafe.Pointer((*TMemPage)(unsafe.Pointer(pPage)).FpBt)).FbtsFlags)&int32(BTS_FAST_SECURE) != 0 {
/* Overwrite deleted information with zeros when the secure_delete
** option is enabled */
- libc.Xmemset(tls, data+uintptr(iStart), 0, uint32(iSize))
+ libc.Xmemset(tls, data+uintptr(iStart), 0, libc.Uint32FromInt32(iSize))
}
- if libc.Int32FromUint16(iStart) <= libc.Int32FromUint16(x) {
+ if iStart <= x {
/* The new freeblock is at the beginning of the cell content area,
** so just extend the cell content area rather than create another
** freelist entry */
- if libc.Int32FromUint16(iStart) < libc.Int32FromUint16(x) {
- return _sqlite3CorruptError(tls, int32(72779))
+ if iStart < x {
+ return _sqlite3CorruptError(tls, int32(73546))
}
- if libc.Int32FromUint16(iPtr) != libc.Int32FromUint8(hdr)+int32(1) {
- return _sqlite3CorruptError(tls, int32(72780))
+ if iPtr != libc.Int32FromUint8(hdr)+int32(1) {
+ return _sqlite3CorruptError(tls, int32(73547))
}
- *(*uint8)(unsafe.Pointer(data + uintptr(libc.Int32FromUint8(hdr)+int32(1)))) = libc.Uint8FromInt32(libc.Int32FromUint16(iFreeBlk) >> libc.Int32FromInt32(8))
- *(*uint8)(unsafe.Pointer(data + uintptr(libc.Int32FromUint8(hdr)+int32(1)) + 1)) = uint8(iFreeBlk)
- *(*uint8)(unsafe.Pointer(data + uintptr(libc.Int32FromUint8(hdr)+int32(5)))) = uint8(iEnd >> libc.Int32FromInt32(8))
- *(*uint8)(unsafe.Pointer(data + uintptr(libc.Int32FromUint8(hdr)+int32(5)) + 1)) = uint8(iEnd)
+ *(*uint8)(unsafe.Pointer(data + uintptr(libc.Int32FromUint8(hdr)+int32(1)))) = libc.Uint8FromInt32(iFreeBlk >> libc.Int32FromInt32(8))
+ *(*uint8)(unsafe.Pointer(data + uintptr(libc.Int32FromUint8(hdr)+int32(1)) + 1)) = libc.Uint8FromInt32(iFreeBlk)
+ *(*uint8)(unsafe.Pointer(data + uintptr(libc.Int32FromUint8(hdr)+int32(5)))) = libc.Uint8FromInt32(iEnd >> libc.Int32FromInt32(8))
+ *(*uint8)(unsafe.Pointer(data + uintptr(libc.Int32FromUint8(hdr)+int32(5)) + 1)) = libc.Uint8FromInt32(iEnd)
} else {
/* Insert the new freeblock into the freelist */
- *(*uint8)(unsafe.Pointer(data + uintptr(iPtr))) = libc.Uint8FromInt32(libc.Int32FromUint16(iStart) >> libc.Int32FromInt32(8))
- *(*uint8)(unsafe.Pointer(data + uintptr(iPtr) + 1)) = uint8(iStart)
- *(*uint8)(unsafe.Pointer(data + uintptr(iStart))) = libc.Uint8FromInt32(libc.Int32FromUint16(iFreeBlk) >> libc.Int32FromInt32(8))
- *(*uint8)(unsafe.Pointer(data + uintptr(iStart) + 1)) = uint8(iFreeBlk)
- *(*uint8)(unsafe.Pointer(data + uintptr(libc.Int32FromUint16(iStart)+int32(2)))) = libc.Uint8FromInt32(libc.Int32FromUint16(iSize) >> libc.Int32FromInt32(8))
- *(*uint8)(unsafe.Pointer(data + uintptr(libc.Int32FromUint16(iStart)+int32(2)) + 1)) = uint8(iSize)
- }
- *(*int32)(unsafe.Pointer(pPage + 20)) += libc.Int32FromUint16(iOrigSize)
+ *(*uint8)(unsafe.Pointer(data + uintptr(iPtr))) = libc.Uint8FromInt32(iStart >> libc.Int32FromInt32(8))
+ *(*uint8)(unsafe.Pointer(data + uintptr(iPtr) + 1)) = libc.Uint8FromInt32(iStart)
+ *(*uint8)(unsafe.Pointer(data + uintptr(iStart))) = libc.Uint8FromInt32(iFreeBlk >> libc.Int32FromInt32(8))
+ *(*uint8)(unsafe.Pointer(data + uintptr(iStart) + 1)) = libc.Uint8FromInt32(iFreeBlk)
+ *(*uint8)(unsafe.Pointer(data + uintptr(iStart+int32(2)))) = libc.Uint8FromInt32(libc.Int32FromUint16(libc.Uint16FromInt32(iSize)) >> libc.Int32FromInt32(8))
+ *(*uint8)(unsafe.Pointer(data + uintptr(iStart+int32(2)) + 1)) = uint8(libc.Uint16FromInt32(iSize))
+ }
+ *(*int32)(unsafe.Pointer(pPage + 20)) += iOrigSize
return SQLITE_OK
}
@@ -47809,7 +47991,7 @@ func _decodeFlags(tls *libc.TLS, pPage uintptr, flagByte int32) (r int32) {
(*TMemPage)(unsafe.Pointer(pPage)).FintKeyLeaf = uint8(0)
(*TMemPage)(unsafe.Pointer(pPage)).FxCellSize = __ccgo_fp(_cellSizePtrIdxLeaf)
(*TMemPage)(unsafe.Pointer(pPage)).FxParseCell = __ccgo_fp(_btreeParseCellPtrIndex)
- return _sqlite3CorruptError(tls, int32(72834))
+ return _sqlite3CorruptError(tls, int32(73602))
}
}
} else {
@@ -47835,7 +48017,7 @@ func _decodeFlags(tls *libc.TLS, pPage uintptr, flagByte int32) (r int32) {
(*TMemPage)(unsafe.Pointer(pPage)).FintKeyLeaf = uint8(0)
(*TMemPage)(unsafe.Pointer(pPage)).FxCellSize = __ccgo_fp(_cellSizePtr)
(*TMemPage)(unsafe.Pointer(pPage)).FxParseCell = __ccgo_fp(_btreeParseCellPtrIndex)
- return _sqlite3CorruptError(tls, int32(72858))
+ return _sqlite3CorruptError(tls, int32(73626))
}
}
}
@@ -47874,12 +48056,12 @@ func _btreeComputeFreeSpace(tls *libc.TLS, pPage uintptr) (r int32) {
/* EVIDENCE-OF: R-55530-52930 In a well-formed b-tree page, there will
** always be at least one cell before the first freeblock.
*/
- return _sqlite3CorruptError(tls, int32(72909))
+ return _sqlite3CorruptError(tls, int32(73677))
}
for int32(1) != 0 {
if pc > iCellLast {
/* Freeblock off the end of the page */
- return _sqlite3CorruptError(tls, int32(72914))
+ return _sqlite3CorruptError(tls, int32(73682))
}
next = libc.Uint32FromInt32(libc.Int32FromUint8(*(*Tu8)(unsafe.Pointer(data + uintptr(pc))))<<libc.Int32FromInt32(8) | libc.Int32FromUint8(*(*Tu8)(unsafe.Pointer(data + uintptr(pc) + 1))))
size = libc.Uint32FromInt32(libc.Int32FromUint8(*(*Tu8)(unsafe.Pointer(data + uintptr(pc+int32(2)))))<<libc.Int32FromInt32(8) | libc.Int32FromUint8(*(*Tu8)(unsafe.Pointer(data + uintptr(pc+int32(2)) + 1))))
@@ -47891,11 +48073,11 @@ func _btreeComputeFreeSpace(tls *libc.TLS, pPage uintptr) (r int32) {
}
if next > uint32(0) {
/* Freeblock not in ascending order */
- return _sqlite3CorruptError(tls, int32(72924))
+ return _sqlite3CorruptError(tls, int32(73692))
}
if libc.Uint32FromInt32(pc)+size > libc.Uint32FromInt32(usableSize) {
/* Last freeblock extends past page end */
- return _sqlite3CorruptError(tls, int32(72928))
+ return _sqlite3CorruptError(tls, int32(73696))
}
}
/* At this point, nFree contains the sum of the offset to the start
@@ -47906,7 +48088,7 @@ func _btreeComputeFreeSpace(tls *libc.TLS, pPage uintptr) (r int32) {
** area, according to the page header, lies within the page.
*/
if nFree > usableSize || nFree < iCellFirst {
- return _sqlite3CorruptError(tls, int32(72940))
+ return _sqlite3CorruptError(tls, int32(73708))
}
(*TMemPage)(unsafe.Pointer(pPage)).FnFree = libc.Int32FromUint16(libc.Uint16FromInt32(nFree - iCellFirst))
return SQLITE_OK
@@ -47937,11 +48119,11 @@ func _btreeCellSizeCheck(tls *libc.TLS, pPage uintptr) (r int32) {
}
pc = libc.Int32FromUint16(libc.X__builtin_bswap16(tls, *(*Tu16)(unsafe.Pointer(data + uintptr(cellOffset+i*int32(2))))))
if pc < iCellFirst || pc > iCellLast {
- return _sqlite3CorruptError(tls, int32(72971))
+ return _sqlite3CorruptError(tls, int32(73739))
}
sz = libc.Int32FromUint16((*(*func(*libc.TLS, uintptr, uintptr) Tu16)(unsafe.Pointer(&struct{ uintptr }{(*TMemPage)(unsafe.Pointer(pPage)).FxCellSize})))(tls, pPage, data+uintptr(pc)))
if pc+sz > usableSize {
- return _sqlite3CorruptError(tls, int32(72976))
+ return _sqlite3CorruptError(tls, int32(73744))
}
goto _1
_1:
@@ -47970,11 +48152,11 @@ func _btreeInitPage(tls *libc.TLS, pPage uintptr) (r int32) {
/* EVIDENCE-OF: R-28594-02890 The one-byte flag at offset 0 indicating
** the b-tree page type. */
if _decodeFlags(tls, pPage, libc.Int32FromUint8(*(*Tu8)(unsafe.Pointer(data)))) != 0 {
- return _sqlite3CorruptError(tls, int32(73008))
+ return _sqlite3CorruptError(tls, int32(73776))
}
(*TMemPage)(unsafe.Pointer(pPage)).FmaskPage = uint16((*TBtShared)(unsafe.Pointer(pBt)).FpageSize - libc.Uint32FromInt32(1))
(*TMemPage)(unsafe.Pointer(pPage)).FnOverflow = uint8(0)
- (*TMemPage)(unsafe.Pointer(pPage)).FcellOffset = libc.Uint16FromInt32(libc.Int32FromUint8((*TMemPage)(unsafe.Pointer(pPage)).FhdrOffset) + int32(8) + libc.Int32FromUint8((*TMemPage)(unsafe.Pointer(pPage)).FchildPtrSize))
+ (*TMemPage)(unsafe.Pointer(pPage)).FcellOffset = libc.Uint16FromInt32(libc.Int32FromUint8((*TMemPage)(unsafe.Pointer(pPage)).FhdrOffset) + libc.Int32FromInt32(8) + libc.Int32FromUint8((*TMemPage)(unsafe.Pointer(pPage)).FchildPtrSize))
(*TMemPage)(unsafe.Pointer(pPage)).FaCellIdx = data + uintptr((*TMemPage)(unsafe.Pointer(pPage)).FchildPtrSize) + uintptr(8)
(*TMemPage)(unsafe.Pointer(pPage)).FaDataEnd = (*TMemPage)(unsafe.Pointer(pPage)).FaData + uintptr((*TBtShared)(unsafe.Pointer(pBt)).FpageSize)
(*TMemPage)(unsafe.Pointer(pPage)).FaDataOfst = (*TMemPage)(unsafe.Pointer(pPage)).FaData + uintptr((*TMemPage)(unsafe.Pointer(pPage)).FchildPtrSize)
@@ -47983,7 +48165,7 @@ func _btreeInitPage(tls *libc.TLS, pPage uintptr) (r int32) {
(*TMemPage)(unsafe.Pointer(pPage)).FnCell = libc.Uint16FromInt32(libc.Int32FromUint8(*(*Tu8)(unsafe.Pointer(data + 3)))<<libc.Int32FromInt32(8) | libc.Int32FromUint8(*(*Tu8)(unsafe.Pointer(data + 3 + 1))))
if uint32((*TMemPage)(unsafe.Pointer(pPage)).FnCell) > ((*TBtShared)(unsafe.Pointer(pBt)).FpageSize-uint32(8))/uint32(6) {
/* To many cells for a single page. The page must be corrupt */
- return _sqlite3CorruptError(tls, int32(73022))
+ return _sqlite3CorruptError(tls, int32(73790))
}
/* EVIDENCE-OF: R-24089-57979 If a page contains no cells (which is only
** possible for a root page of a table that contains no rows) then the
@@ -48005,15 +48187,13 @@ func _btreeInitPage(tls *libc.TLS, pPage uintptr) (r int32) {
// */
func _zeroPage(tls *libc.TLS, pPage uintptr, flags int32) {
var data, pBt uintptr
- var first Tu16
- var hdr Tu8
- var v1 int32
+ var first, hdr, v1 int32
_, _, _, _, _ = data, first, hdr, pBt, v1
data = (*TMemPage)(unsafe.Pointer(pPage)).FaData
pBt = (*TMemPage)(unsafe.Pointer(pPage)).FpBt
- hdr = (*TMemPage)(unsafe.Pointer(pPage)).FhdrOffset
+ hdr = libc.Int32FromUint8((*TMemPage)(unsafe.Pointer(pPage)).FhdrOffset)
if libc.Int32FromUint16((*TBtShared)(unsafe.Pointer(pBt)).FbtsFlags)&int32(BTS_FAST_SECURE) != 0 {
- libc.Xmemset(tls, data+uintptr(hdr), 0, (*TBtShared)(unsafe.Pointer(pBt)).FusableSize-uint32(hdr))
+ libc.Xmemset(tls, data+uintptr(hdr), 0, (*TBtShared)(unsafe.Pointer(pBt)).FusableSize-libc.Uint32FromInt32(hdr))
}
*(*uint8)(unsafe.Pointer(data + uintptr(hdr))) = libc.Uint8FromInt8(int8(flags))
if flags&int32(PTF_LEAF) == 0 {
@@ -48021,14 +48201,14 @@ func _zeroPage(tls *libc.TLS, pPage uintptr, flags int32) {
} else {
v1 = int32(8)
}
- first = libc.Uint16FromInt32(libc.Int32FromUint8(hdr) + v1)
- libc.Xmemset(tls, data+uintptr(libc.Int32FromUint8(hdr)+int32(1)), 0, uint32(4))
- *(*uint8)(unsafe.Pointer(data + uintptr(libc.Int32FromUint8(hdr)+int32(7)))) = uint8(0)
- *(*uint8)(unsafe.Pointer(data + uintptr(libc.Int32FromUint8(hdr)+int32(5)))) = uint8((*TBtShared)(unsafe.Pointer(pBt)).FusableSize >> libc.Int32FromInt32(8))
- *(*uint8)(unsafe.Pointer(data + uintptr(libc.Int32FromUint8(hdr)+int32(5)) + 1)) = uint8((*TBtShared)(unsafe.Pointer(pBt)).FusableSize)
- (*TMemPage)(unsafe.Pointer(pPage)).FnFree = libc.Int32FromUint16(uint16((*TBtShared)(unsafe.Pointer(pBt)).FusableSize - uint32(first)))
+ first = hdr + v1
+ libc.Xmemset(tls, data+uintptr(hdr+int32(1)), 0, uint32(4))
+ *(*uint8)(unsafe.Pointer(data + uintptr(hdr+int32(7)))) = uint8(0)
+ *(*uint8)(unsafe.Pointer(data + uintptr(hdr+int32(5)))) = uint8((*TBtShared)(unsafe.Pointer(pBt)).FusableSize >> libc.Int32FromInt32(8))
+ *(*uint8)(unsafe.Pointer(data + uintptr(hdr+int32(5)) + 1)) = uint8((*TBtShared)(unsafe.Pointer(pBt)).FusableSize)
+ (*TMemPage)(unsafe.Pointer(pPage)).FnFree = libc.Int32FromUint16(uint16((*TBtShared)(unsafe.Pointer(pBt)).FusableSize - libc.Uint32FromInt32(first)))
_decodeFlags(tls, pPage, flags)
- (*TMemPage)(unsafe.Pointer(pPage)).FcellOffset = first
+ (*TMemPage)(unsafe.Pointer(pPage)).FcellOffset = libc.Uint16FromInt32(first)
(*TMemPage)(unsafe.Pointer(pPage)).FaDataEnd = data + uintptr((*TBtShared)(unsafe.Pointer(pBt)).FpageSize)
(*TMemPage)(unsafe.Pointer(pPage)).FaCellIdx = data + uintptr(first)
(*TMemPage)(unsafe.Pointer(pPage)).FaDataOfst = data + uintptr((*TMemPage)(unsafe.Pointer(pPage)).FchildPtrSize)
@@ -48136,7 +48316,7 @@ func _getAndInitPage(tls *libc.TLS, pBt uintptr, pgno TPgno, ppPage uintptr, bRe
_, _ = pPage, rc
if pgno > _btreePagecount(tls, pBt) {
*(*uintptr)(unsafe.Pointer(ppPage)) = uintptr(0)
- return _sqlite3CorruptError(tls, int32(73165))
+ return _sqlite3CorruptError(tls, int32(73933))
}
rc = _sqlite3PagerGet(tls, (*TBtShared)(unsafe.Pointer(pBt)).FpPager, pgno, bp, bReadOnly)
if rc != 0 {
@@ -48198,7 +48378,7 @@ func _btreeGetUnusedPage(tls *libc.TLS, pBt uintptr, pgno TPgno, ppPage uintptr,
if _sqlite3PagerPageRefcount(tls, (*TMemPage)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(ppPage)))).FpDbPage) > int32(1) {
_releasePage(tls, *(*uintptr)(unsafe.Pointer(ppPage)))
*(*uintptr)(unsafe.Pointer(ppPage)) = uintptr(0)
- return _sqlite3CorruptError(tls, int32(73237))
+ return _sqlite3CorruptError(tls, int32(74005))
}
(*TMemPage)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(ppPage)))).FisInit = uint8(0)
} else {
@@ -48286,7 +48466,7 @@ func _sqlite3BtreeOpen(tls *libc.TLS, pVfs uintptr, zFilename uintptr, db uintpt
/* Set the variable isMemdb to true for an in-memory database, or
** false for a file-based database.
*/
- isMemdb = libc.BoolInt32(zFilename != 0 && libc.Xstrcmp(tls, zFilename, __ccgo_ts+4259) == 0 || isTempDb != 0 && _sqlite3TempInMemory(tls, db) != 0 || vfsFlags&int32(SQLITE_OPEN_MEMORY) != 0)
+ isMemdb = libc.BoolInt32(zFilename != 0 && libc.Xstrcmp(tls, zFilename, __ccgo_ts+4285) == 0 || isTempDb != 0 && _sqlite3TempInMemory(tls, db) != 0 || vfsFlags&int32(SQLITE_OPEN_MEMORY) != 0)
/* flags fit in 8 bits */
/* Only a BTREE_SINGLE database can be BTREE_UNORDERED */
/* A BTREE_SINGLE database is always a temporary and/or ephemeral */
@@ -48910,7 +49090,7 @@ func _sqlite3BtreeSecureDelete(tls *libc.TLS, p uintptr, newFlag int32) (r int32
p1 = (*TBtree)(unsafe.Pointer(p)).FpBt + 24
*(*Tu16)(unsafe.Pointer(p1)) = Tu16(int32(*(*Tu16)(unsafe.Pointer(p1))) & ^libc.Int32FromInt32(BTS_FAST_SECURE))
p2 = (*TBtree)(unsafe.Pointer(p)).FpBt + 24
- *(*Tu16)(unsafe.Pointer(p2)) = Tu16(int32(*(*Tu16)(unsafe.Pointer(p2))) | libc.Int32FromInt32(BTS_SECURE_DELETE)*newFlag)
+ *(*Tu16)(unsafe.Pointer(p2)) = Tu16(int32(*(*Tu16)(unsafe.Pointer(p2))) | libc.Int32FromUint16(libc.Uint16FromInt32(libc.Int32FromInt32(BTS_SECURE_DELETE)*newFlag)))
}
b = libc.Int32FromUint16((*TBtShared)(unsafe.Pointer((*TBtree)(unsafe.Pointer(p)).FpBt)).FbtsFlags) & int32(BTS_FAST_SECURE) / int32(BTS_SECURE_DELETE)
_sqlite3BtreeLeave(tls, p)
@@ -49072,7 +49252,7 @@ func _lockBtree(tls *libc.TLS, pBt uintptr) (r int32) {
** The original design allowed these amounts to vary, but as of
** version 3.6.0, we require them to be fixed.
*/
- if libc.Xmemcmp(tls, page1+21, __ccgo_ts+4268, uint32(3)) != 0 {
+ if libc.Xmemcmp(tls, page1+21, __ccgo_ts+4294, uint32(3)) != 0 {
goto page1_init_failed
}
/* EVIDENCE-OF: R-51873-39618 The page size for a database file is
@@ -49110,7 +49290,7 @@ func _lockBtree(tls *libc.TLS, pBt uintptr) (r int32) {
}
if nPage > *(*Tu32)(unsafe.Pointer(bp + 4)) {
if _sqlite3WritableSchema(tls, (*TBtShared)(unsafe.Pointer(pBt)).Fdb) == 0 {
- rc = _sqlite3CorruptError(tls, int32(74175))
+ rc = _sqlite3CorruptError(tls, int32(74943))
goto page1_init_failed
} else {
nPage = *(*Tu32)(unsafe.Pointer(bp + 4))
@@ -49551,7 +49731,7 @@ func _modifyPagePointer(tls *libc.TLS, pPage uintptr, iFrom TPgno, iTo TPgno, eT
if libc.Int32FromUint8(eType) == int32(PTRMAP_OVERFLOW2) {
/* The pointer is always the first 4 bytes of the page in this case. */
if _sqlite3Get4byte(tls, (*TMemPage)(unsafe.Pointer(pPage)).FaData) != iFrom {
- return _sqlite3CorruptError(tls, int32(74623))
+ return _sqlite3CorruptError(tls, int32(75398))
}
_sqlite3Put4byte(tls, (*TMemPage)(unsafe.Pointer(pPage)).FaData, iTo)
} else {
@@ -49575,7 +49755,7 @@ func _modifyPagePointer(tls *libc.TLS, pPage uintptr, iFrom TPgno, iTo TPgno, eT
(*(*func(*libc.TLS, uintptr, uintptr, uintptr))(unsafe.Pointer(&struct{ uintptr }{(*TMemPage)(unsafe.Pointer(pPage)).FxParseCell})))(tls, pPage, pCell, bp)
if uint32((*(*TCellInfo)(unsafe.Pointer(bp))).FnLocal) < (*(*TCellInfo)(unsafe.Pointer(bp))).FnPayload {
if pCell+uintptr((*(*TCellInfo)(unsafe.Pointer(bp))).FnSize) > (*TMemPage)(unsafe.Pointer(pPage)).FaData+uintptr((*TBtShared)(unsafe.Pointer((*TMemPage)(unsafe.Pointer(pPage)).FpBt)).FusableSize) {
- return _sqlite3CorruptError(tls, int32(74642))
+ return _sqlite3CorruptError(tls, int32(75417))
}
if iFrom == _sqlite3Get4byte(tls, pCell+uintptr((*(*TCellInfo)(unsafe.Pointer(bp))).FnSize)-uintptr(4)) {
_sqlite3Put4byte(tls, pCell+uintptr((*(*TCellInfo)(unsafe.Pointer(bp))).FnSize)-uintptr(4), iTo)
@@ -49584,7 +49764,7 @@ func _modifyPagePointer(tls *libc.TLS, pPage uintptr, iFrom TPgno, iTo TPgno, eT
}
} else {
if pCell+uintptr(4) > (*TMemPage)(unsafe.Pointer(pPage)).FaData+uintptr((*TBtShared)(unsafe.Pointer((*TMemPage)(unsafe.Pointer(pPage)).FpBt)).FusableSize) {
- return _sqlite3CorruptError(tls, int32(74651))
+ return _sqlite3CorruptError(tls, int32(75426))
}
if _sqlite3Get4byte(tls, pCell) == iFrom {
_sqlite3Put4byte(tls, pCell, iTo)
@@ -49598,7 +49778,7 @@ func _modifyPagePointer(tls *libc.TLS, pPage uintptr, iFrom TPgno, iTo TPgno, eT
}
if i == nCell {
if libc.Int32FromUint8(eType) != int32(PTRMAP_BTREE) || _sqlite3Get4byte(tls, (*TMemPage)(unsafe.Pointer(pPage)).FaData+uintptr(libc.Int32FromUint8((*TMemPage)(unsafe.Pointer(pPage)).FhdrOffset)+int32(8))) != iFrom {
- return _sqlite3CorruptError(tls, int32(74663))
+ return _sqlite3CorruptError(tls, int32(75438))
}
_sqlite3Put4byte(tls, (*TMemPage)(unsafe.Pointer(pPage)).FaData+uintptr(libc.Int32FromUint8((*TMemPage)(unsafe.Pointer(pPage)).FhdrOffset)+int32(8)), iTo)
}
@@ -49628,7 +49808,7 @@ func _relocatePage(tls *libc.TLS, pBt uintptr, pDbPage uintptr, eType Tu8, iPtrP
iDbPage = (*TMemPage)(unsafe.Pointer(pDbPage)).Fpgno
pPager = (*TBtShared)(unsafe.Pointer(pBt)).FpPager
if iDbPage < uint32(3) {
- return _sqlite3CorruptError(tls, int32(74698))
+ return _sqlite3CorruptError(tls, int32(75473))
}
/* Move page iDbPage from its current location to page number iFreePage */
*(*int32)(unsafe.Pointer(bp + 4)) = _sqlite3PagerMovepage(tls, pPager, (*TMemPage)(unsafe.Pointer(pDbPage)).FpDbPage, iFreePage, isCommit)
@@ -49724,7 +49904,7 @@ func _incrVacuumStep(tls *libc.TLS, pBt uintptr, nFin TPgno, iLastPg TPgno, bCom
return rc
}
if libc.Int32FromUint8(*(*Tu8)(unsafe.Pointer(bp))) == int32(PTRMAP_ROOTPAGE) {
- return _sqlite3CorruptError(tls, int32(74796))
+ return _sqlite3CorruptError(tls, int32(75571))
}
if libc.Int32FromUint8(*(*Tu8)(unsafe.Pointer(bp))) == int32(PTRMAP_FREEPAGE) {
if bCommit == 0 {
@@ -49762,7 +49942,7 @@ func _incrVacuumStep(tls *libc.TLS, pBt uintptr, nFin TPgno, iLastPg TPgno, bCom
_releasePage(tls, *(*uintptr)(unsafe.Pointer(bp + 24)))
if *(*TPgno)(unsafe.Pointer(bp + 16)) > dbSize {
_releasePage(tls, *(*uintptr)(unsafe.Pointer(bp + 20)))
- return _sqlite3CorruptError(tls, int32(74848))
+ return _sqlite3CorruptError(tls, int32(75623))
}
}
rc = _relocatePage(tls, pBt, *(*uintptr)(unsafe.Pointer(bp + 20)), *(*Tu8)(unsafe.Pointer(bp)), *(*TPgno)(unsafe.Pointer(bp + 4)), *(*TPgno)(unsafe.Pointer(bp + 16)), bCommit)
@@ -49829,7 +50009,7 @@ func _sqlite3BtreeIncrVacuum(tls *libc.TLS, p uintptr) (r int32) {
nFree = _sqlite3Get4byte(tls, (*TMemPage)(unsafe.Pointer((*TBtShared)(unsafe.Pointer(pBt)).FpPage1)).FaData+36)
nFin = _finalDbSize(tls, pBt, nOrig, nFree)
if nOrig < nFin || nFree >= nOrig {
- rc = _sqlite3CorruptError(tls, int32(74916))
+ rc = _sqlite3CorruptError(tls, int32(75691))
} else {
if nFree > uint32(0) {
rc = _saveAllCursors(tls, pBt, uint32(0), uintptr(0))
@@ -49872,7 +50052,7 @@ func _autoVacuumCommit(tls *libc.TLS, p uintptr) (r int32) {
** is either a pointer-map page or the pending-byte page. If one
** is encountered, this indicates corruption.
*/
- return _sqlite3CorruptError(tls, int32(74967))
+ return _sqlite3CorruptError(tls, int32(75742))
}
nFree = _sqlite3Get4byte(tls, (*TMemPage)(unsafe.Pointer((*TBtShared)(unsafe.Pointer(pBt)).FpPage1)).FaData+36)
db = (*TBtree)(unsafe.Pointer(p)).Fdb
@@ -49902,7 +50082,7 @@ func _autoVacuumCommit(tls *libc.TLS, p uintptr) (r int32) {
}
nFin = _finalDbSize(tls, pBt, nOrig, nVac)
if nFin > nOrig {
- return _sqlite3CorruptError(tls, int32(74994))
+ return _sqlite3CorruptError(tls, int32(75769))
}
if nFin < nOrig {
rc = _saveAllCursors(tls, pBt, uint32(0), uintptr(0))
@@ -50368,7 +50548,7 @@ func _btreeCursor(tls *libc.TLS, p uintptr, iTable TPgno, wrFlag int32, pKeyInfo
/* Assert that the caller has opened the required transaction. */
if iTable <= uint32(1) {
if iTable < uint32(1) {
- return _sqlite3CorruptError(tls, int32(75458))
+ return _sqlite3CorruptError(tls, int32(76233))
} else {
if _btreePagecount(tls, pBt) == uint32(0) {
iTable = uint32(0)
@@ -50760,7 +50940,7 @@ func _accessPayload(tls *libc.TLS, pCur uintptr, offset Tu32, amt Tu32, pBuf uin
pBt = (*TBtCursor)(unsafe.Pointer(pCur)).FpBt /* Btree this cursor belongs to */
pBufStart = pBuf /* Start of original out buffer */
if libc.Int32FromUint16((*TBtCursor)(unsafe.Pointer(pCur)).Fix) >= libc.Int32FromUint16((*TMemPage)(unsafe.Pointer(pPage)).FnCell) {
- return _sqlite3CorruptError(tls, int32(75882))
+ return _sqlite3CorruptError(tls, int32(76657))
}
_getCellInfo(tls, pCur)
aPayload = (*TBtCursor)(unsafe.Pointer(pCur)).Finfo.FpPayload
@@ -50770,7 +50950,7 @@ func _accessPayload(tls *libc.TLS, pCur uintptr, offset Tu32, amt Tu32, pBuf uin
** &aPayload[pCur->info.nLocal] > &pPage->aData[pBt->usableSize]
** but is recast into its current form to avoid integer overflow problems
*/
- return _sqlite3CorruptError(tls, int32(75897))
+ return _sqlite3CorruptError(tls, int32(76672))
}
/* Check if data must be read/written to/from the btree page itself. */
if offset < uint32((*TBtCursor)(unsafe.Pointer(pCur)).Finfo.FnLocal) {
@@ -50827,7 +51007,7 @@ func _accessPayload(tls *libc.TLS, pCur uintptr, offset Tu32, amt Tu32, pBuf uin
for *(*TPgno)(unsafe.Pointer(bp)) != 0 {
/* If required, populate the overflow page-list cache. */
if *(*TPgno)(unsafe.Pointer(bp)) > (*TBtShared)(unsafe.Pointer(pBt)).FnPage {
- return _sqlite3CorruptError(tls, int32(75968))
+ return _sqlite3CorruptError(tls, int32(76743))
}
*(*TPgno)(unsafe.Pointer((*TBtCursor)(unsafe.Pointer(pCur)).FaOverflow + uintptr(iIdx)*4)) = *(*TPgno)(unsafe.Pointer(bp))
if offset >= ovflSize {
@@ -50901,7 +51081,7 @@ func _accessPayload(tls *libc.TLS, pCur uintptr, offset Tu32, amt Tu32, pBuf uin
}
if rc == SQLITE_OK && amt > uint32(0) {
/* Overflow chain ends prematurely */
- return _sqlite3CorruptError(tls, int32(76052))
+ return _sqlite3CorruptError(tls, int32(76827))
}
return rc
}
@@ -51036,7 +51216,7 @@ func _moveToChild(tls *libc.TLS, pCur uintptr, newPgno Tu32) (r int32) {
var v3, p1 uintptr
_, _, _, _ = rc, v2, v3, p1
if int32((*TBtCursor)(unsafe.Pointer(pCur)).FiPage) >= libc.Int32FromInt32(BTCURSOR_MAX_DEPTH)-libc.Int32FromInt32(1) {
- return _sqlite3CorruptError(tls, int32(76190))
+ return _sqlite3CorruptError(tls, int32(76965))
}
(*TBtCursor)(unsafe.Pointer(pCur)).Finfo.FnSize = uint16(0)
p1 = pCur + 1
@@ -51048,7 +51228,7 @@ func _moveToChild(tls *libc.TLS, pCur uintptr, newPgno Tu32) (r int32) {
rc = _getAndInitPage(tls, (*TBtCursor)(unsafe.Pointer(pCur)).FpBt, newPgno, pCur+108, libc.Int32FromUint8((*TBtCursor)(unsafe.Pointer(pCur)).FcurPagerFlags))
if rc == SQLITE_OK && (libc.Int32FromUint16((*TMemPage)(unsafe.Pointer((*TBtCursor)(unsafe.Pointer(pCur)).FpPage)).FnCell) < int32(1) || libc.Int32FromUint8((*TMemPage)(unsafe.Pointer((*TBtCursor)(unsafe.Pointer(pCur)).FpPage)).FintKey) != libc.Int32FromUint8((*TBtCursor)(unsafe.Pointer(pCur)).FcurIntKey)) {
_releasePage(tls, (*TBtCursor)(unsafe.Pointer(pCur)).FpPage)
- rc = _sqlite3CorruptError(tls, int32(76204))
+ rc = _sqlite3CorruptError(tls, int32(76979))
}
if rc != 0 {
v3 = pCur + 60
@@ -51164,7 +51344,7 @@ func _moveToRoot(tls *libc.TLS, pCur uintptr) (r int32) {
** in such a way that page pRoot is linked into a second b-tree table
** (or the freelist). */
if libc.Int32FromUint8((*TMemPage)(unsafe.Pointer(pRoot)).FisInit) == 0 || libc.BoolInt32((*TBtCursor)(unsafe.Pointer(pCur)).FpKeyInfo == uintptr(0)) != libc.Int32FromUint8((*TMemPage)(unsafe.Pointer(pRoot)).FintKey) {
- return _sqlite3CorruptError(tls, int32(76339))
+ return _sqlite3CorruptError(tls, int32(77114))
}
goto skip_init
skip_init:
@@ -51178,7 +51358,7 @@ skip_init:
} else {
if !((*TMemPage)(unsafe.Pointer(pRoot)).Fleaf != 0) {
if (*TMemPage)(unsafe.Pointer(pRoot)).Fpgno != uint32(1) {
- return _sqlite3CorruptError(tls, int32(76351))
+ return _sqlite3CorruptError(tls, int32(77126))
}
subpage = _sqlite3Get4byte(tls, (*TMemPage)(unsafe.Pointer(pRoot)).FaData+uintptr(libc.Int32FromUint8((*TMemPage)(unsafe.Pointer(pRoot)).FhdrOffset)+int32(8)))
(*TBtCursor)(unsafe.Pointer(pCur)).FeState = uint8(CURSOR_VALID)
@@ -51412,7 +51592,7 @@ func _sqlite3BtreeTableMoveto(tls *libc.TLS, pCur uintptr, intKey Ti64, biasRigh
break
}
if pCell >= (*TMemPage)(unsafe.Pointer(pPage)).FaDataEnd {
- return _sqlite3CorruptError(tls, int32(76600))
+ return _sqlite3CorruptError(tls, int32(77375))
}
}
}
@@ -51616,7 +51796,7 @@ func _sqlite3BtreeIndexMoveto(tls *libc.TLS, pCur uintptr, pIdxKey uintptr, pRes
p3 = pCur + 1
*(*Tu8)(unsafe.Pointer(p3)) = Tu8(int32(*(*Tu8)(unsafe.Pointer(p3))) & ^(libc.Int32FromInt32(BTCF_ValidOvfl) | libc.Int32FromInt32(BTCF_AtLast)))
if !((*TMemPage)(unsafe.Pointer((*TBtCursor)(unsafe.Pointer(pCur)).FpPage)).FisInit != 0) {
- return _sqlite3CorruptError(tls, int32(76796))
+ return _sqlite3CorruptError(tls, int32(77571))
}
goto bypass_moveto_root /* Start search on the current page */
}
@@ -51679,10 +51859,10 @@ bypass_moveto_root:
/* Invalid key size: 0x80 0x80 0x01 */
/* Minimum legal index key size */
if nCell < int32(2) || libc.Uint32FromInt32(nCell)/(*TBtShared)(unsafe.Pointer((*TBtCursor)(unsafe.Pointer(pCur)).FpBt)).FusableSize > (*TBtShared)(unsafe.Pointer((*TBtCursor)(unsafe.Pointer(pCur)).FpBt)).FnPage {
- rc = _sqlite3CorruptError(tls, int32(76883))
+ rc = _sqlite3CorruptError(tls, int32(77658))
goto moveto_index_finish
}
- pCellKey = _sqlite3Malloc(tls, libc.Uint64FromInt32(nCell+nOverrun))
+ pCellKey = _sqlite3Malloc(tls, libc.Uint64FromInt32(nCell)+libc.Uint64FromInt32(nOverrun))
if pCellKey == uintptr(0) {
rc = int32(SQLITE_NOMEM)
goto moveto_index_finish
@@ -51710,7 +51890,7 @@ bypass_moveto_root:
rc = SQLITE_OK
(*TBtCursor)(unsafe.Pointer(pCur)).Fix = libc.Uint16FromInt32(idx)
if (*TUnpackedRecord)(unsafe.Pointer(pIdxKey)).FerrCode != 0 {
- rc = _sqlite3CorruptError(tls, int32(76915))
+ rc = _sqlite3CorruptError(tls, int32(77690))
}
goto moveto_index_finish
}
@@ -51743,7 +51923,7 @@ bypass_moveto_root:
p9 = pCur + 1
*(*Tu8)(unsafe.Pointer(p9)) = Tu8(int32(*(*Tu8)(unsafe.Pointer(p9))) & ^(libc.Int32FromInt32(BTCF_ValidNKey) | libc.Int32FromInt32(BTCF_ValidOvfl)))
if int32((*TBtCursor)(unsafe.Pointer(pCur)).FiPage) >= libc.Int32FromInt32(BTCURSOR_MAX_DEPTH)-libc.Int32FromInt32(1) {
- return _sqlite3CorruptError(tls, int32(76946))
+ return _sqlite3CorruptError(tls, int32(77721))
}
*(*Tu16)(unsafe.Pointer(pCur + 64 + uintptr((*TBtCursor)(unsafe.Pointer(pCur)).FiPage)*2)) = libc.Uint16FromInt32(lwr)
*(*uintptr)(unsafe.Pointer(pCur + 112 + uintptr((*TBtCursor)(unsafe.Pointer(pCur)).FiPage)*4)) = (*TBtCursor)(unsafe.Pointer(pCur)).FpPage
@@ -51752,7 +51932,7 @@ bypass_moveto_root:
rc = _getAndInitPage(tls, (*TBtCursor)(unsafe.Pointer(pCur)).FpBt, chldPg, pCur+108, libc.Int32FromUint8((*TBtCursor)(unsafe.Pointer(pCur)).FcurPagerFlags))
if rc == SQLITE_OK && (libc.Int32FromUint16((*TMemPage)(unsafe.Pointer((*TBtCursor)(unsafe.Pointer(pCur)).FpPage)).FnCell) < int32(1) || libc.Int32FromUint8((*TMemPage)(unsafe.Pointer((*TBtCursor)(unsafe.Pointer(pCur)).FpPage)).FintKey) != libc.Int32FromUint8((*TBtCursor)(unsafe.Pointer(pCur)).FcurIntKey)) {
_releasePage(tls, (*TBtCursor)(unsafe.Pointer(pCur)).FpPage)
- rc = _sqlite3CorruptError(tls, int32(76957))
+ rc = _sqlite3CorruptError(tls, int32(77732))
}
if rc != 0 {
v11 = pCur + 60
@@ -51881,7 +52061,7 @@ func _btreeNext(tls *libc.TLS, pCur uintptr) (r int32) {
(*TMemPage)(unsafe.Pointer(pPage)).FisInit = uint8(0)
}
if !((*TMemPage)(unsafe.Pointer(pPage)).FisInit != 0) {
- return _sqlite3CorruptError(tls, int32(77058))
+ return _sqlite3CorruptError(tls, int32(77833))
}
if idx >= libc.Int32FromUint16((*TMemPage)(unsafe.Pointer(pPage)).FnCell) {
if !((*TMemPage)(unsafe.Pointer(pPage)).Fleaf != 0) {
@@ -51991,7 +52171,7 @@ func _btreePrevious(tls *libc.TLS, pCur uintptr) (r int32) {
(*TMemPage)(unsafe.Pointer(pPage)).FisInit = uint8(0)
}
if !((*TMemPage)(unsafe.Pointer(pPage)).FisInit != 0) {
- return _sqlite3CorruptError(tls, int32(77151))
+ return _sqlite3CorruptError(tls, int32(77926))
}
if !((*TMemPage)(unsafe.Pointer(pPage)).Fleaf != 0) {
idx = libc.Int32FromUint16((*TBtCursor)(unsafe.Pointer(pCur)).Fix)
@@ -52079,7 +52259,7 @@ func _allocateBtreePage(tls *libc.TLS, pBt uintptr, ppPage uintptr, pPgno uintpt
** stores the total number of pages on the freelist. */
n = _sqlite3Get4byte(tls, (*TMemPage)(unsafe.Pointer(pPage1)).FaData+36)
if n >= mxPage {
- return _sqlite3CorruptError(tls, int32(77241))
+ return _sqlite3CorruptError(tls, int32(78016))
}
if n > uint32(0) {
searchList = uint8(0) /* If the free-list must be searched for 'nearby' */
@@ -52134,7 +52314,7 @@ func _allocateBtreePage(tls *libc.TLS, pBt uintptr, ppPage uintptr, pPgno uintpt
nSearch++
}
if v2 || v1 > n {
- rc = _sqlite3CorruptError(tls, int32(77297))
+ rc = _sqlite3CorruptError(tls, int32(78072))
} else {
rc = _btreeGetUnusedPage(tls, pBt, iTrunk, bp, 0)
}
@@ -52160,7 +52340,7 @@ func _allocateBtreePage(tls *libc.TLS, pBt uintptr, ppPage uintptr, pPgno uintpt
} else {
if k > (*TBtShared)(unsafe.Pointer(pBt)).FusableSize/libc.Uint32FromInt32(4)-libc.Uint32FromInt32(2) {
/* Value of k is out of range. Database corruption */
- rc = _sqlite3CorruptError(tls, int32(77326))
+ rc = _sqlite3CorruptError(tls, int32(78101))
goto end_allocate_page
} else {
if searchList != 0 && (nearby == iTrunk || iTrunk < nearby && libc.Int32FromUint8(eMode) == int32(BTALLOC_LE)) {
@@ -52187,7 +52367,7 @@ func _allocateBtreePage(tls *libc.TLS, pBt uintptr, ppPage uintptr, pPgno uintpt
} else {
iNewTrunk = _sqlite3Get4byte(tls, (*TMemPage)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp)))).FaData+8)
if iNewTrunk > mxPage {
- rc = _sqlite3CorruptError(tls, int32(77360))
+ rc = _sqlite3CorruptError(tls, int32(78135))
goto end_allocate_page
}
rc = _btreeGetUnusedPage(tls, pBt, iNewTrunk, bp+8, 0)
@@ -52258,7 +52438,7 @@ func _allocateBtreePage(tls *libc.TLS, pBt uintptr, ppPage uintptr, pPgno uintpt
}
iPage = _sqlite3Get4byte(tls, aData+uintptr(uint32(8)+closest*uint32(4)))
if iPage > mxPage || iPage < uint32(2) {
- rc = _sqlite3CorruptError(tls, int32(77425))
+ rc = _sqlite3CorruptError(tls, int32(78200))
goto end_allocate_page
}
if !(searchList != 0) || (iPage == nearby || iPage < nearby && libc.Int32FromUint8(eMode) == int32(BTALLOC_LE)) {
@@ -52396,7 +52576,7 @@ func _freePage2(tls *libc.TLS, pBt uintptr, pMemPage uintptr, iPage TPgno) (r in
iTrunk = uint32(0) /* Page number of free-list trunk page */
pPage1 = (*TBtShared)(unsafe.Pointer(pBt)).FpPage1 /* Initial number of pages on free-list */
if iPage < uint32(2) || iPage > (*TBtShared)(unsafe.Pointer(pBt)).FnPage {
- return _sqlite3CorruptError(tls, int32(77552))
+ return _sqlite3CorruptError(tls, int32(78327))
}
if pMemPage != 0 {
*(*uintptr)(unsafe.Pointer(bp + 4)) = pMemPage
@@ -52447,7 +52627,7 @@ func _freePage2(tls *libc.TLS, pBt uintptr, pMemPage uintptr, iPage TPgno) (r in
if nFree != uint32(0) { /* Initial number of leaf cells on trunk page */
iTrunk = _sqlite3Get4byte(tls, (*TMemPage)(unsafe.Pointer(pPage1)).FaData+32)
if iTrunk > _btreePagecount(tls, pBt) {
- *(*int32)(unsafe.Pointer(bp + 8)) = _sqlite3CorruptError(tls, int32(77599))
+ *(*int32)(unsafe.Pointer(bp + 8)) = _sqlite3CorruptError(tls, int32(78374))
goto freepage_out
}
*(*int32)(unsafe.Pointer(bp + 8)) = _btreeGetPage(tls, pBt, iTrunk, bp, 0)
@@ -52456,7 +52636,7 @@ func _freePage2(tls *libc.TLS, pBt uintptr, pMemPage uintptr, iPage TPgno) (r in
}
nLeaf = _sqlite3Get4byte(tls, (*TMemPage)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp)))).FaData+4)
if nLeaf > (*TBtShared)(unsafe.Pointer(pBt)).FusableSize/uint32(4)-uint32(2) {
- *(*int32)(unsafe.Pointer(bp + 8)) = _sqlite3CorruptError(tls, int32(77610))
+ *(*int32)(unsafe.Pointer(bp + 8)) = _sqlite3CorruptError(tls, int32(78385))
goto freepage_out
}
if nLeaf < (*TBtShared)(unsafe.Pointer(pBt)).FusableSize/uint32(4)-uint32(8) {
@@ -52546,7 +52726,7 @@ func _clearCellOverflow(tls *libc.TLS, pPage uintptr, pCell uintptr, pInfo uintp
_, _, _, _, _, _, _, _ = nOvfl, ovflPageSize, ovflPgno, pBt, rc, v1, v2, v3
if pCell+uintptr((*TCellInfo)(unsafe.Pointer(pInfo)).FnSize) > (*TMemPage)(unsafe.Pointer(pPage)).FaDataEnd {
/* Cell extends past end of page */
- return _sqlite3CorruptError(tls, int32(77699))
+ return _sqlite3CorruptError(tls, int32(78474))
}
ovflPgno = _sqlite3Get4byte(tls, pCell+uintptr((*TCellInfo)(unsafe.Pointer(pInfo)).FnSize)-uintptr(4))
pBt = (*TMemPage)(unsafe.Pointer(pPage)).FpBt
@@ -52564,7 +52744,7 @@ func _clearCellOverflow(tls *libc.TLS, pPage uintptr, pCell uintptr, pInfo uintp
/* 0 is not a legal page number and page 1 cannot be an
** overflow page. Therefore if ovflPgno<2 or past the end of the
** file the database must be corrupt. */
- return _sqlite3CorruptError(tls, int32(77716))
+ return _sqlite3CorruptError(tls, int32(78491))
}
if nOvfl != 0 {
rc = _getOverflowPage(tls, pBt, ovflPgno, bp+4, bp)
@@ -52587,7 +52767,7 @@ func _clearCellOverflow(tls *libc.TLS, pPage uintptr, pCell uintptr, pInfo uintp
** caller is iterating through or using in some other way, this
** can be problematic.
*/
- rc = _sqlite3CorruptError(tls, int32(77736))
+ rc = _sqlite3CorruptError(tls, int32(78511))
} else {
rc = _freePage2(tls, pBt, *(*uintptr)(unsafe.Pointer(bp + 4)), ovflPgno)
}
@@ -52808,10 +52988,10 @@ func _dropCell(tls *libc.TLS, pPage uintptr, idx int32, sz int32, pRC uintptr) {
pc = libc.Uint32FromInt32(libc.Int32FromUint8(*(*Tu8)(unsafe.Pointer(ptr)))<<libc.Int32FromInt32(8) | libc.Int32FromUint8(*(*Tu8)(unsafe.Pointer(ptr + 1))))
hdr = libc.Int32FromUint8((*TMemPage)(unsafe.Pointer(pPage)).FhdrOffset)
if pc+libc.Uint32FromInt32(sz) > (*TBtShared)(unsafe.Pointer((*TMemPage)(unsafe.Pointer(pPage)).FpBt)).FusableSize {
- *(*int32)(unsafe.Pointer(pRC)) = _sqlite3CorruptError(tls, int32(77992))
+ *(*int32)(unsafe.Pointer(pRC)) = _sqlite3CorruptError(tls, int32(78767))
return
}
- rc = _freeSpace(tls, pPage, uint16(pc), libc.Uint16FromInt32(sz))
+ rc = _freeSpace(tls, pPage, libc.Int32FromUint32(pc), sz)
if rc != 0 {
*(*int32)(unsafe.Pointer(pRC)) = rc
return
@@ -53202,12 +53382,12 @@ func _rebuildPage(tls *libc.TLS, pCArray uintptr, iFirst int32, nCell int32, pPg
sz = *(*Tu16)(unsafe.Pointer((*TCellArray)(unsafe.Pointer(pCArray)).FszCell + uintptr(i)*2))
if uint32(pCell) >= uint32(aData+uintptr(j)) && uint32(pCell) < uint32(pEnd) {
if uint32(pCell+uintptr(sz)) > uint32(pEnd) {
- return _sqlite3CorruptError(tls, int32(78382))
+ return _sqlite3CorruptError(tls, int32(79157))
}
pCell = pTmp + uintptr(int32(pCell)-int32(aData))
} else {
if uint32(pCell+uintptr(sz)) > uint32(pSrcEnd) && uint32(pCell) < uint32(pSrcEnd) {
- return _sqlite3CorruptError(tls, int32(78387))
+ return _sqlite3CorruptError(tls, int32(79162))
}
}
pData -= uintptr(sz)
@@ -53215,7 +53395,7 @@ func _rebuildPage(tls *libc.TLS, pCArray uintptr, iFirst int32, nCell int32, pPg
*(*Tu8)(unsafe.Pointer(pCellptr + 1)) = libc.Uint8FromInt32(int32(pData) - int32(aData))
pCellptr += uintptr(2)
if pData < pCellptr {
- return _sqlite3CorruptError(tls, int32(78393))
+ return _sqlite3CorruptError(tls, int32(79168))
}
libc.Xmemmove(tls, pData, pCell, uint32(sz))
i++
@@ -53310,7 +53490,7 @@ func _pageInsertArray(tls *libc.TLS, pPg uintptr, pBegin uintptr, ppData uintptr
** database. But they might for a corrupt database. Hence use memmove()
** since memcpy() sends SIGABORT with overlapping buffers on OpenBSD */
if uint32(*(*uintptr)(unsafe.Pointer((*TCellArray)(unsafe.Pointer(pCArray)).FapCell + uintptr(i)*4))+uintptr(sz)) > uint32(pEnd) && uint32(*(*uintptr)(unsafe.Pointer((*TCellArray)(unsafe.Pointer(pCArray)).FapCell + uintptr(i)*4))) < uint32(pEnd) {
- _sqlite3CorruptError(tls, int32(78479))
+ _sqlite3CorruptError(tls, int32(79255))
return int32(1)
}
libc.Xmemmove(tls, pSlot, *(*uintptr)(unsafe.Pointer((*TCellArray)(unsafe.Pointer(pCArray)).FapCell + uintptr(i)*4)), libc.Uint32FromInt32(sz))
@@ -53391,7 +53571,7 @@ func _pageFreeArray(tls *libc.TLS, pPg uintptr, iFirst int32, nCell int32, pCArr
if !(j < nFree) {
break
}
- _freeSpace(tls, pPg, libc.Uint16FromInt32(aOfst[j]), libc.Uint16FromInt32(aAfter[j]-aOfst[j]))
+ _freeSpace(tls, pPg, aOfst[j], aAfter[j]-aOfst[j])
goto _3
_3:
;
@@ -53418,7 +53598,7 @@ func _pageFreeArray(tls *libc.TLS, pPg uintptr, iFirst int32, nCell int32, pCArr
if !(j < nFree) {
break
}
- _freeSpace(tls, pPg, libc.Uint16FromInt32(aOfst[j]), libc.Uint16FromInt32(aAfter[j]-aOfst[j]))
+ _freeSpace(tls, pPg, aOfst[j], aAfter[j]-aOfst[j])
goto _4
_4:
;
@@ -53458,7 +53638,7 @@ func _editPage(tls *libc.TLS, pPg uintptr, iOld int32, iNew int32, nNew int32, p
if iOld < iNew {
nShift = _pageFreeArray(tls, pPg, iOld, iNew-iOld, pCArray)
if nShift > nCell {
- return _sqlite3CorruptError(tls, int32(78601))
+ return _sqlite3CorruptError(tls, int32(79377))
}
libc.Xmemmove(tls, (*TMemPage)(unsafe.Pointer(pPg)).FaCellIdx, (*TMemPage)(unsafe.Pointer(pPg)).FaCellIdx+uintptr(nShift*int32(2)), libc.Uint32FromInt32(nCell*int32(2)))
nCell -= nShift
@@ -53529,7 +53709,7 @@ editpage_fail:
;
/* Unable to edit this page. Rebuild it from scratch instead. */
if nNew < int32(1) {
- return _sqlite3CorruptError(tls, int32(78675))
+ return _sqlite3CorruptError(tls, int32(79455))
}
_populateCellCache(tls, pCArray, iNew, nNew)
return _rebuildPage(tls, pCArray, iNew, nNew, pPg)
@@ -53574,7 +53754,7 @@ func _balance_quick(tls *libc.TLS, pParent uintptr, pPage uintptr, pSpace uintpt
_, _, _, _, _, _, _ = pBt, pOut, pStop, v1, v2, v3, v4
pBt = (*TMemPage)(unsafe.Pointer(pPage)).FpBt /* Page number of pNew */
if libc.Int32FromUint16((*TMemPage)(unsafe.Pointer(pPage)).FnCell) == 0 {
- return _sqlite3CorruptError(tls, int32(78715))
+ return _sqlite3CorruptError(tls, int32(79495))
} /* dbfuzz001.test */
/* Allocate a new page. This page will become the right-sibling of
** pPage. Make the parent page writable, so that the new divider cell
@@ -53770,10 +53950,11 @@ func _balance_nonroot(tls *libc.TLS, pParent uintptr, iParentIdx int32, aOvflSpa
var aPgno [5]TPgno
var apDiv [2]uintptr
var cntNew, cntOld [5]int32
- var cntOldNext, d, i, iB, iNew, iNew1, iOff, iOld, iOld1, iOvflSpace, iPg, iSpace1, j, k, leafData, limit, nMaxCells, nNew, nNewCell, nOld, nxDiv, pageFlags, r, sz1, sz2, szD, szLeft, szR, szRight, szScratch, usableSpace, v1, v10, v12, v15, v26, v30, v31, v32, v5, v7 int32
+ var cntOldNext, d, i, iB, iNew, iNew1, iOff, iOld, iOld1, iOvflSpace, iPg, iSpace1, j, k, leafData, limit, nMaxCells, nNew, nNewCell, nOld, nxDiv, pageFlags, r, sz1, sz2, szD, szLeft, szR, szRight, usableSpace, v1, v10, v12, v15, v26, v30, v31, v32, v5, v7 int32
var fgA, fgB, leafCorrection, maskPage, sz Tu16
var key Tu32
var pgnoA, pgnoB, pgnoTemp TPgno
+ var szScratch Tu64
var v13, v14 bool
var v18 uint32
var _ /* abDone at bp+60 */ [5]Tu8
@@ -53896,8 +54077,8 @@ func _balance_nonroot(tls *libc.TLS, pParent uintptr, iParentIdx int32, aOvflSpa
/*
** Allocate space for memory structures
*/
- szScratch = libc.Int32FromUint32(libc.Uint32FromInt32(nMaxCells)*uint32(4) + libc.Uint32FromInt32(nMaxCells)*uint32(2) + (*TBtShared)(unsafe.Pointer(pBt)).FpageSize) /* aSpace1 */
- (*(*TCellArray)(unsafe.Pointer(bp + 68))).FapCell = _sqlite3DbMallocRaw(tls, uintptr(0), libc.Uint64FromInt32(szScratch))
+ szScratch = uint64(libc.Uint32FromInt32(nMaxCells)*uint32(4) + libc.Uint32FromInt32(nMaxCells)*uint32(2) + (*TBtShared)(unsafe.Pointer(pBt)).FpageSize) /* aSpace1 */
+ (*(*TCellArray)(unsafe.Pointer(bp + 68))).FapCell = _sqlite3DbMallocRaw(tls, uintptr(0), szScratch)
if (*(*TCellArray)(unsafe.Pointer(bp + 68))).FapCell == uintptr(0) {
*(*int32)(unsafe.Pointer(bp)) = int32(SQLITE_NOMEM)
goto balance_cleanup
@@ -53937,7 +54118,7 @@ func _balance_nonroot(tls *libc.TLS, pParent uintptr, iParentIdx int32, aOvflSpa
** table-interior, index-leaf, or index-interior).
*/
if libc.Int32FromUint8(*(*Tu8)(unsafe.Pointer((*TMemPage)(unsafe.Pointer(pOld)).FaData))) != libc.Int32FromUint8(*(*Tu8)(unsafe.Pointer((*TMemPage)(unsafe.Pointer((*(*[3]uintptr)(unsafe.Pointer(bp + 4)))[0])).FaData))) {
- *(*int32)(unsafe.Pointer(bp)) = _sqlite3CorruptError(tls, int32(79139))
+ *(*int32)(unsafe.Pointer(bp)) = _sqlite3CorruptError(tls, int32(79919))
goto balance_cleanup
}
/* Load b.apCell[] with pointers to all cells in pOld. If pOld
@@ -53960,7 +54141,7 @@ func _balance_nonroot(tls *libc.TLS, pParent uintptr, iParentIdx int32, aOvflSpa
libc.Xmemset(tls, (*(*TCellArray)(unsafe.Pointer(bp + 68))).FszCell+uintptr((*(*TCellArray)(unsafe.Pointer(bp + 68))).FnCell)*2, 0, uint32(2)*libc.Uint32FromInt32(limit+libc.Int32FromUint8((*TMemPage)(unsafe.Pointer(pOld)).FnOverflow)))
if libc.Int32FromUint8((*TMemPage)(unsafe.Pointer(pOld)).FnOverflow) > 0 {
if limit < libc.Int32FromUint16(*(*Tu16)(unsafe.Pointer(pOld + 28))) {
- *(*int32)(unsafe.Pointer(bp)) = _sqlite3CorruptError(tls, int32(79163))
+ *(*int32)(unsafe.Pointer(bp)) = _sqlite3CorruptError(tls, int32(79943))
goto balance_cleanup
}
limit = libc.Int32FromUint16(*(*Tu16)(unsafe.Pointer(pOld + 28)))
@@ -54091,7 +54272,7 @@ func _balance_nonroot(tls *libc.TLS, pParent uintptr, iParentIdx int32, aOvflSpa
if i+int32(1) >= k {
k = i + int32(2)
if k > libc.Int32FromInt32(NB)+libc.Int32FromInt32(2) {
- *(*int32)(unsafe.Pointer(bp)) = _sqlite3CorruptError(tls, int32(79264))
+ *(*int32)(unsafe.Pointer(bp)) = _sqlite3CorruptError(tls, int32(80044))
goto balance_cleanup
}
(*(*[5]int32)(unsafe.Pointer(bp + 36)))[k-int32(1)] = 0
@@ -54134,7 +54315,7 @@ func _balance_nonroot(tls *libc.TLS, pParent uintptr, iParentIdx int32, aOvflSpa
v10 = 0
}
if cntNew[i] <= v10 {
- *(*int32)(unsafe.Pointer(bp)) = _sqlite3CorruptError(tls, int32(79297))
+ *(*int32)(unsafe.Pointer(bp)) = _sqlite3CorruptError(tls, int32(80077))
goto balance_cleanup
}
}
@@ -54193,7 +54374,7 @@ func _balance_nonroot(tls *libc.TLS, pParent uintptr, iParentIdx int32, aOvflSpa
v15 = 0
}
if cntNew[i-int32(1)] <= v15 {
- *(*int32)(unsafe.Pointer(bp)) = _sqlite3CorruptError(tls, int32(79341))
+ *(*int32)(unsafe.Pointer(bp)) = _sqlite3CorruptError(tls, int32(80121))
goto balance_cleanup
}
goto _11
@@ -54225,7 +54406,7 @@ func _balance_nonroot(tls *libc.TLS, pParent uintptr, iParentIdx int32, aOvflSpa
*(*int32)(unsafe.Pointer(bp)) = _sqlite3PagerWrite(tls, (*TMemPage)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 132)))).FpDbPage)
nNew++
if _sqlite3PagerPageRefcount(tls, (*TMemPage)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 132)))).FpDbPage) != int32(1)+libc.BoolInt32(i == iParentIdx-nxDiv) && *(*int32)(unsafe.Pointer(bp)) == SQLITE_OK {
- *(*int32)(unsafe.Pointer(bp)) = _sqlite3CorruptError(tls, int32(79374))
+ *(*int32)(unsafe.Pointer(bp)) = _sqlite3CorruptError(tls, int32(80154))
}
if *(*int32)(unsafe.Pointer(bp)) != 0 {
goto balance_cleanup
@@ -54455,7 +54636,7 @@ func _balance_nonroot(tls *libc.TLS, pParent uintptr, iParentIdx int32, aOvflSpa
}
pSrcEnd = *(*uintptr)(unsafe.Pointer(bp + 68 + 16 + uintptr(k)*4))
if uint32(pCell1) < uint32(pSrcEnd) && uint32(pCell1+uintptr(sz2)) > uint32(pSrcEnd) {
- *(*int32)(unsafe.Pointer(bp)) = _sqlite3CorruptError(tls, int32(79575))
+ *(*int32)(unsafe.Pointer(bp)) = _sqlite3CorruptError(tls, int32(80355))
goto balance_cleanup
}
*(*int32)(unsafe.Pointer(bp)) = _insertCell(tls, pParent, nxDiv+i, pCell1, sz2, pTemp1, (*TMemPage)(unsafe.Pointer(pNew2)).Fpgno)
@@ -54701,7 +54882,7 @@ func _anotherValidCursor(tls *libc.TLS, pCur uintptr) (r int32) {
break
}
if pOther != pCur && libc.Int32FromUint8((*TBtCursor)(unsafe.Pointer(pOther)).FeState) == CURSOR_VALID && (*TBtCursor)(unsafe.Pointer(pOther)).FpPage == (*TBtCursor)(unsafe.Pointer(pCur)).FpPage {
- return _sqlite3CorruptError(tls, int32(79807))
+ return _sqlite3CorruptError(tls, int32(80587))
}
goto _1
_1:
@@ -54774,7 +54955,7 @@ func _balance(tls *libc.TLS, pCur uintptr) (r int32) {
/* The page being written is not a root page, and there is currently
** more than one reference to it. This only happens if the page is one
** of its own ancestor pages. Corruption. */
- rc = _sqlite3CorruptError(tls, int32(79867))
+ rc = _sqlite3CorruptError(tls, int32(80647))
} else {
pParent = *(*uintptr)(unsafe.Pointer(pCur + 112 + uintptr(iPage-int32(1))*4))
iIdx = libc.Int32FromUint16(*(*Tu16)(unsafe.Pointer(pCur + 64 + uintptr(iPage-int32(1))*2)))
@@ -54933,7 +55114,7 @@ func _btreeOverwriteOverflowCell(tls *libc.TLS, pCur uintptr, pX uintptr) (r int
return rc
}
if _sqlite3PagerPageRefcount(tls, (*TMemPage)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp)))).FpDbPage) != int32(1) || (*TMemPage)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp)))).FisInit != 0 {
- rc = _sqlite3CorruptError(tls, int32(80031))
+ rc = _sqlite3CorruptError(tls, int32(80811))
} else {
if libc.Uint32FromInt32(iOffset)+ovflPageSize < libc.Uint32FromInt32(nTotal) {
ovflPgno = _sqlite3Get4byte(tls, (*TMemPage)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp)))).FaData)
@@ -54964,7 +55145,7 @@ func _btreeOverwriteCell(tls *libc.TLS, pCur uintptr, pX uintptr) (r int32) {
nTotal = (*TBtreePayload)(unsafe.Pointer(pX)).FnData + (*TBtreePayload)(unsafe.Pointer(pX)).FnZero /* Total bytes of to write */
pPage = (*TBtCursor)(unsafe.Pointer(pCur)).FpPage /* Page being written */
if (*TBtCursor)(unsafe.Pointer(pCur)).Finfo.FpPayload+uintptr((*TBtCursor)(unsafe.Pointer(pCur)).Finfo.FnLocal) > (*TMemPage)(unsafe.Pointer(pPage)).FaDataEnd || (*TBtCursor)(unsafe.Pointer(pCur)).Finfo.FpPayload < (*TMemPage)(unsafe.Pointer(pPage)).FaData+uintptr((*TMemPage)(unsafe.Pointer(pPage)).FcellOffset) {
- return _sqlite3CorruptError(tls, int32(80059))
+ return _sqlite3CorruptError(tls, int32(80839))
}
if libc.Int32FromUint16((*TBtCursor)(unsafe.Pointer(pCur)).Finfo.FnLocal) == nTotal {
/* The entire cell is local */
@@ -55049,7 +55230,7 @@ func _sqlite3BtreeInsert(tls *libc.TLS, pCur uintptr, pX uintptr, flags int32, s
** Which can only happen if the SQLITE_NoSchemaError flag was set when
** the schema was loaded. This cannot be asserted though, as a user might
** set the flag, load the schema, and then unset the flag. */
- return _sqlite3CorruptError(tls, int32(80140))
+ return _sqlite3CorruptError(tls, int32(80920))
}
}
/* Ensure that the cursor is not in the CURSOR_FAULT state and that it
@@ -55141,7 +55322,7 @@ func _sqlite3BtreeInsert(tls *libc.TLS, pCur uintptr, pX uintptr, flags int32, s
if (*TMemPage)(unsafe.Pointer(pPage)).FnFree < 0 {
if libc.Int32FromUint8((*TBtCursor)(unsafe.Pointer(pCur)).FeState) > int32(CURSOR_INVALID) {
/* ^^^^^--- due to the moveToRoot() call above */
- *(*int32)(unsafe.Pointer(bp)) = _sqlite3CorruptError(tls, int32(80263))
+ *(*int32)(unsafe.Pointer(bp)) = _sqlite3CorruptError(tls, int32(81043))
} else {
*(*int32)(unsafe.Pointer(bp)) = _btreeComputeFreeSpace(tls, pPage)
}
@@ -55177,7 +55358,7 @@ func _sqlite3BtreeInsert(tls *libc.TLS, pCur uintptr, pX uintptr, flags int32, s
(*TBtCursor)(unsafe.Pointer(pCur)).Finfo.FnSize = uint16(0)
if *(*int32)(unsafe.Pointer(bp + 4)) == 0 {
if idx >= libc.Int32FromUint16((*TMemPage)(unsafe.Pointer(pPage)).FnCell) {
- return _sqlite3CorruptError(tls, int32(80305))
+ return _sqlite3CorruptError(tls, int32(81085))
}
*(*int32)(unsafe.Pointer(bp)) = _sqlite3PagerWrite(tls, (*TMemPage)(unsafe.Pointer(pPage)).FpDbPage)
if *(*int32)(unsafe.Pointer(bp)) != 0 {
@@ -55207,10 +55388,10 @@ func _sqlite3BtreeInsert(tls *libc.TLS, pCur uintptr, pX uintptr, flags int32, s
** necessary to add the PTRMAP_OVERFLOW1 pointer-map entry. */
/* clearCell never fails when nLocal==nPayload */
if oldCell < (*TMemPage)(unsafe.Pointer(pPage)).FaData+uintptr((*TMemPage)(unsafe.Pointer(pPage)).FhdrOffset)+uintptr(10) {
- return _sqlite3CorruptError(tls, int32(80332))
+ return _sqlite3CorruptError(tls, int32(81112))
}
if oldCell+uintptr(*(*int32)(unsafe.Pointer(bp + 8))) > (*TMemPage)(unsafe.Pointer(pPage)).FaDataEnd {
- return _sqlite3CorruptError(tls, int32(80335))
+ return _sqlite3CorruptError(tls, int32(81115))
}
libc.Xmemcpy(tls, oldCell, newCell, libc.Uint32FromInt32(*(*int32)(unsafe.Pointer(bp + 8))))
return SQLITE_OK
@@ -55328,7 +55509,7 @@ func _sqlite3BtreeTransferRow(tls *libc.TLS, pDest uintptr, pSrc uintptr, iKey T
nIn = uint32((*TBtCursor)(unsafe.Pointer(pSrc)).Finfo.FnLocal)
aIn = (*TBtCursor)(unsafe.Pointer(pSrc)).Finfo.FpPayload
if aIn+uintptr(nIn) > (*TMemPage)(unsafe.Pointer((*TBtCursor)(unsafe.Pointer(pSrc)).FpPage)).FaDataEnd {
- return _sqlite3CorruptError(tls, int32(80437))
+ return _sqlite3CorruptError(tls, int32(81217))
}
nRem = (*TBtCursor)(unsafe.Pointer(pSrc)).Finfo.FnPayload
if nIn == nRem && nIn < uint32((*TMemPage)(unsafe.Pointer((*TBtCursor)(unsafe.Pointer(pDest)).FpPage)).FmaxLocal) {
@@ -55343,14 +55524,14 @@ func _sqlite3BtreeTransferRow(tls *libc.TLS, pDest uintptr, pSrc uintptr, iKey T
*(*uintptr)(unsafe.Pointer(bp + 4)) = uintptr(0)
pPageOut = uintptr(0) /* Size of output buffer aOut[] */
nOut = libc.Uint32FromInt32(_btreePayloadToLocal(tls, (*TBtCursor)(unsafe.Pointer(pDest)).FpPage, libc.Int64FromUint32((*TBtCursor)(unsafe.Pointer(pSrc)).Finfo.FnPayload)))
- (*TBtShared)(unsafe.Pointer(pBt)).FnPreformatSize = libc.Int32FromUint32(nOut + libc.Uint32FromInt32(int32(aOut)-int32((*TBtShared)(unsafe.Pointer(pBt)).FpTmpSpace)))
+ (*TBtShared)(unsafe.Pointer(pBt)).FnPreformatSize = libc.Int32FromUint32(nOut) + (int32(aOut) - int32((*TBtShared)(unsafe.Pointer(pBt)).FpTmpSpace))
if nOut < (*TBtCursor)(unsafe.Pointer(pSrc)).Finfo.FnPayload {
pPgnoOut = aOut + uintptr(nOut)
*(*int32)(unsafe.Pointer(pBt + 88)) += int32(4)
}
if nRem > nIn {
if aIn+uintptr(nIn)+uintptr(4) > (*TMemPage)(unsafe.Pointer((*TBtCursor)(unsafe.Pointer(pSrc)).FpPage)).FaDataEnd {
- return _sqlite3CorruptError(tls, int32(80462))
+ return _sqlite3CorruptError(tls, int32(81242))
}
ovflIn = _sqlite3Get4byte(tls, (*TBtCursor)(unsafe.Pointer(pSrc)).Finfo.FpPayload+uintptr(nIn))
}
@@ -55450,21 +55631,21 @@ func _sqlite3BtreeDelete(tls *libc.TLS, pCur uintptr, flags Tu8) (r int32) {
return *(*int32)(unsafe.Pointer(bp))
}
} else {
- return _sqlite3CorruptError(tls, int32(80558))
+ return _sqlite3CorruptError(tls, int32(81338))
}
}
iCellDepth = int32((*TBtCursor)(unsafe.Pointer(pCur)).FiPage)
iCellIdx = libc.Int32FromUint16((*TBtCursor)(unsafe.Pointer(pCur)).Fix)
pPage = (*TBtCursor)(unsafe.Pointer(pCur)).FpPage
if libc.Int32FromUint16((*TMemPage)(unsafe.Pointer(pPage)).FnCell) <= iCellIdx {
- return _sqlite3CorruptError(tls, int32(80567))
+ return _sqlite3CorruptError(tls, int32(81347))
}
pCell = (*TMemPage)(unsafe.Pointer(pPage)).FaData + uintptr(libc.Int32FromUint16((*TMemPage)(unsafe.Pointer(pPage)).FmaskPage)&libc.Int32FromUint16(libc.X__builtin_bswap16(tls, *(*Tu16)(unsafe.Pointer((*TMemPage)(unsafe.Pointer(pPage)).FaCellIdx + uintptr(int32(2)*iCellIdx))))))
if (*TMemPage)(unsafe.Pointer(pPage)).FnFree < 0 && _btreeComputeFreeSpace(tls, pPage) != 0 {
- return _sqlite3CorruptError(tls, int32(80571))
+ return _sqlite3CorruptError(tls, int32(81351))
}
if pCell < (*TMemPage)(unsafe.Pointer(pPage)).FaCellIdx+uintptr((*TMemPage)(unsafe.Pointer(pPage)).FnCell) {
- return _sqlite3CorruptError(tls, int32(80574))
+ return _sqlite3CorruptError(tls, int32(81354))
}
/* If the BTREE_SAVEPOSITION bit is on, then the cursor position must
** be preserved following this delete operation. If the current delete
@@ -55558,7 +55739,7 @@ func _sqlite3BtreeDelete(tls *libc.TLS, pCur uintptr, flags Tu8) (r int32) {
}
pCell = (*TMemPage)(unsafe.Pointer(pLeaf)).FaData + uintptr(libc.Int32FromUint16((*TMemPage)(unsafe.Pointer(pLeaf)).FmaskPage)&libc.Int32FromUint16(libc.X__builtin_bswap16(tls, *(*Tu16)(unsafe.Pointer((*TMemPage)(unsafe.Pointer(pLeaf)).FaCellIdx + uintptr(int32(2)*(libc.Int32FromUint16((*TMemPage)(unsafe.Pointer(pLeaf)).FnCell)-int32(1))))))))
if pCell < (*TMemPage)(unsafe.Pointer(pLeaf)).FaData+4 {
- return _sqlite3CorruptError(tls, int32(80665))
+ return _sqlite3CorruptError(tls, int32(81445))
}
nCell = libc.Int32FromUint16((*(*func(*libc.TLS, uintptr, uintptr) Tu16)(unsafe.Pointer(&struct{ uintptr }{(*TMemPage)(unsafe.Pointer(pLeaf)).FxCellSize})))(tls, pLeaf, pCell))
pTmp = (*TBtShared)(unsafe.Pointer(pBt)).FpTmpSpace
@@ -55668,7 +55849,7 @@ func _btreeCreateTable(tls *libc.TLS, p uintptr, piTable uintptr, createTabFlags
*/
_sqlite3BtreeGetMeta(tls, p, int32(BTREE_LARGEST_ROOT_PAGE), bp+4)
if *(*TPgno)(unsafe.Pointer(bp + 4)) > _btreePagecount(tls, pBt) {
- return _sqlite3CorruptError(tls, int32(80781))
+ return _sqlite3CorruptError(tls, int32(81561))
}
*(*TPgno)(unsafe.Pointer(bp + 4))++
/* The new root-page may not be allocated on a pointer-map page, or the
@@ -55709,7 +55890,7 @@ func _btreeCreateTable(tls *libc.TLS, p uintptr, piTable uintptr, createTabFlags
}
*(*int32)(unsafe.Pointer(bp + 8)) = _ptrmapGet(tls, pBt, *(*TPgno)(unsafe.Pointer(bp + 4)), bp+20, bp+24)
if libc.Int32FromUint8(*(*Tu8)(unsafe.Pointer(bp + 20))) == int32(PTRMAP_ROOTPAGE) || libc.Int32FromUint8(*(*Tu8)(unsafe.Pointer(bp + 20))) == int32(PTRMAP_FREEPAGE) {
- *(*int32)(unsafe.Pointer(bp + 8)) = _sqlite3CorruptError(tls, int32(80829))
+ *(*int32)(unsafe.Pointer(bp + 8)) = _sqlite3CorruptError(tls, int32(81609))
}
if *(*int32)(unsafe.Pointer(bp + 8)) != SQLITE_OK {
_releasePage(tls, *(*uintptr)(unsafe.Pointer(bp)))
@@ -55790,14 +55971,14 @@ func _clearDatabasePage(tls *libc.TLS, pBt uintptr, pgno TPgno, freePageFlag int
var _ /* rc at bp+4 */ int32
_, _, _, _ = hdr, i, pCell, v2
if pgno > _btreePagecount(tls, pBt) {
- return _sqlite3CorruptError(tls, int32(80919))
+ return _sqlite3CorruptError(tls, int32(81699))
}
*(*int32)(unsafe.Pointer(bp + 4)) = _getAndInitPage(tls, pBt, pgno, bp, 0)
if *(*int32)(unsafe.Pointer(bp + 4)) != 0 {
return *(*int32)(unsafe.Pointer(bp + 4))
}
if libc.Int32FromUint8((*TBtShared)(unsafe.Pointer(pBt)).FopenFlags)&int32(BTREE_SINGLE) == 0 && _sqlite3PagerPageRefcount(tls, (*TMemPage)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp)))).FpDbPage) != int32(1)+libc.BoolInt32(pgno == uint32(1)) {
- *(*int32)(unsafe.Pointer(bp + 4)) = _sqlite3CorruptError(tls, int32(80926))
+ *(*int32)(unsafe.Pointer(bp + 4)) = _sqlite3CorruptError(tls, int32(81706))
goto cleardatabasepage_out
}
hdr = libc.Int32FromUint8((*TMemPage)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp)))).FhdrOffset)
@@ -55934,7 +56115,7 @@ func _btreeDropTable(tls *libc.TLS, p uintptr, iTable TPgno, piMoved uintptr) (r
*(*uintptr)(unsafe.Pointer(bp + 4)) = uintptr(0)
pBt = (*TBtree)(unsafe.Pointer(p)).FpBt
if iTable > _btreePagecount(tls, pBt) {
- return _sqlite3CorruptError(tls, int32(81030))
+ return _sqlite3CorruptError(tls, int32(81810))
}
*(*int32)(unsafe.Pointer(bp)) = _sqlite3BtreeClearTable(tls, p, libc.Int32FromUint32(iTable), uintptr(0))
if *(*int32)(unsafe.Pointer(bp)) != 0 {
@@ -56199,7 +56380,7 @@ func _checkAppendMsg(tls *libc.TLS, pCheck uintptr, zFormat uintptr, va uintptr)
(*TIntegrityCk)(unsafe.Pointer(pCheck)).FnErr++
ap = va
if (*TIntegrityCk)(unsafe.Pointer(pCheck)).FerrMsg.FnChar != 0 {
- Xsqlite3_str_append(tls, pCheck+48, __ccgo_ts+4272, int32(1))
+ Xsqlite3_str_append(tls, pCheck+48, __ccgo_ts+4298, int32(1))
}
if (*TIntegrityCk)(unsafe.Pointer(pCheck)).FzPfx != 0 {
Xsqlite3_str_appendf(tls, pCheck+48, (*TIntegrityCk)(unsafe.Pointer(pCheck)).FzPfx, libc.VaList(bp+8, (*TIntegrityCk)(unsafe.Pointer(pCheck)).Fv0, (*TIntegrityCk)(unsafe.Pointer(pCheck)).Fv1, (*TIntegrityCk)(unsafe.Pointer(pCheck)).Fv2))
@@ -56247,11 +56428,11 @@ func _checkRef(tls *libc.TLS, pCheck uintptr, iPage TPgno) (r int32) {
bp := tls.Alloc(16)
defer tls.Free(16)
if iPage > (*TIntegrityCk)(unsafe.Pointer(pCheck)).FnCkPage || iPage == uint32(0) {
- _checkAppendMsg(tls, pCheck, __ccgo_ts+4274, libc.VaList(bp+8, iPage))
+ _checkAppendMsg(tls, pCheck, __ccgo_ts+4300, libc.VaList(bp+8, iPage))
return int32(1)
}
if _getPageReferenced(tls, pCheck, iPage) != 0 {
- _checkAppendMsg(tls, pCheck, __ccgo_ts+4297, libc.VaList(bp+8, iPage))
+ _checkAppendMsg(tls, pCheck, __ccgo_ts+4323, libc.VaList(bp+8, iPage))
return int32(1)
}
_setPageReferenced(tls, pCheck, iPage)
@@ -56277,11 +56458,11 @@ func _checkPtrmap(tls *libc.TLS, pCheck uintptr, iChild TPgno, eType Tu8, iParen
if rc == int32(SQLITE_NOMEM) || rc == libc.Int32FromInt32(SQLITE_IOERR)|libc.Int32FromInt32(12)<<libc.Int32FromInt32(8) {
_checkOom(tls, pCheck)
}
- _checkAppendMsg(tls, pCheck, __ccgo_ts+4322, libc.VaList(bp+16, iChild))
+ _checkAppendMsg(tls, pCheck, __ccgo_ts+4348, libc.VaList(bp+16, iChild))
return
}
if libc.Int32FromUint8(*(*Tu8)(unsafe.Pointer(bp))) != libc.Int32FromUint8(eType) || *(*TPgno)(unsafe.Pointer(bp + 4)) != iParent {
- _checkAppendMsg(tls, pCheck, __ccgo_ts+4351, libc.VaList(bp+16, iChild, libc.Int32FromUint8(eType), iParent, libc.Int32FromUint8(*(*Tu8)(unsafe.Pointer(bp))), *(*TPgno)(unsafe.Pointer(bp + 4))))
+ _checkAppendMsg(tls, pCheck, __ccgo_ts+4377, libc.VaList(bp+16, iChild, libc.Int32FromUint8(eType), iParent, libc.Int32FromUint8(*(*Tu8)(unsafe.Pointer(bp))), *(*TPgno)(unsafe.Pointer(bp + 4))))
}
}
@@ -56308,7 +56489,7 @@ func _checkList(tls *libc.TLS, pCheck uintptr, isFreeList int32, iPage TPgno, N
}
N--
if _sqlite3PagerGet(tls, (*TIntegrityCk)(unsafe.Pointer(pCheck)).FpPager, iPage, bp, 0) != 0 {
- _checkAppendMsg(tls, pCheck, __ccgo_ts+4405, libc.VaList(bp+16, iPage))
+ _checkAppendMsg(tls, pCheck, __ccgo_ts+4431, libc.VaList(bp+16, iPage))
break
}
pOvflData = _sqlite3PagerGetData(tls, *(*uintptr)(unsafe.Pointer(bp)))
@@ -56318,7 +56499,7 @@ func _checkList(tls *libc.TLS, pCheck uintptr, isFreeList int32, iPage TPgno, N
_checkPtrmap(tls, pCheck, iPage, uint8(PTRMAP_FREEPAGE), uint32(0))
}
if n > (*TBtShared)(unsafe.Pointer((*TIntegrityCk)(unsafe.Pointer(pCheck)).FpBt)).FusableSize/uint32(4)-uint32(2) {
- _checkAppendMsg(tls, pCheck, __ccgo_ts+4427, libc.VaList(bp+16, iPage))
+ _checkAppendMsg(tls, pCheck, __ccgo_ts+4453, libc.VaList(bp+16, iPage))
N--
} else {
i = 0
@@ -56353,11 +56534,11 @@ func _checkList(tls *libc.TLS, pCheck uintptr, isFreeList int32, iPage TPgno, N
}
if N != 0 && nErrAtStart == (*TIntegrityCk)(unsafe.Pointer(pCheck)).FnErr {
if isFreeList != 0 {
- v2 = __ccgo_ts + 4466
+ v2 = __ccgo_ts + 4492
} else {
- v2 = __ccgo_ts + 4471
+ v2 = __ccgo_ts + 4497
}
- _checkAppendMsg(tls, pCheck, __ccgo_ts+4492, libc.VaList(bp+16, v2, expected-N, expected))
+ _checkAppendMsg(tls, pCheck, __ccgo_ts+4518, libc.VaList(bp+16, v2, expected-N, expected))
}
}
@@ -56493,12 +56674,12 @@ func _checkTreePage(tls *libc.TLS, pCheck uintptr, iPage TPgno, piMinKey uintptr
if _checkRef(tls, pCheck, iPage) != 0 {
return 0
}
- (*TIntegrityCk)(unsafe.Pointer(pCheck)).FzPfx = __ccgo_ts + 4518
+ (*TIntegrityCk)(unsafe.Pointer(pCheck)).FzPfx = __ccgo_ts + 4544
(*TIntegrityCk)(unsafe.Pointer(pCheck)).Fv1 = iPage
v1 = _btreeGetPage(tls, pBt, iPage, bp+8, 0)
rc = v1
if v1 != 0 {
- _checkAppendMsg(tls, pCheck, __ccgo_ts+4536, libc.VaList(bp+48, rc))
+ _checkAppendMsg(tls, pCheck, __ccgo_ts+4562, libc.VaList(bp+48, rc))
if rc == libc.Int32FromInt32(SQLITE_IOERR)|libc.Int32FromInt32(12)<<libc.Int32FromInt32(8) {
(*TIntegrityCk)(unsafe.Pointer(pCheck)).Frc = int32(SQLITE_NOMEM)
}
@@ -56512,19 +56693,19 @@ func _checkTreePage(tls *libc.TLS, pCheck uintptr, iPage TPgno, piMinKey uintptr
rc = v2
if v2 != 0 {
/* The only possible error from InitPage */
- _checkAppendMsg(tls, pCheck, __ccgo_ts+4574, libc.VaList(bp+48, rc))
+ _checkAppendMsg(tls, pCheck, __ccgo_ts+4600, libc.VaList(bp+48, rc))
goto end_of_check
}
v3 = _btreeComputeFreeSpace(tls, *(*uintptr)(unsafe.Pointer(bp + 8)))
rc = v3
if v3 != 0 {
- _checkAppendMsg(tls, pCheck, __ccgo_ts+4612, libc.VaList(bp+48, rc))
+ _checkAppendMsg(tls, pCheck, __ccgo_ts+4638, libc.VaList(bp+48, rc))
goto end_of_check
}
data = (*TMemPage)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 8)))).FaData
hdr = libc.Int32FromUint8((*TMemPage)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 8)))).FhdrOffset)
/* Set up for cell analysis */
- (*TIntegrityCk)(unsafe.Pointer(pCheck)).FzPfx = __ccgo_ts + 4634
+ (*TIntegrityCk)(unsafe.Pointer(pCheck)).FzPfx = __ccgo_ts + 4660
contentOffset = libc.Uint32FromInt32((libc.Int32FromUint8(*(*Tu8)(unsafe.Pointer(data + uintptr(hdr+int32(5)))))<<libc.Int32FromInt32(8)|libc.Int32FromUint8(*(*Tu8)(unsafe.Pointer(data + uintptr(hdr+int32(5)) + 1)))-libc.Int32FromInt32(1))&libc.Int32FromInt32(0xffff) + libc.Int32FromInt32(1))
/* Enforced by btreeInitPage() */
/* EVIDENCE-OF: R-37002-32774 The two-byte integer at offset 3 gives the
@@ -56541,7 +56722,7 @@ func _checkTreePage(tls *libc.TLS, pCheck uintptr, iPage TPgno, piMinKey uintptr
/* Analyze the right-child page of internal pages */
pgno = libc.Int32FromUint32(_sqlite3Get4byte(tls, data+uintptr(hdr+int32(8))))
if (*TBtShared)(unsafe.Pointer(pBt)).FautoVacuum != 0 {
- (*TIntegrityCk)(unsafe.Pointer(pCheck)).FzPfx = __ccgo_ts + 4660
+ (*TIntegrityCk)(unsafe.Pointer(pCheck)).FzPfx = __ccgo_ts + 4686
_checkPtrmap(tls, pCheck, libc.Uint32FromInt32(pgno), uint8(PTRMAP_BTREE), iPage)
}
depth = _checkTreePage(tls, pCheck, libc.Uint32FromInt32(pgno), bp, *(*Ti64)(unsafe.Pointer(bp)))
@@ -56564,14 +56745,14 @@ func _checkTreePage(tls *libc.TLS, pCheck uintptr, iPage TPgno, piMinKey uintptr
pc = uint32(libc.X__builtin_bswap16(tls, *(*Tu16)(unsafe.Pointer(pCellIdx))))
pCellIdx -= uintptr(2)
if pc < contentOffset || pc > usableSize-uint32(4) {
- _checkAppendMsg(tls, pCheck, __ccgo_ts+4690, libc.VaList(bp+48, pc, contentOffset, usableSize-uint32(4)))
+ _checkAppendMsg(tls, pCheck, __ccgo_ts+4716, libc.VaList(bp+48, pc, contentOffset, usableSize-uint32(4)))
doCoverageCheck = 0
goto _4
}
pCell = data + uintptr(pc)
(*(*func(*libc.TLS, uintptr, uintptr, uintptr))(unsafe.Pointer(&struct{ uintptr }{(*TMemPage)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 8)))).FxParseCell})))(tls, *(*uintptr)(unsafe.Pointer(bp + 8)), pCell, bp+16)
if pc+uint32((*(*TCellInfo)(unsafe.Pointer(bp + 16))).FnSize) > usableSize {
- _checkAppendMsg(tls, pCheck, __ccgo_ts+4720, 0)
+ _checkAppendMsg(tls, pCheck, __ccgo_ts+4746, 0)
doCoverageCheck = 0
goto _4
}
@@ -56583,7 +56764,7 @@ func _checkTreePage(tls *libc.TLS, pCheck uintptr, iPage TPgno, piMinKey uintptr
v5 = libc.BoolInt32((*(*TCellInfo)(unsafe.Pointer(bp + 16))).FnKey >= *(*Ti64)(unsafe.Pointer(bp)))
}
if v5 != 0 {
- _checkAppendMsg(tls, pCheck, __ccgo_ts+4744, libc.VaList(bp+48, (*(*TCellInfo)(unsafe.Pointer(bp + 16))).FnKey))
+ _checkAppendMsg(tls, pCheck, __ccgo_ts+4770, libc.VaList(bp+48, (*(*TCellInfo)(unsafe.Pointer(bp + 16))).FnKey))
}
*(*Ti64)(unsafe.Pointer(bp)) = (*(*TCellInfo)(unsafe.Pointer(bp + 16))).FnKey
keyCanBeEqual = 0 /* Only the first key on the page may ==maxKey */
@@ -56606,7 +56787,7 @@ func _checkTreePage(tls *libc.TLS, pCheck uintptr, iPage TPgno, piMinKey uintptr
d2 = _checkTreePage(tls, pCheck, libc.Uint32FromInt32(pgno), bp, *(*Ti64)(unsafe.Pointer(bp)))
keyCanBeEqual = 0
if d2 != depth {
- _checkAppendMsg(tls, pCheck, __ccgo_ts+4768, 0)
+ _checkAppendMsg(tls, pCheck, __ccgo_ts+4794, 0)
depth = d2
}
} else {
@@ -56683,7 +56864,7 @@ func _checkTreePage(tls *libc.TLS, pCheck uintptr, iPage TPgno, piMinKey uintptr
prev = contentOffset - uint32(1) /* Implied first min-heap entry */
for _btreeHeapPull(tls, heap, bp+12) != 0 {
if prev&uint32(0xffff) >= *(*Tu32)(unsafe.Pointer(bp + 12))>>libc.Int32FromInt32(16) {
- _checkAppendMsg(tls, pCheck, __ccgo_ts+4793, libc.VaList(bp+48, *(*Tu32)(unsafe.Pointer(bp + 12))>>int32(16), iPage))
+ _checkAppendMsg(tls, pCheck, __ccgo_ts+4819, libc.VaList(bp+48, *(*Tu32)(unsafe.Pointer(bp + 12))>>int32(16), iPage))
break
} else {
nFrag = int32(uint32(nFrag) + (*(*Tu32)(unsafe.Pointer(bp + 12))>>libc.Int32FromInt32(16) - prev&libc.Uint32FromInt32(0xffff) - libc.Uint32FromInt32(1)))
@@ -56697,7 +56878,7 @@ func _checkTreePage(tls *libc.TLS, pCheck uintptr, iPage TPgno, piMinKey uintptr
** number of fragmented free bytes within the cell content area.
*/
if *(*Tu32)(unsafe.Pointer(heap)) == uint32(0) && nFrag != libc.Int32FromUint8(*(*Tu8)(unsafe.Pointer(data + uintptr(hdr+int32(7))))) {
- _checkAppendMsg(tls, pCheck, __ccgo_ts+4830, libc.VaList(bp+48, nFrag, libc.Int32FromUint8(*(*Tu8)(unsafe.Pointer(data + uintptr(hdr+int32(7))))), iPage))
+ _checkAppendMsg(tls, pCheck, __ccgo_ts+4856, libc.VaList(bp+48, nFrag, libc.Int32FromUint8(*(*Tu8)(unsafe.Pointer(data + uintptr(hdr+int32(7))))), iPage))
}
}
goto end_of_check
@@ -56788,7 +56969,7 @@ func _sqlite3BtreeIntegrityCheck(tls *libc.TLS, db uintptr, p uintptr, aRoot uin
/* Check the integrity of the freelist
*/
if bCkFreelist != 0 {
- (*(*TIntegrityCk)(unsafe.Pointer(bp))).FzPfx = __ccgo_ts + 4882
+ (*(*TIntegrityCk)(unsafe.Pointer(bp))).FzPfx = __ccgo_ts + 4908
_checkList(tls, bp, int32(1), _sqlite3Get4byte(tls, (*TMemPage)(unsafe.Pointer((*TBtShared)(unsafe.Pointer(pBt)).FpPage1)).FaData+32), _sqlite3Get4byte(tls, (*TMemPage)(unsafe.Pointer((*TBtShared)(unsafe.Pointer(pBt)).FpPage1)).FaData+36))
(*(*TIntegrityCk)(unsafe.Pointer(bp))).FzPfx = uintptr(0)
}
@@ -56812,11 +56993,11 @@ func _sqlite3BtreeIntegrityCheck(tls *libc.TLS, db uintptr, p uintptr, aRoot uin
}
mxInHdr = _sqlite3Get4byte(tls, (*TMemPage)(unsafe.Pointer((*TBtShared)(unsafe.Pointer(pBt)).FpPage1)).FaData+52)
if mx != mxInHdr {
- _checkAppendMsg(tls, bp, __ccgo_ts+4893, libc.VaList(bp+208, mx, mxInHdr))
+ _checkAppendMsg(tls, bp, __ccgo_ts+4919, libc.VaList(bp+208, mx, mxInHdr))
}
} else {
if _sqlite3Get4byte(tls, (*TMemPage)(unsafe.Pointer((*TBtShared)(unsafe.Pointer(pBt)).FpPage1)).FaData+64) != uint32(0) {
- _checkAppendMsg(tls, bp, __ccgo_ts+4938, 0)
+ _checkAppendMsg(tls, bp, __ccgo_ts+4964, 0)
}
}
}
@@ -56853,10 +57034,10 @@ func _sqlite3BtreeIntegrityCheck(tls *libc.TLS, db uintptr, p uintptr, aRoot uin
** references to pointer-map pages.
*/
if _getPageReferenced(tls, bp, i) == 0 && (_ptrmapPageno(tls, pBt, i) != i || !((*TBtShared)(unsafe.Pointer(pBt)).FautoVacuum != 0)) {
- _checkAppendMsg(tls, bp, __ccgo_ts+4993, libc.VaList(bp+208, i))
+ _checkAppendMsg(tls, bp, __ccgo_ts+5019, libc.VaList(bp+208, i))
}
if _getPageReferenced(tls, bp, i) != 0 && (_ptrmapPageno(tls, pBt, i) == i && (*TBtShared)(unsafe.Pointer(pBt)).FautoVacuum != 0) {
- _checkAppendMsg(tls, bp, __ccgo_ts+5013, libc.VaList(bp+208, i))
+ _checkAppendMsg(tls, bp, __ccgo_ts+5039, libc.VaList(bp+208, i))
}
goto _3
_3:
@@ -57295,7 +57476,7 @@ func _findBtree(tls *libc.TLS, pErrorDb uintptr, pDb uintptr, zDb uintptr) (r ui
rc = 0
_sqlite3ParseObjectInit(tls, bp, pDb)
if _sqlite3OpenTempDatabase(tls, bp) != 0 {
- _sqlite3ErrorWithMsg(tls, pErrorDb, (*(*TParse)(unsafe.Pointer(bp))).Frc, __ccgo_ts+3864, libc.VaList(bp+296, (*(*TParse)(unsafe.Pointer(bp))).FzErrMsg))
+ _sqlite3ErrorWithMsg(tls, pErrorDb, (*(*TParse)(unsafe.Pointer(bp))).Frc, __ccgo_ts+3890, libc.VaList(bp+296, (*(*TParse)(unsafe.Pointer(bp))).FzErrMsg))
rc = int32(SQLITE_ERROR)
}
_sqlite3DbFree(tls, pErrorDb, (*(*TParse)(unsafe.Pointer(bp))).FzErrMsg)
@@ -57305,7 +57486,7 @@ func _findBtree(tls *libc.TLS, pErrorDb uintptr, pDb uintptr, zDb uintptr) (r ui
}
}
if i < 0 {
- _sqlite3ErrorWithMsg(tls, pErrorDb, int32(SQLITE_ERROR), __ccgo_ts+5045, libc.VaList(bp+296, zDb))
+ _sqlite3ErrorWithMsg(tls, pErrorDb, int32(SQLITE_ERROR), __ccgo_ts+5071, libc.VaList(bp+296, zDb))
return uintptr(0)
}
return (*(*TDb)(unsafe.Pointer((*Tsqlite3)(unsafe.Pointer(pDb)).FaDb + uintptr(i)*16))).FpBt
@@ -57334,7 +57515,7 @@ func _setDestPgsz(tls *libc.TLS, p uintptr) (r int32) {
// */
func _checkReadTransaction(tls *libc.TLS, db uintptr, p uintptr) (r int32) {
if _sqlite3BtreeTxnState(tls, p) != SQLITE_TXN_NONE {
- _sqlite3ErrorWithMsg(tls, db, int32(SQLITE_ERROR), __ccgo_ts+5065, 0)
+ _sqlite3ErrorWithMsg(tls, db, int32(SQLITE_ERROR), __ccgo_ts+5091, 0)
return int32(SQLITE_ERROR)
}
return SQLITE_OK
@@ -57364,7 +57545,7 @@ func Xsqlite3_backup_init(tls *libc.TLS, pDestDb uintptr, zDestDb uintptr, pSrcD
Xsqlite3_mutex_enter(tls, (*Tsqlite3)(unsafe.Pointer(pSrcDb)).Fmutex)
Xsqlite3_mutex_enter(tls, (*Tsqlite3)(unsafe.Pointer(pDestDb)).Fmutex)
if pSrcDb == pDestDb {
- _sqlite3ErrorWithMsg(tls, pDestDb, int32(SQLITE_ERROR), __ccgo_ts+5096, 0)
+ _sqlite3ErrorWithMsg(tls, pDestDb, int32(SQLITE_ERROR), __ccgo_ts+5122, 0)
p = uintptr(0)
} else {
/* Allocate space for a new sqlite3_backup object...
@@ -58042,7 +58223,7 @@ func _vdbeMemRenderNum(tls *libc.TLS, sz int32, zBuf uintptr, p uintptr) {
} else {
v1 = *(*float64)(unsafe.Pointer(p))
}
- Xsqlite3_str_appendf(tls, bp, __ccgo_ts+5136, libc.VaList(bp+40, v1))
+ Xsqlite3_str_appendf(tls, bp, __ccgo_ts+5162, libc.VaList(bp+40, v1))
*(*int8)(unsafe.Pointer(zBuf + uintptr((*(*TStrAccum)(unsafe.Pointer(bp))).FnChar))) = 0 /* Fast version of sqlite3StrAccumFinish(&acc) */
(*TMem)(unsafe.Pointer(p)).Fn = libc.Int32FromUint32((*(*TStrAccum)(unsafe.Pointer(bp))).FnChar)
}
@@ -58180,9 +58361,6 @@ func _sqlite3VdbeMemZeroTerminateIfAble(tls *libc.TLS, pMem uintptr) {
if libc.Int32FromUint8((*TMem)(unsafe.Pointer(pMem)).Fenc) != int32(SQLITE_UTF8) {
return
}
- if (*TMem)(unsafe.Pointer(pMem)).Fz == uintptr(0) {
- return
- }
if libc.Int32FromUint16((*TMem)(unsafe.Pointer(pMem)).Fflags)&int32(MEM_Dyn) != 0 {
if (*TMem)(unsafe.Pointer(pMem)).FxDel == __ccgo_fp(Xsqlite3_free) && Xsqlite3_msize(tls, (*TMem)(unsafe.Pointer(pMem)).Fz) >= libc.Uint64FromInt32((*TMem)(unsafe.Pointer(pMem)).Fn+libc.Int32FromInt32(1)) {
*(*int8)(unsafe.Pointer((*TMem)(unsafe.Pointer(pMem)).Fz + uintptr((*TMem)(unsafe.Pointer(pMem)).Fn))) = 0
@@ -58357,20 +58535,20 @@ func _sqlite3VdbeMemFinalize(tls *libc.TLS, pMem uintptr, pFunc uintptr) (r int3
bp := tls.Alloc(80)
defer tls.Free(80)
var _ /* ctx at bp+0 */ Tsqlite3_context
- var _ /* t at bp+32 */ TMem
- libc.Xmemset(tls, bp, 0, uint32(32))
- libc.Xmemset(tls, bp+32, 0, uint32(40))
- (*(*TMem)(unsafe.Pointer(bp + 32))).Fflags = uint16(MEM_Null)
- (*(*TMem)(unsafe.Pointer(bp + 32))).Fdb = (*TMem)(unsafe.Pointer(pMem)).Fdb
- (*(*Tsqlite3_context)(unsafe.Pointer(bp))).FpOut = bp + 32
+ var _ /* t at bp+28 */ TMem
+ libc.Xmemset(tls, bp, 0, uint32(28))
+ libc.Xmemset(tls, bp+28, 0, uint32(40))
+ (*(*TMem)(unsafe.Pointer(bp + 28))).Fflags = uint16(MEM_Null)
+ (*(*TMem)(unsafe.Pointer(bp + 28))).Fdb = (*TMem)(unsafe.Pointer(pMem)).Fdb
+ (*(*Tsqlite3_context)(unsafe.Pointer(bp))).FpOut = bp + 28
(*(*Tsqlite3_context)(unsafe.Pointer(bp))).FpMem = pMem
(*(*Tsqlite3_context)(unsafe.Pointer(bp))).FpFunc = pFunc
- (*(*Tsqlite3_context)(unsafe.Pointer(bp))).Fenc = (*Tsqlite3)(unsafe.Pointer((*(*TMem)(unsafe.Pointer(bp + 32))).Fdb)).Fenc
+ (*(*Tsqlite3_context)(unsafe.Pointer(bp))).Fenc = (*Tsqlite3)(unsafe.Pointer((*(*TMem)(unsafe.Pointer(bp + 28))).Fdb)).Fenc
(*(*func(*libc.TLS, uintptr))(unsafe.Pointer(&struct{ uintptr }{(*TFuncDef)(unsafe.Pointer(pFunc)).FxFinalize})))(tls, bp) /* IMP: R-24505-23230 */
if (*TMem)(unsafe.Pointer(pMem)).FszMalloc > 0 {
_sqlite3DbFreeNN(tls, (*TMem)(unsafe.Pointer(pMem)).Fdb, (*TMem)(unsafe.Pointer(pMem)).FzMalloc)
}
- libc.Xmemcpy(tls, pMem, bp+32, uint32(40))
+ libc.Xmemcpy(tls, pMem, bp+28, uint32(40))
return (*(*Tsqlite3_context)(unsafe.Pointer(bp))).FisError
}
@@ -58388,7 +58566,7 @@ func _sqlite3VdbeMemAggValue(tls *libc.TLS, pAccum uintptr, pOut uintptr, pFunc
bp := tls.Alloc(32)
defer tls.Free(32)
var _ /* ctx at bp+0 */ Tsqlite3_context
- libc.Xmemset(tls, bp, 0, uint32(32))
+ libc.Xmemset(tls, bp, 0, uint32(28))
_sqlite3VdbeMemSetNull(tls, pOut)
(*(*Tsqlite3_context)(unsafe.Pointer(bp))).FpOut = pOut
(*(*Tsqlite3_context)(unsafe.Pointer(bp))).FpMem = pAccum
@@ -59142,7 +59320,7 @@ func _sqlite3VdbeMemFromBtree(tls *libc.TLS, pCur uintptr, offset Tu32, amt Tu32
_, _ = rc, v1
(*TMem)(unsafe.Pointer(pMem)).Fflags = uint16(MEM_Null)
if _sqlite3BtreeMaxRecordSize(tls, pCur) < libc.Int64FromUint32(offset+amt) {
- return _sqlite3CorruptError(tls, int32(84327))
+ return _sqlite3CorruptError(tls, int32(85108))
}
v1 = _sqlite3VdbeMemClearAndResize(tls, pMem, libc.Int32FromUint32(amt+uint32(1)))
rc = v1
@@ -59306,7 +59484,8 @@ type ValueNewStat4Ctx = TValueNewStat4Ctx
// ** an sqlite3_value within the UnpackedRecord.a[] array.
// */
func _valueNew(tls *libc.TLS, db uintptr, p uintptr) (r uintptr) {
- var i, nByte, nCol int32
+ var i, nCol int32
+ var nByte Ti64
var pIdx, pRec uintptr
_, _, _, _, _ = i, nByte, nCol, pIdx, pRec
if p != 0 {
@@ -59314,8 +59493,8 @@ func _valueNew(tls *libc.TLS, db uintptr, p uintptr) (r uintptr) {
if pRec == uintptr(0) {
pIdx = (*TValueNewStat4Ctx)(unsafe.Pointer(p)).FpIdx /* Counter variable */
nCol = libc.Int32FromUint16((*TIndex)(unsafe.Pointer(pIdx)).FnColumn) /* Number of index columns including rowid */
- nByte = libc.Int32FromUint32(uint32(40)*libc.Uint32FromInt32(nCol) + (libc.Uint32FromInt64(28)+libc.Uint32FromInt32(7))&libc.Uint32FromInt32(^libc.Int32FromInt32(7)))
- pRec = _sqlite3DbMallocZero(tls, db, libc.Uint64FromInt32(nByte))
+ nByte = libc.Int64FromUint32(uint32(40)*libc.Uint32FromInt32(nCol) + (libc.Uint32FromInt64(28)+libc.Uint32FromInt32(7))&libc.Uint32FromInt32(^libc.Int32FromInt32(7)))
+ pRec = _sqlite3DbMallocZero(tls, db, libc.Uint64FromInt64(nByte))
if pRec != 0 {
(*TUnpackedRecord)(unsafe.Pointer(pRec)).FpKeyInfo = _sqlite3KeyInfoOfIndex(tls, (*TValueNewStat4Ctx)(unsafe.Pointer(p)).FpParse, pIdx)
if (*TUnpackedRecord)(unsafe.Pointer(pRec)).FpKeyInfo != 0 {
@@ -59379,7 +59558,7 @@ func _valueFromFunction(tls *libc.TLS, db uintptr, p uintptr, enc Tu8, aff Tu8,
var _ /* ctx at bp+0 */ Tsqlite3_context
_, _, _, _, _, _, _ = apVal, i, nVal, pFunc, pList, pVal, rc /* Context object for function invocation */
apVal = uintptr(0) /* Function arguments */
- nVal = 0 /* Size of apVal[] array */
+ nVal = 0 /* Number of function arguments */
pFunc = uintptr(0) /* Function definition */
pVal = uintptr(0) /* New value */
rc = SQLITE_OK /* Return code */
@@ -59418,14 +59597,14 @@ func _valueFromFunction(tls *libc.TLS, db uintptr, p uintptr, enc Tu8, aff Tu8,
rc = int32(SQLITE_NOMEM)
goto value_from_function_out
}
- libc.Xmemset(tls, bp, 0, uint32(32))
+ libc.Xmemset(tls, bp, 0, uint32(28))
(*(*Tsqlite3_context)(unsafe.Pointer(bp))).FpOut = pVal
(*(*Tsqlite3_context)(unsafe.Pointer(bp))).FpFunc = pFunc
(*(*Tsqlite3_context)(unsafe.Pointer(bp))).Fenc = (*Tsqlite3)(unsafe.Pointer(db)).Fenc
(*(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(&struct{ uintptr }{(*TFuncDef)(unsafe.Pointer(pFunc)).FxSFunc})))(tls, bp, nVal, apVal)
if (*(*Tsqlite3_context)(unsafe.Pointer(bp))).FisError != 0 {
rc = (*(*Tsqlite3_context)(unsafe.Pointer(bp))).FisError
- _sqlite3ErrorMsg(tls, (*TValueNewStat4Ctx)(unsafe.Pointer(pCtx)).FpParse, __ccgo_ts+3864, libc.VaList(bp+40, Xsqlite3_value_text(tls, pVal)))
+ _sqlite3ErrorMsg(tls, (*TValueNewStat4Ctx)(unsafe.Pointer(pCtx)).FpParse, __ccgo_ts+3890, libc.VaList(bp+40, Xsqlite3_value_text(tls, pVal)))
} else {
_sqlite3ValueApplyAffinity(tls, pVal, aff, uint8(SQLITE_UTF8))
rc = _sqlite3VdbeChangeEncoding(tls, pVal, libc.Int32FromUint8(enc))
@@ -59525,7 +59704,7 @@ func _valueFromExpr(tls *libc.TLS, db uintptr, pExpr uintptr, enc Tu8, affinity
pExpr = pLeft
op = libc.Int32FromUint8((*TExpr)(unsafe.Pointer(pExpr)).Fop)
negInt = -int32(1)
- zNeg = __ccgo_ts + 5143
+ zNeg = __ccgo_ts + 5169
}
}
}
@@ -59540,7 +59719,7 @@ func _valueFromExpr(tls *libc.TLS, db uintptr, pExpr uintptr, enc Tu8, affinity
if op == int32(TK_INTEGER) && 0 == _sqlite3DecOrHexToI64(tls, *(*uintptr)(unsafe.Pointer(pExpr + 8)), bp+8) {
_sqlite3VdbeMemSetInt64(tls, *(*uintptr)(unsafe.Pointer(bp)), *(*Ti64)(unsafe.Pointer(bp + 8))*int64(negInt))
} else {
- zVal = _sqlite3MPrintf(tls, db, __ccgo_ts+5145, libc.VaList(bp+24, zNeg, *(*uintptr)(unsafe.Pointer(pExpr + 8))))
+ zVal = _sqlite3MPrintf(tls, db, __ccgo_ts+5171, libc.VaList(bp+24, zNeg, *(*uintptr)(unsafe.Pointer(pExpr + 8))))
if zVal == uintptr(0) {
goto no_mem
}
@@ -59844,7 +60023,7 @@ func _sqlite3Stat4Column(tls *libc.TLS, db uintptr, pRec uintptr, nRec int32, iC
}
iHdr = uint32(libc.Uint8FromInt32(v1))
if *(*Tu32)(unsafe.Pointer(bp + 4)) > libc.Uint32FromInt32(nRec) || iHdr >= *(*Tu32)(unsafe.Pointer(bp + 4)) {
- return _sqlite3CorruptError(tls, int32(85013))
+ return _sqlite3CorruptError(tls, int32(85794))
}
iField = libc.Int64FromUint32(*(*Tu32)(unsafe.Pointer(bp + 4)))
i = 0
@@ -59860,7 +60039,7 @@ func _sqlite3Stat4Column(tls *libc.TLS, db uintptr, pRec uintptr, nRec int32, iC
}
iHdr += uint32(libc.Uint8FromInt32(v3))
if iHdr > *(*Tu32)(unsafe.Pointer(bp + 4)) {
- return _sqlite3CorruptError(tls, int32(85019))
+ return _sqlite3CorruptError(tls, int32(85800))
}
szField = _sqlite3VdbeSerialTypeLen(tls, *(*Tu32)(unsafe.Pointer(bp)))
iField += libc.Int64FromUint32(szField)
@@ -59870,7 +60049,7 @@ func _sqlite3Stat4Column(tls *libc.TLS, db uintptr, pRec uintptr, nRec int32, iC
i++
}
if iField > int64(nRec) {
- return _sqlite3CorruptError(tls, int32(85025))
+ return _sqlite3CorruptError(tls, int32(85806))
}
if pMem == uintptr(0) {
v4 = _sqlite3ValueNew(tls, db)
@@ -60331,12 +60510,11 @@ func _sqlite3VdbeAddOp4(tls *libc.TLS, p uintptr, op int32, p1 int32, p2 int32,
// ** while computing a generated column value. 0 is the usual case.
// */
func _sqlite3VdbeAddFunctionCall(tls *libc.TLS, pParse uintptr, p1 int32, p2 int32, p3 int32, nArg int32, pFunc uintptr, eCallCtx int32) (r int32) {
- var addr, nByte, v1 int32
+ var addr, v1 int32
var pCtx, v uintptr
- _, _, _, _, _ = addr, nByte, pCtx, v, v1
+ _, _, _, _ = addr, pCtx, v, v1
v = (*TParse)(unsafe.Pointer(pParse)).FpVdbe
- nByte = libc.Int32FromUint32(uint32(32) + libc.Uint32FromInt32(nArg-libc.Int32FromInt32(1))*uint32(4))
- pCtx = _sqlite3DbMallocRawNN(tls, (*TParse)(unsafe.Pointer(pParse)).Fdb, libc.Uint64FromInt32(nByte))
+ pCtx = _sqlite3DbMallocRawNN(tls, (*TParse)(unsafe.Pointer(pParse)).Fdb, uint64(uint32(libc.UintptrFromInt32(0)+28)+libc.Uint32FromInt32(nArg)*libc.Uint32FromInt64(4)))
if pCtx == uintptr(0) {
_freeEphemeralFunction(tls, (*TParse)(unsafe.Pointer(pParse)).Fdb, pFunc)
return 0
@@ -60510,7 +60688,7 @@ func _sqlite3VdbeMakeLabel(tls *libc.TLS, pParse uintptr) (r int32) {
var v1 int32
var v2 uintptr
_, _ = v1, v2
- v2 = pParse + 60
+ v2 = pParse + 64
*(*int32)(unsafe.Pointer(v2))--
v1 = *(*int32)(unsafe.Pointer(v2))
return v1
@@ -60595,8 +60773,8 @@ func _sqlite3VdbeReusable(tls *libc.TLS, p uintptr) {
// ** (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.
+// ** (2) Compute the maximum number of arguments used by the xUpdate/xFilter
+// ** methods of any virtual table and store that value in *pMaxVtabArgs.
// **
// ** (3) Update the Vdbe.readOnly and Vdbe.bIsReader flags to accurately
// ** indicate what the prepared statement actually does.
@@ -60609,11 +60787,11 @@ func _sqlite3VdbeReusable(tls *libc.TLS, p uintptr) {
// ** script numbers the opcodes correctly. Changes to this routine must be
// ** coordinated with changes to mkopcodeh.tcl.
// */
-func _resolveP2Values(tls *libc.TLS, p uintptr, pMaxFuncArgs uintptr) {
+func _resolveP2Values(tls *libc.TLS, p uintptr, pMaxVtabArgs uintptr) {
var aLabel, pOp, pParse uintptr
- var n, nMaxArgs int32
- _, _, _, _, _ = aLabel, n, nMaxArgs, pOp, pParse
- nMaxArgs = *(*int32)(unsafe.Pointer(pMaxFuncArgs))
+ var n, nMaxVtabArgs int32
+ _, _, _, _, _ = aLabel, n, nMaxVtabArgs, pOp, pParse
+ nMaxVtabArgs = *(*int32)(unsafe.Pointer(pMaxVtabArgs))
pParse = (*TVdbe)(unsafe.Pointer(p)).FpParse
aLabel = (*TParse)(unsafe.Pointer(pParse)).FaLabel
/* tag-20230419-1 */
@@ -60650,13 +60828,16 @@ func _resolveP2Values(tls *libc.TLS, p uintptr, pMaxFuncArgs uintptr) {
case int32(OP_Init):
goto resolve_p2_values_loop_exit
case int32(OP_VUpdate):
- if (*TOp)(unsafe.Pointer(pOp)).Fp2 > nMaxArgs {
- nMaxArgs = (*TOp)(unsafe.Pointer(pOp)).Fp2
+ if (*TOp)(unsafe.Pointer(pOp)).Fp2 > nMaxVtabArgs {
+ nMaxVtabArgs = (*TOp)(unsafe.Pointer(pOp)).Fp2
}
case int32(OP_VFilter):
+ /* The instruction immediately prior to VFilter will be an
+ ** OP_Integer that sets the "argc" value for the VFilter. See
+ ** the code where OP_VFilter is generated at tag-20250207a. */
n = (*(*TOp)(unsafe.Pointer(pOp + uintptr(-libc.Int32FromInt32(1))*20))).Fp1
- if n > nMaxArgs {
- nMaxArgs = n
+ if n > nMaxVtabArgs {
+ nMaxVtabArgs = n
}
/* Fall through into the default case */
fallthrough
@@ -60687,7 +60868,7 @@ resolve_p2_values_loop_exit:
(*TParse)(unsafe.Pointer(pParse)).FaLabel = uintptr(0)
}
(*TParse)(unsafe.Pointer(pParse)).FnLabel = 0
- *(*int32)(unsafe.Pointer(pMaxFuncArgs)) = nMaxArgs
+ *(*int32)(unsafe.Pointer(pMaxVtabArgs)) = nMaxVtabArgs
}
// C documentation
@@ -61189,7 +61370,7 @@ func _sqlite3VdbeDisplayP4(tls *libc.TLS, db uintptr, pOp uintptr) (r uintptr) {
switch int32((*TOp)(unsafe.Pointer(pOp)).Fp4type) {
case -int32(8):
pKeyInfo = *(*uintptr)(unsafe.Pointer(pOp + 16))
- Xsqlite3_str_appendf(tls, bp, __ccgo_ts+5150, libc.VaList(bp+32, libc.Int32FromUint16((*TKeyInfo)(unsafe.Pointer(pKeyInfo)).FnKeyField)))
+ Xsqlite3_str_appendf(tls, bp, __ccgo_ts+5176, libc.VaList(bp+32, libc.Int32FromUint16((*TKeyInfo)(unsafe.Pointer(pKeyInfo)).FnKeyField)))
j = 0
for {
if !(j < libc.Int32FromUint16((*TKeyInfo)(unsafe.Pointer(pKeyInfo)).FnKeyField)) {
@@ -61202,39 +61383,39 @@ func _sqlite3VdbeDisplayP4(tls *libc.TLS, db uintptr, pOp uintptr) (r uintptr) {
v2 = __ccgo_ts + 1667
}
zColl = v2
- if libc.Xstrcmp(tls, zColl, __ccgo_ts+5155) == 0 {
- zColl = __ccgo_ts + 5162
+ if libc.Xstrcmp(tls, zColl, __ccgo_ts+5181) == 0 {
+ zColl = __ccgo_ts + 5188
}
if libc.Int32FromUint8(*(*Tu8)(unsafe.Pointer((*TKeyInfo)(unsafe.Pointer(pKeyInfo)).FaSortFlags + uintptr(j))))&int32(KEYINFO_ORDER_DESC) != 0 {
- v3 = __ccgo_ts + 5143
+ v3 = __ccgo_ts + 5169
} else {
v3 = __ccgo_ts + 1667
}
if libc.Int32FromUint8(*(*Tu8)(unsafe.Pointer((*TKeyInfo)(unsafe.Pointer(pKeyInfo)).FaSortFlags + uintptr(j))))&int32(KEYINFO_ORDER_BIGNULL) != 0 {
- v4 = __ccgo_ts + 5164
+ v4 = __ccgo_ts + 5190
} else {
v4 = __ccgo_ts + 1667
}
- Xsqlite3_str_appendf(tls, bp, __ccgo_ts+5167, libc.VaList(bp+32, v3, v4, zColl))
+ Xsqlite3_str_appendf(tls, bp, __ccgo_ts+5193, libc.VaList(bp+32, v3, v4, zColl))
goto _1
_1:
;
j++
}
- Xsqlite3_str_append(tls, bp, __ccgo_ts+5175, int32(1))
+ Xsqlite3_str_append(tls, bp, __ccgo_ts+5201, int32(1))
case -int32(2):
pColl1 = *(*uintptr)(unsafe.Pointer(pOp + 16))
- Xsqlite3_str_appendf(tls, bp, __ccgo_ts+5191, libc.VaList(bp+32, (*TCollSeq)(unsafe.Pointer(pColl1)).FzName, _encnames[(*TCollSeq)(unsafe.Pointer(pColl1)).Fenc]))
+ Xsqlite3_str_appendf(tls, bp, __ccgo_ts+5217, libc.VaList(bp+32, (*TCollSeq)(unsafe.Pointer(pColl1)).FzName, _encnames[(*TCollSeq)(unsafe.Pointer(pColl1)).Fenc]))
case -int32(7):
pDef = *(*uintptr)(unsafe.Pointer(pOp + 16))
- Xsqlite3_str_appendf(tls, bp, __ccgo_ts+5200, libc.VaList(bp+32, (*TFuncDef)(unsafe.Pointer(pDef)).FzName, int32((*TFuncDef)(unsafe.Pointer(pDef)).FnArg)))
+ Xsqlite3_str_appendf(tls, bp, __ccgo_ts+5226, libc.VaList(bp+32, (*TFuncDef)(unsafe.Pointer(pDef)).FzName, int32((*TFuncDef)(unsafe.Pointer(pDef)).FnArg)))
case -int32(15):
pDef1 = (*Tsqlite3_context)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(pOp + 16)))).FpFunc
- Xsqlite3_str_appendf(tls, bp, __ccgo_ts+5200, libc.VaList(bp+32, (*TFuncDef)(unsafe.Pointer(pDef1)).FzName, int32((*TFuncDef)(unsafe.Pointer(pDef1)).FnArg)))
+ Xsqlite3_str_appendf(tls, bp, __ccgo_ts+5226, libc.VaList(bp+32, (*TFuncDef)(unsafe.Pointer(pDef1)).FzName, int32((*TFuncDef)(unsafe.Pointer(pDef1)).FnArg)))
case -int32(13):
Xsqlite3_str_appendf(tls, bp, __ccgo_ts+1428, libc.VaList(bp+32, *(*Ti64)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(pOp + 16))))))
case -int32(3):
- Xsqlite3_str_appendf(tls, bp, __ccgo_ts+5207, libc.VaList(bp+32, *(*int32)(unsafe.Pointer(pOp + 16))))
+ Xsqlite3_str_appendf(tls, bp, __ccgo_ts+5233, libc.VaList(bp+32, *(*int32)(unsafe.Pointer(pOp + 16))))
case -int32(12):
Xsqlite3_str_appendf(tls, bp, __ccgo_ts+1395, libc.VaList(bp+32, *(*float64)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(pOp + 16))))))
case -int32(10):
@@ -61251,14 +61432,14 @@ func _sqlite3VdbeDisplayP4(tls *libc.TLS, db uintptr, pOp uintptr) (r uintptr) {
if libc.Int32FromUint16((*TMem)(unsafe.Pointer(pMem)).Fflags)&int32(MEM_Null) != 0 {
zP4 = __ccgo_ts + 1668
} else {
- zP4 = __ccgo_ts + 5210
+ zP4 = __ccgo_ts + 5236
}
}
}
}
case -int32(11):
pVtab = (*TVTable)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(pOp + 16)))).FpVtab
- Xsqlite3_str_appendf(tls, bp, __ccgo_ts+5217, libc.VaList(bp+32, pVtab))
+ Xsqlite3_str_appendf(tls, bp, __ccgo_ts+5243, libc.VaList(bp+32, pVtab))
case -int32(14):
ai = *(*uintptr)(unsafe.Pointer(pOp + 16))
n = *(*Tu32)(unsafe.Pointer(ai)) /* The first element of an INTARRAY is always the
@@ -61273,20 +61454,20 @@ func _sqlite3VdbeDisplayP4(tls *libc.TLS, db uintptr, pOp uintptr) (r uintptr) {
} else {
v6 = int32(',')
}
- Xsqlite3_str_appendf(tls, bp, __ccgo_ts+5225, libc.VaList(bp+32, v6, *(*Tu32)(unsafe.Pointer(ai + uintptr(i)*4))))
+ Xsqlite3_str_appendf(tls, bp, __ccgo_ts+5251, libc.VaList(bp+32, v6, *(*Tu32)(unsafe.Pointer(ai + uintptr(i)*4))))
goto _5
_5:
;
i++
}
- Xsqlite3_str_append(tls, bp, __ccgo_ts+5230, int32(1))
+ Xsqlite3_str_append(tls, bp, __ccgo_ts+5256, int32(1))
case -int32(4):
- zP4 = __ccgo_ts + 5232
+ zP4 = __ccgo_ts + 5258
case -int32(5):
zP4 = (*TTable)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(pOp + 16)))).FzName
case -int32(17):
pSig = *(*uintptr)(unsafe.Pointer(pOp + 16))
- Xsqlite3_str_appendf(tls, bp, __ccgo_ts+5240, libc.VaList(bp+32, (*TSubrtnSig)(unsafe.Pointer(pSig)).FselId, (*TSubrtnSig)(unsafe.Pointer(pSig)).FzAff))
+ Xsqlite3_str_appendf(tls, bp, __ccgo_ts+5266, libc.VaList(bp+32, (*TSubrtnSig)(unsafe.Pointer(pSig)).FselId, (*TSubrtnSig)(unsafe.Pointer(pSig)).FzAff))
default:
zP4 = *(*uintptr)(unsafe.Pointer(pOp + 16))
}
@@ -61300,10 +61481,10 @@ func _sqlite3VdbeDisplayP4(tls *libc.TLS, db uintptr, pOp uintptr) (r uintptr) {
}
var _encnames = [4]uintptr{
- 0: __ccgo_ts + 5177,
- 1: __ccgo_ts + 5179,
- 2: __ccgo_ts + 5181,
- 3: __ccgo_ts + 5186,
+ 0: __ccgo_ts + 5203,
+ 1: __ccgo_ts + 5205,
+ 2: __ccgo_ts + 5207,
+ 3: __ccgo_ts + 5212,
}
// C documentation
@@ -62254,7 +62435,7 @@ func _vdbeCommit(tls *libc.TLS, db uintptr, p uintptr) (r int32) {
retryCount = 0
/* Select a super-journal file name */
nMainFile = _sqlite3Strlen30(tls, zMainFile)
- zSuper = _sqlite3MPrintf(tls, db, __ccgo_ts+5256, libc.VaList(bp+24, 0, zMainFile, 0))
+ zSuper = _sqlite3MPrintf(tls, db, __ccgo_ts+5282, libc.VaList(bp+24, 0, zMainFile, 0))
if zSuper == uintptr(0) {
return int32(SQLITE_NOMEM)
}
@@ -62262,18 +62443,18 @@ func _vdbeCommit(tls *libc.TLS, db uintptr, p uintptr) (r int32) {
for cond := true; cond; cond = rc == SQLITE_OK && *(*int32)(unsafe.Pointer(bp + 4)) != 0 {
if retryCount != 0 {
if retryCount > int32(100) {
- Xsqlite3_log(tls, int32(SQLITE_FULL), __ccgo_ts+5268, libc.VaList(bp+24, zSuper))
+ Xsqlite3_log(tls, int32(SQLITE_FULL), __ccgo_ts+5294, libc.VaList(bp+24, zSuper))
_sqlite3OsDelete(tls, pVfs, zSuper, 0)
break
} else {
if retryCount == int32(1) {
- Xsqlite3_log(tls, int32(SQLITE_FULL), __ccgo_ts+5282, libc.VaList(bp+24, zSuper))
+ Xsqlite3_log(tls, int32(SQLITE_FULL), __ccgo_ts+5308, libc.VaList(bp+24, zSuper))
}
}
}
retryCount++
Xsqlite3_randomness(tls, int32(4), bp+8)
- Xsqlite3_snprintf(tls, int32(13), zSuper+uintptr(nMainFile), __ccgo_ts+5297, libc.VaList(bp+24, *(*Tu32)(unsafe.Pointer(bp + 8))>>libc.Int32FromInt32(8)&uint32(0xffffff), *(*Tu32)(unsafe.Pointer(bp + 8))&uint32(0xff)))
+ Xsqlite3_snprintf(tls, int32(13), zSuper+uintptr(nMainFile), __ccgo_ts+5323, libc.VaList(bp+24, *(*Tu32)(unsafe.Pointer(bp + 8))>>libc.Int32FromInt32(8)&uint32(0xffffff), *(*Tu32)(unsafe.Pointer(bp + 8))&uint32(0xff)))
/* The antipenultimate character of the super-journal name must
** be "9" to avoid name collisions when using 8+3 filenames. */
rc = _sqlite3OsAccess(tls, pVfs, zSuper, SQLITE_ACCESS_EXISTS, bp+4)
@@ -62504,7 +62685,7 @@ func _sqlite3VdbeCheckFk(tls *libc.TLS, p uintptr, deferred int32) (r int32) {
if deferred != 0 && (*Tsqlite3)(unsafe.Pointer(db)).FnDeferredCons+(*Tsqlite3)(unsafe.Pointer(db)).FnDeferredImmCons > 0 || !(deferred != 0) && (*TVdbe)(unsafe.Pointer(p)).FnFkConstraint > 0 {
(*TVdbe)(unsafe.Pointer(p)).Frc = libc.Int32FromInt32(SQLITE_CONSTRAINT) | libc.Int32FromInt32(3)<<libc.Int32FromInt32(8)
(*TVdbe)(unsafe.Pointer(p)).FerrorAction = uint8(OE_Abort)
- _sqlite3VdbeError(tls, p, __ccgo_ts+5310, 0)
+ _sqlite3VdbeError(tls, p, __ccgo_ts+5336, 0)
if libc.Int32FromUint8((*TVdbe)(unsafe.Pointer(p)).FprepFlags)&int32(SQLITE_PREPARE_SAVESQL) == 0 {
return int32(SQLITE_ERROR)
}
@@ -62954,7 +63135,7 @@ func _sqlite3VdbeFinishMoveto(tls *libc.TLS, p uintptr) (r int32) {
return rc
}
if *(*int32)(unsafe.Pointer(bp)) != 0 {
- return _sqlite3CorruptError(tls, int32(88898))
+ return _sqlite3CorruptError(tls, int32(89687))
}
(*TVdbeCursor)(unsafe.Pointer(p)).FdeferredMoveto = uint8(0)
(*TVdbeCursor)(unsafe.Pointer(p)).FcacheStatus = uint32(CACHE_STALE)
@@ -63802,7 +63983,7 @@ func _sqlite3VdbeRecordCompareWithSkip(tls *libc.TLS, nKey1 int32, pKey1 uintptr
i = 0
}
if d1 > libc.Uint32FromInt32(nKey1) {
- (*TUnpackedRecord)(unsafe.Pointer(pPKey2)).FerrCode = libc.Uint8FromInt32(_sqlite3CorruptError(tls, int32(89856)))
+ (*TUnpackedRecord)(unsafe.Pointer(pPKey2)).FerrCode = libc.Uint8FromInt32(_sqlite3CorruptError(tls, int32(90646)))
return 0 /* Corruption */
}
/* Only needed by assert() statements */
@@ -63892,7 +64073,7 @@ func _sqlite3VdbeRecordCompareWithSkip(tls *libc.TLS, nKey1 int32, pKey1 uintptr
pKeyInfo = v4
}
if v5 || libc.Int32FromUint16((*TKeyInfo)(unsafe.Pointer(v4)).FnAllField) <= i {
- (*TUnpackedRecord)(unsafe.Pointer(pPKey2)).FerrCode = libc.Uint8FromInt32(_sqlite3CorruptError(tls, int32(89937)))
+ (*TUnpackedRecord)(unsafe.Pointer(pPKey2)).FerrCode = libc.Uint8FromInt32(_sqlite3CorruptError(tls, int32(90727)))
return 0 /* Corruption */
} else {
if *(*uintptr)(unsafe.Pointer(pKeyInfo + 20 + uintptr(i)*4)) != 0 {
@@ -63927,7 +64108,7 @@ func _sqlite3VdbeRecordCompareWithSkip(tls *libc.TLS, nKey1 int32, pKey1 uintptr
} else {
nStr = libc.Int32FromUint32((*(*Tu32)(unsafe.Pointer(bp + 48)) - uint32(12)) / uint32(2))
if d1+libc.Uint32FromInt32(nStr) > libc.Uint32FromInt32(nKey1) {
- (*TUnpackedRecord)(unsafe.Pointer(pPKey2)).FerrCode = libc.Uint8FromInt32(_sqlite3CorruptError(tls, int32(89967)))
+ (*TUnpackedRecord)(unsafe.Pointer(pPKey2)).FerrCode = libc.Uint8FromInt32(_sqlite3CorruptError(tls, int32(90757)))
return 0 /* Corruption */
} else {
if libc.Int32FromUint16((*TMem)(unsafe.Pointer(pRhs)).Fflags)&int32(MEM_Zero) != 0 {
@@ -63981,7 +64162,7 @@ func _sqlite3VdbeRecordCompareWithSkip(tls *libc.TLS, nKey1 int32, pKey1 uintptr
}
idx1 += libc.Uint32FromInt32(_sqlite3VarintLen(tls, uint64(*(*Tu32)(unsafe.Pointer(bp + 48)))))
if idx1 >= *(*Tu32)(unsafe.Pointer(bp)) {
- (*TUnpackedRecord)(unsafe.Pointer(pPKey2)).FerrCode = libc.Uint8FromInt32(_sqlite3CorruptError(tls, int32(90018)))
+ (*TUnpackedRecord)(unsafe.Pointer(pPKey2)).FerrCode = libc.Uint8FromInt32(_sqlite3CorruptError(tls, int32(90808)))
return 0 /* Corrupt index */
}
}
@@ -64113,7 +64294,7 @@ vrcs_restart:
szHdr = libc.Int32FromUint8(*(*Tu8)(unsafe.Pointer(aKey1)))
nStr = (*(*int32)(unsafe.Pointer(bp)) - int32(12)) / int32(2)
if szHdr+nStr > nKey1 {
- (*TUnpackedRecord)(unsafe.Pointer(pPKey2)).FerrCode = libc.Uint8FromInt32(_sqlite3CorruptError(tls, int32(90181)))
+ (*TUnpackedRecord)(unsafe.Pointer(pPKey2)).FerrCode = libc.Uint8FromInt32(_sqlite3CorruptError(tls, int32(90971)))
return 0 /* Corruption */
}
if (*TUnpackedRecord)(unsafe.Pointer(pPKey2)).Fn < nStr {
@@ -64265,7 +64446,7 @@ func _sqlite3VdbeIdxRowid(tls *libc.TLS, db uintptr, pCur uintptr, rowid uintptr
idx_rowid_corruption:
;
_sqlite3VdbeMemReleaseMalloc(tls, bp+8)
- return _sqlite3CorruptError(tls, int32(90339))
+ return _sqlite3CorruptError(tls, int32(91129))
}
// C documentation
@@ -64296,7 +64477,7 @@ func _sqlite3VdbeIdxKeyCompare(tls *libc.TLS, db uintptr, pC uintptr, pUnpacked
** that btreeParseCellPtr() and sqlite3GetVarint32() are implemented */
if nCellKey <= 0 || nCellKey > int64(0x7fffffff) {
*(*int32)(unsafe.Pointer(res)) = 0
- return _sqlite3CorruptError(tls, int32(90372))
+ return _sqlite3CorruptError(tls, int32(91162))
}
_sqlite3VdbeMemInit(tls, bp, db, uint16(0))
rc = _sqlite3VdbeMemFromBtreeZeroOffset(tls, pCur, libc.Uint32FromInt64(nCellKey), bp)
@@ -64447,15 +64628,15 @@ func _sqlite3NotPureFunc(tls *libc.TLS, pCtx uintptr) (r int32) {
pOp = (*TVdbe)(unsafe.Pointer((*Tsqlite3_context)(unsafe.Pointer(pCtx)).FpVdbe)).FaOp + uintptr((*Tsqlite3_context)(unsafe.Pointer(pCtx)).FiOp)*20
if libc.Int32FromUint8((*TVdbeOp)(unsafe.Pointer(pOp)).Fopcode) == int32(OP_PureFunc) {
if libc.Int32FromUint16((*TVdbeOp)(unsafe.Pointer(pOp)).Fp5)&int32(NC_IsCheck) != 0 {
- zContext = __ccgo_ts + 5340
+ zContext = __ccgo_ts + 5366
} else {
if libc.Int32FromUint16((*TVdbeOp)(unsafe.Pointer(pOp)).Fp5)&int32(NC_GenCol) != 0 {
- zContext = __ccgo_ts + 5359
+ zContext = __ccgo_ts + 5385
} else {
- zContext = __ccgo_ts + 5378
+ zContext = __ccgo_ts + 5404
}
}
- zMsg = Xsqlite3_mprintf(tls, __ccgo_ts+5387, libc.VaList(bp+8, (*TFuncDef)(unsafe.Pointer((*Tsqlite3_context)(unsafe.Pointer(pCtx)).FpFunc)).FzName, zContext))
+ zMsg = Xsqlite3_mprintf(tls, __ccgo_ts+5413, libc.VaList(bp+8, (*TFuncDef)(unsafe.Pointer((*Tsqlite3_context)(unsafe.Pointer(pCtx)).FpFunc)).FzName, zContext))
Xsqlite3_result_error(tls, pCtx, zMsg, -int32(1))
Xsqlite3_free(tls, zMsg)
return 0
@@ -64550,10 +64731,11 @@ func _sqlite3VdbePreUpdateHook(tls *libc.TLS, v uintptr, pCsr uintptr, op int32,
(*(*TPreUpdate)(unsafe.Pointer(bp))).FpCsr = pCsr
(*(*TPreUpdate)(unsafe.Pointer(bp))).Fop = op
(*(*TPreUpdate)(unsafe.Pointer(bp))).FiNewReg = iReg
- (*(*TPreUpdate)(unsafe.Pointer(bp))).Fkeyinfo.Fdb = db
- (*(*TPreUpdate)(unsafe.Pointer(bp))).Fkeyinfo.Fenc = (*Tsqlite3)(unsafe.Pointer(db)).Fenc
- (*(*TPreUpdate)(unsafe.Pointer(bp))).Fkeyinfo.FnKeyField = libc.Uint16FromInt16((*TTable)(unsafe.Pointer(pTab)).FnCol)
- (*(*TPreUpdate)(unsafe.Pointer(bp))).Fkeyinfo.FaSortFlags = uintptr(unsafe.Pointer(&_fakeSortOrder))
+ (*(*TPreUpdate)(unsafe.Pointer(bp))).FpKeyinfo = bp + 108
+ (*TKeyInfo)(unsafe.Pointer((*(*TPreUpdate)(unsafe.Pointer(bp))).FpKeyinfo)).Fdb = db
+ (*TKeyInfo)(unsafe.Pointer((*(*TPreUpdate)(unsafe.Pointer(bp))).FpKeyinfo)).Fenc = (*Tsqlite3)(unsafe.Pointer(db)).Fenc
+ (*TKeyInfo)(unsafe.Pointer((*(*TPreUpdate)(unsafe.Pointer(bp))).FpKeyinfo)).FnKeyField = libc.Uint16FromInt16((*TTable)(unsafe.Pointer(pTab)).FnCol)
+ (*TKeyInfo)(unsafe.Pointer((*(*TPreUpdate)(unsafe.Pointer(bp))).FpKeyinfo)).FaSortFlags = uintptr(unsafe.Pointer(&_fakeSortOrder))
(*(*TPreUpdate)(unsafe.Pointer(bp))).FiKey1 = iKey1
(*(*TPreUpdate)(unsafe.Pointer(bp))).FiKey2 = iKey2
(*(*TPreUpdate)(unsafe.Pointer(bp))).FpTab = pTab
@@ -64562,9 +64744,9 @@ func _sqlite3VdbePreUpdateHook(tls *libc.TLS, v uintptr, pCsr uintptr, op int32,
(*(*func(*libc.TLS, uintptr, uintptr, int32, uintptr, uintptr, Tsqlite3_int64, Tsqlite3_int64))(unsafe.Pointer(&struct{ uintptr }{(*Tsqlite3)(unsafe.Pointer(db)).FxPreUpdateCallback})))(tls, (*Tsqlite3)(unsafe.Pointer(db)).FpPreUpdateArg, db, op, zDb, zTbl, iKey1, iKey2)
(*Tsqlite3)(unsafe.Pointer(db)).FpPreUpdate = uintptr(0)
_sqlite3DbFree(tls, db, (*(*TPreUpdate)(unsafe.Pointer(bp))).FaRecord)
- _vdbeFreeUnpacked(tls, db, libc.Int32FromUint16((*(*TPreUpdate)(unsafe.Pointer(bp))).Fkeyinfo.FnKeyField)+int32(1), (*(*TPreUpdate)(unsafe.Pointer(bp))).FpUnpacked)
- _vdbeFreeUnpacked(tls, db, libc.Int32FromUint16((*(*TPreUpdate)(unsafe.Pointer(bp))).Fkeyinfo.FnKeyField)+int32(1), (*(*TPreUpdate)(unsafe.Pointer(bp))).FpNewUnpacked)
- _sqlite3VdbeMemRelease(tls, bp+72)
+ _vdbeFreeUnpacked(tls, db, libc.Int32FromUint16((*TKeyInfo)(unsafe.Pointer((*(*TPreUpdate)(unsafe.Pointer(bp))).FpKeyinfo)).FnKeyField)+int32(1), (*(*TPreUpdate)(unsafe.Pointer(bp))).FpUnpacked)
+ _vdbeFreeUnpacked(tls, db, libc.Int32FromUint16((*TKeyInfo)(unsafe.Pointer((*(*TPreUpdate)(unsafe.Pointer(bp))).FpKeyinfo)).FnKeyField)+int32(1), (*(*TPreUpdate)(unsafe.Pointer(bp))).FpNewUnpacked)
+ _sqlite3VdbeMemRelease(tls, bp+52)
if (*(*TPreUpdate)(unsafe.Pointer(bp))).FaNew != 0 {
i = 0
for {
@@ -64644,7 +64826,7 @@ func Xsqlite3_expired(tls *libc.TLS, pStmt uintptr) (r int32) {
// */
func _vdbeSafety(tls *libc.TLS, p uintptr) (r int32) {
if (*TVdbe)(unsafe.Pointer(p)).Fdb == uintptr(0) {
- Xsqlite3_log(tls, int32(SQLITE_MISUSE), __ccgo_ts+5423, 0)
+ Xsqlite3_log(tls, int32(SQLITE_MISUSE), __ccgo_ts+5449, 0)
return int32(1)
} else {
return 0
@@ -64654,7 +64836,7 @@ func _vdbeSafety(tls *libc.TLS, p uintptr) (r int32) {
func _vdbeSafetyNotNull(tls *libc.TLS, p uintptr) (r int32) {
if p == uintptr(0) {
- Xsqlite3_log(tls, int32(SQLITE_MISUSE), __ccgo_ts+5468, 0)
+ Xsqlite3_log(tls, int32(SQLITE_MISUSE), __ccgo_ts+5494, 0)
return int32(1)
} else {
return _vdbeSafety(tls, p)
@@ -64712,7 +64894,7 @@ func Xsqlite3_finalize(tls *libc.TLS, pStmt uintptr) (r int32) {
v = pStmt
db = (*TVdbe)(unsafe.Pointer(v)).Fdb
if _vdbeSafety(tls, v) != 0 {
- return _sqlite3MisuseError(tls, int32(90769))
+ return _sqlite3MisuseError(tls, int32(91560))
}
Xsqlite3_mutex_enter(tls, (*Tsqlite3)(unsafe.Pointer(db)).Fmutex)
if (*TVdbe)(unsafe.Pointer(v)).FstartTime > 0 {
@@ -65215,7 +65397,7 @@ func Xsqlite3_result_error_code(tls *libc.TLS, pCtx uintptr, errCode int32) {
// /* Force an SQLITE_TOOBIG error. */
func Xsqlite3_result_error_toobig(tls *libc.TLS, pCtx uintptr) {
(*Tsqlite3_context)(unsafe.Pointer(pCtx)).FisError = int32(SQLITE_TOOBIG)
- _sqlite3VdbeMemSetStr(tls, (*Tsqlite3_context)(unsafe.Pointer(pCtx)).FpOut, __ccgo_ts+5508, int64(-int32(1)), uint8(SQLITE_UTF8), libc.UintptrFromInt32(0))
+ _sqlite3VdbeMemSetStr(tls, (*Tsqlite3_context)(unsafe.Pointer(pCtx)).FpOut, __ccgo_ts+5534, int64(-int32(1)), uint8(SQLITE_UTF8), libc.UintptrFromInt32(0))
}
// C documentation
@@ -65416,7 +65598,7 @@ func Xsqlite3_step(tls *libc.TLS, pStmt uintptr) (r int32) {
v = pStmt /* the prepared statement */
cnt = 0 /* The database connection */
if _vdbeSafetyNotNull(tls, v) != 0 {
- return _sqlite3MisuseError(tls, int32(91563))
+ return _sqlite3MisuseError(tls, int32(92354))
}
db = (*TVdbe)(unsafe.Pointer(v)).Fdb
Xsqlite3_mutex_enter(tls, (*Tsqlite3)(unsafe.Pointer(db)).Fmutex)
@@ -65546,7 +65728,7 @@ func _valueFromValueList(tls *libc.TLS, pVal uintptr, ppOut uintptr, bNext int32
_, _, _, _, _, _, _ = iOff, pOut, pRhs, rc, sz, zBuf, v1
*(*uintptr)(unsafe.Pointer(ppOut)) = uintptr(0)
if pVal == uintptr(0) {
- return _sqlite3MisuseError(tls, int32(91684))
+ return _sqlite3MisuseError(tls, int32(92475))
}
if libc.Int32FromUint16((*Tsqlite3_value)(unsafe.Pointer(pVal)).Fflags)&int32(MEM_Dyn) == 0 || (*Tsqlite3_value)(unsafe.Pointer(pVal)).FxDel != __ccgo_fp(_sqlite3VdbeValueListFree) {
return int32(SQLITE_ERROR)
@@ -66006,18 +66188,18 @@ func Xsqlite3_column_type(tls *libc.TLS, pStmt uintptr, i int32) (r int32) {
// ** Column names appropriate for EXPLAIN or EXPLAIN QUERY PLAN.
// */
var _azExplainColNames8 = [12]uintptr{
- 0: __ccgo_ts + 5531,
- 1: __ccgo_ts + 5536,
- 2: __ccgo_ts + 5543,
- 3: __ccgo_ts + 5546,
- 4: __ccgo_ts + 5549,
- 5: __ccgo_ts + 5552,
- 6: __ccgo_ts + 5555,
- 7: __ccgo_ts + 5558,
- 8: __ccgo_ts + 5566,
- 9: __ccgo_ts + 5569,
- 10: __ccgo_ts + 5576,
- 11: __ccgo_ts + 5584,
+ 0: __ccgo_ts + 5557,
+ 1: __ccgo_ts + 5562,
+ 2: __ccgo_ts + 5569,
+ 3: __ccgo_ts + 5572,
+ 4: __ccgo_ts + 5575,
+ 5: __ccgo_ts + 5578,
+ 6: __ccgo_ts + 5581,
+ 7: __ccgo_ts + 5584,
+ 8: __ccgo_ts + 5592,
+ 9: __ccgo_ts + 5595,
+ 10: __ccgo_ts + 5602,
+ 11: __ccgo_ts + 5610,
}
var _azExplainColNames16data = [60]Tu16{
0: uint16('a'),
@@ -66272,14 +66454,14 @@ func _vdbeUnbind(tls *libc.TLS, p uintptr, i uint32) (r int32) {
var v2 bool
_, _, _ = pVar, v1, v2
if _vdbeSafetyNotNull(tls, p) != 0 {
- return _sqlite3MisuseError(tls, int32(92300))
+ return _sqlite3MisuseError(tls, int32(93091))
}
Xsqlite3_mutex_enter(tls, (*Tsqlite3)(unsafe.Pointer((*TVdbe)(unsafe.Pointer(p)).Fdb)).Fmutex)
if libc.Int32FromUint8((*TVdbe)(unsafe.Pointer(p)).FeVdbeState) != int32(VDBE_READY_STATE) {
- _sqlite3Error(tls, (*TVdbe)(unsafe.Pointer(p)).Fdb, _sqlite3MisuseError(tls, int32(92304)))
+ _sqlite3Error(tls, (*TVdbe)(unsafe.Pointer(p)).Fdb, _sqlite3MisuseError(tls, int32(93095)))
Xsqlite3_mutex_leave(tls, (*Tsqlite3)(unsafe.Pointer((*TVdbe)(unsafe.Pointer(p)).Fdb)).Fmutex)
- Xsqlite3_log(tls, int32(SQLITE_MISUSE), __ccgo_ts+5591, libc.VaList(bp+8, (*TVdbe)(unsafe.Pointer(p)).FzSql))
- return _sqlite3MisuseError(tls, int32(92308))
+ Xsqlite3_log(tls, int32(SQLITE_MISUSE), __ccgo_ts+5617, libc.VaList(bp+8, (*TVdbe)(unsafe.Pointer(p)).FzSql))
+ return _sqlite3MisuseError(tls, int32(93099))
}
if i >= libc.Uint32FromInt16((*TVdbe)(unsafe.Pointer(p)).FnVar) {
_sqlite3Error(tls, (*TVdbe)(unsafe.Pointer(p)).Fdb, int32(SQLITE_RANGE))
@@ -66430,7 +66612,7 @@ func Xsqlite3_bind_text64(tls *libc.TLS, pStmt uintptr, i int32, zData uintptr,
if libc.Int32FromUint8(enc) == int32(SQLITE_UTF16) {
enc = uint8(SQLITE_UTF16LE)
}
- nData &= libc.Uint64FromInt32(^libc.Int32FromUint16(libc.Uint16FromInt32(1)))
+ nData &= ^libc.Uint64FromInt32(1)
}
return _bindText(tls, pStmt, i, zData, libc.Int64FromUint64(nData), xDel, enc)
}
@@ -66853,11 +67035,11 @@ func Xsqlite3_preupdate_old(tls *libc.TLS, db uintptr, iIdx int32, ppValue uintp
/* Test that this call is being made from within an SQLITE_DELETE or
** SQLITE_UPDATE pre-update callback, and that iIdx is within range. */
if !(p != 0) || (*TPreUpdate)(unsafe.Pointer(p)).Fop == int32(SQLITE_INSERT) {
- rc = _sqlite3MisuseError(tls, int32(92851))
+ rc = _sqlite3MisuseError(tls, int32(93642))
goto preupdate_old_out
}
if (*TPreUpdate)(unsafe.Pointer(p)).FpPk != 0 {
- iStore = int32(_sqlite3TableColumnToIndex(tls, (*TPreUpdate)(unsafe.Pointer(p)).FpPk, int16(iIdx)))
+ iStore = _sqlite3TableColumnToIndex(tls, (*TPreUpdate)(unsafe.Pointer(p)).FpPk, iIdx)
} else {
iStore = int32(_sqlite3TableColumnToStorage(tls, (*TPreUpdate)(unsafe.Pointer(p)).FpTab, int16(iIdx)))
}
@@ -66866,7 +67048,7 @@ func Xsqlite3_preupdate_old(tls *libc.TLS, db uintptr, iIdx int32, ppValue uintp
goto preupdate_old_out
}
if iIdx == int32((*TTable)(unsafe.Pointer((*TPreUpdate)(unsafe.Pointer(p)).FpTab)).FiPKey) {
- v1 = p + 72
+ v1 = p + 52
pMem = v1
*(*uintptr)(unsafe.Pointer(ppValue)) = v1
_sqlite3VdbeMemSetInt64(tls, pMem, (*TPreUpdate)(unsafe.Pointer(p)).FiKey1)
@@ -66880,7 +67062,7 @@ func Xsqlite3_preupdate_old(tls *libc.TLS, db uintptr, iIdx int32, ppValue uintp
}
rc = _sqlite3BtreePayload(tls, *(*uintptr)(unsafe.Pointer((*TPreUpdate)(unsafe.Pointer(p)).FpCsr + 36)), uint32(0), nRec, aRec)
if rc == SQLITE_OK {
- (*TPreUpdate)(unsafe.Pointer(p)).FpUnpacked = _vdbeUnpackRecord(tls, p+16, libc.Int32FromUint32(nRec), aRec)
+ (*TPreUpdate)(unsafe.Pointer(p)).FpUnpacked = _vdbeUnpackRecord(tls, (*TPreUpdate)(unsafe.Pointer(p)).FpKeyinfo, libc.Int32FromUint32(nRec), aRec)
if !((*TPreUpdate)(unsafe.Pointer(p)).FpUnpacked != 0) {
rc = int32(SQLITE_NOMEM)
}
@@ -66915,7 +67097,7 @@ func Xsqlite3_preupdate_old(tls *libc.TLS, db uintptr, iIdx int32, ppValue uintp
})(unsafe.Pointer((*TPreUpdate)(unsafe.Pointer(p)).FpTab + 44))).FpDfltList + 8 + uintptr(libc.Int32FromUint16((*TColumn)(unsafe.Pointer(pCol)).FiDflt)-int32(1))*20))).FpExpr
rc = _sqlite3ValueFromExpr(tls, db, pDflt, (*Tsqlite3)(unsafe.Pointer(db)).Fenc, libc.Uint8FromInt8((*TColumn)(unsafe.Pointer(pCol)).Faffinity), bp)
if rc == SQLITE_OK && *(*uintptr)(unsafe.Pointer(bp)) == uintptr(0) {
- rc = _sqlite3CorruptError(tls, int32(92908))
+ rc = _sqlite3CorruptError(tls, int32(93701))
}
*(*uintptr)(unsafe.Pointer((*TPreUpdate)(unsafe.Pointer(p)).FapDflt + uintptr(iIdx)*4)) = *(*uintptr)(unsafe.Pointer(bp))
}
@@ -66950,7 +67132,7 @@ func Xsqlite3_preupdate_count(tls *libc.TLS, db uintptr) (r int32) {
_, _ = p, v1
p = (*Tsqlite3)(unsafe.Pointer(db)).FpPreUpdate
if p != 0 {
- v1 = libc.Int32FromUint16((*TPreUpdate)(unsafe.Pointer(p)).Fkeyinfo.FnKeyField)
+ v1 = libc.Int32FromUint16((*TKeyInfo)(unsafe.Pointer((*TPreUpdate)(unsafe.Pointer(p)).FpKeyinfo)).FnKeyField)
} else {
v1 = 0
}
@@ -67016,11 +67198,11 @@ func Xsqlite3_preupdate_new(tls *libc.TLS, db uintptr, iIdx int32, ppValue uintp
iStore = 0
p = (*Tsqlite3)(unsafe.Pointer(db)).FpPreUpdate
if !(p != 0) || (*TPreUpdate)(unsafe.Pointer(p)).Fop == int32(SQLITE_DELETE) {
- rc = _sqlite3MisuseError(tls, int32(93004))
+ rc = _sqlite3MisuseError(tls, int32(93797))
goto preupdate_new_out
}
if (*TPreUpdate)(unsafe.Pointer(p)).FpPk != 0 && (*TPreUpdate)(unsafe.Pointer(p)).Fop != int32(SQLITE_UPDATE) {
- iStore = int32(_sqlite3TableColumnToIndex(tls, (*TPreUpdate)(unsafe.Pointer(p)).FpPk, int16(iIdx)))
+ iStore = _sqlite3TableColumnToIndex(tls, (*TPreUpdate)(unsafe.Pointer(p)).FpPk, iIdx)
} else {
iStore = int32(_sqlite3TableColumnToStorage(tls, (*TPreUpdate)(unsafe.Pointer(p)).FpTab, int16(iIdx)))
}
@@ -67043,7 +67225,7 @@ func Xsqlite3_preupdate_new(tls *libc.TLS, db uintptr, iIdx int32, ppValue uintp
if rc != SQLITE_OK {
goto preupdate_new_out
}
- pUnpack = _vdbeUnpackRecord(tls, p+16, (*TMem)(unsafe.Pointer(pData)).Fn, (*TMem)(unsafe.Pointer(pData)).Fz)
+ pUnpack = _vdbeUnpackRecord(tls, (*TPreUpdate)(unsafe.Pointer(p)).FpKeyinfo, (*TMem)(unsafe.Pointer(pData)).Fn, (*TMem)(unsafe.Pointer(pData)).Fz)
if !(pUnpack != 0) {
rc = int32(SQLITE_NOMEM)
goto preupdate_new_out
@@ -67192,7 +67374,7 @@ func _sqlite3VdbeExpandSql(tls *libc.TLS, p uintptr, zRawSql uintptr) (r uintptr
break
}
}
- Xsqlite3_str_append(tls, bp+8, __ccgo_ts+5631, int32(3))
+ Xsqlite3_str_append(tls, bp+8, __ccgo_ts+5657, int32(3))
Xsqlite3_str_append(tls, bp+8, zStart, int32(zRawSql)-int32(zStart))
}
} else {
@@ -67230,7 +67412,7 @@ func _sqlite3VdbeExpandSql(tls *libc.TLS, p uintptr, zRawSql uintptr) (r uintptr
Xsqlite3_str_appendf(tls, bp+8, __ccgo_ts+1428, libc.VaList(bp+80, *(*Ti64)(unsafe.Pointer(pVar))))
} else {
if libc.Int32FromUint16((*TMem)(unsafe.Pointer(pVar)).Fflags)&int32(MEM_Real) != 0 {
- Xsqlite3_str_appendf(tls, bp+8, __ccgo_ts+5136, libc.VaList(bp+80, *(*float64)(unsafe.Pointer(pVar))))
+ Xsqlite3_str_appendf(tls, bp+8, __ccgo_ts+5162, libc.VaList(bp+80, *(*float64)(unsafe.Pointer(pVar))))
} else {
if libc.Int32FromUint16((*TMem)(unsafe.Pointer(pVar)).Fflags)&int32(MEM_Str) != 0 { /* Number of bytes of the string text to include in output */
enc = (*Tsqlite3)(unsafe.Pointer(db)).Fenc
@@ -67245,28 +67427,28 @@ func _sqlite3VdbeExpandSql(tls *libc.TLS, p uintptr, zRawSql uintptr) (r uintptr
pVar = bp + 32
}
nOut = (*TMem)(unsafe.Pointer(pVar)).Fn
- Xsqlite3_str_appendf(tls, bp+8, __ccgo_ts+5635, libc.VaList(bp+80, nOut, (*TMem)(unsafe.Pointer(pVar)).Fz))
+ Xsqlite3_str_appendf(tls, bp+8, __ccgo_ts+5661, libc.VaList(bp+80, nOut, (*TMem)(unsafe.Pointer(pVar)).Fz))
if libc.Int32FromUint8(enc) != int32(SQLITE_UTF8) {
_sqlite3VdbeMemRelease(tls, bp+32)
}
} else {
if libc.Int32FromUint16((*TMem)(unsafe.Pointer(pVar)).Fflags)&int32(MEM_Zero) != 0 {
- Xsqlite3_str_appendf(tls, bp+8, __ccgo_ts+5642, libc.VaList(bp+80, *(*int32)(unsafe.Pointer(&(*TMem)(unsafe.Pointer(pVar)).Fu))))
+ Xsqlite3_str_appendf(tls, bp+8, __ccgo_ts+5668, libc.VaList(bp+80, *(*int32)(unsafe.Pointer(&(*TMem)(unsafe.Pointer(pVar)).Fu))))
} else { /* Number of bytes of the blob to include in output */
- Xsqlite3_str_append(tls, bp+8, __ccgo_ts+5655, int32(2))
+ Xsqlite3_str_append(tls, bp+8, __ccgo_ts+5681, int32(2))
nOut1 = (*TMem)(unsafe.Pointer(pVar)).Fn
i = 0
for {
if !(i < nOut1) {
break
}
- Xsqlite3_str_appendf(tls, bp+8, __ccgo_ts+5658, libc.VaList(bp+80, int32(*(*int8)(unsafe.Pointer((*TMem)(unsafe.Pointer(pVar)).Fz + uintptr(i))))&int32(0xff)))
+ Xsqlite3_str_appendf(tls, bp+8, __ccgo_ts+5684, libc.VaList(bp+80, int32(*(*int8)(unsafe.Pointer((*TMem)(unsafe.Pointer(pVar)).Fz + uintptr(i))))&int32(0xff)))
goto _3
_3:
;
i++
}
- Xsqlite3_str_append(tls, bp+8, __ccgo_ts+5663, int32(1))
+ Xsqlite3_str_append(tls, bp+8, __ccgo_ts+5689, int32(1))
}
}
}
@@ -67430,9 +67612,9 @@ func _sqlite3VdbeExpandSql(tls *libc.TLS, p uintptr, zRawSql uintptr) (r uintptr
// ** if we run out of memory.
// */
func _allocateCursor(tls *libc.TLS, p uintptr, iCur int32, nField int32, eCurType Tu8) (r uintptr) {
- var nByte, v2 int32
- var pCx, pMem, v1, v3, v4 uintptr
- _, _, _, _, _, _, _ = nByte, pCx, pMem, v1, v2, v3, v4
+ var nByte Ti64
+ var pCx, pMem, v1, v2, v3 uintptr
+ _, _, _, _, _, _ = nByte, pCx, pMem, v1, v2, v3
if iCur > 0 {
v1 = (*TVdbe)(unsafe.Pointer(p)).FaMem + uintptr((*TVdbe)(unsafe.Pointer(p)).FnMem-iCur)*40
} else {
@@ -67458,12 +67640,10 @@ func _allocateCursor(tls *libc.TLS, p uintptr, iCur int32, nField int32, eCurTyp
*/
pMem = v1
pCx = uintptr(0)
+ nByte = libc.Int64FromUint32((uint32(libc.UintptrFromInt32(0)+84)+libc.Uint32FromInt32(7))&libc.Uint32FromInt32(^libc.Int32FromInt32(7)) + libc.Uint32FromInt32(nField+libc.Int32FromInt32(1))*libc.Uint32FromInt64(8))
if libc.Int32FromUint8(eCurType) == CURTYPE_BTREE {
- v2 = _sqlite3BtreeCursorSize(tls)
- } else {
- v2 = 0
+ nByte += int64(_sqlite3BtreeCursorSize(tls))
}
- nByte = libc.Int32FromUint32((libc.Uint32FromInt64(88)+libc.Uint32FromInt32(7))&libc.Uint32FromInt32(^libc.Int32FromInt32(7)) + libc.Uint32FromInt32(2)*libc.Uint32FromInt64(4)*libc.Uint32FromInt32(nField) + libc.Uint32FromInt32(v2))
if *(*uintptr)(unsafe.Pointer((*TVdbe)(unsafe.Pointer(p)).FapCsr + uintptr(iCur)*4)) != 0 { /*OPTIMIZATION-IF-FALSE*/
_sqlite3VdbeFreeCursorNN(tls, p, *(*uintptr)(unsafe.Pointer((*TVdbe)(unsafe.Pointer(p)).FapCsr + uintptr(iCur)*4)))
*(*uintptr)(unsafe.Pointer((*TVdbe)(unsafe.Pointer(p)).FapCsr + uintptr(iCur)*4)) = uintptr(0)
@@ -67472,28 +67652,28 @@ func _allocateCursor(tls *libc.TLS, p uintptr, iCur int32, nField int32, eCurTyp
** the pMem used to hold space for the cursor has enough storage available
** in pMem->zMalloc. But for the special case of the aMem[] entries used
** to hold cursors, it is faster to in-line the logic. */
- if (*TMem)(unsafe.Pointer(pMem)).FszMalloc < nByte {
+ if int64((*TMem)(unsafe.Pointer(pMem)).FszMalloc) < nByte {
if (*TMem)(unsafe.Pointer(pMem)).FszMalloc > 0 {
_sqlite3DbFreeNN(tls, (*TMem)(unsafe.Pointer(pMem)).Fdb, (*TMem)(unsafe.Pointer(pMem)).FzMalloc)
}
- v3 = _sqlite3DbMallocRaw(tls, (*TMem)(unsafe.Pointer(pMem)).Fdb, libc.Uint64FromInt32(nByte))
- (*TMem)(unsafe.Pointer(pMem)).FzMalloc = v3
- (*TMem)(unsafe.Pointer(pMem)).Fz = v3
+ v2 = _sqlite3DbMallocRaw(tls, (*TMem)(unsafe.Pointer(pMem)).Fdb, libc.Uint64FromInt64(nByte))
+ (*TMem)(unsafe.Pointer(pMem)).FzMalloc = v2
+ (*TMem)(unsafe.Pointer(pMem)).Fz = v2
if (*TMem)(unsafe.Pointer(pMem)).FzMalloc == uintptr(0) {
(*TMem)(unsafe.Pointer(pMem)).FszMalloc = 0
return uintptr(0)
}
- (*TMem)(unsafe.Pointer(pMem)).FszMalloc = nByte
+ (*TMem)(unsafe.Pointer(pMem)).FszMalloc = int32(nByte)
}
- v4 = (*TMem)(unsafe.Pointer(pMem)).FzMalloc
- pCx = v4
- *(*uintptr)(unsafe.Pointer((*TVdbe)(unsafe.Pointer(p)).FapCsr + uintptr(iCur)*4)) = v4
+ v3 = (*TMem)(unsafe.Pointer(pMem)).FzMalloc
+ pCx = v3
+ *(*uintptr)(unsafe.Pointer((*TVdbe)(unsafe.Pointer(p)).FapCsr + uintptr(iCur)*4)) = v3
libc.Xmemset(tls, pCx, 0, uint32(libc.UintptrFromInt32(0)+32))
(*TVdbeCursor)(unsafe.Pointer(pCx)).FeCurType = eCurType
(*TVdbeCursor)(unsafe.Pointer(pCx)).FnField = int16(nField)
(*TVdbeCursor)(unsafe.Pointer(pCx)).FaOffset = pCx + 84 + uintptr(nField)*4
if libc.Int32FromUint8(eCurType) == CURTYPE_BTREE {
- *(*uintptr)(unsafe.Pointer(pCx + 36)) = (*TMem)(unsafe.Pointer(pMem)).Fz + uintptr((libc.Uint32FromInt64(88)+libc.Uint32FromInt32(7))&libc.Uint32FromInt32(^libc.Int32FromInt32(7))+libc.Uint32FromInt32(2)*libc.Uint32FromInt64(4)*libc.Uint32FromInt32(nField))
+ *(*uintptr)(unsafe.Pointer(pCx + 36)) = (*TMem)(unsafe.Pointer(pMem)).Fz + uintptr((uint32(libc.UintptrFromInt32(0)+84)+libc.Uint32FromInt32(7))&libc.Uint32FromInt32(^libc.Int32FromInt32(7))+libc.Uint32FromInt32(nField+libc.Int32FromInt32(1))*libc.Uint32FromInt64(8))
_sqlite3BtreeCursorZero(tls, *(*uintptr)(unsafe.Pointer(pCx + 36)))
}
return pCx
@@ -67884,12 +68064,12 @@ func _sqlite3VdbeExec(tls *libc.TLS, p uintptr) (r int32) {
defer tls.Free(704)
var aCol, aMem, aOffset, aOp, aPermute, aRoot, apArg, apArg1, db, pArgc, pBt, pBt1, pBt2, pBt3, pC, pC1, pC10, pC11, pC12, pC13, pC14, pC15, pC16, pC17, pC18, pC19, pC2, pC20, pC21, pC22, pC23, pC24, pC25, pC26, pC27, pC28, pC29, pC3, pC30, pC31, pC32, pC4, pC5, pC6, pC7, pC8, pC9, pCaller, pColl, pCrsr, pCrsr1, pCrsr2, pCrsr3, pCrsr4, pCrsr5, pCrsr6, pCrsr7, pCtx, pCtx1, pCtx2, pCur, pCur1, pCur2, pCur3, pCur4, pCur5, pCur6, pCx, pCx1, pCx2, pCx3, pData, pData0, pDb, pDb1, pDb2, pDb3, pDest, pDest1, pDest2, pEnd, pFrame, pFrame1, pFrame2, pFrame3, pFrame4, pIdxKey, pIn, pIn1, pIn2, pIn3, pKey, pKeyInfo, pKeyInfo1, pKeyInfo2, pLast, pMem, pMem1, pMem2, pMem3, pMem4, pModule, pModule1, pModule2, pModule3, pModule4, pModule5, pModule6, pName, pNew, pOp, pOrig, pOut, pPager, pProgram, pQuery, pRec, pReg, pRhs, pRt, pSavepoint, pSrc, pTab, pTab1, pTab2, pTab3, pTabCur, pTmp, pVCur1, pVTab, pVar, pVtab, pVtab1, pVtab2, pVtab3, pVtab4, pVtab5, pVtab6, pVtab7, pX, pX1, pnErr, t1, z1, z2, z3, zAffinity, zAffinity1, zData, zDb, zDb1, zEndHdr, zErr, zFilename, zHdr, zHdr1, zName, zPayload, zSchema, zSql, zTab, zTrace, v240, v241, v242, v250, v251, v252, v253, v255, v263, v278, v279, v286, v288, v297, v298, p189, p192, p193, p196, p199, p208, p209, p212, p227, p228, p229, p230, p231, p232, p233, p234, p235, p236, p237, p238, p239, p293, p294, p295, p296 uintptr
var affinity int8
- var alreadyExists, bRev, c, c1, c2, cnt, cnt1, desiredAutoCommit, eNew, eOld, eqOnly, exists, i, i1, i2, i4, i5, i6, i7, i8, i9, iCompare, iCookie, iDb, iDb1, iDb2, iDb3, iQuery, iRollback, iSavepoint, iSet, ii, ii1, isLegacy, isSchemaChange, isTransaction, len1, n, n1, n2, n4, nArg, nArg1, nByte2, nField, nField1, nField2, nHdr, nKeyCol, nMem, nName, nRoot, nStep, nVarint, oc, opflags, p1, p11, p12, p13, p2, p21, pcDest, pcx, rc, res, res10, res11, res12, res21, savedAnalysisLimit, seekResult, v11, v21, wrFlag, v188, v191, v194, v197, v198, v205, v206, v207, v223, v224, v244, v245, v248, v249, v256, v260, v265, v266, v269, v270, v272, v273, v274, v275, v284, v287, v291 int32
+ var alreadyExists, bRev, c, c1, c2, cnt, cnt1, desiredAutoCommit, eNew, eOld, eqOnly, exists, i, i1, i2, i4, i5, i6, i7, i8, i9, iCompare, iCookie, iDb, iDb1, iDb2, iDb3, iQuery, iRollback, iSavepoint, iSet, ii, ii1, isLegacy, isSchemaChange, isTransaction, len1, n, n1, n2, n4, nArg, nArg1, nField, nField1, nField2, nHdr, nKeyCol, nMem, nName, nRoot, nStep, nVarint, oc, opflags, p1, p11, p12, p13, p2, p21, pcDest, pcx, rc, res, res10, res11, res12, res21, savedAnalysisLimit, seekResult, v11, v21, wrFlag, v188, v191, v194, v197, v198, v205, v206, v207, v223, v224, v244, v245, v248, v249, v256, v260, v265, v266, v269, v270, v272, v273, v274, v275, v284, v287, v291 int32
var colCacheCtr, iAddr, iMap, iPrior, idx, len11, n3, p22, p23, serialType, serial_type, v213, v214, v216, v221, v222 Tu32
var encoding, isWriteLock, mTrace, op, p5, resetSchemaOnFault, vtabOnConflict, v225 Tu8
var flags1, flags11, flags2, flags3, flags31, newType, nullFlag, type1, type2, typeMask, v190 Tu16
var h, h1, iKey1, nAlloc, nData, nProgressLimit, nVmStep, offset64, uu Tu64
- var i3, iA, iB1, iKey, iKey2, nByte, nByte1, nCellKey, nZero, sz, v254, v262 Ti64
+ var i3, iA, iB1, iKey, iKey2, nByte, nByte1, nByte2, nCellKey, nZero, sz, v254, v262 Ti64
var newMax, v211 uint32
var rA, rB float64
var xAuth Tsqlite3_xauth
@@ -67906,7 +68086,7 @@ func _sqlite3VdbeExec(tls *libc.TLS, p uintptr) (r int32) {
var _ /* nChange at bp+448 */ Ti64
var _ /* nEntry at bp+80 */ Ti64
var _ /* nErr at bp+492 */ int32
- var _ /* nullFunc at bp+612 */ TFuncDef
+ var _ /* nullFunc at bp+608 */ TFuncDef
var _ /* pVCur at bp+572 */ uintptr
var _ /* pgno at bp+456 */ TPgno
var _ /* r at bp+100 */ TUnpackedRecord
@@ -67924,7 +68104,7 @@ func _sqlite3VdbeExec(tls *libc.TLS, p uintptr) (r int32) {
var _ /* res at bp+332 */ int32
var _ /* res at bp+96 */ int32
var _ /* rowid at bp+368 */ Ti64
- var _ /* rowid at bp+656 */ Tsqlite_int64
+ var _ /* rowid at bp+648 */ Tsqlite_int64
var _ /* sContext at bp+580 */ Tsqlite3_context
var _ /* sMem at bp+24 */ TMem
var _ /* sMem at bp+532 */ TMem
@@ -68638,19 +68818,19 @@ func _sqlite3VdbeExec(tls *libc.TLS, p uintptr) (r int32) {
if (*TVdbe)(unsafe.Pointer(p)).Frc != 0 {
if (*TOp)(unsafe.Pointer(pOp)).Fp3 > 0 && int32((*TOp)(unsafe.Pointer(pOp)).Fp4type) == P4_NOTUSED {
zErr = _sqlite3ValueText(tls, aMem+uintptr((*TOp)(unsafe.Pointer(pOp)).Fp3)*40, uint8(SQLITE_UTF8))
- _sqlite3VdbeError(tls, p, __ccgo_ts+3864, libc.VaList(bp+672, zErr))
+ _sqlite3VdbeError(tls, p, __ccgo_ts+3890, libc.VaList(bp+664, zErr))
} else {
if (*TOp)(unsafe.Pointer(pOp)).Fp5 != 0 {
- _sqlite3VdbeError(tls, p, __ccgo_ts+5699, libc.VaList(bp+672, _azType[libc.Int32FromUint16((*TOp)(unsafe.Pointer(pOp)).Fp5)-int32(1)]))
+ _sqlite3VdbeError(tls, p, __ccgo_ts+5725, libc.VaList(bp+664, _azType[libc.Int32FromUint16((*TOp)(unsafe.Pointer(pOp)).Fp5)-int32(1)]))
if *(*uintptr)(unsafe.Pointer(pOp + 16)) != 0 {
- (*TVdbe)(unsafe.Pointer(p)).FzErrMsg = _sqlite3MPrintf(tls, db, __ccgo_ts+5720, libc.VaList(bp+672, (*TVdbe)(unsafe.Pointer(p)).FzErrMsg, *(*uintptr)(unsafe.Pointer(pOp + 16))))
+ (*TVdbe)(unsafe.Pointer(p)).FzErrMsg = _sqlite3MPrintf(tls, db, __ccgo_ts+5746, libc.VaList(bp+664, (*TVdbe)(unsafe.Pointer(p)).FzErrMsg, *(*uintptr)(unsafe.Pointer(pOp + 16))))
}
} else {
- _sqlite3VdbeError(tls, p, __ccgo_ts+3864, libc.VaList(bp+672, *(*uintptr)(unsafe.Pointer(pOp + 16))))
+ _sqlite3VdbeError(tls, p, __ccgo_ts+3890, libc.VaList(bp+664, *(*uintptr)(unsafe.Pointer(pOp + 16))))
}
}
pcx = (int32(pOp) - int32(aOp)) / 20
- Xsqlite3_log(tls, (*TOp)(unsafe.Pointer(pOp)).Fp1, __ccgo_ts+5727, libc.VaList(bp+672, pcx, (*TVdbe)(unsafe.Pointer(p)).FzSql, (*TVdbe)(unsafe.Pointer(p)).FzErrMsg))
+ Xsqlite3_log(tls, (*TOp)(unsafe.Pointer(pOp)).Fp1, __ccgo_ts+5753, libc.VaList(bp+664, pcx, (*TVdbe)(unsafe.Pointer(p)).FzErrMsg, (*TVdbe)(unsafe.Pointer(p)).FzSql))
}
rc = _sqlite3VdbeHalt(tls, p)
if rc == int32(SQLITE_BUSY) {
@@ -69864,7 +70044,7 @@ func _sqlite3VdbeExec(tls *libc.TLS, p uintptr) (r int32) {
*(*Ti64)(unsafe.Pointer(pOut)) = ^_sqlite3VdbeIntValue(tls, pIn1)
}
goto _187
- /* Opcode: Once P1 P2 * * *
+ /* Opcode: Once P1 P2 P3 * *
**
** Fall through to the next instruction the first time this opcode is
** encountered on each invocation of the byte-code program. Jump to P2
@@ -69880,6 +70060,12 @@ func _sqlite3VdbeExec(tls *libc.TLS, p uintptr) (r int32) {
** whether or not the jump should be taken. The bitmask is necessary
** because the self-altering code trick does not work for recursive
** triggers.
+ **
+ ** The P3 operand is not used directly by this opcode. However P3 is
+ ** used by the code generator as follows: If this opcode is the start
+ ** of a subroutine and that subroutine uses a Bloom filter, then P3 will
+ ** be the register that holds that Bloom filter. See tag-202407032019
+ ** in the source code for implementation details.
*/
_56:
; /* Address of this instruction */
@@ -70373,7 +70559,7 @@ func _sqlite3VdbeExec(tls *libc.TLS, p uintptr) (r int32) {
pOp = aOp + uintptr((*(*TOp)(unsafe.Pointer(aOp))).Fp3-int32(1))*20
goto _187
} else {
- rc = _sqlite3CorruptError(tls, int32(96761))
+ rc = _sqlite3CorruptError(tls, int32(97561))
goto abort_due_to_error
}
/* Opcode: TypeCheck P1 P2 P3 P4 *
@@ -70476,7 +70662,7 @@ func _sqlite3VdbeExec(tls *libc.TLS, p uintptr) (r int32) {
goto vdbe_type_error
vdbe_type_error:
;
- _sqlite3VdbeError(tls, p, __ccgo_ts+5751, libc.VaList(bp+672, _vdbeMemTypeName(tls, pIn1), _sqlite3StdType[int32(uint32(*(*uint8)(unsafe.Pointer(aCol + uintptr(i2)*12 + 4))&0xf0>>4))-int32(1)], (*TTable)(unsafe.Pointer(pTab)).FzName, (*(*TColumn)(unsafe.Pointer(aCol + uintptr(i2)*12))).FzCnName))
+ _sqlite3VdbeError(tls, p, __ccgo_ts+5775, libc.VaList(bp+664, _vdbeMemTypeName(tls, pIn1), _sqlite3StdType[int32(uint32(*(*uint8)(unsafe.Pointer(aCol + uintptr(i2)*12 + 4))&0xf0>>4))-int32(1)], (*TTable)(unsafe.Pointer(pTab)).FzName, (*(*TColumn)(unsafe.Pointer(aCol + uintptr(i2)*12))).FzCnName))
rc = libc.Int32FromInt32(SQLITE_CONSTRAINT) | libc.Int32FromInt32(12)<<libc.Int32FromInt32(8)
goto abort_due_to_error
/* Opcode: Affinity P1 P2 * P4 *
@@ -70882,7 +71068,7 @@ func _sqlite3VdbeExec(tls *libc.TLS, p uintptr) (r int32) {
/* A new savepoint cannot be created if there are active write
** statements (i.e. open read/write incremental blob handles).
*/
- _sqlite3VdbeError(tls, p, __ccgo_ts+5792, 0)
+ _sqlite3VdbeError(tls, p, __ccgo_ts+5816, 0)
rc = int32(SQLITE_BUSY)
} else {
nName = _sqlite3Strlen30(tls, zName)
@@ -70930,14 +71116,14 @@ func _sqlite3VdbeExec(tls *libc.TLS, p uintptr) (r int32) {
pSavepoint = (*TSavepoint)(unsafe.Pointer(pSavepoint)).FpNext
}
if !(pSavepoint != 0) {
- _sqlite3VdbeError(tls, p, __ccgo_ts+5843, libc.VaList(bp+672, zName))
+ _sqlite3VdbeError(tls, p, __ccgo_ts+5867, libc.VaList(bp+664, zName))
rc = int32(SQLITE_ERROR)
} else {
if (*Tsqlite3)(unsafe.Pointer(db)).FnVdbeWrite > 0 && p12 == int32(SAVEPOINT_RELEASE) {
/* It is not possible to release (commit) a savepoint if there are
** active write statements.
*/
- _sqlite3VdbeError(tls, p, __ccgo_ts+5865, 0)
+ _sqlite3VdbeError(tls, p, __ccgo_ts+5889, 0)
rc = int32(SQLITE_BUSY)
} else {
/* Determine whether or not this is a transaction savepoint. If so,
@@ -71072,7 +71258,7 @@ func _sqlite3VdbeExec(tls *libc.TLS, p uintptr) (r int32) {
/* If this instruction implements a COMMIT and other VMs are writing
** return an error indicating that the other VMs must complete first.
*/
- _sqlite3VdbeError(tls, p, __ccgo_ts+5919, 0)
+ _sqlite3VdbeError(tls, p, __ccgo_ts+5943, 0)
rc = int32(SQLITE_BUSY)
goto abort_due_to_error
} else {
@@ -71102,12 +71288,12 @@ func _sqlite3VdbeExec(tls *libc.TLS, p uintptr) (r int32) {
goto vdbe_return
} else {
if !(desiredAutoCommit != 0) {
- v250 = __ccgo_ts + 5974
+ v250 = __ccgo_ts + 5998
} else {
if iRollback != 0 {
- v251 = __ccgo_ts + 6022
+ v251 = __ccgo_ts + 6046
} else {
- v251 = __ccgo_ts + 6065
+ v251 = __ccgo_ts + 6089
}
v250 = v251
}
@@ -71199,7 +71385,7 @@ func _sqlite3VdbeExec(tls *libc.TLS, p uintptr) (r int32) {
** SQL statement was prepared.
*/
_sqlite3DbFree(tls, db, (*TVdbe)(unsafe.Pointer(p)).FzErrMsg)
- (*TVdbe)(unsafe.Pointer(p)).FzErrMsg = _sqlite3DbStrDup(tls, db, __ccgo_ts+6106)
+ (*TVdbe)(unsafe.Pointer(p)).FzErrMsg = _sqlite3DbStrDup(tls, db, __ccgo_ts+6130)
/* If the schema-cookie from the database file matches the cookie
** stored with the in-memory representation of the schema, do
** not reload the schema from the database file.
@@ -72310,7 +72496,7 @@ func _sqlite3VdbeExec(tls *libc.TLS, p uintptr) (r int32) {
(*TVdbeCursor)(unsafe.Pointer(pC10)).FseekResult = *(*int32)(unsafe.Pointer(bp + 188))
if *(*int32)(unsafe.Pointer(bp + 188)) != 0 {
if (*TOp)(unsafe.Pointer(pOp)).Fp2 == 0 {
- rc = _sqlite3CorruptError(tls, int32(99022))
+ rc = _sqlite3CorruptError(tls, int32(99822))
} else {
goto jump_to_p2
}
@@ -72769,7 +72955,7 @@ func _sqlite3VdbeExec(tls *libc.TLS, p uintptr) (r int32) {
/* The OP_RowData opcodes always follow OP_NotExists or
** OP_SeekRowid or OP_Rewind/Op_Next with no intervening instructions
** that might invalidate the cursor.
- ** If this where not the case, on of the following assert()s
+ ** If this were not the case, one of the following assert()s
** would fail. Should this ever change (because of changes in the code
** generator) then the fix would be to insert a call to
** sqlite3VdbeCursorMoveto().
@@ -73202,7 +73388,7 @@ func _sqlite3VdbeExec(tls *libc.TLS, p uintptr) (r int32) {
}
} else {
if (*TOp)(unsafe.Pointer(pOp)).Fp5 != 0 && !(_sqlite3WritableSchema(tls, db) != 0) {
- rc = _sqlite3ReportError(tls, libc.Int32FromInt32(SQLITE_CORRUPT)|libc.Int32FromInt32(3)<<libc.Int32FromInt32(8), int32(100114), __ccgo_ts+6134)
+ rc = _sqlite3ReportError(tls, libc.Int32FromInt32(SQLITE_CORRUPT)|libc.Int32FromInt32(3)<<libc.Int32FromInt32(8), int32(100914), __ccgo_ts+6158)
goto abort_due_to_error
}
}
@@ -73357,7 +73543,7 @@ func _sqlite3VdbeExec(tls *libc.TLS, p uintptr) (r int32) {
/* nCellKey will always be between 0 and 0xffffffff because of the way
** that btreeParseCellPtr() and sqlite3GetVarint32() are implemented */
if nCellKey <= 0 || nCellKey > int64(0x7fffffff) {
- rc = _sqlite3CorruptError(tls, int32(100319))
+ rc = _sqlite3CorruptError(tls, int32(101119))
goto abort_due_to_error
}
_sqlite3VdbeMemInit(tls, bp+404, db, uint16(0))
@@ -73532,7 +73718,7 @@ func _sqlite3VdbeExec(tls *libc.TLS, p uintptr) (r int32) {
(*Tsqlite3)(unsafe.Pointer(db)).FmTrace = mTrace
(*Tsqlite3)(unsafe.Pointer(db)).FnAnalysisLimit = savedAnalysisLimit
if *(*uintptr)(unsafe.Pointer(bp + 460)) != 0 || rc != 0 {
- _sqlite3VdbeError(tls, p, __ccgo_ts+3864, libc.VaList(bp+672, *(*uintptr)(unsafe.Pointer(bp + 460))))
+ _sqlite3VdbeError(tls, p, __ccgo_ts+3890, libc.VaList(bp+664, *(*uintptr)(unsafe.Pointer(bp + 460))))
Xsqlite3_free(tls, *(*uintptr)(unsafe.Pointer(bp + 460)))
if rc == int32(SQLITE_NOMEM) {
goto no_mem
@@ -73563,13 +73749,13 @@ func _sqlite3VdbeExec(tls *libc.TLS, p uintptr) (r int32) {
*(*Tu32)(unsafe.Pointer(db + 24)) |= uint32(DBFLAG_SchemaChange)
libc.SetBitFieldPtr16Uint32(p+144, libc.Uint32FromInt32(0), 0, 0x3)
} else {
- zSchema = __ccgo_ts + 6151
+ zSchema = __ccgo_ts + 6175
(*(*TInitData)(unsafe.Pointer(bp + 464))).Fdb = db
(*(*TInitData)(unsafe.Pointer(bp + 464))).FiDb = iDb3
(*(*TInitData)(unsafe.Pointer(bp + 464))).FpzErrMsg = p + 120
(*(*TInitData)(unsafe.Pointer(bp + 464))).FmInitFlags = uint32(0)
(*(*TInitData)(unsafe.Pointer(bp + 464))).FmxPage = _sqlite3BtreeLastPage(tls, (*(*TDb)(unsafe.Pointer((*Tsqlite3)(unsafe.Pointer(db)).FaDb + uintptr(iDb3)*16))).FpBt)
- zSql = _sqlite3MPrintf(tls, db, __ccgo_ts+6165, libc.VaList(bp+672, (*(*TDb)(unsafe.Pointer((*Tsqlite3)(unsafe.Pointer(db)).FaDb + uintptr(iDb3)*16))).FzDbSName, zSchema, *(*uintptr)(unsafe.Pointer(pOp + 16))))
+ zSql = _sqlite3MPrintf(tls, db, __ccgo_ts+6189, libc.VaList(bp+664, (*(*TDb)(unsafe.Pointer((*Tsqlite3)(unsafe.Pointer(db)).FaDb + uintptr(iDb3)*16))).FzDbSName, zSchema, *(*uintptr)(unsafe.Pointer(pOp + 16))))
if zSql == uintptr(0) {
rc = int32(SQLITE_NOMEM)
} else {
@@ -73584,7 +73770,7 @@ func _sqlite3VdbeExec(tls *libc.TLS, p uintptr) (r int32) {
/* The OP_ParseSchema opcode with a non-NULL P4 argument should parse
** at least one SQL statement. Any less than that indicates that
** the sqlite_schema table is corrupt. */
- rc = _sqlite3CorruptError(tls, int32(100612))
+ rc = _sqlite3CorruptError(tls, int32(101412))
}
_sqlite3DbFreeNN(tls, db, zSql)
(*Tsqlite3)(unsafe.Pointer(db)).Finit1.Fbusy = uint8(0)
@@ -73821,7 +74007,7 @@ func _sqlite3VdbeExec(tls *libc.TLS, p uintptr) (r int32) {
}
if (*TVdbe)(unsafe.Pointer(p)).FnFrame >= *(*int32)(unsafe.Pointer(db + 116 + 10*4)) {
rc = int32(SQLITE_ERROR)
- _sqlite3VdbeError(tls, p, __ccgo_ts+6208, 0)
+ _sqlite3VdbeError(tls, p, __ccgo_ts+6232, 0)
goto abort_due_to_error
}
/* Register pRt is used to store the memory required to save the state
@@ -73838,15 +74024,15 @@ func _sqlite3VdbeExec(tls *libc.TLS, p uintptr) (r int32) {
if (*TSubProgram)(unsafe.Pointer(pProgram)).FnCsr == 0 {
nMem++
}
- nByte2 = libc.Int32FromUint32((libc.Uint32FromInt64(80)+libc.Uint32FromInt32(7))&libc.Uint32FromInt32(^libc.Int32FromInt32(7)) + libc.Uint32FromInt32(nMem)*uint32(40) + libc.Uint32FromInt32((*TSubProgram)(unsafe.Pointer(pProgram)).FnCsr)*uint32(4) + libc.Uint32FromInt32(((*TSubProgram)(unsafe.Pointer(pProgram)).FnOp+int32(7))/int32(8)))
- pFrame2 = _sqlite3DbMallocZero(tls, db, libc.Uint64FromInt32(nByte2))
+ nByte2 = libc.Int64FromUint32((libc.Uint32FromInt64(80)+libc.Uint32FromInt32(7))&libc.Uint32FromInt32(^libc.Int32FromInt32(7))+libc.Uint32FromInt32(nMem)*uint32(40)+libc.Uint32FromInt32((*TSubProgram)(unsafe.Pointer(pProgram)).FnCsr)*uint32(4)) + (int64(7)+int64((*TSubProgram)(unsafe.Pointer(pProgram)).FnOp))/int64(8)
+ pFrame2 = _sqlite3DbMallocZero(tls, db, libc.Uint64FromInt64(nByte2))
if !(pFrame2 != 0) {
goto no_mem
}
_sqlite3VdbeMemRelease(tls, pRt)
(*TMem)(unsafe.Pointer(pRt)).Fflags = libc.Uint16FromInt32(libc.Int32FromInt32(MEM_Blob) | libc.Int32FromInt32(MEM_Dyn))
(*TMem)(unsafe.Pointer(pRt)).Fz = pFrame2
- (*TMem)(unsafe.Pointer(pRt)).Fn = nByte2
+ (*TMem)(unsafe.Pointer(pRt)).Fn = int32(nByte2)
(*TMem)(unsafe.Pointer(pRt)).FxDel = __ccgo_fp(_sqlite3VdbeFrameMemDel)
(*TVdbeFrame)(unsafe.Pointer(pFrame2)).Fv = p
(*TVdbeFrame)(unsafe.Pointer(pFrame2)).FnChildMem = nMem
@@ -73927,11 +74113,11 @@ func _sqlite3VdbeExec(tls *libc.TLS, p uintptr) (r int32) {
*/
_144:
;
- if (*Tsqlite3)(unsafe.Pointer(db)).Fflags&uint64(SQLITE_DeferFKs) != 0 {
- *(*Ti64)(unsafe.Pointer(db + 528)) += int64((*TOp)(unsafe.Pointer(pOp)).Fp2)
+ if (*TOp)(unsafe.Pointer(pOp)).Fp1 != 0 {
+ *(*Ti64)(unsafe.Pointer(db + 520)) += int64((*TOp)(unsafe.Pointer(pOp)).Fp2)
} else {
- if (*TOp)(unsafe.Pointer(pOp)).Fp1 != 0 {
- *(*Ti64)(unsafe.Pointer(db + 520)) += int64((*TOp)(unsafe.Pointer(pOp)).Fp2)
+ if (*Tsqlite3)(unsafe.Pointer(db)).Fflags&uint64(SQLITE_DeferFKs) != 0 {
+ *(*Ti64)(unsafe.Pointer(db + 528)) += int64((*TOp)(unsafe.Pointer(pOp)).Fp2)
} else {
*(*Ti64)(unsafe.Pointer(p + 60)) += int64((*TOp)(unsafe.Pointer(pOp)).Fp2)
}
@@ -74143,7 +74329,7 @@ func _sqlite3VdbeExec(tls *libc.TLS, p uintptr) (r int32) {
**
** Note: We could avoid this by using a regular memory cell from aMem[] for
** the accumulator, instead of allocating one here. */
- nAlloc = uint64((libc.Uint32FromInt64(32) + libc.Uint32FromInt32(n4-libc.Int32FromInt32(1))*libc.Uint32FromInt64(4) + libc.Uint32FromInt32(7)) & libc.Uint32FromInt32(^libc.Int32FromInt32(7)))
+ nAlloc = uint64((uint32(libc.UintptrFromInt32(0)+28) + libc.Uint32FromInt32(n4)*libc.Uint32FromInt64(4) + libc.Uint32FromInt32(7)) & libc.Uint32FromInt32(^libc.Int32FromInt32(7)))
pCtx = _sqlite3DbMallocRawNN(tls, db, nAlloc+uint64(40))
if pCtx == uintptr(0) {
goto no_mem
@@ -74193,7 +74379,7 @@ func _sqlite3VdbeExec(tls *libc.TLS, p uintptr) (r int32) {
} /* IMP: R-24505-23230 */
if (*Tsqlite3_context)(unsafe.Pointer(pCtx1)).FisError != 0 {
if (*Tsqlite3_context)(unsafe.Pointer(pCtx1)).FisError > 0 {
- _sqlite3VdbeError(tls, p, __ccgo_ts+3864, libc.VaList(bp+672, Xsqlite3_value_text(tls, (*Tsqlite3_context)(unsafe.Pointer(pCtx1)).FpOut)))
+ _sqlite3VdbeError(tls, p, __ccgo_ts+3890, libc.VaList(bp+664, Xsqlite3_value_text(tls, (*Tsqlite3_context)(unsafe.Pointer(pCtx1)).FpOut)))
rc = (*Tsqlite3_context)(unsafe.Pointer(pCtx1)).FisError
}
if (*Tsqlite3_context)(unsafe.Pointer(pCtx1)).FskipFlag != 0 {
@@ -74249,7 +74435,7 @@ func _sqlite3VdbeExec(tls *libc.TLS, p uintptr) (r int32) {
rc = _sqlite3VdbeMemFinalize(tls, pMem3, *(*uintptr)(unsafe.Pointer(pOp + 16)))
}
if rc != 0 {
- _sqlite3VdbeError(tls, p, __ccgo_ts+3864, libc.VaList(bp+672, Xsqlite3_value_text(tls, pMem3)))
+ _sqlite3VdbeError(tls, p, __ccgo_ts+3890, libc.VaList(bp+664, Xsqlite3_value_text(tls, pMem3)))
goto abort_due_to_error
}
_sqlite3VdbeChangeEncoding(tls, pMem3, libc.Int32FromUint8(encoding))
@@ -74328,11 +74514,11 @@ func _sqlite3VdbeExec(tls *libc.TLS, p uintptr) (r int32) {
if !((*Tsqlite3)(unsafe.Pointer(db)).FautoCommit != 0) || (*Tsqlite3)(unsafe.Pointer(db)).FnVdbeRead > int32(1) {
rc = int32(SQLITE_ERROR)
if eNew == int32(PAGER_JOURNALMODE_WAL) {
- v286 = __ccgo_ts + 6245
+ v286 = __ccgo_ts + 6269
} else {
- v286 = __ccgo_ts + 6250
+ v286 = __ccgo_ts + 6274
}
- _sqlite3VdbeError(tls, p, __ccgo_ts+6257, libc.VaList(bp+672, v286))
+ _sqlite3VdbeError(tls, p, __ccgo_ts+6281, libc.VaList(bp+664, v286))
goto abort_due_to_error
} else {
if eOld == int32(PAGER_JOURNALMODE_WAL) {
@@ -74485,7 +74671,7 @@ func _sqlite3VdbeExec(tls *libc.TLS, p uintptr) (r int32) {
if rc != 0 {
if rc&int32(0xFF) == int32(SQLITE_LOCKED) {
z1 = *(*uintptr)(unsafe.Pointer(pOp + 16))
- _sqlite3VdbeError(tls, p, __ccgo_ts+6309, libc.VaList(bp+672, z1))
+ _sqlite3VdbeError(tls, p, __ccgo_ts+6333, libc.VaList(bp+664, z1))
}
goto abort_due_to_error
}
@@ -74647,7 +74833,7 @@ func _sqlite3VdbeExec(tls *libc.TLS, p uintptr) (r int32) {
(*TValueList)(unsafe.Pointer(pRhs)).FpOut = aMem + uintptr((*TOp)(unsafe.Pointer(pOp)).Fp3)*40
pOut = _out2Prerelease(tls, p, pOp)
(*TMem)(unsafe.Pointer(pOut)).Fflags = uint16(MEM_Null)
- _sqlite3VdbeMemSetPointer(tls, pOut, pRhs, __ccgo_ts+6338, __ccgo_fp(_sqlite3VdbeValueListFree))
+ _sqlite3VdbeMemSetPointer(tls, pOut, pRhs, __ccgo_ts+6362, __ccgo_fp(_sqlite3VdbeValueListFree))
goto _187
/* Opcode: VFilter P1 P2 P3 P4 *
** Synopsis: iplan=r[P3] zplan='P4'
@@ -74727,12 +74913,12 @@ func _sqlite3VdbeExec(tls *libc.TLS, p uintptr) (r int32) {
}
pVtab4 = (*Tsqlite3_vtab_cursor)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(pCur5 + 36)))).FpVtab
pModule4 = (*Tsqlite3_vtab)(unsafe.Pointer(pVtab4)).FpModule
- libc.Xmemset(tls, bp+580, 0, uint32(32))
+ libc.Xmemset(tls, bp+580, 0, uint32(28))
(*(*Tsqlite3_context)(unsafe.Pointer(bp + 580))).FpOut = pDest2
(*(*Tsqlite3_context)(unsafe.Pointer(bp + 580))).Fenc = encoding
- (*(*TFuncDef)(unsafe.Pointer(bp + 612))).FpUserData = uintptr(0)
- (*(*TFuncDef)(unsafe.Pointer(bp + 612))).FfuncFlags = uint32(SQLITE_RESULT_SUBTYPE)
- (*(*Tsqlite3_context)(unsafe.Pointer(bp + 580))).FpFunc = bp + 612
+ (*(*TFuncDef)(unsafe.Pointer(bp + 608))).FpUserData = uintptr(0)
+ (*(*TFuncDef)(unsafe.Pointer(bp + 608))).FfuncFlags = uint32(SQLITE_RESULT_SUBTYPE)
+ (*(*Tsqlite3_context)(unsafe.Pointer(bp + 580))).FpFunc = bp + 608
if libc.Int32FromUint16((*TOp)(unsafe.Pointer(pOp)).Fp5)&int32(OPFLAG_NOCHNG) != 0 {
_sqlite3VdbeMemSetNull(tls, pDest2)
(*TMem)(unsafe.Pointer(pDest2)).Fflags = libc.Uint16FromInt32(libc.Int32FromInt32(MEM_Null) | libc.Int32FromInt32(MEM_Zero))
@@ -74743,7 +74929,7 @@ func _sqlite3VdbeExec(tls *libc.TLS, p uintptr) (r int32) {
rc = (*(*func(*libc.TLS, uintptr, uintptr, int32) int32)(unsafe.Pointer(&struct{ uintptr }{(*Tsqlite3_module)(unsafe.Pointer(pModule4)).FxColumn})))(tls, *(*uintptr)(unsafe.Pointer(pCur5 + 36)), bp+580, (*TOp)(unsafe.Pointer(pOp)).Fp2)
_sqlite3VtabImportErrmsg(tls, p, pVtab4)
if (*(*Tsqlite3_context)(unsafe.Pointer(bp + 580))).FisError > 0 {
- _sqlite3VdbeError(tls, p, __ccgo_ts+3864, libc.VaList(bp+672, Xsqlite3_value_text(tls, pDest2)))
+ _sqlite3VdbeError(tls, p, __ccgo_ts+3890, libc.VaList(bp+664, Xsqlite3_value_text(tls, pDest2)))
rc = (*(*Tsqlite3_context)(unsafe.Pointer(bp + 580))).FisError
}
_sqlite3VdbeChangeEncoding(tls, pDest2, libc.Int32FromUint8(encoding))
@@ -74837,7 +75023,7 @@ func _sqlite3VdbeExec(tls *libc.TLS, p uintptr) (r int32) {
*/
_174:
;
- *(*Tsqlite_int64)(unsafe.Pointer(bp + 656)) = 0
+ *(*Tsqlite_int64)(unsafe.Pointer(bp + 648)) = 0
if (*Tsqlite3)(unsafe.Pointer(db)).FmallocFailed != 0 {
goto no_mem
}
@@ -74865,11 +75051,11 @@ func _sqlite3VdbeExec(tls *libc.TLS, p uintptr) (r int32) {
i7++
}
(*Tsqlite3)(unsafe.Pointer(db)).FvtabOnConflict = uint8((*TOp)(unsafe.Pointer(pOp)).Fp5)
- rc = (*(*func(*libc.TLS, uintptr, int32, uintptr, uintptr) int32)(unsafe.Pointer(&struct{ uintptr }{(*Tsqlite3_module)(unsafe.Pointer(pModule6)).FxUpdate})))(tls, pVtab7, nArg1, apArg1, bp+656)
+ rc = (*(*func(*libc.TLS, uintptr, int32, uintptr, uintptr) int32)(unsafe.Pointer(&struct{ uintptr }{(*Tsqlite3_module)(unsafe.Pointer(pModule6)).FxUpdate})))(tls, pVtab7, nArg1, apArg1, bp+648)
(*Tsqlite3)(unsafe.Pointer(db)).FvtabOnConflict = vtabOnConflict
_sqlite3VtabImportErrmsg(tls, p, pVtab7)
if rc == SQLITE_OK && (*TOp)(unsafe.Pointer(pOp)).Fp1 != 0 {
- (*Tsqlite3)(unsafe.Pointer(db)).FlastRowid = *(*Tsqlite_int64)(unsafe.Pointer(bp + 656))
+ (*Tsqlite3)(unsafe.Pointer(db)).FlastRowid = *(*Tsqlite_int64)(unsafe.Pointer(bp + 648))
}
if rc&int32(0xff) == int32(SQLITE_CONSTRAINT) && (*TVTable)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(pOp + 16)))).FbConstraint != 0 {
if libc.Int32FromUint16((*TOp)(unsafe.Pointer(pOp)).Fp5) == int32(OE_Ignore) {
@@ -74997,7 +75183,7 @@ func _sqlite3VdbeExec(tls *libc.TLS, p uintptr) (r int32) {
/* If the function returned an error, throw an exception */
if (*Tsqlite3_context)(unsafe.Pointer(pCtx2)).FisError != 0 {
if (*Tsqlite3_context)(unsafe.Pointer(pCtx2)).FisError > 0 {
- _sqlite3VdbeError(tls, p, __ccgo_ts+3864, libc.VaList(bp+672, Xsqlite3_value_text(tls, pOut)))
+ _sqlite3VdbeError(tls, p, __ccgo_ts+3890, libc.VaList(bp+664, Xsqlite3_value_text(tls, pOut)))
rc = (*Tsqlite3_context)(unsafe.Pointer(pCtx2)).FisError
}
_sqlite3VdbeDeleteAuxData(tls, db, p+220, (*Tsqlite3_context)(unsafe.Pointer(pCtx2)).FiOp, (*TOp)(unsafe.Pointer(pOp)).Fp1)
@@ -75148,7 +75334,7 @@ func _sqlite3VdbeExec(tls *libc.TLS, p uintptr) (r int32) {
Xsqlite3_free(tls, z2)
} else {
if (*Tsqlite3)(unsafe.Pointer(db)).FnVdbeExec > int32(1) {
- z3 = _sqlite3MPrintf(tls, db, __ccgo_ts+6348, libc.VaList(bp+672, zTrace))
+ z3 = _sqlite3MPrintf(tls, db, __ccgo_ts+6372, libc.VaList(bp+664, zTrace))
(*(*func(*libc.TLS, Tu32, uintptr, uintptr, uintptr) int32)(unsafe.Pointer(&struct{ uintptr }{*(*uintptr)(unsafe.Pointer(&(*Tsqlite3)(unsafe.Pointer(db)).Ftrace))})))(tls, uint32(SQLITE_TRACE_STMT), (*Tsqlite3)(unsafe.Pointer(db)).FpTraceArg, p, z3)
_sqlite3DbFree(tls, db, z3)
} else {
@@ -75235,15 +75421,15 @@ abort_due_to_error:
rc = int32(SQLITE_NOMEM)
} else {
if rc == libc.Int32FromInt32(SQLITE_IOERR)|libc.Int32FromInt32(33)<<libc.Int32FromInt32(8) {
- rc = _sqlite3CorruptError(tls, int32(102670))
+ rc = _sqlite3CorruptError(tls, int32(103474))
}
}
if (*TVdbe)(unsafe.Pointer(p)).FzErrMsg == uintptr(0) && rc != libc.Int32FromInt32(SQLITE_IOERR)|libc.Int32FromInt32(12)<<libc.Int32FromInt32(8) {
- _sqlite3VdbeError(tls, p, __ccgo_ts+3864, libc.VaList(bp+672, _sqlite3ErrStr(tls, rc)))
+ _sqlite3VdbeError(tls, p, __ccgo_ts+3890, libc.VaList(bp+664, _sqlite3ErrStr(tls, rc)))
}
(*TVdbe)(unsafe.Pointer(p)).Frc = rc
_sqlite3SystemError(tls, db, rc)
- Xsqlite3_log(tls, rc, __ccgo_ts+6354, libc.VaList(bp+672, (int32(pOp)-int32(aOp))/20, (*TVdbe)(unsafe.Pointer(p)).FzSql, (*TVdbe)(unsafe.Pointer(p)).FzErrMsg))
+ Xsqlite3_log(tls, rc, __ccgo_ts+6378, libc.VaList(bp+664, (int32(pOp)-int32(aOp))/20, (*TVdbe)(unsafe.Pointer(p)).FzErrMsg, (*TVdbe)(unsafe.Pointer(p)).FzSql))
if libc.Int32FromUint8((*TVdbe)(unsafe.Pointer(p)).FeVdbeState) == int32(VDBE_RUN_STATE) {
_sqlite3VdbeHalt(tls, p)
}
@@ -75282,7 +75468,7 @@ vdbe_return:
goto too_big
too_big:
;
- _sqlite3VdbeError(tls, p, __ccgo_ts+5508, 0)
+ _sqlite3VdbeError(tls, p, __ccgo_ts+5534, 0)
rc = int32(SQLITE_TOOBIG)
goto abort_due_to_error
/* Jump to here if a malloc() fails.
@@ -75306,10 +75492,10 @@ abort_due_to_interrupt:
}
var _azType = [4]uintptr{
- 0: __ccgo_ts + 5665,
- 1: __ccgo_ts + 5674,
- 2: __ccgo_ts + 5681,
- 3: __ccgo_ts + 5687,
+ 0: __ccgo_ts + 5691,
+ 1: __ccgo_ts + 5700,
+ 2: __ccgo_ts + 5707,
+ 3: __ccgo_ts + 5713,
}
var _and_logic = [9]uint8{
@@ -75463,13 +75649,13 @@ func _blobSeekToRow(tls *libc.TLS, p uintptr, iRow Tsqlite3_int64, pzErr uintptr
v2 = __ccgo_ts + 1653
} else {
if type1 == uint32(7) {
- v3 = __ccgo_ts + 6386
+ v3 = __ccgo_ts + 6411
} else {
- v3 = __ccgo_ts + 6391
+ v3 = __ccgo_ts + 6416
}
v2 = v3
}
- zErr = _sqlite3MPrintf(tls, (*TIncrblob)(unsafe.Pointer(p)).Fdb, __ccgo_ts+6399, libc.VaList(bp+8, v2))
+ zErr = _sqlite3MPrintf(tls, (*TIncrblob)(unsafe.Pointer(p)).Fdb, __ccgo_ts+6424, libc.VaList(bp+8, v2))
rc = int32(SQLITE_ERROR)
Xsqlite3_finalize(tls, (*TIncrblob)(unsafe.Pointer(p)).FpStmt)
(*TIncrblob)(unsafe.Pointer(p)).FpStmt = uintptr(0)
@@ -75487,10 +75673,10 @@ func _blobSeekToRow(tls *libc.TLS, p uintptr, iRow Tsqlite3_int64, pzErr uintptr
rc = Xsqlite3_finalize(tls, (*TIncrblob)(unsafe.Pointer(p)).FpStmt)
(*TIncrblob)(unsafe.Pointer(p)).FpStmt = uintptr(0)
if rc == SQLITE_OK {
- zErr = _sqlite3MPrintf(tls, (*TIncrblob)(unsafe.Pointer(p)).Fdb, __ccgo_ts+6428, libc.VaList(bp+8, iRow))
+ zErr = _sqlite3MPrintf(tls, (*TIncrblob)(unsafe.Pointer(p)).Fdb, __ccgo_ts+6453, libc.VaList(bp+8, iRow))
rc = int32(SQLITE_ERROR)
} else {
- zErr = _sqlite3MPrintf(tls, (*TIncrblob)(unsafe.Pointer(p)).Fdb, __ccgo_ts+3864, libc.VaList(bp+8, Xsqlite3_errmsg(tls, (*TIncrblob)(unsafe.Pointer(p)).Fdb)))
+ zErr = _sqlite3MPrintf(tls, (*TIncrblob)(unsafe.Pointer(p)).Fdb, __ccgo_ts+3890, libc.VaList(bp+8, Xsqlite3_errmsg(tls, (*TIncrblob)(unsafe.Pointer(p)).Fdb)))
}
}
}
@@ -75504,13 +75690,14 @@ func _blobSeekToRow(tls *libc.TLS, p uintptr, iRow Tsqlite3_int64, pzErr uintptr
// ** Open a blob handle.
// */
func Xsqlite3_blob_open(tls *libc.TLS, db uintptr, zDb uintptr, zTable uintptr, zColumn uintptr, iRow Tsqlite_int64, wrFlag int32, ppBlob uintptr) (r int32) {
- bp := tls.Alloc(320)
- defer tls.Free(320)
- var aOp, pBlob, pFKey, pIdx, pTab, v, zFault, v7 uintptr
- var iCol, iDb, j, j1, nAttempt, rc, v6 int32
+ bp := tls.Alloc(304)
+ defer tls.Free(304)
+ var aOp, pBlob, pFKey, pIdx, pTab, v, zFault, v8 uintptr
+ var iCol, iDb, j, j1, nAttempt, rc, v1, v7 int32
+ var v2 bool
var _ /* sParse at bp+4 */ TParse
var _ /* zErr at bp+0 */ uintptr
- _, _, _, _, _, _, _, _, _, _, _, _, _, _, _ = aOp, iCol, iDb, j, j1, nAttempt, pBlob, pFKey, pIdx, pTab, rc, v, zFault, v6, v7
+ _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _ = aOp, iCol, iDb, j, j1, nAttempt, pBlob, pFKey, pIdx, pTab, rc, v, zFault, v1, v2, v7, v8
nAttempt = 0 /* Index of zColumn in row-record */
rc = SQLITE_OK
*(*uintptr)(unsafe.Pointer(bp)) = uintptr(0)
@@ -75530,21 +75717,25 @@ func Xsqlite3_blob_open(tls *libc.TLS, db uintptr, zDb uintptr, zTable uintptr,
pTab = _sqlite3LocateTable(tls, bp+4, uint32(0), zTable, zDb)
if pTab != 0 && libc.Int32FromUint8((*TTable)(unsafe.Pointer(pTab)).FeTabType) == int32(TABTYP_VTAB) {
pTab = uintptr(0)
- _sqlite3ErrorMsg(tls, bp+4, __ccgo_ts+6448, libc.VaList(bp+304, zTable))
+ _sqlite3ErrorMsg(tls, bp+4, __ccgo_ts+6473, libc.VaList(bp+296, zTable))
}
if pTab != 0 && !((*TTable)(unsafe.Pointer(pTab)).FtabFlags&libc.Uint32FromInt32(TF_WithoutRowid) == libc.Uint32FromInt32(0)) {
pTab = uintptr(0)
- _sqlite3ErrorMsg(tls, bp+4, __ccgo_ts+6478, libc.VaList(bp+304, zTable))
+ _sqlite3ErrorMsg(tls, bp+4, __ccgo_ts+6503, libc.VaList(bp+296, zTable))
}
if pTab != 0 && (*TTable)(unsafe.Pointer(pTab)).FtabFlags&uint32(TF_HasGenerated) != uint32(0) {
pTab = uintptr(0)
- _sqlite3ErrorMsg(tls, bp+4, __ccgo_ts+6514, libc.VaList(bp+304, zTable))
+ _sqlite3ErrorMsg(tls, bp+4, __ccgo_ts+6539, libc.VaList(bp+296, zTable))
}
if pTab != 0 && libc.Int32FromUint8((*TTable)(unsafe.Pointer(pTab)).FeTabType) == int32(TABTYP_VIEW) {
pTab = uintptr(0)
- _sqlite3ErrorMsg(tls, bp+4, __ccgo_ts+6559, libc.VaList(bp+304, zTable))
+ _sqlite3ErrorMsg(tls, bp+4, __ccgo_ts+6584, libc.VaList(bp+296, zTable))
}
- if !(pTab != 0) {
+ if v2 = pTab == uintptr(0); !v2 {
+ v1 = _sqlite3SchemaToIndex(tls, db, (*TTable)(unsafe.Pointer(pTab)).FpSchema)
+ iDb = v1
+ }
+ if v2 || v1 == int32(1) && _sqlite3OpenTempDatabase(tls, bp+4) != 0 {
if (*(*TParse)(unsafe.Pointer(bp + 4))).FzErrMsg != 0 {
_sqlite3DbFree(tls, db, *(*uintptr)(unsafe.Pointer(bp)))
*(*uintptr)(unsafe.Pointer(bp)) = (*(*TParse)(unsafe.Pointer(bp + 4))).FzErrMsg
@@ -75555,24 +75746,12 @@ func Xsqlite3_blob_open(tls *libc.TLS, db uintptr, zDb uintptr, zTable uintptr,
goto blob_open_out
}
(*TIncrblob)(unsafe.Pointer(pBlob)).FpTab = pTab
- (*TIncrblob)(unsafe.Pointer(pBlob)).FzDb = (*(*TDb)(unsafe.Pointer((*Tsqlite3)(unsafe.Pointer(db)).FaDb + uintptr(_sqlite3SchemaToIndex(tls, db, (*TTable)(unsafe.Pointer(pTab)).FpSchema))*16))).FzDbSName
+ (*TIncrblob)(unsafe.Pointer(pBlob)).FzDb = (*(*TDb)(unsafe.Pointer((*Tsqlite3)(unsafe.Pointer(db)).FaDb + uintptr(iDb)*16))).FzDbSName
/* Now search pTab for the exact column. */
- iCol = 0
- for {
- if !(iCol < int32((*TTable)(unsafe.Pointer(pTab)).FnCol)) {
- break
- }
- if _sqlite3StrICmp(tls, (*(*TColumn)(unsafe.Pointer((*TTable)(unsafe.Pointer(pTab)).FaCol + uintptr(iCol)*12))).FzCnName, zColumn) == 0 {
- break
- }
- goto _1
- _1:
- ;
- iCol++
- }
- if iCol == int32((*TTable)(unsafe.Pointer(pTab)).FnCol) {
+ iCol = _sqlite3ColumnIndex(tls, pTab, zColumn)
+ if iCol < 0 {
_sqlite3DbFree(tls, db, *(*uintptr)(unsafe.Pointer(bp)))
- *(*uintptr)(unsafe.Pointer(bp)) = _sqlite3MPrintf(tls, db, __ccgo_ts+6580, libc.VaList(bp+304, zColumn))
+ *(*uintptr)(unsafe.Pointer(bp)) = _sqlite3MPrintf(tls, db, __ccgo_ts+6605, libc.VaList(bp+296, zColumn))
rc = int32(SQLITE_ERROR)
_sqlite3BtreeLeaveAll(tls, db)
goto blob_open_out
@@ -75598,15 +75777,15 @@ func Xsqlite3_blob_open(tls *libc.TLS, db uintptr, zDb uintptr, zTable uintptr,
break
}
if (*(*TsColMap)(unsafe.Pointer(pFKey + 36 + uintptr(j)*8))).FiFrom == iCol {
- zFault = __ccgo_ts + 6601
+ zFault = __ccgo_ts + 6626
}
- goto _3
- _3:
+ goto _4
+ _4:
;
j++
}
- goto _2
- _2:
+ goto _3
+ _3:
;
pFKey = (*TFKey)(unsafe.Pointer(pFKey)).FpNextFrom
}
@@ -75623,21 +75802,21 @@ func Xsqlite3_blob_open(tls *libc.TLS, db uintptr, zDb uintptr, zTable uintptr,
}
/* FIXME: Be smarter about indexes that use expressions */
if int32(*(*Ti16)(unsafe.Pointer((*TIndex)(unsafe.Pointer(pIdx)).FaiColumn + uintptr(j1)*2))) == iCol || int32(*(*Ti16)(unsafe.Pointer((*TIndex)(unsafe.Pointer(pIdx)).FaiColumn + uintptr(j1)*2))) == -int32(2) {
- zFault = __ccgo_ts + 6613
+ zFault = __ccgo_ts + 6638
}
- goto _5
- _5:
+ goto _6
+ _6:
;
j1++
}
- goto _4
- _4:
+ goto _5
+ _5:
;
pIdx = (*TIndex)(unsafe.Pointer(pIdx)).FpNext
}
if zFault != 0 {
_sqlite3DbFree(tls, db, *(*uintptr)(unsafe.Pointer(bp)))
- *(*uintptr)(unsafe.Pointer(bp)) = _sqlite3MPrintf(tls, db, __ccgo_ts+6621, libc.VaList(bp+304, zFault))
+ *(*uintptr)(unsafe.Pointer(bp)) = _sqlite3MPrintf(tls, db, __ccgo_ts+6646, libc.VaList(bp+296, zFault))
rc = int32(SQLITE_ERROR)
_sqlite3BtreeLeaveAll(tls, db)
goto blob_open_out
@@ -75646,7 +75825,6 @@ func Xsqlite3_blob_open(tls *libc.TLS, db uintptr, zDb uintptr, zTable uintptr,
(*TIncrblob)(unsafe.Pointer(pBlob)).FpStmt = _sqlite3VdbeCreate(tls, bp+4)
if (*TIncrblob)(unsafe.Pointer(pBlob)).FpStmt != 0 {
v = (*TIncrblob)(unsafe.Pointer(pBlob)).FpStmt
- iDb = _sqlite3SchemaToIndex(tls, db, (*TTable)(unsafe.Pointer(pTab)).FpSchema)
_sqlite3VdbeAddOp4Int(tls, v, int32(OP_Transaction), iDb, wrFlag, (*TSchema)(unsafe.Pointer((*TTable)(unsafe.Pointer(pTab)).FpSchema)).Fschema_cookie, (*TSchema)(unsafe.Pointer((*TTable)(unsafe.Pointer(pTab)).FpSchema)).FiGeneration)
_sqlite3VdbeChangeP5(tls, v, uint16(1))
aOp = _sqlite3VdbeAddOpList(tls, v, libc.Int32FromUint32(libc.Uint32FromInt64(24)/libc.Uint32FromInt64(4)), uintptr(unsafe.Pointer(&_openBlob)), _iLn)
@@ -75691,8 +75869,8 @@ func Xsqlite3_blob_open(tls *libc.TLS, db uintptr, zDb uintptr, zTable uintptr,
}
rc = _blobSeekToRow(tls, pBlob, iRow, bp)
nAttempt++
- v6 = nAttempt
- if v6 >= int32(SQLITE_MAX_SCHEMA_RETRY) || rc != int32(SQLITE_SCHEMA) {
+ v7 = nAttempt
+ if v7 >= int32(SQLITE_MAX_SCHEMA_RETRY) || rc != int32(SQLITE_SCHEMA) {
break
}
_sqlite3ParseObjectReset(tls, bp+4)
@@ -75709,11 +75887,11 @@ blob_open_out:
_sqlite3DbFree(tls, db, pBlob)
}
if *(*uintptr)(unsafe.Pointer(bp)) != 0 {
- v7 = __ccgo_ts + 3864
+ v8 = __ccgo_ts + 3890
} else {
- v7 = libc.UintptrFromInt32(0)
+ v8 = libc.UintptrFromInt32(0)
}
- _sqlite3ErrorWithMsg(tls, db, rc, v7, libc.VaList(bp+304, *(*uintptr)(unsafe.Pointer(bp))))
+ _sqlite3ErrorWithMsg(tls, db, rc, v8, libc.VaList(bp+296, *(*uintptr)(unsafe.Pointer(bp))))
_sqlite3DbFree(tls, db, *(*uintptr)(unsafe.Pointer(bp)))
_sqlite3ParseObjectReset(tls, bp+4)
rc = _sqlite3ApiExit(tls, db, rc)
@@ -75799,7 +75977,7 @@ func _blobReadWrite(tls *libc.TLS, pBlob uintptr, z uintptr, n int32, iOffset in
_, _, _, _, _ = db, iKey, p, rc, v
p = pBlob
if p == uintptr(0) {
- return _sqlite3MisuseError(tls, int32(103159))
+ return _sqlite3MisuseError(tls, int32(103962))
}
db = (*TIncrblob)(unsafe.Pointer(p)).Fdb
Xsqlite3_mutex_enter(tls, (*Tsqlite3)(unsafe.Pointer(db)).Fmutex)
@@ -75898,7 +76076,7 @@ func Xsqlite3_blob_reopen(tls *libc.TLS, pBlob uintptr, iRow Tsqlite3_int64) (r
_, _, _, _ = db, p, rc, v1
p = pBlob
if p == uintptr(0) {
- return _sqlite3MisuseError(tls, int32(103259))
+ return _sqlite3MisuseError(tls, int32(104062))
}
db = (*TIncrblob)(unsafe.Pointer(p)).Fdb
Xsqlite3_mutex_enter(tls, (*Tsqlite3)(unsafe.Pointer(db)).Fmutex)
@@ -75912,7 +76090,7 @@ func Xsqlite3_blob_reopen(tls *libc.TLS, pBlob uintptr, iRow Tsqlite3_int64) (r
rc = _blobSeekToRow(tls, p, iRow, bp)
if rc != SQLITE_OK {
if *(*uintptr)(unsafe.Pointer(bp)) != 0 {
- v1 = __ccgo_ts + 3864
+ v1 = __ccgo_ts + 3890
} else {
v1 = libc.UintptrFromInt32(0)
}
@@ -76359,11 +76537,12 @@ type TVdbeSorter1 = struct {
FiPrev Tu8
FnTask Tu8
FtypeMask Tu8
- FaTask [1]TSortSubtask
}
type VdbeSorter1 = TVdbeSorter1
+/* Size (in bytes) of a VdbeSorter object that works with N or fewer subtasks */
+
/*
** An instance of the following object is used to read records out of a
** PMA, in sorted order. The next key to be read is cached in nKey/aKey.
@@ -76970,8 +77149,8 @@ var _aLen = [10]Tu8{
// ** SQLITE_OK is returned if successful, or an SQLite error code otherwise.
// */
func _sqlite3VdbeSorterInit(tls *libc.TLS, db uintptr, nField int32, pCsr uintptr) (r int32) {
- var i, nWorker, pgsz, rc, sz, szKeyInfo, v2, v5 int32
- var mxCache Ti64
+ var i, nWorker, pgsz, rc, szKeyInfo, v2, v5 int32
+ var mxCache, sz Ti64
var pBt, pKeyInfo, pSorter, pTask, v1 uintptr
var szPma Tu32
var v4 int64
@@ -76985,9 +77164,9 @@ func _sqlite3VdbeSorterInit(tls *libc.TLS, db uintptr, nField int32, pCsr uintpt
}
/* Do not allow the total number of threads (main thread + all workers)
** to exceed the maximum merge count */
- szKeyInfo = libc.Int32FromUint32(uint32(24) + libc.Uint32FromInt32(libc.Int32FromUint16((*TKeyInfo)(unsafe.Pointer((*TVdbeCursor)(unsafe.Pointer(pCsr)).FpKeyInfo)).FnKeyField)-libc.Int32FromInt32(1))*uint32(4))
- sz = libc.Int32FromUint32(uint32(132) + libc.Uint32FromInt32(nWorker)*uint32(64))
- pSorter = _sqlite3DbMallocZero(tls, db, libc.Uint64FromInt32(sz+szKeyInfo))
+ szKeyInfo = libc.Int32FromUint32(uint32(libc.UintptrFromInt32(0)+20) + uint32((*TKeyInfo)(unsafe.Pointer((*TVdbeCursor)(unsafe.Pointer(pCsr)).FpKeyInfo)).FnKeyField)*libc.Uint32FromInt64(4))
+ sz = libc.Int64FromUint32(uint32(libc.UintptrFromInt32(0)+68) + libc.Uint32FromInt32(nWorker+libc.Int32FromInt32(1))*libc.Uint32FromInt64(64))
+ pSorter = _sqlite3DbMallocZero(tls, db, libc.Uint64FromInt64(sz+int64(szKeyInfo)))
*(*uintptr)(unsafe.Pointer(pCsr + 36)) = pSorter
if pSorter == uintptr(0) {
rc = int32(SQLITE_NOMEM)
@@ -77185,18 +77364,19 @@ func _vdbeSorterJoinAll(tls *libc.TLS, pSorter uintptr, rcin int32) (r int32) {
// ** nReader may not exceed SORTER_MAX_MERGE_COUNT even after rounding up.
// */
func _vdbeMergeEngineNew(tls *libc.TLS, nReader int32) (r uintptr) {
- var N, nByte int32
+ var N int32
+ var nByte Ti64
var pNew, v1 uintptr
_, _, _, _ = N, nByte, pNew, v1
N = int32(2) /* Pointer to allocated object to return */
for N < nReader {
N += N
}
- nByte = libc.Int32FromUint32(uint32(16) + libc.Uint32FromInt32(N)*(libc.Uint32FromInt64(4)+libc.Uint32FromInt64(52)))
+ nByte = libc.Int64FromUint32(uint32(16) + libc.Uint32FromInt32(N)*(libc.Uint32FromInt64(4)+libc.Uint32FromInt64(52)))
if _sqlite3FaultSim(tls, int32(100)) != 0 {
v1 = uintptr(0)
} else {
- v1 = _sqlite3MallocZero(tls, libc.Uint64FromInt32(nByte))
+ v1 = _sqlite3MallocZero(tls, libc.Uint64FromInt64(nByte))
}
pNew = v1
if pNew != 0 {
@@ -77484,6 +77664,9 @@ func _vdbeSorterSort(tls *libc.TLS, pTask uintptr, pList uintptr) (r int32) {
break
}
p = _vdbeSorterMerge(tls, pTask, p, (*(*[64]uintptr)(unsafe.Pointer(bp)))[i])
+ /* ,--Each aSlot[] holds twice as much as the previous. So we cannot use
+ ** | up all 64 aSlots[] with only a 64-bit address space.
+ ** v */
(*(*[64]uintptr)(unsafe.Pointer(bp)))[i] = uintptr(0)
goto _1
_1:
@@ -80029,25 +80212,25 @@ func _extendFJMatch(tls *libc.TLS, pParse uintptr, ppList uintptr, pMatch uintpt
func _isValidSchemaTableName(tls *libc.TLS, zTab uintptr, pTab uintptr, zDb uintptr) (r int32) {
var zLegacy uintptr
_ = zLegacy
- if Xsqlite3_strnicmp(tls, zTab, __ccgo_ts+6655, int32(7)) != 0 {
+ if Xsqlite3_strnicmp(tls, zTab, __ccgo_ts+6680, int32(7)) != 0 {
return 0
}
zLegacy = (*TTable)(unsafe.Pointer(pTab)).FzName
- if libc.Xstrcmp(tls, zLegacy+uintptr(7), __ccgo_ts+6663+7) == 0 {
- if _sqlite3StrICmp(tls, zTab+uintptr(7), __ccgo_ts+6682+7) == 0 {
+ if libc.Xstrcmp(tls, zLegacy+uintptr(7), __ccgo_ts+6688+7) == 0 {
+ if _sqlite3StrICmp(tls, zTab+uintptr(7), __ccgo_ts+6707+7) == 0 {
return int32(1)
}
if zDb == uintptr(0) {
return 0
}
- if _sqlite3StrICmp(tls, zTab+uintptr(7), __ccgo_ts+6151+7) == 0 {
+ if _sqlite3StrICmp(tls, zTab+uintptr(7), __ccgo_ts+6175+7) == 0 {
return int32(1)
}
- if _sqlite3StrICmp(tls, zTab+uintptr(7), __ccgo_ts+6701+7) == 0 {
+ if _sqlite3StrICmp(tls, zTab+uintptr(7), __ccgo_ts+6726+7) == 0 {
return int32(1)
}
} else {
- if _sqlite3StrICmp(tls, zTab+uintptr(7), __ccgo_ts+6701+7) == 0 {
+ if _sqlite3StrICmp(tls, zTab+uintptr(7), __ccgo_ts+6726+7) == 0 {
return int32(1)
}
}
@@ -80086,23 +80269,22 @@ func _isValidSchemaTableName(tls *libc.TLS, zTab uintptr, pTab uintptr, zDb uint
func _lookupName(tls *libc.TLS, pParse uintptr, zDb uintptr, zTab uintptr, pRight uintptr, pNC uintptr, pExpr uintptr) (r int32) {
bp := tls.Alloc(48)
defer tls.Free(48)
- var cnt, cntTab, eNewExprOp, hit, i, iCol, j, nSubquery, op, v5 int32
- var db, pCol, pEList, pItem, pMatch, pOrig, pSchema, pSel, pSrcList, pTab, pTopNC, pUpsert, zAs, zCol, zErr, v10 uintptr
- var hCol, hCol1 Tu8
- var v7, v8 uint32
+ var cnt, cntTab, eNewExprOp, hit, i, iCol, j, nSubquery, op, v4 int32
+ var db, pEList, pItem, pMatch, pOrig, pSchema, pSel, pSrcList, pTab, pTopNC, pUpsert, zAs, zCol, zErr, v8 uintptr
+ var v5, v6 uint32
var _ /* bRowid at bp+4 */ int32
var _ /* pFJMatch at bp+0 */ uintptr
- _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _ = cnt, cntTab, db, eNewExprOp, hCol, hCol1, hit, i, iCol, j, nSubquery, op, pCol, pEList, pItem, pMatch, pOrig, pSchema, pSel, pSrcList, pTab, pTopNC, pUpsert, zAs, zCol, zErr, v10, v5, v7, v8 /* Loop counters */
- cnt = 0 /* Number of matching column names */
- cntTab = 0 /* Number of potential "rowid" matches */
- nSubquery = 0 /* How many levels of subquery */
- db = (*TParse)(unsafe.Pointer(pParse)).Fdb /* Use for looping over pSrcList items */
- pMatch = uintptr(0) /* The matching pSrcList item */
- pTopNC = pNC /* First namecontext in the list */
- pSchema = uintptr(0) /* Schema of the expression */
- eNewExprOp = int32(TK_COLUMN) /* New value for pExpr->op on success */
- pTab = uintptr(0) /* A column of pTab */
- *(*uintptr)(unsafe.Pointer(bp)) = uintptr(0) /* Matches for FULL JOIN .. USING */
+ _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _ = cnt, cntTab, db, eNewExprOp, hit, i, iCol, j, nSubquery, op, pEList, pItem, pMatch, pOrig, pSchema, pSel, pSrcList, pTab, pTopNC, pUpsert, zAs, zCol, zErr, v4, v5, v6, v8 /* Loop counters */
+ cnt = 0 /* Number of matching column names */
+ cntTab = 0 /* Number of potential "rowid" matches */
+ nSubquery = 0 /* How many levels of subquery */
+ db = (*TParse)(unsafe.Pointer(pParse)).Fdb /* Use for looping over pSrcList items */
+ pMatch = uintptr(0) /* The matching pSrcList item */
+ pTopNC = pNC /* First namecontext in the list */
+ pSchema = uintptr(0) /* Schema of the expression */
+ eNewExprOp = int32(TK_COLUMN) /* New value for pExpr->op on success */
+ pTab = uintptr(0) /* Table holding the row */
+ *(*uintptr)(unsafe.Pointer(bp)) = uintptr(0) /* Matches for FULL JOIN .. USING */
zCol = *(*uintptr)(unsafe.Pointer(pRight + 8))
/* the name context cannot be NULL. */
/* The Z in X.Y.Z cannot be NULL */
@@ -80134,7 +80316,7 @@ func _lookupName(tls *libc.TLS, pParse uintptr, zDb uintptr, zTab uintptr, pRigh
;
i++
}
- if i == (*Tsqlite3)(unsafe.Pointer(db)).FnDb && _sqlite3StrICmp(tls, __ccgo_ts+6715, zDb) == 0 {
+ if i == (*Tsqlite3)(unsafe.Pointer(db)).FnDb && _sqlite3StrICmp(tls, __ccgo_ts+6740, zDb) == 0 {
/* This branch is taken when the main database has been renamed
** using SQLITE_DBCONFIG_MAINDBNAME. */
pSchema = (*(*TDb)(unsafe.Pointer((*Tsqlite3)(unsafe.Pointer(db)).FaDb))).FpSchema
@@ -80228,7 +80410,7 @@ func _lookupName(tls *libc.TLS, pParse uintptr, zDb uintptr, zTab uintptr, pRigh
if (*TTable)(unsafe.Pointer(pTab)).FpSchema != pSchema {
goto _2
}
- if pSchema == uintptr(0) && libc.Xstrcmp(tls, zDb, __ccgo_ts+6720) != 0 {
+ if pSchema == uintptr(0) && libc.Xstrcmp(tls, zDb, __ccgo_ts+6745) != 0 {
goto _2
}
}
@@ -80250,57 +80432,44 @@ func _lookupName(tls *libc.TLS, pParse uintptr, zDb uintptr, zTab uintptr, pRigh
_sqlite3RenameTokenRemap(tls, pParse, uintptr(0), pExpr+44)
}
}
- hCol = _sqlite3StrIHash(tls, zCol)
- j = 0
- pCol = (*TTable)(unsafe.Pointer(pTab)).FaCol
- for {
- if !(j < int32((*TTable)(unsafe.Pointer(pTab)).FnCol)) {
- break
- }
- if libc.Int32FromUint8((*TColumn)(unsafe.Pointer(pCol)).FhName) == libc.Int32FromUint8(hCol) && _sqlite3StrICmp(tls, (*TColumn)(unsafe.Pointer(pCol)).FzCnName, zCol) == 0 {
- if cnt > 0 {
- if int32(*(*uint32)(unsafe.Pointer(pItem + 12 + 4))&0x800>>11) == 0 || _sqlite3IdListIndex(tls, *(*uintptr)(unsafe.Pointer(pItem + 40)), zCol) < 0 {
- /* Two or more tables have the same column name which is
- ** not joined by USING. This is an error. Signal as much
- ** by clearing pFJMatch and letting cnt go above 1. */
- _sqlite3ExprListDelete(tls, db, *(*uintptr)(unsafe.Pointer(bp)))
- *(*uintptr)(unsafe.Pointer(bp)) = uintptr(0)
+ j = _sqlite3ColumnIndex(tls, pTab, zCol)
+ if j >= 0 {
+ if cnt > 0 {
+ if int32(*(*uint32)(unsafe.Pointer(pItem + 12 + 4))&0x800>>11) == 0 || _sqlite3IdListIndex(tls, *(*uintptr)(unsafe.Pointer(pItem + 40)), zCol) < 0 {
+ /* Two or more tables have the same column name which is
+ ** not joined by USING. This is an error. Signal as much
+ ** by clearing pFJMatch and letting cnt go above 1. */
+ _sqlite3ExprListDelete(tls, db, *(*uintptr)(unsafe.Pointer(bp)))
+ *(*uintptr)(unsafe.Pointer(bp)) = uintptr(0)
+ } else {
+ if libc.Int32FromUint8((*TSrcItem)(unsafe.Pointer(pItem)).Ffg.Fjointype)&int32(JT_RIGHT) == 0 {
+ /* An INNER or LEFT JOIN. Use the left-most table */
+ goto _2
} else {
- if libc.Int32FromUint8((*TSrcItem)(unsafe.Pointer(pItem)).Ffg.Fjointype)&int32(JT_RIGHT) == 0 {
- /* An INNER or LEFT JOIN. Use the left-most table */
- goto _4
+ if libc.Int32FromUint8((*TSrcItem)(unsafe.Pointer(pItem)).Ffg.Fjointype)&int32(JT_LEFT) == 0 {
+ /* A RIGHT JOIN. Use the right-most table */
+ cnt = 0
+ _sqlite3ExprListDelete(tls, db, *(*uintptr)(unsafe.Pointer(bp)))
+ *(*uintptr)(unsafe.Pointer(bp)) = uintptr(0)
} else {
- if libc.Int32FromUint8((*TSrcItem)(unsafe.Pointer(pItem)).Ffg.Fjointype)&int32(JT_LEFT) == 0 {
- /* A RIGHT JOIN. Use the right-most table */
- cnt = 0
- _sqlite3ExprListDelete(tls, db, *(*uintptr)(unsafe.Pointer(bp)))
- *(*uintptr)(unsafe.Pointer(bp)) = uintptr(0)
- } else {
- /* For a FULL JOIN, we must construct a coalesce() func */
- _extendFJMatch(tls, pParse, bp, pMatch, (*TExpr)(unsafe.Pointer(pExpr)).FiColumn)
- }
+ /* For a FULL JOIN, we must construct a coalesce() func */
+ _extendFJMatch(tls, pParse, bp, pMatch, (*TExpr)(unsafe.Pointer(pExpr)).FiColumn)
}
}
}
- cnt++
- pMatch = pItem
- /* Substitute the rowid (column -1) for the INTEGER PRIMARY KEY */
- if j == int32((*TTable)(unsafe.Pointer(pTab)).FiPKey) {
- v5 = -int32(1)
- } else {
- v5 = int32(int16(j))
- }
- (*TExpr)(unsafe.Pointer(pExpr)).FiColumn = int16(v5)
- if int32(*(*uint32)(unsafe.Pointer(pItem + 12 + 4))&0x4000>>14) != 0 {
- _sqlite3SrcItemColumnUsed(tls, pItem, j)
- }
- break
}
- goto _4
- _4:
- ;
- j++
- pCol += 12
+ cnt++
+ pMatch = pItem
+ /* Substitute the rowid (column -1) for the INTEGER PRIMARY KEY */
+ if j == int32((*TTable)(unsafe.Pointer(pTab)).FiPKey) {
+ v4 = -int32(1)
+ } else {
+ v4 = int32(int16(j))
+ }
+ (*TExpr)(unsafe.Pointer(pExpr)).FiColumn = int16(v4)
+ if int32(*(*uint32)(unsafe.Pointer(pItem + 12 + 4))&0x4000>>14) != 0 {
+ _sqlite3SrcItemColumnUsed(tls, pItem, j)
+ }
}
if 0 == cnt && (*TTable)(unsafe.Pointer(pTab)).FtabFlags&uint32(TF_NoVisibleRowid) == uint32(0) {
/* pTab is a potential ROWID match. Keep track of it and match
@@ -80345,11 +80514,11 @@ func _lookupName(tls *libc.TLS, pParse uintptr, zDb uintptr, zTab uintptr, pRigh
pTab = (*TParse)(unsafe.Pointer(pParse)).FpTriggerTab
}
} else {
- if op != int32(TK_DELETE) && zTab != 0 && _sqlite3StrICmp(tls, __ccgo_ts+6722, zTab) == 0 {
+ if op != int32(TK_DELETE) && zTab != 0 && _sqlite3StrICmp(tls, __ccgo_ts+6747, zTab) == 0 {
(*TExpr)(unsafe.Pointer(pExpr)).FiTable = int32(1)
pTab = (*TParse)(unsafe.Pointer(pParse)).FpTriggerTab
} else {
- if op != int32(TK_INSERT) && zTab != 0 && _sqlite3StrICmp(tls, __ccgo_ts+6726, zTab) == 0 {
+ if op != int32(TK_INSERT) && zTab != 0 && _sqlite3StrICmp(tls, __ccgo_ts+6751, zTab) == 0 {
(*TExpr)(unsafe.Pointer(pExpr)).FiTable = 0
pTab = (*TParse)(unsafe.Pointer(pParse)).FpTriggerTab
}
@@ -80358,36 +80527,25 @@ func _lookupName(tls *libc.TLS, pParse uintptr, zDb uintptr, zTab uintptr, pRigh
}
if (*TNameContext)(unsafe.Pointer(pNC)).FncFlags&int32(NC_UUpsert) != 0 && zTab != uintptr(0) {
pUpsert = *(*uintptr)(unsafe.Pointer(pNC + 8))
- if pUpsert != 0 && _sqlite3StrICmp(tls, __ccgo_ts+6730, zTab) == 0 {
+ if pUpsert != 0 && _sqlite3StrICmp(tls, __ccgo_ts+6755, zTab) == 0 {
pTab = (*(*TSrcItem)(unsafe.Pointer((*TUpsert)(unsafe.Pointer(pUpsert)).FpUpsertSrc + 8))).FpSTab
(*TExpr)(unsafe.Pointer(pExpr)).FiTable = int32(EXCLUDED_TABLE_NUMBER)
}
}
if pTab != 0 {
- hCol1 = _sqlite3StrIHash(tls, zCol)
pSchema = (*TTable)(unsafe.Pointer(pTab)).FpSchema
cntTab++
- iCol = 0
- pCol = (*TTable)(unsafe.Pointer(pTab)).FaCol
- for {
- if !(iCol < int32((*TTable)(unsafe.Pointer(pTab)).FnCol)) {
- break
+ iCol = _sqlite3ColumnIndex(tls, pTab, zCol)
+ if iCol >= 0 {
+ if int32((*TTable)(unsafe.Pointer(pTab)).FiPKey) == iCol {
+ iCol = -int32(1)
}
- if libc.Int32FromUint8((*TColumn)(unsafe.Pointer(pCol)).FhName) == libc.Int32FromUint8(hCol1) && _sqlite3StrICmp(tls, (*TColumn)(unsafe.Pointer(pCol)).FzCnName, zCol) == 0 {
- if iCol == int32((*TTable)(unsafe.Pointer(pTab)).FiPKey) {
- iCol = -int32(1)
- }
- break
+ } else {
+ if _sqlite3IsRowid(tls, zCol) != 0 && (*TTable)(unsafe.Pointer(pTab)).FtabFlags&uint32(TF_NoVisibleRowid) == uint32(0) {
+ iCol = -int32(1)
+ } else {
+ iCol = int32((*TTable)(unsafe.Pointer(pTab)).FnCol)
}
- goto _6
- _6:
- ;
- iCol++
- pCol += 12
- }
- if iCol >= int32((*TTable)(unsafe.Pointer(pTab)).FnCol) && _sqlite3IsRowid(tls, zCol) != 0 && (*TTable)(unsafe.Pointer(pTab)).FtabFlags&uint32(TF_NoVisibleRowid) == uint32(0) {
- /* IMP: R-51414-32910 */
- iCol = -int32(1)
}
if iCol < int32((*TTable)(unsafe.Pointer(pTab)).FnCol) {
cnt++
@@ -80416,18 +80574,18 @@ func _lookupName(tls *libc.TLS, pParse uintptr, zDb uintptr, zTab uintptr, pRigh
} else {
if (*TExpr)(unsafe.Pointer(pExpr)).FiTable == 0 {
if iCol >= int32(32) {
- v7 = uint32(0xffffffff)
+ v5 = uint32(0xffffffff)
} else {
- v7 = libc.Uint32FromInt32(1) << iCol
+ v5 = libc.Uint32FromInt32(1) << iCol
}
- *(*Tu32)(unsafe.Pointer(pParse + 152)) |= v7
+ *(*Tu32)(unsafe.Pointer(pParse + 180)) |= v5
} else {
if iCol >= int32(32) {
- v8 = uint32(0xffffffff)
+ v6 = uint32(0xffffffff)
} else {
- v8 = libc.Uint32FromInt32(1) << iCol
+ v6 = libc.Uint32FromInt32(1) << iCol
}
- *(*Tu32)(unsafe.Pointer(pParse + 156)) |= v8
+ *(*Tu32)(unsafe.Pointer(pParse + 184)) |= v6
}
}
}
@@ -80474,15 +80632,15 @@ func _lookupName(tls *libc.TLS, pParse uintptr, zDb uintptr, zTab uintptr, pRigh
if int32(uint32(*(*uint16)(unsafe.Pointer(pEList + 8 + uintptr(j)*20 + 8 + 4))&0x3>>0)) == ENAME_NAME && Xsqlite3_stricmp(tls, zAs, zCol) == 0 {
pOrig = (*(*TExprList_item)(unsafe.Pointer(pEList + 8 + uintptr(j)*20))).FpExpr
if (*TNameContext)(unsafe.Pointer(pNC)).FncFlags&int32(NC_AllowAgg) == 0 && (*TExpr)(unsafe.Pointer(pOrig)).Fflags&libc.Uint32FromInt32(libc.Int32FromInt32(EP_Agg)) != uint32(0) {
- _sqlite3ErrorMsg(tls, pParse, __ccgo_ts+6739, libc.VaList(bp+16, zAs))
+ _sqlite3ErrorMsg(tls, pParse, __ccgo_ts+6764, libc.VaList(bp+16, zAs))
return int32(WRC_Abort)
}
if (*TExpr)(unsafe.Pointer(pOrig)).Fflags&libc.Uint32FromInt32(libc.Int32FromInt32(EP_Win)) != uint32(0) && ((*TNameContext)(unsafe.Pointer(pNC)).FncFlags&int32(NC_AllowWin) == 0 || pNC != pTopNC) {
- _sqlite3ErrorMsg(tls, pParse, __ccgo_ts+6770, libc.VaList(bp+16, zAs))
+ _sqlite3ErrorMsg(tls, pParse, __ccgo_ts+6795, libc.VaList(bp+16, zAs))
return int32(WRC_Abort)
}
if _sqlite3ExprVectorSize(tls, pOrig) != int32(1) {
- _sqlite3ErrorMsg(tls, pParse, __ccgo_ts+6807, 0)
+ _sqlite3ErrorMsg(tls, pParse, __ccgo_ts+6832, 0)
return int32(WRC_Abort)
}
_resolveAlias(tls, pParse, pEList, j, pExpr, nSubquery)
@@ -80493,8 +80651,8 @@ func _lookupName(tls *libc.TLS, pParse uintptr, zDb uintptr, zTab uintptr, pRigh
}
goto lookupname_end
}
- goto _9
- _9:
+ goto _7
+ _7:
;
j++
}
@@ -80534,7 +80692,7 @@ func _lookupName(tls *libc.TLS, pParse uintptr, zDb uintptr, zTab uintptr, pRigh
** a huge amount of legacy SQL that uses it. So for now, we just
** issue a warning.
*/
- Xsqlite3_log(tls, int32(SQLITE_WARNING), __ccgo_ts+6825, libc.VaList(bp+16, zCol))
+ Xsqlite3_log(tls, int32(SQLITE_WARNING), __ccgo_ts+6850, libc.VaList(bp+16, zCol))
(*TExpr)(unsafe.Pointer(pExpr)).Fop = uint8(TK_STRING)
libc.Xmemset(tls, pExpr+44, 0, uint32(8))
return int32(WRC_Prune)
@@ -80554,7 +80712,7 @@ func _lookupName(tls *libc.TLS, pParse uintptr, zDb uintptr, zTab uintptr, pRigh
if *(*uintptr)(unsafe.Pointer(bp)) != 0 {
if (*TExprList)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp)))).FnExpr == cnt-int32(1) {
if (*TExpr)(unsafe.Pointer(pExpr)).Fflags&libc.Uint32FromInt32(libc.Int32FromInt32(EP_Leaf)) != uint32(0) {
- *(*Tu32)(unsafe.Pointer(pExpr + 4)) &= libc.Uint32FromInt32(^libc.Int32FromInt32(EP_Leaf))
+ *(*Tu32)(unsafe.Pointer(pExpr + 4)) &= ^libc.Uint32FromInt32(libc.Int32FromInt32(EP_Leaf))
} else {
_sqlite3ExprDelete(tls, db, (*TExpr)(unsafe.Pointer(pExpr)).FpLeft)
(*TExpr)(unsafe.Pointer(pExpr)).FpLeft = uintptr(0)
@@ -80563,7 +80721,7 @@ func _lookupName(tls *libc.TLS, pParse uintptr, zDb uintptr, zTab uintptr, pRigh
}
_extendFJMatch(tls, pParse, bp, pMatch, (*TExpr)(unsafe.Pointer(pExpr)).FiColumn)
(*TExpr)(unsafe.Pointer(pExpr)).Fop = uint8(TK_FUNCTION)
- *(*uintptr)(unsafe.Pointer(pExpr + 8)) = __ccgo_ts + 6860
+ *(*uintptr)(unsafe.Pointer(pExpr + 8)) = __ccgo_ts + 6885
*(*uintptr)(unsafe.Pointer(pExpr + 20)) = *(*uintptr)(unsafe.Pointer(bp))
cnt = int32(1)
goto lookupname_end
@@ -80573,26 +80731,26 @@ func _lookupName(tls *libc.TLS, pParse uintptr, zDb uintptr, zTab uintptr, pRigh
}
}
if cnt == 0 {
- v10 = __ccgo_ts + 6869
+ v8 = __ccgo_ts + 6894
} else {
- v10 = __ccgo_ts + 6884
+ v8 = __ccgo_ts + 6909
}
- zErr = v10
+ zErr = v8
if zDb != 0 {
- _sqlite3ErrorMsg(tls, pParse, __ccgo_ts+6906, libc.VaList(bp+16, zErr, zDb, zTab, zCol))
+ _sqlite3ErrorMsg(tls, pParse, __ccgo_ts+6931, libc.VaList(bp+16, zErr, zDb, zTab, zCol))
} else {
if zTab != 0 {
- _sqlite3ErrorMsg(tls, pParse, __ccgo_ts+6919, libc.VaList(bp+16, zErr, zTab, zCol))
+ _sqlite3ErrorMsg(tls, pParse, __ccgo_ts+6944, libc.VaList(bp+16, zErr, zTab, zCol))
} else {
if cnt == 0 && (*TExpr)(unsafe.Pointer(pRight)).Fflags&libc.Uint32FromInt32(libc.Int32FromInt32(EP_DblQuoted)) != uint32(0) {
- _sqlite3ErrorMsg(tls, pParse, __ccgo_ts+6929, libc.VaList(bp+16, zErr, zCol))
+ _sqlite3ErrorMsg(tls, pParse, __ccgo_ts+6954, libc.VaList(bp+16, zErr, zCol))
} else {
- _sqlite3ErrorMsg(tls, pParse, __ccgo_ts+6990, libc.VaList(bp+16, zErr, zCol))
+ _sqlite3ErrorMsg(tls, pParse, __ccgo_ts+7015, libc.VaList(bp+16, zErr, zCol))
}
}
}
_sqlite3RecordErrorOffsetOfExpr(tls, (*TParse)(unsafe.Pointer(pParse)).Fdb, pExpr)
- (*TParse)(unsafe.Pointer(pParse)).FcheckSchema = uint8(1)
+ libc.SetBitFieldPtr8Uint32(pParse+32, libc.Uint32FromInt32(1), 3, 0x8)
(*TNameContext)(unsafe.Pointer(pTopNC)).FnNcErr++
eNewExprOp = int32(TK_NULL)
}
@@ -80641,8 +80799,8 @@ lookupname_end:
break
}
pTopNC = (*TNameContext)(unsafe.Pointer(pTopNC)).FpNext
- goto _11
- _11:
+ goto _9
+ _9:
}
return int32(WRC_Prune)
} else {
@@ -80716,19 +80874,19 @@ func _notValidImpl(tls *libc.TLS, pParse uintptr, pNC uintptr, zMsg uintptr, pEx
defer tls.Free(32)
var zIn uintptr
_ = zIn
- zIn = __ccgo_ts + 6997
+ zIn = __ccgo_ts + 7022
if (*TNameContext)(unsafe.Pointer(pNC)).FncFlags&int32(NC_IdxExpr) != 0 {
- zIn = __ccgo_ts + 7025
+ zIn = __ccgo_ts + 7050
} else {
if (*TNameContext)(unsafe.Pointer(pNC)).FncFlags&int32(NC_IsCheck) != 0 {
- zIn = __ccgo_ts + 7043
+ zIn = __ccgo_ts + 7068
} else {
if (*TNameContext)(unsafe.Pointer(pNC)).FncFlags&int32(NC_GenCol) != 0 {
- zIn = __ccgo_ts + 7061
+ zIn = __ccgo_ts + 7086
}
}
}
- _sqlite3ErrorMsg(tls, pParse, __ccgo_ts+7079, libc.VaList(bp+8, zMsg, zIn))
+ _sqlite3ErrorMsg(tls, pParse, __ccgo_ts+7104, libc.VaList(bp+8, zMsg, zIn))
if pExpr != 0 {
(*TExpr)(unsafe.Pointer(pExpr)).Fop = uint8(TK_NULL)
}
@@ -80900,7 +81058,7 @@ func _resolveExprStep(tls *libc.TLS, pWalker uintptr, pExpr uintptr) (r int32) {
} else {
pLeft = (*TExpr)(unsafe.Pointer(pExpr)).FpLeft
if (*TNameContext)(unsafe.Pointer(pNC)).FncFlags&(libc.Int32FromInt32(NC_IdxExpr)|libc.Int32FromInt32(NC_GenCol)) != 0 {
- _notValidImpl(tls, pParse, pNC, __ccgo_ts+7099, uintptr(0), pExpr)
+ _notValidImpl(tls, pParse, pNC, __ccgo_ts+7124, uintptr(0), pExpr)
}
pRight = (*TExpr)(unsafe.Pointer(pExpr)).FpRight
if libc.Int32FromUint8((*TExpr)(unsafe.Pointer(pRight)).Fop) == int32(TK_ID) {
@@ -80955,7 +81113,7 @@ func _resolveExprStep(tls *libc.TLS, pWalker uintptr, pExpr uintptr) (r int32) {
if n == int32(2) {
(*TExpr)(unsafe.Pointer(pExpr)).FiTable = _exprProbability(tls, (*(*TExprList_item)(unsafe.Pointer(pList + 8 + 1*20))).FpExpr)
if (*TExpr)(unsafe.Pointer(pExpr)).FiTable < 0 {
- _sqlite3ErrorMsg(tls, pParse, __ccgo_ts+7116, libc.VaList(bp+8, pExpr))
+ _sqlite3ErrorMsg(tls, pParse, __ccgo_ts+7141, libc.VaList(bp+8, pExpr))
(*TNameContext)(unsafe.Pointer(pNC)).FnNcErr++
}
} else {
@@ -80979,7 +81137,7 @@ func _resolveExprStep(tls *libc.TLS, pWalker uintptr, pExpr uintptr) (r int32) {
auth = _sqlite3AuthCheck(tls, pParse, int32(SQLITE_FUNCTION), uintptr(0), (*TFuncDef)(unsafe.Pointer(pDef)).FzName, uintptr(0))
if auth != SQLITE_OK {
if auth == int32(SQLITE_DENY) {
- _sqlite3ErrorMsg(tls, pParse, __ccgo_ts+7180, libc.VaList(bp+8, pExpr))
+ _sqlite3ErrorMsg(tls, pParse, __ccgo_ts+7205, libc.VaList(bp+8, pExpr))
(*TNameContext)(unsafe.Pointer(pNC)).FnNcErr++
}
(*TExpr)(unsafe.Pointer(pExpr)).Fop = uint8(TK_NULL)
@@ -80993,13 +81151,13 @@ func _resolveExprStep(tls *libc.TLS, pWalker uintptr, pExpr uintptr) (r int32) {
** an EP_SubtArg expression. In this case subtypes are required as
** the function may return a value with a subtype back to its
** caller using sqlite3_result_value(). */
- if (*TFuncDef)(unsafe.Pointer(pDef)).FfuncFlags&uint32(SQLITE_SUBTYPE) != 0 || (*TExpr)(unsafe.Pointer(pExpr)).Fflags&uint32(EP_SubtArg) != uint32(0) {
+ if (*TFuncDef)(unsafe.Pointer(pDef)).FfuncFlags&uint32(SQLITE_SUBTYPE) != 0 || (*TExpr)(unsafe.Pointer(pExpr)).Fflags&libc.Uint32FromUint32(EP_SubtArg) != uint32(0) {
ii = 0
for {
if !(ii < n) {
break
}
- *(*Tu32)(unsafe.Pointer((*(*TExprList_item)(unsafe.Pointer(pList + 8 + uintptr(ii)*20))).FpExpr + 4)) |= uint32(EP_SubtArg)
+ *(*Tu32)(unsafe.Pointer((*(*TExprList_item)(unsafe.Pointer(pList + 8 + uintptr(ii)*20))).FpExpr + 4)) |= libc.Uint32FromUint32(EP_SubtArg)
goto _7
_7:
;
@@ -81019,16 +81177,13 @@ func _resolveExprStep(tls *libc.TLS, pWalker uintptr, pExpr uintptr) (r int32) {
** sqlite_version() that might change over time cannot be used
** in an index or generated column. Curiously, they can be used
** in a CHECK constraint. SQLServer, MySQL, and PostgreSQL all
- ** all this. */
+ ** allow this. */
if (*TNameContext)(unsafe.Pointer(pNC)).FncFlags&(libc.Int32FromInt32(NC_IdxExpr)|libc.Int32FromInt32(NC_PartIdx)|libc.Int32FromInt32(NC_GenCol)) != 0 {
- _notValidImpl(tls, pParse, pNC, __ccgo_ts+7216, uintptr(0), pExpr)
+ _notValidImpl(tls, pParse, pNC, __ccgo_ts+7241, uintptr(0), pExpr)
}
} else {
/* Must fit in 8 bits */
(*TExpr)(unsafe.Pointer(pExpr)).Fop2 = libc.Uint8FromInt32((*TNameContext)(unsafe.Pointer(pNC)).FncFlags & int32(NC_SelfRef))
- if (*TNameContext)(unsafe.Pointer(pNC)).FncFlags&int32(NC_FromDDL) != 0 {
- *(*Tu32)(unsafe.Pointer(pExpr + 4)) |= libc.Uint32FromInt32(libc.Int32FromInt32(EP_FromDDL))
- }
}
if (*TFuncDef)(unsafe.Pointer(pDef)).FfuncFlags&uint32(SQLITE_FUNC_INTERNAL) != uint32(0) && libc.Int32FromUint8((*TParse)(unsafe.Pointer(pParse)).Fnested) == 0 && (*Tsqlite3)(unsafe.Pointer((*TParse)(unsafe.Pointer(pParse)).Fdb)).FmDbFlags&uint32(DBFLAG_InternalFunc) == uint32(0) {
/* Internal-use-only functions are disallowed unless the
@@ -81039,35 +81194,38 @@ func _resolveExprStep(tls *libc.TLS, pWalker uintptr, pExpr uintptr) (r int32) {
pDef = uintptr(0)
} else {
if (*TFuncDef)(unsafe.Pointer(pDef)).FfuncFlags&libc.Uint32FromInt32(libc.Int32FromInt32(SQLITE_FUNC_DIRECT)|libc.Int32FromInt32(SQLITE_FUNC_UNSAFE)) != uint32(0) && !(libc.Int32FromUint8((*TParse)(unsafe.Pointer(pParse)).FeParseMode) >= libc.Int32FromInt32(PARSE_MODE_RENAME)) {
+ if (*TNameContext)(unsafe.Pointer(pNC)).FncFlags&int32(NC_FromDDL) != 0 {
+ *(*Tu32)(unsafe.Pointer(pExpr + 4)) |= libc.Uint32FromInt32(libc.Int32FromInt32(EP_FromDDL))
+ }
_sqlite3ExprFunctionUsable(tls, pParse, pExpr, pDef)
}
}
}
if 0 == libc.BoolInt32(libc.Int32FromUint8((*TParse)(unsafe.Pointer(pParse)).FeParseMode) >= int32(PARSE_MODE_RENAME)) {
if pDef != 0 && (*TFuncDef)(unsafe.Pointer(pDef)).FxValue == uintptr(0) && pWin != 0 {
- _sqlite3ErrorMsg(tls, pParse, __ccgo_ts+7244, libc.VaList(bp+8, pExpr))
+ _sqlite3ErrorMsg(tls, pParse, __ccgo_ts+7269, libc.VaList(bp+8, pExpr))
(*TNameContext)(unsafe.Pointer(pNC)).FnNcErr++
} else {
if is_agg != 0 && (*TNameContext)(unsafe.Pointer(pNC)).FncFlags&int32(NC_AllowAgg) == 0 || is_agg != 0 && (*TFuncDef)(unsafe.Pointer(pDef)).FfuncFlags&uint32(SQLITE_FUNC_WINDOW) != 0 && !(pWin != 0) || is_agg != 0 && pWin != 0 && (*TNameContext)(unsafe.Pointer(pNC)).FncFlags&int32(NC_AllowWin) == 0 {
if (*TFuncDef)(unsafe.Pointer(pDef)).FfuncFlags&uint32(SQLITE_FUNC_WINDOW) != 0 || pWin != 0 {
- zType = __ccgo_ts + 7287
+ zType = __ccgo_ts + 7312
} else {
- zType = __ccgo_ts + 7294
+ zType = __ccgo_ts + 7319
}
- _sqlite3ErrorMsg(tls, pParse, __ccgo_ts+7304, libc.VaList(bp+8, zType, pExpr))
+ _sqlite3ErrorMsg(tls, pParse, __ccgo_ts+7329, libc.VaList(bp+8, zType, pExpr))
(*TNameContext)(unsafe.Pointer(pNC)).FnNcErr++
is_agg = 0
} else {
if no_such_func != 0 && libc.Int32FromUint8((*Tsqlite3)(unsafe.Pointer((*TParse)(unsafe.Pointer(pParse)).Fdb)).Finit1.Fbusy) == 0 {
- _sqlite3ErrorMsg(tls, pParse, __ccgo_ts+7332, libc.VaList(bp+8, pExpr))
+ _sqlite3ErrorMsg(tls, pParse, __ccgo_ts+7357, libc.VaList(bp+8, pExpr))
(*TNameContext)(unsafe.Pointer(pNC)).FnNcErr++
} else {
if wrong_num_args != 0 {
- _sqlite3ErrorMsg(tls, pParse, __ccgo_ts+7354, libc.VaList(bp+8, pExpr))
+ _sqlite3ErrorMsg(tls, pParse, __ccgo_ts+7379, libc.VaList(bp+8, pExpr))
(*TNameContext)(unsafe.Pointer(pNC)).FnNcErr++
} else {
if is_agg == 0 && (*TExpr)(unsafe.Pointer(pExpr)).Fflags&libc.Uint32FromInt32(libc.Int32FromInt32(EP_WinFunc)) != uint32(0) {
- _sqlite3ErrorMsg(tls, pParse, __ccgo_ts+7398, libc.VaList(bp+8, pExpr))
+ _sqlite3ErrorMsg(tls, pParse, __ccgo_ts+7423, libc.VaList(bp+8, pExpr))
(*TNameContext)(unsafe.Pointer(pNC)).FnNcErr++
} else {
if is_agg == 0 && (*TExpr)(unsafe.Pointer(pExpr)).FpLeft != 0 {
@@ -81152,7 +81310,7 @@ func _resolveExprStep(tls *libc.TLS, pWalker uintptr, pExpr uintptr) (r int32) {
if (*TExpr)(unsafe.Pointer(pExpr)).Fflags&uint32(EP_xIsSelect) != uint32(0) {
nRef = (*TNameContext)(unsafe.Pointer(pNC)).FnRef
if (*TNameContext)(unsafe.Pointer(pNC)).FncFlags&int32(NC_SelfRef) != 0 {
- _notValidImpl(tls, pParse, pNC, __ccgo_ts+7446, pExpr, pExpr)
+ _notValidImpl(tls, pParse, pNC, __ccgo_ts+7471, pExpr, pExpr)
} else {
_sqlite3WalkSelect(tls, pWalker, *(*uintptr)(unsafe.Pointer(pExpr + 20)))
}
@@ -81164,7 +81322,7 @@ func _resolveExprStep(tls *libc.TLS, pWalker uintptr, pExpr uintptr) (r int32) {
}
case int32(TK_VARIABLE):
if (*TNameContext)(unsafe.Pointer(pNC)).FncFlags&(libc.Int32FromInt32(NC_IsCheck)|libc.Int32FromInt32(NC_PartIdx)|libc.Int32FromInt32(NC_IdxExpr)|libc.Int32FromInt32(NC_GenCol)) != 0 {
- _notValidImpl(tls, pParse, pNC, __ccgo_ts+7457, pExpr, pExpr)
+ _notValidImpl(tls, pParse, pNC, __ccgo_ts+7482, pExpr, pExpr)
}
case int32(TK_IS):
fallthrough
@@ -81210,7 +81368,7 @@ func _resolveExprStep(tls *libc.TLS, pWalker uintptr, pExpr uintptr) (r int32) {
nRight = _sqlite3ExprVectorSize(tls, (*TExpr)(unsafe.Pointer(pExpr)).FpRight)
}
if nLeft != nRight {
- _sqlite3ErrorMsg(tls, pParse, __ccgo_ts+6807, 0)
+ _sqlite3ErrorMsg(tls, pParse, __ccgo_ts+6832, 0)
_sqlite3RecordErrorOffsetOfExpr(tls, (*TParse)(unsafe.Pointer(pParse)).Fdb, pExpr)
}
break
@@ -81335,7 +81493,7 @@ func _resolveOrderByTermToExprList(tls *libc.TLS, pParse uintptr, pSelect uintpt
func _resolveOutOfRangeError(tls *libc.TLS, pParse uintptr, zType uintptr, i int32, mx int32, pError uintptr) {
bp := tls.Alloc(32)
defer tls.Free(32)
- _sqlite3ErrorMsg(tls, pParse, __ccgo_ts+7468, libc.VaList(bp+8, i, zType, mx))
+ _sqlite3ErrorMsg(tls, pParse, __ccgo_ts+7493, libc.VaList(bp+8, i, zType, mx))
_sqlite3RecordErrorOffsetOfExpr(tls, (*TParse)(unsafe.Pointer(pParse)).Fdb, pError)
}
@@ -81370,7 +81528,7 @@ func _resolveCompoundOrderBy(tls *libc.TLS, pParse uintptr, pSelect uintptr) (r
}
db = (*TParse)(unsafe.Pointer(pParse)).Fdb
if (*TExprList)(unsafe.Pointer(pOrderBy)).FnExpr > *(*int32)(unsafe.Pointer(db + 116 + 2*4)) {
- _sqlite3ErrorMsg(tls, pParse, __ccgo_ts+7524, 0)
+ _sqlite3ErrorMsg(tls, pParse, __ccgo_ts+7549, 0)
return int32(1)
}
i = 0
@@ -81408,7 +81566,7 @@ func _resolveCompoundOrderBy(tls *libc.TLS, pParse uintptr, pSelect uintptr) (r
}
if _sqlite3ExprIsInteger(tls, pE, bp, uintptr(0)) != 0 {
if *(*int32)(unsafe.Pointer(bp)) <= 0 || *(*int32)(unsafe.Pointer(bp)) > (*TExprList)(unsafe.Pointer(pEList)).FnExpr {
- _resolveOutOfRangeError(tls, pParse, __ccgo_ts+7558, i+int32(1), (*TExprList)(unsafe.Pointer(pEList)).FnExpr, pE)
+ _resolveOutOfRangeError(tls, pParse, __ccgo_ts+7583, i+int32(1), (*TExprList)(unsafe.Pointer(pEList)).FnExpr, pE)
return int32(1)
}
} else {
@@ -81478,7 +81636,7 @@ func _resolveCompoundOrderBy(tls *libc.TLS, pParse uintptr, pSelect uintptr) (r
break
}
if int32(uint32(*(*uint16)(unsafe.Pointer(pOrderBy + 8 + uintptr(i)*20 + 8 + 4))&0x4>>2)) == 0 {
- _sqlite3ErrorMsg(tls, pParse, __ccgo_ts+7564, libc.VaList(bp+16, i+int32(1)))
+ _sqlite3ErrorMsg(tls, pParse, __ccgo_ts+7589, libc.VaList(bp+16, i+int32(1)))
return int32(1)
}
goto _3
@@ -81512,7 +81670,7 @@ func _sqlite3ResolveOrderGroupBy(tls *libc.TLS, pParse uintptr, pSelect uintptr,
return 0
}
if (*TExprList)(unsafe.Pointer(pOrderBy)).FnExpr > *(*int32)(unsafe.Pointer(db + 116 + 2*4)) {
- _sqlite3ErrorMsg(tls, pParse, __ccgo_ts+7625, libc.VaList(bp+8, zType))
+ _sqlite3ErrorMsg(tls, pParse, __ccgo_ts+7650, libc.VaList(bp+8, zType))
return int32(1)
}
pEList = (*TSelect)(unsafe.Pointer(pSelect)).FpEList
@@ -81825,7 +81983,7 @@ func _resolveSelectStep(tls *libc.TLS, pWalker uintptr, p uintptr) (r int32) {
(*(*TNameContext)(unsafe.Pointer(bp))).FncFlags |= int32(NC_UEList)
if (*TSelect)(unsafe.Pointer(p)).FpHaving != 0 {
if (*TSelect)(unsafe.Pointer(p)).FselFlags&uint32(SF_Aggregate) == uint32(0) {
- _sqlite3ErrorMsg(tls, pParse, __ccgo_ts+7656, 0)
+ _sqlite3ErrorMsg(tls, pParse, __ccgo_ts+7681, 0)
return int32(WRC_Abort)
}
if _sqlite3ResolveExprNames(tls, bp, (*TSelect)(unsafe.Pointer(p)).FpHaving) != 0 {
@@ -81892,7 +82050,7 @@ func _resolveSelectStep(tls *libc.TLS, pWalker uintptr, p uintptr) (r int32) {
** is not detected until much later, and so we need to go ahead and
** resolve those symbols on the incorrect ORDER BY for consistency.
*/
- if (*TSelect)(unsafe.Pointer(p)).FpOrderBy != uintptr(0) && isCompound <= nCompound && _resolveOrderGroupBy(tls, bp, p, (*TSelect)(unsafe.Pointer(p)).FpOrderBy, __ccgo_ts+7558) != 0 {
+ if (*TSelect)(unsafe.Pointer(p)).FpOrderBy != uintptr(0) && isCompound <= nCompound && _resolveOrderGroupBy(tls, bp, p, (*TSelect)(unsafe.Pointer(p)).FpOrderBy, __ccgo_ts+7583) != 0 {
return int32(WRC_Abort)
}
if (*Tsqlite3)(unsafe.Pointer(db)).FmallocFailed != 0 {
@@ -81903,7 +82061,7 @@ func _resolveSelectStep(tls *libc.TLS, pWalker uintptr, p uintptr) (r int32) {
** the GROUP BY clause does not contain aggregate functions.
*/
if pGroupBy != 0 {
- if _resolveOrderGroupBy(tls, bp, p, pGroupBy, __ccgo_ts+7695) != 0 || (*Tsqlite3)(unsafe.Pointer(db)).FmallocFailed != 0 {
+ if _resolveOrderGroupBy(tls, bp, p, pGroupBy, __ccgo_ts+7720) != 0 || (*Tsqlite3)(unsafe.Pointer(db)).FmallocFailed != 0 {
return int32(WRC_Abort)
}
i = 0
@@ -81913,7 +82071,7 @@ func _resolveSelectStep(tls *libc.TLS, pWalker uintptr, p uintptr) (r int32) {
break
}
if (*TExpr)(unsafe.Pointer((*TExprList_item)(unsafe.Pointer(pItem2)).FpExpr)).Fflags&libc.Uint32FromInt32(libc.Int32FromInt32(EP_Agg)) != uint32(0) {
- _sqlite3ErrorMsg(tls, pParse, __ccgo_ts+7701, 0)
+ _sqlite3ErrorMsg(tls, pParse, __ccgo_ts+7726, 0)
return int32(WRC_Abort)
}
goto _6
@@ -82015,12 +82173,12 @@ func _sqlite3ResolveExprNames(tls *libc.TLS, pNC uintptr, pExpr uintptr) (r int3
(*(*TWalker)(unsafe.Pointer(bp))).FxSelectCallback = v1
(*(*TWalker)(unsafe.Pointer(bp))).FxSelectCallback2 = uintptr(0)
*(*uintptr)(unsafe.Pointer(bp + 24)) = pNC
- *(*int32)(unsafe.Pointer((*(*TWalker)(unsafe.Pointer(bp))).FpParse + 232)) += (*TExpr)(unsafe.Pointer(pExpr)).FnHeight
+ *(*int32)(unsafe.Pointer((*(*TWalker)(unsafe.Pointer(bp))).FpParse + 228)) += (*TExpr)(unsafe.Pointer(pExpr)).FnHeight
if _sqlite3ExprCheckHeight(tls, (*(*TWalker)(unsafe.Pointer(bp))).FpParse, (*TParse)(unsafe.Pointer((*(*TWalker)(unsafe.Pointer(bp))).FpParse)).FnHeight) != 0 {
return int32(SQLITE_ERROR)
}
_sqlite3WalkExprNN(tls, bp, pExpr)
- *(*int32)(unsafe.Pointer((*(*TWalker)(unsafe.Pointer(bp))).FpParse + 232)) -= (*TExpr)(unsafe.Pointer(pExpr)).FnHeight
+ *(*int32)(unsafe.Pointer((*(*TWalker)(unsafe.Pointer(bp))).FpParse + 228)) -= (*TExpr)(unsafe.Pointer(pExpr)).FnHeight
*(*Tu32)(unsafe.Pointer(pExpr + 4)) |= libc.Uint32FromInt32((*TNameContext)(unsafe.Pointer(pNC)).FncFlags & (libc.Int32FromInt32(NC_HasAgg) | libc.Int32FromInt32(NC_HasWin)))
*(*int32)(unsafe.Pointer(pNC + 24)) |= savedHasAgg
return libc.BoolInt32((*TNameContext)(unsafe.Pointer(pNC)).FnNcErr > 0 || (*TParse)(unsafe.Pointer((*(*TWalker)(unsafe.Pointer(bp))).FpParse)).FnErr > 0)
@@ -82063,12 +82221,12 @@ func _sqlite3ResolveExprListNames(tls *libc.TLS, pNC uintptr, pList uintptr) (r
if pExpr == uintptr(0) {
goto _1
}
- *(*int32)(unsafe.Pointer((*(*TWalker)(unsafe.Pointer(bp))).FpParse + 232)) += (*TExpr)(unsafe.Pointer(pExpr)).FnHeight
+ *(*int32)(unsafe.Pointer((*(*TWalker)(unsafe.Pointer(bp))).FpParse + 228)) += (*TExpr)(unsafe.Pointer(pExpr)).FnHeight
if _sqlite3ExprCheckHeight(tls, (*(*TWalker)(unsafe.Pointer(bp))).FpParse, (*TParse)(unsafe.Pointer((*(*TWalker)(unsafe.Pointer(bp))).FpParse)).FnHeight) != 0 {
return int32(SQLITE_ERROR)
}
_sqlite3WalkExprNN(tls, bp, pExpr)
- *(*int32)(unsafe.Pointer((*(*TWalker)(unsafe.Pointer(bp))).FpParse + 232)) -= (*TExpr)(unsafe.Pointer(pExpr)).FnHeight
+ *(*int32)(unsafe.Pointer((*(*TWalker)(unsafe.Pointer(bp))).FpParse + 228)) -= (*TExpr)(unsafe.Pointer(pExpr)).FnHeight
if (*TNameContext)(unsafe.Pointer(pNC)).FncFlags&(libc.Int32FromInt32(NC_HasAgg)|libc.Int32FromInt32(NC_MinMaxAgg)|libc.Int32FromInt32(NC_HasWin)|libc.Int32FromInt32(NC_OrderAgg)) != 0 {
*(*Tu32)(unsafe.Pointer(pExpr + 4)) |= libc.Uint32FromInt32((*TNameContext)(unsafe.Pointer(pNC)).FncFlags & (libc.Int32FromInt32(NC_HasAgg) | libc.Int32FromInt32(NC_HasWin)))
savedHasAgg |= (*TNameContext)(unsafe.Pointer(pNC)).FncFlags & (libc.Int32FromInt32(NC_HasAgg) | libc.Int32FromInt32(NC_MinMaxAgg) | libc.Int32FromInt32(NC_HasWin) | libc.Int32FromInt32(NC_OrderAgg))
@@ -82135,33 +82293,35 @@ func _sqlite3ResolveSelectNames(tls *libc.TLS, pParse uintptr, p uintptr, pOuter
func _sqlite3ResolveSelfReference(tls *libc.TLS, pParse uintptr, pTab uintptr, type1 int32, pExpr uintptr, pList uintptr) (r int32) {
bp := tls.Alloc(96)
defer tls.Free(96)
+ var pSrc uintptr
var rc, v1 int32
- var _ /* sNC at bp+56 */ TNameContext
- var _ /* sSrc at bp+0 */ TSrcList
- _, _ = rc, v1
- libc.Xmemset(tls, bp+56, 0, uint32(36))
- libc.Xmemset(tls, bp, 0, uint32(56))
+ var _ /* sNC at bp+0 */ TNameContext
+ var _ /* srcSpace at bp+36 */ [56]Tu8
+ _, _, _ = pSrc, rc, v1 /* Memory space for the fake SrcList */
+ libc.Xmemset(tls, bp, 0, uint32(36))
+ pSrc = bp + 36
+ libc.Xmemset(tls, pSrc, 0, uint32(libc.UintptrFromInt32(0)+8)+libc.Uint32FromInt64(48))
if pTab != 0 {
- (*(*TSrcList)(unsafe.Pointer(bp))).FnSrc = int32(1)
- (*(*TSrcItem)(unsafe.Pointer(bp + 8))).FzName = (*TTable)(unsafe.Pointer(pTab)).FzName
- (*(*TSrcItem)(unsafe.Pointer(bp + 8))).FpSTab = pTab
- (*(*TSrcItem)(unsafe.Pointer(bp + 8))).FiCursor = -int32(1)
+ (*TSrcList)(unsafe.Pointer(pSrc)).FnSrc = int32(1)
+ (*(*TSrcItem)(unsafe.Pointer(pSrc + 8))).FzName = (*TTable)(unsafe.Pointer(pTab)).FzName
+ (*(*TSrcItem)(unsafe.Pointer(pSrc + 8))).FpSTab = pTab
+ (*(*TSrcItem)(unsafe.Pointer(pSrc + 8))).FiCursor = -int32(1)
if (*TTable)(unsafe.Pointer(pTab)).FpSchema != (*(*TDb)(unsafe.Pointer((*Tsqlite3)(unsafe.Pointer((*TParse)(unsafe.Pointer(pParse)).Fdb)).FaDb + 1*16))).FpSchema {
/* Cause EP_FromDDL to be set on TK_FUNCTION nodes of non-TEMP
** schema elements */
type1 |= int32(NC_FromDDL)
}
}
- (*(*TNameContext)(unsafe.Pointer(bp + 56))).FpParse = pParse
- (*(*TNameContext)(unsafe.Pointer(bp + 56))).FpSrcList = bp
- (*(*TNameContext)(unsafe.Pointer(bp + 56))).FncFlags = type1 | int32(NC_IsDDL)
- v1 = _sqlite3ResolveExprNames(tls, bp+56, pExpr)
+ (*(*TNameContext)(unsafe.Pointer(bp))).FpParse = pParse
+ (*(*TNameContext)(unsafe.Pointer(bp))).FpSrcList = pSrc
+ (*(*TNameContext)(unsafe.Pointer(bp))).FncFlags = type1 | int32(NC_IsDDL)
+ v1 = _sqlite3ResolveExprNames(tls, bp, pExpr)
rc = v1
if v1 != SQLITE_OK {
return rc
}
if pList != 0 {
- rc = _sqlite3ResolveExprListNames(tls, bp+56, pList)
+ rc = _sqlite3ResolveExprListNames(tls, bp, pList)
}
return rc
}
@@ -82213,7 +82373,7 @@ func _sqlite3ExprAffinity(tls *libc.TLS, pExpr uintptr) (r int8) {
if op == int32(TK_SELECT_COLUMN) {
return _sqlite3ExprAffinity(tls, (*(*TExprList_item)(unsafe.Pointer((*TSelect)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer((*TExpr)(unsafe.Pointer(pExpr)).FpLeft + 20)))).FpEList + 8 + uintptr((*TExpr)(unsafe.Pointer(pExpr)).FiColumn)*20))).FpExpr)
}
- if op == int32(TK_VECTOR) {
+ if op == int32(TK_VECTOR) || op == int32(TK_FUNCTION) && int32((*TExpr)(unsafe.Pointer(pExpr)).FaffExpr) == int32(SQLITE_AFF_DEFER) {
return _sqlite3ExprAffinity(tls, (*(*TExprList_item)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(pExpr + 20)) + 8))).FpExpr)
}
if (*TExpr)(unsafe.Pointer(pExpr)).Fflags&libc.Uint32FromInt32(libc.Int32FromInt32(EP_Skip)|libc.Int32FromInt32(EP_IfNullRow)) != uint32(0) {
@@ -82421,7 +82581,7 @@ func _sqlite3ExprCollSeq(tls *libc.TLS, pParse uintptr, pExpr uintptr) (r uintpt
p = (*TExpr)(unsafe.Pointer(p)).FpLeft
continue
}
- if op == int32(TK_VECTOR) {
+ if op == int32(TK_VECTOR) || op == int32(TK_FUNCTION) && int32((*TExpr)(unsafe.Pointer(p)).FaffExpr) == int32(SQLITE_AFF_DEFER) {
p = (*(*TExprList_item)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(p + 20)) + 8))).FpExpr
continue
}
@@ -82896,7 +83056,7 @@ func _codeVectorCompare(tls *libc.TLS, pParse uintptr, pExpr uintptr, dest int32
return
}
if nLeft != _sqlite3ExprVectorSize(tls, pRight) {
- _sqlite3ErrorMsg(tls, pParse, __ccgo_ts+6807, 0)
+ _sqlite3ErrorMsg(tls, pParse, __ccgo_ts+6832, 0)
return
}
if libc.Int32FromUint8(op) == int32(TK_LE) {
@@ -82975,7 +83135,7 @@ func _sqlite3ExprCheckHeight(tls *libc.TLS, pParse uintptr, nHeight int32) (r in
rc = SQLITE_OK
mxHeight = *(*int32)(unsafe.Pointer((*TParse)(unsafe.Pointer(pParse)).Fdb + 116 + 3*4))
if nHeight > mxHeight {
- _sqlite3ErrorMsg(tls, pParse, __ccgo_ts+7760, libc.VaList(bp+8, mxHeight))
+ _sqlite3ErrorMsg(tls, pParse, __ccgo_ts+7785, libc.VaList(bp+8, mxHeight))
rc = int32(SQLITE_ERROR)
}
return rc
@@ -83320,11 +83480,11 @@ func _sqlite3ExprListToValues(tls *libc.TLS, pParse uintptr, nElem int32, pEList
}
if nExprElem != nElem {
if nExprElem > int32(1) {
- v2 = __ccgo_ts + 7808
+ v2 = __ccgo_ts + 7833
} else {
v2 = __ccgo_ts + 1667
}
- _sqlite3ErrorMsg(tls, pParse, __ccgo_ts+7810, libc.VaList(bp+8, nExprElem, v2, nElem))
+ _sqlite3ErrorMsg(tls, pParse, __ccgo_ts+7835, libc.VaList(bp+8, nExprElem, v2, nElem))
break
}
pSel = _sqlite3SelectNew(tls, pParse, *(*uintptr)(unsafe.Pointer(pExpr + 20)), uintptr(0), uintptr(0), uintptr(0), uintptr(0), uintptr(0), uint32(SF_Values), uintptr(0))
@@ -83373,7 +83533,7 @@ func _sqlite3ExprAnd(tls *libc.TLS, pParse uintptr, pLeft uintptr, pRight uintpt
if f&libc.Uint32FromInt32(libc.Int32FromInt32(EP_OuterON)|libc.Int32FromInt32(EP_InnerON)|libc.Int32FromInt32(EP_IsFalse)) == uint32(EP_IsFalse) && !(libc.Int32FromUint8((*TParse)(unsafe.Pointer(pParse)).FeParseMode) >= libc.Int32FromInt32(PARSE_MODE_RENAME)) {
_sqlite3ExprDeferredDelete(tls, pParse, pLeft)
_sqlite3ExprDeferredDelete(tls, pParse, pRight)
- return _sqlite3Expr(tls, db, int32(TK_INTEGER), __ccgo_ts+1787)
+ return _sqlite3Expr(tls, db, int32(TK_INTEGER), __ccgo_ts+1813)
} else {
return _sqlite3PExpr(tls, pParse, int32(TK_AND), pLeft, pRight)
}
@@ -83401,7 +83561,7 @@ func _sqlite3ExprFunction(tls *libc.TLS, pParse uintptr, pList uintptr, pToken u
}
*(*int32)(unsafe.Pointer(pNew + 36)) = int32((*TToken)(unsafe.Pointer(pToken)).Fz) - int32((*TParse)(unsafe.Pointer(pParse)).FzTail)
if pList != 0 && (*TExprList)(unsafe.Pointer(pList)).FnExpr > *(*int32)(unsafe.Pointer((*TParse)(unsafe.Pointer(pParse)).Fdb + 116 + 6*4)) && !((*TParse)(unsafe.Pointer(pParse)).Fnested != 0) {
- _sqlite3ErrorMsg(tls, pParse, __ccgo_ts+7854, libc.VaList(bp+8, pToken))
+ _sqlite3ErrorMsg(tls, pParse, __ccgo_ts+7879, libc.VaList(bp+8, pToken))
}
*(*uintptr)(unsafe.Pointer(pNew + 20)) = pList
*(*Tu32)(unsafe.Pointer(pNew + 4)) |= libc.Uint32FromInt32(libc.Int32FromInt32(EP_HasFunc))
@@ -83421,7 +83581,7 @@ func _sqlite3ExprFunction(tls *libc.TLS, pParse uintptr, pList uintptr, pToken u
func _sqlite3ExprOrderByAggregateError(tls *libc.TLS, pParse uintptr, p uintptr) {
bp := tls.Alloc(16)
defer tls.Free(16)
- _sqlite3ErrorMsg(tls, pParse, __ccgo_ts+7888, libc.VaList(bp+8, p))
+ _sqlite3ErrorMsg(tls, pParse, __ccgo_ts+7913, libc.VaList(bp+8, p))
}
// C documentation
@@ -83492,7 +83652,7 @@ func _sqlite3ExprFunctionUsable(tls *libc.TLS, pParse uintptr, pExpr uintptr, pD
** SQLITE_DBCONFIG_TRUSTED_SCHEMA is off (meaning
** that the schema is possibly tainted).
*/
- _sqlite3ErrorMsg(tls, pParse, __ccgo_ts+7938, libc.VaList(bp+8, pExpr))
+ _sqlite3ErrorMsg(tls, pParse, __ccgo_ts+7963, libc.VaList(bp+8, pExpr))
}
}
}
@@ -83530,7 +83690,7 @@ func _sqlite3ExprAssignVarNumber(tls *libc.TLS, pParse uintptr, pExpr uintptr, n
z = *(*uintptr)(unsafe.Pointer(pExpr + 8))
if int32(*(*int8)(unsafe.Pointer(z + 1))) == 0 {
/* Wildcard of the form "?". Assign the next variable number */
- v2 = pParse + 220
+ v2 = pParse + 216
*(*TynVar)(unsafe.Pointer(v2))++
v1 = *(*TynVar)(unsafe.Pointer(v2))
x = v1
@@ -83544,7 +83704,7 @@ func _sqlite3ExprAssignVarNumber(tls *libc.TLS, pParse uintptr, pExpr uintptr, n
bOk = libc.BoolInt32(0 == _sqlite3Atoi64(tls, z+1, bp, libc.Int32FromUint32(n-uint32(1)), uint8(SQLITE_UTF8)))
}
if bOk == 0 || *(*Ti64)(unsafe.Pointer(bp)) < int64(1) || *(*Ti64)(unsafe.Pointer(bp)) > int64(*(*int32)(unsafe.Pointer(db + 116 + 9*4))) {
- _sqlite3ErrorMsg(tls, pParse, __ccgo_ts+7958, libc.VaList(bp+16, *(*int32)(unsafe.Pointer(db + 116 + 9*4))))
+ _sqlite3ErrorMsg(tls, pParse, __ccgo_ts+7983, libc.VaList(bp+16, *(*int32)(unsafe.Pointer(db + 116 + 9*4))))
_sqlite3RecordErrorOffsetOfExpr(tls, (*TParse)(unsafe.Pointer(pParse)).Fdb, pExpr)
return
}
@@ -83564,7 +83724,7 @@ func _sqlite3ExprAssignVarNumber(tls *libc.TLS, pParse uintptr, pExpr uintptr, n
*/
x = int16(_sqlite3VListNameToNum(tls, (*TParse)(unsafe.Pointer(pParse)).FpVList, z, libc.Int32FromUint32(n)))
if int32(x) == 0 {
- v4 = pParse + 220
+ v4 = pParse + 216
*(*TynVar)(unsafe.Pointer(v4))++
v3 = *(*TynVar)(unsafe.Pointer(v4))
x = v3
@@ -83577,7 +83737,7 @@ func _sqlite3ExprAssignVarNumber(tls *libc.TLS, pParse uintptr, pExpr uintptr, n
}
(*TExpr)(unsafe.Pointer(pExpr)).FiColumn = x
if int32(x) > *(*int32)(unsafe.Pointer(db + 116 + 9*4)) {
- _sqlite3ErrorMsg(tls, pParse, __ccgo_ts+8001, 0)
+ _sqlite3ErrorMsg(tls, pParse, __ccgo_ts+8026, 0)
_sqlite3RecordErrorOffsetOfExpr(tls, (*TParse)(unsafe.Pointer(pParse)).Fdb, pExpr)
}
}
@@ -83960,7 +84120,7 @@ func _sqlite3WithDup(tls *libc.TLS, db uintptr, p uintptr) (r uintptr) {
_, _, _ = i, nByte, pRet
pRet = uintptr(0)
if p != 0 {
- nByte = libc.Int64FromUint32(uint32(36) + uint32(24)*libc.Uint32FromInt32((*TWith)(unsafe.Pointer(p)).FnCte-libc.Int32FromInt32(1)))
+ nByte = libc.Int64FromUint32(uint32(libc.UintptrFromInt32(0)+12) + libc.Uint32FromInt32((*TWith)(unsafe.Pointer(p)).FnCte)*libc.Uint32FromInt64(24))
pRet = _sqlite3DbMallocZero(tls, db, libc.Uint64FromInt64(nByte))
if pRet != 0 {
(*TWith)(unsafe.Pointer(pRet)).FnCte = (*TWith)(unsafe.Pointer(p)).FnCte
@@ -84100,7 +84260,6 @@ func _sqlite3ExprListDup(tls *libc.TLS, db uintptr, p uintptr, flags int32) (r u
}
(*TExprList_item)(unsafe.Pointer(pItem)).FzEName = _sqlite3DbStrDup(tls, db, (*TExprList_item)(unsafe.Pointer(pOldItem)).FzEName)
(*TExprList_item)(unsafe.Pointer(pItem)).Ffg = (*TExprList_item)(unsafe.Pointer(pOldItem)).Ffg
- libc.SetBitFieldPtr16Uint32(pItem+8+4, libc.Uint32FromInt32(0), 2, 0x4)
(*TExprList_item)(unsafe.Pointer(pItem)).Fu = (*TExprList_item)(unsafe.Pointer(pOldItem)).Fu
goto _1
_1:
@@ -84121,27 +84280,20 @@ func _sqlite3ExprListDup(tls *libc.TLS, db uintptr, p uintptr, flags int32) (r u
// ** called with a NULL argument.
// */
func _sqlite3SrcListDup(tls *libc.TLS, db uintptr, p uintptr, flags int32) (r uintptr) {
- var i, nByte int32
- var pNew, pNewItem, pNewSubq, pOldItem, pTab, v4 uintptr
- var v1 uint32
- var v2 Tu32
- _, _, _, _, _, _, _, _, _, _ = i, nByte, pNew, pNewItem, pNewSubq, pOldItem, pTab, v1, v2, v4
+ var i int32
+ var pNew, pNewItem, pNewSubq, pOldItem, pTab, v3 uintptr
+ var v1 Tu32
+ _, _, _, _, _, _, _, _ = i, pNew, pNewItem, pNewSubq, pOldItem, pTab, v1, v3
if p == uintptr(0) {
return uintptr(0)
}
- if (*TSrcList)(unsafe.Pointer(p)).FnSrc > 0 {
- v1 = uint32(48) * libc.Uint32FromInt32((*TSrcList)(unsafe.Pointer(p)).FnSrc-libc.Int32FromInt32(1))
- } else {
- v1 = uint32(0)
- }
- nByte = libc.Int32FromUint32(uint32(56) + v1)
- pNew = _sqlite3DbMallocRawNN(tls, db, libc.Uint64FromInt32(nByte))
+ pNew = _sqlite3DbMallocRawNN(tls, db, uint64(uint32(libc.UintptrFromInt32(0)+8)+libc.Uint32FromInt32((*TSrcList)(unsafe.Pointer(p)).FnSrc)*libc.Uint32FromInt64(48)))
if pNew == uintptr(0) {
return uintptr(0)
}
- v2 = libc.Uint32FromInt32((*TSrcList)(unsafe.Pointer(p)).FnSrc)
- (*TSrcList)(unsafe.Pointer(pNew)).FnAlloc = v2
- (*TSrcList)(unsafe.Pointer(pNew)).FnSrc = libc.Int32FromUint32(v2)
+ v1 = libc.Uint32FromInt32((*TSrcList)(unsafe.Pointer(p)).FnSrc)
+ (*TSrcList)(unsafe.Pointer(pNew)).FnAlloc = v1
+ (*TSrcList)(unsafe.Pointer(pNew)).FnSrc = libc.Int32FromUint32(v1)
i = 0
for {
if !(i < (*TSrcList)(unsafe.Pointer(p)).FnSrc) {
@@ -84187,9 +84339,9 @@ func _sqlite3SrcListDup(tls *libc.TLS, db uintptr, p uintptr, flags int32) (r ui
if int32(*(*uint32)(unsafe.Pointer(pNewItem + 12 + 4))&0x200>>9) != 0 {
(*TCteUse)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(pNewItem + 36)))).FnUse++
}
- v4 = (*TSrcItem)(unsafe.Pointer(pOldItem)).FpSTab
- (*TSrcItem)(unsafe.Pointer(pNewItem)).FpSTab = v4
- pTab = v4
+ v3 = (*TSrcItem)(unsafe.Pointer(pOldItem)).FpSTab
+ (*TSrcItem)(unsafe.Pointer(pNewItem)).FpSTab = v3
+ pTab = v3
if pTab != 0 {
(*TTable)(unsafe.Pointer(pTab)).FnTabRef++
}
@@ -84199,8 +84351,8 @@ func _sqlite3SrcListDup(tls *libc.TLS, db uintptr, p uintptr, flags int32) (r ui
*(*uintptr)(unsafe.Pointer(pNewItem + 40)) = _sqlite3ExprDup(tls, db, *(*uintptr)(unsafe.Pointer(pOldItem + 40)), flags)
}
(*TSrcItem)(unsafe.Pointer(pNewItem)).FcolUsed = (*TSrcItem)(unsafe.Pointer(pOldItem)).FcolUsed
- goto _3
- _3:
+ goto _2
+ _2:
;
i++
}
@@ -84214,7 +84366,7 @@ func _sqlite3IdListDup(tls *libc.TLS, db uintptr, p uintptr) (r uintptr) {
if p == uintptr(0) {
return uintptr(0)
}
- pNew = _sqlite3DbMallocRawNN(tls, db, uint64(uint32(8)+libc.Uint32FromInt32((*TIdList)(unsafe.Pointer(p)).FnId-libc.Int32FromInt32(1))*uint32(4)))
+ pNew = _sqlite3DbMallocRawNN(tls, db, uint64(uint32(libc.UintptrFromInt32(0)+4)+libc.Uint32FromInt32((*TIdList)(unsafe.Pointer(p)).FnId)*libc.Uint32FromInt64(4)))
if pNew == uintptr(0) {
return uintptr(0)
}
@@ -84265,7 +84417,7 @@ func _sqlite3SelectDup(tls *libc.TLS, db uintptr, pDup uintptr, flags int32) (r
(*TSelect)(unsafe.Pointer(pNew)).FpLimit = _sqlite3ExprDup(tls, db, (*TSelect)(unsafe.Pointer(p)).FpLimit, flags)
(*TSelect)(unsafe.Pointer(pNew)).FiLimit = 0
(*TSelect)(unsafe.Pointer(pNew)).FiOffset = 0
- (*TSelect)(unsafe.Pointer(pNew)).FselFlags = (*TSelect)(unsafe.Pointer(p)).FselFlags & libc.Uint32FromInt32(^libc.Int32FromInt32(SF_UsesEphemeral))
+ (*TSelect)(unsafe.Pointer(pNew)).FselFlags = (*TSelect)(unsafe.Pointer(p)).FselFlags & ^libc.Uint32FromInt32(SF_UsesEphemeral)
*(*int32)(unsafe.Pointer(pNew + 20)) = -int32(1)
*(*int32)(unsafe.Pointer(pNew + 20 + 1*4)) = -int32(1)
(*TSelect)(unsafe.Pointer(pNew)).FnSelectRow = (*TSelect)(unsafe.Pointer(p)).FnSelectRow
@@ -84346,7 +84498,7 @@ var _zeroItem = TExprList_item{}
func _sqlite3ExprListAppendNew(tls *libc.TLS, db uintptr, pExpr uintptr) (r uintptr) {
var pItem, pList uintptr
_, _ = pItem, pList
- pList = _sqlite3DbMallocRawNN(tls, db, uint64(libc.Uint32FromInt64(28)+libc.Uint32FromInt64(20)*libc.Uint32FromInt32(4)))
+ pList = _sqlite3DbMallocRawNN(tls, db, uint64(uint32(libc.UintptrFromInt32(0)+8)+libc.Uint32FromInt32(libc.Int32FromInt32(4))*libc.Uint32FromInt64(20)))
if pList == uintptr(0) {
_sqlite3ExprDelete(tls, db, pExpr)
return uintptr(0)
@@ -84364,7 +84516,7 @@ func _sqlite3ExprListAppendGrow(tls *libc.TLS, db uintptr, pList uintptr, pExpr
var v1 int32
_, _, _, _ = pItem, pNew, v1, v2
*(*int32)(unsafe.Pointer(pList + 4)) *= int32(2)
- pNew = _sqlite3DbRealloc(tls, db, pList, uint64(uint32(28)+libc.Uint32FromInt32((*TExprList)(unsafe.Pointer(pList)).FnAlloc-libc.Int32FromInt32(1))*uint32(20)))
+ pNew = _sqlite3DbRealloc(tls, db, pList, uint64(uint32(libc.UintptrFromInt32(0)+8)+libc.Uint32FromInt32((*TExprList)(unsafe.Pointer(pList)).FnAlloc)*libc.Uint32FromInt64(20)))
if pNew == uintptr(0) {
_sqlite3ExprListDelete(tls, db, pList)
_sqlite3ExprDelete(tls, db, pExpr)
@@ -84445,7 +84597,7 @@ func _sqlite3ExprListAppendVector(tls *libc.TLS, pParse uintptr, pList uintptr,
n = v2
}
if v3 && (*TIdList)(unsafe.Pointer(pColumns)).FnId != v2 {
- _sqlite3ErrorMsg(tls, pParse, __ccgo_ts+8024, libc.VaList(bp+8, (*TIdList)(unsafe.Pointer(pColumns)).FnId, n))
+ _sqlite3ErrorMsg(tls, pParse, __ccgo_ts+8049, libc.VaList(bp+8, (*TIdList)(unsafe.Pointer(pColumns)).FnId, n))
goto vector_append_error
}
i = 0
@@ -84574,7 +84726,7 @@ func _sqlite3ExprListCheckLength(tls *libc.TLS, pParse uintptr, pEList uintptr,
_ = mx
mx = *(*int32)(unsafe.Pointer((*TParse)(unsafe.Pointer(pParse)).Fdb + 116 + 2*4))
if pEList != 0 && (*TExprList)(unsafe.Pointer(pEList)).FnExpr > mx {
- _sqlite3ErrorMsg(tls, pParse, __ccgo_ts+8054, libc.VaList(bp+8, zObject))
+ _sqlite3ErrorMsg(tls, pParse, __ccgo_ts+8079, libc.VaList(bp+8, zObject))
}
}
@@ -84672,10 +84824,10 @@ func _sqlite3SelectWalkFail(tls *libc.TLS, pWalker uintptr, NotUsed uintptr) (r
// ** anything else 0
// */
func _sqlite3IsTrueOrFalse(tls *libc.TLS, zIn uintptr) (r Tu32) {
- if _sqlite3StrICmp(tls, zIn, __ccgo_ts+8077) == 0 {
+ if _sqlite3StrICmp(tls, zIn, __ccgo_ts+8102) == 0 {
return uint32(EP_IsTrue)
}
- if _sqlite3StrICmp(tls, zIn, __ccgo_ts+8082) == 0 {
+ if _sqlite3StrICmp(tls, zIn, __ccgo_ts+8107) == 0 {
return uint32(EP_IsFalse)
}
return uint32(0)
@@ -85353,13 +85505,13 @@ func _sqlite3ExprNeedsNoAffinityChange(tls *libc.TLS, p uintptr, aff int8) (r in
// ** Return TRUE if the given string is a row-id column name.
// */
func _sqlite3IsRowid(tls *libc.TLS, z uintptr) (r int32) {
- if _sqlite3StrICmp(tls, z, __ccgo_ts+8088) == 0 {
+ if _sqlite3StrICmp(tls, z, __ccgo_ts+8113) == 0 {
return int32(1)
}
- if _sqlite3StrICmp(tls, z, __ccgo_ts+8096) == 0 {
+ if _sqlite3StrICmp(tls, z, __ccgo_ts+8121) == 0 {
return int32(1)
}
- if _sqlite3StrICmp(tls, z, __ccgo_ts+8102) == 0 {
+ if _sqlite3StrICmp(tls, z, __ccgo_ts+8127) == 0 {
return int32(1)
}
return 0
@@ -85374,32 +85526,19 @@ func _sqlite3IsRowid(tls *libc.TLS, z uintptr) (r int32) {
// */
func _sqlite3RowidAlias(tls *libc.TLS, pTab uintptr) (r uintptr) {
var azOpt [3]uintptr
- var iCol, ii int32
- _, _, _ = azOpt, iCol, ii
+ var ii int32
+ _, _ = azOpt, ii
azOpt = [3]uintptr{
- 0: __ccgo_ts + 8088,
- 1: __ccgo_ts + 8096,
- 2: __ccgo_ts + 8102,
+ 0: __ccgo_ts + 8113,
+ 1: __ccgo_ts + 8121,
+ 2: __ccgo_ts + 8127,
}
ii = 0
for {
if !(ii < libc.Int32FromUint32(libc.Uint32FromInt64(12)/libc.Uint32FromInt64(4))) {
break
}
- iCol = 0
- for {
- if !(iCol < int32((*TTable)(unsafe.Pointer(pTab)).FnCol)) {
- break
- }
- if Xsqlite3_stricmp(tls, azOpt[ii], (*(*TColumn)(unsafe.Pointer((*TTable)(unsafe.Pointer(pTab)).FaCol + uintptr(iCol)*12))).FzCnName) == 0 {
- break
- }
- goto _2
- _2:
- ;
- iCol++
- }
- if iCol == int32((*TTable)(unsafe.Pointer(pTab)).FnCol) {
+ if _sqlite3ColumnIndex(tls, pTab, azOpt[ii]) < 0 {
return azOpt[ii]
}
goto _1
@@ -85608,7 +85747,7 @@ func _sqlite3FindInIndex(tls *libc.TLS, pParse uintptr, pX uintptr, inFlags Tu32
eType = 0 /* True if RHS must be unique */
v = _sqlite3GetVdbe(tls, pParse) /* Virtual machine being coded */
mustBeUnique = libc.BoolInt32(inFlags&uint32(IN_INDEX_LOOP) != uint32(0))
- v2 = pParse + 44
+ v2 = pParse + 48
v1 = *(*int32)(unsafe.Pointer(v2))
*(*int32)(unsafe.Pointer(v2))++
iTab = v1
@@ -85661,7 +85800,7 @@ func _sqlite3FindInIndex(tls *libc.TLS, pParse uintptr, pX uintptr, inFlags Tu32
iAddr = _sqlite3VdbeAddOp0(tls, v, int32(OP_Once))
_sqlite3OpenTable(tls, pParse, iTab, iDb, pTab, int32(OP_OpenRead))
eType = int32(IN_INDEX_ROWID)
- _sqlite3VdbeExplain(tls, pParse, uint8(0), __ccgo_ts+8106, libc.VaList(bp+8, (*TTable)(unsafe.Pointer(pTab)).FzName))
+ _sqlite3VdbeExplain(tls, pParse, uint8(0), __ccgo_ts+8131, libc.VaList(bp+8, (*TTable)(unsafe.Pointer(pTab)).FzName))
_sqlite3VdbeJumpHere(tls, v, iAddr)
} else { /* Iterator variable */
affinity_ok = int32(1)
@@ -85761,12 +85900,12 @@ func _sqlite3FindInIndex(tls *libc.TLS, pParse uintptr, pX uintptr, inFlags Tu32
if colUsed == libc.Uint64FromInt32(1)<<nExpr-uint64(1) {
/* If we reach this point, that means the index pIdx is usable */
iAddr1 = _sqlite3VdbeAddOp0(tls, v, int32(OP_Once))
- _sqlite3VdbeExplain(tls, pParse, uint8(0), __ccgo_ts+8153, libc.VaList(bp+8, (*TIndex)(unsafe.Pointer(pIdx)).FzName))
+ _sqlite3VdbeExplain(tls, pParse, uint8(0), __ccgo_ts+8178, libc.VaList(bp+8, (*TIndex)(unsafe.Pointer(pIdx)).FzName))
_sqlite3VdbeAddOp3(tls, v, int32(OP_OpenRead), iTab, libc.Int32FromUint32((*TIndex)(unsafe.Pointer(pIdx)).Ftnum), iDb)
_sqlite3VdbeSetP4KeyInfo(tls, pParse, pIdx)
eType = int32(IN_INDEX_INDEX_ASC) + libc.Int32FromUint8(*(*Tu8)(unsafe.Pointer((*TIndex)(unsafe.Pointer(pIdx)).FaSortOrder)))
if prRhsHasNull != 0 {
- v11 = pParse + 48
+ v11 = pParse + 52
*(*int32)(unsafe.Pointer(v11))++
v10 = *(*int32)(unsafe.Pointer(v11))
*(*int32)(unsafe.Pointer(prRhsHasNull)) = v10
@@ -85807,7 +85946,7 @@ func _sqlite3FindInIndex(tls *libc.TLS, pParse uintptr, pX uintptr, inFlags Tu32
(*TParse)(unsafe.Pointer(pParse)).FnQueryLoop = 0
} else {
if prRhsHasNull != 0 {
- v14 = pParse + 48
+ v14 = pParse + 52
*(*int32)(unsafe.Pointer(v14))++
v13 = *(*int32)(unsafe.Pointer(v14))
v12 = v13
@@ -85862,7 +86001,7 @@ func _exprINAffinity(tls *libc.TLS, pParse uintptr, pExpr uintptr) (r uintptr) {
v1 = uintptr(0)
}
pSelect = v1
- zRet = _sqlite3DbMallocRaw(tls, (*TParse)(unsafe.Pointer(pParse)).Fdb, libc.Uint64FromInt32(nVal+int32(1)))
+ zRet = _sqlite3DbMallocRaw(tls, (*TParse)(unsafe.Pointer(pParse)).Fdb, libc.Uint64FromInt64(int64(1)+int64(nVal)))
if zRet != 0 {
i = 0
for {
@@ -85900,7 +86039,7 @@ func _sqlite3SubselectError(tls *libc.TLS, pParse uintptr, nActual int32, nExpec
var zFmt uintptr
_ = zFmt
if (*TParse)(unsafe.Pointer(pParse)).FnErr == 0 {
- zFmt = __ccgo_ts + 8184
+ zFmt = __ccgo_ts + 8209
_sqlite3ErrorMsg(tls, pParse, zFmt, libc.VaList(bp+8, nActual, nExpect))
}
}
@@ -85922,7 +86061,7 @@ func _sqlite3VectorErrorMsg(tls *libc.TLS, pParse uintptr, pExpr uintptr) {
if (*TExpr)(unsafe.Pointer(pExpr)).Fflags&uint32(EP_xIsSelect) != uint32(0) {
_sqlite3SubselectError(tls, pParse, (*TExprList)(unsafe.Pointer((*TSelect)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(pExpr + 20)))).FpEList)).FnExpr, int32(1))
} else {
- _sqlite3ErrorMsg(tls, pParse, __ccgo_ts+6807, 0)
+ _sqlite3ErrorMsg(tls, pParse, __ccgo_ts+6832, 0)
}
}
@@ -86047,7 +86186,7 @@ func _sqlite3CodeRhsOfIN(tls *libc.TLS, pParse uintptr, pExpr uintptr, iTab int3
if (*TExpr)(unsafe.Pointer(pExpr)).Fflags&libc.Uint32FromInt32(libc.Int32FromInt32(EP_Subrtn)) != uint32(0) || _findCompatibleInRhsSubrtn(tls, pParse, pExpr, pSig) != 0 {
addrOnce = _sqlite3VdbeAddOp0(tls, v, int32(OP_Once))
if (*TExpr)(unsafe.Pointer(pExpr)).Fflags&uint32(EP_xIsSelect) != uint32(0) {
- _sqlite3VdbeExplain(tls, pParse, uint8(0), __ccgo_ts+8228, libc.VaList(bp+40, (*TSelect)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(pExpr + 20)))).FselId))
+ _sqlite3VdbeExplain(tls, pParse, uint8(0), __ccgo_ts+8253, libc.VaList(bp+40, (*TSelect)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(pExpr + 20)))).FselId))
}
_sqlite3VdbeAddOp2(tls, v, int32(OP_Gosub), (*(*struct {
FiAddr int32
@@ -86066,7 +86205,7 @@ func _sqlite3CodeRhsOfIN(tls *libc.TLS, pParse uintptr, pExpr uintptr, iTab int3
}
/* Begin coding the subroutine */
*(*Tu32)(unsafe.Pointer(pExpr + 4)) |= libc.Uint32FromInt32(libc.Int32FromInt32(EP_Subrtn))
- v2 = pParse + 48
+ v2 = pParse + 52
*(*int32)(unsafe.Pointer(v2))++
v1 = *(*int32)(unsafe.Pointer(v2))
(*(*struct {
@@ -86116,9 +86255,9 @@ func _sqlite3CodeRhsOfIN(tls *libc.TLS, pParse uintptr, pExpr uintptr, iTab int3
if addrOnce != 0 {
v3 = __ccgo_ts + 1667
} else {
- v3 = __ccgo_ts + 8251
+ v3 = __ccgo_ts + 8276
}
- _sqlite3VdbeExplain(tls, pParse, uint8(1), __ccgo_ts+8263, libc.VaList(bp+40, v3, (*TSelect)(unsafe.Pointer(pSelect)).FselId))
+ _sqlite3VdbeExplain(tls, pParse, uint8(1), __ccgo_ts+8288, libc.VaList(bp+40, v3, (*TSelect)(unsafe.Pointer(pSelect)).FselId))
/* If the LHS and RHS of the IN operator do not match, that
** error will have been caught long before we reach this point. */
if (*TExprList)(unsafe.Pointer(pEList)).FnExpr == nVal {
@@ -86127,7 +86266,7 @@ func _sqlite3CodeRhsOfIN(tls *libc.TLS, pParse uintptr, pExpr uintptr, iTab int3
(*(*TSelectDest)(unsafe.Pointer(bp))).FzAffSdst = _exprINAffinity(tls, pParse, pExpr)
(*TSelect)(unsafe.Pointer(pSelect)).FiLimit = 0
if addrOnce != 0 && (*Tsqlite3)(unsafe.Pointer((*TParse)(unsafe.Pointer(pParse)).Fdb)).FdbOptFlags&libc.Uint32FromInt32(libc.Int32FromInt32(SQLITE_BloomFilter)) == uint32(0) {
- v5 = pParse + 48
+ v5 = pParse + 52
*(*int32)(unsafe.Pointer(v5))++
v4 = *(*int32)(unsafe.Pointer(v5))
regBloom = v4
@@ -86145,11 +86284,12 @@ func _sqlite3CodeRhsOfIN(tls *libc.TLS, pParse uintptr, pExpr uintptr, iTab int3
_sqlite3SelectDelete(tls, (*TParse)(unsafe.Pointer(pParse)).Fdb, pCopy)
_sqlite3DbFree(tls, (*TParse)(unsafe.Pointer(pParse)).Fdb, (*(*TSelectDest)(unsafe.Pointer(bp))).FzAffSdst)
if addrBloom != 0 {
+ /* Remember that location of the Bloom filter in the P3 operand
+ ** of the OP_Once that began this subroutine. tag-202407032019 */
(*TVdbeOp)(unsafe.Pointer(_sqlite3VdbeGetOp(tls, v, addrOnce))).Fp3 = (*(*TSelectDest)(unsafe.Pointer(bp))).FiSDParm2
if (*(*TSelectDest)(unsafe.Pointer(bp))).FiSDParm2 == 0 {
- _sqlite3VdbeChangeToNoop(tls, v, addrBloom)
- } else {
- (*TVdbeOp)(unsafe.Pointer(_sqlite3VdbeGetOp(tls, v, addrOnce))).Fp3 = (*(*TSelectDest)(unsafe.Pointer(bp))).FiSDParm2
+ /* If the Bloom filter won't actually be used, keep it small */
+ (*TVdbeOp)(unsafe.Pointer(_sqlite3VdbeGetOp(tls, v, addrBloom))).Fp1 = int32(10)
}
}
if rc != 0 {
@@ -86202,7 +86342,7 @@ func _sqlite3CodeRhsOfIN(tls *libc.TLS, pParse uintptr, pExpr uintptr, iTab int3
if addrOnce != 0 && !(_sqlite3ExprIsConstant(tls, pParse, pE2) != 0) {
_sqlite3VdbeChangeToNoop(tls, v, addrOnce-int32(1))
_sqlite3VdbeChangeToNoop(tls, v, addrOnce)
- *(*Tu32)(unsafe.Pointer(pExpr + 4)) &= libc.Uint32FromInt32(^libc.Int32FromInt32(EP_Subrtn))
+ *(*Tu32)(unsafe.Pointer(pExpr + 4)) &= ^libc.Uint32FromInt32(libc.Int32FromInt32(EP_Subrtn))
addrOnce = 0
}
/* Evaluate the expression and insert it into the temp table */
@@ -86273,7 +86413,7 @@ func _sqlite3CodeSubselect(tls *libc.TLS, pParse uintptr, pExpr uintptr) (r int3
/* If this routine has already been coded, then invoke it as a
** subroutine. */
if (*TExpr)(unsafe.Pointer(pExpr)).Fflags&libc.Uint32FromInt32(libc.Int32FromInt32(EP_Subrtn)) != uint32(0) {
- _sqlite3VdbeExplain(tls, pParse, uint8(0), __ccgo_ts+8282, libc.VaList(bp+40, (*TSelect)(unsafe.Pointer(pSel)).FselId))
+ _sqlite3VdbeExplain(tls, pParse, uint8(0), __ccgo_ts+8307, libc.VaList(bp+40, (*TSelect)(unsafe.Pointer(pSel)).FselId))
_sqlite3VdbeAddOp2(tls, v, int32(OP_Gosub), (*(*struct {
FiAddr int32
FregReturn int32
@@ -86285,7 +86425,7 @@ func _sqlite3CodeSubselect(tls *libc.TLS, pParse uintptr, pExpr uintptr) (r int3
}
/* Begin coding the subroutine */
*(*Tu32)(unsafe.Pointer(pExpr + 4)) |= libc.Uint32FromInt32(libc.Int32FromInt32(EP_Subrtn))
- v2 = pParse + 48
+ v2 = pParse + 52
*(*int32)(unsafe.Pointer(v2))++
v1 = *(*int32)(unsafe.Pointer(v2))
(*(*struct {
@@ -86325,9 +86465,9 @@ func _sqlite3CodeSubselect(tls *libc.TLS, pParse uintptr, pExpr uintptr) (r int3
if addrOnce != 0 {
v3 = __ccgo_ts + 1667
} else {
- v3 = __ccgo_ts + 8251
+ v3 = __ccgo_ts + 8276
}
- _sqlite3VdbeExplain(tls, pParse, uint8(1), __ccgo_ts+8300, libc.VaList(bp+40, v3, (*TSelect)(unsafe.Pointer(pSel)).FselId))
+ _sqlite3VdbeExplain(tls, pParse, uint8(1), __ccgo_ts+8325, libc.VaList(bp+40, v3, (*TSelect)(unsafe.Pointer(pSel)).FselId))
if libc.Int32FromUint8((*TExpr)(unsafe.Pointer(pExpr)).Fop) == int32(TK_SELECT) {
v4 = (*TExprList)(unsafe.Pointer((*TSelect)(unsafe.Pointer(pSel)).FpEList)).FnExpr
} else {
@@ -86335,7 +86475,7 @@ func _sqlite3CodeSubselect(tls *libc.TLS, pParse uintptr, pExpr uintptr) (r int3
}
nReg = v4
_sqlite3SelectDestInit(tls, bp, 0, (*TParse)(unsafe.Pointer(pParse)).FnMem+int32(1))
- *(*int32)(unsafe.Pointer(pParse + 48)) += nReg
+ *(*int32)(unsafe.Pointer(pParse + 52)) += nReg
if libc.Int32FromUint8((*TExpr)(unsafe.Pointer(pExpr)).Fop) == int32(TK_SELECT) {
(*(*TSelectDest)(unsafe.Pointer(bp))).FeDest = uint8(SRT_Mem)
(*(*TSelectDest)(unsafe.Pointer(bp))).FiSdst = (*(*TSelectDest)(unsafe.Pointer(bp))).FiSDParm
@@ -86349,7 +86489,7 @@ func _sqlite3CodeSubselect(tls *libc.TLS, pParse uintptr, pExpr uintptr) (r int3
/* The subquery already has a limit. If the pre-existing limit is X
** then make the new limit X<>0 so that the new limit is either 1 or 0 */
db = (*TParse)(unsafe.Pointer(pParse)).Fdb
- pLimit = _sqlite3Expr(tls, db, int32(TK_INTEGER), __ccgo_ts+1787)
+ pLimit = _sqlite3Expr(tls, db, int32(TK_INTEGER), __ccgo_ts+1813)
if pLimit != 0 {
(*TExpr)(unsafe.Pointer(pLimit)).FaffExpr = int8(SQLITE_AFF_NUMERIC)
pLimit = _sqlite3PExpr(tls, pParse, int32(TK_NE), _sqlite3ExprDup(tls, db, (*TExpr)(unsafe.Pointer((*TSelect)(unsafe.Pointer(pSel)).FpLimit)).FpLeft, 0), pLimit)
@@ -86358,7 +86498,7 @@ func _sqlite3CodeSubselect(tls *libc.TLS, pParse uintptr, pExpr uintptr) (r int3
(*TExpr)(unsafe.Pointer((*TSelect)(unsafe.Pointer(pSel)).FpLimit)).FpLeft = pLimit
} else {
/* If there is no pre-existing limit add a limit of 1 */
- pLimit = _sqlite3Expr(tls, (*TParse)(unsafe.Pointer(pParse)).Fdb, int32(TK_INTEGER), __ccgo_ts+8321)
+ pLimit = _sqlite3Expr(tls, (*TParse)(unsafe.Pointer(pParse)).Fdb, int32(TK_INTEGER), __ccgo_ts+8346)
(*TSelect)(unsafe.Pointer(pSel)).FpLimit = _sqlite3PExpr(tls, pParse, int32(TK_LIMIT), pLimit, uintptr(0))
}
(*TSelect)(unsafe.Pointer(pSel)).FiLimit = 0
@@ -86454,7 +86594,7 @@ func _sqlite3ExprCodeIN(tls *libc.TLS, pParse uintptr, pExpr uintptr, destIfFals
zAff = uintptr(0) /* Where to jump when NULLs seen in step 2 */
destStep6 = 0 /* Top of the step-6 loop */
*(*int32)(unsafe.Pointer(bp + 8)) = 0 /* Index to use */
- okConstFactor = (*TParse)(unsafe.Pointer(pParse)).FokConstFactor
+ okConstFactor = libc.Uint8FromInt32(int32(Tbft(*(*uint8)(unsafe.Pointer(pParse + 32)) & 0x4 >> 2)))
pLeft = (*TExpr)(unsafe.Pointer(pExpr)).FpLeft
if _sqlite3ExprCheckIN(tls, pParse, pExpr) != 0 {
return
@@ -86489,9 +86629,9 @@ func _sqlite3ExprCodeIN(tls *libc.TLS, pParse uintptr, pExpr uintptr, destIfFals
** Avoid factoring the LHS of the IN(...) expression out of the loop,
** even if it is constant, as OP_Affinity may be used on the register
** by code generated below. */
- (*TParse)(unsafe.Pointer(pParse)).FokConstFactor = uint8(0)
+ libc.SetBitFieldPtr8Uint32(pParse+32, libc.Uint32FromInt32(0), 2, 0x4)
rLhsOrig = _exprCodeVector(tls, pParse, pLeft, bp+4)
- (*TParse)(unsafe.Pointer(pParse)).FokConstFactor = okConstFactor
+ libc.SetBitFieldPtr8Uint32(pParse+32, uint32(okConstFactor), 2, 0x4)
i = 0
for {
if !(i < nVector && *(*int32)(unsafe.Pointer(aiMap + uintptr(i)*4)) == i) {
@@ -86624,7 +86764,7 @@ func _sqlite3ExprCodeIN(tls *libc.TLS, pParse uintptr, pExpr uintptr, destIfFals
FiAddr int32
FregReturn int32
})(unsafe.Pointer(pExpr + 44))).FiAddr)
- if libc.Int32FromUint8((*TVdbeOp)(unsafe.Pointer(pOp)).Fopcode) == int32(OP_Once) && (*TVdbeOp)(unsafe.Pointer(pOp)).Fp3 > 0 {
+ if libc.Int32FromUint8((*TVdbeOp)(unsafe.Pointer(pOp)).Fopcode) == int32(OP_Once) && (*TVdbeOp)(unsafe.Pointer(pOp)).Fp3 > 0 { /* tag-202407032019 */
_sqlite3VdbeAddOp4Int(tls, v, int32(OP_Filter), (*TVdbeOp)(unsafe.Pointer(pOp)).Fp3, destIfFalse, rLhs, nVector)
}
}
@@ -86754,13 +86894,13 @@ func _codeInteger(tls *libc.TLS, pParse uintptr, pExpr uintptr, negFlag int32, i
z = *(*uintptr)(unsafe.Pointer(pExpr + 8))
c = _sqlite3DecOrHexToI64(tls, z, bp)
if c == int32(3) && !(negFlag != 0) || c == int32(2) || negFlag != 0 && *(*Ti64)(unsafe.Pointer(bp)) == int64(-libc.Int32FromInt32(1))-(libc.Int64FromUint32(0xffffffff)|libc.Int64FromInt32(0x7fffffff)<<libc.Int32FromInt32(32)) {
- if Xsqlite3_strnicmp(tls, z, __ccgo_ts+8323, int32(2)) == 0 {
+ if Xsqlite3_strnicmp(tls, z, __ccgo_ts+8348, int32(2)) == 0 {
if negFlag != 0 {
- v1 = __ccgo_ts + 5143
+ v1 = __ccgo_ts + 5169
} else {
v1 = __ccgo_ts + 1667
}
- _sqlite3ErrorMsg(tls, pParse, __ccgo_ts+8326, libc.VaList(bp+16, v1, pExpr))
+ _sqlite3ErrorMsg(tls, pParse, __ccgo_ts+8351, libc.VaList(bp+16, v1, pExpr))
} else {
_codeReal(tls, v, z, negFlag, iMem)
}
@@ -86848,7 +86988,7 @@ func _sqlite3ExprCodeGetColumnOfTable(tls *libc.TLS, v uintptr, pTab uintptr, iT
if libc.Int32FromUint16((*TColumn)(unsafe.Pointer(v1)).FcolFlags)&int32(COLFLAG_VIRTUAL) != 0 {
pParse = _sqlite3VdbeParser(tls, v)
if libc.Int32FromUint16((*TColumn)(unsafe.Pointer(pCol)).FcolFlags)&int32(COLFLAG_BUSY) != 0 {
- _sqlite3ErrorMsg(tls, pParse, __ccgo_ts+8353, libc.VaList(bp+8, (*TColumn)(unsafe.Pointer(pCol)).FzCnName))
+ _sqlite3ErrorMsg(tls, pParse, __ccgo_ts+8378, libc.VaList(bp+8, (*TColumn)(unsafe.Pointer(pCol)).FzCnName))
} else {
savedSelfTab = (*TParse)(unsafe.Pointer(pParse)).FiSelfTab
p2 = pCol + 10
@@ -86862,7 +87002,7 @@ func _sqlite3ExprCodeGetColumnOfTable(tls *libc.TLS, v uintptr, pTab uintptr, iT
return
} else {
if !((*TTable)(unsafe.Pointer(pTab)).FtabFlags&libc.Uint32FromInt32(TF_WithoutRowid) == libc.Uint32FromInt32(0)) {
- x = int32(_sqlite3TableColumnToIndex(tls, _sqlite3PrimaryKeyIndex(tls, pTab), int16(iCol)))
+ x = _sqlite3TableColumnToIndex(tls, _sqlite3PrimaryKeyIndex(tls, pTab), iCol)
op = int32(OP_Column)
} else {
x = int32(_sqlite3TableColumnToStorage(tls, pTab, int16(iCol)))
@@ -86929,7 +87069,7 @@ func _sqlite3ExprToRegister(tls *libc.TLS, pExpr uintptr, iReg int32) {
(*TExpr)(unsafe.Pointer(p)).Fop2 = (*TExpr)(unsafe.Pointer(p)).Fop
(*TExpr)(unsafe.Pointer(p)).Fop = uint8(TK_REGISTER)
(*TExpr)(unsafe.Pointer(p)).FiTable = iReg
- *(*Tu32)(unsafe.Pointer(p + 4)) &= libc.Uint32FromInt32(^libc.Int32FromInt32(EP_Skip))
+ *(*Tu32)(unsafe.Pointer(p + 4)) &= ^libc.Uint32FromInt32(libc.Int32FromInt32(EP_Skip))
}
}
@@ -86957,7 +87097,7 @@ func _exprCodeVector(tls *libc.TLS, pParse uintptr, p uintptr, piFreeable uintpt
iResult = _sqlite3CodeSubselect(tls, pParse, p)
} else {
iResult = (*TParse)(unsafe.Pointer(pParse)).FnMem + int32(1)
- *(*int32)(unsafe.Pointer(pParse + 48)) += nResult
+ *(*int32)(unsafe.Pointer(pParse + 52)) += nResult
i = 0
for {
if !(i < nResult) {
@@ -87068,16 +87208,16 @@ func _exprCodeInlineFunction(tls *libc.TLS, pParse uintptr, pFarg uintptr, iFunc
** the SQLite type logic.
*/
azAff = [6]uintptr{
- 0: __ccgo_ts + 8383,
- 1: __ccgo_ts + 8388,
- 2: __ccgo_ts + 8393,
- 3: __ccgo_ts + 6391,
- 4: __ccgo_ts + 6386,
- 5: __ccgo_ts + 8401,
+ 0: __ccgo_ts + 8408,
+ 1: __ccgo_ts + 8413,
+ 2: __ccgo_ts + 8418,
+ 3: __ccgo_ts + 6416,
+ 4: __ccgo_ts + 6411,
+ 5: __ccgo_ts + 8426,
}
aff = _sqlite3ExprAffinity(tls, (*(*TExprList_item)(unsafe.Pointer(pFarg + 8))).FpExpr)
if int32(aff) <= int32(SQLITE_AFF_NONE) {
- v2 = __ccgo_ts + 8409
+ v2 = __ccgo_ts + 8434
} else {
v2 = azAff[int32(aff)-int32(SQLITE_AFF_BLOB)]
}
@@ -87189,7 +87329,7 @@ func _sqlite3IndexedExprLookup(tls *libc.TLS, pParse uintptr, pExpr uintptr, tar
** value taken from an expression index if they are themselves an
** argument to another scalar function or aggregate.
** https://sqlite.org/forum/forumpost/68d284c86b082c3e */
- if (*TExpr)(unsafe.Pointer(pExpr)).Fflags&uint32(EP_SubtArg) != uint32(0) && _sqlite3ExprCanReturnSubtype(tls, pParse, pExpr) != 0 {
+ if (*TExpr)(unsafe.Pointer(pExpr)).Fflags&libc.Uint32FromUint32(EP_SubtArg) != uint32(0) && _sqlite3ExprCanReturnSubtype(tls, pParse, pExpr) != 0 {
goto _1
}
v = (*TParse)(unsafe.Pointer(pParse)).FpVdbe
@@ -87221,7 +87361,7 @@ func _sqlite3IndexedExprLookup(tls *libc.TLS, pParse uintptr, pExpr uintptr, tar
// C documentation
//
// /*
-// ** Expresion pExpr is guaranteed to be a TK_COLUMN or equivalent. This
+// ** Expression pExpr is guaranteed to be a TK_COLUMN or equivalent. This
// ** function checks the Parse.pIdxPartExpr list to see if this column
// ** can be replaced with a constant value. If so, it generates code to
// ** put the constant value in a register (ideally, but not necessarily,
@@ -87367,7 +87507,7 @@ expr_code_doover:
iSrc = int32(_sqlite3TableColumnToStorage(tls, pTab1, int16(iCol))) - (*TParse)(unsafe.Pointer(pParse)).FiSelfTab
if libc.Int32FromUint16((*TColumn)(unsafe.Pointer(pCol1)).FcolFlags)&int32(COLFLAG_GENERATED) != 0 {
if libc.Int32FromUint16((*TColumn)(unsafe.Pointer(pCol1)).FcolFlags)&int32(COLFLAG_BUSY) != 0 {
- _sqlite3ErrorMsg(tls, pParse, __ccgo_ts+8353, libc.VaList(bp+120, (*TColumn)(unsafe.Pointer(pCol1)).FzCnName))
+ _sqlite3ErrorMsg(tls, pParse, __ccgo_ts+8378, libc.VaList(bp+120, (*TColumn)(unsafe.Pointer(pCol1)).FzCnName))
return 0
}
p3 = pCol1 + 10
@@ -87540,7 +87680,7 @@ expr_code_doover:
case int32(TK_AGG_FUNCTION):
pInfo = (*TExpr)(unsafe.Pointer(pExpr)).FpAggInfo
if pInfo == uintptr(0) || int32((*TExpr)(unsafe.Pointer(pExpr)).FiAgg) < 0 || int32((*TExpr)(unsafe.Pointer(pExpr)).FiAgg) >= (*TAggInfo)(unsafe.Pointer(pInfo)).FnFunc {
- _sqlite3ErrorMsg(tls, pParse, __ccgo_ts+8414, libc.VaList(bp+120, pExpr))
+ _sqlite3ErrorMsg(tls, pParse, __ccgo_ts+8439, libc.VaList(bp+120, pExpr))
} else {
return (*TAggInfo)(unsafe.Pointer(pInfo)).FiFirstReg + (*TAggInfo)(unsafe.Pointer(pInfo)).FnColumn + int32((*TExpr)(unsafe.Pointer(pExpr)).FiAgg)
}
@@ -87552,7 +87692,7 @@ expr_code_doover:
if (*TExpr)(unsafe.Pointer(pExpr)).Fflags&libc.Uint32FromInt32(libc.Int32FromInt32(EP_WinFunc)) != uint32(0) {
return (*TWindow)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(&(*TExpr)(unsafe.Pointer(pExpr)).Fy)))).FregResult
}
- if (*TParse)(unsafe.Pointer(pParse)).FokConstFactor != 0 && _sqlite3ExprIsConstantNotJoin(tls, pParse, pExpr) != 0 {
+ if int32(Tbft(*(*uint8)(unsafe.Pointer(pParse + 32))&0x4>>2)) != 0 && _sqlite3ExprIsConstantNotJoin(tls, pParse, pExpr) != 0 {
/* SQL functions can be expensive. So try to avoid running them
** multiple times if we know they always give the same result */
return _sqlite3ExprCodeRunJustOnce(tls, pParse, pExpr, -int32(1))
@@ -87567,7 +87707,7 @@ expr_code_doover:
zId = *(*uintptr)(unsafe.Pointer(pExpr + 8))
pDef = _sqlite3FindFunction(tls, db, zId, nFarg, enc, uint8(0))
if pDef == uintptr(0) || (*TFuncDef)(unsafe.Pointer(pDef)).FxFinalize != uintptr(0) {
- _sqlite3ErrorMsg(tls, pParse, __ccgo_ts+8441, libc.VaList(bp+120, pExpr))
+ _sqlite3ErrorMsg(tls, pParse, __ccgo_ts+8466, libc.VaList(bp+120, pExpr))
break
}
if (*TFuncDef)(unsafe.Pointer(pDef)).FfuncFlags&uint32(SQLITE_FUNC_INLINE) != uint32(0) && pFarg != uintptr(0) {
@@ -87596,7 +87736,7 @@ expr_code_doover:
if pFarg != 0 {
if constMask != 0 {
r1 = (*TParse)(unsafe.Pointer(pParse)).FnMem + int32(1)
- *(*int32)(unsafe.Pointer(pParse + 48)) += nFarg
+ *(*int32)(unsafe.Pointer(pParse + 52)) += nFarg
} else {
r1 = _sqlite3GetTempRange(tls, pParse, nFarg)
}
@@ -87672,7 +87812,7 @@ expr_code_doover:
}
n1 = _sqlite3ExprVectorSize(tls, pLeft2)
if (*TExpr)(unsafe.Pointer(pExpr)).FiTable != n1 {
- _sqlite3ErrorMsg(tls, pParse, __ccgo_ts+8024, libc.VaList(bp+120, (*TExpr)(unsafe.Pointer(pExpr)).FiTable, n1))
+ _sqlite3ErrorMsg(tls, pParse, __ccgo_ts+8049, libc.VaList(bp+120, (*TExpr)(unsafe.Pointer(pExpr)).FiTable, n1))
}
return (*TExpr)(unsafe.Pointer(pLeft2)).FiTable + int32((*TExpr)(unsafe.Pointer(pExpr)).FiColumn)
case int32(TK_IN):
@@ -87735,7 +87875,7 @@ expr_code_doover:
_sqlite3VdbeAddOp1(tls, v, int32(OP_RealAffinity), target)
}
case int32(TK_VECTOR):
- _sqlite3ErrorMsg(tls, pParse, __ccgo_ts+6807, 0)
+ _sqlite3ErrorMsg(tls, pParse, __ccgo_ts+6832, 0)
break
/* TK_IF_NULL_ROW Expr nodes are inserted ahead of expressions
** that derive from the right-hand table of a LEFT JOIN. The
@@ -87745,7 +87885,7 @@ expr_code_doover:
*/
fallthrough
case int32(TK_IF_NULL_ROW):
- okConstFactor = (*TParse)(unsafe.Pointer(pParse)).FokConstFactor
+ okConstFactor = libc.Uint8FromInt32(int32(Tbft(*(*uint8)(unsafe.Pointer(pParse + 32)) & 0x4 >> 2)))
pAggInfo1 = (*TExpr)(unsafe.Pointer(pExpr)).FpAggInfo
if pAggInfo1 != 0 {
if !((*TAggInfo)(unsafe.Pointer(pAggInfo1)).FdirectMode != 0) {
@@ -87766,9 +87906,9 @@ expr_code_doover:
** (2) Make sure the computed value really is stored in register
** "target" and not someplace else.
*/
- (*TParse)(unsafe.Pointer(pParse)).FokConstFactor = uint8(0) /* note (1) above */
+ libc.SetBitFieldPtr8Uint32(pParse+32, libc.Uint32FromInt32(0), 2, 0x4) /* note (1) above */
_sqlite3ExprCode(tls, pParse, (*TExpr)(unsafe.Pointer(pExpr)).FpLeft, target)
- (*TParse)(unsafe.Pointer(pParse)).FokConstFactor = okConstFactor
+ libc.SetBitFieldPtr8Uint32(pParse+32, uint32(okConstFactor), 2, 0x4)
_sqlite3VdbeJumpHere(tls, v, addrINR)
break
/*
@@ -87850,7 +87990,7 @@ expr_code_doover:
_sqlite3VdbeResolveLabel(tls, v, endLabel)
case int32(TK_RAISE):
if !((*TParse)(unsafe.Pointer(pParse)).FpTriggerTab != 0) && !((*TParse)(unsafe.Pointer(pParse)).Fnested != 0) {
- _sqlite3ErrorMsg(tls, pParse, __ccgo_ts+8465, 0)
+ _sqlite3ErrorMsg(tls, pParse, __ccgo_ts+8490, 0)
return 0
}
if int32((*TExpr)(unsafe.Pointer(pExpr)).FaffExpr) == int32(OE_Abort) {
@@ -87921,17 +88061,17 @@ func _sqlite3ExprCodeRunJustOnce(tls *libc.TLS, pParse uintptr, pExpr uintptr, r
if pExpr != uintptr(0) && (*TExpr)(unsafe.Pointer(pExpr)).Fflags&libc.Uint32FromInt32(libc.Int32FromInt32(EP_HasFunc)) != uint32(0) {
v = (*TParse)(unsafe.Pointer(pParse)).FpVdbe
addr = _sqlite3VdbeAddOp0(tls, v, int32(OP_Once))
- (*TParse)(unsafe.Pointer(pParse)).FokConstFactor = uint8(0)
+ libc.SetBitFieldPtr8Uint32(pParse+32, libc.Uint32FromInt32(0), 2, 0x4)
if !((*Tsqlite3)(unsafe.Pointer((*TParse)(unsafe.Pointer(pParse)).Fdb)).FmallocFailed != 0) {
if regDest < 0 {
- v3 = pParse + 48
+ v3 = pParse + 52
*(*int32)(unsafe.Pointer(v3))++
v2 = *(*int32)(unsafe.Pointer(v3))
regDest = v2
}
_sqlite3ExprCode(tls, pParse, pExpr, regDest)
}
- (*TParse)(unsafe.Pointer(pParse)).FokConstFactor = uint8(1)
+ libc.SetBitFieldPtr8Uint32(pParse+32, libc.Uint32FromInt32(1), 2, 0x4)
_sqlite3ExprDelete(tls, (*TParse)(unsafe.Pointer(pParse)).Fdb, pExpr)
_sqlite3VdbeJumpHere(tls, v, addr)
} else {
@@ -87940,7 +88080,7 @@ func _sqlite3ExprCodeRunJustOnce(tls *libc.TLS, pParse uintptr, pExpr uintptr, r
pItem1 = p + 8 + uintptr((*TExprList)(unsafe.Pointer(p)).FnExpr-int32(1))*20
libc.SetBitFieldPtr16Uint32(pItem1+8+4, libc.BoolUint32(regDest < libc.Int32FromInt32(0)), 3, 0x8)
if regDest < 0 {
- v5 = pParse + 48
+ v5 = pParse + 52
*(*int32)(unsafe.Pointer(v5))++
v4 = *(*int32)(unsafe.Pointer(v5))
regDest = v4
@@ -87971,7 +88111,7 @@ func _sqlite3ExprCodeTemp(tls *libc.TLS, pParse uintptr, pExpr uintptr, pReg uin
var r1, r2 int32
_, _ = r1, r2
pExpr = _sqlite3ExprSkipCollateAndLikely(tls, pExpr)
- if (*TParse)(unsafe.Pointer(pParse)).FokConstFactor != 0 && pExpr != uintptr(0) && libc.Int32FromUint8((*TExpr)(unsafe.Pointer(pExpr)).Fop) != int32(TK_REGISTER) && _sqlite3ExprIsConstantNotJoin(tls, pParse, pExpr) != 0 {
+ if int32(Tbft(*(*uint8)(unsafe.Pointer(pParse + 32))&0x4>>2)) != 0 && pExpr != uintptr(0) && libc.Int32FromUint8((*TExpr)(unsafe.Pointer(pExpr)).Fop) != int32(TK_REGISTER) && _sqlite3ExprIsConstantNotJoin(tls, pParse, pExpr) != 0 {
*(*int32)(unsafe.Pointer(pReg)) = 0
r2 = _sqlite3ExprCodeRunJustOnce(tls, pParse, pExpr, -int32(1))
} else {
@@ -88041,7 +88181,7 @@ func _sqlite3ExprCodeCopy(tls *libc.TLS, pParse uintptr, pExpr uintptr, target i
// ** might choose to code the expression at initialization time.
// */
func _sqlite3ExprCodeFactorable(tls *libc.TLS, pParse uintptr, pExpr uintptr, target int32) {
- if (*TParse)(unsafe.Pointer(pParse)).FokConstFactor != 0 && _sqlite3ExprIsConstantNotJoin(tls, pParse, pExpr) != 0 {
+ if int32(Tbft(*(*uint8)(unsafe.Pointer(pParse + 32))&0x4>>2)) != 0 && _sqlite3ExprIsConstantNotJoin(tls, pParse, pExpr) != 0 {
_sqlite3ExprCodeRunJustOnce(tls, pParse, pExpr, target)
} else {
_sqlite3ExprCodeCopy(tls, pParse, pExpr, target)
@@ -88085,7 +88225,7 @@ func _sqlite3ExprCodeExprList(tls *libc.TLS, pParse uintptr, pList uintptr, targ
v = (*TParse)(unsafe.Pointer(pParse)).FpVdbe
/* Never gets this far otherwise */
n = (*TExprList)(unsafe.Pointer(pList)).FnExpr
- if !((*TParse)(unsafe.Pointer(pParse)).FokConstFactor != 0) {
+ if !(int32(Tbft(*(*uint8)(unsafe.Pointer(pParse + 32))&0x4>>2)) != 0) {
flags = Tu8(int32(flags) & ^libc.Int32FromInt32(SQLITE_ECEL_FACTOR))
}
pItem = pList + 8
@@ -89272,7 +89412,7 @@ type IdxCover = TIdxCover
// ** pWalker->u.pIdxCover->pIdx.
// */
func _exprIdxCover(tls *libc.TLS, pWalker uintptr, pExpr uintptr) (r int32) {
- if libc.Int32FromUint8((*TExpr)(unsafe.Pointer(pExpr)).Fop) == int32(TK_COLUMN) && (*TExpr)(unsafe.Pointer(pExpr)).FiTable == (*TIdxCover)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(pWalker + 24)))).FiCur && int32(_sqlite3TableColumnToIndex(tls, (*TIdxCover)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(pWalker + 24)))).FpIdx, (*TExpr)(unsafe.Pointer(pExpr)).FiColumn)) < 0 {
+ if libc.Int32FromUint8((*TExpr)(unsafe.Pointer(pExpr)).Fop) == int32(TK_COLUMN) && (*TExpr)(unsafe.Pointer(pExpr)).FiTable == (*TIdxCover)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(pWalker + 24)))).FiCur && _sqlite3TableColumnToIndex(tls, (*TIdxCover)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(pWalker + 24)))).FpIdx, int32((*TExpr)(unsafe.Pointer(pExpr)).FiColumn)) < 0 {
(*TWalker)(unsafe.Pointer(pWalker)).FeCode = uint16(1)
return int32(WRC_Abort)
}
@@ -89793,7 +89933,7 @@ func _analyzeAggregate(tls *libc.TLS, pWalker uintptr, pExpr uintptr) (r int32)
nArg = v5
(*TAggInfo_func)(unsafe.Pointer(pItem1)).FpFunc = _sqlite3FindFunction(tls, (*TParse)(unsafe.Pointer(pParse)).Fdb, *(*uintptr)(unsafe.Pointer(pExpr + 8)), nArg, enc, uint8(0))
if (*TExpr)(unsafe.Pointer(pExpr)).FpLeft != 0 && (*TFuncDef)(unsafe.Pointer((*TAggInfo_func)(unsafe.Pointer(pItem1)).FpFunc)).FfuncFlags&uint32(SQLITE_FUNC_NEEDCOLL) == uint32(0) {
- v7 = pParse + 44
+ v7 = pParse + 48
v6 = *(*int32)(unsafe.Pointer(v7))
*(*int32)(unsafe.Pointer(v7))++
(*TAggInfo_func)(unsafe.Pointer(pItem1)).FiOBTab = v6
@@ -89809,7 +89949,7 @@ func _analyzeAggregate(tls *libc.TLS, pWalker uintptr, pExpr uintptr) (r int32)
(*TAggInfo_func)(unsafe.Pointer(pItem1)).FiOBTab = -int32(1)
}
if (*TExpr)(unsafe.Pointer(pExpr)).Fflags&libc.Uint32FromInt32(libc.Int32FromInt32(EP_Distinct)) != uint32(0) && !((*TAggInfo_func)(unsafe.Pointer(pItem1)).FbOBUnique != 0) {
- v9 = pParse + 44
+ v9 = pParse + 48
v8 = *(*int32)(unsafe.Pointer(v9))
*(*int32)(unsafe.Pointer(v9))++
(*TAggInfo_func)(unsafe.Pointer(pItem1)).FiDistinct = v8
@@ -89894,7 +90034,7 @@ func _sqlite3GetTempReg(tls *libc.TLS, pParse uintptr) (r int32) {
var v3 Tu8
_, _, _, _ = v1, v2, v3, v4
if libc.Int32FromUint8((*TParse)(unsafe.Pointer(pParse)).FnTempReg) == 0 {
- v2 = pParse + 48
+ v2 = pParse + 52
*(*int32)(unsafe.Pointer(v2))++
v1 = *(*int32)(unsafe.Pointer(v2))
return v1
@@ -89902,7 +90042,7 @@ func _sqlite3GetTempReg(tls *libc.TLS, pParse uintptr) (r int32) {
v4 = pParse + 19
*(*Tu8)(unsafe.Pointer(v4))--
v3 = *(*Tu8)(unsafe.Pointer(v4))
- return *(*int32)(unsafe.Pointer(pParse + 168 + uintptr(v3)*4))
+ return *(*int32)(unsafe.Pointer(pParse + 136 + uintptr(v3)*4))
}
// C documentation
@@ -89920,7 +90060,7 @@ func _sqlite3ReleaseTempReg(tls *libc.TLS, pParse uintptr, iReg int32) {
v2 = pParse + 19
v1 = *(*Tu8)(unsafe.Pointer(v2))
*(*Tu8)(unsafe.Pointer(v2))++
- *(*int32)(unsafe.Pointer(pParse + 168 + uintptr(v1)*4)) = iReg
+ *(*int32)(unsafe.Pointer(pParse + 136 + uintptr(v1)*4)) = iReg
}
}
}
@@ -89939,11 +90079,11 @@ func _sqlite3GetTempRange(tls *libc.TLS, pParse uintptr, nReg int32) (r int32) {
i = (*TParse)(unsafe.Pointer(pParse)).FiRangeReg
n = (*TParse)(unsafe.Pointer(pParse)).FnRangeReg
if nReg <= n {
- *(*int32)(unsafe.Pointer(pParse + 36)) += nReg
- *(*int32)(unsafe.Pointer(pParse + 32)) -= nReg
+ *(*int32)(unsafe.Pointer(pParse + 40)) += nReg
+ *(*int32)(unsafe.Pointer(pParse + 36)) -= nReg
} else {
i = (*TParse)(unsafe.Pointer(pParse)).FnMem + int32(1)
- *(*int32)(unsafe.Pointer(pParse + 48)) += nReg
+ *(*int32)(unsafe.Pointer(pParse + 52)) += nReg
}
return i
}
@@ -90061,8 +90201,8 @@ func _sqlite3FirstAvailableRegister(tls *libc.TLS, pParse uintptr, iMin int32) (
func _isAlterableTable(tls *libc.TLS, pParse uintptr, pTab uintptr) (r int32) {
bp := tls.Alloc(16)
defer tls.Free(16)
- if 0 == Xsqlite3_strnicmp(tls, (*TTable)(unsafe.Pointer(pTab)).FzName, __ccgo_ts+6655, int32(7)) || (*TTable)(unsafe.Pointer(pTab)).FtabFlags&uint32(TF_Eponymous) != uint32(0) || (*TTable)(unsafe.Pointer(pTab)).FtabFlags&uint32(TF_Shadow) != uint32(0) && _sqlite3ReadOnlyShadowTables(tls, (*TParse)(unsafe.Pointer(pParse)).Fdb) != 0 {
- _sqlite3ErrorMsg(tls, pParse, __ccgo_ts+8515, libc.VaList(bp+8, (*TTable)(unsafe.Pointer(pTab)).FzName))
+ if 0 == Xsqlite3_strnicmp(tls, (*TTable)(unsafe.Pointer(pTab)).FzName, __ccgo_ts+6680, int32(7)) || (*TTable)(unsafe.Pointer(pTab)).FtabFlags&uint32(TF_Eponymous) != uint32(0) || (*TTable)(unsafe.Pointer(pTab)).FtabFlags&uint32(TF_Shadow) != uint32(0) && _sqlite3ReadOnlyShadowTables(tls, (*TParse)(unsafe.Pointer(pParse)).Fdb) != 0 {
+ _sqlite3ErrorMsg(tls, pParse, __ccgo_ts+8540, libc.VaList(bp+8, (*TTable)(unsafe.Pointer(pTab)).FzName))
return int32(1)
}
return 0
@@ -90080,10 +90220,10 @@ func _isAlterableTable(tls *libc.TLS, pParse uintptr, pTab uintptr) (r int32) {
func _renameTestSchema(tls *libc.TLS, pParse uintptr, zDb uintptr, bTemp int32, zWhen uintptr, bNoDQS int32) {
bp := tls.Alloc(48)
defer tls.Free(48)
- (*TParse)(unsafe.Pointer(pParse)).FcolNamesSet = uint8(1)
- _sqlite3NestedParse(tls, pParse, __ccgo_ts+8543, libc.VaList(bp+8, zDb, zDb, bTemp, zWhen, bNoDQS))
+ libc.SetBitFieldPtr8Uint32(pParse+32, libc.Uint32FromInt32(1), 0, 0x1)
+ _sqlite3NestedParse(tls, pParse, __ccgo_ts+8568, libc.VaList(bp+8, zDb, zDb, bTemp, zWhen, bNoDQS))
if bTemp == 0 {
- _sqlite3NestedParse(tls, pParse, __ccgo_ts+8718, libc.VaList(bp+8, zDb, zWhen, bNoDQS))
+ _sqlite3NestedParse(tls, pParse, __ccgo_ts+8743, libc.VaList(bp+8, zDb, zWhen, bNoDQS))
}
}
@@ -90099,9 +90239,9 @@ func _renameTestSchema(tls *libc.TLS, pParse uintptr, zDb uintptr, bTemp int32,
func _renameFixQuotes(tls *libc.TLS, pParse uintptr, zDb uintptr, bTemp int32) {
bp := tls.Alloc(32)
defer tls.Free(32)
- _sqlite3NestedParse(tls, pParse, __ccgo_ts+8892, libc.VaList(bp+8, zDb, zDb))
+ _sqlite3NestedParse(tls, pParse, __ccgo_ts+8917, libc.VaList(bp+8, zDb, zDb))
if bTemp == 0 {
- _sqlite3NestedParse(tls, pParse, __ccgo_ts+9039, 0)
+ _sqlite3NestedParse(tls, pParse, __ccgo_ts+9064, 0)
}
}
@@ -90157,7 +90297,7 @@ func _sqlite3AlterRenameTable(tls *libc.TLS, pParse uintptr, pSrc uintptr, pName
** in database iDb. If so, this is an error.
*/
if _sqlite3FindTable(tls, db, zName, zDb) != 0 || _sqlite3FindIndex(tls, db, zName, zDb) != 0 || _sqlite3IsShadowTableOf(tls, db, pTab, zName) != 0 {
- _sqlite3ErrorMsg(tls, pParse, __ccgo_ts+9190, libc.VaList(bp+8, zName))
+ _sqlite3ErrorMsg(tls, pParse, __ccgo_ts+9215, libc.VaList(bp+8, zName))
goto exit_rename_table
}
/* Make sure it is not a system table being altered, or a reserved name
@@ -90166,11 +90306,11 @@ func _sqlite3AlterRenameTable(tls *libc.TLS, pParse uintptr, pSrc uintptr, pName
if SQLITE_OK != _isAlterableTable(tls, pParse, pTab) {
goto exit_rename_table
}
- if SQLITE_OK != _sqlite3CheckObjectName(tls, pParse, zName, __ccgo_ts+9249, zName) {
+ if SQLITE_OK != _sqlite3CheckObjectName(tls, pParse, zName, __ccgo_ts+9274, zName) {
goto exit_rename_table
}
if libc.Int32FromUint8((*TTable)(unsafe.Pointer(pTab)).FeTabType) == int32(TABTYP_VIEW) {
- _sqlite3ErrorMsg(tls, pParse, __ccgo_ts+9255, libc.VaList(bp+8, (*TTable)(unsafe.Pointer(pTab)).FzName))
+ _sqlite3ErrorMsg(tls, pParse, __ccgo_ts+9280, libc.VaList(bp+8, (*TTable)(unsafe.Pointer(pTab)).FzName))
goto exit_rename_table
}
/* Invoke the authorization callback. */
@@ -90200,21 +90340,21 @@ func _sqlite3AlterRenameTable(tls *libc.TLS, pParse uintptr, pSrc uintptr, pName
nTabName = _sqlite3Utf8CharLen(tls, zTabName, -int32(1))
/* Rewrite all CREATE TABLE, INDEX, TRIGGER or VIEW statements in
** the schema to use the new table name. */
- _sqlite3NestedParse(tls, pParse, __ccgo_ts+9282, libc.VaList(bp+8, zDb, zDb, zTabName, zName, libc.BoolInt32(iDb == int32(1)), zTabName))
+ _sqlite3NestedParse(tls, pParse, __ccgo_ts+9307, libc.VaList(bp+8, zDb, zDb, zTabName, zName, libc.BoolInt32(iDb == int32(1)), zTabName))
/* Update the tbl_name and name columns of the sqlite_schema table
** as required. */
- _sqlite3NestedParse(tls, pParse, __ccgo_ts+9466, libc.VaList(bp+8, zDb, zName, zName, zName, nTabName, zTabName))
+ _sqlite3NestedParse(tls, pParse, __ccgo_ts+9491, libc.VaList(bp+8, zDb, zName, zName, zName, nTabName, zTabName))
/* If the sqlite_sequence table exists in this database, then update
** it with the new table name.
*/
- if _sqlite3FindTable(tls, db, __ccgo_ts+9771, zDb) != 0 {
- _sqlite3NestedParse(tls, pParse, __ccgo_ts+9787, libc.VaList(bp+8, zDb, zName, (*TTable)(unsafe.Pointer(pTab)).FzName))
+ if _sqlite3FindTable(tls, db, __ccgo_ts+9796, zDb) != 0 {
+ _sqlite3NestedParse(tls, pParse, __ccgo_ts+9812, libc.VaList(bp+8, zDb, zName, (*TTable)(unsafe.Pointer(pTab)).FzName))
}
/* If the table being renamed is not itself part of the temp database,
** edit view and trigger definitions within the temp database
** as required. */
if iDb != int32(1) {
- _sqlite3NestedParse(tls, pParse, __ccgo_ts+9845, libc.VaList(bp+8, zDb, zTabName, zName, zTabName, zDb, zName))
+ _sqlite3NestedParse(tls, pParse, __ccgo_ts+9870, libc.VaList(bp+8, zDb, zTabName, zName, zTabName, zDb, zName))
}
/* If this is a virtual table, invoke the xRename() function if
** one is defined. The xRename() callback will modify the names
@@ -90222,7 +90362,7 @@ func _sqlite3AlterRenameTable(tls *libc.TLS, pParse uintptr, pSrc uintptr, pName
** SQLite tables) that are identified by the name of the virtual table.
*/
if pVTab != 0 {
- v2 = pParse + 48
+ v2 = pParse + 52
*(*int32)(unsafe.Pointer(v2))++
v1 = *(*int32)(unsafe.Pointer(v2))
i = v1
@@ -90230,7 +90370,7 @@ func _sqlite3AlterRenameTable(tls *libc.TLS, pParse uintptr, pSrc uintptr, pName
_sqlite3VdbeAddOp4(tls, v, int32(OP_VRename), i, 0, 0, pVTab, -int32(11))
}
_renameReloadSchema(tls, pParse, iDb, uint16(INITFLAG_AlterRename))
- _renameTestSchema(tls, pParse, zDb, libc.BoolInt32(iDb == int32(1)), __ccgo_ts+10110, 0)
+ _renameTestSchema(tls, pParse, zDb, libc.BoolInt32(iDb == int32(1)), __ccgo_ts+10135, 0)
goto exit_rename_table
exit_rename_table:
;
@@ -90247,7 +90387,7 @@ exit_rename_table:
func _sqlite3ErrorIfNotEmpty(tls *libc.TLS, pParse uintptr, zDb uintptr, zTab uintptr, zErr uintptr) {
bp := tls.Alloc(32)
defer tls.Free(32)
- _sqlite3NestedParse(tls, pParse, __ccgo_ts+10123, libc.VaList(bp+8, zErr, zDb, zTab))
+ _sqlite3NestedParse(tls, pParse, __ccgo_ts+10148, libc.VaList(bp+8, zErr, zDb, zTab))
}
// C documentation
@@ -90287,11 +90427,11 @@ func _sqlite3AlterFinishAddColumn(tls *libc.TLS, pParse uintptr, pColDef uintptr
** column must not be NULL.
*/
if libc.Int32FromUint16((*TColumn)(unsafe.Pointer(pCol)).FcolFlags)&int32(COLFLAG_PRIMKEY) != 0 {
- _sqlite3ErrorMsg(tls, pParse, __ccgo_ts+10161, 0)
+ _sqlite3ErrorMsg(tls, pParse, __ccgo_ts+10186, 0)
return
}
if (*TTable)(unsafe.Pointer(pNew)).FpIndex != 0 {
- _sqlite3ErrorMsg(tls, pParse, __ccgo_ts+10193, 0)
+ _sqlite3ErrorMsg(tls, pParse, __ccgo_ts+10218, 0)
return
}
if libc.Int32FromUint16((*TColumn)(unsafe.Pointer(pCol)).FcolFlags)&int32(COLFLAG_GENERATED) == 0 {
@@ -90307,10 +90447,10 @@ func _sqlite3AlterFinishAddColumn(tls *libc.TLS, pParse uintptr, pColDef uintptr
FpFKey uintptr
FpDfltList uintptr
})(unsafe.Pointer(pNew + 44))).FpFKey != 0 && pDflt != 0 {
- _sqlite3ErrorIfNotEmpty(tls, pParse, zDb, zTab, __ccgo_ts+10220)
+ _sqlite3ErrorIfNotEmpty(tls, pParse, zDb, zTab, __ccgo_ts+10245)
}
if int32(uint32(*(*uint8)(unsafe.Pointer(pCol + 4))&0xf>>0)) != 0 && !(pDflt != 0) {
- _sqlite3ErrorIfNotEmpty(tls, pParse, zDb, zTab, __ccgo_ts+10279)
+ _sqlite3ErrorIfNotEmpty(tls, pParse, zDb, zTab, __ccgo_ts+10304)
}
/* Ensure the default expression is something that sqlite3ValueFromExpr()
** can handle (i.e. not CURRENT_TIME etc.)
@@ -90322,13 +90462,13 @@ func _sqlite3AlterFinishAddColumn(tls *libc.TLS, pParse uintptr, pColDef uintptr
return
}
if !(*(*uintptr)(unsafe.Pointer(bp)) != 0) {
- _sqlite3ErrorIfNotEmpty(tls, pParse, zDb, zTab, __ccgo_ts+10332)
+ _sqlite3ErrorIfNotEmpty(tls, pParse, zDb, zTab, __ccgo_ts+10357)
}
_sqlite3ValueFree(tls, *(*uintptr)(unsafe.Pointer(bp)))
}
} else {
if libc.Int32FromUint16((*TColumn)(unsafe.Pointer(pCol)).FcolFlags)&int32(COLFLAG_STORED) != 0 {
- _sqlite3ErrorIfNotEmpty(tls, pParse, zDb, zTab, __ccgo_ts+10378)
+ _sqlite3ErrorIfNotEmpty(tls, pParse, zDb, zTab, __ccgo_ts+10403)
}
}
/* Modify the CREATE TABLE statement. */
@@ -90342,7 +90482,7 @@ func _sqlite3AlterFinishAddColumn(tls *libc.TLS, pParse uintptr, pColDef uintptr
}
/* substr() operations on characters, but addColOffset is in bytes. So we
** have to use printf() to translate between these units: */
- _sqlite3NestedParse(tls, pParse, __ccgo_ts+10405, libc.VaList(bp+16, zDb, (*(*struct {
+ _sqlite3NestedParse(tls, pParse, __ccgo_ts+10430, libc.VaList(bp+16, zDb, (*(*struct {
FaddColOffset int32
FpFKey uintptr
FpDfltList uintptr
@@ -90370,7 +90510,7 @@ func _sqlite3AlterFinishAddColumn(tls *libc.TLS, pParse uintptr, pColDef uintptr
_renameReloadSchema(tls, pParse, iDb, uint16(INITFLAG_AlterAdd))
/* Verify that constraints are still satisfied */
if (*TTable)(unsafe.Pointer(pNew)).FpCheck != uintptr(0) || int32(uint32(*(*uint8)(unsafe.Pointer(pCol + 4))&0xf>>0)) != 0 && libc.Int32FromUint16((*TColumn)(unsafe.Pointer(pCol)).FcolFlags)&int32(COLFLAG_GENERATED) != 0 || (*TTable)(unsafe.Pointer(pTab)).FtabFlags&uint32(TF_Strict) != uint32(0) {
- _sqlite3NestedParse(tls, pParse, __ccgo_ts+10551, libc.VaList(bp+16, zTab, zDb))
+ _sqlite3NestedParse(tls, pParse, __ccgo_ts+10576, libc.VaList(bp+16, zTab, zDb))
}
}
}
@@ -90408,12 +90548,12 @@ func _sqlite3AlterBeginAddColumn(tls *libc.TLS, pParse uintptr, pSrc uintptr) {
goto exit_begin_add_column
}
if libc.Int32FromUint8((*TTable)(unsafe.Pointer(pTab)).FeTabType) == int32(TABTYP_VTAB) {
- _sqlite3ErrorMsg(tls, pParse, __ccgo_ts+10904, 0)
+ _sqlite3ErrorMsg(tls, pParse, __ccgo_ts+10929, 0)
goto exit_begin_add_column
}
/* Make sure this is not an attempt to ALTER a view. */
if libc.Int32FromUint8((*TTable)(unsafe.Pointer(pTab)).FeTabType) == int32(TABTYP_VIEW) {
- _sqlite3ErrorMsg(tls, pParse, __ccgo_ts+10938, 0)
+ _sqlite3ErrorMsg(tls, pParse, __ccgo_ts+10963, 0)
goto exit_begin_add_column
}
if SQLITE_OK != _isAlterableTable(tls, pParse, pTab) {
@@ -90428,7 +90568,7 @@ func _sqlite3AlterBeginAddColumn(tls *libc.TLS, pParse uintptr, pSrc uintptr) {
** table because user table are not allowed to have the "sqlite_"
** prefix on their name.
*/
- pNew = _sqlite3DbMallocZero(tls, db, uint64(64))
+ pNew = _sqlite3DbMallocZero(tls, db, uint64(80))
if !(pNew != 0) {
goto exit_begin_add_column
}
@@ -90437,7 +90577,7 @@ func _sqlite3AlterBeginAddColumn(tls *libc.TLS, pParse uintptr, pSrc uintptr) {
(*TTable)(unsafe.Pointer(pNew)).FnCol = (*TTable)(unsafe.Pointer(pTab)).FnCol
nAlloc = (int32((*TTable)(unsafe.Pointer(pNew)).FnCol)-int32(1))/int32(8)*int32(8) + int32(8)
(*TTable)(unsafe.Pointer(pNew)).FaCol = _sqlite3DbMallocZero(tls, db, uint64(uint32(12)*libc.Uint32FromInt32(nAlloc)))
- (*TTable)(unsafe.Pointer(pNew)).FzName = _sqlite3MPrintf(tls, db, __ccgo_ts+10968, libc.VaList(bp+8, (*TTable)(unsafe.Pointer(pTab)).FzName))
+ (*TTable)(unsafe.Pointer(pNew)).FzName = _sqlite3MPrintf(tls, db, __ccgo_ts+10993, libc.VaList(bp+8, (*TTable)(unsafe.Pointer(pTab)).FzName))
if !((*TTable)(unsafe.Pointer(pNew)).FaCol != 0) || !((*TTable)(unsafe.Pointer(pNew)).FzName != 0) {
goto exit_begin_add_column
}
@@ -90498,18 +90638,18 @@ func _isRealTable(tls *libc.TLS, pParse uintptr, pTab uintptr, bDrop int32) (r i
_, _ = zType, v1
zType = uintptr(0)
if libc.Int32FromUint8((*TTable)(unsafe.Pointer(pTab)).FeTabType) == int32(TABTYP_VIEW) {
- zType = __ccgo_ts + 10987
+ zType = __ccgo_ts + 11012
}
if libc.Int32FromUint8((*TTable)(unsafe.Pointer(pTab)).FeTabType) == int32(TABTYP_VTAB) {
- zType = __ccgo_ts + 10992
+ zType = __ccgo_ts + 11017
}
if zType != 0 {
if bDrop != 0 {
- v1 = __ccgo_ts + 11006
+ v1 = __ccgo_ts + 11031
} else {
- v1 = __ccgo_ts + 11023
+ v1 = __ccgo_ts + 11048
}
- _sqlite3ErrorMsg(tls, pParse, __ccgo_ts+11041, libc.VaList(bp+8, v1, zType, (*TTable)(unsafe.Pointer(pTab)).FzName))
+ _sqlite3ErrorMsg(tls, pParse, __ccgo_ts+11066, libc.VaList(bp+8, v1, zType, (*TTable)(unsafe.Pointer(pTab)).FzName))
return int32(1)
}
return 0
@@ -90556,21 +90696,9 @@ func _sqlite3AlterRenameColumn(tls *libc.TLS, pParse uintptr, pSrc uintptr, pOld
if !(zOld != 0) {
goto exit_rename_column
}
- iCol = 0
- for {
- if !(iCol < int32((*TTable)(unsafe.Pointer(pTab)).FnCol)) {
- break
- }
- if 0 == _sqlite3StrICmp(tls, (*(*TColumn)(unsafe.Pointer((*TTable)(unsafe.Pointer(pTab)).FaCol + uintptr(iCol)*12))).FzCnName, zOld) {
- break
- }
- goto _1
- _1:
- ;
- iCol++
- }
- if iCol == int32((*TTable)(unsafe.Pointer(pTab)).FnCol) {
- _sqlite3ErrorMsg(tls, pParse, __ccgo_ts+11059, libc.VaList(bp+8, pOld))
+ iCol = _sqlite3ColumnIndex(tls, pTab, zOld)
+ if iCol < 0 {
+ _sqlite3ErrorMsg(tls, pParse, __ccgo_ts+11084, libc.VaList(bp+8, pOld))
goto exit_rename_column
}
/* Ensure the schema contains no double-quoted strings */
@@ -90586,11 +90714,11 @@ func _sqlite3AlterRenameColumn(tls *libc.TLS, pParse uintptr, pSrc uintptr, pOld
goto exit_rename_column
}
bQuote = libc.Int32FromUint8(_sqlite3CtypeMap[libc.Uint8FromInt8(*(*int8)(unsafe.Pointer((*TToken)(unsafe.Pointer(pNew)).Fz)))]) & int32(0x80)
- _sqlite3NestedParse(tls, pParse, __ccgo_ts+11080, libc.VaList(bp+8, zDb, zDb, (*TTable)(unsafe.Pointer(pTab)).FzName, iCol, zNew, bQuote, libc.BoolInt32(iSchema == int32(1)), (*TTable)(unsafe.Pointer(pTab)).FzName))
- _sqlite3NestedParse(tls, pParse, __ccgo_ts+11262, libc.VaList(bp+8, zDb, (*TTable)(unsafe.Pointer(pTab)).FzName, iCol, zNew, bQuote))
+ _sqlite3NestedParse(tls, pParse, __ccgo_ts+11105, libc.VaList(bp+8, zDb, zDb, (*TTable)(unsafe.Pointer(pTab)).FzName, iCol, zNew, bQuote, libc.BoolInt32(iSchema == int32(1)), (*TTable)(unsafe.Pointer(pTab)).FzName))
+ _sqlite3NestedParse(tls, pParse, __ccgo_ts+11287, libc.VaList(bp+8, zDb, (*TTable)(unsafe.Pointer(pTab)).FzName, iCol, zNew, bQuote))
/* Drop and reload the database schema. */
_renameReloadSchema(tls, pParse, iSchema, uint16(INITFLAG_AlterRename))
- _renameTestSchema(tls, pParse, zDb, libc.BoolInt32(iSchema == int32(1)), __ccgo_ts+10110, int32(1))
+ _renameTestSchema(tls, pParse, zDb, libc.BoolInt32(iSchema == int32(1)), __ccgo_ts+10135, int32(1))
goto exit_rename_column
exit_rename_column:
;
@@ -90944,7 +91072,7 @@ func _renameTokenFind(tls *libc.TLS, pParse uintptr, pCtx uintptr, pPtr uintptr)
if pPtr == uintptr(0) {
return uintptr(0)
}
- pp = pParse + 284
+ pp = pParse + 280
for {
if !(*(*uintptr)(unsafe.Pointer(pp)) != 0) {
break
@@ -91066,11 +91194,11 @@ func _renameColumnParseError(tls *libc.TLS, pCtx uintptr, zWhen uintptr, pType u
zT = Xsqlite3_value_text(tls, pType)
zN = Xsqlite3_value_text(tls, pObject)
if *(*int8)(unsafe.Pointer(zWhen)) != 0 {
- v1 = __ccgo_ts + 11393
+ v1 = __ccgo_ts + 11418
} else {
v1 = __ccgo_ts + 1667
}
- zErr = _sqlite3MPrintf(tls, (*TParse)(unsafe.Pointer(pParse)).Fdb, __ccgo_ts+11395, libc.VaList(bp+8, zT, zN, v1, zWhen, (*TParse)(unsafe.Pointer(pParse)).FzErrMsg))
+ zErr = _sqlite3MPrintf(tls, (*TParse)(unsafe.Pointer(pParse)).Fdb, __ccgo_ts+11420, libc.VaList(bp+8, zT, zN, v1, zWhen, (*TParse)(unsafe.Pointer(pParse)).FzErrMsg))
Xsqlite3_result_error(tls, pCtx, zErr, -int32(1))
_sqlite3DbFree(tls, (*TParse)(unsafe.Pointer(pParse)).Fdb, zErr)
}
@@ -91141,30 +91269,34 @@ func _renameColumnIdlistNames(tls *libc.TLS, pParse uintptr, pCtx uintptr, pIdLi
// ** is initialized by this function before it is used.
// */
func _renameParseSql(tls *libc.TLS, p uintptr, zDb uintptr, db uintptr, zSql uintptr, bTemp int32) (r int32) {
- var rc, v1 int32
- _, _ = rc, v1
+ var flags Tu64
+ var iDb, rc int32
+ _, _, _ = flags, iDb, rc
_sqlite3ParseObjectInit(tls, p, db)
if zSql == uintptr(0) {
return int32(SQLITE_NOMEM)
}
- if Xsqlite3_strnicmp(tls, zSql, __ccgo_ts+11418, int32(7)) != 0 {
- return _sqlite3CorruptError(tls, int32(118071))
+ if Xsqlite3_strnicmp(tls, zSql, __ccgo_ts+11443, int32(7)) != 0 {
+ return _sqlite3CorruptError(tls, int32(118867))
}
if bTemp != 0 {
- v1 = int32(1)
+ (*Tsqlite3)(unsafe.Pointer(db)).Finit1.FiDb = uint8(1)
} else {
- v1 = _sqlite3FindDbName(tls, db, zDb)
+ iDb = _sqlite3FindDbName(tls, db, zDb)
+ (*Tsqlite3)(unsafe.Pointer(db)).Finit1.FiDb = libc.Uint8FromInt32(iDb)
}
- (*Tsqlite3)(unsafe.Pointer(db)).Finit1.FiDb = libc.Uint8FromInt32(v1)
(*TParse)(unsafe.Pointer(p)).FeParseMode = uint8(PARSE_MODE_RENAME)
(*TParse)(unsafe.Pointer(p)).Fdb = db
(*TParse)(unsafe.Pointer(p)).FnQueryLoop = int16(1)
+ flags = (*Tsqlite3)(unsafe.Pointer(db)).Fflags
+ *(*Tu64)(unsafe.Pointer(db + 28)) |= libc.Uint64FromInt32(libc.Int32FromInt32(0x00040)) << libc.Int32FromInt32(32)
rc = _sqlite3RunParser(tls, p, zSql)
+ (*Tsqlite3)(unsafe.Pointer(db)).Fflags = flags
if (*Tsqlite3)(unsafe.Pointer(db)).FmallocFailed != 0 {
rc = int32(SQLITE_NOMEM)
}
if rc == SQLITE_OK && ((*TParse)(unsafe.Pointer(p)).FpNewTable == uintptr(0) && (*TParse)(unsafe.Pointer(p)).FpNewIndex == uintptr(0) && (*TParse)(unsafe.Pointer(p)).FpNewTrigger == uintptr(0)) {
- rc = _sqlite3CorruptError(tls, int32(118082))
+ rc = _sqlite3CorruptError(tls, int32(118888))
}
(*Tsqlite3)(unsafe.Pointer(db)).Finit1.FiDb = uint8(0)
return rc
@@ -91185,9 +91317,8 @@ func _renameEditSql(tls *libc.TLS, pCtx uintptr, pRename uintptr, zSql uintptr,
bp := tls.Alloc(32)
defer tls.Free(32)
var db, pBest, zBuf1, zBuf2, zOut, zQuot, zReplace, v1 uintptr
- var iOff, nOut, rc int32
- var nNew, nQuot, nSql Ti64
- var nReplace Tu32
+ var iOff, rc int32
+ var nNew, nOut, nQuot, nReplace, nSql Ti64
_, _, _, _, _, _, _, _, _, _, _, _, _, _, _ = db, iOff, nNew, nOut, nQuot, nReplace, nSql, pBest, rc, zBuf1, zBuf2, zOut, zQuot, zReplace, v1
nNew = int64(_sqlite3Strlen30(tls, zNew))
nSql = int64(_sqlite3Strlen30(tls, zSql))
@@ -91203,15 +91334,15 @@ func _renameEditSql(tls *libc.TLS, pCtx uintptr, pRename uintptr, zSql uintptr,
** ALTER TABLE statement was quoted (bQuote==1), then set zNew to
** point to zQuot so that all substitutions are made using the
** quoted version of the new column name. */
- zQuot = _sqlite3MPrintf(tls, db, __ccgo_ts+11426, libc.VaList(bp+8, zNew))
+ zQuot = _sqlite3MPrintf(tls, db, __ccgo_ts+11451, libc.VaList(bp+8, zNew))
if zQuot == uintptr(0) {
return int32(SQLITE_NOMEM)
} else {
nQuot = int64(_sqlite3Strlen30(tls, zQuot) - int32(1))
}
- zOut = _sqlite3DbMallocZero(tls, db, libc.Uint64FromInt64(nSql+int64((*TRenameCtx)(unsafe.Pointer(pRename)).FnList)*nQuot+int64(1)))
+ zOut = _sqlite3DbMallocZero(tls, db, libc.Uint64FromInt64(nSql)+libc.Uint64FromInt32((*TRenameCtx)(unsafe.Pointer(pRename)).FnList)*libc.Uint64FromInt64(nQuot)+uint64(1))
} else {
- zOut = _sqlite3DbMallocZero(tls, db, libc.Uint64FromInt64((nSql*int64(2)+int64(1))*int64(3)))
+ zOut = _sqlite3DbMallocZero(tls, db, (uint64(2)*libc.Uint64FromInt64(nSql)+uint64(1))*uint64(3))
if zOut != 0 {
zBuf1 = zOut + uintptr(nSql*int64(2)+int64(1))
zBuf2 = zOut + uintptr(nSql*int64(4)+int64(2))
@@ -91222,16 +91353,16 @@ func _renameEditSql(tls *libc.TLS, pCtx uintptr, pRename uintptr, zSql uintptr,
** with the new column name, or with single-quoted versions of themselves.
** All that remains is to construct and return the edited SQL string. */
if zOut != 0 {
- nOut = int32(nSql)
+ nOut = nSql
libc.Xmemcpy(tls, zOut, zSql, libc.Uint32FromInt64(nSql))
for (*TRenameCtx)(unsafe.Pointer(pRename)).FpList != 0 {
pBest = _renameColumnTokenNext(tls, pRename)
if zNew != 0 {
- if bQuote == 0 && _sqlite3IsIdChar(tls, libc.Uint8FromInt8(*(*int8)(unsafe.Pointer((*TRenameToken)(unsafe.Pointer(pBest)).Ft.Fz)))) != 0 {
- nReplace = libc.Uint32FromInt64(nNew)
+ if bQuote == 0 && _sqlite3IsIdChar(tls, *(*Tu8)(unsafe.Pointer((*TRenameToken)(unsafe.Pointer(pBest)).Ft.Fz))) != 0 {
+ nReplace = nNew
zReplace = zNew
} else {
- nReplace = libc.Uint32FromInt64(nQuot)
+ nReplace = nQuot
zReplace = zQuot
if int32(*(*int8)(unsafe.Pointer((*TRenameToken)(unsafe.Pointer(pBest)).Ft.Fz + uintptr((*TRenameToken)(unsafe.Pointer(pBest)).Ft.Fn)))) == int32('"') {
nReplace++
@@ -91248,21 +91379,21 @@ func _renameEditSql(tls *libc.TLS, pCtx uintptr, pRename uintptr, zSql uintptr,
*(*int8)(unsafe.Pointer(zBuf1 + uintptr((*TRenameToken)(unsafe.Pointer(pBest)).Ft.Fn))) = 0
_sqlite3Dequote(tls, zBuf1)
if int32(*(*int8)(unsafe.Pointer((*TRenameToken)(unsafe.Pointer(pBest)).Ft.Fz + uintptr((*TRenameToken)(unsafe.Pointer(pBest)).Ft.Fn)))) == int32('\'') {
- v1 = __ccgo_ts + 11393
+ v1 = __ccgo_ts + 11418
} else {
v1 = __ccgo_ts + 1667
}
- Xsqlite3_snprintf(tls, int32(nSql*int64(2)), zBuf2, __ccgo_ts+11432, libc.VaList(bp+8, zBuf1, v1))
+ Xsqlite3_snprintf(tls, int32(nSql*libc.Int64FromInt32(2)), zBuf2, __ccgo_ts+11457, libc.VaList(bp+8, zBuf1, v1))
zReplace = zBuf2
- nReplace = libc.Uint32FromInt32(_sqlite3Strlen30(tls, zReplace))
+ nReplace = int64(_sqlite3Strlen30(tls, zReplace))
}
iOff = int32((*TRenameToken)(unsafe.Pointer(pBest)).Ft.Fz) - int32(zSql)
- if (*TRenameToken)(unsafe.Pointer(pBest)).Ft.Fn != nReplace {
- libc.Xmemmove(tls, zOut+uintptr(libc.Uint32FromInt32(iOff)+nReplace), zOut+uintptr(libc.Uint32FromInt32(iOff)+(*TRenameToken)(unsafe.Pointer(pBest)).Ft.Fn), libc.Uint32FromInt32(nOut)-(libc.Uint32FromInt32(iOff)+(*TRenameToken)(unsafe.Pointer(pBest)).Ft.Fn))
- nOut = int32(uint32(nOut) + (nReplace - (*TRenameToken)(unsafe.Pointer(pBest)).Ft.Fn))
+ if libc.Int64FromUint32((*TRenameToken)(unsafe.Pointer(pBest)).Ft.Fn) != nReplace {
+ libc.Xmemmove(tls, zOut+uintptr(int64(iOff)+nReplace), zOut+uintptr(libc.Uint32FromInt32(iOff)+(*TRenameToken)(unsafe.Pointer(pBest)).Ft.Fn), libc.Uint32FromInt64(nOut-libc.Int64FromUint32(libc.Uint32FromInt32(iOff)+(*TRenameToken)(unsafe.Pointer(pBest)).Ft.Fn)))
+ nOut += nReplace - libc.Int64FromUint32((*TRenameToken)(unsafe.Pointer(pBest)).Ft.Fn)
*(*int8)(unsafe.Pointer(zOut + uintptr(nOut))) = int8('\000')
}
- libc.Xmemcpy(tls, zOut+uintptr(iOff), zReplace, nReplace)
+ libc.Xmemcpy(tls, zOut+uintptr(iOff), zReplace, libc.Uint32FromInt64(nReplace))
_sqlite3DbFree(tls, db, pBest)
}
Xsqlite3_result_text(tls, pCtx, zOut, -int32(1), uintptr(-libc.Int32FromInt32(1)))
@@ -91288,7 +91419,7 @@ func _renameSetENames(tls *libc.TLS, pEList uintptr, val int32) {
if !(i < (*TExprList)(unsafe.Pointer(pEList)).FnExpr) {
break
}
- libc.SetBitFieldPtr16Uint32(pEList+8+uintptr(i)*20+8+4, libc.Uint32FromInt32(val), 0, 0x3)
+ libc.SetBitFieldPtr16Uint32(pEList+8+uintptr(i)*20+8+4, libc.Uint32FromInt32(val&libc.Int32FromInt32(0x3)), 0, 0x3)
goto _1
_1:
;
@@ -91543,7 +91674,7 @@ func _renameColumnFunc(tls *libc.TLS, context uintptr, NotUsed int32, argv uintp
var xAuth Tsqlite3_xauth
var _ /* sCtx at bp+0 */ TRenameCtx
var _ /* sParse at bp+20 */ TParse
- var _ /* sWalker at bp+308 */ TWalker
+ var _ /* sWalker at bp+304 */ TWalker
_, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _ = bFKOnly, bQuote, bTemp, db, i, iCol, pExpr, pFKey, pIdx, pSelect, pStep, pTab, pTarget, pUpsertSet, rc, xAuth, zDb, zNew, zOld, zSql, zTable, v1, v2
db = Xsqlite3_context_db_handle(tls, context)
zSql = Xsqlite3_value_text(tls, *(*uintptr)(unsafe.Pointer(argv)))
@@ -91584,11 +91715,11 @@ func _renameColumnFunc(tls *libc.TLS, context uintptr, NotUsed int32, argv uintp
(*Tsqlite3)(unsafe.Pointer(db)).FxAuth = uintptr(0)
rc = _renameParseSql(tls, bp+20, zDb, db, zSql, bTemp)
/* Find tokens that need to be replaced. */
- libc.Xmemset(tls, bp+308, 0, uint32(28))
- (*(*TWalker)(unsafe.Pointer(bp + 308))).FpParse = bp + 20
- (*(*TWalker)(unsafe.Pointer(bp + 308))).FxExprCallback = __ccgo_fp(_renameColumnExprCb)
- (*(*TWalker)(unsafe.Pointer(bp + 308))).FxSelectCallback = __ccgo_fp(_renameColumnSelectCb)
- *(*uintptr)(unsafe.Pointer(bp + 308 + 24)) = bp
+ libc.Xmemset(tls, bp+304, 0, uint32(28))
+ (*(*TWalker)(unsafe.Pointer(bp + 304))).FpParse = bp + 20
+ (*(*TWalker)(unsafe.Pointer(bp + 304))).FxExprCallback = __ccgo_fp(_renameColumnExprCb)
+ (*(*TWalker)(unsafe.Pointer(bp + 304))).FxSelectCallback = __ccgo_fp(_renameColumnSelectCb)
+ *(*uintptr)(unsafe.Pointer(bp + 304 + 24)) = bp
(*(*TRenameCtx)(unsafe.Pointer(bp))).FpTab = pTab
if rc != SQLITE_OK {
goto renameColumnFunc_done
@@ -91598,7 +91729,7 @@ func _renameColumnFunc(tls *libc.TLS, context uintptr, NotUsed int32, argv uintp
pSelect = (*(*struct {
FpSelect uintptr
})(unsafe.Pointer(&(*TTable)(unsafe.Pointer((*(*TParse)(unsafe.Pointer(bp + 20))).FpNewTable)).Fu))).FpSelect
- *(*Tu32)(unsafe.Pointer(pSelect + 4)) &= libc.Uint32FromInt32(^libc.Int32FromInt32(SF_View))
+ *(*Tu32)(unsafe.Pointer(pSelect + 4)) &= ^libc.Uint32FromInt32(SF_View)
(*(*TParse)(unsafe.Pointer(bp + 20))).Frc = SQLITE_OK
_sqlite3SelectPrep(tls, bp+20, pSelect, uintptr(0))
if (*Tsqlite3)(unsafe.Pointer(db)).FmallocFailed != 0 {
@@ -91608,7 +91739,7 @@ func _renameColumnFunc(tls *libc.TLS, context uintptr, NotUsed int32, argv uintp
}
rc = v2
if rc == SQLITE_OK {
- _sqlite3WalkSelect(tls, bp+308, pSelect)
+ _sqlite3WalkSelect(tls, bp+304, pSelect)
}
if rc != SQLITE_OK {
goto renameColumnFunc_done
@@ -91625,13 +91756,13 @@ func _renameColumnFunc(tls *libc.TLS, context uintptr, NotUsed int32, argv uintp
if (*(*TRenameCtx)(unsafe.Pointer(bp))).FiCol < 0 {
_renameTokenFind(tls, bp+20, bp, (*(*TParse)(unsafe.Pointer(bp + 20))).FpNewTable+32)
}
- _sqlite3WalkExprList(tls, bp+308, (*TTable)(unsafe.Pointer((*(*TParse)(unsafe.Pointer(bp + 20))).FpNewTable)).FpCheck)
+ _sqlite3WalkExprList(tls, bp+304, (*TTable)(unsafe.Pointer((*(*TParse)(unsafe.Pointer(bp + 20))).FpNewTable)).FpCheck)
pIdx = (*TTable)(unsafe.Pointer((*(*TParse)(unsafe.Pointer(bp + 20))).FpNewTable)).FpIndex
for {
if !(pIdx != 0) {
break
}
- _sqlite3WalkExprList(tls, bp+308, (*TIndex)(unsafe.Pointer(pIdx)).FaColExpr)
+ _sqlite3WalkExprList(tls, bp+304, (*TIndex)(unsafe.Pointer(pIdx)).FaColExpr)
goto _3
_3:
;
@@ -91642,7 +91773,7 @@ func _renameColumnFunc(tls *libc.TLS, context uintptr, NotUsed int32, argv uintp
if !(pIdx != 0) {
break
}
- _sqlite3WalkExprList(tls, bp+308, (*TIndex)(unsafe.Pointer(pIdx)).FaColExpr)
+ _sqlite3WalkExprList(tls, bp+304, (*TIndex)(unsafe.Pointer(pIdx)).FaColExpr)
goto _4
_4:
;
@@ -91654,7 +91785,7 @@ func _renameColumnFunc(tls *libc.TLS, context uintptr, NotUsed int32, argv uintp
break
}
pExpr = _sqlite3ColumnExpr(tls, (*(*TParse)(unsafe.Pointer(bp + 20))).FpNewTable, (*TTable)(unsafe.Pointer((*(*TParse)(unsafe.Pointer(bp + 20))).FpNewTable)).FaCol+uintptr(i)*12)
- _sqlite3WalkExpr(tls, bp+308, pExpr)
+ _sqlite3WalkExpr(tls, bp+304, pExpr)
goto _5
_5:
;
@@ -91695,8 +91826,8 @@ func _renameColumnFunc(tls *libc.TLS, context uintptr, NotUsed int32, argv uintp
}
} else {
if (*(*TParse)(unsafe.Pointer(bp + 20))).FpNewIndex != 0 {
- _sqlite3WalkExprList(tls, bp+308, (*TIndex)(unsafe.Pointer((*(*TParse)(unsafe.Pointer(bp + 20))).FpNewIndex)).FaColExpr)
- _sqlite3WalkExpr(tls, bp+308, (*TIndex)(unsafe.Pointer((*(*TParse)(unsafe.Pointer(bp + 20))).FpNewIndex)).FpPartIdxWhere)
+ _sqlite3WalkExprList(tls, bp+304, (*TIndex)(unsafe.Pointer((*(*TParse)(unsafe.Pointer(bp + 20))).FpNewIndex)).FaColExpr)
+ _sqlite3WalkExpr(tls, bp+304, (*TIndex)(unsafe.Pointer((*(*TParse)(unsafe.Pointer(bp + 20))).FpNewIndex)).FpPartIdxWhere)
} else {
rc = _renameResolveTrigger(tls, bp+20)
if rc != SQLITE_OK {
@@ -91728,7 +91859,7 @@ func _renameColumnFunc(tls *libc.TLS, context uintptr, NotUsed int32, argv uintp
_renameColumnIdlistNames(tls, bp+20, bp, (*TTrigger)(unsafe.Pointer((*(*TParse)(unsafe.Pointer(bp + 20))).FpNewTrigger)).FpColumns, zOld)
}
/* Find tokens to edit in various expressions and selects */
- _renameWalkTrigger(tls, bp+308, (*(*TParse)(unsafe.Pointer(bp + 20))).FpNewTrigger)
+ _renameWalkTrigger(tls, bp+304, (*(*TParse)(unsafe.Pointer(bp + 20))).FpNewTrigger)
}
}
rc = _renameEditSql(tls, context, bp, zSql, zNew, bQuote)
@@ -91824,15 +91955,15 @@ func _renameTableSelectCb(tls *libc.TLS, pWalker uintptr, pSelect uintptr) (r in
// ** -> 'CREATE TABLE t1(a REFERENCES t3)'
// */
func _renameTableFunc(tls *libc.TLS, context uintptr, NotUsed int32, argv uintptr) {
- bp := tls.Alloc(384)
- defer tls.Free(384)
+ bp := tls.Alloc(368)
+ defer tls.Free(368)
var bQuote, bTemp, i, isLegacy, rc int32
var db, pFKey, pItem, pSelect, pStep, pTab, pTrigger, zDb, zInput, zNew, zOld uintptr
var xAuth Tsqlite3_xauth
- var _ /* sCtx at bp+288 */ TRenameCtx
- var _ /* sNC at bp+336 */ TNameContext
+ var _ /* sCtx at bp+284 */ TRenameCtx
+ var _ /* sNC at bp+332 */ TNameContext
var _ /* sParse at bp+0 */ TParse
- var _ /* sWalker at bp+308 */ TWalker
+ var _ /* sWalker at bp+304 */ TWalker
_, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _ = bQuote, bTemp, db, i, isLegacy, pFKey, pItem, pSelect, pStep, pTab, pTrigger, rc, xAuth, zDb, zInput, zNew, zOld
db = Xsqlite3_context_db_handle(tls, context)
zDb = Xsqlite3_value_text(tls, *(*uintptr)(unsafe.Pointer(argv)))
@@ -91846,13 +91977,13 @@ func _renameTableFunc(tls *libc.TLS, context uintptr, NotUsed int32, argv uintpt
xAuth = (*Tsqlite3)(unsafe.Pointer(db)).FxAuth
(*Tsqlite3)(unsafe.Pointer(db)).FxAuth = uintptr(0)
_sqlite3BtreeEnterAll(tls, db)
- libc.Xmemset(tls, bp+288, 0, uint32(20))
- (*(*TRenameCtx)(unsafe.Pointer(bp + 288))).FpTab = _sqlite3FindTable(tls, db, zOld, zDb)
- libc.Xmemset(tls, bp+308, 0, uint32(28))
- (*(*TWalker)(unsafe.Pointer(bp + 308))).FpParse = bp
- (*(*TWalker)(unsafe.Pointer(bp + 308))).FxExprCallback = __ccgo_fp(_renameTableExprCb)
- (*(*TWalker)(unsafe.Pointer(bp + 308))).FxSelectCallback = __ccgo_fp(_renameTableSelectCb)
- *(*uintptr)(unsafe.Pointer(bp + 308 + 24)) = bp + 288
+ libc.Xmemset(tls, bp+284, 0, uint32(20))
+ (*(*TRenameCtx)(unsafe.Pointer(bp + 284))).FpTab = _sqlite3FindTable(tls, db, zOld, zDb)
+ libc.Xmemset(tls, bp+304, 0, uint32(28))
+ (*(*TWalker)(unsafe.Pointer(bp + 304))).FpParse = bp
+ (*(*TWalker)(unsafe.Pointer(bp + 304))).FxExprCallback = __ccgo_fp(_renameTableExprCb)
+ (*(*TWalker)(unsafe.Pointer(bp + 304))).FxSelectCallback = __ccgo_fp(_renameTableSelectCb)
+ *(*uintptr)(unsafe.Pointer(bp + 304 + 24)) = bp + 284
rc = _renameParseSql(tls, bp, zDb, db, zInput, bTemp)
if rc == SQLITE_OK {
isLegacy = libc.Int32FromUint64((*Tsqlite3)(unsafe.Pointer(db)).Fflags & libc.Uint64FromInt32(SQLITE_LegacyAlter))
@@ -91863,16 +91994,16 @@ func _renameTableFunc(tls *libc.TLS, context uintptr, NotUsed int32, argv uintpt
pSelect = (*(*struct {
FpSelect uintptr
})(unsafe.Pointer(&(*TTable)(unsafe.Pointer(pTab)).Fu))).FpSelect
- libc.Xmemset(tls, bp+336, 0, uint32(36))
- (*(*TNameContext)(unsafe.Pointer(bp + 336))).FpParse = bp
- *(*Tu32)(unsafe.Pointer(pSelect + 4)) &= libc.Uint32FromInt32(^libc.Int32FromInt32(SF_View))
+ libc.Xmemset(tls, bp+332, 0, uint32(36))
+ (*(*TNameContext)(unsafe.Pointer(bp + 332))).FpParse = bp
+ *(*Tu32)(unsafe.Pointer(pSelect + 4)) &= ^libc.Uint32FromInt32(SF_View)
_sqlite3SelectPrep(tls, bp, (*(*struct {
FpSelect uintptr
- })(unsafe.Pointer(&(*TTable)(unsafe.Pointer(pTab)).Fu))).FpSelect, bp+336)
+ })(unsafe.Pointer(&(*TTable)(unsafe.Pointer(pTab)).Fu))).FpSelect, bp+332)
if (*(*TParse)(unsafe.Pointer(bp))).FnErr != 0 {
rc = (*(*TParse)(unsafe.Pointer(bp))).Frc
} else {
- _sqlite3WalkSelect(tls, bp+308, (*(*struct {
+ _sqlite3WalkSelect(tls, bp+304, (*(*struct {
FpSelect uintptr
})(unsafe.Pointer(&(*TTable)(unsafe.Pointer(pTab)).Fu))).FpSelect)
}
@@ -91890,7 +92021,7 @@ func _renameTableFunc(tls *libc.TLS, context uintptr, NotUsed int32, argv uintpt
break
}
if Xsqlite3_stricmp(tls, (*TFKey)(unsafe.Pointer(pFKey)).FzTo, zOld) == 0 {
- _renameTokenFind(tls, bp, bp+288, (*TFKey)(unsafe.Pointer(pFKey)).FzTo)
+ _renameTokenFind(tls, bp, bp+284, (*TFKey)(unsafe.Pointer(pFKey)).FzTo)
}
goto _1
_1:
@@ -91902,35 +92033,35 @@ func _renameTableFunc(tls *libc.TLS, context uintptr, NotUsed int32, argv uintpt
** expressions. Also update the name that appears right after the
** "CREATE [VIRTUAL] TABLE" bit. */
if Xsqlite3_stricmp(tls, zOld, (*TTable)(unsafe.Pointer(pTab)).FzName) == 0 {
- (*(*TRenameCtx)(unsafe.Pointer(bp + 288))).FpTab = pTab
+ (*(*TRenameCtx)(unsafe.Pointer(bp + 284))).FpTab = pTab
if isLegacy == 0 {
- _sqlite3WalkExprList(tls, bp+308, (*TTable)(unsafe.Pointer(pTab)).FpCheck)
+ _sqlite3WalkExprList(tls, bp+304, (*TTable)(unsafe.Pointer(pTab)).FpCheck)
}
- _renameTokenFind(tls, bp, bp+288, (*TTable)(unsafe.Pointer(pTab)).FzName)
+ _renameTokenFind(tls, bp, bp+284, (*TTable)(unsafe.Pointer(pTab)).FzName)
}
}
} else {
if (*(*TParse)(unsafe.Pointer(bp))).FpNewIndex != 0 {
- _renameTokenFind(tls, bp, bp+288, (*TIndex)(unsafe.Pointer((*(*TParse)(unsafe.Pointer(bp))).FpNewIndex)).FzName)
+ _renameTokenFind(tls, bp, bp+284, (*TIndex)(unsafe.Pointer((*(*TParse)(unsafe.Pointer(bp))).FpNewIndex)).FzName)
if isLegacy == 0 {
- _sqlite3WalkExpr(tls, bp+308, (*TIndex)(unsafe.Pointer((*(*TParse)(unsafe.Pointer(bp))).FpNewIndex)).FpPartIdxWhere)
+ _sqlite3WalkExpr(tls, bp+304, (*TIndex)(unsafe.Pointer((*(*TParse)(unsafe.Pointer(bp))).FpNewIndex)).FpPartIdxWhere)
}
} else {
pTrigger = (*(*TParse)(unsafe.Pointer(bp))).FpNewTrigger
- if 0 == Xsqlite3_stricmp(tls, (*TTrigger)(unsafe.Pointer((*(*TParse)(unsafe.Pointer(bp))).FpNewTrigger)).Ftable, zOld) && (*TTable)(unsafe.Pointer((*(*TRenameCtx)(unsafe.Pointer(bp + 288))).FpTab)).FpSchema == (*TTrigger)(unsafe.Pointer(pTrigger)).FpTabSchema {
- _renameTokenFind(tls, bp, bp+288, (*TTrigger)(unsafe.Pointer((*(*TParse)(unsafe.Pointer(bp))).FpNewTrigger)).Ftable)
+ if 0 == Xsqlite3_stricmp(tls, (*TTrigger)(unsafe.Pointer((*(*TParse)(unsafe.Pointer(bp))).FpNewTrigger)).Ftable, zOld) && (*TTable)(unsafe.Pointer((*(*TRenameCtx)(unsafe.Pointer(bp + 284))).FpTab)).FpSchema == (*TTrigger)(unsafe.Pointer(pTrigger)).FpTabSchema {
+ _renameTokenFind(tls, bp, bp+284, (*TTrigger)(unsafe.Pointer((*(*TParse)(unsafe.Pointer(bp))).FpNewTrigger)).Ftable)
}
if isLegacy == 0 {
rc = _renameResolveTrigger(tls, bp)
if rc == SQLITE_OK {
- _renameWalkTrigger(tls, bp+308, pTrigger)
+ _renameWalkTrigger(tls, bp+304, pTrigger)
pStep = (*TTrigger)(unsafe.Pointer(pTrigger)).Fstep_list
for {
if !(pStep != 0) {
break
}
if (*TTriggerStep)(unsafe.Pointer(pStep)).FzTarget != 0 && 0 == Xsqlite3_stricmp(tls, (*TTriggerStep)(unsafe.Pointer(pStep)).FzTarget, zOld) {
- _renameTokenFind(tls, bp, bp+288, (*TTriggerStep)(unsafe.Pointer(pStep)).FzTarget)
+ _renameTokenFind(tls, bp, bp+284, (*TTriggerStep)(unsafe.Pointer(pStep)).FzTarget)
}
if (*TTriggerStep)(unsafe.Pointer(pStep)).FpFrom != 0 {
i = 0
@@ -91940,7 +92071,7 @@ func _renameTableFunc(tls *libc.TLS, context uintptr, NotUsed int32, argv uintpt
}
pItem = (*TTriggerStep)(unsafe.Pointer(pStep)).FpFrom + 8 + uintptr(i)*48
if 0 == Xsqlite3_stricmp(tls, (*TSrcItem)(unsafe.Pointer(pItem)).FzName, zOld) {
- _renameTokenFind(tls, bp, bp+288, (*TSrcItem)(unsafe.Pointer(pItem)).FzName)
+ _renameTokenFind(tls, bp, bp+284, (*TSrcItem)(unsafe.Pointer(pItem)).FzName)
}
goto _3
_3:
@@ -91959,7 +92090,7 @@ func _renameTableFunc(tls *libc.TLS, context uintptr, NotUsed int32, argv uintpt
}
}
if rc == SQLITE_OK {
- rc = _renameEditSql(tls, context, bp+288, zInput, zNew, bQuote)
+ rc = _renameEditSql(tls, context, bp+284, zInput, zNew, bQuote)
}
if rc != SQLITE_OK {
if rc == int32(SQLITE_ERROR) && _sqlite3WritableSchema(tls, db) != 0 {
@@ -91973,7 +92104,7 @@ func _renameTableFunc(tls *libc.TLS, context uintptr, NotUsed int32, argv uintpt
}
}
_renameParseCleanup(tls, bp)
- _renameTokenFree(tls, db, (*(*TRenameCtx)(unsafe.Pointer(bp + 288))).FpList)
+ _renameTokenFree(tls, db, (*(*TRenameCtx)(unsafe.Pointer(bp + 284))).FpList)
_sqlite3BtreeLeaveAll(tls, db)
(*Tsqlite3)(unsafe.Pointer(db)).FxAuth = xAuth
}
@@ -92022,9 +92153,9 @@ func _renameQuotefixFunc(tls *libc.TLS, context uintptr, NotUsed int32, argv uin
var db, pSelect, zDb, zInput uintptr
var i, rc, v1 int32
var xAuth Tsqlite3_xauth
- var _ /* sCtx at bp+288 */ TRenameCtx
+ var _ /* sCtx at bp+284 */ TRenameCtx
var _ /* sParse at bp+0 */ TParse
- var _ /* sWalker at bp+308 */ TWalker
+ var _ /* sWalker at bp+304 */ TWalker
_, _, _, _, _, _, _, _ = db, i, pSelect, rc, xAuth, zDb, zInput, v1
db = Xsqlite3_context_db_handle(tls, context)
zDb = Xsqlite3_value_text(tls, *(*uintptr)(unsafe.Pointer(argv)))
@@ -92037,18 +92168,18 @@ func _renameQuotefixFunc(tls *libc.TLS, context uintptr, NotUsed int32, argv uin
rc = _renameParseSql(tls, bp, zDb, db, zInput, 0)
if rc == SQLITE_OK {
/* Walker to find tokens that need to be replaced. */
- libc.Xmemset(tls, bp+288, 0, uint32(20))
- libc.Xmemset(tls, bp+308, 0, uint32(28))
- (*(*TWalker)(unsafe.Pointer(bp + 308))).FpParse = bp
- (*(*TWalker)(unsafe.Pointer(bp + 308))).FxExprCallback = __ccgo_fp(_renameQuotefixExprCb)
- (*(*TWalker)(unsafe.Pointer(bp + 308))).FxSelectCallback = __ccgo_fp(_renameColumnSelectCb)
- *(*uintptr)(unsafe.Pointer(bp + 308 + 24)) = bp + 288
+ libc.Xmemset(tls, bp+284, 0, uint32(20))
+ libc.Xmemset(tls, bp+304, 0, uint32(28))
+ (*(*TWalker)(unsafe.Pointer(bp + 304))).FpParse = bp
+ (*(*TWalker)(unsafe.Pointer(bp + 304))).FxExprCallback = __ccgo_fp(_renameQuotefixExprCb)
+ (*(*TWalker)(unsafe.Pointer(bp + 304))).FxSelectCallback = __ccgo_fp(_renameColumnSelectCb)
+ *(*uintptr)(unsafe.Pointer(bp + 304 + 24)) = bp + 284
if (*(*TParse)(unsafe.Pointer(bp))).FpNewTable != 0 {
if libc.Int32FromUint8((*TTable)(unsafe.Pointer((*(*TParse)(unsafe.Pointer(bp))).FpNewTable)).FeTabType) == int32(TABTYP_VIEW) {
pSelect = (*(*struct {
FpSelect uintptr
})(unsafe.Pointer(&(*TTable)(unsafe.Pointer((*(*TParse)(unsafe.Pointer(bp))).FpNewTable)).Fu))).FpSelect
- *(*Tu32)(unsafe.Pointer(pSelect + 4)) &= libc.Uint32FromInt32(^libc.Int32FromInt32(SF_View))
+ *(*Tu32)(unsafe.Pointer(pSelect + 4)) &= ^libc.Uint32FromInt32(SF_View)
(*(*TParse)(unsafe.Pointer(bp))).Frc = SQLITE_OK
_sqlite3SelectPrep(tls, bp, pSelect, uintptr(0))
if (*Tsqlite3)(unsafe.Pointer(db)).FmallocFailed != 0 {
@@ -92058,16 +92189,16 @@ func _renameQuotefixFunc(tls *libc.TLS, context uintptr, NotUsed int32, argv uin
}
rc = v1
if rc == SQLITE_OK {
- _sqlite3WalkSelect(tls, bp+308, pSelect)
+ _sqlite3WalkSelect(tls, bp+304, pSelect)
}
} else {
- _sqlite3WalkExprList(tls, bp+308, (*TTable)(unsafe.Pointer((*(*TParse)(unsafe.Pointer(bp))).FpNewTable)).FpCheck)
+ _sqlite3WalkExprList(tls, bp+304, (*TTable)(unsafe.Pointer((*(*TParse)(unsafe.Pointer(bp))).FpNewTable)).FpCheck)
i = 0
for {
if !(i < int32((*TTable)(unsafe.Pointer((*(*TParse)(unsafe.Pointer(bp))).FpNewTable)).FnCol)) {
break
}
- _sqlite3WalkExpr(tls, bp+308, _sqlite3ColumnExpr(tls, (*(*TParse)(unsafe.Pointer(bp))).FpNewTable, (*TTable)(unsafe.Pointer((*(*TParse)(unsafe.Pointer(bp))).FpNewTable)).FaCol+uintptr(i)*12))
+ _sqlite3WalkExpr(tls, bp+304, _sqlite3ColumnExpr(tls, (*(*TParse)(unsafe.Pointer(bp))).FpNewTable, (*TTable)(unsafe.Pointer((*(*TParse)(unsafe.Pointer(bp))).FpNewTable)).FaCol+uintptr(i)*12))
goto _2
_2:
;
@@ -92076,19 +92207,19 @@ func _renameQuotefixFunc(tls *libc.TLS, context uintptr, NotUsed int32, argv uin
}
} else {
if (*(*TParse)(unsafe.Pointer(bp))).FpNewIndex != 0 {
- _sqlite3WalkExprList(tls, bp+308, (*TIndex)(unsafe.Pointer((*(*TParse)(unsafe.Pointer(bp))).FpNewIndex)).FaColExpr)
- _sqlite3WalkExpr(tls, bp+308, (*TIndex)(unsafe.Pointer((*(*TParse)(unsafe.Pointer(bp))).FpNewIndex)).FpPartIdxWhere)
+ _sqlite3WalkExprList(tls, bp+304, (*TIndex)(unsafe.Pointer((*(*TParse)(unsafe.Pointer(bp))).FpNewIndex)).FaColExpr)
+ _sqlite3WalkExpr(tls, bp+304, (*TIndex)(unsafe.Pointer((*(*TParse)(unsafe.Pointer(bp))).FpNewIndex)).FpPartIdxWhere)
} else {
rc = _renameResolveTrigger(tls, bp)
if rc == SQLITE_OK {
- _renameWalkTrigger(tls, bp+308, (*(*TParse)(unsafe.Pointer(bp))).FpNewTrigger)
+ _renameWalkTrigger(tls, bp+304, (*(*TParse)(unsafe.Pointer(bp))).FpNewTrigger)
}
}
}
if rc == SQLITE_OK {
- rc = _renameEditSql(tls, context, bp+288, zInput, uintptr(0), 0)
+ rc = _renameEditSql(tls, context, bp+284, zInput, uintptr(0), 0)
}
- _renameTokenFree(tls, db, (*(*TRenameCtx)(unsafe.Pointer(bp + 288))).FpList)
+ _renameTokenFree(tls, db, (*(*TRenameCtx)(unsafe.Pointer(bp + 284))).FpList)
}
if rc != SQLITE_OK {
if _sqlite3WritableSchema(tls, db) != 0 && rc == int32(SQLITE_ERROR) {
@@ -92130,12 +92261,13 @@ func _renameQuotefixFunc(tls *libc.TLS, context uintptr, NotUsed int32, argv uin
// ** C. Otherwise return NULL.
// */
func _renameTableTest(tls *libc.TLS, context uintptr, NotUsed int32, argv uintptr) {
- bp := tls.Alloc(336)
- defer tls.Free(336)
- var bNoDQS, bTemp, flags, i1, i2, isLegacy, rc int32
+ bp := tls.Alloc(320)
+ defer tls.Free(320)
+ var bNoDQS, bTemp, i1, i2, isLegacy, rc int32
var db, zDb, zInput, zWhen uintptr
+ var flags Tu64
var xAuth Tsqlite3_xauth
- var _ /* sNC at bp+288 */ TNameContext
+ var _ /* sNC at bp+284 */ TNameContext
var _ /* sParse at bp+0 */ TParse
_, _, _, _, _, _, _, _, _, _, _, _ = bNoDQS, bTemp, db, flags, i1, i2, isLegacy, rc, xAuth, zDb, zInput, zWhen
db = Xsqlite3_context_db_handle(tls, context)
@@ -92149,19 +92281,19 @@ func _renameTableTest(tls *libc.TLS, context uintptr, NotUsed int32, argv uintpt
(*Tsqlite3)(unsafe.Pointer(db)).FxAuth = uintptr(0)
_ = NotUsed
if zDb != 0 && zInput != 0 {
- flags = libc.Int32FromUint64((*Tsqlite3)(unsafe.Pointer(db)).Fflags)
+ flags = (*Tsqlite3)(unsafe.Pointer(db)).Fflags
if bNoDQS != 0 {
*(*Tu64)(unsafe.Pointer(db + 28)) &= libc.Uint64FromInt32(^(libc.Int32FromInt32(SQLITE_DqsDML) | libc.Int32FromInt32(SQLITE_DqsDDL)))
}
rc = _renameParseSql(tls, bp, zDb, db, zInput, bTemp)
- *(*Tu64)(unsafe.Pointer(db + 28)) |= libc.Uint64FromInt32(flags & (libc.Int32FromInt32(SQLITE_DqsDML) | libc.Int32FromInt32(SQLITE_DqsDDL)))
+ (*Tsqlite3)(unsafe.Pointer(db)).Fflags = flags
if rc == SQLITE_OK {
if isLegacy == 0 && (*(*TParse)(unsafe.Pointer(bp))).FpNewTable != 0 && libc.Int32FromUint8((*TTable)(unsafe.Pointer((*(*TParse)(unsafe.Pointer(bp))).FpNewTable)).FeTabType) == int32(TABTYP_VIEW) {
- libc.Xmemset(tls, bp+288, 0, uint32(36))
- (*(*TNameContext)(unsafe.Pointer(bp + 288))).FpParse = bp
+ libc.Xmemset(tls, bp+284, 0, uint32(36))
+ (*(*TNameContext)(unsafe.Pointer(bp + 284))).FpParse = bp
_sqlite3SelectPrep(tls, bp, (*(*struct {
FpSelect uintptr
- })(unsafe.Pointer(&(*TTable)(unsafe.Pointer((*(*TParse)(unsafe.Pointer(bp))).FpNewTable)).Fu))).FpSelect, bp+288)
+ })(unsafe.Pointer(&(*TTable)(unsafe.Pointer((*(*TParse)(unsafe.Pointer(bp))).FpNewTable)).Fu))).FpSelect, bp+284)
if (*(*TParse)(unsafe.Pointer(bp))).FnErr != 0 {
rc = (*(*TParse)(unsafe.Pointer(bp))).Frc
}
@@ -92228,7 +92360,7 @@ func _dropColumnFunc(tls *libc.TLS, context uintptr, NotUsed int32, argv uintptr
pTab = (*(*TParse)(unsafe.Pointer(bp))).FpNewTable
if pTab == uintptr(0) || int32((*TTable)(unsafe.Pointer(pTab)).FnCol) == int32(1) || iCol >= int32((*TTable)(unsafe.Pointer(pTab)).FnCol) {
/* This can happen if the sqlite_schema table is corrupt */
- rc = _sqlite3CorruptError(tls, int32(119046))
+ rc = _sqlite3CorruptError(tls, int32(119856))
goto drop_column_done
}
pCol = _renameTokenFind(tls, bp, uintptr(0), (*(*TColumn)(unsafe.Pointer((*TTable)(unsafe.Pointer(pTab)).FaCol + uintptr(iCol)*12))).FzCnName)
@@ -92245,7 +92377,7 @@ func _dropColumnFunc(tls *libc.TLS, context uintptr, NotUsed int32, argv uintptr
(*TRenameToken)(unsafe.Pointer(pCol)).Ft.Fz--
}
}
- zNew = _sqlite3MPrintf(tls, db, __ccgo_ts+11437, libc.VaList(bp+296, int32((*TRenameToken)(unsafe.Pointer(pCol)).Ft.Fz)-int32(zSql), zSql, zEnd))
+ zNew = _sqlite3MPrintf(tls, db, __ccgo_ts+11462, libc.VaList(bp+296, int32((*TRenameToken)(unsafe.Pointer(pCol)).Ft.Fz)-int32(zSql), zSql, zEnd))
Xsqlite3_result_text(tls, context, zNew, -int32(1), uintptr(-libc.Int32FromInt32(1)))
Xsqlite3_free(tls, zNew)
goto drop_column_done
@@ -92300,23 +92432,23 @@ func _sqlite3AlterDropColumn(tls *libc.TLS, pParse uintptr, pSrc uintptr, pName
}
iCol = _sqlite3ColumnIndex(tls, pTab, zCol)
if iCol < 0 {
- _sqlite3ErrorMsg(tls, pParse, __ccgo_ts+11059, libc.VaList(bp+8, pName))
+ _sqlite3ErrorMsg(tls, pParse, __ccgo_ts+11084, libc.VaList(bp+8, pName))
goto exit_drop_column
}
/* Do not allow the user to drop a PRIMARY KEY column or a column
** constrained by a UNIQUE constraint. */
if libc.Int32FromUint16((*(*TColumn)(unsafe.Pointer((*TTable)(unsafe.Pointer(pTab)).FaCol + uintptr(iCol)*12))).FcolFlags)&(libc.Int32FromInt32(COLFLAG_PRIMKEY)|libc.Int32FromInt32(COLFLAG_UNIQUE)) != 0 {
if libc.Int32FromUint16((*(*TColumn)(unsafe.Pointer((*TTable)(unsafe.Pointer(pTab)).FaCol + uintptr(iCol)*12))).FcolFlags)&int32(COLFLAG_PRIMKEY) != 0 {
- v1 = __ccgo_ts + 11444
+ v1 = __ccgo_ts + 11469
} else {
- v1 = __ccgo_ts + 5674
+ v1 = __ccgo_ts + 5700
}
- _sqlite3ErrorMsg(tls, pParse, __ccgo_ts+11456, libc.VaList(bp+8, v1, zCol))
+ _sqlite3ErrorMsg(tls, pParse, __ccgo_ts+11481, libc.VaList(bp+8, v1, zCol))
goto exit_drop_column
}
/* Do not allow the number of columns to go to zero */
if int32((*TTable)(unsafe.Pointer(pTab)).FnCol) <= int32(1) {
- _sqlite3ErrorMsg(tls, pParse, __ccgo_ts+11484, libc.VaList(bp+8, zCol))
+ _sqlite3ErrorMsg(tls, pParse, __ccgo_ts+11509, libc.VaList(bp+8, zCol))
goto exit_drop_column
}
/* Edit the sqlite_schema table */
@@ -92328,31 +92460,31 @@ func _sqlite3AlterDropColumn(tls *libc.TLS, pParse uintptr, pSrc uintptr, pName
}
_renameTestSchema(tls, pParse, zDb, libc.BoolInt32(iDb == int32(1)), __ccgo_ts+1667, 0)
_renameFixQuotes(tls, pParse, zDb, libc.BoolInt32(iDb == int32(1)))
- _sqlite3NestedParse(tls, pParse, __ccgo_ts+11532, libc.VaList(bp+8, zDb, iDb, iCol, (*TTable)(unsafe.Pointer(pTab)).FzName))
+ _sqlite3NestedParse(tls, pParse, __ccgo_ts+11557, libc.VaList(bp+8, zDb, iDb, iCol, (*TTable)(unsafe.Pointer(pTab)).FzName))
/* Drop and reload the database schema. */
_renameReloadSchema(tls, pParse, iDb, uint16(INITFLAG_AlterDrop))
- _renameTestSchema(tls, pParse, zDb, libc.BoolInt32(iDb == int32(1)), __ccgo_ts+11653, int32(1))
+ _renameTestSchema(tls, pParse, zDb, libc.BoolInt32(iDb == int32(1)), __ccgo_ts+11678, int32(1))
/* Edit rows of table on disk */
if (*TParse)(unsafe.Pointer(pParse)).FnErr == 0 && libc.Int32FromUint16((*(*TColumn)(unsafe.Pointer((*TTable)(unsafe.Pointer(pTab)).FaCol + uintptr(iCol)*12))).FcolFlags)&int32(COLFLAG_VIRTUAL) == 0 {
pPk = uintptr(0)
nField = 0
v = _sqlite3GetVdbe(tls, pParse)
- v3 = pParse + 44
+ v3 = pParse + 48
v2 = *(*int32)(unsafe.Pointer(v3))
*(*int32)(unsafe.Pointer(v3))++
iCur = v2
_sqlite3OpenTable(tls, pParse, iCur, iDb, pTab, int32(OP_OpenWrite))
addr = _sqlite3VdbeAddOp1(tls, v, int32(OP_Rewind), iCur)
- v5 = pParse + 48
+ v5 = pParse + 52
*(*int32)(unsafe.Pointer(v5))++
v4 = *(*int32)(unsafe.Pointer(v5))
reg = v4
if (*TTable)(unsafe.Pointer(pTab)).FtabFlags&uint32(TF_WithoutRowid) == uint32(0) {
_sqlite3VdbeAddOp2(tls, v, int32(OP_Rowid), iCur, reg)
- *(*int32)(unsafe.Pointer(pParse + 48)) += int32((*TTable)(unsafe.Pointer(pTab)).FnCol)
+ *(*int32)(unsafe.Pointer(pParse + 52)) += int32((*TTable)(unsafe.Pointer(pTab)).FnCol)
} else {
pPk = _sqlite3PrimaryKeyIndex(tls, pTab)
- *(*int32)(unsafe.Pointer(pParse + 48)) += libc.Int32FromUint16((*TIndex)(unsafe.Pointer(pPk)).FnColumn)
+ *(*int32)(unsafe.Pointer(pParse + 52)) += libc.Int32FromUint16((*TIndex)(unsafe.Pointer(pPk)).FnColumn)
i = 0
for {
if !(i < libc.Int32FromUint16((*TIndex)(unsafe.Pointer(pPk)).FnKeyCol)) {
@@ -92366,7 +92498,7 @@ func _sqlite3AlterDropColumn(tls *libc.TLS, pParse uintptr, pSrc uintptr, pName
}
nField = libc.Int32FromUint16((*TIndex)(unsafe.Pointer(pPk)).FnKeyCol)
}
- v8 = pParse + 48
+ v8 = pParse + 52
*(*int32)(unsafe.Pointer(v8))++
v7 = *(*int32)(unsafe.Pointer(v8))
regRec = v7
@@ -92377,8 +92509,8 @@ func _sqlite3AlterDropColumn(tls *libc.TLS, pParse uintptr, pSrc uintptr, pName
}
if i != iCol && libc.Int32FromUint16((*(*TColumn)(unsafe.Pointer((*TTable)(unsafe.Pointer(pTab)).FaCol + uintptr(i)*12))).FcolFlags)&int32(COLFLAG_VIRTUAL) == 0 {
if pPk != 0 {
- iPos = int32(_sqlite3TableColumnToIndex(tls, pPk, int16(i)))
- iColPos = int32(_sqlite3TableColumnToIndex(tls, pPk, int16(iCol)))
+ iPos = _sqlite3TableColumnToIndex(tls, pPk, i)
+ iColPos = _sqlite3TableColumnToIndex(tls, pPk, iCol)
if iPos < libc.Int32FromUint16((*TIndex)(unsafe.Pointer(pPk)).FnKeyCol) {
goto _9
}
@@ -92439,27 +92571,27 @@ var _aAlterTableFuncs = [5]TFuncDef{
0: {
FnArg: int16(9),
FfuncFlags: libc.Uint32FromInt32(libc.Int32FromInt32(SQLITE_FUNC_BUILTIN) | libc.Int32FromInt32(SQLITE_FUNC_INTERNAL) | libc.Int32FromInt32(SQLITE_UTF8) | libc.Int32FromInt32(SQLITE_FUNC_CONSTANT)),
- FzName: __ccgo_ts + 11671,
+ FzName: __ccgo_ts + 11696,
},
1: {
FnArg: int16(7),
FfuncFlags: libc.Uint32FromInt32(libc.Int32FromInt32(SQLITE_FUNC_BUILTIN) | libc.Int32FromInt32(SQLITE_FUNC_INTERNAL) | libc.Int32FromInt32(SQLITE_UTF8) | libc.Int32FromInt32(SQLITE_FUNC_CONSTANT)),
- FzName: __ccgo_ts + 11692,
+ FzName: __ccgo_ts + 11717,
},
2: {
FnArg: int16(7),
FfuncFlags: libc.Uint32FromInt32(libc.Int32FromInt32(SQLITE_FUNC_BUILTIN) | libc.Int32FromInt32(SQLITE_FUNC_INTERNAL) | libc.Int32FromInt32(SQLITE_UTF8) | libc.Int32FromInt32(SQLITE_FUNC_CONSTANT)),
- FzName: __ccgo_ts + 11712,
+ FzName: __ccgo_ts + 11737,
},
3: {
FnArg: int16(3),
FfuncFlags: libc.Uint32FromInt32(libc.Int32FromInt32(SQLITE_FUNC_BUILTIN) | libc.Int32FromInt32(SQLITE_FUNC_INTERNAL) | libc.Int32FromInt32(SQLITE_UTF8) | libc.Int32FromInt32(SQLITE_FUNC_CONSTANT)),
- FzName: __ccgo_ts + 11731,
+ FzName: __ccgo_ts + 11756,
},
4: {
FnArg: int16(2),
FfuncFlags: libc.Uint32FromInt32(libc.Int32FromInt32(SQLITE_FUNC_BUILTIN) | libc.Int32FromInt32(SQLITE_FUNC_INTERNAL) | libc.Int32FromInt32(SQLITE_UTF8) | libc.Int32FromInt32(SQLITE_FUNC_CONSTANT)),
- FzName: __ccgo_ts + 11750,
+ FzName: __ccgo_ts + 11775,
},
}
@@ -92670,8 +92802,13 @@ func _openStatTable(tls *libc.TLS, pParse uintptr, iDb int32, iStatCur int32, zW
** side-effect of the CREATE TABLE statement is to leave the rootpage
** of the new table in register pParse->regRoot. This is important
** because the OpenWrite opcode below will be needing it. */
- _sqlite3NestedParse(tls, pParse, __ccgo_ts+11853, libc.VaList(bp+8, (*TDb)(unsafe.Pointer(pDb)).FzDbSName, zTab, _aTable[i].FzCols))
- aRoot[i] = libc.Uint32FromInt32((*TParse)(unsafe.Pointer(pParse)).FregRoot)
+ _sqlite3NestedParse(tls, pParse, __ccgo_ts+11878, libc.VaList(bp+8, (*TDb)(unsafe.Pointer(pDb)).FzDbSName, zTab, _aTable[i].FzCols))
+ aRoot[i] = libc.Uint32FromInt32((*(*struct {
+ FaddrCrTab int32
+ FregRowid int32
+ FregRoot int32
+ FconstraintName TToken
+ })(unsafe.Pointer(pParse + 188))).FregRoot)
aCreateTbl[i] = uint8(OPFLAG_P2ISREG)
}
} else {
@@ -92681,10 +92818,10 @@ func _openStatTable(tls *libc.TLS, pParse uintptr, iDb int32, iStatCur int32, zW
aRoot[i] = (*TTable)(unsafe.Pointer(pStat)).Ftnum
_sqlite3TableLock(tls, pParse, iDb, aRoot[i], uint8(1), zTab)
if zWhere != 0 {
- _sqlite3NestedParse(tls, pParse, __ccgo_ts+11876, libc.VaList(bp+8, (*TDb)(unsafe.Pointer(pDb)).FzDbSName, zTab, zWhereType, zWhere))
+ _sqlite3NestedParse(tls, pParse, __ccgo_ts+11901, libc.VaList(bp+8, (*TDb)(unsafe.Pointer(pDb)).FzDbSName, zTab, zWhereType, zWhere))
} else {
if (*Tsqlite3)(unsafe.Pointer(db)).FxPreUpdateCallback != 0 {
- _sqlite3NestedParse(tls, pParse, __ccgo_ts+11906, libc.VaList(bp+8, (*TDb)(unsafe.Pointer(pDb)).FzDbSName, zTab))
+ _sqlite3NestedParse(tls, pParse, __ccgo_ts+11931, libc.VaList(bp+8, (*TDb)(unsafe.Pointer(pDb)).FzDbSName, zTab))
} else {
/* The sqlite_stat[134] table already exists. Delete all rows. */
_sqlite3VdbeAddOp2(tls, v, int32(OP_Clear), libc.Int32FromUint32(aRoot[i]), iDb)
@@ -92716,15 +92853,15 @@ var _aTable = [3]struct {
FzCols uintptr
}{
0: {
- FzName: __ccgo_ts + 11773,
- FzCols: __ccgo_ts + 11786,
+ FzName: __ccgo_ts + 11798,
+ FzCols: __ccgo_ts + 11811,
},
1: {
- FzName: __ccgo_ts + 11799,
- FzCols: __ccgo_ts + 11812,
+ FzName: __ccgo_ts + 11824,
+ FzCols: __ccgo_ts + 11837,
},
2: {
- FzName: __ccgo_ts + 11840,
+ FzName: __ccgo_ts + 11865,
},
}
@@ -92938,7 +93075,8 @@ func _statAccumDestructor(tls *libc.TLS, pOld uintptr) {
// */
func _statInit(tls *libc.TLS, context uintptr, argc int32, argv uintptr) {
var db, p, pSpace uintptr
- var i, mxSample, n, nCol, nColUp, nKeyCol, v1, v2 int32
+ var i, mxSample, nCol, nColUp, nKeyCol, v1, v2 int32
+ var n Ti64
_, _, _, _, _, _, _, _, _, _, _ = db, i, mxSample, n, nCol, nColUp, nKeyCol, p, pSpace, v1, v2 /* Bytes of space to allocate */
db = Xsqlite3_context_db_handle(tls, context)
if (*Tsqlite3)(unsafe.Pointer(db)).FdbOptFlags&libc.Uint32FromInt32(libc.Int32FromInt32(SQLITE_Stat4)) == uint32(0) {
@@ -92954,12 +93092,12 @@ func _statInit(tls *libc.TLS, context uintptr, argc int32, argv uintptr) {
nColUp = nCol
nKeyCol = Xsqlite3_value_int(tls, *(*uintptr)(unsafe.Pointer(argv + 1*4)))
/* Allocate the space required for the StatAccum object */
- n = libc.Int32FromUint32(uint32(112) + uint32(8)*libc.Uint32FromInt32(nColUp)) /* StatAccum.anDLt */
- n = int32(uint32(n) + libc.Uint32FromInt64(8)*libc.Uint32FromInt32(nColUp)) /* StatAccum.anEq */
+ n = libc.Int64FromUint32(uint32(112) + uint32(8)*libc.Uint32FromInt32(nColUp)) /* StatAccum.anDLt */
+ n += libc.Int64FromUint32(uint32(8) * libc.Uint32FromInt32(nColUp)) /* StatAccum.anEq */
if mxSample != 0 {
- n = int32(uint32(n) + (libc.Uint32FromInt64(8)*libc.Uint32FromInt32(nColUp) + libc.Uint32FromInt64(36)*libc.Uint32FromInt32(nCol+mxSample) + libc.Uint32FromInt64(8)*libc.Uint32FromInt32(3)*libc.Uint32FromInt32(nColUp)*libc.Uint32FromInt32(nCol+mxSample)))
+ n += libc.Int64FromUint32(uint32(8)*libc.Uint32FromInt32(nColUp) + uint32(36)*libc.Uint32FromInt32(nCol+mxSample) + libc.Uint32FromInt64(8)*libc.Uint32FromInt32(3)*libc.Uint32FromInt32(nColUp)*libc.Uint32FromInt32(nCol+mxSample))
}
- p = _sqlite3DbMallocZero(tls, db, libc.Uint64FromInt32(n))
+ p = _sqlite3DbMallocZero(tls, db, libc.Uint64FromInt64(n))
if p == uintptr(0) {
Xsqlite3_result_error_nomem(tls, context)
return
@@ -92967,7 +93105,7 @@ func _statInit(tls *libc.TLS, context uintptr, argc int32, argv uintptr) {
(*TStatAccum)(unsafe.Pointer(p)).Fdb = db
(*TStatAccum)(unsafe.Pointer(p)).FnEst = libc.Uint64FromInt64(Xsqlite3_value_int64(tls, *(*uintptr)(unsafe.Pointer(argv + 2*4))))
(*TStatAccum)(unsafe.Pointer(p)).FnRow = uint64(0)
- (*TStatAccum)(unsafe.Pointer(p)).FnLimit = int32(Xsqlite3_value_int64(tls, *(*uintptr)(unsafe.Pointer(argv + 3*4))))
+ (*TStatAccum)(unsafe.Pointer(p)).FnLimit = Xsqlite3_value_int(tls, *(*uintptr)(unsafe.Pointer(argv + 3*4)))
(*TStatAccum)(unsafe.Pointer(p)).FnCol = nCol
(*TStatAccum)(unsafe.Pointer(p)).FnKeyCol = nKeyCol
(*TStatAccum)(unsafe.Pointer(p)).FnSkipAhead = uint8(0)
@@ -93026,7 +93164,7 @@ func _statInit(tls *libc.TLS, context uintptr, argc int32, argv uintptr) {
var _statInitFuncdef = TFuncDef{
FnArg: int16(4),
FfuncFlags: uint32(SQLITE_UTF8),
- FzName: __ccgo_ts + 11924,
+ FzName: __ccgo_ts + 11949,
}
func init() {
@@ -93400,7 +93538,7 @@ func _statPush(tls *libc.TLS, context uintptr, argc int32, argv uintptr) {
var _statPushFuncdef = TFuncDef{
FnArg: int16(libc.Int32FromInt32(2) + libc.Int32FromInt32(IsStat4)),
FfuncFlags: uint32(SQLITE_UTF8),
- FzName: __ccgo_ts + 11934,
+ FzName: __ccgo_ts + 11959,
}
func init() {
@@ -93450,7 +93588,7 @@ func _statGet(tls *libc.TLS, context uintptr, argc int32, argv uintptr) {
} else {
v1 = (*TStatAccum)(unsafe.Pointer(p)).FnRow
}
- Xsqlite3_str_appendf(tls, bp, __ccgo_ts+11944, libc.VaList(bp+56, v1))
+ Xsqlite3_str_appendf(tls, bp, __ccgo_ts+11969, libc.VaList(bp+56, v1))
i = 0
for {
if !(i < (*TStatAccum)(unsafe.Pointer(p)).FnKeyCol) {
@@ -93461,7 +93599,7 @@ func _statGet(tls *libc.TLS, context uintptr, argc int32, argv uintptr) {
if iVal == uint64(2) && (*TStatAccum)(unsafe.Pointer(p)).FnRow*uint64(10) <= nDistinct*uint64(11) {
iVal = uint64(1)
}
- Xsqlite3_str_appendf(tls, bp, __ccgo_ts+11949, libc.VaList(bp+56, iVal))
+ Xsqlite3_str_appendf(tls, bp, __ccgo_ts+11974, libc.VaList(bp+56, iVal))
goto _2
_2:
;
@@ -93500,7 +93638,7 @@ func _statGet(tls *libc.TLS, context uintptr, argc int32, argv uintptr) {
if !(i1 < (*TStatAccum)(unsafe.Pointer(p)).FnCol) {
break
}
- Xsqlite3_str_appendf(tls, bp+24, __ccgo_ts+11955, libc.VaList(bp+56, *(*TtRowcnt)(unsafe.Pointer(aCnt + uintptr(i1)*8))))
+ Xsqlite3_str_appendf(tls, bp+24, __ccgo_ts+11980, libc.VaList(bp+56, *(*TtRowcnt)(unsafe.Pointer(aCnt + uintptr(i1)*8))))
goto _3
_3:
;
@@ -93518,7 +93656,7 @@ func _statGet(tls *libc.TLS, context uintptr, argc int32, argv uintptr) {
var _statGetFuncdef = TFuncDef{
FnArg: int16(libc.Int32FromInt32(1) + libc.Int32FromInt32(IsStat4)),
FfuncFlags: uint32(SQLITE_UTF8),
- FzName: __ccgo_ts + 11961,
+ FzName: __ccgo_ts + 11986,
}
func init() {
@@ -93584,7 +93722,7 @@ func _analyzeOneTable(tls *libc.TLS, pParse uintptr, pTab uintptr, pOnlyIdx uint
/* Do not gather statistics on views or virtual tables */
return
}
- if Xsqlite3_strlike(tls, __ccgo_ts+11970, (*TTable)(unsafe.Pointer(pTab)).FzName, uint32('\\')) == 0 {
+ if Xsqlite3_strlike(tls, __ccgo_ts+11995, (*TTable)(unsafe.Pointer(pTab)).FzName, uint32('\\')) == 0 {
/* Do not gather statistics on system tables */
return
}
@@ -93593,12 +93731,12 @@ func _analyzeOneTable(tls *libc.TLS, pParse uintptr, pTab uintptr, pOnlyIdx uint
return
}
if (*Tsqlite3)(unsafe.Pointer(db)).FxPreUpdateCallback != 0 {
- pStat1 = _sqlite3DbMallocZero(tls, db, uint64(libc.Uint32FromInt64(64)+libc.Uint32FromInt32(13)))
+ pStat1 = _sqlite3DbMallocZero(tls, db, uint64(libc.Uint32FromInt64(80)+libc.Uint32FromInt32(13)))
if pStat1 == uintptr(0) {
return
}
- (*TTable)(unsafe.Pointer(pStat1)).FzName = pStat1 + 1*64
- libc.Xmemcpy(tls, (*TTable)(unsafe.Pointer(pStat1)).FzName, __ccgo_ts+11773, uint32(13))
+ (*TTable)(unsafe.Pointer(pStat1)).FzName = pStat1 + 1*80
+ libc.Xmemcpy(tls, (*TTable)(unsafe.Pointer(pStat1)).FzName, __ccgo_ts+11798, uint32(13))
(*TTable)(unsafe.Pointer(pStat1)).FnCol = int16(3)
(*TTable)(unsafe.Pointer(pStat1)).FiPKey = int16(-int32(1))
_sqlite3VdbeAddOp4(tls, (*TParse)(unsafe.Pointer(pParse)).FpVdbe, int32(OP_Noop), 0, 0, 0, pStat1, -int32(6))
@@ -93800,7 +93938,7 @@ func _analyzeOneTable(tls *libc.TLS, pParse uintptr, pTab uintptr, pOnlyIdx uint
if !(j < libc.Int32FromUint16((*TIndex)(unsafe.Pointer(pPk)).FnKeyCol)) {
break
}
- k = int32(_sqlite3TableColumnToIndex(tls, pIdx, *(*Ti16)(unsafe.Pointer((*TIndex)(unsafe.Pointer(pPk)).FaiColumn + uintptr(j)*2))))
+ k = _sqlite3TableColumnToIndex(tls, pIdx, int32(*(*Ti16)(unsafe.Pointer((*TIndex)(unsafe.Pointer(pPk)).FaiColumn + uintptr(j)*2))))
_sqlite3VdbeAddOp3(tls, v, int32(OP_Column), iIdxCur, k, regKey+j)
goto _17
_17:
@@ -93831,7 +93969,7 @@ func _analyzeOneTable(tls *libc.TLS, pParse uintptr, pTab uintptr, pOnlyIdx uint
addrGotoEnd = 0
}
_callStatGet(tls, pParse, regStat, STAT_GET_STAT1, regStat1)
- _sqlite3VdbeAddOp4(tls, v, int32(OP_MakeRecord), regTabname, int32(3), regTemp, __ccgo_ts+11980, 0)
+ _sqlite3VdbeAddOp4(tls, v, int32(OP_MakeRecord), regTabname, int32(3), regTemp, __ccgo_ts+12005, 0)
_sqlite3VdbeAddOp2(tls, v, int32(OP_NewRowid), iStatCur, regNewRowid)
_sqlite3VdbeAddOp3(tls, v, int32(OP_Insert), iStatCur, regTemp, regNewRowid)
_sqlite3VdbeChangeP4(tls, v, -int32(1), pStat1, -int32(5))
@@ -93922,7 +94060,7 @@ func _analyzeOneTable(tls *libc.TLS, pParse uintptr, pTab uintptr, pOnlyIdx uint
_sqlite3VdbeAddOp2(tls, v, int32(OP_Count), iTabCur, regStat1)
jZeroRows = _sqlite3VdbeAddOp1(tls, v, int32(OP_IfNot), regStat1)
_sqlite3VdbeAddOp2(tls, v, int32(OP_Null), 0, regIdxname)
- _sqlite3VdbeAddOp4(tls, v, int32(OP_MakeRecord), regTabname, int32(3), regTemp, __ccgo_ts+11980, 0)
+ _sqlite3VdbeAddOp4(tls, v, int32(OP_MakeRecord), regTabname, int32(3), regTemp, __ccgo_ts+12005, 0)
_sqlite3VdbeAddOp2(tls, v, int32(OP_NewRowid), iStatCur, regNewRowid)
_sqlite3VdbeAddOp3(tls, v, int32(OP_Insert), iStatCur, regTemp, regNewRowid)
_sqlite3VdbeChangeP5(tls, v, uint16(OPFLAG_APPEND))
@@ -93959,7 +94097,7 @@ func _analyzeDatabase(tls *libc.TLS, pParse uintptr, iDb int32) {
pSchema = (*(*TDb)(unsafe.Pointer((*Tsqlite3)(unsafe.Pointer(db)).FaDb + uintptr(iDb)*16))).FpSchema
_sqlite3BeginWriteOperation(tls, pParse, 0, iDb)
iStatCur = (*TParse)(unsafe.Pointer(pParse)).FnTab
- *(*int32)(unsafe.Pointer(pParse + 44)) += int32(3)
+ *(*int32)(unsafe.Pointer(pParse + 48)) += int32(3)
_openStatTable(tls, pParse, iDb, iStatCur, uintptr(0), uintptr(0))
iMem = (*TParse)(unsafe.Pointer(pParse)).FnMem + int32(1)
iTab = (*TParse)(unsafe.Pointer(pParse)).FnTab
@@ -93992,11 +94130,11 @@ func _analyzeTable(tls *libc.TLS, pParse uintptr, pTab uintptr, pOnlyIdx uintptr
iDb = _sqlite3SchemaToIndex(tls, (*TParse)(unsafe.Pointer(pParse)).Fdb, (*TTable)(unsafe.Pointer(pTab)).FpSchema)
_sqlite3BeginWriteOperation(tls, pParse, 0, iDb)
iStatCur = (*TParse)(unsafe.Pointer(pParse)).FnTab
- *(*int32)(unsafe.Pointer(pParse + 44)) += int32(3)
+ *(*int32)(unsafe.Pointer(pParse + 48)) += int32(3)
if pOnlyIdx != 0 {
- _openStatTable(tls, pParse, iDb, iStatCur, (*TIndex)(unsafe.Pointer(pOnlyIdx)).FzName, __ccgo_ts+11984)
+ _openStatTable(tls, pParse, iDb, iStatCur, (*TIndex)(unsafe.Pointer(pOnlyIdx)).FzName, __ccgo_ts+12009)
} else {
- _openStatTable(tls, pParse, iDb, iStatCur, (*TTable)(unsafe.Pointer(pTab)).FzName, __ccgo_ts+11988)
+ _openStatTable(tls, pParse, iDb, iStatCur, (*TTable)(unsafe.Pointer(pTab)).FzName, __ccgo_ts+12013)
}
_analyzeOneTable(tls, pParse, pTab, pOnlyIdx, iStatCur, (*TParse)(unsafe.Pointer(pParse)).FnMem+int32(1), (*TParse)(unsafe.Pointer(pParse)).FnTab)
_loadAnalysis(tls, pParse, iDb)
@@ -94160,17 +94298,17 @@ func _decodeIntArray(tls *libc.TLS, zIntArray uintptr, nOut int32, aOut uintptr,
libc.SetBitFieldPtr16Uint32(pIndex+56, libc.Uint32FromInt32(0), 2, 0x4)
libc.SetBitFieldPtr16Uint32(pIndex+56, libc.Uint32FromInt32(0), 6, 0x40)
for *(*int8)(unsafe.Pointer(z)) != 0 {
- if Xsqlite3_strglob(tls, __ccgo_ts+11992, z) == 0 {
+ if Xsqlite3_strglob(tls, __ccgo_ts+12017, z) == 0 {
libc.SetBitFieldPtr16Uint32(pIndex+56, libc.Uint32FromInt32(1), 2, 0x4)
} else {
- if Xsqlite3_strglob(tls, __ccgo_ts+12003, z) == 0 {
+ if Xsqlite3_strglob(tls, __ccgo_ts+12028, z) == 0 {
sz = _sqlite3Atoi(tls, z+uintptr(3))
if sz < int32(2) {
sz = int32(2)
}
(*TIndex)(unsafe.Pointer(pIndex)).FszIdxRow = _sqlite3LogEst(tls, libc.Uint64FromInt32(sz))
} else {
- if Xsqlite3_strglob(tls, __ccgo_ts+12013, z) == 0 {
+ if Xsqlite3_strglob(tls, __ccgo_ts+12038, z) == 0 {
libc.SetBitFieldPtr16Uint32(pIndex+56, libc.Uint32FromInt32(1), 6, 0x40)
}
}
@@ -94182,13 +94320,6 @@ func _decodeIntArray(tls *libc.TLS, zIntArray uintptr, nOut int32, aOut uintptr,
z++
}
}
- /* Set the bLowQual flag if the peak number of rows obtained
- ** from a full equality match is so large that a full table scan
- ** seems likely to be faster than using the index.
- */
- if int32(*(*TLogEst)(unsafe.Pointer(aLog))) > int32(66) && int32(*(*TLogEst)(unsafe.Pointer(aLog))) <= int32(*(*TLogEst)(unsafe.Pointer(aLog + uintptr(nOut-int32(1))*2))) {
- libc.SetBitFieldPtr16Uint32(pIndex+56, libc.Uint32FromInt32(1), 8, 0x100)
- }
}
}
@@ -94549,11 +94680,11 @@ func _loadStat4(tls *libc.TLS, db uintptr, zDb uintptr) (r int32) {
_, _, _, _ = pStat4, rc, v1, v2
rc = SQLITE_OK
if v2 = (*Tsqlite3)(unsafe.Pointer(db)).FdbOptFlags&libc.Uint32FromInt32(libc.Int32FromInt32(SQLITE_Stat4)) == uint32(0); v2 {
- v1 = _sqlite3FindTable(tls, db, __ccgo_ts+11799, zDb)
+ v1 = _sqlite3FindTable(tls, db, __ccgo_ts+11824, zDb)
pStat4 = v1
}
if v2 && v1 != uintptr(0) && libc.Int32FromUint8((*TTable)(unsafe.Pointer(pStat4)).FeTabType) == TABTYP_NORM {
- rc = _loadStatTbl(tls, db, __ccgo_ts+12025, __ccgo_ts+12094, zDb)
+ rc = _loadStatTbl(tls, db, __ccgo_ts+12050, __ccgo_ts+12119, zDb)
}
return rc
}
@@ -94619,10 +94750,10 @@ func _sqlite3AnalysisLoad(tls *libc.TLS, db uintptr, iDb int32) (r int32) {
/* Load new statistics out of the sqlite_stat1 table */
(*(*TanalysisInfo)(unsafe.Pointer(bp))).Fdb = db
(*(*TanalysisInfo)(unsafe.Pointer(bp))).FzDatabase = (*(*TDb)(unsafe.Pointer((*Tsqlite3)(unsafe.Pointer(db)).FaDb + uintptr(iDb)*16))).FzDbSName
- v3 = _sqlite3FindTable(tls, db, __ccgo_ts+11773, (*(*TanalysisInfo)(unsafe.Pointer(bp))).FzDatabase)
+ v3 = _sqlite3FindTable(tls, db, __ccgo_ts+11798, (*(*TanalysisInfo)(unsafe.Pointer(bp))).FzDatabase)
pStat1 = v3
if v3 != 0 && libc.Int32FromUint8((*TTable)(unsafe.Pointer(pStat1)).FeTabType) == TABTYP_NORM {
- zSql = _sqlite3MPrintf(tls, db, __ccgo_ts+12146, libc.VaList(bp+16, (*(*TanalysisInfo)(unsafe.Pointer(bp))).FzDatabase))
+ zSql = _sqlite3MPrintf(tls, db, __ccgo_ts+12171, libc.VaList(bp+16, (*(*TanalysisInfo)(unsafe.Pointer(bp))).FzDatabase))
if zSql == uintptr(0) {
rc = int32(SQLITE_NOMEM)
} else {
@@ -94735,7 +94866,7 @@ func _resolveAttachExpr(tls *libc.TLS, pName uintptr, pExpr uintptr) (r int32) {
// ** database iDb attached to handle db.
// */
func _sqlite3DbIsNamed(tls *libc.TLS, db uintptr, iDb int32, zName uintptr) (r int32) {
- return libc.BoolInt32(_sqlite3StrICmp(tls, (*(*TDb)(unsafe.Pointer((*Tsqlite3)(unsafe.Pointer(db)).FaDb + uintptr(iDb)*16))).FzDbSName, zName) == 0 || iDb == 0 && _sqlite3StrICmp(tls, __ccgo_ts+6715, zName) == 0)
+ return libc.BoolInt32(_sqlite3StrICmp(tls, (*(*TDb)(unsafe.Pointer((*Tsqlite3)(unsafe.Pointer(db)).FaDb + uintptr(iDb)*16))).FzDbSName, zName) == 0 || iDb == 0 && _sqlite3StrICmp(tls, __ccgo_ts+6740, zName) == 0)
}
// C documentation
@@ -94787,11 +94918,11 @@ func _attachFunc(tls *libc.TLS, context uintptr, NotUsed int32, argv uintptr) {
** from sqlite3_deserialize() to close database db->init.iDb and
** reopen it as a MemDB */
*(*uintptr)(unsafe.Pointer(bp + 20)) = uintptr(0)
- *(*uintptr)(unsafe.Pointer(bp + 16)) = Xsqlite3_vfs_find(tls, __ccgo_ts+4036)
+ *(*uintptr)(unsafe.Pointer(bp + 16)) = Xsqlite3_vfs_find(tls, __ccgo_ts+4062)
if *(*uintptr)(unsafe.Pointer(bp + 16)) == uintptr(0) {
return
}
- rc = _sqlite3BtreeOpen(tls, *(*uintptr)(unsafe.Pointer(bp + 16)), __ccgo_ts+12187, db, bp+20, 0, int32(SQLITE_OPEN_MAIN_DB))
+ rc = _sqlite3BtreeOpen(tls, *(*uintptr)(unsafe.Pointer(bp + 16)), __ccgo_ts+12212, db, bp+20, 0, int32(SQLITE_OPEN_MAIN_DB))
if rc == SQLITE_OK {
pNewSchema = _sqlite3SchemaGet(tls, db, *(*uintptr)(unsafe.Pointer(bp + 20)))
if pNewSchema != 0 {
@@ -94822,7 +94953,7 @@ func _attachFunc(tls *libc.TLS, context uintptr, NotUsed int32, argv uintptr) {
** * Specified database name already being used.
*/
if (*Tsqlite3)(unsafe.Pointer(db)).FnDb >= *(*int32)(unsafe.Pointer(db + 116 + 7*4))+int32(2) {
- *(*uintptr)(unsafe.Pointer(bp + 12)) = _sqlite3MPrintf(tls, db, __ccgo_ts+12190, libc.VaList(bp+32, *(*int32)(unsafe.Pointer(db + 116 + 7*4))))
+ *(*uintptr)(unsafe.Pointer(bp + 12)) = _sqlite3MPrintf(tls, db, __ccgo_ts+12215, libc.VaList(bp+32, *(*int32)(unsafe.Pointer(db + 116 + 7*4))))
goto attach_error
}
i = 0
@@ -94831,7 +94962,7 @@ func _attachFunc(tls *libc.TLS, context uintptr, NotUsed int32, argv uintptr) {
break
}
if _sqlite3DbIsNamed(tls, db, i, zName) != 0 {
- *(*uintptr)(unsafe.Pointer(bp + 12)) = _sqlite3MPrintf(tls, db, __ccgo_ts+12227, libc.VaList(bp+32, zName))
+ *(*uintptr)(unsafe.Pointer(bp + 12)) = _sqlite3MPrintf(tls, db, __ccgo_ts+12252, libc.VaList(bp+32, zName))
goto attach_error
}
goto _1
@@ -94849,7 +94980,7 @@ func _attachFunc(tls *libc.TLS, context uintptr, NotUsed int32, argv uintptr) {
}
libc.Xmemcpy(tls, aNew, (*Tsqlite3)(unsafe.Pointer(db)).FaDb, libc.Uint32FromInt64(16)*libc.Uint32FromInt32(2))
} else {
- aNew = _sqlite3DbRealloc(tls, db, (*Tsqlite3)(unsafe.Pointer(db)).FaDb, uint64(uint32(16)*libc.Uint32FromInt32((*Tsqlite3)(unsafe.Pointer(db)).FnDb+libc.Int32FromInt32(1))))
+ aNew = _sqlite3DbRealloc(tls, db, (*Tsqlite3)(unsafe.Pointer(db)).FaDb, libc.Uint64FromInt64(int64(16)*(int64(1)+int64((*Tsqlite3)(unsafe.Pointer(db)).FnDb))))
if aNew == uintptr(0) {
return
}
@@ -94887,7 +95018,7 @@ func _attachFunc(tls *libc.TLS, context uintptr, NotUsed int32, argv uintptr) {
(*Tsqlite3)(unsafe.Pointer(db)).FnoSharedCache = uint8(0)
if rc == int32(SQLITE_CONSTRAINT) {
rc = int32(SQLITE_ERROR)
- *(*uintptr)(unsafe.Pointer(bp + 12)) = _sqlite3MPrintf(tls, db, __ccgo_ts+12257, 0)
+ *(*uintptr)(unsafe.Pointer(bp + 12)) = _sqlite3MPrintf(tls, db, __ccgo_ts+12282, 0)
} else {
if rc == SQLITE_OK {
(*TDb)(unsafe.Pointer(pNew)).FpSchema = _sqlite3SchemaGet(tls, db, (*TDb)(unsafe.Pointer(pNew)).FpBt)
@@ -94895,7 +95026,7 @@ func _attachFunc(tls *libc.TLS, context uintptr, NotUsed int32, argv uintptr) {
rc = int32(SQLITE_NOMEM)
} else {
if (*TSchema)(unsafe.Pointer((*TDb)(unsafe.Pointer(pNew)).FpSchema)).Ffile_format != 0 && libc.Int32FromUint8((*TSchema)(unsafe.Pointer((*TDb)(unsafe.Pointer(pNew)).FpSchema)).Fenc) != libc.Int32FromUint8((*Tsqlite3)(unsafe.Pointer(db)).Fenc) {
- *(*uintptr)(unsafe.Pointer(bp + 12)) = _sqlite3MPrintf(tls, db, __ccgo_ts+12286, 0)
+ *(*uintptr)(unsafe.Pointer(bp + 12)) = _sqlite3MPrintf(tls, db, __ccgo_ts+12311, 0)
rc = int32(SQLITE_ERROR)
}
}
@@ -94942,7 +95073,7 @@ func _attachFunc(tls *libc.TLS, context uintptr, NotUsed int32, argv uintptr) {
*(*uintptr)(unsafe.Pointer(bp + 12)) = _sqlite3MPrintf(tls, db, __ccgo_ts+1637, 0)
} else {
if *(*uintptr)(unsafe.Pointer(bp + 12)) == uintptr(0) {
- *(*uintptr)(unsafe.Pointer(bp + 12)) = _sqlite3MPrintf(tls, db, __ccgo_ts+12354, libc.VaList(bp+32, zFile))
+ *(*uintptr)(unsafe.Pointer(bp + 12)) = _sqlite3MPrintf(tls, db, __ccgo_ts+12379, libc.VaList(bp+32, zFile))
}
}
}
@@ -95004,15 +95135,15 @@ func _detachFunc(tls *libc.TLS, context uintptr, NotUsed int32, argv uintptr) {
i++
}
if i >= (*Tsqlite3)(unsafe.Pointer(db)).FnDb {
- Xsqlite3_snprintf(tls, int32(128), bp, __ccgo_ts+12382, libc.VaList(bp+136, zName))
+ Xsqlite3_snprintf(tls, int32(128), bp, __ccgo_ts+12407, libc.VaList(bp+136, zName))
goto detach_error
}
if i < int32(2) {
- Xsqlite3_snprintf(tls, int32(128), bp, __ccgo_ts+12403, libc.VaList(bp+136, zName))
+ Xsqlite3_snprintf(tls, int32(128), bp, __ccgo_ts+12428, libc.VaList(bp+136, zName))
goto detach_error
}
if _sqlite3BtreeTxnState(tls, (*TDb)(unsafe.Pointer(pDb)).FpBt) != SQLITE_TXN_NONE || _sqlite3BtreeIsInBackup(tls, (*TDb)(unsafe.Pointer(pDb)).FpBt) != 0 {
- Xsqlite3_snprintf(tls, int32(128), bp, __ccgo_ts+12429, libc.VaList(bp+136, zName))
+ Xsqlite3_snprintf(tls, int32(128), bp, __ccgo_ts+12454, libc.VaList(bp+136, zName))
goto detach_error
}
/* If any TEMP triggers reference the schema being detached, move those
@@ -95107,7 +95238,7 @@ func _sqlite3Detach(tls *libc.TLS, pParse uintptr, pDbname uintptr) {
var _detach_func = TFuncDef{
FnArg: int16(1),
FfuncFlags: uint32(SQLITE_UTF8),
- FzName: __ccgo_ts + 12451,
+ FzName: __ccgo_ts + 12476,
}
func init() {
@@ -95129,7 +95260,7 @@ func _sqlite3Attach(tls *libc.TLS, pParse uintptr, p uintptr, pDbname uintptr, p
var _attach_func = TFuncDef{
FnArg: int16(3),
FfuncFlags: uint32(SQLITE_UTF8),
- FzName: __ccgo_ts + 12465,
+ FzName: __ccgo_ts + 12490,
}
func init() {
@@ -95155,7 +95286,7 @@ func _fixExprCb(tls *libc.TLS, p uintptr, pExpr uintptr) (r int32) {
if (*Tsqlite3)(unsafe.Pointer((*TParse)(unsafe.Pointer((*TDbFixer)(unsafe.Pointer(pFix)).FpParse)).Fdb)).Finit1.Fbusy != 0 {
(*TExpr)(unsafe.Pointer(pExpr)).Fop = uint8(TK_NULL)
} else {
- _sqlite3ErrorMsg(tls, (*TDbFixer)(unsafe.Pointer(pFix)).FpParse, __ccgo_ts+12479, libc.VaList(bp+8, (*TDbFixer)(unsafe.Pointer(pFix)).FzType))
+ _sqlite3ErrorMsg(tls, (*TDbFixer)(unsafe.Pointer(pFix)).FpParse, __ccgo_ts+12504, libc.VaList(bp+8, (*TDbFixer)(unsafe.Pointer(pFix)).FzType))
return int32(WRC_Abort)
}
}
@@ -95189,7 +95320,7 @@ func _fixSelectCb(tls *libc.TLS, p uintptr, pSelect uintptr) (r int32) {
if libc.Int32FromUint8((*TDbFixer)(unsafe.Pointer(pFix)).FbTemp) == 0 && int32(*(*uint32)(unsafe.Pointer(pItem + 12 + 4))&0x4>>2) == 0 {
if int32(*(*uint32)(unsafe.Pointer(pItem + 12 + 4))&0x10000>>16) == 0 && *(*uintptr)(unsafe.Pointer(pItem + 44)) != uintptr(0) {
if iDb != _sqlite3FindDbName(tls, db, *(*uintptr)(unsafe.Pointer(pItem + 44))) {
- _sqlite3ErrorMsg(tls, (*TDbFixer)(unsafe.Pointer(pFix)).FpParse, __ccgo_ts+12503, libc.VaList(bp+8, (*TDbFixer)(unsafe.Pointer(pFix)).FzType, (*TDbFixer)(unsafe.Pointer(pFix)).FpName, *(*uintptr)(unsafe.Pointer(pItem + 44))))
+ _sqlite3ErrorMsg(tls, (*TDbFixer)(unsafe.Pointer(pFix)).FpParse, __ccgo_ts+12528, libc.VaList(bp+8, (*TDbFixer)(unsafe.Pointer(pFix)).FzType, (*TDbFixer)(unsafe.Pointer(pFix)).FpName, *(*uintptr)(unsafe.Pointer(pItem + 44))))
return int32(WRC_Abort)
}
_sqlite3DbFree(tls, db, *(*uintptr)(unsafe.Pointer(pItem + 44)))
@@ -95406,7 +95537,7 @@ func Xsqlite3_set_authorizer(tls *libc.TLS, db uintptr, xAuth uintptr, pArg uint
// ** user-supplied authorization function returned an illegal value.
// */
func _sqliteAuthBadReturnCode(tls *libc.TLS, pParse uintptr) {
- _sqlite3ErrorMsg(tls, pParse, __ccgo_ts+12549, 0)
+ _sqlite3ErrorMsg(tls, pParse, __ccgo_ts+12574, 0)
(*TParse)(unsafe.Pointer(pParse)).Frc = int32(SQLITE_ERROR)
}
@@ -95434,11 +95565,11 @@ func _sqlite3AuthReadCol(tls *libc.TLS, pParse uintptr, zTab uintptr, zCol uintp
}
rc = (*(*func(*libc.TLS, uintptr, int32, uintptr, uintptr, uintptr, uintptr) int32)(unsafe.Pointer(&struct{ uintptr }{(*Tsqlite3)(unsafe.Pointer(db)).FxAuth})))(tls, (*Tsqlite3)(unsafe.Pointer(db)).FpAuthArg, int32(SQLITE_READ), zTab, zCol, zDb, (*TParse)(unsafe.Pointer(pParse)).FzAuthContext)
if rc == int32(SQLITE_DENY) {
- z = Xsqlite3_mprintf(tls, __ccgo_ts+12572, libc.VaList(bp+8, zTab, zCol))
+ z = Xsqlite3_mprintf(tls, __ccgo_ts+12597, libc.VaList(bp+8, zTab, zCol))
if (*Tsqlite3)(unsafe.Pointer(db)).FnDb > int32(2) || iDb != 0 {
- z = Xsqlite3_mprintf(tls, __ccgo_ts+12578, libc.VaList(bp+8, zDb, z))
+ z = Xsqlite3_mprintf(tls, __ccgo_ts+12603, libc.VaList(bp+8, zDb, z))
}
- _sqlite3ErrorMsg(tls, pParse, __ccgo_ts+12584, libc.VaList(bp+8, z))
+ _sqlite3ErrorMsg(tls, pParse, __ccgo_ts+12609, libc.VaList(bp+8, z))
(*TParse)(unsafe.Pointer(pParse)).Frc = int32(SQLITE_AUTH)
} else {
if rc != int32(SQLITE_IGNORE) && rc != SQLITE_OK {
@@ -95498,7 +95629,7 @@ func _sqlite3AuthRead(tls *libc.TLS, pParse uintptr, pExpr uintptr, pSchema uint
if int32((*TTable)(unsafe.Pointer(pTab)).FiPKey) >= 0 {
zCol = (*(*TColumn)(unsafe.Pointer((*TTable)(unsafe.Pointer(pTab)).FaCol + uintptr((*TTable)(unsafe.Pointer(pTab)).FiPKey)*12))).FzCnName
} else {
- zCol = __ccgo_ts + 8096
+ zCol = __ccgo_ts + 8121
}
}
if int32(SQLITE_IGNORE) == _sqlite3AuthReadCol(tls, pParse, (*TTable)(unsafe.Pointer(pTab)).FzName, zCol, iDb) {
@@ -95533,7 +95664,7 @@ func _sqlite3AuthCheck(tls *libc.TLS, pParse uintptr, code int32, zArg1 uintptr,
** parameters can be either NULL or a string. */
rc = (*(*func(*libc.TLS, uintptr, int32, uintptr, uintptr, uintptr, uintptr) int32)(unsafe.Pointer(&struct{ uintptr }{(*Tsqlite3)(unsafe.Pointer(db)).FxAuth})))(tls, (*Tsqlite3)(unsafe.Pointer(db)).FpAuthArg, code, zArg1, zArg2, zArg3, (*TParse)(unsafe.Pointer(pParse)).FzAuthContext)
if rc == int32(SQLITE_DENY) {
- _sqlite3ErrorMsg(tls, pParse, __ccgo_ts+12611, 0)
+ _sqlite3ErrorMsg(tls, pParse, __ccgo_ts+12636, 0)
(*TParse)(unsafe.Pointer(pParse)).Frc = int32(SQLITE_AUTH)
} else {
if rc != SQLITE_OK && rc != int32(SQLITE_IGNORE) {
@@ -95651,7 +95782,7 @@ func _lockTable(tls *libc.TLS, pParse uintptr, iDb int32, iTab TPgno, isWriteLoc
nBytes = libc.Int32FromUint32(uint32(16) * libc.Uint32FromInt32((*TParse)(unsafe.Pointer(pToplevel)).FnTableLock+libc.Int32FromInt32(1)))
(*TParse)(unsafe.Pointer(pToplevel)).FaTableLock = _sqlite3DbReallocOrFree(tls, (*TParse)(unsafe.Pointer(pToplevel)).Fdb, (*TParse)(unsafe.Pointer(pToplevel)).FaTableLock, libc.Uint64FromInt32(nBytes))
if (*TParse)(unsafe.Pointer(pToplevel)).FaTableLock != 0 {
- v4 = pToplevel + 120
+ v4 = pToplevel + 108
v3 = *(*int32)(unsafe.Pointer(v4))
*(*int32)(unsafe.Pointer(v4))++
p = (*TParse)(unsafe.Pointer(pToplevel)).FaTableLock + uintptr(v3)*16
@@ -95749,7 +95880,9 @@ func _sqlite3FinishCoding(tls *libc.TLS, pParse uintptr) {
}
if v != 0 {
if (*TParse)(unsafe.Pointer(pParse)).FbReturning != 0 {
- pReturning = *(*uintptr)(unsafe.Pointer(pParse + 148))
+ pReturning = (*(*struct {
+ FpReturning uintptr
+ })(unsafe.Pointer(&(*TParse)(unsafe.Pointer(pParse)).Fu1))).FpReturning
if (*TReturning)(unsafe.Pointer(pReturning)).FnRetCol != 0 {
_sqlite3VdbeAddOp0(tls, v, int32(OP_FkCheck))
addrRewind = _sqlite3VdbeAddOp1(tls, v, int32(OP_Rewind), (*TReturning)(unsafe.Pointer(pReturning)).FiRetCur)
@@ -95827,7 +95960,7 @@ func _sqlite3FinishCoding(tls *libc.TLS, pParse uintptr) {
*/
if (*TParse)(unsafe.Pointer(pParse)).FpConstExpr != 0 {
pEL = (*TParse)(unsafe.Pointer(pParse)).FpConstExpr
- (*TParse)(unsafe.Pointer(pParse)).FokConstFactor = uint8(0)
+ libc.SetBitFieldPtr8Uint32(pParse+32, libc.Uint32FromInt32(0), 2, 0x4)
i = 0
for {
if !(i < (*TExprList)(unsafe.Pointer(pEL)).FnExpr) {
@@ -95841,7 +95974,9 @@ func _sqlite3FinishCoding(tls *libc.TLS, pParse uintptr) {
}
}
if (*TParse)(unsafe.Pointer(pParse)).FbReturning != 0 {
- pRet = *(*uintptr)(unsafe.Pointer(pParse + 148))
+ pRet = (*(*struct {
+ FpReturning uintptr
+ })(unsafe.Pointer(&(*TParse)(unsafe.Pointer(pParse)).Fu1))).FpReturning
if (*TReturning)(unsafe.Pointer(pRet)).FnRetCol != 0 {
_sqlite3VdbeAddOp2(tls, v, int32(OP_OpenEphemeral), (*TReturning)(unsafe.Pointer(pRet)).FiRetCur, (*TReturning)(unsafe.Pointer(pRet)).FnRetCol)
}
@@ -95907,13 +96042,13 @@ func _sqlite3NestedParse(tls *libc.TLS, pParse uintptr, zFormat uintptr, va uint
return
}
(*TParse)(unsafe.Pointer(pParse)).Fnested++
- libc.Xmemcpy(tls, bp, pParse+uintptr(uint32(libc.UintptrFromInt32(0)+212)), libc.Uint32FromInt64(288)-uint32(libc.UintptrFromInt32(0)+212))
- libc.Xmemset(tls, pParse+uintptr(uint32(libc.UintptrFromInt32(0)+212)), 0, libc.Uint32FromInt64(288)-uint32(libc.UintptrFromInt32(0)+212))
+ libc.Xmemcpy(tls, bp, pParse+uintptr(uint32(libc.UintptrFromInt32(0)+208)), libc.Uint32FromInt64(284)-uint32(libc.UintptrFromInt32(0)+208))
+ libc.Xmemset(tls, pParse+uintptr(uint32(libc.UintptrFromInt32(0)+208)), 0, libc.Uint32FromInt64(284)-uint32(libc.UintptrFromInt32(0)+208))
*(*Tu32)(unsafe.Pointer(db + 24)) |= uint32(DBFLAG_PreferBuiltin)
_sqlite3RunParser(tls, pParse, zSql)
(*Tsqlite3)(unsafe.Pointer(db)).FmDbFlags = savedDbFlags
_sqlite3DbFree(tls, db, zSql)
- libc.Xmemcpy(tls, pParse+uintptr(uint32(libc.UintptrFromInt32(0)+212)), bp, libc.Uint32FromInt64(288)-uint32(libc.UintptrFromInt32(0)+212))
+ libc.Xmemcpy(tls, pParse+uintptr(uint32(libc.UintptrFromInt32(0)+208)), bp, libc.Uint32FromInt64(284)-uint32(libc.UintptrFromInt32(0)+208))
(*TParse)(unsafe.Pointer(pParse)).Fnested--
}
@@ -95954,21 +96089,21 @@ func _sqlite3FindTable(tls *libc.TLS, db uintptr, zName uintptr, zDatabase uintp
if i >= (*Tsqlite3)(unsafe.Pointer(db)).FnDb {
/* No match against the official names. But always match "main"
** to schema 0 as a legacy fallback. */
- if _sqlite3StrICmp(tls, zDatabase, __ccgo_ts+6715) == 0 {
+ if _sqlite3StrICmp(tls, zDatabase, __ccgo_ts+6740) == 0 {
i = 0
} else {
return uintptr(0)
}
}
p = _sqlite3HashFind(tls, (*(*TDb)(unsafe.Pointer((*Tsqlite3)(unsafe.Pointer(db)).FaDb + uintptr(i)*16))).FpSchema+8, zName)
- if p == uintptr(0) && Xsqlite3_strnicmp(tls, zName, __ccgo_ts+6655, int32(7)) == 0 {
+ if p == uintptr(0) && Xsqlite3_strnicmp(tls, zName, __ccgo_ts+6680, int32(7)) == 0 {
if i == int32(1) {
- if _sqlite3StrICmp(tls, zName+uintptr(7), __ccgo_ts+6682+7) == 0 || _sqlite3StrICmp(tls, zName+uintptr(7), __ccgo_ts+6701+7) == 0 || _sqlite3StrICmp(tls, zName+uintptr(7), __ccgo_ts+6151+7) == 0 {
- p = _sqlite3HashFind(tls, (*(*TDb)(unsafe.Pointer((*Tsqlite3)(unsafe.Pointer(db)).FaDb + 1*16))).FpSchema+8, __ccgo_ts+6663)
+ if _sqlite3StrICmp(tls, zName+uintptr(7), __ccgo_ts+6707+7) == 0 || _sqlite3StrICmp(tls, zName+uintptr(7), __ccgo_ts+6726+7) == 0 || _sqlite3StrICmp(tls, zName+uintptr(7), __ccgo_ts+6175+7) == 0 {
+ p = _sqlite3HashFind(tls, (*(*TDb)(unsafe.Pointer((*Tsqlite3)(unsafe.Pointer(db)).FaDb + 1*16))).FpSchema+8, __ccgo_ts+6688)
}
} else {
- if _sqlite3StrICmp(tls, zName+uintptr(7), __ccgo_ts+6701+7) == 0 {
- p = _sqlite3HashFind(tls, (*(*TDb)(unsafe.Pointer((*Tsqlite3)(unsafe.Pointer(db)).FaDb + uintptr(i)*16))).FpSchema+8, __ccgo_ts+6151)
+ if _sqlite3StrICmp(tls, zName+uintptr(7), __ccgo_ts+6726+7) == 0 {
+ p = _sqlite3HashFind(tls, (*(*TDb)(unsafe.Pointer((*Tsqlite3)(unsafe.Pointer(db)).FaDb + uintptr(i)*16))).FpSchema+8, __ccgo_ts+6175)
}
}
}
@@ -95998,12 +96133,12 @@ func _sqlite3FindTable(tls *libc.TLS, db uintptr, zName uintptr, zDatabase uintp
;
i++
}
- if p == uintptr(0) && Xsqlite3_strnicmp(tls, zName, __ccgo_ts+6655, int32(7)) == 0 {
- if _sqlite3StrICmp(tls, zName+uintptr(7), __ccgo_ts+6701+7) == 0 {
- p = _sqlite3HashFind(tls, (*(*TDb)(unsafe.Pointer((*Tsqlite3)(unsafe.Pointer(db)).FaDb))).FpSchema+8, __ccgo_ts+6151)
+ if p == uintptr(0) && Xsqlite3_strnicmp(tls, zName, __ccgo_ts+6680, int32(7)) == 0 {
+ if _sqlite3StrICmp(tls, zName+uintptr(7), __ccgo_ts+6726+7) == 0 {
+ p = _sqlite3HashFind(tls, (*(*TDb)(unsafe.Pointer((*Tsqlite3)(unsafe.Pointer(db)).FaDb))).FpSchema+8, __ccgo_ts+6175)
} else {
- if _sqlite3StrICmp(tls, zName+uintptr(7), __ccgo_ts+6682+7) == 0 {
- p = _sqlite3HashFind(tls, (*(*TDb)(unsafe.Pointer((*Tsqlite3)(unsafe.Pointer(db)).FaDb + 1*16))).FpSchema+8, __ccgo_ts+6663)
+ if _sqlite3StrICmp(tls, zName+uintptr(7), __ccgo_ts+6707+7) == 0 {
+ p = _sqlite3HashFind(tls, (*(*TDb)(unsafe.Pointer((*Tsqlite3)(unsafe.Pointer(db)).FaDb + 1*16))).FpSchema+8, __ccgo_ts+6688)
}
}
}
@@ -96041,7 +96176,7 @@ func _sqlite3LocateTable(tls *libc.TLS, pParse uintptr, flags Tu32, zName uintpt
** can be an eponymous virtual table. */
if libc.Int32FromUint8((*TParse)(unsafe.Pointer(pParse)).FprepFlags)&int32(SQLITE_PREPARE_NO_VTAB) == 0 && libc.Int32FromUint8((*Tsqlite3)(unsafe.Pointer(db)).Finit1.Fbusy) == 0 {
pMod = _sqlite3HashFind(tls, db+396, zName)
- if pMod == uintptr(0) && Xsqlite3_strnicmp(tls, zName, __ccgo_ts+12626, int32(7)) == 0 {
+ if pMod == uintptr(0) && Xsqlite3_strnicmp(tls, zName, __ccgo_ts+12651, int32(7)) == 0 {
pMod = _sqlite3PragmaVtabRegister(tls, db, zName)
}
if pMod != 0 && _sqlite3VtabEponymousTableInit(tls, pParse, pMod) != 0 {
@@ -96051,7 +96186,7 @@ func _sqlite3LocateTable(tls *libc.TLS, pParse uintptr, flags Tu32, zName uintpt
if flags&uint32(LOCATE_NOERR) != 0 {
return uintptr(0)
}
- (*TParse)(unsafe.Pointer(pParse)).FcheckSchema = uint8(1)
+ libc.SetBitFieldPtr8Uint32(pParse+32, libc.Uint32FromInt32(1), 3, 0x8)
} else {
if libc.Int32FromUint8((*TTable)(unsafe.Pointer(p)).FeTabType) == int32(TABTYP_VTAB) && libc.Int32FromUint8((*TParse)(unsafe.Pointer(pParse)).FprepFlags)&int32(SQLITE_PREPARE_NO_VTAB) != 0 {
p = uintptr(0)
@@ -96059,15 +96194,15 @@ func _sqlite3LocateTable(tls *libc.TLS, pParse uintptr, flags Tu32, zName uintpt
}
if p == uintptr(0) {
if flags&uint32(LOCATE_VIEW) != 0 {
- v1 = __ccgo_ts + 12634
+ v1 = __ccgo_ts + 12659
} else {
- v1 = __ccgo_ts + 12647
+ v1 = __ccgo_ts + 12672
}
zMsg = v1
if zDbase != 0 {
- _sqlite3ErrorMsg(tls, pParse, __ccgo_ts+6919, libc.VaList(bp+8, zMsg, zDbase, zName))
+ _sqlite3ErrorMsg(tls, pParse, __ccgo_ts+6944, libc.VaList(bp+8, zMsg, zDbase, zName))
} else {
- _sqlite3ErrorMsg(tls, pParse, __ccgo_ts+6990, libc.VaList(bp+8, zMsg, zName))
+ _sqlite3ErrorMsg(tls, pParse, __ccgo_ts+7015, libc.VaList(bp+8, zMsg, zName))
}
} else {
}
@@ -96105,12 +96240,12 @@ func _sqlite3LocateTableItem(tls *libc.TLS, pParse uintptr, flags Tu32, p uintpt
// ** names into the new preferred names, as appropriate.
// */
func _sqlite3PreferredTableName(tls *libc.TLS, zName uintptr) (r uintptr) {
- if Xsqlite3_strnicmp(tls, zName, __ccgo_ts+6655, int32(7)) == 0 {
- if _sqlite3StrICmp(tls, zName+uintptr(7), __ccgo_ts+6151+7) == 0 {
- return __ccgo_ts + 6701
+ if Xsqlite3_strnicmp(tls, zName, __ccgo_ts+6680, int32(7)) == 0 {
+ if _sqlite3StrICmp(tls, zName+uintptr(7), __ccgo_ts+6175+7) == 0 {
+ return __ccgo_ts + 6726
}
- if _sqlite3StrICmp(tls, zName+uintptr(7), __ccgo_ts+6663+7) == 0 {
- return __ccgo_ts + 6682
+ if _sqlite3StrICmp(tls, zName+uintptr(7), __ccgo_ts+6688+7) == 0 {
+ return __ccgo_ts + 6707
}
}
return zName
@@ -96635,7 +96770,7 @@ func _sqlite3OpenSchemaTable(tls *libc.TLS, p uintptr, iDb int32) {
var v uintptr
_ = v
v = _sqlite3GetVdbe(tls, p)
- _sqlite3TableLock(tls, p, iDb, uint32(SCHEMA_ROOT), uint8(1), __ccgo_ts+6151)
+ _sqlite3TableLock(tls, p, iDb, uint32(SCHEMA_ROOT), uint8(1), __ccgo_ts+6175)
_sqlite3VdbeAddOp4Int(tls, v, int32(OP_OpenWrite), 0, int32(SCHEMA_ROOT), iDb, int32(5))
if (*TParse)(unsafe.Pointer(p)).FnTab == 0 {
(*TParse)(unsafe.Pointer(p)).FnTab = int32(1)
@@ -96667,7 +96802,7 @@ func _sqlite3FindDbName(tls *libc.TLS, db uintptr, zName uintptr) (r int32) {
}
/* "main" is always an acceptable alias for the primary database
** even if it has been renamed using SQLITE_DBCONFIG_MAINDBNAME. */
- if i == 0 && 0 == Xsqlite3_stricmp(tls, __ccgo_ts+6715, zName) {
+ if i == 0 && 0 == Xsqlite3_stricmp(tls, __ccgo_ts+6740, zName) {
break
}
goto _1
@@ -96725,13 +96860,13 @@ func _sqlite3TwoPartName(tls *libc.TLS, pParse uintptr, pName1 uintptr, pName2 u
db = (*TParse)(unsafe.Pointer(pParse)).Fdb
if (*TToken)(unsafe.Pointer(pName2)).Fn > uint32(0) {
if (*Tsqlite3)(unsafe.Pointer(db)).Finit1.Fbusy != 0 {
- _sqlite3ErrorMsg(tls, pParse, __ccgo_ts+12661, 0)
+ _sqlite3ErrorMsg(tls, pParse, __ccgo_ts+12686, 0)
return -int32(1)
}
*(*uintptr)(unsafe.Pointer(pUnqual)) = pName2
iDb = _sqlite3FindDb(tls, db, pName1)
if iDb < 0 {
- _sqlite3ErrorMsg(tls, pParse, __ccgo_ts+12678, libc.VaList(bp+8, pName1))
+ _sqlite3ErrorMsg(tls, pParse, __ccgo_ts+12703, libc.VaList(bp+8, pName1))
return -int32(1)
}
} else {
@@ -96779,8 +96914,8 @@ func _sqlite3CheckObjectName(tls *libc.TLS, pParse uintptr, zName uintptr, zType
return int32(SQLITE_ERROR)
}
} else {
- if libc.Int32FromUint8((*TParse)(unsafe.Pointer(pParse)).Fnested) == 0 && 0 == Xsqlite3_strnicmp(tls, zName, __ccgo_ts+6655, int32(7)) || _sqlite3ReadOnlyShadowTables(tls, db) != 0 && _sqlite3ShadowTableName(tls, db, zName) != 0 {
- _sqlite3ErrorMsg(tls, pParse, __ccgo_ts+12698, libc.VaList(bp+8, zName))
+ if libc.Int32FromUint8((*TParse)(unsafe.Pointer(pParse)).Fnested) == 0 && 0 == Xsqlite3_strnicmp(tls, zName, __ccgo_ts+6680, int32(7)) || _sqlite3ReadOnlyShadowTables(tls, db) != 0 && _sqlite3ShadowTableName(tls, db, zName) != 0 {
+ _sqlite3ErrorMsg(tls, pParse, __ccgo_ts+12723, libc.VaList(bp+8, zName))
return int32(SQLITE_ERROR)
}
}
@@ -96816,23 +96951,25 @@ func _sqlite3PrimaryKeyIndex(tls *libc.TLS, pTab uintptr) (r uintptr) {
// ** find the (first) offset of that column in index pIdx. Or return -1
// ** if column iCol is not used in index pIdx.
// */
-func _sqlite3TableColumnToIndex(tls *libc.TLS, pIdx uintptr, iCol Ti16) (r Ti16) {
+func _sqlite3TableColumnToIndex(tls *libc.TLS, pIdx uintptr, iCol int32) (r int32) {
var i int32
- _ = i
+ var iCol16 Ti16
+ _, _ = i, iCol16
+ iCol16 = int16(iCol)
i = 0
for {
if !(i < libc.Int32FromUint16((*TIndex)(unsafe.Pointer(pIdx)).FnColumn)) {
break
}
- if int32(iCol) == int32(*(*Ti16)(unsafe.Pointer((*TIndex)(unsafe.Pointer(pIdx)).FaiColumn + uintptr(i)*2))) {
- return int16(i)
+ if int32(iCol16) == int32(*(*Ti16)(unsafe.Pointer((*TIndex)(unsafe.Pointer(pIdx)).FaiColumn + uintptr(i)*2))) {
+ return i
}
goto _1
_1:
;
i++
}
- return int16(-int32(1))
+ return -int32(1)
}
// C documentation
@@ -96952,7 +97089,7 @@ func _sqlite3ForceNotReadOnly(tls *libc.TLS, pParse uintptr) {
var iReg, v1 int32
var v, v2 uintptr
_, _, _, _ = iReg, v, v1, v2
- v2 = pParse + 48
+ v2 = pParse + 52
*(*int32)(unsafe.Pointer(v2))++
v1 = *(*int32)(unsafe.Pointer(v2))
iReg = v1
@@ -96995,9 +97132,9 @@ func _sqlite3StartTable(tls *libc.TLS, pParse uintptr, pName1 uintptr, pName2 ui
/* Special case: Parsing the sqlite_schema or sqlite_temp_schema schema */
iDb = libc.Int32FromUint8((*Tsqlite3)(unsafe.Pointer(db)).Finit1.FiDb)
if libc.Bool(!(libc.Int32FromInt32(OMIT_TEMPDB) != 0)) && iDb == int32(1) {
- v1 = __ccgo_ts + 6663
+ v1 = __ccgo_ts + 6688
} else {
- v1 = __ccgo_ts + 6151
+ v1 = __ccgo_ts + 6175
}
zName = _sqlite3DbStrDup(tls, db, v1)
*(*uintptr)(unsafe.Pointer(bp)) = pName1
@@ -97010,7 +97147,7 @@ func _sqlite3StartTable(tls *libc.TLS, pParse uintptr, pName1 uintptr, pName2 ui
if libc.Bool(!(libc.Int32FromInt32(OMIT_TEMPDB) != 0)) && isTemp != 0 && (*TToken)(unsafe.Pointer(pName2)).Fn > uint32(0) && iDb != int32(1) {
/* If creating a temp table, the name may not be qualified. Unless
** the database name is "temp" anyway. */
- _sqlite3ErrorMsg(tls, pParse, __ccgo_ts+12740, 0)
+ _sqlite3ErrorMsg(tls, pParse, __ccgo_ts+12765, 0)
return
}
if libc.Bool(!(libc.Int32FromInt32(OMIT_TEMPDB) != 0)) && isTemp != 0 {
@@ -97026,9 +97163,9 @@ func _sqlite3StartTable(tls *libc.TLS, pParse uintptr, pName1 uintptr, pName2 ui
return
}
if isView != 0 {
- v2 = __ccgo_ts + 10987
+ v2 = __ccgo_ts + 11012
} else {
- v2 = __ccgo_ts + 9249
+ v2 = __ccgo_ts + 9274
}
if _sqlite3CheckObjectName(tls, pParse, zName, v2, zName) != 0 {
goto begin_table_error
@@ -97038,9 +97175,9 @@ func _sqlite3StartTable(tls *libc.TLS, pParse uintptr, pName1 uintptr, pName2 ui
}
zDb = (*(*TDb)(unsafe.Pointer((*Tsqlite3)(unsafe.Pointer(db)).FaDb + uintptr(iDb)*16))).FzDbSName
if libc.Bool(!(libc.Int32FromInt32(OMIT_TEMPDB) != 0)) && isTemp == int32(1) {
- v3 = __ccgo_ts + 6663
+ v3 = __ccgo_ts + 6688
} else {
- v3 = __ccgo_ts + 6151
+ v3 = __ccgo_ts + 6175
}
if _sqlite3AuthCheck(tls, pParse, int32(SQLITE_INSERT), v3, uintptr(0), zDb) != 0 {
goto begin_table_error
@@ -97064,11 +97201,11 @@ func _sqlite3StartTable(tls *libc.TLS, pParse uintptr, pName1 uintptr, pName2 ui
if pTable != 0 {
if !(noErr != 0) {
if libc.Int32FromUint8((*TTable)(unsafe.Pointer(pTable)).FeTabType) == int32(TABTYP_VIEW) {
- v4 = __ccgo_ts + 10987
+ v4 = __ccgo_ts + 11012
} else {
- v4 = __ccgo_ts + 9249
+ v4 = __ccgo_ts + 9274
}
- _sqlite3ErrorMsg(tls, pParse, __ccgo_ts+12781, libc.VaList(bp+16, v4, *(*uintptr)(unsafe.Pointer(bp))))
+ _sqlite3ErrorMsg(tls, pParse, __ccgo_ts+12806, libc.VaList(bp+16, v4, *(*uintptr)(unsafe.Pointer(bp))))
} else {
_sqlite3CodeVerifySchema(tls, pParse, iDb)
_sqlite3ForceNotReadOnly(tls, pParse)
@@ -97076,11 +97213,11 @@ func _sqlite3StartTable(tls *libc.TLS, pParse uintptr, pName1 uintptr, pName2 ui
goto begin_table_error
}
if _sqlite3FindIndex(tls, db, zName, zDb1) != uintptr(0) {
- _sqlite3ErrorMsg(tls, pParse, __ccgo_ts+12802, libc.VaList(bp+16, zName))
+ _sqlite3ErrorMsg(tls, pParse, __ccgo_ts+12827, libc.VaList(bp+16, zName))
goto begin_table_error
}
}
- pTable = _sqlite3DbMallocZero(tls, db, uint64(64))
+ pTable = _sqlite3DbMallocZero(tls, db, uint64(80))
if pTable == uintptr(0) {
(*TParse)(unsafe.Pointer(pParse)).Frc = int32(SQLITE_NOMEM)
(*TParse)(unsafe.Pointer(pParse)).FnErr++
@@ -97112,19 +97249,29 @@ func _sqlite3StartTable(tls *libc.TLS, pParse uintptr, pName1 uintptr, pName2 ui
/* If the file format and encoding in the database have not been set,
** set them now.
*/
- v9 = pParse + 48
+ v9 = pParse + 52
*(*int32)(unsafe.Pointer(v9))++
v8 = *(*int32)(unsafe.Pointer(v9))
v7 = v8
- (*TParse)(unsafe.Pointer(pParse)).FregRowid = v7
+ (*(*struct {
+ FaddrCrTab int32
+ FregRowid int32
+ FregRoot int32
+ FconstraintName TToken
+ })(unsafe.Pointer(pParse + 188))).FregRowid = v7
reg1 = v7
- v12 = pParse + 48
+ v12 = pParse + 52
*(*int32)(unsafe.Pointer(v12))++
v11 = *(*int32)(unsafe.Pointer(v12))
v10 = v11
- (*TParse)(unsafe.Pointer(pParse)).FregRoot = v10
+ (*(*struct {
+ FaddrCrTab int32
+ FregRowid int32
+ FregRoot int32
+ FconstraintName TToken
+ })(unsafe.Pointer(pParse + 188))).FregRoot = v10
reg2 = v10
- v14 = pParse + 48
+ v14 = pParse + 52
*(*int32)(unsafe.Pointer(v14))++
v13 = *(*int32)(unsafe.Pointer(v14))
reg3 = v13
@@ -97144,15 +97291,20 @@ func _sqlite3StartTable(tls *libc.TLS, pParse uintptr, pName1 uintptr, pName2 ui
** The record created does not contain anything yet. It will be replaced
** by the real entry in code generated at sqlite3EndTable().
**
- ** The rowid for the new entry is left in register pParse->regRowid.
- ** The root page number of the new table is left in reg pParse->regRoot.
+ ** The rowid for the new entry is left in register pParse->u1.cr.regRowid.
+ ** The root page of the new table is left in reg pParse->u1.cr.regRoot.
** The rowid and root page number values are needed by the code that
** sqlite3EndTable will generate.
*/
if isView != 0 || isVirtual != 0 {
_sqlite3VdbeAddOp2(tls, v, int32(OP_Integer), 0, reg2)
} else {
- *(*int32)(unsafe.Pointer(pParse + 148)) = _sqlite3VdbeAddOp3(tls, v, int32(OP_CreateBtree), iDb, reg2, int32(BTREE_INTKEY))
+ (*(*struct {
+ FaddrCrTab int32
+ FregRowid int32
+ FregRoot int32
+ FconstraintName TToken
+ })(unsafe.Pointer(pParse + 188))).FaddrCrTab = _sqlite3VdbeAddOp3(tls, v, int32(OP_CreateBtree), iDb, reg2, int32(BTREE_INTKEY))
}
_sqlite3OpenSchemaTable(tls, pParse, iDb)
_sqlite3VdbeAddOp2(tls, v, int32(OP_NewRowid), 0, reg1)
@@ -97167,7 +97319,7 @@ func _sqlite3StartTable(tls *libc.TLS, pParse uintptr, pName1 uintptr, pName2 ui
goto begin_table_error
begin_table_error:
;
- (*TParse)(unsafe.Pointer(pParse)).FcheckSchema = uint8(1)
+ libc.SetBitFieldPtr8Uint32(pParse+32, libc.Uint32FromInt32(1), 3, 0x8)
_sqlite3DbFree(tls, db, zName)
return
}
@@ -97228,7 +97380,7 @@ func _sqlite3AddReturning(tls *libc.TLS, pParse uintptr, pList uintptr) {
_, _, _ = db, pHash, pRet
db = (*TParse)(unsafe.Pointer(pParse)).Fdb
if (*TParse)(unsafe.Pointer(pParse)).FpNewTrigger != 0 {
- _sqlite3ErrorMsg(tls, pParse, __ccgo_ts+12837, 0)
+ _sqlite3ErrorMsg(tls, pParse, __ccgo_ts+12862, 0)
} else {
}
(*TParse)(unsafe.Pointer(pParse)).FbReturning = uint8(1)
@@ -97237,14 +97389,16 @@ func _sqlite3AddReturning(tls *libc.TLS, pParse uintptr, pList uintptr) {
_sqlite3ExprListDelete(tls, db, pList)
return
}
- *(*uintptr)(unsafe.Pointer(pParse + 148)) = pRet
+ (*(*struct {
+ FpReturning uintptr
+ })(unsafe.Pointer(&(*TParse)(unsafe.Pointer(pParse)).Fu1))).FpReturning = pRet
(*TReturning)(unsafe.Pointer(pRet)).FpParse = pParse
(*TReturning)(unsafe.Pointer(pRet)).FpReturnEL = pList
_sqlite3ParserAddCleanup(tls, pParse, __ccgo_fp(_sqlite3DeleteReturning), pRet)
if (*Tsqlite3)(unsafe.Pointer(db)).FmallocFailed != 0 {
return
}
- Xsqlite3_snprintf(tls, int32(40), pRet+104, __ccgo_ts+12871, libc.VaList(bp+8, pParse))
+ Xsqlite3_snprintf(tls, int32(40), pRet+104, __ccgo_ts+12896, libc.VaList(bp+8, pParse))
(*TReturning)(unsafe.Pointer(pRet)).FretTrig.FzName = pRet + 104
(*TReturning)(unsafe.Pointer(pRet)).FretTrig.Fop = uint8(TK_RETURNING)
(*TReturning)(unsafe.Pointer(pRet)).FretTrig.Ftr_tm = uint8(TRIGGER_AFTER)
@@ -97276,11 +97430,11 @@ func _sqlite3AddColumn(tls *libc.TLS, pParse uintptr, _sName TToken, _sType TTok
defer tls.Free(32)
*(*TToken)(unsafe.Pointer(bp)) = _sName
*(*TToken)(unsafe.Pointer(bp + 8)) = _sType
- var aNew, db, p, pCol, z, zType, v1, p4 uintptr
+ var aNew, db, p, pCol, z, zType, v1, p3 uintptr
var affinity int8
- var eType, hName, szEst Tu8
+ var eType, h, szEst Tu8
var i int32
- _, _, _, _, _, _, _, _, _, _, _, _, _ = aNew, affinity, db, eType, hName, i, p, pCol, szEst, z, zType, v1, p4
+ _, _, _, _, _, _, _, _, _, _, _, _, _ = aNew, affinity, db, eType, h, i, p, pCol, szEst, z, zType, v1, p3
db = (*TParse)(unsafe.Pointer(pParse)).Fdb
eType = uint8(COLTYPE_CUSTOM)
szEst = uint8(1)
@@ -97291,7 +97445,7 @@ func _sqlite3AddColumn(tls *libc.TLS, pParse uintptr, _sName TToken, _sType TTok
return
}
if int32((*TTable)(unsafe.Pointer(p)).FnCol)+int32(1) > *(*int32)(unsafe.Pointer(db + 116 + 2*4)) {
- _sqlite3ErrorMsg(tls, pParse, __ccgo_ts+12891, libc.VaList(bp+24, (*TTable)(unsafe.Pointer(p)).FzName))
+ _sqlite3ErrorMsg(tls, pParse, __ccgo_ts+12916, libc.VaList(bp+24, (*TTable)(unsafe.Pointer(p)).FzName))
return
}
if !(libc.Int32FromUint8((*TParse)(unsafe.Pointer(pParse)).FeParseMode) >= libc.Int32FromInt32(PARSE_MODE_RENAME)) {
@@ -97301,12 +97455,12 @@ func _sqlite3AddColumn(tls *libc.TLS, pParse uintptr, _sName TToken, _sType TTok
** by the parser, we can sometimes end up with a typename that ends
** with "generated always". Check for this case and omit the surplus
** text. */
- if (*(*TToken)(unsafe.Pointer(bp + 8))).Fn >= uint32(16) && Xsqlite3_strnicmp(tls, (*(*TToken)(unsafe.Pointer(bp + 8))).Fz+uintptr((*(*TToken)(unsafe.Pointer(bp + 8))).Fn-libc.Uint32FromInt32(6)), __ccgo_ts+12914, int32(6)) == 0 {
+ if (*(*TToken)(unsafe.Pointer(bp + 8))).Fn >= uint32(16) && Xsqlite3_strnicmp(tls, (*(*TToken)(unsafe.Pointer(bp + 8))).Fz+uintptr((*(*TToken)(unsafe.Pointer(bp + 8))).Fn-libc.Uint32FromInt32(6)), __ccgo_ts+12939, int32(6)) == 0 {
(*(*TToken)(unsafe.Pointer(bp + 8))).Fn -= uint32(6)
for (*(*TToken)(unsafe.Pointer(bp + 8))).Fn > uint32(0) && libc.Int32FromUint8(_sqlite3CtypeMap[libc.Uint8FromInt8(*(*int8)(unsafe.Pointer((*(*TToken)(unsafe.Pointer(bp + 8))).Fz + uintptr((*(*TToken)(unsafe.Pointer(bp + 8))).Fn-uint32(1)))))])&int32(0x01) != 0 {
(*(*TToken)(unsafe.Pointer(bp + 8))).Fn--
}
- if (*(*TToken)(unsafe.Pointer(bp + 8))).Fn >= uint32(9) && Xsqlite3_strnicmp(tls, (*(*TToken)(unsafe.Pointer(bp + 8))).Fz+uintptr((*(*TToken)(unsafe.Pointer(bp + 8))).Fn-libc.Uint32FromInt32(9)), __ccgo_ts+12921, int32(9)) == 0 {
+ if (*(*TToken)(unsafe.Pointer(bp + 8))).Fn >= uint32(9) && Xsqlite3_strnicmp(tls, (*(*TToken)(unsafe.Pointer(bp + 8))).Fz+uintptr((*(*TToken)(unsafe.Pointer(bp + 8))).Fn-libc.Uint32FromInt32(9)), __ccgo_ts+12946, int32(9)) == 0 {
(*(*TToken)(unsafe.Pointer(bp + 8))).Fn -= uint32(9)
for (*(*TToken)(unsafe.Pointer(bp + 8))).Fn > uint32(0) && libc.Int32FromUint8(_sqlite3CtypeMap[libc.Uint8FromInt8(*(*int8)(unsafe.Pointer((*(*TToken)(unsafe.Pointer(bp + 8))).Fz + uintptr((*(*TToken)(unsafe.Pointer(bp + 8))).Fn-uint32(1)))))])&int32(0x01) != 0 {
(*(*TToken)(unsafe.Pointer(bp + 8))).Fn--
@@ -97348,21 +97502,10 @@ func _sqlite3AddColumn(tls *libc.TLS, pParse uintptr, _sName TToken, _sType TTok
libc.Xmemcpy(tls, z, (*(*TToken)(unsafe.Pointer(bp))).Fz, (*(*TToken)(unsafe.Pointer(bp))).Fn)
*(*int8)(unsafe.Pointer(z + uintptr((*(*TToken)(unsafe.Pointer(bp))).Fn))) = 0
_sqlite3Dequote(tls, z)
- hName = _sqlite3StrIHash(tls, z)
- i = 0
- for {
- if !(i < int32((*TTable)(unsafe.Pointer(p)).FnCol)) {
- break
- }
- if libc.Int32FromUint8((*(*TColumn)(unsafe.Pointer((*TTable)(unsafe.Pointer(p)).FaCol + uintptr(i)*12))).FhName) == libc.Int32FromUint8(hName) && _sqlite3StrICmp(tls, z, (*(*TColumn)(unsafe.Pointer((*TTable)(unsafe.Pointer(p)).FaCol + uintptr(i)*12))).FzCnName) == 0 {
- _sqlite3ErrorMsg(tls, pParse, __ccgo_ts+12931, libc.VaList(bp+24, z))
- _sqlite3DbFree(tls, db, z)
- return
- }
- goto _3
- _3:
- ;
- i++
+ if (*TTable)(unsafe.Pointer(p)).FnCol != 0 && _sqlite3ColumnIndex(tls, p, z) >= 0 {
+ _sqlite3ErrorMsg(tls, pParse, __ccgo_ts+12956, libc.VaList(bp+24, z))
+ _sqlite3DbFree(tls, db, z)
+ return
}
aNew = _sqlite3DbRealloc(tls, db, (*TTable)(unsafe.Pointer(p)).FaCol, libc.Uint64FromInt64((int64((*TTable)(unsafe.Pointer(p)).FnCol)+int64(1))*int64(12)))
if aNew == uintptr(0) {
@@ -97373,7 +97516,7 @@ func _sqlite3AddColumn(tls *libc.TLS, pParse uintptr, _sName TToken, _sType TTok
pCol = (*TTable)(unsafe.Pointer(p)).FaCol + uintptr((*TTable)(unsafe.Pointer(p)).FnCol)*12
libc.Xmemset(tls, pCol, 0, uint32(12))
(*TColumn)(unsafe.Pointer(pCol)).FzCnName = z
- (*TColumn)(unsafe.Pointer(pCol)).FhName = hName
+ (*TColumn)(unsafe.Pointer(pCol)).FhName = _sqlite3StrIHash(tls, z)
if (*(*TToken)(unsafe.Pointer(bp + 8))).Fn == uint32(0) {
/* If there is no type specified, columns have the default affinity
** 'BLOB' with a default size of 4 bytes. */
@@ -97386,12 +97529,21 @@ func _sqlite3AddColumn(tls *libc.TLS, pParse uintptr, _sName TToken, _sType TTok
*(*int8)(unsafe.Pointer(zType + uintptr((*(*TToken)(unsafe.Pointer(bp + 8))).Fn))) = 0
_sqlite3Dequote(tls, zType)
(*TColumn)(unsafe.Pointer(pCol)).Faffinity = _sqlite3AffinityType(tls, zType, pCol)
- p4 = pCol + 10
- *(*Tu16)(unsafe.Pointer(p4)) = Tu16(int32(*(*Tu16)(unsafe.Pointer(p4))) | libc.Int32FromInt32(COLFLAG_HASTYPE))
+ p3 = pCol + 10
+ *(*Tu16)(unsafe.Pointer(p3)) = Tu16(int32(*(*Tu16)(unsafe.Pointer(p3))) | libc.Int32FromInt32(COLFLAG_HASTYPE))
+ }
+ if int32((*TTable)(unsafe.Pointer(p)).FnCol) <= int32(0xff) {
+ h = uint8(uint32((*TColumn)(unsafe.Pointer(pCol)).FhName) % uint32(16))
+ *(*Tu8)(unsafe.Pointer(p + 64 + uintptr(h))) = libc.Uint8FromInt16((*TTable)(unsafe.Pointer(p)).FnCol)
}
(*TTable)(unsafe.Pointer(p)).FnCol++
(*TTable)(unsafe.Pointer(p)).FnNVCol++
- (*TParse)(unsafe.Pointer(pParse)).FconstraintName.Fn = uint32(0)
+ (*(*struct {
+ FaddrCrTab int32
+ FregRowid int32
+ FregRoot int32
+ FconstraintName TToken
+ })(unsafe.Pointer(pParse + 188))).FconstraintName.Fn = uint32(0)
}
// C documentation
@@ -97563,10 +97715,10 @@ func _sqlite3AddDefaultValue(tls *libc.TLS, pParse uintptr, pExpr uintptr, zStar
isInit = libc.BoolInt32((*Tsqlite3)(unsafe.Pointer(db)).Finit1.Fbusy != 0 && libc.Int32FromUint8((*Tsqlite3)(unsafe.Pointer(db)).Finit1.FiDb) != int32(1))
pCol = (*TTable)(unsafe.Pointer(p)).FaCol + uintptr(int32((*TTable)(unsafe.Pointer(p)).FnCol)-int32(1))*12
if !(_sqlite3ExprIsConstantOrFunction(tls, pExpr, libc.Uint8FromInt32(isInit)) != 0) {
- _sqlite3ErrorMsg(tls, pParse, __ccgo_ts+12957, libc.VaList(bp+64, (*TColumn)(unsafe.Pointer(pCol)).FzCnName))
+ _sqlite3ErrorMsg(tls, pParse, __ccgo_ts+12982, libc.VaList(bp+64, (*TColumn)(unsafe.Pointer(pCol)).FzCnName))
} else {
if libc.Int32FromUint16((*TColumn)(unsafe.Pointer(pCol)).FcolFlags)&int32(COLFLAG_GENERATED) != 0 {
- _sqlite3ErrorMsg(tls, pParse, __ccgo_ts+13002, 0)
+ _sqlite3ErrorMsg(tls, pParse, __ccgo_ts+13027, 0)
} else {
libc.Xmemset(tls, bp, 0, uint32(52))
(*(*TExpr)(unsafe.Pointer(bp))).Fop = uint8(TK_SPAN)
@@ -97624,7 +97776,7 @@ func _makeColumnPartOfPrimaryKey(tls *libc.TLS, pParse uintptr, pCol uintptr) {
p1 = pCol + 10
*(*Tu16)(unsafe.Pointer(p1)) = Tu16(int32(*(*Tu16)(unsafe.Pointer(p1))) | libc.Int32FromInt32(COLFLAG_PRIMKEY))
if libc.Int32FromUint16((*TColumn)(unsafe.Pointer(pCol)).FcolFlags)&int32(COLFLAG_GENERATED) != 0 {
- _sqlite3ErrorMsg(tls, pParse, __ccgo_ts+13043, 0)
+ _sqlite3ErrorMsg(tls, pParse, __ccgo_ts+13068, 0)
}
}
@@ -97652,8 +97804,8 @@ func _sqlite3AddPrimaryKey(tls *libc.TLS, pParse uintptr, pList uintptr, onError
bp := tls.Alloc(16)
defer tls.Free(16)
var i, iCol, nTerm int32
- var pCExpr, pCExpr1, pCol, pTab, zCName uintptr
- _, _, _, _, _, _, _, _ = i, iCol, nTerm, pCExpr, pCExpr1, pCol, pTab, zCName
+ var pCExpr, pCExpr1, pCol, pTab uintptr
+ _, _, _, _, _, _, _ = i, iCol, nTerm, pCExpr, pCExpr1, pCol, pTab
pTab = (*TParse)(unsafe.Pointer(pParse)).FpNewTable
pCol = uintptr(0)
iCol = -int32(1)
@@ -97661,7 +97813,7 @@ func _sqlite3AddPrimaryKey(tls *libc.TLS, pParse uintptr, pList uintptr, onError
goto primary_key_exit
}
if (*TTable)(unsafe.Pointer(pTab)).FtabFlags&uint32(TF_HasPrimaryKey) != 0 {
- _sqlite3ErrorMsg(tls, pParse, __ccgo_ts+13095, libc.VaList(bp+8, (*TTable)(unsafe.Pointer(pTab)).FzName))
+ _sqlite3ErrorMsg(tls, pParse, __ccgo_ts+13120, libc.VaList(bp+8, (*TTable)(unsafe.Pointer(pTab)).FzName))
goto primary_key_exit
}
*(*Tu32)(unsafe.Pointer(pTab + 28)) |= uint32(TF_HasPrimaryKey)
@@ -97680,21 +97832,10 @@ func _sqlite3AddPrimaryKey(tls *libc.TLS, pParse uintptr, pList uintptr, onError
pCExpr = _sqlite3ExprSkipCollate(tls, (*(*TExprList_item)(unsafe.Pointer(pList + 8 + uintptr(i)*20))).FpExpr)
_sqlite3StringToId(tls, pCExpr)
if libc.Int32FromUint8((*TExpr)(unsafe.Pointer(pCExpr)).Fop) == int32(TK_ID) {
- zCName = *(*uintptr)(unsafe.Pointer(pCExpr + 8))
- iCol = 0
- for {
- if !(iCol < int32((*TTable)(unsafe.Pointer(pTab)).FnCol)) {
- break
- }
- if _sqlite3StrICmp(tls, zCName, (*(*TColumn)(unsafe.Pointer((*TTable)(unsafe.Pointer(pTab)).FaCol + uintptr(iCol)*12))).FzCnName) == 0 {
- pCol = (*TTable)(unsafe.Pointer(pTab)).FaCol + uintptr(iCol)*12
- _makeColumnPartOfPrimaryKey(tls, pParse, pCol)
- break
- }
- goto _2
- _2:
- ;
- iCol++
+ iCol = _sqlite3ColumnIndex(tls, pTab, *(*uintptr)(unsafe.Pointer(pCExpr + 8)))
+ if iCol >= 0 {
+ pCol = (*TTable)(unsafe.Pointer(pTab)).FaCol + uintptr(iCol)*12
+ _makeColumnPartOfPrimaryKey(tls, pParse, pCol)
}
}
goto _1
@@ -97717,7 +97858,7 @@ func _sqlite3AddPrimaryKey(tls *libc.TLS, pParse uintptr, pList uintptr, onError
_sqlite3HasExplicitNulls(tls, pParse, pList)
} else {
if autoInc != 0 {
- _sqlite3ErrorMsg(tls, pParse, __ccgo_ts+13136, 0)
+ _sqlite3ErrorMsg(tls, pParse, __ccgo_ts+13161, 0)
} else {
_sqlite3CreateIndex(tls, pParse, uintptr(0), uintptr(0), uintptr(0), pList, onError, uintptr(0), uintptr(0), sortOrder, 0, uint8(SQLITE_IDXTYPE_PRIMARYKEY))
pList = uintptr(0)
@@ -97745,8 +97886,13 @@ func _sqlite3AddCheckConstraint(tls *libc.TLS, pParse uintptr, pCheckExpr uintpt
db = (*TParse)(unsafe.Pointer(pParse)).Fdb
if pTab != 0 && !(libc.Int32FromUint8((*TParse)(unsafe.Pointer(pParse)).FeParseMode) == libc.Int32FromInt32(PARSE_MODE_DECLARE_VTAB)) && !(_sqlite3BtreeIsReadonly(tls, (*(*TDb)(unsafe.Pointer((*Tsqlite3)(unsafe.Pointer(db)).FaDb + uintptr((*Tsqlite3)(unsafe.Pointer(db)).Finit1.FiDb)*16))).FpBt) != 0) {
(*TTable)(unsafe.Pointer(pTab)).FpCheck = _sqlite3ExprListAppend(tls, pParse, (*TTable)(unsafe.Pointer(pTab)).FpCheck, pCheckExpr)
- if (*TParse)(unsafe.Pointer(pParse)).FconstraintName.Fn != 0 {
- _sqlite3ExprListSetName(tls, pParse, (*TTable)(unsafe.Pointer(pTab)).FpCheck, pParse+84, int32(1))
+ if (*(*struct {
+ FaddrCrTab int32
+ FregRowid int32
+ FregRoot int32
+ FconstraintName TToken
+ })(unsafe.Pointer(pParse + 188))).FconstraintName.Fn != 0 {
+ _sqlite3ExprListSetName(tls, pParse, (*TTable)(unsafe.Pointer(pTab)).FpCheck, pParse+188+12, int32(1))
} else {
zStart++
for {
@@ -97833,17 +97979,17 @@ func _sqlite3AddGenerated(tls *libc.TLS, pParse uintptr, pExpr uintptr, pType ui
}
pCol = (*TTable)(unsafe.Pointer(pTab)).FaCol + uintptr(int32((*TTable)(unsafe.Pointer(pTab)).FnCol)-int32(1))*12
if libc.Int32FromUint8((*TParse)(unsafe.Pointer(pParse)).FeParseMode) == int32(PARSE_MODE_DECLARE_VTAB) {
- _sqlite3ErrorMsg(tls, pParse, __ccgo_ts+13192, 0)
+ _sqlite3ErrorMsg(tls, pParse, __ccgo_ts+13217, 0)
goto generated_done
}
if libc.Int32FromUint16((*TColumn)(unsafe.Pointer(pCol)).FiDflt) > 0 {
goto generated_error
}
if pType != 0 {
- if (*TToken)(unsafe.Pointer(pType)).Fn == uint32(7) && Xsqlite3_strnicmp(tls, __ccgo_ts+13235, (*TToken)(unsafe.Pointer(pType)).Fz, int32(7)) == 0 {
+ if (*TToken)(unsafe.Pointer(pType)).Fn == uint32(7) && Xsqlite3_strnicmp(tls, __ccgo_ts+13260, (*TToken)(unsafe.Pointer(pType)).Fz, int32(7)) == 0 {
/* no-op */
} else {
- if (*TToken)(unsafe.Pointer(pType)).Fn == uint32(6) && Xsqlite3_strnicmp(tls, __ccgo_ts+13243, (*TToken)(unsafe.Pointer(pType)).Fz, int32(6)) == 0 {
+ if (*TToken)(unsafe.Pointer(pType)).Fn == uint32(6) && Xsqlite3_strnicmp(tls, __ccgo_ts+13268, (*TToken)(unsafe.Pointer(pType)).Fz, int32(6)) == 0 {
eType = uint8(COLFLAG_STORED)
} else {
goto generated_error
@@ -97875,7 +98021,7 @@ func _sqlite3AddGenerated(tls *libc.TLS, pParse uintptr, pExpr uintptr, pType ui
goto generated_error
generated_error:
;
- _sqlite3ErrorMsg(tls, pParse, __ccgo_ts+13250, libc.VaList(bp+8, (*TColumn)(unsafe.Pointer(pCol)).FzCnName))
+ _sqlite3ErrorMsg(tls, pParse, __ccgo_ts+13275, libc.VaList(bp+8, (*TColumn)(unsafe.Pointer(pCol)).FzCnName))
goto generated_done
generated_done:
;
@@ -98016,9 +98162,10 @@ func _identPut(tls *libc.TLS, z uintptr, pIdx uintptr, zSignedIdent uintptr) {
// ** from sqliteMalloc() and must be freed by the calling function.
// */
func _createTableStmt(tls *libc.TLS, db uintptr, p uintptr) (r uintptr) {
- bp := tls.Alloc(32)
- defer tls.Free(32)
- var i, len1, n, v2 int32
+ bp := tls.Alloc(16)
+ defer tls.Free(16)
+ var i, len1, v2 int32
+ var n Ti64
var pCol, zEnd, zSep, zSep2, zStmt, zType uintptr
var _ /* k at bp+0 */ int32
_, _, _, _, _, _, _, _, _, _ = i, len1, n, pCol, zEnd, zSep, zSep2, zStmt, zType, v2
@@ -98029,31 +98176,31 @@ func _createTableStmt(tls *libc.TLS, db uintptr, p uintptr) (r uintptr) {
if !(i < int32((*TTable)(unsafe.Pointer(p)).FnCol)) {
break
}
- n += _identLength(tls, (*TColumn)(unsafe.Pointer(pCol)).FzCnName) + int32(5)
+ n += int64(_identLength(tls, (*TColumn)(unsafe.Pointer(pCol)).FzCnName) + int32(5))
goto _1
_1:
;
i++
pCol += 12
}
- n += _identLength(tls, (*TTable)(unsafe.Pointer(p)).FzName)
- if n < int32(50) {
+ n += int64(_identLength(tls, (*TTable)(unsafe.Pointer(p)).FzName))
+ if n < int64(50) {
zSep = __ccgo_ts + 1667
- zSep2 = __ccgo_ts + 13281
- zEnd = __ccgo_ts + 5175
+ zSep2 = __ccgo_ts + 13306
+ zEnd = __ccgo_ts + 5201
} else {
- zSep = __ccgo_ts + 13283
- zSep2 = __ccgo_ts + 13287
- zEnd = __ccgo_ts + 13292
+ zSep = __ccgo_ts + 13308
+ zSep2 = __ccgo_ts + 13312
+ zEnd = __ccgo_ts + 13317
}
- n += int32(35) + int32(6)*int32((*TTable)(unsafe.Pointer(p)).FnCol)
- zStmt = _sqlite3DbMallocRaw(tls, uintptr(0), libc.Uint64FromInt32(n))
+ n += int64(int32(35) + int32(6)*int32((*TTable)(unsafe.Pointer(p)).FnCol))
+ zStmt = _sqlite3DbMallocRaw(tls, uintptr(0), libc.Uint64FromInt64(n))
if zStmt == uintptr(0) {
_sqlite3OomFault(tls, db)
return uintptr(0)
}
- Xsqlite3_snprintf(tls, n, zStmt, __ccgo_ts+13295, 0)
- *(*int32)(unsafe.Pointer(bp)) = _sqlite3Strlen30(tls, zStmt)
+ libc.Xmemcpy(tls, zStmt, __ccgo_ts+13320, uint32(13))
+ *(*int32)(unsafe.Pointer(bp)) = int32(13)
_identPut(tls, zStmt, bp, (*TTable)(unsafe.Pointer(p)).FzName)
v2 = *(*int32)(unsafe.Pointer(bp))
*(*int32)(unsafe.Pointer(bp))++
@@ -98064,8 +98211,9 @@ func _createTableStmt(tls *libc.TLS, db uintptr, p uintptr) (r uintptr) {
if !(i < int32((*TTable)(unsafe.Pointer(p)).FnCol)) {
break
}
- Xsqlite3_snprintf(tls, n-*(*int32)(unsafe.Pointer(bp)), zStmt+uintptr(*(*int32)(unsafe.Pointer(bp))), zSep, 0)
- *(*int32)(unsafe.Pointer(bp)) += _sqlite3Strlen30(tls, zStmt+uintptr(*(*int32)(unsafe.Pointer(bp))))
+ len1 = _sqlite3Strlen30(tls, zSep)
+ libc.Xmemcpy(tls, zStmt+uintptr(*(*int32)(unsafe.Pointer(bp))), zSep, libc.Uint32FromInt32(len1))
+ *(*int32)(unsafe.Pointer(bp)) += len1
zSep = zSep2
_identPut(tls, zStmt, bp, (*TColumn)(unsafe.Pointer(pCol)).FzCnName)
zType = _azType1[int32((*TColumn)(unsafe.Pointer(pCol)).Faffinity)-int32(SQLITE_AFF_BLOB)]
@@ -98078,17 +98226,18 @@ func _createTableStmt(tls *libc.TLS, db uintptr, p uintptr) (r uintptr) {
i++
pCol += 12
}
- Xsqlite3_snprintf(tls, n-*(*int32)(unsafe.Pointer(bp)), zStmt+uintptr(*(*int32)(unsafe.Pointer(bp))), __ccgo_ts+3864, libc.VaList(bp+16, zEnd))
+ len1 = _sqlite3Strlen30(tls, zEnd)
+ libc.Xmemcpy(tls, zStmt+uintptr(*(*int32)(unsafe.Pointer(bp))), zEnd, libc.Uint32FromInt32(len1+int32(1)))
return zStmt
}
var _azType1 = [6]uintptr{
0: __ccgo_ts + 1667,
- 1: __ccgo_ts + 13309,
- 2: __ccgo_ts + 13315,
- 3: __ccgo_ts + 13320,
- 4: __ccgo_ts + 13325,
- 5: __ccgo_ts + 13315,
+ 1: __ccgo_ts + 13334,
+ 2: __ccgo_ts + 13340,
+ 3: __ccgo_ts + 13345,
+ 4: __ccgo_ts + 13350,
+ 5: __ccgo_ts + 13340,
}
// C documentation
@@ -98097,15 +98246,16 @@ var _azType1 = [6]uintptr{
// ** Resize an Index object to hold N columns total. Return SQLITE_OK
// ** on success and SQLITE_NOMEM on an OOM error.
// */
-func _resizeIndexObject(tls *libc.TLS, db uintptr, pIdx uintptr, N int32) (r int32) {
- var nByte int32
- var zExtra uintptr
- _, _ = nByte, zExtra
+func _resizeIndexObject(tls *libc.TLS, pParse uintptr, pIdx uintptr, N int32) (r int32) {
+ var db, zExtra uintptr
+ var nByte Tu64
+ _, _, _ = db, nByte, zExtra
if libc.Int32FromUint16((*TIndex)(unsafe.Pointer(pIdx)).FnColumn) >= N {
return SQLITE_OK
}
- nByte = libc.Int32FromUint32((libc.Uint32FromInt64(4) + libc.Uint32FromInt64(2) + libc.Uint32FromInt64(2) + libc.Uint32FromInt32(1)) * libc.Uint32FromInt32(N))
- zExtra = _sqlite3DbMallocZero(tls, db, libc.Uint64FromInt32(nByte))
+ db = (*TParse)(unsafe.Pointer(pParse)).Fdb
+ nByte = uint64(libc.Uint32FromInt64(4)+libc.Uint32FromInt64(2)+libc.Uint32FromInt64(2)+libc.Uint32FromInt32(1)) * libc.Uint64FromInt32(N)
+ zExtra = _sqlite3DbMallocZero(tls, db, nByte)
if zExtra == uintptr(0) {
return int32(SQLITE_NOMEM)
}
@@ -98120,7 +98270,7 @@ func _resizeIndexObject(tls *libc.TLS, db uintptr, pIdx uintptr, N int32) (r int
zExtra += uintptr(uint32(2) * libc.Uint32FromInt32(N))
libc.Xmemcpy(tls, zExtra, (*TIndex)(unsafe.Pointer(pIdx)).FaSortOrder, uint32((*TIndex)(unsafe.Pointer(pIdx)).FnColumn))
(*TIndex)(unsafe.Pointer(pIdx)).FaSortOrder = zExtra
- (*TIndex)(unsafe.Pointer(pIdx)).FnColumn = libc.Uint16FromInt32(N)
+ (*TIndex)(unsafe.Pointer(pIdx)).FnColumn = libc.Uint16FromInt32(N) /* See tag-20250221-1 above for proof of safety */
libc.SetBitFieldPtr16Uint32(pIdx+56, libc.Uint32FromInt32(1), 4, 0x10)
return SQLITE_OK
}
@@ -98353,8 +98503,18 @@ func _convertToWithoutRowidTable(tls *libc.TLS, pParse uintptr, pTab uintptr) {
/* Convert the P3 operand of the OP_CreateBtree opcode from BTREE_INTKEY
** into BTREE_BLOBKEY.
*/
- if *(*int32)(unsafe.Pointer(pParse + 148)) != 0 {
- _sqlite3VdbeChangeP3(tls, v, *(*int32)(unsafe.Pointer(pParse + 148)), int32(BTREE_BLOBKEY))
+ if (*(*struct {
+ FaddrCrTab int32
+ FregRowid int32
+ FregRoot int32
+ FconstraintName TToken
+ })(unsafe.Pointer(pParse + 188))).FaddrCrTab != 0 {
+ _sqlite3VdbeChangeP3(tls, v, (*(*struct {
+ FaddrCrTab int32
+ FregRowid int32
+ FregRoot int32
+ FconstraintName TToken
+ })(unsafe.Pointer(pParse + 188))).FaddrCrTab, int32(BTREE_BLOBKEY))
}
/* Locate the PRIMARY KEY index. Or, if this table was originally
** an INTEGER PRIMARY KEY table, create a new PRIMARY KEY index.
@@ -98454,7 +98614,7 @@ func _convertToWithoutRowidTable(tls *libc.TLS, pParse uintptr, pTab uintptr) {
(*TIndex)(unsafe.Pointer(pIdx)).FnColumn = (*TIndex)(unsafe.Pointer(pIdx)).FnKeyCol
goto _6
}
- if _resizeIndexObject(tls, db, pIdx, libc.Int32FromUint16((*TIndex)(unsafe.Pointer(pIdx)).FnKeyCol)+n) != 0 {
+ if _resizeIndexObject(tls, pParse, pIdx, libc.Int32FromUint16((*TIndex)(unsafe.Pointer(pIdx)).FnKeyCol)+n) != 0 {
return
}
i = 0
@@ -98467,8 +98627,8 @@ func _convertToWithoutRowidTable(tls *libc.TLS, pParse uintptr, pTab uintptr) {
*(*Ti16)(unsafe.Pointer((*TIndex)(unsafe.Pointer(pIdx)).FaiColumn + uintptr(j)*2)) = *(*Ti16)(unsafe.Pointer((*TIndex)(unsafe.Pointer(pPk)).FaiColumn + uintptr(i)*2))
*(*uintptr)(unsafe.Pointer((*TIndex)(unsafe.Pointer(pIdx)).FazColl + uintptr(j)*4)) = *(*uintptr)(unsafe.Pointer((*TIndex)(unsafe.Pointer(pPk)).FazColl + uintptr(i)*4))
if *(*Tu8)(unsafe.Pointer((*TIndex)(unsafe.Pointer(pPk)).FaSortOrder + uintptr(i))) != 0 {
- /* See ticket https://www.sqlite.org/src/info/bba7b69f9849b5bf */
- libc.SetBitFieldPtr16Uint32(pIdx+56, libc.Uint32FromInt32(1), 10, 0x400)
+ /* See ticket https://sqlite.org/src/info/bba7b69f9849b5bf */
+ libc.SetBitFieldPtr16Uint32(pIdx+56, libc.Uint32FromInt32(1), 9, 0x200)
}
j++
}
@@ -98498,7 +98658,7 @@ func _convertToWithoutRowidTable(tls *libc.TLS, pParse uintptr, pTab uintptr) {
;
i++
}
- if _resizeIndexObject(tls, db, pPk, nPk+nExtra) != 0 {
+ if _resizeIndexObject(tls, pParse, pPk, nPk+nExtra) != 0 {
return
}
i = 0
@@ -98717,9 +98877,9 @@ func _sqlite3EndTable(tls *libc.TLS, pParse uintptr, pCons uintptr, pEnd uintptr
pCol = (*TTable)(unsafe.Pointer(p)).FaCol + uintptr(ii)*12
if int32(uint32(*(*uint8)(unsafe.Pointer(pCol + 4))&0xf0>>4)) == COLTYPE_CUSTOM {
if libc.Int32FromUint16((*TColumn)(unsafe.Pointer(pCol)).FcolFlags)&int32(COLFLAG_HASTYPE) != 0 {
- _sqlite3ErrorMsg(tls, pParse, __ccgo_ts+13331, libc.VaList(bp+40, (*TTable)(unsafe.Pointer(p)).FzName, (*TColumn)(unsafe.Pointer(pCol)).FzCnName, _sqlite3ColumnType(tls, pCol, __ccgo_ts+1667)))
+ _sqlite3ErrorMsg(tls, pParse, __ccgo_ts+13356, libc.VaList(bp+40, (*TTable)(unsafe.Pointer(p)).FzName, (*TColumn)(unsafe.Pointer(pCol)).FzCnName, _sqlite3ColumnType(tls, pCol, __ccgo_ts+1667)))
} else {
- _sqlite3ErrorMsg(tls, pParse, __ccgo_ts+13364, libc.VaList(bp+40, (*TTable)(unsafe.Pointer(p)).FzName, (*TColumn)(unsafe.Pointer(pCol)).FzCnName))
+ _sqlite3ErrorMsg(tls, pParse, __ccgo_ts+13389, libc.VaList(bp+40, (*TTable)(unsafe.Pointer(p)).FzName, (*TColumn)(unsafe.Pointer(pCol)).FzCnName))
}
return
} else {
@@ -98740,11 +98900,11 @@ func _sqlite3EndTable(tls *libc.TLS, pParse uintptr, pCons uintptr, pEnd uintptr
/* Special processing for WITHOUT ROWID Tables */
if tabOpts&uint32(TF_WithoutRowid) != 0 {
if (*TTable)(unsafe.Pointer(p)).FtabFlags&uint32(TF_Autoincrement) != 0 {
- _sqlite3ErrorMsg(tls, pParse, __ccgo_ts+13391, 0)
+ _sqlite3ErrorMsg(tls, pParse, __ccgo_ts+13416, 0)
return
}
if (*TTable)(unsafe.Pointer(p)).FtabFlags&uint32(TF_HasPrimaryKey) == uint32(0) {
- _sqlite3ErrorMsg(tls, pParse, __ccgo_ts+13441, libc.VaList(bp+40, (*TTable)(unsafe.Pointer(p)).FzName))
+ _sqlite3ErrorMsg(tls, pParse, __ccgo_ts+13466, libc.VaList(bp+40, (*TTable)(unsafe.Pointer(p)).FzName))
return
}
*(*Tu32)(unsafe.Pointer(p + 28)) |= libc.Uint32FromInt32(libc.Int32FromInt32(TF_WithoutRowid) | libc.Int32FromInt32(TF_NoVisibleRowid))
@@ -98791,7 +98951,7 @@ func _sqlite3EndTable(tls *libc.TLS, pParse uintptr, pCons uintptr, pEnd uintptr
ii1++
}
if nNG == 0 {
- _sqlite3ErrorMsg(tls, pParse, __ccgo_ts+13473, 0)
+ _sqlite3ErrorMsg(tls, pParse, __ccgo_ts+13498, 0)
return
}
}
@@ -98825,16 +98985,16 @@ func _sqlite3EndTable(tls *libc.TLS, pParse uintptr, pCons uintptr, pEnd uintptr
*/
if libc.Int32FromUint8((*TTable)(unsafe.Pointer(p)).FeTabType) == TABTYP_NORM {
/* A regular table */
- zType = __ccgo_ts + 9249
- zType2 = __ccgo_ts + 13517
+ zType = __ccgo_ts + 9274
+ zType2 = __ccgo_ts + 13542
} else {
/* A view */
- zType = __ccgo_ts + 10987
- zType2 = __ccgo_ts + 13523
+ zType = __ccgo_ts + 11012
+ zType2 = __ccgo_ts + 13548
}
/* If this is a CREATE TABLE xx AS SELECT ..., execute the SELECT
** statement to populate the new table. The root-page number for the
- ** new table is in register pParse->regRoot.
+ ** new table is in register pParse->u1.cr.regRoot.
**
** Once the SELECT has been coded by sqlite3Select(), it is in a
** suitable state to query for the column names and types to be used
@@ -98851,24 +99011,29 @@ func _sqlite3EndTable(tls *libc.TLS, pParse uintptr, pCons uintptr, pEnd uintptr
(*TParse)(unsafe.Pointer(pParse)).FnErr++
return
}
- v5 = pParse + 44
+ v5 = pParse + 48
v4 = *(*int32)(unsafe.Pointer(v5))
*(*int32)(unsafe.Pointer(v5))++
iCsr = v4
- v7 = pParse + 48
+ v7 = pParse + 52
*(*int32)(unsafe.Pointer(v7))++
v6 = *(*int32)(unsafe.Pointer(v7))
regYield = v6
- v9 = pParse + 48
+ v9 = pParse + 52
*(*int32)(unsafe.Pointer(v9))++
v8 = *(*int32)(unsafe.Pointer(v9))
regRec = v8
- v11 = pParse + 48
+ v11 = pParse + 52
*(*int32)(unsafe.Pointer(v11))++
v10 = *(*int32)(unsafe.Pointer(v11))
regRowid = v10
_sqlite3MayAbort(tls, pParse)
- _sqlite3VdbeAddOp3(tls, v, int32(OP_OpenWrite), iCsr, (*TParse)(unsafe.Pointer(pParse)).FregRoot, iDb)
+ _sqlite3VdbeAddOp3(tls, v, int32(OP_OpenWrite), iCsr, (*(*struct {
+ FaddrCrTab int32
+ FregRowid int32
+ FregRoot int32
+ FconstraintName TToken
+ })(unsafe.Pointer(pParse + 188))).FregRoot, iDb)
_sqlite3VdbeChangeP5(tls, v, uint16(OPFLAG_P2ISREG))
addrTop = _sqlite3VdbeCurrentAddr(tls, v) + int32(1)
_sqlite3VdbeAddOp3(tls, v, int32(OP_InitCoroutine), regYield, 0, addrTop)
@@ -98907,7 +99072,7 @@ func _sqlite3EndTable(tls *libc.TLS, pParse uintptr, pCons uintptr, pEnd uintptr
zStmt = _createTableStmt(tls, db, p)
} else {
if tabOpts != 0 {
- v13 = pParse + 212
+ v13 = pParse + 208
} else {
v13 = pEnd
}
@@ -98916,13 +99081,23 @@ func _sqlite3EndTable(tls *libc.TLS, pParse uintptr, pCons uintptr, pEnd uintptr
if int32(*(*int8)(unsafe.Pointer((*TToken)(unsafe.Pointer(pEnd2)).Fz))) != int32(';') {
n = int32(uint32(n) + (*TToken)(unsafe.Pointer(pEnd2)).Fn)
}
- zStmt = _sqlite3MPrintf(tls, db, __ccgo_ts+13528, libc.VaList(bp+40, zType2, n, (*TParse)(unsafe.Pointer(pParse)).FsNameToken.Fz))
+ zStmt = _sqlite3MPrintf(tls, db, __ccgo_ts+13553, libc.VaList(bp+40, zType2, n, (*TParse)(unsafe.Pointer(pParse)).FsNameToken.Fz))
}
/* A slot for the record has already been allocated in the
** schema table. We just need to update that slot with all
** the information we've collected.
*/
- _sqlite3NestedParse(tls, pParse, __ccgo_ts+13543, libc.VaList(bp+40, (*(*TDb)(unsafe.Pointer((*Tsqlite3)(unsafe.Pointer(db)).FaDb + uintptr(iDb)*16))).FzDbSName, zType, (*TTable)(unsafe.Pointer(p)).FzName, (*TTable)(unsafe.Pointer(p)).FzName, (*TParse)(unsafe.Pointer(pParse)).FregRoot, zStmt, (*TParse)(unsafe.Pointer(pParse)).FregRowid))
+ _sqlite3NestedParse(tls, pParse, __ccgo_ts+13568, libc.VaList(bp+40, (*(*TDb)(unsafe.Pointer((*Tsqlite3)(unsafe.Pointer(db)).FaDb + uintptr(iDb)*16))).FzDbSName, zType, (*TTable)(unsafe.Pointer(p)).FzName, (*TTable)(unsafe.Pointer(p)).FzName, (*(*struct {
+ FaddrCrTab int32
+ FregRowid int32
+ FregRoot int32
+ FconstraintName TToken
+ })(unsafe.Pointer(pParse + 188))).FregRoot, zStmt, (*(*struct {
+ FaddrCrTab int32
+ FregRowid int32
+ FregRoot int32
+ FconstraintName TToken
+ })(unsafe.Pointer(pParse + 188))).FregRowid))
_sqlite3DbFree(tls, db, zStmt)
_sqlite3ChangeCookie(tls, pParse, iDb)
/* Check to see if we need to create an sqlite_sequence table for
@@ -98931,15 +99106,15 @@ func _sqlite3EndTable(tls *libc.TLS, pParse uintptr, pCons uintptr, pEnd uintptr
if (*TTable)(unsafe.Pointer(p)).FtabFlags&uint32(TF_Autoincrement) != uint32(0) && !(libc.Int32FromUint8((*TParse)(unsafe.Pointer(pParse)).FeParseMode) != libc.Int32FromInt32(PARSE_MODE_NORMAL)) {
pDb = (*Tsqlite3)(unsafe.Pointer(db)).FaDb + uintptr(iDb)*16
if (*TSchema)(unsafe.Pointer((*TDb)(unsafe.Pointer(pDb)).FpSchema)).FpSeqTab == uintptr(0) {
- _sqlite3NestedParse(tls, pParse, __ccgo_ts+13641, libc.VaList(bp+40, (*TDb)(unsafe.Pointer(pDb)).FzDbSName))
+ _sqlite3NestedParse(tls, pParse, __ccgo_ts+13666, libc.VaList(bp+40, (*TDb)(unsafe.Pointer(pDb)).FzDbSName))
}
}
/* Reparse everything to update our internal data structures */
- _sqlite3VdbeAddParseSchemaOp(tls, v, iDb, _sqlite3MPrintf(tls, db, __ccgo_ts+13683, libc.VaList(bp+40, (*TTable)(unsafe.Pointer(p)).FzName)), uint16(0))
+ _sqlite3VdbeAddParseSchemaOp(tls, v, iDb, _sqlite3MPrintf(tls, db, __ccgo_ts+13708, libc.VaList(bp+40, (*TTable)(unsafe.Pointer(p)).FzName)), uint16(0))
/* Test for cycles in generated columns and illegal expressions
** in CHECK constraints and in DEFAULT clauses. */
if (*TTable)(unsafe.Pointer(p)).FtabFlags&uint32(TF_HasGenerated) != 0 {
- _sqlite3VdbeAddOp4(tls, v, int32(OP_SqlExec), int32(0x0001), 0, 0, _sqlite3MPrintf(tls, db, __ccgo_ts+13717, libc.VaList(bp+40, (*(*TDb)(unsafe.Pointer((*Tsqlite3)(unsafe.Pointer(db)).FaDb + uintptr(iDb)*16))).FzDbSName, (*TTable)(unsafe.Pointer(p)).FzName)), -int32(6))
+ _sqlite3VdbeAddOp4(tls, v, int32(OP_SqlExec), int32(0x0001), 0, 0, _sqlite3MPrintf(tls, db, __ccgo_ts+13742, libc.VaList(bp+40, (*(*TDb)(unsafe.Pointer((*Tsqlite3)(unsafe.Pointer(db)).FaDb + uintptr(iDb)*16))).FzDbSName, (*TTable)(unsafe.Pointer(p)).FzName)), -int32(6))
}
}
/* Add the table to the in-memory representation of the database.
@@ -98957,7 +99132,7 @@ func _sqlite3EndTable(tls *libc.TLS, pParse uintptr, pCons uintptr, pEnd uintptr
/* If this is the magic sqlite_sequence table used by autoincrement,
** then record a pointer to this table in the main database structure
** so that INSERT can find the table easily. */
- if libc.Xstrcmp(tls, (*TTable)(unsafe.Pointer(p)).FzName, __ccgo_ts+9771) == 0 {
+ if libc.Xstrcmp(tls, (*TTable)(unsafe.Pointer(p)).FzName, __ccgo_ts+9796) == 0 {
(*TSchema)(unsafe.Pointer((*TTable)(unsafe.Pointer(p)).FpSchema)).FpSeqTab = p
}
}
@@ -98990,7 +99165,7 @@ func _sqlite3CreateView(tls *libc.TLS, pParse uintptr, pBegin uintptr, pName1 ui
*(*uintptr)(unsafe.Pointer(bp + 60)) = uintptr(0)
db = (*TParse)(unsafe.Pointer(pParse)).Fdb
if int32((*TParse)(unsafe.Pointer(pParse)).FnVar) > 0 {
- _sqlite3ErrorMsg(tls, pParse, __ccgo_ts+13738, 0)
+ _sqlite3ErrorMsg(tls, pParse, __ccgo_ts+13763, 0)
goto create_view_fail
}
_sqlite3StartTable(tls, pParse, pName1, pName2, isTemp, int32(1), 0, noErr)
@@ -99007,7 +99182,7 @@ func _sqlite3CreateView(tls *libc.TLS, pParse uintptr, pBegin uintptr, pName1 ui
*(*Tu32)(unsafe.Pointer(p + 28)) |= uint32(TF_NoVisibleRowid) /* Never allow rowid in view */
_sqlite3TwoPartName(tls, pParse, pName1, pName2, bp+60)
iDb = _sqlite3SchemaToIndex(tls, db, (*TTable)(unsafe.Pointer(p)).FpSchema)
- _sqlite3FixInit(tls, bp+8, pParse, iDb, __ccgo_ts+10987, *(*uintptr)(unsafe.Pointer(bp + 60)))
+ _sqlite3FixInit(tls, bp+8, pParse, iDb, __ccgo_ts+11012, *(*uintptr)(unsafe.Pointer(bp + 60)))
if _sqlite3FixSelect(tls, bp+8, pSelect) != 0 {
goto create_view_fail
}
@@ -99104,7 +99279,7 @@ func _viewGetColumnNames(tls *libc.TLS, pParse uintptr, pTable uintptr) (r int32
** SELECT * FROM temp.ex1;
*/
if int32((*TTable)(unsafe.Pointer(pTable)).FnCol) < 0 {
- _sqlite3ErrorMsg(tls, pParse, __ccgo_ts+13774, libc.VaList(bp+8, (*TTable)(unsafe.Pointer(pTable)).FzName))
+ _sqlite3ErrorMsg(tls, pParse, __ccgo_ts+13799, libc.VaList(bp+8, (*TTable)(unsafe.Pointer(pTable)).FzName))
return int32(1)
}
/* If we get this far, it means we need to compute the table names.
@@ -99288,7 +99463,7 @@ func _destroyRootPage(tls *libc.TLS, pParse uintptr, iTable int32, iDb int32) {
v = _sqlite3GetVdbe(tls, pParse)
r1 = _sqlite3GetTempReg(tls, pParse)
if iTable < int32(2) {
- _sqlite3ErrorMsg(tls, pParse, __ccgo_ts+13804, 0)
+ _sqlite3ErrorMsg(tls, pParse, __ccgo_ts+13829, 0)
}
_sqlite3VdbeAddOp3(tls, v, int32(OP_Destroy), iTable, r1, iDb)
_sqlite3MayAbort(tls, pParse)
@@ -99301,7 +99476,7 @@ func _destroyRootPage(tls *libc.TLS, pParse uintptr, iTable int32, iDb int32) {
** is in register NNN. See grammar rules associated with the TK_REGISTER
** token for additional information.
*/
- _sqlite3NestedParse(tls, pParse, __ccgo_ts+13819, libc.VaList(bp+8, (*(*TDb)(unsafe.Pointer((*Tsqlite3)(unsafe.Pointer((*TParse)(unsafe.Pointer(pParse)).Fdb)).FaDb + uintptr(iDb)*16))).FzDbSName, iTable, r1, r1))
+ _sqlite3NestedParse(tls, pParse, __ccgo_ts+13844, libc.VaList(bp+8, (*(*TDb)(unsafe.Pointer((*Tsqlite3)(unsafe.Pointer((*TParse)(unsafe.Pointer(pParse)).Fdb)).FaDb + uintptr(iDb)*16))).FzDbSName, iTable, r1, r1))
_sqlite3ReleaseTempReg(tls, pParse, r1)
}
@@ -99384,9 +99559,9 @@ func _sqlite3ClearStatTables(tls *libc.TLS, pParse uintptr, iDb int32, zType uin
if !(i <= int32(4)) {
break
}
- Xsqlite3_snprintf(tls, int32(24), bp, __ccgo_ts+13886, libc.VaList(bp+32, i))
+ Xsqlite3_snprintf(tls, int32(24), bp, __ccgo_ts+13911, libc.VaList(bp+32, i))
if _sqlite3FindTable(tls, (*TParse)(unsafe.Pointer(pParse)).Fdb, bp, zDbName) != 0 {
- _sqlite3NestedParse(tls, pParse, __ccgo_ts+11876, libc.VaList(bp+32, zDbName, bp, zType, zName))
+ _sqlite3NestedParse(tls, pParse, __ccgo_ts+11901, libc.VaList(bp+32, zDbName, bp, zType, zName))
}
goto _1
_1:
@@ -99427,7 +99602,7 @@ func _sqlite3CodeDropTable(tls *libc.TLS, pParse uintptr, pTab uintptr, iDb int3
** move as a result of the drop (can happen in auto-vacuum mode).
*/
if (*TTable)(unsafe.Pointer(pTab)).FtabFlags&uint32(TF_Autoincrement) != 0 {
- _sqlite3NestedParse(tls, pParse, __ccgo_ts+13900, libc.VaList(bp+8, (*TDb)(unsafe.Pointer(pDb)).FzDbSName, (*TTable)(unsafe.Pointer(pTab)).FzName))
+ _sqlite3NestedParse(tls, pParse, __ccgo_ts+13925, libc.VaList(bp+8, (*TDb)(unsafe.Pointer(pDb)).FzDbSName, (*TTable)(unsafe.Pointer(pTab)).FzName))
}
/* Drop all entries in the schema table that refer to the
** table. The program name loops through the schema table and deletes
@@ -99436,7 +99611,7 @@ func _sqlite3CodeDropTable(tls *libc.TLS, pParse uintptr, pTab uintptr, iDb int3
** created in the temp database that refers to a table in another
** database.
*/
- _sqlite3NestedParse(tls, pParse, __ccgo_ts+13945, libc.VaList(bp+8, (*TDb)(unsafe.Pointer(pDb)).FzDbSName, (*TTable)(unsafe.Pointer(pTab)).FzName))
+ _sqlite3NestedParse(tls, pParse, __ccgo_ts+13970, libc.VaList(bp+8, (*TDb)(unsafe.Pointer(pDb)).FzDbSName, (*TTable)(unsafe.Pointer(pTab)).FzName))
if !(isView != 0) && !(libc.Int32FromUint8((*TTable)(unsafe.Pointer(pTab)).FeTabType) == libc.Int32FromInt32(TABTYP_VTAB)) {
_destroyTable(tls, pParse, pTab)
}
@@ -99471,11 +99646,11 @@ func _sqlite3ReadOnlyShadowTables(tls *libc.TLS, db uintptr) (r int32) {
// ** Return true if it is not allowed to drop the given table
// */
func _tableMayNotBeDropped(tls *libc.TLS, db uintptr, pTab uintptr) (r int32) {
- if Xsqlite3_strnicmp(tls, (*TTable)(unsafe.Pointer(pTab)).FzName, __ccgo_ts+6655, int32(7)) == 0 {
- if Xsqlite3_strnicmp(tls, (*TTable)(unsafe.Pointer(pTab)).FzName+uintptr(7), __ccgo_ts+3487, int32(4)) == 0 {
+ if Xsqlite3_strnicmp(tls, (*TTable)(unsafe.Pointer(pTab)).FzName, __ccgo_ts+6680, int32(7)) == 0 {
+ if Xsqlite3_strnicmp(tls, (*TTable)(unsafe.Pointer(pTab)).FzName+uintptr(7), __ccgo_ts+3513, int32(4)) == 0 {
return 0
}
- if Xsqlite3_strnicmp(tls, (*TTable)(unsafe.Pointer(pTab)).FzName+uintptr(7), __ccgo_ts+7457, int32(10)) == 0 {
+ if Xsqlite3_strnicmp(tls, (*TTable)(unsafe.Pointer(pTab)).FzName+uintptr(7), __ccgo_ts+7482, int32(10)) == 0 {
return 0
}
return int32(1)
@@ -99530,9 +99705,9 @@ func _sqlite3DropTable(tls *libc.TLS, pParse uintptr, pName uintptr, isView int3
goto exit_drop_table
}
if libc.Bool(!(libc.Int32FromInt32(OMIT_TEMPDB) != 0)) && iDb == int32(1) {
- v1 = __ccgo_ts + 6663
+ v1 = __ccgo_ts + 6688
} else {
- v1 = __ccgo_ts + 6151
+ v1 = __ccgo_ts + 6175
}
zTab = v1
zDb = (*(*TDb)(unsafe.Pointer((*Tsqlite3)(unsafe.Pointer(db)).FaDb + uintptr(iDb)*16))).FzDbSName
@@ -99565,18 +99740,18 @@ func _sqlite3DropTable(tls *libc.TLS, pParse uintptr, pName uintptr, isView int3
goto exit_drop_table
}
if _tableMayNotBeDropped(tls, db, pTab) != 0 {
- _sqlite3ErrorMsg(tls, pParse, __ccgo_ts+14012, libc.VaList(bp+8, (*TTable)(unsafe.Pointer(pTab)).FzName))
+ _sqlite3ErrorMsg(tls, pParse, __ccgo_ts+14037, libc.VaList(bp+8, (*TTable)(unsafe.Pointer(pTab)).FzName))
goto exit_drop_table
}
/* Ensure DROP TABLE is not used on a view, and DROP VIEW is not used
** on a table.
*/
if isView != 0 && !(libc.Int32FromUint8((*TTable)(unsafe.Pointer(pTab)).FeTabType) == libc.Int32FromInt32(TABTYP_VIEW)) {
- _sqlite3ErrorMsg(tls, pParse, __ccgo_ts+14040, libc.VaList(bp+8, (*TTable)(unsafe.Pointer(pTab)).FzName))
+ _sqlite3ErrorMsg(tls, pParse, __ccgo_ts+14065, libc.VaList(bp+8, (*TTable)(unsafe.Pointer(pTab)).FzName))
goto exit_drop_table
}
if !(isView != 0) && libc.Int32FromUint8((*TTable)(unsafe.Pointer(pTab)).FeTabType) == int32(TABTYP_VIEW) {
- _sqlite3ErrorMsg(tls, pParse, __ccgo_ts+14074, libc.VaList(bp+8, (*TTable)(unsafe.Pointer(pTab)).FzName))
+ _sqlite3ErrorMsg(tls, pParse, __ccgo_ts+14099, libc.VaList(bp+8, (*TTable)(unsafe.Pointer(pTab)).FzName))
goto exit_drop_table
}
/* Generate code to remove the table from the schema table
@@ -99586,7 +99761,7 @@ func _sqlite3DropTable(tls *libc.TLS, pParse uintptr, pName uintptr, isView int3
if v != 0 {
_sqlite3BeginWriteOperation(tls, pParse, int32(1), iDb)
if !(isView != 0) {
- _sqlite3ClearStatTables(tls, pParse, iDb, __ccgo_ts+11988, (*TTable)(unsafe.Pointer(pTab)).FzName)
+ _sqlite3ClearStatTables(tls, pParse, iDb, __ccgo_ts+12013, (*TTable)(unsafe.Pointer(pTab)).FzName)
_sqlite3FkDropTable(tls, pParse, pName, pTab)
}
_sqlite3CodeDropTable(tls, pParse, pTab, iDb, isView)
@@ -99634,19 +99809,19 @@ func _sqlite3CreateForeignKey(tls *libc.TLS, pParse uintptr, pFromCol uintptr, p
goto fk_end
}
if pToCol != 0 && (*TExprList)(unsafe.Pointer(pToCol)).FnExpr != int32(1) {
- _sqlite3ErrorMsg(tls, pParse, __ccgo_ts+14106, libc.VaList(bp+8, (*(*TColumn)(unsafe.Pointer((*TTable)(unsafe.Pointer(p)).FaCol + uintptr(iCol)*12))).FzCnName, pTo))
+ _sqlite3ErrorMsg(tls, pParse, __ccgo_ts+14131, libc.VaList(bp+8, (*(*TColumn)(unsafe.Pointer((*TTable)(unsafe.Pointer(p)).FaCol + uintptr(iCol)*12))).FzCnName, pTo))
goto fk_end
}
nCol = int32(1)
} else {
if pToCol != 0 && (*TExprList)(unsafe.Pointer(pToCol)).FnExpr != (*TExprList)(unsafe.Pointer(pFromCol)).FnExpr {
- _sqlite3ErrorMsg(tls, pParse, __ccgo_ts+14169, 0)
+ _sqlite3ErrorMsg(tls, pParse, __ccgo_ts+14194, 0)
goto fk_end
} else {
nCol = (*TExprList)(unsafe.Pointer(pFromCol)).FnExpr
}
}
- nByte = libc.Int64FromUint32(uint32(44) + libc.Uint32FromInt32(nCol-libc.Int32FromInt32(1))*uint32(8) + (*TToken)(unsafe.Pointer(pTo)).Fn + uint32(1))
+ nByte = libc.Int64FromUint32(uint32(libc.UintptrFromInt32(0)+36) + libc.Uint32FromInt32(nCol)*uint32(8) + (*TToken)(unsafe.Pointer(pTo)).Fn + uint32(1))
if pToCol != 0 {
i = 0
for {
@@ -99703,7 +99878,7 @@ func _sqlite3CreateForeignKey(tls *libc.TLS, pParse uintptr, pFromCol uintptr, p
j++
}
if j >= int32((*TTable)(unsafe.Pointer(p)).FnCol) {
- _sqlite3ErrorMsg(tls, pParse, __ccgo_ts+14263, libc.VaList(bp+8, (*(*TExprList_item)(unsafe.Pointer(pFromCol + 8 + uintptr(i)*20))).FzEName))
+ _sqlite3ErrorMsg(tls, pParse, __ccgo_ts+14288, libc.VaList(bp+8, (*(*TExprList_item)(unsafe.Pointer(pFromCol + 8 + uintptr(i)*20))).FzEName))
goto fk_end
}
if libc.Int32FromUint8((*TParse)(unsafe.Pointer(pParse)).FeParseMode) >= int32(PARSE_MODE_RENAME) {
@@ -99818,11 +99993,11 @@ func _sqlite3RefillIndex(tls *libc.TLS, pParse uintptr, pIndex uintptr, memRootP
var _ /* iPartIdxLabel at bp+0 */ int32
_, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _ = addr1, addr2, db, iDb, iIdx, iSorter, iTab, j2, pKey, pTab, regRecord, tnum, v, v1, v2, v3, v4, v5, v6, v7
pTab = (*TIndex)(unsafe.Pointer(pIndex)).FpTable
- v2 = pParse + 44
+ v2 = pParse + 48
v1 = *(*int32)(unsafe.Pointer(v2))
*(*int32)(unsafe.Pointer(v2))++ /* The table that is indexed */
iTab = v1
- v4 = pParse + 44
+ v4 = pParse + 48
v3 = *(*int32)(unsafe.Pointer(v4))
*(*int32)(unsafe.Pointer(v4))++ /* Btree cursor used for pTab */
iIdx = v3 /* Register holding assembled index record */
@@ -99844,7 +100019,7 @@ func _sqlite3RefillIndex(tls *libc.TLS, pParse uintptr, pIndex uintptr, memRootP
}
pKey = _sqlite3KeyInfoOfIndex(tls, pParse, pIndex)
/* Open the sorter cursor if we are to use one. */
- v6 = pParse + 44
+ v6 = pParse + 48
v5 = *(*int32)(unsafe.Pointer(v6))
*(*int32)(unsafe.Pointer(v6))++
iSorter = v5
@@ -99889,13 +100064,13 @@ func _sqlite3RefillIndex(tls *libc.TLS, pParse uintptr, pIndex uintptr, memRootP
addr2 = _sqlite3VdbeCurrentAddr(tls, v)
}
_sqlite3VdbeAddOp3(tls, v, int32(OP_SorterData), iSorter, regRecord, iIdx)
- if !(int32(uint32(*(*uint16)(unsafe.Pointer(pIndex + 56))&0x400>>10)) != 0) {
+ if !(int32(uint32(*(*uint16)(unsafe.Pointer(pIndex + 56))&0x200>>9)) != 0) {
/* This OP_SeekEnd opcode makes index insert for a REINDEX go much
** faster by avoiding unnecessary seeks. But the optimization does
** not work for UNIQUE constraint indexes on WITHOUT ROWID tables
** with DESC primary keys, since those indexes have there keys in
** a different order from the main table.
- ** See ticket: https://www.sqlite.org/src/info/bba7b69f9849b5bf
+ ** See ticket: https://sqlite.org/src/info/bba7b69f9849b5bf
*/
_sqlite3VdbeAddOp1(tls, v, int32(OP_SeekEnd), iIdx)
}
@@ -99918,23 +100093,23 @@ func _sqlite3RefillIndex(tls *libc.TLS, pParse uintptr, pIndex uintptr, memRootP
// ** of 8-byte aligned space after the Index object and return a
// ** pointer to this extra space in *ppExtra.
// */
-func _sqlite3AllocateIndexObject(tls *libc.TLS, db uintptr, nCol Ti16, nExtra int32, ppExtra uintptr) (r uintptr) {
- var nByte int32
+func _sqlite3AllocateIndexObject(tls *libc.TLS, db uintptr, nCol int32, nExtra int32, ppExtra uintptr) (r uintptr) {
+ var nByte Ti64
var p, pExtra uintptr
- _, _, _ = nByte, p, pExtra /* Bytes of space for Index object + arrays */
- nByte = libc.Int32FromUint32((libc.Uint32FromInt64(100)+libc.Uint32FromInt32(7))&libc.Uint32FromInt32(^libc.Int32FromInt32(7)) + (uint32(4)*libc.Uint32FromInt16(nCol)+uint32(7))&libc.Uint32FromInt32(^libc.Int32FromInt32(7)) + (uint32(2)*libc.Uint32FromInt32(int32(nCol)+libc.Int32FromInt32(1))+uint32(2)*libc.Uint32FromInt16(nCol)+uint32(1)*libc.Uint32FromInt16(nCol)+uint32(7))&libc.Uint32FromInt32(^libc.Int32FromInt32(7))) /* Index.aSortOrder */
- p = _sqlite3DbMallocZero(tls, db, libc.Uint64FromInt32(nByte+nExtra))
+ _, _, _ = nByte, p, pExtra /* Bytes of space for Index object + arrays */
+ nByte = libc.Int64FromUint32((libc.Uint32FromInt64(100)+libc.Uint32FromInt32(7))&libc.Uint32FromInt32(^libc.Int32FromInt32(7)) + (uint32(4)*libc.Uint32FromInt32(nCol)+uint32(7))&libc.Uint32FromInt32(^libc.Int32FromInt32(7)) + (uint32(2)*libc.Uint32FromInt32(nCol+libc.Int32FromInt32(1))+uint32(2)*libc.Uint32FromInt32(nCol)+uint32(1)*libc.Uint32FromInt32(nCol)+uint32(7))&libc.Uint32FromInt32(^libc.Int32FromInt32(7))) /* Index.aSortOrder */
+ p = _sqlite3DbMallocZero(tls, db, libc.Uint64FromInt64(nByte+int64(nExtra)))
if p != 0 {
pExtra = p + uintptr((libc.Uint32FromInt64(100)+libc.Uint32FromInt32(7))&libc.Uint32FromInt32(^libc.Int32FromInt32(7)))
(*TIndex)(unsafe.Pointer(p)).FazColl = pExtra
- pExtra += uintptr((libc.Uint32FromInt64(4)*libc.Uint32FromInt16(nCol) + libc.Uint32FromInt32(7)) & libc.Uint32FromInt32(^libc.Int32FromInt32(7)))
+ pExtra += uintptr((libc.Uint32FromInt64(4)*libc.Uint32FromInt32(nCol) + libc.Uint32FromInt32(7)) & libc.Uint32FromInt32(^libc.Int32FromInt32(7)))
(*TIndex)(unsafe.Pointer(p)).FaiRowLogEst = pExtra
- pExtra += uintptr(uint32(2) * libc.Uint32FromInt32(int32(nCol)+libc.Int32FromInt32(1)))
+ pExtra += uintptr(uint32(2) * libc.Uint32FromInt32(nCol+libc.Int32FromInt32(1)))
(*TIndex)(unsafe.Pointer(p)).FaiColumn = pExtra
- pExtra += uintptr(uint32(2) * libc.Uint32FromInt16(nCol))
+ pExtra += uintptr(uint32(2) * libc.Uint32FromInt32(nCol))
(*TIndex)(unsafe.Pointer(p)).FaSortOrder = pExtra
- (*TIndex)(unsafe.Pointer(p)).FnColumn = libc.Uint16FromInt16(nCol)
- (*TIndex)(unsafe.Pointer(p)).FnKeyCol = libc.Uint16FromInt32(int32(nCol) - int32(1))
+ (*TIndex)(unsafe.Pointer(p)).FnColumn = libc.Uint16FromInt32(nCol)
+ (*TIndex)(unsafe.Pointer(p)).FnKeyCol = libc.Uint16FromInt32(nCol - libc.Int32FromInt32(1))
*(*uintptr)(unsafe.Pointer(ppExtra)) = p + uintptr(nByte)
}
return p
@@ -99963,11 +100138,11 @@ func _sqlite3HasExplicitNulls(tls *libc.TLS, pParse uintptr, pList uintptr) (r i
if int32(uint32(*(*uint16)(unsafe.Pointer(pList + 8 + uintptr(i)*20 + 8 + 4))&0x20>>5)) != 0 {
sf = (*(*TExprList_item)(unsafe.Pointer(pList + 8 + uintptr(i)*20))).Ffg.FsortFlags
if libc.Int32FromUint8(sf) == 0 || libc.Int32FromUint8(sf) == int32(3) {
- v2 = __ccgo_ts + 14309
+ v2 = __ccgo_ts + 14334
} else {
- v2 = __ccgo_ts + 14315
+ v2 = __ccgo_ts + 14340
}
- _sqlite3ErrorMsg(tls, pParse, __ccgo_ts+14320, libc.VaList(bp+8, v2))
+ _sqlite3ErrorMsg(tls, pParse, __ccgo_ts+14345, libc.VaList(bp+8, v2))
return int32(1)
}
goto _1
@@ -100045,7 +100220,7 @@ func _sqlite3CreateIndex(tls *libc.TLS, pParse uintptr, pName1 uintptr, pName2 u
iDb = int32(1)
}
}
- _sqlite3FixInit(tls, bp, pParse, iDb, __ccgo_ts+14348, *(*uintptr)(unsafe.Pointer(bp + 52)))
+ _sqlite3FixInit(tls, bp, pParse, iDb, __ccgo_ts+14373, *(*uintptr)(unsafe.Pointer(bp + 52)))
if _sqlite3FixSrcList(tls, bp, pTblName) != 0 {
/* Because the parser constructs pTblName from a single identifier,
** sqlite3FixSrcList can never fail. */
@@ -100055,7 +100230,7 @@ func _sqlite3CreateIndex(tls *libc.TLS, pParse uintptr, pName1 uintptr, pName2 u
goto exit_create_index
}
if iDb == int32(1) && (*(*TDb)(unsafe.Pointer((*Tsqlite3)(unsafe.Pointer(db)).FaDb + uintptr(iDb)*16))).FpSchema != (*TTable)(unsafe.Pointer(pTab)).FpSchema {
- _sqlite3ErrorMsg(tls, pParse, __ccgo_ts+14354, libc.VaList(bp+80, (*TTable)(unsafe.Pointer(pTab)).FzName))
+ _sqlite3ErrorMsg(tls, pParse, __ccgo_ts+14379, libc.VaList(bp+80, (*TTable)(unsafe.Pointer(pTab)).FzName))
goto exit_create_index
}
if !((*TTable)(unsafe.Pointer(pTab)).FtabFlags&libc.Uint32FromInt32(TF_WithoutRowid) == libc.Uint32FromInt32(0)) {
@@ -100069,16 +100244,16 @@ func _sqlite3CreateIndex(tls *libc.TLS, pParse uintptr, pName1 uintptr, pName2 u
iDb = _sqlite3SchemaToIndex(tls, db, (*TTable)(unsafe.Pointer(pTab)).FpSchema)
}
pDb = (*Tsqlite3)(unsafe.Pointer(db)).FaDb + uintptr(iDb)*16
- if Xsqlite3_strnicmp(tls, (*TTable)(unsafe.Pointer(pTab)).FzName, __ccgo_ts+6655, int32(7)) == 0 && libc.Int32FromUint8((*Tsqlite3)(unsafe.Pointer(db)).Finit1.Fbusy) == 0 && pTblName != uintptr(0) {
- _sqlite3ErrorMsg(tls, pParse, __ccgo_ts+14404, libc.VaList(bp+80, (*TTable)(unsafe.Pointer(pTab)).FzName))
+ if Xsqlite3_strnicmp(tls, (*TTable)(unsafe.Pointer(pTab)).FzName, __ccgo_ts+6680, int32(7)) == 0 && libc.Int32FromUint8((*Tsqlite3)(unsafe.Pointer(db)).Finit1.Fbusy) == 0 && pTblName != uintptr(0) {
+ _sqlite3ErrorMsg(tls, pParse, __ccgo_ts+14429, libc.VaList(bp+80, (*TTable)(unsafe.Pointer(pTab)).FzName))
goto exit_create_index
}
if libc.Int32FromUint8((*TTable)(unsafe.Pointer(pTab)).FeTabType) == int32(TABTYP_VIEW) {
- _sqlite3ErrorMsg(tls, pParse, __ccgo_ts+14432, 0)
+ _sqlite3ErrorMsg(tls, pParse, __ccgo_ts+14457, 0)
goto exit_create_index
}
if libc.Int32FromUint8((*TTable)(unsafe.Pointer(pTab)).FeTabType) == int32(TABTYP_VTAB) {
- _sqlite3ErrorMsg(tls, pParse, __ccgo_ts+14457, 0)
+ _sqlite3ErrorMsg(tls, pParse, __ccgo_ts+14482, 0)
goto exit_create_index
}
/*
@@ -100099,19 +100274,19 @@ func _sqlite3CreateIndex(tls *libc.TLS, pParse uintptr, pName1 uintptr, pName2 u
if zName == uintptr(0) {
goto exit_create_index
}
- if SQLITE_OK != _sqlite3CheckObjectName(tls, pParse, zName, __ccgo_ts+14348, (*TTable)(unsafe.Pointer(pTab)).FzName) {
+ if SQLITE_OK != _sqlite3CheckObjectName(tls, pParse, zName, __ccgo_ts+14373, (*TTable)(unsafe.Pointer(pTab)).FzName) {
goto exit_create_index
}
if !(libc.Int32FromUint8((*TParse)(unsafe.Pointer(pParse)).FeParseMode) >= libc.Int32FromInt32(PARSE_MODE_RENAME)) {
if !((*Tsqlite3)(unsafe.Pointer(db)).Finit1.Fbusy != 0) {
if _sqlite3FindTable(tls, db, zName, (*TDb)(unsafe.Pointer(pDb)).FzDbSName) != uintptr(0) {
- _sqlite3ErrorMsg(tls, pParse, __ccgo_ts+14491, libc.VaList(bp+80, zName))
+ _sqlite3ErrorMsg(tls, pParse, __ccgo_ts+14516, libc.VaList(bp+80, zName))
goto exit_create_index
}
}
if _sqlite3FindIndex(tls, db, zName, (*TDb)(unsafe.Pointer(pDb)).FzDbSName) != uintptr(0) {
if !(ifNotExist != 0) {
- _sqlite3ErrorMsg(tls, pParse, __ccgo_ts+14525, libc.VaList(bp+80, zName))
+ _sqlite3ErrorMsg(tls, pParse, __ccgo_ts+14550, libc.VaList(bp+80, zName))
} else {
_sqlite3CodeVerifySchema(tls, pParse, iDb)
_sqlite3ForceNotReadOnly(tls, pParse)
@@ -100132,7 +100307,7 @@ func _sqlite3CreateIndex(tls *libc.TLS, pParse uintptr, pName1 uintptr, pName2 u
pLoop = (*TIndex)(unsafe.Pointer(pLoop)).FpNext
n++
}
- zName = _sqlite3MPrintf(tls, db, __ccgo_ts+14549, libc.VaList(bp+80, (*TTable)(unsafe.Pointer(pTab)).FzName, n))
+ zName = _sqlite3MPrintf(tls, db, __ccgo_ts+14574, libc.VaList(bp+80, (*TTable)(unsafe.Pointer(pTab)).FzName, n))
if zName == uintptr(0) {
goto exit_create_index
}
@@ -100150,9 +100325,9 @@ func _sqlite3CreateIndex(tls *libc.TLS, pParse uintptr, pName1 uintptr, pName2 u
if !(libc.Int32FromUint8((*TParse)(unsafe.Pointer(pParse)).FeParseMode) >= libc.Int32FromInt32(PARSE_MODE_RENAME)) {
zDb = (*TDb)(unsafe.Pointer(pDb)).FzDbSName
if libc.Bool(!(libc.Int32FromInt32(OMIT_TEMPDB) != 0)) && iDb == int32(1) {
- v2 = __ccgo_ts + 6663
+ v2 = __ccgo_ts + 6688
} else {
- v2 = __ccgo_ts + 6151
+ v2 = __ccgo_ts + 6175
}
if _sqlite3AuthCheck(tls, pParse, int32(SQLITE_INSERT), v2, uintptr(0), zDb) != 0 {
goto exit_create_index
@@ -100180,7 +100355,7 @@ func _sqlite3CreateIndex(tls *libc.TLS, pParse uintptr, pName1 uintptr, pName2 u
}
_sqlite3ExprListSetSortOrder(tls, pList, sortOrder, -int32(1))
} else {
- _sqlite3ExprListCheckLength(tls, pParse, pList, __ccgo_ts+14348)
+ _sqlite3ExprListCheckLength(tls, pParse, pList, __ccgo_ts+14373)
if (*TParse)(unsafe.Pointer(pParse)).FnErr != 0 {
goto exit_create_index
}
@@ -100212,7 +100387,7 @@ func _sqlite3CreateIndex(tls *libc.TLS, pParse uintptr, pName1 uintptr, pName2 u
v5 = int32(1)
}
nExtraCol = v5
- pIndex = _sqlite3AllocateIndexObject(tls, db, int16((*TExprList)(unsafe.Pointer(pList)).FnExpr+nExtraCol), nName+nExtra+int32(1), bp+56)
+ pIndex = _sqlite3AllocateIndexObject(tls, db, (*TExprList)(unsafe.Pointer(pList)).FnExpr+nExtraCol, nName+nExtra+int32(1), bp+56)
if (*Tsqlite3)(unsafe.Pointer(db)).FmallocFailed != 0 {
goto exit_create_index
}
@@ -100264,7 +100439,7 @@ func _sqlite3CreateIndex(tls *libc.TLS, pParse uintptr, pName1 uintptr, pName2 u
pCExpr = _sqlite3ExprSkipCollate(tls, (*TExprList_item)(unsafe.Pointer(pListItem)).FpExpr)
if libc.Int32FromUint8((*TExpr)(unsafe.Pointer(pCExpr)).Fop) != int32(TK_COLUMN) {
if pTab == (*TParse)(unsafe.Pointer(pParse)).FpNewTable {
- _sqlite3ErrorMsg(tls, pParse, __ccgo_ts+14572, 0)
+ _sqlite3ErrorMsg(tls, pParse, __ccgo_ts+14597, 0)
goto exit_create_index
}
if (*TIndex)(unsafe.Pointer(pIndex)).FaColExpr == uintptr(0) {
@@ -100274,19 +100449,19 @@ func _sqlite3CreateIndex(tls *libc.TLS, pParse uintptr, pName1 uintptr, pName2 u
j = -int32(2)
*(*Ti16)(unsafe.Pointer((*TIndex)(unsafe.Pointer(pIndex)).FaiColumn + uintptr(i)*2)) = int16(-libc.Int32FromInt32(2))
libc.SetBitFieldPtr16Uint32(pIndex+56, libc.Uint32FromInt32(0), 3, 0x8)
- libc.SetBitFieldPtr16Uint32(pIndex+56, libc.Uint32FromInt32(1), 13, 0x2000)
+ libc.SetBitFieldPtr16Uint32(pIndex+56, libc.Uint32FromInt32(1), 12, 0x1000)
} else {
j = int32((*TExpr)(unsafe.Pointer(pCExpr)).FiColumn)
if j < 0 {
j = int32((*TTable)(unsafe.Pointer(pTab)).FiPKey)
- libc.SetBitFieldPtr16Uint32(pIndex+56, libc.Uint32FromInt32(1), 11, 0x800)
+ libc.SetBitFieldPtr16Uint32(pIndex+56, libc.Uint32FromInt32(1), 10, 0x400)
} else {
if int32(uint32(*(*uint8)(unsafe.Pointer((*TTable)(unsafe.Pointer(pTab)).FaCol + uintptr(j)*12 + 4))&0xf>>0)) == 0 {
libc.SetBitFieldPtr16Uint32(pIndex+56, libc.Uint32FromInt32(0), 3, 0x8)
}
if libc.Int32FromUint16((*(*TColumn)(unsafe.Pointer((*TTable)(unsafe.Pointer(pTab)).FaCol + uintptr(j)*12))).FcolFlags)&int32(COLFLAG_VIRTUAL) != 0 {
+ libc.SetBitFieldPtr16Uint32(pIndex+56, libc.Uint32FromInt32(1), 11, 0x800)
libc.SetBitFieldPtr16Uint32(pIndex+56, libc.Uint32FromInt32(1), 12, 0x1000)
- libc.SetBitFieldPtr16Uint32(pIndex+56, libc.Uint32FromInt32(1), 13, 0x2000)
}
}
*(*Ti16)(unsafe.Pointer((*TIndex)(unsafe.Pointer(pIndex)).FaiColumn + uintptr(i)*2)) = int16(j)
@@ -100364,7 +100539,7 @@ func _sqlite3CreateIndex(tls *libc.TLS, pParse uintptr, pName1 uintptr, pName2 u
if j == int32((*TTable)(unsafe.Pointer(pTab)).FiPKey) {
goto _8
}
- if int32(_sqlite3TableColumnToIndex(tls, pIndex, int16(j))) >= 0 {
+ if _sqlite3TableColumnToIndex(tls, pIndex, j) >= 0 {
goto _8
}
libc.SetBitFieldPtr16Uint32(pIndex+56, libc.Uint32FromInt32(0), 5, 0x20)
@@ -100412,7 +100587,7 @@ func _sqlite3CreateIndex(tls *libc.TLS, pParse uintptr, pName1 uintptr, pName2 u
** explicitly specified behavior for the index.
*/
if !(libc.Int32FromUint8((*TIndex)(unsafe.Pointer(pIdx)).FonError) == int32(OE_Default) || libc.Int32FromUint8((*TIndex)(unsafe.Pointer(pIndex)).FonError) == int32(OE_Default)) {
- _sqlite3ErrorMsg(tls, pParse, __ccgo_ts+14633, libc.VaList(bp+80, 0))
+ _sqlite3ErrorMsg(tls, pParse, __ccgo_ts+14658, libc.VaList(bp+80, 0))
}
if libc.Int32FromUint8((*TIndex)(unsafe.Pointer(pIdx)).FonError) == int32(OE_Default) {
(*TIndex)(unsafe.Pointer(pIdx)).FonError = (*TIndex)(unsafe.Pointer(pIndex)).FonError
@@ -100442,8 +100617,8 @@ func _sqlite3CreateIndex(tls *libc.TLS, pParse uintptr, pName1 uintptr, pName2 u
if pTblName != uintptr(0) {
(*TIndex)(unsafe.Pointer(pIndex)).Ftnum = (*Tsqlite3)(unsafe.Pointer(db)).Finit1.FnewTnum
if _sqlite3IndexHasDuplicateRootPage(tls, pIndex) != 0 {
- _sqlite3ErrorMsg(tls, pParse, __ccgo_ts+14675, 0)
- (*TParse)(unsafe.Pointer(pParse)).Frc = _sqlite3CorruptError(tls, int32(126499))
+ _sqlite3ErrorMsg(tls, pParse, __ccgo_ts+14700, 0)
+ (*TParse)(unsafe.Pointer(pParse)).Frc = _sqlite3CorruptError(tls, int32(127335))
goto exit_create_index
}
}
@@ -100456,7 +100631,7 @@ func _sqlite3CreateIndex(tls *libc.TLS, pParse uintptr, pName1 uintptr, pName2 u
*(*Tu32)(unsafe.Pointer(db + 24)) |= uint32(DBFLAG_SchemaChange)
} else {
if (*TTable)(unsafe.Pointer(pTab)).FtabFlags&uint32(TF_WithoutRowid) == uint32(0) || pTblName != uintptr(0) {
- v12 = pParse + 48
+ v12 = pParse + 52
*(*int32)(unsafe.Pointer(v12))++
v11 = *(*int32)(unsafe.Pointer(v12))
iMem = v11
@@ -100485,9 +100660,9 @@ func _sqlite3CreateIndex(tls *libc.TLS, pParse uintptr, pName1 uintptr, pName2 u
if onError == OE_None {
v13 = __ccgo_ts + 1667
} else {
- v13 = __ccgo_ts + 14692
+ v13 = __ccgo_ts + 14717
}
- zStmt = _sqlite3MPrintf(tls, db, __ccgo_ts+14700, libc.VaList(bp+80, v13, n1, (*TToken)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 52)))).Fz))
+ zStmt = _sqlite3MPrintf(tls, db, __ccgo_ts+14725, libc.VaList(bp+80, v13, n1, (*TToken)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 52)))).Fz))
} else {
/* An automatic index created by a PRIMARY KEY or UNIQUE constraint */
/* zStmt = sqlite3MPrintf(""); */
@@ -100495,7 +100670,7 @@ func _sqlite3CreateIndex(tls *libc.TLS, pParse uintptr, pName1 uintptr, pName2 u
}
/* Add an entry in sqlite_schema for this index
*/
- _sqlite3NestedParse(tls, pParse, __ccgo_ts+14720, libc.VaList(bp+80, (*(*TDb)(unsafe.Pointer((*Tsqlite3)(unsafe.Pointer(db)).FaDb + uintptr(iDb)*16))).FzDbSName, (*TIndex)(unsafe.Pointer(pIndex)).FzName, (*TTable)(unsafe.Pointer(pTab)).FzName, iMem, zStmt))
+ _sqlite3NestedParse(tls, pParse, __ccgo_ts+14745, libc.VaList(bp+80, (*(*TDb)(unsafe.Pointer((*Tsqlite3)(unsafe.Pointer(db)).FaDb + uintptr(iDb)*16))).FzDbSName, (*TIndex)(unsafe.Pointer(pIndex)).FzName, (*TTable)(unsafe.Pointer(pTab)).FzName, iMem, zStmt))
_sqlite3DbFree(tls, db, zStmt)
/* Fill the index with data and reparse the schema. Code an OP_Expire
** to invalidate all pre-compiled statements.
@@ -100503,7 +100678,7 @@ func _sqlite3CreateIndex(tls *libc.TLS, pParse uintptr, pName1 uintptr, pName2 u
if pTblName != 0 {
_sqlite3RefillIndex(tls, pParse, pIndex, iMem)
_sqlite3ChangeCookie(tls, pParse, iDb)
- _sqlite3VdbeAddParseSchemaOp(tls, v, iDb, _sqlite3MPrintf(tls, db, __ccgo_ts+14779, libc.VaList(bp+80, (*TIndex)(unsafe.Pointer(pIndex)).FzName)), uint16(0))
+ _sqlite3VdbeAddParseSchemaOp(tls, v, iDb, _sqlite3MPrintf(tls, db, __ccgo_ts+14804, libc.VaList(bp+80, (*TIndex)(unsafe.Pointer(pIndex)).FzName)), uint16(0))
_sqlite3VdbeAddOp2(tls, v, int32(OP_Expire), 0, int32(1))
}
_sqlite3VdbeJumpHere(tls, v, libc.Int32FromUint32((*TIndex)(unsafe.Pointer(pIndex)).Ftnum))
@@ -100666,16 +100841,16 @@ func _sqlite3DropIndex(tls *libc.TLS, pParse uintptr, pName uintptr, ifExists in
pIndex = _sqlite3FindIndex(tls, db, (*(*TSrcItem)(unsafe.Pointer(pName + 8))).FzName, *(*uintptr)(unsafe.Pointer(pName + 8 + 44)))
if pIndex == uintptr(0) {
if !(ifExists != 0) {
- _sqlite3ErrorMsg(tls, pParse, __ccgo_ts+14806, libc.VaList(bp+8, pName+8))
+ _sqlite3ErrorMsg(tls, pParse, __ccgo_ts+14831, libc.VaList(bp+8, pName+8))
} else {
_sqlite3CodeVerifyNamedSchema(tls, pParse, *(*uintptr)(unsafe.Pointer(pName + 8 + 44)))
_sqlite3ForceNotReadOnly(tls, pParse)
}
- (*TParse)(unsafe.Pointer(pParse)).FcheckSchema = uint8(1)
+ libc.SetBitFieldPtr8Uint32(pParse+32, libc.Uint32FromInt32(1), 3, 0x8)
goto exit_drop_index
}
if int32(uint32(*(*uint16)(unsafe.Pointer(pIndex + 56))&0x3>>0)) != SQLITE_IDXTYPE_APPDEF {
- _sqlite3ErrorMsg(tls, pParse, __ccgo_ts+14824, libc.VaList(bp+8, 0))
+ _sqlite3ErrorMsg(tls, pParse, __ccgo_ts+14849, libc.VaList(bp+8, 0))
goto exit_drop_index
}
iDb = _sqlite3SchemaToIndex(tls, db, (*TIndex)(unsafe.Pointer(pIndex)).FpSchema)
@@ -100683,9 +100858,9 @@ func _sqlite3DropIndex(tls *libc.TLS, pParse uintptr, pName uintptr, ifExists in
pTab = (*TIndex)(unsafe.Pointer(pIndex)).FpTable
zDb = (*(*TDb)(unsafe.Pointer((*Tsqlite3)(unsafe.Pointer(db)).FaDb + uintptr(iDb)*16))).FzDbSName
if libc.Bool(!(libc.Int32FromInt32(OMIT_TEMPDB) != 0)) && iDb == int32(1) {
- v1 = __ccgo_ts + 6663
+ v1 = __ccgo_ts + 6688
} else {
- v1 = __ccgo_ts + 6151
+ v1 = __ccgo_ts + 6175
}
zTab = v1
if _sqlite3AuthCheck(tls, pParse, int32(SQLITE_DELETE), zTab, uintptr(0), zDb) != 0 {
@@ -100701,8 +100876,8 @@ func _sqlite3DropIndex(tls *libc.TLS, pParse uintptr, pName uintptr, ifExists in
v = _sqlite3GetVdbe(tls, pParse)
if v != 0 {
_sqlite3BeginWriteOperation(tls, pParse, int32(1), iDb)
- _sqlite3NestedParse(tls, pParse, __ccgo_ts+14897, libc.VaList(bp+8, (*(*TDb)(unsafe.Pointer((*Tsqlite3)(unsafe.Pointer(db)).FaDb + uintptr(iDb)*16))).FzDbSName, (*TIndex)(unsafe.Pointer(pIndex)).FzName))
- _sqlite3ClearStatTables(tls, pParse, iDb, __ccgo_ts+11984, (*TIndex)(unsafe.Pointer(pIndex)).FzName)
+ _sqlite3NestedParse(tls, pParse, __ccgo_ts+14922, libc.VaList(bp+8, (*(*TDb)(unsafe.Pointer((*Tsqlite3)(unsafe.Pointer(db)).FaDb + uintptr(iDb)*16))).FzDbSName, (*TIndex)(unsafe.Pointer(pIndex)).FzName))
+ _sqlite3ClearStatTables(tls, pParse, iDb, __ccgo_ts+12009, (*TIndex)(unsafe.Pointer(pIndex)).FzName)
_sqlite3ChangeCookie(tls, pParse, iDb)
_destroyRootPage(tls, pParse, libc.Int32FromUint32((*TIndex)(unsafe.Pointer(pIndex)).Ftnum), iDb)
_sqlite3VdbeAddOp4(tls, v, int32(OP_DropIndex), iDb, 0, 0, (*TIndex)(unsafe.Pointer(pIndex)).FzName, 0)
@@ -100775,12 +100950,12 @@ func _sqlite3IdListAppend(tls *libc.TLS, pParse uintptr, pList uintptr, pToken u
_, _, _, _, _ = db, i, pNew, v1, v2
db = (*TParse)(unsafe.Pointer(pParse)).Fdb
if pList == uintptr(0) {
- pList = _sqlite3DbMallocZero(tls, db, uint64(8))
+ pList = _sqlite3DbMallocZero(tls, db, uint64(uint32(libc.UintptrFromInt32(0)+4)+libc.Uint32FromInt32(libc.Int32FromInt32(1))*libc.Uint32FromInt64(4)))
if pList == uintptr(0) {
return uintptr(0)
}
} else {
- pNew = _sqlite3DbRealloc(tls, db, pList, uint64(uint32(8)+libc.Uint32FromInt32((*TIdList)(unsafe.Pointer(pList)).FnId)*uint32(4)))
+ pNew = _sqlite3DbRealloc(tls, db, pList, uint64(uint32(libc.UintptrFromInt32(0)+4)+libc.Uint32FromInt32((*TIdList)(unsafe.Pointer(pList)).FnId+libc.Int32FromInt32(1))*libc.Uint32FromInt64(4)))
if pNew == uintptr(0) {
_sqlite3IdListDelete(tls, db, pList)
return uintptr(0)
@@ -100892,13 +101067,13 @@ func _sqlite3SrcListEnlarge(tls *libc.TLS, pParse uintptr, pSrc uintptr, nExtra
nAlloc = int64(2)*int64((*TSrcList)(unsafe.Pointer(pSrc)).FnSrc) + int64(nExtra)
db = (*TParse)(unsafe.Pointer(pParse)).Fdb
if (*TSrcList)(unsafe.Pointer(pSrc)).FnSrc+nExtra >= int32(SQLITE_MAX_SRCLIST) {
- _sqlite3ErrorMsg(tls, pParse, __ccgo_ts+14957, libc.VaList(bp+8, int32(SQLITE_MAX_SRCLIST)))
+ _sqlite3ErrorMsg(tls, pParse, __ccgo_ts+14982, libc.VaList(bp+8, int32(SQLITE_MAX_SRCLIST)))
return uintptr(0)
}
if nAlloc > int64(SQLITE_MAX_SRCLIST) {
nAlloc = int64(SQLITE_MAX_SRCLIST)
}
- pNew = _sqlite3DbRealloc(tls, db, pSrc, libc.Uint64FromInt64(int64(56)+(nAlloc-int64(1))*int64(48)))
+ pNew = _sqlite3DbRealloc(tls, db, pSrc, libc.Uint64FromInt64(libc.Int64FromUint32(uint32(libc.UintptrFromInt32(0)+8))+nAlloc*libc.Int64FromInt64(48)))
if pNew == uintptr(0) {
return uintptr(0)
}
@@ -100979,7 +101154,7 @@ func _sqlite3SrcListAppend(tls *libc.TLS, pParse uintptr, pList uintptr, pTable
/* Cannot have C without B */
db = (*TParse)(unsafe.Pointer(pParse)).Fdb
if pList == uintptr(0) {
- pList = _sqlite3DbMallocRawNN(tls, (*TParse)(unsafe.Pointer(pParse)).Fdb, uint64(56))
+ pList = _sqlite3DbMallocRawNN(tls, (*TParse)(unsafe.Pointer(pParse)).Fdb, uint64(uint32(libc.UintptrFromInt32(0)+8)+libc.Uint32FromInt32(libc.Int32FromInt32(1))*libc.Uint32FromInt64(48)))
if pList == uintptr(0) {
return uintptr(0)
}
@@ -101029,7 +101204,7 @@ func _sqlite3SrcListAssignCursors(tls *libc.TLS, pParse uintptr, pList uintptr)
if (*TSrcItem)(unsafe.Pointer(pItem)).FiCursor >= 0 {
goto _1
}
- v3 = pParse + 44
+ v3 = pParse + 48
v2 = *(*int32)(unsafe.Pointer(v3))
*(*int32)(unsafe.Pointer(v3))++
(*TSrcItem)(unsafe.Pointer(pItem)).FiCursor = v2
@@ -101200,11 +101375,11 @@ func _sqlite3SrcListAppendFromTerm(tls *libc.TLS, pParse uintptr, p uintptr, pTa
db = (*TParse)(unsafe.Pointer(pParse)).Fdb
if !(p != 0) && pOnUsing != uintptr(0) && ((*TOnOrUsing)(unsafe.Pointer(pOnUsing)).FpOn != 0 || (*TOnOrUsing)(unsafe.Pointer(pOnUsing)).FpUsing != 0) {
if (*TOnOrUsing)(unsafe.Pointer(pOnUsing)).FpOn != 0 {
- v1 = __ccgo_ts + 14993
+ v1 = __ccgo_ts + 15018
} else {
- v1 = __ccgo_ts + 14996
+ v1 = __ccgo_ts + 15021
}
- _sqlite3ErrorMsg(tls, pParse, __ccgo_ts+15002, libc.VaList(bp+8, v1))
+ _sqlite3ErrorMsg(tls, pParse, __ccgo_ts+15027, libc.VaList(bp+8, v1))
goto append_from_error
}
p = _sqlite3SrcListAppend(tls, pParse, p, pTable, pDatabase)
@@ -101403,7 +101578,7 @@ func _sqlite3BeginTransaction(tls *libc.TLS, pParse uintptr, type1 int32) {
var eTxnType, i int32
_, _, _, _, _ = db, eTxnType, i, pBt, v
db = (*TParse)(unsafe.Pointer(pParse)).Fdb
- if _sqlite3AuthCheck(tls, pParse, int32(SQLITE_TRANSACTION), __ccgo_ts+15038, uintptr(0), uintptr(0)) != 0 {
+ if _sqlite3AuthCheck(tls, pParse, int32(SQLITE_TRANSACTION), __ccgo_ts+15063, uintptr(0), uintptr(0)) != 0 {
return
}
v = _sqlite3GetVdbe(tls, pParse)
@@ -101450,9 +101625,9 @@ func _sqlite3EndTransaction(tls *libc.TLS, pParse uintptr, eType int32) {
_, _, _ = isRollback, v, v1
isRollback = libc.BoolInt32(eType == int32(TK_ROLLBACK))
if isRollback != 0 {
- v1 = __ccgo_ts + 15044
+ v1 = __ccgo_ts + 15069
} else {
- v1 = __ccgo_ts + 15053
+ v1 = __ccgo_ts + 15078
}
if _sqlite3AuthCheck(tls, pParse, int32(SQLITE_TRANSACTION), v1, uintptr(0), uintptr(0)) != 0 {
return
@@ -101484,9 +101659,9 @@ func _sqlite3Savepoint(tls *libc.TLS, pParse uintptr, op int32, pName uintptr) {
}
var _az = [3]uintptr{
- 0: __ccgo_ts + 15038,
- 1: __ccgo_ts + 15060,
- 2: __ccgo_ts + 15044,
+ 0: __ccgo_ts + 15063,
+ 1: __ccgo_ts + 15085,
+ 2: __ccgo_ts + 15069,
}
// C documentation
@@ -101506,7 +101681,7 @@ func _sqlite3OpenTempDatabase(tls *libc.TLS, pParse uintptr) (r int32) {
if (*(*TDb)(unsafe.Pointer((*Tsqlite3)(unsafe.Pointer(db)).FaDb + 1*16))).FpBt == uintptr(0) && !((*TParse)(unsafe.Pointer(pParse)).Fexplain != 0) {
rc = _sqlite3BtreeOpen(tls, (*Tsqlite3)(unsafe.Pointer(db)).FpVfs, uintptr(0), db, bp, 0, _flags)
if rc != SQLITE_OK {
- _sqlite3ErrorMsg(tls, pParse, __ccgo_ts+15068, 0)
+ _sqlite3ErrorMsg(tls, pParse, __ccgo_ts+15093, 0)
(*TParse)(unsafe.Pointer(pParse)).Frc = rc
return int32(1)
}
@@ -101531,7 +101706,7 @@ var _flags = libc.Int32FromInt32(SQLITE_OPEN_READWRITE) | libc.Int32FromInt32(SQ
// */
func _sqlite3CodeVerifySchemaAtToplevel(tls *libc.TLS, pToplevel uintptr, iDb int32) {
if libc.BoolInt32((*TParse)(unsafe.Pointer(pToplevel)).FcookieMask&(libc.Uint32FromInt32(1)<<iDb) != uint32(0)) == 0 {
- *(*TyDbMask)(unsafe.Pointer(pToplevel + 96)) |= libc.Uint32FromInt32(1) << iDb
+ *(*TyDbMask)(unsafe.Pointer(pToplevel + 92)) |= libc.Uint32FromInt32(1) << iDb
if libc.Bool(!(libc.Int32FromInt32(OMIT_TEMPDB) != 0)) && iDb == int32(1) {
_sqlite3OpenTempDatabase(tls, pToplevel)
}
@@ -101601,7 +101776,7 @@ func _sqlite3BeginWriteOperation(tls *libc.TLS, pParse uintptr, setStatement int
}
pToplevel = v1
_sqlite3CodeVerifySchemaAtToplevel(tls, pToplevel, iDb)
- *(*TyDbMask)(unsafe.Pointer(pToplevel + 92)) |= libc.Uint32FromInt32(1) << iDb
+ *(*TyDbMask)(unsafe.Pointer(pToplevel + 88)) |= libc.Uint32FromInt32(1) << iDb
p2 = pToplevel + 20
*(*Tu8)(unsafe.Pointer(p2)) = Tu8(int32(*(*Tu8)(unsafe.Pointer(p2))) | setStatement)
}
@@ -101690,7 +101865,7 @@ func _sqlite3UniqueConstraint(tls *libc.TLS, pParse uintptr, onError int32, pIdx
pTab = (*TIndex)(unsafe.Pointer(pIdx)).FpTable
_sqlite3StrAccumInit(tls, bp, (*TParse)(unsafe.Pointer(pParse)).Fdb, uintptr(0), 0, *(*int32)(unsafe.Pointer((*TParse)(unsafe.Pointer(pParse)).Fdb + 116)))
if (*TIndex)(unsafe.Pointer(pIdx)).FaColExpr != 0 {
- Xsqlite3_str_appendf(tls, bp, __ccgo_ts+15138, libc.VaList(bp+32, (*TIndex)(unsafe.Pointer(pIdx)).FzName))
+ Xsqlite3_str_appendf(tls, bp, __ccgo_ts+15163, libc.VaList(bp+32, (*TIndex)(unsafe.Pointer(pIdx)).FzName))
} else {
j = 0
for {
@@ -101699,10 +101874,10 @@ func _sqlite3UniqueConstraint(tls *libc.TLS, pParse uintptr, onError int32, pIdx
}
zCol = (*(*TColumn)(unsafe.Pointer((*TTable)(unsafe.Pointer(pTab)).FaCol + uintptr(*(*Ti16)(unsafe.Pointer((*TIndex)(unsafe.Pointer(pIdx)).FaiColumn + uintptr(j)*2)))*12))).FzCnName
if j != 0 {
- Xsqlite3_str_append(tls, bp, __ccgo_ts+15149, int32(2))
+ Xsqlite3_str_append(tls, bp, __ccgo_ts+15174, int32(2))
}
Xsqlite3_str_appendall(tls, bp, (*TTable)(unsafe.Pointer(pTab)).FzName)
- Xsqlite3_str_append(tls, bp, __ccgo_ts+1680, int32(1))
+ Xsqlite3_str_append(tls, bp, __ccgo_ts+1706, int32(1))
Xsqlite3_str_appendall(tls, bp, zCol)
goto _1
_1:
@@ -101731,10 +101906,10 @@ func _sqlite3RowidConstraint(tls *libc.TLS, pParse uintptr, onError int32, pTab
var zMsg uintptr
_, _ = rc, zMsg
if int32((*TTable)(unsafe.Pointer(pTab)).FiPKey) >= 0 {
- zMsg = _sqlite3MPrintf(tls, (*TParse)(unsafe.Pointer(pParse)).Fdb, __ccgo_ts+12572, libc.VaList(bp+8, (*TTable)(unsafe.Pointer(pTab)).FzName, (*(*TColumn)(unsafe.Pointer((*TTable)(unsafe.Pointer(pTab)).FaCol + uintptr((*TTable)(unsafe.Pointer(pTab)).FiPKey)*12))).FzCnName))
+ zMsg = _sqlite3MPrintf(tls, (*TParse)(unsafe.Pointer(pParse)).Fdb, __ccgo_ts+12597, libc.VaList(bp+8, (*TTable)(unsafe.Pointer(pTab)).FzName, (*(*TColumn)(unsafe.Pointer((*TTable)(unsafe.Pointer(pTab)).FaCol + uintptr((*TTable)(unsafe.Pointer(pTab)).FiPKey)*12))).FzCnName))
rc = libc.Int32FromInt32(SQLITE_CONSTRAINT) | libc.Int32FromInt32(6)<<libc.Int32FromInt32(8)
} else {
- zMsg = _sqlite3MPrintf(tls, (*TParse)(unsafe.Pointer(pParse)).Fdb, __ccgo_ts+15152, libc.VaList(bp+8, (*TTable)(unsafe.Pointer(pTab)).FzName))
+ zMsg = _sqlite3MPrintf(tls, (*TParse)(unsafe.Pointer(pParse)).Fdb, __ccgo_ts+15177, libc.VaList(bp+8, (*TTable)(unsafe.Pointer(pTab)).FzName))
rc = libc.Int32FromInt32(SQLITE_CONSTRAINT) | libc.Int32FromInt32(10)<<libc.Int32FromInt32(8)
}
_sqlite3HaltConstraint(tls, pParse, rc, onError, zMsg, int8(-libc.Int32FromInt32(6)), uint8(P5_ConstraintUnique))
@@ -101909,7 +102084,7 @@ func _sqlite3Reindex(tls *libc.TLS, pParse uintptr, pName1 uintptr, pName2 uintp
_sqlite3RefillIndex(tls, pParse, pIndex, -int32(1))
return
}
- _sqlite3ErrorMsg(tls, pParse, __ccgo_ts+15161, 0)
+ _sqlite3ErrorMsg(tls, pParse, __ccgo_ts+15186, 0)
}
// C documentation
@@ -101954,7 +102129,7 @@ func _sqlite3KeyInfoOfIndex(tls *libc.TLS, pParse uintptr, pIdx uintptr) (r uint
i++
}
if (*TParse)(unsafe.Pointer(pParse)).FnErr != 0 {
- if int32(uint32(*(*uint16)(unsafe.Pointer(pIdx + 56))&0x200>>9)) == 0 {
+ if int32(uint32(*(*uint16)(unsafe.Pointer(pIdx + 56))&0x100>>8)) == 0 {
/* Deactivate the index because it contains an unknown collating
** sequence. The only way to reactive the index is to reload the
** schema. Adding the missing collating sequence later does not
@@ -101962,7 +102137,7 @@ func _sqlite3KeyInfoOfIndex(tls *libc.TLS, pParse uintptr, pIdx uintptr) (r uint
** the missing index using the collation-needed callback. For
** simplicity, SQLite will not give the application a second chance.
*/
- libc.SetBitFieldPtr16Uint32(pIdx+56, libc.Uint32FromInt32(1), 9, 0x200)
+ libc.SetBitFieldPtr16Uint32(pIdx+56, libc.Uint32FromInt32(1), 8, 0x100)
(*TParse)(unsafe.Pointer(pParse)).Frc = libc.Int32FromInt32(SQLITE_ERROR) | libc.Int32FromInt32(2)<<libc.Int32FromInt32(8)
}
_sqlite3KeyInfoUnref(tls, pKey)
@@ -102029,8 +102204,7 @@ func _sqlite3WithAdd(tls *libc.TLS, pParse uintptr, pWith uintptr, pCte uintptr)
defer tls.Free(16)
var db, pNew, zName, v3 uintptr
var i, v2 int32
- var nByte Tsqlite3_int64
- _, _, _, _, _, _, _ = db, i, nByte, pNew, zName, v2, v3
+ _, _, _, _, _, _ = db, i, pNew, zName, v2, v3
db = (*TParse)(unsafe.Pointer(pParse)).Fdb
if pCte == uintptr(0) {
return pWith
@@ -102045,7 +102219,7 @@ func _sqlite3WithAdd(tls *libc.TLS, pParse uintptr, pWith uintptr, pCte uintptr)
break
}
if _sqlite3StrICmp(tls, zName, (*(*TCte)(unsafe.Pointer(pWith + 12 + uintptr(i)*24))).FzName) == 0 {
- _sqlite3ErrorMsg(tls, pParse, __ccgo_ts+15207, libc.VaList(bp+8, zName))
+ _sqlite3ErrorMsg(tls, pParse, __ccgo_ts+15232, libc.VaList(bp+8, zName))
}
goto _1
_1:
@@ -102054,10 +102228,9 @@ func _sqlite3WithAdd(tls *libc.TLS, pParse uintptr, pWith uintptr, pCte uintptr)
}
}
if pWith != 0 {
- nByte = libc.Int64FromUint32(uint32(36) + uint32(24)*libc.Uint32FromInt32((*TWith)(unsafe.Pointer(pWith)).FnCte))
- pNew = _sqlite3DbRealloc(tls, db, pWith, libc.Uint64FromInt64(nByte))
+ pNew = _sqlite3DbRealloc(tls, db, pWith, uint64(uint32(libc.UintptrFromInt32(0)+12)+libc.Uint32FromInt32((*TWith)(unsafe.Pointer(pWith)).FnCte+libc.Int32FromInt32(1))*libc.Uint32FromInt64(24)))
} else {
- pNew = _sqlite3DbMallocZero(tls, db, uint64(36))
+ pNew = _sqlite3DbMallocZero(tls, db, uint64(uint32(libc.UintptrFromInt32(0)+12)+libc.Uint32FromInt32(libc.Int32FromInt32(1))*libc.Uint32FromInt64(24)))
}
if (*Tsqlite3)(unsafe.Pointer(db)).FmallocFailed != 0 {
_sqlite3CteDelete(tls, db, pCte)
@@ -102344,7 +102517,7 @@ func _sqlite3GetCollSeq(tls *libc.TLS, pParse uintptr, enc Tu8, pColl uintptr, z
p = uintptr(0)
}
if p == uintptr(0) {
- _sqlite3ErrorMsg(tls, pParse, __ccgo_ts+15237, libc.VaList(bp+8, zName))
+ _sqlite3ErrorMsg(tls, pParse, __ccgo_ts+15262, libc.VaList(bp+8, zName))
(*TParse)(unsafe.Pointer(pParse)).Frc = libc.Int32FromInt32(SQLITE_ERROR) | libc.Int32FromInt32(1)<<libc.Int32FromInt32(8)
}
return p
@@ -102810,7 +102983,7 @@ func _vtabIsReadOnly(tls *libc.TLS, pParse uintptr, pTab uintptr) (r int32) {
FazArg uintptr
Fp uintptr
})(unsafe.Pointer(pTab + 44))).Fp)).FeVtabRisk) > libc.BoolInt32((*Tsqlite3)(unsafe.Pointer((*TParse)(unsafe.Pointer(pParse)).Fdb)).Fflags&uint64(SQLITE_TrustedSchema) != uint64(0)) {
- _sqlite3ErrorMsg(tls, pParse, __ccgo_ts+15268, libc.VaList(bp+8, (*TTable)(unsafe.Pointer(pTab)).FzName))
+ _sqlite3ErrorMsg(tls, pParse, __ccgo_ts+15293, libc.VaList(bp+8, (*TTable)(unsafe.Pointer(pTab)).FzName))
}
return 0
}
@@ -102844,11 +103017,11 @@ func _sqlite3IsReadOnly(tls *libc.TLS, pParse uintptr, pTab uintptr, pTrigger ui
bp := tls.Alloc(16)
defer tls.Free(16)
if _tabIsReadOnly(tls, pParse, pTab) != 0 {
- _sqlite3ErrorMsg(tls, pParse, __ccgo_ts+15301, libc.VaList(bp+8, (*TTable)(unsafe.Pointer(pTab)).FzName))
+ _sqlite3ErrorMsg(tls, pParse, __ccgo_ts+15326, libc.VaList(bp+8, (*TTable)(unsafe.Pointer(pTab)).FzName))
return int32(1)
}
if libc.Int32FromUint8((*TTable)(unsafe.Pointer(pTab)).FeTabType) == int32(TABTYP_VIEW) && (pTrigger == uintptr(0) || (*TTrigger)(unsafe.Pointer(pTrigger)).FbReturning != 0 && (*TTrigger)(unsafe.Pointer(pTrigger)).FpNext == uintptr(0)) {
- _sqlite3ErrorMsg(tls, pParse, __ccgo_ts+15330, libc.VaList(bp+8, (*TTable)(unsafe.Pointer(pTab)).FzName))
+ _sqlite3ErrorMsg(tls, pParse, __ccgo_ts+15355, libc.VaList(bp+8, (*TTable)(unsafe.Pointer(pTab)).FzName))
return int32(1)
}
return 0
@@ -102952,7 +103125,7 @@ func _sqlite3DeleteFrom(tls *libc.TLS, pParse uintptr, pTabList uintptr, pWhere
}
/* Assign cursor numbers to the table and all its indices.
*/
- v3 = pParse + 44
+ v3 = pParse + 48
v2 = *(*int32)(unsafe.Pointer(v3))
*(*int32)(unsafe.Pointer(v3))++
v1 = v2
@@ -103009,7 +103182,7 @@ func _sqlite3DeleteFrom(tls *libc.TLS, pParse uintptr, pTabList uintptr, pWhere
** we are counting rows.
*/
if (*Tsqlite3)(unsafe.Pointer(db)).Fflags&(libc.Uint64FromInt32(libc.Int32FromInt32(0x00001))<<libc.Int32FromInt32(32)) != uint64(0) && !((*TParse)(unsafe.Pointer(pParse)).Fnested != 0) && !((*TParse)(unsafe.Pointer(pParse)).FpTriggerTab != 0) && !((*TParse)(unsafe.Pointer(pParse)).FbReturning != 0) {
- v7 = pParse + 48
+ v7 = pParse + 52
*(*int32)(unsafe.Pointer(v7))++
v6 = *(*int32)(unsafe.Pointer(v7))
memCnt = v6
@@ -103070,7 +103243,7 @@ func _sqlite3DeleteFrom(tls *libc.TLS, pParse uintptr, pTabList uintptr, pWhere
if (*TTable)(unsafe.Pointer(pTab)).FtabFlags&uint32(TF_WithoutRowid) == uint32(0) {
/* For a rowid table, initialize the RowSet to an empty set */
pPk = uintptr(0)
- v13 = pParse + 48
+ v13 = pParse + 52
*(*int32)(unsafe.Pointer(v13))++
v12 = *(*int32)(unsafe.Pointer(v13))
iRowSet = v12
@@ -103081,8 +103254,8 @@ func _sqlite3DeleteFrom(tls *libc.TLS, pParse uintptr, pTabList uintptr, pWhere
pPk = _sqlite3PrimaryKeyIndex(tls, pTab)
nPk = libc.Int16FromUint16((*TIndex)(unsafe.Pointer(pPk)).FnKeyCol)
iPk = (*TParse)(unsafe.Pointer(pParse)).FnMem + int32(1)
- *(*int32)(unsafe.Pointer(pParse + 48)) += int32(nPk)
- v15 = pParse + 44
+ *(*int32)(unsafe.Pointer(pParse + 52)) += int32(nPk)
+ v15 = pParse + 48
v14 = *(*int32)(unsafe.Pointer(v15))
*(*int32)(unsafe.Pointer(v15))++
iEphCur = v14
@@ -103127,7 +103300,7 @@ func _sqlite3DeleteFrom(tls *libc.TLS, pParse uintptr, pTabList uintptr, pWhere
}
iKey = iPk
} else {
- v18 = pParse + 48
+ v18 = pParse + 52
*(*int32)(unsafe.Pointer(v18))++
v17 = *(*int32)(unsafe.Pointer(v18))
iKey = v17
@@ -103158,7 +103331,7 @@ func _sqlite3DeleteFrom(tls *libc.TLS, pParse uintptr, pTabList uintptr, pWhere
} else {
if pPk != 0 {
/* Add the PK key for this row to the temporary table */
- v20 = pParse + 48
+ v20 = pParse + 52
*(*int32)(unsafe.Pointer(v20))++
v19 = *(*int32)(unsafe.Pointer(v20))
iKey = v19
@@ -103251,7 +103424,7 @@ func _sqlite3DeleteFrom(tls *libc.TLS, pParse uintptr, pTabList uintptr, pWhere
** invoke the callback function.
*/
if memCnt != 0 {
- _sqlite3CodeChangeCount(tls, v, memCnt, __ccgo_ts+15368)
+ _sqlite3CodeChangeCount(tls, v, memCnt, __ccgo_ts+15393)
}
goto delete_from_cleanup
delete_from_cleanup:
@@ -103342,7 +103515,7 @@ func _sqlite3GenerateRowDelete(tls *libc.TLS, pParse uintptr, pTab uintptr, pTri
mask = _sqlite3TriggerColmask(tls, pParse, pTrigger, uintptr(0), 0, libc.Int32FromInt32(TRIGGER_BEFORE)|libc.Int32FromInt32(TRIGGER_AFTER), pTab, libc.Int32FromUint8(onconf))
mask |= _sqlite3FkOldmask(tls, pParse, pTab)
iOld = (*TParse)(unsafe.Pointer(pParse)).FnMem + int32(1)
- *(*int32)(unsafe.Pointer(pParse + 48)) += int32(1) + int32((*TTable)(unsafe.Pointer(pTab)).FnCol)
+ *(*int32)(unsafe.Pointer(pParse + 52)) += int32(1) + int32((*TTable)(unsafe.Pointer(pTab)).FnCol)
/* Populate the OLD.* pseudo-table register array. These values will be
** used by any BEFORE and AFTER triggers that exist. */
_sqlite3VdbeAddOp2(tls, v, int32(OP_Copy), iPk, iOld)
@@ -103399,7 +103572,7 @@ func _sqlite3GenerateRowDelete(tls *libc.TLS, pParse uintptr, pTab uintptr, pTri
v3 = 0
}
_sqlite3VdbeAddOp2(tls, v, int32(OP_Delete), iDataCur, v3)
- if libc.Int32FromUint8((*TParse)(unsafe.Pointer(pParse)).Fnested) == 0 || 0 == Xsqlite3_stricmp(tls, (*TTable)(unsafe.Pointer(pTab)).FzName, __ccgo_ts+11773) {
+ if libc.Int32FromUint8((*TParse)(unsafe.Pointer(pParse)).Fnested) == 0 || 0 == Xsqlite3_stricmp(tls, (*TTable)(unsafe.Pointer(pTab)).FzName, __ccgo_ts+11798) {
_sqlite3VdbeAppendP4(tls, v, pTab, -int32(5))
}
if libc.Int32FromUint8(eMode) != ONEPASS_OFF {
@@ -103703,10 +103876,10 @@ func _typeofFunc(tls *libc.TLS, context uintptr, NotUsed int32, argv uintptr) {
}
var _azType2 = [5]uintptr{
- 0: __ccgo_ts + 6391,
- 1: __ccgo_ts + 6386,
- 2: __ccgo_ts + 8388,
- 3: __ccgo_ts + 8383,
+ 0: __ccgo_ts + 6416,
+ 1: __ccgo_ts + 6411,
+ 2: __ccgo_ts + 8413,
+ 3: __ccgo_ts + 8408,
4: __ccgo_ts + 1653,
}
@@ -103821,7 +103994,7 @@ func _absFunc(tls *libc.TLS, context uintptr, argc int32, argv uintptr) {
/* IMP: R-31676-45509 If X is the integer -9223372036854775808
** then abs(X) throws an integer overflow error since there is no
** equivalent positive 64-bit two complement value. */
- Xsqlite3_result_error(tls, context, __ccgo_ts+15381, -int32(1))
+ Xsqlite3_result_error(tls, context, __ccgo_ts+15406, -int32(1))
return
}
iVal = -iVal
@@ -103979,9 +104152,6 @@ func _substrFunc(tls *libc.TLS, context uintptr, argc int32, argv uintptr) {
var p1, p2, v6 Ti64
var z, z2, v2, v3, v5 uintptr
_, _, _, _, _, _, _, _, _, _ = len1, p0type, p1, p2, z, z2, v2, v3, v5, v6
- if Xsqlite3_value_type(tls, *(*uintptr)(unsafe.Pointer(argv + 1*4))) == int32(SQLITE_NULL) || argc == int32(3) && Xsqlite3_value_type(tls, *(*uintptr)(unsafe.Pointer(argv + 2*4))) == int32(SQLITE_NULL) {
- return
- }
p0type = Xsqlite3_value_type(tls, *(*uintptr)(unsafe.Pointer(argv)))
p1 = Xsqlite3_value_int64(tls, *(*uintptr)(unsafe.Pointer(argv + 1*4)))
if p0type == int32(SQLITE_BLOB) {
@@ -104018,9 +104188,17 @@ func _substrFunc(tls *libc.TLS, context uintptr, argc int32, argv uintptr) {
}
if argc == int32(3) {
p2 = Xsqlite3_value_int64(tls, *(*uintptr)(unsafe.Pointer(argv + 2*4)))
+ if p2 == 0 && Xsqlite3_value_type(tls, *(*uintptr)(unsafe.Pointer(argv + 2*4))) == int32(SQLITE_NULL) {
+ return
+ }
} else {
p2 = int64(*(*int32)(unsafe.Pointer(Xsqlite3_context_db_handle(tls, context) + 116)))
}
+ if p1 == 0 {
+ if Xsqlite3_value_type(tls, *(*uintptr)(unsafe.Pointer(argv + 1*4))) == int32(SQLITE_NULL) {
+ return
+ }
+ }
if p1 < 0 {
p1 += int64(len1)
if p1 < 0 {
@@ -104136,7 +104314,7 @@ func _roundFunc(tls *libc.TLS, context uintptr, argc int32, argv uintptr) {
}
*(*float64)(unsafe.Pointer(bp)) = float64(int64(*(*float64)(unsafe.Pointer(bp)) + v1))
} else {
- zBuf = Xsqlite3_mprintf(tls, __ccgo_ts+15398, libc.VaList(bp+16, int32(n), *(*float64)(unsafe.Pointer(bp))))
+ zBuf = Xsqlite3_mprintf(tls, __ccgo_ts+15423, libc.VaList(bp+16, int32(n), *(*float64)(unsafe.Pointer(bp))))
if zBuf == uintptr(0) {
Xsqlite3_result_error_nomem(tls, context)
return
@@ -104716,7 +104894,7 @@ func _likeFunc(tls *libc.TLS, context uintptr, argc int32, argv uintptr) {
*/
nPat = Xsqlite3_value_bytes(tls, *(*uintptr)(unsafe.Pointer(argv)))
if nPat > *(*int32)(unsafe.Pointer(db + 116 + 8*4)) {
- Xsqlite3_result_error(tls, context, __ccgo_ts+15404, -int32(1))
+ Xsqlite3_result_error(tls, context, __ccgo_ts+15429, -int32(1))
return
}
if argc == int32(3) {
@@ -104728,7 +104906,7 @@ func _likeFunc(tls *libc.TLS, context uintptr, argc int32, argv uintptr) {
return
}
if _sqlite3Utf8CharLen(tls, *(*uintptr)(unsafe.Pointer(bp + 4)), -int32(1)) != int32(1) {
- Xsqlite3_result_error(tls, context, __ccgo_ts+15437, -int32(1))
+ Xsqlite3_result_error(tls, context, __ccgo_ts+15462, -int32(1))
return
}
escape = _sqlite3Utf8Read(tls, bp+4)
@@ -104810,7 +104988,7 @@ func _errlogFunc(tls *libc.TLS, context uintptr, argc int32, argv uintptr) {
defer tls.Free(16)
_ = argc
_ = context
- Xsqlite3_log(tls, Xsqlite3_value_int(tls, *(*uintptr)(unsafe.Pointer(argv))), __ccgo_ts+3864, libc.VaList(bp+8, Xsqlite3_value_text(tls, *(*uintptr)(unsafe.Pointer(argv + 1*4)))))
+ Xsqlite3_log(tls, Xsqlite3_value_int(tls, *(*uintptr)(unsafe.Pointer(argv))), __ccgo_ts+3890, libc.VaList(bp+8, Xsqlite3_value_text(tls, *(*uintptr)(unsafe.Pointer(argv + 1*4)))))
}
// C documentation
@@ -104882,28 +105060,28 @@ var _hexdigits = [16]int8{
// ** Append to pStr text that is the SQL literal representation of the
// ** value contained in pValue.
// */
-func _sqlite3QuoteValue(tls *libc.TLS, pStr uintptr, pValue uintptr) {
+func _sqlite3QuoteValue(tls *libc.TLS, pStr uintptr, pValue uintptr, bEscape int32) {
bp := tls.Alloc(32)
defer tls.Free(32)
var i int32
var nBlob Ti64
var r1 float64
- var zArg, zBlob, zText, zVal uintptr
+ var zArg, zBlob, zText, zVal, v2 uintptr
var _ /* r2 at bp+0 */ float64
- _, _, _, _, _, _, _ = i, nBlob, r1, zArg, zBlob, zText, zVal
+ _, _, _, _, _, _, _, _ = i, nBlob, r1, zArg, zBlob, zText, zVal, v2
/* As currently implemented, the string must be initially empty.
** we might relax this requirement in the future, but that will
** require enhancements to the implementation. */
switch Xsqlite3_value_type(tls, pValue) {
case int32(SQLITE_FLOAT):
r1 = Xsqlite3_value_double(tls, pValue)
- Xsqlite3_str_appendf(tls, pStr, __ccgo_ts+15482, libc.VaList(bp+16, r1))
+ Xsqlite3_str_appendf(tls, pStr, __ccgo_ts+15507, libc.VaList(bp+16, r1))
zVal = Xsqlite3_str_value(tls, pStr)
if zVal != 0 {
_sqlite3AtoF(tls, zVal, bp, libc.Int32FromUint32((*TStrAccum)(unsafe.Pointer(pStr)).FnChar), uint8(SQLITE_UTF8))
if r1 != *(*float64)(unsafe.Pointer(bp)) {
Xsqlite3_str_reset(tls, pStr)
- Xsqlite3_str_appendf(tls, pStr, __ccgo_ts+15490, libc.VaList(bp+16, r1))
+ Xsqlite3_str_appendf(tls, pStr, __ccgo_ts+15515, libc.VaList(bp+16, r1))
}
}
case int32(SQLITE_INTEGER):
@@ -104935,7 +105113,12 @@ func _sqlite3QuoteValue(tls *libc.TLS, pStr uintptr, pValue uintptr) {
}
case int32(SQLITE_TEXT):
zArg = Xsqlite3_value_text(tls, pValue)
- Xsqlite3_str_appendf(tls, pStr, __ccgo_ts+15498, libc.VaList(bp+16, zArg))
+ if bEscape != 0 {
+ v2 = __ccgo_ts + 15523
+ } else {
+ v2 = __ccgo_ts + 15527
+ }
+ Xsqlite3_str_appendf(tls, pStr, v2, libc.VaList(bp+16, zArg))
default:
Xsqlite3_str_append(tls, pStr, __ccgo_ts+1668, int32(4))
break
@@ -104945,6 +105128,137 @@ func _sqlite3QuoteValue(tls *libc.TLS, pStr uintptr, pValue uintptr) {
// C documentation
//
// /*
+// ** Return true if z[] begins with N hexadecimal digits, and write
+// ** a decoding of those digits into *pVal. Or return false if any
+// ** one of the first N characters in z[] is not a hexadecimal digit.
+// */
+func _isNHex(tls *libc.TLS, z uintptr, N int32, pVal uintptr) (r int32) {
+ var i, v int32
+ _, _ = i, v
+ v = 0
+ i = 0
+ for {
+ if !(i < N) {
+ break
+ }
+ if !(libc.Int32FromUint8(_sqlite3CtypeMap[libc.Uint8FromInt8(*(*int8)(unsafe.Pointer(z + uintptr(i))))])&libc.Int32FromInt32(0x08) != 0) {
+ return 0
+ }
+ v = v<<int32(4) + libc.Int32FromUint8(_sqlite3HexToInt(tls, int32(*(*int8)(unsafe.Pointer(z + uintptr(i))))))
+ goto _1
+ _1:
+ ;
+ i++
+ }
+ *(*Tu32)(unsafe.Pointer(pVal)) = libc.Uint32FromInt32(v)
+ return int32(1)
+}
+
+// C documentation
+//
+// /*
+// ** Implementation of the UNISTR() function.
+// **
+// ** This is intended to be a work-alike of the UNISTR() function in
+// ** PostgreSQL. Quoting from the PG documentation (PostgreSQL 17 -
+// ** scraped on 2025-02-22):
+// **
+// ** Evaluate escaped Unicode characters in the argument. Unicode
+// ** characters can be specified as \XXXX (4 hexadecimal digits),
+// ** \+XXXXXX (6 hexadecimal digits), \uXXXX (4 hexadecimal digits),
+// ** or \UXXXXXXXX (8 hexadecimal digits). To specify a backslash,
+// ** write two backslashes. All other characters are taken literally.
+// */
+func _unistrFunc(tls *libc.TLS, context uintptr, argc int32, argv uintptr) {
+ bp := tls.Alloc(16)
+ defer tls.Free(16)
+ var i, j, n, nIn, v1, v2 int32
+ var z, zIn, zOut uintptr
+ var _ /* v at bp+0 */ Tu32
+ _, _, _, _, _, _, _, _, _ = i, j, n, nIn, z, zIn, zOut, v1, v2
+ _ = argc
+ zIn = Xsqlite3_value_text(tls, *(*uintptr)(unsafe.Pointer(argv)))
+ if zIn == uintptr(0) {
+ return
+ }
+ nIn = Xsqlite3_value_bytes(tls, *(*uintptr)(unsafe.Pointer(argv)))
+ zOut = Xsqlite3_malloc64(tls, libc.Uint64FromInt32(nIn+int32(1)))
+ if zOut == uintptr(0) {
+ Xsqlite3_result_error_nomem(tls, context)
+ return
+ }
+ v1 = libc.Int32FromInt32(0)
+ j = v1
+ i = v1
+ for i < nIn {
+ z = libc.Xstrchr(tls, zIn+uintptr(i), int32('\\'))
+ if z == uintptr(0) {
+ n = nIn - i
+ libc.Xmemmove(tls, zOut+uintptr(j), zIn+uintptr(i), libc.Uint32FromInt32(n))
+ j += n
+ break
+ }
+ n = int32(z) - t__predefined_ptrdiff_t(zIn+uintptr(i))
+ if n > 0 {
+ libc.Xmemmove(tls, zOut+uintptr(j), zIn+uintptr(i), libc.Uint32FromInt32(n))
+ j += n
+ i += n
+ }
+ if int32(*(*int8)(unsafe.Pointer(zIn + uintptr(i+int32(1))))) == int32('\\') {
+ i += int32(2)
+ v2 = j
+ j++
+ *(*int8)(unsafe.Pointer(zOut + uintptr(v2))) = int8('\\')
+ } else {
+ if libc.Int32FromUint8(_sqlite3CtypeMap[libc.Uint8FromInt8(*(*int8)(unsafe.Pointer(zIn + uintptr(i+int32(1)))))])&int32(0x08) != 0 {
+ if !(_isNHex(tls, zIn+uintptr(i+int32(1)), int32(4), bp) != 0) {
+ goto unistr_error
+ }
+ i += int32(5)
+ j += _sqlite3AppendOneUtf8Character(tls, zOut+uintptr(j), *(*Tu32)(unsafe.Pointer(bp)))
+ } else {
+ if int32(*(*int8)(unsafe.Pointer(zIn + uintptr(i+int32(1))))) == int32('+') {
+ if !(_isNHex(tls, zIn+uintptr(i+int32(2)), int32(6), bp) != 0) {
+ goto unistr_error
+ }
+ i += int32(8)
+ j += _sqlite3AppendOneUtf8Character(tls, zOut+uintptr(j), *(*Tu32)(unsafe.Pointer(bp)))
+ } else {
+ if int32(*(*int8)(unsafe.Pointer(zIn + uintptr(i+int32(1))))) == int32('u') {
+ if !(_isNHex(tls, zIn+uintptr(i+int32(2)), int32(4), bp) != 0) {
+ goto unistr_error
+ }
+ i += int32(6)
+ j += _sqlite3AppendOneUtf8Character(tls, zOut+uintptr(j), *(*Tu32)(unsafe.Pointer(bp)))
+ } else {
+ if int32(*(*int8)(unsafe.Pointer(zIn + uintptr(i+int32(1))))) == int32('U') {
+ if !(_isNHex(tls, zIn+uintptr(i+int32(2)), int32(8), bp) != 0) {
+ goto unistr_error
+ }
+ i += int32(10)
+ j += _sqlite3AppendOneUtf8Character(tls, zOut+uintptr(j), *(*Tu32)(unsafe.Pointer(bp)))
+ } else {
+ goto unistr_error
+ }
+ }
+ }
+ }
+ }
+ }
+ *(*int8)(unsafe.Pointer(zOut + uintptr(j))) = 0
+ Xsqlite3_result_text64(tls, context, zOut, libc.Uint64FromInt32(j), __ccgo_fp(Xsqlite3_free), uint8(SQLITE_UTF8))
+ return
+ goto unistr_error
+unistr_error:
+ ;
+ Xsqlite3_free(tls, zOut)
+ Xsqlite3_result_error(tls, context, __ccgo_ts+15530, -int32(1))
+ return
+}
+
+// C documentation
+//
+// /*
// ** Implementation of the QUOTE() function.
// **
// ** The quote(X) function returns the text of an SQL literal which is the
@@ -104953,6 +105267,10 @@ func _sqlite3QuoteValue(tls *libc.TLS, pStr uintptr, pValue uintptr) {
// ** as needed. BLOBs are encoded as hexadecimal literals. Strings with
// ** embedded NUL characters cannot be represented as string literals in SQL
// ** and hence the returned string literal is truncated prior to the first NUL.
+// **
+// ** If sqlite3_user_data() is non-zero, then the UNISTR_QUOTE() function is
+// ** implemented instead. The difference is that UNISTR_QUOTE() uses the
+// ** UNISTR() function to escape control characters.
// */
func _quoteFunc(tls *libc.TLS, context uintptr, argc int32, argv uintptr) {
bp := tls.Alloc(32)
@@ -104963,7 +105281,7 @@ func _quoteFunc(tls *libc.TLS, context uintptr, argc int32, argv uintptr) {
db = Xsqlite3_context_db_handle(tls, context)
_ = argc
_sqlite3StrAccumInit(tls, bp, db, uintptr(0), 0, *(*int32)(unsafe.Pointer(db + 116)))
- _sqlite3QuoteValue(tls, bp, *(*uintptr)(unsafe.Pointer(argv)))
+ _sqlite3QuoteValue(tls, bp, *(*uintptr)(unsafe.Pointer(argv)), int32(Xsqlite3_user_data(tls, context)))
Xsqlite3_result_text(tls, context, _sqlite3StrAccumFinish(tls, bp), libc.Int32FromUint32((*(*Tsqlite3_str)(unsafe.Pointer(bp))).FnChar), __ccgo_fp(_sqlite3OomClear))
if libc.Int32FromUint8((*(*Tsqlite3_str)(unsafe.Pointer(bp))).FaccError) != SQLITE_OK {
Xsqlite3_result_null(tls, context)
@@ -105487,7 +105805,7 @@ var _lenOne = [1]uint32{
}
var _azOne = [1]uintptr{
- 0: __ccgo_ts + 11393,
+ 0: __ccgo_ts + 11418,
}
// C documentation
@@ -105647,7 +105965,7 @@ func _soundexFunc(tls *libc.TLS, context uintptr, argc int32, argv uintptr) {
} else {
/* IMP: R-64894-50321 The string "?000" is returned if the argument
** is NULL or contains no ASCII alphabetic characters. */
- Xsqlite3_result_text(tls, context, __ccgo_ts+15501, int32(4), libc.UintptrFromInt32(0))
+ Xsqlite3_result_text(tls, context, __ccgo_ts+15553, int32(4), libc.UintptrFromInt32(0))
}
}
@@ -105708,7 +106026,7 @@ func _loadExt(tls *libc.TLS, context uintptr, argc int32, argv uintptr) {
** flag is set. See the sqlite3_enable_load_extension() API.
*/
if (*Tsqlite3)(unsafe.Pointer(db)).Fflags&uint64(SQLITE_LoadExtFunc) == uint64(0) {
- Xsqlite3_result_error(tls, context, __ccgo_ts+12611, -int32(1))
+ Xsqlite3_result_error(tls, context, __ccgo_ts+12636, -int32(1))
return
}
if argc == int32(2) {
@@ -105818,7 +106136,7 @@ func _kahanBabuskaNeumaierInit(tls *libc.TLS, p uintptr, iVal Ti64) {
// ** 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
+// ** value. TOTAL never fails, but SUM might throw an exception if
// ** it overflows an integer.
// */
func _sumStep(tls *libc.TLS, context uintptr, argc int32, argv uintptr) {
@@ -105900,7 +106218,7 @@ func _sumFinalize(tls *libc.TLS, context uintptr) {
if p != 0 && (*TSumCtx)(unsafe.Pointer(p)).Fcnt > 0 {
if (*TSumCtx)(unsafe.Pointer(p)).Fapprox != 0 {
if (*TSumCtx)(unsafe.Pointer(p)).Fovrfl != 0 {
- Xsqlite3_result_error(tls, context, __ccgo_ts+15381, -int32(1))
+ Xsqlite3_result_error(tls, context, __ccgo_ts+15406, -int32(1))
} else {
if !(_sqlite3IsOverflow(tls, (*TSumCtx)(unsafe.Pointer(p)).FrErr) != 0) {
Xsqlite3_result_double(tls, context, (*TSumCtx)(unsafe.Pointer(p)).FrSum+(*TSumCtx)(unsafe.Pointer(p)).FrErr)
@@ -106250,7 +106568,7 @@ func _groupConcatValue(tls *libc.TLS, context uintptr) {
func _sqlite3RegisterPerConnectionBuiltinFunctions(tls *libc.TLS, db uintptr) {
var rc int32
_ = rc
- rc = Xsqlite3_overload_function(tls, db, __ccgo_ts+15506, int32(2))
+ rc = Xsqlite3_overload_function(tls, db, __ccgo_ts+15558, int32(2))
if rc == int32(SQLITE_NOMEM) {
_sqlite3OomFault(tls, db)
}
@@ -106279,8 +106597,8 @@ func _sqlite3RegisterLikeFunctions(tls *libc.TLS, db uintptr, caseSensitive int3
if !(nArg <= int32(3)) {
break
}
- _sqlite3CreateFunc(tls, db, __ccgo_ts+15512, nArg, int32(SQLITE_UTF8), pInfo, __ccgo_fp(_likeFunc), uintptr(0), uintptr(0), uintptr(0), uintptr(0), uintptr(0))
- pDef = _sqlite3FindFunction(tls, db, __ccgo_ts+15512, nArg, uint8(SQLITE_UTF8), uint8(0))
+ _sqlite3CreateFunc(tls, db, __ccgo_ts+15564, nArg, int32(SQLITE_UTF8), pInfo, __ccgo_fp(_likeFunc), uintptr(0), uintptr(0), uintptr(0), uintptr(0), uintptr(0))
+ pDef = _sqlite3FindFunction(tls, db, __ccgo_ts+15564, nArg, uint8(SQLITE_UTF8), uint8(0))
*(*Tu32)(unsafe.Pointer(pDef + 4)) |= libc.Uint32FromInt32(flags)
*(*Tu32)(unsafe.Pointer(pDef + 4)) &= libc.Uint32FromInt32(^libc.Int32FromInt32(SQLITE_FUNC_UNSAFE))
goto _1
@@ -106568,7 +106886,7 @@ func _sqlite3RegisterBuiltinFunctions(tls *libc.TLS) {
_sqlite3WindowFunctions(tls)
_sqlite3RegisterDateTimeFunctions(tls)
_sqlite3RegisterJsonFunctions(tls)
- _sqlite3InsertBuiltinFuncs(tls, uintptr(unsafe.Pointer(&_aBuiltinFunc)), libc.Int32FromUint32(libc.Uint32FromInt64(4160)/libc.Uint32FromInt64(40)))
+ _sqlite3InsertBuiltinFuncs(tls, uintptr(unsafe.Pointer(&_aBuiltinFunc)), libc.Int32FromUint32(libc.Uint32FromInt64(4240)/libc.Uint32FromInt64(40)))
}
/*
@@ -106581,542 +106899,553 @@ func _sqlite3RegisterBuiltinFunctions(tls *libc.TLS) {
**
** For peak efficiency, put the most frequently used function last.
*/
-var _aBuiltinFunc = [104]TFuncDef{
+var _aBuiltinFunc = [106]TFuncDef{
0: {
FnArg: int16(2),
FfuncFlags: libc.Uint32FromInt32(libc.Int32FromInt32(SQLITE_FUNC_BUILTIN) | libc.Int32FromInt32(SQLITE_UTF8) | libc.Int32FromInt32(SQLITE_FUNC_INTERNAL) | libc.Int32FromInt32(SQLITE_FUNC_TEST) | libc.Int32FromInt32(SQLITE_FUNC_INLINE) | libc.Int32FromInt32(SQLITE_FUNC_CONSTANT) | libc.Int32FromInt32(0)),
FpUserData: uintptr(libc.Int32FromInt32(INLINEFUNC_implies_nonnull_row)),
- FzName: __ccgo_ts + 15517,
+ FzName: __ccgo_ts + 15569,
},
1: {
FnArg: int16(2),
FfuncFlags: libc.Uint32FromInt32(libc.Int32FromInt32(SQLITE_FUNC_BUILTIN) | libc.Int32FromInt32(SQLITE_UTF8) | libc.Int32FromInt32(SQLITE_FUNC_INTERNAL) | libc.Int32FromInt32(SQLITE_FUNC_TEST) | libc.Int32FromInt32(SQLITE_FUNC_INLINE) | libc.Int32FromInt32(SQLITE_FUNC_CONSTANT) | libc.Int32FromInt32(0)),
FpUserData: uintptr(libc.Int32FromInt32(INLINEFUNC_expr_compare)),
- FzName: __ccgo_ts + 15537,
+ FzName: __ccgo_ts + 15589,
},
2: {
FnArg: int16(2),
FfuncFlags: libc.Uint32FromInt32(libc.Int32FromInt32(SQLITE_FUNC_BUILTIN) | libc.Int32FromInt32(SQLITE_UTF8) | libc.Int32FromInt32(SQLITE_FUNC_INTERNAL) | libc.Int32FromInt32(SQLITE_FUNC_TEST) | libc.Int32FromInt32(SQLITE_FUNC_INLINE) | libc.Int32FromInt32(SQLITE_FUNC_CONSTANT) | libc.Int32FromInt32(0)),
FpUserData: uintptr(libc.Int32FromInt32(INLINEFUNC_expr_implies_expr)),
- FzName: __ccgo_ts + 15550,
+ FzName: __ccgo_ts + 15602,
},
3: {
FnArg: int16(1),
FfuncFlags: libc.Uint32FromInt32(libc.Int32FromInt32(SQLITE_FUNC_BUILTIN) | libc.Int32FromInt32(SQLITE_UTF8) | libc.Int32FromInt32(SQLITE_FUNC_INTERNAL) | libc.Int32FromInt32(SQLITE_FUNC_TEST) | libc.Int32FromInt32(SQLITE_FUNC_INLINE) | libc.Int32FromInt32(SQLITE_FUNC_CONSTANT) | libc.Int32FromInt32(0)),
FpUserData: uintptr(libc.Int32FromInt32(INLINEFUNC_affinity)),
- FzName: __ccgo_ts + 15568,
+ FzName: __ccgo_ts + 15620,
},
4: {
FnArg: int16(1),
FfuncFlags: libc.Uint32FromInt32(libc.Int32FromInt32(SQLITE_FUNC_BUILTIN) | libc.Int32FromInt32(SQLITE_FUNC_CONSTANT) | libc.Int32FromInt32(SQLITE_UTF8) | libc.Int32FromInt32(0)*libc.Int32FromInt32(SQLITE_FUNC_NEEDCOLL)),
- FzName: __ccgo_ts + 15577,
+ FzName: __ccgo_ts + 15629,
},
5: {
FnArg: int16(1),
FfuncFlags: libc.Uint32FromInt32(libc.Int32FromInt32(SQLITE_FUNC_BUILTIN) | libc.Int32FromInt32(SQLITE_UTF8) | libc.Int32FromInt32(SQLITE_DIRECTONLY) | libc.Int32FromInt32(SQLITE_FUNC_UNSAFE)),
- FzName: __ccgo_ts + 15585,
+ FzName: __ccgo_ts + 15637,
},
6: {
FnArg: int16(2),
FfuncFlags: libc.Uint32FromInt32(libc.Int32FromInt32(SQLITE_FUNC_BUILTIN) | libc.Int32FromInt32(SQLITE_UTF8) | libc.Int32FromInt32(SQLITE_DIRECTONLY) | libc.Int32FromInt32(SQLITE_FUNC_UNSAFE)),
- FzName: __ccgo_ts + 15585,
+ FzName: __ccgo_ts + 15637,
},
7: {
FnArg: int16(1),
FfuncFlags: libc.Uint32FromInt32(libc.Int32FromInt32(SQLITE_FUNC_BUILTIN) | libc.Int32FromInt32(SQLITE_FUNC_SLOCHNG) | libc.Int32FromInt32(SQLITE_UTF8)),
- FzName: __ccgo_ts + 15600,
+ FzName: __ccgo_ts + 15652,
},
8: {
FnArg: int16(1),
FfuncFlags: libc.Uint32FromInt32(libc.Int32FromInt32(SQLITE_FUNC_BUILTIN) | libc.Int32FromInt32(SQLITE_FUNC_SLOCHNG) | libc.Int32FromInt32(SQLITE_UTF8)),
- FzName: __ccgo_ts + 15626,
+ FzName: __ccgo_ts + 15678,
},
9: {
FnArg: int16(1),
FfuncFlags: libc.Uint32FromInt32(libc.Int32FromInt32(SQLITE_FUNC_BUILTIN) | libc.Int32FromInt32(SQLITE_UTF8) | libc.Int32FromInt32(SQLITE_FUNC_INLINE) | libc.Int32FromInt32(SQLITE_FUNC_CONSTANT) | libc.Int32FromInt32(SQLITE_FUNC_UNLIKELY)),
FpUserData: uintptr(libc.Int32FromInt32(INLINEFUNC_unlikely)),
- FzName: __ccgo_ts + 15651,
+ FzName: __ccgo_ts + 15703,
},
10: {
FnArg: int16(2),
FfuncFlags: libc.Uint32FromInt32(libc.Int32FromInt32(SQLITE_FUNC_BUILTIN) | libc.Int32FromInt32(SQLITE_UTF8) | libc.Int32FromInt32(SQLITE_FUNC_INLINE) | libc.Int32FromInt32(SQLITE_FUNC_CONSTANT) | libc.Int32FromInt32(SQLITE_FUNC_UNLIKELY)),
FpUserData: uintptr(libc.Int32FromInt32(INLINEFUNC_unlikely)),
- FzName: __ccgo_ts + 15660,
+ FzName: __ccgo_ts + 15712,
},
11: {
FnArg: int16(1),
FfuncFlags: libc.Uint32FromInt32(libc.Int32FromInt32(SQLITE_FUNC_BUILTIN) | libc.Int32FromInt32(SQLITE_UTF8) | libc.Int32FromInt32(SQLITE_FUNC_INLINE) | libc.Int32FromInt32(SQLITE_FUNC_CONSTANT) | libc.Int32FromInt32(SQLITE_FUNC_UNLIKELY)),
FpUserData: uintptr(libc.Int32FromInt32(INLINEFUNC_unlikely)),
- FzName: __ccgo_ts + 15671,
+ FzName: __ccgo_ts + 15723,
},
12: {
FnArg: int16(1),
FfuncFlags: libc.Uint32FromInt32(libc.Int32FromInt32(SQLITE_FUNC_BUILTIN) | libc.Int32FromInt32(SQLITE_UTF8) | libc.Int32FromInt32(SQLITE_FUNC_INLINE) | libc.Int32FromInt32(SQLITE_FUNC_CONSTANT) | libc.Int32FromInt32(0)),
FpUserData: uintptr(libc.Int32FromInt32(INLINEFUNC_sqlite_offset)),
- FzName: __ccgo_ts + 15678,
+ FzName: __ccgo_ts + 15730,
},
13: {
FnArg: int16(1),
FfuncFlags: libc.Uint32FromInt32(libc.Int32FromInt32(SQLITE_FUNC_BUILTIN) | libc.Int32FromInt32(SQLITE_FUNC_CONSTANT) | libc.Int32FromInt32(SQLITE_UTF8) | libc.Int32FromInt32(0)*libc.Int32FromInt32(SQLITE_FUNC_NEEDCOLL)),
FpUserData: uintptr(libc.Int32FromInt32(1)),
- FzName: __ccgo_ts + 15692,
+ FzName: __ccgo_ts + 15744,
},
14: {
FnArg: int16(2),
FfuncFlags: libc.Uint32FromInt32(libc.Int32FromInt32(SQLITE_FUNC_BUILTIN) | libc.Int32FromInt32(SQLITE_FUNC_CONSTANT) | libc.Int32FromInt32(SQLITE_UTF8) | libc.Int32FromInt32(0)*libc.Int32FromInt32(SQLITE_FUNC_NEEDCOLL)),
FpUserData: uintptr(libc.Int32FromInt32(1)),
- FzName: __ccgo_ts + 15692,
+ FzName: __ccgo_ts + 15744,
},
15: {
FnArg: int16(1),
FfuncFlags: libc.Uint32FromInt32(libc.Int32FromInt32(SQLITE_FUNC_BUILTIN) | libc.Int32FromInt32(SQLITE_FUNC_CONSTANT) | libc.Int32FromInt32(SQLITE_UTF8) | libc.Int32FromInt32(0)*libc.Int32FromInt32(SQLITE_FUNC_NEEDCOLL)),
FpUserData: uintptr(libc.Int32FromInt32(2)),
- FzName: __ccgo_ts + 15698,
+ FzName: __ccgo_ts + 15750,
},
16: {
FnArg: int16(2),
FfuncFlags: libc.Uint32FromInt32(libc.Int32FromInt32(SQLITE_FUNC_BUILTIN) | libc.Int32FromInt32(SQLITE_FUNC_CONSTANT) | libc.Int32FromInt32(SQLITE_UTF8) | libc.Int32FromInt32(0)*libc.Int32FromInt32(SQLITE_FUNC_NEEDCOLL)),
FpUserData: uintptr(libc.Int32FromInt32(2)),
- FzName: __ccgo_ts + 15698,
+ FzName: __ccgo_ts + 15750,
},
17: {
FnArg: int16(1),
FfuncFlags: libc.Uint32FromInt32(libc.Int32FromInt32(SQLITE_FUNC_BUILTIN) | libc.Int32FromInt32(SQLITE_FUNC_CONSTANT) | libc.Int32FromInt32(SQLITE_UTF8) | libc.Int32FromInt32(0)*libc.Int32FromInt32(SQLITE_FUNC_NEEDCOLL)),
FpUserData: uintptr(libc.Int32FromInt32(3)),
- FzName: __ccgo_ts + 15704,
+ FzName: __ccgo_ts + 15756,
},
18: {
FnArg: int16(2),
FfuncFlags: libc.Uint32FromInt32(libc.Int32FromInt32(SQLITE_FUNC_BUILTIN) | libc.Int32FromInt32(SQLITE_FUNC_CONSTANT) | libc.Int32FromInt32(SQLITE_UTF8) | libc.Int32FromInt32(0)*libc.Int32FromInt32(SQLITE_FUNC_NEEDCOLL)),
FpUserData: uintptr(libc.Int32FromInt32(3)),
- FzName: __ccgo_ts + 15704,
+ FzName: __ccgo_ts + 15756,
},
19: {
FnArg: int16(-int32(3)),
FfuncFlags: libc.Uint32FromInt32(libc.Int32FromInt32(SQLITE_FUNC_BUILTIN) | libc.Int32FromInt32(SQLITE_FUNC_CONSTANT) | libc.Int32FromInt32(SQLITE_UTF8) | libc.Int32FromInt32(1)*libc.Int32FromInt32(SQLITE_FUNC_NEEDCOLL)),
- FzName: __ccgo_ts + 15709,
+ FzName: __ccgo_ts + 15761,
},
20: {
FnArg: int16(1),
FfuncFlags: libc.Uint32FromInt32(libc.Int32FromInt32(SQLITE_FUNC_BUILTIN) | libc.Int32FromInt32(SQLITE_UTF8) | libc.Int32FromInt32(1)*libc.Int32FromInt32(SQLITE_FUNC_NEEDCOLL) | libc.Int32FromInt32(SQLITE_FUNC_MINMAX) | libc.Int32FromInt32(SQLITE_FUNC_ANYORDER)),
- FzName: __ccgo_ts + 15709,
+ FzName: __ccgo_ts + 15761,
},
21: {
FnArg: int16(-int32(3)),
FfuncFlags: libc.Uint32FromInt32(libc.Int32FromInt32(SQLITE_FUNC_BUILTIN) | libc.Int32FromInt32(SQLITE_FUNC_CONSTANT) | libc.Int32FromInt32(SQLITE_UTF8) | libc.Int32FromInt32(1)*libc.Int32FromInt32(SQLITE_FUNC_NEEDCOLL)),
FpUserData: uintptr(libc.Int32FromInt32(1)),
- FzName: __ccgo_ts + 15713,
+ FzName: __ccgo_ts + 15765,
},
22: {
FnArg: int16(1),
FfuncFlags: libc.Uint32FromInt32(libc.Int32FromInt32(SQLITE_FUNC_BUILTIN) | libc.Int32FromInt32(SQLITE_UTF8) | libc.Int32FromInt32(1)*libc.Int32FromInt32(SQLITE_FUNC_NEEDCOLL) | libc.Int32FromInt32(SQLITE_FUNC_MINMAX) | libc.Int32FromInt32(SQLITE_FUNC_ANYORDER)),
FpUserData: uintptr(libc.Int32FromInt32(1)),
- FzName: __ccgo_ts + 15713,
+ FzName: __ccgo_ts + 15765,
},
23: {
FnArg: int16(1),
FfuncFlags: libc.Uint32FromInt32(libc.Int32FromInt32(SQLITE_FUNC_BUILTIN) | libc.Int32FromInt32(SQLITE_FUNC_CONSTANT) | libc.Int32FromInt32(SQLITE_UTF8) | libc.Int32FromInt32(0)*libc.Int32FromInt32(SQLITE_FUNC_NEEDCOLL) | libc.Int32FromInt32(SQLITE_FUNC_TYPEOF)),
- FzName: __ccgo_ts + 15717,
+ FzName: __ccgo_ts + 15769,
},
24: {
FnArg: int16(1),
FfuncFlags: libc.Uint32FromInt32(libc.Int32FromInt32(SQLITE_FUNC_BUILTIN) | libc.Int32FromInt32(SQLITE_FUNC_CONSTANT) | libc.Int32FromInt32(SQLITE_UTF8) | libc.Int32FromInt32(0)*libc.Int32FromInt32(SQLITE_FUNC_NEEDCOLL) | libc.Int32FromInt32(SQLITE_FUNC_TYPEOF) | libc.Int32FromInt32(SQLITE_SUBTYPE)),
- FzName: __ccgo_ts + 15724,
+ FzName: __ccgo_ts + 15776,
},
25: {
FnArg: int16(1),
FfuncFlags: libc.Uint32FromInt32(libc.Int32FromInt32(SQLITE_FUNC_BUILTIN) | libc.Int32FromInt32(SQLITE_FUNC_CONSTANT) | libc.Int32FromInt32(SQLITE_UTF8) | libc.Int32FromInt32(0)*libc.Int32FromInt32(SQLITE_FUNC_NEEDCOLL) | libc.Int32FromInt32(SQLITE_FUNC_LENGTH)),
- FzName: __ccgo_ts + 15732,
+ FzName: __ccgo_ts + 15784,
},
26: {
FnArg: int16(1),
FfuncFlags: libc.Uint32FromInt32(libc.Int32FromInt32(SQLITE_FUNC_BUILTIN) | libc.Int32FromInt32(SQLITE_FUNC_CONSTANT) | libc.Int32FromInt32(SQLITE_UTF8) | libc.Int32FromInt32(0)*libc.Int32FromInt32(SQLITE_FUNC_NEEDCOLL) | libc.Int32FromInt32(SQLITE_FUNC_BYTELEN)),
- FzName: __ccgo_ts + 15739,
+ FzName: __ccgo_ts + 15791,
},
27: {
FnArg: int16(2),
FfuncFlags: libc.Uint32FromInt32(libc.Int32FromInt32(SQLITE_FUNC_BUILTIN) | libc.Int32FromInt32(SQLITE_FUNC_CONSTANT) | libc.Int32FromInt32(SQLITE_UTF8) | libc.Int32FromInt32(0)*libc.Int32FromInt32(SQLITE_FUNC_NEEDCOLL)),
- FzName: __ccgo_ts + 15752,
+ FzName: __ccgo_ts + 15804,
},
28: {
FnArg: int16(-int32(1)),
FfuncFlags: libc.Uint32FromInt32(libc.Int32FromInt32(SQLITE_FUNC_BUILTIN) | libc.Int32FromInt32(SQLITE_FUNC_CONSTANT) | libc.Int32FromInt32(SQLITE_UTF8) | libc.Int32FromInt32(0)*libc.Int32FromInt32(SQLITE_FUNC_NEEDCOLL)),
- FzName: __ccgo_ts + 15758,
+ FzName: __ccgo_ts + 15810,
},
29: {
FnArg: int16(-int32(1)),
FfuncFlags: libc.Uint32FromInt32(libc.Int32FromInt32(SQLITE_FUNC_BUILTIN) | libc.Int32FromInt32(SQLITE_FUNC_CONSTANT) | libc.Int32FromInt32(SQLITE_UTF8) | libc.Int32FromInt32(0)*libc.Int32FromInt32(SQLITE_FUNC_NEEDCOLL)),
- FzName: __ccgo_ts + 15765,
+ FzName: __ccgo_ts + 15817,
},
30: {
FnArg: int16(1),
FfuncFlags: libc.Uint32FromInt32(libc.Int32FromInt32(SQLITE_FUNC_BUILTIN) | libc.Int32FromInt32(SQLITE_FUNC_CONSTANT) | libc.Int32FromInt32(SQLITE_UTF8) | libc.Int32FromInt32(0)*libc.Int32FromInt32(SQLITE_FUNC_NEEDCOLL)),
- FzName: __ccgo_ts + 15772,
+ FzName: __ccgo_ts + 15824,
},
31: {
FnArg: int16(-int32(1)),
FfuncFlags: libc.Uint32FromInt32(libc.Int32FromInt32(SQLITE_FUNC_BUILTIN) | libc.Int32FromInt32(SQLITE_FUNC_CONSTANT) | libc.Int32FromInt32(SQLITE_UTF8) | libc.Int32FromInt32(0)*libc.Int32FromInt32(SQLITE_FUNC_NEEDCOLL)),
- FzName: __ccgo_ts + 15780,
+ FzName: __ccgo_ts + 15832,
},
32: {
FnArg: int16(1),
FfuncFlags: libc.Uint32FromInt32(libc.Int32FromInt32(SQLITE_FUNC_BUILTIN) | libc.Int32FromInt32(SQLITE_FUNC_CONSTANT) | libc.Int32FromInt32(SQLITE_UTF8) | libc.Int32FromInt32(0)*libc.Int32FromInt32(SQLITE_FUNC_NEEDCOLL)),
- FzName: __ccgo_ts + 15785,
+ FzName: __ccgo_ts + 15837,
},
33: {
FnArg: int16(1),
FfuncFlags: libc.Uint32FromInt32(libc.Int32FromInt32(SQLITE_FUNC_BUILTIN) | libc.Int32FromInt32(SQLITE_FUNC_CONSTANT) | libc.Int32FromInt32(SQLITE_UTF8) | libc.Int32FromInt32(0)*libc.Int32FromInt32(SQLITE_FUNC_NEEDCOLL)),
- FzName: __ccgo_ts + 15789,
+ FzName: __ccgo_ts + 15841,
},
34: {
FnArg: int16(2),
FfuncFlags: libc.Uint32FromInt32(libc.Int32FromInt32(SQLITE_FUNC_BUILTIN) | libc.Int32FromInt32(SQLITE_FUNC_CONSTANT) | libc.Int32FromInt32(SQLITE_UTF8) | libc.Int32FromInt32(0)*libc.Int32FromInt32(SQLITE_FUNC_NEEDCOLL)),
- FzName: __ccgo_ts + 15789,
+ FzName: __ccgo_ts + 15841,
},
35: {
FnArg: int16(1),
FfuncFlags: libc.Uint32FromInt32(libc.Int32FromInt32(SQLITE_FUNC_BUILTIN) | libc.Int32FromInt32(SQLITE_FUNC_CONSTANT) | libc.Int32FromInt32(SQLITE_UTF8) | libc.Int32FromInt32(0)*libc.Int32FromInt32(SQLITE_FUNC_NEEDCOLL)),
- FzName: __ccgo_ts + 15795,
+ FzName: __ccgo_ts + 15847,
},
36: {
FnArg: int16(1),
FfuncFlags: libc.Uint32FromInt32(libc.Int32FromInt32(SQLITE_FUNC_BUILTIN) | libc.Int32FromInt32(SQLITE_FUNC_CONSTANT) | libc.Int32FromInt32(SQLITE_UTF8) | libc.Int32FromInt32(0)*libc.Int32FromInt32(SQLITE_FUNC_NEEDCOLL)),
- FzName: __ccgo_ts + 15801,
+ FzName: __ccgo_ts + 15853,
},
37: {
FnArg: int16(1),
FfuncFlags: libc.Uint32FromInt32(libc.Int32FromInt32(SQLITE_FUNC_BUILTIN) | libc.Int32FromInt32(SQLITE_FUNC_CONSTANT) | libc.Int32FromInt32(SQLITE_UTF8) | libc.Int32FromInt32(0)*libc.Int32FromInt32(SQLITE_FUNC_NEEDCOLL)),
- FzName: __ccgo_ts + 15807,
+ FzName: __ccgo_ts + 15859,
},
38: {
FnArg: int16(1),
FfuncFlags: libc.Uint32FromInt32(libc.Int32FromInt32(SQLITE_FUNC_BUILTIN) | libc.Int32FromInt32(SQLITE_FUNC_CONSTANT) | libc.Int32FromInt32(SQLITE_UTF8) | libc.Int32FromInt32(0)*libc.Int32FromInt32(SQLITE_FUNC_NEEDCOLL)),
- FzName: __ccgo_ts + 15811,
+ FzName: __ccgo_ts + 15863,
},
39: {
FnArg: int16(2),
FfuncFlags: libc.Uint32FromInt32(libc.Int32FromInt32(SQLITE_FUNC_BUILTIN) | libc.Int32FromInt32(SQLITE_FUNC_CONSTANT) | libc.Int32FromInt32(SQLITE_UTF8) | libc.Int32FromInt32(0)*libc.Int32FromInt32(SQLITE_FUNC_NEEDCOLL)),
- FzName: __ccgo_ts + 15811,
+ FzName: __ccgo_ts + 15863,
},
40: {
FnArg: int16(-int32(3)),
FfuncFlags: libc.Uint32FromInt32(libc.Int32FromInt32(SQLITE_FUNC_BUILTIN) | libc.Int32FromInt32(SQLITE_FUNC_CONSTANT) | libc.Int32FromInt32(SQLITE_UTF8) | libc.Int32FromInt32(0)*libc.Int32FromInt32(SQLITE_FUNC_NEEDCOLL)),
- FzName: __ccgo_ts + 15817,
+ FzName: __ccgo_ts + 15869,
},
41: {
FnArg: int16(-int32(4)),
FfuncFlags: libc.Uint32FromInt32(libc.Int32FromInt32(SQLITE_FUNC_BUILTIN) | libc.Int32FromInt32(SQLITE_FUNC_CONSTANT) | libc.Int32FromInt32(SQLITE_UTF8) | libc.Int32FromInt32(0)*libc.Int32FromInt32(SQLITE_FUNC_NEEDCOLL)),
- FzName: __ccgo_ts + 15824,
+ FzName: __ccgo_ts + 15876,
},
42: {
FnArg: int16(2),
FfuncFlags: libc.Uint32FromInt32(libc.Int32FromInt32(SQLITE_FUNC_BUILTIN) | libc.Int32FromInt32(SQLITE_UTF8) | libc.Int32FromInt32(SQLITE_FUNC_INLINE) | libc.Int32FromInt32(SQLITE_FUNC_CONSTANT) | libc.Int32FromInt32(0)),
- FzName: __ccgo_ts + 15834,
+ FzName: __ccgo_ts + 15886,
},
43: {
FfuncFlags: libc.Uint32FromInt32(libc.Int32FromInt32(SQLITE_FUNC_BUILTIN) | libc.Int32FromInt32(SQLITE_UTF8) | libc.Int32FromInt32(0)*libc.Int32FromInt32(SQLITE_FUNC_NEEDCOLL)),
- FzName: __ccgo_ts + 15841,
+ FzName: __ccgo_ts + 15893,
},
44: {
FnArg: int16(1),
FfuncFlags: libc.Uint32FromInt32(libc.Int32FromInt32(SQLITE_FUNC_BUILTIN) | libc.Int32FromInt32(SQLITE_UTF8) | libc.Int32FromInt32(0)*libc.Int32FromInt32(SQLITE_FUNC_NEEDCOLL)),
- FzName: __ccgo_ts + 15848,
+ FzName: __ccgo_ts + 15900,
},
45: {
FnArg: int16(2),
FfuncFlags: libc.Uint32FromInt32(libc.Int32FromInt32(SQLITE_FUNC_BUILTIN) | libc.Int32FromInt32(SQLITE_FUNC_CONSTANT) | libc.Int32FromInt32(SQLITE_UTF8) | libc.Int32FromInt32(1)*libc.Int32FromInt32(SQLITE_FUNC_NEEDCOLL)),
- FzName: __ccgo_ts + 15859,
+ FzName: __ccgo_ts + 15911,
},
46: {
FfuncFlags: libc.Uint32FromInt32(libc.Int32FromInt32(SQLITE_FUNC_BUILTIN) | libc.Int32FromInt32(SQLITE_FUNC_SLOCHNG) | libc.Int32FromInt32(SQLITE_UTF8)),
- FzName: __ccgo_ts + 15866,
+ FzName: __ccgo_ts + 15918,
},
47: {
FfuncFlags: libc.Uint32FromInt32(libc.Int32FromInt32(SQLITE_FUNC_BUILTIN) | libc.Int32FromInt32(SQLITE_FUNC_SLOCHNG) | libc.Int32FromInt32(SQLITE_UTF8)),
- FzName: __ccgo_ts + 15881,
+ FzName: __ccgo_ts + 15933,
},
48: {
FnArg: int16(2),
FfuncFlags: libc.Uint32FromInt32(libc.Int32FromInt32(SQLITE_FUNC_BUILTIN) | libc.Int32FromInt32(SQLITE_FUNC_CONSTANT) | libc.Int32FromInt32(SQLITE_UTF8) | libc.Int32FromInt32(0)*libc.Int32FromInt32(SQLITE_FUNC_NEEDCOLL)),
- FzName: __ccgo_ts + 15898,
+ FzName: __ccgo_ts + 15950,
},
49: {
FnArg: int16(1),
FfuncFlags: libc.Uint32FromInt32(libc.Int32FromInt32(SQLITE_FUNC_BUILTIN) | libc.Int32FromInt32(SQLITE_FUNC_CONSTANT) | libc.Int32FromInt32(SQLITE_UTF8) | libc.Int32FromInt32(0)*libc.Int32FromInt32(SQLITE_FUNC_NEEDCOLL)),
- FzName: __ccgo_ts + 15909,
+ FzName: __ccgo_ts + 15961,
},
50: {
- FfuncFlags: libc.Uint32FromInt32(libc.Int32FromInt32(SQLITE_FUNC_BUILTIN) | libc.Int32FromInt32(SQLITE_UTF8) | libc.Int32FromInt32(0)*libc.Int32FromInt32(SQLITE_FUNC_NEEDCOLL)),
- FzName: __ccgo_ts + 15915,
+ FnArg: int16(1),
+ FfuncFlags: libc.Uint32FromInt32(libc.Int32FromInt32(SQLITE_FUNC_BUILTIN) | libc.Int32FromInt32(SQLITE_FUNC_CONSTANT) | libc.Int32FromInt32(SQLITE_UTF8) | libc.Int32FromInt32(0)*libc.Int32FromInt32(SQLITE_FUNC_NEEDCOLL)),
+ FzName: __ccgo_ts + 15968,
},
51: {
- FfuncFlags: libc.Uint32FromInt32(libc.Int32FromInt32(SQLITE_FUNC_BUILTIN) | libc.Int32FromInt32(SQLITE_UTF8) | libc.Int32FromInt32(0)*libc.Int32FromInt32(SQLITE_FUNC_NEEDCOLL)),
- FzName: __ccgo_ts + 15933,
+ FnArg: int16(1),
+ FfuncFlags: libc.Uint32FromInt32(libc.Int32FromInt32(SQLITE_FUNC_BUILTIN) | libc.Int32FromInt32(SQLITE_FUNC_CONSTANT) | libc.Int32FromInt32(SQLITE_UTF8) | libc.Int32FromInt32(0)*libc.Int32FromInt32(SQLITE_FUNC_NEEDCOLL)),
+ FpUserData: uintptr(libc.Int32FromInt32(1)),
+ FzName: __ccgo_ts + 15974,
},
52: {
FfuncFlags: libc.Uint32FromInt32(libc.Int32FromInt32(SQLITE_FUNC_BUILTIN) | libc.Int32FromInt32(SQLITE_UTF8) | libc.Int32FromInt32(0)*libc.Int32FromInt32(SQLITE_FUNC_NEEDCOLL)),
- FzName: __ccgo_ts + 15941,
+ FzName: __ccgo_ts + 15987,
},
53: {
- FnArg: int16(3),
- FfuncFlags: libc.Uint32FromInt32(libc.Int32FromInt32(SQLITE_FUNC_BUILTIN) | libc.Int32FromInt32(SQLITE_FUNC_CONSTANT) | libc.Int32FromInt32(SQLITE_UTF8) | libc.Int32FromInt32(0)*libc.Int32FromInt32(SQLITE_FUNC_NEEDCOLL)),
- FzName: __ccgo_ts + 15955,
+ FfuncFlags: libc.Uint32FromInt32(libc.Int32FromInt32(SQLITE_FUNC_BUILTIN) | libc.Int32FromInt32(SQLITE_UTF8) | libc.Int32FromInt32(0)*libc.Int32FromInt32(SQLITE_FUNC_NEEDCOLL)),
+ FzName: __ccgo_ts + 16005,
},
54: {
- FnArg: int16(1),
- FfuncFlags: libc.Uint32FromInt32(libc.Int32FromInt32(SQLITE_FUNC_BUILTIN) | libc.Int32FromInt32(SQLITE_FUNC_CONSTANT) | libc.Int32FromInt32(SQLITE_UTF8) | libc.Int32FromInt32(0)*libc.Int32FromInt32(SQLITE_FUNC_NEEDCOLL)),
- FzName: __ccgo_ts + 15963,
+ FfuncFlags: libc.Uint32FromInt32(libc.Int32FromInt32(SQLITE_FUNC_BUILTIN) | libc.Int32FromInt32(SQLITE_UTF8) | libc.Int32FromInt32(0)*libc.Int32FromInt32(SQLITE_FUNC_NEEDCOLL)),
+ FzName: __ccgo_ts + 16013,
},
55: {
- FnArg: int16(2),
+ FnArg: int16(3),
FfuncFlags: libc.Uint32FromInt32(libc.Int32FromInt32(SQLITE_FUNC_BUILTIN) | libc.Int32FromInt32(SQLITE_FUNC_CONSTANT) | libc.Int32FromInt32(SQLITE_UTF8) | libc.Int32FromInt32(0)*libc.Int32FromInt32(SQLITE_FUNC_NEEDCOLL)),
- FzName: __ccgo_ts + 15972,
+ FzName: __ccgo_ts + 16027,
},
56: {
- FnArg: int16(3),
+ FnArg: int16(1),
FfuncFlags: libc.Uint32FromInt32(libc.Int32FromInt32(SQLITE_FUNC_BUILTIN) | libc.Int32FromInt32(SQLITE_FUNC_CONSTANT) | libc.Int32FromInt32(SQLITE_UTF8) | libc.Int32FromInt32(0)*libc.Int32FromInt32(SQLITE_FUNC_NEEDCOLL)),
- FzName: __ccgo_ts + 15972,
+ FzName: __ccgo_ts + 16035,
},
57: {
FnArg: int16(2),
FfuncFlags: libc.Uint32FromInt32(libc.Int32FromInt32(SQLITE_FUNC_BUILTIN) | libc.Int32FromInt32(SQLITE_FUNC_CONSTANT) | libc.Int32FromInt32(SQLITE_UTF8) | libc.Int32FromInt32(0)*libc.Int32FromInt32(SQLITE_FUNC_NEEDCOLL)),
- FzName: __ccgo_ts + 15979,
+ FzName: __ccgo_ts + 16044,
},
58: {
FnArg: int16(3),
FfuncFlags: libc.Uint32FromInt32(libc.Int32FromInt32(SQLITE_FUNC_BUILTIN) | libc.Int32FromInt32(SQLITE_FUNC_CONSTANT) | libc.Int32FromInt32(SQLITE_UTF8) | libc.Int32FromInt32(0)*libc.Int32FromInt32(SQLITE_FUNC_NEEDCOLL)),
- FzName: __ccgo_ts + 15979,
+ FzName: __ccgo_ts + 16044,
},
59: {
+ FnArg: int16(2),
+ FfuncFlags: libc.Uint32FromInt32(libc.Int32FromInt32(SQLITE_FUNC_BUILTIN) | libc.Int32FromInt32(SQLITE_FUNC_CONSTANT) | libc.Int32FromInt32(SQLITE_UTF8) | libc.Int32FromInt32(0)*libc.Int32FromInt32(SQLITE_FUNC_NEEDCOLL)),
+ FzName: __ccgo_ts + 16051,
+ },
+ 60: {
+ FnArg: int16(3),
+ FfuncFlags: libc.Uint32FromInt32(libc.Int32FromInt32(SQLITE_FUNC_BUILTIN) | libc.Int32FromInt32(SQLITE_FUNC_CONSTANT) | libc.Int32FromInt32(SQLITE_UTF8) | libc.Int32FromInt32(0)*libc.Int32FromInt32(SQLITE_FUNC_NEEDCOLL)),
+ FzName: __ccgo_ts + 16051,
+ },
+ 61: {
FnArg: int16(1),
FfuncFlags: libc.Uint32FromInt32(libc.Int32FromInt32(SQLITE_FUNC_BUILTIN) | libc.Int32FromInt32(SQLITE_UTF8) | libc.Int32FromInt32(0)*libc.Int32FromInt32(SQLITE_FUNC_NEEDCOLL) | libc.Int32FromInt32(0)),
- FzName: __ccgo_ts + 15989,
+ FzName: __ccgo_ts + 16061,
},
- 60: {
+ 62: {
FnArg: int16(1),
FfuncFlags: libc.Uint32FromInt32(libc.Int32FromInt32(SQLITE_FUNC_BUILTIN) | libc.Int32FromInt32(SQLITE_UTF8) | libc.Int32FromInt32(0)*libc.Int32FromInt32(SQLITE_FUNC_NEEDCOLL) | libc.Int32FromInt32(0)),
- FzName: __ccgo_ts + 15993,
+ FzName: __ccgo_ts + 16065,
},
- 61: {
+ 63: {
FnArg: int16(1),
FfuncFlags: libc.Uint32FromInt32(libc.Int32FromInt32(SQLITE_FUNC_BUILTIN) | libc.Int32FromInt32(SQLITE_UTF8) | libc.Int32FromInt32(0)*libc.Int32FromInt32(SQLITE_FUNC_NEEDCOLL) | libc.Int32FromInt32(0)),
- FzName: __ccgo_ts + 15999,
+ FzName: __ccgo_ts + 16071,
},
- 62: {
+ 64: {
FfuncFlags: libc.Uint32FromInt32(libc.Int32FromInt32(SQLITE_FUNC_BUILTIN) | libc.Int32FromInt32(SQLITE_UTF8) | libc.Int32FromInt32(0)*libc.Int32FromInt32(SQLITE_FUNC_NEEDCOLL) | libc.Int32FromInt32(SQLITE_FUNC_COUNT) | libc.Int32FromInt32(SQLITE_FUNC_ANYORDER)),
- FzName: __ccgo_ts + 16003,
+ FzName: __ccgo_ts + 16075,
},
- 63: {
+ 65: {
FnArg: int16(1),
FfuncFlags: libc.Uint32FromInt32(libc.Int32FromInt32(SQLITE_FUNC_BUILTIN) | libc.Int32FromInt32(SQLITE_UTF8) | libc.Int32FromInt32(0)*libc.Int32FromInt32(SQLITE_FUNC_NEEDCOLL) | libc.Int32FromInt32(SQLITE_FUNC_ANYORDER)),
- FzName: __ccgo_ts + 16003,
+ FzName: __ccgo_ts + 16075,
},
- 64: {
+ 66: {
FnArg: int16(1),
FfuncFlags: libc.Uint32FromInt32(libc.Int32FromInt32(SQLITE_FUNC_BUILTIN) | libc.Int32FromInt32(SQLITE_UTF8) | libc.Int32FromInt32(0)*libc.Int32FromInt32(SQLITE_FUNC_NEEDCOLL) | libc.Int32FromInt32(0)),
- FzName: __ccgo_ts + 16009,
+ FzName: __ccgo_ts + 16081,
},
- 65: {
+ 67: {
FnArg: int16(2),
FfuncFlags: libc.Uint32FromInt32(libc.Int32FromInt32(SQLITE_FUNC_BUILTIN) | libc.Int32FromInt32(SQLITE_UTF8) | libc.Int32FromInt32(0)*libc.Int32FromInt32(SQLITE_FUNC_NEEDCOLL) | libc.Int32FromInt32(0)),
- FzName: __ccgo_ts + 16009,
+ FzName: __ccgo_ts + 16081,
},
- 66: {
+ 68: {
FnArg: int16(2),
FfuncFlags: libc.Uint32FromInt32(libc.Int32FromInt32(SQLITE_FUNC_BUILTIN) | libc.Int32FromInt32(SQLITE_UTF8) | libc.Int32FromInt32(0)*libc.Int32FromInt32(SQLITE_FUNC_NEEDCOLL) | libc.Int32FromInt32(0)),
- FzName: __ccgo_ts + 16022,
+ FzName: __ccgo_ts + 16094,
},
- 67: {
+ 69: {
FnArg: int16(2),
FfuncFlags: libc.Uint32FromInt32(libc.Int32FromInt32(SQLITE_FUNC_BUILTIN) | libc.Int32FromInt32(SQLITE_FUNC_CONSTANT) | libc.Int32FromInt32(SQLITE_UTF8) | libc.Int32FromInt32(SQLITE_FUNC_LIKE) | libc.Int32FromInt32(SQLITE_FUNC_CASE)),
FpUserData: uintptr(unsafe.Pointer(&_globInfo)),
- FzName: __ccgo_ts + 16033,
+ FzName: __ccgo_ts + 16105,
},
- 68: {
+ 70: {
FnArg: int16(2),
FfuncFlags: libc.Uint32FromInt32(libc.Int32FromInt32(SQLITE_FUNC_BUILTIN) | libc.Int32FromInt32(SQLITE_FUNC_CONSTANT) | libc.Int32FromInt32(SQLITE_UTF8) | libc.Int32FromInt32(SQLITE_FUNC_LIKE)),
FpUserData: uintptr(unsafe.Pointer(&_likeInfoNorm)),
- FzName: __ccgo_ts + 15512,
+ FzName: __ccgo_ts + 15564,
},
- 69: {
+ 71: {
FnArg: int16(3),
FfuncFlags: libc.Uint32FromInt32(libc.Int32FromInt32(SQLITE_FUNC_BUILTIN) | libc.Int32FromInt32(SQLITE_FUNC_CONSTANT) | libc.Int32FromInt32(SQLITE_UTF8) | libc.Int32FromInt32(SQLITE_FUNC_LIKE)),
FpUserData: uintptr(unsafe.Pointer(&_likeInfoNorm)),
- FzName: __ccgo_ts + 15512,
+ FzName: __ccgo_ts + 15564,
},
- 70: {
+ 72: {
FnArg: int16(1),
FfuncFlags: libc.Uint32FromInt32(libc.Int32FromInt32(SQLITE_FUNC_BUILTIN) | libc.Int32FromInt32(SQLITE_FUNC_CONSTANT) | libc.Int32FromInt32(SQLITE_UTF8)),
- FzName: __ccgo_ts + 16038,
+ FzName: __ccgo_ts + 16110,
},
- 71: {
+ 73: {
FnArg: int16(1),
FfuncFlags: libc.Uint32FromInt32(libc.Int32FromInt32(SQLITE_FUNC_BUILTIN) | libc.Int32FromInt32(SQLITE_FUNC_CONSTANT) | libc.Int32FromInt32(SQLITE_UTF8)),
FzName: __ccgo_ts + 1240,
},
- 72: {
+ 74: {
FnArg: int16(1),
FfuncFlags: libc.Uint32FromInt32(libc.Int32FromInt32(SQLITE_FUNC_BUILTIN) | libc.Int32FromInt32(SQLITE_FUNC_CONSTANT) | libc.Int32FromInt32(SQLITE_UTF8)),
FzName: __ccgo_ts + 1248,
},
- 73: {
+ 75: {
FnArg: int16(1),
FfuncFlags: libc.Uint32FromInt32(libc.Int32FromInt32(SQLITE_FUNC_BUILTIN) | libc.Int32FromInt32(SQLITE_FUNC_CONSTANT) | libc.Int32FromInt32(SQLITE_UTF8)),
- FzName: __ccgo_ts + 16043,
+ FzName: __ccgo_ts + 16115,
},
- 74: {
+ 76: {
FnArg: int16(1),
FfuncFlags: libc.Uint32FromInt32(libc.Int32FromInt32(SQLITE_FUNC_BUILTIN) | libc.Int32FromInt32(SQLITE_FUNC_CONSTANT) | libc.Int32FromInt32(SQLITE_UTF8) | libc.Int32FromInt32(0)*libc.Int32FromInt32(SQLITE_FUNC_NEEDCOLL)),
- FzName: __ccgo_ts + 16049,
+ FzName: __ccgo_ts + 16121,
},
- 75: {
+ 77: {
FnArg: int16(1),
FfuncFlags: libc.Uint32FromInt32(libc.Int32FromInt32(SQLITE_FUNC_BUILTIN) | libc.Int32FromInt32(SQLITE_FUNC_CONSTANT) | libc.Int32FromInt32(SQLITE_UTF8) | libc.Int32FromInt32(0)*libc.Int32FromInt32(SQLITE_FUNC_NEEDCOLL)),
FpUserData: uintptr(libc.Int32FromInt32(1)),
- FzName: __ccgo_ts + 16052,
+ FzName: __ccgo_ts + 16124,
},
- 76: {
+ 78: {
FnArg: int16(1),
FfuncFlags: libc.Uint32FromInt32(libc.Int32FromInt32(SQLITE_FUNC_BUILTIN) | libc.Int32FromInt32(SQLITE_FUNC_CONSTANT) | libc.Int32FromInt32(SQLITE_UTF8) | libc.Int32FromInt32(0)*libc.Int32FromInt32(SQLITE_FUNC_NEEDCOLL)),
FpUserData: uintptr(libc.Int32FromInt32(1)),
- FzName: __ccgo_ts + 16056,
+ FzName: __ccgo_ts + 16128,
},
- 77: {
+ 79: {
FnArg: int16(1),
FfuncFlags: libc.Uint32FromInt32(libc.Int32FromInt32(SQLITE_FUNC_BUILTIN) | libc.Int32FromInt32(SQLITE_FUNC_CONSTANT) | libc.Int32FromInt32(SQLITE_UTF8) | libc.Int32FromInt32(0)*libc.Int32FromInt32(SQLITE_FUNC_NEEDCOLL)),
FpUserData: uintptr(libc.Int32FromInt32(2)),
- FzName: __ccgo_ts + 16062,
- },
- 78: {
- FnArg: int16(2),
- FfuncFlags: libc.Uint32FromInt32(libc.Int32FromInt32(SQLITE_FUNC_BUILTIN) | libc.Int32FromInt32(SQLITE_FUNC_CONSTANT) | libc.Int32FromInt32(SQLITE_UTF8) | libc.Int32FromInt32(0)*libc.Int32FromInt32(SQLITE_FUNC_NEEDCOLL)),
- FzName: __ccgo_ts + 16052,
- },
- 79: {
- FnArg: int16(1),
- FfuncFlags: libc.Uint32FromInt32(libc.Int32FromInt32(SQLITE_FUNC_BUILTIN) | libc.Int32FromInt32(SQLITE_FUNC_CONSTANT) | libc.Int32FromInt32(SQLITE_UTF8)),
- FzName: __ccgo_ts + 16067,
+ FzName: __ccgo_ts + 16134,
},
80: {
FnArg: int16(2),
- FfuncFlags: libc.Uint32FromInt32(libc.Int32FromInt32(SQLITE_FUNC_BUILTIN) | libc.Int32FromInt32(SQLITE_FUNC_CONSTANT) | libc.Int32FromInt32(SQLITE_UTF8)),
- FzName: __ccgo_ts + 16071,
+ FfuncFlags: libc.Uint32FromInt32(libc.Int32FromInt32(SQLITE_FUNC_BUILTIN) | libc.Int32FromInt32(SQLITE_FUNC_CONSTANT) | libc.Int32FromInt32(SQLITE_UTF8) | libc.Int32FromInt32(0)*libc.Int32FromInt32(SQLITE_FUNC_NEEDCOLL)),
+ FzName: __ccgo_ts + 16124,
},
81: {
- FnArg: int16(2),
+ FnArg: int16(1),
FfuncFlags: libc.Uint32FromInt32(libc.Int32FromInt32(SQLITE_FUNC_BUILTIN) | libc.Int32FromInt32(SQLITE_FUNC_CONSTANT) | libc.Int32FromInt32(SQLITE_UTF8)),
- FzName: __ccgo_ts + 16075,
+ FzName: __ccgo_ts + 16139,
},
82: {
FnArg: int16(2),
FfuncFlags: libc.Uint32FromInt32(libc.Int32FromInt32(SQLITE_FUNC_BUILTIN) | libc.Int32FromInt32(SQLITE_FUNC_CONSTANT) | libc.Int32FromInt32(SQLITE_UTF8)),
- FzName: __ccgo_ts + 16081,
+ FzName: __ccgo_ts + 16143,
},
83: {
- FnArg: int16(1),
+ FnArg: int16(2),
FfuncFlags: libc.Uint32FromInt32(libc.Int32FromInt32(SQLITE_FUNC_BUILTIN) | libc.Int32FromInt32(SQLITE_FUNC_CONSTANT) | libc.Int32FromInt32(SQLITE_UTF8)),
- FzName: __ccgo_ts + 16085,
+ FzName: __ccgo_ts + 16147,
},
84: {
- FnArg: int16(1),
+ FnArg: int16(2),
FfuncFlags: libc.Uint32FromInt32(libc.Int32FromInt32(SQLITE_FUNC_BUILTIN) | libc.Int32FromInt32(SQLITE_FUNC_CONSTANT) | libc.Int32FromInt32(SQLITE_UTF8)),
- FzName: __ccgo_ts + 16090,
+ FzName: __ccgo_ts + 16153,
},
85: {
FnArg: int16(1),
FfuncFlags: libc.Uint32FromInt32(libc.Int32FromInt32(SQLITE_FUNC_BUILTIN) | libc.Int32FromInt32(SQLITE_FUNC_CONSTANT) | libc.Int32FromInt32(SQLITE_UTF8)),
- FzName: __ccgo_ts + 16095,
+ FzName: __ccgo_ts + 16157,
},
86: {
- FnArg: int16(2),
+ FnArg: int16(1),
FfuncFlags: libc.Uint32FromInt32(libc.Int32FromInt32(SQLITE_FUNC_BUILTIN) | libc.Int32FromInt32(SQLITE_FUNC_CONSTANT) | libc.Int32FromInt32(SQLITE_UTF8)),
- FzName: __ccgo_ts + 16100,
+ FzName: __ccgo_ts + 16162,
},
87: {
FnArg: int16(1),
FfuncFlags: libc.Uint32FromInt32(libc.Int32FromInt32(SQLITE_FUNC_BUILTIN) | libc.Int32FromInt32(SQLITE_FUNC_CONSTANT) | libc.Int32FromInt32(SQLITE_UTF8)),
- FzName: __ccgo_ts + 16106,
+ FzName: __ccgo_ts + 16167,
},
88: {
- FnArg: int16(1),
+ FnArg: int16(2),
FfuncFlags: libc.Uint32FromInt32(libc.Int32FromInt32(SQLITE_FUNC_BUILTIN) | libc.Int32FromInt32(SQLITE_FUNC_CONSTANT) | libc.Int32FromInt32(SQLITE_UTF8)),
- FzName: __ccgo_ts + 16110,
+ FzName: __ccgo_ts + 16172,
},
89: {
FnArg: int16(1),
FfuncFlags: libc.Uint32FromInt32(libc.Int32FromInt32(SQLITE_FUNC_BUILTIN) | libc.Int32FromInt32(SQLITE_FUNC_CONSTANT) | libc.Int32FromInt32(SQLITE_UTF8)),
- FzName: __ccgo_ts + 16114,
+ FzName: __ccgo_ts + 16178,
},
90: {
FnArg: int16(1),
FfuncFlags: libc.Uint32FromInt32(libc.Int32FromInt32(SQLITE_FUNC_BUILTIN) | libc.Int32FromInt32(SQLITE_FUNC_CONSTANT) | libc.Int32FromInt32(SQLITE_UTF8)),
- FzName: __ccgo_ts + 16118,
+ FzName: __ccgo_ts + 16182,
},
91: {
FnArg: int16(1),
FfuncFlags: libc.Uint32FromInt32(libc.Int32FromInt32(SQLITE_FUNC_BUILTIN) | libc.Int32FromInt32(SQLITE_FUNC_CONSTANT) | libc.Int32FromInt32(SQLITE_UTF8)),
- FzName: __ccgo_ts + 16123,
+ FzName: __ccgo_ts + 16186,
},
92: {
FnArg: int16(1),
FfuncFlags: libc.Uint32FromInt32(libc.Int32FromInt32(SQLITE_FUNC_BUILTIN) | libc.Int32FromInt32(SQLITE_FUNC_CONSTANT) | libc.Int32FromInt32(SQLITE_UTF8)),
- FzName: __ccgo_ts + 16128,
+ FzName: __ccgo_ts + 16190,
},
93: {
FnArg: int16(1),
FfuncFlags: libc.Uint32FromInt32(libc.Int32FromInt32(SQLITE_FUNC_BUILTIN) | libc.Int32FromInt32(SQLITE_FUNC_CONSTANT) | libc.Int32FromInt32(SQLITE_UTF8)),
- FzName: __ccgo_ts + 16133,
+ FzName: __ccgo_ts + 16195,
},
94: {
FnArg: int16(1),
FfuncFlags: libc.Uint32FromInt32(libc.Int32FromInt32(SQLITE_FUNC_BUILTIN) | libc.Int32FromInt32(SQLITE_FUNC_CONSTANT) | libc.Int32FromInt32(SQLITE_UTF8)),
- FzName: __ccgo_ts + 16139,
+ FzName: __ccgo_ts + 16200,
},
95: {
FnArg: int16(1),
FfuncFlags: libc.Uint32FromInt32(libc.Int32FromInt32(SQLITE_FUNC_BUILTIN) | libc.Int32FromInt32(SQLITE_FUNC_CONSTANT) | libc.Int32FromInt32(SQLITE_UTF8)),
- FzName: __ccgo_ts + 16145,
+ FzName: __ccgo_ts + 16205,
},
96: {
FnArg: int16(1),
FfuncFlags: libc.Uint32FromInt32(libc.Int32FromInt32(SQLITE_FUNC_BUILTIN) | libc.Int32FromInt32(SQLITE_FUNC_CONSTANT) | libc.Int32FromInt32(SQLITE_UTF8)),
- FzName: __ccgo_ts + 16151,
+ FzName: __ccgo_ts + 16211,
},
97: {
FnArg: int16(1),
FfuncFlags: libc.Uint32FromInt32(libc.Int32FromInt32(SQLITE_FUNC_BUILTIN) | libc.Int32FromInt32(SQLITE_FUNC_CONSTANT) | libc.Int32FromInt32(SQLITE_UTF8)),
- FzName: __ccgo_ts + 16156,
+ FzName: __ccgo_ts + 16217,
},
98: {
FnArg: int16(1),
FfuncFlags: libc.Uint32FromInt32(libc.Int32FromInt32(SQLITE_FUNC_BUILTIN) | libc.Int32FromInt32(SQLITE_FUNC_CONSTANT) | libc.Int32FromInt32(SQLITE_UTF8)),
- FzName: __ccgo_ts + 16164,
+ FzName: __ccgo_ts + 16223,
},
99: {
+ FnArg: int16(1),
FfuncFlags: libc.Uint32FromInt32(libc.Int32FromInt32(SQLITE_FUNC_BUILTIN) | libc.Int32FromInt32(SQLITE_FUNC_CONSTANT) | libc.Int32FromInt32(SQLITE_UTF8)),
- FzName: __ccgo_ts + 16172,
+ FzName: __ccgo_ts + 16228,
},
100: {
FnArg: int16(1),
- FfuncFlags: libc.Uint32FromInt32(libc.Int32FromInt32(SQLITE_FUNC_BUILTIN) | libc.Int32FromInt32(SQLITE_FUNC_CONSTANT) | libc.Int32FromInt32(SQLITE_UTF8) | libc.Int32FromInt32(0)*libc.Int32FromInt32(SQLITE_FUNC_NEEDCOLL)),
- FzName: __ccgo_ts + 16175,
+ FfuncFlags: libc.Uint32FromInt32(libc.Int32FromInt32(SQLITE_FUNC_BUILTIN) | libc.Int32FromInt32(SQLITE_FUNC_CONSTANT) | libc.Int32FromInt32(SQLITE_UTF8)),
+ FzName: __ccgo_ts + 16236,
},
101: {
+ FfuncFlags: libc.Uint32FromInt32(libc.Int32FromInt32(SQLITE_FUNC_BUILTIN) | libc.Int32FromInt32(SQLITE_FUNC_CONSTANT) | libc.Int32FromInt32(SQLITE_UTF8)),
+ FzName: __ccgo_ts + 16244,
+ },
+ 102: {
+ FnArg: int16(1),
+ FfuncFlags: libc.Uint32FromInt32(libc.Int32FromInt32(SQLITE_FUNC_BUILTIN) | libc.Int32FromInt32(SQLITE_FUNC_CONSTANT) | libc.Int32FromInt32(SQLITE_UTF8) | libc.Int32FromInt32(0)*libc.Int32FromInt32(SQLITE_FUNC_NEEDCOLL)),
+ FzName: __ccgo_ts + 16247,
+ },
+ 103: {
FnArg: int16(-int32(4)),
FfuncFlags: libc.Uint32FromInt32(libc.Int32FromInt32(SQLITE_FUNC_BUILTIN) | libc.Int32FromInt32(SQLITE_UTF8) | libc.Int32FromInt32(SQLITE_FUNC_INLINE) | libc.Int32FromInt32(SQLITE_FUNC_CONSTANT) | libc.Int32FromInt32(0)),
- FzName: __ccgo_ts + 6860,
+ FzName: __ccgo_ts + 6885,
},
- 102: {
+ 104: {
FnArg: int16(-int32(4)),
FfuncFlags: libc.Uint32FromInt32(libc.Int32FromInt32(SQLITE_FUNC_BUILTIN) | libc.Int32FromInt32(SQLITE_UTF8) | libc.Int32FromInt32(SQLITE_FUNC_INLINE) | libc.Int32FromInt32(SQLITE_FUNC_CONSTANT) | libc.Int32FromInt32(0)),
FpUserData: uintptr(libc.Int32FromInt32(INLINEFUNC_iif)),
- FzName: __ccgo_ts + 16180,
+ FzName: __ccgo_ts + 16252,
},
- 103: {
+ 105: {
FnArg: int16(-int32(4)),
FfuncFlags: libc.Uint32FromInt32(libc.Int32FromInt32(SQLITE_FUNC_BUILTIN) | libc.Int32FromInt32(SQLITE_UTF8) | libc.Int32FromInt32(SQLITE_FUNC_INLINE) | libc.Int32FromInt32(SQLITE_FUNC_CONSTANT) | libc.Int32FromInt32(0)),
FpUserData: uintptr(libc.Int32FromInt32(INLINEFUNC_iif)),
- FzName: __ccgo_ts + 16184,
+ FzName: __ccgo_ts + 16256,
},
}
@@ -107175,109 +107504,111 @@ func init() {
*(*uintptr)(unsafe.Add(p, 1856)) = __ccgo_fp(_versionFunc)
*(*uintptr)(unsafe.Add(p, 1896)) = __ccgo_fp(_sourceidFunc)
*(*uintptr)(unsafe.Add(p, 1936)) = __ccgo_fp(_errlogFunc)
- *(*uintptr)(unsafe.Add(p, 1976)) = __ccgo_fp(_quoteFunc)
- *(*uintptr)(unsafe.Add(p, 2016)) = __ccgo_fp(_last_insert_rowid)
- *(*uintptr)(unsafe.Add(p, 2056)) = __ccgo_fp(_changes)
- *(*uintptr)(unsafe.Add(p, 2096)) = __ccgo_fp(_total_changes)
- *(*uintptr)(unsafe.Add(p, 2136)) = __ccgo_fp(_replaceFunc)
- *(*uintptr)(unsafe.Add(p, 2176)) = __ccgo_fp(_zeroblobFunc)
- *(*uintptr)(unsafe.Add(p, 2216)) = __ccgo_fp(_substrFunc)
- *(*uintptr)(unsafe.Add(p, 2256)) = __ccgo_fp(_substrFunc)
+ *(*uintptr)(unsafe.Add(p, 1976)) = __ccgo_fp(_unistrFunc)
+ *(*uintptr)(unsafe.Add(p, 2016)) = __ccgo_fp(_quoteFunc)
+ *(*uintptr)(unsafe.Add(p, 2056)) = __ccgo_fp(_quoteFunc)
+ *(*uintptr)(unsafe.Add(p, 2096)) = __ccgo_fp(_last_insert_rowid)
+ *(*uintptr)(unsafe.Add(p, 2136)) = __ccgo_fp(_changes)
+ *(*uintptr)(unsafe.Add(p, 2176)) = __ccgo_fp(_total_changes)
+ *(*uintptr)(unsafe.Add(p, 2216)) = __ccgo_fp(_replaceFunc)
+ *(*uintptr)(unsafe.Add(p, 2256)) = __ccgo_fp(_zeroblobFunc)
*(*uintptr)(unsafe.Add(p, 2296)) = __ccgo_fp(_substrFunc)
*(*uintptr)(unsafe.Add(p, 2336)) = __ccgo_fp(_substrFunc)
- *(*uintptr)(unsafe.Add(p, 2376)) = __ccgo_fp(_sumStep)
- *(*uintptr)(unsafe.Add(p, 2380)) = __ccgo_fp(_sumFinalize)
- *(*uintptr)(unsafe.Add(p, 2384)) = __ccgo_fp(_sumFinalize)
- *(*uintptr)(unsafe.Add(p, 2388)) = __ccgo_fp(_sumInverse)
- *(*uintptr)(unsafe.Add(p, 2416)) = __ccgo_fp(_sumStep)
- *(*uintptr)(unsafe.Add(p, 2420)) = __ccgo_fp(_totalFinalize)
- *(*uintptr)(unsafe.Add(p, 2424)) = __ccgo_fp(_totalFinalize)
- *(*uintptr)(unsafe.Add(p, 2428)) = __ccgo_fp(_sumInverse)
+ *(*uintptr)(unsafe.Add(p, 2376)) = __ccgo_fp(_substrFunc)
+ *(*uintptr)(unsafe.Add(p, 2416)) = __ccgo_fp(_substrFunc)
*(*uintptr)(unsafe.Add(p, 2456)) = __ccgo_fp(_sumStep)
- *(*uintptr)(unsafe.Add(p, 2460)) = __ccgo_fp(_avgFinalize)
- *(*uintptr)(unsafe.Add(p, 2464)) = __ccgo_fp(_avgFinalize)
+ *(*uintptr)(unsafe.Add(p, 2460)) = __ccgo_fp(_sumFinalize)
+ *(*uintptr)(unsafe.Add(p, 2464)) = __ccgo_fp(_sumFinalize)
*(*uintptr)(unsafe.Add(p, 2468)) = __ccgo_fp(_sumInverse)
- *(*uintptr)(unsafe.Add(p, 2496)) = __ccgo_fp(_countStep)
- *(*uintptr)(unsafe.Add(p, 2500)) = __ccgo_fp(_countFinalize)
- *(*uintptr)(unsafe.Add(p, 2504)) = __ccgo_fp(_countFinalize)
- *(*uintptr)(unsafe.Add(p, 2508)) = __ccgo_fp(_countInverse)
- *(*uintptr)(unsafe.Add(p, 2536)) = __ccgo_fp(_countStep)
- *(*uintptr)(unsafe.Add(p, 2540)) = __ccgo_fp(_countFinalize)
- *(*uintptr)(unsafe.Add(p, 2544)) = __ccgo_fp(_countFinalize)
- *(*uintptr)(unsafe.Add(p, 2548)) = __ccgo_fp(_countInverse)
- *(*uintptr)(unsafe.Add(p, 2576)) = __ccgo_fp(_groupConcatStep)
- *(*uintptr)(unsafe.Add(p, 2580)) = __ccgo_fp(_groupConcatFinalize)
- *(*uintptr)(unsafe.Add(p, 2584)) = __ccgo_fp(_groupConcatValue)
- *(*uintptr)(unsafe.Add(p, 2588)) = __ccgo_fp(_groupConcatInverse)
- *(*uintptr)(unsafe.Add(p, 2616)) = __ccgo_fp(_groupConcatStep)
- *(*uintptr)(unsafe.Add(p, 2620)) = __ccgo_fp(_groupConcatFinalize)
- *(*uintptr)(unsafe.Add(p, 2624)) = __ccgo_fp(_groupConcatValue)
- *(*uintptr)(unsafe.Add(p, 2628)) = __ccgo_fp(_groupConcatInverse)
+ *(*uintptr)(unsafe.Add(p, 2496)) = __ccgo_fp(_sumStep)
+ *(*uintptr)(unsafe.Add(p, 2500)) = __ccgo_fp(_totalFinalize)
+ *(*uintptr)(unsafe.Add(p, 2504)) = __ccgo_fp(_totalFinalize)
+ *(*uintptr)(unsafe.Add(p, 2508)) = __ccgo_fp(_sumInverse)
+ *(*uintptr)(unsafe.Add(p, 2536)) = __ccgo_fp(_sumStep)
+ *(*uintptr)(unsafe.Add(p, 2540)) = __ccgo_fp(_avgFinalize)
+ *(*uintptr)(unsafe.Add(p, 2544)) = __ccgo_fp(_avgFinalize)
+ *(*uintptr)(unsafe.Add(p, 2548)) = __ccgo_fp(_sumInverse)
+ *(*uintptr)(unsafe.Add(p, 2576)) = __ccgo_fp(_countStep)
+ *(*uintptr)(unsafe.Add(p, 2580)) = __ccgo_fp(_countFinalize)
+ *(*uintptr)(unsafe.Add(p, 2584)) = __ccgo_fp(_countFinalize)
+ *(*uintptr)(unsafe.Add(p, 2588)) = __ccgo_fp(_countInverse)
+ *(*uintptr)(unsafe.Add(p, 2616)) = __ccgo_fp(_countStep)
+ *(*uintptr)(unsafe.Add(p, 2620)) = __ccgo_fp(_countFinalize)
+ *(*uintptr)(unsafe.Add(p, 2624)) = __ccgo_fp(_countFinalize)
+ *(*uintptr)(unsafe.Add(p, 2628)) = __ccgo_fp(_countInverse)
*(*uintptr)(unsafe.Add(p, 2656)) = __ccgo_fp(_groupConcatStep)
*(*uintptr)(unsafe.Add(p, 2660)) = __ccgo_fp(_groupConcatFinalize)
*(*uintptr)(unsafe.Add(p, 2664)) = __ccgo_fp(_groupConcatValue)
*(*uintptr)(unsafe.Add(p, 2668)) = __ccgo_fp(_groupConcatInverse)
- *(*uintptr)(unsafe.Add(p, 2696)) = __ccgo_fp(_likeFunc)
- *(*uintptr)(unsafe.Add(p, 2736)) = __ccgo_fp(_likeFunc)
+ *(*uintptr)(unsafe.Add(p, 2696)) = __ccgo_fp(_groupConcatStep)
+ *(*uintptr)(unsafe.Add(p, 2700)) = __ccgo_fp(_groupConcatFinalize)
+ *(*uintptr)(unsafe.Add(p, 2704)) = __ccgo_fp(_groupConcatValue)
+ *(*uintptr)(unsafe.Add(p, 2708)) = __ccgo_fp(_groupConcatInverse)
+ *(*uintptr)(unsafe.Add(p, 2736)) = __ccgo_fp(_groupConcatStep)
+ *(*uintptr)(unsafe.Add(p, 2740)) = __ccgo_fp(_groupConcatFinalize)
+ *(*uintptr)(unsafe.Add(p, 2744)) = __ccgo_fp(_groupConcatValue)
+ *(*uintptr)(unsafe.Add(p, 2748)) = __ccgo_fp(_groupConcatInverse)
*(*uintptr)(unsafe.Add(p, 2776)) = __ccgo_fp(_likeFunc)
- *(*uintptr)(unsafe.Add(p, 2808)) = __ccgo_fp(_xCeil)
- *(*uintptr)(unsafe.Add(p, 2816)) = __ccgo_fp(_ceilingFunc)
- *(*uintptr)(unsafe.Add(p, 2848)) = __ccgo_fp(_xCeil)
- *(*uintptr)(unsafe.Add(p, 2856)) = __ccgo_fp(_ceilingFunc)
- *(*uintptr)(unsafe.Add(p, 2888)) = __ccgo_fp(_xFloor)
+ *(*uintptr)(unsafe.Add(p, 2816)) = __ccgo_fp(_likeFunc)
+ *(*uintptr)(unsafe.Add(p, 2856)) = __ccgo_fp(_likeFunc)
+ *(*uintptr)(unsafe.Add(p, 2888)) = __ccgo_fp(_xCeil)
*(*uintptr)(unsafe.Add(p, 2896)) = __ccgo_fp(_ceilingFunc)
- *(*uintptr)(unsafe.Add(p, 2928)) = __ccgo_fp(libc.Xtrunc)
+ *(*uintptr)(unsafe.Add(p, 2928)) = __ccgo_fp(_xCeil)
*(*uintptr)(unsafe.Add(p, 2936)) = __ccgo_fp(_ceilingFunc)
- *(*uintptr)(unsafe.Add(p, 2976)) = __ccgo_fp(_logFunc)
- *(*uintptr)(unsafe.Add(p, 3016)) = __ccgo_fp(_logFunc)
+ *(*uintptr)(unsafe.Add(p, 2968)) = __ccgo_fp(_xFloor)
+ *(*uintptr)(unsafe.Add(p, 2976)) = __ccgo_fp(_ceilingFunc)
+ *(*uintptr)(unsafe.Add(p, 3008)) = __ccgo_fp(libc.Xtrunc)
+ *(*uintptr)(unsafe.Add(p, 3016)) = __ccgo_fp(_ceilingFunc)
*(*uintptr)(unsafe.Add(p, 3056)) = __ccgo_fp(_logFunc)
*(*uintptr)(unsafe.Add(p, 3096)) = __ccgo_fp(_logFunc)
*(*uintptr)(unsafe.Add(p, 3136)) = __ccgo_fp(_logFunc)
- *(*uintptr)(unsafe.Add(p, 3168)) = __ccgo_fp(libc.Xexp)
- *(*uintptr)(unsafe.Add(p, 3176)) = __ccgo_fp(_math1Func)
- *(*uintptr)(unsafe.Add(p, 3208)) = __ccgo_fp(libc.Xpow)
- *(*uintptr)(unsafe.Add(p, 3216)) = __ccgo_fp(_math2Func)
- *(*uintptr)(unsafe.Add(p, 3248)) = __ccgo_fp(libc.Xpow)
- *(*uintptr)(unsafe.Add(p, 3256)) = __ccgo_fp(_math2Func)
- *(*uintptr)(unsafe.Add(p, 3288)) = __ccgo_fp(libc.Xfmod)
+ *(*uintptr)(unsafe.Add(p, 3176)) = __ccgo_fp(_logFunc)
+ *(*uintptr)(unsafe.Add(p, 3216)) = __ccgo_fp(_logFunc)
+ *(*uintptr)(unsafe.Add(p, 3248)) = __ccgo_fp(libc.Xexp)
+ *(*uintptr)(unsafe.Add(p, 3256)) = __ccgo_fp(_math1Func)
+ *(*uintptr)(unsafe.Add(p, 3288)) = __ccgo_fp(libc.Xpow)
*(*uintptr)(unsafe.Add(p, 3296)) = __ccgo_fp(_math2Func)
- *(*uintptr)(unsafe.Add(p, 3328)) = __ccgo_fp(libc.Xacos)
- *(*uintptr)(unsafe.Add(p, 3336)) = __ccgo_fp(_math1Func)
- *(*uintptr)(unsafe.Add(p, 3368)) = __ccgo_fp(libc.Xasin)
- *(*uintptr)(unsafe.Add(p, 3376)) = __ccgo_fp(_math1Func)
- *(*uintptr)(unsafe.Add(p, 3408)) = __ccgo_fp(libc.Xatan)
+ *(*uintptr)(unsafe.Add(p, 3328)) = __ccgo_fp(libc.Xpow)
+ *(*uintptr)(unsafe.Add(p, 3336)) = __ccgo_fp(_math2Func)
+ *(*uintptr)(unsafe.Add(p, 3368)) = __ccgo_fp(libc.Xfmod)
+ *(*uintptr)(unsafe.Add(p, 3376)) = __ccgo_fp(_math2Func)
+ *(*uintptr)(unsafe.Add(p, 3408)) = __ccgo_fp(libc.Xacos)
*(*uintptr)(unsafe.Add(p, 3416)) = __ccgo_fp(_math1Func)
- *(*uintptr)(unsafe.Add(p, 3448)) = __ccgo_fp(libc.Xatan2)
- *(*uintptr)(unsafe.Add(p, 3456)) = __ccgo_fp(_math2Func)
- *(*uintptr)(unsafe.Add(p, 3488)) = __ccgo_fp(libc.Xcos)
+ *(*uintptr)(unsafe.Add(p, 3448)) = __ccgo_fp(libc.Xasin)
+ *(*uintptr)(unsafe.Add(p, 3456)) = __ccgo_fp(_math1Func)
+ *(*uintptr)(unsafe.Add(p, 3488)) = __ccgo_fp(libc.Xatan)
*(*uintptr)(unsafe.Add(p, 3496)) = __ccgo_fp(_math1Func)
- *(*uintptr)(unsafe.Add(p, 3528)) = __ccgo_fp(libc.Xsin)
- *(*uintptr)(unsafe.Add(p, 3536)) = __ccgo_fp(_math1Func)
- *(*uintptr)(unsafe.Add(p, 3568)) = __ccgo_fp(libc.Xtan)
+ *(*uintptr)(unsafe.Add(p, 3528)) = __ccgo_fp(libc.Xatan2)
+ *(*uintptr)(unsafe.Add(p, 3536)) = __ccgo_fp(_math2Func)
+ *(*uintptr)(unsafe.Add(p, 3568)) = __ccgo_fp(libc.Xcos)
*(*uintptr)(unsafe.Add(p, 3576)) = __ccgo_fp(_math1Func)
- *(*uintptr)(unsafe.Add(p, 3608)) = __ccgo_fp(libc.Xcosh)
+ *(*uintptr)(unsafe.Add(p, 3608)) = __ccgo_fp(libc.Xsin)
*(*uintptr)(unsafe.Add(p, 3616)) = __ccgo_fp(_math1Func)
- *(*uintptr)(unsafe.Add(p, 3648)) = __ccgo_fp(libc.Xsinh)
+ *(*uintptr)(unsafe.Add(p, 3648)) = __ccgo_fp(libc.Xtan)
*(*uintptr)(unsafe.Add(p, 3656)) = __ccgo_fp(_math1Func)
- *(*uintptr)(unsafe.Add(p, 3688)) = __ccgo_fp(libc.Xtanh)
+ *(*uintptr)(unsafe.Add(p, 3688)) = __ccgo_fp(libc.Xcosh)
*(*uintptr)(unsafe.Add(p, 3696)) = __ccgo_fp(_math1Func)
- *(*uintptr)(unsafe.Add(p, 3728)) = __ccgo_fp(libc.Xacosh)
+ *(*uintptr)(unsafe.Add(p, 3728)) = __ccgo_fp(libc.Xsinh)
*(*uintptr)(unsafe.Add(p, 3736)) = __ccgo_fp(_math1Func)
- *(*uintptr)(unsafe.Add(p, 3768)) = __ccgo_fp(libc.Xasinh)
+ *(*uintptr)(unsafe.Add(p, 3768)) = __ccgo_fp(libc.Xtanh)
*(*uintptr)(unsafe.Add(p, 3776)) = __ccgo_fp(_math1Func)
- *(*uintptr)(unsafe.Add(p, 3808)) = __ccgo_fp(libc.Xatanh)
+ *(*uintptr)(unsafe.Add(p, 3808)) = __ccgo_fp(libc.Xacosh)
*(*uintptr)(unsafe.Add(p, 3816)) = __ccgo_fp(_math1Func)
- *(*uintptr)(unsafe.Add(p, 3848)) = __ccgo_fp(libc.Xsqrt)
+ *(*uintptr)(unsafe.Add(p, 3848)) = __ccgo_fp(libc.Xasinh)
*(*uintptr)(unsafe.Add(p, 3856)) = __ccgo_fp(_math1Func)
- *(*uintptr)(unsafe.Add(p, 3888)) = __ccgo_fp(_degToRad)
+ *(*uintptr)(unsafe.Add(p, 3888)) = __ccgo_fp(libc.Xatanh)
*(*uintptr)(unsafe.Add(p, 3896)) = __ccgo_fp(_math1Func)
- *(*uintptr)(unsafe.Add(p, 3928)) = __ccgo_fp(_radToDeg)
+ *(*uintptr)(unsafe.Add(p, 3928)) = __ccgo_fp(libc.Xsqrt)
*(*uintptr)(unsafe.Add(p, 3936)) = __ccgo_fp(_math1Func)
- *(*uintptr)(unsafe.Add(p, 3976)) = __ccgo_fp(_piFunc)
- *(*uintptr)(unsafe.Add(p, 4016)) = __ccgo_fp(_signFunc)
- *(*uintptr)(unsafe.Add(p, 4056)) = __ccgo_fp(_versionFunc)
- *(*uintptr)(unsafe.Add(p, 4096)) = __ccgo_fp(_versionFunc)
+ *(*uintptr)(unsafe.Add(p, 3968)) = __ccgo_fp(_degToRad)
+ *(*uintptr)(unsafe.Add(p, 3976)) = __ccgo_fp(_math1Func)
+ *(*uintptr)(unsafe.Add(p, 4008)) = __ccgo_fp(_radToDeg)
+ *(*uintptr)(unsafe.Add(p, 4016)) = __ccgo_fp(_math1Func)
+ *(*uintptr)(unsafe.Add(p, 4056)) = __ccgo_fp(_piFunc)
+ *(*uintptr)(unsafe.Add(p, 4096)) = __ccgo_fp(_signFunc)
*(*uintptr)(unsafe.Add(p, 4136)) = __ccgo_fp(_versionFunc)
+ *(*uintptr)(unsafe.Add(p, 4176)) = __ccgo_fp(_versionFunc)
+ *(*uintptr)(unsafe.Add(p, 4216)) = __ccgo_fp(_versionFunc)
}
/************** End of func.c ************************************************/
@@ -107594,7 +107925,7 @@ func _sqlite3FkLocateIndex(tls *libc.TLS, pParse uintptr, pParent uintptr, pFKey
}
if !(pIdx != 0) {
if !((*TParse)(unsafe.Pointer(pParse)).FdisableTriggers != 0) {
- _sqlite3ErrorMsg(tls, pParse, __ccgo_ts+16187, libc.VaList(bp+8, (*TTable)(unsafe.Pointer((*TFKey)(unsafe.Pointer(pFKey)).FpFrom)).FzName, (*TFKey)(unsafe.Pointer(pFKey)).FzTo))
+ _sqlite3ErrorMsg(tls, pParse, __ccgo_ts+16259, libc.VaList(bp+8, (*TTable)(unsafe.Pointer((*TFKey)(unsafe.Pointer(pFKey)).FpFrom)).FzName, (*TFKey)(unsafe.Pointer(pFKey)).FzTo))
}
_sqlite3DbFree(tls, (*TParse)(unsafe.Pointer(pParse)).Fdb, aiCol)
return int32(1)
@@ -108418,7 +108749,7 @@ func _sqlite3FkCheck(tls *libc.TLS, pParse uintptr, pTab uintptr, regOld int32,
(*TSrcItem)(unsafe.Pointer(pItem)).FpSTab = (*TFKey)(unsafe.Pointer(pFKey)).FpFrom
(*TSrcItem)(unsafe.Pointer(pItem)).FzName = (*TTable)(unsafe.Pointer((*TFKey)(unsafe.Pointer(pFKey)).FpFrom)).FzName
(*TTable)(unsafe.Pointer((*TSrcItem)(unsafe.Pointer(pItem)).FpSTab)).FnTabRef++
- v7 = pParse + 44
+ v7 = pParse + 48
v6 = *(*int32)(unsafe.Pointer(v7))
*(*int32)(unsafe.Pointer(v7))++
(*TSrcItem)(unsafe.Pointer(pItem)).FiCursor = v6
@@ -108705,11 +109036,11 @@ func _fkActionTrigger(tls *libc.TLS, pParse uintptr, pTab uintptr, pFKey uintptr
break
}
*(*TToken)(unsafe.Pointer(bp + 8)) = TToken{
- Fz: __ccgo_ts + 6726,
+ Fz: __ccgo_ts + 6751,
Fn: uint32(3),
} /* Literal "old" token */
*(*TToken)(unsafe.Pointer(bp + 16)) = TToken{
- Fz: __ccgo_ts + 6722,
+ Fz: __ccgo_ts + 6747,
Fn: uint32(3),
} /* tFromCol = OLD.tToCol */
if *(*uintptr)(unsafe.Pointer(bp + 4)) != 0 {
@@ -108773,7 +109104,7 @@ func _fkActionTrigger(tls *libc.TLS, pParse uintptr, pTab uintptr, pFKey uintptr
nFrom = _sqlite3Strlen30(tls, zFrom)
if action == int32(OE_Restrict) {
iDb = _sqlite3SchemaToIndex(tls, db, (*TTable)(unsafe.Pointer(pTab)).FpSchema)
- pRaise = _sqlite3Expr(tls, db, int32(TK_STRING), __ccgo_ts+5310)
+ pRaise = _sqlite3Expr(tls, db, int32(TK_STRING), __ccgo_ts+5336)
pRaise = _sqlite3PExpr(tls, pParse, int32(TK_RAISE), pRaise, uintptr(0))
if pRaise != 0 {
(*TExpr)(unsafe.Pointer(pRaise)).FaffExpr = int8(OE_Abort)
@@ -109355,7 +109686,7 @@ func _sqlite3ComputeGeneratedColumns(tls *libc.TLS, pParse uintptr, iRegStore in
}
}
if pRedo != 0 {
- _sqlite3ErrorMsg(tls, pParse, __ccgo_ts+8353, libc.VaList(bp+40, (*TColumn)(unsafe.Pointer(pRedo)).FzCnName))
+ _sqlite3ErrorMsg(tls, pParse, __ccgo_ts+8378, libc.VaList(bp+40, (*TColumn)(unsafe.Pointer(pRedo)).FzCnName))
}
(*TParse)(unsafe.Pointer(pParse)).FiSelfTab = 0
}
@@ -109421,11 +109752,11 @@ func _autoIncBegin(tls *libc.TLS, pParse uintptr, iDb int32, pTab uintptr) (r in
(*TAutoincInfo)(unsafe.Pointer(pInfo)).FpTab = pTab
(*TAutoincInfo)(unsafe.Pointer(pInfo)).FiDb = iDb
(*TParse)(unsafe.Pointer(pToplevel)).FnMem++ /* Register to hold name of table */
- v3 = pToplevel + 48
+ v3 = pToplevel + 52
*(*int32)(unsafe.Pointer(v3))++
v2 = *(*int32)(unsafe.Pointer(v3))
(*TAutoincInfo)(unsafe.Pointer(pInfo)).FregCtr = v2 /* Max rowid register */
- *(*int32)(unsafe.Pointer(pToplevel + 48)) += int32(2) /* Rowid in sqlite_sequence + orig max val */
+ *(*int32)(unsafe.Pointer(pToplevel + 52)) += int32(2) /* Rowid in sqlite_sequence + orig max val */
}
memId = (*TAutoincInfo)(unsafe.Pointer(pInfo)).FregCtr
}
@@ -109750,7 +110081,7 @@ func _sqlite3MultiValues(tls *libc.TLS, pParse uintptr, pLeft uintptr, pRow uint
var p, pRet, pSelect, pSubq, pSubq1, v, v2 uintptr
var _ /* dest at bp+0 */ TSelectDest
_, _, _, _, _, _, _, _, _ = f, p, pRet, pSelect, pSubq, pSubq1, v, v1, v2
- if (*TParse)(unsafe.Pointer(pParse)).FbHasWith != 0 || (*Tsqlite3)(unsafe.Pointer((*TParse)(unsafe.Pointer(pParse)).Fdb)).Finit1.Fbusy != 0 || _exprListIsConstant(tls, pParse, pRow) == 0 || (*TSrcList)(unsafe.Pointer((*TSelect)(unsafe.Pointer(pLeft)).FpSrc)).FnSrc == 0 && _exprListIsNoAffinity(tls, pParse, (*TSelect)(unsafe.Pointer(pLeft)).FpEList) == 0 || libc.Int32FromUint8((*TParse)(unsafe.Pointer(pParse)).FeParseMode) != PARSE_MODE_NORMAL {
+ if int32(Tbft(*(*uint8)(unsafe.Pointer(pParse + 32))&0x2>>1)) != 0 || (*Tsqlite3)(unsafe.Pointer((*TParse)(unsafe.Pointer(pParse)).Fdb)).Finit1.Fbusy != 0 || _exprListIsConstant(tls, pParse, pRow) == 0 || (*TSrcList)(unsafe.Pointer((*TSelect)(unsafe.Pointer(pLeft)).FpSrc)).FnSrc == 0 && _exprListIsNoAffinity(tls, pParse, (*TSelect)(unsafe.Pointer(pLeft)).FpEList) == 0 || libc.Int32FromUint8((*TParse)(unsafe.Pointer(pParse)).FeParseMode) != PARSE_MODE_NORMAL {
/* The co-routine method cannot be used. Fall back to UNION ALL. */
pSelect = uintptr(0)
f = libc.Int32FromInt32(SF_Values) | libc.Int32FromInt32(SF_MultiValue)
@@ -109764,7 +110095,7 @@ func _sqlite3MultiValues(tls *libc.TLS, pParse uintptr, pLeft uintptr, pRow uint
}
}
pSelect = _sqlite3SelectNew(tls, pParse, pRow, uintptr(0), uintptr(0), uintptr(0), uintptr(0), uintptr(0), libc.Uint32FromInt32(f), uintptr(0))
- *(*Tu32)(unsafe.Pointer(pLeft + 4)) &= libc.Uint32FromInt32(^libc.Int32FromInt32(SF_MultiValue))
+ *(*Tu32)(unsafe.Pointer(pLeft + 4)) &= ^libc.Uint32FromInt32(SF_MultiValue)
if pSelect != 0 {
(*TSelect)(unsafe.Pointer(pSelect)).Fop = uint8(TK_ALL)
(*TSelect)(unsafe.Pointer(pSelect)).FpPrior = pLeft
@@ -109799,7 +110130,7 @@ func _sqlite3MultiValues(tls *libc.TLS, pParse uintptr, pLeft uintptr, pRow uint
if _sqlite3SrcItemAttachSubquery(tls, pParse, p, pLeft, 0) != 0 {
pSubq = *(*uintptr)(unsafe.Pointer(p + 44))
(*TSubquery)(unsafe.Pointer(pSubq)).FaddrFillSub = _sqlite3VdbeCurrentAddr(tls, v) + int32(1)
- v2 = pParse + 48
+ v2 = pParse + 52
*(*int32)(unsafe.Pointer(v2))++
v1 = *(*int32)(unsafe.Pointer(v2))
(*TSubquery)(unsafe.Pointer(pSubq)).FregReturn = v1
@@ -109812,7 +110143,7 @@ func _sqlite3MultiValues(tls *libc.TLS, pParse uintptr, pLeft uintptr, pRow uint
** of the co-routine to a separate array for processing. */
(*(*TSelectDest)(unsafe.Pointer(bp))).FiSdst = (*TParse)(unsafe.Pointer(pParse)).FnMem + int32(3)
(*(*TSelectDest)(unsafe.Pointer(bp))).FnSdst = (*TExprList)(unsafe.Pointer((*TSelect)(unsafe.Pointer(pLeft)).FpEList)).FnExpr
- *(*int32)(unsafe.Pointer(pParse + 48)) += int32(2) + (*(*TSelectDest)(unsafe.Pointer(bp))).FnSdst
+ *(*int32)(unsafe.Pointer(pParse + 52)) += int32(2) + (*(*TSelectDest)(unsafe.Pointer(bp))).FnSdst
*(*Tu32)(unsafe.Pointer(pLeft + 4)) |= uint32(SF_MultiValue)
_sqlite3Select(tls, pParse, pLeft, bp)
(*TSubquery)(unsafe.Pointer(pSubq)).FregResult = (*(*TSelectDest)(unsafe.Pointer(bp))).FiSdst
@@ -109939,27 +110270,27 @@ func _sqlite3MultiValues(tls *libc.TLS, pParse uintptr, pLeft uintptr, pRow uint
func _sqlite3Insert(tls *libc.TLS, pParse uintptr, pTabList uintptr, pSelect uintptr, pColumn uintptr, onError int32, pUpsert uintptr) {
bp := tls.Alloc(112)
defer tls.Free(112)
- var aRegIdx, aTabColMap, db, pIdx, pIpk, pItem, pList, pNx, pSubq, pTab, pTrigger, pVTab, pX, v, zCName, v13, v16, v18, v6, v9 uintptr
- var addr1, addr11, addrCont, addrInsTop, addrL, addrTop, bUseSeek, endOfLoop, i, iDb, iRegStore, ipkColumn, isView, j, k, nColumn, nHidden, nIdx, rc, regAutoinc, regCols, regData, regFromSelect, regIns, regRec, regRowCount, regRowid, regTempRowid, regYield, srcTab, y, v1, v12, v15, v17, v19, v22, v23, v4, v5, v7, v8 int32
- var appendFlag, bIdListInOrder, hName, useTempTable, withoutRowid Tu8
- var colFlags, v21 Tu32
+ var aRegIdx, aTabColMap, db, pIdx, pIpk, pItem, pList, pNx, pSubq, pTab, pTrigger, pVTab, pX, v, v12, v15, v17, v5, v8 uintptr
+ var addr1, addr11, addrCont, addrInsTop, addrL, addrTop, bUseSeek, endOfLoop, i, iDb, iRegStore, ipkColumn, isView, j, k, nColumn, nHidden, nIdx, rc, regAutoinc, regCols, regData, regFromSelect, regIns, regRec, regRowCount, regRowid, regTempRowid, regYield, srcTab, y, v1, v11, v14, v16, v18, v21, v22, v3, v4, v6, v7 int32
+ var appendFlag, bIdListInOrder, useTempTable, withoutRowid Tu8
+ var colFlags, v20 Tu32
var _ /* dest at bp+8 */ TSelectDest
var _ /* iDataCur at bp+0 */ int32
var _ /* iIdxCur at bp+4 */ int32
var _ /* isReplace at bp+76 */ int32
var _ /* sNC at bp+40 */ TNameContext
var _ /* tmask at bp+36 */ int32
- _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _ = aRegIdx, aTabColMap, addr1, addr11, addrCont, addrInsTop, addrL, addrTop, appendFlag, bIdListInOrder, bUseSeek, colFlags, db, endOfLoop, hName, i, iDb, iRegStore, ipkColumn, isView, j, k, nColumn, nHidden, nIdx, pIdx, pIpk, pItem, pList, pNx, pSubq, pTab, pTrigger, pVTab, pX, rc, regAutoinc, regCols, regData, regFromSelect, regIns, regRec, regRowCount, regRowid, regTempRowid, regYield, srcTab, useTempTable, v, withoutRowid, y, zCName, v1, v12, v13, v15, v16, v17, v18, v19, v21, v22, v23, v4, v5, v6, v7, v8, v9 /* Number of columns in the data */
- nHidden = 0 /* Number of hidden columns if TABLE is virtual */
- *(*int32)(unsafe.Pointer(bp)) = 0 /* VDBE cursor that is the main data repository */
- *(*int32)(unsafe.Pointer(bp + 4)) = 0 /* First index cursor */
- ipkColumn = -int32(1) /* Label for the end of the insertion loop */
- srcTab = 0 /* Data comes from this temporary cursor if >=0 */
- addrInsTop = 0 /* Jump to label "D" */
- addrCont = 0 /* Index of database holding TABLE */
- useTempTable = uint8(0) /* Store SELECT results in intermediate table */
- appendFlag = uint8(0) /* True if IDLIST is in table order */
- pList = uintptr(0) /* Register in which to store next column */
+ _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _ = aRegIdx, aTabColMap, addr1, addr11, addrCont, addrInsTop, addrL, addrTop, appendFlag, bIdListInOrder, bUseSeek, colFlags, db, endOfLoop, i, iDb, iRegStore, ipkColumn, isView, j, k, nColumn, nHidden, nIdx, pIdx, pIpk, pItem, pList, pNx, pSubq, pTab, pTrigger, pVTab, pX, rc, regAutoinc, regCols, regData, regFromSelect, regIns, regRec, regRowCount, regRowid, regTempRowid, regYield, srcTab, useTempTable, v, withoutRowid, y, v1, v11, v12, v14, v15, v16, v17, v18, v20, v21, v22, v3, v4, v5, v6, v7, v8 /* Number of columns in the data */
+ nHidden = 0 /* Number of hidden columns if TABLE is virtual */
+ *(*int32)(unsafe.Pointer(bp)) = 0 /* VDBE cursor that is the main data repository */
+ *(*int32)(unsafe.Pointer(bp + 4)) = 0 /* First index cursor */
+ ipkColumn = -int32(1) /* Label for the end of the insertion loop */
+ srcTab = 0 /* Data comes from this temporary cursor if >=0 */
+ addrInsTop = 0 /* Jump to label "D" */
+ addrCont = 0 /* Index of database holding TABLE */
+ useTempTable = uint8(0) /* Store SELECT results in intermediate table */
+ appendFlag = uint8(0) /* True if IDLIST is in table order */
+ pList = uintptr(0) /* Register in which to store next column */
/* Register allocations */
regFromSelect = 0 /* Base register for data coming from SELECT */
regAutoinc = 0 /* Register holding the AUTOINCREMENT counter */
@@ -110040,7 +110371,7 @@ func _sqlite3Insert(tls *libc.TLS, pParse uintptr, pTabList uintptr, pSelect uin
v1 = (*TParse)(unsafe.Pointer(pParse)).FnMem + libc.Int32FromInt32(1)
regIns = v1
regRowid = v1
- *(*int32)(unsafe.Pointer(pParse + 48)) += int32((*TTable)(unsafe.Pointer(pTab)).FnCol) + int32(1)
+ *(*int32)(unsafe.Pointer(pParse + 52)) += int32((*TTable)(unsafe.Pointer(pTab)).FnCol) + int32(1)
if libc.Int32FromUint8((*TTable)(unsafe.Pointer(pTab)).FeTabType) == int32(TABTYP_VTAB) {
regRowid++
(*TParse)(unsafe.Pointer(pParse)).FnMem++
@@ -110076,44 +110407,28 @@ func _sqlite3Insert(tls *libc.TLS, pParse uintptr, pTabList uintptr, pSelect uin
if !(i < (*TIdList)(unsafe.Pointer(pColumn)).FnId) {
break
}
- zCName = (*(*TIdList_item)(unsafe.Pointer(pColumn + 4 + uintptr(i)*4))).FzName
- hName = _sqlite3StrIHash(tls, zCName)
- j = 0
- for {
- if !(j < int32((*TTable)(unsafe.Pointer(pTab)).FnCol)) {
- break
+ j = _sqlite3ColumnIndex(tls, pTab, (*(*TIdList_item)(unsafe.Pointer(pColumn + 4 + uintptr(i)*4))).FzName)
+ if j >= 0 {
+ if *(*int32)(unsafe.Pointer(aTabColMap + uintptr(j)*4)) == 0 {
+ *(*int32)(unsafe.Pointer(aTabColMap + uintptr(j)*4)) = i + int32(1)
}
- if libc.Int32FromUint8((*(*TColumn)(unsafe.Pointer((*TTable)(unsafe.Pointer(pTab)).FaCol + uintptr(j)*12))).FhName) != libc.Int32FromUint8(hName) {
- goto _3
+ if i != j {
+ bIdListInOrder = uint8(0)
}
- if _sqlite3StrICmp(tls, zCName, (*(*TColumn)(unsafe.Pointer((*TTable)(unsafe.Pointer(pTab)).FaCol + uintptr(j)*12))).FzCnName) == 0 {
- if *(*int32)(unsafe.Pointer(aTabColMap + uintptr(j)*4)) == 0 {
- *(*int32)(unsafe.Pointer(aTabColMap + uintptr(j)*4)) = i + int32(1)
- }
- if i != j {
- bIdListInOrder = uint8(0)
- }
- if j == int32((*TTable)(unsafe.Pointer(pTab)).FiPKey) {
- ipkColumn = i
- }
- if libc.Int32FromUint16((*(*TColumn)(unsafe.Pointer((*TTable)(unsafe.Pointer(pTab)).FaCol + uintptr(j)*12))).FcolFlags)&(libc.Int32FromInt32(COLFLAG_STORED)|libc.Int32FromInt32(COLFLAG_VIRTUAL)) != 0 {
- _sqlite3ErrorMsg(tls, pParse, __ccgo_ts+16232, libc.VaList(bp+88, (*(*TColumn)(unsafe.Pointer((*TTable)(unsafe.Pointer(pTab)).FaCol + uintptr(j)*12))).FzCnName))
- goto insert_cleanup
- }
- break
+ if j == int32((*TTable)(unsafe.Pointer(pTab)).FiPKey) {
+ ipkColumn = i
}
- goto _3
- _3:
- ;
- j++
- }
- if j >= int32((*TTable)(unsafe.Pointer(pTab)).FnCol) {
+ if libc.Int32FromUint16((*(*TColumn)(unsafe.Pointer((*TTable)(unsafe.Pointer(pTab)).FaCol + uintptr(j)*12))).FcolFlags)&(libc.Int32FromInt32(COLFLAG_STORED)|libc.Int32FromInt32(COLFLAG_VIRTUAL)) != 0 {
+ _sqlite3ErrorMsg(tls, pParse, __ccgo_ts+16304, libc.VaList(bp+88, (*(*TColumn)(unsafe.Pointer((*TTable)(unsafe.Pointer(pTab)).FaCol + uintptr(j)*12))).FzCnName))
+ goto insert_cleanup
+ }
+ } else {
if _sqlite3IsRowid(tls, (*(*TIdList_item)(unsafe.Pointer(pColumn + 4 + uintptr(i)*4))).FzName) != 0 && !(withoutRowid != 0) {
ipkColumn = i
bIdListInOrder = uint8(0)
} else {
- _sqlite3ErrorMsg(tls, pParse, __ccgo_ts+16273, libc.VaList(bp+88, pTabList+8, (*(*TIdList_item)(unsafe.Pointer(pColumn + 4 + uintptr(i)*4))).FzName))
- (*TParse)(unsafe.Pointer(pParse)).FcheckSchema = uint8(1)
+ _sqlite3ErrorMsg(tls, pParse, __ccgo_ts+16345, libc.VaList(bp+88, pTabList+8, (*(*TIdList_item)(unsafe.Pointer(pColumn + 4 + uintptr(i)*4))).FzName))
+ libc.SetBitFieldPtr8Uint32(pParse+32, libc.Uint32FromInt32(1), 3, 0x8)
goto insert_cleanup
}
}
@@ -110135,31 +110450,31 @@ func _sqlite3Insert(tls *libc.TLS, pParse uintptr, pTabList uintptr, pSelect uin
(*(*TSelectDest)(unsafe.Pointer(bp + 8))).FiSDParm = (*TSubquery)(unsafe.Pointer(pSubq)).FregReturn
regFromSelect = (*TSubquery)(unsafe.Pointer(pSubq)).FregResult
nColumn = (*TExprList)(unsafe.Pointer((*TSelect)(unsafe.Pointer((*TSubquery)(unsafe.Pointer(pSubq)).FpSelect)).FpEList)).FnExpr
- _sqlite3VdbeExplain(tls, pParse, uint8(0), __ccgo_ts+16305, libc.VaList(bp+88, pItem))
+ _sqlite3VdbeExplain(tls, pParse, uint8(0), __ccgo_ts+16377, libc.VaList(bp+88, pItem))
if bIdListInOrder != 0 && nColumn == int32((*TTable)(unsafe.Pointer(pTab)).FnCol) {
regData = regFromSelect
regRowid = regData - int32(1)
if libc.Int32FromUint8((*TTable)(unsafe.Pointer(pTab)).FeTabType) == int32(TABTYP_VTAB) {
- v4 = int32(1)
+ v3 = int32(1)
} else {
- v4 = 0
+ v3 = 0
}
- regIns = regRowid - v4
+ regIns = regRowid - v3
}
} else {
- v6 = pParse + 48
- *(*int32)(unsafe.Pointer(v6))++
- v5 = *(*int32)(unsafe.Pointer(v6)) /* Top of the co-routine */
- regYield = v5
+ v5 = pParse + 52
+ *(*int32)(unsafe.Pointer(v5))++
+ v4 = *(*int32)(unsafe.Pointer(v5)) /* Top of the co-routine */
+ regYield = v4
addrTop = _sqlite3VdbeCurrentAddr(tls, v) + int32(1)
_sqlite3VdbeAddOp3(tls, v, int32(OP_InitCoroutine), regYield, 0, addrTop)
_sqlite3SelectDestInit(tls, bp+8, int32(SRT_Coroutine), regYield)
if bIdListInOrder != 0 {
- v7 = regData
+ v6 = regData
} else {
- v7 = 0
+ v6 = 0
}
- (*(*TSelectDest)(unsafe.Pointer(bp + 8))).FiSdst = v7
+ (*(*TSelectDest)(unsafe.Pointer(bp + 8))).FiSdst = v6
(*(*TSelectDest)(unsafe.Pointer(bp + 8))).FnSdst = int32((*TTable)(unsafe.Pointer(pTab)).FnCol)
rc = _sqlite3Select(tls, pParse, pSelect, bp+8)
regFromSelect = (*(*TSelectDest)(unsafe.Pointer(bp + 8))).FiSdst
@@ -110183,10 +110498,10 @@ func _sqlite3Insert(tls *libc.TLS, pParse uintptr, pTabList uintptr, pSelect uin
useTempTable = uint8(1)
}
if useTempTable != 0 { /* Label "L" */
- v9 = pParse + 44
- v8 = *(*int32)(unsafe.Pointer(v9))
- *(*int32)(unsafe.Pointer(v9))++
- srcTab = v8
+ v8 = pParse + 48
+ v7 = *(*int32)(unsafe.Pointer(v8))
+ *(*int32)(unsafe.Pointer(v8))++
+ srcTab = v7
regRec = _sqlite3GetTempReg(tls, pParse)
regTempRowid = _sqlite3GetTempReg(tls, pParse)
_sqlite3VdbeAddOp2(tls, v, int32(OP_OpenEphemeral), srcTab, nColumn)
@@ -110227,8 +110542,8 @@ func _sqlite3Insert(tls *libc.TLS, pParse uintptr, pTabList uintptr, pSelect uin
if libc.Int32FromUint16((*(*TColumn)(unsafe.Pointer((*TTable)(unsafe.Pointer(pTab)).FaCol + uintptr(i)*12))).FcolFlags)&int32(COLFLAG_GENERATED) != 0 {
ipkColumn--
}
- goto _10
- _10:
+ goto _9
+ _9:
;
i--
}
@@ -110245,28 +110560,28 @@ func _sqlite3Insert(tls *libc.TLS, pParse uintptr, pTabList uintptr, pSelect uin
if libc.Int32FromUint16((*(*TColumn)(unsafe.Pointer((*TTable)(unsafe.Pointer(pTab)).FaCol + uintptr(i)*12))).FcolFlags)&int32(COLFLAG_NOINSERT) != 0 {
nHidden++
}
- goto _11
- _11:
+ goto _10
+ _10:
;
i++
}
}
if nColumn != int32((*TTable)(unsafe.Pointer(pTab)).FnCol)-nHidden {
- _sqlite3ErrorMsg(tls, pParse, __ccgo_ts+16313, libc.VaList(bp+88, pTabList+8, int32((*TTable)(unsafe.Pointer(pTab)).FnCol)-nHidden, nColumn))
+ _sqlite3ErrorMsg(tls, pParse, __ccgo_ts+16385, libc.VaList(bp+88, pTabList+8, int32((*TTable)(unsafe.Pointer(pTab)).FnCol)-nHidden, nColumn))
goto insert_cleanup
}
}
if pColumn != uintptr(0) && nColumn != (*TIdList)(unsafe.Pointer(pColumn)).FnId {
- _sqlite3ErrorMsg(tls, pParse, __ccgo_ts+16365, libc.VaList(bp+88, nColumn, (*TIdList)(unsafe.Pointer(pColumn)).FnId))
+ _sqlite3ErrorMsg(tls, pParse, __ccgo_ts+16437, libc.VaList(bp+88, nColumn, (*TIdList)(unsafe.Pointer(pColumn)).FnId))
goto insert_cleanup
}
/* Initialize the count of rows to be inserted
*/
if (*Tsqlite3)(unsafe.Pointer(db)).Fflags&(libc.Uint64FromInt32(libc.Int32FromInt32(0x00001))<<libc.Int32FromInt32(32)) != uint64(0) && !((*TParse)(unsafe.Pointer(pParse)).Fnested != 0) && !((*TParse)(unsafe.Pointer(pParse)).FpTriggerTab != 0) && !((*TParse)(unsafe.Pointer(pParse)).FbReturning != 0) {
- v13 = pParse + 48
- *(*int32)(unsafe.Pointer(v13))++
- v12 = *(*int32)(unsafe.Pointer(v13))
- regRowCount = v12
+ v12 = pParse + 52
+ *(*int32)(unsafe.Pointer(v12))++
+ v11 = *(*int32)(unsafe.Pointer(v12))
+ regRowCount = v11
_sqlite3VdbeAddOp2(tls, v, int32(OP_Integer), 0, regRowCount)
}
/* If this is not a view, open the table and and all indices */
@@ -110282,29 +110597,29 @@ func _sqlite3Insert(tls *libc.TLS, pParse uintptr, pTabList uintptr, pSelect uin
if !(i < nIdx) {
break
}
- v16 = pParse + 48
- *(*int32)(unsafe.Pointer(v16))++
- v15 = *(*int32)(unsafe.Pointer(v16))
- *(*int32)(unsafe.Pointer(aRegIdx + uintptr(i)*4)) = v15
- *(*int32)(unsafe.Pointer(pParse + 48)) += libc.Int32FromUint16((*TIndex)(unsafe.Pointer(pIdx)).FnColumn)
- goto _14
- _14:
+ v15 = pParse + 52
+ *(*int32)(unsafe.Pointer(v15))++
+ v14 = *(*int32)(unsafe.Pointer(v15))
+ *(*int32)(unsafe.Pointer(aRegIdx + uintptr(i)*4)) = v14
+ *(*int32)(unsafe.Pointer(pParse + 52)) += libc.Int32FromUint16((*TIndex)(unsafe.Pointer(pIdx)).FnColumn)
+ goto _13
+ _13:
;
pIdx = (*TIndex)(unsafe.Pointer(pIdx)).FpNext
i++
}
- v18 = pParse + 48
- *(*int32)(unsafe.Pointer(v18))++
- v17 = *(*int32)(unsafe.Pointer(v18))
- *(*int32)(unsafe.Pointer(aRegIdx + uintptr(i)*4)) = v17 /* Register to store the table record */
+ v17 = pParse + 52
+ *(*int32)(unsafe.Pointer(v17))++
+ v16 = *(*int32)(unsafe.Pointer(v17))
+ *(*int32)(unsafe.Pointer(aRegIdx + uintptr(i)*4)) = v16 /* Register to store the table record */
}
if pUpsert != 0 {
if libc.Int32FromUint8((*TTable)(unsafe.Pointer(pTab)).FeTabType) == int32(TABTYP_VTAB) {
- _sqlite3ErrorMsg(tls, pParse, __ccgo_ts+16390, libc.VaList(bp+88, (*TTable)(unsafe.Pointer(pTab)).FzName))
+ _sqlite3ErrorMsg(tls, pParse, __ccgo_ts+16462, libc.VaList(bp+88, (*TTable)(unsafe.Pointer(pTab)).FzName))
goto insert_cleanup
}
if libc.Int32FromUint8((*TTable)(unsafe.Pointer(pTab)).FeTabType) == int32(TABTYP_VIEW) {
- _sqlite3ErrorMsg(tls, pParse, __ccgo_ts+16436, 0)
+ _sqlite3ErrorMsg(tls, pParse, __ccgo_ts+16508, 0)
goto insert_cleanup
}
if _sqlite3HasExplicitNulls(tls, pParse, (*TUpsert)(unsafe.Pointer(pUpsert)).FpUpsertTarget) != 0 {
@@ -110348,9 +110663,9 @@ func _sqlite3Insert(tls *libc.TLS, pParse uintptr, pTabList uintptr, pSelect uin
** goto C
** D: ...
*/
- v19 = _sqlite3VdbeAddOp1(tls, v, int32(OP_Yield), (*(*TSelectDest)(unsafe.Pointer(bp + 8))).FiSDParm)
- addrCont = v19
- addrInsTop = v19
+ v18 = _sqlite3VdbeAddOp1(tls, v, int32(OP_Yield), (*(*TSelectDest)(unsafe.Pointer(bp + 8))).FiSDParm)
+ addrCont = v18
+ addrInsTop = v18
if ipkColumn >= 0 {
/* tag-20191021-001: If the INTEGER PRIMARY KEY is being generated by the
** SELECT, go ahead and copy the value into the rowid slot now, so that
@@ -110379,18 +110694,18 @@ func _sqlite3Insert(tls *libc.TLS, pParse uintptr, pTabList uintptr, pSelect uin
** using excess space. The file format definition requires this extra
** NULL - we cannot optimize further by skipping the column completely */
_sqlite3VdbeAddOp1(tls, v, int32(OP_SoftNull), iRegStore)
- goto _20
+ goto _19
}
- v21 = uint32((*(*TColumn)(unsafe.Pointer((*TTable)(unsafe.Pointer(pTab)).FaCol + uintptr(i)*12))).FcolFlags)
- colFlags = v21
- if v21&uint32(COLFLAG_NOINSERT) != uint32(0) {
+ v20 = uint32((*(*TColumn)(unsafe.Pointer((*TTable)(unsafe.Pointer(pTab)).FaCol + uintptr(i)*12))).FcolFlags)
+ colFlags = v20
+ if v20&uint32(COLFLAG_NOINSERT) != uint32(0) {
nHidden++
if colFlags&uint32(COLFLAG_VIRTUAL) != uint32(0) {
/* Virtual columns do not participate in OP_MakeRecord. So back up
** iRegStore by one slot to compensate for the iRegStore++ in the
** outer for() loop */
iRegStore--
- goto _20
+ goto _19
} else {
if colFlags&uint32(COLFLAG_STORED) != uint32(0) {
/* Stored columns are computed later. But if there are BEFORE
@@ -110400,13 +110715,13 @@ func _sqlite3Insert(tls *libc.TLS, pParse uintptr, pTabList uintptr, pSelect uin
if *(*int32)(unsafe.Pointer(bp + 36))&int32(TRIGGER_BEFORE) != 0 {
_sqlite3VdbeAddOp1(tls, v, int32(OP_SoftNull), iRegStore)
}
- goto _20
+ goto _19
} else {
if pColumn == uintptr(0) {
/* Hidden columns that are not explicitly named in the INSERT
- ** get there default value */
+ ** get their default value */
_sqlite3ExprCodeFactorable(tls, pParse, _sqlite3ColumnExpr(tls, pTab, (*TTable)(unsafe.Pointer(pTab)).FaCol+uintptr(i)*12), iRegStore)
- goto _20
+ goto _19
}
}
}
@@ -110417,14 +110732,14 @@ func _sqlite3Insert(tls *libc.TLS, pParse uintptr, pTabList uintptr, pSelect uin
/* A column not named in the insert column list gets its
** default value */
_sqlite3ExprCodeFactorable(tls, pParse, _sqlite3ColumnExpr(tls, pTab, (*TTable)(unsafe.Pointer(pTab)).FaCol+uintptr(i)*12), iRegStore)
- goto _20
+ goto _19
}
k = j - int32(1)
} else {
if nColumn == 0 {
/* This is INSERT INTO ... DEFAULT VALUES. Load the default value. */
_sqlite3ExprCodeFactorable(tls, pParse, _sqlite3ColumnExpr(tls, pTab, (*TTable)(unsafe.Pointer(pTab)).FaCol+uintptr(i)*12), iRegStore)
- goto _20
+ goto _19
} else {
k = i - nHidden
}
@@ -110441,16 +110756,16 @@ func _sqlite3Insert(tls *libc.TLS, pParse uintptr, pTabList uintptr, pSelect uin
y = _sqlite3ExprCodeTarget(tls, pParse, pX, iRegStore)
if y != iRegStore {
if (*TExpr)(unsafe.Pointer(pX)).Fflags&libc.Uint32FromInt32(libc.Int32FromInt32(EP_Subquery)) != uint32(0) {
- v22 = int32(OP_Copy)
+ v21 = int32(OP_Copy)
} else {
- v22 = int32(OP_SCopy)
+ v21 = int32(OP_SCopy)
}
- _sqlite3VdbeAddOp2(tls, v, v22, y, iRegStore)
+ _sqlite3VdbeAddOp2(tls, v, v21, y, iRegStore)
}
}
}
- goto _20
- _20:
+ goto _19
+ _19:
;
i++
iRegStore++
@@ -110561,11 +110876,11 @@ func _sqlite3Insert(tls *libc.TLS, pParse uintptr, pTabList uintptr, pSelect uin
_sqlite3VtabMakeWritable(tls, pParse, pTab)
_sqlite3VdbeAddOp4(tls, v, int32(OP_VUpdate), int32(1), int32((*TTable)(unsafe.Pointer(pTab)).FnCol)+int32(2), regIns, pVTab, -int32(11))
if onError == int32(OE_Default) {
- v23 = int32(OE_Abort)
+ v22 = int32(OE_Abort)
} else {
- v23 = onError
+ v22 = onError
}
- _sqlite3VdbeChangeP5(tls, v, libc.Uint16FromInt32(v23))
+ _sqlite3VdbeChangeP5(tls, v, libc.Uint16FromInt32(v22))
_sqlite3MayAbort(tls, pParse)
} else {
*(*int32)(unsafe.Pointer(bp + 76)) = 0 /* True to use OPFLAG_SEEKRESULT */
@@ -110624,7 +110939,7 @@ insert_end:
** invoke the callback function.
*/
if regRowCount != 0 {
- _sqlite3CodeChangeCount(tls, v, regRowCount, __ccgo_ts+16457)
+ _sqlite3CodeChangeCount(tls, v, regRowCount, __ccgo_ts+16529)
}
goto insert_cleanup
insert_cleanup:
@@ -111020,7 +111335,7 @@ func _sqlite3GenerateConstraintChecks(tls *libc.TLS, pParse uintptr, pTab uintpt
case int32(OE_Rollback):
fallthrough
case int32(OE_Fail):
- zMsg = _sqlite3MPrintf(tls, db, __ccgo_ts+12572, libc.VaList(bp+48, (*TTable)(unsafe.Pointer(pTab)).FzName, (*TColumn)(unsafe.Pointer(pCol)).FzCnName))
+ zMsg = _sqlite3MPrintf(tls, db, __ccgo_ts+12597, libc.VaList(bp+48, (*TTable)(unsafe.Pointer(pTab)).FzName, (*TColumn)(unsafe.Pointer(pCol)).FzCnName))
_sqlite3VdbeAddOp3(tls, v, int32(OP_HaltIfNull), libc.Int32FromInt32(SQLITE_CONSTRAINT)|libc.Int32FromInt32(5)<<libc.Int32FromInt32(8), onError, iReg)
_sqlite3VdbeAppendP4(tls, v, zMsg, -int32(6))
_sqlite3VdbeChangeP5(tls, v, uint16(P5_ConstraintNotNull))
@@ -111114,7 +111429,7 @@ func _sqlite3GenerateConstraintChecks(tls *libc.TLS, pParse uintptr, pTab uintpt
** could happen in any order, but they are grouped up front for
** convenience.
**
- ** 2018-08-14: Ticket https://www.sqlite.org/src/info/908f001483982c43
+ ** 2018-08-14: Ticket https://sqlite.org/src/info/908f001483982c43
** The order of constraints used to have OE_Update as (2) and OE_Abort
** and so forth as (1). But apparently PostgreSQL checks the OE_Update
** constraint before any others, so it had to be moved.
@@ -111255,7 +111570,7 @@ func _sqlite3GenerateConstraintChecks(tls *libc.TLS, pParse uintptr, pTab uintpt
if regTrigCnt != 0 {
/* Replace triggers might exist. Allocate the counter and
** initialize it to zero. */
- v8 = pParse + 48
+ v8 = pParse + 52
*(*int32)(unsafe.Pointer(v8))++
v7 = *(*int32)(unsafe.Pointer(v8))
regTrigCnt = v7
@@ -111510,7 +111825,7 @@ func _sqlite3GenerateConstraintChecks(tls *libc.TLS, pParse uintptr, pTab uintpt
if !(i < libc.Int32FromUint16((*TIndex)(unsafe.Pointer(pPk)).FnKeyCol)) {
break
}
- x1 = int32(_sqlite3TableColumnToIndex(tls, pIdx, *(*Ti16)(unsafe.Pointer((*TIndex)(unsafe.Pointer(pPk)).FaiColumn + uintptr(i)*2))))
+ x1 = _sqlite3TableColumnToIndex(tls, pIdx, int32(*(*Ti16)(unsafe.Pointer((*TIndex)(unsafe.Pointer(pPk)).FaiColumn + uintptr(i)*2))))
_sqlite3VdbeAddOp3(tls, v, int32(OP_Column), iThisCur, x1, regR+i)
goto _12
_12:
@@ -112152,11 +112467,11 @@ func _xferOptimization(tls *libc.TLS, pParse uintptr, pDest uintptr, pSelect uin
iDbSrc = _sqlite3SchemaToIndex(tls, db, (*TTable)(unsafe.Pointer(pSrc)).FpSchema)
v = _sqlite3GetVdbe(tls, pParse)
_sqlite3CodeVerifySchema(tls, pParse, iDbSrc)
- v5 = pParse + 44
+ v5 = pParse + 48
v4 = *(*int32)(unsafe.Pointer(v5))
*(*int32)(unsafe.Pointer(v5))++
iSrc = v4
- v7 = pParse + 44
+ v7 = pParse + 48
v6 = *(*int32)(unsafe.Pointer(v7))
*(*int32)(unsafe.Pointer(v7))++
iDest = v6
@@ -112372,7 +112687,7 @@ func Xsqlite3_exec(tls *libc.TLS, db uintptr, zSql uintptr, xCallback Tsqlite3_c
*(*uintptr)(unsafe.Pointer(bp + 4)) = uintptr(0) /* The current SQL statement */
azCols = uintptr(0) /* True if callback data is initialized */
if !(_sqlite3SafetyCheckOk(tls, db) != 0) {
- return _sqlite3MisuseError(tls, int32(137273))
+ return _sqlite3MisuseError(tls, int32(138204))
}
if zSql == uintptr(0) {
zSql = __ccgo_ts + 1667
@@ -112803,6 +113118,7 @@ type Tsqlite3_api_routines1 = struct {
Fstmt_explain uintptr
Fget_clientdata uintptr
Fset_clientdata uintptr
+ Fsetlk_timeout uintptr
}
type sqlite3_api_routines1 = Tsqlite3_api_routines1
@@ -113131,6 +113447,7 @@ func init() {
*(*uintptr)(unsafe.Add(p, 1068)) = __ccgo_fp(Xsqlite3_stmt_explain)
*(*uintptr)(unsafe.Add(p, 1072)) = __ccgo_fp(Xsqlite3_get_clientdata)
*(*uintptr)(unsafe.Add(p, 1076)) = __ccgo_fp(Xsqlite3_set_clientdata)
+ *(*uintptr)(unsafe.Add(p, 1080)) = __ccgo_fp(Xsqlite3_setlk_timeout)
}
/* True if x is the directory separator character
@@ -113175,14 +113492,14 @@ func _sqlite3LoadExtension(tls *libc.TLS, db uintptr, zFile uintptr, zProc uintp
*/
if (*Tsqlite3)(unsafe.Pointer(db)).Fflags&uint64(SQLITE_LoadExtension) == uint64(0) {
if pzErrMsg != 0 {
- *(*uintptr)(unsafe.Pointer(pzErrMsg)) = Xsqlite3_mprintf(tls, __ccgo_ts+12611, 0)
+ *(*uintptr)(unsafe.Pointer(pzErrMsg)) = Xsqlite3_mprintf(tls, __ccgo_ts+12636, 0)
}
return int32(SQLITE_ERROR)
}
if zProc != 0 {
v1 = zProc
} else {
- v1 = __ccgo_ts + 16474
+ v1 = __ccgo_ts + 16546
}
zEntry = v1
/* tag-20210611-1. Some dlopen() implementations will segfault if given
@@ -113207,7 +113524,7 @@ func _sqlite3LoadExtension(tls *libc.TLS, db uintptr, zFile uintptr, zProc uintp
if !(ii < libc.Int32FromUint32(libc.Uint32FromInt64(4)/libc.Uint32FromInt64(4)) && handle == uintptr(0)) {
break
}
- zAltFile = Xsqlite3_mprintf(tls, __ccgo_ts+12572, libc.VaList(bp+16, zFile, _azEndings[ii]))
+ zAltFile = Xsqlite3_mprintf(tls, __ccgo_ts+12597, libc.VaList(bp+16, zFile, _azEndings[ii]))
if zAltFile == uintptr(0) {
return int32(SQLITE_NOMEM)
}
@@ -113242,7 +113559,7 @@ func _sqlite3LoadExtension(tls *libc.TLS, db uintptr, zFile uintptr, zProc uintp
_sqlite3OsDlClose(tls, pVfs, handle)
return int32(SQLITE_NOMEM)
}
- libc.Xmemcpy(tls, zAltEntry, __ccgo_ts+16497, uint32(8))
+ libc.Xmemcpy(tls, zAltEntry, __ccgo_ts+16569, uint32(8))
iFile = ncFile - int32(1)
for {
if !(iFile >= 0 && !(int32(*(*int8)(unsafe.Pointer(zFile + uintptr(iFile)))) == libc.Int32FromUint8('/'))) {
@@ -113254,7 +113571,7 @@ func _sqlite3LoadExtension(tls *libc.TLS, db uintptr, zFile uintptr, zProc uintp
iFile--
}
iFile++
- if Xsqlite3_strnicmp(tls, zFile+uintptr(iFile), __ccgo_ts+16506, int32(3)) == 0 {
+ if Xsqlite3_strnicmp(tls, zFile+uintptr(iFile), __ccgo_ts+16578, int32(3)) == 0 {
iFile += int32(3)
}
iEntry = int32(8)
@@ -113274,7 +113591,7 @@ func _sqlite3LoadExtension(tls *libc.TLS, db uintptr, zFile uintptr, zProc uintp
;
iFile++
}
- libc.Xmemcpy(tls, zAltEntry+uintptr(iEntry), __ccgo_ts+16510, uint32(6))
+ libc.Xmemcpy(tls, zAltEntry+uintptr(iEntry), __ccgo_ts+16582, uint32(6))
zEntry = zAltEntry
xInit = _sqlite3OsDlSym(tls, pVfs, handle, zEntry)
}
@@ -113286,7 +113603,7 @@ func _sqlite3LoadExtension(tls *libc.TLS, db uintptr, zFile uintptr, zProc uintp
*(*uintptr)(unsafe.Pointer(pzErrMsg)) = v7
if *(*uintptr)(unsafe.Pointer(bp)) != 0 {
/* zErrmsg would be NULL if not so */
- Xsqlite3_snprintf(tls, libc.Int32FromUint64(nMsg), *(*uintptr)(unsafe.Pointer(bp)), __ccgo_ts+16516, libc.VaList(bp+16, zEntry, zFile))
+ Xsqlite3_snprintf(tls, libc.Int32FromUint64(nMsg), *(*uintptr)(unsafe.Pointer(bp)), __ccgo_ts+16588, libc.VaList(bp+16, zEntry, zFile))
_sqlite3OsDlError(tls, pVfs, libc.Int32FromUint64(nMsg-uint64(1)), *(*uintptr)(unsafe.Pointer(bp)))
}
}
@@ -113301,7 +113618,7 @@ func _sqlite3LoadExtension(tls *libc.TLS, db uintptr, zFile uintptr, zProc uintp
return SQLITE_OK
}
if pzErrMsg != 0 {
- *(*uintptr)(unsafe.Pointer(pzErrMsg)) = Xsqlite3_mprintf(tls, __ccgo_ts+16559, libc.VaList(bp+16, *(*uintptr)(unsafe.Pointer(bp))))
+ *(*uintptr)(unsafe.Pointer(pzErrMsg)) = Xsqlite3_mprintf(tls, __ccgo_ts+16631, libc.VaList(bp+16, *(*uintptr)(unsafe.Pointer(bp))))
}
Xsqlite3_free(tls, *(*uintptr)(unsafe.Pointer(bp)))
_sqlite3OsDlClose(tls, pVfs, handle)
@@ -113332,7 +113649,7 @@ extension_not_found:
*(*uintptr)(unsafe.Pointer(pzErrMsg)) = v10
if *(*uintptr)(unsafe.Pointer(bp)) != 0 {
/* zErrmsg would be NULL if not so */
- Xsqlite3_snprintf(tls, libc.Int32FromUint64(nMsg), *(*uintptr)(unsafe.Pointer(bp)), __ccgo_ts+16591, libc.VaList(bp+16, int32(FILENAME_MAX), zFile))
+ Xsqlite3_snprintf(tls, libc.Int32FromUint64(nMsg), *(*uintptr)(unsafe.Pointer(bp)), __ccgo_ts+16663, libc.VaList(bp+16, int32(FILENAME_MAX), zFile))
_sqlite3OsDlError(tls, pVfs, libc.Int32FromUint64(nMsg-uint64(1)), *(*uintptr)(unsafe.Pointer(bp)))
}
}
@@ -113341,7 +113658,7 @@ extension_not_found:
/* Shared library endings to try if zFile cannot be loaded as written */
var _azEndings = [1]uintptr{
- 0: __ccgo_ts + 16471,
+ 0: __ccgo_ts + 16543,
}
func Xsqlite3_load_extension(tls *libc.TLS, db uintptr, zFile uintptr, zProc uintptr, pzErrMsg uintptr) (r int32) {
@@ -113574,7 +113891,7 @@ func _sqlite3AutoLoadExtensions(tls *libc.TLS, db uintptr) {
rc = v2
}
if v3 && v2 != 0 {
- _sqlite3ErrorWithMsg(tls, db, rc, __ccgo_ts+16628, libc.VaList(bp+16, *(*uintptr)(unsafe.Pointer(bp))))
+ _sqlite3ErrorWithMsg(tls, db, rc, __ccgo_ts+16700, libc.VaList(bp+16, *(*uintptr)(unsafe.Pointer(bp))))
go1 = 0
}
Xsqlite3_free(tls, *(*uintptr)(unsafe.Pointer(bp)))
@@ -113628,63 +113945,63 @@ func _sqlite3AutoLoadExtensions(tls *libc.TLS, db uintptr) {
// ** result column is different from the name of the pragma
// */
var _pragCName = [57]uintptr{
- 0: __ccgo_ts + 5566,
- 1: __ccgo_ts + 16667,
- 2: __ccgo_ts + 9249,
- 3: __ccgo_ts + 16671,
- 4: __ccgo_ts + 16676,
- 5: __ccgo_ts + 16679,
- 6: __ccgo_ts + 16689,
- 7: __ccgo_ts + 16699,
- 8: __ccgo_ts + 16705,
- 9: __ccgo_ts + 16709,
- 10: __ccgo_ts + 16714,
- 11: __ccgo_ts + 16719,
- 12: __ccgo_ts + 16727,
- 13: __ccgo_ts + 16738,
- 14: __ccgo_ts + 16741,
- 15: __ccgo_ts + 16709,
- 16: __ccgo_ts + 16748,
- 17: __ccgo_ts + 16714,
- 18: __ccgo_ts + 16756,
- 19: __ccgo_ts + 16760,
- 20: __ccgo_ts + 16765,
- 21: __ccgo_ts + 16771,
- 22: __ccgo_ts + 16709,
- 23: __ccgo_ts + 16714,
- 24: __ccgo_ts + 16778,
- 25: __ccgo_ts + 16783,
- 26: __ccgo_ts + 16786,
- 27: __ccgo_ts + 16793,
- 28: __ccgo_ts + 16705,
- 29: __ccgo_ts + 16709,
- 30: __ccgo_ts + 16799,
- 31: __ccgo_ts + 16804,
- 32: __ccgo_ts + 16809,
- 33: __ccgo_ts + 16667,
- 34: __ccgo_ts + 16709,
- 35: __ccgo_ts + 16813,
- 36: __ccgo_ts + 16820,
- 37: __ccgo_ts + 16827,
- 38: __ccgo_ts + 11988,
- 39: __ccgo_ts + 11984,
- 40: __ccgo_ts + 16835,
- 41: __ccgo_ts + 16840,
- 42: __ccgo_ts + 16845,
- 43: __ccgo_ts + 9249,
- 44: __ccgo_ts + 16850,
- 45: __ccgo_ts + 5569,
- 46: __ccgo_ts + 16856,
- 47: __ccgo_ts + 16861,
- 48: __ccgo_ts + 16052,
- 49: __ccgo_ts + 16866,
- 50: __ccgo_ts + 16667,
- 51: __ccgo_ts + 16709,
- 52: __ccgo_ts + 16879,
- 53: __ccgo_ts + 16884,
- 54: __ccgo_ts + 16893,
- 55: __ccgo_ts + 16900,
- 56: __ccgo_ts + 16911,
+ 0: __ccgo_ts + 5592,
+ 1: __ccgo_ts + 16739,
+ 2: __ccgo_ts + 9274,
+ 3: __ccgo_ts + 16743,
+ 4: __ccgo_ts + 16748,
+ 5: __ccgo_ts + 16751,
+ 6: __ccgo_ts + 16761,
+ 7: __ccgo_ts + 16771,
+ 8: __ccgo_ts + 16777,
+ 9: __ccgo_ts + 16781,
+ 10: __ccgo_ts + 16786,
+ 11: __ccgo_ts + 16791,
+ 12: __ccgo_ts + 16799,
+ 13: __ccgo_ts + 16810,
+ 14: __ccgo_ts + 16813,
+ 15: __ccgo_ts + 16781,
+ 16: __ccgo_ts + 16820,
+ 17: __ccgo_ts + 16786,
+ 18: __ccgo_ts + 16828,
+ 19: __ccgo_ts + 16832,
+ 20: __ccgo_ts + 16837,
+ 21: __ccgo_ts + 16843,
+ 22: __ccgo_ts + 16781,
+ 23: __ccgo_ts + 16786,
+ 24: __ccgo_ts + 16850,
+ 25: __ccgo_ts + 16855,
+ 26: __ccgo_ts + 16858,
+ 27: __ccgo_ts + 16865,
+ 28: __ccgo_ts + 16777,
+ 29: __ccgo_ts + 16781,
+ 30: __ccgo_ts + 16871,
+ 31: __ccgo_ts + 16876,
+ 32: __ccgo_ts + 16881,
+ 33: __ccgo_ts + 16739,
+ 34: __ccgo_ts + 16781,
+ 35: __ccgo_ts + 16885,
+ 36: __ccgo_ts + 16892,
+ 37: __ccgo_ts + 16899,
+ 38: __ccgo_ts + 12013,
+ 39: __ccgo_ts + 12009,
+ 40: __ccgo_ts + 16907,
+ 41: __ccgo_ts + 16912,
+ 42: __ccgo_ts + 16917,
+ 43: __ccgo_ts + 9274,
+ 44: __ccgo_ts + 16922,
+ 45: __ccgo_ts + 5595,
+ 46: __ccgo_ts + 16928,
+ 47: __ccgo_ts + 16933,
+ 48: __ccgo_ts + 16124,
+ 49: __ccgo_ts + 16938,
+ 50: __ccgo_ts + 16739,
+ 51: __ccgo_ts + 16781,
+ 52: __ccgo_ts + 16951,
+ 53: __ccgo_ts + 16956,
+ 54: __ccgo_ts + 16965,
+ 55: __ccgo_ts + 16972,
+ 56: __ccgo_ts + 16983,
}
// C documentation
@@ -113703,191 +114020,191 @@ type PragmaName = TPragmaName
var _aPragmaName = [66]TPragmaName{
0: {
- FzName: __ccgo_ts + 16919,
+ FzName: __ccgo_ts + 16991,
FePragTyp: uint8(PragTyp_ANALYSIS_LIMIT),
FmPragFlg: uint8(PragFlg_Result0),
},
1: {
- FzName: __ccgo_ts + 16934,
+ FzName: __ccgo_ts + 17006,
FePragTyp: uint8(PragTyp_HEADER_VALUE),
FmPragFlg: libc.Uint8FromInt32(libc.Int32FromInt32(PragFlg_NoColumns1) | libc.Int32FromInt32(PragFlg_Result0)),
FiArg: uint64(BTREE_APPLICATION_ID),
},
2: {
- FzName: __ccgo_ts + 16949,
+ FzName: __ccgo_ts + 17021,
FePragTyp: uint8(PragTyp_AUTO_VACUUM),
FmPragFlg: libc.Uint8FromInt32(libc.Int32FromInt32(PragFlg_NeedSchema) | libc.Int32FromInt32(PragFlg_Result0) | libc.Int32FromInt32(PragFlg_SchemaReq) | libc.Int32FromInt32(PragFlg_NoColumns1)),
},
3: {
- FzName: __ccgo_ts + 16961,
+ FzName: __ccgo_ts + 17033,
FePragTyp: uint8(PragTyp_FLAG),
FmPragFlg: libc.Uint8FromInt32(libc.Int32FromInt32(PragFlg_Result0) | libc.Int32FromInt32(PragFlg_NoColumns1)),
FiArg: uint64(SQLITE_AutoIndex),
},
4: {
- FzName: __ccgo_ts + 16977,
+ FzName: __ccgo_ts + 17049,
FePragTyp: uint8(PragTyp_BUSY_TIMEOUT),
FmPragFlg: uint8(PragFlg_Result0),
FiPragCName: uint8(56),
FnPragCName: uint8(1),
},
5: {
- FzName: __ccgo_ts + 16900,
+ FzName: __ccgo_ts + 16972,
FePragTyp: uint8(PragTyp_CACHE_SIZE),
FmPragFlg: libc.Uint8FromInt32(libc.Int32FromInt32(PragFlg_NeedSchema) | libc.Int32FromInt32(PragFlg_Result0) | libc.Int32FromInt32(PragFlg_SchemaReq) | libc.Int32FromInt32(PragFlg_NoColumns1)),
},
6: {
- FzName: __ccgo_ts + 16990,
+ FzName: __ccgo_ts + 17062,
FePragTyp: uint8(PragTyp_CACHE_SPILL),
FmPragFlg: libc.Uint8FromInt32(libc.Int32FromInt32(PragFlg_Result0) | libc.Int32FromInt32(PragFlg_SchemaReq) | libc.Int32FromInt32(PragFlg_NoColumns1)),
},
7: {
- FzName: __ccgo_ts + 17002,
+ FzName: __ccgo_ts + 17074,
FePragTyp: uint8(PragTyp_CASE_SENSITIVE_LIKE),
FmPragFlg: uint8(PragFlg_NoColumns),
},
8: {
- FzName: __ccgo_ts + 17022,
+ FzName: __ccgo_ts + 17094,
FePragTyp: uint8(PragTyp_FLAG),
FmPragFlg: libc.Uint8FromInt32(libc.Int32FromInt32(PragFlg_Result0) | libc.Int32FromInt32(PragFlg_NoColumns1)),
FiArg: uint64(SQLITE_CellSizeCk),
},
9: {
- FzName: __ccgo_ts + 17038,
+ FzName: __ccgo_ts + 17110,
FePragTyp: uint8(PragTyp_FLAG),
FmPragFlg: libc.Uint8FromInt32(libc.Int32FromInt32(PragFlg_Result0) | libc.Int32FromInt32(PragFlg_NoColumns1)),
FiArg: uint64(SQLITE_CkptFullFSync),
},
10: {
- FzName: __ccgo_ts + 17059,
+ FzName: __ccgo_ts + 17131,
FePragTyp: uint8(PragTyp_COLLATION_LIST),
FmPragFlg: uint8(PragFlg_Result0),
FiPragCName: uint8(33),
FnPragCName: uint8(2),
},
11: {
- FzName: __ccgo_ts + 17074,
+ FzName: __ccgo_ts + 17146,
FePragTyp: uint8(PragTyp_COMPILE_OPTIONS),
FmPragFlg: uint8(PragFlg_Result0),
},
12: {
- FzName: __ccgo_ts + 17090,
+ FzName: __ccgo_ts + 17162,
FePragTyp: uint8(PragTyp_FLAG),
FmPragFlg: libc.Uint8FromInt32(libc.Int32FromInt32(PragFlg_Result0) | libc.Int32FromInt32(PragFlg_NoColumns1)),
FiArg: libc.Uint64FromInt32(libc.Int32FromInt32(0x00001)) << libc.Int32FromInt32(32),
},
13: {
- FzName: __ccgo_ts + 17104,
+ FzName: __ccgo_ts + 17176,
FePragTyp: uint8(PragTyp_HEADER_VALUE),
FmPragFlg: libc.Uint8FromInt32(libc.Int32FromInt32(PragFlg_ReadOnly) | libc.Int32FromInt32(PragFlg_Result0)),
FiArg: uint64(BTREE_DATA_VERSION),
},
14: {
- FzName: __ccgo_ts + 17117,
+ FzName: __ccgo_ts + 17189,
FePragTyp: uint8(PragTyp_DATABASE_LIST),
FmPragFlg: uint8(PragFlg_Result0),
FiPragCName: uint8(50),
FnPragCName: uint8(3),
},
15: {
- FzName: __ccgo_ts + 17131,
+ FzName: __ccgo_ts + 17203,
FePragTyp: uint8(PragTyp_DEFAULT_CACHE_SIZE),
FmPragFlg: libc.Uint8FromInt32(libc.Int32FromInt32(PragFlg_NeedSchema) | libc.Int32FromInt32(PragFlg_Result0) | libc.Int32FromInt32(PragFlg_SchemaReq) | libc.Int32FromInt32(PragFlg_NoColumns1)),
FiPragCName: uint8(55),
FnPragCName: uint8(1),
},
16: {
- FzName: __ccgo_ts + 17150,
+ FzName: __ccgo_ts + 17222,
FePragTyp: uint8(PragTyp_FLAG),
FmPragFlg: libc.Uint8FromInt32(libc.Int32FromInt32(PragFlg_Result0) | libc.Int32FromInt32(PragFlg_NoColumns1)),
FiArg: uint64(SQLITE_DeferFKs),
},
17: {
- FzName: __ccgo_ts + 17169,
+ FzName: __ccgo_ts + 17241,
FePragTyp: uint8(PragTyp_FLAG),
FmPragFlg: libc.Uint8FromInt32(libc.Int32FromInt32(PragFlg_Result0) | libc.Int32FromInt32(PragFlg_NoColumns1)),
FiArg: uint64(SQLITE_NullCallback),
},
18: {
- FzName: __ccgo_ts + 17192,
+ FzName: __ccgo_ts + 17264,
FePragTyp: uint8(PragTyp_ENCODING),
FmPragFlg: libc.Uint8FromInt32(libc.Int32FromInt32(PragFlg_Result0) | libc.Int32FromInt32(PragFlg_NoColumns1)),
},
19: {
- FzName: __ccgo_ts + 17201,
+ FzName: __ccgo_ts + 17273,
FePragTyp: uint8(PragTyp_FOREIGN_KEY_CHECK),
FmPragFlg: libc.Uint8FromInt32(libc.Int32FromInt32(PragFlg_NeedSchema) | libc.Int32FromInt32(PragFlg_Result0) | libc.Int32FromInt32(PragFlg_Result1) | libc.Int32FromInt32(PragFlg_SchemaOpt)),
FiPragCName: uint8(43),
FnPragCName: uint8(4),
},
20: {
- FzName: __ccgo_ts + 17219,
+ FzName: __ccgo_ts + 17291,
FePragTyp: uint8(PragTyp_FOREIGN_KEY_LIST),
FmPragFlg: libc.Uint8FromInt32(libc.Int32FromInt32(PragFlg_NeedSchema) | libc.Int32FromInt32(PragFlg_Result1) | libc.Int32FromInt32(PragFlg_SchemaOpt)),
FnPragCName: uint8(8),
},
21: {
- FzName: __ccgo_ts + 17236,
+ FzName: __ccgo_ts + 17308,
FePragTyp: uint8(PragTyp_FLAG),
FmPragFlg: libc.Uint8FromInt32(libc.Int32FromInt32(PragFlg_Result0) | libc.Int32FromInt32(PragFlg_NoColumns1)),
FiArg: uint64(SQLITE_ForeignKeys),
},
22: {
- FzName: __ccgo_ts + 17249,
+ FzName: __ccgo_ts + 17321,
FePragTyp: uint8(PragTyp_HEADER_VALUE),
FmPragFlg: libc.Uint8FromInt32(libc.Int32FromInt32(PragFlg_ReadOnly) | libc.Int32FromInt32(PragFlg_Result0)),
},
23: {
- FzName: __ccgo_ts + 17264,
+ FzName: __ccgo_ts + 17336,
FePragTyp: uint8(PragTyp_FLAG),
FmPragFlg: libc.Uint8FromInt32(libc.Int32FromInt32(PragFlg_Result0) | libc.Int32FromInt32(PragFlg_NoColumns1)),
FiArg: uint64(SQLITE_FullColNames),
},
24: {
- FzName: __ccgo_ts + 17282,
+ FzName: __ccgo_ts + 17354,
FePragTyp: uint8(PragTyp_FLAG),
FmPragFlg: libc.Uint8FromInt32(libc.Int32FromInt32(PragFlg_Result0) | libc.Int32FromInt32(PragFlg_NoColumns1)),
FiArg: uint64(SQLITE_FullFSync),
},
25: {
- FzName: __ccgo_ts + 17292,
+ FzName: __ccgo_ts + 17364,
FePragTyp: uint8(PragTyp_FUNCTION_LIST),
FmPragFlg: uint8(PragFlg_Result0),
FiPragCName: uint8(15),
FnPragCName: uint8(6),
},
26: {
- FzName: __ccgo_ts + 17306,
+ FzName: __ccgo_ts + 17378,
FePragTyp: uint8(PragTyp_HARD_HEAP_LIMIT),
FmPragFlg: uint8(PragFlg_Result0),
},
27: {
- FzName: __ccgo_ts + 17322,
+ FzName: __ccgo_ts + 17394,
FePragTyp: uint8(PragTyp_FLAG),
FmPragFlg: libc.Uint8FromInt32(libc.Int32FromInt32(PragFlg_Result0) | libc.Int32FromInt32(PragFlg_NoColumns1)),
FiArg: uint64(SQLITE_IgnoreChecks),
},
28: {
- FzName: __ccgo_ts + 17347,
+ FzName: __ccgo_ts + 17419,
FePragTyp: uint8(PragTyp_INCREMENTAL_VACUUM),
FmPragFlg: libc.Uint8FromInt32(libc.Int32FromInt32(PragFlg_NeedSchema) | libc.Int32FromInt32(PragFlg_NoColumns)),
},
29: {
- FzName: __ccgo_ts + 17366,
+ FzName: __ccgo_ts + 17438,
FePragTyp: uint8(PragTyp_INDEX_INFO),
FmPragFlg: libc.Uint8FromInt32(libc.Int32FromInt32(PragFlg_NeedSchema) | libc.Int32FromInt32(PragFlg_Result1) | libc.Int32FromInt32(PragFlg_SchemaOpt)),
FiPragCName: uint8(27),
FnPragCName: uint8(3),
},
30: {
- FzName: __ccgo_ts + 17377,
+ FzName: __ccgo_ts + 17449,
FePragTyp: uint8(PragTyp_INDEX_LIST),
FmPragFlg: libc.Uint8FromInt32(libc.Int32FromInt32(PragFlg_NeedSchema) | libc.Int32FromInt32(PragFlg_Result1) | libc.Int32FromInt32(PragFlg_SchemaOpt)),
FiPragCName: uint8(33),
FnPragCName: uint8(5),
},
31: {
- FzName: __ccgo_ts + 17388,
+ FzName: __ccgo_ts + 17460,
FePragTyp: uint8(PragTyp_INDEX_INFO),
FmPragFlg: libc.Uint8FromInt32(libc.Int32FromInt32(PragFlg_NeedSchema) | libc.Int32FromInt32(PragFlg_Result1) | libc.Int32FromInt32(PragFlg_SchemaOpt)),
FiPragCName: uint8(27),
@@ -113895,146 +114212,146 @@ var _aPragmaName = [66]TPragmaName{
FiArg: uint64(1),
},
32: {
- FzName: __ccgo_ts + 17400,
+ FzName: __ccgo_ts + 17472,
FePragTyp: uint8(PragTyp_INTEGRITY_CHECK),
FmPragFlg: libc.Uint8FromInt32(libc.Int32FromInt32(PragFlg_NeedSchema) | libc.Int32FromInt32(PragFlg_Result0) | libc.Int32FromInt32(PragFlg_Result1) | libc.Int32FromInt32(PragFlg_SchemaOpt)),
},
33: {
- FzName: __ccgo_ts + 17416,
+ FzName: __ccgo_ts + 17488,
FePragTyp: uint8(PragTyp_JOURNAL_MODE),
FmPragFlg: libc.Uint8FromInt32(libc.Int32FromInt32(PragFlg_NeedSchema) | libc.Int32FromInt32(PragFlg_Result0) | libc.Int32FromInt32(PragFlg_SchemaReq)),
},
34: {
- FzName: __ccgo_ts + 17429,
+ FzName: __ccgo_ts + 17501,
FePragTyp: uint8(PragTyp_JOURNAL_SIZE_LIMIT),
FmPragFlg: libc.Uint8FromInt32(libc.Int32FromInt32(PragFlg_Result0) | libc.Int32FromInt32(PragFlg_SchemaReq)),
},
35: {
- FzName: __ccgo_ts + 17448,
+ FzName: __ccgo_ts + 17520,
FePragTyp: uint8(PragTyp_FLAG),
FmPragFlg: libc.Uint8FromInt32(libc.Int32FromInt32(PragFlg_Result0) | libc.Int32FromInt32(PragFlg_NoColumns1)),
FiArg: uint64(SQLITE_LegacyAlter),
},
36: {
- FzName: __ccgo_ts + 17467,
+ FzName: __ccgo_ts + 17539,
FePragTyp: uint8(PragTyp_LOCKING_MODE),
FmPragFlg: libc.Uint8FromInt32(libc.Int32FromInt32(PragFlg_Result0) | libc.Int32FromInt32(PragFlg_SchemaReq)),
},
37: {
- FzName: __ccgo_ts + 17480,
+ FzName: __ccgo_ts + 17552,
FePragTyp: uint8(PragTyp_PAGE_COUNT),
FmPragFlg: libc.Uint8FromInt32(libc.Int32FromInt32(PragFlg_NeedSchema) | libc.Int32FromInt32(PragFlg_Result0) | libc.Int32FromInt32(PragFlg_SchemaReq)),
},
38: {
- FzName: __ccgo_ts + 17495,
+ FzName: __ccgo_ts + 17567,
FePragTyp: uint8(PragTyp_MMAP_SIZE),
},
39: {
- FzName: __ccgo_ts + 17505,
+ FzName: __ccgo_ts + 17577,
FePragTyp: uint8(PragTyp_MODULE_LIST),
FmPragFlg: uint8(PragFlg_Result0),
FiPragCName: uint8(9),
FnPragCName: uint8(1),
},
40: {
- FzName: __ccgo_ts + 17517,
+ FzName: __ccgo_ts + 17589,
FePragTyp: uint8(PragTyp_OPTIMIZE),
FmPragFlg: libc.Uint8FromInt32(libc.Int32FromInt32(PragFlg_Result1) | libc.Int32FromInt32(PragFlg_NeedSchema)),
},
41: {
- FzName: __ccgo_ts + 17526,
+ FzName: __ccgo_ts + 17598,
FePragTyp: uint8(PragTyp_PAGE_COUNT),
FmPragFlg: libc.Uint8FromInt32(libc.Int32FromInt32(PragFlg_NeedSchema) | libc.Int32FromInt32(PragFlg_Result0) | libc.Int32FromInt32(PragFlg_SchemaReq)),
},
42: {
- FzName: __ccgo_ts + 17537,
+ FzName: __ccgo_ts + 17609,
FePragTyp: uint8(PragTyp_PAGE_SIZE),
FmPragFlg: libc.Uint8FromInt32(libc.Int32FromInt32(PragFlg_Result0) | libc.Int32FromInt32(PragFlg_SchemaReq) | libc.Int32FromInt32(PragFlg_NoColumns1)),
},
43: {
- FzName: __ccgo_ts + 17547,
+ FzName: __ccgo_ts + 17619,
FePragTyp: uint8(PragTyp_PRAGMA_LIST),
FmPragFlg: uint8(PragFlg_Result0),
FiPragCName: uint8(9),
FnPragCName: uint8(1),
},
44: {
- FzName: __ccgo_ts + 17559,
+ FzName: __ccgo_ts + 17631,
FePragTyp: uint8(PragTyp_FLAG),
FmPragFlg: libc.Uint8FromInt32(libc.Int32FromInt32(PragFlg_Result0) | libc.Int32FromInt32(PragFlg_NoColumns1)),
FiArg: uint64(SQLITE_QueryOnly),
},
45: {
- FzName: __ccgo_ts + 17570,
+ FzName: __ccgo_ts + 17642,
FePragTyp: uint8(PragTyp_INTEGRITY_CHECK),
FmPragFlg: libc.Uint8FromInt32(libc.Int32FromInt32(PragFlg_NeedSchema) | libc.Int32FromInt32(PragFlg_Result0) | libc.Int32FromInt32(PragFlg_Result1) | libc.Int32FromInt32(PragFlg_SchemaOpt)),
},
46: {
- FzName: __ccgo_ts + 17582,
+ FzName: __ccgo_ts + 17654,
FePragTyp: uint8(PragTyp_FLAG),
FmPragFlg: libc.Uint8FromInt32(libc.Int32FromInt32(PragFlg_Result0) | libc.Int32FromInt32(PragFlg_NoColumns1)),
FiArg: libc.Uint64FromInt32(libc.Int32FromInt32(0x00004)) << libc.Int32FromInt32(32),
},
47: {
- FzName: __ccgo_ts + 17599,
+ FzName: __ccgo_ts + 17671,
FePragTyp: uint8(PragTyp_FLAG),
FmPragFlg: libc.Uint8FromInt32(libc.Int32FromInt32(PragFlg_Result0) | libc.Int32FromInt32(PragFlg_NoColumns1)),
FiArg: uint64(SQLITE_RecTriggers),
},
48: {
- FzName: __ccgo_ts + 17618,
+ FzName: __ccgo_ts + 17690,
FePragTyp: uint8(PragTyp_FLAG),
FmPragFlg: libc.Uint8FromInt32(libc.Int32FromInt32(PragFlg_Result0) | libc.Int32FromInt32(PragFlg_NoColumns1)),
FiArg: uint64(SQLITE_ReverseOrder),
},
49: {
- FzName: __ccgo_ts + 17644,
+ FzName: __ccgo_ts + 17716,
FePragTyp: uint8(PragTyp_HEADER_VALUE),
FmPragFlg: libc.Uint8FromInt32(libc.Int32FromInt32(PragFlg_NoColumns1) | libc.Int32FromInt32(PragFlg_Result0)),
FiArg: uint64(BTREE_SCHEMA_VERSION),
},
50: {
- FzName: __ccgo_ts + 17659,
+ FzName: __ccgo_ts + 17731,
FePragTyp: uint8(PragTyp_SECURE_DELETE),
FmPragFlg: uint8(PragFlg_Result0),
},
51: {
- FzName: __ccgo_ts + 17673,
+ FzName: __ccgo_ts + 17745,
FePragTyp: uint8(PragTyp_FLAG),
FmPragFlg: libc.Uint8FromInt32(libc.Int32FromInt32(PragFlg_Result0) | libc.Int32FromInt32(PragFlg_NoColumns1)),
FiArg: uint64(SQLITE_ShortColNames),
},
52: {
- FzName: __ccgo_ts + 17692,
+ FzName: __ccgo_ts + 17764,
FePragTyp: uint8(PragTyp_SHRINK_MEMORY),
FmPragFlg: uint8(PragFlg_NoColumns),
},
53: {
- FzName: __ccgo_ts + 17706,
+ FzName: __ccgo_ts + 17778,
FePragTyp: uint8(PragTyp_SOFT_HEAP_LIMIT),
FmPragFlg: uint8(PragFlg_Result0),
},
54: {
- FzName: __ccgo_ts + 17722,
+ FzName: __ccgo_ts + 17794,
FePragTyp: uint8(PragTyp_SYNCHRONOUS),
FmPragFlg: libc.Uint8FromInt32(libc.Int32FromInt32(PragFlg_NeedSchema) | libc.Int32FromInt32(PragFlg_Result0) | libc.Int32FromInt32(PragFlg_SchemaReq) | libc.Int32FromInt32(PragFlg_NoColumns1)),
},
55: {
- FzName: __ccgo_ts + 17734,
+ FzName: __ccgo_ts + 17806,
FePragTyp: uint8(PragTyp_TABLE_INFO),
FmPragFlg: libc.Uint8FromInt32(libc.Int32FromInt32(PragFlg_NeedSchema) | libc.Int32FromInt32(PragFlg_Result1) | libc.Int32FromInt32(PragFlg_SchemaOpt)),
FiPragCName: uint8(8),
FnPragCName: uint8(6),
},
56: {
- FzName: __ccgo_ts + 17745,
+ FzName: __ccgo_ts + 17817,
FePragTyp: uint8(PragTyp_TABLE_LIST),
FmPragFlg: libc.Uint8FromInt32(libc.Int32FromInt32(PragFlg_NeedSchema) | libc.Int32FromInt32(PragFlg_Result1)),
FiPragCName: uint8(21),
FnPragCName: uint8(6),
},
57: {
- FzName: __ccgo_ts + 17756,
+ FzName: __ccgo_ts + 17828,
FePragTyp: uint8(PragTyp_TABLE_INFO),
FmPragFlg: libc.Uint8FromInt32(libc.Int32FromInt32(PragFlg_NeedSchema) | libc.Int32FromInt32(PragFlg_Result1) | libc.Int32FromInt32(PragFlg_SchemaOpt)),
FiPragCName: uint8(8),
@@ -114042,45 +114359,45 @@ var _aPragmaName = [66]TPragmaName{
FiArg: uint64(1),
},
58: {
- FzName: __ccgo_ts + 17768,
+ FzName: __ccgo_ts + 17840,
FePragTyp: uint8(PragTyp_TEMP_STORE),
FmPragFlg: libc.Uint8FromInt32(libc.Int32FromInt32(PragFlg_Result0) | libc.Int32FromInt32(PragFlg_NoColumns1)),
},
59: {
- FzName: __ccgo_ts + 17779,
+ FzName: __ccgo_ts + 17851,
FePragTyp: uint8(PragTyp_TEMP_STORE_DIRECTORY),
FmPragFlg: uint8(PragFlg_NoColumns1),
},
60: {
- FzName: __ccgo_ts + 17800,
+ FzName: __ccgo_ts + 17872,
FePragTyp: uint8(PragTyp_THREADS),
FmPragFlg: uint8(PragFlg_Result0),
},
61: {
- FzName: __ccgo_ts + 17808,
+ FzName: __ccgo_ts + 17880,
FePragTyp: uint8(PragTyp_FLAG),
FmPragFlg: libc.Uint8FromInt32(libc.Int32FromInt32(PragFlg_Result0) | libc.Int32FromInt32(PragFlg_NoColumns1)),
FiArg: uint64(SQLITE_TrustedSchema),
},
62: {
- FzName: __ccgo_ts + 17823,
+ FzName: __ccgo_ts + 17895,
FePragTyp: uint8(PragTyp_HEADER_VALUE),
FmPragFlg: libc.Uint8FromInt32(libc.Int32FromInt32(PragFlg_NoColumns1) | libc.Int32FromInt32(PragFlg_Result0)),
FiArg: uint64(BTREE_USER_VERSION),
},
63: {
- FzName: __ccgo_ts + 17836,
+ FzName: __ccgo_ts + 17908,
FePragTyp: uint8(PragTyp_WAL_AUTOCHECKPOINT),
},
64: {
- FzName: __ccgo_ts + 17855,
+ FzName: __ccgo_ts + 17927,
FePragTyp: uint8(PragTyp_WAL_CHECKPOINT),
FmPragFlg: uint8(PragFlg_NeedSchema),
FiPragCName: uint8(47),
FnPragCName: uint8(3),
},
65: {
- FzName: __ccgo_ts + 17870,
+ FzName: __ccgo_ts + 17942,
FePragTyp: uint8(PragTyp_FLAG),
FmPragFlg: libc.Uint8FromInt32(libc.Int32FromInt32(PragFlg_Result0) | libc.Int32FromInt32(PragFlg_NoColumns1)),
FiArg: libc.Uint64FromInt32(libc.Int32FromInt32(SQLITE_WriteSchema) | libc.Int32FromInt32(SQLITE_NoSchemaError)),
@@ -114098,7 +114415,7 @@ var _aPragmaName = [66]TPragmaName{
** the following macro or to the actual analysis_limit if it is non-zero,
** in order to prevent PRAGMA optimize from running for too long.
**
-** The value of 2000 is chosen emperically so that the worst-case run-time
+** The value of 2000 is chosen empirically so that the worst-case run-time
** for PRAGMA optimize does not exceed 100 milliseconds against a variety
** of test databases on a RaspberryPI-4 compiled using -Os and without
** -DSQLITE_DEBUG. Of course, your mileage may vary. For the purpose of
@@ -114206,10 +114523,10 @@ func _sqlite3GetBoolean(tls *libc.TLS, z uintptr, dflt Tu8) (r Tu8) {
// */
func _getLockingMode(tls *libc.TLS, z uintptr) (r int32) {
if z != 0 {
- if 0 == _sqlite3StrICmp(tls, z, __ccgo_ts+17886) {
+ if 0 == _sqlite3StrICmp(tls, z, __ccgo_ts+17958) {
return int32(PAGER_LOCKINGMODE_EXCLUSIVE)
}
- if 0 == _sqlite3StrICmp(tls, z, __ccgo_ts+17896) {
+ if 0 == _sqlite3StrICmp(tls, z, __ccgo_ts+17968) {
return PAGER_LOCKINGMODE_NORMAL
}
}
@@ -114227,13 +114544,13 @@ func _getLockingMode(tls *libc.TLS, z uintptr) (r int32) {
func _getAutoVacuum(tls *libc.TLS, z uintptr) (r int32) {
var i, v1 int32
_, _ = i, v1
- if 0 == _sqlite3StrICmp(tls, z, __ccgo_ts+8409) {
+ if 0 == _sqlite3StrICmp(tls, z, __ccgo_ts+8434) {
return BTREE_AUTOVACUUM_NONE
}
- if 0 == _sqlite3StrICmp(tls, z, __ccgo_ts+17903) {
+ if 0 == _sqlite3StrICmp(tls, z, __ccgo_ts+17975) {
return int32(BTREE_AUTOVACUUM_FULL)
}
- if 0 == _sqlite3StrICmp(tls, z, __ccgo_ts+17908) {
+ if 0 == _sqlite3StrICmp(tls, z, __ccgo_ts+17980) {
return int32(BTREE_AUTOVACUUM_INCR)
}
i = _sqlite3Atoi(tls, z)
@@ -114256,10 +114573,10 @@ func _getTempStore(tls *libc.TLS, z uintptr) (r int32) {
if int32(*(*int8)(unsafe.Pointer(z))) >= int32('0') && int32(*(*int8)(unsafe.Pointer(z))) <= int32('2') {
return int32(*(*int8)(unsafe.Pointer(z))) - int32('0')
} else {
- if _sqlite3StrICmp(tls, z, __ccgo_ts+16879) == 0 {
+ if _sqlite3StrICmp(tls, z, __ccgo_ts+16951) == 0 {
return int32(1)
} else {
- if _sqlite3StrICmp(tls, z, __ccgo_ts+17920) == 0 {
+ if _sqlite3StrICmp(tls, z, __ccgo_ts+17992) == 0 {
return int32(2)
} else {
return 0
@@ -114281,7 +114598,7 @@ func _invalidateTempStorage(tls *libc.TLS, pParse uintptr) (r int32) {
db = (*TParse)(unsafe.Pointer(pParse)).Fdb
if (*(*TDb)(unsafe.Pointer((*Tsqlite3)(unsafe.Pointer(db)).FaDb + 1*16))).FpBt != uintptr(0) {
if !((*Tsqlite3)(unsafe.Pointer(db)).FautoCommit != 0) || _sqlite3BtreeTxnState(tls, (*(*TDb)(unsafe.Pointer((*Tsqlite3)(unsafe.Pointer(db)).FaDb + 1*16))).FpBt) != SQLITE_TXN_NONE {
- _sqlite3ErrorMsg(tls, pParse, __ccgo_ts+17927, 0)
+ _sqlite3ErrorMsg(tls, pParse, __ccgo_ts+17999, 0)
return int32(SQLITE_ERROR)
}
_sqlite3BtreeClose(tls, (*(*TDb)(unsafe.Pointer((*Tsqlite3)(unsafe.Pointer(db)).FaDb + 1*16))).FpBt)
@@ -114411,15 +114728,15 @@ func _actionName(tls *libc.TLS, action Tu8) (r uintptr) {
_ = zName
switch libc.Int32FromUint8(action) {
case int32(OE_SetNull):
- zName = __ccgo_ts + 17989
+ zName = __ccgo_ts + 18061
case int32(OE_SetDflt):
- zName = __ccgo_ts + 17998
+ zName = __ccgo_ts + 18070
case int32(OE_Cascade):
- zName = __ccgo_ts + 18010
+ zName = __ccgo_ts + 18082
case int32(OE_Restrict):
- zName = __ccgo_ts + 18018
+ zName = __ccgo_ts + 18090
default:
- zName = __ccgo_ts + 18027
+ zName = __ccgo_ts + 18099
break
}
return zName
@@ -114440,12 +114757,12 @@ func _sqlite3JournalModename(tls *libc.TLS, eMode int32) (r uintptr) {
}
var _azModeName = [6]uintptr{
- 0: __ccgo_ts + 18037,
- 1: __ccgo_ts + 18044,
- 2: __ccgo_ts + 18052,
- 3: __ccgo_ts + 18056,
- 4: __ccgo_ts + 17920,
- 5: __ccgo_ts + 18065,
+ 0: __ccgo_ts + 18109,
+ 1: __ccgo_ts + 18116,
+ 2: __ccgo_ts + 18124,
+ 3: __ccgo_ts + 18128,
+ 4: __ccgo_ts + 17992,
+ 5: __ccgo_ts + 18137,
}
// C documentation
@@ -114507,15 +114824,15 @@ func _pragmaFunclistLine(tls *libc.TLS, v uintptr, p uintptr, isBuiltin int32, s
goto _1
}
if (*TFuncDef)(unsafe.Pointer(p)).FxValue != uintptr(0) {
- zType = __ccgo_ts + 18090
+ zType = __ccgo_ts + 18162
} else {
if (*TFuncDef)(unsafe.Pointer(p)).FxFinalize != uintptr(0) {
- zType = __ccgo_ts + 18092
+ zType = __ccgo_ts + 18164
} else {
- zType = __ccgo_ts + 7808
+ zType = __ccgo_ts + 7833
}
}
- _sqlite3VdbeMultiLoad(tls, v, int32(1), __ccgo_ts+18094, libc.VaList(bp+8, (*TFuncDef)(unsafe.Pointer(p)).FzName, isBuiltin, zType, _azEnc[(*TFuncDef)(unsafe.Pointer(p)).FfuncFlags&uint32(SQLITE_FUNC_ENCMASK)], int32((*TFuncDef)(unsafe.Pointer(p)).FnArg), (*TFuncDef)(unsafe.Pointer(p)).FfuncFlags&mask^uint32(SQLITE_INNOCUOUS)))
+ _sqlite3VdbeMultiLoad(tls, v, int32(1), __ccgo_ts+18166, libc.VaList(bp+8, (*TFuncDef)(unsafe.Pointer(p)).FzName, isBuiltin, zType, _azEnc[(*TFuncDef)(unsafe.Pointer(p)).FfuncFlags&uint32(SQLITE_FUNC_ENCMASK)], int32((*TFuncDef)(unsafe.Pointer(p)).FnArg), (*TFuncDef)(unsafe.Pointer(p)).FfuncFlags&mask^uint32(SQLITE_INNOCUOUS)))
goto _1
_1:
;
@@ -114524,9 +114841,9 @@ func _pragmaFunclistLine(tls *libc.TLS, v uintptr, p uintptr, isBuiltin int32, s
}
var _azEnc = [4]uintptr{
- 1: __ccgo_ts + 18069,
- 2: __ccgo_ts + 18074,
- 3: __ccgo_ts + 18082,
+ 1: __ccgo_ts + 18141,
+ 2: __ccgo_ts + 18146,
+ 3: __ccgo_ts + 18154,
}
// C documentation
@@ -114625,7 +114942,7 @@ func _sqlite3Pragma(tls *libc.TLS, pParse uintptr, pId1 uintptr, pId2 uintptr, p
return
}
if minusFlag != 0 {
- zRight = _sqlite3MPrintf(tls, db, __ccgo_ts+18101, libc.VaList(bp+136, pValue))
+ zRight = _sqlite3MPrintf(tls, db, __ccgo_ts+18173, libc.VaList(bp+136, pValue))
} else {
zRight = _sqlite3NameFromToken(tls, db, pValue)
}
@@ -114668,7 +114985,7 @@ func _sqlite3Pragma(tls *libc.TLS, pParse uintptr, pId1 uintptr, pId2 uintptr, p
}
if rc != int32(SQLITE_NOTFOUND) {
if (*(*[4]uintptr)(unsafe.Pointer(bp + 4)))[0] != 0 {
- _sqlite3ErrorMsg(tls, pParse, __ccgo_ts+3864, libc.VaList(bp+136, (*(*[4]uintptr)(unsafe.Pointer(bp + 4)))[0]))
+ _sqlite3ErrorMsg(tls, pParse, __ccgo_ts+3890, libc.VaList(bp+136, (*(*[4]uintptr)(unsafe.Pointer(bp + 4)))[0]))
Xsqlite3_free(tls, (*(*[4]uintptr)(unsafe.Pointer(bp + 4)))[0])
}
(*TParse)(unsafe.Pointer(pParse)).FnErr++
@@ -114713,7 +115030,7 @@ func _sqlite3Pragma(tls *libc.TLS, pParse uintptr, pId1 uintptr, pId2 uintptr, p
case int32(PragTyp_DEFAULT_CACHE_SIZE):
_sqlite3VdbeUsesBtree(tls, v, iDb)
if !(zRight != 0) {
- *(*int32)(unsafe.Pointer(pParse + 48)) += int32(2)
+ *(*int32)(unsafe.Pointer(pParse + 52)) += int32(2)
aOp = _sqlite3VdbeAddOpList(tls, v, libc.Int32FromUint32(libc.Uint32FromInt64(36)/libc.Uint32FromInt64(4)), uintptr(unsafe.Pointer(&_getCacheSize)), _iLn3)
if 0 != 0 {
break
@@ -114772,7 +115089,7 @@ func _sqlite3Pragma(tls *libc.TLS, pParse uintptr, pId1 uintptr, pId2 uintptr, p
pBt1 = (*TDb)(unsafe.Pointer(pDb)).FpBt
b = -int32(1)
if zRight != 0 {
- if Xsqlite3_stricmp(tls, zRight, __ccgo_ts+18105) == 0 {
+ if Xsqlite3_stricmp(tls, zRight, __ccgo_ts+18177) == 0 {
b = int32(2)
} else {
b = libc.Int32FromUint8(_sqlite3GetBoolean(tls, zRight, uint8(0)))
@@ -114815,7 +115132,7 @@ func _sqlite3Pragma(tls *libc.TLS, pParse uintptr, pId1 uintptr, pId2 uintptr, p
case int32(PragTyp_PAGE_COUNT):
*(*Ti64)(unsafe.Pointer(bp + 24)) = 0
_sqlite3CodeVerifySchema(tls, pParse, iDb)
- v5 = pParse + 48
+ v5 = pParse + 52
*(*int32)(unsafe.Pointer(v5))++
v4 = *(*int32)(unsafe.Pointer(v5))
iReg = v4
@@ -114843,7 +115160,7 @@ func _sqlite3Pragma(tls *libc.TLS, pParse uintptr, pId1 uintptr, pId2 uintptr, p
*/
fallthrough
case int32(PragTyp_LOCKING_MODE):
- zRet = __ccgo_ts + 17896
+ zRet = __ccgo_ts + 17968
eMode = _getLockingMode(tls, zRight)
if (*TToken)(unsafe.Pointer(pId2)).Fn == uint32(0) && eMode == -int32(1) {
/* Simple "PRAGMA locking_mode;" statement. This is a query for
@@ -114871,7 +115188,7 @@ func _sqlite3Pragma(tls *libc.TLS, pParse uintptr, pId1 uintptr, pId2 uintptr, p
eMode = _sqlite3PagerLockingMode(tls, pPager, eMode)
}
if eMode == int32(PAGER_LOCKINGMODE_EXCLUSIVE) {
- zRet = __ccgo_ts + 17886
+ zRet = __ccgo_ts + 17958
}
_returnSingleText(tls, v, zRet)
break
@@ -115161,7 +115478,7 @@ func _sqlite3Pragma(tls *libc.TLS, pParse uintptr, pId1 uintptr, pId2 uintptr, p
if *(*int8)(unsafe.Pointer(zRight)) != 0 {
rc = _sqlite3OsAccess(tls, (*Tsqlite3)(unsafe.Pointer(db)).FpVfs, zRight, int32(SQLITE_ACCESS_READWRITE), bp+56)
if rc != SQLITE_OK || *(*int32)(unsafe.Pointer(bp + 56)) == 0 {
- _sqlite3ErrorMsg(tls, pParse, __ccgo_ts+18110, 0)
+ _sqlite3ErrorMsg(tls, pParse, __ccgo_ts+18182, 0)
Xsqlite3_mutex_leave(tls, _sqlite3MutexAlloc(tls, int32(SQLITE_MUTEX_STATIC_VFS1)))
goto pragma_out
}
@@ -115171,7 +115488,7 @@ func _sqlite3Pragma(tls *libc.TLS, pParse uintptr, pId1 uintptr, pId2 uintptr, p
}
Xsqlite3_free(tls, Xsqlite3_temp_directory)
if *(*int8)(unsafe.Pointer(zRight)) != 0 {
- Xsqlite3_temp_directory = Xsqlite3_mprintf(tls, __ccgo_ts+3864, libc.VaList(bp+136, zRight))
+ Xsqlite3_temp_directory = Xsqlite3_mprintf(tls, __ccgo_ts+3890, libc.VaList(bp+136, zRight))
} else {
Xsqlite3_temp_directory = uintptr(0)
}
@@ -115193,7 +115510,7 @@ func _sqlite3Pragma(tls *libc.TLS, pParse uintptr, pId1 uintptr, pId2 uintptr, p
_returnSingleInt(tls, v, int64(libc.Int32FromUint8((*TDb)(unsafe.Pointer(pDb)).Fsafety_level)-int32(1)))
} else {
if !((*Tsqlite3)(unsafe.Pointer(db)).FautoCommit != 0) {
- _sqlite3ErrorMsg(tls, pParse, __ccgo_ts+18135, 0)
+ _sqlite3ErrorMsg(tls, pParse, __ccgo_ts+18207, 0)
} else {
if iDb != int32(1) {
iLevel = (libc.Int32FromUint8(_getSafetyLevel(tls, zRight, 0, uint8(1))) + int32(1)) & int32(PAGER_SYNCHRONOUS_MASK)
@@ -115225,8 +115542,9 @@ func _sqlite3Pragma(tls *libc.TLS, pParse uintptr, pId1 uintptr, pId2 uintptr, p
*(*Tu64)(unsafe.Pointer(db + 28)) &= ^mask
if mask == uint64(SQLITE_DeferFKs) {
(*Tsqlite3)(unsafe.Pointer(db)).FnDeferredImmCons = 0
+ (*Tsqlite3)(unsafe.Pointer(db)).FnDeferredCons = 0
}
- if mask&uint64(SQLITE_WriteSchema) != uint64(0) && Xsqlite3_stricmp(tls, zRight, __ccgo_ts+18188) == 0 {
+ if mask&uint64(SQLITE_WriteSchema) != uint64(0) && Xsqlite3_stricmp(tls, zRight, __ccgo_ts+18260) == 0 {
/* IMP: R-60817-01178 If the argument is "RESET" then schema
** writing is disabled (as with "PRAGMA writable_schema=OFF") and,
** in addition, the schema is reloaded. */
@@ -115306,9 +115624,9 @@ func _sqlite3Pragma(tls *libc.TLS, pParse uintptr, pId1 uintptr, pId2 uintptr, p
}
pColExpr = _sqlite3ColumnExpr(tls, pTab, pCol)
if (*TPragmaName)(unsafe.Pointer(pPragma)).FiArg != 0 {
- v14 = __ccgo_ts + 18194
+ v14 = __ccgo_ts + 18266
} else {
- v14 = __ccgo_ts + 18202
+ v14 = __ccgo_ts + 18274
}
if int32(uint32(*(*uint8)(unsafe.Pointer(pCol + 4))&0xf>>0)) != 0 {
v15 = int32(1)
@@ -115379,7 +115697,7 @@ func _sqlite3Pragma(tls *libc.TLS, pParse uintptr, pId1 uintptr, pId2 uintptr, p
}
pTab1 = (*THashElem)(unsafe.Pointer(k1)).Fdata
if int32((*TTable)(unsafe.Pointer(pTab1)).FnCol) == 0 {
- zSql = _sqlite3MPrintf(tls, db, __ccgo_ts+18209, libc.VaList(bp+136, (*TTable)(unsafe.Pointer(pTab1)).FzName))
+ zSql = _sqlite3MPrintf(tls, db, __ccgo_ts+18281, libc.VaList(bp+136, (*TTable)(unsafe.Pointer(pTab1)).FzName))
if zSql != 0 {
*(*uintptr)(unsafe.Pointer(bp + 60)) = uintptr(0)
Xsqlite3_prepare_v3(tls, db, zSql, -int32(1), uint32(SQLITE_PREPARE_DONT_LOG), bp+60, uintptr(0))
@@ -115409,19 +115727,19 @@ func _sqlite3Pragma(tls *libc.TLS, pParse uintptr, pId1 uintptr, pId2 uintptr, p
goto _20
}
if libc.Int32FromUint8((*TTable)(unsafe.Pointer(pTab2)).FeTabType) == int32(TABTYP_VIEW) {
- zType = __ccgo_ts + 10987
+ zType = __ccgo_ts + 11012
} else {
if libc.Int32FromUint8((*TTable)(unsafe.Pointer(pTab2)).FeTabType) == int32(TABTYP_VTAB) {
- zType = __ccgo_ts + 13235
+ zType = __ccgo_ts + 13260
} else {
if (*TTable)(unsafe.Pointer(pTab2)).FtabFlags&uint32(TF_Shadow) != 0 {
- zType = __ccgo_ts + 18225
+ zType = __ccgo_ts + 18297
} else {
- zType = __ccgo_ts + 9249
+ zType = __ccgo_ts + 9274
}
}
}
- _sqlite3VdbeMultiLoad(tls, v, int32(1), __ccgo_ts+18232, libc.VaList(bp+136, (*(*TDb)(unsafe.Pointer((*Tsqlite3)(unsafe.Pointer(db)).FaDb + uintptr(ii4)*16))).FzDbSName, _sqlite3PreferredTableName(tls, (*TTable)(unsafe.Pointer(pTab2)).FzName), zType, int32((*TTable)(unsafe.Pointer(pTab2)).FnCol), libc.BoolInt32((*TTable)(unsafe.Pointer(pTab2)).FtabFlags&uint32(TF_WithoutRowid) != uint32(0)), libc.BoolInt32((*TTable)(unsafe.Pointer(pTab2)).FtabFlags&uint32(TF_Strict) != uint32(0))))
+ _sqlite3VdbeMultiLoad(tls, v, int32(1), __ccgo_ts+18304, libc.VaList(bp+136, (*(*TDb)(unsafe.Pointer((*Tsqlite3)(unsafe.Pointer(db)).FaDb + uintptr(ii4)*16))).FzDbSName, _sqlite3PreferredTableName(tls, (*TTable)(unsafe.Pointer(pTab2)).FzName), zType, int32((*TTable)(unsafe.Pointer(pTab2)).FnCol), libc.BoolInt32((*TTable)(unsafe.Pointer(pTab2)).FtabFlags&uint32(TF_WithoutRowid) != uint32(0)), libc.BoolInt32((*TTable)(unsafe.Pointer(pTab2)).FtabFlags&uint32(TF_Strict) != uint32(0))))
goto _20
_20:
;
@@ -115468,9 +115786,9 @@ func _sqlite3Pragma(tls *libc.TLS, pParse uintptr, pId1 uintptr, pId2 uintptr, p
} else {
v22 = (*(*TColumn)(unsafe.Pointer((*TTable)(unsafe.Pointer(pTab3)).FaCol + uintptr(cnum)*12))).FzCnName
}
- _sqlite3VdbeMultiLoad(tls, v, int32(1), __ccgo_ts+18239, libc.VaList(bp+136, i1, int32(cnum), v22))
+ _sqlite3VdbeMultiLoad(tls, v, int32(1), __ccgo_ts+18311, libc.VaList(bp+136, i1, int32(cnum), v22))
if (*TPragmaName)(unsafe.Pointer(pPragma)).FiArg != 0 {
- _sqlite3VdbeMultiLoad(tls, v, int32(4), __ccgo_ts+18244, libc.VaList(bp+136, libc.Int32FromUint8(*(*Tu8)(unsafe.Pointer((*TIndex)(unsafe.Pointer(pIdx)).FaSortOrder + uintptr(i1)))), *(*uintptr)(unsafe.Pointer((*TIndex)(unsafe.Pointer(pIdx)).FazColl + uintptr(i1)*4)), libc.BoolInt32(i1 < libc.Int32FromUint16((*TIndex)(unsafe.Pointer(pIdx)).FnKeyCol))))
+ _sqlite3VdbeMultiLoad(tls, v, int32(4), __ccgo_ts+18316, libc.VaList(bp+136, libc.Int32FromUint8(*(*Tu8)(unsafe.Pointer((*TIndex)(unsafe.Pointer(pIdx)).FaSortOrder + uintptr(i1)))), *(*uintptr)(unsafe.Pointer((*TIndex)(unsafe.Pointer(pIdx)).FazColl + uintptr(i1)*4)), libc.BoolInt32(i1 < libc.Int32FromUint16((*TIndex)(unsafe.Pointer(pIdx)).FnKeyCol))))
}
_sqlite3VdbeAddOp2(tls, v, int32(OP_ResultRow), int32(1), (*TParse)(unsafe.Pointer(pParse)).FnMem)
goto _21
@@ -115494,11 +115812,11 @@ func _sqlite3Pragma(tls *libc.TLS, pParse uintptr, pId1 uintptr, pId2 uintptr, p
break
}
azOrigin = [3]uintptr{
- 0: __ccgo_ts + 18249,
- 1: __ccgo_ts + 18251,
- 2: __ccgo_ts + 16738,
+ 0: __ccgo_ts + 18321,
+ 1: __ccgo_ts + 18323,
+ 2: __ccgo_ts + 16810,
}
- _sqlite3VdbeMultiLoad(tls, v, int32(1), __ccgo_ts+18253, libc.VaList(bp+136, i2, (*TIndex)(unsafe.Pointer(pIdx1)).FzName, libc.BoolInt32(libc.Int32FromUint8((*TIndex)(unsafe.Pointer(pIdx1)).FonError) != OE_None), azOrigin[int32(uint32(*(*uint16)(unsafe.Pointer(pIdx1 + 56))&0x3>>0))], libc.BoolInt32((*TIndex)(unsafe.Pointer(pIdx1)).FpPartIdxWhere != uintptr(0))))
+ _sqlite3VdbeMultiLoad(tls, v, int32(1), __ccgo_ts+18325, libc.VaList(bp+136, i2, (*TIndex)(unsafe.Pointer(pIdx1)).FzName, libc.BoolInt32(libc.Int32FromUint8((*TIndex)(unsafe.Pointer(pIdx1)).FonError) != OE_None), azOrigin[int32(uint32(*(*uint16)(unsafe.Pointer(pIdx1 + 56))&0x3>>0))], libc.BoolInt32((*TIndex)(unsafe.Pointer(pIdx1)).FpPartIdxWhere != uintptr(0))))
goto _23
_23:
;
@@ -115517,7 +115835,7 @@ func _sqlite3Pragma(tls *libc.TLS, pParse uintptr, pId1 uintptr, pId2 uintptr, p
if (*(*TDb)(unsafe.Pointer((*Tsqlite3)(unsafe.Pointer(db)).FaDb + uintptr(i3)*16))).FpBt == uintptr(0) {
goto _24
}
- _sqlite3VdbeMultiLoad(tls, v, int32(1), __ccgo_ts+18259, libc.VaList(bp+136, i3, (*(*TDb)(unsafe.Pointer((*Tsqlite3)(unsafe.Pointer(db)).FaDb + uintptr(i3)*16))).FzDbSName, _sqlite3BtreeGetFilename(tls, (*(*TDb)(unsafe.Pointer((*Tsqlite3)(unsafe.Pointer(db)).FaDb + uintptr(i3)*16))).FpBt)))
+ _sqlite3VdbeMultiLoad(tls, v, int32(1), __ccgo_ts+18331, libc.VaList(bp+136, i3, (*(*TDb)(unsafe.Pointer((*Tsqlite3)(unsafe.Pointer(db)).FaDb + uintptr(i3)*16))).FzDbSName, _sqlite3BtreeGetFilename(tls, (*(*TDb)(unsafe.Pointer((*Tsqlite3)(unsafe.Pointer(db)).FaDb + uintptr(i3)*16))).FpBt)))
goto _24
_24:
;
@@ -115534,7 +115852,7 @@ func _sqlite3Pragma(tls *libc.TLS, pParse uintptr, pId1 uintptr, pId2 uintptr, p
pColl = (*THashElem)(unsafe.Pointer(p)).Fdata
v26 = i4
i4++
- _sqlite3VdbeMultiLoad(tls, v, int32(1), __ccgo_ts+18263, libc.VaList(bp+136, v26, (*TCollSeq)(unsafe.Pointer(pColl)).FzName))
+ _sqlite3VdbeMultiLoad(tls, v, int32(1), __ccgo_ts+18335, libc.VaList(bp+136, v26, (*TCollSeq)(unsafe.Pointer(pColl)).FzName))
goto _25
_25:
;
@@ -115584,7 +115902,7 @@ func _sqlite3Pragma(tls *libc.TLS, pParse uintptr, pId1 uintptr, pId2 uintptr, p
break
}
pMod = (*THashElem)(unsafe.Pointer(j1)).Fdata
- _sqlite3VdbeMultiLoad(tls, v, int32(1), __ccgo_ts+7808, libc.VaList(bp+136, (*TModule)(unsafe.Pointer(pMod)).FzName))
+ _sqlite3VdbeMultiLoad(tls, v, int32(1), __ccgo_ts+7833, libc.VaList(bp+136, (*TModule)(unsafe.Pointer(pMod)).FzName))
goto _30
_30:
;
@@ -115596,7 +115914,7 @@ func _sqlite3Pragma(tls *libc.TLS, pParse uintptr, pId1 uintptr, pId2 uintptr, p
if !(i6 < libc.Int32FromUint32(libc.Uint32FromInt64(1056)/libc.Uint32FromInt64(16))) {
break
}
- _sqlite3VdbeMultiLoad(tls, v, int32(1), __ccgo_ts+7808, libc.VaList(bp+136, _aPragmaName[i6].FzName))
+ _sqlite3VdbeMultiLoad(tls, v, int32(1), __ccgo_ts+7833, libc.VaList(bp+136, _aPragmaName[i6].FzName))
goto _31
_31:
;
@@ -115622,7 +115940,7 @@ func _sqlite3Pragma(tls *libc.TLS, pParse uintptr, pId1 uintptr, pId2 uintptr, p
if !(j2 < (*TFKey)(unsafe.Pointer(pFK)).FnCol) {
break
}
- _sqlite3VdbeMultiLoad(tls, v, int32(1), __ccgo_ts+18266, libc.VaList(bp+136, i7, j2, (*TFKey)(unsafe.Pointer(pFK)).FzTo, (*(*TColumn)(unsafe.Pointer((*TTable)(unsafe.Pointer(pTab5)).FaCol + uintptr((*(*TsColMap)(unsafe.Pointer(pFK + 36 + uintptr(j2)*8))).FiFrom)*12))).FzCnName, (*(*TsColMap)(unsafe.Pointer(pFK + 36 + uintptr(j2)*8))).FzCol, _actionName(tls, *(*Tu8)(unsafe.Pointer(pFK + 25 + 1))), _actionName(tls, *(*Tu8)(unsafe.Pointer(pFK + 25))), __ccgo_ts+18275))
+ _sqlite3VdbeMultiLoad(tls, v, int32(1), __ccgo_ts+18338, libc.VaList(bp+136, i7, j2, (*TFKey)(unsafe.Pointer(pFK)).FzTo, (*(*TColumn)(unsafe.Pointer((*TTable)(unsafe.Pointer(pTab5)).FaCol + uintptr((*(*TsColMap)(unsafe.Pointer(pFK + 36 + uintptr(j2)*8))).FiFrom)*12))).FzCnName, (*(*TsColMap)(unsafe.Pointer(pFK + 36 + uintptr(j2)*8))).FzCol, _actionName(tls, *(*Tu8)(unsafe.Pointer(pFK + 25 + 1))), _actionName(tls, *(*Tu8)(unsafe.Pointer(pFK + 25))), __ccgo_ts+18347))
goto _32
_32:
;
@@ -115636,8 +115954,8 @@ func _sqlite3Pragma(tls *libc.TLS, pParse uintptr, pId1 uintptr, pId2 uintptr, p
}
case int32(PragTyp_FOREIGN_KEY_CHECK): /* child to parent column mapping */
regResult = (*TParse)(unsafe.Pointer(pParse)).FnMem + int32(1)
- *(*int32)(unsafe.Pointer(pParse + 48)) += int32(4)
- v34 = pParse + 48
+ *(*int32)(unsafe.Pointer(pParse + 52)) += int32(4)
+ v34 = pParse + 52
*(*int32)(unsafe.Pointer(v34))++
v33 = *(*int32)(unsafe.Pointer(v34))
regRow = v33
@@ -115763,7 +116081,7 @@ func _sqlite3Pragma(tls *libc.TLS, pParse uintptr, pId1 uintptr, pId2 uintptr, p
} else {
_sqlite3VdbeAddOp2(tls, v, int32(OP_Null), 0, regResult+int32(1))
}
- _sqlite3VdbeMultiLoad(tls, v, regResult+int32(2), __ccgo_ts+18280, libc.VaList(bp+136, (*TFKey)(unsafe.Pointer(pFK1)).FzTo, i8-int32(1)))
+ _sqlite3VdbeMultiLoad(tls, v, regResult+int32(2), __ccgo_ts+18352, libc.VaList(bp+136, (*TFKey)(unsafe.Pointer(pFK1)).FzTo, i8-int32(1)))
_sqlite3VdbeAddOp2(tls, v, int32(OP_ResultRow), regResult, int32(4))
_sqlite3VdbeResolveLabel(tls, v, addrOk)
_sqlite3DbFree(tls, db, *(*uintptr)(unsafe.Pointer(bp + 68)))
@@ -115859,7 +116177,7 @@ func _sqlite3Pragma(tls *libc.TLS, pParse uintptr, pId1 uintptr, pId2 uintptr, p
goto _40
}
_sqlite3CodeVerifySchema(tls, pParse, i9)
- (*TParse)(unsafe.Pointer(pParse)).FokConstFactor = uint8(0) /* tag-20230327-1 */
+ libc.SetBitFieldPtr8Uint32(pParse+32, libc.Uint32FromInt32(0), 2, 0x4) /* tag-20230327-1 */
/* Do an integrity check of the B-Tree
**
** Begin by finding the root pages numbers
@@ -115954,7 +116272,7 @@ func _sqlite3Pragma(tls *libc.TLS, pParse uintptr, pId1 uintptr, pId2 uintptr, p
_sqlite3VdbeAddOp4(tls, v, int32(OP_IntegrityCk), int32(1), cnt, int32(8), aRoot, -int32(14))
_sqlite3VdbeChangeP5(tls, v, libc.Uint16FromInt32(i9))
addr1 = _sqlite3VdbeAddOp1(tls, v, int32(OP_IsNull), int32(2))
- _sqlite3VdbeAddOp4(tls, v, int32(OP_String8), 0, int32(3), 0, _sqlite3MPrintf(tls, db, __ccgo_ts+18284, libc.VaList(bp+136, (*(*TDb)(unsafe.Pointer((*Tsqlite3)(unsafe.Pointer(db)).FaDb + uintptr(i9)*16))).FzDbSName)), -int32(6))
+ _sqlite3VdbeAddOp4(tls, v, int32(OP_String8), 0, int32(3), 0, _sqlite3MPrintf(tls, db, __ccgo_ts+18356, libc.VaList(bp+136, (*(*TDb)(unsafe.Pointer((*Tsqlite3)(unsafe.Pointer(db)).FaDb + uintptr(i9)*16))).FzDbSName)), -int32(6))
_sqlite3VdbeAddOp3(tls, v, int32(OP_Concat), int32(2), int32(3), int32(3))
_integrityCheckResultRow(tls, v)
_sqlite3VdbeJumpHere(tls, v, addr1)
@@ -115965,7 +116283,7 @@ func _sqlite3Pragma(tls *libc.TLS, pParse uintptr, pId1 uintptr, pId2 uintptr, p
v48 = 0
}
cnt = v48
- _sqlite3VdbeLoadString(tls, v, int32(2), __ccgo_ts+18308)
+ _sqlite3VdbeLoadString(tls, v, int32(2), __ccgo_ts+18380)
x2 = (*THash)(unsafe.Pointer(pTbls)).Ffirst
for {
if !(x2 != 0) {
@@ -116101,7 +116419,7 @@ func _sqlite3Pragma(tls *libc.TLS, pParse uintptr, pId1 uintptr, pId2 uintptr, p
if pPk1 != 0 {
a1 = _sqlite3VdbeAddOp4Int(tls, v, int32(OP_IdxGT), *(*int32)(unsafe.Pointer(bp + 76)), 0, r2, libc.Int32FromUint16((*TIndex)(unsafe.Pointer(pPk1)).FnKeyCol))
_sqlite3VdbeAddOp1(tls, v, int32(OP_IsNull), r2)
- zErr = _sqlite3MPrintf(tls, db, __ccgo_ts+18337, libc.VaList(bp+136, (*TTable)(unsafe.Pointer(pTab10)).FzName))
+ zErr = _sqlite3MPrintf(tls, db, __ccgo_ts+18409, libc.VaList(bp+136, (*TTable)(unsafe.Pointer(pTab10)).FzName))
_sqlite3VdbeAddOp4(tls, v, int32(OP_String8), 0, int32(3), 0, zErr, -int32(6))
_integrityCheckResultRow(tls, v)
_sqlite3VdbeJumpHere(tls, v, a1)
@@ -116163,7 +116481,7 @@ func _sqlite3Pragma(tls *libc.TLS, pParse uintptr, pId1 uintptr, pId2 uintptr, p
}
p11 = *(*int32)(unsafe.Pointer(bp + 76))
if !((*TTable)(unsafe.Pointer(pTab10)).FtabFlags&libc.Uint32FromInt32(TF_WithoutRowid) == libc.Uint32FromInt32(0)) {
- p3 = int32(_sqlite3TableColumnToIndex(tls, _sqlite3PrimaryKeyIndex(tls, pTab10), int16(j4)))
+ p3 = _sqlite3TableColumnToIndex(tls, _sqlite3PrimaryKeyIndex(tls, pTab10), j4)
} else {
p3 = int32(_sqlite3TableColumnToStorage(tls, pTab10, int16(j4)))
}
@@ -116185,7 +116503,7 @@ func _sqlite3Pragma(tls *libc.TLS, pParse uintptr, pId1 uintptr, pId2 uintptr, p
_sqlite3ColumnDefault(tls, v, pTab10, j4, int32(3))
jmp3 = _sqlite3VdbeAddOp2(tls, v, int32(OP_NotNull), int32(3), labelOk)
}
- zErr1 = _sqlite3MPrintf(tls, db, __ccgo_ts+18373, libc.VaList(bp+136, (*TTable)(unsafe.Pointer(pTab10)).FzName, (*TColumn)(unsafe.Pointer(pCol1)).FzCnName))
+ zErr1 = _sqlite3MPrintf(tls, db, __ccgo_ts+18445, libc.VaList(bp+136, (*TTable)(unsafe.Pointer(pTab10)).FzName, (*TColumn)(unsafe.Pointer(pCol1)).FzCnName))
_sqlite3VdbeAddOp4(tls, v, int32(OP_String8), 0, int32(3), 0, zErr1, -int32(6))
if doTypeCheck != 0 {
_sqlite3VdbeGoto(tls, v, labelError)
@@ -116198,7 +116516,7 @@ func _sqlite3Pragma(tls *libc.TLS, pParse uintptr, pId1 uintptr, pId2 uintptr, p
if bStrict != 0 && doTypeCheck != 0 {
_sqlite3VdbeAddOp4Int(tls, v, int32(OP_IsType), p11, labelOk, p3, p4)
_sqlite3VdbeChangeP5(tls, v, uint16(_aStdTypeMask[int32(uint32(*(*uint8)(unsafe.Pointer(pCol1 + 4))&0xf0>>4))-int32(1)]))
- zErr1 = _sqlite3MPrintf(tls, db, __ccgo_ts+18393, libc.VaList(bp+136, _sqlite3StdType[int32(uint32(*(*uint8)(unsafe.Pointer(pCol1 + 4))&0xf0>>4))-int32(1)], (*TTable)(unsafe.Pointer(pTab10)).FzName, (*(*TColumn)(unsafe.Pointer((*TTable)(unsafe.Pointer(pTab10)).FaCol + uintptr(j4)*12))).FzCnName))
+ zErr1 = _sqlite3MPrintf(tls, db, __ccgo_ts+18465, libc.VaList(bp+136, _sqlite3StdType[int32(uint32(*(*uint8)(unsafe.Pointer(pCol1 + 4))&0xf0>>4))-int32(1)], (*TTable)(unsafe.Pointer(pTab10)).FzName, (*(*TColumn)(unsafe.Pointer((*TTable)(unsafe.Pointer(pTab10)).FaCol + uintptr(j4)*12))).FzCnName))
_sqlite3VdbeAddOp4(tls, v, int32(OP_String8), 0, int32(3), 0, zErr1, -int32(6))
} else {
if !(bStrict != 0) && int32((*TColumn)(unsafe.Pointer(pCol1)).Faffinity) == int32(SQLITE_AFF_TEXT) {
@@ -116206,7 +116524,7 @@ func _sqlite3Pragma(tls *libc.TLS, pParse uintptr, pId1 uintptr, pId2 uintptr, p
** NULL, TEXT, or BLOB. */
_sqlite3VdbeAddOp4Int(tls, v, int32(OP_IsType), p11, labelOk, p3, p4)
_sqlite3VdbeChangeP5(tls, v, uint16(0x1c)) /* NULL, TEXT, or BLOB */
- zErr1 = _sqlite3MPrintf(tls, db, __ccgo_ts+18415, libc.VaList(bp+136, (*TTable)(unsafe.Pointer(pTab10)).FzName, (*(*TColumn)(unsafe.Pointer((*TTable)(unsafe.Pointer(pTab10)).FaCol + uintptr(j4)*12))).FzCnName))
+ zErr1 = _sqlite3MPrintf(tls, db, __ccgo_ts+18487, libc.VaList(bp+136, (*TTable)(unsafe.Pointer(pTab10)).FzName, (*(*TColumn)(unsafe.Pointer((*TTable)(unsafe.Pointer(pTab10)).FaCol + uintptr(j4)*12))).FzCnName))
_sqlite3VdbeAddOp4(tls, v, int32(OP_String8), 0, int32(3), 0, zErr1, -int32(6))
} else {
if !(bStrict != 0) && int32((*TColumn)(unsafe.Pointer(pCol1)).Faffinity) >= int32(SQLITE_AFF_NUMERIC) {
@@ -116217,10 +116535,10 @@ func _sqlite3Pragma(tls *libc.TLS, pParse uintptr, pId1 uintptr, pId2 uintptr, p
if p11 >= 0 {
_sqlite3ExprCodeGetColumnOfTable(tls, v, pTab10, *(*int32)(unsafe.Pointer(bp + 76)), j4, int32(3))
}
- _sqlite3VdbeAddOp4(tls, v, int32(OP_Affinity), int32(3), int32(1), 0, __ccgo_ts+18438, -int32(1))
+ _sqlite3VdbeAddOp4(tls, v, int32(OP_Affinity), int32(3), int32(1), 0, __ccgo_ts+18510, -int32(1))
_sqlite3VdbeAddOp4Int(tls, v, int32(OP_IsType), -int32(1), labelOk, int32(3), p4)
_sqlite3VdbeChangeP5(tls, v, uint16(0x1c)) /* NULL, TEXT, or BLOB */
- zErr1 = _sqlite3MPrintf(tls, db, __ccgo_ts+18440, libc.VaList(bp+136, (*TTable)(unsafe.Pointer(pTab10)).FzName, (*(*TColumn)(unsafe.Pointer((*TTable)(unsafe.Pointer(pTab10)).FaCol + uintptr(j4)*12))).FzCnName))
+ zErr1 = _sqlite3MPrintf(tls, db, __ccgo_ts+18512, libc.VaList(bp+136, (*TTable)(unsafe.Pointer(pTab10)).FzName, (*(*TColumn)(unsafe.Pointer((*TTable)(unsafe.Pointer(pTab10)).FaCol + uintptr(j4)*12))).FzCnName))
_sqlite3VdbeAddOp4(tls, v, int32(OP_String8), 0, int32(3), 0, zErr1, -int32(6))
}
}
@@ -116254,7 +116572,7 @@ func _sqlite3Pragma(tls *libc.TLS, pParse uintptr, pId1 uintptr, pId2 uintptr, p
_sqlite3ExprIfTrue(tls, pParse, (*(*TExprList_item)(unsafe.Pointer(pCheck + 8))).FpExpr, addrCkOk, int32(SQLITE_JUMPIFNULL))
_sqlite3VdbeResolveLabel(tls, v, addrCkFault)
(*TParse)(unsafe.Pointer(pParse)).FiSelfTab = 0
- zErr2 = _sqlite3MPrintf(tls, db, __ccgo_ts+18460, libc.VaList(bp+136, (*TTable)(unsafe.Pointer(pTab10)).FzName))
+ zErr2 = _sqlite3MPrintf(tls, db, __ccgo_ts+18532, libc.VaList(bp+136, (*TTable)(unsafe.Pointer(pTab10)).FzName))
_sqlite3VdbeAddOp4(tls, v, int32(OP_String8), 0, int32(3), 0, zErr2, -int32(6))
_integrityCheckResultRow(tls, v)
_sqlite3VdbeResolveLabel(tls, v, addrCkOk)
@@ -116278,9 +116596,9 @@ func _sqlite3Pragma(tls *libc.TLS, pParse uintptr, pId1 uintptr, pId2 uintptr, p
_sqlite3VdbeAddOp2(tls, v, int32(OP_AddImm), int32(8)+j4, int32(1)) /* increment entry count */
/* Verify that an index entry exists for the current table row */
jmp21 = _sqlite3VdbeAddOp4Int(tls, v, int32(OP_Found), *(*int32)(unsafe.Pointer(bp + 80))+j4, ckUniq, r1, libc.Int32FromUint16((*TIndex)(unsafe.Pointer(pIdx6)).FnColumn))
- _sqlite3VdbeLoadString(tls, v, int32(3), __ccgo_ts+18490)
+ _sqlite3VdbeLoadString(tls, v, int32(3), __ccgo_ts+18562)
_sqlite3VdbeAddOp3(tls, v, int32(OP_Concat), int32(7), int32(3), int32(3))
- _sqlite3VdbeLoadString(tls, v, int32(4), __ccgo_ts+18495)
+ _sqlite3VdbeLoadString(tls, v, int32(4), __ccgo_ts+18567)
_sqlite3VdbeAddOp3(tls, v, int32(OP_Concat), int32(4), int32(3), int32(3))
jmp5 = _sqlite3VdbeLoadString(tls, v, int32(4), (*TIndex)(unsafe.Pointer(pIdx6)).FzName)
_sqlite3VdbeAddOp3(tls, v, int32(OP_Concat), int32(4), int32(3), int32(3))
@@ -116293,9 +116611,9 @@ func _sqlite3Pragma(tls *libc.TLS, pParse uintptr, pId1 uintptr, pId2 uintptr, p
if (*TTable)(unsafe.Pointer(pTab10)).FtabFlags&uint32(TF_WithoutRowid) == uint32(0) {
_sqlite3VdbeAddOp2(tls, v, int32(OP_IdxRowid), *(*int32)(unsafe.Pointer(bp + 80))+j4, int32(3))
jmp7 = _sqlite3VdbeAddOp3(tls, v, int32(OP_Eq), int32(3), 0, r1+libc.Int32FromUint16((*TIndex)(unsafe.Pointer(pIdx6)).FnColumn)-int32(1))
- _sqlite3VdbeLoadString(tls, v, int32(3), __ccgo_ts+18516)
+ _sqlite3VdbeLoadString(tls, v, int32(3), __ccgo_ts+18588)
_sqlite3VdbeAddOp3(tls, v, int32(OP_Concat), int32(7), int32(3), int32(3))
- _sqlite3VdbeLoadString(tls, v, int32(4), __ccgo_ts+18552)
+ _sqlite3VdbeLoadString(tls, v, int32(4), __ccgo_ts+18624)
_sqlite3VdbeGoto(tls, v, jmp5-int32(1))
_sqlite3VdbeJumpHere(tls, v, jmp7)
}
@@ -116323,9 +116641,9 @@ func _sqlite3Pragma(tls *libc.TLS, pParse uintptr, pId1 uintptr, pId2 uintptr, p
if label6 != 0 {
jmp6 = _sqlite3VdbeAddOp0(tls, v, int32(OP_Goto))
_sqlite3VdbeResolveLabel(tls, v, label6)
- _sqlite3VdbeLoadString(tls, v, int32(3), __ccgo_ts+18490)
+ _sqlite3VdbeLoadString(tls, v, int32(3), __ccgo_ts+18562)
_sqlite3VdbeAddOp3(tls, v, int32(OP_Concat), int32(7), int32(3), int32(3))
- _sqlite3VdbeLoadString(tls, v, int32(4), __ccgo_ts+18563)
+ _sqlite3VdbeLoadString(tls, v, int32(4), __ccgo_ts+18635)
_sqlite3VdbeGoto(tls, v, jmp5-int32(1))
_sqlite3VdbeJumpHere(tls, v, jmp6)
}
@@ -116353,7 +116671,7 @@ func _sqlite3Pragma(tls *libc.TLS, pParse uintptr, pId1 uintptr, pId2 uintptr, p
_sqlite3VdbeGoto(tls, v, uniqOk)
_sqlite3VdbeJumpHere(tls, v, jmp61)
_sqlite3VdbeAddOp4Int(tls, v, int32(OP_IdxGT), *(*int32)(unsafe.Pointer(bp + 80))+j4, uniqOk, r1, libc.Int32FromUint16((*TIndex)(unsafe.Pointer(pIdx6)).FnKeyCol))
- _sqlite3VdbeLoadString(tls, v, int32(3), __ccgo_ts+18590)
+ _sqlite3VdbeLoadString(tls, v, int32(3), __ccgo_ts+18662)
_sqlite3VdbeGoto(tls, v, jmp5)
_sqlite3VdbeResolveLabel(tls, v, uniqOk)
}
@@ -116450,7 +116768,7 @@ func _sqlite3Pragma(tls *libc.TLS, pParse uintptr, pId1 uintptr, pId2 uintptr, p
if aOp2 != 0 {
(*(*TVdbeOp)(unsafe.Pointer(aOp2))).Fp2 = int32(1) - *(*int32)(unsafe.Pointer(bp + 72))
(*(*TVdbeOp)(unsafe.Pointer(aOp2 + 2*20))).Fp4type = int8(-libc.Int32FromInt32(1))
- *(*uintptr)(unsafe.Pointer(aOp2 + 2*20 + 16)) = __ccgo_ts + 18617
+ *(*uintptr)(unsafe.Pointer(aOp2 + 2*20 + 16)) = __ccgo_ts + 18689
(*(*TVdbeOp)(unsafe.Pointer(aOp2 + 5*20))).Fp4type = int8(-libc.Int32FromInt32(1))
*(*uintptr)(unsafe.Pointer(aOp2 + 5*20 + 16)) = _sqlite3ErrStr(tls, int32(SQLITE_CORRUPT))
}
@@ -116529,7 +116847,7 @@ func _sqlite3Pragma(tls *libc.TLS, pParse uintptr, pId1 uintptr, pId2 uintptr, p
FzName uintptr
Fenc Tu8
})(unsafe.Pointer(pEnc)).FzName != 0) {
- _sqlite3ErrorMsg(tls, pParse, __ccgo_ts+18678, libc.VaList(bp+136, zRight))
+ _sqlite3ErrorMsg(tls, pParse, __ccgo_ts+18750, libc.VaList(bp+136, zRight))
}
}
}
@@ -116634,13 +116952,13 @@ func _sqlite3Pragma(tls *libc.TLS, pParse uintptr, pId1 uintptr, pId2 uintptr, p
iBt = v67
eMode2 = SQLITE_CHECKPOINT_PASSIVE
if zRight != 0 {
- if _sqlite3StrICmp(tls, zRight, __ccgo_ts+17903) == 0 {
+ if _sqlite3StrICmp(tls, zRight, __ccgo_ts+17975) == 0 {
eMode2 = int32(SQLITE_CHECKPOINT_FULL)
} else {
- if _sqlite3StrICmp(tls, zRight, __ccgo_ts+18703) == 0 {
+ if _sqlite3StrICmp(tls, zRight, __ccgo_ts+18775) == 0 {
eMode2 = int32(SQLITE_CHECKPOINT_RESTART)
} else {
- if _sqlite3StrICmp(tls, zRight, __ccgo_ts+18056) == 0 {
+ if _sqlite3StrICmp(tls, zRight, __ccgo_ts+18128) == 0 {
eMode2 = int32(SQLITE_CHECKPOINT_TRUNCATE)
}
}
@@ -116775,7 +117093,7 @@ func _sqlite3Pragma(tls *libc.TLS, pParse uintptr, pId1 uintptr, pId2 uintptr, p
nLimit = int32(SQLITE_DEFAULT_OPTIMIZE_LIMIT)
}
}
- v70 = pParse + 44
+ v70 = pParse + 48
v69 = *(*int32)(unsafe.Pointer(v70))
*(*int32)(unsafe.Pointer(v70))++
iTabCur = v69
@@ -116805,7 +117123,7 @@ func _sqlite3Pragma(tls *libc.TLS, pParse uintptr, pId1 uintptr, pId2 uintptr, p
goto _73
}
/* Do not scan system tables */
- if 0 == Xsqlite3_strnicmp(tls, (*TTable)(unsafe.Pointer(pTab12)).FzName, __ccgo_ts+6655, int32(7)) {
+ if 0 == Xsqlite3_strnicmp(tls, (*TTable)(unsafe.Pointer(pTab12)).FzName, __ccgo_ts+6680, int32(7)) {
goto _73
}
/* Find the size of the table as last recorded in sqlite_stat1.
@@ -116867,7 +117185,7 @@ func _sqlite3Pragma(tls *libc.TLS, pParse uintptr, pId1 uintptr, pId2 uintptr, p
} else {
_sqlite3VdbeAddOp2(tls, v, int32(OP_Rewind), iTabCur, libc.Int32FromUint32(libc.Uint32FromInt32(_sqlite3VdbeCurrentAddr(tls, v)+int32(2))+opMask&uint32(1)))
}
- zSubSql = _sqlite3MPrintf(tls, db, __ccgo_ts+18711, libc.VaList(bp+136, (*(*TDb)(unsafe.Pointer((*Tsqlite3)(unsafe.Pointer(db)).FaDb + uintptr(iDb)*16))).FzDbSName, (*TTable)(unsafe.Pointer(pTab12)).FzName))
+ zSubSql = _sqlite3MPrintf(tls, db, __ccgo_ts+18783, libc.VaList(bp+136, (*(*TDb)(unsafe.Pointer((*Tsqlite3)(unsafe.Pointer(db)).FaDb + uintptr(iDb)*16))).FzDbSName, (*TTable)(unsafe.Pointer(pTab12)).FzName))
if opMask&uint32(0x01) != 0 {
r11 = _sqlite3GetTempReg(tls, pParse)
_sqlite3VdbeAddOp4(tls, v, int32(OP_String8), 0, r11, 0, zSubSql, -int32(6))
@@ -117140,34 +117458,34 @@ var _encnames1 = [9]struct {
Fenc Tu8
}{
0: {
- FzName: __ccgo_ts + 18620,
+ FzName: __ccgo_ts + 18692,
Fenc: uint8(SQLITE_UTF8),
},
1: {
- FzName: __ccgo_ts + 18625,
+ FzName: __ccgo_ts + 18697,
Fenc: uint8(SQLITE_UTF8),
},
2: {
- FzName: __ccgo_ts + 18631,
+ FzName: __ccgo_ts + 18703,
Fenc: uint8(SQLITE_UTF16LE),
},
3: {
- FzName: __ccgo_ts + 18640,
+ FzName: __ccgo_ts + 18712,
Fenc: uint8(SQLITE_UTF16BE),
},
4: {
- FzName: __ccgo_ts + 18649,
+ FzName: __ccgo_ts + 18721,
Fenc: uint8(SQLITE_UTF16LE),
},
5: {
- FzName: __ccgo_ts + 18657,
+ FzName: __ccgo_ts + 18729,
Fenc: uint8(SQLITE_UTF16BE),
},
6: {
- FzName: __ccgo_ts + 18665,
+ FzName: __ccgo_ts + 18737,
},
7: {
- FzName: __ccgo_ts + 18672,
+ FzName: __ccgo_ts + 18744,
},
8: {},
}
@@ -117263,14 +117581,14 @@ func _pragmaVtabConnect(tls *libc.TLS, db uintptr, pAux uintptr, argc int32, arg
_ = argc
_ = argv
_sqlite3StrAccumInit(tls, bp, uintptr(0), bp+24, int32(200), 0)
- Xsqlite3_str_appendall(tls, bp, __ccgo_ts+18729)
+ Xsqlite3_str_appendall(tls, bp, __ccgo_ts+18801)
i = 0
j = libc.Int32FromUint8((*TPragmaName)(unsafe.Pointer(pPragma)).FiPragCName)
for {
if !(i < libc.Int32FromUint8((*TPragmaName)(unsafe.Pointer(pPragma)).FnPragCName)) {
break
}
- Xsqlite3_str_appendf(tls, bp, __ccgo_ts+18744, libc.VaList(bp+232, int32(cSep), _pragCName[j]))
+ Xsqlite3_str_appendf(tls, bp, __ccgo_ts+18816, libc.VaList(bp+232, int32(cSep), _pragCName[j]))
cSep = int8(',')
goto _1
_1:
@@ -117279,19 +117597,19 @@ func _pragmaVtabConnect(tls *libc.TLS, db uintptr, pAux uintptr, argc int32, arg
j++
}
if i == 0 {
- Xsqlite3_str_appendf(tls, bp, __ccgo_ts+18751, libc.VaList(bp+232, (*TPragmaName)(unsafe.Pointer(pPragma)).FzName))
+ Xsqlite3_str_appendf(tls, bp, __ccgo_ts+18823, libc.VaList(bp+232, (*TPragmaName)(unsafe.Pointer(pPragma)).FzName))
i++
}
j = 0
if libc.Int32FromUint8((*TPragmaName)(unsafe.Pointer(pPragma)).FmPragFlg)&int32(PragFlg_Result1) != 0 {
- Xsqlite3_str_appendall(tls, bp, __ccgo_ts+18757)
+ Xsqlite3_str_appendall(tls, bp, __ccgo_ts+18829)
j++
}
if libc.Int32FromUint8((*TPragmaName)(unsafe.Pointer(pPragma)).FmPragFlg)&(libc.Int32FromInt32(PragFlg_SchemaOpt)|libc.Int32FromInt32(PragFlg_SchemaReq)) != 0 {
- Xsqlite3_str_appendall(tls, bp, __ccgo_ts+18769)
+ Xsqlite3_str_appendall(tls, bp, __ccgo_ts+18841)
j++
}
- Xsqlite3_str_append(tls, bp, __ccgo_ts+5175, int32(1))
+ Xsqlite3_str_append(tls, bp, __ccgo_ts+5201, int32(1))
_sqlite3StrAccumFinish(tls, bp)
rc = Xsqlite3_declare_vtab(tls, db, bp+24)
if rc == SQLITE_OK {
@@ -117306,7 +117624,7 @@ func _pragmaVtabConnect(tls *libc.TLS, db uintptr, pAux uintptr, argc int32, arg
(*TPragmaVtab)(unsafe.Pointer(pTab)).FnHidden = libc.Uint8FromInt32(j)
}
} else {
- *(*uintptr)(unsafe.Pointer(pzErr)) = Xsqlite3_mprintf(tls, __ccgo_ts+3864, libc.VaList(bp+232, Xsqlite3_errmsg(tls, db)))
+ *(*uintptr)(unsafe.Pointer(pzErr)) = Xsqlite3_mprintf(tls, __ccgo_ts+3890, libc.VaList(bp+232, Xsqlite3_errmsg(tls, db)))
}
*(*uintptr)(unsafe.Pointer(ppVtab)) = pTab
return rc
@@ -117487,7 +117805,7 @@ func _pragmaVtabFilter(tls *libc.TLS, pVtabCursor uintptr, idxNum int32, idxStr
}
zText = Xsqlite3_value_text(tls, *(*uintptr)(unsafe.Pointer(argv + uintptr(i)*4)))
if zText != 0 {
- *(*uintptr)(unsafe.Pointer(pCsr + 16 + uintptr(j)*4)) = Xsqlite3_mprintf(tls, __ccgo_ts+3864, libc.VaList(bp+32, zText))
+ *(*uintptr)(unsafe.Pointer(pCsr + 16 + uintptr(j)*4)) = Xsqlite3_mprintf(tls, __ccgo_ts+3890, libc.VaList(bp+32, zText))
if *(*uintptr)(unsafe.Pointer(pCsr + 16 + uintptr(j)*4)) == uintptr(0) {
return int32(SQLITE_NOMEM)
}
@@ -117499,13 +117817,13 @@ func _pragmaVtabFilter(tls *libc.TLS, pVtabCursor uintptr, idxNum int32, idxStr
j++
}
_sqlite3StrAccumInit(tls, bp, uintptr(0), uintptr(0), 0, *(*int32)(unsafe.Pointer((*TPragmaVtab)(unsafe.Pointer(pTab)).Fdb + 116 + 1*4)))
- Xsqlite3_str_appendall(tls, bp, __ccgo_ts+18784)
+ Xsqlite3_str_appendall(tls, bp, __ccgo_ts+18856)
if *(*uintptr)(unsafe.Pointer(pCsr + 16 + 1*4)) != 0 {
- Xsqlite3_str_appendf(tls, bp, __ccgo_ts+18792, libc.VaList(bp+32, *(*uintptr)(unsafe.Pointer(pCsr + 16 + 1*4))))
+ Xsqlite3_str_appendf(tls, bp, __ccgo_ts+18864, libc.VaList(bp+32, *(*uintptr)(unsafe.Pointer(pCsr + 16 + 1*4))))
}
Xsqlite3_str_appendall(tls, bp, (*TPragmaName)(unsafe.Pointer((*TPragmaVtab)(unsafe.Pointer(pTab)).FpName)).FzName)
if *(*uintptr)(unsafe.Pointer(pCsr + 16)) != 0 {
- Xsqlite3_str_appendf(tls, bp, __ccgo_ts+18796, libc.VaList(bp+32, *(*uintptr)(unsafe.Pointer(pCsr + 16))))
+ Xsqlite3_str_appendf(tls, bp, __ccgo_ts+18868, libc.VaList(bp+32, *(*uintptr)(unsafe.Pointer(pCsr + 16))))
}
zSql = _sqlite3StrAccumFinish(tls, bp)
if zSql == uintptr(0) {
@@ -117514,7 +117832,7 @@ func _pragmaVtabFilter(tls *libc.TLS, pVtabCursor uintptr, idxNum int32, idxStr
rc = Xsqlite3_prepare_v2(tls, (*TPragmaVtab)(unsafe.Pointer(pTab)).Fdb, zSql, -int32(1), pCsr+4, uintptr(0))
Xsqlite3_free(tls, zSql)
if rc != SQLITE_OK {
- (*TPragmaVtab)(unsafe.Pointer(pTab)).Fbase.FzErrMsg = Xsqlite3_mprintf(tls, __ccgo_ts+3864, libc.VaList(bp+32, Xsqlite3_errmsg(tls, (*TPragmaVtab)(unsafe.Pointer(pTab)).Fdb)))
+ (*TPragmaVtab)(unsafe.Pointer(pTab)).Fbase.FzErrMsg = Xsqlite3_mprintf(tls, __ccgo_ts+3890, libc.VaList(bp+32, Xsqlite3_errmsg(tls, (*TPragmaVtab)(unsafe.Pointer(pTab)).Fdb)))
return rc
}
return _pragmaVtabNext(tls, pVtabCursor)
@@ -117640,24 +117958,24 @@ func _corruptSchema(tls *libc.TLS, pData uintptr, azObj uintptr, zExtra uintptr)
/* A error message has already been generated. Do not overwrite it */
} else {
if (*TInitData)(unsafe.Pointer(pData)).FmInitFlags&libc.Uint32FromInt32(libc.Int32FromInt32(INITFLAG_AlterMask)) != 0 {
- *(*uintptr)(unsafe.Pointer((*TInitData)(unsafe.Pointer(pData)).FpzErrMsg)) = _sqlite3MPrintf(tls, db, __ccgo_ts+18830, libc.VaList(bp+8, *(*uintptr)(unsafe.Pointer(azObj)), *(*uintptr)(unsafe.Pointer(azObj + 1*4)), _azAlterType[(*TInitData)(unsafe.Pointer(pData)).FmInitFlags&uint32(INITFLAG_AlterMask)-uint32(1)], zExtra))
+ *(*uintptr)(unsafe.Pointer((*TInitData)(unsafe.Pointer(pData)).FpzErrMsg)) = _sqlite3MPrintf(tls, db, __ccgo_ts+18902, libc.VaList(bp+8, *(*uintptr)(unsafe.Pointer(azObj)), *(*uintptr)(unsafe.Pointer(azObj + 1*4)), _azAlterType[(*TInitData)(unsafe.Pointer(pData)).FmInitFlags&uint32(INITFLAG_AlterMask)-uint32(1)], zExtra))
(*TInitData)(unsafe.Pointer(pData)).Frc = int32(SQLITE_ERROR)
} else {
if (*Tsqlite3)(unsafe.Pointer(db)).Fflags&uint64(SQLITE_WriteSchema) != 0 {
- (*TInitData)(unsafe.Pointer(pData)).Frc = _sqlite3CorruptError(tls, int32(142805))
+ (*TInitData)(unsafe.Pointer(pData)).Frc = _sqlite3CorruptError(tls, int32(143745))
} else {
if *(*uintptr)(unsafe.Pointer(azObj + 1*4)) != 0 {
v1 = *(*uintptr)(unsafe.Pointer(azObj + 1*4))
} else {
- v1 = __ccgo_ts + 5177
+ v1 = __ccgo_ts + 5203
}
zObj = v1
- z = _sqlite3MPrintf(tls, db, __ccgo_ts+18858, libc.VaList(bp+8, zObj))
+ z = _sqlite3MPrintf(tls, db, __ccgo_ts+18930, libc.VaList(bp+8, zObj))
if zExtra != 0 && *(*int8)(unsafe.Pointer(zExtra)) != 0 {
- z = _sqlite3MPrintf(tls, db, __ccgo_ts+18889, libc.VaList(bp+8, z, zExtra))
+ z = _sqlite3MPrintf(tls, db, __ccgo_ts+18961, libc.VaList(bp+8, z, zExtra))
}
*(*uintptr)(unsafe.Pointer((*TInitData)(unsafe.Pointer(pData)).FpzErrMsg)) = z
- (*TInitData)(unsafe.Pointer(pData)).Frc = _sqlite3CorruptError(tls, int32(142812))
+ (*TInitData)(unsafe.Pointer(pData)).Frc = _sqlite3CorruptError(tls, int32(143752))
}
}
}
@@ -117665,9 +117983,9 @@ func _corruptSchema(tls *libc.TLS, pData uintptr, azObj uintptr, zExtra uintptr)
}
var _azAlterType = [3]uintptr{
- 0: __ccgo_ts + 18800,
- 1: __ccgo_ts + 18807,
- 2: __ccgo_ts + 18819,
+ 0: __ccgo_ts + 18872,
+ 1: __ccgo_ts + 18879,
+ 2: __ccgo_ts + 18891,
}
// C documentation
@@ -117743,7 +118061,7 @@ func _sqlite3InitCallback(tls *libc.TLS, pInit uintptr, argc int32, argv uintptr
(*Tsqlite3)(unsafe.Pointer(db)).Finit1.FiDb = libc.Uint8FromInt32(iDb)
if _sqlite3GetUInt32(tls, *(*uintptr)(unsafe.Pointer(argv + 3*4)), db+168) == 0 || (*Tsqlite3)(unsafe.Pointer(db)).Finit1.FnewTnum > (*TInitData)(unsafe.Pointer(pData)).FmxPage && (*TInitData)(unsafe.Pointer(pData)).FmxPage > uint32(0) {
if _sqlite3Config.FbExtraSchemaChecks != 0 {
- _corruptSchema(tls, pData, argv, __ccgo_ts+14675)
+ _corruptSchema(tls, pData, argv, __ccgo_ts+14700)
}
}
libc.SetBitFieldPtr8Uint32(db+168+8, libc.Uint32FromInt32(0), 0, 0x1)
@@ -117776,11 +118094,11 @@ func _sqlite3InitCallback(tls *libc.TLS, pInit uintptr, argc int32, argv uintptr
} else {
pIndex = _sqlite3FindIndex(tls, db, *(*uintptr)(unsafe.Pointer(argv + 1*4)), (*(*TDb)(unsafe.Pointer((*Tsqlite3)(unsafe.Pointer(db)).FaDb + uintptr(iDb)*16))).FzDbSName)
if pIndex == uintptr(0) {
- _corruptSchema(tls, pData, argv, __ccgo_ts+18897)
+ _corruptSchema(tls, pData, argv, __ccgo_ts+18969)
} else {
if _sqlite3GetUInt32(tls, *(*uintptr)(unsafe.Pointer(argv + 3*4)), pIndex+44) == 0 || (*TIndex)(unsafe.Pointer(pIndex)).Ftnum < uint32(2) || (*TIndex)(unsafe.Pointer(pIndex)).Ftnum > (*TInitData)(unsafe.Pointer(pData)).FmxPage || _sqlite3IndexHasDuplicateRootPage(tls, pIndex) != 0 {
if _sqlite3Config.FbExtraSchemaChecks != 0 {
- _corruptSchema(tls, pData, argv, __ccgo_ts+14675)
+ _corruptSchema(tls, pData, argv, __ccgo_ts+14700)
}
}
}
@@ -117819,18 +118137,18 @@ func _sqlite3InitOne(tls *libc.TLS, db uintptr, iDb int32, pzErrMsg uintptr, mFl
** table name will be inserted automatically by the parser so we can just
** use the abbreviation "x" here. The parser will also automatically tag
** the schema table as read-only. */
- (*(*[6]uintptr)(unsafe.Pointer(bp)))[0] = __ccgo_ts + 9249
+ (*(*[6]uintptr)(unsafe.Pointer(bp)))[0] = __ccgo_ts + 9274
if libc.Bool(!(libc.Int32FromInt32(OMIT_TEMPDB) != 0)) && iDb == int32(1) {
- v2 = __ccgo_ts + 6663
+ v2 = __ccgo_ts + 6688
} else {
- v2 = __ccgo_ts + 6151
+ v2 = __ccgo_ts + 6175
}
v1 = v2
zSchemaTabName = v1
(*(*[6]uintptr)(unsafe.Pointer(bp)))[int32(1)] = v1
(*(*[6]uintptr)(unsafe.Pointer(bp)))[int32(2)] = (*(*[6]uintptr)(unsafe.Pointer(bp)))[int32(1)]
- (*(*[6]uintptr)(unsafe.Pointer(bp)))[int32(3)] = __ccgo_ts + 8321
- (*(*[6]uintptr)(unsafe.Pointer(bp)))[int32(4)] = __ccgo_ts + 18910
+ (*(*[6]uintptr)(unsafe.Pointer(bp)))[int32(3)] = __ccgo_ts + 8346
+ (*(*[6]uintptr)(unsafe.Pointer(bp)))[int32(4)] = __ccgo_ts + 18982
(*(*[6]uintptr)(unsafe.Pointer(bp)))[int32(5)] = uintptr(0)
(*(*TInitData)(unsafe.Pointer(bp + 44))).Fdb = db
(*(*TInitData)(unsafe.Pointer(bp + 44))).FiDb = iDb
@@ -117914,7 +118232,7 @@ func _sqlite3InitOne(tls *libc.TLS, db uintptr, iDb int32, pzErrMsg uintptr, mFl
} else {
/* If opening an attached database, the encoding much match ENC(db) */
if (*(*[5]int32)(unsafe.Pointer(bp + 24)))[libc.Int32FromInt32(BTREE_TEXT_ENCODING)-libc.Int32FromInt32(1)]&int32(3) != libc.Int32FromUint8((*Tsqlite3)(unsafe.Pointer(db)).Fenc) {
- _sqlite3SetString(tls, pzErrMsg, db, __ccgo_ts+12286)
+ _sqlite3SetString(tls, pzErrMsg, db, __ccgo_ts+12311)
rc = int32(SQLITE_ERROR)
goto initone_error_out
}
@@ -117940,7 +118258,7 @@ func _sqlite3InitOne(tls *libc.TLS, db uintptr, iDb int32, pzErrMsg uintptr, mFl
(*TSchema)(unsafe.Pointer((*TDb)(unsafe.Pointer(pDb)).FpSchema)).Ffile_format = uint8(1)
}
if libc.Int32FromUint8((*TSchema)(unsafe.Pointer((*TDb)(unsafe.Pointer(pDb)).FpSchema)).Ffile_format) > int32(SQLITE_MAX_FILE_FORMAT) {
- _sqlite3SetString(tls, pzErrMsg, db, __ccgo_ts+18982)
+ _sqlite3SetString(tls, pzErrMsg, db, __ccgo_ts+19054)
rc = int32(SQLITE_ERROR)
goto initone_error_out
}
@@ -117955,7 +118273,7 @@ func _sqlite3InitOne(tls *libc.TLS, db uintptr, iDb int32, pzErrMsg uintptr, mFl
/* Read the schema information out of the schema tables
*/
(*(*TInitData)(unsafe.Pointer(bp + 44))).FmxPage = _sqlite3BtreeLastPage(tls, (*TDb)(unsafe.Pointer(pDb)).FpBt)
- zSql = _sqlite3MPrintf(tls, db, __ccgo_ts+19006, libc.VaList(bp+80, (*(*TDb)(unsafe.Pointer((*Tsqlite3)(unsafe.Pointer(db)).FaDb + uintptr(iDb)*16))).FzDbSName, zSchemaTabName))
+ zSql = _sqlite3MPrintf(tls, db, __ccgo_ts+19078, libc.VaList(bp+80, (*(*TDb)(unsafe.Pointer((*Tsqlite3)(unsafe.Pointer(db)).FaDb + uintptr(iDb)*16))).FzDbSName, zSchemaTabName))
xAuth = (*Tsqlite3)(unsafe.Pointer(db)).FxAuth
(*Tsqlite3)(unsafe.Pointer(db)).FxAuth = uintptr(0)
rc = Xsqlite3_exec(tls, db, zSql, __ccgo_fp(_sqlite3InitCallback), bp+44, uintptr(0))
@@ -118284,8 +118602,8 @@ func _sqlite3ParserAddCleanup(tls *libc.TLS, pParse uintptr, xCleanup uintptr, p
// ** is generated by Lemon.
// */
func _sqlite3ParseObjectInit(tls *libc.TLS, pParse uintptr, db uintptr) {
- libc.Xmemset(tls, pParse+uintptr(uint32(libc.UintptrFromInt32(0)+4)), 0, uint32(libc.UintptrFromInt32(0)+168)-uint32(libc.UintptrFromInt32(0)+4))
- libc.Xmemset(tls, pParse+uintptr(uint32(libc.UintptrFromInt32(0)+212)), 0, libc.Uint32FromInt64(288)-uint32(libc.UintptrFromInt32(0)+212))
+ libc.Xmemset(tls, pParse+uintptr(uint32(libc.UintptrFromInt32(0)+4)), 0, uint32(libc.UintptrFromInt32(0)+136)-uint32(libc.UintptrFromInt32(0)+4))
+ libc.Xmemset(tls, pParse+uintptr(uint32(libc.UintptrFromInt32(0)+208)), 0, libc.Uint32FromInt64(284)-uint32(libc.UintptrFromInt32(0)+208))
(*TParse)(unsafe.Pointer(pParse)).FpOuterParse = (*Tsqlite3)(unsafe.Pointer(db)).FpParse
(*Tsqlite3)(unsafe.Pointer(db)).FpParse = pParse
(*TParse)(unsafe.Pointer(pParse)).Fdb = db
@@ -118313,8 +118631,8 @@ func _sqlite3Prepare(tls *libc.TLS, db uintptr, zSql uintptr, nBytes int32, prep
_, _, _, _, _, _, _, _ = i, mxLen, pBt, pT, rc, zDb, zSqlCopy, v1
rc = SQLITE_OK /* Parsing context */
/* sqlite3ParseObjectInit(&sParse, db); // inlined for performance */
- libc.Xmemset(tls, bp+uintptr(uint32(libc.UintptrFromInt32(0)+4)), 0, uint32(libc.UintptrFromInt32(0)+168)-uint32(libc.UintptrFromInt32(0)+4))
- libc.Xmemset(tls, bp+uintptr(uint32(libc.UintptrFromInt32(0)+212)), 0, libc.Uint32FromInt64(288)-uint32(libc.UintptrFromInt32(0)+212))
+ libc.Xmemset(tls, bp+uintptr(uint32(libc.UintptrFromInt32(0)+4)), 0, uint32(libc.UintptrFromInt32(0)+136)-uint32(libc.UintptrFromInt32(0)+4))
+ libc.Xmemset(tls, bp+uintptr(uint32(libc.UintptrFromInt32(0)+208)), 0, libc.Uint32FromInt64(284)-uint32(libc.UintptrFromInt32(0)+208))
(*(*TParse)(unsafe.Pointer(bp))).FpOuterParse = (*Tsqlite3)(unsafe.Pointer(db)).FpParse
(*Tsqlite3)(unsafe.Pointer(db)).FpParse = bp
(*(*TParse)(unsafe.Pointer(bp))).Fdb = db
@@ -118373,7 +118691,7 @@ func _sqlite3Prepare(tls *libc.TLS, db uintptr, zSql uintptr, nBytes int32, prep
rc = _sqlite3BtreeSchemaLocked(tls, pBt)
if rc != 0 {
zDb = (*(*TDb)(unsafe.Pointer((*Tsqlite3)(unsafe.Pointer(db)).FaDb + uintptr(i)*16))).FzDbSName
- _sqlite3ErrorWithMsg(tls, db, rc, __ccgo_ts+19040, libc.VaList(bp+296, zDb))
+ _sqlite3ErrorWithMsg(tls, db, rc, __ccgo_ts+19112, libc.VaList(bp+296, zDb))
goto end_prepare
}
}
@@ -118389,7 +118707,7 @@ func _sqlite3Prepare(tls *libc.TLS, db uintptr, zSql uintptr, nBytes int32, prep
if nBytes >= 0 && (nBytes == 0 || int32(*(*int8)(unsafe.Pointer(zSql + uintptr(nBytes-int32(1))))) != 0) {
mxLen = *(*int32)(unsafe.Pointer(db + 116 + 1*4))
if nBytes > mxLen {
- _sqlite3ErrorWithMsg(tls, db, int32(SQLITE_TOOBIG), __ccgo_ts+19070, 0)
+ _sqlite3ErrorWithMsg(tls, db, int32(SQLITE_TOOBIG), __ccgo_ts+19142, 0)
rc = _sqlite3ApiExit(tls, db, int32(SQLITE_TOOBIG))
goto end_prepare
}
@@ -118412,10 +118730,10 @@ func _sqlite3Prepare(tls *libc.TLS, db uintptr, zSql uintptr, nBytes int32, prep
}
if (*Tsqlite3)(unsafe.Pointer(db)).FmallocFailed != 0 {
(*(*TParse)(unsafe.Pointer(bp))).Frc = int32(SQLITE_NOMEM)
- (*(*TParse)(unsafe.Pointer(bp))).FcheckSchema = uint8(0)
+ libc.SetBitFieldPtr8Uint32(bp+32, libc.Uint32FromInt32(0), 3, 0x8)
}
if (*(*TParse)(unsafe.Pointer(bp))).Frc != SQLITE_OK && (*(*TParse)(unsafe.Pointer(bp))).Frc != int32(SQLITE_DONE) {
- if (*(*TParse)(unsafe.Pointer(bp))).FcheckSchema != 0 && libc.Int32FromUint8((*Tsqlite3)(unsafe.Pointer(db)).Finit1.Fbusy) == 0 {
+ if int32(Tbft(*(*uint8)(unsafe.Pointer(bp + 32))&0x8>>3)) != 0 && libc.Int32FromUint8((*Tsqlite3)(unsafe.Pointer(db)).Finit1.Fbusy) == 0 {
_schemaIsValid(tls, bp)
}
if (*(*TParse)(unsafe.Pointer(bp))).FpVdbe != 0 {
@@ -118423,7 +118741,7 @@ func _sqlite3Prepare(tls *libc.TLS, db uintptr, zSql uintptr, nBytes int32, prep
}
rc = (*(*TParse)(unsafe.Pointer(bp))).Frc
if (*(*TParse)(unsafe.Pointer(bp))).FzErrMsg != 0 {
- _sqlite3ErrorWithMsg(tls, db, rc, __ccgo_ts+3864, libc.VaList(bp+296, (*(*TParse)(unsafe.Pointer(bp))).FzErrMsg))
+ _sqlite3ErrorWithMsg(tls, db, rc, __ccgo_ts+3890, libc.VaList(bp+296, (*(*TParse)(unsafe.Pointer(bp))).FzErrMsg))
_sqlite3DbFree(tls, db, (*(*TParse)(unsafe.Pointer(bp))).FzErrMsg)
} else {
_sqlite3Error(tls, db, rc)
@@ -118453,7 +118771,7 @@ func _sqlite3LockAndPrepare(tls *libc.TLS, db uintptr, zSql uintptr, nBytes int3
cnt = 0
*(*uintptr)(unsafe.Pointer(ppStmt)) = uintptr(0)
if !(_sqlite3SafetyCheckOk(tls, db) != 0) || zSql == uintptr(0) {
- return _sqlite3MisuseError(tls, int32(143612))
+ return _sqlite3MisuseError(tls, int32(144552))
}
Xsqlite3_mutex_enter(tls, (*Tsqlite3)(unsafe.Pointer(db)).Fmutex)
_sqlite3BtreeEnterAll(tls, db)
@@ -118587,7 +118905,7 @@ func _sqlite3Prepare16(tls *libc.TLS, db uintptr, zSql uintptr, nBytes int32, pr
rc = SQLITE_OK
*(*uintptr)(unsafe.Pointer(ppStmt)) = uintptr(0)
if !(_sqlite3SafetyCheckOk(tls, db) != 0) || zSql == uintptr(0) {
- return _sqlite3MisuseError(tls, int32(143761))
+ return _sqlite3MisuseError(tls, int32(144701))
}
/* Make sure nBytes is non-negative and correct. It should be the
** number of bytes until the end of the input buffer or until the first
@@ -118847,7 +119165,7 @@ func _sqlite3SelectNew(tls *libc.TLS, pParse uintptr, pEList uintptr, pSrc uintp
(*TSelect)(unsafe.Pointer(pNew)).FselFlags = selFlags
(*TSelect)(unsafe.Pointer(pNew)).FiLimit = 0
(*TSelect)(unsafe.Pointer(pNew)).FiOffset = 0
- v3 = pParse + 112
+ v3 = pParse + 100
*(*int32)(unsafe.Pointer(v3))++
v2 = *(*int32)(unsafe.Pointer(v3))
(*TSelect)(unsafe.Pointer(pNew)).FselId = libc.Uint32FromInt32(v2)
@@ -118855,7 +119173,7 @@ func _sqlite3SelectNew(tls *libc.TLS, pParse uintptr, pEList uintptr, pSrc uintp
*(*int32)(unsafe.Pointer(pNew + 20 + 1*4)) = -int32(1)
(*TSelect)(unsafe.Pointer(pNew)).FnSelectRow = 0
if pSrc == uintptr(0) {
- pSrc = _sqlite3DbMallocZero(tls, (*TParse)(unsafe.Pointer(pParse)).Fdb, uint64(56))
+ pSrc = _sqlite3DbMallocZero(tls, (*TParse)(unsafe.Pointer(pParse)).Fdb, uint64(uint32(libc.UintptrFromInt32(0)+8)+libc.Uint32FromInt64(48)))
}
(*TSelect)(unsafe.Pointer(pNew)).FpSrc = pSrc
(*TSelect)(unsafe.Pointer(pNew)).FpWhere = pWhere
@@ -119011,15 +119329,15 @@ func _sqlite3JoinType(tls *libc.TLS, pParse uintptr, pA uintptr, pB uintptr, pC
i++
}
if jointype&(libc.Int32FromInt32(JT_INNER)|libc.Int32FromInt32(JT_OUTER)) == libc.Int32FromInt32(JT_INNER)|libc.Int32FromInt32(JT_OUTER) || jointype&int32(JT_ERROR) != 0 || jointype&(libc.Int32FromInt32(JT_OUTER)|libc.Int32FromInt32(JT_LEFT)|libc.Int32FromInt32(JT_RIGHT)) == int32(JT_OUTER) {
- zSp1 = __ccgo_ts + 11393
- zSp2 = __ccgo_ts + 11393
+ zSp1 = __ccgo_ts + 11418
+ zSp2 = __ccgo_ts + 11418
if pB == uintptr(0) {
zSp1++
}
if pC == uintptr(0) {
zSp2++
}
- _sqlite3ErrorMsg(tls, pParse, __ccgo_ts+19089, libc.VaList(bp+8, pA, zSp1, pB, zSp2, pC))
+ _sqlite3ErrorMsg(tls, pParse, __ccgo_ts+19161, libc.VaList(bp+8, pA, zSp1, pB, zSp2, pC))
jointype = int32(JT_INNER)
}
return jointype
@@ -119076,25 +119394,28 @@ var _aKeyword = [7]struct {
// ** is not contained in the table.
// */
func _sqlite3ColumnIndex(tls *libc.TLS, pTab uintptr, zCol uintptr) (r int32) {
+ var aCol uintptr
var h Tu8
- var i int32
- var pCol uintptr
- _, _, _ = h, i, pCol
+ var i, nCol int32
+ _, _, _, _ = aCol, h, i, nCol
h = _sqlite3StrIHash(tls, zCol)
- pCol = (*TTable)(unsafe.Pointer(pTab)).FaCol
- i = libc.Int32FromInt32(0)
- for {
- if !(i < int32((*TTable)(unsafe.Pointer(pTab)).FnCol)) {
- break
- }
- if libc.Int32FromUint8((*TColumn)(unsafe.Pointer(pCol)).FhName) == libc.Int32FromUint8(h) && _sqlite3StrICmp(tls, (*TColumn)(unsafe.Pointer(pCol)).FzCnName, zCol) == 0 {
+ aCol = (*TTable)(unsafe.Pointer(pTab)).FaCol
+ nCol = int32((*TTable)(unsafe.Pointer(pTab)).FnCol)
+ /* See if the aHx gives us a lucky match */
+ i = libc.Int32FromUint8(*(*Tu8)(unsafe.Pointer(pTab + 64 + uintptr(uint32(h)%uint32(16)))))
+ if libc.Int32FromUint8((*(*TColumn)(unsafe.Pointer(aCol + uintptr(i)*12))).FhName) == libc.Int32FromUint8(h) && _sqlite3StrICmp(tls, (*(*TColumn)(unsafe.Pointer(aCol + uintptr(i)*12))).FzCnName, zCol) == 0 {
+ return i
+ }
+ /* No lucky match from the hash table. Do a full search. */
+ i = 0
+ for int32(1) != 0 {
+ if libc.Int32FromUint8((*(*TColumn)(unsafe.Pointer(aCol + uintptr(i)*12))).FhName) == libc.Int32FromUint8(h) && _sqlite3StrICmp(tls, (*(*TColumn)(unsafe.Pointer(aCol + uintptr(i)*12))).FzCnName, zCol) == 0 {
return i
}
- goto _1
- _1:
- ;
- pCol += 12
i++
+ if i >= nCol {
+ break
+ }
}
return -int32(1)
}
@@ -119226,13 +119547,13 @@ func _unsetJoinExpr(tls *libc.TLS, p uintptr, iTable int32, nullable int32) {
_ = i
for p != 0 {
if iTable < 0 || (*TExpr)(unsafe.Pointer(p)).Fflags&libc.Uint32FromInt32(libc.Int32FromInt32(EP_OuterON)) != uint32(0) && *(*int32)(unsafe.Pointer(p + 36)) == iTable {
- *(*Tu32)(unsafe.Pointer(p + 4)) &= libc.Uint32FromInt32(^(libc.Int32FromInt32(EP_OuterON) | libc.Int32FromInt32(EP_InnerON)))
+ *(*Tu32)(unsafe.Pointer(p + 4)) &= ^libc.Uint32FromInt32(libc.Int32FromInt32(EP_OuterON) | libc.Int32FromInt32(EP_InnerON))
if iTable >= 0 {
*(*Tu32)(unsafe.Pointer(p + 4)) |= libc.Uint32FromInt32(libc.Int32FromInt32(EP_InnerON))
}
}
if libc.Int32FromUint8((*TExpr)(unsafe.Pointer(p)).Fop) == int32(TK_COLUMN) && (*TExpr)(unsafe.Pointer(p)).FiTable == iTable && !(nullable != 0) {
- *(*Tu32)(unsafe.Pointer(p + 4)) &= libc.Uint32FromInt32(^libc.Int32FromInt32(EP_CanBeNull))
+ *(*Tu32)(unsafe.Pointer(p + 4)) &= ^libc.Uint32FromInt32(libc.Int32FromInt32(EP_CanBeNull))
}
if libc.Int32FromUint8((*TExpr)(unsafe.Pointer(p)).Fop) == int32(TK_FUNCTION) {
if *(*uintptr)(unsafe.Pointer(p + 20)) != 0 {
@@ -119310,7 +119631,7 @@ func _sqlite3ProcessJoin(tls *libc.TLS, pParse uintptr, p uintptr) (r int32) {
if libc.Int32FromUint8((*TSrcItem)(unsafe.Pointer(pRight)).Ffg.Fjointype)&int32(JT_NATURAL) != 0 {
pUsing = uintptr(0)
if int32(*(*uint32)(unsafe.Pointer(pRight + 12 + 4))&0x800>>11) != 0 || *(*uintptr)(unsafe.Pointer(pRight + 40)) != 0 {
- _sqlite3ErrorMsg(tls, pParse, __ccgo_ts+19119, libc.VaList(bp+16, 0))
+ _sqlite3ErrorMsg(tls, pParse, __ccgo_ts+19191, libc.VaList(bp+16, 0))
return int32(1)
}
j = 0
@@ -119360,12 +119681,12 @@ func _sqlite3ProcessJoin(tls *libc.TLS, pParse uintptr, p uintptr) (r int32) {
zName1 = (*(*TIdList_item)(unsafe.Pointer(pList + 4 + uintptr(j)*4))).FzName
iRightCol = _sqlite3ColumnIndex(tls, pRightTab, zName1)
if iRightCol < 0 || _tableAndColumnIndex(tls, pSrc, 0, i, zName1, bp, bp+4, int32(*(*uint32)(unsafe.Pointer(pRight + 12 + 4))&0x2000>>13)) == 0 {
- _sqlite3ErrorMsg(tls, pParse, __ccgo_ts+19169, libc.VaList(bp+16, zName1))
+ _sqlite3ErrorMsg(tls, pParse, __ccgo_ts+19241, libc.VaList(bp+16, zName1))
return int32(1)
}
pE1 = _sqlite3CreateColumnExpr(tls, db, pSrc, *(*int32)(unsafe.Pointer(bp)), *(*int32)(unsafe.Pointer(bp + 4)))
_sqlite3SrcItemColumnUsed(tls, pSrc+8+uintptr(*(*int32)(unsafe.Pointer(bp)))*48, *(*int32)(unsafe.Pointer(bp + 4)))
- if libc.Int32FromUint8((*(*TSrcItem)(unsafe.Pointer(pSrc + 8))).Ffg.Fjointype)&int32(JT_LTORJ) != 0 {
+ if libc.Int32FromUint8((*(*TSrcItem)(unsafe.Pointer(pSrc + 8))).Ffg.Fjointype)&int32(JT_LTORJ) != 0 && (*TParse)(unsafe.Pointer(pParse)).FnErr == 0 {
/* This branch runs if the query contains one or more RIGHT or FULL
** JOINs. If only a single table on the left side of this join
** contains the zName column, then this branch is a no-op.
@@ -119380,9 +119701,10 @@ func _sqlite3ProcessJoin(tls *libc.TLS, pParse uintptr, p uintptr) (r int32) {
** adding a new error so as to not break legacy applications.
*/
pFuncArgs = uintptr(0) /* Arguments to the coalesce() */
+ *(*Tu32)(unsafe.Pointer(pE1 + 4)) |= libc.Uint32FromInt32(libc.Int32FromInt32(EP_CanBeNull))
for _tableAndColumnIndex(tls, pSrc, *(*int32)(unsafe.Pointer(bp))+int32(1), i, zName1, bp, bp+4, int32(*(*uint32)(unsafe.Pointer(pRight + 12 + 4))&0x2000>>13)) != 0 {
if int32(*(*uint32)(unsafe.Pointer(pSrc + 8 + uintptr(*(*int32)(unsafe.Pointer(bp)))*48 + 12 + 4))&0x800>>11) == 0 || _sqlite3IdListIndex(tls, *(*uintptr)(unsafe.Pointer(pSrc + 8 + uintptr(*(*int32)(unsafe.Pointer(bp)))*48 + 40)), zName1) < 0 {
- _sqlite3ErrorMsg(tls, pParse, __ccgo_ts+19233, libc.VaList(bp+16, zName1))
+ _sqlite3ErrorMsg(tls, pParse, __ccgo_ts+19305, libc.VaList(bp+16, zName1))
break
}
pFuncArgs = _sqlite3ExprListAppend(tls, pParse, pFuncArgs, pE1)
@@ -119392,6 +119714,13 @@ func _sqlite3ProcessJoin(tls *libc.TLS, pParse uintptr, p uintptr) (r int32) {
if pFuncArgs != 0 {
pFuncArgs = _sqlite3ExprListAppend(tls, pParse, pFuncArgs, pE1)
pE1 = _sqlite3ExprFunction(tls, pParse, pFuncArgs, uintptr(unsafe.Pointer(&_tkCoalesce)), 0)
+ if pE1 != 0 {
+ (*TExpr)(unsafe.Pointer(pE1)).FaffExpr = int8(SQLITE_AFF_DEFER)
+ }
+ }
+ } else {
+ if libc.Int32FromUint8((*(*TSrcItem)(unsafe.Pointer(pSrc + 8 + uintptr(i+int32(1))*48))).Ffg.Fjointype)&int32(JT_LEFT) != 0 && (*TParse)(unsafe.Pointer(pParse)).FnErr == 0 {
+ *(*Tu32)(unsafe.Pointer(pE1 + 4)) |= libc.Uint32FromInt32(libc.Int32FromInt32(EP_CanBeNull))
}
}
pE2 = _sqlite3CreateColumnExpr(tls, db, pSrc, i+int32(1), iRightCol)
@@ -119426,7 +119755,7 @@ func _sqlite3ProcessJoin(tls *libc.TLS, pParse uintptr, p uintptr) (r int32) {
}
var _tkCoalesce = TToken{
- Fz: __ccgo_ts + 6860,
+ Fz: __ccgo_ts + 6885,
Fn: uint32(8),
}
@@ -119474,7 +119803,7 @@ func _makeSorterRecord(tls *libc.TLS, pParse uintptr, pSort uintptr, pSelect uin
_, _, _, _, _ = nOBSat, regOut, v, v1, v2
nOBSat = (*TSortCtx)(unsafe.Pointer(pSort)).FnOBSat
v = (*TParse)(unsafe.Pointer(pParse)).FpVdbe
- v2 = pParse + 48
+ v2 = pParse + 52
*(*int32)(unsafe.Pointer(v2))++
v1 = *(*int32)(unsafe.Pointer(v2))
regOut = v1
@@ -119519,7 +119848,7 @@ func _pushOntoSorter(tls *libc.TLS, pParse uintptr, pSort uintptr, pSelect uintp
regBase = regData - nPrefixReg
} else {
regBase = (*TParse)(unsafe.Pointer(pParse)).FnMem + int32(1)
- *(*int32)(unsafe.Pointer(pParse + 48)) += nBase
+ *(*int32)(unsafe.Pointer(pParse + 52)) += nBase
}
if (*TSelect)(unsafe.Pointer(pSelect)).FiOffset != 0 {
v1 = (*TSelect)(unsafe.Pointer(pSelect)).FiOffset + int32(1)
@@ -119543,7 +119872,7 @@ func _pushOntoSorter(tls *libc.TLS, pParse uintptr, pSort uintptr, pSelect uintp
if nOBSat > 0 { /* Original KeyInfo on the sorter table */
regRecord = _makeSorterRecord(tls, pParse, pSort, pSelect, regBase, nBase)
regPrevKey = (*TParse)(unsafe.Pointer(pParse)).FnMem + int32(1)
- *(*int32)(unsafe.Pointer(pParse + 48)) += (*TSortCtx)(unsafe.Pointer(pSort)).FnOBSat
+ *(*int32)(unsafe.Pointer(pParse + 52)) += (*TSortCtx)(unsafe.Pointer(pSort)).FnOBSat
nKey = nExpr - (*TSortCtx)(unsafe.Pointer(pSort)).FnOBSat + bSeq
if bSeq != 0 {
addrFirst = _sqlite3VdbeAddOp1(tls, v, int32(OP_IfNot), regBase+nExpr)
@@ -119564,7 +119893,7 @@ func _pushOntoSorter(tls *libc.TLS, pParse uintptr, pSort uintptr, pSelect uintp
addrJmp = _sqlite3VdbeCurrentAddr(tls, v)
_sqlite3VdbeAddOp3(tls, v, int32(OP_Jump), addrJmp+int32(1), 0, addrJmp+int32(1))
(*TSortCtx)(unsafe.Pointer(pSort)).FlabelBkOut = _sqlite3VdbeMakeLabel(tls, pParse)
- v4 = pParse + 48
+ v4 = pParse + 52
*(*int32)(unsafe.Pointer(v4))++
v3 = *(*int32)(unsafe.Pointer(v4))
(*TSortCtx)(unsafe.Pointer(pSort)).FregReturn = v3
@@ -119687,7 +120016,7 @@ func _codeDistinct(tls *libc.TLS, pParse uintptr, eTnctType int32, iTab int32, a
v1 = (*TParse)(unsafe.Pointer(pParse)).FnMem + libc.Int32FromInt32(1)
regPrev = v1
iRet = v1
- *(*int32)(unsafe.Pointer(pParse + 48)) += nResultCol
+ *(*int32)(unsafe.Pointer(pParse + 52)) += nResultCol
iJump = _sqlite3VdbeCurrentAddr(tls, v) + nResultCol
i = 0
for {
@@ -119814,10 +120143,10 @@ func _selectInnerLoop(tls *libc.TLS, pParse uintptr, p uintptr, srcTab int32, pS
if !(libc.Int32FromUint8((*TSortCtx)(unsafe.Pointer(pSort)).FsortFlags)&libc.Int32FromInt32(SORTFLAG_UseSorter) != 0) {
nPrefixReg++
}
- *(*int32)(unsafe.Pointer(pParse + 48)) += nPrefixReg
+ *(*int32)(unsafe.Pointer(pParse + 52)) += nPrefixReg
}
(*TSelectDest)(unsafe.Pointer(pDest)).FiSdst = (*TParse)(unsafe.Pointer(pParse)).FnMem + int32(1)
- *(*int32)(unsafe.Pointer(pParse + 48)) += nResultCol
+ *(*int32)(unsafe.Pointer(pParse + 52)) += nResultCol
} else {
if (*TSelectDest)(unsafe.Pointer(pDest)).FiSdst+nResultCol > (*TParse)(unsafe.Pointer(pParse)).FnMem {
/* This is an error condition that can result, for example, when a SELECT
@@ -119825,7 +120154,7 @@ func _selectInnerLoop(tls *libc.TLS, pParse uintptr, p uintptr, srcTab int32, pS
** there are columns in the table on the left. The error will be caught
** and reported later. But we need to make sure enough memory is allocated
** to avoid other spurious errors in the meantime. */
- *(*int32)(unsafe.Pointer(pParse + 48)) += nResultCol
+ *(*int32)(unsafe.Pointer(pParse + 52)) += nResultCol
}
}
(*TSelectDest)(unsafe.Pointer(pDest)).FnSdst = nResultCol
@@ -120002,7 +120331,7 @@ func _selectInnerLoop(tls *libc.TLS, pParse uintptr, p uintptr, srcTab int32, pS
_sqlite3VdbeAddOp4Int(tls, v, int32(OP_IdxInsert), iParm, r13, regResult, nResultCol)
if (*TSelectDest)(unsafe.Pointer(pDest)).FiSDParm2 != 0 {
_sqlite3VdbeAddOp4Int(tls, v, int32(OP_FilterAdd), (*TSelectDest)(unsafe.Pointer(pDest)).FiSDParm2, 0, regResult, nResultCol)
- _sqlite3VdbeExplain(tls, pParse, uint8(0), __ccgo_ts+19270, 0)
+ _sqlite3VdbeExplain(tls, pParse, uint8(0), __ccgo_ts+19342, 0)
}
_sqlite3ReleaseTempReg(tls, pParse, r13)
}
@@ -120113,8 +120442,8 @@ func _sqlite3KeyInfoAlloc(tls *libc.TLS, db uintptr, N int32, X int32) (r uintpt
var nExtra int32
var p uintptr
_, _ = nExtra, p
- nExtra = libc.Int32FromUint32(libc.Uint32FromInt32(N+X)*(libc.Uint32FromInt64(4)+libc.Uint32FromInt32(1)) - uint32(4))
- p = _sqlite3DbMallocRawNN(tls, db, uint64(uint32(24)+libc.Uint32FromInt32(nExtra)))
+ nExtra = libc.Int32FromUint32(libc.Uint32FromInt32(N+X) * (libc.Uint32FromInt64(4) + libc.Uint32FromInt32(1)))
+ p = _sqlite3DbMallocRawNN(tls, db, uint64(uint32(libc.UintptrFromInt32(0)+20)+libc.Uint32FromInt32(libc.Int32FromInt32(0))*libc.Uint32FromInt64(4)+libc.Uint32FromInt32(nExtra)))
if p != 0 {
(*TKeyInfo)(unsafe.Pointer(p)).FaSortFlags = p + 20 + uintptr(N+X)*4
(*TKeyInfo)(unsafe.Pointer(p)).FnKeyField = libc.Uint16FromInt32(N)
@@ -120122,7 +120451,7 @@ func _sqlite3KeyInfoAlloc(tls *libc.TLS, db uintptr, N int32, X int32) (r uintpt
(*TKeyInfo)(unsafe.Pointer(p)).Fenc = (*Tsqlite3)(unsafe.Pointer(db)).Fenc
(*TKeyInfo)(unsafe.Pointer(p)).Fdb = db
(*TKeyInfo)(unsafe.Pointer(p)).FnRef = uint32(1)
- libc.Xmemset(tls, p+1*24, 0, libc.Uint32FromInt32(nExtra))
+ libc.Xmemset(tls, p+20, 0, libc.Uint32FromInt32(nExtra))
} else {
return _sqlite3OomFault(tls, db)
}
@@ -120207,13 +120536,13 @@ func _sqlite3SelectOpName(tls *libc.TLS, id int32) (r uintptr) {
_ = z
switch id {
case int32(TK_ALL):
- z = __ccgo_ts + 19290
+ z = __ccgo_ts + 19362
case int32(TK_INTERSECT):
- z = __ccgo_ts + 19300
+ z = __ccgo_ts + 19372
case int32(TK_EXCEPT):
- z = __ccgo_ts + 19310
+ z = __ccgo_ts + 19382
default:
- z = __ccgo_ts + 19317
+ z = __ccgo_ts + 19389
break
}
return z
@@ -120234,7 +120563,7 @@ func _sqlite3SelectOpName(tls *libc.TLS, id int32) (r uintptr) {
func _explainTempTable(tls *libc.TLS, pParse uintptr, zUsage uintptr) {
bp := tls.Alloc(16)
defer tls.Free(16)
- _sqlite3VdbeExplain(tls, pParse, uint8(0), __ccgo_ts+19323, libc.VaList(bp+8, zUsage))
+ _sqlite3VdbeExplain(tls, pParse, uint8(0), __ccgo_ts+19395, libc.VaList(bp+8, zUsage))
}
/*
@@ -120271,13 +120600,13 @@ func _generateSortTail(tls *libc.TLS, pParse uintptr, p uintptr, pSort uintptr,
nKey = (*TExprList)(unsafe.Pointer(pOrderBy)).FnExpr - (*TSortCtx)(unsafe.Pointer(pSort)).FnOBSat
if (*TSortCtx)(unsafe.Pointer(pSort)).FnOBSat == 0 || nKey == int32(1) {
if (*TSortCtx)(unsafe.Pointer(pSort)).FnOBSat != 0 {
- v1 = __ccgo_ts + 19346
+ v1 = __ccgo_ts + 19418
} else {
v1 = __ccgo_ts + 1667
}
- _sqlite3VdbeExplain(tls, pParse, uint8(0), __ccgo_ts+19360, libc.VaList(bp+8, v1))
+ _sqlite3VdbeExplain(tls, pParse, uint8(0), __ccgo_ts+19432, libc.VaList(bp+8, v1))
} else {
- _sqlite3VdbeExplain(tls, pParse, uint8(0), __ccgo_ts+19391, libc.VaList(bp+8, nKey))
+ _sqlite3VdbeExplain(tls, pParse, uint8(0), __ccgo_ts+19463, libc.VaList(bp+8, nKey))
}
if (*TSortCtx)(unsafe.Pointer(pSort)).FlabelBkOut != 0 {
_sqlite3VdbeAddOp2(tls, v, int32(OP_Gosub), (*TSortCtx)(unsafe.Pointer(pSort)).FregReturn, (*TSortCtx)(unsafe.Pointer(pSort)).FlabelBkOut)
@@ -120301,11 +120630,11 @@ func _generateSortTail(tls *libc.TLS, pParse uintptr, p uintptr, pSort uintptr,
}
}
if libc.Int32FromUint8((*TSortCtx)(unsafe.Pointer(pSort)).FsortFlags)&int32(SORTFLAG_UseSorter) != 0 {
- v3 = pParse + 48
+ v3 = pParse + 52
*(*int32)(unsafe.Pointer(v3))++
v2 = *(*int32)(unsafe.Pointer(v3))
regSortOut = v2
- v5 = pParse + 44
+ v5 = pParse + 48
v4 = *(*int32)(unsafe.Pointer(v5))
*(*int32)(unsafe.Pointer(v5))++
iSortTab = v4
@@ -120521,7 +120850,7 @@ func _columnTypeImpl(tls *libc.TLS, pNC uintptr, pExpr uintptr, pzOrigDb uintptr
}
if iCol < 0 {
zType = __ccgo_ts + 1141
- *(*uintptr)(unsafe.Pointer(bp + 8)) = __ccgo_ts + 16850
+ *(*uintptr)(unsafe.Pointer(bp + 8)) = __ccgo_ts + 16922
} else {
*(*uintptr)(unsafe.Pointer(bp + 8)) = (*(*TColumn)(unsafe.Pointer((*TTable)(unsafe.Pointer(pTab)).FaCol + uintptr(iCol)*12))).FzCnName
zType = _sqlite3ColumnType(tls, (*TTable)(unsafe.Pointer(pTab)).FaCol+uintptr(iCol)*12, uintptr(0))
@@ -120634,7 +120963,7 @@ func _sqlite3GenerateColumnNames(tls *libc.TLS, pParse uintptr, pSelect uintptr)
_, _, _, _, _, _, _, _, _, _, _, _, _, _, _ = db, fullName, i, iCol, p, pEList, pTab, pTabList, srcName, v, z, zCol, zName, zName1, v2
v = (*TParse)(unsafe.Pointer(pParse)).FpVdbe
db = (*TParse)(unsafe.Pointer(pParse)).Fdb /* COLUMN or TABLE.COLUMN if no AS clause and is direct */
- if (*TParse)(unsafe.Pointer(pParse)).FcolNamesSet != 0 {
+ if int32(Tbft(*(*uint8)(unsafe.Pointer(pParse + 32))&0x1>>0)) != 0 {
return
}
/* Column names are determined by the left-most term of a compound select */
@@ -120643,7 +120972,7 @@ func _sqlite3GenerateColumnNames(tls *libc.TLS, pParse uintptr, pSelect uintptr)
}
pTabList = (*TSelect)(unsafe.Pointer(pSelect)).FpSrc
pEList = (*TSelect)(unsafe.Pointer(pSelect)).FpEList
- (*TParse)(unsafe.Pointer(pParse)).FcolNamesSet = uint8(1)
+ libc.SetBitFieldPtr8Uint32(pParse+32, libc.Uint32FromInt32(1), 0, 0x1)
fullName = libc.BoolInt32((*Tsqlite3)(unsafe.Pointer(db)).Fflags&uint64(SQLITE_FullColNames) != uint64(0))
srcName = libc.BoolInt32((*Tsqlite3)(unsafe.Pointer(db)).Fflags&uint64(SQLITE_ShortColNames) != uint64(0) || fullName != 0)
_sqlite3VdbeSetNumCols(tls, v, (*TExprList)(unsafe.Pointer(pEList)).FnExpr)
@@ -120667,13 +120996,13 @@ func _sqlite3GenerateColumnNames(tls *libc.TLS, pParse uintptr, pSelect uintptr)
iCol = int32((*TTable)(unsafe.Pointer(pTab)).FiPKey)
}
if iCol < 0 {
- zCol = __ccgo_ts + 16850
+ zCol = __ccgo_ts + 16922
} else {
zCol = (*(*TColumn)(unsafe.Pointer((*TTable)(unsafe.Pointer(pTab)).FaCol + uintptr(iCol)*12))).FzCnName
}
if fullName != 0 {
zName1 = uintptr(0)
- zName1 = _sqlite3MPrintf(tls, db, __ccgo_ts+12572, libc.VaList(bp+8, (*TTable)(unsafe.Pointer(pTab)).FzName, zCol))
+ zName1 = _sqlite3MPrintf(tls, db, __ccgo_ts+12597, libc.VaList(bp+8, (*TTable)(unsafe.Pointer(pTab)).FzName, zCol))
_sqlite3VdbeSetColName(tls, v, i, COLNAME_NAME, zName1, __ccgo_fp(_sqlite3OomClear))
} else {
_sqlite3VdbeSetColName(tls, v, i, COLNAME_NAME, zCol, uintptr(-libc.Int32FromInt32(1)))
@@ -120681,7 +121010,7 @@ func _sqlite3GenerateColumnNames(tls *libc.TLS, pParse uintptr, pSelect uintptr)
} else {
z = (*(*TExprList_item)(unsafe.Pointer(pEList + 8 + uintptr(i)*20))).FzEName
if z == uintptr(0) {
- v2 = _sqlite3MPrintf(tls, db, __ccgo_ts+19437, libc.VaList(bp+8, i+int32(1)))
+ v2 = _sqlite3MPrintf(tls, db, __ccgo_ts+19509, libc.VaList(bp+8, i+int32(1)))
} else {
v2 = _sqlite3DbStrDup(tls, db, z)
}
@@ -120773,7 +121102,7 @@ func _sqlite3ColumnsFromExprList(tls *libc.TLS, pParse uintptr, pEList uintptr,
if iCol >= 0 {
v3 = (*(*TColumn)(unsafe.Pointer((*TTable)(unsafe.Pointer(pTab)).FaCol + uintptr(iCol)*12))).FzCnName
} else {
- v3 = __ccgo_ts + 16850
+ v3 = __ccgo_ts + 16922
}
zName = v3
} else {
@@ -120788,7 +121117,7 @@ func _sqlite3ColumnsFromExprList(tls *libc.TLS, pParse uintptr, pEList uintptr,
if zName != 0 && !(_sqlite3IsTrueOrFalse(tls, zName) != 0) {
zName = _sqlite3DbStrDup(tls, db, zName)
} else {
- zName = _sqlite3MPrintf(tls, db, __ccgo_ts+19437, libc.VaList(bp+32, i+int32(1)))
+ zName = _sqlite3MPrintf(tls, db, __ccgo_ts+19509, libc.VaList(bp+32, i+int32(1)))
}
/* Make sure the column name is unique. If the name is not unique,
** append an integer to the name so that it becomes unique.
@@ -120824,7 +121153,7 @@ func _sqlite3ColumnsFromExprList(tls *libc.TLS, pParse uintptr, pEList uintptr,
}
*(*Tu32)(unsafe.Pointer(bp))++
v8 = *(*Tu32)(unsafe.Pointer(bp))
- zName = _sqlite3MPrintf(tls, db, __ccgo_ts+19446, libc.VaList(bp+32, nName, zName, v8))
+ zName = _sqlite3MPrintf(tls, db, __ccgo_ts+19518, libc.VaList(bp+32, nName, zName, v8))
_sqlite3ProgressCheck(tls, pParse)
if *(*Tu32)(unsafe.Pointer(bp)) > uint32(3) {
Xsqlite3_randomness(tls, int32(4), bp)
@@ -120943,7 +121272,7 @@ func _sqlite3SubqueryColumnTypes(tls *libc.TLS, pParse uintptr, pTab uintptr, pS
zType = _columnTypeImpl(tls, bp, p, uintptr(0), uintptr(0), uintptr(0))
if zType == uintptr(0) || int32((*TColumn)(unsafe.Pointer(pCol)).Faffinity) != int32(_sqlite3AffinityType(tls, zType, uintptr(0))) {
if int32((*TColumn)(unsafe.Pointer(pCol)).Faffinity) == int32(SQLITE_AFF_NUMERIC) || int32((*TColumn)(unsafe.Pointer(pCol)).Faffinity) == int32(SQLITE_AFF_FLEXNUM) {
- zType = __ccgo_ts + 19454
+ zType = __ccgo_ts + 19526
} else {
zType = uintptr(0)
j = int32(1)
@@ -121009,7 +121338,7 @@ func _sqlite3ResultSetOfSelect(tls *libc.TLS, pParse uintptr, pSelect uintptr, a
for (*TSelect)(unsafe.Pointer(pSelect)).FpPrior != 0 {
pSelect = (*TSelect)(unsafe.Pointer(pSelect)).FpPrior
}
- pTab = _sqlite3DbMallocZero(tls, db, uint64(64))
+ pTab = _sqlite3DbMallocZero(tls, db, uint64(80))
if pTab == uintptr(0) {
return uintptr(0)
}
@@ -121037,7 +121366,7 @@ func _sqlite3GetVdbe(tls *libc.TLS, pParse uintptr) (r uintptr) {
return (*TParse)(unsafe.Pointer(pParse)).FpVdbe
}
if (*TParse)(unsafe.Pointer(pParse)).FpToplevel == uintptr(0) && (*Tsqlite3)(unsafe.Pointer((*TParse)(unsafe.Pointer(pParse)).Fdb)).FdbOptFlags&libc.Uint32FromInt32(libc.Int32FromInt32(SQLITE_FactorOutConst)) == uint32(0) {
- (*TParse)(unsafe.Pointer(pParse)).FokConstFactor = uint8(1)
+ libc.SetBitFieldPtr8Uint32(pParse+32, libc.Uint32FromInt32(1), 2, 0x4)
}
return _sqlite3VdbeCreate(tls, pParse)
}
@@ -121087,7 +121416,7 @@ func _computeLimitRegisters(tls *libc.TLS, pParse uintptr, p uintptr, iBreak int
** no rows.
*/
if pLimit != 0 {
- v3 = pParse + 48
+ v3 = pParse + 52
*(*int32)(unsafe.Pointer(v3))++
v2 = *(*int32)(unsafe.Pointer(v3))
v1 = v2
@@ -121110,7 +121439,7 @@ func _computeLimitRegisters(tls *libc.TLS, pParse uintptr, p uintptr, iBreak int
_sqlite3VdbeAddOp2(tls, v, int32(OP_IfNot), iLimit, iBreak)
}
if (*TExpr)(unsafe.Pointer(pLimit)).FpRight != 0 {
- v6 = pParse + 48
+ v6 = pParse + 52
*(*int32)(unsafe.Pointer(v6))++
v5 = *(*int32)(unsafe.Pointer(v6))
v4 = v5
@@ -121258,7 +121587,7 @@ func _generateWithRecursiveQuery(tls *libc.TLS, pParse uintptr, p uintptr, pDest
iDistinct = 0 /* To ensure unique results if UNION */
eDest = int32(SRT_Fifo) /* Registers used by LIMIT and OFFSET */
if (*TSelect)(unsafe.Pointer(p)).FpWin != 0 {
- _sqlite3ErrorMsg(tls, pParse, __ccgo_ts+19458, 0)
+ _sqlite3ErrorMsg(tls, pParse, __ccgo_ts+19530, 0)
return
}
/* Obtain authorization to do a recursive query */
@@ -121295,7 +121624,7 @@ func _generateWithRecursiveQuery(tls *libc.TLS, pParse uintptr, p uintptr, pDest
/* Allocate cursors numbers for Queue and Distinct. The cursor number for
** the Distinct table must be exactly one greater than Queue in order
** for the SRT_DistFifo and SRT_DistQueue destinations to work. */
- v4 = pParse + 44
+ v4 = pParse + 48
v3 = *(*int32)(unsafe.Pointer(v4))
*(*int32)(unsafe.Pointer(v4))++
iQueue = v3
@@ -121306,7 +121635,7 @@ func _generateWithRecursiveQuery(tls *libc.TLS, pParse uintptr, p uintptr, pDest
v5 = int32(SRT_DistFifo)
}
eDest = v5
- v7 = pParse + 44
+ v7 = pParse + 48
v6 = *(*int32)(unsafe.Pointer(v7))
*(*int32)(unsafe.Pointer(v7))++
iDistinct = v6
@@ -121320,7 +121649,7 @@ func _generateWithRecursiveQuery(tls *libc.TLS, pParse uintptr, p uintptr, pDest
}
_sqlite3SelectDestInit(tls, bp, eDest, iQueue)
/* Allocate cursors for Current, Queue, and Distinct. */
- v10 = pParse + 48
+ v10 = pParse + 52
*(*int32)(unsafe.Pointer(v10))++
v9 = *(*int32)(unsafe.Pointer(v10))
regCurrent = v9
@@ -121351,7 +121680,7 @@ func _generateWithRecursiveQuery(tls *libc.TLS, pParse uintptr, p uintptr, pDest
break
}
if (*TSelect)(unsafe.Pointer(pFirstRec)).FselFlags&uint32(SF_Aggregate) != 0 {
- _sqlite3ErrorMsg(tls, pParse, __ccgo_ts+19507, 0)
+ _sqlite3ErrorMsg(tls, pParse, __ccgo_ts+19579, 0)
goto end_of_recursive_query
}
(*TSelect)(unsafe.Pointer(pFirstRec)).Fop = uint8(TK_ALL)
@@ -121366,7 +121695,7 @@ func _generateWithRecursiveQuery(tls *libc.TLS, pParse uintptr, p uintptr, pDest
/* Store the results of the setup-query in Queue. */
pSetup = (*TSelect)(unsafe.Pointer(pFirstRec)).FpPrior
(*TSelect)(unsafe.Pointer(pSetup)).FpNext = uintptr(0)
- _sqlite3VdbeExplain(tls, pParse, uint8(1), __ccgo_ts+19549, 0)
+ _sqlite3VdbeExplain(tls, pParse, uint8(1), __ccgo_ts+19621, 0)
rc = _sqlite3Select(tls, pParse, pSetup, bp)
(*TSelect)(unsafe.Pointer(pSetup)).FpNext = p
if rc != 0 {
@@ -121394,7 +121723,7 @@ func _generateWithRecursiveQuery(tls *libc.TLS, pParse uintptr, p uintptr, pDest
** the value for the recursive-table. Store the results in the Queue.
*/
(*TSelect)(unsafe.Pointer(pFirstRec)).FpPrior = uintptr(0)
- _sqlite3VdbeExplain(tls, pParse, uint8(1), __ccgo_ts+19555, 0)
+ _sqlite3VdbeExplain(tls, pParse, uint8(1), __ccgo_ts+19627, 0)
_sqlite3Select(tls, pParse, p, bp)
(*TSelect)(unsafe.Pointer(pFirstRec)).FpPrior = pSetup
/* Keep running the loop until the Queue is empty */
@@ -121449,9 +121778,9 @@ func _multiSelectValues(tls *libc.TLS, pParse uintptr, p uintptr, pDest uintptr)
if nRow == int32(1) {
v1 = __ccgo_ts + 1667
} else {
- v1 = __ccgo_ts + 19570
+ v1 = __ccgo_ts + 19642
}
- _sqlite3VdbeExplain(tls, pParse, uint8(0), __ccgo_ts+19572, libc.VaList(bp+8, nRow, v1))
+ _sqlite3VdbeExplain(tls, pParse, uint8(0), __ccgo_ts+19644, libc.VaList(bp+8, nRow, v1))
for p != 0 {
_selectInnerLoop(tls, pParse, p, -int32(1), uintptr(0), uintptr(0), pDest, int32(1), int32(1))
if !(bShowAll != 0) {
@@ -121559,8 +121888,8 @@ func _multiSelect(tls *libc.TLS, pParse uintptr, p uintptr, pDest uintptr) (r in
return _multiSelectOrderBy(tls, pParse, p, pDest)
} else {
if (*TSelect)(unsafe.Pointer(pPrior)).FpPrior == uintptr(0) {
- _sqlite3VdbeExplain(tls, pParse, uint8(1), __ccgo_ts+19595, 0)
- _sqlite3VdbeExplain(tls, pParse, uint8(1), __ccgo_ts+19610, 0)
+ _sqlite3VdbeExplain(tls, pParse, uint8(1), __ccgo_ts+19667, 0)
+ _sqlite3VdbeExplain(tls, pParse, uint8(1), __ccgo_ts+19682, 0)
}
/* Generate code for the left and right SELECT statements.
*/
@@ -121585,7 +121914,7 @@ func _multiSelect(tls *libc.TLS, pParse uintptr, p uintptr, pDest uintptr) (r in
_sqlite3VdbeAddOp3(tls, v, int32(OP_OffsetLimit), (*TSelect)(unsafe.Pointer(p)).FiLimit, (*TSelect)(unsafe.Pointer(p)).FiOffset+int32(1), (*TSelect)(unsafe.Pointer(p)).FiOffset)
}
}
- _sqlite3VdbeExplain(tls, pParse, uint8(1), __ccgo_ts+19290, 0)
+ _sqlite3VdbeExplain(tls, pParse, uint8(1), __ccgo_ts+19362, 0)
rc = _sqlite3Select(tls, pParse, p, bp)
pDelete = (*TSelect)(unsafe.Pointer(p)).FpPrior
(*TSelect)(unsafe.Pointer(p)).FpPrior = pPrior
@@ -121611,7 +121940,7 @@ func _multiSelect(tls *libc.TLS, pParse uintptr, p uintptr, pDest uintptr) (r in
/* We will need to create our own temporary table to hold the
** intermediate results.
*/
- v2 = pParse + 44
+ v2 = pParse + 48
v1 = *(*int32)(unsafe.Pointer(v2))
*(*int32)(unsafe.Pointer(v2))++
unionTab = v1
@@ -121637,7 +121966,7 @@ func _multiSelect(tls *libc.TLS, pParse uintptr, p uintptr, pDest uintptr) (r in
pLimit = (*TSelect)(unsafe.Pointer(p)).FpLimit
(*TSelect)(unsafe.Pointer(p)).FpLimit = uintptr(0)
(*(*TSelectDest)(unsafe.Pointer(bp + 32))).FeDest = op
- _sqlite3VdbeExplain(tls, pParse, uint8(1), __ccgo_ts+19629, libc.VaList(bp+96, _sqlite3SelectOpName(tls, libc.Int32FromUint8((*TSelect)(unsafe.Pointer(p)).Fop))))
+ _sqlite3VdbeExplain(tls, pParse, uint8(1), __ccgo_ts+19701, libc.VaList(bp+96, _sqlite3SelectOpName(tls, libc.Int32FromUint8((*TSelect)(unsafe.Pointer(p)).Fop))))
rc = _sqlite3Select(tls, pParse, p, bp+32)
pDelete = (*TSelect)(unsafe.Pointer(p)).FpPrior
(*TSelect)(unsafe.Pointer(p)).FpPrior = pPrior
@@ -121669,11 +121998,11 @@ func _multiSelect(tls *libc.TLS, pParse uintptr, p uintptr, pDest uintptr) (r in
** two temporary tables. Hence it has its own case. Begin
** by allocating the tables we will need.
*/
- v4 = pParse + 44
+ v4 = pParse + 48
v3 = *(*int32)(unsafe.Pointer(v4))
*(*int32)(unsafe.Pointer(v4))++
tab1 = v3
- v6 = pParse + 44
+ v6 = pParse + 48
v5 = *(*int32)(unsafe.Pointer(v6))
*(*int32)(unsafe.Pointer(v6))++
tab2 = v5
@@ -121695,7 +122024,7 @@ func _multiSelect(tls *libc.TLS, pParse uintptr, p uintptr, pDest uintptr) (r in
pLimit1 = (*TSelect)(unsafe.Pointer(p)).FpLimit
(*TSelect)(unsafe.Pointer(p)).FpLimit = uintptr(0)
(*(*TSelectDest)(unsafe.Pointer(bp + 60))).FiSDParm = tab2
- _sqlite3VdbeExplain(tls, pParse, uint8(1), __ccgo_ts+19629, libc.VaList(bp+96, _sqlite3SelectOpName(tls, libc.Int32FromUint8((*TSelect)(unsafe.Pointer(p)).Fop))))
+ _sqlite3VdbeExplain(tls, pParse, uint8(1), __ccgo_ts+19701, libc.VaList(bp+96, _sqlite3SelectOpName(tls, libc.Int32FromUint8((*TSelect)(unsafe.Pointer(p)).Fop))))
rc = _sqlite3Select(tls, pParse, p, bp+60)
pDelete = (*TSelect)(unsafe.Pointer(p)).FpPrior
(*TSelect)(unsafe.Pointer(p)).FpPrior = pPrior
@@ -121819,9 +122148,9 @@ func _sqlite3SelectWrongNumTermsError(tls *libc.TLS, pParse uintptr, p uintptr)
bp := tls.Alloc(16)
defer tls.Free(16)
if (*TSelect)(unsafe.Pointer(p)).FselFlags&uint32(SF_Values) != 0 {
- _sqlite3ErrorMsg(tls, pParse, __ccgo_ts+19650, 0)
+ _sqlite3ErrorMsg(tls, pParse, __ccgo_ts+19722, 0)
} else {
- _sqlite3ErrorMsg(tls, pParse, __ccgo_ts+19696, libc.VaList(bp+8, _sqlite3SelectOpName(tls, libc.Int32FromUint8((*TSelect)(unsafe.Pointer(p)).Fop))))
+ _sqlite3ErrorMsg(tls, pParse, __ccgo_ts+19768, libc.VaList(bp+8, _sqlite3SelectOpName(tls, libc.Int32FromUint8((*TSelect)(unsafe.Pointer(p)).Fop))))
}
}
@@ -121892,7 +122221,7 @@ func _generateOutputSubroutine(tls *libc.TLS, pParse uintptr, p uintptr, pIn uin
_sqlite3VdbeAddOp4Int(tls, v, int32(OP_IdxInsert), (*TSelectDest)(unsafe.Pointer(pDest)).FiSDParm, r11, (*TSelectDest)(unsafe.Pointer(pIn)).FiSdst, (*TSelectDest)(unsafe.Pointer(pIn)).FnSdst)
if (*TSelectDest)(unsafe.Pointer(pDest)).FiSDParm2 > 0 {
_sqlite3VdbeAddOp4Int(tls, v, int32(OP_FilterAdd), (*TSelectDest)(unsafe.Pointer(pDest)).FiSDParm2, 0, (*TSelectDest)(unsafe.Pointer(pIn)).FiSdst, (*TSelectDest)(unsafe.Pointer(pIn)).FnSdst)
- _sqlite3VdbeExplain(tls, pParse, uint8(0), __ccgo_ts+19270, 0)
+ _sqlite3VdbeExplain(tls, pParse, uint8(0), __ccgo_ts+19342, 0)
}
_sqlite3ReleaseTempReg(tls, pParse, r11)
break
@@ -122140,7 +122469,7 @@ func _multiSelectOrderBy(tls *libc.TLS, pParse uintptr, p uintptr, pDest uintptr
} else {
nExpr = (*TExprList)(unsafe.Pointer((*TSelect)(unsafe.Pointer(p)).FpEList)).FnExpr
regPrev = (*TParse)(unsafe.Pointer(pParse)).FnMem + int32(1)
- *(*int32)(unsafe.Pointer(pParse + 48)) += nExpr + int32(1)
+ *(*int32)(unsafe.Pointer(pParse + 52)) += nExpr + int32(1)
_sqlite3VdbeAddOp2(tls, v, int32(OP_Integer), 0, regPrev)
pKeyDup = _sqlite3KeyInfoAlloc(tls, db, nExpr, int32(1))
if pKeyDup != 0 {
@@ -122194,16 +122523,16 @@ func _multiSelectOrderBy(tls *libc.TLS, pParse uintptr, p uintptr, pDest uintptr
(*TSelect)(unsafe.Pointer(pSplit)).FpPrior = uintptr(0)
(*TSelect)(unsafe.Pointer(pPrior)).FpNext = uintptr(0)
(*TSelect)(unsafe.Pointer(pPrior)).FpOrderBy = _sqlite3ExprListDup(tls, (*TParse)(unsafe.Pointer(pParse)).Fdb, pOrderBy, 0)
- _sqlite3ResolveOrderGroupBy(tls, pParse, p, (*TSelect)(unsafe.Pointer(p)).FpOrderBy, __ccgo_ts+7558)
- _sqlite3ResolveOrderGroupBy(tls, pParse, pPrior, (*TSelect)(unsafe.Pointer(pPrior)).FpOrderBy, __ccgo_ts+7558)
+ _sqlite3ResolveOrderGroupBy(tls, pParse, p, (*TSelect)(unsafe.Pointer(p)).FpOrderBy, __ccgo_ts+7583)
+ _sqlite3ResolveOrderGroupBy(tls, pParse, pPrior, (*TSelect)(unsafe.Pointer(pPrior)).FpOrderBy, __ccgo_ts+7583)
/* Compute the limit registers */
_computeLimitRegisters(tls, pParse, p, labelEnd)
if (*TSelect)(unsafe.Pointer(p)).FiLimit != 0 && op == int32(TK_ALL) {
- v10 = pParse + 48
+ v10 = pParse + 52
*(*int32)(unsafe.Pointer(v10))++
v9 = *(*int32)(unsafe.Pointer(v10))
regLimitA = v9
- v12 = pParse + 48
+ v12 = pParse + 52
*(*int32)(unsafe.Pointer(v12))++
v11 = *(*int32)(unsafe.Pointer(v12))
regLimitB = v11
@@ -122221,32 +122550,32 @@ func _multiSelectOrderBy(tls *libc.TLS, pParse uintptr, p uintptr, pDest uintptr
}
_sqlite3ExprDelete(tls, db, (*TSelect)(unsafe.Pointer(p)).FpLimit)
(*TSelect)(unsafe.Pointer(p)).FpLimit = uintptr(0)
- v16 = pParse + 48
+ v16 = pParse + 52
*(*int32)(unsafe.Pointer(v16))++
v15 = *(*int32)(unsafe.Pointer(v16))
regAddrA = v15
- v18 = pParse + 48
+ v18 = pParse + 52
*(*int32)(unsafe.Pointer(v18))++
v17 = *(*int32)(unsafe.Pointer(v18))
regAddrB = v17
- v20 = pParse + 48
+ v20 = pParse + 52
*(*int32)(unsafe.Pointer(v20))++
v19 = *(*int32)(unsafe.Pointer(v20))
regOutA = v19
- v22 = pParse + 48
+ v22 = pParse + 52
*(*int32)(unsafe.Pointer(v22))++
v21 = *(*int32)(unsafe.Pointer(v22))
regOutB = v21
_sqlite3SelectDestInit(tls, bp, int32(SRT_Coroutine), regAddrA)
_sqlite3SelectDestInit(tls, bp+28, int32(SRT_Coroutine), regAddrB)
- _sqlite3VdbeExplain(tls, pParse, uint8(1), __ccgo_ts+19778, libc.VaList(bp+64, _sqlite3SelectOpName(tls, libc.Int32FromUint8((*TSelect)(unsafe.Pointer(p)).Fop))))
+ _sqlite3VdbeExplain(tls, pParse, uint8(1), __ccgo_ts+19850, libc.VaList(bp+64, _sqlite3SelectOpName(tls, libc.Int32FromUint8((*TSelect)(unsafe.Pointer(p)).Fop))))
/* Generate a coroutine to evaluate the SELECT statement to the
** left of the compound operator - the "A" select.
*/
addrSelectA = _sqlite3VdbeCurrentAddr(tls, v) + int32(1)
addr1 = _sqlite3VdbeAddOp3(tls, v, int32(OP_InitCoroutine), regAddrA, 0, addrSelectA)
(*TSelect)(unsafe.Pointer(pPrior)).FiLimit = regLimitA
- _sqlite3VdbeExplain(tls, pParse, uint8(1), __ccgo_ts+19789, 0)
+ _sqlite3VdbeExplain(tls, pParse, uint8(1), __ccgo_ts+19861, 0)
_sqlite3Select(tls, pParse, pPrior, bp)
_sqlite3VdbeEndCoroutine(tls, v, regAddrA)
_sqlite3VdbeJumpHere(tls, v, addr1)
@@ -122259,7 +122588,7 @@ func _multiSelectOrderBy(tls *libc.TLS, pParse uintptr, p uintptr, pDest uintptr
savedOffset = (*TSelect)(unsafe.Pointer(p)).FiOffset
(*TSelect)(unsafe.Pointer(p)).FiLimit = regLimitB
(*TSelect)(unsafe.Pointer(p)).FiOffset = 0
- _sqlite3VdbeExplain(tls, pParse, uint8(1), __ccgo_ts+19794, 0)
+ _sqlite3VdbeExplain(tls, pParse, uint8(1), __ccgo_ts+19866, 0)
_sqlite3Select(tls, pParse, p, bp+28)
(*TSelect)(unsafe.Pointer(p)).FiLimit = savedLimit
(*TSelect)(unsafe.Pointer(p)).FiOffset = savedOffset
@@ -122469,11 +122798,11 @@ func _substExpr(tls *libc.TLS, pSubst uintptr, pExpr uintptr) (r uintptr) {
if pColl != 0 {
v1 = (*TCollSeq)(unsafe.Pointer(pColl)).FzName
} else {
- v1 = __ccgo_ts + 5155
+ v1 = __ccgo_ts + 5181
}
pNew = _sqlite3ExprAddCollateString(tls, (*TSubstContext)(unsafe.Pointer(pSubst)).FpParse, pNew, v1)
}
- *(*Tu32)(unsafe.Pointer(pNew + 4)) &= libc.Uint32FromInt32(^libc.Int32FromInt32(EP_Collate))
+ *(*Tu32)(unsafe.Pointer(pNew + 4)) &= ^libc.Uint32FromInt32(libc.Int32FromInt32(EP_Collate))
if (*TExpr)(unsafe.Pointer(pExpr)).Fflags&libc.Uint32FromInt32(libc.Int32FromInt32(EP_OuterON)|libc.Int32FromInt32(EP_InnerON)) != uint32(0) {
_sqlite3SetJoinExpr(tls, pNew, *(*int32)(unsafe.Pointer(pExpr + 36)), (*TExpr)(unsafe.Pointer(pExpr)).Fflags&libc.Uint32FromInt32(libc.Int32FromInt32(EP_OuterON)|libc.Int32FromInt32(EP_InnerON)))
}
@@ -122634,7 +122963,7 @@ func _srclistRenumberCursors(tls *libc.TLS, pParse uintptr, aCsrMap uintptr, pSr
}
if i != iExcept {
if !(int32(*(*uint32)(unsafe.Pointer(pItem + 12 + 4))&0x80>>7) != 0) || *(*int32)(unsafe.Pointer(aCsrMap + uintptr((*TSrcItem)(unsafe.Pointer(pItem)).FiCursor+int32(1))*4)) == 0 {
- v3 = pParse + 44
+ v3 = pParse + 48
v2 = *(*int32)(unsafe.Pointer(v3))
*(*int32)(unsafe.Pointer(v3))++
*(*int32)(unsafe.Pointer(aCsrMap + uintptr((*TSrcItem)(unsafe.Pointer(pItem)).FiCursor+int32(1))*4)) = v2
@@ -122824,9 +123153,9 @@ func _compoundHasDifferentAffinities(tls *libc.TLS, p uintptr) (r int32) {
// ** from 2015-02-09.)
// **
// ** (3) If the subquery is the right operand of a LEFT JOIN then
-// ** (3a) the subquery may not be a join and
-// ** (3b) the FROM clause of the subquery may not contain a virtual
-// ** table and
+// ** (3a) the subquery may not be a join
+// ** (**) Was (3b): "the FROM clause of the subquery may not contain
+// ** a virtual table"
// ** (**) Was: "The outer query may not have a GROUP BY." This case
// ** is now managed correctly
// ** (3d) the outer query may not be DISTINCT.
@@ -123038,7 +123367,7 @@ func _flattenSubquery(tls *libc.TLS, pParse uintptr, p uintptr, iFrom int32, isA
** See also tickets #306, #350, and #3300.
*/
if libc.Int32FromUint8((*TSrcItem)(unsafe.Pointer(pSubitem)).Ffg.Fjointype)&(libc.Int32FromInt32(JT_OUTER)|libc.Int32FromInt32(JT_LTORJ)) != 0 {
- if (*TSrcList)(unsafe.Pointer(pSubSrc)).FnSrc > int32(1) || libc.Int32FromUint8((*TTable)(unsafe.Pointer((*(*TSrcItem)(unsafe.Pointer(pSubSrc + 8))).FpSTab)).FeTabType) == int32(TABTYP_VTAB) || (*TSelect)(unsafe.Pointer(p)).FselFlags&uint32(SF_Distinct) != uint32(0) || libc.Int32FromUint8((*TSrcItem)(unsafe.Pointer(pSubitem)).Ffg.Fjointype)&int32(JT_RIGHT) != 0 {
+ if (*TSrcList)(unsafe.Pointer(pSubSrc)).FnSrc > int32(1) || (*TSelect)(unsafe.Pointer(p)).FselFlags&uint32(SF_Distinct) != uint32(0) || libc.Int32FromUint8((*TSrcItem)(unsafe.Pointer(pSubitem)).Ffg.Fjointype)&int32(JT_RIGHT) != 0 {
return 0
}
isOuterJoin = int32(1)
@@ -123185,7 +123514,7 @@ func _flattenSubquery(tls *libc.TLS, pParse uintptr, p uintptr, iFrom int32, isA
if pNew == uintptr(0) {
(*TSelect)(unsafe.Pointer(p)).FpPrior = pPrior
} else {
- v5 = pParse + 112
+ v5 = pParse + 100
*(*int32)(unsafe.Pointer(v5))++
v4 = *(*int32)(unsafe.Pointer(v5))
(*TSelect)(unsafe.Pointer(pNew)).FselId = libc.Uint32FromInt32(v4)
@@ -123475,7 +123804,7 @@ func _constInsert(tls *libc.TLS, pConst uintptr, pColumn uintptr, pValue uintptr
;
i++
}
- if int32(_sqlite3ExprAffinity(tls, pColumn)) == int32(SQLITE_AFF_BLOB) {
+ if int32(_sqlite3ExprAffinity(tls, pColumn)) <= int32(SQLITE_AFF_BLOB) {
(*TWhereConst)(unsafe.Pointer(pConst)).FbHasAffBlob = int32(1)
}
(*TWhereConst)(unsafe.Pointer(pConst)).FnConst++
@@ -123544,7 +123873,7 @@ func _propagateConstantExprRewriteOne(tls *libc.TLS, pConst uintptr, pExpr uintp
if libc.Int32FromUint8((*TExpr)(unsafe.Pointer(pExpr)).Fop) != int32(TK_COLUMN) {
return WRC_Continue
}
- if (*TExpr)(unsafe.Pointer(pExpr)).Fflags&(uint32(EP_FixedCol)|(*TWhereConst)(unsafe.Pointer(pConst)).FmExcludeOn) != uint32(0) {
+ if (*TExpr)(unsafe.Pointer(pExpr)).Fflags&(libc.Uint32FromInt32(EP_FixedCol)|(*TWhereConst)(unsafe.Pointer(pConst)).FmExcludeOn) != uint32(0) {
return WRC_Continue
}
i = 0
@@ -123562,12 +123891,12 @@ func _propagateConstantExprRewriteOne(tls *libc.TLS, pConst uintptr, pExpr uintp
if int32((*TExpr)(unsafe.Pointer(pColumn)).FiColumn) != int32((*TExpr)(unsafe.Pointer(pExpr)).FiColumn) {
goto _1
}
- if bIgnoreAffBlob != 0 && int32(_sqlite3ExprAffinity(tls, pColumn)) == int32(SQLITE_AFF_BLOB) {
+ if bIgnoreAffBlob != 0 && int32(_sqlite3ExprAffinity(tls, pColumn)) <= int32(SQLITE_AFF_BLOB) {
break
}
/* A match is found. Add the EP_FixedCol property */
(*TWhereConst)(unsafe.Pointer(pConst)).FnChng++
- *(*Tu32)(unsafe.Pointer(pExpr + 4)) &= libc.Uint32FromInt32(^libc.Int32FromInt32(EP_Leaf))
+ *(*Tu32)(unsafe.Pointer(pExpr + 4)) &= ^libc.Uint32FromInt32(libc.Int32FromInt32(EP_Leaf))
*(*Tu32)(unsafe.Pointer(pExpr + 4)) |= libc.Uint32FromInt32(libc.Int32FromInt32(EP_FixedCol))
(*TExpr)(unsafe.Pointer(pExpr)).FpLeft = _sqlite3ExprDup(tls, (*TParse)(unsafe.Pointer((*TWhereConst)(unsafe.Pointer(pConst)).FpParse)).Fdb, *(*uintptr)(unsafe.Pointer((*TWhereConst)(unsafe.Pointer(pConst)).FapExpr + uintptr(i*int32(2)+int32(1))*4)), 0)
if (*Tsqlite3)(unsafe.Pointer((*TParse)(unsafe.Pointer((*TWhereConst)(unsafe.Pointer(pConst)).FpParse)).Fdb)).FmallocFailed != 0 {
@@ -124049,7 +124378,7 @@ func _disableUnusedSubqueryResultColumns(tls *libc.TLS, pItem uintptr) (r int32)
goto _6
}
(*TExpr)(unsafe.Pointer(pY)).Fop = uint8(TK_NULL)
- *(*Tu32)(unsafe.Pointer(pY + 4)) &= libc.Uint32FromInt32(^(libc.Int32FromInt32(EP_Skip) | libc.Int32FromInt32(EP_Unlikely)))
+ *(*Tu32)(unsafe.Pointer(pY + 4)) &= ^libc.Uint32FromInt32(libc.Int32FromInt32(EP_Skip) | libc.Int32FromInt32(EP_Unlikely))
*(*Tu32)(unsafe.Pointer(pX + 4)) |= uint32(SF_PushDown)
nChng++
goto _6
@@ -124095,13 +124424,13 @@ func _minMaxQuery(tls *libc.TLS, db uintptr, pFunc uintptr, ppMinMax uintptr) (r
return libc.Uint8FromInt32(eRet)
}
zFunc = *(*uintptr)(unsafe.Pointer(pFunc + 8))
- if _sqlite3StrICmp(tls, zFunc, __ccgo_ts+15709) == 0 {
+ if _sqlite3StrICmp(tls, zFunc, __ccgo_ts+15761) == 0 {
eRet = int32(WHERE_ORDERBY_MIN)
if _sqlite3ExprCanBeNull(tls, (*(*TExprList_item)(unsafe.Pointer(pEList + 8))).FpExpr) != 0 {
sortFlags = uint8(KEYINFO_ORDER_BIGNULL)
}
} else {
- if _sqlite3StrICmp(tls, zFunc, __ccgo_ts+15713) == 0 {
+ if _sqlite3StrICmp(tls, zFunc, __ccgo_ts+15765) == 0 {
eRet = int32(WHERE_ORDERBY_MAX)
sortFlags = uint8(KEYINFO_ORDER_DESC)
} else {
@@ -124189,8 +124518,8 @@ func _sqlite3IndexedByLookup(tls *libc.TLS, pParse uintptr, pFrom uintptr) (r in
pIdx = (*TIndex)(unsafe.Pointer(pIdx)).FpNext
}
if !(pIdx != 0) {
- _sqlite3ErrorMsg(tls, pParse, __ccgo_ts+19800, libc.VaList(bp+8, zIndexedBy, 0))
- (*TParse)(unsafe.Pointer(pParse)).FcheckSchema = uint8(1)
+ _sqlite3ErrorMsg(tls, pParse, __ccgo_ts+19872, libc.VaList(bp+8, zIndexedBy, 0))
+ libc.SetBitFieldPtr8Uint32(pParse+32, libc.Uint32FromInt32(1), 3, 0x8)
return int32(SQLITE_ERROR)
}
*(*uintptr)(unsafe.Pointer(pFrom + 36)) = pIdx
@@ -124214,7 +124543,7 @@ func _sqlite3IndexedByLookup(tls *libc.TLS, pParse uintptr, pFrom uintptr) (r in
// ** 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
+// ** http://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
@@ -124296,7 +124625,7 @@ func _convertCompoundSelectToSubquery(tls *libc.TLS, pWalker uintptr, p uintptr)
(*TSelect)(unsafe.Pointer(p)).FpNext = uintptr(0)
(*TSelect)(unsafe.Pointer(p)).FpWith = uintptr(0)
(*TSelect)(unsafe.Pointer(p)).FpWinDefn = uintptr(0)
- *(*Tu32)(unsafe.Pointer(p + 4)) &= libc.Uint32FromInt32(^libc.Int32FromInt32(SF_Compound))
+ *(*Tu32)(unsafe.Pointer(p + 4)) &= ^libc.Uint32FromInt32(SF_Compound)
*(*Tu32)(unsafe.Pointer(p + 4)) |= uint32(SF_Converted)
(*TSelect)(unsafe.Pointer((*TSelect)(unsafe.Pointer(pNew)).FpPrior)).FpNext = pNew
(*TSelect)(unsafe.Pointer(pNew)).FpLimit = uintptr(0)
@@ -124314,7 +124643,7 @@ func _cannotBeFunction(tls *libc.TLS, pParse uintptr, pFrom uintptr) (r int32) {
bp := tls.Alloc(16)
defer tls.Free(16)
if int32(*(*uint32)(unsafe.Pointer(pFrom + 12 + 4))&0x8>>3) != 0 {
- _sqlite3ErrorMsg(tls, pParse, __ccgo_ts+19818, libc.VaList(bp+8, (*TSrcItem)(unsafe.Pointer(pFrom)).FzName))
+ _sqlite3ErrorMsg(tls, pParse, __ccgo_ts+19890, libc.VaList(bp+8, (*TSrcItem)(unsafe.Pointer(pFrom)).FzName))
return int32(1)
}
return 0
@@ -124462,7 +124791,7 @@ func _resolveFromTermToCte(tls *libc.TLS, pParse uintptr, pWalker uintptr, pFrom
if _cannotBeFunction(tls, pParse, pFrom) != 0 {
return int32(2)
}
- pTab = _sqlite3DbMallocZero(tls, db, uint64(64))
+ pTab = _sqlite3DbMallocZero(tls, db, uint64(80))
if pTab == uintptr(0) {
return int32(2)
}
@@ -124490,7 +124819,7 @@ func _resolveFromTermToCte(tls *libc.TLS, pParse uintptr, pWalker uintptr, pFrom
pSel = (*TSubquery)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(pFrom + 44)))).FpSelect
*(*Tu32)(unsafe.Pointer(pSel + 4)) |= uint32(SF_CopyCte)
if int32(*(*uint32)(unsafe.Pointer(pFrom + 12 + 4))&0x2>>1) != 0 {
- _sqlite3ErrorMsg(tls, pParse, __ccgo_ts+19841, libc.VaList(bp+16, *(*uintptr)(unsafe.Pointer(pFrom + 32))))
+ _sqlite3ErrorMsg(tls, pParse, __ccgo_ts+19913, libc.VaList(bp+16, *(*uintptr)(unsafe.Pointer(pFrom + 32))))
return int32(2)
}
libc.SetBitFieldPtr32Uint32(pFrom+12+4, libc.Uint32FromInt32(1), 9, 0x200)
@@ -124512,12 +124841,12 @@ func _resolveFromTermToCte(tls *libc.TLS, pParse uintptr, pWalker uintptr, pFrom
(*TTable)(unsafe.Pointer(pTab)).FnTabRef++
libc.SetBitFieldPtr32Uint32(pItem+12+4, libc.Uint32FromInt32(1), 7, 0x80)
if (*TSelect)(unsafe.Pointer(pRecTerm)).FselFlags&uint32(SF_Recursive) != 0 {
- _sqlite3ErrorMsg(tls, pParse, __ccgo_ts+19861, libc.VaList(bp+16, (*TCte)(unsafe.Pointer(pCte)).FzName))
+ _sqlite3ErrorMsg(tls, pParse, __ccgo_ts+19933, libc.VaList(bp+16, (*TCte)(unsafe.Pointer(pCte)).FzName))
return int32(2)
}
*(*Tu32)(unsafe.Pointer(pRecTerm + 4)) |= uint32(SF_Recursive)
if iRecTab < 0 {
- v4 = pParse + 44
+ v4 = pParse + 48
v3 = *(*int32)(unsafe.Pointer(v4))
*(*int32)(unsafe.Pointer(v4))++
iRecTab = v3
@@ -124534,7 +124863,7 @@ func _resolveFromTermToCte(tls *libc.TLS, pParse uintptr, pWalker uintptr, pFrom
}
pRecTerm = (*TSelect)(unsafe.Pointer(pRecTerm)).FpPrior
}
- (*TCte)(unsafe.Pointer(pCte)).FzCteErr = __ccgo_ts + 19904
+ (*TCte)(unsafe.Pointer(pCte)).FzCteErr = __ccgo_ts + 19976
pSavedWith = (*TParse)(unsafe.Pointer(pParse)).FpWith
(*TParse)(unsafe.Pointer(pParse)).FpWith = *(*uintptr)(unsafe.Pointer(bp))
if (*TSelect)(unsafe.Pointer(pSel)).FselFlags&uint32(SF_Recursive) != 0 {
@@ -124565,7 +124894,7 @@ func _resolveFromTermToCte(tls *libc.TLS, pParse uintptr, pWalker uintptr, pFrom
pEList = (*TSelect)(unsafe.Pointer(pLeft)).FpEList
if (*TCte)(unsafe.Pointer(pCte)).FpCols != 0 {
if pEList != 0 && (*TExprList)(unsafe.Pointer(pEList)).FnExpr != (*TExprList)(unsafe.Pointer((*TCte)(unsafe.Pointer(pCte)).FpCols)).FnExpr {
- _sqlite3ErrorMsg(tls, pParse, __ccgo_ts+19927, libc.VaList(bp+16, (*TCte)(unsafe.Pointer(pCte)).FzName, (*TExprList)(unsafe.Pointer(pEList)).FnExpr, (*TExprList)(unsafe.Pointer((*TCte)(unsafe.Pointer(pCte)).FpCols)).FnExpr))
+ _sqlite3ErrorMsg(tls, pParse, __ccgo_ts+19999, libc.VaList(bp+16, (*TCte)(unsafe.Pointer(pCte)).FzName, (*TExprList)(unsafe.Pointer(pEList)).FnExpr, (*TExprList)(unsafe.Pointer((*TCte)(unsafe.Pointer(pCte)).FpCols)).FnExpr))
(*TParse)(unsafe.Pointer(pParse)).FpWith = pSavedWith
return int32(2)
}
@@ -124574,9 +124903,9 @@ func _resolveFromTermToCte(tls *libc.TLS, pParse uintptr, pWalker uintptr, pFrom
_sqlite3ColumnsFromExprList(tls, pParse, pEList, pTab+34, pTab+4)
if bMayRecursive != 0 {
if (*TSelect)(unsafe.Pointer(pSel)).FselFlags&uint32(SF_Recursive) != 0 {
- (*TCte)(unsafe.Pointer(pCte)).FzCteErr = __ccgo_ts + 19965
+ (*TCte)(unsafe.Pointer(pCte)).FzCteErr = __ccgo_ts + 20037
} else {
- (*TCte)(unsafe.Pointer(pCte)).FzCteErr = __ccgo_ts + 19999
+ (*TCte)(unsafe.Pointer(pCte)).FzCteErr = __ccgo_ts + 20071
}
_sqlite3WalkSelect(tls, pWalker, pSel)
}
@@ -124625,7 +124954,7 @@ func _sqlite3ExpandSubquery(tls *libc.TLS, pParse uintptr, pFrom uintptr) (r int
var v2 int32
_, _, _, _ = pSel, pTab, v1, v2
pSel = (*TSubquery)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(pFrom + 44)))).FpSelect
- v1 = _sqlite3DbMallocZero(tls, (*TParse)(unsafe.Pointer(pParse)).Fdb, uint64(64))
+ v1 = _sqlite3DbMallocZero(tls, (*TParse)(unsafe.Pointer(pParse)).Fdb, uint64(80))
pTab = v1
(*TSrcItem)(unsafe.Pointer(pFrom)).FpSTab = v1
if pTab == uintptr(0) {
@@ -124635,7 +124964,7 @@ func _sqlite3ExpandSubquery(tls *libc.TLS, pParse uintptr, pFrom uintptr) (r int
if (*TSrcItem)(unsafe.Pointer(pFrom)).FzAlias != 0 {
(*TTable)(unsafe.Pointer(pTab)).FzName = _sqlite3DbStrDup(tls, (*TParse)(unsafe.Pointer(pParse)).Fdb, (*TSrcItem)(unsafe.Pointer(pFrom)).FzAlias)
} else {
- (*TTable)(unsafe.Pointer(pTab)).FzName = _sqlite3MPrintf(tls, (*TParse)(unsafe.Pointer(pParse)).Fdb, __ccgo_ts+20037, libc.VaList(bp+8, pFrom))
+ (*TTable)(unsafe.Pointer(pTab)).FzName = _sqlite3MPrintf(tls, (*TParse)(unsafe.Pointer(pParse)).Fdb, __ccgo_ts+20109, libc.VaList(bp+8, pFrom))
}
for (*TSelect)(unsafe.Pointer(pSel)).FpPrior != 0 {
pSel = (*TSelect)(unsafe.Pointer(pSel)).FpPrior
@@ -124731,7 +125060,7 @@ func _selectExpander(tls *libc.TLS, pWalker uintptr, p uintptr) (r int32) {
}
if (*TWalker)(unsafe.Pointer(pWalker)).FeCode != 0 {
/* Renumber selId because it has been copied from a view */
- v2 = pParse + 112
+ v2 = pParse + 100
*(*int32)(unsafe.Pointer(v2))++
v1 = *(*int32)(unsafe.Pointer(v2))
(*TSelect)(unsafe.Pointer(p)).FselId = libc.Uint32FromInt32(v1)
@@ -124740,7 +125069,7 @@ func _selectExpander(tls *libc.TLS, pWalker uintptr, p uintptr) (r int32) {
pEList = (*TSelect)(unsafe.Pointer(p)).FpEList
if (*TParse)(unsafe.Pointer(pParse)).FpWith != 0 && (*TSelect)(unsafe.Pointer(p)).FselFlags&uint32(SF_View) != 0 {
if (*TSelect)(unsafe.Pointer(p)).FpWith == uintptr(0) {
- (*TSelect)(unsafe.Pointer(p)).FpWith = _sqlite3DbMallocZero(tls, db, uint64(36))
+ (*TSelect)(unsafe.Pointer(p)).FpWith = _sqlite3DbMallocZero(tls, db, uint64(uint32(libc.UintptrFromInt32(0)+12)+libc.Uint32FromInt32(libc.Int32FromInt32(1))*libc.Uint32FromInt64(24)))
if (*TSelect)(unsafe.Pointer(p)).FpWith == uintptr(0) {
return int32(WRC_Abort)
}
@@ -124791,7 +125120,7 @@ func _selectExpander(tls *libc.TLS, pWalker uintptr, p uintptr) (r int32) {
return int32(WRC_Abort)
}
if (*TTable)(unsafe.Pointer(pTab)).FnTabRef >= uint32(0xffff) {
- _sqlite3ErrorMsg(tls, pParse, __ccgo_ts+20041, libc.VaList(bp+8, (*TTable)(unsafe.Pointer(pTab)).FzName))
+ _sqlite3ErrorMsg(tls, pParse, __ccgo_ts+20113, libc.VaList(bp+8, (*TTable)(unsafe.Pointer(pTab)).FzName))
(*TSrcItem)(unsafe.Pointer(pFrom)).FpSTab = uintptr(0)
return int32(WRC_Abort)
}
@@ -124806,7 +125135,7 @@ func _selectExpander(tls *libc.TLS, pWalker uintptr, p uintptr) (r int32) {
}
if libc.Int32FromUint8((*TTable)(unsafe.Pointer(pTab)).FeTabType) == int32(TABTYP_VIEW) {
if (*Tsqlite3)(unsafe.Pointer(db)).Fflags&uint64(SQLITE_EnableView) == uint64(0) && (*TTable)(unsafe.Pointer(pTab)).FpSchema != (*(*TDb)(unsafe.Pointer((*Tsqlite3)(unsafe.Pointer(db)).FaDb + 1*16))).FpSchema {
- _sqlite3ErrorMsg(tls, pParse, __ccgo_ts+20080, libc.VaList(bp+8, (*TTable)(unsafe.Pointer(pTab)).FzName))
+ _sqlite3ErrorMsg(tls, pParse, __ccgo_ts+20152, libc.VaList(bp+8, (*TTable)(unsafe.Pointer(pTab)).FzName))
}
_sqlite3SrcItemAttachSubquery(tls, pParse, pFrom, (*(*struct {
FpSelect uintptr
@@ -124821,7 +125150,7 @@ func _selectExpander(tls *libc.TLS, pWalker uintptr, p uintptr) (r int32) {
FazArg uintptr
Fp uintptr
})(unsafe.Pointer(pTab + 44))).Fp)).FeVtabRisk) > libc.BoolInt32((*Tsqlite3)(unsafe.Pointer(db)).Fflags&uint64(SQLITE_TrustedSchema) != uint64(0)) {
- _sqlite3ErrorMsg(tls, pParse, __ccgo_ts+15268, libc.VaList(bp+8, (*TTable)(unsafe.Pointer(pTab)).FzName))
+ _sqlite3ErrorMsg(tls, pParse, __ccgo_ts+15293, libc.VaList(bp+8, (*TTable)(unsafe.Pointer(pTab)).FzName))
}
}
nCol = (*TTable)(unsafe.Pointer(pTab)).FnCol
@@ -124945,7 +125274,7 @@ func _selectExpander(tls *libc.TLS, pWalker uintptr, p uintptr) (r int32) {
if iDb >= 0 {
v10 = (*(*TDb)(unsafe.Pointer((*Tsqlite3)(unsafe.Pointer(db)).FaDb + uintptr(iDb)*16))).FzDbSName
} else {
- v10 = __ccgo_ts + 6720
+ v10 = __ccgo_ts + 6745
}
zSchemaName = v10
}
@@ -124962,7 +125291,7 @@ func _selectExpander(tls *libc.TLS, pWalker uintptr, p uintptr) (r int32) {
pNew = _sqlite3ExprListAppend(tls, pParse, pNew, pRight)
if pNew != 0 {
pX = pNew + 8 + uintptr((*TExprList)(unsafe.Pointer(pNew)).FnExpr-int32(1))*20
- (*TExprList_item)(unsafe.Pointer(pX)).FzEName = _sqlite3MPrintf(tls, db, __ccgo_ts+20111, libc.VaList(bp+8, zUName))
+ (*TExprList_item)(unsafe.Pointer(pX)).FzEName = _sqlite3MPrintf(tls, db, __ccgo_ts+20183, libc.VaList(bp+8, zUName))
libc.SetBitFieldPtr16Uint32(pX+8+4, libc.Uint32FromInt32(ENAME_TAB), 0, 0x3)
libc.SetBitFieldPtr16Uint32(pX+8+4, libc.Uint32FromInt32(1), 7, 0x80)
}
@@ -125041,7 +125370,7 @@ func _selectExpander(tls *libc.TLS, pWalker uintptr, p uintptr) (r int32) {
if pNestedFrom != 0 && libc.Bool(libc.Bool(!(libc.Int32FromInt32(ViewCanHaveRowid) != 0)) || j < (*TExprList)(unsafe.Pointer(pNestedFrom)).FnExpr) {
(*TExprList_item)(unsafe.Pointer(pX1)).FzEName = _sqlite3DbStrDup(tls, db, (*(*TExprList_item)(unsafe.Pointer(pNestedFrom + 8 + uintptr(j)*20))).FzEName)
} else {
- (*TExprList_item)(unsafe.Pointer(pX1)).FzEName = _sqlite3MPrintf(tls, db, __ccgo_ts+20116, libc.VaList(bp+8, zSchemaName, zTabName, zName))
+ (*TExprList_item)(unsafe.Pointer(pX1)).FzEName = _sqlite3MPrintf(tls, db, __ccgo_ts+20188, libc.VaList(bp+8, zSchemaName, zTabName, zName))
}
if j == int32((*TTable)(unsafe.Pointer(pTab1)).FnCol) {
v13 = int32(ENAME_ROWID)
@@ -125054,7 +125383,7 @@ func _selectExpander(tls *libc.TLS, pWalker uintptr, p uintptr) (r int32) {
}
} else {
if longNames != 0 {
- (*TExprList_item)(unsafe.Pointer(pX1)).FzEName = _sqlite3MPrintf(tls, db, __ccgo_ts+12572, libc.VaList(bp+8, zTabName, zName))
+ (*TExprList_item)(unsafe.Pointer(pX1)).FzEName = _sqlite3MPrintf(tls, db, __ccgo_ts+12597, libc.VaList(bp+8, zTabName, zName))
libc.SetBitFieldPtr16Uint32(pX1+8+4, libc.Uint32FromInt32(ENAME_NAME), 0, 0x3)
} else {
(*TExprList_item)(unsafe.Pointer(pX1)).FzEName = _sqlite3DbStrDup(tls, db, zName)
@@ -125074,9 +125403,9 @@ func _selectExpander(tls *libc.TLS, pWalker uintptr, p uintptr) (r int32) {
}
if !(tableSeen != 0) {
if zTName != 0 {
- _sqlite3ErrorMsg(tls, pParse, __ccgo_ts+20125, libc.VaList(bp+8, zTName))
+ _sqlite3ErrorMsg(tls, pParse, __ccgo_ts+20197, libc.VaList(bp+8, zTName))
} else {
- _sqlite3ErrorMsg(tls, pParse, __ccgo_ts+20143, 0)
+ _sqlite3ErrorMsg(tls, pParse, __ccgo_ts+20215, 0)
}
}
}
@@ -125090,7 +125419,7 @@ func _selectExpander(tls *libc.TLS, pWalker uintptr, p uintptr) (r int32) {
}
if (*TSelect)(unsafe.Pointer(p)).FpEList != 0 {
if (*TExprList)(unsafe.Pointer((*TSelect)(unsafe.Pointer(p)).FpEList)).FnExpr > *(*int32)(unsafe.Pointer(db + 116 + 2*4)) {
- _sqlite3ErrorMsg(tls, pParse, __ccgo_ts+20163, 0)
+ _sqlite3ErrorMsg(tls, pParse, __ccgo_ts+20235, 0)
return int32(WRC_Abort)
}
if elistFlags&libc.Uint32FromInt32(libc.Int32FromInt32(EP_HasFunc)|libc.Int32FromInt32(EP_Subquery)) != uint32(0) {
@@ -125339,7 +125668,7 @@ func _aggregateIdxEprRefToColCallback(tls *libc.TLS, pWalker uintptr, pExpr uint
(*TExpr)(unsafe.Pointer(pExpr)).Fop = uint8(TK_AGG_COLUMN)
(*TExpr)(unsafe.Pointer(pExpr)).FiTable = (*TAggInfo_col)(unsafe.Pointer(pCol)).FiTable
(*TExpr)(unsafe.Pointer(pExpr)).FiColumn = (*TAggInfo_col)(unsafe.Pointer(pCol)).FiColumn
- *(*Tu32)(unsafe.Pointer(pExpr + 4)) &= libc.Uint32FromInt32(^(libc.Int32FromInt32(EP_Skip) | libc.Int32FromInt32(EP_Collate) | libc.Int32FromInt32(EP_Unlikely)))
+ *(*Tu32)(unsafe.Pointer(pExpr + 4)) &= ^libc.Uint32FromInt32(libc.Int32FromInt32(EP_Skip) | libc.Int32FromInt32(EP_Collate) | libc.Int32FromInt32(EP_Unlikely))
return int32(WRC_Prune)
}
@@ -125392,7 +125721,7 @@ func _aggregateConvertIndexedExprRefToColumn(tls *libc.TLS, pAggInfo uintptr) {
// */
func _assignAggregateRegisters(tls *libc.TLS, pParse uintptr, pAggInfo uintptr) {
(*TAggInfo)(unsafe.Pointer(pAggInfo)).FiFirstReg = (*TParse)(unsafe.Pointer(pParse)).FnMem + int32(1)
- *(*int32)(unsafe.Pointer(pParse + 48)) += (*TAggInfo)(unsafe.Pointer(pAggInfo)).FnColumn + (*TAggInfo)(unsafe.Pointer(pAggInfo)).FnFunc
+ *(*int32)(unsafe.Pointer(pParse + 52)) += (*TAggInfo)(unsafe.Pointer(pAggInfo)).FnColumn + (*TAggInfo)(unsafe.Pointer(pAggInfo)).FnFunc
}
// C documentation
@@ -125429,12 +125758,12 @@ func _resetAccumulator(tls *libc.TLS, pParse uintptr, pAggInfo uintptr) {
if (*TAggInfo_func)(unsafe.Pointer(pFunc)).FiDistinct >= 0 {
pE = (*TAggInfo_func)(unsafe.Pointer(pFunc)).FpFExpr
if *(*uintptr)(unsafe.Pointer(pE + 20)) == uintptr(0) || (*TExprList)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(pE + 20)))).FnExpr != int32(1) {
- _sqlite3ErrorMsg(tls, pParse, __ccgo_ts+20194, 0)
+ _sqlite3ErrorMsg(tls, pParse, __ccgo_ts+20266, 0)
(*TAggInfo_func)(unsafe.Pointer(pFunc)).FiDistinct = -int32(1)
} else {
pKeyInfo = _sqlite3KeyInfoFromExprList(tls, pParse, *(*uintptr)(unsafe.Pointer(pE + 20)), 0, 0)
(*TAggInfo_func)(unsafe.Pointer(pFunc)).FiDistAddr = _sqlite3VdbeAddOp4(tls, v, int32(OP_OpenEphemeral), (*TAggInfo_func)(unsafe.Pointer(pFunc)).FiDistinct, 0, 0, pKeyInfo, -int32(8))
- _sqlite3VdbeExplain(tls, pParse, uint8(0), __ccgo_ts+20245, libc.VaList(bp+8, (*TFuncDef)(unsafe.Pointer((*TAggInfo_func)(unsafe.Pointer(pFunc)).FpFunc)).FzName))
+ _sqlite3VdbeExplain(tls, pParse, uint8(0), __ccgo_ts+20317, libc.VaList(bp+8, (*TFuncDef)(unsafe.Pointer((*TAggInfo_func)(unsafe.Pointer(pFunc)).FpFunc)).FzName))
}
}
if (*TAggInfo_func)(unsafe.Pointer(pFunc)).FiOBTab >= 0 {
@@ -125455,7 +125784,7 @@ func _resetAccumulator(tls *libc.TLS, pParse uintptr, pAggInfo uintptr) {
(*TKeyInfo)(unsafe.Pointer(pKeyInfo1)).FnKeyField++
}
_sqlite3VdbeAddOp4(tls, v, int32(OP_OpenEphemeral), (*TAggInfo_func)(unsafe.Pointer(pFunc)).FiOBTab, (*TExprList)(unsafe.Pointer(pOBList)).FnExpr+nExtra, 0, pKeyInfo1, -int32(8))
- _sqlite3VdbeExplain(tls, pParse, uint8(0), __ccgo_ts+20278, libc.VaList(bp+8, (*TFuncDef)(unsafe.Pointer((*TAggInfo_func)(unsafe.Pointer(pFunc)).FpFunc)).FzName))
+ _sqlite3VdbeExplain(tls, pParse, uint8(0), __ccgo_ts+20350, libc.VaList(bp+8, (*TFuncDef)(unsafe.Pointer((*TAggInfo_func)(unsafe.Pointer(pFunc)).FpFunc)).FzName))
}
goto _1
_1:
@@ -125594,7 +125923,7 @@ func _updateAccumulator(tls *libc.TLS, pParse uintptr, regAcc int32, pAggInfo ui
** without a FILTER clause that will ensure the magnet registers
** are populated. */
if regHit == 0 {
- v3 = pParse + 48
+ v3 = pParse + 52
*(*int32)(unsafe.Pointer(v3))++
v2 = *(*int32)(unsafe.Pointer(v3))
regHit = v2
@@ -125702,7 +126031,7 @@ func _updateAccumulator(tls *libc.TLS, pParse uintptr, regAcc int32, pAggInfo ui
pColl = (*Tsqlite3)(unsafe.Pointer((*TParse)(unsafe.Pointer(pParse)).Fdb)).FpDfltColl
}
if regHit == 0 && (*TAggInfo)(unsafe.Pointer(pAggInfo)).FnAccumulator != 0 {
- v8 = pParse + 48
+ v8 = pParse + 52
*(*int32)(unsafe.Pointer(v8))++
v7 = *(*int32)(unsafe.Pointer(v8))
regHit = v7
@@ -125769,7 +126098,7 @@ func _explainSimpleCount(tls *libc.TLS, pParse uintptr, pTab uintptr, pIdx uintp
if libc.Int32FromUint8((*TParse)(unsafe.Pointer(pParse)).Fexplain) == int32(2) {
bCover = libc.BoolInt32(pIdx != uintptr(0) && ((*TTable)(unsafe.Pointer(pTab)).FtabFlags&uint32(TF_WithoutRowid) == uint32(0) || !(int32(uint32(*(*uint16)(unsafe.Pointer(pIdx + 56))&0x3>>0)) == libc.Int32FromInt32(SQLITE_IDXTYPE_PRIMARYKEY))))
if bCover != 0 {
- v1 = __ccgo_ts + 20311
+ v1 = __ccgo_ts + 20383
} else {
v1 = __ccgo_ts + 1667
}
@@ -125778,7 +126107,7 @@ func _explainSimpleCount(tls *libc.TLS, pParse uintptr, pTab uintptr, pIdx uintp
} else {
v2 = __ccgo_ts + 1667
}
- _sqlite3VdbeExplain(tls, pParse, uint8(0), __ccgo_ts+20334, libc.VaList(bp+8, (*TTable)(unsafe.Pointer(pTab)).FzName, v1, v2))
+ _sqlite3VdbeExplain(tls, pParse, uint8(0), __ccgo_ts+20406, libc.VaList(bp+8, (*TTable)(unsafe.Pointer(pTab)).FzName, v1, v2))
}
}
@@ -125810,7 +126139,7 @@ func _havingToWhereExprCb(tls *libc.TLS, pWalker uintptr, pExpr uintptr) (r int3
** statements AggInfo structure. */
if _sqlite3ExprIsConstantOrGroupBy(tls, (*TWalker)(unsafe.Pointer(pWalker)).FpParse, pExpr, (*TSelect)(unsafe.Pointer(pS)).FpGroupBy) != 0 && libc.BoolInt32((*TExpr)(unsafe.Pointer(pExpr)).Fflags&libc.Uint32FromInt32(libc.Int32FromInt32(EP_OuterON)|libc.Int32FromInt32(EP_IsFalse)) == uint32(EP_IsFalse)) == 0 && (*TExpr)(unsafe.Pointer(pExpr)).FpAggInfo == uintptr(0) {
db = (*TParse)(unsafe.Pointer((*TWalker)(unsafe.Pointer(pWalker)).FpParse)).Fdb
- pNew = _sqlite3Expr(tls, db, int32(TK_INTEGER), __ccgo_ts+8321)
+ pNew = _sqlite3Expr(tls, db, int32(TK_INTEGER), __ccgo_ts+8346)
if pNew != 0 {
pWhere = (*TSelect)(unsafe.Pointer(pS)).FpWhere
t = *(*TExpr)(unsafe.Pointer(pNew))
@@ -125968,7 +126297,7 @@ func _countOfViewOptimization(tls *libc.TLS, pParse uintptr, p uintptr) (r int32
if libc.Int32FromUint8((*TExpr)(unsafe.Pointer(pExpr)).Fop) != int32(TK_AGG_FUNCTION) {
return 0
} /* Result is an aggregate */
- if Xsqlite3_stricmp(tls, *(*uintptr)(unsafe.Pointer(pExpr + 8)), __ccgo_ts+16003) != 0 {
+ if Xsqlite3_stricmp(tls, *(*uintptr)(unsafe.Pointer(pExpr + 8)), __ccgo_ts+16075) != 0 {
return 0
} /* Is count() */
if *(*uintptr)(unsafe.Pointer(pExpr + 20)) != uintptr(0) {
@@ -126013,13 +126342,13 @@ func _countOfViewOptimization(tls *libc.TLS, pParse uintptr, p uintptr) (r int32
pExpr = uintptr(0)
pSub = _sqlite3SubqueryDetach(tls, db, pFrom)
_sqlite3SrcListDelete(tls, db, (*TSelect)(unsafe.Pointer(p)).FpSrc)
- (*TSelect)(unsafe.Pointer(p)).FpSrc = _sqlite3DbMallocZero(tls, (*TParse)(unsafe.Pointer(pParse)).Fdb, uint64(56))
+ (*TSelect)(unsafe.Pointer(p)).FpSrc = _sqlite3DbMallocZero(tls, (*TParse)(unsafe.Pointer(pParse)).Fdb, uint64(uint32(libc.UintptrFromInt32(0)+8)+libc.Uint32FromInt64(48)))
for pSub != 0 {
pPrior = (*TSelect)(unsafe.Pointer(pSub)).FpPrior
(*TSelect)(unsafe.Pointer(pSub)).FpPrior = uintptr(0)
(*TSelect)(unsafe.Pointer(pSub)).FpNext = uintptr(0)
*(*Tu32)(unsafe.Pointer(pSub + 4)) |= uint32(SF_Aggregate)
- *(*Tu32)(unsafe.Pointer(pSub + 4)) &= libc.Uint32FromInt32(^libc.Int32FromInt32(SF_Compound))
+ *(*Tu32)(unsafe.Pointer(pSub + 4)) &= ^libc.Uint32FromInt32(SF_Compound)
(*TSelect)(unsafe.Pointer(pSub)).FnSelectRow = 0
_sqlite3ParserAddCleanup(tls, pParse, __ccgo_fp(_sqlite3ExprListDeleteGeneric), (*TSelect)(unsafe.Pointer(pSub)).FpEList)
if pPrior != 0 {
@@ -126039,7 +126368,7 @@ func _countOfViewOptimization(tls *libc.TLS, pParse uintptr, p uintptr) (r int32
pSub = pPrior
}
(*(*TExprList_item)(unsafe.Pointer((*TSelect)(unsafe.Pointer(p)).FpEList + 8))).FpExpr = pExpr
- *(*Tu32)(unsafe.Pointer(p + 4)) &= libc.Uint32FromInt32(^libc.Int32FromInt32(SF_Aggregate))
+ *(*Tu32)(unsafe.Pointer(p + 4)) &= ^libc.Uint32FromInt32(SF_Aggregate)
return int32(1)
}
@@ -126212,8 +126541,8 @@ func _fromClauseTermCanBeCoroutine(tls *libc.TLS, pParse uintptr, pTabList uintp
func _sqlite3Select(tls *libc.TLS, pParse uintptr, p uintptr, pDest uintptr) (r int32) {
bp := tls.Alloc(160)
defer tls.Free(160)
- var addr1, addrEnd, addrGosub, addrOutputRow, addrReset, addrSetAbort, addrSortingIdx, addrTop, addrTopOfLoop, eDist, eDist1, groupBySort, i, iAMem, iAbortFlag, iBMem, iBreak, iCont, iCsr, iDb, iDb1, iEnd, iOrderByCol, iUseFlag, ii, ii1, isAgg, j, k, nCol, nGroupBy, onceAddr, orderByGrp, rc, regAcc, regBase, regGosub, regOutputRow, regRecord, regReset, sortOut, sortPTab, topAddr, v12, v15, v19, v24, v26, v27, v32, v33, v34, v36, v38, v40, v42, v44, v45, v49, v50, v54, v58, v60 int32
- var db, p0, pAggInfo, pBase, pBest, pCol, pCteUse, pCteUse1, pDistinct, pDistinct1, pEList, pExpr, pF, pF1, pGroupBy, pHaving, pI2, pIdx, pItem, pItem1, pItem2, pKeyInfo, pKeyInfo1, pKeyInfo2, pPrior, pPriorSubq, pSub, pSub1, pSubq, pTab, pTab1, pTabList, pWInfo, pWhere, pWin, pX, v, zDb, zSavedAuthContext, v1, v13, v14, v16, v17, v20, v25, v28, v3, v35, v37, v39, v41, v43, v46, v51, v53, v55, v59, p10, p23, p4, p5, p7, p8 uintptr
+ var addr1, addrEnd, addrGosub, addrOutputRow, addrReset, addrSetAbort, addrSortingIdx, addrTop, addrTopOfLoop, eDist, eDist1, groupBySort, i, iAMem, iAbortFlag, iBMem, iBreak, iCont, iCsr, iDb, iDb1, iEnd, iOrderByCol, iUseFlag, ii, ii1, isAgg, j, k, nCol, nGroupBy, onceAddr, orderByGrp, rc, regAcc, regBase, regGosub, regOutputRow, regRecord, regReset, sortOut, sortPTab, topAddr, v12, v15, v19, v24, v26, v28, v33, v34, v35, v37, v39, v41, v43, v45, v46, v50, v51, v55, v59, v61 int32
+ var db, p0, pAggInfo, pBase, pBest, pCol, pCteUse, pCteUse1, pDistinct, pDistinct1, pEList, pExpr, pF, pF1, pGroupBy, pHaving, pI2, pIdx, pItem, pItem1, pItem2, pKeyInfo, pKeyInfo1, pKeyInfo2, pPrior, pPriorSubq, pSub, pSub1, pSubq, pTab, pTab1, pTabList, pWInfo, pWhere, pWin, pX, v, zDb, zSavedAuthContext, v1, v13, v14, v16, v17, v20, v25, v29, v3, v36, v38, v40, v42, v44, v47, v52, v54, v56, v60, p10, p23, p27, p4, p5, p7, p8 uintptr
var distFlag, distFlag1, wctrlFlags Tu16
var iRoot TPgno
var minMaxFlag, sortFlags Tu8
@@ -126222,11 +126551,11 @@ func _sqlite3Select(tls *libc.TLS, pParse uintptr, p uintptr, pDest uintptr) (r
var _ /* sDistinct at bp+0 */ TDistinctCtx
var _ /* sNC at bp+84 */ TNameContext
var _ /* sSort at bp+12 */ TSortCtx
- _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _ = addr1, addrEnd, addrGosub, addrOutputRow, addrReset, addrSetAbort, addrSortingIdx, addrTop, addrTopOfLoop, db, distFlag, distFlag1, eDist, eDist1, groupBySort, i, iAMem, iAbortFlag, iBMem, iBreak, iCont, iCsr, iDb, iDb1, iEnd, iOrderByCol, iRoot, iUseFlag, ii, ii1, isAgg, j, k, minMaxFlag, nCol, nGroupBy, onceAddr, orderByGrp, p0, pAggInfo, pBase, pBest, pCol, pCteUse, pCteUse1, pDistinct, pDistinct1, pEList, pExpr, pF, pF1, pGroupBy, pHaving, pI2, pIdx, pItem, pItem1, pItem2, pKeyInfo, pKeyInfo1, pKeyInfo2, pPrior, pPriorSubq, pSub, pSub1, pSubq, pTab, pTab1, pTabList, pWInfo, pWhere, pWin, pX, rc, regAcc, regBase, regGosub, regOutputRow, regRecord, regReset, sortFlags, sortOut, sortPTab, topAddr, v, wctrlFlags, zDb, zSavedAuthContext, v1, v12, v13, v14, v15, v16, v17, v19, v20, v24, v25, v26, v27, v28, v3, v32, v33, v34, v35, v36, v37, v38, v39, v40, v41, v42, v43, v44, v45, v46, v49, v50, v51, v53, v54, v55, v58, v59, v60, p10, p23, p4, p5, p7, p8 /* True for select lists like "count(*)" */
- pEList = uintptr(0) /* The HAVING clause. May be NULL */
- pAggInfo = uintptr(0) /* Aggregate information */
- rc = int32(1) /* The database connection */
- *(*uintptr)(unsafe.Pointer(bp + 52)) = uintptr(0) /* Flag for min/max queries */
+ _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _ = addr1, addrEnd, addrGosub, addrOutputRow, addrReset, addrSetAbort, addrSortingIdx, addrTop, addrTopOfLoop, db, distFlag, distFlag1, eDist, eDist1, groupBySort, i, iAMem, iAbortFlag, iBMem, iBreak, iCont, iCsr, iDb, iDb1, iEnd, iOrderByCol, iRoot, iUseFlag, ii, ii1, isAgg, j, k, minMaxFlag, nCol, nGroupBy, onceAddr, orderByGrp, p0, pAggInfo, pBase, pBest, pCol, pCteUse, pCteUse1, pDistinct, pDistinct1, pEList, pExpr, pF, pF1, pGroupBy, pHaving, pI2, pIdx, pItem, pItem1, pItem2, pKeyInfo, pKeyInfo1, pKeyInfo2, pPrior, pPriorSubq, pSub, pSub1, pSubq, pTab, pTab1, pTabList, pWInfo, pWhere, pWin, pX, rc, regAcc, regBase, regGosub, regOutputRow, regRecord, regReset, sortFlags, sortOut, sortPTab, topAddr, v, wctrlFlags, zDb, zSavedAuthContext, v1, v12, v13, v14, v15, v16, v17, v19, v20, v24, v25, v26, v28, v29, v3, v33, v34, v35, v36, v37, v38, v39, v40, v41, v42, v43, v44, v45, v46, v47, v50, v51, v52, v54, v55, v56, v59, v60, v61, p10, p23, p27, p4, p5, p7, p8 /* True for select lists like "count(*)" */
+ pEList = uintptr(0) /* The HAVING clause. May be NULL */
+ pAggInfo = uintptr(0) /* Aggregate information */
+ rc = int32(1) /* The database connection */
+ *(*uintptr)(unsafe.Pointer(bp + 52)) = uintptr(0) /* Flag for min/max queries */
db = (*TParse)(unsafe.Pointer(pParse)).Fdb
v = _sqlite3GetVdbe(tls, pParse)
if p == uintptr(0) || (*TParse)(unsafe.Pointer(pParse)).FnErr != 0 {
@@ -126242,7 +126571,7 @@ func _sqlite3Select(tls *libc.TLS, pParse uintptr, p uintptr, pDest uintptr) (r
_sqlite3ParserAddCleanup(tls, pParse, __ccgo_fp(_sqlite3ExprListDeleteGeneric), (*TSelect)(unsafe.Pointer(p)).FpOrderBy)
(*TSelect)(unsafe.Pointer(p)).FpOrderBy = uintptr(0)
}
- *(*Tu32)(unsafe.Pointer(p + 4)) &= libc.Uint32FromInt32(^libc.Int32FromInt32(SF_Distinct))
+ *(*Tu32)(unsafe.Pointer(p + 4)) &= ^libc.Uint32FromInt32(SF_Distinct)
*(*Tu32)(unsafe.Pointer(p + 4)) |= uint32(SF_NoopOrderBy)
}
_sqlite3SelectPrep(tls, pParse, p, uintptr(0))
@@ -126266,14 +126595,14 @@ func _sqlite3Select(tls *libc.TLS, pParse uintptr, p uintptr, pDest uintptr) (r
} else {
v1 = (*TTable)(unsafe.Pointer((*TSrcItem)(unsafe.Pointer(p0)).FpSTab)).FzName
}
- _sqlite3ErrorMsg(tls, pParse, __ccgo_ts+20346, libc.VaList(bp+128, v1))
+ _sqlite3ErrorMsg(tls, pParse, __ccgo_ts+20418, libc.VaList(bp+128, v1))
goto select_end
}
/* Clear the SF_UFSrcCheck flag. The check has already been performed,
** and leaving this flag set can cause errors if a compound sub-query
** in p->pSrc is flattened into this query and this function called
** again as part of compound SELECT processing. */
- *(*Tu32)(unsafe.Pointer(p + 4)) &= libc.Uint32FromInt32(^libc.Int32FromInt32(SF_UFSrcCheck))
+ *(*Tu32)(unsafe.Pointer(p + 4)) &= ^libc.Uint32FromInt32(SF_UFSrcCheck)
}
if libc.Int32FromUint8((*TSelectDest)(unsafe.Pointer(pDest)).FeDest) == int32(SRT_Output) {
_sqlite3GenerateColumnNames(tls, pParse, p)
@@ -126374,7 +126703,7 @@ func _sqlite3Select(tls *libc.TLS, pParse uintptr, p uintptr, pDest uintptr) (r
/* Catch mismatch in the declared columns of a view and the number of
** columns in the SELECT on the RHS */
if int32((*TTable)(unsafe.Pointer(pTab)).FnCol) != (*TExprList)(unsafe.Pointer((*TSelect)(unsafe.Pointer(pSub)).FpEList)).FnExpr {
- _sqlite3ErrorMsg(tls, pParse, __ccgo_ts+20400, libc.VaList(bp+128, int32((*TTable)(unsafe.Pointer(pTab)).FnCol), (*TTable)(unsafe.Pointer(pTab)).FzName, (*TExprList)(unsafe.Pointer((*TSelect)(unsafe.Pointer(pSub)).FpEList)).FnExpr))
+ _sqlite3ErrorMsg(tls, pParse, __ccgo_ts+20472, libc.VaList(bp+128, int32((*TTable)(unsafe.Pointer(pTab)).FnCol), (*TTable)(unsafe.Pointer(pTab)).FzName, (*TExprList)(unsafe.Pointer((*TSelect)(unsafe.Pointer(pSub)).FpEList)).FnExpr))
goto select_end
}
/* Do not attempt the usual optimizations (flattening and ORDER BY
@@ -126552,7 +126881,7 @@ func _sqlite3Select(tls *libc.TLS, pParse uintptr, p uintptr, pDest uintptr) (r
** more conservative than necessary, but much easier than enforcing
** an exact limit.
*/
- *(*int32)(unsafe.Pointer(pParse + 232)) += _sqlite3SelectExprHeight(tls, p)
+ *(*int32)(unsafe.Pointer(pParse + 228)) += _sqlite3SelectExprHeight(tls, p)
/* Make copies of constant WHERE-clause terms in the outer query down
** inside the subquery. This can help the subquery to run more efficiently.
** This is the "predicate push-down optimization". tag-select-0420
@@ -126575,14 +126904,14 @@ func _sqlite3Select(tls *libc.TLS, pParse uintptr, p uintptr, pDest uintptr) (r
** set on each invocation. tag-select-0482
*/
addrTop = _sqlite3VdbeCurrentAddr(tls, v) + int32(1)
- v13 = pParse + 48
+ v13 = pParse + 52
*(*int32)(unsafe.Pointer(v13))++
v12 = *(*int32)(unsafe.Pointer(v13))
(*TSubquery)(unsafe.Pointer(pSubq)).FregReturn = v12
_sqlite3VdbeAddOp3(tls, v, int32(OP_InitCoroutine), (*TSubquery)(unsafe.Pointer(pSubq)).FregReturn, 0, addrTop)
(*TSubquery)(unsafe.Pointer(pSubq)).FaddrFillSub = addrTop
_sqlite3SelectDestInit(tls, bp+56, int32(SRT_Coroutine), (*TSubquery)(unsafe.Pointer(pSubq)).FregReturn)
- _sqlite3VdbeExplain(tls, pParse, uint8(1), __ccgo_ts+20440, libc.VaList(bp+128, pItem1))
+ _sqlite3VdbeExplain(tls, pParse, uint8(1), __ccgo_ts+20512, libc.VaList(bp+128, pItem1))
_sqlite3Select(tls, pParse, pSub1, bp+56)
(*TTable)(unsafe.Pointer((*TSrcItem)(unsafe.Pointer(pItem1)).FpSTab)).FnRowLogEst = (*TSelect)(unsafe.Pointer(pSub1)).FnSelectRow
libc.SetBitFieldPtr32Uint32(pItem1+12+4, libc.Uint32FromInt32(1), 6, 0x40)
@@ -126614,7 +126943,7 @@ func _sqlite3Select(tls *libc.TLS, pParse uintptr, p uintptr, pDest uintptr) (r
(*TSelect)(unsafe.Pointer(pSub1)).FnSelectRow = (*TSelect)(unsafe.Pointer((*TSubquery)(unsafe.Pointer(pPriorSubq)).FpSelect)).FnSelectRow
} else {
onceAddr = 0
- v16 = pParse + 48
+ v16 = pParse + 52
*(*int32)(unsafe.Pointer(v16))++
v15 = *(*int32)(unsafe.Pointer(v16))
(*TSubquery)(unsafe.Pointer(pSubq)).FregReturn = v15
@@ -126629,7 +126958,7 @@ func _sqlite3Select(tls *libc.TLS, pParse uintptr, p uintptr, pDest uintptr) (r
} else {
}
_sqlite3SelectDestInit(tls, bp+56, int32(SRT_EphemTab), (*TSrcItem)(unsafe.Pointer(pItem1)).FiCursor)
- _sqlite3VdbeExplain(tls, pParse, uint8(1), __ccgo_ts+20455, libc.VaList(bp+128, pItem1))
+ _sqlite3VdbeExplain(tls, pParse, uint8(1), __ccgo_ts+20527, libc.VaList(bp+128, pItem1))
_sqlite3Select(tls, pParse, pSub1, bp+56)
(*TTable)(unsafe.Pointer((*TSrcItem)(unsafe.Pointer(pItem1)).FpSTab)).FnRowLogEst = (*TSelect)(unsafe.Pointer(pSub1)).FnSelectRow
if onceAddr != 0 {
@@ -126651,7 +126980,7 @@ func _sqlite3Select(tls *libc.TLS, pParse uintptr, p uintptr, pDest uintptr) (r
if (*Tsqlite3)(unsafe.Pointer(db)).FmallocFailed != 0 {
goto select_end
}
- *(*int32)(unsafe.Pointer(pParse + 232)) -= _sqlite3SelectExprHeight(tls, p)
+ *(*int32)(unsafe.Pointer(pParse + 228)) -= _sqlite3SelectExprHeight(tls, p)
(*TParse)(unsafe.Pointer(pParse)).FzAuthContext = zSavedAuthContext
goto _11
_11:
@@ -126683,7 +127012,7 @@ func _sqlite3Select(tls *libc.TLS, pParse uintptr, p uintptr, pDest uintptr) (r
** BY and DISTINCT, and an index or separate temp-table for the other.
*/
if (*TSelect)(unsafe.Pointer(p)).FselFlags&libc.Uint32FromInt32(libc.Int32FromInt32(SF_Distinct)|libc.Int32FromInt32(SF_Aggregate)) == uint32(SF_Distinct) && _sqlite3ExprListCompare(tls, (*(*TSortCtx)(unsafe.Pointer(bp + 12))).FpOrderBy, pEList, -int32(1)) == 0 && (*Tsqlite3)(unsafe.Pointer(db)).FdbOptFlags&libc.Uint32FromInt32(libc.Int32FromInt32(SQLITE_GroupByOrder)) == uint32(0) && (*TSelect)(unsafe.Pointer(p)).FpWin == uintptr(0) {
- *(*Tu32)(unsafe.Pointer(p + 4)) &= libc.Uint32FromInt32(^libc.Int32FromInt32(SF_Distinct))
+ *(*Tu32)(unsafe.Pointer(p + 4)) &= ^libc.Uint32FromInt32(SF_Distinct)
v17 = _sqlite3ExprListDup(tls, db, pEList, 0)
(*TSelect)(unsafe.Pointer(p)).FpGroupBy = v17
pGroupBy = v17
@@ -126716,7 +127045,7 @@ func _sqlite3Select(tls *libc.TLS, pParse uintptr, p uintptr, pDest uintptr) (r
*/
if (*(*TSortCtx)(unsafe.Pointer(bp + 12))).FpOrderBy != 0 {
pKeyInfo = _sqlite3KeyInfoFromExprList(tls, pParse, (*(*TSortCtx)(unsafe.Pointer(bp + 12))).FpOrderBy, 0, (*TExprList)(unsafe.Pointer(pEList)).FnExpr)
- v20 = pParse + 44
+ v20 = pParse + 48
v19 = *(*int32)(unsafe.Pointer(v20))
*(*int32)(unsafe.Pointer(v20))++
(*(*TSortCtx)(unsafe.Pointer(bp + 12))).FiECursor = v19
@@ -126775,7 +127104,7 @@ func _sqlite3Select(tls *libc.TLS, pParse uintptr, p uintptr, pDest uintptr) (r
/* Open an ephemeral index to use for the distinct set. tag-select-0680
*/
if (*TSelect)(unsafe.Pointer(p)).FselFlags&uint32(SF_Distinct) != 0 {
- v25 = pParse + 44
+ v25 = pParse + 48
v24 = *(*int32)(unsafe.Pointer(v25))
*(*int32)(unsafe.Pointer(v25))++
(*(*TDistinctCtx)(unsafe.Pointer(bp))).FtabTnct = v24
@@ -126804,6 +127133,13 @@ func _sqlite3Select(tls *libc.TLS, pParse uintptr, p uintptr, pDest uintptr) (r
}
if int32(_sqlite3WhereOutputRowCount(tls, pWInfo)) < int32((*TSelect)(unsafe.Pointer(p)).FnSelectRow) {
(*TSelect)(unsafe.Pointer(p)).FnSelectRow = _sqlite3WhereOutputRowCount(tls, pWInfo)
+ if libc.Int32FromUint8((*TSelectDest)(unsafe.Pointer(pDest)).FeDest) <= int32(SRT_DistQueue) && libc.Int32FromUint8((*TSelectDest)(unsafe.Pointer(pDest)).FeDest) >= int32(SRT_DistFifo) {
+ /* TUNING: For a UNION CTE, because UNION is implies DISTINCT,
+ ** reduce the estimated output row count by 8 (LogEst 30).
+ ** Search for tag-20250414a to see other cases */
+ p27 = p + 2
+ *(*TLogEst)(unsafe.Pointer(p27)) = TLogEst(int32(*(*TLogEst)(unsafe.Pointer(p27))) - libc.Int32FromInt32(30))
+ }
}
if (*(*TDistinctCtx)(unsafe.Pointer(bp))).FisTnct != 0 && _sqlite3WhereIsDistinct(tls, pWInfo) != 0 {
(*(*TDistinctCtx)(unsafe.Pointer(bp))).FeTnctType = libc.Uint8FromInt32(_sqlite3WhereIsDistinct(tls, pWInfo))
@@ -126826,10 +127162,10 @@ func _sqlite3Select(tls *libc.TLS, pParse uintptr, p uintptr, pDest uintptr) (r
addrGosub = _sqlite3VdbeMakeLabel(tls, pParse)
iCont = _sqlite3VdbeMakeLabel(tls, pParse)
iBreak = _sqlite3VdbeMakeLabel(tls, pParse)
- v28 = pParse + 48
- *(*int32)(unsafe.Pointer(v28))++
- v27 = *(*int32)(unsafe.Pointer(v28))
- regGosub = v27
+ v29 = pParse + 52
+ *(*int32)(unsafe.Pointer(v29))++
+ v28 = *(*int32)(unsafe.Pointer(v29))
+ regGosub = v28
_sqlite3WindowCodeStep(tls, pParse, p, pWInfo, regGosub, addrGosub)
_sqlite3VdbeAddOp2(tls, v, int32(OP_Goto), 0, iBreak)
_sqlite3VdbeResolveLabel(tls, v, addrGosub)
@@ -126863,8 +127199,8 @@ func _sqlite3Select(tls *libc.TLS, pParse uintptr, p uintptr, pDest uintptr) (r
FiOrderByCol Tu16
FiAlias Tu16
})(unsafe.Pointer(pItem2 + 16))).FiAlias = uint16(0)
- goto _29
- _29:
+ goto _30
+ _30:
;
k--
pItem2 += 20
@@ -126879,8 +127215,8 @@ func _sqlite3Select(tls *libc.TLS, pParse uintptr, p uintptr, pDest uintptr) (r
FiOrderByCol Tu16
FiAlias Tu16
})(unsafe.Pointer(pItem2 + 16))).FiAlias = uint16(0)
- goto _30
- _30:
+ goto _31
+ _31:
;
k--
pItem2 += 20
@@ -126909,8 +127245,8 @@ func _sqlite3Select(tls *libc.TLS, pParse uintptr, p uintptr, pDest uintptr) (r
}
sortFlags = libc.Uint8FromInt32(libc.Int32FromUint8((*(*TExprList_item)(unsafe.Pointer((*(*TSortCtx)(unsafe.Pointer(bp + 12))).FpOrderBy + 8 + uintptr(ii1)*20))).Ffg.FsortFlags) & int32(KEYINFO_ORDER_DESC))
(*(*TExprList_item)(unsafe.Pointer(pGroupBy + 8 + uintptr(ii1)*20))).Ffg.FsortFlags = sortFlags
- goto _31
- _31:
+ goto _32
+ _32:
;
ii1++
}
@@ -126940,11 +127276,11 @@ func _sqlite3Select(tls *libc.TLS, pParse uintptr, p uintptr, pDest uintptr) (r
(*(*TNameContext)(unsafe.Pointer(bp + 84))).FpSrcList = pTabList
*(*uintptr)(unsafe.Pointer(bp + 84 + 8)) = pAggInfo
if pGroupBy != 0 {
- v32 = (*TExprList)(unsafe.Pointer(pGroupBy)).FnExpr
+ v33 = (*TExprList)(unsafe.Pointer(pGroupBy)).FnExpr
} else {
- v32 = 0
+ v33 = 0
}
- (*TAggInfo)(unsafe.Pointer(pAggInfo)).FnSortingColumn = libc.Uint16FromInt32(v32)
+ (*TAggInfo)(unsafe.Pointer(pAggInfo)).FnSortingColumn = libc.Uint16FromInt32(v33)
(*TAggInfo)(unsafe.Pointer(pAggInfo)).FpGroupBy = pGroupBy
_sqlite3ExprAnalyzeAggList(tls, bp+84, pEList)
_sqlite3ExprAnalyzeAggList(tls, bp+84, (*(*TSortCtx)(unsafe.Pointer(bp + 12))).FpOrderBy)
@@ -126978,47 +127314,47 @@ func _sqlite3Select(tls *libc.TLS, pParse uintptr, p uintptr, pDest uintptr) (r
pDistinct = _sqlite3ExprListDup(tls, db, pGroupBy, 0)
pDistinct = _sqlite3ExprListAppend(tls, pParse, pDistinct, pExpr)
if pDistinct != 0 {
- v33 = libc.Int32FromInt32(WHERE_WANT_DISTINCT) | libc.Int32FromInt32(WHERE_AGG_DISTINCT)
+ v34 = libc.Int32FromInt32(WHERE_WANT_DISTINCT) | libc.Int32FromInt32(WHERE_AGG_DISTINCT)
} else {
- v33 = 0
+ v34 = 0
}
- distFlag = libc.Uint16FromInt32(v33)
+ distFlag = libc.Uint16FromInt32(v34)
}
/* If there is a GROUP BY clause we might need a sorting index to
** implement it. Allocate that sorting index now. If it turns out
** that we do not need it after all, the OP_SorterOpen instruction
** will be converted into a Noop.
*/
- v35 = pParse + 44
- v34 = *(*int32)(unsafe.Pointer(v35))
- *(*int32)(unsafe.Pointer(v35))++
- (*TAggInfo)(unsafe.Pointer(pAggInfo)).FsortingIdx = v34
+ v36 = pParse + 48
+ v35 = *(*int32)(unsafe.Pointer(v36))
+ *(*int32)(unsafe.Pointer(v36))++
+ (*TAggInfo)(unsafe.Pointer(pAggInfo)).FsortingIdx = v35
pKeyInfo1 = _sqlite3KeyInfoFromExprList(tls, pParse, pGroupBy, 0, (*TAggInfo)(unsafe.Pointer(pAggInfo)).FnColumn)
addrSortingIdx = _sqlite3VdbeAddOp4(tls, v, int32(OP_SorterOpen), (*TAggInfo)(unsafe.Pointer(pAggInfo)).FsortingIdx, libc.Int32FromUint16((*TAggInfo)(unsafe.Pointer(pAggInfo)).FnSortingColumn), 0, pKeyInfo1, -int32(8))
/* Initialize memory locations used by GROUP BY aggregate processing
*/
- v37 = pParse + 48
- *(*int32)(unsafe.Pointer(v37))++
- v36 = *(*int32)(unsafe.Pointer(v37))
- iUseFlag = v36
- v39 = pParse + 48
- *(*int32)(unsafe.Pointer(v39))++
- v38 = *(*int32)(unsafe.Pointer(v39))
- iAbortFlag = v38
- v41 = pParse + 48
- *(*int32)(unsafe.Pointer(v41))++
- v40 = *(*int32)(unsafe.Pointer(v41))
- regOutputRow = v40
+ v38 = pParse + 52
+ *(*int32)(unsafe.Pointer(v38))++
+ v37 = *(*int32)(unsafe.Pointer(v38))
+ iUseFlag = v37
+ v40 = pParse + 52
+ *(*int32)(unsafe.Pointer(v40))++
+ v39 = *(*int32)(unsafe.Pointer(v40))
+ iAbortFlag = v39
+ v42 = pParse + 52
+ *(*int32)(unsafe.Pointer(v42))++
+ v41 = *(*int32)(unsafe.Pointer(v42))
+ regOutputRow = v41
addrOutputRow = _sqlite3VdbeMakeLabel(tls, pParse)
- v43 = pParse + 48
- *(*int32)(unsafe.Pointer(v43))++
- v42 = *(*int32)(unsafe.Pointer(v43))
- regReset = v42
+ v44 = pParse + 52
+ *(*int32)(unsafe.Pointer(v44))++
+ v43 = *(*int32)(unsafe.Pointer(v44))
+ regReset = v43
addrReset = _sqlite3VdbeMakeLabel(tls, pParse)
iAMem = (*TParse)(unsafe.Pointer(pParse)).FnMem + int32(1)
- *(*int32)(unsafe.Pointer(pParse + 48)) += (*TExprList)(unsafe.Pointer(pGroupBy)).FnExpr
+ *(*int32)(unsafe.Pointer(pParse + 52)) += (*TExprList)(unsafe.Pointer(pGroupBy)).FnExpr
iBMem = (*TParse)(unsafe.Pointer(pParse)).FnMem + int32(1)
- *(*int32)(unsafe.Pointer(pParse + 48)) += (*TExprList)(unsafe.Pointer(pGroupBy)).FnExpr
+ *(*int32)(unsafe.Pointer(pParse + 52)) += (*TExprList)(unsafe.Pointer(pGroupBy)).FnExpr
_sqlite3VdbeAddOp2(tls, v, int32(OP_Integer), 0, iAbortFlag)
_sqlite3VdbeAddOp3(tls, v, int32(OP_Null), 0, iAMem, iAMem+(*TExprList)(unsafe.Pointer(pGroupBy)).FnExpr-int32(1))
/* Begin a loop that will extract all source rows in GROUP BY order.
@@ -127028,16 +127364,16 @@ func _sqlite3Select(tls *libc.TLS, pParse uintptr, p uintptr, pDest uintptr) (r
*/
_sqlite3VdbeAddOp2(tls, v, int32(OP_Gosub), regReset, addrReset)
if libc.Int32FromUint8((*(*TDistinctCtx)(unsafe.Pointer(bp))).FisTnct) == int32(2) {
- v44 = int32(WHERE_DISTINCTBY)
+ v45 = int32(WHERE_DISTINCTBY)
} else {
- v44 = int32(WHERE_GROUPBY)
+ v45 = int32(WHERE_GROUPBY)
}
if orderByGrp != 0 {
- v45 = int32(WHERE_SORTBYGROUP)
+ v46 = int32(WHERE_SORTBYGROUP)
} else {
- v45 = 0
+ v46 = 0
}
- pWInfo = _sqlite3WhereBegin(tls, pParse, pTabList, pWhere, pGroupBy, pDistinct, p, libc.Uint16FromInt32(v44|v45|libc.Int32FromUint16(distFlag)), 0)
+ pWInfo = _sqlite3WhereBegin(tls, pParse, pTabList, pWhere, pGroupBy, pDistinct, p, libc.Uint16FromInt32(v45|v46|libc.Int32FromUint16(distFlag)), 0)
if pWInfo == uintptr(0) {
_sqlite3ExprListDelete(tls, db, pDistinct)
goto select_end
@@ -127055,11 +127391,11 @@ func _sqlite3Select(tls *libc.TLS, pParse uintptr, p uintptr, pDest uintptr) (r
groupBySort = 0
} else {
if (*(*TDistinctCtx)(unsafe.Pointer(bp))).FisTnct != 0 && (*TSelect)(unsafe.Pointer(p)).FselFlags&uint32(SF_Distinct) == uint32(0) {
- v46 = __ccgo_ts + 20471
+ v47 = __ccgo_ts + 20543
} else {
- v46 = __ccgo_ts + 20480
+ v47 = __ccgo_ts + 20552
}
- _sqlite3VdbeExplain(tls, pParse, uint8(0), __ccgo_ts+19323, libc.VaList(bp+128, v46))
+ _sqlite3VdbeExplain(tls, pParse, uint8(0), __ccgo_ts+19395, libc.VaList(bp+128, v47))
groupBySort = int32(1)
nGroupBy = (*TExprList)(unsafe.Pointer(pGroupBy)).FnExpr
nCol = nGroupBy
@@ -127073,8 +127409,8 @@ func _sqlite3Select(tls *libc.TLS, pParse uintptr, p uintptr, pDest uintptr) (r
nCol++
j++
}
- goto _47
- _47:
+ goto _48
+ _48:
;
i++
}
@@ -127092,8 +127428,8 @@ func _sqlite3Select(tls *libc.TLS, pParse uintptr, p uintptr, pDest uintptr) (r
_sqlite3ExprCode(tls, pParse, (*TAggInfo_col)(unsafe.Pointer(pCol)).FpCExpr, j+regBase)
j++
}
- goto _48
- _48:
+ goto _49
+ _49:
;
i++
}
@@ -127104,12 +127440,12 @@ func _sqlite3Select(tls *libc.TLS, pParse uintptr, p uintptr, pDest uintptr) (r
_sqlite3ReleaseTempReg(tls, pParse, regRecord)
_sqlite3ReleaseTempRange(tls, pParse, regBase, nCol)
_sqlite3WhereEnd(tls, pWInfo)
- v51 = pParse + 44
- v50 = *(*int32)(unsafe.Pointer(v51))
- *(*int32)(unsafe.Pointer(v51))++
- v49 = v50
- sortPTab = v49
- (*TAggInfo)(unsafe.Pointer(pAggInfo)).FsortingIdxPTab = v49
+ v52 = pParse + 48
+ v51 = *(*int32)(unsafe.Pointer(v52))
+ *(*int32)(unsafe.Pointer(v52))++
+ v50 = v51
+ sortPTab = v50
+ (*TAggInfo)(unsafe.Pointer(pAggInfo)).FsortingIdxPTab = v50
sortOut = _sqlite3GetTempReg(tls, pParse)
_sqlite3VdbeAddOp3(tls, v, int32(OP_OpenPseudo), sortPTab, sortOut, nCol)
_sqlite3VdbeAddOp2(tls, v, int32(OP_SorterSort), (*TAggInfo)(unsafe.Pointer(pAggInfo)).FsortingIdx, addrEnd)
@@ -127158,12 +127494,16 @@ func _sqlite3Select(tls *libc.TLS, pParse uintptr, p uintptr, pDest uintptr) (r
if iOrderByCol != 0 {
pX = (*(*TExprList_item)(unsafe.Pointer((*TSelect)(unsafe.Pointer(p)).FpEList + 8 + uintptr(iOrderByCol-int32(1))*20))).FpExpr
pBase = _sqlite3ExprSkipCollateAndLikely(tls, pX)
+ for pBase != uintptr(0) && libc.Int32FromUint8((*TExpr)(unsafe.Pointer(pBase)).Fop) == int32(TK_IF_NULL_ROW) {
+ pX = (*TExpr)(unsafe.Pointer(pBase)).FpLeft
+ pBase = _sqlite3ExprSkipCollateAndLikely(tls, pX)
+ }
if pBase != uintptr(0) && libc.Int32FromUint8((*TExpr)(unsafe.Pointer(pBase)).Fop) != int32(TK_AGG_COLUMN) && libc.Int32FromUint8((*TExpr)(unsafe.Pointer(pBase)).Fop) != int32(TK_REGISTER) {
_sqlite3ExprToRegister(tls, pX, iAMem+j)
}
}
- goto _52
- _52:
+ goto _53
+ _53:
;
j++
}
@@ -127233,9 +127573,9 @@ func _sqlite3Select(tls *libc.TLS, pParse uintptr, p uintptr, pDest uintptr) (r
_fixDistinctOpenEph(tls, pParse, eDist, (*TAggInfo_func)(unsafe.Pointer(pF)).FiDistinct, (*TAggInfo_func)(unsafe.Pointer(pF)).FiDistAddr)
}
} else {
- v53 = _isSimpleCount(tls, p, pAggInfo)
- pTab1 = v53
- if v53 != uintptr(0) {
+ v54 = _isSimpleCount(tls, p, pAggInfo)
+ pTab1 = v54
+ if v54 != uintptr(0) {
/* tag-select-0821
**
** If isSimpleCount() returns a pointer to a Table structure, then
@@ -127252,10 +127592,10 @@ func _sqlite3Select(tls *libc.TLS, pParse uintptr, p uintptr, pDest uintptr) (r
** always spread across less pages than their corresponding tables.
*/
iDb1 = _sqlite3SchemaToIndex(tls, (*TParse)(unsafe.Pointer(pParse)).Fdb, (*TTable)(unsafe.Pointer(pTab1)).FpSchema)
- v55 = pParse + 44
- v54 = *(*int32)(unsafe.Pointer(v55))
- *(*int32)(unsafe.Pointer(v55))++
- iCsr = v54 /* Iterator variable */
+ v56 = pParse + 48
+ v55 = *(*int32)(unsafe.Pointer(v56))
+ *(*int32)(unsafe.Pointer(v56))++
+ iCsr = v55 /* Iterator variable */
pKeyInfo2 = uintptr(0) /* Keyinfo for scanned index */
pBest = uintptr(0) /* Best index found so far */
iRoot = (*TTable)(unsafe.Pointer(pTab1)).Ftnum /* Root page of scanned b-tree */
@@ -127282,8 +127622,8 @@ func _sqlite3Select(tls *libc.TLS, pParse uintptr, p uintptr, pDest uintptr) (r
if int32(uint32(*(*uint16)(unsafe.Pointer(pIdx + 56))&0x4>>2)) == 0 && int32((*TIndex)(unsafe.Pointer(pIdx)).FszIdxRow) < int32((*TTable)(unsafe.Pointer(pTab1)).FszTabRow) && (*TIndex)(unsafe.Pointer(pIdx)).FpPartIdxWhere == uintptr(0) && (!(pBest != 0) || int32((*TIndex)(unsafe.Pointer(pIdx)).FszIdxRow) < int32((*TIndex)(unsafe.Pointer(pBest)).FszIdxRow)) {
pBest = pIdx
}
- goto _56
- _56:
+ goto _57
+ _57:
;
pIdx = (*TIndex)(unsafe.Pointer(pIdx)).FpNext
}
@@ -127323,32 +127663,32 @@ func _sqlite3Select(tls *libc.TLS, pParse uintptr, p uintptr, pDest uintptr) (r
break
}
if (*TExpr)(unsafe.Pointer((*(*TAggInfo_func)(unsafe.Pointer((*TAggInfo)(unsafe.Pointer(pAggInfo)).FaFunc + uintptr(i)*24))).FpFExpr)).Fflags&libc.Uint32FromInt32(libc.Int32FromInt32(EP_WinFunc)) != uint32(0) {
- goto _57
+ goto _58
}
if (*TFuncDef)(unsafe.Pointer((*(*TAggInfo_func)(unsafe.Pointer((*TAggInfo)(unsafe.Pointer(pAggInfo)).FaFunc + uintptr(i)*24))).FpFunc)).FfuncFlags&uint32(SQLITE_FUNC_NEEDCOLL) != 0 {
break
}
- goto _57
- _57:
+ goto _58
+ _58:
;
i++
}
if i == (*TAggInfo)(unsafe.Pointer(pAggInfo)).FnFunc {
- v59 = pParse + 48
- *(*int32)(unsafe.Pointer(v59))++
- v58 = *(*int32)(unsafe.Pointer(v59))
- regAcc = v58
+ v60 = pParse + 52
+ *(*int32)(unsafe.Pointer(v60))++
+ v59 = *(*int32)(unsafe.Pointer(v60))
+ regAcc = v59
_sqlite3VdbeAddOp2(tls, v, int32(OP_Integer), 0, regAcc)
}
} else {
if (*TAggInfo)(unsafe.Pointer(pAggInfo)).FnFunc == int32(1) && (*(*TAggInfo_func)(unsafe.Pointer((*TAggInfo)(unsafe.Pointer(pAggInfo)).FaFunc))).FiDistinct >= 0 {
pDistinct1 = *(*uintptr)(unsafe.Pointer((*(*TAggInfo_func)(unsafe.Pointer((*TAggInfo)(unsafe.Pointer(pAggInfo)).FaFunc))).FpFExpr + 20))
if pDistinct1 != 0 {
- v60 = libc.Int32FromInt32(WHERE_WANT_DISTINCT) | libc.Int32FromInt32(WHERE_AGG_DISTINCT)
+ v61 = libc.Int32FromInt32(WHERE_WANT_DISTINCT) | libc.Int32FromInt32(WHERE_AGG_DISTINCT)
} else {
- v60 = 0
+ v61 = 0
}
- distFlag1 = libc.Uint16FromInt32(v60)
+ distFlag1 = libc.Uint16FromInt32(v61)
}
}
_assignAggregateRegisters(tls, pParse, pAggInfo)
@@ -127390,7 +127730,7 @@ func _sqlite3Select(tls *libc.TLS, pParse uintptr, p uintptr, pDest uintptr) (r
_sqlite3VdbeResolveLabel(tls, v, addrEnd)
} /* endif aggregate query */
if libc.Int32FromUint8((*(*TDistinctCtx)(unsafe.Pointer(bp))).FeTnctType) == int32(WHERE_DISTINCT_UNORDERED) {
- _explainTempTable(tls, pParse, __ccgo_ts+20471)
+ _explainTempTable(tls, pParse, __ccgo_ts+20543)
}
/* If there is an ORDER BY clause, then we need to sort the results
** and send them to the callback one by one. tag-select-0900
@@ -127496,7 +127836,7 @@ func _sqlite3_get_table_cb(tls *libc.TLS, pArg uintptr, nCol int32, argv uintptr
if !(i < nCol) {
break
}
- z = Xsqlite3_mprintf(tls, __ccgo_ts+3864, libc.VaList(bp+8, *(*uintptr)(unsafe.Pointer(colv + uintptr(i)*4))))
+ z = Xsqlite3_mprintf(tls, __ccgo_ts+3890, libc.VaList(bp+8, *(*uintptr)(unsafe.Pointer(colv + uintptr(i)*4))))
if z == uintptr(0) {
goto malloc_failed
}
@@ -127512,7 +127852,7 @@ func _sqlite3_get_table_cb(tls *libc.TLS, pArg uintptr, nCol int32, argv uintptr
} else {
if libc.Int32FromUint32((*TTabResult)(unsafe.Pointer(p)).FnColumn) != nCol {
Xsqlite3_free(tls, (*TTabResult)(unsafe.Pointer(p)).FzErrMsg)
- (*TTabResult)(unsafe.Pointer(p)).FzErrMsg = Xsqlite3_mprintf(tls, __ccgo_ts+20489, 0)
+ (*TTabResult)(unsafe.Pointer(p)).FzErrMsg = Xsqlite3_mprintf(tls, __ccgo_ts+20561, 0)
(*TTabResult)(unsafe.Pointer(p)).Frc = int32(SQLITE_ERROR)
return int32(1)
}
@@ -127602,7 +127942,7 @@ func Xsqlite3_get_table(tls *libc.TLS, db uintptr, zSql uintptr, pazResult uintp
if (*(*TTabResult)(unsafe.Pointer(bp))).FzErrMsg != 0 {
if pzErrMsg != 0 {
Xsqlite3_free(tls, *(*uintptr)(unsafe.Pointer(pzErrMsg)))
- *(*uintptr)(unsafe.Pointer(pzErrMsg)) = Xsqlite3_mprintf(tls, __ccgo_ts+3864, libc.VaList(bp+40, (*(*TTabResult)(unsafe.Pointer(bp))).FzErrMsg))
+ *(*uintptr)(unsafe.Pointer(pzErrMsg)) = Xsqlite3_mprintf(tls, __ccgo_ts+3890, libc.VaList(bp+40, (*(*TTabResult)(unsafe.Pointer(bp))).FzErrMsg))
}
Xsqlite3_free(tls, (*(*TTabResult)(unsafe.Pointer(bp))).FzErrMsg)
}
@@ -127764,7 +128104,7 @@ func _sqlite3BeginTrigger(tls *libc.TLS, pParse uintptr, pName1 uintptr, pName2
if isTemp != 0 {
/* If TEMP was specified, then the trigger name may not be qualified. */
if (*TToken)(unsafe.Pointer(pName2)).Fn > uint32(0) {
- _sqlite3ErrorMsg(tls, pParse, __ccgo_ts+20554, 0)
+ _sqlite3ErrorMsg(tls, pParse, __ccgo_ts+20626, 0)
goto trigger_cleanup
}
iDb = int32(1)
@@ -127804,7 +128144,7 @@ func _sqlite3BeginTrigger(tls *libc.TLS, pParse uintptr, pName1 uintptr, pName2
if (*Tsqlite3)(unsafe.Pointer(db)).FmallocFailed != 0 {
goto trigger_cleanup
}
- _sqlite3FixInit(tls, bp+4, pParse, iDb, __ccgo_ts+20600, *(*uintptr)(unsafe.Pointer(bp)))
+ _sqlite3FixInit(tls, bp+4, pParse, iDb, __ccgo_ts+20672, *(*uintptr)(unsafe.Pointer(bp)))
if _sqlite3FixSrcList(tls, bp+4, pTableName) != 0 {
goto trigger_cleanup
}
@@ -127814,11 +128154,11 @@ func _sqlite3BeginTrigger(tls *libc.TLS, pParse uintptr, pName1 uintptr, pName2
goto trigger_orphan_error
}
if libc.Int32FromUint8((*TTable)(unsafe.Pointer(pTab)).FeTabType) == int32(TABTYP_VTAB) {
- _sqlite3ErrorMsg(tls, pParse, __ccgo_ts+20608, 0)
+ _sqlite3ErrorMsg(tls, pParse, __ccgo_ts+20680, 0)
goto trigger_orphan_error
}
if (*TTable)(unsafe.Pointer(pTab)).FtabFlags&uint32(TF_Shadow) != uint32(0) && _sqlite3ReadOnlyShadowTables(tls, db) != 0 {
- _sqlite3ErrorMsg(tls, pParse, __ccgo_ts+20649, 0)
+ _sqlite3ErrorMsg(tls, pParse, __ccgo_ts+20721, 0)
goto trigger_orphan_error
}
/* Check that the trigger name is not reserved and that no trigger of the
@@ -127827,13 +128167,13 @@ func _sqlite3BeginTrigger(tls *libc.TLS, pParse uintptr, pName1 uintptr, pName2
if zName == uintptr(0) {
goto trigger_cleanup
}
- if _sqlite3CheckObjectName(tls, pParse, zName, __ccgo_ts+20600, (*TTable)(unsafe.Pointer(pTab)).FzName) != 0 {
+ if _sqlite3CheckObjectName(tls, pParse, zName, __ccgo_ts+20672, (*TTable)(unsafe.Pointer(pTab)).FzName) != 0 {
goto trigger_cleanup
}
if !(libc.Int32FromUint8((*TParse)(unsafe.Pointer(pParse)).FeParseMode) >= libc.Int32FromInt32(PARSE_MODE_RENAME)) {
if _sqlite3HashFind(tls, (*(*TDb)(unsafe.Pointer((*Tsqlite3)(unsafe.Pointer(db)).FaDb + uintptr(iDb)*16))).FpSchema+40, zName) != 0 {
if !(noErr != 0) {
- _sqlite3ErrorMsg(tls, pParse, __ccgo_ts+20689, libc.VaList(bp+64, *(*uintptr)(unsafe.Pointer(bp))))
+ _sqlite3ErrorMsg(tls, pParse, __ccgo_ts+20761, libc.VaList(bp+64, *(*uintptr)(unsafe.Pointer(bp))))
} else {
_sqlite3CodeVerifySchema(tls, pParse, iDb)
}
@@ -127841,8 +128181,8 @@ func _sqlite3BeginTrigger(tls *libc.TLS, pParse uintptr, pName1 uintptr, pName2
}
}
/* Do not create a trigger on a system table */
- if Xsqlite3_strnicmp(tls, (*TTable)(unsafe.Pointer(pTab)).FzName, __ccgo_ts+6655, int32(7)) == 0 {
- _sqlite3ErrorMsg(tls, pParse, __ccgo_ts+20715, 0)
+ if Xsqlite3_strnicmp(tls, (*TTable)(unsafe.Pointer(pTab)).FzName, __ccgo_ts+6680, int32(7)) == 0 {
+ _sqlite3ErrorMsg(tls, pParse, __ccgo_ts+20787, 0)
goto trigger_cleanup
}
/* INSTEAD of triggers are only for views and views only support INSTEAD
@@ -127850,15 +128190,15 @@ func _sqlite3BeginTrigger(tls *libc.TLS, pParse uintptr, pName1 uintptr, pName2
*/
if libc.Int32FromUint8((*TTable)(unsafe.Pointer(pTab)).FeTabType) == int32(TABTYP_VIEW) && tr_tm != int32(TK_INSTEAD) {
if tr_tm == int32(TK_BEFORE) {
- v1 = __ccgo_ts + 20753
+ v1 = __ccgo_ts + 20825
} else {
- v1 = __ccgo_ts + 20760
+ v1 = __ccgo_ts + 20832
}
- _sqlite3ErrorMsg(tls, pParse, __ccgo_ts+20766, libc.VaList(bp+64, v1, pTableName+8))
+ _sqlite3ErrorMsg(tls, pParse, __ccgo_ts+20838, libc.VaList(bp+64, v1, pTableName+8))
goto trigger_orphan_error
}
if !(libc.Int32FromUint8((*TTable)(unsafe.Pointer(pTab)).FeTabType) == libc.Int32FromInt32(TABTYP_VIEW)) && tr_tm == int32(TK_INSTEAD) {
- _sqlite3ErrorMsg(tls, pParse, __ccgo_ts+20803, libc.VaList(bp+64, pTableName+8))
+ _sqlite3ErrorMsg(tls, pParse, __ccgo_ts+20875, libc.VaList(bp+64, pTableName+8))
goto trigger_orphan_error
}
if !(libc.Int32FromUint8((*TParse)(unsafe.Pointer(pParse)).FeParseMode) >= libc.Int32FromInt32(PARSE_MODE_RENAME)) {
@@ -127878,9 +128218,9 @@ func _sqlite3BeginTrigger(tls *libc.TLS, pParse uintptr, pName1 uintptr, pName2
goto trigger_cleanup
}
if libc.Bool(!(libc.Int32FromInt32(OMIT_TEMPDB) != 0)) && iTabDb == int32(1) {
- v3 = __ccgo_ts + 6663
+ v3 = __ccgo_ts + 6688
} else {
- v3 = __ccgo_ts + 6151
+ v3 = __ccgo_ts + 6175
}
if _sqlite3AuthCheck(tls, pParse, int32(SQLITE_INSERT), v3, uintptr(0), zDb) != 0 {
goto trigger_cleanup
@@ -127980,7 +128320,7 @@ func _sqlite3FinishTrigger(tls *libc.TLS, pParse uintptr, pStepList uintptr, pAl
pStepList = (*TTriggerStep)(unsafe.Pointer(pStepList)).FpNext
}
_sqlite3TokenInit(tls, bp+56, (*TTrigger)(unsafe.Pointer(pTrig)).FzName)
- _sqlite3FixInit(tls, bp, pParse, iDb, __ccgo_ts+20600, bp+56)
+ _sqlite3FixInit(tls, bp, pParse, iDb, __ccgo_ts+20672, bp+56)
if _sqlite3FixTriggerStep(tls, bp, (*TTrigger)(unsafe.Pointer(pTrig)).Fstep_list) != 0 || _sqlite3FixExpr(tls, bp, (*TTrigger)(unsafe.Pointer(pTrig)).FpWhen) != 0 {
goto triggerfinish_cleanup
}
@@ -128002,7 +128342,7 @@ func _sqlite3FinishTrigger(tls *libc.TLS, pParse uintptr, pStepList uintptr, pAl
break
}
if (*TTriggerStep)(unsafe.Pointer(pStep)).FzTarget != uintptr(0) && _sqlite3ShadowTableName(tls, db, (*TTriggerStep)(unsafe.Pointer(pStep)).FzTarget) != 0 {
- _sqlite3ErrorMsg(tls, pParse, __ccgo_ts+20849, libc.VaList(bp+72, (*TTrigger)(unsafe.Pointer(pTrig)).FzName, (*TTriggerStep)(unsafe.Pointer(pStep)).FzTarget))
+ _sqlite3ErrorMsg(tls, pParse, __ccgo_ts+20921, libc.VaList(bp+72, (*TTrigger)(unsafe.Pointer(pTrig)).FzName, (*TTriggerStep)(unsafe.Pointer(pStep)).FzTarget))
goto triggerfinish_cleanup
}
goto _1
@@ -128018,10 +128358,10 @@ func _sqlite3FinishTrigger(tls *libc.TLS, pParse uintptr, pStepList uintptr, pAl
}
_sqlite3BeginWriteOperation(tls, pParse, 0, iDb)
z = _sqlite3DbStrNDup(tls, db, (*TToken)(unsafe.Pointer(pAll)).Fz, uint64((*TToken)(unsafe.Pointer(pAll)).Fn))
- _sqlite3NestedParse(tls, pParse, __ccgo_ts+20897, libc.VaList(bp+72, (*(*TDb)(unsafe.Pointer((*Tsqlite3)(unsafe.Pointer(db)).FaDb + uintptr(iDb)*16))).FzDbSName, zName, (*TTrigger)(unsafe.Pointer(pTrig)).Ftable, z))
+ _sqlite3NestedParse(tls, pParse, __ccgo_ts+20969, libc.VaList(bp+72, (*(*TDb)(unsafe.Pointer((*Tsqlite3)(unsafe.Pointer(db)).FaDb + uintptr(iDb)*16))).FzDbSName, zName, (*TTrigger)(unsafe.Pointer(pTrig)).Ftable, z))
_sqlite3DbFree(tls, db, z)
_sqlite3ChangeCookie(tls, pParse, iDb)
- _sqlite3VdbeAddParseSchemaOp(tls, v, iDb, _sqlite3MPrintf(tls, db, __ccgo_ts+20972, libc.VaList(bp+72, zName)), uint16(0))
+ _sqlite3VdbeAddParseSchemaOp(tls, v, iDb, _sqlite3MPrintf(tls, db, __ccgo_ts+21044, libc.VaList(bp+72, zName)), uint16(0))
}
}
if (*Tsqlite3)(unsafe.Pointer(db)).Finit1.Fbusy != 0 {
@@ -128289,11 +128629,11 @@ func _sqlite3DropTrigger(tls *libc.TLS, pParse uintptr, pName uintptr, noErr int
}
if !(pTrigger != 0) {
if !(noErr != 0) {
- _sqlite3ErrorMsg(tls, pParse, __ccgo_ts+21001, libc.VaList(bp+8, pName+8))
+ _sqlite3ErrorMsg(tls, pParse, __ccgo_ts+21073, libc.VaList(bp+8, pName+8))
} else {
_sqlite3CodeVerifyNamedSchema(tls, pParse, zDb)
}
- (*TParse)(unsafe.Pointer(pParse)).FcheckSchema = uint8(1)
+ libc.SetBitFieldPtr8Uint32(pParse+32, libc.Uint32FromInt32(1), 3, 0x8)
goto drop_trigger_cleanup
}
_sqlite3DropTriggerPtr(tls, pParse, pTrigger)
@@ -128331,9 +128671,9 @@ func _sqlite3DropTriggerPtr(tls *libc.TLS, pParse uintptr, pTrigger uintptr) {
code = int32(SQLITE_DROP_TRIGGER)
zDb = (*(*TDb)(unsafe.Pointer((*Tsqlite3)(unsafe.Pointer(db)).FaDb + uintptr(iDb)*16))).FzDbSName
if libc.Bool(!(libc.Int32FromInt32(OMIT_TEMPDB) != 0)) && iDb == int32(1) {
- v1 = __ccgo_ts + 6663
+ v1 = __ccgo_ts + 6688
} else {
- v1 = __ccgo_ts + 6151
+ v1 = __ccgo_ts + 6175
}
zTab = v1
if iDb == int32(1) {
@@ -128348,7 +128688,7 @@ func _sqlite3DropTriggerPtr(tls *libc.TLS, pParse uintptr, pTrigger uintptr) {
v2 = _sqlite3GetVdbe(tls, pParse)
v = v2
if v2 != uintptr(0) {
- _sqlite3NestedParse(tls, pParse, __ccgo_ts+21021, libc.VaList(bp+8, (*(*TDb)(unsafe.Pointer((*Tsqlite3)(unsafe.Pointer(db)).FaDb + uintptr(iDb)*16))).FzDbSName, (*TTrigger)(unsafe.Pointer(pTrigger)).FzName))
+ _sqlite3NestedParse(tls, pParse, __ccgo_ts+21093, libc.VaList(bp+8, (*(*TDb)(unsafe.Pointer((*Tsqlite3)(unsafe.Pointer(db)).FaDb + uintptr(iDb)*16))).FzDbSName, (*TTrigger)(unsafe.Pointer(pTrigger)).FzName))
_sqlite3ChangeCookie(tls, pParse, iDb)
_sqlite3VdbeAddOp4(tls, v, int32(OP_DropTrigger), iDb, 0, 0, (*TTrigger)(unsafe.Pointer(pTrigger)).FzName, 0)
}
@@ -128481,11 +128821,11 @@ func _triggersReallyExist(tls *libc.TLS, pParse uintptr, pTab uintptr, op int32,
if libc.Int32FromUint8((*TTable)(unsafe.Pointer(pTab)).FeTabType) == int32(TABTYP_VTAB) {
if op != int32(TK_INSERT) {
if op == int32(TK_DELETE) {
- v1 = __ccgo_ts + 21083
+ v1 = __ccgo_ts + 21155
} else {
- v1 = __ccgo_ts + 21090
+ v1 = __ccgo_ts + 21162
}
- _sqlite3ErrorMsg(tls, pParse, __ccgo_ts+21097, libc.VaList(bp+8, v1))
+ _sqlite3ErrorMsg(tls, pParse, __ccgo_ts+21169, libc.VaList(bp+8, v1))
}
(*TTrigger)(unsafe.Pointer(p)).Ftr_tm = uint8(TRIGGER_BEFORE)
} else {
@@ -128587,7 +128927,7 @@ func _isAsteriskTerm(tls *libc.TLS, pParse uintptr, pTerm uintptr) (r int32) {
if libc.Int32FromUint8((*TExpr)(unsafe.Pointer((*TExpr)(unsafe.Pointer(pTerm)).FpRight)).Fop) != int32(TK_ASTERISK) {
return 0
}
- _sqlite3ErrorMsg(tls, pParse, __ccgo_ts+21145, 0)
+ _sqlite3ErrorMsg(tls, pParse, __ccgo_ts+21217, 0)
return int32(1)
}
@@ -128735,12 +129075,12 @@ func _sqlite3ProcessReturningSubqueries(tls *libc.TLS, pEList uintptr, pTab uint
func _codeReturningTrigger(tls *libc.TLS, pParse uintptr, pTrigger uintptr, pTab uintptr, regIn int32) {
bp := tls.Alloc(176)
defer tls.Free(176)
- var db, pCol, pNew, pReturning, v, v2 uintptr
+ var db, pCol, pFrom, pNew, pReturning, v, v2 uintptr
var i, nCol, reg, v1 int32
- var _ /* sFrom at bp+76 */ TSrcList
+ var _ /* fromSpace at bp+76 */ [56]Tu8
var _ /* sNC at bp+132 */ TNameContext
var _ /* sSelect at bp+0 */ TSelect
- _, _, _, _, _, _, _, _, _, _ = db, i, nCol, pCol, pNew, pReturning, reg, v, v1, v2
+ _, _, _, _, _, _, _, _, _, _, _ = db, i, nCol, pCol, pFrom, pNew, pReturning, reg, v, v1, v2
v = (*TParse)(unsafe.Pointer(pParse)).FpVdbe
db = (*TParse)(unsafe.Pointer(pParse)).Fdb
if !((*TParse)(unsafe.Pointer(pParse)).FbReturning != 0) {
@@ -128748,19 +129088,22 @@ func _codeReturningTrigger(tls *libc.TLS, pParse uintptr, pTrigger uintptr, pTab
** this statement lacks a RETURNING clause. */
return
}
- pReturning = *(*uintptr)(unsafe.Pointer(pParse + 148))
+ pReturning = (*(*struct {
+ FpReturning uintptr
+ })(unsafe.Pointer(&(*TParse)(unsafe.Pointer(pParse)).Fu1))).FpReturning
if pTrigger != pReturning+8 {
/* This RETURNING trigger is for a different statement */
return
}
libc.Xmemset(tls, bp, 0, uint32(76))
- libc.Xmemset(tls, bp+76, 0, uint32(56))
+ pFrom = bp + 76
+ libc.Xmemset(tls, pFrom, 0, uint32(libc.UintptrFromInt32(0)+8)+libc.Uint32FromInt64(48))
(*(*TSelect)(unsafe.Pointer(bp))).FpEList = _sqlite3ExprListDup(tls, db, (*TReturning)(unsafe.Pointer(pReturning)).FpReturnEL, 0)
- (*(*TSelect)(unsafe.Pointer(bp))).FpSrc = bp + 76
- (*(*TSrcList)(unsafe.Pointer(bp + 76))).FnSrc = int32(1)
- (*(*TSrcItem)(unsafe.Pointer(bp + 76 + 8))).FpSTab = pTab
- (*(*TSrcItem)(unsafe.Pointer(bp + 76 + 8))).FzName = (*TTable)(unsafe.Pointer(pTab)).FzName /* tag-20240424-1 */
- (*(*TSrcItem)(unsafe.Pointer(bp + 76 + 8))).FiCursor = -int32(1)
+ (*(*TSelect)(unsafe.Pointer(bp))).FpSrc = pFrom
+ (*TSrcList)(unsafe.Pointer(pFrom)).FnSrc = int32(1)
+ (*(*TSrcItem)(unsafe.Pointer(pFrom + 8))).FpSTab = pTab
+ (*(*TSrcItem)(unsafe.Pointer(pFrom + 8))).FzName = (*TTable)(unsafe.Pointer(pTab)).FzName /* tag-20240424-1 */
+ (*(*TSrcItem)(unsafe.Pointer(pFrom + 8))).FiCursor = -int32(1)
_sqlite3SelectPrep(tls, pParse, bp, uintptr(0))
if (*TParse)(unsafe.Pointer(pParse)).FnErr == 0 {
_sqlite3GenerateColumnNames(tls, pParse, bp)
@@ -128771,7 +129114,7 @@ func _codeReturningTrigger(tls *libc.TLS, pParse uintptr, pTrigger uintptr, pTab
libc.Xmemset(tls, bp+132, 0, uint32(36))
if (*TReturning)(unsafe.Pointer(pReturning)).FnRetCol == 0 {
(*TReturning)(unsafe.Pointer(pReturning)).FnRetCol = (*TExprList)(unsafe.Pointer(pNew)).FnExpr
- v2 = pParse + 44
+ v2 = pParse + 48
v1 = *(*int32)(unsafe.Pointer(v2))
*(*int32)(unsafe.Pointer(v2))++
(*TReturning)(unsafe.Pointer(pReturning)).FiRetCur = v1
@@ -128785,7 +129128,7 @@ func _codeReturningTrigger(tls *libc.TLS, pParse uintptr, pTrigger uintptr, pTab
nCol = (*TExprList)(unsafe.Pointer(pNew)).FnExpr
reg = (*TParse)(unsafe.Pointer(pParse)).FnMem + int32(1)
_sqlite3ProcessReturningSubqueries(tls, pNew, pTab)
- *(*int32)(unsafe.Pointer(pParse + 48)) += nCol + int32(2)
+ *(*int32)(unsafe.Pointer(pParse + 52)) += nCol + int32(2)
(*TReturning)(unsafe.Pointer(pReturning)).FiRetReg = reg
i = 0
for {
@@ -128853,7 +129196,7 @@ func _codeTriggerProgram(tls *libc.TLS, pParse uintptr, pStepList uintptr, orcon
}
(*TParse)(unsafe.Pointer(pParse)).FeOrconf = libc.Uint8FromInt32(v2)
if (*TTriggerStep)(unsafe.Pointer(pStep)).FzSpan != 0 {
- _sqlite3VdbeAddOp4(tls, v, int32(OP_Trace), int32(0x7fffffff), int32(1), 0, _sqlite3MPrintf(tls, db, __ccgo_ts+6348, libc.VaList(bp+40, (*TTriggerStep)(unsafe.Pointer(pStep)).FzSpan)), -int32(6))
+ _sqlite3VdbeAddOp4(tls, v, int32(OP_Trace), int32(0x7fffffff), int32(1), 0, _sqlite3MPrintf(tls, db, __ccgo_ts+6372, libc.VaList(bp+40, (*TTriggerStep)(unsafe.Pointer(pStep)).FzSpan)), -int32(6))
}
switch libc.Int32FromUint8((*TTriggerStep)(unsafe.Pointer(pStep)).Fop) {
case int32(TK_UPDATE):
@@ -128904,8 +129247,8 @@ func _transferParseError(tls *libc.TLS, pTo uintptr, pFrom uintptr) {
// ** implementing trigger pTrigger with ON CONFLICT policy orconf.
// */
func _codeRowTrigger(tls *libc.TLS, pParse uintptr, pTrigger uintptr, pTab uintptr, orconf int32) (r uintptr) {
- bp := tls.Alloc(352)
- defer tls.Free(352)
+ bp := tls.Alloc(336)
+ defer tls.Free(336)
var db, pPrg, pProgram, pTop, pWhen, v, v1, v2 uintptr
var iEndTrigger int32
var _ /* sNC at bp+0 */ TNameContext
@@ -128952,10 +129295,12 @@ func _codeRowTrigger(tls *libc.TLS, pParse uintptr, pTrigger uintptr, pTab uintp
(*(*TParse)(unsafe.Pointer(bp + 36))).FeTriggerOp = (*TTrigger)(unsafe.Pointer(pTrigger)).Fop
(*(*TParse)(unsafe.Pointer(bp + 36))).FnQueryLoop = (*TParse)(unsafe.Pointer(pParse)).FnQueryLoop
(*(*TParse)(unsafe.Pointer(bp + 36))).FprepFlags = (*TParse)(unsafe.Pointer(pParse)).FprepFlags
+ (*(*TParse)(unsafe.Pointer(bp + 36))).Foldmask = uint32(0)
+ (*(*TParse)(unsafe.Pointer(bp + 36))).Fnewmask = uint32(0)
v = _sqlite3GetVdbe(tls, bp+36)
if v != 0 {
if (*TTrigger)(unsafe.Pointer(pTrigger)).FzName != 0 {
- _sqlite3VdbeChangeP4(tls, v, -int32(1), _sqlite3MPrintf(tls, db, __ccgo_ts+21187, libc.VaList(bp+336, (*TTrigger)(unsafe.Pointer(pTrigger)).FzName)), -int32(6))
+ _sqlite3VdbeChangeP4(tls, v, -int32(1), _sqlite3MPrintf(tls, db, __ccgo_ts+21259, libc.VaList(bp+328, (*TTrigger)(unsafe.Pointer(pTrigger)).FzName)), -int32(6))
}
/* If one was specified, code the WHEN clause. If it evaluates to false
** (or NULL) the sub-vdbe is immediately halted by jumping to the
@@ -128977,7 +129322,7 @@ func _codeRowTrigger(tls *libc.TLS, pParse uintptr, pTrigger uintptr, pTab uintp
_sqlite3VdbeAddOp0(tls, v, int32(OP_Halt))
_transferParseError(tls, pParse, bp+36)
if (*TParse)(unsafe.Pointer(pParse)).FnErr == 0 {
- (*TSubProgram)(unsafe.Pointer(pProgram)).FaOp = _sqlite3VdbeTakeOpArray(tls, v, pProgram+4, pTop+108)
+ (*TSubProgram)(unsafe.Pointer(pProgram)).FaOp = _sqlite3VdbeTakeOpArray(tls, v, pProgram+4, pTop+96)
}
(*TSubProgram)(unsafe.Pointer(pProgram)).FnMem = (*(*TParse)(unsafe.Pointer(bp + 36))).FnMem
(*TSubProgram)(unsafe.Pointer(pProgram)).FnCsr = (*(*TParse)(unsafe.Pointer(bp + 36))).FnTab
@@ -129049,7 +129394,7 @@ func _sqlite3CodeRowTriggerDirect(tls *libc.TLS, pParse uintptr, p uintptr, pTab
** is a pointer to the sub-vdbe containing the trigger program. */
if pPrg != 0 {
bRecursive = libc.BoolInt32((*TTrigger)(unsafe.Pointer(p)).FzName != 0 && uint64(0) == (*Tsqlite3)(unsafe.Pointer((*TParse)(unsafe.Pointer(pParse)).Fdb)).Fflags&uint64(SQLITE_RecTriggers))
- v2 = pParse + 48
+ v2 = pParse + 52
*(*int32)(unsafe.Pointer(v2))++
v1 = *(*int32)(unsafe.Pointer(v2))
_sqlite3VdbeAddOp4(tls, v, int32(OP_Program), reg, ignoreJump, v1, (*TTriggerPrg)(unsafe.Pointer(pPrg)).FpProgram, -int32(4))
@@ -129465,13 +129810,13 @@ func _updateFromSelect(tls *libc.TLS, pParse uintptr, iEph int32, pPk uintptr, p
func _sqlite3Update(tls *libc.TLS, pParse uintptr, pTabList uintptr, pChanges uintptr, pWhere uintptr, onError int32, pOrderBy uintptr, pLimit uintptr, pUpsert uintptr) {
bp := tls.Alloc(96)
defer tls.Free(96)
- var aRegIdx, aToOpen, aXRef, db, pIdx, pKeyInfo, pPk, pRowidExpr, pTab, pTrigger, pWInfo, v, v11, v16, v19, v21, v24, v26, v29, v31, v34, v37, v39, v4, v5 uintptr
- var addrOnce, addrOpen, addrTop, bFinishSeek, bProgress, eOnePass, flags, hasFK, i, iBaseCur, iCur, iDataCur, iDb, iEph, iIdxCur, iPk, iRowidExpr, isView, j, k, labelBreak, labelContinue, nAllIdx, nChangeFrom, nEphCol, nIdx, nKey, nOff, newmask, rc, reg, regKey, regNew, regNewRowid, regOld, regOldRowid, regRowCount, regRowSet, v1, v15, v18, v2, v20, v22, v23, v25, v27, v28, v3, v30, v32, v33, v35, v36, v38, v41, v46, v48, v49 int32
- var chngKey, chngPk, chngRowid, hCol, v8 Tu8
+ var aRegIdx, aToOpen, aXRef, db, pIdx, pKeyInfo, pPk, pRowidExpr, pTab, pTrigger, pWInfo, v, v10, v15, v18, v20, v23, v25, v28, v30, v33, v36, v38, v4, v5 uintptr
+ var addrOnce, addrOpen, addrTop, bFinishSeek, bProgress, eOnePass, flags, hasFK, i, iBaseCur, iCur, iDataCur, iDb, iEph, iIdxCur, iPk, iRowidExpr, isView, j, k, labelBreak, labelContinue, nAllIdx, nChangeFrom, nEphCol, nIdx, nKey, nOff, newmask, rc, reg, regKey, regNew, regNewRowid, regOld, regOldRowid, regRowCount, regRowSet, v1, v14, v17, v19, v2, v21, v22, v24, v26, v27, v29, v3, v31, v32, v34, v35, v37, v40, v45, v47, v48 int32
+ var chngKey, chngPk, chngRowid, v8 Tu8
var colFlags, oldmask Tu32
var nPk Ti16
- var v13 uint64
- var v43 uint32
+ var v12 uint64
+ var v42 uint32
var _ /* aiCurOnePass at bp+48 */ [2]int32
var _ /* bReplace at bp+56 */ int32
var _ /* iNotUsed1 at bp+60 */ int32
@@ -129479,21 +129824,21 @@ func _sqlite3Update(tls *libc.TLS, pParse uintptr, pTabList uintptr, pChanges ui
var _ /* sContext at bp+0 */ TAuthContext
var _ /* sNC at bp+8 */ TNameContext
var _ /* tmask at bp+44 */ int32
- _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _ = aRegIdx, aToOpen, aXRef, addrOnce, addrOpen, addrTop, bFinishSeek, bProgress, chngKey, chngPk, chngRowid, colFlags, db, eOnePass, flags, hCol, hasFK, i, iBaseCur, iCur, iDataCur, iDb, iEph, iIdxCur, iPk, iRowidExpr, isView, j, k, labelBreak, labelContinue, nAllIdx, nChangeFrom, nEphCol, nIdx, nKey, nOff, nPk, newmask, oldmask, pIdx, pKeyInfo, pPk, pRowidExpr, pTab, pTrigger, pWInfo, rc, reg, regKey, regNew, regNewRowid, regOld, regOldRowid, regRowCount, regRowSet, v, v1, v11, v13, v15, v16, v18, v19, v2, v20, v21, v22, v23, v24, v25, v26, v27, v28, v29, v3, v30, v31, v32, v33, v34, v35, v36, v37, v38, v39, v4, v41, v43, v46, v48, v49, v5, v8 /* The table to be updated */
- addrTop = 0 /* VDBE instruction address of the start of the loop */
- pWInfo = uintptr(0) /* The database structure */
- aRegIdx = uintptr(0) /* Registers for to each index and the main table */
- aXRef = uintptr(0) /* Either chngPk or chngRowid */
- pRowidExpr = uintptr(0) /* Expression defining the new record number */
- iRowidExpr = -int32(1) /* Mask of NEW.* columns accessed by BEFORE triggers */
- iEph = 0 /* Ephemeral table holding all primary key values */
- nKey = 0 /* The write cursors opened by WHERE_ONEPASS */
- addrOpen = 0 /* Address of OP_OpenEphemeral */
- iPk = 0 /* First of nPk cells holding PRIMARY KEY value */
- nPk = 0 /* Number of components of the PRIMARY KEY */
- *(*int32)(unsafe.Pointer(bp + 56)) = 0 /* True if REPLACE conflict resolution might happen */
- bFinishSeek = int32(1) /* The OP_FinishSeek opcode is needed */
- nChangeFrom = 0 /* If there is a FROM, pChanges->nExpr, else 0 */
+ _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _ = aRegIdx, aToOpen, aXRef, addrOnce, addrOpen, addrTop, bFinishSeek, bProgress, chngKey, chngPk, chngRowid, colFlags, db, eOnePass, flags, hasFK, i, iBaseCur, iCur, iDataCur, iDb, iEph, iIdxCur, iPk, iRowidExpr, isView, j, k, labelBreak, labelContinue, nAllIdx, nChangeFrom, nEphCol, nIdx, nKey, nOff, nPk, newmask, oldmask, pIdx, pKeyInfo, pPk, pRowidExpr, pTab, pTrigger, pWInfo, rc, reg, regKey, regNew, regNewRowid, regOld, regOldRowid, regRowCount, regRowSet, v, v1, v10, v12, v14, v15, v17, v18, v19, v2, v20, v21, v22, v23, v24, v25, v26, v27, v28, v29, v3, v30, v31, v32, v33, v34, v35, v36, v37, v38, v4, v40, v42, v45, v47, v48, v5, v8 /* The table to be updated */
+ addrTop = 0 /* VDBE instruction address of the start of the loop */
+ pWInfo = uintptr(0) /* The database structure */
+ aRegIdx = uintptr(0) /* Registers for to each index and the main table */
+ aXRef = uintptr(0) /* Either chngPk or chngRowid */
+ pRowidExpr = uintptr(0) /* Expression defining the new record number */
+ iRowidExpr = -int32(1) /* Mask of NEW.* columns accessed by BEFORE triggers */
+ iEph = 0 /* Ephemeral table holding all primary key values */
+ nKey = 0 /* The write cursors opened by WHERE_ONEPASS */
+ addrOpen = 0 /* Address of OP_OpenEphemeral */
+ iPk = 0 /* First of nPk cells holding PRIMARY KEY value */
+ nPk = 0 /* Number of components of the PRIMARY KEY */
+ *(*int32)(unsafe.Pointer(bp + 56)) = 0 /* True if REPLACE conflict resolution might happen */
+ bFinishSeek = int32(1) /* The OP_FinishSeek opcode is needed */
+ nChangeFrom = 0 /* If there is a FROM, pChanges->nExpr, else 0 */
/* Register Allocations */
regRowCount = 0 /* A count of rows changed */
regOldRowid = 0 /* The old rowid */
@@ -129540,7 +129885,7 @@ func _sqlite3Update(tls *libc.TLS, pParse uintptr, pTabList uintptr, pChanges ui
** need to occur right after the database cursor. So go ahead and
** allocate enough space, just in case.
*/
- v4 = pParse + 44
+ v4 = pParse + 48
v3 = *(*int32)(unsafe.Pointer(v4))
*(*int32)(unsafe.Pointer(v4))++
v2 = v3
@@ -129623,58 +129968,46 @@ func _sqlite3Update(tls *libc.TLS, pParse uintptr, pTabList uintptr, pChanges ui
if !(i < (*TExprList)(unsafe.Pointer(pChanges)).FnExpr) {
break
}
- hCol = _sqlite3StrIHash(tls, (*(*TExprList_item)(unsafe.Pointer(pChanges + 8 + uintptr(i)*20))).FzEName)
/* If this is an UPDATE with a FROM clause, do not resolve expressions
** here. The call to sqlite3Select() below will do that. */
if nChangeFrom == 0 && _sqlite3ResolveExprNames(tls, bp+8, (*(*TExprList_item)(unsafe.Pointer(pChanges + 8 + uintptr(i)*20))).FpExpr) != 0 {
goto update_cleanup
}
- j = 0
- for {
- if !(j < int32((*TTable)(unsafe.Pointer(pTab)).FnCol)) {
- break
- }
- if libc.Int32FromUint8((*(*TColumn)(unsafe.Pointer((*TTable)(unsafe.Pointer(pTab)).FaCol + uintptr(j)*12))).FhName) == libc.Int32FromUint8(hCol) && _sqlite3StrICmp(tls, (*(*TColumn)(unsafe.Pointer((*TTable)(unsafe.Pointer(pTab)).FaCol + uintptr(j)*12))).FzCnName, (*(*TExprList_item)(unsafe.Pointer(pChanges + 8 + uintptr(i)*20))).FzEName) == 0 {
- if j == int32((*TTable)(unsafe.Pointer(pTab)).FiPKey) {
- chngRowid = uint8(1)
- pRowidExpr = (*(*TExprList_item)(unsafe.Pointer(pChanges + 8 + uintptr(i)*20))).FpExpr
- iRowidExpr = i
+ j = _sqlite3ColumnIndex(tls, pTab, (*(*TExprList_item)(unsafe.Pointer(pChanges + 8 + uintptr(i)*20))).FzEName)
+ if j >= 0 {
+ if j == int32((*TTable)(unsafe.Pointer(pTab)).FiPKey) {
+ chngRowid = uint8(1)
+ pRowidExpr = (*(*TExprList_item)(unsafe.Pointer(pChanges + 8 + uintptr(i)*20))).FpExpr
+ iRowidExpr = i
+ } else {
+ if pPk != 0 && libc.Int32FromUint16((*(*TColumn)(unsafe.Pointer((*TTable)(unsafe.Pointer(pTab)).FaCol + uintptr(j)*12))).FcolFlags)&int32(COLFLAG_PRIMKEY) != 0 {
+ chngPk = uint8(1)
} else {
- if pPk != 0 && libc.Int32FromUint16((*(*TColumn)(unsafe.Pointer((*TTable)(unsafe.Pointer(pTab)).FaCol + uintptr(j)*12))).FcolFlags)&int32(COLFLAG_PRIMKEY) != 0 {
- chngPk = uint8(1)
- } else {
- if libc.Int32FromUint16((*(*TColumn)(unsafe.Pointer((*TTable)(unsafe.Pointer(pTab)).FaCol + uintptr(j)*12))).FcolFlags)&int32(COLFLAG_GENERATED) != 0 {
- _sqlite3ErrorMsg(tls, pParse, __ccgo_ts+21201, libc.VaList(bp+80, (*(*TColumn)(unsafe.Pointer((*TTable)(unsafe.Pointer(pTab)).FaCol + uintptr(j)*12))).FzCnName))
- goto update_cleanup
- }
+ if libc.Int32FromUint16((*(*TColumn)(unsafe.Pointer((*TTable)(unsafe.Pointer(pTab)).FaCol + uintptr(j)*12))).FcolFlags)&int32(COLFLAG_GENERATED) != 0 {
+ _sqlite3ErrorMsg(tls, pParse, __ccgo_ts+21273, libc.VaList(bp+80, (*(*TColumn)(unsafe.Pointer((*TTable)(unsafe.Pointer(pTab)).FaCol + uintptr(j)*12))).FzCnName))
+ goto update_cleanup
}
}
- *(*int32)(unsafe.Pointer(aXRef + uintptr(j)*4)) = i
- break
}
- goto _10
- _10:
- ;
- j++
- }
- if j >= int32((*TTable)(unsafe.Pointer(pTab)).FnCol) {
+ *(*int32)(unsafe.Pointer(aXRef + uintptr(j)*4)) = i
+ } else {
if pPk == uintptr(0) && _sqlite3IsRowid(tls, (*(*TExprList_item)(unsafe.Pointer(pChanges + 8 + uintptr(i)*20))).FzEName) != 0 {
j = -int32(1)
chngRowid = uint8(1)
pRowidExpr = (*(*TExprList_item)(unsafe.Pointer(pChanges + 8 + uintptr(i)*20))).FpExpr
iRowidExpr = i
} else {
- _sqlite3ErrorMsg(tls, pParse, __ccgo_ts+21237, libc.VaList(bp+80, (*(*TExprList_item)(unsafe.Pointer(pChanges + 8 + uintptr(i)*20))).FzEName))
- (*TParse)(unsafe.Pointer(pParse)).FcheckSchema = uint8(1)
+ _sqlite3ErrorMsg(tls, pParse, __ccgo_ts+21309, libc.VaList(bp+80, (*(*TExprList_item)(unsafe.Pointer(pChanges + 8 + uintptr(i)*20))).FzEName))
+ libc.SetBitFieldPtr8Uint32(pParse+32, libc.Uint32FromInt32(1), 3, 0x8)
goto update_cleanup
}
}
if j < 0 {
- v11 = __ccgo_ts + 8096
+ v10 = __ccgo_ts + 8121
} else {
- v11 = (*(*TColumn)(unsafe.Pointer((*TTable)(unsafe.Pointer(pTab)).FaCol + uintptr(j)*12))).FzCnName
+ v10 = (*(*TColumn)(unsafe.Pointer((*TTable)(unsafe.Pointer(pTab)).FaCol + uintptr(j)*12))).FzCnName
}
- rc = _sqlite3AuthCheck(tls, pParse, int32(SQLITE_UPDATE), (*TTable)(unsafe.Pointer(pTab)).FzName, v11, (*(*TDb)(unsafe.Pointer((*Tsqlite3)(unsafe.Pointer(db)).FaDb + uintptr(iDb)*16))).FzDbSName)
+ rc = _sqlite3AuthCheck(tls, pParse, int32(SQLITE_UPDATE), (*TTable)(unsafe.Pointer(pTab)).FzName, v10, (*(*TDb)(unsafe.Pointer((*Tsqlite3)(unsafe.Pointer(db)).FaDb + uintptr(iDb)*16))).FzDbSName)
if rc == int32(SQLITE_DENY) {
goto update_cleanup
} else {
@@ -129704,17 +130037,17 @@ func _sqlite3Update(tls *libc.TLS, pParse uintptr, pTabList uintptr, pChanges ui
break
}
if *(*int32)(unsafe.Pointer(aXRef + uintptr(i)*4)) >= 0 {
- goto _12
+ goto _11
}
if libc.Int32FromUint16((*(*TColumn)(unsafe.Pointer((*TTable)(unsafe.Pointer(pTab)).FaCol + uintptr(i)*12))).FcolFlags)&int32(COLFLAG_GENERATED) == 0 {
- goto _12
+ goto _11
}
if _sqlite3ExprReferencesUpdatedColumn(tls, _sqlite3ColumnExpr(tls, pTab, (*TTable)(unsafe.Pointer(pTab)).FaCol+uintptr(i)*12), aXRef, libc.Int32FromUint8(chngRowid)) != 0 {
*(*int32)(unsafe.Pointer(aXRef + uintptr(i)*4)) = int32(99999)
bProgress = int32(1)
}
- goto _12
- _12:
+ goto _11
+ _11:
;
i++
}
@@ -129726,11 +130059,11 @@ func _sqlite3Update(tls *libc.TLS, pParse uintptr, pTabList uintptr, pChanges ui
** table implementation makes all columns available).
*/
if libc.Int32FromUint8((*TTable)(unsafe.Pointer(pTab)).FeTabType) == int32(TABTYP_VTAB) {
- v13 = libc.Uint64FromInt32(-libc.Int32FromInt32(1))
+ v12 = libc.Uint64FromInt32(-libc.Int32FromInt32(1))
} else {
- v13 = uint64(0)
+ v12 = uint64(0)
}
- (*(*TSrcItem)(unsafe.Pointer(pTabList + 8))).FcolUsed = v13
+ (*(*TSrcItem)(unsafe.Pointer(pTabList + 8))).FcolUsed = v12
hasFK = _sqlite3FkRequired(tls, pParse, pTab, aXRef, libc.Int32FromUint8(chngKey))
/* There is one entry in the aRegIdx[] array for each index on the table
** being updated. Fill in aRegIdx[] with a register number that will hold
@@ -129746,11 +130079,11 @@ func _sqlite3Update(tls *libc.TLS, pParse uintptr, pTabList uintptr, pChanges ui
break
}
if chngKey != 0 || hasFK > int32(1) || pIdx == pPk || _indexWhereClauseMightChange(tls, pIdx, aXRef, libc.Int32FromUint8(chngRowid)) != 0 {
- v16 = pParse + 48
- *(*int32)(unsafe.Pointer(v16))++
- v15 = *(*int32)(unsafe.Pointer(v16))
- reg = v15
- *(*int32)(unsafe.Pointer(pParse + 48)) += libc.Int32FromUint16((*TIndex)(unsafe.Pointer(pIdx)).FnColumn)
+ v15 = pParse + 52
+ *(*int32)(unsafe.Pointer(v15))++
+ v14 = *(*int32)(unsafe.Pointer(v15))
+ reg = v14
+ *(*int32)(unsafe.Pointer(pParse + 52)) += libc.Int32FromUint16((*TIndex)(unsafe.Pointer(pIdx)).FnColumn)
} else {
reg = 0
i = 0
@@ -129759,18 +130092,18 @@ func _sqlite3Update(tls *libc.TLS, pParse uintptr, pTabList uintptr, pChanges ui
break
}
if _indexColumnIsBeingUpdated(tls, pIdx, i, aXRef, libc.Int32FromUint8(chngRowid)) != 0 {
- v19 = pParse + 48
- *(*int32)(unsafe.Pointer(v19))++
- v18 = *(*int32)(unsafe.Pointer(v19))
- reg = v18
- *(*int32)(unsafe.Pointer(pParse + 48)) += libc.Int32FromUint16((*TIndex)(unsafe.Pointer(pIdx)).FnColumn)
+ v18 = pParse + 52
+ *(*int32)(unsafe.Pointer(v18))++
+ v17 = *(*int32)(unsafe.Pointer(v18))
+ reg = v17
+ *(*int32)(unsafe.Pointer(pParse + 52)) += libc.Int32FromUint16((*TIndex)(unsafe.Pointer(pIdx)).FnColumn)
if onError == int32(OE_Default) && libc.Int32FromUint8((*TIndex)(unsafe.Pointer(pIdx)).FonError) == int32(OE_Replace) {
*(*int32)(unsafe.Pointer(bp + 56)) = int32(1)
}
break
}
- goto _17
- _17:
+ goto _16
+ _16:
;
i++
}
@@ -129779,16 +130112,16 @@ func _sqlite3Update(tls *libc.TLS, pParse uintptr, pTabList uintptr, pChanges ui
*(*Tu8)(unsafe.Pointer(aToOpen + uintptr(nAllIdx+int32(1)))) = uint8(0)
}
*(*int32)(unsafe.Pointer(aRegIdx + uintptr(nAllIdx)*4)) = reg
- goto _14
- _14:
+ goto _13
+ _13:
;
pIdx = (*TIndex)(unsafe.Pointer(pIdx)).FpNext
nAllIdx++
}
- v21 = pParse + 48
- *(*int32)(unsafe.Pointer(v21))++
- v20 = *(*int32)(unsafe.Pointer(v21))
- *(*int32)(unsafe.Pointer(aRegIdx + uintptr(nAllIdx)*4)) = v20 /* Register storing the table record */
+ v20 = pParse + 52
+ *(*int32)(unsafe.Pointer(v20))++
+ v19 = *(*int32)(unsafe.Pointer(v20))
+ *(*int32)(unsafe.Pointer(aRegIdx + uintptr(nAllIdx)*4)) = v19 /* Register storing the table record */
if *(*int32)(unsafe.Pointer(bp + 56)) != 0 {
/* If REPLACE conflict resolution might be invoked, open cursors on all
** indexes in case they are needed to delete records. */
@@ -129806,24 +130139,24 @@ func _sqlite3Update(tls *libc.TLS, pParse uintptr, pTabList uintptr, pChanges ui
** table record is written. regRowSet holds the RowSet for the
** two-pass update algorithm. */
regRowSet = *(*int32)(unsafe.Pointer(aRegIdx + uintptr(nAllIdx)*4))
- v24 = pParse + 48
- *(*int32)(unsafe.Pointer(v24))++
- v23 = *(*int32)(unsafe.Pointer(v24))
- v22 = v23
- regNewRowid = v22
- regOldRowid = v22
+ v23 = pParse + 52
+ *(*int32)(unsafe.Pointer(v23))++
+ v22 = *(*int32)(unsafe.Pointer(v23))
+ v21 = v22
+ regNewRowid = v21
+ regOldRowid = v21
if chngPk != 0 || pTrigger != 0 || hasFK != 0 {
regOld = (*TParse)(unsafe.Pointer(pParse)).FnMem + int32(1)
- *(*int32)(unsafe.Pointer(pParse + 48)) += int32((*TTable)(unsafe.Pointer(pTab)).FnCol)
+ *(*int32)(unsafe.Pointer(pParse + 52)) += int32((*TTable)(unsafe.Pointer(pTab)).FnCol)
}
if chngKey != 0 || pTrigger != 0 || hasFK != 0 {
- v26 = pParse + 48
- *(*int32)(unsafe.Pointer(v26))++
- v25 = *(*int32)(unsafe.Pointer(v26))
- regNewRowid = v25
+ v25 = pParse + 52
+ *(*int32)(unsafe.Pointer(v25))++
+ v24 = *(*int32)(unsafe.Pointer(v25))
+ regNewRowid = v24
}
regNew = (*TParse)(unsafe.Pointer(pParse)).FnMem + int32(1)
- *(*int32)(unsafe.Pointer(pParse + 48)) += int32((*TTable)(unsafe.Pointer(pTab)).FnCol)
+ *(*int32)(unsafe.Pointer(pParse + 52)) += int32((*TTable)(unsafe.Pointer(pTab)).FnCol)
}
/* Start the view context. */
if isView != 0 {
@@ -129849,50 +130182,50 @@ func _sqlite3Update(tls *libc.TLS, pParse uintptr, pTabList uintptr, pChanges ui
goto update_cleanup
}
/* Jump to labelBreak to abandon further processing of this UPDATE */
- v27 = _sqlite3VdbeMakeLabel(tls, pParse)
- labelBreak = v27
- labelContinue = v27
+ v26 = _sqlite3VdbeMakeLabel(tls, pParse)
+ labelBreak = v26
+ labelContinue = v26
/* Not an UPSERT. Normal processing. Begin by
** initialize the count of updated rows */
if (*Tsqlite3)(unsafe.Pointer(db)).Fflags&(libc.Uint64FromInt32(libc.Int32FromInt32(0x00001))<<libc.Int32FromInt32(32)) != uint64(0) && !((*TParse)(unsafe.Pointer(pParse)).FpTriggerTab != 0) && !((*TParse)(unsafe.Pointer(pParse)).Fnested != 0) && !((*TParse)(unsafe.Pointer(pParse)).FbReturning != 0) && pUpsert == uintptr(0) {
- v29 = pParse + 48
- *(*int32)(unsafe.Pointer(v29))++
- v28 = *(*int32)(unsafe.Pointer(v29))
- regRowCount = v28
+ v28 = pParse + 52
+ *(*int32)(unsafe.Pointer(v28))++
+ v27 = *(*int32)(unsafe.Pointer(v28))
+ regRowCount = v27
_sqlite3VdbeAddOp2(tls, v, int32(OP_Integer), 0, regRowCount)
}
if nChangeFrom == 0 && (*TTable)(unsafe.Pointer(pTab)).FtabFlags&uint32(TF_WithoutRowid) == uint32(0) {
_sqlite3VdbeAddOp3(tls, v, int32(OP_Null), 0, regRowSet, regOldRowid)
- v31 = pParse + 44
- v30 = *(*int32)(unsafe.Pointer(v31))
- *(*int32)(unsafe.Pointer(v31))++
- iEph = v30
+ v30 = pParse + 48
+ v29 = *(*int32)(unsafe.Pointer(v30))
+ *(*int32)(unsafe.Pointer(v30))++
+ iEph = v29
addrOpen = _sqlite3VdbeAddOp3(tls, v, int32(OP_OpenEphemeral), iEph, 0, regRowSet)
} else {
if pPk != 0 {
- v32 = libc.Int32FromUint16((*TIndex)(unsafe.Pointer(pPk)).FnKeyCol)
+ v31 = libc.Int32FromUint16((*TIndex)(unsafe.Pointer(pPk)).FnKeyCol)
} else {
- v32 = 0
+ v31 = 0
}
- nPk = int16(v32)
+ nPk = int16(v31)
iPk = (*TParse)(unsafe.Pointer(pParse)).FnMem + int32(1)
- *(*int32)(unsafe.Pointer(pParse + 48)) += int32(nPk)
- *(*int32)(unsafe.Pointer(pParse + 48)) += nChangeFrom
- v34 = pParse + 48
- *(*int32)(unsafe.Pointer(v34))++
- v33 = *(*int32)(unsafe.Pointer(v34))
- regKey = v33
+ *(*int32)(unsafe.Pointer(pParse + 52)) += int32(nPk)
+ *(*int32)(unsafe.Pointer(pParse + 52)) += nChangeFrom
+ v33 = pParse + 52
+ *(*int32)(unsafe.Pointer(v33))++
+ v32 = *(*int32)(unsafe.Pointer(v33))
+ regKey = v32
if pUpsert == uintptr(0) {
if isView != 0 {
- v35 = int32((*TTable)(unsafe.Pointer(pTab)).FnCol)
+ v34 = int32((*TTable)(unsafe.Pointer(pTab)).FnCol)
} else {
- v35 = 0
+ v34 = 0
}
- nEphCol = int32(nPk) + nChangeFrom + v35
- v37 = pParse + 44
- v36 = *(*int32)(unsafe.Pointer(v37))
- *(*int32)(unsafe.Pointer(v37))++
- iEph = v36
+ nEphCol = int32(nPk) + nChangeFrom + v34
+ v36 = pParse + 48
+ v35 = *(*int32)(unsafe.Pointer(v36))
+ *(*int32)(unsafe.Pointer(v36))++
+ iEph = v35
if pPk != 0 {
_sqlite3VdbeAddOp3(tls, v, int32(OP_Null), 0, iPk, iPk+int32(nPk)-int32(1))
}
@@ -129976,10 +130309,10 @@ func _sqlite3Update(tls *libc.TLS, pParse uintptr, pTabList uintptr, pChanges ui
** leave it in register regOldRowid. */
_sqlite3VdbeAddOp2(tls, v, int32(OP_Rowid), iDataCur, regOldRowid)
if eOnePass == ONEPASS_OFF {
- v39 = pParse + 48
- *(*int32)(unsafe.Pointer(v39))++
- v38 = *(*int32)(unsafe.Pointer(v39))
- *(*int32)(unsafe.Pointer(aRegIdx + uintptr(nAllIdx)*4)) = v38
+ v38 = pParse + 52
+ *(*int32)(unsafe.Pointer(v38))++
+ v37 = *(*int32)(unsafe.Pointer(v38))
+ *(*int32)(unsafe.Pointer(aRegIdx + uintptr(nAllIdx)*4)) = v37
_sqlite3VdbeAddOp3(tls, v, int32(OP_Insert), iEph, regRowSet, regOldRowid)
} else {
if addrOpen != 0 {
@@ -129998,8 +130331,8 @@ func _sqlite3Update(tls *libc.TLS, pParse uintptr, pTabList uintptr, pChanges ui
break
}
_sqlite3ExprCodeGetColumnOfTable(tls, v, pTab, iDataCur, int32(*(*Ti16)(unsafe.Pointer((*TIndex)(unsafe.Pointer(pPk)).FaiColumn + uintptr(i)*2))), iPk+i)
- goto _40
- _40:
+ goto _39
+ _39:
;
i++
}
@@ -130049,11 +130382,11 @@ func _sqlite3Update(tls *libc.TLS, pParse uintptr, pTabList uintptr, pChanges ui
labelContinue = _sqlite3VdbeMakeLabel(tls, pParse)
}
if pPk != 0 {
- v41 = regKey
+ v40 = regKey
} else {
- v41 = regOldRowid
+ v40 = regOldRowid
}
- _sqlite3VdbeAddOp2(tls, v, int32(OP_IsNull), v41, labelBreak)
+ _sqlite3VdbeAddOp2(tls, v, int32(OP_IsNull), v40, labelBreak)
} else {
if pPk != 0 || nChangeFrom != 0 {
labelContinue = _sqlite3VdbeMakeLabel(tls, pParse)
@@ -130068,8 +130401,8 @@ func _sqlite3Update(tls *libc.TLS, pParse uintptr, pTabList uintptr, pChanges ui
break
}
_sqlite3VdbeAddOp3(tls, v, int32(OP_Column), iEph, i, iPk+i)
- goto _42
- _42:
+ goto _41
+ _41:
;
i++
}
@@ -130107,11 +130440,11 @@ func _sqlite3Update(tls *libc.TLS, pParse uintptr, pTabList uintptr, pChanges ui
** information is needed */
if chngPk != 0 || hasFK != 0 || pTrigger != 0 {
if hasFK != 0 {
- v43 = _sqlite3FkOldmask(tls, pParse, pTab)
+ v42 = _sqlite3FkOldmask(tls, pParse, pTab)
} else {
- v43 = uint32(0)
+ v42 = uint32(0)
}
- oldmask = v43
+ oldmask = v42
oldmask |= _sqlite3TriggerColmask(tls, pParse, pTrigger, pChanges, 0, libc.Int32FromInt32(TRIGGER_BEFORE)|libc.Int32FromInt32(TRIGGER_AFTER), pTab, onError)
i = 0
for {
@@ -130125,8 +130458,8 @@ func _sqlite3Update(tls *libc.TLS, pParse uintptr, pTabList uintptr, pChanges ui
} else {
_sqlite3VdbeAddOp2(tls, v, int32(OP_Null), 0, k)
}
- goto _44
- _44:
+ goto _43
+ _43:
;
i++
}
@@ -130166,11 +130499,11 @@ func _sqlite3Update(tls *libc.TLS, pParse uintptr, pTabList uintptr, pChanges ui
if j >= 0 {
if nChangeFrom != 0 {
if isView != 0 {
- v46 = int32((*TTable)(unsafe.Pointer(pTab)).FnCol)
+ v45 = int32((*TTable)(unsafe.Pointer(pTab)).FnCol)
} else {
- v46 = int32(nPk)
+ v45 = int32(nPk)
}
- nOff = v46
+ nOff = v45
_sqlite3VdbeAddOp3(tls, v, int32(OP_Column), iEph, nOff+j, k)
} else {
_sqlite3ExprCode(tls, pParse, (*(*TExprList_item)(unsafe.Pointer(pChanges + 8 + uintptr(j)*20))).FpExpr, k)
@@ -130190,8 +130523,8 @@ func _sqlite3Update(tls *libc.TLS, pParse uintptr, pTabList uintptr, pChanges ui
}
}
}
- goto _45
- _45:
+ goto _44
+ _44:
;
i++
k++
@@ -130241,8 +130574,8 @@ func _sqlite3Update(tls *libc.TLS, pParse uintptr, pTabList uintptr, pChanges ui
_sqlite3ExprCodeGetColumnOfTable(tls, v, pTab, iDataCur, i, k)
}
}
- goto _47
- _47:
+ goto _46
+ _46:
;
i++
k++
@@ -130289,11 +130622,11 @@ func _sqlite3Update(tls *libc.TLS, pParse uintptr, pTabList uintptr, pChanges ui
** is the column index supplied by the user.
*/
if hasFK > int32(1) || chngKey != 0 {
- v48 = 0
+ v47 = 0
} else {
- v48 = int32(OPFLAG_ISNOOP)
+ v47 = int32(OPFLAG_ISNOOP)
}
- _sqlite3VdbeAddOp3(tls, v, int32(OP_Delete), iDataCur, int32(OPFLAG_ISUPDATE)|v48, regNewRowid)
+ _sqlite3VdbeAddOp3(tls, v, int32(OP_Delete), iDataCur, int32(OPFLAG_ISUPDATE)|v47, regNewRowid)
if eOnePass == int32(ONEPASS_MULTI) {
_sqlite3VdbeChangeP5(tls, v, uint16(OPFLAG_SAVEPOSITION))
}
@@ -130305,11 +130638,11 @@ func _sqlite3Update(tls *libc.TLS, pParse uintptr, pTabList uintptr, pChanges ui
}
/* Insert the new index entries and the new record. */
if eOnePass == int32(ONEPASS_MULTI) {
- v49 = int32(OPFLAG_SAVEPOSITION)
+ v48 = int32(OPFLAG_SAVEPOSITION)
} else {
- v49 = 0
+ v48 = 0
}
- _sqlite3CompleteInsertion(tls, pParse, pTab, iDataCur, iIdxCur, regNewRowid, aRegIdx, int32(OPFLAG_ISUPDATE)|v49, 0, 0)
+ _sqlite3CompleteInsertion(tls, pParse, pTab, iDataCur, iIdxCur, regNewRowid, aRegIdx, int32(OPFLAG_ISUPDATE)|v48, 0, 0)
/* Do any ON CASCADE, SET NULL or SET DEFAULT operations required to
** handle rows (possibly in other tables) that refer via a foreign key
** to the row just updated. */
@@ -130352,7 +130685,7 @@ func _sqlite3Update(tls *libc.TLS, pParse uintptr, pTabList uintptr, pChanges ui
** that information.
*/
if regRowCount != 0 {
- _sqlite3CodeChangeCount(tls, v, regRowCount, __ccgo_ts+21256)
+ _sqlite3CodeChangeCount(tls, v, regRowCount, __ccgo_ts+21328)
}
goto update_cleanup
update_cleanup:
@@ -130409,13 +130742,13 @@ func _updateVirtualTable(tls *libc.TLS, pParse uintptr, pSrc uintptr, pTab uintp
/* Allocate nArg registers in which to gather the arguments for VUpdate. Then
** create and open the ephemeral table in which the records created from
** these arguments will be temporarily stored. */
- v2 = pParse + 44
+ v2 = pParse + 48
v1 = *(*int32)(unsafe.Pointer(v2))
*(*int32)(unsafe.Pointer(v2))++
ephemTab = v1
addr = _sqlite3VdbeAddOp2(tls, v, int32(OP_OpenEphemeral), ephemTab, nArg)
regArg = (*TParse)(unsafe.Pointer(pParse)).FnMem + int32(1)
- *(*int32)(unsafe.Pointer(pParse + 48)) += nArg
+ *(*int32)(unsafe.Pointer(pParse + 52)) += nArg
if (*TSrcList)(unsafe.Pointer(pSrc)).FnSrc > int32(1) {
pPk = uintptr(0)
if (*TTable)(unsafe.Pointer(pTab)).FtabFlags&uint32(TF_WithoutRowid) == uint32(0) {
@@ -130457,11 +130790,11 @@ func _updateVirtualTable(tls *libc.TLS, pParse uintptr, pSrc uintptr, pTab uintp
_sqlite3ExprListDelete(tls, db, pList)
eOnePass = ONEPASS_OFF
} else {
- v5 = pParse + 48
+ v5 = pParse + 52
*(*int32)(unsafe.Pointer(v5))++
v4 = *(*int32)(unsafe.Pointer(v5))
regRec = v4
- v7 = pParse + 48
+ v7 = pParse + 52
*(*int32)(unsafe.Pointer(v7))++
v6 = *(*int32)(unsafe.Pointer(v7))
regRowid = v6
@@ -130786,9 +131119,9 @@ func _sqlite3UpsertAnalyzeTarget(tls *libc.TLS, pParse uintptr, pTabList uintptr
if nClause == 0 && (*TUpsert)(unsafe.Pointer(pUpsert)).FpNextUpsert == uintptr(0) {
(*(*[16]int8)(unsafe.Pointer(bp + 140)))[0] = 0
} else {
- Xsqlite3_snprintf(tls, int32(16), bp+140, __ccgo_ts+21269, libc.VaList(bp+168, nClause+int32(1)))
+ Xsqlite3_snprintf(tls, int32(16), bp+140, __ccgo_ts+21341, libc.VaList(bp+168, nClause+int32(1)))
}
- _sqlite3ErrorMsg(tls, pParse, __ccgo_ts+21273, libc.VaList(bp+168, bp+140))
+ _sqlite3ErrorMsg(tls, pParse, __ccgo_ts+21345, libc.VaList(bp+168, bp+140))
return int32(SQLITE_ERROR)
}
goto _1
@@ -130877,13 +131210,13 @@ func _sqlite3UpsertDoUpdate(tls *libc.TLS, pParse uintptr, pUpsert uintptr, pTab
pPk = _sqlite3PrimaryKeyIndex(tls, pTab)
nPk = libc.Int32FromUint16((*TIndex)(unsafe.Pointer(pPk)).FnKeyCol)
iPk = (*TParse)(unsafe.Pointer(pParse)).FnMem + int32(1)
- *(*int32)(unsafe.Pointer(pParse + 48)) += nPk
+ *(*int32)(unsafe.Pointer(pParse + 52)) += nPk
i = 0
for {
if !(i < nPk) {
break
}
- k = int32(_sqlite3TableColumnToIndex(tls, pIdx, *(*Ti16)(unsafe.Pointer((*TIndex)(unsafe.Pointer(pPk)).FaiColumn + uintptr(i)*2))))
+ k = _sqlite3TableColumnToIndex(tls, pIdx, int32(*(*Ti16)(unsafe.Pointer((*TIndex)(unsafe.Pointer(pPk)).FaiColumn + uintptr(i)*2))))
_sqlite3VdbeAddOp3(tls, v, int32(OP_Column), iCur, k, iPk+i)
goto _1
_1:
@@ -130891,7 +131224,7 @@ func _sqlite3UpsertDoUpdate(tls *libc.TLS, pParse uintptr, pUpsert uintptr, pTab
i++
}
i = _sqlite3VdbeAddOp4Int(tls, v, int32(OP_Found), iDataCur, 0, iPk, nPk)
- _sqlite3VdbeAddOp4(tls, v, int32(OP_Halt), int32(SQLITE_CORRUPT), int32(OE_Abort), 0, __ccgo_ts+12661, -int32(1))
+ _sqlite3VdbeAddOp4(tls, v, int32(OP_Halt), int32(SQLITE_CORRUPT), int32(OE_Abort), 0, __ccgo_ts+12686, -int32(1))
_sqlite3MayAbort(tls, pParse)
_sqlite3VdbeJumpHere(tls, v, i)
}
@@ -130973,7 +131306,7 @@ func _execSql(tls *libc.TLS, db uintptr, pzErrMsg uintptr, zSql uintptr) (r int3
** corrupt the sqlite_schema.sql field with other kinds of statements
** then run VACUUM to get those statements to execute at inappropriate
** times. */
- if zSubSql != 0 && (libc.Xstrncmp(tls, zSubSql, __ccgo_ts+21346, uint32(3)) == 0 || libc.Xstrncmp(tls, zSubSql, __ccgo_ts+21350, uint32(3)) == 0) {
+ if zSubSql != 0 && (libc.Xstrncmp(tls, zSubSql, __ccgo_ts+21418, uint32(3)) == 0 || libc.Xstrncmp(tls, zSubSql, __ccgo_ts+21422, uint32(3)) == 0) {
rc = _execSql(tls, db, pzErrMsg, zSubSql)
if rc != SQLITE_OK {
break
@@ -131064,7 +131397,7 @@ func _sqlite3Vacuum(tls *libc.TLS, pParse uintptr, _pNm uintptr, pInto uintptr)
if iDb != int32(1) {
iIntoReg = 0
if pInto != 0 && _sqlite3ResolveSelfReference(tls, pParse, uintptr(0), 0, pInto, uintptr(0)) == 0 {
- v2 = pParse + 48
+ v2 = pParse + 52
*(*int32)(unsafe.Pointer(v2))++
v1 = *(*int32)(unsafe.Pointer(v2))
iIntoReg = v1
@@ -131103,17 +131436,17 @@ func _sqlite3RunVacuum(tls *libc.TLS, pzErrMsg uintptr, db uintptr, iDb int32, p
pDb = uintptr(0) /* Name of output file */
pgflags = uint32(PAGER_SYNCHRONOUS_OFF) /* Name of the ATTACH-ed database used for vacuum */
if !((*Tsqlite3)(unsafe.Pointer(db)).FautoCommit != 0) {
- _sqlite3SetString(tls, pzErrMsg, db, __ccgo_ts+21354)
+ _sqlite3SetString(tls, pzErrMsg, db, __ccgo_ts+21426)
return int32(SQLITE_ERROR) /* IMP: R-12218-18073 */
}
if (*Tsqlite3)(unsafe.Pointer(db)).FnVdbeActive > int32(1) {
- _sqlite3SetString(tls, pzErrMsg, db, __ccgo_ts+21394)
+ _sqlite3SetString(tls, pzErrMsg, db, __ccgo_ts+21466)
return int32(SQLITE_ERROR) /* IMP: R-15610-35227 */
}
saved_openFlags = (*Tsqlite3)(unsafe.Pointer(db)).FopenFlags
if pOut != 0 {
if Xsqlite3_value_type(tls, pOut) != int32(SQLITE_TEXT) {
- _sqlite3SetString(tls, pzErrMsg, db, __ccgo_ts+21437)
+ _sqlite3SetString(tls, pzErrMsg, db, __ccgo_ts+21509)
return int32(SQLITE_ERROR)
}
zOut = Xsqlite3_value_text(tls, pOut)
@@ -131130,7 +131463,7 @@ func _sqlite3RunVacuum(tls *libc.TLS, pzErrMsg uintptr, db uintptr, iDb int32, p
saved_nChange = (*Tsqlite3)(unsafe.Pointer(db)).FnChange
saved_nTotalChange = (*Tsqlite3)(unsafe.Pointer(db)).FnTotalChange
saved_mTrace = (*Tsqlite3)(unsafe.Pointer(db)).FmTrace
- *(*Tu64)(unsafe.Pointer(db + 28)) |= libc.Uint64FromInt32(libc.Int32FromInt32(SQLITE_WriteSchema) | libc.Int32FromInt32(SQLITE_IgnoreChecks))
+ *(*Tu64)(unsafe.Pointer(db + 28)) |= libc.Uint64FromInt32(libc.Int32FromInt32(SQLITE_WriteSchema)|libc.Int32FromInt32(SQLITE_IgnoreChecks)) | libc.Uint64FromInt32(libc.Int32FromInt32(0x00040))<<libc.Int32FromInt32(32)
*(*Tu32)(unsafe.Pointer(db + 24)) |= libc.Uint32FromInt32(libc.Int32FromInt32(DBFLAG_PreferBuiltin) | libc.Int32FromInt32(DBFLAG_Vacuum))
*(*Tu64)(unsafe.Pointer(db + 28)) &= ^(libc.Uint64FromInt32(libc.Int32FromInt32(SQLITE_ForeignKeys)|libc.Int32FromInt32(SQLITE_ReverseOrder)|libc.Int32FromInt32(SQLITE_Defensive)) | libc.Uint64FromInt32(libc.Int32FromInt32(0x00001))<<libc.Int32FromInt32(32))
(*Tsqlite3)(unsafe.Pointer(db)).FmTrace = uint8(0)
@@ -131152,9 +131485,9 @@ func _sqlite3RunVacuum(tls *libc.TLS, pzErrMsg uintptr, db uintptr, iDb int32, p
** to write the journal header file.
*/
Xsqlite3_randomness(tls, int32(8), bp)
- Xsqlite3_snprintf(tls, int32(42), bp+8, __ccgo_ts+21455, libc.VaList(bp+80, *(*Tu64)(unsafe.Pointer(bp))))
+ Xsqlite3_snprintf(tls, int32(42), bp+8, __ccgo_ts+21527, libc.VaList(bp+80, *(*Tu64)(unsafe.Pointer(bp))))
nDb = (*Tsqlite3)(unsafe.Pointer(db)).FnDb
- rc = _execSqlF(tls, db, pzErrMsg, __ccgo_ts+21470, libc.VaList(bp+80, zOut, bp+8))
+ rc = _execSqlF(tls, db, pzErrMsg, __ccgo_ts+21542, libc.VaList(bp+80, zOut, bp+8))
(*Tsqlite3)(unsafe.Pointer(db)).FopenFlags = saved_openFlags
if rc != SQLITE_OK {
goto end_of_vacuum
@@ -131166,7 +131499,7 @@ func _sqlite3RunVacuum(tls *libc.TLS, pzErrMsg uintptr, db uintptr, iDb int32, p
*(*Ti64)(unsafe.Pointer(bp + 56)) = 0
if (*Tsqlite3_file)(unsafe.Pointer(id)).FpMethods != uintptr(0) && (_sqlite3OsFileSize(tls, id, bp+56) != SQLITE_OK || *(*Ti64)(unsafe.Pointer(bp + 56)) > 0) {
rc = int32(SQLITE_ERROR)
- _sqlite3SetString(tls, pzErrMsg, db, __ccgo_ts+21486)
+ _sqlite3SetString(tls, pzErrMsg, db, __ccgo_ts+21558)
goto end_of_vacuum
}
*(*Tu32)(unsafe.Pointer(db + 24)) |= uint32(DBFLAG_VacuumInto)
@@ -131183,7 +131516,7 @@ func _sqlite3RunVacuum(tls *libc.TLS, pzErrMsg uintptr, db uintptr, iDb int32, p
** file. This is done before the sqlite3BtreeGetPageSize(pMain) call below,
** to ensure that we do not try to change the page-size on a WAL database.
*/
- rc = _execSql(tls, db, pzErrMsg, __ccgo_ts+15038)
+ rc = _execSql(tls, db, pzErrMsg, __ccgo_ts+15063)
if rc != SQLITE_OK {
goto end_of_vacuum
}
@@ -131214,11 +131547,11 @@ func _sqlite3RunVacuum(tls *libc.TLS, pzErrMsg uintptr, db uintptr, iDb int32, p
** in the temporary database.
*/
(*Tsqlite3)(unsafe.Pointer(db)).Finit1.FiDb = libc.Uint8FromInt32(nDb) /* force new CREATE statements into vacuum_db */
- rc = _execSqlF(tls, db, pzErrMsg, __ccgo_ts+21513, libc.VaList(bp+80, zDbMain))
+ rc = _execSqlF(tls, db, pzErrMsg, __ccgo_ts+21585, libc.VaList(bp+80, zDbMain))
if rc != SQLITE_OK {
goto end_of_vacuum
}
- rc = _execSqlF(tls, db, pzErrMsg, __ccgo_ts+21621, libc.VaList(bp+80, zDbMain))
+ rc = _execSqlF(tls, db, pzErrMsg, __ccgo_ts+21693, libc.VaList(bp+80, zDbMain))
if rc != SQLITE_OK {
goto end_of_vacuum
}
@@ -131227,7 +131560,7 @@ func _sqlite3RunVacuum(tls *libc.TLS, pzErrMsg uintptr, db uintptr, iDb int32, p
** an "INSERT INTO vacuum_db.xxx SELECT * FROM main.xxx;" to copy
** the contents to the temporary database.
*/
- rc = _execSqlF(tls, db, pzErrMsg, __ccgo_ts+21675, libc.VaList(bp+80, bp+8, zDbMain, bp+8))
+ rc = _execSqlF(tls, db, pzErrMsg, __ccgo_ts+21747, libc.VaList(bp+80, bp+8, zDbMain, bp+8))
*(*Tu32)(unsafe.Pointer(db + 24)) &= libc.Uint32FromInt32(^libc.Int32FromInt32(DBFLAG_Vacuum))
if rc != SQLITE_OK {
goto end_of_vacuum
@@ -131237,7 +131570,7 @@ func _sqlite3RunVacuum(tls *libc.TLS, pzErrMsg uintptr, db uintptr, iDb int32, p
** associated storage, so all we have to do is copy their entries
** from the schema table.
*/
- rc = _execSqlF(tls, db, pzErrMsg, __ccgo_ts+21812, libc.VaList(bp+80, bp+8, zDbMain))
+ rc = _execSqlF(tls, db, pzErrMsg, __ccgo_ts+21884, libc.VaList(bp+80, bp+8, zDbMain))
if rc != 0 {
goto end_of_vacuum
}
@@ -131764,7 +132097,7 @@ func _addModuleArgument(tls *libc.TLS, pParse uintptr, pTable uintptr, zArg uint
FazArg uintptr
Fp uintptr
})(unsafe.Pointer(pTable + 44))).FnArg+int32(3) >= *(*int32)(unsafe.Pointer(db + 116 + 2*4)) {
- _sqlite3ErrorMsg(tls, pParse, __ccgo_ts+12891, libc.VaList(bp+8, (*TTable)(unsafe.Pointer(pTable)).FzName))
+ _sqlite3ErrorMsg(tls, pParse, __ccgo_ts+12916, libc.VaList(bp+8, (*TTable)(unsafe.Pointer(pTable)).FzName))
}
azModuleArg = _sqlite3DbRealloc(tls, db, (*(*struct {
FnArg int32
@@ -131887,24 +132220,29 @@ func _sqlite3VtabFinishParse(tls *libc.TLS, pParse uintptr, pEnd uintptr) {
if pEnd != 0 {
(*TParse)(unsafe.Pointer(pParse)).FsNameToken.Fn = libc.Uint32FromInt32(int32((*TToken)(unsafe.Pointer(pEnd)).Fz)-int32((*TParse)(unsafe.Pointer(pParse)).FsNameToken.Fz)) + (*TToken)(unsafe.Pointer(pEnd)).Fn
}
- zStmt = _sqlite3MPrintf(tls, db, __ccgo_ts+21935, libc.VaList(bp+8, pParse+204))
+ zStmt = _sqlite3MPrintf(tls, db, __ccgo_ts+22007, libc.VaList(bp+8, pParse+172))
/* A slot for the record has already been allocated in the
** schema table. We just need to update that slot with all
** the information we've collected.
**
- ** The VM register number pParse->regRowid holds the rowid of an
+ ** The VM register number pParse->u1.cr.regRowid holds the rowid of an
** entry in the sqlite_schema table that was created for this vtab
** by sqlite3StartTable().
*/
iDb = _sqlite3SchemaToIndex(tls, db, (*TTable)(unsafe.Pointer(pTab)).FpSchema)
- _sqlite3NestedParse(tls, pParse, __ccgo_ts+21959, libc.VaList(bp+8, (*(*TDb)(unsafe.Pointer((*Tsqlite3)(unsafe.Pointer(db)).FaDb + uintptr(iDb)*16))).FzDbSName, (*TTable)(unsafe.Pointer(pTab)).FzName, (*TTable)(unsafe.Pointer(pTab)).FzName, zStmt, (*TParse)(unsafe.Pointer(pParse)).FregRowid))
+ _sqlite3NestedParse(tls, pParse, __ccgo_ts+22031, libc.VaList(bp+8, (*(*TDb)(unsafe.Pointer((*Tsqlite3)(unsafe.Pointer(db)).FaDb + uintptr(iDb)*16))).FzDbSName, (*TTable)(unsafe.Pointer(pTab)).FzName, (*TTable)(unsafe.Pointer(pTab)).FzName, zStmt, (*(*struct {
+ FaddrCrTab int32
+ FregRowid int32
+ FregRoot int32
+ FconstraintName TToken
+ })(unsafe.Pointer(pParse + 188))).FregRowid))
v = _sqlite3GetVdbe(tls, pParse)
_sqlite3ChangeCookie(tls, pParse, iDb)
_sqlite3VdbeAddOp0(tls, v, int32(OP_Expire))
- zWhere = _sqlite3MPrintf(tls, db, __ccgo_ts+22058, libc.VaList(bp+8, (*TTable)(unsafe.Pointer(pTab)).FzName, zStmt))
+ zWhere = _sqlite3MPrintf(tls, db, __ccgo_ts+22130, libc.VaList(bp+8, (*TTable)(unsafe.Pointer(pTab)).FzName, zStmt))
_sqlite3VdbeAddParseSchemaOp(tls, v, iDb, zWhere, uint16(0))
_sqlite3DbFree(tls, db, zStmt)
- v2 = pParse + 48
+ v2 = pParse + 52
*(*int32)(unsafe.Pointer(v2))++
v1 = *(*int32)(unsafe.Pointer(v2))
iReg = v1
@@ -131945,7 +132283,7 @@ func _sqlite3VtabArgInit(tls *libc.TLS, pParse uintptr) {
func _sqlite3VtabArgExtend(tls *libc.TLS, pParse uintptr, p uintptr) {
var pArg uintptr
_ = pArg
- pArg = pParse + 268
+ pArg = pParse + 264
if (*TToken)(unsafe.Pointer(pArg)).Fz == uintptr(0) {
(*TToken)(unsafe.Pointer(pArg)).Fz = (*TToken)(unsafe.Pointer(p)).Fz
(*TToken)(unsafe.Pointer(pArg)).Fn = (*TToken)(unsafe.Pointer(p)).Fn
@@ -131988,7 +132326,7 @@ func _vtabCallConstructor(tls *libc.TLS, db uintptr, pTab uintptr, pMod uintptr,
break
}
if (*TVtabCtx)(unsafe.Pointer(pCtx)).FpTab == pTab {
- *(*uintptr)(unsafe.Pointer(pzErr)) = _sqlite3MPrintf(tls, db, __ccgo_ts+22077, libc.VaList(bp+32, (*TTable)(unsafe.Pointer(pTab)).FzName))
+ *(*uintptr)(unsafe.Pointer(pzErr)) = _sqlite3MPrintf(tls, db, __ccgo_ts+22149, libc.VaList(bp+32, (*TTable)(unsafe.Pointer(pTab)).FzName))
return int32(SQLITE_LOCKED)
}
goto _1
@@ -132030,9 +132368,9 @@ func _vtabCallConstructor(tls *libc.TLS, db uintptr, pTab uintptr, pMod uintptr,
}
if SQLITE_OK != rc {
if *(*uintptr)(unsafe.Pointer(bp + 16)) == uintptr(0) {
- *(*uintptr)(unsafe.Pointer(pzErr)) = _sqlite3MPrintf(tls, db, __ccgo_ts+22119, libc.VaList(bp+32, zModuleName))
+ *(*uintptr)(unsafe.Pointer(pzErr)) = _sqlite3MPrintf(tls, db, __ccgo_ts+22191, libc.VaList(bp+32, zModuleName))
} else {
- *(*uintptr)(unsafe.Pointer(pzErr)) = _sqlite3MPrintf(tls, db, __ccgo_ts+3864, libc.VaList(bp+32, *(*uintptr)(unsafe.Pointer(bp + 16))))
+ *(*uintptr)(unsafe.Pointer(pzErr)) = _sqlite3MPrintf(tls, db, __ccgo_ts+3890, libc.VaList(bp+32, *(*uintptr)(unsafe.Pointer(bp + 16))))
Xsqlite3_free(tls, *(*uintptr)(unsafe.Pointer(bp + 16)))
}
_sqlite3DbFree(tls, db, pVTable)
@@ -132045,7 +132383,7 @@ func _vtabCallConstructor(tls *libc.TLS, db uintptr, pTab uintptr, pMod uintptr,
(*TModule)(unsafe.Pointer(pMod)).FnRefModule++
(*TVTable)(unsafe.Pointer(pVTable)).FnRef = int32(1)
if (*(*TVtabCtx)(unsafe.Pointer(bp))).FbDeclared == 0 {
- zFormat = __ccgo_ts + 22149
+ zFormat = __ccgo_ts + 22221
*(*uintptr)(unsafe.Pointer(pzErr)) = _sqlite3MPrintf(tls, db, zFormat, libc.VaList(bp+32, zModuleName))
_sqlite3VtabUnlock(tls, pVTable)
rc = int32(SQLITE_ERROR)
@@ -132079,7 +132417,7 @@ func _vtabCallConstructor(tls *libc.TLS, db uintptr, pTab uintptr, pMod uintptr,
if !(i < nType) {
break
}
- if 0 == Xsqlite3_strnicmp(tls, __ccgo_ts+16741, zType+uintptr(i), int32(6)) && (i == 0 || int32(*(*int8)(unsafe.Pointer(zType + uintptr(i-int32(1))))) == int32(' ')) && (int32(*(*int8)(unsafe.Pointer(zType + uintptr(i+int32(6))))) == int32('\000') || int32(*(*int8)(unsafe.Pointer(zType + uintptr(i+int32(6))))) == int32(' ')) {
+ if 0 == Xsqlite3_strnicmp(tls, __ccgo_ts+16813, zType+uintptr(i), int32(6)) && (i == 0 || int32(*(*int8)(unsafe.Pointer(zType + uintptr(i-int32(1))))) == int32(' ')) && (int32(*(*int8)(unsafe.Pointer(zType + uintptr(i+int32(6))))) == int32('\000') || int32(*(*int8)(unsafe.Pointer(zType + uintptr(i+int32(6))))) == int32(' ')) {
break
}
goto _3
@@ -132160,13 +132498,13 @@ func _sqlite3VtabCallConnect(tls *libc.TLS, pParse uintptr, pTab uintptr) (r int
FazArg uintptr
Fp uintptr
})(unsafe.Pointer(pTab + 44))).FazArg))
- _sqlite3ErrorMsg(tls, pParse, __ccgo_ts+22195, libc.VaList(bp+16, zModule))
+ _sqlite3ErrorMsg(tls, pParse, __ccgo_ts+22267, libc.VaList(bp+16, zModule))
rc = int32(SQLITE_ERROR)
} else {
*(*uintptr)(unsafe.Pointer(bp)) = uintptr(0)
rc = _vtabCallConstructor(tls, db, pTab, pMod, (*Tsqlite3_module)(unsafe.Pointer((*TModule)(unsafe.Pointer(pMod)).FpModule)).FxConnect, bp)
if rc != SQLITE_OK {
- _sqlite3ErrorMsg(tls, pParse, __ccgo_ts+3864, libc.VaList(bp+16, *(*uintptr)(unsafe.Pointer(bp))))
+ _sqlite3ErrorMsg(tls, pParse, __ccgo_ts+3890, libc.VaList(bp+16, *(*uintptr)(unsafe.Pointer(bp))))
(*TParse)(unsafe.Pointer(pParse)).Frc = rc
}
_sqlite3DbFree(tls, db, *(*uintptr)(unsafe.Pointer(bp)))
@@ -132247,7 +132585,7 @@ func _sqlite3VtabCallCreate(tls *libc.TLS, db uintptr, iDb int32, zTab uintptr,
** error. Otherwise, do nothing.
*/
if pMod == uintptr(0) || (*Tsqlite3_module)(unsafe.Pointer((*TModule)(unsafe.Pointer(pMod)).FpModule)).FxCreate == uintptr(0) || (*Tsqlite3_module)(unsafe.Pointer((*TModule)(unsafe.Pointer(pMod)).FpModule)).FxDestroy == uintptr(0) {
- *(*uintptr)(unsafe.Pointer(pzErr)) = _sqlite3MPrintf(tls, db, __ccgo_ts+22195, libc.VaList(bp+8, zMod))
+ *(*uintptr)(unsafe.Pointer(pzErr)) = _sqlite3MPrintf(tls, db, __ccgo_ts+22267, libc.VaList(bp+8, zMod))
rc = int32(SQLITE_ERROR)
} else {
rc = _vtabCallConstructor(tls, db, pTab, pMod, (*Tsqlite3_module)(unsafe.Pointer((*TModule)(unsafe.Pointer(pMod)).FpModule)).FxCreate, pzErr)
@@ -132271,13 +132609,13 @@ func _sqlite3VtabCallCreate(tls *libc.TLS, db uintptr, iDb int32, zTab uintptr,
// ** virtual table module.
// */
func Xsqlite3_declare_vtab(tls *libc.TLS, db uintptr, zCreateTable uintptr) (r int32) {
- bp := tls.Alloc(320)
- defer tls.Free(320)
+ bp := tls.Alloc(304)
+ defer tls.Free(304)
var i, initBusy, rc int32
var pCtx, pIdx, pNew, pTab, z, v3 uintptr
var v2 Ti16
var _ /* sParse at bp+0 */ TParse
- var _ /* tokenType at bp+288 */ int32
+ var _ /* tokenType at bp+284 */ int32
_, _, _, _, _, _, _, _, _, _ = i, initBusy, pCtx, pIdx, pNew, pTab, rc, z, v2, v3
rc = SQLITE_OK
/* Verify that the first two keywords in the CREATE TABLE statement
@@ -132290,12 +132628,12 @@ func Xsqlite3_declare_vtab(tls *libc.TLS, db uintptr, zCreateTable uintptr) (r i
if !(_aKeyword1[i] != 0) {
break
}
- *(*int32)(unsafe.Pointer(bp + 288)) = 0
- for cond := true; cond; cond = *(*int32)(unsafe.Pointer(bp + 288)) == int32(TK_SPACE) || *(*int32)(unsafe.Pointer(bp + 288)) == int32(TK_COMMENT) {
- z += uintptr(_sqlite3GetToken(tls, z, bp+288))
+ *(*int32)(unsafe.Pointer(bp + 284)) = 0
+ for cond := true; cond; cond = *(*int32)(unsafe.Pointer(bp + 284)) == int32(TK_SPACE) || *(*int32)(unsafe.Pointer(bp + 284)) == int32(TK_COMMENT) {
+ z += uintptr(_sqlite3GetToken(tls, z, bp+284))
}
- if *(*int32)(unsafe.Pointer(bp + 288)) != libc.Int32FromUint8(_aKeyword1[i]) {
- _sqlite3ErrorWithMsg(tls, db, int32(SQLITE_ERROR), __ccgo_ts+22214, 0)
+ if *(*int32)(unsafe.Pointer(bp + 284)) != libc.Int32FromUint8(_aKeyword1[i]) {
+ _sqlite3ErrorWithMsg(tls, db, int32(SQLITE_ERROR), __ccgo_ts+22286, 0)
return int32(SQLITE_ERROR)
}
goto _1
@@ -132306,9 +132644,9 @@ func Xsqlite3_declare_vtab(tls *libc.TLS, db uintptr, zCreateTable uintptr) (r i
Xsqlite3_mutex_enter(tls, (*Tsqlite3)(unsafe.Pointer(db)).Fmutex)
pCtx = (*Tsqlite3)(unsafe.Pointer(db)).FpVtabCtx
if !(pCtx != 0) || (*TVtabCtx)(unsafe.Pointer(pCtx)).FbDeclared != 0 {
- _sqlite3Error(tls, db, _sqlite3MisuseError(tls, int32(157368)))
+ _sqlite3Error(tls, db, _sqlite3MisuseError(tls, int32(158352)))
Xsqlite3_mutex_leave(tls, (*Tsqlite3)(unsafe.Pointer(db)).Fmutex)
- return _sqlite3MisuseError(tls, int32(157370))
+ return _sqlite3MisuseError(tls, int32(158354))
}
pTab = (*TVtabCtx)(unsafe.Pointer(pCtx)).FpTab
_sqlite3ParseObjectInit(tls, bp, db)
@@ -132350,11 +132688,11 @@ func Xsqlite3_declare_vtab(tls *libc.TLS, db uintptr, zCreateTable uintptr) (r i
(*TVtabCtx)(unsafe.Pointer(pCtx)).FbDeclared = int32(1)
} else {
if (*(*TParse)(unsafe.Pointer(bp))).FzErrMsg != 0 {
- v3 = __ccgo_ts + 3864
+ v3 = __ccgo_ts + 3890
} else {
v3 = uintptr(0)
}
- _sqlite3ErrorWithMsg(tls, db, int32(SQLITE_ERROR), v3, libc.VaList(bp+304, (*(*TParse)(unsafe.Pointer(bp))).FzErrMsg))
+ _sqlite3ErrorWithMsg(tls, db, int32(SQLITE_ERROR), v3, libc.VaList(bp+296, (*(*TParse)(unsafe.Pointer(bp))).FzErrMsg))
_sqlite3DbFree(tls, db, (*(*TParse)(unsafe.Pointer(bp))).FzErrMsg)
rc = int32(SQLITE_ERROR)
}
@@ -132764,7 +133102,7 @@ func _sqlite3VtabMakeWritable(tls *libc.TLS, pParse uintptr, pTab uintptr) {
apVtabLock = _sqlite3Realloc(tls, (*TParse)(unsafe.Pointer(pToplevel)).FapVtabLock, libc.Uint64FromInt32(n))
if apVtabLock != 0 {
(*TParse)(unsafe.Pointer(pToplevel)).FapVtabLock = apVtabLock
- v4 = pToplevel + 228
+ v4 = pToplevel + 224
v3 = *(*int32)(unsafe.Pointer(v4))
*(*int32)(unsafe.Pointer(v4))++
*(*uintptr)(unsafe.Pointer((*TParse)(unsafe.Pointer(pToplevel)).FapVtabLock + uintptr(v3)*4)) = pTab
@@ -132806,7 +133144,7 @@ func _sqlite3VtabEponymousTableInit(tls *libc.TLS, pParse uintptr, pMod uintptr)
if (*Tsqlite3_module)(unsafe.Pointer(pModule)).FxCreate != uintptr(0) && (*Tsqlite3_module)(unsafe.Pointer(pModule)).FxCreate != (*Tsqlite3_module)(unsafe.Pointer(pModule)).FxConnect {
return 0
}
- pTab = _sqlite3DbMallocZero(tls, db, uint64(64))
+ pTab = _sqlite3DbMallocZero(tls, db, uint64(80))
if pTab == uintptr(0) {
return 0
}
@@ -132826,7 +133164,7 @@ func _sqlite3VtabEponymousTableInit(tls *libc.TLS, pParse uintptr, pMod uintptr)
_addModuleArgument(tls, pParse, pTab, _sqlite3DbStrDup(tls, db, (*TTable)(unsafe.Pointer(pTab)).FzName))
rc = _vtabCallConstructor(tls, db, pTab, pMod, (*Tsqlite3_module)(unsafe.Pointer(pModule)).FxConnect, bp)
if rc != 0 {
- _sqlite3ErrorMsg(tls, pParse, __ccgo_ts+3864, libc.VaList(bp+16, *(*uintptr)(unsafe.Pointer(bp))))
+ _sqlite3ErrorMsg(tls, pParse, __ccgo_ts+3890, libc.VaList(bp+16, *(*uintptr)(unsafe.Pointer(bp))))
_sqlite3DbFree(tls, db, *(*uintptr)(unsafe.Pointer(bp)))
_sqlite3VtabEponymousTableClear(tls, db, pMod)
}
@@ -132890,7 +133228,7 @@ func Xsqlite3_vtab_config(tls *libc.TLS, db uintptr, op int32, va uintptr) (r in
Xsqlite3_mutex_enter(tls, (*Tsqlite3)(unsafe.Pointer(db)).Fmutex)
p = (*Tsqlite3)(unsafe.Pointer(db)).FpVtabCtx
if !(p != 0) {
- rc = _sqlite3MisuseError(tls, int32(157865))
+ rc = _sqlite3MisuseError(tls, int32(158849))
} else {
ap = va
switch op {
@@ -132903,7 +133241,7 @@ func Xsqlite3_vtab_config(tls *libc.TLS, db uintptr, op int32, va uintptr) (r in
case int32(SQLITE_VTAB_USES_ALL_SCHEMAS):
(*TVTable)(unsafe.Pointer((*TVtabCtx)(unsafe.Pointer(p)).FpVTable)).FbAllSchemas = uint8(1)
default:
- rc = _sqlite3MisuseError(tls, int32(157887))
+ rc = _sqlite3MisuseError(tls, int32(158871))
break
}
_ = ap
@@ -133588,7 +133926,6 @@ type TWhereInfo1 = struct {
FrevMask TBitmask
FsWC TWhereClause
FsMaskSet TWhereMaskSet
- Fa [1]TWhereLevel
}
type WhereInfo1 = TWhereInfo1
@@ -133624,10 +133961,10 @@ type WhereInfo1 = TWhereInfo1
func _explainIndexColumnName(tls *libc.TLS, pIdx uintptr, i int32) (r uintptr) {
i = int32(*(*Ti16)(unsafe.Pointer((*TIndex)(unsafe.Pointer(pIdx)).FaiColumn + uintptr(i)*2)))
if i == -int32(2) {
- return __ccgo_ts + 22227
+ return __ccgo_ts + 22299
}
if i == -int32(1) {
- return __ccgo_ts + 16850
+ return __ccgo_ts + 16922
}
return (*(*TColumn)(unsafe.Pointer((*TTable)(unsafe.Pointer((*TIndex)(unsafe.Pointer(pIdx)).FpTable)).FaCol + uintptr(i)*12))).FzCnName
}
@@ -133646,10 +133983,10 @@ func _explainAppendTerm(tls *libc.TLS, pStr uintptr, pIdx uintptr, nTerm int32,
var i int32
_ = i
if bAnd != 0 {
- Xsqlite3_str_append(tls, pStr, __ccgo_ts+22234, int32(5))
+ Xsqlite3_str_append(tls, pStr, __ccgo_ts+22306, int32(5))
}
if nTerm > int32(1) {
- Xsqlite3_str_append(tls, pStr, __ccgo_ts+22240, int32(1))
+ Xsqlite3_str_append(tls, pStr, __ccgo_ts+22312, int32(1))
}
i = 0
for {
@@ -133657,7 +133994,7 @@ func _explainAppendTerm(tls *libc.TLS, pStr uintptr, pIdx uintptr, nTerm int32,
break
}
if i != 0 {
- Xsqlite3_str_append(tls, pStr, __ccgo_ts+13281, int32(1))
+ Xsqlite3_str_append(tls, pStr, __ccgo_ts+13306, int32(1))
}
Xsqlite3_str_appendall(tls, pStr, _explainIndexColumnName(tls, pIdx, iTerm+i))
goto _1
@@ -133666,11 +134003,11 @@ func _explainAppendTerm(tls *libc.TLS, pStr uintptr, pIdx uintptr, nTerm int32,
i++
}
if nTerm > int32(1) {
- Xsqlite3_str_append(tls, pStr, __ccgo_ts+5175, int32(1))
+ Xsqlite3_str_append(tls, pStr, __ccgo_ts+5201, int32(1))
}
Xsqlite3_str_append(tls, pStr, zOp, int32(1))
if nTerm > int32(1) {
- Xsqlite3_str_append(tls, pStr, __ccgo_ts+22240, int32(1))
+ Xsqlite3_str_append(tls, pStr, __ccgo_ts+22312, int32(1))
}
i = 0
for {
@@ -133678,16 +134015,16 @@ func _explainAppendTerm(tls *libc.TLS, pStr uintptr, pIdx uintptr, nTerm int32,
break
}
if i != 0 {
- Xsqlite3_str_append(tls, pStr, __ccgo_ts+13281, int32(1))
+ Xsqlite3_str_append(tls, pStr, __ccgo_ts+13306, int32(1))
}
- Xsqlite3_str_append(tls, pStr, __ccgo_ts+5177, int32(1))
+ Xsqlite3_str_append(tls, pStr, __ccgo_ts+5203, int32(1))
goto _2
_2:
;
i++
}
if nTerm > int32(1) {
- Xsqlite3_str_append(tls, pStr, __ccgo_ts+5175, int32(1))
+ Xsqlite3_str_append(tls, pStr, __ccgo_ts+5201, int32(1))
}
}
@@ -133734,7 +134071,7 @@ func _explainIndexRange(tls *libc.TLS, pStr uintptr, pLoop uintptr) {
if libc.Int32FromUint16(nEq) == 0 && (*TWhereLoop)(unsafe.Pointer(pLoop)).FwsFlags&libc.Uint32FromInt32(libc.Int32FromInt32(WHERE_BTM_LIMIT)|libc.Int32FromInt32(WHERE_TOP_LIMIT)) == uint32(0) {
return
}
- Xsqlite3_str_append(tls, pStr, __ccgo_ts+22242, int32(2))
+ Xsqlite3_str_append(tls, pStr, __ccgo_ts+22314, int32(2))
i = 0
for {
if !(i < libc.Int32FromUint16(nEq)) {
@@ -133742,12 +134079,12 @@ func _explainIndexRange(tls *libc.TLS, pStr uintptr, pLoop uintptr) {
}
z = _explainIndexColumnName(tls, pIndex, i)
if i != 0 {
- Xsqlite3_str_append(tls, pStr, __ccgo_ts+22234, int32(5))
+ Xsqlite3_str_append(tls, pStr, __ccgo_ts+22306, int32(5))
}
if i >= libc.Int32FromUint16(nSkip) {
- v2 = __ccgo_ts + 22245
+ v2 = __ccgo_ts + 22317
} else {
- v2 = __ccgo_ts + 22250
+ v2 = __ccgo_ts + 22322
}
Xsqlite3_str_appendf(tls, pStr, v2, libc.VaList(bp+8, z))
goto _1
@@ -133764,7 +134101,7 @@ func _explainIndexRange(tls *libc.TLS, pStr uintptr, pLoop uintptr) {
FnDistinctCol Tu16
FpIndex uintptr
FpOrderBy uintptr
- })(unsafe.Pointer(pLoop + 24))).FnBtm), j, i, __ccgo_ts+22258)
+ })(unsafe.Pointer(pLoop + 24))).FnBtm), j, i, __ccgo_ts+22330)
i = int32(1)
}
if (*TWhereLoop)(unsafe.Pointer(pLoop)).FwsFlags&uint32(WHERE_TOP_LIMIT) != 0 {
@@ -133775,9 +134112,9 @@ func _explainIndexRange(tls *libc.TLS, pStr uintptr, pLoop uintptr) {
FnDistinctCol Tu16
FpIndex uintptr
FpOrderBy uintptr
- })(unsafe.Pointer(pLoop + 24))).FnTop), j, i, __ccgo_ts+22260)
+ })(unsafe.Pointer(pLoop + 24))).FnTop), j, i, __ccgo_ts+22332)
}
- Xsqlite3_str_append(tls, pStr, __ccgo_ts+5175, int32(1))
+ Xsqlite3_str_append(tls, pStr, __ccgo_ts+5201, int32(1))
}
// C documentation
@@ -133822,11 +134159,11 @@ func _sqlite3WhereAddExplainText(tls *libc.TLS, pParse uintptr, addr int32, pTab
_sqlite3StrAccumInit(tls, bp, db, bp+24, int32(100), int32(SQLITE_MAX_LENGTH))
(*(*TStrAccum)(unsafe.Pointer(bp))).FprintfFlags = uint8(SQLITE_PRINTF_INTERNAL)
if isSearch != 0 {
- v2 = __ccgo_ts + 22262
+ v2 = __ccgo_ts + 22334
} else {
- v2 = __ccgo_ts + 22269
+ v2 = __ccgo_ts + 22341
}
- Xsqlite3_str_appendf(tls, bp, __ccgo_ts+22274, libc.VaList(bp+136, v2, pItem))
+ Xsqlite3_str_appendf(tls, bp, __ccgo_ts+22346, libc.VaList(bp+136, v2, pItem))
if flags&libc.Uint32FromInt32(libc.Int32FromInt32(WHERE_IPK)|libc.Int32FromInt32(WHERE_VIRTUALTABLE)) == uint32(0) {
zFmt = uintptr(0)
pIdx = (*(*struct {
@@ -133839,37 +134176,37 @@ func _sqlite3WhereAddExplainText(tls *libc.TLS, pParse uintptr, addr int32, pTab
})(unsafe.Pointer(pLoop + 24))).FpIndex
if !((*TTable)(unsafe.Pointer((*TSrcItem)(unsafe.Pointer(pItem)).FpSTab)).FtabFlags&libc.Uint32FromInt32(TF_WithoutRowid) == libc.Uint32FromInt32(0)) && int32(uint32(*(*uint16)(unsafe.Pointer(pIdx + 56))&0x3>>0)) == int32(SQLITE_IDXTYPE_PRIMARYKEY) {
if isSearch != 0 {
- zFmt = __ccgo_ts + 11444
+ zFmt = __ccgo_ts + 11469
}
} else {
if flags&uint32(WHERE_PARTIALIDX) != 0 {
- zFmt = __ccgo_ts + 22280
+ zFmt = __ccgo_ts + 22352
} else {
if flags&uint32(WHERE_AUTO_INDEX) != 0 {
- zFmt = __ccgo_ts + 22313
+ zFmt = __ccgo_ts + 22385
} else {
if flags&libc.Uint32FromInt32(libc.Int32FromInt32(WHERE_IDX_ONLY)|libc.Int32FromInt32(WHERE_EXPRIDX)) != 0 {
- zFmt = __ccgo_ts + 22338
+ zFmt = __ccgo_ts + 22410
} else {
- zFmt = __ccgo_ts + 22356
+ zFmt = __ccgo_ts + 22428
}
}
}
}
if zFmt != 0 {
- Xsqlite3_str_append(tls, bp, __ccgo_ts+22365, int32(7))
+ Xsqlite3_str_append(tls, bp, __ccgo_ts+22437, int32(7))
Xsqlite3_str_appendf(tls, bp, zFmt, libc.VaList(bp+136, (*TIndex)(unsafe.Pointer(pIdx)).FzName))
_explainIndexRange(tls, bp, pLoop)
}
} else {
if flags&uint32(WHERE_IPK) != uint32(0) && flags&uint32(WHERE_CONSTRAINT) != uint32(0) {
- zRowid = __ccgo_ts + 16850
- Xsqlite3_str_appendf(tls, bp, __ccgo_ts+22373, libc.VaList(bp+136, zRowid))
+ zRowid = __ccgo_ts + 16922
+ Xsqlite3_str_appendf(tls, bp, __ccgo_ts+22445, libc.VaList(bp+136, zRowid))
if flags&libc.Uint32FromInt32(libc.Int32FromInt32(WHERE_COLUMN_EQ)|libc.Int32FromInt32(WHERE_COLUMN_IN)) != 0 {
cRangeOp = int8('=')
} else {
if flags&uint32(WHERE_BOTH_LIMIT) == uint32(WHERE_BOTH_LIMIT) {
- Xsqlite3_str_appendf(tls, bp, __ccgo_ts+22404, libc.VaList(bp+136, zRowid))
+ Xsqlite3_str_appendf(tls, bp, __ccgo_ts+22476, libc.VaList(bp+136, zRowid))
cRangeOp = int8('<')
} else {
if flags&uint32(WHERE_BTM_LIMIT) != 0 {
@@ -133879,14 +134216,14 @@ func _sqlite3WhereAddExplainText(tls *libc.TLS, pParse uintptr, addr int32, pTab
}
}
}
- Xsqlite3_str_appendf(tls, bp, __ccgo_ts+22414, libc.VaList(bp+136, int32(cRangeOp)))
+ Xsqlite3_str_appendf(tls, bp, __ccgo_ts+22486, libc.VaList(bp+136, int32(cRangeOp)))
} else {
if flags&uint32(WHERE_VIRTUALTABLE) != uint32(0) {
- Xsqlite3_str_appendall(tls, bp, __ccgo_ts+22419)
+ Xsqlite3_str_appendall(tls, bp, __ccgo_ts+22491)
if int32(Tu32(*(*uint8)(unsafe.Pointer(pLoop + 24 + 4))&0x4>>2)) != 0 {
- v3 = __ccgo_ts + 22441
+ v3 = __ccgo_ts + 22513
} else {
- v3 = __ccgo_ts + 22449
+ v3 = __ccgo_ts + 22521
}
Xsqlite3_str_appendf(tls, bp, v3, libc.VaList(bp+136, (*(*struct {
FidxNum int32
@@ -133907,7 +134244,7 @@ func _sqlite3WhereAddExplainText(tls *libc.TLS, pParse uintptr, addr int32, pTab
}
}
if libc.Int32FromUint8((*TSrcItem)(unsafe.Pointer(pItem)).Ffg.Fjointype)&int32(JT_LEFT) != 0 {
- Xsqlite3_str_appendf(tls, bp, __ccgo_ts+22455, 0)
+ Xsqlite3_str_appendf(tls, bp, __ccgo_ts+22527, 0)
}
_sqlite3DbFree(tls, db, *(*uintptr)(unsafe.Pointer(pOp + 16)))
(*TVdbeOp)(unsafe.Pointer(pOp)).Fp4type = int8(-libc.Int32FromInt32(6))
@@ -133973,14 +134310,14 @@ func _sqlite3WhereExplainBloomFilter(tls *libc.TLS, pParse uintptr, pWInfo uintp
db = (*TParse)(unsafe.Pointer(pParse)).Fdb /* Initial space for EQP output string */
_sqlite3StrAccumInit(tls, bp, db, bp+24, int32(100), int32(SQLITE_MAX_LENGTH))
(*(*TStrAccum)(unsafe.Pointer(bp))).FprintfFlags = uint8(SQLITE_PRINTF_INTERNAL)
- Xsqlite3_str_appendf(tls, bp, __ccgo_ts+22466, libc.VaList(bp+136, pItem))
+ Xsqlite3_str_appendf(tls, bp, __ccgo_ts+22538, libc.VaList(bp+136, pItem))
pLoop = (*TWhereLevel)(unsafe.Pointer(pLevel)).FpWLoop
if (*TWhereLoop)(unsafe.Pointer(pLoop)).FwsFlags&uint32(WHERE_IPK) != 0 {
pTab = (*TSrcItem)(unsafe.Pointer(pItem)).FpSTab
if int32((*TTable)(unsafe.Pointer(pTab)).FiPKey) >= 0 {
- Xsqlite3_str_appendf(tls, bp, __ccgo_ts+22245, libc.VaList(bp+136, (*(*TColumn)(unsafe.Pointer((*TTable)(unsafe.Pointer(pTab)).FaCol + uintptr((*TTable)(unsafe.Pointer(pTab)).FiPKey)*12))).FzCnName))
+ Xsqlite3_str_appendf(tls, bp, __ccgo_ts+22317, libc.VaList(bp+136, (*(*TColumn)(unsafe.Pointer((*TTable)(unsafe.Pointer(pTab)).FaCol + uintptr((*TTable)(unsafe.Pointer(pTab)).FiPKey)*12))).FzCnName))
} else {
- Xsqlite3_str_appendf(tls, bp, __ccgo_ts+22487, 0)
+ Xsqlite3_str_appendf(tls, bp, __ccgo_ts+22559, 0)
}
} else {
i = libc.Int32FromUint16((*TWhereLoop)(unsafe.Pointer(pLoop)).FnSkip)
@@ -134004,16 +134341,16 @@ func _sqlite3WhereExplainBloomFilter(tls *libc.TLS, pParse uintptr, pWInfo uintp
FpOrderBy uintptr
})(unsafe.Pointer(pLoop + 24))).FpIndex, i)
if i > libc.Int32FromUint16((*TWhereLoop)(unsafe.Pointer(pLoop)).FnSkip) {
- Xsqlite3_str_append(tls, bp, __ccgo_ts+22234, int32(5))
+ Xsqlite3_str_append(tls, bp, __ccgo_ts+22306, int32(5))
}
- Xsqlite3_str_appendf(tls, bp, __ccgo_ts+22245, libc.VaList(bp+136, z))
+ Xsqlite3_str_appendf(tls, bp, __ccgo_ts+22317, libc.VaList(bp+136, z))
goto _1
_1:
;
i++
}
}
- Xsqlite3_str_append(tls, bp, __ccgo_ts+5175, int32(1))
+ Xsqlite3_str_append(tls, bp, __ccgo_ts+5201, int32(1))
zMsg = _sqlite3StrAccumFinish(tls, bp)
ret = _sqlite3VdbeAddOp4(tls, v, int32(OP_Explain), _sqlite3VdbeCurrentAddr(tls, v), (*TParse)(unsafe.Pointer(pParse)).FaddrExplain, 0, zMsg, -int32(6))
return ret
@@ -134218,7 +134555,7 @@ func _adjustOrderByCol(tls *libc.TLS, pOrderBy uintptr, pEList uintptr) {
// /*
// ** pX is an expression of the form: (vector) IN (SELECT ...)
// ** In other words, it is a vector IN operator with a SELECT clause on the
-// ** LHS. But not all terms in the vector are indexable and the terms might
+// ** RHS. But not all terms in the vector are indexable and the terms might
// ** not be in the correct order for indexing.
// **
// ** This routine makes a copy of the input pX expression and then adjusts
@@ -134297,7 +134634,7 @@ func _removeUnindexableInClauseTerms(tls *libc.TLS, pParse uintptr, iEq int32, p
*(*uintptr)(unsafe.Pointer((*TExpr)(unsafe.Pointer(pNew)).FpLeft + 20)) = pLhs
}
(*TSelect)(unsafe.Pointer(pSelect)).FpEList = pRhs
- v4 = pParse + 112
+ v4 = pParse + 100
*(*int32)(unsafe.Pointer(v4))++
v3 = *(*int32)(unsafe.Pointer(v4))
(*TSelect)(unsafe.Pointer(pSelect)).FselId = libc.Uint32FromInt32(v3) /* Req'd for SubrtnSig validity */
@@ -134659,7 +134996,7 @@ func _codeAllEqualityTerms(tls *libc.TLS, pParse uintptr, pLevel uintptr, bRev i
*/
regBase = (*TParse)(unsafe.Pointer(pParse)).FnMem + int32(1)
nReg = libc.Int32FromUint16(nEq) + nExtraReg
- *(*int32)(unsafe.Pointer(pParse + 48)) += nReg
+ *(*int32)(unsafe.Pointer(pParse + 52)) += nReg
zAff = _sqlite3DbStrDup(tls, (*TParse)(unsafe.Pointer(pParse)).Fdb, _sqlite3IndexAffinityStr(tls, (*TParse)(unsafe.Pointer(pParse)).Fdb, pIdx))
if nSkip != 0 {
iIdxCur = (*TWhereLevel)(unsafe.Pointer(pLevel)).FiIdxCur
@@ -135072,7 +135409,7 @@ func _sqlite3WhereCodeOneLoopStart(tls *libc.TLS, pParse uintptr, v uintptr, pWI
** row of the left table of the join.
*/
if libc.Int32FromUint8((*TWhereLevel)(unsafe.Pointer(pLevel)).FiFrom) > 0 && libc.Int32FromUint8((*(*TSrcItem)(unsafe.Pointer(pTabItem))).Ffg.Fjointype)&int32(JT_LEFT) != 0 {
- v5 = pParse + 48
+ v5 = pParse + 52
*(*int32)(unsafe.Pointer(v5))++
v4 = *(*int32)(unsafe.Pointer(v5))
(*TWhereLevel)(unsafe.Pointer(pLevel)).FiLeftJoin = v4
@@ -135133,11 +135470,11 @@ func _sqlite3WhereCodeOneLoopStart(tls *libc.TLS, pParse uintptr, v uintptr, pWI
FidxStr uintptr
FmHandleIn Tu32
})(unsafe.Pointer(pLoop + 24))).FmHandleIn != 0 {
- v10 = pParse + 44
+ v10 = pParse + 48
v9 = *(*int32)(unsafe.Pointer(v10))
*(*int32)(unsafe.Pointer(v10))++
iTab = v9
- v12 = pParse + 48
+ v12 = pParse + 52
*(*int32)(unsafe.Pointer(v12))++
v11 = *(*int32)(unsafe.Pointer(v12))
iCache = v11
@@ -135168,6 +135505,9 @@ func _sqlite3WhereCodeOneLoopStart(tls *libc.TLS, pParse uintptr, v uintptr, pWI
FmHandleIn Tu32
})(unsafe.Pointer(pLoop + 24))).FidxNum, iReg)
_sqlite3VdbeAddOp2(tls, v, int32(OP_Integer), nConstraint, iReg+int32(1))
+ /* The instruction immediately prior to OP_VFilter must be an OP_Integer
+ ** that sets the "argc" value for xVFilter. This is necessary for
+ ** resolveP2() to work correctly. See tag-20250207a. */
if int32(Tu32(*(*uint8)(unsafe.Pointer(pLoop + 24 + 4))&0x1>>0)) != 0 {
v13 = -int32(6)
} else {
@@ -135306,7 +135646,7 @@ func _sqlite3WhereCodeOneLoopStart(tls *libc.TLS, pParse uintptr, v uintptr, pWI
** construct.
*/
pTerm = *(*uintptr)(unsafe.Pointer((*TWhereLoop)(unsafe.Pointer(pLoop)).FaLTerm))
- v21 = pParse + 48
+ v21 = pParse + 52
*(*int32)(unsafe.Pointer(v21))++
v20 = *(*int32)(unsafe.Pointer(v21))
iReleaseReg = v20
@@ -135386,7 +135726,7 @@ func _sqlite3WhereCodeOneLoopStart(tls *libc.TLS, pParse uintptr, v uintptr, pWI
if pEnd != 0 {
pX1 = (*TWhereTerm)(unsafe.Pointer(pEnd)).FpExpr
/* Transitive constraints */
- v28 = pParse + 48
+ v28 = pParse + 52
*(*int32)(unsafe.Pointer(v28))++
v27 = *(*int32)(unsafe.Pointer(v28))
memEndValue = v27
@@ -135420,7 +135760,7 @@ func _sqlite3WhereCodeOneLoopStart(tls *libc.TLS, pParse uintptr, v uintptr, pWI
(*TWhereLevel)(unsafe.Pointer(pLevel)).Fp1 = iCur
(*TWhereLevel)(unsafe.Pointer(pLevel)).Fp2 = start
if testOp != int32(OP_Noop) {
- v33 = pParse + 48
+ v33 = pParse + 52
*(*int32)(unsafe.Pointer(v33))++
v32 = *(*int32)(unsafe.Pointer(v33))
iRowidReg = v32
@@ -135542,7 +135882,7 @@ func _sqlite3WhereCodeOneLoopStart(tls *libc.TLS, pParse uintptr, v uintptr, pWI
if (*TWhereLoop)(unsafe.Pointer(pLoop)).FwsFlags&libc.Uint32FromInt32(libc.Int32FromInt32(WHERE_TOP_LIMIT)|libc.Int32FromInt32(WHERE_BTM_LIMIT)) == uint32(0) && (*TWhereLoop)(unsafe.Pointer(pLoop)).FwsFlags&uint32(WHERE_BIGNULL_SORT) != uint32(0) {
nExtraReg = int32(1)
bSeekPastNull = uint8(1)
- v40 = pParse + 48
+ v40 = pParse + 52
*(*int32)(unsafe.Pointer(v40))++
v39 = *(*int32)(unsafe.Pointer(v40))
v38 = v39
@@ -135735,7 +136075,7 @@ func _sqlite3WhereCodeOneLoopStart(tls *libc.TLS, pParse uintptr, v uintptr, pWI
if !(j < libc.Int32FromUint16((*TIndex)(unsafe.Pointer(pPk)).FnKeyCol)) {
break
}
- k = int32(_sqlite3TableColumnToIndex(tls, pIdx, *(*Ti16)(unsafe.Pointer((*TIndex)(unsafe.Pointer(pPk)).FaiColumn + uintptr(j)*2))))
+ k = _sqlite3TableColumnToIndex(tls, pIdx, int32(*(*Ti16)(unsafe.Pointer((*TIndex)(unsafe.Pointer(pPk)).FaiColumn + uintptr(j)*2))))
_sqlite3VdbeAddOp3(tls, v, int32(OP_Column), iIdxCur, k, iRowidReg+j)
goto _42
_42:
@@ -135749,12 +136089,13 @@ func _sqlite3WhereCodeOneLoopStart(tls *libc.TLS, pParse uintptr, v uintptr, pWI
if (*TWhereLevel)(unsafe.Pointer(pLevel)).FiLeftJoin == 0 {
/* If a partial index is driving the loop, try to eliminate WHERE clause
** terms from the query that must be true due to the WHERE clause of
- ** the partial index.
+ ** the partial index. This optimization does not work on an outer join,
+ ** as shown by:
**
- ** 2019-11-02 ticket 623eff57e76d45f6: This optimization does not work
- ** for a LEFT JOIN.
+ ** 2019-11-02 ticket 623eff57e76d45f6 (LEFT JOIN)
+ ** 2025-05-29 forum post 7dee41d32506c4ae (RIGHT JOIN)
*/
- if (*TIndex)(unsafe.Pointer(pIdx)).FpPartIdxWhere != 0 {
+ if (*TIndex)(unsafe.Pointer(pIdx)).FpPartIdxWhere != 0 && (*TWhereLevel)(unsafe.Pointer(pLevel)).FpRJ == uintptr(0) {
_whereApplyPartialIndexConstraints(tls, (*TIndex)(unsafe.Pointer(pIdx)).FpPartIdxWhere, iCur, pWC)
}
} else {
@@ -135792,11 +136133,11 @@ func _sqlite3WhereCodeOneLoopStart(tls *libc.TLS, pParse uintptr, v uintptr, pWI
} else {
if (*TWhereLoop)(unsafe.Pointer(pLoop)).FwsFlags&uint32(WHERE_MULTI_OR) != 0 { /* Shortened table list or OR-clause generation */
pCov = uintptr(0)
- v45 = pParse + 44
+ v45 = pParse + 48
v44 = *(*int32)(unsafe.Pointer(v45))
*(*int32)(unsafe.Pointer(v45))++ /* Potential covering index (or NULL) */
iCovCur = v44
- v47 = pParse + 48
+ v47 = pParse + 52
*(*int32)(unsafe.Pointer(v47))++
v46 = *(*int32)(unsafe.Pointer(v47)) /* Cursor used for index scans (if any) */
regReturn = v46 /* Register used with OP_Gosub */
@@ -135816,7 +136157,7 @@ func _sqlite3WhereCodeOneLoopStart(tls *libc.TLS, pParse uintptr, v uintptr, pWI
*/
if libc.Int32FromUint8((*TWhereInfo)(unsafe.Pointer(pWInfo)).FnLevel) > int32(1) { /* Original list of tables */
nNotReady = libc.Int32FromUint8((*TWhereInfo)(unsafe.Pointer(pWInfo)).FnLevel) - iLevel - int32(1)
- pOrTab = _sqlite3DbMallocRawNN(tls, db, uint64(uint32(56)+libc.Uint32FromInt32(nNotReady)*uint32(48)))
+ pOrTab = _sqlite3DbMallocRawNN(tls, db, uint64(uint32(libc.UintptrFromInt32(0)+8)+libc.Uint32FromInt32(nNotReady+libc.Int32FromInt32(1))*libc.Uint32FromInt64(48)))
if pOrTab == uintptr(0) {
return notReady
}
@@ -135852,21 +136193,21 @@ func _sqlite3WhereCodeOneLoopStart(tls *libc.TLS, pParse uintptr, v uintptr, pWI
*/
if libc.Int32FromUint16((*TWhereInfo)(unsafe.Pointer(pWInfo)).FwctrlFlags)&int32(WHERE_DUPLICATES_OK) == 0 {
if (*TTable)(unsafe.Pointer(pTab)).FtabFlags&uint32(TF_WithoutRowid) == uint32(0) {
- v50 = pParse + 48
+ v50 = pParse + 52
*(*int32)(unsafe.Pointer(v50))++
v49 = *(*int32)(unsafe.Pointer(v50))
regRowset = v49
_sqlite3VdbeAddOp2(tls, v, int32(OP_Null), 0, regRowset)
} else {
pPk1 = _sqlite3PrimaryKeyIndex(tls, pTab)
- v52 = pParse + 44
+ v52 = pParse + 48
v51 = *(*int32)(unsafe.Pointer(v52))
*(*int32)(unsafe.Pointer(v52))++
regRowset = v51
_sqlite3VdbeAddOp2(tls, v, int32(OP_OpenEphemeral), regRowset, libc.Int32FromUint16((*TIndex)(unsafe.Pointer(pPk1)).FnKeyCol))
_sqlite3VdbeSetP4KeyInfo(tls, pParse, pPk1)
}
- v54 = pParse + 48
+ v54 = pParse + 52
*(*int32)(unsafe.Pointer(v54))++
v53 = *(*int32)(unsafe.Pointer(v54))
regRowid = v53
@@ -135884,7 +136225,7 @@ func _sqlite3WhereCodeOneLoopStart(tls *libc.TLS, pParse uintptr, v uintptr, pWI
**
** This optimization also only applies if the (x1 OR x2 OR ...) term
** is not contained in the ON clause of a LEFT JOIN.
- ** See ticket http://www.sqlite.org/src/info/f2369304e4
+ ** See ticket http://sqlite.org/src/info/f2369304e4
**
** 2022-02-04: Do not push down slices of a row-value comparison.
** In other words, "w" or "y" may not be a slice of a vector. Otherwise,
@@ -135939,7 +136280,7 @@ func _sqlite3WhereCodeOneLoopStart(tls *libc.TLS, pParse uintptr, v uintptr, pWI
** eliminating duplicates from other WHERE clauses, the action for each
** sub-WHERE clause is to to invoke the main loop body as a subroutine.
*/
- _sqlite3VdbeExplain(tls, pParse, uint8(1), __ccgo_ts+22495, 0)
+ _sqlite3VdbeExplain(tls, pParse, uint8(1), __ccgo_ts+22567, 0)
ii = 0
for {
if !(ii < (*TWhereClause)(unsafe.Pointer(pOrWc)).FnTerm) {
@@ -135962,7 +136303,7 @@ func _sqlite3WhereCodeOneLoopStart(tls *libc.TLS, pParse uintptr, v uintptr, pWI
pOrExpr = pAndExpr
}
/* Loop through table entries that match term pOrTerm. */
- _sqlite3VdbeExplain(tls, pParse, uint8(1), __ccgo_ts+22510, libc.VaList(bp+72, ii+int32(1)))
+ _sqlite3VdbeExplain(tls, pParse, uint8(1), __ccgo_ts+22582, libc.VaList(bp+72, ii+int32(1)))
pSubWInfo = _sqlite3WhereBegin(tls, pParse, pOrTab, pOrExpr, uintptr(0), uintptr(0), uintptr(0), uint16(WHERE_OR_SUBCLAUSE), iCovCur)
if pSubWInfo != 0 {
addrExplain = _sqlite3WhereExplainOneScan(tls, pParse, pOrTab, pSubWInfo+752, uint16(0))
@@ -136451,9 +136792,9 @@ func _sqlite3WhereRightJoinLoop(tls *libc.TLS, pWInfo uintptr, iLevel int32, pLe
defer tls.Free(80)
var addrCont, iCol, iCur, iIdxCur, iPk, jmp, k, nPk, r, v3 int32
var mAll TBitmask
- var pLoop, pParse, pPk, pRJ, pRight, pSubWInfo, pSubWhere, pSubq, pTab, pTabItem, pTerm, pWC, v, v4 uintptr
- var _ /* sFrom at bp+0 */ TSrcList
- _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _ = addrCont, iCol, iCur, iIdxCur, iPk, jmp, k, mAll, nPk, pLoop, pParse, pPk, pRJ, pRight, pSubWInfo, pSubWhere, pSubq, pTab, pTabItem, pTerm, pWC, r, v, v3, v4
+ var pFrom, pLoop, pParse, pPk, pRJ, pRight, pSubWInfo, pSubWhere, pSubq, pTab, pTabItem, pTerm, pWC, v, v4 uintptr
+ var _ /* fromSpace at bp+0 */ [56]Tu8
+ _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _ = addrCont, iCol, iCur, iIdxCur, iPk, jmp, k, mAll, nPk, pFrom, pLoop, pParse, pPk, pRJ, pRight, pSubWInfo, pSubWhere, pSubq, pTab, pTabItem, pTerm, pWC, r, v, v3, v4
pParse = (*TWhereInfo)(unsafe.Pointer(pWInfo)).FpParse
v = (*TParse)(unsafe.Pointer(pParse)).FpVdbe
pRJ = (*TWhereLevel)(unsafe.Pointer(pLevel)).FpRJ
@@ -136462,7 +136803,7 @@ func _sqlite3WhereRightJoinLoop(tls *libc.TLS, pWInfo uintptr, iLevel int32, pLe
pLoop = (*TWhereLevel)(unsafe.Pointer(pLevel)).FpWLoop
pTabItem = (*TWhereInfo)(unsafe.Pointer(pWInfo)).FpTabList + 8 + uintptr((*TWhereLevel)(unsafe.Pointer(pLevel)).FiFrom)*48
mAll = uint64(0)
- _sqlite3VdbeExplain(tls, pParse, uint8(1), __ccgo_ts+22519, libc.VaList(bp+64, (*TTable)(unsafe.Pointer((*TSrcItem)(unsafe.Pointer(pTabItem)).FpSTab)).FzName))
+ _sqlite3VdbeExplain(tls, pParse, uint8(1), __ccgo_ts+22591, libc.VaList(bp+64, (*TTable)(unsafe.Pointer((*TSrcItem)(unsafe.Pointer(pTabItem)).FpSTab)).FzName))
k = 0
for {
if !(k < iLevel) {
@@ -136508,15 +136849,16 @@ func _sqlite3WhereRightJoinLoop(tls *libc.TLS, pWInfo uintptr, iLevel int32, pLe
k++
}
}
- (*(*TSrcList)(unsafe.Pointer(bp))).FnSrc = int32(1)
- (*(*TSrcList)(unsafe.Pointer(bp))).FnAlloc = uint32(1)
- libc.Xmemcpy(tls, bp+8, pTabItem, uint32(48))
- (*(*TSrcItem)(unsafe.Pointer(bp + 8))).Ffg.Fjointype = uint8(0)
+ pFrom = bp
+ (*TSrcList)(unsafe.Pointer(pFrom)).FnSrc = int32(1)
+ (*TSrcList)(unsafe.Pointer(pFrom)).FnAlloc = uint32(1)
+ libc.Xmemcpy(tls, pFrom+8, pTabItem, uint32(48))
+ (*(*TSrcItem)(unsafe.Pointer(pFrom + 8))).Ffg.Fjointype = uint8(0)
(*TParse)(unsafe.Pointer(pParse)).FwithinRJSubrtn++
- pSubWInfo = _sqlite3WhereBegin(tls, pParse, bp, pSubWhere, uintptr(0), uintptr(0), uintptr(0), uint16(WHERE_RIGHT_JOIN), 0)
+ pSubWInfo = _sqlite3WhereBegin(tls, pParse, pFrom, pSubWhere, uintptr(0), uintptr(0), uintptr(0), uint16(WHERE_RIGHT_JOIN), 0)
if pSubWInfo != 0 {
iCur = (*TWhereLevel)(unsafe.Pointer(pLevel)).FiTabCur
- v4 = pParse + 48
+ v4 = pParse + 52
*(*int32)(unsafe.Pointer(v4))++
v3 = *(*int32)(unsafe.Pointer(v4))
r = v3
@@ -136528,7 +136870,7 @@ func _sqlite3WhereRightJoinLoop(tls *libc.TLS, pWInfo uintptr, iLevel int32, pLe
} else {
pPk = _sqlite3PrimaryKeyIndex(tls, pTab)
nPk = libc.Int32FromUint16((*TIndex)(unsafe.Pointer(pPk)).FnKeyCol)
- *(*int32)(unsafe.Pointer(pParse + 48)) += nPk - int32(1)
+ *(*int32)(unsafe.Pointer(pParse + 52)) += nPk - int32(1)
iPk = 0
for {
if !(iPk < nPk) {
@@ -136999,19 +137341,19 @@ var _aOp = [4]struct {
FeOp2 uint8
}{
0: {
- FzOp: __ccgo_ts + 16699,
+ FzOp: __ccgo_ts + 16771,
FeOp2: uint8(SQLITE_INDEX_CONSTRAINT_MATCH),
},
1: {
- FzOp: __ccgo_ts + 16033,
+ FzOp: __ccgo_ts + 16105,
FeOp2: uint8(SQLITE_INDEX_CONSTRAINT_GLOB),
},
2: {
- FzOp: __ccgo_ts + 15512,
+ FzOp: __ccgo_ts + 15564,
FeOp2: uint8(SQLITE_INDEX_CONSTRAINT_LIKE),
},
3: {
- FzOp: __ccgo_ts + 22533,
+ FzOp: __ccgo_ts + 22605,
FeOp2: uint8(SQLITE_INDEX_CONSTRAINT_REGEXP),
},
}
@@ -137799,7 +138141,7 @@ func _exprAnalyze(tls *libc.TLS, pSrc uintptr, pWC uintptr, idxTerm int32) {
extraRight = x - uint64(1) /* ON clause terms may not be used with an index
** on left table of a LEFT JOIN. Ticket #3015 */
if prereqAll>>libc.Int32FromInt32(1) >= x {
- _sqlite3ErrorMsg(tls, pParse, __ccgo_ts+22540, 0)
+ _sqlite3ErrorMsg(tls, pParse, __ccgo_ts+22612, 0)
return
}
} else {
@@ -137811,10 +138153,10 @@ func _exprAnalyze(tls *libc.TLS, pSrc uintptr, pWC uintptr, idxTerm int32) {
** if there is a RIGHT or FULL JOIN in the query. This makes SQLite
** more like other systems, and also preserves legacy. */
if (*TSrcList)(unsafe.Pointer(pSrc)).FnSrc > 0 && libc.Int32FromUint8((*(*TSrcItem)(unsafe.Pointer(pSrc + 8))).Ffg.Fjointype)&int32(JT_LTORJ) != 0 {
- _sqlite3ErrorMsg(tls, pParse, __ccgo_ts+22540, 0)
+ _sqlite3ErrorMsg(tls, pParse, __ccgo_ts+22612, 0)
return
}
- *(*Tu32)(unsafe.Pointer(pExpr + 4)) &= libc.Uint32FromInt32(^libc.Int32FromInt32(EP_InnerON))
+ *(*Tu32)(unsafe.Pointer(pExpr + 4)) &= ^libc.Uint32FromInt32(libc.Int32FromInt32(EP_InnerON))
}
}
}
@@ -137895,7 +138237,7 @@ func _exprAnalyze(tls *libc.TLS, pSrc uintptr, pWC uintptr, idxTerm int32) {
} else {
if op == int32(TK_ISNULL) && !((*TExpr)(unsafe.Pointer(pExpr)).Fflags&libc.Uint32FromInt32(libc.Int32FromInt32(EP_OuterON)) != libc.Uint32FromInt32(0)) && 0 == _sqlite3ExprCanBeNull(tls, pLeft) {
(*TExpr)(unsafe.Pointer(pExpr)).Fop = uint8(TK_TRUEFALSE) /* See tag-20230504-1 */
- *(*uintptr)(unsafe.Pointer(pExpr + 8)) = __ccgo_ts + 8082
+ *(*uintptr)(unsafe.Pointer(pExpr + 8)) = __ccgo_ts + 8107
*(*Tu32)(unsafe.Pointer(pExpr + 4)) |= libc.Uint32FromInt32(libc.Int32FromInt32(EP_IsFalse))
(*TWhereTerm)(unsafe.Pointer(pTerm)).FprereqAll = uint64(0)
(*TWhereTerm)(unsafe.Pointer(pTerm)).FeOperator = uint16(0)
@@ -137996,7 +138338,7 @@ func _exprAnalyze(tls *libc.TLS, pSrc uintptr, pWC uintptr, idxTerm int32) {
*(*Tu8)(unsafe.Pointer(pC))++
}
if *(*int32)(unsafe.Pointer(bp + 8)) != 0 {
- v13 = __ccgo_ts + 22581
+ v13 = __ccgo_ts + 22653
} else {
v13 = uintptr(unsafe.Pointer(&_sqlite3StrBINARY))
}
@@ -138527,7 +138869,7 @@ func _sqlite3WhereTabFuncArgs(tls *libc.TLS, pParse uintptr, pItem uintptr, pWC
k++
}
if k >= int32((*TTable)(unsafe.Pointer(pTab)).FnCol) {
- _sqlite3ErrorMsg(tls, pParse, __ccgo_ts+22588, libc.VaList(bp+8, (*TTable)(unsafe.Pointer(pTab)).FzName, j))
+ _sqlite3ErrorMsg(tls, pParse, __ccgo_ts+22660, libc.VaList(bp+8, (*TTable)(unsafe.Pointer(pTab)).FzName, j))
return
}
pColRef = _sqlite3ExprAlloc(tls, (*TParse)(unsafe.Pointer(pParse)).Fdb, int32(TK_COLUMN), uintptr(0), 0)
@@ -138599,7 +138941,6 @@ type THiddenIndexInfo = struct {
FeDistinct int32
FmIn Tu32
FmHandleIn Tu32
- FaRhs [1]uintptr
}
type HiddenIndexInfo = THiddenIndexInfo
@@ -138610,7 +138951,6 @@ type THiddenIndexInfo1 = struct {
FeDistinct int32
FmIn Tu32
FmHandleIn Tu32
- FaRhs [1]uintptr
}
type HiddenIndexInfo1 = THiddenIndexInfo1
@@ -139643,7 +139983,7 @@ func _constructAutomaticIndex(tls *libc.TLS, pParse uintptr, pWC uintptr, notRea
}
cMask = v2
if !(sentWarning != 0) {
- Xsqlite3_log(tls, libc.Int32FromInt32(SQLITE_WARNING)|libc.Int32FromInt32(1)<<libc.Int32FromInt32(8), __ccgo_ts+22624, libc.VaList(bp+16, (*TTable)(unsafe.Pointer(pTable)).FzName, (*(*TColumn)(unsafe.Pointer((*TTable)(unsafe.Pointer(pTable)).FaCol + uintptr(iCol)*12))).FzCnName))
+ Xsqlite3_log(tls, libc.Int32FromInt32(SQLITE_WARNING)|libc.Int32FromInt32(1)<<libc.Int32FromInt32(8), __ccgo_ts+22696, libc.VaList(bp+16, (*TTable)(unsafe.Pointer(pTable)).FzName, (*(*TColumn)(unsafe.Pointer((*TTable)(unsafe.Pointer(pTable)).FaCol + uintptr(iCol)*12))).FzCnName))
sentWarning = uint8(1)
}
if idxCols&cMask == uint64(0) {
@@ -139733,7 +140073,8 @@ func _constructAutomaticIndex(tls *libc.TLS, pParse uintptr, pWC uintptr, notRea
nKeyCol += int32((*TTable)(unsafe.Pointer(pTable)).FnCol) - libc.Int32FromUint32(libc.Uint32FromInt64(8)*libc.Uint32FromInt32(8)) + int32(1)
}
/* Construct the Index object to describe this index */
- pIdx = _sqlite3AllocateIndexObject(tls, (*TParse)(unsafe.Pointer(pParse)).Fdb, int16(nKeyCol+libc.BoolInt32((*TTable)(unsafe.Pointer(pTable)).FtabFlags&uint32(TF_WithoutRowid) == uint32(0))), 0, bp)
+ /* ^-- This guarantees that the number of index columns will fit in the u16 */
+ pIdx = _sqlite3AllocateIndexObject(tls, (*TParse)(unsafe.Pointer(pParse)).Fdb, nKeyCol+libc.BoolInt32((*TTable)(unsafe.Pointer(pTable)).FtabFlags&uint32(TF_WithoutRowid) == uint32(0)), 0, bp)
if pIdx == uintptr(0) {
goto end_auto_index_create
}
@@ -139745,7 +140086,7 @@ func _constructAutomaticIndex(tls *libc.TLS, pParse uintptr, pWC uintptr, notRea
FpIndex uintptr
FpOrderBy uintptr
})(unsafe.Pointer(pLoop + 24))).FpIndex = pIdx
- (*TIndex)(unsafe.Pointer(pIdx)).FzName = __ccgo_ts + 22650
+ (*TIndex)(unsafe.Pointer(pIdx)).FzName = __ccgo_ts + 22722
(*TIndex)(unsafe.Pointer(pIdx)).FpTable = pTable
n = 0
idxCols = uint64(0)
@@ -139833,7 +140174,7 @@ func _constructAutomaticIndex(tls *libc.TLS, pParse uintptr, pWC uintptr, notRea
*(*uintptr)(unsafe.Pointer((*TIndex)(unsafe.Pointer(pIdx)).FazColl + uintptr(n)*4)) = uintptr(unsafe.Pointer(&_sqlite3StrBINARY))
}
/* Create the automatic index */
- v14 = pParse + 44
+ v14 = pParse + 48
v13 = *(*int32)(unsafe.Pointer(v14))
*(*int32)(unsafe.Pointer(v14))++
(*TWhereLevel)(unsafe.Pointer(pLevel)).FiIdxCur = v13
@@ -139841,7 +140182,7 @@ func _constructAutomaticIndex(tls *libc.TLS, pParse uintptr, pWC uintptr, notRea
_sqlite3VdbeSetP4KeyInfo(tls, pParse, pIdx)
if (*Tsqlite3)(unsafe.Pointer((*TParse)(unsafe.Pointer(pParse)).Fdb)).FdbOptFlags&libc.Uint32FromInt32(libc.Int32FromInt32(SQLITE_BloomFilter)) == uint32(0) && useBloomFilter != 0 {
_sqlite3WhereExplainBloomFilter(tls, pParse, (*TWhereClause)(unsafe.Pointer(pWC)).FpWInfo, pLevel)
- v16 = pParse + 48
+ v16 = pParse + 52
*(*int32)(unsafe.Pointer(v16))++
v15 = *(*int32)(unsafe.Pointer(v16))
(*TWhereLevel)(unsafe.Pointer(pLevel)).FregFilter = v15
@@ -139937,7 +140278,7 @@ func _sqlite3ConstructBloomFilter(tls *libc.TLS, pWInfo uintptr, iLevel int32, p
_sqlite3WhereExplainBloomFilter(tls, pParse, pWInfo, pLevel)
addrCont = _sqlite3VdbeMakeLabel(tls, pParse)
iCur = (*TWhereLevel)(unsafe.Pointer(pLevel)).FiTabCur
- v2 = pParse + 48
+ v2 = pParse + 52
*(*int32)(unsafe.Pointer(v2))++
v1 = *(*int32)(unsafe.Pointer(v2))
(*TWhereLevel)(unsafe.Pointer(pLevel)).FregFilter = v1
@@ -140211,7 +140552,7 @@ func _allocateIndexInfo(tls *libc.TLS, pWInfo uintptr, pWC uintptr, mUnusable TB
}
/* Allocate the sqlite3_index_info structure
*/
- pIdxInfo = _sqlite3DbMallocZero(tls, (*TParse)(unsafe.Pointer(pParse)).Fdb, uint64(uint32(64)+(libc.Uint32FromInt64(12)+libc.Uint32FromInt64(8))*libc.Uint32FromInt32(nTerm)+uint32(8)*libc.Uint32FromInt32(nOrderBy)+uint32(24)+uint32(4)*libc.Uint32FromInt32(nTerm)))
+ pIdxInfo = _sqlite3DbMallocZero(tls, (*TParse)(unsafe.Pointer(pParse)).Fdb, uint64(uint32(64)+(libc.Uint32FromInt64(12)+libc.Uint32FromInt64(8))*libc.Uint32FromInt32(nTerm)+uint32(8)*libc.Uint32FromInt32(nOrderBy)+(uint32(libc.UintptrFromInt32(0)+20)+libc.Uint32FromInt32(nTerm)*uint32(4))))
if pIdxInfo == uintptr(0) {
_sqlite3ErrorMsg(tls, pParse, __ccgo_ts+1637, 0)
return uintptr(0)
@@ -140419,9 +140760,9 @@ func _vtabBestIndex(tls *libc.TLS, pParse uintptr, pTab uintptr, p uintptr) (r i
_sqlite3OomFault(tls, (*TParse)(unsafe.Pointer(pParse)).Fdb)
} else {
if !((*Tsqlite3_vtab)(unsafe.Pointer(pVtab)).FzErrMsg != 0) {
- _sqlite3ErrorMsg(tls, pParse, __ccgo_ts+3864, libc.VaList(bp+8, _sqlite3ErrStr(tls, rc)))
+ _sqlite3ErrorMsg(tls, pParse, __ccgo_ts+3890, libc.VaList(bp+8, _sqlite3ErrStr(tls, rc)))
} else {
- _sqlite3ErrorMsg(tls, pParse, __ccgo_ts+3864, libc.VaList(bp+8, (*Tsqlite3_vtab)(unsafe.Pointer(pVtab)).FzErrMsg))
+ _sqlite3ErrorMsg(tls, pParse, __ccgo_ts+3890, libc.VaList(bp+8, (*Tsqlite3_vtab)(unsafe.Pointer(pVtab)).FzErrMsg))
}
}
}
@@ -141894,13 +142235,8 @@ func _whereLoopAddBtreeIndex(tls *libc.TLS, pBuilder uintptr, pSrc uintptr, pPro
} else {
opMask = libc.Int32FromInt32(WO_EQ) | libc.Int32FromInt32(WO_IN) | libc.Int32FromInt32(WO_EQ)<<(libc.Int32FromInt32(TK_GT)-libc.Int32FromInt32(TK_EQ)) | libc.Int32FromInt32(WO_EQ)<<(libc.Int32FromInt32(TK_GE)-libc.Int32FromInt32(TK_EQ)) | libc.Int32FromInt32(WO_EQ)<<(libc.Int32FromInt32(TK_LT)-libc.Int32FromInt32(TK_EQ)) | libc.Int32FromInt32(WO_EQ)<<(libc.Int32FromInt32(TK_LE)-libc.Int32FromInt32(TK_EQ)) | libc.Int32FromInt32(WO_ISNULL) | libc.Int32FromInt32(WO_IS)
}
- if int32(uint32(*(*uint16)(unsafe.Pointer(pProbe + 56))&0x4>>2)) != 0 || int32(uint32(*(*uint16)(unsafe.Pointer(pProbe + 56))&0x100>>8)) != 0 {
- if int32(uint32(*(*uint16)(unsafe.Pointer(pProbe + 56))&0x4>>2)) != 0 {
- opMask &= ^(libc.Int32FromInt32(WO_EQ)<<(libc.Int32FromInt32(TK_GT)-libc.Int32FromInt32(TK_EQ)) | libc.Int32FromInt32(WO_EQ)<<(libc.Int32FromInt32(TK_GE)-libc.Int32FromInt32(TK_EQ)) | libc.Int32FromInt32(WO_EQ)<<(libc.Int32FromInt32(TK_LT)-libc.Int32FromInt32(TK_EQ)) | libc.Int32FromInt32(WO_EQ)<<(libc.Int32FromInt32(TK_LE)-libc.Int32FromInt32(TK_EQ)))
- }
- if int32(uint32(*(*uint16)(unsafe.Pointer(pProbe + 56))&0x100>>8)) != 0 && int32(*(*uint32)(unsafe.Pointer(pSrc + 12 + 4))&0x2>>1) == 0 {
- opMask &= ^(libc.Int32FromInt32(WO_EQ) | libc.Int32FromInt32(WO_IN) | libc.Int32FromInt32(WO_IS))
- }
+ if int32(uint32(*(*uint16)(unsafe.Pointer(pProbe + 56))&0x4>>2)) != 0 {
+ opMask &= ^(libc.Int32FromInt32(WO_EQ)<<(libc.Int32FromInt32(TK_GT)-libc.Int32FromInt32(TK_EQ)) | libc.Int32FromInt32(WO_EQ)<<(libc.Int32FromInt32(TK_GE)-libc.Int32FromInt32(TK_EQ)) | libc.Int32FromInt32(WO_EQ)<<(libc.Int32FromInt32(TK_LT)-libc.Int32FromInt32(TK_EQ)) | libc.Int32FromInt32(WO_EQ)<<(libc.Int32FromInt32(TK_LE)-libc.Int32FromInt32(TK_EQ)))
}
saved_nEq = (*(*struct {
FnEq Tu16
@@ -142260,7 +142596,7 @@ func _whereLoopAddBtreeIndex(tls *libc.TLS, pBuilder uintptr, pSrc uintptr, pPro
FnDistinctCol Tu16
FpIndex uintptr
FpOrderBy uintptr
- })(unsafe.Pointer(pNew + 24))).FnEq) < libc.Int32FromUint16((*TIndex)(unsafe.Pointer(pProbe)).FnKeyCol) || int32(uint32(*(*uint16)(unsafe.Pointer(pProbe + 56))&0x3>>0)) != int32(SQLITE_IDXTYPE_PRIMARYKEY) && !(int32(uint32(*(*uint16)(unsafe.Pointer(pProbe + 56))&0x800>>11)) != 0)) {
+ })(unsafe.Pointer(pNew + 24))).FnEq) < libc.Int32FromUint16((*TIndex)(unsafe.Pointer(pProbe)).FnKeyCol) || int32(uint32(*(*uint16)(unsafe.Pointer(pProbe + 56))&0x3>>0)) != int32(SQLITE_IDXTYPE_PRIMARYKEY) && !(int32(uint32(*(*uint16)(unsafe.Pointer(pProbe + 56))&0x400>>10)) != 0)) {
if libc.Int32FromUint16((*(*struct {
FnEq Tu16
FnBtm Tu16
@@ -142464,7 +142800,7 @@ func _whereUsablePartialIndex(tls *libc.TLS, iTab int32, jointype Tu8, pWC uintp
break
}
pExpr = (*TWhereTerm)(unsafe.Pointer(pTerm)).FpExpr
- if (!((*TExpr)(unsafe.Pointer(pExpr)).Fflags&libc.Uint32FromInt32(libc.Int32FromInt32(EP_OuterON)) != libc.Uint32FromInt32(0)) || *(*int32)(unsafe.Pointer(pExpr + 36)) == iTab) && (libc.Int32FromUint8(jointype)&int32(JT_OUTER) == 0 || (*TExpr)(unsafe.Pointer(pExpr)).Fflags&libc.Uint32FromInt32(libc.Int32FromInt32(EP_OuterON)) != uint32(0)) && _sqlite3ExprImpliesExpr(tls, pParse, pExpr, pWhere, iTab) != 0 && libc.Int32FromUint16((*TWhereTerm)(unsafe.Pointer(pTerm)).FwtFlags)&int32(TERM_VNULL) == 0 {
+ if (!((*TExpr)(unsafe.Pointer(pExpr)).Fflags&libc.Uint32FromInt32(libc.Int32FromInt32(EP_OuterON)) != libc.Uint32FromInt32(0)) || *(*int32)(unsafe.Pointer(pExpr + 36)) == iTab) && (libc.Int32FromUint8(jointype)&int32(JT_OUTER) == 0 || (*TExpr)(unsafe.Pointer(pExpr)).Fflags&libc.Uint32FromInt32(libc.Int32FromInt32(EP_OuterON)) != uint32(0)) && _sqlite3ExprImpliesExpr(tls, pParse, pExpr, pWhere, iTab) != 0 && !(_sqlite3ExprImpliesExpr(tls, pParse, pExpr, pWhere, -int32(1)) != 0) && libc.Int32FromUint16((*TWhereTerm)(unsafe.Pointer(pTerm)).FwtFlags)&int32(TERM_VNULL) == 0 {
return int32(1)
}
goto _1
@@ -142574,7 +142910,7 @@ func _whereIsCoveringIndexWalkCallback(tls *libc.TLS, pWalk uintptr, pExpr uintp
(*TCoveringIndexCheck)(unsafe.Pointer(pCk)).FbUnidx = uint8(1)
return int32(WRC_Abort)
} else {
- if int32(uint32(*(*uint16)(unsafe.Pointer(pIdx + 56))&0x2000>>13)) != 0 && _exprIsCoveredByIndex(tls, pExpr, pIdx, (*TCoveringIndexCheck1)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(pWalk + 24)))).FiTabCur) != 0 {
+ if int32(uint32(*(*uint16)(unsafe.Pointer(pIdx + 56))&0x1000>>12)) != 0 && _exprIsCoveredByIndex(tls, pExpr, pIdx, (*TCoveringIndexCheck1)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(pWalk + 24)))).FiTabCur) != 0 {
(*TCoveringIndexCheck)(unsafe.Pointer(pCk)).FbExpr = uint8(1)
return int32(WRC_Prune)
}
@@ -142619,7 +142955,7 @@ func _whereIsCoveringIndex(tls *libc.TLS, pWInfo uintptr, pIdx uintptr, iTabCur
** if pIdx is covering. Assume it is not. */
return uint32(0)
}
- if int32(uint32(*(*uint16)(unsafe.Pointer(pIdx + 56))&0x2000>>13)) == 0 {
+ if int32(uint32(*(*uint16)(unsafe.Pointer(pIdx + 56))&0x1000>>12)) == 0 {
i = 0
for {
if !(i < libc.Int32FromUint16((*TIndex)(unsafe.Pointer(pIdx)).FnColumn)) {
@@ -142748,7 +143084,7 @@ func _wherePartIdxExpr(tls *libc.TLS, pParse uintptr, pIdx uintptr, pPart uintpt
(*TIndexedExpr)(unsafe.Pointer(p)).Faff = aff
(*TParse)(unsafe.Pointer(pParse)).FpIdxPartExpr = p
if (*TIndexedExpr)(unsafe.Pointer(p)).FpIENext == uintptr(0) {
- pArg = pParse + 80
+ pArg = pParse + 84
_sqlite3ParserAddCleanup(tls, pParse, __ccgo_fp(_whereIndexedExprCleanup), pArg)
}
}
@@ -142926,7 +143262,7 @@ func _whereLoopAddBtree(tls *libc.TLS, pBuilder uintptr, mPrereq TBitmask) (r in
/* See ticket [98d973b8f5] */
goto _4 /* Partial index inappropriate for this query */
}
- if int32(uint32(*(*uint16)(unsafe.Pointer(pProbe + 56))&0x200>>9)) != 0 {
+ if int32(uint32(*(*uint16)(unsafe.Pointer(pProbe + 56))&0x100>>8)) != 0 {
goto _4
}
rSize = *(*TLogEst)(unsafe.Pointer((*TIndex)(unsafe.Pointer(pProbe)).FaiRowLogEst))
@@ -143030,7 +143366,7 @@ func _whereLoopAddBtree(tls *libc.TLS, pBuilder uintptr, mPrereq TBitmask) (r in
_wherePartIdxExpr(tls, (*TWhereInfo)(unsafe.Pointer(pWInfo)).FpParse, pProbe, (*TIndex)(unsafe.Pointer(pProbe)).FpPartIdxWhere, bp+112, 0, uintptr(0))
}
(*TWhereLoop)(unsafe.Pointer(pNew)).FwsFlags = uint32(WHERE_INDEXED)
- if *(*TBitmask)(unsafe.Pointer(bp + 112)) == libc.Uint64FromInt32(1)<<(libc.Int32FromUint32(libc.Uint32FromInt64(8)*libc.Uint32FromInt32(8))-libc.Int32FromInt32(1)) || int32(uint32(*(*uint16)(unsafe.Pointer(pProbe + 56))&0x2000>>13)) != 0 && !(int32(uint32(*(*uint16)(unsafe.Pointer(pProbe + 56))&0x1000>>12)) != 0) && *(*TBitmask)(unsafe.Pointer(bp + 112)) != uint64(0) {
+ if *(*TBitmask)(unsafe.Pointer(bp + 112)) == libc.Uint64FromInt32(1)<<(libc.Int32FromUint32(libc.Uint32FromInt64(8)*libc.Uint32FromInt32(8))-libc.Int32FromInt32(1)) || int32(uint32(*(*uint16)(unsafe.Pointer(pProbe + 56))&0x1000>>12)) != 0 && !(int32(uint32(*(*uint16)(unsafe.Pointer(pProbe + 56))&0x800>>11)) != 0) && *(*TBitmask)(unsafe.Pointer(bp + 112)) != uint64(0) {
isCov = _whereIsCoveringIndex(tls, pWInfo, pProbe, (*TSrcItem)(unsafe.Pointer(pSrc)).FiCursor)
if isCov == uint32(0) {
} else {
@@ -143267,7 +143603,7 @@ func _whereLoopAddVirtualOne(tls *libc.TLS, pBuilder uintptr, mPrereq TBitmask,
pTerm1 = v4
}
if v5 || v4 == uintptr(0) || *(*uintptr)(unsafe.Pointer((*TWhereLoop)(unsafe.Pointer(pNew)).FaLTerm + uintptr(iTerm)*4)) != uintptr(0) || libc.Int32FromUint8((*Tsqlite3_index_constraint)(unsafe.Pointer(pIdxCons)).Fusable) == 0 {
- _sqlite3ErrorMsg(tls, pParse, __ccgo_ts+22661, libc.VaList(bp+8, (*TTable)(unsafe.Pointer((*TSrcItem)(unsafe.Pointer(pSrc)).FpSTab)).FzName))
+ _sqlite3ErrorMsg(tls, pParse, __ccgo_ts+22733, libc.VaList(bp+8, (*TTable)(unsafe.Pointer((*TSrcItem)(unsafe.Pointer(pSrc)).FpSTab)).FzName))
_freeIdxStr(tls, pIdxInfo)
return int32(SQLITE_ERROR)
}
@@ -143342,7 +143678,7 @@ func _whereLoopAddVirtualOne(tls *libc.TLS, pBuilder uintptr, mPrereq TBitmask,
if *(*uintptr)(unsafe.Pointer((*TWhereLoop)(unsafe.Pointer(pNew)).FaLTerm + uintptr(i)*4)) == uintptr(0) {
/* The non-zero argvIdx values must be contiguous. Raise an
** error if they are not */
- _sqlite3ErrorMsg(tls, pParse, __ccgo_ts+22661, libc.VaList(bp+8, (*TTable)(unsafe.Pointer((*TSrcItem)(unsafe.Pointer(pSrc)).FpSTab)).FzName))
+ _sqlite3ErrorMsg(tls, pParse, __ccgo_ts+22733, libc.VaList(bp+8, (*TTable)(unsafe.Pointer((*TSrcItem)(unsafe.Pointer(pSrc)).FpSTab)).FzName))
_freeIdxStr(tls, pIdxInfo)
return int32(SQLITE_ERROR)
}
@@ -143496,7 +143832,7 @@ func Xsqlite3_vtab_rhs_value(tls *libc.TLS, pIdxInfo uintptr, iCons int32, ppVal
pVal = uintptr(0)
rc = SQLITE_OK
if iCons < 0 || iCons >= (*Tsqlite3_index_info)(unsafe.Pointer(pIdxInfo)).FnConstraint {
- rc = _sqlite3MisuseError(tls, int32(167894)) /* EV: R-30545-25046 */
+ rc = _sqlite3MisuseError(tls, int32(168893)) /* EV: R-30545-25046 */
} else {
if *(*uintptr)(unsafe.Pointer(pH + 20 + uintptr(iCons)*4)) == uintptr(0) {
pTerm = _termFromWhereClause(tls, (*THiddenIndexInfo)(unsafe.Pointer(pH)).FpWC, (*(*Tsqlite3_index_constraint)(unsafe.Pointer((*Tsqlite3_index_info)(unsafe.Pointer(pIdxInfo)).FaConstraint + uintptr(iCons)*12))).FiTermOffset)
@@ -143932,7 +144268,7 @@ func _whereLoopAddAll(tls *libc.TLS, pBuilder uintptr) (r int32) {
if rc != 0 || (*Tsqlite3)(unsafe.Pointer(db)).FmallocFailed != 0 {
if rc == int32(SQLITE_DONE) {
/* We hit the query planner search limit set by iPlanLimit */
- Xsqlite3_log(tls, int32(SQLITE_WARNING), __ccgo_ts+22687, 0)
+ Xsqlite3_log(tls, int32(SQLITE_WARNING), __ccgo_ts+22759, 0)
rc = SQLITE_OK
} else {
break
@@ -145140,7 +145476,7 @@ func _wherePathSolver(tls *libc.TLS, pWInfo uintptr, nRowEst TLogEst) (r int32)
iLoop++
}
if nFrom == 0 {
- _sqlite3ErrorMsg(tls, pParse, __ccgo_ts+22722, 0)
+ _sqlite3ErrorMsg(tls, pParse, __ccgo_ts+22794, 0)
_sqlite3DbFreeNN(tls, (*TParse)(unsafe.Pointer(pParse)).Fdb, pSpace)
return int32(SQLITE_ERROR)
}
@@ -145718,7 +146054,7 @@ func _whereAddIndexedExpr(tls *libc.TLS, pParse uintptr, pIdx uintptr, iIdxCur i
}
(*TParse)(unsafe.Pointer(pParse)).FpIdxEpr = p
if (*TIndexedExpr)(unsafe.Pointer(p)).FpIENext == uintptr(0) {
- pArg = pParse + 76
+ pArg = pParse + 80
_sqlite3ParserAddCleanup(tls, pParse, __ccgo_fp(_whereIndexedExprCleanup), pArg)
}
goto _1
@@ -145874,7 +146210,7 @@ func _sqlite3WhereBegin(tls *libc.TLS, pParse uintptr, pTabList uintptr, pWhere
** bits in a Bitmask
*/
if (*TSrcList)(unsafe.Pointer(pTabList)).FnSrc > libc.Int32FromUint32(libc.Uint32FromInt64(8)*libc.Uint32FromInt32(8)) {
- _sqlite3ErrorMsg(tls, pParse, __ccgo_ts+22740, libc.VaList(bp+40, libc.Int32FromUint32(libc.Uint32FromInt64(8)*libc.Uint32FromInt32(8))))
+ _sqlite3ErrorMsg(tls, pParse, __ccgo_ts+22812, libc.VaList(bp+40, libc.Int32FromUint32(libc.Uint32FromInt64(8)*libc.Uint32FromInt32(8))))
return uintptr(0)
}
/* This function normally generates a nested loop for all tables in
@@ -145895,10 +146231,7 @@ func _sqlite3WhereBegin(tls *libc.TLS, pParse uintptr, pTabList uintptr, pWhere
** field (type Bitmask) it must be aligned on an 8-byte boundary on
** some architectures. Hence the ROUND8() below.
*/
- nByteWInfo = libc.Int32FromUint32((libc.Uint32FromInt64(836) + libc.Uint32FromInt32(7)) & libc.Uint32FromInt32(^libc.Int32FromInt32(7)))
- if nTabList > int32(1) {
- nByteWInfo = libc.Int32FromUint32((libc.Uint32FromInt32(nByteWInfo) + libc.Uint32FromInt32(nTabList-libc.Int32FromInt32(1))*libc.Uint32FromInt64(84) + libc.Uint32FromInt32(7)) & libc.Uint32FromInt32(^libc.Int32FromInt32(7)))
- }
+ nByteWInfo = libc.Int32FromUint32((uint32(libc.UintptrFromInt32(0)+752) + libc.Uint32FromInt32(nTabList)*libc.Uint32FromInt64(84) + libc.Uint32FromInt32(7)) & libc.Uint32FromInt32(^libc.Int32FromInt32(7)))
pWInfo = _sqlite3DbMallocRawNN(tls, db, uint64(libc.Uint32FromInt32(nByteWInfo)+uint32(72)))
if (*Tsqlite3)(unsafe.Pointer(db)).FmallocFailed != 0 {
_sqlite3DbFree(tls, db, pWInfo)
@@ -145947,7 +146280,7 @@ func _sqlite3WhereBegin(tls *libc.TLS, pParse uintptr, pTabList uintptr, pWhere
(*TWhereInfo)(unsafe.Pointer(pWInfo)).FeDistinct = uint8(WHERE_DISTINCT_UNIQUE)
}
if (*TWhereInfo)(unsafe.Pointer(pWInfo)).FpSelect != 0 && (*TSelect)(unsafe.Pointer((*TWhereInfo)(unsafe.Pointer(pWInfo)).FpSelect)).FselFlags&uint32(SF_MultiValue) == uint32(0) {
- _sqlite3VdbeExplain(tls, pParse, uint8(0), __ccgo_ts+22768, 0)
+ _sqlite3VdbeExplain(tls, pParse, uint8(0), __ccgo_ts+22840, 0)
}
} else {
/* Assign a bit from the bitmask to every term in the FROM clause.
@@ -146092,7 +146425,8 @@ func _sqlite3WhereBegin(tls *libc.TLS, pParse uintptr, pTabList uintptr, pWhere
}
}
/* TUNING: Assume that a DISTINCT clause on a subquery reduces
- ** the output size by a factor of 8 (LogEst -30).
+ ** the output size by a factor of 8 (LogEst -30). Search for
+ ** tag-20250414a to see other cases.
*/
if libc.Int32FromUint16((*TWhereInfo)(unsafe.Pointer(pWInfo)).FwctrlFlags)&int32(WHERE_WANT_DISTINCT) != 0 {
p11 = pWInfo + 50
@@ -146126,7 +146460,7 @@ func _sqlite3WhereBegin(tls *libc.TLS, pParse uintptr, pTabList uintptr, pWhere
if libc.Int32FromUint8((*TWhereInfo)(unsafe.Pointer(pWInfo)).FnLevel) >= int32(2) && (*Tsqlite3)(unsafe.Pointer(db)).FdbOptFlags&libc.Uint32FromInt32(libc.Int32FromInt32(SQLITE_BloomFilter)) == uint32(0) {
_whereCheckIfBloomFilterIsUseful(tls, pWInfo)
}
- p12 = (*TWhereInfo)(unsafe.Pointer(pWInfo)).FpParse + 160
+ p12 = (*TWhereInfo)(unsafe.Pointer(pWInfo)).FpParse + 16
*(*TLogEst)(unsafe.Pointer(p12)) = TLogEst(int32(*(*TLogEst)(unsafe.Pointer(p12))) + int32((*TWhereInfo)(unsafe.Pointer(pWInfo)).FnRowOut))
/* If the caller is an UPDATE or DELETE statement that is requesting
** to use a one-pass algorithm, determine if this is appropriate.
@@ -146252,11 +146586,11 @@ func _sqlite3WhereBegin(tls *libc.TLS, pParse uintptr, pTabList uintptr, pWhere
iIndexCur = iAuxArg
op1 = int32(OP_ReopenIdx)
} else {
- v17 = pParse + 44
+ v17 = pParse + 48
v16 = *(*int32)(unsafe.Pointer(v17))
*(*int32)(unsafe.Pointer(v17))++
iIndexCur = v16
- if int32(uint32(*(*uint16)(unsafe.Pointer(pIx + 56))&0x2000>>13)) != 0 && (*Tsqlite3)(unsafe.Pointer(db)).FdbOptFlags&libc.Uint32FromInt32(libc.Int32FromInt32(SQLITE_IndexedExpr)) == uint32(0) {
+ if int32(uint32(*(*uint16)(unsafe.Pointer(pIx + 56))&0x1000>>12)) != 0 && (*Tsqlite3)(unsafe.Pointer(db)).FdbOptFlags&libc.Uint32FromInt32(libc.Int32FromInt32(SQLITE_IndexedExpr)) == uint32(0) {
_whereAddIndexedExpr(tls, pParse, pIx, iIndexCur, pTabItem)
}
if (*TIndex)(unsafe.Pointer(pIx)).FpPartIdxWhere != 0 && libc.Int32FromUint8((*TSrcItem)(unsafe.Pointer(pTabItem)).Ffg.Fjointype)&int32(JT_RIGHT) == 0 {
@@ -146283,16 +146617,16 @@ func _sqlite3WhereBegin(tls *libc.TLS, pParse uintptr, pTabList uintptr, pWhere
}
if v19 && v18 != uintptr(0) {
pRJ = (*TWhereLevel)(unsafe.Pointer(pLevel)).FpRJ
- v21 = pParse + 44
+ v21 = pParse + 48
v20 = *(*int32)(unsafe.Pointer(v21))
*(*int32)(unsafe.Pointer(v21))++
(*TWhereRightJoin)(unsafe.Pointer(pRJ)).FiMatch = v20
- v23 = pParse + 48
+ v23 = pParse + 52
*(*int32)(unsafe.Pointer(v23))++
v22 = *(*int32)(unsafe.Pointer(v23))
(*TWhereRightJoin)(unsafe.Pointer(pRJ)).FregBloom = v22
_sqlite3VdbeAddOp2(tls, v, int32(OP_Blob), int32(65536), (*TWhereRightJoin)(unsafe.Pointer(pRJ)).FregBloom)
- v25 = pParse + 48
+ v25 = pParse + 52
*(*int32)(unsafe.Pointer(v25))++
v24 = *(*int32)(unsafe.Pointer(v25))
(*TWhereRightJoin)(unsafe.Pointer(pRJ)).FregReturn = v24
@@ -146471,7 +146805,7 @@ func _sqlite3WhereEnd(tls *libc.TLS, pWInfo uintptr) {
;
j++
}
- *(*int32)(unsafe.Pointer(pParse + 48)) += n + int32(1)
+ *(*int32)(unsafe.Pointer(pParse + 52)) += n + int32(1)
if libc.Int32FromUint8((*TWhereLevel)(unsafe.Pointer(pLevel)).Fop) == int32(OP_Prev) {
v7 = int32(OP_SeekLT)
} else {
@@ -146649,7 +146983,7 @@ func _sqlite3WhereEnd(tls *libc.TLS, pWInfo uintptr) {
} else {
last = (*TWhereInfo)(unsafe.Pointer(pWInfo)).FiEndWhere
}
- if int32(uint32(*(*uint16)(unsafe.Pointer(pIdx1 + 56))&0x2000>>13)) != 0 {
+ if int32(uint32(*(*uint16)(unsafe.Pointer(pIdx1 + 56))&0x1000>>12)) != 0 {
p = (*TParse)(unsafe.Pointer(pParse)).FpIdxEpr
for p != 0 {
if (*TIndexedExpr)(unsafe.Pointer(p)).FiIdxCur == (*TWhereLevel)(unsafe.Pointer(pLevel)).FiIdxCur {
@@ -146678,7 +147012,7 @@ func _sqlite3WhereEnd(tls *libc.TLS, pWInfo uintptr) {
x = int32(_sqlite3StorageColumnToTable(tls, pTab, int16(x)))
}
}
- x = int32(_sqlite3TableColumnToIndex(tls, pIdx1, int16(x)))
+ x = _sqlite3TableColumnToIndex(tls, pIdx1, x)
if x >= 0 {
(*TVdbeOp)(unsafe.Pointer(pOp)).Fp2 = x
(*TVdbeOp)(unsafe.Pointer(pOp)).Fp1 = (*TWhereLevel)(unsafe.Pointer(pLevel)).FiIdxCur
@@ -146688,7 +147022,7 @@ func _sqlite3WhereEnd(tls *libc.TLS, pWInfo uintptr) {
/* An error. pLoop is supposed to be a covering index loop,
** and yet the VM code refers to a column of the table that
** is not part of the index. */
- _sqlite3ErrorMsg(tls, pParse, __ccgo_ts+22786, 0)
+ _sqlite3ErrorMsg(tls, pParse, __ccgo_ts+22858, 0)
(*TParse)(unsafe.Pointer(pParse)).Frc = int32(SQLITE_INTERNAL)
} else {
/* The WHERE_EXPRIDX flag is set by the planner when it is likely
@@ -146738,7 +147072,7 @@ func _sqlite3WhereEnd(tls *libc.TLS, pWInfo uintptr) {
*/
(*TParse)(unsafe.Pointer(pParse)).FnQueryLoop = int16((*TWhereInfo)(unsafe.Pointer(pWInfo)).FsavedNQueryLoop)
_whereInfoFree(tls, db, pWInfo)
- p12 = pParse + 26
+ p12 = pParse + 25
*(*Tu8)(unsafe.Pointer(p12)) = Tu8(int32(*(*Tu8)(unsafe.Pointer(p12))) - nRJ)
return
}
@@ -147007,7 +147341,7 @@ func _nth_valueStepFunc(tls *libc.TLS, pCtx uintptr, nArg int32, apArg uintptr)
goto error_out
error_out:
;
- Xsqlite3_result_error(tls, pCtx, __ccgo_ts+22815, -int32(1))
+ Xsqlite3_result_error(tls, pCtx, __ccgo_ts+22887, -int32(1))
}
func _nth_valueFinalizeFunc(tls *libc.TLS, pCtx uintptr) {
@@ -147189,7 +147523,7 @@ func _ntileStepFunc(tls *libc.TLS, pCtx uintptr, nArg int32, apArg uintptr) {
if (*TNtileCtx)(unsafe.Pointer(p)).FnTotal == 0 {
(*TNtileCtx)(unsafe.Pointer(p)).FnParam = Xsqlite3_value_int64(tls, *(*uintptr)(unsafe.Pointer(apArg)))
if (*TNtileCtx)(unsafe.Pointer(p)).FnParam <= 0 {
- Xsqlite3_result_error(tls, pCtx, __ccgo_ts+22871, -int32(1))
+ Xsqlite3_result_error(tls, pCtx, __ccgo_ts+22943, -int32(1))
}
}
(*TNtileCtx)(unsafe.Pointer(p)).FnTotal++
@@ -147515,7 +147849,7 @@ func _windowFind(tls *libc.TLS, pParse uintptr, pList uintptr, zName uintptr) (r
p = (*TWindow)(unsafe.Pointer(p)).FpNextWin
}
if p == uintptr(0) {
- _sqlite3ErrorMsg(tls, pParse, __ccgo_ts+22916, libc.VaList(bp+8, zName))
+ _sqlite3ErrorMsg(tls, pParse, __ccgo_ts+22988, libc.VaList(bp+8, zName))
}
return p
}
@@ -147566,12 +147900,12 @@ func _sqlite3WindowUpdate(tls *libc.TLS, pParse uintptr, pList uintptr, pWin uin
_sqlite3WindowChain(tls, pParse, pWin, pList)
}
if libc.Int32FromUint8((*TWindow)(unsafe.Pointer(pWin)).FeFrmType) == int32(TK_RANGE) && ((*TWindow)(unsafe.Pointer(pWin)).FpStart != 0 || (*TWindow)(unsafe.Pointer(pWin)).FpEnd != 0) && ((*TWindow)(unsafe.Pointer(pWin)).FpOrderBy == uintptr(0) || (*TExprList)(unsafe.Pointer((*TWindow)(unsafe.Pointer(pWin)).FpOrderBy)).FnExpr != int32(1)) {
- _sqlite3ErrorMsg(tls, pParse, __ccgo_ts+22935, 0)
+ _sqlite3ErrorMsg(tls, pParse, __ccgo_ts+23007, 0)
} else {
if (*TFuncDef)(unsafe.Pointer(pFunc)).FfuncFlags&uint32(SQLITE_FUNC_WINDOW) != 0 {
db = (*TParse)(unsafe.Pointer(pParse)).Fdb
if (*TWindow)(unsafe.Pointer(pWin)).FpFilter != 0 {
- _sqlite3ErrorMsg(tls, pParse, __ccgo_ts+23006, 0)
+ _sqlite3ErrorMsg(tls, pParse, __ccgo_ts+23078, 0)
} else {
aUp = [8]struct {
FzFunc uintptr
@@ -147644,7 +147978,7 @@ func _sqlite3WindowUpdate(tls *libc.TLS, pParse uintptr, pList uintptr, pWin uin
(*TWindow)(unsafe.Pointer(pWin)).FeEnd = libc.Uint8FromInt32(aUp[i].FeEnd)
(*TWindow)(unsafe.Pointer(pWin)).FeExclude = uint8(0)
if libc.Int32FromUint8((*TWindow)(unsafe.Pointer(pWin)).FeStart) == int32(TK_FOLLOWING) {
- (*TWindow)(unsafe.Pointer(pWin)).FpStart = _sqlite3Expr(tls, db, int32(TK_INTEGER), __ccgo_ts+8321)
+ (*TWindow)(unsafe.Pointer(pWin)).FpStart = _sqlite3Expr(tls, db, int32(TK_INTEGER), __ccgo_ts+8346)
}
break
}
@@ -147782,7 +148116,7 @@ func _selectWindowRewriteExprCb(tls *libc.TLS, pWalker uintptr, pExpr uintptr) (
f = libc.Int32FromUint32((*TExpr)(unsafe.Pointer(pExpr)).Fflags & uint32(EP_Collate))
*(*Tu32)(unsafe.Pointer(pExpr + 4)) |= libc.Uint32FromInt32(libc.Int32FromInt32(EP_Static))
_sqlite3ExprDelete(tls, (*TParse)(unsafe.Pointer(pParse)).Fdb, pExpr)
- *(*Tu32)(unsafe.Pointer(pExpr + 4)) &= libc.Uint32FromInt32(^libc.Int32FromInt32(EP_Static))
+ *(*Tu32)(unsafe.Pointer(pExpr + 4)) &= ^libc.Uint32FromInt32(libc.Int32FromInt32(EP_Static))
libc.Xmemset(tls, pExpr, 0, uint32(52))
(*TExpr)(unsafe.Pointer(pExpr)).Fop = uint8(TK_COLUMN)
if iCol < 0 {
@@ -147926,7 +148260,7 @@ func _disallowAggregatesInOrderByCb(tls *libc.TLS, pWalker uintptr, pExpr uintpt
bp := tls.Alloc(16)
defer tls.Free(16)
if libc.Int32FromUint8((*TExpr)(unsafe.Pointer(pExpr)).Fop) == int32(TK_AGG_FUNCTION) && (*TExpr)(unsafe.Pointer(pExpr)).FpAggInfo == uintptr(0) {
- _sqlite3ErrorMsg(tls, (*TWalker)(unsafe.Pointer(pWalker)).FpParse, __ccgo_ts+23069, libc.VaList(bp+8, *(*uintptr)(unsafe.Pointer(pExpr + 8))))
+ _sqlite3ErrorMsg(tls, (*TWalker)(unsafe.Pointer(pWalker)).FpParse, __ccgo_ts+23141, libc.VaList(bp+8, *(*uintptr)(unsafe.Pointer(pExpr + 8))))
}
return WRC_Continue
}
@@ -147962,7 +148296,7 @@ func _sqlite3WindowRewrite(tls *libc.TLS, pParse uintptr, p uintptr) (r int32) {
*(*uintptr)(unsafe.Pointer(bp)) = uintptr(0) /* Expression list for sub-query */
pMWin = (*TSelect)(unsafe.Pointer(p)).FpWin
selFlags = (*TSelect)(unsafe.Pointer(p)).FselFlags
- pTab = _sqlite3DbMallocZero(tls, db, uint64(64))
+ pTab = _sqlite3DbMallocZero(tls, db, uint64(80))
if pTab == uintptr(0) {
return _sqlite3ErrorToParser(tls, db, int32(SQLITE_NOMEM))
}
@@ -147977,7 +148311,7 @@ func _sqlite3WindowRewrite(tls *libc.TLS, pParse uintptr, p uintptr) (r int32) {
(*TSelect)(unsafe.Pointer(p)).FpWhere = uintptr(0)
(*TSelect)(unsafe.Pointer(p)).FpGroupBy = uintptr(0)
(*TSelect)(unsafe.Pointer(p)).FpHaving = uintptr(0)
- *(*Tu32)(unsafe.Pointer(p + 4)) &= libc.Uint32FromInt32(^libc.Int32FromInt32(SF_Aggregate))
+ *(*Tu32)(unsafe.Pointer(p + 4)) &= ^libc.Uint32FromInt32(SF_Aggregate)
*(*Tu32)(unsafe.Pointer(p + 4)) |= uint32(SF_WinRewrite)
/* Create the ORDER BY clause for the sub-select. This is the concatenation
** of the window PARTITION and ORDER BY clauses. Then, if this makes it
@@ -147996,11 +148330,11 @@ func _sqlite3WindowRewrite(tls *libc.TLS, pParse uintptr, p uintptr) (r int32) {
/* Assign a cursor number for the ephemeral table used to buffer rows.
** The OpenEphemeral instruction is coded later, after it is known how
** many columns the table will have. */
- v2 = pParse + 44
+ v2 = pParse + 48
v1 = *(*int32)(unsafe.Pointer(v2))
*(*int32)(unsafe.Pointer(v2))++
(*TWindow)(unsafe.Pointer(pMWin)).FiEphCsr = v1
- *(*int32)(unsafe.Pointer(pParse + 44)) += int32(3)
+ *(*int32)(unsafe.Pointer(pParse + 48)) += int32(3)
_selectWindowRewriteEList(tls, pParse, pMWin, pSrc, (*TSelect)(unsafe.Pointer(p)).FpEList, pTab, bp)
_selectWindowRewriteEList(tls, pParse, pMWin, pSrc, (*TSelect)(unsafe.Pointer(p)).FpOrderBy, pTab, bp)
if *(*uintptr)(unsafe.Pointer(bp)) != 0 {
@@ -148046,11 +148380,11 @@ func _sqlite3WindowRewrite(tls *libc.TLS, pParse uintptr, p uintptr) (r int32) {
pFilter = _sqlite3ExprDup(tls, db, (*TWindow)(unsafe.Pointer(pWin)).FpFilter, 0)
*(*uintptr)(unsafe.Pointer(bp)) = _sqlite3ExprListAppend(tls, pParse, *(*uintptr)(unsafe.Pointer(bp)), pFilter)
}
- v8 = pParse + 48
+ v8 = pParse + 52
*(*int32)(unsafe.Pointer(v8))++
v7 = *(*int32)(unsafe.Pointer(v8))
(*TWindow)(unsafe.Pointer(pWin)).FregAccum = v7
- v10 = pParse + 48
+ v10 = pParse + 52
*(*int32)(unsafe.Pointer(v10))++
v9 = *(*int32)(unsafe.Pointer(v10))
(*TWindow)(unsafe.Pointer(pWin)).FregResult = v9
@@ -148067,7 +148401,7 @@ func _sqlite3WindowRewrite(tls *libc.TLS, pParse uintptr, p uintptr) (r int32) {
** keep everything legal in this case.
*/
if *(*uintptr)(unsafe.Pointer(bp)) == uintptr(0) {
- *(*uintptr)(unsafe.Pointer(bp)) = _sqlite3ExprListAppend(tls, pParse, uintptr(0), _sqlite3Expr(tls, db, int32(TK_INTEGER), __ccgo_ts+1787))
+ *(*uintptr)(unsafe.Pointer(bp)) = _sqlite3ExprListAppend(tls, pParse, uintptr(0), _sqlite3Expr(tls, db, int32(TK_INTEGER), __ccgo_ts+1813))
}
pSub = _sqlite3SelectNew(tls, pParse, *(*uintptr)(unsafe.Pointer(bp)), pSrc, pWhere, pGroupBy, pHaving, pSort, uint32(0), uintptr(0))
(*TSelect)(unsafe.Pointer(p)).FpSrc = _sqlite3SrcListAppend(tls, pParse, uintptr(0), uintptr(0), uintptr(0))
@@ -148089,7 +148423,7 @@ func _sqlite3WindowRewrite(tls *libc.TLS, pParse uintptr, p uintptr) (r int32) {
** the correct error message regardless. */
rc = int32(SQLITE_NOMEM)
} else {
- libc.Xmemcpy(tls, pTab, pTab2, uint32(64))
+ libc.Xmemcpy(tls, pTab, pTab2, uint32(80))
*(*Tu32)(unsafe.Pointer(pTab + 28)) |= uint32(TF_Ephemeral)
(*(*TSrcItem)(unsafe.Pointer((*TSelect)(unsafe.Pointer(p)).FpSrc + 8))).FpSTab = pTab
pTab = pTab2
@@ -148213,7 +148547,7 @@ func _sqlite3WindowAlloc(tls *libc.TLS, pParse uintptr, eType int32, eStart int3
** frame boundary.
*/
if eStart == int32(TK_CURRENT) && eEnd == int32(TK_PRECEDING) || eStart == int32(TK_FOLLOWING) && (eEnd == int32(TK_PRECEDING) || eEnd == int32(TK_CURRENT)) {
- _sqlite3ErrorMsg(tls, pParse, __ccgo_ts+23095, 0)
+ _sqlite3ErrorMsg(tls, pParse, __ccgo_ts+23167, 0)
goto windowAllocErr
}
pWin = _sqlite3DbMallocZero(tls, (*TParse)(unsafe.Pointer(pParse)).Fdb, uint64(100))
@@ -148281,18 +148615,18 @@ func _sqlite3WindowChain(tls *libc.TLS, pParse uintptr, pWin uintptr, pList uint
zErr = uintptr(0)
/* Check for errors */
if (*TWindow)(unsafe.Pointer(pWin)).FpPartition != 0 {
- zErr = __ccgo_ts + 23127
+ zErr = __ccgo_ts + 23199
} else {
if (*TWindow)(unsafe.Pointer(pExist)).FpOrderBy != 0 && (*TWindow)(unsafe.Pointer(pWin)).FpOrderBy != 0 {
- zErr = __ccgo_ts + 23144
+ zErr = __ccgo_ts + 23216
} else {
if libc.Int32FromUint8((*TWindow)(unsafe.Pointer(pExist)).FbImplicitFrame) == 0 {
- zErr = __ccgo_ts + 23160
+ zErr = __ccgo_ts + 23232
}
}
}
if zErr != 0 {
- _sqlite3ErrorMsg(tls, pParse, __ccgo_ts+23180, libc.VaList(bp+8, zErr, (*TWindow)(unsafe.Pointer(pWin)).FzBase))
+ _sqlite3ErrorMsg(tls, pParse, __ccgo_ts+23252, libc.VaList(bp+8, zErr, (*TWindow)(unsafe.Pointer(pWin)).FzBase))
} else {
(*TWindow)(unsafe.Pointer(pWin)).FpPartition = _sqlite3ExprListDup(tls, db, (*TWindow)(unsafe.Pointer(pExist)).FpPartition, 0)
if (*TWindow)(unsafe.Pointer(pExist)).FpOrderBy != 0 {
@@ -148316,7 +148650,7 @@ func _sqlite3WindowAttach(tls *libc.TLS, pParse uintptr, p uintptr, pWin uintptr
*(*Tu32)(unsafe.Pointer(p + 4)) |= libc.Uint32FromInt32(libc.Int32FromInt32(EP_WinFunc) | libc.Int32FromInt32(EP_FullSize))
(*TWindow)(unsafe.Pointer(pWin)).FpOwner = p
if (*TExpr)(unsafe.Pointer(p)).Fflags&uint32(EP_Distinct) != 0 && libc.Int32FromUint8((*TWindow)(unsafe.Pointer(pWin)).FeFrmType) != int32(TK_FILTER) {
- _sqlite3ErrorMsg(tls, pParse, __ccgo_ts+23213, 0)
+ _sqlite3ErrorMsg(tls, pParse, __ccgo_ts+23285, 0)
}
} else {
_sqlite3WindowDelete(tls, (*TParse)(unsafe.Pointer(pParse)).Fdb, pWin)
@@ -148422,24 +148756,24 @@ func _sqlite3WindowCodeInit(tls *libc.TLS, pParse uintptr, pSelect uintptr) {
if (*TWindow)(unsafe.Pointer(pMWin)).FpPartition != 0 {
nExpr = (*TExprList)(unsafe.Pointer((*TWindow)(unsafe.Pointer(pMWin)).FpPartition)).FnExpr
(*TWindow)(unsafe.Pointer(pMWin)).FregPart = (*TParse)(unsafe.Pointer(pParse)).FnMem + int32(1)
- *(*int32)(unsafe.Pointer(pParse + 48)) += nExpr
+ *(*int32)(unsafe.Pointer(pParse + 52)) += nExpr
_sqlite3VdbeAddOp3(tls, v, int32(OP_Null), 0, (*TWindow)(unsafe.Pointer(pMWin)).FregPart, (*TWindow)(unsafe.Pointer(pMWin)).FregPart+nExpr-int32(1))
}
- v2 = pParse + 48
+ v2 = pParse + 52
*(*int32)(unsafe.Pointer(v2))++
v1 = *(*int32)(unsafe.Pointer(v2))
(*TWindow)(unsafe.Pointer(pMWin)).FregOne = v1
_sqlite3VdbeAddOp2(tls, v, int32(OP_Integer), int32(1), (*TWindow)(unsafe.Pointer(pMWin)).FregOne)
if (*TWindow)(unsafe.Pointer(pMWin)).FeExclude != 0 {
- v4 = pParse + 48
+ v4 = pParse + 52
*(*int32)(unsafe.Pointer(v4))++
v3 = *(*int32)(unsafe.Pointer(v4))
(*TWindow)(unsafe.Pointer(pMWin)).FregStartRowid = v3
- v6 = pParse + 48
+ v6 = pParse + 52
*(*int32)(unsafe.Pointer(v6))++
v5 = *(*int32)(unsafe.Pointer(v6))
(*TWindow)(unsafe.Pointer(pMWin)).FregEndRowid = v5
- v8 = pParse + 44
+ v8 = pParse + 48
v7 = *(*int32)(unsafe.Pointer(v8))
*(*int32)(unsafe.Pointer(v8))++
(*TWindow)(unsafe.Pointer(pMWin)).FcsrApp = v7
@@ -148457,12 +148791,12 @@ func _sqlite3WindowCodeInit(tls *libc.TLS, pParse uintptr, pSelect uintptr) {
if (*TFuncDef)(unsafe.Pointer(p)).FfuncFlags&uint32(SQLITE_FUNC_MINMAX) != 0 && libc.Int32FromUint8((*TWindow)(unsafe.Pointer(pWin)).FeStart) != int32(TK_UNBOUNDED) {
pList = *(*uintptr)(unsafe.Pointer((*TWindow)(unsafe.Pointer(pWin)).FpOwner + 20))
pKeyInfo = _sqlite3KeyInfoFromExprList(tls, pParse, pList, 0, 0)
- v11 = pParse + 44
+ v11 = pParse + 48
v10 = *(*int32)(unsafe.Pointer(v11))
*(*int32)(unsafe.Pointer(v11))++
(*TWindow)(unsafe.Pointer(pWin)).FcsrApp = v10
(*TWindow)(unsafe.Pointer(pWin)).FregApp = (*TParse)(unsafe.Pointer(pParse)).FnMem + int32(1)
- *(*int32)(unsafe.Pointer(pParse + 48)) += int32(3)
+ *(*int32)(unsafe.Pointer(pParse + 52)) += int32(3)
if pKeyInfo != 0 && int32(*(*int8)(unsafe.Pointer((*TFuncDef)(unsafe.Pointer((*TWindow)(unsafe.Pointer(pWin)).FpWFunc)).FzName + 1))) == int32('i') {
*(*Tu8)(unsafe.Pointer((*TKeyInfo)(unsafe.Pointer(pKeyInfo)).FaSortFlags)) = uint8(KEYINFO_ORDER_DESC)
}
@@ -148474,15 +148808,15 @@ func _sqlite3WindowCodeInit(tls *libc.TLS, pParse uintptr, pSelect uintptr) {
/* Allocate two registers at pWin->regApp. These will be used to
** store the start and end index of the current frame. */
(*TWindow)(unsafe.Pointer(pWin)).FregApp = (*TParse)(unsafe.Pointer(pParse)).FnMem + int32(1)
- v13 = pParse + 44
+ v13 = pParse + 48
v12 = *(*int32)(unsafe.Pointer(v13))
*(*int32)(unsafe.Pointer(v13))++
(*TWindow)(unsafe.Pointer(pWin)).FcsrApp = v12
- *(*int32)(unsafe.Pointer(pParse + 48)) += int32(2)
+ *(*int32)(unsafe.Pointer(pParse + 52)) += int32(2)
_sqlite3VdbeAddOp2(tls, v, int32(OP_OpenDup), (*TWindow)(unsafe.Pointer(pWin)).FcsrApp, (*TWindow)(unsafe.Pointer(pMWin)).FiEphCsr)
} else {
if (*TFuncDef)(unsafe.Pointer(p)).FzName == uintptr(unsafe.Pointer(&_leadName)) || (*TFuncDef)(unsafe.Pointer(p)).FzName == uintptr(unsafe.Pointer(&_lagName)) {
- v15 = pParse + 44
+ v15 = pParse + 48
v14 = *(*int32)(unsafe.Pointer(v15))
*(*int32)(unsafe.Pointer(v15))++
(*TWindow)(unsafe.Pointer(pWin)).FcsrApp = v14
@@ -148534,11 +148868,11 @@ func _windowCheckValue(tls *libc.TLS, pParse uintptr, reg int32, eCond int32) {
}
var _azErr = [5]uintptr{
- 0: __ccgo_ts + 23260,
- 1: __ccgo_ts + 23313,
- 2: __ccgo_ts + 22815,
- 3: __ccgo_ts + 23364,
- 4: __ccgo_ts + 23416,
+ 0: __ccgo_ts + 23332,
+ 1: __ccgo_ts + 23385,
+ 2: __ccgo_ts + 22887,
+ 3: __ccgo_ts + 23436,
+ 4: __ccgo_ts + 23488,
}
var _aOp1 = [5]int32{
@@ -149118,7 +149452,7 @@ func _windowInitAccum(tls *libc.TLS, pParse uintptr, pMWin uintptr) (r int32) {
pWin = (*TWindow)(unsafe.Pointer(pWin)).FpNextWin
}
regArg = (*TParse)(unsafe.Pointer(pParse)).FnMem + int32(1)
- *(*int32)(unsafe.Pointer(pParse + 48)) += nArg
+ *(*int32)(unsafe.Pointer(pParse + 52)) += nArg
return regArg
}
@@ -149214,7 +149548,7 @@ func _windowCodeRangeTest(tls *libc.TLS, p uintptr, op int32, csr1 int32, regVal
pOrderBy = (*TWindow)(unsafe.Pointer((*TWindowCodeArg)(unsafe.Pointer(p)).FpMWin)).FpOrderBy /* ORDER BY clause for window */
reg1 = _sqlite3GetTempReg(tls, pParse) /* Reg. for csr1.peerVal+regVal */
reg2 = _sqlite3GetTempReg(tls, pParse)
- v2 = pParse + 48
+ v2 = pParse + 52
*(*int32)(unsafe.Pointer(v2))++
v1 = *(*int32)(unsafe.Pointer(v2)) /* Reg. for csr2.peerVal */
regString = v1 /* Reg. for constant value '' */
@@ -149931,12 +150265,12 @@ func _sqlite3WindowCodeStep(tls *libc.TLS, pParse uintptr, p uintptr, pWInfo uin
** same values in record form, and the rowid used to insert said record
** into the ephemeral table. */
regNew = (*TParse)(unsafe.Pointer(pParse)).FnMem + int32(1)
- *(*int32)(unsafe.Pointer(pParse + 48)) += nInput
- v2 = pParse + 48
+ *(*int32)(unsafe.Pointer(pParse + 52)) += nInput
+ v2 = pParse + 52
*(*int32)(unsafe.Pointer(v2))++
v1 = *(*int32)(unsafe.Pointer(v2))
regRecord = v1
- v4 = pParse + 48
+ v4 = pParse + 52
*(*int32)(unsafe.Pointer(v4))++
v3 = *(*int32)(unsafe.Pointer(v4))
(*(*TWindowCodeArg)(unsafe.Pointer(bp))).FregRowid = v3
@@ -149944,13 +150278,13 @@ func _sqlite3WindowCodeStep(tls *libc.TLS, pParse uintptr, p uintptr, pWInfo uin
** clause, allocate registers to store the results of evaluating each
** <expr>. */
if libc.Int32FromUint8((*TWindow)(unsafe.Pointer(pMWin)).FeStart) == int32(TK_PRECEDING) || libc.Int32FromUint8((*TWindow)(unsafe.Pointer(pMWin)).FeStart) == int32(TK_FOLLOWING) {
- v6 = pParse + 48
+ v6 = pParse + 52
*(*int32)(unsafe.Pointer(v6))++
v5 = *(*int32)(unsafe.Pointer(v6))
regStart = v5
}
if libc.Int32FromUint8((*TWindow)(unsafe.Pointer(pMWin)).FeEnd) == int32(TK_PRECEDING) || libc.Int32FromUint8((*TWindow)(unsafe.Pointer(pMWin)).FeEnd) == int32(TK_FOLLOWING) {
- v8 = pParse + 48
+ v8 = pParse + 52
*(*int32)(unsafe.Pointer(v8))++
v7 = *(*int32)(unsafe.Pointer(v8))
regEnd = v7
@@ -149970,13 +150304,13 @@ func _sqlite3WindowCodeStep(tls *libc.TLS, pParse uintptr, p uintptr, pWInfo uin
regNewPeer += (*TExprList)(unsafe.Pointer((*TWindow)(unsafe.Pointer(pMWin)).FpPartition)).FnExpr
}
regPeer = (*TParse)(unsafe.Pointer(pParse)).FnMem + int32(1)
- *(*int32)(unsafe.Pointer(pParse + 48)) += nPeer
+ *(*int32)(unsafe.Pointer(pParse + 52)) += nPeer
(*(*TWindowCodeArg)(unsafe.Pointer(bp))).Fstart.Freg = (*TParse)(unsafe.Pointer(pParse)).FnMem + int32(1)
- *(*int32)(unsafe.Pointer(pParse + 48)) += nPeer
+ *(*int32)(unsafe.Pointer(pParse + 52)) += nPeer
(*(*TWindowCodeArg)(unsafe.Pointer(bp))).Fcurrent.Freg = (*TParse)(unsafe.Pointer(pParse)).FnMem + int32(1)
- *(*int32)(unsafe.Pointer(pParse + 48)) += nPeer
+ *(*int32)(unsafe.Pointer(pParse + 52)) += nPeer
(*(*TWindowCodeArg)(unsafe.Pointer(bp))).Fend.Freg = (*TParse)(unsafe.Pointer(pParse)).FnMem + int32(1)
- *(*int32)(unsafe.Pointer(pParse + 48)) += nPeer
+ *(*int32)(unsafe.Pointer(pParse + 52)) += nPeer
}
/* Load the column values for the row returned by the sub-select
** into an array of registers starting at regNew. Assemble them into
@@ -150003,7 +150337,7 @@ func _sqlite3WindowCodeStep(tls *libc.TLS, pParse uintptr, p uintptr, pWInfo uin
nPart = (*TExprList)(unsafe.Pointer(pPart)).FnExpr
regNewPart = regNew + (*TWindow)(unsafe.Pointer(pMWin)).FnBufferCol
pKeyInfo = _sqlite3KeyInfoFromExprList(tls, pParse, pPart, 0, 0)
- v12 = pParse + 48
+ v12 = pParse + 52
*(*int32)(unsafe.Pointer(v12))++
v11 = *(*int32)(unsafe.Pointer(v12))
regFlushPart = v11
@@ -150223,6 +150557,10 @@ func _sqlite3WindowCodeStep(tls *libc.TLS, pParse uintptr, p uintptr, pWInfo uin
/* #include "sqliteInt.h" */
/*
+** Verify that the pParse->isCreate field is set
+ */
+
+/*
** Disable all error recovery processing in the parser push-down
** automaton.
*/
@@ -150282,7 +150620,7 @@ type FrameBound = TFrameBound
func _parserSyntaxError(tls *libc.TLS, pParse uintptr, p uintptr) {
bp := tls.Alloc(16)
defer tls.Free(16)
- _sqlite3ErrorMsg(tls, pParse, __ccgo_ts+23466, libc.VaList(bp+8, p))
+ _sqlite3ErrorMsg(tls, pParse, __ccgo_ts+23538, libc.VaList(bp+8, p))
}
// C documentation
@@ -150296,6 +150634,7 @@ func _disableLookaside(tls *libc.TLS, pParse uintptr) {
_ = db
db = (*TParse)(unsafe.Pointer(pParse)).Fdb
(*TParse)(unsafe.Pointer(pParse)).FdisableLookaside++
+ libc.Xmemset(tls, pParse+188, 0, uint32(20))
(*Tsqlite3)(unsafe.Pointer(db)).Flookaside.FbDisable++
(*Tsqlite3)(unsafe.Pointer(db)).Flookaside.Fsz = uint16(0)
}
@@ -150329,11 +150668,11 @@ func _parserDoubleLinkSelect(tls *libc.TLS, pParse uintptr, p uintptr) {
cnt++
if (*TSelect)(unsafe.Pointer(pLoop)).FpOrderBy != 0 || (*TSelect)(unsafe.Pointer(pLoop)).FpLimit != 0 {
if (*TSelect)(unsafe.Pointer(pLoop)).FpOrderBy != uintptr(0) {
- v1 = __ccgo_ts + 23490
+ v1 = __ccgo_ts + 23562
} else {
- v1 = __ccgo_ts + 23499
+ v1 = __ccgo_ts + 23571
}
- _sqlite3ErrorMsg(tls, pParse, __ccgo_ts+23505, libc.VaList(bp+8, v1, _sqlite3SelectOpName(tls, libc.Int32FromUint8((*TSelect)(unsafe.Pointer(pNext)).Fop))))
+ _sqlite3ErrorMsg(tls, pParse, __ccgo_ts+23577, libc.VaList(bp+8, v1, _sqlite3SelectOpName(tls, libc.Int32FromUint8((*TSelect)(unsafe.Pointer(pNext)).Fop))))
break
}
}
@@ -150342,7 +150681,7 @@ func _parserDoubleLinkSelect(tls *libc.TLS, pParse uintptr, p uintptr) {
mxSelect = v2
}
if v3 && v2 > 0 && cnt > mxSelect {
- _sqlite3ErrorMsg(tls, pParse, __ccgo_ts+23547, 0)
+ _sqlite3ErrorMsg(tls, pParse, __ccgo_ts+23619, 0)
}
}
}
@@ -150448,7 +150787,7 @@ func _parserAddExprIdListTerm(tls *libc.TLS, pParse uintptr, pPrior uintptr, pId
_ = p
p = _sqlite3ExprListAppend(tls, pParse, pPrior, uintptr(0))
if (hasCollate != 0 || sortOrder != -int32(1)) && libc.Int32FromUint8((*Tsqlite3)(unsafe.Pointer((*TParse)(unsafe.Pointer(pParse)).Fdb)).Finit1.Fbusy) == 0 {
- _sqlite3ErrorMsg(tls, pParse, __ccgo_ts+23581, libc.VaList(bp+8, (*TToken)(unsafe.Pointer(pIdToken)).Fn, (*TToken)(unsafe.Pointer(pIdToken)).Fz))
+ _sqlite3ErrorMsg(tls, pParse, __ccgo_ts+23653, libc.VaList(bp+8, (*TToken)(unsafe.Pointer(pIdToken)).Fn, (*TToken)(unsafe.Pointer(pIdToken)).Fz))
}
_sqlite3ExprListSetName(tls, pParse, p, pIdToken, int32(1))
return p
@@ -158905,20 +159244,20 @@ _30:
goto _346
_31:
; /* table_option ::= WITHOUT nm */
- if *(*uint32)(unsafe.Pointer(yymsp + 4 + 4)) == uint32(5) && Xsqlite3_strnicmp(tls, *(*uintptr)(unsafe.Pointer(yymsp + 4)), __ccgo_ts+16850, int32(5)) == 0 {
+ if *(*uint32)(unsafe.Pointer(yymsp + 4 + 4)) == uint32(5) && Xsqlite3_strnicmp(tls, *(*uintptr)(unsafe.Pointer(yymsp + 4)), __ccgo_ts+16922, int32(5)) == 0 {
*(*Tu32)(unsafe.Pointer(yymsp + uintptr(-libc.Int32FromInt32(1))*12 + 4)) = libc.Uint32FromInt32(libc.Int32FromInt32(TF_WithoutRowid) | libc.Int32FromInt32(TF_NoVisibleRowid))
} else {
*(*Tu32)(unsafe.Pointer(yymsp + uintptr(-libc.Int32FromInt32(1))*12 + 4)) = uint32(0)
- _sqlite3ErrorMsg(tls, pParse, __ccgo_ts+23619, libc.VaList(bp+80, *(*uint32)(unsafe.Pointer(yymsp + 4 + 4)), *(*uintptr)(unsafe.Pointer(yymsp + 4))))
+ _sqlite3ErrorMsg(tls, pParse, __ccgo_ts+23691, libc.VaList(bp+80, *(*uint32)(unsafe.Pointer(yymsp + 4 + 4)), *(*uintptr)(unsafe.Pointer(yymsp + 4))))
}
goto _346
_32:
; /* table_option ::= nm */
- if *(*uint32)(unsafe.Pointer(yymsp + 4 + 4)) == uint32(6) && Xsqlite3_strnicmp(tls, *(*uintptr)(unsafe.Pointer(yymsp + 4)), __ccgo_ts+16786, int32(6)) == 0 {
+ if *(*uint32)(unsafe.Pointer(yymsp + 4 + 4)) == uint32(6) && Xsqlite3_strnicmp(tls, *(*uintptr)(unsafe.Pointer(yymsp + 4)), __ccgo_ts+16858, int32(6)) == 0 {
*(*Tu32)(unsafe.Pointer(&*(*TYYMINORTYPE)(unsafe.Pointer(bp)))) = uint32(TF_Strict)
} else {
*(*Tu32)(unsafe.Pointer(&*(*TYYMINORTYPE)(unsafe.Pointer(bp)))) = uint32(0)
- _sqlite3ErrorMsg(tls, pParse, __ccgo_ts+23619, libc.VaList(bp+80, *(*uint32)(unsafe.Pointer(yymsp + 4 + 4)), *(*uintptr)(unsafe.Pointer(yymsp + 4))))
+ _sqlite3ErrorMsg(tls, pParse, __ccgo_ts+23691, libc.VaList(bp+80, *(*uint32)(unsafe.Pointer(yymsp + 4 + 4)), *(*uintptr)(unsafe.Pointer(yymsp + 4))))
}
*(*Tu32)(unsafe.Pointer(yymsp + 4)) = *(*Tu32)(unsafe.Pointer(&*(*TYYMINORTYPE)(unsafe.Pointer(bp))))
goto _346
@@ -158959,7 +159298,12 @@ _43:
; /* ccons ::= CONSTRAINT nm */
_42:
;
- (*TParse)(unsafe.Pointer(pParse)).FconstraintName = *(*TToken)(unsafe.Pointer(yymsp + 4))
+ (*(*struct {
+ FaddrCrTab int32
+ FregRowid int32
+ FregRoot int32
+ FconstraintName TToken
+ })(unsafe.Pointer(pParse + 188))).FconstraintName = *(*TToken)(unsafe.Pointer(yymsp + 4))
goto _346
_44:
; /* ccons ::= DEFAULT scantok term */
@@ -159104,7 +159448,12 @@ _79:
goto _346
_80:
; /* tconscomma ::= COMMA */
- (*TParse)(unsafe.Pointer(pParse)).FconstraintName.Fn = uint32(0)
+ (*(*struct {
+ FaddrCrTab int32
+ FregRowid int32
+ FregRoot int32
+ FconstraintName TToken
+ })(unsafe.Pointer(pParse + 188))).FconstraintName.Fn = uint32(0)
goto _346
_81:
; /* tcons ::= PRIMARY KEY LP sortlist autoinc RP onconf */
@@ -159194,9 +159543,9 @@ _98:
(*TSelect)(unsafe.Pointer(pRhs)).Fop = libc.Uint8FromInt32(*(*int32)(unsafe.Pointer(yymsp + uintptr(-libc.Int32FromInt32(1))*12 + 4)))
(*TSelect)(unsafe.Pointer(pRhs)).FpPrior = pLhs
if pLhs != 0 {
- *(*Tu32)(unsafe.Pointer(pLhs + 4)) &= libc.Uint32FromInt32(^libc.Int32FromInt32(SF_MultiValue))
+ *(*Tu32)(unsafe.Pointer(pLhs + 4)) &= ^libc.Uint32FromInt32(SF_MultiValue)
}
- *(*Tu32)(unsafe.Pointer(pRhs + 4)) &= libc.Uint32FromInt32(^libc.Int32FromInt32(SF_MultiValue))
+ *(*Tu32)(unsafe.Pointer(pRhs + 4)) &= ^libc.Uint32FromInt32(SF_MultiValue)
if *(*int32)(unsafe.Pointer(yymsp + uintptr(-libc.Int32FromInt32(1))*12 + 4)) != int32(TK_ALL) {
(*TParse)(unsafe.Pointer(pParse)).FhasCompound = uint8(1)
}
@@ -159551,7 +159900,7 @@ _176:
_177:
; /* cmd ::= with UPDATE orconf xfullname indexed_opt SET setlist from where_opt_ret */
_sqlite3SrcListIndexedBy(tls, pParse, *(*uintptr)(unsafe.Pointer(yymsp + uintptr(-libc.Int32FromInt32(5))*12 + 4)), yymsp+uintptr(-libc.Int32FromInt32(4))*12+4)
- _sqlite3ExprListCheckLength(tls, pParse, *(*uintptr)(unsafe.Pointer(yymsp + uintptr(-libc.Int32FromInt32(2))*12 + 4)), __ccgo_ts+23646)
+ _sqlite3ExprListCheckLength(tls, pParse, *(*uintptr)(unsafe.Pointer(yymsp + uintptr(-libc.Int32FromInt32(2))*12 + 4)), __ccgo_ts+23718)
if *(*uintptr)(unsafe.Pointer(yymsp + uintptr(-libc.Int32FromInt32(1))*12 + 4)) != 0 {
pFromClause = *(*uintptr)(unsafe.Pointer(yymsp + uintptr(-libc.Int32FromInt32(1))*12 + 4))
if (*TSrcList)(unsafe.Pointer(pFromClause)).FnSrc > int32(1) {
@@ -159901,9 +160250,9 @@ _237:
*/
_sqlite3ExprUnmapAndDelete(tls, pParse, *(*uintptr)(unsafe.Pointer(yymsp + uintptr(-libc.Int32FromInt32(4))*12 + 4)))
if *(*int32)(unsafe.Pointer(yymsp + uintptr(-libc.Int32FromInt32(3))*12 + 4)) != 0 {
- v347 = __ccgo_ts + 8077
+ v347 = __ccgo_ts + 8102
} else {
- v347 = __ccgo_ts + 8082
+ v347 = __ccgo_ts + 8107
}
*(*uintptr)(unsafe.Pointer(yymsp + uintptr(-libc.Int32FromInt32(4))*12 + 4)) = _sqlite3Expr(tls, (*TParse)(unsafe.Pointer(pParse)).Fdb, int32(TK_STRING), v347)
if *(*uintptr)(unsafe.Pointer(yymsp + uintptr(-libc.Int32FromInt32(4))*12 + 4)) != 0 {
@@ -160145,15 +160494,15 @@ _276:
_277:
; /* trnm ::= nm DOT nm */
*(*TToken)(unsafe.Pointer(yymsp + uintptr(-libc.Int32FromInt32(2))*12 + 4)) = *(*TToken)(unsafe.Pointer(yymsp + 4))
- _sqlite3ErrorMsg(tls, pParse, __ccgo_ts+23655, 0)
+ _sqlite3ErrorMsg(tls, pParse, __ccgo_ts+23727, 0)
goto _346
_278:
; /* tridxby ::= INDEXED BY nm */
- _sqlite3ErrorMsg(tls, pParse, __ccgo_ts+23750, 0)
+ _sqlite3ErrorMsg(tls, pParse, __ccgo_ts+23822, 0)
goto _346
_279:
; /* tridxby ::= NOT INDEXED */
- _sqlite3ErrorMsg(tls, pParse, __ccgo_ts+23834, 0)
+ _sqlite3ErrorMsg(tls, pParse, __ccgo_ts+23906, 0)
goto _346
_280:
; /* trigger_cmd ::= UPDATE orconf trnm tridxby SET setlist from where_opt scanpt */
@@ -160295,7 +160644,7 @@ _312:
goto _346
_313:
; /* withnm ::= nm */
- (*TParse)(unsafe.Pointer(pParse)).FbHasWith = uint8(1)
+ libc.SetBitFieldPtr8Uint32(pParse+32, libc.Uint32FromInt32(1), 1, 0x2)
goto _346
_314:
; /* wqlist ::= wqitem */
@@ -160489,7 +160838,7 @@ func _yy_syntax_error(tls *libc.TLS, yypParser uintptr, yymajor int32, _yyminor
if *(*int8)(unsafe.Pointer((*(*TToken)(unsafe.Pointer(bp))).Fz)) != 0 {
_parserSyntaxError(tls, pParse, bp)
} else {
- _sqlite3ErrorMsg(tls, pParse, __ccgo_ts+23919, 0)
+ _sqlite3ErrorMsg(tls, pParse, __ccgo_ts+23991, 0)
}
/************ End %syntax_error code ******************************************/
/* Suppress warning about unused %extra_argument variable */
@@ -163220,14 +163569,16 @@ func _sqlite3RunParser(tls *libc.TLS, pParse uintptr, zSql uintptr) (r int32) {
if *(*int32)(unsafe.Pointer(bp)) == int32(TK_FILTER) {
*(*int32)(unsafe.Pointer(bp)) = _analyzeFilterKeyword(tls, zSql+6, lastTokenParsed)
} else {
- if *(*int32)(unsafe.Pointer(bp)) == int32(TK_COMMENT) && (*Tsqlite3)(unsafe.Pointer(db)).Fflags&(libc.Uint64FromInt32(libc.Int32FromInt32(0x00040))<<libc.Int32FromInt32(32)) != uint64(0) {
+ if *(*int32)(unsafe.Pointer(bp)) == int32(TK_COMMENT) && ((*Tsqlite3)(unsafe.Pointer(db)).Finit1.Fbusy != 0 || (*Tsqlite3)(unsafe.Pointer(db)).Fflags&(libc.Uint64FromInt32(libc.Int32FromInt32(0x00040))<<libc.Int32FromInt32(32)) != uint64(0)) {
+ /* Ignore SQL comments if either (1) we are reparsing the schema or
+ ** (2) SQLITE_DBCONFIG_ENABLE_COMMENTS is turned on (the default). */
zSql += uintptr(n)
continue
} else {
if *(*int32)(unsafe.Pointer(bp)) != int32(TK_QNUMBER) {
(*(*TToken)(unsafe.Pointer(bp + 1224))).Fz = zSql
(*(*TToken)(unsafe.Pointer(bp + 1224))).Fn = libc.Uint32FromInt32(n)
- _sqlite3ErrorMsg(tls, pParse, __ccgo_ts+23936, libc.VaList(bp+1240, bp+1224))
+ _sqlite3ErrorMsg(tls, pParse, __ccgo_ts+24008, libc.VaList(bp+1240, bp+1224))
break
}
}
@@ -163251,10 +163602,10 @@ func _sqlite3RunParser(tls *libc.TLS, pParse uintptr, zSql uintptr) (r int32) {
}
if (*TParse)(unsafe.Pointer(pParse)).FzErrMsg != 0 || (*TParse)(unsafe.Pointer(pParse)).Frc != SQLITE_OK && (*TParse)(unsafe.Pointer(pParse)).Frc != int32(SQLITE_DONE) {
if (*TParse)(unsafe.Pointer(pParse)).FzErrMsg == uintptr(0) {
- (*TParse)(unsafe.Pointer(pParse)).FzErrMsg = _sqlite3MPrintf(tls, db, __ccgo_ts+3864, libc.VaList(bp+1240, _sqlite3ErrStr(tls, (*TParse)(unsafe.Pointer(pParse)).Frc)))
+ (*TParse)(unsafe.Pointer(pParse)).FzErrMsg = _sqlite3MPrintf(tls, db, __ccgo_ts+3890, libc.VaList(bp+1240, _sqlite3ErrStr(tls, (*TParse)(unsafe.Pointer(pParse)).Frc)))
}
if libc.Int32FromUint8((*TParse)(unsafe.Pointer(pParse)).FprepFlags)&int32(SQLITE_PREPARE_DONT_LOG) == 0 {
- Xsqlite3_log(tls, (*TParse)(unsafe.Pointer(pParse)).Frc, __ccgo_ts+23961, libc.VaList(bp+1240, (*TParse)(unsafe.Pointer(pParse)).FzErrMsg, (*TParse)(unsafe.Pointer(pParse)).FzTail))
+ Xsqlite3_log(tls, (*TParse)(unsafe.Pointer(pParse)).Frc, __ccgo_ts+24033, libc.VaList(bp+1240, (*TParse)(unsafe.Pointer(pParse)).FzErrMsg, (*TParse)(unsafe.Pointer(pParse)).FzTail))
}
nErr++
}
@@ -163447,7 +163798,7 @@ func Xsqlite3_complete(tls *libc.TLS, zSql uintptr) (r int32) {
case int32('c'):
fallthrough
case int32('C'):
- if nId == int32(6) && Xsqlite3_strnicmp(tls, zSql, __ccgo_ts+23972, int32(6)) == 0 {
+ if nId == int32(6) && Xsqlite3_strnicmp(tls, zSql, __ccgo_ts+24044, int32(6)) == 0 {
token = uint8(tkCREATE)
} else {
token = uint8(tkOTHER)
@@ -163455,13 +163806,13 @@ func Xsqlite3_complete(tls *libc.TLS, zSql uintptr) (r int32) {
case int32('t'):
fallthrough
case int32('T'):
- if nId == int32(7) && Xsqlite3_strnicmp(tls, zSql, __ccgo_ts+20600, int32(7)) == 0 {
+ if nId == int32(7) && Xsqlite3_strnicmp(tls, zSql, __ccgo_ts+20672, int32(7)) == 0 {
token = uint8(tkTRIGGER)
} else {
- if nId == int32(4) && Xsqlite3_strnicmp(tls, zSql, __ccgo_ts+23979, int32(4)) == 0 {
+ if nId == int32(4) && Xsqlite3_strnicmp(tls, zSql, __ccgo_ts+24051, int32(4)) == 0 {
token = uint8(tkTEMP)
} else {
- if nId == int32(9) && Xsqlite3_strnicmp(tls, zSql, __ccgo_ts+23984, int32(9)) == 0 {
+ if nId == int32(9) && Xsqlite3_strnicmp(tls, zSql, __ccgo_ts+24056, int32(9)) == 0 {
token = uint8(tkTEMP)
} else {
token = uint8(tkOTHER)
@@ -163471,10 +163822,10 @@ func Xsqlite3_complete(tls *libc.TLS, zSql uintptr) (r int32) {
case int32('e'):
fallthrough
case int32('E'):
- if nId == int32(3) && Xsqlite3_strnicmp(tls, zSql, __ccgo_ts+23994, int32(3)) == 0 {
+ if nId == int32(3) && Xsqlite3_strnicmp(tls, zSql, __ccgo_ts+24066, int32(3)) == 0 {
token = uint8(tkEND)
} else {
- if nId == int32(7) && Xsqlite3_strnicmp(tls, zSql, __ccgo_ts+23998, int32(7)) == 0 {
+ if nId == int32(7) && Xsqlite3_strnicmp(tls, zSql, __ccgo_ts+24070, int32(7)) == 0 {
token = uint8(tkEXPLAIN)
} else {
token = uint8(tkOTHER)
@@ -163799,6 +164150,8 @@ func Xsqlite3_initialize(tls *libc.TLS) (r int32) {
}
if rc == SQLITE_OK {
_sqlite3PCacheBufferSetup(tls, _sqlite3Config.FpPage, _sqlite3Config.FszPage, _sqlite3Config.FnPage)
+ }
+ if rc == SQLITE_OK {
_sqlite3MemoryBarrier(tls)
libc.AtomicStorePInt32(uintptr(unsafe.Pointer(&_sqlite3Config))+208, int32(1))
}
@@ -163890,7 +164243,7 @@ func Xsqlite3_config(tls *libc.TLS, op int32, va uintptr) (r int32) {
*/
if libc.AtomicLoadPInt32(uintptr(unsafe.Pointer(&_sqlite3Config))+208) != 0 {
if op < 0 || op > int32(63) || libc.Uint64FromInt32(1)<<op&_mAnytimeConfigOption == uint64(0) {
- return _sqlite3MisuseError(tls, int32(181983))
+ return _sqlite3MisuseError(tls, int32(183007))
}
}
ap = va
@@ -164069,10 +164422,10 @@ var _mAnytimeConfigOption = libc.Uint64FromInt32(0) | libc.Uint64FromInt32(1)<<l
// ** 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.
+// ** The cnt parameter is the number of slots. If pBuf is NULL the
+// ** space for the lookaside memory is obtained from sqlite3_malloc()
+// ** or similar. If pBuf is not NULL then it is sz*cnt bytes of memory
+// ** to use for the lookaside memory.
// */
func _setupLookaside(tls *libc.TLS, db uintptr, pBuf uintptr, sz int32, cnt int32) (r int32) {
var i, nBig, nSm, v1, v4 int32
@@ -164090,26 +164443,31 @@ func _setupLookaside(tls *libc.TLS, db uintptr, pBuf uintptr, sz int32, cnt int3
Xsqlite3_free(tls, (*Tsqlite3)(unsafe.Pointer(db)).Flookaside.FpStart)
}
/* The size of a lookaside slot after ROUNDDOWN8 needs to be larger
- ** than a pointer to be useful.
+ ** than a pointer and small enough to fit in a u16.
*/
- sz = sz & ^libc.Int32FromInt32(7) /* IMP: R-33038-09382 */
+ sz = sz & ^libc.Int32FromInt32(7)
if sz <= libc.Int32FromInt64(4) {
sz = 0
}
if sz > int32(65528) {
sz = int32(65528)
}
- if cnt < 0 {
+ /* Count must be at least 1 to be useful, but not so large as to use
+ ** more than 0x7fff0000 total bytes for lookaside. */
+ if cnt < int32(1) {
cnt = 0
}
+ if sz > 0 && cnt > int32(0x7fff0000)/sz {
+ cnt = int32(0x7fff0000) / sz
+ }
szAlloc = int64(sz) * int64(cnt)
- if sz == 0 || cnt == 0 {
+ if szAlloc == 0 {
sz = 0
pStart = uintptr(0)
} else {
if pBuf == uintptr(0) {
_sqlite3BeginBenignMalloc(tls)
- pStart = _sqlite3Malloc(tls, libc.Uint64FromInt64(szAlloc)) /* IMP: R-61949-35727 */
+ pStart = _sqlite3Malloc(tls, libc.Uint64FromInt64(szAlloc))
_sqlite3EndBenignMalloc(tls)
if pStart != 0 {
szAlloc = int64(_sqlite3MallocSize(tls, pStart))
@@ -164703,7 +165061,7 @@ func _sqlite3Close(tls *libc.TLS, db uintptr, forceZombie int32) (r int32) {
return SQLITE_OK
}
if !(_sqlite3SafetyCheckSickOrOk(tls, db) != 0) {
- return _sqlite3MisuseError(tls, int32(182788))
+ return _sqlite3MisuseError(tls, int32(183820))
}
Xsqlite3_mutex_enter(tls, (*Tsqlite3)(unsafe.Pointer(db)).Fmutex)
if libc.Int32FromUint8((*Tsqlite3)(unsafe.Pointer(db)).FmTrace)&int32(SQLITE_TRACE_CLOSE) != 0 {
@@ -164723,7 +165081,7 @@ func _sqlite3Close(tls *libc.TLS, db uintptr, forceZombie int32) (r int32) {
** SQLITE_BUSY if the connection can not be closed immediately.
*/
if !(forceZombie != 0) && _connectionIsBusy(tls, db) != 0 {
- _sqlite3ErrorWithMsg(tls, db, int32(SQLITE_BUSY), __ccgo_ts+24006, 0)
+ _sqlite3ErrorWithMsg(tls, db, int32(SQLITE_BUSY), __ccgo_ts+24078, 0)
Xsqlite3_mutex_leave(tls, (*Tsqlite3)(unsafe.Pointer(db)).Fmutex)
return int32(SQLITE_BUSY)
}
@@ -165024,14 +165382,14 @@ func _sqlite3RollbackAll(tls *libc.TLS, db uintptr, tripCode int32) {
func _sqlite3ErrStr(tls *libc.TLS, rc int32) (r uintptr) {
var zErr uintptr
_ = zErr
- zErr = __ccgo_ts + 24549
+ zErr = __ccgo_ts + 24621
switch rc {
case libc.Int32FromInt32(SQLITE_ABORT) | libc.Int32FromInt32(2)<<libc.Int32FromInt32(8):
- zErr = __ccgo_ts + 24563
+ zErr = __ccgo_ts + 24635
case int32(SQLITE_ROW):
- zErr = __ccgo_ts + 24585
+ zErr = __ccgo_ts + 24657
case int32(SQLITE_DONE):
- zErr = __ccgo_ts + 24607
+ zErr = __ccgo_ts + 24679
default:
rc &= int32(0xff)
if rc >= 0 && rc < libc.Int32FromUint32(libc.Uint32FromInt64(116)/libc.Uint32FromInt64(4)) && _aMsg[rc] != uintptr(0) {
@@ -165043,31 +165401,31 @@ func _sqlite3ErrStr(tls *libc.TLS, rc int32) (r uintptr) {
}
var _aMsg = [29]uintptr{
- 0: __ccgo_ts + 24074,
- 1: __ccgo_ts + 24087,
- 3: __ccgo_ts + 24103,
- 4: __ccgo_ts + 24128,
- 5: __ccgo_ts + 24142,
- 6: __ccgo_ts + 24161,
+ 0: __ccgo_ts + 24146,
+ 1: __ccgo_ts + 24159,
+ 3: __ccgo_ts + 24175,
+ 4: __ccgo_ts + 24200,
+ 5: __ccgo_ts + 24214,
+ 6: __ccgo_ts + 24233,
7: __ccgo_ts + 1637,
- 8: __ccgo_ts + 24186,
- 9: __ccgo_ts + 24223,
- 10: __ccgo_ts + 24235,
- 11: __ccgo_ts + 24250,
- 12: __ccgo_ts + 24283,
- 13: __ccgo_ts + 24301,
- 14: __ccgo_ts + 24326,
- 15: __ccgo_ts + 24355,
- 17: __ccgo_ts + 6106,
- 18: __ccgo_ts + 5508,
- 19: __ccgo_ts + 24372,
- 20: __ccgo_ts + 24390,
- 21: __ccgo_ts + 24408,
- 23: __ccgo_ts + 24442,
- 25: __ccgo_ts + 24463,
- 26: __ccgo_ts + 24489,
- 27: __ccgo_ts + 24512,
- 28: __ccgo_ts + 24533,
+ 8: __ccgo_ts + 24258,
+ 9: __ccgo_ts + 24295,
+ 10: __ccgo_ts + 24307,
+ 11: __ccgo_ts + 24322,
+ 12: __ccgo_ts + 24355,
+ 13: __ccgo_ts + 24373,
+ 14: __ccgo_ts + 24398,
+ 15: __ccgo_ts + 24427,
+ 17: __ccgo_ts + 6130,
+ 18: __ccgo_ts + 5534,
+ 19: __ccgo_ts + 24444,
+ 20: __ccgo_ts + 24462,
+ 21: __ccgo_ts + 24480,
+ 23: __ccgo_ts + 24514,
+ 25: __ccgo_ts + 24535,
+ 26: __ccgo_ts + 24561,
+ 27: __ccgo_ts + 24584,
+ 28: __ccgo_ts + 24605,
}
// C documentation
@@ -165217,6 +165575,20 @@ func Xsqlite3_busy_timeout(tls *libc.TLS, db uintptr, ms int32) (r int32) {
// C documentation
//
// /*
+// ** Set the setlk timeout value.
+// */
+func Xsqlite3_setlk_timeout(tls *libc.TLS, db uintptr, ms int32, flags int32) (r int32) {
+ if ms < -int32(1) {
+ return int32(SQLITE_RANGE)
+ }
+ _ = db
+ _ = flags
+ return SQLITE_OK
+}
+
+// C documentation
+//
+// /*
// ** Cause any pending operation to stop at its earliest opportunity.
// */
func Xsqlite3_interrupt(tls *libc.TLS, db uintptr) {
@@ -165246,7 +165618,7 @@ func _sqlite3CreateFunc(tls *libc.TLS, db uintptr, zFunctionName uintptr, nArg i
var p, v1 uintptr
_, _, _, _ = extraFlags, p, rc, v1
if zFunctionName == uintptr(0) || xSFunc != uintptr(0) && xFinal != uintptr(0) || libc.BoolInt32(xFinal == uintptr(0)) != libc.BoolInt32(xStep == uintptr(0)) || libc.BoolInt32(xValue == uintptr(0)) != libc.BoolInt32(xInverse == uintptr(0)) || (nArg < -int32(1) || nArg > int32(SQLITE_MAX_FUNCTION_ARG)) || int32(255) < _sqlite3Strlen30(tls, zFunctionName) {
- return _sqlite3MisuseError(tls, int32(183439))
+ return _sqlite3MisuseError(tls, int32(184509))
}
extraFlags = enc & (libc.Int32FromInt32(SQLITE_DETERMINISTIC) | libc.Int32FromInt32(SQLITE_DIRECTONLY) | libc.Int32FromInt32(SQLITE_SUBTYPE) | libc.Int32FromInt32(SQLITE_INNOCUOUS) | libc.Int32FromInt32(SQLITE_RESULT_SUBTYPE) | libc.Int32FromInt32(SQLITE_SELFORDER1))
enc &= libc.Int32FromInt32(SQLITE_FUNC_ENCMASK) | libc.Int32FromInt32(SQLITE_ANY)
@@ -165289,7 +165661,7 @@ func _sqlite3CreateFunc(tls *libc.TLS, db uintptr, zFunctionName uintptr, nArg i
p = _sqlite3FindFunction(tls, db, zFunctionName, nArg, libc.Uint8FromInt32(enc), uint8(0))
if p != 0 && (*TFuncDef)(unsafe.Pointer(p)).FfuncFlags&uint32(SQLITE_FUNC_ENCMASK) == libc.Uint32FromInt32(enc) && int32((*TFuncDef)(unsafe.Pointer(p)).FnArg) == nArg {
if (*Tsqlite3)(unsafe.Pointer(db)).FnVdbeActive != 0 {
- _sqlite3ErrorWithMsg(tls, db, int32(SQLITE_BUSY), __ccgo_ts+24630, 0)
+ _sqlite3ErrorWithMsg(tls, db, int32(SQLITE_BUSY), __ccgo_ts+24702, 0)
return int32(SQLITE_BUSY)
} else {
_sqlite3ExpirePreparedStatements(tls, db, 0)
@@ -165415,7 +165787,7 @@ func _sqlite3InvalidFunction(tls *libc.TLS, context uintptr, NotUsed int32, NotU
zName = Xsqlite3_user_data(tls, context)
_ = NotUsed
_ = NotUsed2
- zErr = Xsqlite3_mprintf(tls, __ccgo_ts+24693, libc.VaList(bp+8, zName))
+ zErr = Xsqlite3_mprintf(tls, __ccgo_ts+24765, libc.VaList(bp+8, zName))
Xsqlite3_result_error(tls, context, zErr, -int32(1))
Xsqlite3_free(tls, zErr)
}
@@ -165446,7 +165818,7 @@ func Xsqlite3_overload_function(tls *libc.TLS, db uintptr, zName uintptr, nArg i
if rc != 0 {
return SQLITE_OK
}
- zCopy = Xsqlite3_mprintf(tls, __ccgo_ts+3864, libc.VaList(bp+8, zName))
+ zCopy = Xsqlite3_mprintf(tls, __ccgo_ts+3890, libc.VaList(bp+8, zName))
if zCopy == uintptr(0) {
return int32(SQLITE_NOMEM)
}
@@ -165690,7 +166062,7 @@ func Xsqlite3_wal_checkpoint_v2(tls *libc.TLS, db uintptr, zDb uintptr, eMode in
if eMode < SQLITE_CHECKPOINT_PASSIVE || eMode > int32(SQLITE_CHECKPOINT_TRUNCATE) {
/* EVIDENCE-OF: R-03996-12088 The M parameter must be a valid checkpoint
** mode: */
- return _sqlite3MisuseError(tls, int32(184055))
+ return _sqlite3MisuseError(tls, int32(185125))
}
Xsqlite3_mutex_enter(tls, (*Tsqlite3)(unsafe.Pointer(db)).Fmutex)
if zDb != 0 && *(*int8)(unsafe.Pointer(zDb)) != 0 {
@@ -165700,7 +166072,7 @@ func Xsqlite3_wal_checkpoint_v2(tls *libc.TLS, db uintptr, zDb uintptr, eMode in
}
if iDb < 0 {
rc = int32(SQLITE_ERROR)
- _sqlite3ErrorWithMsg(tls, db, int32(SQLITE_ERROR), __ccgo_ts+24744, libc.VaList(bp+8, zDb))
+ _sqlite3ErrorWithMsg(tls, db, int32(SQLITE_ERROR), __ccgo_ts+24816, libc.VaList(bp+8, zDb))
} else {
(*Tsqlite3)(unsafe.Pointer(db)).FbusyHandler.FnBusy = 0
rc = _sqlite3Checkpoint(tls, db, iDb, eMode, pnLog, pnCkpt)
@@ -165822,7 +166194,7 @@ func Xsqlite3_errmsg(tls *libc.TLS, db uintptr) (r uintptr) {
return _sqlite3ErrStr(tls, int32(SQLITE_NOMEM))
}
if !(_sqlite3SafetyCheckSickOrOk(tls, db) != 0) {
- return _sqlite3ErrStr(tls, _sqlite3MisuseError(tls, int32(184191)))
+ return _sqlite3ErrStr(tls, _sqlite3MisuseError(tls, int32(185261)))
}
Xsqlite3_mutex_enter(tls, (*Tsqlite3)(unsafe.Pointer(db)).Fmutex)
if (*Tsqlite3)(unsafe.Pointer(db)).FmallocFailed != 0 {
@@ -165954,7 +166326,7 @@ var _misuse = [34]Tu16{
// */
func Xsqlite3_errcode(tls *libc.TLS, db uintptr) (r int32) {
if db != 0 && !(_sqlite3SafetyCheckSickOrOk(tls, db) != 0) {
- return _sqlite3MisuseError(tls, int32(184270))
+ return _sqlite3MisuseError(tls, int32(185340))
}
if !(db != 0) || (*Tsqlite3)(unsafe.Pointer(db)).FmallocFailed != 0 {
return int32(SQLITE_NOMEM)
@@ -165964,7 +166336,7 @@ func Xsqlite3_errcode(tls *libc.TLS, db uintptr) (r int32) {
func Xsqlite3_extended_errcode(tls *libc.TLS, db uintptr) (r int32) {
if db != 0 && !(_sqlite3SafetyCheckSickOrOk(tls, db) != 0) {
- return _sqlite3MisuseError(tls, int32(184279))
+ return _sqlite3MisuseError(tls, int32(185349))
}
if !(db != 0) || (*Tsqlite3)(unsafe.Pointer(db)).FmallocFailed != 0 {
return int32(SQLITE_NOMEM)
@@ -166013,7 +166385,7 @@ func _createCollation(tls *libc.TLS, db uintptr, zName uintptr, enc Tu8, pCtx ui
enc2 = int32(SQLITE_UTF16LE)
}
if enc2 < int32(SQLITE_UTF8) || enc2 > int32(SQLITE_UTF16BE) {
- return _sqlite3MisuseError(tls, int32(184327))
+ return _sqlite3MisuseError(tls, int32(185397))
}
/* Check if this call is removing or replacing an existing collation
** sequence. If so, and there are active VMs, return busy. If there
@@ -166022,7 +166394,7 @@ func _createCollation(tls *libc.TLS, db uintptr, zName uintptr, enc Tu8, pCtx ui
pColl = _sqlite3FindCollSeq(tls, db, libc.Uint8FromInt32(enc2), zName, 0)
if pColl != 0 && (*TCollSeq)(unsafe.Pointer(pColl)).FxCmp != 0 {
if (*Tsqlite3)(unsafe.Pointer(db)).FnVdbeActive != 0 {
- _sqlite3ErrorWithMsg(tls, db, int32(SQLITE_BUSY), __ccgo_ts+24765, 0)
+ _sqlite3ErrorWithMsg(tls, db, int32(SQLITE_BUSY), __ccgo_ts+24837, 0)
return int32(SQLITE_BUSY)
}
_sqlite3ExpirePreparedStatements(tls, db, 0)
@@ -166169,7 +166541,7 @@ func _sqlite3ParseUri(tls *libc.TLS, zDefaultVfs uintptr, zUri uintptr, pFlags u
flags = *(*uint32)(unsafe.Pointer(pFlags))
zVfs = zDefaultVfs
nUri = _sqlite3Strlen30(tls, zUri)
- if (flags&uint32(SQLITE_OPEN_URI) != 0 || libc.AtomicLoadNUint8(uintptr(unsafe.Pointer(&_sqlite3Config))+6, libc.Int32FromInt32(__ATOMIC_RELAXED)) != 0) && nUri >= int32(5) && libc.Xmemcmp(tls, zUri, __ccgo_ts+24833, uint32(5)) == 0 { /* Input character index */
+ if (flags&uint32(SQLITE_OPEN_URI) != 0 || libc.AtomicLoadNUint8(uintptr(unsafe.Pointer(&_sqlite3Config))+6, libc.Int32FromInt32(__ATOMIC_RELAXED)) != 0) && nUri >= int32(5) && libc.Xmemcmp(tls, zUri, __ccgo_ts+24905, uint32(5)) == 0 { /* Input character index */
iOut = 0 /* Output character index */
nByte = libc.Uint64FromInt32(nUri + int32(8)) /* Bytes of space to allocate */
/* Make sure the SQLITE_OPEN_URI flag is set to indicate to the VFS xOpen
@@ -166199,8 +166571,8 @@ func _sqlite3ParseUri(tls *libc.TLS, zDefaultVfs uintptr, zUri uintptr, pFlags u
for *(*int8)(unsafe.Pointer(zUri + uintptr(iIn))) != 0 && int32(*(*int8)(unsafe.Pointer(zUri + uintptr(iIn)))) != int32('/') {
iIn++
}
- if iIn != int32(7) && (iIn != int32(16) || libc.Xmemcmp(tls, __ccgo_ts+24839, zUri+7, uint32(9)) != 0) {
- *(*uintptr)(unsafe.Pointer(pzErrMsg)) = Xsqlite3_mprintf(tls, __ccgo_ts+24849, libc.VaList(bp+8, iIn-int32(7), zUri+7))
+ if iIn != int32(7) && (iIn != int32(16) || libc.Xmemcmp(tls, __ccgo_ts+24911, zUri+7, uint32(9)) != 0) {
+ *(*uintptr)(unsafe.Pointer(pzErrMsg)) = Xsqlite3_mprintf(tls, __ccgo_ts+24921, libc.VaList(bp+8, iIn-int32(7), zUri+7))
rc = int32(SQLITE_ERROR)
goto parse_uri_out
}
@@ -166289,24 +166661,24 @@ func _sqlite3ParseUri(tls *libc.TLS, zDefaultVfs uintptr, zUri uintptr, pFlags u
nOpt = _sqlite3Strlen30(tls, zOpt)
zVal = zOpt + uintptr(nOpt+int32(1))
nVal = _sqlite3Strlen30(tls, zVal)
- if nOpt == int32(3) && libc.Xmemcmp(tls, __ccgo_ts+24877, zOpt, uint32(3)) == 0 {
+ if nOpt == int32(3) && libc.Xmemcmp(tls, __ccgo_ts+24949, zOpt, uint32(3)) == 0 {
zVfs = zVal
} else {
aMode = uintptr(0)
zModeType = uintptr(0)
mask = 0
limit = 0
- if nOpt == int32(5) && libc.Xmemcmp(tls, __ccgo_ts+24881, zOpt, uint32(5)) == 0 {
+ if nOpt == int32(5) && libc.Xmemcmp(tls, __ccgo_ts+24953, zOpt, uint32(5)) == 0 {
mask = libc.Int32FromInt32(SQLITE_OPEN_SHAREDCACHE) | libc.Int32FromInt32(SQLITE_OPEN_PRIVATECACHE)
aMode = uintptr(unsafe.Pointer(&_aCacheMode))
limit = mask
- zModeType = __ccgo_ts + 24881
+ zModeType = __ccgo_ts + 24953
}
- if nOpt == int32(4) && libc.Xmemcmp(tls, __ccgo_ts+24902, zOpt, uint32(4)) == 0 {
+ if nOpt == int32(4) && libc.Xmemcmp(tls, __ccgo_ts+24974, zOpt, uint32(4)) == 0 {
mask = libc.Int32FromInt32(SQLITE_OPEN_READONLY) | libc.Int32FromInt32(SQLITE_OPEN_READWRITE) | libc.Int32FromInt32(SQLITE_OPEN_CREATE) | libc.Int32FromInt32(SQLITE_OPEN_MEMORY)
aMode = uintptr(unsafe.Pointer(&_aOpenMode))
limit = libc.Int32FromUint32(libc.Uint32FromInt32(mask) & flags)
- zModeType = __ccgo_ts + 3473
+ zModeType = __ccgo_ts + 3499
}
if aMode != 0 {
mode = 0
@@ -166335,12 +166707,12 @@ func _sqlite3ParseUri(tls *libc.TLS, zDefaultVfs uintptr, zUri uintptr, pFlags u
i++
}
if mode == 0 {
- *(*uintptr)(unsafe.Pointer(pzErrMsg)) = Xsqlite3_mprintf(tls, __ccgo_ts+24917, libc.VaList(bp+8, zModeType, zVal))
+ *(*uintptr)(unsafe.Pointer(pzErrMsg)) = Xsqlite3_mprintf(tls, __ccgo_ts+24989, libc.VaList(bp+8, zModeType, zVal))
rc = int32(SQLITE_ERROR)
goto parse_uri_out
}
if mode & ^libc.Int32FromInt32(SQLITE_OPEN_MEMORY) > limit {
- *(*uintptr)(unsafe.Pointer(pzErrMsg)) = Xsqlite3_mprintf(tls, __ccgo_ts+24937, libc.VaList(bp+8, zModeType, zVal))
+ *(*uintptr)(unsafe.Pointer(pzErrMsg)) = Xsqlite3_mprintf(tls, __ccgo_ts+25009, libc.VaList(bp+8, zModeType, zVal))
rc = int32(SQLITE_PERM)
goto parse_uri_out
}
@@ -166364,7 +166736,7 @@ func _sqlite3ParseUri(tls *libc.TLS, zDefaultVfs uintptr, zUri uintptr, pFlags u
}
*(*uintptr)(unsafe.Pointer(ppVfs)) = Xsqlite3_vfs_find(tls, zVfs)
if *(*uintptr)(unsafe.Pointer(ppVfs)) == uintptr(0) {
- *(*uintptr)(unsafe.Pointer(pzErrMsg)) = Xsqlite3_mprintf(tls, __ccgo_ts+24961, libc.VaList(bp+8, zVfs))
+ *(*uintptr)(unsafe.Pointer(pzErrMsg)) = Xsqlite3_mprintf(tls, __ccgo_ts+25033, libc.VaList(bp+8, zVfs))
rc = int32(SQLITE_ERROR)
}
goto parse_uri_out
@@ -166384,11 +166756,11 @@ var _aCacheMode = [3]struct {
Fmode int32
}{
0: {
- Fz: __ccgo_ts + 24887,
+ Fz: __ccgo_ts + 24959,
Fmode: int32(SQLITE_OPEN_SHAREDCACHE),
},
1: {
- Fz: __ccgo_ts + 24894,
+ Fz: __ccgo_ts + 24966,
Fmode: int32(SQLITE_OPEN_PRIVATECACHE),
},
2: {},
@@ -166399,19 +166771,19 @@ var _aOpenMode = [5]struct {
Fmode int32
}{
0: {
- Fz: __ccgo_ts + 24907,
+ Fz: __ccgo_ts + 24979,
Fmode: int32(SQLITE_OPEN_READONLY),
},
1: {
- Fz: __ccgo_ts + 24910,
+ Fz: __ccgo_ts + 24982,
Fmode: int32(SQLITE_OPEN_READWRITE),
},
2: {
- Fz: __ccgo_ts + 24913,
+ Fz: __ccgo_ts + 24985,
Fmode: libc.Int32FromInt32(SQLITE_OPEN_READWRITE) | libc.Int32FromInt32(SQLITE_OPEN_CREATE),
},
3: {
- Fz: __ccgo_ts + 17920,
+ Fz: __ccgo_ts + 17992,
Fmode: int32(SQLITE_OPEN_MEMORY),
},
4: {},
@@ -166539,8 +166911,8 @@ func _openDatabase(tls *libc.TLS, zFilename uintptr, ppDb uintptr, _flags uint32
_createCollation(tls, db, uintptr(unsafe.Pointer(&_sqlite3StrBINARY)), uint8(SQLITE_UTF8), uintptr(0), __ccgo_fp(_binCollFunc), uintptr(0))
_createCollation(tls, db, uintptr(unsafe.Pointer(&_sqlite3StrBINARY)), uint8(SQLITE_UTF16BE), uintptr(0), __ccgo_fp(_binCollFunc), uintptr(0))
_createCollation(tls, db, uintptr(unsafe.Pointer(&_sqlite3StrBINARY)), uint8(SQLITE_UTF16LE), uintptr(0), __ccgo_fp(_binCollFunc), uintptr(0))
- _createCollation(tls, db, __ccgo_ts+22581, uint8(SQLITE_UTF8), uintptr(0), __ccgo_fp(_nocaseCollatingFunc), uintptr(0))
- _createCollation(tls, db, __ccgo_ts+24977, uint8(SQLITE_UTF8), uintptr(0), __ccgo_fp(_rtrimCollFunc), uintptr(0))
+ _createCollation(tls, db, __ccgo_ts+22653, uint8(SQLITE_UTF8), uintptr(0), __ccgo_fp(_nocaseCollatingFunc), uintptr(0))
+ _createCollation(tls, db, __ccgo_ts+25049, uint8(SQLITE_UTF8), uintptr(0), __ccgo_fp(_rtrimCollFunc), uintptr(0))
if (*Tsqlite3)(unsafe.Pointer(db)).FmallocFailed != 0 {
goto opendb_out
}
@@ -166561,10 +166933,10 @@ func _openDatabase(tls *libc.TLS, zFilename uintptr, ppDb uintptr, _flags uint32
/* READWRITE */
/* READWRITE | CREATE */
if int32(1)<<(*(*uint32)(unsafe.Pointer(bp))&uint32(7))&int32(0x46) == 0 {
- rc = _sqlite3MisuseError(tls, int32(185002)) /* IMP: R-18321-05872 */
+ rc = _sqlite3MisuseError(tls, int32(186072)) /* IMP: R-18321-05872 */
} else {
if zFilename == uintptr(0) {
- zFilename = __ccgo_ts + 4259
+ zFilename = __ccgo_ts + 4285
}
rc = _sqlite3ParseUri(tls, zVfs, zFilename, bp, db, bp+4, bp+8)
}
@@ -166573,7 +166945,7 @@ func _openDatabase(tls *libc.TLS, zFilename uintptr, ppDb uintptr, _flags uint32
_sqlite3OomFault(tls, db)
}
if *(*uintptr)(unsafe.Pointer(bp + 8)) != 0 {
- v2 = __ccgo_ts + 3864
+ v2 = __ccgo_ts + 3890
} else {
v2 = uintptr(0)
}
@@ -166600,9 +166972,9 @@ func _openDatabase(tls *libc.TLS, zFilename uintptr, ppDb uintptr, _flags uint32
/* The default safety_level for the main database is FULL; for the temp
** database it is OFF. This matches the pager layer defaults.
*/
- (*(*TDb)(unsafe.Pointer((*Tsqlite3)(unsafe.Pointer(db)).FaDb))).FzDbSName = __ccgo_ts + 6715
+ (*(*TDb)(unsafe.Pointer((*Tsqlite3)(unsafe.Pointer(db)).FaDb))).FzDbSName = __ccgo_ts + 6740
(*(*TDb)(unsafe.Pointer((*Tsqlite3)(unsafe.Pointer(db)).FaDb))).Fsafety_level = libc.Uint8FromInt32(libc.Int32FromInt32(SQLITE_DEFAULT_SYNCHRONOUS) + libc.Int32FromInt32(1))
- (*(*TDb)(unsafe.Pointer((*Tsqlite3)(unsafe.Pointer(db)).FaDb + 1*16))).FzDbSName = __ccgo_ts + 23979
+ (*(*TDb)(unsafe.Pointer((*Tsqlite3)(unsafe.Pointer(db)).FaDb + 1*16))).FzDbSName = __ccgo_ts + 24051
(*(*TDb)(unsafe.Pointer((*Tsqlite3)(unsafe.Pointer(db)).FaDb + 1*16))).Fsafety_level = uint8(PAGER_SYNCHRONOUS_OFF)
(*Tsqlite3)(unsafe.Pointer(db)).FeOpenState = uint8(SQLITE_STATE_OPEN)
if (*Tsqlite3)(unsafe.Pointer(db)).FmallocFailed != 0 {
@@ -166696,7 +167068,7 @@ func Xsqlite3_open16(tls *libc.TLS, zFilename uintptr, ppDb uintptr) (r int32) {
return rc
}
if zFilename == uintptr(0) {
- zFilename = __ccgo_ts + 24983
+ zFilename = __ccgo_ts + 25055
}
pVal = _sqlite3ValueNew(tls, uintptr(0))
_sqlite3ValueSetStr(tls, pVal, -int32(1), zFilename, uint8(SQLITE_UTF16LE), libc.UintptrFromInt32(0))
@@ -166856,7 +167228,7 @@ func Xsqlite3_set_clientdata(tls *libc.TLS, db uintptr, zName uintptr, pData uin
return SQLITE_OK
} else {
n = libc.Xstrlen(tls, zName)
- p = Xsqlite3_malloc64(tls, uint64(uint32(16)+n+uint32(1)))
+ p = Xsqlite3_malloc64(tls, uint64(uint32(libc.UintptrFromInt32(0)+12)+(n+libc.Uint32FromInt32(1))))
if p == uintptr(0) {
if xDestructor != 0 {
(*(*func(*libc.TLS, uintptr))(unsafe.Pointer(&struct{ uintptr }{xDestructor})))(tls, pData)
@@ -166913,20 +167285,20 @@ func Xsqlite3_get_autocommit(tls *libc.TLS, db uintptr) (r int32) {
func _sqlite3ReportError(tls *libc.TLS, iErr int32, lineno int32, zType uintptr) (r int32) {
bp := tls.Alloc(32)
defer tls.Free(32)
- Xsqlite3_log(tls, iErr, __ccgo_ts+24986, libc.VaList(bp+8, zType, lineno, uintptr(20)+Xsqlite3_sourceid(tls)))
+ Xsqlite3_log(tls, iErr, __ccgo_ts+25058, libc.VaList(bp+8, zType, lineno, uintptr(20)+Xsqlite3_sourceid(tls)))
return iErr
}
func _sqlite3CorruptError(tls *libc.TLS, lineno int32) (r int32) {
- return _sqlite3ReportError(tls, int32(SQLITE_CORRUPT), lineno, __ccgo_ts+25011)
+ return _sqlite3ReportError(tls, int32(SQLITE_CORRUPT), lineno, __ccgo_ts+25083)
}
func _sqlite3MisuseError(tls *libc.TLS, lineno int32) (r int32) {
- return _sqlite3ReportError(tls, int32(SQLITE_MISUSE), lineno, __ccgo_ts+25031)
+ return _sqlite3ReportError(tls, int32(SQLITE_MISUSE), lineno, __ccgo_ts+25103)
}
func _sqlite3CantopenError(tls *libc.TLS, lineno int32) (r int32) {
- return _sqlite3ReportError(tls, int32(SQLITE_CANTOPEN), lineno, __ccgo_ts+25038)
+ return _sqlite3ReportError(tls, int32(SQLITE_CANTOPEN), lineno, __ccgo_ts+25110)
}
// C documentation
@@ -166951,9 +167323,9 @@ func Xsqlite3_table_column_metadata(tls *libc.TLS, db uintptr, zDbName uintptr,
bp := tls.Alloc(32)
defer tls.Free(32)
var autoinc, iCol, notnull, primarykey, rc int32
- var pCol, pTab, zCollSeq, zDataType, v2, v3 uintptr
+ var pCol, pTab, zCollSeq, zDataType, v1, v2 uintptr
var _ /* zErrMsg at bp+0 */ uintptr
- _, _, _, _, _, _, _, _, _, _, _ = autoinc, iCol, notnull, pCol, pTab, primarykey, rc, zCollSeq, zDataType, v2, v3
+ _, _, _, _, _, _, _, _, _, _, _ = autoinc, iCol, notnull, pCol, pTab, primarykey, rc, zCollSeq, zDataType, v1, v2
*(*uintptr)(unsafe.Pointer(bp)) = uintptr(0)
pTab = uintptr(0)
pCol = uintptr(0)
@@ -166980,29 +167352,18 @@ func Xsqlite3_table_column_metadata(tls *libc.TLS, db uintptr, zDbName uintptr,
if zColumnName == uintptr(0) {
/* Query for existence of table only */
} else {
- iCol = 0
- for {
- if !(iCol < int32((*TTable)(unsafe.Pointer(pTab)).FnCol)) {
- break
- }
+ iCol = _sqlite3ColumnIndex(tls, pTab, zColumnName)
+ if iCol >= 0 {
pCol = (*TTable)(unsafe.Pointer(pTab)).FaCol + uintptr(iCol)*12
- if 0 == _sqlite3StrICmp(tls, (*TColumn)(unsafe.Pointer(pCol)).FzCnName, zColumnName) {
- break
- }
- goto _1
- _1:
- ;
- iCol++
- }
- if iCol == int32((*TTable)(unsafe.Pointer(pTab)).FnCol) {
+ } else {
if (*TTable)(unsafe.Pointer(pTab)).FtabFlags&uint32(TF_WithoutRowid) == uint32(0) && _sqlite3IsRowid(tls, zColumnName) != 0 {
iCol = int32((*TTable)(unsafe.Pointer(pTab)).FiPKey)
if iCol >= 0 {
- v2 = (*TTable)(unsafe.Pointer(pTab)).FaCol + uintptr(iCol)*12
+ v1 = (*TTable)(unsafe.Pointer(pTab)).FaCol + uintptr(iCol)*12
} else {
- v2 = uintptr(0)
+ v1 = uintptr(0)
}
- pCol = v2
+ pCol = v1
} else {
pTab = uintptr(0)
goto error_out
@@ -167057,15 +167418,15 @@ error_out:
}
if SQLITE_OK == rc && !(pTab != 0) {
_sqlite3DbFree(tls, db, *(*uintptr)(unsafe.Pointer(bp)))
- *(*uintptr)(unsafe.Pointer(bp)) = _sqlite3MPrintf(tls, db, __ccgo_ts+25055, libc.VaList(bp+16, zTableName, zColumnName))
+ *(*uintptr)(unsafe.Pointer(bp)) = _sqlite3MPrintf(tls, db, __ccgo_ts+25127, libc.VaList(bp+16, zTableName, zColumnName))
rc = int32(SQLITE_ERROR)
}
if *(*uintptr)(unsafe.Pointer(bp)) != 0 {
- v3 = __ccgo_ts + 3864
+ v2 = __ccgo_ts + 3890
} else {
- v3 = uintptr(0)
+ v2 = uintptr(0)
}
- _sqlite3ErrorWithMsg(tls, db, rc, v3, libc.VaList(bp+16, *(*uintptr)(unsafe.Pointer(bp))))
+ _sqlite3ErrorWithMsg(tls, db, rc, v2, libc.VaList(bp+16, *(*uintptr)(unsafe.Pointer(bp))))
_sqlite3DbFree(tls, db, *(*uintptr)(unsafe.Pointer(bp)))
rc = _sqlite3ApiExit(tls, db, rc)
Xsqlite3_mutex_leave(tls, (*Tsqlite3)(unsafe.Pointer(db)).Fmutex)
@@ -167244,8 +167605,8 @@ func Xsqlite3_test_control(tls *libc.TLS, op int32, va uintptr) (r int32) {
/* sqlite3_test_control(SQLITE_TESTCTRL_FK_NO_ACTION, sqlite3 *db, int b);
**
** If b is true, then activate the SQLITE_FkNoAction setting. If b is
- ** false then clearn that setting. If the SQLITE_FkNoAction setting is
- ** abled, all foreign key ON DELETE and ON UPDATE actions behave as if
+ ** false then clear that setting. If the SQLITE_FkNoAction setting is
+ ** enabled, all foreign key ON DELETE and ON UPDATE actions behave as if
** they were NO ACTION, regardless of how they are defined.
**
** NB: One must usually run "PRAGMA writable_schema=RESET" after
@@ -168085,7 +168446,7 @@ func Xsqlite3_compileoption_used(tls *libc.TLS, zOptName uintptr) (r int32) {
var _ /* nOpt at bp+0 */ int32
_, _, _ = azCompileOpt, i, n
azCompileOpt = _sqlite3CompileOptions(tls, bp)
- if Xsqlite3_strnicmp(tls, zOptName, __ccgo_ts+25083, int32(7)) == 0 {
+ if Xsqlite3_strnicmp(tls, zOptName, __ccgo_ts+25155, int32(7)) == 0 {
zOptName += uintptr(7)
}
n = _sqlite3Strlen30(tls, zOptName)
@@ -168303,7 +168664,7 @@ func Xsqlite3_unlock_notify(tls *libc.TLS, db uintptr, xNotify uintptr, _pArg ui
}
_leaveMutex(tls)
if rc != 0 {
- v2 = __ccgo_ts + 25091
+ v2 = __ccgo_ts + 25163
} else {
v2 = uintptr(0)
}
@@ -168549,7 +168910,7 @@ func _sqlite3ConnectionClosed(tls *libc.TLS, db uintptr) {
** Here, array { X } means zero or more occurrences of X, adjacent in
** memory. A "position" is an index of a token in the token stream
** generated by the tokenizer. Note that POS_END and POS_COLUMN occur
-** in the same logical place as the position element, and act as sentinals
+** in the same logical place as the position element, and act as sentinels
** ending a position list array. POS_END is 0. POS_COLUMN is 1.
** The positions numbers are not stored literally but rather as two more
** than the difference from the prior position, or the just the position plus
@@ -168766,6 +169127,13 @@ func _sqlite3ConnectionClosed(tls *libc.TLS, db uintptr) {
**
*/
+/* #include <assert.h> */
+/* #include <stdlib.h> */
+/* #include <stddef.h> */
+/* #include <stdio.h> */
+/* #include <string.h> */
+/* #include <stdarg.h> */
+
/* FTS3/FTS4 require virtual tables */
/*
@@ -169078,8 +169446,8 @@ func _sqlite3ConnectionClosed(tls *libc.TLS, db uintptr) {
** Beginning with version 3.45.0 (circa 2024-01-01), these routines also
** accept BLOB values that have JSON encoded using a binary representation
** called "JSONB". The name JSONB comes from PostgreSQL, however the on-disk
-** format SQLite JSONB is completely different and incompatible with
-** PostgreSQL JSONB.
+** format for SQLite-JSONB is completely different and incompatible with
+** PostgreSQL-JSONB.
**
** Decoding and interpreting JSONB is still O(N) where N is the size of
** the input, the same as text JSON. However, the constant of proportionality
@@ -169136,7 +169504,7 @@ func _sqlite3ConnectionClosed(tls *libc.TLS, db uintptr) {
**
** The payload size need not be expressed in its minimal form. For example,
** if the payload size is 10, the size can be expressed in any of 5 different
-** ways: (1) (X>>4)==10, (2) (X>>4)==12 following by on 0x0a byte,
+** ways: (1) (X>>4)==10, (2) (X>>4)==12 following by one 0x0a byte,
** (3) (X>>4)==13 followed by 0x00 and 0x0a, (4) (X>>4)==14 followed by
** 0x00 0x00 0x00 0x0a, or (5) (X>>4)==15 followed by 7 bytes of 0x00 and
** a single byte of 0x0a. The shorter forms are preferred, of course, but
@@ -169146,7 +169514,7 @@ func _sqlite3ConnectionClosed(tls *libc.TLS, db uintptr) {
** the size when it becomes known, resulting in a non-minimal encoding.
**
** The value (X>>4)==15 is not actually used in the current implementation
-** (as SQLite is currently unable handle BLOBs larger than about 2GB)
+** (as SQLite is currently unable to handle BLOBs larger than about 2GB)
** but is included in the design to allow for future enhancements.
**
** The payload follows the header. NULL, TRUE, and FALSE have no payload and
@@ -169184,18 +169552,18 @@ func _sqlite3ConnectionClosed(tls *libc.TLS, db uintptr) {
// */
var _jsonbType = [17]uintptr{
0: __ccgo_ts + 1653,
- 1: __ccgo_ts + 8077,
- 2: __ccgo_ts + 8082,
- 3: __ccgo_ts + 6391,
- 4: __ccgo_ts + 6391,
- 5: __ccgo_ts + 6386,
- 6: __ccgo_ts + 6386,
- 7: __ccgo_ts + 8388,
- 8: __ccgo_ts + 8388,
- 9: __ccgo_ts + 8388,
- 10: __ccgo_ts + 8388,
- 11: __ccgo_ts + 25114,
- 12: __ccgo_ts + 25120,
+ 1: __ccgo_ts + 8102,
+ 2: __ccgo_ts + 8107,
+ 3: __ccgo_ts + 6416,
+ 4: __ccgo_ts + 6416,
+ 5: __ccgo_ts + 6411,
+ 6: __ccgo_ts + 6411,
+ 7: __ccgo_ts + 8413,
+ 8: __ccgo_ts + 8413,
+ 9: __ccgo_ts + 8413,
+ 10: __ccgo_ts + 8413,
+ 11: __ccgo_ts + 25186,
+ 12: __ccgo_ts + 25192,
13: __ccgo_ts + 1667,
14: __ccgo_ts + 1667,
15: __ccgo_ts + 1667,
@@ -169682,7 +170050,7 @@ func _jsonCacheInsert(tls *libc.TLS, ctx uintptr, pParse uintptr) (r int32) {
// ** most-recently used entry if it isn't so already.
// **
// ** The JsonParse object returned still belongs to the Cache and might
-// ** be deleted at any moment. If the caller whants the JsonParse to
+// ** be deleted at any moment. If the caller wants the JsonParse to
// ** linger, it needs to increment the nPJRef reference counter.
// */
func _jsonCacheSearch(tls *libc.TLS, ctx uintptr, pArg uintptr) (r uintptr) {
@@ -169980,8 +170348,8 @@ func _jsonAppendControlChar(tls *libc.TLS, p uintptr, c Tu8) {
*(*int8)(unsafe.Pointer((*TJsonString)(unsafe.Pointer(p)).FzBuf + uintptr((*TJsonString)(unsafe.Pointer(p)).FnUsed+uint64(1)))) = int8('u')
*(*int8)(unsafe.Pointer((*TJsonString)(unsafe.Pointer(p)).FzBuf + uintptr((*TJsonString)(unsafe.Pointer(p)).FnUsed+uint64(2)))) = int8('0')
*(*int8)(unsafe.Pointer((*TJsonString)(unsafe.Pointer(p)).FzBuf + uintptr((*TJsonString)(unsafe.Pointer(p)).FnUsed+uint64(3)))) = int8('0')
- *(*int8)(unsafe.Pointer((*TJsonString)(unsafe.Pointer(p)).FzBuf + uintptr((*TJsonString)(unsafe.Pointer(p)).FnUsed+uint64(4)))) = *(*int8)(unsafe.Pointer(__ccgo_ts + 25127 + uintptr(libc.Int32FromUint8(c)>>int32(4))))
- *(*int8)(unsafe.Pointer((*TJsonString)(unsafe.Pointer(p)).FzBuf + uintptr((*TJsonString)(unsafe.Pointer(p)).FnUsed+uint64(5)))) = *(*int8)(unsafe.Pointer(__ccgo_ts + 25127 + uintptr(libc.Int32FromUint8(c)&int32(0xf))))
+ *(*int8)(unsafe.Pointer((*TJsonString)(unsafe.Pointer(p)).FzBuf + uintptr((*TJsonString)(unsafe.Pointer(p)).FnUsed+uint64(4)))) = *(*int8)(unsafe.Pointer(__ccgo_ts + 1689 + uintptr(libc.Int32FromUint8(c)>>int32(4))))
+ *(*int8)(unsafe.Pointer((*TJsonString)(unsafe.Pointer(p)).FzBuf + uintptr((*TJsonString)(unsafe.Pointer(p)).FnUsed+uint64(5)))) = *(*int8)(unsafe.Pointer(__ccgo_ts + 1689 + uintptr(libc.Int32FromUint8(c)&int32(0xf))))
*(*Tu64)(unsafe.Pointer(p + 16)) += uint64(6)
}
}
@@ -170117,7 +170485,7 @@ func _jsonAppendSqlValue(tls *libc.TLS, p uintptr, pValue uintptr) {
case int32(SQLITE_NULL):
_jsonAppendRawNZ(tls, p, __ccgo_ts+1653, uint32(4))
case int32(SQLITE_FLOAT):
- _jsonPrintf(tls, int32(100), p, __ccgo_ts+15482, libc.VaList(bp+64, Xsqlite3_value_double(tls, pValue)))
+ _jsonPrintf(tls, int32(100), p, __ccgo_ts+15507, libc.VaList(bp+64, Xsqlite3_value_double(tls, pValue)))
case int32(SQLITE_INTEGER):
z = Xsqlite3_value_text(tls, pValue)
n = libc.Uint32FromInt32(Xsqlite3_value_bytes(tls, pValue))
@@ -170131,14 +170499,12 @@ func _jsonAppendSqlValue(tls *libc.TLS, p uintptr, pValue uintptr) {
_jsonAppendString(tls, p, z1, n1)
}
default:
- if _jsonFuncArgMightBeBinary(tls, pValue) != 0 {
- libc.Xmemset(tls, bp, 0, uint32(56))
- (*(*TJsonParse)(unsafe.Pointer(bp))).FaBlob = Xsqlite3_value_blob(tls, pValue)
- (*(*TJsonParse)(unsafe.Pointer(bp))).FnBlob = libc.Uint32FromInt32(Xsqlite3_value_bytes(tls, pValue))
+ libc.Xmemset(tls, bp, 0, uint32(56))
+ if _jsonArgIsJsonb(tls, pValue, bp) != 0 {
_jsonTranslateBlobToText(tls, bp, uint32(0), p)
} else {
if libc.Int32FromUint8((*TJsonString)(unsafe.Pointer(p)).FeErr) == 0 {
- Xsqlite3_result_error(tls, (*TJsonString)(unsafe.Pointer(p)).FpCtx, __ccgo_ts+25144, -int32(1))
+ Xsqlite3_result_error(tls, (*TJsonString)(unsafe.Pointer(p)).FpCtx, __ccgo_ts+25199, -int32(1))
(*TJsonString)(unsafe.Pointer(p)).FeErr = uint8(JSTRING_ERR)
_jsonStringReset(tls, p)
}
@@ -170192,7 +170558,7 @@ func _jsonReturnString(tls *libc.TLS, p uintptr, pParse uintptr, ctx uintptr) {
Xsqlite3_result_error_nomem(tls, (*TJsonString)(unsafe.Pointer(p)).FpCtx)
} else {
if libc.Int32FromUint8((*TJsonString)(unsafe.Pointer(p)).FeErr)&int32(JSTRING_MALFORMED) != 0 {
- Xsqlite3_result_error(tls, (*TJsonString)(unsafe.Pointer(p)).FpCtx, __ccgo_ts+25173, -int32(1))
+ Xsqlite3_result_error(tls, (*TJsonString)(unsafe.Pointer(p)).FpCtx, __ccgo_ts+25228, -int32(1))
}
}
}
@@ -170475,8 +170841,8 @@ var _aNanInfName = [5]TNanInfName{
Fn: int8(3),
FeType: int8(JSONB_FLOAT),
FnRepl: int8(7),
- FzMatch: __ccgo_ts + 25188,
- FzRepl: __ccgo_ts + 25192,
+ FzMatch: __ccgo_ts + 25243,
+ FzRepl: __ccgo_ts + 25247,
},
1: {
Fc1: int8('i'),
@@ -170484,8 +170850,8 @@ var _aNanInfName = [5]TNanInfName{
Fn: int8(8),
FeType: int8(JSONB_FLOAT),
FnRepl: int8(7),
- FzMatch: __ccgo_ts + 25200,
- FzRepl: __ccgo_ts + 25192,
+ FzMatch: __ccgo_ts + 25255,
+ FzRepl: __ccgo_ts + 25247,
},
2: {
Fc1: int8('n'),
@@ -170500,7 +170866,7 @@ var _aNanInfName = [5]TNanInfName{
Fc2: int8('Q'),
Fn: int8(4),
FnRepl: int8(4),
- FzMatch: __ccgo_ts + 25209,
+ FzMatch: __ccgo_ts + 25264,
FzRepl: __ccgo_ts + 1653,
},
4: {
@@ -170508,7 +170874,7 @@ var _aNanInfName = [5]TNanInfName{
Fc2: int8('S'),
Fn: int8(4),
FnRepl: int8(4),
- FzMatch: __ccgo_ts + 25214,
+ FzMatch: __ccgo_ts + 25269,
FzRepl: __ccgo_ts + 1653,
},
}
@@ -170524,7 +170890,7 @@ func _jsonWrongNumArgs(tls *libc.TLS, pCtx uintptr, zFuncName uintptr) {
defer tls.Free(16)
var zMsg uintptr
_ = zMsg
- zMsg = Xsqlite3_mprintf(tls, __ccgo_ts+25219, libc.VaList(bp+8, zFuncName))
+ zMsg = Xsqlite3_mprintf(tls, __ccgo_ts+25274, libc.VaList(bp+8, zFuncName))
Xsqlite3_result_error(tls, pCtx, zMsg, -int32(1))
Xsqlite3_free(tls, zMsg)
}
@@ -170542,23 +170908,23 @@ func _jsonWrongNumArgs(tls *libc.TLS, pCtx uintptr, zFuncName uintptr) {
// */
func _jsonBlobExpand(tls *libc.TLS, pParse uintptr, N Tu32) (r int32) {
var aNew uintptr
- var t Tu32
+ var t Tu64
_, _ = aNew, t
if (*TJsonParse)(unsafe.Pointer(pParse)).FnBlobAlloc == uint32(0) {
- t = uint32(100)
+ t = uint64(100)
} else {
- t = (*TJsonParse)(unsafe.Pointer(pParse)).FnBlobAlloc * uint32(2)
+ t = uint64((*TJsonParse)(unsafe.Pointer(pParse)).FnBlobAlloc * uint32(2))
}
- if t < N {
- t = N + uint32(100)
+ if t < uint64(N) {
+ t = uint64(N + uint32(100))
}
- aNew = _sqlite3DbRealloc(tls, (*TJsonParse)(unsafe.Pointer(pParse)).Fdb, (*TJsonParse)(unsafe.Pointer(pParse)).FaBlob, uint64(t))
+ aNew = _sqlite3DbRealloc(tls, (*TJsonParse)(unsafe.Pointer(pParse)).Fdb, (*TJsonParse)(unsafe.Pointer(pParse)).FaBlob, t)
if aNew == uintptr(0) {
(*TJsonParse)(unsafe.Pointer(pParse)).Foom = uint8(1)
return int32(1)
}
(*TJsonParse)(unsafe.Pointer(pParse)).FaBlob = aNew
- (*TJsonParse)(unsafe.Pointer(pParse)).FnBlobAlloc = t
+ (*TJsonParse)(unsafe.Pointer(pParse)).FnBlobAlloc = uint32(t)
return 0
}
@@ -170636,7 +171002,7 @@ func _jsonBlobExpandAndAppendNode(tls *libc.TLS, pParse uintptr, eType Tu8, szPa
// C documentation
//
-// /* Append an node type byte together with the payload size and
+// /* Append a node type byte together with the payload size and
// ** possibly also the payload.
// **
// ** If aPayload is not NULL, then it is a pointer to the payload which
@@ -170707,7 +171073,11 @@ func _jsonBlobChangePayloadSize(tls *libc.TLS, pParse uintptr, i Tu32, szPayload
if libc.Int32FromUint8(szType) == int32(13) {
nExtra = uint8(2)
} else {
- nExtra = uint8(4)
+ if libc.Int32FromUint8(szType) == int32(14) {
+ nExtra = uint8(4)
+ } else {
+ nExtra = uint8(8)
+ }
}
}
}
@@ -170982,7 +171352,7 @@ func _jsonbValidityCheck(tls *libc.TLS, pParse uintptr, i Tu32, iEnd Tu32, iDept
if libc.Int32FromUint8(*(*Tu8)(unsafe.Pointer(z + uintptr(j)))) != int32('\\') || j+uint32(1) >= k {
return j + uint32(1)
} else {
- if libc.Xstrchr(tls, __ccgo_ts+25262, libc.Int32FromUint8(*(*Tu8)(unsafe.Pointer(z + uintptr(j+uint32(1)))))) != uintptr(0) {
+ if libc.Xstrchr(tls, __ccgo_ts+25317, libc.Int32FromUint8(*(*Tu8)(unsafe.Pointer(z + uintptr(j+uint32(1)))))) != uintptr(0) {
j++
} else {
if libc.Int32FromUint8(*(*Tu8)(unsafe.Pointer(z + uintptr(j+uint32(1))))) == int32('u') {
@@ -171412,7 +171782,7 @@ parse_string:
opcode = uint8(JSONB_TEXTJ)
}
} else {
- if int32(c) == int32('\'') || int32(c) == int32('0') || int32(c) == int32('v') || int32(c) == int32('\n') || int32(0xe2) == libc.Int32FromUint8(libc.Uint8FromInt8(c)) && int32(0x80) == libc.Int32FromUint8(libc.Uint8FromInt8(*(*int8)(unsafe.Pointer(z + uintptr(j+uint32(1)))))) && (int32(0xa8) == libc.Int32FromUint8(libc.Uint8FromInt8(*(*int8)(unsafe.Pointer(z + uintptr(j+uint32(2)))))) || int32(0xa9) == libc.Int32FromUint8(libc.Uint8FromInt8(*(*int8)(unsafe.Pointer(z + uintptr(j+uint32(2))))))) || int32(c) == int32('x') && _jsonIs2Hex(tls, z+uintptr(j+uint32(1))) != 0 {
+ if int32(c) == int32('\'') || int32(c) == int32('v') || int32(c) == int32('\n') || int32(c) == int32('0') && !(libc.Int32FromUint8(_sqlite3CtypeMap[libc.Uint8FromInt8(*(*int8)(unsafe.Pointer(z + uintptr(j+uint32(1)))))])&libc.Int32FromInt32(0x04) != 0) || int32(0xe2) == libc.Int32FromUint8(libc.Uint8FromInt8(c)) && int32(0x80) == libc.Int32FromUint8(libc.Uint8FromInt8(*(*int8)(unsafe.Pointer(z + uintptr(j+uint32(1)))))) && (int32(0xa8) == libc.Int32FromUint8(libc.Uint8FromInt8(*(*int8)(unsafe.Pointer(z + uintptr(j+uint32(2)))))) || int32(0xa9) == libc.Int32FromUint8(libc.Uint8FromInt8(*(*int8)(unsafe.Pointer(z + uintptr(j+uint32(2))))))) || int32(c) == int32('x') && _jsonIs2Hex(tls, z+uintptr(j+uint32(1))) != 0 {
opcode = uint8(JSONB_TEXT5)
(*TJsonParse)(unsafe.Pointer(pParse)).FhasNonstd = uint8(1)
} else {
@@ -171451,7 +171821,7 @@ parse_string:
return libc.Int32FromUint32(j + uint32(1))
_5:
;
- if libc.Xstrncmp(tls, z+uintptr(i), __ccgo_ts+8077, uint32(4)) == 0 && !(libc.Int32FromUint8(_sqlite3CtypeMap[libc.Uint8FromInt8(*(*int8)(unsafe.Pointer(z + uintptr(i+uint32(4)))))])&libc.Int32FromInt32(0x06) != 0) {
+ if libc.Xstrncmp(tls, z+uintptr(i), __ccgo_ts+8102, uint32(4)) == 0 && !(libc.Int32FromUint8(_sqlite3CtypeMap[libc.Uint8FromInt8(*(*int8)(unsafe.Pointer(z + uintptr(i+uint32(4)))))])&libc.Int32FromInt32(0x06) != 0) {
_jsonBlobAppendOneByte(tls, pParse, uint8(JSONB_TRUE))
return libc.Int32FromUint32(i + uint32(4))
}
@@ -171459,7 +171829,7 @@ _5:
return -int32(1)
_6:
;
- if libc.Xstrncmp(tls, z+uintptr(i), __ccgo_ts+8082, uint32(5)) == 0 && !(libc.Int32FromUint8(_sqlite3CtypeMap[libc.Uint8FromInt8(*(*int8)(unsafe.Pointer(z + uintptr(i+uint32(5)))))])&libc.Int32FromInt32(0x06) != 0) {
+ if libc.Xstrncmp(tls, z+uintptr(i), __ccgo_ts+8107, uint32(5)) == 0 && !(libc.Int32FromUint8(_sqlite3CtypeMap[libc.Uint8FromInt8(*(*int8)(unsafe.Pointer(z + uintptr(i+uint32(5)))))])&libc.Int32FromInt32(0x06) != 0) {
_jsonBlobAppendOneByte(tls, pParse, uint8(JSONB_FALSE))
return libc.Int32FromUint32(i + uint32(5))
}
@@ -171536,14 +171906,14 @@ parse_number:
/* JSON5 allows for "+Infinity" and "-Infinity" using exactly
** that case. SQLite also allows these in any case and it allows
** "+inf" and "-inf". */
- if (int32(*(*int8)(unsafe.Pointer(z + uintptr(i+uint32(1))))) == int32('I') || int32(*(*int8)(unsafe.Pointer(z + uintptr(i+uint32(1))))) == int32('i')) && Xsqlite3_strnicmp(tls, z+uintptr(i+uint32(1)), __ccgo_ts+25188, int32(3)) == 0 {
+ if (int32(*(*int8)(unsafe.Pointer(z + uintptr(i+uint32(1))))) == int32('I') || int32(*(*int8)(unsafe.Pointer(z + uintptr(i+uint32(1))))) == int32('i')) && Xsqlite3_strnicmp(tls, z+uintptr(i+uint32(1)), __ccgo_ts+25243, int32(3)) == 0 {
(*TJsonParse)(unsafe.Pointer(pParse)).FhasNonstd = uint8(1)
if int32(*(*int8)(unsafe.Pointer(z + uintptr(i)))) == int32('-') {
- _jsonBlobAppendNode(tls, pParse, uint8(JSONB_FLOAT), uint32(6), __ccgo_ts+25271)
+ _jsonBlobAppendNode(tls, pParse, uint8(JSONB_FLOAT), uint32(6), __ccgo_ts+25326)
} else {
- _jsonBlobAppendNode(tls, pParse, uint8(JSONB_FLOAT), uint32(5), __ccgo_ts+25278)
+ _jsonBlobAppendNode(tls, pParse, uint8(JSONB_FLOAT), uint32(5), __ccgo_ts+25333)
}
- if Xsqlite3_strnicmp(tls, z+uintptr(i+uint32(4)), __ccgo_ts+25284, int32(5)) == 0 {
+ if Xsqlite3_strnicmp(tls, z+uintptr(i+uint32(4)), __ccgo_ts+25339, int32(5)) == 0 {
v48 = int32(9)
} else {
v48 = int32(4)
@@ -171728,7 +172098,7 @@ _38:
goto _51
}
if int32(_aNanInfName[k1].FeType) == int32(JSONB_FLOAT) {
- _jsonBlobAppendNode(tls, pParse, uint8(JSONB_FLOAT), uint32(5), __ccgo_ts+25278)
+ _jsonBlobAppendNode(tls, pParse, uint8(JSONB_FLOAT), uint32(5), __ccgo_ts+25333)
} else {
_jsonBlobAppendOneByte(tls, pParse, uint8(JSONB_NULL))
}
@@ -171773,7 +172143,7 @@ func _jsonConvertTextToBlob(tls *libc.TLS, pParse uintptr, pCtx uintptr) (r int3
i += _json5Whitespace(tls, zJson+uintptr(i))
if *(*int8)(unsafe.Pointer(zJson + uintptr(i))) != 0 {
if pCtx != 0 {
- Xsqlite3_result_error(tls, pCtx, __ccgo_ts+25173, -int32(1))
+ Xsqlite3_result_error(tls, pCtx, __ccgo_ts+25228, -int32(1))
}
_jsonParseReset(tls, pParse)
return int32(1)
@@ -171786,7 +172156,7 @@ func _jsonConvertTextToBlob(tls *libc.TLS, pParse uintptr, pCtx uintptr) (r int3
if (*TJsonParse)(unsafe.Pointer(pParse)).Foom != 0 {
Xsqlite3_result_error_nomem(tls, pCtx)
} else {
- Xsqlite3_result_error(tls, pCtx, __ccgo_ts+25173, -int32(1))
+ Xsqlite3_result_error(tls, pCtx, __ccgo_ts+25228, -int32(1))
}
}
_jsonParseReset(tls, pParse)
@@ -171835,10 +172205,6 @@ func _jsonbPayloadSize(tls *libc.TLS, pParse uintptr, i Tu32, pSz uintptr) (r Tu
var n, sz Tu32
var x Tu8
_, _, _ = n, sz, x
- if i > (*TJsonParse)(unsafe.Pointer(pParse)).FnBlob {
- *(*Tu32)(unsafe.Pointer(pSz)) = uint32(0)
- return uint32(0)
- }
x = libc.Uint8FromInt32(libc.Int32FromUint8(*(*Tu8)(unsafe.Pointer((*TJsonParse)(unsafe.Pointer(pParse)).FaBlob + uintptr(i)))) >> int32(4))
if libc.Int32FromUint8(x) <= int32(11) {
sz = uint32(x)
@@ -171872,15 +172238,15 @@ func _jsonbPayloadSize(tls *libc.TLS, pParse uintptr, i Tu32, pSz uintptr) (r Tu
*(*Tu32)(unsafe.Pointer(pSz)) = uint32(0)
return uint32(0)
}
- sz = libc.Uint32FromInt32(libc.Int32FromUint8(*(*Tu8)(unsafe.Pointer((*TJsonParse)(unsafe.Pointer(pParse)).FaBlob + uintptr(i+uint32(5)))))<<int32(24) + libc.Int32FromUint8(*(*Tu8)(unsafe.Pointer((*TJsonParse)(unsafe.Pointer(pParse)).FaBlob + uintptr(i+uint32(6)))))<<int32(16) + libc.Int32FromUint8(*(*Tu8)(unsafe.Pointer((*TJsonParse)(unsafe.Pointer(pParse)).FaBlob + uintptr(i+uint32(7)))))<<int32(8) + libc.Int32FromUint8(*(*Tu8)(unsafe.Pointer((*TJsonParse)(unsafe.Pointer(pParse)).FaBlob + uintptr(i+uint32(8))))))
+ sz = uint32(*(*Tu8)(unsafe.Pointer((*TJsonParse)(unsafe.Pointer(pParse)).FaBlob + uintptr(i+uint32(5)))))<<libc.Int32FromInt32(24) + libc.Uint32FromInt32(libc.Int32FromUint8(*(*Tu8)(unsafe.Pointer((*TJsonParse)(unsafe.Pointer(pParse)).FaBlob + uintptr(i+uint32(6)))))<<libc.Int32FromInt32(16)) + libc.Uint32FromInt32(libc.Int32FromUint8(*(*Tu8)(unsafe.Pointer((*TJsonParse)(unsafe.Pointer(pParse)).FaBlob + uintptr(i+uint32(7)))))<<libc.Int32FromInt32(8)) + uint32(*(*Tu8)(unsafe.Pointer((*TJsonParse)(unsafe.Pointer(pParse)).FaBlob + uintptr(i+uint32(8)))))
n = uint32(9)
}
}
}
}
if libc.Int64FromUint32(i)+libc.Int64FromUint32(sz)+libc.Int64FromUint32(n) > libc.Int64FromUint32((*TJsonParse)(unsafe.Pointer(pParse)).FnBlob) && libc.Int64FromUint32(i)+libc.Int64FromUint32(sz)+libc.Int64FromUint32(n) > libc.Int64FromUint32((*TJsonParse)(unsafe.Pointer(pParse)).FnBlob-libc.Uint32FromInt32((*TJsonParse)(unsafe.Pointer(pParse)).Fdelta)) {
- sz = uint32(0)
- n = uint32(0)
+ *(*Tu32)(unsafe.Pointer(pSz)) = uint32(0)
+ return uint32(0)
}
*(*Tu32)(unsafe.Pointer(pSz)) = sz
return n
@@ -171953,11 +172319,11 @@ _2:
return i + uint32(1)
_3:
;
- _jsonAppendRawNZ(tls, pOut, __ccgo_ts+8077, uint32(4))
+ _jsonAppendRawNZ(tls, pOut, __ccgo_ts+8102, uint32(4))
return i + uint32(1)
_4:
;
- _jsonAppendRawNZ(tls, pOut, __ccgo_ts+8082, uint32(5))
+ _jsonAppendRawNZ(tls, pOut, __ccgo_ts+8107, uint32(5))
return i + uint32(1)
_6:
;
@@ -172006,9 +172372,9 @@ _7:
k++
}
if bOverflow != 0 {
- v19 = __ccgo_ts + 25192
+ v19 = __ccgo_ts + 25247
} else {
- v19 = __ccgo_ts + 11944
+ v19 = __ccgo_ts + 11969
}
_jsonPrintf(tls, int32(100), pOut, v19, libc.VaList(bp+16, u))
goto _16
@@ -172044,9 +172410,12 @@ _10:
;
_9:
;
- _jsonAppendChar(tls, pOut, int8('"'))
- _jsonAppendRaw(tls, pOut, (*TJsonParse)(unsafe.Pointer(pParse)).FaBlob+uintptr(i+n), *(*Tu32)(unsafe.Pointer(bp)))
- _jsonAppendChar(tls, pOut, int8('"'))
+ if (*TJsonString)(unsafe.Pointer(pOut)).FnUsed+uint64(*(*Tu32)(unsafe.Pointer(bp)))+uint64(2) <= (*TJsonString)(unsafe.Pointer(pOut)).FnAlloc || _jsonStringGrow(tls, pOut, *(*Tu32)(unsafe.Pointer(bp))+uint32(2)) == 0 {
+ *(*int8)(unsafe.Pointer((*TJsonString)(unsafe.Pointer(pOut)).FzBuf + uintptr((*TJsonString)(unsafe.Pointer(pOut)).FnUsed))) = int8('"')
+ libc.Xmemcpy(tls, (*TJsonString)(unsafe.Pointer(pOut)).FzBuf+uintptr((*TJsonString)(unsafe.Pointer(pOut)).FnUsed)+uintptr(1), (*TJsonParse)(unsafe.Pointer(pParse)).FaBlob+uintptr(i+n), *(*Tu32)(unsafe.Pointer(bp)))
+ *(*int8)(unsafe.Pointer((*TJsonString)(unsafe.Pointer(pOut)).FzBuf + uintptr((*TJsonString)(unsafe.Pointer(pOut)).FnUsed+uint64(*(*Tu32)(unsafe.Pointer(bp)))+uint64(1)))) = int8('"')
+ *(*Tu64)(unsafe.Pointer(pOut + 16)) += uint64(*(*Tu32)(unsafe.Pointer(bp)) + uint32(2))
+ }
goto _16
_11:
;
@@ -172073,7 +172442,7 @@ _11:
sz2 -= k2
}
if int32(*(*int8)(unsafe.Pointer(zIn2))) == int32('"') {
- _jsonAppendRawNZ(tls, pOut, __ccgo_ts+25290, uint32(2))
+ _jsonAppendRawNZ(tls, pOut, __ccgo_ts+25345, uint32(2))
zIn2++
sz2--
continue
@@ -172096,7 +172465,7 @@ _11:
case int32('\''):
_jsonAppendChar(tls, pOut, int8('\''))
case int32('v'):
- _jsonAppendRawNZ(tls, pOut, __ccgo_ts+25293, uint32(6))
+ _jsonAppendRawNZ(tls, pOut, __ccgo_ts+25348, uint32(6))
case int32('x'):
if sz2 < uint32(4) {
p23 = pOut + 25
@@ -172104,12 +172473,12 @@ _11:
sz2 = uint32(2)
break
}
- _jsonAppendRawNZ(tls, pOut, __ccgo_ts+25300, uint32(4))
+ _jsonAppendRawNZ(tls, pOut, __ccgo_ts+25355, uint32(4))
_jsonAppendRawNZ(tls, pOut, zIn2+2, uint32(2))
zIn2 += uintptr(2)
sz2 -= uint32(2)
case int32('0'):
- _jsonAppendRawNZ(tls, pOut, __ccgo_ts+25305, uint32(6))
+ _jsonAppendRawNZ(tls, pOut, __ccgo_ts+25360, uint32(6))
case int32('\r'):
if sz2 > uint32(2) && int32(*(*int8)(unsafe.Pointer(zIn2 + 2))) == int32('\n') {
zIn2++
@@ -172289,7 +172658,7 @@ func _jsonTranslateBlobToPrettyText(tls *libc.TLS, pPretty uintptr, i Tu32) (r T
if j >= iEnd {
break
}
- _jsonAppendRawNZ(tls, pOut, __ccgo_ts+25312, uint32(2))
+ _jsonAppendRawNZ(tls, pOut, __ccgo_ts+25367, uint32(2))
}
_jsonAppendChar(tls, pOut, int8('\n'))
(*TJsonPretty)(unsafe.Pointer(pPretty)).FnIndent--
@@ -172312,12 +172681,12 @@ func _jsonTranslateBlobToPrettyText(tls *libc.TLS, pPretty uintptr, i Tu32) (r T
*(*Tu8)(unsafe.Pointer(p2)) = Tu8(int32(*(*Tu8)(unsafe.Pointer(p2))) | libc.Int32FromInt32(JSTRING_MALFORMED))
break
}
- _jsonAppendRawNZ(tls, pOut, __ccgo_ts+25315, uint32(2))
+ _jsonAppendRawNZ(tls, pOut, __ccgo_ts+25370, uint32(2))
j = _jsonTranslateBlobToPrettyText(tls, pPretty, j)
if j >= iEnd {
break
}
- _jsonAppendRawNZ(tls, pOut, __ccgo_ts+25312, uint32(2))
+ _jsonAppendRawNZ(tls, pOut, __ccgo_ts+25367, uint32(2))
}
_jsonAppendChar(tls, pOut, int8('\n'))
(*TJsonPretty)(unsafe.Pointer(pPretty)).FnIndent--
@@ -172334,50 +172703,6 @@ func _jsonTranslateBlobToPrettyText(tls *libc.TLS, pPretty uintptr, i Tu32) (r T
// C documentation
//
-// /* Return true if the input pJson
-// **
-// ** For performance reasons, this routine does not do a detailed check of the
-// ** input BLOB to ensure that it is well-formed. Hence, false positives are
-// ** possible. False negatives should never occur, however.
-// */
-func _jsonFuncArgMightBeBinary(tls *libc.TLS, pJson uintptr) (r int32) {
- bp := tls.Alloc(64)
- defer tls.Free(64)
- var aBlob uintptr
- var n Tu32
- var nBlob int32
- var _ /* s at bp+4 */ TJsonParse
- var _ /* sz at bp+0 */ Tu32
- _, _, _ = aBlob, n, nBlob
- if Xsqlite3_value_type(tls, pJson) != int32(SQLITE_BLOB) {
- return 0
- }
- aBlob = Xsqlite3_value_blob(tls, pJson)
- nBlob = Xsqlite3_value_bytes(tls, pJson)
- if nBlob < int32(1) {
- return 0
- }
- if aBlob == uintptr(0) || libc.Int32FromUint8(*(*Tu8)(unsafe.Pointer(aBlob)))&int32(0x0f) > int32(JSONB_OBJECT) {
- return 0
- }
- libc.Xmemset(tls, bp+4, 0, uint32(56))
- (*(*TJsonParse)(unsafe.Pointer(bp + 4))).FaBlob = aBlob
- (*(*TJsonParse)(unsafe.Pointer(bp + 4))).FnBlob = libc.Uint32FromInt32(nBlob)
- n = _jsonbPayloadSize(tls, bp+4, uint32(0), bp)
- if n == uint32(0) {
- return 0
- }
- if *(*Tu32)(unsafe.Pointer(bp))+n != libc.Uint32FromInt32(nBlob) {
- return 0
- }
- if libc.Int32FromUint8(*(*Tu8)(unsafe.Pointer(aBlob)))&int32(0x0f) <= int32(JSONB_FALSE) && *(*Tu32)(unsafe.Pointer(bp)) > uint32(0) {
- return 0
- }
- return libc.BoolInt32(*(*Tu32)(unsafe.Pointer(bp))+n == libc.Uint32FromInt32(nBlob))
-}
-
-// C documentation
-//
// /*
// ** Given that a JSONB_ARRAY object starts at offset i, return
// ** the number of entries in that array.
@@ -172430,6 +172755,84 @@ func _jsonAfterEditSizeAdjust(tls *libc.TLS, pParse uintptr, iRoot Tu32) {
// C documentation
//
// /*
+// ** If the JSONB at aIns[0..nIns-1] can be expanded (by denormalizing the
+// ** size field) by d bytes, then write the expansion into aOut[] and
+// ** return true. In this way, an overwrite happens without changing the
+// ** size of the JSONB, which reduces memcpy() operations and also make it
+// ** faster and easier to update the B-Tree entry that contains the JSONB
+// ** in the database.
+// **
+// ** If the expansion of aIns[] by d bytes cannot be (easily) accomplished
+// ** then return false.
+// **
+// ** The d parameter is guaranteed to be between 1 and 8.
+// **
+// ** This routine is an optimization. A correct answer is obtained if it
+// ** always leaves the output unchanged and returns false.
+// */
+func _jsonBlobOverwrite(tls *libc.TLS, aOut uintptr, aIns uintptr, nIns Tu32, d Tu32) (r int32) {
+ var i, szPayload Tu32
+ var szHdr Tu8
+ _, _, _ = i, szHdr, szPayload /* Size of header before expansion */
+ if libc.Int32FromUint8(*(*Tu8)(unsafe.Pointer(aIns)))&int32(0x0f) <= int32(2) {
+ return 0
+ } /* Cannot enlarge NULL, true, false */
+ switch libc.Int32FromUint8(*(*Tu8)(unsafe.Pointer(aIns))) >> libc.Int32FromInt32(4) {
+ default: /* aIns[] header size 1 */
+ if int32(1)<<d&int32(0x116) == 0 {
+ return 0
+ } /* d must be 1, 2, 4, or 8 */
+ i = d + uint32(1) /* New hdr sz: 2, 3, 5, or 9 */
+ szHdr = uint8(1)
+ case int32(12): /* aIns[] header size is 2 */
+ if int32(1)<<d&int32(0x8a) == 0 {
+ return 0
+ } /* d must be 1, 3, or 7 */
+ i = d + uint32(2) /* New hdr sz: 2, 5, or 9 */
+ szHdr = uint8(2)
+ case int32(13): /* aIns[] header size is 3 */
+ if d != uint32(2) && d != uint32(6) {
+ return 0
+ } /* d must be 2 or 6 */
+ i = d + uint32(3) /* New hdr sz: 5 or 9 */
+ szHdr = uint8(3)
+ case int32(14): /* aIns[] header size is 5 */
+ if d != uint32(4) {
+ return 0
+ } /* d must be 4 */
+ i = uint32(9) /* New hdr sz: 9 */
+ szHdr = uint8(5)
+ case int32(15): /* aIns[] header size is 9 */
+ return 0 /* No solution */
+ }
+ *(*Tu8)(unsafe.Pointer(aOut)) = libc.Uint8FromInt32(libc.Int32FromUint8(*(*Tu8)(unsafe.Pointer(aIns)))&int32(0x0f) | libc.Int32FromUint8(_aType1[i-uint32(2)]))
+ libc.Xmemcpy(tls, aOut+uintptr(i), aIns+uintptr(szHdr), nIns-uint32(szHdr))
+ szPayload = nIns - uint32(szHdr)
+ for int32(1) != 0 {
+ i--
+ *(*Tu8)(unsafe.Pointer(aOut + uintptr(i))) = uint8(szPayload & uint32(0xff))
+ if i == uint32(1) {
+ break
+ }
+ szPayload >>= uint32(8)
+ }
+ return int32(1)
+}
+
+/* Lookup table for finding the upper 4 bits of the first byte of the
+ ** expanded aIns[], based on the size of the expanded aIns[] header:
+ **
+ ** 2 3 4 5 6 7 8 9 */
+var _aType1 = [8]Tu8{
+ 0: uint8(0xc0),
+ 1: uint8(0xd0),
+ 3: uint8(0xe0),
+ 7: uint8(0xf0),
+}
+
+// C documentation
+//
+// /*
// ** Modify the JSONB blob at pParse->aBlob by removing nDel bytes of
// ** content beginning at iDel, and replacing them with nIns bytes of
// ** content given by aIns.
@@ -172447,6 +172850,9 @@ func _jsonBlobEdit(tls *libc.TLS, pParse uintptr, iDel Tu32, nDel Tu32, aIns uin
var p1, p2 uintptr
_, _, _ = d, p1, p2
d = libc.Int64FromUint32(nIns) - libc.Int64FromUint32(nDel)
+ if d < 0 && d >= int64(-libc.Int32FromInt32(8)) && aIns != uintptr(0) && _jsonBlobOverwrite(tls, (*TJsonParse)(unsafe.Pointer(pParse)).FaBlob+uintptr(iDel), aIns, nIns, libc.Uint32FromInt32(int32(-d))) != 0 {
+ return
+ }
if d != 0 {
if libc.Int64FromUint32((*TJsonParse)(unsafe.Pointer(pParse)).FnBlob)+d > libc.Int64FromUint32((*TJsonParse)(unsafe.Pointer(pParse)).FnBlobAlloc) {
_jsonBlobExpand(tls, pParse, libc.Uint32FromInt64(libc.Int64FromUint32((*TJsonParse)(unsafe.Pointer(pParse)).FnBlob)+d))
@@ -172519,9 +172925,9 @@ func _jsonBytesToBypass(tls *libc.TLS, z uintptr, n Tu32) (r Tu32) {
// */
func _jsonUnescapeOneChar(tls *libc.TLS, z uintptr, n Tu32, piOut uintptr) (r Tu32) {
var nSkip, v, vlo, v1 Tu32
- var sz int32
+ var sz, v3 int32
var v2 bool
- _, _, _, _, _, _ = nSkip, sz, v, vlo, v1, v2
+ _, _, _, _, _, _, _ = nSkip, sz, v, vlo, v1, v2, v3
if n < uint32(2) {
*(*Tu32)(unsafe.Pointer(piOut)) = uint32(JSON_INVALID_CHAR)
return n
@@ -172564,7 +172970,18 @@ func _jsonUnescapeOneChar(tls *libc.TLS, z uintptr, n Tu32, piOut uintptr) (r Tu
*(*Tu32)(unsafe.Pointer(piOut)) = uint32('\v')
return uint32(2)
case int32('0'):
- *(*Tu32)(unsafe.Pointer(piOut)) = uint32(0)
+ /* JSON5 requires that the \0 escape not be followed by a digit.
+ ** But SQLite did not enforce this restriction in versions 3.42.0
+ ** through 3.49.2. That was a bug. But some applications might have
+ ** come to depend on that bug. Use the SQLITE_BUG_COMPATIBLE_20250510
+ ** option to restore the old buggy behavior. */
+ /* Correct behavior */
+ if n > uint32(2) && libc.Int32FromUint8(_sqlite3CtypeMap[libc.Uint8FromInt8(*(*int8)(unsafe.Pointer(z + 2)))])&int32(0x04) != 0 {
+ v3 = int32(JSON_INVALID_CHAR)
+ } else {
+ v3 = 0
+ }
+ *(*Tu32)(unsafe.Pointer(piOut)) = libc.Uint32FromInt32(v3)
return uint32(2)
case int32('\''):
fallthrough
@@ -173052,7 +173469,7 @@ func _jsonReturnFromBlob(tls *libc.TLS, pParse uintptr, i Tu32, pCtx uintptr, te
db = Xsqlite3_context_db_handle(tls, pCtx)
n = _jsonbPayloadSize(tls, pParse, i, bp)
if n == uint32(0) {
- Xsqlite3_result_error(tls, pCtx, __ccgo_ts+25173, -int32(1))
+ Xsqlite3_result_error(tls, pCtx, __ccgo_ts+25228, -int32(1))
return
}
switch libc.Int32FromUint8(*(*Tu8)(unsafe.Pointer((*TJsonParse)(unsafe.Pointer(pParse)).FaBlob + uintptr(i)))) & libc.Int32FromInt32(0x0f) {
@@ -173187,7 +173604,7 @@ _10:
;
nOut = *(*Tu32)(unsafe.Pointer(bp))
z2 = (*TJsonParse)(unsafe.Pointer(pParse)).FaBlob + uintptr(i+n)
- zOut = _sqlite3DbMallocRaw(tls, db, uint64(nOut+uint32(1)))
+ zOut = _sqlite3DbMallocRaw(tls, db, uint64(nOut)+uint64(1))
if zOut == uintptr(0) {
goto returnfromblob_oom
}
@@ -173288,7 +173705,7 @@ returnfromblob_oom:
goto returnfromblob_malformed
returnfromblob_malformed:
;
- Xsqlite3_result_error(tls, pCtx, __ccgo_ts+25173, -int32(1))
+ Xsqlite3_result_error(tls, pCtx, __ccgo_ts+25228, -int32(1))
return
}
@@ -173325,11 +173742,8 @@ func _jsonFunctionArgToBlob(tls *libc.TLS, ctx uintptr, pArg uintptr, pParse uin
(*TJsonParse)(unsafe.Pointer(pParse)).FnBlob = uint32(1)
return 0
case int32(SQLITE_BLOB):
- if _jsonFuncArgMightBeBinary(tls, pArg) != 0 {
- (*TJsonParse)(unsafe.Pointer(pParse)).FaBlob = Xsqlite3_value_blob(tls, pArg)
- (*TJsonParse)(unsafe.Pointer(pParse)).FnBlob = libc.Uint32FromInt32(Xsqlite3_value_bytes(tls, pArg))
- } else {
- Xsqlite3_result_error(tls, ctx, __ccgo_ts+25144, -int32(1))
+ if !(_jsonArgIsJsonb(tls, pArg, pParse) != 0) {
+ Xsqlite3_result_error(tls, ctx, __ccgo_ts+25199, -int32(1))
return int32(1)
}
case int32(SQLITE_TEXT):
@@ -173342,7 +173756,7 @@ func _jsonFunctionArgToBlob(tls *libc.TLS, ctx uintptr, pArg uintptr, pParse uin
(*TJsonParse)(unsafe.Pointer(pParse)).FzJson = zJson
(*TJsonParse)(unsafe.Pointer(pParse)).FnJson = nJson
if _jsonConvertTextToBlob(tls, pParse, ctx) != 0 {
- Xsqlite3_result_error(tls, ctx, __ccgo_ts+25173, -int32(1))
+ Xsqlite3_result_error(tls, ctx, __ccgo_ts+25228, -int32(1))
_sqlite3DbFree(tls, (*TJsonParse)(unsafe.Pointer(pParse)).Fdb, (*TJsonParse)(unsafe.Pointer(pParse)).FaBlob)
libc.Xmemset(tls, pParse, 0, uint32(56))
return int32(1)
@@ -173361,10 +173775,10 @@ func _jsonFunctionArgToBlob(tls *libc.TLS, ctx uintptr, pArg uintptr, pParse uin
return int32(1)
}
if int32(*(*int8)(unsafe.Pointer(z))) == int32('I') {
- _jsonBlobAppendNode(tls, pParse, uint8(JSONB_FLOAT), uint32(5), __ccgo_ts+25278)
+ _jsonBlobAppendNode(tls, pParse, uint8(JSONB_FLOAT), uint32(5), __ccgo_ts+25333)
} else {
if int32(*(*int8)(unsafe.Pointer(z))) == int32('-') && int32(*(*int8)(unsafe.Pointer(z + 1))) == int32('I') {
- _jsonBlobAppendNode(tls, pParse, uint8(JSONB_FLOAT), uint32(6), __ccgo_ts+25271)
+ _jsonBlobAppendNode(tls, pParse, uint8(JSONB_FLOAT), uint32(6), __ccgo_ts+25326)
} else {
_jsonBlobAppendNode(tls, pParse, uint8(JSONB_FLOAT), libc.Uint32FromInt32(n), z)
}
@@ -173403,7 +173817,7 @@ func _jsonBadPathError(tls *libc.TLS, ctx uintptr, zPath uintptr) (r uintptr) {
defer tls.Free(16)
var zMsg uintptr
_ = zMsg
- zMsg = Xsqlite3_mprintf(tls, __ccgo_ts+25318, libc.VaList(bp+8, zPath))
+ zMsg = Xsqlite3_mprintf(tls, __ccgo_ts+25373, libc.VaList(bp+8, zPath))
if ctx == uintptr(0) {
return zMsg
}
@@ -173419,7 +173833,7 @@ func _jsonBadPathError(tls *libc.TLS, ctx uintptr, zPath uintptr) (r uintptr) {
// C documentation
//
// /* argv[0] is a BLOB that seems likely to be a JSONB. Subsequent
-// ** arguments come in parse where each pair contains a JSON path and
+// ** arguments come in pairs where each pair contains a JSON path and
// ** content to insert or set at that patch. Do the updates
// ** and return the result.
// **
@@ -173500,7 +173914,7 @@ jsonInsertIntoBlob_patherror:
;
_jsonParseFree(tls, p)
if rc == uint32(JSON_LOOKUP_ERROR) {
- Xsqlite3_result_error(tls, ctx, __ccgo_ts+25173, -int32(1))
+ Xsqlite3_result_error(tls, ctx, __ccgo_ts+25228, -int32(1))
} else {
_jsonBadPathError(tls, ctx, zPath)
}
@@ -173512,34 +173926,54 @@ jsonInsertIntoBlob_patherror:
// /*
// ** If pArg is a blob that seems like a JSONB blob, then initialize
// ** p to point to that JSONB and return TRUE. If pArg does not seem like
-// ** a JSONB blob, then return FALSE;
-// **
-// ** This routine is only called if it is already known that pArg is a
-// ** blob. The only open question is whether or not the blob appears
-// ** to be a JSONB blob.
+// ** a JSONB blob, then return FALSE.
+// **
+// ** For small BLOBs (having no more than 7 bytes of payload) a full
+// ** validity check is done. So for small BLOBs this routine only returns
+// ** true if the value is guaranteed to be a valid JSONB. For larger BLOBs
+// ** (8 byte or more of payload) only the size of the outermost element is
+// ** checked to verify that the BLOB is superficially valid JSONB.
+// **
+// ** A full JSONB validation is done on smaller BLOBs because those BLOBs might
+// ** also be text JSON that has been incorrectly cast into a BLOB.
+// ** (See tag-20240123-a and https://sqlite.org/forum/forumpost/012136abd5)
+// ** If the BLOB is 9 bytes are larger, then it is not possible for the
+// ** superficial size check done here to pass if the input is really text
+// ** JSON so we do not need to look deeper in that case.
+// **
+// ** Why we only need to do full JSONB validation for smaller BLOBs:
+// **
+// ** The first byte of valid JSON text must be one of: '{', '[', '"', ' ', '\n',
+// ** '\r', '\t', '-', or a digit '0' through '9'. Of these, only a subset
+// ** can also be the first byte of JSONB: '{', '[', and digits '3'
+// ** through '9'. In every one of those cases, the payload size is 7 bytes
+// ** or less. So if we do full JSONB validation for every BLOB where the
+// ** payload is less than 7 bytes, we will never get a false positive for
+// ** JSONB on an input that is really text JSON.
// */
func _jsonArgIsJsonb(tls *libc.TLS, pArg uintptr, p uintptr) (r int32) {
bp := tls.Alloc(16)
defer tls.Free(16)
- var n, v1 Tu32
- var v2 bool
+ var c, v1 Tu8
+ var n, v3 Tu32
+ var v2, v4 bool
var _ /* sz at bp+0 */ Tu32
- _, _, _ = n, v1, v2
+ _, _, _, _, _, _ = c, n, v1, v2, v3, v4
*(*Tu32)(unsafe.Pointer(bp)) = uint32(0)
- (*TJsonParse)(unsafe.Pointer(p)).FaBlob = Xsqlite3_value_blob(tls, pArg)
- (*TJsonParse)(unsafe.Pointer(p)).FnBlob = libc.Uint32FromInt32(Xsqlite3_value_bytes(tls, pArg))
- if (*TJsonParse)(unsafe.Pointer(p)).FnBlob == uint32(0) {
- (*TJsonParse)(unsafe.Pointer(p)).FaBlob = uintptr(0)
+ if Xsqlite3_value_type(tls, pArg) != int32(SQLITE_BLOB) {
return 0
}
- if (*TJsonParse)(unsafe.Pointer(p)).FaBlob == uintptr(0) {
- return 0
+ (*TJsonParse)(unsafe.Pointer(p)).FaBlob = Xsqlite3_value_blob(tls, pArg)
+ (*TJsonParse)(unsafe.Pointer(p)).FnBlob = libc.Uint32FromInt32(Xsqlite3_value_bytes(tls, pArg))
+ if v2 = (*TJsonParse)(unsafe.Pointer(p)).FnBlob > uint32(0) && (*TJsonParse)(unsafe.Pointer(p)).FaBlob != uintptr(0); v2 {
+ v1 = *(*Tu8)(unsafe.Pointer((*TJsonParse)(unsafe.Pointer(p)).FaBlob))
+ c = v1
}
- if v2 = libc.Int32FromUint8(*(*Tu8)(unsafe.Pointer((*TJsonParse)(unsafe.Pointer(p)).FaBlob)))&int32(0x0f) <= int32(JSONB_OBJECT); v2 {
- v1 = _jsonbPayloadSize(tls, p, uint32(0), bp)
- n = v1
+ if v4 = v2 && libc.Int32FromUint8(v1)&int32(0x0f) <= int32(JSONB_OBJECT); v4 {
+ v3 = _jsonbPayloadSize(tls, p, uint32(0), bp)
+ n = v3
}
- if v2 && v1 > uint32(0) && *(*Tu32)(unsafe.Pointer(bp))+n == (*TJsonParse)(unsafe.Pointer(p)).FnBlob && (libc.Int32FromUint8(*(*Tu8)(unsafe.Pointer((*TJsonParse)(unsafe.Pointer(p)).FaBlob)))&int32(0x0f) > int32(JSONB_FALSE) || *(*Tu32)(unsafe.Pointer(bp)) == uint32(0)) {
+ if v4 && v3 > uint32(0) && *(*Tu32)(unsafe.Pointer(bp))+n == (*TJsonParse)(unsafe.Pointer(p)).FnBlob && (libc.Int32FromUint8(c)&int32(0x0f) > int32(JSONB_FALSE) || *(*Tu32)(unsafe.Pointer(bp)) == uint32(0)) && (*(*Tu32)(unsafe.Pointer(bp)) > uint32(7) || libc.Int32FromUint8(c) != int32(0x7b) && libc.Int32FromUint8(c) != int32(0x5b) && !(libc.Int32FromUint8(_sqlite3CtypeMap[c])&libc.Int32FromInt32(0x04) != 0) || _jsonbValidityCheck(tls, p, uint32(0), (*TJsonParse)(unsafe.Pointer(p)).FnBlob, uint32(1)) == uint32(0)) {
return int32(1)
}
(*TJsonParse)(unsafe.Pointer(p)).FaBlob = uintptr(0)
@@ -173622,7 +174056,7 @@ rebuild_from_cache:
** JSON functions were suppose to work. From the beginning, blob was
** reserved for expansion and a blob value should have raised an error.
** But it did not, due to a bug. And many applications came to depend
- ** upon this buggy behavior, espeically when using the CLI and reading
+ ** upon this buggy behavior, especially when using the CLI and reading
** JSON text using readfile(), which returns a blob. For this reason
** we will continue to support the bug moving forward.
** See for example https://sqlite.org/forum/forumpost/012136abd5292b8d
@@ -173682,7 +174116,7 @@ json_pfa_malformed:
return p
} else {
_jsonParseFree(tls, p)
- Xsqlite3_result_error(tls, ctx, __ccgo_ts+25173, -int32(1))
+ Xsqlite3_result_error(tls, ctx, __ccgo_ts+25228, -int32(1))
return uintptr(0)
}
goto json_pfa_oom
@@ -173817,7 +174251,7 @@ func _jsonArrayLengthFunc(tls *libc.TLS, ctx uintptr, argc int32, argv uintptr)
if int32(*(*int8)(unsafe.Pointer(zPath))) == int32('$') {
v1 = zPath + uintptr(1)
} else {
- v1 = __ccgo_ts + 25336
+ v1 = __ccgo_ts + 25391
}
i = _jsonLookupStep(tls, p, uint32(0), v1, uint32(0))
if i >= uint32(JSON_LOOKUP_PATHERROR) {
@@ -173827,7 +174261,7 @@ func _jsonArrayLengthFunc(tls *libc.TLS, ctx uintptr, argc int32, argv uintptr)
if i == uint32(JSON_LOOKUP_PATHERROR) {
_jsonBadPathError(tls, ctx, zPath)
} else {
- Xsqlite3_result_error(tls, ctx, __ccgo_ts+25173, -int32(1))
+ Xsqlite3_result_error(tls, ctx, __ccgo_ts+25228, -int32(1))
}
}
eErr = uint8(1)
@@ -173937,23 +174371,23 @@ func _jsonExtractFunc(tls *libc.TLS, ctx uintptr, argc int32, argv uintptr) {
*/
_jsonStringInit(tls, bp, ctx)
if Xsqlite3_value_type(tls, *(*uintptr)(unsafe.Pointer(argv + uintptr(i)*4))) == int32(SQLITE_INTEGER) {
- _jsonAppendRawNZ(tls, bp, __ccgo_ts+25338, uint32(1))
+ _jsonAppendRawNZ(tls, bp, __ccgo_ts+25393, uint32(1))
if int32(*(*int8)(unsafe.Pointer(zPath))) == int32('-') {
- _jsonAppendRawNZ(tls, bp, __ccgo_ts+25340, uint32(1))
+ _jsonAppendRawNZ(tls, bp, __ccgo_ts+25395, uint32(1))
}
_jsonAppendRaw(tls, bp, zPath, libc.Uint32FromInt32(nPath))
- _jsonAppendRawNZ(tls, bp, __ccgo_ts+5230, uint32(2))
+ _jsonAppendRawNZ(tls, bp, __ccgo_ts+5256, uint32(2))
} else {
if _jsonAllAlphanum(tls, zPath, nPath) != 0 {
- _jsonAppendRawNZ(tls, bp, __ccgo_ts+1680, uint32(1))
+ _jsonAppendRawNZ(tls, bp, __ccgo_ts+1706, uint32(1))
_jsonAppendRaw(tls, bp, zPath, libc.Uint32FromInt32(nPath))
} else {
if int32(*(*int8)(unsafe.Pointer(zPath))) == int32('[') && nPath >= int32(3) && int32(*(*int8)(unsafe.Pointer(zPath + uintptr(nPath-int32(1))))) == int32(']') {
_jsonAppendRaw(tls, bp, zPath, libc.Uint32FromInt32(nPath))
} else {
- _jsonAppendRawNZ(tls, bp, __ccgo_ts+25342, uint32(2))
+ _jsonAppendRawNZ(tls, bp, __ccgo_ts+25397, uint32(2))
_jsonAppendRaw(tls, bp, zPath, libc.Uint32FromInt32(nPath))
- _jsonAppendRawNZ(tls, bp, __ccgo_ts+25345, uint32(1))
+ _jsonAppendRawNZ(tls, bp, __ccgo_ts+25400, uint32(1))
}
}
}
@@ -173993,7 +174427,7 @@ func _jsonExtractFunc(tls *libc.TLS, ctx uintptr, argc int32, argv uintptr) {
}
} else {
if j == uint32(JSON_LOOKUP_ERROR) {
- Xsqlite3_result_error(tls, ctx, __ccgo_ts+25173, -int32(1))
+ Xsqlite3_result_error(tls, ctx, __ccgo_ts+25228, -int32(1))
goto json_extract_error
} else {
_jsonBadPathError(tls, ctx, zPath)
@@ -174261,7 +174695,7 @@ func _jsonPatchFunc(tls *libc.TLS, ctx uintptr, argc int32, argv uintptr) {
if rc == int32(JSON_MERGE_OOM) {
Xsqlite3_result_error_nomem(tls, ctx)
} else {
- Xsqlite3_result_error(tls, ctx, __ccgo_ts+25173, -int32(1))
+ Xsqlite3_result_error(tls, ctx, __ccgo_ts+25228, -int32(1))
}
}
_jsonParseFree(tls, pPatch)
@@ -174285,7 +174719,7 @@ func _jsonObjectFunc(tls *libc.TLS, ctx uintptr, argc int32, argv uintptr) {
var _ /* jx at bp+0 */ TJsonString
_, _, _ = i, n, z
if argc&int32(1) != 0 {
- Xsqlite3_result_error(tls, ctx, __ccgo_ts+25347, -int32(1))
+ Xsqlite3_result_error(tls, ctx, __ccgo_ts+25402, -int32(1))
return
}
_jsonStringInit(tls, bp, ctx)
@@ -174296,7 +174730,7 @@ func _jsonObjectFunc(tls *libc.TLS, ctx uintptr, argc int32, argv uintptr) {
break
}
if Xsqlite3_value_type(tls, *(*uintptr)(unsafe.Pointer(argv + uintptr(i)*4))) != int32(SQLITE_TEXT) {
- Xsqlite3_result_error(tls, ctx, __ccgo_ts+25398, -int32(1))
+ Xsqlite3_result_error(tls, ctx, __ccgo_ts+25453, -int32(1))
_jsonStringReset(tls, bp)
return
}
@@ -174368,7 +174802,7 @@ func _jsonRemoveFunc(tls *libc.TLS, ctx uintptr, argc int32, argv uintptr) {
if rc == uint32(JSON_LOOKUP_PATHERROR) {
_jsonBadPathError(tls, ctx, zPath)
} else {
- Xsqlite3_result_error(tls, ctx, __ccgo_ts+25173, -int32(1))
+ Xsqlite3_result_error(tls, ctx, __ccgo_ts+25228, -int32(1))
}
}
goto json_remove_done
@@ -174405,7 +174839,7 @@ func _jsonReplaceFunc(tls *libc.TLS, ctx uintptr, argc int32, argv uintptr) {
return
}
if argc&int32(1) == 0 {
- _jsonWrongNumArgs(tls, ctx, __ccgo_ts+15955)
+ _jsonWrongNumArgs(tls, ctx, __ccgo_ts+16027)
return
}
_jsonInsertIntoBlob(tls, ctx, argc, argv, int32(JEDIT_REPL))
@@ -174436,9 +174870,9 @@ func _jsonSetFunc(tls *libc.TLS, ctx uintptr, argc int32, argv uintptr) {
}
if argc&int32(1) == 0 {
if bIsSet != 0 {
- v1 = __ccgo_ts + 25432
+ v1 = __ccgo_ts + 25487
} else {
- v1 = __ccgo_ts + 25436
+ v1 = __ccgo_ts + 25491
}
_jsonWrongNumArgs(tls, ctx, v1)
return
@@ -174486,7 +174920,7 @@ func _jsonTypeFunc(tls *libc.TLS, ctx uintptr, argc int32, argv uintptr) {
if i == uint32(JSON_LOOKUP_PATHERROR) {
_jsonBadPathError(tls, ctx, zPath)
} else {
- Xsqlite3_result_error(tls, ctx, __ccgo_ts+25173, -int32(1))
+ Xsqlite3_result_error(tls, ctx, __ccgo_ts+25228, -int32(1))
}
}
goto json_type_done
@@ -174533,7 +174967,7 @@ func _jsonPrettyFunc(tls *libc.TLS, ctx uintptr, argc int32, argv uintptr) {
(*(*TJsonPretty)(unsafe.Pointer(bp + 128))).FzIndent = v1
}
if v2 || v1 == uintptr(0) {
- (*(*TJsonPretty)(unsafe.Pointer(bp + 128))).FzIndent = __ccgo_ts + 25443
+ (*(*TJsonPretty)(unsafe.Pointer(bp + 128))).FzIndent = __ccgo_ts + 25498
(*(*TJsonPretty)(unsafe.Pointer(bp + 128))).FszIndent = uint32(4)
} else {
(*(*TJsonPretty)(unsafe.Pointer(bp + 128))).FszIndent = libc.Xstrlen(tls, (*(*TJsonPretty)(unsafe.Pointer(bp + 128))).FzIndent)
@@ -174607,17 +175041,16 @@ func _jsonValidFunc(tls *libc.TLS, ctx uintptr, argc int32, argv uintptr) {
defer tls.Free(112)
var f Ti64
var flags, res Tu8
- var iErr Tu32
var p uintptr
- var _ /* px at bp+0 */ TJsonParse
var _ /* px at bp+56 */ TJsonParse
- _, _, _, _, _ = f, flags, iErr, p, res /* The parse */
+ var _ /* py at bp+0 */ TJsonParse
+ _, _, _, _ = f, flags, p, res /* The parse */
flags = uint8(1)
res = uint8(0)
if argc == int32(2) {
f = Xsqlite3_value_int64(tls, *(*uintptr)(unsafe.Pointer(argv + 1*4)))
if f < int64(1) || f > int64(15) {
- Xsqlite3_result_error(tls, ctx, __ccgo_ts+25448, -int32(1))
+ Xsqlite3_result_error(tls, ctx, __ccgo_ts+25503, -int32(1))
return
}
flags = libc.Uint8FromInt64(f & int64(0x0f))
@@ -174626,18 +175059,17 @@ func _jsonValidFunc(tls *libc.TLS, ctx uintptr, argc int32, argv uintptr) {
case int32(SQLITE_NULL):
return
case int32(SQLITE_BLOB):
- if _jsonFuncArgMightBeBinary(tls, *(*uintptr)(unsafe.Pointer(argv))) != 0 {
+ libc.Xmemset(tls, bp, 0, uint32(56))
+ if _jsonArgIsJsonb(tls, *(*uintptr)(unsafe.Pointer(argv)), bp) != 0 {
if libc.Int32FromUint8(flags)&int32(0x04) != 0 {
/* Superficial checking only - accomplished by the
- ** jsonFuncArgMightBeBinary() call above. */
+ ** jsonArgIsJsonb() call above. */
res = uint8(1)
} else {
if libc.Int32FromUint8(flags)&int32(0x08) != 0 {
- libc.Xmemset(tls, bp, 0, uint32(56))
- (*(*TJsonParse)(unsafe.Pointer(bp))).FaBlob = Xsqlite3_value_blob(tls, *(*uintptr)(unsafe.Pointer(argv)))
- (*(*TJsonParse)(unsafe.Pointer(bp))).FnBlob = libc.Uint32FromInt32(Xsqlite3_value_bytes(tls, *(*uintptr)(unsafe.Pointer(argv))))
- iErr = _jsonbValidityCheck(tls, bp, uint32(0), (*(*TJsonParse)(unsafe.Pointer(bp))).FnBlob, uint32(1))
- res = libc.BoolUint8(iErr == uint32(0))
+ /* Strict checking. Check by translating BLOB->TEXT->BLOB. If
+ ** no errors occur, call that a "strict check". */
+ res = libc.BoolUint8(uint32(0) == _jsonbValidityCheck(tls, bp, uint32(0), (*(*TJsonParse)(unsafe.Pointer(bp))).FnBlob, uint32(1)))
}
}
break
@@ -174699,9 +175131,7 @@ func _jsonErrorFunc(tls *libc.TLS, ctx uintptr, argc int32, argv uintptr) {
_ = argc
libc.Xmemset(tls, bp, 0, uint32(56))
(*(*TJsonParse)(unsafe.Pointer(bp))).Fdb = Xsqlite3_context_db_handle(tls, ctx)
- if _jsonFuncArgMightBeBinary(tls, *(*uintptr)(unsafe.Pointer(argv))) != 0 {
- (*(*TJsonParse)(unsafe.Pointer(bp))).FaBlob = Xsqlite3_value_blob(tls, *(*uintptr)(unsafe.Pointer(argv)))
- (*(*TJsonParse)(unsafe.Pointer(bp))).FnBlob = libc.Uint32FromInt32(Xsqlite3_value_bytes(tls, *(*uintptr)(unsafe.Pointer(argv))))
+ if _jsonArgIsJsonb(tls, *(*uintptr)(unsafe.Pointer(argv)), bp) != 0 {
iErrPos = libc.Int64FromUint32(_jsonbValidityCheck(tls, bp, uint32(0), (*(*TJsonParse)(unsafe.Pointer(bp))).FnBlob, uint32(1)))
} else {
(*(*TJsonParse)(unsafe.Pointer(bp))).FzJson = Xsqlite3_value_text(tls, *(*uintptr)(unsafe.Pointer(argv)))
@@ -174808,7 +175238,7 @@ func _jsonArrayCompute(tls *libc.TLS, ctx uintptr, isFinal int32) {
}
}
} else {
- Xsqlite3_result_text(tls, ctx, __ccgo_ts+25505, int32(2), libc.UintptrFromInt32(0))
+ Xsqlite3_result_text(tls, ctx, __ccgo_ts+25560, int32(2), libc.UintptrFromInt32(0))
}
Xsqlite3_result_subtype(tls, ctx, uint32(JSON_SUBTYPE))
}
@@ -174900,20 +175330,22 @@ func _jsonObjectStep(tls *libc.TLS, ctx uintptr, argc int32, argv uintptr) {
_ = argc
pStr = Xsqlite3_aggregate_context(tls, ctx, int32(128))
if pStr != 0 {
+ z = Xsqlite3_value_text(tls, *(*uintptr)(unsafe.Pointer(argv)))
+ n = libc.Uint32FromInt32(_sqlite3Strlen30(tls, z))
if (*TJsonString)(unsafe.Pointer(pStr)).FzBuf == uintptr(0) {
_jsonStringInit(tls, pStr, ctx)
_jsonAppendChar(tls, pStr, int8('{'))
} else {
- if (*TJsonString)(unsafe.Pointer(pStr)).FnUsed > uint64(1) {
+ if (*TJsonString)(unsafe.Pointer(pStr)).FnUsed > uint64(1) && z != uintptr(0) {
_jsonAppendChar(tls, pStr, int8(','))
}
}
(*TJsonString)(unsafe.Pointer(pStr)).FpCtx = ctx
- z = Xsqlite3_value_text(tls, *(*uintptr)(unsafe.Pointer(argv)))
- n = libc.Uint32FromInt32(_sqlite3Strlen30(tls, z))
- _jsonAppendString(tls, pStr, z, n)
- _jsonAppendChar(tls, pStr, int8(':'))
- _jsonAppendSqlValue(tls, pStr, *(*uintptr)(unsafe.Pointer(argv + 1*4)))
+ if z != uintptr(0) {
+ _jsonAppendString(tls, pStr, z, n)
+ _jsonAppendChar(tls, pStr, int8(':'))
+ _jsonAppendSqlValue(tls, pStr, *(*uintptr)(unsafe.Pointer(argv + 1*4)))
+ }
}
}
@@ -174957,7 +175389,7 @@ func _jsonObjectCompute(tls *libc.TLS, ctx uintptr, isFinal int32) {
}
}
} else {
- Xsqlite3_result_text(tls, ctx, __ccgo_ts+25508, int32(2), libc.UintptrFromInt32(0))
+ Xsqlite3_result_text(tls, ctx, __ccgo_ts+25563, int32(2), libc.UintptrFromInt32(0))
}
Xsqlite3_result_subtype(tls, ctx, uint32(JSON_SUBTYPE))
}
@@ -175060,7 +175492,7 @@ func _jsonEachConnect(tls *libc.TLS, db uintptr, pAux uintptr, argc int32, argv
_ = argv
_ = argc
_ = pAux
- rc = Xsqlite3_declare_vtab(tls, db, __ccgo_ts+25511)
+ rc = Xsqlite3_declare_vtab(tls, db, __ccgo_ts+25566)
if rc == SQLITE_OK {
pNew = _sqlite3DbMallocZero(tls, db, uint64(16))
*(*uintptr)(unsafe.Pointer(ppVtab)) = pNew
@@ -175194,7 +175626,7 @@ func _jsonAppendPathName(tls *libc.TLS, p uintptr) {
var _ /* sz at bp+0 */ Tu32
_, _, _, _, _ = i, k, n, needQuote, z
if libc.Int32FromUint8((*TJsonEachCursor)(unsafe.Pointer(p)).FeType) == int32(JSONB_ARRAY) {
- _jsonPrintf(tls, int32(30), p+40, __ccgo_ts+25594, libc.VaList(bp+16, (*(*TJsonParent)(unsafe.Pointer((*TJsonEachCursor)(unsafe.Pointer(p)).FaParent + uintptr((*TJsonEachCursor)(unsafe.Pointer(p)).FnParent-uint32(1))*24))).FiKey))
+ _jsonPrintf(tls, int32(30), p+40, __ccgo_ts+25649, libc.VaList(bp+16, (*(*TJsonParent)(unsafe.Pointer((*TJsonEachCursor)(unsafe.Pointer(p)).FaParent + uintptr((*TJsonEachCursor)(unsafe.Pointer(p)).FnParent-uint32(1))*24))).FiKey))
} else {
*(*Tu32)(unsafe.Pointer(bp)) = uint32(0)
needQuote = 0
@@ -175220,9 +175652,9 @@ func _jsonAppendPathName(tls *libc.TLS, p uintptr) {
}
}
if needQuote != 0 {
- _jsonPrintf(tls, libc.Int32FromUint32(*(*Tu32)(unsafe.Pointer(bp))+uint32(4)), p+40, __ccgo_ts+25601, libc.VaList(bp+16, *(*Tu32)(unsafe.Pointer(bp)), z))
+ _jsonPrintf(tls, libc.Int32FromUint32(*(*Tu32)(unsafe.Pointer(bp))+uint32(4)), p+40, __ccgo_ts+25656, libc.VaList(bp+16, *(*Tu32)(unsafe.Pointer(bp)), z))
} else {
- _jsonPrintf(tls, libc.Int32FromUint32(*(*Tu32)(unsafe.Pointer(bp))+uint32(2)), p+40, __ccgo_ts+25609, libc.VaList(bp+16, *(*Tu32)(unsafe.Pointer(bp)), z))
+ _jsonPrintf(tls, libc.Int32FromUint32(*(*Tu32)(unsafe.Pointer(bp))+uint32(2)), p+40, __ccgo_ts+25664, libc.VaList(bp+16, *(*Tu32)(unsafe.Pointer(bp)), z))
}
}
}
@@ -175533,9 +175965,8 @@ func _jsonEachFilter(tls *libc.TLS, cur uintptr, idxNum int32, idxStr uintptr, a
libc.Xmemset(tls, p+168, 0, uint32(56))
(*TJsonEachCursor)(unsafe.Pointer(p)).FsParse.FnJPRef = uint32(1)
(*TJsonEachCursor)(unsafe.Pointer(p)).FsParse.Fdb = (*TJsonEachCursor)(unsafe.Pointer(p)).Fdb
- if _jsonFuncArgMightBeBinary(tls, *(*uintptr)(unsafe.Pointer(argv))) != 0 {
- (*TJsonEachCursor)(unsafe.Pointer(p)).FsParse.FnBlob = libc.Uint32FromInt32(Xsqlite3_value_bytes(tls, *(*uintptr)(unsafe.Pointer(argv))))
- (*TJsonEachCursor)(unsafe.Pointer(p)).FsParse.FaBlob = Xsqlite3_value_blob(tls, *(*uintptr)(unsafe.Pointer(argv)))
+ if _jsonArgIsJsonb(tls, *(*uintptr)(unsafe.Pointer(argv)), p+168) != 0 {
+ /* We have JSONB */
} else {
(*TJsonEachCursor)(unsafe.Pointer(p)).FsParse.FzJson = Xsqlite3_value_text(tls, *(*uintptr)(unsafe.Pointer(argv)))
(*TJsonEachCursor)(unsafe.Pointer(p)).FsParse.FnJson = Xsqlite3_value_bytes(tls, *(*uintptr)(unsafe.Pointer(argv)))
@@ -175608,7 +176039,7 @@ func _jsonEachFilter(tls *libc.TLS, cur uintptr, idxNum int32, idxStr uintptr, a
i = v5
(*TJsonEachCursor)(unsafe.Pointer(p)).FeType = uint8(0)
(*TJsonEachCursor)(unsafe.Pointer(p)).FnRoot = uint32(1)
- _jsonAppendRaw(tls, p+40, __ccgo_ts+25615, uint32(1))
+ _jsonAppendRaw(tls, p+40, __ccgo_ts+25670, uint32(1))
}
(*TJsonEachCursor)(unsafe.Pointer(p)).FnParent = uint32(0)
n = _jsonbPayloadSize(tls, p+168, i, bp)
@@ -175632,7 +176063,7 @@ func _jsonEachFilter(tls *libc.TLS, cur uintptr, idxNum int32, idxStr uintptr, a
json_each_malformed_input:
;
Xsqlite3_free(tls, (*Tsqlite3_vtab)(unsafe.Pointer((*Tsqlite3_vtab_cursor)(unsafe.Pointer(cur)).FpVtab)).FzErrMsg)
- (*Tsqlite3_vtab)(unsafe.Pointer((*Tsqlite3_vtab_cursor)(unsafe.Pointer(cur)).FpVtab)).FzErrMsg = Xsqlite3_mprintf(tls, __ccgo_ts+25173, 0)
+ (*Tsqlite3_vtab)(unsafe.Pointer((*Tsqlite3_vtab_cursor)(unsafe.Pointer(cur)).FpVtab)).FzErrMsg = Xsqlite3_mprintf(tls, __ccgo_ts+25228, 0)
_jsonEachCursorReset(tls, p)
if (*Tsqlite3_vtab)(unsafe.Pointer((*Tsqlite3_vtab_cursor)(unsafe.Pointer(cur)).FpVtab)).FzErrMsg != 0 {
v6 = int32(SQLITE_ERROR)
@@ -175693,186 +176124,186 @@ var _aJsonFunc = [34]TFuncDef{
0: {
FnArg: int16(1),
FfuncFlags: libc.Uint32FromInt32(libc.Int32FromInt32(SQLITE_FUNC_BUILTIN) | libc.Int32FromInt32(SQLITE_DETERMINISTIC) | libc.Int32FromInt32(SQLITE_FUNC_CONSTANT) | libc.Int32FromInt32(SQLITE_UTF8) | libc.Int32FromInt32(1)*libc.Int32FromInt32(SQLITE_FUNC_RUNONLY) | libc.Int32FromInt32(0)*libc.Int32FromInt32(SQLITE_SUBTYPE) | libc.Int32FromInt32(1)*libc.Int32FromInt32(SQLITE_RESULT_SUBTYPE)),
- FzName: __ccgo_ts + 25617,
+ FzName: __ccgo_ts + 25672,
},
1: {
FnArg: int16(1),
FfuncFlags: libc.Uint32FromInt32(libc.Int32FromInt32(SQLITE_FUNC_BUILTIN) | libc.Int32FromInt32(SQLITE_DETERMINISTIC) | libc.Int32FromInt32(SQLITE_FUNC_CONSTANT) | libc.Int32FromInt32(SQLITE_UTF8) | libc.Int32FromInt32(1)*libc.Int32FromInt32(SQLITE_FUNC_RUNONLY) | libc.Int32FromInt32(0)*libc.Int32FromInt32(SQLITE_SUBTYPE) | libc.Int32FromInt32(0)*libc.Int32FromInt32(SQLITE_RESULT_SUBTYPE)),
FpUserData: uintptr(libc.Int32FromInt32(0) | libc.Int32FromInt32(1)*libc.Int32FromInt32(JSON_BLOB)),
- FzName: __ccgo_ts + 25622,
+ FzName: __ccgo_ts + 25677,
},
2: {
FnArg: int16(-int32(1)),
FfuncFlags: libc.Uint32FromInt32(libc.Int32FromInt32(SQLITE_FUNC_BUILTIN) | libc.Int32FromInt32(SQLITE_DETERMINISTIC) | libc.Int32FromInt32(SQLITE_FUNC_CONSTANT) | libc.Int32FromInt32(SQLITE_UTF8) | libc.Int32FromInt32(0)*libc.Int32FromInt32(SQLITE_FUNC_RUNONLY) | libc.Int32FromInt32(1)*libc.Int32FromInt32(SQLITE_SUBTYPE) | libc.Int32FromInt32(1)*libc.Int32FromInt32(SQLITE_RESULT_SUBTYPE)),
- FzName: __ccgo_ts + 25628,
+ FzName: __ccgo_ts + 25683,
},
3: {
FnArg: int16(-int32(1)),
FfuncFlags: libc.Uint32FromInt32(libc.Int32FromInt32(SQLITE_FUNC_BUILTIN) | libc.Int32FromInt32(SQLITE_DETERMINISTIC) | libc.Int32FromInt32(SQLITE_FUNC_CONSTANT) | libc.Int32FromInt32(SQLITE_UTF8) | libc.Int32FromInt32(0)*libc.Int32FromInt32(SQLITE_FUNC_RUNONLY) | libc.Int32FromInt32(1)*libc.Int32FromInt32(SQLITE_SUBTYPE) | libc.Int32FromInt32(1)*libc.Int32FromInt32(SQLITE_RESULT_SUBTYPE)),
FpUserData: uintptr(libc.Int32FromInt32(0) | libc.Int32FromInt32(1)*libc.Int32FromInt32(JSON_BLOB)),
- FzName: __ccgo_ts + 25639,
+ FzName: __ccgo_ts + 25694,
},
4: {
FnArg: int16(1),
FfuncFlags: libc.Uint32FromInt32(libc.Int32FromInt32(SQLITE_FUNC_BUILTIN) | libc.Int32FromInt32(SQLITE_DETERMINISTIC) | libc.Int32FromInt32(SQLITE_FUNC_CONSTANT) | libc.Int32FromInt32(SQLITE_UTF8) | libc.Int32FromInt32(1)*libc.Int32FromInt32(SQLITE_FUNC_RUNONLY) | libc.Int32FromInt32(0)*libc.Int32FromInt32(SQLITE_SUBTYPE) | libc.Int32FromInt32(0)*libc.Int32FromInt32(SQLITE_RESULT_SUBTYPE)),
- FzName: __ccgo_ts + 25651,
+ FzName: __ccgo_ts + 25706,
},
5: {
FnArg: int16(2),
FfuncFlags: libc.Uint32FromInt32(libc.Int32FromInt32(SQLITE_FUNC_BUILTIN) | libc.Int32FromInt32(SQLITE_DETERMINISTIC) | libc.Int32FromInt32(SQLITE_FUNC_CONSTANT) | libc.Int32FromInt32(SQLITE_UTF8) | libc.Int32FromInt32(1)*libc.Int32FromInt32(SQLITE_FUNC_RUNONLY) | libc.Int32FromInt32(0)*libc.Int32FromInt32(SQLITE_SUBTYPE) | libc.Int32FromInt32(0)*libc.Int32FromInt32(SQLITE_RESULT_SUBTYPE)),
- FzName: __ccgo_ts + 25651,
+ FzName: __ccgo_ts + 25706,
},
6: {
FnArg: int16(1),
FfuncFlags: libc.Uint32FromInt32(libc.Int32FromInt32(SQLITE_FUNC_BUILTIN) | libc.Int32FromInt32(SQLITE_DETERMINISTIC) | libc.Int32FromInt32(SQLITE_FUNC_CONSTANT) | libc.Int32FromInt32(SQLITE_UTF8) | libc.Int32FromInt32(1)*libc.Int32FromInt32(SQLITE_FUNC_RUNONLY) | libc.Int32FromInt32(0)*libc.Int32FromInt32(SQLITE_SUBTYPE) | libc.Int32FromInt32(0)*libc.Int32FromInt32(SQLITE_RESULT_SUBTYPE)),
- FzName: __ccgo_ts + 25669,
+ FzName: __ccgo_ts + 25724,
},
7: {
FnArg: int16(-int32(1)),
FfuncFlags: libc.Uint32FromInt32(libc.Int32FromInt32(SQLITE_FUNC_BUILTIN) | libc.Int32FromInt32(SQLITE_DETERMINISTIC) | libc.Int32FromInt32(SQLITE_FUNC_CONSTANT) | libc.Int32FromInt32(SQLITE_UTF8) | libc.Int32FromInt32(1)*libc.Int32FromInt32(SQLITE_FUNC_RUNONLY) | libc.Int32FromInt32(0)*libc.Int32FromInt32(SQLITE_SUBTYPE) | libc.Int32FromInt32(1)*libc.Int32FromInt32(SQLITE_RESULT_SUBTYPE)),
- FzName: __ccgo_ts + 25689,
+ FzName: __ccgo_ts + 25744,
},
8: {
FnArg: int16(-int32(1)),
FfuncFlags: libc.Uint32FromInt32(libc.Int32FromInt32(SQLITE_FUNC_BUILTIN) | libc.Int32FromInt32(SQLITE_DETERMINISTIC) | libc.Int32FromInt32(SQLITE_FUNC_CONSTANT) | libc.Int32FromInt32(SQLITE_UTF8) | libc.Int32FromInt32(1)*libc.Int32FromInt32(SQLITE_FUNC_RUNONLY) | libc.Int32FromInt32(0)*libc.Int32FromInt32(SQLITE_SUBTYPE) | libc.Int32FromInt32(0)*libc.Int32FromInt32(SQLITE_RESULT_SUBTYPE)),
FpUserData: uintptr(libc.Int32FromInt32(0) | libc.Int32FromInt32(1)*libc.Int32FromInt32(JSON_BLOB)),
- FzName: __ccgo_ts + 25702,
+ FzName: __ccgo_ts + 25757,
},
9: {
FnArg: int16(2),
FfuncFlags: libc.Uint32FromInt32(libc.Int32FromInt32(SQLITE_FUNC_BUILTIN) | libc.Int32FromInt32(SQLITE_DETERMINISTIC) | libc.Int32FromInt32(SQLITE_FUNC_CONSTANT) | libc.Int32FromInt32(SQLITE_UTF8) | libc.Int32FromInt32(1)*libc.Int32FromInt32(SQLITE_FUNC_RUNONLY) | libc.Int32FromInt32(0)*libc.Int32FromInt32(SQLITE_SUBTYPE) | libc.Int32FromInt32(1)*libc.Int32FromInt32(SQLITE_RESULT_SUBTYPE)),
FpUserData: uintptr(libc.Int32FromInt32(JSON_JSON) | libc.Int32FromInt32(0)*libc.Int32FromInt32(JSON_BLOB)),
- FzName: __ccgo_ts + 25716,
+ FzName: __ccgo_ts + 25771,
},
10: {
FnArg: int16(2),
FfuncFlags: libc.Uint32FromInt32(libc.Int32FromInt32(SQLITE_FUNC_BUILTIN) | libc.Int32FromInt32(SQLITE_DETERMINISTIC) | libc.Int32FromInt32(SQLITE_FUNC_CONSTANT) | libc.Int32FromInt32(SQLITE_UTF8) | libc.Int32FromInt32(1)*libc.Int32FromInt32(SQLITE_FUNC_RUNONLY) | libc.Int32FromInt32(0)*libc.Int32FromInt32(SQLITE_SUBTYPE) | libc.Int32FromInt32(0)*libc.Int32FromInt32(SQLITE_RESULT_SUBTYPE)),
FpUserData: uintptr(libc.Int32FromInt32(JSON_SQL) | libc.Int32FromInt32(0)*libc.Int32FromInt32(JSON_BLOB)),
- FzName: __ccgo_ts + 25719,
+ FzName: __ccgo_ts + 25774,
},
11: {
FnArg: int16(-int32(1)),
FfuncFlags: libc.Uint32FromInt32(libc.Int32FromInt32(SQLITE_FUNC_BUILTIN) | libc.Int32FromInt32(SQLITE_DETERMINISTIC) | libc.Int32FromInt32(SQLITE_FUNC_CONSTANT) | libc.Int32FromInt32(SQLITE_UTF8) | libc.Int32FromInt32(1)*libc.Int32FromInt32(SQLITE_FUNC_RUNONLY) | libc.Int32FromInt32(1)*libc.Int32FromInt32(SQLITE_SUBTYPE) | libc.Int32FromInt32(1)*libc.Int32FromInt32(SQLITE_RESULT_SUBTYPE)),
- FzName: __ccgo_ts + 25723,
+ FzName: __ccgo_ts + 25778,
},
12: {
FnArg: int16(-int32(1)),
FfuncFlags: libc.Uint32FromInt32(libc.Int32FromInt32(SQLITE_FUNC_BUILTIN) | libc.Int32FromInt32(SQLITE_DETERMINISTIC) | libc.Int32FromInt32(SQLITE_FUNC_CONSTANT) | libc.Int32FromInt32(SQLITE_UTF8) | libc.Int32FromInt32(1)*libc.Int32FromInt32(SQLITE_FUNC_RUNONLY) | libc.Int32FromInt32(1)*libc.Int32FromInt32(SQLITE_SUBTYPE) | libc.Int32FromInt32(0)*libc.Int32FromInt32(SQLITE_RESULT_SUBTYPE)),
FpUserData: uintptr(libc.Int32FromInt32(0) | libc.Int32FromInt32(1)*libc.Int32FromInt32(JSON_BLOB)),
- FzName: __ccgo_ts + 25735,
+ FzName: __ccgo_ts + 25790,
},
13: {
FnArg: int16(-int32(1)),
FfuncFlags: libc.Uint32FromInt32(libc.Int32FromInt32(SQLITE_FUNC_BUILTIN) | libc.Int32FromInt32(SQLITE_DETERMINISTIC) | libc.Int32FromInt32(SQLITE_FUNC_CONSTANT) | libc.Int32FromInt32(SQLITE_UTF8) | libc.Int32FromInt32(0)*libc.Int32FromInt32(SQLITE_FUNC_RUNONLY) | libc.Int32FromInt32(1)*libc.Int32FromInt32(SQLITE_SUBTYPE) | libc.Int32FromInt32(1)*libc.Int32FromInt32(SQLITE_RESULT_SUBTYPE)),
- FzName: __ccgo_ts + 25748,
+ FzName: __ccgo_ts + 25803,
},
14: {
FnArg: int16(-int32(1)),
FfuncFlags: libc.Uint32FromInt32(libc.Int32FromInt32(SQLITE_FUNC_BUILTIN) | libc.Int32FromInt32(SQLITE_DETERMINISTIC) | libc.Int32FromInt32(SQLITE_FUNC_CONSTANT) | libc.Int32FromInt32(SQLITE_UTF8) | libc.Int32FromInt32(0)*libc.Int32FromInt32(SQLITE_FUNC_RUNONLY) | libc.Int32FromInt32(1)*libc.Int32FromInt32(SQLITE_SUBTYPE) | libc.Int32FromInt32(1)*libc.Int32FromInt32(SQLITE_RESULT_SUBTYPE)),
FpUserData: uintptr(libc.Int32FromInt32(0) | libc.Int32FromInt32(1)*libc.Int32FromInt32(JSON_BLOB)),
- FzName: __ccgo_ts + 25760,
+ FzName: __ccgo_ts + 25815,
},
15: {
FnArg: int16(2),
FfuncFlags: libc.Uint32FromInt32(libc.Int32FromInt32(SQLITE_FUNC_BUILTIN) | libc.Int32FromInt32(SQLITE_DETERMINISTIC) | libc.Int32FromInt32(SQLITE_FUNC_CONSTANT) | libc.Int32FromInt32(SQLITE_UTF8) | libc.Int32FromInt32(1)*libc.Int32FromInt32(SQLITE_FUNC_RUNONLY) | libc.Int32FromInt32(0)*libc.Int32FromInt32(SQLITE_SUBTYPE) | libc.Int32FromInt32(1)*libc.Int32FromInt32(SQLITE_RESULT_SUBTYPE)),
- FzName: __ccgo_ts + 25773,
+ FzName: __ccgo_ts + 25828,
},
16: {
FnArg: int16(2),
FfuncFlags: libc.Uint32FromInt32(libc.Int32FromInt32(SQLITE_FUNC_BUILTIN) | libc.Int32FromInt32(SQLITE_DETERMINISTIC) | libc.Int32FromInt32(SQLITE_FUNC_CONSTANT) | libc.Int32FromInt32(SQLITE_UTF8) | libc.Int32FromInt32(1)*libc.Int32FromInt32(SQLITE_FUNC_RUNONLY) | libc.Int32FromInt32(0)*libc.Int32FromInt32(SQLITE_SUBTYPE) | libc.Int32FromInt32(0)*libc.Int32FromInt32(SQLITE_RESULT_SUBTYPE)),
FpUserData: uintptr(libc.Int32FromInt32(0) | libc.Int32FromInt32(1)*libc.Int32FromInt32(JSON_BLOB)),
- FzName: __ccgo_ts + 25784,
+ FzName: __ccgo_ts + 25839,
},
17: {
FnArg: int16(1),
FfuncFlags: libc.Uint32FromInt32(libc.Int32FromInt32(SQLITE_FUNC_BUILTIN) | libc.Int32FromInt32(SQLITE_DETERMINISTIC) | libc.Int32FromInt32(SQLITE_FUNC_CONSTANT) | libc.Int32FromInt32(SQLITE_UTF8) | libc.Int32FromInt32(1)*libc.Int32FromInt32(SQLITE_FUNC_RUNONLY) | libc.Int32FromInt32(0)*libc.Int32FromInt32(SQLITE_SUBTYPE) | libc.Int32FromInt32(0)*libc.Int32FromInt32(SQLITE_RESULT_SUBTYPE)),
- FzName: __ccgo_ts + 25796,
+ FzName: __ccgo_ts + 25851,
},
18: {
FnArg: int16(2),
FfuncFlags: libc.Uint32FromInt32(libc.Int32FromInt32(SQLITE_FUNC_BUILTIN) | libc.Int32FromInt32(SQLITE_DETERMINISTIC) | libc.Int32FromInt32(SQLITE_FUNC_CONSTANT) | libc.Int32FromInt32(SQLITE_UTF8) | libc.Int32FromInt32(1)*libc.Int32FromInt32(SQLITE_FUNC_RUNONLY) | libc.Int32FromInt32(0)*libc.Int32FromInt32(SQLITE_SUBTYPE) | libc.Int32FromInt32(0)*libc.Int32FromInt32(SQLITE_RESULT_SUBTYPE)),
- FzName: __ccgo_ts + 25796,
+ FzName: __ccgo_ts + 25851,
},
19: {
FnArg: int16(1),
FfuncFlags: libc.Uint32FromInt32(libc.Int32FromInt32(SQLITE_FUNC_BUILTIN) | libc.Int32FromInt32(SQLITE_DETERMINISTIC) | libc.Int32FromInt32(SQLITE_FUNC_CONSTANT) | libc.Int32FromInt32(SQLITE_UTF8) | libc.Int32FromInt32(0)*libc.Int32FromInt32(SQLITE_FUNC_RUNONLY) | libc.Int32FromInt32(1)*libc.Int32FromInt32(SQLITE_SUBTYPE) | libc.Int32FromInt32(1)*libc.Int32FromInt32(SQLITE_RESULT_SUBTYPE)),
- FzName: __ccgo_ts + 25808,
+ FzName: __ccgo_ts + 25863,
},
20: {
FnArg: int16(-int32(1)),
FfuncFlags: libc.Uint32FromInt32(libc.Int32FromInt32(SQLITE_FUNC_BUILTIN) | libc.Int32FromInt32(SQLITE_DETERMINISTIC) | libc.Int32FromInt32(SQLITE_FUNC_CONSTANT) | libc.Int32FromInt32(SQLITE_UTF8) | libc.Int32FromInt32(1)*libc.Int32FromInt32(SQLITE_FUNC_RUNONLY) | libc.Int32FromInt32(0)*libc.Int32FromInt32(SQLITE_SUBTYPE) | libc.Int32FromInt32(1)*libc.Int32FromInt32(SQLITE_RESULT_SUBTYPE)),
- FzName: __ccgo_ts + 25819,
+ FzName: __ccgo_ts + 25874,
},
21: {
FnArg: int16(-int32(1)),
FfuncFlags: libc.Uint32FromInt32(libc.Int32FromInt32(SQLITE_FUNC_BUILTIN) | libc.Int32FromInt32(SQLITE_DETERMINISTIC) | libc.Int32FromInt32(SQLITE_FUNC_CONSTANT) | libc.Int32FromInt32(SQLITE_UTF8) | libc.Int32FromInt32(1)*libc.Int32FromInt32(SQLITE_FUNC_RUNONLY) | libc.Int32FromInt32(0)*libc.Int32FromInt32(SQLITE_SUBTYPE) | libc.Int32FromInt32(0)*libc.Int32FromInt32(SQLITE_RESULT_SUBTYPE)),
FpUserData: uintptr(libc.Int32FromInt32(0) | libc.Int32FromInt32(1)*libc.Int32FromInt32(JSON_BLOB)),
- FzName: __ccgo_ts + 25831,
+ FzName: __ccgo_ts + 25886,
},
22: {
FnArg: int16(-int32(1)),
FfuncFlags: libc.Uint32FromInt32(libc.Int32FromInt32(SQLITE_FUNC_BUILTIN) | libc.Int32FromInt32(SQLITE_DETERMINISTIC) | libc.Int32FromInt32(SQLITE_FUNC_CONSTANT) | libc.Int32FromInt32(SQLITE_UTF8) | libc.Int32FromInt32(1)*libc.Int32FromInt32(SQLITE_FUNC_RUNONLY) | libc.Int32FromInt32(1)*libc.Int32FromInt32(SQLITE_SUBTYPE) | libc.Int32FromInt32(1)*libc.Int32FromInt32(SQLITE_RESULT_SUBTYPE)),
- FzName: __ccgo_ts + 25844,
+ FzName: __ccgo_ts + 25899,
},
23: {
FnArg: int16(-int32(1)),
FfuncFlags: libc.Uint32FromInt32(libc.Int32FromInt32(SQLITE_FUNC_BUILTIN) | libc.Int32FromInt32(SQLITE_DETERMINISTIC) | libc.Int32FromInt32(SQLITE_FUNC_CONSTANT) | libc.Int32FromInt32(SQLITE_UTF8) | libc.Int32FromInt32(1)*libc.Int32FromInt32(SQLITE_FUNC_RUNONLY) | libc.Int32FromInt32(1)*libc.Int32FromInt32(SQLITE_SUBTYPE) | libc.Int32FromInt32(0)*libc.Int32FromInt32(SQLITE_RESULT_SUBTYPE)),
FpUserData: uintptr(libc.Int32FromInt32(0) | libc.Int32FromInt32(1)*libc.Int32FromInt32(JSON_BLOB)),
- FzName: __ccgo_ts + 25857,
+ FzName: __ccgo_ts + 25912,
},
24: {
FnArg: int16(-int32(1)),
FfuncFlags: libc.Uint32FromInt32(libc.Int32FromInt32(SQLITE_FUNC_BUILTIN) | libc.Int32FromInt32(SQLITE_DETERMINISTIC) | libc.Int32FromInt32(SQLITE_FUNC_CONSTANT) | libc.Int32FromInt32(SQLITE_UTF8) | libc.Int32FromInt32(1)*libc.Int32FromInt32(SQLITE_FUNC_RUNONLY) | libc.Int32FromInt32(1)*libc.Int32FromInt32(SQLITE_SUBTYPE) | libc.Int32FromInt32(1)*libc.Int32FromInt32(SQLITE_RESULT_SUBTYPE)),
FpUserData: uintptr(libc.Int32FromInt32(JSON_ISSET) | libc.Int32FromInt32(0)*libc.Int32FromInt32(JSON_BLOB)),
- FzName: __ccgo_ts + 25871,
+ FzName: __ccgo_ts + 25926,
},
25: {
FnArg: int16(-int32(1)),
FfuncFlags: libc.Uint32FromInt32(libc.Int32FromInt32(SQLITE_FUNC_BUILTIN) | libc.Int32FromInt32(SQLITE_DETERMINISTIC) | libc.Int32FromInt32(SQLITE_FUNC_CONSTANT) | libc.Int32FromInt32(SQLITE_UTF8) | libc.Int32FromInt32(1)*libc.Int32FromInt32(SQLITE_FUNC_RUNONLY) | libc.Int32FromInt32(1)*libc.Int32FromInt32(SQLITE_SUBTYPE) | libc.Int32FromInt32(0)*libc.Int32FromInt32(SQLITE_RESULT_SUBTYPE)),
FpUserData: uintptr(libc.Int32FromInt32(JSON_ISSET) | libc.Int32FromInt32(1)*libc.Int32FromInt32(JSON_BLOB)),
- FzName: __ccgo_ts + 25880,
+ FzName: __ccgo_ts + 25935,
},
26: {
FnArg: int16(1),
FfuncFlags: libc.Uint32FromInt32(libc.Int32FromInt32(SQLITE_FUNC_BUILTIN) | libc.Int32FromInt32(SQLITE_DETERMINISTIC) | libc.Int32FromInt32(SQLITE_FUNC_CONSTANT) | libc.Int32FromInt32(SQLITE_UTF8) | libc.Int32FromInt32(1)*libc.Int32FromInt32(SQLITE_FUNC_RUNONLY) | libc.Int32FromInt32(0)*libc.Int32FromInt32(SQLITE_SUBTYPE) | libc.Int32FromInt32(0)*libc.Int32FromInt32(SQLITE_RESULT_SUBTYPE)),
- FzName: __ccgo_ts + 25890,
+ FzName: __ccgo_ts + 25945,
},
27: {
FnArg: int16(2),
FfuncFlags: libc.Uint32FromInt32(libc.Int32FromInt32(SQLITE_FUNC_BUILTIN) | libc.Int32FromInt32(SQLITE_DETERMINISTIC) | libc.Int32FromInt32(SQLITE_FUNC_CONSTANT) | libc.Int32FromInt32(SQLITE_UTF8) | libc.Int32FromInt32(1)*libc.Int32FromInt32(SQLITE_FUNC_RUNONLY) | libc.Int32FromInt32(0)*libc.Int32FromInt32(SQLITE_SUBTYPE) | libc.Int32FromInt32(0)*libc.Int32FromInt32(SQLITE_RESULT_SUBTYPE)),
- FzName: __ccgo_ts + 25890,
+ FzName: __ccgo_ts + 25945,
},
28: {
FnArg: int16(1),
FfuncFlags: libc.Uint32FromInt32(libc.Int32FromInt32(SQLITE_FUNC_BUILTIN) | libc.Int32FromInt32(SQLITE_DETERMINISTIC) | libc.Int32FromInt32(SQLITE_FUNC_CONSTANT) | libc.Int32FromInt32(SQLITE_UTF8) | libc.Int32FromInt32(1)*libc.Int32FromInt32(SQLITE_FUNC_RUNONLY) | libc.Int32FromInt32(0)*libc.Int32FromInt32(SQLITE_SUBTYPE) | libc.Int32FromInt32(0)*libc.Int32FromInt32(SQLITE_RESULT_SUBTYPE)),
- FzName: __ccgo_ts + 25900,
+ FzName: __ccgo_ts + 25955,
},
29: {
FnArg: int16(2),
FfuncFlags: libc.Uint32FromInt32(libc.Int32FromInt32(SQLITE_FUNC_BUILTIN) | libc.Int32FromInt32(SQLITE_DETERMINISTIC) | libc.Int32FromInt32(SQLITE_FUNC_CONSTANT) | libc.Int32FromInt32(SQLITE_UTF8) | libc.Int32FromInt32(1)*libc.Int32FromInt32(SQLITE_FUNC_RUNONLY) | libc.Int32FromInt32(0)*libc.Int32FromInt32(SQLITE_SUBTYPE) | libc.Int32FromInt32(0)*libc.Int32FromInt32(SQLITE_RESULT_SUBTYPE)),
- FzName: __ccgo_ts + 25900,
+ FzName: __ccgo_ts + 25955,
},
30: {
FnArg: int16(1),
FfuncFlags: libc.Uint32FromInt32(libc.Int32FromInt32(SQLITE_FUNC_BUILTIN) | libc.Int32FromInt32(SQLITE_UTF8) | libc.Int32FromInt32(0)*libc.Int32FromInt32(SQLITE_FUNC_NEEDCOLL) | libc.Int32FromInt32(SQLITE_SUBTYPE) | libc.Int32FromInt32(SQLITE_RESULT_SUBTYPE) | libc.Int32FromInt32(SQLITE_UTF8) | libc.Int32FromInt32(SQLITE_DETERMINISTIC)),
- FzName: __ccgo_ts + 25911,
+ FzName: __ccgo_ts + 25966,
},
31: {
FnArg: int16(1),
FfuncFlags: libc.Uint32FromInt32(libc.Int32FromInt32(SQLITE_FUNC_BUILTIN) | libc.Int32FromInt32(SQLITE_UTF8) | libc.Int32FromInt32(0)*libc.Int32FromInt32(SQLITE_FUNC_NEEDCOLL) | libc.Int32FromInt32(SQLITE_SUBTYPE) | libc.Int32FromInt32(SQLITE_RESULT_SUBTYPE) | libc.Int32FromInt32(SQLITE_UTF8) | libc.Int32FromInt32(SQLITE_DETERMINISTIC)),
FpUserData: uintptr(libc.Int32FromInt32(JSON_BLOB)),
- FzName: __ccgo_ts + 25928,
+ FzName: __ccgo_ts + 25983,
},
32: {
FnArg: int16(2),
FfuncFlags: libc.Uint32FromInt32(libc.Int32FromInt32(SQLITE_FUNC_BUILTIN) | libc.Int32FromInt32(SQLITE_UTF8) | libc.Int32FromInt32(0)*libc.Int32FromInt32(SQLITE_FUNC_NEEDCOLL) | libc.Int32FromInt32(SQLITE_SUBTYPE) | libc.Int32FromInt32(SQLITE_RESULT_SUBTYPE) | libc.Int32FromInt32(SQLITE_UTF8) | libc.Int32FromInt32(SQLITE_DETERMINISTIC)),
- FzName: __ccgo_ts + 25946,
+ FzName: __ccgo_ts + 26001,
},
33: {
FnArg: int16(2),
FfuncFlags: libc.Uint32FromInt32(libc.Int32FromInt32(SQLITE_FUNC_BUILTIN) | libc.Int32FromInt32(SQLITE_UTF8) | libc.Int32FromInt32(0)*libc.Int32FromInt32(SQLITE_FUNC_NEEDCOLL) | libc.Int32FromInt32(SQLITE_SUBTYPE) | libc.Int32FromInt32(SQLITE_RESULT_SUBTYPE) | libc.Int32FromInt32(SQLITE_UTF8) | libc.Int32FromInt32(SQLITE_DETERMINISTIC)),
FpUserData: uintptr(libc.Int32FromInt32(JSON_BLOB)),
- FzName: __ccgo_ts + 25964,
+ FzName: __ccgo_ts + 26019,
},
}
@@ -175955,17 +176386,19 @@ var _aMod = [2]struct {
FpModule uintptr
}{
0: {
- FzName: __ccgo_ts + 25983,
+ FzName: __ccgo_ts + 26038,
FpModule: uintptr(unsafe.Pointer(&_jsonEachModule)),
},
1: {
- FzName: __ccgo_ts + 25993,
+ FzName: __ccgo_ts + 26048,
FpModule: uintptr(unsafe.Pointer(&_jsonTreeModule)),
},
}
/* In the SQLite core */
+/* #include <stddef.h> */
+
/*
** If building separately, we will need some setup that is normally
** found in sqliteInt.h
@@ -176073,7 +176506,6 @@ type TRtreeMatchArg = struct {
Fcb TRtreeGeomCallback
FnParam int32
FapSqlParam uintptr
- FaParam [1]TRtreeDValue
}
type RtreeMatchArg = TRtreeMatchArg
@@ -176356,11 +176788,12 @@ type TRtreeMatchArg1 = struct {
Fcb TRtreeGeomCallback
FnParam int32
FapSqlParam uintptr
- FaParam [1]TRtreeDValue
}
type RtreeMatchArg1 = TRtreeMatchArg1
+/* Size of an RtreeMatchArg object with N parameters */
+
/* What version of GCC is being used. 0 means GCC is not being used .
** Note that the GCC_VERSION macro will also be set correctly when using
** clang, since clang works hard to be gcc compatible. So the gcc
@@ -176605,7 +177038,7 @@ func _nodeAcquire(tls *libc.TLS, pRtree uintptr, iNode Ti64, pParent uintptr, pp
}
}
if (*TRtree)(unsafe.Pointer(pRtree)).FpNodeBlob == uintptr(0) {
- rc = Xsqlite3_blob_open(tls, (*TRtree)(unsafe.Pointer(pRtree)).Fdb, (*TRtree)(unsafe.Pointer(pRtree)).FzDb, (*TRtree)(unsafe.Pointer(pRtree)).FzNodeName, __ccgo_ts+26003, iNode, 0, pRtree+72)
+ rc = Xsqlite3_blob_open(tls, (*TRtree)(unsafe.Pointer(pRtree)).Fdb, (*TRtree)(unsafe.Pointer(pRtree)).FzDb, (*TRtree)(unsafe.Pointer(pRtree)).FzNodeName, __ccgo_ts+26058, iNode, 0, pRtree+72)
}
if rc != 0 {
*(*uintptr)(unsafe.Pointer(ppNode)) = uintptr(0)
@@ -176910,7 +177343,7 @@ func _rtreeDestroy(tls *libc.TLS, pVtab uintptr) (r int32) {
var rc int32
_, _, _ = pRtree, rc, zCreate
pRtree = pVtab
- zCreate = Xsqlite3_mprintf(tls, __ccgo_ts+26008, libc.VaList(bp+8, (*TRtree)(unsafe.Pointer(pRtree)).FzDb, (*TRtree)(unsafe.Pointer(pRtree)).FzName, (*TRtree)(unsafe.Pointer(pRtree)).FzDb, (*TRtree)(unsafe.Pointer(pRtree)).FzName, (*TRtree)(unsafe.Pointer(pRtree)).FzDb, (*TRtree)(unsafe.Pointer(pRtree)).FzName))
+ zCreate = Xsqlite3_mprintf(tls, __ccgo_ts+26063, libc.VaList(bp+8, (*TRtree)(unsafe.Pointer(pRtree)).FzDb, (*TRtree)(unsafe.Pointer(pRtree)).FzName, (*TRtree)(unsafe.Pointer(pRtree)).FzDb, (*TRtree)(unsafe.Pointer(pRtree)).FzName, (*TRtree)(unsafe.Pointer(pRtree)).FzDb, (*TRtree)(unsafe.Pointer(pRtree)).FzName))
if !(zCreate != 0) {
rc = int32(SQLITE_NOMEM)
} else {
@@ -177827,7 +178260,7 @@ func _findLeafNode(tls *libc.TLS, pRtree uintptr, iRowid Ti64, ppLeaf uintptr, p
func _deserializeGeometry(tls *libc.TLS, pValue uintptr, pCons uintptr) (r int32) {
var pBlob, pInfo, pSrc uintptr
_, _, _ = pBlob, pInfo, pSrc /* Callback information */
- pSrc = Xsqlite3_value_pointer(tls, pValue, __ccgo_ts+26090)
+ pSrc = Xsqlite3_value_pointer(tls, pValue, __ccgo_ts+26145)
if pSrc == uintptr(0) {
return int32(SQLITE_ERROR)
}
@@ -178144,7 +178577,7 @@ func _rtreeBestIndex(tls *libc.TLS, tab uintptr, pIdxInfo uintptr) (r int32) {
// C documentation
//
// /*
-// ** Return the N-dimensional volumn of the cell stored in *p.
+// ** Return the N-dimensional volume of the cell stored in *p.
// */
func _cellArea(tls *libc.TLS, pRtree uintptr, p uintptr) (r TRtreeDValue) {
var area TRtreeDValue
@@ -179362,7 +179795,7 @@ func _rtreeConstraintError(tls *libc.TLS, pRtree uintptr, iCol int32) (r int32)
var _ /* pStmt at bp+0 */ uintptr
_, _, _, _, _, _ = rc, zCol, zCol1, zCol2, zSql, v1
*(*uintptr)(unsafe.Pointer(bp)) = uintptr(0)
- zSql = Xsqlite3_mprintf(tls, __ccgo_ts+26104, libc.VaList(bp+16, (*TRtree)(unsafe.Pointer(pRtree)).FzDb, (*TRtree)(unsafe.Pointer(pRtree)).FzName))
+ zSql = Xsqlite3_mprintf(tls, __ccgo_ts+26159, libc.VaList(bp+16, (*TRtree)(unsafe.Pointer(pRtree)).FzDb, (*TRtree)(unsafe.Pointer(pRtree)).FzName))
if zSql != 0 {
rc = Xsqlite3_prepare_v2(tls, (*TRtree)(unsafe.Pointer(pRtree)).Fdb, zSql, -int32(1), bp, uintptr(0))
} else {
@@ -179372,11 +179805,11 @@ func _rtreeConstraintError(tls *libc.TLS, pRtree uintptr, iCol int32) (r int32)
if rc == SQLITE_OK {
if iCol == 0 {
zCol = Xsqlite3_column_name(tls, *(*uintptr)(unsafe.Pointer(bp)), 0)
- (*TRtree)(unsafe.Pointer(pRtree)).Fbase.FzErrMsg = Xsqlite3_mprintf(tls, __ccgo_ts+26124, libc.VaList(bp+16, (*TRtree)(unsafe.Pointer(pRtree)).FzName, zCol))
+ (*TRtree)(unsafe.Pointer(pRtree)).Fbase.FzErrMsg = Xsqlite3_mprintf(tls, __ccgo_ts+26179, libc.VaList(bp+16, (*TRtree)(unsafe.Pointer(pRtree)).FzName, zCol))
} else {
zCol1 = Xsqlite3_column_name(tls, *(*uintptr)(unsafe.Pointer(bp)), iCol)
zCol2 = Xsqlite3_column_name(tls, *(*uintptr)(unsafe.Pointer(bp)), iCol+int32(1))
- (*TRtree)(unsafe.Pointer(pRtree)).Fbase.FzErrMsg = Xsqlite3_mprintf(tls, __ccgo_ts+26156, libc.VaList(bp+16, (*TRtree)(unsafe.Pointer(pRtree)).FzName, zCol1, zCol2))
+ (*TRtree)(unsafe.Pointer(pRtree)).Fbase.FzErrMsg = Xsqlite3_mprintf(tls, __ccgo_ts+26211, libc.VaList(bp+16, (*TRtree)(unsafe.Pointer(pRtree)).FzName, zCol1, zCol2))
}
}
Xsqlite3_finalize(tls, *(*uintptr)(unsafe.Pointer(bp)))
@@ -179590,7 +180023,7 @@ func _rtreeRename(tls *libc.TLS, pVtab uintptr, zNewName uintptr) (r int32) {
_, _, _ = pRtree, rc, zSql
pRtree = pVtab
rc = int32(SQLITE_NOMEM)
- zSql = Xsqlite3_mprintf(tls, __ccgo_ts+26193, libc.VaList(bp+8, (*TRtree)(unsafe.Pointer(pRtree)).FzDb, (*TRtree)(unsafe.Pointer(pRtree)).FzName, zNewName, (*TRtree)(unsafe.Pointer(pRtree)).FzDb, (*TRtree)(unsafe.Pointer(pRtree)).FzName, zNewName, (*TRtree)(unsafe.Pointer(pRtree)).FzDb, (*TRtree)(unsafe.Pointer(pRtree)).FzName, zNewName))
+ zSql = Xsqlite3_mprintf(tls, __ccgo_ts+26248, libc.VaList(bp+8, (*TRtree)(unsafe.Pointer(pRtree)).FzDb, (*TRtree)(unsafe.Pointer(pRtree)).FzName, zNewName, (*TRtree)(unsafe.Pointer(pRtree)).FzDb, (*TRtree)(unsafe.Pointer(pRtree)).FzName, zNewName, (*TRtree)(unsafe.Pointer(pRtree)).FzDb, (*TRtree)(unsafe.Pointer(pRtree)).FzName, zNewName))
if zSql != 0 {
_nodeBlobReset(tls, pRtree)
rc = Xsqlite3_exec(tls, (*TRtree)(unsafe.Pointer(pRtree)).Fdb, zSql, uintptr(0), uintptr(0), uintptr(0))
@@ -179644,9 +180077,9 @@ func _rtreeQueryStat1(tls *libc.TLS, db uintptr, pRtree uintptr) (r int32) {
var v2 int64
var _ /* p at bp+0 */ uintptr
_, _, _, _, _, _ = nRow, rc, zFmt, zSql, v1, v2
- zFmt = __ccgo_ts + 26338
+ zFmt = __ccgo_ts + 26393
nRow = int64(RTREE_MIN_ROWEST)
- rc = Xsqlite3_table_column_metadata(tls, db, (*TRtree)(unsafe.Pointer(pRtree)).FzDb, __ccgo_ts+11773, uintptr(0), uintptr(0), uintptr(0), uintptr(0), uintptr(0), uintptr(0))
+ rc = Xsqlite3_table_column_metadata(tls, db, (*TRtree)(unsafe.Pointer(pRtree)).FzDb, __ccgo_ts+11798, uintptr(0), uintptr(0), uintptr(0), uintptr(0), uintptr(0), uintptr(0))
if rc != SQLITE_OK {
(*TRtree)(unsafe.Pointer(pRtree)).FnRowEst = int64(RTREE_DEFAULT_ROWEST)
if rc == int32(SQLITE_ERROR) {
@@ -179704,9 +180137,9 @@ func _rtreeShadowName(tls *libc.TLS, zName uintptr) (r int32) {
}
var _azName1 = [3]uintptr{
- 0: __ccgo_ts + 26394,
- 1: __ccgo_ts + 5569,
- 2: __ccgo_ts + 16850,
+ 0: __ccgo_ts + 26449,
+ 1: __ccgo_ts + 5595,
+ 2: __ccgo_ts + 16922,
}
var _rtreeModule = Tsqlite3_module{
@@ -179750,21 +180183,21 @@ func _rtreeSqlInit(tls *libc.TLS, pRtree uintptr, db uintptr, zDb uintptr, zPref
(*TRtree)(unsafe.Pointer(pRtree)).Fdb = db
if isCreate != 0 {
p = Xsqlite3_str_new(tls, db)
- Xsqlite3_str_appendf(tls, p, __ccgo_ts+26808, libc.VaList(bp+8, zDb, zPrefix))
+ Xsqlite3_str_appendf(tls, p, __ccgo_ts+26863, libc.VaList(bp+8, zDb, zPrefix))
ii = 0
for {
if !(ii < libc.Int32FromUint8((*TRtree)(unsafe.Pointer(pRtree)).FnAux)) {
break
}
- Xsqlite3_str_appendf(tls, p, __ccgo_ts+26870, libc.VaList(bp+8, ii))
+ Xsqlite3_str_appendf(tls, p, __ccgo_ts+26925, libc.VaList(bp+8, ii))
goto _1
_1:
;
ii++
}
- Xsqlite3_str_appendf(tls, p, __ccgo_ts+26875, libc.VaList(bp+8, zDb, zPrefix))
- Xsqlite3_str_appendf(tls, p, __ccgo_ts+26939, libc.VaList(bp+8, zDb, zPrefix))
- Xsqlite3_str_appendf(tls, p, __ccgo_ts+27009, libc.VaList(bp+8, zDb, zPrefix, (*TRtree)(unsafe.Pointer(pRtree)).FiNodeSize))
+ Xsqlite3_str_appendf(tls, p, __ccgo_ts+26930, libc.VaList(bp+8, zDb, zPrefix))
+ Xsqlite3_str_appendf(tls, p, __ccgo_ts+26994, libc.VaList(bp+8, zDb, zPrefix))
+ Xsqlite3_str_appendf(tls, p, __ccgo_ts+27064, libc.VaList(bp+8, zDb, zPrefix, (*TRtree)(unsafe.Pointer(pRtree)).FiNodeSize))
zCreate = Xsqlite3_str_finish(tls, p)
if !(zCreate != 0) {
return int32(SQLITE_NOMEM)
@@ -179794,7 +180227,7 @@ func _rtreeSqlInit(tls *libc.TLS, pRtree uintptr, db uintptr, zDb uintptr, zPref
} else {
/* An UPSERT is very slightly slower than REPLACE, but it is needed
** if there are auxiliary columns */
- zFormat = __ccgo_ts + 27058
+ zFormat = __ccgo_ts + 27113
}
zSql = Xsqlite3_mprintf(tls, zFormat, libc.VaList(bp+8, zDb, zPrefix))
if zSql != 0 {
@@ -179809,31 +180242,31 @@ func _rtreeSqlInit(tls *libc.TLS, pRtree uintptr, db uintptr, zDb uintptr, zPref
i++
}
if (*TRtree)(unsafe.Pointer(pRtree)).FnAux != 0 && rc != int32(SQLITE_NOMEM) {
- (*TRtree)(unsafe.Pointer(pRtree)).FzReadAuxSql = Xsqlite3_mprintf(tls, __ccgo_ts+27166, libc.VaList(bp+8, zDb, zPrefix))
+ (*TRtree)(unsafe.Pointer(pRtree)).FzReadAuxSql = Xsqlite3_mprintf(tls, __ccgo_ts+27221, libc.VaList(bp+8, zDb, zPrefix))
if (*TRtree)(unsafe.Pointer(pRtree)).FzReadAuxSql == uintptr(0) {
rc = int32(SQLITE_NOMEM)
} else {
p1 = Xsqlite3_str_new(tls, db)
- Xsqlite3_str_appendf(tls, p1, __ccgo_ts+27211, libc.VaList(bp+8, zDb, zPrefix))
+ Xsqlite3_str_appendf(tls, p1, __ccgo_ts+27266, libc.VaList(bp+8, zDb, zPrefix))
ii1 = 0
for {
if !(ii1 < libc.Int32FromUint8((*TRtree)(unsafe.Pointer(pRtree)).FnAux)) {
break
}
if ii1 != 0 {
- Xsqlite3_str_append(tls, p1, __ccgo_ts+13281, int32(1))
+ Xsqlite3_str_append(tls, p1, __ccgo_ts+13306, int32(1))
}
if ii1 < libc.Int32FromUint8((*TRtree)(unsafe.Pointer(pRtree)).FnAuxNotNull) {
- Xsqlite3_str_appendf(tls, p1, __ccgo_ts+27238, libc.VaList(bp+8, ii1, ii1+int32(2), ii1))
+ Xsqlite3_str_appendf(tls, p1, __ccgo_ts+27293, libc.VaList(bp+8, ii1, ii1+int32(2), ii1))
} else {
- Xsqlite3_str_appendf(tls, p1, __ccgo_ts+27260, libc.VaList(bp+8, ii1, ii1+int32(2)))
+ Xsqlite3_str_appendf(tls, p1, __ccgo_ts+27315, libc.VaList(bp+8, ii1, ii1+int32(2)))
}
goto _3
_3:
;
ii1++
}
- Xsqlite3_str_appendf(tls, p1, __ccgo_ts+27268, 0)
+ Xsqlite3_str_appendf(tls, p1, __ccgo_ts+27323, 0)
zSql1 = Xsqlite3_str_finish(tls, p1)
if zSql1 == uintptr(0) {
rc = int32(SQLITE_NOMEM)
@@ -179847,14 +180280,14 @@ func _rtreeSqlInit(tls *libc.TLS, pRtree uintptr, db uintptr, zDb uintptr, zPref
}
var _azSql = [8]uintptr{
- 0: __ccgo_ts + 26399,
- 1: __ccgo_ts + 26452,
- 2: __ccgo_ts + 26497,
- 3: __ccgo_ts + 26549,
- 4: __ccgo_ts + 26603,
- 5: __ccgo_ts + 26648,
- 6: __ccgo_ts + 26706,
- 7: __ccgo_ts + 26761,
+ 0: __ccgo_ts + 26454,
+ 1: __ccgo_ts + 26507,
+ 2: __ccgo_ts + 26552,
+ 3: __ccgo_ts + 26604,
+ 4: __ccgo_ts + 26658,
+ 5: __ccgo_ts + 26703,
+ 6: __ccgo_ts + 26761,
+ 7: __ccgo_ts + 26816,
}
// C documentation
@@ -179912,7 +180345,7 @@ func _getNodeSize(tls *libc.TLS, db uintptr, pRtree uintptr, isCreate int32, pzE
_, _ = rc, zSql
if isCreate != 0 {
*(*int32)(unsafe.Pointer(bp)) = 0
- zSql = Xsqlite3_mprintf(tls, __ccgo_ts+27284, libc.VaList(bp+16, (*TRtree)(unsafe.Pointer(pRtree)).FzDb))
+ zSql = Xsqlite3_mprintf(tls, __ccgo_ts+27339, libc.VaList(bp+16, (*TRtree)(unsafe.Pointer(pRtree)).FzDb))
rc = _getIntFromStmt(tls, db, zSql, bp)
if rc == SQLITE_OK {
(*TRtree)(unsafe.Pointer(pRtree)).FiNodeSize = *(*int32)(unsafe.Pointer(bp)) - int32(64)
@@ -179920,17 +180353,17 @@ func _getNodeSize(tls *libc.TLS, db uintptr, pRtree uintptr, isCreate int32, pzE
(*TRtree)(unsafe.Pointer(pRtree)).FiNodeSize = int32(4) + libc.Int32FromUint8((*TRtree)(unsafe.Pointer(pRtree)).FnBytesPerCell)*int32(RTREE_MAXCELLS)
}
} else {
- *(*uintptr)(unsafe.Pointer(pzErr)) = Xsqlite3_mprintf(tls, __ccgo_ts+3864, libc.VaList(bp+16, Xsqlite3_errmsg(tls, db)))
+ *(*uintptr)(unsafe.Pointer(pzErr)) = Xsqlite3_mprintf(tls, __ccgo_ts+3890, libc.VaList(bp+16, Xsqlite3_errmsg(tls, db)))
}
} else {
- zSql = Xsqlite3_mprintf(tls, __ccgo_ts+27304, libc.VaList(bp+16, (*TRtree)(unsafe.Pointer(pRtree)).FzDb, (*TRtree)(unsafe.Pointer(pRtree)).FzName))
+ zSql = Xsqlite3_mprintf(tls, __ccgo_ts+27359, libc.VaList(bp+16, (*TRtree)(unsafe.Pointer(pRtree)).FzDb, (*TRtree)(unsafe.Pointer(pRtree)).FzName))
rc = _getIntFromStmt(tls, db, zSql, pRtree+16)
if rc != SQLITE_OK {
- *(*uintptr)(unsafe.Pointer(pzErr)) = Xsqlite3_mprintf(tls, __ccgo_ts+3864, libc.VaList(bp+16, Xsqlite3_errmsg(tls, db)))
+ *(*uintptr)(unsafe.Pointer(pzErr)) = Xsqlite3_mprintf(tls, __ccgo_ts+3890, libc.VaList(bp+16, Xsqlite3_errmsg(tls, db)))
} else {
if (*TRtree)(unsafe.Pointer(pRtree)).FiNodeSize < libc.Int32FromInt32(512)-libc.Int32FromInt32(64) {
rc = libc.Int32FromInt32(SQLITE_CORRUPT) | libc.Int32FromInt32(1)<<libc.Int32FromInt32(8)
- *(*uintptr)(unsafe.Pointer(pzErr)) = Xsqlite3_mprintf(tls, __ccgo_ts+27361, libc.VaList(bp+16, (*TRtree)(unsafe.Pointer(pRtree)).FzName))
+ *(*uintptr)(unsafe.Pointer(pzErr)) = Xsqlite3_mprintf(tls, __ccgo_ts+27416, libc.VaList(bp+16, (*TRtree)(unsafe.Pointer(pRtree)).FzName))
}
}
}
@@ -179978,14 +180411,14 @@ func _rtreeInit(tls *libc.TLS, db uintptr, pAux uintptr, argc int32, argv uintpt
eCoordType = v1
ii = int32(4)
aErrMsg = [5]uintptr{
- 1: __ccgo_ts + 27396,
- 2: __ccgo_ts + 27439,
- 3: __ccgo_ts + 27474,
- 4: __ccgo_ts + 27510,
+ 1: __ccgo_ts + 27451,
+ 2: __ccgo_ts + 27494,
+ 3: __ccgo_ts + 27529,
+ 4: __ccgo_ts + 27565,
}
/* Aux columns counted by a u8 */
if argc < int32(6) || argc > libc.Int32FromInt32(RTREE_MAX_AUX_COLUMN)+libc.Int32FromInt32(3) {
- *(*uintptr)(unsafe.Pointer(pzErr)) = Xsqlite3_mprintf(tls, __ccgo_ts+3864, libc.VaList(bp+8, aErrMsg[int32(2)+libc.BoolInt32(argc >= int32(6))]))
+ *(*uintptr)(unsafe.Pointer(pzErr)) = Xsqlite3_mprintf(tls, __ccgo_ts+3890, libc.VaList(bp+8, aErrMsg[int32(2)+libc.BoolInt32(argc >= int32(6))]))
return int32(SQLITE_ERROR)
}
Xsqlite3_vtab_config(tls, db, int32(SQLITE_VTAB_CONSTRAINT_SUPPORT), libc.VaList(bp+8, int32(1)))
@@ -180007,13 +180440,13 @@ func _rtreeInit(tls *libc.TLS, db uintptr, pAux uintptr, argc int32, argv uintpt
libc.Xmemcpy(tls, (*TRtree)(unsafe.Pointer(pRtree)).FzDb, *(*uintptr)(unsafe.Pointer(argv + 1*4)), libc.Uint32FromInt32(nDb))
libc.Xmemcpy(tls, (*TRtree)(unsafe.Pointer(pRtree)).FzName, *(*uintptr)(unsafe.Pointer(argv + 2*4)), libc.Uint32FromInt32(nName))
libc.Xmemcpy(tls, (*TRtree)(unsafe.Pointer(pRtree)).FzNodeName, *(*uintptr)(unsafe.Pointer(argv + 2*4)), libc.Uint32FromInt32(nName))
- libc.Xmemcpy(tls, (*TRtree)(unsafe.Pointer(pRtree)).FzNodeName+uintptr(nName), __ccgo_ts+27547, uint32(6))
+ libc.Xmemcpy(tls, (*TRtree)(unsafe.Pointer(pRtree)).FzNodeName+uintptr(nName), __ccgo_ts+27602, uint32(6))
/* Create/Connect to the underlying relational database schema. If
** that is successful, call sqlite3_declare_vtab() to configure
** the r-tree table schema.
*/
pSql = Xsqlite3_str_new(tls, db)
- Xsqlite3_str_appendf(tls, pSql, __ccgo_ts+27553, libc.VaList(bp+8, _rtreeTokenLength(tls, *(*uintptr)(unsafe.Pointer(argv + 3*4))), *(*uintptr)(unsafe.Pointer(argv + 3*4))))
+ Xsqlite3_str_appendf(tls, pSql, __ccgo_ts+27608, libc.VaList(bp+8, _rtreeTokenLength(tls, *(*uintptr)(unsafe.Pointer(argv + 3*4))), *(*uintptr)(unsafe.Pointer(argv + 3*4))))
ii = int32(4)
for {
if !(ii < argc) {
@@ -180022,7 +180455,7 @@ func _rtreeInit(tls *libc.TLS, db uintptr, pAux uintptr, argc int32, argv uintpt
zArg = *(*uintptr)(unsafe.Pointer(argv + uintptr(ii)*4))
if int32(*(*int8)(unsafe.Pointer(zArg))) == int32('+') {
(*TRtree)(unsafe.Pointer(pRtree)).FnAux++
- Xsqlite3_str_appendf(tls, pSql, __ccgo_ts+27577, libc.VaList(bp+8, _rtreeTokenLength(tls, zArg+uintptr(1)), zArg+uintptr(1)))
+ Xsqlite3_str_appendf(tls, pSql, __ccgo_ts+27632, libc.VaList(bp+8, _rtreeTokenLength(tls, zArg+uintptr(1)), zArg+uintptr(1)))
} else {
if libc.Int32FromUint8((*TRtree)(unsafe.Pointer(pRtree)).FnAux) > 0 {
break
@@ -180036,19 +180469,19 @@ func _rtreeInit(tls *libc.TLS, db uintptr, pAux uintptr, argc int32, argv uintpt
;
ii++
}
- Xsqlite3_str_appendf(tls, pSql, __ccgo_ts+27604, 0)
+ Xsqlite3_str_appendf(tls, pSql, __ccgo_ts+27659, 0)
zSql = Xsqlite3_str_finish(tls, pSql)
if !(zSql != 0) {
rc = int32(SQLITE_NOMEM)
} else {
if ii < argc {
- *(*uintptr)(unsafe.Pointer(pzErr)) = Xsqlite3_mprintf(tls, __ccgo_ts+3864, libc.VaList(bp+8, aErrMsg[int32(4)]))
+ *(*uintptr)(unsafe.Pointer(pzErr)) = Xsqlite3_mprintf(tls, __ccgo_ts+3890, libc.VaList(bp+8, aErrMsg[int32(4)]))
rc = int32(SQLITE_ERROR)
} else {
v3 = Xsqlite3_declare_vtab(tls, db, zSql)
rc = v3
if SQLITE_OK != v3 {
- *(*uintptr)(unsafe.Pointer(pzErr)) = Xsqlite3_mprintf(tls, __ccgo_ts+3864, libc.VaList(bp+8, Xsqlite3_errmsg(tls, db)))
+ *(*uintptr)(unsafe.Pointer(pzErr)) = Xsqlite3_mprintf(tls, __ccgo_ts+3890, libc.VaList(bp+8, Xsqlite3_errmsg(tls, db)))
}
}
}
@@ -180071,7 +180504,7 @@ func _rtreeInit(tls *libc.TLS, db uintptr, pAux uintptr, argc int32, argv uintpt
}
}
if iErr != 0 {
- *(*uintptr)(unsafe.Pointer(pzErr)) = Xsqlite3_mprintf(tls, __ccgo_ts+3864, libc.VaList(bp+8, aErrMsg[iErr]))
+ *(*uintptr)(unsafe.Pointer(pzErr)) = Xsqlite3_mprintf(tls, __ccgo_ts+3890, libc.VaList(bp+8, aErrMsg[iErr]))
goto rtreeInit_fail
}
(*TRtree)(unsafe.Pointer(pRtree)).FnBytesPerCell = libc.Uint8FromInt32(int32(8) + libc.Int32FromUint8((*TRtree)(unsafe.Pointer(pRtree)).FnDim2)*int32(4))
@@ -180082,7 +180515,7 @@ func _rtreeInit(tls *libc.TLS, db uintptr, pAux uintptr, argc int32, argv uintpt
}
rc = _rtreeSqlInit(tls, pRtree, db, *(*uintptr)(unsafe.Pointer(argv + 1*4)), *(*uintptr)(unsafe.Pointer(argv + 2*4)), isCreate)
if rc != 0 {
- *(*uintptr)(unsafe.Pointer(pzErr)) = Xsqlite3_mprintf(tls, __ccgo_ts+3864, libc.VaList(bp+8, Xsqlite3_errmsg(tls, db)))
+ *(*uintptr)(unsafe.Pointer(pzErr)) = Xsqlite3_mprintf(tls, __ccgo_ts+3890, libc.VaList(bp+8, Xsqlite3_errmsg(tls, db)))
goto rtreeInit_fail
}
*(*uintptr)(unsafe.Pointer(ppVtab)) = pRtree
@@ -180098,8 +180531,8 @@ rtreeInit_fail:
}
var _azFormat = [2]uintptr{
- 0: __ccgo_ts + 27583,
- 1: __ccgo_ts + 27594,
+ 0: __ccgo_ts + 27638,
+ 1: __ccgo_ts + 27649,
}
// C documentation
@@ -180157,21 +180590,21 @@ func _rtreenode(tls *libc.TLS, ctx uintptr, nArg int32, apArg uintptr) {
}
_nodeGetCell(tls, bp+28, bp, ii, bp+528)
if ii > 0 {
- Xsqlite3_str_append(tls, pOut, __ccgo_ts+11393, int32(1))
+ Xsqlite3_str_append(tls, pOut, __ccgo_ts+11418, int32(1))
}
- Xsqlite3_str_appendf(tls, pOut, __ccgo_ts+27607, libc.VaList(bp+584, (*(*TRtreeCell)(unsafe.Pointer(bp + 528))).FiRowid))
+ Xsqlite3_str_appendf(tls, pOut, __ccgo_ts+27662, libc.VaList(bp+584, (*(*TRtreeCell)(unsafe.Pointer(bp + 528))).FiRowid))
jj = 0
for {
if !(jj < libc.Int32FromUint8((*(*TRtree)(unsafe.Pointer(bp + 28))).FnDim2)) {
break
}
- Xsqlite3_str_appendf(tls, pOut, __ccgo_ts+27613, libc.VaList(bp+584, float64(*(*TRtreeValue)(unsafe.Pointer(bp + 528 + 8 + uintptr(jj)*4)))))
+ Xsqlite3_str_appendf(tls, pOut, __ccgo_ts+27668, libc.VaList(bp+584, float64(*(*TRtreeValue)(unsafe.Pointer(bp + 528 + 8 + uintptr(jj)*4)))))
goto _2
_2:
;
jj++
}
- Xsqlite3_str_append(tls, pOut, __ccgo_ts+27617, int32(1))
+ Xsqlite3_str_append(tls, pOut, __ccgo_ts+27672, int32(1))
goto _1
_1:
;
@@ -180198,7 +180631,7 @@ func _rtreedepth(tls *libc.TLS, ctx uintptr, nArg int32, apArg uintptr) {
_ = zBlob
_ = nArg
if Xsqlite3_value_type(tls, *(*uintptr)(unsafe.Pointer(apArg))) != int32(SQLITE_BLOB) || Xsqlite3_value_bytes(tls, *(*uintptr)(unsafe.Pointer(apArg))) < int32(2) {
- Xsqlite3_result_error(tls, ctx, __ccgo_ts+27619, -int32(1))
+ Xsqlite3_result_error(tls, ctx, __ccgo_ts+27674, -int32(1))
} else {
zBlob = Xsqlite3_value_blob(tls, *(*uintptr)(unsafe.Pointer(apArg)))
if zBlob != 0 {
@@ -180301,7 +180734,7 @@ func _rtreeCheckPrepare(tls *libc.TLS, pCheck uintptr, zFmt uintptr, va uintptr)
// /*
// ** The second and subsequent arguments to this function are a printf()
// ** style format string and arguments. This function formats the string and
-// ** appends it to the report being accumuated in pCheck.
+// ** appends it to the report being accumulated in pCheck.
// */
func _rtreeCheckAppendMsg(tls *libc.TLS, pCheck uintptr, zFmt uintptr, va uintptr) {
bp := tls.Alloc(32)
@@ -180316,11 +180749,11 @@ func _rtreeCheckAppendMsg(tls *libc.TLS, pCheck uintptr, zFmt uintptr, va uintpt
(*TRtreeCheck)(unsafe.Pointer(pCheck)).Frc = int32(SQLITE_NOMEM)
} else {
if (*TRtreeCheck)(unsafe.Pointer(pCheck)).FzReport != 0 {
- v1 = __ccgo_ts + 4272
+ v1 = __ccgo_ts + 4298
} else {
v1 = __ccgo_ts + 1667
}
- (*TRtreeCheck)(unsafe.Pointer(pCheck)).FzReport = Xsqlite3_mprintf(tls, __ccgo_ts+27652, libc.VaList(bp+8, (*TRtreeCheck)(unsafe.Pointer(pCheck)).FzReport, v1, z))
+ (*TRtreeCheck)(unsafe.Pointer(pCheck)).FzReport = Xsqlite3_mprintf(tls, __ccgo_ts+27707, libc.VaList(bp+8, (*TRtreeCheck)(unsafe.Pointer(pCheck)).FzReport, v1, z))
if (*TRtreeCheck)(unsafe.Pointer(pCheck)).FzReport == uintptr(0) {
(*TRtreeCheck)(unsafe.Pointer(pCheck)).Frc = int32(SQLITE_NOMEM)
}
@@ -180354,7 +180787,7 @@ func _rtreeCheckGetNode(tls *libc.TLS, pCheck uintptr, iNode Ti64, pnNode uintpt
_, _, _ = nNode, pNode, pRet
pRet = uintptr(0) /* Return value */
if (*TRtreeCheck)(unsafe.Pointer(pCheck)).Frc == SQLITE_OK && (*TRtreeCheck)(unsafe.Pointer(pCheck)).FpGetNode == uintptr(0) {
- (*TRtreeCheck)(unsafe.Pointer(pCheck)).FpGetNode = _rtreeCheckPrepare(tls, pCheck, __ccgo_ts+27659, libc.VaList(bp+8, (*TRtreeCheck)(unsafe.Pointer(pCheck)).FzDb, (*TRtreeCheck)(unsafe.Pointer(pCheck)).FzTab))
+ (*TRtreeCheck)(unsafe.Pointer(pCheck)).FpGetNode = _rtreeCheckPrepare(tls, pCheck, __ccgo_ts+27714, libc.VaList(bp+8, (*TRtreeCheck)(unsafe.Pointer(pCheck)).FzDb, (*TRtreeCheck)(unsafe.Pointer(pCheck)).FzTab))
}
if (*TRtreeCheck)(unsafe.Pointer(pCheck)).Frc == SQLITE_OK {
Xsqlite3_bind_int64(tls, (*TRtreeCheck)(unsafe.Pointer(pCheck)).FpGetNode, int32(1), iNode)
@@ -180371,7 +180804,7 @@ func _rtreeCheckGetNode(tls *libc.TLS, pCheck uintptr, iNode Ti64, pnNode uintpt
}
_rtreeCheckReset(tls, pCheck, (*TRtreeCheck)(unsafe.Pointer(pCheck)).FpGetNode)
if (*TRtreeCheck)(unsafe.Pointer(pCheck)).Frc == SQLITE_OK && pRet == uintptr(0) {
- _rtreeCheckAppendMsg(tls, pCheck, __ccgo_ts+27704, libc.VaList(bp+8, iNode))
+ _rtreeCheckAppendMsg(tls, pCheck, __ccgo_ts+27759, libc.VaList(bp+8, iNode))
}
}
return pRet
@@ -180400,8 +180833,8 @@ func _rtreeCheckMapping(tls *libc.TLS, pCheck uintptr, bLeaf int32, iKey Ti64, i
var rc int32
_, _, _, _, _, _ = azSql, ii, pStmt, rc, v1, v2
azSql = [2]uintptr{
- 0: __ccgo_ts + 27736,
- 1: __ccgo_ts + 27790,
+ 0: __ccgo_ts + 27791,
+ 1: __ccgo_ts + 27845,
}
if *(*uintptr)(unsafe.Pointer(pCheck + 24 + uintptr(bLeaf)*4)) == uintptr(0) {
*(*uintptr)(unsafe.Pointer(pCheck + 24 + uintptr(bLeaf)*4)) = _rtreeCheckPrepare(tls, pCheck, azSql[bLeaf], libc.VaList(bp+8, (*TRtreeCheck)(unsafe.Pointer(pCheck)).FzDb, (*TRtreeCheck)(unsafe.Pointer(pCheck)).FzTab))
@@ -180414,21 +180847,21 @@ func _rtreeCheckMapping(tls *libc.TLS, pCheck uintptr, bLeaf int32, iKey Ti64, i
rc = Xsqlite3_step(tls, pStmt)
if rc == int32(SQLITE_DONE) {
if bLeaf != 0 {
- v1 = __ccgo_ts + 27838
+ v1 = __ccgo_ts + 27893
} else {
- v1 = __ccgo_ts + 27846
+ v1 = __ccgo_ts + 27901
}
- _rtreeCheckAppendMsg(tls, pCheck, __ccgo_ts+27855, libc.VaList(bp+8, iKey, iVal, v1))
+ _rtreeCheckAppendMsg(tls, pCheck, __ccgo_ts+27910, libc.VaList(bp+8, iKey, iVal, v1))
} else {
if rc == int32(SQLITE_ROW) {
ii = Xsqlite3_column_int64(tls, pStmt, 0)
if ii != iVal {
if bLeaf != 0 {
- v2 = __ccgo_ts + 27838
+ v2 = __ccgo_ts + 27893
} else {
- v2 = __ccgo_ts + 27846
+ v2 = __ccgo_ts + 27901
}
- _rtreeCheckAppendMsg(tls, pCheck, __ccgo_ts+27900, libc.VaList(bp+8, iKey, ii, v2, iKey, iVal))
+ _rtreeCheckAppendMsg(tls, pCheck, __ccgo_ts+27955, libc.VaList(bp+8, iKey, ii, v2, iKey, iVal))
}
}
}
@@ -180473,7 +180906,7 @@ func _rtreeCheckCellCoord(tls *libc.TLS, pCheck uintptr, iNode Ti64, iCell int32
v2 = libc.BoolInt32(*(*TRtreeValue)(unsafe.Pointer(bp)) > *(*TRtreeValue)(unsafe.Pointer(bp + 4)))
}
if v2 != 0 {
- _rtreeCheckAppendMsg(tls, pCheck, __ccgo_ts+27958, libc.VaList(bp+24, i, iCell, iNode))
+ _rtreeCheckAppendMsg(tls, pCheck, __ccgo_ts+28013, libc.VaList(bp+24, i, iCell, iNode))
}
if pParent != 0 {
_readCoord(tls, pParent+uintptr(libc.Int32FromInt32(4)*libc.Int32FromInt32(2)*i), bp+8)
@@ -180491,7 +180924,7 @@ func _rtreeCheckCellCoord(tls *libc.TLS, pCheck uintptr, iNode Ti64, iCell int32
}
}
if v5 || v4 != 0 {
- _rtreeCheckAppendMsg(tls, pCheck, __ccgo_ts+28006, libc.VaList(bp+24, i, iCell, iNode))
+ _rtreeCheckAppendMsg(tls, pCheck, __ccgo_ts+28061, libc.VaList(bp+24, i, iCell, iNode))
}
}
goto _1
@@ -180524,19 +180957,19 @@ func _rtreeCheckNode(tls *libc.TLS, pCheck uintptr, iDepth int32, aParent uintpt
aNode = _rtreeCheckGetNode(tls, pCheck, iNode, bp)
if aNode != 0 {
if *(*int32)(unsafe.Pointer(bp)) < int32(4) {
- _rtreeCheckAppendMsg(tls, pCheck, __ccgo_ts+28073, libc.VaList(bp+16, iNode, *(*int32)(unsafe.Pointer(bp))))
+ _rtreeCheckAppendMsg(tls, pCheck, __ccgo_ts+28128, libc.VaList(bp+16, iNode, *(*int32)(unsafe.Pointer(bp))))
} else { /* Used to iterate through cells */
if aParent == uintptr(0) {
iDepth = _readInt16(tls, aNode)
if iDepth > int32(RTREE_MAX_DEPTH) {
- _rtreeCheckAppendMsg(tls, pCheck, __ccgo_ts+28107, libc.VaList(bp+16, iDepth))
+ _rtreeCheckAppendMsg(tls, pCheck, __ccgo_ts+28162, libc.VaList(bp+16, iDepth))
Xsqlite3_free(tls, aNode)
return
}
}
nCell = _readInt16(tls, aNode+2)
if int32(4)+nCell*(int32(8)+(*TRtreeCheck)(unsafe.Pointer(pCheck)).FnDim*int32(2)*int32(4)) > *(*int32)(unsafe.Pointer(bp)) {
- _rtreeCheckAppendMsg(tls, pCheck, __ccgo_ts+28137, libc.VaList(bp+16, iNode, nCell, *(*int32)(unsafe.Pointer(bp))))
+ _rtreeCheckAppendMsg(tls, pCheck, __ccgo_ts+28192, libc.VaList(bp+16, iNode, nCell, *(*int32)(unsafe.Pointer(bp))))
} else {
i = 0
for {
@@ -180581,12 +181014,12 @@ func _rtreeCheckCount(tls *libc.TLS, pCheck uintptr, zTbl uintptr, nExpect Ti64)
var pCount uintptr
_, _ = nActual, pCount
if (*TRtreeCheck)(unsafe.Pointer(pCheck)).Frc == SQLITE_OK {
- pCount = _rtreeCheckPrepare(tls, pCheck, __ccgo_ts+28192, libc.VaList(bp+8, (*TRtreeCheck)(unsafe.Pointer(pCheck)).FzDb, (*TRtreeCheck)(unsafe.Pointer(pCheck)).FzTab, zTbl))
+ pCount = _rtreeCheckPrepare(tls, pCheck, __ccgo_ts+28247, libc.VaList(bp+8, (*TRtreeCheck)(unsafe.Pointer(pCheck)).FzDb, (*TRtreeCheck)(unsafe.Pointer(pCheck)).FzTab, zTbl))
if pCount != 0 {
if Xsqlite3_step(tls, pCount) == int32(SQLITE_ROW) {
nActual = Xsqlite3_column_int64(tls, pCount, 0)
if nActual != nExpect {
- _rtreeCheckAppendMsg(tls, pCheck, __ccgo_ts+28223, libc.VaList(bp+8, zTbl, nExpect, nActual))
+ _rtreeCheckAppendMsg(tls, pCheck, __ccgo_ts+28278, libc.VaList(bp+8, zTbl, nExpect, nActual))
}
}
(*TRtreeCheck)(unsafe.Pointer(pCheck)).Frc = Xsqlite3_finalize(tls, pCount)
@@ -180615,7 +181048,7 @@ func _rtreeCheckTable(tls *libc.TLS, db uintptr, zDb uintptr, zTab uintptr, pzRe
(*(*TRtreeCheck)(unsafe.Pointer(bp))).FzDb = zDb
(*(*TRtreeCheck)(unsafe.Pointer(bp))).FzTab = zTab
/* Find the number of auxiliary columns */
- pStmt = _rtreeCheckPrepare(tls, bp, __ccgo_ts+28290, libc.VaList(bp+64, zDb, zTab))
+ pStmt = _rtreeCheckPrepare(tls, bp, __ccgo_ts+28345, libc.VaList(bp+64, zDb, zTab))
if pStmt != 0 {
nAux = Xsqlite3_column_count(tls, pStmt) - int32(2)
Xsqlite3_finalize(tls, pStmt)
@@ -180625,11 +181058,11 @@ func _rtreeCheckTable(tls *libc.TLS, db uintptr, zDb uintptr, zTab uintptr, pzRe
}
}
/* Find number of dimensions in the rtree table. */
- pStmt = _rtreeCheckPrepare(tls, bp, __ccgo_ts+26104, libc.VaList(bp+64, zDb, zTab))
+ pStmt = _rtreeCheckPrepare(tls, bp, __ccgo_ts+26159, libc.VaList(bp+64, zDb, zTab))
if pStmt != 0 {
(*(*TRtreeCheck)(unsafe.Pointer(bp))).FnDim = (Xsqlite3_column_count(tls, pStmt) - int32(1) - nAux) / int32(2)
if (*(*TRtreeCheck)(unsafe.Pointer(bp))).FnDim < int32(1) {
- _rtreeCheckAppendMsg(tls, bp, __ccgo_ts+28318, 0)
+ _rtreeCheckAppendMsg(tls, bp, __ccgo_ts+28373, 0)
} else {
if int32(SQLITE_ROW) == Xsqlite3_step(tls, pStmt) {
(*(*TRtreeCheck)(unsafe.Pointer(bp))).FbInt = libc.BoolInt32(Xsqlite3_column_type(tls, pStmt, int32(1)) == int32(SQLITE_INTEGER))
@@ -180645,8 +181078,8 @@ func _rtreeCheckTable(tls *libc.TLS, db uintptr, zDb uintptr, zTab uintptr, pzRe
if (*(*TRtreeCheck)(unsafe.Pointer(bp))).Frc == SQLITE_OK {
_rtreeCheckNode(tls, bp, 0, uintptr(0), int64(1))
}
- _rtreeCheckCount(tls, bp, __ccgo_ts+28349, int64((*(*TRtreeCheck)(unsafe.Pointer(bp))).FnLeaf))
- _rtreeCheckCount(tls, bp, __ccgo_ts+28356, int64((*(*TRtreeCheck)(unsafe.Pointer(bp))).FnNonLeaf))
+ _rtreeCheckCount(tls, bp, __ccgo_ts+28404, int64((*(*TRtreeCheck)(unsafe.Pointer(bp))).FnLeaf))
+ _rtreeCheckCount(tls, bp, __ccgo_ts+28411, int64((*(*TRtreeCheck)(unsafe.Pointer(bp))).FnNonLeaf))
}
/* Finalize SQL statements used by the integrity-check */
Xsqlite3_finalize(tls, (*(*TRtreeCheck)(unsafe.Pointer(bp))).FpGetNode)
@@ -180673,7 +181106,7 @@ func _rtreeIntegrity(tls *libc.TLS, pVtab uintptr, zSchema uintptr, zName uintpt
_ = isQuick
rc = _rtreeCheckTable(tls, (*TRtree)(unsafe.Pointer(pRtree)).Fdb, (*TRtree)(unsafe.Pointer(pRtree)).FzDb, (*TRtree)(unsafe.Pointer(pRtree)).FzName, pzErr)
if rc == SQLITE_OK && *(*uintptr)(unsafe.Pointer(pzErr)) != 0 {
- *(*uintptr)(unsafe.Pointer(pzErr)) = Xsqlite3_mprintf(tls, __ccgo_ts+28364, libc.VaList(bp+8, (*TRtree)(unsafe.Pointer(pRtree)).FzDb, (*TRtree)(unsafe.Pointer(pRtree)).FzName, *(*uintptr)(unsafe.Pointer(pzErr))))
+ *(*uintptr)(unsafe.Pointer(pzErr)) = Xsqlite3_mprintf(tls, __ccgo_ts+28419, libc.VaList(bp+8, (*TRtree)(unsafe.Pointer(pRtree)).FzDb, (*TRtree)(unsafe.Pointer(pRtree)).FzName, *(*uintptr)(unsafe.Pointer(pzErr))))
if *(*uintptr)(unsafe.Pointer(pzErr)) == uintptr(0) {
rc = int32(SQLITE_NOMEM)
}
@@ -180724,13 +181157,13 @@ func _rtreecheck(tls *libc.TLS, ctx uintptr, nArg int32, apArg uintptr) {
var _ /* zReport at bp+0 */ uintptr
_, _, _, _ = rc, zDb, zTab, v1
if nArg != int32(1) && nArg != int32(2) {
- Xsqlite3_result_error(tls, ctx, __ccgo_ts+28383, -int32(1))
+ Xsqlite3_result_error(tls, ctx, __ccgo_ts+28438, -int32(1))
} else {
*(*uintptr)(unsafe.Pointer(bp)) = uintptr(0)
zDb = Xsqlite3_value_text(tls, *(*uintptr)(unsafe.Pointer(apArg)))
if nArg == int32(1) {
zTab = zDb
- zDb = __ccgo_ts + 6715
+ zDb = __ccgo_ts + 6740
} else {
zTab = Xsqlite3_value_text(tls, *(*uintptr)(unsafe.Pointer(apArg + 1*4)))
}
@@ -180739,7 +181172,7 @@ func _rtreecheck(tls *libc.TLS, ctx uintptr, nArg int32, apArg uintptr) {
if *(*uintptr)(unsafe.Pointer(bp)) != 0 {
v1 = *(*uintptr)(unsafe.Pointer(bp))
} else {
- v1 = __ccgo_ts + 18617
+ v1 = __ccgo_ts + 18689
}
Xsqlite3_result_text(tls, ctx, v1, -int32(1), uintptr(-libc.Int32FromInt32(1)))
} else {
@@ -181206,19 +181639,19 @@ func _geopolyJsonFunc(tls *libc.TLS, context uintptr, argc int32, argv uintptr)
if p != 0 {
db = Xsqlite3_context_db_handle(tls, context)
x = Xsqlite3_str_new(tls, db)
- Xsqlite3_str_append(tls, x, __ccgo_ts+25338, int32(1))
+ Xsqlite3_str_append(tls, x, __ccgo_ts+25393, int32(1))
i = 0
for {
if !(i < (*TGeoPoly)(unsafe.Pointer(p)).FnVertex) {
break
}
- Xsqlite3_str_appendf(tls, x, __ccgo_ts+28434, libc.VaList(bp+8, float64(*(*TGeoCoord)(unsafe.Pointer(p + 8 + uintptr(i*int32(2))*4))), float64(*(*TGeoCoord)(unsafe.Pointer(p + 8 + uintptr(i*int32(2)+int32(1))*4)))))
+ Xsqlite3_str_appendf(tls, x, __ccgo_ts+28489, libc.VaList(bp+8, float64(*(*TGeoCoord)(unsafe.Pointer(p + 8 + uintptr(i*int32(2))*4))), float64(*(*TGeoCoord)(unsafe.Pointer(p + 8 + uintptr(i*int32(2)+int32(1))*4)))))
goto _1
_1:
;
i++
}
- Xsqlite3_str_appendf(tls, x, __ccgo_ts+28445, libc.VaList(bp+8, float64(*(*TGeoCoord)(unsafe.Pointer(p + 8 + uintptr(libc.Int32FromInt32(0)*libc.Int32FromInt32(2))*4))), float64(*(*TGeoCoord)(unsafe.Pointer(p + 8 + uintptr(libc.Int32FromInt32(0)*libc.Int32FromInt32(2)+libc.Int32FromInt32(1))*4)))))
+ Xsqlite3_str_appendf(tls, x, __ccgo_ts+28500, libc.VaList(bp+8, float64(*(*TGeoCoord)(unsafe.Pointer(p + 8 + uintptr(libc.Int32FromInt32(0)*libc.Int32FromInt32(2))*4))), float64(*(*TGeoCoord)(unsafe.Pointer(p + 8 + uintptr(libc.Int32FromInt32(0)*libc.Int32FromInt32(2)+libc.Int32FromInt32(1))*4)))))
Xsqlite3_result_text(tls, context, Xsqlite3_str_finish(tls, x), -int32(1), __ccgo_fp(Xsqlite3_free))
Xsqlite3_free(tls, p)
}
@@ -181247,20 +181680,20 @@ func _geopolySvgFunc(tls *libc.TLS, context uintptr, argc int32, argv uintptr) {
db = Xsqlite3_context_db_handle(tls, context)
x = Xsqlite3_str_new(tls, db)
cSep = int8('\'')
- Xsqlite3_str_appendf(tls, x, __ccgo_ts+28456, 0)
+ Xsqlite3_str_appendf(tls, x, __ccgo_ts+28511, 0)
i = 0
for {
if !(i < (*TGeoPoly)(unsafe.Pointer(p)).FnVertex) {
break
}
- Xsqlite3_str_appendf(tls, x, __ccgo_ts+28474, libc.VaList(bp+8, int32(cSep), float64(*(*TGeoCoord)(unsafe.Pointer(p + 8 + uintptr(i*int32(2))*4))), float64(*(*TGeoCoord)(unsafe.Pointer(p + 8 + uintptr(i*int32(2)+int32(1))*4)))))
+ Xsqlite3_str_appendf(tls, x, __ccgo_ts+28529, libc.VaList(bp+8, int32(cSep), float64(*(*TGeoCoord)(unsafe.Pointer(p + 8 + uintptr(i*int32(2))*4))), float64(*(*TGeoCoord)(unsafe.Pointer(p + 8 + uintptr(i*int32(2)+int32(1))*4)))))
cSep = int8(' ')
goto _1
_1:
;
i++
}
- Xsqlite3_str_appendf(tls, x, __ccgo_ts+28482, libc.VaList(bp+8, float64(*(*TGeoCoord)(unsafe.Pointer(p + 8 + uintptr(libc.Int32FromInt32(0)*libc.Int32FromInt32(2))*4))), float64(*(*TGeoCoord)(unsafe.Pointer(p + 8 + uintptr(libc.Int32FromInt32(0)*libc.Int32FromInt32(2)+libc.Int32FromInt32(1))*4)))))
+ Xsqlite3_str_appendf(tls, x, __ccgo_ts+28537, libc.VaList(bp+8, float64(*(*TGeoCoord)(unsafe.Pointer(p + 8 + uintptr(libc.Int32FromInt32(0)*libc.Int32FromInt32(2))*4))), float64(*(*TGeoCoord)(unsafe.Pointer(p + 8 + uintptr(libc.Int32FromInt32(0)*libc.Int32FromInt32(2)+libc.Int32FromInt32(1))*4)))))
i = int32(1)
for {
if !(i < argc) {
@@ -181268,14 +181701,14 @@ func _geopolySvgFunc(tls *libc.TLS, context uintptr, argc int32, argv uintptr) {
}
z = Xsqlite3_value_text(tls, *(*uintptr)(unsafe.Pointer(argv + uintptr(i)*4)))
if z != 0 && *(*int8)(unsafe.Pointer(z)) != 0 {
- Xsqlite3_str_appendf(tls, x, __ccgo_ts+28490, libc.VaList(bp+8, z))
+ Xsqlite3_str_appendf(tls, x, __ccgo_ts+28545, libc.VaList(bp+8, z))
}
goto _2
_2:
;
i++
}
- Xsqlite3_str_appendf(tls, x, __ccgo_ts+28494, 0)
+ Xsqlite3_str_appendf(tls, x, __ccgo_ts+28549, 0)
Xsqlite3_result_text(tls, context, Xsqlite3_str_finish(tls, x), -int32(1), __ccgo_fp(Xsqlite3_free))
Xsqlite3_free(tls, p)
}
@@ -181724,7 +182157,7 @@ func _geopolyBBoxFinal(tls *libc.TLS, context uintptr) {
// ** Determine if point (x0,y0) is beneath line segment (x1,y1)->(x2,y2).
// ** Returns:
// **
-// ** +2 x0,y0 is on the line segement
+// ** +2 x0,y0 is on the line segment
// **
// ** +1 x0,y0 is beneath line segment
// **
@@ -181867,7 +182300,7 @@ func _geopolyWithinFunc(tls *libc.TLS, context uintptr, argc int32, argv uintptr
// C documentation
//
-// /* Objects used by the overlap algorihm. */
+// /* Objects used by the overlap algorithm. */
type TGeoEvent = struct {
Fx float64
FeType int32
@@ -182404,13 +182837,13 @@ func _geopolyInit(tls *libc.TLS, db uintptr, pAux uintptr, argc int32, argv uint
libc.Xmemcpy(tls, (*TRtree)(unsafe.Pointer(pRtree)).FzDb, *(*uintptr)(unsafe.Pointer(argv + 1*4)), libc.Uint32FromInt64(nDb))
libc.Xmemcpy(tls, (*TRtree)(unsafe.Pointer(pRtree)).FzName, *(*uintptr)(unsafe.Pointer(argv + 2*4)), libc.Uint32FromInt64(nName))
libc.Xmemcpy(tls, (*TRtree)(unsafe.Pointer(pRtree)).FzNodeName, *(*uintptr)(unsafe.Pointer(argv + 2*4)), libc.Uint32FromInt64(nName))
- libc.Xmemcpy(tls, (*TRtree)(unsafe.Pointer(pRtree)).FzNodeName+uintptr(nName), __ccgo_ts+27547, uint32(6))
+ libc.Xmemcpy(tls, (*TRtree)(unsafe.Pointer(pRtree)).FzNodeName+uintptr(nName), __ccgo_ts+27602, uint32(6))
/* Create/Connect to the underlying relational database schema. If
** that is successful, call sqlite3_declare_vtab() to configure
** the r-tree table schema.
*/
pSql = Xsqlite3_str_new(tls, db)
- Xsqlite3_str_appendf(tls, pSql, __ccgo_ts+28507, 0)
+ Xsqlite3_str_appendf(tls, pSql, __ccgo_ts+28562, 0)
(*TRtree)(unsafe.Pointer(pRtree)).FnAux = uint8(1) /* Add one for _shape */
(*TRtree)(unsafe.Pointer(pRtree)).FnAuxNotNull = uint8(1) /* The _shape column is always not-null */
ii = int32(3)
@@ -182419,13 +182852,13 @@ func _geopolyInit(tls *libc.TLS, db uintptr, pAux uintptr, argc int32, argv uint
break
}
(*TRtree)(unsafe.Pointer(pRtree)).FnAux++
- Xsqlite3_str_appendf(tls, pSql, __ccgo_ts+28529, libc.VaList(bp+8, *(*uintptr)(unsafe.Pointer(argv + uintptr(ii)*4))))
+ Xsqlite3_str_appendf(tls, pSql, __ccgo_ts+28584, libc.VaList(bp+8, *(*uintptr)(unsafe.Pointer(argv + uintptr(ii)*4))))
goto _1
_1:
;
ii++
}
- Xsqlite3_str_appendf(tls, pSql, __ccgo_ts+27604, 0)
+ Xsqlite3_str_appendf(tls, pSql, __ccgo_ts+27659, 0)
zSql = Xsqlite3_str_finish(tls, pSql)
if !(zSql != 0) {
rc = int32(SQLITE_NOMEM)
@@ -182433,7 +182866,7 @@ func _geopolyInit(tls *libc.TLS, db uintptr, pAux uintptr, argc int32, argv uint
v2 = Xsqlite3_declare_vtab(tls, db, zSql)
rc = v2
if SQLITE_OK != v2 {
- *(*uintptr)(unsafe.Pointer(pzErr)) = Xsqlite3_mprintf(tls, __ccgo_ts+3864, libc.VaList(bp+8, Xsqlite3_errmsg(tls, db)))
+ *(*uintptr)(unsafe.Pointer(pzErr)) = Xsqlite3_mprintf(tls, __ccgo_ts+3890, libc.VaList(bp+8, Xsqlite3_errmsg(tls, db)))
}
}
Xsqlite3_free(tls, zSql)
@@ -182448,7 +182881,7 @@ func _geopolyInit(tls *libc.TLS, db uintptr, pAux uintptr, argc int32, argv uint
}
rc = _rtreeSqlInit(tls, pRtree, db, *(*uintptr)(unsafe.Pointer(argv + 1*4)), *(*uintptr)(unsafe.Pointer(argv + 2*4)), isCreate)
if rc != 0 {
- *(*uintptr)(unsafe.Pointer(pzErr)) = Xsqlite3_mprintf(tls, __ccgo_ts+3864, libc.VaList(bp+8, Xsqlite3_errmsg(tls, db)))
+ *(*uintptr)(unsafe.Pointer(pzErr)) = Xsqlite3_mprintf(tls, __ccgo_ts+3890, libc.VaList(bp+8, Xsqlite3_errmsg(tls, db)))
goto geopolyInit_fail
}
*(*uintptr)(unsafe.Pointer(ppVtab)) = pRtree
@@ -182660,7 +183093,7 @@ func _geopolyBestIndex(tls *libc.TLS, tab uintptr, pIdxInfo uintptr) (r int32) {
}
if iRowidTerm >= 0 {
(*Tsqlite3_index_info)(unsafe.Pointer(pIdxInfo)).FidxNum = int32(1)
- (*Tsqlite3_index_info)(unsafe.Pointer(pIdxInfo)).FidxStr = __ccgo_ts + 16850
+ (*Tsqlite3_index_info)(unsafe.Pointer(pIdxInfo)).FidxStr = __ccgo_ts + 16922
(*(*Tsqlite3_index_constraint_usage)(unsafe.Pointer((*Tsqlite3_index_info)(unsafe.Pointer(pIdxInfo)).FaConstraintUsage + uintptr(iRowidTerm)*8))).FargvIndex = int32(1)
(*(*Tsqlite3_index_constraint_usage)(unsafe.Pointer((*Tsqlite3_index_info)(unsafe.Pointer(pIdxInfo)).FaConstraintUsage + uintptr(iRowidTerm)*8))).Fomit = uint8(1)
(*Tsqlite3_index_info)(unsafe.Pointer(pIdxInfo)).FestimatedCost = float64(30)
@@ -182670,7 +183103,7 @@ func _geopolyBestIndex(tls *libc.TLS, tab uintptr, pIdxInfo uintptr) (r int32) {
}
if iFuncTerm >= 0 {
(*Tsqlite3_index_info)(unsafe.Pointer(pIdxInfo)).FidxNum = idxNum
- (*Tsqlite3_index_info)(unsafe.Pointer(pIdxInfo)).FidxStr = __ccgo_ts + 28533
+ (*Tsqlite3_index_info)(unsafe.Pointer(pIdxInfo)).FidxStr = __ccgo_ts + 28588
(*(*Tsqlite3_index_constraint_usage)(unsafe.Pointer((*Tsqlite3_index_info)(unsafe.Pointer(pIdxInfo)).FaConstraintUsage + uintptr(iFuncTerm)*8))).FargvIndex = int32(1)
(*(*Tsqlite3_index_constraint_usage)(unsafe.Pointer((*Tsqlite3_index_info)(unsafe.Pointer(pIdxInfo)).FaConstraintUsage + uintptr(iFuncTerm)*8))).Fomit = uint8(0)
(*Tsqlite3_index_info)(unsafe.Pointer(pIdxInfo)).FestimatedCost = float64(300)
@@ -182678,7 +183111,7 @@ func _geopolyBestIndex(tls *libc.TLS, tab uintptr, pIdxInfo uintptr) (r int32) {
return SQLITE_OK
}
(*Tsqlite3_index_info)(unsafe.Pointer(pIdxInfo)).FidxNum = int32(4)
- (*Tsqlite3_index_info)(unsafe.Pointer(pIdxInfo)).FidxStr = __ccgo_ts + 28539
+ (*Tsqlite3_index_info)(unsafe.Pointer(pIdxInfo)).FidxStr = __ccgo_ts + 28594
(*Tsqlite3_index_info)(unsafe.Pointer(pIdxInfo)).FestimatedCost = float64(3e+06)
(*Tsqlite3_index_info)(unsafe.Pointer(pIdxInfo)).FestimatedRows = int64(100000)
return SQLITE_OK
@@ -182798,7 +183231,7 @@ func _geopolyUpdate(tls *libc.TLS, pVtab uintptr, nData int32, aData uintptr, pR
_geopolyBBox(tls, uintptr(0), *(*uintptr)(unsafe.Pointer(aData + 2*4)), bp+4+8, bp)
if *(*int32)(unsafe.Pointer(bp)) != 0 {
if *(*int32)(unsafe.Pointer(bp)) == int32(SQLITE_ERROR) {
- (*Tsqlite3_vtab)(unsafe.Pointer(pVtab)).FzErrMsg = Xsqlite3_mprintf(tls, __ccgo_ts+28548, 0)
+ (*Tsqlite3_vtab)(unsafe.Pointer(pVtab)).FzErrMsg = Xsqlite3_mprintf(tls, __ccgo_ts+28603, 0)
}
goto geopoly_update_end
}
@@ -182901,12 +183334,12 @@ geopoly_update_end:
func _geopolyFindFunction(tls *libc.TLS, pVtab uintptr, nArg int32, zName uintptr, pxFunc uintptr, ppArg uintptr) (r int32) {
_ = pVtab
_ = nArg
- if Xsqlite3_stricmp(tls, zName, __ccgo_ts+28588) == 0 {
+ if Xsqlite3_stricmp(tls, zName, __ccgo_ts+28643) == 0 {
*(*uintptr)(unsafe.Pointer(pxFunc)) = __ccgo_fp(_geopolyOverlapFunc)
*(*uintptr)(unsafe.Pointer(ppArg)) = uintptr(0)
return int32(SQLITE_INDEX_CONSTRAINT_FUNCTION)
}
- if Xsqlite3_stricmp(tls, zName, __ccgo_ts+28604) == 0 {
+ if Xsqlite3_stricmp(tls, zName, __ccgo_ts+28659) == 0 {
*(*uintptr)(unsafe.Pointer(pxFunc)) = __ccgo_fp(_geopolyWithinFunc)
*(*uintptr)(unsafe.Pointer(ppArg)) = uintptr(0)
return libc.Int32FromInt32(SQLITE_INDEX_CONSTRAINT_FUNCTION) + libc.Int32FromInt32(1)
@@ -182977,7 +183410,7 @@ func _sqlite3_geopoly_init(tls *libc.TLS, db uintptr) (r int32) {
i++
}
if rc == SQLITE_OK {
- rc = Xsqlite3_create_module_v2(tls, db, __ccgo_ts+28781, uintptr(unsafe.Pointer(&_geopolyModule)), uintptr(0), uintptr(0))
+ rc = Xsqlite3_create_module_v2(tls, db, __ccgo_ts+28836, uintptr(unsafe.Pointer(&_geopolyModule)), uintptr(0), uintptr(0))
}
return rc
}
@@ -182991,61 +183424,61 @@ var _aFunc = [12]struct {
0: {
FnArg: int8(1),
FbPure: uint8(1),
- FzName: __ccgo_ts + 28619,
+ FzName: __ccgo_ts + 28674,
},
1: {
FnArg: int8(1),
FbPure: uint8(1),
- FzName: __ccgo_ts + 28632,
+ FzName: __ccgo_ts + 28687,
},
2: {
FnArg: int8(1),
FbPure: uint8(1),
- FzName: __ccgo_ts + 28645,
+ FzName: __ccgo_ts + 28700,
},
3: {
FnArg: int8(-int32(1)),
FbPure: uint8(1),
- FzName: __ccgo_ts + 28658,
+ FzName: __ccgo_ts + 28713,
},
4: {
FnArg: int8(2),
FbPure: uint8(1),
- FzName: __ccgo_ts + 28604,
+ FzName: __ccgo_ts + 28659,
},
5: {
FnArg: int8(3),
FbPure: uint8(1),
- FzName: __ccgo_ts + 28670,
+ FzName: __ccgo_ts + 28725,
},
6: {
FnArg: int8(2),
FbPure: uint8(1),
- FzName: __ccgo_ts + 28588,
+ FzName: __ccgo_ts + 28643,
},
7: {
FnArg: int8(1),
- FzName: __ccgo_ts + 28693,
+ FzName: __ccgo_ts + 28748,
},
8: {
FnArg: int8(1),
FbPure: uint8(1),
- FzName: __ccgo_ts + 28707,
+ FzName: __ccgo_ts + 28762,
},
9: {
FnArg: int8(7),
FbPure: uint8(1),
- FzName: __ccgo_ts + 28720,
+ FzName: __ccgo_ts + 28775,
},
10: {
FnArg: int8(4),
FbPure: uint8(1),
- FzName: __ccgo_ts + 28734,
+ FzName: __ccgo_ts + 28789,
},
11: {
FnArg: int8(1),
FbPure: uint8(1),
- FzName: __ccgo_ts + 28750,
+ FzName: __ccgo_ts + 28805,
},
}
@@ -183071,7 +183504,7 @@ var _aAgg = [1]struct {
FzName uintptr
}{
0: {
- FzName: __ccgo_ts + 28762,
+ FzName: __ccgo_ts + 28817,
},
}
@@ -183096,20 +183529,20 @@ func _sqlite3RtreeInit(tls *libc.TLS, db uintptr) (r int32) {
var rc, utf8 int32
_, _, _, _ = c, c1, rc, utf8
utf8 = int32(SQLITE_UTF8)
- rc = Xsqlite3_create_function(tls, db, __ccgo_ts+28789, int32(2), utf8, uintptr(0), __ccgo_fp(_rtreenode), uintptr(0), uintptr(0))
+ rc = Xsqlite3_create_function(tls, db, __ccgo_ts+28844, int32(2), utf8, uintptr(0), __ccgo_fp(_rtreenode), uintptr(0), uintptr(0))
if rc == SQLITE_OK {
- rc = Xsqlite3_create_function(tls, db, __ccgo_ts+28799, int32(1), utf8, uintptr(0), __ccgo_fp(_rtreedepth), uintptr(0), uintptr(0))
+ rc = Xsqlite3_create_function(tls, db, __ccgo_ts+28854, int32(1), utf8, uintptr(0), __ccgo_fp(_rtreedepth), uintptr(0), uintptr(0))
}
if rc == SQLITE_OK {
- rc = Xsqlite3_create_function(tls, db, __ccgo_ts+28810, -int32(1), utf8, uintptr(0), __ccgo_fp(_rtreecheck), uintptr(0), uintptr(0))
+ rc = Xsqlite3_create_function(tls, db, __ccgo_ts+28865, -int32(1), utf8, uintptr(0), __ccgo_fp(_rtreecheck), uintptr(0), uintptr(0))
}
if rc == SQLITE_OK {
c = libc.UintptrFromInt32(RTREE_COORD_REAL32)
- rc = Xsqlite3_create_module_v2(tls, db, __ccgo_ts+28533, uintptr(unsafe.Pointer(&_rtreeModule)), c, uintptr(0))
+ rc = Xsqlite3_create_module_v2(tls, db, __ccgo_ts+28588, uintptr(unsafe.Pointer(&_rtreeModule)), c, uintptr(0))
}
if rc == SQLITE_OK {
c1 = libc.UintptrFromInt32(RTREE_COORD_INT32)
- rc = Xsqlite3_create_module_v2(tls, db, __ccgo_ts+28821, uintptr(unsafe.Pointer(&_rtreeModule)), c1, uintptr(0))
+ rc = Xsqlite3_create_module_v2(tls, db, __ccgo_ts+28876, uintptr(unsafe.Pointer(&_rtreeModule)), c1, uintptr(0))
}
if rc == SQLITE_OK {
rc = _sqlite3_geopoly_init(tls, db)
@@ -183183,7 +183616,7 @@ func _geomCallback(tls *libc.TLS, ctx uintptr, nArg int32, aArg uintptr) {
_, _, _, _, _ = i, memErr, nBlob, pBlob, pGeomCtx
pGeomCtx = Xsqlite3_user_data(tls, ctx)
memErr = 0
- nBlob = libc.Int64FromUint32(uint32(36) + libc.Uint32FromInt32(nArg-libc.Int32FromInt32(1))*uint32(8) + libc.Uint32FromInt32(nArg)*uint32(4))
+ nBlob = libc.Int64FromUint32(uint32(libc.UintptrFromInt32(0)+28) + libc.Uint32FromInt32(nArg)*uint32(8) + libc.Uint32FromInt32(nArg)*uint32(4))
pBlob = Xsqlite3_malloc64(tls, libc.Uint64FromInt64(nBlob))
if !(pBlob != 0) {
Xsqlite3_result_error_nomem(tls, ctx)
@@ -183211,7 +183644,7 @@ func _geomCallback(tls *libc.TLS, ctx uintptr, nArg int32, aArg uintptr) {
Xsqlite3_result_error_nomem(tls, ctx)
_rtreeMatchArgFree(tls, pBlob)
} else {
- Xsqlite3_result_pointer(tls, ctx, pBlob, __ccgo_ts+26090, __ccgo_fp(_rtreeMatchArgFree))
+ Xsqlite3_result_pointer(tls, ctx, pBlob, __ccgo_ts+26145, __ccgo_fp(_rtreeMatchArgFree))
}
}
}
@@ -183452,7 +183885,7 @@ func Xsqlite3_rtree_query_callback(tls *libc.TLS, db uintptr, zQueryFunc uintptr
**
** "RBU" stands for "Resumable Bulk Update". As in a large database update
** transmitted via a wireless network to a mobile device. A transaction
-** applied using this extension is hence refered to as an "RBU update".
+** applied using this extension is hence referred to as an "RBU update".
**
**
** LIMITATIONS
@@ -184428,7 +184861,7 @@ func _rbuFossilDeltaFunc(tls *libc.TLS, context uintptr, argc int32, argv uintpt
/* Figure out the size of the output */
nOut = _rbuDeltaOutputSize(tls, aDelta, nDelta)
if nOut < 0 {
- Xsqlite3_result_error(tls, context, __ccgo_ts+28831, -int32(1))
+ Xsqlite3_result_error(tls, context, __ccgo_ts+28886, -int32(1))
return
}
aOut = Xsqlite3_malloc(tls, nOut+int32(1))
@@ -184438,7 +184871,7 @@ func _rbuFossilDeltaFunc(tls *libc.TLS, context uintptr, argc int32, argv uintpt
nOut2 = _rbuDeltaApply(tls, aOrig, nOrig, aDelta, nDelta, aOut)
if nOut2 != nOut {
Xsqlite3_free(tls, aOut)
- Xsqlite3_result_error(tls, context, __ccgo_ts+28831, -int32(1))
+ Xsqlite3_result_error(tls, context, __ccgo_ts+28886, -int32(1))
} else {
Xsqlite3_result_blob(tls, context, aOut, nOut, __ccgo_fp(Xsqlite3_free))
}
@@ -184464,7 +184897,7 @@ func _prepareAndCollectError(tls *libc.TLS, db uintptr, ppStmt uintptr, pzErrmsg
_ = rc
rc = Xsqlite3_prepare_v2(tls, db, zSql, -int32(1), ppStmt, uintptr(0))
if rc != SQLITE_OK {
- *(*uintptr)(unsafe.Pointer(pzErrmsg)) = Xsqlite3_mprintf(tls, __ccgo_ts+3864, libc.VaList(bp+8, Xsqlite3_errmsg(tls, db)))
+ *(*uintptr)(unsafe.Pointer(pzErrmsg)) = Xsqlite3_mprintf(tls, __ccgo_ts+3890, libc.VaList(bp+8, Xsqlite3_errmsg(tls, db)))
*(*uintptr)(unsafe.Pointer(ppStmt)) = uintptr(0)
}
return rc
@@ -184487,7 +184920,7 @@ func _resetAndCollectError(tls *libc.TLS, pStmt uintptr, pzErrmsg uintptr) (r in
_ = rc
rc = Xsqlite3_reset(tls, pStmt)
if rc != SQLITE_OK {
- *(*uintptr)(unsafe.Pointer(pzErrmsg)) = Xsqlite3_mprintf(tls, __ccgo_ts+3864, libc.VaList(bp+8, Xsqlite3_errmsg(tls, Xsqlite3_db_handle(tls, pStmt))))
+ *(*uintptr)(unsafe.Pointer(pzErrmsg)) = Xsqlite3_mprintf(tls, __ccgo_ts+3890, libc.VaList(bp+8, Xsqlite3_errmsg(tls, Xsqlite3_db_handle(tls, pStmt))))
}
return rc
}
@@ -184619,7 +185052,7 @@ func _rbuObjIterNext(tls *libc.TLS, p uintptr, pIter uintptr) (r int32) {
/* Free any SQLite statements used while processing the previous object */
_rbuObjIterClearStatements(tls, pIter)
if (*TRbuObjIter)(unsafe.Pointer(pIter)).FzIdx == uintptr(0) {
- rc = Xsqlite3_exec(tls, (*Tsqlite3rbu)(unsafe.Pointer(p)).FdbMain, __ccgo_ts+28852, uintptr(0), uintptr(0), p+36)
+ rc = Xsqlite3_exec(tls, (*Tsqlite3rbu)(unsafe.Pointer(p)).FdbMain, __ccgo_ts+28907, uintptr(0), uintptr(0), p+36)
}
if rc == SQLITE_OK {
if (*TRbuObjIter)(unsafe.Pointer(pIter)).FbCleanup != 0 {
@@ -184708,7 +185141,7 @@ func _rbuTargetNameFunc(tls *libc.TLS, pCtx uintptr, argc int32, argv uintptr) {
Xsqlite3_result_text(tls, pCtx, zIn, -int32(1), libc.UintptrFromInt32(0))
}
} else {
- if libc.Xstrlen(tls, zIn) > uint32(4) && libc.Xmemcmp(tls, __ccgo_ts+26003, zIn, uint32(4)) == 0 {
+ if libc.Xstrlen(tls, zIn) > uint32(4) && libc.Xmemcmp(tls, __ccgo_ts+26058, zIn, uint32(4)) == 0 {
i = int32(4)
for {
if !(int32(*(*int8)(unsafe.Pointer(zIn + uintptr(i)))) >= int32('0') && int32(*(*int8)(unsafe.Pointer(zIn + uintptr(i)))) <= int32('9')) {
@@ -184745,13 +185178,13 @@ func _rbuObjIterFirst(tls *libc.TLS, p uintptr, pIter uintptr) (r int32) {
_, _ = rc, v1
libc.Xmemset(tls, pIter, 0, uint32(108))
if (*Tsqlite3rbu)(unsafe.Pointer(p)).FzTarget == uintptr(0) {
- v1 = __ccgo_ts + 29023
+ v1 = __ccgo_ts + 29078
} else {
v1 = __ccgo_ts + 1667
}
- rc = _prepareFreeAndCollectError(tls, (*Tsqlite3rbu)(unsafe.Pointer(p)).FdbRbu, pIter, p+36, Xsqlite3_mprintf(tls, __ccgo_ts+29064, libc.VaList(bp+8, v1)))
+ rc = _prepareFreeAndCollectError(tls, (*Tsqlite3rbu)(unsafe.Pointer(p)).FdbRbu, pIter, p+36, Xsqlite3_mprintf(tls, __ccgo_ts+29119, libc.VaList(bp+8, v1)))
if rc == SQLITE_OK {
- rc = _prepareAndCollectError(tls, (*Tsqlite3rbu)(unsafe.Pointer(p)).FdbMain, pIter+4, p+36, __ccgo_ts+29214)
+ rc = _prepareAndCollectError(tls, (*Tsqlite3rbu)(unsafe.Pointer(p)).FdbMain, pIter+4, p+36, __ccgo_ts+29269)
}
(*TRbuObjIter)(unsafe.Pointer(pIter)).FbCleanup = int32(1)
(*Tsqlite3rbu)(unsafe.Pointer(p)).Frc = rc
@@ -184918,7 +185351,7 @@ func _rbuFinalize(tls *libc.TLS, p uintptr, pStmt uintptr) {
rc = Xsqlite3_finalize(tls, pStmt)
if (*Tsqlite3rbu)(unsafe.Pointer(p)).Frc == SQLITE_OK && rc != SQLITE_OK {
(*Tsqlite3rbu)(unsafe.Pointer(p)).Frc = rc
- (*Tsqlite3rbu)(unsafe.Pointer(p)).FzErrmsg = Xsqlite3_mprintf(tls, __ccgo_ts+3864, libc.VaList(bp+8, Xsqlite3_errmsg(tls, db)))
+ (*Tsqlite3rbu)(unsafe.Pointer(p)).FzErrmsg = Xsqlite3_mprintf(tls, __ccgo_ts+3890, libc.VaList(bp+8, Xsqlite3_errmsg(tls, db)))
}
}
@@ -184979,7 +185412,7 @@ func _rbuTableType(tls *libc.TLS, p uintptr, zTab uintptr, peType uintptr, piTnu
*(*[4]uintptr)(unsafe.Pointer(bp)) = [4]uintptr{}
*(*int32)(unsafe.Pointer(peType)) = RBU_PK_NOTABLE
*(*int32)(unsafe.Pointer(piPk)) = 0
- (*Tsqlite3rbu)(unsafe.Pointer(p)).Frc = _prepareFreeAndCollectError(tls, (*Tsqlite3rbu)(unsafe.Pointer(p)).FdbMain, bp, p+36, Xsqlite3_mprintf(tls, __ccgo_ts+29339, libc.VaList(bp+24, zTab)))
+ (*Tsqlite3rbu)(unsafe.Pointer(p)).Frc = _prepareFreeAndCollectError(tls, (*Tsqlite3rbu)(unsafe.Pointer(p)).FdbMain, bp, p+36, Xsqlite3_mprintf(tls, __ccgo_ts+29394, libc.VaList(bp+24, zTab)))
if (*Tsqlite3rbu)(unsafe.Pointer(p)).Frc != SQLITE_OK || Xsqlite3_step(tls, (*(*[4]uintptr)(unsafe.Pointer(bp)))[0]) != int32(SQLITE_ROW) {
/* Either an error, or no such table. */
goto rbuTableType_end
@@ -184989,7 +185422,7 @@ func _rbuTableType(tls *libc.TLS, p uintptr, zTab uintptr, peType uintptr, piTnu
goto rbuTableType_end
}
*(*int32)(unsafe.Pointer(piTnum)) = Xsqlite3_column_int(tls, (*(*[4]uintptr)(unsafe.Pointer(bp)))[0], int32(1))
- (*Tsqlite3rbu)(unsafe.Pointer(p)).Frc = _prepareFreeAndCollectError(tls, (*Tsqlite3rbu)(unsafe.Pointer(p)).FdbMain, bp+1*4, p+36, Xsqlite3_mprintf(tls, __ccgo_ts+29458, libc.VaList(bp+24, zTab)))
+ (*Tsqlite3rbu)(unsafe.Pointer(p)).Frc = _prepareFreeAndCollectError(tls, (*Tsqlite3rbu)(unsafe.Pointer(p)).FdbMain, bp+1*4, p+36, Xsqlite3_mprintf(tls, __ccgo_ts+29513, libc.VaList(bp+24, zTab)))
if (*Tsqlite3rbu)(unsafe.Pointer(p)).Frc != 0 {
goto rbuTableType_end
}
@@ -184997,7 +185430,7 @@ func _rbuTableType(tls *libc.TLS, p uintptr, zTab uintptr, peType uintptr, piTnu
zOrig = Xsqlite3_column_text(tls, (*(*[4]uintptr)(unsafe.Pointer(bp)))[int32(1)], int32(3))
zIdx = Xsqlite3_column_text(tls, (*(*[4]uintptr)(unsafe.Pointer(bp)))[int32(1)], int32(1))
if zOrig != 0 && zIdx != 0 && libc.Int32FromUint8(*(*Tu8)(unsafe.Pointer(zOrig))) == int32('p') {
- (*Tsqlite3rbu)(unsafe.Pointer(p)).Frc = _prepareFreeAndCollectError(tls, (*Tsqlite3rbu)(unsafe.Pointer(p)).FdbMain, bp+2*4, p+36, Xsqlite3_mprintf(tls, __ccgo_ts+29479, libc.VaList(bp+24, zIdx)))
+ (*Tsqlite3rbu)(unsafe.Pointer(p)).Frc = _prepareFreeAndCollectError(tls, (*Tsqlite3rbu)(unsafe.Pointer(p)).FdbMain, bp+2*4, p+36, Xsqlite3_mprintf(tls, __ccgo_ts+29534, libc.VaList(bp+24, zIdx)))
if (*Tsqlite3rbu)(unsafe.Pointer(p)).Frc == SQLITE_OK {
if Xsqlite3_step(tls, (*(*[4]uintptr)(unsafe.Pointer(bp)))[int32(2)]) == int32(SQLITE_ROW) {
*(*int32)(unsafe.Pointer(piPk)) = Xsqlite3_column_int(tls, (*(*[4]uintptr)(unsafe.Pointer(bp)))[int32(2)], 0)
@@ -185009,7 +185442,7 @@ func _rbuTableType(tls *libc.TLS, p uintptr, zTab uintptr, peType uintptr, piTnu
goto rbuTableType_end
}
}
- (*Tsqlite3rbu)(unsafe.Pointer(p)).Frc = _prepareFreeAndCollectError(tls, (*Tsqlite3rbu)(unsafe.Pointer(p)).FdbMain, bp+3*4, p+36, Xsqlite3_mprintf(tls, __ccgo_ts+29530, libc.VaList(bp+24, zTab)))
+ (*Tsqlite3rbu)(unsafe.Pointer(p)).Frc = _prepareFreeAndCollectError(tls, (*Tsqlite3rbu)(unsafe.Pointer(p)).FdbMain, bp+3*4, p+36, Xsqlite3_mprintf(tls, __ccgo_ts+29585, libc.VaList(bp+24, zTab)))
if (*Tsqlite3rbu)(unsafe.Pointer(p)).Frc == SQLITE_OK {
for Xsqlite3_step(tls, (*(*[4]uintptr)(unsafe.Pointer(bp)))[int32(3)]) == int32(SQLITE_ROW) {
if Xsqlite3_column_int(tls, (*(*[4]uintptr)(unsafe.Pointer(bp)))[int32(3)], int32(5)) > 0 {
@@ -185053,7 +185486,7 @@ func _rbuObjIterCacheIndexedCols(tls *libc.TLS, p uintptr, pIter uintptr) {
bIndex = 0
if (*Tsqlite3rbu)(unsafe.Pointer(p)).Frc == SQLITE_OK {
libc.Xmemcpy(tls, (*TRbuObjIter)(unsafe.Pointer(pIter)).FabIndexed, (*TRbuObjIter)(unsafe.Pointer(pIter)).FabTblPk, uint32(1)*libc.Uint32FromInt32((*TRbuObjIter)(unsafe.Pointer(pIter)).FnTblCol))
- (*Tsqlite3rbu)(unsafe.Pointer(p)).Frc = _prepareFreeAndCollectError(tls, (*Tsqlite3rbu)(unsafe.Pointer(p)).FdbMain, bp, p+36, Xsqlite3_mprintf(tls, __ccgo_ts+29551, libc.VaList(bp+16, (*TRbuObjIter)(unsafe.Pointer(pIter)).FzTbl)))
+ (*Tsqlite3rbu)(unsafe.Pointer(p)).Frc = _prepareFreeAndCollectError(tls, (*Tsqlite3rbu)(unsafe.Pointer(p)).FdbMain, bp, p+36, Xsqlite3_mprintf(tls, __ccgo_ts+29606, libc.VaList(bp+16, (*TRbuObjIter)(unsafe.Pointer(pIter)).FzTbl)))
}
(*TRbuObjIter)(unsafe.Pointer(pIter)).FnIndex = 0
for (*Tsqlite3rbu)(unsafe.Pointer(p)).Frc == SQLITE_OK && int32(SQLITE_ROW) == Xsqlite3_step(tls, *(*uintptr)(unsafe.Pointer(bp))) {
@@ -185066,7 +185499,7 @@ func _rbuObjIterCacheIndexedCols(tls *libc.TLS, p uintptr, pIter uintptr) {
if bPartial != 0 {
libc.Xmemset(tls, (*TRbuObjIter)(unsafe.Pointer(pIter)).FabIndexed, int32(0x01), uint32(1)*libc.Uint32FromInt32((*TRbuObjIter)(unsafe.Pointer(pIter)).FnTblCol))
}
- (*Tsqlite3rbu)(unsafe.Pointer(p)).Frc = _prepareFreeAndCollectError(tls, (*Tsqlite3rbu)(unsafe.Pointer(p)).FdbMain, bp+4, p+36, Xsqlite3_mprintf(tls, __ccgo_ts+29579, libc.VaList(bp+16, zIdx)))
+ (*Tsqlite3rbu)(unsafe.Pointer(p)).Frc = _prepareFreeAndCollectError(tls, (*Tsqlite3rbu)(unsafe.Pointer(p)).FdbMain, bp+4, p+36, Xsqlite3_mprintf(tls, __ccgo_ts+29634, libc.VaList(bp+16, zIdx)))
for (*Tsqlite3rbu)(unsafe.Pointer(p)).Frc == SQLITE_OK && int32(SQLITE_ROW) == Xsqlite3_step(tls, *(*uintptr)(unsafe.Pointer(bp + 4))) {
iCid = Xsqlite3_column_int(tls, *(*uintptr)(unsafe.Pointer(bp + 4)), int32(1))
if iCid >= 0 {
@@ -185119,7 +185552,7 @@ func _rbuObjIterCacheTableInfo(tls *libc.TLS, p uintptr, pIter uintptr) (r int32
_rbuTableType(tls, p, (*TRbuObjIter)(unsafe.Pointer(pIter)).FzTbl, pIter+36, bp+4, pIter+60)
if (*Tsqlite3rbu)(unsafe.Pointer(p)).Frc == SQLITE_OK && (*TRbuObjIter)(unsafe.Pointer(pIter)).FeType == RBU_PK_NOTABLE {
(*Tsqlite3rbu)(unsafe.Pointer(p)).Frc = int32(SQLITE_ERROR)
- (*Tsqlite3rbu)(unsafe.Pointer(p)).FzErrmsg = Xsqlite3_mprintf(tls, __ccgo_ts+20125, libc.VaList(bp+16, (*TRbuObjIter)(unsafe.Pointer(pIter)).FzTbl))
+ (*Tsqlite3rbu)(unsafe.Pointer(p)).FzErrmsg = Xsqlite3_mprintf(tls, __ccgo_ts+20197, libc.VaList(bp+16, (*TRbuObjIter)(unsafe.Pointer(pIter)).FzTbl))
}
if (*Tsqlite3rbu)(unsafe.Pointer(p)).Frc != 0 {
return (*Tsqlite3rbu)(unsafe.Pointer(p)).Frc
@@ -185130,7 +185563,7 @@ func _rbuObjIterCacheTableInfo(tls *libc.TLS, p uintptr, pIter uintptr) (r int32
/* Populate the azTblCol[] and nTblCol variables based on the columns
** of the input table. Ignore any input table columns that begin with
** "rbu_". */
- (*Tsqlite3rbu)(unsafe.Pointer(p)).Frc = _prepareFreeAndCollectError(tls, (*Tsqlite3rbu)(unsafe.Pointer(p)).FdbRbu, bp, p+36, Xsqlite3_mprintf(tls, __ccgo_ts+29608, libc.VaList(bp+16, (*TRbuObjIter)(unsafe.Pointer(pIter)).FzDataTbl)))
+ (*Tsqlite3rbu)(unsafe.Pointer(p)).Frc = _prepareFreeAndCollectError(tls, (*Tsqlite3rbu)(unsafe.Pointer(p)).FdbRbu, bp, p+36, Xsqlite3_mprintf(tls, __ccgo_ts+29663, libc.VaList(bp+16, (*TRbuObjIter)(unsafe.Pointer(pIter)).FzDataTbl)))
if (*Tsqlite3rbu)(unsafe.Pointer(p)).Frc == SQLITE_OK {
nCol = Xsqlite3_column_count(tls, *(*uintptr)(unsafe.Pointer(bp)))
_rbuAllocateIterArrays(tls, p, pIter, nCol)
@@ -185141,7 +185574,7 @@ func _rbuObjIterCacheTableInfo(tls *libc.TLS, p uintptr, pIter uintptr) (r int32
break
}
zName = Xsqlite3_column_name(tls, *(*uintptr)(unsafe.Pointer(bp)), i)
- if Xsqlite3_strnicmp(tls, __ccgo_ts+29627, zName, int32(4)) != 0 {
+ if Xsqlite3_strnicmp(tls, __ccgo_ts+29682, zName, int32(4)) != 0 {
zCopy = _rbuStrndup(tls, zName, p+32)
*(*int32)(unsafe.Pointer((*TRbuObjIter)(unsafe.Pointer(pIter)).FaiSrcOrder + uintptr((*TRbuObjIter)(unsafe.Pointer(pIter)).FnTblCol)*4)) = (*TRbuObjIter)(unsafe.Pointer(pIter)).FnTblCol
v3 = pIter + 8
@@ -185149,7 +185582,7 @@ func _rbuObjIterCacheTableInfo(tls *libc.TLS, p uintptr, pIter uintptr) (r int32
*(*int32)(unsafe.Pointer(v3))++
*(*uintptr)(unsafe.Pointer((*TRbuObjIter)(unsafe.Pointer(pIter)).FazTblCol + uintptr(v2)*4)) = zCopy
} else {
- if 0 == Xsqlite3_stricmp(tls, __ccgo_ts+29632, zName) {
+ if 0 == Xsqlite3_stricmp(tls, __ccgo_ts+29687, zName) {
bRbuRowid = int32(1)
}
}
@@ -185163,17 +185596,17 @@ func _rbuObjIterCacheTableInfo(tls *libc.TLS, p uintptr, pIter uintptr) (r int32
if (*Tsqlite3rbu)(unsafe.Pointer(p)).Frc == SQLITE_OK && libc.BoolInt32((*Tsqlite3rbu)(unsafe.Pointer(p)).FzTarget == uintptr(0)) == 0 && bRbuRowid != libc.BoolInt32((*TRbuObjIter)(unsafe.Pointer(pIter)).FeType == int32(RBU_PK_VTAB) || (*TRbuObjIter)(unsafe.Pointer(pIter)).FeType == int32(RBU_PK_NONE)) {
(*Tsqlite3rbu)(unsafe.Pointer(p)).Frc = int32(SQLITE_ERROR)
if bRbuRowid != 0 {
- v4 = __ccgo_ts + 29642
+ v4 = __ccgo_ts + 29697
} else {
- v4 = __ccgo_ts + 29655
+ v4 = __ccgo_ts + 29710
}
- (*Tsqlite3rbu)(unsafe.Pointer(p)).FzErrmsg = Xsqlite3_mprintf(tls, __ccgo_ts+29664, libc.VaList(bp+16, (*TRbuObjIter)(unsafe.Pointer(pIter)).FzDataTbl, v4))
+ (*Tsqlite3rbu)(unsafe.Pointer(p)).FzErrmsg = Xsqlite3_mprintf(tls, __ccgo_ts+29719, libc.VaList(bp+16, (*TRbuObjIter)(unsafe.Pointer(pIter)).FzDataTbl, v4))
}
/* Check that all non-HIDDEN columns in the destination table are also
** present in the input table. Populate the abTblPk[], azTblType[] and
** aiTblOrder[] arrays at the same time. */
if (*Tsqlite3rbu)(unsafe.Pointer(p)).Frc == SQLITE_OK {
- (*Tsqlite3rbu)(unsafe.Pointer(p)).Frc = _prepareFreeAndCollectError(tls, (*Tsqlite3rbu)(unsafe.Pointer(p)).FdbMain, bp, p+36, Xsqlite3_mprintf(tls, __ccgo_ts+29693, libc.VaList(bp+16, (*TRbuObjIter)(unsafe.Pointer(pIter)).FzTbl)))
+ (*Tsqlite3rbu)(unsafe.Pointer(p)).Frc = _prepareFreeAndCollectError(tls, (*Tsqlite3rbu)(unsafe.Pointer(p)).FdbMain, bp, p+36, Xsqlite3_mprintf(tls, __ccgo_ts+29748, libc.VaList(bp+16, (*TRbuObjIter)(unsafe.Pointer(pIter)).FzTbl)))
}
for (*Tsqlite3rbu)(unsafe.Pointer(p)).Frc == SQLITE_OK && int32(SQLITE_ROW) == Xsqlite3_step(tls, *(*uintptr)(unsafe.Pointer(bp))) {
zName1 = Xsqlite3_column_text(tls, *(*uintptr)(unsafe.Pointer(bp)), int32(1))
@@ -185195,7 +185628,7 @@ func _rbuObjIterCacheTableInfo(tls *libc.TLS, p uintptr, pIter uintptr) (r int32
}
if i == (*TRbuObjIter)(unsafe.Pointer(pIter)).FnTblCol {
(*Tsqlite3rbu)(unsafe.Pointer(p)).Frc = int32(SQLITE_ERROR)
- (*Tsqlite3rbu)(unsafe.Pointer(p)).FzErrmsg = Xsqlite3_mprintf(tls, __ccgo_ts+29715, libc.VaList(bp+16, (*TRbuObjIter)(unsafe.Pointer(pIter)).FzDataTbl, zName1))
+ (*Tsqlite3rbu)(unsafe.Pointer(p)).FzErrmsg = Xsqlite3_mprintf(tls, __ccgo_ts+29770, libc.VaList(bp+16, (*TRbuObjIter)(unsafe.Pointer(pIter)).FzDataTbl, zName1))
} else {
iPk = Xsqlite3_column_int(tls, *(*uintptr)(unsafe.Pointer(bp)), int32(5))
bNotNull = Xsqlite3_column_int(tls, *(*uintptr)(unsafe.Pointer(bp)), int32(3))
@@ -185241,8 +185674,8 @@ func _rbuObjIterGetCollist(tls *libc.TLS, p uintptr, pIter uintptr) (r uintptr)
break
}
z = *(*uintptr)(unsafe.Pointer((*TRbuObjIter)(unsafe.Pointer(pIter)).FazTblCol + uintptr(i)*4))
- zList = _rbuMPrintf(tls, p, __ccgo_ts+29742, libc.VaList(bp+8, zList, zSep, z))
- zSep = __ccgo_ts + 15149
+ zList = _rbuMPrintf(tls, p, __ccgo_ts+29797, libc.VaList(bp+8, zList, zSep, z))
+ zSep = __ccgo_ts + 15174
goto _1
_1:
;
@@ -185276,7 +185709,7 @@ func _rbuObjIterGetPkList(tls *libc.TLS, p uintptr, pIter uintptr, zPre uintptr,
}
if libc.Int32FromUint8(*(*Tu8)(unsafe.Pointer((*TRbuObjIter)(unsafe.Pointer(pIter)).FabTblPk + uintptr(i)))) == iPk {
zCol = *(*uintptr)(unsafe.Pointer((*TRbuObjIter)(unsafe.Pointer(pIter)).FazTblCol + uintptr(i)*4))
- zRet = _rbuMPrintf(tls, p, __ccgo_ts+29751, libc.VaList(bp+8, zRet, zSep, zPre, zCol, zPost))
+ zRet = _rbuMPrintf(tls, p, __ccgo_ts+29806, libc.VaList(bp+8, zRet, zSep, zPre, zCol, zPost))
zSep = zSeparator
break
}
@@ -185324,21 +185757,21 @@ func _rbuVacuumTableStart(tls *libc.TLS, p uintptr, pIter uintptr, bRowid int32,
*(*uintptr)(unsafe.Pointer(bp)) = uintptr(0)
zRet = uintptr(0)
if bRowid != 0 {
- (*Tsqlite3rbu)(unsafe.Pointer(p)).Frc = _prepareFreeAndCollectError(tls, (*Tsqlite3rbu)(unsafe.Pointer(p)).FdbMain, bp, p+36, Xsqlite3_mprintf(tls, __ccgo_ts+29764, libc.VaList(bp+16, zWrite, (*TRbuObjIter)(unsafe.Pointer(pIter)).FzTbl)))
+ (*Tsqlite3rbu)(unsafe.Pointer(p)).Frc = _prepareFreeAndCollectError(tls, (*Tsqlite3rbu)(unsafe.Pointer(p)).FdbMain, bp, p+36, Xsqlite3_mprintf(tls, __ccgo_ts+29819, libc.VaList(bp+16, zWrite, (*TRbuObjIter)(unsafe.Pointer(pIter)).FzTbl)))
if (*Tsqlite3rbu)(unsafe.Pointer(p)).Frc == SQLITE_OK && int32(SQLITE_ROW) == Xsqlite3_step(tls, *(*uintptr)(unsafe.Pointer(bp))) {
iMax = Xsqlite3_column_int64(tls, *(*uintptr)(unsafe.Pointer(bp)), 0)
- zRet = _rbuMPrintf(tls, p, __ccgo_ts+29796, libc.VaList(bp+16, iMax))
+ zRet = _rbuMPrintf(tls, p, __ccgo_ts+29851, libc.VaList(bp+16, iMax))
}
_rbuFinalize(tls, p, *(*uintptr)(unsafe.Pointer(bp)))
} else {
- zOrder = _rbuObjIterGetPkList(tls, p, pIter, __ccgo_ts+1667, __ccgo_ts+15149, __ccgo_ts+29819)
- zSelect = _rbuObjIterGetPkList(tls, p, pIter, __ccgo_ts+29825, __ccgo_ts+29832, __ccgo_ts+5175)
- zList = _rbuObjIterGetPkList(tls, p, pIter, __ccgo_ts+1667, __ccgo_ts+15149, __ccgo_ts+1667)
+ zOrder = _rbuObjIterGetPkList(tls, p, pIter, __ccgo_ts+1667, __ccgo_ts+15174, __ccgo_ts+29874)
+ zSelect = _rbuObjIterGetPkList(tls, p, pIter, __ccgo_ts+29880, __ccgo_ts+29887, __ccgo_ts+5201)
+ zList = _rbuObjIterGetPkList(tls, p, pIter, __ccgo_ts+1667, __ccgo_ts+15174, __ccgo_ts+1667)
if (*Tsqlite3rbu)(unsafe.Pointer(p)).Frc == SQLITE_OK {
- (*Tsqlite3rbu)(unsafe.Pointer(p)).Frc = _prepareFreeAndCollectError(tls, (*Tsqlite3rbu)(unsafe.Pointer(p)).FdbMain, bp, p+36, Xsqlite3_mprintf(tls, __ccgo_ts+29840, libc.VaList(bp+16, zSelect, zWrite, (*TRbuObjIter)(unsafe.Pointer(pIter)).FzTbl, zOrder)))
+ (*Tsqlite3rbu)(unsafe.Pointer(p)).Frc = _prepareFreeAndCollectError(tls, (*Tsqlite3rbu)(unsafe.Pointer(p)).FdbMain, bp, p+36, Xsqlite3_mprintf(tls, __ccgo_ts+29895, libc.VaList(bp+16, zSelect, zWrite, (*TRbuObjIter)(unsafe.Pointer(pIter)).FzTbl, zOrder)))
if (*Tsqlite3rbu)(unsafe.Pointer(p)).Frc == SQLITE_OK && int32(SQLITE_ROW) == Xsqlite3_step(tls, *(*uintptr)(unsafe.Pointer(bp))) {
zVal = Xsqlite3_column_text(tls, *(*uintptr)(unsafe.Pointer(bp)), 0)
- zRet = _rbuMPrintf(tls, p, __ccgo_ts+29882, libc.VaList(bp+16, zList, zVal))
+ zRet = _rbuMPrintf(tls, p, __ccgo_ts+29937, libc.VaList(bp+16, zList, zVal))
}
_rbuFinalize(tls, p, *(*uintptr)(unsafe.Pointer(bp)))
}
@@ -185390,7 +185823,7 @@ func _rbuVacuumIndexStart(tls *libc.TLS, p uintptr, pIter uintptr) (r uintptr) {
zSep = __ccgo_ts + 1667
iCol = 0
*(*uintptr)(unsafe.Pointer(bp)) = uintptr(0)
- (*Tsqlite3rbu)(unsafe.Pointer(p)).Frc = _prepareFreeAndCollectError(tls, (*Tsqlite3rbu)(unsafe.Pointer(p)).FdbMain, bp, p+36, Xsqlite3_mprintf(tls, __ccgo_ts+29579, libc.VaList(bp+16, (*TRbuObjIter)(unsafe.Pointer(pIter)).FzIdx)))
+ (*Tsqlite3rbu)(unsafe.Pointer(p)).Frc = _prepareFreeAndCollectError(tls, (*Tsqlite3rbu)(unsafe.Pointer(p)).FdbMain, bp, p+36, Xsqlite3_mprintf(tls, __ccgo_ts+29634, libc.VaList(bp+16, (*TRbuObjIter)(unsafe.Pointer(pIter)).FzIdx)))
for (*Tsqlite3rbu)(unsafe.Pointer(p)).Frc == SQLITE_OK && int32(SQLITE_ROW) == Xsqlite3_step(tls, *(*uintptr)(unsafe.Pointer(bp))) {
iCid = Xsqlite3_column_int(tls, *(*uintptr)(unsafe.Pointer(bp)), int32(1))
zCollate = Xsqlite3_column_text(tls, *(*uintptr)(unsafe.Pointer(bp)), int32(4))
@@ -185412,15 +185845,15 @@ func _rbuVacuumIndexStart(tls *libc.TLS, p uintptr, pIter uintptr) (r uintptr) {
}
zCol = *(*uintptr)(unsafe.Pointer((*TRbuObjIter)(unsafe.Pointer(pIter)).FazTblCol + uintptr(i)*4))
} else {
- zCol = __ccgo_ts + 29902
+ zCol = __ccgo_ts + 29957
}
} else {
zCol = *(*uintptr)(unsafe.Pointer((*TRbuObjIter)(unsafe.Pointer(pIter)).FazTblCol + uintptr(iCid)*4))
}
- zLhs = _rbuMPrintf(tls, p, __ccgo_ts+29910, libc.VaList(bp+16, zLhs, zSep, zCol, zCollate))
- zOrder = _rbuMPrintf(tls, p, __ccgo_ts+29931, libc.VaList(bp+16, zOrder, zSep, iCol, zCol, zCollate))
- zSelect = _rbuMPrintf(tls, p, __ccgo_ts+29967, libc.VaList(bp+16, zSelect, zSep, iCol, zCol))
- zSep = __ccgo_ts + 15149
+ zLhs = _rbuMPrintf(tls, p, __ccgo_ts+29965, libc.VaList(bp+16, zLhs, zSep, zCol, zCollate))
+ zOrder = _rbuMPrintf(tls, p, __ccgo_ts+29986, libc.VaList(bp+16, zOrder, zSep, iCol, zCol, zCollate))
+ zSelect = _rbuMPrintf(tls, p, __ccgo_ts+30022, libc.VaList(bp+16, zSelect, zSep, iCol, zCol))
+ zSep = __ccgo_ts + 15174
iCol++
}
_rbuFinalize(tls, p, *(*uintptr)(unsafe.Pointer(bp)))
@@ -185429,7 +185862,7 @@ func _rbuVacuumIndexStart(tls *libc.TLS, p uintptr, pIter uintptr) (r uintptr) {
}
if (*Tsqlite3rbu)(unsafe.Pointer(p)).Frc == SQLITE_OK {
*(*uintptr)(unsafe.Pointer(bp + 4)) = uintptr(0)
- (*Tsqlite3rbu)(unsafe.Pointer(p)).Frc = _prepareFreeAndCollectError(tls, (*Tsqlite3rbu)(unsafe.Pointer(p)).FdbMain, bp+4, p+36, Xsqlite3_mprintf(tls, __ccgo_ts+29994, libc.VaList(bp+16, zSelect, (*TRbuObjIter)(unsafe.Pointer(pIter)).FzTbl, zOrder)))
+ (*Tsqlite3rbu)(unsafe.Pointer(p)).Frc = _prepareFreeAndCollectError(tls, (*Tsqlite3rbu)(unsafe.Pointer(p)).FdbMain, bp+4, p+36, Xsqlite3_mprintf(tls, __ccgo_ts+30049, libc.VaList(bp+16, zSelect, (*TRbuObjIter)(unsafe.Pointer(pIter)).FzTbl, zOrder)))
if (*Tsqlite3rbu)(unsafe.Pointer(p)).Frc == SQLITE_OK && int32(SQLITE_ROW) == Xsqlite3_step(tls, *(*uintptr)(unsafe.Pointer(bp + 4))) {
zSep = __ccgo_ts + 1667
iCol = 0
@@ -185446,15 +185879,15 @@ func _rbuVacuumIndexStart(tls *libc.TLS, p uintptr, pIter uintptr) (r uintptr) {
break
}
}
- zVector = _rbuMPrintf(tls, p, __ccgo_ts+30042, libc.VaList(bp+16, zVector, zSep, zQuoted))
- zSep = __ccgo_ts + 15149
+ zVector = _rbuMPrintf(tls, p, __ccgo_ts+30097, libc.VaList(bp+16, zVector, zSep, zQuoted))
+ zSep = __ccgo_ts + 15174
goto _2
_2:
;
iCol++
}
if !(bFailed != 0) {
- zRet = _rbuMPrintf(tls, p, __ccgo_ts+30049, libc.VaList(bp+16, zLhs, zVector))
+ zRet = _rbuMPrintf(tls, p, __ccgo_ts+30104, libc.VaList(bp+16, zLhs, zVector))
}
}
_rbuFinalize(tls, p, *(*uintptr)(unsafe.Pointer(bp + 4)))
@@ -185512,7 +185945,7 @@ func _rbuObjIterGetIndexCols(tls *libc.TLS, p uintptr, pIter uintptr, pzImposter
zAnd = __ccgo_ts + 1667 /* Set to " AND " later on */
*(*uintptr)(unsafe.Pointer(bp)) = uintptr(0) /* PRAGMA index_xinfo = ? */
if rc == SQLITE_OK {
- rc = _prepareFreeAndCollectError(tls, (*Tsqlite3rbu)(unsafe.Pointer(p)).FdbMain, bp, p+36, Xsqlite3_mprintf(tls, __ccgo_ts+29579, libc.VaList(bp+16, (*TRbuObjIter)(unsafe.Pointer(pIter)).FzIdx)))
+ rc = _prepareFreeAndCollectError(tls, (*Tsqlite3rbu)(unsafe.Pointer(p)).FdbMain, bp, p+36, Xsqlite3_mprintf(tls, __ccgo_ts+29634, libc.VaList(bp+16, (*TRbuObjIter)(unsafe.Pointer(pIter)).FzIdx)))
}
for rc == SQLITE_OK && int32(SQLITE_ROW) == Xsqlite3_step(tls, *(*uintptr)(unsafe.Pointer(bp))) {
iCid = Xsqlite3_column_int(tls, *(*uintptr)(unsafe.Pointer(bp)), int32(1))
@@ -185521,7 +185954,7 @@ func _rbuObjIterGetIndexCols(tls *libc.TLS, p uintptr, pIter uintptr, pzImposter
zCol = uintptr(0)
if iCid == -int32(2) {
iSeq = Xsqlite3_column_int(tls, *(*uintptr)(unsafe.Pointer(bp)), 0)
- zRet = Xsqlite3_mprintf(tls, __ccgo_ts+30061, libc.VaList(bp+16, zRet, zCom, (*(*TRbuSpan)(unsafe.Pointer((*TRbuObjIter)(unsafe.Pointer(pIter)).FaIdxCol + uintptr(iSeq)*8))).FnSpan, (*(*TRbuSpan)(unsafe.Pointer((*TRbuObjIter)(unsafe.Pointer(pIter)).FaIdxCol + uintptr(iSeq)*8))).FzSpan, zCollate))
+ zRet = Xsqlite3_mprintf(tls, __ccgo_ts+30116, libc.VaList(bp+16, zRet, zCom, (*(*TRbuSpan)(unsafe.Pointer((*TRbuObjIter)(unsafe.Pointer(pIter)).FaIdxCol + uintptr(iSeq)*8))).FnSpan, (*(*TRbuSpan)(unsafe.Pointer((*TRbuObjIter)(unsafe.Pointer(pIter)).FaIdxCol + uintptr(iSeq)*8))).FzSpan, zCollate))
zType = __ccgo_ts + 1667
} else {
if iCid < 0 {
@@ -185541,9 +185974,9 @@ func _rbuObjIterGetIndexCols(tls *libc.TLS, p uintptr, pIter uintptr, pzImposter
zCol = *(*uintptr)(unsafe.Pointer((*TRbuObjIter)(unsafe.Pointer(pIter)).FazTblCol + uintptr(i)*4))
} else {
if (*Tsqlite3rbu)(unsafe.Pointer(p)).FzTarget == uintptr(0) {
- zCol = __ccgo_ts + 29902
+ zCol = __ccgo_ts + 29957
} else {
- zCol = __ccgo_ts + 29632
+ zCol = __ccgo_ts + 29687
}
}
zType = __ccgo_ts + 1141
@@ -185551,24 +185984,24 @@ func _rbuObjIterGetIndexCols(tls *libc.TLS, p uintptr, pIter uintptr, pzImposter
zCol = *(*uintptr)(unsafe.Pointer((*TRbuObjIter)(unsafe.Pointer(pIter)).FazTblCol + uintptr(iCid)*4))
zType = *(*uintptr)(unsafe.Pointer((*TRbuObjIter)(unsafe.Pointer(pIter)).FazTblType + uintptr(iCid)*4))
}
- zRet = Xsqlite3_mprintf(tls, __ccgo_ts+30083, libc.VaList(bp+16, zRet, zCom, zCol, zCollate))
+ zRet = Xsqlite3_mprintf(tls, __ccgo_ts+30138, libc.VaList(bp+16, zRet, zCom, zCol, zCollate))
}
if (*TRbuObjIter)(unsafe.Pointer(pIter)).FbUnique == 0 || Xsqlite3_column_int(tls, *(*uintptr)(unsafe.Pointer(bp)), int32(5)) != 0 {
if bDesc != 0 {
- v2 = __ccgo_ts + 29819
+ v2 = __ccgo_ts + 29874
} else {
v2 = __ccgo_ts + 1667
}
zOrder = v2
- zImpPK = Xsqlite3_mprintf(tls, __ccgo_ts+30103, libc.VaList(bp+16, zImpPK, zCom, nBind, zCol, zOrder))
+ zImpPK = Xsqlite3_mprintf(tls, __ccgo_ts+30158, libc.VaList(bp+16, zImpPK, zCom, nBind, zCol, zOrder))
}
- zImpCols = Xsqlite3_mprintf(tls, __ccgo_ts+30124, libc.VaList(bp+16, zImpCols, zCom, nBind, zCol, zType, zCollate))
- zWhere = Xsqlite3_mprintf(tls, __ccgo_ts+30157, libc.VaList(bp+16, zWhere, zAnd, nBind, zCol))
+ zImpCols = Xsqlite3_mprintf(tls, __ccgo_ts+30179, libc.VaList(bp+16, zImpCols, zCom, nBind, zCol, zType, zCollate))
+ zWhere = Xsqlite3_mprintf(tls, __ccgo_ts+30212, libc.VaList(bp+16, zWhere, zAnd, nBind, zCol))
if zRet == uintptr(0) || zImpPK == uintptr(0) || zImpCols == uintptr(0) || zWhere == uintptr(0) {
rc = int32(SQLITE_NOMEM)
}
- zCom = __ccgo_ts + 15149
- zAnd = __ccgo_ts + 22234
+ zCom = __ccgo_ts + 15174
+ zAnd = __ccgo_ts + 22306
nBind++
}
rc2 = Xsqlite3_finalize(tls, *(*uintptr)(unsafe.Pointer(bp)))
@@ -185622,11 +186055,11 @@ func _rbuObjIterGetOldlist(tls *libc.TLS, p uintptr, pIter uintptr, zObj uintptr
}
if *(*Tu8)(unsafe.Pointer((*TRbuObjIter)(unsafe.Pointer(pIter)).FabIndexed + uintptr(i))) != 0 {
zCol = *(*uintptr)(unsafe.Pointer((*TRbuObjIter)(unsafe.Pointer(pIter)).FazTblCol + uintptr(i)*4))
- zList = Xsqlite3_mprintf(tls, __ccgo_ts+30181, libc.VaList(bp+8, zList, zS, zObj, zCol))
+ zList = Xsqlite3_mprintf(tls, __ccgo_ts+30236, libc.VaList(bp+8, zList, zS, zObj, zCol))
} else {
- zList = Xsqlite3_mprintf(tls, __ccgo_ts+30193, libc.VaList(bp+8, zList, zS))
+ zList = Xsqlite3_mprintf(tls, __ccgo_ts+30248, libc.VaList(bp+8, zList, zS))
}
- zS = __ccgo_ts + 15149
+ zS = __ccgo_ts + 15174
if zList == uintptr(0) {
(*Tsqlite3rbu)(unsafe.Pointer(p)).Frc = int32(SQLITE_NOMEM)
break
@@ -185638,7 +186071,7 @@ func _rbuObjIterGetOldlist(tls *libc.TLS, p uintptr, pIter uintptr, zObj uintptr
}
/* For a table with implicit rowids, append "old._rowid_" to the list. */
if (*TRbuObjIter)(unsafe.Pointer(pIter)).FeType == int32(RBU_PK_EXTERNAL) || (*TRbuObjIter)(unsafe.Pointer(pIter)).FeType == int32(RBU_PK_NONE) {
- zList = _rbuMPrintf(tls, p, __ccgo_ts+30202, libc.VaList(bp+8, zList, zObj))
+ zList = _rbuMPrintf(tls, p, __ccgo_ts+30257, libc.VaList(bp+8, zList, zObj))
}
}
return zList
@@ -185664,7 +186097,7 @@ func _rbuObjIterGetWhere(tls *libc.TLS, p uintptr, pIter uintptr) (r uintptr) {
_, _, _, _, _, _ = i, i1, zCol, zList, zSep, zSep1
zList = uintptr(0)
if (*TRbuObjIter)(unsafe.Pointer(pIter)).FeType == int32(RBU_PK_VTAB) || (*TRbuObjIter)(unsafe.Pointer(pIter)).FeType == int32(RBU_PK_NONE) {
- zList = _rbuMPrintf(tls, p, __ccgo_ts+30217, libc.VaList(bp+8, (*TRbuObjIter)(unsafe.Pointer(pIter)).FnTblCol+int32(1)))
+ zList = _rbuMPrintf(tls, p, __ccgo_ts+30272, libc.VaList(bp+8, (*TRbuObjIter)(unsafe.Pointer(pIter)).FnTblCol+int32(1)))
} else {
if (*TRbuObjIter)(unsafe.Pointer(pIter)).FeType == int32(RBU_PK_EXTERNAL) {
zSep = __ccgo_ts + 1667
@@ -185674,15 +186107,15 @@ func _rbuObjIterGetWhere(tls *libc.TLS, p uintptr, pIter uintptr) (r uintptr) {
break
}
if *(*Tu8)(unsafe.Pointer((*TRbuObjIter)(unsafe.Pointer(pIter)).FabTblPk + uintptr(i))) != 0 {
- zList = _rbuMPrintf(tls, p, __ccgo_ts+30231, libc.VaList(bp+8, zList, zSep, i, i+int32(1)))
- zSep = __ccgo_ts + 22234
+ zList = _rbuMPrintf(tls, p, __ccgo_ts+30286, libc.VaList(bp+8, zList, zSep, i, i+int32(1)))
+ zSep = __ccgo_ts + 22306
}
goto _1
_1:
;
i++
}
- zList = _rbuMPrintf(tls, p, __ccgo_ts+30243, libc.VaList(bp+8, zList))
+ zList = _rbuMPrintf(tls, p, __ccgo_ts+30298, libc.VaList(bp+8, zList))
} else {
zSep1 = __ccgo_ts + 1667
i1 = 0
@@ -185692,8 +186125,8 @@ func _rbuObjIterGetWhere(tls *libc.TLS, p uintptr, pIter uintptr) (r uintptr) {
}
if *(*Tu8)(unsafe.Pointer((*TRbuObjIter)(unsafe.Pointer(pIter)).FabTblPk + uintptr(i1))) != 0 {
zCol = *(*uintptr)(unsafe.Pointer((*TRbuObjIter)(unsafe.Pointer(pIter)).FazTblCol + uintptr(i1)*4))
- zList = _rbuMPrintf(tls, p, __ccgo_ts+30293, libc.VaList(bp+8, zList, zSep1, zCol, i1+int32(1)))
- zSep1 = __ccgo_ts + 22234
+ zList = _rbuMPrintf(tls, p, __ccgo_ts+30348, libc.VaList(bp+8, zList, zSep1, zCol, i1+int32(1)))
+ zSep1 = __ccgo_ts + 22306
}
goto _2
_2:
@@ -185716,7 +186149,7 @@ func _rbuObjIterGetWhere(tls *libc.TLS, p uintptr, pIter uintptr) (r uintptr) {
// */
func _rbuBadControlError(tls *libc.TLS, p uintptr) {
(*Tsqlite3rbu)(unsafe.Pointer(p)).Frc = int32(SQLITE_ERROR)
- (*Tsqlite3rbu)(unsafe.Pointer(p)).FzErrmsg = Xsqlite3_mprintf(tls, __ccgo_ts+30306, 0)
+ (*Tsqlite3rbu)(unsafe.Pointer(p)).FzErrmsg = Xsqlite3_mprintf(tls, __ccgo_ts+30361, 0)
}
// C documentation
@@ -185758,16 +186191,16 @@ func _rbuObjIterGetSetlist(tls *libc.TLS, p uintptr, pIter uintptr, zMask uintpt
}
c = *(*int8)(unsafe.Pointer(zMask + uintptr(*(*int32)(unsafe.Pointer((*TRbuObjIter)(unsafe.Pointer(pIter)).FaiSrcOrder + uintptr(i)*4)))))
if int32(c) == int32('x') {
- zList = _rbuMPrintf(tls, p, __ccgo_ts+30293, libc.VaList(bp+8, zList, zSep, *(*uintptr)(unsafe.Pointer((*TRbuObjIter)(unsafe.Pointer(pIter)).FazTblCol + uintptr(i)*4)), i+int32(1)))
- zSep = __ccgo_ts + 15149
+ zList = _rbuMPrintf(tls, p, __ccgo_ts+30348, libc.VaList(bp+8, zList, zSep, *(*uintptr)(unsafe.Pointer((*TRbuObjIter)(unsafe.Pointer(pIter)).FazTblCol + uintptr(i)*4)), i+int32(1)))
+ zSep = __ccgo_ts + 15174
} else {
if int32(c) == int32('d') {
- zList = _rbuMPrintf(tls, p, __ccgo_ts+30332, libc.VaList(bp+8, zList, zSep, *(*uintptr)(unsafe.Pointer((*TRbuObjIter)(unsafe.Pointer(pIter)).FazTblCol + uintptr(i)*4)), *(*uintptr)(unsafe.Pointer((*TRbuObjIter)(unsafe.Pointer(pIter)).FazTblCol + uintptr(i)*4)), i+int32(1)))
- zSep = __ccgo_ts + 15149
+ zList = _rbuMPrintf(tls, p, __ccgo_ts+30387, libc.VaList(bp+8, zList, zSep, *(*uintptr)(unsafe.Pointer((*TRbuObjIter)(unsafe.Pointer(pIter)).FazTblCol + uintptr(i)*4)), *(*uintptr)(unsafe.Pointer((*TRbuObjIter)(unsafe.Pointer(pIter)).FazTblCol + uintptr(i)*4)), i+int32(1)))
+ zSep = __ccgo_ts + 15174
} else {
if int32(c) == int32('f') {
- zList = _rbuMPrintf(tls, p, __ccgo_ts+30362, libc.VaList(bp+8, zList, zSep, *(*uintptr)(unsafe.Pointer((*TRbuObjIter)(unsafe.Pointer(pIter)).FazTblCol + uintptr(i)*4)), *(*uintptr)(unsafe.Pointer((*TRbuObjIter)(unsafe.Pointer(pIter)).FazTblCol + uintptr(i)*4)), i+int32(1)))
- zSep = __ccgo_ts + 15149
+ zList = _rbuMPrintf(tls, p, __ccgo_ts+30417, libc.VaList(bp+8, zList, zSep, *(*uintptr)(unsafe.Pointer((*TRbuObjIter)(unsafe.Pointer(pIter)).FazTblCol + uintptr(i)*4)), *(*uintptr)(unsafe.Pointer((*TRbuObjIter)(unsafe.Pointer(pIter)).FazTblCol + uintptr(i)*4)), i+int32(1)))
+ zSep = __ccgo_ts + 15174
}
}
}
@@ -185851,16 +186284,16 @@ func _rbuWithoutRowidPK(tls *libc.TLS, p uintptr, pIter uintptr) (r uintptr) {
_, _, _, _, _, _, _ = z, zCol, zDesc, zIdx, zOrig, zSep, v1
z = uintptr(0)
if (*Tsqlite3rbu)(unsafe.Pointer(p)).Frc == SQLITE_OK {
- zSep = __ccgo_ts + 30399
+ zSep = __ccgo_ts + 30454
*(*uintptr)(unsafe.Pointer(bp)) = uintptr(0) /* PRAGMA index_list = (pIter->zTbl) */
*(*uintptr)(unsafe.Pointer(bp + 4)) = uintptr(0) /* PRAGMA index_xinfo = <pk-index> */
- (*Tsqlite3rbu)(unsafe.Pointer(p)).Frc = _prepareFreeAndCollectError(tls, (*Tsqlite3rbu)(unsafe.Pointer(p)).FdbMain, bp, p+36, Xsqlite3_mprintf(tls, __ccgo_ts+29551, libc.VaList(bp+16, (*TRbuObjIter)(unsafe.Pointer(pIter)).FzTbl)))
+ (*Tsqlite3rbu)(unsafe.Pointer(p)).Frc = _prepareFreeAndCollectError(tls, (*Tsqlite3rbu)(unsafe.Pointer(p)).FdbMain, bp, p+36, Xsqlite3_mprintf(tls, __ccgo_ts+29606, libc.VaList(bp+16, (*TRbuObjIter)(unsafe.Pointer(pIter)).FzTbl)))
for (*Tsqlite3rbu)(unsafe.Pointer(p)).Frc == SQLITE_OK && int32(SQLITE_ROW) == Xsqlite3_step(tls, *(*uintptr)(unsafe.Pointer(bp))) {
zOrig = Xsqlite3_column_text(tls, *(*uintptr)(unsafe.Pointer(bp)), int32(3))
- if zOrig != 0 && libc.Xstrcmp(tls, zOrig, __ccgo_ts+16738) == 0 {
+ if zOrig != 0 && libc.Xstrcmp(tls, zOrig, __ccgo_ts+16810) == 0 {
zIdx = Xsqlite3_column_text(tls, *(*uintptr)(unsafe.Pointer(bp)), int32(1))
if zIdx != 0 {
- (*Tsqlite3rbu)(unsafe.Pointer(p)).Frc = _prepareFreeAndCollectError(tls, (*Tsqlite3rbu)(unsafe.Pointer(p)).FdbMain, bp+4, p+36, Xsqlite3_mprintf(tls, __ccgo_ts+29579, libc.VaList(bp+16, zIdx)))
+ (*Tsqlite3rbu)(unsafe.Pointer(p)).Frc = _prepareFreeAndCollectError(tls, (*Tsqlite3rbu)(unsafe.Pointer(p)).FdbMain, bp+4, p+36, Xsqlite3_mprintf(tls, __ccgo_ts+29634, libc.VaList(bp+16, zIdx)))
}
break
}
@@ -185871,16 +186304,16 @@ func _rbuWithoutRowidPK(tls *libc.TLS, p uintptr, pIter uintptr) (r uintptr) {
/* int iCid = sqlite3_column_int(pXInfo, 0); */
zCol = Xsqlite3_column_text(tls, *(*uintptr)(unsafe.Pointer(bp + 4)), int32(2))
if Xsqlite3_column_int(tls, *(*uintptr)(unsafe.Pointer(bp + 4)), int32(3)) != 0 {
- v1 = __ccgo_ts + 29819
+ v1 = __ccgo_ts + 29874
} else {
v1 = __ccgo_ts + 1667
}
zDesc = v1
- z = _rbuMPrintf(tls, p, __ccgo_ts+30412, libc.VaList(bp+16, z, zSep, zCol, zDesc))
- zSep = __ccgo_ts + 15149
+ z = _rbuMPrintf(tls, p, __ccgo_ts+30467, libc.VaList(bp+16, z, zSep, zCol, zDesc))
+ zSep = __ccgo_ts + 15174
}
}
- z = _rbuMPrintf(tls, p, __ccgo_ts+30423, libc.VaList(bp+16, z))
+ z = _rbuMPrintf(tls, p, __ccgo_ts+30478, libc.VaList(bp+16, z))
_rbuFinalize(tls, p, *(*uintptr)(unsafe.Pointer(bp + 4)))
}
return z
@@ -185926,7 +186359,7 @@ func _rbuCreateImposterTable2(tls *libc.TLS, p uintptr, pIter uintptr) {
/* Figure out the name of the primary key index for the current table.
** This is needed for the argument to "PRAGMA index_xinfo". Set
** zIdx to point to a nul-terminated string containing this name. */
- (*Tsqlite3rbu)(unsafe.Pointer(p)).Frc = _prepareAndCollectError(tls, (*Tsqlite3rbu)(unsafe.Pointer(p)).FdbMain, bp, p+36, __ccgo_ts+30427)
+ (*Tsqlite3rbu)(unsafe.Pointer(p)).Frc = _prepareAndCollectError(tls, (*Tsqlite3rbu)(unsafe.Pointer(p)).FdbMain, bp, p+36, __ccgo_ts+30482)
if (*Tsqlite3rbu)(unsafe.Pointer(p)).Frc == SQLITE_OK {
Xsqlite3_bind_int(tls, *(*uintptr)(unsafe.Pointer(bp)), int32(1), tnum)
if int32(SQLITE_ROW) == Xsqlite3_step(tls, *(*uintptr)(unsafe.Pointer(bp))) {
@@ -185934,7 +186367,7 @@ func _rbuCreateImposterTable2(tls *libc.TLS, p uintptr, pIter uintptr) {
}
}
if zIdx != 0 {
- (*Tsqlite3rbu)(unsafe.Pointer(p)).Frc = _prepareFreeAndCollectError(tls, (*Tsqlite3rbu)(unsafe.Pointer(p)).FdbMain, bp+4, p+36, Xsqlite3_mprintf(tls, __ccgo_ts+29579, libc.VaList(bp+16, zIdx)))
+ (*Tsqlite3rbu)(unsafe.Pointer(p)).Frc = _prepareFreeAndCollectError(tls, (*Tsqlite3rbu)(unsafe.Pointer(p)).FdbMain, bp+4, p+36, Xsqlite3_mprintf(tls, __ccgo_ts+29634, libc.VaList(bp+16, zIdx)))
}
_rbuFinalize(tls, p, *(*uintptr)(unsafe.Pointer(bp)))
for (*Tsqlite3rbu)(unsafe.Pointer(p)).Frc == SQLITE_OK && int32(SQLITE_ROW) == Xsqlite3_step(tls, *(*uintptr)(unsafe.Pointer(bp + 4))) {
@@ -185943,21 +186376,21 @@ func _rbuCreateImposterTable2(tls *libc.TLS, p uintptr, pIter uintptr) {
iCid = Xsqlite3_column_int(tls, *(*uintptr)(unsafe.Pointer(bp + 4)), int32(1))
bDesc = Xsqlite3_column_int(tls, *(*uintptr)(unsafe.Pointer(bp + 4)), int32(3))
zCollate = Xsqlite3_column_text(tls, *(*uintptr)(unsafe.Pointer(bp + 4)), int32(4))
- zCols = _rbuMPrintf(tls, p, __ccgo_ts+30477, libc.VaList(bp+16, zCols, zComma, iCid, *(*uintptr)(unsafe.Pointer((*TRbuObjIter)(unsafe.Pointer(pIter)).FazTblType + uintptr(iCid)*4)), zCollate))
+ zCols = _rbuMPrintf(tls, p, __ccgo_ts+30532, libc.VaList(bp+16, zCols, zComma, iCid, *(*uintptr)(unsafe.Pointer((*TRbuObjIter)(unsafe.Pointer(pIter)).FazTblType + uintptr(iCid)*4)), zCollate))
if bDesc != 0 {
- v1 = __ccgo_ts + 29819
+ v1 = __ccgo_ts + 29874
} else {
v1 = __ccgo_ts + 1667
}
- zPk = _rbuMPrintf(tls, p, __ccgo_ts+30499, libc.VaList(bp+16, zPk, zComma, iCid, v1))
- zComma = __ccgo_ts + 15149
+ zPk = _rbuMPrintf(tls, p, __ccgo_ts+30554, libc.VaList(bp+16, zPk, zComma, iCid, v1))
+ zComma = __ccgo_ts + 15174
}
}
- zCols = _rbuMPrintf(tls, p, __ccgo_ts+30509, libc.VaList(bp+16, zCols))
+ zCols = _rbuMPrintf(tls, p, __ccgo_ts+30564, libc.VaList(bp+16, zCols))
_rbuFinalize(tls, p, *(*uintptr)(unsafe.Pointer(bp + 4)))
- Xsqlite3_test_control(tls, int32(SQLITE_TESTCTRL_IMPOSTER), libc.VaList(bp+16, (*Tsqlite3rbu)(unsafe.Pointer(p)).FdbMain, __ccgo_ts+6715, int32(1), tnum))
- _rbuMPrintfExec(tls, p, (*Tsqlite3rbu)(unsafe.Pointer(p)).FdbMain, __ccgo_ts+30524, libc.VaList(bp+16, zCols, zPk))
- Xsqlite3_test_control(tls, int32(SQLITE_TESTCTRL_IMPOSTER), libc.VaList(bp+16, (*Tsqlite3rbu)(unsafe.Pointer(p)).FdbMain, __ccgo_ts+6715, 0, 0))
+ Xsqlite3_test_control(tls, int32(SQLITE_TESTCTRL_IMPOSTER), libc.VaList(bp+16, (*Tsqlite3rbu)(unsafe.Pointer(p)).FdbMain, __ccgo_ts+6740, int32(1), tnum))
+ _rbuMPrintfExec(tls, p, (*Tsqlite3rbu)(unsafe.Pointer(p)).FdbMain, __ccgo_ts+30579, libc.VaList(bp+16, zCols, zPk))
+ Xsqlite3_test_control(tls, int32(SQLITE_TESTCTRL_IMPOSTER), libc.VaList(bp+16, (*Tsqlite3rbu)(unsafe.Pointer(p)).FdbMain, __ccgo_ts+6740, 0, 0))
}
}
@@ -185994,7 +186427,7 @@ func _rbuCreateImposterTable(tls *libc.TLS, p uintptr, pIter uintptr) {
tnum = (*TRbuObjIter)(unsafe.Pointer(pIter)).FiTnum
zComma = __ccgo_ts + 1667
zSql = uintptr(0)
- Xsqlite3_test_control(tls, int32(SQLITE_TESTCTRL_IMPOSTER), libc.VaList(bp+16, (*Tsqlite3rbu)(unsafe.Pointer(p)).FdbMain, __ccgo_ts+6715, 0, int32(1)))
+ Xsqlite3_test_control(tls, int32(SQLITE_TESTCTRL_IMPOSTER), libc.VaList(bp+16, (*Tsqlite3rbu)(unsafe.Pointer(p)).FdbMain, __ccgo_ts+6740, 0, int32(1)))
iCol = 0
for {
if !((*Tsqlite3rbu)(unsafe.Pointer(p)).Frc == SQLITE_OK && iCol < (*TRbuObjIter)(unsafe.Pointer(pIter)).FnTblCol) {
@@ -186003,19 +186436,19 @@ func _rbuCreateImposterTable(tls *libc.TLS, p uintptr, pIter uintptr) {
zPk = __ccgo_ts + 1667
zCol = *(*uintptr)(unsafe.Pointer((*TRbuObjIter)(unsafe.Pointer(pIter)).FazTblCol + uintptr(iCol)*4))
*(*uintptr)(unsafe.Pointer(bp)) = uintptr(0)
- (*Tsqlite3rbu)(unsafe.Pointer(p)).Frc = Xsqlite3_table_column_metadata(tls, (*Tsqlite3rbu)(unsafe.Pointer(p)).FdbMain, __ccgo_ts+6715, (*TRbuObjIter)(unsafe.Pointer(pIter)).FzTbl, zCol, uintptr(0), bp, uintptr(0), uintptr(0), uintptr(0))
+ (*Tsqlite3rbu)(unsafe.Pointer(p)).Frc = Xsqlite3_table_column_metadata(tls, (*Tsqlite3rbu)(unsafe.Pointer(p)).FdbMain, __ccgo_ts+6740, (*TRbuObjIter)(unsafe.Pointer(pIter)).FzTbl, zCol, uintptr(0), bp, uintptr(0), uintptr(0), uintptr(0))
if (*TRbuObjIter)(unsafe.Pointer(pIter)).FeType == int32(RBU_PK_IPK) && *(*Tu8)(unsafe.Pointer((*TRbuObjIter)(unsafe.Pointer(pIter)).FabTblPk + uintptr(iCol))) != 0 {
/* If the target table column is an "INTEGER PRIMARY KEY", add
** "PRIMARY KEY" to the imposter table column declaration. */
- zPk = __ccgo_ts + 30586
+ zPk = __ccgo_ts + 30641
}
if *(*Tu8)(unsafe.Pointer((*TRbuObjIter)(unsafe.Pointer(pIter)).FabNotNull + uintptr(iCol))) != 0 {
- v2 = __ccgo_ts + 30599
+ v2 = __ccgo_ts + 30654
} else {
v2 = __ccgo_ts + 1667
}
- zSql = _rbuMPrintf(tls, p, __ccgo_ts+30609, libc.VaList(bp+16, zSql, zComma, zCol, *(*uintptr)(unsafe.Pointer((*TRbuObjIter)(unsafe.Pointer(pIter)).FazTblType + uintptr(iCol)*4)), zPk, *(*uintptr)(unsafe.Pointer(bp)), v2))
- zComma = __ccgo_ts + 15149
+ zSql = _rbuMPrintf(tls, p, __ccgo_ts+30664, libc.VaList(bp+16, zSql, zComma, zCol, *(*uintptr)(unsafe.Pointer((*TRbuObjIter)(unsafe.Pointer(pIter)).FazTblType + uintptr(iCol)*4)), zPk, *(*uintptr)(unsafe.Pointer(bp)), v2))
+ zComma = __ccgo_ts + 15174
goto _1
_1:
;
@@ -186024,17 +186457,17 @@ func _rbuCreateImposterTable(tls *libc.TLS, p uintptr, pIter uintptr) {
if (*TRbuObjIter)(unsafe.Pointer(pIter)).FeType == int32(RBU_PK_WITHOUT_ROWID) {
zPk1 = _rbuWithoutRowidPK(tls, p, pIter)
if zPk1 != 0 {
- zSql = _rbuMPrintf(tls, p, __ccgo_ts+30636, libc.VaList(bp+16, zSql, zPk1))
+ zSql = _rbuMPrintf(tls, p, __ccgo_ts+30691, libc.VaList(bp+16, zSql, zPk1))
}
}
- Xsqlite3_test_control(tls, int32(SQLITE_TESTCTRL_IMPOSTER), libc.VaList(bp+16, (*Tsqlite3rbu)(unsafe.Pointer(p)).FdbMain, __ccgo_ts+6715, int32(1), tnum))
+ Xsqlite3_test_control(tls, int32(SQLITE_TESTCTRL_IMPOSTER), libc.VaList(bp+16, (*Tsqlite3rbu)(unsafe.Pointer(p)).FdbMain, __ccgo_ts+6740, int32(1), tnum))
if (*TRbuObjIter)(unsafe.Pointer(pIter)).FeType == int32(RBU_PK_WITHOUT_ROWID) {
- v3 = __ccgo_ts + 30643
+ v3 = __ccgo_ts + 30698
} else {
v3 = __ccgo_ts + 1667
}
- _rbuMPrintfExec(tls, p, (*Tsqlite3rbu)(unsafe.Pointer(p)).FdbMain, __ccgo_ts+30658, libc.VaList(bp+16, (*TRbuObjIter)(unsafe.Pointer(pIter)).FzTbl, zSql, v3))
- Xsqlite3_test_control(tls, int32(SQLITE_TESTCTRL_IMPOSTER), libc.VaList(bp+16, (*Tsqlite3rbu)(unsafe.Pointer(p)).FdbMain, __ccgo_ts+6715, 0, 0))
+ _rbuMPrintfExec(tls, p, (*Tsqlite3rbu)(unsafe.Pointer(p)).FdbMain, __ccgo_ts+30713, libc.VaList(bp+16, (*TRbuObjIter)(unsafe.Pointer(pIter)).FzTbl, zSql, v3))
+ Xsqlite3_test_control(tls, int32(SQLITE_TESTCTRL_IMPOSTER), libc.VaList(bp+16, (*Tsqlite3rbu)(unsafe.Pointer(p)).FdbMain, __ccgo_ts+6740, 0, 0))
}
}
@@ -186060,7 +186493,7 @@ func _rbuObjIterPrepareTmpInsert(tls *libc.TLS, p uintptr, pIter uintptr, zColli
bRbuRowid = libc.BoolInt32((*TRbuObjIter)(unsafe.Pointer(pIter)).FeType == int32(RBU_PK_EXTERNAL) || (*TRbuObjIter)(unsafe.Pointer(pIter)).FeType == int32(RBU_PK_NONE))
zBind = _rbuObjIterGetBindlist(tls, p, (*TRbuObjIter)(unsafe.Pointer(pIter)).FnTblCol+int32(1)+bRbuRowid)
if zBind != 0 {
- (*Tsqlite3rbu)(unsafe.Pointer(p)).Frc = _prepareFreeAndCollectError(tls, (*Tsqlite3rbu)(unsafe.Pointer(p)).FdbRbu, pIter+88, p+36, Xsqlite3_mprintf(tls, __ccgo_ts+30690, libc.VaList(bp+8, p+24, (*TRbuObjIter)(unsafe.Pointer(pIter)).FzDataTbl, zCollist, zRbuRowid, zBind)))
+ (*Tsqlite3rbu)(unsafe.Pointer(p)).Frc = _prepareFreeAndCollectError(tls, (*Tsqlite3rbu)(unsafe.Pointer(p)).FdbRbu, pIter+88, p+36, Xsqlite3_mprintf(tls, __ccgo_ts+30745, libc.VaList(bp+8, p+24, (*TRbuObjIter)(unsafe.Pointer(pIter)).FzDataTbl, zCollist, zRbuRowid, zBind)))
}
}
@@ -186106,7 +186539,7 @@ func _rbuObjIterGetIndexWhere(tls *libc.TLS, p uintptr, pIter uintptr) (r uintpt
*(*int32)(unsafe.Pointer(bp + 4)) = (*Tsqlite3rbu)(unsafe.Pointer(p)).Frc
zRet = uintptr(0)
if *(*int32)(unsafe.Pointer(bp + 4)) == SQLITE_OK {
- *(*int32)(unsafe.Pointer(bp + 4)) = _prepareAndCollectError(tls, (*Tsqlite3rbu)(unsafe.Pointer(p)).FdbMain, bp, p+36, __ccgo_ts+30747)
+ *(*int32)(unsafe.Pointer(bp + 4)) = _prepareAndCollectError(tls, (*Tsqlite3rbu)(unsafe.Pointer(p)).FdbMain, bp, p+36, __ccgo_ts+30802)
}
if *(*int32)(unsafe.Pointer(bp + 4)) == SQLITE_OK {
*(*int32)(unsafe.Pointer(bp + 4)) = Xsqlite3_bind_text(tls, *(*uintptr)(unsafe.Pointer(bp)), int32(1), (*TRbuObjIter)(unsafe.Pointer(pIter)).FzIdx, -int32(1), libc.UintptrFromInt32(0))
@@ -186275,7 +186708,7 @@ func _rbuObjIterPrepareAll(tls *libc.TLS, p uintptr, pIter uintptr, nOffset int3
zIdx = (*TRbuObjIter)(unsafe.Pointer(pIter)).FzIdx
zLimit = uintptr(0)
if nOffset != 0 {
- zLimit = Xsqlite3_mprintf(tls, __ccgo_ts+30813, libc.VaList(bp+24, nOffset))
+ zLimit = Xsqlite3_mprintf(tls, __ccgo_ts+30868, libc.VaList(bp+24, nOffset))
if !(zLimit != 0) {
(*Tsqlite3rbu)(unsafe.Pointer(p)).Frc = int32(SQLITE_NOMEM)
}
@@ -186292,18 +186725,18 @@ func _rbuObjIterPrepareAll(tls *libc.TLS, p uintptr, pIter uintptr, nOffset int3
zCollist = _rbuObjIterGetIndexCols(tls, p, pIter, bp, bp+4, bp+8, bp+12)
zBind = _rbuObjIterGetBindlist(tls, p, *(*int32)(unsafe.Pointer(bp + 12)))
/* Create the imposter table used to write to this index. */
- Xsqlite3_test_control(tls, int32(SQLITE_TESTCTRL_IMPOSTER), libc.VaList(bp+24, (*Tsqlite3rbu)(unsafe.Pointer(p)).FdbMain, __ccgo_ts+6715, 0, int32(1)))
- Xsqlite3_test_control(tls, int32(SQLITE_TESTCTRL_IMPOSTER), libc.VaList(bp+24, (*Tsqlite3rbu)(unsafe.Pointer(p)).FdbMain, __ccgo_ts+6715, int32(1), tnum))
- _rbuMPrintfExec(tls, p, (*Tsqlite3rbu)(unsafe.Pointer(p)).FdbMain, __ccgo_ts+30833, libc.VaList(bp+24, zTbl, *(*uintptr)(unsafe.Pointer(bp)), *(*uintptr)(unsafe.Pointer(bp + 4))))
- Xsqlite3_test_control(tls, int32(SQLITE_TESTCTRL_IMPOSTER), libc.VaList(bp+24, (*Tsqlite3rbu)(unsafe.Pointer(p)).FdbMain, __ccgo_ts+6715, 0, 0))
+ Xsqlite3_test_control(tls, int32(SQLITE_TESTCTRL_IMPOSTER), libc.VaList(bp+24, (*Tsqlite3rbu)(unsafe.Pointer(p)).FdbMain, __ccgo_ts+6740, 0, int32(1)))
+ Xsqlite3_test_control(tls, int32(SQLITE_TESTCTRL_IMPOSTER), libc.VaList(bp+24, (*Tsqlite3rbu)(unsafe.Pointer(p)).FdbMain, __ccgo_ts+6740, int32(1), tnum))
+ _rbuMPrintfExec(tls, p, (*Tsqlite3rbu)(unsafe.Pointer(p)).FdbMain, __ccgo_ts+30888, libc.VaList(bp+24, zTbl, *(*uintptr)(unsafe.Pointer(bp)), *(*uintptr)(unsafe.Pointer(bp + 4))))
+ Xsqlite3_test_control(tls, int32(SQLITE_TESTCTRL_IMPOSTER), libc.VaList(bp+24, (*Tsqlite3rbu)(unsafe.Pointer(p)).FdbMain, __ccgo_ts+6740, 0, 0))
/* Create the statement to insert index entries */
(*TRbuObjIter)(unsafe.Pointer(pIter)).FnCol = *(*int32)(unsafe.Pointer(bp + 12))
if (*Tsqlite3rbu)(unsafe.Pointer(p)).Frc == SQLITE_OK {
- (*Tsqlite3rbu)(unsafe.Pointer(p)).Frc = _prepareFreeAndCollectError(tls, (*Tsqlite3rbu)(unsafe.Pointer(p)).FdbMain, pIter+80, p+36, Xsqlite3_mprintf(tls, __ccgo_ts+30898, libc.VaList(bp+24, zTbl, zBind)))
+ (*Tsqlite3rbu)(unsafe.Pointer(p)).Frc = _prepareFreeAndCollectError(tls, (*Tsqlite3rbu)(unsafe.Pointer(p)).FdbMain, pIter+80, p+36, Xsqlite3_mprintf(tls, __ccgo_ts+30953, libc.VaList(bp+24, zTbl, zBind)))
}
/* And to delete index entries */
if libc.BoolInt32((*Tsqlite3rbu)(unsafe.Pointer(p)).FzTarget == uintptr(0)) == 0 && (*Tsqlite3rbu)(unsafe.Pointer(p)).Frc == SQLITE_OK {
- (*Tsqlite3rbu)(unsafe.Pointer(p)).Frc = _prepareFreeAndCollectError(tls, (*Tsqlite3rbu)(unsafe.Pointer(p)).FdbMain, pIter+84, p+36, Xsqlite3_mprintf(tls, __ccgo_ts+30934, libc.VaList(bp+24, zTbl, *(*uintptr)(unsafe.Pointer(bp + 8)))))
+ (*Tsqlite3rbu)(unsafe.Pointer(p)).Frc = _prepareFreeAndCollectError(tls, (*Tsqlite3rbu)(unsafe.Pointer(p)).FdbMain, pIter+84, p+36, Xsqlite3_mprintf(tls, __ccgo_ts+30989, libc.VaList(bp+24, zTbl, *(*uintptr)(unsafe.Pointer(bp + 8)))))
}
/* Create the SELECT statement to read keys in sorted order */
if (*Tsqlite3rbu)(unsafe.Pointer(p)).Frc == SQLITE_OK {
@@ -186318,26 +186751,26 @@ func _rbuObjIterPrepareAll(tls *libc.TLS, p uintptr, pIter uintptr, nOffset int3
}
if zStart != 0 {
if zPart != 0 {
- v2 = __ccgo_ts + 30968
+ v2 = __ccgo_ts + 31023
} else {
- v2 = __ccgo_ts + 30972
+ v2 = __ccgo_ts + 31027
}
v1 = v2
} else {
v1 = __ccgo_ts + 1667
}
- zSql = Xsqlite3_mprintf(tls, __ccgo_ts+30978, libc.VaList(bp+24, zCollist, (*TRbuObjIter)(unsafe.Pointer(pIter)).FzDataTbl, zPart, v1, zStart, zCollist, zLimit))
+ zSql = Xsqlite3_mprintf(tls, __ccgo_ts+31033, libc.VaList(bp+24, zCollist, (*TRbuObjIter)(unsafe.Pointer(pIter)).FzDataTbl, zPart, v1, zStart, zCollist, zLimit))
Xsqlite3_free(tls, zStart)
} else {
if (*TRbuObjIter)(unsafe.Pointer(pIter)).FeType == int32(RBU_PK_EXTERNAL) || (*TRbuObjIter)(unsafe.Pointer(pIter)).FeType == int32(RBU_PK_NONE) {
- zSql = Xsqlite3_mprintf(tls, __ccgo_ts+31039, libc.VaList(bp+24, zCollist, p+24, (*TRbuObjIter)(unsafe.Pointer(pIter)).FzDataTbl, zPart, zCollist, zLimit))
+ zSql = Xsqlite3_mprintf(tls, __ccgo_ts+31094, libc.VaList(bp+24, zCollist, p+24, (*TRbuObjIter)(unsafe.Pointer(pIter)).FzDataTbl, zPart, zCollist, zLimit))
} else {
if zPart != 0 {
- v3 = __ccgo_ts + 30968
+ v3 = __ccgo_ts + 31023
} else {
- v3 = __ccgo_ts + 30972
+ v3 = __ccgo_ts + 31027
}
- zSql = Xsqlite3_mprintf(tls, __ccgo_ts+31100, libc.VaList(bp+24, zCollist, p+24, (*TRbuObjIter)(unsafe.Pointer(pIter)).FzDataTbl, zPart, zCollist, (*TRbuObjIter)(unsafe.Pointer(pIter)).FzDataTbl, zPart, v3, zCollist, zLimit))
+ zSql = Xsqlite3_mprintf(tls, __ccgo_ts+31155, libc.VaList(bp+24, zCollist, p+24, (*TRbuObjIter)(unsafe.Pointer(pIter)).FzDataTbl, zPart, zCollist, (*TRbuObjIter)(unsafe.Pointer(pIter)).FzDataTbl, zPart, v3, zCollist, zLimit))
}
}
if (*Tsqlite3rbu)(unsafe.Pointer(p)).Frc == SQLITE_OK {
@@ -186356,8 +186789,8 @@ func _rbuObjIterPrepareAll(tls *libc.TLS, p uintptr, pIter uintptr, nOffset int3
zTbl1 = (*TRbuObjIter)(unsafe.Pointer(pIter)).FzTbl /* Imposter table name */
zBindings = _rbuObjIterGetBindlist(tls, p, (*TRbuObjIter)(unsafe.Pointer(pIter)).FnTblCol+bRbuRowid)
zWhere1 = _rbuObjIterGetWhere(tls, p, pIter)
- zOldlist = _rbuObjIterGetOldlist(tls, p, pIter, __ccgo_ts+6726)
- zNewlist = _rbuObjIterGetOldlist(tls, p, pIter, __ccgo_ts+6722)
+ zOldlist = _rbuObjIterGetOldlist(tls, p, pIter, __ccgo_ts+6751)
+ zNewlist = _rbuObjIterGetOldlist(tls, p, pIter, __ccgo_ts+6747)
zCollist = _rbuObjIterGetCollist(tls, p, pIter)
(*TRbuObjIter)(unsafe.Pointer(pIter)).FnCol = (*TRbuObjIter)(unsafe.Pointer(pIter)).FnTblCol
/* Create the imposter table or tables (if required). */
@@ -186366,39 +186799,39 @@ func _rbuObjIterPrepareAll(tls *libc.TLS, p uintptr, pIter uintptr, nOffset int3
if (*TRbuObjIter)(unsafe.Pointer(pIter)).FeType == int32(RBU_PK_VTAB) {
v4 = __ccgo_ts + 1667
} else {
- v4 = __ccgo_ts + 31259
+ v4 = __ccgo_ts + 31314
}
zWrite = v4
/* Create the INSERT statement to write to the target PK b-tree */
if (*Tsqlite3rbu)(unsafe.Pointer(p)).Frc == SQLITE_OK {
if bRbuRowid != 0 {
- v5 = __ccgo_ts + 31268
+ v5 = __ccgo_ts + 31323
} else {
v5 = __ccgo_ts + 1667
}
- (*Tsqlite3rbu)(unsafe.Pointer(p)).Frc = _prepareFreeAndCollectError(tls, (*Tsqlite3rbu)(unsafe.Pointer(p)).FdbMain, pIter+80, pz, Xsqlite3_mprintf(tls, __ccgo_ts+31278, libc.VaList(bp+24, zWrite, zTbl1, zCollist, v5, zBindings)))
+ (*Tsqlite3rbu)(unsafe.Pointer(p)).Frc = _prepareFreeAndCollectError(tls, (*Tsqlite3rbu)(unsafe.Pointer(p)).FdbMain, pIter+80, pz, Xsqlite3_mprintf(tls, __ccgo_ts+31333, libc.VaList(bp+24, zWrite, zTbl1, zCollist, v5, zBindings)))
}
/* Create the DELETE statement to write to the target PK b-tree.
** Because it only performs INSERT operations, this is not required for
** an rbu vacuum handle. */
if libc.BoolInt32((*Tsqlite3rbu)(unsafe.Pointer(p)).FzTarget == uintptr(0)) == 0 && (*Tsqlite3rbu)(unsafe.Pointer(p)).Frc == SQLITE_OK {
- (*Tsqlite3rbu)(unsafe.Pointer(p)).Frc = _prepareFreeAndCollectError(tls, (*Tsqlite3rbu)(unsafe.Pointer(p)).FdbMain, pIter+84, pz, Xsqlite3_mprintf(tls, __ccgo_ts+31314, libc.VaList(bp+24, zWrite, zTbl1, zWhere1)))
+ (*Tsqlite3rbu)(unsafe.Pointer(p)).Frc = _prepareFreeAndCollectError(tls, (*Tsqlite3rbu)(unsafe.Pointer(p)).FdbMain, pIter+84, pz, Xsqlite3_mprintf(tls, __ccgo_ts+31369, libc.VaList(bp+24, zWrite, zTbl1, zWhere1)))
}
if libc.BoolInt32((*Tsqlite3rbu)(unsafe.Pointer(p)).FzTarget == uintptr(0)) == 0 && (*TRbuObjIter)(unsafe.Pointer(pIter)).FabIndexed != 0 {
zRbuRowid = __ccgo_ts + 1667
if (*TRbuObjIter)(unsafe.Pointer(pIter)).FeType == int32(RBU_PK_EXTERNAL) || (*TRbuObjIter)(unsafe.Pointer(pIter)).FeType == int32(RBU_PK_NONE) {
- zRbuRowid = __ccgo_ts + 31342
+ zRbuRowid = __ccgo_ts + 31397
}
/* Create the rbu_tmp_xxx table and the triggers to populate it. */
if (*TRbuObjIter)(unsafe.Pointer(pIter)).FeType == int32(RBU_PK_EXTERNAL) {
- v6 = __ccgo_ts + 31354
+ v6 = __ccgo_ts + 31409
} else {
v6 = __ccgo_ts + 1667
}
- _rbuMPrintfExec(tls, p, (*Tsqlite3rbu)(unsafe.Pointer(p)).FdbRbu, __ccgo_ts+31371, libc.VaList(bp+24, p+24, (*TRbuObjIter)(unsafe.Pointer(pIter)).FzDataTbl, v6, (*TRbuObjIter)(unsafe.Pointer(pIter)).FzDataTbl))
- _rbuMPrintfExec(tls, p, (*Tsqlite3rbu)(unsafe.Pointer(p)).FdbMain, __ccgo_ts+31447, libc.VaList(bp+24, zWrite, zTbl1, zOldlist, zWrite, zTbl1, zOldlist, zWrite, zTbl1, zNewlist))
+ _rbuMPrintfExec(tls, p, (*Tsqlite3rbu)(unsafe.Pointer(p)).FdbRbu, __ccgo_ts+31426, libc.VaList(bp+24, p+24, (*TRbuObjIter)(unsafe.Pointer(pIter)).FzDataTbl, v6, (*TRbuObjIter)(unsafe.Pointer(pIter)).FzDataTbl))
+ _rbuMPrintfExec(tls, p, (*Tsqlite3rbu)(unsafe.Pointer(p)).FdbMain, __ccgo_ts+31502, libc.VaList(bp+24, zWrite, zTbl1, zOldlist, zWrite, zTbl1, zOldlist, zWrite, zTbl1, zNewlist))
if (*TRbuObjIter)(unsafe.Pointer(pIter)).FeType == int32(RBU_PK_EXTERNAL) || (*TRbuObjIter)(unsafe.Pointer(pIter)).FeType == int32(RBU_PK_NONE) {
- _rbuMPrintfExec(tls, p, (*Tsqlite3rbu)(unsafe.Pointer(p)).FdbMain, __ccgo_ts+31746, libc.VaList(bp+24, zWrite, zTbl1, zNewlist))
+ _rbuMPrintfExec(tls, p, (*Tsqlite3rbu)(unsafe.Pointer(p)).FdbMain, __ccgo_ts+31801, libc.VaList(bp+24, zWrite, zTbl1, zNewlist))
}
_rbuObjIterPrepareTmpInsert(tls, p, pIter, zCollist, zRbuRowid)
}
@@ -186409,9 +186842,9 @@ func _rbuObjIterPrepareAll(tls *libc.TLS, p uintptr, pIter uintptr, nOffset int3
zOrder = uintptr(0)
if bRbuRowid != 0 {
if (*Tsqlite3rbu)(unsafe.Pointer(p)).FzTarget == uintptr(0) {
- v7 = __ccgo_ts + 31845
+ v7 = __ccgo_ts + 31900
} else {
- v7 = __ccgo_ts + 31855
+ v7 = __ccgo_ts + 31910
}
zRbuRowid1 = v7
}
@@ -186424,14 +186857,14 @@ func _rbuObjIterPrepareAll(tls *libc.TLS, p uintptr, pIter uintptr, nOffset int3
}
}
if bRbuRowid != 0 {
- zOrder = _rbuMPrintf(tls, p, __ccgo_ts+29902, 0)
+ zOrder = _rbuMPrintf(tls, p, __ccgo_ts+29957, 0)
} else {
- zOrder = _rbuObjIterGetPkList(tls, p, pIter, __ccgo_ts+1667, __ccgo_ts+15149, __ccgo_ts+1667)
+ zOrder = _rbuObjIterGetPkList(tls, p, pIter, __ccgo_ts+1667, __ccgo_ts+15174, __ccgo_ts+1667)
}
}
if (*Tsqlite3rbu)(unsafe.Pointer(p)).Frc == SQLITE_OK {
if (*Tsqlite3rbu)(unsafe.Pointer(p)).FzTarget == uintptr(0) {
- v8 = __ccgo_ts + 31866
+ v8 = __ccgo_ts + 31921
} else {
v8 = __ccgo_ts + 1667
}
@@ -186441,11 +186874,11 @@ func _rbuObjIterPrepareAll(tls *libc.TLS, p uintptr, pIter uintptr, nOffset int3
v9 = __ccgo_ts + 1667
}
if zOrder != 0 {
- v10 = __ccgo_ts + 23490
+ v10 = __ccgo_ts + 23562
} else {
v10 = __ccgo_ts + 1667
}
- (*Tsqlite3rbu)(unsafe.Pointer(p)).Frc = _prepareFreeAndCollectError(tls, (*Tsqlite3rbu)(unsafe.Pointer(p)).FdbRbu, pIter+76, pz, Xsqlite3_mprintf(tls, __ccgo_ts+31872, libc.VaList(bp+24, zCollist, v8, zRbuRowid1, (*TRbuObjIter)(unsafe.Pointer(pIter)).FzDataTbl, v9, v10, zOrder, zLimit)))
+ (*Tsqlite3rbu)(unsafe.Pointer(p)).Frc = _prepareFreeAndCollectError(tls, (*Tsqlite3rbu)(unsafe.Pointer(p)).FdbRbu, pIter+76, pz, Xsqlite3_mprintf(tls, __ccgo_ts+31927, libc.VaList(bp+24, zCollist, v8, zRbuRowid1, (*TRbuObjIter)(unsafe.Pointer(pIter)).FzDataTbl, v9, v10, zOrder, zLimit)))
}
Xsqlite3_free(tls, zStart1)
Xsqlite3_free(tls, zOrder)
@@ -186533,9 +186966,9 @@ func _rbuGetUpdateStmt(tls *libc.TLS, p uintptr, pIter uintptr, zMask uintptr, p
if zSet != 0 {
zPrefix = __ccgo_ts + 1667
if (*TRbuObjIter)(unsafe.Pointer(pIter)).FeType != int32(RBU_PK_VTAB) {
- zPrefix = __ccgo_ts + 31259
+ zPrefix = __ccgo_ts + 31314
}
- zUpdate = Xsqlite3_mprintf(tls, __ccgo_ts+31920, libc.VaList(bp+8, zPrefix, (*TRbuObjIter)(unsafe.Pointer(pIter)).FzTbl, zSet, zWhere))
+ zUpdate = Xsqlite3_mprintf(tls, __ccgo_ts+31975, libc.VaList(bp+8, zPrefix, (*TRbuObjIter)(unsafe.Pointer(pIter)).FzTbl, zSet, zWhere))
(*Tsqlite3rbu)(unsafe.Pointer(p)).Frc = _prepareFreeAndCollectError(tls, (*Tsqlite3rbu)(unsafe.Pointer(p)).FdbMain, pUp+4, p+36, zUpdate)
*(*uintptr)(unsafe.Pointer(ppStmt)) = (*TRbuUpdateStmt)(unsafe.Pointer(pUp)).FpUpdate
}
@@ -186562,7 +186995,7 @@ func _rbuOpenDbhandle(tls *libc.TLS, p uintptr, zName uintptr, bUseVfs int32) (r
}
(*Tsqlite3rbu)(unsafe.Pointer(p)).Frc = Xsqlite3_open_v2(tls, zName, bp, flags, v1)
if (*Tsqlite3rbu)(unsafe.Pointer(p)).Frc != 0 {
- (*Tsqlite3rbu)(unsafe.Pointer(p)).FzErrmsg = Xsqlite3_mprintf(tls, __ccgo_ts+3864, libc.VaList(bp+16, Xsqlite3_errmsg(tls, *(*uintptr)(unsafe.Pointer(bp)))))
+ (*Tsqlite3rbu)(unsafe.Pointer(p)).FzErrmsg = Xsqlite3_mprintf(tls, __ccgo_ts+3890, libc.VaList(bp+16, Xsqlite3_errmsg(tls, *(*uintptr)(unsafe.Pointer(bp)))))
Xsqlite3_close(tls, *(*uintptr)(unsafe.Pointer(bp)))
*(*uintptr)(unsafe.Pointer(bp)) = uintptr(0)
}
@@ -186609,7 +187042,7 @@ func _rbuLoadState(tls *libc.TLS, p uintptr) (r uintptr) {
if pRet == uintptr(0) {
return uintptr(0)
}
- *(*int32)(unsafe.Pointer(bp + 4)) = _prepareFreeAndCollectError(tls, (*Tsqlite3rbu)(unsafe.Pointer(p)).FdbRbu, bp, p+36, Xsqlite3_mprintf(tls, __ccgo_ts+31950, libc.VaList(bp+16, p+24)))
+ *(*int32)(unsafe.Pointer(bp + 4)) = _prepareFreeAndCollectError(tls, (*Tsqlite3rbu)(unsafe.Pointer(p)).FdbRbu, bp, p+36, Xsqlite3_mprintf(tls, __ccgo_ts+32005, libc.VaList(bp+16, p+24)))
for *(*int32)(unsafe.Pointer(bp + 4)) == SQLITE_OK && int32(SQLITE_ROW) == Xsqlite3_step(tls, *(*uintptr)(unsafe.Pointer(bp))) {
switch Xsqlite3_column_int(tls, *(*uintptr)(unsafe.Pointer(bp)), 0) {
case int32(RBU_STATE_STAGE):
@@ -186668,27 +187101,27 @@ func _rbuOpenDatabase(tls *libc.TLS, p uintptr, dbMain uintptr, pbRetry uintptr)
(*Tsqlite3rbu)(unsafe.Pointer(p)).FdbRbu = _rbuOpenDbhandle(tls, p, (*Tsqlite3rbu)(unsafe.Pointer(p)).FzRbu, int32(1))
(*Tsqlite3rbu)(unsafe.Pointer(p)).FdbMain = dbMain
if (*Tsqlite3rbu)(unsafe.Pointer(p)).Frc == SQLITE_OK && (*Tsqlite3rbu)(unsafe.Pointer(p)).FzTarget == uintptr(0) {
- Xsqlite3_file_control(tls, (*Tsqlite3rbu)(unsafe.Pointer(p)).FdbRbu, __ccgo_ts+6715, int32(SQLITE_FCNTL_RBUCNT), p)
+ Xsqlite3_file_control(tls, (*Tsqlite3rbu)(unsafe.Pointer(p)).FdbRbu, __ccgo_ts+6740, int32(SQLITE_FCNTL_RBUCNT), p)
if (*Tsqlite3rbu)(unsafe.Pointer(p)).FzState == uintptr(0) {
- zFile = Xsqlite3_db_filename(tls, (*Tsqlite3rbu)(unsafe.Pointer(p)).FdbRbu, __ccgo_ts+6715)
- (*Tsqlite3rbu)(unsafe.Pointer(p)).FzState = _rbuMPrintf(tls, p, __ccgo_ts+31980, libc.VaList(bp+8, zFile, zFile))
+ zFile = Xsqlite3_db_filename(tls, (*Tsqlite3rbu)(unsafe.Pointer(p)).FdbRbu, __ccgo_ts+6740)
+ (*Tsqlite3rbu)(unsafe.Pointer(p)).FzState = _rbuMPrintf(tls, p, __ccgo_ts+32035, libc.VaList(bp+8, zFile, zFile))
}
}
/* If using separate RBU and state databases, attach the state database to
** the RBU db handle now. */
if (*Tsqlite3rbu)(unsafe.Pointer(p)).FzState != 0 {
- _rbuMPrintfExec(tls, p, (*Tsqlite3rbu)(unsafe.Pointer(p)).FdbRbu, __ccgo_ts+32008, libc.VaList(bp+8, (*Tsqlite3rbu)(unsafe.Pointer(p)).FzState))
- libc.Xmemcpy(tls, p+24, __ccgo_ts+3487, uint32(4))
+ _rbuMPrintfExec(tls, p, (*Tsqlite3rbu)(unsafe.Pointer(p)).FdbRbu, __ccgo_ts+32063, libc.VaList(bp+8, (*Tsqlite3rbu)(unsafe.Pointer(p)).FzState))
+ libc.Xmemcpy(tls, p+24, __ccgo_ts+3513, uint32(4))
} else {
- libc.Xmemcpy(tls, p+24, __ccgo_ts+6715, uint32(4))
+ libc.Xmemcpy(tls, p+24, __ccgo_ts+6740, uint32(4))
}
/* If it has not already been created, create the rbu_state table */
- _rbuMPrintfExec(tls, p, (*Tsqlite3rbu)(unsafe.Pointer(p)).FdbRbu, __ccgo_ts+32026, libc.VaList(bp+8, p+24))
+ _rbuMPrintfExec(tls, p, (*Tsqlite3rbu)(unsafe.Pointer(p)).FdbRbu, __ccgo_ts+32081, libc.VaList(bp+8, p+24))
if (*Tsqlite3rbu)(unsafe.Pointer(p)).Frc == SQLITE_OK && (*Tsqlite3rbu)(unsafe.Pointer(p)).FzTarget == uintptr(0) {
bOpen = 0
(*Tsqlite3rbu)(unsafe.Pointer(p)).FnRbu = 0
(*Tsqlite3rbu)(unsafe.Pointer(p)).FpRbuFd = uintptr(0)
- rc = Xsqlite3_file_control(tls, (*Tsqlite3rbu)(unsafe.Pointer(p)).FdbRbu, __ccgo_ts+6715, int32(SQLITE_FCNTL_RBUCNT), p)
+ rc = Xsqlite3_file_control(tls, (*Tsqlite3rbu)(unsafe.Pointer(p)).FdbRbu, __ccgo_ts+6740, int32(SQLITE_FCNTL_RBUCNT), p)
if rc != int32(SQLITE_NOTFOUND) {
(*Tsqlite3rbu)(unsafe.Pointer(p)).Frc = rc
}
@@ -186721,10 +187154,10 @@ func _rbuOpenDatabase(tls *libc.TLS, p uintptr, dbMain uintptr, pbRetry uintptr)
return
}
(*Tsqlite3rbu)(unsafe.Pointer(p)).Frc = int32(SQLITE_ERROR)
- (*Tsqlite3rbu)(unsafe.Pointer(p)).FzErrmsg = Xsqlite3_mprintf(tls, __ccgo_ts+32092, 0)
+ (*Tsqlite3rbu)(unsafe.Pointer(p)).FzErrmsg = Xsqlite3_mprintf(tls, __ccgo_ts+32147, 0)
} else {
zExtra = uintptr(0)
- if libc.Xstrlen(tls, (*Tsqlite3rbu)(unsafe.Pointer(p)).FzRbu) >= uint32(5) && 0 == libc.Xmemcmp(tls, __ccgo_ts+24833, (*Tsqlite3rbu)(unsafe.Pointer(p)).FzRbu, uint32(5)) {
+ if libc.Xstrlen(tls, (*Tsqlite3rbu)(unsafe.Pointer(p)).FzRbu) >= uint32(5) && 0 == libc.Xmemcmp(tls, __ccgo_ts+24905, (*Tsqlite3rbu)(unsafe.Pointer(p)).FzRbu, uint32(5)) {
zExtra = (*Tsqlite3rbu)(unsafe.Pointer(p)).FzRbu + 5
for *(*int8)(unsafe.Pointer(zExtra)) != 0 {
v1 = zExtra
@@ -186740,14 +187173,14 @@ func _rbuOpenDatabase(tls *libc.TLS, p uintptr, dbMain uintptr, pbRetry uintptr)
if zExtra == uintptr(0) {
v2 = __ccgo_ts + 1667
} else {
- v2 = __ccgo_ts + 32124
+ v2 = __ccgo_ts + 32179
}
if zExtra == uintptr(0) {
v3 = __ccgo_ts + 1667
} else {
v3 = zExtra
}
- zTarget = Xsqlite3_mprintf(tls, __ccgo_ts+32126, libc.VaList(bp+8, Xsqlite3_db_filename(tls, (*Tsqlite3rbu)(unsafe.Pointer(p)).FdbRbu, __ccgo_ts+6715), v2, v3))
+ zTarget = Xsqlite3_mprintf(tls, __ccgo_ts+32181, libc.VaList(bp+8, Xsqlite3_db_filename(tls, (*Tsqlite3rbu)(unsafe.Pointer(p)).FdbRbu, __ccgo_ts+6740), v2, v3))
if zTarget == uintptr(0) {
(*Tsqlite3rbu)(unsafe.Pointer(p)).Frc = int32(SQLITE_NOMEM)
return
@@ -186758,27 +187191,27 @@ func _rbuOpenDatabase(tls *libc.TLS, p uintptr, dbMain uintptr, pbRetry uintptr)
}
}
if (*Tsqlite3rbu)(unsafe.Pointer(p)).Frc == SQLITE_OK {
- (*Tsqlite3rbu)(unsafe.Pointer(p)).Frc = Xsqlite3_create_function(tls, (*Tsqlite3rbu)(unsafe.Pointer(p)).FdbMain, __ccgo_ts+32158, -int32(1), int32(SQLITE_UTF8), p, __ccgo_fp(_rbuTmpInsertFunc), uintptr(0), uintptr(0))
+ (*Tsqlite3rbu)(unsafe.Pointer(p)).Frc = Xsqlite3_create_function(tls, (*Tsqlite3rbu)(unsafe.Pointer(p)).FdbMain, __ccgo_ts+32213, -int32(1), int32(SQLITE_UTF8), p, __ccgo_fp(_rbuTmpInsertFunc), uintptr(0), uintptr(0))
}
if (*Tsqlite3rbu)(unsafe.Pointer(p)).Frc == SQLITE_OK {
- (*Tsqlite3rbu)(unsafe.Pointer(p)).Frc = Xsqlite3_create_function(tls, (*Tsqlite3rbu)(unsafe.Pointer(p)).FdbMain, __ccgo_ts+32173, int32(2), int32(SQLITE_UTF8), uintptr(0), __ccgo_fp(_rbuFossilDeltaFunc), uintptr(0), uintptr(0))
+ (*Tsqlite3rbu)(unsafe.Pointer(p)).Frc = Xsqlite3_create_function(tls, (*Tsqlite3rbu)(unsafe.Pointer(p)).FdbMain, __ccgo_ts+32228, int32(2), int32(SQLITE_UTF8), uintptr(0), __ccgo_fp(_rbuFossilDeltaFunc), uintptr(0), uintptr(0))
}
if (*Tsqlite3rbu)(unsafe.Pointer(p)).Frc == SQLITE_OK {
- (*Tsqlite3rbu)(unsafe.Pointer(p)).Frc = Xsqlite3_create_function(tls, (*Tsqlite3rbu)(unsafe.Pointer(p)).FdbRbu, __ccgo_ts+32190, -int32(1), int32(SQLITE_UTF8), p, __ccgo_fp(_rbuTargetNameFunc), uintptr(0), uintptr(0))
+ (*Tsqlite3rbu)(unsafe.Pointer(p)).Frc = Xsqlite3_create_function(tls, (*Tsqlite3rbu)(unsafe.Pointer(p)).FdbRbu, __ccgo_ts+32245, -int32(1), int32(SQLITE_UTF8), p, __ccgo_fp(_rbuTargetNameFunc), uintptr(0), uintptr(0))
}
if (*Tsqlite3rbu)(unsafe.Pointer(p)).Frc == SQLITE_OK {
- (*Tsqlite3rbu)(unsafe.Pointer(p)).Frc = Xsqlite3_file_control(tls, (*Tsqlite3rbu)(unsafe.Pointer(p)).FdbMain, __ccgo_ts+6715, int32(SQLITE_FCNTL_RBU), p)
+ (*Tsqlite3rbu)(unsafe.Pointer(p)).Frc = Xsqlite3_file_control(tls, (*Tsqlite3rbu)(unsafe.Pointer(p)).FdbMain, __ccgo_ts+6740, int32(SQLITE_FCNTL_RBU), p)
}
- _rbuMPrintfExec(tls, p, (*Tsqlite3rbu)(unsafe.Pointer(p)).FdbMain, __ccgo_ts+32206, 0)
+ _rbuMPrintfExec(tls, p, (*Tsqlite3rbu)(unsafe.Pointer(p)).FdbMain, __ccgo_ts+32261, 0)
/* Mark the database file just opened as an RBU target database. If
** this call returns SQLITE_NOTFOUND, then the RBU vfs is not in use.
** This is an error. */
if (*Tsqlite3rbu)(unsafe.Pointer(p)).Frc == SQLITE_OK {
- (*Tsqlite3rbu)(unsafe.Pointer(p)).Frc = Xsqlite3_file_control(tls, (*Tsqlite3rbu)(unsafe.Pointer(p)).FdbMain, __ccgo_ts+6715, int32(SQLITE_FCNTL_RBU), p)
+ (*Tsqlite3rbu)(unsafe.Pointer(p)).Frc = Xsqlite3_file_control(tls, (*Tsqlite3rbu)(unsafe.Pointer(p)).FdbMain, __ccgo_ts+6740, int32(SQLITE_FCNTL_RBU), p)
}
if (*Tsqlite3rbu)(unsafe.Pointer(p)).Frc == int32(SQLITE_NOTFOUND) {
(*Tsqlite3rbu)(unsafe.Pointer(p)).Frc = int32(SQLITE_ERROR)
- (*Tsqlite3rbu)(unsafe.Pointer(p)).FzErrmsg = Xsqlite3_mprintf(tls, __ccgo_ts+32234, 0)
+ (*Tsqlite3rbu)(unsafe.Pointer(p)).FzErrmsg = Xsqlite3_mprintf(tls, __ccgo_ts+32289, 0)
}
}
@@ -186864,7 +187297,7 @@ func _rbuSetupCheckpoint(tls *libc.TLS, p uintptr, pState uintptr) {
if pState == uintptr(0) {
(*Tsqlite3rbu)(unsafe.Pointer(p)).FeStage = 0
if (*Tsqlite3rbu)(unsafe.Pointer(p)).Frc == SQLITE_OK {
- (*Tsqlite3rbu)(unsafe.Pointer(p)).Frc = Xsqlite3_exec(tls, (*Tsqlite3rbu)(unsafe.Pointer(p)).FdbMain, __ccgo_ts+32206, uintptr(0), uintptr(0), uintptr(0))
+ (*Tsqlite3rbu)(unsafe.Pointer(p)).Frc = Xsqlite3_exec(tls, (*Tsqlite3rbu)(unsafe.Pointer(p)).FdbMain, __ccgo_ts+32261, uintptr(0), uintptr(0), uintptr(0))
}
}
/* Assuming no error has occurred, run a "restart" checkpoint with the
@@ -186897,7 +187330,7 @@ func _rbuSetupCheckpoint(tls *libc.TLS, p uintptr, pState uintptr) {
*/
if (*Tsqlite3rbu)(unsafe.Pointer(p)).Frc == SQLITE_OK {
(*Tsqlite3rbu)(unsafe.Pointer(p)).FeStage = int32(RBU_STAGE_CAPTURE)
- rc2 = Xsqlite3_exec(tls, (*Tsqlite3rbu)(unsafe.Pointer(p)).FdbMain, __ccgo_ts+32252, uintptr(0), uintptr(0), uintptr(0))
+ rc2 = Xsqlite3_exec(tls, (*Tsqlite3rbu)(unsafe.Pointer(p)).FdbMain, __ccgo_ts+32307, uintptr(0), uintptr(0), uintptr(0))
if rc2 != int32(SQLITE_NOTICE) {
(*Tsqlite3rbu)(unsafe.Pointer(p)).Frc = rc2
}
@@ -187030,16 +187463,16 @@ func _rbuLockDatabase(tls *libc.TLS, db uintptr) (r int32) {
_ = rc
rc = SQLITE_OK
*(*uintptr)(unsafe.Pointer(bp)) = uintptr(0)
- Xsqlite3_file_control(tls, db, __ccgo_ts+6715, int32(RBU_ZIPVFS_CTRL_FILE_POINTER), bp)
+ Xsqlite3_file_control(tls, db, __ccgo_ts+6740, int32(RBU_ZIPVFS_CTRL_FILE_POINTER), bp)
if *(*uintptr)(unsafe.Pointer(bp)) != 0 {
- Xsqlite3_file_control(tls, db, __ccgo_ts+6715, int32(SQLITE_FCNTL_FILE_POINTER), bp)
+ Xsqlite3_file_control(tls, db, __ccgo_ts+6740, int32(SQLITE_FCNTL_FILE_POINTER), bp)
rc = (*(*func(*libc.TLS, uintptr, int32) int32)(unsafe.Pointer(&struct{ uintptr }{(*Tsqlite3_io_methods1)(unsafe.Pointer((*Tsqlite3_file)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp)))).FpMethods)).FxLock})))(tls, *(*uintptr)(unsafe.Pointer(bp)), int32(SQLITE_LOCK_SHARED))
if rc == SQLITE_OK {
rc = (*(*func(*libc.TLS, uintptr, int32) int32)(unsafe.Pointer(&struct{ uintptr }{(*Tsqlite3_io_methods1)(unsafe.Pointer((*Tsqlite3_file)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp)))).FpMethods)).FxUnlock})))(tls, *(*uintptr)(unsafe.Pointer(bp)), SQLITE_LOCK_NONE)
}
- Xsqlite3_file_control(tls, db, __ccgo_ts+6715, int32(RBU_ZIPVFS_CTRL_FILE_POINTER), bp)
+ Xsqlite3_file_control(tls, db, __ccgo_ts+6740, int32(RBU_ZIPVFS_CTRL_FILE_POINTER), bp)
} else {
- Xsqlite3_file_control(tls, db, __ccgo_ts+6715, int32(SQLITE_FCNTL_FILE_POINTER), bp)
+ Xsqlite3_file_control(tls, db, __ccgo_ts+6740, int32(SQLITE_FCNTL_FILE_POINTER), bp)
}
if rc == SQLITE_OK && (*Tsqlite3_file)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp)))).FpMethods != 0 {
rc = (*(*func(*libc.TLS, uintptr, int32) int32)(unsafe.Pointer(&struct{ uintptr }{(*Tsqlite3_io_methods1)(unsafe.Pointer((*Tsqlite3_file)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp)))).FpMethods)).FxLock})))(tls, *(*uintptr)(unsafe.Pointer(bp)), int32(SQLITE_LOCK_SHARED))
@@ -187061,7 +187494,7 @@ func _rbuExclusiveCheckpoint(tls *libc.TLS, db uintptr) (r int32) {
var zUri uintptr
_ = zUri
zUri = Xsqlite3_db_filename(tls, db, uintptr(0))
- return Xsqlite3_uri_boolean(tls, zUri, __ccgo_ts+32287, 0)
+ return Xsqlite3_uri_boolean(tls, zUri, __ccgo_ts+32342, 0)
}
// C documentation
@@ -187078,13 +187511,13 @@ func _rbuMoveOalFile(tls *libc.TLS, p uintptr) {
defer tls.Free(16)
var dbMain, zBase, zMove, zOal, zWal uintptr
_, _, _, _, _ = dbMain, zBase, zMove, zOal, zWal
- zBase = Xsqlite3_db_filename(tls, (*Tsqlite3rbu)(unsafe.Pointer(p)).FdbMain, __ccgo_ts+6715)
+ zBase = Xsqlite3_db_filename(tls, (*Tsqlite3rbu)(unsafe.Pointer(p)).FdbMain, __ccgo_ts+6740)
zMove = zBase
if (*Tsqlite3rbu)(unsafe.Pointer(p)).FzTarget == uintptr(0) {
- zMove = Xsqlite3_db_filename(tls, (*Tsqlite3rbu)(unsafe.Pointer(p)).FdbRbu, __ccgo_ts+6715)
+ zMove = Xsqlite3_db_filename(tls, (*Tsqlite3rbu)(unsafe.Pointer(p)).FdbRbu, __ccgo_ts+6740)
}
- zOal = Xsqlite3_mprintf(tls, __ccgo_ts+32312, libc.VaList(bp+8, zMove))
- zWal = Xsqlite3_mprintf(tls, __ccgo_ts+32319, libc.VaList(bp+8, zMove))
+ zOal = Xsqlite3_mprintf(tls, __ccgo_ts+32367, libc.VaList(bp+8, zMove))
+ zWal = Xsqlite3_mprintf(tls, __ccgo_ts+32374, libc.VaList(bp+8, zMove))
if zWal == uintptr(0) || zOal == uintptr(0) {
(*Tsqlite3rbu)(unsafe.Pointer(p)).Frc = int32(SQLITE_NOMEM)
} else {
@@ -187216,7 +187649,7 @@ func _rbuStepOneOp(tls *libc.TLS, p uintptr, eType int32) {
** to write a NULL into the IPK column. That is not permitted. */
if eType == int32(RBU_INSERT) && (*TRbuObjIter)(unsafe.Pointer(pIter)).FzIdx == uintptr(0) && (*TRbuObjIter)(unsafe.Pointer(pIter)).FeType == int32(RBU_PK_IPK) && *(*Tu8)(unsafe.Pointer((*TRbuObjIter)(unsafe.Pointer(pIter)).FabTblPk + uintptr(i))) != 0 && Xsqlite3_column_type(tls, (*TRbuObjIter)(unsafe.Pointer(pIter)).FpSelect, i) == int32(SQLITE_NULL) {
(*Tsqlite3rbu)(unsafe.Pointer(p)).Frc = int32(SQLITE_MISMATCH)
- (*Tsqlite3rbu)(unsafe.Pointer(p)).FzErrmsg = Xsqlite3_mprintf(tls, __ccgo_ts+24390, 0)
+ (*Tsqlite3rbu)(unsafe.Pointer(p)).FzErrmsg = Xsqlite3_mprintf(tls, __ccgo_ts+24462, 0)
return
}
if eType == int32(RBU_DELETE) && libc.Int32FromUint8(*(*Tu8)(unsafe.Pointer((*TRbuObjIter)(unsafe.Pointer(pIter)).FabTblPk + uintptr(i)))) == 0 {
@@ -187352,7 +187785,7 @@ func _rbuIncrSchemaCookie(tls *libc.TLS, p uintptr) {
}
dbread = v1
iCookie = int32(1000000)
- (*Tsqlite3rbu)(unsafe.Pointer(p)).Frc = _prepareAndCollectError(tls, dbread, bp, p+36, __ccgo_ts+32326)
+ (*Tsqlite3rbu)(unsafe.Pointer(p)).Frc = _prepareAndCollectError(tls, dbread, bp, p+36, __ccgo_ts+32381)
if (*Tsqlite3rbu)(unsafe.Pointer(p)).Frc == SQLITE_OK {
/* Coverage: it may be that this sqlite3_step() cannot fail. There
** is already a transaction open, so the prepared statement cannot
@@ -187365,7 +187798,7 @@ func _rbuIncrSchemaCookie(tls *libc.TLS, p uintptr) {
_rbuFinalize(tls, p, *(*uintptr)(unsafe.Pointer(bp)))
}
if (*Tsqlite3rbu)(unsafe.Pointer(p)).Frc == SQLITE_OK {
- _rbuMPrintfExec(tls, p, (*Tsqlite3rbu)(unsafe.Pointer(p)).FdbMain, __ccgo_ts+32348, libc.VaList(bp+16, iCookie+int32(1)))
+ _rbuMPrintfExec(tls, p, (*Tsqlite3rbu)(unsafe.Pointer(p)).FdbMain, __ccgo_ts+32403, libc.VaList(bp+16, iCookie+int32(1)))
}
}
}
@@ -187392,7 +187825,7 @@ func _rbuSaveState(tls *libc.TLS, p uintptr, eStage int32) {
v1 = (*Tsqlite3rbu)(unsafe.Pointer(p)).FpTargetFd
}
pFd = v1
- rc = _prepareFreeAndCollectError(tls, (*Tsqlite3rbu)(unsafe.Pointer(p)).FdbRbu, bp, p+36, Xsqlite3_mprintf(tls, __ccgo_ts+32375, libc.VaList(bp+16, p+24, int32(RBU_STATE_STAGE), eStage, int32(RBU_STATE_TBL), (*Tsqlite3rbu)(unsafe.Pointer(p)).Fobjiter.FzTbl, int32(RBU_STATE_IDX), (*Tsqlite3rbu)(unsafe.Pointer(p)).Fobjiter.FzIdx, int32(RBU_STATE_ROW), (*Tsqlite3rbu)(unsafe.Pointer(p)).FnStep, int32(RBU_STATE_PROGRESS), (*Tsqlite3rbu)(unsafe.Pointer(p)).FnProgress, int32(RBU_STATE_CKPT), (*Tsqlite3rbu)(unsafe.Pointer(p)).FiWalCksum, int32(RBU_STATE_COOKIE), libc.Int64FromUint32((*Trbu_file)(unsafe.Pointer(pFd)).FiCookie), int32(RBU_STATE_OALSZ), (*Tsqlite3rbu)(unsafe.Pointer(p)).FiOalSz, int32(RBU_STATE_PHASEONESTEP), (*Tsqlite3rbu)(unsafe.Pointer(p)).FnPhaseOneStep, int32(RBU_STATE_DATATBL), (*Tsqlite3rbu)(unsafe.Pointer(p)).Fobjiter.FzDataTbl)))
+ rc = _prepareFreeAndCollectError(tls, (*Tsqlite3rbu)(unsafe.Pointer(p)).FdbRbu, bp, p+36, Xsqlite3_mprintf(tls, __ccgo_ts+32430, libc.VaList(bp+16, p+24, int32(RBU_STATE_STAGE), eStage, int32(RBU_STATE_TBL), (*Tsqlite3rbu)(unsafe.Pointer(p)).Fobjiter.FzTbl, int32(RBU_STATE_IDX), (*Tsqlite3rbu)(unsafe.Pointer(p)).Fobjiter.FzIdx, int32(RBU_STATE_ROW), (*Tsqlite3rbu)(unsafe.Pointer(p)).FnStep, int32(RBU_STATE_PROGRESS), (*Tsqlite3rbu)(unsafe.Pointer(p)).FnProgress, int32(RBU_STATE_CKPT), (*Tsqlite3rbu)(unsafe.Pointer(p)).FiWalCksum, int32(RBU_STATE_COOKIE), libc.Int64FromUint32((*Trbu_file)(unsafe.Pointer(pFd)).FiCookie), int32(RBU_STATE_OALSZ), (*Tsqlite3rbu)(unsafe.Pointer(p)).FiOalSz, int32(RBU_STATE_PHASEONESTEP), (*Tsqlite3rbu)(unsafe.Pointer(p)).FnPhaseOneStep, int32(RBU_STATE_DATATBL), (*Tsqlite3rbu)(unsafe.Pointer(p)).Fobjiter.FzDataTbl)))
if rc == SQLITE_OK {
Xsqlite3_step(tls, *(*uintptr)(unsafe.Pointer(bp)))
rc = Xsqlite3_finalize(tls, *(*uintptr)(unsafe.Pointer(bp)))
@@ -187428,9 +187861,9 @@ func _rbuCopyPragma(tls *libc.TLS, p uintptr, zPragma uintptr) {
var _ /* pPragma at bp+0 */ uintptr
if (*Tsqlite3rbu)(unsafe.Pointer(p)).Frc == SQLITE_OK {
*(*uintptr)(unsafe.Pointer(bp)) = uintptr(0)
- (*Tsqlite3rbu)(unsafe.Pointer(p)).Frc = _prepareFreeAndCollectError(tls, (*Tsqlite3rbu)(unsafe.Pointer(p)).FdbRbu, bp, p+36, Xsqlite3_mprintf(tls, __ccgo_ts+32535, libc.VaList(bp+16, zPragma)))
+ (*Tsqlite3rbu)(unsafe.Pointer(p)).Frc = _prepareFreeAndCollectError(tls, (*Tsqlite3rbu)(unsafe.Pointer(p)).FdbRbu, bp, p+36, Xsqlite3_mprintf(tls, __ccgo_ts+32590, libc.VaList(bp+16, zPragma)))
if (*Tsqlite3rbu)(unsafe.Pointer(p)).Frc == SQLITE_OK && int32(SQLITE_ROW) == Xsqlite3_step(tls, *(*uintptr)(unsafe.Pointer(bp))) {
- (*Tsqlite3rbu)(unsafe.Pointer(p)).Frc = _rbuMPrintfExec(tls, p, (*Tsqlite3rbu)(unsafe.Pointer(p)).FdbMain, __ccgo_ts+32550, libc.VaList(bp+16, zPragma, Xsqlite3_column_int(tls, *(*uintptr)(unsafe.Pointer(bp)), 0)))
+ (*Tsqlite3rbu)(unsafe.Pointer(p)).Frc = _rbuMPrintfExec(tls, p, (*Tsqlite3rbu)(unsafe.Pointer(p)).FdbMain, __ccgo_ts+32605, libc.VaList(bp+16, zPragma, Xsqlite3_column_int(tls, *(*uintptr)(unsafe.Pointer(bp)), 0)))
}
_rbuFinalize(tls, p, *(*uintptr)(unsafe.Pointer(bp)))
}
@@ -187453,9 +187886,9 @@ func _rbuCreateTargetSchema(tls *libc.TLS, p uintptr) {
_, _ = i, zSql
*(*uintptr)(unsafe.Pointer(bp)) = uintptr(0)
*(*uintptr)(unsafe.Pointer(bp + 4)) = uintptr(0)
- (*Tsqlite3rbu)(unsafe.Pointer(p)).Frc = Xsqlite3_exec(tls, (*Tsqlite3rbu)(unsafe.Pointer(p)).FdbMain, __ccgo_ts+32570, uintptr(0), uintptr(0), p+36)
+ (*Tsqlite3rbu)(unsafe.Pointer(p)).Frc = Xsqlite3_exec(tls, (*Tsqlite3rbu)(unsafe.Pointer(p)).FdbMain, __ccgo_ts+32625, uintptr(0), uintptr(0), p+36)
if (*Tsqlite3rbu)(unsafe.Pointer(p)).Frc == SQLITE_OK {
- (*Tsqlite3rbu)(unsafe.Pointer(p)).Frc = _prepareAndCollectError(tls, (*Tsqlite3rbu)(unsafe.Pointer(p)).FdbRbu, bp, p+36, __ccgo_ts+32595)
+ (*Tsqlite3rbu)(unsafe.Pointer(p)).Frc = _prepareAndCollectError(tls, (*Tsqlite3rbu)(unsafe.Pointer(p)).FdbRbu, bp, p+36, __ccgo_ts+32650)
}
for (*Tsqlite3rbu)(unsafe.Pointer(p)).Frc == SQLITE_OK && Xsqlite3_step(tls, *(*uintptr)(unsafe.Pointer(bp))) == int32(SQLITE_ROW) {
zSql = Xsqlite3_column_text(tls, *(*uintptr)(unsafe.Pointer(bp)), 0)
@@ -187466,10 +187899,10 @@ func _rbuCreateTargetSchema(tls *libc.TLS, p uintptr) {
return
}
if (*Tsqlite3rbu)(unsafe.Pointer(p)).Frc == SQLITE_OK {
- (*Tsqlite3rbu)(unsafe.Pointer(p)).Frc = _prepareAndCollectError(tls, (*Tsqlite3rbu)(unsafe.Pointer(p)).FdbRbu, bp, p+36, __ccgo_ts+32703)
+ (*Tsqlite3rbu)(unsafe.Pointer(p)).Frc = _prepareAndCollectError(tls, (*Tsqlite3rbu)(unsafe.Pointer(p)).FdbRbu, bp, p+36, __ccgo_ts+32758)
}
if (*Tsqlite3rbu)(unsafe.Pointer(p)).Frc == SQLITE_OK {
- (*Tsqlite3rbu)(unsafe.Pointer(p)).Frc = _prepareAndCollectError(tls, (*Tsqlite3rbu)(unsafe.Pointer(p)).FdbMain, bp+4, p+36, __ccgo_ts+32768)
+ (*Tsqlite3rbu)(unsafe.Pointer(p)).Frc = _prepareAndCollectError(tls, (*Tsqlite3rbu)(unsafe.Pointer(p)).FdbMain, bp+4, p+36, __ccgo_ts+32823)
}
for (*Tsqlite3rbu)(unsafe.Pointer(p)).Frc == SQLITE_OK && Xsqlite3_step(tls, *(*uintptr)(unsafe.Pointer(bp))) == int32(SQLITE_ROW) {
i = 0
@@ -187487,7 +187920,7 @@ func _rbuCreateTargetSchema(tls *libc.TLS, p uintptr) {
(*Tsqlite3rbu)(unsafe.Pointer(p)).Frc = Xsqlite3_reset(tls, *(*uintptr)(unsafe.Pointer(bp + 4)))
}
if (*Tsqlite3rbu)(unsafe.Pointer(p)).Frc == SQLITE_OK {
- (*Tsqlite3rbu)(unsafe.Pointer(p)).Frc = Xsqlite3_exec(tls, (*Tsqlite3rbu)(unsafe.Pointer(p)).FdbMain, __ccgo_ts+32812, uintptr(0), uintptr(0), p+36)
+ (*Tsqlite3rbu)(unsafe.Pointer(p)).Frc = Xsqlite3_exec(tls, (*Tsqlite3rbu)(unsafe.Pointer(p)).FdbMain, __ccgo_ts+32867, uintptr(0), uintptr(0), p+36)
}
_rbuFinalize(tls, p, *(*uintptr)(unsafe.Pointer(bp)))
_rbuFinalize(tls, p, *(*uintptr)(unsafe.Pointer(bp + 4)))
@@ -187514,8 +187947,8 @@ func Xsqlite3rbu_step(tls *libc.TLS, p uintptr) (r int32) {
** when this handle was opened, create the target database schema. */
if (*Tsqlite3rbu)(unsafe.Pointer(p)).FzTarget == uintptr(0) && (*Tsqlite3rbu)(unsafe.Pointer(p)).FnProgress == 0 && (*Tsqlite3rbu)(unsafe.Pointer(p)).Frc == SQLITE_OK {
_rbuCreateTargetSchema(tls, p)
- _rbuCopyPragma(tls, p, __ccgo_ts+17823)
- _rbuCopyPragma(tls, p, __ccgo_ts+16934)
+ _rbuCopyPragma(tls, p, __ccgo_ts+17895)
+ _rbuCopyPragma(tls, p, __ccgo_ts+17006)
}
for (*Tsqlite3rbu)(unsafe.Pointer(p)).Frc == SQLITE_OK && (*TRbuObjIter)(unsafe.Pointer(pIter)).FzTbl != 0 {
if (*TRbuObjIter)(unsafe.Pointer(pIter)).FbCleanup != 0 {
@@ -187523,7 +187956,7 @@ func Xsqlite3rbu_step(tls *libc.TLS, p uintptr) (r int32) {
** cannot be dropped as there are currently active SQL statements.
** But the contents can be deleted. */
if libc.BoolInt32((*Tsqlite3rbu)(unsafe.Pointer(p)).FzTarget == uintptr(0)) == 0 && (*TRbuObjIter)(unsafe.Pointer(pIter)).FabIndexed != 0 {
- _rbuMPrintfExec(tls, p, (*Tsqlite3rbu)(unsafe.Pointer(p)).FdbRbu, __ccgo_ts+32837, libc.VaList(bp+16, p+24, (*TRbuObjIter)(unsafe.Pointer(pIter)).FzDataTbl))
+ _rbuMPrintfExec(tls, p, (*Tsqlite3rbu)(unsafe.Pointer(p)).FdbRbu, __ccgo_ts+32892, libc.VaList(bp+16, p+24, (*TRbuObjIter)(unsafe.Pointer(pIter)).FzDataTbl))
}
} else {
_rbuObjIterPrepareAll(tls, p, pIter, 0)
@@ -187545,10 +187978,10 @@ func Xsqlite3rbu_step(tls *libc.TLS, p uintptr) (r int32) {
_rbuSaveState(tls, p, int32(RBU_STAGE_MOVE))
_rbuIncrSchemaCookie(tls, p)
if (*Tsqlite3rbu)(unsafe.Pointer(p)).Frc == SQLITE_OK {
- (*Tsqlite3rbu)(unsafe.Pointer(p)).Frc = Xsqlite3_exec(tls, (*Tsqlite3rbu)(unsafe.Pointer(p)).FdbMain, __ccgo_ts+15053, uintptr(0), uintptr(0), p+36)
+ (*Tsqlite3rbu)(unsafe.Pointer(p)).Frc = Xsqlite3_exec(tls, (*Tsqlite3rbu)(unsafe.Pointer(p)).FdbMain, __ccgo_ts+15078, uintptr(0), uintptr(0), p+36)
}
if (*Tsqlite3rbu)(unsafe.Pointer(p)).Frc == SQLITE_OK {
- (*Tsqlite3rbu)(unsafe.Pointer(p)).Frc = Xsqlite3_exec(tls, (*Tsqlite3rbu)(unsafe.Pointer(p)).FdbRbu, __ccgo_ts+15053, uintptr(0), uintptr(0), p+36)
+ (*Tsqlite3rbu)(unsafe.Pointer(p)).Frc = Xsqlite3_exec(tls, (*Tsqlite3rbu)(unsafe.Pointer(p)).FdbRbu, __ccgo_ts+15078, uintptr(0), uintptr(0), p+36)
}
(*Tsqlite3rbu)(unsafe.Pointer(p)).FeStage = int32(RBU_STAGE_MOVE)
}
@@ -187635,7 +188068,7 @@ func _rbuSetupOal(tls *libc.TLS, p uintptr, pState uintptr) {
}
if rc == SQLITE_OK && !((*TRbuObjIter)(unsafe.Pointer(pIter)).FzTbl != 0) {
rc = int32(SQLITE_ERROR)
- (*Tsqlite3rbu)(unsafe.Pointer(p)).FzErrmsg = Xsqlite3_mprintf(tls, __ccgo_ts+32865, 0)
+ (*Tsqlite3rbu)(unsafe.Pointer(p)).FzErrmsg = Xsqlite3_mprintf(tls, __ccgo_ts+32920, 0)
}
if rc == SQLITE_OK {
(*Tsqlite3rbu)(unsafe.Pointer(p)).FnStep = (*TRbuState)(unsafe.Pointer(pState)).FnRow
@@ -187658,10 +188091,10 @@ func _rbuDeleteOalFile(tls *libc.TLS, p uintptr) {
var zOal uintptr
var _ /* pVfs at bp+0 */ uintptr
_ = zOal
- zOal = _rbuMPrintf(tls, p, __ccgo_ts+32312, libc.VaList(bp+16, (*Tsqlite3rbu)(unsafe.Pointer(p)).FzTarget))
+ zOal = _rbuMPrintf(tls, p, __ccgo_ts+32367, libc.VaList(bp+16, (*Tsqlite3rbu)(unsafe.Pointer(p)).FzTarget))
if zOal != 0 {
*(*uintptr)(unsafe.Pointer(bp)) = uintptr(0)
- Xsqlite3_file_control(tls, (*Tsqlite3rbu)(unsafe.Pointer(p)).FdbMain, __ccgo_ts+6715, int32(SQLITE_FCNTL_VFS_POINTER), bp)
+ Xsqlite3_file_control(tls, (*Tsqlite3rbu)(unsafe.Pointer(p)).FdbMain, __ccgo_ts+6740, int32(SQLITE_FCNTL_VFS_POINTER), bp)
(*(*func(*libc.TLS, uintptr, uintptr, int32) int32)(unsafe.Pointer(&struct{ uintptr }{(*Tsqlite3_vfs)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp)))).FxDelete})))(tls, *(*uintptr)(unsafe.Pointer(bp)), zOal, 0)
Xsqlite3_free(tls, zOal)
}
@@ -187683,7 +188116,7 @@ func _rbuCreateVfs(tls *libc.TLS, p uintptr) {
var _ /* zRnd at bp+4 */ [64]int8
_ = pVfs
Xsqlite3_randomness(tls, int32(4), bp)
- Xsqlite3_snprintf(tls, int32(64), bp+4, __ccgo_ts+32890, libc.VaList(bp+80, *(*int32)(unsafe.Pointer(bp))))
+ Xsqlite3_snprintf(tls, int32(64), bp+4, __ccgo_ts+32945, libc.VaList(bp+80, *(*int32)(unsafe.Pointer(bp))))
(*Tsqlite3rbu)(unsafe.Pointer(p)).Frc = Xsqlite3rbu_create_vfs(tls, bp+4, uintptr(0))
if (*Tsqlite3rbu)(unsafe.Pointer(p)).Frc == SQLITE_OK {
pVfs = Xsqlite3_vfs_find(tls, bp+4)
@@ -187730,7 +188163,7 @@ func _rbuIndexCntFunc(tls *libc.TLS, pCtx uintptr, nVal int32, apVal uintptr) {
}
db = v1
_ = nVal
- rc = _prepareFreeAndCollectError(tls, db, bp, bp+4, Xsqlite3_mprintf(tls, __ccgo_ts+32901, libc.VaList(bp+16, Xsqlite3_value_text(tls, *(*uintptr)(unsafe.Pointer(apVal))))))
+ rc = _prepareFreeAndCollectError(tls, db, bp, bp+4, Xsqlite3_mprintf(tls, __ccgo_ts+32956, libc.VaList(bp+16, Xsqlite3_value_text(tls, *(*uintptr)(unsafe.Pointer(apVal))))))
if rc != SQLITE_OK {
Xsqlite3_result_error(tls, pCtx, *(*uintptr)(unsafe.Pointer(bp + 4)), -int32(1))
} else {
@@ -187775,11 +188208,11 @@ func _rbuInitPhaseOneSteps(tls *libc.TLS, p uintptr) {
*(*uintptr)(unsafe.Pointer(bp)) = uintptr(0)
bExists = 0 /* True if rbu_count exists */
(*Tsqlite3rbu)(unsafe.Pointer(p)).FnPhaseOneStep = int64(-int32(1))
- (*Tsqlite3rbu)(unsafe.Pointer(p)).Frc = Xsqlite3_create_function(tls, (*Tsqlite3rbu)(unsafe.Pointer(p)).FdbRbu, __ccgo_ts+32973, int32(1), int32(SQLITE_UTF8), p, __ccgo_fp(_rbuIndexCntFunc), uintptr(0), uintptr(0))
+ (*Tsqlite3rbu)(unsafe.Pointer(p)).Frc = Xsqlite3_create_function(tls, (*Tsqlite3rbu)(unsafe.Pointer(p)).FdbRbu, __ccgo_ts+33028, int32(1), int32(SQLITE_UTF8), p, __ccgo_fp(_rbuIndexCntFunc), uintptr(0), uintptr(0))
/* Check for the rbu_count table. If it does not exist, or if an error
** occurs, nPhaseOneStep will be left set to -1. */
if (*Tsqlite3rbu)(unsafe.Pointer(p)).Frc == SQLITE_OK {
- (*Tsqlite3rbu)(unsafe.Pointer(p)).Frc = _prepareAndCollectError(tls, (*Tsqlite3rbu)(unsafe.Pointer(p)).FdbRbu, bp, p+36, __ccgo_ts+32987)
+ (*Tsqlite3rbu)(unsafe.Pointer(p)).Frc = _prepareAndCollectError(tls, (*Tsqlite3rbu)(unsafe.Pointer(p)).FdbRbu, bp, p+36, __ccgo_ts+33042)
}
if (*Tsqlite3rbu)(unsafe.Pointer(p)).Frc == SQLITE_OK {
if int32(SQLITE_ROW) == Xsqlite3_step(tls, *(*uintptr)(unsafe.Pointer(bp))) {
@@ -187788,7 +188221,7 @@ func _rbuInitPhaseOneSteps(tls *libc.TLS, p uintptr) {
(*Tsqlite3rbu)(unsafe.Pointer(p)).Frc = Xsqlite3_finalize(tls, *(*uintptr)(unsafe.Pointer(bp)))
}
if (*Tsqlite3rbu)(unsafe.Pointer(p)).Frc == SQLITE_OK && bExists != 0 {
- (*Tsqlite3rbu)(unsafe.Pointer(p)).Frc = _prepareAndCollectError(tls, (*Tsqlite3rbu)(unsafe.Pointer(p)).FdbRbu, bp, p+36, __ccgo_ts+33044)
+ (*Tsqlite3rbu)(unsafe.Pointer(p)).Frc = _prepareAndCollectError(tls, (*Tsqlite3rbu)(unsafe.Pointer(p)).FdbRbu, bp, p+36, __ccgo_ts+33099)
if (*Tsqlite3rbu)(unsafe.Pointer(p)).Frc == SQLITE_OK {
if int32(SQLITE_ROW) == Xsqlite3_step(tls, *(*uintptr)(unsafe.Pointer(bp))) {
(*Tsqlite3rbu)(unsafe.Pointer(p)).FnPhaseOneStep = Xsqlite3_column_int64(tls, *(*uintptr)(unsafe.Pointer(bp)), 0)
@@ -187836,7 +188269,7 @@ func _openRbuHandle(tls *libc.TLS, zTarget uintptr, zRbu uintptr, zState uintptr
libc.Xmemcpy(tls, (*Tsqlite3rbu)(unsafe.Pointer(p)).FzRbu, zRbu, nRbu+uint32(1))
pCsr += uintptr(nRbu + uint32(1))
if zState != 0 {
- (*Tsqlite3rbu)(unsafe.Pointer(p)).FzState = _rbuMPrintf(tls, p, __ccgo_ts+3864, libc.VaList(bp+16, zState))
+ (*Tsqlite3rbu)(unsafe.Pointer(p)).FzState = _rbuMPrintf(tls, p, __ccgo_ts+3890, libc.VaList(bp+16, zState))
}
/* If the first attempt to open the database file fails and the bRetry
** flag it set, this means that the db was not opened because it seemed
@@ -187868,7 +188301,7 @@ func _openRbuHandle(tls *libc.TLS, zTarget uintptr, zRbu uintptr, zState uintptr
if (*Tsqlite3rbu)(unsafe.Pointer(p)).Frc == SQLITE_OK && (*Trbu_file)(unsafe.Pointer((*Tsqlite3rbu)(unsafe.Pointer(p)).FpTargetFd)).FpWalFd != 0 {
if (*Tsqlite3rbu)(unsafe.Pointer(p)).FeStage == int32(RBU_STAGE_OAL) {
(*Tsqlite3rbu)(unsafe.Pointer(p)).Frc = int32(SQLITE_ERROR)
- (*Tsqlite3rbu)(unsafe.Pointer(p)).FzErrmsg = Xsqlite3_mprintf(tls, __ccgo_ts+33118, 0)
+ (*Tsqlite3rbu)(unsafe.Pointer(p)).FzErrmsg = Xsqlite3_mprintf(tls, __ccgo_ts+33173, 0)
} else {
if (*Tsqlite3rbu)(unsafe.Pointer(p)).FeStage == int32(RBU_STAGE_MOVE) {
(*Tsqlite3rbu)(unsafe.Pointer(p)).FeStage = int32(RBU_STAGE_CKPT)
@@ -187890,17 +188323,17 @@ func _openRbuHandle(tls *libc.TLS, zTarget uintptr, zRbu uintptr, zState uintptr
** page 1 of the database file. */
(*Tsqlite3rbu)(unsafe.Pointer(p)).Frc = int32(SQLITE_BUSY)
if (*Tsqlite3rbu)(unsafe.Pointer(p)).FzTarget == uintptr(0) {
- v3 = __ccgo_ts + 33150
+ v3 = __ccgo_ts + 33205
} else {
- v3 = __ccgo_ts + 33157
+ v3 = __ccgo_ts + 33212
}
- (*Tsqlite3rbu)(unsafe.Pointer(p)).FzErrmsg = Xsqlite3_mprintf(tls, __ccgo_ts+33164, libc.VaList(bp+16, v3))
+ (*Tsqlite3rbu)(unsafe.Pointer(p)).FzErrmsg = Xsqlite3_mprintf(tls, __ccgo_ts+33219, libc.VaList(bp+16, v3))
}
}
if (*Tsqlite3rbu)(unsafe.Pointer(p)).Frc == SQLITE_OK {
if (*Tsqlite3rbu)(unsafe.Pointer(p)).FeStage == int32(RBU_STAGE_OAL) {
db = (*Tsqlite3rbu)(unsafe.Pointer(p)).FdbMain
- (*Tsqlite3rbu)(unsafe.Pointer(p)).Frc = Xsqlite3_exec(tls, (*Tsqlite3rbu)(unsafe.Pointer(p)).FdbRbu, __ccgo_ts+15038, uintptr(0), uintptr(0), p+36)
+ (*Tsqlite3rbu)(unsafe.Pointer(p)).Frc = Xsqlite3_exec(tls, (*Tsqlite3rbu)(unsafe.Pointer(p)).FdbRbu, __ccgo_ts+15063, uintptr(0), uintptr(0), p+36)
/* Point the object iterator at the first object */
if (*Tsqlite3rbu)(unsafe.Pointer(p)).Frc == SQLITE_OK {
(*Tsqlite3rbu)(unsafe.Pointer(p)).Frc = _rbuObjIterFirst(tls, p, p+52)
@@ -187912,21 +188345,21 @@ func _openRbuHandle(tls *libc.TLS, zTarget uintptr, zRbu uintptr, zState uintptr
(*Tsqlite3rbu)(unsafe.Pointer(p)).FeStage = int32(RBU_STAGE_DONE)
} else {
if (*Tsqlite3rbu)(unsafe.Pointer(p)).Frc == SQLITE_OK && (*TRbuState)(unsafe.Pointer(pState)).FeStage == 0 && (*Tsqlite3rbu)(unsafe.Pointer(p)).FzTarget == uintptr(0) {
- _rbuCopyPragma(tls, p, __ccgo_ts+17537)
- _rbuCopyPragma(tls, p, __ccgo_ts+16949)
+ _rbuCopyPragma(tls, p, __ccgo_ts+17609)
+ _rbuCopyPragma(tls, p, __ccgo_ts+17021)
}
/* Open transactions both databases. The *-oal file is opened or
** created at this point. */
if (*Tsqlite3rbu)(unsafe.Pointer(p)).Frc == SQLITE_OK {
- (*Tsqlite3rbu)(unsafe.Pointer(p)).Frc = Xsqlite3_exec(tls, db, __ccgo_ts+33196, uintptr(0), uintptr(0), p+36)
+ (*Tsqlite3rbu)(unsafe.Pointer(p)).Frc = Xsqlite3_exec(tls, db, __ccgo_ts+33251, uintptr(0), uintptr(0), p+36)
}
/* Check if the main database is a zipvfs db. If it is, set the upper
** level pager to use "journal_mode=off". This prevents it from
** generating a large journal using a temp file. */
if (*Tsqlite3rbu)(unsafe.Pointer(p)).Frc == SQLITE_OK {
- frc = Xsqlite3_file_control(tls, db, __ccgo_ts+6715, int32(SQLITE_FCNTL_ZIPVFS), uintptr(0))
+ frc = Xsqlite3_file_control(tls, db, __ccgo_ts+6740, int32(SQLITE_FCNTL_ZIPVFS), uintptr(0))
if frc == SQLITE_OK {
- (*Tsqlite3rbu)(unsafe.Pointer(p)).Frc = Xsqlite3_exec(tls, db, __ccgo_ts+33212, uintptr(0), uintptr(0), p+36)
+ (*Tsqlite3rbu)(unsafe.Pointer(p)).Frc = Xsqlite3_exec(tls, db, __ccgo_ts+33267, uintptr(0), uintptr(0), p+36)
}
}
if (*Tsqlite3rbu)(unsafe.Pointer(p)).Frc == SQLITE_OK {
@@ -188004,7 +188437,7 @@ func Xsqlite3rbu_vacuum(tls *libc.TLS, zTarget uintptr, zState uintptr) (r uintp
}
if zState != 0 {
n = libc.Xstrlen(tls, zState)
- if n >= uint32(7) && 0 == libc.Xmemcmp(tls, __ccgo_ts+33236, zState+uintptr(n-uint32(7)), uint32(7)) {
+ if n >= uint32(7) && 0 == libc.Xmemcmp(tls, __ccgo_ts+33291, zState+uintptr(n-uint32(7)), uint32(7)) {
return _rbuMisuseError(tls)
}
}
@@ -188051,7 +188484,7 @@ func _rbuEditErrmsg(tls *libc.TLS, p uintptr) {
if !(i < nErrmsg-uint32(8)) {
break
}
- if libc.Xmemcmp(tls, (*Tsqlite3rbu)(unsafe.Pointer(p)).FzErrmsg+uintptr(i), __ccgo_ts+31259, uint32(8)) == 0 {
+ if libc.Xmemcmp(tls, (*Tsqlite3rbu)(unsafe.Pointer(p)).FzErrmsg+uintptr(i), __ccgo_ts+31314, uint32(8)) == 0 {
nDel = int32(8)
for int32(*(*int8)(unsafe.Pointer((*Tsqlite3rbu)(unsafe.Pointer(p)).FzErrmsg + uintptr(i+libc.Uint32FromInt32(nDel))))) >= int32('0') && int32(*(*int8)(unsafe.Pointer((*Tsqlite3rbu)(unsafe.Pointer(p)).FzErrmsg + uintptr(i+libc.Uint32FromInt32(nDel))))) <= int32('9') {
nDel++
@@ -188079,7 +188512,7 @@ func Xsqlite3rbu_close(tls *libc.TLS, p uintptr, pzErrmsg uintptr) (r int32) {
if p != 0 {
/* Commit the transaction to the *-oal file. */
if (*Tsqlite3rbu)(unsafe.Pointer(p)).Frc == SQLITE_OK && (*Tsqlite3rbu)(unsafe.Pointer(p)).FeStage == int32(RBU_STAGE_OAL) {
- (*Tsqlite3rbu)(unsafe.Pointer(p)).Frc = Xsqlite3_exec(tls, (*Tsqlite3rbu)(unsafe.Pointer(p)).FdbMain, __ccgo_ts+15053, uintptr(0), uintptr(0), p+36)
+ (*Tsqlite3rbu)(unsafe.Pointer(p)).Frc = Xsqlite3_exec(tls, (*Tsqlite3rbu)(unsafe.Pointer(p)).FdbMain, __ccgo_ts+15078, uintptr(0), uintptr(0), p+36)
}
/* Sync the db file if currently doing an incremental checkpoint */
if (*Tsqlite3rbu)(unsafe.Pointer(p)).Frc == SQLITE_OK && (*Tsqlite3rbu)(unsafe.Pointer(p)).FeStage == int32(RBU_STAGE_CKPT) {
@@ -188088,7 +188521,7 @@ func Xsqlite3rbu_close(tls *libc.TLS, p uintptr, pzErrmsg uintptr) (r int32) {
}
_rbuSaveState(tls, p, (*Tsqlite3rbu)(unsafe.Pointer(p)).FeStage)
if (*Tsqlite3rbu)(unsafe.Pointer(p)).Frc == SQLITE_OK && (*Tsqlite3rbu)(unsafe.Pointer(p)).FeStage == int32(RBU_STAGE_OAL) {
- (*Tsqlite3rbu)(unsafe.Pointer(p)).Frc = Xsqlite3_exec(tls, (*Tsqlite3rbu)(unsafe.Pointer(p)).FdbRbu, __ccgo_ts+15053, uintptr(0), uintptr(0), p+36)
+ (*Tsqlite3rbu)(unsafe.Pointer(p)).Frc = Xsqlite3_exec(tls, (*Tsqlite3rbu)(unsafe.Pointer(p)).FdbRbu, __ccgo_ts+15078, uintptr(0), uintptr(0), p+36)
}
/* Close any open statement handles. */
_rbuObjIterFinalize(tls, p+52)
@@ -188098,7 +188531,7 @@ func Xsqlite3rbu_close(tls *libc.TLS, p uintptr, pzErrmsg uintptr) (r int32) {
** specifying the current target and state databases to start a new
** vacuum from scratch. */
if (*Tsqlite3rbu)(unsafe.Pointer(p)).FzTarget == uintptr(0) && (*Tsqlite3rbu)(unsafe.Pointer(p)).Frc != SQLITE_OK && (*Tsqlite3rbu)(unsafe.Pointer(p)).FdbRbu != 0 {
- rc2 = Xsqlite3_exec(tls, (*Tsqlite3rbu)(unsafe.Pointer(p)).FdbRbu, __ccgo_ts+33244, uintptr(0), uintptr(0), uintptr(0))
+ rc2 = Xsqlite3_exec(tls, (*Tsqlite3rbu)(unsafe.Pointer(p)).FdbRbu, __ccgo_ts+33299, uintptr(0), uintptr(0), uintptr(0))
if (*Tsqlite3rbu)(unsafe.Pointer(p)).Frc == int32(SQLITE_DONE) && rc2 != SQLITE_OK {
(*Tsqlite3rbu)(unsafe.Pointer(p)).Frc = rc2
}
@@ -188199,7 +188632,7 @@ func Xsqlite3rbu_savestate(tls *libc.TLS, p uintptr) (r int32) {
}
if (*Tsqlite3rbu)(unsafe.Pointer(p)).FeStage == int32(RBU_STAGE_OAL) {
if rc == SQLITE_OK {
- rc = Xsqlite3_exec(tls, (*Tsqlite3rbu)(unsafe.Pointer(p)).FdbMain, __ccgo_ts+15053, uintptr(0), uintptr(0), uintptr(0))
+ rc = Xsqlite3_exec(tls, (*Tsqlite3rbu)(unsafe.Pointer(p)).FdbMain, __ccgo_ts+15078, uintptr(0), uintptr(0), uintptr(0))
}
}
/* Sync the db file */
@@ -188212,19 +188645,19 @@ func Xsqlite3rbu_savestate(tls *libc.TLS, p uintptr) (r int32) {
rc = (*Tsqlite3rbu)(unsafe.Pointer(p)).Frc
if (*Tsqlite3rbu)(unsafe.Pointer(p)).FeStage == int32(RBU_STAGE_OAL) {
if rc == SQLITE_OK {
- rc = Xsqlite3_exec(tls, (*Tsqlite3rbu)(unsafe.Pointer(p)).FdbRbu, __ccgo_ts+15053, uintptr(0), uintptr(0), uintptr(0))
+ rc = Xsqlite3_exec(tls, (*Tsqlite3rbu)(unsafe.Pointer(p)).FdbRbu, __ccgo_ts+15078, uintptr(0), uintptr(0), uintptr(0))
}
if rc == SQLITE_OK {
if (*Tsqlite3rbu)(unsafe.Pointer(p)).FzTarget == uintptr(0) {
- v1 = __ccgo_ts + 15038
+ v1 = __ccgo_ts + 15063
} else {
- v1 = __ccgo_ts + 33196
+ v1 = __ccgo_ts + 33251
}
zBegin = v1
rc = Xsqlite3_exec(tls, (*Tsqlite3rbu)(unsafe.Pointer(p)).FdbRbu, zBegin, uintptr(0), uintptr(0), uintptr(0))
}
if rc == SQLITE_OK {
- rc = Xsqlite3_exec(tls, (*Tsqlite3rbu)(unsafe.Pointer(p)).FdbMain, __ccgo_ts+33196, uintptr(0), uintptr(0), uintptr(0))
+ rc = Xsqlite3_exec(tls, (*Tsqlite3rbu)(unsafe.Pointer(p)).FdbMain, __ccgo_ts+33251, uintptr(0), uintptr(0), uintptr(0))
}
}
(*Tsqlite3rbu)(unsafe.Pointer(p)).Frc = rc
@@ -188710,7 +189143,7 @@ func _rbuVfsFileSize(tls *libc.TLS, pFile uintptr, pSize uintptr) (r int32) {
rc = (*(*func(*libc.TLS, uintptr, uintptr) int32)(unsafe.Pointer(&struct{ uintptr }{(*Tsqlite3_io_methods1)(unsafe.Pointer((*Tsqlite3_file)(unsafe.Pointer((*Trbu_file)(unsafe.Pointer(p)).FpReal)).FpMethods)).FxFileSize})))(tls, (*Trbu_file)(unsafe.Pointer(p)).FpReal, pSize)
/* If this is an RBU vacuum operation and this is the target database,
** pretend that it has at least one page. Otherwise, SQLite will not
- ** check for the existance of a *-wal file. rbuVfsRead() contains
+ ** check for the existence of a *-wal file. rbuVfsRead() contains
** similar logic. */
if rc == SQLITE_OK && *(*Tsqlite_int64)(unsafe.Pointer(pSize)) == 0 && (*Trbu_file)(unsafe.Pointer(p)).FpRbu != 0 && (*Tsqlite3rbu)(unsafe.Pointer((*Trbu_file)(unsafe.Pointer(p)).FpRbu)).FzTarget == uintptr(0) && (*Trbu_file)(unsafe.Pointer(p)).FopenFlags&int32(SQLITE_OPEN_MAIN_DB) != 0 {
*(*Tsqlite_int64)(unsafe.Pointer(pSize)) = int64(1024)
@@ -188791,7 +189224,7 @@ func _rbuVfsFileControl(tls *libc.TLS, pFile uintptr, op int32, pArg uintptr) (r
rc = (*(*func(*libc.TLS, uintptr, int32, uintptr) int32)(unsafe.Pointer(&struct{ uintptr }{xControl})))(tls, (*Trbu_file)(unsafe.Pointer(p)).FpReal, int32(SQLITE_FCNTL_ZIPVFS), bp)
if rc == SQLITE_OK {
rc = int32(SQLITE_ERROR)
- (*Tsqlite3rbu)(unsafe.Pointer(pRbu)).FzErrmsg = Xsqlite3_mprintf(tls, __ccgo_ts+33271, 0)
+ (*Tsqlite3rbu)(unsafe.Pointer(pRbu)).FzErrmsg = Xsqlite3_mprintf(tls, __ccgo_ts+33326, 0)
} else {
if rc == int32(SQLITE_NOTFOUND) {
(*Tsqlite3rbu)(unsafe.Pointer(pRbu)).FpTargetFd = p
@@ -188817,7 +189250,7 @@ func _rbuVfsFileControl(tls *libc.TLS, pFile uintptr, op int32, pArg uintptr) (r
if rc == SQLITE_OK && op == int32(SQLITE_FCNTL_VFSNAME) {
pRbuVfs = (*Trbu_file)(unsafe.Pointer(p)).FpRbuVfs
zIn = *(*uintptr)(unsafe.Pointer(pArg))
- zOut = Xsqlite3_mprintf(tls, __ccgo_ts+33294, libc.VaList(bp+16, (*Trbu_vfs)(unsafe.Pointer(pRbuVfs)).Fbase.FzName, zIn))
+ zOut = Xsqlite3_mprintf(tls, __ccgo_ts+33349, libc.VaList(bp+16, (*Trbu_vfs)(unsafe.Pointer(pRbuVfs)).Fbase.FzName, zIn))
*(*uintptr)(unsafe.Pointer(pArg)) = zOut
if zOut == uintptr(0) {
rc = int32(SQLITE_NOMEM)
@@ -189012,7 +189445,7 @@ func _rbuVfsOpen(tls *libc.TLS, pVfs uintptr, zName uintptr, pFile uintptr, flag
if pDb != 0 {
if (*Trbu_file)(unsafe.Pointer(pDb)).FpRbu != 0 && (*Tsqlite3rbu)(unsafe.Pointer((*Trbu_file)(unsafe.Pointer(pDb)).FpRbu)).FeStage == int32(RBU_STAGE_OAL) {
if (*Tsqlite3rbu)(unsafe.Pointer((*Trbu_file)(unsafe.Pointer(pDb)).FpRbu)).FzTarget == uintptr(0) {
- zOpen = Xsqlite3_db_filename(tls, (*Tsqlite3rbu)(unsafe.Pointer((*Trbu_file)(unsafe.Pointer(pDb)).FpRbu)).FdbRbu, __ccgo_ts+6715)
+ zOpen = Xsqlite3_db_filename(tls, (*Tsqlite3rbu)(unsafe.Pointer((*Trbu_file)(unsafe.Pointer(pDb)).FpRbu)).FdbRbu, __ccgo_ts+6740)
zOpen = Xsqlite3_filename_wal(tls, zOpen)
}
nOpen = libc.Xstrlen(tls, zOpen)
@@ -189026,7 +189459,7 @@ func _rbuVfsOpen(tls *libc.TLS, pVfs uintptr, zName uintptr, pFile uintptr, flag
} else {
(*Trbu_file)(unsafe.Pointer(pFd)).FpRbu = (*Trbu_vfs)(unsafe.Pointer(pRbuVfs)).FpRbu
}
- if oflags&int32(SQLITE_OPEN_MAIN_DB) != 0 && Xsqlite3_uri_boolean(tls, zName, __ccgo_ts+33305, 0) != 0 {
+ if oflags&int32(SQLITE_OPEN_MAIN_DB) != 0 && Xsqlite3_uri_boolean(tls, zName, __ccgo_ts+33360, 0) != 0 {
oflags = libc.Int32FromInt32(SQLITE_OPEN_TEMP_DB) | libc.Int32FromInt32(SQLITE_OPEN_READWRITE) | libc.Int32FromInt32(SQLITE_OPEN_CREATE) | libc.Int32FromInt32(SQLITE_OPEN_EXCLUSIVE) | libc.Int32FromInt32(SQLITE_OPEN_DELETEONCLOSE)
zOpen = uintptr(0)
}
@@ -189582,7 +190015,7 @@ func _statConnect(tls *libc.TLS, db uintptr, pAux uintptr, argc int32, argv uint
_sqlite3TokenInit(tls, bp, *(*uintptr)(unsafe.Pointer(argv + 3*4)))
iDb = _sqlite3FindDb(tls, db, bp)
if iDb < 0 {
- *(*uintptr)(unsafe.Pointer(pzErr)) = Xsqlite3_mprintf(tls, __ccgo_ts+12382, libc.VaList(bp+16, *(*uintptr)(unsafe.Pointer(argv + 3*4))))
+ *(*uintptr)(unsafe.Pointer(pzErr)) = Xsqlite3_mprintf(tls, __ccgo_ts+12407, libc.VaList(bp+16, *(*uintptr)(unsafe.Pointer(argv + 3*4))))
return int32(SQLITE_ERROR)
}
} else {
@@ -190082,7 +190515,7 @@ statNextRestart:
(*(*TStatPage)(unsafe.Pointer(pCsr + 16))).FiPgno = iRoot
(*(*TStatPage)(unsafe.Pointer(pCsr + 16))).FiCell = 0
if !((*TStatCursor)(unsafe.Pointer(pCsr)).FisAgg != 0) {
- v1 = Xsqlite3_mprintf(tls, __ccgo_ts+33316, 0)
+ v1 = Xsqlite3_mprintf(tls, __ccgo_ts+33371, 0)
z = v1
(*(*TStatPage)(unsafe.Pointer(pCsr + 16))).FzPath = v1
if z == uintptr(0) {
@@ -190120,8 +190553,8 @@ statNextRestart:
if !((*TStatCursor)(unsafe.Pointer(pCsr)).FisAgg != 0) {
(*TStatCursor)(unsafe.Pointer(pCsr)).FzName = Xsqlite3_column_text(tls, (*TStatCursor)(unsafe.Pointer(pCsr)).FpStmt, 0)
(*TStatCursor)(unsafe.Pointer(pCsr)).FiPageno = *(*Tu32)(unsafe.Pointer((*TStatCell)(unsafe.Pointer(pCell)).FaOvfl + uintptr(iOvfl)*4))
- (*TStatCursor)(unsafe.Pointer(pCsr)).FzPagetype = __ccgo_ts + 33318
- v2 = Xsqlite3_mprintf(tls, __ccgo_ts+33327, libc.VaList(bp+16, (*TStatPage)(unsafe.Pointer(p)).FzPath, (*TStatPage)(unsafe.Pointer(p)).FiCell, iOvfl))
+ (*TStatCursor)(unsafe.Pointer(pCsr)).FzPagetype = __ccgo_ts + 33373
+ v2 = Xsqlite3_mprintf(tls, __ccgo_ts+33382, libc.VaList(bp+16, (*TStatPage)(unsafe.Pointer(p)).FzPath, (*TStatPage)(unsafe.Pointer(p)).FiCell, iOvfl))
z = v2
(*TStatCursor)(unsafe.Pointer(pCsr)).FzPath = v2
if z == uintptr(0) {
@@ -190150,7 +190583,7 @@ statNextRestart:
(*TStatCursor)(unsafe.Pointer(pCsr)).FiPage++
if (*TStatCursor)(unsafe.Pointer(pCsr)).FiPage >= libc.Int32FromUint32(libc.Uint32FromInt64(1280)/libc.Uint32FromInt64(40)) {
_statResetCsr(tls, pCsr)
- return _sqlite3CorruptError(tls, int32(226038))
+ return _sqlite3CorruptError(tls, int32(227304))
}
if (*TStatPage)(unsafe.Pointer(p)).FiCell == (*TStatPage)(unsafe.Pointer(p)).FnCell {
(*(*TStatPage)(unsafe.Pointer(p + 1*40))).FiPgno = (*TStatPage)(unsafe.Pointer(p)).FiRightChildPg
@@ -190161,7 +190594,7 @@ statNextRestart:
(*TStatCursor)(unsafe.Pointer(pCsr)).FnPage++
(*(*TStatPage)(unsafe.Pointer(p + 1*40))).FiCell = 0
if !((*TStatCursor)(unsafe.Pointer(pCsr)).FisAgg != 0) {
- v4 = Xsqlite3_mprintf(tls, __ccgo_ts+33339, libc.VaList(bp+16, (*TStatPage)(unsafe.Pointer(p)).FzPath, (*TStatPage)(unsafe.Pointer(p)).FiCell))
+ v4 = Xsqlite3_mprintf(tls, __ccgo_ts+33394, libc.VaList(bp+16, (*TStatPage)(unsafe.Pointer(p)).FzPath, (*TStatPage)(unsafe.Pointer(p)).FiCell))
z = v4
(*(*TStatPage)(unsafe.Pointer(p + 1*40))).FzPath = v4
if z == uintptr(0) {
@@ -190184,13 +190617,13 @@ statNextRestart:
case int32(0x05): /* table internal */
fallthrough
case int32(0x02): /* index internal */
- (*TStatCursor)(unsafe.Pointer(pCsr)).FzPagetype = __ccgo_ts + 33347
+ (*TStatCursor)(unsafe.Pointer(pCsr)).FzPagetype = __ccgo_ts + 33402
case int32(0x0D): /* table leaf */
fallthrough
case int32(0x0A): /* index leaf */
- (*TStatCursor)(unsafe.Pointer(pCsr)).FzPagetype = __ccgo_ts + 33356
+ (*TStatCursor)(unsafe.Pointer(pCsr)).FzPagetype = __ccgo_ts + 33411
default:
- (*TStatCursor)(unsafe.Pointer(pCsr)).FzPagetype = __ccgo_ts + 33361
+ (*TStatCursor)(unsafe.Pointer(pCsr)).FzPagetype = __ccgo_ts + 33416
break
}
*(*int32)(unsafe.Pointer(pCsr + 1320)) += (*TStatPage)(unsafe.Pointer(p1)).FnCell
@@ -190199,7 +190632,7 @@ statNextRestart:
(*TStatCursor)(unsafe.Pointer(pCsr)).FnMxPayload = (*TStatPage)(unsafe.Pointer(p1)).FnMxPayload
}
if !((*TStatCursor)(unsafe.Pointer(pCsr)).FisAgg != 0) {
- v5 = Xsqlite3_mprintf(tls, __ccgo_ts+3864, libc.VaList(bp+16, (*TStatPage)(unsafe.Pointer(p1)).FzPath))
+ v5 = Xsqlite3_mprintf(tls, __ccgo_ts+3890, libc.VaList(bp+16, (*TStatPage)(unsafe.Pointer(p1)).FzPath))
z = v5
(*TStatCursor)(unsafe.Pointer(pCsr)).FzPath = v5
if z == uintptr(0) {
@@ -190288,12 +190721,12 @@ func _statFilter(tls *libc.TLS, pCursor uintptr, idxNum int32, idxStr uintptr, a
(*TStatCursor)(unsafe.Pointer(pCsr)).FisAgg = uint8(0)
}
pSql = Xsqlite3_str_new(tls, (*TStatTable)(unsafe.Pointer(pTab)).Fdb)
- Xsqlite3_str_appendf(tls, pSql, __ccgo_ts+33371, libc.VaList(bp+8, (*(*TDb)(unsafe.Pointer((*Tsqlite3)(unsafe.Pointer((*TStatTable)(unsafe.Pointer(pTab)).Fdb)).FaDb + uintptr((*TStatCursor)(unsafe.Pointer(pCsr)).FiDb)*16))).FzDbSName))
+ Xsqlite3_str_appendf(tls, pSql, __ccgo_ts+33426, libc.VaList(bp+8, (*(*TDb)(unsafe.Pointer((*Tsqlite3)(unsafe.Pointer((*TStatTable)(unsafe.Pointer(pTab)).Fdb)).FaDb + uintptr((*TStatCursor)(unsafe.Pointer(pCsr)).FiDb)*16))).FzDbSName))
if zName != 0 {
- Xsqlite3_str_appendf(tls, pSql, __ccgo_ts+33526, libc.VaList(bp+8, zName))
+ Xsqlite3_str_appendf(tls, pSql, __ccgo_ts+33581, libc.VaList(bp+8, zName))
}
if idxNum&int32(0x08) != 0 {
- Xsqlite3_str_appendf(tls, pSql, __ccgo_ts+33540, 0)
+ Xsqlite3_str_appendf(tls, pSql, __ccgo_ts+33595, 0)
}
zSql = Xsqlite3_str_finish(tls, pSql)
if zSql == uintptr(0) {
@@ -190370,7 +190803,7 @@ func _statRowid(tls *libc.TLS, pCursor uintptr, pRowid uintptr) (r int32) {
// ** Invoke this routine to register the "dbstat" virtual table module
// */
func _sqlite3DbstatRegister(tls *libc.TLS, db uintptr) (r int32) {
- return Xsqlite3_create_module(tls, db, __ccgo_ts+33555, uintptr(unsafe.Pointer(&_dbstat_module)), uintptr(0))
+ return Xsqlite3_create_module(tls, db, __ccgo_ts+33610, uintptr(unsafe.Pointer(&_dbstat_module)), uintptr(0))
}
var _dbstat_module = Tsqlite3_module{}
@@ -191664,11 +192097,11 @@ func _sessionTableInfo(tls *libc.TLS, pSession uintptr, db uintptr, zDb uintptr,
*(*uintptr)(unsafe.Pointer(pazDflt)) = uintptr(0)
}
nThis = _sqlite3Strlen30(tls, zThis)
- if nThis == int32(12) && 0 == Xsqlite3_stricmp(tls, __ccgo_ts+11773, zThis) {
+ if nThis == int32(12) && 0 == Xsqlite3_stricmp(tls, __ccgo_ts+11798, zThis) {
rc = Xsqlite3_table_column_metadata(tls, db, zDb, zThis, uintptr(0), uintptr(0), uintptr(0), uintptr(0), uintptr(0), uintptr(0))
if rc == SQLITE_OK {
/* For sqlite_stat1, pretend that (tbl,idx) is the PRIMARY KEY. */
- zPragma = Xsqlite3_mprintf(tls, __ccgo_ts+33562, 0)
+ zPragma = Xsqlite3_mprintf(tls, __ccgo_ts+33617, 0)
} else {
if rc == int32(SQLITE_ERROR) {
zPragma = Xsqlite3_mprintf(tls, __ccgo_ts+1667, 0)
@@ -191677,7 +192110,7 @@ func _sessionTableInfo(tls *libc.TLS, pSession uintptr, db uintptr, zDb uintptr,
}
}
} else {
- zPragma = Xsqlite3_mprintf(tls, __ccgo_ts+33692, libc.VaList(bp+16, zDb, zThis))
+ zPragma = Xsqlite3_mprintf(tls, __ccgo_ts+33747, libc.VaList(bp+16, zDb, zThis))
}
if !(zPragma != 0) {
return int32(SQLITE_NOMEM)
@@ -191703,7 +192136,7 @@ func _sessionTableInfo(tls *libc.TLS, pSession uintptr, db uintptr, zDb uintptr,
bRowid = 0
}
nDbCol += bRowid
- nByte += libc.Int64FromUint32(libc.Xstrlen(tls, __ccgo_ts+29902))
+ nByte += libc.Int64FromUint32(libc.Xstrlen(tls, __ccgo_ts+29957))
rc = Xsqlite3_reset(tls, *(*uintptr)(unsafe.Pointer(bp)))
if rc == SQLITE_OK {
nByte += libc.Int64FromUint32(libc.Uint32FromInt32(nDbCol) * (libc.Uint32FromInt64(4)*libc.Uint32FromInt32(2) + libc.Uint32FromInt64(4) + libc.Uint32FromInt64(1) + libc.Uint32FromInt32(1) + libc.Uint32FromInt32(1)))
@@ -191727,8 +192160,8 @@ func _sessionTableInfo(tls *libc.TLS, pSession uintptr, db uintptr, zDb uintptr,
}
i = 0
if bRowid != 0 {
- nName = libc.Xstrlen(tls, __ccgo_ts+29902)
- libc.Xmemcpy(tls, pAlloc, __ccgo_ts+29902, nName+uint32(1))
+ nName = libc.Xstrlen(tls, __ccgo_ts+29957)
+ libc.Xmemcpy(tls, pAlloc, __ccgo_ts+29957, nName+uint32(1))
*(*uintptr)(unsafe.Pointer(azCol + uintptr(i)*4)) = pAlloc
pAlloc += uintptr(nName + uint32(1))
*(*Tu8)(unsafe.Pointer(abPK + uintptr(i))) = uint8(1)
@@ -191792,7 +192225,7 @@ func _sessionTableInfo(tls *libc.TLS, pSession uintptr, db uintptr, zDb uintptr,
// /*
// ** This function is called to initialize the SessionTable.nCol, azCol[]
// ** abPK[] and azDflt[] members of SessionTable object pTab. If these
-// ** fields are already initilialized, this function is a no-op.
+// ** fields are already initialized, this function is a no-op.
// **
// ** If an error occurs, an error code is stored in sqlite3_session.rc and
// ** non-zero returned. Or, if no error occurs but the table has no primary
@@ -191809,6 +192242,8 @@ func _sessionInitTable(tls *libc.TLS, pSession uintptr, pTab uintptr, db uintptr
_, _, _ = i, rc, v1
rc = SQLITE_OK
if (*TSessionTable)(unsafe.Pointer(pTab)).FnCol == 0 {
+ Xsqlite3_free(tls, (*TSessionTable)(unsafe.Pointer(pTab)).FazCol)
+ (*TSessionTable)(unsafe.Pointer(pTab)).FabPK = uintptr(0)
if pSession == uintptr(0) || (*Tsqlite3_session)(unsafe.Pointer(pSession)).FbImplicitPK != 0 {
v1 = pTab + 20
} else {
@@ -191830,7 +192265,7 @@ func _sessionInitTable(tls *libc.TLS, pSession uintptr, pTab uintptr, db uintptr
;
i++
}
- if 0 == Xsqlite3_stricmp(tls, __ccgo_ts+11773, (*TSessionTable)(unsafe.Pointer(pTab)).FzName) {
+ if 0 == Xsqlite3_stricmp(tls, __ccgo_ts+11798, (*TSessionTable)(unsafe.Pointer(pTab)).FzName) {
(*TSessionTable)(unsafe.Pointer(pTab)).FbStat1 = int32(1)
}
if pSession != 0 && (*Tsqlite3_session)(unsafe.Pointer(pSession)).FbEnableSize != 0 {
@@ -192124,10 +192559,10 @@ func _sessionPrepareDfltStmt(tls *libc.TLS, db uintptr, pTab uintptr, ppStmt uin
_, _, _, _ = ii, zDflt, zSep, v2
*(*TSessionBuffer)(unsafe.Pointer(bp)) = TSessionBuffer{}
*(*int32)(unsafe.Pointer(bp + 12)) = SQLITE_OK
- zSep = __ccgo_ts + 11393
+ zSep = __ccgo_ts + 11418
ii = 0
*(*uintptr)(unsafe.Pointer(ppStmt)) = uintptr(0)
- _sessionAppendPrintf(tls, bp, bp+12, __ccgo_ts+33722, 0)
+ _sessionAppendPrintf(tls, bp, bp+12, __ccgo_ts+33777, 0)
ii = 0
for {
if !(ii < (*TSessionTable)(unsafe.Pointer(pTab)).FnCol) {
@@ -192139,8 +192574,8 @@ func _sessionPrepareDfltStmt(tls *libc.TLS, db uintptr, pTab uintptr, ppStmt uin
v2 = __ccgo_ts + 1668
}
zDflt = v2
- _sessionAppendPrintf(tls, bp, bp+12, __ccgo_ts+5145, libc.VaList(bp+24, zSep, zDflt))
- zSep = __ccgo_ts + 15149
+ _sessionAppendPrintf(tls, bp, bp+12, __ccgo_ts+5171, libc.VaList(bp+24, zSep, zDflt))
+ zSep = __ccgo_ts + 15174
goto _1
_1:
;
@@ -192794,8 +193229,8 @@ func _sessionExprComparePK(tls *libc.TLS, nCol int32, zDb1 uintptr, zDb2 uintptr
break
}
if *(*Tu8)(unsafe.Pointer(abPK + uintptr(i))) != 0 {
- zRet = Xsqlite3_mprintf(tls, __ccgo_ts+33729, libc.VaList(bp+8, zRet, zSep, zDb1, zTab, *(*uintptr)(unsafe.Pointer(azCol + uintptr(i)*4)), zDb2, zTab, *(*uintptr)(unsafe.Pointer(azCol + uintptr(i)*4))))
- zSep = __ccgo_ts + 22234
+ zRet = Xsqlite3_mprintf(tls, __ccgo_ts+33784, libc.VaList(bp+8, zRet, zSep, zDb1, zTab, *(*uintptr)(unsafe.Pointer(azCol + uintptr(i)*4)), zDb2, zTab, *(*uintptr)(unsafe.Pointer(azCol + uintptr(i)*4))))
+ zSep = __ccgo_ts + 22306
if zRet == uintptr(0) {
break
}
@@ -192824,8 +193259,8 @@ func _sessionExprCompareOther(tls *libc.TLS, nCol int32, zDb1 uintptr, zDb2 uint
}
if libc.Int32FromUint8(*(*Tu8)(unsafe.Pointer(abPK + uintptr(i)))) == 0 {
bHave = int32(1)
- zRet = Xsqlite3_mprintf(tls, __ccgo_ts+33763, libc.VaList(bp+8, zRet, zSep, zDb1, zTab, *(*uintptr)(unsafe.Pointer(azCol + uintptr(i)*4)), zDb2, zTab, *(*uintptr)(unsafe.Pointer(azCol + uintptr(i)*4))))
- zSep = __ccgo_ts + 33804
+ zRet = Xsqlite3_mprintf(tls, __ccgo_ts+33818, libc.VaList(bp+8, zRet, zSep, zDb1, zTab, *(*uintptr)(unsafe.Pointer(azCol + uintptr(i)*4)), zDb2, zTab, *(*uintptr)(unsafe.Pointer(azCol + uintptr(i)*4))))
+ zSep = __ccgo_ts + 33859
if zRet == uintptr(0) {
break
}
@@ -192836,7 +193271,7 @@ func _sessionExprCompareOther(tls *libc.TLS, nCol int32, zDb1 uintptr, zDb2 uint
i++
}
if bHave == 0 {
- zRet = Xsqlite3_mprintf(tls, __ccgo_ts+1787, 0)
+ zRet = Xsqlite3_mprintf(tls, __ccgo_ts+1813, 0)
}
return zRet
}
@@ -192847,12 +193282,12 @@ func _sessionSelectFindNew(tls *libc.TLS, zDb1 uintptr, zDb2 uintptr, bRowid int
var zRet, zSel, v1 uintptr
_, _, _ = zRet, zSel, v1
if bRowid != 0 {
- v1 = __ccgo_ts + 33809
+ v1 = __ccgo_ts + 33864
} else {
- v1 = __ccgo_ts + 6720
+ v1 = __ccgo_ts + 6745
}
zSel = v1
- zRet = Xsqlite3_mprintf(tls, __ccgo_ts+33820, libc.VaList(bp+8, zSel, zDb1, zTbl, zDb2, zTbl, zExpr))
+ zRet = Xsqlite3_mprintf(tls, __ccgo_ts+33875, libc.VaList(bp+8, zSel, zDb1, zTbl, zDb2, zTbl, zExpr))
return zRet
}
@@ -192913,11 +193348,11 @@ func _sessionAllCols(tls *libc.TLS, zDb uintptr, pTab uintptr) (r uintptr) {
break
}
if zRet != 0 {
- v2 = __ccgo_ts + 15149
+ v2 = __ccgo_ts + 15174
} else {
v2 = __ccgo_ts + 1667
}
- zRet = Xsqlite3_mprintf(tls, __ccgo_ts+33899, libc.VaList(bp+8, zRet, v2, zDb, (*TSessionTable)(unsafe.Pointer(pTab)).FzName, *(*uintptr)(unsafe.Pointer((*TSessionTable)(unsafe.Pointer(pTab)).FazCol + uintptr(ii)*4))))
+ zRet = Xsqlite3_mprintf(tls, __ccgo_ts+33954, libc.VaList(bp+8, zRet, v2, zDb, (*TSessionTable)(unsafe.Pointer(pTab)).FzName, *(*uintptr)(unsafe.Pointer((*TSessionTable)(unsafe.Pointer(pTab)).FazCol + uintptr(ii)*4))))
if !(zRet != 0) {
break
}
@@ -192945,7 +193380,7 @@ func _sessionDiffFindModified(tls *libc.TLS, pSession uintptr, pTab uintptr, zFr
} else {
z1 = _sessionAllCols(tls, (*Tsqlite3_session)(unsafe.Pointer(pSession)).FzDb, pTab)
z2 = _sessionAllCols(tls, zFrom, pTab)
- zStmt = Xsqlite3_mprintf(tls, __ccgo_ts+33918, libc.VaList(bp+16, z1, z2, (*Tsqlite3_session)(unsafe.Pointer(pSession)).FzDb, (*TSessionTable)(unsafe.Pointer(pTab)).FzName, zFrom, (*TSessionTable)(unsafe.Pointer(pTab)).FzName, zExpr, zExpr2))
+ zStmt = Xsqlite3_mprintf(tls, __ccgo_ts+33973, libc.VaList(bp+16, z1, z2, (*Tsqlite3_session)(unsafe.Pointer(pSession)).FzDb, (*TSessionTable)(unsafe.Pointer(pTab)).FzName, zFrom, (*TSessionTable)(unsafe.Pointer(pTab)).FzName, zExpr, zExpr2))
if zStmt == uintptr(0) || z1 == uintptr(0) || z2 == uintptr(0) {
rc = int32(SQLITE_NOMEM)
} else {
@@ -192974,17 +193409,18 @@ func _sessionDiffFindModified(tls *libc.TLS, pSession uintptr, pTab uintptr, zFr
}
func Xsqlite3session_diff(tls *libc.TLS, pSession uintptr, zFrom uintptr, zTbl uintptr, pzErrMsg uintptr) (r int32) {
- bp := tls.Alloc(32)
- defer tls.Free(32)
+ bp := tls.Alloc(64)
+ defer tls.Free(64)
var bHasPk, bMismatch, i, rc int32
- var db, zDb, zExpr, v1 uintptr
+ var db, zDb, zDbExists, zExpr, v1 uintptr
var _ /* abPK at bp+24 */ uintptr
var _ /* azCol at bp+28 */ uintptr
var _ /* bRowid at bp+20 */ int32
var _ /* d at bp+0 */ TSessionDiffCtx
var _ /* nCol at bp+16 */ int32
+ var _ /* pDbExists at bp+32 */ uintptr
var _ /* pTo at bp+12 */ uintptr
- _, _, _, _, _, _, _, _ = bHasPk, bMismatch, db, i, rc, zDb, zExpr, v1
+ _, _, _, _, _, _, _, _, _ = bHasPk, bMismatch, db, i, rc, zDb, zDbExists, zExpr, v1
zDb = (*Tsqlite3_session)(unsafe.Pointer(pSession)).FzDb
rc = (*Tsqlite3_session)(unsafe.Pointer(pSession)).Frc
libc.Xmemset(tls, bp, 0, uint32(12))
@@ -192997,7 +193433,9 @@ func Xsqlite3session_diff(tls *libc.TLS, pSession uintptr, zFrom uintptr, zTbl u
zExpr = uintptr(0)
db = (*Tsqlite3_session)(unsafe.Pointer(pSession)).Fdb /* Table zTbl */
/* Locate and if necessary initialize the target table object */
+ (*Tsqlite3_session)(unsafe.Pointer(pSession)).FbAutoAttach++
rc = _sessionFindTable(tls, pSession, zTbl, bp+12)
+ (*Tsqlite3_session)(unsafe.Pointer(pSession)).FbAutoAttach--
if *(*uintptr)(unsafe.Pointer(bp + 12)) == uintptr(0) {
goto diff_out
}
@@ -193008,18 +193446,44 @@ func Xsqlite3session_diff(tls *libc.TLS, pSession uintptr, zFrom uintptr, zTbl u
/* Check the table schemas match */
if rc == SQLITE_OK {
bHasPk = 0
- bMismatch = 0 /* Columns in zFrom.zTbl */
+ bMismatch = 0
+ *(*int32)(unsafe.Pointer(bp + 16)) = 0 /* Columns in zFrom.zTbl */
*(*int32)(unsafe.Pointer(bp + 20)) = 0
+ *(*uintptr)(unsafe.Pointer(bp + 24)) = uintptr(0)
*(*uintptr)(unsafe.Pointer(bp + 28)) = uintptr(0)
- if (*Tsqlite3_session)(unsafe.Pointer(pSession)).FbImplicitPK != 0 {
- v1 = bp + 20
+ zDbExists = uintptr(0)
+ /* Check that database zFrom is attached. */
+ zDbExists = Xsqlite3_mprintf(tls, __ccgo_ts+34030, libc.VaList(bp+48, zFrom))
+ if zDbExists == uintptr(0) {
+ rc = int32(SQLITE_NOMEM)
} else {
- v1 = uintptr(0)
+ *(*uintptr)(unsafe.Pointer(bp + 32)) = uintptr(0)
+ rc = Xsqlite3_prepare_v2(tls, db, zDbExists, -int32(1), bp+32, uintptr(0))
+ if rc == int32(SQLITE_ERROR) {
+ rc = SQLITE_OK
+ *(*int32)(unsafe.Pointer(bp + 16)) = -int32(1)
+ }
+ Xsqlite3_finalize(tls, *(*uintptr)(unsafe.Pointer(bp + 32)))
+ Xsqlite3_free(tls, zDbExists)
+ }
+ if rc == SQLITE_OK && *(*int32)(unsafe.Pointer(bp + 16)) == 0 {
+ if (*Tsqlite3_session)(unsafe.Pointer(pSession)).FbImplicitPK != 0 {
+ v1 = bp + 20
+ } else {
+ v1 = uintptr(0)
+ }
+ rc = _sessionTableInfo(tls, uintptr(0), db, zFrom, zTbl, bp+16, uintptr(0), uintptr(0), bp+28, uintptr(0), uintptr(0), bp+24, v1)
}
- rc = _sessionTableInfo(tls, uintptr(0), db, zFrom, zTbl, bp+16, uintptr(0), uintptr(0), bp+28, uintptr(0), uintptr(0), bp+24, v1)
if rc == SQLITE_OK {
if (*TSessionTable)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 12)))).FnCol != *(*int32)(unsafe.Pointer(bp + 16)) {
- bMismatch = int32(1)
+ if *(*int32)(unsafe.Pointer(bp + 16)) <= 0 {
+ rc = int32(SQLITE_SCHEMA)
+ if pzErrMsg != 0 {
+ *(*uintptr)(unsafe.Pointer(pzErrMsg)) = Xsqlite3_mprintf(tls, __ccgo_ts+34061, libc.VaList(bp+48, zFrom, zTbl))
+ }
+ } else {
+ bMismatch = int32(1)
+ }
} else {
i = 0
for {
@@ -193045,7 +193509,7 @@ func Xsqlite3session_diff(tls *libc.TLS, pSession uintptr, zFrom uintptr, zTbl u
Xsqlite3_free(tls, *(*uintptr)(unsafe.Pointer(bp + 28)))
if bMismatch != 0 {
if pzErrMsg != 0 {
- *(*uintptr)(unsafe.Pointer(pzErrMsg)) = Xsqlite3_mprintf(tls, __ccgo_ts+33975, 0)
+ *(*uintptr)(unsafe.Pointer(pzErrMsg)) = Xsqlite3_mprintf(tls, __ccgo_ts+34082, 0)
}
rc = int32(SQLITE_SCHEMA)
}
@@ -193377,7 +193841,7 @@ func _sessionAppendInteger(tls *libc.TLS, p uintptr, iVal int32, pRc uintptr) {
bp := tls.Alloc(48)
defer tls.Free(48)
var _ /* aBuf at bp+0 */ [24]int8
- Xsqlite3_snprintf(tls, libc.Int32FromUint32(libc.Uint32FromInt64(24)-libc.Uint32FromInt32(1)), bp, __ccgo_ts+5207, libc.VaList(bp+32, iVal))
+ Xsqlite3_snprintf(tls, libc.Int32FromUint32(libc.Uint32FromInt64(24)-libc.Uint32FromInt32(1)), bp, __ccgo_ts+5233, libc.VaList(bp+32, iVal))
_sessionAppendStr(tls, p, bp, pRc)
}
@@ -193677,12 +194141,12 @@ func _sessionSelectStmt(tls *libc.TLS, db uintptr, bIgnoreNoop int32, zDb uintpt
*(*TSessionBuffer)(unsafe.Pointer(bp + 16)) = TSessionBuffer{}
*(*TSessionBuffer)(unsafe.Pointer(bp + 28)) = TSessionBuffer{}
*(*TSessionBuffer)(unsafe.Pointer(bp + 40)) = TSessionBuffer{}
- _sessionAppendStr(tls, bp+16, __ccgo_ts+34002, bp)
- if 0 == Xsqlite3_stricmp(tls, __ccgo_ts+11773, zTab) {
- _sessionAppendStr(tls, bp+16, __ccgo_ts+34006, bp)
- _sessionAppendStr(tls, bp+28, __ccgo_ts+34030, bp)
- _sessionAppendStr(tls, bp+40, __ccgo_ts+34039, bp)
- _sessionAppendStr(tls, bp+4, __ccgo_ts+34084, bp)
+ _sessionAppendStr(tls, bp+16, __ccgo_ts+34109, bp)
+ if 0 == Xsqlite3_stricmp(tls, __ccgo_ts+11798, zTab) {
+ _sessionAppendStr(tls, bp+16, __ccgo_ts+34113, bp)
+ _sessionAppendStr(tls, bp+28, __ccgo_ts+34137, bp)
+ _sessionAppendStr(tls, bp+40, __ccgo_ts+34146, bp)
+ _sessionAppendStr(tls, bp+4, __ccgo_ts+34191, bp)
} else {
i = 0
for {
@@ -193690,17 +194154,17 @@ func _sessionSelectStmt(tls *libc.TLS, db uintptr, bIgnoreNoop int32, zDb uintpt
break
}
if (*(*TSessionBuffer)(unsafe.Pointer(bp + 4))).FnBuf != 0 {
- _sessionAppendStr(tls, bp+4, __ccgo_ts+15149, bp)
+ _sessionAppendStr(tls, bp+4, __ccgo_ts+15174, bp)
}
_sessionAppendIdent(tls, bp+4, *(*uintptr)(unsafe.Pointer(azCol + uintptr(i)*4)), bp)
if *(*Tu8)(unsafe.Pointer(abPK + uintptr(i))) != 0 {
_sessionAppendStr(tls, bp+28, zSep, bp)
_sessionAppendStr(tls, bp+40, zSep, bp)
- zSep = __ccgo_ts + 15149
+ zSep = __ccgo_ts + 15174
_sessionAppendIdent(tls, bp+28, *(*uintptr)(unsafe.Pointer(azCol + uintptr(i)*4)), bp)
- _sessionAppendPrintf(tls, bp+40, bp, __ccgo_ts+34098, libc.VaList(bp+64, i+int32(1)))
+ _sessionAppendPrintf(tls, bp+40, bp, __ccgo_ts+34205, libc.VaList(bp+64, i+int32(1)))
} else {
- _sessionAppendPrintf(tls, bp+16, bp, __ccgo_ts+34102, libc.VaList(bp+64, i+int32(1)+nCol, i+int32(1), zTab, *(*uintptr)(unsafe.Pointer(azCol + uintptr(i)*4))))
+ _sessionAppendPrintf(tls, bp+16, bp, __ccgo_ts+34209, libc.VaList(bp+64, i+int32(1)+nCol, i+int32(1), zTab, *(*uintptr)(unsafe.Pointer(azCol + uintptr(i)*4))))
}
goto _1
_1:
@@ -193714,7 +194178,7 @@ func _sessionSelectStmt(tls *libc.TLS, db uintptr, bIgnoreNoop int32, zDb uintpt
} else {
v2 = __ccgo_ts + 1667
}
- zSql = Xsqlite3_mprintf(tls, __ccgo_ts+34129, libc.VaList(bp+64, (*(*TSessionBuffer)(unsafe.Pointer(bp + 4))).FaBuf, v2, zDb, zTab, (*(*TSessionBuffer)(unsafe.Pointer(bp + 28))).FaBuf, (*(*TSessionBuffer)(unsafe.Pointer(bp + 40))).FaBuf))
+ zSql = Xsqlite3_mprintf(tls, __ccgo_ts+34236, libc.VaList(bp+64, (*(*TSessionBuffer)(unsafe.Pointer(bp + 4))).FaBuf, v2, zDb, zTab, (*(*TSessionBuffer)(unsafe.Pointer(bp + 28))).FaBuf, (*(*TSessionBuffer)(unsafe.Pointer(bp + 40))).FaBuf))
if zSql == uintptr(0) {
*(*int32)(unsafe.Pointer(bp)) = int32(SQLITE_NOMEM)
}
@@ -193856,7 +194320,7 @@ func _sessionGenerateChangeset(tls *libc.TLS, pSession uintptr, bPatchset int32,
if (*Tsqlite3_session)(unsafe.Pointer(pSession)).Frc != 0 {
return (*Tsqlite3_session)(unsafe.Pointer(pSession)).Frc
}
- *(*int32)(unsafe.Pointer(bp + 12)) = Xsqlite3_exec(tls, (*Tsqlite3_session)(unsafe.Pointer(pSession)).Fdb, __ccgo_ts+34171, uintptr(0), uintptr(0), uintptr(0))
+ *(*int32)(unsafe.Pointer(bp + 12)) = Xsqlite3_exec(tls, (*Tsqlite3_session)(unsafe.Pointer(pSession)).Fdb, __ccgo_ts+34278, uintptr(0), uintptr(0), uintptr(0))
if *(*int32)(unsafe.Pointer(bp + 12)) != SQLITE_OK {
return *(*int32)(unsafe.Pointer(bp + 12))
}
@@ -193962,7 +194426,7 @@ func _sessionGenerateChangeset(tls *libc.TLS, pSession uintptr, bPatchset int32,
}
}
Xsqlite3_free(tls, (*(*TSessionBuffer)(unsafe.Pointer(bp))).FaBuf)
- Xsqlite3_exec(tls, db, __ccgo_ts+34191, uintptr(0), uintptr(0), uintptr(0))
+ Xsqlite3_exec(tls, db, __ccgo_ts+34298, uintptr(0), uintptr(0), uintptr(0))
Xsqlite3_mutex_leave(tls, Xsqlite3_db_mutex(tls, db))
return *(*int32)(unsafe.Pointer(bp + 12))
}
@@ -194217,13 +194681,14 @@ func Xsqlite3changeset_start_v2_strm(tls *libc.TLS, pp uintptr, xInput uintptr,
func _sessionDiscardData(tls *libc.TLS, pIn uintptr) {
var nMove int32
_ = nMove
- if (*TSessionInput)(unsafe.Pointer(pIn)).FxInput != 0 && (*TSessionInput)(unsafe.Pointer(pIn)).FiNext >= _sessions_strm_chunk_size {
- nMove = (*TSessionInput)(unsafe.Pointer(pIn)).Fbuf.FnBuf - (*TSessionInput)(unsafe.Pointer(pIn)).FiNext
+ if (*TSessionInput)(unsafe.Pointer(pIn)).FxInput != 0 && (*TSessionInput)(unsafe.Pointer(pIn)).FiCurrent >= _sessions_strm_chunk_size {
+ nMove = (*TSessionInput)(unsafe.Pointer(pIn)).Fbuf.FnBuf - (*TSessionInput)(unsafe.Pointer(pIn)).FiCurrent
if nMove > 0 {
- libc.Xmemmove(tls, (*TSessionInput)(unsafe.Pointer(pIn)).Fbuf.FaBuf, (*TSessionInput)(unsafe.Pointer(pIn)).Fbuf.FaBuf+uintptr((*TSessionInput)(unsafe.Pointer(pIn)).FiNext), libc.Uint32FromInt32(nMove))
+ libc.Xmemmove(tls, (*TSessionInput)(unsafe.Pointer(pIn)).Fbuf.FaBuf, (*TSessionInput)(unsafe.Pointer(pIn)).Fbuf.FaBuf+uintptr((*TSessionInput)(unsafe.Pointer(pIn)).FiCurrent), libc.Uint32FromInt32(nMove))
}
- (*TSessionInput)(unsafe.Pointer(pIn)).Fbuf.FnBuf -= (*TSessionInput)(unsafe.Pointer(pIn)).FiNext
- (*TSessionInput)(unsafe.Pointer(pIn)).FiNext = 0
+ (*TSessionInput)(unsafe.Pointer(pIn)).Fbuf.FnBuf -= (*TSessionInput)(unsafe.Pointer(pIn)).FiCurrent
+ *(*int32)(unsafe.Pointer(pIn + 8)) -= (*TSessionInput)(unsafe.Pointer(pIn)).FiCurrent
+ (*TSessionInput)(unsafe.Pointer(pIn)).FiCurrent = 0
(*TSessionInput)(unsafe.Pointer(pIn)).FnData = (*TSessionInput)(unsafe.Pointer(pIn)).Fbuf.FnBuf
}
}
@@ -194379,7 +194844,7 @@ func _sessionReadRecord(tls *libc.TLS, pIn uintptr, nCol int32, abPK uintptr, ap
rc = _sessionInputBuffer(tls, pIn, int32(9))
if rc == SQLITE_OK {
if (*TSessionInput)(unsafe.Pointer(pIn)).FiNext >= (*TSessionInput)(unsafe.Pointer(pIn)).FnData {
- rc = _sqlite3CorruptError(tls, int32(230294))
+ rc = _sqlite3CorruptError(tls, int32(231591))
} else {
v3 = pIn + 8
v2 = *(*int32)(unsafe.Pointer(v3))
@@ -194403,7 +194868,7 @@ func _sessionReadRecord(tls *libc.TLS, pIn uintptr, nCol int32, abPK uintptr, ap
rc = _sessionInputBuffer(tls, pIn, *(*int32)(unsafe.Pointer(bp)))
if rc == SQLITE_OK {
if *(*int32)(unsafe.Pointer(bp)) < 0 || *(*int32)(unsafe.Pointer(bp)) > (*TSessionInput)(unsafe.Pointer(pIn)).FnData-(*TSessionInput)(unsafe.Pointer(pIn)).FiNext {
- rc = _sqlite3CorruptError(tls, int32(230314))
+ rc = _sqlite3CorruptError(tls, int32(231611))
} else {
if eType == int32(SQLITE_TEXT) {
v4 = int32(SQLITE_UTF8)
@@ -194418,7 +194883,7 @@ func _sessionReadRecord(tls *libc.TLS, pIn uintptr, nCol int32, abPK uintptr, ap
}
if eType == int32(SQLITE_INTEGER) || eType == int32(SQLITE_FLOAT) {
if (*TSessionInput)(unsafe.Pointer(pIn)).FnData-(*TSessionInput)(unsafe.Pointer(pIn)).FiNext < int32(8) {
- rc = _sqlite3CorruptError(tls, int32(230324))
+ rc = _sqlite3CorruptError(tls, int32(231621))
} else {
*(*Tsqlite3_int64)(unsafe.Pointer(bp + 8)) = _sessionGetI64(tls, aVal)
if eType == int32(SQLITE_INTEGER) {
@@ -194474,7 +194939,7 @@ func _sessionChangesetBufferTblhdr(tls *libc.TLS, pIn uintptr, pnByte uintptr) (
** large value for nCol may cause nRead to wrap around and become
** negative. Leading to a crash. */
if *(*int32)(unsafe.Pointer(bp)) < 0 || *(*int32)(unsafe.Pointer(bp)) > int32(65536) {
- rc = _sqlite3CorruptError(tls, int32(230372))
+ rc = _sqlite3CorruptError(tls, int32(231669))
} else {
rc = _sessionInputBuffer(tls, pIn, nRead+*(*int32)(unsafe.Pointer(bp))+int32(100))
nRead += *(*int32)(unsafe.Pointer(bp))
@@ -194579,7 +195044,7 @@ func _sessionChangesetReadTblhdr(tls *libc.TLS, p uintptr) (r int32) {
(*Tsqlite3_changeset_iter)(unsafe.Pointer(p)).Ftblhdr.FnBuf = 0
_sessionBufferGrow(tls, p+44, int64(nByte), bp)
} else {
- *(*int32)(unsafe.Pointer(bp)) = _sqlite3CorruptError(tls, int32(230460))
+ *(*int32)(unsafe.Pointer(bp)) = _sqlite3CorruptError(tls, int32(231757))
}
}
if *(*int32)(unsafe.Pointer(bp)) == SQLITE_OK {
@@ -194650,8 +195115,8 @@ func _sessionChangesetNextOne(tls *libc.TLS, p uintptr, paRec uintptr, pnRec uin
if (*Tsqlite3_changeset_iter)(unsafe.Pointer(p)).Frc != SQLITE_OK {
return (*Tsqlite3_changeset_iter)(unsafe.Pointer(p)).Frc
}
- _sessionDiscardData(tls, p)
(*Tsqlite3_changeset_iter)(unsafe.Pointer(p)).Fin.FiCurrent = (*Tsqlite3_changeset_iter)(unsafe.Pointer(p)).Fin.FiNext
+ _sessionDiscardData(tls, p)
/* If the iterator is already at the end of the changeset, return DONE. */
if (*Tsqlite3_changeset_iter)(unsafe.Pointer(p)).Fin.FiNext >= (*Tsqlite3_changeset_iter)(unsafe.Pointer(p)).Fin.FnData {
return int32(SQLITE_DONE)
@@ -194685,7 +195150,7 @@ func _sessionChangesetNextOne(tls *libc.TLS, p uintptr, paRec uintptr, pnRec uin
if (*Tsqlite3_changeset_iter)(unsafe.Pointer(p)).FzTab == uintptr(0) || (*Tsqlite3_changeset_iter)(unsafe.Pointer(p)).FbPatchset != 0 && (*Tsqlite3_changeset_iter)(unsafe.Pointer(p)).FbInvert != 0 {
/* The first record in the changeset is not a table header. Must be a
** corrupt changeset. */
- v7 = _sqlite3CorruptError(tls, int32(230546))
+ v7 = _sqlite3CorruptError(tls, int32(231843))
(*Tsqlite3_changeset_iter)(unsafe.Pointer(p)).Frc = v7
return v7
}
@@ -194695,7 +195160,7 @@ func _sessionChangesetNextOne(tls *libc.TLS, p uintptr, paRec uintptr, pnRec uin
*(*int32)(unsafe.Pointer(v9))++
(*Tsqlite3_changeset_iter)(unsafe.Pointer(p)).FbIndirect = libc.Int32FromUint8(*(*Tu8)(unsafe.Pointer((*Tsqlite3_changeset_iter)(unsafe.Pointer(p)).Fin.FaData + uintptr(v8))))
if (*Tsqlite3_changeset_iter)(unsafe.Pointer(p)).Fop != int32(SQLITE_UPDATE) && (*Tsqlite3_changeset_iter)(unsafe.Pointer(p)).Fop != int32(SQLITE_DELETE) && (*Tsqlite3_changeset_iter)(unsafe.Pointer(p)).Fop != int32(SQLITE_INSERT) {
- v10 = _sqlite3CorruptError(tls, int32(230552))
+ v10 = _sqlite3CorruptError(tls, int32(231849))
(*Tsqlite3_changeset_iter)(unsafe.Pointer(p)).Frc = v10
return v10
}
@@ -194774,7 +195239,7 @@ func _sessionChangesetNextOne(tls *libc.TLS, p uintptr, paRec uintptr, pnRec uin
if *(*Tu8)(unsafe.Pointer((*Tsqlite3_changeset_iter)(unsafe.Pointer(p)).FabPK + uintptr(i))) != 0 {
*(*uintptr)(unsafe.Pointer((*Tsqlite3_changeset_iter)(unsafe.Pointer(p)).FapValue + uintptr(i)*4)) = *(*uintptr)(unsafe.Pointer((*Tsqlite3_changeset_iter)(unsafe.Pointer(p)).FapValue + uintptr(i+(*Tsqlite3_changeset_iter)(unsafe.Pointer(p)).FnCol)*4))
if *(*uintptr)(unsafe.Pointer((*Tsqlite3_changeset_iter)(unsafe.Pointer(p)).FapValue + uintptr(i)*4)) == uintptr(0) {
- v16 = _sqlite3CorruptError(tls, int32(230596))
+ v16 = _sqlite3CorruptError(tls, int32(231893))
(*Tsqlite3_changeset_iter)(unsafe.Pointer(p)).Frc = v16
return v16
}
@@ -195184,7 +195649,7 @@ func _sessionChangesetInvert(tls *libc.TLS, pInput uintptr, xOutput uintptr, pOu
goto finished_invert
}
default:
- *(*int32)(unsafe.Pointer(bp)) = _sqlite3CorruptError(tls, int32(230961))
+ *(*int32)(unsafe.Pointer(bp)) = _sqlite3CorruptError(tls, int32(232258))
goto finished_invert
}
if xOutput != 0 && (*(*TSessionBuffer)(unsafe.Pointer(bp + 4))).FnBuf >= _sessions_strm_chunk_size {
@@ -195387,7 +195852,7 @@ func _sessionUpdateFind(tls *libc.TLS, pIter uintptr, p uintptr, bPatchset int32
}
if pUp == uintptr(0) {
nByte = libc.Int32FromUint32(uint32(12) * libc.Uint32FromInt32(nU32) * uint32(4))
- bStat1 = libc.BoolInt32(Xsqlite3_stricmp(tls, (*Tsqlite3_changeset_iter)(unsafe.Pointer(pIter)).FzTab, __ccgo_ts+11773) == 0)
+ bStat1 = libc.BoolInt32(Xsqlite3_stricmp(tls, (*Tsqlite3_changeset_iter)(unsafe.Pointer(pIter)).FzTab, __ccgo_ts+11798) == 0)
pUp = Xsqlite3_malloc(tls, nByte)
if pUp == uintptr(0) {
*(*int32)(unsafe.Pointer(bp)) = int32(SQLITE_NOMEM)
@@ -195396,9 +195861,9 @@ func _sessionUpdateFind(tls *libc.TLS, pIter uintptr, p uintptr, bPatchset int32
libc.Xmemset(tls, bp+4, 0, uint32(12))
(*TSessionUpdate)(unsafe.Pointer(pUp)).FaMask = pUp + 1*12
libc.Xmemcpy(tls, (*TSessionUpdate)(unsafe.Pointer(pUp)).FaMask, (*TSessionApplyCtx)(unsafe.Pointer(p)).FaUpdateMask, libc.Uint32FromInt32(nU32)*uint32(4))
- _sessionAppendStr(tls, bp+4, __ccgo_ts+34209, bp)
+ _sessionAppendStr(tls, bp+4, __ccgo_ts+34316, bp)
_sessionAppendIdent(tls, bp+4, (*Tsqlite3_changeset_iter)(unsafe.Pointer(pIter)).FzTab, bp)
- _sessionAppendStr(tls, bp+4, __ccgo_ts+34222, bp)
+ _sessionAppendStr(tls, bp+4, __ccgo_ts+34329, bp)
/* Create the assignments part of the UPDATE */
ii = 0
for {
@@ -195408,9 +195873,9 @@ func _sessionUpdateFind(tls *libc.TLS, pIter uintptr, p uintptr, bPatchset int32
if libc.Int32FromUint8(*(*Tu8)(unsafe.Pointer((*TSessionApplyCtx)(unsafe.Pointer(p)).FabPK + uintptr(ii)))) == 0 && *(*uintptr)(unsafe.Pointer((*Tsqlite3_changeset_iter)(unsafe.Pointer(pIter)).FapValue + uintptr((*Tsqlite3_changeset_iter)(unsafe.Pointer(pIter)).FnCol+ii)*4)) != 0 {
_sessionAppendStr(tls, bp+4, zSep, bp)
_sessionAppendIdent(tls, bp+4, *(*uintptr)(unsafe.Pointer((*TSessionApplyCtx)(unsafe.Pointer(p)).FazCol + uintptr(ii)*4)), bp)
- _sessionAppendStr(tls, bp+4, __ccgo_ts+34228, bp)
+ _sessionAppendStr(tls, bp+4, __ccgo_ts+34335, bp)
_sessionAppendInteger(tls, bp+4, ii*int32(2)+int32(1), bp)
- zSep = __ccgo_ts + 15149
+ zSep = __ccgo_ts + 15174
}
goto _2
_2:
@@ -195419,7 +195884,7 @@ func _sessionUpdateFind(tls *libc.TLS, pIter uintptr, p uintptr, bPatchset int32
}
/* Create the WHERE clause part of the UPDATE */
zSep = __ccgo_ts + 1667
- _sessionAppendStr(tls, bp+4, __ccgo_ts+34233, bp)
+ _sessionAppendStr(tls, bp+4, __ccgo_ts+34340, bp)
ii = 0
for {
if !(ii < (*Tsqlite3_changeset_iter)(unsafe.Pointer(pIter)).FnCol) {
@@ -195428,13 +195893,13 @@ func _sessionUpdateFind(tls *libc.TLS, pIter uintptr, p uintptr, bPatchset int32
if *(*Tu8)(unsafe.Pointer((*TSessionApplyCtx)(unsafe.Pointer(p)).FabPK + uintptr(ii))) != 0 || bPatchset == 0 && *(*uintptr)(unsafe.Pointer((*Tsqlite3_changeset_iter)(unsafe.Pointer(pIter)).FapValue + uintptr(ii)*4)) != 0 {
_sessionAppendStr(tls, bp+4, zSep, bp)
if bStat1 != 0 && ii == int32(1) {
- _sessionAppendStr(tls, bp+4, __ccgo_ts+34241, bp)
+ _sessionAppendStr(tls, bp+4, __ccgo_ts+34348, bp)
} else {
_sessionAppendIdent(tls, bp+4, *(*uintptr)(unsafe.Pointer((*TSessionApplyCtx)(unsafe.Pointer(p)).FazCol + uintptr(ii)*4)), bp)
- _sessionAppendStr(tls, bp+4, __ccgo_ts+34316, bp)
+ _sessionAppendStr(tls, bp+4, __ccgo_ts+34423, bp)
_sessionAppendInteger(tls, bp+4, ii*int32(2)+int32(2), bp)
}
- zSep = __ccgo_ts + 22234
+ zSep = __ccgo_ts + 22306
}
goto _3
_3:
@@ -195521,9 +195986,9 @@ func _sessionDeleteRow(tls *libc.TLS, db uintptr, zTab uintptr, p uintptr) (r in
*(*int32)(unsafe.Pointer(bp)) = SQLITE_OK
*(*TSessionBuffer)(unsafe.Pointer(bp + 4)) = TSessionBuffer{}
nPk = 0
- _sessionAppendStr(tls, bp+4, __ccgo_ts+34322, bp)
+ _sessionAppendStr(tls, bp+4, __ccgo_ts+34429, bp)
_sessionAppendIdent(tls, bp+4, zTab, bp)
- _sessionAppendStr(tls, bp+4, __ccgo_ts+34233, bp)
+ _sessionAppendStr(tls, bp+4, __ccgo_ts+34340, bp)
i = 0
for {
if !(i < (*TSessionApplyCtx)(unsafe.Pointer(p)).FnCol) {
@@ -195533,9 +195998,9 @@ func _sessionDeleteRow(tls *libc.TLS, db uintptr, zTab uintptr, p uintptr) (r in
nPk++
_sessionAppendStr(tls, bp+4, zSep, bp)
_sessionAppendIdent(tls, bp+4, *(*uintptr)(unsafe.Pointer((*TSessionApplyCtx)(unsafe.Pointer(p)).FazCol + uintptr(i)*4)), bp)
- _sessionAppendStr(tls, bp+4, __ccgo_ts+34228, bp)
+ _sessionAppendStr(tls, bp+4, __ccgo_ts+34335, bp)
_sessionAppendInteger(tls, bp+4, i+int32(1), bp)
- zSep = __ccgo_ts + 22234
+ zSep = __ccgo_ts + 22306
}
goto _1
_1:
@@ -195543,9 +196008,9 @@ func _sessionDeleteRow(tls *libc.TLS, db uintptr, zTab uintptr, p uintptr) (r in
i++
}
if nPk < (*TSessionApplyCtx)(unsafe.Pointer(p)).FnCol {
- _sessionAppendStr(tls, bp+4, __ccgo_ts+34340, bp)
+ _sessionAppendStr(tls, bp+4, __ccgo_ts+34447, bp)
_sessionAppendInteger(tls, bp+4, (*TSessionApplyCtx)(unsafe.Pointer(p)).FnCol+int32(1), bp)
- _sessionAppendStr(tls, bp+4, __ccgo_ts+33804, bp)
+ _sessionAppendStr(tls, bp+4, __ccgo_ts+33859, bp)
zSep = __ccgo_ts + 1667
i = 0
for {
@@ -195555,16 +196020,16 @@ func _sessionDeleteRow(tls *libc.TLS, db uintptr, zTab uintptr, p uintptr) (r in
if !(*(*Tu8)(unsafe.Pointer((*TSessionApplyCtx)(unsafe.Pointer(p)).FabPK + uintptr(i))) != 0) {
_sessionAppendStr(tls, bp+4, zSep, bp)
_sessionAppendIdent(tls, bp+4, *(*uintptr)(unsafe.Pointer((*TSessionApplyCtx)(unsafe.Pointer(p)).FazCol + uintptr(i)*4)), bp)
- _sessionAppendStr(tls, bp+4, __ccgo_ts+34316, bp)
+ _sessionAppendStr(tls, bp+4, __ccgo_ts+34423, bp)
_sessionAppendInteger(tls, bp+4, i+int32(1), bp)
- zSep = __ccgo_ts + 34348
+ zSep = __ccgo_ts + 34455
}
goto _2
_2:
;
i++
}
- _sessionAppendStr(tls, bp+4, __ccgo_ts+5175, bp)
+ _sessionAppendStr(tls, bp+4, __ccgo_ts+5201, bp)
}
if *(*int32)(unsafe.Pointer(bp)) == SQLITE_OK {
*(*int32)(unsafe.Pointer(bp)) = Xsqlite3_prepare_v2(tls, db, (*(*TSessionBuffer)(unsafe.Pointer(bp + 4))).FaBuf, (*(*TSessionBuffer)(unsafe.Pointer(bp + 4))).FnBuf, p+4, uintptr(0))
@@ -195590,7 +196055,7 @@ func _sessionDeleteRow(tls *libc.TLS, db uintptr, zTab uintptr, p uintptr) (r in
// */
func _sessionSelectRow(tls *libc.TLS, db uintptr, zTab uintptr, p uintptr) (r int32) {
/* TODO */
- return _sessionSelectStmt(tls, db, libc.Int32FromUint8((*TSessionApplyCtx)(unsafe.Pointer(p)).FbIgnoreNoop), __ccgo_ts+6715, zTab, (*TSessionApplyCtx)(unsafe.Pointer(p)).FbRowid, (*TSessionApplyCtx)(unsafe.Pointer(p)).FnCol, (*TSessionApplyCtx)(unsafe.Pointer(p)).FazCol, (*TSessionApplyCtx)(unsafe.Pointer(p)).FabPK, p+12)
+ return _sessionSelectStmt(tls, db, libc.Int32FromUint8((*TSessionApplyCtx)(unsafe.Pointer(p)).FbIgnoreNoop), __ccgo_ts+6740, zTab, (*TSessionApplyCtx)(unsafe.Pointer(p)).FbRowid, (*TSessionApplyCtx)(unsafe.Pointer(p)).FnCol, (*TSessionApplyCtx)(unsafe.Pointer(p)).FazCol, (*TSessionApplyCtx)(unsafe.Pointer(p)).FabPK, p+12)
}
// C documentation
@@ -195613,16 +196078,16 @@ func _sessionInsertRow(tls *libc.TLS, db uintptr, zTab uintptr, p uintptr) (r in
_ = i
*(*int32)(unsafe.Pointer(bp)) = SQLITE_OK
*(*TSessionBuffer)(unsafe.Pointer(bp + 4)) = TSessionBuffer{}
- _sessionAppendStr(tls, bp+4, __ccgo_ts+34353, bp)
+ _sessionAppendStr(tls, bp+4, __ccgo_ts+34460, bp)
_sessionAppendIdent(tls, bp+4, zTab, bp)
- _sessionAppendStr(tls, bp+4, __ccgo_ts+22240, bp)
+ _sessionAppendStr(tls, bp+4, __ccgo_ts+22312, bp)
i = 0
for {
if !(i < (*TSessionApplyCtx)(unsafe.Pointer(p)).FnCol) {
break
}
if i != 0 {
- _sessionAppendStr(tls, bp+4, __ccgo_ts+15149, bp)
+ _sessionAppendStr(tls, bp+4, __ccgo_ts+15174, bp)
}
_sessionAppendIdent(tls, bp+4, *(*uintptr)(unsafe.Pointer((*TSessionApplyCtx)(unsafe.Pointer(p)).FazCol + uintptr(i)*4)), bp)
goto _1
@@ -195630,19 +196095,19 @@ func _sessionInsertRow(tls *libc.TLS, db uintptr, zTab uintptr, p uintptr) (r in
;
i++
}
- _sessionAppendStr(tls, bp+4, __ccgo_ts+34371, bp)
+ _sessionAppendStr(tls, bp+4, __ccgo_ts+34478, bp)
i = int32(1)
for {
if !(i < (*TSessionApplyCtx)(unsafe.Pointer(p)).FnCol) {
break
}
- _sessionAppendStr(tls, bp+4, __ccgo_ts+34382, bp)
+ _sessionAppendStr(tls, bp+4, __ccgo_ts+34489, bp)
goto _2
_2:
;
i++
}
- _sessionAppendStr(tls, bp+4, __ccgo_ts+5175, bp)
+ _sessionAppendStr(tls, bp+4, __ccgo_ts+5201, bp)
if *(*int32)(unsafe.Pointer(bp)) == SQLITE_OK {
*(*int32)(unsafe.Pointer(bp)) = Xsqlite3_prepare_v2(tls, db, (*(*TSessionBuffer)(unsafe.Pointer(bp + 4))).FaBuf, (*(*TSessionBuffer)(unsafe.Pointer(bp + 4))).FnBuf, p+8, uintptr(0))
}
@@ -195665,12 +196130,12 @@ func _sessionPrepare(tls *libc.TLS, db uintptr, pp uintptr, zSql uintptr) (r int
func _sessionStat1Sql(tls *libc.TLS, db uintptr, p uintptr) (r int32) {
var rc int32
_ = rc
- rc = _sessionSelectRow(tls, db, __ccgo_ts+11773, p)
+ rc = _sessionSelectRow(tls, db, __ccgo_ts+11798, p)
if rc == SQLITE_OK {
- rc = _sessionPrepare(tls, db, p+8, __ccgo_ts+34386)
+ rc = _sessionPrepare(tls, db, p+8, __ccgo_ts+34493)
}
if rc == SQLITE_OK {
- rc = _sessionPrepare(tls, db, p+4, __ccgo_ts+34499)
+ rc = _sessionPrepare(tls, db, p+4, __ccgo_ts+34606)
}
return rc
}
@@ -195736,7 +196201,7 @@ func _sessionBindRow(tls *libc.TLS, pIter uintptr, xValue uintptr, nCol int32, a
if *(*uintptr)(unsafe.Pointer(bp)) == uintptr(0) {
/* The value in the changeset was "undefined". This indicates a
** corrupt changeset blob. */
- rc = _sqlite3CorruptError(tls, int32(231443))
+ rc = _sqlite3CorruptError(tls, int32(232740))
} else {
rc = _sessionBindValue(tls, pStmt, i+int32(1), *(*uintptr)(unsafe.Pointer(bp)))
}
@@ -196152,7 +196617,7 @@ func _sessionApplyOneWithRetry(tls *libc.TLS, db uintptr, pIter uintptr, pApply
rc = _sessionApplyOneOp(tls, pIter, pApply, xConflict, pCtx, uintptr(0), uintptr(0))
} else {
if *(*int32)(unsafe.Pointer(bp)) != 0 {
- rc = Xsqlite3_exec(tls, db, __ccgo_ts+34643, uintptr(0), uintptr(0), uintptr(0))
+ rc = Xsqlite3_exec(tls, db, __ccgo_ts+34750, uintptr(0), uintptr(0), uintptr(0))
if rc == SQLITE_OK {
rc = _sessionBindRow(tls, pIter, __ccgo_fp(Xsqlite3changeset_new), (*TSessionApplyCtx)(unsafe.Pointer(pApply)).FnCol, (*TSessionApplyCtx)(unsafe.Pointer(pApply)).FabPK, (*TSessionApplyCtx)(unsafe.Pointer(pApply)).FpDelete)
Xsqlite3_bind_int(tls, (*TSessionApplyCtx)(unsafe.Pointer(pApply)).FpDelete, (*TSessionApplyCtx)(unsafe.Pointer(pApply)).FnCol+int32(1), int32(1))
@@ -196165,7 +196630,7 @@ func _sessionApplyOneWithRetry(tls *libc.TLS, db uintptr, pIter uintptr, pApply
rc = _sessionApplyOneOp(tls, pIter, pApply, xConflict, pCtx, uintptr(0), uintptr(0))
}
if rc == SQLITE_OK {
- rc = Xsqlite3_exec(tls, db, __ccgo_ts+34664, uintptr(0), uintptr(0), uintptr(0))
+ rc = Xsqlite3_exec(tls, db, __ccgo_ts+34771, uintptr(0), uintptr(0), uintptr(0))
}
}
}
@@ -196265,10 +196730,10 @@ func _sessionChangesetApply(tls *libc.TLS, db uintptr, pIter uintptr, xFilter ui
(*(*TSessionApplyCtx)(unsafe.Pointer(bp + 4))).FbInvertConstraints = libc.BoolInt32(!!(flags&libc.Int32FromInt32(SQLITE_CHANGESETAPPLY_INVERT) != 0))
(*(*TSessionApplyCtx)(unsafe.Pointer(bp + 4))).FbIgnoreNoop = libc.BoolUint8(!!(flags&libc.Int32FromInt32(SQLITE_CHANGESETAPPLY_IGNORENOOP) != 0))
if flags&int32(SQLITE_CHANGESETAPPLY_NOSAVEPOINT) == 0 {
- rc = Xsqlite3_exec(tls, db, __ccgo_ts+34683, uintptr(0), uintptr(0), uintptr(0))
+ rc = Xsqlite3_exec(tls, db, __ccgo_ts+34790, uintptr(0), uintptr(0), uintptr(0))
}
if rc == SQLITE_OK {
- rc = Xsqlite3_exec(tls, db, __ccgo_ts+34709, uintptr(0), uintptr(0), uintptr(0))
+ rc = Xsqlite3_exec(tls, db, __ccgo_ts+34816, uintptr(0), uintptr(0), uintptr(0))
}
for rc == SQLITE_OK && int32(SQLITE_ROW) == Xsqlite3changeset_next(tls, pIter) {
Xsqlite3changeset_op(tls, pIter, bp+92, bp+84, bp+88, uintptr(0))
@@ -196299,7 +196764,7 @@ func _sessionChangesetApply(tls *libc.TLS, db uintptr, pIter uintptr, xFilter ui
** non-zero, proceed. */
schemaMismatch = libc.BoolInt32(xFilter != 0 && 0 == (*(*func(*libc.TLS, uintptr, uintptr) int32)(unsafe.Pointer(&struct{ uintptr }{xFilter})))(tls, pCtx, *(*uintptr)(unsafe.Pointer(bp + 92))))
if schemaMismatch != 0 {
- *(*uintptr)(unsafe.Pointer(bp)) = Xsqlite3_mprintf(tls, __ccgo_ts+3864, libc.VaList(bp+216, *(*uintptr)(unsafe.Pointer(bp + 92))))
+ *(*uintptr)(unsafe.Pointer(bp)) = Xsqlite3_mprintf(tls, __ccgo_ts+3890, libc.VaList(bp+216, *(*uintptr)(unsafe.Pointer(bp + 92))))
if *(*uintptr)(unsafe.Pointer(bp)) == uintptr(0) {
rc = int32(SQLITE_NOMEM)
break
@@ -196309,7 +196774,7 @@ func _sessionChangesetApply(tls *libc.TLS, db uintptr, pIter uintptr, xFilter ui
} else {
nMinCol = 0
Xsqlite3changeset_pk(tls, pIter, bp+96, uintptr(0))
- rc = _sessionTableInfo(tls, uintptr(0), db, __ccgo_ts+6715, *(*uintptr)(unsafe.Pointer(bp + 92)), bp+4+16, uintptr(0), bp, bp+4+20, uintptr(0), uintptr(0), bp+4+24, bp+4+76)
+ rc = _sessionTableInfo(tls, uintptr(0), db, __ccgo_ts+6740, *(*uintptr)(unsafe.Pointer(bp + 92)), bp+4+16, uintptr(0), bp, bp+4+20, uintptr(0), uintptr(0), bp+4+24, bp+4+76)
if rc != SQLITE_OK {
break
}
@@ -196328,18 +196793,18 @@ func _sessionChangesetApply(tls *libc.TLS, db uintptr, pIter uintptr, xFilter ui
}
if (*(*TSessionApplyCtx)(unsafe.Pointer(bp + 4))).FnCol == 0 {
schemaMismatch = int32(1)
- Xsqlite3_log(tls, int32(SQLITE_SCHEMA), __ccgo_ts+34739, libc.VaList(bp+216, *(*uintptr)(unsafe.Pointer(bp))))
+ Xsqlite3_log(tls, int32(SQLITE_SCHEMA), __ccgo_ts+34846, libc.VaList(bp+216, *(*uintptr)(unsafe.Pointer(bp))))
} else {
if (*(*TSessionApplyCtx)(unsafe.Pointer(bp + 4))).FnCol < *(*int32)(unsafe.Pointer(bp + 84)) {
schemaMismatch = int32(1)
- Xsqlite3_log(tls, int32(SQLITE_SCHEMA), __ccgo_ts+34783, libc.VaList(bp+216, *(*uintptr)(unsafe.Pointer(bp)), (*(*TSessionApplyCtx)(unsafe.Pointer(bp + 4))).FnCol, *(*int32)(unsafe.Pointer(bp + 84))))
+ Xsqlite3_log(tls, int32(SQLITE_SCHEMA), __ccgo_ts+34890, libc.VaList(bp+216, *(*uintptr)(unsafe.Pointer(bp)), (*(*TSessionApplyCtx)(unsafe.Pointer(bp + 4))).FnCol, *(*int32)(unsafe.Pointer(bp + 84))))
} else {
if *(*int32)(unsafe.Pointer(bp + 84)) < nMinCol || libc.Xmemcmp(tls, (*(*TSessionApplyCtx)(unsafe.Pointer(bp + 4))).FabPK, *(*uintptr)(unsafe.Pointer(bp + 96)), libc.Uint32FromInt32(*(*int32)(unsafe.Pointer(bp + 84)))) != 0 {
schemaMismatch = int32(1)
- Xsqlite3_log(tls, int32(SQLITE_SCHEMA), __ccgo_ts+34854, libc.VaList(bp+216, *(*uintptr)(unsafe.Pointer(bp))))
+ Xsqlite3_log(tls, int32(SQLITE_SCHEMA), __ccgo_ts+34961, libc.VaList(bp+216, *(*uintptr)(unsafe.Pointer(bp))))
} else {
(*(*TSessionApplyCtx)(unsafe.Pointer(bp + 4))).FnCol = *(*int32)(unsafe.Pointer(bp + 84))
- if 0 == Xsqlite3_stricmp(tls, *(*uintptr)(unsafe.Pointer(bp)), __ccgo_ts+11773) {
+ if 0 == Xsqlite3_stricmp(tls, *(*uintptr)(unsafe.Pointer(bp)), __ccgo_ts+11798) {
v2 = _sessionStat1Sql(tls, db, bp+4)
rc = v2
if v2 != 0 {
@@ -196396,17 +196861,17 @@ func _sessionChangesetApply(tls *libc.TLS, db uintptr, pIter uintptr, xFilter ui
}
}
}
- rc2 = Xsqlite3_exec(tls, db, __ccgo_ts+34914, uintptr(0), uintptr(0), uintptr(0))
+ rc2 = Xsqlite3_exec(tls, db, __ccgo_ts+35021, uintptr(0), uintptr(0), uintptr(0))
if rc == SQLITE_OK {
rc = rc2
}
if flags&int32(SQLITE_CHANGESETAPPLY_NOSAVEPOINT) == 0 {
if rc == SQLITE_OK {
- rc = Xsqlite3_exec(tls, db, __ccgo_ts+34944, uintptr(0), uintptr(0), uintptr(0))
+ rc = Xsqlite3_exec(tls, db, __ccgo_ts+35051, uintptr(0), uintptr(0), uintptr(0))
}
if rc != SQLITE_OK {
- Xsqlite3_exec(tls, db, __ccgo_ts+34968, uintptr(0), uintptr(0), uintptr(0))
- Xsqlite3_exec(tls, db, __ccgo_ts+34944, uintptr(0), uintptr(0), uintptr(0))
+ Xsqlite3_exec(tls, db, __ccgo_ts+35075, uintptr(0), uintptr(0), uintptr(0))
+ Xsqlite3_exec(tls, db, __ccgo_ts+35051, uintptr(0), uintptr(0), uintptr(0))
}
}
if rc == SQLITE_OK && bPatchset == 0 && (*(*TSessionApplyCtx)(unsafe.Pointer(bp + 4))).FbRebase != 0 {
@@ -197182,7 +197647,7 @@ func Xsqlite3changegroup_schema(tls *libc.TLS, pGrp uintptr, db uintptr, zDb uin
** or after sqlite3changegroup_schema() has already been called. */
rc = int32(SQLITE_MISUSE)
} else {
- (*Tsqlite3_changegroup)(unsafe.Pointer(pGrp)).FzDb = Xsqlite3_mprintf(tls, __ccgo_ts+3864, libc.VaList(bp+8, zDb))
+ (*Tsqlite3_changegroup)(unsafe.Pointer(pGrp)).FzDb = Xsqlite3_mprintf(tls, __ccgo_ts+3890, libc.VaList(bp+8, zDb))
if (*Tsqlite3_changegroup)(unsafe.Pointer(pGrp)).FzDb == uintptr(0) {
rc = int32(SQLITE_NOMEM)
} else {
@@ -197218,11 +197683,17 @@ func Xsqlite3changegroup_add(tls *libc.TLS, pGrp uintptr, nData int32, pData uin
// ** Add a single change to a changeset-group.
// */
func Xsqlite3changegroup_add_change(tls *libc.TLS, pGrp uintptr, pIter uintptr) (r int32) {
+ var rc int32
+ _ = rc
+ rc = SQLITE_OK
if (*Tsqlite3_changeset_iter)(unsafe.Pointer(pIter)).Fin.FiCurrent == (*Tsqlite3_changeset_iter)(unsafe.Pointer(pIter)).Fin.FiNext || (*Tsqlite3_changeset_iter)(unsafe.Pointer(pIter)).Frc != SQLITE_OK || (*Tsqlite3_changeset_iter)(unsafe.Pointer(pIter)).FbInvert != 0 {
/* Iterator does not point to any valid entry or is an INVERT iterator. */
- return int32(SQLITE_ERROR)
+ rc = int32(SQLITE_ERROR)
+ } else {
+ (*Tsqlite3_changeset_iter)(unsafe.Pointer(pIter)).Fin.FbNoDiscard = int32(1)
+ rc = _sessionOneChangeToHash(tls, pGrp, pIter, 0)
}
- return _sessionOneChangeToHash(tls, pGrp, pIter, 0)
+ return rc
}
// C documentation
@@ -197807,6 +198278,7 @@ func Xsqlite3session_config(tls *libc.TLS, op int32, pArg uintptr) (r int32) {
/* #include <string.h> */
/* #include <assert.h> */
+/* #include <stddef.h> */
/* Truncate very long tokens to this many bytes. Hard limit is
** (65536-1-1-4-9)==65521 bytes. The limiting factor is the 16-bit offset
@@ -197852,8 +198324,7 @@ type TFts5Global = struct {
type Fts5Global = TFts5Global
type TFts5Colset = struct {
- FnCol int32
- FaiCol [1]int32
+ FnCol int32
}
type Fts5Colset = TFts5Colset
@@ -197865,12 +198336,13 @@ type Fts5Colset = TFts5Colset
** This object is used by fts5_expr.c and fts5_index.c.
*/
type TFts5Colset1 = struct {
- FnCol int32
- FaiCol [1]int32
+ FnCol int32
}
type Fts5Colset1 = TFts5Colset1
+/* Size (int bytes) of a complete Fts5Colset object with N columns. */
+
/**************************************************************************
** Interface to code in fts5_config.c. fts5_config.c contains contains code
** to parse the arguments passed to the CREATE VIRTUAL TABLE statement.
@@ -198247,7 +198719,6 @@ type TFts5ExprNode = struct {
FiRowid Ti64
FpNear uintptr
FnChild int32
- FapChild [1]uintptr
}
type Fts5ExprNode = TFts5ExprNode
@@ -198275,16 +198746,14 @@ type TFts5ExprPhrase = struct {
FpNode uintptr
Fposlist TFts5Buffer
FnTerm int32
- FaTerm [1]TFts5ExprTerm
}
type Fts5ExprPhrase = TFts5ExprPhrase
type TFts5ExprNearset = struct {
- FnNear int32
- FpColset uintptr
- FnPhrase int32
- FapPhrase [1]uintptr
+ FnNear int32
+ FpColset uintptr
+ FnPhrase int32
}
type Fts5ExprNearset = TFts5ExprNearset
@@ -198326,7 +198795,7 @@ type Fts5PoslistPopulator = TFts5PoslistPopulator
**
** The "lemon" program processes an LALR(1) input grammar file, then uses
** this template to construct a parser. The "lemon" program inserts text
-** at each "%%" line. Also, any "P-a-r-s-e" identifer prefix (without the
+** at each "%%" line. Also, any "P-a-r-s-e" identifier prefix (without the
** interstitial "-" characters) contained in this template is changed into
** the value of the %name directive from the grammar. Otherwise, the content
** of this template is copied straight through into the generate parser
@@ -199130,7 +199599,7 @@ func _fts5yyStackOverflow(tls *libc.TLS, fts5yypParser uintptr) {
/* Here code is inserted which will execute if the parser
** stack every overflows */
/******** Begin %stack_overflow code ******************************************/
- _sqlite3Fts5ParseError(tls, pParse, __ccgo_ts+34996, 0)
+ _sqlite3Fts5ParseError(tls, pParse, __ccgo_ts+35103, 0)
/******** End %stack_overflow code ********************************************/
(*Tfts5yyParser)(unsafe.Pointer(fts5yypParser)).FpParse = pParse /* Suppress warning about unused %extra_argument var */
}
@@ -199486,7 +199955,7 @@ func _fts5yy_syntax_error(tls *libc.TLS, fts5yypParser uintptr, fts5yymajor int3
pParse = (*Tfts5yyParser)(unsafe.Pointer(fts5yypParser)).FpParse
/************ Begin %syntax_error code ****************************************/
_ = fts5yymajor /* Silence a compiler warning */
- _sqlite3Fts5ParseError(tls, pParse, __ccgo_ts+35024, libc.VaList(bp+8, fts5yyminor.Fn, fts5yyminor.Fp))
+ _sqlite3Fts5ParseError(tls, pParse, __ccgo_ts+35131, libc.VaList(bp+8, fts5yyminor.Fn, fts5yyminor.Fp))
/************ End %syntax_error code ******************************************/
(*Tfts5yyParser)(unsafe.Pointer(fts5yypParser)).FpParse = pParse /* Suppress warning about unused %extra_argument variable */
}
@@ -199770,7 +200239,7 @@ func _fts5HighlightAppend(tls *libc.TLS, pRc uintptr, p uintptr, z uintptr, n in
if n < 0 {
n = libc.Int32FromUint32(libc.Xstrlen(tls, z))
}
- (*THighlightContext)(unsafe.Pointer(p)).FzOut = Xsqlite3_mprintf(tls, __ccgo_ts+35055, libc.VaList(bp+8, (*THighlightContext)(unsafe.Pointer(p)).FzOut, n, z))
+ (*THighlightContext)(unsafe.Pointer(p)).FzOut = Xsqlite3_mprintf(tls, __ccgo_ts+35162, libc.VaList(bp+8, (*THighlightContext)(unsafe.Pointer(p)).FzOut, n, z))
if (*THighlightContext)(unsafe.Pointer(p)).FzOut == uintptr(0) {
*(*int32)(unsafe.Pointer(pRc)) = int32(SQLITE_NOMEM)
}
@@ -199869,7 +200338,7 @@ func _fts5HighlightFunction(tls *libc.TLS, pApi uintptr, pFts uintptr, pCtx uint
var _ /* rc at bp+68 */ int32
_, _ = iCol, zErr
if nVal != int32(3) {
- zErr = __ccgo_ts + 35062
+ zErr = __ccgo_ts + 35169
Xsqlite3_result_error(tls, pCtx, zErr, -int32(1))
return
}
@@ -200124,7 +200593,7 @@ func _fts5SnippetFunction(tls *libc.TLS, pApi uintptr, pFts uintptr, pCtx uintpt
nBestScore = 0 /* Score of best snippet */
*(*int32)(unsafe.Pointer(bp + 76)) = 0
if nVal != int32(5) {
- zErr = __ccgo_ts + 35112
+ zErr = __ccgo_ts + 35219
Xsqlite3_result_error(tls, pCtx, zErr, -int32(1))
return
}
@@ -200395,7 +200864,7 @@ func _fts5Bm25GetData(tls *libc.TLS, pApi uintptr, pFts uintptr, ppData uintptr)
** under consideration.
**
** The problem with this is that if (N < 2*nHit), the IDF is
- ** negative. Which is undesirable. So the mimimum allowable IDF is
+ ** negative. Which is undesirable. So the minimum allowable IDF is
** (1e-6) - roughly the same as a term that appears in just over
** half of set of 5,000,000 documents. */
idf = libc.Xlog(tls, (float64(*(*Tsqlite3_int64)(unsafe.Pointer(bp))-*(*Tsqlite3_int64)(unsafe.Pointer(bp + 16)))+float64(0.5))/(float64(*(*Tsqlite3_int64)(unsafe.Pointer(bp + 16)))+float64(0.5)))
@@ -200519,13 +200988,13 @@ func _fts5GetLocaleFunction(tls *libc.TLS, pApi uintptr, pFts uintptr, pCtx uint
*(*int32)(unsafe.Pointer(bp + 4)) = 0
/* xColumnLocale() must be available */
if nVal != int32(1) {
- z = __ccgo_ts + 35160
+ z = __ccgo_ts + 35267
Xsqlite3_result_error(tls, pCtx, z, -int32(1))
return
}
eType = Xsqlite3_value_numeric_type(tls, *(*uintptr)(unsafe.Pointer(apVal)))
if eType != int32(SQLITE_INTEGER) {
- z1 = __ccgo_ts + 35216
+ z1 = __ccgo_ts + 35323
Xsqlite3_result_error(tls, pCtx, z1, -int32(1))
return
}
@@ -200558,19 +201027,19 @@ func _sqlite3Fts5AuxInit(tls *libc.TLS, pApi uintptr) (r int32) {
FxDestroy uintptr
}{
0: {
- FzFunc: __ccgo_ts + 35274,
+ FzFunc: __ccgo_ts + 35381,
FxFunc: __ccgo_fp(_fts5SnippetFunction),
},
1: {
- FzFunc: __ccgo_ts + 35282,
+ FzFunc: __ccgo_ts + 35389,
FxFunc: __ccgo_fp(_fts5HighlightFunction),
},
2: {
- FzFunc: __ccgo_ts + 35292,
+ FzFunc: __ccgo_ts + 35399,
FxFunc: __ccgo_fp(_fts5Bm25Function),
},
3: {
- FzFunc: __ccgo_ts + 35297,
+ FzFunc: __ccgo_ts + 35404,
FxFunc: __ccgo_fp(_fts5GetLocaleFunction),
},
}
@@ -200958,7 +201427,7 @@ func _sqlite3Fts5Strndup(tls *libc.TLS, pRc uintptr, pIn uintptr, nIn int32) (r
// ** * The 52 upper and lower case ASCII characters, and
// ** * The 10 integer ASCII characters.
// ** * The underscore character "_" (0x5F).
-// ** * The unicode "subsitute" character (0x1A).
+// ** * The unicode "substitute" character (0x1A).
// */
func _sqlite3Fts5IsBareword(tls *libc.TLS, t int8) (r int32) {
var aBareword [128]Tu8
@@ -201434,7 +201903,7 @@ func _fts5ConfigParseSpecial(tls *libc.TLS, pConfig uintptr, zCmd uintptr, zArg
_, _, _, _, _, _, _, _, _, _, _ = azArg, bFirst, nArg, nByte, nCmd, nPre, p, p1, p2, pSpace, v2
*(*int32)(unsafe.Pointer(bp)) = SQLITE_OK
nCmd = libc.Int32FromUint32(libc.Xstrlen(tls, zCmd))
- if Xsqlite3_strnicmp(tls, __ccgo_ts+35313, zCmd, nCmd) == 0 {
+ if Xsqlite3_strnicmp(tls, __ccgo_ts+35420, zCmd, nCmd) == 0 {
nByte = libc.Int32FromUint32(libc.Uint32FromInt64(4) * libc.Uint32FromInt32(FTS5_MAX_PREFIX_INDEXES))
bFirst = int32(1)
if (*TFts5Config)(unsafe.Pointer(pConfig)).FaPrefix == uintptr(0) {
@@ -201460,12 +201929,12 @@ func _fts5ConfigParseSpecial(tls *libc.TLS, pConfig uintptr, zCmd uintptr, zArg
}
}
if int32(*(*int8)(unsafe.Pointer(p))) < int32('0') || int32(*(*int8)(unsafe.Pointer(p))) > int32('9') {
- *(*uintptr)(unsafe.Pointer(pzErr)) = Xsqlite3_mprintf(tls, __ccgo_ts+35320, 0)
+ *(*uintptr)(unsafe.Pointer(pzErr)) = Xsqlite3_mprintf(tls, __ccgo_ts+35427, 0)
*(*int32)(unsafe.Pointer(bp)) = int32(SQLITE_ERROR)
break
}
if (*TFts5Config)(unsafe.Pointer(pConfig)).FnPrefix == int32(FTS5_MAX_PREFIX_INDEXES) {
- *(*uintptr)(unsafe.Pointer(pzErr)) = Xsqlite3_mprintf(tls, __ccgo_ts+35351, libc.VaList(bp+48, int32(FTS5_MAX_PREFIX_INDEXES)))
+ *(*uintptr)(unsafe.Pointer(pzErr)) = Xsqlite3_mprintf(tls, __ccgo_ts+35458, libc.VaList(bp+48, int32(FTS5_MAX_PREFIX_INDEXES)))
*(*int32)(unsafe.Pointer(bp)) = int32(SQLITE_ERROR)
break
}
@@ -201474,7 +201943,7 @@ func _fts5ConfigParseSpecial(tls *libc.TLS, pConfig uintptr, zCmd uintptr, zArg
p++
}
if nPre <= 0 || nPre >= int32(1000) {
- *(*uintptr)(unsafe.Pointer(pzErr)) = Xsqlite3_mprintf(tls, __ccgo_ts+35384, 0)
+ *(*uintptr)(unsafe.Pointer(pzErr)) = Xsqlite3_mprintf(tls, __ccgo_ts+35491, 0)
*(*int32)(unsafe.Pointer(bp)) = int32(SQLITE_ERROR)
break
}
@@ -201484,14 +201953,14 @@ func _fts5ConfigParseSpecial(tls *libc.TLS, pConfig uintptr, zCmd uintptr, zArg
}
return *(*int32)(unsafe.Pointer(bp))
}
- if Xsqlite3_strnicmp(tls, __ccgo_ts+35421, zCmd, nCmd) == 0 {
+ if Xsqlite3_strnicmp(tls, __ccgo_ts+35528, zCmd, nCmd) == 0 {
p1 = zArg
nArg = libc.Int64FromUint32(libc.Xstrlen(tls, zArg) + uint32(1))
azArg = _sqlite3Fts5MallocZero(tls, bp, libc.Int64FromUint32(libc.Uint32FromInt64(4)+libc.Uint32FromInt32(2))*nArg)
if azArg != 0 {
pSpace = azArg + uintptr(nArg)*4
if (*TFts5Config)(unsafe.Pointer(pConfig)).Ft.FazArg != 0 {
- *(*uintptr)(unsafe.Pointer(pzErr)) = Xsqlite3_mprintf(tls, __ccgo_ts+35430, 0)
+ *(*uintptr)(unsafe.Pointer(pzErr)) = Xsqlite3_mprintf(tls, __ccgo_ts+35537, 0)
*(*int32)(unsafe.Pointer(bp)) = int32(SQLITE_ERROR)
} else {
nArg = 0
@@ -201518,7 +201987,7 @@ func _fts5ConfigParseSpecial(tls *libc.TLS, pConfig uintptr, zCmd uintptr, zArg
nArg++
}
if p1 == uintptr(0) {
- *(*uintptr)(unsafe.Pointer(pzErr)) = Xsqlite3_mprintf(tls, __ccgo_ts+35463, 0)
+ *(*uintptr)(unsafe.Pointer(pzErr)) = Xsqlite3_mprintf(tls, __ccgo_ts+35570, 0)
*(*int32)(unsafe.Pointer(bp)) = int32(SQLITE_ERROR)
} else {
(*TFts5Config)(unsafe.Pointer(pConfig)).Ft.FazArg = azArg
@@ -201530,76 +201999,76 @@ func _fts5ConfigParseSpecial(tls *libc.TLS, pConfig uintptr, zCmd uintptr, zArg
Xsqlite3_free(tls, azArg)
return *(*int32)(unsafe.Pointer(bp))
}
- if Xsqlite3_strnicmp(tls, __ccgo_ts+35497, zCmd, nCmd) == 0 {
+ if Xsqlite3_strnicmp(tls, __ccgo_ts+35604, zCmd, nCmd) == 0 {
if (*TFts5Config)(unsafe.Pointer(pConfig)).FeContent != FTS5_CONTENT_NORMAL {
- *(*uintptr)(unsafe.Pointer(pzErr)) = Xsqlite3_mprintf(tls, __ccgo_ts+35505, 0)
+ *(*uintptr)(unsafe.Pointer(pzErr)) = Xsqlite3_mprintf(tls, __ccgo_ts+35612, 0)
*(*int32)(unsafe.Pointer(bp)) = int32(SQLITE_ERROR)
} else {
if *(*int8)(unsafe.Pointer(zArg)) != 0 {
(*TFts5Config)(unsafe.Pointer(pConfig)).FeContent = int32(FTS5_CONTENT_EXTERNAL)
- (*TFts5Config)(unsafe.Pointer(pConfig)).FzContent = _sqlite3Fts5Mprintf(tls, bp, __ccgo_ts+35537, libc.VaList(bp+48, (*TFts5Config)(unsafe.Pointer(pConfig)).FzDb, zArg))
+ (*TFts5Config)(unsafe.Pointer(pConfig)).FzContent = _sqlite3Fts5Mprintf(tls, bp, __ccgo_ts+35644, libc.VaList(bp+48, (*TFts5Config)(unsafe.Pointer(pConfig)).FzDb, zArg))
} else {
(*TFts5Config)(unsafe.Pointer(pConfig)).FeContent = int32(FTS5_CONTENT_NONE)
}
}
return *(*int32)(unsafe.Pointer(bp))
}
- if Xsqlite3_strnicmp(tls, __ccgo_ts+35543, zCmd, nCmd) == 0 {
+ if Xsqlite3_strnicmp(tls, __ccgo_ts+35650, zCmd, nCmd) == 0 {
if int32(*(*int8)(unsafe.Pointer(zArg))) != int32('0') && int32(*(*int8)(unsafe.Pointer(zArg))) != int32('1') || int32(*(*int8)(unsafe.Pointer(zArg + 1))) != int32('\000') {
- *(*uintptr)(unsafe.Pointer(pzErr)) = Xsqlite3_mprintf(tls, __ccgo_ts+35562, 0)
+ *(*uintptr)(unsafe.Pointer(pzErr)) = Xsqlite3_mprintf(tls, __ccgo_ts+35669, 0)
*(*int32)(unsafe.Pointer(bp)) = int32(SQLITE_ERROR)
} else {
(*TFts5Config)(unsafe.Pointer(pConfig)).FbContentlessDelete = libc.BoolInt32(int32(*(*int8)(unsafe.Pointer(zArg))) == int32('1'))
}
return *(*int32)(unsafe.Pointer(bp))
}
- if Xsqlite3_strnicmp(tls, __ccgo_ts+35605, zCmd, nCmd) == 0 {
+ if Xsqlite3_strnicmp(tls, __ccgo_ts+35712, zCmd, nCmd) == 0 {
if int32(*(*int8)(unsafe.Pointer(zArg))) != int32('0') && int32(*(*int8)(unsafe.Pointer(zArg))) != int32('1') || int32(*(*int8)(unsafe.Pointer(zArg + 1))) != int32('\000') {
- *(*uintptr)(unsafe.Pointer(pzErr)) = Xsqlite3_mprintf(tls, __ccgo_ts+35562, 0)
+ *(*uintptr)(unsafe.Pointer(pzErr)) = Xsqlite3_mprintf(tls, __ccgo_ts+35669, 0)
*(*int32)(unsafe.Pointer(bp)) = int32(SQLITE_ERROR)
} else {
(*TFts5Config)(unsafe.Pointer(pConfig)).FbContentlessUnindexed = libc.BoolInt32(int32(*(*int8)(unsafe.Pointer(zArg))) == int32('1'))
}
return *(*int32)(unsafe.Pointer(bp))
}
- if Xsqlite3_strnicmp(tls, __ccgo_ts+35627, zCmd, nCmd) == 0 {
+ if Xsqlite3_strnicmp(tls, __ccgo_ts+35734, zCmd, nCmd) == 0 {
if (*TFts5Config)(unsafe.Pointer(pConfig)).FzContentRowid != 0 {
- *(*uintptr)(unsafe.Pointer(pzErr)) = Xsqlite3_mprintf(tls, __ccgo_ts+35641, 0)
+ *(*uintptr)(unsafe.Pointer(pzErr)) = Xsqlite3_mprintf(tls, __ccgo_ts+35748, 0)
*(*int32)(unsafe.Pointer(bp)) = int32(SQLITE_ERROR)
} else {
(*TFts5Config)(unsafe.Pointer(pConfig)).FzContentRowid = _sqlite3Fts5Strndup(tls, bp, zArg, -int32(1))
}
return *(*int32)(unsafe.Pointer(bp))
}
- if Xsqlite3_strnicmp(tls, __ccgo_ts+35679, zCmd, nCmd) == 0 {
+ if Xsqlite3_strnicmp(tls, __ccgo_ts+35786, zCmd, nCmd) == 0 {
if int32(*(*int8)(unsafe.Pointer(zArg))) != int32('0') && int32(*(*int8)(unsafe.Pointer(zArg))) != int32('1') || int32(*(*int8)(unsafe.Pointer(zArg + 1))) != int32('\000') {
- *(*uintptr)(unsafe.Pointer(pzErr)) = Xsqlite3_mprintf(tls, __ccgo_ts+35690, 0)
+ *(*uintptr)(unsafe.Pointer(pzErr)) = Xsqlite3_mprintf(tls, __ccgo_ts+35797, 0)
*(*int32)(unsafe.Pointer(bp)) = int32(SQLITE_ERROR)
} else {
(*TFts5Config)(unsafe.Pointer(pConfig)).FbColumnsize = libc.BoolInt32(int32(*(*int8)(unsafe.Pointer(zArg))) == int32('1'))
}
return *(*int32)(unsafe.Pointer(bp))
}
- if Xsqlite3_strnicmp(tls, __ccgo_ts+35725, zCmd, nCmd) == 0 {
+ if Xsqlite3_strnicmp(tls, __ccgo_ts+35832, zCmd, nCmd) == 0 {
if int32(*(*int8)(unsafe.Pointer(zArg))) != int32('0') && int32(*(*int8)(unsafe.Pointer(zArg))) != int32('1') || int32(*(*int8)(unsafe.Pointer(zArg + 1))) != int32('\000') {
- *(*uintptr)(unsafe.Pointer(pzErr)) = Xsqlite3_mprintf(tls, __ccgo_ts+35732, 0)
+ *(*uintptr)(unsafe.Pointer(pzErr)) = Xsqlite3_mprintf(tls, __ccgo_ts+35839, 0)
*(*int32)(unsafe.Pointer(bp)) = int32(SQLITE_ERROR)
} else {
(*TFts5Config)(unsafe.Pointer(pConfig)).FbLocale = libc.BoolInt32(int32(*(*int8)(unsafe.Pointer(zArg))) == int32('1'))
}
return *(*int32)(unsafe.Pointer(bp))
}
- if Xsqlite3_strnicmp(tls, __ccgo_ts+5584, zCmd, nCmd) == 0 {
+ if Xsqlite3_strnicmp(tls, __ccgo_ts+5610, zCmd, nCmd) == 0 {
*(*[4]TFts5Enum)(unsafe.Pointer(bp + 4)) = [4]TFts5Enum{
0: {
- FzName: __ccgo_ts + 8409,
+ FzName: __ccgo_ts + 8434,
FeVal: int32(FTS5_DETAIL_NONE),
},
1: {
- FzName: __ccgo_ts + 17903,
+ FzName: __ccgo_ts + 17975,
},
2: {
- FzName: __ccgo_ts + 35763,
+ FzName: __ccgo_ts + 35870,
FeVal: int32(FTS5_DETAIL_COLUMNS),
},
3: {},
@@ -201607,20 +202076,20 @@ func _fts5ConfigParseSpecial(tls *libc.TLS, pConfig uintptr, zCmd uintptr, zArg
v2 = _fts5ConfigSetEnum(tls, bp+4, zArg, pConfig+68)
*(*int32)(unsafe.Pointer(bp)) = v2
if v2 != 0 {
- *(*uintptr)(unsafe.Pointer(pzErr)) = Xsqlite3_mprintf(tls, __ccgo_ts+35771, 0)
+ *(*uintptr)(unsafe.Pointer(pzErr)) = Xsqlite3_mprintf(tls, __ccgo_ts+35878, 0)
}
return *(*int32)(unsafe.Pointer(bp))
}
- if Xsqlite3_strnicmp(tls, __ccgo_ts+35802, zCmd, nCmd) == 0 {
+ if Xsqlite3_strnicmp(tls, __ccgo_ts+35909, zCmd, nCmd) == 0 {
if int32(*(*int8)(unsafe.Pointer(zArg))) != int32('0') && int32(*(*int8)(unsafe.Pointer(zArg))) != int32('1') || int32(*(*int8)(unsafe.Pointer(zArg + 1))) != int32('\000') {
- *(*uintptr)(unsafe.Pointer(pzErr)) = Xsqlite3_mprintf(tls, __ccgo_ts+35812, 0)
+ *(*uintptr)(unsafe.Pointer(pzErr)) = Xsqlite3_mprintf(tls, __ccgo_ts+35919, 0)
*(*int32)(unsafe.Pointer(bp)) = int32(SQLITE_ERROR)
} else {
(*TFts5Config)(unsafe.Pointer(pConfig)).FbTokendata = libc.BoolInt32(int32(*(*int8)(unsafe.Pointer(zArg))) == int32('1'))
}
return *(*int32)(unsafe.Pointer(bp))
}
- *(*uintptr)(unsafe.Pointer(pzErr)) = Xsqlite3_mprintf(tls, __ccgo_ts+35846, libc.VaList(bp+48, nCmd, zCmd))
+ *(*uintptr)(unsafe.Pointer(pzErr)) = Xsqlite3_mprintf(tls, __ccgo_ts+35953, libc.VaList(bp+48, nCmd, zCmd))
return int32(SQLITE_ERROR)
}
@@ -201681,16 +202150,16 @@ func _fts5ConfigParseColumn(tls *libc.TLS, p uintptr, zCol uintptr, zArg uintptr
var v2 uintptr
_, _, _ = rc, v1, v2
rc = SQLITE_OK
- if 0 == Xsqlite3_stricmp(tls, zCol, __ccgo_ts+35874) || 0 == Xsqlite3_stricmp(tls, zCol, __ccgo_ts+16850) {
- *(*uintptr)(unsafe.Pointer(pzErr)) = Xsqlite3_mprintf(tls, __ccgo_ts+35879, libc.VaList(bp+8, zCol))
+ if 0 == Xsqlite3_stricmp(tls, zCol, __ccgo_ts+35981) || 0 == Xsqlite3_stricmp(tls, zCol, __ccgo_ts+16922) {
+ *(*uintptr)(unsafe.Pointer(pzErr)) = Xsqlite3_mprintf(tls, __ccgo_ts+35986, libc.VaList(bp+8, zCol))
rc = int32(SQLITE_ERROR)
} else {
if zArg != 0 {
- if 0 == Xsqlite3_stricmp(tls, zArg, __ccgo_ts+35909) {
+ if 0 == Xsqlite3_stricmp(tls, zArg, __ccgo_ts+36016) {
*(*Tu8)(unsafe.Pointer((*TFts5Config)(unsafe.Pointer(p)).FabUnindexed + uintptr((*TFts5Config)(unsafe.Pointer(p)).FnCol))) = uint8(1)
*(*int32)(unsafe.Pointer(pbUnindexed)) = int32(1)
} else {
- *(*uintptr)(unsafe.Pointer(pzErr)) = Xsqlite3_mprintf(tls, __ccgo_ts+35919, libc.VaList(bp+8, zArg))
+ *(*uintptr)(unsafe.Pointer(pzErr)) = Xsqlite3_mprintf(tls, __ccgo_ts+36026, libc.VaList(bp+8, zArg))
rc = int32(SQLITE_ERROR)
}
}
@@ -201716,7 +202185,7 @@ func _fts5ConfigMakeExprlist(tls *libc.TLS, p uintptr) (r int32) {
_ = i
*(*int32)(unsafe.Pointer(bp)) = SQLITE_OK
*(*TFts5Buffer)(unsafe.Pointer(bp + 4)) = TFts5Buffer{}
- _sqlite3Fts5BufferAppendPrintf(tls, bp, bp+4, __ccgo_ts+35950, libc.VaList(bp+24, (*TFts5Config)(unsafe.Pointer(p)).FzContentRowid))
+ _sqlite3Fts5BufferAppendPrintf(tls, bp, bp+4, __ccgo_ts+36057, libc.VaList(bp+24, (*TFts5Config)(unsafe.Pointer(p)).FzContentRowid))
if (*TFts5Config)(unsafe.Pointer(p)).FeContent != int32(FTS5_CONTENT_NONE) {
i = 0
for {
@@ -201724,12 +202193,12 @@ func _fts5ConfigMakeExprlist(tls *libc.TLS, p uintptr) (r int32) {
break
}
if (*TFts5Config)(unsafe.Pointer(p)).FeContent == int32(FTS5_CONTENT_EXTERNAL) {
- _sqlite3Fts5BufferAppendPrintf(tls, bp, bp+4, __ccgo_ts+35955, libc.VaList(bp+24, *(*uintptr)(unsafe.Pointer((*TFts5Config)(unsafe.Pointer(p)).FazCol + uintptr(i)*4))))
+ _sqlite3Fts5BufferAppendPrintf(tls, bp, bp+4, __ccgo_ts+36062, libc.VaList(bp+24, *(*uintptr)(unsafe.Pointer((*TFts5Config)(unsafe.Pointer(p)).FazCol + uintptr(i)*4))))
} else {
if (*TFts5Config)(unsafe.Pointer(p)).FeContent == FTS5_CONTENT_NORMAL || *(*Tu8)(unsafe.Pointer((*TFts5Config)(unsafe.Pointer(p)).FabUnindexed + uintptr(i))) != 0 {
- _sqlite3Fts5BufferAppendPrintf(tls, bp, bp+4, __ccgo_ts+35962, libc.VaList(bp+24, i))
+ _sqlite3Fts5BufferAppendPrintf(tls, bp, bp+4, __ccgo_ts+36069, libc.VaList(bp+24, i))
} else {
- _sqlite3Fts5BufferAppendPrintf(tls, bp, bp+4, __ccgo_ts+35970, 0)
+ _sqlite3Fts5BufferAppendPrintf(tls, bp, bp+4, __ccgo_ts+36077, 0)
}
}
goto _1
@@ -201745,9 +202214,9 @@ func _fts5ConfigMakeExprlist(tls *libc.TLS, p uintptr) (r int32) {
break
}
if libc.Int32FromUint8(*(*Tu8)(unsafe.Pointer((*TFts5Config)(unsafe.Pointer(p)).FabUnindexed + uintptr(i)))) == 0 {
- _sqlite3Fts5BufferAppendPrintf(tls, bp, bp+4, __ccgo_ts+35977, libc.VaList(bp+24, i))
+ _sqlite3Fts5BufferAppendPrintf(tls, bp, bp+4, __ccgo_ts+36084, libc.VaList(bp+24, i))
} else {
- _sqlite3Fts5BufferAppendPrintf(tls, bp, bp+4, __ccgo_ts+35970, 0)
+ _sqlite3Fts5BufferAppendPrintf(tls, bp, bp+4, __ccgo_ts+36077, 0)
}
goto _2
_2:
@@ -201810,8 +202279,8 @@ func _sqlite3Fts5ConfigParse(tls *libc.TLS, pGlobal uintptr, db uintptr, nArg in
(*TFts5Config)(unsafe.Pointer(pRet)).FzName = _sqlite3Fts5Strndup(tls, bp, *(*uintptr)(unsafe.Pointer(azArg + 2*4)), -int32(1))
(*TFts5Config)(unsafe.Pointer(pRet)).FbColumnsize = int32(1)
(*TFts5Config)(unsafe.Pointer(pRet)).FeDetail = FTS5_DETAIL_FULL
- if *(*int32)(unsafe.Pointer(bp)) == SQLITE_OK && Xsqlite3_stricmp(tls, (*TFts5Config)(unsafe.Pointer(pRet)).FzName, __ccgo_ts+35874) == 0 {
- *(*uintptr)(unsafe.Pointer(pzErr)) = Xsqlite3_mprintf(tls, __ccgo_ts+35985, libc.VaList(bp+32, (*TFts5Config)(unsafe.Pointer(pRet)).FzName))
+ if *(*int32)(unsafe.Pointer(bp)) == SQLITE_OK && Xsqlite3_stricmp(tls, (*TFts5Config)(unsafe.Pointer(pRet)).FzName, __ccgo_ts+35981) == 0 {
+ *(*uintptr)(unsafe.Pointer(pzErr)) = Xsqlite3_mprintf(tls, __ccgo_ts+36092, libc.VaList(bp+32, (*TFts5Config)(unsafe.Pointer(pRet)).FzName))
*(*int32)(unsafe.Pointer(bp)) = int32(SQLITE_ERROR)
}
i = int32(3)
@@ -201842,7 +202311,7 @@ func _sqlite3Fts5ConfigParse(tls *libc.TLS, pGlobal uintptr, db uintptr, nArg in
}
if *(*int32)(unsafe.Pointer(bp)) == SQLITE_OK {
if z == uintptr(0) {
- *(*uintptr)(unsafe.Pointer(pzErr)) = Xsqlite3_mprintf(tls, __ccgo_ts+36014, libc.VaList(bp+32, zOrig))
+ *(*uintptr)(unsafe.Pointer(pzErr)) = Xsqlite3_mprintf(tls, __ccgo_ts+36121, libc.VaList(bp+32, zOrig))
*(*int32)(unsafe.Pointer(bp)) = int32(SQLITE_ERROR)
} else {
if bOption != 0 {
@@ -201872,7 +202341,7 @@ func _sqlite3Fts5ConfigParse(tls *libc.TLS, pGlobal uintptr, db uintptr, nArg in
}
/* We only allow contentless_delete=1 if the table is indeed contentless. */
if *(*int32)(unsafe.Pointer(bp)) == SQLITE_OK && (*TFts5Config)(unsafe.Pointer(pRet)).FbContentlessDelete != 0 && (*TFts5Config)(unsafe.Pointer(pRet)).FeContent != int32(FTS5_CONTENT_NONE) {
- *(*uintptr)(unsafe.Pointer(pzErr)) = Xsqlite3_mprintf(tls, __ccgo_ts+36034, 0)
+ *(*uintptr)(unsafe.Pointer(pzErr)) = Xsqlite3_mprintf(tls, __ccgo_ts+36141, 0)
*(*int32)(unsafe.Pointer(bp)) = int32(SQLITE_ERROR)
}
/* We only allow contentless_delete=1 if columnsize=0 is not present.
@@ -201880,37 +202349,37 @@ func _sqlite3Fts5ConfigParse(tls *libc.TLS, pGlobal uintptr, db uintptr, nArg in
** This restriction may be removed at some point.
*/
if *(*int32)(unsafe.Pointer(bp)) == SQLITE_OK && (*TFts5Config)(unsafe.Pointer(pRet)).FbContentlessDelete != 0 && (*TFts5Config)(unsafe.Pointer(pRet)).FbColumnsize == 0 {
- *(*uintptr)(unsafe.Pointer(pzErr)) = Xsqlite3_mprintf(tls, __ccgo_ts+36084, 0)
+ *(*uintptr)(unsafe.Pointer(pzErr)) = Xsqlite3_mprintf(tls, __ccgo_ts+36191, 0)
*(*int32)(unsafe.Pointer(bp)) = int32(SQLITE_ERROR)
}
/* We only allow contentless_unindexed=1 if the table is actually a
** contentless one.
*/
if *(*int32)(unsafe.Pointer(bp)) == SQLITE_OK && (*TFts5Config)(unsafe.Pointer(pRet)).FbContentlessUnindexed != 0 && (*TFts5Config)(unsafe.Pointer(pRet)).FeContent != int32(FTS5_CONTENT_NONE) {
- *(*uintptr)(unsafe.Pointer(pzErr)) = Xsqlite3_mprintf(tls, __ccgo_ts+36139, 0)
+ *(*uintptr)(unsafe.Pointer(pzErr)) = Xsqlite3_mprintf(tls, __ccgo_ts+36246, 0)
*(*int32)(unsafe.Pointer(bp)) = int32(SQLITE_ERROR)
}
/* If no zContent option was specified, fill in the default values. */
if *(*int32)(unsafe.Pointer(bp)) == SQLITE_OK && (*TFts5Config)(unsafe.Pointer(pRet)).FzContent == uintptr(0) {
zTail = uintptr(0)
if (*TFts5Config)(unsafe.Pointer(pRet)).FeContent == FTS5_CONTENT_NORMAL {
- zTail = __ccgo_ts + 35497
+ zTail = __ccgo_ts + 35604
} else {
if *(*int32)(unsafe.Pointer(bp + 4)) != 0 && (*TFts5Config)(unsafe.Pointer(pRet)).FbContentlessUnindexed != 0 {
(*TFts5Config)(unsafe.Pointer(pRet)).FeContent = int32(FTS5_CONTENT_UNINDEXED)
- zTail = __ccgo_ts + 35497
+ zTail = __ccgo_ts + 35604
} else {
if (*TFts5Config)(unsafe.Pointer(pRet)).FbColumnsize != 0 {
- zTail = __ccgo_ts + 36192
+ zTail = __ccgo_ts + 36299
}
}
}
if zTail != 0 {
- (*TFts5Config)(unsafe.Pointer(pRet)).FzContent = _sqlite3Fts5Mprintf(tls, bp, __ccgo_ts+36200, libc.VaList(bp+32, (*TFts5Config)(unsafe.Pointer(pRet)).FzDb, (*TFts5Config)(unsafe.Pointer(pRet)).FzName, zTail))
+ (*TFts5Config)(unsafe.Pointer(pRet)).FzContent = _sqlite3Fts5Mprintf(tls, bp, __ccgo_ts+36307, libc.VaList(bp+32, (*TFts5Config)(unsafe.Pointer(pRet)).FzDb, (*TFts5Config)(unsafe.Pointer(pRet)).FzName, zTail))
}
}
if *(*int32)(unsafe.Pointer(bp)) == SQLITE_OK && (*TFts5Config)(unsafe.Pointer(pRet)).FzContentRowid == uintptr(0) {
- (*TFts5Config)(unsafe.Pointer(pRet)).FzContentRowid = _sqlite3Fts5Strndup(tls, bp, __ccgo_ts+16850, -int32(1))
+ (*TFts5Config)(unsafe.Pointer(pRet)).FzContentRowid = _sqlite3Fts5Strndup(tls, bp, __ccgo_ts+16922, -int32(1))
}
/* Formulate the zContentExprlist text */
if *(*int32)(unsafe.Pointer(bp)) == SQLITE_OK {
@@ -201979,7 +202448,7 @@ func _sqlite3Fts5ConfigDeclareVtab(tls *libc.TLS, pConfig uintptr) (r int32) {
var _ /* rc at bp+0 */ int32
_, _, _, _ = i, zSep, zSql, v2
*(*int32)(unsafe.Pointer(bp)) = SQLITE_OK
- zSql = _sqlite3Fts5Mprintf(tls, bp, __ccgo_ts+36211, 0)
+ zSql = _sqlite3Fts5Mprintf(tls, bp, __ccgo_ts+36318, 0)
i = 0
for {
if !(zSql != 0 && i < (*TFts5Config)(unsafe.Pointer(pConfig)).FnCol) {
@@ -201988,16 +202457,16 @@ func _sqlite3Fts5ConfigDeclareVtab(tls *libc.TLS, pConfig uintptr) (r int32) {
if i == 0 {
v2 = __ccgo_ts + 1667
} else {
- v2 = __ccgo_ts + 15149
+ v2 = __ccgo_ts + 15174
}
zSep = v2
- zSql = _sqlite3Fts5Mprintf(tls, bp, __ccgo_ts+36227, libc.VaList(bp+16, zSql, zSep, *(*uintptr)(unsafe.Pointer((*TFts5Config)(unsafe.Pointer(pConfig)).FazCol + uintptr(i)*4))))
+ zSql = _sqlite3Fts5Mprintf(tls, bp, __ccgo_ts+36334, libc.VaList(bp+16, zSql, zSep, *(*uintptr)(unsafe.Pointer((*TFts5Config)(unsafe.Pointer(pConfig)).FazCol + uintptr(i)*4))))
goto _1
_1:
;
i++
}
- zSql = _sqlite3Fts5Mprintf(tls, bp, __ccgo_ts+36234, libc.VaList(bp+16, zSql, (*TFts5Config)(unsafe.Pointer(pConfig)).FzName, __ccgo_ts+35874))
+ zSql = _sqlite3Fts5Mprintf(tls, bp, __ccgo_ts+36341, libc.VaList(bp+16, zSql, (*TFts5Config)(unsafe.Pointer(pConfig)).FzName, __ccgo_ts+35981))
if zSql != 0 {
*(*int32)(unsafe.Pointer(bp)) = Xsqlite3_declare_vtab(tls, (*TFts5Config)(unsafe.Pointer(pConfig)).Fdb, zSql)
Xsqlite3_free(tls, zSql)
@@ -202155,7 +202624,7 @@ func _sqlite3Fts5ConfigSetValue(tls *libc.TLS, pConfig uintptr, zKey uintptr, pV
var _ /* zRankArgs at bp+4 */ uintptr
_, _, _, _, _, _, _, _, _, _, _, _ = bVal, bVal1, nAutomerge, nCrisisMerge, nHashSize, nUsermerge, nVal, pgsz, rc, zIn, v1, v2
rc = SQLITE_OK
- if 0 == Xsqlite3_stricmp(tls, zKey, __ccgo_ts+36260) {
+ if 0 == Xsqlite3_stricmp(tls, zKey, __ccgo_ts+36367) {
pgsz = 0
if int32(SQLITE_INTEGER) == Xsqlite3_value_numeric_type(tls, pVal) {
pgsz = Xsqlite3_value_int(tls, pVal)
@@ -202166,7 +202635,7 @@ func _sqlite3Fts5ConfigSetValue(tls *libc.TLS, pConfig uintptr, zKey uintptr, pV
(*TFts5Config)(unsafe.Pointer(pConfig)).Fpgsz = pgsz
}
} else {
- if 0 == Xsqlite3_stricmp(tls, zKey, __ccgo_ts+36265) {
+ if 0 == Xsqlite3_stricmp(tls, zKey, __ccgo_ts+36372) {
nHashSize = -int32(1)
if int32(SQLITE_INTEGER) == Xsqlite3_value_numeric_type(tls, pVal) {
nHashSize = Xsqlite3_value_int(tls, pVal)
@@ -202177,7 +202646,7 @@ func _sqlite3Fts5ConfigSetValue(tls *libc.TLS, pConfig uintptr, zKey uintptr, pV
(*TFts5Config)(unsafe.Pointer(pConfig)).FnHashSize = nHashSize
}
} else {
- if 0 == Xsqlite3_stricmp(tls, zKey, __ccgo_ts+36274) {
+ if 0 == Xsqlite3_stricmp(tls, zKey, __ccgo_ts+36381) {
nAutomerge = -int32(1)
if int32(SQLITE_INTEGER) == Xsqlite3_value_numeric_type(tls, pVal) {
nAutomerge = Xsqlite3_value_int(tls, pVal)
@@ -202191,7 +202660,7 @@ func _sqlite3Fts5ConfigSetValue(tls *libc.TLS, pConfig uintptr, zKey uintptr, pV
(*TFts5Config)(unsafe.Pointer(pConfig)).FnAutomerge = nAutomerge
}
} else {
- if 0 == Xsqlite3_stricmp(tls, zKey, __ccgo_ts+36284) {
+ if 0 == Xsqlite3_stricmp(tls, zKey, __ccgo_ts+36391) {
nUsermerge = -int32(1)
if int32(SQLITE_INTEGER) == Xsqlite3_value_numeric_type(tls, pVal) {
nUsermerge = Xsqlite3_value_int(tls, pVal)
@@ -202202,7 +202671,7 @@ func _sqlite3Fts5ConfigSetValue(tls *libc.TLS, pConfig uintptr, zKey uintptr, pV
(*TFts5Config)(unsafe.Pointer(pConfig)).FnUsermerge = nUsermerge
}
} else {
- if 0 == Xsqlite3_stricmp(tls, zKey, __ccgo_ts+36294) {
+ if 0 == Xsqlite3_stricmp(tls, zKey, __ccgo_ts+36401) {
nCrisisMerge = -int32(1)
if int32(SQLITE_INTEGER) == Xsqlite3_value_numeric_type(tls, pVal) {
nCrisisMerge = Xsqlite3_value_int(tls, pVal)
@@ -202219,7 +202688,7 @@ func _sqlite3Fts5ConfigSetValue(tls *libc.TLS, pConfig uintptr, zKey uintptr, pV
(*TFts5Config)(unsafe.Pointer(pConfig)).FnCrisisMerge = nCrisisMerge
}
} else {
- if 0 == Xsqlite3_stricmp(tls, zKey, __ccgo_ts+36306) {
+ if 0 == Xsqlite3_stricmp(tls, zKey, __ccgo_ts+36413) {
nVal = -int32(1)
if int32(SQLITE_INTEGER) == Xsqlite3_value_numeric_type(tls, pVal) {
nVal = Xsqlite3_value_int(tls, pVal)
@@ -202234,7 +202703,7 @@ func _sqlite3Fts5ConfigSetValue(tls *libc.TLS, pConfig uintptr, zKey uintptr, pV
}
(*TFts5Config)(unsafe.Pointer(pConfig)).FnDeleteMerge = nVal
} else {
- if 0 == Xsqlite3_stricmp(tls, zKey, __ccgo_ts+35874) {
+ if 0 == Xsqlite3_stricmp(tls, zKey, __ccgo_ts+35981) {
zIn = Xsqlite3_value_text(tls, pVal)
rc = _sqlite3Fts5ConfigParseRank(tls, zIn, bp, bp+4)
if rc == SQLITE_OK {
@@ -202249,7 +202718,7 @@ func _sqlite3Fts5ConfigSetValue(tls *libc.TLS, pConfig uintptr, zKey uintptr, pV
}
}
} else {
- if 0 == Xsqlite3_stricmp(tls, zKey, __ccgo_ts+36318) {
+ if 0 == Xsqlite3_stricmp(tls, zKey, __ccgo_ts+36425) {
bVal = -int32(1)
if int32(SQLITE_INTEGER) == Xsqlite3_value_numeric_type(tls, pVal) {
bVal = Xsqlite3_value_int(tls, pVal)
@@ -202265,7 +202734,7 @@ func _sqlite3Fts5ConfigSetValue(tls *libc.TLS, pConfig uintptr, zKey uintptr, pV
(*TFts5Config)(unsafe.Pointer(pConfig)).FbSecureDelete = v1
}
} else {
- if 0 == Xsqlite3_stricmp(tls, zKey, __ccgo_ts+36332) {
+ if 0 == Xsqlite3_stricmp(tls, zKey, __ccgo_ts+36439) {
bVal1 = -int32(1)
if int32(SQLITE_INTEGER) == Xsqlite3_value_numeric_type(tls, pVal) {
bVal1 = Xsqlite3_value_int(tls, pVal)
@@ -202308,7 +202777,7 @@ func _sqlite3Fts5ConfigLoad(tls *libc.TLS, pConfig uintptr, iCookie int32) (r in
var _ /* p at bp+0 */ uintptr
var _ /* rc at bp+4 */ int32
_, _, _, _, _ = iVersion, pVal, zK, zSelect, zSql
- zSelect = __ccgo_ts + 36342
+ zSelect = __ccgo_ts + 36449
*(*uintptr)(unsafe.Pointer(bp)) = uintptr(0)
*(*int32)(unsafe.Pointer(bp + 4)) = SQLITE_OK
iVersion = 0
@@ -202328,7 +202797,7 @@ func _sqlite3Fts5ConfigLoad(tls *libc.TLS, pConfig uintptr, iCookie int32) (r in
for int32(SQLITE_ROW) == Xsqlite3_step(tls, *(*uintptr)(unsafe.Pointer(bp))) {
zK = Xsqlite3_column_text(tls, *(*uintptr)(unsafe.Pointer(bp)), 0)
pVal = Xsqlite3_column_value(tls, *(*uintptr)(unsafe.Pointer(bp)), int32(1))
- if 0 == Xsqlite3_stricmp(tls, zK, __ccgo_ts+36374) {
+ if 0 == Xsqlite3_stricmp(tls, zK, __ccgo_ts+36481) {
iVersion = Xsqlite3_value_int(tls, pVal)
} else {
*(*int32)(unsafe.Pointer(bp + 8)) = 0
@@ -202339,7 +202808,7 @@ func _sqlite3Fts5ConfigLoad(tls *libc.TLS, pConfig uintptr, iCookie int32) (r in
}
if *(*int32)(unsafe.Pointer(bp + 4)) == SQLITE_OK && iVersion != int32(FTS5_CURRENT_VERSION) && iVersion != int32(FTS5_CURRENT_VERSION_SECUREDELETE) {
*(*int32)(unsafe.Pointer(bp + 4)) = int32(SQLITE_ERROR)
- _sqlite3Fts5ConfigErrmsg(tls, pConfig, __ccgo_ts+36382, libc.VaList(bp+24, iVersion, int32(FTS5_CURRENT_VERSION), int32(FTS5_CURRENT_VERSION_SECUREDELETE)))
+ _sqlite3Fts5ConfigErrmsg(tls, pConfig, __ccgo_ts+36489, libc.VaList(bp+24, iVersion, int32(FTS5_CURRENT_VERSION), int32(FTS5_CURRENT_VERSION_SECUREDELETE)))
} else {
(*TFts5Config)(unsafe.Pointer(pConfig)).FiVersion = iVersion
}
@@ -202443,11 +202912,12 @@ type TFts5ExprNode1 = struct {
FiRowid Ti64
FpNear uintptr
FnChild int32
- FapChild [1]uintptr
}
type Fts5ExprNode1 = TFts5ExprNode1
+/* Size (in bytes) of an Fts5ExprNode object that holds up to N children */
+
/*
** Invoke the xNext method of an Fts5ExprNode object. This macro should be
** used as if it has the same signature as the xNext() methods themselves.
@@ -202477,24 +202947,26 @@ type TFts5ExprPhrase1 = struct {
FpNode uintptr
Fposlist TFts5Buffer
FnTerm int32
- FaTerm [1]TFts5ExprTerm
}
type Fts5ExprPhrase1 = TFts5ExprPhrase1
+/* Size (in bytes) of an Fts5ExprPhrase object that holds up to N terms */
+
/*
** One or more phrases that must appear within a certain token distance of
** each other within each matching document.
*/
type TFts5ExprNearset1 = struct {
- FnNear int32
- FpColset uintptr
- FnPhrase int32
- FapPhrase [1]uintptr
+ FnNear int32
+ FpColset uintptr
+ FnPhrase int32
}
type Fts5ExprNearset1 = TFts5ExprNearset1
+/* Size (in bytes) of an Fts5ExprNearset object covering up to N phrases */
+
/*
** Parse context.
*/
@@ -202585,7 +203057,7 @@ func _fts5ExprGetToken(tls *libc.TLS, pParse uintptr, pz uintptr, pToken uintptr
}
}
if int32(*(*int8)(unsafe.Pointer(z2))) == int32('\000') {
- _sqlite3Fts5ParseError(tls, pParse, __ccgo_ts+36453, 0)
+ _sqlite3Fts5ParseError(tls, pParse, __ccgo_ts+36560, 0)
return FTS5_EOF
}
goto _1
@@ -202596,7 +203068,7 @@ func _fts5ExprGetToken(tls *libc.TLS, pParse uintptr, pz uintptr, pToken uintptr
(*TFts5Token)(unsafe.Pointer(pToken)).Fn = int32(z2) - int32(z)
default:
if _sqlite3Fts5IsBareword(tls, *(*int8)(unsafe.Pointer(z))) == 0 {
- _sqlite3Fts5ParseError(tls, pParse, __ccgo_ts+36473, libc.VaList(bp+8, z))
+ _sqlite3Fts5ParseError(tls, pParse, __ccgo_ts+36580, libc.VaList(bp+8, z))
return FTS5_EOF
}
tok = int32(FTS5_STRING)
@@ -202611,13 +203083,13 @@ func _fts5ExprGetToken(tls *libc.TLS, pParse uintptr, pz uintptr, pToken uintptr
z21++
}
(*TFts5Token)(unsafe.Pointer(pToken)).Fn = int32(z21) - int32(z)
- if (*TFts5Token)(unsafe.Pointer(pToken)).Fn == int32(2) && libc.Xmemcmp(tls, (*TFts5Token)(unsafe.Pointer(pToken)).Fp, __ccgo_ts+36504, uint32(2)) == 0 {
+ if (*TFts5Token)(unsafe.Pointer(pToken)).Fn == int32(2) && libc.Xmemcmp(tls, (*TFts5Token)(unsafe.Pointer(pToken)).Fp, __ccgo_ts+36611, uint32(2)) == 0 {
tok = int32(FTS5_OR)
}
- if (*TFts5Token)(unsafe.Pointer(pToken)).Fn == int32(3) && libc.Xmemcmp(tls, (*TFts5Token)(unsafe.Pointer(pToken)).Fp, __ccgo_ts+36507, uint32(3)) == 0 {
+ if (*TFts5Token)(unsafe.Pointer(pToken)).Fn == int32(3) && libc.Xmemcmp(tls, (*TFts5Token)(unsafe.Pointer(pToken)).Fp, __ccgo_ts+36614, uint32(3)) == 0 {
tok = int32(FTS5_NOT)
}
- if (*TFts5Token)(unsafe.Pointer(pToken)).Fn == int32(3) && libc.Xmemcmp(tls, (*TFts5Token)(unsafe.Pointer(pToken)).Fp, __ccgo_ts+30968, uint32(3)) == 0 {
+ if (*TFts5Token)(unsafe.Pointer(pToken)).Fn == int32(3) && libc.Xmemcmp(tls, (*TFts5Token)(unsafe.Pointer(pToken)).Fp, __ccgo_ts+31023, uint32(3)) == 0 {
tok = int32(FTS5_AND)
}
break
@@ -202661,7 +203133,7 @@ func _sqlite3Fts5ExprNew(tls *libc.TLS, pConfig uintptr, bPhraseToAnd int32, iCo
/* If the LHS of the MATCH expression was a user column, apply the
** implicit column-filter. */
if (*(*TFts5Parse)(unsafe.Pointer(bp))).Frc == SQLITE_OK && iCol < (*TFts5Config)(unsafe.Pointer(pConfig)).FnCol {
- n = int32(8)
+ n = libc.Int32FromUint32(libc.Uint32FromInt64(8) * libc.Uint32FromInt32((libc.Int32FromInt32(1)+libc.Int32FromInt32(2))/libc.Int32FromInt32(2)))
pColset = _sqlite3Fts5MallocZero(tls, bp+8, int64(n))
if pColset != 0 {
(*TFts5Colset)(unsafe.Pointer(pColset)).FnCol = int32(1)
@@ -204300,7 +204772,7 @@ func _sqlite3Fts5ParseNearset(tls *libc.TLS, pParse uintptr, pNear uintptr, pPhr
pRet = uintptr(0)
if (*TFts5Parse)(unsafe.Pointer(pParse)).Frc == SQLITE_OK {
if pNear == uintptr(0) {
- nByte = libc.Int64FromUint32(uint32(16) + libc.Uint32FromInt32(SZALLOC)*uint32(4))
+ nByte = libc.Int64FromUint32(uint32(libc.UintptrFromInt32(0)+12) + libc.Uint32FromInt32(SZALLOC+libc.Int32FromInt32(1))*libc.Uint32FromInt64(4))
pRet = Xsqlite3_malloc64(tls, libc.Uint64FromInt64(nByte))
if pRet == uintptr(0) {
(*TFts5Parse)(unsafe.Pointer(pParse)).Frc = int32(SQLITE_NOMEM)
@@ -204310,7 +204782,7 @@ func _sqlite3Fts5ParseNearset(tls *libc.TLS, pParse uintptr, pNear uintptr, pPhr
} else {
if (*TFts5ExprNearset)(unsafe.Pointer(pNear)).FnPhrase%SZALLOC == 0 {
nNew = (*TFts5ExprNearset)(unsafe.Pointer(pNear)).FnPhrase + SZALLOC
- nByte1 = libc.Int64FromUint32(uint32(16) + libc.Uint32FromInt32(nNew)*uint32(4))
+ nByte1 = libc.Int64FromUint32(uint32(libc.UintptrFromInt32(0)+12) + libc.Uint32FromInt32(nNew+libc.Int32FromInt32(1))*libc.Uint32FromInt64(4))
pRet = Xsqlite3_realloc64(tls, pNear, libc.Uint64FromInt64(nByte1))
if pRet == uintptr(0) {
(*TFts5Parse)(unsafe.Pointer(pParse)).Frc = int32(SQLITE_NOMEM)
@@ -204416,12 +204888,12 @@ func _fts5ParseTokenize(tls *libc.TLS, pContext uintptr, tflags int32, pToken ui
v2 = 0
}
nNew = SZALLOC + v2
- pNew = Xsqlite3_realloc64(tls, pPhrase, uint64(uint32(44)+uint32(24)*libc.Uint32FromInt32(nNew)))
+ pNew = Xsqlite3_realloc64(tls, pPhrase, uint64(uint32(libc.UintptrFromInt32(0)+20)+libc.Uint32FromInt32(nNew+libc.Int32FromInt32(1))*libc.Uint32FromInt64(24)))
if pNew == uintptr(0) {
*(*int32)(unsafe.Pointer(bp)) = int32(SQLITE_NOMEM)
} else {
if pPhrase == uintptr(0) {
- libc.Xmemset(tls, pNew, 0, uint32(44))
+ libc.Xmemset(tls, pNew, 0, uint32(libc.UintptrFromInt32(0)+20)+libc.Uint32FromInt32(libc.Int32FromInt32(1))*libc.Uint32FromInt64(24))
}
v3 = pNew
pPhrase = v3
@@ -204555,7 +205027,7 @@ func _sqlite3Fts5ParseTerm(tls *libc.TLS, pParse uintptr, pAppend uintptr, pToke
if (*(*TTokenCtx)(unsafe.Pointer(bp))).FpPhrase == uintptr(0) {
/* This happens when parsing a token or quoted phrase that contains
** no token characters at all. (e.g ... MATCH '""'). */
- (*(*TTokenCtx)(unsafe.Pointer(bp))).FpPhrase = _sqlite3Fts5MallocZero(tls, pParse+8, int64(44))
+ (*(*TTokenCtx)(unsafe.Pointer(bp))).FpPhrase = _sqlite3Fts5MallocZero(tls, pParse+8, libc.Int64FromUint32(uint32(libc.UintptrFromInt32(0)+20)+libc.Uint32FromInt32(libc.Int32FromInt32(1))*libc.Uint32FromInt64(24)))
} else {
if (*TFts5ExprPhrase)(unsafe.Pointer((*(*TTokenCtx)(unsafe.Pointer(bp))).FpPhrase)).FnTerm != 0 {
(*(*TFts5ExprTerm)(unsafe.Pointer((*(*TTokenCtx)(unsafe.Pointer(bp))).FpPhrase + 20 + uintptr((*TFts5ExprPhrase)(unsafe.Pointer((*(*TTokenCtx)(unsafe.Pointer(bp))).FpPhrase)).FnTerm-int32(1))*24))).FbPrefix = libc.Uint8FromInt32(bPrefix)
@@ -204595,15 +205067,15 @@ func _sqlite3Fts5ExprClonePhrase(tls *libc.TLS, pExpr uintptr, iPhrase int32, pp
(*TFts5Expr)(unsafe.Pointer(pNew)).FapExprPhrase = _sqlite3Fts5MallocZero(tls, bp, int64(4))
}
if *(*int32)(unsafe.Pointer(bp)) == SQLITE_OK {
- (*TFts5Expr)(unsafe.Pointer(pNew)).FpRoot = _sqlite3Fts5MallocZero(tls, bp, int64(40))
+ (*TFts5Expr)(unsafe.Pointer(pNew)).FpRoot = _sqlite3Fts5MallocZero(tls, bp, libc.Int64FromUint32(uint32(libc.UintptrFromInt32(0)+36)+libc.Uint32FromInt32(libc.Int32FromInt32(1))*libc.Uint32FromInt64(4)))
}
if *(*int32)(unsafe.Pointer(bp)) == SQLITE_OK {
- (*TFts5ExprNode)(unsafe.Pointer((*TFts5Expr)(unsafe.Pointer(pNew)).FpRoot)).FpNear = _sqlite3Fts5MallocZero(tls, bp, libc.Int64FromUint32(libc.Uint32FromInt64(16)+libc.Uint32FromInt64(4)))
+ (*TFts5ExprNode)(unsafe.Pointer((*TFts5Expr)(unsafe.Pointer(pNew)).FpRoot)).FpNear = _sqlite3Fts5MallocZero(tls, bp, libc.Int64FromUint32(uint32(libc.UintptrFromInt32(0)+12)+libc.Uint32FromInt32(libc.Int32FromInt32(2))*libc.Uint32FromInt64(4)))
}
if *(*int32)(unsafe.Pointer(bp)) == SQLITE_OK && pOrig != uintptr(0) {
pColsetOrig = (*TFts5ExprNearset)(unsafe.Pointer((*TFts5ExprNode)(unsafe.Pointer((*TFts5ExprPhrase)(unsafe.Pointer(pOrig)).FpNode)).FpNear)).FpColset
if pColsetOrig != 0 {
- nByte = libc.Int64FromUint32(uint32(8) + libc.Uint32FromInt32((*TFts5Colset)(unsafe.Pointer(pColsetOrig)).FnCol-libc.Int32FromInt32(1))*uint32(4))
+ nByte = libc.Int64FromUint32(libc.Uint32FromInt64(8) * libc.Uint32FromInt32(((*TFts5Colset)(unsafe.Pointer(pColsetOrig)).FnCol+libc.Int32FromInt32(2))/libc.Int32FromInt32(2)))
pColset = _sqlite3Fts5MallocZero(tls, bp, nByte)
if pColset != 0 {
libc.Xmemcpy(tls, pColset, pColsetOrig, libc.Uint32FromInt64(nByte))
@@ -204644,7 +205116,7 @@ func _sqlite3Fts5ExprClonePhrase(tls *libc.TLS, pExpr uintptr, iPhrase int32, pp
} else {
/* This happens when parsing a token or quoted phrase that contains
** no token characters at all. (e.g ... MATCH '""'). */
- (*(*TTokenCtx)(unsafe.Pointer(bp + 4))).FpPhrase = _sqlite3Fts5MallocZero(tls, bp, int64(44))
+ (*(*TTokenCtx)(unsafe.Pointer(bp + 4))).FpPhrase = _sqlite3Fts5MallocZero(tls, bp, libc.Int64FromUint32(uint32(libc.UintptrFromInt32(0)+20)+libc.Uint32FromInt32(libc.Int32FromInt32(1))*libc.Uint32FromInt64(24)))
}
}
if *(*int32)(unsafe.Pointer(bp)) == SQLITE_OK && (*(*TTokenCtx)(unsafe.Pointer(bp + 4))).FpPhrase != 0 {
@@ -204682,8 +205154,8 @@ func _sqlite3Fts5ExprClonePhrase(tls *libc.TLS, pExpr uintptr, iPhrase int32, pp
func _sqlite3Fts5ParseNear(tls *libc.TLS, pParse uintptr, pTok uintptr) {
bp := tls.Alloc(32)
defer tls.Free(32)
- if (*TFts5Token)(unsafe.Pointer(pTok)).Fn != int32(4) || libc.Xmemcmp(tls, __ccgo_ts+36511, (*TFts5Token)(unsafe.Pointer(pTok)).Fp, uint32(4)) != 0 {
- _sqlite3Fts5ParseError(tls, pParse, __ccgo_ts+35024, libc.VaList(bp+8, (*TFts5Token)(unsafe.Pointer(pTok)).Fn, (*TFts5Token)(unsafe.Pointer(pTok)).Fp))
+ if (*TFts5Token)(unsafe.Pointer(pTok)).Fn != int32(4) || libc.Xmemcmp(tls, __ccgo_ts+36618, (*TFts5Token)(unsafe.Pointer(pTok)).Fp, uint32(4)) != 0 {
+ _sqlite3Fts5ParseError(tls, pParse, __ccgo_ts+35131, libc.VaList(bp+8, (*TFts5Token)(unsafe.Pointer(pTok)).Fn, (*TFts5Token)(unsafe.Pointer(pTok)).Fp))
}
}
@@ -204703,10 +205175,13 @@ func _sqlite3Fts5ParseSetDistance(tls *libc.TLS, pParse uintptr, pNear uintptr,
}
c = *(*int8)(unsafe.Pointer((*TFts5Token)(unsafe.Pointer(p)).Fp + uintptr(i)))
if int32(c) < int32('0') || int32(c) > int32('9') {
- _sqlite3Fts5ParseError(tls, pParse, __ccgo_ts+36516, libc.VaList(bp+8, (*TFts5Token)(unsafe.Pointer(p)).Fn, (*TFts5Token)(unsafe.Pointer(p)).Fp))
+ _sqlite3Fts5ParseError(tls, pParse, __ccgo_ts+36623, libc.VaList(bp+8, (*TFts5Token)(unsafe.Pointer(p)).Fn, (*TFts5Token)(unsafe.Pointer(p)).Fp))
return
}
- nNear = nNear*int32(10) + (int32(*(*int8)(unsafe.Pointer((*TFts5Token)(unsafe.Pointer(p)).Fp + uintptr(i)))) - int32('0'))
+ if nNear < int32(214748363) {
+ nNear = nNear*int32(10) + (int32(*(*int8)(unsafe.Pointer((*TFts5Token)(unsafe.Pointer(p)).Fp + uintptr(i)))) - int32('0'))
+ }
+ /* ^^^^^^^^^^^^^^^--- Prevent integer overflow */
goto _1
_1:
;
@@ -204740,7 +205215,7 @@ func _fts5ParseColset(tls *libc.TLS, pParse uintptr, p uintptr, iCol int32) (r u
v1 = 0
}
nCol = v1 /* New colset object to return */
- pNew = Xsqlite3_realloc64(tls, p, uint64(uint32(8)+uint32(4)*libc.Uint32FromInt32(nCol)))
+ pNew = Xsqlite3_realloc64(tls, p, uint64(libc.Uint32FromInt64(8)*libc.Uint32FromInt32((nCol+libc.Int32FromInt32(1)+libc.Int32FromInt32(2))/libc.Int32FromInt32(2))))
if pNew == uintptr(0) {
(*TFts5Parse)(unsafe.Pointer(pParse)).Frc = int32(SQLITE_NOMEM)
} else {
@@ -204790,7 +205265,7 @@ func _sqlite3Fts5ParseColsetInvert(tls *libc.TLS, pParse uintptr, p uintptr) (r
var pRet, v3 uintptr
_, _, _, _, _, _ = i, iOld, nCol, pRet, v2, v3
nCol = (*TFts5Config)(unsafe.Pointer((*TFts5Parse)(unsafe.Pointer(pParse)).FpConfig)).FnCol
- pRet = _sqlite3Fts5MallocZero(tls, pParse+8, libc.Int64FromUint32(uint32(8)+uint32(4)*libc.Uint32FromInt32(nCol)))
+ pRet = _sqlite3Fts5MallocZero(tls, pParse+8, libc.Int64FromUint32(libc.Uint32FromInt64(8)*libc.Uint32FromInt32((nCol+libc.Int32FromInt32(1)+libc.Int32FromInt32(2))/libc.Int32FromInt32(2))))
if pRet != 0 {
iOld = 0
i = 0
@@ -204841,7 +205316,7 @@ func _sqlite3Fts5ParseColset(tls *libc.TLS, pParse uintptr, pColset uintptr, p u
iCol++
}
if iCol == (*TFts5Config)(unsafe.Pointer(pConfig)).FnCol {
- _sqlite3Fts5ParseError(tls, pParse, __ccgo_ts+21237, libc.VaList(bp+8, z))
+ _sqlite3Fts5ParseError(tls, pParse, __ccgo_ts+21309, libc.VaList(bp+8, z))
} else {
pRet = _fts5ParseColset(tls, pParse, pColset, iCol)
}
@@ -204868,7 +205343,7 @@ func _fts5CloneColset(tls *libc.TLS, pRc uintptr, pOrig uintptr) (r uintptr) {
var pRet uintptr
_, _ = nByte, pRet
if pOrig != 0 {
- nByte = libc.Int64FromUint32(uint32(8) + libc.Uint32FromInt32((*TFts5Colset)(unsafe.Pointer(pOrig)).FnCol-libc.Int32FromInt32(1))*uint32(4))
+ nByte = libc.Int64FromUint32(libc.Uint32FromInt64(8) * libc.Uint32FromInt32(((*TFts5Colset)(unsafe.Pointer(pOrig)).FnCol+libc.Int32FromInt32(2))/libc.Int32FromInt32(2)))
pRet = _sqlite3Fts5MallocZero(tls, pRc, nByte)
if pRet != 0 {
libc.Xmemcpy(tls, pRet, pOrig, libc.Uint32FromInt64(nByte))
@@ -204965,7 +205440,7 @@ func _sqlite3Fts5ParseSetColset(tls *libc.TLS, pParse uintptr, pExpr uintptr, pC
var _ /* pFree at bp+0 */ uintptr
*(*uintptr)(unsafe.Pointer(bp)) = pColset
if (*TFts5Config)(unsafe.Pointer((*TFts5Parse)(unsafe.Pointer(pParse)).FpConfig)).FeDetail == int32(FTS5_DETAIL_NONE) {
- _sqlite3Fts5ParseError(tls, pParse, __ccgo_ts+36545, 0)
+ _sqlite3Fts5ParseError(tls, pParse, __ccgo_ts+36652, 0)
} else {
_fts5ParseSetColset(tls, pParse, pExpr, pColset, bp)
}
@@ -205050,7 +205525,7 @@ func _fts5ParsePhraseToAnd(tls *libc.TLS, pParse uintptr, pNear uintptr) (r uint
var p, pPhrase, pRet, pTo, v3 uintptr
_, _, _, _, _, _, _, _, _ = ii, nByte, nTerm, p, pPhrase, pRet, pTo, v2, v3
nTerm = (*TFts5ExprPhrase)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(pNear + 12)))).FnTerm
- nByte = libc.Int32FromUint32(uint32(40) + libc.Uint32FromInt32(nTerm)*uint32(4))
+ nByte = libc.Int32FromUint32(uint32(libc.UintptrFromInt32(0)+36) + libc.Uint32FromInt32(nTerm+libc.Int32FromInt32(1))*libc.Uint32FromInt64(4))
pRet = _sqlite3Fts5MallocZero(tls, pParse+8, int64(nByte))
if pRet != 0 {
(*TFts5ExprNode)(unsafe.Pointer(pRet)).FeType = int32(FTS5_AND)
@@ -205063,7 +205538,7 @@ func _fts5ParsePhraseToAnd(tls *libc.TLS, pParse uintptr, pNear uintptr) (r uint
if !(ii < nTerm) {
break
}
- pPhrase = _sqlite3Fts5MallocZero(tls, pParse+8, int64(44))
+ pPhrase = _sqlite3Fts5MallocZero(tls, pParse+8, libc.Int64FromUint32(uint32(libc.UintptrFromInt32(0)+20)+libc.Uint32FromInt32(libc.Int32FromInt32(1))*libc.Uint32FromInt64(24)))
if pPhrase != 0 {
if _parseGrowPhraseArray(tls, pParse) != 0 {
_fts5ExprPhraseFree(tls, pPhrase)
@@ -205137,7 +205612,7 @@ func _sqlite3Fts5ParseNode(tls *libc.TLS, pParse uintptr, eType int32, pLeft uin
}
}
}
- nByte = libc.Int64FromUint32(uint32(40) + uint32(4)*libc.Uint32FromInt32(nChild-libc.Int32FromInt32(1)))
+ nByte = libc.Int64FromUint32(uint32(libc.UintptrFromInt32(0)+36) + libc.Uint32FromInt32(nChild)*libc.Uint32FromInt64(4))
pRet = _sqlite3Fts5MallocZero(tls, pParse+8, nByte)
if pRet != 0 {
(*TFts5ExprNode)(unsafe.Pointer(pRet)).FeType = eType
@@ -205163,11 +205638,11 @@ func _sqlite3Fts5ParseNode(tls *libc.TLS, pParse uintptr, eType int32, pLeft uin
pPhrase = *(*uintptr)(unsafe.Pointer(pNear + 12))
if (*TFts5ExprNearset)(unsafe.Pointer(pNear)).FnPhrase != int32(1) || (*TFts5ExprPhrase)(unsafe.Pointer(pPhrase)).FnTerm > int32(1) || (*TFts5ExprPhrase)(unsafe.Pointer(pPhrase)).FnTerm > 0 && (*(*TFts5ExprTerm)(unsafe.Pointer(pPhrase + 20))).FbFirst != 0 {
if (*TFts5ExprNearset)(unsafe.Pointer(pNear)).FnPhrase == int32(1) {
- v2 = __ccgo_ts + 36598
+ v2 = __ccgo_ts + 36705
} else {
- v2 = __ccgo_ts + 36511
+ v2 = __ccgo_ts + 36618
}
- _sqlite3Fts5ParseError(tls, pParse, __ccgo_ts+36605, libc.VaList(bp+8, v2))
+ _sqlite3Fts5ParseError(tls, pParse, __ccgo_ts+36712, libc.VaList(bp+8, v2))
_sqlite3Fts5ParseNodeFree(tls, pRet)
pRet = uintptr(0)
pNear = uintptr(0)
@@ -205180,7 +205655,7 @@ func _sqlite3Fts5ParseNode(tls *libc.TLS, pParse uintptr, eType int32, pLeft uin
pRight = v3
pLeft = v3
if (*TFts5ExprNode)(unsafe.Pointer(pRet)).FiHeight > int32(SQLITE_FTS5_MAX_EXPR_DEPTH) {
- _sqlite3Fts5ParseError(tls, pParse, __ccgo_ts+36655, libc.VaList(bp+8, int32(SQLITE_FTS5_MAX_EXPR_DEPTH)))
+ _sqlite3Fts5ParseError(tls, pParse, __ccgo_ts+36762, libc.VaList(bp+8, int32(SQLITE_FTS5_MAX_EXPR_DEPTH)))
_sqlite3Fts5ParseNodeFree(tls, pRet)
pRet = uintptr(0)
}
@@ -205657,7 +206132,7 @@ func _sqlite3Fts5ExprInstToken(tls *libc.TLS, pExpr uintptr, iRowid Ti64, iPhras
// C documentation
//
// /*
-// ** Clear the token mappings for all Fts5IndexIter objects mannaged by
+// ** Clear the token mappings for all Fts5IndexIter objects managed by
// ** the expression passed as the only argument.
// */
func _sqlite3Fts5ExprClearTokens(tls *libc.TLS, pExpr uintptr) {
@@ -205721,7 +206196,7 @@ type Fts5HashEntry = TFts5HashEntry
/*
** This file contains the implementation of an in-memory hash table used
-** to accumuluate "term -> doclist" content before it is flused to a level-0
+** to accumulate "term -> doclist" content before it is flushed to a level-0
** segment.
*/
@@ -205780,7 +206255,7 @@ type TFts5HashEntry1 = struct {
type Fts5HashEntry1 = TFts5HashEntry1
/*
-** Eqivalent to:
+** Equivalent to:
**
** char *fts5EntryKey(Fts5HashEntry *pEntry){ return zKey; }
*/
@@ -206664,7 +207139,6 @@ type Fts5Data = TFts5Data
type TFts5DlidxIter = struct {
FnLvl int32
FiSegid int32
- FaLvl [1]TFts5DlidxLvl
}
type Fts5DlidxIter = TFts5DlidxIter
@@ -206701,7 +207175,6 @@ type TFts5Iter = struct {
FbSkipEmpty Tu8
FiSwitchRowid Ti64
FaFirst uintptr
- FaSeg [1]TFts5SegIter
}
type Fts5Iter = TFts5Iter
@@ -206774,7 +207247,6 @@ type TFts5Structure = struct {
FnOriginCntr Tu64
FnSegment int32
FnLevel int32
- FaLevel [1]TFts5StructureLevel
}
type Fts5Structure = TFts5Structure
@@ -206809,7 +207281,6 @@ type TFts5TokenDataIter = struct {
FnIterAlloc int32
FaPoslistReader uintptr
FaPoslistToIter uintptr
- FapIter [1]uintptr
}
type Fts5TokenDataIter = TFts5TokenDataIter
@@ -206824,9 +207295,8 @@ type TFts5TokenDataMap = struct {
type Fts5TokenDataMap = TFts5TokenDataMap
type TFts5TombstoneArray = struct {
- FnRef int32
- FnTombstone int32
- FapTombstone [1]uintptr
+ FnRef int32
+ FnTombstone int32
}
type Fts5TombstoneArray = TFts5TombstoneArray
@@ -206923,11 +207393,12 @@ type TFts5Structure1 = struct {
FnOriginCntr Tu64
FnSegment int32
FnLevel int32
- FaLevel [1]TFts5StructureLevel
}
type Fts5Structure1 = TFts5Structure1
+/* Size (in bytes) of an Fts5Structure object holding up to N levels */
+
/*
** An object of type Fts5SegWriter is used to write to segments.
*/
@@ -207060,13 +207531,14 @@ type Fts5SegIter1 = TFts5SegIter1
** Array of tombstone pages. Reference counted.
*/
type TFts5TombstoneArray1 = struct {
- FnRef int32
- FnTombstone int32
- FapTombstone [1]uintptr
+ FnRef int32
+ FnTombstone int32
}
type Fts5TombstoneArray1 = TFts5TombstoneArray1
+/* Size (in bytes) of an Fts5TombstoneArray holding up to N tombstones */
+
/*
** Argument is a pointer to an Fts5Data structure that contains a
** leaf page.
@@ -207119,11 +207591,12 @@ type TFts5Iter1 = struct {
FbSkipEmpty Tu8
FiSwitchRowid Ti64
FaFirst uintptr
- FaSeg [1]TFts5SegIter
}
type Fts5Iter1 = TFts5Iter1
+/* Size (in bytes) of an Fts5Iter object holding up to N segment iterators */
+
/*
** An instance of the following type is used to iterate through the contents
** of a doclist-index record.
@@ -207151,11 +207624,12 @@ type Fts5DlidxLvl1 = TFts5DlidxLvl1
type TFts5DlidxIter1 = struct {
FnLvl int32
FiSegid int32
- FaLvl [1]TFts5DlidxLvl
}
type Fts5DlidxIter1 = TFts5DlidxIter1
+/* Size (in bytes) of an Fts5DlidxIter object with up to N levels */
+
func _fts5PutU16(tls *libc.TLS, aOut uintptr, iVal Tu16) {
*(*Tu8)(unsafe.Pointer(aOut)) = libc.Uint8FromInt32(libc.Int32FromUint16(iVal) >> libc.Int32FromInt32(8))
*(*Tu8)(unsafe.Pointer(aOut + 1)) = libc.Uint8FromInt32(libc.Int32FromUint16(iVal) & libc.Int32FromInt32(0xFF))
@@ -207334,7 +207808,7 @@ func _fts5DataRead(tls *libc.TLS, p uintptr, iRowid Ti64) (r uintptr) {
** to the requested entry. */
if (*TFts5Index)(unsafe.Pointer(p)).FpReader == uintptr(0) && rc == SQLITE_OK {
pConfig = (*TFts5Index)(unsafe.Pointer(p)).FpConfig
- rc = Xsqlite3_blob_open(tls, (*TFts5Config)(unsafe.Pointer(pConfig)).Fdb, (*TFts5Config)(unsafe.Pointer(pConfig)).FzDb, (*TFts5Index)(unsafe.Pointer(p)).FzDataTbl, __ccgo_ts+36708, iRowid, 0, p+48)
+ rc = Xsqlite3_blob_open(tls, (*TFts5Config)(unsafe.Pointer(pConfig)).Fdb, (*TFts5Config)(unsafe.Pointer(pConfig)).FzDb, (*TFts5Index)(unsafe.Pointer(p)).FzDataTbl, __ccgo_ts+36815, iRowid, 0, p+48)
}
/* If either of the sqlite3_blob_open() or sqlite3_blob_reopen() calls
** above returned SQLITE_ERROR, return SQLITE_CORRUPT_VTAB instead.
@@ -207439,7 +207913,7 @@ func _fts5DataWrite(tls *libc.TLS, p uintptr, iRowid Ti64, pData uintptr, nData
}
if (*TFts5Index)(unsafe.Pointer(p)).FpWriter == uintptr(0) {
pConfig = (*TFts5Index)(unsafe.Pointer(p)).FpConfig
- _fts5IndexPrepareStmt(tls, p, p+52, Xsqlite3_mprintf(tls, __ccgo_ts+36714, libc.VaList(bp+8, (*TFts5Config)(unsafe.Pointer(pConfig)).FzDb, (*TFts5Config)(unsafe.Pointer(pConfig)).FzName)))
+ _fts5IndexPrepareStmt(tls, p, p+52, Xsqlite3_mprintf(tls, __ccgo_ts+36821, libc.VaList(bp+8, (*TFts5Config)(unsafe.Pointer(pConfig)).FzDb, (*TFts5Config)(unsafe.Pointer(pConfig)).FzName)))
if (*TFts5Index)(unsafe.Pointer(p)).Frc != 0 {
return
}
@@ -207468,7 +207942,7 @@ func _fts5DataDelete(tls *libc.TLS, p uintptr, iFirst Ti64, iLast Ti64) {
}
if (*TFts5Index)(unsafe.Pointer(p)).FpDeleter == uintptr(0) {
pConfig = (*TFts5Index)(unsafe.Pointer(p)).FpConfig
- zSql = Xsqlite3_mprintf(tls, __ccgo_ts+36765, libc.VaList(bp+8, (*TFts5Config)(unsafe.Pointer(pConfig)).FzDb, (*TFts5Config)(unsafe.Pointer(pConfig)).FzName))
+ zSql = Xsqlite3_mprintf(tls, __ccgo_ts+36872, libc.VaList(bp+8, (*TFts5Config)(unsafe.Pointer(pConfig)).FzDb, (*TFts5Config)(unsafe.Pointer(pConfig)).FzName))
if _fts5IndexPrepareStmt(tls, p, p+56, zSql) != 0 {
return
}
@@ -207502,7 +207976,7 @@ func _fts5DataRemoveSegment(tls *libc.TLS, p uintptr, pSeg uintptr) {
}
if (*TFts5Index)(unsafe.Pointer(p)).FpIdxDeleter == uintptr(0) {
pConfig = (*TFts5Index)(unsafe.Pointer(p)).FpConfig
- _fts5IndexPrepareStmt(tls, p, p+64, Xsqlite3_mprintf(tls, __ccgo_ts+36814, libc.VaList(bp+8, (*TFts5Config)(unsafe.Pointer(pConfig)).FzDb, (*TFts5Config)(unsafe.Pointer(pConfig)).FzName)))
+ _fts5IndexPrepareStmt(tls, p, p+64, Xsqlite3_mprintf(tls, __ccgo_ts+36921, libc.VaList(bp+8, (*TFts5Config)(unsafe.Pointer(pConfig)).FzDb, (*TFts5Config)(unsafe.Pointer(pConfig)).FzName)))
}
if (*TFts5Index)(unsafe.Pointer(p)).Frc == SQLITE_OK {
Xsqlite3_bind_int(tls, (*TFts5Index)(unsafe.Pointer(p)).FpIdxDeleter, int32(1), iSegid)
@@ -207580,7 +208054,7 @@ func _fts5StructureMakeWritable(tls *libc.TLS, pRc uintptr, pp uintptr) {
_, _, _, _, _ = i, nByte, p, pLvl, pNew
p = *(*uintptr)(unsafe.Pointer(pp))
if *(*int32)(unsafe.Pointer(pRc)) == SQLITE_OK && (*TFts5Structure)(unsafe.Pointer(p)).FnRef > int32(1) {
- nByte = libc.Int64FromUint32(uint32(40) + libc.Uint32FromInt32((*TFts5Structure)(unsafe.Pointer(p)).FnLevel-libc.Int32FromInt32(1))*uint32(12))
+ nByte = libc.Int64FromUint32(uint32(libc.UintptrFromInt32(0)+28) + libc.Uint32FromInt32((*TFts5Structure)(unsafe.Pointer(p)).FnLevel)*libc.Uint32FromInt64(12))
pNew = _sqlite3Fts5MallocZero(tls, pRc, nByte)
if pNew != 0 {
libc.Xmemcpy(tls, pNew, p, libc.Uint32FromInt64(nByte))
@@ -207671,7 +208145,7 @@ func _fts5StructureDecode(tls *libc.TLS, pData uintptr, nData int32, piCookie ui
}
i = int32(4)
/* Check if this is a V2 structure record. Set bStructureV2 if it is. */
- if 0 == libc.Xmemcmp(tls, pData+uintptr(i), __ccgo_ts+36854, uint32(4)) {
+ if 0 == libc.Xmemcmp(tls, pData+uintptr(i), __ccgo_ts+36961, uint32(4)) {
i += int32(4)
bStructureV2 = int32(1)
}
@@ -207682,7 +208156,7 @@ func _fts5StructureDecode(tls *libc.TLS, pData uintptr, nData int32, piCookie ui
if *(*int32)(unsafe.Pointer(bp + 4)) > int32(FTS5_MAX_SEGMENT) || *(*int32)(unsafe.Pointer(bp + 4)) < 0 || *(*int32)(unsafe.Pointer(bp + 8)) > int32(FTS5_MAX_SEGMENT) || *(*int32)(unsafe.Pointer(bp + 8)) < 0 {
return libc.Int32FromInt32(SQLITE_CORRUPT) | libc.Int32FromInt32(1)<<libc.Int32FromInt32(8)
}
- nByte = libc.Int64FromUint32(libc.Uint32FromInt64(40) + libc.Uint32FromInt64(12)*libc.Uint32FromInt32(*(*int32)(unsafe.Pointer(bp + 4))-libc.Int32FromInt32(1)))
+ nByte = libc.Int64FromUint32(uint32(libc.UintptrFromInt32(0)+28) + libc.Uint32FromInt32(*(*int32)(unsafe.Pointer(bp + 4)))*libc.Uint32FromInt64(12))
pRet = _sqlite3Fts5MallocZero(tls, bp, nByte)
if pRet != 0 {
(*TFts5Structure)(unsafe.Pointer(pRet)).FnRef = int32(1)
@@ -207786,7 +208260,7 @@ func _fts5StructureAddLevel(tls *libc.TLS, pRc uintptr, ppStruct uintptr) {
if *(*int32)(unsafe.Pointer(pRc)) == SQLITE_OK {
pStruct = *(*uintptr)(unsafe.Pointer(ppStruct))
nLevel = (*TFts5Structure)(unsafe.Pointer(pStruct)).FnLevel
- nByte = libc.Int64FromUint32(libc.Uint32FromInt64(40) + libc.Uint32FromInt64(12)*libc.Uint32FromInt32(nLevel+libc.Int32FromInt32(1)))
+ nByte = libc.Int64FromUint32(uint32(libc.UintptrFromInt32(0)+28) + libc.Uint32FromInt32(nLevel+libc.Int32FromInt32(2))*libc.Uint32FromInt64(12))
pStruct = Xsqlite3_realloc64(tls, pStruct, libc.Uint64FromInt64(nByte))
if pStruct != 0 {
libc.Xmemset(tls, pStruct+28+uintptr(nLevel)*12, 0, uint32(12))
@@ -207862,7 +208336,7 @@ func _fts5IndexDataVersion(tls *libc.TLS, p uintptr) (r Ti64) {
iVersion = 0
if (*TFts5Index)(unsafe.Pointer(p)).Frc == SQLITE_OK {
if (*TFts5Index)(unsafe.Pointer(p)).FpDataVersion == uintptr(0) {
- (*TFts5Index)(unsafe.Pointer(p)).Frc = _fts5IndexPrepareStmt(tls, p, p+84, Xsqlite3_mprintf(tls, __ccgo_ts+36859, libc.VaList(bp+8, (*TFts5Config)(unsafe.Pointer((*TFts5Index)(unsafe.Pointer(p)).FpConfig)).FzDb)))
+ (*TFts5Index)(unsafe.Pointer(p)).Frc = _fts5IndexPrepareStmt(tls, p, p+84, Xsqlite3_mprintf(tls, __ccgo_ts+36966, libc.VaList(bp+8, (*TFts5Config)(unsafe.Pointer((*TFts5Index)(unsafe.Pointer(p)).FpConfig)).FzDb)))
if (*TFts5Index)(unsafe.Pointer(p)).Frc != 0 {
return 0
}
@@ -207946,7 +208420,7 @@ func _fts5StructureWrite(tls *libc.TLS, p uintptr, pStruct uintptr) {
_sqlite3Fts5Put32(tls, (*(*TFts5Buffer)(unsafe.Pointer(bp))).Fp, iCookie)
(*(*TFts5Buffer)(unsafe.Pointer(bp))).Fn = int32(4)
if (*TFts5Structure)(unsafe.Pointer(pStruct)).FnOriginCntr > uint64(0) {
- libc.Xmemcpy(tls, (*TFts5Buffer)(unsafe.Pointer(bp)).Fp+uintptr((*TFts5Buffer)(unsafe.Pointer(bp)).Fn), __ccgo_ts+36854, uint32(4))
+ libc.Xmemcpy(tls, (*TFts5Buffer)(unsafe.Pointer(bp)).Fp+uintptr((*TFts5Buffer)(unsafe.Pointer(bp)).Fn), __ccgo_ts+36961, uint32(4))
*(*int32)(unsafe.Pointer(bp + 4)) += int32(4)
}
*(*int32)(unsafe.Pointer(bp + 4)) += _sqlite3Fts5PutVarint(tls, (*TFts5Buffer)(unsafe.Pointer(bp)).Fp+uintptr((*TFts5Buffer)(unsafe.Pointer(bp)).Fn), libc.Uint64FromInt32((*TFts5Structure)(unsafe.Pointer(pStruct)).FnLevel))
@@ -208363,7 +208837,7 @@ func _fts5DlidxIterInit(tls *libc.TLS, p uintptr, bRev int32, iSegid int32, iLea
if !((*TFts5Index)(unsafe.Pointer(p)).Frc == SQLITE_OK && bDone == 0) {
break
}
- nByte = libc.Int64FromUint32(uint32(36) + libc.Uint32FromInt32(i)*uint32(28))
+ nByte = libc.Int64FromUint32(uint32(libc.UintptrFromInt32(0)+8) + libc.Uint32FromInt32(i+libc.Int32FromInt32(1))*libc.Uint32FromInt64(28))
pNew = Xsqlite3_realloc64(tls, pIter, libc.Uint64FromInt64(nByte))
if pNew == uintptr(0) {
(*TFts5Index)(unsafe.Pointer(p)).Frc = int32(SQLITE_NOMEM)
@@ -208613,7 +209087,7 @@ func _fts5SegIterAllocTombstone(tls *libc.TLS, p uintptr, pIter uintptr) {
_, _, _ = nByte, nTomb, pNew
nTomb = (*TFts5StructureSegment)(unsafe.Pointer((*TFts5SegIter)(unsafe.Pointer(pIter)).FpSeg)).FnPgTombstone
if nTomb > 0 {
- nByte = libc.Int32FromUint32(libc.Uint32FromInt32(nTomb)*uint32(4) + uint32(12))
+ nByte = libc.Int32FromUint32(uint32(libc.UintptrFromInt32(0)+8) + libc.Uint32FromInt32(nTomb+libc.Int32FromInt32(1))*libc.Uint32FromInt64(4))
pNew = _sqlite3Fts5MallocZero(tls, p+40, int64(nByte))
if pNew != 0 {
(*TFts5TombstoneArray)(unsafe.Pointer(pNew)).FnTombstone = nTomb
@@ -209323,7 +209797,7 @@ func _fts5IdxSelectStmt(tls *libc.TLS, p uintptr) (r uintptr) {
_ = pConfig
if (*TFts5Index)(unsafe.Pointer(p)).FpIdxSelect == uintptr(0) {
pConfig = (*TFts5Index)(unsafe.Pointer(p)).FpConfig
- _fts5IndexPrepareStmt(tls, p, p+68, Xsqlite3_mprintf(tls, __ccgo_ts+36882, libc.VaList(bp+8, (*TFts5Config)(unsafe.Pointer(pConfig)).FzDb, (*TFts5Config)(unsafe.Pointer(pConfig)).FzName)))
+ _fts5IndexPrepareStmt(tls, p, p+68, Xsqlite3_mprintf(tls, __ccgo_ts+36989, libc.VaList(bp+8, (*TFts5Config)(unsafe.Pointer(pConfig)).FzDb, (*TFts5Config)(unsafe.Pointer(pConfig)).FzName)))
}
return (*TFts5Index)(unsafe.Pointer(p)).FpIdxSelect
}
@@ -209412,7 +209886,7 @@ func _fts5IdxNextStmt(tls *libc.TLS, p uintptr) (r uintptr) {
_ = pConfig
if (*TFts5Index)(unsafe.Pointer(p)).FpIdxNextSelect == uintptr(0) {
pConfig = (*TFts5Index)(unsafe.Pointer(p)).FpConfig
- _fts5IndexPrepareStmt(tls, p, p+72, Xsqlite3_mprintf(tls, __ccgo_ts+36966, libc.VaList(bp+8, (*TFts5Config)(unsafe.Pointer(pConfig)).FzDb, (*TFts5Config)(unsafe.Pointer(pConfig)).FzName)))
+ _fts5IndexPrepareStmt(tls, p, p+72, Xsqlite3_mprintf(tls, __ccgo_ts+37073, libc.VaList(bp+8, (*TFts5Config)(unsafe.Pointer(pConfig)).FzDb, (*TFts5Config)(unsafe.Pointer(pConfig)).FzName)))
}
return (*TFts5Index)(unsafe.Pointer(p)).FpIdxNextSelect
}
@@ -210059,7 +210533,7 @@ func _fts5MultiIterAlloc(tls *libc.TLS, p uintptr, nSeg int32) (r uintptr) {
;
nSlot = nSlot * int64(2)
}
- pNew = _fts5IdxMalloc(tls, p, int64(168)+int64(96)*(nSlot-int64(1))+int64(4)*nSlot)
+ pNew = _fts5IdxMalloc(tls, p, libc.Int64FromUint32(uint32(libc.UintptrFromInt32(0)+72))+nSlot*int64(96)+int64(4)*nSlot)
if pNew != 0 {
(*TFts5Iter)(unsafe.Pointer(pNew)).FnSeg = int32(nSlot)
(*TFts5Iter)(unsafe.Pointer(pNew)).FaFirst = pNew + 72 + uintptr(nSlot)*96
@@ -211382,7 +211856,7 @@ func _fts5WriteInit(tls *libc.TLS, p uintptr, pWriter uintptr, iSegid int32) {
_sqlite3Fts5BufferSize(tls, p+40, pWriter+4+8, libc.Uint32FromInt32(nBuffer))
if (*TFts5Index)(unsafe.Pointer(p)).FpIdxWriter == uintptr(0) {
pConfig = (*TFts5Index)(unsafe.Pointer(p)).FpConfig
- _fts5IndexPrepareStmt(tls, p, p+60, Xsqlite3_mprintf(tls, __ccgo_ts+37048, libc.VaList(bp+8, (*TFts5Config)(unsafe.Pointer(pConfig)).FzDb, (*TFts5Config)(unsafe.Pointer(pConfig)).FzName)))
+ _fts5IndexPrepareStmt(tls, p, p+60, Xsqlite3_mprintf(tls, __ccgo_ts+37155, libc.VaList(bp+8, (*TFts5Config)(unsafe.Pointer(pConfig)).FzDb, (*TFts5Config)(unsafe.Pointer(pConfig)).FzName)))
}
if (*TFts5Index)(unsafe.Pointer(p)).Frc == SQLITE_OK {
/* Initialize the 4-byte leaf-page header to 0x00. */
@@ -211888,7 +212362,7 @@ func _fts5SecureDeleteIdxEntry(tls *libc.TLS, p uintptr, iSegid int32, iPgno int
defer tls.Free(32)
if iPgno != int32(1) {
if (*TFts5Index)(unsafe.Pointer(p)).FpDeleteFromIdx == uintptr(0) {
- _fts5IndexPrepareStmt(tls, p, p+80, Xsqlite3_mprintf(tls, __ccgo_ts+37105, libc.VaList(bp+8, (*TFts5Config)(unsafe.Pointer((*TFts5Index)(unsafe.Pointer(p)).FpConfig)).FzDb, (*TFts5Config)(unsafe.Pointer((*TFts5Index)(unsafe.Pointer(p)).FpConfig)).FzName)))
+ _fts5IndexPrepareStmt(tls, p, p+80, Xsqlite3_mprintf(tls, __ccgo_ts+37212, libc.VaList(bp+8, (*TFts5Config)(unsafe.Pointer((*TFts5Index)(unsafe.Pointer(p)).FpConfig)).FzDb, (*TFts5Config)(unsafe.Pointer((*TFts5Index)(unsafe.Pointer(p)).FpConfig)).FzName)))
}
if (*TFts5Index)(unsafe.Pointer(p)).Frc == SQLITE_OK {
Xsqlite3_bind_int(tls, (*TFts5Index)(unsafe.Pointer(p)).FpDeleteFromIdx, int32(1), iSegid)
@@ -212057,7 +212531,7 @@ func _fts5DoSecureDelete(tls *libc.TLS, p uintptr, pSeg uintptr) {
iStart = 0
iDelKeyOff = 0 /* Offset of deleted key, if any */
nIdx = nPg - iPgIdx
- aIdx = _sqlite3Fts5MallocZero(tls, p+40, int64(nIdx+int32(16)))
+ aIdx = _sqlite3Fts5MallocZero(tls, p+40, int64(nIdx)+int64(16))
if (*TFts5Index)(unsafe.Pointer(p)).Frc != 0 {
return
}
@@ -212375,7 +212849,7 @@ func _fts5FlushSecureDelete(tls *libc.TLS, p uintptr, pStruct uintptr, zTerm uin
if (*TFts5Config)(unsafe.Pointer((*TFts5Index)(unsafe.Pointer(p)).FpConfig)).FiVersion != int32(FTS5_CURRENT_VERSION_SECUREDELETE) {
pConfig = (*TFts5Index)(unsafe.Pointer(p)).FpConfig
*(*uintptr)(unsafe.Pointer(bp + 4)) = uintptr(0)
- _fts5IndexPrepareStmt(tls, p, bp+4, Xsqlite3_mprintf(tls, __ccgo_ts+37166, libc.VaList(bp+16, (*TFts5Config)(unsafe.Pointer(pConfig)).FzDb, (*TFts5Config)(unsafe.Pointer(pConfig)).FzName, int32(FTS5_CURRENT_VERSION_SECUREDELETE))))
+ _fts5IndexPrepareStmt(tls, p, bp+4, Xsqlite3_mprintf(tls, __ccgo_ts+37273, libc.VaList(bp+16, (*TFts5Config)(unsafe.Pointer(pConfig)).FzDb, (*TFts5Config)(unsafe.Pointer(pConfig)).FzName, int32(FTS5_CURRENT_VERSION_SECUREDELETE))))
if (*TFts5Index)(unsafe.Pointer(p)).Frc == SQLITE_OK {
Xsqlite3_step(tls, *(*uintptr)(unsafe.Pointer(bp + 4)))
rc = Xsqlite3_finalize(tls, *(*uintptr)(unsafe.Pointer(bp + 4)))
@@ -212650,7 +213124,7 @@ func _fts5IndexOptimizeStruct(tls *libc.TLS, p uintptr, pStruct uintptr) (r uint
var pLvl, pNew uintptr
_, _, _, _, _, _, _, _, _, _, _, _ = i, iLvl, iSeg, iSegOut, nByte, nMerge, nSeg, nThis, pLvl, pNew, v2, v5
pNew = uintptr(0)
- nByte = int64(40)
+ nByte = libc.Int64FromUint32(uint32(libc.UintptrFromInt32(0)+28) + libc.Uint32FromInt32(libc.Int32FromInt32(1))*libc.Uint32FromInt64(12))
nSeg = (*TFts5Structure)(unsafe.Pointer(pStruct)).FnSegment
/* Figure out if this structure requires optimization. A structure does
** not require optimization if either:
@@ -212685,7 +213159,7 @@ func _fts5IndexOptimizeStruct(tls *libc.TLS, p uintptr, pStruct uintptr) (r uint
;
i++
}
- nByte += libc.Int64FromUint32(libc.Uint32FromInt32((*TFts5Structure)(unsafe.Pointer(pStruct)).FnLevel+libc.Int32FromInt32(1)) * uint32(12))
+ nByte += (int64((*TFts5Structure)(unsafe.Pointer(pStruct)).FnLevel) + int64(1)) * int64(12)
pNew = _sqlite3Fts5MallocZero(tls, p+40, nByte)
if pNew != 0 {
nByte = libc.Int64FromUint32(libc.Uint32FromInt32(nSeg) * uint32(48))
@@ -213299,11 +213773,12 @@ type TFts5TokenDataIter1 = struct {
FnIterAlloc int32
FaPoslistReader uintptr
FaPoslistToIter uintptr
- FapIter [1]uintptr
}
type Fts5TokenDataIter1 = TFts5TokenDataIter1
+/* Size in bytes of an Fts5TokenDataIter object holding up to N iterators */
+
// C documentation
//
// /*
@@ -213371,7 +213846,7 @@ func _fts5TokendataIterAppendMap(tls *libc.TLS, p uintptr, pT uintptr, iIter int
// /*
// ** Sort the contents of the pT->aMap[] array.
// **
-// ** The sorting algorithm requries a malloc(). If this fails, an error code
+// ** The sorting algorithm requires a malloc(). If this fails, an error code
// ** is left in Fts5Index.rc before returning.
// */
func _fts5TokendataIterSortMap(tls *libc.TLS, p uintptr, pT uintptr) {
@@ -213615,7 +214090,7 @@ func _fts5SetupPrefixIter(tls *libc.TLS, p uintptr, bDesc int32, iIdx int32, pTo
(*(*TPrefixSetupCtx)(unsafe.Pointer(bp))).FnBuf = int32(32)
if iIdx == 0 && (*TFts5Config)(unsafe.Pointer((*TFts5Index)(unsafe.Pointer(p)).FpConfig)).FeDetail == FTS5_DETAIL_FULL && (*TFts5Config)(unsafe.Pointer((*TFts5Index)(unsafe.Pointer(p)).FpConfig)).FbPrefixInsttoken != 0 {
(*(*TPrefixSetupCtx)(unsafe.Pointer(bp))).FpTokendata = bp + 44
- (*(*TTokendataSetupCtx)(unsafe.Pointer(bp + 44))).FpT = _fts5IdxMalloc(tls, p, int64(44))
+ (*(*TTokendataSetupCtx)(unsafe.Pointer(bp + 44))).FpT = _fts5IdxMalloc(tls, p, libc.Int64FromUint32(uint32(libc.UintptrFromInt32(0)+40)+libc.Uint32FromInt32(libc.Int32FromInt32(1))*libc.Uint32FromInt64(72)))
}
if (*TFts5Config)(unsafe.Pointer((*TFts5Index)(unsafe.Pointer(p)).FpConfig)).FeDetail == int32(FTS5_DETAIL_NONE) {
(*(*TPrefixSetupCtx)(unsafe.Pointer(bp))).FxMerge = __ccgo_fp(_fts5MergeRowidLists)
@@ -213665,7 +214140,7 @@ func _fts5SetupPrefixIter(tls *libc.TLS, p uintptr, bDesc int32, iIdx int32, pTo
;
i += (*(*TPrefixSetupCtx)(unsafe.Pointer(bp))).FnMerge
}
- pData = _fts5IdxMalloc(tls, p, libc.Int64FromUint32(uint32(12)+libc.Uint32FromInt32((*(*TPrefixSetupCtx)(unsafe.Pointer(bp))).Fdoclist.Fn)+uint32(FTS5_DATA_ZERO_PADDING)))
+ pData = _fts5IdxMalloc(tls, p, int64(12)+int64((*(*TPrefixSetupCtx)(unsafe.Pointer(bp))).Fdoclist.Fn)+int64(FTS5_DATA_ZERO_PADDING))
if pData != 0 {
(*TFts5Data)(unsafe.Pointer(pData)).Fp = pData + 1*12
v3 = (*(*TPrefixSetupCtx)(unsafe.Pointer(bp))).Fdoclist.Fn
@@ -213747,15 +214222,18 @@ func _sqlite3Fts5IndexRollback(tls *libc.TLS, p uintptr) (r int32) {
func _sqlite3Fts5IndexReinit(tls *libc.TLS, p uintptr) (r int32) {
bp := tls.Alloc(48)
defer tls.Free(48)
- var _ /* s at bp+0 */ TFts5Structure
+ var pTmp uintptr
+ var _ /* tmpSpace at bp+0 */ [40]Tu8
+ _ = pTmp
_fts5StructureInvalidate(tls, p)
_fts5IndexDiscardData(tls, p)
- libc.Xmemset(tls, bp, 0, uint32(40))
+ pTmp = bp
+ libc.Xmemset(tls, pTmp, 0, uint32(libc.UintptrFromInt32(0)+28)+libc.Uint32FromInt32(libc.Int32FromInt32(1))*libc.Uint32FromInt64(12))
if (*TFts5Config)(unsafe.Pointer((*TFts5Index)(unsafe.Pointer(p)).FpConfig)).FbContentlessDelete != 0 {
- (*(*TFts5Structure)(unsafe.Pointer(bp))).FnOriginCntr = uint64(1)
+ (*TFts5Structure)(unsafe.Pointer(pTmp)).FnOriginCntr = uint64(1)
}
_fts5DataWrite(tls, p, int64(FTS5_AVERAGES_ROWID), __ccgo_ts+1667, 0)
- _fts5StructureWrite(tls, p, bp)
+ _fts5StructureWrite(tls, p, pTmp)
return _fts5IndexReturn(tls, p)
}
@@ -213781,11 +214259,11 @@ func _sqlite3Fts5IndexOpen(tls *libc.TLS, pConfig uintptr, bCreate int32, pp uin
if *(*int32)(unsafe.Pointer(bp)) == SQLITE_OK {
(*TFts5Index)(unsafe.Pointer(p)).FpConfig = pConfig
(*TFts5Index)(unsafe.Pointer(p)).FnWorkUnit = int32(FTS5_WORK_UNIT)
- (*TFts5Index)(unsafe.Pointer(p)).FzDataTbl = _sqlite3Fts5Mprintf(tls, bp, __ccgo_ts+37217, libc.VaList(bp+16, (*TFts5Config)(unsafe.Pointer(pConfig)).FzName))
+ (*TFts5Index)(unsafe.Pointer(p)).FzDataTbl = _sqlite3Fts5Mprintf(tls, bp, __ccgo_ts+37324, libc.VaList(bp+16, (*TFts5Config)(unsafe.Pointer(pConfig)).FzName))
if (*TFts5Index)(unsafe.Pointer(p)).FzDataTbl != 0 && bCreate != 0 {
- *(*int32)(unsafe.Pointer(bp)) = _sqlite3Fts5CreateTable(tls, pConfig, __ccgo_ts+26003, __ccgo_ts+37225, 0, pzErr)
+ *(*int32)(unsafe.Pointer(bp)) = _sqlite3Fts5CreateTable(tls, pConfig, __ccgo_ts+26058, __ccgo_ts+37332, 0, pzErr)
if *(*int32)(unsafe.Pointer(bp)) == SQLITE_OK {
- *(*int32)(unsafe.Pointer(bp)) = _sqlite3Fts5CreateTable(tls, pConfig, __ccgo_ts+11984, __ccgo_ts+37260, int32(1), pzErr)
+ *(*int32)(unsafe.Pointer(bp)) = _sqlite3Fts5CreateTable(tls, pConfig, __ccgo_ts+12009, __ccgo_ts+37367, int32(1), pzErr)
}
if *(*int32)(unsafe.Pointer(bp)) == SQLITE_OK {
*(*int32)(unsafe.Pointer(bp)) = _sqlite3Fts5IndexReinit(tls, p)
@@ -213983,7 +214461,7 @@ func _fts5AppendTokendataIter(tls *libc.TLS, p uintptr, pIn uintptr, pAppend uin
v1 = int32(16)
}
nAlloc = v1
- nByte = libc.Int32FromUint32(libc.Uint32FromInt32(nAlloc)*uint32(4) + uint32(44))
+ nByte = libc.Int32FromUint32(uint32(libc.UintptrFromInt32(0)+40) + libc.Uint32FromInt32(nAlloc+libc.Int32FromInt32(1))*libc.Uint32FromInt64(72))
pNew = Xsqlite3_realloc(tls, pIn, nByte)
if pNew == uintptr(0) {
(*TFts5Index)(unsafe.Pointer(p)).Frc = int32(SQLITE_NOMEM)
@@ -214238,7 +214716,7 @@ func _fts5SetupTokendataIter(tls *libc.TLS, p uintptr, pToken uintptr, nToken in
pNew = _fts5MultiIterAlloc(tls, p, (*TFts5Structure)(unsafe.Pointer(pStruct)).FnSegment)
if pSmall != 0 {
_sqlite3Fts5BufferSet(tls, p+40, bp, (*TFts5Buffer)(unsafe.Pointer(pSmall)).Fn, (*TFts5Buffer)(unsafe.Pointer(pSmall)).Fp)
- _sqlite3Fts5BufferAppendBlob(tls, p+40, bp, uint32(1), __ccgo_ts+37304)
+ _sqlite3Fts5BufferAppendBlob(tls, p+40, bp, uint32(1), __ccgo_ts+37411)
} else {
_sqlite3Fts5BufferSet(tls, p+40, bp, nToken, pToken)
}
@@ -214589,7 +215067,7 @@ func _fts5SetupPrefixIterTokendata(tls *libc.TLS, pIter uintptr, pToken uintptr,
if !(libc.Uint32FromInt32((*TFts5Buffer)(unsafe.Pointer(bp)).Fn)+libc.Uint32FromInt32(nToken+libc.Int32FromInt32(1)) <= libc.Uint32FromInt32((*TFts5Buffer)(unsafe.Pointer(bp)).FnSpace)) {
_sqlite3Fts5BufferSize(tls, p+40, bp, libc.Uint32FromInt32(nToken+int32(1)+(*TFts5Buffer)(unsafe.Pointer(bp)).Fn))
}
- (*(*TTokendataSetupCtx)(unsafe.Pointer(bp + 12))).FpT = _sqlite3Fts5MallocZero(tls, p+40, int64(44))
+ (*(*TTokendataSetupCtx)(unsafe.Pointer(bp + 12))).FpT = _sqlite3Fts5MallocZero(tls, p+40, libc.Int64FromUint32(uint32(libc.UintptrFromInt32(0)+40)+libc.Uint32FromInt32(libc.Int32FromInt32(1))*libc.Uint32FromInt64(72)))
if (*TFts5Index)(unsafe.Pointer(p)).Frc == SQLITE_OK {
/* Fill in the token prefix to search for */
*(*Tu8)(unsafe.Pointer((*(*TFts5Buffer)(unsafe.Pointer(bp))).Fp)) = uint8('0')
@@ -214711,7 +215189,7 @@ func _sqlite3Fts5IndexIterWriteTokendata(tls *libc.TLS, pIndexIter uintptr, pTok
if (*TFts5Iter)(unsafe.Pointer(pIter)).FnSeg > 0 {
/* This is a prefix term iterator. */
if pT == uintptr(0) {
- pT = _sqlite3Fts5MallocZero(tls, p+40, int64(44))
+ pT = _sqlite3Fts5MallocZero(tls, p+40, libc.Int64FromUint32(uint32(libc.UintptrFromInt32(0)+40)+libc.Uint32FromInt32(libc.Int32FromInt32(1))*libc.Uint32FromInt64(72)))
(*TFts5Iter)(unsafe.Pointer(pIter)).FpTokenDataIter = pT
}
if pT != 0 {
@@ -214831,7 +215309,7 @@ func _sqlite3Fts5IndexSetCookie(tls *libc.TLS, p uintptr, iNew int32) (r int32)
pConfig = (*TFts5Index)(unsafe.Pointer(p)).FpConfig /* Binary representation of iNew */
*(*uintptr)(unsafe.Pointer(bp + 4)) = uintptr(0)
_sqlite3Fts5Put32(tls, bp, iNew)
- rc = Xsqlite3_blob_open(tls, (*TFts5Config)(unsafe.Pointer(pConfig)).Fdb, (*TFts5Config)(unsafe.Pointer(pConfig)).FzDb, (*TFts5Index)(unsafe.Pointer(p)).FzDataTbl, __ccgo_ts+36708, int64(FTS5_STRUCTURE_ROWID), int32(1), bp+4)
+ rc = Xsqlite3_blob_open(tls, (*TFts5Config)(unsafe.Pointer(pConfig)).Fdb, (*TFts5Config)(unsafe.Pointer(pConfig)).FzDb, (*TFts5Index)(unsafe.Pointer(p)).FzDataTbl, __ccgo_ts+36815, int64(FTS5_STRUCTURE_ROWID), int32(1), bp+4)
if rc == SQLITE_OK {
Xsqlite3_blob_write(tls, *(*uintptr)(unsafe.Pointer(bp + 4)), bp, int32(4), 0)
rc = Xsqlite3_blob_close(tls, *(*uintptr)(unsafe.Pointer(bp + 4)))
@@ -215425,7 +215903,7 @@ func _fts5IndexIntegrityCheckSegment(tls *libc.TLS, p uintptr, pSeg uintptr) {
if (*TFts5StructureSegment)(unsafe.Pointer(pSeg)).FpgnoFirst == 0 {
return
}
- _fts5IndexPrepareStmt(tls, p, bp, Xsqlite3_mprintf(tls, __ccgo_ts+37306, libc.VaList(bp+24, (*TFts5Config)(unsafe.Pointer(pConfig)).FzDb, (*TFts5Config)(unsafe.Pointer(pConfig)).FzName, (*TFts5StructureSegment)(unsafe.Pointer(pSeg)).FiSegid)))
+ _fts5IndexPrepareStmt(tls, p, bp, Xsqlite3_mprintf(tls, __ccgo_ts+37413, libc.VaList(bp+24, (*TFts5Config)(unsafe.Pointer(pConfig)).FzDb, (*TFts5Config)(unsafe.Pointer(pConfig)).FzName, (*TFts5StructureSegment)(unsafe.Pointer(pSeg)).FiSegid)))
/* Iterate through the b-tree hierarchy. */
for (*TFts5Index)(unsafe.Pointer(p)).Frc == SQLITE_OK && int32(SQLITE_ROW) == Xsqlite3_step(tls, *(*uintptr)(unsafe.Pointer(bp))) { /* Data for this leaf */
zIdxTerm = Xsqlite3_column_blob(tls, *(*uintptr)(unsafe.Pointer(bp)), int32(1))
@@ -215656,7 +216134,7 @@ func _sqlite3Fts5IndexIntegrityCheck(tls *libc.TLS, p uintptr, cksum Tu64, bUseC
} else {
(*(*TFts5Buffer)(unsafe.Pointer(bp))).Fn = 0
_fts5SegiterPoslist(tls, p, *(*uintptr)(unsafe.Pointer(bp + 12))+72+uintptr((*(*TFts5CResult)(unsafe.Pointer((*TFts5Iter)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 12)))).FaFirst + 1*4))).FiFirst)*96, uintptr(0), bp)
- _sqlite3Fts5BufferAppendBlob(tls, p+40, bp, uint32(4), __ccgo_ts+37392)
+ _sqlite3Fts5BufferAppendBlob(tls, p+40, bp, uint32(4), __ccgo_ts+37499)
for 0 == _sqlite3Fts5PoslistNext64(tls, (*(*TFts5Buffer)(unsafe.Pointer(bp))).Fp, (*(*TFts5Buffer)(unsafe.Pointer(bp))).Fn, bp+32, bp+24) {
iCol = int32(*(*Ti64)(unsafe.Pointer(bp + 24)) >> libc.Int32FromInt32(32) & libc.Int64FromInt32(0x7FFFFFFF))
iTokOff = int32(*(*Ti64)(unsafe.Pointer(bp + 24)) & libc.Int64FromInt32(0x7FFFFFFF))
@@ -215795,7 +216273,6 @@ type TFts5Sorter = struct {
FiRowid Ti64
FaPoslist uintptr
FnIdx int32
- FaIdx [1]int32
}
type Fts5Sorter = TFts5Sorter
@@ -215952,11 +216429,12 @@ type TFts5Sorter1 = struct {
FiRowid Ti64
FaPoslist uintptr
FnIdx int32
- FaIdx [1]int32
}
type Fts5Sorter1 = TFts5Sorter1
+/* Size (int bytes) of an Fts5Sorter object with N indexes */
+
/*
** Virtual-table cursor object.
**
@@ -216278,7 +216756,7 @@ func _fts5BestIndexMethod(tls *libc.TLS, pVTab uintptr, pInfo uintptr) (r int32)
nSeenMatch = 0
bSeenRank = 0
if (*TFts5Config)(unsafe.Pointer(pConfig)).FbLock != 0 {
- (*TFts5Table)(unsafe.Pointer(pTab)).Fbase.FzErrMsg = Xsqlite3_mprintf(tls, __ccgo_ts+37397, 0)
+ (*TFts5Table)(unsafe.Pointer(pTab)).Fbase.FzErrMsg = Xsqlite3_mprintf(tls, __ccgo_ts+37504, 0)
return int32(SQLITE_ERROR)
}
idxStr = Xsqlite3_malloc(tls, (*Tsqlite3_index_info)(unsafe.Pointer(pInfo)).FnConstraint*int32(8)+int32(1))
@@ -216315,7 +216793,7 @@ func _fts5BestIndexMethod(tls *libc.TLS, pVTab uintptr, pInfo uintptr) (r int32)
v3 = iIdxStr
iIdxStr++
*(*int8)(unsafe.Pointer(idxStr + uintptr(v3))) = int8('M')
- Xsqlite3_snprintf(tls, int32(6), idxStr+uintptr(iIdxStr), __ccgo_ts+5207, libc.VaList(bp+8, iCol))
+ Xsqlite3_snprintf(tls, int32(6), idxStr+uintptr(iIdxStr), __ccgo_ts+5233, libc.VaList(bp+8, iCol))
idxStr += uintptr(libc.Xstrlen(tls, idxStr+uintptr(iIdxStr)))
}
iCons++
@@ -216334,7 +216812,7 @@ func _fts5BestIndexMethod(tls *libc.TLS, pVTab uintptr, pInfo uintptr) (r int32)
v6 = int32('G')
}
*(*int8)(unsafe.Pointer(idxStr + uintptr(v5))) = int8(v6)
- Xsqlite3_snprintf(tls, int32(6), idxStr+uintptr(iIdxStr), __ccgo_ts+5207, libc.VaList(bp+8, iCol))
+ Xsqlite3_snprintf(tls, int32(6), idxStr+uintptr(iIdxStr), __ccgo_ts+5233, libc.VaList(bp+8, iCol))
idxStr += uintptr(libc.Xstrlen(tls, idxStr+uintptr(iIdxStr)))
iCons++
v7 = iCons
@@ -216784,7 +217262,7 @@ func _fts5NextMethod(tls *libc.TLS, pCursor uintptr) (r int32) {
*(*int32)(unsafe.Pointer(pCsr + 56)) |= int32(FTS5CSR_EOF)
rc = Xsqlite3_reset(tls, (*TFts5Cursor)(unsafe.Pointer(pCsr)).FpStmt)
if rc != SQLITE_OK {
- (*Tsqlite3_vtab)(unsafe.Pointer((*Tsqlite3_vtab_cursor)(unsafe.Pointer(pCursor)).FpVtab)).FzErrMsg = Xsqlite3_mprintf(tls, __ccgo_ts+3864, libc.VaList(bp+16, Xsqlite3_errmsg(tls, (*TFts5Config)(unsafe.Pointer(pConfig)).Fdb)))
+ (*Tsqlite3_vtab)(unsafe.Pointer((*Tsqlite3_vtab_cursor)(unsafe.Pointer(pCursor)).FpVtab)).FzErrMsg = Xsqlite3_mprintf(tls, __ccgo_ts+3890, libc.VaList(bp+16, Xsqlite3_errmsg(tls, (*TFts5Config)(unsafe.Pointer(pConfig)).Fdb)))
}
} else {
rc = SQLITE_OK
@@ -216812,7 +217290,7 @@ func _fts5PrepareStatement(tls *libc.TLS, ppStmt uintptr, pConfig uintptr, zFmt
} else {
rc = Xsqlite3_prepare_v3(tls, (*TFts5Config)(unsafe.Pointer(pConfig)).Fdb, zSql, -int32(1), uint32(SQLITE_PREPARE_PERSISTENT), bp, uintptr(0))
if rc != SQLITE_OK {
- _sqlite3Fts5ConfigErrmsg(tls, pConfig, __ccgo_ts+3864, libc.VaList(bp+16, Xsqlite3_errmsg(tls, (*TFts5Config)(unsafe.Pointer(pConfig)).Fdb)))
+ _sqlite3Fts5ConfigErrmsg(tls, pConfig, __ccgo_ts+3890, libc.VaList(bp+16, Xsqlite3_errmsg(tls, (*TFts5Config)(unsafe.Pointer(pConfig)).Fdb)))
}
Xsqlite3_free(tls, zSql)
}
@@ -216832,7 +217310,7 @@ func _fts5CursorFirstSorted(tls *libc.TLS, pTab uintptr, pCsr uintptr, bDesc int
zRank = (*TFts5Cursor)(unsafe.Pointer(pCsr)).FzRank
zRankArgs = (*TFts5Cursor)(unsafe.Pointer(pCsr)).FzRankArgs
nPhrase = _sqlite3Fts5ExprPhraseCount(tls, (*TFts5Cursor)(unsafe.Pointer(pCsr)).FpExpr)
- nByte = libc.Int64FromUint32(uint32(24) + uint32(4)*libc.Uint32FromInt32(nPhrase-libc.Int32FromInt32(1)))
+ nByte = libc.Int64FromUint32(uint32(libc.UintptrFromInt32(0)+16) + libc.Uint32FromInt32((nPhrase+libc.Int32FromInt32(2))/libc.Int32FromInt32(2))*libc.Uint32FromInt64(8))
pSorter = Xsqlite3_malloc64(tls, libc.Uint64FromInt64(nByte))
if pSorter == uintptr(0) {
return int32(SQLITE_NOMEM)
@@ -216847,7 +217325,7 @@ func _fts5CursorFirstSorted(tls *libc.TLS, pTab uintptr, pCsr uintptr, bDesc int
**
** If SQLite a built-in statement cache, this wouldn't be a problem. */
if zRankArgs != 0 {
- v1 = __ccgo_ts + 15149
+ v1 = __ccgo_ts + 15174
} else {
v1 = __ccgo_ts + 1667
}
@@ -216857,11 +217335,11 @@ func _fts5CursorFirstSorted(tls *libc.TLS, pTab uintptr, pCsr uintptr, bDesc int
v2 = __ccgo_ts + 1667
}
if bDesc != 0 {
- v3 = __ccgo_ts + 37436
+ v3 = __ccgo_ts + 37543
} else {
- v3 = __ccgo_ts + 37441
+ v3 = __ccgo_ts + 37548
}
- rc = _fts5PrepareStatement(tls, pSorter, pConfig, __ccgo_ts+37445, libc.VaList(bp+8, (*TFts5Config)(unsafe.Pointer(pConfig)).FzDb, (*TFts5Config)(unsafe.Pointer(pConfig)).FzName, zRank, (*TFts5Config)(unsafe.Pointer(pConfig)).FzName, v1, v2, v3))
+ rc = _fts5PrepareStatement(tls, pSorter, pConfig, __ccgo_ts+37552, libc.VaList(bp+8, (*TFts5Config)(unsafe.Pointer(pConfig)).FzDb, (*TFts5Config)(unsafe.Pointer(pConfig)).FzName, zRank, (*TFts5Config)(unsafe.Pointer(pConfig)).FzName, v1, v2, v3))
(*TFts5Cursor)(unsafe.Pointer(pCsr)).FpSorter = pSorter
if rc == SQLITE_OK {
(*TFts5FullTable)(unsafe.Pointer(pTab)).FpSortCsr = pCsr
@@ -216919,14 +217397,14 @@ func _fts5SpecialMatch(tls *libc.TLS, pTab uintptr, pCsr uintptr, zQuery uintptr
n++
}
(*TFts5Cursor)(unsafe.Pointer(pCsr)).FePlan = int32(FTS5_PLAN_SPECIAL)
- if n == int32(5) && 0 == Xsqlite3_strnicmp(tls, __ccgo_ts+37500, z, n) {
+ if n == int32(5) && 0 == Xsqlite3_strnicmp(tls, __ccgo_ts+37607, z, n) {
(*TFts5Cursor)(unsafe.Pointer(pCsr)).FiSpecial = int64(_sqlite3Fts5IndexReads(tls, (*TFts5FullTable)(unsafe.Pointer(pTab)).Fp.FpIndex))
} else {
- if n == int32(2) && 0 == Xsqlite3_strnicmp(tls, __ccgo_ts+5566, z, n) {
+ if n == int32(2) && 0 == Xsqlite3_strnicmp(tls, __ccgo_ts+5592, z, n) {
(*TFts5Cursor)(unsafe.Pointer(pCsr)).FiSpecial = (*TFts5Cursor)(unsafe.Pointer(pCsr)).FiCsrId
} else {
/* An unrecognized directive. Return an error message. */
- (*TFts5FullTable)(unsafe.Pointer(pTab)).Fp.Fbase.FzErrMsg = Xsqlite3_mprintf(tls, __ccgo_ts+37506, libc.VaList(bp+8, n, z))
+ (*TFts5FullTable)(unsafe.Pointer(pTab)).Fp.Fbase.FzErrMsg = Xsqlite3_mprintf(tls, __ccgo_ts+37613, libc.VaList(bp+8, n, z))
rc = int32(SQLITE_ERROR)
}
}
@@ -216976,7 +217454,7 @@ func _fts5FindRankFunction(tls *libc.TLS, pCsr uintptr) (r int32) {
zRank = (*TFts5Cursor)(unsafe.Pointer(pCsr)).FzRank
zRankArgs = (*TFts5Cursor)(unsafe.Pointer(pCsr)).FzRankArgs
if zRankArgs != 0 {
- zSql = _sqlite3Fts5Mprintf(tls, bp, __ccgo_ts+37534, libc.VaList(bp+16, zRankArgs))
+ zSql = _sqlite3Fts5Mprintf(tls, bp, __ccgo_ts+37641, libc.VaList(bp+16, zRankArgs))
if zSql != 0 {
*(*uintptr)(unsafe.Pointer(bp + 4)) = uintptr(0)
*(*int32)(unsafe.Pointer(bp)) = Xsqlite3_prepare_v3(tls, (*TFts5Config)(unsafe.Pointer(pConfig)).Fdb, zSql, -int32(1), uint32(SQLITE_PREPARE_PERSISTENT), bp+4, uintptr(0))
@@ -217009,7 +217487,7 @@ func _fts5FindRankFunction(tls *libc.TLS, pCsr uintptr) (r int32) {
if *(*int32)(unsafe.Pointer(bp)) == SQLITE_OK {
pAux = _fts5FindAuxiliary(tls, pTab, zRank)
if pAux == uintptr(0) {
- (*TFts5FullTable)(unsafe.Pointer(pTab)).Fp.Fbase.FzErrMsg = Xsqlite3_mprintf(tls, __ccgo_ts+37544, libc.VaList(bp+16, zRank))
+ (*TFts5FullTable)(unsafe.Pointer(pTab)).Fp.Fbase.FzErrMsg = Xsqlite3_mprintf(tls, __ccgo_ts+37651, libc.VaList(bp+16, zRank))
*(*int32)(unsafe.Pointer(bp)) = int32(SQLITE_ERROR)
}
}
@@ -217043,7 +217521,7 @@ func _fts5CursorParseRank(tls *libc.TLS, pConfig uintptr, pCsr uintptr, pRank ui
*(*int32)(unsafe.Pointer(pCsr + 56)) |= int32(FTS5CSR_FREE_ZRANK)
} else {
if rc == int32(SQLITE_ERROR) {
- (*Tsqlite3_vtab)(unsafe.Pointer((*TFts5Cursor)(unsafe.Pointer(pCsr)).Fbase.FpVtab)).FzErrMsg = Xsqlite3_mprintf(tls, __ccgo_ts+37565, libc.VaList(bp+16, z))
+ (*Tsqlite3_vtab)(unsafe.Pointer((*TFts5Cursor)(unsafe.Pointer(pCsr)).Fbase.FpVtab)).FzErrMsg = Xsqlite3_mprintf(tls, __ccgo_ts+37672, libc.VaList(bp+16, z))
}
}
} else {
@@ -217051,7 +217529,7 @@ func _fts5CursorParseRank(tls *libc.TLS, pConfig uintptr, pCsr uintptr, pRank ui
(*TFts5Cursor)(unsafe.Pointer(pCsr)).FzRank = (*TFts5Config)(unsafe.Pointer(pConfig)).FzRank
(*TFts5Cursor)(unsafe.Pointer(pCsr)).FzRankArgs = (*TFts5Config)(unsafe.Pointer(pConfig)).FzRankArgs
} else {
- (*TFts5Cursor)(unsafe.Pointer(pCsr)).FzRank = __ccgo_ts + 35292
+ (*TFts5Cursor)(unsafe.Pointer(pCsr)).FzRank = __ccgo_ts + 35399
(*TFts5Cursor)(unsafe.Pointer(pCsr)).FzRankArgs = uintptr(0)
}
}
@@ -217208,7 +217686,7 @@ func _fts5ExtractExprText(tls *libc.TLS, pConfig uintptr, pVal uintptr, pzText u
*(*uintptr)(unsafe.Pointer(bp + 12)) = uintptr(0)
*(*int32)(unsafe.Pointer(bp + 16)) = 0
*(*int32)(unsafe.Pointer(bp)) = _sqlite3Fts5DecodeLocaleValue(tls, pVal, bp+4, bp+8, bp+12, bp+16)
- *(*uintptr)(unsafe.Pointer(pzText)) = _sqlite3Fts5Mprintf(tls, bp, __ccgo_ts+37598, libc.VaList(bp+32, *(*int32)(unsafe.Pointer(bp + 8)), *(*uintptr)(unsafe.Pointer(bp + 4))))
+ *(*uintptr)(unsafe.Pointer(pzText)) = _sqlite3Fts5Mprintf(tls, bp, __ccgo_ts+37705, libc.VaList(bp+32, *(*int32)(unsafe.Pointer(bp + 8)), *(*uintptr)(unsafe.Pointer(bp + 4))))
if *(*int32)(unsafe.Pointer(bp)) == SQLITE_OK {
_sqlite3Fts5SetLocale(tls, pConfig, *(*uintptr)(unsafe.Pointer(bp + 12)), *(*int32)(unsafe.Pointer(bp + 16)))
}
@@ -217408,7 +217886,7 @@ func _fts5FilterMethod(tls *libc.TLS, pCursor uintptr, idxNum int32, idxStr uint
}
} else {
if (*TFts5Config)(unsafe.Pointer(pConfig)).FzContent == uintptr(0) {
- _fts5SetVtabError(tls, pTab, __ccgo_ts+37603, libc.VaList(bp+24, (*TFts5Config)(unsafe.Pointer(pConfig)).FzName))
+ _fts5SetVtabError(tls, pTab, __ccgo_ts+37710, libc.VaList(bp+24, (*TFts5Config)(unsafe.Pointer(pConfig)).FzName))
rc = int32(SQLITE_ERROR)
} else {
/* This is either a full-table scan (ePlan==FTS5_PLAN_SCAN) or a lookup
@@ -217541,10 +218019,10 @@ func _fts5SeekCursor(tls *libc.TLS, pCsr uintptr, bErrormsg int32) (r int32) {
rc = Xsqlite3_reset(tls, (*TFts5Cursor)(unsafe.Pointer(pCsr)).FpStmt)
if rc == SQLITE_OK {
rc = libc.Int32FromInt32(SQLITE_CORRUPT) | libc.Int32FromInt32(1)<<libc.Int32FromInt32(8)
- _fts5SetVtabError(tls, pTab1, __ccgo_ts+37639, libc.VaList(bp+8, _fts5CursorRowid(tls, pCsr), (*TFts5Config)(unsafe.Pointer((*TFts5Table)(unsafe.Pointer(pTab1)).FpConfig)).FzContent))
+ _fts5SetVtabError(tls, pTab1, __ccgo_ts+37746, libc.VaList(bp+8, _fts5CursorRowid(tls, pCsr), (*TFts5Config)(unsafe.Pointer((*TFts5Table)(unsafe.Pointer(pTab1)).FpConfig)).FzContent))
} else {
if (*TFts5Config)(unsafe.Pointer((*TFts5Table)(unsafe.Pointer(pTab1)).FpConfig)).FpzErrmsg != 0 {
- _fts5SetVtabError(tls, pTab1, __ccgo_ts+3864, libc.VaList(bp+8, Xsqlite3_errmsg(tls, (*TFts5Config)(unsafe.Pointer((*TFts5Table)(unsafe.Pointer(pTab1)).FpConfig)).Fdb)))
+ _fts5SetVtabError(tls, pTab1, __ccgo_ts+3890, libc.VaList(bp+8, Xsqlite3_errmsg(tls, (*TFts5Config)(unsafe.Pointer((*TFts5Table)(unsafe.Pointer(pTab1)).FpConfig)).Fdb)))
}
}
}
@@ -217580,36 +218058,36 @@ func _fts5SpecialInsert(tls *libc.TLS, pTab uintptr, zCmd uintptr, pVal uintptr)
rc = SQLITE_OK
*(*int32)(unsafe.Pointer(bp)) = 0
bLoadConfig = 0
- if 0 == Xsqlite3_stricmp(tls, __ccgo_ts+37684, zCmd) {
+ if 0 == Xsqlite3_stricmp(tls, __ccgo_ts+37791, zCmd) {
if (*TFts5Config)(unsafe.Pointer(pConfig)).FeContent == FTS5_CONTENT_NORMAL {
- _fts5SetVtabError(tls, pTab, __ccgo_ts+37695, 0)
+ _fts5SetVtabError(tls, pTab, __ccgo_ts+37802, 0)
rc = int32(SQLITE_ERROR)
} else {
rc = _sqlite3Fts5StorageDeleteAll(tls, (*TFts5FullTable)(unsafe.Pointer(pTab)).FpStorage)
}
bLoadConfig = int32(1)
} else {
- if 0 == Xsqlite3_stricmp(tls, __ccgo_ts+37775, zCmd) {
+ if 0 == Xsqlite3_stricmp(tls, __ccgo_ts+37882, zCmd) {
if _fts5IsContentless(tls, pTab, int32(1)) != 0 {
- _fts5SetVtabError(tls, pTab, __ccgo_ts+37783, 0)
+ _fts5SetVtabError(tls, pTab, __ccgo_ts+37890, 0)
rc = int32(SQLITE_ERROR)
} else {
rc = _sqlite3Fts5StorageRebuild(tls, (*TFts5FullTable)(unsafe.Pointer(pTab)).FpStorage)
}
bLoadConfig = int32(1)
} else {
- if 0 == Xsqlite3_stricmp(tls, __ccgo_ts+17517, zCmd) {
+ if 0 == Xsqlite3_stricmp(tls, __ccgo_ts+17589, zCmd) {
rc = _sqlite3Fts5StorageOptimize(tls, (*TFts5FullTable)(unsafe.Pointer(pTab)).FpStorage)
} else {
- if 0 == Xsqlite3_stricmp(tls, __ccgo_ts+37839, zCmd) {
+ if 0 == Xsqlite3_stricmp(tls, __ccgo_ts+37946, zCmd) {
nMerge = Xsqlite3_value_int(tls, pVal)
rc = _sqlite3Fts5StorageMerge(tls, (*TFts5FullTable)(unsafe.Pointer(pTab)).FpStorage, nMerge)
} else {
- if 0 == Xsqlite3_stricmp(tls, __ccgo_ts+37845, zCmd) {
+ if 0 == Xsqlite3_stricmp(tls, __ccgo_ts+37952, zCmd) {
iArg = Xsqlite3_value_int(tls, pVal)
rc = _sqlite3Fts5StorageIntegrity(tls, (*TFts5FullTable)(unsafe.Pointer(pTab)).FpStorage, iArg)
} else {
- if 0 == Xsqlite3_stricmp(tls, __ccgo_ts+37861, zCmd) {
+ if 0 == Xsqlite3_stricmp(tls, __ccgo_ts+37968, zCmd) {
rc = _sqlite3Fts5FlushToDisk(tls, pTab)
} else {
rc = _sqlite3Fts5FlushToDisk(tls, pTab)
@@ -217722,11 +218200,11 @@ func _fts5ContentlessUpdate(tls *libc.TLS, pConfig uintptr, apVal uintptr, bRowi
if bSeenIndexNC != 0 || (*TFts5Config)(unsafe.Pointer(pConfig)).FbContentlessDelete == 0 {
rc = int32(SQLITE_ERROR)
if (*TFts5Config)(unsafe.Pointer(pConfig)).FbContentlessDelete != 0 {
- v2 = __ccgo_ts + 37867
+ v2 = __ccgo_ts + 37974
} else {
- v2 = __ccgo_ts + 37927
+ v2 = __ccgo_ts + 38034
}
- _sqlite3Fts5ConfigErrmsg(tls, pConfig, v2, libc.VaList(bp+8, __ccgo_ts+37957, (*TFts5Config)(unsafe.Pointer(pConfig)).FzName))
+ _sqlite3Fts5ConfigErrmsg(tls, pConfig, v2, libc.VaList(bp+8, __ccgo_ts+38064, (*TFts5Config)(unsafe.Pointer(pConfig)).FzName))
}
}
return rc
@@ -217774,9 +218252,9 @@ func _fts5UpdateMethod(tls *libc.TLS, pVtab uintptr, nArg int32, apVal uintptr,
if eType0 == int32(SQLITE_NULL) && Xsqlite3_value_type(tls, *(*uintptr)(unsafe.Pointer(apVal + uintptr(int32(2)+(*TFts5Config)(unsafe.Pointer(pConfig)).FnCol)*4))) != int32(SQLITE_NULL) {
/* A "special" INSERT op. These are handled separately. */
z = Xsqlite3_value_text(tls, *(*uintptr)(unsafe.Pointer(apVal + uintptr(int32(2)+(*TFts5Config)(unsafe.Pointer(pConfig)).FnCol)*4)))
- if (*TFts5Config)(unsafe.Pointer(pConfig)).FeContent != FTS5_CONTENT_NORMAL && 0 == Xsqlite3_stricmp(tls, __ccgo_ts+18037, z) {
+ if (*TFts5Config)(unsafe.Pointer(pConfig)).FeContent != FTS5_CONTENT_NORMAL && 0 == Xsqlite3_stricmp(tls, __ccgo_ts+18109, z) {
if (*TFts5Config)(unsafe.Pointer(pConfig)).FbContentlessDelete != 0 {
- _fts5SetVtabError(tls, pTab, __ccgo_ts+37971, 0)
+ _fts5SetVtabError(tls, pTab, __ccgo_ts+38078, 0)
*(*int32)(unsafe.Pointer(bp)) = int32(SQLITE_ERROR)
} else {
*(*int32)(unsafe.Pointer(bp)) = _fts5SpecialDelete(tls, pTab, apVal)
@@ -217805,7 +218283,7 @@ func _fts5UpdateMethod(tls *libc.TLS, pVtab uintptr, nArg int32, apVal uintptr,
/* It is only possible to DELETE from a contentless table if the
** contentless_delete=1 flag is set. */
if _fts5IsContentless(tls, pTab, int32(1)) != 0 && (*TFts5Config)(unsafe.Pointer(pConfig)).FbContentlessDelete == 0 {
- _fts5SetVtabError(tls, pTab, __ccgo_ts+38030, libc.VaList(bp+16, (*TFts5Config)(unsafe.Pointer(pConfig)).FzName))
+ _fts5SetVtabError(tls, pTab, __ccgo_ts+38137, libc.VaList(bp+16, (*TFts5Config)(unsafe.Pointer(pConfig)).FzName))
*(*int32)(unsafe.Pointer(bp)) = int32(SQLITE_ERROR)
} else {
iDel = Xsqlite3_value_int64(tls, *(*uintptr)(unsafe.Pointer(apVal))) /* Rowid to delete */
@@ -217823,7 +218301,7 @@ func _fts5UpdateMethod(tls *libc.TLS, pVtab uintptr, nArg int32, apVal uintptr,
}
pVal = *(*uintptr)(unsafe.Pointer(apVal + uintptr(ii+int32(2))*4))
if _sqlite3Fts5IsLocaleValue(tls, pConfig, pVal) != 0 {
- _fts5SetVtabError(tls, pTab, __ccgo_ts+38076, 0)
+ _fts5SetVtabError(tls, pTab, __ccgo_ts+38183, 0)
*(*int32)(unsafe.Pointer(bp)) = int32(SQLITE_MISMATCH)
goto update_out
}
@@ -218849,7 +219327,7 @@ func _fts5ApiCallback(tls *libc.TLS, context uintptr, argc int32, argv uintptr)
iCsrId = Xsqlite3_value_int64(tls, *(*uintptr)(unsafe.Pointer(argv)))
pCsr = _fts5CursorFromCsrid(tls, (*TFts5Auxiliary)(unsafe.Pointer(pAux)).FpGlobal, iCsrId)
if pCsr == uintptr(0) || ((*TFts5Cursor)(unsafe.Pointer(pCsr)).FePlan == 0 || (*TFts5Cursor)(unsafe.Pointer(pCsr)).FePlan == int32(FTS5_PLAN_SPECIAL)) {
- _fts5ResultError(tls, context, __ccgo_ts+38108, libc.VaList(bp+8, iCsrId))
+ _fts5ResultError(tls, context, __ccgo_ts+38215, libc.VaList(bp+8, iCsrId))
} else {
pTab = (*TFts5Cursor)(unsafe.Pointer(pCsr)).Fbase.FpVtab
_fts5ApiInvoke(tls, pAux, pCsr, context, argc-int32(1), argv+1*4)
@@ -219508,7 +219986,7 @@ func _sqlite3Fts5LoadTokenizer(tls *libc.TLS, pConfig uintptr) (r int32) {
pMod = _fts5LocateTokenizer(tls, (*TFts5Config)(unsafe.Pointer(pConfig)).FpGlobal, v1)
if pMod == uintptr(0) {
rc = int32(SQLITE_ERROR)
- _sqlite3Fts5ConfigErrmsg(tls, pConfig, __ccgo_ts+38129, libc.VaList(bp+8, *(*uintptr)(unsafe.Pointer(azArg))))
+ _sqlite3Fts5ConfigErrmsg(tls, pConfig, __ccgo_ts+38236, libc.VaList(bp+8, *(*uintptr)(unsafe.Pointer(azArg))))
} else {
xCreate = uintptr(0)
if (*TFts5TokenizerModule)(unsafe.Pointer(pMod)).FbV2Native != 0 {
@@ -219531,7 +220009,7 @@ func _sqlite3Fts5LoadTokenizer(tls *libc.TLS, pConfig uintptr) (r int32) {
rc = (*(*func(*libc.TLS, uintptr, uintptr, int32, uintptr) int32)(unsafe.Pointer(&struct{ uintptr }{xCreate})))(tls, (*TFts5TokenizerModule)(unsafe.Pointer(pMod)).FpUserData, v2, v3, pConfig+76)
if rc != SQLITE_OK {
if rc != int32(SQLITE_NOMEM) {
- _sqlite3Fts5ConfigErrmsg(tls, pConfig, __ccgo_ts+38151, 0)
+ _sqlite3Fts5ConfigErrmsg(tls, pConfig, __ccgo_ts+38258, 0)
}
} else {
if (*TFts5TokenizerModule)(unsafe.Pointer(pMod)).FbV2Native == 0 {
@@ -219602,7 +220080,7 @@ func _fts5Fts5Func(tls *libc.TLS, pCtx uintptr, nArg int32, apArg uintptr) {
_, _ = pGlobal, ppApi
pGlobal = Xsqlite3_user_data(tls, pCtx)
_ = nArg
- ppApi = Xsqlite3_value_pointer(tls, *(*uintptr)(unsafe.Pointer(apArg)), __ccgo_ts+38182)
+ ppApi = Xsqlite3_value_pointer(tls, *(*uintptr)(unsafe.Pointer(apArg)), __ccgo_ts+38289)
if ppApi != 0 {
*(*uintptr)(unsafe.Pointer(ppApi)) = pGlobal
}
@@ -219616,7 +220094,7 @@ func _fts5Fts5Func(tls *libc.TLS, pCtx uintptr, nArg int32, apArg uintptr) {
func _fts5SourceIdFunc(tls *libc.TLS, pCtx uintptr, nArg int32, apUnused uintptr) {
_ = nArg
_ = apUnused
- Xsqlite3_result_text(tls, pCtx, __ccgo_ts+38195, -int32(1), uintptr(-libc.Int32FromInt32(1)))
+ Xsqlite3_result_text(tls, pCtx, __ccgo_ts+38302, -int32(1), uintptr(-libc.Int32FromInt32(1)))
}
// C documentation
@@ -219713,11 +220191,11 @@ func _fts5ShadowName(tls *libc.TLS, zName uintptr) (r int32) {
}
var _azName2 = [5]uintptr{
- 0: __ccgo_ts + 38286,
- 1: __ccgo_ts + 35497,
- 2: __ccgo_ts + 26003,
- 3: __ccgo_ts + 36192,
- 4: __ccgo_ts + 11984,
+ 0: __ccgo_ts + 38393,
+ 1: __ccgo_ts + 35604,
+ 2: __ccgo_ts + 26058,
+ 3: __ccgo_ts + 36299,
+ 4: __ccgo_ts + 12009,
}
// C documentation
@@ -219739,7 +220217,7 @@ func _fts5IntegrityMethod(tls *libc.TLS, pVtab uintptr, zSchema uintptr, zTabnam
rc = _sqlite3Fts5StorageIntegrity(tls, (*TFts5FullTable)(unsafe.Pointer(pTab)).FpStorage, 0)
if *(*uintptr)(unsafe.Pointer(pzErr)) == uintptr(0) && rc != SQLITE_OK {
if rc&int32(0xff) == int32(SQLITE_CORRUPT) {
- *(*uintptr)(unsafe.Pointer(pzErr)) = Xsqlite3_mprintf(tls, __ccgo_ts+38293, libc.VaList(bp+8, zSchema, zTabname))
+ *(*uintptr)(unsafe.Pointer(pzErr)) = Xsqlite3_mprintf(tls, __ccgo_ts+38400, libc.VaList(bp+8, zSchema, zTabname))
if *(*uintptr)(unsafe.Pointer(pzErr)) != 0 {
v1 = SQLITE_OK
} else {
@@ -219747,7 +220225,7 @@ func _fts5IntegrityMethod(tls *libc.TLS, pVtab uintptr, zSchema uintptr, zTabnam
}
rc = v1
} else {
- *(*uintptr)(unsafe.Pointer(pzErr)) = Xsqlite3_mprintf(tls, __ccgo_ts+38339, libc.VaList(bp+8, zSchema, zTabname, Xsqlite3_errstr(tls, rc)))
+ *(*uintptr)(unsafe.Pointer(pzErr)) = Xsqlite3_mprintf(tls, __ccgo_ts+38446, libc.VaList(bp+8, zSchema, zTabname, Xsqlite3_errstr(tls, rc)))
}
}
_sqlite3Fts5IndexCloseReader(tls, (*TFts5FullTable)(unsafe.Pointer(pTab)).Fp.FpIndex)
@@ -219780,7 +220258,7 @@ func _fts5Init(tls *libc.TLS, db uintptr) (r int32) {
*(*Tu32)(unsafe.Pointer(pGlobal + 52 + 1*4)) ^= uint32(0x16596E13)
*(*Tu32)(unsafe.Pointer(pGlobal + 52 + 2*4)) ^= uint32(0x7C80BEAA)
*(*Tu32)(unsafe.Pointer(pGlobal + 52 + 3*4)) ^= uint32(0x9B03A67F)
- rc = Xsqlite3_create_module_v2(tls, db, __ccgo_ts+38402, uintptr(unsafe.Pointer(&_fts5Mod)), p, __ccgo_fp(_fts5ModuleDestroy))
+ rc = Xsqlite3_create_module_v2(tls, db, __ccgo_ts+38509, uintptr(unsafe.Pointer(&_fts5Mod)), p, __ccgo_fp(_fts5ModuleDestroy))
if rc == SQLITE_OK {
rc = _sqlite3Fts5IndexInit(tls, db)
}
@@ -219797,16 +220275,16 @@ func _fts5Init(tls *libc.TLS, db uintptr) (r int32) {
rc = _sqlite3Fts5VocabInit(tls, pGlobal, db)
}
if rc == SQLITE_OK {
- rc = Xsqlite3_create_function(tls, db, __ccgo_ts+38402, int32(1), int32(SQLITE_UTF8), p, __ccgo_fp(_fts5Fts5Func), uintptr(0), uintptr(0))
+ rc = Xsqlite3_create_function(tls, db, __ccgo_ts+38509, int32(1), int32(SQLITE_UTF8), p, __ccgo_fp(_fts5Fts5Func), uintptr(0), uintptr(0))
}
if rc == SQLITE_OK {
- rc = Xsqlite3_create_function(tls, db, __ccgo_ts+38407, 0, libc.Int32FromInt32(SQLITE_UTF8)|libc.Int32FromInt32(SQLITE_DETERMINISTIC)|libc.Int32FromInt32(SQLITE_INNOCUOUS), p, __ccgo_fp(_fts5SourceIdFunc), uintptr(0), uintptr(0))
+ rc = Xsqlite3_create_function(tls, db, __ccgo_ts+38514, 0, libc.Int32FromInt32(SQLITE_UTF8)|libc.Int32FromInt32(SQLITE_DETERMINISTIC)|libc.Int32FromInt32(SQLITE_INNOCUOUS), p, __ccgo_fp(_fts5SourceIdFunc), uintptr(0), uintptr(0))
}
if rc == SQLITE_OK {
- rc = Xsqlite3_create_function(tls, db, __ccgo_ts+38422, int32(2), libc.Int32FromInt32(SQLITE_UTF8)|libc.Int32FromInt32(SQLITE_INNOCUOUS)|libc.Int32FromInt32(SQLITE_RESULT_SUBTYPE)|libc.Int32FromInt32(SQLITE_SUBTYPE), p, __ccgo_fp(_fts5LocaleFunc), uintptr(0), uintptr(0))
+ rc = Xsqlite3_create_function(tls, db, __ccgo_ts+38529, int32(2), libc.Int32FromInt32(SQLITE_UTF8)|libc.Int32FromInt32(SQLITE_INNOCUOUS)|libc.Int32FromInt32(SQLITE_RESULT_SUBTYPE)|libc.Int32FromInt32(SQLITE_SUBTYPE), p, __ccgo_fp(_fts5LocaleFunc), uintptr(0), uintptr(0))
}
if rc == SQLITE_OK {
- rc = Xsqlite3_create_function(tls, db, __ccgo_ts+38434, int32(1), libc.Int32FromInt32(SQLITE_UTF8)|libc.Int32FromInt32(SQLITE_INNOCUOUS)|libc.Int32FromInt32(SQLITE_RESULT_SUBTYPE), p, __ccgo_fp(_fts5InsttokenFunc), uintptr(0), uintptr(0))
+ rc = Xsqlite3_create_function(tls, db, __ccgo_ts+38541, int32(1), libc.Int32FromInt32(SQLITE_UTF8)|libc.Int32FromInt32(SQLITE_INNOCUOUS)|libc.Int32FromInt32(SQLITE_RESULT_SUBTYPE), p, __ccgo_fp(_fts5InsttokenFunc), uintptr(0), uintptr(0))
}
}
/* If SQLITE_FTS5_ENABLE_TEST_MI is defined, assume that the file
@@ -219937,18 +220415,18 @@ func _fts5StorageGetStmt(tls *libc.TLS, p uintptr, eStmt int32, ppStmt uintptr,
** statements to operate on it. */
if *(*uintptr)(unsafe.Pointer(p + 28 + uintptr(eStmt)*4)) == uintptr(0) {
azStmt = [12]uintptr{
- 0: __ccgo_ts + 38449,
- 1: __ccgo_ts + 38517,
- 2: __ccgo_ts + 38586,
- 3: __ccgo_ts + 38586,
- 4: __ccgo_ts + 38619,
- 5: __ccgo_ts + 38658,
- 6: __ccgo_ts + 38698,
- 7: __ccgo_ts + 38737,
- 8: __ccgo_ts + 38780,
- 9: __ccgo_ts + 38819,
- 10: __ccgo_ts + 38863,
- 11: __ccgo_ts + 38903,
+ 0: __ccgo_ts + 38556,
+ 1: __ccgo_ts + 38624,
+ 2: __ccgo_ts + 38693,
+ 3: __ccgo_ts + 38693,
+ 4: __ccgo_ts + 38726,
+ 5: __ccgo_ts + 38765,
+ 6: __ccgo_ts + 38805,
+ 7: __ccgo_ts + 38844,
+ 8: __ccgo_ts + 38887,
+ 9: __ccgo_ts + 38926,
+ 10: __ccgo_ts + 38970,
+ 11: __ccgo_ts + 39010,
}
pC = (*TFts5Storage)(unsafe.Pointer(p)).FpConfig
zSql = uintptr(0)
@@ -219978,11 +220456,11 @@ func _fts5StorageGetStmt(tls *libc.TLS, p uintptr, eStmt int32, ppStmt uintptr,
}
if !(i != 0) || (*TFts5Config)(unsafe.Pointer(pC)).FeContent == FTS5_CONTENT_NORMAL || *(*Tu8)(unsafe.Pointer((*TFts5Config)(unsafe.Pointer(pC)).FabUnindexed + uintptr(i-int32(1)))) != 0 {
if zBind != 0 {
- v2 = __ccgo_ts + 13281
+ v2 = __ccgo_ts + 13306
} else {
v2 = __ccgo_ts + 1667
}
- zBind = _sqlite3Fts5Mprintf(tls, bp, __ccgo_ts+38926, libc.VaList(bp+16, zBind, v2, i+int32(1)))
+ zBind = _sqlite3Fts5Mprintf(tls, bp, __ccgo_ts+39033, libc.VaList(bp+16, zBind, v2, i+int32(1)))
}
goto _1
_1:
@@ -219998,7 +220476,7 @@ func _fts5StorageGetStmt(tls *libc.TLS, p uintptr, eStmt int32, ppStmt uintptr,
break
}
if libc.Int32FromUint8(*(*Tu8)(unsafe.Pointer((*TFts5Config)(unsafe.Pointer(pC)).FabUnindexed + uintptr(i)))) == 0 {
- zBind = _sqlite3Fts5Mprintf(tls, bp, __ccgo_ts+38934, libc.VaList(bp+16, zBind, (*TFts5Config)(unsafe.Pointer(pC)).FnCol+i+int32(2)))
+ zBind = _sqlite3Fts5Mprintf(tls, bp, __ccgo_ts+39041, libc.VaList(bp+16, zBind, (*TFts5Config)(unsafe.Pointer(pC)).FnCol+i+int32(2)))
}
goto _3
_3:
@@ -220010,14 +220488,14 @@ func _fts5StorageGetStmt(tls *libc.TLS, p uintptr, eStmt int32, ppStmt uintptr,
Xsqlite3_free(tls, zBind)
case int32(FTS5_STMT_REPLACE_DOCSIZE):
if (*TFts5Config)(unsafe.Pointer(pC)).FbContentlessDelete != 0 {
- v4 = __ccgo_ts + 38941
+ v4 = __ccgo_ts + 39048
} else {
v4 = __ccgo_ts + 1667
}
zSql = Xsqlite3_mprintf(tls, azStmt[eStmt], libc.VaList(bp+16, (*TFts5Config)(unsafe.Pointer(pC)).FzDb, (*TFts5Config)(unsafe.Pointer(pC)).FzName, v4))
case int32(FTS5_STMT_LOOKUP_DOCSIZE):
if (*TFts5Config)(unsafe.Pointer(pC)).FbContentlessDelete != 0 {
- v5 = __ccgo_ts + 38944
+ v5 = __ccgo_ts + 39051
} else {
v5 = __ccgo_ts + 1667
}
@@ -220038,7 +220516,7 @@ func _fts5StorageGetStmt(tls *libc.TLS, p uintptr, eStmt int32, ppStmt uintptr,
(*TFts5Config)(unsafe.Pointer((*TFts5Storage)(unsafe.Pointer(p)).FpConfig)).FbLock--
Xsqlite3_free(tls, zSql)
if *(*int32)(unsafe.Pointer(bp)) != SQLITE_OK && pzErrMsg != 0 {
- *(*uintptr)(unsafe.Pointer(pzErrMsg)) = Xsqlite3_mprintf(tls, __ccgo_ts+3864, libc.VaList(bp+16, Xsqlite3_errmsg(tls, (*TFts5Config)(unsafe.Pointer(pC)).Fdb)))
+ *(*uintptr)(unsafe.Pointer(pzErrMsg)) = Xsqlite3_mprintf(tls, __ccgo_ts+3890, libc.VaList(bp+16, Xsqlite3_errmsg(tls, (*TFts5Config)(unsafe.Pointer(pC)).Fdb)))
}
if *(*int32)(unsafe.Pointer(bp)) == int32(SQLITE_ERROR) && eStmt > int32(FTS5_STMT_LOOKUP2) && eStmt < int32(FTS5_STMT_SCAN) {
/* One of the internal tables - not the %_content table - is missing.
@@ -220080,12 +220558,12 @@ func _sqlite3Fts5DropAll(tls *libc.TLS, pConfig uintptr) (r int32) {
defer tls.Free(64)
var rc int32
_ = rc
- rc = _fts5ExecPrintf(tls, (*TFts5Config)(unsafe.Pointer(pConfig)).Fdb, uintptr(0), __ccgo_ts+38952, libc.VaList(bp+8, (*TFts5Config)(unsafe.Pointer(pConfig)).FzDb, (*TFts5Config)(unsafe.Pointer(pConfig)).FzName, (*TFts5Config)(unsafe.Pointer(pConfig)).FzDb, (*TFts5Config)(unsafe.Pointer(pConfig)).FzName, (*TFts5Config)(unsafe.Pointer(pConfig)).FzDb, (*TFts5Config)(unsafe.Pointer(pConfig)).FzName))
+ rc = _fts5ExecPrintf(tls, (*TFts5Config)(unsafe.Pointer(pConfig)).Fdb, uintptr(0), __ccgo_ts+39059, libc.VaList(bp+8, (*TFts5Config)(unsafe.Pointer(pConfig)).FzDb, (*TFts5Config)(unsafe.Pointer(pConfig)).FzName, (*TFts5Config)(unsafe.Pointer(pConfig)).FzDb, (*TFts5Config)(unsafe.Pointer(pConfig)).FzName, (*TFts5Config)(unsafe.Pointer(pConfig)).FzDb, (*TFts5Config)(unsafe.Pointer(pConfig)).FzName))
if rc == SQLITE_OK && (*TFts5Config)(unsafe.Pointer(pConfig)).FbColumnsize != 0 {
- rc = _fts5ExecPrintf(tls, (*TFts5Config)(unsafe.Pointer(pConfig)).Fdb, uintptr(0), __ccgo_ts+39056, libc.VaList(bp+8, (*TFts5Config)(unsafe.Pointer(pConfig)).FzDb, (*TFts5Config)(unsafe.Pointer(pConfig)).FzName))
+ rc = _fts5ExecPrintf(tls, (*TFts5Config)(unsafe.Pointer(pConfig)).Fdb, uintptr(0), __ccgo_ts+39163, libc.VaList(bp+8, (*TFts5Config)(unsafe.Pointer(pConfig)).FzDb, (*TFts5Config)(unsafe.Pointer(pConfig)).FzName))
}
if rc == SQLITE_OK && (*TFts5Config)(unsafe.Pointer(pConfig)).FeContent == FTS5_CONTENT_NORMAL {
- rc = _fts5ExecPrintf(tls, (*TFts5Config)(unsafe.Pointer(pConfig)).Fdb, uintptr(0), __ccgo_ts+39094, libc.VaList(bp+8, (*TFts5Config)(unsafe.Pointer(pConfig)).FzDb, (*TFts5Config)(unsafe.Pointer(pConfig)).FzName))
+ rc = _fts5ExecPrintf(tls, (*TFts5Config)(unsafe.Pointer(pConfig)).Fdb, uintptr(0), __ccgo_ts+39201, libc.VaList(bp+8, (*TFts5Config)(unsafe.Pointer(pConfig)).FzDb, (*TFts5Config)(unsafe.Pointer(pConfig)).FzName))
}
return rc
}
@@ -220094,7 +220572,7 @@ func _fts5StorageRenameOne(tls *libc.TLS, pConfig uintptr, pRc uintptr, zTail ui
bp := tls.Alloc(48)
defer tls.Free(48)
if *(*int32)(unsafe.Pointer(pRc)) == SQLITE_OK {
- *(*int32)(unsafe.Pointer(pRc)) = _fts5ExecPrintf(tls, (*TFts5Config)(unsafe.Pointer(pConfig)).Fdb, uintptr(0), __ccgo_ts+39132, libc.VaList(bp+8, (*TFts5Config)(unsafe.Pointer(pConfig)).FzDb, (*TFts5Config)(unsafe.Pointer(pConfig)).FzName, zTail, zName, zTail))
+ *(*int32)(unsafe.Pointer(pRc)) = _fts5ExecPrintf(tls, (*TFts5Config)(unsafe.Pointer(pConfig)).Fdb, uintptr(0), __ccgo_ts+39239, libc.VaList(bp+8, (*TFts5Config)(unsafe.Pointer(pConfig)).FzDb, (*TFts5Config)(unsafe.Pointer(pConfig)).FzName, zTail, zName, zTail))
}
}
@@ -220106,14 +220584,14 @@ func _sqlite3Fts5StorageRename(tls *libc.TLS, pStorage uintptr, zName uintptr) (
_ = pConfig
pConfig = (*TFts5Storage)(unsafe.Pointer(pStorage)).FpConfig
*(*int32)(unsafe.Pointer(bp)) = _sqlite3Fts5StorageSync(tls, pStorage)
- _fts5StorageRenameOne(tls, pConfig, bp, __ccgo_ts+26003, zName)
- _fts5StorageRenameOne(tls, pConfig, bp, __ccgo_ts+11984, zName)
- _fts5StorageRenameOne(tls, pConfig, bp, __ccgo_ts+38286, zName)
+ _fts5StorageRenameOne(tls, pConfig, bp, __ccgo_ts+26058, zName)
+ _fts5StorageRenameOne(tls, pConfig, bp, __ccgo_ts+12009, zName)
+ _fts5StorageRenameOne(tls, pConfig, bp, __ccgo_ts+38393, zName)
if (*TFts5Config)(unsafe.Pointer(pConfig)).FbColumnsize != 0 {
- _fts5StorageRenameOne(tls, pConfig, bp, __ccgo_ts+36192, zName)
+ _fts5StorageRenameOne(tls, pConfig, bp, __ccgo_ts+36299, zName)
}
if (*TFts5Config)(unsafe.Pointer(pConfig)).FeContent == FTS5_CONTENT_NORMAL {
- _fts5StorageRenameOne(tls, pConfig, bp, __ccgo_ts+35497, zName)
+ _fts5StorageRenameOne(tls, pConfig, bp, __ccgo_ts+35604, zName)
}
return *(*int32)(unsafe.Pointer(bp))
}
@@ -220133,13 +220611,13 @@ func _sqlite3Fts5CreateTable(tls *libc.TLS, pConfig uintptr, zPost uintptr, zDef
_, _ = rc, v1
*(*uintptr)(unsafe.Pointer(bp)) = uintptr(0)
if bWithout != 0 {
- v1 = __ccgo_ts + 30643
+ v1 = __ccgo_ts + 30698
} else {
v1 = __ccgo_ts + 1667
}
- rc = _fts5ExecPrintf(tls, (*TFts5Config)(unsafe.Pointer(pConfig)).Fdb, bp, __ccgo_ts+39174, libc.VaList(bp+16, (*TFts5Config)(unsafe.Pointer(pConfig)).FzDb, (*TFts5Config)(unsafe.Pointer(pConfig)).FzName, zPost, zDefn, v1))
+ rc = _fts5ExecPrintf(tls, (*TFts5Config)(unsafe.Pointer(pConfig)).Fdb, bp, __ccgo_ts+39281, libc.VaList(bp+16, (*TFts5Config)(unsafe.Pointer(pConfig)).FzDb, (*TFts5Config)(unsafe.Pointer(pConfig)).FzName, zPost, zDefn, v1))
if *(*uintptr)(unsafe.Pointer(bp)) != 0 {
- *(*uintptr)(unsafe.Pointer(pzErr)) = Xsqlite3_mprintf(tls, __ccgo_ts+39204, libc.VaList(bp+16, (*TFts5Config)(unsafe.Pointer(pConfig)).FzName, zPost, *(*uintptr)(unsafe.Pointer(bp))))
+ *(*uintptr)(unsafe.Pointer(pzErr)) = Xsqlite3_mprintf(tls, __ccgo_ts+39311, libc.VaList(bp+16, (*TFts5Config)(unsafe.Pointer(pConfig)).FzName, zPost, *(*uintptr)(unsafe.Pointer(bp))))
Xsqlite3_free(tls, *(*uintptr)(unsafe.Pointer(bp)))
}
return rc
@@ -220180,7 +220658,7 @@ func _sqlite3Fts5StorageOpen(tls *libc.TLS, pConfig uintptr, pIndex uintptr, bCr
if zDefn == uintptr(0) {
rc = int32(SQLITE_NOMEM)
} else {
- Xsqlite3_snprintf(tls, nDefn, zDefn, __ccgo_ts+39248, 0)
+ Xsqlite3_snprintf(tls, nDefn, zDefn, __ccgo_ts+39355, 0)
iOff = libc.Int32FromUint32(libc.Xstrlen(tls, zDefn))
i = 0
for {
@@ -220188,7 +220666,7 @@ func _sqlite3Fts5StorageOpen(tls *libc.TLS, pConfig uintptr, pIndex uintptr, bCr
break
}
if (*TFts5Config)(unsafe.Pointer(pConfig)).FeContent == FTS5_CONTENT_NORMAL || *(*Tu8)(unsafe.Pointer((*TFts5Config)(unsafe.Pointer(pConfig)).FabUnindexed + uintptr(i))) != 0 {
- Xsqlite3_snprintf(tls, nDefn-iOff, zDefn+uintptr(iOff), __ccgo_ts+39271, libc.VaList(bp+8, i))
+ Xsqlite3_snprintf(tls, nDefn-iOff, zDefn+uintptr(iOff), __ccgo_ts+39378, libc.VaList(bp+8, i))
iOff += libc.Int32FromUint32(libc.Xstrlen(tls, zDefn+uintptr(iOff)))
}
goto _2
@@ -220203,7 +220681,7 @@ func _sqlite3Fts5StorageOpen(tls *libc.TLS, pConfig uintptr, pIndex uintptr, bCr
break
}
if libc.Int32FromUint8(*(*Tu8)(unsafe.Pointer((*TFts5Config)(unsafe.Pointer(pConfig)).FabUnindexed + uintptr(i)))) == 0 {
- Xsqlite3_snprintf(tls, nDefn-iOff, zDefn+uintptr(iOff), __ccgo_ts+39277, libc.VaList(bp+8, i))
+ Xsqlite3_snprintf(tls, nDefn-iOff, zDefn+uintptr(iOff), __ccgo_ts+39384, libc.VaList(bp+8, i))
iOff += libc.Int32FromUint32(libc.Xstrlen(tls, zDefn+uintptr(iOff)))
}
goto _3
@@ -220212,22 +220690,22 @@ func _sqlite3Fts5StorageOpen(tls *libc.TLS, pConfig uintptr, pIndex uintptr, bCr
i++
}
}
- rc = _sqlite3Fts5CreateTable(tls, pConfig, __ccgo_ts+35497, zDefn, 0, pzErr)
+ rc = _sqlite3Fts5CreateTable(tls, pConfig, __ccgo_ts+35604, zDefn, 0, pzErr)
}
Xsqlite3_free(tls, zDefn)
}
if rc == SQLITE_OK && (*TFts5Config)(unsafe.Pointer(pConfig)).FbColumnsize != 0 {
- zCols = __ccgo_ts + 39283
+ zCols = __ccgo_ts + 39390
if (*TFts5Config)(unsafe.Pointer(pConfig)).FbContentlessDelete != 0 {
- zCols = __ccgo_ts + 39315
+ zCols = __ccgo_ts + 39422
}
- rc = _sqlite3Fts5CreateTable(tls, pConfig, __ccgo_ts+36192, zCols, 0, pzErr)
+ rc = _sqlite3Fts5CreateTable(tls, pConfig, __ccgo_ts+36299, zCols, 0, pzErr)
}
if rc == SQLITE_OK {
- rc = _sqlite3Fts5CreateTable(tls, pConfig, __ccgo_ts+38286, __ccgo_ts+39363, int32(1), pzErr)
+ rc = _sqlite3Fts5CreateTable(tls, pConfig, __ccgo_ts+38393, __ccgo_ts+39470, int32(1), pzErr)
}
if rc == SQLITE_OK {
- rc = _sqlite3Fts5StorageConfigValue(tls, p, __ccgo_ts+36374, uintptr(0), int32(FTS5_CURRENT_VERSION))
+ rc = _sqlite3Fts5StorageConfigValue(tls, p, __ccgo_ts+36481, uintptr(0), int32(FTS5_CURRENT_VERSION))
}
}
if rc != 0 {
@@ -220647,12 +221125,12 @@ func _sqlite3Fts5StorageDeleteAll(tls *libc.TLS, p uintptr) (r int32) {
pConfig = (*TFts5Storage)(unsafe.Pointer(p)).FpConfig
(*TFts5Storage)(unsafe.Pointer(p)).FbTotalsValid = 0
/* Delete the contents of the %_data and %_docsize tables. */
- rc = _fts5ExecPrintf(tls, (*TFts5Config)(unsafe.Pointer(pConfig)).Fdb, uintptr(0), __ccgo_ts+39380, libc.VaList(bp+8, (*TFts5Config)(unsafe.Pointer(pConfig)).FzDb, (*TFts5Config)(unsafe.Pointer(pConfig)).FzName, (*TFts5Config)(unsafe.Pointer(pConfig)).FzDb, (*TFts5Config)(unsafe.Pointer(pConfig)).FzName))
+ rc = _fts5ExecPrintf(tls, (*TFts5Config)(unsafe.Pointer(pConfig)).Fdb, uintptr(0), __ccgo_ts+39487, libc.VaList(bp+8, (*TFts5Config)(unsafe.Pointer(pConfig)).FzDb, (*TFts5Config)(unsafe.Pointer(pConfig)).FzName, (*TFts5Config)(unsafe.Pointer(pConfig)).FzDb, (*TFts5Config)(unsafe.Pointer(pConfig)).FzName))
if rc == SQLITE_OK && (*TFts5Config)(unsafe.Pointer(pConfig)).FbColumnsize != 0 {
- rc = _fts5ExecPrintf(tls, (*TFts5Config)(unsafe.Pointer(pConfig)).Fdb, uintptr(0), __ccgo_ts+39430, libc.VaList(bp+8, (*TFts5Config)(unsafe.Pointer(pConfig)).FzDb, (*TFts5Config)(unsafe.Pointer(pConfig)).FzName))
+ rc = _fts5ExecPrintf(tls, (*TFts5Config)(unsafe.Pointer(pConfig)).Fdb, uintptr(0), __ccgo_ts+39537, libc.VaList(bp+8, (*TFts5Config)(unsafe.Pointer(pConfig)).FzDb, (*TFts5Config)(unsafe.Pointer(pConfig)).FzName))
}
if rc == SQLITE_OK && (*TFts5Config)(unsafe.Pointer(pConfig)).FeContent == int32(FTS5_CONTENT_UNINDEXED) {
- rc = _fts5ExecPrintf(tls, (*TFts5Config)(unsafe.Pointer(pConfig)).Fdb, uintptr(0), __ccgo_ts+39459, libc.VaList(bp+8, (*TFts5Config)(unsafe.Pointer(pConfig)).FzDb, (*TFts5Config)(unsafe.Pointer(pConfig)).FzName))
+ rc = _fts5ExecPrintf(tls, (*TFts5Config)(unsafe.Pointer(pConfig)).Fdb, uintptr(0), __ccgo_ts+39566, libc.VaList(bp+8, (*TFts5Config)(unsafe.Pointer(pConfig)).FzDb, (*TFts5Config)(unsafe.Pointer(pConfig)).FzName))
}
/* Reinitialize the %_data table. This call creates the initial structure
** and averages records. */
@@ -220660,7 +221138,7 @@ func _sqlite3Fts5StorageDeleteAll(tls *libc.TLS, p uintptr) (r int32) {
rc = _sqlite3Fts5IndexReinit(tls, (*TFts5Storage)(unsafe.Pointer(p)).FpIndex)
}
if rc == SQLITE_OK {
- rc = _sqlite3Fts5StorageConfigValue(tls, p, __ccgo_ts+36374, uintptr(0), int32(FTS5_CURRENT_VERSION))
+ rc = _sqlite3Fts5StorageConfigValue(tls, p, __ccgo_ts+36481, uintptr(0), int32(FTS5_CURRENT_VERSION))
}
return rc
}
@@ -220962,7 +221440,7 @@ func _fts5StorageCount(tls *libc.TLS, p uintptr, zSuffix uintptr, pnRow uintptr)
var _ /* pCnt at bp+0 */ uintptr
_, _, _ = pConfig, rc, zSql
pConfig = (*TFts5Storage)(unsafe.Pointer(p)).FpConfig
- zSql = Xsqlite3_mprintf(tls, __ccgo_ts+39488, libc.VaList(bp+16, (*TFts5Config)(unsafe.Pointer(pConfig)).FzDb, (*TFts5Config)(unsafe.Pointer(pConfig)).FzName, zSuffix))
+ zSql = Xsqlite3_mprintf(tls, __ccgo_ts+39595, libc.VaList(bp+16, (*TFts5Config)(unsafe.Pointer(pConfig)).FzDb, (*TFts5Config)(unsafe.Pointer(pConfig)).FzName, zSuffix))
if zSql == uintptr(0) {
rc = int32(SQLITE_NOMEM)
} else {
@@ -221194,14 +221672,14 @@ func _sqlite3Fts5StorageIntegrity(tls *libc.TLS, p uintptr, iArg int32) (r int32
** number of rows. */
if rc == SQLITE_OK && (*TFts5Config)(unsafe.Pointer(pConfig)).FeContent == FTS5_CONTENT_NORMAL {
*(*Ti64)(unsafe.Pointer(bp + 56)) = 0
- rc = _fts5StorageCount(tls, p, __ccgo_ts+35497, bp+56)
+ rc = _fts5StorageCount(tls, p, __ccgo_ts+35604, bp+56)
if rc == SQLITE_OK && *(*Ti64)(unsafe.Pointer(bp + 56)) != (*TFts5Storage)(unsafe.Pointer(p)).FnTotalRow {
rc = libc.Int32FromInt32(SQLITE_CORRUPT) | libc.Int32FromInt32(1)<<libc.Int32FromInt32(8)
}
}
if rc == SQLITE_OK && (*TFts5Config)(unsafe.Pointer(pConfig)).FbColumnsize != 0 {
*(*Ti64)(unsafe.Pointer(bp + 64)) = 0
- rc = _fts5StorageCount(tls, p, __ccgo_ts+36192, bp+64)
+ rc = _fts5StorageCount(tls, p, __ccgo_ts+36299, bp+64)
if rc == SQLITE_OK && *(*Ti64)(unsafe.Pointer(bp + 64)) != (*TFts5Storage)(unsafe.Pointer(p)).FnTotalRow {
rc = libc.Int32FromInt32(SQLITE_CORRUPT) | libc.Int32FromInt32(1)<<libc.Int32FromInt32(8)
}
@@ -221570,10 +222048,10 @@ func _fts5AsciiCreate(tls *libc.TLS, pUnused uintptr, azArg uintptr, nArg int32,
break
}
zArg = *(*uintptr)(unsafe.Pointer(azArg + uintptr(i+int32(1))*4))
- if 0 == Xsqlite3_stricmp(tls, *(*uintptr)(unsafe.Pointer(azArg + uintptr(i)*4)), __ccgo_ts+39520) {
+ if 0 == Xsqlite3_stricmp(tls, *(*uintptr)(unsafe.Pointer(azArg + uintptr(i)*4)), __ccgo_ts+39627) {
_fts5AsciiAddExceptions(tls, p, zArg, int32(1))
} else {
- if 0 == Xsqlite3_stricmp(tls, *(*uintptr)(unsafe.Pointer(azArg + uintptr(i)*4)), __ccgo_ts+39531) {
+ if 0 == Xsqlite3_stricmp(tls, *(*uintptr)(unsafe.Pointer(azArg + uintptr(i)*4)), __ccgo_ts+39638) {
_fts5AsciiAddExceptions(tls, p, zArg, 0)
} else {
rc = int32(SQLITE_ERROR)
@@ -221853,7 +222331,7 @@ func _fts5UnicodeCreate(tls *libc.TLS, pUnused uintptr, azArg uintptr, nArg int3
} else {
p = Xsqlite3_malloc(tls, int32(180))
if p != 0 {
- zCat = __ccgo_ts + 39542
+ zCat = __ccgo_ts + 39649
libc.Xmemset(tls, p, 0, uint32(180))
(*TUnicode61Tokenizer)(unsafe.Pointer(p)).FeRemoveDiacritic = int32(FTS5_REMOVE_DIACRITICS_SIMPLE)
(*TUnicode61Tokenizer)(unsafe.Pointer(p)).FnFold = int32(64)
@@ -221867,7 +222345,7 @@ func _fts5UnicodeCreate(tls *libc.TLS, pUnused uintptr, azArg uintptr, nArg int3
if !(rc == SQLITE_OK && i < nArg) {
break
}
- if 0 == Xsqlite3_stricmp(tls, *(*uintptr)(unsafe.Pointer(azArg + uintptr(i)*4)), __ccgo_ts+39551) {
+ if 0 == Xsqlite3_stricmp(tls, *(*uintptr)(unsafe.Pointer(azArg + uintptr(i)*4)), __ccgo_ts+39658) {
zCat = *(*uintptr)(unsafe.Pointer(azArg + uintptr(i+int32(1))*4))
}
goto _1
@@ -221884,20 +222362,20 @@ func _fts5UnicodeCreate(tls *libc.TLS, pUnused uintptr, azArg uintptr, nArg int3
break
}
zArg = *(*uintptr)(unsafe.Pointer(azArg + uintptr(i+int32(1))*4))
- if 0 == Xsqlite3_stricmp(tls, *(*uintptr)(unsafe.Pointer(azArg + uintptr(i)*4)), __ccgo_ts+39562) {
+ if 0 == Xsqlite3_stricmp(tls, *(*uintptr)(unsafe.Pointer(azArg + uintptr(i)*4)), __ccgo_ts+39669) {
if int32(*(*int8)(unsafe.Pointer(zArg))) != int32('0') && int32(*(*int8)(unsafe.Pointer(zArg))) != int32('1') && int32(*(*int8)(unsafe.Pointer(zArg))) != int32('2') || *(*int8)(unsafe.Pointer(zArg + 1)) != 0 {
rc = int32(SQLITE_ERROR)
} else {
(*TUnicode61Tokenizer)(unsafe.Pointer(p)).FeRemoveDiacritic = int32(*(*int8)(unsafe.Pointer(zArg))) - int32('0')
}
} else {
- if 0 == Xsqlite3_stricmp(tls, *(*uintptr)(unsafe.Pointer(azArg + uintptr(i)*4)), __ccgo_ts+39520) {
+ if 0 == Xsqlite3_stricmp(tls, *(*uintptr)(unsafe.Pointer(azArg + uintptr(i)*4)), __ccgo_ts+39627) {
rc = _fts5UnicodeAddExceptions(tls, p, zArg, int32(1))
} else {
- if 0 == Xsqlite3_stricmp(tls, *(*uintptr)(unsafe.Pointer(azArg + uintptr(i)*4)), __ccgo_ts+39531) {
+ if 0 == Xsqlite3_stricmp(tls, *(*uintptr)(unsafe.Pointer(azArg + uintptr(i)*4)), __ccgo_ts+39638) {
rc = _fts5UnicodeAddExceptions(tls, p, zArg, 0)
} else {
- if 0 == Xsqlite3_stricmp(tls, *(*uintptr)(unsafe.Pointer(azArg + uintptr(i)*4)), __ccgo_ts+39551) {
+ if 0 == Xsqlite3_stricmp(tls, *(*uintptr)(unsafe.Pointer(azArg + uintptr(i)*4)), __ccgo_ts+39658) {
/* no-op */
} else {
rc = int32(SQLITE_ERROR)
@@ -222189,7 +222667,7 @@ func _fts5PorterCreate(tls *libc.TLS, pCtx uintptr, azArg uintptr, nArg int32, p
pApi = pCtx
rc = SQLITE_OK
*(*uintptr)(unsafe.Pointer(bp)) = uintptr(0)
- zBase = __ccgo_ts + 39580
+ zBase = __ccgo_ts + 39687
*(*uintptr)(unsafe.Pointer(bp + 4)) = uintptr(0)
if nArg > 0 {
zBase = *(*uintptr)(unsafe.Pointer(azArg))
@@ -222406,64 +222884,64 @@ func _fts5PorterStep4(tls *libc.TLS, aBuf uintptr, pnBuf uintptr) (r int32) {
nBuf = *(*int32)(unsafe.Pointer(pnBuf))
switch int32(*(*int8)(unsafe.Pointer(aBuf + uintptr(nBuf-int32(2))))) {
case int32('a'):
- if nBuf > int32(2) && 0 == libc.Xmemcmp(tls, __ccgo_ts+39590, aBuf+uintptr(nBuf-int32(2)), uint32(2)) {
+ if nBuf > int32(2) && 0 == libc.Xmemcmp(tls, __ccgo_ts+39697, aBuf+uintptr(nBuf-int32(2)), uint32(2)) {
if _fts5Porter_MGt1(tls, aBuf, nBuf-int32(2)) != 0 {
*(*int32)(unsafe.Pointer(pnBuf)) = nBuf - int32(2)
}
}
case int32('c'):
- if nBuf > int32(4) && 0 == libc.Xmemcmp(tls, __ccgo_ts+39593, aBuf+uintptr(nBuf-int32(4)), uint32(4)) {
+ if nBuf > int32(4) && 0 == libc.Xmemcmp(tls, __ccgo_ts+39700, aBuf+uintptr(nBuf-int32(4)), uint32(4)) {
if _fts5Porter_MGt1(tls, aBuf, nBuf-int32(4)) != 0 {
*(*int32)(unsafe.Pointer(pnBuf)) = nBuf - int32(4)
}
} else {
- if nBuf > int32(4) && 0 == libc.Xmemcmp(tls, __ccgo_ts+39598, aBuf+uintptr(nBuf-int32(4)), uint32(4)) {
+ if nBuf > int32(4) && 0 == libc.Xmemcmp(tls, __ccgo_ts+39705, aBuf+uintptr(nBuf-int32(4)), uint32(4)) {
if _fts5Porter_MGt1(tls, aBuf, nBuf-int32(4)) != 0 {
*(*int32)(unsafe.Pointer(pnBuf)) = nBuf - int32(4)
}
}
}
case int32('e'):
- if nBuf > int32(2) && 0 == libc.Xmemcmp(tls, __ccgo_ts+39603, aBuf+uintptr(nBuf-int32(2)), uint32(2)) {
+ if nBuf > int32(2) && 0 == libc.Xmemcmp(tls, __ccgo_ts+39710, aBuf+uintptr(nBuf-int32(2)), uint32(2)) {
if _fts5Porter_MGt1(tls, aBuf, nBuf-int32(2)) != 0 {
*(*int32)(unsafe.Pointer(pnBuf)) = nBuf - int32(2)
}
}
case int32('i'):
- if nBuf > int32(2) && 0 == libc.Xmemcmp(tls, __ccgo_ts+39606, aBuf+uintptr(nBuf-int32(2)), uint32(2)) {
+ if nBuf > int32(2) && 0 == libc.Xmemcmp(tls, __ccgo_ts+39713, aBuf+uintptr(nBuf-int32(2)), uint32(2)) {
if _fts5Porter_MGt1(tls, aBuf, nBuf-int32(2)) != 0 {
*(*int32)(unsafe.Pointer(pnBuf)) = nBuf - int32(2)
}
}
case int32('l'):
- if nBuf > int32(4) && 0 == libc.Xmemcmp(tls, __ccgo_ts+39609, aBuf+uintptr(nBuf-int32(4)), uint32(4)) {
+ if nBuf > int32(4) && 0 == libc.Xmemcmp(tls, __ccgo_ts+39716, aBuf+uintptr(nBuf-int32(4)), uint32(4)) {
if _fts5Porter_MGt1(tls, aBuf, nBuf-int32(4)) != 0 {
*(*int32)(unsafe.Pointer(pnBuf)) = nBuf - int32(4)
}
} else {
- if nBuf > int32(4) && 0 == libc.Xmemcmp(tls, __ccgo_ts+39614, aBuf+uintptr(nBuf-int32(4)), uint32(4)) {
+ if nBuf > int32(4) && 0 == libc.Xmemcmp(tls, __ccgo_ts+39721, aBuf+uintptr(nBuf-int32(4)), uint32(4)) {
if _fts5Porter_MGt1(tls, aBuf, nBuf-int32(4)) != 0 {
*(*int32)(unsafe.Pointer(pnBuf)) = nBuf - int32(4)
}
}
}
case int32('n'):
- if nBuf > int32(3) && 0 == libc.Xmemcmp(tls, __ccgo_ts+39619, aBuf+uintptr(nBuf-int32(3)), uint32(3)) {
+ if nBuf > int32(3) && 0 == libc.Xmemcmp(tls, __ccgo_ts+39726, aBuf+uintptr(nBuf-int32(3)), uint32(3)) {
if _fts5Porter_MGt1(tls, aBuf, nBuf-int32(3)) != 0 {
*(*int32)(unsafe.Pointer(pnBuf)) = nBuf - int32(3)
}
} else {
- if nBuf > int32(5) && 0 == libc.Xmemcmp(tls, __ccgo_ts+39623, aBuf+uintptr(nBuf-int32(5)), uint32(5)) {
+ if nBuf > int32(5) && 0 == libc.Xmemcmp(tls, __ccgo_ts+39730, aBuf+uintptr(nBuf-int32(5)), uint32(5)) {
if _fts5Porter_MGt1(tls, aBuf, nBuf-int32(5)) != 0 {
*(*int32)(unsafe.Pointer(pnBuf)) = nBuf - int32(5)
}
} else {
- if nBuf > int32(4) && 0 == libc.Xmemcmp(tls, __ccgo_ts+39629, aBuf+uintptr(nBuf-int32(4)), uint32(4)) {
+ if nBuf > int32(4) && 0 == libc.Xmemcmp(tls, __ccgo_ts+39736, aBuf+uintptr(nBuf-int32(4)), uint32(4)) {
if _fts5Porter_MGt1(tls, aBuf, nBuf-int32(4)) != 0 {
*(*int32)(unsafe.Pointer(pnBuf)) = nBuf - int32(4)
}
} else {
- if nBuf > int32(3) && 0 == libc.Xmemcmp(tls, __ccgo_ts+39634, aBuf+uintptr(nBuf-int32(3)), uint32(3)) {
+ if nBuf > int32(3) && 0 == libc.Xmemcmp(tls, __ccgo_ts+39741, aBuf+uintptr(nBuf-int32(3)), uint32(3)) {
if _fts5Porter_MGt1(tls, aBuf, nBuf-int32(3)) != 0 {
*(*int32)(unsafe.Pointer(pnBuf)) = nBuf - int32(3)
}
@@ -222472,49 +222950,49 @@ func _fts5PorterStep4(tls *libc.TLS, aBuf uintptr, pnBuf uintptr) (r int32) {
}
}
case int32('o'):
- if nBuf > int32(3) && 0 == libc.Xmemcmp(tls, __ccgo_ts+39638, aBuf+uintptr(nBuf-int32(3)), uint32(3)) {
+ if nBuf > int32(3) && 0 == libc.Xmemcmp(tls, __ccgo_ts+39745, aBuf+uintptr(nBuf-int32(3)), uint32(3)) {
if _fts5Porter_MGt1_and_S_or_T(tls, aBuf, nBuf-int32(3)) != 0 {
*(*int32)(unsafe.Pointer(pnBuf)) = nBuf - int32(3)
}
} else {
- if nBuf > int32(2) && 0 == libc.Xmemcmp(tls, __ccgo_ts+39642, aBuf+uintptr(nBuf-int32(2)), uint32(2)) {
+ if nBuf > int32(2) && 0 == libc.Xmemcmp(tls, __ccgo_ts+39749, aBuf+uintptr(nBuf-int32(2)), uint32(2)) {
if _fts5Porter_MGt1(tls, aBuf, nBuf-int32(2)) != 0 {
*(*int32)(unsafe.Pointer(pnBuf)) = nBuf - int32(2)
}
}
}
case int32('s'):
- if nBuf > int32(3) && 0 == libc.Xmemcmp(tls, __ccgo_ts+39645, aBuf+uintptr(nBuf-int32(3)), uint32(3)) {
+ if nBuf > int32(3) && 0 == libc.Xmemcmp(tls, __ccgo_ts+39752, aBuf+uintptr(nBuf-int32(3)), uint32(3)) {
if _fts5Porter_MGt1(tls, aBuf, nBuf-int32(3)) != 0 {
*(*int32)(unsafe.Pointer(pnBuf)) = nBuf - int32(3)
}
}
case int32('t'):
- if nBuf > int32(3) && 0 == libc.Xmemcmp(tls, __ccgo_ts+39649, aBuf+uintptr(nBuf-int32(3)), uint32(3)) {
+ if nBuf > int32(3) && 0 == libc.Xmemcmp(tls, __ccgo_ts+39756, aBuf+uintptr(nBuf-int32(3)), uint32(3)) {
if _fts5Porter_MGt1(tls, aBuf, nBuf-int32(3)) != 0 {
*(*int32)(unsafe.Pointer(pnBuf)) = nBuf - int32(3)
}
} else {
- if nBuf > int32(3) && 0 == libc.Xmemcmp(tls, __ccgo_ts+39653, aBuf+uintptr(nBuf-int32(3)), uint32(3)) {
+ if nBuf > int32(3) && 0 == libc.Xmemcmp(tls, __ccgo_ts+39760, aBuf+uintptr(nBuf-int32(3)), uint32(3)) {
if _fts5Porter_MGt1(tls, aBuf, nBuf-int32(3)) != 0 {
*(*int32)(unsafe.Pointer(pnBuf)) = nBuf - int32(3)
}
}
}
case int32('u'):
- if nBuf > int32(3) && 0 == libc.Xmemcmp(tls, __ccgo_ts+39657, aBuf+uintptr(nBuf-int32(3)), uint32(3)) {
+ if nBuf > int32(3) && 0 == libc.Xmemcmp(tls, __ccgo_ts+39764, aBuf+uintptr(nBuf-int32(3)), uint32(3)) {
if _fts5Porter_MGt1(tls, aBuf, nBuf-int32(3)) != 0 {
*(*int32)(unsafe.Pointer(pnBuf)) = nBuf - int32(3)
}
}
case int32('v'):
- if nBuf > int32(3) && 0 == libc.Xmemcmp(tls, __ccgo_ts+39661, aBuf+uintptr(nBuf-int32(3)), uint32(3)) {
+ if nBuf > int32(3) && 0 == libc.Xmemcmp(tls, __ccgo_ts+39768, aBuf+uintptr(nBuf-int32(3)), uint32(3)) {
if _fts5Porter_MGt1(tls, aBuf, nBuf-int32(3)) != 0 {
*(*int32)(unsafe.Pointer(pnBuf)) = nBuf - int32(3)
}
}
case int32('z'):
- if nBuf > int32(3) && 0 == libc.Xmemcmp(tls, __ccgo_ts+39665, aBuf+uintptr(nBuf-int32(3)), uint32(3)) {
+ if nBuf > int32(3) && 0 == libc.Xmemcmp(tls, __ccgo_ts+39772, aBuf+uintptr(nBuf-int32(3)), uint32(3)) {
if _fts5Porter_MGt1(tls, aBuf, nBuf-int32(3)) != 0 {
*(*int32)(unsafe.Pointer(pnBuf)) = nBuf - int32(3)
}
@@ -222531,20 +223009,20 @@ func _fts5PorterStep1B2(tls *libc.TLS, aBuf uintptr, pnBuf uintptr) (r int32) {
nBuf = *(*int32)(unsafe.Pointer(pnBuf))
switch int32(*(*int8)(unsafe.Pointer(aBuf + uintptr(nBuf-int32(2))))) {
case int32('a'):
- if nBuf > int32(2) && 0 == libc.Xmemcmp(tls, __ccgo_ts+39669, aBuf+uintptr(nBuf-int32(2)), uint32(2)) {
- libc.Xmemcpy(tls, aBuf+uintptr(nBuf-int32(2)), __ccgo_ts+39649, uint32(3))
+ if nBuf > int32(2) && 0 == libc.Xmemcmp(tls, __ccgo_ts+39776, aBuf+uintptr(nBuf-int32(2)), uint32(2)) {
+ libc.Xmemcpy(tls, aBuf+uintptr(nBuf-int32(2)), __ccgo_ts+39756, uint32(3))
*(*int32)(unsafe.Pointer(pnBuf)) = nBuf - int32(2) + int32(3)
ret = int32(1)
}
case int32('b'):
- if nBuf > int32(2) && 0 == libc.Xmemcmp(tls, __ccgo_ts+39672, aBuf+uintptr(nBuf-int32(2)), uint32(2)) {
- libc.Xmemcpy(tls, aBuf+uintptr(nBuf-int32(2)), __ccgo_ts+39675, uint32(3))
+ if nBuf > int32(2) && 0 == libc.Xmemcmp(tls, __ccgo_ts+39779, aBuf+uintptr(nBuf-int32(2)), uint32(2)) {
+ libc.Xmemcpy(tls, aBuf+uintptr(nBuf-int32(2)), __ccgo_ts+39782, uint32(3))
*(*int32)(unsafe.Pointer(pnBuf)) = nBuf - int32(2) + int32(3)
ret = int32(1)
}
case int32('i'):
- if nBuf > int32(2) && 0 == libc.Xmemcmp(tls, __ccgo_ts+39679, aBuf+uintptr(nBuf-int32(2)), uint32(2)) {
- libc.Xmemcpy(tls, aBuf+uintptr(nBuf-int32(2)), __ccgo_ts+39665, uint32(3))
+ if nBuf > int32(2) && 0 == libc.Xmemcmp(tls, __ccgo_ts+39786, aBuf+uintptr(nBuf-int32(2)), uint32(2)) {
+ libc.Xmemcpy(tls, aBuf+uintptr(nBuf-int32(2)), __ccgo_ts+39772, uint32(3))
*(*int32)(unsafe.Pointer(pnBuf)) = nBuf - int32(2) + int32(3)
ret = int32(1)
}
@@ -222560,75 +223038,75 @@ func _fts5PorterStep2(tls *libc.TLS, aBuf uintptr, pnBuf uintptr) (r int32) {
nBuf = *(*int32)(unsafe.Pointer(pnBuf))
switch int32(*(*int8)(unsafe.Pointer(aBuf + uintptr(nBuf-int32(2))))) {
case int32('a'):
- if nBuf > int32(7) && 0 == libc.Xmemcmp(tls, __ccgo_ts+39682, aBuf+uintptr(nBuf-int32(7)), uint32(7)) {
+ if nBuf > int32(7) && 0 == libc.Xmemcmp(tls, __ccgo_ts+39789, aBuf+uintptr(nBuf-int32(7)), uint32(7)) {
if _fts5Porter_MGt0(tls, aBuf, nBuf-int32(7)) != 0 {
- libc.Xmemcpy(tls, aBuf+uintptr(nBuf-int32(7)), __ccgo_ts+39649, uint32(3))
+ libc.Xmemcpy(tls, aBuf+uintptr(nBuf-int32(7)), __ccgo_ts+39756, uint32(3))
*(*int32)(unsafe.Pointer(pnBuf)) = nBuf - int32(7) + int32(3)
}
} else {
- if nBuf > int32(6) && 0 == libc.Xmemcmp(tls, __ccgo_ts+39690, aBuf+uintptr(nBuf-int32(6)), uint32(6)) {
+ if nBuf > int32(6) && 0 == libc.Xmemcmp(tls, __ccgo_ts+39797, aBuf+uintptr(nBuf-int32(6)), uint32(6)) {
if _fts5Porter_MGt0(tls, aBuf, nBuf-int32(6)) != 0 {
- libc.Xmemcpy(tls, aBuf+uintptr(nBuf-int32(6)), __ccgo_ts+39697, uint32(4))
+ libc.Xmemcpy(tls, aBuf+uintptr(nBuf-int32(6)), __ccgo_ts+39804, uint32(4))
*(*int32)(unsafe.Pointer(pnBuf)) = nBuf - int32(6) + int32(4)
}
}
}
case int32('c'):
- if nBuf > int32(4) && 0 == libc.Xmemcmp(tls, __ccgo_ts+39702, aBuf+uintptr(nBuf-int32(4)), uint32(4)) {
+ if nBuf > int32(4) && 0 == libc.Xmemcmp(tls, __ccgo_ts+39809, aBuf+uintptr(nBuf-int32(4)), uint32(4)) {
if _fts5Porter_MGt0(tls, aBuf, nBuf-int32(4)) != 0 {
- libc.Xmemcpy(tls, aBuf+uintptr(nBuf-int32(4)), __ccgo_ts+39598, uint32(4))
+ libc.Xmemcpy(tls, aBuf+uintptr(nBuf-int32(4)), __ccgo_ts+39705, uint32(4))
*(*int32)(unsafe.Pointer(pnBuf)) = nBuf - int32(4) + int32(4)
}
} else {
- if nBuf > int32(4) && 0 == libc.Xmemcmp(tls, __ccgo_ts+39707, aBuf+uintptr(nBuf-int32(4)), uint32(4)) {
+ if nBuf > int32(4) && 0 == libc.Xmemcmp(tls, __ccgo_ts+39814, aBuf+uintptr(nBuf-int32(4)), uint32(4)) {
if _fts5Porter_MGt0(tls, aBuf, nBuf-int32(4)) != 0 {
- libc.Xmemcpy(tls, aBuf+uintptr(nBuf-int32(4)), __ccgo_ts+39593, uint32(4))
+ libc.Xmemcpy(tls, aBuf+uintptr(nBuf-int32(4)), __ccgo_ts+39700, uint32(4))
*(*int32)(unsafe.Pointer(pnBuf)) = nBuf - int32(4) + int32(4)
}
}
}
case int32('e'):
- if nBuf > int32(4) && 0 == libc.Xmemcmp(tls, __ccgo_ts+39712, aBuf+uintptr(nBuf-int32(4)), uint32(4)) {
+ if nBuf > int32(4) && 0 == libc.Xmemcmp(tls, __ccgo_ts+39819, aBuf+uintptr(nBuf-int32(4)), uint32(4)) {
if _fts5Porter_MGt0(tls, aBuf, nBuf-int32(4)) != 0 {
- libc.Xmemcpy(tls, aBuf+uintptr(nBuf-int32(4)), __ccgo_ts+39665, uint32(3))
+ libc.Xmemcpy(tls, aBuf+uintptr(nBuf-int32(4)), __ccgo_ts+39772, uint32(3))
*(*int32)(unsafe.Pointer(pnBuf)) = nBuf - int32(4) + int32(3)
}
}
case int32('g'):
- if nBuf > int32(4) && 0 == libc.Xmemcmp(tls, __ccgo_ts+39717, aBuf+uintptr(nBuf-int32(4)), uint32(4)) {
+ if nBuf > int32(4) && 0 == libc.Xmemcmp(tls, __ccgo_ts+39824, aBuf+uintptr(nBuf-int32(4)), uint32(4)) {
if _fts5Porter_MGt0(tls, aBuf, nBuf-int32(4)) != 0 {
- libc.Xmemcpy(tls, aBuf+uintptr(nBuf-int32(4)), __ccgo_ts+16052, uint32(3))
+ libc.Xmemcpy(tls, aBuf+uintptr(nBuf-int32(4)), __ccgo_ts+16124, uint32(3))
*(*int32)(unsafe.Pointer(pnBuf)) = nBuf - int32(4) + int32(3)
}
}
case int32('l'):
- if nBuf > int32(3) && 0 == libc.Xmemcmp(tls, __ccgo_ts+39722, aBuf+uintptr(nBuf-int32(3)), uint32(3)) {
+ if nBuf > int32(3) && 0 == libc.Xmemcmp(tls, __ccgo_ts+39829, aBuf+uintptr(nBuf-int32(3)), uint32(3)) {
if _fts5Porter_MGt0(tls, aBuf, nBuf-int32(3)) != 0 {
- libc.Xmemcpy(tls, aBuf+uintptr(nBuf-int32(3)), __ccgo_ts+39675, uint32(3))
+ libc.Xmemcpy(tls, aBuf+uintptr(nBuf-int32(3)), __ccgo_ts+39782, uint32(3))
*(*int32)(unsafe.Pointer(pnBuf)) = nBuf - int32(3) + int32(3)
}
} else {
- if nBuf > int32(4) && 0 == libc.Xmemcmp(tls, __ccgo_ts+39726, aBuf+uintptr(nBuf-int32(4)), uint32(4)) {
+ if nBuf > int32(4) && 0 == libc.Xmemcmp(tls, __ccgo_ts+39833, aBuf+uintptr(nBuf-int32(4)), uint32(4)) {
if _fts5Porter_MGt0(tls, aBuf, nBuf-int32(4)) != 0 {
- libc.Xmemcpy(tls, aBuf+uintptr(nBuf-int32(4)), __ccgo_ts+39590, uint32(2))
+ libc.Xmemcpy(tls, aBuf+uintptr(nBuf-int32(4)), __ccgo_ts+39697, uint32(2))
*(*int32)(unsafe.Pointer(pnBuf)) = nBuf - int32(4) + int32(2)
}
} else {
- if nBuf > int32(5) && 0 == libc.Xmemcmp(tls, __ccgo_ts+39731, aBuf+uintptr(nBuf-int32(5)), uint32(5)) {
+ if nBuf > int32(5) && 0 == libc.Xmemcmp(tls, __ccgo_ts+39838, aBuf+uintptr(nBuf-int32(5)), uint32(5)) {
if _fts5Porter_MGt0(tls, aBuf, nBuf-int32(5)) != 0 {
- libc.Xmemcpy(tls, aBuf+uintptr(nBuf-int32(5)), __ccgo_ts+39634, uint32(3))
+ libc.Xmemcpy(tls, aBuf+uintptr(nBuf-int32(5)), __ccgo_ts+39741, uint32(3))
*(*int32)(unsafe.Pointer(pnBuf)) = nBuf - int32(5) + int32(3)
}
} else {
- if nBuf > int32(3) && 0 == libc.Xmemcmp(tls, __ccgo_ts+39737, aBuf+uintptr(nBuf-int32(3)), uint32(3)) {
+ if nBuf > int32(3) && 0 == libc.Xmemcmp(tls, __ccgo_ts+39844, aBuf+uintptr(nBuf-int32(3)), uint32(3)) {
if _fts5Porter_MGt0(tls, aBuf, nBuf-int32(3)) != 0 {
- libc.Xmemcpy(tls, aBuf+uintptr(nBuf-int32(3)), __ccgo_ts+39741, uint32(1))
+ libc.Xmemcpy(tls, aBuf+uintptr(nBuf-int32(3)), __ccgo_ts+39848, uint32(1))
*(*int32)(unsafe.Pointer(pnBuf)) = nBuf - int32(3) + int32(1)
}
} else {
- if nBuf > int32(5) && 0 == libc.Xmemcmp(tls, __ccgo_ts+39743, aBuf+uintptr(nBuf-int32(5)), uint32(5)) {
+ if nBuf > int32(5) && 0 == libc.Xmemcmp(tls, __ccgo_ts+39850, aBuf+uintptr(nBuf-int32(5)), uint32(5)) {
if _fts5Porter_MGt0(tls, aBuf, nBuf-int32(5)) != 0 {
- libc.Xmemcpy(tls, aBuf+uintptr(nBuf-int32(5)), __ccgo_ts+39657, uint32(3))
+ libc.Xmemcpy(tls, aBuf+uintptr(nBuf-int32(5)), __ccgo_ts+39764, uint32(3))
*(*int32)(unsafe.Pointer(pnBuf)) = nBuf - int32(5) + int32(3)
}
}
@@ -222637,48 +223115,48 @@ func _fts5PorterStep2(tls *libc.TLS, aBuf uintptr, pnBuf uintptr) (r int32) {
}
}
case int32('o'):
- if nBuf > int32(7) && 0 == libc.Xmemcmp(tls, __ccgo_ts+39749, aBuf+uintptr(nBuf-int32(7)), uint32(7)) {
+ if nBuf > int32(7) && 0 == libc.Xmemcmp(tls, __ccgo_ts+39856, aBuf+uintptr(nBuf-int32(7)), uint32(7)) {
if _fts5Porter_MGt0(tls, aBuf, nBuf-int32(7)) != 0 {
- libc.Xmemcpy(tls, aBuf+uintptr(nBuf-int32(7)), __ccgo_ts+39665, uint32(3))
+ libc.Xmemcpy(tls, aBuf+uintptr(nBuf-int32(7)), __ccgo_ts+39772, uint32(3))
*(*int32)(unsafe.Pointer(pnBuf)) = nBuf - int32(7) + int32(3)
}
} else {
- if nBuf > int32(5) && 0 == libc.Xmemcmp(tls, __ccgo_ts+39757, aBuf+uintptr(nBuf-int32(5)), uint32(5)) {
+ if nBuf > int32(5) && 0 == libc.Xmemcmp(tls, __ccgo_ts+39864, aBuf+uintptr(nBuf-int32(5)), uint32(5)) {
if _fts5Porter_MGt0(tls, aBuf, nBuf-int32(5)) != 0 {
- libc.Xmemcpy(tls, aBuf+uintptr(nBuf-int32(5)), __ccgo_ts+39649, uint32(3))
+ libc.Xmemcpy(tls, aBuf+uintptr(nBuf-int32(5)), __ccgo_ts+39756, uint32(3))
*(*int32)(unsafe.Pointer(pnBuf)) = nBuf - int32(5) + int32(3)
}
} else {
- if nBuf > int32(4) && 0 == libc.Xmemcmp(tls, __ccgo_ts+39763, aBuf+uintptr(nBuf-int32(4)), uint32(4)) {
+ if nBuf > int32(4) && 0 == libc.Xmemcmp(tls, __ccgo_ts+39870, aBuf+uintptr(nBuf-int32(4)), uint32(4)) {
if _fts5Porter_MGt0(tls, aBuf, nBuf-int32(4)) != 0 {
- libc.Xmemcpy(tls, aBuf+uintptr(nBuf-int32(4)), __ccgo_ts+39649, uint32(3))
+ libc.Xmemcpy(tls, aBuf+uintptr(nBuf-int32(4)), __ccgo_ts+39756, uint32(3))
*(*int32)(unsafe.Pointer(pnBuf)) = nBuf - int32(4) + int32(3)
}
}
}
}
case int32('s'):
- if nBuf > int32(5) && 0 == libc.Xmemcmp(tls, __ccgo_ts+39768, aBuf+uintptr(nBuf-int32(5)), uint32(5)) {
+ if nBuf > int32(5) && 0 == libc.Xmemcmp(tls, __ccgo_ts+39875, aBuf+uintptr(nBuf-int32(5)), uint32(5)) {
if _fts5Porter_MGt0(tls, aBuf, nBuf-int32(5)) != 0 {
- libc.Xmemcpy(tls, aBuf+uintptr(nBuf-int32(5)), __ccgo_ts+39590, uint32(2))
+ libc.Xmemcpy(tls, aBuf+uintptr(nBuf-int32(5)), __ccgo_ts+39697, uint32(2))
*(*int32)(unsafe.Pointer(pnBuf)) = nBuf - int32(5) + int32(2)
}
} else {
- if nBuf > int32(7) && 0 == libc.Xmemcmp(tls, __ccgo_ts+39774, aBuf+uintptr(nBuf-int32(7)), uint32(7)) {
+ if nBuf > int32(7) && 0 == libc.Xmemcmp(tls, __ccgo_ts+39881, aBuf+uintptr(nBuf-int32(7)), uint32(7)) {
if _fts5Porter_MGt0(tls, aBuf, nBuf-int32(7)) != 0 {
- libc.Xmemcpy(tls, aBuf+uintptr(nBuf-int32(7)), __ccgo_ts+39661, uint32(3))
+ libc.Xmemcpy(tls, aBuf+uintptr(nBuf-int32(7)), __ccgo_ts+39768, uint32(3))
*(*int32)(unsafe.Pointer(pnBuf)) = nBuf - int32(7) + int32(3)
}
} else {
- if nBuf > int32(7) && 0 == libc.Xmemcmp(tls, __ccgo_ts+39782, aBuf+uintptr(nBuf-int32(7)), uint32(7)) {
+ if nBuf > int32(7) && 0 == libc.Xmemcmp(tls, __ccgo_ts+39889, aBuf+uintptr(nBuf-int32(7)), uint32(7)) {
if _fts5Porter_MGt0(tls, aBuf, nBuf-int32(7)) != 0 {
- libc.Xmemcpy(tls, aBuf+uintptr(nBuf-int32(7)), __ccgo_ts+39790, uint32(3))
+ libc.Xmemcpy(tls, aBuf+uintptr(nBuf-int32(7)), __ccgo_ts+39897, uint32(3))
*(*int32)(unsafe.Pointer(pnBuf)) = nBuf - int32(7) + int32(3)
}
} else {
- if nBuf > int32(7) && 0 == libc.Xmemcmp(tls, __ccgo_ts+39794, aBuf+uintptr(nBuf-int32(7)), uint32(7)) {
+ if nBuf > int32(7) && 0 == libc.Xmemcmp(tls, __ccgo_ts+39901, aBuf+uintptr(nBuf-int32(7)), uint32(7)) {
if _fts5Porter_MGt0(tls, aBuf, nBuf-int32(7)) != 0 {
- libc.Xmemcpy(tls, aBuf+uintptr(nBuf-int32(7)), __ccgo_ts+39657, uint32(3))
+ libc.Xmemcpy(tls, aBuf+uintptr(nBuf-int32(7)), __ccgo_ts+39764, uint32(3))
*(*int32)(unsafe.Pointer(pnBuf)) = nBuf - int32(7) + int32(3)
}
}
@@ -222686,21 +223164,21 @@ func _fts5PorterStep2(tls *libc.TLS, aBuf uintptr, pnBuf uintptr) (r int32) {
}
}
case int32('t'):
- if nBuf > int32(5) && 0 == libc.Xmemcmp(tls, __ccgo_ts+39802, aBuf+uintptr(nBuf-int32(5)), uint32(5)) {
+ if nBuf > int32(5) && 0 == libc.Xmemcmp(tls, __ccgo_ts+39909, aBuf+uintptr(nBuf-int32(5)), uint32(5)) {
if _fts5Porter_MGt0(tls, aBuf, nBuf-int32(5)) != 0 {
- libc.Xmemcpy(tls, aBuf+uintptr(nBuf-int32(5)), __ccgo_ts+39590, uint32(2))
+ libc.Xmemcpy(tls, aBuf+uintptr(nBuf-int32(5)), __ccgo_ts+39697, uint32(2))
*(*int32)(unsafe.Pointer(pnBuf)) = nBuf - int32(5) + int32(2)
}
} else {
- if nBuf > int32(5) && 0 == libc.Xmemcmp(tls, __ccgo_ts+39808, aBuf+uintptr(nBuf-int32(5)), uint32(5)) {
+ if nBuf > int32(5) && 0 == libc.Xmemcmp(tls, __ccgo_ts+39915, aBuf+uintptr(nBuf-int32(5)), uint32(5)) {
if _fts5Porter_MGt0(tls, aBuf, nBuf-int32(5)) != 0 {
- libc.Xmemcpy(tls, aBuf+uintptr(nBuf-int32(5)), __ccgo_ts+39661, uint32(3))
+ libc.Xmemcpy(tls, aBuf+uintptr(nBuf-int32(5)), __ccgo_ts+39768, uint32(3))
*(*int32)(unsafe.Pointer(pnBuf)) = nBuf - int32(5) + int32(3)
}
} else {
- if nBuf > int32(6) && 0 == libc.Xmemcmp(tls, __ccgo_ts+39814, aBuf+uintptr(nBuf-int32(6)), uint32(6)) {
+ if nBuf > int32(6) && 0 == libc.Xmemcmp(tls, __ccgo_ts+39921, aBuf+uintptr(nBuf-int32(6)), uint32(6)) {
if _fts5Porter_MGt0(tls, aBuf, nBuf-int32(6)) != 0 {
- libc.Xmemcpy(tls, aBuf+uintptr(nBuf-int32(6)), __ccgo_ts+39675, uint32(3))
+ libc.Xmemcpy(tls, aBuf+uintptr(nBuf-int32(6)), __ccgo_ts+39782, uint32(3))
*(*int32)(unsafe.Pointer(pnBuf)) = nBuf - int32(6) + int32(3)
}
}
@@ -222718,48 +223196,48 @@ func _fts5PorterStep3(tls *libc.TLS, aBuf uintptr, pnBuf uintptr) (r int32) {
nBuf = *(*int32)(unsafe.Pointer(pnBuf))
switch int32(*(*int8)(unsafe.Pointer(aBuf + uintptr(nBuf-int32(2))))) {
case int32('a'):
- if nBuf > int32(4) && 0 == libc.Xmemcmp(tls, __ccgo_ts+39821, aBuf+uintptr(nBuf-int32(4)), uint32(4)) {
+ if nBuf > int32(4) && 0 == libc.Xmemcmp(tls, __ccgo_ts+39928, aBuf+uintptr(nBuf-int32(4)), uint32(4)) {
if _fts5Porter_MGt0(tls, aBuf, nBuf-int32(4)) != 0 {
- libc.Xmemcpy(tls, aBuf+uintptr(nBuf-int32(4)), __ccgo_ts+39606, uint32(2))
+ libc.Xmemcpy(tls, aBuf+uintptr(nBuf-int32(4)), __ccgo_ts+39713, uint32(2))
*(*int32)(unsafe.Pointer(pnBuf)) = nBuf - int32(4) + int32(2)
}
}
case int32('s'):
- if nBuf > int32(4) && 0 == libc.Xmemcmp(tls, __ccgo_ts+39826, aBuf+uintptr(nBuf-int32(4)), uint32(4)) {
+ if nBuf > int32(4) && 0 == libc.Xmemcmp(tls, __ccgo_ts+39933, aBuf+uintptr(nBuf-int32(4)), uint32(4)) {
if _fts5Porter_MGt0(tls, aBuf, nBuf-int32(4)) != 0 {
*(*int32)(unsafe.Pointer(pnBuf)) = nBuf - int32(4)
}
}
case int32('t'):
- if nBuf > int32(5) && 0 == libc.Xmemcmp(tls, __ccgo_ts+39831, aBuf+uintptr(nBuf-int32(5)), uint32(5)) {
+ if nBuf > int32(5) && 0 == libc.Xmemcmp(tls, __ccgo_ts+39938, aBuf+uintptr(nBuf-int32(5)), uint32(5)) {
if _fts5Porter_MGt0(tls, aBuf, nBuf-int32(5)) != 0 {
- libc.Xmemcpy(tls, aBuf+uintptr(nBuf-int32(5)), __ccgo_ts+39606, uint32(2))
+ libc.Xmemcpy(tls, aBuf+uintptr(nBuf-int32(5)), __ccgo_ts+39713, uint32(2))
*(*int32)(unsafe.Pointer(pnBuf)) = nBuf - int32(5) + int32(2)
}
} else {
- if nBuf > int32(5) && 0 == libc.Xmemcmp(tls, __ccgo_ts+39837, aBuf+uintptr(nBuf-int32(5)), uint32(5)) {
+ if nBuf > int32(5) && 0 == libc.Xmemcmp(tls, __ccgo_ts+39944, aBuf+uintptr(nBuf-int32(5)), uint32(5)) {
if _fts5Porter_MGt0(tls, aBuf, nBuf-int32(5)) != 0 {
- libc.Xmemcpy(tls, aBuf+uintptr(nBuf-int32(5)), __ccgo_ts+39606, uint32(2))
+ libc.Xmemcpy(tls, aBuf+uintptr(nBuf-int32(5)), __ccgo_ts+39713, uint32(2))
*(*int32)(unsafe.Pointer(pnBuf)) = nBuf - int32(5) + int32(2)
}
}
}
case int32('u'):
- if nBuf > int32(3) && 0 == libc.Xmemcmp(tls, __ccgo_ts+39790, aBuf+uintptr(nBuf-int32(3)), uint32(3)) {
+ if nBuf > int32(3) && 0 == libc.Xmemcmp(tls, __ccgo_ts+39897, aBuf+uintptr(nBuf-int32(3)), uint32(3)) {
if _fts5Porter_MGt0(tls, aBuf, nBuf-int32(3)) != 0 {
*(*int32)(unsafe.Pointer(pnBuf)) = nBuf - int32(3)
}
}
case int32('v'):
- if nBuf > int32(5) && 0 == libc.Xmemcmp(tls, __ccgo_ts+39843, aBuf+uintptr(nBuf-int32(5)), uint32(5)) {
+ if nBuf > int32(5) && 0 == libc.Xmemcmp(tls, __ccgo_ts+39950, aBuf+uintptr(nBuf-int32(5)), uint32(5)) {
if _fts5Porter_MGt0(tls, aBuf, nBuf-int32(5)) != 0 {
*(*int32)(unsafe.Pointer(pnBuf)) = nBuf - int32(5)
}
}
case int32('z'):
- if nBuf > int32(5) && 0 == libc.Xmemcmp(tls, __ccgo_ts+39849, aBuf+uintptr(nBuf-int32(5)), uint32(5)) {
+ if nBuf > int32(5) && 0 == libc.Xmemcmp(tls, __ccgo_ts+39956, aBuf+uintptr(nBuf-int32(5)), uint32(5)) {
if _fts5Porter_MGt0(tls, aBuf, nBuf-int32(5)) != 0 {
- libc.Xmemcpy(tls, aBuf+uintptr(nBuf-int32(5)), __ccgo_ts+39590, uint32(2))
+ libc.Xmemcpy(tls, aBuf+uintptr(nBuf-int32(5)), __ccgo_ts+39697, uint32(2))
*(*int32)(unsafe.Pointer(pnBuf)) = nBuf - int32(5) + int32(2)
}
}
@@ -222775,13 +223253,13 @@ func _fts5PorterStep1B(tls *libc.TLS, aBuf uintptr, pnBuf uintptr) (r int32) {
nBuf = *(*int32)(unsafe.Pointer(pnBuf))
switch int32(*(*int8)(unsafe.Pointer(aBuf + uintptr(nBuf-int32(2))))) {
case int32('e'):
- if nBuf > int32(3) && 0 == libc.Xmemcmp(tls, __ccgo_ts+39855, aBuf+uintptr(nBuf-int32(3)), uint32(3)) {
+ if nBuf > int32(3) && 0 == libc.Xmemcmp(tls, __ccgo_ts+39962, aBuf+uintptr(nBuf-int32(3)), uint32(3)) {
if _fts5Porter_MGt0(tls, aBuf, nBuf-int32(3)) != 0 {
- libc.Xmemcpy(tls, aBuf+uintptr(nBuf-int32(3)), __ccgo_ts+39859, uint32(2))
+ libc.Xmemcpy(tls, aBuf+uintptr(nBuf-int32(3)), __ccgo_ts+39966, uint32(2))
*(*int32)(unsafe.Pointer(pnBuf)) = nBuf - int32(3) + int32(2)
}
} else {
- if nBuf > int32(2) && 0 == libc.Xmemcmp(tls, __ccgo_ts+39862, aBuf+uintptr(nBuf-int32(2)), uint32(2)) {
+ if nBuf > int32(2) && 0 == libc.Xmemcmp(tls, __ccgo_ts+39969, aBuf+uintptr(nBuf-int32(2)), uint32(2)) {
if _fts5Porter_Vowel(tls, aBuf, nBuf-int32(2)) != 0 {
*(*int32)(unsafe.Pointer(pnBuf)) = nBuf - int32(2)
ret = int32(1)
@@ -222789,7 +223267,7 @@ func _fts5PorterStep1B(tls *libc.TLS, aBuf uintptr, pnBuf uintptr) (r int32) {
}
}
case int32('n'):
- if nBuf > int32(3) && 0 == libc.Xmemcmp(tls, __ccgo_ts+39865, aBuf+uintptr(nBuf-int32(3)), uint32(3)) {
+ if nBuf > int32(3) && 0 == libc.Xmemcmp(tls, __ccgo_ts+39972, aBuf+uintptr(nBuf-int32(3)), uint32(3)) {
if _fts5Porter_Vowel(tls, aBuf, nBuf-int32(3)) != 0 {
*(*int32)(unsafe.Pointer(pnBuf)) = nBuf - int32(3)
ret = int32(1)
@@ -222954,14 +223432,14 @@ func _fts5TriCreate(tls *libc.TLS, pUnused uintptr, azArg uintptr, nArg int32, p
break
}
zArg = *(*uintptr)(unsafe.Pointer(azArg + uintptr(i+int32(1))*4))
- if 0 == Xsqlite3_stricmp(tls, *(*uintptr)(unsafe.Pointer(azArg + uintptr(i)*4)), __ccgo_ts+39869) {
+ if 0 == Xsqlite3_stricmp(tls, *(*uintptr)(unsafe.Pointer(azArg + uintptr(i)*4)), __ccgo_ts+39976) {
if int32(*(*int8)(unsafe.Pointer(zArg))) != int32('0') && int32(*(*int8)(unsafe.Pointer(zArg))) != int32('1') || *(*int8)(unsafe.Pointer(zArg + 1)) != 0 {
rc = int32(SQLITE_ERROR)
} else {
(*TTrigramTokenizer)(unsafe.Pointer(pNew)).FbFold = libc.BoolInt32(int32(*(*int8)(unsafe.Pointer(zArg))) == int32('0'))
}
} else {
- if 0 == Xsqlite3_stricmp(tls, *(*uintptr)(unsafe.Pointer(azArg + uintptr(i)*4)), __ccgo_ts+39562) {
+ if 0 == Xsqlite3_stricmp(tls, *(*uintptr)(unsafe.Pointer(azArg + uintptr(i)*4)), __ccgo_ts+39669) {
if int32(*(*int8)(unsafe.Pointer(zArg))) != int32('0') && int32(*(*int8)(unsafe.Pointer(zArg))) != int32('1') && int32(*(*int8)(unsafe.Pointer(zArg))) != int32('2') || *(*int8)(unsafe.Pointer(zArg + 1)) != 0 {
rc = int32(SQLITE_ERROR)
} else {
@@ -223229,7 +223707,7 @@ func _sqlite3Fts5TokenizerPattern(tls *libc.TLS, xCreate uintptr, pTok uintptr)
// ** called for the first time in order to correctly handle LIKE/GLOB.
// */
func _sqlite3Fts5TokenizerPreload(tls *libc.TLS, p uintptr) (r int32) {
- return libc.BoolInt32((*TFts5TokenizerConfig)(unsafe.Pointer(p)).FnArg >= int32(1) && 0 == Xsqlite3_stricmp(tls, *(*uintptr)(unsafe.Pointer((*TFts5TokenizerConfig)(unsafe.Pointer(p)).FazArg)), __ccgo_ts+39884))
+ return libc.BoolInt32((*TFts5TokenizerConfig)(unsafe.Pointer(p)).FnArg >= int32(1) && 0 == Xsqlite3_stricmp(tls, *(*uintptr)(unsafe.Pointer((*TFts5TokenizerConfig)(unsafe.Pointer(p)).FazArg)), __ccgo_ts+39991))
}
// C documentation
@@ -223255,7 +223733,7 @@ func _sqlite3Fts5TokenizerInit(tls *libc.TLS, pApi uintptr) (r int32) {
Fx Tfts5_tokenizer
}{
0: {
- FzName: __ccgo_ts + 39580,
+ FzName: __ccgo_ts + 39687,
Fx: Tfts5_tokenizer{
FxCreate: __ccgo_fp(_fts5UnicodeCreate),
FxDelete: __ccgo_fp(_fts5UnicodeDelete),
@@ -223263,7 +223741,7 @@ func _sqlite3Fts5TokenizerInit(tls *libc.TLS, pApi uintptr) (r int32) {
},
},
1: {
- FzName: __ccgo_ts + 39892,
+ FzName: __ccgo_ts + 39999,
Fx: Tfts5_tokenizer{
FxCreate: __ccgo_fp(_fts5AsciiCreate),
FxDelete: __ccgo_fp(_fts5AsciiDelete),
@@ -223271,7 +223749,7 @@ func _sqlite3Fts5TokenizerInit(tls *libc.TLS, pApi uintptr) (r int32) {
},
},
2: {
- FzName: __ccgo_ts + 39884,
+ FzName: __ccgo_ts + 39991,
Fx: Tfts5_tokenizer{
FxCreate: __ccgo_fp(_fts5TriCreate),
FxDelete: __ccgo_fp(_fts5TriDelete),
@@ -223301,7 +223779,7 @@ func _sqlite3Fts5TokenizerInit(tls *libc.TLS, pApi uintptr) (r int32) {
FxDelete: __ccgo_fp(_fts5PorterDelete),
FxTokenize: __ccgo_fp(_fts5PorterTokenize),
}
- rc = (*(*func(*libc.TLS, uintptr, uintptr, uintptr, uintptr, uintptr) int32)(unsafe.Pointer(&struct{ uintptr }{(*Tfts5_api)(unsafe.Pointer(pApi)).FxCreateTokenizer_v2})))(tls, pApi, __ccgo_ts+39898, pApi, bp+48, uintptr(0))
+ rc = (*(*func(*libc.TLS, uintptr, uintptr, uintptr, uintptr, uintptr) int32)(unsafe.Pointer(&struct{ uintptr }{(*Tfts5_api)(unsafe.Pointer(pApi)).FxCreateTokenizer_v2})))(tls, pApi, __ccgo_ts+40005, pApi, bp+48, uintptr(0))
}
return rc
}
@@ -228817,16 +229295,16 @@ func _fts5VocabTableType(tls *libc.TLS, zType uintptr, pzErr uintptr, peType uin
zCopy = _sqlite3Fts5Strndup(tls, bp, zType, -int32(1))
if *(*int32)(unsafe.Pointer(bp)) == SQLITE_OK {
_sqlite3Fts5Dequote(tls, zCopy)
- if Xsqlite3_stricmp(tls, zCopy, __ccgo_ts+39905) == 0 {
+ if Xsqlite3_stricmp(tls, zCopy, __ccgo_ts+40012) == 0 {
*(*int32)(unsafe.Pointer(peType)) = FTS5_VOCAB_COL
} else {
- if Xsqlite3_stricmp(tls, zCopy, __ccgo_ts+39909) == 0 {
+ if Xsqlite3_stricmp(tls, zCopy, __ccgo_ts+40016) == 0 {
*(*int32)(unsafe.Pointer(peType)) = int32(FTS5_VOCAB_ROW)
} else {
- if Xsqlite3_stricmp(tls, zCopy, __ccgo_ts+39913) == 0 {
+ if Xsqlite3_stricmp(tls, zCopy, __ccgo_ts+40020) == 0 {
*(*int32)(unsafe.Pointer(peType)) = int32(FTS5_VOCAB_INSTANCE)
} else {
- *(*uintptr)(unsafe.Pointer(pzErr)) = Xsqlite3_mprintf(tls, __ccgo_ts+39922, libc.VaList(bp+16, zCopy))
+ *(*uintptr)(unsafe.Pointer(pzErr)) = Xsqlite3_mprintf(tls, __ccgo_ts+40029, libc.VaList(bp+16, zCopy))
*(*int32)(unsafe.Pointer(bp)) = int32(SQLITE_ERROR)
}
}
@@ -228889,21 +229367,22 @@ func _fts5VocabInitVtab(tls *libc.TLS, db uintptr, pAux uintptr, argc int32, arg
bp := tls.Alloc(16)
defer tls.Free(16)
var azSchema [3]uintptr
- var bDb, nByte, nDb, nTab int32
+ var bDb int32
+ var nByte, nDb, nTab Ti64
var pRet, zDb, zTab, zType, v1, v2, v3 uintptr
var _ /* eType at bp+4 */ int32
var _ /* rc at bp+0 */ int32
_, _, _, _, _, _, _, _, _, _, _, _ = azSchema, bDb, nByte, nDb, nTab, pRet, zDb, zTab, zType, v1, v2, v3
azSchema = [3]uintptr{
- 0: __ccgo_ts + 39956,
- 1: __ccgo_ts + 39996,
- 2: __ccgo_ts + 40031,
+ 0: __ccgo_ts + 40063,
+ 1: __ccgo_ts + 40103,
+ 2: __ccgo_ts + 40138,
}
pRet = uintptr(0)
*(*int32)(unsafe.Pointer(bp)) = SQLITE_OK
- bDb = libc.BoolInt32(argc == int32(6) && libc.Xstrlen(tls, *(*uintptr)(unsafe.Pointer(argv + 1*4))) == uint32(4) && libc.Xmemcmp(tls, __ccgo_ts+23979, *(*uintptr)(unsafe.Pointer(argv + 1*4)), uint32(4)) == 0)
+ bDb = libc.BoolInt32(argc == int32(6) && libc.Xstrlen(tls, *(*uintptr)(unsafe.Pointer(argv + 1*4))) == uint32(4) && libc.Xmemcmp(tls, __ccgo_ts+24051, *(*uintptr)(unsafe.Pointer(argv + 1*4)), uint32(4)) == 0)
if argc != int32(5) && bDb == 0 {
- *(*uintptr)(unsafe.Pointer(pzErr)) = Xsqlite3_mprintf(tls, __ccgo_ts+40074, 0)
+ *(*uintptr)(unsafe.Pointer(pzErr)) = Xsqlite3_mprintf(tls, __ccgo_ts+40181, 0)
*(*int32)(unsafe.Pointer(bp)) = int32(SQLITE_ERROR)
} else {
if bDb != 0 {
@@ -228924,23 +229403,23 @@ func _fts5VocabInitVtab(tls *libc.TLS, db uintptr, pAux uintptr, argc int32, arg
v3 = *(*uintptr)(unsafe.Pointer(argv + 4*4))
}
zType = v3
- nDb = libc.Int32FromUint32(libc.Xstrlen(tls, zDb)) + int32(1)
- nTab = libc.Int32FromUint32(libc.Xstrlen(tls, zTab)) + int32(1)
+ nDb = libc.Int64FromUint32(libc.Xstrlen(tls, zDb) + uint32(1))
+ nTab = libc.Int64FromUint32(libc.Xstrlen(tls, zTab) + uint32(1))
*(*int32)(unsafe.Pointer(bp + 4)) = 0
*(*int32)(unsafe.Pointer(bp)) = _fts5VocabTableType(tls, zType, pzErr, bp+4)
if *(*int32)(unsafe.Pointer(bp)) == SQLITE_OK {
*(*int32)(unsafe.Pointer(bp)) = Xsqlite3_declare_vtab(tls, db, azSchema[*(*int32)(unsafe.Pointer(bp + 4))])
}
- nByte = libc.Int32FromUint32(uint32(36) + libc.Uint32FromInt32(nDb) + libc.Uint32FromInt32(nTab))
- pRet = _sqlite3Fts5MallocZero(tls, bp, int64(nByte))
+ nByte = int64(36) + nDb + nTab
+ pRet = _sqlite3Fts5MallocZero(tls, bp, nByte)
if pRet != 0 {
(*TFts5VocabTable)(unsafe.Pointer(pRet)).FpGlobal = pAux
(*TFts5VocabTable)(unsafe.Pointer(pRet)).FeType = *(*int32)(unsafe.Pointer(bp + 4))
(*TFts5VocabTable)(unsafe.Pointer(pRet)).Fdb = db
(*TFts5VocabTable)(unsafe.Pointer(pRet)).FzFts5Tbl = pRet + 1*36
(*TFts5VocabTable)(unsafe.Pointer(pRet)).FzFts5Db = (*TFts5VocabTable)(unsafe.Pointer(pRet)).FzFts5Tbl + uintptr(nTab)
- libc.Xmemcpy(tls, (*TFts5VocabTable)(unsafe.Pointer(pRet)).FzFts5Tbl, zTab, libc.Uint32FromInt32(nTab))
- libc.Xmemcpy(tls, (*TFts5VocabTable)(unsafe.Pointer(pRet)).FzFts5Db, zDb, libc.Uint32FromInt32(nDb))
+ libc.Xmemcpy(tls, (*TFts5VocabTable)(unsafe.Pointer(pRet)).FzFts5Tbl, zTab, libc.Uint32FromInt64(nTab))
+ libc.Xmemcpy(tls, (*TFts5VocabTable)(unsafe.Pointer(pRet)).FzFts5Db, zDb, libc.Uint32FromInt64(nDb))
_sqlite3Fts5Dequote(tls, (*TFts5VocabTable)(unsafe.Pointer(pRet)).FzFts5Tbl)
_sqlite3Fts5Dequote(tls, (*TFts5VocabTable)(unsafe.Pointer(pRet)).FzFts5Db)
}
@@ -229073,10 +229552,10 @@ func _fts5VocabOpenMethod(tls *libc.TLS, pVTab uintptr, ppCsr uintptr) (r int32)
*(*uintptr)(unsafe.Pointer(bp + 4)) = uintptr(0)
zSql = uintptr(0)
if (*TFts5VocabTable)(unsafe.Pointer(pTab)).FbBusy != 0 {
- (*Tsqlite3_vtab)(unsafe.Pointer(pVTab)).FzErrMsg = Xsqlite3_mprintf(tls, __ccgo_ts+40107, libc.VaList(bp+16, (*TFts5VocabTable)(unsafe.Pointer(pTab)).FzFts5Db, (*TFts5VocabTable)(unsafe.Pointer(pTab)).FzFts5Tbl))
+ (*Tsqlite3_vtab)(unsafe.Pointer(pVTab)).FzErrMsg = Xsqlite3_mprintf(tls, __ccgo_ts+40214, libc.VaList(bp+16, (*TFts5VocabTable)(unsafe.Pointer(pTab)).FzFts5Db, (*TFts5VocabTable)(unsafe.Pointer(pTab)).FzFts5Tbl))
return int32(SQLITE_ERROR)
}
- zSql = _sqlite3Fts5Mprintf(tls, bp, __ccgo_ts+40138, libc.VaList(bp+16, (*TFts5VocabTable)(unsafe.Pointer(pTab)).FzFts5Tbl, (*TFts5VocabTable)(unsafe.Pointer(pTab)).FzFts5Db, (*TFts5VocabTable)(unsafe.Pointer(pTab)).FzFts5Tbl, (*TFts5VocabTable)(unsafe.Pointer(pTab)).FzFts5Tbl))
+ zSql = _sqlite3Fts5Mprintf(tls, bp, __ccgo_ts+40245, libc.VaList(bp+16, (*TFts5VocabTable)(unsafe.Pointer(pTab)).FzFts5Tbl, (*TFts5VocabTable)(unsafe.Pointer(pTab)).FzFts5Db, (*TFts5VocabTable)(unsafe.Pointer(pTab)).FzFts5Tbl, (*TFts5VocabTable)(unsafe.Pointer(pTab)).FzFts5Tbl))
if zSql != 0 {
*(*int32)(unsafe.Pointer(bp)) = Xsqlite3_prepare_v2(tls, (*TFts5VocabTable)(unsafe.Pointer(pTab)).Fdb, zSql, -int32(1), bp+4, uintptr(0))
}
@@ -229095,7 +229574,7 @@ func _fts5VocabOpenMethod(tls *libc.TLS, pVTab uintptr, ppCsr uintptr) (r int32)
*(*int32)(unsafe.Pointer(bp)) = Xsqlite3_finalize(tls, *(*uintptr)(unsafe.Pointer(bp + 4)))
*(*uintptr)(unsafe.Pointer(bp + 4)) = uintptr(0)
if *(*int32)(unsafe.Pointer(bp)) == SQLITE_OK {
- (*Tsqlite3_vtab)(unsafe.Pointer(pVTab)).FzErrMsg = Xsqlite3_mprintf(tls, __ccgo_ts+40189, libc.VaList(bp+16, (*TFts5VocabTable)(unsafe.Pointer(pTab)).FzFts5Db, (*TFts5VocabTable)(unsafe.Pointer(pTab)).FzFts5Tbl))
+ (*Tsqlite3_vtab)(unsafe.Pointer(pVTab)).FzErrMsg = Xsqlite3_mprintf(tls, __ccgo_ts+40296, libc.VaList(bp+16, (*TFts5VocabTable)(unsafe.Pointer(pTab)).FzFts5Db, (*TFts5VocabTable)(unsafe.Pointer(pTab)).FzFts5Tbl))
*(*int32)(unsafe.Pointer(bp)) = int32(SQLITE_ERROR)
}
} else {
@@ -229545,7 +230024,7 @@ func _sqlite3Fts5VocabInit(tls *libc.TLS, pGlobal uintptr, db uintptr) (r int32)
var p uintptr
_ = p
p = pGlobal
- return Xsqlite3_create_module_v2(tls, db, __ccgo_ts+40215, uintptr(unsafe.Pointer(&_fts5Vocab)), p, uintptr(0))
+ return Xsqlite3_create_module_v2(tls, db, __ccgo_ts+40322, uintptr(unsafe.Pointer(&_fts5Vocab)), p, uintptr(0))
}
var _fts5Vocab = Tsqlite3_module{
@@ -229600,7 +230079,7 @@ func init() {
// /************** End of stmt.c ************************************************/
// /* Return the source-id for this library */
func Xsqlite3_sourceid(tls *libc.TLS) (r uintptr) {
- return __ccgo_ts + 40225
+ return __ccgo_ts + 40332
}
type TAggInfo_col = struct {
@@ -229829,7 +230308,7 @@ var Xsqlite3_temp_directory uintptr
**
** Since [version 3.6.18] ([dateof:3.6.18]),
** SQLite source code has been stored in the
-** <a href="http://www.fossil-scm.org/">Fossil configuration management
+** <a href="http://fossil-scm.org/">Fossil configuration management
** system</a>. ^The SQLITE_SOURCE_ID macro evaluates to
** a string which identifies a particular check-in of SQLite
** within its configuration management system. ^The SQLITE_SOURCE_ID
@@ -229877,11 +230356,11 @@ var Xsqlite3_temp_directory uintptr
// **
// ** See also: [sqlite_version()] and [sqlite_source_id()].
// */
-var Xsqlite3_version = [7]int8{'3', '.', '4', '9', '.', '2'}
+var Xsqlite3_version = [7]int8{'3', '.', '5', '0', '.', '1'}
var __ccgo_ts = (*reflect.StringHeader)(unsafe.Pointer(&__ccgo_ts1)).Data
-var __ccgo_ts1 = "ATOMIC_INTRINSICS=1\x00COMPILER=gcc-12.2.0\x00DEFAULT_AUTOVACUUM\x00DEFAULT_CACHE_SIZE=-2000\x00DEFAULT_FILE_FORMAT=4\x00DEFAULT_JOURNAL_SIZE_LIMIT=-1\x00DEFAULT_MEMSTATUS=0\x00DEFAULT_MMAP_SIZE=0\x00DEFAULT_PAGE_SIZE=4096\x00DEFAULT_PCACHE_INITSZ=20\x00DEFAULT_RECURSIVE_TRIGGERS\x00DEFAULT_SECTOR_SIZE=4096\x00DEFAULT_SYNCHRONOUS=2\x00DEFAULT_WAL_AUTOCHECKPOINT=1000\x00DEFAULT_WAL_SYNCHRONOUS=2\x00DEFAULT_WORKER_THREADS=0\x00DIRECT_OVERFLOW_READ\x00ENABLE_COLUMN_METADATA\x00ENABLE_DBSTAT_VTAB\x00ENABLE_FTS5\x00ENABLE_GEOPOLY\x00ENABLE_MATH_FUNCTIONS\x00ENABLE_MEMORY_MANAGEMENT\x00ENABLE_OFFSET_SQL_FUNC\x00ENABLE_PREUPDATE_HOOK\x00ENABLE_RBU\x00ENABLE_RTREE\x00ENABLE_SESSION\x00ENABLE_SNAPSHOT\x00ENABLE_STAT4\x00ENABLE_UNLOCK_NOTIFY\x00LIKE_DOESNT_MATCH_BLOBS\x00MALLOC_SOFT_LIMIT=1024\x00MAX_ATTACHED=10\x00MAX_COLUMN=2000\x00MAX_COMPOUND_SELECT=500\x00MAX_DEFAULT_PAGE_SIZE=8192\x00MAX_EXPR_DEPTH=1000\x00MAX_FUNCTION_ARG=1000\x00MAX_LENGTH=1000000000\x00MAX_LIKE_PATTERN_LENGTH=50000\x00MAX_MMAP_SIZE=0x7fff0000\x00MAX_PAGE_COUNT=0xfffffffe\x00MAX_PAGE_SIZE=65536\x00MAX_SQL_LENGTH=1000000000\x00MAX_TRIGGER_DEPTH=1000\x00MAX_VARIABLE_NUMBER=32766\x00MAX_VDBE_OP=250000000\x00MAX_WORKER_THREADS=8\x00MUTEX_PTHREADS\x00SOUNDEX\x00SYSTEM_MALLOC\x00TEMP_STORE=1\x00THREADSAFE=1\x00ANY\x00BLOB\x00INT\x00INTEGER\x00REAL\x00TEXT\x0020b:20e\x0020c:20e\x0020e\x0040f-21a-21d\x00now\x00subsec\x00subsecond\x00local time unavailable\x00auto\x00ceiling\x00floor\x00julianday\x00localtime\x00unixepoch\x00utc\x00weekday \x00start of \x00month\x00year\x00day\x0040f\x0050f\x0040f-20a-20d\x0050f-20a-20d\x00%02d\x00%2d\x00%06.3f\x00%04d-%02d-%02d\x00%04d\x00%03d\x00%.16g\x00PM\x00pm\x00AM\x00am\x00%02d:%02d\x00%.3f\x00%lld\x00%02d:%02d:%02d\x00%c%04d-%02d-%02d %02d:%02d:%06.3f\x00date\x00time\x00datetime\x00strftime\x00timediff\x00current_time\x00current_timestamp\x00current_date\x00failed to allocate %u bytes of memory\x00failed memory resize %u to %u bytes\x00out of memory\x00%\x00null\x00NaN\x00-Inf\x00\x00NULL\x00(NULL)\x00.\x00(join-%u)\x00%u-ROW VALUES CLAUSE\x00(subquery-%u)\x00unrecognized token: \"%s\"\x00922337203685477580\x00+- \n\t0123456789\x000\x00API call with %s database connection pointer\x00unopened\x00invalid\x00Savepoint\x00AutoCommit\x00Transaction\x00Checkpoint\x00JournalMode\x00Vacuum\x00VFilter\x00VUpdate\x00Init\x00Goto\x00Gosub\x00InitCoroutine\x00Yield\x00MustBeInt\x00Jump\x00Once\x00If\x00IfNot\x00IsType\x00Not\x00IfNullRow\x00SeekLT\x00SeekLE\x00SeekGE\x00SeekGT\x00IfNotOpen\x00IfNoHope\x00NoConflict\x00NotFound\x00Found\x00SeekRowid\x00NotExists\x00Last\x00IfSizeBetween\x00SorterSort\x00Sort\x00Rewind\x00SorterNext\x00Prev\x00Next\x00IdxLE\x00IdxGT\x00IdxLT\x00Or\x00And\x00IdxGE\x00RowSetRead\x00RowSetTest\x00Program\x00FkIfZero\x00IfPos\x00IsNull\x00NotNull\x00Ne\x00Eq\x00Gt\x00Le\x00Lt\x00Ge\x00ElseEq\x00IfNotZero\x00DecrJumpZero\x00IncrVacuum\x00VNext\x00Filter\x00PureFunc\x00Function\x00Return\x00EndCoroutine\x00HaltIfNull\x00Halt\x00Integer\x00Int64\x00String\x00BeginSubrtn\x00Null\x00SoftNull\x00Blob\x00Variable\x00Move\x00Copy\x00SCopy\x00IntCopy\x00FkCheck\x00ResultRow\x00CollSeq\x00AddImm\x00RealAffinity\x00Cast\x00Permutation\x00Compare\x00IsTrue\x00ZeroOrNull\x00Offset\x00Column\x00TypeCheck\x00Affinity\x00MakeRecord\x00Count\x00ReadCookie\x00SetCookie\x00ReopenIdx\x00OpenRead\x00BitAnd\x00BitOr\x00ShiftLeft\x00ShiftRight\x00Add\x00Subtract\x00Multiply\x00Divide\x00Remainder\x00Concat\x00OpenWrite\x00OpenDup\x00BitNot\x00OpenAutoindex\x00OpenEphemeral\x00String8\x00SorterOpen\x00SequenceTest\x00OpenPseudo\x00Close\x00ColumnsUsed\x00SeekScan\x00SeekHit\x00Sequence\x00NewRowid\x00Insert\x00RowCell\x00Delete\x00ResetCount\x00SorterCompare\x00SorterData\x00RowData\x00Rowid\x00NullRow\x00SeekEnd\x00IdxInsert\x00SorterInsert\x00IdxDelete\x00DeferredSeek\x00IdxRowid\x00FinishSeek\x00Destroy\x00Clear\x00ResetSorter\x00CreateBtree\x00SqlExec\x00ParseSchema\x00LoadAnalysis\x00DropTable\x00DropIndex\x00DropTrigger\x00Real\x00IntegrityCk\x00RowSetAdd\x00Param\x00FkCounter\x00MemMax\x00OffsetLimit\x00AggInverse\x00AggStep\x00AggStep1\x00AggValue\x00AggFinal\x00Expire\x00CursorLock\x00CursorUnlock\x00TableLock\x00VBegin\x00VCreate\x00VDestroy\x00VOpen\x00VCheck\x00VInitIn\x00VColumn\x00VRename\x00Pagecount\x00MaxPgcnt\x00ClrSubtype\x00GetSubtype\x00SetSubtype\x00FilterAdd\x00Trace\x00CursorHint\x00ReleaseReg\x00Noop\x00Explain\x00Abortable\x00open\x00close\x00access\x00getcwd\x00stat\x00fstat\x00ftruncate\x00fcntl\x00read\x00pread\x00pread64\x00write\x00pwrite\x00pwrite64\x00fchmod\x00fallocate\x00unlink\x00openDirectory\x00mkdir\x00rmdir\x00fchown\x00geteuid\x00mmap\x00munmap\x00mremap\x00getpagesize\x00readlink\x00lstat\x00ioctl\x00attempt to open \"%s\" as file descriptor %d\x00/dev/null\x00os_unix.c:%d: (%d) %s(%s) - %s\x00cannot fstat db file %s\x00file unlinked while open: %s\x00multiple links to file: %s\x00file renamed while open: %s\x00%s\x00full_fsync\x00%s-shm\x00readonly_shm\x00psow\x00unix-excl\x00%s.lock\x00/var/tmp\x00/usr/tmp\x00/tmp\x00SQLITE_TMPDIR\x00TMPDIR\x00%s/etilqs_%llx%c\x00modeof\x00fsync\x00/dev/urandom\x00unix\x00unix-none\x00unix-dotfile\x00memdb\x00memdb(%p,%lld)\x00PRAGMA \"%w\".page_count\x00BEGIN IMMEDIATE; COMMIT;\x00ATTACH x AS %Q\x00recovered %d pages from %s\x00-journal\x00-wal\x00nolock\x00immutable\x00PRAGMA table_list\x00recovered %d frames from WAL file %s\x00cannot limit WAL size: %s\x00:memory:\x00@ \x00\n\x00invalid page number %u\x002nd reference to page %u\x00Failed to read ptrmap key=%u\x00Bad ptr map entry key=%u expected=(%u,%u) got=(%u,%u)\x00failed to get page %u\x00freelist leaf count too big on page %u\x00size\x00overflow list length\x00%s is %u but should be %u\x00Tree %u page %u: \x00unable to get the page. error code=%d\x00btreeInitPage() returns error code %d\x00free space corruption\x00Tree %u page %u cell %u: \x00Tree %u page %u right child: \x00Offset %u out of range %u..%u\x00Extends off end of page\x00Rowid %lld out of order\x00Child page depth differs\x00Multiple uses for byte %u of page %u\x00Fragmentation of %u bytes reported as %u on page %u\x00Freelist: \x00max rootpage (%u) disagrees with header (%u)\x00incremental_vacuum enabled with a max rootpage of zero\x00Page %u: never used\x00Page %u: pointer map referenced\x00unknown database %s\x00destination database is in use\x00source and destination must be distinct\x00%!.15g\x00-\x00%s%s\x00k(%d\x00BINARY\x00B\x00N.\x00,%s%s%s\x00)\x00?\x008\x0016LE\x0016BE\x00%.18s-%s\x00%s(%d)\x00%d\x00(blob)\x00vtab:%p\x00%c%u\x00]\x00program\x00subrtnsig:%d,%s\x00%.4c%s%.16c\x00MJ delete: %s\x00MJ collide: %s\x00-mj%06X9%02X\x00FOREIGN KEY constraint failed\x00a CHECK constraint\x00a generated column\x00an index\x00non-deterministic use of %s() in %s\x00API called with finalized prepared statement\x00API called with NULL prepared statement\x00string or blob too big\x00addr\x00opcode\x00p1\x00p2\x00p3\x00p4\x00p5\x00comment\x00id\x00parent\x00notused\x00detail\x00bind on a busy prepared statement: [%s]\x00-- \x00'%.*q'\x00zeroblob(%d)\x00x'\x00%02x\x00'\x00NOT NULL\x00UNIQUE\x00CHECK\x00FOREIGN KEY\x00%s constraint failed\x00%z: %s\x00abort at %d in [%s]: %s\x00cannot store %s value in %s column %s.%s\x00cannot open savepoint - SQL statements in progress\x00no such savepoint: %s\x00cannot release savepoint - SQL statements in progress\x00cannot commit transaction - SQL statements in progress\x00cannot start a transaction within a transaction\x00cannot rollback - no transaction is active\x00cannot commit - no transaction is active\x00database schema has changed\x00index corruption\x00sqlite_master\x00SELECT*FROM\"%w\".%s WHERE %s ORDER BY rowid\x00too many levels of trigger recursion\x00into\x00out of\x00cannot change %s wal mode from within a transaction\x00database table is locked: %s\x00ValueList\x00-- %s\x00statement aborts at %d: [%s] %s\x00real\x00integer\x00cannot open value of type %s\x00no such rowid: %lld\x00cannot open virtual table: %s\x00cannot open table without rowid: %s\x00cannot open table with generated columns: %s\x00cannot open view: %s\x00no such column: \"%s\"\x00foreign key\x00indexed\x00cannot open %s column for writing\x00sqlite_\x00sqlite_temp_master\x00sqlite_temp_schema\x00sqlite_schema\x00main\x00*\x00new\x00old\x00excluded\x00misuse of aliased aggregate %s\x00misuse of aliased window function %s\x00row value misused\x00double-quoted string literal: \"%w\"\x00coalesce\x00no such column\x00ambiguous column name\x00%s: %s.%s.%s\x00%s: %s.%s\x00%s: \"%s\" - should this be a string literal in single-quotes?\x00%s: %s\x00partial index WHERE clauses\x00index expressions\x00CHECK constraints\x00generated columns\x00%s prohibited in %s\x00the \".\" operator\x00second argument to %#T() must be a constant between 0.0 and 1.0\x00not authorized to use function: %#T\x00non-deterministic functions\x00%#T() may not be used as a window function\x00window\x00aggregate\x00misuse of %s function %#T()\x00no such function: %#T\x00wrong number of arguments to function %#T()\x00FILTER may not be used with non-aggregate %#T()\x00subqueries\x00parameters\x00%r %s BY term out of range - should be between 1 and %d\x00too many terms in ORDER BY clause\x00ORDER\x00%r ORDER BY term does not match any column in the result set\x00too many terms in %s BY clause\x00HAVING clause on a non-aggregate query\x00GROUP\x00aggregate functions are not allowed in the GROUP BY clause\x00Expression tree is too large (maximum depth %d)\x00s\x00IN(...) element has %d term%s - expected %d\x00too many arguments on function %T\x00ORDER BY may not be used with non-aggregate %#T()\x00unsafe use of %#T()\x00variable number must be between ?1 and ?%d\x00too many SQL variables\x00%d columns assigned %d values\x00too many columns in %s\x00true\x00false\x00_ROWID_\x00ROWID\x00OID\x00USING ROWID SEARCH ON TABLE %s FOR IN-OPERATOR\x00USING INDEX %s FOR IN-OPERATOR\x00sub-select returns %d columns - expected %d\x00REUSE LIST SUBQUERY %d\x00CORRELATED \x00%sLIST SUBQUERY %d\x00REUSE SUBQUERY %d\x00%sSCALAR SUBQUERY %d\x001\x000x\x00hex literal too big: %s%#T\x00generated column loop on \"%s\"\x00blob\x00text\x00numeric\x00flexnum\x00none\x00misuse of aggregate: %#T()\x00unknown function: %#T()\x00RAISE() may only be used within a trigger-program\x00table %s may not be altered\x00SELECT 1 FROM \"%w\".sqlite_master WHERE name NOT LIKE 'sqliteX_%%' ESCAPE 'X' AND sql NOT LIKE 'create virtual%%' AND sqlite_rename_test(%Q, sql, type, name, %d, %Q, %d)=NULL \x00SELECT 1 FROM temp.sqlite_master WHERE name NOT LIKE 'sqliteX_%%' ESCAPE 'X' AND sql NOT LIKE 'create virtual%%' AND sqlite_rename_test(%Q, sql, type, name, 1, %Q, %d)=NULL \x00UPDATE \"%w\".sqlite_master SET sql = sqlite_rename_quotefix(%Q, sql)WHERE name NOT LIKE 'sqliteX_%%' ESCAPE 'X' AND sql NOT LIKE 'create virtual%%'\x00UPDATE temp.sqlite_master SET sql = sqlite_rename_quotefix('temp', sql)WHERE name NOT LIKE 'sqliteX_%%' ESCAPE 'X' AND sql NOT LIKE 'create virtual%%'\x00there is already another table or index with this name: %s\x00table\x00view %s may not be altered\x00UPDATE \"%w\".sqlite_master SET sql = sqlite_rename_table(%Q, type, name, sql, %Q, %Q, %d) WHERE (type!='index' OR tbl_name=%Q COLLATE nocase)AND name NOT LIKE 'sqliteX_%%' ESCAPE 'X'\x00UPDATE %Q.sqlite_master SET tbl_name = %Q, name = CASE WHEN type='table' THEN %Q WHEN name LIKE 'sqliteX_autoindex%%' ESCAPE 'X' AND type='index' THEN 'sqlite_autoindex_' || %Q || substr(name,%d+18) ELSE name END WHERE tbl_name=%Q COLLATE nocase AND (type='table' OR type='index' OR type='trigger');\x00sqlite_sequence\x00UPDATE \"%w\".sqlite_sequence set name = %Q WHERE name = %Q\x00UPDATE sqlite_temp_schema SET sql = sqlite_rename_table(%Q, type, name, sql, %Q, %Q, 1), tbl_name = CASE WHEN tbl_name=%Q COLLATE nocase AND sqlite_rename_test(%Q, sql, type, name, 1, 'after rename', 0) THEN %Q ELSE tbl_name END WHERE type IN ('view', 'trigger')\x00after rename\x00SELECT raise(ABORT,%Q) FROM \"%w\".\"%w\"\x00Cannot add a PRIMARY KEY column\x00Cannot add a UNIQUE column\x00Cannot add a REFERENCES column with non-NULL default value\x00Cannot add a NOT NULL column with default value NULL\x00Cannot add a column with non-constant default\x00cannot add a STORED column\x00UPDATE \"%w\".sqlite_master SET sql = printf('%%.%ds, ',sql) || %Q || substr(sql,1+length(printf('%%.%ds',sql))) WHERE type = 'table' AND name = %Q\x00SELECT CASE WHEN quick_check GLOB 'CHECK*' THEN raise(ABORT,'CHECK constraint failed') WHEN quick_check GLOB 'non-* value in*' THEN raise(ABORT,'type mismatch on DEFAULT') ELSE raise(ABORT,'NOT NULL constraint failed') END FROM pragma_quick_check(%Q,%Q) WHERE quick_check GLOB 'CHECK*' OR quick_check GLOB 'NULL*' OR quick_check GLOB 'non-* value in*'\x00virtual tables may not be altered\x00Cannot add a column to a view\x00sqlite_altertab_%s\x00view\x00virtual table\x00drop column from\x00rename columns of\x00cannot %s %s \"%s\"\x00no such column: \"%T\"\x00UPDATE \"%w\".sqlite_master SET sql = sqlite_rename_column(sql, type, name, %Q, %Q, %d, %Q, %d, %d) WHERE name NOT LIKE 'sqliteX_%%' ESCAPE 'X' AND (type != 'index' OR tbl_name = %Q)\x00UPDATE temp.sqlite_master SET sql = sqlite_rename_column(sql, type, name, %Q, %Q, %d, %Q, %d, 1) WHERE type IN ('trigger', 'view')\x00 \x00error in %s %s%s%s: %s\x00CREATE \x00\"%w\" \x00%Q%s\x00%.*s%s\x00PRIMARY KEY\x00cannot drop %s column: \"%s\"\x00cannot drop column \"%s\": no other columns exist\x00UPDATE \"%w\".sqlite_master SET sql = sqlite_drop_column(%d, sql, %d) WHERE (type=='table' AND tbl_name=%Q COLLATE nocase)\x00after drop column\x00sqlite_rename_column\x00sqlite_rename_table\x00sqlite_rename_test\x00sqlite_drop_column\x00sqlite_rename_quotefix\x00sqlite_stat1\x00tbl,idx,stat\x00sqlite_stat4\x00tbl,idx,neq,nlt,ndlt,sample\x00sqlite_stat3\x00CREATE TABLE %Q.%s(%s)\x00DELETE FROM %Q.%s WHERE %s=%Q\x00DELETE FROM %Q.%s\x00stat_init\x00stat_push\x00%llu\x00 %llu\x00%llu \x00stat_get\x00sqlite\\_%\x00BBB\x00idx\x00tbl\x00unordered*\x00sz=[0-9]*\x00noskipscan*\x00SELECT idx,count(*) FROM %Q.sqlite_stat4 GROUP BY idx COLLATE nocase\x00SELECT idx,neq,nlt,ndlt,sample FROM %Q.sqlite_stat4\x00SELECT tbl,idx,stat FROM %Q.sqlite_stat1\x00x\x00\x00too many attached databases - max %d\x00database %s is already in use\x00database is already attached\x00attached databases must use the same text encoding as main database\x00unable to open database: %s\x00no such database: %s\x00cannot detach database %s\x00database %s is locked\x00sqlite_detach\x00sqlite_attach\x00%s cannot use variables\x00%s %T cannot reference objects in database %s\x00authorizer malfunction\x00%s.%s\x00%s.%z\x00access to %z is prohibited\x00not authorized\x00pragma_\x00no such view\x00no such table\x00corrupt database\x00unknown database %T\x00object name reserved for internal use: %s\x00temporary table name must be unqualified\x00%s %T already exists\x00there is already an index named %s\x00cannot use RETURNING in a trigger\x00sqlite_returning_%p\x00too many columns on %s\x00always\x00generated\x00duplicate column name: %s\x00default value of column [%s] is not constant\x00cannot use DEFAULT on a generated column\x00generated columns cannot be part of the PRIMARY KEY\x00table \"%s\" has more than one primary key\x00AUTOINCREMENT is only allowed on an INTEGER PRIMARY KEY\x00virtual tables cannot use computed columns\x00virtual\x00stored\x00error in generated column \"%s\"\x00,\x00\n \x00,\n \x00\n)\x00CREATE TABLE \x00 TEXT\x00 NUM\x00 INT\x00 REAL\x00unknown datatype for %s.%s: \"%s\"\x00missing datatype for %s.%s\x00AUTOINCREMENT not allowed on WITHOUT ROWID tables\x00PRIMARY KEY missing on table %s\x00must have at least one non-generated column\x00TABLE\x00VIEW\x00CREATE %s %.*s\x00UPDATE %Q.sqlite_master SET type='%s', name=%Q, tbl_name=%Q, rootpage=#%d, sql=%Q WHERE rowid=#%d\x00CREATE TABLE %Q.sqlite_sequence(name,seq)\x00tbl_name='%q' AND type!='trigger'\x00SELECT*FROM\"%w\".\"%w\"\x00parameters are not allowed in views\x00view %s is circularly defined\x00corrupt schema\x00UPDATE %Q.sqlite_master SET rootpage=%d WHERE #%d AND rootpage=#%d\x00sqlite_stat%d\x00DELETE FROM %Q.sqlite_sequence WHERE name=%Q\x00DELETE FROM %Q.sqlite_master WHERE tbl_name=%Q and type!='trigger'\x00table %s may not be dropped\x00use DROP TABLE to delete table %s\x00use DROP VIEW to delete view %s\x00foreign key on %s should reference only one column of table %T\x00number of columns in foreign key does not match the number of columns in the referenced table\x00unknown column \"%s\" in foreign key definition\x00FIRST\x00LAST\x00unsupported use of NULLS %s\x00index\x00cannot create a TEMP index on non-TEMP table \"%s\"\x00table %s may not be indexed\x00views may not be indexed\x00virtual tables may not be indexed\x00there is already a table named %s\x00index %s already exists\x00sqlite_autoindex_%s_%d\x00expressions prohibited in PRIMARY KEY and UNIQUE constraints\x00conflicting ON CONFLICT clauses specified\x00invalid rootpage\x00 UNIQUE\x00CREATE%s INDEX %.*s\x00INSERT INTO %Q.sqlite_master VALUES('index',%Q,%Q,#%d,%Q);\x00name='%q' AND type='index'\x00no such index: %S\x00index associated with UNIQUE or PRIMARY KEY constraint cannot be dropped\x00DELETE FROM %Q.sqlite_master WHERE name=%Q AND type='index'\x00too many FROM clause terms, max: %d\x00ON\x00USING\x00a JOIN clause is required before %s\x00BEGIN\x00ROLLBACK\x00COMMIT\x00RELEASE\x00unable to open a temporary database file for storing temporary tables\x00index '%q'\x00, \x00%s.rowid\x00unable to identify the object to be reindexed\x00duplicate WITH table name: %s\x00no such collation sequence: %s\x00unsafe use of virtual table \"%s\"\x00table %s may not be modified\x00cannot modify %s because it is a view\x00rows deleted\x00integer overflow\x00%!.*f\x00LIKE or GLOB pattern too complex\x00ESCAPE expression must be a single character\x00%!0.15g\x00%!0.20e\x00%Q\x00?000\x00MATCH\x00like\x00implies_nonnull_row\x00expr_compare\x00expr_implies_expr\x00affinity\x00soundex\x00load_extension\x00sqlite_compileoption_used\x00sqlite_compileoption_get\x00unlikely\x00likelihood\x00likely\x00sqlite_offset\x00ltrim\x00rtrim\x00trim\x00min\x00max\x00typeof\x00subtype\x00length\x00octet_length\x00instr\x00printf\x00format\x00unicode\x00char\x00abs\x00round\x00upper\x00lower\x00hex\x00unhex\x00concat\x00concat_ws\x00ifnull\x00random\x00randomblob\x00nullif\x00sqlite_version\x00sqlite_source_id\x00sqlite_log\x00quote\x00last_insert_rowid\x00changes\x00total_changes\x00replace\x00zeroblob\x00substr\x00substring\x00sum\x00total\x00avg\x00count\x00group_concat\x00string_agg\x00glob\x00ceil\x00trunc\x00ln\x00log\x00log10\x00log2\x00exp\x00pow\x00power\x00mod\x00acos\x00asin\x00atan\x00atan2\x00cos\x00sin\x00tan\x00cosh\x00sinh\x00tanh\x00acosh\x00asinh\x00atanh\x00sqrt\x00radians\x00degrees\x00pi\x00sign\x00iif\x00if\x00foreign key mismatch - \"%w\" referencing \"%w\"\x00cannot INSERT into generated column \"%s\"\x00table %S has no column named %s\x00SCAN %S\x00table %S has %d columns but %d values were supplied\x00%d values for %d columns\x00UPSERT not implemented for virtual table \"%s\"\x00cannot UPSERT a view\x00rows inserted\x00so\x00sqlite3_extension_init\x00sqlite3_\x00lib\x00_init\x00no entry point [%s] in shared library [%s]\x00error during initialization: %s\x00unable to open shared library [%.*s]\x00automatic extension loading failed: %s\x00seq\x00from\x00to\x00on_update\x00on_delete\x00match\x00cid\x00name\x00type\x00notnull\x00dflt_value\x00pk\x00hidden\x00builtin\x00enc\x00narg\x00flags\x00schema\x00ncol\x00wr\x00strict\x00seqno\x00desc\x00coll\x00key\x00unique\x00origin\x00partial\x00wdth\x00hght\x00flgs\x00rowid\x00fkid\x00busy\x00checkpointed\x00file\x00database\x00status\x00cache_size\x00timeout\x00analysis_limit\x00application_id\x00auto_vacuum\x00automatic_index\x00busy_timeout\x00cache_spill\x00case_sensitive_like\x00cell_size_check\x00checkpoint_fullfsync\x00collation_list\x00compile_options\x00count_changes\x00data_version\x00database_list\x00default_cache_size\x00defer_foreign_keys\x00empty_result_callbacks\x00encoding\x00foreign_key_check\x00foreign_key_list\x00foreign_keys\x00freelist_count\x00full_column_names\x00fullfsync\x00function_list\x00hard_heap_limit\x00ignore_check_constraints\x00incremental_vacuum\x00index_info\x00index_list\x00index_xinfo\x00integrity_check\x00journal_mode\x00journal_size_limit\x00legacy_alter_table\x00locking_mode\x00max_page_count\x00mmap_size\x00module_list\x00optimize\x00page_count\x00page_size\x00pragma_list\x00query_only\x00quick_check\x00read_uncommitted\x00recursive_triggers\x00reverse_unordered_selects\x00schema_version\x00secure_delete\x00short_column_names\x00shrink_memory\x00soft_heap_limit\x00synchronous\x00table_info\x00table_list\x00table_xinfo\x00temp_store\x00temp_store_directory\x00threads\x00trusted_schema\x00user_version\x00wal_autocheckpoint\x00wal_checkpoint\x00writable_schema\x00exclusive\x00normal\x00full\x00incremental\x00memory\x00temporary storage cannot be changed from within a transaction\x00SET NULL\x00SET DEFAULT\x00CASCADE\x00RESTRICT\x00NO ACTION\x00delete\x00persist\x00off\x00truncate\x00wal\x00utf8\x00utf16le\x00utf16be\x00w\x00a\x00sissii\x00-%T\x00fast\x00not a writable directory\x00Safety level may not be changed inside a transaction\x00reset\x00issisii\x00issisi\x00SELECT*FROM\"%w\"\x00shadow\x00sssiii\x00iisX\x00isiX\x00c\x00u\x00isisi\x00iss\x00is\x00iissssss\x00NONE\x00siX\x00*** in database %s ***\n\x00wrong # of entries in index \x00row not in PRIMARY KEY order for %s\x00NULL value in %s.%s\x00non-%s value in %s.%s\x00NUMERIC value in %s.%s\x00C\x00TEXT value in %s.%s\x00CHECK constraint failed in %s\x00row \x00 missing from index \x00rowid not at end-of-record for row \x00 of index \x00 values differ from index \x00non-unique entry in index \x00ok\x00UTF8\x00UTF-8\x00UTF-16le\x00UTF-16be\x00UTF16le\x00UTF16be\x00UTF-16\x00UTF16\x00unsupported encoding: %s\x00restart\x00ANALYZE \"%w\".\"%w\"\x00CREATE TABLE x\x00%c\"%s\"\x00(\"%s\"\x00,arg HIDDEN\x00,schema HIDDEN\x00PRAGMA \x00%Q.\x00=%Q\x00rename\x00drop column\x00add column\x00error in %s %s after %s: %s\x00malformed database schema (%s)\x00%z - %s\x00orphan index\x00CREATE TABLE x(type text,name text,tbl_name text,rootpage int,sql text)\x00unsupported file format\x00SELECT*FROM\"%w\".%s ORDER BY rowid\x00database schema is locked: %s\x00statement too long\x00unknown join type: %T%s%T%s%T\x00a NATURAL join may not have an ON or USING clause\x00cannot join using column %s - column not present in both tables\x00ambiguous reference to %s in USING()\x00CREATE BLOOM FILTER\x00UNION ALL\x00INTERSECT\x00EXCEPT\x00UNION\x00USE TEMP B-TREE FOR %s\x00LAST TERM OF \x00USE TEMP B-TREE FOR %sORDER BY\x00USE TEMP B-TREE FOR LAST %d TERMS OF ORDER BY\x00column%d\x00%.*z:%u\x00NUM\x00cannot use window functions in recursive queries\x00recursive aggregate queries not supported\x00SETUP\x00RECURSIVE STEP\x00S\x00SCAN %d CONSTANT ROW%s\x00COMPOUND QUERY\x00LEFT-MOST SUBQUERY\x00%s USING TEMP B-TREE\x00all VALUES must have the same number of terms\x00SELECTs to the left and right of %s do not have the same number of result columns\x00MERGE (%s)\x00LEFT\x00RIGHT\x00no such index: %s\x00'%s' is not a function\x00no such index: \"%s\"\x00multiple references to recursive table: %s\x00circular reference: %s\x00table %s has %d values for %d columns\x00multiple recursive references: %s\x00recursive reference in a subquery: %s\x00%!S\x00too many references to \"%s\": max 65535\x00access to view \"%s\" prohibited\x00..%s\x00%s.%s.%s\x00no such table: %s\x00no tables specified\x00too many columns in result set\x00DISTINCT aggregates must have exactly one argument\x00USE TEMP B-TREE FOR %s(DISTINCT)\x00USE TEMP B-TREE FOR %s(ORDER BY)\x00 USING COVERING INDEX \x00SCAN %s%s%s\x00target object/alias may not appear in FROM clause: %s\x00expected %d columns for '%s' but got %d\x00CO-ROUTINE %!S\x00MATERIALIZE %!S\x00DISTINCT\x00GROUP BY\x00sqlite3_get_table() called with two or more incompatible queries\x00temporary trigger may not have qualified name\x00trigger\x00cannot create triggers on virtual tables\x00cannot create triggers on shadow tables\x00trigger %T already exists\x00cannot create trigger on system table\x00BEFORE\x00AFTER\x00cannot create %s trigger on view: %S\x00cannot create INSTEAD OF trigger on table: %S\x00trigger \"%s\" may not write to shadow table \"%s\"\x00INSERT INTO %Q.sqlite_master VALUES('trigger',%Q,%Q,0,'CREATE TRIGGER %q')\x00type='trigger' AND name='%q'\x00no such trigger: %S\x00DELETE FROM %Q.sqlite_master WHERE name=%Q AND type='trigger'\x00DELETE\x00UPDATE\x00%s RETURNING is not available on virtual tables\x00RETURNING may not use \"TABLE.*\" wildcards\x00-- TRIGGER %s\x00cannot UPDATE generated column \"%s\"\x00no such column: %s\x00rows updated\x00%r \x00%sON CONFLICT clause does not match any PRIMARY KEY or UNIQUE constraint\x00CRE\x00INS\x00cannot VACUUM from within a transaction\x00cannot VACUUM - SQL statements in progress\x00non-text filename\x00vacuum_%016llx\x00ATTACH %Q AS %s\x00output file already exists\x00SELECT sql FROM \"%w\".sqlite_schema WHERE type='table'AND name<>'sqlite_sequence' AND coalesce(rootpage,1)>0\x00SELECT sql FROM \"%w\".sqlite_schema WHERE type='index'\x00SELECT'INSERT INTO %s.'||quote(name)||' SELECT*FROM\"%w\".'||quote(name)FROM %s.sqlite_schema WHERE type='table'AND coalesce(rootpage,1)>0\x00INSERT INTO %s.sqlite_schema SELECT*FROM \"%w\".sqlite_schema WHERE type IN('view','trigger') OR(type='table'AND rootpage=0)\x00CREATE VIRTUAL TABLE %T\x00UPDATE %Q.sqlite_master SET type='table', name=%Q, tbl_name=%Q, rootpage=0, sql=%Q WHERE rowid=#%d\x00name=%Q AND sql=%Q\x00vtable constructor called recursively: %s\x00vtable constructor failed: %s\x00vtable constructor did not declare schema: %s\x00no such module: %s\x00syntax error\x00<expr>\x00 AND \x00(\x00 (\x00%s=?\x00ANY(%s)\x00>\x00<\x00SEARCH\x00SCAN\x00%s %S\x00AUTOMATIC PARTIAL COVERING INDEX\x00AUTOMATIC COVERING INDEX\x00COVERING INDEX %s\x00INDEX %s\x00 USING \x00 USING INTEGER PRIMARY KEY (%s\x00>? AND %s\x00%c?)\x00 VIRTUAL TABLE INDEX \x000x%x:%s\x00%d:%s\x00 LEFT-JOIN\x00BLOOM FILTER ON %S (\x00rowid=?\x00MULTI-INDEX OR\x00INDEX %d\x00RIGHT-JOIN %s\x00regexp\x00ON clause references tables to its right\x00NOCASE\x00too many arguments on %s() - max %d\x00automatic index on %s(%s)\x00auto-index\x00%s.xBestIndex malfunction\x00abbreviated query algorithm search\x00no query solution\x00at most %d tables in a join\x00SCAN CONSTANT ROW\x00internal query planner error\x00second argument to nth_value must be a positive integer\x00argument of ntile must be a positive integer\x00no such window: %s\x00RANGE with offset PRECEDING/FOLLOWING requires one ORDER BY expression\x00FILTER clause may only be used with aggregate window functions\x00misuse of aggregate: %s()\x00unsupported frame specification\x00PARTITION clause\x00ORDER BY clause\x00frame specification\x00cannot override %s of window: %s\x00DISTINCT is not supported for window functions\x00frame starting offset must be a non-negative integer\x00frame ending offset must be a non-negative integer\x00frame starting offset must be a non-negative number\x00frame ending offset must be a non-negative number\x00near \"%T\": syntax error\x00ORDER BY\x00LIMIT\x00%s clause should come after %s not before\x00too many terms in compound SELECT\x00syntax error after column name \"%.*s\"\x00unknown table option: %.*s\x00set list\x00qualified table names are not allowed on INSERT, UPDATE, and DELETE statements within triggers\x00the INDEXED BY clause is not allowed on UPDATE or DELETE statements within triggers\x00the NOT INDEXED clause is not allowed on UPDATE or DELETE statements within triggers\x00incomplete input\x00unrecognized token: \"%T\"\x00%s in \"%s\"\x00create\x00temp\x00temporary\x00end\x00explain\x00unable to close due to unfinalized statements or unfinished backups\x00not an error\x00SQL logic error\x00access permission denied\x00query aborted\x00database is locked\x00database table is locked\x00attempt to write a readonly database\x00interrupted\x00disk I/O error\x00database disk image is malformed\x00unknown operation\x00database or disk is full\x00unable to open database file\x00locking protocol\x00constraint failed\x00datatype mismatch\x00bad parameter or other API misuse\x00authorization denied\x00column index out of range\x00file is not a database\x00notification message\x00warning message\x00unknown error\x00abort due to ROLLBACK\x00another row available\x00no more rows available\x00unable to delete/modify user-function due to active statements\x00unable to use function %s in the requested context\x00unknown database: %s\x00unable to delete/modify collation sequence due to active statements\x00file:\x00localhost\x00invalid uri authority: %.*s\x00vfs\x00cache\x00shared\x00private\x00mode\x00ro\x00rw\x00rwc\x00no such %s mode: %s\x00%s mode not allowed: %s\x00no such vfs: %s\x00RTRIM\x00\x00\x00\x00%s at line %d of [%.10s]\x00database corruption\x00misuse\x00cannot open file\x00no such table column: %s.%s\x00SQLITE_\x00database is deadlocked\x00array\x00object\x000123456789abcdef\x00JSON cannot hold BLOB values\x00malformed JSON\x00inf\x009.0e999\x00infinity\x00QNaN\x00SNaN\x00json_%s() needs an odd number of arguments\x00\"\\/bfnrt\x00-9e999\x009e999\x00inity\x00\\\"\x00\\u0009\x00\\u00\x00\\u0000\x00,\n\x00: \x00bad JSON path: %Q\x00@\x00[\x00#\x00.\"\x00\"\x00json_object() requires an even number of arguments\x00json_object() labels must be TEXT\x00set\x00insert\x00 \x00FLAGS parameter to json_valid() must be between 1 and 15\x00[]\x00{}\x00CREATE TABLE x(key,value,type,atom,id,parent,fullkey,path,json HIDDEN,root HIDDEN)\x00[%lld]\x00.\"%.*s\"\x00.%.*s\x00$\x00json\x00jsonb\x00json_array\x00jsonb_array\x00json_array_length\x00json_error_position\x00json_extract\x00jsonb_extract\x00->\x00->>\x00json_insert\x00jsonb_insert\x00json_object\x00jsonb_object\x00json_patch\x00jsonb_patch\x00json_pretty\x00json_quote\x00json_remove\x00jsonb_remove\x00json_replace\x00jsonb_replace\x00json_set\x00jsonb_set\x00json_type\x00json_valid\x00json_group_array\x00jsonb_group_array\x00json_group_object\x00jsonb_group_object\x00json_each\x00json_tree\x00data\x00DROP TABLE '%q'.'%q_node';DROP TABLE '%q'.'%q_rowid';DROP TABLE '%q'.'%q_parent';\x00RtreeMatchArg\x00SELECT * FROM %Q.%Q\x00UNIQUE constraint failed: %s.%s\x00rtree constraint failed: %s.(%s<=%s)\x00ALTER TABLE %Q.'%q_node' RENAME TO \"%w_node\";ALTER TABLE %Q.'%q_parent' RENAME TO \"%w_parent\";ALTER TABLE %Q.'%q_rowid' RENAME TO \"%w_rowid\";\x00SELECT stat FROM %Q.sqlite_stat1 WHERE tbl = '%q_rowid'\x00node\x00INSERT OR REPLACE INTO '%q'.'%q_node' VALUES(?1, ?2)\x00DELETE FROM '%q'.'%q_node' WHERE nodeno = ?1\x00SELECT nodeno FROM '%q'.'%q_rowid' WHERE rowid = ?1\x00INSERT OR REPLACE INTO '%q'.'%q_rowid' VALUES(?1, ?2)\x00DELETE FROM '%q'.'%q_rowid' WHERE rowid = ?1\x00SELECT parentnode FROM '%q'.'%q_parent' WHERE nodeno = ?1\x00INSERT OR REPLACE INTO '%q'.'%q_parent' VALUES(?1, ?2)\x00DELETE FROM '%q'.'%q_parent' WHERE nodeno = ?1\x00CREATE TABLE \"%w\".\"%w_rowid\"(rowid INTEGER PRIMARY KEY,nodeno\x00,a%d\x00);CREATE TABLE \"%w\".\"%w_node\"(nodeno INTEGER PRIMARY KEY,data);\x00CREATE TABLE \"%w\".\"%w_parent\"(nodeno INTEGER PRIMARY KEY,parentnode);\x00INSERT INTO \"%w\".\"%w_node\"VALUES(1,zeroblob(%d))\x00INSERT INTO\"%w\".\"%w_rowid\"(rowid,nodeno)VALUES(?1,?2)ON CONFLICT(rowid)DO UPDATE SET nodeno=excluded.nodeno\x00SELECT * FROM \"%w\".\"%w_rowid\" WHERE rowid=?1\x00UPDATE \"%w\".\"%w_rowid\"SET \x00a%d=coalesce(?%d,a%d)\x00a%d=?%d\x00 WHERE rowid=?1\x00PRAGMA %Q.page_size\x00SELECT length(data) FROM '%q'.'%q_node' WHERE nodeno = 1\x00undersize RTree blobs in \"%q_node\"\x00Wrong number of columns for an rtree table\x00Too few columns for an rtree table\x00Too many columns for an rtree table\x00Auxiliary rtree columns must be last\x00_node\x00CREATE TABLE x(%.*s INT\x00,%.*s\x00,%.*s REAL\x00,%.*s INT\x00);\x00{%lld\x00 %g\x00}\x00Invalid argument to rtreedepth()\x00%z%s%z\x00SELECT data FROM %Q.'%q_node' WHERE nodeno=?\x00Node %lld missing from database\x00SELECT parentnode FROM %Q.'%q_parent' WHERE nodeno=?1\x00SELECT nodeno FROM %Q.'%q_rowid' WHERE rowid=?1\x00%_rowid\x00%_parent\x00Mapping (%lld -> %lld) missing from %s table\x00Found (%lld -> %lld) in %s table, expected (%lld -> %lld)\x00Dimension %d of cell %d on node %lld is corrupt\x00Dimension %d of cell %d on node %lld is corrupt relative to parent\x00Node %lld is too small (%d bytes)\x00Rtree depth out of range (%d)\x00Node %lld is too small for cell count of %d (%d bytes)\x00SELECT count(*) FROM %Q.'%q%s'\x00Wrong number of entries in %%%s table - expected %lld, actual %lld\x00SELECT * FROM %Q.'%q_rowid'\x00Schema corrupt or not an rtree\x00_rowid\x00_parent\x00In RTree %s.%s:\n%z\x00wrong number of arguments to function rtreecheck()\x00[%!g,%!g],\x00[%!g,%!g]]\x00<polyline points=\x00%c%g,%g\x00 %g,%g'\x00 %s\x00></polyline>\x00CREATE TABLE x(_shape\x00,%s\x00rtree\x00fullscan\x00_shape does not contain a valid polygon\x00geopoly_overlap\x00geopoly_within\x00geopoly_area\x00geopoly_blob\x00geopoly_json\x00geopoly_svg\x00geopoly_contains_point\x00geopoly_debug\x00geopoly_bbox\x00geopoly_xform\x00geopoly_regular\x00geopoly_ccw\x00geopoly_group_bbox\x00geopoly\x00rtreenode\x00rtreedepth\x00rtreecheck\x00rtree_i32\x00corrupt fossil delta\x00DROP TRIGGER IF EXISTS temp.rbu_insert_tr;DROP TRIGGER IF EXISTS temp.rbu_update1_tr;DROP TRIGGER IF EXISTS temp.rbu_update2_tr;DROP TRIGGER IF EXISTS temp.rbu_delete_tr;\x00AND rootpage!=0 AND rootpage IS NOT NULL\x00SELECT rbu_target_name(name, type='view') AS target, name FROM sqlite_schema WHERE type IN ('table', 'view') AND target IS NOT NULL %s ORDER BY name\x00SELECT name, rootpage, sql IS NULL OR substr(8, 6)=='UNIQUE' FROM main.sqlite_schema WHERE type='index' AND tbl_name = ?\x00SELECT (sql COLLATE nocase BETWEEN 'CREATE VIRTUAL' AND 'CREATE VIRTUAM'), rootpage FROM sqlite_schema WHERE name=%Q\x00PRAGMA index_list=%Q\x00SELECT rootpage FROM sqlite_schema WHERE name = %Q\x00PRAGMA table_info=%Q\x00PRAGMA main.index_list = %Q\x00PRAGMA main.index_xinfo = %Q\x00SELECT * FROM '%q'\x00rbu_\x00rbu_rowid\x00may not have\x00requires\x00table %q %s rbu_rowid column\x00PRAGMA table_info(%Q)\x00column missing from %q: %s\x00%z%s\"%w\"\x00%z%s%s\"%w\"%s\x00SELECT max(_rowid_) FROM \"%s%w\"\x00 WHERE _rowid_ > %lld \x00 DESC\x00quote(\x00||','||\x00SELECT %s FROM \"%s%w\" ORDER BY %s LIMIT 1\x00 WHERE (%s) > (%s) \x00_rowid_\x00%z%s \"%w\" COLLATE %Q\x00%z%s \"rbu_imp_%d%w\" COLLATE %Q DESC\x00%z%s quote(\"rbu_imp_%d%w\")\x00SELECT %s FROM \"rbu_imp_%w\" ORDER BY %s LIMIT 1\x00%z%s%s\x00(%s) > (%s)\x00%z%s(%.*s) COLLATE %Q\x00%z%s\"%w\" COLLATE %Q\x00%z%s\"rbu_imp_%d%w\"%s\x00%z%s\"rbu_imp_%d%w\" %s COLLATE %Q\x00%z%s\"rbu_imp_%d%w\" IS ?\x00%z%s%s.\"%w\"\x00%z%sNULL\x00%z, %s._rowid_\x00_rowid_ = ?%d\x00%z%sc%d=?%d\x00_rowid_ = (SELECT id FROM rbu_imposter2 WHERE %z)\x00%z%s\"%w\"=?%d\x00invalid rbu_control value\x00%z%s\"%w\"=rbu_delta(\"%w\", ?%d)\x00%z%s\"%w\"=rbu_fossil_delta(\"%w\", ?%d)\x00PRIMARY KEY(\x00%z%s\"%w\"%s\x00%z)\x00SELECT name FROM sqlite_schema WHERE rootpage = ?\x00%z%sc%d %s COLLATE %Q\x00%z%sc%d%s\x00%z, id INTEGER\x00CREATE TABLE rbu_imposter2(%z, PRIMARY KEY(%z)) WITHOUT ROWID\x00PRIMARY KEY \x00 NOT NULL\x00%z%s\"%w\" %s %sCOLLATE %Q%s\x00%z, %z\x00 WITHOUT ROWID\x00CREATE TABLE \"rbu_imp_%w\"(%z)%s\x00INSERT INTO %s.'rbu_tmp_%q'(rbu_control,%s%s) VALUES(%z)\x00SELECT trim(sql) FROM sqlite_schema WHERE type='index' AND name=?\x00 LIMIT -1 OFFSET %d\x00CREATE TABLE \"rbu_imp_%w\"( %s, PRIMARY KEY( %s ) ) WITHOUT ROWID\x00INSERT INTO \"rbu_imp_%w\" VALUES(%s)\x00DELETE FROM \"rbu_imp_%w\" WHERE %s\x00AND\x00WHERE\x00SELECT %s, 0 AS rbu_control FROM '%q' %s %s %s ORDER BY %s%s\x00SELECT %s, rbu_control FROM %s.'rbu_tmp_%q' %s ORDER BY %s%s\x00SELECT %s, rbu_control FROM %s.'rbu_tmp_%q' %s UNION ALL SELECT %s, rbu_control FROM '%q' %s %s typeof(rbu_control)='integer' AND rbu_control!=1 ORDER BY %s%s\x00rbu_imp_\x00, _rowid_\x00INSERT INTO \"%s%w\"(%s%s) VALUES(%s)\x00DELETE FROM \"%s%w\" WHERE %s\x00, rbu_rowid\x00, 0 AS rbu_rowid\x00CREATE TABLE IF NOT EXISTS %s.'rbu_tmp_%q' AS SELECT *%s FROM '%q' WHERE 0;\x00CREATE TEMP TRIGGER rbu_delete_tr BEFORE DELETE ON \"%s%w\" BEGIN SELECT rbu_tmp_insert(3, %s);END;CREATE TEMP TRIGGER rbu_update1_tr BEFORE UPDATE ON \"%s%w\" BEGIN SELECT rbu_tmp_insert(3, %s);END;CREATE TEMP TRIGGER rbu_update2_tr AFTER UPDATE ON \"%s%w\" BEGIN SELECT rbu_tmp_insert(4, %s);END;\x00CREATE TEMP TRIGGER rbu_insert_tr AFTER INSERT ON \"%s%w\" BEGIN SELECT rbu_tmp_insert(0, %s);END;\x00,_rowid_ \x00,rbu_rowid\x000 AS \x00SELECT %s,%s rbu_control%s FROM '%q'%s %s %s %s\x00UPDATE \"%s%w\" SET %s WHERE %s\x00SELECT k, v FROM %s.rbu_state\x00file:///%s-vacuum?modeof=%s\x00ATTACH %Q AS stat\x00CREATE TABLE IF NOT EXISTS %s.rbu_state(k INTEGER PRIMARY KEY, v)\x00cannot vacuum wal mode database\x00&\x00file:%s-vactmp?rbu_memory=1%s%s\x00rbu_tmp_insert\x00rbu_fossil_delta\x00rbu_target_name\x00SELECT * FROM sqlite_schema\x00rbu vfs not found\x00PRAGMA main.wal_checkpoint=restart\x00rbu_exclusive_checkpoint\x00%s-oal\x00%s-wal\x00PRAGMA schema_version\x00PRAGMA schema_version = %d\x00INSERT OR REPLACE INTO %s.rbu_state(k, v) VALUES (%d, %d), (%d, %Q), (%d, %Q), (%d, %d), (%d, %lld), (%d, %lld), (%d, %lld), (%d, %lld), (%d, %lld), (%d, %Q) \x00PRAGMA main.%s\x00PRAGMA main.%s = %d\x00PRAGMA writable_schema=1\x00SELECT sql FROM sqlite_schema WHERE sql!='' AND rootpage!=0 AND name!='sqlite_sequence' ORDER BY type DESC\x00SELECT * FROM sqlite_schema WHERE rootpage=0 OR rootpage IS NULL\x00INSERT INTO sqlite_schema VALUES(?,?,?,?,?)\x00PRAGMA writable_schema=0\x00DELETE FROM %s.'rbu_tmp_%q'\x00rbu_state mismatch error\x00rbu_vfs_%d\x00SELECT count(*) FROM sqlite_schema WHERE type='index' AND tbl_name = %Q\x00rbu_index_cnt\x00SELECT 1 FROM sqlite_schema WHERE tbl_name = 'rbu_count'\x00SELECT sum(cnt * (1 + rbu_index_cnt(rbu_target_name(tbl))))FROM rbu_count\x00cannot update wal mode database\x00vacuum\x00update\x00database modified during rbu %s\x00BEGIN IMMEDIATE\x00PRAGMA journal_mode=off\x00-vactmp\x00DELETE FROM stat.rbu_state\x00rbu/zipvfs setup error\x00rbu(%s)/%z\x00rbu_memory\x00/\x00overflow\x00%s%.3x+%.6x\x00%s%.3x/\x00internal\x00leaf\x00corrupted\x00SELECT * FROM (SELECT 'sqlite_schema' AS name,1 AS rootpage,'table' AS type UNION ALL SELECT name,rootpage,type FROM \"%w\".sqlite_schema WHERE rootpage!=0)\x00WHERE name=%Q\x00 ORDER BY name\x00dbstat\x00SELECT 0, 'tbl', '', 0, '', 1, 0 UNION ALL SELECT 1, 'idx', '', 0, '', 2, 0 UNION ALL SELECT 2, 'stat', '', 0, '', 0, 0\x00PRAGMA '%q'.table_xinfo('%q')\x00SELECT\x00%z%s\"%w\".\"%w\".\"%w\"=\"%w\".\"%w\".\"%w\"\x00%z%s\"%w\".\"%w\".\"%w\" IS NOT \"%w\".\"%w\".\"%w\"\x00 OR \x00_rowid_, *\x00SELECT %s FROM \"%w\".\"%w\" WHERE NOT EXISTS ( SELECT 1 FROM \"%w\".\"%w\" WHERE %s)\x00%z%s\"%w\".\"%w\".\"%w\"\x00SELECT %s,%s FROM \"%w\".\"%w\", \"%w\".\"%w\" WHERE %s AND (%z)\x00table schemas do not match\x00, 1\x00 AND (?6 OR ?3 IS stat)\x00tbl, idx\x00?1, (CASE WHEN ?2=X'' THEN NULL ELSE ?2 END)\x00tbl, ?2, stat\x00?%d\x00 AND (?%d OR ?%d IS %w.%w)\x00SELECT %s%s FROM %Q.%Q WHERE (%s) IS (%s)\x00SAVEPOINT changeset\x00RELEASE changeset\x00UPDATE main.\x00 SET \x00 = ?\x00 WHERE \x00idx IS CASE WHEN length(?4)=0 AND typeof(?4)='blob' THEN NULL ELSE ?4 END \x00 IS ?\x00DELETE FROM main.\x00 AND (?\x00AND \x00INSERT INTO main.\x00) VALUES(?\x00, ?\x00INSERT INTO main.sqlite_stat1 VALUES(?1, CASE WHEN length(?2)=0 AND typeof(?2)='blob' THEN NULL ELSE ?2 END, ?3)\x00DELETE FROM main.sqlite_stat1 WHERE tbl=?1 AND idx IS CASE WHEN length(?2)=0 AND typeof(?2)='blob' THEN NULL ELSE ?2 END AND (?4 OR stat IS ?3)\x00SAVEPOINT replace_op\x00RELEASE replace_op\x00SAVEPOINT changeset_apply\x00PRAGMA defer_foreign_keys = 1\x00sqlite3changeset_apply(): no such table: %s\x00sqlite3changeset_apply(): table %s has %d columns, expected %d or more\x00sqlite3changeset_apply(): primary key mismatch for table %s\x00PRAGMA defer_foreign_keys = 0\x00RELEASE changeset_apply\x00ROLLBACK TO changeset_apply\x00fts5: parser stack overflow\x00fts5: syntax error near \"%.*s\"\x00%z%.*s\x00wrong number of arguments to function highlight()\x00wrong number of arguments to function snippet()\x00wrong number of arguments to function fts5_get_locale()\x00non-integer argument passed to function fts5_get_locale()\x00snippet\x00highlight\x00bm25\x00fts5_get_locale\x00prefix\x00malformed prefix=... directive\x00too many prefix indexes (max %d)\x00prefix length out of range (max 999)\x00tokenize\x00multiple tokenize=... directives\x00parse error in tokenize directive\x00content\x00multiple content=... directives\x00%Q.%Q\x00contentless_delete\x00malformed contentless_delete=... directive\x00contentless_unindexed\x00content_rowid\x00multiple content_rowid=... directives\x00columnsize\x00malformed columnsize=... directive\x00locale\x00malformed locale=... directive\x00columns\x00malformed detail=... directive\x00tokendata\x00malformed tokendata=... directive\x00unrecognized option: \"%.*s\"\x00rank\x00reserved fts5 column name: %s\x00unindexed\x00unrecognized column option: %s\x00T.%Q\x00, T.%Q\x00, T.c%d\x00, NULL\x00, T.l%d\x00reserved fts5 table name: %s\x00parse error in \"%s\"\x00contentless_delete=1 requires a contentless table\x00contentless_delete=1 is incompatible with columnsize=0\x00contentless_unindexed=1 requires a contentless table\x00docsize\x00%Q.'%q_%s'\x00CREATE TABLE x(\x00%z%s%Q\x00%z, %Q HIDDEN, %s HIDDEN)\x00pgsz\x00hashsize\x00automerge\x00usermerge\x00crisismerge\x00deletemerge\x00secure-delete\x00insttoken\x00SELECT k, v FROM %Q.'%q_config'\x00version\x00invalid fts5 file format (found %d, expected %d or %d) - run 'rebuild'\x00unterminated string\x00fts5: syntax error near \"%.1s\"\x00OR\x00NOT\x00NEAR\x00expected integer, got \"%.*s\"\x00fts5: column queries are not supported (detail=none)\x00phrase\x00fts5: %s queries are not supported (detail!=full)\x00fts5 expression tree is too large (maximum depth %d)\x00block\x00REPLACE INTO '%q'.'%q_data'(id, block) VALUES(?,?)\x00DELETE FROM '%q'.'%q_data' WHERE id>=? AND id<=?\x00DELETE FROM '%q'.'%q_idx' WHERE segid=?\x00\xff\x00\x00\x01\x00PRAGMA %Q.data_version\x00SELECT pgno FROM '%q'.'%q_idx' WHERE segid=? AND term<=? ORDER BY term DESC LIMIT 1\x00SELECT pgno FROM '%q'.'%q_idx' WHERE segid=? AND term>? ORDER BY term ASC LIMIT 1\x00INSERT INTO '%q'.'%q_idx'(segid,term,pgno) VALUES(?,?,?)\x00DELETE FROM '%q'.'%q_idx' WHERE (segid, (pgno/2)) = (?1, ?2)\x00REPLACE INTO %Q.'%q_config' VALUES ('version', %d)\x00%s_data\x00id INTEGER PRIMARY KEY, block BLOB\x00segid, term, pgno, PRIMARY KEY(segid, term)\x00\x00\x00SELECT segid, term, (pgno>>1), (pgno&1) FROM %Q.'%q_idx' WHERE segid=%d ORDER BY 1, 2\x00\x00\x00\x00\x00\x00recursively defined fts5 content table\x00DESC\x00ASC\x00SELECT rowid, rank FROM %Q.%Q ORDER BY %s(\"%w\"%s%s) %s\x00reads\x00unknown special query: %.*s\x00SELECT %s\x00no such function: %s\x00parse error in rank function: %s\x00%.*s\x00%s: table does not support scanning\x00fts5: missing row %lld from content table %s\x00delete-all\x00'delete-all' may only be used with a contentless or external content fts5 table\x00rebuild\x00'rebuild' may not be used with a contentless fts5 table\x00merge\x00integrity-check\x00flush\x00%s a subset of columns on fts5 contentless-delete table: %s\x00%s contentless fts5 table: %s\x00cannot UPDATE\x00'delete' may not be used with a contentless_delete=1 table\x00cannot DELETE from contentless fts5 table: %s\x00fts5_locale() requires locale=1\x00no such cursor: %lld\x00no such tokenizer: %s\x00error in tokenizer constructor\x00fts5_api_ptr\x00fts5: 2025-05-07 10:39:52 17144570b0d96ae63cd6f3edca39e27ebd74925252bbaf6723bcb2f6b4861fb1\x00config\x00malformed inverted index for FTS5 table %s.%s\x00unable to validate the inverted index for FTS5 table %s.%s: %s\x00fts5\x00fts5_source_id\x00fts5_locale\x00fts5_insttoken\x00SELECT %s FROM %s T WHERE T.%Q >= ? AND T.%Q <= ? ORDER BY T.%Q ASC\x00SELECT %s FROM %s T WHERE T.%Q <= ? AND T.%Q >= ? ORDER BY T.%Q DESC\x00SELECT %s FROM %s T WHERE T.%Q=?\x00INSERT INTO %Q.'%q_content' VALUES(%s)\x00REPLACE INTO %Q.'%q_content' VALUES(%s)\x00DELETE FROM %Q.'%q_content' WHERE id=?\x00REPLACE INTO %Q.'%q_docsize' VALUES(?,?%s)\x00DELETE FROM %Q.'%q_docsize' WHERE id=?\x00SELECT sz%s FROM %Q.'%q_docsize' WHERE id=?\x00REPLACE INTO %Q.'%q_config' VALUES(?,?)\x00SELECT %s FROM %s AS T\x00%z%s?%d\x00%z,?%d\x00,?\x00,origin\x00DROP TABLE IF EXISTS %Q.'%q_data';DROP TABLE IF EXISTS %Q.'%q_idx';DROP TABLE IF EXISTS %Q.'%q_config';\x00DROP TABLE IF EXISTS %Q.'%q_docsize';\x00DROP TABLE IF EXISTS %Q.'%q_content';\x00ALTER TABLE %Q.'%q_%s' RENAME TO '%q_%s';\x00CREATE TABLE %Q.'%q_%q'(%s)%s\x00fts5: error creating shadow table %q_%s: %s\x00id INTEGER PRIMARY KEY\x00, c%d\x00, l%d\x00id INTEGER PRIMARY KEY, sz BLOB\x00id INTEGER PRIMARY KEY, sz BLOB, origin INTEGER\x00k PRIMARY KEY, v\x00DELETE FROM %Q.'%q_data';DELETE FROM %Q.'%q_idx';\x00DELETE FROM %Q.'%q_docsize';\x00DELETE FROM %Q.'%q_content';\x00SELECT count(*) FROM %Q.'%q_%s'\x00tokenchars\x00separators\x00L* N* Co\x00categories\x00remove_diacritics\x00unicode61\x00al\x00ance\x00ence\x00er\x00ic\x00able\x00ible\x00ant\x00ement\x00ment\x00ent\x00ion\x00ou\x00ism\x00ate\x00iti\x00ous\x00ive\x00ize\x00at\x00bl\x00ble\x00iz\x00ational\x00tional\x00tion\x00enci\x00anci\x00izer\x00logi\x00bli\x00alli\x00entli\x00eli\x00e\x00ousli\x00ization\x00ation\x00ator\x00alism\x00iveness\x00fulness\x00ful\x00ousness\x00aliti\x00iviti\x00biliti\x00ical\x00ness\x00icate\x00iciti\x00ative\x00alize\x00eed\x00ee\x00ed\x00ing\x00case_sensitive\x00trigram\x00ascii\x00porter\x00col\x00row\x00instance\x00fts5vocab: unknown table type: %Q\x00CREATE TABlE vocab(term, col, doc, cnt)\x00CREATE TABlE vocab(term, doc, cnt)\x00CREATE TABlE vocab(term, doc, col, offset)\x00wrong number of vtable arguments\x00recursive definition for %s.%s\x00SELECT t.%Q FROM %Q.%Q AS t WHERE t.%Q MATCH '*id'\x00no such fts5 table: %s.%s\x00fts5vocab\x002025-05-07 10:39:52 17144570b0d96ae63cd6f3edca39e27ebd74925252bbaf6723bcb2f6b4861fb1\x00"
+var __ccgo_ts1 = "ATOMIC_INTRINSICS=1\x00COMPILER=gcc-12.2.0\x00DEFAULT_AUTOVACUUM\x00DEFAULT_CACHE_SIZE=-2000\x00DEFAULT_FILE_FORMAT=4\x00DEFAULT_JOURNAL_SIZE_LIMIT=-1\x00DEFAULT_MEMSTATUS=0\x00DEFAULT_MMAP_SIZE=0\x00DEFAULT_PAGE_SIZE=4096\x00DEFAULT_PCACHE_INITSZ=20\x00DEFAULT_RECURSIVE_TRIGGERS\x00DEFAULT_SECTOR_SIZE=4096\x00DEFAULT_SYNCHRONOUS=2\x00DEFAULT_WAL_AUTOCHECKPOINT=1000\x00DEFAULT_WAL_SYNCHRONOUS=2\x00DEFAULT_WORKER_THREADS=0\x00DIRECT_OVERFLOW_READ\x00ENABLE_COLUMN_METADATA\x00ENABLE_DBSTAT_VTAB\x00ENABLE_FTS5\x00ENABLE_GEOPOLY\x00ENABLE_MATH_FUNCTIONS\x00ENABLE_MEMORY_MANAGEMENT\x00ENABLE_OFFSET_SQL_FUNC\x00ENABLE_PREUPDATE_HOOK\x00ENABLE_RBU\x00ENABLE_RTREE\x00ENABLE_SESSION\x00ENABLE_SNAPSHOT\x00ENABLE_STAT4\x00ENABLE_UNLOCK_NOTIFY\x00LIKE_DOESNT_MATCH_BLOBS\x00MALLOC_SOFT_LIMIT=1024\x00MAX_ATTACHED=10\x00MAX_COLUMN=2000\x00MAX_COMPOUND_SELECT=500\x00MAX_DEFAULT_PAGE_SIZE=8192\x00MAX_EXPR_DEPTH=1000\x00MAX_FUNCTION_ARG=1000\x00MAX_LENGTH=1000000000\x00MAX_LIKE_PATTERN_LENGTH=50000\x00MAX_MMAP_SIZE=0x7fff0000\x00MAX_PAGE_COUNT=0xfffffffe\x00MAX_PAGE_SIZE=65536\x00MAX_SQL_LENGTH=1000000000\x00MAX_TRIGGER_DEPTH=1000\x00MAX_VARIABLE_NUMBER=32766\x00MAX_VDBE_OP=250000000\x00MAX_WORKER_THREADS=8\x00MUTEX_PTHREADS\x00SOUNDEX\x00SYSTEM_MALLOC\x00TEMP_STORE=1\x00THREADSAFE=1\x00ANY\x00BLOB\x00INT\x00INTEGER\x00REAL\x00TEXT\x0020b:20e\x0020c:20e\x0020e\x0040f-21a-21d\x00now\x00subsec\x00subsecond\x00local time unavailable\x00auto\x00ceiling\x00floor\x00julianday\x00localtime\x00unixepoch\x00utc\x00weekday \x00start of \x00month\x00year\x00day\x0040f\x0050f\x0040f-20a-20d\x0050f-20a-20d\x00%02d\x00%2d\x00%06.3f\x00%04d-%02d-%02d\x00%04d\x00%03d\x00%.16g\x00PM\x00pm\x00AM\x00am\x00%02d:%02d\x00%.3f\x00%lld\x00%02d:%02d:%02d\x00%c%04d-%02d-%02d %02d:%02d:%06.3f\x00date\x00time\x00datetime\x00strftime\x00timediff\x00current_time\x00current_timestamp\x00current_date\x00failed to allocate %u bytes of memory\x00failed memory resize %u to %u bytes\x00out of memory\x00%\x00null\x00NaN\x00-Inf\x00\x00NULL\x00(NULL)\x00unistr('\x000123456789abcdef\x00.\x00(join-%u)\x00%u-ROW VALUES CLAUSE\x00(subquery-%u)\x00unrecognized token: \"%s\"\x00922337203685477580\x00+- \n\t0123456789\x000\x00API call with %s database connection pointer\x00unopened\x00invalid\x00Savepoint\x00AutoCommit\x00Transaction\x00Checkpoint\x00JournalMode\x00Vacuum\x00VFilter\x00VUpdate\x00Init\x00Goto\x00Gosub\x00InitCoroutine\x00Yield\x00MustBeInt\x00Jump\x00Once\x00If\x00IfNot\x00IsType\x00Not\x00IfNullRow\x00SeekLT\x00SeekLE\x00SeekGE\x00SeekGT\x00IfNotOpen\x00IfNoHope\x00NoConflict\x00NotFound\x00Found\x00SeekRowid\x00NotExists\x00Last\x00IfSizeBetween\x00SorterSort\x00Sort\x00Rewind\x00SorterNext\x00Prev\x00Next\x00IdxLE\x00IdxGT\x00IdxLT\x00Or\x00And\x00IdxGE\x00RowSetRead\x00RowSetTest\x00Program\x00FkIfZero\x00IfPos\x00IsNull\x00NotNull\x00Ne\x00Eq\x00Gt\x00Le\x00Lt\x00Ge\x00ElseEq\x00IfNotZero\x00DecrJumpZero\x00IncrVacuum\x00VNext\x00Filter\x00PureFunc\x00Function\x00Return\x00EndCoroutine\x00HaltIfNull\x00Halt\x00Integer\x00Int64\x00String\x00BeginSubrtn\x00Null\x00SoftNull\x00Blob\x00Variable\x00Move\x00Copy\x00SCopy\x00IntCopy\x00FkCheck\x00ResultRow\x00CollSeq\x00AddImm\x00RealAffinity\x00Cast\x00Permutation\x00Compare\x00IsTrue\x00ZeroOrNull\x00Offset\x00Column\x00TypeCheck\x00Affinity\x00MakeRecord\x00Count\x00ReadCookie\x00SetCookie\x00ReopenIdx\x00OpenRead\x00BitAnd\x00BitOr\x00ShiftLeft\x00ShiftRight\x00Add\x00Subtract\x00Multiply\x00Divide\x00Remainder\x00Concat\x00OpenWrite\x00OpenDup\x00BitNot\x00OpenAutoindex\x00OpenEphemeral\x00String8\x00SorterOpen\x00SequenceTest\x00OpenPseudo\x00Close\x00ColumnsUsed\x00SeekScan\x00SeekHit\x00Sequence\x00NewRowid\x00Insert\x00RowCell\x00Delete\x00ResetCount\x00SorterCompare\x00SorterData\x00RowData\x00Rowid\x00NullRow\x00SeekEnd\x00IdxInsert\x00SorterInsert\x00IdxDelete\x00DeferredSeek\x00IdxRowid\x00FinishSeek\x00Destroy\x00Clear\x00ResetSorter\x00CreateBtree\x00SqlExec\x00ParseSchema\x00LoadAnalysis\x00DropTable\x00DropIndex\x00DropTrigger\x00Real\x00IntegrityCk\x00RowSetAdd\x00Param\x00FkCounter\x00MemMax\x00OffsetLimit\x00AggInverse\x00AggStep\x00AggStep1\x00AggValue\x00AggFinal\x00Expire\x00CursorLock\x00CursorUnlock\x00TableLock\x00VBegin\x00VCreate\x00VDestroy\x00VOpen\x00VCheck\x00VInitIn\x00VColumn\x00VRename\x00Pagecount\x00MaxPgcnt\x00ClrSubtype\x00GetSubtype\x00SetSubtype\x00FilterAdd\x00Trace\x00CursorHint\x00ReleaseReg\x00Noop\x00Explain\x00Abortable\x00open\x00close\x00access\x00getcwd\x00stat\x00fstat\x00ftruncate\x00fcntl\x00read\x00pread\x00pread64\x00write\x00pwrite\x00pwrite64\x00fchmod\x00fallocate\x00unlink\x00openDirectory\x00mkdir\x00rmdir\x00fchown\x00geteuid\x00mmap\x00munmap\x00mremap\x00getpagesize\x00readlink\x00lstat\x00ioctl\x00attempt to open \"%s\" as file descriptor %d\x00/dev/null\x00os_unix.c:%d: (%d) %s(%s) - %s\x00cannot fstat db file %s\x00file unlinked while open: %s\x00multiple links to file: %s\x00file renamed while open: %s\x00%s\x00full_fsync\x00%s-shm\x00readonly_shm\x00psow\x00unix-excl\x00%s.lock\x00/var/tmp\x00/usr/tmp\x00/tmp\x00SQLITE_TMPDIR\x00TMPDIR\x00%s/etilqs_%llx%c\x00modeof\x00fsync\x00/dev/urandom\x00unix\x00unix-none\x00unix-dotfile\x00memdb\x00memdb(%p,%lld)\x00PRAGMA \"%w\".page_count\x00BEGIN IMMEDIATE; COMMIT;\x00ATTACH x AS %Q\x00recovered %d pages from %s\x00-journal\x00-wal\x00nolock\x00immutable\x00PRAGMA table_list\x00recovered %d frames from WAL file %s\x00cannot limit WAL size: %s\x00:memory:\x00@ \x00\n\x00invalid page number %u\x002nd reference to page %u\x00Failed to read ptrmap key=%u\x00Bad ptr map entry key=%u expected=(%u,%u) got=(%u,%u)\x00failed to get page %u\x00freelist leaf count too big on page %u\x00size\x00overflow list length\x00%s is %u but should be %u\x00Tree %u page %u: \x00unable to get the page. error code=%d\x00btreeInitPage() returns error code %d\x00free space corruption\x00Tree %u page %u cell %u: \x00Tree %u page %u right child: \x00Offset %u out of range %u..%u\x00Extends off end of page\x00Rowid %lld out of order\x00Child page depth differs\x00Multiple uses for byte %u of page %u\x00Fragmentation of %u bytes reported as %u on page %u\x00Freelist: \x00max rootpage (%u) disagrees with header (%u)\x00incremental_vacuum enabled with a max rootpage of zero\x00Page %u: never used\x00Page %u: pointer map referenced\x00unknown database %s\x00destination database is in use\x00source and destination must be distinct\x00%!.15g\x00-\x00%s%s\x00k(%d\x00BINARY\x00B\x00N.\x00,%s%s%s\x00)\x00?\x008\x0016LE\x0016BE\x00%.18s-%s\x00%s(%d)\x00%d\x00(blob)\x00vtab:%p\x00%c%u\x00]\x00program\x00subrtnsig:%d,%s\x00%.4c%s%.16c\x00MJ delete: %s\x00MJ collide: %s\x00-mj%06X9%02X\x00FOREIGN KEY constraint failed\x00a CHECK constraint\x00a generated column\x00an index\x00non-deterministic use of %s() in %s\x00API called with finalized prepared statement\x00API called with NULL prepared statement\x00string or blob too big\x00addr\x00opcode\x00p1\x00p2\x00p3\x00p4\x00p5\x00comment\x00id\x00parent\x00notused\x00detail\x00bind on a busy prepared statement: [%s]\x00-- \x00'%.*q'\x00zeroblob(%d)\x00x'\x00%02x\x00'\x00NOT NULL\x00UNIQUE\x00CHECK\x00FOREIGN KEY\x00%s constraint failed\x00%z: %s\x00abort at %d: %s; [%s]\x00cannot store %s value in %s column %s.%s\x00cannot open savepoint - SQL statements in progress\x00no such savepoint: %s\x00cannot release savepoint - SQL statements in progress\x00cannot commit transaction - SQL statements in progress\x00cannot start a transaction within a transaction\x00cannot rollback - no transaction is active\x00cannot commit - no transaction is active\x00database schema has changed\x00index corruption\x00sqlite_master\x00SELECT*FROM\"%w\".%s WHERE %s ORDER BY rowid\x00too many levels of trigger recursion\x00into\x00out of\x00cannot change %s wal mode from within a transaction\x00database table is locked: %s\x00ValueList\x00-- %s\x00statement aborts at %d: %s; [%s]\x00real\x00integer\x00cannot open value of type %s\x00no such rowid: %lld\x00cannot open virtual table: %s\x00cannot open table without rowid: %s\x00cannot open table with generated columns: %s\x00cannot open view: %s\x00no such column: \"%s\"\x00foreign key\x00indexed\x00cannot open %s column for writing\x00sqlite_\x00sqlite_temp_master\x00sqlite_temp_schema\x00sqlite_schema\x00main\x00*\x00new\x00old\x00excluded\x00misuse of aliased aggregate %s\x00misuse of aliased window function %s\x00row value misused\x00double-quoted string literal: \"%w\"\x00coalesce\x00no such column\x00ambiguous column name\x00%s: %s.%s.%s\x00%s: %s.%s\x00%s: \"%s\" - should this be a string literal in single-quotes?\x00%s: %s\x00partial index WHERE clauses\x00index expressions\x00CHECK constraints\x00generated columns\x00%s prohibited in %s\x00the \".\" operator\x00second argument to %#T() must be a constant between 0.0 and 1.0\x00not authorized to use function: %#T\x00non-deterministic functions\x00%#T() may not be used as a window function\x00window\x00aggregate\x00misuse of %s function %#T()\x00no such function: %#T\x00wrong number of arguments to function %#T()\x00FILTER may not be used with non-aggregate %#T()\x00subqueries\x00parameters\x00%r %s BY term out of range - should be between 1 and %d\x00too many terms in ORDER BY clause\x00ORDER\x00%r ORDER BY term does not match any column in the result set\x00too many terms in %s BY clause\x00HAVING clause on a non-aggregate query\x00GROUP\x00aggregate functions are not allowed in the GROUP BY clause\x00Expression tree is too large (maximum depth %d)\x00s\x00IN(...) element has %d term%s - expected %d\x00too many arguments on function %T\x00ORDER BY may not be used with non-aggregate %#T()\x00unsafe use of %#T()\x00variable number must be between ?1 and ?%d\x00too many SQL variables\x00%d columns assigned %d values\x00too many columns in %s\x00true\x00false\x00_ROWID_\x00ROWID\x00OID\x00USING ROWID SEARCH ON TABLE %s FOR IN-OPERATOR\x00USING INDEX %s FOR IN-OPERATOR\x00sub-select returns %d columns - expected %d\x00REUSE LIST SUBQUERY %d\x00CORRELATED \x00%sLIST SUBQUERY %d\x00REUSE SUBQUERY %d\x00%sSCALAR SUBQUERY %d\x001\x000x\x00hex literal too big: %s%#T\x00generated column loop on \"%s\"\x00blob\x00text\x00numeric\x00flexnum\x00none\x00misuse of aggregate: %#T()\x00unknown function: %#T()\x00RAISE() may only be used within a trigger-program\x00table %s may not be altered\x00SELECT 1 FROM \"%w\".sqlite_master WHERE name NOT LIKE 'sqliteX_%%' ESCAPE 'X' AND sql NOT LIKE 'create virtual%%' AND sqlite_rename_test(%Q, sql, type, name, %d, %Q, %d)=NULL \x00SELECT 1 FROM temp.sqlite_master WHERE name NOT LIKE 'sqliteX_%%' ESCAPE 'X' AND sql NOT LIKE 'create virtual%%' AND sqlite_rename_test(%Q, sql, type, name, 1, %Q, %d)=NULL \x00UPDATE \"%w\".sqlite_master SET sql = sqlite_rename_quotefix(%Q, sql)WHERE name NOT LIKE 'sqliteX_%%' ESCAPE 'X' AND sql NOT LIKE 'create virtual%%'\x00UPDATE temp.sqlite_master SET sql = sqlite_rename_quotefix('temp', sql)WHERE name NOT LIKE 'sqliteX_%%' ESCAPE 'X' AND sql NOT LIKE 'create virtual%%'\x00there is already another table or index with this name: %s\x00table\x00view %s may not be altered\x00UPDATE \"%w\".sqlite_master SET sql = sqlite_rename_table(%Q, type, name, sql, %Q, %Q, %d) WHERE (type!='index' OR tbl_name=%Q COLLATE nocase)AND name NOT LIKE 'sqliteX_%%' ESCAPE 'X'\x00UPDATE %Q.sqlite_master SET tbl_name = %Q, name = CASE WHEN type='table' THEN %Q WHEN name LIKE 'sqliteX_autoindex%%' ESCAPE 'X' AND type='index' THEN 'sqlite_autoindex_' || %Q || substr(name,%d+18) ELSE name END WHERE tbl_name=%Q COLLATE nocase AND (type='table' OR type='index' OR type='trigger');\x00sqlite_sequence\x00UPDATE \"%w\".sqlite_sequence set name = %Q WHERE name = %Q\x00UPDATE sqlite_temp_schema SET sql = sqlite_rename_table(%Q, type, name, sql, %Q, %Q, 1), tbl_name = CASE WHEN tbl_name=%Q COLLATE nocase AND sqlite_rename_test(%Q, sql, type, name, 1, 'after rename', 0) THEN %Q ELSE tbl_name END WHERE type IN ('view', 'trigger')\x00after rename\x00SELECT raise(ABORT,%Q) FROM \"%w\".\"%w\"\x00Cannot add a PRIMARY KEY column\x00Cannot add a UNIQUE column\x00Cannot add a REFERENCES column with non-NULL default value\x00Cannot add a NOT NULL column with default value NULL\x00Cannot add a column with non-constant default\x00cannot add a STORED column\x00UPDATE \"%w\".sqlite_master SET sql = printf('%%.%ds, ',sql) || %Q || substr(sql,1+length(printf('%%.%ds',sql))) WHERE type = 'table' AND name = %Q\x00SELECT CASE WHEN quick_check GLOB 'CHECK*' THEN raise(ABORT,'CHECK constraint failed') WHEN quick_check GLOB 'non-* value in*' THEN raise(ABORT,'type mismatch on DEFAULT') ELSE raise(ABORT,'NOT NULL constraint failed') END FROM pragma_quick_check(%Q,%Q) WHERE quick_check GLOB 'CHECK*' OR quick_check GLOB 'NULL*' OR quick_check GLOB 'non-* value in*'\x00virtual tables may not be altered\x00Cannot add a column to a view\x00sqlite_altertab_%s\x00view\x00virtual table\x00drop column from\x00rename columns of\x00cannot %s %s \"%s\"\x00no such column: \"%T\"\x00UPDATE \"%w\".sqlite_master SET sql = sqlite_rename_column(sql, type, name, %Q, %Q, %d, %Q, %d, %d) WHERE name NOT LIKE 'sqliteX_%%' ESCAPE 'X' AND (type != 'index' OR tbl_name = %Q)\x00UPDATE temp.sqlite_master SET sql = sqlite_rename_column(sql, type, name, %Q, %Q, %d, %Q, %d, 1) WHERE type IN ('trigger', 'view')\x00 \x00error in %s %s%s%s: %s\x00CREATE \x00\"%w\" \x00%Q%s\x00%.*s%s\x00PRIMARY KEY\x00cannot drop %s column: \"%s\"\x00cannot drop column \"%s\": no other columns exist\x00UPDATE \"%w\".sqlite_master SET sql = sqlite_drop_column(%d, sql, %d) WHERE (type=='table' AND tbl_name=%Q COLLATE nocase)\x00after drop column\x00sqlite_rename_column\x00sqlite_rename_table\x00sqlite_rename_test\x00sqlite_drop_column\x00sqlite_rename_quotefix\x00sqlite_stat1\x00tbl,idx,stat\x00sqlite_stat4\x00tbl,idx,neq,nlt,ndlt,sample\x00sqlite_stat3\x00CREATE TABLE %Q.%s(%s)\x00DELETE FROM %Q.%s WHERE %s=%Q\x00DELETE FROM %Q.%s\x00stat_init\x00stat_push\x00%llu\x00 %llu\x00%llu \x00stat_get\x00sqlite\\_%\x00BBB\x00idx\x00tbl\x00unordered*\x00sz=[0-9]*\x00noskipscan*\x00SELECT idx,count(*) FROM %Q.sqlite_stat4 GROUP BY idx COLLATE nocase\x00SELECT idx,neq,nlt,ndlt,sample FROM %Q.sqlite_stat4\x00SELECT tbl,idx,stat FROM %Q.sqlite_stat1\x00x\x00\x00too many attached databases - max %d\x00database %s is already in use\x00database is already attached\x00attached databases must use the same text encoding as main database\x00unable to open database: %s\x00no such database: %s\x00cannot detach database %s\x00database %s is locked\x00sqlite_detach\x00sqlite_attach\x00%s cannot use variables\x00%s %T cannot reference objects in database %s\x00authorizer malfunction\x00%s.%s\x00%s.%z\x00access to %z is prohibited\x00not authorized\x00pragma_\x00no such view\x00no such table\x00corrupt database\x00unknown database %T\x00object name reserved for internal use: %s\x00temporary table name must be unqualified\x00%s %T already exists\x00there is already an index named %s\x00cannot use RETURNING in a trigger\x00sqlite_returning_%p\x00too many columns on %s\x00always\x00generated\x00duplicate column name: %s\x00default value of column [%s] is not constant\x00cannot use DEFAULT on a generated column\x00generated columns cannot be part of the PRIMARY KEY\x00table \"%s\" has more than one primary key\x00AUTOINCREMENT is only allowed on an INTEGER PRIMARY KEY\x00virtual tables cannot use computed columns\x00virtual\x00stored\x00error in generated column \"%s\"\x00,\x00\n \x00,\n \x00\n)\x00CREATE TABLE \x00 TEXT\x00 NUM\x00 INT\x00 REAL\x00unknown datatype for %s.%s: \"%s\"\x00missing datatype for %s.%s\x00AUTOINCREMENT not allowed on WITHOUT ROWID tables\x00PRIMARY KEY missing on table %s\x00must have at least one non-generated column\x00TABLE\x00VIEW\x00CREATE %s %.*s\x00UPDATE %Q.sqlite_master SET type='%s', name=%Q, tbl_name=%Q, rootpage=#%d, sql=%Q WHERE rowid=#%d\x00CREATE TABLE %Q.sqlite_sequence(name,seq)\x00tbl_name='%q' AND type!='trigger'\x00SELECT*FROM\"%w\".\"%w\"\x00parameters are not allowed in views\x00view %s is circularly defined\x00corrupt schema\x00UPDATE %Q.sqlite_master SET rootpage=%d WHERE #%d AND rootpage=#%d\x00sqlite_stat%d\x00DELETE FROM %Q.sqlite_sequence WHERE name=%Q\x00DELETE FROM %Q.sqlite_master WHERE tbl_name=%Q and type!='trigger'\x00table %s may not be dropped\x00use DROP TABLE to delete table %s\x00use DROP VIEW to delete view %s\x00foreign key on %s should reference only one column of table %T\x00number of columns in foreign key does not match the number of columns in the referenced table\x00unknown column \"%s\" in foreign key definition\x00FIRST\x00LAST\x00unsupported use of NULLS %s\x00index\x00cannot create a TEMP index on non-TEMP table \"%s\"\x00table %s may not be indexed\x00views may not be indexed\x00virtual tables may not be indexed\x00there is already a table named %s\x00index %s already exists\x00sqlite_autoindex_%s_%d\x00expressions prohibited in PRIMARY KEY and UNIQUE constraints\x00conflicting ON CONFLICT clauses specified\x00invalid rootpage\x00 UNIQUE\x00CREATE%s INDEX %.*s\x00INSERT INTO %Q.sqlite_master VALUES('index',%Q,%Q,#%d,%Q);\x00name='%q' AND type='index'\x00no such index: %S\x00index associated with UNIQUE or PRIMARY KEY constraint cannot be dropped\x00DELETE FROM %Q.sqlite_master WHERE name=%Q AND type='index'\x00too many FROM clause terms, max: %d\x00ON\x00USING\x00a JOIN clause is required before %s\x00BEGIN\x00ROLLBACK\x00COMMIT\x00RELEASE\x00unable to open a temporary database file for storing temporary tables\x00index '%q'\x00, \x00%s.rowid\x00unable to identify the object to be reindexed\x00duplicate WITH table name: %s\x00no such collation sequence: %s\x00unsafe use of virtual table \"%s\"\x00table %s may not be modified\x00cannot modify %s because it is a view\x00rows deleted\x00integer overflow\x00%!.*f\x00LIKE or GLOB pattern too complex\x00ESCAPE expression must be a single character\x00%!0.15g\x00%!0.20e\x00%#Q\x00%Q\x00invalid Unicode escape\x00?000\x00MATCH\x00like\x00implies_nonnull_row\x00expr_compare\x00expr_implies_expr\x00affinity\x00soundex\x00load_extension\x00sqlite_compileoption_used\x00sqlite_compileoption_get\x00unlikely\x00likelihood\x00likely\x00sqlite_offset\x00ltrim\x00rtrim\x00trim\x00min\x00max\x00typeof\x00subtype\x00length\x00octet_length\x00instr\x00printf\x00format\x00unicode\x00char\x00abs\x00round\x00upper\x00lower\x00hex\x00unhex\x00concat\x00concat_ws\x00ifnull\x00random\x00randomblob\x00nullif\x00sqlite_version\x00sqlite_source_id\x00sqlite_log\x00unistr\x00quote\x00unistr_quote\x00last_insert_rowid\x00changes\x00total_changes\x00replace\x00zeroblob\x00substr\x00substring\x00sum\x00total\x00avg\x00count\x00group_concat\x00string_agg\x00glob\x00ceil\x00trunc\x00ln\x00log\x00log10\x00log2\x00exp\x00pow\x00power\x00mod\x00acos\x00asin\x00atan\x00atan2\x00cos\x00sin\x00tan\x00cosh\x00sinh\x00tanh\x00acosh\x00asinh\x00atanh\x00sqrt\x00radians\x00degrees\x00pi\x00sign\x00iif\x00if\x00foreign key mismatch - \"%w\" referencing \"%w\"\x00cannot INSERT into generated column \"%s\"\x00table %S has no column named %s\x00SCAN %S\x00table %S has %d columns but %d values were supplied\x00%d values for %d columns\x00UPSERT not implemented for virtual table \"%s\"\x00cannot UPSERT a view\x00rows inserted\x00so\x00sqlite3_extension_init\x00sqlite3_\x00lib\x00_init\x00no entry point [%s] in shared library [%s]\x00error during initialization: %s\x00unable to open shared library [%.*s]\x00automatic extension loading failed: %s\x00seq\x00from\x00to\x00on_update\x00on_delete\x00match\x00cid\x00name\x00type\x00notnull\x00dflt_value\x00pk\x00hidden\x00builtin\x00enc\x00narg\x00flags\x00schema\x00ncol\x00wr\x00strict\x00seqno\x00desc\x00coll\x00key\x00unique\x00origin\x00partial\x00wdth\x00hght\x00flgs\x00rowid\x00fkid\x00busy\x00checkpointed\x00file\x00database\x00status\x00cache_size\x00timeout\x00analysis_limit\x00application_id\x00auto_vacuum\x00automatic_index\x00busy_timeout\x00cache_spill\x00case_sensitive_like\x00cell_size_check\x00checkpoint_fullfsync\x00collation_list\x00compile_options\x00count_changes\x00data_version\x00database_list\x00default_cache_size\x00defer_foreign_keys\x00empty_result_callbacks\x00encoding\x00foreign_key_check\x00foreign_key_list\x00foreign_keys\x00freelist_count\x00full_column_names\x00fullfsync\x00function_list\x00hard_heap_limit\x00ignore_check_constraints\x00incremental_vacuum\x00index_info\x00index_list\x00index_xinfo\x00integrity_check\x00journal_mode\x00journal_size_limit\x00legacy_alter_table\x00locking_mode\x00max_page_count\x00mmap_size\x00module_list\x00optimize\x00page_count\x00page_size\x00pragma_list\x00query_only\x00quick_check\x00read_uncommitted\x00recursive_triggers\x00reverse_unordered_selects\x00schema_version\x00secure_delete\x00short_column_names\x00shrink_memory\x00soft_heap_limit\x00synchronous\x00table_info\x00table_list\x00table_xinfo\x00temp_store\x00temp_store_directory\x00threads\x00trusted_schema\x00user_version\x00wal_autocheckpoint\x00wal_checkpoint\x00writable_schema\x00exclusive\x00normal\x00full\x00incremental\x00memory\x00temporary storage cannot be changed from within a transaction\x00SET NULL\x00SET DEFAULT\x00CASCADE\x00RESTRICT\x00NO ACTION\x00delete\x00persist\x00off\x00truncate\x00wal\x00utf8\x00utf16le\x00utf16be\x00w\x00a\x00sissii\x00-%T\x00fast\x00not a writable directory\x00Safety level may not be changed inside a transaction\x00reset\x00issisii\x00issisi\x00SELECT*FROM\"%w\"\x00shadow\x00sssiii\x00iisX\x00isiX\x00c\x00u\x00isisi\x00iss\x00is\x00iissssss\x00NONE\x00siX\x00*** in database %s ***\n\x00wrong # of entries in index \x00row not in PRIMARY KEY order for %s\x00NULL value in %s.%s\x00non-%s value in %s.%s\x00NUMERIC value in %s.%s\x00C\x00TEXT value in %s.%s\x00CHECK constraint failed in %s\x00row \x00 missing from index \x00rowid not at end-of-record for row \x00 of index \x00 values differ from index \x00non-unique entry in index \x00ok\x00UTF8\x00UTF-8\x00UTF-16le\x00UTF-16be\x00UTF16le\x00UTF16be\x00UTF-16\x00UTF16\x00unsupported encoding: %s\x00restart\x00ANALYZE \"%w\".\"%w\"\x00CREATE TABLE x\x00%c\"%s\"\x00(\"%s\"\x00,arg HIDDEN\x00,schema HIDDEN\x00PRAGMA \x00%Q.\x00=%Q\x00rename\x00drop column\x00add column\x00error in %s %s after %s: %s\x00malformed database schema (%s)\x00%z - %s\x00orphan index\x00CREATE TABLE x(type text,name text,tbl_name text,rootpage int,sql text)\x00unsupported file format\x00SELECT*FROM\"%w\".%s ORDER BY rowid\x00database schema is locked: %s\x00statement too long\x00unknown join type: %T%s%T%s%T\x00a NATURAL join may not have an ON or USING clause\x00cannot join using column %s - column not present in both tables\x00ambiguous reference to %s in USING()\x00CREATE BLOOM FILTER\x00UNION ALL\x00INTERSECT\x00EXCEPT\x00UNION\x00USE TEMP B-TREE FOR %s\x00LAST TERM OF \x00USE TEMP B-TREE FOR %sORDER BY\x00USE TEMP B-TREE FOR LAST %d TERMS OF ORDER BY\x00column%d\x00%.*z:%u\x00NUM\x00cannot use window functions in recursive queries\x00recursive aggregate queries not supported\x00SETUP\x00RECURSIVE STEP\x00S\x00SCAN %d CONSTANT ROW%s\x00COMPOUND QUERY\x00LEFT-MOST SUBQUERY\x00%s USING TEMP B-TREE\x00all VALUES must have the same number of terms\x00SELECTs to the left and right of %s do not have the same number of result columns\x00MERGE (%s)\x00LEFT\x00RIGHT\x00no such index: %s\x00'%s' is not a function\x00no such index: \"%s\"\x00multiple references to recursive table: %s\x00circular reference: %s\x00table %s has %d values for %d columns\x00multiple recursive references: %s\x00recursive reference in a subquery: %s\x00%!S\x00too many references to \"%s\": max 65535\x00access to view \"%s\" prohibited\x00..%s\x00%s.%s.%s\x00no such table: %s\x00no tables specified\x00too many columns in result set\x00DISTINCT aggregates must have exactly one argument\x00USE TEMP B-TREE FOR %s(DISTINCT)\x00USE TEMP B-TREE FOR %s(ORDER BY)\x00 USING COVERING INDEX \x00SCAN %s%s%s\x00target object/alias may not appear in FROM clause: %s\x00expected %d columns for '%s' but got %d\x00CO-ROUTINE %!S\x00MATERIALIZE %!S\x00DISTINCT\x00GROUP BY\x00sqlite3_get_table() called with two or more incompatible queries\x00temporary trigger may not have qualified name\x00trigger\x00cannot create triggers on virtual tables\x00cannot create triggers on shadow tables\x00trigger %T already exists\x00cannot create trigger on system table\x00BEFORE\x00AFTER\x00cannot create %s trigger on view: %S\x00cannot create INSTEAD OF trigger on table: %S\x00trigger \"%s\" may not write to shadow table \"%s\"\x00INSERT INTO %Q.sqlite_master VALUES('trigger',%Q,%Q,0,'CREATE TRIGGER %q')\x00type='trigger' AND name='%q'\x00no such trigger: %S\x00DELETE FROM %Q.sqlite_master WHERE name=%Q AND type='trigger'\x00DELETE\x00UPDATE\x00%s RETURNING is not available on virtual tables\x00RETURNING may not use \"TABLE.*\" wildcards\x00-- TRIGGER %s\x00cannot UPDATE generated column \"%s\"\x00no such column: %s\x00rows updated\x00%r \x00%sON CONFLICT clause does not match any PRIMARY KEY or UNIQUE constraint\x00CRE\x00INS\x00cannot VACUUM from within a transaction\x00cannot VACUUM - SQL statements in progress\x00non-text filename\x00vacuum_%016llx\x00ATTACH %Q AS %s\x00output file already exists\x00SELECT sql FROM \"%w\".sqlite_schema WHERE type='table'AND name<>'sqlite_sequence' AND coalesce(rootpage,1)>0\x00SELECT sql FROM \"%w\".sqlite_schema WHERE type='index'\x00SELECT'INSERT INTO %s.'||quote(name)||' SELECT*FROM\"%w\".'||quote(name)FROM %s.sqlite_schema WHERE type='table'AND coalesce(rootpage,1)>0\x00INSERT INTO %s.sqlite_schema SELECT*FROM \"%w\".sqlite_schema WHERE type IN('view','trigger') OR(type='table'AND rootpage=0)\x00CREATE VIRTUAL TABLE %T\x00UPDATE %Q.sqlite_master SET type='table', name=%Q, tbl_name=%Q, rootpage=0, sql=%Q WHERE rowid=#%d\x00name=%Q AND sql=%Q\x00vtable constructor called recursively: %s\x00vtable constructor failed: %s\x00vtable constructor did not declare schema: %s\x00no such module: %s\x00syntax error\x00<expr>\x00 AND \x00(\x00 (\x00%s=?\x00ANY(%s)\x00>\x00<\x00SEARCH\x00SCAN\x00%s %S\x00AUTOMATIC PARTIAL COVERING INDEX\x00AUTOMATIC COVERING INDEX\x00COVERING INDEX %s\x00INDEX %s\x00 USING \x00 USING INTEGER PRIMARY KEY (%s\x00>? AND %s\x00%c?)\x00 VIRTUAL TABLE INDEX \x000x%x:%s\x00%d:%s\x00 LEFT-JOIN\x00BLOOM FILTER ON %S (\x00rowid=?\x00MULTI-INDEX OR\x00INDEX %d\x00RIGHT-JOIN %s\x00regexp\x00ON clause references tables to its right\x00NOCASE\x00too many arguments on %s() - max %d\x00automatic index on %s(%s)\x00auto-index\x00%s.xBestIndex malfunction\x00abbreviated query algorithm search\x00no query solution\x00at most %d tables in a join\x00SCAN CONSTANT ROW\x00internal query planner error\x00second argument to nth_value must be a positive integer\x00argument of ntile must be a positive integer\x00no such window: %s\x00RANGE with offset PRECEDING/FOLLOWING requires one ORDER BY expression\x00FILTER clause may only be used with aggregate window functions\x00misuse of aggregate: %s()\x00unsupported frame specification\x00PARTITION clause\x00ORDER BY clause\x00frame specification\x00cannot override %s of window: %s\x00DISTINCT is not supported for window functions\x00frame starting offset must be a non-negative integer\x00frame ending offset must be a non-negative integer\x00frame starting offset must be a non-negative number\x00frame ending offset must be a non-negative number\x00near \"%T\": syntax error\x00ORDER BY\x00LIMIT\x00%s clause should come after %s not before\x00too many terms in compound SELECT\x00syntax error after column name \"%.*s\"\x00unknown table option: %.*s\x00set list\x00qualified table names are not allowed on INSERT, UPDATE, and DELETE statements within triggers\x00the INDEXED BY clause is not allowed on UPDATE or DELETE statements within triggers\x00the NOT INDEXED clause is not allowed on UPDATE or DELETE statements within triggers\x00incomplete input\x00unrecognized token: \"%T\"\x00%s in \"%s\"\x00create\x00temp\x00temporary\x00end\x00explain\x00unable to close due to unfinalized statements or unfinished backups\x00not an error\x00SQL logic error\x00access permission denied\x00query aborted\x00database is locked\x00database table is locked\x00attempt to write a readonly database\x00interrupted\x00disk I/O error\x00database disk image is malformed\x00unknown operation\x00database or disk is full\x00unable to open database file\x00locking protocol\x00constraint failed\x00datatype mismatch\x00bad parameter or other API misuse\x00authorization denied\x00column index out of range\x00file is not a database\x00notification message\x00warning message\x00unknown error\x00abort due to ROLLBACK\x00another row available\x00no more rows available\x00unable to delete/modify user-function due to active statements\x00unable to use function %s in the requested context\x00unknown database: %s\x00unable to delete/modify collation sequence due to active statements\x00file:\x00localhost\x00invalid uri authority: %.*s\x00vfs\x00cache\x00shared\x00private\x00mode\x00ro\x00rw\x00rwc\x00no such %s mode: %s\x00%s mode not allowed: %s\x00no such vfs: %s\x00RTRIM\x00\x00\x00\x00%s at line %d of [%.10s]\x00database corruption\x00misuse\x00cannot open file\x00no such table column: %s.%s\x00SQLITE_\x00database is deadlocked\x00array\x00object\x00JSON cannot hold BLOB values\x00malformed JSON\x00inf\x009.0e999\x00infinity\x00QNaN\x00SNaN\x00json_%s() needs an odd number of arguments\x00\"\\/bfnrt\x00-9e999\x009e999\x00inity\x00\\\"\x00\\u0009\x00\\u00\x00\\u0000\x00,\n\x00: \x00bad JSON path: %Q\x00@\x00[\x00#\x00.\"\x00\"\x00json_object() requires an even number of arguments\x00json_object() labels must be TEXT\x00set\x00insert\x00 \x00FLAGS parameter to json_valid() must be between 1 and 15\x00[]\x00{}\x00CREATE TABLE x(key,value,type,atom,id,parent,fullkey,path,json HIDDEN,root HIDDEN)\x00[%lld]\x00.\"%.*s\"\x00.%.*s\x00$\x00json\x00jsonb\x00json_array\x00jsonb_array\x00json_array_length\x00json_error_position\x00json_extract\x00jsonb_extract\x00->\x00->>\x00json_insert\x00jsonb_insert\x00json_object\x00jsonb_object\x00json_patch\x00jsonb_patch\x00json_pretty\x00json_quote\x00json_remove\x00jsonb_remove\x00json_replace\x00jsonb_replace\x00json_set\x00jsonb_set\x00json_type\x00json_valid\x00json_group_array\x00jsonb_group_array\x00json_group_object\x00jsonb_group_object\x00json_each\x00json_tree\x00data\x00DROP TABLE '%q'.'%q_node';DROP TABLE '%q'.'%q_rowid';DROP TABLE '%q'.'%q_parent';\x00RtreeMatchArg\x00SELECT * FROM %Q.%Q\x00UNIQUE constraint failed: %s.%s\x00rtree constraint failed: %s.(%s<=%s)\x00ALTER TABLE %Q.'%q_node' RENAME TO \"%w_node\";ALTER TABLE %Q.'%q_parent' RENAME TO \"%w_parent\";ALTER TABLE %Q.'%q_rowid' RENAME TO \"%w_rowid\";\x00SELECT stat FROM %Q.sqlite_stat1 WHERE tbl = '%q_rowid'\x00node\x00INSERT OR REPLACE INTO '%q'.'%q_node' VALUES(?1, ?2)\x00DELETE FROM '%q'.'%q_node' WHERE nodeno = ?1\x00SELECT nodeno FROM '%q'.'%q_rowid' WHERE rowid = ?1\x00INSERT OR REPLACE INTO '%q'.'%q_rowid' VALUES(?1, ?2)\x00DELETE FROM '%q'.'%q_rowid' WHERE rowid = ?1\x00SELECT parentnode FROM '%q'.'%q_parent' WHERE nodeno = ?1\x00INSERT OR REPLACE INTO '%q'.'%q_parent' VALUES(?1, ?2)\x00DELETE FROM '%q'.'%q_parent' WHERE nodeno = ?1\x00CREATE TABLE \"%w\".\"%w_rowid\"(rowid INTEGER PRIMARY KEY,nodeno\x00,a%d\x00);CREATE TABLE \"%w\".\"%w_node\"(nodeno INTEGER PRIMARY KEY,data);\x00CREATE TABLE \"%w\".\"%w_parent\"(nodeno INTEGER PRIMARY KEY,parentnode);\x00INSERT INTO \"%w\".\"%w_node\"VALUES(1,zeroblob(%d))\x00INSERT INTO\"%w\".\"%w_rowid\"(rowid,nodeno)VALUES(?1,?2)ON CONFLICT(rowid)DO UPDATE SET nodeno=excluded.nodeno\x00SELECT * FROM \"%w\".\"%w_rowid\" WHERE rowid=?1\x00UPDATE \"%w\".\"%w_rowid\"SET \x00a%d=coalesce(?%d,a%d)\x00a%d=?%d\x00 WHERE rowid=?1\x00PRAGMA %Q.page_size\x00SELECT length(data) FROM '%q'.'%q_node' WHERE nodeno = 1\x00undersize RTree blobs in \"%q_node\"\x00Wrong number of columns for an rtree table\x00Too few columns for an rtree table\x00Too many columns for an rtree table\x00Auxiliary rtree columns must be last\x00_node\x00CREATE TABLE x(%.*s INT\x00,%.*s\x00,%.*s REAL\x00,%.*s INT\x00);\x00{%lld\x00 %g\x00}\x00Invalid argument to rtreedepth()\x00%z%s%z\x00SELECT data FROM %Q.'%q_node' WHERE nodeno=?\x00Node %lld missing from database\x00SELECT parentnode FROM %Q.'%q_parent' WHERE nodeno=?1\x00SELECT nodeno FROM %Q.'%q_rowid' WHERE rowid=?1\x00%_rowid\x00%_parent\x00Mapping (%lld -> %lld) missing from %s table\x00Found (%lld -> %lld) in %s table, expected (%lld -> %lld)\x00Dimension %d of cell %d on node %lld is corrupt\x00Dimension %d of cell %d on node %lld is corrupt relative to parent\x00Node %lld is too small (%d bytes)\x00Rtree depth out of range (%d)\x00Node %lld is too small for cell count of %d (%d bytes)\x00SELECT count(*) FROM %Q.'%q%s'\x00Wrong number of entries in %%%s table - expected %lld, actual %lld\x00SELECT * FROM %Q.'%q_rowid'\x00Schema corrupt or not an rtree\x00_rowid\x00_parent\x00In RTree %s.%s:\n%z\x00wrong number of arguments to function rtreecheck()\x00[%!g,%!g],\x00[%!g,%!g]]\x00<polyline points=\x00%c%g,%g\x00 %g,%g'\x00 %s\x00></polyline>\x00CREATE TABLE x(_shape\x00,%s\x00rtree\x00fullscan\x00_shape does not contain a valid polygon\x00geopoly_overlap\x00geopoly_within\x00geopoly_area\x00geopoly_blob\x00geopoly_json\x00geopoly_svg\x00geopoly_contains_point\x00geopoly_debug\x00geopoly_bbox\x00geopoly_xform\x00geopoly_regular\x00geopoly_ccw\x00geopoly_group_bbox\x00geopoly\x00rtreenode\x00rtreedepth\x00rtreecheck\x00rtree_i32\x00corrupt fossil delta\x00DROP TRIGGER IF EXISTS temp.rbu_insert_tr;DROP TRIGGER IF EXISTS temp.rbu_update1_tr;DROP TRIGGER IF EXISTS temp.rbu_update2_tr;DROP TRIGGER IF EXISTS temp.rbu_delete_tr;\x00AND rootpage!=0 AND rootpage IS NOT NULL\x00SELECT rbu_target_name(name, type='view') AS target, name FROM sqlite_schema WHERE type IN ('table', 'view') AND target IS NOT NULL %s ORDER BY name\x00SELECT name, rootpage, sql IS NULL OR substr(8, 6)=='UNIQUE' FROM main.sqlite_schema WHERE type='index' AND tbl_name = ?\x00SELECT (sql COLLATE nocase BETWEEN 'CREATE VIRTUAL' AND 'CREATE VIRTUAM'), rootpage FROM sqlite_schema WHERE name=%Q\x00PRAGMA index_list=%Q\x00SELECT rootpage FROM sqlite_schema WHERE name = %Q\x00PRAGMA table_info=%Q\x00PRAGMA main.index_list = %Q\x00PRAGMA main.index_xinfo = %Q\x00SELECT * FROM '%q'\x00rbu_\x00rbu_rowid\x00may not have\x00requires\x00table %q %s rbu_rowid column\x00PRAGMA table_info(%Q)\x00column missing from %q: %s\x00%z%s\"%w\"\x00%z%s%s\"%w\"%s\x00SELECT max(_rowid_) FROM \"%s%w\"\x00 WHERE _rowid_ > %lld \x00 DESC\x00quote(\x00||','||\x00SELECT %s FROM \"%s%w\" ORDER BY %s LIMIT 1\x00 WHERE (%s) > (%s) \x00_rowid_\x00%z%s \"%w\" COLLATE %Q\x00%z%s \"rbu_imp_%d%w\" COLLATE %Q DESC\x00%z%s quote(\"rbu_imp_%d%w\")\x00SELECT %s FROM \"rbu_imp_%w\" ORDER BY %s LIMIT 1\x00%z%s%s\x00(%s) > (%s)\x00%z%s(%.*s) COLLATE %Q\x00%z%s\"%w\" COLLATE %Q\x00%z%s\"rbu_imp_%d%w\"%s\x00%z%s\"rbu_imp_%d%w\" %s COLLATE %Q\x00%z%s\"rbu_imp_%d%w\" IS ?\x00%z%s%s.\"%w\"\x00%z%sNULL\x00%z, %s._rowid_\x00_rowid_ = ?%d\x00%z%sc%d=?%d\x00_rowid_ = (SELECT id FROM rbu_imposter2 WHERE %z)\x00%z%s\"%w\"=?%d\x00invalid rbu_control value\x00%z%s\"%w\"=rbu_delta(\"%w\", ?%d)\x00%z%s\"%w\"=rbu_fossil_delta(\"%w\", ?%d)\x00PRIMARY KEY(\x00%z%s\"%w\"%s\x00%z)\x00SELECT name FROM sqlite_schema WHERE rootpage = ?\x00%z%sc%d %s COLLATE %Q\x00%z%sc%d%s\x00%z, id INTEGER\x00CREATE TABLE rbu_imposter2(%z, PRIMARY KEY(%z)) WITHOUT ROWID\x00PRIMARY KEY \x00 NOT NULL\x00%z%s\"%w\" %s %sCOLLATE %Q%s\x00%z, %z\x00 WITHOUT ROWID\x00CREATE TABLE \"rbu_imp_%w\"(%z)%s\x00INSERT INTO %s.'rbu_tmp_%q'(rbu_control,%s%s) VALUES(%z)\x00SELECT trim(sql) FROM sqlite_schema WHERE type='index' AND name=?\x00 LIMIT -1 OFFSET %d\x00CREATE TABLE \"rbu_imp_%w\"( %s, PRIMARY KEY( %s ) ) WITHOUT ROWID\x00INSERT INTO \"rbu_imp_%w\" VALUES(%s)\x00DELETE FROM \"rbu_imp_%w\" WHERE %s\x00AND\x00WHERE\x00SELECT %s, 0 AS rbu_control FROM '%q' %s %s %s ORDER BY %s%s\x00SELECT %s, rbu_control FROM %s.'rbu_tmp_%q' %s ORDER BY %s%s\x00SELECT %s, rbu_control FROM %s.'rbu_tmp_%q' %s UNION ALL SELECT %s, rbu_control FROM '%q' %s %s typeof(rbu_control)='integer' AND rbu_control!=1 ORDER BY %s%s\x00rbu_imp_\x00, _rowid_\x00INSERT INTO \"%s%w\"(%s%s) VALUES(%s)\x00DELETE FROM \"%s%w\" WHERE %s\x00, rbu_rowid\x00, 0 AS rbu_rowid\x00CREATE TABLE IF NOT EXISTS %s.'rbu_tmp_%q' AS SELECT *%s FROM '%q' WHERE 0;\x00CREATE TEMP TRIGGER rbu_delete_tr BEFORE DELETE ON \"%s%w\" BEGIN SELECT rbu_tmp_insert(3, %s);END;CREATE TEMP TRIGGER rbu_update1_tr BEFORE UPDATE ON \"%s%w\" BEGIN SELECT rbu_tmp_insert(3, %s);END;CREATE TEMP TRIGGER rbu_update2_tr AFTER UPDATE ON \"%s%w\" BEGIN SELECT rbu_tmp_insert(4, %s);END;\x00CREATE TEMP TRIGGER rbu_insert_tr AFTER INSERT ON \"%s%w\" BEGIN SELECT rbu_tmp_insert(0, %s);END;\x00,_rowid_ \x00,rbu_rowid\x000 AS \x00SELECT %s,%s rbu_control%s FROM '%q'%s %s %s %s\x00UPDATE \"%s%w\" SET %s WHERE %s\x00SELECT k, v FROM %s.rbu_state\x00file:///%s-vacuum?modeof=%s\x00ATTACH %Q AS stat\x00CREATE TABLE IF NOT EXISTS %s.rbu_state(k INTEGER PRIMARY KEY, v)\x00cannot vacuum wal mode database\x00&\x00file:%s-vactmp?rbu_memory=1%s%s\x00rbu_tmp_insert\x00rbu_fossil_delta\x00rbu_target_name\x00SELECT * FROM sqlite_schema\x00rbu vfs not found\x00PRAGMA main.wal_checkpoint=restart\x00rbu_exclusive_checkpoint\x00%s-oal\x00%s-wal\x00PRAGMA schema_version\x00PRAGMA schema_version = %d\x00INSERT OR REPLACE INTO %s.rbu_state(k, v) VALUES (%d, %d), (%d, %Q), (%d, %Q), (%d, %d), (%d, %lld), (%d, %lld), (%d, %lld), (%d, %lld), (%d, %lld), (%d, %Q) \x00PRAGMA main.%s\x00PRAGMA main.%s = %d\x00PRAGMA writable_schema=1\x00SELECT sql FROM sqlite_schema WHERE sql!='' AND rootpage!=0 AND name!='sqlite_sequence' ORDER BY type DESC\x00SELECT * FROM sqlite_schema WHERE rootpage=0 OR rootpage IS NULL\x00INSERT INTO sqlite_schema VALUES(?,?,?,?,?)\x00PRAGMA writable_schema=0\x00DELETE FROM %s.'rbu_tmp_%q'\x00rbu_state mismatch error\x00rbu_vfs_%d\x00SELECT count(*) FROM sqlite_schema WHERE type='index' AND tbl_name = %Q\x00rbu_index_cnt\x00SELECT 1 FROM sqlite_schema WHERE tbl_name = 'rbu_count'\x00SELECT sum(cnt * (1 + rbu_index_cnt(rbu_target_name(tbl))))FROM rbu_count\x00cannot update wal mode database\x00vacuum\x00update\x00database modified during rbu %s\x00BEGIN IMMEDIATE\x00PRAGMA journal_mode=off\x00-vactmp\x00DELETE FROM stat.rbu_state\x00rbu/zipvfs setup error\x00rbu(%s)/%z\x00rbu_memory\x00/\x00overflow\x00%s%.3x+%.6x\x00%s%.3x/\x00internal\x00leaf\x00corrupted\x00SELECT * FROM (SELECT 'sqlite_schema' AS name,1 AS rootpage,'table' AS type UNION ALL SELECT name,rootpage,type FROM \"%w\".sqlite_schema WHERE rootpage!=0)\x00WHERE name=%Q\x00 ORDER BY name\x00dbstat\x00SELECT 0, 'tbl', '', 0, '', 1, 0 UNION ALL SELECT 1, 'idx', '', 0, '', 2, 0 UNION ALL SELECT 2, 'stat', '', 0, '', 0, 0\x00PRAGMA '%q'.table_xinfo('%q')\x00SELECT\x00%z%s\"%w\".\"%w\".\"%w\"=\"%w\".\"%w\".\"%w\"\x00%z%s\"%w\".\"%w\".\"%w\" IS NOT \"%w\".\"%w\".\"%w\"\x00 OR \x00_rowid_, *\x00SELECT %s FROM \"%w\".\"%w\" WHERE NOT EXISTS ( SELECT 1 FROM \"%w\".\"%w\" WHERE %s)\x00%z%s\"%w\".\"%w\".\"%w\"\x00SELECT %s,%s FROM \"%w\".\"%w\", \"%w\".\"%w\" WHERE %s AND (%z)\x00SELECT * FROM %Q.sqlite_schema\x00no such table: %s.%s\x00table schemas do not match\x00, 1\x00 AND (?6 OR ?3 IS stat)\x00tbl, idx\x00?1, (CASE WHEN ?2=X'' THEN NULL ELSE ?2 END)\x00tbl, ?2, stat\x00?%d\x00 AND (?%d OR ?%d IS %w.%w)\x00SELECT %s%s FROM %Q.%Q WHERE (%s) IS (%s)\x00SAVEPOINT changeset\x00RELEASE changeset\x00UPDATE main.\x00 SET \x00 = ?\x00 WHERE \x00idx IS CASE WHEN length(?4)=0 AND typeof(?4)='blob' THEN NULL ELSE ?4 END \x00 IS ?\x00DELETE FROM main.\x00 AND (?\x00AND \x00INSERT INTO main.\x00) VALUES(?\x00, ?\x00INSERT INTO main.sqlite_stat1 VALUES(?1, CASE WHEN length(?2)=0 AND typeof(?2)='blob' THEN NULL ELSE ?2 END, ?3)\x00DELETE FROM main.sqlite_stat1 WHERE tbl=?1 AND idx IS CASE WHEN length(?2)=0 AND typeof(?2)='blob' THEN NULL ELSE ?2 END AND (?4 OR stat IS ?3)\x00SAVEPOINT replace_op\x00RELEASE replace_op\x00SAVEPOINT changeset_apply\x00PRAGMA defer_foreign_keys = 1\x00sqlite3changeset_apply(): no such table: %s\x00sqlite3changeset_apply(): table %s has %d columns, expected %d or more\x00sqlite3changeset_apply(): primary key mismatch for table %s\x00PRAGMA defer_foreign_keys = 0\x00RELEASE changeset_apply\x00ROLLBACK TO changeset_apply\x00fts5: parser stack overflow\x00fts5: syntax error near \"%.*s\"\x00%z%.*s\x00wrong number of arguments to function highlight()\x00wrong number of arguments to function snippet()\x00wrong number of arguments to function fts5_get_locale()\x00non-integer argument passed to function fts5_get_locale()\x00snippet\x00highlight\x00bm25\x00fts5_get_locale\x00prefix\x00malformed prefix=... directive\x00too many prefix indexes (max %d)\x00prefix length out of range (max 999)\x00tokenize\x00multiple tokenize=... directives\x00parse error in tokenize directive\x00content\x00multiple content=... directives\x00%Q.%Q\x00contentless_delete\x00malformed contentless_delete=... directive\x00contentless_unindexed\x00content_rowid\x00multiple content_rowid=... directives\x00columnsize\x00malformed columnsize=... directive\x00locale\x00malformed locale=... directive\x00columns\x00malformed detail=... directive\x00tokendata\x00malformed tokendata=... directive\x00unrecognized option: \"%.*s\"\x00rank\x00reserved fts5 column name: %s\x00unindexed\x00unrecognized column option: %s\x00T.%Q\x00, T.%Q\x00, T.c%d\x00, NULL\x00, T.l%d\x00reserved fts5 table name: %s\x00parse error in \"%s\"\x00contentless_delete=1 requires a contentless table\x00contentless_delete=1 is incompatible with columnsize=0\x00contentless_unindexed=1 requires a contentless table\x00docsize\x00%Q.'%q_%s'\x00CREATE TABLE x(\x00%z%s%Q\x00%z, %Q HIDDEN, %s HIDDEN)\x00pgsz\x00hashsize\x00automerge\x00usermerge\x00crisismerge\x00deletemerge\x00secure-delete\x00insttoken\x00SELECT k, v FROM %Q.'%q_config'\x00version\x00invalid fts5 file format (found %d, expected %d or %d) - run 'rebuild'\x00unterminated string\x00fts5: syntax error near \"%.1s\"\x00OR\x00NOT\x00NEAR\x00expected integer, got \"%.*s\"\x00fts5: column queries are not supported (detail=none)\x00phrase\x00fts5: %s queries are not supported (detail!=full)\x00fts5 expression tree is too large (maximum depth %d)\x00block\x00REPLACE INTO '%q'.'%q_data'(id, block) VALUES(?,?)\x00DELETE FROM '%q'.'%q_data' WHERE id>=? AND id<=?\x00DELETE FROM '%q'.'%q_idx' WHERE segid=?\x00\xff\x00\x00\x01\x00PRAGMA %Q.data_version\x00SELECT pgno FROM '%q'.'%q_idx' WHERE segid=? AND term<=? ORDER BY term DESC LIMIT 1\x00SELECT pgno FROM '%q'.'%q_idx' WHERE segid=? AND term>? ORDER BY term ASC LIMIT 1\x00INSERT INTO '%q'.'%q_idx'(segid,term,pgno) VALUES(?,?,?)\x00DELETE FROM '%q'.'%q_idx' WHERE (segid, (pgno/2)) = (?1, ?2)\x00REPLACE INTO %Q.'%q_config' VALUES ('version', %d)\x00%s_data\x00id INTEGER PRIMARY KEY, block BLOB\x00segid, term, pgno, PRIMARY KEY(segid, term)\x00\x00\x00SELECT segid, term, (pgno>>1), (pgno&1) FROM %Q.'%q_idx' WHERE segid=%d ORDER BY 1, 2\x00\x00\x00\x00\x00\x00recursively defined fts5 content table\x00DESC\x00ASC\x00SELECT rowid, rank FROM %Q.%Q ORDER BY %s(\"%w\"%s%s) %s\x00reads\x00unknown special query: %.*s\x00SELECT %s\x00no such function: %s\x00parse error in rank function: %s\x00%.*s\x00%s: table does not support scanning\x00fts5: missing row %lld from content table %s\x00delete-all\x00'delete-all' may only be used with a contentless or external content fts5 table\x00rebuild\x00'rebuild' may not be used with a contentless fts5 table\x00merge\x00integrity-check\x00flush\x00%s a subset of columns on fts5 contentless-delete table: %s\x00%s contentless fts5 table: %s\x00cannot UPDATE\x00'delete' may not be used with a contentless_delete=1 table\x00cannot DELETE from contentless fts5 table: %s\x00fts5_locale() requires locale=1\x00no such cursor: %lld\x00no such tokenizer: %s\x00error in tokenizer constructor\x00fts5_api_ptr\x00fts5: 2025-06-06 14:52:32 b77dc5e0f596d2140d9ac682b2893ff65d3a4140aa86067a3efebe29dc914c95\x00config\x00malformed inverted index for FTS5 table %s.%s\x00unable to validate the inverted index for FTS5 table %s.%s: %s\x00fts5\x00fts5_source_id\x00fts5_locale\x00fts5_insttoken\x00SELECT %s FROM %s T WHERE T.%Q >= ? AND T.%Q <= ? ORDER BY T.%Q ASC\x00SELECT %s FROM %s T WHERE T.%Q <= ? AND T.%Q >= ? ORDER BY T.%Q DESC\x00SELECT %s FROM %s T WHERE T.%Q=?\x00INSERT INTO %Q.'%q_content' VALUES(%s)\x00REPLACE INTO %Q.'%q_content' VALUES(%s)\x00DELETE FROM %Q.'%q_content' WHERE id=?\x00REPLACE INTO %Q.'%q_docsize' VALUES(?,?%s)\x00DELETE FROM %Q.'%q_docsize' WHERE id=?\x00SELECT sz%s FROM %Q.'%q_docsize' WHERE id=?\x00REPLACE INTO %Q.'%q_config' VALUES(?,?)\x00SELECT %s FROM %s AS T\x00%z%s?%d\x00%z,?%d\x00,?\x00,origin\x00DROP TABLE IF EXISTS %Q.'%q_data';DROP TABLE IF EXISTS %Q.'%q_idx';DROP TABLE IF EXISTS %Q.'%q_config';\x00DROP TABLE IF EXISTS %Q.'%q_docsize';\x00DROP TABLE IF EXISTS %Q.'%q_content';\x00ALTER TABLE %Q.'%q_%s' RENAME TO '%q_%s';\x00CREATE TABLE %Q.'%q_%q'(%s)%s\x00fts5: error creating shadow table %q_%s: %s\x00id INTEGER PRIMARY KEY\x00, c%d\x00, l%d\x00id INTEGER PRIMARY KEY, sz BLOB\x00id INTEGER PRIMARY KEY, sz BLOB, origin INTEGER\x00k PRIMARY KEY, v\x00DELETE FROM %Q.'%q_data';DELETE FROM %Q.'%q_idx';\x00DELETE FROM %Q.'%q_docsize';\x00DELETE FROM %Q.'%q_content';\x00SELECT count(*) FROM %Q.'%q_%s'\x00tokenchars\x00separators\x00L* N* Co\x00categories\x00remove_diacritics\x00unicode61\x00al\x00ance\x00ence\x00er\x00ic\x00able\x00ible\x00ant\x00ement\x00ment\x00ent\x00ion\x00ou\x00ism\x00ate\x00iti\x00ous\x00ive\x00ize\x00at\x00bl\x00ble\x00iz\x00ational\x00tional\x00tion\x00enci\x00anci\x00izer\x00logi\x00bli\x00alli\x00entli\x00eli\x00e\x00ousli\x00ization\x00ation\x00ator\x00alism\x00iveness\x00fulness\x00ful\x00ousness\x00aliti\x00iviti\x00biliti\x00ical\x00ness\x00icate\x00iciti\x00ative\x00alize\x00eed\x00ee\x00ed\x00ing\x00case_sensitive\x00trigram\x00ascii\x00porter\x00col\x00row\x00instance\x00fts5vocab: unknown table type: %Q\x00CREATE TABlE vocab(term, col, doc, cnt)\x00CREATE TABlE vocab(term, doc, cnt)\x00CREATE TABlE vocab(term, doc, col, offset)\x00wrong number of vtable arguments\x00recursive definition for %s.%s\x00SELECT t.%Q FROM %Q.%Q AS t WHERE t.%Q MATCH '*id'\x00no such fts5 table: %s.%s\x00fts5vocab\x002025-06-06 14:52:32 b77dc5e0f596d2140d9ac682b2893ff65d3a4140aa86067a3efebe29dc914c95\x00"
type Sqlite3_int64 = sqlite3_int64
type Sqlite3_mutex_methods = sqlite3_mutex_methods