From 182b4eea73881c611a0f519576aa6ad2aa6799c2 Mon Sep 17 00:00:00 2001
From: tobi <31960611+tsmethurst@users.noreply.github.com>
Date: Sat, 27 Nov 2021 15:26:58 +0100
Subject: Update dependencies (#333)
---
.../modernc.org/sqlite/lib/sqlite_linux_s390x.go | 40621 +++++++++++--------
1 file changed, 24054 insertions(+), 16567 deletions(-)
(limited to 'vendor/modernc.org/sqlite/lib/sqlite_linux_s390x.go')
diff --git a/vendor/modernc.org/sqlite/lib/sqlite_linux_s390x.go b/vendor/modernc.org/sqlite/lib/sqlite_linux_s390x.go
index 8af69c042..73322b575 100644
--- a/vendor/modernc.org/sqlite/lib/sqlite_linux_s390x.go
+++ b/vendor/modernc.org/sqlite/lib/sqlite_linux_s390x.go
@@ -1,4 +1,4 @@
-// Code generated by 'ccgo -DSQLITE_PRIVATE= -export-defines "" -export-enums "" -export-externs X -export-fields F -export-typedefs "" -pkgname sqlite3 -o lib/sqlite_linux_s390x.go -trace-translation-units testdata/sqlite-amalgamation-3350500/sqlite3.c -DNDEBUG -DHAVE_USLEEP -DLONGDOUBLE_TYPE=double -DSQLITE_CORE -DSQLITE_ENABLE_COLUMN_METADATA -DSQLITE_ENABLE_FTS5 -DSQLITE_ENABLE_GEOPOLY -DSQLITE_ENABLE_JSON1 -DSQLITE_ENABLE_MEMORY_MANAGEMENT -DSQLITE_ENABLE_OFFSET_SQL_FUNC -DSQLITE_ENABLE_PREUPDATE_HOOK -DSQLITE_ENABLE_RBU -DSQLITE_ENABLE_RTREE -DSQLITE_ENABLE_SNAPSHOT -DSQLITE_ENABLE_STAT4 -DSQLITE_ENABLE_UNLOCK_NOTIFY -DSQLITE_LIKE_DOESNT_MATCH_BLOBS -DSQLITE_MUTEX_APPDEF=1 -DSQLITE_SOUNDEX -DSQLITE_THREADSAFE=1 -DSQLITE_MUTEX_NOOP -DSQLITE_OS_UNIX=1', DO NOT EDIT.
+// Code generated by 'ccgo -DSQLITE_PRIVATE= -export-defines "" -export-enums "" -export-externs X -export-fields F -export-typedefs "" -pkgname sqlite3 -o lib/sqlite_linux_s390x.go -trace-translation-units testdata/sqlite-amalgamation-3360000/sqlite3.c -DNDEBUG -DHAVE_USLEEP -DLONGDOUBLE_TYPE=double -DSQLITE_CORE -DSQLITE_ENABLE_COLUMN_METADATA -DSQLITE_ENABLE_FTS5 -DSQLITE_ENABLE_GEOPOLY -DSQLITE_ENABLE_JSON1 -DSQLITE_ENABLE_MEMORY_MANAGEMENT -DSQLITE_ENABLE_OFFSET_SQL_FUNC -DSQLITE_ENABLE_PREUPDATE_HOOK -DSQLITE_ENABLE_RBU -DSQLITE_ENABLE_RTREE -DSQLITE_ENABLE_SESSION -DSQLITE_ENABLE_SNAPSHOT -DSQLITE_ENABLE_STAT4 -DSQLITE_ENABLE_UNLOCK_NOTIFY -DSQLITE_LIKE_DOESNT_MATCH_BLOBS -DSQLITE_MUTEX_APPDEF=1 -DSQLITE_SOUNDEX -DSQLITE_THREADSAFE=1 -DSQLITE_MUTEX_NOOP -DSQLITE_OS_UNIX=1', DO NOT EDIT.
package sqlite3
@@ -40,6 +40,7 @@ const (
AT_EMPTY_PATH = 0x1000
AT_FDCWD = -100
AT_NO_AUTOMOUNT = 0x800
+ AT_RECURSIVE = 0x8000
AT_REMOVEDIR = 0x200
AT_STATX_DONT_SYNC = 0x4000
AT_STATX_FORCE_SYNC = 0x2000
@@ -104,6 +105,7 @@ const (
CBRK = 0
CC_AND = 24
CC_BANG = 15
+ CC_BOM = 30
CC_COMMA = 23
CC_DIGIT = 3
CC_DOLLAR = 4
@@ -571,6 +573,7 @@ const (
F_OFD_SETLKW = 38
F_OK = 0
F_RDLCK = 0
+ F_SEAL_FUTURE_WRITE = 0x0010
F_SEAL_GROW = 0x0004
F_SEAL_SEAL = 0x0001
F_SEAL_SHRINK = 0x0002
@@ -594,7 +597,7 @@ const (
F_ULOCK = 0
F_UNLCK = 2
F_WRLCK = 1
- GCC_VERSION = 8003000
+ GCC_VERSION = 9003000
GEOPOLY_PI = 3.1415926535897932385
HASHSIZE = 97
HASHTABLE_HASH_1 = 383
@@ -695,6 +698,7 @@ const (
M10d_Any = 1
M10d_No = 2
M10d_Yes = 0
+ MADV_COLD = 20
MADV_DODUMP = 17
MADV_DOFORK = 11
MADV_DONTDUMP = 16
@@ -707,6 +711,7 @@ const (
MADV_MERGEABLE = 12
MADV_NOHUGEPAGE = 15
MADV_NORMAL = 0
+ MADV_PAGEOUT = 21
MADV_RANDOM = 1
MADV_REMOVE = 9
MADV_SEQUENTIAL = 2
@@ -891,6 +896,7 @@ const (
NC_IsCheck = 0x00004
NC_IsDDL = 0x10000
NC_MinMaxAgg = 0x01000
+ NC_NoSelect = 0x80000
NC_PartIdx = 0x00002
NC_SelfRef = 0x0002e
NC_UAggInfo = 0x00100
@@ -962,15 +968,15 @@ const (
OPFLG_JUMP = 0x01
OPFLG_OUT2 = 0x10
OPFLG_OUT3 = 0x20
- OP_Abortable = 178
+ OP_Abortable = 179
OP_Add = 106
OP_AddImm = 83
- OP_Affinity = 91
- OP_AggFinal = 160
- OP_AggInverse = 156
- OP_AggStep = 157
- OP_AggStep1 = 158
- OP_AggValue = 159
+ OP_Affinity = 92
+ OP_AggFinal = 161
+ OP_AggInverse = 157
+ OP_AggStep = 158
+ OP_AggStep1 = 159
+ OP_AggValue = 160
OP_And = 44
OP_AutoCommit = 1
OP_BitAnd = 102
@@ -980,34 +986,34 @@ const (
OP_Cast = 85
OP_Checkpoint = 6
OP_ChngCntRow = 80
- OP_Clear = 140
- OP_Close = 117
+ OP_Clear = 141
+ OP_Close = 118
OP_CollSeq = 82
- OP_Column = 90
- OP_ColumnsUsed = 118
+ OP_Column = 91
+ OP_ColumnsUsed = 119
OP_Compare = 87
OP_Concat = 111
OP_Copy = 77
- OP_Count = 93
- OP_CreateBtree = 142
- OP_CursorHint = 174
- OP_CursorLock = 162
- OP_CursorUnlock = 163
+ OP_Count = 94
+ OP_CreateBtree = 143
+ OP_CursorHint = 175
+ OP_CursorLock = 163
+ OP_CursorUnlock = 164
OP_DecrJumpZero = 59
- OP_DeferredSeek = 136
- OP_Delete = 125
- OP_Destroy = 139
+ OP_DeferredSeek = 137
+ OP_Delete = 126
+ OP_Destroy = 140
OP_Divide = 109
- OP_DropIndex = 147
- OP_DropTable = 146
- OP_DropTrigger = 148
- OP_ElseNotEq = 58
+ OP_DropIndex = 148
+ OP_DropTable = 147
+ OP_DropTrigger = 149
+ OP_ElseEq = 58
OP_EndCoroutine = 66
OP_Eq = 53
- OP_Expire = 161
- OP_Explain = 177
- OP_FinishSeek = 138
- OP_FkCounter = 153
+ OP_Expire = 162
+ OP_Explain = 178
+ OP_FinishSeek = 139
+ OP_FkCounter = 154
OP_FkIfZero = 47
OP_Found = 30
OP_Function = 64
@@ -1017,13 +1023,13 @@ const (
OP_Gt = 54
OP_Halt = 68
OP_HaltIfNull = 67
- OP_IdxDelete = 135
+ OP_IdxDelete = 136
OP_IdxGE = 41
OP_IdxGT = 39
- OP_IdxInsert = 133
+ OP_IdxInsert = 134
OP_IdxLE = 38
OP_IdxLT = 40
- OP_IdxRowid = 137
+ OP_IdxRowid = 138
OP_If = 18
OP_IfNoHope = 27
OP_IfNot = 20
@@ -1035,112 +1041,113 @@ const (
OP_IncrVacuum = 60
OP_Init = 62
OP_InitCoroutine = 13
- OP_Insert = 123
+ OP_Insert = 124
OP_Int64 = 70
OP_IntCopy = 79
OP_Integer = 69
- OP_IntegrityCk = 149
+ OP_IntegrityCk = 150
OP_IsNull = 50
OP_IsTrue = 88
OP_JournalMode = 7
OP_Jump = 16
OP_Last = 33
OP_Le = 55
- OP_LoadAnalysis = 145
+ OP_LoadAnalysis = 146
OP_Lt = 56
- OP_MakeRecord = 92
- OP_MaxPgcnt = 172
- OP_MemMax = 154
+ OP_MakeRecord = 93
+ OP_MaxPgcnt = 173
+ OP_MemMax = 155
OP_Move = 76
OP_Multiply = 108
OP_MustBeInt = 15
OP_Ne = 52
- OP_NewRowid = 122
+ OP_NewRowid = 123
OP_Next = 5
OP_NoConflict = 28
- OP_Noop = 176
+ OP_Noop = 177
OP_Not = 19
OP_NotExists = 32
OP_NotFound = 29
OP_NotNull = 51
OP_Null = 72
- OP_NullRow = 131
- OP_Offset = 89
- OP_OffsetLimit = 155
+ OP_NullRow = 132
+ OP_Offset = 90
+ OP_OffsetLimit = 156
OP_Once = 17
- OP_OpenAutoindex = 100
- OP_OpenDup = 99
- OP_OpenEphemeral = 101
- OP_OpenPseudo = 115
- OP_OpenRead = 97
- OP_OpenWrite = 98
+ OP_OpenAutoindex = 101
+ OP_OpenDup = 100
+ OP_OpenEphemeral = 112
+ OP_OpenPseudo = 117
+ OP_OpenRead = 98
+ OP_OpenWrite = 99
OP_Or = 43
- OP_Pagecount = 171
- OP_Param = 151
- OP_ParseSchema = 144
+ OP_Pagecount = 172
+ OP_Param = 153
+ OP_ParseSchema = 145
OP_Permutation = 86
OP_Prev = 4
OP_Program = 46
OP_PureFunc = 63
- OP_ReadCookie = 94
+ OP_ReadCookie = 95
OP_Real = 152
OP_RealAffinity = 84
- OP_ReleaseReg = 175
+ OP_ReleaseReg = 176
OP_Remainder = 110
- OP_ReopenIdx = 96
- OP_ResetCount = 126
- OP_ResetSorter = 141
+ OP_ReopenIdx = 97
+ OP_ResetCount = 127
+ OP_ResetSorter = 142
OP_ResultRow = 81
OP_Return = 65
OP_Rewind = 37
- OP_RowCell = 124
- OP_RowData = 129
- OP_RowSetAdd = 150
+ OP_RowCell = 125
+ OP_RowData = 130
+ OP_RowSetAdd = 151
OP_RowSetRead = 42
OP_RowSetTest = 45
- OP_Rowid = 130
+ OP_Rowid = 131
OP_SCopy = 78
OP_Savepoint = 0
- OP_SeekEnd = 132
+ OP_SeekEnd = 133
OP_SeekGE = 24
OP_SeekGT = 25
- OP_SeekHit = 120
+ OP_SeekHit = 121
OP_SeekLE = 23
OP_SeekLT = 22
OP_SeekRowid = 31
- OP_SeekScan = 119
- OP_Sequence = 121
- OP_SequenceTest = 114
- OP_SetCookie = 95
+ OP_SeekScan = 120
+ OP_Sequence = 122
+ OP_SequenceTest = 115
+ OP_SetCookie = 96
OP_ShiftLeft = 104
OP_ShiftRight = 105
OP_SoftNull = 73
OP_Sort = 36
- OP_SorterCompare = 127
- OP_SorterData = 128
- OP_SorterInsert = 134
+ OP_SorterCompare = 128
+ OP_SorterData = 129
+ OP_SorterInsert = 135
OP_SorterNext = 3
- OP_SorterOpen = 112
+ OP_SorterOpen = 114
OP_SorterSort = 35
- OP_SqlExec = 143
+ OP_SqlExec = 144
OP_String = 71
OP_String8 = 116
OP_Subtract = 107
- OP_TableLock = 164
- OP_Trace = 173
+ OP_TableLock = 165
+ OP_Trace = 174
OP_Transaction = 2
- OP_VBegin = 165
- OP_VColumn = 169
- OP_VCreate = 166
- OP_VDestroy = 167
+ OP_VBegin = 166
+ OP_VColumn = 170
+ OP_VCreate = 167
+ OP_VDestroy = 168
OP_VFilter = 9
OP_VNext = 61
- OP_VOpen = 168
- OP_VRename = 170
+ OP_VOpen = 169
+ OP_VRename = 171
OP_VUpdate = 10
OP_Vacuum = 8
OP_Variable = 75
OP_Yield = 14
+ OP_ZeroOrNull = 89
OS_VXWORKS = 0
O_ACCMODE = 0003
O_APPEND = 02000
@@ -1412,11 +1419,15 @@ const (
SEEK_HOLE = 4
SEEK_SET = 0
SELECTTRACE_ENABLED = 0
+ SESSIONS_STRM_CHUNK_SIZE = 1024
+ SESSION_MAX_BUFFER_SZ = 2147483391
+ SESSION_UPDATE_CACHE_SZ = 12
SF_Aggregate = 0x0000008
SF_All = 0x0000002
SF_ComplexResult = 0x0040000
SF_Compound = 0x0000100
SF_Converted = 0x0010000
+ SF_CopyCte = 0x4000000
SF_Distinct = 0x0000001
SF_Expanded = 0x0000040
SF_FixedLimit = 0x0004000
@@ -1556,6 +1567,17 @@ const (
SQLITE_CANTOPEN_NOTEMPDIR = 270
SQLITE_CANTOPEN_SYMLINK = 1550
SQLITE_CDECL = 0
+ SQLITE_CHANGESETAPPLY_INVERT = 0x0002
+ SQLITE_CHANGESETAPPLY_NOSAVEPOINT = 0x0001
+ SQLITE_CHANGESETSTART_INVERT = 0x0002
+ SQLITE_CHANGESET_ABORT = 2
+ SQLITE_CHANGESET_CONFLICT = 3
+ SQLITE_CHANGESET_CONSTRAINT = 4
+ SQLITE_CHANGESET_DATA = 1
+ SQLITE_CHANGESET_FOREIGN_KEY = 5
+ SQLITE_CHANGESET_NOTFOUND = 2
+ SQLITE_CHANGESET_OMIT = 0
+ SQLITE_CHANGESET_REPLACE = 1
SQLITE_CHECKPOINT_FULL = 1
SQLITE_CHECKPOINT_PASSIVE = 0
SQLITE_CHECKPOINT_RESTART = 2
@@ -1712,6 +1734,7 @@ const (
SQLITE_ENABLE_PREUPDATE_HOOK = 1
SQLITE_ENABLE_RBU = 1
SQLITE_ENABLE_RTREE = 1
+ SQLITE_ENABLE_SESSION = 1
SQLITE_ENABLE_SNAPSHOT = 1
SQLITE_ENABLE_STAT4 = 1
SQLITE_ENABLE_UNLOCK_NOTIFY = 1
@@ -1725,7 +1748,6 @@ const (
SQLITE_EnableQPSG = 0x00800000
SQLITE_EnableTrigger = 0x00040000
SQLITE_EnableView = 0x80000000
- SQLITE_ExistsToIN = 0x00020000
SQLITE_FAIL = 3
SQLITE_FAULTINJECTOR_COUNT = 1
SQLITE_FAULTINJECTOR_MALLOC = 0
@@ -1734,10 +1756,12 @@ const (
SQLITE_FCNTL_CHUNK_SIZE = 6
SQLITE_FCNTL_CKPT_DONE = 37
SQLITE_FCNTL_CKPT_START = 39
+ SQLITE_FCNTL_CKSM_FILE = 41
SQLITE_FCNTL_COMMIT_ATOMIC_WRITE = 32
SQLITE_FCNTL_COMMIT_PHASETWO = 22
SQLITE_FCNTL_DATA_VERSION = 35
SQLITE_FCNTL_DB_UNCHANGED = 0xca093fa0
+ SQLITE_FCNTL_EXTERNAL_READER = 40
SQLITE_FCNTL_FILE_POINTER = 7
SQLITE_FCNTL_GET_LOCKPROXYFILE = 2
SQLITE_FCNTL_HAS_MOVED = 20
@@ -1886,7 +1910,6 @@ const (
SQLITE_IOERR_WRITE = 778
SQLITE_IgnoreChecks = 0x00000200
SQLITE_JUMPIFNULL = 0x10
- SQLITE_KEEPNULL = 0x08
SQLITE_LAST_ERRNO = 4
SQLITE_LIKE_DOESNT_MATCH_BLOBS = 1
SQLITE_LIMIT_ATTACHED = 7
@@ -1935,6 +1958,7 @@ const (
SQLITE_MAX_MMAP_SIZE = 0x7fff0000
SQLITE_MAX_PAGE_COUNT = 1073741823
SQLITE_MAX_PAGE_SIZE = 65536
+ SQLITE_MAX_PATHLEN = 4096
SQLITE_MAX_PMASZ = 536870912
SQLITE_MAX_SCHEMA_RETRY = 50
SQLITE_MAX_SQL_LENGTH = 1000000000
@@ -1982,6 +2006,7 @@ const (
SQLITE_NOTNULL = 0x90
SQLITE_NOWILDCARDMATCH = 2
SQLITE_NO_TSAN = 0
+ SQLITE_NTUNE = 6
SQLITE_NULL = 5
SQLITE_NULLEQ = 0x80
SQLITE_N_BTREE_META = 16
@@ -2076,6 +2101,8 @@ const (
SQLITE_SCHEMA = 17
SQLITE_SELECT = 21
SQLITE_SERIALIZE_NOCOPY = 0x001
+ SQLITE_SESSION_CONFIG_STRMSIZE = 1
+ SQLITE_SESSION_OBJCONFIG_SIZE = 1
SQLITE_SET_LOCKPROXYFILE = 3
SQLITE_SHM_EXCLUSIVE = 8
SQLITE_SHM_LOCK = 2
@@ -2084,7 +2111,7 @@ const (
SQLITE_SHM_UNLOCK = 1
SQLITE_SORTER_PMASZ = 250
SQLITE_SOUNDEX = 1
- SQLITE_SOURCE_ID = "2021-04-19 18:32:05 1b256d97b553a9611efca188a3d995a2fff712759044ba480f9a0c9e98fae886"
+ SQLITE_SOURCE_ID = "2021-06-18 18:36:39 5c9a6c06871cb9fe42814af9c039eb6da5427a6ec28f187af7ebfb62eafa66e5"
SQLITE_SO_ASC = 0
SQLITE_SO_DESC = 1
SQLITE_SO_UNDEFINED = -1
@@ -2108,13 +2135,13 @@ const (
SQLITE_STMTSTATUS_RUN = 6
SQLITE_STMTSTATUS_SORT = 2
SQLITE_STMTSTATUS_VM_STEP = 4
- SQLITE_STOREP2 = 0x20
SQLITE_SUBTYPE = 0x000100000
SQLITE_SYNC_DATAONLY = 0x00010
SQLITE_SYNC_FULL = 0x00003
SQLITE_SYNC_NORMAL = 0x00002
SQLITE_SYSAPI = 0
SQLITE_SYSTEM_MALLOC = 1
+ SQLITE_SeekScan = 0x00020000
SQLITE_ShortColNames = 0x00000040
SQLITE_SimplifyJoin = 0x00002000
SQLITE_SkipScan = 0x00004000
@@ -2135,7 +2162,7 @@ const (
SQLITE_TESTCTRL_INTERNAL_FUNCTIONS = 17
SQLITE_TESTCTRL_ISINIT = 23
SQLITE_TESTCTRL_ISKEYWORD = 16
- SQLITE_TESTCTRL_LAST = 31
+ SQLITE_TESTCTRL_LAST = 32
SQLITE_TESTCTRL_LOCALTIME_FAULT = 18
SQLITE_TESTCTRL_NEVER_CORRUPT = 20
SQLITE_TESTCTRL_ONCE_RESET_THRESHOLD = 19
@@ -2152,6 +2179,7 @@ const (
SQLITE_TESTCTRL_SEEK_COUNT = 30
SQLITE_TESTCTRL_SORTER_MMAP = 24
SQLITE_TESTCTRL_TRACEFLAGS = 31
+ SQLITE_TESTCTRL_TUNE = 32
SQLITE_TESTCTRL_VDBE_COVERAGE = 21
SQLITE_TEXT = 3
SQLITE_THREADSAFE = 1
@@ -2181,8 +2209,8 @@ const (
SQLITE_UTF8 = 1
SQLITE_VDBEINT_H = 0
SQLITE_VDBE_H = 0
- SQLITE_VERSION = "3.35.5"
- SQLITE_VERSION_NUMBER = 3035005
+ SQLITE_VERSION = "3.36.0"
+ SQLITE_VERSION_NUMBER = 3036000
SQLITE_VTABRISK_High = 2
SQLITE_VTABRISK_Low = 0
SQLITE_VTABRISK_Normal = 1
@@ -2213,26 +2241,26 @@ const (
SRT_Table = 14
SRT_Union = 1
SRT_Upfrom = 15
- STATX_ALL = 0x0fff
- STATX_ATIME = 0x0020
- STATX_ATTR_APPEND = 0x0020
- STATX_ATTR_AUTOMOUNT = 0x1000
- STATX_ATTR_COMPRESSED = 0x0004
- STATX_ATTR_ENCRYPTED = 0x0800
- STATX_ATTR_IMMUTABLE = 0x0010
- STATX_ATTR_NODUMP = 0x0040
- STATX_BASIC_STATS = 0x07ff
- STATX_BLOCKS = 0x0400
- STATX_BTIME = 0x0800
- STATX_CTIME = 0x0080
- STATX_GID = 0x0010
- STATX_INO = 0x0100
- STATX_MODE = 0x0002
- STATX_MTIME = 0x0040
- STATX_NLINK = 0x0004
- STATX_SIZE = 0x0200
- STATX_TYPE = 0x0001
- STATX_UID = 0x0008
+ STATX_ALL = 0x00000fff
+ STATX_ATIME = 0x00000020
+ STATX_ATTR_APPEND = 0x00000020
+ STATX_ATTR_AUTOMOUNT = 0x00001000
+ STATX_ATTR_COMPRESSED = 0x00000004
+ STATX_ATTR_ENCRYPTED = 0x00000800
+ STATX_ATTR_IMMUTABLE = 0x00000010
+ STATX_ATTR_NODUMP = 0x00000040
+ STATX_BASIC_STATS = 0x000007ff
+ STATX_BLOCKS = 0x00000400
+ STATX_BTIME = 0x00000800
+ STATX_CTIME = 0x00000080
+ STATX_GID = 0x00000010
+ STATX_INO = 0x00000100
+ STATX_MODE = 0x00000002
+ STATX_MTIME = 0x00000040
+ STATX_NLINK = 0x00000004
+ STATX_SIZE = 0x00000200
+ STATX_TYPE = 0x00000001
+ STATX_UID = 0x00000008
STATX__RESERVED = 0x80000000
STAT_GET_NDLT = 4
STAT_GET_NEQ = 2
@@ -2262,6 +2290,7 @@ const (
SYNC_FILE_RANGE_WAIT_AFTER = 4
SYNC_FILE_RANGE_WAIT_BEFORE = 1
SYNC_FILE_RANGE_WRITE = 2
+ SYNC_FILE_RANGE_WRITE_AND_WAIT = 7
S_BLKSIZE = 512
S_IEXEC = 64
S_IFBLK = 24576
@@ -2322,6 +2351,7 @@ const (
TERM_VNULL = 0x0080
TF_Autoincrement = 0x0008
TF_Ephemeral = 0x4000
+ TF_Eponymous = 0x8000
TF_HasGenerated = 0x0060
TF_HasHidden = 0x0002
TF_HasNotNull = 0x0800
@@ -2457,6 +2487,7 @@ const (
TK_ELSE = 159
TK_END = 11
TK_EQ = 53
+ TK_ERROR = 181
TK_ESCAPE = 58
TK_EXCEPT = 135
TK_EXCLUDE = 91
@@ -2482,7 +2513,7 @@ const (
TK_IF = 18
TK_IF_NULL_ROW = 178
TK_IGNORE = 63
- TK_ILLEGAL = 182
+ TK_ILLEGAL = 183
TK_IMMEDIATE = 8
TK_IN = 49
TK_INDEX = 160
@@ -2553,7 +2584,7 @@ const (
TK_SEMI = 1
TK_SET = 129
TK_SLASH = 109
- TK_SPACE = 181
+ TK_SPACE = 182
TK_SPAN = 180
TK_STAR = 108
TK_STRING = 116
@@ -2632,6 +2663,7 @@ const (
WAL_WRITE_LOCK = 0
WCONTINUED = 8
WEXITED = 4
+ WHERE_AGG_DISTINCT = 0x0400
WHERE_AUTO_INDEX = 0x00004000
WHERE_BIGNULL_SORT = 0x00080000
WHERE_BOTH_LIMIT = 0x00000030
@@ -2667,6 +2699,7 @@ const (
WHERE_SKIPSCAN = 0x00008000
WHERE_SORTBYGROUP = 0x0200
WHERE_TOP_LIMIT = 0x00000010
+ WHERE_TRANSCONS = 0x00200000
WHERE_UNQ_WANTED = 0x00010000
WHERE_USE_LIMIT = 0x4000
WHERE_VIRTUALTABLE = 0x00000400
@@ -2707,17 +2740,17 @@ const (
XN_ROWID = -1
X_OK = 1
YYFALLBACK = 1
- YYNOCODE = 316
+ YYNOCODE = 317
YYNOERRORRECOVERY = 1
YYNRULE = 398
YYNRULE_WITH_ACTION = 337
YYNSTATE = 570
- YYNTOKEN = 183
+ YYNTOKEN = 184
YYPARSEFREENEVERNULL = 1
YYSTACKDEPTH = 100
YYWILDCARD = 101
YY_ACCEPT_ACTION = 1224
- YY_ACTTAB_COUNT = 2020
+ YY_ACTTAB_COUNT = 2023
YY_ERROR_ACTION = 1223
YY_MAX_REDUCE = 1623
YY_MAX_SHIFT = 569
@@ -2726,8 +2759,8 @@ const (
YY_MIN_SHIFTREDUCE = 825
YY_NO_ACTION = 1225
YY_REDUCE_COUNT = 405
- YY_REDUCE_MAX = 1690
- YY_REDUCE_MIN = -265
+ YY_REDUCE_MAX = 1683
+ YY_REDUCE_MIN = -266
YY_SHIFT_COUNT = 569
YY_SHIFT_MAX = 2009
YY_SHIFT_MIN = 0
@@ -2736,10 +2769,13 @@ const (
X_ANSI_STDDEF_H = 0
X_ASM_GENERIC_ERRNO_BASE_H = 0
X_ASM_GENERIC_ERRNO_H = 0
+ X_ASM_GENERIC_INT_LL64_H = 0
X_ASM_GENERIC_IOCTL_H = 0
X_ASSERT_H = 1
X_ATFILE_SOURCE = 1
X_BITS_BYTESWAP_H = 1
+ X_BITS_ENDIANNESS_H = 1
+ X_BITS_ENDIAN_H = 1
X_BITS_ERRNO_H = 1
X_BITS_FLOATN_COMMON_H = 0
X_BITS_FLOATN_H = 0
@@ -2750,6 +2786,7 @@ const (
X_BITS_STAT_H = 1
X_BITS_STDINT_INTN_H = 1
X_BITS_STDIO_LIM_H = 1
+ X_BITS_TIME64_H = 1
X_BITS_TIMEX_H = 1
X_BITS_TIME_H = 1
X_BITS_TYPESIZES_H = 1
@@ -2800,6 +2837,7 @@ const (
X_IO_ERR_SEEN = 0x0020
X_IO_USER_LOCK = 0x8000
X_ISOC11_SOURCE = 1
+ X_ISOC2X_SOURCE = 1
X_ISOC95_SOURCE = 1
X_ISOC99_SOURCE = 1
X_LARGEFILE64_SOURCE = 1
@@ -2811,6 +2849,9 @@ const (
X_LFS_ASYNCHRONOUS_IO = 1
X_LFS_LARGEFILE = 1
X_LINUX_IOCTL_H = 0
+ X_LINUX_POSIX_TYPES_H = 0
+ X_LINUX_STAT_H = 0
+ X_LINUX_TYPES_H = 0
X_LP64 = 1
X_MATH_H = 1
X_MKNOD_VER = 0
@@ -2885,6 +2926,8 @@ const (
X_PTRDIFF_T = 0
X_PTRDIFF_T_ = 0
X_PTRDIFF_T_DECLARED = 0
+ X_RWLOCK_INTERNAL_H = 0
+ X_S390_TYPES_H = 0
X_SIZET_ = 0
X_SIZE_T = 0
X_SIZE_T_ = 0
@@ -2918,6 +2961,7 @@ const (
X_SYS_TIME_H = 1
X_SYS_TTYDEFAULTS_H_ = 0
X_SYS_TYPES_H = 1
+ X_THREAD_MUTEX_INTERNAL_H = 1
X_THREAD_SHARED_TYPES_H = 1
X_TIME_H = 1
X_T_PTRDIFF = 0
@@ -2969,7 +3013,7 @@ const (
EtSQLESCAPE = 9
EtSQLESCAPE2 = 10
EtSQLESCAPE3 = 14
- EtSRCLIST = 12
+ EtSRCITEM = 12
EtSTRING = 5
EtTOKEN = 11
Fts5YYNFTS5TOKEN = 16
@@ -2997,7 +3041,6 @@ const (
Fts5YY_SHIFT_MIN = 0
Linux = 1
Math_errhandling = 3
- MemJM = 0
Sqlite3Fts5ParserCTX_FETCH = 0
Sqlite3Fts5ParserCTX_PARAM = 0
Sqlite3Fts5ParserCTX_PDECL = 0
@@ -3023,11 +3066,155 @@ const (
WsdStatInit = 0
)
+// These are the possible values for the FLAGS argument to `dladdr1'.
+// This indicates what extra information is stored at *EXTRA_INFO.
+// It may also be zero, in which case the EXTRA_INFO argument is not used.
+const ( /* dlfcn.h:108:1: */
+ // Matching symbol table entry (const ElfNN_Sym *).
+ RTLD_DL_SYMENT = 1
+
+ // The object containing the address (struct link_map *).
+ RTLD_DL_LINKMAP = 2
+)
+
+// These are the possible values for the REQUEST argument to `dlinfo'.
+const ( /* dlfcn.h:128:1: */
+ // Treat ARG as `lmid_t *'; store namespace ID for HANDLE there.
+ RTLD_DI_LMID = 1
+
+ // Treat ARG as `struct link_map **';
+ // store the `struct link_map *' for HANDLE there.
+ RTLD_DI_LINKMAP = 2
+
+ RTLD_DI_CONFIGADDR = 3 // Unsupported, defined by Solaris.
+
+ // Treat ARG as `Dl_serinfo *' (see below), and fill in to describe the
+ // directories that will be searched for dependencies of this object.
+ // RTLD_DI_SERINFOSIZE fills in just the `dls_cnt' and `dls_size'
+ // entries to indicate the size of the buffer that must be passed to
+ // RTLD_DI_SERINFO to fill in the full information.
+ RTLD_DI_SERINFO = 4
+ RTLD_DI_SERINFOSIZE = 5
+
+ // Treat ARG as `char *', and store there the directory name used to
+ // expand $ORIGIN in this shared object's dependency file names.
+ RTLD_DI_ORIGIN = 6
+
+ RTLD_DI_PROFILENAME = 7 // Unsupported, defined by Solaris.
+ RTLD_DI_PROFILEOUT = 8 // Unsupported, defined by Solaris.
+
+ // Treat ARG as `size_t *', and store there the TLS module ID
+ // of this object's PT_TLS segment, as used in TLS relocations;
+ // store zero if this object does not define a PT_TLS segment.
+ RTLD_DI_TLS_MODID = 9
+
+ // Treat ARG as `void **', and store there a pointer to the calling
+ // thread's TLS block corresponding to this object's PT_TLS segment.
+ // Store a null pointer if this object does not define a PT_TLS
+ // segment, or if the calling thread has not allocated a block for it.
+ RTLD_DI_TLS_DATA = 10
+
+ RTLD_DI_MAX = 10
+)
+
+// Define macros for the return values of ilogb and llogb, based on
+// __FP_LOGB0_IS_MIN and __FP_LOGBNAN_IS_MIN.
+//
+// FP_ILOGB0 Expands to a value returned by `ilogb (0.0)'.
+// FP_ILOGBNAN Expands to a value returned by `ilogb (NAN)'.
+// FP_LLOGB0 Expands to a value returned by `llogb (0.0)'.
+// FP_LLOGBNAN Expands to a value returned by `llogb (NAN)'.
+//
+
+// Define __FP_LOGB0_IS_MIN and __FP_LOGBNAN_IS_MIN.
+// Copyright (C) 2016-2020 Free Software Foundation, Inc.
+// This file is part of the GNU C Library.
+//
+// The GNU C Library is free software; you can redistribute it and/or
+// modify it under the terms of the GNU Lesser General Public
+// License as published by the Free Software Foundation; either
+// version 2.1 of the License, or (at your option) any later version.
+//
+// The GNU C Library is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+// Lesser General Public License for more details.
+//
+// You should have received a copy of the GNU Lesser General Public
+// License along with the GNU C Library; if not, see
+// .
+
+// __FP_LOGB0_IS_MIN is defined to 1 if FP_ILOGB0 is INT_MIN, and 0 if
+// it is -INT_MAX. __FP_LOGBNAN_IS_MIN is defined to 1 if FP_ILOGBNAN
+// is INT_MIN, and 0 if it is INT_MAX.
+
+// Get the architecture specific values describing the floating-point
+// evaluation. The following symbols will get defined:
+//
+// FP_FAST_FMA
+// FP_FAST_FMAF
+// FP_FAST_FMAL
+// If defined it indicates that the `fma' function
+// generally executes about as fast as a multiply and an add.
+// This macro is defined only iff the `fma' function is
+// implemented directly with a hardware multiply-add instructions.
+
+// Define FP_FAST_* macros.
+// Copyright (C) 2016-2020 Free Software Foundation, Inc.
+// This file is part of the GNU C Library.
+//
+// The GNU C Library is free software; you can redistribute it and/or
+// modify it under the terms of the GNU Lesser General Public
+// License as published by the Free Software Foundation; either
+// version 2.1 of the License, or (at your option) any later version.
+//
+// The GNU C Library is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+// Lesser General Public License for more details.
+//
+// You should have received a copy of the GNU Lesser General Public
+// License along with the GNU C Library; if not, see
+// .
+
+// The GCC 4.6 compiler will define __FP_FAST_FMA{,F,L} if the fma{,f,l}
+// builtins are supported.
+
+// Rounding direction macros for fromfp functions.
+const ( /* math.h:237:1: */
+ FP_INT_UPWARD = 0
+ FP_INT_DOWNWARD = 1
+ FP_INT_TOWARDZERO = 2
+ FP_INT_TONEARESTFROMZERO = 3
+ FP_INT_TONEAREST = 4
+)
+
+// Depending on the type of TG_ARG, call an appropriately suffixed
+// version of FUNC with arguments (including parentheses) ARGS.
+// Suffixed functions may not exist for long double if it has the same
+// format as double, or for other types with the same format as float,
+// double or long double. The behavior is undefined if the argument
+// does not have a real floating type. The definition may use a
+// conditional expression, so all suffixed versions of FUNC must
+// return the same type (FUNC may include a cast if necessary rather
+// than being a single identifier).
+
+// ISO C99 defines some generic macros which work on any data type.
+
+// All floating-point numbers can be put in one of these categories.
+const ( /* math.h:853:1: */
+ FP_NAN = 0
+ FP_INFINITE = 1
+ FP_ZERO = 2
+ FP_SUBNORMAL = 3
+ FP_NORMAL = 4
+)
+
// Get the `_PC_*' symbols for the NAME argument to `pathconf' and `fpathconf';
// the `_SC_*' symbols for the NAME argument to `sysconf';
// and the `_CS_*' symbols for the NAME argument to `confstr'.
// `sysconf', `pathconf', and `confstr' NAME values. Generic version.
-// Copyright (C) 1993-2018 Free Software Foundation, Inc.
+// Copyright (C) 1993-2020 Free Software Foundation, Inc.
// This file is part of the GNU C Library.
//
// The GNU C Library is free software; you can redistribute it and/or
@@ -3042,7 +3229,7 @@ const (
//
// You should have received a copy of the GNU Lesser General Public
// License along with the GNU C Library; if not, see
-// .
+// .
// Values for the NAME argument to `pathconf' and `fpathconf'.
const ( /* confname.h:24:1: */
@@ -3431,16 +3618,11 @@ const ( /* fcntl-linux.h:265:1: */
F_OWNER_GID = 2
)
-// In 4.3bsd-net2, leave these undefined to indicate that size_t, etc.
-// are already defined.
-// BSD/OS 3.1 and FreeBSD [23].x require the MACHINE_ANSI_H check here.
-// NetBSD 5 requires the I386_ANSI_H and X86_64_ANSI_H checks here.
-
// A null pointer constant.
// XPG requires a few symbols from being defined.
// Definitions of flag bits for `waitpid' et al.
-// Copyright (C) 1992-2018 Free Software Foundation, Inc.
+// Copyright (C) 1992-2020 Free Software Foundation, Inc.
// This file is part of the GNU C Library.
//
// The GNU C Library is free software; you can redistribute it and/or
@@ -3455,7 +3637,7 @@ const ( /* fcntl-linux.h:265:1: */
//
// You should have received a copy of the GNU Lesser General Public
// License along with the GNU C Library; if not, see
-// .
+// .
// Bits in the third argument to `waitpid'.
@@ -3472,152 +3654,8 @@ const ( /* waitflags.h:52:1: */
P_PGID = 2
)
-// These are the possible values for the FLAGS argument to `dladdr1'.
-// This indicates what extra information is stored at *EXTRA_INFO.
-// It may also be zero, in which case the EXTRA_INFO argument is not used.
-const ( /* dlfcn.h:108:1: */
- // Matching symbol table entry (const ElfNN_Sym *).
- RTLD_DL_SYMENT = 1
-
- // The object containing the address (struct link_map *).
- RTLD_DL_LINKMAP = 2
-)
-
-// These are the possible values for the REQUEST argument to `dlinfo'.
-const ( /* dlfcn.h:128:1: */
- // Treat ARG as `lmid_t *'; store namespace ID for HANDLE there.
- RTLD_DI_LMID = 1
-
- // Treat ARG as `struct link_map **';
- // store the `struct link_map *' for HANDLE there.
- RTLD_DI_LINKMAP = 2
-
- RTLD_DI_CONFIGADDR = 3 // Unsupported, defined by Solaris.
-
- // Treat ARG as `Dl_serinfo *' (see below), and fill in to describe the
- // directories that will be searched for dependencies of this object.
- // RTLD_DI_SERINFOSIZE fills in just the `dls_cnt' and `dls_size'
- // entries to indicate the size of the buffer that must be passed to
- // RTLD_DI_SERINFO to fill in the full information.
- RTLD_DI_SERINFO = 4
- RTLD_DI_SERINFOSIZE = 5
-
- // Treat ARG as `char *', and store there the directory name used to
- // expand $ORIGIN in this shared object's dependency file names.
- RTLD_DI_ORIGIN = 6
-
- RTLD_DI_PROFILENAME = 7 // Unsupported, defined by Solaris.
- RTLD_DI_PROFILEOUT = 8 // Unsupported, defined by Solaris.
-
- // Treat ARG as `size_t *', and store there the TLS module ID
- // of this object's PT_TLS segment, as used in TLS relocations;
- // store zero if this object does not define a PT_TLS segment.
- RTLD_DI_TLS_MODID = 9
-
- // Treat ARG as `void **', and store there a pointer to the calling
- // thread's TLS block corresponding to this object's PT_TLS segment.
- // Store a null pointer if this object does not define a PT_TLS
- // segment, or if the calling thread has not allocated a block for it.
- RTLD_DI_TLS_DATA = 10
-
- RTLD_DI_MAX = 10
-)
-
-// Define macros for the return values of ilogb and llogb, based on
-// __FP_LOGB0_IS_MIN and __FP_LOGBNAN_IS_MIN.
-//
-// FP_ILOGB0 Expands to a value returned by `ilogb (0.0)'.
-// FP_ILOGBNAN Expands to a value returned by `ilogb (NAN)'.
-// FP_LLOGB0 Expands to a value returned by `llogb (0.0)'.
-// FP_LLOGBNAN Expands to a value returned by `llogb (NAN)'.
-//
-
-// Define __FP_LOGB0_IS_MIN and __FP_LOGBNAN_IS_MIN.
-// Copyright (C) 2016-2018 Free Software Foundation, Inc.
-// This file is part of the GNU C Library.
-//
-// The GNU C Library is free software; you can redistribute it and/or
-// modify it under the terms of the GNU Lesser General Public
-// License as published by the Free Software Foundation; either
-// version 2.1 of the License, or (at your option) any later version.
-//
-// The GNU C Library is distributed in the hope that it will be useful,
-// but WITHOUT ANY WARRANTY; without even the implied warranty of
-// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
-// Lesser General Public License for more details.
-//
-// You should have received a copy of the GNU Lesser General Public
-// License along with the GNU C Library; if not, see
-// .
-
-// __FP_LOGB0_IS_MIN is defined to 1 if FP_ILOGB0 is INT_MIN, and 0 if
-// it is -INT_MAX. __FP_LOGBNAN_IS_MIN is defined to 1 if FP_ILOGBNAN
-// is INT_MIN, and 0 if it is INT_MAX.
-
-// Get the architecture specific values describing the floating-point
-// evaluation. The following symbols will get defined:
-//
-// FP_FAST_FMA
-// FP_FAST_FMAF
-// FP_FAST_FMAL
-// If defined it indicates that the `fma' function
-// generally executes about as fast as a multiply and an add.
-// This macro is defined only iff the `fma' function is
-// implemented directly with a hardware multiply-add instructions.
-
-// Define FP_FAST_* macros.
-// Copyright (C) 2016-2018 Free Software Foundation, Inc.
-// This file is part of the GNU C Library.
-//
-// The GNU C Library is free software; you can redistribute it and/or
-// modify it under the terms of the GNU Lesser General Public
-// License as published by the Free Software Foundation; either
-// version 2.1 of the License, or (at your option) any later version.
-//
-// The GNU C Library is distributed in the hope that it will be useful,
-// but WITHOUT ANY WARRANTY; without even the implied warranty of
-// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
-// Lesser General Public License for more details.
-//
-// You should have received a copy of the GNU Lesser General Public
-// License along with the GNU C Library; if not, see
-// .
-
-// The GCC 4.6 compiler will define __FP_FAST_FMA{,F,L} if the fma{,f,l}
-// builtins are supported.
-
-// Rounding direction macros for fromfp functions.
-const ( /* math.h:237:1: */
- FP_INT_UPWARD = 0
- FP_INT_DOWNWARD = 1
- FP_INT_TOWARDZERO = 2
- FP_INT_TONEARESTFROMZERO = 3
- FP_INT_TONEAREST = 4
-)
-
-// Depending on the type of TG_ARG, call an appropriately suffixed
-// version of FUNC with arguments (including parentheses) ARGS.
-// Suffixed functions may not exist for long double if it has the same
-// format as double, or for other types with the same format as float,
-// double or long double. The behavior is undefined if the argument
-// does not have a real floating type. The definition may use a
-// conditional expression, so all suffixed versions of FUNC must
-// return the same type (FUNC may include a cast if necessary rather
-// than being a single identifier).
-
-// ISO C99 defines some generic macros which work on any data type.
-
-// All floating-point numbers can be put in one of these categories.
-const ( /* math.h:853:1: */
- FP_NAN = 0
- FP_INFINITE = 1
- FP_ZERO = 2
- FP_SUBNORMAL = 3
- FP_NORMAL = 4
-)
-
// Values for the first argument to `getitimer' and `setitimer'.
-const ( /* time.h:88:1: */
+const ( /* time.h:89:1: */
// Timers run in real time.
ITIMER_REAL = 0
// Timers run only when the process is executing.
@@ -3648,7 +3686,7 @@ type X__float128 = float64 /* :47:21 */
// *****************************************************************************
//
// This file is an amalgamation of many separate C source files from SQLite
-// version 3.35.5. By combining all the individual C code files into this
+// version 3.36.0. By combining all the individual C code files into this
// single large file, the entire code can be compiled as a single translation
// unit. This allows many compilers to do optimizations that would not be
// possible if the files were compiled separately. Performance improvements
@@ -3695,29 +3733,32 @@ type X__float128 = float64 /* :47:21 */
// This array looks large, but in a typical installation actually uses
// only a handful of compile-time options, so most times this array is usually
// rather short and uses little memory space.
-var sqlite3azCompileOpt = [16]uintptr{
+var sqlite3azCompileOpt = [19]uintptr{
// BEGIN CODE GENERATED BY tool/mkctime.tcl
- ts, /* "COMPILER=gcc-8.3..." */
+ ts, /* "COMPILER=gcc-9.3..." */
ts + 19, /* "ENABLE_COLUMN_ME..." */
ts + 42, /* "ENABLE_FTS5" */
ts + 54, /* "ENABLE_GEOPOLY" */
ts + 69, /* "ENABLE_JSON1" */
ts + 82, /* "ENABLE_MEMORY_MA..." */
- ts + 107, /* "ENABLE_PREUPDATE..." */
- ts + 129, /* "ENABLE_RBU" */
- ts + 140, /* "ENABLE_RTREE" */
- ts + 153, /* "ENABLE_SNAPSHOT" */
- ts + 169, /* "ENABLE_STAT4" */
- ts + 182, /* "ENABLE_UNLOCK_NO..." */
- ts + 203, /* "LIKE_DOESNT_MATC..." */
- ts + 227, /* "MUTEX_NOOP" */
- ts + 238, /* "SOUNDEX" */
- ts + 246, /* "THREADSAFE=1" */
+ ts + 107, /* "ENABLE_OFFSET_SQ..." */
+ ts + 130, /* "ENABLE_PREUPDATE..." */
+ ts + 152, /* "ENABLE_RBU" */
+ ts + 163, /* "ENABLE_RTREE" */
+ ts + 176, /* "ENABLE_SESSION" */
+ ts + 191, /* "ENABLE_SNAPSHOT" */
+ ts + 207, /* "ENABLE_STAT4" */
+ ts + 220, /* "ENABLE_UNLOCK_NO..." */
+ ts + 241, /* "LIKE_DOESNT_MATC..." */
+ ts + 265, /* "MUTEX_NOOP" */
+ ts + 276, /* "SOUNDEX" */
+ ts + 284, /* "SYSTEM_MALLOC" */
+ ts + 298, /* "THREADSAFE=1" */
// END CODE GENERATED BY tool/mkctime.tcl
} /* sqlite3.c:72:19 */
-func Xsqlite3CompileOptions(tls *libc.TLS, pnOpt uintptr) uintptr { /* sqlite3.c:785:27: */
+func Xsqlite3CompileOptions(tls *libc.TLS, pnOpt uintptr) uintptr { /* sqlite3.c:804:27: */
*(*int32)(unsafe.Pointer(pnOpt)) = (int32(uint64(unsafe.Sizeof(sqlite3azCompileOpt)) / uint64(unsafe.Sizeof(uintptr(0)))))
return uintptr(uintptr(unsafe.Pointer(&sqlite3azCompileOpt)))
}
@@ -3903,7 +3944,7 @@ func Xsqlite3CompileOptions(tls *libc.TLS, pnOpt uintptr) uintptr { /* sqlite3.c
// The makefile makes some minor changes to this file (such as inserting
// the version number) and changes its name to "sqlite3.h" as
// part of the build process.
-// Copyright (C) 1989-2018 Free Software Foundation, Inc.
+// Copyright (C) 1989-2019 Free Software Foundation, Inc.
//
// This file is part of GCC.
//
@@ -4029,7 +4070,7 @@ type Va_list = X__gnuc_va_list /* stdarg.h:99:24 */
// of the hash might be different from [SQLITE_SOURCE_ID].)^
//
// See also: [sqlite_version()] and [sqlite_source_id()].
-var Xsqlite3_version = *(*[7]int8)(unsafe.Pointer(ts + 259 /* "3.35.5" */)) /* sqlite3.c:1225:23 */
+var Xsqlite3_version = *(*[7]uint8)(unsafe.Pointer(ts + 311 /* "3.36.0" */)) /* sqlite3.c:1244:23 */
// CAPI3REF: Database Connection Handle
// KEYWORDS: {database connection} {database connections}
@@ -4073,21 +4114,21 @@ type sqlite3 = struct {
FmTrace U8
FnoSharedCache U8
FnSqlExec U8
- _ [3]byte
+ F__ccgo_pad1 [3]byte
FnextPagesize int32
Fmagic U32
FnChange int32
FnTotalChange int32
FaLimit [12]int32
FnMaxSorterMmap int32
- _ [4]byte
+ F__ccgo_pad2 [4]byte
Finit struct {
FnewTnum Pgno
FiDb U8
Fbusy U8
- _ [2]byte
- ForphanTrigger uint8 /* unsigned orphanTrigger: 1, unsigned imposterTable: 1, unsigned reopenMemdb: 1, unsigned bDropColumn: 1 */
- _ [7]byte
+ F__ccgo_pad1 [2]byte
+ ForphanTrigger uint8 /* unsigned orphanTrigger: 1, unsigned imposterTable: 1, unsigned reopenMemdb: 1 */
+ F__ccgo_pad2 [7]byte
FazInit uintptr
}
FnVdbeActive int32
@@ -4118,9 +4159,9 @@ type sqlite3 = struct {
FpCollNeededArg uintptr
FpErr uintptr
Fu1 struct {
- _ [0]uint64
+ F__ccgo_pad1 [0]uint64
FisInterrupted int32
- _ [4]byte
+ F__ccgo_pad2 [4]byte
}
Flookaside Lookaside
FxAuth Sqlite3_xauth
@@ -4150,7 +4191,7 @@ type sqlite3 = struct {
FpUnlockArg uintptr
FxUnlockNotify uintptr
FpNextBlocked uintptr
-} /* sqlite3.c:1312:9 */
+} /* sqlite3.c:1331:9 */
// CAPI3REF: Database Connection Handle
// KEYWORDS: {database connection} {database connections}
@@ -4164,7 +4205,7 @@ type sqlite3 = struct {
// [sqlite3_prepare_v2()], [sqlite3_create_function()], and
// [sqlite3_busy_timeout()] to name but three) that are methods on an
// sqlite3 object.
-type Sqlite3 = sqlite3 /* sqlite3.c:1312:24 */
+type Sqlite3 = sqlite3 /* sqlite3.c:1331:24 */
// CAPI3REF: 64-Bit Integer Types
// KEYWORDS: sqlite_int64 sqlite_uint64
@@ -4180,15 +4221,15 @@ type Sqlite3 = sqlite3 /* sqlite3.c:1312:24 */
// between -9223372036854775808 and +9223372036854775807 inclusive. ^The
// sqlite3_uint64 and sqlite_uint64 types can store integer values
// between 0 and +18446744073709551615 inclusive.
-type Sqlite_int64 = int64 /* sqlite3.c:1341:25 */
-type Sqlite_uint64 = uint64 /* sqlite3.c:1342:34 */
-type Sqlite3_int64 = Sqlite_int64 /* sqlite3.c:1344:22 */
-type Sqlite3_uint64 = Sqlite_uint64 /* sqlite3.c:1345:23 */
+type Sqlite_int64 = int64 /* sqlite3.c:1360:25 */
+type Sqlite_uint64 = uint64 /* sqlite3.c:1361:34 */
+type Sqlite3_int64 = Sqlite_int64 /* sqlite3.c:1363:22 */
+type Sqlite3_uint64 = Sqlite_uint64 /* sqlite3.c:1364:23 */
// The type for a callback function.
// This is legacy and deprecated. It is included for historical
// compatibility and is not documented.
-type Sqlite3_callback = uintptr /* sqlite3.c:1401:13 */
+type Sqlite3_callback = uintptr /* sqlite3.c:1420:13 */
// CAPI3REF: Result Codes
// KEYWORDS: {result code definitions}
@@ -4299,7 +4340,7 @@ type Sqlite3_callback = uintptr /* sqlite3.c:1401:13 */
// for their own use. The pMethods entry is a pointer to an
// [sqlite3_io_methods] object that defines methods for performing
// I/O operations on the open file.
-type sqlite3_file = struct{ FpMethods uintptr } /* sqlite3.c:1312:9 */
+type sqlite3_file = struct{ FpMethods uintptr } /* sqlite3.c:1331:9 */
// CAPI3REF: Result Codes
// KEYWORDS: {result code definitions}
@@ -4410,10 +4451,10 @@ type sqlite3_file = struct{ FpMethods uintptr } /* sqlite3.c:1312:9 */
// for their own use. The pMethods entry is a pointer to an
// [sqlite3_io_methods] object that defines methods for performing
// I/O operations on the open file.
-type Sqlite3_file = sqlite3_file /* sqlite3.c:1747:29 */
+type Sqlite3_file = sqlite3_file /* sqlite3.c:1766:29 */
type sqlite3_io_methods = struct {
FiVersion int32
- _ [4]byte
+ F__ccgo_pad1 [4]byte
FxClose uintptr
FxRead uintptr
FxWrite uintptr
@@ -4432,7 +4473,7 @@ type sqlite3_io_methods = struct {
FxShmUnmap uintptr
FxFetch uintptr
FxUnfetch uintptr
-} /* sqlite3.c:1312:9 */
+} /* sqlite3.c:1331:9 */
// CAPI3REF: OS Interface File Virtual Methods Object
//
@@ -4526,7 +4567,7 @@ type sqlite3_io_methods = struct {
// fails to zero-fill short reads might seem to work. However,
// failure to zero-fill short reads will eventually lead to
// database corruption.
-type Sqlite3_io_methods = sqlite3_io_methods /* sqlite3.c:1846:35 */
+type Sqlite3_io_methods = sqlite3_io_methods /* sqlite3.c:1865:35 */
// CAPI3REF: Loadable Extension Thunk
//
@@ -4788,7 +4829,7 @@ type sqlite3_api_routines = struct {
Ffree_filename uintptr
Fdatabase_file_object uintptr
Ftxn_state uintptr
-} /* sqlite3.c:2260:9 */
+} /* sqlite3.c:2298:9 */
// CAPI3REF: Loadable Extension Thunk
//
@@ -4796,7 +4837,7 @@ type sqlite3_api_routines = struct {
// the third parameter to entry points of [loadable extensions]. This
// structure must be typedefed in order to work around compiler warnings
// on some platforms.
-type Sqlite3_api_routines = sqlite3_api_routines /* sqlite3.c:2260:37 */
+type Sqlite3_api_routines = sqlite3_api_routines /* sqlite3.c:2298:37 */
// CAPI3REF: OS Interface Object
//
@@ -4969,7 +5010,7 @@ type sqlite3_vfs = struct {
FiVersion int32
FszOsFile int32
FmxPathname int32
- _ [4]byte
+ F__ccgo_pad1 [4]byte
FpNext uintptr
FzName uintptr
FpAppData uintptr
@@ -4989,7 +5030,7 @@ type sqlite3_vfs = struct {
FxSetSystemCall uintptr
FxGetSystemCall uintptr
FxNextSystemCall uintptr
-} /* sqlite3.c:1312:9 */
+} /* sqlite3.c:1331:9 */
// CAPI3REF: OS Interface Object
//
@@ -5158,8 +5199,8 @@ type sqlite3_vfs = struct {
// or all of these interfaces to be NULL or for their behavior to change
// from one release to the next. Applications must not attempt to access
// any of these methods if the iVersion of the VFS is less than 3.
-type Sqlite3_vfs = sqlite3_vfs /* sqlite3.c:2431:28 */
-type Sqlite3_syscall_ptr = uintptr /* sqlite3.c:2432:14 */
+type Sqlite3_vfs = sqlite3_vfs /* sqlite3.c:2469:28 */
+type Sqlite3_syscall_ptr = uintptr /* sqlite3.c:2470:14 */
// CAPI3REF: Memory Allocation Routines
//
@@ -5231,7 +5272,7 @@ type sqlite3_mem_methods = struct {
FxInit uintptr
FxShutdown uintptr
FpAppData uintptr
-} /* sqlite3.c:2729:9 */
+} /* sqlite3.c:2767:9 */
// CAPI3REF: Memory Allocation Routines
//
@@ -5294,7 +5335,7 @@ type sqlite3_mem_methods = struct {
//
// SQLite will never invoke xInit() more than once without an intervening
// call to xShutdown().
-type Sqlite3_mem_methods = sqlite3_mem_methods /* sqlite3.c:2729:36 */
+type Sqlite3_mem_methods = sqlite3_mem_methods /* sqlite3.c:2767:36 */
// CAPI3REF: Dynamically Typed Value Object
// KEYWORDS: {protected sqlite3_value} {unprotected sqlite3_value}
@@ -5346,7 +5387,7 @@ type sqlite3_value = struct {
FuTemp U32
Fdb uintptr
FxDel uintptr
-} /* sqlite3.c:1312:9 */
+} /* sqlite3.c:1331:9 */
// CAPI3REF: Dynamically Typed Value Object
// KEYWORDS: {protected sqlite3_value} {unprotected sqlite3_value}
@@ -5386,7 +5427,7 @@ type sqlite3_value = struct {
// [sqlite3_value_dup()].
// The [sqlite3_value_blob | sqlite3_value_type()] family of
// interfaces require protected sqlite3_value objects.
-type Sqlite3_value = sqlite3_value /* sqlite3.c:5321:30 */
+type Sqlite3_value = sqlite3_value /* sqlite3.c:5368:30 */
// CAPI3REF: SQL Function Context Object
//
@@ -5399,17 +5440,17 @@ type Sqlite3_value = sqlite3_value /* sqlite3.c:5321:30 */
// [sqlite3_context_db_handle()], [sqlite3_get_auxdata()],
// and/or [sqlite3_set_auxdata()].
type sqlite3_context = struct {
- FpOut uintptr
- FpFunc uintptr
- FpMem uintptr
- FpVdbe uintptr
- FiOp int32
- FisError int32
- FskipFlag U8
- Fargc U8
- _ [6]byte
- Fargv [1]uintptr
-} /* sqlite3.c:1312:9 */
+ FpOut uintptr
+ FpFunc uintptr
+ FpMem uintptr
+ FpVdbe uintptr
+ FiOp int32
+ FisError int32
+ FskipFlag U8
+ Fargc U8
+ F__ccgo_pad1 [6]byte
+ Fargv [1]uintptr
+} /* sqlite3.c:1331:9 */
// CAPI3REF: SQL Function Context Object
//
@@ -5421,7 +5462,7 @@ type sqlite3_context = struct {
// [sqlite3_aggregate_context()], [sqlite3_user_data()],
// [sqlite3_context_db_handle()], [sqlite3_get_auxdata()],
// and/or [sqlite3_set_auxdata()].
-type Sqlite3_context = sqlite3_context /* sqlite3.c:5335:32 */
+type Sqlite3_context = sqlite3_context /* sqlite3.c:5382:32 */
// CAPI3REF: Constants Defining Special Destructor Behavior
//
@@ -5435,7 +5476,7 @@ type Sqlite3_context = sqlite3_context /* sqlite3.c:5335:32 */
//
// The typedef is necessary to work around problems in certain
// C++ compilers.
-type Sqlite3_destructor_type = uintptr /* sqlite3.c:6698:14 */
+type Sqlite3_destructor_type = uintptr /* sqlite3.c:6747:14 */
// The interface to the virtual-table mechanism is currently considered
// to be experimental. The interface might change in incompatible ways.
@@ -5446,11 +5487,11 @@ type Sqlite3_destructor_type = uintptr /* sqlite3.c:6698:14 */
// Structures used by the virtual table interface
type sqlite3_vtab = struct {
- FpModule uintptr
- FnRef int32
- _ [4]byte
- FzErrMsg uintptr
-} /* sqlite3.c:1312:9 */
+ FpModule uintptr
+ FnRef int32
+ F__ccgo_pad1 [4]byte
+ FzErrMsg uintptr
+} /* sqlite3.c:1331:9 */
// The interface to the virtual-table mechanism is currently considered
// to be experimental. The interface might change in incompatible ways.
@@ -5460,34 +5501,34 @@ type sqlite3_vtab = struct {
// interface fixed, support it indefinitely, and remove this comment.
// Structures used by the virtual table interface
-type Sqlite3_vtab = sqlite3_vtab /* sqlite3.c:7817:29 */
+type Sqlite3_vtab = sqlite3_vtab /* sqlite3.c:7866:29 */
type sqlite3_index_info = struct {
FnConstraint int32
- _ [4]byte
+ F__ccgo_pad1 [4]byte
FaConstraint uintptr
FnOrderBy int32
- _ [4]byte
+ F__ccgo_pad2 [4]byte
FaOrderBy uintptr
FaConstraintUsage uintptr
FidxNum int32
- _ [4]byte
+ F__ccgo_pad3 [4]byte
FidxStr uintptr
FneedToFreeIdxStr int32
ForderByConsumed int32
FestimatedCost float64
FestimatedRows Sqlite3_int64
FidxFlags int32
- _ [4]byte
+ F__ccgo_pad4 [4]byte
FcolUsed Sqlite3_uint64
-} /* sqlite3.c:7818:9 */
+} /* sqlite3.c:7867:9 */
-type Sqlite3_index_info = sqlite3_index_info /* sqlite3.c:7818:35 */
-type sqlite3_vtab_cursor = struct{ FpVtab uintptr } /* sqlite3.c:7819:9 */
+type Sqlite3_index_info = sqlite3_index_info /* sqlite3.c:7867:35 */
+type sqlite3_vtab_cursor = struct{ FpVtab uintptr } /* sqlite3.c:7868:9 */
-type Sqlite3_vtab_cursor = sqlite3_vtab_cursor /* sqlite3.c:7819:36 */
+type Sqlite3_vtab_cursor = sqlite3_vtab_cursor /* sqlite3.c:7868:36 */
type sqlite3_module = struct {
FiVersion int32
- _ [4]byte
+ F__ccgo_pad1 [4]byte
FxCreate uintptr
FxConnect uintptr
FxBestIndex uintptr
@@ -5511,9 +5552,9 @@ type sqlite3_module = struct {
FxRelease uintptr
FxRollbackTo uintptr
FxShadowName uintptr
-} /* sqlite3.c:1312:9 */
+} /* sqlite3.c:1331:9 */
-type Sqlite3_module = sqlite3_module /* sqlite3.c:7820:31 */
+type Sqlite3_module = sqlite3_module /* sqlite3.c:7869:31 */
// CAPI3REF: Virtual Table Indexing Information
// KEYWORDS: sqlite3_index_info
@@ -5619,9 +5660,9 @@ type sqlite3_index_constraint = struct {
FiColumn int32
Fop uint8
Fusable uint8
- _ [2]byte
+ F__ccgo_pad1 [2]byte
FiTermOffset int32
-} /* sqlite3.c:7818:9 */
+} /* sqlite3.c:7867:9 */
// CAPI3REF: Virtual Table Indexing Information
// KEYWORDS: sqlite3_index_info
@@ -5724,10 +5765,10 @@ type sqlite3_index_constraint = struct {
// sqlite3_libversion_number() returns a value greater than or equal to
// 3009000.
type sqlite3_index_orderby = struct {
- FiColumn int32
- Fdesc uint8
- _ [3]byte
-} /* sqlite3.c:7818:9 */
+ FiColumn int32
+ Fdesc uint8
+ F__ccgo_pad1 [3]byte
+} /* sqlite3.c:7867:9 */
// CAPI3REF: Virtual Table Indexing Information
// KEYWORDS: sqlite3_index_info
@@ -5830,10 +5871,10 @@ type sqlite3_index_orderby = struct {
// sqlite3_libversion_number() returns a value greater than or equal to
// 3009000.
type sqlite3_index_constraint_usage = struct {
- FargvIndex int32
- Fomit uint8
- _ [3]byte
-} /* sqlite3.c:7818:9 */
+ FargvIndex int32
+ Fomit uint8
+ F__ccgo_pad1 [3]byte
+} /* sqlite3.c:7867:9 */
// CAPI3REF: Mutex Methods Object
//
@@ -5908,7 +5949,7 @@ type sqlite3_mutex_methods = struct {
FxMutexLeave uintptr
FxMutexHeld uintptr
FxMutexNotheld uintptr
-} /* sqlite3.c:8652:9 */
+} /* sqlite3.c:8701:9 */
// CAPI3REF: Mutex Methods Object
//
@@ -5973,7 +6014,7 @@ type sqlite3_mutex_methods = struct {
// called, but only if the prior call to xMutexInit returned SQLITE_OK.
// If xMutexInit fails in any way, it is expected to clean up after itself
// prior to returning.
-type Sqlite3_mutex_methods = sqlite3_mutex_methods /* sqlite3.c:8652:38 */
+type Sqlite3_mutex_methods = sqlite3_mutex_methods /* sqlite3.c:8701:38 */
// CAPI3REF: Dynamic String Object
// KEYWORDS: {dynamic string}
@@ -5997,8 +6038,8 @@ type sqlite3_str = struct {
FnChar U32
FaccError U8
FprintfFlags U8
- _ [2]byte
-} /* sqlite3.c:8914:9 */
+ F__ccgo_pad1 [2]byte
+} /* sqlite3.c:8964:9 */
// CAPI3REF: Dynamic String Object
// KEYWORDS: {dynamic string}
@@ -6014,7 +6055,7 @@ type sqlite3_str = struct {
// ^The sqlite3_str object is destroyed and the string it created
// is returned using the [sqlite3_str_finish()] interface.
//
-type Sqlite3_str = sqlite3_str /* sqlite3.c:8914:28 */
+type Sqlite3_str = sqlite3_str /* sqlite3.c:8964:28 */
// CAPI3REF: Custom Page Cache Object
//
@@ -6027,7 +6068,7 @@ type Sqlite3_str = sqlite3_str /* sqlite3.c:8914:28 */
type sqlite3_pcache_page = struct {
FpBuf uintptr
FpExtra uintptr
-} /* sqlite3.c:1312:9 */
+} /* sqlite3.c:1331:9 */
// CAPI3REF: Custom Page Cache Object
//
@@ -6037,7 +6078,7 @@ type sqlite3_pcache_page = struct {
// of this object as parameters or as their return value.
//
// See [sqlite3_pcache_methods2] for additional information.
-type Sqlite3_pcache_page = sqlite3_pcache_page /* sqlite3.c:9407:36 */
+type Sqlite3_pcache_page = sqlite3_pcache_page /* sqlite3.c:9457:36 */
// CAPI3REF: Application Defined Page Cache.
// KEYWORDS: {page cache}
@@ -6197,21 +6238,21 @@ type Sqlite3_pcache_page = sqlite3_pcache_page /* sqlite3.c:9407:36 */
// is not obligated to free any memory, but well-behaved implementations should
// do their best.
type sqlite3_pcache_methods2 = struct {
- FiVersion int32
- _ [4]byte
- FpArg uintptr
- FxInit uintptr
- FxShutdown uintptr
- FxCreate uintptr
- FxCachesize uintptr
- FxPagecount uintptr
- FxFetch uintptr
- FxUnpin uintptr
- FxRekey uintptr
- FxTruncate uintptr
- FxDestroy uintptr
- FxShrink uintptr
-} /* sqlite3.c:9572:9 */
+ FiVersion int32
+ F__ccgo_pad1 [4]byte
+ FpArg uintptr
+ FxInit uintptr
+ FxShutdown uintptr
+ FxCreate uintptr
+ FxCachesize uintptr
+ FxPagecount uintptr
+ FxFetch uintptr
+ FxUnpin uintptr
+ FxRekey uintptr
+ FxTruncate uintptr
+ FxDestroy uintptr
+ FxShrink uintptr
+} /* sqlite3.c:9622:9 */
// CAPI3REF: Application Defined Page Cache.
// KEYWORDS: {page cache}
@@ -6370,7 +6411,7 @@ type sqlite3_pcache_methods2 = struct {
// free up as much of heap memory as possible. The page cache implementation
// is not obligated to free any memory, but well-behaved implementations should
// do their best.
-type Sqlite3_pcache_methods2 = sqlite3_pcache_methods2 /* sqlite3.c:9572:40 */
+type Sqlite3_pcache_methods2 = sqlite3_pcache_methods2 /* sqlite3.c:9622:40 */
// This is the obsolete pcache_methods object that has now been replaced
// by sqlite3_pcache_methods2. This object is not used by SQLite. It is
@@ -6387,12 +6428,12 @@ type sqlite3_pcache_methods = struct {
FxRekey uintptr
FxTruncate uintptr
FxDestroy uintptr
-} /* sqlite3.c:9595:9 */
+} /* sqlite3.c:9645:9 */
// This is the obsolete pcache_methods object that has now been replaced
// by sqlite3_pcache_methods2. This object is not used by SQLite. It is
// retained in the header file for backwards compatibility only.
-type Sqlite3_pcache_methods = sqlite3_pcache_methods /* sqlite3.c:9595:39 */
+type Sqlite3_pcache_methods = sqlite3_pcache_methods /* sqlite3.c:9645:39 */
// CAPI3REF: Online Backup Object
//
@@ -6408,7 +6449,7 @@ type sqlite3_backup = struct {
FiDestSchema U32
FbDestLocked int32
FiNext Pgno
- _ [4]byte
+ F__ccgo_pad1 [4]byte
FpSrcDb uintptr
FpSrc uintptr
Frc int32
@@ -6416,7 +6457,7 @@ type sqlite3_backup = struct {
FnPagecount Pgno
FisAttached int32
FpNext uintptr
-} /* sqlite3.c:1312:9 */
+} /* sqlite3.c:1331:9 */
// CAPI3REF: Online Backup Object
//
@@ -6426,7 +6467,7 @@ type sqlite3_backup = struct {
// [sqlite3_backup_finish()].
//
// See Also: [Using the SQLite Online Backup API]
-type Sqlite3_backup = sqlite3_backup /* sqlite3.c:9621:31 */
+type Sqlite3_backup = sqlite3_backup /* sqlite3.c:9671:31 */
// CAPI3REF: Database Snapshot
// KEYWORDS: {snapshot} {sqlite3_snapshot}
@@ -6446,7 +6487,7 @@ type Sqlite3_backup = sqlite3_backup /* sqlite3.c:9621:31 */
// version of the database file so that it is possible to later open a new read
// transaction that sees that historical version of the database rather than
// the most recent version.
-type sqlite3_snapshot = struct{ Fhidden [48]uint8 } /* sqlite3.c:10652:9 */
+type sqlite3_snapshot = struct{ Fhidden [48]uint8 } /* sqlite3.c:10712:9 */
// CAPI3REF: Database Snapshot
// KEYWORDS: {snapshot} {sqlite3_snapshot}
@@ -6466,7 +6507,7 @@ type sqlite3_snapshot = struct{ Fhidden [48]uint8 } /* sqlite3.c:10652:9 */
// version of the database file so that it is possible to later open a new read
// transaction that sees that historical version of the database rather than
// the most recent version.
-type Sqlite3_snapshot = sqlite3_snapshot /* sqlite3.c:10654:3 */
+type Sqlite3_snapshot = sqlite3_snapshot /* sqlite3.c:10714:3 */
// CAPI3REF: Flags for sqlite3_deserialize()
//
@@ -6504,13 +6545,13 @@ type Sqlite3_snapshot = sqlite3_snapshot /* sqlite3.c:10654:3 */
//
type sqlite3_rtree_geometry = struct {
- FpContext uintptr
- FnParam int32
- _ [4]byte
- FaParam uintptr
- FpUser uintptr
- FxDelUser uintptr
-} /* sqlite3.c:10979:9 */
+ FpContext uintptr
+ FnParam int32
+ F__ccgo_pad1 [4]byte
+ FaParam uintptr
+ FpUser uintptr
+ FxDelUser uintptr
+} /* sqlite3.c:11039:9 */
// CAPI3REF: Flags for sqlite3_deserialize()
//
@@ -6547,11 +6588,11 @@ type sqlite3_rtree_geometry = struct {
//
//
-type Sqlite3_rtree_geometry = sqlite3_rtree_geometry /* sqlite3.c:10979:39 */
+type Sqlite3_rtree_geometry = sqlite3_rtree_geometry /* sqlite3.c:11039:39 */
type sqlite3_rtree_query_info = struct {
FpContext uintptr
FnParam int32
- _ [4]byte
+ F__ccgo_pad1 [4]byte
FaParam uintptr
FpUser uintptr
FxDelUser uintptr
@@ -6560,26 +6601,515 @@ type sqlite3_rtree_query_info = struct {
FnCoord int32
FiLevel int32
FmxLevel int32
- _ [4]byte
+ F__ccgo_pad2 [4]byte
FiRowid Sqlite3_int64
FrParentScore Sqlite3_rtree_dbl
FeParentWithin int32
FeWithin int32
FrScore Sqlite3_rtree_dbl
FapSqlParam uintptr
-} /* sqlite3.c:10980:9 */
+} /* sqlite3.c:11040:9 */
-type Sqlite3_rtree_query_info = sqlite3_rtree_query_info /* sqlite3.c:10980:41 */
+type Sqlite3_rtree_query_info = sqlite3_rtree_query_info /* sqlite3.c:11040:41 */
// The double-precision datatype used by RTree depends on the
// SQLITE_RTREE_INT_ONLY compile-time option.
-type Sqlite3_rtree_dbl = float64 /* sqlite3.c:10988:18 */
+type Sqlite3_rtree_dbl = float64 /* sqlite3.c:11048:18 */
// Allowed values for sqlite3_rtree_query.eWithin and .eParentWithin.
//******* End of sqlite3rtree.h ********
//******* Begin file sqlite3session.h ********
+// Make sure we can call this stuff from C++.
+
+// CAPI3REF: Session Object Handle
+//
+// An instance of this object is a [session] that can be used to
+// record changes to a database.
+type sqlite3_session = struct {
+ Fdb uintptr
+ FzDb uintptr
+ FbEnableSize int32
+ FbEnable int32
+ FbIndirect int32
+ FbAutoAttach int32
+ Frc int32
+ F__ccgo_pad1 [4]byte
+ FpFilterCtx uintptr
+ FxTableFilter uintptr
+ FnMalloc I64
+ FnMaxChangesetSize I64
+ FpZeroBlob uintptr
+ FpNext uintptr
+ FpTable uintptr
+ Fhook SessionHook
+} /* sqlite3.c:11155:9 */
+
+// Allowed values for sqlite3_rtree_query.eWithin and .eParentWithin.
+
+//******* End of sqlite3rtree.h ********
+//******* Begin file sqlite3session.h ********
+
+// Make sure we can call this stuff from C++.
+
+// CAPI3REF: Session Object Handle
+//
+// An instance of this object is a [session] that can be used to
+// record changes to a database.
+type Sqlite3_session = sqlite3_session /* sqlite3.c:11155:32 */
+
+// CAPI3REF: Changeset Iterator Handle
+//
+// An instance of this object acts as a cursor for iterating
+// over the elements of a [changeset] or [patchset].
+type sqlite3_changeset_iter = struct {
+ Fin SessionInput
+ Ftblhdr SessionBuffer
+ FbPatchset int32
+ FbInvert int32
+ FbSkipEmpty int32
+ Frc int32
+ FpConflict uintptr
+ FzTab uintptr
+ FnCol int32
+ Fop int32
+ FbIndirect int32
+ F__ccgo_pad1 [4]byte
+ FabPK uintptr
+ FapValue uintptr
+} /* sqlite3.c:11163:9 */
+
+// CAPI3REF: Changeset Iterator Handle
+//
+// An instance of this object acts as a cursor for iterating
+// over the elements of a [changeset] or [patchset].
+type Sqlite3_changeset_iter = sqlite3_changeset_iter /* sqlite3.c:11163:39 */
+
+// CAPI3REF: Changegroup Handle
+//
+// A changegroup is an object used to combine two or more
+// [changesets] or [patchsets]
+type sqlite3_changegroup = struct {
+ Frc int32
+ FbPatch int32
+ FpList uintptr
+} /* sqlite3.c:12015:9 */
+
+// CAPI3REF: Changegroup Handle
+//
+// A changegroup is an object used to combine two or more
+// [changesets] or [patchsets]
+type Sqlite3_changegroup = sqlite3_changegroup /* sqlite3.c:12015:36 */
+
+// CAPI3REF: Flags for sqlite3changeset_apply_v2
+//
+// The following flags may passed via the 9th parameter to
+// [sqlite3changeset_apply_v2] and [sqlite3changeset_apply_v2_strm]:
+//
+//
+// - SQLITE_CHANGESETAPPLY_NOSAVEPOINT
-
+// Usually, the sessions module encloses all operations performed by
+// a single call to apply_v2() or apply_v2_strm() in a [SAVEPOINT]. The
+// SAVEPOINT is committed if the changeset or patchset is successfully
+// applied, or rolled back if an error occurs. Specifying this flag
+// causes the sessions module to omit this savepoint. In this case, if the
+// caller has an open transaction or savepoint when apply_v2() is called,
+// it may revert the partially applied changeset by rolling it back.
+//
+//
- SQLITE_CHANGESETAPPLY_INVERT
-
+// Invert the changeset before applying it. This is equivalent to inverting
+// a changeset using sqlite3changeset_invert() before applying it. It is
+// an error to specify this flag with a patchset.
+
+// CAPI3REF: Constants Passed To The Conflict Handler
+//
+// Values that may be passed as the second argument to a conflict-handler.
+//
+//
+// - SQLITE_CHANGESET_DATA
-
+// The conflict handler is invoked with CHANGESET_DATA as the second argument
+// when processing a DELETE or UPDATE change if a row with the required
+// PRIMARY KEY fields is present in the database, but one or more other
+// (non primary-key) fields modified by the update do not contain the
+// expected "before" values.
+//
+// The conflicting row, in this case, is the database row with the matching
+// primary key.
+//
+//
- SQLITE_CHANGESET_NOTFOUND
-
+// The conflict handler is invoked with CHANGESET_NOTFOUND as the second
+// argument when processing a DELETE or UPDATE change if a row with the
+// required PRIMARY KEY fields is not present in the database.
+//
+// There is no conflicting row in this case. The results of invoking the
+// sqlite3changeset_conflict() API are undefined.
+//
+//
- SQLITE_CHANGESET_CONFLICT
-
+// CHANGESET_CONFLICT is passed as the second argument to the conflict
+// handler while processing an INSERT change if the operation would result
+// in duplicate primary key values.
+//
+// The conflicting row in this case is the database row with the matching
+// primary key.
+//
+//
- SQLITE_CHANGESET_FOREIGN_KEY
-
+// If foreign key handling is enabled, and applying a changeset leaves the
+// database in a state containing foreign key violations, the conflict
+// handler is invoked with CHANGESET_FOREIGN_KEY as the second argument
+// exactly once before the changeset is committed. If the conflict handler
+// returns CHANGESET_OMIT, the changes, including those that caused the
+// foreign key constraint violation, are committed. Or, if it returns
+// CHANGESET_ABORT, the changeset is rolled back.
+//
+// No current or conflicting row information is provided. The only function
+// it is possible to call on the supplied sqlite3_changeset_iter handle
+// is sqlite3changeset_fk_conflicts().
+//
+//
- SQLITE_CHANGESET_CONSTRAINT
-
+// If any other constraint violation occurs while applying a change (i.e.
+// a UNIQUE, CHECK or NOT NULL constraint), the conflict handler is
+// invoked with CHANGESET_CONSTRAINT as the second argument.
+//
+// There is no conflicting row in this case. The results of invoking the
+// sqlite3changeset_conflict() API are undefined.
+//
+//
+
+// CAPI3REF: Constants Returned By The Conflict Handler
+//
+// A conflict handler callback must return one of the following three values.
+//
+//
+// - SQLITE_CHANGESET_OMIT
-
+// If a conflict handler returns this value no special action is taken. The
+// change that caused the conflict is not applied. The session module
+// continues to the next change in the changeset.
+//
+//
- SQLITE_CHANGESET_REPLACE
-
+// This value may only be returned if the second argument to the conflict
+// handler was SQLITE_CHANGESET_DATA or SQLITE_CHANGESET_CONFLICT. If this
+// is not the case, any changes applied so far are rolled back and the
+// call to sqlite3changeset_apply() returns SQLITE_MISUSE.
+//
+// If CHANGESET_REPLACE is returned by an SQLITE_CHANGESET_DATA conflict
+// handler, then the conflicting row is either updated or deleted, depending
+// on the type of change.
+//
+// If CHANGESET_REPLACE is returned by an SQLITE_CHANGESET_CONFLICT conflict
+// handler, then the conflicting row is removed from the database and a
+// second attempt to apply the change is made. If this second attempt fails,
+// the original row is restored to the database before continuing.
+//
+//
- SQLITE_CHANGESET_ABORT
-
+// If this value is returned, any changes applied so far are rolled back
+// and the call to sqlite3changeset_apply() returns SQLITE_ABORT.
+//
+
+// CAPI3REF: Rebasing changesets
+// EXPERIMENTAL
+//
+// Suppose there is a site hosting a database in state S0. And that
+// modifications are made that move that database to state S1 and a
+// changeset recorded (the "local" changeset). Then, a changeset based
+// on S0 is received from another site (the "remote" changeset) and
+// applied to the database. The database is then in state
+// (S1+"remote"), where the exact state depends on any conflict
+// resolution decisions (OMIT or REPLACE) made while applying "remote".
+// Rebasing a changeset is to update it to take those conflict
+// resolution decisions into account, so that the same conflicts
+// do not have to be resolved elsewhere in the network.
+//
+// For example, if both the local and remote changesets contain an
+// INSERT of the same key on "CREATE TABLE t1(a PRIMARY KEY, b)":
+//
+// local: INSERT INTO t1 VALUES(1, 'v1');
+// remote: INSERT INTO t1 VALUES(1, 'v2');
+//
+// and the conflict resolution is REPLACE, then the INSERT change is
+// removed from the local changeset (it was overridden). Or, if the
+// conflict resolution was "OMIT", then the local changeset is modified
+// to instead contain:
+//
+// UPDATE t1 SET b = 'v2' WHERE a=1;
+//
+// Changes within the local changeset are rebased as follows:
+//
+//
+// - Local INSERT
-
+// This may only conflict with a remote INSERT. If the conflict
+// resolution was OMIT, then add an UPDATE change to the rebased
+// changeset. Or, if the conflict resolution was REPLACE, add
+// nothing to the rebased changeset.
+//
+//
- Local DELETE
-
+// This may conflict with a remote UPDATE or DELETE. In both cases the
+// only possible resolution is OMIT. If the remote operation was a
+// DELETE, then add no change to the rebased changeset. If the remote
+// operation was an UPDATE, then the old.* fields of change are updated
+// to reflect the new.* values in the UPDATE.
+//
+//
- Local UPDATE
-
+// This may conflict with a remote UPDATE or DELETE. If it conflicts
+// with a DELETE, and the conflict resolution was OMIT, then the update
+// is changed into an INSERT. Any undefined values in the new.* record
+// from the update change are filled in using the old.* values from
+// the conflicting DELETE. Or, if the conflict resolution was REPLACE,
+// the UPDATE change is simply omitted from the rebased changeset.
+//
+// If conflict is with a remote UPDATE and the resolution is OMIT, then
+// the old.* values are rebased using the new.* values in the remote
+// change. Or, if the resolution is REPLACE, then the change is copied
+// into the rebased changeset with updates to columns also updated by
+// the conflicting remote UPDATE removed. If this means no columns would
+// be updated, the change is omitted.
+//
+//
+// A local change may be rebased against multiple remote changes
+// simultaneously. If a single key is modified by multiple remote
+// changesets, they are combined as follows before the local changeset
+// is rebased:
+//
+//
+// - If there has been one or more REPLACE resolutions on a
+// key, it is rebased according to a REPLACE.
+//
+//
- If there have been no REPLACE resolutions on a key, then
+// the local changeset is rebased according to the most recent
+// of the OMIT resolutions.
+//
+//
+// Note that conflict resolutions from multiple remote changesets are
+// combined on a per-field basis, not per-row. This means that in the
+// case of multiple remote UPDATE operations, some fields of a single
+// local change may be rebased for REPLACE while others are rebased for
+// OMIT.
+//
+// In order to rebase a local changeset, the remote changeset must first
+// be applied to the local database using sqlite3changeset_apply_v2() and
+// the buffer of rebase information captured. Then:
+//
+//
+// - An sqlite3_rebaser object is created by calling
+// sqlite3rebaser_create().
+//
- The new object is configured with the rebase buffer obtained from
+// sqlite3changeset_apply_v2() by calling sqlite3rebaser_configure().
+// If the local changeset is to be rebased against multiple remote
+// changesets, then sqlite3rebaser_configure() should be called
+// multiple times, in the same order that the multiple
+// sqlite3changeset_apply_v2() calls were made.
+//
- Each local changeset is rebased by calling sqlite3rebaser_rebase().
+//
- The sqlite3_rebaser object is deleted by calling
+// sqlite3rebaser_delete().
+//
+type sqlite3_rebaser = struct{ Fgrp Sqlite3_changegroup } /* sqlite3.c:12579:9 */
+
+// CAPI3REF: Flags for sqlite3changeset_apply_v2
+//
+// The following flags may passed via the 9th parameter to
+// [sqlite3changeset_apply_v2] and [sqlite3changeset_apply_v2_strm]:
+//
+//
+// - SQLITE_CHANGESETAPPLY_NOSAVEPOINT
-
+// Usually, the sessions module encloses all operations performed by
+// a single call to apply_v2() or apply_v2_strm() in a [SAVEPOINT]. The
+// SAVEPOINT is committed if the changeset or patchset is successfully
+// applied, or rolled back if an error occurs. Specifying this flag
+// causes the sessions module to omit this savepoint. In this case, if the
+// caller has an open transaction or savepoint when apply_v2() is called,
+// it may revert the partially applied changeset by rolling it back.
+//
+//
- SQLITE_CHANGESETAPPLY_INVERT
-
+// Invert the changeset before applying it. This is equivalent to inverting
+// a changeset using sqlite3changeset_invert() before applying it. It is
+// an error to specify this flag with a patchset.
+
+// CAPI3REF: Constants Passed To The Conflict Handler
+//
+// Values that may be passed as the second argument to a conflict-handler.
+//
+//
+// - SQLITE_CHANGESET_DATA
-
+// The conflict handler is invoked with CHANGESET_DATA as the second argument
+// when processing a DELETE or UPDATE change if a row with the required
+// PRIMARY KEY fields is present in the database, but one or more other
+// (non primary-key) fields modified by the update do not contain the
+// expected "before" values.
+//
+// The conflicting row, in this case, is the database row with the matching
+// primary key.
+//
+//
- SQLITE_CHANGESET_NOTFOUND
-
+// The conflict handler is invoked with CHANGESET_NOTFOUND as the second
+// argument when processing a DELETE or UPDATE change if a row with the
+// required PRIMARY KEY fields is not present in the database.
+//
+// There is no conflicting row in this case. The results of invoking the
+// sqlite3changeset_conflict() API are undefined.
+//
+//
- SQLITE_CHANGESET_CONFLICT
-
+// CHANGESET_CONFLICT is passed as the second argument to the conflict
+// handler while processing an INSERT change if the operation would result
+// in duplicate primary key values.
+//
+// The conflicting row in this case is the database row with the matching
+// primary key.
+//
+//
- SQLITE_CHANGESET_FOREIGN_KEY
-
+// If foreign key handling is enabled, and applying a changeset leaves the
+// database in a state containing foreign key violations, the conflict
+// handler is invoked with CHANGESET_FOREIGN_KEY as the second argument
+// exactly once before the changeset is committed. If the conflict handler
+// returns CHANGESET_OMIT, the changes, including those that caused the
+// foreign key constraint violation, are committed. Or, if it returns
+// CHANGESET_ABORT, the changeset is rolled back.
+//
+// No current or conflicting row information is provided. The only function
+// it is possible to call on the supplied sqlite3_changeset_iter handle
+// is sqlite3changeset_fk_conflicts().
+//
+//
- SQLITE_CHANGESET_CONSTRAINT
-
+// If any other constraint violation occurs while applying a change (i.e.
+// a UNIQUE, CHECK or NOT NULL constraint), the conflict handler is
+// invoked with CHANGESET_CONSTRAINT as the second argument.
+//
+// There is no conflicting row in this case. The results of invoking the
+// sqlite3changeset_conflict() API are undefined.
+//
+//
+
+// CAPI3REF: Constants Returned By The Conflict Handler
+//
+// A conflict handler callback must return one of the following three values.
+//
+//
+// - SQLITE_CHANGESET_OMIT
-
+// If a conflict handler returns this value no special action is taken. The
+// change that caused the conflict is not applied. The session module
+// continues to the next change in the changeset.
+//
+//
- SQLITE_CHANGESET_REPLACE
-
+// This value may only be returned if the second argument to the conflict
+// handler was SQLITE_CHANGESET_DATA or SQLITE_CHANGESET_CONFLICT. If this
+// is not the case, any changes applied so far are rolled back and the
+// call to sqlite3changeset_apply() returns SQLITE_MISUSE.
+//
+// If CHANGESET_REPLACE is returned by an SQLITE_CHANGESET_DATA conflict
+// handler, then the conflicting row is either updated or deleted, depending
+// on the type of change.
+//
+// If CHANGESET_REPLACE is returned by an SQLITE_CHANGESET_CONFLICT conflict
+// handler, then the conflicting row is removed from the database and a
+// second attempt to apply the change is made. If this second attempt fails,
+// the original row is restored to the database before continuing.
+//
+//
- SQLITE_CHANGESET_ABORT
-
+// If this value is returned, any changes applied so far are rolled back
+// and the call to sqlite3changeset_apply() returns SQLITE_ABORT.
+//
+
+// CAPI3REF: Rebasing changesets
+// EXPERIMENTAL
+//
+// Suppose there is a site hosting a database in state S0. And that
+// modifications are made that move that database to state S1 and a
+// changeset recorded (the "local" changeset). Then, a changeset based
+// on S0 is received from another site (the "remote" changeset) and
+// applied to the database. The database is then in state
+// (S1+"remote"), where the exact state depends on any conflict
+// resolution decisions (OMIT or REPLACE) made while applying "remote".
+// Rebasing a changeset is to update it to take those conflict
+// resolution decisions into account, so that the same conflicts
+// do not have to be resolved elsewhere in the network.
+//
+// For example, if both the local and remote changesets contain an
+// INSERT of the same key on "CREATE TABLE t1(a PRIMARY KEY, b)":
+//
+// local: INSERT INTO t1 VALUES(1, 'v1');
+// remote: INSERT INTO t1 VALUES(1, 'v2');
+//
+// and the conflict resolution is REPLACE, then the INSERT change is
+// removed from the local changeset (it was overridden). Or, if the
+// conflict resolution was "OMIT", then the local changeset is modified
+// to instead contain:
+//
+// UPDATE t1 SET b = 'v2' WHERE a=1;
+//
+// Changes within the local changeset are rebased as follows:
+//
+//
+// - Local INSERT
-
+// This may only conflict with a remote INSERT. If the conflict
+// resolution was OMIT, then add an UPDATE change to the rebased
+// changeset. Or, if the conflict resolution was REPLACE, add
+// nothing to the rebased changeset.
+//
+//
- Local DELETE
-
+// This may conflict with a remote UPDATE or DELETE. In both cases the
+// only possible resolution is OMIT. If the remote operation was a
+// DELETE, then add no change to the rebased changeset. If the remote
+// operation was an UPDATE, then the old.* fields of change are updated
+// to reflect the new.* values in the UPDATE.
+//
+//
- Local UPDATE
-
+// This may conflict with a remote UPDATE or DELETE. If it conflicts
+// with a DELETE, and the conflict resolution was OMIT, then the update
+// is changed into an INSERT. Any undefined values in the new.* record
+// from the update change are filled in using the old.* values from
+// the conflicting DELETE. Or, if the conflict resolution was REPLACE,
+// the UPDATE change is simply omitted from the rebased changeset.
+//
+// If conflict is with a remote UPDATE and the resolution is OMIT, then
+// the old.* values are rebased using the new.* values in the remote
+// change. Or, if the resolution is REPLACE, then the change is copied
+// into the rebased changeset with updates to columns also updated by
+// the conflicting remote UPDATE removed. If this means no columns would
+// be updated, the change is omitted.
+//
+//
+// A local change may be rebased against multiple remote changes
+// simultaneously. If a single key is modified by multiple remote
+// changesets, they are combined as follows before the local changeset
+// is rebased:
+//
+//
+// - If there has been one or more REPLACE resolutions on a
+// key, it is rebased according to a REPLACE.
+//
+//
- If there have been no REPLACE resolutions on a key, then
+// the local changeset is rebased according to the most recent
+// of the OMIT resolutions.
+//
+//
+// Note that conflict resolutions from multiple remote changesets are
+// combined on a per-field basis, not per-row. This means that in the
+// case of multiple remote UPDATE operations, some fields of a single
+// local change may be rebased for REPLACE while others are rebased for
+// OMIT.
+//
+// In order to rebase a local changeset, the remote changeset must first
+// be applied to the local database using sqlite3changeset_apply_v2() and
+// the buffer of rebase information captured. Then:
+//
+//
+// - An sqlite3_rebaser object is created by calling
+// sqlite3rebaser_create().
+//
- The new object is configured with the rebase buffer obtained from
+// sqlite3changeset_apply_v2() by calling sqlite3rebaser_configure().
+// If the local changeset is to be rebased against multiple remote
+// changesets, then sqlite3rebaser_configure() should be called
+// multiple times, in the same order that the multiple
+// sqlite3changeset_apply_v2() calls were made.
+//
- Each local changeset is rebased by calling sqlite3rebaser_rebase().
+//
- The sqlite3_rebaser object is deleted by calling
+// sqlite3rebaser_delete().
+//
+type Sqlite3_rebaser = sqlite3_rebaser /* sqlite3.c:12579:32 */
+
+// CAPI3REF: Values for sqlite3session_config().
+
+// Make sure we can call this stuff from C++.
+
//******* End of sqlite3session.h ********
//******* Begin file fts5.h ********
// 2014 May 31
@@ -6608,7 +7138,7 @@ type Sqlite3_rtree_dbl = float64 /* sqlite3.c:10988:18 */
type Fts5ExtensionApi1 = struct {
FiVersion int32
- _ [4]byte
+ F__ccgo_pad1 [4]byte
FxUserData uintptr
FxColumnCount uintptr
FxRowCount uintptr
@@ -6628,12 +7158,11 @@ type Fts5ExtensionApi1 = struct {
FxPhraseNext uintptr
FxPhraseFirstColumn uintptr
FxPhraseNextColumn uintptr
-} /* sqlite3.c:12787:9 */
+} /* sqlite3.c:12895:9 */
-// Allowed values for sqlite3_rtree_query.eWithin and .eParentWithin.
+// CAPI3REF: Values for sqlite3session_config().
-//******* End of sqlite3rtree.h ********
-//******* Begin file sqlite3session.h ********
+// Make sure we can call this stuff from C++.
//******* End of sqlite3session.h ********
//******* Begin file fts5.h ********
@@ -6661,22 +7190,22 @@ type Fts5ExtensionApi1 = struct {
// Virtual table implementations may overload SQL functions by implementing
// the sqlite3_module.xFindFunction() method.
-type Fts5ExtensionApi = Fts5ExtensionApi1 /* sqlite3.c:12787:33 */
+type Fts5ExtensionApi = Fts5ExtensionApi1 /* sqlite3.c:12895:33 */
type Fts5PhraseIter1 = struct {
Fa uintptr
Fb uintptr
-} /* sqlite3.c:12789:9 */
+} /* sqlite3.c:12897:9 */
-type Fts5PhraseIter = Fts5PhraseIter1 /* sqlite3.c:12789:31 */
+type Fts5PhraseIter = Fts5PhraseIter1 /* sqlite3.c:12897:31 */
-type Fts5_extension_function = uintptr /* sqlite3.c:12791:14 */
+type Fts5_extension_function = uintptr /* sqlite3.c:12899:14 */
type fts5_tokenizer = struct {
FxCreate uintptr
FxDelete uintptr
FxTokenize uintptr
-} /* sqlite3.c:13250:9 */
+} /* sqlite3.c:13358:9 */
-type Fts5_tokenizer = fts5_tokenizer /* sqlite3.c:13250:31 */
+type Fts5_tokenizer = fts5_tokenizer /* sqlite3.c:13358:31 */
// Flags that may be passed as the third argument to xTokenize()
@@ -6692,11 +7221,11 @@ type Fts5_tokenizer = fts5_tokenizer /* sqlite3.c:13250:31 */
// FTS5 EXTENSION REGISTRATION API
type fts5_api = struct {
FiVersion int32
- _ [4]byte
+ F__ccgo_pad1 [4]byte
FxCreateTokenizer uintptr
FxFindTokenizer uintptr
FxCreateFunction uintptr
-} /* sqlite3.c:13286:9 */
+} /* sqlite3.c:13394:9 */
// Flags that may be passed as the third argument to xTokenize()
@@ -6710,7 +7239,7 @@ type fts5_api = struct {
// ************************************************************************
//
// FTS5 EXTENSION REGISTRATION API
-type Fts5_api = fts5_api /* sqlite3.c:13286:25 */
+type Fts5_api = fts5_api /* sqlite3.c:13394:25 */
//
// END OF REGISTRATION API
@@ -7032,7 +7561,7 @@ type Hash1 = struct {
Fcount uint32
Ffirst uintptr
Fht uintptr
-} /* sqlite3.c:1312:9 */
+} /* sqlite3.c:1331:9 */
//
// END OF REGISTRATION API
@@ -7349,15 +7878,15 @@ type Hash1 = struct {
// used in SQLite.
// Forward declarations of structures.
-type Hash = Hash1 /* sqlite3.c:13962:21 */
+type Hash = Hash1 /* sqlite3.c:14070:21 */
type HashElem1 = struct {
Fnext uintptr
Fprev uintptr
Fdata uintptr
FpKey uintptr
-} /* sqlite3.c:1312:9 */
+} /* sqlite3.c:1331:9 */
-type HashElem = HashElem1 /* sqlite3.c:13963:25 */
+type HashElem = HashElem1 /* sqlite3.c:14071:25 */
// A complete hash table is an instance of the following structure.
// The internals of this structure are intended to be opaque -- client
@@ -7380,10 +7909,10 @@ type HashElem = HashElem1 /* sqlite3.c:13963:25 */
// in the table, it is faster to do a linear search than to manage
// the hash table.
type _ht = struct {
- Fcount uint32
- _ [4]byte
- Fchain uintptr
-} /* sqlite3.c:1312:9 */
+ Fcount uint32
+ F__ccgo_pad1 [4]byte
+ Fchain uintptr
+} /* sqlite3.c:1331:9 */
// Wide character type.
// Locale-writers should change this as necessary to
@@ -7393,14 +7922,9 @@ type _ht = struct {
// Define this type if we are doing the whole job,
// or if we want this type in particular.
-// In 4.3bsd-net2, leave these undefined to indicate that size_t, etc.
-// are already defined.
-// BSD/OS 3.1 and FreeBSD [23].x require the MACHINE_ANSI_H check here.
-// NetBSD 5 requires the I386_ANSI_H and X86_64_ANSI_H checks here.
-
// A null pointer constant.
-// Copyright (C) 1989-2018 Free Software Foundation, Inc.
+// Copyright (C) 1989-2019 Free Software Foundation, Inc.
//
// This file is part of GCC.
//
@@ -7426,7 +7950,7 @@ type _ht = struct {
// ISO C Standard: 7.15 Variable arguments
// bits/types.h -- definitions of __*_t types underlying *_t types.
-// Copyright (C) 2002-2018 Free Software Foundation, Inc.
+// Copyright (C) 2002-2020 Free Software Foundation, Inc.
// This file is part of the GNU C Library.
//
// The GNU C Library is free software; you can redistribute it and/or
@@ -7441,11 +7965,11 @@ type _ht = struct {
//
// You should have received a copy of the GNU Lesser General Public
// License along with the GNU C Library; if not, see
-// .
+// .
// Never include this file directly; use instead.
-// Copyright (C) 1991-2018 Free Software Foundation, Inc.
+// Copyright (C) 1991-2020 Free Software Foundation, Inc.
// This file is part of the GNU C Library.
//
// The GNU C Library is free software; you can redistribute it and/or
@@ -7460,43 +7984,65 @@ type _ht = struct {
//
// You should have received a copy of the GNU Lesser General Public
// License along with the GNU C Library; if not, see
-// .
+// .
// Determine the wordsize from the preprocessor defines.
+// Bit size of the time_t type at glibc build time, general case.
+// Copyright (C) 2018-2020 Free Software Foundation, Inc.
+// This file is part of the GNU C Library.
+//
+// The GNU C Library is free software; you can redistribute it and/or
+// modify it under the terms of the GNU Lesser General Public
+// License as published by the Free Software Foundation; either
+// version 2.1 of the License, or (at your option) any later version.
+//
+// The GNU C Library is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+// Lesser General Public License for more details.
+//
+// You should have received a copy of the GNU Lesser General Public
+// License along with the GNU C Library; if not, see
+// .
+
+// Determine the wordsize from the preprocessor defines.
+
+// Size in bits of the 'time_t' type of the default ABI.
+
// Convenience types.
-type X__u_char = uint8 /* types.h:30:23 */
-type X__u_short = uint16 /* types.h:31:28 */
-type X__u_int = uint32 /* types.h:32:22 */
-type X__u_long = uint64 /* types.h:33:27 */
+type X__u_char = uint8 /* types.h:31:23 */
+type X__u_short = uint16 /* types.h:32:28 */
+type X__u_int = uint32 /* types.h:33:22 */
+type X__u_long = uint64 /* types.h:34:27 */
// Fixed-size types, underlying types depend on word size and compiler.
-type X__int8_t = int8 /* types.h:36:21 */
-type X__uint8_t = uint8 /* types.h:37:23 */
-type X__int16_t = int16 /* types.h:38:26 */
-type X__uint16_t = uint16 /* types.h:39:28 */
-type X__int32_t = int32 /* types.h:40:20 */
-type X__uint32_t = uint32 /* types.h:41:22 */
-type X__int64_t = int64 /* types.h:43:25 */
-type X__uint64_t = uint64 /* types.h:44:27 */
+type X__int8_t = int8 /* types.h:37:21 */
+type X__uint8_t = uint8 /* types.h:38:23 */
+type X__int16_t = int16 /* types.h:39:26 */
+type X__uint16_t = uint16 /* types.h:40:28 */
+type X__int32_t = int32 /* types.h:41:20 */
+type X__uint32_t = uint32 /* types.h:42:22 */
+type X__int64_t = int64 /* types.h:44:25 */
+type X__uint64_t = uint64 /* types.h:45:27 */
// Smallest types with at least a given width.
-type X__int_least8_t = X__int8_t /* types.h:51:18 */
-type X__uint_least8_t = X__uint8_t /* types.h:52:19 */
-type X__int_least16_t = X__int16_t /* types.h:53:19 */
-type X__uint_least16_t = X__uint16_t /* types.h:54:20 */
-type X__int_least32_t = X__int32_t /* types.h:55:19 */
-type X__uint_least32_t = X__uint32_t /* types.h:56:20 */
-type X__int_least64_t = X__int64_t /* types.h:57:19 */
-type X__uint_least64_t = X__uint64_t /* types.h:58:20 */
+type X__int_least8_t = X__int8_t /* types.h:52:18 */
+type X__uint_least8_t = X__uint8_t /* types.h:53:19 */
+type X__int_least16_t = X__int16_t /* types.h:54:19 */
+type X__uint_least16_t = X__uint16_t /* types.h:55:20 */
+type X__int_least32_t = X__int32_t /* types.h:56:19 */
+type X__uint_least32_t = X__uint32_t /* types.h:57:20 */
+type X__int_least64_t = X__int64_t /* types.h:58:19 */
+type X__uint_least64_t = X__uint64_t /* types.h:59:20 */
// quad_t is also 64 bits.
-type X__quad_t = int64 /* types.h:62:18 */
-type X__u_quad_t = uint64 /* types.h:63:27 */
+type X__quad_t = int64 /* types.h:63:18 */
+type X__u_quad_t = uint64 /* types.h:64:27 */
// Largest integral types.
-type X__intmax_t = int64 /* types.h:71:18 */
-type X__uintmax_t = uint64 /* types.h:72:27 */
+type X__intmax_t = int64 /* types.h:72:18 */
+type X__uintmax_t = uint64 /* types.h:73:27 */
// The machine-dependent file defines __*_T_TYPE
// macros for each of the OS types we define below. The definitions
@@ -7508,7 +8054,7 @@ type X__uintmax_t = uint64 /* types.h:72:27 */
// 32 -- "natural" 32-bit type (always int)
// 64 -- "natural" 64-bit type (long or long long)
// LONG32 -- 32-bit type, traditionally long
-// QUAD -- 64-bit type, always long long
+// QUAD -- 64-bit type, traditionally long long
// WORD -- natural type of __WORDSIZE bits (int or long)
// LONGWORD -- type of __WORDSIZE bits, traditionally long
//
@@ -7529,7 +8075,7 @@ type X__uintmax_t = uint64 /* types.h:72:27 */
// No need to mark the typedef with __extension__.
// bits/typesizes.h -- underlying types for *_t. Linux/s390 version.
-// Copyright (C) 2003-2018 Free Software Foundation, Inc.
+// Copyright (C) 2003-2020 Free Software Foundation, Inc.
// This file is part of the GNU C Library.
//
// The GNU C Library is free software; you can redistribute it and/or
@@ -7544,7 +8090,7 @@ type X__uintmax_t = uint64 /* types.h:72:27 */
//
// You should have received a copy of the GNU Lesser General Public
// License along with the GNU C Library; if not, see
-// .
+// .
// See for the meaning of these macros. This file exists so
// that need not vary across different GNU platforms.
@@ -7559,81 +8105,109 @@ type X__uintmax_t = uint64 /* types.h:72:27 */
// And for __rlim_t and __rlim64_t.
+// And for fsblkcnt_t, fsblkcnt64_t, fsfilcnt_t and fsfilcnt64_t.
+
// Number of descriptors that can fit in an `fd_set'.
-type X__dev_t = uint64 /* types.h:143:25 */ // Type of device numbers.
-type X__uid_t = uint32 /* types.h:144:25 */ // Type of user identifications.
-type X__gid_t = uint32 /* types.h:145:25 */ // Type of group identifications.
-type X__ino_t = uint64 /* types.h:146:25 */ // Type of file serial numbers.
-type X__ino64_t = uint64 /* types.h:147:27 */ // Type of file serial numbers (LFS).
-type X__mode_t = uint32 /* types.h:148:26 */ // Type of file attribute bitmasks.
-type X__nlink_t = uint64 /* types.h:149:27 */ // Type of file link counts.
-type X__off_t = int64 /* types.h:150:25 */ // Type of file sizes and offsets.
-type X__off64_t = int64 /* types.h:151:27 */ // Type of file sizes and offsets (LFS).
-type X__pid_t = int32 /* types.h:152:25 */ // Type of process identifications.
-type X__fsid_t = struct{ F__val [2]int32 } /* types.h:153:26 */ // Type of file system IDs.
-type X__clock_t = int64 /* types.h:154:27 */ // Type of CPU usage counts.
-type X__rlim_t = uint64 /* types.h:155:26 */ // Type for resource measurement.
-type X__rlim64_t = uint64 /* types.h:156:28 */ // Type for resource measurement (LFS).
-type X__id_t = uint32 /* types.h:157:24 */ // General type for IDs.
-type X__time_t = int64 /* types.h:158:26 */ // Seconds since the Epoch.
-type X__useconds_t = uint32 /* types.h:159:30 */ // Count of microseconds.
-type X__suseconds_t = int64 /* types.h:160:31 */ // Signed count of microseconds.
-
-type X__daddr_t = int32 /* types.h:162:27 */ // The type of a disk address.
-type X__key_t = int32 /* types.h:163:25 */ // Type of an IPC key.
+// bits/time64.h -- underlying types for __time64_t. Generic version.
+// Copyright (C) 2018-2020 Free Software Foundation, Inc.
+// This file is part of the GNU C Library.
+//
+// The GNU C Library is free software; you can redistribute it and/or
+// modify it under the terms of the GNU Lesser General Public
+// License as published by the Free Software Foundation; either
+// version 2.1 of the License, or (at your option) any later version.
+//
+// The GNU C Library is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+// Lesser General Public License for more details.
+//
+// You should have received a copy of the GNU Lesser General Public
+// License along with the GNU C Library; if not, see
+// .
+
+// Define __TIME64_T_TYPE so that it is always a 64-bit type.
+
+// If we already have 64-bit time type then use it.
+
+type X__dev_t = uint64 /* types.h:145:25 */ // Type of device numbers.
+type X__uid_t = uint32 /* types.h:146:25 */ // Type of user identifications.
+type X__gid_t = uint32 /* types.h:147:25 */ // Type of group identifications.
+type X__ino_t = uint64 /* types.h:148:25 */ // Type of file serial numbers.
+type X__ino64_t = uint64 /* types.h:149:27 */ // Type of file serial numbers (LFS).
+type X__mode_t = uint32 /* types.h:150:26 */ // Type of file attribute bitmasks.
+type X__nlink_t = uint64 /* types.h:151:27 */ // Type of file link counts.
+type X__off_t = int64 /* types.h:152:25 */ // Type of file sizes and offsets.
+type X__off64_t = int64 /* types.h:153:27 */ // Type of file sizes and offsets (LFS).
+type X__pid_t = int32 /* types.h:154:25 */ // Type of process identifications.
+type X__fsid_t = struct{ F__val [2]int32 } /* types.h:155:26 */ // Type of file system IDs.
+type X__clock_t = int64 /* types.h:156:27 */ // Type of CPU usage counts.
+type X__rlim_t = uint64 /* types.h:157:26 */ // Type for resource measurement.
+type X__rlim64_t = uint64 /* types.h:158:28 */ // Type for resource measurement (LFS).
+type X__id_t = uint32 /* types.h:159:24 */ // General type for IDs.
+type X__time_t = int64 /* types.h:160:26 */ // Seconds since the Epoch.
+type X__useconds_t = uint32 /* types.h:161:30 */ // Count of microseconds.
+type X__suseconds_t = int64 /* types.h:162:31 */ // Signed count of microseconds.
+
+type X__daddr_t = int32 /* types.h:164:27 */ // The type of a disk address.
+type X__key_t = int32 /* types.h:165:25 */ // Type of an IPC key.
// Clock ID used in clock and timer functions.
-type X__clockid_t = int32 /* types.h:166:29 */
+type X__clockid_t = int32 /* types.h:168:29 */
// Timer ID returned by `timer_create'.
-type X__timer_t = uintptr /* types.h:169:12 */
+type X__timer_t = uintptr /* types.h:171:12 */
// Type to represent block size.
-type X__blksize_t = int64 /* types.h:172:29 */
+type X__blksize_t = int64 /* types.h:174:29 */
// Types from the Large File Support interface.
// Type to count number of disk blocks.
-type X__blkcnt_t = int64 /* types.h:177:28 */
-type X__blkcnt64_t = int64 /* types.h:178:30 */
+type X__blkcnt_t = int64 /* types.h:179:28 */
+type X__blkcnt64_t = int64 /* types.h:180:30 */
// Type to count file system blocks.
-type X__fsblkcnt_t = uint64 /* types.h:181:30 */
-type X__fsblkcnt64_t = uint64 /* types.h:182:32 */
+type X__fsblkcnt_t = uint64 /* types.h:183:30 */
+type X__fsblkcnt64_t = uint64 /* types.h:184:32 */
// Type to count file system nodes.
-type X__fsfilcnt_t = uint64 /* types.h:185:30 */
-type X__fsfilcnt64_t = uint64 /* types.h:186:32 */
+type X__fsfilcnt_t = uint64 /* types.h:187:30 */
+type X__fsfilcnt64_t = uint64 /* types.h:188:32 */
// Type of miscellaneous file system fields.
-type X__fsword_t = int64 /* types.h:189:28 */
+type X__fsword_t = int64 /* types.h:191:28 */
-type X__ssize_t = int64 /* types.h:191:27 */ // Type of a byte count, or error.
+type X__ssize_t = int64 /* types.h:193:27 */ // Type of a byte count, or error.
// Signed long type used in system calls.
-type X__syscall_slong_t = int64 /* types.h:194:33 */
+type X__syscall_slong_t = int64 /* types.h:196:33 */
// Unsigned long type used in system calls.
-type X__syscall_ulong_t = uint64 /* types.h:196:33 */
+type X__syscall_ulong_t = uint64 /* types.h:198:33 */
// These few don't really vary by system, they always correspond
// to one of the other defined types.
-type X__loff_t = X__off64_t /* types.h:200:19 */ // Type of file sizes and offsets (LFS).
-type X__caddr_t = uintptr /* types.h:201:14 */
+type X__loff_t = X__off64_t /* types.h:202:19 */ // Type of file sizes and offsets (LFS).
+type X__caddr_t = uintptr /* types.h:203:14 */
// Duplicates info from stdint.h but this is used in unistd.h.
-type X__intptr_t = int64 /* types.h:204:25 */
+type X__intptr_t = int64 /* types.h:206:25 */
// Duplicate info from sys/socket.h.
-type X__socklen_t = uint32 /* types.h:207:23 */
+type X__socklen_t = uint32 /* types.h:209:23 */
// C99: An integer type that can be accessed as an atomic entity,
// even in the presence of asynchronous interrupts.
// It is not currently necessary for this to be machine-specific.
-type X__sig_atomic_t = int32 /* types.h:212:13 */
+type X__sig_atomic_t = int32 /* types.h:214:13 */
+
+// Seconds since the Epoch, visible to user code when time_t is too
+// narrow only for consistency with the old way of widening too-narrow
+// types. User code should never use __time64_t.
// bits/types.h -- definitions of __*_t types underlying *_t types.
-// Copyright (C) 2002-2018 Free Software Foundation, Inc.
+// Copyright (C) 2002-2020 Free Software Foundation, Inc.
// This file is part of the GNU C Library.
//
// The GNU C Library is free software; you can redistribute it and/or
@@ -7648,7 +8222,7 @@ type X__sig_atomic_t = int32 /* types.h:212:13 */
//
// You should have received a copy of the GNU Lesser General Public
// License along with the GNU C Library; if not, see
-// .
+// .
// Never include this file directly; use instead.
@@ -7677,7 +8251,7 @@ type _G_fpos_t = struct {
type X__fpos_t = _G_fpos_t /* __fpos_t.h:14:3 */
// bits/types.h -- definitions of __*_t types underlying *_t types.
-// Copyright (C) 2002-2018 Free Software Foundation, Inc.
+// Copyright (C) 2002-2020 Free Software Foundation, Inc.
// This file is part of the GNU C Library.
//
// The GNU C Library is free software; you can redistribute it and/or
@@ -7692,7 +8266,7 @@ type X__fpos_t = _G_fpos_t /* __fpos_t.h:14:3 */
//
// You should have received a copy of the GNU Lesser General Public
// License along with the GNU C Library; if not, see
-// .
+// .
// Never include this file directly; use instead.
@@ -7705,7 +8279,7 @@ type _G_fpos64_t = struct {
} /* __fpos64_t.h:10:9 */
// bits/types.h -- definitions of __*_t types underlying *_t types.
-// Copyright (C) 2002-2018 Free Software Foundation, Inc.
+// Copyright (C) 2002-2020 Free Software Foundation, Inc.
// This file is part of the GNU C Library.
//
// The GNU C Library is free software; you can redistribute it and/or
@@ -7720,7 +8294,7 @@ type _G_fpos64_t = struct {
//
// You should have received a copy of the GNU Lesser General Public
// License along with the GNU C Library; if not, see
-// .
+// .
// Never include this file directly; use instead.
@@ -7731,7 +8305,7 @@ type X__fpos64_t = _G_fpos64_t /* __fpos64_t.h:14:3 */
type _IO_FILE = struct {
F_flags int32
- _ [4]byte
+ F__ccgo_pad1 [4]byte
F_IO_read_ptr uintptr
F_IO_read_end uintptr
F_IO_read_base uintptr
@@ -7750,8 +8324,8 @@ type _IO_FILE = struct {
F_old_offset X__off_t
F_cur_column uint16
F_vtable_offset int8
- F_shortbuf [1]int8
- _ [4]byte
+ F_shortbuf [1]uint8
+ F__ccgo_pad2 [4]byte
F_lock uintptr
F_offset X__off64_t
F_codecvt uintptr
@@ -7760,7 +8334,7 @@ type _IO_FILE = struct {
F_freeres_buf uintptr
F__pad5 Size_t
F_mode int32
- F_unused2 [20]int8
+ F_unused2 [20]uint8
} /* __FILE.h:4:1 */
type X__FILE = _IO_FILE /* __FILE.h:5:25 */
@@ -7796,16 +8370,11 @@ type Ssize_t = X__ssize_t /* stdio.h:77:19 */
type Fpos_t = X__fpos64_t /* stdio.h:86:20 */
type Fpos64_t = X__fpos64_t /* stdio.h:89:20 */
-// In 4.3bsd-net2, leave these undefined to indicate that size_t, etc.
-// are already defined.
-// BSD/OS 3.1 and FreeBSD [23].x require the MACHINE_ANSI_H check here.
-// NetBSD 5 requires the I386_ANSI_H and X86_64_ANSI_H checks here.
-
// A null pointer constant.
// XPG requires a few symbols from being defined.
// Definitions of flag bits for `waitpid' et al.
-// Copyright (C) 1992-2018 Free Software Foundation, Inc.
+// Copyright (C) 1992-2020 Free Software Foundation, Inc.
// This file is part of the GNU C Library.
//
// The GNU C Library is free software; you can redistribute it and/or
@@ -7820,7 +8389,7 @@ type Fpos64_t = X__fpos64_t /* stdio.h:89:20 */
//
// You should have received a copy of the GNU Lesser General Public
// License along with the GNU C Library; if not, see
-// .
+// .
// Bits in the third argument to `waitpid'.
@@ -7833,7 +8402,7 @@ type Fpos64_t = X__fpos64_t /* stdio.h:89:20 */
type Idtype_t = uint32 /* waitflags.h:57:3 */
// Definitions of status bits for `wait' et al.
-// Copyright (C) 1992-2018 Free Software Foundation, Inc.
+// Copyright (C) 1992-2020 Free Software Foundation, Inc.
// This file is part of the GNU C Library.
//
// The GNU C Library is free software; you can redistribute it and/or
@@ -7848,7 +8417,7 @@ type Idtype_t = uint32 /* waitflags.h:57:3 */
//
// You should have received a copy of the GNU Lesser General Public
// License along with the GNU C Library; if not, see
-// .
+// .
// Everything extant so far uses these same bits.
@@ -7875,7 +8444,7 @@ type Idtype_t = uint32 /* waitflags.h:57:3 */
// _FloatN API tests for enablement.
// Macros to control TS 18661-3 glibc features on ldbl-128 platforms.
-// Copyright (C) 2017-2018 Free Software Foundation, Inc.
+// Copyright (C) 2017-2020 Free Software Foundation, Inc.
// This file is part of the GNU C Library.
//
// The GNU C Library is free software; you can redistribute it and/or
@@ -7890,9 +8459,9 @@ type Idtype_t = uint32 /* waitflags.h:57:3 */
//
// You should have received a copy of the GNU Lesser General Public
// License along with the GNU C Library; if not, see
-// .
+// .
-// Copyright (C) 1991-2018 Free Software Foundation, Inc.
+// Copyright (C) 1991-2020 Free Software Foundation, Inc.
// This file is part of the GNU C Library.
//
// The GNU C Library is free software; you can redistribute it and/or
@@ -7907,10 +8476,10 @@ type Idtype_t = uint32 /* waitflags.h:57:3 */
//
// You should have received a copy of the GNU Lesser General Public
// License along with the GNU C Library; if not, see
-// .
+// .
// Properties of long double type. ldbl-opt version.
-// Copyright (C) 2016-2018 Free Software Foundation, Inc.
+// Copyright (C) 2016-2020 Free Software Foundation, Inc.
// This file is part of the GNU C Library.
//
// The GNU C Library is free software; you can redistribute it and/or
@@ -7925,7 +8494,7 @@ type Idtype_t = uint32 /* waitflags.h:57:3 */
//
// You should have received a copy of the GNU Lesser General Public
// License along with the GNU C Library; if not, see
-// .
+// .
// Defined to 1 if the current compiler invocation provides a
// floating-point type with the IEEE 754 binary128 format, and this
@@ -7956,7 +8525,7 @@ type Idtype_t = uint32 /* waitflags.h:57:3 */
// Macros to control TS 18661-3 glibc features where the same
// definitions are appropriate for all platforms.
-// Copyright (C) 2017-2018 Free Software Foundation, Inc.
+// Copyright (C) 2017-2020 Free Software Foundation, Inc.
// This file is part of the GNU C Library.
//
// The GNU C Library is free software; you can redistribute it and/or
@@ -7971,9 +8540,9 @@ type Idtype_t = uint32 /* waitflags.h:57:3 */
//
// You should have received a copy of the GNU Lesser General Public
// License along with the GNU C Library; if not, see
-// .
+// .
-// Copyright (C) 1991-2018 Free Software Foundation, Inc.
+// Copyright (C) 1991-2020 Free Software Foundation, Inc.
// This file is part of the GNU C Library.
//
// The GNU C Library is free software; you can redistribute it and/or
@@ -7988,10 +8557,10 @@ type Idtype_t = uint32 /* waitflags.h:57:3 */
//
// You should have received a copy of the GNU Lesser General Public
// License along with the GNU C Library; if not, see
-// .
+// .
// Properties of long double type. ldbl-opt version.
-// Copyright (C) 2016-2018 Free Software Foundation, Inc.
+// Copyright (C) 2016-2020 Free Software Foundation, Inc.
// This file is part of the GNU C Library.
//
// The GNU C Library is free software; you can redistribute it and/or
@@ -8006,7 +8575,7 @@ type Idtype_t = uint32 /* waitflags.h:57:3 */
//
// You should have received a copy of the GNU Lesser General Public
// License along with the GNU C Library; if not, see
-// .
+// .
// This header should be included at the bottom of each bits/floatn.h.
// It defines the following macros for each _FloatN and _FloatNx type,
@@ -8076,7 +8645,7 @@ type Lldiv_t = struct {
// use as an additional parameter. These are GNU extensions inspired
// by the POSIX.1-2008 extended locale API.
// Definition of locale_t.
-// Copyright (C) 2017-2018 Free Software Foundation, Inc.
+// Copyright (C) 2017-2020 Free Software Foundation, Inc.
// This file is part of the GNU C Library.
//
// The GNU C Library is free software; you can redistribute it and/or
@@ -8091,10 +8660,10 @@ type Lldiv_t = struct {
//
// You should have received a copy of the GNU Lesser General Public
// License along with the GNU C Library; if not, see
-// .
+// .
// Definition of struct __locale_struct and __locale_t.
-// Copyright (C) 1997-2018 Free Software Foundation, Inc.
+// Copyright (C) 1997-2020 Free Software Foundation, Inc.
// This file is part of the GNU C Library.
// Contributed by Ulrich Drepper , 1997.
//
@@ -8110,7 +8679,7 @@ type Lldiv_t = struct {
//
// You should have received a copy of the GNU Lesser General Public
// License along with the GNU C Library; if not, see
-// .
+// .
// POSIX.1-2008: the locale_t type, representing a locale context
// (implementation-namespace version). This type should be treated
@@ -8129,7 +8698,7 @@ type X__locale_t = uintptr /* __locale_t.h:42:32 */
type Locale_t = X__locale_t /* locale_t.h:24:20 */
-// Copyright (C) 1991-2018 Free Software Foundation, Inc.
+// Copyright (C) 1991-2020 Free Software Foundation, Inc.
// This file is part of the GNU C Library.
//
// The GNU C Library is free software; you can redistribute it and/or
@@ -8144,11 +8713,11 @@ type Locale_t = X__locale_t /* locale_t.h:24:20 */
//
// You should have received a copy of the GNU Lesser General Public
// License along with the GNU C Library; if not, see
-// .
+// .
// POSIX Standard: 2.6 Primitive System Data Types
-// Copyright (C) 1991-2018 Free Software Foundation, Inc.
+// Copyright (C) 1991-2020 Free Software Foundation, Inc.
// This file is part of the GNU C Library.
//
// The GNU C Library is free software; you can redistribute it and/or
@@ -8163,10 +8732,10 @@ type Locale_t = X__locale_t /* locale_t.h:24:20 */
//
// You should have received a copy of the GNU Lesser General Public
// License along with the GNU C Library; if not, see
-// .
+// .
// bits/types.h -- definitions of __*_t types underlying *_t types.
-// Copyright (C) 2002-2018 Free Software Foundation, Inc.
+// Copyright (C) 2002-2020 Free Software Foundation, Inc.
// This file is part of the GNU C Library.
//
// The GNU C Library is free software; you can redistribute it and/or
@@ -8181,7 +8750,7 @@ type Locale_t = X__locale_t /* locale_t.h:24:20 */
//
// You should have received a copy of the GNU Lesser General Public
// License along with the GNU C Library; if not, see
-// .
+// .
// Never include this file directly; use instead.
@@ -8217,7 +8786,7 @@ type Caddr_t = X__caddr_t /* types.h:115:19 */
type Key_t = X__key_t /* types.h:121:17 */
// bits/types.h -- definitions of __*_t types underlying *_t types.
-// Copyright (C) 2002-2018 Free Software Foundation, Inc.
+// Copyright (C) 2002-2020 Free Software Foundation, Inc.
// This file is part of the GNU C Library.
//
// The GNU C Library is free software; you can redistribute it and/or
@@ -8232,7 +8801,7 @@ type Key_t = X__key_t /* types.h:121:17 */
//
// You should have received a copy of the GNU Lesser General Public
// License along with the GNU C Library; if not, see
-// .
+// .
// Never include this file directly; use instead.
@@ -8240,7 +8809,7 @@ type Key_t = X__key_t /* types.h:121:17 */
type Clock_t = X__clock_t /* clock_t.h:7:19 */
// bits/types.h -- definitions of __*_t types underlying *_t types.
-// Copyright (C) 2002-2018 Free Software Foundation, Inc.
+// Copyright (C) 2002-2020 Free Software Foundation, Inc.
// This file is part of the GNU C Library.
//
// The GNU C Library is free software; you can redistribute it and/or
@@ -8255,7 +8824,7 @@ type Clock_t = X__clock_t /* clock_t.h:7:19 */
//
// You should have received a copy of the GNU Lesser General Public
// License along with the GNU C Library; if not, see
-// .
+// .
// Never include this file directly; use instead.
@@ -8263,7 +8832,7 @@ type Clock_t = X__clock_t /* clock_t.h:7:19 */
type Clockid_t = X__clockid_t /* clockid_t.h:7:21 */
// bits/types.h -- definitions of __*_t types underlying *_t types.
-// Copyright (C) 2002-2018 Free Software Foundation, Inc.
+// Copyright (C) 2002-2020 Free Software Foundation, Inc.
// This file is part of the GNU C Library.
//
// The GNU C Library is free software; you can redistribute it and/or
@@ -8278,7 +8847,7 @@ type Clockid_t = X__clockid_t /* clockid_t.h:7:21 */
//
// You should have received a copy of the GNU Lesser General Public
// License along with the GNU C Library; if not, see
-// .
+// .
// Never include this file directly; use instead.
@@ -8286,7 +8855,7 @@ type Clockid_t = X__clockid_t /* clockid_t.h:7:21 */
type Time_t = X__time_t /* time_t.h:7:18 */
// bits/types.h -- definitions of __*_t types underlying *_t types.
-// Copyright (C) 2002-2018 Free Software Foundation, Inc.
+// Copyright (C) 2002-2020 Free Software Foundation, Inc.
// This file is part of the GNU C Library.
//
// The GNU C Library is free software; you can redistribute it and/or
@@ -8301,7 +8870,7 @@ type Time_t = X__time_t /* time_t.h:7:18 */
//
// You should have received a copy of the GNU Lesser General Public
// License along with the GNU C Library; if not, see
-// .
+// .
// Never include this file directly; use instead.
@@ -8311,7 +8880,7 @@ type Timer_t = X__timer_t /* timer_t.h:7:19 */
type Useconds_t = X__useconds_t /* types.h:134:22 */
type Suseconds_t = X__suseconds_t /* types.h:138:23 */
-// Copyright (C) 1989-2018 Free Software Foundation, Inc.
+// Copyright (C) 1989-2019 Free Software Foundation, Inc.
//
// This file is part of GCC.
//
@@ -8343,15 +8912,6 @@ type Suseconds_t = X__suseconds_t /* types.h:138:23 */
// This avoids lossage on SunOS but only if stdtypes.h comes first.
// There's no way to win with the other order! Sun lossage.
-// On 4.3bsd-net2, make sure ansi.h is included, so we have
-// one less case to deal with in the following.
-// On FreeBSD 5, machine/ansi.h does not exist anymore...
-
-// In 4.3bsd-net2, machine/ansi.h defines these symbols, which are
-// defined if the corresponding type is *not* defined.
-// FreeBSD-2.1 defines _MACHINE_ANSI_H_ instead of _ANSI_H_.
-// NetBSD defines _I386_ANSI_H_ and _X86_64_ANSI_H_ instead of _ANSI_H_
-
// Sequent's header files use _PTRDIFF_T_ in some conflicting way.
// Just ignore it.
@@ -8386,11 +8946,6 @@ type Suseconds_t = X__suseconds_t /* types.h:138:23 */
// Define this type if we are doing the whole job,
// or if we want this type in particular.
-// In 4.3bsd-net2, leave these undefined to indicate that size_t, etc.
-// are already defined.
-// BSD/OS 3.1 and FreeBSD [23].x require the MACHINE_ANSI_H check here.
-// NetBSD 5 requires the I386_ANSI_H and X86_64_ANSI_H checks here.
-
// A null pointer constant.
// Old compatibility names for C types.
@@ -8401,7 +8956,7 @@ type Uint = uint32 /* types.h:150:22 */
// These size-specific names are used by some of the inet code.
// Define intN_t types.
-// Copyright (C) 2017-2018 Free Software Foundation, Inc.
+// Copyright (C) 2017-2020 Free Software Foundation, Inc.
// This file is part of the GNU C Library.
//
// The GNU C Library is free software; you can redistribute it and/or
@@ -8416,10 +8971,10 @@ type Uint = uint32 /* types.h:150:22 */
//
// You should have received a copy of the GNU Lesser General Public
// License along with the GNU C Library; if not, see
-// .
+// .
// bits/types.h -- definitions of __*_t types underlying *_t types.
-// Copyright (C) 2002-2018 Free Software Foundation, Inc.
+// Copyright (C) 2002-2020 Free Software Foundation, Inc.
// This file is part of the GNU C Library.
//
// The GNU C Library is free software; you can redistribute it and/or
@@ -8434,7 +8989,7 @@ type Uint = uint32 /* types.h:150:22 */
//
// You should have received a copy of the GNU Lesser General Public
// License along with the GNU C Library; if not, see
-// .
+// .
// Never include this file directly; use instead.
@@ -8443,18 +8998,17 @@ type Int16_t = X__int16_t /* stdint-intn.h:25:19 */
type Int32_t = X__int32_t /* stdint-intn.h:26:19 */
type Int64_t = X__int64_t /* stdint-intn.h:27:19 */
-// For GCC 2.7 and later, we can use specific type-size attributes.
-
-type U_int8_t = uint32 /* types.h:177:1 */
-type U_int16_t = uint32 /* types.h:178:1 */
-type U_int32_t = uint32 /* types.h:179:1 */
-type U_int64_t = uint32 /* types.h:180:1 */
+// These were defined by ISO C without the first `_'.
+type U_int8_t = X__uint8_t /* types.h:158:19 */
+type U_int16_t = X__uint16_t /* types.h:159:20 */
+type U_int32_t = X__uint32_t /* types.h:160:20 */
+type U_int64_t = X__uint64_t /* types.h:161:20 */
-type Register_t = int32 /* types.h:182:13 */
+type Register_t = int32 /* types.h:164:13 */
// It also defines `fd_set' and the FD_* macros for `select'.
// `fd_set' type and related macros, and `select'/`pselect' declarations.
-// Copyright (C) 1996-2018 Free Software Foundation, Inc.
+// Copyright (C) 1996-2020 Free Software Foundation, Inc.
// This file is part of the GNU C Library.
//
// The GNU C Library is free software; you can redistribute it and/or
@@ -8469,11 +9023,11 @@ type Register_t = int32 /* types.h:182:13 */
//
// You should have received a copy of the GNU Lesser General Public
// License along with the GNU C Library; if not, see
-// .
+// .
// POSIX 1003.1g: 6.2 Select from File Descriptor Sets
-// Copyright (C) 1991-2018 Free Software Foundation, Inc.
+// Copyright (C) 1991-2020 Free Software Foundation, Inc.
// This file is part of the GNU C Library.
//
// The GNU C Library is free software; you can redistribute it and/or
@@ -8488,11 +9042,11 @@ type Register_t = int32 /* types.h:182:13 */
//
// You should have received a copy of the GNU Lesser General Public
// License along with the GNU C Library; if not, see
-// .
+// .
// Get definition of needed basic types.
// bits/types.h -- definitions of __*_t types underlying *_t types.
-// Copyright (C) 2002-2018 Free Software Foundation, Inc.
+// Copyright (C) 2002-2020 Free Software Foundation, Inc.
// This file is part of the GNU C Library.
//
// The GNU C Library is free software; you can redistribute it and/or
@@ -8507,12 +9061,12 @@ type Register_t = int32 /* types.h:182:13 */
//
// You should have received a copy of the GNU Lesser General Public
// License along with the GNU C Library; if not, see
-// .
+// .
// Never include this file directly; use instead.
// Get __FD_* definitions.
-// Copyright (C) 1997-2018 Free Software Foundation, Inc.
+// Copyright (C) 1997-2020 Free Software Foundation, Inc.
// This file is part of the GNU C Library.
//
// The GNU C Library is free software; you can redistribute it and/or
@@ -8527,7 +9081,7 @@ type Register_t = int32 /* types.h:182:13 */
//
// You should have received a copy of the GNU Lesser General Public
// License along with the GNU C Library; if not, see
-// .
+// .
// We don't use `memset' because this would require a prototype and
// the array isn't too big.
@@ -8542,7 +9096,7 @@ type Sigset_t = X__sigset_t /* sigset_t.h:7:20 */
// Get definition of timer specification structures.
// bits/types.h -- definitions of __*_t types underlying *_t types.
-// Copyright (C) 2002-2018 Free Software Foundation, Inc.
+// Copyright (C) 2002-2020 Free Software Foundation, Inc.
// This file is part of the GNU C Library.
//
// The GNU C Library is free software; you can redistribute it and/or
@@ -8557,7 +9111,7 @@ type Sigset_t = X__sigset_t /* sigset_t.h:7:20 */
//
// You should have received a copy of the GNU Lesser General Public
// License along with the GNU C Library; if not, see
-// .
+// .
// Never include this file directly; use instead.
@@ -8571,7 +9125,7 @@ type timeval = struct {
// NB: Include guard matches what uses.
// bits/types.h -- definitions of __*_t types underlying *_t types.
-// Copyright (C) 2002-2018 Free Software Foundation, Inc.
+// Copyright (C) 2002-2020 Free Software Foundation, Inc.
// This file is part of the GNU C Library.
//
// The GNU C Library is free software; you can redistribute it and/or
@@ -8586,16 +9140,34 @@ type timeval = struct {
//
// You should have received a copy of the GNU Lesser General Public
// License along with the GNU C Library; if not, see
-// .
+// .
// Never include this file directly; use instead.
+// Endian macros for string.h functions
+// Copyright (C) 1992-2020 Free Software Foundation, Inc.
+// This file is part of the GNU C Library.
+//
+// The GNU C Library is free software; you can redistribute it and/or
+// modify it under the terms of the GNU Lesser General Public
+// License as published by the Free Software Foundation; either
+// version 2.1 of the License, or (at your option) any later version.
+//
+// The GNU C Library is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+// Lesser General Public License for more details.
+//
+// You should have received a copy of the GNU Lesser General Public
+// License along with the GNU C Library; if not, see
+// .
+
// POSIX.1b structure for a time value. This is like a `struct timeval' but
// has nanoseconds instead of microseconds.
type timespec = struct {
Ftv_sec X__time_t
Ftv_nsec X__syscall_slong_t
-} /* struct_timespec.h:9:1 */
+} /* struct_timespec.h:10:1 */
// The fd_set member is required to be an array of longs.
type X__fd_mask = int64 /* select.h:49:18 */
@@ -8613,20 +9185,20 @@ type Fd_mask = X__fd_mask /* select.h:77:19 */
// Define some inlines helping to catch common problems.
-type Blksize_t = X__blksize_t /* types.h:202:21 */
+type Blksize_t = X__blksize_t /* types.h:185:21 */
// Types from the Large File Support interface.
-type Blkcnt_t = X__blkcnt64_t /* types.h:222:22 */ // Type to count number of disk blocks.
-type Fsblkcnt_t = X__fsblkcnt64_t /* types.h:226:24 */ // Type to count file system blocks.
-type Fsfilcnt_t = X__fsfilcnt64_t /* types.h:230:24 */ // Type to count file system inodes.
+type Blkcnt_t = X__blkcnt64_t /* types.h:205:22 */ // Type to count number of disk blocks.
+type Fsblkcnt_t = X__fsblkcnt64_t /* types.h:209:24 */ // Type to count file system blocks.
+type Fsfilcnt_t = X__fsfilcnt64_t /* types.h:213:24 */ // Type to count file system inodes.
-type Blkcnt64_t = X__blkcnt64_t /* types.h:236:22 */ // Type to count number of disk blocks.
-type Fsblkcnt64_t = X__fsblkcnt64_t /* types.h:237:24 */ // Type to count file system blocks.
-type Fsfilcnt64_t = X__fsfilcnt64_t /* types.h:238:24 */ // Type to count file system inodes.
+type Blkcnt64_t = X__blkcnt64_t /* types.h:219:22 */ // Type to count number of disk blocks.
+type Fsblkcnt64_t = X__fsblkcnt64_t /* types.h:220:24 */ // Type to count file system blocks.
+type Fsfilcnt64_t = X__fsfilcnt64_t /* types.h:221:24 */ // Type to count file system inodes.
// Now add the thread types.
// Declaration of common pthread types for all architectures.
-// Copyright (C) 2017-2018 Free Software Foundation, Inc.
+// Copyright (C) 2017-2020 Free Software Foundation, Inc.
// This file is part of the GNU C Library.
//
// The GNU C Library is free software; you can redistribute it and/or
@@ -8641,11 +9213,11 @@ type Fsfilcnt64_t = X__fsfilcnt64_t /* types.h:238:24 */ // Type to count file s
//
// You should have received a copy of the GNU Lesser General Public
// License along with the GNU C Library; if not, see
-// .
+// .
// For internal mutex and condition variable definitions.
// Common threading primitives definitions for both POSIX and C11.
-// Copyright (C) 2017-2018 Free Software Foundation, Inc.
+// Copyright (C) 2017-2020 Free Software Foundation, Inc.
// This file is part of the GNU C Library.
//
// The GNU C Library is free software; you can redistribute it and/or
@@ -8660,7 +9232,7 @@ type Fsfilcnt64_t = X__fsfilcnt64_t /* types.h:238:24 */ // Type to count file s
//
// You should have received a copy of the GNU Lesser General Public
// License along with the GNU C Library; if not, see
-// .
+// .
// Arch-specific definitions. Each architecture must define the following
// macros to define the expected sizes of pthread data types:
@@ -8675,36 +9247,6 @@ type Fsfilcnt64_t = X__fsfilcnt64_t /* types.h:238:24 */ // Type to count file s
// __SIZEOF_PTHREAD_BARRIER_T - size of pthread_barrier_t.
// __SIZEOF_PTHREAD_BARRIERATTR_T - size of pthread_barrierattr_t.
//
-// Also, the following macros must be define for internal pthread_mutex_t
-// struct definitions (struct __pthread_mutex_s):
-//
-// __PTHREAD_COMPAT_PADDING_MID - any additional members after 'kind'
-// and before '__spin' (for 64 bits) or
-// '__nusers' (for 32 bits).
-// __PTHREAD_COMPAT_PADDING_END - any additional members at the end of
-// the internal structure.
-// __PTHREAD_MUTEX_LOCK_ELISION - 1 if the architecture supports lock
-// elision or 0 otherwise.
-// __PTHREAD_MUTEX_NUSERS_AFTER_KIND - control where to put __nusers. The
-// preferred value for new architectures
-// is 0.
-// __PTHREAD_MUTEX_USE_UNION - control whether internal __spins and
-// __list will be place inside a union for
-// linuxthreads compatibility.
-// The preferred value for new architectures
-// is 0.
-//
-// For a new port the preferred values for the required defines are:
-//
-// #define __PTHREAD_COMPAT_PADDING_MID
-// #define __PTHREAD_COMPAT_PADDING_END
-// #define __PTHREAD_MUTEX_LOCK_ELISION 0
-// #define __PTHREAD_MUTEX_NUSERS_AFTER_KIND 0
-// #define __PTHREAD_MUTEX_USE_UNION 0
-//
-// __PTHREAD_MUTEX_LOCK_ELISION can be set to 1 if the hardware plans to
-// eventually support lock elision using transactional memory.
-//
// The additional macro defines any constraint for the lock alignment
// inside the thread structures:
//
@@ -8713,11 +9255,10 @@ type Fsfilcnt64_t = X__fsfilcnt64_t /* types.h:238:24 */ // Type to count file s
// Same idea but for the once locking primitive:
//
// __ONCE_ALIGNMENT - for pthread_once_t/once_flag definition.
+
+// Machine-specific pthread type layouts. Generic version.
+// Copyright (C) 2019-2020 Free Software Foundation, Inc.
//
-// And finally the internal pthread_rwlock_t (struct __pthread_rwlock_arch_t)
-// must be defined.
-//
-// Copyright (C) 2003-2018 Free Software Foundation, Inc.
// This file is part of the GNU C Library.
//
// The GNU C Library is free software; you can redistribute it and/or
@@ -8736,35 +9277,135 @@ type Fsfilcnt64_t = X__fsfilcnt64_t /* types.h:238:24 */ // Type to count file s
// Determine the wordsize from the preprocessor defines.
-// Definitions for internal mutex struct.
-
-type __pthread_rwlock_arch_t = struct {
- F__readers uint32
- F__writers uint32
- F__wrphase_futex uint32
- F__writers_futex uint32
- F__pad3 uint32
- F__pad4 uint32
- F__cur_writer int32
- F__shared int32
- F__pad1 uint64
- F__pad2 uint64
- F__flags uint32
- _ [4]byte
-} /* pthreadtypes-arch.h:50:1 */
-
// Common definition of pthread_mutex_t.
type __pthread_internal_list = struct {
F__prev uintptr
F__next uintptr
-} /* thread-shared-types.h:82:9 */
+} /* thread-shared-types.h:49:9 */
+
+// Type to count file system inodes.
+
+// Now add the thread types.
+// Declaration of common pthread types for all architectures.
+// Copyright (C) 2017-2020 Free Software Foundation, Inc.
+// This file is part of the GNU C Library.
+//
+// The GNU C Library is free software; you can redistribute it and/or
+// modify it under the terms of the GNU Lesser General Public
+// License as published by the Free Software Foundation; either
+// version 2.1 of the License, or (at your option) any later version.
+//
+// The GNU C Library is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+// Lesser General Public License for more details.
+//
+// You should have received a copy of the GNU Lesser General Public
+// License along with the GNU C Library; if not, see
+// .
+
+// For internal mutex and condition variable definitions.
+// Common threading primitives definitions for both POSIX and C11.
+// Copyright (C) 2017-2020 Free Software Foundation, Inc.
+// This file is part of the GNU C Library.
+//
+// The GNU C Library is free software; you can redistribute it and/or
+// modify it under the terms of the GNU Lesser General Public
+// License as published by the Free Software Foundation; either
+// version 2.1 of the License, or (at your option) any later version.
+//
+// The GNU C Library is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+// Lesser General Public License for more details.
+//
+// You should have received a copy of the GNU Lesser General Public
+// License along with the GNU C Library; if not, see
+// .
+
+// Arch-specific definitions. Each architecture must define the following
+// macros to define the expected sizes of pthread data types:
+//
+// __SIZEOF_PTHREAD_ATTR_T - size of pthread_attr_t.
+// __SIZEOF_PTHREAD_MUTEX_T - size of pthread_mutex_t.
+// __SIZEOF_PTHREAD_MUTEXATTR_T - size of pthread_mutexattr_t.
+// __SIZEOF_PTHREAD_COND_T - size of pthread_cond_t.
+// __SIZEOF_PTHREAD_CONDATTR_T - size of pthread_condattr_t.
+// __SIZEOF_PTHREAD_RWLOCK_T - size of pthread_rwlock_t.
+// __SIZEOF_PTHREAD_RWLOCKATTR_T - size of pthread_rwlockattr_t.
+// __SIZEOF_PTHREAD_BARRIER_T - size of pthread_barrier_t.
+// __SIZEOF_PTHREAD_BARRIERATTR_T - size of pthread_barrierattr_t.
+//
+// The additional macro defines any constraint for the lock alignment
+// inside the thread structures:
+//
+// __LOCK_ALIGNMENT - for internal lock/futex usage.
+//
+// Same idea but for the once locking primitive:
+//
+// __ONCE_ALIGNMENT - for pthread_once_t/once_flag definition.
+
+// Machine-specific pthread type layouts. Generic version.
+// Copyright (C) 2019-2020 Free Software Foundation, Inc.
+//
+// This file is part of the GNU C Library.
+//
+// The GNU C Library is free software; you can redistribute it and/or
+// modify it under the terms of the GNU Lesser General Public
+// License as published by the Free Software Foundation; either
+// version 2.1 of the License, or (at your option) any later version.
+//
+// The GNU C Library is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+// Lesser General Public License for more details.
+//
+// You should have received a copy of the GNU Lesser General Public
+// License along with the GNU C Library; if not, see
+// .
+
+// Determine the wordsize from the preprocessor defines.
// Common definition of pthread_mutex_t.
-type X__pthread_list_t = __pthread_internal_list /* thread-shared-types.h:86:3 */
+type X__pthread_list_t = __pthread_internal_list /* thread-shared-types.h:53:3 */
-// Lock elision support.
+type __pthread_internal_slist = struct{ F__next uintptr } /* thread-shared-types.h:55:9 */
+
+type X__pthread_slist_t = __pthread_internal_slist /* thread-shared-types.h:58:3 */
+
+// Arch-specific mutex definitions. A generic implementation is provided
+// by sysdeps/nptl/bits/struct_mutex.h. If required, an architecture
+// can override it by defining:
+//
+// 1. struct __pthread_mutex_s (used on both pthread_mutex_t and mtx_t
+// definition). It should contains at least the internal members
+// defined in the generic version.
+//
+// 2. __LOCK_ALIGNMENT for any extra attribute for internal lock used with
+// atomic operations.
+//
+// 3. The macro __PTHREAD_MUTEX_INITIALIZER used for static initialization.
+// It should initialize the mutex internal flag.
+
+// S390 internal mutex struct definitions.
+// Copyright (C) 2019-2020 Free Software Foundation, Inc.
+// This file is part of the GNU C Library.
+//
+// The GNU C Library is free software; you can redistribute it and/or
+// modify it under the terms of the GNU Lesser General Public
+// License as published by the Free Software Foundation; either
+// version 2.1 of the License, or (at your option) any later version.
+//
+// The GNU C Library is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+// Lesser General Public License for more details.
+//
+// You should have received a copy of the GNU Lesser General Public
+// License along with the GNU C Library; if not, see
+// .
type __pthread_mutex_s = struct {
F__lock int32
@@ -8775,7 +9416,52 @@ type __pthread_mutex_s = struct {
F__spins int16
F__elision int16
F__list X__pthread_list_t
-} /* thread-shared-types.h:118:1 */
+} /* struct_mutex.h:22:1 */
+
+// Arch-sepecific read-write lock definitions. A generic implementation is
+// provided by struct_rwlock.h. If required, an architecture can override it
+// by defining:
+//
+// 1. struct __pthread_rwlock_arch_t (used on pthread_rwlock_t definition).
+// It should contain at least the internal members defined in the
+// generic version.
+//
+// 2. The macro __PTHREAD_RWLOCK_INITIALIZER used for static initialization.
+// It should initialize the rwlock internal type.
+
+// S390 internal rwlock struct definitions.
+// Copyright (C) 2019-2020 Free Software Foundation, Inc.
+//
+// This file is part of the GNU C Library.
+//
+// The GNU C Library is free software; you can redistribute it and/or
+// modify it under the terms of the GNU Lesser General Public
+// License as published by the Free Software Foundation; either
+// version 2.1 of the License, or (at your option) any later version.
+//
+// The GNU C Library is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+// Lesser General Public License for more details.
+//
+// You should have received a copy of the GNU Lesser General Public
+// License along with the GNU C Library; if not, see
+// .
+
+type __pthread_rwlock_arch_t = struct {
+ F__readers uint32
+ F__writers uint32
+ F__wrphase_futex uint32
+ F__writers_futex uint32
+ F__pad3 uint32
+ F__pad4 uint32
+ F__cur_writer int32
+ F__shared int32
+ F__pad1 uint64
+ F__pad2 uint64
+ F__flags uint32
+ F__ccgo_pad1 [4]byte
+} /* struct_rwlock.h:23:1 */
// Common definition of pthread_cond_t.
@@ -8787,7 +9473,7 @@ type __pthread_cond_s = struct {
F__g1_orig_size uint32
F__wrefs uint32
F__g_signals [2]uint32
-} /* thread-shared-types.h:171:1 */
+} /* thread-shared-types.h:92:1 */
// Thread identifiers. The structure of the attribute type is not
// exposed on purpose.
@@ -8796,15 +9482,15 @@ type Pthread_t = uint64 /* pthreadtypes.h:27:27 */
// Data structures for mutex handling. The structure of the attribute
// type is not exposed on purpose.
type Pthread_mutexattr_t = struct {
- _ [0]uint32
- F__size [4]int8
+ F__ccgo_pad1 [0]uint32
+ F__size [4]uint8
} /* pthreadtypes.h:36:3 */
// Data structure for condition variable handling. The structure of
// the attribute type is not exposed on purpose.
type Pthread_condattr_t = struct {
- _ [0]uint32
- F__size [4]int8
+ F__ccgo_pad1 [0]uint32
+ F__size [4]uint8
} /* pthreadtypes.h:45:3 */
// Keys for thread-specific data
@@ -8814,8 +9500,8 @@ type Pthread_key_t = uint32 /* pthreadtypes.h:49:22 */
type Pthread_once_t = int32 /* pthreadtypes.h:53:30 */
type pthread_attr_t = struct {
- _ [0]uint64
- F__size [56]int8
+ F__ccgo_pad1 [0]uint64
+ F__size [56]uint8
} /* pthreadtypes.h:56:1 */
type Pthread_attr_t = pthread_attr_t /* pthreadtypes.h:62:30 */
@@ -8829,8 +9515,8 @@ type Pthread_cond_t = struct{ F__data __pthread_cond_s } /* pthreadtypes.h:80:3
type Pthread_rwlock_t = struct{ F__data __pthread_rwlock_arch_t } /* pthreadtypes.h:91:3 */
type Pthread_rwlockattr_t = struct {
- _ [0]uint64
- F__size [8]int8
+ F__ccgo_pad1 [0]uint64
+ F__size [8]uint8
} /* pthreadtypes.h:97:3 */
// POSIX spinlock data type.
@@ -8839,13 +9525,13 @@ type Pthread_spinlock_t = int32 /* pthreadtypes.h:103:22 */
// POSIX barriers data type. The structure of the type is
// deliberately not exposed.
type Pthread_barrier_t = struct {
- _ [0]uint64
- F__size [32]int8
+ F__ccgo_pad1 [0]uint64
+ F__size [32]uint8
} /* pthreadtypes.h:112:3 */
type Pthread_barrierattr_t = struct {
- _ [0]uint32
- F__size [4]int8
+ F__ccgo_pad1 [0]uint32
+ F__size [4]uint8
} /* pthreadtypes.h:118:3 */
// Reentrant versions of the `random' family of functions.
@@ -8853,14 +9539,14 @@ type Pthread_barrierattr_t = struct {
// state, rather than global state variables.
type random_data = struct {
- Ffptr uintptr
- Frptr uintptr
- Fstate uintptr
- Frand_type int32
- Frand_deg int32
- Frand_sep int32
- _ [4]byte
- Fend_ptr uintptr
+ Ffptr uintptr
+ Frptr uintptr
+ Fstate uintptr
+ Frand_type int32
+ Frand_deg int32
+ Frand_sep int32
+ F__ccgo_pad1 [4]byte
+ Fend_ptr uintptr
} /* stdlib.h:423:1 */
// Data structure for communication with thread safe versions. This
@@ -8875,10 +9561,10 @@ type drand48_data = struct {
} /* stdlib.h:490:1 */
// Shorthand for type of comparison functions.
-type X__compar_fn_t = uintptr /* stdlib.h:805:13 */
+type X__compar_fn_t = uintptr /* stdlib.h:808:13 */
-type Comparison_fn_t = X__compar_fn_t /* stdlib.h:808:23 */
-type X__compar_d_fn_t = uintptr /* stdlib.h:812:13 */
+type Comparison_fn_t = X__compar_fn_t /* stdlib.h:811:23 */
+type X__compar_d_fn_t = uintptr /* stdlib.h:815:13 */
// If this symbol has done its job, get rid of it.
@@ -8895,11 +9581,6 @@ type X__compar_d_fn_t = uintptr /* stdlib.h:812:13 */
// Define this type if we are doing the whole job,
// or if we want this type in particular.
-// In 4.3bsd-net2, leave these undefined to indicate that size_t, etc.
-// are already defined.
-// BSD/OS 3.1 and FreeBSD [23].x require the MACHINE_ANSI_H check here.
-// NetBSD 5 requires the I386_ANSI_H and X86_64_ANSI_H checks here.
-
// A null pointer constant.
// Offset of member MEMBER in a struct of type TYPE.
@@ -8910,7 +9591,7 @@ type X__compar_d_fn_t = uintptr /* stdlib.h:812:13 */
type Max_align_t = struct {
F__max_align_ll int64
F__max_align_ld float64
-} /* stddef.h:437:3 */
+} /* stddef.h:426:3 */
// Use a macro to replace memcpy() if compiled with SQLITE_INLINE_MEMCPY.
// This allows better measurements of where memcpy() is used when running
@@ -8969,13 +9650,13 @@ type Max_align_t = struct {
// types can be conveniently redefined at compile-type. Like this:
//
// cc '-DUINTPTR_TYPE=long long int' ...
-type I64 = Sqlite_int64 /* sqlite3.c:14433:22 */ // 8-byte signed integer
-type U64 = Sqlite_uint64 /* sqlite3.c:14434:23 */ // 8-byte unsigned integer
-type U32 = uint32 /* sqlite3.c:14435:21 */ // 4-byte unsigned integer
-type U16 = uint16 /* sqlite3.c:14436:21 */ // 2-byte unsigned integer
-type I16 = int16 /* sqlite3.c:14437:20 */ // 2-byte signed integer
-type U8 = uint8 /* sqlite3.c:14438:20 */ // 1-byte unsigned integer
-type I8 = int8 /* sqlite3.c:14439:19 */ // 1-byte signed integer
+type I64 = Sqlite_int64 /* sqlite3.c:14542:22 */ // 8-byte signed integer
+type U64 = Sqlite_uint64 /* sqlite3.c:14543:23 */ // 8-byte unsigned integer
+type U32 = uint32 /* sqlite3.c:14544:21 */ // 4-byte unsigned integer
+type U16 = uint16 /* sqlite3.c:14545:21 */ // 2-byte unsigned integer
+type I16 = int16 /* sqlite3.c:14546:20 */ // 2-byte signed integer
+type U8 = uint8 /* sqlite3.c:14547:20 */ // 1-byte unsigned integer
+type I8 = int8 /* sqlite3.c:14548:19 */ // 1-byte signed integer
// SQLITE_MAX_U32 is a u64 constant that is the maximum u64 value
// that can be stored in a u32 without loss of data. The value
@@ -8986,7 +9667,7 @@ type I8 = int8 /* sqlite3.c:14439:19 */ // 1-byte signed integer
// table or index. This is an unsigned integer type. For 99.9% of
// the world, a 32-bit integer is sufficient. But a 64-bit integer
// can be used at compile-time if desired.
-type TRowcnt = U32 /* sqlite3.c:14458:14 */ // 32-bit is the default
+type TRowcnt = U32 /* sqlite3.c:14567:14 */ // 32-bit is the default
// Estimated quantities used for query planning are stored as 16-bit
// logarithms. For quantity X, the value stored is 10*log2(X). This
@@ -9009,12 +9690,12 @@ type TRowcnt = U32 /* sqlite3.c:14458:14 */ // 32-bit is the default
// Examples:
//
// 0.5 -> -10 0.1 -> -33 0.0625 -> -40
-type LogEst = int16 /* sqlite3.c:14484:20 */
+type LogEst = int16 /* sqlite3.c:14593:20 */
// Set the SQLITE_PTRSIZE macro to the number of bytes in a pointer
// The uptr type is an unsigned integer large enough to hold a pointer
-type Uptr = U64 /* sqlite3.c:14508:15 */
+type Uptr = U64 /* sqlite3.c:14617:15 */
// The SQLITE_WITHIN(P,S,E) macro checks to see if pointer P points to
// something between S (inclusive) and E (exclusive).
@@ -9030,7 +9711,7 @@ type Uptr = U64 /* sqlite3.c:14508:15 */
// using C-preprocessor macros. If that is unsuccessful, or if
// -DSQLITE_BYTEORDER=0 is set, then byte-order is determined
// at run-time.
-var Xsqlite3one int32 = 1 /* sqlite3.c:14554:13 */
+var Xsqlite3one int32 = 1 /* sqlite3.c:14663:13 */
// An instance of the following structure is used to store the busy-handler
// callback for a given sqlite handle.
@@ -9043,8 +9724,8 @@ type BusyHandler1 = struct {
FxBusyHandler uintptr
FpBusyArg uintptr
FnBusy int32
- _ [4]byte
-} /* sqlite3.c:1312:9 */
+ F__ccgo_pad1 [4]byte
+} /* sqlite3.c:1331:9 */
// An instance of the following structure is used to store the busy-handler
// callback for a given sqlite handle.
@@ -9053,7 +9734,7 @@ type BusyHandler1 = struct {
// callback for the database handle. Each pager opened via the sqlite
// handle is passed a pointer to sqlite.busyHandler. The busy-handler
// callback is currently invoked only from within pager.c.
-type BusyHandler = BusyHandler1 /* sqlite3.c:14679:28 */
+type BusyHandler = BusyHandler1 /* sqlite3.c:14788:28 */
// Name of table that holds the database schema.
@@ -9105,7 +9786,7 @@ type BusyHandler = BusyHandler1 /* sqlite3.c:14679:28 */
type AggInfo1 = struct {
FdirectMode U8
FuseSortingIdx U8
- _ [2]byte
+ F__ccgo_pad1 [2]byte
FsortingIdx int32
FsortingIdxPTab int32
FnSortingColumn int32
@@ -9118,7 +9799,7 @@ type AggInfo1 = struct {
FaFunc uintptr
FnFunc int32
FselId U32
-} /* sqlite3.c:1312:9 */
+} /* sqlite3.c:1331:9 */
// Name of table that holds the database schema.
@@ -9167,100 +9848,100 @@ type AggInfo1 = struct {
// cases the parameters are named as per the usual conventions.
// Forward references to structures
-type AggInfo = AggInfo1 /* sqlite3.c:14775:24 */
+type AggInfo = AggInfo1 /* sqlite3.c:14884:24 */
type AuthContext1 = struct {
FzAuthContext uintptr
FpParse uintptr
-} /* sqlite3.c:14776:9 */
+} /* sqlite3.c:14885:9 */
-type AuthContext = AuthContext1 /* sqlite3.c:14776:28 */
+type AuthContext = AuthContext1 /* sqlite3.c:14885:28 */
type AutoincInfo1 = struct {
FpNext uintptr
FpTab uintptr
FiDb int32
FregCtr int32
-} /* sqlite3.c:1312:9 */
+} /* sqlite3.c:1331:9 */
-type AutoincInfo = AutoincInfo1 /* sqlite3.c:14777:28 */
+type AutoincInfo = AutoincInfo1 /* sqlite3.c:14886:28 */
type Bitvec1 = struct {
- FiSize U32
- FnSet U32
- FiDivisor U32
- _ [4]byte
- Fu struct {
- _ [0]uint64
- FaBitmap [496]U8
+ FiSize U32
+ FnSet U32
+ FiDivisor U32
+ F__ccgo_pad1 [4]byte
+ Fu struct {
+ F__ccgo_pad1 [0]uint64
+ FaBitmap [496]U8
}
-} /* sqlite3.c:1312:9 */
+} /* sqlite3.c:1331:9 */
-type Bitvec = Bitvec1 /* sqlite3.c:14778:23 */
+type Bitvec = Bitvec1 /* sqlite3.c:14887:23 */
type CollSeq1 = struct {
- FzName uintptr
- Fenc U8
- _ [7]byte
- FpUser uintptr
- FxCmp uintptr
- FxDel uintptr
-} /* sqlite3.c:1312:9 */
-
-type CollSeq = CollSeq1 /* sqlite3.c:14779:24 */
+ FzName uintptr
+ Fenc U8
+ F__ccgo_pad1 [7]byte
+ FpUser uintptr
+ FxCmp uintptr
+ FxDel uintptr
+} /* sqlite3.c:1331:9 */
+
+type CollSeq = CollSeq1 /* sqlite3.c:14888:24 */
type Column1 = struct {
- FzName uintptr
- FpDflt uintptr
- FzColl uintptr
- FnotNull U8
- Faffinity int8
- FszEst U8
- FhName U8
- FcolFlags U16
- _ [2]byte
-} /* sqlite3.c:1312:9 */
-
-type Column = Column1 /* sqlite3.c:14780:23 */
+ FzName uintptr
+ FpDflt uintptr
+ FzColl uintptr
+ FnotNull U8
+ Faffinity uint8
+ FszEst U8
+ FhName U8
+ FcolFlags U16
+ F__ccgo_pad1 [2]byte
+} /* sqlite3.c:1331:9 */
+
+type Column = Column1 /* sqlite3.c:14889:23 */
type Cte1 = struct {
- FzName uintptr
- FpCols uintptr
- FpSelect uintptr
- FzCteErr uintptr
- FpUse uintptr
- FeM10d U8
- _ [7]byte
-} /* sqlite3.c:1312:9 */
-
-type Cte = Cte1 /* sqlite3.c:14781:20 */
+ FzName uintptr
+ FpCols uintptr
+ FpSelect uintptr
+ FzCteErr uintptr
+ FpUse uintptr
+ FeM10d U8
+ F__ccgo_pad1 [7]byte
+} /* sqlite3.c:1331:9 */
+
+type Cte = Cte1 /* sqlite3.c:14890:20 */
type CteUse1 = struct {
- FnUse int32
- FaddrM9e int32
- FregRtn int32
- FiCur int32
- FnRowEst LogEst
- FeM10d U8
- _ [1]byte
-} /* sqlite3.c:1312:9 */
-
-type CteUse = CteUse1 /* sqlite3.c:14782:23 */
+ FnUse int32
+ FaddrM9e int32
+ FregRtn int32
+ FiCur int32
+ FnRowEst LogEst
+ FeM10d U8
+ F__ccgo_pad1 [1]byte
+} /* sqlite3.c:1331:9 */
+
+type CteUse = CteUse1 /* sqlite3.c:14891:23 */
type Db1 = struct {
FzDbSName uintptr
FpBt uintptr
Fsafety_level U8
FbSyncSet U8
- _ [6]byte
+ F__ccgo_pad1 [6]byte
FpSchema uintptr
-} /* sqlite3.c:1312:9 */
+} /* sqlite3.c:1331:9 */
-type Db = Db1 /* sqlite3.c:14783:19 */
+type Db = Db1 /* sqlite3.c:14892:19 */
type DbFixer1 = struct {
- FpParse uintptr
- Fw Walker
- FpSchema uintptr
- FbTemp U8
- _ [7]byte
- FzDb uintptr
- FzType uintptr
- FpName uintptr
-} /* sqlite3.c:14784:9 */
-
-type DbFixer = DbFixer1 /* sqlite3.c:14784:24 */
+ FpParse uintptr
+ Fw Walker
+ FpSchema uintptr
+ FbTemp U8
+ F__ccgo_pad1 [7]byte
+ FzDb uintptr
+ FzType uintptr
+ FpName uintptr
+} /* sqlite3.c:14893:9 */
+
+type DbFixer = DbFixer1 /* sqlite3.c:14893:24 */
type Schema1 = struct {
Fschema_cookie int32
FiGeneration int32
@@ -9273,14 +9954,14 @@ type Schema1 = struct {
Fenc U8
FschemaFlags U16
Fcache_size int32
-} /* sqlite3.c:1312:9 */
+} /* sqlite3.c:1331:9 */
-type Schema = Schema1 /* sqlite3.c:14785:23 */
+type Schema = Schema1 /* sqlite3.c:14894:23 */
type Expr1 = struct {
Fop U8
- FaffExpr int8
+ FaffExpr uint8
Fop2 U8
- _ [1]byte
+ F__ccgo_pad1 [1]byte
Fflags U32
Fu struct{ FzToken uintptr }
FpLeft uintptr
@@ -9293,83 +9974,83 @@ type Expr1 = struct {
FiRightJoinTable int32
FpAggInfo uintptr
Fy struct{ FpTab uintptr }
-} /* sqlite3.c:1312:9 */
+} /* sqlite3.c:1331:9 */
-type Expr = Expr1 /* sqlite3.c:14786:21 */
+type Expr = Expr1 /* sqlite3.c:14895:21 */
type ExprList1 = struct {
- FnExpr int32
- _ [4]byte
- Fa [1]struct {
- FpExpr uintptr
- FzEName uintptr
- FsortFlags U8
- _ [3]byte
- FeEName uint8 /* unsigned eEName: 2, unsigned done: 1, unsigned reusable: 1, unsigned bSorterRef: 1, unsigned bNulls: 1 */
- _ [3]byte
- Fu struct {
- _ [0]uint32
- Fx struct {
+ FnExpr int32
+ FnAlloc int32
+ Fa [1]struct {
+ FpExpr uintptr
+ FzEName uintptr
+ FsortFlags U8
+ F__ccgo_pad1 [3]byte
+ FeEName uint8 /* unsigned eEName: 2, unsigned done: 1, unsigned reusable: 1, unsigned bSorterRef: 1, unsigned bNulls: 1 */
+ F__ccgo_pad2 [3]byte
+ Fu struct {
+ F__ccgo_pad1 [0]uint32
+ Fx struct {
FiOrderByCol U16
FiAlias U16
}
}
- _ [4]byte
+ F__ccgo_pad3 [4]byte
}
-} /* sqlite3.c:1312:9 */
+} /* sqlite3.c:1331:9 */
-type ExprList = ExprList1 /* sqlite3.c:14787:25 */
+type ExprList = ExprList1 /* sqlite3.c:14896:25 */
type FKey1 = struct {
- FpFrom uintptr
- FpNextFrom uintptr
- FzTo uintptr
- FpNextTo uintptr
- FpPrevTo uintptr
- FnCol int32
- FisDeferred U8
- FaAction [2]U8
- _ [1]byte
- FapTrigger [2]uintptr
- FaCol [1]struct {
- FiFrom int32
- _ [4]byte
- FzCol uintptr
- }
-} /* sqlite3.c:1312:9 */
-
-type FKey = FKey1 /* sqlite3.c:14788:21 */
+ FpFrom uintptr
+ FpNextFrom uintptr
+ FzTo uintptr
+ FpNextTo uintptr
+ FpPrevTo uintptr
+ FnCol int32
+ FisDeferred U8
+ FaAction [2]U8
+ F__ccgo_pad1 [1]byte
+ FapTrigger [2]uintptr
+ FaCol [1]struct {
+ FiFrom int32
+ F__ccgo_pad1 [4]byte
+ FzCol uintptr
+ }
+} /* sqlite3.c:1331:9 */
+
+type FKey = FKey1 /* sqlite3.c:14897:21 */
type FuncDestructor1 = struct {
- FnRef int32
- _ [4]byte
- FxDestroy uintptr
- FpUserData uintptr
-} /* sqlite3.c:14789:9 */
+ FnRef int32
+ F__ccgo_pad1 [4]byte
+ FxDestroy uintptr
+ FpUserData uintptr
+} /* sqlite3.c:14898:9 */
-type FuncDestructor = FuncDestructor1 /* sqlite3.c:14789:31 */
+type FuncDestructor = FuncDestructor1 /* sqlite3.c:14898:31 */
type FuncDef1 = struct {
- FnArg I8
- _ [3]byte
- FfuncFlags U32
- FpUserData uintptr
- FpNext uintptr
- FxSFunc uintptr
- FxFinalize uintptr
- FxValue uintptr
- FxInverse uintptr
- FzName uintptr
- Fu struct{ FpHash uintptr }
-} /* sqlite3.c:1312:9 */
+ FnArg I8
+ F__ccgo_pad1 [3]byte
+ FfuncFlags U32
+ FpUserData uintptr
+ FpNext uintptr
+ FxSFunc uintptr
+ FxFinalize uintptr
+ FxValue uintptr
+ FxInverse uintptr
+ FzName uintptr
+ Fu struct{ FpHash uintptr }
+} /* sqlite3.c:1331:9 */
-type FuncDef = FuncDef1 /* sqlite3.c:14790:24 */
-type FuncDefHash1 = struct{ Fa [23]uintptr } /* sqlite3.c:14791:9 */
+type FuncDef = FuncDef1 /* sqlite3.c:14899:24 */
+type FuncDefHash1 = struct{ Fa [23]uintptr } /* sqlite3.c:14900:9 */
-type FuncDefHash = FuncDefHash1 /* sqlite3.c:14791:28 */
+type FuncDefHash = FuncDefHash1 /* sqlite3.c:14900:28 */
type IdList1 = struct {
- Fa uintptr
- FnId int32
- _ [4]byte
-} /* sqlite3.c:1312:9 */
+ Fa uintptr
+ FnId int32
+ F__ccgo_pad1 [4]byte
+} /* sqlite3.c:1331:9 */
-type IdList = IdList1 /* sqlite3.c:14792:23 */
+type IdList = IdList1 /* sqlite3.c:14901:23 */
type Index1 = struct {
FzName uintptr
FaiColumn uintptr
@@ -9387,89 +10068,89 @@ type Index1 = struct {
FnKeyCol U16
FnColumn U16
FonError U8
- _ [1]byte
+ F__ccgo_pad1 [1]byte
FidxType uint16 /* unsigned idxType: 2, unsigned bUnordered: 1, unsigned uniqNotNull: 1, unsigned isResized: 1, unsigned isCovering: 1, unsigned noSkipScan: 1, unsigned hasStat1: 1, unsigned bNoQuery: 1, unsigned bAscKeyBug: 1, unsigned bHasVCol: 1 */
- _ [2]byte
+ F__ccgo_pad2 [2]byte
FnSample int32
FnSampleCol int32
FaAvgEq uintptr
FaSample uintptr
FaiRowEst uintptr
FnRowEst0 TRowcnt
- _ [4]byte
+ F__ccgo_pad3 [4]byte
FcolNotIdxed Bitmask
-} /* sqlite3.c:1312:9 */
+} /* sqlite3.c:1331:9 */
-type Index = Index1 /* sqlite3.c:14793:22 */
+type Index = Index1 /* sqlite3.c:14902:22 */
type IndexSample1 = struct {
- Fp uintptr
- Fn int32
- _ [4]byte
- FanEq uintptr
- FanLt uintptr
- FanDLt uintptr
-} /* sqlite3.c:1312:9 */
-
-type IndexSample = IndexSample1 /* sqlite3.c:14794:28 */
+ Fp uintptr
+ Fn int32
+ F__ccgo_pad1 [4]byte
+ FanEq uintptr
+ FanLt uintptr
+ FanDLt uintptr
+} /* sqlite3.c:1331:9 */
+
+type IndexSample = IndexSample1 /* sqlite3.c:14903:28 */
type KeyInfo1 = struct {
- FnRef U32
- Fenc U8
- _ [1]byte
- FnKeyField U16
- FnAllField U16
- _ [6]byte
- Fdb uintptr
- FaSortFlags uintptr
- FaColl [1]uintptr
-} /* sqlite3.c:1312:9 */
-
-type KeyInfo = KeyInfo1 /* sqlite3.c:14796:24 */
+ FnRef U32
+ Fenc U8
+ F__ccgo_pad1 [1]byte
+ FnKeyField U16
+ FnAllField U16
+ F__ccgo_pad2 [6]byte
+ Fdb uintptr
+ FaSortFlags uintptr
+ FaColl [1]uintptr
+} /* sqlite3.c:1331:9 */
+
+type KeyInfo = KeyInfo1 /* sqlite3.c:14905:24 */
type Lookaside1 = struct {
- FbDisable U32
- Fsz U16
- FszTrue U16
- FbMalloced U8
- _ [3]byte
- FnSlot U32
- FanStat [3]U32
- _ [4]byte
- FpInit uintptr
- FpFree uintptr
- FpSmallInit uintptr
- FpSmallFree uintptr
- FpMiddle uintptr
- FpStart uintptr
- FpEnd uintptr
-} /* sqlite3.c:1312:9 */
-
-type Lookaside = Lookaside1 /* sqlite3.c:14797:26 */
-type LookasideSlot1 = struct{ FpNext uintptr } /* sqlite3.c:1312:9 */
-
-type LookasideSlot = LookasideSlot1 /* sqlite3.c:14798:30 */
+ FbDisable U32
+ Fsz U16
+ FszTrue U16
+ FbMalloced U8
+ F__ccgo_pad1 [3]byte
+ FnSlot U32
+ FanStat [3]U32
+ F__ccgo_pad2 [4]byte
+ FpInit uintptr
+ FpFree uintptr
+ FpSmallInit uintptr
+ FpSmallFree uintptr
+ FpMiddle uintptr
+ FpStart uintptr
+ FpEnd uintptr
+} /* sqlite3.c:1331:9 */
+
+type Lookaside = Lookaside1 /* sqlite3.c:14906:26 */
+type LookasideSlot1 = struct{ FpNext uintptr } /* sqlite3.c:1331:9 */
+
+type LookasideSlot = LookasideSlot1 /* sqlite3.c:14907:30 */
type Module1 = struct {
- FpModule uintptr
- FzName uintptr
- FnRefModule int32
- _ [4]byte
- FpAux uintptr
- FxDestroy uintptr
- FpEpoTab uintptr
-} /* sqlite3.c:1312:9 */
-
-type Module = Module1 /* sqlite3.c:14799:23 */
+ FpModule uintptr
+ FzName uintptr
+ FnRefModule int32
+ F__ccgo_pad1 [4]byte
+ FpAux uintptr
+ FxDestroy uintptr
+ FpEpoTab uintptr
+} /* sqlite3.c:1331:9 */
+
+type Module = Module1 /* sqlite3.c:14908:23 */
type NameContext1 = struct {
- FpParse uintptr
- FpSrcList uintptr
- FuNC struct{ FpEList uintptr }
- FpNext uintptr
- FnRef int32
- FnErr int32
- FncFlags int32
- _ [4]byte
- FpWinSelect uintptr
-} /* sqlite3.c:14800:9 */
-
-type NameContext = NameContext1 /* sqlite3.c:14800:28 */
+ FpParse uintptr
+ FpSrcList uintptr
+ FuNC struct{ FpEList uintptr }
+ FpNext uintptr
+ FnRef int32
+ FnNcErr int32
+ FncFlags int32
+ F__ccgo_pad1 [4]byte
+ FpWinSelect uintptr
+} /* sqlite3.c:14909:9 */
+
+type NameContext = NameContext1 /* sqlite3.c:14909:28 */
type Parse1 = struct {
Fdb uintptr
FzErrMsg uintptr
@@ -9485,7 +10166,7 @@ type Parse1 = struct {
FokConstFactor U8
FdisableLookaside U8
FdisableVtab U8
- _ [2]byte
+ F__ccgo_pad1 [2]byte
FnRangeReg int32
FiRangeReg int32
FnErr int32
@@ -9495,7 +10176,7 @@ type Parse1 = struct {
FiSelfTab int32
FnLabel int32
FnLabelAlloc int32
- _ [4]byte
+ F__ccgo_pad2 [4]byte
FaLabel uintptr
FpConstExpr uintptr
FconstraintName Token
@@ -9506,16 +10187,16 @@ type Parse1 = struct {
FnMaxArg int32
FnSelect int32
FnTableLock int32
- _ [4]byte
+ F__ccgo_pad3 [4]byte
FaTableLock uintptr
FpAinc uintptr
FpToplevel uintptr
FpTriggerTab uintptr
FpParentParse uintptr
Fu1 struct {
- _ [0]uint64
- FaddrCrTab int32
- _ [4]byte
+ F__ccgo_pad1 [0]uint64
+ FaddrCrTab int32
+ F__ccgo_pad2 [4]byte
}
FnQueryLoop U32
Foldmask U32
@@ -9531,11 +10212,11 @@ type Parse1 = struct {
FiPkSortOrder U8
Fexplain U8
FeParseMode U8
- _ [3]byte
+ F__ccgo_pad4 [3]byte
FnVtabLock int32
FnHeight int32
FaddrExplain int32
- _ [4]byte
+ F__ccgo_pad5 [4]byte
FpVList uintptr
FpReprepare uintptr
FzTail uintptr
@@ -9549,61 +10230,61 @@ type Parse1 = struct {
FpWith uintptr
FpCleanup uintptr
FpRename uintptr
-} /* sqlite3.c:1312:9 */
+} /* sqlite3.c:1331:9 */
-type Parse = Parse1 /* sqlite3.c:14801:22 */
+type Parse = Parse1 /* sqlite3.c:14910:22 */
type ParseCleanup1 = struct {
FpNext uintptr
FpPtr uintptr
FxCleanup uintptr
-} /* sqlite3.c:1312:9 */
+} /* sqlite3.c:1331:9 */
-type ParseCleanup = ParseCleanup1 /* sqlite3.c:14802:29 */
+type ParseCleanup = ParseCleanup1 /* sqlite3.c:14911:29 */
type PreUpdate1 = struct {
Fv uintptr
FpCsr uintptr
Fop int32
- _ [4]byte
+ F__ccgo_pad1 [4]byte
FaRecord uintptr
Fkeyinfo KeyInfo
FpUnpacked uintptr
FpNewUnpacked uintptr
FiNewReg int32
- _ [4]byte
+ FiBlobWrite int32
FiKey1 I64
FiKey2 I64
FaNew uintptr
FpTab uintptr
FpPk uintptr
-} /* sqlite3.c:1312:9 */
+} /* sqlite3.c:1331:9 */
-type PreUpdate = PreUpdate1 /* sqlite3.c:14803:26 */
+type PreUpdate = PreUpdate1 /* sqlite3.c:14912:26 */
type PrintfArguments1 = struct {
FnArg int32
FnUsed int32
FapArg uintptr
-} /* sqlite3.c:14804:9 */
+} /* sqlite3.c:14913:9 */
-type PrintfArguments = PrintfArguments1 /* sqlite3.c:14804:32 */
+type PrintfArguments = PrintfArguments1 /* sqlite3.c:14913:32 */
type RenameToken1 = struct {
Fp uintptr
Ft Token
FpNext uintptr
-} /* sqlite3.c:1312:9 */
+} /* sqlite3.c:1331:9 */
-type RenameToken = RenameToken1 /* sqlite3.c:14805:28 */
+type RenameToken = RenameToken1 /* sqlite3.c:14914:28 */
type Returning1 = struct {
- FpParse uintptr
- FpReturnEL uintptr
- FretTrig Trigger
- FretTStep TriggerStep
- FiRetCur int32
- FnRetCol int32
- FiRetReg int32
- _ [4]byte
-} /* sqlite3.c:14806:9 */
-
-type Returning = Returning1 /* sqlite3.c:14806:26 */
+ FpParse uintptr
+ FpReturnEL uintptr
+ FretTrig Trigger
+ FretTStep TriggerStep
+ FiRetCur int32
+ FnRetCol int32
+ FiRetReg int32
+ F__ccgo_pad1 [4]byte
+} /* sqlite3.c:14915:9 */
+
+type Returning = Returning1 /* sqlite3.c:14915:26 */
type RowSet1 = struct {
FpChunk uintptr
Fdb uintptr
@@ -9614,27 +10295,27 @@ type RowSet1 = struct {
FnFresh U16
FrsFlags U16
FiBatch int32
-} /* sqlite3.c:14807:9 */
+} /* sqlite3.c:14916:9 */
-type RowSet = RowSet1 /* sqlite3.c:14807:23 */
+type RowSet = RowSet1 /* sqlite3.c:14916:23 */
type Savepoint1 = struct {
FzName uintptr
FnDeferredCons I64
FnDeferredImmCons I64
FpNext uintptr
-} /* sqlite3.c:1312:9 */
+} /* sqlite3.c:1331:9 */
-type Savepoint = Savepoint1 /* sqlite3.c:14808:26 */
+type Savepoint = Savepoint1 /* sqlite3.c:14917:26 */
type Select1 = struct {
Fop U8
- _ [1]byte
+ F__ccgo_pad1 [1]byte
FnSelectRow LogEst
FselFlags U32
FiLimit int32
FiOffset int32
FselId U32
FaddrOpenEphm [2]int32
- _ [4]byte
+ F__ccgo_pad2 [4]byte
FpEList uintptr
FpSrc uintptr
FpWhere uintptr
@@ -9647,29 +10328,29 @@ type Select1 = struct {
FpWith uintptr
FpWin uintptr
FpWinDefn uintptr
-} /* sqlite3.c:1312:9 */
+} /* sqlite3.c:1331:9 */
-type Select = Select1 /* sqlite3.c:14809:23 */
+type Select = Select1 /* sqlite3.c:14918:23 */
type SQLiteThread1 = struct {
FxTask uintptr
FpIn uintptr
FpResult uintptr
-} /* sqlite3.c:14810:9 */
+} /* sqlite3.c:14919:9 */
-type SQLiteThread = SQLiteThread1 /* sqlite3.c:14810:29 */
+type SQLiteThread = SQLiteThread1 /* sqlite3.c:14919:29 */
type SelectDest1 = struct {
- FeDest U8
- _ [3]byte
- FiSDParm int32
- FiSDParm2 int32
- FiSdst int32
- FnSdst int32
- _ [4]byte
- FzAffSdst uintptr
- FpOrderBy uintptr
-} /* sqlite3.c:14811:9 */
-
-type SelectDest = SelectDest1 /* sqlite3.c:14811:27 */
+ FeDest U8
+ F__ccgo_pad1 [3]byte
+ FiSDParm int32
+ FiSDParm2 int32
+ FiSdst int32
+ FnSdst int32
+ F__ccgo_pad2 [4]byte
+ FzAffSdst uintptr
+ FpOrderBy uintptr
+} /* sqlite3.c:14920:9 */
+
+type SelectDest = SelectDest1 /* sqlite3.c:14920:27 */
type SrcItem1 = struct {
FpSchema uintptr
FzDatabase uintptr
@@ -9681,11 +10362,11 @@ type SrcItem1 = struct {
FregReturn int32
FregResult int32
Ffg struct {
- _ [0]uint32
- Fjointype U8
- _ [3]byte
- FnotIndexed uint8 /* unsigned notIndexed: 1, unsigned isIndexedBy: 1, unsigned isTabFunc: 1, unsigned isCorrelated: 1, unsigned viaCoroutine: 1, unsigned isRecursive: 1, unsigned fromDDL: 1, unsigned isCte: 1 */
- _ [3]byte
+ F__ccgo_pad1 [0]uint32
+ Fjointype U8
+ F__ccgo_pad2 [3]byte
+ FnotIndexed uint16 /* unsigned notIndexed: 1, unsigned isIndexedBy: 1, unsigned isTabFunc: 1, unsigned isCorrelated: 1, unsigned viaCoroutine: 1, unsigned isRecursive: 1, unsigned fromDDL: 1, unsigned isCte: 1, unsigned notCte: 1 */
+ F__ccgo_pad3 [2]byte
}
FiCursor int32
FpOn uintptr
@@ -9693,17 +10374,17 @@ type SrcItem1 = struct {
FcolUsed Bitmask
Fu1 struct{ FzIndexedBy uintptr }
Fu2 struct{ FpIBIndex uintptr }
-} /* sqlite3.c:1312:9 */
+} /* sqlite3.c:1331:9 */
-type SrcItem = SrcItem1 /* sqlite3.c:14812:24 */
+type SrcItem = SrcItem1 /* sqlite3.c:14921:24 */
type SrcList1 = struct {
FnSrc int32
FnAlloc U32
Fa [1]SrcItem
-} /* sqlite3.c:1312:9 */
+} /* sqlite3.c:1331:9 */
-type SrcList = SrcList1 /* sqlite3.c:14813:24 */
-type StrAccum = sqlite3_str /* sqlite3.c:14814:28 */ // Internal alias for sqlite3_str
+type SrcList = SrcList1 /* sqlite3.c:14922:24 */
+type StrAccum = sqlite3_str /* sqlite3.c:14923:28 */ // Internal alias for sqlite3_str
type Table1 = struct {
FzName uintptr
FaCol uintptr
@@ -9721,90 +10402,90 @@ type Table1 = struct {
FnRowLogEst LogEst
FszTabRow LogEst
FkeyConf U8
- _ [1]byte
+ F__ccgo_pad1 [1]byte
FaddColOffset int32
FnModuleArg int32
FazModuleArg uintptr
FpVTable uintptr
FpTrigger uintptr
FpSchema uintptr
-} /* sqlite3.c:1312:9 */
+} /* sqlite3.c:1331:9 */
// Internal alias for sqlite3_str
-type Table = Table1 /* sqlite3.c:14815:22 */
+type Table = Table1 /* sqlite3.c:14924:22 */
type TableLock1 = struct {
FiDb int32
FiTab Pgno
FisWriteLock U8
- _ [7]byte
+ F__ccgo_pad1 [7]byte
FzLockName uintptr
-} /* sqlite3.c:1312:9 */
+} /* sqlite3.c:1331:9 */
-type TableLock = TableLock1 /* sqlite3.c:14816:26 */
+type TableLock = TableLock1 /* sqlite3.c:14925:26 */
type Token1 = struct {
- Fz uintptr
- Fn uint32
- _ [4]byte
-} /* sqlite3.c:1312:9 */
+ Fz uintptr
+ Fn uint32
+ F__ccgo_pad1 [4]byte
+} /* sqlite3.c:1331:9 */
-type Token = Token1 /* sqlite3.c:14817:22 */
+type Token = Token1 /* sqlite3.c:14926:22 */
type Trigger1 = struct {
- FzName uintptr
- Ftable uintptr
- Fop U8
- Ftr_tm U8
- FbReturning U8
- _ [5]byte
- FpWhen uintptr
- FpColumns uintptr
- FpSchema uintptr
- FpTabSchema uintptr
- Fstep_list uintptr
- FpNext uintptr
-} /* sqlite3.c:1312:9 */
-
-type Trigger = Trigger1 /* sqlite3.c:14819:24 */
+ FzName uintptr
+ Ftable uintptr
+ Fop U8
+ Ftr_tm U8
+ FbReturning U8
+ F__ccgo_pad1 [5]byte
+ FpWhen uintptr
+ FpColumns uintptr
+ FpSchema uintptr
+ FpTabSchema uintptr
+ Fstep_list uintptr
+ FpNext uintptr
+} /* sqlite3.c:1331:9 */
+
+type Trigger = Trigger1 /* sqlite3.c:14928:24 */
type TriggerPrg1 = struct {
- FpTrigger uintptr
- FpNext uintptr
- FpProgram uintptr
- Forconf int32
- FaColmask [2]U32
- _ [4]byte
-} /* sqlite3.c:1312:9 */
+ FpTrigger uintptr
+ FpNext uintptr
+ FpProgram uintptr
+ Forconf int32
+ FaColmask [2]U32
+ F__ccgo_pad1 [4]byte
+} /* sqlite3.c:1331:9 */
-type TriggerPrg = TriggerPrg1 /* sqlite3.c:14820:27 */
+type TriggerPrg = TriggerPrg1 /* sqlite3.c:14929:27 */
type TriggerStep1 = struct {
- Fop U8
- Forconf U8
- _ [6]byte
- FpTrig uintptr
- FpSelect uintptr
- FzTarget uintptr
- FpFrom uintptr
- FpWhere uintptr
- FpExprList uintptr
- FpIdList uintptr
- FpUpsert uintptr
- FzSpan uintptr
- FpNext uintptr
- FpLast uintptr
-} /* sqlite3.c:1312:9 */
+ Fop U8
+ Forconf U8
+ F__ccgo_pad1 [6]byte
+ FpTrig uintptr
+ FpSelect uintptr
+ FzTarget uintptr
+ FpFrom uintptr
+ FpWhere uintptr
+ FpExprList uintptr
+ FpIdList uintptr
+ FpUpsert uintptr
+ FzSpan uintptr
+ FpNext uintptr
+ FpLast uintptr
+} /* sqlite3.c:1331:9 */
-type TriggerStep = TriggerStep1 /* sqlite3.c:14821:28 */
+type TriggerStep = TriggerStep1 /* sqlite3.c:14930:28 */
type UnpackedRecord1 = struct {
- FpKeyInfo uintptr
- FaMem uintptr
- FnField U16
- Fdefault_rc I8
- FerrCode U8
- Fr1 I8
- Fr2 I8
- FeqSeen U8
- _ [1]byte
-} /* sqlite3.c:1312:9 */
-
-type UnpackedRecord = UnpackedRecord1 /* sqlite3.c:14822:31 */
+ FpKeyInfo uintptr
+ FaMem uintptr
+ FnField U16
+ Fdefault_rc I8
+ FerrCode U8
+ Fr1 I8
+ Fr2 I8
+ FeqSeen U8
+ F__ccgo_pad1 [1]byte
+} /* sqlite3.c:1331:9 */
+
+type UnpackedRecord = UnpackedRecord1 /* sqlite3.c:14931:31 */
type Upsert1 = struct {
FpUpsertTarget uintptr
FpUpsertTargetWhere uintptr
@@ -9812,17 +10493,17 @@ type Upsert1 = struct {
FpUpsertWhere uintptr
FpNextUpsert uintptr
FisDoUpdate U8
- _ [7]byte
+ F__ccgo_pad1 [7]byte
FpToFree uintptr
FpUpsertIdx uintptr
FpUpsertSrc uintptr
FregData int32
FiDataCur int32
FiIdxCur int32
- _ [4]byte
-} /* sqlite3.c:1312:9 */
+ F__ccgo_pad2 [4]byte
+} /* sqlite3.c:1331:9 */
-type Upsert = Upsert1 /* sqlite3.c:14823:23 */
+type Upsert = Upsert1 /* sqlite3.c:14932:23 */
type VTable1 = struct {
Fdb uintptr
FpMod uintptr
@@ -9830,22 +10511,22 @@ type VTable1 = struct {
FnRef int32
FbConstraint U8
FeVtabRisk U8
- _ [2]byte
+ F__ccgo_pad1 [2]byte
FiSavepoint int32
- _ [4]byte
+ F__ccgo_pad2 [4]byte
FpNext uintptr
-} /* sqlite3.c:1312:9 */
+} /* sqlite3.c:1331:9 */
-type VTable = VTable1 /* sqlite3.c:14824:23 */
+type VTable = VTable1 /* sqlite3.c:14933:23 */
type VtabCtx1 = struct {
- FpVTable uintptr
- FpTab uintptr
- FpPrior uintptr
- FbDeclared int32
- _ [4]byte
-} /* sqlite3.c:1312:9 */
-
-type VtabCtx = VtabCtx1 /* sqlite3.c:14825:24 */
+ FpVTable uintptr
+ FpTab uintptr
+ FpPrior uintptr
+ FbDeclared int32
+ F__ccgo_pad1 [4]byte
+} /* sqlite3.c:1331:9 */
+
+type VtabCtx = VtabCtx1 /* sqlite3.c:14934:24 */
type Walker1 = struct {
FpParse uintptr
FxExprCallback uintptr
@@ -9853,11 +10534,11 @@ type Walker1 = struct {
FxSelectCallback2 uintptr
FwalkerDepth int32
FeCode U16
- _ [2]byte
+ F__ccgo_pad1 [2]byte
Fu struct{ FpNC uintptr }
-} /* sqlite3.c:14784:9 */
+} /* sqlite3.c:14893:9 */
-type Walker = Walker1 /* sqlite3.c:14826:23 */
+type Walker = Walker1 /* sqlite3.c:14935:23 */
type WhereInfo1 = struct {
FpParse uintptr
FpTabList uintptr
@@ -9875,7 +10556,7 @@ type WhereInfo1 = struct {
FeOnePass U8
FeDistinct U8
FbDeferredSeek uint8 /* unsigned bDeferredSeek: 1, unsigned untestedTerms: 1, unsigned bOrderedInnerLoop: 1, unsigned sorted: 1 */
- _ [1]byte
+ F__ccgo_pad1 [1]byte
FnRowOut LogEst
FiTop int32
FiEndWhere int32
@@ -9885,9 +10566,9 @@ type WhereInfo1 = struct {
FsWC WhereClause
FsMaskSet WhereMaskSet
Fa [1]WhereLevel
-} /* sqlite3.c:14827:9 */
+} /* sqlite3.c:14936:9 */
-type WhereInfo = WhereInfo1 /* sqlite3.c:14827:26 */
+type WhereInfo = WhereInfo1 /* sqlite3.c:14936:26 */
type Window1 = struct {
FzName uintptr
FzBase uintptr
@@ -9898,7 +10579,7 @@ type Window1 = struct {
FeEnd U8
FbImplicitFrame U8
FeExclude U8
- _ [3]byte
+ F__ccgo_pad1 [3]byte
FpStart uintptr
FpEnd uintptr
FppThis uintptr
@@ -9918,25 +10599,25 @@ type Window1 = struct {
FregStartRowid int32
FregEndRowid int32
FbExprArgs U8
- _ [3]byte
-} /* sqlite3.c:1312:9 */
+ F__ccgo_pad2 [3]byte
+} /* sqlite3.c:1331:9 */
-type Window = Window1 /* sqlite3.c:14828:23 */
+type Window = Window1 /* sqlite3.c:14937:23 */
type With1 = struct {
FnCte int32
- _ [4]byte
+ FbView int32
FpOuter uintptr
Fa [1]Cte
-} /* sqlite3.c:1312:9 */
+} /* sqlite3.c:1331:9 */
-type With = With1 /* sqlite3.c:14829:21 */
+type With = With1 /* sqlite3.c:14938:21 */
// The bitmask datatype defined below is used for various optimizations.
//
// Changing this from a 64-bit to a 32-bit type limits the number of
// tables in a join to 32 instead of 64. But it also reduces the size
// of the library by 738 bytes on ix86.
-type Bitmask = U64 /* sqlite3.c:14842:15 */
+type Bitmask = U64 /* sqlite3.c:14951:15 */
// The number of bits in a Bitmask. "BMS" means "BitMask Size".
@@ -9947,7 +10628,7 @@ type Bitmask = U64 /* sqlite3.c:14842:15 */
// variable number associated with that parameter. See the format description
// on the sqlite3VListAdd() routine for more information. A VList is really
// just an array of integers.
-type VList = int32 /* sqlite3.c:14864:13 */
+type VList = int32 /* sqlite3.c:14973:13 */
// Defer sourcing vdbe.h and btree.h until after the "u8" and
// "BusyHandler" typedefs. vdbe.h also requires a few of the opaque
@@ -9974,7 +10655,7 @@ type VList = int32 /* sqlite3.c:14864:13 */
// The type used to represent a page number. The first page in a file
// is called page 1. 0 is used to represent "not a page".
-type Pgno = U32 /* sqlite3.c:14905:13 */
+type Pgno = U32 /* sqlite3.c:15014:13 */
// Each open file is managed by a separate instance of the "Pager" structure.
type Pager1 = struct {
@@ -10007,7 +10688,7 @@ type Pager1 = struct {
FnRec int32
FcksumInit U32
FnSubRec U32
- _ [4]byte
+ F__ccgo_pad1 [4]byte
FpInJournal uintptr
Ffd uintptr
Fjfd uintptr
@@ -10018,9 +10699,9 @@ type Pager1 = struct {
FaSavepoint uintptr
FnSavepoint int32
FiDataVersion U32
- FdbFileVers [16]int8
+ FdbFileVers [16]uint8
FnMmapOut int32
- _ [4]byte
+ F__ccgo_pad2 [4]byte
FszMmap Sqlite3_int64
FpMmapFreelist uintptr
FnExtra U16
@@ -10029,7 +10710,7 @@ type Pager1 = struct {
FsectorSize U32
FpageSize int32
FmxPgno Pgno
- _ [4]byte
+ F__ccgo_pad3 [4]byte
FjournalSizeLimit I64
FzFilename uintptr
FzJournal uintptr
@@ -10042,10 +10723,10 @@ type Pager1 = struct {
FpPCache uintptr
FpWal uintptr
FzWal uintptr
-} /* sqlite3.c:1312:9 */
+} /* sqlite3.c:1331:9 */
// Each open file is managed by a separate instance of the "Pager" structure.
-type Pager = Pager1 /* sqlite3.c:14910:22 */
+type Pager = Pager1 /* sqlite3.c:15019:22 */
// Handle type for pages.
type PgHdr2 = struct {
@@ -10060,10 +10741,10 @@ type PgHdr2 = struct {
FnRef I16
FpDirtyNext uintptr
FpDirtyPrev uintptr
-} /* sqlite3.c:1312:9 */
+} /* sqlite3.c:1331:9 */
// Handle type for pages.
-type DbPage = PgHdr2 /* sqlite3.c:14915:22 */
+type DbPage = PgHdr2 /* sqlite3.c:15024:22 */
// Functions to support testing and debugging.
@@ -10105,7 +10786,7 @@ type Btree1 = struct {
FpNext uintptr
FpPrev uintptr
Flock BtLock
-} /* sqlite3.c:1312:9 */
+} /* sqlite3.c:1331:9 */
// Functions to support testing and debugging.
@@ -10134,7 +10815,7 @@ type Btree1 = struct {
// it must be turned on for each database using "PRAGMA auto_vacuum = 1".
// Forward declarations of structure
-type Btree = Btree1 /* sqlite3.c:15158:22 */
+type Btree = Btree1 /* sqlite3.c:15267:22 */
type BtCursor1 = struct {
FeState U8
FcurFlags U8
@@ -10153,13 +10834,13 @@ type BtCursor1 = struct {
FcurIntKey U8
Fix U16
FaiIdx [19]U16
- _ [2]byte
+ F__ccgo_pad1 [2]byte
FpKeyInfo uintptr
FpPage uintptr
FapPage [19]uintptr
-} /* sqlite3.c:1312:9 */
+} /* sqlite3.c:1331:9 */
-type BtCursor = BtCursor1 /* sqlite3.c:15159:25 */
+type BtCursor = BtCursor1 /* sqlite3.c:15268:25 */
type BtShared1 = struct {
FpPager uintptr
Fdb uintptr
@@ -10172,46 +10853,46 @@ type BtShared1 = struct {
FinTransaction U8
Fmax1bytePayload U8
FnReserveWanted U8
- _ [1]byte
+ F__ccgo_pad1 [1]byte
FbtsFlags U16
FmaxLocal U16
FminLocal U16
FmaxLeaf U16
FminLeaf U16
- _ [2]byte
+ F__ccgo_pad2 [2]byte
FpageSize U32
FusableSize U32
FnTransaction int32
FnPage U32
- _ [4]byte
+ F__ccgo_pad3 [4]byte
FpSchema uintptr
FxFreeSchema uintptr
Fmutex uintptr
FpHasContent uintptr
FnRef int32
- _ [4]byte
+ F__ccgo_pad4 [4]byte
FpNext uintptr
FpLock uintptr
FpWriter uintptr
FpTmpSpace uintptr
FnPreformatSize int32
- _ [4]byte
-} /* sqlite3.c:1312:9 */
+ F__ccgo_pad5 [4]byte
+} /* sqlite3.c:1331:9 */
-type BtShared = BtShared1 /* sqlite3.c:15160:25 */
+type BtShared = BtShared1 /* sqlite3.c:15269:25 */
type BtreePayload1 = struct {
- FpKey uintptr
- FnKey Sqlite3_int64
- FpData uintptr
- FaMem uintptr
- FnMem U16
- _ [2]byte
- FnData int32
- FnZero int32
- _ [4]byte
-} /* sqlite3.c:15161:9 */
-
-type BtreePayload = BtreePayload1 /* sqlite3.c:15161:29 */
+ FpKey uintptr
+ FnKey Sqlite3_int64
+ FpData uintptr
+ FaMem uintptr
+ FnMem U16
+ F__ccgo_pad1 [2]byte
+ FnData int32
+ FnZero int32
+ F__ccgo_pad2 [4]byte
+} /* sqlite3.c:15270:9 */
+
+type BtreePayload = BtreePayload1 /* sqlite3.c:15270:29 */
//************* End of btree.h **********************************************
//************* Continuing where we left off in sqliteInt.h *****************
@@ -10243,7 +10924,7 @@ type Vdbe1 = struct {
FpNext uintptr
FpParse uintptr
FnVar YnVar
- _ [2]byte
+ F__ccgo_pad1 [2]byte
FiVdbeMagic U32
FnMem int32
FnCursor int32
@@ -10252,7 +10933,7 @@ type Vdbe1 = struct {
Frc int32
FnChange int32
FiStatement int32
- _ [4]byte
+ F__ccgo_pad2 [4]byte
FiCurrentTime I64
FnFkConstraint I64
FnStmtDefCons I64
@@ -10274,9 +10955,9 @@ type Vdbe1 = struct {
FminWriteFileFormat U8
FprepFlags U8
FdoingRerun U8
- _ [2]byte
+ F__ccgo_pad3 [2]byte
Fexpired uint16 /* bft expired: 2, bft explain: 2, bft changeCntOn: 1, bft runOnlyOnce: 1, bft usesStmtJournal: 1, bft readOnly: 1, bft bIsReader: 1 */
- _ [2]byte
+ F__ccgo_pad4 [2]byte
FbtreeMask YDbMask
FlockMask YDbMask
FaCounter [7]U32
@@ -10288,7 +10969,7 @@ type Vdbe1 = struct {
Fexpmask U32
FpProgram uintptr
FpAuxData uintptr
-} /* sqlite3.c:1312:9 */
+} /* sqlite3.c:1331:9 */
//************* End of btree.h **********************************************
//************* Continuing where we left off in sqliteInt.h *****************
@@ -10314,23 +10995,23 @@ type Vdbe1 = struct {
// A single VDBE is an opaque structure named "Vdbe". Only routines
// in the source file sqliteVdbe.c are allowed to see the insides
// of this structure.
-type Vdbe = Vdbe1 /* sqlite3.c:15559:21 */
+type Vdbe = Vdbe1 /* sqlite3.c:15668:21 */
// The names of the following types declared in vdbeInt.h are required
// for the VdbeOp definition.
-type Mem = sqlite3_value /* sqlite3.c:15565:30 */
+type Mem = sqlite3_value /* sqlite3.c:15674:30 */
type SubProgram1 = struct {
- FaOp uintptr
- FnOp int32
- FnMem int32
- FnCsr int32
- _ [4]byte
- FaOnce uintptr
- Ftoken uintptr
- FpNext uintptr
-} /* sqlite3.c:1312:9 */
+ FaOp uintptr
+ FnOp int32
+ FnMem int32
+ FnCsr int32
+ F__ccgo_pad1 [4]byte
+ FaOnce uintptr
+ Ftoken uintptr
+ FpNext uintptr
+} /* sqlite3.c:1331:9 */
-type SubProgram = SubProgram1 /* sqlite3.c:15566:27 */
+type SubProgram = SubProgram1 /* sqlite3.c:15675:27 */
// A single instruction of the virtual machine has an opcode
// and as many as three operands. The instruction is recorded
@@ -10343,22 +11024,22 @@ type VdbeOp1 = struct {
Fp2 int32
Fp3 int32
Fp4 struct {
- _ [0]uint64
- Fi int32
- _ [4]byte
+ F__ccgo_pad1 [0]uint64
+ Fi int32
+ F__ccgo_pad2 [4]byte
}
-} /* sqlite3.c:1312:9 */
+} /* sqlite3.c:1331:9 */
// A single instruction of the virtual machine has an opcode
// and as many as three operands. The instruction is recorded
// as an instance of the following structure:
type p4union = struct {
- _ [0]uint64
- Fi int32
- _ [4]byte
-} /* sqlite3.c:1312:9 */
+ F__ccgo_pad1 [0]uint64
+ Fi int32
+ F__ccgo_pad2 [4]byte
+} /* sqlite3.c:1331:9 */
-type VdbeOp = VdbeOp1 /* sqlite3.c:15612:23 */
+type VdbeOp = VdbeOp1 /* sqlite3.c:15721:23 */
// A smaller version of VdbeOp used for the VdbeAddOpList() function because
// it takes up less space.
@@ -10367,11 +11048,11 @@ type VdbeOpList1 = struct {
Fp1 int8
Fp2 int8
Fp3 int8
-} /* sqlite3.c:15632:1 */
+} /* sqlite3.c:15741:1 */
-type VdbeOpList = VdbeOpList1 /* sqlite3.c:15638:27 */
+type VdbeOpList = VdbeOpList1 /* sqlite3.c:15747:27 */
-type RecordCompare = uintptr /* sqlite3.c:16046:13 */
+type RecordCompare = uintptr /* sqlite3.c:16156:13 */
// Use SQLITE_ENABLE_COMMENTS to enable generation of extra comments on
// each VDBE opcode.
@@ -10436,28 +11117,28 @@ type RecordCompare = uintptr /* sqlite3.c:16046:13 */
// This header file defines the interface that the sqlite page cache
// subsystem.
-type PgHdr = PgHdr2 /* sqlite3.c:16179:22 */
+type PgHdr = PgHdr2 /* sqlite3.c:16289:22 */
type PCache2 = struct {
- FpDirty uintptr
- FpDirtyTail uintptr
- FpSynced uintptr
- FnRefSum int32
- FszCache int32
- FszSpill int32
- FszPage int32
- FszExtra int32
- FbPurgeable U8
- FeCreate U8
- _ [2]byte
- FxStress uintptr
- FpStress uintptr
- FpCache uintptr
-} /* sqlite3.c:1312:9 */
+ FpDirty uintptr
+ FpDirtyTail uintptr
+ FpSynced uintptr
+ FnRefSum int32
+ FszCache int32
+ FszSpill int32
+ FszPage int32
+ FszExtra int32
+ FbPurgeable U8
+ FeCreate U8
+ F__ccgo_pad1 [2]byte
+ FxStress uintptr
+ FpStress uintptr
+ FpCache uintptr
+} /* sqlite3.c:1331:9 */
-type PCache = PCache2 /* sqlite3.c:16180:23 */
+type PCache = PCache2 /* sqlite3.c:16290:23 */
// typedef for the authorization callback function.
-type Sqlite3_xauth = uintptr /* sqlite3.c:16942:15 */
+type Sqlite3_xauth = uintptr /* sqlite3.c:17058:15 */
// This is an extra SQLITE_TRACE macro that indicates "legacy" tracing
// in the style of sqlite3_trace()
@@ -10470,11 +11151,11 @@ type sqlite3InitInfo = struct {
FnewTnum Pgno
FiDb U8
Fbusy U8
- _ [2]byte
- ForphanTrigger uint8 /* unsigned orphanTrigger: 1, unsigned imposterTable: 1, unsigned reopenMemdb: 1, unsigned bDropColumn: 1 */
- _ [7]byte
+ F__ccgo_pad1 [2]byte
+ ForphanTrigger uint8 /* unsigned orphanTrigger: 1, unsigned imposterTable: 1, unsigned reopenMemdb: 1 */
+ F__ccgo_pad2 [7]byte
FazInit uintptr
-} /* sqlite3.c:1312:9 */
+} /* sqlite3.c:1331:9 */
// Allowed values for Table.tabFlags.
//
@@ -10528,10 +11209,10 @@ type sqlite3InitInfo = struct {
// A list of all children for a table named Z (which might not even exist)
// is held in Schema.fkeyHash with a hash key of Z.
type sColMap = struct {
- FiFrom int32
- _ [4]byte
- FzCol uintptr
-} /* sqlite3.c:1312:9 */
+ FiFrom int32
+ F__ccgo_pad1 [4]byte
+ FzCol uintptr
+} /* sqlite3.c:1331:9 */
// An instance of this structure contains information needed to generate
// code for a SELECT that contains aggregate functions.
@@ -10551,8 +11232,8 @@ type AggInfo_col = struct {
FiMem int32
FiColumn I16
FiSorterColumn I16
- _ [4]byte
-} /* sqlite3.c:1312:9 */
+ F__ccgo_pad1 [4]byte
+} /* sqlite3.c:1331:9 */
// An instance of this structure contains information needed to generate
// code for a SELECT that contains aggregate functions.
@@ -10566,11 +11247,13 @@ type AggInfo_col = struct {
// original Select structure that describes the SELECT statement. These
// fields do not need to be freed when deallocating the AggInfo structure.
type AggInfo_func = struct {
- FpFExpr uintptr
- FpFunc uintptr
- FiMem int32
- FiDistinct int32
-} /* sqlite3.c:1312:9 */
+ FpFExpr uintptr
+ FpFunc uintptr
+ FiMem int32
+ FiDistinct int32
+ FiDistAddr int32
+ F__ccgo_pad1 [4]byte
+} /* sqlite3.c:1331:9 */
// The datatype ynVar is a signed integer, either 16-bit or 32-bit.
// Usually it is 16-bits. But if SQLITE_MAX_VARIABLE_NUMBER is greater
@@ -10580,7 +11263,7 @@ type AggInfo_func = struct {
// need more than about 10 or 20 variables. But some extreme users want
// to have prepared statements with over 32766 variables, and for them
// the option is available (at compile-time).
-type YnVar = I16 /* sqlite3.c:18099:13 */
+type YnVar = I16 /* sqlite3.c:18212:13 */
// The following are the meanings of bits in the Expr.flags field.
// Value restrictions:
@@ -10633,21 +11316,21 @@ type YnVar = I16 /* sqlite3.c:18099:13 */
// ENAME_SPAN Text of the original result set
// expression.
type ExprList_item = struct {
- FpExpr uintptr
- FzEName uintptr
- FsortFlags U8
- _ [3]byte
- FeEName uint8 /* unsigned eEName: 2, unsigned done: 1, unsigned reusable: 1, unsigned bSorterRef: 1, unsigned bNulls: 1 */
- _ [3]byte
- Fu struct {
- _ [0]uint32
- Fx struct {
+ FpExpr uintptr
+ FzEName uintptr
+ FsortFlags U8
+ F__ccgo_pad1 [3]byte
+ FeEName uint8 /* unsigned eEName: 2, unsigned done: 1, unsigned reusable: 1, unsigned bSorterRef: 1, unsigned bNulls: 1 */
+ F__ccgo_pad2 [3]byte
+ Fu struct {
+ F__ccgo_pad1 [0]uint32
+ Fx struct {
FiOrderByCol U16
FiAlias U16
}
}
- _ [4]byte
-} /* sqlite3.c:1312:9 */
+ F__ccgo_pad3 [4]byte
+} /* sqlite3.c:1331:9 */
// Allowed values for Expr.a.eEName
@@ -10665,29 +11348,38 @@ type ExprList_item = struct {
//
// If "a" is the k-th column of table "t", then IdList.a[0].idx==k.
type IdList_item = struct {
- FzName uintptr
- Fidx int32
- _ [4]byte
-} /* sqlite3.c:1312:9 */
+ FzName uintptr
+ Fidx int32
+ F__ccgo_pad1 [4]byte
+} /* sqlite3.c:1331:9 */
// The yDbMask datatype for the bitmask of all attached databases.
-type YDbMask = uint32 /* sqlite3.c:18852:24 */
+type YDbMask = uint32 /* sqlite3.c:18969:24 */
// A pointer to this structure is used to communicate information
// from sqlite3Init and OP_ParseSchema into the sqlite3InitCallback.
type InitData = struct {
- Fdb uintptr
- FpzErrMsg uintptr
- FiDb int32
- Frc int32
- FmInitFlags U32
- FnInitRow U32
- FmxPage Pgno
- _ [4]byte
-} /* sqlite3.c:19210:3 */
+ Fdb uintptr
+ FpzErrMsg uintptr
+ FiDb int32
+ Frc int32
+ FmInitFlags U32
+ FnInitRow U32
+ FmxPage Pgno
+ F__ccgo_pad1 [4]byte
+} /* sqlite3.c:19327:3 */
// Allowed values for mInitFlags
+// Tuning parameters are set using SQLITE_TESTCTRL_TUNE and are controlled
+// on debug-builds of the CLI using ".testctrl tune ID VALUE". Tuning
+// parameters are for temporary use during development, to help find
+// optimial values for parameters in the query planner. The should not
+// be used on trunk check-ins. They are a temporary mechanism available
+// for transient development builds only.
+//
+// Tuning parameters are numbered starting with 1.
+
// Structure containing global configuration data for the SQLite library.
//
// This structure also contains some state information.
@@ -10699,7 +11391,7 @@ type Sqlite3Config = struct {
FbUseCis U8
FbSmallMalloc U8
FbExtraSchemaChecks U8
- _ [2]byte
+ F__ccgo_pad1 [2]byte
FmxStrlen int32
FneverCorrupt int32
FszLookaside int32
@@ -10712,7 +11404,7 @@ type Sqlite3Config = struct {
FnHeap int32
FmnReq int32
FmxReq int32
- _ [4]byte
+ F__ccgo_pad2 [4]byte
FszMmap Sqlite3_int64
FmxMmap Sqlite3_int64
FpPage uintptr
@@ -10727,16 +11419,17 @@ type Sqlite3Config = struct {
FisMallocInit int32
FisPCacheInit int32
FnRefInitMutex int32
- _ [4]byte
+ F__ccgo_pad3 [4]byte
FpInitMutex uintptr
FxLog uintptr
FpLogArg uintptr
+ FmxMemdbSize Sqlite3_int64
FxTestCallback uintptr
FbLocaltimeFault int32
FiOnceResetThreshold int32
FszSorterRef U32
FiPrngSeed uint32
-} /* sqlite3.c:19223:1 */
+} /* sqlite3.c:19356:1 */
// This macro is used inside of assert() statements to indicate that
// the assert is only valid on a well-formed database. Instead of:
@@ -10755,12 +11448,12 @@ type Sqlite3Config = struct {
// Context pointer passed down through the tree-walk.
type SrcCount = struct {
- FpSrc uintptr
- FiSrcInner int32
- FnThis int32
- FnOther int32
- _ [4]byte
-} /* sqlite3.c:19317:5 */
+ FpSrc uintptr
+ FiSrcInner int32
+ FnThis int32
+ FnOther int32
+ F__ccgo_pad1 [4]byte
+} /* sqlite3.c:19454:5 */
// This macro is used inside of assert() statements to indicate that
// the assert is only valid on a well-formed database. Instead of:
@@ -10779,10 +11472,10 @@ type SrcCount = struct {
// Context pointer passed down through the tree-walk.
type IdxCover = struct {
- FpIdx uintptr
- FiCur int32
- _ [4]byte
-} /* sqlite3.c:19320:5 */
+ FpIdx uintptr
+ FiCur int32
+ F__ccgo_pad1 [4]byte
+} /* sqlite3.c:19457:5 */
// This macro is used inside of assert() statements to indicate that
// the assert is only valid on a well-formed database. Instead of:
@@ -10808,7 +11501,7 @@ type IdxExprTrans1 = struct {
FiTabCol int32
FpWInfo uintptr
Fdb uintptr
-} /* sqlite3.c:19321:5 */
+} /* sqlite3.c:19458:5 */
// This macro is used inside of assert() statements to indicate that
// the assert is only valid on a well-formed database. Instead of:
@@ -10832,7 +11525,7 @@ type WindowRewrite1 = struct {
FpSub uintptr
FpTab uintptr
FpSubSelect uintptr
-} /* sqlite3.c:19324:5 */
+} /* sqlite3.c:19461:5 */
// This macro is used inside of assert() statements to indicate that
// the assert is only valid on a well-formed database. Instead of:
@@ -10851,11 +11544,14 @@ type WindowRewrite1 = struct {
// Context pointer passed down through the tree-walk.
type WhereConst1 = struct {
- FpParse uintptr
- FnConst int32
- FnChng int32
- FapExpr uintptr
-} /* sqlite3.c:19325:5 */
+ FpParse uintptr
+ FpOomFault uintptr
+ FnConst int32
+ FnChng int32
+ FbHasAffBlob int32
+ F__ccgo_pad1 [4]byte
+ FapExpr uintptr
+} /* sqlite3.c:19462:5 */
// This macro is used inside of assert() statements to indicate that
// the assert is only valid on a well-formed database. Instead of:
@@ -10879,7 +11575,7 @@ type RenameCtx1 = struct {
FiCol int32
FpTab uintptr
FzOld uintptr
-} /* sqlite3.c:19326:5 */
+} /* sqlite3.c:19463:5 */
//************* End of sqliteInt.h ******************************************
//************* Begin file global.c *****************************************
@@ -10903,7 +11599,7 @@ type RenameCtx1 = struct {
// SQLite only considers US-ASCII (or EBCDIC) characters. We do not
// handle case conversions for the UTF character set since the tables
// involved are nearly as big or bigger than SQLite itself.
-var Xsqlite3UpperToLower = [256]uint8{
+var Xsqlite3UpperToLower = [274]uint8{
uint8(0), uint8(1), uint8(2), uint8(3), uint8(4), uint8(5), uint8(6), uint8(7), uint8(8), uint8(9), uint8(10), uint8(11), uint8(12), uint8(13), uint8(14), uint8(15), uint8(16), uint8(17),
uint8(18), uint8(19), uint8(20), uint8(21), uint8(22), uint8(23), uint8(24), uint8(25), uint8(26), uint8(27), uint8(28), uint8(29), uint8(30), uint8(31), uint8(32), uint8(33), uint8(34), uint8(35),
uint8(36), uint8(37), uint8(38), uint8(39), uint8(40), uint8(41), uint8(42), uint8(43), uint8(44), uint8(45), uint8(46), uint8(47), uint8(48), uint8(49), uint8(50), uint8(51), uint8(52), uint8(53),
@@ -10919,7 +11615,34 @@ var Xsqlite3UpperToLower = [256]uint8{
uint8(216), uint8(217), uint8(218), uint8(219), uint8(220), uint8(221), uint8(222), uint8(223), uint8(224), uint8(225), uint8(226), uint8(227), uint8(228), uint8(229), uint8(230), uint8(231), uint8(232), uint8(233),
uint8(234), uint8(235), uint8(236), uint8(237), uint8(238), uint8(239), uint8(240), uint8(241), uint8(242), uint8(243), uint8(244), uint8(245), uint8(246), uint8(247), uint8(248), uint8(249), uint8(250), uint8(251),
uint8(252), uint8(253), uint8(254), uint8(255),
-} /* sqlite3.c:20668:36 */
+ // All of the upper-to-lower conversion data is above. The following
+ // 18 integers are completely unrelated. They are appended to the
+ // sqlite3UpperToLower[] array to avoid UBSAN warnings. Here's what is
+ // going on:
+ //
+ // The SQL comparison operators (<>, =, >, <=, <, and >=) are implemented
+ // by invoking sqlite3MemCompare(A,B) which compares values A and B and
+ // returns negative, zero, or positive if A is less then, equal to, or
+ // greater than B, respectively. Then the true false results is found by
+ // consulting sqlite3aLTb[opcode], sqlite3aEQb[opcode], or
+ // sqlite3aGTb[opcode] depending on whether the result of compare(A,B)
+ // is negative, zero, or positive, where opcode is the specific opcode.
+ // The only works because the comparison opcodes are consecutive and in
+ // this order: NE EQ GT LE LT GE. Various assert()s throughout the code
+ // ensure that is the case.
+ //
+ // These elements must be appended to another array. Otherwise the
+ // index (here shown as [256-OP_Ne]) would be out-of-bounds and thus
+ // be undefined behavior. That's goofy, but the C-standards people thought
+ // it was a good idea, so here we are.
+ // NE EQ GT LE LT GE
+ uint8(1), uint8(0), uint8(0), uint8(1), uint8(1), uint8(0), // aLTb[]: Use when compare(A,B) less than zero
+ uint8(0), uint8(1), uint8(0), uint8(1), uint8(0), uint8(1), // aEQb[]: Use when compare(A,B) equals zero
+ uint8(1), uint8(0), uint8(1), uint8(0), uint8(0), uint8(1), // aGTb[]: Use when compare(A,B) greater than zero
+} /* sqlite3.c:20818:36 */
+var Xsqlite3aLTb uintptr = 0 /* sqlite3.c:20880:36 */
+var Xsqlite3aEQb uintptr = 0 /* sqlite3.c:20881:36 */
+var Xsqlite3aGTb uintptr = 0 /* sqlite3.c:20882:36 */
// The following 256 byte lookup table is used to support SQLites built-in
// equivalents to the following standard library functions:
@@ -10983,7 +11706,7 @@ var Xsqlite3CtypeMap = [256]uint8{
uint8(0x40), uint8(0x40), uint8(0x40), uint8(0x40), uint8(0x40), uint8(0x40), uint8(0x40), uint8(0x40), // e8..ef ........
uint8(0x40), uint8(0x40), uint8(0x40), uint8(0x40), uint8(0x40), uint8(0x40), uint8(0x40), uint8(0x40), // f0..f7 ........
uint8(0x40), uint8(0x40), uint8(0x40), uint8(0x40), uint8(0x40), uint8(0x40), uint8(0x40), uint8(0x40), // f8..ff ........
-} /* sqlite3.c:20734:36 */
+} /* sqlite3.c:20912:36 */
// EVIDENCE-OF: R-02982-34736 In order to maintain full backwards
// compatibility for legacy applications, the URI filename capability is
@@ -11036,18 +11759,19 @@ var Xsqlite3Config = Sqlite3Config{
FbExtraSchemaChecks: U8(1), // bExtraSchemaChecks
FmxStrlen: 0x7ffffffe, // neverCorrupt
FszLookaside: 1200, FnLookaside: 40, // szLookaside, nLookaside
- FnStmtSpill: (64 * 1024), // szMmap
- FmxMmap: int64(SQLITE_MAX_MMAP_SIZE), // szPage
- FnPage: SQLITE_DEFAULT_PCACHE_INITSZ, // sharedCacheEnabled
- FszPma: U32(SQLITE_SORTER_PMASZ), // bLocaltimeFault
- FiOnceResetThreshold: 0x7ffffffe, // iOnceResetThreshold
- FszSorterRef: U32(SQLITE_DEFAULT_SORTERREF_SIZE), // iPrngSeed
-} /* sqlite3.c:20854:48 */
+ FnStmtSpill: (64 * 1024), // szMmap
+ FmxMmap: int64(SQLITE_MAX_MMAP_SIZE), // szPage
+ FnPage: SQLITE_DEFAULT_PCACHE_INITSZ, // sharedCacheEnabled
+ FszPma: U32(SQLITE_SORTER_PMASZ), // pLogArg
+ FmxMemdbSize: int64(SQLITE_MEMDB_DEFAULT_MAXSIZE), // bLocaltimeFault
+ FiOnceResetThreshold: 0x7ffffffe, // iOnceResetThreshold
+ FszSorterRef: U32(SQLITE_DEFAULT_SORTERREF_SIZE), // iPrngSeed
+} /* sqlite3.c:21032:48 */
// Hash table for global functions - functions common to all
// database connections. After initialization, this table is
// read-only.
-var Xsqlite3BuiltinFunctions FuncDefHash /* sqlite3.c:20915:28: */
+var Xsqlite3BuiltinFunctions FuncDefHash /* sqlite3.c:21093:28: */
// The value of the "pending" byte must be 0x40000000 (1 byte past the
// 1-gibabyte boundary) in a compatible database. SQLite never uses
@@ -11065,21 +11789,21 @@ var Xsqlite3BuiltinFunctions FuncDefHash /* sqlite3.c:20915:28: */
// 0x40000000 results in an incompatible database file format!
// Changing the pending byte during operation will result in undefined
// and incorrect behavior.
-var Xsqlite3PendingByte int32 = 0x40000000 /* sqlite3.c:20944:20 */
+var Xsqlite3PendingByte int32 = 0x40000000 /* sqlite3.c:21122:20 */
// Tracing flags set by SQLITE_TESTCTRL_TRACEFLAGS.
-var Xsqlite3SelectTrace U32 = U32(0) /* sqlite3.c:20950:20 */
-var Xsqlite3WhereTrace U32 = U32(0) /* sqlite3.c:20951:20 */
+var Xsqlite3SelectTrace U32 = U32(0) /* sqlite3.c:21128:20 */
+var Xsqlite3WhereTrace U32 = U32(0) /* sqlite3.c:21129:20 */
// #include "opcodes.h"
// Properties of opcodes. The OPFLG_INITIALIZER macro is
// created by mkopcodeh.awk during compilation. Data is obtained
// from the comments following the "case OP_xxxx:" statements in
// the vdbe.c file.
-var Xsqlite3OpcodeProperty = [179]uint8{ /* 0 */ uint8(0x00), uint8(0x00), uint8(0x00), uint8(0x01), uint8(0x01), uint8(0x01), uint8(0x00), uint8(0x10) /* 8 */, uint8(0x00), uint8(0x01), uint8(0x00), uint8(0x01), uint8(0x01), uint8(0x01), uint8(0x03), uint8(0x03) /* 16 */, uint8(0x01), uint8(0x01), uint8(0x03), uint8(0x12), uint8(0x03), uint8(0x01), uint8(0x09), uint8(0x09) /* 24 */, uint8(0x09), uint8(0x09), uint8(0x01), uint8(0x09), uint8(0x09), uint8(0x09), uint8(0x09), uint8(0x09) /* 32 */, uint8(0x09), uint8(0x01), uint8(0x01), uint8(0x01), uint8(0x01), uint8(0x01), uint8(0x01), uint8(0x01) /* 40 */, uint8(0x01), uint8(0x01), uint8(0x23), uint8(0x26), uint8(0x26), uint8(0x0b), uint8(0x01), uint8(0x01) /* 48 */, uint8(0x03), uint8(0x03), uint8(0x03), uint8(0x03), uint8(0x0b), uint8(0x0b), uint8(0x0b), uint8(0x0b) /* 56 */, uint8(0x0b), uint8(0x0b), uint8(0x01), uint8(0x03), uint8(0x01), uint8(0x01), uint8(0x01), uint8(0x00) /* 64 */, uint8(0x00), uint8(0x02), uint8(0x02), uint8(0x08), uint8(0x00), uint8(0x10), uint8(0x10), uint8(0x10) /* 72 */, uint8(0x10), uint8(0x00), uint8(0x10), uint8(0x10), uint8(0x00), uint8(0x00), uint8(0x10), uint8(0x10) /* 80 */, uint8(0x00), uint8(0x00), uint8(0x00), uint8(0x02), uint8(0x02), uint8(0x02), uint8(0x00), uint8(0x00) /* 88 */, uint8(0x12), uint8(0x20), uint8(0x00), uint8(0x00), uint8(0x00), uint8(0x10), uint8(0x10), uint8(0x00) /* 96 */, uint8(0x00), uint8(0x00), uint8(0x00), uint8(0x00), uint8(0x00), uint8(0x00), uint8(0x26), uint8(0x26) /* 104 */, uint8(0x26), uint8(0x26), uint8(0x26), uint8(0x26), uint8(0x26), uint8(0x26), uint8(0x26), uint8(0x26) /* 112 */, uint8(0x00), uint8(0x12), uint8(0x00), uint8(0x00), uint8(0x10), uint8(0x00), uint8(0x00), uint8(0x00) /* 120 */, uint8(0x00), uint8(0x10), uint8(0x10), uint8(0x00), uint8(0x00), uint8(0x00), uint8(0x00), uint8(0x00) /* 128 */, uint8(0x00), uint8(0x00), uint8(0x10), uint8(0x00), uint8(0x00), uint8(0x04), uint8(0x04), uint8(0x00) /* 136 */, uint8(0x00), uint8(0x10), uint8(0x00), uint8(0x10), uint8(0x00), uint8(0x00), uint8(0x10), uint8(0x00) /* 144 */, uint8(0x00), uint8(0x00), uint8(0x00), uint8(0x00), uint8(0x00), uint8(0x00), uint8(0x06), uint8(0x10) /* 152 */, uint8(0x10), uint8(0x00), uint8(0x04), uint8(0x1a), uint8(0x00), uint8(0x00), uint8(0x00), uint8(0x00) /* 160 */, uint8(0x00), uint8(0x00), uint8(0x00), uint8(0x00), uint8(0x00), uint8(0x00), uint8(0x00), uint8(0x00) /* 168 */, uint8(0x00), uint8(0x00), uint8(0x00), uint8(0x10), uint8(0x10), uint8(0x00), uint8(0x00), uint8(0x00) /* 176 */, uint8(0x00), uint8(0x00), uint8(0x00)} /* sqlite3.c:20960:36 */
+var Xsqlite3OpcodeProperty = [180]uint8{ /* 0 */ uint8(0x00), uint8(0x00), uint8(0x00), uint8(0x01), uint8(0x01), uint8(0x01), uint8(0x00), uint8(0x10) /* 8 */, uint8(0x00), uint8(0x01), uint8(0x00), uint8(0x01), uint8(0x01), uint8(0x01), uint8(0x03), uint8(0x03) /* 16 */, uint8(0x01), uint8(0x01), uint8(0x03), uint8(0x12), uint8(0x03), uint8(0x01), uint8(0x09), uint8(0x09) /* 24 */, uint8(0x09), uint8(0x09), uint8(0x01), uint8(0x09), uint8(0x09), uint8(0x09), uint8(0x09), uint8(0x09) /* 32 */, uint8(0x09), uint8(0x01), uint8(0x01), uint8(0x01), uint8(0x01), uint8(0x01), uint8(0x01), uint8(0x01) /* 40 */, uint8(0x01), uint8(0x01), uint8(0x23), uint8(0x26), uint8(0x26), uint8(0x0b), uint8(0x01), uint8(0x01) /* 48 */, uint8(0x03), uint8(0x03), uint8(0x03), uint8(0x03), uint8(0x0b), uint8(0x0b), uint8(0x0b), uint8(0x0b) /* 56 */, uint8(0x0b), uint8(0x0b), uint8(0x01), uint8(0x03), uint8(0x01), uint8(0x01), uint8(0x01), uint8(0x00) /* 64 */, uint8(0x00), uint8(0x02), uint8(0x02), uint8(0x08), uint8(0x00), uint8(0x10), uint8(0x10), uint8(0x10) /* 72 */, uint8(0x10), uint8(0x00), uint8(0x10), uint8(0x10), uint8(0x00), uint8(0x00), uint8(0x10), uint8(0x10) /* 80 */, uint8(0x00), uint8(0x00), uint8(0x00), uint8(0x02), uint8(0x02), uint8(0x02), uint8(0x00), uint8(0x00) /* 88 */, uint8(0x12), uint8(0x1e), uint8(0x20), uint8(0x00), uint8(0x00), uint8(0x00), uint8(0x10), uint8(0x10) /* 96 */, uint8(0x00), uint8(0x00), uint8(0x00), uint8(0x00), uint8(0x00), uint8(0x00), uint8(0x26), uint8(0x26) /* 104 */, uint8(0x26), uint8(0x26), uint8(0x26), uint8(0x26), uint8(0x26), uint8(0x26), uint8(0x26), uint8(0x26) /* 112 */, uint8(0x00), uint8(0x12), uint8(0x00), uint8(0x00), uint8(0x10), uint8(0x00), uint8(0x00), uint8(0x00) /* 120 */, uint8(0x00), uint8(0x00), uint8(0x10), uint8(0x10), uint8(0x00), uint8(0x00), uint8(0x00), uint8(0x00) /* 128 */, uint8(0x00), uint8(0x00), uint8(0x00), uint8(0x10), uint8(0x00), uint8(0x00), uint8(0x04), uint8(0x04) /* 136 */, uint8(0x00), uint8(0x00), uint8(0x10), uint8(0x00), uint8(0x10), uint8(0x00), uint8(0x00), uint8(0x10) /* 144 */, uint8(0x00), uint8(0x00), uint8(0x00), uint8(0x00), uint8(0x00), uint8(0x00), uint8(0x00), uint8(0x06) /* 152 */, uint8(0x10), uint8(0x10), uint8(0x00), uint8(0x04), uint8(0x1a), uint8(0x00), uint8(0x00), uint8(0x00) /* 160 */, uint8(0x00), uint8(0x00), uint8(0x00), uint8(0x00), uint8(0x00), uint8(0x00), uint8(0x00), uint8(0x00) /* 168 */, uint8(0x00), uint8(0x00), uint8(0x00), uint8(0x00), uint8(0x10), uint8(0x10), uint8(0x00), uint8(0x00) /* 176 */, uint8(0x00), uint8(0x00), uint8(0x00), uint8(0x00)} /* sqlite3.c:21138:36 */
// Name of the default collating sequence
-var Xsqlite3StrBINARY = *(*[7]int8)(unsafe.Pointer(ts + 266 /* "BINARY" */)) /* sqlite3.c:20965:27 */
+var Xsqlite3StrBINARY = *(*[7]uint8)(unsafe.Pointer(ts + 318 /* "BINARY" */)) /* sqlite3.c:21143:27 */
//************* End of global.c *********************************************
//************* Begin file status.c *****************************************
@@ -11124,10 +11848,10 @@ var Xsqlite3StrBINARY = *(*[7]int8)(unsafe.Pointer(ts + 266 /* "BINARY" */)) /*
// SQL is translated into a sequence of instructions to be
// executed by a virtual machine. Each instruction is an instance
// of the following structure.
-type Op = VdbeOp1 /* sqlite3.c:21032:23 */
+type Op = VdbeOp1 /* sqlite3.c:21210:23 */
// Boolean values
-type Bool = uint32 /* sqlite3.c:21037:18 */
+type Bool = uint32 /* sqlite3.c:21215:18 */
// Opaque type used by code in vdbesort.c
type VdbeSorter1 = struct {
@@ -11148,12 +11872,12 @@ type VdbeSorter1 = struct {
FiPrev U8
FnTask U8
FtypeMask U8
- _ [3]byte
+ F__ccgo_pad1 [3]byte
FaTask [1]SortSubtask
-} /* sqlite3.c:21040:9 */
+} /* sqlite3.c:21218:9 */
// Opaque type used by code in vdbesort.c
-type VdbeSorter = VdbeSorter1 /* sqlite3.c:21040:27 */
+type VdbeSorter = VdbeSorter1 /* sqlite3.c:21218:27 */
// Elements of the linked list at Vdbe.pAuxData
type AuxData1 = struct {
@@ -11162,10 +11886,10 @@ type AuxData1 = struct {
FpAux uintptr
FxDeleteAux uintptr
FpNextAux uintptr
-} /* sqlite3.c:1312:9 */
+} /* sqlite3.c:1331:9 */
// Elements of the linked list at Vdbe.pAuxData
-type AuxData = AuxData1 /* sqlite3.c:21043:24 */
+type AuxData = AuxData1 /* sqlite3.c:21221:24 */
// Types of VDBE cursors
@@ -11183,11 +11907,11 @@ type VdbeCursor1 = struct {
FnullRow U8
FdeferredMoveto U8
FisTable U8
- _ [3]byte
+ F__ccgo_pad1 [3]byte
FisEphemeral uint8 /* Bool isEphemeral: 1, Bool useRandomRowid: 1, Bool isOrdered: 1, Bool hasBeenDuped: 1 */
- _ [1]byte
+ F__ccgo_pad2 [1]byte
FseekHit U16
- _ [4]byte
+ F__ccgo_pad3 [4]byte
FpBtx uintptr
FseqCount I64
FaAltMap uintptr
@@ -11200,15 +11924,15 @@ type VdbeCursor1 = struct {
FpgnoRoot Pgno
FnField I16
FnHdrParsed U16
- _ [4]byte
+ F__ccgo_pad4 [4]byte
FmovetoTarget I64
FaOffset uintptr
FaRow uintptr
FpayloadSize U32
FszRow U32
FaType [1]U32
- _ [4]byte
-} /* sqlite3.c:1312:9 */
+ F__ccgo_pad5 [4]byte
+} /* sqlite3.c:1331:9 */
// Types of VDBE cursors
@@ -11220,7 +11944,7 @@ type VdbeCursor1 = struct {
// * A sorter
// * A virtual table
// * A one-row "pseudotable" stored in a single register
-type VdbeCursor = VdbeCursor1 /* sqlite3.c:21061:27 */
+type VdbeCursor = VdbeCursor1 /* sqlite3.c:21239:27 */
// A value for VdbeCursor.cacheStatus that means the cache is always invalid.
@@ -11262,7 +11986,7 @@ type VdbeFrame1 = struct {
FnChildCsr int32
FnChange int32
FnDbChange int32
-} /* sqlite3.c:1312:9 */
+} /* sqlite3.c:1331:9 */
// A value for VdbeCursor.cacheStatus that means the cache is always invalid.
@@ -11285,7 +12009,7 @@ type VdbeFrame1 = struct {
//
// The currently executing frame is stored in Vdbe.pFrame. Vdbe.pFrame is
// set to NULL if the currently executing frame is the main program.
-type VdbeFrame = VdbeFrame1 /* sqlite3.c:21148:26 */
+type VdbeFrame = VdbeFrame1 /* sqlite3.c:21326:26 */
// Magic number for sanity checking on VdbeFrame objects
@@ -11295,11 +12019,11 @@ type VdbeFrame = VdbeFrame1 /* sqlite3.c:21148:26 */
// Internally, the vdbe manipulates nearly all SQL values as Mem
// structures. Each Mem struct may cache multiple representations (string,
// integer etc.) of the same value.
-type MemValue = struct{ Fr float64 } /* sqlite3.c:1312:9 */
+type MemValue = struct{ Fr float64 } /* sqlite3.c:1331:9 */
// A bitfield type for use inside of structures. Always follow with :N where
// N is the number of bits.
-type Bft = uint32 /* sqlite3.c:21331:18 */ // Bit Field Type
+type Bft = uint32 /* sqlite3.c:21509:18 */ // Bit Field Type
// The ScanStatus object holds a single value for the
// sqlite3_stmt_scanstatus() interface.
@@ -11309,15 +12033,15 @@ type ScanStatus1 = struct {
FaddrVisit int32
FiSelectID int32
FnEst LogEst
- _ [6]byte
+ F__ccgo_pad1 [6]byte
FzName uintptr
-} /* sqlite3.c:21336:9 */
+} /* sqlite3.c:21514:9 */
// Bit Field Type
// The ScanStatus object holds a single value for the
// sqlite3_stmt_scanstatus() interface.
-type ScanStatus = ScanStatus1 /* sqlite3.c:21336:27 */
+type ScanStatus = ScanStatus1 /* sqlite3.c:21514:27 */
// The DblquoteStr object holds the text of a double-quoted
// string for a prepared statement. A linked list of these objects
@@ -11327,8 +12051,8 @@ type ScanStatus = ScanStatus1 /* sqlite3.c:21336:27 */
// identifier should really be a string literal.
type DblquoteStr1 = struct {
FpNextStr uintptr
- Fz [8]int8
-} /* sqlite3.c:21353:9 */
+ Fz [8]uint8
+} /* sqlite3.c:21531:9 */
// The DblquoteStr object holds the text of a double-quoted
// string for a prepared statement. A linked list of these objects
@@ -11336,35 +12060,35 @@ type DblquoteStr1 = struct {
// When computing a normalized SQL statement for an SQL statement, that
// list is consulted for each double-quoted identifier to see if the
// identifier should really be a string literal.
-type DblquoteStr = DblquoteStr1 /* sqlite3.c:21353:28 */
+type DblquoteStr = DblquoteStr1 /* sqlite3.c:21531:28 */
//************* End of vdbeInt.h ********************************************
//************* Continuing where we left off in status.c ********************
// Variables in which to record status information.
-type Sqlite3StatValueType = Sqlite3_int64 /* sqlite3.c:21619:23 */
+type Sqlite3StatValueType = Sqlite3_int64 /* sqlite3.c:21799:23 */
type sqlite3StatType = struct {
FnowValue [10]Sqlite3StatValueType
FmxValue [10]Sqlite3StatValueType
-} /* sqlite3.c:21623:9 */
+} /* sqlite3.c:21803:9 */
-type Sqlite3StatType = sqlite3StatType /* sqlite3.c:21623:32 */
-var sqlite3Stat = sqlite3StatType{} /* sqlite3.c:21627:3 */
+type Sqlite3StatType = sqlite3StatType /* sqlite3.c:21803:32 */
+var sqlite3Stat = sqlite3StatType{} /* sqlite3.c:21807:3 */
// Elements of sqlite3Stat[] are protected by either the memory allocator
// mutex, or by the pcache1 mutex. The following array determines which.
-var statMutex = [10]int8{
- int8(0), // SQLITE_STATUS_MEMORY_USED
- int8(1), // SQLITE_STATUS_PAGECACHE_USED
- int8(1), // SQLITE_STATUS_PAGECACHE_OVERFLOW
- int8(0), // SQLITE_STATUS_SCRATCH_USED
- int8(0), // SQLITE_STATUS_SCRATCH_OVERFLOW
- int8(0), // SQLITE_STATUS_MALLOC_SIZE
- int8(0), // SQLITE_STATUS_PARSER_STACK
- int8(1), // SQLITE_STATUS_PAGECACHE_SIZE
- int8(0), // SQLITE_STATUS_SCRATCH_SIZE
- int8(0), // SQLITE_STATUS_MALLOC_COUNT
-} /* sqlite3.c:21633:19 */
+var statMutex = [10]uint8{
+ uint8(0), // SQLITE_STATUS_MEMORY_USED
+ uint8(1), // SQLITE_STATUS_PAGECACHE_USED
+ uint8(1), // SQLITE_STATUS_PAGECACHE_OVERFLOW
+ uint8(0), // SQLITE_STATUS_SCRATCH_USED
+ uint8(0), // SQLITE_STATUS_SCRATCH_OVERFLOW
+ uint8(0), // SQLITE_STATUS_MALLOC_SIZE
+ uint8(0), // SQLITE_STATUS_PARSER_STACK
+ uint8(1), // SQLITE_STATUS_PAGECACHE_SIZE
+ uint8(0), // SQLITE_STATUS_SCRATCH_SIZE
+ uint8(0), // SQLITE_STATUS_MALLOC_COUNT
+} /* sqlite3.c:21813:19 */
// The "wsdStat" macro will resolve to the status information
// state vector. If writable static data is unsupported on the target,
@@ -11374,7 +12098,7 @@ var statMutex = [10]int8{
// Return the current value of a status parameter. The caller must
// be holding the appropriate mutex.
-func Xsqlite3StatusValue(tls *libc.TLS, op int32) Sqlite3_int64 { /* sqlite3.c:21665:30: */
+func Xsqlite3StatusValue(tls *libc.TLS, op int32) Sqlite3_int64 { /* sqlite3.c:21845:30: */
return *(*Sqlite3StatValueType)(unsafe.Pointer((uintptr(unsafe.Pointer(&sqlite3Stat)) /* &.nowValue */) + uintptr(op)*8))
}
@@ -11388,7 +12112,7 @@ func Xsqlite3StatusValue(tls *libc.TLS, op int32) Sqlite3_int64 { /* sqlite3.c:2
//
// The StatusDown() routine lowers the current value by N. The highwater
// mark is unchanged. N must be non-negative for StatusDown().
-func Xsqlite3StatusUp(tls *libc.TLS, op int32, N int32) { /* sqlite3.c:21685:21: */
+func Xsqlite3StatusUp(tls *libc.TLS, op int32, N int32) { /* sqlite3.c:21865:21: */
*(*Sqlite3StatValueType)(unsafe.Pointer((uintptr(unsafe.Pointer(&sqlite3Stat)) /* &.nowValue */) + uintptr(op)*8)) += (Sqlite3StatValueType(N))
if *(*Sqlite3StatValueType)(unsafe.Pointer((uintptr(unsafe.Pointer(&sqlite3Stat)) /* &.nowValue */) + uintptr(op)*8)) > *(*Sqlite3StatValueType)(unsafe.Pointer((uintptr(unsafe.Pointer(&sqlite3Stat)) + 80 /* &.mxValue */) + uintptr(op)*8)) {
@@ -11396,14 +12120,14 @@ func Xsqlite3StatusUp(tls *libc.TLS, op int32, N int32) { /* sqlite3.c:21685:21:
}
}
-func Xsqlite3StatusDown(tls *libc.TLS, op int32, N int32) { /* sqlite3.c:21696:21: */
+func Xsqlite3StatusDown(tls *libc.TLS, op int32, N int32) { /* sqlite3.c:21876:21: */
*(*Sqlite3StatValueType)(unsafe.Pointer((uintptr(unsafe.Pointer(&sqlite3Stat)) /* &.nowValue */) + uintptr(op)*8)) -= (Sqlite3StatValueType(N))
}
// Adjust the highwater mark if necessary.
// The caller must hold the appropriate mutex.
-func Xsqlite3StatusHighwater(tls *libc.TLS, op int32, X int32) { /* sqlite3.c:21710:21: */
+func Xsqlite3StatusHighwater(tls *libc.TLS, op int32, X int32) { /* sqlite3.c:21890:21: */
var newValue Sqlite3StatValueType
newValue = Sqlite3StatValueType(X)
@@ -11414,12 +12138,12 @@ func Xsqlite3StatusHighwater(tls *libc.TLS, op int32, X int32) { /* sqlite3.c:21
}
// Query status information.
-func Xsqlite3_status64(tls *libc.TLS, op int32, pCurrent uintptr, pHighwater uintptr, resetFlag int32) int32 { /* sqlite3.c:21730:16: */
+func Xsqlite3_status64(tls *libc.TLS, op int32, pCurrent uintptr, pHighwater uintptr, resetFlag int32) int32 { /* sqlite3.c:21910:16: */
var pMutex uintptr
_ = pMutex
if (op < 0) || (op >= (int32(uint64(unsafe.Sizeof([10]Sqlite3StatValueType{})) / uint64(unsafe.Sizeof(Sqlite3StatValueType(0)))))) {
- return Xsqlite3MisuseError(tls, 21739)
+ return Xsqlite3MisuseError(tls, 21919)
}
if statMutex[op] != 0 {
pMutex = Xsqlite3Pcache1Mutex(tls)
@@ -11437,7 +12161,7 @@ func Xsqlite3_status64(tls *libc.TLS, op int32, pCurrent uintptr, pHighwater uin
return SQLITE_OK
}
-func Xsqlite3_status(tls *libc.TLS, op int32, pCurrent uintptr, pHighwater uintptr, resetFlag int32) int32 { /* sqlite3.c:21755:16: */
+func Xsqlite3_status(tls *libc.TLS, op int32, pCurrent uintptr, pHighwater uintptr, resetFlag int32) int32 { /* sqlite3.c:21935:16: */
bp := tls.Alloc(16)
defer tls.Free(16)
@@ -11453,7 +12177,7 @@ func Xsqlite3_status(tls *libc.TLS, op int32, pCurrent uintptr, pHighwater uintp
}
// Return the number of LookasideSlot elements on the linked list
-func countLookasideSlots(tls *libc.TLS, p uintptr) U32 { /* sqlite3.c:21772:12: */
+func countLookasideSlots(tls *libc.TLS, p uintptr) U32 { /* sqlite3.c:21952:12: */
var cnt U32 = U32(0)
for p != 0 {
p = (*LookasideSlot)(unsafe.Pointer(p)).FpNext
@@ -11463,7 +12187,7 @@ func countLookasideSlots(tls *libc.TLS, p uintptr) U32 { /* sqlite3.c:21772:12:
}
// Count the number of slots of lookaside memory that are outstanding
-func Xsqlite3LookasideUsed(tls *libc.TLS, db uintptr, pHighwater uintptr) int32 { /* sqlite3.c:21784:20: */
+func Xsqlite3LookasideUsed(tls *libc.TLS, db uintptr, pHighwater uintptr) int32 { /* sqlite3.c:21964:20: */
var nInit U32 = countLookasideSlots(tls, (*Sqlite3)(unsafe.Pointer(db)).Flookaside.FpInit)
var nFree U32 = countLookasideSlots(tls, (*Sqlite3)(unsafe.Pointer(db)).Flookaside.FpFree)
nInit = nInit + (countLookasideSlots(tls, (*Sqlite3)(unsafe.Pointer(db)).Flookaside.FpSmallInit))
@@ -11475,7 +12199,7 @@ func Xsqlite3LookasideUsed(tls *libc.TLS, db uintptr, pHighwater uintptr) int32
}
// Query status information for a single database connection
-func Xsqlite3_db_status(tls *libc.TLS, db uintptr, op int32, pCurrent uintptr, pHighwater uintptr, resetFlag int32) int32 { /* sqlite3.c:21798:16: */
+func Xsqlite3_db_status(tls *libc.TLS, db uintptr, op int32, pCurrent uintptr, pHighwater uintptr, resetFlag int32) int32 { /* sqlite3.c:21978:16: */
bp := tls.Alloc(12)
defer tls.Free(12)
@@ -11568,7 +12292,7 @@ func Xsqlite3_db_status(tls *libc.TLS, db uintptr, op int32, pCurrent uintptr, p
if pSchema != uintptr(0) {
var p uintptr
- *(*int32)(unsafe.Pointer(bp /* nByte */)) += int32((uint32((*(*func(*libc.TLS, int32) int32)(unsafe.Pointer((uintptr(unsafe.Pointer(&Xsqlite3Config)) + 32 /* &.m */ + 32 /* &.xRoundup */))))(tls, int32(unsafe.Sizeof(HashElem{})))) * ((((*Schema)(unsafe.Pointer(pSchema)).FtblHash.Fcount +
+ *(*int32)(unsafe.Pointer(bp /* nByte */)) += int32((uint32((*struct{ f func(*libc.TLS, int32) int32 })(unsafe.Pointer(&struct{ uintptr }{Xsqlite3Config.Fm.FxRoundup})).f(tls, int32(unsafe.Sizeof(HashElem{})))) * ((((*Schema)(unsafe.Pointer(pSchema)).FtblHash.Fcount +
(*Schema)(unsafe.Pointer(pSchema)).FtrigHash.Fcount) +
(*Schema)(unsafe.Pointer(pSchema)).FidxHash.Fcount) +
(*Schema)(unsafe.Pointer(pSchema)).FfkeyHash.Fcount)))
@@ -11714,7 +12438,7 @@ func Xsqlite3_db_status(tls *libc.TLS, db uintptr, op int32, pCurrent uintptr, p
// #include "sqliteInt.h"
// #include
// #include
-// Copyright (C) 1991-2018 Free Software Foundation, Inc.
+// Copyright (C) 1991-2020 Free Software Foundation, Inc.
// This file is part of the GNU C Library.
//
// The GNU C Library is free software; you can redistribute it and/or
@@ -11729,11 +12453,11 @@ func Xsqlite3_db_status(tls *libc.TLS, db uintptr, op int32, pCurrent uintptr, p
//
// You should have received a copy of the GNU Lesser General Public
// License along with the GNU C Library; if not, see
-// .
+// .
// ISO C99 Standard: 7.23 Date and time
-// Copyright (C) 1991-2018 Free Software Foundation, Inc.
+// Copyright (C) 1991-2020 Free Software Foundation, Inc.
// This file is part of the GNU C Library.
//
// The GNU C Library is free software; you can redistribute it and/or
@@ -11748,9 +12472,9 @@ func Xsqlite3_db_status(tls *libc.TLS, db uintptr, op int32, pCurrent uintptr, p
//
// You should have received a copy of the GNU Lesser General Public
// License along with the GNU C Library; if not, see
-// .
+// .
-// Copyright (C) 1989-2018 Free Software Foundation, Inc.
+// Copyright (C) 1989-2019 Free Software Foundation, Inc.
//
// This file is part of GCC.
//
@@ -11782,15 +12506,6 @@ func Xsqlite3_db_status(tls *libc.TLS, db uintptr, op int32, pCurrent uintptr, p
// This avoids lossage on SunOS but only if stdtypes.h comes first.
// There's no way to win with the other order! Sun lossage.
-// On 4.3bsd-net2, make sure ansi.h is included, so we have
-// one less case to deal with in the following.
-// On FreeBSD 5, machine/ansi.h does not exist anymore...
-
-// In 4.3bsd-net2, machine/ansi.h defines these symbols, which are
-// defined if the corresponding type is *not* defined.
-// FreeBSD-2.1 defines _MACHINE_ANSI_H_ instead of _ANSI_H_.
-// NetBSD defines _I386_ANSI_H_ and _X86_64_ANSI_H_ instead of _ANSI_H_
-
// Sequent's header files use _PTRDIFF_T_ in some conflicting way.
// Just ignore it.
@@ -11827,11 +12542,6 @@ func Xsqlite3_db_status(tls *libc.TLS, db uintptr, op int32, pCurrent uintptr, p
// Define this type if we are doing the whole job,
// or if we want this type in particular.
-// In 4.3bsd-net2, leave these undefined to indicate that size_t, etc.
-// are already defined.
-// BSD/OS 3.1 and FreeBSD [23].x require the MACHINE_ANSI_H check here.
-// NetBSD 5 requires the I386_ANSI_H and X86_64_ANSI_H checks here.
-
// A null pointer constant.
// Offset of member MEMBER in a struct of type TYPE.
@@ -11839,7 +12549,7 @@ func Xsqlite3_db_status(tls *libc.TLS, db uintptr, op int32, pCurrent uintptr, p
// This defines CLOCKS_PER_SEC, which is the number of processor clock
// ticks per second, and possibly a number of other constants.
// System-dependent timing definitions. Linux version.
-// Copyright (C) 1996-2018 Free Software Foundation, Inc.
+// Copyright (C) 1996-2020 Free Software Foundation, Inc.
// This file is part of the GNU C Library.
//
// The GNU C Library is free software; you can redistribute it and/or
@@ -11854,12 +12564,12 @@ func Xsqlite3_db_status(tls *libc.TLS, db uintptr, op int32, pCurrent uintptr, p
//
// You should have received a copy of the GNU Lesser General Public
// License along with the GNU C Library; if not, see
-// .
+// .
// Never include this file directly; use instead.
// bits/types.h -- definitions of __*_t types underlying *_t types.
-// Copyright (C) 2002-2018 Free Software Foundation, Inc.
+// Copyright (C) 2002-2020 Free Software Foundation, Inc.
// This file is part of the GNU C Library.
//
// The GNU C Library is free software; you can redistribute it and/or
@@ -11874,7 +12584,7 @@ func Xsqlite3_db_status(tls *libc.TLS, db uintptr, op int32, pCurrent uintptr, p
//
// You should have received a copy of the GNU Lesser General Public
// License along with the GNU C Library; if not, see
-// .
+// .
// Never include this file directly; use instead.
@@ -11899,7 +12609,7 @@ func Xsqlite3_db_status(tls *libc.TLS, db uintptr, op int32, pCurrent uintptr, p
// Flag to indicate time is absolute.
-// Copyright (C) 1995-2018 Free Software Foundation, Inc.
+// Copyright (C) 1995-2020 Free Software Foundation, Inc.
// This file is part of the GNU C Library.
//
// The GNU C Library is free software; you can redistribute it and/or
@@ -11914,10 +12624,10 @@ func Xsqlite3_db_status(tls *libc.TLS, db uintptr, op int32, pCurrent uintptr, p
//
// You should have received a copy of the GNU Lesser General Public
// License along with the GNU C Library; if not, see
-// .
+// .
// bits/types.h -- definitions of __*_t types underlying *_t types.
-// Copyright (C) 2002-2018 Free Software Foundation, Inc.
+// Copyright (C) 2002-2020 Free Software Foundation, Inc.
// This file is part of the GNU C Library.
//
// The GNU C Library is free software; you can redistribute it and/or
@@ -11932,57 +12642,57 @@ func Xsqlite3_db_status(tls *libc.TLS, db uintptr, op int32, pCurrent uintptr, p
//
// You should have received a copy of the GNU Lesser General Public
// License along with the GNU C Library; if not, see
-// .
+// .
// Never include this file directly; use instead.
// These definitions from linux/timex.h as of 3.18.
type timex = struct {
- Fmodes uint32
- _ [4]byte
- Foffset X__syscall_slong_t
- Ffreq X__syscall_slong_t
- Fmaxerror X__syscall_slong_t
- Festerror X__syscall_slong_t
- Fstatus int32
- _ [4]byte
- Fconstant X__syscall_slong_t
- Fprecision X__syscall_slong_t
- Ftolerance X__syscall_slong_t
- Ftime struct {
+ Fmodes uint32
+ F__ccgo_pad1 [4]byte
+ Foffset X__syscall_slong_t
+ Ffreq X__syscall_slong_t
+ Fmaxerror X__syscall_slong_t
+ Festerror X__syscall_slong_t
+ Fstatus int32
+ F__ccgo_pad2 [4]byte
+ Fconstant X__syscall_slong_t
+ Fprecision X__syscall_slong_t
+ Ftolerance X__syscall_slong_t
+ Ftime struct {
Ftv_sec X__time_t
Ftv_usec X__suseconds_t
}
- Ftick X__syscall_slong_t
- Fppsfreq X__syscall_slong_t
- Fjitter X__syscall_slong_t
- Fshift int32
- _ [4]byte
- Fstabil X__syscall_slong_t
- Fjitcnt X__syscall_slong_t
- Fcalcnt X__syscall_slong_t
- Ferrcnt X__syscall_slong_t
- Fstbcnt X__syscall_slong_t
- Ftai int32
- __164 uint32 /* int : 32 */
- __168 uint32 /* int : 32 */
- __172 uint32 /* int : 32 */
- __176 uint32 /* int : 32 */
- __180 uint32 /* int : 32 */
- __184 uint32 /* int : 32 */
- __188 uint32 /* int : 32 */
- __192 uint32 /* int : 32 */
- __196 uint32 /* int : 32 */
- __200 uint32 /* int : 32 */
- __204 uint32 /* int : 32 */
+ Ftick X__syscall_slong_t
+ Fppsfreq X__syscall_slong_t
+ Fjitter X__syscall_slong_t
+ Fshift int32
+ F__ccgo_pad3 [4]byte
+ Fstabil X__syscall_slong_t
+ Fjitcnt X__syscall_slong_t
+ Fcalcnt X__syscall_slong_t
+ Ferrcnt X__syscall_slong_t
+ Fstbcnt X__syscall_slong_t
+ Ftai int32
+ __164 uint32 /* int : 32 */
+ __168 uint32 /* int : 32 */
+ __172 uint32 /* int : 32 */
+ __176 uint32 /* int : 32 */
+ __180 uint32 /* int : 32 */
+ __184 uint32 /* int : 32 */
+ __188 uint32 /* int : 32 */
+ __192 uint32 /* int : 32 */
+ __196 uint32 /* int : 32 */
+ __200 uint32 /* int : 32 */
+ __204 uint32 /* int : 32 */
} /* timex.h:26:1 */
// Many of the typedefs and structs whose official home is this header
// may also need to be defined by other headers.
// bits/types.h -- definitions of __*_t types underlying *_t types.
-// Copyright (C) 2002-2018 Free Software Foundation, Inc.
+// Copyright (C) 2002-2020 Free Software Foundation, Inc.
// This file is part of the GNU C Library.
//
// The GNU C Library is free software; you can redistribute it and/or
@@ -11997,30 +12707,30 @@ type timex = struct {
//
// You should have received a copy of the GNU Lesser General Public
// License along with the GNU C Library; if not, see
-// .
+// .
// Never include this file directly; use instead.
// ISO C `broken-down time' structure.
type tm = struct {
- Ftm_sec int32
- Ftm_min int32
- Ftm_hour int32
- Ftm_mday int32
- Ftm_mon int32
- Ftm_year int32
- Ftm_wday int32
- Ftm_yday int32
- Ftm_isdst int32
- _ [4]byte
- Ftm_gmtoff int64
- Ftm_zone uintptr
+ Ftm_sec int32
+ Ftm_min int32
+ Ftm_hour int32
+ Ftm_mday int32
+ Ftm_mon int32
+ Ftm_year int32
+ Ftm_wday int32
+ Ftm_yday int32
+ Ftm_isdst int32
+ F__ccgo_pad1 [4]byte
+ Ftm_gmtoff int64
+ Ftm_zone uintptr
} /* struct_tm.h:7:1 */
// NB: Include guard matches what uses.
// bits/types.h -- definitions of __*_t types underlying *_t types.
-// Copyright (C) 2002-2018 Free Software Foundation, Inc.
+// Copyright (C) 2002-2020 Free Software Foundation, Inc.
// This file is part of the GNU C Library.
//
// The GNU C Library is free software; you can redistribute it and/or
@@ -12035,7 +12745,7 @@ type tm = struct {
//
// You should have received a copy of the GNU Lesser General Public
// License along with the GNU C Library; if not, see
-// .
+// .
// Never include this file directly; use instead.
@@ -12059,30 +12769,30 @@ type itimerspec = struct {
// A structure for holding a single date and time.
type DateTime1 = struct {
- FiJD Sqlite3_int64
- FY int32
- FM int32
- FD int32
- Fh int32
- Fm int32
- Ftz int32
- Fs float64
- FvalidJD int8
- FrawS int8
- FvalidYMD int8
- FvalidHMS int8
- FvalidTZ int8
- FtzSet int8
- FisError int8
- _ [1]byte
-} /* sqlite3.c:22058:9 */
+ FiJD Sqlite3_int64
+ FY int32
+ FM int32
+ FD int32
+ Fh int32
+ Fm int32
+ Ftz int32
+ Fs float64
+ FvalidJD uint8
+ FrawS uint8
+ FvalidYMD uint8
+ FvalidHMS uint8
+ FvalidTZ uint8
+ FtzSet uint8
+ FisError uint8
+ F__ccgo_pad1 [1]byte
+} /* sqlite3.c:22238:9 */
// The MSVC CRT on Windows CE may not have a localtime() function.
// So declare a substitute. The substitute function itself is
// defined in "os_win.c".
// A structure for holding a single date and time.
-type DateTime = DateTime1 /* sqlite3.c:22058:25 */
+type DateTime = DateTime1 /* sqlite3.c:22238:25 */
// Convert zDate into one or more integers according to the conversion
// specifier zFormat.
@@ -12109,41 +12819,41 @@ type DateTime = DateTime1 /* sqlite3.c:22058:25 */
// the 2-digit day which is the last integer in the set.
//
// The function returns the number of successful conversions.
-func getDigits(tls *libc.TLS, zDate uintptr, zFormat uintptr, va uintptr) int32 { /* sqlite3.c:22102:12: */
+func getDigits(tls *libc.TLS, zDate uintptr, zFormat uintptr, va uintptr) int32 { /* sqlite3.c:22282:12: */
var ap Va_list
_ = ap
var cnt int32
- var nextC int8
- var N int8
- var min int8
+ var nextC uint8
+ var N uint8
+ var min uint8
var val int32
var max U16
cnt = 0
ap = va
__1:
- N = (int8(int32(*(*int8)(unsafe.Pointer(zFormat))) - '0'))
- min = (int8(int32(*(*int8)(unsafe.Pointer(zFormat + 1))) - '0'))
+ N = (uint8(int32(*(*uint8)(unsafe.Pointer(zFormat))) - '0'))
+ min = (uint8(int32(*(*uint8)(unsafe.Pointer(zFormat + 1))) - '0'))
val = 0
- max = aMx[(int32(*(*int8)(unsafe.Pointer(zFormat + 2))) - 'a')]
- nextC = *(*int8)(unsafe.Pointer(zFormat + 3))
+ max = aMx[(int32(*(*uint8)(unsafe.Pointer(zFormat + 2))) - 'a')]
+ nextC = *(*uint8)(unsafe.Pointer(zFormat + 3))
val = 0
__4:
- if !(libc.PostDecInt8(&N, 1) != 0) {
+ if !(libc.PostDecUint8(&N, 1) != 0) {
goto __5
}
- if !(!((int32(Xsqlite3CtypeMap[uint8(*(*int8)(unsafe.Pointer(zDate)))]) & 0x04) != 0)) {
+ if !(!((int32(Xsqlite3CtypeMap[uint8(*(*uint8)(unsafe.Pointer(zDate)))]) & 0x04) != 0)) {
goto __6
}
goto end_getDigits
__6:
;
- val = (((val * 10) + int32(*(*int8)(unsafe.Pointer(zDate)))) - '0')
+ val = (((val * 10) + int32(*(*uint8)(unsafe.Pointer(zDate)))) - '0')
zDate++
goto __4
__5:
;
- if !(((val < int32(min)) || (val > int32(max))) || ((int32(nextC) != 0) && (int32(nextC) != int32(*(*int8)(unsafe.Pointer(zDate)))))) {
+ if !(((val < int32(min)) || (val > int32(max))) || ((int32(nextC) != 0) && (int32(nextC) != int32(*(*uint8)(unsafe.Pointer(zDate)))))) {
goto __7
}
goto end_getDigits
@@ -12166,7 +12876,7 @@ end_getDigits:
return cnt
}
-var aMx = [6]U16{U16(12), U16(14), U16(24), U16(31), U16(59), U16(9999)} /* sqlite3.c:22105:20 */
+var aMx = [6]U16{U16(12), U16(14), U16(24), U16(31), U16(59), U16(9999)} /* sqlite3.c:22285:20 */
// Parse a timezone extension on the end of a date-time.
// The extension is of the form:
@@ -12182,7 +12892,7 @@ var aMx = [6]U16{U16(12), U16(14), U16(24), U16(31), U16(59), U16(9999)} /* sqli
// return non-zero.
//
// A missing specifier is not considered an error.
-func parseTimezone(tls *libc.TLS, zDate uintptr, p uintptr) int32 { /* sqlite3.c:22156:12: */
+func parseTimezone(tls *libc.TLS, zDate uintptr, p uintptr) int32 { /* sqlite3.c:22336:12: */
bp := tls.Alloc(24)
defer tls.Free(24)
@@ -12194,7 +12904,7 @@ func parseTimezone(tls *libc.TLS, zDate uintptr, p uintptr) int32 { /* sqlite3.c
var c int32
sgn = 0
__1:
- if !((int32(Xsqlite3CtypeMap[uint8(*(*int8)(unsafe.Pointer(zDate)))]) & 0x01) != 0) {
+ if !((int32(Xsqlite3CtypeMap[uint8(*(*uint8)(unsafe.Pointer(zDate)))]) & 0x01) != 0) {
goto __2
}
zDate++
@@ -12202,7 +12912,7 @@ __1:
__2:
;
(*DateTime)(unsafe.Pointer(p)).Ftz = 0
- c = int32(*(*int8)(unsafe.Pointer(zDate)))
+ c = int32(*(*uint8)(unsafe.Pointer(zDate)))
if !(c == '-') {
goto __3
}
@@ -12230,7 +12940,7 @@ __6:
__4:
;
zDate++
- if !(getDigits(tls, zDate, ts+273 /* "20b:20e" */, libc.VaList(bp, bp+16 /* &nHr */, bp+20 /* &nMn */)) != 2) {
+ if !(getDigits(tls, zDate, ts+325 /* "20b:20e" */, libc.VaList(bp, bp+16 /* &nHr */, bp+20 /* &nMn */)) != 2) {
goto __9
}
return 1
@@ -12240,15 +12950,15 @@ __9:
(*DateTime)(unsafe.Pointer(p)).Ftz = (sgn * (*(*int32)(unsafe.Pointer(bp + 20 /* nMn */)) + (*(*int32)(unsafe.Pointer(bp + 16 /* nHr */)) * 60)))
zulu_time:
__10:
- if !((int32(Xsqlite3CtypeMap[uint8(*(*int8)(unsafe.Pointer(zDate)))]) & 0x01) != 0) {
+ if !((int32(Xsqlite3CtypeMap[uint8(*(*uint8)(unsafe.Pointer(zDate)))]) & 0x01) != 0) {
goto __11
}
zDate++
goto __10
__11:
;
- (*DateTime)(unsafe.Pointer(p)).FtzSet = int8(1)
- return (libc.Bool32(int32(*(*int8)(unsafe.Pointer(zDate))) != 0))
+ (*DateTime)(unsafe.Pointer(p)).FtzSet = uint8(1)
+ return (libc.Bool32(int32(*(*uint8)(unsafe.Pointer(zDate))) != 0))
}
// Parse times of the form HH:MM or HH:MM:SS or HH:MM:SS.FFFF.
@@ -12256,7 +12966,7 @@ __11:
// fractional seconds FFFF can be one or more digits.
//
// Return 1 if there is a parsing error and 0 on success.
-func parseHhMmSs(tls *libc.TLS, zDate uintptr, p uintptr) int32 { /* sqlite3.c:22192:12: */
+func parseHhMmSs(tls *libc.TLS, zDate uintptr, p uintptr) int32 { /* sqlite3.c:22372:12: */
bp := tls.Alloc(36)
defer tls.Free(36)
@@ -12267,21 +12977,21 @@ func parseHhMmSs(tls *libc.TLS, zDate uintptr, p uintptr) int32 { /* sqlite3.c:2
// var s int32 at bp+32, 4
var ms float64 = 0.0
- if getDigits(tls, zDate, ts+281 /* "20c:20e" */, libc.VaList(bp, bp+24 /* &h */, bp+28 /* &m */)) != 2 {
+ if getDigits(tls, zDate, ts+333 /* "20c:20e" */, libc.VaList(bp, bp+24 /* &h */, bp+28 /* &m */)) != 2 {
return 1
}
zDate += uintptr(5)
- if int32(*(*int8)(unsafe.Pointer(zDate))) == ':' {
+ if int32(*(*uint8)(unsafe.Pointer(zDate))) == ':' {
zDate++
- if getDigits(tls, zDate, ts+289 /* "20e" */, libc.VaList(bp+16, bp+32 /* &s */)) != 1 {
+ if getDigits(tls, zDate, ts+341 /* "20e" */, libc.VaList(bp+16, bp+32 /* &s */)) != 1 {
return 1
}
zDate += uintptr(2)
- if (int32(*(*int8)(unsafe.Pointer(zDate))) == '.') && ((int32(Xsqlite3CtypeMap[uint8(*(*int8)(unsafe.Pointer(zDate + 1)))]) & 0x04) != 0) {
+ if (int32(*(*uint8)(unsafe.Pointer(zDate))) == '.') && ((int32(Xsqlite3CtypeMap[uint8(*(*uint8)(unsafe.Pointer(zDate + 1)))]) & 0x04) != 0) {
var rScale float64 = 1.0
zDate++
- for (int32(Xsqlite3CtypeMap[uint8(*(*int8)(unsafe.Pointer(zDate)))]) & 0x04) != 0 {
- ms = (((ms * 10.0) + float64(*(*int8)(unsafe.Pointer(zDate)))) - float64('0'))
+ for (int32(Xsqlite3CtypeMap[uint8(*(*uint8)(unsafe.Pointer(zDate)))]) & 0x04) != 0 {
+ ms = (((ms * 10.0) + float64(*(*uint8)(unsafe.Pointer(zDate)))) - float64('0'))
rScale = rScale * (10.0)
zDate++
}
@@ -12290,35 +13000,35 @@ func parseHhMmSs(tls *libc.TLS, zDate uintptr, p uintptr) int32 { /* sqlite3.c:2
} else {
*(*int32)(unsafe.Pointer(bp + 32 /* s */)) = 0
}
- (*DateTime)(unsafe.Pointer(p)).FvalidJD = int8(0)
- (*DateTime)(unsafe.Pointer(p)).FrawS = int8(0)
- (*DateTime)(unsafe.Pointer(p)).FvalidHMS = int8(1)
+ (*DateTime)(unsafe.Pointer(p)).FvalidJD = uint8(0)
+ (*DateTime)(unsafe.Pointer(p)).FrawS = uint8(0)
+ (*DateTime)(unsafe.Pointer(p)).FvalidHMS = uint8(1)
(*DateTime)(unsafe.Pointer(p)).Fh = *(*int32)(unsafe.Pointer(bp + 24 /* h */))
(*DateTime)(unsafe.Pointer(p)).Fm = *(*int32)(unsafe.Pointer(bp + 28 /* m */))
(*DateTime)(unsafe.Pointer(p)).Fs = (float64(*(*int32)(unsafe.Pointer(bp + 32 /* s */))) + ms)
if parseTimezone(tls, zDate, p) != 0 {
return 1
}
- (*DateTime)(unsafe.Pointer(p)).FvalidTZ = func() int8 {
+ (*DateTime)(unsafe.Pointer(p)).FvalidTZ = func() uint8 {
if (*DateTime)(unsafe.Pointer(p)).Ftz != 0 {
- return int8(1)
+ return uint8(1)
}
- return int8(0)
+ return uint8(0)
}()
return 0
}
// Put the DateTime object into its error state.
-func datetimeError(tls *libc.TLS, p uintptr) { /* sqlite3.c:22232:13: */
+func datetimeError(tls *libc.TLS, p uintptr) { /* sqlite3.c:22412:13: */
libc.Xmemset(tls, p, 0, uint64(unsafe.Sizeof(DateTime{})))
- (*DateTime)(unsafe.Pointer(p)).FisError = int8(1)
+ (*DateTime)(unsafe.Pointer(p)).FisError = uint8(1)
}
// Convert from YYYY-MM-DD HH:MM:SS to julian day. We always assume
// that the YYYY-MM-DD is according to the Gregorian calendar.
//
// Reference: Meeus page 61
-func computeJD(tls *libc.TLS, p uintptr) { /* sqlite3.c:22243:13: */
+func computeJD(tls *libc.TLS, p uintptr) { /* sqlite3.c:22423:13: */
var Y int32
var M int32
var D int32
@@ -12351,15 +13061,15 @@ func computeJD(tls *libc.TLS, p uintptr) { /* sqlite3.c:22243:13: */
B = ((2 - A) + (A / 4))
X1 = ((36525 * (Y + 4716)) / 100)
X2 = ((306001 * (M + 1)) / 10000)
- (*DateTime)(unsafe.Pointer(p)).FiJD = (Sqlite3_int64(((float64(((X1 + X2) + D) + B)) - 1524.5) * float64(86400000)))
- (*DateTime)(unsafe.Pointer(p)).FvalidJD = int8(1)
+ (*DateTime)(unsafe.Pointer(p)).FiJD = (libc.Int64FromFloat64(((float64(((X1 + X2) + D) + B)) - 1524.5) * float64(86400000)))
+ (*DateTime)(unsafe.Pointer(p)).FvalidJD = uint8(1)
if (*DateTime)(unsafe.Pointer(p)).FvalidHMS != 0 {
- *(*Sqlite3_int64)(unsafe.Pointer(p /* &.iJD */)) += ((Sqlite3_int64(((*DateTime)(unsafe.Pointer(p)).Fh * 3600000) + ((*DateTime)(unsafe.Pointer(p)).Fm * 60000))) + (Sqlite3_int64((*DateTime)(unsafe.Pointer(p)).Fs * float64(1000))))
+ *(*Sqlite3_int64)(unsafe.Pointer(p /* &.iJD */)) += ((Sqlite3_int64(((*DateTime)(unsafe.Pointer(p)).Fh * 3600000) + ((*DateTime)(unsafe.Pointer(p)).Fm * 60000))) + (libc.Int64FromFloat64((*DateTime)(unsafe.Pointer(p)).Fs * float64(1000))))
if (*DateTime)(unsafe.Pointer(p)).FvalidTZ != 0 {
*(*Sqlite3_int64)(unsafe.Pointer(p /* &.iJD */)) -= (Sqlite3_int64((*DateTime)(unsafe.Pointer(p)).Ftz * 60000))
- (*DateTime)(unsafe.Pointer(p)).FvalidYMD = int8(0)
- (*DateTime)(unsafe.Pointer(p)).FvalidHMS = int8(0)
- (*DateTime)(unsafe.Pointer(p)).FvalidTZ = int8(0)
+ (*DateTime)(unsafe.Pointer(p)).FvalidYMD = uint8(0)
+ (*DateTime)(unsafe.Pointer(p)).FvalidHMS = uint8(0)
+ (*DateTime)(unsafe.Pointer(p)).FvalidTZ = uint8(0)
}
}
}
@@ -12374,7 +13084,7 @@ func computeJD(tls *libc.TLS, p uintptr) { /* sqlite3.c:22243:13: */
// Write the result into the DateTime structure and return 0
// on success and 1 if the input string is not a well-formed
// date.
-func parseYyyyMmDd(tls *libc.TLS, zDate uintptr, p uintptr) int32 { /* sqlite3.c:22293:12: */
+func parseYyyyMmDd(tls *libc.TLS, zDate uintptr, p uintptr) int32 { /* sqlite3.c:22473:12: */
bp := tls.Alloc(36)
defer tls.Free(36)
@@ -12386,28 +13096,28 @@ func parseYyyyMmDd(tls *libc.TLS, zDate uintptr, p uintptr) int32 { /* sqlite3.c
var neg int32
- if int32(*(*int8)(unsafe.Pointer(zDate))) == '-' {
+ if int32(*(*uint8)(unsafe.Pointer(zDate))) == '-' {
zDate++
neg = 1
} else {
neg = 0
}
- if getDigits(tls, zDate, ts+293 /* "40f-21a-21d" */, libc.VaList(bp, bp+24 /* &Y */, bp+28 /* &M */, bp+32 /* &D */)) != 3 {
+ if getDigits(tls, zDate, ts+345 /* "40f-21a-21d" */, libc.VaList(bp, bp+24 /* &Y */, bp+28 /* &M */, bp+32 /* &D */)) != 3 {
return 1
}
zDate += uintptr(10)
- for ((int32(Xsqlite3CtypeMap[uint8(*(*int8)(unsafe.Pointer(zDate)))]) & 0x01) != 0) || ('T' == int32(*(*U8)(unsafe.Pointer(zDate)))) {
+ for ((int32(Xsqlite3CtypeMap[uint8(*(*uint8)(unsafe.Pointer(zDate)))]) & 0x01) != 0) || ('T' == int32(*(*U8)(unsafe.Pointer(zDate)))) {
zDate++
}
if parseHhMmSs(tls, zDate, p) == 0 {
// We got the time
- } else if int32(*(*int8)(unsafe.Pointer(zDate))) == 0 {
- (*DateTime)(unsafe.Pointer(p)).FvalidHMS = int8(0)
+ } else if int32(*(*uint8)(unsafe.Pointer(zDate))) == 0 {
+ (*DateTime)(unsafe.Pointer(p)).FvalidHMS = uint8(0)
} else {
return 1
}
- (*DateTime)(unsafe.Pointer(p)).FvalidJD = int8(0)
- (*DateTime)(unsafe.Pointer(p)).FvalidYMD = int8(1)
+ (*DateTime)(unsafe.Pointer(p)).FvalidJD = uint8(0)
+ (*DateTime)(unsafe.Pointer(p)).FvalidYMD = uint8(1)
(*DateTime)(unsafe.Pointer(p)).FY = func() int32 {
if neg != 0 {
return -*(*int32)(unsafe.Pointer(bp + 24 /* Y */))
@@ -12425,10 +13135,10 @@ func parseYyyyMmDd(tls *libc.TLS, zDate uintptr, p uintptr) int32 { /* sqlite3.c
// Set the time to the current time reported by the VFS.
//
// Return the number of errors.
-func setDateTimeToCurrent(tls *libc.TLS, context uintptr, p uintptr) int32 { /* sqlite3.c:22330:12: */
+func setDateTimeToCurrent(tls *libc.TLS, context uintptr, p uintptr) int32 { /* sqlite3.c:22510:12: */
(*DateTime)(unsafe.Pointer(p)).FiJD = Xsqlite3StmtCurrentTime(tls, context)
if (*DateTime)(unsafe.Pointer(p)).FiJD > int64(0) {
- (*DateTime)(unsafe.Pointer(p)).FvalidJD = int8(1)
+ (*DateTime)(unsafe.Pointer(p)).FvalidJD = uint8(1)
return 0
} else {
return 1
@@ -12440,12 +13150,12 @@ func setDateTimeToCurrent(tls *libc.TLS, context uintptr, p uintptr) int32 { /*
// or the number of seconds since 1970. If the value if r is within
// range of a julian day number, install it as such and set validJD.
// If the value is a valid unix timestamp, put it in p->s and set p->rawS.
-func setRawDateNumber(tls *libc.TLS, p uintptr, r float64) { /* sqlite3.c:22346:13: */
+func setRawDateNumber(tls *libc.TLS, p uintptr, r float64) { /* sqlite3.c:22526:13: */
(*DateTime)(unsafe.Pointer(p)).Fs = r
- (*DateTime)(unsafe.Pointer(p)).FrawS = int8(1)
+ (*DateTime)(unsafe.Pointer(p)).FrawS = uint8(1)
if (r >= 0.0) && (r < 5373484.5) {
- (*DateTime)(unsafe.Pointer(p)).FiJD = (Sqlite3_int64((r * 86400000.0) + 0.5))
- (*DateTime)(unsafe.Pointer(p)).FvalidJD = int8(1)
+ (*DateTime)(unsafe.Pointer(p)).FiJD = (libc.Int64FromFloat64((r * 86400000.0) + 0.5))
+ (*DateTime)(unsafe.Pointer(p)).FvalidJD = uint8(1)
}
}
@@ -12463,7 +13173,7 @@ func setRawDateNumber(tls *libc.TLS, p uintptr, r float64) { /* sqlite3.c:22346:
// (":SS.FFF") is option. The year and date can be omitted as long
// as there is a time string. The time string can be omitted as long
// as there is a year and date.
-func parseDateOrTime(tls *libc.TLS, context uintptr, zDate uintptr, p uintptr) int32 { /* sqlite3.c:22371:12: */
+func parseDateOrTime(tls *libc.TLS, context uintptr, zDate uintptr, p uintptr) int32 { /* sqlite3.c:22551:12: */
bp := tls.Alloc(8)
defer tls.Free(8)
@@ -12473,7 +13183,7 @@ func parseDateOrTime(tls *libc.TLS, context uintptr, zDate uintptr, p uintptr) i
return 0
} else if parseHhMmSs(tls, zDate, p) == 0 {
return 0
- } else if (Xsqlite3StrICmp(tls, zDate, ts+305 /* "now" */) == 0) && (Xsqlite3NotPureFunc(tls, context) != 0) {
+ } else if (Xsqlite3StrICmp(tls, zDate, ts+357 /* "now" */) == 0) && (Xsqlite3NotPureFunc(tls, context) != 0) {
return setDateTimeToCurrent(tls, context, p)
} else if Xsqlite3AtoF(tls, zDate, bp /* &r */, Xsqlite3Strlen30(tls, zDate), uint8(SQLITE_UTF8)) > 0 {
setRawDateNumber(tls, p, *(*float64)(unsafe.Pointer(bp /* r */)))
@@ -12492,12 +13202,12 @@ func parseDateOrTime(tls *libc.TLS, context uintptr, zDate uintptr, p uintptr) i
// Return TRUE if the given julian day number is within range.
//
// The input is the JulianDay times 86400000.
-func validJulianDay(tls *libc.TLS, iJD Sqlite3_int64) int32 { /* sqlite3.c:22404:12: */
+func validJulianDay(tls *libc.TLS, iJD Sqlite3_int64) int32 { /* sqlite3.c:22584:12: */
return (libc.Bool32((iJD >= int64(0)) && (iJD <= ((I64((int64(0x1a640))) << 32) | int64(0x1072fdff)))))
}
// Compute the Year, Month, and Day from the julian day number.
-func computeYMD(tls *libc.TLS, p uintptr) { /* sqlite3.c:22411:13: */
+func computeYMD(tls *libc.TLS, p uintptr) { /* sqlite3.c:22591:13: */
var Z int32
var A int32
var B int32
@@ -12517,13 +13227,13 @@ func computeYMD(tls *libc.TLS, p uintptr) { /* sqlite3.c:22411:13: */
return
} else {
Z = (int32(((*DateTime)(unsafe.Pointer(p)).FiJD + int64(43200000)) / int64(86400000)))
- A = (int32((float64(Z) - 1867216.25) / 36524.25))
+ A = (libc.Int32FromFloat64((float64(Z) - 1867216.25) / 36524.25))
A = (((Z + 1) + A) - (A / 4))
B = (A + 1524)
- C = (int32((float64(B) - 122.1) / 365.25))
+ C = (libc.Int32FromFloat64((float64(B) - 122.1) / 365.25))
D = ((36525 * (C & 32767)) / 100)
- E = (int32((float64(B - D)) / 30.6001))
- X1 = (int32(30.6001 * float64(E)))
+ E = (libc.Int32FromFloat64((float64(B - D)) / 30.6001))
+ X1 = (libc.Int32FromFloat64(30.6001 * float64(E)))
(*DateTime)(unsafe.Pointer(p)).FD = ((B - D) - X1)
(*DateTime)(unsafe.Pointer(p)).FM = func() int32 {
if E < 14 {
@@ -12538,11 +13248,11 @@ func computeYMD(tls *libc.TLS, p uintptr) { /* sqlite3.c:22411:13: */
return (C - 4715)
}()
}
- (*DateTime)(unsafe.Pointer(p)).FvalidYMD = int8(1)
+ (*DateTime)(unsafe.Pointer(p)).FvalidYMD = uint8(1)
}
// Compute the Hour, Minute, and Seconds from the julian day number.
-func computeHMS(tls *libc.TLS, p uintptr) { /* sqlite3.c:22440:13: */
+func computeHMS(tls *libc.TLS, p uintptr) { /* sqlite3.c:22620:13: */
var s int32
if (*DateTime)(unsafe.Pointer(p)).FvalidHMS != 0 {
return
@@ -12550,27 +13260,27 @@ func computeHMS(tls *libc.TLS, p uintptr) { /* sqlite3.c:22440:13: */
computeJD(tls, p)
s = (int32(((*DateTime)(unsafe.Pointer(p)).FiJD + int64(43200000)) % int64(86400000)))
(*DateTime)(unsafe.Pointer(p)).Fs = (float64(s) / 1000.0)
- s = int32((*DateTime)(unsafe.Pointer(p)).Fs)
+ s = libc.Int32FromFloat64((*DateTime)(unsafe.Pointer(p)).Fs)
*(*float64)(unsafe.Pointer(p + 32 /* &.s */)) -= (float64(s))
(*DateTime)(unsafe.Pointer(p)).Fh = (s / 3600)
s = s - ((*DateTime)(unsafe.Pointer(p)).Fh * 3600)
(*DateTime)(unsafe.Pointer(p)).Fm = (s / 60)
*(*float64)(unsafe.Pointer(p + 32 /* &.s */)) += (float64(s - ((*DateTime)(unsafe.Pointer(p)).Fm * 60)))
- (*DateTime)(unsafe.Pointer(p)).FrawS = int8(0)
- (*DateTime)(unsafe.Pointer(p)).FvalidHMS = int8(1)
+ (*DateTime)(unsafe.Pointer(p)).FrawS = uint8(0)
+ (*DateTime)(unsafe.Pointer(p)).FvalidHMS = uint8(1)
}
// Compute both YMD and HMS
-func computeYMD_HMS(tls *libc.TLS, p uintptr) { /* sqlite3.c:22459:13: */
+func computeYMD_HMS(tls *libc.TLS, p uintptr) { /* sqlite3.c:22639:13: */
computeYMD(tls, p)
computeHMS(tls, p)
}
// Clear the YMD and HMS and the TZ
-func clearYMD_HMS_TZ(tls *libc.TLS, p uintptr) { /* sqlite3.c:22467:13: */
- (*DateTime)(unsafe.Pointer(p)).FvalidYMD = int8(0)
- (*DateTime)(unsafe.Pointer(p)).FvalidHMS = int8(0)
- (*DateTime)(unsafe.Pointer(p)).FvalidTZ = int8(0)
+func clearYMD_HMS_TZ(tls *libc.TLS, p uintptr) { /* sqlite3.c:22647:13: */
+ (*DateTime)(unsafe.Pointer(p)).FvalidYMD = uint8(0)
+ (*DateTime)(unsafe.Pointer(p)).FvalidHMS = uint8(0)
+ (*DateTime)(unsafe.Pointer(p)).FvalidTZ = uint8(0)
}
// On recent Windows platforms, the localtime_s() function is available
@@ -12595,7 +13305,7 @@ func clearYMD_HMS_TZ(tls *libc.TLS, p uintptr) { /* sqlite3.c:22467:13: */
// EVIDENCE-OF: R-62172-00036 In this implementation, the standard C
// library function localtime_r() is used to assist in the calculation of
// local time.
-func osLocaltime(tls *libc.TLS, t uintptr, pTm uintptr) int32 { /* sqlite3.c:22505:12: */
+func osLocaltime(tls *libc.TLS, t uintptr, pTm uintptr) int32 { /* sqlite3.c:22685:12: */
var rc int32
var pX uintptr
var mutex uintptr = Xsqlite3MutexAlloc(tls, SQLITE_MUTEX_STATIC_MAIN)
@@ -12618,7 +13328,7 @@ func osLocaltime(tls *libc.TLS, t uintptr, pTm uintptr) int32 { /* sqlite3.c:225
//
// Or, if an error does occur, set *pRc to SQLITE_ERROR. The returned value
// is undefined in this case.
-func localtimeOffset(tls *libc.TLS, p uintptr, pCtx uintptr, pRc uintptr) Sqlite3_int64 { /* sqlite3.c:22544:22: */
+func localtimeOffset(tls *libc.TLS, p uintptr, pCtx uintptr, pRc uintptr) Sqlite3_int64 { /* sqlite3.c:22724:22: */
bp := tls.Alloc(160)
defer tls.Free(160)
@@ -12647,15 +13357,15 @@ func localtimeOffset(tls *libc.TLS, p uintptr, pCtx uintptr, pRc uintptr) Sqlite
(*DateTime)(unsafe.Pointer(bp + 56 /* &x */)).Fm = 0
(*DateTime)(unsafe.Pointer(bp + 56 /* &x */)).Fs = 0.0
} else {
- var s int32 = (int32((*DateTime)(unsafe.Pointer(bp+56 /* &x */)).Fs + 0.5))
+ var s int32 = (libc.Int32FromFloat64((*DateTime)(unsafe.Pointer(bp+56 /* &x */)).Fs + 0.5))
(*DateTime)(unsafe.Pointer(bp + 56 /* &x */)).Fs = float64(s)
}
(*DateTime)(unsafe.Pointer(bp + 56 /* &x */)).Ftz = 0
- (*DateTime)(unsafe.Pointer(bp + 56 /* &x */)).FvalidJD = int8(0)
+ (*DateTime)(unsafe.Pointer(bp + 56 /* &x */)).FvalidJD = uint8(0)
computeJD(tls, bp+56 /* &x */)
*(*Time_t)(unsafe.Pointer(bp + 104 /* t */)) = (Time_t(((*DateTime)(unsafe.Pointer(bp+56 /* &x */)).FiJD / int64(1000)) - (int64(21086676) * int64(10000))))
if osLocaltime(tls, bp+104 /* &t */, bp /* &sLocal */) != 0 {
- Xsqlite3_result_error(tls, pCtx, ts+309 /* "local time unava..." */, -1)
+ Xsqlite3_result_error(tls, pCtx, ts+361 /* "local time unava..." */, -1)
*(*int32)(unsafe.Pointer(pRc)) = SQLITE_ERROR
return int64(0)
}
@@ -12665,12 +13375,12 @@ func localtimeOffset(tls *libc.TLS, p uintptr, pCtx uintptr, pRc uintptr) Sqlite
(*DateTime)(unsafe.Pointer(bp + 112 /* &y */)).Fh = (*tm)(unsafe.Pointer(bp /* &sLocal */)).Ftm_hour
(*DateTime)(unsafe.Pointer(bp + 112 /* &y */)).Fm = (*tm)(unsafe.Pointer(bp /* &sLocal */)).Ftm_min
(*DateTime)(unsafe.Pointer(bp + 112 /* &y */)).Fs = float64((*tm)(unsafe.Pointer(bp /* &sLocal */)).Ftm_sec)
- (*DateTime)(unsafe.Pointer(bp + 112 /* &y */)).FvalidYMD = int8(1)
- (*DateTime)(unsafe.Pointer(bp + 112 /* &y */)).FvalidHMS = int8(1)
- (*DateTime)(unsafe.Pointer(bp + 112 /* &y */)).FvalidJD = int8(0)
- (*DateTime)(unsafe.Pointer(bp + 112 /* &y */)).FrawS = int8(0)
- (*DateTime)(unsafe.Pointer(bp + 112 /* &y */)).FvalidTZ = int8(0)
- (*DateTime)(unsafe.Pointer(bp + 112 /* &y */)).FisError = int8(0)
+ (*DateTime)(unsafe.Pointer(bp + 112 /* &y */)).FvalidYMD = uint8(1)
+ (*DateTime)(unsafe.Pointer(bp + 112 /* &y */)).FvalidHMS = uint8(1)
+ (*DateTime)(unsafe.Pointer(bp + 112 /* &y */)).FvalidJD = uint8(0)
+ (*DateTime)(unsafe.Pointer(bp + 112 /* &y */)).FrawS = uint8(0)
+ (*DateTime)(unsafe.Pointer(bp + 112 /* &y */)).FvalidTZ = uint8(0)
+ (*DateTime)(unsafe.Pointer(bp + 112 /* &y */)).FisError = uint8(0)
computeJD(tls, bp+112 /* &y */)
*(*int32)(unsafe.Pointer(pRc)) = SQLITE_OK
return ((*DateTime)(unsafe.Pointer(bp+112 /* &y */)).FiJD - (*DateTime)(unsafe.Pointer(bp+56 /* &x */)).FiJD)
@@ -12683,20 +13393,20 @@ func localtimeOffset(tls *libc.TLS, p uintptr, pCtx uintptr, pRc uintptr) Sqlite
// Where NNN is an arbitrary floating-point number and "days" can be one
// of several units of time.
var aXformType = [6]struct {
- FeType U8
- FnName U8
- _ [6]byte
- FzName uintptr
- FrLimit float64
- FrXform float64
+ FeType U8
+ FnName U8
+ F__ccgo_pad1 [6]byte
+ FzName uintptr
+ FrLimit float64
+ FrXform float64
}{
- {FnName: U8(6), FzName: ts + 332 /* "second" */, FrLimit: 464269060800.0, FrXform: 1000.0},
- {FnName: U8(6), FzName: ts + 339 /* "minute" */, FrLimit: 7737817680.0, FrXform: 60000.0},
- {FnName: U8(4), FzName: ts + 346 /* "hour" */, FrLimit: 128963628.0, FrXform: 3600000.0},
- {FnName: U8(3), FzName: ts + 351 /* "day" */, FrLimit: 5373485.0, FrXform: 86400000.0},
- {FeType: U8(1), FnName: U8(5), FzName: ts + 355 /* "month" */, FrLimit: 176546.0, FrXform: 2592000000.0},
- {FeType: U8(2), FnName: U8(4), FzName: ts + 361 /* "year" */, FrLimit: 14713.0, FrXform: 31536000000.0},
-} /* sqlite3.c:22615:3 */
+ {FnName: U8(6), FzName: ts + 384 /* "second" */, FrLimit: 464269060800.0, FrXform: 1000.0},
+ {FnName: U8(6), FzName: ts + 391 /* "minute" */, FrLimit: 7737817680.0, FrXform: 60000.0},
+ {FnName: U8(4), FzName: ts + 398 /* "hour" */, FrLimit: 128963628.0, FrXform: 3600000.0},
+ {FnName: U8(3), FzName: ts + 403 /* "day" */, FrLimit: 5373485.0, FrXform: 86400000.0},
+ {FeType: U8(1), FnName: U8(5), FzName: ts + 407 /* "month" */, FrLimit: 176546.0, FrXform: 2592000000.0},
+ {FeType: U8(2), FnName: U8(4), FzName: ts + 413 /* "year" */, FrLimit: 14713.0, FrXform: 31536000000.0},
+} /* sqlite3.c:22795:3 */
// Process a modifier to a date-time stamp. The modifiers are
// as follows:
@@ -12720,21 +13430,21 @@ var aXformType = [6]struct {
// is in a system call (i.e. localtime()), then an error message is written
// to context pCtx. If the error is an unrecognized modifier, no error is
// written to pCtx.
-func parseModifier(tls *libc.TLS, pCtx uintptr, z uintptr, n int32, p uintptr) int32 { /* sqlite3.c:22648:12: */
+func parseModifier(tls *libc.TLS, pCtx uintptr, z uintptr, n int32, p uintptr) int32 { /* sqlite3.c:22828:12: */
bp := tls.Alloc(64)
defer tls.Free(64)
*(*int32)(unsafe.Pointer(bp /* rc */)) = 1
// var r float64 at bp+8, 8
- switch int32(Xsqlite3UpperToLower[U8(*(*int8)(unsafe.Pointer(z)))]) {
+ switch int32(Xsqlite3UpperToLower[U8(*(*uint8)(unsafe.Pointer(z)))]) {
case 'l':
{
// localtime
//
// Assuming the current time value is UTC (a.k.a. GMT), shift it to
// show local time.
- if (Xsqlite3_stricmp(tls, z, ts+366 /* "localtime" */) == 0) && (Xsqlite3NotPureFunc(tls, pCtx) != 0) {
+ if (Xsqlite3_stricmp(tls, z, ts+418 /* "localtime" */) == 0) && (Xsqlite3NotPureFunc(tls, pCtx) != 0) {
computeJD(tls, p)
*(*Sqlite3_int64)(unsafe.Pointer(p /* &.iJD */)) += (localtimeOffset(tls, p, pCtx, bp /* &rc */))
clearYMD_HMS_TZ(tls, p)
@@ -12748,16 +13458,16 @@ func parseModifier(tls *libc.TLS, pCtx uintptr, z uintptr, n int32, p uintptr) i
//
// Treat the current value of p->s as the number of
// seconds since 1970. Convert to a real julian day number.
- if (Xsqlite3_stricmp(tls, z, ts+376 /* "unixepoch" */) == 0) && ((*DateTime)(unsafe.Pointer(p)).FrawS != 0) {
+ if (Xsqlite3_stricmp(tls, z, ts+428 /* "unixepoch" */) == 0) && ((*DateTime)(unsafe.Pointer(p)).FrawS != 0) {
*(*float64)(unsafe.Pointer(bp + 8 /* r */)) = (((*DateTime)(unsafe.Pointer(p)).Fs * 1000.0) + 210866760000000.0)
if (*(*float64)(unsafe.Pointer(bp + 8 /* r */)) >= 0.0) && (*(*float64)(unsafe.Pointer(bp + 8 /* r */)) < 464269060800000.0) {
clearYMD_HMS_TZ(tls, p)
- (*DateTime)(unsafe.Pointer(p)).FiJD = (Sqlite3_int64(*(*float64)(unsafe.Pointer(bp + 8 /* r */)) + 0.5))
- (*DateTime)(unsafe.Pointer(p)).FvalidJD = int8(1)
- (*DateTime)(unsafe.Pointer(p)).FrawS = int8(0)
+ (*DateTime)(unsafe.Pointer(p)).FiJD = (libc.Int64FromFloat64(*(*float64)(unsafe.Pointer(bp + 8 /* r */)) + 0.5))
+ (*DateTime)(unsafe.Pointer(p)).FvalidJD = uint8(1)
+ (*DateTime)(unsafe.Pointer(p)).FrawS = uint8(0)
*(*int32)(unsafe.Pointer(bp /* rc */)) = 0
}
- } else if (Xsqlite3_stricmp(tls, z, ts+386 /* "utc" */) == 0) && (Xsqlite3NotPureFunc(tls, pCtx) != 0) {
+ } else if (Xsqlite3_stricmp(tls, z, ts+438 /* "utc" */) == 0) && (Xsqlite3NotPureFunc(tls, pCtx) != 0) {
if int32((*DateTime)(unsafe.Pointer(p)).FtzSet) == 0 {
var c1 Sqlite3_int64
computeJD(tls, p)
@@ -12767,7 +13477,7 @@ func parseModifier(tls *libc.TLS, pCtx uintptr, z uintptr, n int32, p uintptr) i
clearYMD_HMS_TZ(tls, p)
*(*Sqlite3_int64)(unsafe.Pointer(p /* &.iJD */)) += (c1 - localtimeOffset(tls, p, pCtx, bp /* &rc */))
}
- (*DateTime)(unsafe.Pointer(p)).FtzSet = int8(1)
+ (*DateTime)(unsafe.Pointer(p)).FtzSet = uint8(1)
} else {
*(*int32)(unsafe.Pointer(bp /* rc */)) = SQLITE_OK
}
@@ -12782,13 +13492,13 @@ func parseModifier(tls *libc.TLS, pCtx uintptr, z uintptr, n int32, p uintptr) i
// Move the date to the same time on the next occurrence of
// weekday N where 0==Sunday, 1==Monday, and so forth. If the
// date is already on the appropriate weekday, this is a no-op.
- if ((((Xsqlite3_strnicmp(tls, z, ts+390 /* "weekday " */, 8) == 0) &&
+ if ((((Xsqlite3_strnicmp(tls, z, ts+442 /* "weekday " */, 8) == 0) &&
(Xsqlite3AtoF(tls, (z+8), bp+8 /* &r */, Xsqlite3Strlen30(tls, (z+8)), uint8(SQLITE_UTF8)) > 0)) &&
((float64(libc.AssignInt32(&n, int32(*(*float64)(unsafe.Pointer(bp + 8 /* r */)))))) == *(*float64)(unsafe.Pointer(bp + 8 /* r */)))) && (n >= 0)) && (*(*float64)(unsafe.Pointer(bp + 8 /* r */)) < float64(7)) {
var Z Sqlite3_int64
computeYMD_HMS(tls, p)
- (*DateTime)(unsafe.Pointer(p)).FvalidTZ = int8(0)
- (*DateTime)(unsafe.Pointer(p)).FvalidJD = int8(0)
+ (*DateTime)(unsafe.Pointer(p)).FvalidTZ = uint8(0)
+ (*DateTime)(unsafe.Pointer(p)).FvalidJD = uint8(0)
computeJD(tls, p)
Z = ((((*DateTime)(unsafe.Pointer(p)).FiJD + int64(129600000)) / int64(86400000)) % int64(7))
if Z > Sqlite3_int64(n) {
@@ -12807,7 +13517,7 @@ func parseModifier(tls *libc.TLS, pCtx uintptr, z uintptr, n int32, p uintptr) i
//
// Move the date backwards to the beginning of the current day,
// or month or year.
- if Xsqlite3_strnicmp(tls, z, ts+399 /* "start of " */, 9) != 0 {
+ if Xsqlite3_strnicmp(tls, z, ts+451 /* "start of " */, 9) != 0 {
break
}
if (!(int32((*DateTime)(unsafe.Pointer(p)).FvalidJD) != 0) && !(int32((*DateTime)(unsafe.Pointer(p)).FvalidYMD) != 0)) && !(int32((*DateTime)(unsafe.Pointer(p)).FvalidHMS) != 0) {
@@ -12815,20 +13525,20 @@ func parseModifier(tls *libc.TLS, pCtx uintptr, z uintptr, n int32, p uintptr) i
}
z += uintptr(9)
computeYMD(tls, p)
- (*DateTime)(unsafe.Pointer(p)).FvalidHMS = int8(1)
+ (*DateTime)(unsafe.Pointer(p)).FvalidHMS = uint8(1)
(*DateTime)(unsafe.Pointer(p)).Fh = libc.AssignPtrInt32(p+24 /* &.m */, 0)
(*DateTime)(unsafe.Pointer(p)).Fs = 0.0
- (*DateTime)(unsafe.Pointer(p)).FrawS = int8(0)
- (*DateTime)(unsafe.Pointer(p)).FvalidTZ = int8(0)
- (*DateTime)(unsafe.Pointer(p)).FvalidJD = int8(0)
- if Xsqlite3_stricmp(tls, z, ts+355 /* "month" */) == 0 {
+ (*DateTime)(unsafe.Pointer(p)).FrawS = uint8(0)
+ (*DateTime)(unsafe.Pointer(p)).FvalidTZ = uint8(0)
+ (*DateTime)(unsafe.Pointer(p)).FvalidJD = uint8(0)
+ if Xsqlite3_stricmp(tls, z, ts+407 /* "month" */) == 0 {
(*DateTime)(unsafe.Pointer(p)).FD = 1
*(*int32)(unsafe.Pointer(bp /* rc */)) = 0
- } else if Xsqlite3_stricmp(tls, z, ts+361 /* "year" */) == 0 {
+ } else if Xsqlite3_stricmp(tls, z, ts+413 /* "year" */) == 0 {
(*DateTime)(unsafe.Pointer(p)).FM = 1
(*DateTime)(unsafe.Pointer(p)).FD = 1
*(*int32)(unsafe.Pointer(bp /* rc */)) = 0
- } else if Xsqlite3_stricmp(tls, z, ts+351 /* "day" */) == 0 {
+ } else if Xsqlite3_stricmp(tls, z, ts+403 /* "day" */) == 0 {
*(*int32)(unsafe.Pointer(bp /* rc */)) = 0
}
break
@@ -12860,13 +13570,13 @@ func parseModifier(tls *libc.TLS, pCtx uintptr, z uintptr, n int32, p uintptr) i
{
var rRounder float64
var i int32
- for n = 1; ((*(*int8)(unsafe.Pointer(z + uintptr(n))) != 0) && (int32(*(*int8)(unsafe.Pointer(z + uintptr(n)))) != ':')) && !((int32(Xsqlite3CtypeMap[uint8(*(*int8)(unsafe.Pointer(z + uintptr(n))))]) & 0x01) != 0); n++ {
+ for n = 1; ((*(*uint8)(unsafe.Pointer(z + uintptr(n))) != 0) && (int32(*(*uint8)(unsafe.Pointer(z + uintptr(n)))) != ':')) && !((int32(Xsqlite3CtypeMap[uint8(*(*uint8)(unsafe.Pointer(z + uintptr(n))))]) & 0x01) != 0); n++ {
}
if Xsqlite3AtoF(tls, z, bp+8 /* &r */, n, uint8(SQLITE_UTF8)) <= 0 {
*(*int32)(unsafe.Pointer(bp /* rc */)) = 1
break
}
- if int32(*(*int8)(unsafe.Pointer(z + uintptr(n)))) == ':' {
+ if int32(*(*uint8)(unsafe.Pointer(z + uintptr(n)))) == ':' {
// A modifier of the form (+|-)HH:MM:SS.FFF adds (or subtracts) the
// specified number of hours, minutes, seconds, and fractional seconds
// to the time. The ".FFF" may be omitted. The ":SS.FFF" may be
@@ -12875,7 +13585,7 @@ func parseModifier(tls *libc.TLS, pCtx uintptr, z uintptr, n int32, p uintptr) i
// var tx DateTime at bp+16, 48
var day Sqlite3_int64
- if !((int32(Xsqlite3CtypeMap[uint8(*(*int8)(unsafe.Pointer(z2)))]) & 0x04) != 0) {
+ if !((int32(Xsqlite3CtypeMap[uint8(*(*uint8)(unsafe.Pointer(z2)))]) & 0x04) != 0) {
z2++
}
libc.Xmemset(tls, bp+16 /* &tx */, 0, uint64(unsafe.Sizeof(DateTime{})))
@@ -12886,7 +13596,7 @@ func parseModifier(tls *libc.TLS, pCtx uintptr, z uintptr, n int32, p uintptr) i
*(*Sqlite3_int64)(unsafe.Pointer(bp + 16 /* &tx */ /* &.iJD */)) -= (int64(43200000))
day = ((*DateTime)(unsafe.Pointer(bp+16 /* &tx */)).FiJD / int64(86400000))
*(*Sqlite3_int64)(unsafe.Pointer(bp + 16 /* &tx */ /* &.iJD */)) -= (day * int64(86400000))
- if int32(*(*int8)(unsafe.Pointer(z))) == '-' {
+ if int32(*(*uint8)(unsafe.Pointer(z))) == '-' {
(*DateTime)(unsafe.Pointer(bp + 16 /* &tx */)).FiJD = -(*DateTime)(unsafe.Pointer(bp + 16 /* &tx */)).FiJD
}
computeJD(tls, p)
@@ -12899,14 +13609,14 @@ func parseModifier(tls *libc.TLS, pCtx uintptr, z uintptr, n int32, p uintptr) i
// If control reaches this point, it means the transformation is
// one of the forms like "+NNN days".
z += uintptr(n)
- for (int32(Xsqlite3CtypeMap[uint8(*(*int8)(unsafe.Pointer(z)))]) & 0x01) != 0 {
+ for (int32(Xsqlite3CtypeMap[uint8(*(*uint8)(unsafe.Pointer(z)))]) & 0x01) != 0 {
z++
}
n = Xsqlite3Strlen30(tls, z)
if (n > 10) || (n < 3) {
break
}
- if int32(Xsqlite3UpperToLower[U8(*(*int8)(unsafe.Pointer(z + uintptr((n - 1)))))]) == 's' {
+ if int32(Xsqlite3UpperToLower[U8(*(*uint8)(unsafe.Pointer(z + uintptr((n - 1)))))]) == 's' {
n--
}
computeJD(tls, p)
@@ -12917,12 +13627,12 @@ func parseModifier(tls *libc.TLS, pCtx uintptr, z uintptr, n int32, p uintptr) i
rRounder = +0.5
}
for i = 0; i < (int32(uint64(unsafe.Sizeof(aXformType)) / uint64(unsafe.Sizeof(struct {
- FeType U8
- FnName U8
- _ [6]byte
- FzName uintptr
- FrLimit float64
- FrXform float64
+ FeType U8
+ FnName U8
+ F__ccgo_pad1 [6]byte
+ FzName uintptr
+ FrLimit float64
+ FrXform float64
}{})))); i++ {
if (((int32(aXformType[i].FnName) == n) &&
(Xsqlite3_strnicmp(tls, aXformType[i].FzName, z, n) == 0)) &&
@@ -12940,7 +13650,7 @@ func parseModifier(tls *libc.TLS, pCtx uintptr, z uintptr, n int32, p uintptr) i
}
*(*int32)(unsafe.Pointer(p + 8 /* &.Y */)) += (x)
*(*int32)(unsafe.Pointer(p + 12 /* &.M */)) -= (x * 12)
- (*DateTime)(unsafe.Pointer(p)).FvalidJD = int8(0)
+ (*DateTime)(unsafe.Pointer(p)).FvalidJD = uint8(0)
*(*float64)(unsafe.Pointer(bp + 8 /* r */)) -= float64(int32(*(*float64)(unsafe.Pointer(bp + 8 /* r */))))
break
@@ -12951,14 +13661,14 @@ func parseModifier(tls *libc.TLS, pCtx uintptr, z uintptr, n int32, p uintptr) i
var y int32 = int32(*(*float64)(unsafe.Pointer(bp + 8 /* r */)))
computeYMD_HMS(tls, p)
*(*int32)(unsafe.Pointer(p + 8 /* &.Y */)) += (y)
- (*DateTime)(unsafe.Pointer(p)).FvalidJD = int8(0)
+ (*DateTime)(unsafe.Pointer(p)).FvalidJD = uint8(0)
*(*float64)(unsafe.Pointer(bp + 8 /* r */)) -= float64(int32(*(*float64)(unsafe.Pointer(bp + 8 /* r */))))
break
}
}
computeJD(tls, p)
- *(*Sqlite3_int64)(unsafe.Pointer(p /* &.iJD */)) += (Sqlite3_int64((*(*float64)(unsafe.Pointer(bp + 8 /* r */)) * aXformType[i].FrXform) + rRounder))
+ *(*Sqlite3_int64)(unsafe.Pointer(p /* &.iJD */)) += (libc.Int64FromFloat64((*(*float64)(unsafe.Pointer(bp + 8 /* r */)) * aXformType[i].FrXform) + rRounder))
*(*int32)(unsafe.Pointer(bp /* rc */)) = 0
break
}
@@ -12983,7 +13693,7 @@ func parseModifier(tls *libc.TLS, pCtx uintptr, z uintptr, n int32, p uintptr) i
//
// If there are zero parameters (if even argv[0] is undefined)
// then assume a default value of "now" for argv[0].
-func isDate(tls *libc.TLS, context uintptr, argc int32, argv uintptr, p uintptr) int32 { /* sqlite3.c:22865:12: */
+func isDate(tls *libc.TLS, context uintptr, argc int32, argv uintptr, p uintptr) int32 { /* sqlite3.c:23045:12: */
var i int32
var n int32
var z uintptr
@@ -13024,7 +13734,7 @@ func isDate(tls *libc.TLS, context uintptr, argc int32, argv uintptr, p uintptr)
// julianday( TIMESTRING, MOD, MOD, ...)
//
// Return the julian day number of the date specified in the arguments
-func juliandayFunc(tls *libc.TLS, context uintptr, argc int32, argv uintptr) { /* sqlite3.c:22909:13: */
+func juliandayFunc(tls *libc.TLS, context uintptr, argc int32, argv uintptr) { /* sqlite3.c:23089:13: */
bp := tls.Alloc(48)
defer tls.Free(48)
@@ -13039,18 +13749,18 @@ func juliandayFunc(tls *libc.TLS, context uintptr, argc int32, argv uintptr) { /
// datetime( TIMESTRING, MOD, MOD, ...)
//
// Return YYYY-MM-DD HH:MM:SS
-func datetimeFunc(tls *libc.TLS, context uintptr, argc int32, argv uintptr) { /* sqlite3.c:22926:13: */
+func datetimeFunc(tls *libc.TLS, context uintptr, argc int32, argv uintptr) { /* sqlite3.c:23106:13: */
bp := tls.Alloc(196)
defer tls.Free(196)
// var x DateTime at bp+48, 48
if isDate(tls, context, argc, argv, bp+48 /* &x */) == 0 {
- // var zBuf [100]int8 at bp+96, 100
+ // var zBuf [100]uint8 at bp+96, 100
computeYMD_HMS(tls, bp+48 /* &x */)
- Xsqlite3_snprintf(tls, int32(unsafe.Sizeof([100]int8{})), bp+96 /* &zBuf[0] */, ts+409, /* "%04d-%02d-%02d %..." */
- libc.VaList(bp, (*DateTime)(unsafe.Pointer(bp+48 /* &x */)).FY, (*DateTime)(unsafe.Pointer(bp+48 /* &x */)).FM, (*DateTime)(unsafe.Pointer(bp+48 /* &x */)).FD, (*DateTime)(unsafe.Pointer(bp+48 /* &x */)).Fh, (*DateTime)(unsafe.Pointer(bp+48 /* &x */)).Fm, int32((*DateTime)(unsafe.Pointer(bp+48 /* &x */)).Fs)))
+ Xsqlite3_snprintf(tls, int32(unsafe.Sizeof([100]uint8{})), bp+96 /* &zBuf[0] */, ts+461, /* "%04d-%02d-%02d %..." */
+ libc.VaList(bp, (*DateTime)(unsafe.Pointer(bp+48 /* &x */)).FY, (*DateTime)(unsafe.Pointer(bp+48 /* &x */)).FM, (*DateTime)(unsafe.Pointer(bp+48 /* &x */)).FD, (*DateTime)(unsafe.Pointer(bp+48 /* &x */)).Fh, (*DateTime)(unsafe.Pointer(bp+48 /* &x */)).Fm, libc.Int32FromFloat64((*DateTime)(unsafe.Pointer(bp+48 /* &x */)).Fs)))
Xsqlite3_result_text(tls, context, bp+96 /* &zBuf[0] */, -1, libc.UintptrFromInt32(-1))
}
}
@@ -13058,17 +13768,17 @@ func datetimeFunc(tls *libc.TLS, context uintptr, argc int32, argv uintptr) { /*
// time( TIMESTRING, MOD, MOD, ...)
//
// Return HH:MM:SS
-func timeFunc(tls *libc.TLS, context uintptr, argc int32, argv uintptr) { /* sqlite3.c:22946:13: */
+func timeFunc(tls *libc.TLS, context uintptr, argc int32, argv uintptr) { /* sqlite3.c:23126:13: */
bp := tls.Alloc(172)
defer tls.Free(172)
// var x DateTime at bp+24, 48
if isDate(tls, context, argc, argv, bp+24 /* &x */) == 0 {
- // var zBuf [100]int8 at bp+72, 100
+ // var zBuf [100]uint8 at bp+72, 100
computeHMS(tls, bp+24 /* &x */)
- Xsqlite3_snprintf(tls, int32(unsafe.Sizeof([100]int8{})), bp+72 /* &zBuf[0] */, ts+439 /* "%02d:%02d:%02d" */, libc.VaList(bp, (*DateTime)(unsafe.Pointer(bp+24 /* &x */)).Fh, (*DateTime)(unsafe.Pointer(bp+24 /* &x */)).Fm, int32((*DateTime)(unsafe.Pointer(bp+24 /* &x */)).Fs)))
+ Xsqlite3_snprintf(tls, int32(unsafe.Sizeof([100]uint8{})), bp+72 /* &zBuf[0] */, ts+491 /* "%02d:%02d:%02d" */, libc.VaList(bp, (*DateTime)(unsafe.Pointer(bp+24 /* &x */)).Fh, (*DateTime)(unsafe.Pointer(bp+24 /* &x */)).Fm, libc.Int32FromFloat64((*DateTime)(unsafe.Pointer(bp+24 /* &x */)).Fs)))
Xsqlite3_result_text(tls, context, bp+72 /* &zBuf[0] */, -1, libc.UintptrFromInt32(-1))
}
}
@@ -13076,17 +13786,17 @@ func timeFunc(tls *libc.TLS, context uintptr, argc int32, argv uintptr) { /* sql
// date( TIMESTRING, MOD, MOD, ...)
//
// Return YYYY-MM-DD
-func dateFunc(tls *libc.TLS, context uintptr, argc int32, argv uintptr) { /* sqlite3.c:22965:13: */
+func dateFunc(tls *libc.TLS, context uintptr, argc int32, argv uintptr) { /* sqlite3.c:23145:13: */
bp := tls.Alloc(172)
defer tls.Free(172)
// var x DateTime at bp+24, 48
if isDate(tls, context, argc, argv, bp+24 /* &x */) == 0 {
- // var zBuf [100]int8 at bp+72, 100
+ // var zBuf [100]uint8 at bp+72, 100
computeYMD(tls, bp+24 /* &x */)
- Xsqlite3_snprintf(tls, int32(unsafe.Sizeof([100]int8{})), bp+72 /* &zBuf[0] */, ts+454 /* "%04d-%02d-%02d" */, libc.VaList(bp, (*DateTime)(unsafe.Pointer(bp+24 /* &x */)).FY, (*DateTime)(unsafe.Pointer(bp+24 /* &x */)).FM, (*DateTime)(unsafe.Pointer(bp+24 /* &x */)).FD))
+ Xsqlite3_snprintf(tls, int32(unsafe.Sizeof([100]uint8{})), bp+72 /* &zBuf[0] */, ts+506 /* "%04d-%02d-%02d" */, libc.VaList(bp, (*DateTime)(unsafe.Pointer(bp+24 /* &x */)).FY, (*DateTime)(unsafe.Pointer(bp+24 /* &x */)).FM, (*DateTime)(unsafe.Pointer(bp+24 /* &x */)).FD))
Xsqlite3_result_text(tls, context, bp+72 /* &zBuf[0] */, -1, libc.UintptrFromInt32(-1))
}
}
@@ -13108,7 +13818,7 @@ func dateFunc(tls *libc.TLS, context uintptr, argc int32, argv uintptr) { /* sql
// %W week of year 00-53
// %Y year 0000-9999
// %% %
-func strftimeFunc(tls *libc.TLS, context uintptr, argc int32, argv uintptr) { /* sqlite3.c:22998:13: */
+func strftimeFunc(tls *libc.TLS, context uintptr, argc int32, argv uintptr) { /* sqlite3.c:23178:13: */
bp := tls.Alloc(280)
defer tls.Free(280)
@@ -13120,7 +13830,7 @@ func strftimeFunc(tls *libc.TLS, context uintptr, argc int32, argv uintptr) { /*
var z uintptr
var db uintptr
var zFmt uintptr
- // var zBuf [100]int8 at bp+128, 100
+ // var zBuf [100]uint8 at bp+128, 100
if argc == 0 {
return
@@ -13133,12 +13843,12 @@ func strftimeFunc(tls *libc.TLS, context uintptr, argc int32, argv uintptr) { /*
i = uint64(0)
n = uint64(1)
__1:
- if !(*(*int8)(unsafe.Pointer(zFmt + uintptr(i))) != 0) {
+ if !(*(*uint8)(unsafe.Pointer(zFmt + uintptr(i))) != 0) {
goto __3
}
{
- if int32(*(*int8)(unsafe.Pointer(zFmt + uintptr(i)))) == '%' {
- switch int32(*(*int8)(unsafe.Pointer(zFmt + uintptr((i + uint64(1)))))) {
+ if int32(*(*uint8)(unsafe.Pointer(zFmt + uintptr(i)))) == '%' {
+ switch int32(*(*uint8)(unsafe.Pointer(zFmt + uintptr((i + uint64(1)))))) {
case 'd':
fallthrough
case 'H':
@@ -13192,7 +13902,7 @@ __2:
__3:
;
- if n < U64(unsafe.Sizeof([100]int8{})) {
+ if n < U64(unsafe.Sizeof([100]uint8{})) {
z = bp + 128 /* &zBuf[0] */
} else if n > U64(*(*int32)(unsafe.Pointer((db + 128 /* &.aLimit */)))) {
Xsqlite3_result_error_toobig(tls, context)
@@ -13206,14 +13916,14 @@ __3:
}
computeJD(tls, bp+80 /* &x */)
computeYMD_HMS(tls, bp+80 /* &x */)
- for i = libc.AssignUint64(&j, uint64(0)); *(*int8)(unsafe.Pointer(zFmt + uintptr(i))) != 0; i++ {
- if int32(*(*int8)(unsafe.Pointer(zFmt + uintptr(i)))) != '%' {
- *(*int8)(unsafe.Pointer(z + uintptr(libc.PostIncUint64(&j, 1)))) = *(*int8)(unsafe.Pointer(zFmt + uintptr(i)))
+ for i = libc.AssignUint64(&j, uint64(0)); *(*uint8)(unsafe.Pointer(zFmt + uintptr(i))) != 0; i++ {
+ if int32(*(*uint8)(unsafe.Pointer(zFmt + uintptr(i)))) != '%' {
+ *(*uint8)(unsafe.Pointer(z + uintptr(libc.PostIncUint64(&j, 1)))) = *(*uint8)(unsafe.Pointer(zFmt + uintptr(i)))
} else {
i++
- switch int32(*(*int8)(unsafe.Pointer(zFmt + uintptr(i)))) {
+ switch int32(*(*uint8)(unsafe.Pointer(zFmt + uintptr(i)))) {
case 'd':
- Xsqlite3_snprintf(tls, 3, (z + uintptr(j)), ts+469 /* "%02d" */, libc.VaList(bp, (*DateTime)(unsafe.Pointer(bp+80 /* &x */)).FD))
+ Xsqlite3_snprintf(tls, 3, (z + uintptr(j)), ts+521 /* "%02d" */, libc.VaList(bp, (*DateTime)(unsafe.Pointer(bp+80 /* &x */)).FD))
j = j + (uint64(2))
break
fallthrough
@@ -13223,14 +13933,14 @@ __3:
if s > 59.999 {
s = 59.999
}
- Xsqlite3_snprintf(tls, 7, (z + uintptr(j)), ts+474 /* "%06.3f" */, libc.VaList(bp+8, s))
+ Xsqlite3_snprintf(tls, 7, (z + uintptr(j)), ts+526 /* "%06.3f" */, libc.VaList(bp+8, s))
j = j + (Size_t(Xsqlite3Strlen30(tls, (z + uintptr(j)))))
break
}
fallthrough
case 'H':
- Xsqlite3_snprintf(tls, 3, (z + uintptr(j)), ts+469 /* "%02d" */, libc.VaList(bp+16, (*DateTime)(unsafe.Pointer(bp+80 /* &x */)).Fh))
+ Xsqlite3_snprintf(tls, 3, (z + uintptr(j)), ts+521 /* "%02d" */, libc.VaList(bp+16, (*DateTime)(unsafe.Pointer(bp+80 /* &x */)).Fh))
j = j + (uint64(2))
break
fallthrough
@@ -13240,18 +13950,18 @@ __3:
{
var nDay int32 // Number of days since 1st day of year
*(*DateTime)(unsafe.Pointer(bp + 232 /* y */)) = *(*DateTime)(unsafe.Pointer(bp + 80 /* x */))
- (*DateTime)(unsafe.Pointer(bp + 232 /* &y */)).FvalidJD = int8(0)
+ (*DateTime)(unsafe.Pointer(bp + 232 /* &y */)).FvalidJD = uint8(0)
(*DateTime)(unsafe.Pointer(bp + 232 /* &y */)).FM = 1
(*DateTime)(unsafe.Pointer(bp + 232 /* &y */)).FD = 1
computeJD(tls, bp+232 /* &y */)
nDay = (int32((((*DateTime)(unsafe.Pointer(bp+80 /* &x */)).FiJD - (*DateTime)(unsafe.Pointer(bp+232 /* &y */)).FiJD) + int64(43200000)) / int64(86400000)))
- if int32(*(*int8)(unsafe.Pointer(zFmt + uintptr(i)))) == 'W' {
+ if int32(*(*uint8)(unsafe.Pointer(zFmt + uintptr(i)))) == 'W' {
var wd int32 // 0=Monday, 1=Tuesday, ... 6=Sunday
wd = (int32((((*DateTime)(unsafe.Pointer(bp+80 /* &x */)).FiJD + int64(43200000)) / int64(86400000)) % int64(7)))
- Xsqlite3_snprintf(tls, 3, (z + uintptr(j)), ts+469 /* "%02d" */, libc.VaList(bp+24, (((nDay+7)-wd)/7)))
+ Xsqlite3_snprintf(tls, 3, (z + uintptr(j)), ts+521 /* "%02d" */, libc.VaList(bp+24, (((nDay+7)-wd)/7)))
j = j + (uint64(2))
} else {
- Xsqlite3_snprintf(tls, 4, (z + uintptr(j)), ts+481 /* "%03d" */, libc.VaList(bp+32, (nDay+1)))
+ Xsqlite3_snprintf(tls, 4, (z + uintptr(j)), ts+533 /* "%03d" */, libc.VaList(bp+32, (nDay+1)))
j = j + (uint64(3))
}
break
@@ -13260,19 +13970,19 @@ __3:
fallthrough
case 'J':
{
- Xsqlite3_snprintf(tls, 20, (z + uintptr(j)), ts+486 /* "%.16g" */, libc.VaList(bp+40, (float64((*DateTime)(unsafe.Pointer(bp+80 /* &x */)).FiJD)/86400000.0)))
+ Xsqlite3_snprintf(tls, 20, (z + uintptr(j)), ts+538 /* "%.16g" */, libc.VaList(bp+40, (float64((*DateTime)(unsafe.Pointer(bp+80 /* &x */)).FiJD)/86400000.0)))
j = j + (Size_t(Xsqlite3Strlen30(tls, (z + uintptr(j)))))
break
}
fallthrough
case 'm':
- Xsqlite3_snprintf(tls, 3, (z + uintptr(j)), ts+469 /* "%02d" */, libc.VaList(bp+48, (*DateTime)(unsafe.Pointer(bp+80 /* &x */)).FM))
+ Xsqlite3_snprintf(tls, 3, (z + uintptr(j)), ts+521 /* "%02d" */, libc.VaList(bp+48, (*DateTime)(unsafe.Pointer(bp+80 /* &x */)).FM))
j = j + (uint64(2))
break
fallthrough
case 'M':
- Xsqlite3_snprintf(tls, 3, (z + uintptr(j)), ts+469 /* "%02d" */, libc.VaList(bp+56, (*DateTime)(unsafe.Pointer(bp+80 /* &x */)).Fm))
+ Xsqlite3_snprintf(tls, 3, (z + uintptr(j)), ts+521 /* "%02d" */, libc.VaList(bp+56, (*DateTime)(unsafe.Pointer(bp+80 /* &x */)).Fm))
j = j + (uint64(2))
break
fallthrough
@@ -13286,32 +13996,32 @@ __3:
}
fallthrough
case 'S':
- Xsqlite3_snprintf(tls, 3, (z + uintptr(j)), ts+469 /* "%02d" */, libc.VaList(bp+64, int32((*DateTime)(unsafe.Pointer(bp+80 /* &x */)).Fs)))
+ Xsqlite3_snprintf(tls, 3, (z + uintptr(j)), ts+521 /* "%02d" */, libc.VaList(bp+64, libc.Int32FromFloat64((*DateTime)(unsafe.Pointer(bp+80 /* &x */)).Fs)))
j = j + (uint64(2))
break
fallthrough
case 'w':
{
- *(*int8)(unsafe.Pointer(z + uintptr(libc.PostIncUint64(&j, 1)))) = (int8(int32((int8((((*DateTime)(unsafe.Pointer(bp+80 /* &x */)).FiJD + int64(129600000)) / int64(86400000)) % int64(7)))) + '0'))
+ *(*uint8)(unsafe.Pointer(z + uintptr(libc.PostIncUint64(&j, 1)))) = (uint8(int32((uint8((((*DateTime)(unsafe.Pointer(bp+80 /* &x */)).FiJD + int64(129600000)) / int64(86400000)) % int64(7)))) + '0'))
break
}
fallthrough
case 'Y':
{
- Xsqlite3_snprintf(tls, 5, (z + uintptr(j)), ts+492 /* "%04d" */, libc.VaList(bp+72, (*DateTime)(unsafe.Pointer(bp+80 /* &x */)).FY))
+ Xsqlite3_snprintf(tls, 5, (z + uintptr(j)), ts+544 /* "%04d" */, libc.VaList(bp+72, (*DateTime)(unsafe.Pointer(bp+80 /* &x */)).FY))
j = j + (Size_t(Xsqlite3Strlen30(tls, (z + uintptr(j)))))
break
}
fallthrough
default:
- *(*int8)(unsafe.Pointer(z + uintptr(libc.PostIncUint64(&j, 1)))) = int8('%')
+ *(*uint8)(unsafe.Pointer(z + uintptr(libc.PostIncUint64(&j, 1)))) = uint8('%')
break
}
}
}
- *(*int8)(unsafe.Pointer(z + uintptr(j))) = int8(0)
+ *(*uint8)(unsafe.Pointer(z + uintptr(j))) = uint8(0)
Xsqlite3_result_text(tls, context, z, -1,
func() uintptr {
if z == bp+128 /* zBuf */ {
@@ -13324,7 +14034,7 @@ __3:
// current_time()
//
// This function returns the same value as time('now').
-func ctimeFunc(tls *libc.TLS, context uintptr, NotUsed int32, NotUsed2 uintptr) { /* sqlite3.c:23136:13: */
+func ctimeFunc(tls *libc.TLS, context uintptr, NotUsed int32, NotUsed2 uintptr) { /* sqlite3.c:23316:13: */
_ = NotUsed
_ = NotUsed2
timeFunc(tls, context, 0, uintptr(0))
@@ -13333,7 +14043,7 @@ func ctimeFunc(tls *libc.TLS, context uintptr, NotUsed int32, NotUsed2 uintptr)
// current_date()
//
// This function returns the same value as date('now').
-func cdateFunc(tls *libc.TLS, context uintptr, NotUsed int32, NotUsed2 uintptr) { /* sqlite3.c:23150:13: */
+func cdateFunc(tls *libc.TLS, context uintptr, NotUsed int32, NotUsed2 uintptr) { /* sqlite3.c:23330:13: */
_ = NotUsed
_ = NotUsed2
dateFunc(tls, context, 0, uintptr(0))
@@ -13342,7 +14052,7 @@ func cdateFunc(tls *libc.TLS, context uintptr, NotUsed int32, NotUsed2 uintptr)
// current_timestamp()
//
// This function returns the same value as datetime('now').
-func ctimestampFunc(tls *libc.TLS, context uintptr, NotUsed int32, NotUsed2 uintptr) { /* sqlite3.c:23164:13: */
+func ctimestampFunc(tls *libc.TLS, context uintptr, NotUsed int32, NotUsed2 uintptr) { /* sqlite3.c:23344:13: */
_ = NotUsed
_ = NotUsed2
datetimeFunc(tls, context, 0, uintptr(0))
@@ -13351,19 +14061,19 @@ func ctimestampFunc(tls *libc.TLS, context uintptr, NotUsed int32, NotUsed2 uint
// This function registered all of the above C functions as SQL
// functions. This should be the only routine in this file with
// external linkage.
-func Xsqlite3RegisterDateTimeFunctions(tls *libc.TLS) { /* sqlite3.c:23224:21: */
+func Xsqlite3RegisterDateTimeFunctions(tls *libc.TLS) { /* sqlite3.c:23404:21: */
Xsqlite3InsertBuiltinFuncs(tls, uintptr(unsafe.Pointer(&aDateTimeFuncs)), (int32(uint64(unsafe.Sizeof(aDateTimeFuncs)) / uint64(unsafe.Sizeof(FuncDef{})))))
}
var aDateTimeFuncs = [8]FuncDef{
- {FnArg: int8(-1), FfuncFlags: (U32((SQLITE_FUNC_SLOCHNG | SQLITE_UTF8) | SQLITE_FUNC_CONSTANT)), FpUserData: 0, FxSFunc: 0, FzName: ts + 497 /* "julianday" */},
- {FnArg: int8(-1), FfuncFlags: (U32((SQLITE_FUNC_SLOCHNG | SQLITE_UTF8) | SQLITE_FUNC_CONSTANT)), FpUserData: 0, FxSFunc: 0, FzName: ts + 507 /* "date" */},
- {FnArg: int8(-1), FfuncFlags: (U32((SQLITE_FUNC_SLOCHNG | SQLITE_UTF8) | SQLITE_FUNC_CONSTANT)), FpUserData: 0, FxSFunc: 0, FzName: ts + 512 /* "time" */},
- {FnArg: int8(-1), FfuncFlags: (U32((SQLITE_FUNC_SLOCHNG | SQLITE_UTF8) | SQLITE_FUNC_CONSTANT)), FpUserData: 0, FxSFunc: 0, FzName: ts + 517 /* "datetime" */},
- {FnArg: int8(-1), FfuncFlags: (U32((SQLITE_FUNC_SLOCHNG | SQLITE_UTF8) | SQLITE_FUNC_CONSTANT)), FpUserData: 0, FxSFunc: 0, FzName: ts + 526 /* "strftime" */},
- {FfuncFlags: (U32(SQLITE_FUNC_SLOCHNG | SQLITE_UTF8)), FxSFunc: 0, FzName: ts + 535 /* "current_time" */},
- {FfuncFlags: (U32(SQLITE_FUNC_SLOCHNG | SQLITE_UTF8)), FxSFunc: 0, FzName: ts + 548 /* "current_timestam..." */},
- {FfuncFlags: (U32(SQLITE_FUNC_SLOCHNG | SQLITE_UTF8)), FxSFunc: 0, FzName: ts + 566 /* "current_date" */}} /* sqlite3.c:23225:18 */
+ {FnArg: int8(-1), FfuncFlags: (U32((SQLITE_FUNC_SLOCHNG | SQLITE_UTF8) | SQLITE_FUNC_CONSTANT)), FpUserData: 0, FxSFunc: 0, FzName: ts + 549 /* "julianday" */},
+ {FnArg: int8(-1), FfuncFlags: (U32((SQLITE_FUNC_SLOCHNG | SQLITE_UTF8) | SQLITE_FUNC_CONSTANT)), FpUserData: 0, FxSFunc: 0, FzName: ts + 559 /* "date" */},
+ {FnArg: int8(-1), FfuncFlags: (U32((SQLITE_FUNC_SLOCHNG | SQLITE_UTF8) | SQLITE_FUNC_CONSTANT)), FpUserData: 0, FxSFunc: 0, FzName: ts + 564 /* "time" */},
+ {FnArg: int8(-1), FfuncFlags: (U32((SQLITE_FUNC_SLOCHNG | SQLITE_UTF8) | SQLITE_FUNC_CONSTANT)), FpUserData: 0, FxSFunc: 0, FzName: ts + 569 /* "datetime" */},
+ {FnArg: int8(-1), FfuncFlags: (U32((SQLITE_FUNC_SLOCHNG | SQLITE_UTF8) | SQLITE_FUNC_CONSTANT)), FpUserData: 0, FxSFunc: 0, FzName: ts + 578 /* "strftime" */},
+ {FfuncFlags: (U32(SQLITE_FUNC_SLOCHNG | SQLITE_UTF8)), FxSFunc: 0, FzName: ts + 587 /* "current_time" */},
+ {FfuncFlags: (U32(SQLITE_FUNC_SLOCHNG | SQLITE_UTF8)), FxSFunc: 0, FzName: ts + 600 /* "current_timestam..." */},
+ {FfuncFlags: (U32(SQLITE_FUNC_SLOCHNG | SQLITE_UTF8)), FxSFunc: 0, FzName: ts + 618 /* "current_date" */}} /* sqlite3.c:23405:18 */
//************* End of date.c ***********************************************
//************* Begin file os.c *********************************************
@@ -13415,52 +14125,70 @@ var aDateTimeFuncs = [8]FuncDef{
// of the sqlite3_file object. This is mostly just syntactic sugar. All
// of this would be completely automatic if SQLite were coded using
// C++ instead of plain old C.
-func Xsqlite3OsClose(tls *libc.TLS, pId uintptr) { /* sqlite3.c:23327:21: */
+func Xsqlite3OsClose(tls *libc.TLS, pId uintptr) { /* sqlite3.c:23507:21: */
if (*Sqlite3_file)(unsafe.Pointer(pId)).FpMethods != 0 {
- (*(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(((*Sqlite3_file)(unsafe.Pointer(pId)).FpMethods + 8 /* &.xClose */))))(tls, pId)
+ (*struct {
+ f func(*libc.TLS, uintptr) int32
+ })(unsafe.Pointer(&struct{ uintptr }{(*sqlite3_io_methods)(unsafe.Pointer((*Sqlite3_file)(unsafe.Pointer(pId)).FpMethods)).FxClose})).f(tls, pId)
(*Sqlite3_file)(unsafe.Pointer(pId)).FpMethods = uintptr(0)
}
}
-func Xsqlite3OsRead(tls *libc.TLS, id uintptr, pBuf uintptr, amt int32, offset I64) int32 { /* sqlite3.c:23333:20: */
+func Xsqlite3OsRead(tls *libc.TLS, id uintptr, pBuf uintptr, amt int32, offset I64) int32 { /* sqlite3.c:23513:20: */
- return (*(*func(*libc.TLS, uintptr, uintptr, int32, Sqlite3_int64) int32)(unsafe.Pointer(((*Sqlite3_file)(unsafe.Pointer(id)).FpMethods + 16 /* &.xRead */))))(tls, id, pBuf, amt, offset)
+ return (*struct {
+ f func(*libc.TLS, uintptr, uintptr, int32, Sqlite3_int64) int32
+ })(unsafe.Pointer(&struct{ uintptr }{(*sqlite3_io_methods)(unsafe.Pointer((*Sqlite3_file)(unsafe.Pointer(id)).FpMethods)).FxRead})).f(tls, id, pBuf, amt, offset)
}
-func Xsqlite3OsWrite(tls *libc.TLS, id uintptr, pBuf uintptr, amt int32, offset I64) int32 { /* sqlite3.c:23337:20: */
+func Xsqlite3OsWrite(tls *libc.TLS, id uintptr, pBuf uintptr, amt int32, offset I64) int32 { /* sqlite3.c:23517:20: */
- return (*(*func(*libc.TLS, uintptr, uintptr, int32, Sqlite3_int64) int32)(unsafe.Pointer(((*Sqlite3_file)(unsafe.Pointer(id)).FpMethods + 24 /* &.xWrite */))))(tls, id, pBuf, amt, offset)
+ return (*struct {
+ f func(*libc.TLS, uintptr, uintptr, int32, Sqlite3_int64) int32
+ })(unsafe.Pointer(&struct{ uintptr }{(*sqlite3_io_methods)(unsafe.Pointer((*Sqlite3_file)(unsafe.Pointer(id)).FpMethods)).FxWrite})).f(tls, id, pBuf, amt, offset)
}
-func Xsqlite3OsTruncate(tls *libc.TLS, id uintptr, size I64) int32 { /* sqlite3.c:23341:20: */
- return (*(*func(*libc.TLS, uintptr, Sqlite3_int64) int32)(unsafe.Pointer(((*Sqlite3_file)(unsafe.Pointer(id)).FpMethods + 32 /* &.xTruncate */))))(tls, id, size)
+func Xsqlite3OsTruncate(tls *libc.TLS, id uintptr, size I64) int32 { /* sqlite3.c:23521:20: */
+ return (*struct {
+ f func(*libc.TLS, uintptr, Sqlite3_int64) int32
+ })(unsafe.Pointer(&struct{ uintptr }{(*sqlite3_io_methods)(unsafe.Pointer((*Sqlite3_file)(unsafe.Pointer(id)).FpMethods)).FxTruncate})).f(tls, id, size)
}
-func Xsqlite3OsSync(tls *libc.TLS, id uintptr, flags int32) int32 { /* sqlite3.c:23344:20: */
+func Xsqlite3OsSync(tls *libc.TLS, id uintptr, flags int32) int32 { /* sqlite3.c:23524:20: */
if flags != 0 {
- return (*(*func(*libc.TLS, uintptr, int32) int32)(unsafe.Pointer(((*Sqlite3_file)(unsafe.Pointer(id)).FpMethods + 40 /* &.xSync */))))(tls, id, flags)
+ return (*struct {
+ f func(*libc.TLS, uintptr, int32) int32
+ })(unsafe.Pointer(&struct{ uintptr }{(*sqlite3_io_methods)(unsafe.Pointer((*Sqlite3_file)(unsafe.Pointer(id)).FpMethods)).FxSync})).f(tls, id, flags)
}
return SQLITE_OK
}
-func Xsqlite3OsFileSize(tls *libc.TLS, id uintptr, pSize uintptr) int32 { /* sqlite3.c:23348:20: */
+func Xsqlite3OsFileSize(tls *libc.TLS, id uintptr, pSize uintptr) int32 { /* sqlite3.c:23528:20: */
- return (*(*func(*libc.TLS, uintptr, uintptr) int32)(unsafe.Pointer(((*Sqlite3_file)(unsafe.Pointer(id)).FpMethods + 48 /* &.xFileSize */))))(tls, id, pSize)
+ return (*struct {
+ f func(*libc.TLS, uintptr, uintptr) int32
+ })(unsafe.Pointer(&struct{ uintptr }{(*sqlite3_io_methods)(unsafe.Pointer((*Sqlite3_file)(unsafe.Pointer(id)).FpMethods)).FxFileSize})).f(tls, id, pSize)
}
-func Xsqlite3OsLock(tls *libc.TLS, id uintptr, lockType int32) int32 { /* sqlite3.c:23352:20: */
+func Xsqlite3OsLock(tls *libc.TLS, id uintptr, lockType int32) int32 { /* sqlite3.c:23532:20: */
- return (*(*func(*libc.TLS, uintptr, int32) int32)(unsafe.Pointer(((*Sqlite3_file)(unsafe.Pointer(id)).FpMethods + 56 /* &.xLock */))))(tls, id, lockType)
+ return (*struct {
+ f func(*libc.TLS, uintptr, int32) int32
+ })(unsafe.Pointer(&struct{ uintptr }{(*sqlite3_io_methods)(unsafe.Pointer((*Sqlite3_file)(unsafe.Pointer(id)).FpMethods)).FxLock})).f(tls, id, lockType)
}
-func Xsqlite3OsUnlock(tls *libc.TLS, id uintptr, lockType int32) int32 { /* sqlite3.c:23356:20: */
- return (*(*func(*libc.TLS, uintptr, int32) int32)(unsafe.Pointer(((*Sqlite3_file)(unsafe.Pointer(id)).FpMethods + 64 /* &.xUnlock */))))(tls, id, lockType)
+func Xsqlite3OsUnlock(tls *libc.TLS, id uintptr, lockType int32) int32 { /* sqlite3.c:23536:20: */
+ return (*struct {
+ f func(*libc.TLS, uintptr, int32) int32
+ })(unsafe.Pointer(&struct{ uintptr }{(*sqlite3_io_methods)(unsafe.Pointer((*Sqlite3_file)(unsafe.Pointer(id)).FpMethods)).FxUnlock})).f(tls, id, lockType)
}
-func Xsqlite3OsCheckReservedLock(tls *libc.TLS, id uintptr, pResOut uintptr) int32 { /* sqlite3.c:23359:20: */
+func Xsqlite3OsCheckReservedLock(tls *libc.TLS, id uintptr, pResOut uintptr) int32 { /* sqlite3.c:23539:20: */
- return (*(*func(*libc.TLS, uintptr, uintptr) int32)(unsafe.Pointer(((*Sqlite3_file)(unsafe.Pointer(id)).FpMethods + 72 /* &.xCheckReservedLock */))))(tls, id, pResOut)
+ return (*struct {
+ f func(*libc.TLS, uintptr, uintptr) int32
+ })(unsafe.Pointer(&struct{ uintptr }{(*sqlite3_io_methods)(unsafe.Pointer((*Sqlite3_file)(unsafe.Pointer(id)).FpMethods)).FxCheckReservedLock})).f(tls, id, pResOut)
}
// Use sqlite3OsFileControl() when we are doing something that might fail
@@ -13469,133 +14197,178 @@ func Xsqlite3OsCheckReservedLock(tls *libc.TLS, id uintptr, pResOut uintptr) int
// really care if the VFS receives and understands the information since it
// is only a hint and can be safely ignored. The sqlite3OsFileControlHint()
// routine has no return value since the return value would be meaningless.
-func Xsqlite3OsFileControl(tls *libc.TLS, id uintptr, op int32, pArg uintptr) int32 { /* sqlite3.c:23372:20: */
+func Xsqlite3OsFileControl(tls *libc.TLS, id uintptr, op int32, pArg uintptr) int32 { /* sqlite3.c:23552:20: */
if (*Sqlite3_file)(unsafe.Pointer(id)).FpMethods == uintptr(0) {
return SQLITE_NOTFOUND
}
- return (*(*func(*libc.TLS, uintptr, int32, uintptr) int32)(unsafe.Pointer(((*Sqlite3_file)(unsafe.Pointer(id)).FpMethods + 80 /* &.xFileControl */))))(tls, id, op, pArg)
+ return (*struct {
+ f func(*libc.TLS, uintptr, int32, uintptr) int32
+ })(unsafe.Pointer(&struct{ uintptr }{(*sqlite3_io_methods)(unsafe.Pointer((*Sqlite3_file)(unsafe.Pointer(id)).FpMethods)).FxFileControl})).f(tls, id, op, pArg)
}
-func Xsqlite3OsFileControlHint(tls *libc.TLS, id uintptr, op int32, pArg uintptr) { /* sqlite3.c:23400:21: */
+func Xsqlite3OsFileControlHint(tls *libc.TLS, id uintptr, op int32, pArg uintptr) { /* sqlite3.c:23580:21: */
if (*Sqlite3_file)(unsafe.Pointer(id)).FpMethods != 0 {
- (*(*func(*libc.TLS, uintptr, int32, uintptr) int32)(unsafe.Pointer(((*Sqlite3_file)(unsafe.Pointer(id)).FpMethods + 80 /* &.xFileControl */))))(tls, id, op, pArg)
+ (*struct {
+ f func(*libc.TLS, uintptr, int32, uintptr) int32
+ })(unsafe.Pointer(&struct{ uintptr }{(*sqlite3_io_methods)(unsafe.Pointer((*Sqlite3_file)(unsafe.Pointer(id)).FpMethods)).FxFileControl})).f(tls, id, op, pArg)
}
}
-func Xsqlite3OsSectorSize(tls *libc.TLS, id uintptr) int32 { /* sqlite3.c:23404:20: */
+func Xsqlite3OsSectorSize(tls *libc.TLS, id uintptr) int32 { /* sqlite3.c:23584:20: */
var xSectorSize uintptr = (*sqlite3_io_methods)(unsafe.Pointer((*Sqlite3_file)(unsafe.Pointer(id)).FpMethods)).FxSectorSize
return func() int32 {
if xSectorSize != 0 {
- return (*(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(&xSectorSize)))(tls, id)
+ return (*struct {
+ f func(*libc.TLS, uintptr) int32
+ })(unsafe.Pointer(&struct{ uintptr }{xSectorSize})).f(tls, id)
}
return SQLITE_DEFAULT_SECTOR_SIZE
}()
}
-func Xsqlite3OsDeviceCharacteristics(tls *libc.TLS, id uintptr) int32 { /* sqlite3.c:23408:20: */
- return (*(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(((*Sqlite3_file)(unsafe.Pointer(id)).FpMethods + 96 /* &.xDeviceCharacteristics */))))(tls, id)
+func Xsqlite3OsDeviceCharacteristics(tls *libc.TLS, id uintptr) int32 { /* sqlite3.c:23588:20: */
+ return (*struct {
+ f func(*libc.TLS, uintptr) int32
+ })(unsafe.Pointer(&struct{ uintptr }{(*sqlite3_io_methods)(unsafe.Pointer((*Sqlite3_file)(unsafe.Pointer(id)).FpMethods)).FxDeviceCharacteristics})).f(tls, id)
}
-func Xsqlite3OsShmLock(tls *libc.TLS, id uintptr, offset int32, n int32, flags int32) int32 { /* sqlite3.c:23412:20: */
- return (*(*func(*libc.TLS, uintptr, int32, int32, int32) int32)(unsafe.Pointer(((*Sqlite3_file)(unsafe.Pointer(id)).FpMethods + 112 /* &.xShmLock */))))(tls, id, offset, n, flags)
+func Xsqlite3OsShmLock(tls *libc.TLS, id uintptr, offset int32, n int32, flags int32) int32 { /* sqlite3.c:23592:20: */
+ return (*struct {
+ f func(*libc.TLS, uintptr, int32, int32, int32) int32
+ })(unsafe.Pointer(&struct{ uintptr }{(*sqlite3_io_methods)(unsafe.Pointer((*Sqlite3_file)(unsafe.Pointer(id)).FpMethods)).FxShmLock})).f(tls, id, offset, n, flags)
}
-func Xsqlite3OsShmBarrier(tls *libc.TLS, id uintptr) { /* sqlite3.c:23415:21: */
- (*(*func(*libc.TLS, uintptr))(unsafe.Pointer(((*Sqlite3_file)(unsafe.Pointer(id)).FpMethods + 120 /* &.xShmBarrier */))))(tls, id)
+func Xsqlite3OsShmBarrier(tls *libc.TLS, id uintptr) { /* sqlite3.c:23595:21: */
+ (*struct{ f func(*libc.TLS, uintptr) })(unsafe.Pointer(&struct{ uintptr }{(*sqlite3_io_methods)(unsafe.Pointer((*Sqlite3_file)(unsafe.Pointer(id)).FpMethods)).FxShmBarrier})).f(tls, id)
}
-func Xsqlite3OsShmUnmap(tls *libc.TLS, id uintptr, deleteFlag int32) int32 { /* sqlite3.c:23418:20: */
- return (*(*func(*libc.TLS, uintptr, int32) int32)(unsafe.Pointer(((*Sqlite3_file)(unsafe.Pointer(id)).FpMethods + 128 /* &.xShmUnmap */))))(tls, id, deleteFlag)
+func Xsqlite3OsShmUnmap(tls *libc.TLS, id uintptr, deleteFlag int32) int32 { /* sqlite3.c:23598:20: */
+ return (*struct {
+ f func(*libc.TLS, uintptr, int32) int32
+ })(unsafe.Pointer(&struct{ uintptr }{(*sqlite3_io_methods)(unsafe.Pointer((*Sqlite3_file)(unsafe.Pointer(id)).FpMethods)).FxShmUnmap})).f(tls, id, deleteFlag)
}
-func Xsqlite3OsShmMap(tls *libc.TLS, id uintptr, iPage int32, pgsz int32, bExtend int32, pp uintptr) int32 { /* sqlite3.c:23421:20: */
+func Xsqlite3OsShmMap(tls *libc.TLS, id uintptr, iPage int32, pgsz int32, bExtend int32, pp uintptr) int32 { /* sqlite3.c:23601:20: */
- return (*(*func(*libc.TLS, uintptr, int32, int32, int32, uintptr) int32)(unsafe.Pointer(((*Sqlite3_file)(unsafe.Pointer(id)).FpMethods + 104 /* &.xShmMap */))))(tls, id, iPage, pgsz, bExtend, libc.AtomicLoadUintptr(&pp))
+ return (*struct {
+ f func(*libc.TLS, uintptr, int32, int32, int32, uintptr) int32
+ })(unsafe.Pointer(&struct{ uintptr }{(*sqlite3_io_methods)(unsafe.Pointer((*Sqlite3_file)(unsafe.Pointer(id)).FpMethods)).FxShmMap})).f(tls, id, iPage, pgsz, bExtend, pp)
}
// The real implementation of xFetch and xUnfetch
-func Xsqlite3OsFetch(tls *libc.TLS, id uintptr, iOff I64, iAmt int32, pp uintptr) int32 { /* sqlite3.c:23435:20: */
+func Xsqlite3OsFetch(tls *libc.TLS, id uintptr, iOff I64, iAmt int32, pp uintptr) int32 { /* sqlite3.c:23615:20: */
- return (*(*func(*libc.TLS, uintptr, Sqlite3_int64, int32, uintptr) int32)(unsafe.Pointer(((*Sqlite3_file)(unsafe.Pointer(id)).FpMethods + 136 /* &.xFetch */))))(tls, id, iOff, iAmt, pp)
+ return (*struct {
+ f func(*libc.TLS, uintptr, Sqlite3_int64, int32, uintptr) int32
+ })(unsafe.Pointer(&struct{ uintptr }{(*sqlite3_io_methods)(unsafe.Pointer((*Sqlite3_file)(unsafe.Pointer(id)).FpMethods)).FxFetch})).f(tls, id, iOff, iAmt, pp)
}
-func Xsqlite3OsUnfetch(tls *libc.TLS, id uintptr, iOff I64, p uintptr) int32 { /* sqlite3.c:23439:20: */
- return (*(*func(*libc.TLS, uintptr, Sqlite3_int64, uintptr) int32)(unsafe.Pointer(((*Sqlite3_file)(unsafe.Pointer(id)).FpMethods + 144 /* &.xUnfetch */))))(tls, id, iOff, p)
+func Xsqlite3OsUnfetch(tls *libc.TLS, id uintptr, iOff I64, p uintptr) int32 { /* sqlite3.c:23619:20: */
+ return (*struct {
+ f func(*libc.TLS, uintptr, Sqlite3_int64, uintptr) int32
+ })(unsafe.Pointer(&struct{ uintptr }{(*sqlite3_io_methods)(unsafe.Pointer((*Sqlite3_file)(unsafe.Pointer(id)).FpMethods)).FxUnfetch})).f(tls, id, iOff, p)
}
// The next group of routines are convenience wrappers around the
// VFS methods.
-func Xsqlite3OsOpen(tls *libc.TLS, pVfs uintptr, zPath uintptr, pFile uintptr, flags int32, pFlagsOut uintptr) int32 { /* sqlite3.c:23457:20: */
+func Xsqlite3OsOpen(tls *libc.TLS, pVfs uintptr, zPath uintptr, pFile uintptr, flags int32, pFlagsOut uintptr) int32 { /* sqlite3.c:23637:20: */
var rc int32
// 0x87f7f is a mask of SQLITE_OPEN_ flags that are valid to be passed
// down into the VFS layer. Some SQLITE_OPEN_ flags (for example,
// SQLITE_OPEN_FULLMUTEX or SQLITE_OPEN_SHAREDCACHE) are blocked before
// reaching the VFS.
- rc = (*(*func(*libc.TLS, uintptr, uintptr, uintptr, int32, uintptr) int32)(unsafe.Pointer((pVfs + 40 /* &.xOpen */))))(tls, pVfs, zPath, pFile, (flags & 0x1087f7f), pFlagsOut)
+ rc = (*struct {
+ f func(*libc.TLS, uintptr, uintptr, uintptr, int32, uintptr) int32
+ })(unsafe.Pointer(&struct{ uintptr }{(*Sqlite3_vfs)(unsafe.Pointer(pVfs)).FxOpen})).f(tls, pVfs, zPath, pFile, (flags & 0x1087f7f), pFlagsOut)
return rc
}
-func Xsqlite3OsDelete(tls *libc.TLS, pVfs uintptr, zPath uintptr, dirSync int32) int32 { /* sqlite3.c:23474:20: */
+func Xsqlite3OsDelete(tls *libc.TLS, pVfs uintptr, zPath uintptr, dirSync int32) int32 { /* sqlite3.c:23654:20: */
- return (*(*func(*libc.TLS, uintptr, uintptr, int32) int32)(unsafe.Pointer((pVfs + 48 /* &.xDelete */))))(tls, pVfs, zPath, dirSync)
+ if (*Sqlite3_vfs)(unsafe.Pointer(pVfs)).FxDelete != uintptr(0) {
+ return (*struct {
+ f func(*libc.TLS, uintptr, uintptr, int32) int32
+ })(unsafe.Pointer(&struct{ uintptr }{(*Sqlite3_vfs)(unsafe.Pointer(pVfs)).FxDelete})).f(tls, pVfs, zPath, dirSync)
+ }
+ return SQLITE_OK
}
-func Xsqlite3OsAccess(tls *libc.TLS, pVfs uintptr, zPath uintptr, flags int32, pResOut uintptr) int32 { /* sqlite3.c:23479:20: */
+func Xsqlite3OsAccess(tls *libc.TLS, pVfs uintptr, zPath uintptr, flags int32, pResOut uintptr) int32 { /* sqlite3.c:23659:20: */
- return (*(*func(*libc.TLS, uintptr, uintptr, int32, uintptr) int32)(unsafe.Pointer((pVfs + 56 /* &.xAccess */))))(tls, pVfs, zPath, flags, pResOut)
+ return (*struct {
+ f func(*libc.TLS, uintptr, uintptr, int32, uintptr) int32
+ })(unsafe.Pointer(&struct{ uintptr }{(*Sqlite3_vfs)(unsafe.Pointer(pVfs)).FxAccess})).f(tls, pVfs, zPath, flags, pResOut)
}
-func Xsqlite3OsFullPathname(tls *libc.TLS, pVfs uintptr, zPath uintptr, nPathOut int32, zPathOut uintptr) int32 { /* sqlite3.c:23488:20: */
+func Xsqlite3OsFullPathname(tls *libc.TLS, pVfs uintptr, zPath uintptr, nPathOut int32, zPathOut uintptr) int32 { /* sqlite3.c:23668:20: */
- *(*int8)(unsafe.Pointer(zPathOut)) = int8(0)
- return (*(*func(*libc.TLS, uintptr, uintptr, int32, uintptr) int32)(unsafe.Pointer((pVfs + 64 /* &.xFullPathname */))))(tls, pVfs, zPath, nPathOut, zPathOut)
+ *(*uint8)(unsafe.Pointer(zPathOut)) = uint8(0)
+ return (*struct {
+ f func(*libc.TLS, uintptr, uintptr, int32, uintptr) int32
+ })(unsafe.Pointer(&struct{ uintptr }{(*Sqlite3_vfs)(unsafe.Pointer(pVfs)).FxFullPathname})).f(tls, pVfs, zPath, nPathOut, zPathOut)
}
-func Xsqlite3OsDlOpen(tls *libc.TLS, pVfs uintptr, zPath uintptr) uintptr { /* sqlite3.c:23499:21: */
- return (*(*func(*libc.TLS, uintptr, uintptr) uintptr)(unsafe.Pointer((pVfs + 72 /* &.xDlOpen */))))(tls, pVfs, zPath)
+func Xsqlite3OsDlOpen(tls *libc.TLS, pVfs uintptr, zPath uintptr) uintptr { /* sqlite3.c:23679:21: */
+
+ // tag-20210611-1
+ return (*struct {
+ f func(*libc.TLS, uintptr, uintptr) uintptr
+ })(unsafe.Pointer(&struct{ uintptr }{(*Sqlite3_vfs)(unsafe.Pointer(pVfs)).FxDlOpen})).f(tls, pVfs, zPath)
}
-func Xsqlite3OsDlError(tls *libc.TLS, pVfs uintptr, nByte int32, zBufOut uintptr) { /* sqlite3.c:23502:21: */
- (*(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer((pVfs + 80 /* &.xDlError */))))(tls, pVfs, nByte, zBufOut)
+func Xsqlite3OsDlError(tls *libc.TLS, pVfs uintptr, nByte int32, zBufOut uintptr) { /* sqlite3.c:23684:21: */
+ (*struct {
+ f func(*libc.TLS, uintptr, int32, uintptr)
+ })(unsafe.Pointer(&struct{ uintptr }{(*Sqlite3_vfs)(unsafe.Pointer(pVfs)).FxDlError})).f(tls, pVfs, nByte, zBufOut)
}
-func Xsqlite3OsDlSym(tls *libc.TLS, pVfs uintptr, pHdle uintptr, zSym uintptr) uintptr { /* sqlite3.c:23505:21: */
- return (*(*func(*libc.TLS, uintptr, uintptr, uintptr) uintptr)(unsafe.Pointer((pVfs + 88 /* &.xDlSym */))))(tls, pVfs, pHdle, zSym)
+func Xsqlite3OsDlSym(tls *libc.TLS, pVfs uintptr, pHdle uintptr, zSym uintptr) uintptr { /* sqlite3.c:23687:21: */
+ return (*struct {
+ f func(*libc.TLS, uintptr, uintptr, uintptr) uintptr
+ })(unsafe.Pointer(&struct{ uintptr }{(*Sqlite3_vfs)(unsafe.Pointer(pVfs)).FxDlSym})).f(tls, pVfs, pHdle, zSym)
}
-func Xsqlite3OsDlClose(tls *libc.TLS, pVfs uintptr, pHandle uintptr) { /* sqlite3.c:23508:21: */
- (*(*func(*libc.TLS, uintptr, uintptr))(unsafe.Pointer((pVfs + 96 /* &.xDlClose */))))(tls, pVfs, pHandle)
+func Xsqlite3OsDlClose(tls *libc.TLS, pVfs uintptr, pHandle uintptr) { /* sqlite3.c:23690:21: */
+ (*struct {
+ f func(*libc.TLS, uintptr, uintptr)
+ })(unsafe.Pointer(&struct{ uintptr }{(*Sqlite3_vfs)(unsafe.Pointer(pVfs)).FxDlClose})).f(tls, pVfs, pHandle)
}
-func Xsqlite3OsRandomness(tls *libc.TLS, pVfs uintptr, nByte int32, zBufOut uintptr) int32 { /* sqlite3.c:23512:20: */
+func Xsqlite3OsRandomness(tls *libc.TLS, pVfs uintptr, nByte int32, zBufOut uintptr) int32 { /* sqlite3.c:23694:20: */
if Xsqlite3Config.FiPrngSeed != 0 {
libc.Xmemset(tls, zBufOut, 0, uint64(nByte))
if nByte > int32(unsafe.Sizeof(uint32(0))) {
nByte = int32(unsafe.Sizeof(uint32(0)))
}
- libc.Xmemcpy(tls, zBufOut, (uintptr(unsafe.Pointer(&Xsqlite3Config)) + 412 /* &.iPrngSeed */), uint64(nByte))
+ libc.Xmemcpy(tls, zBufOut, (uintptr(unsafe.Pointer(&Xsqlite3Config)) + 420 /* &.iPrngSeed */), uint64(nByte))
return SQLITE_OK
} else {
- return (*(*func(*libc.TLS, uintptr, int32, uintptr) int32)(unsafe.Pointer((pVfs + 104 /* &.xRandomness */))))(tls, pVfs, nByte, zBufOut)
+ return (*struct {
+ f func(*libc.TLS, uintptr, int32, uintptr) int32
+ })(unsafe.Pointer(&struct{ uintptr }{(*Sqlite3_vfs)(unsafe.Pointer(pVfs)).FxRandomness})).f(tls, pVfs, nByte, zBufOut)
}
return int32(0)
}
-func Xsqlite3OsSleep(tls *libc.TLS, pVfs uintptr, nMicro int32) int32 { /* sqlite3.c:23523:20: */
- return (*(*func(*libc.TLS, uintptr, int32) int32)(unsafe.Pointer((pVfs + 112 /* &.xSleep */))))(tls, pVfs, nMicro)
+func Xsqlite3OsSleep(tls *libc.TLS, pVfs uintptr, nMicro int32) int32 { /* sqlite3.c:23705:20: */
+ return (*struct {
+ f func(*libc.TLS, uintptr, int32) int32
+ })(unsafe.Pointer(&struct{ uintptr }{(*Sqlite3_vfs)(unsafe.Pointer(pVfs)).FxSleep})).f(tls, pVfs, nMicro)
}
-func Xsqlite3OsGetLastError(tls *libc.TLS, pVfs uintptr) int32 { /* sqlite3.c:23526:20: */
+func Xsqlite3OsGetLastError(tls *libc.TLS, pVfs uintptr) int32 { /* sqlite3.c:23708:20: */
if (*Sqlite3_vfs)(unsafe.Pointer(pVfs)).FxGetLastError != 0 {
- return (*(*func(*libc.TLS, uintptr, int32, uintptr) int32)(unsafe.Pointer((pVfs + 128 /* &.xGetLastError */))))(tls, pVfs, 0, uintptr(0))
+ return (*struct {
+ f func(*libc.TLS, uintptr, int32, uintptr) int32
+ })(unsafe.Pointer(&struct{ uintptr }{(*Sqlite3_vfs)(unsafe.Pointer(pVfs)).FxGetLastError})).f(tls, pVfs, 0, uintptr(0))
}
return 0
}
-func Xsqlite3OsCurrentTimeInt64(tls *libc.TLS, pVfs uintptr, pTimeOut uintptr) int32 { /* sqlite3.c:23529:20: */
+func Xsqlite3OsCurrentTimeInt64(tls *libc.TLS, pVfs uintptr, pTimeOut uintptr) int32 { /* sqlite3.c:23711:20: */
bp := tls.Alloc(8)
defer tls.Free(8)
@@ -13606,17 +14379,21 @@ func Xsqlite3OsCurrentTimeInt64(tls *libc.TLS, pVfs uintptr, pTimeOut uintptr) i
// will fall back to xCurrentTime() if xCurrentTimeInt64() is
// unavailable.
if ((*Sqlite3_vfs)(unsafe.Pointer(pVfs)).FiVersion >= 2) && ((*Sqlite3_vfs)(unsafe.Pointer(pVfs)).FxCurrentTimeInt64 != 0) {
- rc = (*(*func(*libc.TLS, uintptr, uintptr) int32)(unsafe.Pointer((pVfs + 136 /* &.xCurrentTimeInt64 */))))(tls, pVfs, pTimeOut)
+ rc = (*struct {
+ f func(*libc.TLS, uintptr, uintptr) int32
+ })(unsafe.Pointer(&struct{ uintptr }{(*Sqlite3_vfs)(unsafe.Pointer(pVfs)).FxCurrentTimeInt64})).f(tls, pVfs, pTimeOut)
} else {
// var r float64 at bp, 8
- rc = (*(*func(*libc.TLS, uintptr, uintptr) int32)(unsafe.Pointer((pVfs + 120 /* &.xCurrentTime */))))(tls, pVfs, bp /* &r */)
- *(*Sqlite3_int64)(unsafe.Pointer(pTimeOut)) = (Sqlite3_int64(*(*float64)(unsafe.Pointer(bp /* r */)) * 86400000.0))
+ rc = (*struct {
+ f func(*libc.TLS, uintptr, uintptr) int32
+ })(unsafe.Pointer(&struct{ uintptr }{(*Sqlite3_vfs)(unsafe.Pointer(pVfs)).FxCurrentTime})).f(tls, pVfs, bp /* &r */)
+ *(*Sqlite3_int64)(unsafe.Pointer(pTimeOut)) = (libc.Int64FromFloat64(*(*float64)(unsafe.Pointer(bp /* r */)) * 86400000.0))
}
return rc
}
-func Xsqlite3OsOpenMalloc(tls *libc.TLS, pVfs uintptr, zFile uintptr, ppFile uintptr, flags int32, pOutFlags uintptr) int32 { /* sqlite3.c:23547:20: */
+func Xsqlite3OsOpenMalloc(tls *libc.TLS, pVfs uintptr, zFile uintptr, ppFile uintptr, flags int32, pOutFlags uintptr) int32 { /* sqlite3.c:23729:20: */
var rc int32
var pFile uintptr
pFile = Xsqlite3MallocZero(tls, uint64((*Sqlite3_vfs)(unsafe.Pointer(pVfs)).FszOsFile))
@@ -13633,7 +14410,7 @@ func Xsqlite3OsOpenMalloc(tls *libc.TLS, pVfs uintptr, zFile uintptr, ppFile uin
return rc
}
-func Xsqlite3OsCloseFree(tls *libc.TLS, pFile uintptr) { /* sqlite3.c:23569:21: */
+func Xsqlite3OsCloseFree(tls *libc.TLS, pFile uintptr) { /* sqlite3.c:23751:21: */
Xsqlite3OsClose(tls, pFile)
Xsqlite3_free(tls, pFile)
@@ -13643,7 +14420,7 @@ func Xsqlite3OsCloseFree(tls *libc.TLS, pFile uintptr) { /* sqlite3.c:23569:21:
// sqlite3_os_init(). The purpose of the wrapper is to provide the
// ability to simulate a malloc failure, so that the handling of an
// error in sqlite3_os_init() by the upper layers can be tested.
-func Xsqlite3OsInit(tls *libc.TLS) int32 { /* sqlite3.c:23581:20: */
+func Xsqlite3OsInit(tls *libc.TLS) int32 { /* sqlite3.c:23763:20: */
var p uintptr = Xsqlite3_malloc(tls, 10)
if p == uintptr(0) {
return SQLITE_NOMEM
@@ -13653,11 +14430,11 @@ func Xsqlite3OsInit(tls *libc.TLS) int32 { /* sqlite3.c:23581:20: */
}
// The list of all registered VFS implementations.
-var vfsList uintptr = uintptr(0) /* sqlite3.c:23591:20 */
+var vfsList uintptr = uintptr(0) /* sqlite3.c:23773:20 */
// Locate a VFS by name. If no name is given, simply return the
// first VFS on the list.
-func Xsqlite3_vfs_find(tls *libc.TLS, zVfs uintptr) uintptr { /* sqlite3.c:23598:24: */
+func Xsqlite3_vfs_find(tls *libc.TLS, zVfs uintptr) uintptr { /* sqlite3.c:23780:24: */
var pVfs uintptr = uintptr(0)
var mutex uintptr
var rc int32 = Xsqlite3_initialize(tls)
@@ -13679,7 +14456,7 @@ func Xsqlite3_vfs_find(tls *libc.TLS, zVfs uintptr) uintptr { /* sqlite3.c:23598
}
// Unlink a VFS from the linked list
-func vfsUnlink(tls *libc.TLS, pVfs uintptr) { /* sqlite3.c:23622:13: */
+func vfsUnlink(tls *libc.TLS, pVfs uintptr) { /* sqlite3.c:23804:13: */
if pVfs == uintptr(0) {
// No-op
@@ -13699,7 +14476,7 @@ func vfsUnlink(tls *libc.TLS, pVfs uintptr) { /* sqlite3.c:23622:13: */
// Register a VFS with the system. It is harmless to register the same
// VFS multiple times. The new VFS becomes the default if makeDflt is
// true.
-func Xsqlite3_vfs_register(tls *libc.TLS, pVfs uintptr, makeDflt int32) int32 { /* sqlite3.c:23644:16: */
+func Xsqlite3_vfs_register(tls *libc.TLS, pVfs uintptr, makeDflt int32) int32 { /* sqlite3.c:23826:16: */
var mutex uintptr
var rc int32 = Xsqlite3_initialize(tls)
if rc != 0 {
@@ -13722,7 +14499,7 @@ func Xsqlite3_vfs_register(tls *libc.TLS, pVfs uintptr, makeDflt int32) int32 {
}
// Unregister a VFS so that it is no longer accessible.
-func Xsqlite3_vfs_unregister(tls *libc.TLS, pVfs uintptr) int32 { /* sqlite3.c:23672:16: */
+func Xsqlite3_vfs_unregister(tls *libc.TLS, pVfs uintptr) int32 { /* sqlite3.c:23854:16: */
var mutex uintptr
var rc int32 = Xsqlite3_initialize(tls)
if rc != 0 {
@@ -13767,7 +14544,7 @@ func Xsqlite3_vfs_unregister(tls *libc.TLS, pVfs uintptr) int32 { /* sqlite3.c:2
type BenignMallocHooks1 = struct {
FxBenignBegin uintptr
FxBenignEnd uintptr
-} /* sqlite3.c:23720:9 */
+} /* sqlite3.c:23902:9 */
//************* End of os.c *************************************************
//************* Begin file fault.c ******************************************
@@ -13798,8 +14575,8 @@ type BenignMallocHooks1 = struct {
// #include "sqliteInt.h"
// Global variables.
-type BenignMallocHooks = BenignMallocHooks1 /* sqlite3.c:23720:34 */
-var sqlite3Hooks = BenignMallocHooks1{} /* sqlite3.c:23724:3 */
+type BenignMallocHooks = BenignMallocHooks1 /* sqlite3.c:23902:34 */
+var sqlite3Hooks = BenignMallocHooks1{} /* sqlite3.c:23906:3 */
// The "wsdHooks" macro will resolve to the appropriate BenignMallocHooks
// structure. If writable static data is unsupported on the target,
@@ -13809,7 +14586,7 @@ var sqlite3Hooks = BenignMallocHooks1{} /* sqlite3.c:23724:3 */
// Register hooks to call when sqlite3BeginBenignMalloc() and
// sqlite3EndBenignMalloc() are called, respectively.
-func Xsqlite3BenignMallocHooks(tls *libc.TLS, xBenignBegin uintptr, xBenignEnd uintptr) { /* sqlite3.c:23746:21: */
+func Xsqlite3BenignMallocHooks(tls *libc.TLS, xBenignBegin uintptr, xBenignEnd uintptr) { /* sqlite3.c:23928:21: */
sqlite3Hooks.FxBenignBegin = xBenignBegin
sqlite3Hooks.FxBenignEnd = xBenignEnd
@@ -13818,17 +14595,17 @@ func Xsqlite3BenignMallocHooks(tls *libc.TLS, xBenignBegin uintptr, xBenignEnd u
// This (sqlite3EndBenignMalloc()) is called by SQLite code to indicate that
// subsequent malloc failures are benign. A call to sqlite3EndBenignMalloc()
// indicates that subsequent malloc failures are non-benign.
-func Xsqlite3BeginBenignMalloc(tls *libc.TLS) { /* sqlite3.c:23760:21: */
+func Xsqlite3BeginBenignMalloc(tls *libc.TLS) { /* sqlite3.c:23942:21: */
if sqlite3Hooks.FxBenignBegin != 0 {
- (*(*func(*libc.TLS))(unsafe.Pointer((uintptr(unsafe.Pointer(&sqlite3Hooks)) /* &.xBenignBegin */))))(tls)
+ (*struct{ f func(*libc.TLS) })(unsafe.Pointer(&struct{ uintptr }{sqlite3Hooks.FxBenignBegin})).f(tls)
}
}
-func Xsqlite3EndBenignMalloc(tls *libc.TLS) { /* sqlite3.c:23766:21: */
+func Xsqlite3EndBenignMalloc(tls *libc.TLS) { /* sqlite3.c:23948:21: */
if sqlite3Hooks.FxBenignEnd != 0 {
- (*(*func(*libc.TLS))(unsafe.Pointer((uintptr(unsafe.Pointer(&sqlite3Hooks)) + 8 /* &.xBenignEnd */))))(tls)
+ (*struct{ f func(*libc.TLS) })(unsafe.Pointer(&struct{ uintptr }{sqlite3Hooks.FxBenignEnd})).f(tls)
}
}
@@ -13923,7 +14700,7 @@ func Xsqlite3EndBenignMalloc(tls *libc.TLS) { /* sqlite3.c:23766:21: */
// For this low-level routine, we are guaranteed that nByte>0 because
// cases of nByte<=0 will be intercepted and dealt with by higher level
// routines.
-func sqlite3MemMalloc(tls *libc.TLS, nByte int32) uintptr { /* sqlite3.c:23966:13: */
+func sqlite3MemMalloc(tls *libc.TLS, nByte int32) uintptr { /* sqlite3.c:24148:13: */
bp := tls.Alloc(8)
defer tls.Free(8)
@@ -13935,7 +14712,7 @@ func sqlite3MemMalloc(tls *libc.TLS, nByte int32) uintptr { /* sqlite3.c:23966:1
p += 8
} else {
- Xsqlite3_log(tls, SQLITE_NOMEM, ts+579 /* "failed to alloca..." */, libc.VaList(bp, nByte))
+ Xsqlite3_log(tls, SQLITE_NOMEM, ts+631 /* "failed to alloca..." */, libc.VaList(bp, nByte))
}
return p
}
@@ -13946,7 +14723,7 @@ func sqlite3MemMalloc(tls *libc.TLS, nByte int32) uintptr { /* sqlite3.c:23966:1
// For this low-level routine, we already know that pPrior!=0 since
// cases where pPrior==0 will have been intecepted and dealt with
// by higher-level routines.
-func sqlite3MemFree(tls *libc.TLS, pPrior uintptr) { /* sqlite3.c:24000:13: */
+func sqlite3MemFree(tls *libc.TLS, pPrior uintptr) { /* sqlite3.c:24182:13: */
var p uintptr = pPrior
p -= 8
@@ -13955,7 +14732,7 @@ func sqlite3MemFree(tls *libc.TLS, pPrior uintptr) { /* sqlite3.c:24000:13: */
// Report the allocated size of a prior return from xMalloc()
// or xRealloc().
-func sqlite3MemSize(tls *libc.TLS, pPrior uintptr) int32 { /* sqlite3.c:24015:12: */
+func sqlite3MemSize(tls *libc.TLS, pPrior uintptr) int32 { /* sqlite3.c:24197:12: */
var p uintptr
p = pPrior
@@ -13971,7 +14748,7 @@ func sqlite3MemSize(tls *libc.TLS, pPrior uintptr) int32 { /* sqlite3.c:24015:12
// redirected to xMalloc. Similarly, we know that nByte>0 because
// cases where nByte<=0 will have been intercepted by higher-level
// routines and redirected to xFree.
-func sqlite3MemRealloc(tls *libc.TLS, pPrior uintptr, nByte int32) uintptr { /* sqlite3.c:24038:13: */
+func sqlite3MemRealloc(tls *libc.TLS, pPrior uintptr, nByte int32) uintptr { /* sqlite3.c:24220:13: */
bp := tls.Alloc(16)
defer tls.Free(16)
@@ -13986,25 +14763,25 @@ func sqlite3MemRealloc(tls *libc.TLS, pPrior uintptr, nByte int32) uintptr { /*
} else {
Xsqlite3_log(tls, SQLITE_NOMEM,
- ts+617, /* "failed memory re..." */
+ ts+669, /* "failed memory re..." */
libc.VaList(bp, sqlite3MemSize(tls, pPrior), nByte))
}
return p
}
// Round up a request size to the next valid allocation size.
-func sqlite3MemRoundup(tls *libc.TLS, n int32) int32 { /* sqlite3.c:24070:12: */
+func sqlite3MemRoundup(tls *libc.TLS, n int32) int32 { /* sqlite3.c:24252:12: */
return (((n) + 7) & libc.CplInt32(7))
}
// Initialize this module.
-func sqlite3MemInit(tls *libc.TLS, NotUsed uintptr) int32 { /* sqlite3.c:24077:12: */
+func sqlite3MemInit(tls *libc.TLS, NotUsed uintptr) int32 { /* sqlite3.c:24259:12: */
_ = NotUsed
return SQLITE_OK
}
// Deinitialize this module.
-func sqlite3MemShutdown(tls *libc.TLS, NotUsed uintptr) { /* sqlite3.c:24104:13: */
+func sqlite3MemShutdown(tls *libc.TLS, NotUsed uintptr) { /* sqlite3.c:24286:13: */
_ = NotUsed
return
}
@@ -14013,7 +14790,7 @@ func sqlite3MemShutdown(tls *libc.TLS, NotUsed uintptr) { /* sqlite3.c:24104:13:
//
// Populate the low-level memory allocation function pointers in
// sqlite3GlobalConfig.m with pointers to the routines in this file.
-func Xsqlite3MemSetDefault(tls *libc.TLS) { /* sqlite3.c:24115:21: */
+func Xsqlite3MemSetDefault(tls *libc.TLS) { /* sqlite3.c:24297:21: */
bp := tls.Alloc(8)
defer tls.Free(8)
@@ -14028,7 +14805,7 @@ var defaultMethods = Sqlite3_mem_methods{
FxRoundup: 0,
FxInit: 0,
FxShutdown: 0,
-} /* sqlite3.c:24116:36 */
+} /* sqlite3.c:24298:36 */
//************* End of mem1.c ***********************************************
//************* Begin file mem2.c *******************************************
@@ -14162,7 +14939,7 @@ var defaultMethods = Sqlite3_mem_methods{
// #include "sqliteInt.h"
// Initialize the mutex system.
-func Xsqlite3MutexInit(tls *libc.TLS) int32 { /* sqlite3.c:26151:20: */
+func Xsqlite3MutexInit(tls *libc.TLS) int32 { /* sqlite3.c:26333:20: */
var rc int32 = SQLITE_OK
if !(int32(Xsqlite3Config.Fmutex.FxMutexAlloc) != 0) {
// If the xMutexAlloc method has not been set, then the user did not
@@ -14189,24 +14966,24 @@ func Xsqlite3MutexInit(tls *libc.TLS) int32 { /* sqlite3.c:26151:20: */
(*Sqlite3_mutex_methods)(unsafe.Pointer(pTo)).FxMutexAlloc = (*Sqlite3_mutex_methods)(unsafe.Pointer(pFrom)).FxMutexAlloc
}
- rc = (*(*func(*libc.TLS) int32)(unsafe.Pointer((uintptr(unsafe.Pointer(&Xsqlite3Config)) + 96 /* &.mutex */ /* &.xMutexInit */))))(tls)
+ rc = (*struct{ f func(*libc.TLS) int32 })(unsafe.Pointer(&struct{ uintptr }{Xsqlite3Config.Fmutex.FxMutexInit})).f(tls)
return rc
}
// Shutdown the mutex system. This call frees resources allocated by
// sqlite3MutexInit().
-func Xsqlite3MutexEnd(tls *libc.TLS) int32 { /* sqlite3.c:26197:20: */
+func Xsqlite3MutexEnd(tls *libc.TLS) int32 { /* sqlite3.c:26379:20: */
var rc int32 = SQLITE_OK
if Xsqlite3Config.Fmutex.FxMutexEnd != 0 {
- rc = (*(*func(*libc.TLS) int32)(unsafe.Pointer((uintptr(unsafe.Pointer(&Xsqlite3Config)) + 96 /* &.mutex */ + 8 /* &.xMutexEnd */))))(tls)
+ rc = (*struct{ f func(*libc.TLS) int32 })(unsafe.Pointer(&struct{ uintptr }{Xsqlite3Config.Fmutex.FxMutexEnd})).f(tls)
}
return rc
}
// Retrieve a pointer to a static mutex or allocate a new dynamic one.
-func Xsqlite3_mutex_alloc(tls *libc.TLS, id int32) uintptr { /* sqlite3.c:26213:26: */
+func Xsqlite3_mutex_alloc(tls *libc.TLS, id int32) uintptr { /* sqlite3.c:26395:26: */
if (id <= SQLITE_MUTEX_RECURSIVE) && (Xsqlite3_initialize(tls) != 0) {
return uintptr(0)
}
@@ -14214,41 +14991,47 @@ func Xsqlite3_mutex_alloc(tls *libc.TLS, id int32) uintptr { /* sqlite3.c:26213:
return uintptr(0)
}
- return (*(*func(*libc.TLS, int32) uintptr)(unsafe.Pointer((uintptr(unsafe.Pointer(&Xsqlite3Config)) + 96 /* &.mutex */ + 16 /* &.xMutexAlloc */))))(tls, id)
+ return (*struct {
+ f func(*libc.TLS, int32) uintptr
+ })(unsafe.Pointer(&struct{ uintptr }{Xsqlite3Config.Fmutex.FxMutexAlloc})).f(tls, id)
}
-func Xsqlite3MutexAlloc(tls *libc.TLS, id int32) uintptr { /* sqlite3.c:26222:30: */
+func Xsqlite3MutexAlloc(tls *libc.TLS, id int32) uintptr { /* sqlite3.c:26404:30: */
if !(int32(Xsqlite3Config.FbCoreMutex) != 0) {
return uintptr(0)
}
- return (*(*func(*libc.TLS, int32) uintptr)(unsafe.Pointer((uintptr(unsafe.Pointer(&Xsqlite3Config)) + 96 /* &.mutex */ + 16 /* &.xMutexAlloc */))))(tls, id)
+ return (*struct {
+ f func(*libc.TLS, int32) uintptr
+ })(unsafe.Pointer(&struct{ uintptr }{Xsqlite3Config.Fmutex.FxMutexAlloc})).f(tls, id)
}
// Free a dynamic mutex.
-func Xsqlite3_mutex_free(tls *libc.TLS, p uintptr) { /* sqlite3.c:26234:17: */
+func Xsqlite3_mutex_free(tls *libc.TLS, p uintptr) { /* sqlite3.c:26416:17: */
if p != 0 {
- (*(*func(*libc.TLS, uintptr))(unsafe.Pointer((uintptr(unsafe.Pointer(&Xsqlite3Config)) + 96 /* &.mutex */ + 24 /* &.xMutexFree */))))(tls, p)
+ (*struct{ f func(*libc.TLS, uintptr) })(unsafe.Pointer(&struct{ uintptr }{Xsqlite3Config.Fmutex.FxMutexFree})).f(tls, p)
}
}
// Obtain the mutex p. If some other thread already has the mutex, block
// until it can be obtained.
-func Xsqlite3_mutex_enter(tls *libc.TLS, p uintptr) { /* sqlite3.c:26245:17: */
+func Xsqlite3_mutex_enter(tls *libc.TLS, p uintptr) { /* sqlite3.c:26427:17: */
if p != 0 {
- (*(*func(*libc.TLS, uintptr))(unsafe.Pointer((uintptr(unsafe.Pointer(&Xsqlite3Config)) + 96 /* &.mutex */ + 32 /* &.xMutexEnter */))))(tls, p)
+ (*struct{ f func(*libc.TLS, uintptr) })(unsafe.Pointer(&struct{ uintptr }{Xsqlite3Config.Fmutex.FxMutexEnter})).f(tls, p)
}
}
// Obtain the mutex p. If successful, return SQLITE_OK. Otherwise, if another
// thread holds the mutex and it cannot be obtained, return SQLITE_BUSY.
-func Xsqlite3_mutex_try(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:26256:16: */
+func Xsqlite3_mutex_try(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:26438:16: */
var rc int32 = SQLITE_OK
if p != 0 {
- return (*(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer((uintptr(unsafe.Pointer(&Xsqlite3Config)) + 96 /* &.mutex */ + 40 /* &.xMutexTry */))))(tls, p)
+ return (*struct {
+ f func(*libc.TLS, uintptr) int32
+ })(unsafe.Pointer(&struct{ uintptr }{Xsqlite3Config.Fmutex.FxMutexTry})).f(tls, p)
}
return rc
}
@@ -14257,10 +15040,10 @@ func Xsqlite3_mutex_try(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:26256:16:
// entered by the same thread. The behavior is undefined if the mutex
// is not currently entered. If a NULL pointer is passed as an argument
// this function is a no-op.
-func Xsqlite3_mutex_leave(tls *libc.TLS, p uintptr) { /* sqlite3.c:26271:17: */
+func Xsqlite3_mutex_leave(tls *libc.TLS, p uintptr) { /* sqlite3.c:26453:17: */
if p != 0 {
- (*(*func(*libc.TLS, uintptr))(unsafe.Pointer((uintptr(unsafe.Pointer(&Xsqlite3Config)) + 96 /* &.mutex */ + 48 /* &.xMutexLeave */))))(tls, p)
+ (*struct{ f func(*libc.TLS, uintptr) })(unsafe.Pointer(&struct{ uintptr }{Xsqlite3Config.Fmutex.FxMutexLeave})).f(tls, p)
}
}
@@ -14296,40 +15079,40 @@ func Xsqlite3_mutex_leave(tls *libc.TLS, p uintptr) { /* sqlite3.c:26271:17: */
// Stub routines for all mutex methods.
//
// This routines provide no mutual exclusion or error checking.
-func noopMutexInit(tls *libc.TLS) int32 { /* sqlite3.c:26334:12: */
+func noopMutexInit(tls *libc.TLS) int32 { /* sqlite3.c:26516:12: */
return SQLITE_OK
}
-func noopMutexEnd(tls *libc.TLS) int32 { /* sqlite3.c:26335:12: */
+func noopMutexEnd(tls *libc.TLS) int32 { /* sqlite3.c:26517:12: */
return SQLITE_OK
}
-func noopMutexAlloc(tls *libc.TLS, id int32) uintptr { /* sqlite3.c:26336:22: */
+func noopMutexAlloc(tls *libc.TLS, id int32) uintptr { /* sqlite3.c:26518:22: */
_ = id
return uintptr(8)
}
-func noopMutexFree(tls *libc.TLS, p uintptr) { /* sqlite3.c:26340:13: */
+func noopMutexFree(tls *libc.TLS, p uintptr) { /* sqlite3.c:26522:13: */
_ = p
return
}
-func noopMutexEnter(tls *libc.TLS, p uintptr) { /* sqlite3.c:26341:13: */
+func noopMutexEnter(tls *libc.TLS, p uintptr) { /* sqlite3.c:26523:13: */
_ = p
return
}
-func noopMutexTry(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:26342:12: */
+func noopMutexTry(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:26524:12: */
_ = p
return SQLITE_OK
}
-func noopMutexLeave(tls *libc.TLS, p uintptr) { /* sqlite3.c:26346:13: */
+func noopMutexLeave(tls *libc.TLS, p uintptr) { /* sqlite3.c:26528:13: */
_ = p
return
}
-func Xsqlite3NoopMutex(tls *libc.TLS) uintptr { /* sqlite3.c:26348:44: */
+func Xsqlite3NoopMutex(tls *libc.TLS) uintptr { /* sqlite3.c:26530:44: */
return uintptr(unsafe.Pointer(&sMutex))
}
@@ -14342,11 +15125,11 @@ var sMutex = Sqlite3_mutex_methods{
FxMutexEnter: 0,
FxMutexTry: 0,
FxMutexLeave: 0,
-} /* sqlite3.c:26349:38 */
+} /* sqlite3.c:26531:38 */
// If compiled with SQLITE_MUTEX_NOOP, then the no-op mutex implementation
// is used regardless of the run-time threadsafety setting.
-func Xsqlite3DefaultMutex(tls *libc.TLS) uintptr { /* sqlite3.c:26507:44: */
+func Xsqlite3DefaultMutex(tls *libc.TLS) uintptr { /* sqlite3.c:26689:44: */
return Xsqlite3NoopMutex(tls)
}
@@ -14409,7 +15192,7 @@ func Xsqlite3DefaultMutex(tls *libc.TLS) uintptr { /* sqlite3.c:26507:44: */
// Attempt to release up to n bytes of non-essential memory currently
// held by SQLite. An example of non-essential memory is memory used to
// cache database pages that are not currently in use.
-func Xsqlite3_release_memory(tls *libc.TLS, n int32) int32 { /* sqlite3.c:27626:16: */
+func Xsqlite3_release_memory(tls *libc.TLS, n int32) int32 { /* sqlite3.c:27808:16: */
return Xsqlite3PcacheReleaseMemory(tls, n)
}
@@ -14421,23 +15204,23 @@ type Mem0Global = struct {
FalarmThreshold Sqlite3_int64
FhardLimit Sqlite3_int64
FnearlyFull int32
- _ [4]byte
-} /* sqlite3.c:27648:19 */
+ F__ccgo_pad1 [4]byte
+} /* sqlite3.c:27830:19 */
// Default value of the hard heap limit. 0 means "no limit".
// State information local to the memory allocation subsystem.
-var mem0 = Mem0Global{} /* sqlite3.c:27658:3 */
+var mem0 = Mem0Global{} /* sqlite3.c:27840:3 */
// Return the memory allocator mutex. sqlite3_status() needs it.
-func Xsqlite3MallocMutex(tls *libc.TLS) uintptr { /* sqlite3.c:27665:30: */
+func Xsqlite3MallocMutex(tls *libc.TLS) uintptr { /* sqlite3.c:27847:30: */
return mem0.Fmutex
}
// Deprecated external interface. It used to set an alarm callback
// that was invoked when memory usage grew too large. Now it is a
// no-op.
-func Xsqlite3_memory_alarm(tls *libc.TLS, xCallback uintptr, pArg uintptr, iThreshold Sqlite3_int64) int32 { /* sqlite3.c:27675:16: */
+func Xsqlite3_memory_alarm(tls *libc.TLS, xCallback uintptr, pArg uintptr, iThreshold Sqlite3_int64) int32 { /* sqlite3.c:27857:16: */
_ = xCallback
_ = pArg
_ = iThreshold
@@ -14453,7 +15236,7 @@ func Xsqlite3_memory_alarm(tls *libc.TLS, xCallback uintptr, pArg uintptr, iThre
//
// If the hard heap limit is enabled, then the soft heap limit cannot
// be disabled nor raised above the hard heap limit.
-func Xsqlite3_soft_heap_limit64(tls *libc.TLS, n Sqlite3_int64) Sqlite3_int64 { /* sqlite3.c:27698:26: */
+func Xsqlite3_soft_heap_limit64(tls *libc.TLS, n Sqlite3_int64) Sqlite3_int64 { /* sqlite3.c:27880:26: */
var priorLimit Sqlite3_int64
var excess Sqlite3_int64
var nUsed Sqlite3_int64
@@ -14481,7 +15264,7 @@ func Xsqlite3_soft_heap_limit64(tls *libc.TLS, n Sqlite3_int64) Sqlite3_int64 {
return priorLimit
}
-func Xsqlite3_soft_heap_limit(tls *libc.TLS, n int32) { /* sqlite3.c:27723:17: */
+func Xsqlite3_soft_heap_limit(tls *libc.TLS, n int32) { /* sqlite3.c:27905:17: */
if n < 0 {
n = 0
}
@@ -14498,7 +15281,7 @@ func Xsqlite3_soft_heap_limit(tls *libc.TLS, n int32) { /* sqlite3.c:27723:17: *
// Setting the hard heap limit will also activate the soft heap limit
// and constrain the soft heap limit to be no more than the hard heap
// limit.
-func Xsqlite3_hard_heap_limit64(tls *libc.TLS, n Sqlite3_int64) Sqlite3_int64 { /* sqlite3.c:27740:26: */
+func Xsqlite3_hard_heap_limit64(tls *libc.TLS, n Sqlite3_int64) Sqlite3_int64 { /* sqlite3.c:27922:26: */
var priorLimit Sqlite3_int64
var rc int32 = Xsqlite3_initialize(tls)
if rc != 0 {
@@ -14517,19 +15300,20 @@ func Xsqlite3_hard_heap_limit64(tls *libc.TLS, n Sqlite3_int64) Sqlite3_int64 {
}
// Initialize the memory allocation subsystem.
-func Xsqlite3MallocInit(tls *libc.TLS) int32 { /* sqlite3.c:27762:20: */
+func Xsqlite3MallocInit(tls *libc.TLS) int32 { /* sqlite3.c:27944:20: */
var rc int32
if Xsqlite3Config.Fm.FxMalloc == uintptr(0) {
Xsqlite3MemSetDefault(tls)
}
- libc.Xmemset(tls, uintptr(unsafe.Pointer(&mem0)), 0, uint64(unsafe.Sizeof(mem0)))
mem0.Fmutex = Xsqlite3MutexAlloc(tls, SQLITE_MUTEX_STATIC_MEM)
if ((Xsqlite3Config.FpPage == uintptr(0)) || (Xsqlite3Config.FszPage < 512)) ||
(Xsqlite3Config.FnPage <= 0) {
Xsqlite3Config.FpPage = uintptr(0)
Xsqlite3Config.FszPage = 0
}
- rc = (*(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer((uintptr(unsafe.Pointer(&Xsqlite3Config)) + 32 /* &.m */ + 40 /* &.xInit */))))(tls, Xsqlite3Config.Fm.FpAppData)
+ rc = (*struct {
+ f func(*libc.TLS, uintptr) int32
+ })(unsafe.Pointer(&struct{ uintptr }{Xsqlite3Config.Fm.FxInit})).f(tls, Xsqlite3Config.Fm.FpAppData)
if rc != SQLITE_OK {
libc.Xmemset(tls, uintptr(unsafe.Pointer(&mem0)), 0, uint64(unsafe.Sizeof(mem0)))
}
@@ -14539,20 +15323,20 @@ func Xsqlite3MallocInit(tls *libc.TLS) int32 { /* sqlite3.c:27762:20: */
// Return true if the heap is currently under memory pressure - in other
// words if the amount of heap used is close to the limit set by
// sqlite3_soft_heap_limit().
-func Xsqlite3HeapNearlyFull(tls *libc.TLS) int32 { /* sqlite3.c:27784:20: */
+func Xsqlite3HeapNearlyFull(tls *libc.TLS) int32 { /* sqlite3.c:27965:20: */
return libc.AtomicLoadNInt32((uintptr(unsafe.Pointer(&mem0)) + 24 /* &.nearlyFull */), 0)
}
// Deinitialize the memory allocation subsystem.
-func Xsqlite3MallocEnd(tls *libc.TLS) { /* sqlite3.c:27791:21: */
+func Xsqlite3MallocEnd(tls *libc.TLS) { /* sqlite3.c:27972:21: */
if Xsqlite3Config.Fm.FxShutdown != 0 {
- (*(*func(*libc.TLS, uintptr))(unsafe.Pointer((uintptr(unsafe.Pointer(&Xsqlite3Config)) + 32 /* &.m */ + 48 /* &.xShutdown */))))(tls, Xsqlite3Config.Fm.FpAppData)
+ (*struct{ f func(*libc.TLS, uintptr) })(unsafe.Pointer(&struct{ uintptr }{Xsqlite3Config.Fm.FxShutdown})).f(tls, Xsqlite3Config.Fm.FpAppData)
}
libc.Xmemset(tls, uintptr(unsafe.Pointer(&mem0)), 0, uint64(unsafe.Sizeof(mem0)))
}
// Return the amount of memory currently checked out.
-func Xsqlite3_memory_used(tls *libc.TLS) Sqlite3_int64 { /* sqlite3.c:27801:26: */
+func Xsqlite3_memory_used(tls *libc.TLS) Sqlite3_int64 { /* sqlite3.c:27982:26: */
bp := tls.Alloc(16)
defer tls.Free(16)
@@ -14567,7 +15351,7 @@ func Xsqlite3_memory_used(tls *libc.TLS) Sqlite3_int64 { /* sqlite3.c:27801:26:
// Return the maximum amount of memory that has ever been
// checked out since either the beginning of this process
// or since the most recent reset.
-func Xsqlite3_memory_highwater(tls *libc.TLS, resetFlag int32) Sqlite3_int64 { /* sqlite3.c:27812:26: */
+func Xsqlite3_memory_highwater(tls *libc.TLS, resetFlag int32) Sqlite3_int64 { /* sqlite3.c:27993:26: */
bp := tls.Alloc(16)
defer tls.Free(16)
@@ -14580,7 +15364,7 @@ func Xsqlite3_memory_highwater(tls *libc.TLS, resetFlag int32) Sqlite3_int64 { /
}
// Trigger the alarm
-func sqlite3MallocAlarm(tls *libc.TLS, nByte int32) { /* sqlite3.c:27821:13: */
+func sqlite3MallocAlarm(tls *libc.TLS, nByte int32) { /* sqlite3.c:28002:13: */
if mem0.FalarmThreshold <= int64(0) {
return
}
@@ -14591,7 +15375,7 @@ func sqlite3MallocAlarm(tls *libc.TLS, nByte int32) { /* sqlite3.c:27821:13: */
// Do a memory allocation with statistics and alarms. Assume the
// lock is already held.
-func mallocWithAlarm(tls *libc.TLS, n int32, pp uintptr) { /* sqlite3.c:27832:13: */
+func mallocWithAlarm(tls *libc.TLS, n int32, pp uintptr) { /* sqlite3.c:28013:13: */
var p uintptr
var nFull int32
@@ -14600,7 +15384,7 @@ func mallocWithAlarm(tls *libc.TLS, n int32, pp uintptr) { /* sqlite3.c:27832:13
// mode and specifically when the DMD "Dark Matter Detector" is enabled
// or else a crash results. Hence, do not attempt to optimize out the
// following xRoundup() call.
- nFull = (*(*func(*libc.TLS, int32) int32)(unsafe.Pointer((uintptr(unsafe.Pointer(&Xsqlite3Config)) + 32 /* &.m */ + 32 /* &.xRoundup */))))(tls, n)
+ nFull = (*struct{ f func(*libc.TLS, int32) int32 })(unsafe.Pointer(&struct{ uintptr }{Xsqlite3Config.Fm.FxRoundup})).f(tls, n)
Xsqlite3StatusHighwater(tls, SQLITE_STATUS_MALLOC_SIZE, n)
if mem0.FalarmThreshold > int64(0) {
@@ -14619,10 +15403,14 @@ func mallocWithAlarm(tls *libc.TLS, n int32, pp uintptr) { /* sqlite3.c:27832:13
libc.AtomicStoreNInt32((uintptr(unsafe.Pointer(&mem0)) + 24 /* &.nearlyFull */), int32(0), 0)
}
}
- p = (*(*func(*libc.TLS, int32) uintptr)(unsafe.Pointer((uintptr(unsafe.Pointer(&Xsqlite3Config)) + 32 /* &.m */ /* &.xMalloc */))))(tls, nFull)
+ p = (*struct {
+ f func(*libc.TLS, int32) uintptr
+ })(unsafe.Pointer(&struct{ uintptr }{Xsqlite3Config.Fm.FxMalloc})).f(tls, nFull)
if (p == uintptr(0)) && (mem0.FalarmThreshold > int64(0)) {
sqlite3MallocAlarm(tls, nFull)
- p = (*(*func(*libc.TLS, int32) uintptr)(unsafe.Pointer((uintptr(unsafe.Pointer(&Xsqlite3Config)) + 32 /* &.m */ /* &.xMalloc */))))(tls, nFull)
+ p = (*struct {
+ f func(*libc.TLS, int32) uintptr
+ })(unsafe.Pointer(&struct{ uintptr }{Xsqlite3Config.Fm.FxMalloc})).f(tls, nFull)
}
if p != 0 {
nFull = Xsqlite3MallocSize(tls, p)
@@ -14634,7 +15422,7 @@ func mallocWithAlarm(tls *libc.TLS, n int32, pp uintptr) { /* sqlite3.c:27832:13
// Allocate memory. This routine is like sqlite3_malloc() except that it
// assumes the memory subsystem has already been initialized.
-func Xsqlite3Malloc(tls *libc.TLS, n U64) uintptr { /* sqlite3.c:27881:21: */
+func Xsqlite3Malloc(tls *libc.TLS, n U64) uintptr { /* sqlite3.c:28062:21: */
bp := tls.Alloc(8)
defer tls.Free(8)
@@ -14652,7 +15440,9 @@ func Xsqlite3Malloc(tls *libc.TLS, n U64) uintptr { /* sqlite3.c:27881:21: */
mallocWithAlarm(tls, int32(n), bp /* &p */)
Xsqlite3_mutex_leave(tls, mem0.Fmutex)
} else {
- *(*uintptr)(unsafe.Pointer(bp /* p */)) = (*(*func(*libc.TLS, int32) uintptr)(unsafe.Pointer((uintptr(unsafe.Pointer(&Xsqlite3Config)) + 32 /* &.m */ /* &.xMalloc */))))(tls, int32(n))
+ *(*uintptr)(unsafe.Pointer(bp /* p */)) = (*struct {
+ f func(*libc.TLS, int32) uintptr
+ })(unsafe.Pointer(&struct{ uintptr }{Xsqlite3Config.Fm.FxMalloc})).f(tls, int32(n))
}
// IMP: R-11148-40995
return *(*uintptr)(unsafe.Pointer(bp /* p */))
@@ -14661,7 +15451,7 @@ func Xsqlite3Malloc(tls *libc.TLS, n U64) uintptr { /* sqlite3.c:27881:21: */
// This version of the memory allocation is for use by the application.
// First make sure the memory subsystem is initialized, then do the
// allocation.
-func Xsqlite3_malloc(tls *libc.TLS, n int32) uintptr { /* sqlite3.c:27906:17: */
+func Xsqlite3_malloc(tls *libc.TLS, n int32) uintptr { /* sqlite3.c:28087:17: */
if Xsqlite3_initialize(tls) != 0 {
return uintptr(0)
}
@@ -14671,7 +15461,7 @@ func Xsqlite3_malloc(tls *libc.TLS, n int32) uintptr { /* sqlite3.c:27906:17: */
return Xsqlite3Malloc(tls, uint64(n))
}
-func Xsqlite3_malloc64(tls *libc.TLS, n Sqlite3_uint64) uintptr { /* sqlite3.c:27912:17: */
+func Xsqlite3_malloc64(tls *libc.TLS, n Sqlite3_uint64) uintptr { /* sqlite3.c:28093:17: */
if Xsqlite3_initialize(tls) != 0 {
return uintptr(0)
}
@@ -14679,25 +15469,27 @@ func Xsqlite3_malloc64(tls *libc.TLS, n Sqlite3_uint64) uintptr { /* sqlite3.c:2
}
// TRUE if p is a lookaside memory allocation from db
-func isLookaside(tls *libc.TLS, db uintptr, p uintptr) int32 { /* sqlite3.c:27923:12: */
+func isLookaside(tls *libc.TLS, db uintptr, p uintptr) int32 { /* sqlite3.c:28104:12: */
return (libc.Bool32((Uptr((p)) >= Uptr(((*Sqlite3)(unsafe.Pointer(db)).Flookaside.FpStart))) && (Uptr((p)) < Uptr(((*Sqlite3)(unsafe.Pointer(db)).Flookaside.FpEnd)))))
}
// Return the size of a memory allocation previously obtained from
// sqlite3Malloc() or sqlite3_malloc().
-func Xsqlite3MallocSize(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:27934:20: */
+func Xsqlite3MallocSize(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:28115:20: */
- return (*(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer((uintptr(unsafe.Pointer(&Xsqlite3Config)) + 32 /* &.m */ + 24 /* &.xSize */))))(tls, p)
+ return (*struct {
+ f func(*libc.TLS, uintptr) int32
+ })(unsafe.Pointer(&struct{ uintptr }{Xsqlite3Config.Fm.FxSize})).f(tls, p)
}
-func lookasideMallocSize(tls *libc.TLS, db uintptr, p uintptr) int32 { /* sqlite3.c:27938:12: */
+func lookasideMallocSize(tls *libc.TLS, db uintptr, p uintptr) int32 { /* sqlite3.c:28119:12: */
if p < (*Sqlite3)(unsafe.Pointer(db)).Flookaside.FpMiddle {
return int32((*Sqlite3)(unsafe.Pointer(db)).Flookaside.FszTrue)
}
return LOOKASIDE_SMALL
}
-func Xsqlite3DbMallocSize(tls *libc.TLS, db uintptr, p uintptr) int32 { /* sqlite3.c:27945:20: */
+func Xsqlite3DbMallocSize(tls *libc.TLS, db uintptr, p uintptr) int32 { /* sqlite3.c:28126:20: */
if db != 0 {
if (Uptr(p)) < Uptr(((*Sqlite3)(unsafe.Pointer(db)).Flookaside.FpEnd)) {
@@ -14711,19 +15503,23 @@ func Xsqlite3DbMallocSize(tls *libc.TLS, db uintptr, p uintptr) int32 { /* sqlit
}
}
}
- return (*(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer((uintptr(unsafe.Pointer(&Xsqlite3Config)) + 32 /* &.m */ + 24 /* &.xSize */))))(tls, p)
+ return (*struct {
+ f func(*libc.TLS, uintptr) int32
+ })(unsafe.Pointer(&struct{ uintptr }{Xsqlite3Config.Fm.FxSize})).f(tls, p)
}
-func Xsqlite3_msize(tls *libc.TLS, p uintptr) Sqlite3_uint64 { /* sqlite3.c:27974:27: */
+func Xsqlite3_msize(tls *libc.TLS, p uintptr) Sqlite3_uint64 { /* sqlite3.c:28155:27: */
if p != 0 {
- return uint64((*(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer((uintptr(unsafe.Pointer(&Xsqlite3Config)) + 32 /* &.m */ + 24 /* &.xSize */))))(tls, p))
+ return uint64((*struct {
+ f func(*libc.TLS, uintptr) int32
+ })(unsafe.Pointer(&struct{ uintptr }{Xsqlite3Config.Fm.FxSize})).f(tls, p))
}
return uint64(0)
}
// Free memory previously obtained from sqlite3Malloc().
-func Xsqlite3_free(tls *libc.TLS, p uintptr) { /* sqlite3.c:27983:17: */
+func Xsqlite3_free(tls *libc.TLS, p uintptr) { /* sqlite3.c:28164:17: */
if p == uintptr(0) {
return
} // IMP: R-49053-54554
@@ -14732,23 +15528,23 @@ func Xsqlite3_free(tls *libc.TLS, p uintptr) { /* sqlite3.c:27983:17: */
Xsqlite3_mutex_enter(tls, mem0.Fmutex)
Xsqlite3StatusDown(tls, SQLITE_STATUS_MEMORY_USED, Xsqlite3MallocSize(tls, p))
Xsqlite3StatusDown(tls, SQLITE_STATUS_MALLOC_COUNT, 1)
- (*(*func(*libc.TLS, uintptr))(unsafe.Pointer((uintptr(unsafe.Pointer(&Xsqlite3Config)) + 32 /* &.m */ + 8 /* &.xFree */))))(tls, p)
+ (*struct{ f func(*libc.TLS, uintptr) })(unsafe.Pointer(&struct{ uintptr }{Xsqlite3Config.Fm.FxFree})).f(tls, p)
Xsqlite3_mutex_leave(tls, mem0.Fmutex)
} else {
- (*(*func(*libc.TLS, uintptr))(unsafe.Pointer((uintptr(unsafe.Pointer(&Xsqlite3Config)) + 32 /* &.m */ + 8 /* &.xFree */))))(tls, p)
+ (*struct{ f func(*libc.TLS, uintptr) })(unsafe.Pointer(&struct{ uintptr }{Xsqlite3Config.Fm.FxFree})).f(tls, p)
}
}
// Add the size of memory allocation "p" to the count in
// *db->pnBytesFreed.
-func measureAllocationSize(tls *libc.TLS, db uintptr, p uintptr) { /* sqlite3.c:28002:29: */
+func measureAllocationSize(tls *libc.TLS, db uintptr, p uintptr) { /* sqlite3.c:28183:29: */
*(*int32)(unsafe.Pointer((*Sqlite3)(unsafe.Pointer(db)).FpnBytesFreed)) += (Xsqlite3DbMallocSize(tls, db, p))
}
// Free memory that might be associated with a particular database
// connection. Calling sqlite3DbFree(D,X) for X==0 is a harmless no-op.
// The sqlite3DbFreeNN(D,X) version requires that X be non-NULL.
-func Xsqlite3DbFreeNN(tls *libc.TLS, db uintptr, p uintptr) { /* sqlite3.c:28011:21: */
+func Xsqlite3DbFreeNN(tls *libc.TLS, db uintptr, p uintptr) { /* sqlite3.c:28192:21: */
if db != 0 {
if (*Sqlite3)(unsafe.Pointer(db)).FpnBytesFreed != 0 {
@@ -14774,7 +15570,7 @@ func Xsqlite3DbFreeNN(tls *libc.TLS, db uintptr, p uintptr) { /* sqlite3.c:28011
Xsqlite3_free(tls, p)
}
-func Xsqlite3DbFree(tls *libc.TLS, db uintptr, p uintptr) { /* sqlite3.c:28048:21: */
+func Xsqlite3DbFree(tls *libc.TLS, db uintptr, p uintptr) { /* sqlite3.c:28229:21: */
if p != 0 {
Xsqlite3DbFreeNN(tls, db, p)
@@ -14782,7 +15578,7 @@ func Xsqlite3DbFree(tls *libc.TLS, db uintptr, p uintptr) { /* sqlite3.c:28048:2
}
// Change the size of an existing memory allocation
-func Xsqlite3Realloc(tls *libc.TLS, pOld uintptr, nBytes U64) uintptr { /* sqlite3.c:28056:21: */
+func Xsqlite3Realloc(tls *libc.TLS, pOld uintptr, nBytes U64) uintptr { /* sqlite3.c:28237:21: */
var nOld int32
var nNew int32
var nDiff int32
@@ -14803,7 +15599,7 @@ func Xsqlite3Realloc(tls *libc.TLS, pOld uintptr, nBytes U64) uintptr { /* sqlit
// IMPLEMENTATION-OF: R-46199-30249 SQLite guarantees that the second
// argument to xRealloc is always a value returned by a prior call to
// xRoundup.
- nNew = (*(*func(*libc.TLS, int32) int32)(unsafe.Pointer((uintptr(unsafe.Pointer(&Xsqlite3Config)) + 32 /* &.m */ + 32 /* &.xRoundup */))))(tls, int32(nBytes))
+ nNew = (*struct{ f func(*libc.TLS, int32) int32 })(unsafe.Pointer(&struct{ uintptr }{Xsqlite3Config.Fm.FxRoundup})).f(tls, int32(nBytes))
if nOld == nNew {
pNew = pOld
} else if Xsqlite3Config.FbMemstat != 0 {
@@ -14818,10 +15614,14 @@ func Xsqlite3Realloc(tls *libc.TLS, pOld uintptr, nBytes U64) uintptr { /* sqlit
return uintptr(0)
}
}
- pNew = (*(*func(*libc.TLS, uintptr, int32) uintptr)(unsafe.Pointer((uintptr(unsafe.Pointer(&Xsqlite3Config)) + 32 /* &.m */ + 16 /* &.xRealloc */))))(tls, pOld, nNew)
+ pNew = (*struct {
+ f func(*libc.TLS, uintptr, int32) uintptr
+ })(unsafe.Pointer(&struct{ uintptr }{Xsqlite3Config.Fm.FxRealloc})).f(tls, pOld, nNew)
if (pNew == uintptr(0)) && (mem0.FalarmThreshold > int64(0)) {
sqlite3MallocAlarm(tls, int32(nBytes))
- pNew = (*(*func(*libc.TLS, uintptr, int32) uintptr)(unsafe.Pointer((uintptr(unsafe.Pointer(&Xsqlite3Config)) + 32 /* &.m */ + 16 /* &.xRealloc */))))(tls, pOld, nNew)
+ pNew = (*struct {
+ f func(*libc.TLS, uintptr, int32) uintptr
+ })(unsafe.Pointer(&struct{ uintptr }{Xsqlite3Config.Fm.FxRealloc})).f(tls, pOld, nNew)
}
if pNew != 0 {
nNew = Xsqlite3MallocSize(tls, pNew)
@@ -14829,7 +15629,9 @@ func Xsqlite3Realloc(tls *libc.TLS, pOld uintptr, nBytes U64) uintptr { /* sqlit
}
Xsqlite3_mutex_leave(tls, mem0.Fmutex)
} else {
- pNew = (*(*func(*libc.TLS, uintptr, int32) uintptr)(unsafe.Pointer((uintptr(unsafe.Pointer(&Xsqlite3Config)) + 32 /* &.m */ + 16 /* &.xRealloc */))))(tls, pOld, nNew)
+ pNew = (*struct {
+ f func(*libc.TLS, uintptr, int32) uintptr
+ })(unsafe.Pointer(&struct{ uintptr }{Xsqlite3Config.Fm.FxRealloc})).f(tls, pOld, nNew)
}
// IMP: R-11148-40995
return pNew
@@ -14837,7 +15639,7 @@ func Xsqlite3Realloc(tls *libc.TLS, pOld uintptr, nBytes U64) uintptr { /* sqlit
// The public interface to sqlite3Realloc. Make sure that the memory
// subsystem is initialized prior to invoking sqliteRealloc.
-func Xsqlite3_realloc(tls *libc.TLS, pOld uintptr, n int32) uintptr { /* sqlite3.c:28115:17: */
+func Xsqlite3_realloc(tls *libc.TLS, pOld uintptr, n int32) uintptr { /* sqlite3.c:28296:17: */
if Xsqlite3_initialize(tls) != 0 {
return uintptr(0)
}
@@ -14847,7 +15649,7 @@ func Xsqlite3_realloc(tls *libc.TLS, pOld uintptr, n int32) uintptr { /* sqlite3
return Xsqlite3Realloc(tls, pOld, uint64(n))
}
-func Xsqlite3_realloc64(tls *libc.TLS, pOld uintptr, n Sqlite3_uint64) uintptr { /* sqlite3.c:28122:17: */
+func Xsqlite3_realloc64(tls *libc.TLS, pOld uintptr, n Sqlite3_uint64) uintptr { /* sqlite3.c:28303:17: */
if Xsqlite3_initialize(tls) != 0 {
return uintptr(0)
}
@@ -14855,7 +15657,7 @@ func Xsqlite3_realloc64(tls *libc.TLS, pOld uintptr, n Sqlite3_uint64) uintptr {
}
// Allocate and zero memory.
-func Xsqlite3MallocZero(tls *libc.TLS, n U64) uintptr { /* sqlite3.c:28133:21: */
+func Xsqlite3MallocZero(tls *libc.TLS, n U64) uintptr { /* sqlite3.c:28314:21: */
var p uintptr = Xsqlite3Malloc(tls, n)
if p != 0 {
libc.Xmemset(tls, p, 0, Size_t(n))
@@ -14865,7 +15667,7 @@ func Xsqlite3MallocZero(tls *libc.TLS, n U64) uintptr { /* sqlite3.c:28133:21: *
// Allocate and zero memory. If the allocation fails, make
// the mallocFailed flag in the connection pointer.
-func Xsqlite3DbMallocZero(tls *libc.TLS, db uintptr, n U64) uintptr { /* sqlite3.c:28145:21: */
+func Xsqlite3DbMallocZero(tls *libc.TLS, db uintptr, n U64) uintptr { /* sqlite3.c:28326:21: */
var p uintptr
p = Xsqlite3DbMallocRaw(tls, db, n)
@@ -14877,7 +15679,7 @@ func Xsqlite3DbMallocZero(tls *libc.TLS, db uintptr, n U64) uintptr { /* sqlite3
// Finish the work of sqlite3DbMallocRawNN for the unusual and
// slower case when the allocation cannot be fulfilled using lookaside.
-func dbMallocRawFinish(tls *libc.TLS, db uintptr, n U64) uintptr { /* sqlite3.c:28157:29: */
+func dbMallocRawFinish(tls *libc.TLS, db uintptr, n U64) uintptr { /* sqlite3.c:28338:29: */
var p uintptr
p = Xsqlite3Malloc(tls, n)
@@ -14908,7 +15710,7 @@ func dbMallocRawFinish(tls *libc.TLS, db uintptr, n U64) uintptr { /* sqlite3.c:
//
// The sqlite3MallocRawNN() variant guarantees that the "db" parameter is
// not a NULL pointer.
-func Xsqlite3DbMallocRaw(tls *libc.TLS, db uintptr, n U64) uintptr { /* sqlite3.c:28189:21: */
+func Xsqlite3DbMallocRaw(tls *libc.TLS, db uintptr, n U64) uintptr { /* sqlite3.c:28370:21: */
var p uintptr
if db != 0 {
return Xsqlite3DbMallocRawNN(tls, db, n)
@@ -14918,7 +15720,7 @@ func Xsqlite3DbMallocRaw(tls *libc.TLS, db uintptr, n U64) uintptr { /* sqlite3.
return p
}
-func Xsqlite3DbMallocRawNN(tls *libc.TLS, db uintptr, n U64) uintptr { /* sqlite3.c:28196:21: */
+func Xsqlite3DbMallocRawNN(tls *libc.TLS, db uintptr, n U64) uintptr { /* sqlite3.c:28377:21: */
var pBuf uintptr
if n > U64((*Sqlite3)(unsafe.Pointer(db)).Flookaside.Fsz) {
@@ -14956,7 +15758,7 @@ func Xsqlite3DbMallocRawNN(tls *libc.TLS, db uintptr, n U64) uintptr { /* sqlite
// Resize the block of memory pointed to by p to n bytes. If the
// resize fails, set the mallocFailed flag in the connection object.
-func Xsqlite3DbRealloc(tls *libc.TLS, db uintptr, p uintptr, n U64) uintptr { /* sqlite3.c:28252:21: */
+func Xsqlite3DbRealloc(tls *libc.TLS, db uintptr, p uintptr, n U64) uintptr { /* sqlite3.c:28433:21: */
if p == uintptr(0) {
return Xsqlite3DbMallocRawNN(tls, db, n)
@@ -14976,7 +15778,7 @@ func Xsqlite3DbRealloc(tls *libc.TLS, db uintptr, p uintptr, n U64) uintptr { /*
return dbReallocFinish(tls, db, p, n)
}
-func dbReallocFinish(tls *libc.TLS, db uintptr, p uintptr, n U64) uintptr { /* sqlite3.c:28268:29: */
+func dbReallocFinish(tls *libc.TLS, db uintptr, p uintptr, n U64) uintptr { /* sqlite3.c:28449:29: */
var pNew uintptr = uintptr(0)
if int32((*Sqlite3)(unsafe.Pointer(db)).FmallocFailed) == 0 {
@@ -15000,7 +15802,7 @@ func dbReallocFinish(tls *libc.TLS, db uintptr, p uintptr, n U64) uintptr { /* s
// Attempt to reallocate p. If the reallocation fails, then free p
// and set the mallocFailed flag in the database connection.
-func Xsqlite3DbReallocOrFree(tls *libc.TLS, db uintptr, p uintptr, n U64) uintptr { /* sqlite3.c:28298:21: */
+func Xsqlite3DbReallocOrFree(tls *libc.TLS, db uintptr, p uintptr, n U64) uintptr { /* sqlite3.c:28479:21: */
var pNew uintptr
pNew = Xsqlite3DbRealloc(tls, db, p, n)
if !(pNew != 0) {
@@ -15014,7 +15816,7 @@ func Xsqlite3DbReallocOrFree(tls *libc.TLS, db uintptr, p uintptr, n U64) uintpt
// is because when memory debugging is turned on, these two functions are
// called via macros that record the current file and line number in the
// ThreadData structure.
-func Xsqlite3DbStrDup(tls *libc.TLS, db uintptr, z uintptr) uintptr { /* sqlite3.c:28314:21: */
+func Xsqlite3DbStrDup(tls *libc.TLS, db uintptr, z uintptr) uintptr { /* sqlite3.c:28495:21: */
var zNew uintptr
var n Size_t
if z == uintptr(0) {
@@ -15028,7 +15830,7 @@ func Xsqlite3DbStrDup(tls *libc.TLS, db uintptr, z uintptr) uintptr { /* sqlite3
return zNew
}
-func Xsqlite3DbStrNDup(tls *libc.TLS, db uintptr, z uintptr, n U64) uintptr { /* sqlite3.c:28327:21: */
+func Xsqlite3DbStrNDup(tls *libc.TLS, db uintptr, z uintptr, n U64) uintptr { /* sqlite3.c:28508:21: */
var zNew uintptr
if z != 0 {
@@ -15038,7 +15840,7 @@ func Xsqlite3DbStrNDup(tls *libc.TLS, db uintptr, z uintptr, n U64) uintptr { /*
}
if zNew != 0 {
libc.Xmemcpy(tls, zNew, z, Size_t(n))
- *(*int8)(unsafe.Pointer(zNew + uintptr(n))) = int8(0)
+ *(*uint8)(unsafe.Pointer(zNew + uintptr(n))) = uint8(0)
}
return zNew
}
@@ -15046,20 +15848,20 @@ func Xsqlite3DbStrNDup(tls *libc.TLS, db uintptr, z uintptr, n U64) uintptr { /*
// The text between zStart and zEnd represents a phrase within a larger
// SQL statement. Make a copy of this phrase in space obtained form
// sqlite3DbMalloc(). Omit leading and trailing whitespace.
-func Xsqlite3DbSpanDup(tls *libc.TLS, db uintptr, zStart uintptr, zEnd uintptr) uintptr { /* sqlite3.c:28345:21: */
+func Xsqlite3DbSpanDup(tls *libc.TLS, db uintptr, zStart uintptr, zEnd uintptr) uintptr { /* sqlite3.c:28526:21: */
var n int32
- for (int32(Xsqlite3CtypeMap[uint8(*(*int8)(unsafe.Pointer(zStart)))]) & 0x01) != 0 {
+ for (int32(Xsqlite3CtypeMap[uint8(*(*uint8)(unsafe.Pointer(zStart)))]) & 0x01) != 0 {
zStart++
}
n = (int32((int64(zEnd) - int64(zStart)) / 1))
- for (n > 0) && ((int32(Xsqlite3CtypeMap[uint8(*(*int8)(unsafe.Pointer(zStart + uintptr((n - 1)))))]) & 0x01) != 0) {
+ for (n > 0) && ((int32(Xsqlite3CtypeMap[uint8(*(*uint8)(unsafe.Pointer(zStart + uintptr((n - 1)))))]) & 0x01) != 0) {
n--
}
return Xsqlite3DbStrNDup(tls, db, zStart, uint64(n))
}
// Free any prior content in *pz and replace it with a copy of zNew.
-func Xsqlite3SetString(tls *libc.TLS, pz uintptr, db uintptr, zNew uintptr) { /* sqlite3.c:28356:21: */
+func Xsqlite3SetString(tls *libc.TLS, pz uintptr, db uintptr, zNew uintptr) { /* sqlite3.c:28537:21: */
Xsqlite3DbFree(tls, db, *(*uintptr)(unsafe.Pointer(pz)))
*(*uintptr)(unsafe.Pointer(pz)) = Xsqlite3DbStrDup(tls, db, zNew)
}
@@ -15068,7 +15870,7 @@ func Xsqlite3SetString(tls *libc.TLS, pz uintptr, db uintptr, zNew uintptr) { /*
// has happened. This routine will set db->mallocFailed, and also
// temporarily disable the lookaside memory allocator and interrupt
// any running VDBEs.
-func Xsqlite3OomFault(tls *libc.TLS, db uintptr) { /* sqlite3.c:28367:21: */
+func Xsqlite3OomFault(tls *libc.TLS, db uintptr) { /* sqlite3.c:28548:21: */
if (int32((*Sqlite3)(unsafe.Pointer(db)).FmallocFailed) == 0) && (int32((*Sqlite3)(unsafe.Pointer(db)).FbBenignMalloc) == 0) {
(*Sqlite3)(unsafe.Pointer(db)).FmallocFailed = U8(1)
if (*Sqlite3)(unsafe.Pointer(db)).FnVdbeExec > 0 {
@@ -15087,7 +15889,7 @@ func Xsqlite3OomFault(tls *libc.TLS, db uintptr) { /* sqlite3.c:28367:21: */
//
// The memory allocator is not restarted if there are running
// VDBEs.
-func Xsqlite3OomClear(tls *libc.TLS, db uintptr) { /* sqlite3.c:28387:21: */
+func Xsqlite3OomClear(tls *libc.TLS, db uintptr) { /* sqlite3.c:28568:21: */
if ((*Sqlite3)(unsafe.Pointer(db)).FmallocFailed != 0) && ((*Sqlite3)(unsafe.Pointer(db)).FnVdbeExec == 0) {
(*Sqlite3)(unsafe.Pointer(db)).FmallocFailed = U8(0)
libc.AtomicStoreNInt32((db + 400 /* &.u1 */ /* &.isInterrupted */), int32(0), 0)
@@ -15103,7 +15905,7 @@ func Xsqlite3OomClear(tls *libc.TLS, db uintptr) { /* sqlite3.c:28387:21: */
}
// Take actions at the end of an API call to deal with error codes.
-func apiHandleError(tls *libc.TLS, db uintptr, rc int32) int32 { /* sqlite3.c:28399:28: */
+func apiHandleError(tls *libc.TLS, db uintptr, rc int32) int32 { /* sqlite3.c:28580:28: */
if ((*Sqlite3)(unsafe.Pointer(db)).FmallocFailed != 0) || (rc == (SQLITE_IOERR | (int32(12) << 8))) {
Xsqlite3OomClear(tls, db)
Xsqlite3Error(tls, db, SQLITE_NOMEM)
@@ -15122,7 +15924,7 @@ func apiHandleError(tls *libc.TLS, db uintptr, rc int32) int32 { /* sqlite3.c:28
//
// If an OOM as occurred, then the connection error-code (the value
// returned by sqlite3_errcode()) is set to SQLITE_NOMEM.
-func Xsqlite3ApiExit(tls *libc.TLS, db uintptr, rc int32) int32 { /* sqlite3.c:28420:20: */
+func Xsqlite3ApiExit(tls *libc.TLS, db uintptr, rc int32) int32 { /* sqlite3.c:28601:20: */
// If the db handle must hold the connection handle mutex here.
// Otherwise the read (and possible write) of db->mallocFailed
// is unsafe, as is the call to sqlite3Error().
@@ -15151,62 +15953,67 @@ func Xsqlite3ApiExit(tls *libc.TLS, db uintptr, rc int32) int32 { /* sqlite3.c:2
// The rest are extensions, not normally found in printf()
// An "etByte" is an 8-bit unsigned value.
-type EtByte = uint8 /* sqlite3.c:28478:23 */
+type EtByte = uint8 /* sqlite3.c:28659:23 */
// Each builtin conversion character (ex: the 'd' in "%d") is described
// by an instance of the following structure
type et_info = struct {
- Ffmttype int8
+ Ffmttype uint8
Fbase EtByte
Fflags EtByte
Ftype EtByte
Fcharset EtByte
Fprefix EtByte
-} /* sqlite3.c:28484:9 */
+} /* sqlite3.c:28665:9 */
// Each builtin conversion character (ex: the 'd' in "%d") is described
// by an instance of the following structure
-type Et_info = et_info /* sqlite3.c:28491:3 */
+type Et_info = et_info /* sqlite3.c:28672:3 */
// Allowed values for et_info.flags
// The following table is searched linearly, so it is good to put the
// most frequently used conversion types first.
-var aDigits = *(*[33]int8)(unsafe.Pointer(ts + 653 /* "0123456789ABCDEF..." */)) /* sqlite3.c:28504:19 */
-var aPrefix = *(*[7]int8)(unsafe.Pointer(ts + 686 /* "-x0\x00X0" */)) /* sqlite3.c:28505:19 */
+var aDigits = *(*[33]uint8)(unsafe.Pointer(ts + 705 /* "0123456789ABCDEF..." */)) /* sqlite3.c:28685:19 */
+var aPrefix = *(*[7]uint8)(unsafe.Pointer(ts + 738 /* "-x0\x00X0" */)) /* sqlite3.c:28686:19 */
var fmtinfo = [23]Et_info{
- {Ffmttype: int8('d'), Fbase: EtByte(10), Fflags: EtByte(1), Ftype: EtByte(EtDECIMAL)},
- {Ffmttype: int8('s'), Fflags: EtByte(4), Ftype: EtByte(EtSTRING)},
- {Ffmttype: int8('g'), Fflags: EtByte(1), Ftype: EtByte(EtGENERIC), Fcharset: EtByte(30)},
- {Ffmttype: int8('z'), Fflags: EtByte(4), Ftype: EtByte(EtDYNSTRING)},
- {Ffmttype: int8('q'), Fflags: EtByte(4), Ftype: EtByte(EtSQLESCAPE)},
- {Ffmttype: int8('Q'), Fflags: EtByte(4), Ftype: EtByte(EtSQLESCAPE2)},
- {Ffmttype: int8('w'), Fflags: EtByte(4), Ftype: EtByte(EtSQLESCAPE3)},
- {Ffmttype: int8('c'), Ftype: EtByte(EtCHARX)},
- {Ffmttype: int8('o'), Fbase: EtByte(8), Fprefix: EtByte(2)},
- {Ffmttype: int8('u'), Fbase: EtByte(10), Ftype: EtByte(EtDECIMAL)},
- {Ffmttype: int8('x'), Fbase: EtByte(16), Fcharset: EtByte(16), Fprefix: EtByte(1)},
- {Ffmttype: int8('X'), Fbase: EtByte(16), Fprefix: EtByte(4)},
- {Ffmttype: int8('f'), Fflags: EtByte(1), Ftype: EtByte(EtFLOAT)},
- {Ffmttype: int8('e'), Fflags: EtByte(1), Ftype: EtByte(EtEXP), Fcharset: EtByte(30)},
- {Ffmttype: int8('E'), Fflags: EtByte(1), Ftype: EtByte(EtEXP), Fcharset: EtByte(14)},
- {Ffmttype: int8('G'), Fflags: EtByte(1), Ftype: EtByte(EtGENERIC), Fcharset: EtByte(14)},
- {Ffmttype: int8('i'), Fbase: EtByte(10), Fflags: EtByte(1), Ftype: EtByte(EtDECIMAL)},
- {Ffmttype: int8('n'), Ftype: EtByte(EtSIZE)},
- {Ffmttype: int8('%'), Ftype: EtByte(EtPERCENT)},
- {Ffmttype: int8('p'), Fbase: EtByte(16), Ftype: EtByte(EtPOINTER), Fprefix: EtByte(1)},
+ {Ffmttype: uint8('d'), Fbase: EtByte(10), Fflags: EtByte(1), Ftype: EtByte(EtDECIMAL)},
+ {Ffmttype: uint8('s'), Fflags: EtByte(4), Ftype: EtByte(EtSTRING)},
+ {Ffmttype: uint8('g'), Fflags: EtByte(1), Ftype: EtByte(EtGENERIC), Fcharset: EtByte(30)},
+ {Ffmttype: uint8('z'), Fflags: EtByte(4), Ftype: EtByte(EtDYNSTRING)},
+ {Ffmttype: uint8('q'), Fflags: EtByte(4), Ftype: EtByte(EtSQLESCAPE)},
+ {Ffmttype: uint8('Q'), Fflags: EtByte(4), Ftype: EtByte(EtSQLESCAPE2)},
+ {Ffmttype: uint8('w'), Fflags: EtByte(4), Ftype: EtByte(EtSQLESCAPE3)},
+ {Ffmttype: uint8('c'), Ftype: EtByte(EtCHARX)},
+ {Ffmttype: uint8('o'), Fbase: EtByte(8), Fprefix: EtByte(2)},
+ {Ffmttype: uint8('u'), Fbase: EtByte(10), Ftype: EtByte(EtDECIMAL)},
+ {Ffmttype: uint8('x'), Fbase: EtByte(16), Fcharset: EtByte(16), Fprefix: EtByte(1)},
+ {Ffmttype: uint8('X'), Fbase: EtByte(16), Fprefix: EtByte(4)},
+ {Ffmttype: uint8('f'), Fflags: EtByte(1), Ftype: EtByte(EtFLOAT)},
+ {Ffmttype: uint8('e'), Fflags: EtByte(1), Ftype: EtByte(EtEXP), Fcharset: EtByte(30)},
+ {Ffmttype: uint8('E'), Fflags: EtByte(1), Ftype: EtByte(EtEXP), Fcharset: EtByte(14)},
+ {Ffmttype: uint8('G'), Fflags: EtByte(1), Ftype: EtByte(EtGENERIC), Fcharset: EtByte(14)},
+ {Ffmttype: uint8('i'), Fbase: EtByte(10), Fflags: EtByte(1), Ftype: EtByte(EtDECIMAL)},
+ {Ffmttype: uint8('n'), Ftype: EtByte(EtSIZE)},
+ {Ffmttype: uint8('%'), Ftype: EtByte(EtPERCENT)},
+ {Ffmttype: uint8('p'), Fbase: EtByte(16), Ftype: EtByte(EtPOINTER), Fprefix: EtByte(1)},
// All the rest are undocumented and are for internal use only
- {Ffmttype: int8('T'), Ftype: EtByte(EtTOKEN)},
- {Ffmttype: int8('S'), Ftype: EtByte(EtSRCLIST)},
- {Ffmttype: int8('r'), Fbase: EtByte(10), Fflags: EtByte(1), Ftype: EtByte(EtORDINAL)},
-} /* sqlite3.c:28506:22 */
+ {Ffmttype: uint8('T'), Ftype: EtByte(EtTOKEN)},
+ {Ffmttype: uint8('S'), Ftype: EtByte(EtSRCITEM)},
+ {Ffmttype: uint8('r'), Fbase: EtByte(10), Fflags: EtByte(1), Ftype: EtByte(EtORDINAL)},
+} /* sqlite3.c:28687:22 */
+
+// Notes:
+//
+// %S Takes a pointer to SrcItem. Shows name or database.name
+// %!S Like %S but prefer the zName over the zAlias
// Floating point constants used for rounding
var arRound = [10]float64{
5.0e-01, 5.0e-02, 5.0e-03, 5.0e-04, 5.0e-05,
5.0e-06, 5.0e-07, 5.0e-08, 5.0e-09, 5.0e-10,
-} /* sqlite3.c:28537:21 */
+} /* sqlite3.c:28724:21 */
// If SQLITE_OMIT_FLOATING_POINT is defined, then none of the floating point
// conversions will work.
@@ -15221,22 +16028,22 @@ var arRound = [10]float64{
// The counter *cnt is incremented each time. After counter exceeds
// 16 (the number of significant digits in a 64-bit float) '0' is
// always returned.
-func et_getdigit(tls *libc.TLS, val uintptr, cnt uintptr) int8 { /* sqlite3.c:28560:13: */
+func et_getdigit(tls *libc.TLS, val uintptr, cnt uintptr) uint8 { /* sqlite3.c:28747:13: */
var digit int32
var d float64
if (*(*int32)(unsafe.Pointer(cnt))) <= 0 {
- return int8('0')
+ return uint8('0')
}
(*(*int32)(unsafe.Pointer(cnt)))--
digit = int32(*(*float64)(unsafe.Pointer(val)))
d = float64(digit)
digit = digit + ('0')
*(*float64)(unsafe.Pointer(val)) = ((*(*float64)(unsafe.Pointer(val)) - d) * 10.0)
- return int8(digit)
+ return uint8(digit)
}
// Set the StrAccum object to an error mode.
-func setStrAccumError(tls *libc.TLS, p uintptr, eError U8) { /* sqlite3.c:28576:13: */
+func setStrAccumError(tls *libc.TLS, p uintptr, eError U8) { /* sqlite3.c:28763:13: */
(*StrAccum)(unsafe.Pointer(p)).FaccError = eError
if (*StrAccum)(unsafe.Pointer(p)).FmxAlloc != 0 {
@@ -15248,21 +16055,21 @@ func setStrAccumError(tls *libc.TLS, p uintptr, eError U8) { /* sqlite3.c:28576:
}
// Extra argument values from a PrintfArguments object
-func getIntArg(tls *libc.TLS, p uintptr) Sqlite3_int64 { /* sqlite3.c:28586:22: */
+func getIntArg(tls *libc.TLS, p uintptr) Sqlite3_int64 { /* sqlite3.c:28773:22: */
if (*PrintfArguments)(unsafe.Pointer(p)).FnArg <= (*PrintfArguments)(unsafe.Pointer(p)).FnUsed {
return int64(0)
}
return Xsqlite3_value_int64(tls, *(*uintptr)(unsafe.Pointer((*PrintfArguments)(unsafe.Pointer(p)).FapArg + uintptr(libc.PostIncInt32(&(*PrintfArguments)(unsafe.Pointer(p)).FnUsed, 1))*8)))
}
-func getDoubleArg(tls *libc.TLS, p uintptr) float64 { /* sqlite3.c:28590:15: */
+func getDoubleArg(tls *libc.TLS, p uintptr) float64 { /* sqlite3.c:28777:15: */
if (*PrintfArguments)(unsafe.Pointer(p)).FnArg <= (*PrintfArguments)(unsafe.Pointer(p)).FnUsed {
return 0.0
}
return Xsqlite3_value_double(tls, *(*uintptr)(unsafe.Pointer((*PrintfArguments)(unsafe.Pointer(p)).FapArg + uintptr(libc.PostIncInt32(&(*PrintfArguments)(unsafe.Pointer(p)).FnUsed, 1))*8)))
}
-func getTextArg(tls *libc.TLS, p uintptr) uintptr { /* sqlite3.c:28594:13: */
+func getTextArg(tls *libc.TLS, p uintptr) uintptr { /* sqlite3.c:28781:13: */
if (*PrintfArguments)(unsafe.Pointer(p)).FnArg <= (*PrintfArguments)(unsafe.Pointer(p)).FnUsed {
return uintptr(0)
}
@@ -15276,7 +16083,7 @@ func getTextArg(tls *libc.TLS, p uintptr) uintptr { /* sqlite3.c:28594:13: */
// Do the size check before the memory allocation to prevent rogue
// SQL from requesting large allocations using the precision or width
// field of the printf() function.
-func printfTempBuf(tls *libc.TLS, pAccum uintptr, n Sqlite3_int64) uintptr { /* sqlite3.c:28608:13: */
+func printfTempBuf(tls *libc.TLS, pAccum uintptr, n Sqlite3_int64) uintptr { /* sqlite3.c:28795:13: */
var z uintptr
if (*Sqlite3_str)(unsafe.Pointer(pAccum)).FaccError != 0 {
return uintptr(0)
@@ -15298,9 +16105,9 @@ func printfTempBuf(tls *libc.TLS, pAccum uintptr, n Sqlite3_int64) uintptr { /*
// Hard limit on the precision of floating-point conversions.
// Render a string given by "fmt" into the StrAccum object.
-func Xsqlite3_str_vappendf(tls *libc.TLS, pAccum uintptr, fmt uintptr, ap Va_list) { /* sqlite3.c:28641:17: */
- bp := tls.Alloc(100)
- defer tls.Free(100)
+func Xsqlite3_str_vappendf(tls *libc.TLS, pAccum uintptr, fmt uintptr, ap Va_list) { /* sqlite3.c:28828:17: */
+ bp := tls.Alloc(108)
+ defer tls.Free(108)
var c int32 // Next character in the format string
var bufpt uintptr // Pointer to the conversion buffer
@@ -15318,9 +16125,9 @@ func Xsqlite3_str_vappendf(tls *libc.TLS, pAccum uintptr, fmt uintptr, ap Va_lis
var cThousand EtByte // Thousands separator for %d and %u
var xtype EtByte // Conversion paradigm
var bArgList U8 // True for SQLITE_PRINTF_SQLFUNC
- var prefix int8 // Prefix character. "+" or "-" or " " or '\0'.
+ var prefix uint8 // Prefix character. "+" or "-" or " " or '\0'.
var longvalue Sqlite_uint64 // Value for integer types
- // var realvalue float64 at bp+88, 8
+ // var realvalue float64 at bp+96, 8
// Value for real types
var infop uintptr // Pointer to the appropriate info structure
var zOut uintptr // Rendering buffer
@@ -15328,13 +16135,13 @@ func Xsqlite3_str_vappendf(tls *libc.TLS, pAccum uintptr, fmt uintptr, ap Va_lis
var zExtra uintptr // Malloced memory used by some conversion
var exp int32
var e2 int32 // exponent of real numbers
- // var nsd int32 at bp+96, 4
+ // var nsd int32 at bp+104, 4
// Number of significant digits returned
var rounder float64 // Used for rounding floating point values
var flag_dp EtByte // True if decimal point should be shown
var flag_rtz EtByte // True if trailing zeros should be removed
var pArgList uintptr // Arguments for SQLITE_PRINTF_SQLFUNC
- // var buf [70]int8 at bp, 70
+ // var buf [70]uint8 at bp+8, 70
var wx uint32
var px uint32
@@ -15346,10 +16153,10 @@ func Xsqlite3_str_vappendf(tls *libc.TLS, pAccum uintptr, fmt uintptr, ap Va_lis
var nn int32 // Number of "," to insert
var ix int32 // Add "0" or "0x"
var pre uintptr
- var x1 int8
- // var rx float64 at bp+80, 8
+ var x1 uint8
+ // var rx float64 at bp+88, 8
- // var u Sqlite3_uint64 at bp+72, 8
+ // var u Sqlite3_uint64 at bp+80, 8
var ex int32
var scale float64
@@ -15368,12 +16175,10 @@ func Xsqlite3_str_vappendf(tls *libc.TLS, pAccum uintptr, fmt uintptr, ap Va_lis
var n1 int32
var isnull int32
var needQuote int32
- var ch1 int8
- var q int8 // Quote character
+ var ch1 uint8
+ var q uint8 // Quote character
var escarg uintptr
var pToken uintptr
- var pSrc uintptr
- var k1 int32
var pItem uintptr
xtype = EtByte(EtINVALID)
zExtra = uintptr(0)
@@ -15395,7 +16200,7 @@ __1:
__2:
;
__3:
- if !((libc.AssignInt32(&c, int32(*(*int8)(unsafe.Pointer(fmt))))) != 0) {
+ if !((libc.AssignInt32(&c, int32(*(*uint8)(unsafe.Pointer(fmt))))) != 0) {
goto __5
}
if !(c != '%') {
@@ -15406,14 +16211,14 @@ __7:
fmt++
goto __8
__8:
- if (*(*int8)(unsafe.Pointer(fmt)) != 0) && (int32(*(*int8)(unsafe.Pointer(fmt))) != '%') {
+ if (*(*uint8)(unsafe.Pointer(fmt)) != 0) && (int32(*(*uint8)(unsafe.Pointer(fmt))) != '%') {
goto __7
}
goto __9
__9:
;
Xsqlite3_str_append(tls, pAccum, bufpt, (int32((int64(fmt) - int64(bufpt)) / 1)))
- if !(int32(*(*int8)(unsafe.Pointer(fmt))) == 0) {
+ if !(int32(*(*uint8)(unsafe.Pointer(fmt))) == 0) {
goto __10
}
goto __5
@@ -15421,10 +16226,10 @@ __10:
;
__6:
;
- if !((libc.AssignInt32(&c, int32(*(*int8)(unsafe.Pointer(libc.PreIncUintptr(&fmt, 1)))))) == 0) {
+ if !((libc.AssignInt32(&c, int32(*(*uint8)(unsafe.Pointer(libc.PreIncUintptr(&fmt, 1)))))) == 0) {
goto __11
}
- Xsqlite3_str_append(tls, pAccum, ts+693 /* "%" */, 1)
+ Xsqlite3_str_append(tls, pAccum, ts+745 /* "%" */, 1)
goto __5
__11:
;
@@ -15504,11 +16309,11 @@ __23:
goto __15
__24:
flag_long = EtByte(1)
- c = int32(*(*int8)(unsafe.Pointer(libc.PreIncUintptr(&fmt, 1))))
+ c = int32(*(*uint8)(unsafe.Pointer(libc.PreIncUintptr(&fmt, 1))))
if !(c == 'l') {
goto __36
}
- c = int32(*(*int8)(unsafe.Pointer(libc.PreIncUintptr(&fmt, 1))))
+ c = int32(*(*uint8)(unsafe.Pointer(libc.PreIncUintptr(&fmt, 1))))
flag_long = EtByte(2)
__36:
;
@@ -15526,7 +16331,7 @@ __32:
__33:
wx = (uint32(c - '0'))
__37:
- if !(((libc.AssignInt32(&c, int32(*(*int8)(unsafe.Pointer(libc.PreIncUintptr(&fmt, 1)))))) >= '0') && (c <= '9')) {
+ if !(((libc.AssignInt32(&c, int32(*(*uint8)(unsafe.Pointer(libc.PreIncUintptr(&fmt, 1)))))) >= '0') && (c <= '9')) {
goto __38
}
wx = (((wx * uint32(10)) + uint32(c)) - uint32('0'))
@@ -15567,17 +16372,17 @@ __42:
}
__43:
;
- if !(((libc.AssignInt32(&c, int32(*(*int8)(unsafe.Pointer(fmt + 1))))) != '.') && (c != 'l')) {
+ if !(((libc.AssignInt32(&c, int32(*(*uint8)(unsafe.Pointer(fmt + 1))))) != '.') && (c != 'l')) {
goto __44
}
- c = int32(*(*int8)(unsafe.Pointer(libc.PreIncUintptr(&fmt, 1))))
+ c = int32(*(*uint8)(unsafe.Pointer(libc.PreIncUintptr(&fmt, 1))))
done = EtByte(1)
__44:
;
goto __15
__35:
- c = int32(*(*int8)(unsafe.Pointer(libc.PreIncUintptr(&fmt, 1))))
+ c = int32(*(*uint8)(unsafe.Pointer(libc.PreIncUintptr(&fmt, 1))))
if !(c == '*') {
goto __45
}
@@ -15600,7 +16405,7 @@ __48:
}
__49:
;
- c = int32(*(*int8)(unsafe.Pointer(libc.PreIncUintptr(&fmt, 1))))
+ c = int32(*(*uint8)(unsafe.Pointer(libc.PreIncUintptr(&fmt, 1))))
goto __46
__45:
px = uint32(0)
@@ -15609,7 +16414,7 @@ __50:
goto __51
}
px = (((px * uint32(10)) + uint32(c)) - uint32('0'))
- c = int32(*(*int8)(unsafe.Pointer(libc.PreIncUintptr(&fmt, 1))))
+ c = int32(*(*uint8)(unsafe.Pointer(libc.PreIncUintptr(&fmt, 1))))
goto __50
__51:
;
@@ -15632,7 +16437,7 @@ __15:
;
goto __13
__13:
- if !(done != 0) && ((libc.AssignInt32(&c, int32(*(*int8)(unsafe.Pointer(libc.PreIncUintptr(&fmt, 1)))))) != 0) {
+ if !(done != 0) && ((libc.AssignInt32(&c, int32(*(*uint8)(unsafe.Pointer(libc.PreIncUintptr(&fmt, 1)))))) != 0) {
goto __12
}
goto __14
@@ -15712,7 +16517,7 @@ __56:
goto __73
case EtTOKEN:
goto __74
- case EtSRCLIST:
+ case EtSRCITEM:
goto __75
default:
goto __76
@@ -15766,11 +16571,11 @@ __80:
longvalue = Sqlite_uint64(^v)
longvalue++
- prefix = int8('-')
+ prefix = uint8('-')
goto __86
__85:
longvalue = Sqlite_uint64(v)
- prefix = int8(flag_prefix)
+ prefix = uint8(flag_prefix)
__86:
;
goto __78
@@ -15800,7 +16605,7 @@ __90:
;
__88:
;
- prefix = int8(0)
+ prefix = uint8(0)
__78:
;
if !(longvalue == uint64(0)) {
@@ -15819,7 +16624,7 @@ __94:
goto __95
}
nOut = SQLITE_PRINT_BUF_SIZE
- zOut = bp /* &buf[0] */
+ zOut = bp + 8 /* &buf[0] */
goto __96
__95:
n = (U64(precision) + uint64(10))
@@ -15850,15 +16655,15 @@ __96:
x = 0
__100:
;
- *(*int8)(unsafe.Pointer(libc.PreDecUintptr(&bufpt, 1))) = zOrd[((x * 2) + 1)]
- *(*int8)(unsafe.Pointer(libc.PreDecUintptr(&bufpt, 1))) = zOrd[(x * 2)]
+ *(*uint8)(unsafe.Pointer(libc.PreDecUintptr(&bufpt, 1))) = zOrd[((x * 2) + 1)]
+ *(*uint8)(unsafe.Pointer(libc.PreDecUintptr(&bufpt, 1))) = zOrd[(x * 2)]
__99:
;
cset = (uintptr(unsafe.Pointer(&aDigits)) + uintptr((*Et_info)(unsafe.Pointer(infop)).Fcharset))
base = (*Et_info)(unsafe.Pointer(infop)).Fbase
__101: // Convert to ascii
- *(*int8)(unsafe.Pointer(libc.PreDecUintptr(&bufpt, 1))) = *(*int8)(unsafe.Pointer(cset + uintptr((longvalue % Sqlite_uint64(base)))))
+ *(*uint8)(unsafe.Pointer(libc.PreDecUintptr(&bufpt, 1))) = *(*uint8)(unsafe.Pointer(cset + uintptr((longvalue % Sqlite_uint64(base)))))
longvalue = (longvalue / Sqlite_uint64(base))
goto __102
__102:
@@ -15874,7 +16679,7 @@ __104:
if !(precision > length) {
goto __105
}
- *(*int8)(unsafe.Pointer(libc.PreDecUintptr(&bufpt, 1))) = int8('0') // Zero pad
+ *(*uint8)(unsafe.Pointer(libc.PreDecUintptr(&bufpt, 1))) = uint8('0') // Zero pad
length++
goto __104
__105:
@@ -15890,12 +16695,12 @@ __107:
if !(nn > 0) {
goto __109
}
- *(*int8)(unsafe.Pointer(bufpt + uintptr(idx))) = *(*int8)(unsafe.Pointer(bufpt + uintptr((idx + nn))))
+ *(*uint8)(unsafe.Pointer(bufpt + uintptr(idx))) = *(*uint8)(unsafe.Pointer(bufpt + uintptr((idx + nn))))
ix--
if !(ix == 0) {
goto __110
}
- *(*int8)(unsafe.Pointer(bufpt + uintptr(libc.PreIncInt32(&idx, 1)))) = int8(cThousand)
+ *(*uint8)(unsafe.Pointer(bufpt + uintptr(libc.PreIncInt32(&idx, 1)))) = uint8(cThousand)
nn--
ix = 3
__110:
@@ -15912,7 +16717,7 @@ __106:
if !(prefix != 0) {
goto __111
}
- *(*int8)(unsafe.Pointer(libc.PreDecUintptr(&bufpt, 1))) = prefix
+ *(*uint8)(unsafe.Pointer(libc.PreDecUintptr(&bufpt, 1))) = prefix
__111:
; // Add sign
if !((flag_alternateform != 0) && ((*Et_info)(unsafe.Pointer(infop)).Fprefix != 0)) {
@@ -15920,10 +16725,10 @@ __111:
}
pre = (uintptr(unsafe.Pointer(&aPrefix)) + uintptr((*Et_info)(unsafe.Pointer(infop)).Fprefix))
__113:
- if !((int32(libc.AssignInt8(&x1, *(*int8)(unsafe.Pointer(pre))))) != 0) {
+ if !((int32(libc.AssignUint8(&x1, *(*uint8)(unsafe.Pointer(pre))))) != 0) {
goto __115
}
- *(*int8)(unsafe.Pointer(libc.PreDecUintptr(&bufpt, 1))) = x1
+ *(*uint8)(unsafe.Pointer(libc.PreDecUintptr(&bufpt, 1))) = x1
goto __114
__114:
pre++
@@ -15941,10 +16746,10 @@ __65:
if !(bArgList != 0) {
goto __116
}
- *(*float64)(unsafe.Pointer(bp + 88 /* realvalue */)) = getDoubleArg(tls, pArgList)
+ *(*float64)(unsafe.Pointer(bp + 96 /* realvalue */)) = getDoubleArg(tls, pArgList)
goto __117
__116:
- *(*float64)(unsafe.Pointer(bp + 88 /* realvalue */)) = float64(libc.VaFloat64(&ap))
+ *(*float64)(unsafe.Pointer(bp + 96 /* realvalue */)) = float64(libc.VaFloat64(&ap))
__117:
;
if !(precision < 0) {
@@ -15959,14 +16764,14 @@ __118:
precision = SQLITE_FP_PRECISION_LIMIT
__119:
;
- if !(*(*float64)(unsafe.Pointer(bp + 88 /* realvalue */)) < 0.0) {
+ if !(*(*float64)(unsafe.Pointer(bp + 96 /* realvalue */)) < 0.0) {
goto __120
}
- *(*float64)(unsafe.Pointer(bp + 88 /* realvalue */)) = -*(*float64)(unsafe.Pointer(bp + 88 /* realvalue */))
- prefix = int8('-')
+ *(*float64)(unsafe.Pointer(bp + 96 /* realvalue */)) = -*(*float64)(unsafe.Pointer(bp + 96 /* realvalue */))
+ prefix = uint8('-')
goto __121
__120:
- prefix = int8(flag_prefix)
+ prefix = uint8(flag_prefix)
__121:
;
if !((int32(xtype) == EtGENERIC) && (precision > 0)) {
@@ -15990,34 +16795,34 @@ __124:
if !(int32(xtype) == EtFLOAT) {
goto __125
}
- *(*float64)(unsafe.Pointer(bp + 80 /* rx */)) = *(*float64)(unsafe.Pointer(bp + 88 /* realvalue */))
- libc.Xmemcpy(tls, bp+72 /* &u */, bp+80 /* &rx */, uint64(unsafe.Sizeof(Sqlite3_uint64(0))))
- ex = (-1023 + (int32((*(*Sqlite3_uint64)(unsafe.Pointer(bp + 72 /* u */)) >> 52) & uint64(0x7ff))))
+ *(*float64)(unsafe.Pointer(bp + 88 /* rx */)) = *(*float64)(unsafe.Pointer(bp + 96 /* realvalue */))
+ libc.Xmemcpy(tls, bp+80 /* &u */, bp+88 /* &rx */, uint64(unsafe.Sizeof(Sqlite3_uint64(0))))
+ ex = (-1023 + (int32((*(*Sqlite3_uint64)(unsafe.Pointer(bp + 80 /* u */)) >> 52) & uint64(0x7ff))))
if !((precision + (ex / 3)) < 15) {
goto __126
}
- rounder = rounder + (*(*float64)(unsafe.Pointer(bp + 88 /* realvalue */)) * 3e-16)
+ rounder = rounder + (*(*float64)(unsafe.Pointer(bp + 96 /* realvalue */)) * 3e-16)
__126:
;
- *(*float64)(unsafe.Pointer(bp + 88 /* realvalue */)) += rounder
+ *(*float64)(unsafe.Pointer(bp + 96 /* realvalue */)) += rounder
__125:
;
// Normalize realvalue to within 10.0 > realvalue >= 1.0
exp = 0
- if !(Xsqlite3IsNaN(tls, *(*float64)(unsafe.Pointer(bp + 88 /* realvalue */))) != 0) {
+ if !(Xsqlite3IsNaN(tls, *(*float64)(unsafe.Pointer(bp + 96 /* realvalue */))) != 0) {
goto __127
}
- bufpt = ts + 695 /* "NaN" */
+ bufpt = ts + 747 /* "NaN" */
length = 3
goto __58
__127:
;
- if !(*(*float64)(unsafe.Pointer(bp + 88 /* realvalue */)) > 0.0) {
+ if !(*(*float64)(unsafe.Pointer(bp + 96 /* realvalue */)) > 0.0) {
goto __128
}
scale = 1.0
__129:
- if !((*(*float64)(unsafe.Pointer(bp + 88 /* realvalue */)) >= (1e100 * scale)) && (exp <= 350)) {
+ if !((*(*float64)(unsafe.Pointer(bp + 96 /* realvalue */)) >= (1e100 * scale)) && (exp <= 350)) {
goto __130
}
scale = scale * (1e100)
@@ -16026,7 +16831,7 @@ __129:
__130:
;
__131:
- if !((*(*float64)(unsafe.Pointer(bp + 88 /* realvalue */)) >= (1e10 * scale)) && (exp <= 350)) {
+ if !((*(*float64)(unsafe.Pointer(bp + 96 /* realvalue */)) >= (1e10 * scale)) && (exp <= 350)) {
goto __132
}
scale = scale * (1e10)
@@ -16035,7 +16840,7 @@ __131:
__132:
;
__133:
- if !((*(*float64)(unsafe.Pointer(bp + 88 /* realvalue */)) >= (10.0 * scale)) && (exp <= 350)) {
+ if !((*(*float64)(unsafe.Pointer(bp + 96 /* realvalue */)) >= (10.0 * scale)) && (exp <= 350)) {
goto __134
}
scale = scale * (10.0)
@@ -16043,21 +16848,21 @@ __133:
goto __133
__134:
;
- *(*float64)(unsafe.Pointer(bp + 88 /* realvalue */)) /= scale
+ *(*float64)(unsafe.Pointer(bp + 96 /* realvalue */)) /= scale
__135:
- if !(*(*float64)(unsafe.Pointer(bp + 88 /* realvalue */)) < 1e-8) {
+ if !(*(*float64)(unsafe.Pointer(bp + 96 /* realvalue */)) < 1e-8) {
goto __136
}
- *(*float64)(unsafe.Pointer(bp + 88 /* realvalue */)) *= 1e8
+ *(*float64)(unsafe.Pointer(bp + 96 /* realvalue */)) *= 1e8
exp = exp - (8)
goto __135
__136:
;
__137:
- if !(*(*float64)(unsafe.Pointer(bp + 88 /* realvalue */)) < 1.0) {
+ if !(*(*float64)(unsafe.Pointer(bp + 96 /* realvalue */)) < 1.0) {
goto __138
}
- *(*float64)(unsafe.Pointer(bp + 88 /* realvalue */)) *= 10.0
+ *(*float64)(unsafe.Pointer(bp + 96 /* realvalue */)) *= 10.0
exp--
goto __137
__138:
@@ -16065,26 +16870,26 @@ __138:
if !(exp > 350) {
goto __139
}
- bufpt = bp /* &buf[0] */
- *(*int8)(unsafe.Pointer(bp /* &buf[0] */)) = prefix
- libc.Xmemcpy(tls, (bp /* &buf[0] */ + uintptr((libc.Bool32(int32(prefix) != 0)))), ts+699 /* "Inf" */, uint64(4))
+ bufpt = bp + 8 /* &buf[0] */
+ *(*uint8)(unsafe.Pointer(bp + 8 /* &buf[0] */)) = prefix
+ libc.Xmemcpy(tls, (bp + 8 /* &buf[0] */ + uintptr((libc.Bool32(int32(prefix) != 0)))), ts+751 /* "Inf" */, uint64(4))
length = (3 + (libc.Bool32(int32(prefix) != 0)))
goto __58
__139:
;
__128:
;
- bufpt = bp /* &buf[0] */
+ bufpt = bp + 8 /* &buf[0] */
// If the field type is etGENERIC, then convert to either etEXP
// or etFLOAT, as appropriate.
if !(int32(xtype) != EtFLOAT) {
goto __140
}
- *(*float64)(unsafe.Pointer(bp + 88 /* realvalue */)) += rounder
- if !(*(*float64)(unsafe.Pointer(bp + 88 /* realvalue */)) >= 10.0) {
+ *(*float64)(unsafe.Pointer(bp + 96 /* realvalue */)) += rounder
+ if !(*(*float64)(unsafe.Pointer(bp + 96 /* realvalue */)) >= 10.0) {
goto __141
}
- *(*float64)(unsafe.Pointer(bp + 88 /* realvalue */)) *= 0.1
+ *(*float64)(unsafe.Pointer(bp + 96 /* realvalue */)) *= 0.1
exp++
__141:
;
@@ -16139,7 +16944,7 @@ __148:
;
zOut = bufpt
- *(*int32)(unsafe.Pointer(bp + 96 /* nsd */)) = (16 + (int32(flag_altform2) * 10))
+ *(*int32)(unsafe.Pointer(bp + 104 /* nsd */)) = (16 + (int32(flag_altform2) * 10))
flag_dp = (EtByte(((func() int32 {
if precision > 0 {
return 1
@@ -16150,14 +16955,14 @@ __148:
if !(prefix != 0) {
goto __150
}
- *(*int8)(unsafe.Pointer(libc.PostIncUintptr(&bufpt, 1))) = prefix
+ *(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&bufpt, 1))) = prefix
__150:
;
// Digits prior to the decimal point
if !(e2 < 0) {
goto __151
}
- *(*int8)(unsafe.Pointer(libc.PostIncUintptr(&bufpt, 1))) = int8('0')
+ *(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&bufpt, 1))) = uint8('0')
goto __152
__151:
;
@@ -16165,7 +16970,7 @@ __153:
if !(e2 >= 0) {
goto __155
}
- *(*int8)(unsafe.Pointer(libc.PostIncUintptr(&bufpt, 1))) = et_getdigit(tls, bp+88 /* &realvalue */, bp+96 /* &nsd */)
+ *(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&bufpt, 1))) = et_getdigit(tls, bp+96 /* &realvalue */, bp+104 /* &nsd */)
goto __154
__154:
e2--
@@ -16179,7 +16984,7 @@ __152:
if !(flag_dp != 0) {
goto __156
}
- *(*int8)(unsafe.Pointer(libc.PostIncUintptr(&bufpt, 1))) = int8('.')
+ *(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&bufpt, 1))) = uint8('.')
__156:
;
// "0" digits after the decimal point but before the first
@@ -16190,7 +16995,7 @@ __157:
goto __159
}
- *(*int8)(unsafe.Pointer(libc.PostIncUintptr(&bufpt, 1))) = int8('0')
+ *(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&bufpt, 1))) = uint8('0')
goto __158
__158:
precision--
@@ -16204,7 +17009,7 @@ __160:
if !((libc.PostDecInt32(&precision, 1)) > 0) {
goto __161
}
- *(*int8)(unsafe.Pointer(libc.PostIncUintptr(&bufpt, 1))) = et_getdigit(tls, bp+88 /* &realvalue */, bp+96 /* &nsd */)
+ *(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&bufpt, 1))) = et_getdigit(tls, bp+96 /* &realvalue */, bp+104 /* &nsd */)
goto __160
__161:
;
@@ -16213,24 +17018,24 @@ __161:
goto __162
}
__163:
- if !(int32(*(*int8)(unsafe.Pointer(bufpt + libc.UintptrFromInt32(-1)))) == '0') {
+ if !(int32(*(*uint8)(unsafe.Pointer(bufpt + libc.UintptrFromInt32(-1)))) == '0') {
goto __164
}
- *(*int8)(unsafe.Pointer(libc.PreDecUintptr(&bufpt, 1))) = int8(0)
+ *(*uint8)(unsafe.Pointer(libc.PreDecUintptr(&bufpt, 1))) = uint8(0)
goto __163
__164:
;
- if !(int32(*(*int8)(unsafe.Pointer(bufpt + libc.UintptrFromInt32(-1)))) == '.') {
+ if !(int32(*(*uint8)(unsafe.Pointer(bufpt + libc.UintptrFromInt32(-1)))) == '.') {
goto __165
}
if !(flag_altform2 != 0) {
goto __166
}
- *(*int8)(unsafe.Pointer(libc.PostIncUintptr(&bufpt, 1))) = int8('0')
+ *(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&bufpt, 1))) = uint8('0')
goto __167
__166:
- *(*int8)(unsafe.Pointer(libc.PreDecUintptr(&bufpt, 1))) = int8(0)
+ *(*uint8)(unsafe.Pointer(libc.PreDecUintptr(&bufpt, 1))) = uint8(0)
__167:
;
__165:
@@ -16241,29 +17046,29 @@ __162:
if !(int32(xtype) == EtEXP) {
goto __168
}
- *(*int8)(unsafe.Pointer(libc.PostIncUintptr(&bufpt, 1))) = aDigits[(*Et_info)(unsafe.Pointer(infop)).Fcharset]
+ *(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&bufpt, 1))) = aDigits[(*Et_info)(unsafe.Pointer(infop)).Fcharset]
if !(exp < 0) {
goto __169
}
- *(*int8)(unsafe.Pointer(libc.PostIncUintptr(&bufpt, 1))) = int8('-')
+ *(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&bufpt, 1))) = uint8('-')
exp = -exp
goto __170
__169:
- *(*int8)(unsafe.Pointer(libc.PostIncUintptr(&bufpt, 1))) = int8('+')
+ *(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&bufpt, 1))) = uint8('+')
__170:
;
if !(exp >= 100) {
goto __171
}
- *(*int8)(unsafe.Pointer(libc.PostIncUintptr(&bufpt, 1))) = (int8((exp / 100) + '0')) // 100's digit
+ *(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&bufpt, 1))) = (uint8((exp / 100) + '0')) // 100's digit
exp = exp % (100)
__171:
;
- *(*int8)(unsafe.Pointer(libc.PostIncUintptr(&bufpt, 1))) = (int8((exp / 10) + '0')) // 10's digit
- *(*int8)(unsafe.Pointer(libc.PostIncUintptr(&bufpt, 1))) = (int8((exp % 10) + '0')) // 1's digit
+ *(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&bufpt, 1))) = (uint8((exp / 10) + '0')) // 10's digit
+ *(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&bufpt, 1))) = (uint8((exp % 10) + '0')) // 1's digit
__168:
;
- *(*int8)(unsafe.Pointer(bufpt)) = int8(0)
+ *(*uint8)(unsafe.Pointer(bufpt)) = uint8(0)
// The converted number is in buf[] and zero terminated. Output it.
// Note that the number is in the usual order, not reversed as with
@@ -16282,7 +17087,7 @@ __173:
if !(i >= nPad) {
goto __175
}
- *(*int8)(unsafe.Pointer(bufpt + uintptr(i))) = *(*int8)(unsafe.Pointer(bufpt + uintptr((i - nPad))))
+ *(*uint8)(unsafe.Pointer(bufpt + uintptr(i))) = *(*uint8)(unsafe.Pointer(bufpt + uintptr((i - nPad))))
goto __174
__174:
i--
@@ -16295,7 +17100,7 @@ __176:
if !(libc.PostDecInt32(&nPad, 1) != 0) {
goto __177
}
- *(*int8)(unsafe.Pointer(bufpt + uintptr(libc.PostIncInt32(&i, 1)))) = int8('0')
+ *(*uint8)(unsafe.Pointer(bufpt + uintptr(libc.PostIncInt32(&i, 1)))) = uint8('0')
goto __176
__177:
;
@@ -16313,8 +17118,8 @@ __178:
length = libc.AssignInt32(&width, 0)
goto __58
__67:
- *(*int8)(unsafe.Pointer(bp /* &buf[0] */)) = int8('%')
- bufpt = bp /* &buf[0] */
+ *(*uint8)(unsafe.Pointer(bp + 8 /* &buf[0] */)) = uint8('%')
+ bufpt = bp + 8 /* &buf[0] */
length = 1
goto __58
__68:
@@ -16326,15 +17131,15 @@ __68:
if !(bufpt != 0) {
goto __181
}
- *(*int8)(unsafe.Pointer(bp /* &buf[0] */)) = int8(libc.AssignInt32(&c, int32(*(*int8)(unsafe.Pointer(libc.PostIncUintptr(&bufpt, 1))))))
+ *(*uint8)(unsafe.Pointer(bp + 8 /* &buf[0] */)) = uint8(libc.AssignInt32(&c, int32(*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&bufpt, 1))))))
if !((c & 0xc0) == 0xc0) {
goto __183
}
__184:
- if !((length < 4) && ((int32(*(*int8)(unsafe.Pointer(bufpt))) & 0xc0) == 0x80)) {
+ if !((length < 4) && ((int32(*(*uint8)(unsafe.Pointer(bufpt))) & 0xc0) == 0x80)) {
goto __185
}
- *(*int8)(unsafe.Pointer(bp /* &buf[0] */ + uintptr(libc.PostIncInt32(&length, 1)))) = *(*int8)(unsafe.Pointer(libc.PostIncUintptr(&bufpt, 1)))
+ *(*uint8)(unsafe.Pointer(bp + 8 /* &buf[0] */ + uintptr(libc.PostIncInt32(&length, 1)))) = *(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&bufpt, 1)))
goto __184
__185:
;
@@ -16342,7 +17147,7 @@ __183:
;
goto __182
__181:
- *(*int8)(unsafe.Pointer(bp /* &buf[0] */)) = int8(0)
+ *(*uint8)(unsafe.Pointer(bp + 8 /* &buf[0] */)) = uint8(0)
__182:
;
goto __180
@@ -16351,31 +17156,31 @@ __179:
if !(ch < uint32(0x00080)) {
goto __186
}
- *(*int8)(unsafe.Pointer(bp /* &buf[0] */)) = (int8(ch & uint32(0xff)))
+ *(*uint8)(unsafe.Pointer(bp + 8 /* &buf[0] */)) = (uint8(ch & uint32(0xff)))
length = 1
goto __187
__186:
if !(ch < uint32(0x00800)) {
goto __188
}
- *(*int8)(unsafe.Pointer(bp /* &buf[0] */)) = (int8(0xc0 + int32((U8((ch >> 6) & uint32(0x1f))))))
- *(*int8)(unsafe.Pointer(bp /* &buf[0] */ + 1)) = (int8(0x80 + int32((U8(ch & uint32(0x3f))))))
+ *(*uint8)(unsafe.Pointer(bp + 8 /* &buf[0] */)) = (uint8(0xc0 + int32((U8((ch >> 6) & uint32(0x1f))))))
+ *(*uint8)(unsafe.Pointer(bp + 8 /* &buf[0] */ + 1)) = (uint8(0x80 + int32((U8(ch & uint32(0x3f))))))
length = 2
goto __189
__188:
if !(ch < uint32(0x10000)) {
goto __190
}
- *(*int8)(unsafe.Pointer(bp /* &buf[0] */)) = (int8(0xe0 + int32((U8((ch >> 12) & uint32(0x0f))))))
- *(*int8)(unsafe.Pointer(bp /* &buf[0] */ + 1)) = (int8(0x80 + int32((U8((ch >> 6) & uint32(0x3f))))))
- *(*int8)(unsafe.Pointer(bp /* &buf[0] */ + 2)) = (int8(0x80 + int32((U8(ch & uint32(0x3f))))))
+ *(*uint8)(unsafe.Pointer(bp + 8 /* &buf[0] */)) = (uint8(0xe0 + int32((U8((ch >> 12) & uint32(0x0f))))))
+ *(*uint8)(unsafe.Pointer(bp + 8 /* &buf[0] */ + 1)) = (uint8(0x80 + int32((U8((ch >> 6) & uint32(0x3f))))))
+ *(*uint8)(unsafe.Pointer(bp + 8 /* &buf[0] */ + 2)) = (uint8(0x80 + int32((U8(ch & uint32(0x3f))))))
length = 3
goto __191
__190:
- *(*int8)(unsafe.Pointer(bp /* &buf[0] */)) = (int8(0xf0 + int32((U8((ch >> 18) & uint32(0x07))))))
- *(*int8)(unsafe.Pointer(bp /* &buf[0] */ + 1)) = (int8(0x80 + int32((U8((ch >> 12) & uint32(0x3f))))))
- *(*int8)(unsafe.Pointer(bp /* &buf[0] */ + 2)) = (int8(0x80 + int32((U8((ch >> 6) & uint32(0x3f))))))
- *(*int8)(unsafe.Pointer(bp /* &buf[0] */ + 3)) = (int8(0x80 + int32((U8(ch & uint32(0x3f))))))
+ *(*uint8)(unsafe.Pointer(bp + 8 /* &buf[0] */)) = (uint8(0xf0 + int32((U8((ch >> 18) & uint32(0x07))))))
+ *(*uint8)(unsafe.Pointer(bp + 8 /* &buf[0] */ + 1)) = (uint8(0x80 + int32((U8((ch >> 12) & uint32(0x3f))))))
+ *(*uint8)(unsafe.Pointer(bp + 8 /* &buf[0] */ + 2)) = (uint8(0x80 + int32((U8((ch >> 6) & uint32(0x3f))))))
+ *(*uint8)(unsafe.Pointer(bp + 8 /* &buf[0] */ + 3)) = (uint8(0x80 + int32((U8(ch & uint32(0x3f))))))
length = 4
__191:
;
@@ -16392,7 +17197,7 @@ __180:
if !((width > 1) && !(flag_leftjustify != 0)) {
goto __193
}
- Xsqlite3_str_appendchar(tls, pAccum, (width - 1), int8(' '))
+ Xsqlite3_str_appendchar(tls, pAccum, (width - 1), uint8(' '))
width = 0
__193:
;
@@ -16400,13 +17205,13 @@ __194:
if !(libc.PostDecInt32(&precision, 1) > 1) {
goto __195
}
- Xsqlite3_str_append(tls, pAccum, bp /* &buf[0] */, length)
+ Xsqlite3_str_append(tls, pAccum, bp+8 /* &buf[0] */, length)
goto __194
__195:
;
__192:
;
- bufpt = bp /* &buf[0] */
+ bufpt = bp + 8 /* &buf[0] */
flag_altform2 = EtByte(1)
goto adjust_width_for_utf8
__69:
@@ -16424,7 +17229,7 @@ __197:
if !(bufpt == uintptr(0)) {
goto __198
}
- bufpt = ts + 703 /* "" */
+ bufpt = ts + 755 /* "" */
goto __199
__198:
if !(int32(xtype) == EtDYNSTRING) {
@@ -16489,7 +17294,7 @@ __207:
__204:
length = 0
__211:
- if !((length < precision) && (*(*int8)(unsafe.Pointer(bufpt + uintptr(length))) != 0)) {
+ if !((length < precision) && (*(*uint8)(unsafe.Pointer(bufpt + uintptr(length))) != 0)) {
goto __213
}
goto __212
@@ -16516,7 +17321,7 @@ __215:
if !(ii >= 0) {
goto __216
}
- if !((int32(*(*int8)(unsafe.Pointer(bufpt + uintptr(libc.PostDecInt32(&ii, 1))))) & 0xc0) == 0x80) {
+ if !((int32(*(*uint8)(unsafe.Pointer(bufpt + uintptr(libc.PostDecInt32(&ii, 1))))) & 0xc0) == 0x80) {
goto __217
}
width++
@@ -16531,11 +17336,11 @@ __214:
__71: // %q: Escape ' characters
__72: // %Q: Escape ' and enclose in '...'
__73:
- q = func() int8 {
+ q = func() uint8 {
if int32(xtype) == EtSQLESCAPE3 {
- return int8('"')
+ return uint8('"')
}
- return int8('\'')
+ return uint8('\'')
}()
if !(bArgList != 0) {
@@ -16553,9 +17358,9 @@ __219:
}
escarg = func() uintptr {
if int32(xtype) == EtSQLESCAPE2 {
- return ts + 704 /* "NULL" */
+ return ts + 756 /* "NULL" */
}
- return ts + 709 /* "(NULL)" */
+ return ts + 761 /* "(NULL)" */
}()
__220:
;
@@ -16566,7 +17371,7 @@ __220:
k = precision
i1 = libc.AssignInt32(&n1, 0)
__221:
- if !((k != 0) && ((int32(libc.AssignInt8(&ch1, *(*int8)(unsafe.Pointer(escarg + uintptr(i1)))))) != 0)) {
+ if !((k != 0) && ((int32(libc.AssignUint8(&ch1, *(*uint8)(unsafe.Pointer(escarg + uintptr(i1)))))) != 0)) {
goto __223
}
if !(int32(ch1) == int32(q)) {
@@ -16579,7 +17384,7 @@ __224:
goto __225
}
__226:
- if !((int32(*(*int8)(unsafe.Pointer(escarg + uintptr((i1 + 1))))) & 0xc0) == 0x80) {
+ if !((int32(*(*uint8)(unsafe.Pointer(escarg + uintptr((i1 + 1))))) & 0xc0) == 0x80) {
goto __227
}
i1++
@@ -16610,14 +17415,14 @@ __230:
;
goto __229
__228:
- bufpt = bp /* &buf[0] */
+ bufpt = bp + 8 /* &buf[0] */
__229:
;
j = 0
if !(needQuote != 0) {
goto __231
}
- *(*int8)(unsafe.Pointer(bufpt + uintptr(libc.PostIncInt32(&j, 1)))) = q
+ *(*uint8)(unsafe.Pointer(bufpt + uintptr(libc.PostIncInt32(&j, 1)))) = q
__231:
;
k = i1
@@ -16626,11 +17431,11 @@ __232:
if !(i1 < k) {
goto __234
}
- *(*int8)(unsafe.Pointer(bufpt + uintptr(libc.PostIncInt32(&j, 1)))) = libc.AssignInt8(&ch1, *(*int8)(unsafe.Pointer(escarg + uintptr(i1))))
+ *(*uint8)(unsafe.Pointer(bufpt + uintptr(libc.PostIncInt32(&j, 1)))) = libc.AssignUint8(&ch1, *(*uint8)(unsafe.Pointer(escarg + uintptr(i1))))
if !(int32(ch1) == int32(q)) {
goto __235
}
- *(*int8)(unsafe.Pointer(bufpt + uintptr(libc.PostIncInt32(&j, 1)))) = ch1
+ *(*uint8)(unsafe.Pointer(bufpt + uintptr(libc.PostIncInt32(&j, 1)))) = ch1
__235:
;
goto __233
@@ -16643,10 +17448,10 @@ __234:
if !(needQuote != 0) {
goto __236
}
- *(*int8)(unsafe.Pointer(bufpt + uintptr(libc.PostIncInt32(&j, 1)))) = q
+ *(*uint8)(unsafe.Pointer(bufpt + uintptr(libc.PostIncInt32(&j, 1)))) = q
__236:
;
- *(*int8)(unsafe.Pointer(bufpt + uintptr(j))) = int8(0)
+ *(*uint8)(unsafe.Pointer(bufpt + uintptr(j))) = uint8(0)
length = j
goto adjust_width_for_utf8
@@ -16675,18 +17480,45 @@ __75:
return
__239:
;
- pSrc = libc.VaUintptr(&ap)
- k1 = int32(libc.VaInt32(&ap))
- pItem = ((pSrc + 8 /* &.a */) + uintptr(k1)*112)
+ pItem = libc.VaUintptr(&ap)
- if !((*SrcItem)(unsafe.Pointer(pItem)).FzDatabase != 0) {
+ if !(((*SrcItem)(unsafe.Pointer(pItem)).FzAlias != 0) && !(flag_altform2 != 0)) {
goto __240
}
- Xsqlite3_str_appendall(tls, pAccum, (*SrcItem)(unsafe.Pointer(pItem)).FzDatabase)
- Xsqlite3_str_append(tls, pAccum, ts+716 /* "." */, 1)
+ Xsqlite3_str_appendall(tls, pAccum, (*SrcItem)(unsafe.Pointer(pItem)).FzAlias)
+ goto __241
__240:
+ if !((*SrcItem)(unsafe.Pointer(pItem)).FzName != 0) {
+ goto __242
+ }
+ if !((*SrcItem)(unsafe.Pointer(pItem)).FzDatabase != 0) {
+ goto __244
+ }
+ Xsqlite3_str_appendall(tls, pAccum, (*SrcItem)(unsafe.Pointer(pItem)).FzDatabase)
+ Xsqlite3_str_append(tls, pAccum, ts+768 /* "." */, 1)
+__244:
;
Xsqlite3_str_appendall(tls, pAccum, (*SrcItem)(unsafe.Pointer(pItem)).FzName)
+ goto __243
+__242:
+ if !((*SrcItem)(unsafe.Pointer(pItem)).FzAlias != 0) {
+ goto __245
+ }
+ Xsqlite3_str_appendall(tls, pAccum, (*SrcItem)(unsafe.Pointer(pItem)).FzAlias)
+ goto __246
+__245:
+ if !((*SrcItem)(unsafe.Pointer(pItem)).FpSelect != 0) {
+ goto __247
+ }
+ Xsqlite3_str_appendf(tls, pAccum, ts+770 /* "SUBQUERY %u" */, libc.VaList(bp, (*Select)(unsafe.Pointer((*SrcItem)(unsafe.Pointer(pItem)).FpSelect)).FselId))
+__247:
+ ;
+__246:
+ ;
+__243:
+ ;
+__241:
+ ;
length = libc.AssignInt32(&width, 0)
goto __58
@@ -16704,33 +17536,33 @@ __58:
// then the values have been translated prior to reaching this point.
width = width - (length)
if !(width > 0) {
- goto __241
+ goto __248
}
if !(!(flag_leftjustify != 0)) {
- goto __243
+ goto __250
}
- Xsqlite3_str_appendchar(tls, pAccum, width, int8(' '))
-__243:
+ Xsqlite3_str_appendchar(tls, pAccum, width, uint8(' '))
+__250:
;
Xsqlite3_str_append(tls, pAccum, bufpt, length)
if !(flag_leftjustify != 0) {
- goto __244
+ goto __251
}
- Xsqlite3_str_appendchar(tls, pAccum, width, int8(' '))
-__244:
+ Xsqlite3_str_appendchar(tls, pAccum, width, uint8(' '))
+__251:
;
- goto __242
-__241:
+ goto __249
+__248:
Xsqlite3_str_append(tls, pAccum, bufpt, length)
-__242:
+__249:
;
if !(zExtra != 0) {
- goto __245
+ goto __252
}
Xsqlite3DbFree(tls, (*Sqlite3_str)(unsafe.Pointer(pAccum)).Fdb, zExtra)
zExtra = uintptr(0)
-__245:
+__252:
;
goto __4
__4:
@@ -16741,7 +17573,7 @@ __5:
// End for loop over the format string
}
-var zOrd = *(*[9]int8)(unsafe.Pointer(ts + 718 /* "thstndrd" */)) /* sqlite3.c:28904:29 */
+var zOrd = *(*[9]uint8)(unsafe.Pointer(ts + 782 /* "thstndrd" */)) /* sqlite3.c:29091:29 */
// End of function
@@ -16750,7 +17582,7 @@ var zOrd = *(*[9]int8)(unsafe.Pointer(ts + 718 /* "thstndrd" */)) /* sqlite3.c:2
//
// Return the number of bytes of text that StrAccum is able to accept
// after the attempted enlargement. The value returned might be zero.
-func sqlite3StrAccumEnlarge(tls *libc.TLS, p uintptr, N int32) int32 { /* sqlite3.c:29344:12: */
+func sqlite3StrAccumEnlarge(tls *libc.TLS, p uintptr, N int32) int32 { /* sqlite3.c:29534:12: */
var zNew uintptr
// Only called if really needed
if (*StrAccum)(unsafe.Pointer(p)).FaccError != 0 {
@@ -16804,13 +17636,13 @@ func sqlite3StrAccumEnlarge(tls *libc.TLS, p uintptr, N int32) int32 { /* sqlite
}
// Append N copies of character c to the given string buffer.
-func Xsqlite3_str_appendchar(tls *libc.TLS, p uintptr, N int32, c int8) { /* sqlite3.c:29394:17: */
+func Xsqlite3_str_appendchar(tls *libc.TLS, p uintptr, N int32, c uint8) { /* sqlite3.c:29584:17: */
if ((I64((*Sqlite3_str)(unsafe.Pointer(p)).FnChar) + I64(N)) >= I64((*Sqlite3_str)(unsafe.Pointer(p)).FnAlloc)) && ((libc.AssignInt32(&N, sqlite3StrAccumEnlarge(tls, p, N))) <= 0) {
return
}
for (libc.PostDecInt32(&N, 1)) > 0 {
- *(*int8)(unsafe.Pointer((*Sqlite3_str)(unsafe.Pointer(p)).FzText + uintptr(libc.PostIncUint32(&(*Sqlite3_str)(unsafe.Pointer(p)).FnChar, 1)))) = c
+ *(*uint8)(unsafe.Pointer((*Sqlite3_str)(unsafe.Pointer(p)).FzText + uintptr(libc.PostIncUint32(&(*Sqlite3_str)(unsafe.Pointer(p)).FnChar, 1)))) = c
}
}
@@ -16820,7 +17652,7 @@ func Xsqlite3_str_appendchar(tls *libc.TLS, p uintptr, N int32, c int8) { /* sql
// This is a helper routine to sqlite3_str_append() that does special-case
// work (enlarging the buffer) using tail recursion, so that the
// sqlite3_str_append() routine can use fast calling semantics.
-func enlargeAndAppend(tls *libc.TLS, p uintptr, z uintptr, N int32) { /* sqlite3.c:29410:29: */
+func enlargeAndAppend(tls *libc.TLS, p uintptr, z uintptr, N int32) { /* sqlite3.c:29600:29: */
N = sqlite3StrAccumEnlarge(tls, p, N)
if N > 0 {
libc.Xmemcpy(tls, ((*StrAccum)(unsafe.Pointer(p)).FzText + uintptr((*StrAccum)(unsafe.Pointer(p)).FnChar)), z, uint64(N))
@@ -16830,7 +17662,7 @@ func enlargeAndAppend(tls *libc.TLS, p uintptr, z uintptr, N int32) { /* sqlite3
// Append N bytes of text from z to the StrAccum object. Increase the
// size of the memory allocation for StrAccum if necessary.
-func Xsqlite3_str_append(tls *libc.TLS, p uintptr, z uintptr, N int32) { /* sqlite3.c:29422:17: */
+func Xsqlite3_str_append(tls *libc.TLS, p uintptr, z uintptr, N int32) { /* sqlite3.c:29612:17: */
if ((*Sqlite3_str)(unsafe.Pointer(p)).FnChar + U32(N)) >= (*Sqlite3_str)(unsafe.Pointer(p)).FnAlloc {
enlargeAndAppend(tls, p, z, N)
@@ -16842,14 +17674,14 @@ func Xsqlite3_str_append(tls *libc.TLS, p uintptr, z uintptr, N int32) { /* sqli
}
// Append the complete text of zero-terminated string z[] to the p string.
-func Xsqlite3_str_appendall(tls *libc.TLS, p uintptr, z uintptr) { /* sqlite3.c:29439:17: */
+func Xsqlite3_str_appendall(tls *libc.TLS, p uintptr, z uintptr) { /* sqlite3.c:29629:17: */
Xsqlite3_str_append(tls, p, z, Xsqlite3Strlen30(tls, z))
}
// Finish off a string by making sure it is zero-terminated.
// Return a pointer to the resulting string. Return a NULL
// pointer if any kind of error was encountered.
-func strAccumFinishRealloc(tls *libc.TLS, p uintptr) uintptr { /* sqlite3.c:29449:29: */
+func strAccumFinishRealloc(tls *libc.TLS, p uintptr) uintptr { /* sqlite3.c:29639:29: */
var zText uintptr
zText = Xsqlite3DbMallocRaw(tls, (*StrAccum)(unsafe.Pointer(p)).Fdb, (uint64((*StrAccum)(unsafe.Pointer(p)).FnChar + U32(1))))
@@ -16863,9 +17695,9 @@ func strAccumFinishRealloc(tls *libc.TLS, p uintptr) uintptr { /* sqlite3.c:2944
return zText
}
-func Xsqlite3StrAccumFinish(tls *libc.TLS, p uintptr) uintptr { /* sqlite3.c:29462:21: */
+func Xsqlite3StrAccumFinish(tls *libc.TLS, p uintptr) uintptr { /* sqlite3.c:29652:21: */
if (*StrAccum)(unsafe.Pointer(p)).FzText != 0 {
- *(*int8)(unsafe.Pointer((*StrAccum)(unsafe.Pointer(p)).FzText + uintptr((*StrAccum)(unsafe.Pointer(p)).FnChar))) = int8(0)
+ *(*uint8)(unsafe.Pointer((*StrAccum)(unsafe.Pointer(p)).FzText + uintptr((*StrAccum)(unsafe.Pointer(p)).FnChar))) = uint8(0)
if ((*StrAccum)(unsafe.Pointer(p)).FmxAlloc > U32(0)) && !((int32((*StrAccum)(unsafe.Pointer((p))).FprintfFlags) & SQLITE_PRINTF_MALLOCED) != 0) {
return strAccumFinishRealloc(tls, p)
}
@@ -16877,10 +17709,10 @@ func Xsqlite3StrAccumFinish(tls *libc.TLS, p uintptr) uintptr { /* sqlite3.c:294
// sqlite3_malloc() fails to provide space for a real one. This
// sqlite3_str object accepts no new text and always returns
// an SQLITE_NOMEM error.
-var sqlite3OomStr = Sqlite3_str{FaccError: U8(SQLITE_NOMEM)} /* sqlite3.c:29478:20 */
+var sqlite3OomStr = Sqlite3_str{FaccError: U8(SQLITE_NOMEM)} /* sqlite3.c:29668:20 */
// Finalize a string created using sqlite3_str_new().
-func Xsqlite3_str_finish(tls *libc.TLS, p uintptr) uintptr { /* sqlite3.c:29484:17: */
+func Xsqlite3_str_finish(tls *libc.TLS, p uintptr) uintptr { /* sqlite3.c:29674:17: */
var z uintptr
if (p != uintptr(0)) && (p != uintptr(unsafe.Pointer(&sqlite3OomStr))) {
z = Xsqlite3StrAccumFinish(tls, p)
@@ -16892,7 +17724,7 @@ func Xsqlite3_str_finish(tls *libc.TLS, p uintptr) uintptr { /* sqlite3.c:29484:
}
// Return any error code associated with p
-func Xsqlite3_str_errcode(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:29496:16: */
+func Xsqlite3_str_errcode(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:29686:16: */
if p != 0 {
return int32((*Sqlite3_str)(unsafe.Pointer(p)).FaccError)
}
@@ -16900,7 +17732,7 @@ func Xsqlite3_str_errcode(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:29496:1
}
// Return the current length of p in bytes
-func Xsqlite3_str_length(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:29501:16: */
+func Xsqlite3_str_length(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:29691:16: */
if p != 0 {
return int32((*Sqlite3_str)(unsafe.Pointer(p)).FnChar)
}
@@ -16908,16 +17740,16 @@ func Xsqlite3_str_length(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:29501:16
}
// Return the current value for p
-func Xsqlite3_str_value(tls *libc.TLS, p uintptr) uintptr { /* sqlite3.c:29506:17: */
+func Xsqlite3_str_value(tls *libc.TLS, p uintptr) uintptr { /* sqlite3.c:29696:17: */
if (p == uintptr(0)) || ((*Sqlite3_str)(unsafe.Pointer(p)).FnChar == U32(0)) {
return uintptr(0)
}
- *(*int8)(unsafe.Pointer((*Sqlite3_str)(unsafe.Pointer(p)).FzText + uintptr((*Sqlite3_str)(unsafe.Pointer(p)).FnChar))) = int8(0)
+ *(*uint8)(unsafe.Pointer((*Sqlite3_str)(unsafe.Pointer(p)).FzText + uintptr((*Sqlite3_str)(unsafe.Pointer(p)).FnChar))) = uint8(0)
return (*Sqlite3_str)(unsafe.Pointer(p)).FzText
}
// Reset an StrAccum string. Reclaim all malloced memory.
-func Xsqlite3_str_reset(tls *libc.TLS, p uintptr) { /* sqlite3.c:29515:17: */
+func Xsqlite3_str_reset(tls *libc.TLS, p uintptr) { /* sqlite3.c:29705:17: */
if (int32((*StrAccum)(unsafe.Pointer((p))).FprintfFlags) & SQLITE_PRINTF_MALLOCED) != 0 {
Xsqlite3DbFree(tls, (*StrAccum)(unsafe.Pointer(p)).Fdb, (*StrAccum)(unsafe.Pointer(p)).FzText)
*(*U8)(unsafe.Pointer(p + 29 /* &.printfFlags */)) &= libc.Uint8FromInt32((libc.CplInt32(SQLITE_PRINTF_MALLOCED)))
@@ -16939,7 +17771,7 @@ func Xsqlite3_str_reset(tls *libc.TLS, p uintptr) { /* sqlite3.c:29515:17: */
// n then no memory allocations ever occur.
// mx: Maximum number of bytes to accumulate. If mx==0 then no memory
// allocations will ever occur.
-func Xsqlite3StrAccumInit(tls *libc.TLS, p uintptr, db uintptr, zBase uintptr, n int32, mx int32) { /* sqlite3.c:29539:21: */
+func Xsqlite3StrAccumInit(tls *libc.TLS, p uintptr, db uintptr, zBase uintptr, n int32, mx int32) { /* sqlite3.c:29729:21: */
(*StrAccum)(unsafe.Pointer(p)).FzText = zBase
(*StrAccum)(unsafe.Pointer(p)).Fdb = db
(*StrAccum)(unsafe.Pointer(p)).FnAlloc = U32(n)
@@ -16950,7 +17782,7 @@ func Xsqlite3StrAccumInit(tls *libc.TLS, p uintptr, db uintptr, zBase uintptr, n
}
// Allocate and initialize a new dynamic string object
-func Xsqlite3_str_new(tls *libc.TLS, db uintptr) uintptr { /* sqlite3.c:29550:24: */
+func Xsqlite3_str_new(tls *libc.TLS, db uintptr) uintptr { /* sqlite3.c:29740:24: */
var p uintptr = Xsqlite3_malloc64(tls, uint64(unsafe.Sizeof(Sqlite3_str{})))
if p != 0 {
Xsqlite3StrAccumInit(tls, p, uintptr(0), uintptr(0), 0,
@@ -16968,16 +17800,16 @@ func Xsqlite3_str_new(tls *libc.TLS, db uintptr) uintptr { /* sqlite3.c:29550:24
// Print into memory obtained from sqliteMalloc(). Use the internal
// %-conversion extensions.
-func Xsqlite3VMPrintf(tls *libc.TLS, db uintptr, zFormat uintptr, ap Va_list) uintptr { /* sqlite3.c:29565:21: */
+func Xsqlite3VMPrintf(tls *libc.TLS, db uintptr, zFormat uintptr, ap Va_list) uintptr { /* sqlite3.c:29755:21: */
bp := tls.Alloc(102)
defer tls.Free(102)
var z uintptr
- // var zBase [70]int8 at bp+32, 70
+ // var zBase [70]uint8 at bp+32, 70
// var acc StrAccum at bp, 32
- Xsqlite3StrAccumInit(tls, bp /* &acc */, db, bp+32 /* &zBase[0] */, int32(unsafe.Sizeof([70]int8{})),
+ Xsqlite3StrAccumInit(tls, bp /* &acc */, db, bp+32 /* &zBase[0] */, int32(unsafe.Sizeof([70]uint8{})),
*(*int32)(unsafe.Pointer((db + 128 /* &.aLimit */))))
(*StrAccum)(unsafe.Pointer(bp /* &acc */)).FprintfFlags = U8(SQLITE_PRINTF_INTERNAL)
Xsqlite3_str_vappendf(tls, bp /* &acc */, zFormat, ap)
@@ -16990,7 +17822,7 @@ func Xsqlite3VMPrintf(tls *libc.TLS, db uintptr, zFormat uintptr, ap Va_list) ui
// Print into memory obtained from sqliteMalloc(). Use the internal
// %-conversion extensions.
-func Xsqlite3MPrintf(tls *libc.TLS, db uintptr, zFormat uintptr, va uintptr) uintptr { /* sqlite3.c:29585:21: */
+func Xsqlite3MPrintf(tls *libc.TLS, db uintptr, zFormat uintptr, va uintptr) uintptr { /* sqlite3.c:29775:21: */
var ap Va_list
_ = ap
var z uintptr
@@ -17002,19 +17834,19 @@ func Xsqlite3MPrintf(tls *libc.TLS, db uintptr, zFormat uintptr, va uintptr) uin
// Print into memory obtained from sqlite3_malloc(). Omit the internal
// %-conversion extensions.
-func Xsqlite3_vmprintf(tls *libc.TLS, zFormat uintptr, ap Va_list) uintptr { /* sqlite3.c:29598:17: */
+func Xsqlite3_vmprintf(tls *libc.TLS, zFormat uintptr, ap Va_list) uintptr { /* sqlite3.c:29788:17: */
bp := tls.Alloc(102)
defer tls.Free(102)
var z uintptr
- // var zBase [70]int8 at bp+32, 70
+ // var zBase [70]uint8 at bp+32, 70
// var acc StrAccum at bp, 32
if Xsqlite3_initialize(tls) != 0 {
return uintptr(0)
}
- Xsqlite3StrAccumInit(tls, bp /* &acc */, uintptr(0), bp+32 /* &zBase[0] */, int32(unsafe.Sizeof([70]int8{})), SQLITE_MAX_LENGTH)
+ Xsqlite3StrAccumInit(tls, bp /* &acc */, uintptr(0), bp+32 /* &zBase[0] */, int32(unsafe.Sizeof([70]uint8{})), SQLITE_MAX_LENGTH)
Xsqlite3_str_vappendf(tls, bp /* &acc */, zFormat, ap)
z = Xsqlite3StrAccumFinish(tls, bp /* &acc */)
return z
@@ -17022,7 +17854,7 @@ func Xsqlite3_vmprintf(tls *libc.TLS, zFormat uintptr, ap Va_list) uintptr { /*
// Print into memory obtained from sqlite3_malloc()(). Omit the internal
// %-conversion extensions.
-func Xsqlite3_mprintf(tls *libc.TLS, zFormat uintptr, va uintptr) uintptr { /* sqlite3.c:29622:17: */
+func Xsqlite3_mprintf(tls *libc.TLS, zFormat uintptr, va uintptr) uintptr { /* sqlite3.c:29812:17: */
var ap Va_list
_ = ap
var z uintptr
@@ -17046,7 +17878,7 @@ func Xsqlite3_mprintf(tls *libc.TLS, zFormat uintptr, va uintptr) uintptr { /* s
// mistake.
//
// sqlite3_vsnprintf() is the varargs version.
-func Xsqlite3_vsnprintf(tls *libc.TLS, n int32, zBuf uintptr, zFormat uintptr, ap Va_list) uintptr { /* sqlite3.c:29647:17: */
+func Xsqlite3_vsnprintf(tls *libc.TLS, n int32, zBuf uintptr, zFormat uintptr, ap Va_list) uintptr { /* sqlite3.c:29837:17: */
bp := tls.Alloc(32)
defer tls.Free(32)
@@ -17057,11 +17889,11 @@ func Xsqlite3_vsnprintf(tls *libc.TLS, n int32, zBuf uintptr, zFormat uintptr, a
}
Xsqlite3StrAccumInit(tls, bp /* &acc */, uintptr(0), zBuf, n, 0)
Xsqlite3_str_vappendf(tls, bp /* &acc */, zFormat, ap)
- *(*int8)(unsafe.Pointer(zBuf + uintptr((*StrAccum)(unsafe.Pointer(bp /* &acc */)).FnChar))) = int8(0)
+ *(*uint8)(unsafe.Pointer(zBuf + uintptr((*StrAccum)(unsafe.Pointer(bp /* &acc */)).FnChar))) = uint8(0)
return zBuf
}
-func Xsqlite3_snprintf(tls *libc.TLS, n int32, zBuf uintptr, zFormat uintptr, va uintptr) uintptr { /* sqlite3.c:29662:17: */
+func Xsqlite3_snprintf(tls *libc.TLS, n int32, zBuf uintptr, zFormat uintptr, va uintptr) uintptr { /* sqlite3.c:29852:17: */
var z uintptr
var ap Va_list
_ = ap
@@ -17083,23 +17915,25 @@ func Xsqlite3_snprintf(tls *libc.TLS, n int32, zBuf uintptr, zFormat uintptr, va
// certain format characters (%q) or for very large precisions or widths.
// Care must be taken that any sqlite3_log() calls that occur while the
// memory mutex is held do not use these mechanisms.
-func renderLogMsg(tls *libc.TLS, iErrCode int32, zFormat uintptr, ap Va_list) { /* sqlite3.c:29685:13: */
+func renderLogMsg(tls *libc.TLS, iErrCode int32, zFormat uintptr, ap Va_list) { /* sqlite3.c:29875:13: */
bp := tls.Alloc(242)
defer tls.Free(242)
// var acc StrAccum at bp, 32
// String accumulator
- // var zMsg [210]int8 at bp+32, 210
+ // var zMsg [210]uint8 at bp+32, 210
// Complete log message
- Xsqlite3StrAccumInit(tls, bp /* &acc */, uintptr(0), bp+32 /* &zMsg[0] */, int32(unsafe.Sizeof([210]int8{})), 0)
+ Xsqlite3StrAccumInit(tls, bp /* &acc */, uintptr(0), bp+32 /* &zMsg[0] */, int32(unsafe.Sizeof([210]uint8{})), 0)
Xsqlite3_str_vappendf(tls, bp /* &acc */, zFormat, ap)
- (*(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer((uintptr(unsafe.Pointer(&Xsqlite3Config)) + 376 /* &.xLog */))))(tls, Xsqlite3Config.FpLogArg, iErrCode,
+ (*struct {
+ f func(*libc.TLS, uintptr, int32, uintptr)
+ })(unsafe.Pointer(&struct{ uintptr }{Xsqlite3Config.FxLog})).f(tls, Xsqlite3Config.FpLogArg, iErrCode,
Xsqlite3StrAccumFinish(tls, bp /* &acc */))
}
// Format and write a message to the log if logging is enabled.
-func Xsqlite3_log(tls *libc.TLS, iErrCode int32, zFormat uintptr, va uintptr) { /* sqlite3.c:29698:17: */
+func Xsqlite3_log(tls *libc.TLS, iErrCode int32, zFormat uintptr, va uintptr) { /* sqlite3.c:29888:17: */
var ap Va_list
_ = ap // Vararg list
if Xsqlite3Config.FxLog != 0 {
@@ -17111,7 +17945,7 @@ func Xsqlite3_log(tls *libc.TLS, iErrCode int32, zFormat uintptr, va uintptr) {
// variable-argument wrapper around sqlite3_str_vappendf(). The bFlags argument
// can contain the bit SQLITE_PRINTF_INTERNAL enable internal formats.
-func Xsqlite3_str_appendf(tls *libc.TLS, p uintptr, zFormat uintptr, va uintptr) { /* sqlite3.c:29739:17: */
+func Xsqlite3_str_appendf(tls *libc.TLS, p uintptr, zFormat uintptr, va uintptr) { /* sqlite3.c:29929:17: */
var ap Va_list
_ = ap
ap = va
@@ -17166,7 +18000,7 @@ type sqlite3PrngType = struct {
Fi uint8
Fj uint8
Fs [256]uint8
-} /* sqlite3.c:30557:19 */
+} /* sqlite3.c:30748:19 */
//************* End of printf.c *********************************************
//************* Begin file treeview.c ***************************************
@@ -17210,10 +18044,10 @@ type sqlite3PrngType = struct {
// All threads share a single random number generator.
// This structure is the current state of the generator.
-var sqlite3Prng sqlite3PrngType /* sqlite3.c:30561:3: */
+var sqlite3Prng sqlite3PrngType /* sqlite3.c:30752:3: */
// Return N random bytes.
-func Xsqlite3_randomness(tls *libc.TLS, N int32, pBuf uintptr) { /* sqlite3.c:30566:17: */
+func Xsqlite3_randomness(tls *libc.TLS, N int32, pBuf uintptr) { /* sqlite3.c:30757:17: */
bp := tls.Alloc(256)
defer tls.Free(256)
@@ -17250,17 +18084,22 @@ func Xsqlite3_randomness(tls *libc.TLS, N int32, pBuf uintptr) { /* sqlite3.c:30
// encryption. The RC4 algorithm is being used as a PRNG (pseudo-random
// number generator) not as an encryption device.
if !(int32(sqlite3Prng.FisInit) != 0) {
+ var pVfs uintptr = Xsqlite3_vfs_find(tls, uintptr(0))
var i int32
- // var k [256]int8 at bp, 256
+ // var k [256]uint8 at bp, 256
sqlite3Prng.Fj = uint8(0)
sqlite3Prng.Fi = uint8(0)
- Xsqlite3OsRandomness(tls, Xsqlite3_vfs_find(tls, uintptr(0)), 256, bp /* &k[0] */)
+ if pVfs == uintptr(0) {
+ libc.Xmemset(tls, bp /* &k[0] */, 0, uint64(unsafe.Sizeof([256]uint8{})))
+ } else {
+ Xsqlite3OsRandomness(tls, pVfs, 256, bp /* &k[0] */)
+ }
for i = 0; i < 256; i++ {
*(*uint8)(unsafe.Pointer((uintptr(unsafe.Pointer(&sqlite3Prng)) + 3 /* &.s */) + uintptr(i))) = U8(i)
}
for i = 0; i < 256; i++ {
- *(*uint8)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Prng)) + 2 /* &.j */)) += uint8((int32(*(*uint8)(unsafe.Pointer((uintptr(unsafe.Pointer(&sqlite3Prng)) + 3 /* &.s */) + uintptr(i)))) + int32(*(*int8)(unsafe.Pointer(bp /* &k[0] */ + uintptr(i))))))
+ *(*uint8)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Prng)) + 2 /* &.j */)) += uint8((int32(*(*uint8)(unsafe.Pointer((uintptr(unsafe.Pointer(&sqlite3Prng)) + 3 /* &.s */) + uintptr(i)))) + int32(*(*uint8)(unsafe.Pointer(bp /* &k[0] */ + uintptr(i))))))
t = *(*uint8)(unsafe.Pointer((uintptr(unsafe.Pointer(&sqlite3Prng)) + 3 /* &.s */) + uintptr(sqlite3Prng.Fj)))
*(*uint8)(unsafe.Pointer((uintptr(unsafe.Pointer(&sqlite3Prng)) + 3 /* &.s */) + uintptr(sqlite3Prng.Fj))) = *(*uint8)(unsafe.Pointer((uintptr(unsafe.Pointer(&sqlite3Prng)) + 3 /* &.s */) + uintptr(i)))
*(*uint8)(unsafe.Pointer((uintptr(unsafe.Pointer(&sqlite3Prng)) + 3 /* &.s */) + uintptr(i))) = t
@@ -17287,16 +18126,16 @@ func Xsqlite3_randomness(tls *libc.TLS, N int32, pBuf uintptr) { /* sqlite3.c:30
//
// The sqlite3_test_control() interface calls these routines to
// control the PRNG.
-var sqlite3SavedPrng sqlite3PrngType /* sqlite3.c:30652:42: */
+var sqlite3SavedPrng sqlite3PrngType /* sqlite3.c:30848:42: */
-func Xsqlite3PrngSaveState(tls *libc.TLS) { /* sqlite3.c:30653:21: */
+func Xsqlite3PrngSaveState(tls *libc.TLS) { /* sqlite3.c:30849:21: */
libc.Xmemcpy(tls,
uintptr(unsafe.Pointer(&sqlite3SavedPrng)),
uintptr(unsafe.Pointer(&sqlite3Prng)),
uint64(unsafe.Sizeof(sqlite3Prng)))
}
-func Xsqlite3PrngRestoreState(tls *libc.TLS) { /* sqlite3.c:30660:21: */
+func Xsqlite3PrngRestoreState(tls *libc.TLS) { /* sqlite3.c:30856:21: */
libc.Xmemcpy(tls,
uintptr(unsafe.Pointer(&sqlite3Prng)),
uintptr(unsafe.Pointer(&sqlite3SavedPrng)),
@@ -17304,7 +18143,7 @@ func Xsqlite3PrngRestoreState(tls *libc.TLS) { /* sqlite3.c:30660:21: */
}
// Create a new thread
-func Xsqlite3ThreadCreate(tls *libc.TLS, ppThread uintptr, xTask uintptr, pIn uintptr) int32 { /* sqlite3.c:30896:20: */
+func Xsqlite3ThreadCreate(tls *libc.TLS, ppThread uintptr, xTask uintptr, pIn uintptr) int32 { /* sqlite3.c:31092:20: */
var p uintptr
*(*uintptr)(unsafe.Pointer(ppThread)) = uintptr(0)
@@ -17317,20 +18156,24 @@ func Xsqlite3ThreadCreate(tls *libc.TLS, ppThread uintptr, xTask uintptr, pIn ui
(*SQLiteThread)(unsafe.Pointer(p)).FpIn = pIn
} else {
(*SQLiteThread)(unsafe.Pointer(p)).FxTask = uintptr(0)
- (*SQLiteThread)(unsafe.Pointer(p)).FpResult = (*(*func(*libc.TLS, uintptr) uintptr)(unsafe.Pointer(&xTask)))(tls, pIn)
+ (*SQLiteThread)(unsafe.Pointer(p)).FpResult = (*struct {
+ f func(*libc.TLS, uintptr) uintptr
+ })(unsafe.Pointer(&struct{ uintptr }{xTask})).f(tls, pIn)
}
*(*uintptr)(unsafe.Pointer(ppThread)) = p
return SQLITE_OK
}
// Get the results of the thread
-func Xsqlite3ThreadJoin(tls *libc.TLS, p uintptr, ppOut uintptr) int32 { /* sqlite3.c:30920:20: */
+func Xsqlite3ThreadJoin(tls *libc.TLS, p uintptr, ppOut uintptr) int32 { /* sqlite3.c:31116:20: */
if p == uintptr(0) {
return SQLITE_NOMEM
}
if (*SQLiteThread)(unsafe.Pointer(p)).FxTask != 0 {
- *(*uintptr)(unsafe.Pointer(ppOut)) = (*(*func(*libc.TLS, uintptr) uintptr)(unsafe.Pointer((p /* &.xTask */))))(tls, (*SQLiteThread)(unsafe.Pointer(p)).FpIn)
+ *(*uintptr)(unsafe.Pointer(ppOut)) = (*struct {
+ f func(*libc.TLS, uintptr) uintptr
+ })(unsafe.Pointer(&struct{ uintptr }{(*SQLiteThread)(unsafe.Pointer(p)).FxTask})).f(tls, (*SQLiteThread)(unsafe.Pointer(p)).FpIn)
} else {
*(*uintptr)(unsafe.Pointer(ppOut)) = (*SQLiteThread)(unsafe.Pointer(p)).FpResult
}
@@ -17391,7 +18234,7 @@ var sqlite3Utf8Trans1 = [64]uint8{
uint8(0x08), uint8(0x09), uint8(0x0a), uint8(0x0b), uint8(0x0c), uint8(0x0d), uint8(0x0e), uint8(0x0f),
uint8(0x00), uint8(0x01), uint8(0x02), uint8(0x03), uint8(0x04), uint8(0x05), uint8(0x06), uint8(0x07),
uint8(0x00), uint8(0x01), uint8(0x02), uint8(0x03), uint8(0x00), uint8(0x01), uint8(0x00), uint8(0x00),
-} /* sqlite3.c:30999:28 */
+} /* sqlite3.c:31195:28 */
// Translate a single UTF-8 character. Return the unicode value.
//
@@ -17418,7 +18261,7 @@ var sqlite3Utf8Trans1 = [64]uint8{
// * This routine accepts over-length UTF8 encodings
// for unicode values 0x80 and greater. It does not change over-length
// encodings to 0xfffd as some systems recommend.
-func Xsqlite3Utf8Read(tls *libc.TLS, pz uintptr) U32 { /* sqlite3.c:31093:20: */
+func Xsqlite3Utf8Read(tls *libc.TLS, pz uintptr) U32 { /* sqlite3.c:31289:20: */
var c uint32
// Same as READ_UTF8() above but without the zTerm parameter.
@@ -17445,7 +18288,7 @@ func Xsqlite3Utf8Read(tls *libc.TLS, pz uintptr) U32 { /* sqlite3.c:31093:20: */
// This routine transforms the internal text encoding used by pMem to
// desiredEnc. It is an error if the string is already of the desired
// encoding, or if *pMem does not contain a string value.
-func Xsqlite3VdbeMemTranslate(tls *libc.TLS, pMem uintptr, desiredEnc U8) int32 { /* sqlite3.c:31129:36: */
+func Xsqlite3VdbeMemTranslate(tls *libc.TLS, pMem uintptr, desiredEnc U8) int32 { /* sqlite3.c:31325:36: */
var len Sqlite3_int64 // Maximum length of output string in bytes
var zOut uintptr // Output buffer
var zIn uintptr // Input iterator
@@ -17770,7 +18613,7 @@ translate_out:
//
// The allocation (static, dynamic etc.) and encoding of the Mem may be
// changed by this function.
-func Xsqlite3VdbeMemHandleBom(tls *libc.TLS, pMem uintptr) int32 { /* sqlite3.c:31324:20: */
+func Xsqlite3VdbeMemHandleBom(tls *libc.TLS, pMem uintptr) int32 { /* sqlite3.c:31520:20: */
var rc int32 = SQLITE_OK
var bom U8 = U8(0)
@@ -17790,8 +18633,8 @@ func Xsqlite3VdbeMemHandleBom(tls *libc.TLS, pMem uintptr) int32 { /* sqlite3.c:
if rc == SQLITE_OK {
*(*int32)(unsafe.Pointer(pMem + 12 /* &.n */)) -= (2)
libc.Xmemmove(tls, (*Mem)(unsafe.Pointer(pMem)).Fz, ((*Mem)(unsafe.Pointer(pMem)).Fz + 2), uint64((*Mem)(unsafe.Pointer(pMem)).Fn))
- *(*int8)(unsafe.Pointer((*Mem)(unsafe.Pointer(pMem)).Fz + uintptr((*Mem)(unsafe.Pointer(pMem)).Fn))) = int8(0)
- *(*int8)(unsafe.Pointer((*Mem)(unsafe.Pointer(pMem)).Fz + uintptr(((*Mem)(unsafe.Pointer(pMem)).Fn + 1)))) = int8(0)
+ *(*uint8)(unsafe.Pointer((*Mem)(unsafe.Pointer(pMem)).Fz + uintptr((*Mem)(unsafe.Pointer(pMem)).Fn))) = uint8(0)
+ *(*uint8)(unsafe.Pointer((*Mem)(unsafe.Pointer(pMem)).Fz + uintptr(((*Mem)(unsafe.Pointer(pMem)).Fn + 1)))) = uint8(0)
*(*U16)(unsafe.Pointer(pMem + 8 /* &.flags */)) |= U16((MEM_Term))
(*Mem)(unsafe.Pointer(pMem)).Fenc = bom
}
@@ -17804,7 +18647,7 @@ func Xsqlite3VdbeMemHandleBom(tls *libc.TLS, pMem uintptr) int32 { /* sqlite3.c:
// the first 0x00 byte. If nByte is not less than zero, return the
// number of unicode characters in the first nByte of pZ (or up to
// the first 0x00, whichever comes first).
-func Xsqlite3Utf8CharLen(tls *libc.TLS, zIn uintptr, nByte int32) int32 { /* sqlite3.c:31362:20: */
+func Xsqlite3Utf8CharLen(tls *libc.TLS, zIn uintptr, nByte int32) int32 { /* sqlite3.c:31558:20: */
var r int32 = 0
var z uintptr = zIn
var zTerm uintptr
@@ -17836,7 +18679,7 @@ func Xsqlite3Utf8CharLen(tls *libc.TLS, zIn uintptr, nByte int32) int32 { /* sql
// be freed by the calling function.
//
// NULL is returned if there is an allocation error.
-func Xsqlite3Utf16to8(tls *libc.TLS, db uintptr, z uintptr, nByte int32, enc U8) uintptr { /* sqlite3.c:31416:21: */
+func Xsqlite3Utf16to8(tls *libc.TLS, db uintptr, z uintptr, nByte int32, enc U8) uintptr { /* sqlite3.c:31612:21: */
bp := tls.Alloc(56)
defer tls.Free(56)
@@ -17844,7 +18687,7 @@ func Xsqlite3Utf16to8(tls *libc.TLS, db uintptr, z uintptr, nByte int32, enc U8)
libc.Xmemset(tls, bp /* &m */, 0, uint64(unsafe.Sizeof(Mem{})))
(*Mem)(unsafe.Pointer(bp /* &m */)).Fdb = db
- Xsqlite3VdbeMemSetStr(tls, bp /* &m */, z, nByte, enc, uintptr(0))
+ Xsqlite3VdbeMemSetStr(tls, bp /* &m */, z, int64(nByte), enc, uintptr(0))
Xsqlite3VdbeChangeEncoding(tls, bp /* &m */, SQLITE_UTF8)
if (*Sqlite3)(unsafe.Pointer(db)).FmallocFailed != 0 {
Xsqlite3VdbeMemRelease(tls, bp /* &m */)
@@ -17857,13 +18700,13 @@ func Xsqlite3Utf16to8(tls *libc.TLS, db uintptr, z uintptr, nByte int32, enc U8)
// zIn is a UTF-16 encoded unicode string at least nChar characters long.
// Return the number of bytes in the first nChar unicode characters
// in pZ. nChar must be non-negative.
-func Xsqlite3Utf16ByteLen(tls *libc.TLS, zIn uintptr, nChar int32) int32 { /* sqlite3.c:31437:20: */
+func Xsqlite3Utf16ByteLen(tls *libc.TLS, zIn uintptr, nChar int32) int32 { /* sqlite3.c:31633:20: */
var c int32
var z uintptr = zIn
var n int32 = 0
if (func() int32 {
- if int32(*(*int8)(unsafe.Pointer(uintptr(unsafe.Pointer(&Xsqlite3one))))) == 0 {
+ if int32(*(*uint8)(unsafe.Pointer(uintptr(unsafe.Pointer(&Xsqlite3one))))) == 0 {
return SQLITE_UTF16BE
}
return SQLITE_UTF16LE
@@ -17880,7 +18723,7 @@ func Xsqlite3Utf16ByteLen(tls *libc.TLS, zIn uintptr, nChar int32) int32 { /* sq
}
return ((int32((int64(z) - int64(zIn)) / 1)) -
(libc.Bool32((func() int32 {
- if int32(*(*int8)(unsafe.Pointer(uintptr(unsafe.Pointer(&Xsqlite3one))))) == 0 {
+ if int32(*(*uint8)(unsafe.Pointer(uintptr(unsafe.Pointer(&Xsqlite3one))))) == 0 {
return SQLITE_UTF16BE
}
return SQLITE_UTF16LE
@@ -17907,7 +18750,7 @@ func Xsqlite3Utf16ByteLen(tls *libc.TLS, zIn uintptr, nChar int32) int32 { /* sq
// #include "sqliteInt.h"
// #include
// Declarations for math functions.
-// Copyright (C) 1991-2018 Free Software Foundation, Inc.
+// Copyright (C) 1991-2020 Free Software Foundation, Inc.
// This file is part of the GNU C Library.
//
// The GNU C Library is free software; you can redistribute it and/or
@@ -17922,12 +18765,12 @@ func Xsqlite3Utf16ByteLen(tls *libc.TLS, zIn uintptr, nChar int32) int32 { /* sq
//
// You should have received a copy of the GNU Lesser General Public
// License along with the GNU C Library; if not, see
-// .
+// .
// ISO C99 Standard: 7.12 Mathematics
// Handle feature test macros at the start of a header.
-// Copyright (C) 2016-2018 Free Software Foundation, Inc.
+// Copyright (C) 2016-2020 Free Software Foundation, Inc.
// This file is part of the GNU C Library.
//
// The GNU C Library is free software; you can redistribute it and/or
@@ -17942,7 +18785,7 @@ func Xsqlite3Utf16ByteLen(tls *libc.TLS, zIn uintptr, nChar int32) int32 { /* sq
//
// You should have received a copy of the GNU Lesser General Public
// License along with the GNU C Library; if not, see
-// .
+// .
// This header is internal to glibc and should not be included outside
// of glibc headers. Headers including it must define
@@ -17952,7 +18795,7 @@ func Xsqlite3Utf16ByteLen(tls *libc.TLS, zIn uintptr, nChar int32) int32 { /* sq
// header is included, not when the first system header is
// included.
-// Copyright (C) 1991-2018 Free Software Foundation, Inc.
+// Copyright (C) 1991-2020 Free Software Foundation, Inc.
// This file is part of the GNU C Library.
//
// The GNU C Library is free software; you can redistribute it and/or
@@ -17967,23 +18810,27 @@ func Xsqlite3Utf16ByteLen(tls *libc.TLS, zIn uintptr, nChar int32) int32 { /* sq
//
// You should have received a copy of the GNU Lesser General Public
// License along with the GNU C Library; if not, see
-// .
+// .
// ISO/IEC TR 24731-2:2010 defines the __STDC_WANT_LIB_EXT2__
// macro.
// ISO/IEC TS 18661-1:2014 defines the __STDC_WANT_IEC_60559_BFP_EXT__
-// macro.
+// macro. Most but not all symbols enabled by that macro in TS
+// 18661-1 are enabled unconditionally in C2X; the symbols in Annex F
+// still require that macro in C2X.
// ISO/IEC TS 18661-4:2015 defines the
-// __STDC_WANT_IEC_60559_FUNCS_EXT__ macro.
+// __STDC_WANT_IEC_60559_FUNCS_EXT__ macro. Other than the reduction
+// functions, the symbols from this TS are enabled unconditionally in
+// C2X.
// ISO/IEC TS 18661-3:2015 defines the
// __STDC_WANT_IEC_60559_TYPES_EXT__ macro.
// Get definitions of __intmax_t and __uintmax_t.
// bits/types.h -- definitions of __*_t types underlying *_t types.
-// Copyright (C) 2002-2018 Free Software Foundation, Inc.
+// Copyright (C) 2002-2020 Free Software Foundation, Inc.
// This file is part of the GNU C Library.
//
// The GNU C Library is free software; you can redistribute it and/or
@@ -17998,13 +18845,13 @@ func Xsqlite3Utf16ByteLen(tls *libc.TLS, zIn uintptr, nChar int32) int32 { /* sq
//
// You should have received a copy of the GNU Lesser General Public
// License along with the GNU C Library; if not, see
-// .
+// .
// Never include this file directly; use instead.
// Get machine-dependent vector math functions declarations.
// Platform-specific SIMD declarations of math functions.
-// Copyright (C) 2014-2018 Free Software Foundation, Inc.
+// Copyright (C) 2014-2020 Free Software Foundation, Inc.
// This file is part of the GNU C Library.
//
// The GNU C Library is free software; you can redistribute it and/or
@@ -18019,13 +18866,13 @@ func Xsqlite3Utf16ByteLen(tls *libc.TLS, zIn uintptr, nChar int32) int32 { /* sq
//
// You should have received a copy of the GNU Lesser General Public
// License along with the GNU C Library; if not, see
-// .
+// .
// Get default empty definitions required for __MATHCALL_VEC unfolding.
// Plaform-specific analogue of this header should redefine them with specific
// SIMD declarations.
// Empty definitions required for __MATHCALL_VEC unfolding in mathcalls.h.
-// Copyright (C) 2014-2018 Free Software Foundation, Inc.
+// Copyright (C) 2014-2020 Free Software Foundation, Inc.
// This file is part of the GNU C Library.
//
// The GNU C Library is free software; you can redistribute it and/or
@@ -18040,7 +18887,7 @@ func Xsqlite3Utf16ByteLen(tls *libc.TLS, zIn uintptr, nChar int32) int32 { /* sq
//
// You should have received a copy of the GNU Lesser General Public
// License along with the GNU C Library; if not, see
-// .
+// .
// Needed definitions could be generated with:
// for func in $(grep __MATHCALL_VEC math/bits/mathcalls.h | sed -r "s|__MATHCALL_VEC.?\(||; s|,.*||"); do
@@ -18052,7 +18899,7 @@ func Xsqlite3Utf16ByteLen(tls *libc.TLS, zIn uintptr, nChar int32) int32 { /* sq
// Gather machine dependent type support.
// Macros to control TS 18661-3 glibc features on ldbl-128 platforms.
-// Copyright (C) 2017-2018 Free Software Foundation, Inc.
+// Copyright (C) 2017-2020 Free Software Foundation, Inc.
// This file is part of the GNU C Library.
//
// The GNU C Library is free software; you can redistribute it and/or
@@ -18067,7 +18914,7 @@ func Xsqlite3Utf16ByteLen(tls *libc.TLS, zIn uintptr, nChar int32) int32 { /* sq
//
// You should have received a copy of the GNU Lesser General Public
// License along with the GNU C Library; if not, see
-// .
+// .
// Value returned on overflow. With IEEE 754 floating point, this is
// +Infinity, otherwise the largest representable positive value.
@@ -18080,7 +18927,7 @@ func Xsqlite3Utf16ByteLen(tls *libc.TLS, zIn uintptr, nChar int32) int32 { /* sq
// Get __GLIBC_FLT_EVAL_METHOD.
// Define __GLIBC_FLT_EVAL_METHOD. S/390 version.
-// Copyright (C) 2016-2018 Free Software Foundation, Inc.
+// Copyright (C) 2016-2020 Free Software Foundation, Inc.
// This file is part of the GNU C Library.
//
// The GNU C Library is free software; you can redistribute it and/or
@@ -18095,7 +18942,7 @@ func Xsqlite3Utf16ByteLen(tls *libc.TLS, zIn uintptr, nChar int32) int32 { /* sq
//
// You should have received a copy of the GNU Lesser General Public
// License along with the GNU C Library; if not, see
-// .
+// .
// This value is used because of a historical mistake.
@@ -18140,7 +18987,7 @@ type Double_t = float64 /* math.h:153:16 */
// nonconforming but it is more useful than leaving it undefined).
// Define iscanonical macro.
-// Copyright (C) 2016-2018 Free Software Foundation, Inc.
+// Copyright (C) 2016-2020 Free Software Foundation, Inc.
// This file is part of the GNU C Library.
//
// The GNU C Library is free software; you can redistribute it and/or
@@ -18155,7 +19002,7 @@ type Double_t = float64 /* math.h:153:16 */
//
// You should have received a copy of the GNU Lesser General Public
// License along with the GNU C Library; if not, see
-// .
+// .
// Return nonzero value if X is canonical. By default, we only have
// IEEE interchange binary formats, in which all values are canonical,
@@ -18190,9 +19037,6 @@ type Double_t = float64 /* math.h:153:16 */
// Get machine-dependent inline versions (if there are any).
-// Define special entry points to use when the compiler got told to
-// only expect finite results.
-
// An expression whose type has the widest of the evaluation formats
// of X and Y (which are of floating-point types).
@@ -18218,16 +19062,16 @@ type Double_t = float64 /* math.h:153:16 */
// sqlite3FaultSim() instance is being invoked. Each call to sqlite3FaultSim()
// should have a unique code. To prevent legacy testing applications from
// breaking, the codes should not be changed or reused.
-func Xsqlite3FaultSim(tls *libc.TLS, iTest int32) int32 { /* sqlite3.c:31539:20: */
+func Xsqlite3FaultSim(tls *libc.TLS, iTest int32) int32 { /* sqlite3.c:31735:20: */
var xCallback uintptr = Xsqlite3Config.FxTestCallback
if xCallback != 0 {
- return (*(*func(*libc.TLS, int32) int32)(unsafe.Pointer(&xCallback)))(tls, iTest)
+ return (*struct{ f func(*libc.TLS, int32) int32 })(unsafe.Pointer(&struct{ uintptr }{xCallback})).f(tls, iTest)
}
return SQLITE_OK
}
// Return true if the floating point value is Not a Number (NaN).
-func Xsqlite3IsNaN(tls *libc.TLS, x float64) int32 { /* sqlite3.c:31549:20: */
+func Xsqlite3IsNaN(tls *libc.TLS, x float64) int32 { /* sqlite3.c:31745:20: */
bp := tls.Alloc(16)
defer tls.Free(16)
*(*float64)(unsafe.Pointer(bp + 8)) = x
@@ -18244,7 +19088,7 @@ func Xsqlite3IsNaN(tls *libc.TLS, x float64) int32 { /* sqlite3.c:31549:20: */
// The value returned will never be negative. Nor will it ever be greater
// than the actual length of the string. For very long strings (greater
// than 1GiB) the value returned might be less than the true string length.
-func Xsqlite3Strlen30(tls *libc.TLS, z uintptr) int32 { /* sqlite3.c:31564:20: */
+func Xsqlite3Strlen30(tls *libc.TLS, z uintptr) int32 { /* sqlite3.c:31760:20: */
if z == uintptr(0) {
return 0
}
@@ -18256,7 +19100,7 @@ func Xsqlite3Strlen30(tls *libc.TLS, z uintptr) int32 { /* sqlite3.c:31564:20: *
//
// The column type is an extra string stored after the zero-terminator on
// the column name if and only if the COLFLAG_HASTYPE flag is set.
-func Xsqlite3ColumnType(tls *libc.TLS, pCol uintptr, zDflt uintptr) uintptr { /* sqlite3.c:31576:21: */
+func Xsqlite3ColumnType(tls *libc.TLS, pCol uintptr, zDflt uintptr) uintptr { /* sqlite3.c:31772:21: */
if (int32((*Column)(unsafe.Pointer(pCol)).FcolFlags) & COLFLAG_HASTYPE) == 0 {
return zDflt
}
@@ -18266,7 +19110,7 @@ func Xsqlite3ColumnType(tls *libc.TLS, pCol uintptr, zDflt uintptr) uintptr { /*
// Helper function for sqlite3Error() - called rarely. Broken out into
// a separate routine to avoid unnecessary register saves on entry to
// sqlite3Error().
-func sqlite3ErrorFinish(tls *libc.TLS, db uintptr, err_code int32) { /* sqlite3.c:31586:30: */
+func sqlite3ErrorFinish(tls *libc.TLS, db uintptr, err_code int32) { /* sqlite3.c:31782:30: */
if (*Sqlite3)(unsafe.Pointer(db)).FpErr != 0 {
Xsqlite3ValueSetNull(tls, (*Sqlite3)(unsafe.Pointer(db)).FpErr)
}
@@ -18276,7 +19120,7 @@ func sqlite3ErrorFinish(tls *libc.TLS, db uintptr, err_code int32) { /* sqlite3.
// Set the current error code to err_code and clear any prior error message.
// Also set iSysErrno (by calling sqlite3System) if the err_code indicates
// that would be appropriate.
-func Xsqlite3Error(tls *libc.TLS, db uintptr, err_code int32) { /* sqlite3.c:31596:21: */
+func Xsqlite3Error(tls *libc.TLS, db uintptr, err_code int32) { /* sqlite3.c:31792:21: */
(*Sqlite3)(unsafe.Pointer(db)).FerrCode = err_code
if (err_code != 0) || ((*Sqlite3)(unsafe.Pointer(db)).FpErr != 0) {
@@ -18286,7 +19130,7 @@ func Xsqlite3Error(tls *libc.TLS, db uintptr, err_code int32) { /* sqlite3.c:315
// The equivalent of sqlite3Error(db, SQLITE_OK). Clear the error state
// and error message.
-func Xsqlite3ErrorClear(tls *libc.TLS, db uintptr) { /* sqlite3.c:31606:21: */
+func Xsqlite3ErrorClear(tls *libc.TLS, db uintptr) { /* sqlite3.c:31802:21: */
(*Sqlite3)(unsafe.Pointer(db)).FerrCode = SQLITE_OK
if (*Sqlite3)(unsafe.Pointer(db)).FpErr != 0 {
@@ -18296,7 +19140,7 @@ func Xsqlite3ErrorClear(tls *libc.TLS, db uintptr) { /* sqlite3.c:31606:21: */
// Load the sqlite3.iSysErrno field if that is an appropriate thing
// to do based on the SQLite error code in rc.
-func Xsqlite3SystemError(tls *libc.TLS, db uintptr, rc int32) { /* sqlite3.c:31616:21: */
+func Xsqlite3SystemError(tls *libc.TLS, db uintptr, rc int32) { /* sqlite3.c:31812:21: */
if rc == (SQLITE_IOERR | (int32(12) << 8)) {
return
}
@@ -18325,7 +19169,7 @@ func Xsqlite3SystemError(tls *libc.TLS, db uintptr, rc int32) { /* sqlite3.c:316
// To clear the most recent error for sqlite handle "db", sqlite3Error
// should be called with err_code set to SQLITE_OK and zFormat set
// to NULL.
-func Xsqlite3ErrorWithMsg(tls *libc.TLS, db uintptr, err_code int32, zFormat uintptr, va uintptr) { /* sqlite3.c:31645:21: */
+func Xsqlite3ErrorWithMsg(tls *libc.TLS, db uintptr, err_code int32, zFormat uintptr, va uintptr) { /* sqlite3.c:31841:21: */
(*Sqlite3)(unsafe.Pointer(db)).FerrCode = err_code
Xsqlite3SystemError(tls, db, err_code)
@@ -18357,7 +19201,7 @@ func Xsqlite3ErrorWithMsg(tls *libc.TLS, db uintptr, err_code int32, zFormat uin
// stored by this function into the database handle using sqlite3Error().
// Functions sqlite3Error() or sqlite3ErrorWithMsg() should be used
// during statement execution (sqlite3_step() etc.).
-func Xsqlite3ErrorMsg(tls *libc.TLS, pParse uintptr, zFormat uintptr, va uintptr) { /* sqlite3.c:31678:21: */
+func Xsqlite3ErrorMsg(tls *libc.TLS, pParse uintptr, zFormat uintptr, va uintptr) { /* sqlite3.c:31874:21: */
var zMsg uintptr
var ap Va_list
_ = ap
@@ -18379,7 +19223,7 @@ func Xsqlite3ErrorMsg(tls *libc.TLS, pParse uintptr, zFormat uintptr, va uintptr
// If database connection db is currently parsing SQL, then transfer
// error code errCode to that parser if the parser has not already
// encountered some other kind of error.
-func Xsqlite3ErrorToParser(tls *libc.TLS, db uintptr, errCode int32) int32 { /* sqlite3.c:31701:20: */
+func Xsqlite3ErrorToParser(tls *libc.TLS, db uintptr, errCode int32) int32 { /* sqlite3.c:31897:20: */
var pParse uintptr
if (db == uintptr(0)) || ((libc.AssignUintptr(&pParse, (*Sqlite3)(unsafe.Pointer(db)).FpParse)) == uintptr(0)) {
return errCode
@@ -18404,42 +19248,42 @@ func Xsqlite3ErrorToParser(tls *libc.TLS, db uintptr, errCode int32) int32 { /*
// 2002-02-14: This routine is extended to remove MS-Access style
// brackets from around identifiers. For example: "[a-b-c]" becomes
// "a-b-c".
-func Xsqlite3Dequote(tls *libc.TLS, z uintptr) { /* sqlite3.c:31726:21: */
- var quote int8
+func Xsqlite3Dequote(tls *libc.TLS, z uintptr) { /* sqlite3.c:31922:21: */
+ var quote uint8
var i int32
var j int32
if z == uintptr(0) {
return
}
- quote = *(*int8)(unsafe.Pointer(z))
+ quote = *(*uint8)(unsafe.Pointer(z))
if !((int32(Xsqlite3CtypeMap[uint8(quote)]) & 0x80) != 0) {
return
}
if int32(quote) == '[' {
- quote = int8(']')
+ quote = uint8(']')
}
i = 1
j = 0
for ; ; i++ {
- if int32(*(*int8)(unsafe.Pointer(z + uintptr(i)))) == int32(quote) {
- if int32(*(*int8)(unsafe.Pointer(z + uintptr((i + 1))))) == int32(quote) {
- *(*int8)(unsafe.Pointer(z + uintptr(libc.PostIncInt32(&j, 1)))) = quote
+ if int32(*(*uint8)(unsafe.Pointer(z + uintptr(i)))) == int32(quote) {
+ if int32(*(*uint8)(unsafe.Pointer(z + uintptr((i + 1))))) == int32(quote) {
+ *(*uint8)(unsafe.Pointer(z + uintptr(libc.PostIncInt32(&j, 1)))) = quote
i++
} else {
break
}
} else {
- *(*int8)(unsafe.Pointer(z + uintptr(libc.PostIncInt32(&j, 1)))) = *(*int8)(unsafe.Pointer(z + uintptr(i)))
+ *(*uint8)(unsafe.Pointer(z + uintptr(libc.PostIncInt32(&j, 1)))) = *(*uint8)(unsafe.Pointer(z + uintptr(i)))
}
}
- *(*int8)(unsafe.Pointer(z + uintptr(j))) = int8(0)
+ *(*uint8)(unsafe.Pointer(z + uintptr(j))) = uint8(0)
}
-func Xsqlite3DequoteExpr(tls *libc.TLS, p uintptr) { /* sqlite3.c:31748:21: */
+func Xsqlite3DequoteExpr(tls *libc.TLS, p uintptr) { /* sqlite3.c:31944:21: */
*(*U32)(unsafe.Pointer(p + 4 /* &.flags */)) |= (func() uint32 {
- if int32(*(*int8)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(p + 8 /* &.u */))))) == '"' {
+ if int32(*(*uint8)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(p + 8 /* &.u */))))) == '"' {
return (uint32(EP_Quoted | EP_DblQuoted))
}
return uint32(EP_Quoted)
@@ -18448,7 +19292,7 @@ func Xsqlite3DequoteExpr(tls *libc.TLS, p uintptr) { /* sqlite3.c:31748:21: */
}
// Generate a Token object from a string
-func Xsqlite3TokenInit(tls *libc.TLS, p uintptr, z uintptr) { /* sqlite3.c:31757:21: */
+func Xsqlite3TokenInit(tls *libc.TLS, p uintptr, z uintptr) { /* sqlite3.c:31953:21: */
(*Token)(unsafe.Pointer(p)).Fz = z
(*Token)(unsafe.Pointer(p)).Fn = uint32(Xsqlite3Strlen30(tls, z))
}
@@ -18463,7 +19307,7 @@ func Xsqlite3TokenInit(tls *libc.TLS, p uintptr, z uintptr) { /* sqlite3.c:31757
// the contents of two buffers containing UTF-8 strings in a
// case-independent fashion, using the same definition of "case
// independence" that SQLite uses internally when comparing identifiers.
-func Xsqlite3_stricmp(tls *libc.TLS, zLeft uintptr, zRight uintptr) int32 { /* sqlite3.c:31775:16: */
+func Xsqlite3_stricmp(tls *libc.TLS, zLeft uintptr, zRight uintptr) int32 { /* sqlite3.c:31971:16: */
if zLeft == uintptr(0) {
if zRight != 0 {
return -1
@@ -18475,7 +19319,7 @@ func Xsqlite3_stricmp(tls *libc.TLS, zLeft uintptr, zRight uintptr) int32 { /* s
return Xsqlite3StrICmp(tls, zLeft, zRight)
}
-func Xsqlite3StrICmp(tls *libc.TLS, zLeft uintptr, zRight uintptr) int32 { /* sqlite3.c:31783:20: */
+func Xsqlite3StrICmp(tls *libc.TLS, zLeft uintptr, zRight uintptr) int32 { /* sqlite3.c:31979:20: */
var a uintptr
var b uintptr
var c int32
@@ -18501,7 +19345,7 @@ func Xsqlite3StrICmp(tls *libc.TLS, zLeft uintptr, zRight uintptr) int32 { /* sq
return c
}
-func Xsqlite3_strnicmp(tls *libc.TLS, zLeft uintptr, zRight uintptr, N int32) int32 { /* sqlite3.c:31802:16: */
+func Xsqlite3_strnicmp(tls *libc.TLS, zLeft uintptr, zRight uintptr, N int32) int32 { /* sqlite3.c:31998:16: */
var a uintptr
var b uintptr
if zLeft == uintptr(0) {
@@ -18525,13 +19369,13 @@ func Xsqlite3_strnicmp(tls *libc.TLS, zLeft uintptr, zRight uintptr, N int32) in
}
// Compute an 8-bit hash on a string that is insensitive to case differences
-func Xsqlite3StrIHash(tls *libc.TLS, z uintptr) U8 { /* sqlite3.c:31818:19: */
+func Xsqlite3StrIHash(tls *libc.TLS, z uintptr) U8 { /* sqlite3.c:32014:19: */
var h U8 = U8(0)
if z == uintptr(0) {
return U8(0)
}
- for *(*int8)(unsafe.Pointer(z)) != 0 {
- h = U8(int32(h) + (int32(Xsqlite3UpperToLower[uint8(*(*int8)(unsafe.Pointer(z)))])))
+ for *(*uint8)(unsafe.Pointer(z)) != 0 {
+ h = U8(int32(h) + (int32(Xsqlite3UpperToLower[uint8(*(*uint8)(unsafe.Pointer(z)))])))
z++
}
return h
@@ -18541,7 +19385,7 @@ func Xsqlite3StrIHash(tls *libc.TLS, z uintptr) U8 { /* sqlite3.c:31818:19: */
// E==2 results in 100. E==50 results in 1.0e50.
//
// This routine only works for values of E between 1 and 341.
-func sqlite3Pow10(tls *libc.TLS, E int32) float64 { /* sqlite3.c:31834:24: */
+func sqlite3Pow10(tls *libc.TLS, E int32) float64 { /* sqlite3.c:32030:24: */
var x float64 = 10.0
var r float64 = 1.0
for 1 != 0 {
@@ -18584,7 +19428,7 @@ func sqlite3Pow10(tls *libc.TLS, E int32) float64 { /* sqlite3.c:31834:24: */
// If some prefix of the input string is a valid number, this routine
// returns FALSE but it still converts the prefix and writes the result
// into *pResult.
-func Xsqlite3AtoF(tls *libc.TLS, z uintptr, pResult uintptr, length int32, enc U8) int32 { /* sqlite3.c:31899:20: */
+func Xsqlite3AtoF(tls *libc.TLS, z uintptr, pResult uintptr, length int32, enc U8) int32 { /* sqlite3.c:32095:20: */
var incr int32
var zEnd uintptr
// sign * significand * (10 ^ (esign * exponent))
@@ -18629,7 +19473,7 @@ __2:
i = (3 - int32(enc))
__4:
- if !((i < length) && (int32(*(*int8)(unsafe.Pointer(z + uintptr(i)))) == 0)) {
+ if !((i < length) && (int32(*(*uint8)(unsafe.Pointer(z + uintptr(i)))) == 0)) {
goto __6
}
goto __5
@@ -18652,7 +19496,7 @@ __3:
// skip leading spaces
__8:
- if !((z < zEnd) && ((int32(Xsqlite3CtypeMap[uint8(*(*int8)(unsafe.Pointer(z)))]) & 0x01) != 0)) {
+ if !((z < zEnd) && ((int32(Xsqlite3CtypeMap[uint8(*(*uint8)(unsafe.Pointer(z)))]) & 0x01) != 0)) {
goto __9
}
z += uintptr(incr)
@@ -18667,14 +19511,14 @@ __10:
;
// get sign of significand
- if !(int32(*(*int8)(unsafe.Pointer(z))) == '-') {
+ if !(int32(*(*uint8)(unsafe.Pointer(z))) == '-') {
goto __11
}
sign = -1
z += uintptr(incr)
goto __12
__11:
- if !(int32(*(*int8)(unsafe.Pointer(z))) == '+') {
+ if !(int32(*(*uint8)(unsafe.Pointer(z))) == '+') {
goto __13
}
z += uintptr(incr)
@@ -18685,10 +19529,10 @@ __12:
// copy max significant digits to significand
__14:
- if !((z < zEnd) && ((int32(Xsqlite3CtypeMap[uint8(*(*int8)(unsafe.Pointer(z)))]) & 0x04) != 0)) {
+ if !((z < zEnd) && ((int32(Xsqlite3CtypeMap[uint8(*(*uint8)(unsafe.Pointer(z)))]) & 0x04) != 0)) {
goto __15
}
- s = ((s * int64(10)) + (I64(int32(*(*int8)(unsafe.Pointer(z))) - '0')))
+ s = ((s * int64(10)) + (I64(int32(*(*uint8)(unsafe.Pointer(z))) - '0')))
z += uintptr(incr)
nDigit++
if !(s >= (((int64(0xffffffff) | (I64((int64(0x7fffffff))) << 32)) - int64(9)) / int64(10))) {
@@ -18697,7 +19541,7 @@ __14:
// skip non-significant significand digits
// (increase exponent by d to shift decimal left)
__17:
- if !((z < zEnd) && ((int32(Xsqlite3CtypeMap[uint8(*(*int8)(unsafe.Pointer(z)))]) & 0x04) != 0)) {
+ if !((z < zEnd) && ((int32(Xsqlite3CtypeMap[uint8(*(*uint8)(unsafe.Pointer(z)))]) & 0x04) != 0)) {
goto __18
}
z += uintptr(incr)
@@ -18718,7 +19562,7 @@ __19:
;
// if decimal point is present
- if !(int32(*(*int8)(unsafe.Pointer(z))) == '.') {
+ if !(int32(*(*uint8)(unsafe.Pointer(z))) == '.') {
goto __20
}
z += uintptr(incr)
@@ -18726,13 +19570,13 @@ __19:
// copy digits from after decimal to significand
// (decrease exponent by d to shift decimal right)
__21:
- if !((z < zEnd) && ((int32(Xsqlite3CtypeMap[uint8(*(*int8)(unsafe.Pointer(z)))]) & 0x04) != 0)) {
+ if !((z < zEnd) && ((int32(Xsqlite3CtypeMap[uint8(*(*uint8)(unsafe.Pointer(z)))]) & 0x04) != 0)) {
goto __22
}
if !(s < (((int64(0xffffffff) | (I64((int64(0x7fffffff))) << 32)) - int64(9)) / int64(10))) {
goto __23
}
- s = ((s * int64(10)) + (I64(int32(*(*int8)(unsafe.Pointer(z))) - '0')))
+ s = ((s * int64(10)) + (I64(int32(*(*uint8)(unsafe.Pointer(z))) - '0')))
d--
nDigit++
__23:
@@ -18751,7 +19595,7 @@ __24:
;
// if exponent is present
- if !((int32(*(*int8)(unsafe.Pointer(z))) == 'e') || (int32(*(*int8)(unsafe.Pointer(z))) == 'E')) {
+ if !((int32(*(*uint8)(unsafe.Pointer(z))) == 'e') || (int32(*(*uint8)(unsafe.Pointer(z))) == 'E')) {
goto __25
}
z += uintptr(incr)
@@ -18769,14 +19613,14 @@ __26:
; //PREVENTS-HARMLESS-OVERREAD
// get sign of exponent
- if !(int32(*(*int8)(unsafe.Pointer(z))) == '-') {
+ if !(int32(*(*uint8)(unsafe.Pointer(z))) == '-') {
goto __27
}
esign = -1
z += uintptr(incr)
goto __28
__27:
- if !(int32(*(*int8)(unsafe.Pointer(z))) == '+') {
+ if !(int32(*(*uint8)(unsafe.Pointer(z))) == '+') {
goto __29
}
z += uintptr(incr)
@@ -18786,11 +19630,11 @@ __28:
;
// copy digits to exponent
__30:
- if !((z < zEnd) && ((int32(Xsqlite3CtypeMap[uint8(*(*int8)(unsafe.Pointer(z)))]) & 0x04) != 0)) {
+ if !((z < zEnd) && ((int32(Xsqlite3CtypeMap[uint8(*(*uint8)(unsafe.Pointer(z)))]) & 0x04) != 0)) {
goto __31
}
if e < 10000 {
- e = ((e * 10) + (int32(*(*int8)(unsafe.Pointer(z))) - '0'))
+ e = ((e * 10) + (int32(*(*uint8)(unsafe.Pointer(z))) - '0'))
} else {
e = 10000
}
@@ -18804,7 +19648,7 @@ __25:
// skip trailing spaces
__32:
- if !((z < zEnd) && ((int32(Xsqlite3CtypeMap[uint8(*(*int8)(unsafe.Pointer(z)))]) & 0x01) != 0)) {
+ if !((z < zEnd) && ((int32(Xsqlite3CtypeMap[uint8(*(*uint8)(unsafe.Pointer(z)))]) & 0x01) != 0)) {
goto __33
}
z += uintptr(incr)
@@ -18964,13 +19808,13 @@ __57:
// Render an signed 64-bit integer as text. Store the result in zOut[].
//
// The caller must ensure that zOut[] is at least 21 bytes in size.
-func Xsqlite3Int64ToText(tls *libc.TLS, v I64, zOut uintptr) { /* sqlite3.c:32098:21: */
+func Xsqlite3Int64ToText(tls *libc.TLS, v I64, zOut uintptr) { /* sqlite3.c:32294:21: */
bp := tls.Alloc(22)
defer tls.Free(22)
var i int32
var x U64
- // var zTemp [22]int8 at bp, 22
+ // var zTemp [22]uint8 at bp, 22
if v < int64(0) {
if v == ((int64(-1)) - (int64(0xffffffff) | (I64((int64(0x7fffffff))) << 32))) {
@@ -18981,16 +19825,16 @@ func Xsqlite3Int64ToText(tls *libc.TLS, v I64, zOut uintptr) { /* sqlite3.c:3209
} else {
x = U64(v)
}
- i = (int32(uint64(unsafe.Sizeof([22]int8{})) - uint64(2)))
- *(*int8)(unsafe.Pointer(bp /* &zTemp[0] */ + 21)) = int8(0)
+ i = (int32(uint64(unsafe.Sizeof([22]uint8{})) - uint64(2)))
+ *(*uint8)(unsafe.Pointer(bp /* &zTemp[0] */ + 21)) = uint8(0)
for ok := true; ok; ok = x != 0 {
- *(*int8)(unsafe.Pointer(bp /* &zTemp[0] */ + uintptr(libc.PostDecInt32(&i, 1)))) = (int8((x % uint64(10)) + uint64('0')))
+ *(*uint8)(unsafe.Pointer(bp /* &zTemp[0] */ + uintptr(libc.PostDecInt32(&i, 1)))) = (uint8((x % uint64(10)) + uint64('0')))
x = (x / uint64(10))
}
if v < int64(0) {
- *(*int8)(unsafe.Pointer(bp /* &zTemp[0] */ + uintptr(libc.PostDecInt32(&i, 1)))) = int8('-')
+ *(*uint8)(unsafe.Pointer(bp /* &zTemp[0] */ + uintptr(libc.PostDecInt32(&i, 1)))) = uint8('-')
}
- libc.Xmemcpy(tls, zOut, (bp /* &zTemp */ + uintptr((i + 1))), ((uint64(unsafe.Sizeof([22]int8{})) - uint64(1)) - uint64(i)))
+ libc.Xmemcpy(tls, zOut, (bp /* &zTemp */ + uintptr((i + 1))), ((uint64(unsafe.Sizeof([22]uint8{})) - uint64(1)) - uint64(i)))
}
// Compare the 19-character string zNum against the text representation
@@ -19005,16 +19849,16 @@ func Xsqlite3Int64ToText(tls *libc.TLS, v I64, zOut uintptr) { /* sqlite3.c:3209
// compare2pow63("9223372036854775800", 1)
//
// will return -8.
-func compare2pow63(tls *libc.TLS, zNum uintptr, incr int32) int32 { /* sqlite3.c:32131:12: */
+func compare2pow63(tls *libc.TLS, zNum uintptr, incr int32) int32 { /* sqlite3.c:32327:12: */
var c int32 = 0
var i int32
// 012345678901234567
- var pow63 uintptr = ts + 727 /* "9223372036854775..." */
+ var pow63 uintptr = ts + 791 /* "9223372036854775..." */
for i = 0; (c == 0) && (i < 18); i++ {
- c = ((int32(*(*int8)(unsafe.Pointer(zNum + uintptr((i * incr))))) - int32(*(*int8)(unsafe.Pointer(pow63 + uintptr(i))))) * 10)
+ c = ((int32(*(*uint8)(unsafe.Pointer(zNum + uintptr((i * incr))))) - int32(*(*uint8)(unsafe.Pointer(pow63 + uintptr(i))))) * 10)
}
if c == 0 {
- c = (int32(*(*int8)(unsafe.Pointer(zNum + uintptr((18 * incr))))) - '8')
+ c = (int32(*(*uint8)(unsafe.Pointer(zNum + uintptr((18 * incr))))) - '8')
}
return c
@@ -19034,7 +19878,7 @@ func compare2pow63(tls *libc.TLS, zNum uintptr, incr int32) int32 { /* sqlite3.c
// length is the number of bytes in the string (bytes, not characters).
// The string is not necessarily zero-terminated. The encoding is
// given by enc.
-func Xsqlite3Atoi64(tls *libc.TLS, zNum uintptr, pNum uintptr, length int32, enc U8) int32 { /* sqlite3.c:32164:20: */
+func Xsqlite3Atoi64(tls *libc.TLS, zNum uintptr, pNum uintptr, length int32, enc U8) int32 { /* sqlite3.c:32360:20: */
var incr int32
var u U64 = uint64(0)
var neg int32 = 0 // assume positive
@@ -19051,28 +19895,28 @@ func Xsqlite3Atoi64(tls *libc.TLS, zNum uintptr, pNum uintptr, length int32, enc
incr = 2
length = length & (libc.CplInt32(1))
- for i = (3 - int32(enc)); (i < length) && (int32(*(*int8)(unsafe.Pointer(zNum + uintptr(i)))) == 0); i = i + (2) {
+ for i = (3 - int32(enc)); (i < length) && (int32(*(*uint8)(unsafe.Pointer(zNum + uintptr(i)))) == 0); i = i + (2) {
}
nonNum = (libc.Bool32(i < length))
zEnd = (zNum + uintptr((i ^ 1)))
zNum += (uintptr(int32(enc) & 1))
}
- for (zNum < zEnd) && ((int32(Xsqlite3CtypeMap[uint8(*(*int8)(unsafe.Pointer(zNum)))]) & 0x01) != 0) {
+ for (zNum < zEnd) && ((int32(Xsqlite3CtypeMap[uint8(*(*uint8)(unsafe.Pointer(zNum)))]) & 0x01) != 0) {
zNum += uintptr(incr)
}
if zNum < zEnd {
- if int32(*(*int8)(unsafe.Pointer(zNum))) == '-' {
+ if int32(*(*uint8)(unsafe.Pointer(zNum))) == '-' {
neg = 1
zNum += uintptr(incr)
- } else if int32(*(*int8)(unsafe.Pointer(zNum))) == '+' {
+ } else if int32(*(*uint8)(unsafe.Pointer(zNum))) == '+' {
zNum += uintptr(incr)
}
}
zStart = zNum
- for (zNum < zEnd) && (int32(*(*int8)(unsafe.Pointer(zNum))) == '0') {
+ for (zNum < zEnd) && (int32(*(*uint8)(unsafe.Pointer(zNum))) == '0') {
zNum += uintptr(incr)
} // Skip leading zeros.
- for i = 0; (((zNum + uintptr(i)) < zEnd) && ((libc.AssignInt32(&c, int32(*(*int8)(unsafe.Pointer(zNum + uintptr(i)))))) >= '0')) && (c <= '9'); i = i + (incr) {
+ for i = 0; (((zNum + uintptr(i)) < zEnd) && ((libc.AssignInt32(&c, int32(*(*uint8)(unsafe.Pointer(zNum + uintptr(i)))))) >= '0')) && (c <= '9'); i = i + (incr) {
u = (((u * uint64(10)) + U64(c)) - uint64('0'))
}
@@ -19100,7 +19944,7 @@ func Xsqlite3Atoi64(tls *libc.TLS, zNum uintptr, pNum uintptr, length int32, enc
} else if (zNum + uintptr(i)) < zEnd { // Extra bytes at the end
var jj int32 = i
for ok := true; ok; ok = ((zNum + uintptr(jj)) < zEnd) {
- if !((int32(Xsqlite3CtypeMap[uint8(*(*int8)(unsafe.Pointer(zNum + uintptr(jj))))]) & 0x01) != 0) {
+ if !((int32(Xsqlite3CtypeMap[uint8(*(*uint8)(unsafe.Pointer(zNum + uintptr(jj))))]) & 0x01) != 0) {
rc = 1 // Extra non-space text after the integer
break
}
@@ -19156,22 +20000,22 @@ func Xsqlite3Atoi64(tls *libc.TLS, zNum uintptr, pNum uintptr, length int32, enc
// 1 Excess text after the integer value
// 2 Integer too large for a 64-bit signed integer or is malformed
// 3 Special case of 9223372036854775808
-func Xsqlite3DecOrHexToI64(tls *libc.TLS, z uintptr, pOut uintptr) int32 { /* sqlite3.c:32267:20: */
+func Xsqlite3DecOrHexToI64(tls *libc.TLS, z uintptr, pOut uintptr) int32 { /* sqlite3.c:32463:20: */
bp := tls.Alloc(8)
defer tls.Free(8)
- if (int32(*(*int8)(unsafe.Pointer(z))) == '0') &&
- ((int32(*(*int8)(unsafe.Pointer(z + 1))) == 'x') || (int32(*(*int8)(unsafe.Pointer(z + 1))) == 'X')) {
+ if (int32(*(*uint8)(unsafe.Pointer(z))) == '0') &&
+ ((int32(*(*uint8)(unsafe.Pointer(z + 1))) == 'x') || (int32(*(*uint8)(unsafe.Pointer(z + 1))) == 'X')) {
*(*U64)(unsafe.Pointer(bp /* u */)) = uint64(0)
var i int32
var k int32
- for i = 2; int32(*(*int8)(unsafe.Pointer(z + uintptr(i)))) == '0'; i++ {
+ for i = 2; int32(*(*uint8)(unsafe.Pointer(z + uintptr(i)))) == '0'; i++ {
}
- for k = i; (int32(Xsqlite3CtypeMap[uint8(*(*int8)(unsafe.Pointer(z + uintptr(k))))]) & 0x08) != 0; k++ {
- *(*U64)(unsafe.Pointer(bp /* u */)) = ((*(*U64)(unsafe.Pointer(bp /* u */)) * uint64(16)) + U64(Xsqlite3HexToInt(tls, int32(*(*int8)(unsafe.Pointer(z + uintptr(k)))))))
+ for k = i; (int32(Xsqlite3CtypeMap[uint8(*(*uint8)(unsafe.Pointer(z + uintptr(k))))]) & 0x08) != 0; k++ {
+ *(*U64)(unsafe.Pointer(bp /* u */)) = ((*(*U64)(unsafe.Pointer(bp /* u */)) * uint64(16)) + U64(Xsqlite3HexToInt(tls, int32(*(*uint8)(unsafe.Pointer(z + uintptr(k)))))))
}
libc.Xmemcpy(tls, pOut, bp /* &u */, uint64(8))
- if (int32(*(*int8)(unsafe.Pointer(z + uintptr(k)))) == 0) && ((k - i) <= 16) {
+ if (int32(*(*uint8)(unsafe.Pointer(z + uintptr(k)))) == 0) && ((k - i) <= 16) {
return 0
}
return 2
@@ -19189,7 +20033,7 @@ func Xsqlite3DecOrHexToI64(tls *libc.TLS, z uintptr, pOut uintptr) int32 { /* sq
// Any non-numeric characters that following zNum are ignored.
// This is different from sqlite3Atoi64() which requires the
// input number to be zero-terminated.
-func Xsqlite3GetInt32(tls *libc.TLS, zNum uintptr, pValue uintptr) int32 { /* sqlite3.c:32297:20: */
+func Xsqlite3GetInt32(tls *libc.TLS, zNum uintptr, pValue uintptr) int32 { /* sqlite3.c:32493:20: */
bp := tls.Alloc(4)
defer tls.Free(4)
@@ -19197,36 +20041,36 @@ func Xsqlite3GetInt32(tls *libc.TLS, zNum uintptr, pValue uintptr) int32 { /* sq
var i int32
var c int32
var neg int32 = 0
- if int32(*(*int8)(unsafe.Pointer(zNum))) == '-' {
+ if int32(*(*uint8)(unsafe.Pointer(zNum))) == '-' {
neg = 1
zNum++
- } else if int32(*(*int8)(unsafe.Pointer(zNum))) == '+' {
+ } else if int32(*(*uint8)(unsafe.Pointer(zNum))) == '+' {
zNum++
- } else if ((int32(*(*int8)(unsafe.Pointer(zNum))) == '0') &&
- ((int32(*(*int8)(unsafe.Pointer(zNum + 1))) == 'x') || (int32(*(*int8)(unsafe.Pointer(zNum + 1))) == 'X'))) &&
- ((int32(Xsqlite3CtypeMap[uint8(*(*int8)(unsafe.Pointer(zNum + 2)))]) & 0x08) != 0) {
+ } else if ((int32(*(*uint8)(unsafe.Pointer(zNum))) == '0') &&
+ ((int32(*(*uint8)(unsafe.Pointer(zNum + 1))) == 'x') || (int32(*(*uint8)(unsafe.Pointer(zNum + 1))) == 'X'))) &&
+ ((int32(Xsqlite3CtypeMap[uint8(*(*uint8)(unsafe.Pointer(zNum + 2)))]) & 0x08) != 0) {
*(*U32)(unsafe.Pointer(bp /* u */)) = U32(0)
zNum += uintptr(2)
- for int32(*(*int8)(unsafe.Pointer(zNum))) == '0' {
+ for int32(*(*uint8)(unsafe.Pointer(zNum))) == '0' {
zNum++
}
- for i = 0; ((int32(Xsqlite3CtypeMap[uint8(*(*int8)(unsafe.Pointer(zNum + uintptr(i))))]) & 0x08) != 0) && (i < 8); i++ {
- *(*U32)(unsafe.Pointer(bp /* u */)) = ((*(*U32)(unsafe.Pointer(bp /* u */)) * U32(16)) + U32(Xsqlite3HexToInt(tls, int32(*(*int8)(unsafe.Pointer(zNum + uintptr(i)))))))
+ for i = 0; ((int32(Xsqlite3CtypeMap[uint8(*(*uint8)(unsafe.Pointer(zNum + uintptr(i))))]) & 0x08) != 0) && (i < 8); i++ {
+ *(*U32)(unsafe.Pointer(bp /* u */)) = ((*(*U32)(unsafe.Pointer(bp /* u */)) * U32(16)) + U32(Xsqlite3HexToInt(tls, int32(*(*uint8)(unsafe.Pointer(zNum + uintptr(i)))))))
}
- if ((*(*U32)(unsafe.Pointer(bp /* u */)) & 0x80000000) == U32(0)) && ((int32(Xsqlite3CtypeMap[uint8(*(*int8)(unsafe.Pointer(zNum + uintptr(i))))]) & 0x08) == 0) {
+ if ((*(*U32)(unsafe.Pointer(bp /* u */)) & 0x80000000) == U32(0)) && ((int32(Xsqlite3CtypeMap[uint8(*(*uint8)(unsafe.Pointer(zNum + uintptr(i))))]) & 0x08) == 0) {
libc.Xmemcpy(tls, pValue, bp /* &u */, uint64(4))
return 1
} else {
return 0
}
}
- if !((int32(Xsqlite3CtypeMap[uint8(*(*int8)(unsafe.Pointer(zNum)))]) & 0x04) != 0) {
+ if !((int32(Xsqlite3CtypeMap[uint8(*(*uint8)(unsafe.Pointer(zNum)))]) & 0x04) != 0) {
return 0
}
- for int32(*(*int8)(unsafe.Pointer(zNum))) == '0' {
+ for int32(*(*uint8)(unsafe.Pointer(zNum))) == '0' {
zNum++
}
- for i = 0; ((i < 11) && ((libc.AssignInt32(&c, (int32(*(*int8)(unsafe.Pointer(zNum + uintptr(i)))) - '0'))) >= 0)) && (c <= 9); i++ {
+ for i = 0; ((i < 11) && ((libc.AssignInt32(&c, (int32(*(*uint8)(unsafe.Pointer(zNum + uintptr(i)))) - '0'))) >= 0)) && (c <= 9); i++ {
v = ((v * int64(10)) + Sqlite_int64(c))
}
@@ -19251,7 +20095,7 @@ func Xsqlite3GetInt32(tls *libc.TLS, zNum uintptr, pValue uintptr) int32 { /* sq
// Return a 32-bit integer value extracted from a string. If the
// string is not an integer, just return 0.
-func Xsqlite3Atoi(tls *libc.TLS, z uintptr) int32 { /* sqlite3.c:32356:20: */
+func Xsqlite3Atoi(tls *libc.TLS, z uintptr) int32 { /* sqlite3.c:32552:20: */
bp := tls.Alloc(4)
defer tls.Free(4)
@@ -19264,17 +20108,17 @@ func Xsqlite3Atoi(tls *libc.TLS, z uintptr) int32 { /* sqlite3.c:32356:20: */
// success and false if there is an error.
//
// Only decimal notation is accepted.
-func Xsqlite3GetUInt32(tls *libc.TLS, z uintptr, pI uintptr) int32 { /* sqlite3.c:32368:20: */
+func Xsqlite3GetUInt32(tls *libc.TLS, z uintptr, pI uintptr) int32 { /* sqlite3.c:32564:20: */
var v U64 = uint64(0)
var i int32
- for i = 0; (int32(Xsqlite3CtypeMap[uint8(*(*int8)(unsafe.Pointer(z + uintptr(i))))]) & 0x04) != 0; i++ {
- v = (((v * uint64(10)) + U64(*(*int8)(unsafe.Pointer(z + uintptr(i))))) - uint64('0'))
+ for i = 0; (int32(Xsqlite3CtypeMap[uint8(*(*uint8)(unsafe.Pointer(z + uintptr(i))))]) & 0x04) != 0; i++ {
+ v = (((v * uint64(10)) + U64(*(*uint8)(unsafe.Pointer(z + uintptr(i))))) - uint64('0'))
if v > uint64(4294967296) {
*(*U32)(unsafe.Pointer(pI)) = U32(0)
return 0
}
}
- if (i == 0) || (int32(*(*int8)(unsafe.Pointer(z + uintptr(i)))) != 0) {
+ if (i == 0) || (int32(*(*uint8)(unsafe.Pointer(z + uintptr(i)))) != 0) {
*(*U32)(unsafe.Pointer(pI)) = U32(0)
return 0
}
@@ -19307,7 +20151,7 @@ func Xsqlite3GetUInt32(tls *libc.TLS, z uintptr, pI uintptr) int32 { /* sqlite3.
// for all bytes that have the 8th bit set and one byte with the 8th
// bit clear. Except, if we get to the 9th byte, it stores the full
// 8 bits and is the last byte.
-func putVarint64(tls *libc.TLS, p uintptr, v U64) int32 { /* sqlite3.c:32409:28: */
+func putVarint64(tls *libc.TLS, p uintptr, v U64) int32 { /* sqlite3.c:32605:28: */
bp := tls.Alloc(10)
defer tls.Free(10)
@@ -19353,7 +20197,7 @@ __3:
return n
}
-func Xsqlite3PutVarint(tls *libc.TLS, p uintptr, v U64) int32 { /* sqlite3.c:32433:20: */
+func Xsqlite3PutVarint(tls *libc.TLS, p uintptr, v U64) int32 { /* sqlite3.c:32629:20: */
if v <= uint64(0x7f) {
*(*uint8)(unsafe.Pointer(p)) = (uint8(v & uint64(0x7f)))
return 1
@@ -19376,7 +20220,7 @@ func Xsqlite3PutVarint(tls *libc.TLS, p uintptr, v U64) int32 { /* sqlite3.c:324
// Read a 64-bit variable-length integer from memory starting at p[0].
// Return the number of bytes read. The value is stored in *v.
-func Xsqlite3GetVarint(tls *libc.TLS, p uintptr, v uintptr) U8 { /* sqlite3.c:32463:19: */
+func Xsqlite3GetVarint(tls *libc.TLS, p uintptr, v uintptr) U8 { /* sqlite3.c:32659:19: */
var a U32
var b U32
var s U32
@@ -19529,7 +20373,7 @@ func Xsqlite3GetVarint(tls *libc.TLS, p uintptr, v uintptr) U8 { /* sqlite3.c:32
// A MACRO version, getVarint32, is provided which inlines the
// single-byte case. All code should use the MACRO version as
// this function assumes the single-byte case has already been handled.
-func Xsqlite3GetVarint32(tls *libc.TLS, p uintptr, v uintptr) U8 { /* sqlite3.c:32624:19: */
+func Xsqlite3GetVarint32(tls *libc.TLS, p uintptr, v uintptr) U8 { /* sqlite3.c:32820:19: */
bp := tls.Alloc(8)
defer tls.Free(8)
@@ -19597,7 +20441,7 @@ func Xsqlite3GetVarint32(tls *libc.TLS, p uintptr, v uintptr) U8 { /* sqlite3.c:
// Return the number of bytes that will be needed to store the given
// 64-bit integer.
-func Xsqlite3VarintLen(tls *libc.TLS, v U64) int32 { /* sqlite3.c:32746:20: */
+func Xsqlite3VarintLen(tls *libc.TLS, v U64) int32 { /* sqlite3.c:32942:20: */
var i int32
for i = 1; (libc.AssignShrUint64(&v, int(uint64(7)))) != uint64(0); i++ {
}
@@ -19605,12 +20449,12 @@ func Xsqlite3VarintLen(tls *libc.TLS, v U64) int32 { /* sqlite3.c:32746:20: */
}
// Read or write a four-byte big-endian integer value.
-func Xsqlite3Get4byte(tls *libc.TLS, p uintptr) U32 { /* sqlite3.c:32756:20: */
+func Xsqlite3Get4byte(tls *libc.TLS, p uintptr) U32 { /* sqlite3.c:32952:20: */
return ((((uint32(*(*U8)(unsafe.Pointer(p))) << 24) | (uint32(int32(*(*U8)(unsafe.Pointer(p + 1))) << 16))) | (uint32(int32(*(*U8)(unsafe.Pointer(p + 2))) << 8))) | uint32(*(*U8)(unsafe.Pointer(p + 3))))
}
-func Xsqlite3Put4byte(tls *libc.TLS, p uintptr, v U32) { /* sqlite3.c:32774:21: */
+func Xsqlite3Put4byte(tls *libc.TLS, p uintptr, v U32) { /* sqlite3.c:32970:21: */
*(*uint8)(unsafe.Pointer(p)) = (U8(v >> 24))
*(*uint8)(unsafe.Pointer(p + 1)) = (U8(v >> 16))
*(*uint8)(unsafe.Pointer(p + 2)) = (U8(v >> 8))
@@ -19620,7 +20464,7 @@ func Xsqlite3Put4byte(tls *libc.TLS, p uintptr, v U32) { /* sqlite3.c:32774:21:
// Translate a single byte of Hex into an integer.
// This routine only works if h really is a valid hexadecimal
// character: 0..9a..fA..F
-func Xsqlite3HexToInt(tls *libc.TLS, h int32) U8 { /* sqlite3.c:32798:19: */
+func Xsqlite3HexToInt(tls *libc.TLS, h int32) U8 { /* sqlite3.c:32994:19: */
h = h + (9 * (1 & (h >> 6)))
return (U8(h & 0xf))
@@ -19630,7 +20474,7 @@ func Xsqlite3HexToInt(tls *libc.TLS, h int32) U8 { /* sqlite3.c:32798:19: */
// value. Return a pointer to its binary value. Space to hold the
// binary value has been obtained from malloc and must be freed by
// the calling routine.
-func Xsqlite3HexToBlob(tls *libc.TLS, db uintptr, z uintptr, n int32) uintptr { /* sqlite3.c:32816:21: */
+func Xsqlite3HexToBlob(tls *libc.TLS, db uintptr, z uintptr, n int32) uintptr { /* sqlite3.c:33012:21: */
var zBlob uintptr
var i int32
@@ -19638,9 +20482,9 @@ func Xsqlite3HexToBlob(tls *libc.TLS, db uintptr, z uintptr, n int32) uintptr {
n--
if zBlob != 0 {
for i = 0; i < n; i = i + (2) {
- *(*int8)(unsafe.Pointer(zBlob + uintptr((i / 2)))) = (int8((int32(Xsqlite3HexToInt(tls, int32(*(*int8)(unsafe.Pointer(z + uintptr(i)))))) << 4) | int32(Xsqlite3HexToInt(tls, int32(*(*int8)(unsafe.Pointer(z + uintptr((i + 1)))))))))
+ *(*uint8)(unsafe.Pointer(zBlob + uintptr((i / 2)))) = (uint8((int32(Xsqlite3HexToInt(tls, int32(*(*uint8)(unsafe.Pointer(z + uintptr(i)))))) << 4) | int32(Xsqlite3HexToInt(tls, int32(*(*uint8)(unsafe.Pointer(z + uintptr((i + 1)))))))))
}
- *(*int8)(unsafe.Pointer(zBlob + uintptr((i / 2)))) = int8(0)
+ *(*uint8)(unsafe.Pointer(zBlob + uintptr((i / 2)))) = uint8(0)
}
return zBlob
}
@@ -19648,12 +20492,12 @@ func Xsqlite3HexToBlob(tls *libc.TLS, db uintptr, z uintptr, n int32) uintptr {
// Log an error that is an API call on a connection pointer that should
// not have been used. The "type" of connection pointer is given as the
// argument. The zType is a word like "NULL" or "closed" or "invalid".
-func logBadConnection(tls *libc.TLS, zType uintptr) { /* sqlite3.c:32837:13: */
+func logBadConnection(tls *libc.TLS, zType uintptr) { /* sqlite3.c:33033:13: */
bp := tls.Alloc(8)
defer tls.Free(8)
Xsqlite3_log(tls, SQLITE_MISUSE,
- ts+746, /* "API call with %s..." */
+ ts+810, /* "API call with %s..." */
libc.VaList(bp, zType))
}
@@ -19669,17 +20513,17 @@ func logBadConnection(tls *libc.TLS, zType uintptr) { /* sqlite3.c:32837:13: */
// use. sqlite3SafetyCheckSickOrOk() allows a db pointer that failed to
// open properly and is not fit for general use but which can be
// used as an argument to sqlite3_errmsg() or sqlite3_close().
-func Xsqlite3SafetyCheckOk(tls *libc.TLS, db uintptr) int32 { /* sqlite3.c:32858:20: */
+func Xsqlite3SafetyCheckOk(tls *libc.TLS, db uintptr) int32 { /* sqlite3.c:33054:20: */
var magic U32
if db == uintptr(0) {
- logBadConnection(tls, ts+704 /* "NULL" */)
+ logBadConnection(tls, ts+756 /* "NULL" */)
return 0
}
magic = (*Sqlite3)(unsafe.Pointer(db)).Fmagic
if magic != SQLITE_MAGIC_OPEN {
if Xsqlite3SafetyCheckSickOrOk(tls, db) != 0 {
- logBadConnection(tls, ts+791 /* "unopened" */)
+ logBadConnection(tls, ts+855 /* "unopened" */)
}
return 0
} else {
@@ -19688,12 +20532,12 @@ func Xsqlite3SafetyCheckOk(tls *libc.TLS, db uintptr) int32 { /* sqlite3.c:32858
return int32(0)
}
-func Xsqlite3SafetyCheckSickOrOk(tls *libc.TLS, db uintptr) int32 { /* sqlite3.c:32875:20: */
+func Xsqlite3SafetyCheckSickOrOk(tls *libc.TLS, db uintptr) int32 { /* sqlite3.c:33071:20: */
var magic U32
magic = (*Sqlite3)(unsafe.Pointer(db)).Fmagic
if ((magic != U32(SQLITE_MAGIC_SICK)) && (magic != SQLITE_MAGIC_OPEN)) && (magic != SQLITE_MAGIC_BUSY) {
- logBadConnection(tls, ts+800 /* "invalid" */)
+ logBadConnection(tls, ts+864 /* "invalid" */)
return 0
} else {
return 1
@@ -19705,21 +20549,21 @@ func Xsqlite3SafetyCheckSickOrOk(tls *libc.TLS, db uintptr) int32 { /* sqlite3.c
// the other 64-bit signed integer at *pA and store the result in *pA.
// Return 0 on success. Or if the operation would have resulted in an
// overflow, leave *pA unchanged and return 1.
-func Xsqlite3AddInt64(tls *libc.TLS, pA uintptr, iB I64) int32 { /* sqlite3.c:32895:20: */
+func Xsqlite3AddInt64(tls *libc.TLS, pA uintptr, iB I64) int32 { /* sqlite3.c:33091:20: */
return libc.X__builtin_add_overflowInt64(tls, *(*I64)(unsafe.Pointer(pA)), iB, pA)
}
-func Xsqlite3SubInt64(tls *libc.TLS, pA uintptr, iB I64) int32 { /* sqlite3.c:32915:20: */
+func Xsqlite3SubInt64(tls *libc.TLS, pA uintptr, iB I64) int32 { /* sqlite3.c:33111:20: */
return libc.X__builtin_sub_overflowInt64(tls, *(*I64)(unsafe.Pointer(pA)), iB, pA)
}
-func Xsqlite3MulInt64(tls *libc.TLS, pA uintptr, iB I64) int32 { /* sqlite3.c:32930:20: */
+func Xsqlite3MulInt64(tls *libc.TLS, pA uintptr, iB I64) int32 { /* sqlite3.c:33126:20: */
return libc.X__builtin_mul_overflowInt64(tls, *(*I64)(unsafe.Pointer(pA)), iB, pA)
}
// Compute the absolute value of a 32-bit signed integer, of possible. Or
// if the integer has a value of -2147483648, return +2147483647
-func Xsqlite3AbsInt32(tls *libc.TLS, x int32) int32 { /* sqlite3.c:32956:20: */
+func Xsqlite3AbsInt32(tls *libc.TLS, x int32) int32 { /* sqlite3.c:33152:20: */
if x >= 0 {
return x
}
@@ -19733,7 +20577,7 @@ func Xsqlite3AbsInt32(tls *libc.TLS, x int32) int32 { /* sqlite3.c:32956:20: */
// not a simple "+" operator because LogEst is stored as a logarithmic
// value.
//
-func Xsqlite3LogEstAdd(tls *libc.TLS, a LogEst, b LogEst) LogEst { /* sqlite3.c:32999:23: */
+func Xsqlite3LogEstAdd(tls *libc.TLS, a LogEst, b LogEst) LogEst { /* sqlite3.c:33195:23: */
if int32(a) >= int32(b) {
if int32(a) > (int32(b) + 49) {
return a
@@ -19764,11 +20608,11 @@ var x = [32]uint8{
uint8(4), uint8(4), uint8(4), uint8(4), // 15-18
uint8(3), uint8(3), uint8(3), uint8(3), uint8(3), uint8(3), // 19-24
uint8(2), uint8(2), uint8(2), uint8(2), uint8(2), uint8(2), uint8(2), // 25-31
-} /* sqlite3.c:33000:30 */
+} /* sqlite3.c:33196:30 */
// Convert an integer into a LogEst. In other words, compute an
// approximation for 10*log2(x).
-func Xsqlite3LogEst(tls *libc.TLS, x U64) LogEst { /* sqlite3.c:33026:23: */
+func Xsqlite3LogEst(tls *libc.TLS, x U64) LogEst { /* sqlite3.c:33222:23: */
var y LogEst = int16(40)
if x < uint64(8) {
if x < uint64(2) {
@@ -19786,11 +20630,11 @@ func Xsqlite3LogEst(tls *libc.TLS, x U64) LogEst { /* sqlite3.c:33026:23: */
return (LogEst((int32(a[(x&uint64(7))]) + int32(y)) - 10))
}
-var a = [8]LogEst{int16(0), int16(2), int16(3), int16(5), int16(6), int16(7), int16(8), int16(9)} /* sqlite3.c:33027:17 */
+var a = [8]LogEst{int16(0), int16(2), int16(3), int16(5), int16(6), int16(7), int16(8), int16(9)} /* sqlite3.c:33223:17 */
// Convert a double into a LogEst
// In other words, compute an approximation for 10*log2(x).
-func Xsqlite3LogEstFromDouble(tls *libc.TLS, x float64) LogEst { /* sqlite3.c:33050:23: */
+func Xsqlite3LogEstFromDouble(tls *libc.TLS, x float64) LogEst { /* sqlite3.c:33246:23: */
bp := tls.Alloc(16)
defer tls.Free(16)
*(*float64)(unsafe.Pointer(bp + 8)) = x
@@ -19814,7 +20658,7 @@ func Xsqlite3LogEstFromDouble(tls *libc.TLS, x float64) LogEst { /* sqlite3.c:33
//
// Note that this routine is only used when one or more of various
// non-standard compile-time options is enabled.
-func Xsqlite3LogEstToInt(tls *libc.TLS, x LogEst) U64 { /* sqlite3.c:33071:20: */
+func Xsqlite3LogEstToInt(tls *libc.TLS, x LogEst) U64 { /* sqlite3.c:33267:20: */
var n U64
n = (U64(int32(x) % 10))
x = int16(int32(x) / (10))
@@ -19866,7 +20710,7 @@ func Xsqlite3LogEstToInt(tls *libc.TLS, x LogEst) U64 { /* sqlite3.c:33071:20: *
// VList are taken. When that happens, nAlloc is set to zero as an
// indication that the VList may never again be enlarged, since the
// accompanying realloc() would invalidate the pointers.
-func Xsqlite3VListAdd(tls *libc.TLS, db uintptr, pIn uintptr, zName uintptr, nName int32, iVal int32) uintptr { /* sqlite3.c:33125:22: */
+func Xsqlite3VListAdd(tls *libc.TLS, db uintptr, pIn uintptr, zName uintptr, nName int32, iVal int32) uintptr { /* sqlite3.c:33321:22: */
var nInt int32 // number of sizeof(int) objects needed for zName
var z uintptr // Pointer to where zName will be stored
var i int32 // Index in pIn[] where zName is stored
@@ -19898,14 +20742,14 @@ func Xsqlite3VListAdd(tls *libc.TLS, db uintptr, pIn uintptr, zName uintptr, nNa
*(*VList)(unsafe.Pointer(pIn + 1*4)) = (i + nInt)
libc.Xmemcpy(tls, z, zName, uint64(nName))
- *(*int8)(unsafe.Pointer(z + uintptr(nName))) = int8(0)
+ *(*uint8)(unsafe.Pointer(z + uintptr(nName))) = uint8(0)
return pIn
}
// Return a pointer to the name of a variable in the given VList that
// has the value iVal. Or return a NULL if there is no such variable in
// the list
-func Xsqlite3VListNumToName(tls *libc.TLS, pIn uintptr, iVal int32) uintptr { /* sqlite3.c:33163:27: */
+func Xsqlite3VListNumToName(tls *libc.TLS, pIn uintptr, iVal int32) uintptr { /* sqlite3.c:33359:27: */
var i int32
var mx int32
if pIn == uintptr(0) {
@@ -19924,7 +20768,7 @@ func Xsqlite3VListNumToName(tls *libc.TLS, pIn uintptr, iVal int32) uintptr { /*
// Return the number of the variable named zName, if it is in VList.
// or return 0 if there is no such variable.
-func Xsqlite3VListNameToNum(tls *libc.TLS, pIn uintptr, zName uintptr, nName int32) int32 { /* sqlite3.c:33179:20: */
+func Xsqlite3VListNameToNum(tls *libc.TLS, pIn uintptr, zName uintptr, nName int32) int32 { /* sqlite3.c:33375:20: */
var i int32
var mx int32
if pIn == uintptr(0) {
@@ -19934,7 +20778,7 @@ func Xsqlite3VListNameToNum(tls *libc.TLS, pIn uintptr, zName uintptr, nName int
i = 2
for ok := true; ok; ok = (i < mx) {
var z uintptr = (pIn + uintptr((i+2))*4)
- if (libc.Xstrncmp(tls, z, zName, uint64(nName)) == 0) && (int32(*(*int8)(unsafe.Pointer(z + uintptr(nName)))) == 0) {
+ if (libc.Xstrncmp(tls, z, zName, uint64(nName)) == 0) && (int32(*(*uint8)(unsafe.Pointer(z + uintptr(nName)))) == 0) {
return *(*VList)(unsafe.Pointer(pIn + uintptr(i)*4))
}
i = i + (*(*VList)(unsafe.Pointer(pIn + uintptr((i+1))*4)))
@@ -19963,7 +20807,7 @@ func Xsqlite3VListNameToNum(tls *libc.TLS, pIn uintptr, zName uintptr, nName int
// fields of the Hash structure.
//
// "pNew" is a pointer to the hash table that is to be initialized.
-func Xsqlite3HashInit(tls *libc.TLS, pNew uintptr) { /* sqlite3.c:33216:21: */
+func Xsqlite3HashInit(tls *libc.TLS, pNew uintptr) { /* sqlite3.c:33412:21: */
(*Hash)(unsafe.Pointer(pNew)).Ffirst = uintptr(0)
(*Hash)(unsafe.Pointer(pNew)).Fcount = uint32(0)
@@ -19974,7 +20818,7 @@ func Xsqlite3HashInit(tls *libc.TLS, pNew uintptr) { /* sqlite3.c:33216:21: */
// Remove all entries from a hash table. Reclaim all memory.
// Call this routine to delete a hash table or to reset a hash table
// to the empty state.
-func Xsqlite3HashClear(tls *libc.TLS, pH uintptr) { /* sqlite3.c:33228:21: */
+func Xsqlite3HashClear(tls *libc.TLS, pH uintptr) { /* sqlite3.c:33424:21: */
var elem uintptr // For looping over all elements of the table
elem = (*Hash)(unsafe.Pointer(pH)).Ffirst
@@ -19991,10 +20835,10 @@ func Xsqlite3HashClear(tls *libc.TLS, pH uintptr) { /* sqlite3.c:33228:21: */
}
// The hashing function.
-func strHash(tls *libc.TLS, z uintptr) uint32 { /* sqlite3.c:33248:21: */
+func strHash(tls *libc.TLS, z uintptr) uint32 { /* sqlite3.c:33444:21: */
var h uint32 = uint32(0)
var c uint8
- for (int32(libc.AssignUint8(&c, uint8(*(*int8)(unsafe.Pointer(libc.PostIncUintptr(&z, 1))))))) != 0 { //OPTIMIZATION-IF-TRUE
+ for (int32(libc.AssignUint8(&c, uint8(*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&z, 1))))))) != 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.
@@ -20006,7 +20850,7 @@ func strHash(tls *libc.TLS, z uintptr) uint32 { /* sqlite3.c:33248:21: */
// Link pNew element into the hash table pH. If pEntry!=0 then also
// insert pNew into the pEntry hash bucket.
-func insertElement(tls *libc.TLS, pH uintptr, pEntry uintptr, pNew uintptr) { /* sqlite3.c:33265:13: */
+func insertElement(tls *libc.TLS, pH uintptr, pEntry uintptr, pNew uintptr) { /* sqlite3.c:33461:13: */
var pHead uintptr // First element already in pEntry
if pEntry != 0 {
if (*_ht)(unsafe.Pointer(pEntry)).Fcount != 0 {
@@ -20043,7 +20887,7 @@ func insertElement(tls *libc.TLS, pH uintptr, pEntry uintptr, pNew uintptr) { /*
// The hash table might fail to resize if sqlite3_malloc() fails or
// if the new size is the same as the prior size.
// Return TRUE if the resize occurs and false if not.
-func rehash(tls *libc.TLS, pH uintptr, new_size uint32) int32 { /* sqlite3.c:33299:12: */
+func rehash(tls *libc.TLS, pH uintptr, new_size uint32) int32 { /* sqlite3.c:33495:12: */
var new_ht uintptr // The new hash table
var elem uintptr
var next_elem uintptr // For looping over existing elements
@@ -20087,7 +20931,7 @@ func rehash(tls *libc.TLS, pH uintptr, new_size uint32) int32 { /* sqlite3.c:332
// hash table that matches the given key. If no element is found,
// a pointer to a static null element with HashElem.data==0 is returned.
// If pH is not NULL, then the hash for this key is written to *pH.
-func findElementWithHash(tls *libc.TLS, pH uintptr, pKey uintptr, pHash uintptr) uintptr { /* sqlite3.c:33340:17: */
+func findElementWithHash(tls *libc.TLS, pH uintptr, pKey uintptr, pHash uintptr) uintptr { /* sqlite3.c:33536:17: */
var elem uintptr // Used to loop thru the element list
var count uint32 // Number of elements left to test
var h uint32
@@ -20116,11 +20960,11 @@ func findElementWithHash(tls *libc.TLS, pH uintptr, pKey uintptr, pHash uintptr)
return uintptr(unsafe.Pointer(&nullElement))
}
-var nullElement = HashElem{} /* sqlite3.c:33348:19 */
+var nullElement = HashElem{} /* sqlite3.c:33544:19 */
// Remove a single entry from the hash table given a pointer to that
// element and a hash on the element's key.
-func removeElementGivenHash(tls *libc.TLS, pH uintptr, elem uintptr, h uint32) { /* sqlite3.c:33375:13: */
+func removeElementGivenHash(tls *libc.TLS, pH uintptr, elem uintptr, h uint32) { /* sqlite3.c:33571:13: */
var pEntry uintptr
if (*HashElem)(unsafe.Pointer(elem)).Fprev != 0 {
(*HashElem)(unsafe.Pointer((*HashElem)(unsafe.Pointer(elem)).Fprev)).Fnext = (*HashElem)(unsafe.Pointer(elem)).Fnext
@@ -20149,7 +20993,7 @@ func removeElementGivenHash(tls *libc.TLS, pH uintptr, elem uintptr, h uint32) {
// Attempt to locate an element of the hash table pH with a key
// that matches pKey. Return the data for this element if it is
// found, or NULL if there is no match.
-func Xsqlite3HashFind(tls *libc.TLS, pH uintptr, pKey uintptr) uintptr { /* sqlite3.c:33410:21: */
+func Xsqlite3HashFind(tls *libc.TLS, pH uintptr, pKey uintptr) uintptr { /* sqlite3.c:33606:21: */
return (*HashElem)(unsafe.Pointer(findElementWithHash(tls, pH, pKey, uintptr(0)))).Fdata
}
@@ -20167,7 +21011,7 @@ func Xsqlite3HashFind(tls *libc.TLS, pH uintptr, pKey uintptr) uintptr { /* sqli
//
// If the "data" parameter to this function is NULL, then the
// element corresponding to "key" is removed from the hash table.
-func Xsqlite3HashInsert(tls *libc.TLS, pH uintptr, pKey uintptr, data uintptr) uintptr { /* sqlite3.c:33430:21: */
+func Xsqlite3HashInsert(tls *libc.TLS, pH uintptr, pKey uintptr, data uintptr) uintptr { /* sqlite3.c:33626:21: */
bp := tls.Alloc(4)
defer tls.Free(4)
@@ -20216,191 +21060,192 @@ func Xsqlite3HashInsert(tls *libc.TLS, pH uintptr, pKey uintptr, data uintptr) u
//************* Begin file opcodes.c ****************************************
// Automatically generated. Do not edit
// See the tool/mkopcodec.tcl script for details.
-func Xsqlite3OpcodeName(tls *libc.TLS, i int32) uintptr { /* sqlite3.c:33476:27: */
+func Xsqlite3OpcodeName(tls *libc.TLS, i int32) uintptr { /* sqlite3.c:33672:27: */
return azName[i]
}
-var azName = [179]uintptr{
- /* 0 */ ts + 808, /* "Savepoint" */
- /* 1 */ ts + 818, /* "AutoCommit" */
- /* 2 */ ts + 829, /* "Transaction" */
- /* 3 */ ts + 841, /* "SorterNext" */
- /* 4 */ ts + 852, /* "Prev" */
- /* 5 */ ts + 857, /* "Next" */
- /* 6 */ ts + 862, /* "Checkpoint" */
- /* 7 */ ts + 873, /* "JournalMode" */
- /* 8 */ ts + 885, /* "Vacuum" */
- /* 9 */ ts + 892, /* "VFilter" */
- /* 10 */ ts + 900, /* "VUpdate" */
- /* 11 */ ts + 908, /* "Goto" */
- /* 12 */ ts + 913, /* "Gosub" */
- /* 13 */ ts + 919, /* "InitCoroutine" */
- /* 14 */ ts + 933, /* "Yield" */
- /* 15 */ ts + 939, /* "MustBeInt" */
- /* 16 */ ts + 949, /* "Jump" */
- /* 17 */ ts + 954, /* "Once" */
- /* 18 */ ts + 959, /* "If" */
- /* 19 */ ts + 962, /* "Not" */
- /* 20 */ ts + 966, /* "IfNot" */
- /* 21 */ ts + 972, /* "IfNullRow" */
- /* 22 */ ts + 982, /* "SeekLT" */
- /* 23 */ ts + 989, /* "SeekLE" */
- /* 24 */ ts + 996, /* "SeekGE" */
- /* 25 */ ts + 1003, /* "SeekGT" */
- /* 26 */ ts + 1010, /* "IfNotOpen" */
- /* 27 */ ts + 1020, /* "IfNoHope" */
- /* 28 */ ts + 1029, /* "NoConflict" */
- /* 29 */ ts + 1040, /* "NotFound" */
- /* 30 */ ts + 1049, /* "Found" */
- /* 31 */ ts + 1055, /* "SeekRowid" */
- /* 32 */ ts + 1065, /* "NotExists" */
- /* 33 */ ts + 1075, /* "Last" */
- /* 34 */ ts + 1080, /* "IfSmaller" */
- /* 35 */ ts + 1090, /* "SorterSort" */
- /* 36 */ ts + 1101, /* "Sort" */
- /* 37 */ ts + 1106, /* "Rewind" */
- /* 38 */ ts + 1113, /* "IdxLE" */
- /* 39 */ ts + 1119, /* "IdxGT" */
- /* 40 */ ts + 1125, /* "IdxLT" */
- /* 41 */ ts + 1131, /* "IdxGE" */
- /* 42 */ ts + 1137, /* "RowSetRead" */
- /* 43 */ ts + 1148, /* "Or" */
- /* 44 */ ts + 1151, /* "And" */
- /* 45 */ ts + 1155, /* "RowSetTest" */
- /* 46 */ ts + 1166, /* "Program" */
- /* 47 */ ts + 1174, /* "FkIfZero" */
- /* 48 */ ts + 1183, /* "IfPos" */
- /* 49 */ ts + 1189, /* "IfNotZero" */
- /* 50 */ ts + 1199, /* "IsNull" */
- /* 51 */ ts + 1206, /* "NotNull" */
- /* 52 */ ts + 1214, /* "Ne" */
- /* 53 */ ts + 1217, /* "Eq" */
- /* 54 */ ts + 1220, /* "Gt" */
- /* 55 */ ts + 1223, /* "Le" */
- /* 56 */ ts + 1226, /* "Lt" */
- /* 57 */ ts + 1229, /* "Ge" */
- /* 58 */ ts + 1232, /* "ElseNotEq" */
- /* 59 */ ts + 1242, /* "DecrJumpZero" */
- /* 60 */ ts + 1255, /* "IncrVacuum" */
- /* 61 */ ts + 1266, /* "VNext" */
- /* 62 */ ts + 1272, /* "Init" */
- /* 63 */ ts + 1277, /* "PureFunc" */
- /* 64 */ ts + 1286, /* "Function" */
- /* 65 */ ts + 1295, /* "Return" */
- /* 66 */ ts + 1302, /* "EndCoroutine" */
- /* 67 */ ts + 1315, /* "HaltIfNull" */
- /* 68 */ ts + 1326, /* "Halt" */
- /* 69 */ ts + 1331, /* "Integer" */
- /* 70 */ ts + 1339, /* "Int64" */
- /* 71 */ ts + 1345, /* "String" */
- /* 72 */ ts + 1352, /* "Null" */
- /* 73 */ ts + 1357, /* "SoftNull" */
- /* 74 */ ts + 1366, /* "Blob" */
- /* 75 */ ts + 1371, /* "Variable" */
- /* 76 */ ts + 1380, /* "Move" */
- /* 77 */ ts + 1385, /* "Copy" */
- /* 78 */ ts + 1390, /* "SCopy" */
- /* 79 */ ts + 1396, /* "IntCopy" */
- /* 80 */ ts + 1404, /* "ChngCntRow" */
- /* 81 */ ts + 1415, /* "ResultRow" */
- /* 82 */ ts + 1425, /* "CollSeq" */
- /* 83 */ ts + 1433, /* "AddImm" */
- /* 84 */ ts + 1440, /* "RealAffinity" */
- /* 85 */ ts + 1453, /* "Cast" */
- /* 86 */ ts + 1458, /* "Permutation" */
- /* 87 */ ts + 1470, /* "Compare" */
- /* 88 */ ts + 1478, /* "IsTrue" */
- /* 89 */ ts + 1485, /* "Offset" */
- /* 90 */ ts + 1492, /* "Column" */
- /* 91 */ ts + 1499, /* "Affinity" */
- /* 92 */ ts + 1508, /* "MakeRecord" */
- /* 93 */ ts + 1519, /* "Count" */
- /* 94 */ ts + 1525, /* "ReadCookie" */
- /* 95 */ ts + 1536, /* "SetCookie" */
- /* 96 */ ts + 1546, /* "ReopenIdx" */
- /* 97 */ ts + 1556, /* "OpenRead" */
- /* 98 */ ts + 1565, /* "OpenWrite" */
- /* 99 */ ts + 1575, /* "OpenDup" */
- /* 100 */ ts + 1583, /* "OpenAutoindex" */
- /* 101 */ ts + 1597, /* "OpenEphemeral" */
- /* 102 */ ts + 1611, /* "BitAnd" */
- /* 103 */ ts + 1618, /* "BitOr" */
- /* 104 */ ts + 1624, /* "ShiftLeft" */
- /* 105 */ ts + 1634, /* "ShiftRight" */
- /* 106 */ ts + 1645, /* "Add" */
- /* 107 */ ts + 1649, /* "Subtract" */
- /* 108 */ ts + 1658, /* "Multiply" */
- /* 109 */ ts + 1667, /* "Divide" */
- /* 110 */ ts + 1674, /* "Remainder" */
- /* 111 */ ts + 1684, /* "Concat" */
- /* 112 */ ts + 1691, /* "SorterOpen" */
- /* 113 */ ts + 1702, /* "BitNot" */
- /* 114 */ ts + 1709, /* "SequenceTest" */
- /* 115 */ ts + 1722, /* "OpenPseudo" */
- /* 116 */ ts + 1733, /* "String8" */
- /* 117 */ ts + 1741, /* "Close" */
- /* 118 */ ts + 1747, /* "ColumnsUsed" */
- /* 119 */ ts + 1759, /* "SeekScan" */
- /* 120 */ ts + 1768, /* "SeekHit" */
- /* 121 */ ts + 1776, /* "Sequence" */
- /* 122 */ ts + 1785, /* "NewRowid" */
- /* 123 */ ts + 1794, /* "Insert" */
- /* 124 */ ts + 1801, /* "RowCell" */
- /* 125 */ ts + 1809, /* "Delete" */
- /* 126 */ ts + 1816, /* "ResetCount" */
- /* 127 */ ts + 1827, /* "SorterCompare" */
- /* 128 */ ts + 1841, /* "SorterData" */
- /* 129 */ ts + 1852, /* "RowData" */
- /* 130 */ ts + 1860, /* "Rowid" */
- /* 131 */ ts + 1866, /* "NullRow" */
- /* 132 */ ts + 1874, /* "SeekEnd" */
- /* 133 */ ts + 1882, /* "IdxInsert" */
- /* 134 */ ts + 1892, /* "SorterInsert" */
- /* 135 */ ts + 1905, /* "IdxDelete" */
- /* 136 */ ts + 1915, /* "DeferredSeek" */
- /* 137 */ ts + 1928, /* "IdxRowid" */
- /* 138 */ ts + 1937, /* "FinishSeek" */
- /* 139 */ ts + 1948, /* "Destroy" */
- /* 140 */ ts + 1956, /* "Clear" */
- /* 141 */ ts + 1962, /* "ResetSorter" */
- /* 142 */ ts + 1974, /* "CreateBtree" */
- /* 143 */ ts + 1986, /* "SqlExec" */
- /* 144 */ ts + 1994, /* "ParseSchema" */
- /* 145 */ ts + 2006, /* "LoadAnalysis" */
- /* 146 */ ts + 2019, /* "DropTable" */
- /* 147 */ ts + 2029, /* "DropIndex" */
- /* 148 */ ts + 2039, /* "DropTrigger" */
- /* 149 */ ts + 2051, /* "IntegrityCk" */
- /* 150 */ ts + 2063, /* "RowSetAdd" */
- /* 151 */ ts + 2073, /* "Param" */
- /* 152 */ ts + 2079, /* "Real" */
- /* 153 */ ts + 2084, /* "FkCounter" */
- /* 154 */ ts + 2094, /* "MemMax" */
- /* 155 */ ts + 2101, /* "OffsetLimit" */
- /* 156 */ ts + 2113, /* "AggInverse" */
- /* 157 */ ts + 2124, /* "AggStep" */
- /* 158 */ ts + 2132, /* "AggStep1" */
- /* 159 */ ts + 2141, /* "AggValue" */
- /* 160 */ ts + 2150, /* "AggFinal" */
- /* 161 */ ts + 2159, /* "Expire" */
- /* 162 */ ts + 2166, /* "CursorLock" */
- /* 163 */ ts + 2177, /* "CursorUnlock" */
- /* 164 */ ts + 2190, /* "TableLock" */
- /* 165 */ ts + 2200, /* "VBegin" */
- /* 166 */ ts + 2207, /* "VCreate" */
- /* 167 */ ts + 2215, /* "VDestroy" */
- /* 168 */ ts + 2224, /* "VOpen" */
- /* 169 */ ts + 2230, /* "VColumn" */
- /* 170 */ ts + 2238, /* "VRename" */
- /* 171 */ ts + 2246, /* "Pagecount" */
- /* 172 */ ts + 2256, /* "MaxPgcnt" */
- /* 173 */ ts + 2265, /* "Trace" */
- /* 174 */ ts + 2271, /* "CursorHint" */
- /* 175 */ ts + 2282, /* "ReleaseReg" */
- /* 176 */ ts + 2293, /* "Noop" */
- /* 177 */ ts + 2298, /* "Explain" */
- /* 178 */ ts + 2306, /* "Abortable" */
-} /* sqlite3.c:33477:20 */
+var azName = [180]uintptr{
+ /* 0 */ ts + 872, /* "Savepoint" */
+ /* 1 */ ts + 882, /* "AutoCommit" */
+ /* 2 */ ts + 893, /* "Transaction" */
+ /* 3 */ ts + 905, /* "SorterNext" */
+ /* 4 */ ts + 916, /* "Prev" */
+ /* 5 */ ts + 921, /* "Next" */
+ /* 6 */ ts + 926, /* "Checkpoint" */
+ /* 7 */ ts + 937, /* "JournalMode" */
+ /* 8 */ ts + 949, /* "Vacuum" */
+ /* 9 */ ts + 956, /* "VFilter" */
+ /* 10 */ ts + 964, /* "VUpdate" */
+ /* 11 */ ts + 972, /* "Goto" */
+ /* 12 */ ts + 977, /* "Gosub" */
+ /* 13 */ ts + 983, /* "InitCoroutine" */
+ /* 14 */ ts + 997, /* "Yield" */
+ /* 15 */ ts + 1003, /* "MustBeInt" */
+ /* 16 */ ts + 1013, /* "Jump" */
+ /* 17 */ ts + 1018, /* "Once" */
+ /* 18 */ ts + 1023, /* "If" */
+ /* 19 */ ts + 1026, /* "Not" */
+ /* 20 */ ts + 1030, /* "IfNot" */
+ /* 21 */ ts + 1036, /* "IfNullRow" */
+ /* 22 */ ts + 1046, /* "SeekLT" */
+ /* 23 */ ts + 1053, /* "SeekLE" */
+ /* 24 */ ts + 1060, /* "SeekGE" */
+ /* 25 */ ts + 1067, /* "SeekGT" */
+ /* 26 */ ts + 1074, /* "IfNotOpen" */
+ /* 27 */ ts + 1084, /* "IfNoHope" */
+ /* 28 */ ts + 1093, /* "NoConflict" */
+ /* 29 */ ts + 1104, /* "NotFound" */
+ /* 30 */ ts + 1113, /* "Found" */
+ /* 31 */ ts + 1119, /* "SeekRowid" */
+ /* 32 */ ts + 1129, /* "NotExists" */
+ /* 33 */ ts + 1139, /* "Last" */
+ /* 34 */ ts + 1144, /* "IfSmaller" */
+ /* 35 */ ts + 1154, /* "SorterSort" */
+ /* 36 */ ts + 1165, /* "Sort" */
+ /* 37 */ ts + 1170, /* "Rewind" */
+ /* 38 */ ts + 1177, /* "IdxLE" */
+ /* 39 */ ts + 1183, /* "IdxGT" */
+ /* 40 */ ts + 1189, /* "IdxLT" */
+ /* 41 */ ts + 1195, /* "IdxGE" */
+ /* 42 */ ts + 1201, /* "RowSetRead" */
+ /* 43 */ ts + 1212, /* "Or" */
+ /* 44 */ ts + 1215, /* "And" */
+ /* 45 */ ts + 1219, /* "RowSetTest" */
+ /* 46 */ ts + 1230, /* "Program" */
+ /* 47 */ ts + 1238, /* "FkIfZero" */
+ /* 48 */ ts + 1247, /* "IfPos" */
+ /* 49 */ ts + 1253, /* "IfNotZero" */
+ /* 50 */ ts + 1263, /* "IsNull" */
+ /* 51 */ ts + 1270, /* "NotNull" */
+ /* 52 */ ts + 1278, /* "Ne" */
+ /* 53 */ ts + 1281, /* "Eq" */
+ /* 54 */ ts + 1284, /* "Gt" */
+ /* 55 */ ts + 1287, /* "Le" */
+ /* 56 */ ts + 1290, /* "Lt" */
+ /* 57 */ ts + 1293, /* "Ge" */
+ /* 58 */ ts + 1296, /* "ElseEq" */
+ /* 59 */ ts + 1303, /* "DecrJumpZero" */
+ /* 60 */ ts + 1316, /* "IncrVacuum" */
+ /* 61 */ ts + 1327, /* "VNext" */
+ /* 62 */ ts + 1333, /* "Init" */
+ /* 63 */ ts + 1338, /* "PureFunc" */
+ /* 64 */ ts + 1347, /* "Function" */
+ /* 65 */ ts + 1356, /* "Return" */
+ /* 66 */ ts + 1363, /* "EndCoroutine" */
+ /* 67 */ ts + 1376, /* "HaltIfNull" */
+ /* 68 */ ts + 1387, /* "Halt" */
+ /* 69 */ ts + 1392, /* "Integer" */
+ /* 70 */ ts + 1400, /* "Int64" */
+ /* 71 */ ts + 1406, /* "String" */
+ /* 72 */ ts + 1413, /* "Null" */
+ /* 73 */ ts + 1418, /* "SoftNull" */
+ /* 74 */ ts + 1427, /* "Blob" */
+ /* 75 */ ts + 1432, /* "Variable" */
+ /* 76 */ ts + 1441, /* "Move" */
+ /* 77 */ ts + 1446, /* "Copy" */
+ /* 78 */ ts + 1451, /* "SCopy" */
+ /* 79 */ ts + 1457, /* "IntCopy" */
+ /* 80 */ ts + 1465, /* "ChngCntRow" */
+ /* 81 */ ts + 1476, /* "ResultRow" */
+ /* 82 */ ts + 1486, /* "CollSeq" */
+ /* 83 */ ts + 1494, /* "AddImm" */
+ /* 84 */ ts + 1501, /* "RealAffinity" */
+ /* 85 */ ts + 1514, /* "Cast" */
+ /* 86 */ ts + 1519, /* "Permutation" */
+ /* 87 */ ts + 1531, /* "Compare" */
+ /* 88 */ ts + 1539, /* "IsTrue" */
+ /* 89 */ ts + 1546, /* "ZeroOrNull" */
+ /* 90 */ ts + 1557, /* "Offset" */
+ /* 91 */ ts + 1564, /* "Column" */
+ /* 92 */ ts + 1571, /* "Affinity" */
+ /* 93 */ ts + 1580, /* "MakeRecord" */
+ /* 94 */ ts + 1591, /* "Count" */
+ /* 95 */ ts + 1597, /* "ReadCookie" */
+ /* 96 */ ts + 1608, /* "SetCookie" */
+ /* 97 */ ts + 1618, /* "ReopenIdx" */
+ /* 98 */ ts + 1628, /* "OpenRead" */
+ /* 99 */ ts + 1637, /* "OpenWrite" */
+ /* 100 */ ts + 1647, /* "OpenDup" */
+ /* 101 */ ts + 1655, /* "OpenAutoindex" */
+ /* 102 */ ts + 1669, /* "BitAnd" */
+ /* 103 */ ts + 1676, /* "BitOr" */
+ /* 104 */ ts + 1682, /* "ShiftLeft" */
+ /* 105 */ ts + 1692, /* "ShiftRight" */
+ /* 106 */ ts + 1703, /* "Add" */
+ /* 107 */ ts + 1707, /* "Subtract" */
+ /* 108 */ ts + 1716, /* "Multiply" */
+ /* 109 */ ts + 1725, /* "Divide" */
+ /* 110 */ ts + 1732, /* "Remainder" */
+ /* 111 */ ts + 1742, /* "Concat" */
+ /* 112 */ ts + 1749, /* "OpenEphemeral" */
+ /* 113 */ ts + 1763, /* "BitNot" */
+ /* 114 */ ts + 1770, /* "SorterOpen" */
+ /* 115 */ ts + 1781, /* "SequenceTest" */
+ /* 116 */ ts + 1794, /* "String8" */
+ /* 117 */ ts + 1802, /* "OpenPseudo" */
+ /* 118 */ ts + 1813, /* "Close" */
+ /* 119 */ ts + 1819, /* "ColumnsUsed" */
+ /* 120 */ ts + 1831, /* "SeekScan" */
+ /* 121 */ ts + 1840, /* "SeekHit" */
+ /* 122 */ ts + 1848, /* "Sequence" */
+ /* 123 */ ts + 1857, /* "NewRowid" */
+ /* 124 */ ts + 1866, /* "Insert" */
+ /* 125 */ ts + 1873, /* "RowCell" */
+ /* 126 */ ts + 1881, /* "Delete" */
+ /* 127 */ ts + 1888, /* "ResetCount" */
+ /* 128 */ ts + 1899, /* "SorterCompare" */
+ /* 129 */ ts + 1913, /* "SorterData" */
+ /* 130 */ ts + 1924, /* "RowData" */
+ /* 131 */ ts + 1932, /* "Rowid" */
+ /* 132 */ ts + 1938, /* "NullRow" */
+ /* 133 */ ts + 1946, /* "SeekEnd" */
+ /* 134 */ ts + 1954, /* "IdxInsert" */
+ /* 135 */ ts + 1964, /* "SorterInsert" */
+ /* 136 */ ts + 1977, /* "IdxDelete" */
+ /* 137 */ ts + 1987, /* "DeferredSeek" */
+ /* 138 */ ts + 2000, /* "IdxRowid" */
+ /* 139 */ ts + 2009, /* "FinishSeek" */
+ /* 140 */ ts + 2020, /* "Destroy" */
+ /* 141 */ ts + 2028, /* "Clear" */
+ /* 142 */ ts + 2034, /* "ResetSorter" */
+ /* 143 */ ts + 2046, /* "CreateBtree" */
+ /* 144 */ ts + 2058, /* "SqlExec" */
+ /* 145 */ ts + 2066, /* "ParseSchema" */
+ /* 146 */ ts + 2078, /* "LoadAnalysis" */
+ /* 147 */ ts + 2091, /* "DropTable" */
+ /* 148 */ ts + 2101, /* "DropIndex" */
+ /* 149 */ ts + 2111, /* "DropTrigger" */
+ /* 150 */ ts + 2123, /* "IntegrityCk" */
+ /* 151 */ ts + 2135, /* "RowSetAdd" */
+ /* 152 */ ts + 2145, /* "Real" */
+ /* 153 */ ts + 2150, /* "Param" */
+ /* 154 */ ts + 2156, /* "FkCounter" */
+ /* 155 */ ts + 2166, /* "MemMax" */
+ /* 156 */ ts + 2173, /* "OffsetLimit" */
+ /* 157 */ ts + 2185, /* "AggInverse" */
+ /* 158 */ ts + 2196, /* "AggStep" */
+ /* 159 */ ts + 2204, /* "AggStep1" */
+ /* 160 */ ts + 2213, /* "AggValue" */
+ /* 161 */ ts + 2222, /* "AggFinal" */
+ /* 162 */ ts + 2231, /* "Expire" */
+ /* 163 */ ts + 2238, /* "CursorLock" */
+ /* 164 */ ts + 2249, /* "CursorUnlock" */
+ /* 165 */ ts + 2262, /* "TableLock" */
+ /* 166 */ ts + 2272, /* "VBegin" */
+ /* 167 */ ts + 2279, /* "VCreate" */
+ /* 168 */ ts + 2287, /* "VDestroy" */
+ /* 169 */ ts + 2296, /* "VOpen" */
+ /* 170 */ ts + 2302, /* "VColumn" */
+ /* 171 */ ts + 2310, /* "VRename" */
+ /* 172 */ ts + 2318, /* "Pagecount" */
+ /* 173 */ ts + 2328, /* "MaxPgcnt" */
+ /* 174 */ ts + 2337, /* "Trace" */
+ /* 175 */ ts + 2343, /* "CursorHint" */
+ /* 176 */ ts + 2354, /* "ReleaseReg" */
+ /* 177 */ ts + 2365, /* "Noop" */
+ /* 178 */ ts + 2370, /* "Explain" */
+ /* 179 */ ts + 2378, /* "Abortable" */
+} /* sqlite3.c:33673:20 */
//************* End of opcodes.c ********************************************
//************* Begin file os_unix.c ****************************************
@@ -20468,7 +21313,7 @@ var azName = [179]uintptr{
// Use pread() and pwrite() if they are available
// standard include files.
-// Copyright (C) 1991-2018 Free Software Foundation, Inc.
+// Copyright (C) 1991-2020 Free Software Foundation, Inc.
// This file is part of the GNU C Library.
//
// The GNU C Library is free software; you can redistribute it and/or
@@ -20483,11 +21328,11 @@ var azName = [179]uintptr{
//
// You should have received a copy of the GNU Lesser General Public
// License along with the GNU C Library; if not, see
-// .
+// .
// POSIX Standard: 2.6 Primitive System Data Types
-// Copyright (C) 1991-2018 Free Software Foundation, Inc.
+// Copyright (C) 1991-2020 Free Software Foundation, Inc.
// This file is part of the GNU C Library.
//
// The GNU C Library is free software; you can redistribute it and/or
@@ -20502,11 +21347,11 @@ var azName = [179]uintptr{
//
// You should have received a copy of the GNU Lesser General Public
// License along with the GNU C Library; if not, see
-// .
+// .
// POSIX Standard: 5.6 File Characteristics
-// Copyright (C) 1991-2018 Free Software Foundation, Inc.
+// Copyright (C) 1991-2020 Free Software Foundation, Inc.
// This file is part of the GNU C Library.
//
// The GNU C Library is free software; you can redistribute it and/or
@@ -20521,10 +21366,10 @@ var azName = [179]uintptr{
//
// You should have received a copy of the GNU Lesser General Public
// License along with the GNU C Library; if not, see
-// .
+// .
// bits/types.h -- definitions of __*_t types underlying *_t types.
-// Copyright (C) 2002-2018 Free Software Foundation, Inc.
+// Copyright (C) 2002-2020 Free Software Foundation, Inc.
// This file is part of the GNU C Library.
//
// The GNU C Library is free software; you can redistribute it and/or
@@ -20539,7 +21384,7 @@ var azName = [179]uintptr{
//
// You should have received a copy of the GNU Lesser General Public
// License along with the GNU C Library; if not, see
-// .
+// .
// Never include this file directly; use instead.
@@ -20548,7 +21393,7 @@ var azName = [179]uintptr{
// The Single Unix specification says that some more types are
// available here.
-// Copyright (C) 2000-2018 Free Software Foundation, Inc.
+// Copyright (C) 2000-2020 Free Software Foundation, Inc.
// This file is part of the GNU C Library.
//
// The GNU C Library is free software; you can redistribute it and/or
@@ -20563,7 +21408,7 @@ var azName = [179]uintptr{
//
// You should have received a copy of the GNU Lesser General Public
// License along with the GNU C Library; if not, see
-// .
+// .
// Determine the wordsize from the preprocessor defines.
@@ -20626,8 +21471,8 @@ type stat64 = struct {
F__glibc_reserved [3]int64
} /* stat.h:147:1 */
-// statx-related definitions and declarations.
-// Copyright (C) 2018 Free Software Foundation, Inc.
+// statx-related definitions and declarations. Linux version.
+// Copyright (C) 2018-2020 Free Software Foundation, Inc.
// This file is part of the GNU C Library.
//
// The GNU C Library is free software; you can redistribute it and/or
@@ -20642,61 +21487,262 @@ type stat64 = struct {
//
// You should have received a copy of the GNU Lesser General Public
// License along with the GNU C Library; if not, see
-// .
+// .
// This interface is based on in Linux.
+// Use the Linux kernel header if available.
+
+// Use "" to work around incorrect macro expansion of the
+// __has_include argument (GCC PR 80005).
+// SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note
+
+// SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note
+
+// SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note
+// S390 version
+//
+// Derived from "include/asm-i386/types.h"
+
+// SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note
+// asm-generic/int-ll64.h
+//
+// Integer declarations for architectures which use "long long"
+// for 64-bit types.
+
+// SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note
+
+// SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note
+
+// There seems to be no way of detecting this automatically from user
+// space, so 64 bit architectures should override this in their
+// bitsperlong.h. In particular, an architecture that supports
+// both 32 and 64 bit user space must not rely on CONFIG_64BIT
+// to decide it, but rather check a compiler provided macro.
+
+// __xx is ok: it doesn't pollute the POSIX namespace. Use these in the
+// header files exported to user space
+
+type X__s8 = int8 /* int-ll64.h:20:25 */
+type X__u8 = uint8 /* int-ll64.h:21:23 */
+
+type X__s16 = int16 /* int-ll64.h:23:26 */
+type X__u16 = uint16 /* int-ll64.h:24:24 */
+
+type X__s32 = int32 /* int-ll64.h:26:24 */
+type X__u32 = uint32 /* int-ll64.h:27:22 */
+
+type X__s64 = int64 /* int-ll64.h:30:44 */
+type X__u64 = uint64 /* int-ll64.h:31:42 */
+
+// A address type so that arithmetic can be done on it & it can be upgraded to
+// 64 bit when necessary
+type Addr_t = uint64 /* types.h:18:23 */
+type Saddr_t = int64 /* types.h:19:25 */
+
+type X__vector128 = struct{ Fu [4]X__u32 } /* types.h:23:3 */
+
+// SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note
+
+// SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note
+
+// This allows for 1024 file descriptors: if NR_OPEN is ever grown
+// beyond that you'll have to change this too. But 1024 fd's seem to be
+// enough even for such "real" unices like OSF/1, so hopefully this is
+// one limit that doesn't have to be changed [again].
+//
+// Note that POSIX wants the FD_CLEAR(fd,fdsetp) defines to be in
+// (and thus ) - but this is a more logical
+// place for them. Solved by having dummy defines in .
+
+// This macro may have been defined in . But we always
+// use the one here.
+
+type X__kernel_fd_set = struct{ Ffds_bits [16]uint64 } /* posix_types.h:27:3 */
+
+// Type of a signal handler.
+type X__kernel_sighandler_t = uintptr /* posix_types.h:30:14 */
+
+// Type of a SYSV IPC key.
+type X__kernel_key_t = int32 /* posix_types.h:33:13 */
+type X__kernel_mqd_t = int32 /* posix_types.h:34:13 */
+
+// SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note
+// S390 version
+//
+
+// This file is generally used by user-level software, so you need to
+// be a little careful about namespace pollution etc. Also, we cannot
+// assume GCC is being used.
+
+type X__kernel_size_t = uint64 /* posix_types.h:16:25 */
+type X__kernel_ssize_t = int64 /* posix_types.h:17:25 */
+
+type X__kernel_old_dev_t = uint16 /* posix_types.h:20:24 */
+
+type X__kernel_ino_t = uint32 /* posix_types.h:35:25 */
+type X__kernel_mode_t = uint32 /* posix_types.h:36:25 */
+type X__kernel_ipc_pid_t = int32 /* posix_types.h:37:25 */
+type X__kernel_uid_t = uint32 /* posix_types.h:38:25 */
+type X__kernel_gid_t = uint32 /* posix_types.h:39:25 */
+type X__kernel_ptrdiff_t = int64 /* posix_types.h:40:25 */
+type X__kernel_sigset_t = uint64 /* posix_types.h:41:25 */ // at least 32 bits
+
+// SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note
+
+// SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note
+
+// This file is generally used by user-level software, so you need to
+// be a little careful about namespace pollution etc.
+//
+// First the types that are often defined in different ways across
+// architectures, so that you can override them.
+
+type X__kernel_long_t = int64 /* posix_types.h:15:15 */
+type X__kernel_ulong_t = uint64 /* posix_types.h:16:23 */
+
+type X__kernel_pid_t = int32 /* posix_types.h:28:14 */
+
+type X__kernel_suseconds_t = X__kernel_long_t /* posix_types.h:41:26 */
+
+type X__kernel_daddr_t = int32 /* posix_types.h:45:14 */
+
+type X__kernel_uid32_t = uint32 /* posix_types.h:49:22 */
+type X__kernel_gid32_t = uint32 /* posix_types.h:50:22 */
+
+type X__kernel_old_uid_t = X__kernel_uid_t /* posix_types.h:54:24 */
+type X__kernel_old_gid_t = X__kernel_gid_t /* posix_types.h:55:24 */
+
+// Most 32 bit architectures use "unsigned int" size_t,
+// and all 64 bit architectures use "unsigned long" size_t.
+
+type X__kernel_fsid_t = struct{ Fval [2]int32 } /* posix_types.h:81:3 */
+
+// anything below here should be completely generic
+type X__kernel_off_t = X__kernel_long_t /* posix_types.h:87:25 */
+type X__kernel_loff_t = int64 /* posix_types.h:88:19 */
+type X__kernel_time_t = X__kernel_long_t /* posix_types.h:89:25 */
+type X__kernel_time64_t = int64 /* posix_types.h:90:19 */
+type X__kernel_clock_t = X__kernel_long_t /* posix_types.h:91:25 */
+type X__kernel_timer_t = int32 /* posix_types.h:92:14 */
+type X__kernel_clockid_t = int32 /* posix_types.h:93:14 */
+type X__kernel_caddr_t = uintptr /* posix_types.h:94:14 */
+type X__kernel_uid16_t = uint16 /* posix_types.h:95:24 */
+type X__kernel_gid16_t = uint16 /* posix_types.h:96:24 */
+
+// Below are truly Linux-specific types that should never collide with
+// any application/library that wants linux/types.h.
+
+type X__le16 = X__u16 /* types.h:24:25 */
+type X__be16 = X__u16 /* types.h:25:25 */
+type X__le32 = X__u32 /* types.h:26:25 */
+type X__be32 = X__u32 /* types.h:27:25 */
+type X__le64 = X__u64 /* types.h:28:25 */
+type X__be64 = X__u64 /* types.h:29:25 */
+
+type X__sum16 = X__u16 /* types.h:31:25 */
+type X__wsum = X__u32 /* types.h:32:25 */
+
+// aligned_u64 should be used in defining kernel<->userspace ABIs to avoid
+// common 32/64-bit compat problems.
+// 64-bit values align to 4-byte boundaries on x86_32 (and possibly other
+// architectures) and to 8-byte boundaries on 64-bit architectures. The new
+// aligned_64 type enforces 8-byte alignment so that structs containing
+// aligned_64 values have the same alignment on 32-bit and 64-bit architectures.
+// No conversions are necessary between 32-bit user-space and a 64-bit kernel.
+
+type X__poll_t = uint32 /* types.h:47:28 */
+
+// Timestamp structure for the timestamps in struct statx.
+//
+// tv_sec holds the number of seconds before (negative) or after (positive)
+// 00:00:00 1st January 1970 UTC.
+//
+// tv_nsec holds a number of nanoseconds (0..999,999,999) after the tv_sec time.
+//
+// __reserved is held in case we need a yet finer resolution.
type statx_timestamp = struct {
- Ftv_sec X__int64_t
- Ftv_nsec X__uint32_t
- F__statx_timestamp_pad1 [1]X__int32_t
-} /* statx.h:25:1 */
-
-// Warning: The kernel may add additional fields to this struct in the
-// future. Only use this struct for calling the statx function, not
-// for storing data. (Expansion will be controlled by the mask
-// argument of the statx function.)
+ Ftv_sec X__s64
+ Ftv_nsec X__u32
+ F__reserved X__s32
+} /* stat.h:56:1 */
+
+// Structures for the extended file attribute retrieval system call
+// (statx()).
+//
+// The caller passes a mask of what they're specifically interested in as a
+// parameter to statx(). What statx() actually got will be indicated in
+// st_mask upon return.
+//
+// For each bit in the mask argument:
+//
+// - if the datum is not supported:
+//
+// - the bit will be cleared, and
+//
+// - the datum will be set to an appropriate fabricated value if one is
+// available (eg. CIFS can take a default uid and gid), otherwise
+//
+// - the field will be cleared;
+//
+// - otherwise, if explicitly requested:
+//
+// - the datum will be synchronised to the server if AT_STATX_FORCE_SYNC is
+// set or if the datum is considered out of date, and
+//
+// - the field will be filled in and the bit will be set;
+//
+// - otherwise, if not requested, but available in approximate form without any
+// effort, it will be filled in anyway, and the bit will be set upon return
+// (it might not be up to date, however, and no attempt will be made to
+// synchronise the internal state first);
+//
+// - otherwise the field and the bit will be cleared before returning.
+//
+// Items in STATX_BASIC_STATS may be marked unavailable on return, but they
+// will have values installed for compatibility purposes so that stat() and
+// co. can be emulated in userspace.
type statx = struct {
- Fstx_mask X__uint32_t
- Fstx_blksize X__uint32_t
- Fstx_attributes X__uint64_t
- Fstx_nlink X__uint32_t
- Fstx_uid X__uint32_t
- Fstx_gid X__uint32_t
- Fstx_mode X__uint16_t
- F__statx_pad1 [1]X__uint16_t
- Fstx_ino X__uint64_t
- Fstx_size X__uint64_t
- Fstx_blocks X__uint64_t
- Fstx_attributes_mask X__uint64_t
+ Fstx_mask X__u32
+ Fstx_blksize X__u32
+ Fstx_attributes X__u64
+ Fstx_nlink X__u32
+ Fstx_uid X__u32
+ Fstx_gid X__u32
+ Fstx_mode X__u16
+ F__spare0 [1]X__u16
+ Fstx_ino X__u64
+ Fstx_size X__u64
+ Fstx_blocks X__u64
+ Fstx_attributes_mask X__u64
Fstx_atime struct {
- Ftv_sec X__int64_t
- Ftv_nsec X__uint32_t
- F__statx_timestamp_pad1 [1]X__int32_t
+ Ftv_sec X__s64
+ Ftv_nsec X__u32
+ F__reserved X__s32
}
Fstx_btime struct {
- Ftv_sec X__int64_t
- Ftv_nsec X__uint32_t
- F__statx_timestamp_pad1 [1]X__int32_t
+ Ftv_sec X__s64
+ Ftv_nsec X__u32
+ F__reserved X__s32
}
Fstx_ctime struct {
- Ftv_sec X__int64_t
- Ftv_nsec X__uint32_t
- F__statx_timestamp_pad1 [1]X__int32_t
+ Ftv_sec X__s64
+ Ftv_nsec X__u32
+ F__reserved X__s32
}
Fstx_mtime struct {
- Ftv_sec X__int64_t
- Ftv_nsec X__uint32_t
- F__statx_timestamp_pad1 [1]X__int32_t
- }
- Fstx_rdev_major X__uint32_t
- Fstx_rdev_minor X__uint32_t
- Fstx_dev_major X__uint32_t
- Fstx_dev_minor X__uint32_t
- F__statx_pad2 [14]X__uint64_t
-} /* statx.h:36:1 */
-
-// Copyright (C) 1991-2018 Free Software Foundation, Inc.
+ Ftv_sec X__s64
+ Ftv_nsec X__u32
+ F__reserved X__s32
+ }
+ Fstx_rdev_major X__u32
+ Fstx_rdev_minor X__u32
+ Fstx_dev_major X__u32
+ Fstx_dev_minor X__u32
+ F__spare2 [14]X__u64
+} /* stat.h:99:1 */
+
+// Copyright (C) 1991-2020 Free Software Foundation, Inc.
// This file is part of the GNU C Library.
//
// The GNU C Library is free software; you can redistribute it and/or
@@ -20711,11 +21757,11 @@ type statx = struct {
//
// You should have received a copy of the GNU Lesser General Public
// License along with the GNU C Library; if not, see
-// .
+// .
// POSIX Standard: 6.5 File Control Operations
-// Copyright (C) 1991-2018 Free Software Foundation, Inc.
+// Copyright (C) 1991-2020 Free Software Foundation, Inc.
// This file is part of the GNU C Library.
//
// The GNU C Library is free software; you can redistribute it and/or
@@ -20730,13 +21776,13 @@ type statx = struct {
//
// You should have received a copy of the GNU Lesser General Public
// License along with the GNU C Library; if not, see
-// .
+// .
// This must be early so can define types winningly.
// Get __mode_t, __dev_t and __off_t .
// bits/types.h -- definitions of __*_t types underlying *_t types.
-// Copyright (C) 2002-2018 Free Software Foundation, Inc.
+// Copyright (C) 2002-2020 Free Software Foundation, Inc.
// This file is part of the GNU C Library.
//
// The GNU C Library is free software; you can redistribute it and/or
@@ -20751,14 +21797,14 @@ type statx = struct {
//
// You should have received a copy of the GNU Lesser General Public
// License along with the GNU C Library; if not, see
-// .
+// .
// Never include this file directly; use instead.
// Get the definitions of O_*, F_*, FD_*: all the
// numbers and flag bits for `open', `fcntl', et al.
// O_*, F_*, FD_* bit values for Linux.
-// Copyright (C) 2000-2018 Free Software Foundation, Inc.
+// Copyright (C) 2000-2020 Free Software Foundation, Inc.
// This file is part of the GNU C Library.
//
// The GNU C Library is free software; you can redistribute it and/or
@@ -20773,7 +21819,7 @@ type statx = struct {
//
// You should have received a copy of the GNU Lesser General Public
// License along with the GNU C Library; if not, see
-// .
+// .
// Determine the wordsize from the preprocessor defines.
@@ -20782,28 +21828,28 @@ type statx = struct {
// Not necessary, we always have 64-bit offsets.
type flock = struct {
- Fl_type int16
- Fl_whence int16
- _ [4]byte
- Fl_start X__off_t
- Fl_len X__off_t
- Fl_pid X__pid_t
- _ [4]byte
+ Fl_type int16
+ Fl_whence int16
+ F__ccgo_pad1 [4]byte
+ Fl_start X__off_t
+ Fl_len X__off_t
+ Fl_pid X__pid_t
+ F__ccgo_pad2 [4]byte
} /* fcntl.h:37:1 */
type flock64 = struct {
- Fl_type int16
- Fl_whence int16
- _ [4]byte
- Fl_start X__off64_t
- Fl_len X__off64_t
- Fl_pid X__pid_t
- _ [4]byte
+ Fl_type int16
+ Fl_whence int16
+ F__ccgo_pad1 [4]byte
+ Fl_start X__off64_t
+ Fl_len X__off64_t
+ Fl_pid X__pid_t
+ F__ccgo_pad2 [4]byte
} /* fcntl.h:52:1 */
// Include generic Linux declarations.
// O_*, F_*, FD_* bit values for Linux.
-// Copyright (C) 2001-2018 Free Software Foundation, Inc.
+// Copyright (C) 2001-2020 Free Software Foundation, Inc.
// This file is part of the GNU C Library.
//
// The GNU C Library is free software; you can redistribute it and/or
@@ -20818,7 +21864,7 @@ type flock64 = struct {
//
// You should have received a copy of the GNU Lesser General Public
// License along with the GNU C Library; if not, see
-// .
+// .
// This file contains shared definitions between Linux architectures
// and is included by to declare them. The various
@@ -20834,7 +21880,7 @@ type flock64 = struct {
// #include
// Define struct iovec.
-// Copyright (C) 1996-2018 Free Software Foundation, Inc.
+// Copyright (C) 1996-2020 Free Software Foundation, Inc.
// This file is part of the GNU C Library.
//
// The GNU C Library is free software; you can redistribute it and/or
@@ -20849,9 +21895,9 @@ type flock64 = struct {
//
// You should have received a copy of the GNU Lesser General Public
// License along with the GNU C Library; if not, see
-// .
+// .
-// Copyright (C) 1989-2018 Free Software Foundation, Inc.
+// Copyright (C) 1989-2019 Free Software Foundation, Inc.
//
// This file is part of GCC.
//
@@ -20883,15 +21929,6 @@ type flock64 = struct {
// This avoids lossage on SunOS but only if stdtypes.h comes first.
// There's no way to win with the other order! Sun lossage.
-// On 4.3bsd-net2, make sure ansi.h is included, so we have
-// one less case to deal with in the following.
-// On FreeBSD 5, machine/ansi.h does not exist anymore...
-
-// In 4.3bsd-net2, machine/ansi.h defines these symbols, which are
-// defined if the corresponding type is *not* defined.
-// FreeBSD-2.1 defines _MACHINE_ANSI_H_ instead of _ANSI_H_.
-// NetBSD defines _I386_ANSI_H_ and _X86_64_ANSI_H_ instead of _ANSI_H_
-
// Sequent's header files use _PTRDIFF_T_ in some conflicting way.
// Just ignore it.
@@ -20928,11 +21965,6 @@ type flock64 = struct {
// Define this type if we are doing the whole job,
// or if we want this type in particular.
-// In 4.3bsd-net2, leave these undefined to indicate that size_t, etc.
-// are already defined.
-// BSD/OS 3.1 and FreeBSD [23].x require the MACHINE_ANSI_H check here.
-// NetBSD 5 requires the I386_ANSI_H and X86_64_ANSI_H checks here.
-
// A null pointer constant.
// Offset of member MEMBER in a struct of type TYPE.
@@ -20959,6 +21991,8 @@ type f_owner_ex = struct {
// Advise to `posix_fadvise'.
// Flags for SYNC_FILE_RANGE.
+// SYNC_FILE_RANGE_WRITE_AND_WAIT ensures all pages in the range are
+// written to disk before returning.
// Flags for SPLICE and VMSPLICE.
@@ -21026,14 +22060,14 @@ type f_owner_ex = struct {
// File handle structure.
type file_handle = struct {
- _ [0]uint32
+ F__ccgo_pad1 [0]uint32
Fhandle_bytes uint32
Fhandle_type int32
-} /* fcntl-linux.h:350:1 */
+} /* fcntl-linux.h:357:1 */
// Define some inlines helping to catch common problems.
-// Copyright (C) 1991-2018 Free Software Foundation, Inc.
+// Copyright (C) 1991-2020 Free Software Foundation, Inc.
// This file is part of the GNU C Library.
//
// The GNU C Library is free software; you can redistribute it and/or
@@ -21048,9 +22082,9 @@ type file_handle = struct {
//
// You should have received a copy of the GNU Lesser General Public
// License along with the GNU C Library; if not, see
-// .
+// .
-// Copyright (C) 1991-2018 Free Software Foundation, Inc.
+// Copyright (C) 1991-2020 Free Software Foundation, Inc.
// This file is part of the GNU C Library.
//
// The GNU C Library is free software; you can redistribute it and/or
@@ -21065,10 +22099,10 @@ type file_handle = struct {
//
// You should have received a copy of the GNU Lesser General Public
// License along with the GNU C Library; if not, see
-// .
+// .
// Get the list of `ioctl' requests and related constants.
-// Copyright (C) 1996-2018 Free Software Foundation, Inc.
+// Copyright (C) 1996-2020 Free Software Foundation, Inc.
// This file is part of the GNU C Library.
//
// The GNU C Library is free software; you can redistribute it and/or
@@ -21083,7 +22117,7 @@ type file_handle = struct {
//
// You should have received a copy of the GNU Lesser General Public
// License along with the GNU C Library; if not, see
-// .
+// .
// Use the definitions from the kernel header files.
// SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note
@@ -21168,7 +22202,7 @@ type file_handle = struct {
// Define some types used by `ioctl' requests.
// Structure types for pre-termios terminal ioctls. Linux version.
-// Copyright (C) 1996-2018 Free Software Foundation, Inc.
+// Copyright (C) 1996-2020 Free Software Foundation, Inc.
// This file is part of the GNU C Library.
//
// The GNU C Library is free software; you can redistribute it and/or
@@ -21183,7 +22217,7 @@ type file_handle = struct {
//
// You should have received a copy of the GNU Lesser General Public
// License along with the GNU C Library; if not, see
-// .
+// .
// Get definition of constants for use with `ioctl'.
// SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note
@@ -21196,16 +22230,16 @@ type winsize = struct {
} /* ioctl-types.h:27:1 */
type termio = struct {
- Fc_iflag uint16
- Fc_oflag uint16
- Fc_cflag uint16
- Fc_lflag uint16
- Fc_line uint8
- Fc_cc [8]uint8
- _ [1]byte
+ Fc_iflag uint16
+ Fc_oflag uint16
+ Fc_cflag uint16
+ Fc_lflag uint16
+ Fc_line uint8
+ Fc_cc [8]uint8
+ F__ccgo_pad1 [1]byte
} /* ioctl-types.h:36:1 */
-// Copyright (C) 1991-2018 Free Software Foundation, Inc.
+// Copyright (C) 1991-2020 Free Software Foundation, Inc.
// This file is part of the GNU C Library.
//
// The GNU C Library is free software; you can redistribute it and/or
@@ -21220,11 +22254,11 @@ type termio = struct {
//
// You should have received a copy of the GNU Lesser General Public
// License along with the GNU C Library; if not, see
-// .
+// .
// POSIX Standard: 2.10 Symbolic Constants
-// Copyright (C) 1991-2018 Free Software Foundation, Inc.
+// Copyright (C) 1991-2020 Free Software Foundation, Inc.
// This file is part of the GNU C Library.
//
// The GNU C Library is free software; you can redistribute it and/or
@@ -21239,7 +22273,7 @@ type termio = struct {
//
// You should have received a copy of the GNU Lesser General Public
// License along with the GNU C Library; if not, see
-// .
+// .
// These may be used to determine what facilities are present at compile time.
// Their values can be obtained at run time from `sysconf'.
@@ -21365,7 +22399,7 @@ type termio = struct {
//
// Define POSIX options for Linux.
-// Copyright (C) 1996-2018 Free Software Foundation, Inc.
+// Copyright (C) 1996-2020 Free Software Foundation, Inc.
// This file is part of the GNU C Library.
//
// The GNU C Library is free software; you can redistribute it and/or
@@ -21380,13 +22414,16 @@ type termio = struct {
//
// You should have received a copy of the GNU Lesser General Public
// License along with the GNU C Library; see the file COPYING.LIB. If
-// not, see .
+// not, see .
// Job control is supported.
// Processes have a saved set-user-ID and a saved set-group-ID.
-// Priority scheduling is supported.
+// Priority scheduling is not supported with the correct semantics,
+// but GNU/Linux applications expect that the corresponding interfaces
+// are available, even though the semantics do not meet the POSIX
+// requirements. See glibc bug 14829.
// Synchronizing file data is supported.
@@ -21489,7 +22526,7 @@ type termio = struct {
// Typed memory objects are not available.
// Get the environment definitions from Unix98.
-// Copyright (C) 1999-2018 Free Software Foundation, Inc.
+// Copyright (C) 1999-2020 Free Software Foundation, Inc.
// This file is part of the GNU C Library.
//
// The GNU C Library is free software; you can redistribute it and/or
@@ -21504,7 +22541,7 @@ type termio = struct {
//
// You should have received a copy of the GNU Lesser General Public
// License along with the GNU C Library; if not, see
-// .
+// .
// Determine the wordsize from the preprocessor defines.
@@ -21545,7 +22582,7 @@ type termio = struct {
// All functions that are not declared anywhere else.
// bits/types.h -- definitions of __*_t types underlying *_t types.
-// Copyright (C) 2002-2018 Free Software Foundation, Inc.
+// Copyright (C) 2002-2020 Free Software Foundation, Inc.
// This file is part of the GNU C Library.
//
// The GNU C Library is free software; you can redistribute it and/or
@@ -21560,11 +22597,11 @@ type termio = struct {
//
// You should have received a copy of the GNU Lesser General Public
// License along with the GNU C Library; if not, see
-// .
+// .
// Never include this file directly; use instead.
-// Copyright (C) 1989-2018 Free Software Foundation, Inc.
+// Copyright (C) 1989-2019 Free Software Foundation, Inc.
//
// This file is part of GCC.
//
@@ -21596,15 +22633,6 @@ type termio = struct {
// This avoids lossage on SunOS but only if stdtypes.h comes first.
// There's no way to win with the other order! Sun lossage.
-// On 4.3bsd-net2, make sure ansi.h is included, so we have
-// one less case to deal with in the following.
-// On FreeBSD 5, machine/ansi.h does not exist anymore...
-
-// In 4.3bsd-net2, machine/ansi.h defines these symbols, which are
-// defined if the corresponding type is *not* defined.
-// FreeBSD-2.1 defines _MACHINE_ANSI_H_ instead of _ANSI_H_.
-// NetBSD defines _I386_ANSI_H_ and _X86_64_ANSI_H_ instead of _ANSI_H_
-
// Sequent's header files use _PTRDIFF_T_ in some conflicting way.
// Just ignore it.
@@ -21641,11 +22669,6 @@ type termio = struct {
// Define this type if we are doing the whole job,
// or if we want this type in particular.
-// In 4.3bsd-net2, leave these undefined to indicate that size_t, etc.
-// are already defined.
-// BSD/OS 3.1 and FreeBSD [23].x require the MACHINE_ANSI_H check here.
-// NetBSD 5 requires the I386_ANSI_H and X86_64_ANSI_H checks here.
-
// A null pointer constant.
// Offset of member MEMBER in a struct of type TYPE.
@@ -21657,10 +22680,8 @@ type Intptr_t = X__intptr_t /* unistd.h:267:20 */
type Socklen_t = X__socklen_t /* unistd.h:274:21 */
-// Define some macros helping to catch buffer overflows.
-
// #include
-// Copyright (C) 1991-2018 Free Software Foundation, Inc.
+// Copyright (C) 1991-2020 Free Software Foundation, Inc.
// This file is part of the GNU C Library.
//
// The GNU C Library is free software; you can redistribute it and/or
@@ -21675,9 +22696,9 @@ type Socklen_t = X__socklen_t /* unistd.h:274:21 */
//
// You should have received a copy of the GNU Lesser General Public
// License along with the GNU C Library; if not, see
-// .
+// .
-// Copyright (C) 1991-2018 Free Software Foundation, Inc.
+// Copyright (C) 1991-2020 Free Software Foundation, Inc.
// This file is part of the GNU C Library.
//
// The GNU C Library is free software; you can redistribute it and/or
@@ -21692,10 +22713,10 @@ type Socklen_t = X__socklen_t /* unistd.h:274:21 */
//
// You should have received a copy of the GNU Lesser General Public
// License along with the GNU C Library; if not, see
-// .
+// .
// bits/types.h -- definitions of __*_t types underlying *_t types.
-// Copyright (C) 2002-2018 Free Software Foundation, Inc.
+// Copyright (C) 2002-2020 Free Software Foundation, Inc.
// This file is part of the GNU C Library.
//
// The GNU C Library is free software; you can redistribute it and/or
@@ -21710,12 +22731,12 @@ type Socklen_t = X__socklen_t /* unistd.h:274:21 */
//
// You should have received a copy of the GNU Lesser General Public
// License along with the GNU C Library; if not, see
-// .
+// .
// Never include this file directly; use instead.
// `fd_set' type and related macros, and `select'/`pselect' declarations.
-// Copyright (C) 1996-2018 Free Software Foundation, Inc.
+// Copyright (C) 1996-2020 Free Software Foundation, Inc.
// This file is part of the GNU C Library.
//
// The GNU C Library is free software; you can redistribute it and/or
@@ -21730,7 +22751,7 @@ type Socklen_t = X__socklen_t /* unistd.h:274:21 */
//
// You should have received a copy of the GNU Lesser General Public
// License along with the GNU C Library; if not, see
-// .
+// .
// POSIX 1003.1g: 6.2 Select from File Descriptor Sets
@@ -21743,8 +22764,6 @@ type timezone = struct {
Ftz_dsttime int32
} /* time.h:52:1 */
-type X__timezone_ptr_t = uintptr /* time.h:58:25 */
-
// Type of the second argument to `getitimer' and
// the second and third arguments `setitimer'.
type itimerval = struct {
@@ -21756,14 +22775,14 @@ type itimerval = struct {
Ftv_sec X__time_t
Ftv_usec X__suseconds_t
}
-} /* time.h:104:1 */
+} /* time.h:105:1 */
// Use the nicer parameter type only in GNU mode and not for C++ since the
// strict C++ rules prevent the automatic promotion.
-type X__itimer_which_t = uint32 /* time.h:115:29 */
+type X__itimer_which_t = uint32 /* time.h:116:29 */
// Define error_t.
-// Copyright (C) 1991-2018 Free Software Foundation, Inc.
+// Copyright (C) 1991-2020 Free Software Foundation, Inc.
// This file is part of the GNU C Library.
//
// The GNU C Library is free software; you can redistribute it and/or
@@ -21778,7 +22797,7 @@ type X__itimer_which_t = uint32 /* time.h:115:29 */
//
// You should have received a copy of the GNU Lesser General Public
// License along with the GNU C Library; if not, see
-// .
+// .
type Error_t = int32 /* error_t.h:22:13 */
@@ -21814,14 +22833,14 @@ type Error_t = int32 /* error_t.h:22:13 */
// Forward references
type unixShm = struct {
- FpShmNode uintptr
- FpNext uintptr
- FhasMutex U8
- Fid U8
- FsharedMask U16
- FexclMask U16
- _ [2]byte
-} /* sqlite3.c:33860:9 */
+ FpShmNode uintptr
+ FpNext uintptr
+ FhasMutex U8
+ Fid U8
+ FsharedMask U16
+ FexclMask U16
+ F__ccgo_pad1 [2]byte
+} /* sqlite3.c:34057:9 */
// Try to determine if gethostuuid() is available based on standard
// macros. This might sometimes compute the wrong value for some
@@ -21854,26 +22873,26 @@ type unixShm = struct {
// a normal expected return code of SQLITE_BUSY or SQLITE_OK
// Forward references
-type UnixShm = unixShm /* sqlite3.c:33860:24 */ // Connection shared memory
+type UnixShm = unixShm /* sqlite3.c:34057:24 */ // Connection shared memory
type unixShmNode = struct {
- FpInode uintptr
- FpShmMutex uintptr
- FzFilename uintptr
- FhShm int32
- FszRegion int32
- FnRegion U16
- FisReadonly U8
- FisUnlocked U8
- _ [4]byte
- FapRegion uintptr
- FnRef int32
- _ [4]byte
- FpFirst uintptr
- FaLock [8]int32
-} /* sqlite3.c:33860:9 */
+ FpInode uintptr
+ FpShmMutex uintptr
+ FzFilename uintptr
+ FhShm int32
+ FszRegion int32
+ FnRegion U16
+ FisReadonly U8
+ FisUnlocked U8
+ F__ccgo_pad1 [4]byte
+ FapRegion uintptr
+ FnRef int32
+ F__ccgo_pad2 [4]byte
+ FpFirst uintptr
+ FaLock [8]int32
+} /* sqlite3.c:34057:9 */
// Connection shared memory
-type UnixShmNode = unixShmNode /* sqlite3.c:33861:28 */ // Shared memory instance
+type UnixShmNode = unixShmNode /* sqlite3.c:34058:28 */ // Shared memory instance
type unixInodeInfo = struct {
FfileId struct {
Fdev Dev_t
@@ -21884,25 +22903,25 @@ type unixInodeInfo = struct {
FnLock int32
FeFileLock uint8
FbProcessLock uint8
- _ [6]byte
+ F__ccgo_pad1 [6]byte
FpUnused uintptr
FnRef int32
- _ [4]byte
+ F__ccgo_pad2 [4]byte
FpShmNode uintptr
FpNext uintptr
FpPrev uintptr
-} /* sqlite3.c:33860:9 */
+} /* sqlite3.c:34057:9 */
// Shared memory instance
-type UnixInodeInfo = unixInodeInfo /* sqlite3.c:33862:30 */ // An i-node
+type UnixInodeInfo = unixInodeInfo /* sqlite3.c:34059:30 */ // An i-node
type UnixUnusedFd1 = struct {
Ffd int32
Fflags int32
FpNext uintptr
-} /* sqlite3.c:33860:9 */
+} /* sqlite3.c:34057:9 */
// An i-node
-type UnixUnusedFd = UnixUnusedFd1 /* sqlite3.c:33863:29 */
+type UnixUnusedFd = UnixUnusedFd1 /* sqlite3.c:34060:29 */
// The unixFile structure is subclass of sqlite3_file specific to the unix
// VFS implementations.
@@ -21912,10 +22931,10 @@ type unixFile = struct {
FpInode uintptr
Fh int32
FeFileLock uint8
- _ [1]byte
+ F__ccgo_pad1 [1]byte
FctrlFlags uint16
FlastErrno int32
- _ [4]byte
+ F__ccgo_pad2 [4]byte
FlockingContext uintptr
FpPreallocatedUnused uintptr
FzPath uintptr
@@ -21928,16 +22947,16 @@ type unixFile = struct {
FpMapRegion uintptr
FsectorSize int32
FdeviceCharacteristics int32
-} /* sqlite3.c:33881:9 */
+} /* sqlite3.c:34078:9 */
// The unixFile structure is subclass of sqlite3_file specific to the unix
// VFS implementations.
-type UnixFile = unixFile /* sqlite3.c:33881:25 */
+type UnixFile = unixFile /* sqlite3.c:34078:25 */
// This variable holds the process id (pid) from when the xRandomness()
// method was called. If xOpen() is called from a different process id,
// indicating that a fork() has occurred, the PRNG will be reset.
-var randomnessPid Pid_t = 0 /* sqlite3.c:33942:14 */
+var randomnessPid Pid_t = 0 /* sqlite3.c:34139:14 */
// Allowed values for the unixFile.ctrlFlags bitmask:
@@ -21996,7 +23015,7 @@ var randomnessPid Pid_t = 0 /* sqlite3.c:33942:14 */
//
// The safest way to deal with the problem is to always use this wrapper
// which always has the same well-defined interface.
-func posixOpen(tls *libc.TLS, zFile uintptr, flags int32, mode int32) int32 { /* sqlite3.c:34231:12: */
+func posixOpen(tls *libc.TLS, zFile uintptr, flags int32, mode int32) int32 { /* sqlite3.c:34428:12: */
bp := tls.Alloc(8)
defer tls.Free(8)
@@ -22011,82 +23030,82 @@ type unix_syscall = struct {
FzName uintptr
FpCurrent Sqlite3_syscall_ptr
FpDefault Sqlite3_syscall_ptr
-} /* sqlite3.c:34245:8 */
+} /* sqlite3.c:34442:8 */
// Many system calls are accessed through pointer-to-functions so that
// they may be overridden at runtime to facilitate fault injection during
// testing and sandboxing. The following array holds the names and pointers
// to all overrideable system calls.
var aSyscall = [29]unix_syscall{
- {FzName: ts + 2316 /* "open" */, FpCurrent: 0},
+ {FzName: ts + 2388 /* "open" */, FpCurrent: 0},
- {FzName: ts + 2321 /* "close" */, FpCurrent: 0},
+ {FzName: ts + 2393 /* "close" */, FpCurrent: 0},
- {FzName: ts + 2327 /* "access" */, FpCurrent: 0},
+ {FzName: ts + 2399 /* "access" */, FpCurrent: 0},
- {FzName: ts + 2334 /* "getcwd" */, FpCurrent: 0},
+ {FzName: ts + 2406 /* "getcwd" */, FpCurrent: 0},
- {FzName: ts + 2341 /* "stat" */, FpCurrent: 0},
+ {FzName: ts + 2413 /* "stat" */, FpCurrent: 0},
// The DJGPP compiler environment looks mostly like Unix, but it
// lacks the fcntl() system call. So redefine fcntl() to be something
// that always succeeds. This means that locking does not occur under
// DJGPP. But it is DOS - what did you expect?
- {FzName: ts + 2346 /* "fstat" */, FpCurrent: 0},
+ {FzName: ts + 2418 /* "fstat" */, FpCurrent: 0},
- {FzName: ts + 2352 /* "ftruncate" */, FpCurrent: 0},
+ {FzName: ts + 2424 /* "ftruncate" */, FpCurrent: 0},
- {FzName: ts + 2362 /* "fcntl" */, FpCurrent: 0},
+ {FzName: ts + 2434 /* "fcntl" */, FpCurrent: 0},
- {FzName: ts + 2368 /* "read" */, FpCurrent: 0},
+ {FzName: ts + 2440 /* "read" */, FpCurrent: 0},
- {FzName: ts + 2373 /* "pread" */},
+ {FzName: ts + 2445 /* "pread" */},
- {FzName: ts + 2379 /* "pread64" */},
+ {FzName: ts + 2451 /* "pread64" */},
- {FzName: ts + 2387 /* "write" */, FpCurrent: 0},
+ {FzName: ts + 2459 /* "write" */, FpCurrent: 0},
- {FzName: ts + 2393 /* "pwrite" */},
+ {FzName: ts + 2465 /* "pwrite" */},
- {FzName: ts + 2400 /* "pwrite64" */},
+ {FzName: ts + 2472 /* "pwrite64" */},
- {FzName: ts + 2409 /* "fchmod" */, FpCurrent: 0},
+ {FzName: ts + 2481 /* "fchmod" */, FpCurrent: 0},
- {FzName: ts + 2416 /* "fallocate" */},
+ {FzName: ts + 2488 /* "fallocate" */},
- {FzName: ts + 2426 /* "unlink" */, FpCurrent: 0},
+ {FzName: ts + 2498 /* "unlink" */, FpCurrent: 0},
- {FzName: ts + 2433 /* "openDirectory" */, FpCurrent: 0},
+ {FzName: ts + 2505 /* "openDirectory" */, FpCurrent: 0},
- {FzName: ts + 2447 /* "mkdir" */, FpCurrent: 0},
+ {FzName: ts + 2519 /* "mkdir" */, FpCurrent: 0},
- {FzName: ts + 2453 /* "rmdir" */, FpCurrent: 0},
+ {FzName: ts + 2525 /* "rmdir" */, FpCurrent: 0},
- {FzName: ts + 2459 /* "fchown" */, FpCurrent: 0},
+ {FzName: ts + 2531 /* "fchown" */, FpCurrent: 0},
- {FzName: ts + 2466 /* "geteuid" */, FpCurrent: 0},
+ {FzName: ts + 2538 /* "geteuid" */, FpCurrent: 0},
- {FzName: ts + 2474 /* "mmap" */, FpCurrent: 0},
+ {FzName: ts + 2546 /* "mmap" */, FpCurrent: 0},
- {FzName: ts + 2479 /* "munmap" */, FpCurrent: 0},
+ {FzName: ts + 2551 /* "munmap" */, FpCurrent: 0},
- {FzName: ts + 2486 /* "mremap" */, FpCurrent: 0},
+ {FzName: ts + 2558 /* "mremap" */, FpCurrent: 0},
- {FzName: ts + 2493 /* "getpagesize" */, FpCurrent: 0},
+ {FzName: ts + 2565 /* "getpagesize" */, FpCurrent: 0},
- {FzName: ts + 2505 /* "readlink" */, FpCurrent: 0},
+ {FzName: ts + 2577 /* "readlink" */, FpCurrent: 0},
- {FzName: ts + 2514 /* "lstat" */, FpCurrent: 0},
+ {FzName: ts + 2586 /* "lstat" */, FpCurrent: 0},
- {FzName: ts + 2520 /* "ioctl" */},
-} /* sqlite3.c:34249:3 */
+ {FzName: ts + 2592 /* "ioctl" */},
+} /* sqlite3.c:34446:3 */
// End of the overrideable system calls
// On some systems, calls to fchown() will trigger a message in a security
// log if they come from non-root processes. So avoid calling fchown() if
// we are not running as root.
-func robustFchown(tls *libc.TLS, fd int32, uid Uid_t, gid Gid_t) int32 { /* sqlite3.c:34419:12: */
+func robustFchown(tls *libc.TLS, fd int32, uid Uid_t, gid Gid_t) int32 { /* sqlite3.c:34616:12: */
if (*(*func(*libc.TLS) Uid_t)(unsafe.Pointer((uintptr(unsafe.Pointer(&aSyscall)) + 21*24 + 8 /* &.pCurrent */))))(tls) != 0 {
return 0
}
@@ -22097,7 +23116,7 @@ func robustFchown(tls *libc.TLS, fd int32, uid Uid_t, gid Gid_t) int32 { /* sqli
// "unix" VFSes. Return SQLITE_OK opon successfully updating the
// system call pointer, or SQLITE_NOTFOUND if there is no configurable
// system call named zName.
-func unixSetSystemCall(tls *libc.TLS, pNotUsed uintptr, zName uintptr, pNewFunc Sqlite3_syscall_ptr) int32 { /* sqlite3.c:34433:12: */
+func unixSetSystemCall(tls *libc.TLS, pNotUsed uintptr, zName uintptr, pNewFunc Sqlite3_syscall_ptr) int32 { /* sqlite3.c:34630:12: */
var i uint32
var rc int32 = SQLITE_NOTFOUND
@@ -22134,7 +23153,7 @@ func unixSetSystemCall(tls *libc.TLS, pNotUsed uintptr, zName uintptr, pNewFunc
// Return the value of a system call. Return NULL if zName is not a
// recognized system call name. NULL is also returned if the system call
// is currently undefined.
-func unixGetSystemCall(tls *libc.TLS, pNotUsed uintptr, zName uintptr) Sqlite3_syscall_ptr { /* sqlite3.c:34476:28: */
+func unixGetSystemCall(tls *libc.TLS, pNotUsed uintptr, zName uintptr) Sqlite3_syscall_ptr { /* sqlite3.c:34673:28: */
var i uint32
_ = pNotUsed
@@ -22150,7 +23169,7 @@ func unixGetSystemCall(tls *libc.TLS, pNotUsed uintptr, zName uintptr) Sqlite3_s
// then return the name of the first system call. Return NULL if zName
// is the last system call or if zName is not the name of a valid
// system call.
-func unixNextSystemCall(tls *libc.TLS, p uintptr, zName uintptr) uintptr { /* sqlite3.c:34495:19: */
+func unixNextSystemCall(tls *libc.TLS, p uintptr, zName uintptr) uintptr { /* sqlite3.c:34692:19: */
var i int32 = -1
_ = p
@@ -22188,7 +23207,7 @@ func unixNextSystemCall(tls *libc.TLS, p uintptr, zName uintptr) uintptr { /* sq
// transaction crashes and leaves behind hot journals, then any
// process that is able to write to the database will also be able to
// recover the hot journals.
-func robust_open(tls *libc.TLS, z uintptr, f int32, m Mode_t) int32 { /* sqlite3.c:34536:12: */
+func robust_open(tls *libc.TLS, z uintptr, f int32, m Mode_t) int32 { /* sqlite3.c:34733:12: */
bp := tls.Alloc(160)
defer tls.Free(160)
@@ -22212,9 +23231,9 @@ func robust_open(tls *libc.TLS, z uintptr, f int32, m Mode_t) int32 { /* sqlite3
}
(*(*func(*libc.TLS, int32) int32)(unsafe.Pointer((uintptr(unsafe.Pointer(&aSyscall)) + 1*24 + 8 /* &.pCurrent */))))(tls, fd)
Xsqlite3_log(tls, SQLITE_WARNING,
- ts+2526 /* "attempt to open ..." */, libc.VaList(bp, z, fd))
+ ts+2598 /* "attempt to open ..." */, libc.VaList(bp, z, fd))
fd = -1
- if (*(*func(*libc.TLS, uintptr, int32, int32) int32)(unsafe.Pointer((uintptr(unsafe.Pointer(&aSyscall)) + 8 /* &.pCurrent */))))(tls, ts+2569 /* "/dev/null" */, O_RDONLY, int32(m)) < 0 {
+ if (*(*func(*libc.TLS, uintptr, int32, int32) int32)(unsafe.Pointer((uintptr(unsafe.Pointer(&aSyscall)) + 8 /* &.pCurrent */))))(tls, ts+2641 /* "/dev/null" */, O_RDONLY, int32(m)) < 0 {
break
}
}
@@ -22255,14 +23274,14 @@ func robust_open(tls *libc.TLS, z uintptr, f int32, m Mode_t) int32 { /* sqlite3
// OK: enter(unixBigLock)
// OK: enter(pLockInfo)
// ERROR: enter(pLockInfo), enter(unixBigLock)
-var unixBigLock uintptr = uintptr(0) /* sqlite3.c:34598:22 */
+var unixBigLock uintptr = uintptr(0) /* sqlite3.c:34795:22 */
-func unixEnterMutex(tls *libc.TLS) { /* sqlite3.c:34599:13: */
+func unixEnterMutex(tls *libc.TLS) { /* sqlite3.c:34796:13: */
// Not a recursive mutex
Xsqlite3_mutex_enter(tls, unixBigLock)
}
-func unixLeaveMutex(tls *libc.TLS) { /* sqlite3.c:34603:13: */
+func unixLeaveMutex(tls *libc.TLS) { /* sqlite3.c:34800:13: */
Xsqlite3_mutex_leave(tls, unixBigLock)
}
@@ -22272,7 +23291,7 @@ func unixLeaveMutex(tls *libc.TLS) { /* sqlite3.c:34603:13: */
// All calls to ftruncate() within this file should be made through
// this wrapper. On the Android platform, bypassing the logic below
// could lead to a corrupt database.
-func robust_ftruncate(tls *libc.TLS, h int32, sz Sqlite3_int64) int32 { /* sqlite3.c:34699:12: */
+func robust_ftruncate(tls *libc.TLS, h int32, sz Sqlite3_int64) int32 { /* sqlite3.c:34896:12: */
var rc int32
for ok := true; ok; ok = ((rc < 0) && ((*(*int32)(unsafe.Pointer(libc.X__errno_location(tls)))) == EINTR)) {
rc = (*(*func(*libc.TLS, int32, Off_t) int32)(unsafe.Pointer((uintptr(unsafe.Pointer(&aSyscall)) + 6*24 + 8 /* &.pCurrent */))))(tls, h, int64(sz))
@@ -22288,7 +23307,7 @@ func robust_ftruncate(tls *libc.TLS, h int32, sz Sqlite3_int64) int32 { /* sqlit
//
// Errors during initialization of locks, or file system support for locks,
// should handle ENOLCK, ENOTSUP, EOPNOTSUPP separately.
-func sqliteErrorFromPosixError(tls *libc.TLS, posixError int32, sqliteIOErr int32) int32 { /* sqlite3.c:34724:12: */
+func sqliteErrorFromPosixError(tls *libc.TLS, posixError int32, sqliteIOErr int32) int32 { /* sqlite3.c:34921:12: */
switch posixError {
case EACCES:
@@ -22337,7 +23356,7 @@ type vxworksFileId = struct {
FnRef int32
FnName int32
FzCanonicalName uintptr
-} /* sqlite3.c:34766:1 */
+} /* sqlite3.c:34963:1 */
// ************** End of Unique File ID Utility Used By VxWorks ****************
//
@@ -22438,12 +23457,12 @@ type vxworksFileId = struct {
type unixFileId = struct {
Fdev Dev_t
Fino U64
-} /* sqlite3.c:33860:9 */
+} /* sqlite3.c:34057:9 */
// A lists of all unixInodeInfo objects.
//
// Must hold unixBigLock in order to read or write this variable.
-var inodeList uintptr = uintptr(0) /* sqlite3.c:35048:22 */
+var inodeList uintptr = uintptr(0) /* sqlite3.c:35245:22 */
// All unixInodeInfo objects
@@ -22461,7 +23480,7 @@ var inodeList uintptr = uintptr(0) /* sqlite3.c:35048:22 */
// The two subsequent arguments should be the name of the OS function that
// failed (e.g. "unlink", "open") and the associated file-system path,
// if any.
-func unixLogErrorAtLine(tls *libc.TLS, errcode int32, zFunc uintptr, zPath uintptr, iLine int32) int32 { /* sqlite3.c:35083:12: */
+func unixLogErrorAtLine(tls *libc.TLS, errcode int32, zFunc uintptr, zPath uintptr, iLine int32) int32 { /* sqlite3.c:35280:12: */
bp := tls.Alloc(40)
defer tls.Free(40)
@@ -22472,13 +23491,13 @@ func unixLogErrorAtLine(tls *libc.TLS, errcode int32, zFunc uintptr, zPath uintp
// the strerror() function to obtain the human-readable error message
// equivalent to errno. Otherwise, use strerror_r().
// This is a threadsafe build, but strerror_r() is not available.
- zErr = ts + 703 /* "" */
+ zErr = ts + 755 /* "" */
if zPath == uintptr(0) {
- zPath = ts + 703 /* "" */
+ zPath = ts + 755 /* "" */
}
Xsqlite3_log(tls, errcode,
- ts+2579, /* "os_unix.c:%d: (%..." */
+ ts+2651, /* "os_unix.c:%d: (%..." */
libc.VaList(bp, iLine, iErrno, zFunc, zPath, zErr))
return errcode
@@ -22495,9 +23514,9 @@ func unixLogErrorAtLine(tls *libc.TLS, errcode int32, zFunc uintptr, zPath uintp
// file descriptor might have already been reused by another thread.
// So we don't even try to recover from an EINTR. Just log the error
// and move on.
-func robust_close(tls *libc.TLS, pFile uintptr, h int32, lineno int32) { /* sqlite3.c:35148:13: */
+func robust_close(tls *libc.TLS, pFile uintptr, h int32, lineno int32) { /* sqlite3.c:35345:13: */
if (*(*func(*libc.TLS, int32) int32)(unsafe.Pointer((uintptr(unsafe.Pointer(&aSyscall)) + 1*24 + 8 /* &.pCurrent */))))(tls, h) != 0 {
- unixLogErrorAtLine(tls, (SQLITE_IOERR | (int32(16) << 8)), ts+2321, /* "close" */
+ unixLogErrorAtLine(tls, (SQLITE_IOERR | (int32(16) << 8)), ts+2393, /* "close" */
func() uintptr {
if pFile != 0 {
return (*UnixFile)(unsafe.Pointer(pFile)).FzPath
@@ -22509,19 +23528,19 @@ func robust_close(tls *libc.TLS, pFile uintptr, h int32, lineno int32) { /* sqli
// Set the pFile->lastErrno. Do this in a subroutine as that provides
// a convenient place to set a breakpoint.
-func storeLastErrno(tls *libc.TLS, pFile uintptr, error int32) { /* sqlite3.c:35159:13: */
+func storeLastErrno(tls *libc.TLS, pFile uintptr, error int32) { /* sqlite3.c:35356:13: */
(*UnixFile)(unsafe.Pointer(pFile)).FlastErrno = error
}
// Close all file descriptors accumuated in the unixInodeInfo->pUnused list.
-func closePendingFds(tls *libc.TLS, pFile uintptr) { /* sqlite3.c:35166:13: */
+func closePendingFds(tls *libc.TLS, pFile uintptr) { /* sqlite3.c:35363:13: */
var pInode uintptr = (*UnixFile)(unsafe.Pointer(pFile)).FpInode
var p uintptr
var pNext uintptr
for p = (*UnixInodeInfo)(unsafe.Pointer(pInode)).FpUnused; p != 0; p = pNext {
pNext = (*UnixUnusedFd)(unsafe.Pointer(p)).FpNext
- robust_close(tls, pFile, (*UnixUnusedFd)(unsafe.Pointer(p)).Ffd, 35173)
+ robust_close(tls, pFile, (*UnixUnusedFd)(unsafe.Pointer(p)).Ffd, 35370)
Xsqlite3_free(tls, p)
}
(*UnixInodeInfo)(unsafe.Pointer(pInode)).FpUnused = uintptr(0)
@@ -22531,7 +23550,7 @@ func closePendingFds(tls *libc.TLS, pFile uintptr) { /* sqlite3.c:35166:13: */
//
// The global mutex must be held when this routine is called, but the mutex
// on the inode being deleted must NOT be held.
-func releaseInodeInfo(tls *libc.TLS, pFile uintptr) { /* sqlite3.c:35185:13: */
+func releaseInodeInfo(tls *libc.TLS, pFile uintptr) { /* sqlite3.c:35382:13: */
var pInode uintptr = (*UnixFile)(unsafe.Pointer(pFile)).FpInode
if pInode != 0 {
@@ -22565,7 +23584,7 @@ func releaseInodeInfo(tls *libc.TLS, pFile uintptr) { /* sqlite3.c:35185:13: */
// The global mutex must held when calling this routine.
//
// Return an appropriate error code.
-func findInodeInfo(tls *libc.TLS, pFile uintptr, ppInode uintptr) int32 { /* sqlite3.c:35222:12: */
+func findInodeInfo(tls *libc.TLS, pFile uintptr, ppInode uintptr) int32 { /* sqlite3.c:35419:12: */
bp := tls.Alloc(160)
defer tls.Free(160)
@@ -22624,7 +23643,7 @@ func findInodeInfo(tls *libc.TLS, pFile uintptr, ppInode uintptr) int32 { /* sql
}
// Return TRUE if pFile has been renamed or unlinked since it was first opened.
-func fileHasMoved(tls *libc.TLS, pFile uintptr) int32 { /* sqlite3.c:35314:12: */
+func fileHasMoved(tls *libc.TLS, pFile uintptr) int32 { /* sqlite3.c:35511:12: */
bp := tls.Alloc(144)
defer tls.Free(144)
@@ -22641,7 +23660,7 @@ func fileHasMoved(tls *libc.TLS, pFile uintptr) int32 { /* sqlite3.c:35314:12: *
// (3) The file has not been renamed or unlinked
//
// Issue sqlite3_log(SQLITE_WARNING,...) messages if anything is not right.
-func verifyDbFile(tls *libc.TLS, pFile uintptr) { /* sqlite3.c:35335:13: */
+func verifyDbFile(tls *libc.TLS, pFile uintptr) { /* sqlite3.c:35532:13: */
bp := tls.Alloc(176)
defer tls.Free(176)
@@ -22656,19 +23675,19 @@ func verifyDbFile(tls *libc.TLS, pFile uintptr) { /* sqlite3.c:35335:13: */
rc = (*(*func(*libc.TLS, int32, uintptr) int32)(unsafe.Pointer((uintptr(unsafe.Pointer(&aSyscall)) + 5*24 + 8 /* &.pCurrent */))))(tls, (*UnixFile)(unsafe.Pointer(pFile)).Fh, bp+32 /* &buf */)
if rc != 0 {
- Xsqlite3_log(tls, SQLITE_WARNING, ts+2610 /* "cannot fstat db ..." */, libc.VaList(bp, (*UnixFile)(unsafe.Pointer(pFile)).FzPath))
+ Xsqlite3_log(tls, SQLITE_WARNING, ts+2682 /* "cannot fstat db ..." */, libc.VaList(bp, (*UnixFile)(unsafe.Pointer(pFile)).FzPath))
return
}
if (*stat)(unsafe.Pointer(bp+32 /* &buf */)).Fst_nlink == uint64(0) {
- Xsqlite3_log(tls, SQLITE_WARNING, ts+2634 /* "file unlinked wh..." */, libc.VaList(bp+8, (*UnixFile)(unsafe.Pointer(pFile)).FzPath))
+ Xsqlite3_log(tls, SQLITE_WARNING, ts+2706 /* "file unlinked wh..." */, libc.VaList(bp+8, (*UnixFile)(unsafe.Pointer(pFile)).FzPath))
return
}
if (*stat)(unsafe.Pointer(bp+32 /* &buf */)).Fst_nlink > uint64(1) {
- Xsqlite3_log(tls, SQLITE_WARNING, ts+2663 /* "multiple links t..." */, libc.VaList(bp+16, (*UnixFile)(unsafe.Pointer(pFile)).FzPath))
+ Xsqlite3_log(tls, SQLITE_WARNING, ts+2735 /* "multiple links t..." */, libc.VaList(bp+16, (*UnixFile)(unsafe.Pointer(pFile)).FzPath))
return
}
if fileHasMoved(tls, pFile) != 0 {
- Xsqlite3_log(tls, SQLITE_WARNING, ts+2690 /* "file renamed whi..." */, libc.VaList(bp+24, (*UnixFile)(unsafe.Pointer(pFile)).FzPath))
+ Xsqlite3_log(tls, SQLITE_WARNING, ts+2762 /* "file renamed whi..." */, libc.VaList(bp+24, (*UnixFile)(unsafe.Pointer(pFile)).FzPath))
return
}
}
@@ -22677,7 +23696,7 @@ func verifyDbFile(tls *libc.TLS, pFile uintptr) { /* sqlite3.c:35335:13: */
// file by this or any other process. If such a lock is held, set *pResOut
// to a non-zero value otherwise *pResOut is set to zero. The return value
// is set to SQLITE_OK unless an I/O error occurs during lock checking.
-func unixCheckReservedLock(tls *libc.TLS, id uintptr, pResOut uintptr) int32 { /* sqlite3.c:35368:12: */
+func unixCheckReservedLock(tls *libc.TLS, id uintptr, pResOut uintptr) int32 { /* sqlite3.c:35565:12: */
bp := tls.Alloc(40)
defer tls.Free(40)
@@ -22743,7 +23762,7 @@ func unixCheckReservedLock(tls *libc.TLS, id uintptr, pResOut uintptr) int32 { /
//
// Zero is returned if the call completes successfully, or -1 if a call
// to fcntl() fails. In this case, errno is set appropriately (by fcntl()).
-func unixFileLock(tls *libc.TLS, pFile uintptr, pLock uintptr) int32 { /* sqlite3.c:35469:12: */
+func unixFileLock(tls *libc.TLS, pFile uintptr, pLock uintptr) int32 { /* sqlite3.c:35666:12: */
bp := tls.Alloc(48)
defer tls.Free(48)
@@ -22795,7 +23814,7 @@ func unixFileLock(tls *libc.TLS, pFile uintptr, pLock uintptr) int32 { /* sqlite
//
// This routine will only increase a lock. Use the sqlite3OsUnlock()
// routine to lower a locking level.
-func unixLock(tls *libc.TLS, id uintptr, eFileLock int32) int32 { /* sqlite3.c:35519:12: */
+func unixLock(tls *libc.TLS, id uintptr, eFileLock int32) int32 { /* sqlite3.c:35716:12: */
bp := tls.Alloc(32)
defer tls.Free(32)
@@ -23042,7 +24061,7 @@ end_lock:
// Add the file descriptor used by file handle pFile to the corresponding
// pUnused list.
-func setPendingFd(tls *libc.TLS, pFile uintptr) { /* sqlite3.c:35746:13: */
+func setPendingFd(tls *libc.TLS, pFile uintptr) { /* sqlite3.c:35943:13: */
var pInode uintptr = (*UnixFile)(unsafe.Pointer(pFile)).FpInode
var p uintptr = (*UnixFile)(unsafe.Pointer(pFile)).FpPreallocatedUnused
@@ -23063,7 +24082,7 @@ func setPendingFd(tls *libc.TLS, pFile uintptr) { /* sqlite3.c:35746:13: */
// set to a read lock, then the other part is simply unlocked. This works
// around a bug in BSD NFS lockd (also seen on MacOSX 10.3+) that fails to
// remove the write lock on a region when a read lock is set.
-func posixUnlock(tls *libc.TLS, id uintptr, eFileLock int32, handleNFSUnlock int32) int32 { /* sqlite3.c:35769:12: */
+func posixUnlock(tls *libc.TLS, id uintptr, eFileLock int32, handleNFSUnlock int32) int32 { /* sqlite3.c:35966:12: */
bp := tls.Alloc(32)
defer tls.Free(32)
@@ -23197,7 +24216,7 @@ __12:
//
// If the locking level of the file descriptor is already at or below
// the requested locking level, this routine is a no-op.
-func unixUnlock(tls *libc.TLS, id uintptr, eFileLock int32) int32 { /* sqlite3.c:35929:12: */
+func unixUnlock(tls *libc.TLS, id uintptr, eFileLock int32) int32 { /* sqlite3.c:36126:12: */
return posixUnlock(tls, id, eFileLock, 0)
}
@@ -23210,11 +24229,11 @@ func unixUnlock(tls *libc.TLS, id uintptr, eFileLock int32) int32 { /* sqlite3.c
// It is *not* necessary to hold the mutex when this routine is called,
// even on VxWorks. A mutex will be acquired on VxWorks by the
// vxworksReleaseFileId() routine.
-func closeUnixFile(tls *libc.TLS, id uintptr) int32 { /* sqlite3.c:35951:12: */
+func closeUnixFile(tls *libc.TLS, id uintptr) int32 { /* sqlite3.c:36148:12: */
var pFile uintptr = id
unixUnmapfile(tls, pFile)
if (*UnixFile)(unsafe.Pointer(pFile)).Fh >= 0 {
- robust_close(tls, pFile, (*UnixFile)(unsafe.Pointer(pFile)).Fh, 35957)
+ robust_close(tls, pFile, (*UnixFile)(unsafe.Pointer(pFile)).Fh, 36154)
(*UnixFile)(unsafe.Pointer(pFile)).Fh = -1
}
@@ -23224,7 +24243,7 @@ func closeUnixFile(tls *libc.TLS, id uintptr) int32 { /* sqlite3.c:35951:12: */
}
// Close a file.
-func unixClose(tls *libc.TLS, id uintptr) int32 { /* sqlite3.c:35986:12: */
+func unixClose(tls *libc.TLS, id uintptr) int32 { /* sqlite3.c:36183:12: */
var rc int32 = SQLITE_OK
var pFile uintptr = id
var pInode uintptr = (*UnixFile)(unsafe.Pointer(pFile)).FpInode
@@ -23274,26 +24293,26 @@ func unixClose(tls *libc.TLS, id uintptr) int32 { /* sqlite3.c:35986:12: */
// database connections are accessing the same database file at the same
// time and one or more of those connections are writing.
-func nolockCheckReservedLock(tls *libc.TLS, NotUsed uintptr, pResOut uintptr) int32 { /* sqlite3.c:36038:12: */
+func nolockCheckReservedLock(tls *libc.TLS, NotUsed uintptr, pResOut uintptr) int32 { /* sqlite3.c:36235:12: */
_ = NotUsed
*(*int32)(unsafe.Pointer(pResOut)) = 0
return SQLITE_OK
}
-func nolockLock(tls *libc.TLS, NotUsed uintptr, NotUsed2 int32) int32 { /* sqlite3.c:36043:12: */
+func nolockLock(tls *libc.TLS, NotUsed uintptr, NotUsed2 int32) int32 { /* sqlite3.c:36240:12: */
_ = NotUsed
_ = NotUsed2
return SQLITE_OK
}
-func nolockUnlock(tls *libc.TLS, NotUsed uintptr, NotUsed2 int32) int32 { /* sqlite3.c:36047:12: */
+func nolockUnlock(tls *libc.TLS, NotUsed uintptr, NotUsed2 int32) int32 { /* sqlite3.c:36244:12: */
_ = NotUsed
_ = NotUsed2
return SQLITE_OK
}
// Close the file.
-func nolockClose(tls *libc.TLS, id uintptr) int32 { /* sqlite3.c:36055:12: */
+func nolockClose(tls *libc.TLS, id uintptr) int32 { /* sqlite3.c:36252:12: */
return closeUnixFile(tls, id)
}
@@ -23334,7 +24353,7 @@ func nolockClose(tls *libc.TLS, id uintptr) int32 { /* sqlite3.c:36055:12: */
// In dotfile locking, either a lock exists or it does not. So in this
// variation of CheckReservedLock(), *pResOut is set to true if any lock
// is held on the file and false if the file is unlocked.
-func dotlockCheckReservedLock(tls *libc.TLS, id uintptr, pResOut uintptr) int32 { /* sqlite3.c:36100:12: */
+func dotlockCheckReservedLock(tls *libc.TLS, id uintptr, pResOut uintptr) int32 { /* sqlite3.c:36297:12: */
var rc int32 = SQLITE_OK
var reserved int32 = 0
var pFile uintptr = id
@@ -23370,7 +24389,7 @@ func dotlockCheckReservedLock(tls *libc.TLS, id uintptr, pResOut uintptr) int32
//
// With dotfile locking, we really only support state (4): EXCLUSIVE.
// But we track the other locking levels internally.
-func dotlockLock(tls *libc.TLS, id uintptr, eFileLock int32) int32 { /* sqlite3.c:36141:12: */
+func dotlockLock(tls *libc.TLS, id uintptr, eFileLock int32) int32 { /* sqlite3.c:36338:12: */
var pFile uintptr = id
var zLockFile uintptr = (*UnixFile)(unsafe.Pointer(pFile)).FlockingContext
var rc int32 = SQLITE_OK
@@ -23412,7 +24431,7 @@ func dotlockLock(tls *libc.TLS, id uintptr, eFileLock int32) int32 { /* sqlite3.
// the requested locking level, this routine is a no-op.
//
// When the locking level reaches NO_LOCK, delete the lock file.
-func dotlockUnlock(tls *libc.TLS, id uintptr, eFileLock int32) int32 { /* sqlite3.c:36191:12: */
+func dotlockUnlock(tls *libc.TLS, id uintptr, eFileLock int32) int32 { /* sqlite3.c:36388:12: */
var pFile uintptr = id
var zLockFile uintptr = (*UnixFile)(unsafe.Pointer(pFile)).FlockingContext
var rc int32
@@ -23447,7 +24466,7 @@ func dotlockUnlock(tls *libc.TLS, id uintptr, eFileLock int32) int32 { /* sqlite
}
// Close a file. Make sure the lock has been released before closing.
-func dotlockClose(tls *libc.TLS, id uintptr) int32 { /* sqlite3.c:36234:12: */
+func dotlockClose(tls *libc.TLS, id uintptr) int32 { /* sqlite3.c:36431:12: */
var pFile uintptr = id
dotlockUnlock(tls, id, NO_LOCK)
@@ -23546,7 +24565,7 @@ func dotlockClose(tls *libc.TLS, id uintptr) int32 { /* sqlite3.c:36234:12: */
//
// To avoid stomping the errno value on a failed read the lastErrno value
// is set before returning.
-func seekAndRead(tls *libc.TLS, id uintptr, offset Sqlite3_int64, pBuf uintptr, cnt int32) int32 { /* sqlite3.c:37148:12: */
+func seekAndRead(tls *libc.TLS, id uintptr, offset Sqlite3_int64, pBuf uintptr, cnt int32) int32 { /* sqlite3.c:37345:12: */
var got int32
var prior int32 = 0
var newOffset I64
@@ -23584,7 +24603,7 @@ func seekAndRead(tls *libc.TLS, id uintptr, offset Sqlite3_int64, pBuf uintptr,
// Read data from a file into a buffer. Return SQLITE_OK if all
// bytes were read successfully and SQLITE_IOERR if anything goes
// wrong.
-func unixRead(tls *libc.TLS, id uintptr, pBuf uintptr, amt int32, offset Sqlite3_int64) int32 { /* sqlite3.c:37197:12: */
+func unixRead(tls *libc.TLS, id uintptr, pBuf uintptr, amt int32, offset Sqlite3_int64) int32 { /* sqlite3.c:37394:12: */
var pFile uintptr = id
var got int32
@@ -23639,7 +24658,7 @@ func unixRead(tls *libc.TLS, id uintptr, pBuf uintptr, amt int32, offset Sqlite3
// pBuf to it. If an error occurs, return -1 and set *piErrno. Otherwise,
// return the actual number of bytes written (which may be less than
// nBuf).
-func seekAndWriteFd(tls *libc.TLS, fd int32, iOff I64, pBuf uintptr, nBuf int32, piErrno uintptr) int32 { /* sqlite3.c:37273:12: */
+func seekAndWriteFd(tls *libc.TLS, fd int32, iOff I64, pBuf uintptr, nBuf int32, piErrno uintptr) int32 { /* sqlite3.c:37470:12: */
var rc int32 = 0 // Value returned by system call
nBuf = nBuf & (0x1ffff)
@@ -23665,13 +24684,13 @@ func seekAndWriteFd(tls *libc.TLS, fd int32, iOff I64, pBuf uintptr, nBuf int32,
//
// To avoid stomping the errno value on a failed write the lastErrno value
// is set before returning.
-func seekAndWrite(tls *libc.TLS, id uintptr, offset I64, pBuf uintptr, cnt int32) int32 { /* sqlite3.c:37319:12: */
+func seekAndWrite(tls *libc.TLS, id uintptr, offset I64, pBuf uintptr, cnt int32) int32 { /* sqlite3.c:37516:12: */
return seekAndWriteFd(tls, (*UnixFile)(unsafe.Pointer(id)).Fh, offset, pBuf, cnt, (id + 32 /* &.lastErrno */))
}
// Write data from a buffer into a file. Return SQLITE_OK on success
// or some other error code on failure.
-func unixWrite(tls *libc.TLS, id uintptr, pBuf uintptr, amt int32, offset Sqlite3_int64) int32 { /* sqlite3.c:37328:12: */
+func unixWrite(tls *libc.TLS, id uintptr, pBuf uintptr, amt int32, offset Sqlite3_int64) int32 { /* sqlite3.c:37525:12: */
var pFile uintptr = id
var wrote int32 = 0
@@ -23728,7 +24747,7 @@ func unixWrite(tls *libc.TLS, id uintptr, pBuf uintptr, amt int32, offset Sqlite
// as far as SQLite is concerned, an fdatasync() is always adequate.
// So, we always use fdatasync() if it is available, regardless of
// the value of the dataOnly flag.
-func full_fsync(tls *libc.TLS, fd int32, fullSync int32, dataOnly int32) int32 { /* sqlite3.c:37463:12: */
+func full_fsync(tls *libc.TLS, fd int32, fullSync int32, dataOnly int32) int32 { /* sqlite3.c:37660:12: */
var rc int32
// The following "ifdef/elif/else/" block has the same structure as
@@ -23774,24 +24793,24 @@ func full_fsync(tls *libc.TLS, fd int32, fullSync int32, dataOnly int32) int32 {
//
// If SQLITE_OK is returned, the caller is responsible for closing
// the file descriptor *pFd using close().
-func openDirectory(tls *libc.TLS, zFilename uintptr, pFd uintptr) int32 { /* sqlite3.c:37559:12: */
+func openDirectory(tls *libc.TLS, zFilename uintptr, pFd uintptr) int32 { /* sqlite3.c:37756:12: */
bp := tls.Alloc(521)
defer tls.Free(521)
var ii int32
var fd int32 = -1
- // var zDirname [513]int8 at bp+8, 513
+ // var zDirname [513]uint8 at bp+8, 513
- Xsqlite3_snprintf(tls, MAX_PATHNAME, bp+8 /* &zDirname[0] */, ts+2718 /* "%s" */, libc.VaList(bp, zFilename))
- for ii = int32(libc.Xstrlen(tls, bp+8 /* &zDirname[0] */)); (ii > 0) && (int32(*(*int8)(unsafe.Pointer(bp + 8 /* &zDirname[0] */ + uintptr(ii)))) != '/'); ii-- {
+ Xsqlite3_snprintf(tls, MAX_PATHNAME, bp+8 /* &zDirname[0] */, ts+2790 /* "%s" */, libc.VaList(bp, zFilename))
+ for ii = int32(libc.Xstrlen(tls, bp+8 /* &zDirname[0] */)); (ii > 0) && (int32(*(*uint8)(unsafe.Pointer(bp + 8 /* &zDirname[0] */ + uintptr(ii)))) != '/'); ii-- {
}
if ii > 0 {
- *(*int8)(unsafe.Pointer(bp + 8 /* &zDirname[0] */ + uintptr(ii))) = int8(0)
+ *(*uint8)(unsafe.Pointer(bp + 8 /* &zDirname[0] */ + uintptr(ii))) = uint8(0)
} else {
- if int32(*(*int8)(unsafe.Pointer(bp + 8 /* &zDirname[0] */))) != '/' {
- *(*int8)(unsafe.Pointer(bp + 8 /* &zDirname[0] */)) = int8('.')
+ if int32(*(*uint8)(unsafe.Pointer(bp + 8 /* &zDirname[0] */))) != '/' {
+ *(*uint8)(unsafe.Pointer(bp + 8 /* &zDirname[0] */)) = uint8('.')
}
- *(*int8)(unsafe.Pointer(bp + 8 /* &zDirname[0] */ + 1)) = int8(0)
+ *(*uint8)(unsafe.Pointer(bp + 8 /* &zDirname[0] */ + 1)) = uint8(0)
}
fd = robust_open(tls, bp+8 /* &zDirname[0] */, (O_RDONLY | O_BINARY), uint32(0))
if fd >= 0 {
@@ -23801,7 +24820,7 @@ func openDirectory(tls *libc.TLS, zFilename uintptr, pFd uintptr) int32 { /* sql
if fd >= 0 {
return SQLITE_OK
}
- return unixLogErrorAtLine(tls, Xsqlite3CantopenError(tls, 37578), ts+2433 /* "openDirectory" */, bp+8 /* &zDirname[0] */, 37578)
+ return unixLogErrorAtLine(tls, Xsqlite3CantopenError(tls, 37775), ts+2505 /* "openDirectory" */, bp+8 /* &zDirname[0] */, 37775)
}
// Make sure all writes to a particular file are committed to disk.
@@ -23817,7 +24836,7 @@ func openDirectory(tls *libc.TLS, zFilename uintptr, pFd uintptr) int32 { /* sql
// SQLite to access the file will not know that the journal exists (because
// the directory entry for the journal was never created) and the transaction
// will not roll back - possibly leading to database corruption.
-func unixSync(tls *libc.TLS, id uintptr, flags int32) int32 { /* sqlite3.c:37596:12: */
+func unixSync(tls *libc.TLS, id uintptr, flags int32) int32 { /* sqlite3.c:37793:12: */
bp := tls.Alloc(4)
defer tls.Free(4)
@@ -23836,7 +24855,7 @@ func unixSync(tls *libc.TLS, id uintptr, flags int32) int32 { /* sqlite3.c:37596
if rc != 0 {
storeLastErrno(tls, pFile, *(*int32)(unsafe.Pointer(libc.X__errno_location(tls))))
- return unixLogErrorAtLine(tls, (SQLITE_IOERR | (int32(4) << 8)), ts+2721 /* "full_fsync" */, (*UnixFile)(unsafe.Pointer(pFile)).FzPath, 37619)
+ return unixLogErrorAtLine(tls, (SQLITE_IOERR | (int32(4) << 8)), ts+2793 /* "full_fsync" */, (*UnixFile)(unsafe.Pointer(pFile)).FzPath, 37816)
}
// Also fsync the directory containing the file if the DIRSYNC flag
@@ -23848,7 +24867,7 @@ func unixSync(tls *libc.TLS, id uintptr, flags int32) int32 { /* sqlite3.c:37596
rc = (*(*func(*libc.TLS, uintptr, uintptr) int32)(unsafe.Pointer((uintptr(unsafe.Pointer(&aSyscall)) + 17*24 + 8 /* &.pCurrent */))))(tls, (*UnixFile)(unsafe.Pointer(pFile)).FzPath, bp /* &dirfd */)
if rc == SQLITE_OK {
full_fsync(tls, *(*int32)(unsafe.Pointer(bp /* dirfd */)), 0, 0)
- robust_close(tls, pFile, *(*int32)(unsafe.Pointer(bp /* dirfd */)), 37633)
+ robust_close(tls, pFile, *(*int32)(unsafe.Pointer(bp /* dirfd */)), 37830)
} else {
rc = SQLITE_OK
@@ -23859,7 +24878,7 @@ func unixSync(tls *libc.TLS, id uintptr, flags int32) int32 { /* sqlite3.c:37596
}
// Truncate an open file to a specified size
-func unixTruncate(tls *libc.TLS, id uintptr, nByte I64) int32 { /* sqlite3.c:37646:12: */
+func unixTruncate(tls *libc.TLS, id uintptr, nByte I64) int32 { /* sqlite3.c:37843:12: */
var pFile uintptr = id
var rc int32
@@ -23874,7 +24893,7 @@ func unixTruncate(tls *libc.TLS, id uintptr, nByte I64) int32 { /* sqlite3.c:376
rc = robust_ftruncate(tls, (*UnixFile)(unsafe.Pointer(pFile)).Fh, nByte)
if rc != 0 {
storeLastErrno(tls, pFile, *(*int32)(unsafe.Pointer(libc.X__errno_location(tls))))
- return unixLogErrorAtLine(tls, (SQLITE_IOERR | (int32(6) << 8)), ts+2352 /* "ftruncate" */, (*UnixFile)(unsafe.Pointer(pFile)).FzPath, 37664)
+ return unixLogErrorAtLine(tls, (SQLITE_IOERR | (int32(6) << 8)), ts+2424 /* "ftruncate" */, (*UnixFile)(unsafe.Pointer(pFile)).FzPath, 37861)
} else {
// If the file was just truncated to a size smaller than the currently
@@ -23890,7 +24909,7 @@ func unixTruncate(tls *libc.TLS, id uintptr, nByte I64) int32 { /* sqlite3.c:376
}
// Determine the current size of a file in bytes
-func unixFileSize(tls *libc.TLS, id uintptr, pSize uintptr) int32 { /* sqlite3.c:37696:12: */
+func unixFileSize(tls *libc.TLS, id uintptr, pSize uintptr) int32 { /* sqlite3.c:37893:12: */
bp := tls.Alloc(144)
defer tls.Free(144)
@@ -23921,7 +24940,7 @@ func unixFileSize(tls *libc.TLS, id uintptr, pSize uintptr) int32 { /* sqlite3.c
// file-control operation. Enlarge the database to nBytes in size
// (rounded up to the next chunk-size). If the database is already
// nBytes or larger, this routine is a no-op.
-func fcntlSizeHint(tls *libc.TLS, pFile uintptr, nByte I64) int32 { /* sqlite3.c:37734:12: */
+func fcntlSizeHint(tls *libc.TLS, pFile uintptr, nByte I64) int32 { /* sqlite3.c:37931:12: */
bp := tls.Alloc(144)
defer tls.Free(144)
@@ -23953,7 +24972,7 @@ func fcntlSizeHint(tls *libc.TLS, pFile uintptr, nByte I64) int32 { /* sqlite3.c
if iWrite >= nSize {
iWrite = (nSize - int64(1))
}
- nWrite = seekAndWrite(tls, pFile, iWrite, ts+703 /* "" */, 1)
+ nWrite = seekAndWrite(tls, pFile, iWrite, ts+755 /* "" */, 1)
if nWrite != 1 {
return (SQLITE_IOERR | (int32(3) << 8))
}
@@ -23966,7 +24985,7 @@ func fcntlSizeHint(tls *libc.TLS, pFile uintptr, nByte I64) int32 { /* sqlite3.c
if (*UnixFile)(unsafe.Pointer(pFile)).FszChunk <= 0 {
if robust_ftruncate(tls, (*UnixFile)(unsafe.Pointer(pFile)).Fh, nByte) != 0 {
storeLastErrno(tls, pFile, *(*int32)(unsafe.Pointer(libc.X__errno_location(tls))))
- return unixLogErrorAtLine(tls, (SQLITE_IOERR | (int32(6) << 8)), ts+2352 /* "ftruncate" */, (*UnixFile)(unsafe.Pointer(pFile)).FzPath, 37785)
+ return unixLogErrorAtLine(tls, (SQLITE_IOERR | (int32(6) << 8)), ts+2424 /* "ftruncate" */, (*UnixFile)(unsafe.Pointer(pFile)).FzPath, 37982)
}
}
@@ -23981,7 +25000,7 @@ func fcntlSizeHint(tls *libc.TLS, pFile uintptr, nByte I64) int32 { /* sqlite3.c
// 1 or 0 depending on whether or not bit mask of pFile->ctrlFlags is set.
//
// If *pArg is 0 or 1, then clear or set the mask bit of pFile->ctrlFlags.
-func unixModeBit(tls *libc.TLS, pFile uintptr, mask uint8, pArg uintptr) { /* sqlite3.c:37803:13: */
+func unixModeBit(tls *libc.TLS, pFile uintptr, mask uint8, pArg uintptr) { /* sqlite3.c:38000:13: */
if *(*int32)(unsafe.Pointer(pArg)) < 0 {
*(*int32)(unsafe.Pointer(pArg)) = (libc.Bool32((int32((*UnixFile)(unsafe.Pointer(pFile)).FctrlFlags) & int32(mask)) != 0))
} else if (*(*int32)(unsafe.Pointer(pArg))) == 0 {
@@ -23992,7 +25011,7 @@ func unixModeBit(tls *libc.TLS, pFile uintptr, mask uint8, pArg uintptr) { /* sq
}
// Information and control of an open file handle.
-func unixFileControl(tls *libc.TLS, id uintptr, op int32, pArg uintptr) int32 { /* sqlite3.c:37819:12: */
+func unixFileControl(tls *libc.TLS, id uintptr, op int32, pArg uintptr) int32 { /* sqlite3.c:38017:12: */
bp := tls.Alloc(8)
defer tls.Free(8)
@@ -24040,7 +25059,7 @@ func unixFileControl(tls *libc.TLS, id uintptr, op int32, pArg uintptr) int32 {
}
case SQLITE_FCNTL_VFSNAME:
{
- *(*uintptr)(unsafe.Pointer(pArg)) = Xsqlite3_mprintf(tls, ts+2718 /* "%s" */, libc.VaList(bp, (*Sqlite3_vfs)(unsafe.Pointer((*UnixFile)(unsafe.Pointer(pFile)).FpVfs)).FzName))
+ *(*uintptr)(unsafe.Pointer(pArg)) = Xsqlite3_mprintf(tls, ts+2790 /* "%s" */, libc.VaList(bp, (*Sqlite3_vfs)(unsafe.Pointer((*UnixFile)(unsafe.Pointer(pFile)).FpVfs)).FzName))
return SQLITE_OK
}
@@ -24086,6 +25105,12 @@ func unixFileControl(tls *libc.TLS, id uintptr, op int32, pArg uintptr) int32 {
return rc
}
+
+ case SQLITE_FCNTL_EXTERNAL_READER:
+ {
+ return unixFcntlExternalReader(tls, id, pArg)
+
+ }
}
return SQLITE_NOTFOUND
}
@@ -24097,7 +25122,7 @@ func unixFileControl(tls *libc.TLS, id uintptr, op int32, pArg uintptr) int32 {
//
// There are two versions of this function. One for QNX and one for all
// other systems.
-func setDeviceCharacteristics(tls *libc.TLS, pFd uintptr) { /* sqlite3.c:37945:13: */
+func setDeviceCharacteristics(tls *libc.TLS, pFd uintptr) { /* sqlite3.c:38147:13: */
if (*UnixFile)(unsafe.Pointer(pFd)).FsectorSize == 0 {
@@ -24118,7 +25143,7 @@ func setDeviceCharacteristics(tls *libc.TLS, pFd uintptr) { /* sqlite3.c:37945:1
// if two files are created in the same file-system directory (i.e.
// a database and its journal file) that the sector size will be the
// same for both.
-func unixSectorSize(tls *libc.TLS, id uintptr) int32 { /* sqlite3.c:38052:12: */
+func unixSectorSize(tls *libc.TLS, id uintptr) int32 { /* sqlite3.c:38254:12: */
var pFd uintptr = id
setDeviceCharacteristics(tls, pFd)
return (*UnixFile)(unsafe.Pointer(pFd)).FsectorSize
@@ -24135,7 +25160,7 @@ func unixSectorSize(tls *libc.TLS, id uintptr) int32 { /* sqlite3.c:38052:12: */
// of required I/O for journaling, since a lot of padding is eliminated.
// Hence, while POWERSAFE_OVERWRITE is on by default, there is a file-control
// available to turn it off and URI query parameter available to turn it off.
-func unixDeviceCharacteristics(tls *libc.TLS, id uintptr) int32 { /* sqlite3.c:38071:12: */
+func unixDeviceCharacteristics(tls *libc.TLS, id uintptr) int32 { /* sqlite3.c:38273:12: */
var pFd uintptr = id
setDeviceCharacteristics(tls, pFd)
return (*UnixFile)(unsafe.Pointer(pFd)).FdeviceCharacteristics
@@ -24145,17 +25170,51 @@ func unixDeviceCharacteristics(tls *libc.TLS, id uintptr) int32 { /* sqlite3.c:3
//
// This function should not be called directly by other code in this file.
// Instead, it should be called via macro osGetpagesize().
-func unixGetpagesize(tls *libc.TLS) int32 { /* sqlite3.c:38085:12: */
+func unixGetpagesize(tls *libc.TLS) int32 { /* sqlite3.c:38287:12: */
return int32(libc.Xsysconf(tls, X_SC_PAGESIZE))
}
// Constants used for locking
+// Use F_GETLK to check whether or not there are any readers with open
+// wal-mode transactions in other processes on database file pFile. If
+// no error occurs, return SQLITE_OK and set (*piOut) to 1 if there are
+// such transactions, or 0 otherwise. If an error occurs, return an
+// SQLite error code. The final value of *piOut is undefined in this
+// case.
+func unixFcntlExternalReader(tls *libc.TLS, pFile uintptr, piOut uintptr) int32 { /* sqlite3.c:38386:12: */
+ bp := tls.Alloc(40)
+ defer tls.Free(40)
+
+ var rc int32 = SQLITE_OK
+ *(*int32)(unsafe.Pointer(piOut)) = 0
+ if (*UnixFile)(unsafe.Pointer(pFile)).FpShm != 0 {
+ var pShmNode uintptr = (*UnixShm)(unsafe.Pointer((*UnixFile)(unsafe.Pointer(pFile)).FpShm)).FpShmNode
+ // var f flock at bp+8, 32
+
+ libc.Xmemset(tls, bp+8 /* &f */, 0, uint64(unsafe.Sizeof(flock{})))
+ (*flock)(unsafe.Pointer(bp + 8 /* &f */)).Fl_type = int16(F_WRLCK)
+ (*flock)(unsafe.Pointer(bp + 8 /* &f */)).Fl_whence = int16(SEEK_SET)
+ (*flock)(unsafe.Pointer(bp + 8 /* &f */)).Fl_start = (int64(((22 + SQLITE_SHM_NLOCK) * 4) + 3))
+ (*flock)(unsafe.Pointer(bp + 8 /* &f */)).Fl_len = (int64(SQLITE_SHM_NLOCK - 3))
+
+ Xsqlite3_mutex_enter(tls, (*UnixShmNode)(unsafe.Pointer(pShmNode)).FpShmMutex)
+ if (*(*func(*libc.TLS, int32, int32, uintptr) int32)(unsafe.Pointer((uintptr(unsafe.Pointer(&aSyscall)) + 7*24 + 8 /* &.pCurrent */))))(tls, (*UnixShmNode)(unsafe.Pointer(pShmNode)).FhShm, F_GETLK64, libc.VaList(bp, bp+8 /* &f */)) < 0 {
+ rc = (SQLITE_IOERR | (int32(15) << 8))
+ } else {
+ *(*int32)(unsafe.Pointer(piOut)) = (libc.Bool32(int32((*flock)(unsafe.Pointer(bp+8 /* &f */)).Fl_type) != F_UNLCK))
+ }
+ Xsqlite3_mutex_leave(tls, (*UnixShmNode)(unsafe.Pointer(pShmNode)).FpShmMutex)
+ }
+
+ return rc
+}
+
// Apply posix advisory locks for all bytes from ofst through ofst+n-1.
//
// Locks block if the mask is exactly UNIX_SHM_C and are non-blocking
// otherwise.
-func unixShmSystemLock(tls *libc.TLS, pFile uintptr, lockType int32, ofst int32, n int32) int32 { /* sqlite3.c:38182:12: */
+func unixShmSystemLock(tls *libc.TLS, pFile uintptr, lockType int32, ofst int32, n int32) int32 { /* sqlite3.c:38418:12: */
bp := tls.Alloc(40)
defer tls.Free(40)
@@ -24196,7 +25255,7 @@ func unixShmSystemLock(tls *libc.TLS, pFile uintptr, lockType int32, ofst int32,
// Usually, this is 1. The exception seems to be systems that are configured
// to use 64KB pages - in this case each mapping must cover at least two
// shm regions.
-func unixShmRegionPerMap(tls *libc.TLS) int32 { /* sqlite3.c:38267:12: */
+func unixShmRegionPerMap(tls *libc.TLS) int32 { /* sqlite3.c:38503:12: */
var shmsz int32 = (32 * 1024) // SHM region size
var pgsz int32 = (*(*func(*libc.TLS) int32)(unsafe.Pointer((uintptr(unsafe.Pointer(&aSyscall)) + 25*24 + 8 /* &.pCurrent */))))(tls) // System page size
// Page size must be a power of 2
@@ -24210,7 +25269,7 @@ func unixShmRegionPerMap(tls *libc.TLS) int32 { /* sqlite3.c:38267:12: */
//
// This is not a VFS shared-memory method; it is a utility function called
// by VFS shared-memory methods.
-func unixShmPurge(tls *libc.TLS, pFd uintptr) { /* sqlite3.c:38281:13: */
+func unixShmPurge(tls *libc.TLS, pFd uintptr) { /* sqlite3.c:38517:13: */
var p uintptr = (*UnixInodeInfo)(unsafe.Pointer((*UnixFile)(unsafe.Pointer(pFd)).FpInode)).FpShmNode
if (p != 0) && ((*UnixShmNode)(unsafe.Pointer(p)).FnRef == 0) {
@@ -24227,7 +25286,7 @@ func unixShmPurge(tls *libc.TLS, pFd uintptr) { /* sqlite3.c:38281:13: */
}
Xsqlite3_free(tls, (*UnixShmNode)(unsafe.Pointer(p)).FapRegion)
if (*UnixShmNode)(unsafe.Pointer(p)).FhShm >= 0 {
- robust_close(tls, pFd, (*UnixShmNode)(unsafe.Pointer(p)).FhShm, 38298)
+ robust_close(tls, pFd, (*UnixShmNode)(unsafe.Pointer(p)).FhShm, 38534)
(*UnixShmNode)(unsafe.Pointer(p)).FhShm = -1
}
(*UnixInodeInfo)(unsafe.Pointer((*UnixShmNode)(unsafe.Pointer(p)).FpInode)).FpShmNode = uintptr(0)
@@ -24242,7 +25301,7 @@ func unixShmPurge(tls *libc.TLS, pFd uintptr) { /* sqlite3.c:38281:13: */
// If the DMS cannot be locked because this is a readonly_shm=1
// connection and no other process already holds a lock, return
// SQLITE_READONLY_CANTINIT and set pShmNode->isUnlocked=1.
-func unixLockSharedMemory(tls *libc.TLS, pDbFd uintptr, pShmNode uintptr) int32 { /* sqlite3.c:38315:12: */
+func unixLockSharedMemory(tls *libc.TLS, pDbFd uintptr, pShmNode uintptr) int32 { /* sqlite3.c:38551:12: */
bp := tls.Alloc(40)
defer tls.Free(40)
@@ -24286,7 +25345,7 @@ func unixLockSharedMemory(tls *libc.TLS, pDbFd uintptr, pShmNode uintptr) int32
// help detect if a -shm file truncation is legitimate or is the work
// or a rogue process.
if (rc == SQLITE_OK) && (robust_ftruncate(tls, (*UnixShmNode)(unsafe.Pointer(pShmNode)).FhShm, int64(3)) != 0) {
- rc = unixLogErrorAtLine(tls, (SQLITE_IOERR | (int32(18) << 8)), ts+2352 /* "ftruncate" */, (*UnixShmNode)(unsafe.Pointer(pShmNode)).FzFilename, 38355)
+ rc = unixLogErrorAtLine(tls, (SQLITE_IOERR | (int32(18) << 8)), ts+2424 /* "ftruncate" */, (*UnixShmNode)(unsafe.Pointer(pShmNode)).FzFilename, 38591)
}
}
} else if int32((*flock)(unsafe.Pointer(bp+8 /* &lock */)).Fl_type) == F_WRLCK {
@@ -24333,7 +25392,7 @@ func unixLockSharedMemory(tls *libc.TLS, pDbFd uintptr, pShmNode uintptr) int32
// that no other processes are able to read or write the database. In
// that case, we do not really need shared memory. No shared memory
// file is created. The shared memory will be simulated with heap memory.
-func unixOpenSharedMemory(tls *libc.TLS, pDbFd uintptr) int32 { /* sqlite3.c:38404:12: */
+func unixOpenSharedMemory(tls *libc.TLS, pDbFd uintptr) int32 { /* sqlite3.c:38640:12: */
bp := tls.Alloc(152)
defer tls.Free(152)
@@ -24392,7 +25451,7 @@ __4:
;
libc.Xmemset(tls, pShmNode, 0, (uint64(unsafe.Sizeof(unixShmNode{})) + uint64(nShmFilename)))
zShm = libc.AssignPtrUintptr(pShmNode+16 /* &.zFilename */, (pShmNode + 1*96))
- Xsqlite3_snprintf(tls, nShmFilename, zShm, ts+2732 /* "%s-shm" */, libc.VaList(bp, zBasePath))
+ Xsqlite3_snprintf(tls, nShmFilename, zShm, ts+2804 /* "%s-shm" */, libc.VaList(bp, zBasePath))
(*unixShmNode)(unsafe.Pointer(pShmNode)).FhShm = -1
(*UnixInodeInfo)(unsafe.Pointer((*UnixFile)(unsafe.Pointer(pDbFd)).FpInode)).FpShmNode = pShmNode
@@ -24414,7 +25473,7 @@ __5:
if !(int32((*UnixInodeInfo)(unsafe.Pointer(pInode)).FbProcessLock) == 0) {
goto __7
}
- if !(0 == Xsqlite3_uri_boolean(tls, (*UnixFile)(unsafe.Pointer(pDbFd)).FzPath, ts+2739 /* "readonly_shm" */, 0)) {
+ if !(0 == Xsqlite3_uri_boolean(tls, (*UnixFile)(unsafe.Pointer(pDbFd)).FzPath, ts+2811 /* "readonly_shm" */, 0)) {
goto __8
}
(*unixShmNode)(unsafe.Pointer(pShmNode)).FhShm = robust_open(tls, zShm, ((O_RDWR | O_CREAT) | 0400000),
@@ -24429,7 +25488,7 @@ __8:
if !((*unixShmNode)(unsafe.Pointer(pShmNode)).FhShm < 0) {
goto __10
}
- rc = unixLogErrorAtLine(tls, Xsqlite3CantopenError(tls, 38480), ts+2316 /* "open" */, zShm, 38480)
+ rc = unixLogErrorAtLine(tls, Xsqlite3CantopenError(tls, 38716), ts+2388 /* "open" */, zShm, 38716)
goto shm_open_err
__10:
;
@@ -24497,7 +25556,7 @@ shm_open_err:
// this call as described above, then it is mapped into this processes
// address space (if it is not already), *pp is set to point to the mapped
// memory and SQLITE_OK returned.
-func unixShmMap(tls *libc.TLS, fd uintptr, iRegion int32, szRegion int32, bExtend int32, pp uintptr) int32 { /* sqlite3.c:38546:12: */
+func unixShmMap(tls *libc.TLS, fd uintptr, iRegion int32, szRegion int32, bExtend int32, pp uintptr) int32 { /* sqlite3.c:38782:12: */
bp := tls.Alloc(148)
defer tls.Free(148)
@@ -24596,11 +25655,11 @@ __11:
goto __13
}
*(*int32)(unsafe.Pointer(bp + 144 /* x */)) = 0
- if !(seekAndWriteFd(tls, (*UnixShmNode)(unsafe.Pointer(pShmNode)).FhShm, (int64(((iPg*pgsz)+pgsz)-1)), ts+703 /* "" */, 1, bp+144 /* &x */) != 1) {
+ if !(seekAndWriteFd(tls, (*UnixShmNode)(unsafe.Pointer(pShmNode)).FhShm, (int64(((iPg*pgsz)+pgsz)-1)), ts+755 /* "" */, 1, bp+144 /* &x */) != 1) {
goto __14
}
zFile = (*UnixShmNode)(unsafe.Pointer(pShmNode)).FzFilename
- rc = unixLogErrorAtLine(tls, (SQLITE_IOERR | (int32(19) << 8)), ts+2387 /* "write" */, zFile, 38624)
+ rc = unixLogErrorAtLine(tls, (SQLITE_IOERR | (int32(19) << 8)), ts+2459 /* "write" */, zFile, 38860)
goto shmpage_out
__14:
;
@@ -24648,7 +25707,7 @@ __16:
if !(pMem == (libc.UintptrFromInt32(-1))) {
goto __20
}
- rc = unixLogErrorAtLine(tls, (SQLITE_IOERR | (int32(21) << 8)), ts+2474 /* "mmap" */, (*UnixShmNode)(unsafe.Pointer(pShmNode)).FzFilename, 38651)
+ rc = unixLogErrorAtLine(tls, (SQLITE_IOERR | (int32(21) << 8)), ts+2546 /* "mmap" */, (*UnixShmNode)(unsafe.Pointer(pShmNode)).FzFilename, 38887)
goto shmpage_out
__20:
;
@@ -24690,10 +25749,10 @@ shmpage_out:
if !(int32((*UnixShmNode)(unsafe.Pointer(pShmNode)).FnRegion) > iRegion) {
goto __25
}
- *(*uintptr)(unsafe.Pointer(libc.AtomicLoadUintptr(&pp))) = *(*uintptr)(unsafe.Pointer((*UnixShmNode)(unsafe.Pointer(pShmNode)).FapRegion + uintptr(iRegion)*8))
+ *(*uintptr)(unsafe.Pointer(pp)) = *(*uintptr)(unsafe.Pointer((*UnixShmNode)(unsafe.Pointer(pShmNode)).FapRegion + uintptr(iRegion)*8))
goto __26
__25:
- *(*uintptr)(unsafe.Pointer(libc.AtomicLoadUintptr(&pp))) = uintptr(0)
+ *(*uintptr)(unsafe.Pointer(pp)) = uintptr(0)
__26:
;
if !(((*UnixShmNode)(unsafe.Pointer(pShmNode)).FisReadonly != 0) && (rc == SQLITE_OK)) {
@@ -24706,7 +25765,7 @@ __27:
return rc
}
-var pgsz int32 = 4096 /* sqlite3.c:38615:28 */
+var pgsz int32 = 4096 /* sqlite3.c:38851:28 */
// Check that the pShmNode->aLock[] array comports with the locking bitmasks
// held by each client. Return true if it does, or false otherwise. This
@@ -24720,7 +25779,7 @@ var pgsz int32 = 4096 /* sqlite3.c:38615:28 */
// different here than in posix. In xShmLock(), one can go from unlocked
// to shared and back or from unlocked to exclusive and back. But one may
// not go from shared to exclusive or from exclusive to shared.
-func unixShmLock(tls *libc.TLS, fd uintptr, ofst int32, n int32, flags int32) int32 { /* sqlite3.c:38721:12: */
+func unixShmLock(tls *libc.TLS, fd uintptr, ofst int32, n int32, flags int32) int32 { /* sqlite3.c:38957:12: */
var pDbFd uintptr = fd // Connection holding shared memory
var p uintptr = (*UnixFile)(unsafe.Pointer(pDbFd)).FpShm // The shared memory being locked
var pShmNode uintptr = (*UnixShm)(unsafe.Pointer(p)).FpShmNode // The underlying file iNode
@@ -24827,7 +25886,7 @@ func unixShmLock(tls *libc.TLS, fd uintptr, ofst int32, n int32, flags int32) in
//
// All loads and stores begun before the barrier must complete before
// any load or store begun after the barrier.
-func unixShmBarrier(tls *libc.TLS, fd uintptr) { /* sqlite3.c:38853:13: */
+func unixShmBarrier(tls *libc.TLS, fd uintptr) { /* sqlite3.c:39089:13: */
_ = fd
// compiler-defined memory barrier
@@ -24840,7 +25899,7 @@ func unixShmBarrier(tls *libc.TLS, fd uintptr) { /* sqlite3.c:38853:13: */
//
// If there is no shared memory associated with the connection then this
// routine is a harmless no-op.
-func unixShmUnmap(tls *libc.TLS, fd uintptr, deleteFlag int32) int32 { /* sqlite3.c:38872:12: */
+func unixShmUnmap(tls *libc.TLS, fd uintptr, deleteFlag int32) int32 { /* sqlite3.c:39108:12: */
var p uintptr // The connection to be closed
var pShmNode uintptr // The underlying shared-memory file
var pp uintptr // For looping over sibling connections
@@ -24883,7 +25942,7 @@ func unixShmUnmap(tls *libc.TLS, fd uintptr, deleteFlag int32) int32 { /* sqlite
}
// If it is currently memory mapped, unmap file pFd.
-func unixUnmapfile(tls *libc.TLS, pFd uintptr) { /* sqlite3.c:38929:13: */
+func unixUnmapfile(tls *libc.TLS, pFd uintptr) { /* sqlite3.c:39165:13: */
if (*UnixFile)(unsafe.Pointer(pFd)).FpMapRegion != 0 {
(*(*func(*libc.TLS, uintptr, Size_t) int32)(unsafe.Pointer((uintptr(unsafe.Pointer(&aSyscall)) + 23*24 + 8 /* &.pCurrent */))))(tls, (*UnixFile)(unsafe.Pointer(pFd)).FpMapRegion, uint64((*UnixFile)(unsafe.Pointer(pFd)).FmmapSizeActual))
@@ -24906,8 +25965,8 @@ func unixUnmapfile(tls *libc.TLS, pFd uintptr) { /* sqlite3.c:38929:13: */
// the three variables above are zeroed. In this case SQLite should
// continue accessing the database using the xRead() and xWrite()
// methods.
-func unixRemapfile(tls *libc.TLS, pFd uintptr, nNew I64) { /* sqlite3.c:38954:13: */
- var zErr uintptr = ts + 2474 /* "mmap" */
+func unixRemapfile(tls *libc.TLS, pFd uintptr, nNew I64) { /* sqlite3.c:39190:13: */
+ var zErr uintptr = ts + 2546 /* "mmap" */
var h int32 = (*UnixFile)(unsafe.Pointer(pFd)).Fh // File descriptor open on db file
var pOrig uintptr = (*UnixFile)(unsafe.Pointer(pFd)).FpMapRegion // Pointer to current file mapping
var nOrig I64 = (*UnixFile)(unsafe.Pointer(pFd)).FmmapSizeActual // Size of pOrig region in bytes
@@ -24924,7 +25983,7 @@ func unixRemapfile(tls *libc.TLS, pFd uintptr, nNew I64) { /* sqlite3.c:38954:13
}
pNew = (*(*func(*libc.TLS, uintptr, Size_t, Size_t, int32, uintptr) uintptr)(unsafe.Pointer((uintptr(unsafe.Pointer(&aSyscall)) + 24*24 + 8 /* &.pCurrent */))))(tls, pOrig, uint64(nReuse), uint64(nNew), MREMAP_MAYMOVE, 0)
- zErr = ts + 2486 /* "mremap" */
+ zErr = ts + 2558 /* "mremap" */
// The attempt to extend the existing mapping failed. Free it.
if (pNew == (libc.UintptrFromInt32(-1))) || (pNew == uintptr(0)) {
@@ -24940,7 +25999,7 @@ func unixRemapfile(tls *libc.TLS, pFd uintptr, nNew I64) { /* sqlite3.c:38954:13
if pNew == (libc.UintptrFromInt32(-1)) {
pNew = uintptr(0)
nNew = int64(0)
- unixLogErrorAtLine(tls, SQLITE_OK, zErr, (*UnixFile)(unsafe.Pointer(pFd)).FzPath, 39019)
+ unixLogErrorAtLine(tls, SQLITE_OK, zErr, (*UnixFile)(unsafe.Pointer(pFd)).FzPath, 39255)
// If the mmap() above failed, assume that all subsequent mmap() calls
// will probably fail too. Fall back to using xRead/xWrite exclusively
@@ -24965,7 +26024,7 @@ func unixRemapfile(tls *libc.TLS, pFd uintptr, nNew I64) { /* sqlite3.c:38954:13
// SQLITE_OK is returned if no error occurs (even if the mapping is not
// recreated as a result of outstanding references) or an SQLite error
// code otherwise.
-func unixMapfile(tls *libc.TLS, pFd uintptr, nMap I64) int32 { /* sqlite3.c:39046:12: */
+func unixMapfile(tls *libc.TLS, pFd uintptr, nMap I64) int32 { /* sqlite3.c:39282:12: */
bp := tls.Alloc(144)
defer tls.Free(144)
@@ -25002,7 +26061,7 @@ func unixMapfile(tls *libc.TLS, pFd uintptr, nMap I64) int32 { /* sqlite3.c:3904
//
// If this function does return a pointer, the caller must eventually
// release the reference by calling unixUnfetch().
-func unixFetch(tls *libc.TLS, fd uintptr, iOff I64, nAmt int32, pp uintptr) int32 { /* sqlite3.c:39083:12: */
+func unixFetch(tls *libc.TLS, fd uintptr, iOff I64, nAmt int32, pp uintptr) int32 { /* sqlite3.c:39319:12: */
var pFd uintptr = fd // The underlying database file
*(*uintptr)(unsafe.Pointer(pp)) = uintptr(0)
@@ -25029,7 +26088,7 @@ func unixFetch(tls *libc.TLS, fd uintptr, iOff I64, nAmt int32, pp uintptr) int3
// Or, if the third argument is NULL, then this function is being called
// to inform the VFS layer that, according to POSIX, any existing mapping
// may now be invalid and should be unmapped.
-func unixUnfetch(tls *libc.TLS, fd uintptr, iOff I64, p uintptr) int32 { /* sqlite3.c:39114:12: */
+func unixUnfetch(tls *libc.TLS, fd uintptr, iOff I64, p uintptr) int32 { /* sqlite3.c:39350:12: */
var pFd uintptr = fd // The underlying database file
_ = iOff
@@ -25090,33 +26149,33 @@ func unixUnfetch(tls *libc.TLS, fd uintptr, iOff I64, p uintptr) int32 { /* sqli
// Here are all of the sqlite3_io_methods objects for each of the
// locking strategies. Functions that return pointers to these methods
// are also created.
-var posixIoMethods = Sqlite3_io_methods{FiVersion: 3 /* iVersion */, FxClose: 0 /* xClose */, FxRead: 0 /* xRead */, FxWrite: 0 /* xWrite */, FxTruncate: 0 /* xTruncate */, FxSync: 0 /* xSync */, FxFileSize: 0 /* xFileSize */, FxLock: 0 /* xLock */, FxUnlock: 0 /* xUnlock */, FxCheckReservedLock: 0 /* xCheckReservedLock */, FxFileControl: 0 /* xFileControl */, FxSectorSize: 0 /* xSectorSize */, FxDeviceCharacteristics: 0 /* xDeviceCapabilities */, FxShmMap: 0 /* xShmMap */, FxShmLock: 0 /* xShmLock */, FxShmBarrier: 0 /* xShmBarrier */, FxShmUnmap: 0 /* xShmUnmap */, FxFetch: 0 /* xFetch */, FxUnfetch: 0 /* xUnfetch */} /* sqlite3.c:39216:1 */
+var posixIoMethods = Sqlite3_io_methods{FiVersion: 3 /* iVersion */, FxClose: 0 /* xClose */, FxRead: 0 /* xRead */, FxWrite: 0 /* xWrite */, FxTruncate: 0 /* xTruncate */, FxSync: 0 /* xSync */, FxFileSize: 0 /* xFileSize */, FxLock: 0 /* xLock */, FxUnlock: 0 /* xUnlock */, FxCheckReservedLock: 0 /* xCheckReservedLock */, FxFileControl: 0 /* xFileControl */, FxSectorSize: 0 /* xSectorSize */, FxDeviceCharacteristics: 0 /* xDeviceCapabilities */, FxShmMap: 0 /* xShmMap */, FxShmLock: 0 /* xShmLock */, FxShmBarrier: 0 /* xShmBarrier */, FxShmUnmap: 0 /* xShmUnmap */, FxFetch: 0 /* xFetch */, FxUnfetch: 0 /* xUnfetch */} /* sqlite3.c:39452:1 */
-func posixIoFinderImpl(tls *libc.TLS, z uintptr, p uintptr) uintptr { /* sqlite3.c:39216:1: */
+func posixIoFinderImpl(tls *libc.TLS, z uintptr, p uintptr) uintptr { /* sqlite3.c:39452:1: */
_ = z
_ = p
return uintptr(unsafe.Pointer(&posixIoMethods))
}
-var posixIoFinder uintptr = 0 /* sqlite3.c:39216:1 */
-var nolockIoMethods = Sqlite3_io_methods{FiVersion: 3 /* iVersion */, FxClose: 0 /* xClose */, FxRead: 0 /* xRead */, FxWrite: 0 /* xWrite */, FxTruncate: 0 /* xTruncate */, FxSync: 0 /* xSync */, FxFileSize: 0 /* xFileSize */, FxLock: 0 /* xLock */, FxUnlock: 0 /* xUnlock */, FxCheckReservedLock: 0 /* xCheckReservedLock */, FxFileControl: 0 /* xFileControl */, FxSectorSize: 0 /* xSectorSize */, FxDeviceCharacteristics: 0 /* xShmMap */, FxShmLock: 0 /* xShmLock */, FxShmBarrier: 0 /* xShmBarrier */, FxShmUnmap: 0 /* xShmUnmap */, FxFetch: 0 /* xFetch */, FxUnfetch: 0 /* xUnfetch */} /* sqlite3.c:39226:1 */
+var posixIoFinder uintptr = 0 /* sqlite3.c:39452:1 */
+var nolockIoMethods = Sqlite3_io_methods{FiVersion: 3 /* iVersion */, FxClose: 0 /* xClose */, FxRead: 0 /* xRead */, FxWrite: 0 /* xWrite */, FxTruncate: 0 /* xTruncate */, FxSync: 0 /* xSync */, FxFileSize: 0 /* xFileSize */, FxLock: 0 /* xLock */, FxUnlock: 0 /* xUnlock */, FxCheckReservedLock: 0 /* xCheckReservedLock */, FxFileControl: 0 /* xFileControl */, FxSectorSize: 0 /* xSectorSize */, FxDeviceCharacteristics: 0 /* xShmMap */, FxShmLock: 0 /* xShmLock */, FxShmBarrier: 0 /* xShmBarrier */, FxShmUnmap: 0 /* xShmUnmap */, FxFetch: 0 /* xFetch */, FxUnfetch: 0 /* xUnfetch */} /* sqlite3.c:39462:1 */
-func nolockIoFinderImpl(tls *libc.TLS, z uintptr, p uintptr) uintptr { /* sqlite3.c:39226:1: */
+func nolockIoFinderImpl(tls *libc.TLS, z uintptr, p uintptr) uintptr { /* sqlite3.c:39462:1: */
_ = z
_ = p
return uintptr(unsafe.Pointer(&nolockIoMethods))
}
-var nolockIoFinder uintptr = 0 /* sqlite3.c:39226:1 */
-var dotlockIoMethods = Sqlite3_io_methods{FiVersion: 1 /* iVersion */, FxClose: 0 /* xClose */, FxRead: 0 /* xRead */, FxWrite: 0 /* xWrite */, FxTruncate: 0 /* xTruncate */, FxSync: 0 /* xSync */, FxFileSize: 0 /* xFileSize */, FxLock: 0 /* xLock */, FxUnlock: 0 /* xUnlock */, FxCheckReservedLock: 0 /* xCheckReservedLock */, FxFileControl: 0 /* xFileControl */, FxSectorSize: 0 /* xSectorSize */, FxDeviceCharacteristics: 0 /* xShmMap */, FxShmLock: 0 /* xShmLock */, FxShmBarrier: 0 /* xShmBarrier */, FxShmUnmap: 0 /* xShmUnmap */, FxFetch: 0 /* xFetch */, FxUnfetch: 0 /* xUnfetch */} /* sqlite3.c:39236:1 */
+var nolockIoFinder uintptr = 0 /* sqlite3.c:39462:1 */
+var dotlockIoMethods = Sqlite3_io_methods{FiVersion: 1 /* iVersion */, FxClose: 0 /* xClose */, FxRead: 0 /* xRead */, FxWrite: 0 /* xWrite */, FxTruncate: 0 /* xTruncate */, FxSync: 0 /* xSync */, FxFileSize: 0 /* xFileSize */, FxLock: 0 /* xLock */, FxUnlock: 0 /* xUnlock */, FxCheckReservedLock: 0 /* xCheckReservedLock */, FxFileControl: 0 /* xFileControl */, FxSectorSize: 0 /* xSectorSize */, FxDeviceCharacteristics: 0 /* xShmMap */, FxShmLock: 0 /* xShmLock */, FxShmBarrier: 0 /* xShmBarrier */, FxShmUnmap: 0 /* xShmUnmap */, FxFetch: 0 /* xFetch */, FxUnfetch: 0 /* xUnfetch */} /* sqlite3.c:39472:1 */
-func dotlockIoFinderImpl(tls *libc.TLS, z uintptr, p uintptr) uintptr { /* sqlite3.c:39236:1: */
+func dotlockIoFinderImpl(tls *libc.TLS, z uintptr, p uintptr) uintptr { /* sqlite3.c:39472:1: */
_ = z
_ = p
return uintptr(unsafe.Pointer(&dotlockIoMethods))
}
-var dotlockIoFinder uintptr = 0 /* sqlite3.c:39236:1 */
+var dotlockIoFinder uintptr = 0 /* sqlite3.c:39472:1 */
// The proxy locking method is a "super-method" in the sense that it
// opens secondary file descriptors for the conch and lock files and
@@ -25129,7 +26188,7 @@ var dotlockIoFinder uintptr = 0 /* sqlite3.c:39236:1 */
// nfs lockd on OSX 10.3+ doesn't clear write locks when a read lock is set
// An abstract type for a pointer to an IO method finder function:
-type Finder_type = uintptr /* sqlite3.c:39431:34 */
+type Finder_type = uintptr /* sqlite3.c:39667:34 */
// ***************************************************************************
//
@@ -25139,7 +26198,7 @@ type Finder_type = uintptr /* sqlite3.c:39431:34 */
// sqlite3_vfs object.
// Initialize the contents of the unixFile structure pointed to by pId.
-func fillInUnixFile(tls *libc.TLS, pVfs uintptr, h int32, pId uintptr, zFilename uintptr, ctrlFlags int32) int32 { /* sqlite3.c:39444:12: */
+func fillInUnixFile(tls *libc.TLS, pVfs uintptr, h int32, pId uintptr, zFilename uintptr, ctrlFlags int32) int32 { /* sqlite3.c:39680:12: */
bp := tls.Alloc(8)
defer tls.Free(8)
@@ -25160,17 +26219,19 @@ func fillInUnixFile(tls *libc.TLS, pVfs uintptr, h int32, pId uintptr, zFilename
}
return uintptr(0)
}(),
- ts+2752 /* "psow" */, SQLITE_POWERSAFE_OVERWRITE) != 0 {
+ ts+2824 /* "psow" */, SQLITE_POWERSAFE_OVERWRITE) != 0 {
*(*uint16)(unsafe.Pointer(pNew + 30 /* &.ctrlFlags */)) |= uint16((UNIXFILE_PSOW))
}
- if libc.Xstrcmp(tls, (*Sqlite3_vfs)(unsafe.Pointer(pVfs)).FzName, ts+2757 /* "unix-excl" */) == 0 {
+ if libc.Xstrcmp(tls, (*Sqlite3_vfs)(unsafe.Pointer(pVfs)).FzName, ts+2829 /* "unix-excl" */) == 0 {
*(*uint16)(unsafe.Pointer(pNew + 30 /* &.ctrlFlags */)) |= uint16((UNIXFILE_EXCL))
}
if (ctrlFlags & UNIXFILE_NOLOCK) != 0 {
pLockingStyle = uintptr(unsafe.Pointer(&nolockIoMethods))
} else {
- pLockingStyle = (**(**func(*libc.TLS, uintptr, uintptr) uintptr)(unsafe.Pointer((pVfs + 32 /* &.pAppData */))))(tls, zFilename, pNew)
+ pLockingStyle = (*(**struct {
+ f func(*libc.TLS, uintptr, uintptr) uintptr
+ })(unsafe.Pointer(&struct{ uintptr }{(*Sqlite3_vfs)(unsafe.Pointer(pVfs)).FpAppData}))).f(tls, zFilename, pNew)
}
if pLockingStyle == uintptr(unsafe.Pointer(&posixIoMethods)) {
@@ -25194,7 +26255,7 @@ func fillInUnixFile(tls *libc.TLS, pVfs uintptr, h int32, pId uintptr, zFilename
// If scenario (a) caused the error then things are not so safe. The
// implicit assumption here is that if fstat() fails, things are in
// such bad shape that dropping a lock or two doesn't matter much.
- robust_close(tls, pNew, h, 39522)
+ robust_close(tls, pNew, h, 39758)
h = -1
}
unixLeaveMutex(tls)
@@ -25209,7 +26270,7 @@ func fillInUnixFile(tls *libc.TLS, pVfs uintptr, h int32, pId uintptr, zFilename
if zLockFile == uintptr(0) {
rc = SQLITE_NOMEM
} else {
- Xsqlite3_snprintf(tls, nFilename, zLockFile, ts+2767 /* "%s.lock" */, libc.VaList(bp, zFilename))
+ Xsqlite3_snprintf(tls, nFilename, zLockFile, ts+2839 /* "%s.lock" */, libc.VaList(bp, zFilename))
}
(*UnixFile)(unsafe.Pointer(pNew)).FlockingContext = zLockFile
}
@@ -25217,7 +26278,7 @@ func fillInUnixFile(tls *libc.TLS, pVfs uintptr, h int32, pId uintptr, zFilename
storeLastErrno(tls, pNew, 0)
if rc != SQLITE_OK {
if h >= 0 {
- robust_close(tls, pNew, h, 39607)
+ robust_close(tls, pNew, h, 39843)
}
} else {
(*Sqlite3_file)(unsafe.Pointer(pId)).FpMethods = pLockingStyle
@@ -25229,7 +26290,7 @@ func fillInUnixFile(tls *libc.TLS, pVfs uintptr, h int32, pId uintptr, zFilename
// Return the name of a directory in which to put temporary files.
// If no suitable temporary file directory can be found, return NULL.
-func unixTempFileDir(tls *libc.TLS) uintptr { /* sqlite3.c:39620:19: */
+func unixTempFileDir(tls *libc.TLS) uintptr { /* sqlite3.c:39856:19: */
bp := tls.Alloc(144)
defer tls.Free(144)
@@ -25239,10 +26300,10 @@ func unixTempFileDir(tls *libc.TLS) uintptr { /* sqlite3.c:39620:19: */
var zDir uintptr = Xsqlite3_temp_directory
if !(int32(azDirs[0]) != 0) {
- azDirs[0] = libc.Xgetenv(tls, ts+2775 /* "SQLITE_TMPDIR" */)
+ azDirs[0] = libc.Xgetenv(tls, ts+2847 /* "SQLITE_TMPDIR" */)
}
if !(int32(azDirs[1]) != 0) {
- azDirs[1] = libc.Xgetenv(tls, ts+2789 /* "TMPDIR" */)
+ azDirs[1] = libc.Xgetenv(tls, ts+2861 /* "TMPDIR" */)
}
for 1 != 0 {
if (((zDir != uintptr(0)) &&
@@ -25262,16 +26323,16 @@ func unixTempFileDir(tls *libc.TLS) uintptr { /* sqlite3.c:39620:19: */
var azDirs = [6]uintptr{
uintptr(0),
uintptr(0),
- ts + 2796, /* "/var/tmp" */
- ts + 2805, /* "/usr/tmp" */
- ts + 2814, /* "/tmp" */
- ts + 716, /* "." */
-} /* sqlite3.c:39621:21 */
+ ts + 2868, /* "/var/tmp" */
+ ts + 2877, /* "/usr/tmp" */
+ ts + 2886, /* "/tmp" */
+ ts + 768, /* "." */
+} /* sqlite3.c:39857:21 */
// Create a temporary file name in zBuf. zBuf must be allocated
// by the calling process and must be big enough to hold at least
// pVfs->mxPathname bytes.
-func unixGetTempname(tls *libc.TLS, nBuf int32, zBuf uintptr) int32 { /* sqlite3.c:39654:12: */
+func unixGetTempname(tls *libc.TLS, nBuf int32, zBuf uintptr) int32 { /* sqlite3.c:39890:12: */
bp := tls.Alloc(32)
defer tls.Free(32)
@@ -25281,7 +26342,7 @@ func unixGetTempname(tls *libc.TLS, nBuf int32, zBuf uintptr) int32 { /* sqlite3
// It's odd to simulate an io-error here, but really this is just
// using the io-error infrastructure to test that SQLite handles this
// function failing.
- *(*int8)(unsafe.Pointer(zBuf)) = int8(0)
+ *(*uint8)(unsafe.Pointer(zBuf)) = uint8(0)
zDir = unixTempFileDir(tls)
if zDir == uintptr(0) {
@@ -25292,10 +26353,10 @@ func unixGetTempname(tls *libc.TLS, nBuf int32, zBuf uintptr) int32 { /* sqlite3
Xsqlite3_randomness(tls, int32(unsafe.Sizeof(U64(0))), bp+24 /* &r */)
- *(*int8)(unsafe.Pointer(zBuf + uintptr((nBuf - 2)))) = int8(0)
- Xsqlite3_snprintf(tls, nBuf, zBuf, ts+2819, /* "%s/etilqs_%llx%c" */
+ *(*uint8)(unsafe.Pointer(zBuf + uintptr((nBuf - 2)))) = uint8(0)
+ Xsqlite3_snprintf(tls, nBuf, zBuf, ts+2891, /* "%s/etilqs_%llx%c" */
libc.VaList(bp, zDir, *(*U64)(unsafe.Pointer(bp + 24 /* r */)), 0))
- if (int32(*(*int8)(unsafe.Pointer(zBuf + uintptr((nBuf - 2))))) != 0) || ((libc.PostIncInt32(&iLimit, 1)) > 10) {
+ if (int32(*(*uint8)(unsafe.Pointer(zBuf + uintptr((nBuf - 2))))) != 0) || ((libc.PostIncInt32(&iLimit, 1)) > 10) {
return SQLITE_ERROR
}
}
@@ -25316,7 +26377,7 @@ func unixGetTempname(tls *libc.TLS, nBuf int32, zBuf uintptr) int32 { /* sqlite3
//
// If a suitable file descriptor is found, then it is returned. If no
// such file descriptor is located, -1 is returned.
-func findReusableFd(tls *libc.TLS, zPath uintptr, flags int32) uintptr { /* sqlite3.c:39704:21: */
+func findReusableFd(tls *libc.TLS, zPath uintptr, flags int32) uintptr { /* sqlite3.c:39940:21: */
bp := tls.Alloc(144)
defer tls.Free(144)
@@ -25367,7 +26428,7 @@ func findReusableFd(tls *libc.TLS, zPath uintptr, flags int32) uintptr { /* sqli
}
// Find the mode, uid and gid of file zFile.
-func getFileMode(tls *libc.TLS, zFile uintptr, pMode uintptr, pUid uintptr, pGid uintptr) int32 { /* sqlite3.c:39754:12: */
+func getFileMode(tls *libc.TLS, zFile uintptr, pMode uintptr, pUid uintptr, pGid uintptr) int32 { /* sqlite3.c:39990:12: */
bp := tls.Alloc(144)
defer tls.Free(144)
@@ -25403,7 +26464,7 @@ func getFileMode(tls *libc.TLS, zFile uintptr, pMode uintptr, pUid uintptr, pGid
// original filename is unavailable. But 8_3_NAMES is only used for
// FAT filesystems and permissions do not matter there, so just use
// the default permissions. In 8_3_NAMES mode, leave *pMode set to zero.
-func findCreateFileMode(tls *libc.TLS, zPath uintptr, flags int32, pMode uintptr, pUid uintptr, pGid uintptr) int32 { /* sqlite3.c:39793:12: */
+func findCreateFileMode(tls *libc.TLS, zPath uintptr, flags int32, pMode uintptr, pUid uintptr, pGid uintptr) int32 { /* sqlite3.c:40029:12: */
bp := tls.Alloc(513)
defer tls.Free(513)
@@ -25412,7 +26473,7 @@ func findCreateFileMode(tls *libc.TLS, zPath uintptr, flags int32, pMode uintptr
*(*Uid_t)(unsafe.Pointer(pUid)) = Uid_t(0)
*(*Gid_t)(unsafe.Pointer(pGid)) = Gid_t(0)
if (flags & (SQLITE_OPEN_WAL | SQLITE_OPEN_MAIN_JOURNAL)) != 0 {
- // var zDb [513]int8 at bp, 513
+ // var zDb [513]uint8 at bp, 513
// Database file path
var nDb int32 // Number of valid bytes in zDb
@@ -25428,18 +26489,18 @@ func findCreateFileMode(tls *libc.TLS, zPath uintptr, flags int32, pMode uintptr
// where NN is a decimal number. The NN naming schemes are
// used by the test_multiplex.c module.
nDb = (Xsqlite3Strlen30(tls, zPath) - 1)
- for int32(*(*int8)(unsafe.Pointer(zPath + uintptr(nDb)))) != '-' {
+ for int32(*(*uint8)(unsafe.Pointer(zPath + uintptr(nDb)))) != '-' {
// In normal operation, the journal file name will always contain
// a '-' character. However in 8+3 filename mode, or if a corrupt
// rollback journal specifies a super-journal with a goofy name, then
// the '-' might be missing.
- if (nDb == 0) || (int32(*(*int8)(unsafe.Pointer(zPath + uintptr(nDb)))) == '.') {
+ if (nDb == 0) || (int32(*(*uint8)(unsafe.Pointer(zPath + uintptr(nDb)))) == '.') {
return SQLITE_OK
}
nDb--
}
libc.Xmemcpy(tls, bp /* &zDb[0] */, zPath, uint64(nDb))
- *(*int8)(unsafe.Pointer(bp /* &zDb[0] */ + uintptr(nDb))) = int8(0)
+ *(*uint8)(unsafe.Pointer(bp /* &zDb[0] */ + uintptr(nDb))) = uint8(0)
rc = getFileMode(tls, bp /* &zDb[0] */, pMode, pUid, pGid)
} else if (flags & SQLITE_OPEN_DELETEONCLOSE) != 0 {
@@ -25449,7 +26510,7 @@ func findCreateFileMode(tls *libc.TLS, zPath uintptr, flags int32, pMode uintptr
// filename, check for the "modeof" parameter. If present, interpret
// its value as a filename and try to copy the mode, uid and gid from
// that file.
- var z uintptr = Xsqlite3_uri_parameter(tls, zPath, ts+2836 /* "modeof" */)
+ var z uintptr = Xsqlite3_uri_parameter(tls, zPath, ts+2908 /* "modeof" */)
if z != 0 {
rc = getFileMode(tls, z, pMode, pUid, pGid)
}
@@ -25477,7 +26538,7 @@ func findCreateFileMode(tls *libc.TLS, zPath uintptr, flags int32, pMode uintptr
// file handle closed. To achieve the same effect using this new
// interface, add the DELETEONCLOSE flag to those specified above for
// OpenExclusive().
-func unixOpen(tls *libc.TLS, pVfs uintptr, zPath uintptr, pFile uintptr, flags int32, pOutFlags uintptr) int32 { /* sqlite3.c:39870:12: */
+func unixOpen(tls *libc.TLS, pVfs uintptr, zPath uintptr, pFile uintptr, flags int32, pOutFlags uintptr) int32 { /* sqlite3.c:40106:12: */
bp := tls.Alloc(528)
defer tls.Free(528)
@@ -25502,7 +26563,7 @@ func unixOpen(tls *libc.TLS, pVfs uintptr, zPath uintptr, pFile uintptr, flags i
// If argument zPath is a NULL pointer, this function is required to open
// a temporary file. Use this buffer to store the file name in.
- // var zTmpname [514]int8 at bp, 514
+ // var zTmpname [514]uint8 at bp, 514
var zName uintptr
var pUnused uintptr
@@ -25675,7 +26736,7 @@ __15:
if !(fd < 0) {
goto __19
}
- rc2 = unixLogErrorAtLine(tls, Xsqlite3CantopenError(tls, 40021), ts+2316 /* "open" */, zName, 40021)
+ rc2 = unixLogErrorAtLine(tls, Xsqlite3CantopenError(tls, 40257), ts+2388 /* "open" */, zName, 40257)
if !(rc == SQLITE_OK) {
goto __20
}
@@ -25775,7 +26836,7 @@ __30:
// Delete the file at zPath. If the dirSync argument is true, fsync()
// the directory after deleting the file.
-func unixDelete(tls *libc.TLS, NotUsed uintptr, zPath uintptr, dirSync int32) int32 { /* sqlite3.c:40144:12: */
+func unixDelete(tls *libc.TLS, NotUsed uintptr, zPath uintptr, dirSync int32) int32 { /* sqlite3.c:40380:12: */
bp := tls.Alloc(4)
defer tls.Free(4)
@@ -25786,7 +26847,7 @@ func unixDelete(tls *libc.TLS, NotUsed uintptr, zPath uintptr, dirSync int32) in
if (*(*int32)(unsafe.Pointer(libc.X__errno_location(tls)))) == ENOENT {
rc = (SQLITE_IOERR | (int32(23) << 8))
} else {
- rc = unixLogErrorAtLine(tls, (SQLITE_IOERR | (int32(10) << 8)), ts+2426 /* "unlink" */, zPath, 40160)
+ rc = unixLogErrorAtLine(tls, (SQLITE_IOERR | (int32(10) << 8)), ts+2498 /* "unlink" */, zPath, 40396)
}
return rc
}
@@ -25796,9 +26857,9 @@ func unixDelete(tls *libc.TLS, NotUsed uintptr, zPath uintptr, dirSync int32) in
rc = (*(*func(*libc.TLS, uintptr, uintptr) int32)(unsafe.Pointer((uintptr(unsafe.Pointer(&aSyscall)) + 17*24 + 8 /* &.pCurrent */))))(tls, zPath, bp /* &fd */)
if rc == SQLITE_OK {
if full_fsync(tls, *(*int32)(unsafe.Pointer(bp /* fd */)), 0, 0) != 0 {
- rc = unixLogErrorAtLine(tls, (SQLITE_IOERR | (int32(5) << 8)), ts+2843 /* "fsync" */, zPath, 40170)
+ rc = unixLogErrorAtLine(tls, (SQLITE_IOERR | (int32(5) << 8)), ts+2915 /* "fsync" */, zPath, 40406)
}
- robust_close(tls, uintptr(0), *(*int32)(unsafe.Pointer(bp /* fd */)), 40172)
+ robust_close(tls, uintptr(0), *(*int32)(unsafe.Pointer(bp /* fd */)), 40408)
} else {
rc = SQLITE_OK
@@ -25815,7 +26876,7 @@ func unixDelete(tls *libc.TLS, NotUsed uintptr, zPath uintptr, dirSync int32) in
// SQLITE_ACCESS_READONLY: Return 1 if the file is readable.
//
// Otherwise return 0.
-func unixAccess(tls *libc.TLS, NotUsed uintptr, zPath uintptr, flags int32, pResOut uintptr) int32 { /* sqlite3.c:40192:12: */
+func unixAccess(tls *libc.TLS, NotUsed uintptr, zPath uintptr, flags int32, pResOut uintptr) int32 { /* sqlite3.c:40428:12: */
bp := tls.Alloc(144)
defer tls.Free(144)
@@ -25837,18 +26898,18 @@ func unixAccess(tls *libc.TLS, NotUsed uintptr, zPath uintptr, flags int32, pRes
// If the last component of the pathname in z[0]..z[j-1] is something
// other than ".." then back it out and return true. If the last
// component is empty or if it is ".." then return false.
-func unixBackupDir(tls *libc.TLS, z uintptr, pJ uintptr) int32 { /* sqlite3.c:40221:12: */
+func unixBackupDir(tls *libc.TLS, z uintptr, pJ uintptr) int32 { /* sqlite3.c:40457:12: */
var j int32 = *(*int32)(unsafe.Pointer(pJ))
var i int32
if j <= 0 {
return 0
}
- for i = (j - 1); (i > 0) && (int32(*(*int8)(unsafe.Pointer(z + uintptr((i - 1))))) != '/'); i-- {
+ for i = (j - 1); (i > 0) && (int32(*(*uint8)(unsafe.Pointer(z + uintptr((i - 1))))) != '/'); i-- {
}
if i == 0 {
return 0
}
- if ((int32(*(*int8)(unsafe.Pointer(z + uintptr(i)))) == '.') && (i == (j - 2))) && (int32(*(*int8)(unsafe.Pointer(z + uintptr((i + 1))))) == '.') {
+ if ((int32(*(*uint8)(unsafe.Pointer(z + uintptr(i)))) == '.') && (i == (j - 2))) && (int32(*(*uint8)(unsafe.Pointer(z + uintptr((i + 1))))) == '.') {
return 0
}
*(*int32)(unsafe.Pointer(pJ)) = (i - 1)
@@ -25860,7 +26921,7 @@ func unixBackupDir(tls *libc.TLS, z uintptr, pJ uintptr) int32 { /* sqlite3.c:40
//
// Remove all instances of /./
// Remove all isntances of /X/../ for any X
-func mkFullPathname(tls *libc.TLS, zPath uintptr, zOut uintptr, nOut int32) int32 { /* sqlite3.c:40239:12: */
+func mkFullPathname(tls *libc.TLS, zPath uintptr, zOut uintptr, nOut int32) int32 { /* sqlite3.c:40475:12: */
bp := tls.Alloc(12)
defer tls.Free(12)
@@ -25869,58 +26930,58 @@ func mkFullPathname(tls *libc.TLS, zPath uintptr, zOut uintptr, nOut int32) int3
var i int32
// var j int32 at bp+8, 4
- if int32(*(*int8)(unsafe.Pointer(zPath))) != '/' {
+ if int32(*(*uint8)(unsafe.Pointer(zPath))) != '/' {
if (*(*func(*libc.TLS, uintptr, Size_t) uintptr)(unsafe.Pointer((uintptr(unsafe.Pointer(&aSyscall)) + 3*24 + 8 /* &.pCurrent */))))(tls, zOut, (uint64(nOut-2))) == uintptr(0) {
- return unixLogErrorAtLine(tls, Xsqlite3CantopenError(tls, 40249), ts+2334 /* "getcwd" */, zPath, 40249)
+ return unixLogErrorAtLine(tls, Xsqlite3CantopenError(tls, 40485), ts+2406 /* "getcwd" */, zPath, 40485)
}
iOff = Xsqlite3Strlen30(tls, zOut)
- *(*int8)(unsafe.Pointer(zOut + uintptr(libc.PostIncInt32(&iOff, 1)))) = int8('/')
+ *(*uint8)(unsafe.Pointer(zOut + uintptr(libc.PostIncInt32(&iOff, 1)))) = uint8('/')
}
if ((iOff + nPath) + 1) > nOut {
// SQLite assumes that xFullPathname() nul-terminates the output buffer
// even if it returns an error.
- *(*int8)(unsafe.Pointer(zOut + uintptr(iOff))) = int8(0)
- return Xsqlite3CantopenError(tls, 40258)
+ *(*uint8)(unsafe.Pointer(zOut + uintptr(iOff))) = uint8(0)
+ return Xsqlite3CantopenError(tls, 40494)
}
- Xsqlite3_snprintf(tls, (nOut - iOff), (zOut + uintptr(iOff)), ts+2718 /* "%s" */, libc.VaList(bp, zPath))
+ Xsqlite3_snprintf(tls, (nOut - iOff), (zOut + uintptr(iOff)), ts+2790 /* "%s" */, libc.VaList(bp, zPath))
// Remove duplicate '/' characters. Except, two // at the beginning
// of a pathname is allowed since this is important on windows.
- for i = libc.AssignPtrInt32(bp+8 /* j */, 1); *(*int8)(unsafe.Pointer(zOut + uintptr(i))) != 0; i++ {
- *(*int8)(unsafe.Pointer(zOut + uintptr(libc.PostIncInt32(&*(*int32)(unsafe.Pointer(bp + 8 /* j */)), 1)))) = *(*int8)(unsafe.Pointer(zOut + uintptr(i)))
- for (int32(*(*int8)(unsafe.Pointer(zOut + uintptr(i)))) == '/') && (int32(*(*int8)(unsafe.Pointer(zOut + uintptr((i + 1))))) == '/') {
+ for i = libc.AssignPtrInt32(bp+8 /* j */, 1); *(*uint8)(unsafe.Pointer(zOut + uintptr(i))) != 0; i++ {
+ *(*uint8)(unsafe.Pointer(zOut + uintptr(libc.PostIncInt32(&*(*int32)(unsafe.Pointer(bp + 8 /* j */)), 1)))) = *(*uint8)(unsafe.Pointer(zOut + uintptr(i)))
+ for (int32(*(*uint8)(unsafe.Pointer(zOut + uintptr(i)))) == '/') && (int32(*(*uint8)(unsafe.Pointer(zOut + uintptr((i + 1))))) == '/') {
i++
}
}
- *(*int8)(unsafe.Pointer(zOut + uintptr(*(*int32)(unsafe.Pointer(bp + 8 /* j */))))) = int8(0)
+ *(*uint8)(unsafe.Pointer(zOut + uintptr(*(*int32)(unsafe.Pointer(bp + 8 /* j */))))) = uint8(0)
- for i = libc.AssignPtrInt32(bp+8 /* j */, 0); *(*int8)(unsafe.Pointer(zOut + uintptr(i))) != 0; i++ {
- if int32(*(*int8)(unsafe.Pointer(zOut + uintptr(i)))) == '/' {
+ for i = libc.AssignPtrInt32(bp+8 /* j */, 0); *(*uint8)(unsafe.Pointer(zOut + uintptr(i))) != 0; i++ {
+ if int32(*(*uint8)(unsafe.Pointer(zOut + uintptr(i)))) == '/' {
// Skip over internal "/." directory components
- if (int32(*(*int8)(unsafe.Pointer(zOut + uintptr((i + 1))))) == '.') && (int32(*(*int8)(unsafe.Pointer(zOut + uintptr((i + 2))))) == '/') {
+ if (int32(*(*uint8)(unsafe.Pointer(zOut + uintptr((i + 1))))) == '.') && (int32(*(*uint8)(unsafe.Pointer(zOut + uintptr((i + 2))))) == '/') {
i = i + (1)
continue
}
// If this is a "/.." directory component then back out the
// previous term of the directory if it is something other than "..".
- if (((int32(*(*int8)(unsafe.Pointer(zOut + uintptr((i + 1))))) == '.') &&
- (int32(*(*int8)(unsafe.Pointer(zOut + uintptr((i + 2))))) == '.')) &&
- (int32(*(*int8)(unsafe.Pointer(zOut + uintptr((i + 3))))) == '/')) &&
+ if (((int32(*(*uint8)(unsafe.Pointer(zOut + uintptr((i + 1))))) == '.') &&
+ (int32(*(*uint8)(unsafe.Pointer(zOut + uintptr((i + 2))))) == '.')) &&
+ (int32(*(*uint8)(unsafe.Pointer(zOut + uintptr((i + 3))))) == '/')) &&
(unixBackupDir(tls, zOut, bp+8 /* &j */) != 0) {
i = i + (2)
continue
}
}
if *(*int32)(unsafe.Pointer(bp + 8 /* j */)) >= 0 {
- *(*int8)(unsafe.Pointer(zOut + uintptr(*(*int32)(unsafe.Pointer(bp + 8 /* j */))))) = *(*int8)(unsafe.Pointer(zOut + uintptr(i)))
+ *(*uint8)(unsafe.Pointer(zOut + uintptr(*(*int32)(unsafe.Pointer(bp + 8 /* j */))))) = *(*uint8)(unsafe.Pointer(zOut + uintptr(i)))
}
*(*int32)(unsafe.Pointer(bp + 8 /* j */))++
}
if *(*int32)(unsafe.Pointer(bp + 8 /* j */)) == 0 {
- *(*int8)(unsafe.Pointer(zOut + uintptr(libc.PostIncInt32(&*(*int32)(unsafe.Pointer(bp + 8 /* j */)), 1)))) = int8('/')
+ *(*uint8)(unsafe.Pointer(zOut + uintptr(libc.PostIncInt32(&*(*int32)(unsafe.Pointer(bp + 8 /* j */)), 1)))) = uint8('/')
}
- *(*int8)(unsafe.Pointer(zOut + uintptr(*(*int32)(unsafe.Pointer(bp + 8 /* j */))))) = int8(0)
+ *(*uint8)(unsafe.Pointer(zOut + uintptr(*(*int32)(unsafe.Pointer(bp + 8 /* j */))))) = uint8(0)
return SQLITE_OK
}
@@ -25931,7 +26992,7 @@ func mkFullPathname(tls *libc.TLS, zPath uintptr, zOut uintptr, nOut int32) int3
// zOut points to a buffer of at least sqlite3_vfs.mxPathname bytes
// (in this case, MAX_PATHNAME bytes). The full-path is written to
// this buffer before returning.
-func unixFullPathname(tls *libc.TLS, pVfs uintptr, zPath uintptr, nOut int32, zOut uintptr) int32 { /* sqlite3.c:40308:12: */
+func unixFullPathname(tls *libc.TLS, pVfs uintptr, zPath uintptr, nOut int32, zOut uintptr) int32 { /* sqlite3.c:40544:12: */
bp := tls.Alloc(144)
defer tls.Free(144)
@@ -25957,7 +27018,7 @@ func unixFullPathname(tls *libc.TLS, pVfs uintptr, zPath uintptr, nOut int32, zO
if (*(*func(*libc.TLS, uintptr, uintptr) int32)(unsafe.Pointer((uintptr(unsafe.Pointer(&aSyscall)) + 27*24 + 8 /* &.pCurrent */))))(tls, zIn, bp /* &buf */) != 0 {
if (*(*int32)(unsafe.Pointer(libc.X__errno_location(tls)))) != ENOENT {
- rc = unixLogErrorAtLine(tls, Xsqlite3CantopenError(tls, 40341), ts+2514 /* "lstat" */, zIn, 40341)
+ rc = unixLogErrorAtLine(tls, Xsqlite3CantopenError(tls, 40577), ts+2586 /* "lstat" */, zIn, 40577)
}
} else {
bLink = (libc.Bool32((((*stat)(unsafe.Pointer(bp /* &buf */)).Fst_mode) & X__mode_t(0170000)) == (X__mode_t(0120000))))
@@ -25971,27 +27032,27 @@ func unixFullPathname(tls *libc.TLS, pVfs uintptr, zPath uintptr, nOut int32, zO
rc = SQLITE_NOMEM
}
} else if nLink >= SQLITE_MAX_SYMLINKS {
- rc = Xsqlite3CantopenError(tls, 40353)
+ rc = Xsqlite3CantopenError(tls, 40589)
}
if rc == SQLITE_OK {
nByte = int32((*(*func(*libc.TLS, uintptr, uintptr, Size_t) Ssize_t)(unsafe.Pointer((uintptr(unsafe.Pointer(&aSyscall)) + 26*24 + 8 /* &.pCurrent */))))(tls, zIn, zDel, (uint64(nOut - 1))))
if nByte < 0 {
- rc = unixLogErrorAtLine(tls, Xsqlite3CantopenError(tls, 40359), ts+2505 /* "readlink" */, zIn, 40359)
+ rc = unixLogErrorAtLine(tls, Xsqlite3CantopenError(tls, 40595), ts+2577 /* "readlink" */, zIn, 40595)
} else {
- if int32(*(*int8)(unsafe.Pointer(zDel))) != '/' {
+ if int32(*(*uint8)(unsafe.Pointer(zDel))) != '/' {
var n int32
- for n = Xsqlite3Strlen30(tls, zIn); (n > 0) && (int32(*(*int8)(unsafe.Pointer(zIn + uintptr((n - 1))))) != '/'); n-- {
+ for n = Xsqlite3Strlen30(tls, zIn); (n > 0) && (int32(*(*uint8)(unsafe.Pointer(zIn + uintptr((n - 1))))) != '/'); n-- {
}
if ((nByte + n) + 1) > nOut {
- rc = Xsqlite3CantopenError(tls, 40365)
+ rc = Xsqlite3CantopenError(tls, 40601)
} else {
libc.Xmemmove(tls, (zDel + uintptr(n)), zDel, (uint64(nByte + 1)))
libc.Xmemcpy(tls, zDel, zIn, uint64(n))
nByte = nByte + (n)
}
}
- *(*int8)(unsafe.Pointer(zDel + uintptr(nByte))) = int8(0)
+ *(*uint8)(unsafe.Pointer(zDel + uintptr(nByte))) = uint8(0)
}
}
@@ -26038,9 +27099,9 @@ type Dl_info = struct {
// This is the type of elements in `Dl_serinfo', below.
// The `dls_name' member points to space in the buffer passed to `dlinfo'.
type Dl_serpath = struct {
- Fdls_name uintptr
- Fdls_flags uint32
- _ [4]byte
+ Fdls_name uintptr
+ Fdls_flags uint32
+ F__ccgo_pad1 [4]byte
} /* dlfcn.h:175:3 */
// This is the structure that must be passed (by reference) to `dlinfo' for
@@ -26048,11 +27109,14 @@ type Dl_serpath = struct {
type Dl_serinfo = struct {
Fdls_size Size_t
Fdls_cnt uint32
- _ [4]byte
- Fdls_serpath [1]Dl_serpath
-} /* dlfcn.h:184:3 */
+ F__ccgo_pad1 [4]byte
+ F__16 struct {
+ Fdls_serpath [0]Dl_serpath
+ F__ccgo_pad1 [16]byte
+ }
+} /* dlfcn.h:196:3 */
-func unixDlOpen(tls *libc.TLS, NotUsed uintptr, zFilename uintptr) uintptr { /* sqlite3.c:40400:13: */
+func unixDlOpen(tls *libc.TLS, NotUsed uintptr, zFilename uintptr) uintptr { /* sqlite3.c:40636:13: */
_ = NotUsed
return libc.Xdlopen(tls, zFilename, (RTLD_NOW | RTLD_GLOBAL))
}
@@ -26062,7 +27126,7 @@ func unixDlOpen(tls *libc.TLS, NotUsed uintptr, zFilename uintptr) uintptr { /*
// message is available, it is written to zBufOut. If no error message
// is available, zBufOut is left unmodified and SQLite uses a default
// error message.
-func unixDlError(tls *libc.TLS, NotUsed uintptr, nBuf int32, zBufOut uintptr) { /* sqlite3.c:40412:13: */
+func unixDlError(tls *libc.TLS, NotUsed uintptr, nBuf int32, zBufOut uintptr) { /* sqlite3.c:40648:13: */
bp := tls.Alloc(8)
defer tls.Free(8)
@@ -26071,12 +27135,12 @@ func unixDlError(tls *libc.TLS, NotUsed uintptr, nBuf int32, zBufOut uintptr) {
unixEnterMutex(tls)
zErr = libc.Xdlerror(tls)
if zErr != 0 {
- Xsqlite3_snprintf(tls, nBuf, zBufOut, ts+2718 /* "%s" */, libc.VaList(bp, zErr))
+ Xsqlite3_snprintf(tls, nBuf, zBufOut, ts+2790 /* "%s" */, libc.VaList(bp, zErr))
}
unixLeaveMutex(tls)
}
-func unixDlSym(tls *libc.TLS, NotUsed uintptr, p uintptr, zSym uintptr) uintptr { /* sqlite3.c:40422:13: */
+func unixDlSym(tls *libc.TLS, NotUsed uintptr, p uintptr, zSym uintptr) uintptr { /* sqlite3.c:40658:13: */
// GCC with -pedantic-errors says that C90 does not allow a void* to be
// cast into a pointer to a function. And yet the library dlsym() routine
// returns a void* which is really a pointer to a function. So how do we
@@ -26097,16 +27161,18 @@ func unixDlSym(tls *libc.TLS, NotUsed uintptr, p uintptr, zSym uintptr) uintptr
x = *(*uintptr)(unsafe.Pointer(&struct {
f func(*libc.TLS, uintptr, uintptr) uintptr
}{libc.Xdlsym}))
- return (*(*func(*libc.TLS, uintptr, uintptr) uintptr)(unsafe.Pointer(&x)))(tls, p, zSym)
+ return (*struct {
+ f func(*libc.TLS, uintptr, uintptr) uintptr
+ })(unsafe.Pointer(&struct{ uintptr }{x})).f(tls, p, zSym)
}
-func unixDlClose(tls *libc.TLS, NotUsed uintptr, pHandle uintptr) { /* sqlite3.c:40445:13: */
+func unixDlClose(tls *libc.TLS, NotUsed uintptr, pHandle uintptr) { /* sqlite3.c:40681:13: */
_ = NotUsed
libc.Xdlclose(tls, pHandle)
}
// Write nBuf bytes of random data to the supplied buffer zBuf.
-func unixRandomness(tls *libc.TLS, NotUsed uintptr, nBuf int32, zBuf uintptr) int32 { /* sqlite3.c:40459:12: */
+func unixRandomness(tls *libc.TLS, NotUsed uintptr, nBuf int32, zBuf uintptr) int32 { /* sqlite3.c:40695:12: */
bp := tls.Alloc(8)
defer tls.Free(8)
@@ -26128,7 +27194,7 @@ func unixRandomness(tls *libc.TLS, NotUsed uintptr, nBuf int32, zBuf uintptr) in
{
var fd int32
var got int32
- fd = robust_open(tls, ts+2849 /* "/dev/urandom" */, O_RDONLY, uint32(0))
+ fd = robust_open(tls, ts+2921 /* "/dev/urandom" */, O_RDONLY, uint32(0))
if fd < 0 {
// var t Time_t at bp, 8
@@ -26141,7 +27207,7 @@ func unixRandomness(tls *libc.TLS, NotUsed uintptr, nBuf int32, zBuf uintptr) in
for ok := true; ok; ok = ((got < 0) && ((*(*int32)(unsafe.Pointer(libc.X__errno_location(tls)))) == EINTR)) {
got = int32((*(*func(*libc.TLS, int32, uintptr, Size_t) Ssize_t)(unsafe.Pointer((uintptr(unsafe.Pointer(&aSyscall)) + 8*24 + 8 /* &.pCurrent */))))(tls, fd, zBuf, uint64(nBuf)))
}
- robust_close(tls, uintptr(0), fd, 40490)
+ robust_close(tls, uintptr(0), fd, 40726)
}
}
@@ -26154,7 +27220,7 @@ func unixRandomness(tls *libc.TLS, NotUsed uintptr, nBuf int32, zBuf uintptr) in
// requested from the underlying operating system, a number which
// might be greater than or equal to the argument, but not less
// than the argument.
-func unixSleep(tls *libc.TLS, NotUsed uintptr, microseconds int32) int32 { /* sqlite3.c:40506:12: */
+func unixSleep(tls *libc.TLS, NotUsed uintptr, microseconds int32) int32 { /* sqlite3.c:40742:12: */
if microseconds >= 1000000 {
libc.Xsleep(tls, (uint32(microseconds / 1000000)))
}
@@ -26177,7 +27243,7 @@ func unixSleep(tls *libc.TLS, NotUsed uintptr, microseconds int32) int32 { /* sq
//
// On success, return SQLITE_OK. Return SQLITE_ERROR if the time and date
// cannot be found.
-func unixCurrentTimeInt64(tls *libc.TLS, NotUsed uintptr, piNow uintptr) int32 { /* sqlite3.c:40547:12: */
+func unixCurrentTimeInt64(tls *libc.TLS, NotUsed uintptr, piNow uintptr) int32 { /* sqlite3.c:40783:12: */
bp := tls.Alloc(16)
defer tls.Free(16)
@@ -26191,12 +27257,12 @@ func unixCurrentTimeInt64(tls *libc.TLS, NotUsed uintptr, piNow uintptr) int32 {
return rc
}
-var unixEpoch Sqlite3_int64 = (int64(24405875) * int64(8640000)) /* sqlite3.c:40548:30 */
+var unixEpoch Sqlite3_int64 = (int64(24405875) * int64(8640000)) /* sqlite3.c:40784:30 */
// Find the current time (in Universal Coordinated Time). Write the
// current time and date as a Julian Day number into *prNow and
// return 0. Return 1 if the time and date cannot be found.
-func unixCurrentTime(tls *libc.TLS, NotUsed uintptr, prNow uintptr) int32 { /* sqlite3.c:40579:12: */
+func unixCurrentTime(tls *libc.TLS, NotUsed uintptr, prNow uintptr) int32 { /* sqlite3.c:40815:12: */
bp := tls.Alloc(8)
defer tls.Free(8)
@@ -26212,7 +27278,7 @@ func unixCurrentTime(tls *libc.TLS, NotUsed uintptr, prNow uintptr) int32 { /* s
// low-level error message when operating-system problems come up
// during SQLite operation. Only the integer return code is currently
// used.
-func unixGetLastError(tls *libc.TLS, NotUsed uintptr, NotUsed2 int32, NotUsed3 uintptr) int32 { /* sqlite3.c:40597:12: */
+func unixGetLastError(tls *libc.TLS, NotUsed uintptr, NotUsed2 int32, NotUsed3 uintptr) int32 { /* sqlite3.c:40833:12: */
_ = NotUsed
_ = NotUsed2
_ = NotUsed3
@@ -26394,7 +27460,7 @@ func unixGetLastError(tls *libc.TLS, NotUsed uintptr, NotUsed2 int32, NotUsed3 u
// single thread. The memory allocation and mutex subsystems have not
// necessarily been initialized when this routine is called, and so they
// should not be used.
-func Xsqlite3_os_init(tls *libc.TLS) int32 { /* sqlite3.c:41802:16: */
+func Xsqlite3_os_init(tls *libc.TLS) int32 { /* sqlite3.c:42038:16: */
var i uint32 // Loop counter
// Double-check that the aSyscall[] array has been constructed
@@ -26405,30 +27471,796 @@ func Xsqlite3_os_init(tls *libc.TLS) int32 { /* sqlite3.c:41802:16: */
Xsqlite3_vfs_register(tls, (uintptr(unsafe.Pointer(&aVfs)) + uintptr(i)*168), (libc.Bool32(i == uint32(0))))
}
unixBigLock = Xsqlite3MutexAlloc(tls, SQLITE_MUTEX_STATIC_VFS1)
+
+ // Validate lock assumptions
+ // Number of available locks
+ // Start of locking area
+ // Locks:
+ // WRITE UNIX_SHM_BASE 120
+ // CKPT UNIX_SHM_BASE+1 121
+ // RECOVER UNIX_SHM_BASE+2 122
+ // READ-0 UNIX_SHM_BASE+3 123
+ // READ-1 UNIX_SHM_BASE+4 124
+ // READ-2 UNIX_SHM_BASE+5 125
+ // READ-3 UNIX_SHM_BASE+6 126
+ // READ-4 UNIX_SHM_BASE+7 127
+ // DMS UNIX_SHM_BASE+8 128
+ // Byte offset of the deadman-switch
+
return SQLITE_OK
}
var aVfs = [4]Sqlite3_vfs{
- {FiVersion: 3 /* iVersion */, FszOsFile: int32(unsafe.Sizeof(UnixFile{})) /* szOsFile */, FmxPathname: MAX_PATHNAME /* pNext */, FzName: ts + 2862 /* "unix" */ /* zName */, FpAppData: 0 /* pAppData */, FxOpen: 0 /* xOpen */, FxDelete: 0 /* xDelete */, FxAccess: 0 /* xAccess */, FxFullPathname: 0 /* xFullPathname */, FxDlOpen: 0 /* xDlOpen */, FxDlError: 0 /* xDlError */, FxDlSym: 0 /* xDlSym */, FxDlClose: 0 /* xDlClose */, FxRandomness: 0 /* xRandomness */, FxSleep: 0 /* xSleep */, FxCurrentTime: 0 /* xCurrentTime */, FxGetLastError: 0 /* xGetLastError */, FxCurrentTimeInt64: 0 /* xCurrentTimeInt64 */, FxSetSystemCall: 0 /* xSetSystemCall */, FxGetSystemCall: 0 /* xGetSystemCall */, FxNextSystemCall: 0 /* xNextSystemCall */},
- {FiVersion: 3 /* iVersion */, FszOsFile: int32(unsafe.Sizeof(UnixFile{})) /* szOsFile */, FmxPathname: MAX_PATHNAME /* pNext */, FzName: ts + 2867 /* "unix-none" */ /* zName */, FpAppData: 0 /* pAppData */, FxOpen: 0 /* xOpen */, FxDelete: 0 /* xDelete */, FxAccess: 0 /* xAccess */, FxFullPathname: 0 /* xFullPathname */, FxDlOpen: 0 /* xDlOpen */, FxDlError: 0 /* xDlError */, FxDlSym: 0 /* xDlSym */, FxDlClose: 0 /* xDlClose */, FxRandomness: 0 /* xRandomness */, FxSleep: 0 /* xSleep */, FxCurrentTime: 0 /* xCurrentTime */, FxGetLastError: 0 /* xGetLastError */, FxCurrentTimeInt64: 0 /* xCurrentTimeInt64 */, FxSetSystemCall: 0 /* xSetSystemCall */, FxGetSystemCall: 0 /* xGetSystemCall */, FxNextSystemCall: 0 /* xNextSystemCall */},
- {FiVersion: 3 /* iVersion */, FszOsFile: int32(unsafe.Sizeof(UnixFile{})) /* szOsFile */, FmxPathname: MAX_PATHNAME /* pNext */, FzName: ts + 2877 /* "unix-dotfile" */ /* zName */, FpAppData: 0 /* pAppData */, FxOpen: 0 /* xOpen */, FxDelete: 0 /* xDelete */, FxAccess: 0 /* xAccess */, FxFullPathname: 0 /* xFullPathname */, FxDlOpen: 0 /* xDlOpen */, FxDlError: 0 /* xDlError */, FxDlSym: 0 /* xDlSym */, FxDlClose: 0 /* xDlClose */, FxRandomness: 0 /* xRandomness */, FxSleep: 0 /* xSleep */, FxCurrentTime: 0 /* xCurrentTime */, FxGetLastError: 0 /* xGetLastError */, FxCurrentTimeInt64: 0 /* xCurrentTimeInt64 */, FxSetSystemCall: 0 /* xSetSystemCall */, FxGetSystemCall: 0 /* xGetSystemCall */, FxNextSystemCall: 0 /* xNextSystemCall */},
- {FiVersion: 3 /* iVersion */, FszOsFile: int32(unsafe.Sizeof(UnixFile{})) /* szOsFile */, FmxPathname: MAX_PATHNAME /* pNext */, FzName: ts + 2757 /* "unix-excl" */ /* zName */, FpAppData: 0 /* pAppData */, FxOpen: 0 /* xOpen */, FxDelete: 0 /* xDelete */, FxAccess: 0 /* xAccess */, FxFullPathname: 0 /* xFullPathname */, FxDlOpen: 0 /* xDlOpen */, FxDlError: 0 /* xDlError */, FxDlSym: 0 /* xDlSym */, FxDlClose: 0 /* xDlClose */, FxRandomness: 0 /* xRandomness */, FxSleep: 0 /* xSleep */, FxCurrentTime: 0 /* xCurrentTime */, FxGetLastError: 0 /* xGetLastError */, FxCurrentTimeInt64: 0 /* xCurrentTimeInt64 */, FxSetSystemCall: 0 /* xSetSystemCall */, FxGetSystemCall: 0 /* xGetSystemCall */, FxNextSystemCall: 0 /* xNextSystemCall */},
-} /* sqlite3.c:41855:22 */
+ {FiVersion: 3 /* iVersion */, FszOsFile: int32(unsafe.Sizeof(UnixFile{})) /* szOsFile */, FmxPathname: MAX_PATHNAME /* pNext */, FzName: ts + 2934 /* "unix" */ /* zName */, FpAppData: 0 /* pAppData */, FxOpen: 0 /* xOpen */, FxDelete: 0 /* xDelete */, FxAccess: 0 /* xAccess */, FxFullPathname: 0 /* xFullPathname */, FxDlOpen: 0 /* xDlOpen */, FxDlError: 0 /* xDlError */, FxDlSym: 0 /* xDlSym */, FxDlClose: 0 /* xDlClose */, FxRandomness: 0 /* xRandomness */, FxSleep: 0 /* xSleep */, FxCurrentTime: 0 /* xCurrentTime */, FxGetLastError: 0 /* xGetLastError */, FxCurrentTimeInt64: 0 /* xCurrentTimeInt64 */, FxSetSystemCall: 0 /* xSetSystemCall */, FxGetSystemCall: 0 /* xGetSystemCall */, FxNextSystemCall: 0 /* xNextSystemCall */},
+ {FiVersion: 3 /* iVersion */, FszOsFile: int32(unsafe.Sizeof(UnixFile{})) /* szOsFile */, FmxPathname: MAX_PATHNAME /* pNext */, FzName: ts + 2939 /* "unix-none" */ /* zName */, FpAppData: 0 /* pAppData */, FxOpen: 0 /* xOpen */, FxDelete: 0 /* xDelete */, FxAccess: 0 /* xAccess */, FxFullPathname: 0 /* xFullPathname */, FxDlOpen: 0 /* xDlOpen */, FxDlError: 0 /* xDlError */, FxDlSym: 0 /* xDlSym */, FxDlClose: 0 /* xDlClose */, FxRandomness: 0 /* xRandomness */, FxSleep: 0 /* xSleep */, FxCurrentTime: 0 /* xCurrentTime */, FxGetLastError: 0 /* xGetLastError */, FxCurrentTimeInt64: 0 /* xCurrentTimeInt64 */, FxSetSystemCall: 0 /* xSetSystemCall */, FxGetSystemCall: 0 /* xGetSystemCall */, FxNextSystemCall: 0 /* xNextSystemCall */},
+ {FiVersion: 3 /* iVersion */, FszOsFile: int32(unsafe.Sizeof(UnixFile{})) /* szOsFile */, FmxPathname: MAX_PATHNAME /* pNext */, FzName: ts + 2949 /* "unix-dotfile" */ /* zName */, FpAppData: 0 /* pAppData */, FxOpen: 0 /* xOpen */, FxDelete: 0 /* xDelete */, FxAccess: 0 /* xAccess */, FxFullPathname: 0 /* xFullPathname */, FxDlOpen: 0 /* xDlOpen */, FxDlError: 0 /* xDlError */, FxDlSym: 0 /* xDlSym */, FxDlClose: 0 /* xDlClose */, FxRandomness: 0 /* xRandomness */, FxSleep: 0 /* xSleep */, FxCurrentTime: 0 /* xCurrentTime */, FxGetLastError: 0 /* xGetLastError */, FxCurrentTimeInt64: 0 /* xCurrentTimeInt64 */, FxSetSystemCall: 0 /* xSetSystemCall */, FxGetSystemCall: 0 /* xGetSystemCall */, FxNextSystemCall: 0 /* xNextSystemCall */},
+ {FiVersion: 3 /* iVersion */, FszOsFile: int32(unsafe.Sizeof(UnixFile{})) /* szOsFile */, FmxPathname: MAX_PATHNAME /* pNext */, FzName: ts + 2829 /* "unix-excl" */ /* zName */, FpAppData: 0 /* pAppData */, FxOpen: 0 /* xOpen */, FxDelete: 0 /* xDelete */, FxAccess: 0 /* xAccess */, FxFullPathname: 0 /* xFullPathname */, FxDlOpen: 0 /* xDlOpen */, FxDlError: 0 /* xDlError */, FxDlSym: 0 /* xDlSym */, FxDlClose: 0 /* xDlClose */, FxRandomness: 0 /* xRandomness */, FxSleep: 0 /* xSleep */, FxCurrentTime: 0 /* xCurrentTime */, FxGetLastError: 0 /* xGetLastError */, FxCurrentTimeInt64: 0 /* xCurrentTimeInt64 */, FxSetSystemCall: 0 /* xSetSystemCall */, FxGetSystemCall: 0 /* xGetSystemCall */, FxNextSystemCall: 0 /* xNextSystemCall */},
+} /* sqlite3.c:42091:22 */
// Shutdown the operating system interface.
//
// Some operating systems might need to do some cleanup in this routine,
// to release dynamically allocated objects. But not on unix.
// This routine is a no-op for unix.
-func Xsqlite3_os_end(tls *libc.TLS) int32 { /* sqlite3.c:41902:16: */
+func Xsqlite3_os_end(tls *libc.TLS) int32 { /* sqlite3.c:42157:16: */
unixBigLock = uintptr(0)
return SQLITE_OK
}
+//************* End of os_unix.c ********************************************
+//************* Begin file os_win.c *****************************************
+// 2004 May 22
+//
+// The author disclaims copyright to this source code. In place of
+// a legal notice, here is a blessing:
+//
+// May you do good and not evil.
+// May you find forgiveness for yourself and forgive others.
+// May you share freely, never taking more than you give.
+//
+//
+//
+// This file contains code that is specific to Windows.
+// #include "sqliteInt.h"
+
+//************* End of os_win.c *********************************************
+//************* Begin file memdb.c ******************************************
+// 2016-09-07
+//
+// The author disclaims copyright to this source code. In place of
+// a legal notice, here is a blessing:
+//
+// May you do good and not evil.
+// May you find forgiveness for yourself and forgive others.
+// May you share freely, never taking more than you give.
+//
+//
+//
+// This file implements an in-memory VFS. A database is held as a contiguous
+// block of memory.
+//
+// This file also implements interface sqlite3_serialize() and
+// sqlite3_deserialize().
+// #include "sqliteInt.h"
+
+// Forward declaration of objects used by this utility
+type MemVfs = sqlite3_vfs /* sqlite3.c:48545:28 */
+type MemFile1 = struct {
+ Fbase Sqlite3_file
+ FpStore uintptr
+ FeLock int32
+ F__ccgo_pad1 [4]byte
+} /* sqlite3.c:48546:9 */
+
+type MemFile = MemFile1 /* sqlite3.c:48546:24 */
+type MemStore1 = struct {
+ Fsz Sqlite3_int64
+ FszAlloc Sqlite3_int64
+ FszMax Sqlite3_int64
+ FaData uintptr
+ FpMutex uintptr
+ FnMmap int32
+ FmFlags uint32
+ FnRdLock int32
+ FnWrLock int32
+ FnRef int32
+ F__ccgo_pad1 [4]byte
+ FzFName uintptr
+} /* sqlite3.c:48546:9 */
+
+type MemStore = MemStore1 /* sqlite3.c:48547:25 */
+
+// File-scope variables for holding the memdb files that are accessible
+// to multiple database connections in separate threads.
+//
+// Must hold SQLITE_MUTEX_STATIC_VFS1 to access any part of this object.
+type MemFS = struct {
+ FnMemStore int32
+ F__ccgo_pad1 [4]byte
+ FapMemStore uintptr
+} /* sqlite3.c:48617:8 */
+
+// File-scope variables for holding the memdb files that are accessible
+// to multiple database connections in separate threads.
+//
+// Must hold SQLITE_MUTEX_STATIC_VFS1 to access any part of this object.
+var memdb_g MemFS /* sqlite3.c:48620:3: */
+
+var memdb_vfs = Sqlite3_vfs{
+ FiVersion: 2, // szOsFile (set when registered)
+ FmxPathname: 1024, // pNext
+ FzName: ts + 2962, /* "memdb" */ // pAppData (set when registered)
+ FxOpen: 0, /* memdbDelete, */ // xDelete
+ FxAccess: 0, // xAccess
+ FxFullPathname: 0, // xFullPathname
+ FxDlOpen: 0, // xDlOpen
+ FxDlError: 0, // xDlError
+ FxDlSym: 0, // xDlSym
+ FxDlClose: 0, // xDlClose
+ FxRandomness: 0, // xRandomness
+ FxSleep: 0, /* memdbCurrentTime, */ // xCurrentTime
+ FxGetLastError: 0, // xGetLastError
+ FxCurrentTimeInt64: 0, // xNextSystemCall
+} /* sqlite3.c:48656:20 */
+
+var memdb_io_methods = Sqlite3_io_methods{
+ FiVersion: 3, // iVersion
+ FxClose: 0, // xClose
+ FxRead: 0, // xRead
+ FxWrite: 0, // xWrite
+ FxTruncate: 0, // xTruncate
+ FxSync: 0, // xSync
+ FxFileSize: 0, // xFileSize
+ FxLock: 0, // xLock
+ FxUnlock: 0, /* memdbCheckReservedLock, */ // xCheckReservedLock
+ FxFileControl: 0, /* memdbSectorSize,*/ // xSectorSize
+ FxDeviceCharacteristics: 0, // xShmUnmap
+ FxFetch: 0, // xFetch
+ FxUnfetch: 0, // xUnfetch
+} /* sqlite3.c:48681:33 */
+
+// Enter/leave the mutex on a MemStore
+func memdbEnter(tls *libc.TLS, p uintptr) { /* sqlite3.c:48714:13: */
+ Xsqlite3_mutex_enter(tls, (*MemStore)(unsafe.Pointer(p)).FpMutex)
+}
+
+func memdbLeave(tls *libc.TLS, p uintptr) { /* sqlite3.c:48717:13: */
+ Xsqlite3_mutex_leave(tls, (*MemStore)(unsafe.Pointer(p)).FpMutex)
+}
+
+// Close an memdb-file.
+// Free the underlying MemStore object when its refcount drops to zero
+// or less.
+func memdbClose(tls *libc.TLS, pFile uintptr) int32 { /* sqlite3.c:48729:12: */
+ var p uintptr = (*MemFile)(unsafe.Pointer(pFile)).FpStore
+ if (*MemStore)(unsafe.Pointer(p)).FzFName != 0 {
+ var i int32
+ var pVfsMutex uintptr = Xsqlite3MutexAlloc(tls, SQLITE_MUTEX_STATIC_VFS1)
+ Xsqlite3_mutex_enter(tls, pVfsMutex)
+ for i = 0; i < memdb_g.FnMemStore; i++ {
+ if *(*uintptr)(unsafe.Pointer(memdb_g.FapMemStore + uintptr(i)*8)) == p {
+ memdbEnter(tls, p)
+ if (*MemStore)(unsafe.Pointer(p)).FnRef == 1 {
+ *(*uintptr)(unsafe.Pointer(memdb_g.FapMemStore + uintptr(i)*8)) = *(*uintptr)(unsafe.Pointer(memdb_g.FapMemStore + uintptr(libc.PreDecInt32(&memdb_g.FnMemStore, 1))*8))
+ if memdb_g.FnMemStore == 0 {
+ Xsqlite3_free(tls, memdb_g.FapMemStore)
+ memdb_g.FapMemStore = uintptr(0)
+ }
+ }
+ break
+ }
+ }
+ Xsqlite3_mutex_leave(tls, pVfsMutex)
+ } else {
+ memdbEnter(tls, p)
+ }
+ (*MemStore)(unsafe.Pointer(p)).FnRef--
+ if (*MemStore)(unsafe.Pointer(p)).FnRef <= 0 {
+ if ((*MemStore)(unsafe.Pointer(p)).FmFlags & uint32(SQLITE_DESERIALIZE_FREEONCLOSE)) != 0 {
+ Xsqlite3_free(tls, (*MemStore)(unsafe.Pointer(p)).FaData)
+ }
+ memdbLeave(tls, p)
+ Xsqlite3_mutex_free(tls, (*MemStore)(unsafe.Pointer(p)).FpMutex)
+ Xsqlite3_free(tls, p)
+ } else {
+ memdbLeave(tls, p)
+ }
+ return SQLITE_OK
+}
+
+// Read data from an memdb-file.
+func memdbRead(tls *libc.TLS, pFile uintptr, zBuf uintptr, iAmt int32, iOfst Sqlite_int64) int32 { /* sqlite3.c:48771:12: */
+ var p uintptr = (*MemFile)(unsafe.Pointer(pFile)).FpStore
+ memdbEnter(tls, p)
+ if (iOfst + Sqlite_int64(iAmt)) > (*MemStore)(unsafe.Pointer(p)).Fsz {
+ libc.Xmemset(tls, zBuf, 0, uint64(iAmt))
+ if iOfst < (*MemStore)(unsafe.Pointer(p)).Fsz {
+ libc.Xmemcpy(tls, zBuf, ((*MemStore)(unsafe.Pointer(p)).FaData + uintptr(iOfst)), (uint64((*MemStore)(unsafe.Pointer(p)).Fsz - iOfst)))
+ }
+ memdbLeave(tls, p)
+ return (SQLITE_IOERR | (int32(2) << 8))
+ }
+ libc.Xmemcpy(tls, zBuf, ((*MemStore)(unsafe.Pointer(p)).FaData + uintptr(iOfst)), uint64(iAmt))
+ memdbLeave(tls, p)
+ return SQLITE_OK
+}
+
+// Try to enlarge the memory allocation to hold at least sz bytes
+func memdbEnlarge(tls *libc.TLS, p uintptr, newSz Sqlite3_int64) int32 { /* sqlite3.c:48793:12: */
+ var pNew uintptr
+ if (((*MemStore)(unsafe.Pointer(p)).FmFlags & uint32(SQLITE_DESERIALIZE_RESIZEABLE)) == uint32(0)) || ((*MemStore)(unsafe.Pointer(p)).FnMmap > 0) {
+ return SQLITE_FULL
+ }
+ if newSz > (*MemStore)(unsafe.Pointer(p)).FszMax {
+ return SQLITE_FULL
+ }
+ newSz = newSz * (int64(2))
+ if newSz > (*MemStore)(unsafe.Pointer(p)).FszMax {
+ newSz = (*MemStore)(unsafe.Pointer(p)).FszMax
+ }
+ pNew = Xsqlite3Realloc(tls, (*MemStore)(unsafe.Pointer(p)).FaData, uint64(newSz))
+ if pNew == uintptr(0) {
+ return (SQLITE_IOERR | (int32(12) << 8))
+ }
+ (*MemStore)(unsafe.Pointer(p)).FaData = pNew
+ (*MemStore)(unsafe.Pointer(p)).FszAlloc = newSz
+ return SQLITE_OK
+}
+
+// Write data to an memdb-file.
+func memdbWrite(tls *libc.TLS, pFile uintptr, z uintptr, iAmt int32, iOfst Sqlite_int64) int32 { /* sqlite3.c:48813:12: */
+ var p uintptr = (*MemFile)(unsafe.Pointer(pFile)).FpStore
+ memdbEnter(tls, p)
+ if ((*MemStore)(unsafe.Pointer(p)).FmFlags & uint32(SQLITE_DESERIALIZE_READONLY)) != 0 {
+ // Can't happen: memdbLock() will return SQLITE_READONLY before
+ // reaching this point
+ memdbLeave(tls, p)
+ return (SQLITE_IOERR | (int32(3) << 8))
+ }
+ if (iOfst + Sqlite_int64(iAmt)) > (*MemStore)(unsafe.Pointer(p)).Fsz {
+ var rc int32
+ if ((iOfst + Sqlite_int64(iAmt)) > (*MemStore)(unsafe.Pointer(p)).FszAlloc) &&
+ ((libc.AssignInt32(&rc, memdbEnlarge(tls, p, (iOfst+Sqlite_int64(iAmt))))) != SQLITE_OK) {
+ memdbLeave(tls, p)
+ return rc
+ }
+ if iOfst > (*MemStore)(unsafe.Pointer(p)).Fsz {
+ libc.Xmemset(tls, ((*MemStore)(unsafe.Pointer(p)).FaData + uintptr((*MemStore)(unsafe.Pointer(p)).Fsz)), 0, (uint64(iOfst - (*MemStore)(unsafe.Pointer(p)).Fsz)))
+ }
+ (*MemStore)(unsafe.Pointer(p)).Fsz = (iOfst + Sqlite_int64(iAmt))
+ }
+ libc.Xmemcpy(tls, ((*MemStore)(unsafe.Pointer(p)).FaData + uintptr(iOfst)), z, uint64(iAmt))
+ memdbLeave(tls, p)
+ return SQLITE_OK
+}
+
+// Truncate an memdb-file.
+//
+// In rollback mode (which is always the case for memdb, as it does not
+// support WAL mode) the truncate() method is only used to reduce
+// the size of a file, never to increase the size.
+func memdbTruncate(tls *libc.TLS, pFile uintptr, size Sqlite_int64) int32 { /* sqlite3.c:48850:12: */
+ var p uintptr = (*MemFile)(unsafe.Pointer(pFile)).FpStore
+ var rc int32 = SQLITE_OK
+ memdbEnter(tls, p)
+ if size > (*MemStore)(unsafe.Pointer(p)).Fsz {
+ rc = SQLITE_FULL
+ } else {
+ (*MemStore)(unsafe.Pointer(p)).Fsz = size
+ }
+ memdbLeave(tls, p)
+ return rc
+}
+
+// Sync an memdb-file.
+func memdbSync(tls *libc.TLS, pFile uintptr, flags int32) int32 { /* sqlite3.c:48866:12: */
+ _ = pFile
+ _ = flags
+ return SQLITE_OK
+}
+
+// Return the current file-size of an memdb-file.
+func memdbFileSize(tls *libc.TLS, pFile uintptr, pSize uintptr) int32 { /* sqlite3.c:48875:12: */
+ var p uintptr = (*MemFile)(unsafe.Pointer(pFile)).FpStore
+ memdbEnter(tls, p)
+ *(*Sqlite_int64)(unsafe.Pointer(pSize)) = (*MemStore)(unsafe.Pointer(p)).Fsz
+ memdbLeave(tls, p)
+ return SQLITE_OK
+}
+
+// Lock an memdb-file.
+func memdbLock(tls *libc.TLS, pFile uintptr, eLock int32) int32 { /* sqlite3.c:48886:12: */
+ var pThis uintptr = pFile
+ var p uintptr = (*MemFile)(unsafe.Pointer(pThis)).FpStore
+ var rc int32 = SQLITE_OK
+ if eLock == (*MemFile)(unsafe.Pointer(pThis)).FeLock {
+ return SQLITE_OK
+ }
+ memdbEnter(tls, p)
+ if eLock > SQLITE_LOCK_SHARED {
+ if ((*MemStore)(unsafe.Pointer(p)).FmFlags & uint32(SQLITE_DESERIALIZE_READONLY)) != 0 {
+ rc = SQLITE_READONLY
+ } else if (*MemFile)(unsafe.Pointer(pThis)).FeLock <= SQLITE_LOCK_SHARED {
+ if (*MemStore)(unsafe.Pointer(p)).FnWrLock != 0 {
+ rc = SQLITE_BUSY
+ } else {
+ (*MemStore)(unsafe.Pointer(p)).FnWrLock = 1
+ }
+ }
+ } else if eLock == SQLITE_LOCK_SHARED {
+ if (*MemFile)(unsafe.Pointer(pThis)).FeLock > SQLITE_LOCK_SHARED {
+
+ (*MemStore)(unsafe.Pointer(p)).FnWrLock = 0
+ } else if (*MemStore)(unsafe.Pointer(p)).FnWrLock != 0 {
+ rc = SQLITE_BUSY
+ } else {
+ (*MemStore)(unsafe.Pointer(p)).FnRdLock++
+ }
+ } else {
+
+ if (*MemFile)(unsafe.Pointer(pThis)).FeLock > SQLITE_LOCK_SHARED {
+
+ (*MemStore)(unsafe.Pointer(p)).FnWrLock = 0
+ }
+
+ (*MemStore)(unsafe.Pointer(p)).FnRdLock--
+ }
+ if rc == SQLITE_OK {
+ (*MemFile)(unsafe.Pointer(pThis)).FeLock = eLock
+ }
+ memdbLeave(tls, p)
+ return rc
+}
+
+// File control method. For custom operations on an memdb-file.
+func memdbFileControl(tls *libc.TLS, pFile uintptr, op int32, pArg uintptr) int32 { /* sqlite3.c:48940:12: */
+ bp := tls.Alloc(16)
+ defer tls.Free(16)
+
+ var p uintptr = (*MemFile)(unsafe.Pointer(pFile)).FpStore
+ var rc int32 = SQLITE_NOTFOUND
+ memdbEnter(tls, p)
+ if op == SQLITE_FCNTL_VFSNAME {
+ *(*uintptr)(unsafe.Pointer(pArg)) = Xsqlite3_mprintf(tls, ts+2968 /* "memdb(%p,%lld)" */, libc.VaList(bp, (*MemStore)(unsafe.Pointer(p)).FaData, (*MemStore)(unsafe.Pointer(p)).Fsz))
+ rc = SQLITE_OK
+ }
+ if op == SQLITE_FCNTL_SIZE_LIMIT {
+ var iLimit Sqlite3_int64 = *(*Sqlite3_int64)(unsafe.Pointer(pArg))
+ if iLimit < (*MemStore)(unsafe.Pointer(p)).Fsz {
+ if iLimit < int64(0) {
+ iLimit = (*MemStore)(unsafe.Pointer(p)).FszMax
+ } else {
+ iLimit = (*MemStore)(unsafe.Pointer(p)).Fsz
+ }
+ }
+ (*MemStore)(unsafe.Pointer(p)).FszMax = iLimit
+ *(*Sqlite3_int64)(unsafe.Pointer(pArg)) = iLimit
+ rc = SQLITE_OK
+ }
+ memdbLeave(tls, p)
+ return rc
+}
+
+// Return the device characteristic flags supported by an memdb-file.
+func memdbDeviceCharacteristics(tls *libc.TLS, pFile uintptr) int32 { /* sqlite3.c:48977:12: */
+ _ = pFile
+ return (((SQLITE_IOCAP_ATOMIC | SQLITE_IOCAP_POWERSAFE_OVERWRITE) | SQLITE_IOCAP_SAFE_APPEND) | SQLITE_IOCAP_SEQUENTIAL)
+}
+
+// Fetch a page of a memory-mapped file
+func memdbFetch(tls *libc.TLS, pFile uintptr, iOfst Sqlite3_int64, iAmt int32, pp uintptr) int32 { /* sqlite3.c:48986:12: */
+ var p uintptr = (*MemFile)(unsafe.Pointer(pFile)).FpStore
+ memdbEnter(tls, p)
+ if (iOfst + Sqlite3_int64(iAmt)) > (*MemStore)(unsafe.Pointer(p)).Fsz {
+ *(*uintptr)(unsafe.Pointer(pp)) = uintptr(0)
+ } else {
+ (*MemStore)(unsafe.Pointer(p)).FnMmap++
+ *(*uintptr)(unsafe.Pointer(pp)) = ((*MemStore)(unsafe.Pointer(p)).FaData + uintptr(iOfst))
+ }
+ memdbLeave(tls, p)
+ return SQLITE_OK
+}
+
+// Release a memory-mapped page
+func memdbUnfetch(tls *libc.TLS, pFile uintptr, iOfst Sqlite3_int64, pPage uintptr) int32 { /* sqlite3.c:49005:12: */
+ var p uintptr = (*MemFile)(unsafe.Pointer(pFile)).FpStore
+ _ = iOfst
+ _ = pPage
+ memdbEnter(tls, p)
+ (*MemStore)(unsafe.Pointer(p)).FnMmap--
+ memdbLeave(tls, p)
+ return SQLITE_OK
+}
+
+// Open an mem file handle.
+func memdbOpen(tls *libc.TLS, pVfs uintptr, zName uintptr, pFd uintptr, flags int32, pOutFlags uintptr) int32 { /* sqlite3.c:49018:12: */
+ var pFile uintptr = pFd
+ var p uintptr = uintptr(0)
+ var szName int32
+ if (flags & SQLITE_OPEN_MAIN_DB) == 0 {
+ return (*struct {
+ f func(*libc.TLS, uintptr, uintptr, uintptr, int32, uintptr) int32
+ })(unsafe.Pointer(&struct{ uintptr }{(*Sqlite3_vfs)(unsafe.Pointer(((*Sqlite3_vfs)(unsafe.Pointer(pVfs)).FpAppData))).FxOpen})).f(tls, (*Sqlite3_vfs)(unsafe.Pointer(pVfs)).FpAppData, zName, pFd, flags, pOutFlags)
+ }
+ libc.Xmemset(tls, pFile, 0, uint64(unsafe.Sizeof(MemStore{})))
+ szName = Xsqlite3Strlen30(tls, zName)
+ if (szName > 1) && (int32(*(*uint8)(unsafe.Pointer(zName))) == '/') {
+ var i int32
+ var pVfsMutex uintptr = Xsqlite3MutexAlloc(tls, SQLITE_MUTEX_STATIC_VFS1)
+ Xsqlite3_mutex_enter(tls, pVfsMutex)
+ for i = 0; i < memdb_g.FnMemStore; i++ {
+ if libc.Xstrcmp(tls, (*MemStore)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(memdb_g.FapMemStore + uintptr(i)*8)))).FzFName, zName) == 0 {
+ p = *(*uintptr)(unsafe.Pointer(memdb_g.FapMemStore + uintptr(i)*8))
+ break
+ }
+ }
+ if p == uintptr(0) {
+ var apNew uintptr
+ p = Xsqlite3Malloc(tls, (uint64((uint64(unsafe.Sizeof(MemStore{})) + uint64(szName)) + uint64(3))))
+ if p == uintptr(0) {
+ Xsqlite3_mutex_leave(tls, pVfsMutex)
+ return SQLITE_NOMEM
+ }
+ apNew = Xsqlite3Realloc(tls, memdb_g.FapMemStore,
+ (uint64(uint64(unsafe.Sizeof(uintptr(0))) * (uint64(memdb_g.FnMemStore + 1)))))
+ if apNew == uintptr(0) {
+ Xsqlite3_free(tls, p)
+ Xsqlite3_mutex_leave(tls, pVfsMutex)
+ return SQLITE_NOMEM
+ }
+ *(*uintptr)(unsafe.Pointer(apNew + uintptr(libc.PostIncInt32(&memdb_g.FnMemStore, 1))*8)) = p
+ memdb_g.FapMemStore = apNew
+ libc.Xmemset(tls, p, 0, uint64(unsafe.Sizeof(MemStore{})))
+ (*MemStore)(unsafe.Pointer(p)).FmFlags = (uint32(SQLITE_DESERIALIZE_RESIZEABLE | SQLITE_DESERIALIZE_FREEONCLOSE))
+ (*MemStore)(unsafe.Pointer(p)).FszMax = Xsqlite3Config.FmxMemdbSize
+ (*MemStore)(unsafe.Pointer(p)).FzFName = (p + 1*72)
+ libc.Xmemcpy(tls, (*MemStore)(unsafe.Pointer(p)).FzFName, zName, (uint64(szName + 1)))
+ (*MemStore)(unsafe.Pointer(p)).FpMutex = Xsqlite3_mutex_alloc(tls, SQLITE_MUTEX_FAST)
+ if (*MemStore)(unsafe.Pointer(p)).FpMutex == uintptr(0) {
+ memdb_g.FnMemStore--
+ Xsqlite3_free(tls, p)
+ Xsqlite3_mutex_leave(tls, pVfsMutex)
+ return SQLITE_NOMEM
+ }
+ (*MemStore)(unsafe.Pointer(p)).FnRef = 1
+ memdbEnter(tls, p)
+ } else {
+ memdbEnter(tls, p)
+ (*MemStore)(unsafe.Pointer(p)).FnRef++
+ }
+ Xsqlite3_mutex_leave(tls, pVfsMutex)
+ } else {
+ p = Xsqlite3Malloc(tls, uint64(unsafe.Sizeof(MemStore{})))
+ if p == uintptr(0) {
+ return SQLITE_NOMEM
+ }
+ libc.Xmemset(tls, p, 0, uint64(unsafe.Sizeof(MemStore{})))
+ (*MemStore)(unsafe.Pointer(p)).FmFlags = (uint32(SQLITE_DESERIALIZE_RESIZEABLE | SQLITE_DESERIALIZE_FREEONCLOSE))
+ (*MemStore)(unsafe.Pointer(p)).FszMax = Xsqlite3Config.FmxMemdbSize
+ }
+ (*MemFile)(unsafe.Pointer(pFile)).FpStore = p
+ // True because flags==SQLITE_OPEN_MAIN_DB
+ *(*int32)(unsafe.Pointer(pOutFlags)) = (flags | SQLITE_OPEN_MEMORY)
+ (*Sqlite3_file)(unsafe.Pointer(pFd)).FpMethods = uintptr(unsafe.Pointer(&memdb_io_methods))
+ memdbLeave(tls, p)
+ return SQLITE_OK
+}
+
+// Test for access permissions. Return true if the requested permission
+// is available, or false otherwise.
+//
+// With memdb, no files ever exist on disk. So always return false.
+func memdbAccess(tls *libc.TLS, pVfs uintptr, zPath uintptr, flags int32, pResOut uintptr) int32 { /* sqlite3.c:49115:12: */
+ _ = pVfs
+ _ = zPath
+ _ = flags
+ *(*int32)(unsafe.Pointer(pResOut)) = 0
+ return SQLITE_OK
+}
+
+// Populate buffer zOut with the full canonical pathname corresponding
+// to the pathname in zPath. zOut is guaranteed to point to a buffer
+// of at least (INST_MAX_PATHNAME+1) bytes.
+func memdbFullPathname(tls *libc.TLS, pVfs uintptr, zPath uintptr, nOut int32, zOut uintptr) int32 { /* sqlite3.c:49133:12: */
+ bp := tls.Alloc(8)
+ defer tls.Free(8)
+
+ _ = pVfs
+ Xsqlite3_snprintf(tls, nOut, zOut, ts+2790 /* "%s" */, libc.VaList(bp, zPath))
+ return SQLITE_OK
+}
+
+// Open the dynamic library located at zPath and return a handle.
+func memdbDlOpen(tls *libc.TLS, pVfs uintptr, zPath uintptr) uintptr { /* sqlite3.c:49147:13: */
+ return (*struct {
+ f func(*libc.TLS, uintptr, uintptr) uintptr
+ })(unsafe.Pointer(&struct{ uintptr }{(*Sqlite3_vfs)(unsafe.Pointer(((*Sqlite3_vfs)(unsafe.Pointer(pVfs)).FpAppData))).FxDlOpen})).f(tls, (*Sqlite3_vfs)(unsafe.Pointer(pVfs)).FpAppData, zPath)
+}
+
+// Populate the buffer zErrMsg (size nByte bytes) with a human readable
+// utf-8 string describing the most recent error encountered associated
+// with dynamic libraries.
+func memdbDlError(tls *libc.TLS, pVfs uintptr, nByte int32, zErrMsg uintptr) { /* sqlite3.c:49156:13: */
+ (*struct {
+ f func(*libc.TLS, uintptr, int32, uintptr)
+ })(unsafe.Pointer(&struct{ uintptr }{(*Sqlite3_vfs)(unsafe.Pointer(((*Sqlite3_vfs)(unsafe.Pointer(pVfs)).FpAppData))).FxDlError})).f(tls, (*Sqlite3_vfs)(unsafe.Pointer(pVfs)).FpAppData, nByte, zErrMsg)
+}
+
+// Return a pointer to the symbol zSymbol in the dynamic library pHandle.
+func memdbDlSym(tls *libc.TLS, pVfs uintptr, p uintptr, zSym uintptr) uintptr { /* sqlite3.c:49163:13: */
+ return (*struct {
+ f func(*libc.TLS, uintptr, uintptr, uintptr) uintptr
+ })(unsafe.Pointer(&struct{ uintptr }{(*Sqlite3_vfs)(unsafe.Pointer(((*Sqlite3_vfs)(unsafe.Pointer(pVfs)).FpAppData))).FxDlSym})).f(tls, (*Sqlite3_vfs)(unsafe.Pointer(pVfs)).FpAppData, p, zSym)
+}
+
+// Close the dynamic library handle pHandle.
+func memdbDlClose(tls *libc.TLS, pVfs uintptr, pHandle uintptr) { /* sqlite3.c:49170:13: */
+ (*struct {
+ f func(*libc.TLS, uintptr, uintptr)
+ })(unsafe.Pointer(&struct{ uintptr }{(*Sqlite3_vfs)(unsafe.Pointer(((*Sqlite3_vfs)(unsafe.Pointer(pVfs)).FpAppData))).FxDlClose})).f(tls, (*Sqlite3_vfs)(unsafe.Pointer(pVfs)).FpAppData, pHandle)
+}
+
+// Populate the buffer pointed to by zBufOut with nByte bytes of
+// random data.
+func memdbRandomness(tls *libc.TLS, pVfs uintptr, nByte int32, zBufOut uintptr) int32 { /* sqlite3.c:49178:12: */
+ return (*struct {
+ f func(*libc.TLS, uintptr, int32, uintptr) int32
+ })(unsafe.Pointer(&struct{ uintptr }{(*Sqlite3_vfs)(unsafe.Pointer(((*Sqlite3_vfs)(unsafe.Pointer(pVfs)).FpAppData))).FxRandomness})).f(tls, (*Sqlite3_vfs)(unsafe.Pointer(pVfs)).FpAppData, nByte, zBufOut)
+}
+
+// Sleep for nMicro microseconds. Return the number of microseconds
+// actually slept.
+func memdbSleep(tls *libc.TLS, pVfs uintptr, nMicro int32) int32 { /* sqlite3.c:49186:12: */
+ return (*struct {
+ f func(*libc.TLS, uintptr, int32) int32
+ })(unsafe.Pointer(&struct{ uintptr }{(*Sqlite3_vfs)(unsafe.Pointer(((*Sqlite3_vfs)(unsafe.Pointer(pVfs)).FpAppData))).FxSleep})).f(tls, (*Sqlite3_vfs)(unsafe.Pointer(pVfs)).FpAppData, nMicro)
+}
+
+func memdbGetLastError(tls *libc.TLS, pVfs uintptr, a int32, b uintptr) int32 { /* sqlite3.c:49199:12: */
+ return (*struct {
+ f func(*libc.TLS, uintptr, int32, uintptr) int32
+ })(unsafe.Pointer(&struct{ uintptr }{(*Sqlite3_vfs)(unsafe.Pointer(((*Sqlite3_vfs)(unsafe.Pointer(pVfs)).FpAppData))).FxGetLastError})).f(tls, (*Sqlite3_vfs)(unsafe.Pointer(pVfs)).FpAppData, a, b)
+}
+
+func memdbCurrentTimeInt64(tls *libc.TLS, pVfs uintptr, p uintptr) int32 { /* sqlite3.c:49202:12: */
+ return (*struct {
+ f func(*libc.TLS, uintptr, uintptr) int32
+ })(unsafe.Pointer(&struct{ uintptr }{(*Sqlite3_vfs)(unsafe.Pointer(((*Sqlite3_vfs)(unsafe.Pointer(pVfs)).FpAppData))).FxCurrentTimeInt64})).f(tls, (*Sqlite3_vfs)(unsafe.Pointer(pVfs)).FpAppData, p)
+}
+
+// Translate a database connection pointer and schema name into a
+// MemFile pointer.
+func memdbFromDbSchema(tls *libc.TLS, db uintptr, zSchema uintptr) uintptr { /* sqlite3.c:49210:16: */
+ bp := tls.Alloc(8)
+ defer tls.Free(8)
+
+ *(*uintptr)(unsafe.Pointer(bp /* p */)) = uintptr(0)
+ var pStore uintptr
+ var rc int32 = Xsqlite3_file_control(tls, db, zSchema, SQLITE_FCNTL_FILE_POINTER, bp /* &p */)
+ if rc != 0 {
+ return uintptr(0)
+ }
+ if (*MemFile)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp /* p */)))).Fbase.FpMethods != uintptr(unsafe.Pointer(&memdb_io_methods)) {
+ return uintptr(0)
+ }
+ pStore = (*MemFile)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp /* p */)))).FpStore
+ memdbEnter(tls, pStore)
+ if (*MemStore)(unsafe.Pointer(pStore)).FzFName != uintptr(0) {
+ *(*uintptr)(unsafe.Pointer(bp /* p */)) = uintptr(0)
+ }
+ memdbLeave(tls, pStore)
+ return *(*uintptr)(unsafe.Pointer(bp /* p */))
+}
+
+// Return the serialization of a database
+func Xsqlite3_serialize(tls *libc.TLS, db uintptr, zSchema uintptr, piSize uintptr, mFlags uint32) uintptr { /* sqlite3.c:49226:26: */
+ bp := tls.Alloc(24)
+ defer tls.Free(24)
+
+ var p uintptr
+ var iDb int32
+ var pBt uintptr
+ var sz Sqlite3_int64
+ var szPage int32 = 0
+ *(*uintptr)(unsafe.Pointer(bp + 8 /* pStmt */)) = uintptr(0)
+ var pOut uintptr
+ var zSql uintptr
+ var rc int32
+
+ if zSchema == uintptr(0) {
+ zSchema = (*Db)(unsafe.Pointer((*Sqlite3)(unsafe.Pointer(db)).FaDb)).FzDbSName
+ }
+ p = memdbFromDbSchema(tls, db, zSchema)
+ iDb = Xsqlite3FindDbName(tls, db, zSchema)
+ if piSize != 0 {
+ *(*Sqlite3_int64)(unsafe.Pointer(piSize)) = int64(-1)
+ }
+ if iDb < 0 {
+ return uintptr(0)
+ }
+ if p != 0 {
+ var pStore uintptr = (*MemFile)(unsafe.Pointer(p)).FpStore
+
+ if piSize != 0 {
+ *(*Sqlite3_int64)(unsafe.Pointer(piSize)) = (*MemStore)(unsafe.Pointer(pStore)).Fsz
+ }
+ if (mFlags & uint32(SQLITE_SERIALIZE_NOCOPY)) != 0 {
+ pOut = (*MemStore)(unsafe.Pointer(pStore)).FaData
+ } else {
+ pOut = Xsqlite3_malloc64(tls, uint64((*MemStore)(unsafe.Pointer(pStore)).Fsz))
+ if pOut != 0 {
+ libc.Xmemcpy(tls, pOut, (*MemStore)(unsafe.Pointer(pStore)).FaData, uint64((*MemStore)(unsafe.Pointer(pStore)).Fsz))
+ }
+ }
+ return pOut
+ }
+ pBt = (*Db)(unsafe.Pointer((*Sqlite3)(unsafe.Pointer(db)).FaDb + uintptr(iDb)*32)).FpBt
+ if pBt == uintptr(0) {
+ return uintptr(0)
+ }
+ szPage = Xsqlite3BtreeGetPageSize(tls, pBt)
+ zSql = Xsqlite3_mprintf(tls, ts+2983 /* "PRAGMA \"%w\".page..." */, libc.VaList(bp, zSchema))
+ if zSql != 0 {
+ rc = Xsqlite3_prepare_v2(tls, db, zSql, -1, bp+8 /* &pStmt */, uintptr(0))
+ } else {
+ rc = SQLITE_NOMEM
+ }
+ Xsqlite3_free(tls, zSql)
+ if rc != 0 {
+ return uintptr(0)
+ }
+ rc = Xsqlite3_step(tls, *(*uintptr)(unsafe.Pointer(bp + 8 /* pStmt */)))
+ if rc != SQLITE_ROW {
+ pOut = uintptr(0)
+ } else {
+ sz = (Xsqlite3_column_int64(tls, *(*uintptr)(unsafe.Pointer(bp + 8 /* pStmt */)), 0) * Sqlite_int64(szPage))
+ if piSize != 0 {
+ *(*Sqlite3_int64)(unsafe.Pointer(piSize)) = sz
+ }
+ if (mFlags & uint32(SQLITE_SERIALIZE_NOCOPY)) != 0 {
+ pOut = uintptr(0)
+ } else {
+ pOut = Xsqlite3_malloc64(tls, uint64(sz))
+ if pOut != 0 {
+ var nPage int32 = Xsqlite3_column_int(tls, *(*uintptr)(unsafe.Pointer(bp + 8 /* pStmt */)), 0)
+ var pPager uintptr = Xsqlite3BtreePager(tls, pBt)
+ var pgno int32
+ for pgno = 1; pgno <= nPage; pgno++ {
+ *(*uintptr)(unsafe.Pointer(bp + 16 /* pPage */)) = uintptr(0)
+ var pTo uintptr = (pOut + uintptr((Sqlite3_int64(szPage) * (Sqlite3_int64(pgno - 1)))))
+ rc = Xsqlite3PagerGet(tls, pPager, uint32(pgno), bp+16 /* &pPage */, 0)
+ if rc == SQLITE_OK {
+ libc.Xmemcpy(tls, pTo, Xsqlite3PagerGetData(tls, *(*uintptr)(unsafe.Pointer(bp + 16 /* pPage */))), uint64(szPage))
+ } else {
+ libc.Xmemset(tls, pTo, 0, uint64(szPage))
+ }
+ Xsqlite3PagerUnref(tls, *(*uintptr)(unsafe.Pointer(bp + 16 /* pPage */)))
+ }
+ }
+ }
+ }
+ Xsqlite3_finalize(tls, *(*uintptr)(unsafe.Pointer(bp + 8 /* pStmt */)))
+ return pOut
+}
+
+// Convert zSchema to a MemDB and initialize its content.
+func Xsqlite3_deserialize(tls *libc.TLS, db uintptr, zSchema uintptr, pData uintptr, szDb Sqlite3_int64, szBuf Sqlite3_int64, mFlags uint32) int32 { /* sqlite3.c:49307:16: */
+ bp := tls.Alloc(16)
+ defer tls.Free(16)
+
+ var p uintptr
+ var zSql uintptr
+ // var pStmt uintptr at bp+8, 8
+
+ var rc int32
+ var iDb int32
+ var pStore uintptr
+ *(*uintptr)(unsafe.Pointer(bp + 8 /* pStmt */)) = uintptr(0)
+
+ Xsqlite3_mutex_enter(tls, (*Sqlite3)(unsafe.Pointer(db)).Fmutex)
+ if !(zSchema == uintptr(0)) {
+ goto __1
+ }
+ zSchema = (*Db)(unsafe.Pointer((*Sqlite3)(unsafe.Pointer(db)).FaDb)).FzDbSName
+__1:
+ ;
+ iDb = Xsqlite3FindDbName(tls, db, zSchema)
+ if !(iDb < 0) {
+ goto __2
+ }
+ rc = SQLITE_ERROR
+ goto end_deserialize
+__2:
+ ;
+ zSql = Xsqlite3_mprintf(tls, ts+3006 /* "ATTACH x AS %Q" */, libc.VaList(bp, zSchema))
+ if !(zSql == uintptr(0)) {
+ goto __3
+ }
+ rc = SQLITE_NOMEM
+ goto __4
+__3:
+ rc = Xsqlite3_prepare_v2(tls, db, zSql, -1, bp+8 /* &pStmt */, uintptr(0))
+ Xsqlite3_free(tls, zSql)
+__4:
+ ;
+ if !(rc != 0) {
+ goto __5
+ }
+ goto end_deserialize
+__5:
+ ;
+ (*Sqlite3)(unsafe.Pointer(db)).Finit.FiDb = U8(iDb)
+ libc.SetBitFieldPtr8Uint32(db+184 /* &.init */ +8 /* &.reopenMemdb */, uint32(1), 5, 0x20)
+ rc = Xsqlite3_step(tls, *(*uintptr)(unsafe.Pointer(bp + 8 /* pStmt */)))
+ libc.SetBitFieldPtr8Uint32(db+184 /* &.init */ +8 /* &.reopenMemdb */, uint32(0), 5, 0x20)
+ if !(rc != SQLITE_DONE) {
+ goto __6
+ }
+ rc = SQLITE_ERROR
+ goto end_deserialize
+__6:
+ ;
+ p = memdbFromDbSchema(tls, db, zSchema)
+ if !(p == uintptr(0)) {
+ goto __7
+ }
+ rc = SQLITE_ERROR
+ goto __8
+__7:
+ pStore = (*MemFile)(unsafe.Pointer(p)).FpStore
+ (*MemStore)(unsafe.Pointer(pStore)).FaData = pData
+ pData = uintptr(0)
+ (*MemStore)(unsafe.Pointer(pStore)).Fsz = szDb
+ (*MemStore)(unsafe.Pointer(pStore)).FszAlloc = szBuf
+ (*MemStore)(unsafe.Pointer(pStore)).FszMax = szBuf
+ if !((*MemStore)(unsafe.Pointer(pStore)).FszMax < Xsqlite3Config.FmxMemdbSize) {
+ goto __9
+ }
+ (*MemStore)(unsafe.Pointer(pStore)).FszMax = Xsqlite3Config.FmxMemdbSize
+__9:
+ ;
+ (*MemStore)(unsafe.Pointer(pStore)).FmFlags = mFlags
+ rc = SQLITE_OK
+__8:
+ ;
+
+end_deserialize:
+ Xsqlite3_finalize(tls, *(*uintptr)(unsafe.Pointer(bp + 8 /* pStmt */)))
+ if !((pData != 0) && ((mFlags & uint32(SQLITE_DESERIALIZE_FREEONCLOSE)) != uint32(0))) {
+ goto __10
+ }
+ Xsqlite3_free(tls, pData)
+__10:
+ ;
+ Xsqlite3_mutex_leave(tls, (*Sqlite3)(unsafe.Pointer(db)).Fmutex)
+ return rc
+}
+
+// This routine is called when the extension is loaded.
+// Register the new VFS.
+func Xsqlite3MemdbInit(tls *libc.TLS) int32 { /* sqlite3.c:49382:20: */
+ var pLower uintptr = Xsqlite3_vfs_find(tls, uintptr(0))
+ var sz uint32
+ if pLower == uintptr(0) {
+ return SQLITE_ERROR
+ }
+ sz = uint32((*Sqlite3_vfs)(unsafe.Pointer(pLower)).FszOsFile)
+ memdb_vfs.FpAppData = pLower
+ // The following conditional can only be true when compiled for
+ // Windows x86 and SQLITE_MAX_MMAP_SIZE=0. We always leave
+ // it in, to be safe, but it is marked as NO_TEST since there
+ // is no way to reach it under most builds.
+ if (uint64(sz) < uint64(unsafe.Sizeof(MemFile{}))) {
+ sz = uint32(unsafe.Sizeof(MemFile{}))
+ } //NO_TEST
+ memdb_vfs.FszOsFile = int32(sz)
+ return Xsqlite3_vfs_register(tls, uintptr(unsafe.Pointer(&memdb_vfs)), 0)
+}
+
// Create a new bitmap object able to handle bits between 0 and iSize,
// inclusive. Return a pointer to the new object. Return NULL if
// malloc fails.
-func Xsqlite3BitvecCreate(tls *libc.TLS, iSize U32) uintptr { /* sqlite3.c:49018:23: */
+func Xsqlite3BitvecCreate(tls *libc.TLS, iSize U32) uintptr { /* sqlite3.c:49514:23: */
var p uintptr
p = Xsqlite3MallocZero(tls, uint64(unsafe.Sizeof(Bitvec{})))
@@ -26441,7 +28273,7 @@ func Xsqlite3BitvecCreate(tls *libc.TLS, iSize U32) uintptr { /* sqlite3.c:49018
// Check to see if the i-th bit is set. Return true or false.
// If p is NULL (if the bitmap has not been created) or if
// i is out of range, then return false.
-func Xsqlite3BitvecTestNotNull(tls *libc.TLS, p uintptr, i U32) int32 { /* sqlite3.c:49033:20: */
+func Xsqlite3BitvecTestNotNull(tls *libc.TLS, p uintptr, i U32) int32 { /* sqlite3.c:49529:20: */
i--
if i >= (*Bitvec)(unsafe.Pointer(p)).FiSize {
@@ -26470,7 +28302,7 @@ func Xsqlite3BitvecTestNotNull(tls *libc.TLS, p uintptr, i U32) int32 { /* sqlit
return int32(0)
}
-func Xsqlite3BitvecTest(tls *libc.TLS, p uintptr, i U32) int32 { /* sqlite3.c:49056:20: */
+func Xsqlite3BitvecTest(tls *libc.TLS, p uintptr, i U32) int32 { /* sqlite3.c:49552:20: */
return (libc.Bool32((p != uintptr(0)) && (Xsqlite3BitvecTestNotNull(tls, p, i) != 0)))
}
@@ -26484,7 +28316,7 @@ func Xsqlite3BitvecTest(tls *libc.TLS, p uintptr, i U32) int32 { /* sqlite3.c:49
// The calling function must ensure that p is a valid Bitvec object
// and that the value for "i" is within range of the Bitvec object.
// Otherwise the behavior is undefined.
-func Xsqlite3BitvecSet(tls *libc.TLS, p uintptr, i U32) int32 { /* sqlite3.c:49072:20: */
+func Xsqlite3BitvecSet(tls *libc.TLS, p uintptr, i U32) int32 { /* sqlite3.c:49568:20: */
var h U32
var bin U32
var j uint32
@@ -26621,7 +28453,7 @@ bitvec_set_end:
//
// pBuf must be a pointer to at least BITVEC_SZ bytes of temporary storage
// that BitvecClear can use to rebuilt its hash table.
-func Xsqlite3BitvecClear(tls *libc.TLS, p uintptr, i U32, pBuf uintptr) { /* sqlite3.c:49143:21: */
+func Xsqlite3BitvecClear(tls *libc.TLS, p uintptr, i U32, pBuf uintptr) { /* sqlite3.c:49639:21: */
if p == uintptr(0) {
return
}
@@ -26660,7 +28492,7 @@ func Xsqlite3BitvecClear(tls *libc.TLS, p uintptr, i U32, pBuf uintptr) { /* sql
}
// Destroy a bitmap object. Reclaim all memory used.
-func Xsqlite3BitvecDestroy(tls *libc.TLS, p uintptr) { /* sqlite3.c:49180:21: */
+func Xsqlite3BitvecDestroy(tls *libc.TLS, p uintptr) { /* sqlite3.c:49676:21: */
if p == uintptr(0) {
return
}
@@ -26675,7 +28507,7 @@ func Xsqlite3BitvecDestroy(tls *libc.TLS, p uintptr) { /* sqlite3.c:49180:21: */
// Return the value of the iSize parameter specified when Bitvec *p
// was created.
-func Xsqlite3BitvecSize(tls *libc.TLS, p uintptr) U32 { /* sqlite3.c:49195:20: */
+func Xsqlite3BitvecSize(tls *libc.TLS, p uintptr) U32 { /* sqlite3.c:49691:20: */
return (*Bitvec)(unsafe.Pointer(p)).FiSize
}
@@ -26712,7 +28544,7 @@ func Xsqlite3BitvecSize(tls *libc.TLS, p uintptr) U32 { /* sqlite3.c:49195:20: *
// an error is returned. If they are the same, zero is returned.
//
// If a memory allocation error occurs, return -1.
-func Xsqlite3BitvecBuiltinTest(tls *libc.TLS, sz int32, aOp uintptr) int32 { /* sqlite3.c:49240:20: */
+func Xsqlite3BitvecBuiltinTest(tls *libc.TLS, sz int32, aOp uintptr) int32 { /* sqlite3.c:49736:20: */
bp := tls.Alloc(4)
defer tls.Free(4)
@@ -26875,7 +28707,7 @@ bitvec_end:
// argument determines what operation to do. The 0x01 bit means first
// remove pPage from the dirty list. The 0x02 means add pPage back to
// the dirty list. Doing both moves pPage to the front of the dirty list.
-func pcacheManageDirtyList(tls *libc.TLS, pPage uintptr, addRemove U8) { /* sqlite3.c:49475:13: */
+func pcacheManageDirtyList(tls *libc.TLS, pPage uintptr, addRemove U8) { /* sqlite3.c:49971:13: */
var p uintptr = (*PgHdr)(unsafe.Pointer(pPage)).FpCache
if (int32(addRemove) & PCACHE_DIRTYLIST_REMOVE) != 0 {
@@ -26937,17 +28769,19 @@ func pcacheManageDirtyList(tls *libc.TLS, pPage uintptr, addRemove U8) { /* sqli
// Wrapper around the pluggable caches xUnpin method. If the cache is
// being used for an in-memory database, this function is a no-op.
-func pcacheUnpin(tls *libc.TLS, p uintptr) { /* sqlite3.c:49545:13: */
+func pcacheUnpin(tls *libc.TLS, p uintptr) { /* sqlite3.c:50041:13: */
if (*PCache)(unsafe.Pointer((*PgHdr)(unsafe.Pointer(p)).FpCache)).FbPurgeable != 0 {
- (*(*func(*libc.TLS, uintptr, uintptr, int32))(unsafe.Pointer((uintptr(unsafe.Pointer(&Xsqlite3Config)) + 168 /* &.pcache2 */ + 64 /* &.xUnpin */))))(tls, (*PCache)(unsafe.Pointer((*PgHdr)(unsafe.Pointer(p)).FpCache)).FpCache, (*PgHdr)(unsafe.Pointer(p)).FpPage, 0)
+ (*struct {
+ f func(*libc.TLS, uintptr, uintptr, int32)
+ })(unsafe.Pointer(&struct{ uintptr }{Xsqlite3Config.Fpcache2.FxUnpin})).f(tls, (*PCache)(unsafe.Pointer((*PgHdr)(unsafe.Pointer(p)).FpCache)).FpCache, (*PgHdr)(unsafe.Pointer(p)).FpPage, 0)
}
}
// Compute the number of pages of cache requested. p->szCache is the
// cache size requested by the "PRAGMA cache_size" statement.
-func numberOfCachePages(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:49557:12: */
+func numberOfCachePages(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:50053:12: */
if (*PCache)(unsafe.Pointer(p)).FszCache >= 0 {
// IMPLEMENTATION-OF: R-42059-47211 If the argument N is positive then the
// suggested cache size is set to N.
@@ -26967,7 +28801,7 @@ func numberOfCachePages(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:49557:12:
//
// Initialize and shutdown the page cache subsystem. Neither of these
// functions are threadsafe.
-func Xsqlite3PcacheInitialize(tls *libc.TLS) int32 { /* sqlite3.c:49576:20: */
+func Xsqlite3PcacheInitialize(tls *libc.TLS) int32 { /* sqlite3.c:50072:20: */
if Xsqlite3Config.Fpcache2.FxInit == uintptr(0) {
// IMPLEMENTATION-OF: R-26801-64137 If the xInit() method is NULL, then the
// built-in default page cache is used instead of the application defined
@@ -26975,18 +28809,20 @@ func Xsqlite3PcacheInitialize(tls *libc.TLS) int32 { /* sqlite3.c:49576:20: */
Xsqlite3PCacheSetDefault(tls)
}
- return (*(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer((uintptr(unsafe.Pointer(&Xsqlite3Config)) + 168 /* &.pcache2 */ + 16 /* &.xInit */))))(tls, Xsqlite3Config.Fpcache2.FpArg)
+ return (*struct {
+ f func(*libc.TLS, uintptr) int32
+ })(unsafe.Pointer(&struct{ uintptr }{Xsqlite3Config.Fpcache2.FxInit})).f(tls, Xsqlite3Config.Fpcache2.FpArg)
}
-func Xsqlite3PcacheShutdown(tls *libc.TLS) { /* sqlite3.c:49586:21: */
+func Xsqlite3PcacheShutdown(tls *libc.TLS) { /* sqlite3.c:50082:21: */
if Xsqlite3Config.Fpcache2.FxShutdown != 0 {
// IMPLEMENTATION-OF: R-26000-56589 The xShutdown() method may be NULL.
- (*(*func(*libc.TLS, uintptr))(unsafe.Pointer((uintptr(unsafe.Pointer(&Xsqlite3Config)) + 168 /* &.pcache2 */ + 24 /* &.xShutdown */))))(tls, Xsqlite3Config.Fpcache2.FpArg)
+ (*struct{ f func(*libc.TLS, uintptr) })(unsafe.Pointer(&struct{ uintptr }{Xsqlite3Config.Fpcache2.FxShutdown})).f(tls, Xsqlite3Config.Fpcache2.FpArg)
}
}
// Return the size in bytes of a PCache object.
-func Xsqlite3PcacheSize(tls *libc.TLS) int32 { /* sqlite3.c:49596:20: */
+func Xsqlite3PcacheSize(tls *libc.TLS) int32 { /* sqlite3.c:50092:20: */
return int32(unsafe.Sizeof(PCache{}))
}
@@ -27000,7 +28836,7 @@ func Xsqlite3PcacheSize(tls *libc.TLS) int32 { /* sqlite3.c:49596:20: */
// but remaining content will be uninitialized. Though it is opaque
// to this module, the extra space really ends up being the MemPage
// structure in the pager.
-func Xsqlite3PcacheOpen(tls *libc.TLS, szPage int32, szExtra int32, bPurgeable int32, xStress uintptr, pStress uintptr, p uintptr) int32 { /* sqlite3.c:49610:20: */
+func Xsqlite3PcacheOpen(tls *libc.TLS, szPage int32, szExtra int32, bPurgeable int32, xStress uintptr, pStress uintptr, p uintptr) int32 { /* sqlite3.c:50106:20: */
libc.Xmemset(tls, p, 0, uint64(unsafe.Sizeof(PCache{})))
(*PCache)(unsafe.Pointer(p)).FszPage = 1
(*PCache)(unsafe.Pointer(p)).FszExtra = szExtra
@@ -27017,19 +28853,23 @@ func Xsqlite3PcacheOpen(tls *libc.TLS, szPage int32, szExtra int32, bPurgeable i
// Change the page size for PCache object. The caller must ensure that there
// are no outstanding page references when this function is called.
-func Xsqlite3PcacheSetPageSize(tls *libc.TLS, pCache uintptr, szPage int32) int32 { /* sqlite3.c:49636:20: */
+func Xsqlite3PcacheSetPageSize(tls *libc.TLS, pCache uintptr, szPage int32) int32 { /* sqlite3.c:50132:20: */
if (*PCache)(unsafe.Pointer(pCache)).FszPage != 0 {
var pNew uintptr
- pNew = (*(*func(*libc.TLS, int32, int32, int32) uintptr)(unsafe.Pointer((uintptr(unsafe.Pointer(&Xsqlite3Config)) + 168 /* &.pcache2 */ + 32 /* &.xCreate */))))(tls,
+ pNew = (*struct {
+ f func(*libc.TLS, int32, int32, int32) uintptr
+ })(unsafe.Pointer(&struct{ uintptr }{Xsqlite3Config.Fpcache2.FxCreate})).f(tls,
szPage, (int32(uint64((*PCache)(unsafe.Pointer(pCache)).FszExtra) + (((uint64(unsafe.Sizeof(PgHdr{}))) + uint64(7)) & libc.Uint64FromInt32(libc.CplInt32(7))))),
int32((*PCache)(unsafe.Pointer(pCache)).FbPurgeable))
if pNew == uintptr(0) {
return SQLITE_NOMEM
}
- (*(*func(*libc.TLS, uintptr, int32))(unsafe.Pointer((uintptr(unsafe.Pointer(&Xsqlite3Config)) + 168 /* &.pcache2 */ + 40 /* &.xCachesize */))))(tls, pNew, numberOfCachePages(tls, pCache))
+ (*struct {
+ f func(*libc.TLS, uintptr, int32)
+ })(unsafe.Pointer(&struct{ uintptr }{Xsqlite3Config.Fpcache2.FxCachesize})).f(tls, pNew, numberOfCachePages(tls, pCache))
if (*PCache)(unsafe.Pointer(pCache)).FpCache != 0 {
- (*(*func(*libc.TLS, uintptr))(unsafe.Pointer((uintptr(unsafe.Pointer(&Xsqlite3Config)) + 168 /* &.pcache2 */ + 88 /* &.xDestroy */))))(tls, (*PCache)(unsafe.Pointer(pCache)).FpCache)
+ (*struct{ f func(*libc.TLS, uintptr) })(unsafe.Pointer(&struct{ uintptr }{Xsqlite3Config.Fpcache2.FxDestroy})).f(tls, (*PCache)(unsafe.Pointer(pCache)).FpCache)
}
(*PCache)(unsafe.Pointer(pCache)).FpCache = pNew
(*PCache)(unsafe.Pointer(pCache)).FszPage = szPage
@@ -27060,7 +28900,7 @@ func Xsqlite3PcacheSetPageSize(tls *libc.TLS, pCache uintptr, szPage int32) int3
// they can both (usually) operate without having to push values to
// the stack on entry and pop them back off on exit, which saves a
// lot of pushing and popping.
-func Xsqlite3PcacheFetch(tls *libc.TLS, pCache uintptr, pgno Pgno, createFlag int32) uintptr { /* sqlite3.c:49680:36: */
+func Xsqlite3PcacheFetch(tls *libc.TLS, pCache uintptr, pgno Pgno, createFlag int32) uintptr { /* sqlite3.c:50176:36: */
var eCreate int32
var pRes uintptr
@@ -27072,7 +28912,9 @@ func Xsqlite3PcacheFetch(tls *libc.TLS, pCache uintptr, pgno Pgno, createFlag in
// (createFlag==1 AND !(bPurgeable AND pDirty)
eCreate = (createFlag & int32((*PCache)(unsafe.Pointer(pCache)).FeCreate))
- pRes = (*(*func(*libc.TLS, uintptr, uint32, int32) uintptr)(unsafe.Pointer((uintptr(unsafe.Pointer(&Xsqlite3Config)) + 168 /* &.pcache2 */ + 56 /* &.xFetch */))))(tls, (*PCache)(unsafe.Pointer(pCache)).FpCache, pgno, eCreate)
+ pRes = (*struct {
+ f func(*libc.TLS, uintptr, uint32, int32) uintptr
+ })(unsafe.Pointer(&struct{ uintptr }{Xsqlite3Config.Fpcache2.FxFetch})).f(tls, (*PCache)(unsafe.Pointer(pCache)).FpCache, pgno, eCreate)
return pRes
}
@@ -27086,7 +28928,7 @@ func Xsqlite3PcacheFetch(tls *libc.TLS, pCache uintptr, pgno Pgno, createFlag in
// an OOM error.
//
// This routine should be invoked only after sqlite3PcacheFetch() fails.
-func Xsqlite3PcacheFetchStress(tls *libc.TLS, pCache uintptr, pgno Pgno, ppPage uintptr) int32 { /* sqlite3.c:49721:20: */
+func Xsqlite3PcacheFetchStress(tls *libc.TLS, pCache uintptr, pgno Pgno, ppPage uintptr) int32 { /* sqlite3.c:50217:20: */
var pPg uintptr
if int32((*PCache)(unsafe.Pointer(pCache)).FeCreate) == 2 {
return 0
@@ -27112,14 +28954,18 @@ func Xsqlite3PcacheFetchStress(tls *libc.TLS, pCache uintptr, pgno Pgno, ppPage
if pPg != 0 {
var rc int32
- rc = (*(*func(*libc.TLS, uintptr, uintptr) int32)(unsafe.Pointer((pCache + 48 /* &.xStress */))))(tls, (*PCache)(unsafe.Pointer(pCache)).FpStress, pPg)
+ rc = (*struct {
+ f func(*libc.TLS, uintptr, uintptr) int32
+ })(unsafe.Pointer(&struct{ uintptr }{(*PCache)(unsafe.Pointer(pCache)).FxStress})).f(tls, (*PCache)(unsafe.Pointer(pCache)).FpStress, pPg)
if (rc != SQLITE_OK) && (rc != SQLITE_BUSY) {
return rc
}
}
}
- *(*uintptr)(unsafe.Pointer(ppPage)) = (*(*func(*libc.TLS, uintptr, uint32, int32) uintptr)(unsafe.Pointer((uintptr(unsafe.Pointer(&Xsqlite3Config)) + 168 /* &.pcache2 */ + 56 /* &.xFetch */))))(tls, (*PCache)(unsafe.Pointer(pCache)).FpCache, pgno, 2)
+ *(*uintptr)(unsafe.Pointer(ppPage)) = (*struct {
+ f func(*libc.TLS, uintptr, uint32, int32) uintptr
+ })(unsafe.Pointer(&struct{ uintptr }{Xsqlite3Config.Fpcache2.FxFetch})).f(tls, (*PCache)(unsafe.Pointer(pCache)).FpCache, pgno, 2)
if *(*uintptr)(unsafe.Pointer(ppPage)) == uintptr(0) {
return SQLITE_NOMEM
}
@@ -27133,7 +28979,7 @@ func Xsqlite3PcacheFetchStress(tls *libc.TLS, pCache uintptr, pgno Pgno, ppPage
// This routine is broken out into a separate function since it
// requires extra stack manipulation that can be avoided in the common
// case.
-func pcacheFetchFinishWithInit(tls *libc.TLS, pCache uintptr, pgno Pgno, pPage uintptr) uintptr { /* sqlite3.c:49777:30: */
+func pcacheFetchFinishWithInit(tls *libc.TLS, pCache uintptr, pgno Pgno, pPage uintptr) uintptr { /* sqlite3.c:50273:30: */
var pPgHdr uintptr
pPgHdr = (*Sqlite3_pcache_page)(unsafe.Pointer(pPage)).FpExtra
@@ -27153,7 +28999,7 @@ func pcacheFetchFinishWithInit(tls *libc.TLS, pCache uintptr, pgno Pgno, pPage u
// sqlite3PcacheFetch() into an initialized PgHdr object. This routine
// must be called after sqlite3PcacheFetch() in order to get a usable
// result.
-func Xsqlite3PcacheFetchFinish(tls *libc.TLS, pCache uintptr, pgno Pgno, pPage uintptr) uintptr { /* sqlite3.c:49803:22: */
+func Xsqlite3PcacheFetchFinish(tls *libc.TLS, pCache uintptr, pgno Pgno, pPage uintptr) uintptr { /* sqlite3.c:50299:22: */
var pPgHdr uintptr
pPgHdr = (*Sqlite3_pcache_page)(unsafe.Pointer(pPage)).FpExtra
@@ -27169,7 +29015,7 @@ func Xsqlite3PcacheFetchFinish(tls *libc.TLS, pCache uintptr, pgno Pgno, pPage u
// Decrement the reference count on a page. If the page is clean and the
// reference count drops to 0, then it is made eligible for recycling.
-func Xsqlite3PcacheRelease(tls *libc.TLS, p uintptr) { /* sqlite3.c:49826:37: */
+func Xsqlite3PcacheRelease(tls *libc.TLS, p uintptr) { /* sqlite3.c:50322:37: */
(*PCache)(unsafe.Pointer((*PgHdr)(unsafe.Pointer(p)).FpCache)).FnRefSum--
if (int32(libc.PreDecInt16(&(*PgHdr)(unsafe.Pointer(p)).FnRef, 1))) == 0 {
@@ -27182,7 +29028,7 @@ func Xsqlite3PcacheRelease(tls *libc.TLS, p uintptr) { /* sqlite3.c:49826:37: */
}
// Increase the reference count of a supplied page by 1.
-func Xsqlite3PcacheRef(tls *libc.TLS, p uintptr) { /* sqlite3.c:49841:21: */
+func Xsqlite3PcacheRef(tls *libc.TLS, p uintptr) { /* sqlite3.c:50337:21: */
(*PgHdr)(unsafe.Pointer(p)).FnRef++
(*PCache)(unsafe.Pointer((*PgHdr)(unsafe.Pointer(p)).FpCache)).FnRefSum++
@@ -27191,18 +29037,20 @@ func Xsqlite3PcacheRef(tls *libc.TLS, p uintptr) { /* sqlite3.c:49841:21: */
// Drop a page from the cache. There must be exactly one reference to the
// page. This function deletes that reference, so after it returns the
// page pointed to by p is invalid.
-func Xsqlite3PcacheDrop(tls *libc.TLS, p uintptr) { /* sqlite3.c:49853:21: */
+func Xsqlite3PcacheDrop(tls *libc.TLS, p uintptr) { /* sqlite3.c:50349:21: */
if (int32((*PgHdr)(unsafe.Pointer(p)).Fflags) & PGHDR_DIRTY) != 0 {
pcacheManageDirtyList(tls, p, uint8(PCACHE_DIRTYLIST_REMOVE))
}
(*PCache)(unsafe.Pointer((*PgHdr)(unsafe.Pointer(p)).FpCache)).FnRefSum--
- (*(*func(*libc.TLS, uintptr, uintptr, int32))(unsafe.Pointer((uintptr(unsafe.Pointer(&Xsqlite3Config)) + 168 /* &.pcache2 */ + 64 /* &.xUnpin */))))(tls, (*PCache)(unsafe.Pointer((*PgHdr)(unsafe.Pointer(p)).FpCache)).FpCache, (*PgHdr)(unsafe.Pointer(p)).FpPage, 1)
+ (*struct {
+ f func(*libc.TLS, uintptr, uintptr, int32)
+ })(unsafe.Pointer(&struct{ uintptr }{Xsqlite3Config.Fpcache2.FxUnpin})).f(tls, (*PCache)(unsafe.Pointer((*PgHdr)(unsafe.Pointer(p)).FpCache)).FpCache, (*PgHdr)(unsafe.Pointer(p)).FpPage, 1)
}
// Make sure the page is marked as dirty. If it isn't dirty already,
// make it so.
-func Xsqlite3PcacheMakeDirty(tls *libc.TLS, p uintptr) { /* sqlite3.c:49867:21: */
+func Xsqlite3PcacheMakeDirty(tls *libc.TLS, p uintptr) { /* sqlite3.c:50363:21: */
if (int32((*PgHdr)(unsafe.Pointer(p)).Fflags) & (PGHDR_CLEAN | PGHDR_DONT_WRITE)) != 0 { //OPTIMIZATION-IF-FALSE
*(*U16)(unsafe.Pointer(p + 52 /* &.flags */)) &= libc.Uint16FromInt32((libc.CplInt32(PGHDR_DONT_WRITE)))
@@ -27217,7 +29065,7 @@ func Xsqlite3PcacheMakeDirty(tls *libc.TLS, p uintptr) { /* sqlite3.c:49867:21:
// Make sure the page is marked as clean. If it isn't clean already,
// make it so.
-func Xsqlite3PcacheMakeClean(tls *libc.TLS, p uintptr) { /* sqlite3.c:49886:21: */
+func Xsqlite3PcacheMakeClean(tls *libc.TLS, p uintptr) { /* sqlite3.c:50382:21: */
pcacheManageDirtyList(tls, p, uint8(PCACHE_DIRTYLIST_REMOVE))
*(*U16)(unsafe.Pointer(p + 52 /* &.flags */)) &= libc.Uint16FromInt32((libc.CplInt32(((PGHDR_DIRTY | PGHDR_NEED_SYNC) | PGHDR_WRITEABLE))))
@@ -27229,7 +29077,7 @@ func Xsqlite3PcacheMakeClean(tls *libc.TLS, p uintptr) { /* sqlite3.c:49886:21:
}
// Make every page in the cache clean.
-func Xsqlite3PcacheCleanAll(tls *libc.TLS, pCache uintptr) { /* sqlite3.c:49903:21: */
+func Xsqlite3PcacheCleanAll(tls *libc.TLS, pCache uintptr) { /* sqlite3.c:50399:21: */
var p uintptr
for (libc.AssignUintptr(&p, (*PCache)(unsafe.Pointer(pCache)).FpDirty)) != uintptr(0) {
@@ -27238,7 +29086,7 @@ func Xsqlite3PcacheCleanAll(tls *libc.TLS, pCache uintptr) { /* sqlite3.c:49903:
}
// Clear the PGHDR_NEED_SYNC and PGHDR_WRITEABLE flag from all dirty pages.
-func Xsqlite3PcacheClearWritable(tls *libc.TLS, pCache uintptr) { /* sqlite3.c:49914:21: */
+func Xsqlite3PcacheClearWritable(tls *libc.TLS, pCache uintptr) { /* sqlite3.c:50410:21: */
var p uintptr
for p = (*PCache)(unsafe.Pointer(pCache)).FpDirty; p != 0; p = (*PgHdr)(unsafe.Pointer(p)).FpDirtyNext {
@@ -27248,7 +29096,7 @@ func Xsqlite3PcacheClearWritable(tls *libc.TLS, pCache uintptr) { /* sqlite3.c:4
}
// Clear the PGHDR_NEED_SYNC flag from all dirty pages.
-func Xsqlite3PcacheClearSyncFlags(tls *libc.TLS, pCache uintptr) { /* sqlite3.c:49926:21: */
+func Xsqlite3PcacheClearSyncFlags(tls *libc.TLS, pCache uintptr) { /* sqlite3.c:50422:21: */
var p uintptr
for p = (*PCache)(unsafe.Pointer(pCache)).FpDirty; p != 0; p = (*PgHdr)(unsafe.Pointer(p)).FpDirtyNext {
*(*U16)(unsafe.Pointer(p + 52 /* &.flags */)) &= libc.Uint16FromInt32((libc.CplInt32(PGHDR_NEED_SYNC)))
@@ -27257,10 +29105,12 @@ func Xsqlite3PcacheClearSyncFlags(tls *libc.TLS, pCache uintptr) { /* sqlite3.c:
}
// Change the page number of page p to newPgno.
-func Xsqlite3PcacheMove(tls *libc.TLS, p uintptr, newPgno Pgno) { /* sqlite3.c:49937:21: */
+func Xsqlite3PcacheMove(tls *libc.TLS, p uintptr, newPgno Pgno) { /* sqlite3.c:50433:21: */
var pCache uintptr = (*PgHdr)(unsafe.Pointer(p)).FpCache
- (*(*func(*libc.TLS, uintptr, uintptr, uint32, uint32))(unsafe.Pointer((uintptr(unsafe.Pointer(&Xsqlite3Config)) + 168 /* &.pcache2 */ + 72 /* &.xRekey */))))(tls, (*PCache)(unsafe.Pointer(pCache)).FpCache, (*PgHdr)(unsafe.Pointer(p)).FpPage, (*PgHdr)(unsafe.Pointer(p)).Fpgno, newPgno)
+ (*struct {
+ f func(*libc.TLS, uintptr, uintptr, uint32, uint32)
+ })(unsafe.Pointer(&struct{ uintptr }{Xsqlite3Config.Fpcache2.FxRekey})).f(tls, (*PCache)(unsafe.Pointer(pCache)).FpCache, (*PgHdr)(unsafe.Pointer(p)).FpPage, (*PgHdr)(unsafe.Pointer(p)).Fpgno, newPgno)
(*PgHdr)(unsafe.Pointer(p)).Fpgno = newPgno
if ((int32((*PgHdr)(unsafe.Pointer(p)).Fflags) & PGHDR_DIRTY) != 0) && ((int32((*PgHdr)(unsafe.Pointer(p)).Fflags) & PGHDR_NEED_SYNC) != 0) {
pcacheManageDirtyList(tls, p, uint8(PCACHE_DIRTYLIST_FRONT))
@@ -27274,7 +29124,7 @@ func Xsqlite3PcacheMove(tls *libc.TLS, p uintptr, newPgno Pgno) { /* sqlite3.c:4
// If there is a reference to page 1 and the pgno parameter passed to this
// function is 0, then the data area associated with page 1 is zeroed, but
// the page object is not dropped.
-func Xsqlite3PcacheTruncate(tls *libc.TLS, pCache uintptr, pgno Pgno) { /* sqlite3.c:49959:21: */
+func Xsqlite3PcacheTruncate(tls *libc.TLS, pCache uintptr, pgno Pgno) { /* sqlite3.c:50455:21: */
if (*PCache)(unsafe.Pointer(pCache)).FpCache != 0 {
var p uintptr
var pNext uintptr
@@ -27292,31 +29142,35 @@ func Xsqlite3PcacheTruncate(tls *libc.TLS, pCache uintptr, pgno Pgno) { /* sqlit
}
if (pgno == Pgno(0)) && ((*PCache)(unsafe.Pointer(pCache)).FnRefSum != 0) {
var pPage1 uintptr
- pPage1 = (*(*func(*libc.TLS, uintptr, uint32, int32) uintptr)(unsafe.Pointer((uintptr(unsafe.Pointer(&Xsqlite3Config)) + 168 /* &.pcache2 */ + 56 /* &.xFetch */))))(tls, (*PCache)(unsafe.Pointer(pCache)).FpCache, uint32(1), 0)
+ pPage1 = (*struct {
+ f func(*libc.TLS, uintptr, uint32, int32) uintptr
+ })(unsafe.Pointer(&struct{ uintptr }{Xsqlite3Config.Fpcache2.FxFetch})).f(tls, (*PCache)(unsafe.Pointer(pCache)).FpCache, uint32(1), 0)
if pPage1 != 0 { // Page 1 is always available in cache, because
// pCache->nRefSum>0
libc.Xmemset(tls, (*Sqlite3_pcache_page)(unsafe.Pointer(pPage1)).FpBuf, 0, uint64((*PCache)(unsafe.Pointer(pCache)).FszPage))
pgno = Pgno(1)
}
}
- (*(*func(*libc.TLS, uintptr, uint32))(unsafe.Pointer((uintptr(unsafe.Pointer(&Xsqlite3Config)) + 168 /* &.pcache2 */ + 80 /* &.xTruncate */))))(tls, (*PCache)(unsafe.Pointer(pCache)).FpCache, (pgno + Pgno(1)))
+ (*struct {
+ f func(*libc.TLS, uintptr, uint32)
+ })(unsafe.Pointer(&struct{ uintptr }{Xsqlite3Config.Fpcache2.FxTruncate})).f(tls, (*PCache)(unsafe.Pointer(pCache)).FpCache, (pgno + Pgno(1)))
}
}
// Close a cache.
-func Xsqlite3PcacheClose(tls *libc.TLS, pCache uintptr) { /* sqlite3.c:49992:21: */
+func Xsqlite3PcacheClose(tls *libc.TLS, pCache uintptr) { /* sqlite3.c:50488:21: */
- (*(*func(*libc.TLS, uintptr))(unsafe.Pointer((uintptr(unsafe.Pointer(&Xsqlite3Config)) + 168 /* &.pcache2 */ + 88 /* &.xDestroy */))))(tls, (*PCache)(unsafe.Pointer(pCache)).FpCache)
+ (*struct{ f func(*libc.TLS, uintptr) })(unsafe.Pointer(&struct{ uintptr }{Xsqlite3Config.Fpcache2.FxDestroy})).f(tls, (*PCache)(unsafe.Pointer(pCache)).FpCache)
}
// Discard the contents of the cache.
-func Xsqlite3PcacheClear(tls *libc.TLS, pCache uintptr) { /* sqlite3.c:50001:21: */
+func Xsqlite3PcacheClear(tls *libc.TLS, pCache uintptr) { /* sqlite3.c:50497:21: */
Xsqlite3PcacheTruncate(tls, pCache, uint32(0))
}
// Merge two lists of pages connected by pDirty and in pgno order.
// Do not bother fixing the pDirtyPrev pointers.
-func pcacheMergeDirtyList(tls *libc.TLS, pA uintptr, pB uintptr) uintptr { /* sqlite3.c:50009:14: */
+func pcacheMergeDirtyList(tls *libc.TLS, pA uintptr, pB uintptr) uintptr { /* sqlite3.c:50505:14: */
bp := tls.Alloc(72)
defer tls.Free(72)
@@ -27355,7 +29209,7 @@ func pcacheMergeDirtyList(tls *libc.TLS, pA uintptr, pB uintptr) uintptr { /* sq
// there cannot be more than 31 buckets required by the merge sorter.
// One extra bucket is added to catch overflow in case something
// ever changes to make the previous sentence incorrect.
-func pcacheSortDirtyList(tls *libc.TLS, pIn uintptr) uintptr { /* sqlite3.c:50046:14: */
+func pcacheSortDirtyList(tls *libc.TLS, pIn uintptr) uintptr { /* sqlite3.c:50542:14: */
bp := tls.Alloc(256)
defer tls.Free(256)
@@ -27398,7 +29252,7 @@ func pcacheSortDirtyList(tls *libc.TLS, pIn uintptr) uintptr { /* sqlite3.c:5004
}
// Return a list of all dirty pages in the cache, sorted by page number.
-func Xsqlite3PcacheDirtyList(tls *libc.TLS, pCache uintptr) uintptr { /* sqlite3.c:50081:22: */
+func Xsqlite3PcacheDirtyList(tls *libc.TLS, pCache uintptr) uintptr { /* sqlite3.c:50577:22: */
var p uintptr
for p = (*PCache)(unsafe.Pointer(pCache)).FpDirty; p != 0; p = (*PgHdr)(unsafe.Pointer(p)).FpDirtyNext {
(*PgHdr)(unsafe.Pointer(p)).FpDirty = (*PgHdr)(unsafe.Pointer(p)).FpDirtyNext
@@ -27410,33 +29264,37 @@ func Xsqlite3PcacheDirtyList(tls *libc.TLS, pCache uintptr) uintptr { /* sqlite3
//
// This is not the total number of pages referenced, but the sum of the
// reference count for all pages.
-func Xsqlite3PcacheRefCount(tls *libc.TLS, pCache uintptr) int32 { /* sqlite3.c:50095:20: */
+func Xsqlite3PcacheRefCount(tls *libc.TLS, pCache uintptr) int32 { /* sqlite3.c:50591:20: */
return (*PCache)(unsafe.Pointer(pCache)).FnRefSum
}
// Return the number of references to the page supplied as an argument.
-func Xsqlite3PcachePageRefcount(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:50102:20: */
+func Xsqlite3PcachePageRefcount(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:50598:20: */
return int32((*PgHdr)(unsafe.Pointer(p)).FnRef)
}
// Return the total number of pages in the cache.
-func Xsqlite3PcachePagecount(tls *libc.TLS, pCache uintptr) int32 { /* sqlite3.c:50109:20: */
+func Xsqlite3PcachePagecount(tls *libc.TLS, pCache uintptr) int32 { /* sqlite3.c:50605:20: */
- return (*(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer((uintptr(unsafe.Pointer(&Xsqlite3Config)) + 168 /* &.pcache2 */ + 48 /* &.xPagecount */))))(tls, (*PCache)(unsafe.Pointer(pCache)).FpCache)
+ return (*struct {
+ f func(*libc.TLS, uintptr) int32
+ })(unsafe.Pointer(&struct{ uintptr }{Xsqlite3Config.Fpcache2.FxPagecount})).f(tls, (*PCache)(unsafe.Pointer(pCache)).FpCache)
}
// Set the suggested cache-size value.
-func Xsqlite3PcacheSetCachesize(tls *libc.TLS, pCache uintptr, mxPage int32) { /* sqlite3.c:50126:21: */
+func Xsqlite3PcacheSetCachesize(tls *libc.TLS, pCache uintptr, mxPage int32) { /* sqlite3.c:50622:21: */
(*PCache)(unsafe.Pointer(pCache)).FszCache = mxPage
- (*(*func(*libc.TLS, uintptr, int32))(unsafe.Pointer((uintptr(unsafe.Pointer(&Xsqlite3Config)) + 168 /* &.pcache2 */ + 40 /* &.xCachesize */))))(tls, (*PCache)(unsafe.Pointer(pCache)).FpCache,
+ (*struct {
+ f func(*libc.TLS, uintptr, int32)
+ })(unsafe.Pointer(&struct{ uintptr }{Xsqlite3Config.Fpcache2.FxCachesize})).f(tls, (*PCache)(unsafe.Pointer(pCache)).FpCache,
numberOfCachePages(tls, pCache))
}
// Set the suggested cache-spill value. Make no changes if if the
// argument is zero. Return the effective cache-spill size, which will
// be the larger of the szSpill and szCache.
-func Xsqlite3PcacheSetSpillsize(tls *libc.TLS, p uintptr, mxPage int32) int32 { /* sqlite3.c:50138:20: */
+func Xsqlite3PcacheSetSpillsize(tls *libc.TLS, p uintptr, mxPage int32) int32 { /* sqlite3.c:50634:20: */
var res int32
if mxPage != 0 {
@@ -27453,20 +29311,20 @@ func Xsqlite3PcacheSetSpillsize(tls *libc.TLS, p uintptr, mxPage int32) int32 {
}
// Free up as much memory as possible from the page cache.
-func Xsqlite3PcacheShrink(tls *libc.TLS, pCache uintptr) { /* sqlite3.c:50155:21: */
+func Xsqlite3PcacheShrink(tls *libc.TLS, pCache uintptr) { /* sqlite3.c:50651:21: */
- (*(*func(*libc.TLS, uintptr))(unsafe.Pointer((uintptr(unsafe.Pointer(&Xsqlite3Config)) + 168 /* &.pcache2 */ + 96 /* &.xShrink */))))(tls, (*PCache)(unsafe.Pointer(pCache)).FpCache)
+ (*struct{ f func(*libc.TLS, uintptr) })(unsafe.Pointer(&struct{ uintptr }{Xsqlite3Config.Fpcache2.FxShrink})).f(tls, (*PCache)(unsafe.Pointer(pCache)).FpCache)
}
// Return the size of the header added by this middleware layer
// in the page-cache hierarchy.
-func Xsqlite3HeaderSizePcache(tls *libc.TLS) int32 { /* sqlite3.c:50164:20: */
+func Xsqlite3HeaderSizePcache(tls *libc.TLS) int32 { /* sqlite3.c:50660:20: */
return (int32(((uint64(unsafe.Sizeof(PgHdr{}))) + uint64(7)) & libc.Uint64FromInt32(libc.CplInt32(7))))
}
// Return the number of dirty pages currently in the cache, as a percentage
// of the configured cache size.
-func Xsqlite3PCachePercentDirty(tls *libc.TLS, pCache uintptr) int32 { /* sqlite3.c:50170:20: */
+func Xsqlite3PCachePercentDirty(tls *libc.TLS, pCache uintptr) int32 { /* sqlite3.c:50666:20: */
var pDirty uintptr
var nDirty int32 = 0
var nCache int32 = numberOfCachePages(tls, pCache)
@@ -27581,7 +29439,7 @@ type PCache11 = struct {
FapHash uintptr
FpFree uintptr
FpBulk uintptr
-} /* sqlite3.c:50287:9 */
+} /* sqlite3.c:50783:9 */
//************* End of pcache.c *********************************************
//************* Begin file pcache1.c ****************************************
@@ -27667,7 +29525,7 @@ type PCache11 = struct {
// common workloads.
// #include "sqliteInt.h"
-type PCache1 = PCache11 /* sqlite3.c:50287:24 */
+type PCache1 = PCache11 /* sqlite3.c:50783:24 */
type PgHdr11 = struct {
Fpage Sqlite3_pcache_page
FiKey uint32
@@ -27677,12 +29535,12 @@ type PgHdr11 = struct {
FpCache uintptr
FpLruNext uintptr
FpLruPrev uintptr
-} /* sqlite3.c:50287:9 */
+} /* sqlite3.c:50783:9 */
-type PgHdr1 = PgHdr11 /* sqlite3.c:50288:23 */
-type PgFreeslot1 = struct{ FpNext uintptr } /* sqlite3.c:50289:9 */
+type PgHdr1 = PgHdr11 /* sqlite3.c:50784:23 */
+type PgFreeslot1 = struct{ FpNext uintptr } /* sqlite3.c:50785:9 */
-type PgFreeslot = PgFreeslot1 /* sqlite3.c:50289:27 */
+type PgFreeslot = PgFreeslot1 /* sqlite3.c:50785:27 */
type PGroup1 = struct {
Fmutex uintptr
FnMaxPage uint32
@@ -27690,9 +29548,9 @@ type PGroup1 = struct {
FmxPinned uint32
FnPurgeable uint32
Flru PgHdr1
-} /* sqlite3.c:50287:9 */
+} /* sqlite3.c:50783:9 */
-type PGroup = PGroup1 /* sqlite3.c:50290:23 */
+type PGroup = PGroup1 /* sqlite3.c:50786:23 */
// Global data used by this cache.
type PCacheGlobal = struct {
@@ -27709,10 +29567,10 @@ type PCacheGlobal = struct {
FpFree uintptr
FnFreeSlot int32
FbUnderPressure int32
-} /* sqlite3.c:50407:19 */
+} /* sqlite3.c:50903:19 */
// Global data used by this cache.
-var pcache1_g PCacheGlobal /* sqlite3.c:50431:3: */
+var pcache1_g PCacheGlobal /* sqlite3.c:50927:3: */
// All code in this file should access the global structure above via the
// alias "pcache1". This ensures that the WSD emulation is used when
@@ -27730,7 +29588,7 @@ var pcache1_g PCacheGlobal /* sqlite3.c:50431:3: */
//
// This routine is called from sqlite3_initialize() and so it is guaranteed
// to be serialized already. There is no need for further mutexing.
-func Xsqlite3PCacheBufferSetup(tls *libc.TLS, pBuf uintptr, sz int32, n int32) { /* sqlite3.c:50466:21: */
+func Xsqlite3PCacheBufferSetup(tls *libc.TLS, pBuf uintptr, sz int32, n int32) { /* sqlite3.c:50962:21: */
if pcache1_g.FisInit != 0 {
var p uintptr
if pBuf == uintptr(0) {
@@ -27763,7 +29621,7 @@ func Xsqlite3PCacheBufferSetup(tls *libc.TLS, pBuf uintptr, sz int32, n int32) {
// Try to initialize the pCache->pFree and pCache->pBulk fields. Return
// true if pCache->pFree ends up containing one or more free pages.
-func pcache1InitBulk(tls *libc.TLS, pCache uintptr) int32 { /* sqlite3.c:50492:12: */
+func pcache1InitBulk(tls *libc.TLS, pCache uintptr) int32 { /* sqlite3.c:50988:12: */
var szBulk I64
var zBulk uintptr
if pcache1_g.FnInitPage == 0 {
@@ -27808,7 +29666,7 @@ func pcache1InitBulk(tls *libc.TLS, pCache uintptr) int32 { /* sqlite3.c:50492:1
//
// Multiple threads can run this routine at the same time. Global variables
// in pcache1 need to be protected via mutex.
-func pcache1Alloc(tls *libc.TLS, nByte int32) uintptr { /* sqlite3.c:50535:13: */
+func pcache1Alloc(tls *libc.TLS, nByte int32) uintptr { /* sqlite3.c:51031:13: */
var p uintptr = uintptr(0)
if nByte <= pcache1_g.FszSlot {
@@ -27841,7 +29699,7 @@ func pcache1Alloc(tls *libc.TLS, nByte int32) uintptr { /* sqlite3.c:50535:13: *
}
// Free an allocated buffer obtained from pcache1Alloc().
-func pcache1Free(tls *libc.TLS, p uintptr) { /* sqlite3.c:50573:13: */
+func pcache1Free(tls *libc.TLS, p uintptr) { /* sqlite3.c:51069:13: */
if p == uintptr(0) {
return
}
@@ -27871,7 +29729,7 @@ func pcache1Free(tls *libc.TLS, p uintptr) { /* sqlite3.c:50573:13: */
}
// Return the size of a pcache allocation
-func pcache1MemSize(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:50606:12: */
+func pcache1MemSize(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:51102:12: */
if (p >= pcache1_g.FpStart) && (p < pcache1_g.FpEnd) {
return pcache1_g.FszSlot
} else {
@@ -27885,7 +29743,7 @@ func pcache1MemSize(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:50606:12: */
}
// Allocate a new page object initially associated with cache pCache.
-func pcache1AllocPage(tls *libc.TLS, pCache uintptr, benignMalloc int32) uintptr { /* sqlite3.c:50623:15: */
+func pcache1AllocPage(tls *libc.TLS, pCache uintptr, benignMalloc int32) uintptr { /* sqlite3.c:51119:15: */
var p uintptr = uintptr(0)
var pPg uintptr
@@ -27923,7 +29781,7 @@ func pcache1AllocPage(tls *libc.TLS, pCache uintptr, benignMalloc int32) uintptr
}
// Free a page object allocated by pcache1AllocPage().
-func pcache1FreePage(tls *libc.TLS, p uintptr) { /* sqlite3.c:50675:13: */
+func pcache1FreePage(tls *libc.TLS, p uintptr) { /* sqlite3.c:51171:13: */
var pCache uintptr
pCache = (*PgHdr1)(unsafe.Pointer(p)).FpCache
@@ -27940,13 +29798,13 @@ func pcache1FreePage(tls *libc.TLS, p uintptr) { /* sqlite3.c:50675:13: */
// Malloc function used by SQLite to obtain space from the buffer configured
// using sqlite3_config(SQLITE_CONFIG_PAGECACHE) option. If no such buffer
// exists, this function falls back to sqlite3Malloc().
-func Xsqlite3PageMalloc(tls *libc.TLS, sz int32) uintptr { /* sqlite3.c:50697:21: */
+func Xsqlite3PageMalloc(tls *libc.TLS, sz int32) uintptr { /* sqlite3.c:51193:21: */
// These allocations are never very large
return pcache1Alloc(tls, sz)
}
// Free an allocated buffer obtained from sqlite3PageMalloc().
-func Xsqlite3PageFree(tls *libc.TLS, p uintptr) { /* sqlite3.c:50705:21: */
+func Xsqlite3PageFree(tls *libc.TLS, p uintptr) { /* sqlite3.c:51201:21: */
pcache1Free(tls, p)
}
@@ -27964,7 +29822,7 @@ func Xsqlite3PageFree(tls *libc.TLS, p uintptr) { /* sqlite3.c:50705:21: */
// under memory pressure, then again it is desirable to avoid
// allocating a new page cache entry in order to avoid stressing
// the heap even further.
-func pcache1UnderMemoryPressure(tls *libc.TLS, pCache uintptr) int32 { /* sqlite3.c:50726:12: */
+func pcache1UnderMemoryPressure(tls *libc.TLS, pCache uintptr) int32 { /* sqlite3.c:51222:12: */
if (pcache1_g.FnSlot != 0) && (((*PCache1)(unsafe.Pointer(pCache)).FszPage + (*PCache1)(unsafe.Pointer(pCache)).FszExtra) <= pcache1_g.FszSlot) {
return pcache1_g.FbUnderPressure
} else {
@@ -27980,7 +29838,7 @@ func pcache1UnderMemoryPressure(tls *libc.TLS, pCache uintptr) int32 { /* sqlite
// as the first argument.
//
// The PCache mutex must be held when this function is called.
-func pcache1ResizeHash(tls *libc.TLS, p uintptr) { /* sqlite3.c:50743:13: */
+func pcache1ResizeHash(tls *libc.TLS, p uintptr) { /* sqlite3.c:51239:13: */
var apNew uintptr
var nNew uint32
var i uint32
@@ -28021,7 +29879,7 @@ func pcache1ResizeHash(tls *libc.TLS, p uintptr) { /* sqlite3.c:50743:13: */
// LRU list, then this function is a no-op.
//
// The PGroup mutex must be held when this function is called.
-func pcache1PinPage(tls *libc.TLS, pPage uintptr) uintptr { /* sqlite3.c:50784:15: */
+func pcache1PinPage(tls *libc.TLS, pPage uintptr) uintptr { /* sqlite3.c:51280:15: */
(*PgHdr1)(unsafe.Pointer((*PgHdr1)(unsafe.Pointer(pPage)).FpLruPrev)).FpLruNext = (*PgHdr1)(unsafe.Pointer(pPage)).FpLruNext
(*PgHdr1)(unsafe.Pointer((*PgHdr1)(unsafe.Pointer(pPage)).FpLruNext)).FpLruPrev = (*PgHdr1)(unsafe.Pointer(pPage)).FpLruPrev
@@ -28038,7 +29896,7 @@ func pcache1PinPage(tls *libc.TLS, pPage uintptr) uintptr { /* sqlite3.c:50784:1
// Also free the page if freePage is true.
//
// The PGroup mutex must be held when this function is called.
-func pcache1RemoveFromHash(tls *libc.TLS, pPage uintptr, freeFlag int32) { /* sqlite3.c:50809:13: */
+func pcache1RemoveFromHash(tls *libc.TLS, pPage uintptr, freeFlag int32) { /* sqlite3.c:51305:13: */
var h uint32
var pCache uintptr = (*PgHdr1)(unsafe.Pointer(pPage)).FpCache
var pp uintptr
@@ -28056,7 +29914,7 @@ func pcache1RemoveFromHash(tls *libc.TLS, pPage uintptr, freeFlag int32) { /* sq
// If there are currently more than nMaxPage pages allocated, try
// to recycle pages to reduce the number allocated to nMaxPage.
-func pcache1EnforceMaxPage(tls *libc.TLS, pCache uintptr) { /* sqlite3.c:50827:13: */
+func pcache1EnforceMaxPage(tls *libc.TLS, pCache uintptr) { /* sqlite3.c:51323:13: */
var pGroup uintptr = (*PCache1)(unsafe.Pointer(pCache)).FpGroup
var p uintptr
@@ -28077,7 +29935,7 @@ func pcache1EnforceMaxPage(tls *libc.TLS, pCache uintptr) { /* sqlite3.c:50827:1
// criteria are unpinned before they are discarded.
//
// The PCache mutex must be held when this function is called.
-func pcache1TruncateUnsafe(tls *libc.TLS, pCache uintptr, iLimit uint32) { /* sqlite3.c:50852:13: */
+func pcache1TruncateUnsafe(tls *libc.TLS, pCache uintptr, iLimit uint32) { /* sqlite3.c:51348:13: */
var h uint32
var iStop uint32
@@ -28125,7 +29983,7 @@ func pcache1TruncateUnsafe(tls *libc.TLS, pCache uintptr, iLimit uint32) { /* sq
//******* sqlite3_pcache Methods *********************************************
// Implementation of the sqlite3_pcache.xInit method.
-func pcache1Init(tls *libc.TLS, NotUsed uintptr) int32 { /* sqlite3.c:50903:12: */
+func pcache1Init(tls *libc.TLS, NotUsed uintptr) int32 { /* sqlite3.c:51399:12: */
_ = NotUsed
libc.Xmemset(tls, uintptr(unsafe.Pointer(&pcache1_g)), 0, uint64(unsafe.Sizeof(pcache1_g)))
@@ -28163,7 +30021,7 @@ func pcache1Init(tls *libc.TLS, NotUsed uintptr) int32 { /* sqlite3.c:50903:12:
// Implementation of the sqlite3_pcache.xShutdown method.
// Note that the static mutex allocated in xInit does
// not need to be freed.
-func pcache1Shutdown(tls *libc.TLS, NotUsed uintptr) { /* sqlite3.c:50956:13: */
+func pcache1Shutdown(tls *libc.TLS, NotUsed uintptr) { /* sqlite3.c:51452:13: */
_ = NotUsed
libc.Xmemset(tls, uintptr(unsafe.Pointer(&pcache1_g)), 0, uint64(unsafe.Sizeof(pcache1_g)))
@@ -28172,7 +30030,7 @@ func pcache1Shutdown(tls *libc.TLS, NotUsed uintptr) { /* sqlite3.c:50956:13: */
// Implementation of the sqlite3_pcache.xCreate method.
//
// Allocate a new cache.
-func pcache1Create(tls *libc.TLS, szPage int32, szExtra int32, bPurgeable int32) uintptr { /* sqlite3.c:50970:23: */
+func pcache1Create(tls *libc.TLS, szPage int32, szExtra int32, bPurgeable int32) uintptr { /* sqlite3.c:51466:23: */
var pCache uintptr // The newly created page cache
var pGroup uintptr // The group the new page cache will belong to
var sz int32 // Bytes of memory required to allocate the new cache
@@ -28222,7 +30080,7 @@ func pcache1Create(tls *libc.TLS, szPage int32, szExtra int32, bPurgeable int32)
// Implementation of the sqlite3_pcache.xCachesize method.
//
// Configure the cache_size limit for a cache.
-func pcache1Cachesize(tls *libc.TLS, p uintptr, nMax int32) { /* sqlite3.c:51020:13: */
+func pcache1Cachesize(tls *libc.TLS, p uintptr, nMax int32) { /* sqlite3.c:51516:13: */
var pCache uintptr = p
if (*PCache1)(unsafe.Pointer(pCache)).FbPurgeable != 0 {
var pGroup uintptr = (*PCache1)(unsafe.Pointer(pCache)).FpGroup
@@ -28239,7 +30097,7 @@ func pcache1Cachesize(tls *libc.TLS, p uintptr, nMax int32) { /* sqlite3.c:51020
// Implementation of the sqlite3_pcache.xShrink method.
//
// Free up as much memory as possible.
-func pcache1Shrink(tls *libc.TLS, p uintptr) { /* sqlite3.c:51039:13: */
+func pcache1Shrink(tls *libc.TLS, p uintptr) { /* sqlite3.c:51535:13: */
var pCache uintptr = p
if (*PCache1)(unsafe.Pointer(pCache)).FbPurgeable != 0 {
var pGroup uintptr = (*PCache1)(unsafe.Pointer(pCache)).FpGroup
@@ -28254,7 +30112,7 @@ func pcache1Shrink(tls *libc.TLS, p uintptr) { /* sqlite3.c:51039:13: */
}
// Implementation of the sqlite3_pcache.xPagecount method.
-func pcache1Pagecount(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:51056:12: */
+func pcache1Pagecount(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:51552:12: */
var n int32
var pCache uintptr = p
Xsqlite3_mutex_enter(tls, (*PGroup)(unsafe.Pointer((*PCache1)(unsafe.Pointer(pCache)).FpGroup)).Fmutex)
@@ -28269,7 +30127,7 @@ func pcache1Pagecount(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:51056:12: *
// This steps are broken out into a separate procedure because they are
// usually not needed, and by avoiding the stack initialization required
// for these steps, the main pcache1Fetch() procedure can run faster.
-func pcache1FetchStage2(tls *libc.TLS, pCache uintptr, iKey uint32, createFlag int32) uintptr { /* sqlite3.c:51074:31: */
+func pcache1FetchStage2(tls *libc.TLS, pCache uintptr, iKey uint32, createFlag int32) uintptr { /* sqlite3.c:51570:31: */
var nPinned uint32
var pGroup uintptr = (*PCache1)(unsafe.Pointer(pCache)).FpGroup
var pPage uintptr = uintptr(0)
@@ -28387,7 +30245,7 @@ func pcache1FetchStage2(tls *libc.TLS, pCache uintptr, iKey uint32, createFlag i
// the general case. pcache1FetchNoMutex() is a faster implementation for
// the common case where pGroup->mutex is NULL. The pcache1Fetch() wrapper
// invokes the appropriate routine.
-func pcache1FetchNoMutex(tls *libc.TLS, p uintptr, iKey uint32, createFlag int32) uintptr { /* sqlite3.c:51202:15: */
+func pcache1FetchNoMutex(tls *libc.TLS, p uintptr, iKey uint32, createFlag int32) uintptr { /* sqlite3.c:51698:15: */
var pCache uintptr = p
var pPage uintptr = uintptr(0)
@@ -28416,7 +30274,7 @@ func pcache1FetchNoMutex(tls *libc.TLS, p uintptr, iKey uint32, createFlag int32
return uintptr(0)
}
-func pcache1FetchWithMutex(tls *libc.TLS, p uintptr, iKey uint32, createFlag int32) uintptr { /* sqlite3.c:51232:15: */
+func pcache1FetchWithMutex(tls *libc.TLS, p uintptr, iKey uint32, createFlag int32) uintptr { /* sqlite3.c:51728:15: */
var pCache uintptr = p
var pPage uintptr
@@ -28427,7 +30285,7 @@ func pcache1FetchWithMutex(tls *libc.TLS, p uintptr, iKey uint32, createFlag int
return pPage
}
-func pcache1Fetch(tls *libc.TLS, p uintptr, iKey uint32, createFlag int32) uintptr { /* sqlite3.c:51247:28: */
+func pcache1Fetch(tls *libc.TLS, p uintptr, iKey uint32, createFlag int32) uintptr { /* sqlite3.c:51743:28: */
var pCache uintptr = p
if (*PGroup)(unsafe.Pointer((*PCache1)(unsafe.Pointer(pCache)).FpGroup)).Fmutex != 0 {
@@ -28441,7 +30299,7 @@ func pcache1Fetch(tls *libc.TLS, p uintptr, iKey uint32, createFlag int32) uintp
// Implementation of the sqlite3_pcache.xUnpin method.
//
// Mark a page as unpinned (eligible for asynchronous recycling).
-func pcache1Unpin(tls *libc.TLS, p uintptr, pPg uintptr, reuseUnlikely int32) { /* sqlite3.c:51278:13: */
+func pcache1Unpin(tls *libc.TLS, p uintptr, pPg uintptr, reuseUnlikely int32) { /* sqlite3.c:51774:13: */
var pCache uintptr = p
var pPage uintptr = pPg
var pGroup uintptr = (*PCache1)(unsafe.Pointer(pCache)).FpGroup
@@ -28466,7 +30324,7 @@ func pcache1Unpin(tls *libc.TLS, p uintptr, pPg uintptr, reuseUnlikely int32) {
}
// Implementation of the sqlite3_pcache.xRekey method.
-func pcache1Rekey(tls *libc.TLS, p uintptr, pPg uintptr, iOld uint32, iNew uint32) { /* sqlite3.c:51313:13: */
+func pcache1Rekey(tls *libc.TLS, p uintptr, pPg uintptr, iOld uint32, iNew uint32) { /* sqlite3.c:51809:13: */
var pCache uintptr = p
var pPage uintptr = pPg
var pp uintptr
@@ -28497,7 +30355,7 @@ func pcache1Rekey(tls *libc.TLS, p uintptr, pPg uintptr, iOld uint32, iNew uint3
// Discard all unpinned pages in the cache with a page number equal to
// or greater than parameter iLimit. Any pinned pages with a page number
// equal to or greater than iLimit are implicitly unpinned.
-func pcache1Truncate(tls *libc.TLS, p uintptr, iLimit uint32) { /* sqlite3.c:51353:13: */
+func pcache1Truncate(tls *libc.TLS, p uintptr, iLimit uint32) { /* sqlite3.c:51849:13: */
var pCache uintptr = p
Xsqlite3_mutex_enter(tls, (*PGroup)(unsafe.Pointer((*PCache1)(unsafe.Pointer(pCache)).FpGroup)).Fmutex)
if iLimit <= (*PCache1)(unsafe.Pointer(pCache)).FiMaxKey {
@@ -28510,7 +30368,7 @@ func pcache1Truncate(tls *libc.TLS, p uintptr, iLimit uint32) { /* sqlite3.c:513
// Implementation of the sqlite3_pcache.xDestroy method.
//
// Destroy a cache allocated using pcache1Create().
-func pcache1Destroy(tls *libc.TLS, p uintptr) { /* sqlite3.c:51368:13: */
+func pcache1Destroy(tls *libc.TLS, p uintptr) { /* sqlite3.c:51864:13: */
var pCache uintptr = p
var pGroup uintptr = (*PCache1)(unsafe.Pointer(pCache)).FpGroup
@@ -28533,7 +30391,7 @@ func pcache1Destroy(tls *libc.TLS, p uintptr) { /* sqlite3.c:51368:13: */
// This function is called during initialization (sqlite3_initialize()) to
// install the default pluggable cache module, assuming the user has not
// already provided an alternative.
-func Xsqlite3PCacheSetDefault(tls *libc.TLS) { /* sqlite3.c:51391:21: */
+func Xsqlite3PCacheSetDefault(tls *libc.TLS) { /* sqlite3.c:51887:21: */
bp := tls.Alloc(8)
defer tls.Free(8)
@@ -28553,16 +30411,16 @@ var defaultMethods1 = Sqlite3_pcache_methods2{
FxTruncate: 0, // xTruncate
FxDestroy: 0, // xDestroy
FxShrink: 0, // xShrink
-} /* sqlite3.c:51392:40 */
+} /* sqlite3.c:51888:40 */
// Return the size of the header on each page of this PCACHE implementation.
-func Xsqlite3HeaderSizePcache1(tls *libc.TLS) int32 { /* sqlite3.c:51413:20: */
+func Xsqlite3HeaderSizePcache1(tls *libc.TLS) int32 { /* sqlite3.c:51909:20: */
return (int32(((uint64(unsafe.Sizeof(PgHdr1{}))) + uint64(7)) & libc.Uint64FromInt32(libc.CplInt32(7))))
}
// Return the global mutex used by this PCACHE implementation. The
// sqlite3_status() routine needs access to this mutex.
-func Xsqlite3Pcache1Mutex(tls *libc.TLS) uintptr { /* sqlite3.c:51419:30: */
+func Xsqlite3Pcache1Mutex(tls *libc.TLS) uintptr { /* sqlite3.c:51915:30: */
return pcache1_g.Fmutex
}
@@ -28573,7 +30431,7 @@ func Xsqlite3Pcache1Mutex(tls *libc.TLS) uintptr { /* sqlite3.c:51419:30: */
// nReq is the number of bytes of memory required. Once this much has
// been released, the function returns. The return value is the total number
// of bytes of memory released.
-func Xsqlite3PcacheReleaseMemory(tls *libc.TLS, nReq int32) int32 { /* sqlite3.c:51433:20: */
+func Xsqlite3PcacheReleaseMemory(tls *libc.TLS, nReq int32) int32 { /* sqlite3.c:51929:20: */
var nFree int32 = 0
if Xsqlite3Config.FpPage == uintptr(0) {
@@ -28671,7 +30529,7 @@ type RowSetEntry = struct {
Fv I64
FpRight uintptr
FpLeft uintptr
-} /* sqlite3.c:14807:9 */
+} /* sqlite3.c:14916:9 */
// RowSetEntry objects are allocated in large chunks (instances of the
// following structure) to reduce memory allocation overhead. The
@@ -28684,13 +30542,13 @@ type RowSetChunk = struct {
FpRight uintptr
FpLeft uintptr
}
-} /* sqlite3.c:14807:9 */
+} /* sqlite3.c:14916:9 */
// Allowed values for RowSet.rsFlags
// Allocate a RowSet object. Return NULL if a memory allocation
// error occurs.
-func Xsqlite3RowSetInit(tls *libc.TLS, db uintptr) uintptr { /* sqlite3.c:51613:23: */
+func Xsqlite3RowSetInit(tls *libc.TLS, db uintptr) uintptr { /* sqlite3.c:52109:23: */
var p uintptr = Xsqlite3DbMallocRawNN(tls, db, uint64(unsafe.Sizeof(RowSet{})))
if p != 0 {
var N int32 = Xsqlite3DbMallocSize(tls, db, p)
@@ -28710,7 +30568,7 @@ func Xsqlite3RowSetInit(tls *libc.TLS, db uintptr) uintptr { /* sqlite3.c:51613:
// Deallocate all chunks from a RowSet. This frees all memory that
// the RowSet has allocated over its lifetime. This routine is
// the destructor for the RowSet.
-func Xsqlite3RowSetClear(tls *libc.TLS, pArg uintptr) { /* sqlite3.c:51635:21: */
+func Xsqlite3RowSetClear(tls *libc.TLS, pArg uintptr) { /* sqlite3.c:52131:21: */
var p uintptr = pArg
var pChunk uintptr
var pNextChunk uintptr
@@ -28729,7 +30587,7 @@ func Xsqlite3RowSetClear(tls *libc.TLS, pArg uintptr) { /* sqlite3.c:51635:21: *
// Deallocate all chunks from a RowSet. This frees all memory that
// the RowSet has allocated over its lifetime. This routine is
// the destructor for the RowSet.
-func Xsqlite3RowSetDelete(tls *libc.TLS, pArg uintptr) { /* sqlite3.c:51655:21: */
+func Xsqlite3RowSetDelete(tls *libc.TLS, pArg uintptr) { /* sqlite3.c:52151:21: */
Xsqlite3RowSetClear(tls, pArg)
Xsqlite3DbFree(tls, (*RowSet)(unsafe.Pointer(pArg)).Fdb, pArg)
}
@@ -28740,7 +30598,7 @@ func Xsqlite3RowSetDelete(tls *libc.TLS, pArg uintptr) { /* sqlite3.c:51655:21:
//
// In an OOM situation, the RowSet.db->mallocFailed flag is set and this
// routine returns NULL.
-func rowSetEntryAlloc(tls *libc.TLS, p uintptr) uintptr { /* sqlite3.c:51668:27: */
+func rowSetEntryAlloc(tls *libc.TLS, p uintptr) uintptr { /* sqlite3.c:52164:27: */
if int32((*RowSet)(unsafe.Pointer(p)).FnFresh) == 0 { //OPTIMIZATION-IF-FALSE
// We could allocate a fresh RowSetEntry each time one is needed, but it
@@ -28763,7 +30621,7 @@ func rowSetEntryAlloc(tls *libc.TLS, p uintptr) uintptr { /* sqlite3.c:51668:27:
//
// The mallocFailed flag of the database connection is set if a
// memory allocation fails.
-func Xsqlite3RowSetInsert(tls *libc.TLS, p uintptr, rowid I64) { /* sqlite3.c:51693:21: */
+func Xsqlite3RowSetInsert(tls *libc.TLS, p uintptr, rowid I64) { /* sqlite3.c:52189:21: */
var pEntry uintptr // The new entry
var pLast uintptr // The last prior entry
@@ -28793,7 +30651,7 @@ func Xsqlite3RowSetInsert(tls *libc.TLS, p uintptr, rowid I64) { /* sqlite3.c:51
//
// The input lists are connected via pRight pointers and are
// assumed to each already be in sorted order.
-func rowSetEntryMerge(tls *libc.TLS, pA uintptr, pB uintptr) uintptr { /* sqlite3.c:51724:27: */
+func rowSetEntryMerge(tls *libc.TLS, pA uintptr, pB uintptr) uintptr { /* sqlite3.c:52220:27: */
bp := tls.Alloc(24)
defer tls.Free(24)
@@ -28828,7 +30686,7 @@ func rowSetEntryMerge(tls *libc.TLS, pA uintptr, pB uintptr) uintptr { /* sqlite
// Sort all elements on the list of RowSetEntry objects into order of
// increasing v.
-func rowSetEntrySort(tls *libc.TLS, pIn uintptr) uintptr { /* sqlite3.c:51759:27: */
+func rowSetEntrySort(tls *libc.TLS, pIn uintptr) uintptr { /* sqlite3.c:52255:27: */
bp := tls.Alloc(320)
defer tls.Free(320)
@@ -28864,7 +30722,7 @@ func rowSetEntrySort(tls *libc.TLS, pIn uintptr) uintptr { /* sqlite3.c:51759:27
// The input, pIn, is a binary tree (or subtree) of RowSetEntry objects.
// Convert this tree into a linked list connected by the pRight pointers
// and return pointers to the first and last elements of the new list.
-func rowSetTreeToList(tls *libc.TLS, pIn uintptr, ppFirst uintptr, ppLast uintptr) { /* sqlite3.c:51788:13: */
+func rowSetTreeToList(tls *libc.TLS, pIn uintptr, ppFirst uintptr, ppLast uintptr) { /* sqlite3.c:52284:13: */
bp := tls.Alloc(8)
defer tls.Free(8)
@@ -28895,7 +30753,7 @@ func rowSetTreeToList(tls *libc.TLS, pIn uintptr, ppFirst uintptr, ppLast uintpt
// and leave *ppList set to NULL.
//
// Return a pointer to the root of the constructed binary tree.
-func rowSetNDeepTree(tls *libc.TLS, ppList uintptr, iDepth int32) uintptr { /* sqlite3.c:51823:27: */
+func rowSetNDeepTree(tls *libc.TLS, ppList uintptr, iDepth int32) uintptr { /* sqlite3.c:52319:27: */
var p uintptr // Root of the new tree
var pLeft uintptr // Left subtree
if *(*uintptr)(unsafe.Pointer(ppList)) == uintptr(0) { //OPTIMIZATION-IF-TRUE
@@ -28926,7 +30784,7 @@ func rowSetNDeepTree(tls *libc.TLS, ppList uintptr, iDepth int32) uintptr { /* s
// Convert a sorted list of elements into a binary tree. Make the tree
// as deep as it needs to be in order to contain the entire list.
-func rowSetListToTree(tls *libc.TLS, pList uintptr) uintptr { /* sqlite3.c:51859:27: */
+func rowSetListToTree(tls *libc.TLS, pList uintptr) uintptr { /* sqlite3.c:52355:27: */
bp := tls.Alloc(8)
defer tls.Free(8)
*(*uintptr)(unsafe.Pointer(bp)) = pList
@@ -28959,7 +30817,7 @@ func rowSetListToTree(tls *libc.TLS, pList uintptr) uintptr { /* sqlite3.c:51859
// been used. Older versions of RowSet allowed that, but as the
// capability was not used by the code generator, it was removed
// for code economy.
-func Xsqlite3RowSetNext(tls *libc.TLS, p uintptr, pRowid uintptr) int32 { /* sqlite3.c:51891:20: */
+func Xsqlite3RowSetNext(tls *libc.TLS, p uintptr, pRowid uintptr) int32 { /* sqlite3.c:52387:20: */
// Cannot be used with sqlite3RowSetText()
@@ -28992,7 +30850,7 @@ func Xsqlite3RowSetNext(tls *libc.TLS, p uintptr, pRowid uintptr) int32 { /* sql
// If this is the first test of a new batch and if there exist entries
// on pRowSet->pEntry, then sort those entries into the forest at
// pRowSet->pForest so that they can be tested.
-func Xsqlite3RowSetTest(tls *libc.TLS, pRowSet uintptr, iBatch int32, iRowid Sqlite3_int64) int32 { /* sqlite3.c:51925:20: */
+func Xsqlite3RowSetTest(tls *libc.TLS, pRowSet uintptr, iBatch int32, iRowid Sqlite3_int64) int32 { /* sqlite3.c:52421:20: */
bp := tls.Alloc(16)
defer tls.Free(16)
@@ -29107,7 +30965,7 @@ type Wal1 = struct {
FpDbFd uintptr
FpWalFd uintptr
FiCallback U32
- _ [4]byte
+ F__ccgo_pad1 [4]byte
FmxWalSize I64
FnWiData int32
FszFirstBlock int32
@@ -29123,15 +30981,15 @@ type Wal1 = struct {
FsyncHeader U8
FpadToSectorBoundary U8
FbShmUnreliable U8
- _ [1]byte
+ F__ccgo_pad2 [1]byte
Fhdr WalIndexHdr
FminFrame U32
FiReCksum U32
FzWalName uintptr
FnCkpt U32
- _ [4]byte
+ F__ccgo_pad3 [4]byte
FpSnapshot uintptr
-} /* sqlite3.c:1312:9 */
+} /* sqlite3.c:1331:9 */
//************* End of rowset.c *********************************************
//************* Begin file pager.c ******************************************
@@ -29177,7 +31035,7 @@ type Wal1 = struct {
// Connection to a write-ahead log (WAL) file.
// There is one object of this type for each pager.
-type Wal = Wal1 /* sqlite3.c:52067:20 */
+type Wal = Wal1 /* sqlite3.c:52563:20 */
//************* End of wal.h ************************************************
//************* Continuing where we left off in pager.c *********************
@@ -29565,8 +31423,8 @@ type PagerSavepoint1 = struct {
FiSubRec Pgno
FbTruncateOnRelease int32
FaWalData [4]U32
- _ [4]byte
-} /* sqlite3.c:1312:9 */
+ F__ccgo_pad1 [4]byte
+} /* sqlite3.c:1331:9 */
//************* End of wal.h ************************************************
//************* Continuing where we left off in pager.c *********************
@@ -29946,7 +31804,7 @@ type PagerSavepoint1 = struct {
// immediately following the last journal record written into the main
// journal before the journal-header. This is required during savepoint
// rollback (see pagerPlaybackSavepoint()).
-type PagerSavepoint = PagerSavepoint1 /* sqlite3.c:52578:31 */
+type PagerSavepoint = PagerSavepoint1 /* sqlite3.c:53074:31 */
// Indexes for use with Pager.aStat[]. The Pager.aStat[] array contains
// the values accessed by passing SQLITE_DBSTATUS_CACHE_HIT, CACHE_MISS
@@ -29979,11 +31837,11 @@ type PagerSavepoint = PagerSavepoint1 /* sqlite3.c:52578:31 */
// is different for every journal, we minimize that risk.
var aJournalMagic = [8]uint8{
uint8(0xd9), uint8(0xd5), uint8(0x05), uint8(0xf9), uint8(0x20), uint8(0xa1), uint8(0x63), uint8(0xd7),
-} /* sqlite3.c:52899:28 */
+} /* sqlite3.c:53395:28 */
// Set the Pager.xGet method for the appropriate routine used to fetch
// content from the pager.
-func setGetterMethod(tls *libc.TLS, pPager uintptr) { /* sqlite3.c:53192:13: */
+func setGetterMethod(tls *libc.TLS, pPager uintptr) { /* sqlite3.c:53688:13: */
if (*Pager)(unsafe.Pointer(pPager)).FerrCode != 0 {
(*Pager)(unsafe.Pointer(pPager)).FxGet = *(*uintptr)(unsafe.Pointer(&struct {
f func(*libc.TLS, uintptr, Pgno, uintptr, int32) int32
@@ -30006,7 +31864,7 @@ func setGetterMethod(tls *libc.TLS, pPager uintptr) { /* sqlite3.c:53192:13: */
// * The page-number is less than or equal to PagerSavepoint.nOrig, and
// * The bit corresponding to the page-number is not set in
// PagerSavepoint.pInSavepoint.
-func subjRequiresPage(tls *libc.TLS, pPg uintptr) int32 { /* sqlite3.c:53213:12: */
+func subjRequiresPage(tls *libc.TLS, pPg uintptr) int32 { /* sqlite3.c:53709:12: */
var pPager uintptr = (*PgHdr)(unsafe.Pointer(pPg)).FpPager
var p uintptr
var pgno Pgno = (*PgHdr)(unsafe.Pointer(pPg)).Fpgno
@@ -30028,7 +31886,7 @@ func subjRequiresPage(tls *libc.TLS, pPg uintptr) int32 { /* sqlite3.c:53213:12:
// error code is something goes wrong.
//
// All values are stored on disk as big-endian.
-func read32bits(tls *libc.TLS, fd uintptr, offset I64, pRes uintptr) int32 { /* sqlite3.c:53246:12: */
+func read32bits(tls *libc.TLS, fd uintptr, offset I64, pRes uintptr) int32 { /* sqlite3.c:53742:12: */
bp := tls.Alloc(4)
defer tls.Free(4)
@@ -30045,11 +31903,11 @@ func read32bits(tls *libc.TLS, fd uintptr, offset I64, pRes uintptr) int32 { /*
// Write a 32-bit integer into the given file descriptor. Return SQLITE_OK
// on success or an error code is something goes wrong.
-func write32bits(tls *libc.TLS, fd uintptr, offset I64, val U32) int32 { /* sqlite3.c:53265:12: */
+func write32bits(tls *libc.TLS, fd uintptr, offset I64, val U32) int32 { /* sqlite3.c:53761:12: */
bp := tls.Alloc(4)
defer tls.Free(4)
- // var ac [4]int8 at bp, 4
+ // var ac [4]uint8 at bp, 4
Xsqlite3Put4byte(tls, bp /* ac */, val)
return Xsqlite3OsWrite(tls, fd, bp /* &ac[0] */, 4, offset)
@@ -30062,7 +31920,7 @@ func write32bits(tls *libc.TLS, fd uintptr, offset I64, val U32) int32 { /* sqli
// Except, if Pager.eLock is set to UNKNOWN_LOCK when this function is
// called, do not modify it. See the comment above the #define of
// UNKNOWN_LOCK for an explanation of this.
-func pagerUnlockDb(tls *libc.TLS, pPager uintptr, eLock int32) int32 { /* sqlite3.c:53280:12: */
+func pagerUnlockDb(tls *libc.TLS, pPager uintptr, eLock int32) int32 { /* sqlite3.c:53776:12: */
var rc int32 = SQLITE_OK
if (*Sqlite3_file)(unsafe.Pointer(((*Pager)(unsafe.Pointer(pPager)).Ffd))).FpMethods != uintptr(0) {
@@ -30089,7 +31947,7 @@ func pagerUnlockDb(tls *libc.TLS, pPager uintptr, eLock int32) int32 { /* sqlite
// called, do not modify it unless the new locking state is EXCLUSIVE_LOCK.
// See the comment above the #define of UNKNOWN_LOCK for an explanation
// of this.
-func pagerLockDb(tls *libc.TLS, pPager uintptr, eLock int32) int32 { /* sqlite3.c:53308:12: */
+func pagerLockDb(tls *libc.TLS, pPager uintptr, eLock int32) int32 { /* sqlite3.c:53804:12: */
var rc int32 = SQLITE_OK
if (int32((*Pager)(unsafe.Pointer(pPager)).FeLock) < eLock) || (int32((*Pager)(unsafe.Pointer(pPager)).FeLock) == (EXCLUSIVE_LOCK + 1)) {
@@ -30123,7 +31981,7 @@ func pagerLockDb(tls *libc.TLS, pPager uintptr, eLock int32) int32 { /* sqlite3.
// returned in this case.
//
// If neither optimization can be used, 0 is returned.
-func jrnlBufferSize(tls *libc.TLS, pPager uintptr) int32 { /* sqlite3.c:53341:12: */
+func jrnlBufferSize(tls *libc.TLS, pPager uintptr) int32 { /* sqlite3.c:53837:12: */
_ = pPager
@@ -30157,7 +32015,7 @@ func jrnlBufferSize(tls *libc.TLS, pPager uintptr) int32 { /* sqlite3.c:53341:12
//
// If an error occurs while reading from the journal file, an SQLite
// error code is returned.
-func readSuperJournal(tls *libc.TLS, pJrnl uintptr, zSuper uintptr, nSuper U32) int32 { /* sqlite3.c:53446:12: */
+func readSuperJournal(tls *libc.TLS, pJrnl uintptr, zSuper uintptr, nSuper U32) int32 { /* sqlite3.c:53942:12: */
bp := tls.Alloc(24)
defer tls.Free(24)
@@ -30171,7 +32029,7 @@ func readSuperJournal(tls *libc.TLS, pJrnl uintptr, zSuper uintptr, nSuper U32)
var u U32 // Unsigned loop counter
// var aMagic [8]uint8 at bp+16, 8
// A buffer to hold the magic header
- *(*int8)(unsafe.Pointer(zSuper)) = int8(0)
+ *(*uint8)(unsafe.Pointer(zSuper)) = uint8(0)
if (((((((((SQLITE_OK != (libc.AssignInt32(&rc, Xsqlite3OsFileSize(tls, pJrnl, bp /* &szJ */)))) ||
(*(*I64)(unsafe.Pointer(bp /* szJ */)) < int64(16))) ||
@@ -30188,7 +32046,7 @@ func readSuperJournal(tls *libc.TLS, pJrnl uintptr, zSuper uintptr, nSuper U32)
// See if the checksum matches the super-journal name
for u = U32(0); u < *(*U32)(unsafe.Pointer(bp + 8 /* len */)); u++ {
- *(*U32)(unsafe.Pointer(bp + 12 /* cksum */)) -= U32(*(*int8)(unsafe.Pointer(zSuper + uintptr(u))))
+ *(*U32)(unsafe.Pointer(bp + 12 /* cksum */)) -= U32(*(*uint8)(unsafe.Pointer(zSuper + uintptr(u))))
}
if *(*U32)(unsafe.Pointer(bp + 12 /* cksum */)) != 0 {
// If the checksum doesn't add up, then one or more of the disk sectors
@@ -30197,8 +32055,8 @@ func readSuperJournal(tls *libc.TLS, pJrnl uintptr, zSuper uintptr, nSuper U32)
// super-journal filename.
*(*U32)(unsafe.Pointer(bp + 8 /* len */)) = U32(0)
}
- *(*int8)(unsafe.Pointer(zSuper + uintptr(*(*U32)(unsafe.Pointer(bp + 8 /* len */))))) = int8(0)
- *(*int8)(unsafe.Pointer(zSuper + uintptr((*(*U32)(unsafe.Pointer(bp + 8 /* len */)) + U32(1))))) = int8(0)
+ *(*uint8)(unsafe.Pointer(zSuper + uintptr(*(*U32)(unsafe.Pointer(bp + 8 /* len */))))) = uint8(0)
+ *(*uint8)(unsafe.Pointer(zSuper + uintptr((*(*U32)(unsafe.Pointer(bp + 8 /* len */)) + U32(1))))) = uint8(0)
return SQLITE_OK
}
@@ -30216,7 +32074,7 @@ func readSuperJournal(tls *libc.TLS, pJrnl uintptr, zSuper uintptr, nSuper U32)
// 100 512
// 2000 2048
//
-func journalHdrOffset(tls *libc.TLS, pPager uintptr) I64 { /* sqlite3.c:53502:12: */
+func journalHdrOffset(tls *libc.TLS, pPager uintptr) I64 { /* sqlite3.c:53998:12: */
var offset I64 = int64(0)
var c I64 = (*Pager)(unsafe.Pointer(pPager)).FjournalOff
if c != 0 {
@@ -30245,7 +32103,7 @@ func journalHdrOffset(tls *libc.TLS, pPager uintptr) I64 { /* sqlite3.c:53502:12
//
// If an IO error occurs, abandon processing and return the IO error code.
// Otherwise, return SQLITE_OK.
-func zeroJournalHdr(tls *libc.TLS, pPager uintptr, doTruncate int32) int32 { /* sqlite3.c:53535:12: */
+func zeroJournalHdr(tls *libc.TLS, pPager uintptr, doTruncate int32) int32 { /* sqlite3.c:54031:12: */
bp := tls.Alloc(8)
defer tls.Free(8)
@@ -30280,7 +32138,7 @@ func zeroJournalHdr(tls *libc.TLS, pPager uintptr, doTruncate int32) int32 { /*
return rc
}
-var zeroHdr = [28]int8{0: int8(0)} /* sqlite3.c:53546:25 */
+var zeroHdr = [28]uint8{0: uint8(0)} /* sqlite3.c:54042:25 */
// The journal file must be open when this routine is called. A journal
// header (JOURNAL_HDR_SZ bytes) is written into the journal file at the
@@ -30295,7 +32153,7 @@ var zeroHdr = [28]int8{0: int8(0)} /* sqlite3.c:53546:25 */
// - 4 bytes: Database page size.
//
// Followed by (JOURNAL_HDR_SZ - 28) bytes of unused space.
-func writeJournalHdr(tls *libc.TLS, pPager uintptr) int32 { /* sqlite3.c:53585:12: */
+func writeJournalHdr(tls *libc.TLS, pPager uintptr) int32 { /* sqlite3.c:54081:12: */
var rc int32 = SQLITE_OK // Return code
var zHeader uintptr = (*Pager)(unsafe.Pointer(pPager)).FpTmpSpace // Temporary space used to build header
var nHeader U32 = U32((*Pager)(unsafe.Pointer(pPager)).FpageSize) // Size of buffer pointed to by zHeader
@@ -30405,7 +32263,7 @@ func writeJournalHdr(tls *libc.TLS, pPager uintptr) int32 { /* sqlite3.c:53585:1
// If the journal header file appears to be corrupted, SQLITE_DONE is
// returned and *pNRec and *PDbSize are undefined. If JOURNAL_HDR_SZ bytes
// cannot be read from the journal file an error code is returned.
-func readJournalHdr(tls *libc.TLS, pPager uintptr, isHot int32, journalSize I64, pNRec uintptr, pDbSize uintptr) int32 { /* sqlite3.c:53703:12: */
+func readJournalHdr(tls *libc.TLS, pPager uintptr, isHot int32, journalSize I64, pNRec uintptr, pDbSize uintptr) int32 { /* sqlite3.c:54199:12: */
bp := tls.Alloc(16)
defer tls.Free(16)
@@ -30515,7 +32373,7 @@ func readJournalHdr(tls *libc.TLS, pPager uintptr, isHot int32, journalSize I64,
//
// If zSuper is a NULL pointer (occurs for a single database transaction),
// this call is a no-op.
-func writeSuperJournal(tls *libc.TLS, pPager uintptr, zSuper uintptr) int32 { /* sqlite3.c:53828:12: */
+func writeSuperJournal(tls *libc.TLS, pPager uintptr, zSuper uintptr) int32 { /* sqlite3.c:54324:12: */
bp := tls.Alloc(8)
defer tls.Free(8)
@@ -30534,8 +32392,8 @@ func writeSuperJournal(tls *libc.TLS, pPager uintptr, zSuper uintptr) int32 { /*
(*Pager)(unsafe.Pointer(pPager)).FsetSuper = U8(1)
// Calculate the length in bytes and the checksum of zSuper
- for nSuper = 0; *(*int8)(unsafe.Pointer(zSuper + uintptr(nSuper))) != 0; nSuper++ {
- cksum = cksum + (U32(*(*int8)(unsafe.Pointer(zSuper + uintptr(nSuper)))))
+ for nSuper = 0; *(*uint8)(unsafe.Pointer(zSuper + uintptr(nSuper))) != 0; nSuper++ {
+ cksum = cksum + (U32(*(*uint8)(unsafe.Pointer(zSuper + uintptr(nSuper)))))
}
// If in full-sync mode, advance to the next disk sector before writing
@@ -30575,21 +32433,21 @@ func writeSuperJournal(tls *libc.TLS, pPager uintptr, zSuper uintptr) int32 { /*
}
// Discard the entire contents of the in-memory page-cache.
-func pager_reset(tls *libc.TLS, pPager uintptr) { /* sqlite3.c:53896:13: */
+func pager_reset(tls *libc.TLS, pPager uintptr) { /* sqlite3.c:54392:13: */
(*Pager)(unsafe.Pointer(pPager)).FiDataVersion++
Xsqlite3BackupRestart(tls, (*Pager)(unsafe.Pointer(pPager)).FpBackup)
Xsqlite3PcacheClear(tls, (*Pager)(unsafe.Pointer(pPager)).FpPCache)
}
// Return the pPager->iDataVersion value
-func Xsqlite3PagerDataVersion(tls *libc.TLS, pPager uintptr) U32 { /* sqlite3.c:53905:20: */
+func Xsqlite3PagerDataVersion(tls *libc.TLS, pPager uintptr) U32 { /* sqlite3.c:54401:20: */
return (*Pager)(unsafe.Pointer(pPager)).FiDataVersion
}
// Free all structures in the Pager.aSavepoint[] array and set both
// Pager.aSavepoint and Pager.nSavepoint to zero. Close the sub-journal
// if it is open and the pager is not in exclusive mode.
-func releaseAllSavepoints(tls *libc.TLS, pPager uintptr) { /* sqlite3.c:53914:13: */
+func releaseAllSavepoints(tls *libc.TLS, pPager uintptr) { /* sqlite3.c:54410:13: */
var ii int32 // Iterator for looping through Pager.aSavepoint
for ii = 0; ii < (*Pager)(unsafe.Pointer(pPager)).FnSavepoint; ii++ {
Xsqlite3BitvecDestroy(tls, (*PagerSavepoint)(unsafe.Pointer((*Pager)(unsafe.Pointer(pPager)).FaSavepoint+uintptr(ii)*56)).FpInSavepoint)
@@ -30606,7 +32464,7 @@ func releaseAllSavepoints(tls *libc.TLS, pPager uintptr) { /* sqlite3.c:53914:13
// Set the bit number pgno in the PagerSavepoint.pInSavepoint
// bitvecs of all open savepoints. Return SQLITE_OK if successful
// or SQLITE_NOMEM if a malloc failure occurs.
-func addToSavepointBitvecs(tls *libc.TLS, pPager uintptr, pgno Pgno) int32 { /* sqlite3.c:53933:12: */
+func addToSavepointBitvecs(tls *libc.TLS, pPager uintptr, pgno Pgno) int32 { /* sqlite3.c:54429:12: */
var ii int32 // Loop counter
var rc int32 = SQLITE_OK // Result code
@@ -30635,7 +32493,7 @@ func addToSavepointBitvecs(tls *libc.TLS, pPager uintptr, pgno Pgno) int32 { /*
// or not, any journal file left in the file-system will be treated
// as a hot-journal and rolled back the next time a read-transaction
// is opened (by this or by any other connection).
-func pager_unlock(tls *libc.TLS, pPager uintptr) { /* sqlite3.c:53965:13: */
+func pager_unlock(tls *libc.TLS, pPager uintptr) { /* sqlite3.c:54461:13: */
Xsqlite3BitvecDestroy(tls, (*Pager)(unsafe.Pointer(pPager)).FpInJournal)
(*Pager)(unsafe.Pointer(pPager)).FpInJournal = uintptr(0)
@@ -30727,7 +32585,7 @@ func pager_unlock(tls *libc.TLS, pPager uintptr) { /* sqlite3.c:53965:13: */
// the persistent error occurred, then the rollback journal may need
// to be replayed to restore the contents of the database file (as if
// it were a hot-journal).
-func pager_error(tls *libc.TLS, pPager uintptr, rc int32) int32 { /* sqlite3.c:54062:12: */
+func pager_error(tls *libc.TLS, pPager uintptr, rc int32) int32 { /* sqlite3.c:54558:12: */
var rc2 int32 = (rc & 0xff)
if (rc2 == SQLITE_FULL) || (rc2 == SQLITE_IOERR) {
@@ -30752,7 +32610,7 @@ func pager_error(tls *libc.TLS, pPager uintptr, rc int32) int32 { /* sqlite3.c:5
// file has been created already (via a spill on pagerStress()) and
// when the number of dirty pages in memory exceeds 25% of the total
// cache size.
-func pagerFlushOnCommit(tls *libc.TLS, pPager uintptr, bCommit int32) int32 { /* sqlite3.c:54096:12: */
+func pagerFlushOnCommit(tls *libc.TLS, pPager uintptr, bCommit int32) int32 { /* sqlite3.c:54592:12: */
if int32((*Pager)(unsafe.Pointer(pPager)).FtempFile) == 0 {
return 1
}
@@ -30816,7 +32674,7 @@ func pagerFlushOnCommit(tls *libc.TLS, pPager uintptr, bCommit int32) int32 { /*
// unlock operation fails as well, then the first error code related
// to the first error encountered (the journal finalization one) is
// returned.
-func pager_end_transaction(tls *libc.TLS, pPager uintptr, hasSuper int32, bCommit int32) int32 { /* sqlite3.c:54156:12: */
+func pager_end_transaction(tls *libc.TLS, pPager uintptr, hasSuper int32, bCommit int32) int32 { /* sqlite3.c:54652:12: */
var rc int32 = SQLITE_OK // Error code from journal finalization operation
var rc2 int32 = SQLITE_OK // Error code from db file unlock operation
@@ -30943,7 +32801,7 @@ func pager_end_transaction(tls *libc.TLS, pPager uintptr, hasSuper int32, bCommi
// malloc error occurs during a rollback, then this will itself cause
// the pager to enter the ERROR state. Which will be cleared by the
// call to pager_unlock(), as described above.
-func pagerUnlockAndRollback(tls *libc.TLS, pPager uintptr) { /* sqlite3.c:54303:13: */
+func pagerUnlockAndRollback(tls *libc.TLS, pPager uintptr) { /* sqlite3.c:54799:13: */
if (int32((*Pager)(unsafe.Pointer(pPager)).FeState) != PAGER_ERROR) && (int32((*Pager)(unsafe.Pointer(pPager)).FeState) != PAGER_OPEN) {
if int32((*Pager)(unsafe.Pointer(pPager)).FeState) >= PAGER_WRITER_LOCKED {
@@ -30975,7 +32833,7 @@ func pagerUnlockAndRollback(tls *libc.TLS, pPager uintptr) { /* sqlite3.c:54303:
// It is much less likely that the two ends of the journal record will be
// correct and the middle be corrupt. Thus, this "checksum" scheme,
// though fast and simple, catches the mostly likely kind of corruption.
-func pager_cksum(tls *libc.TLS, pPager uintptr, aData uintptr) U32 { /* sqlite3.c:54337:12: */
+func pager_cksum(tls *libc.TLS, pPager uintptr, aData uintptr) U32 { /* sqlite3.c:54833:12: */
var cksum U32 = (*Pager)(unsafe.Pointer(pPager)).FcksumInit // Checksum value to return
var i int32 = ((*Pager)(unsafe.Pointer(pPager)).FpageSize - 200) // Loop counter
for i > 0 {
@@ -31020,7 +32878,7 @@ func pager_cksum(tls *libc.TLS, pPager uintptr, aData uintptr) U32 { /* sqlite3.
// If this is a savepoint rollback, then memory may have to be dynamically
// allocated by this function. If this is the case and an allocation fails,
// SQLITE_NOMEM is returned.
-func pager_playback_one_page(tls *libc.TLS, pPager uintptr, pOffset uintptr, pDone uintptr, isMainJrnl int32, isSavepnt int32) int32 { /* sqlite3.c:54384:12: */
+func pager_playback_one_page(tls *libc.TLS, pPager uintptr, pOffset uintptr, pDone uintptr, isMainJrnl int32, isSavepnt int32) int32 { /* sqlite3.c:54880:12: */
bp := tls.Alloc(16)
defer tls.Free(16)
@@ -31197,7 +33055,7 @@ func pager_playback_one_page(tls *libc.TLS, pPager uintptr, pOffset uintptr, pDo
var pData uintptr
pData = (*PgHdr)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 8 /* pPg */)))).FpData
libc.Xmemcpy(tls, pData, aData, uint64((*Pager)(unsafe.Pointer(pPager)).FpageSize))
- (*(*func(*libc.TLS, uintptr))(unsafe.Pointer((pPager + 256 /* &.xReiniter */))))(tls, *(*uintptr)(unsafe.Pointer(bp + 8 /* pPg */)))
+ (*struct{ f func(*libc.TLS, uintptr) })(unsafe.Pointer(&struct{ uintptr }{(*Pager)(unsafe.Pointer(pPager)).FxReiniter})).f(tls, *(*uintptr)(unsafe.Pointer(bp + 8 /* pPg */)))
// It used to be that sqlite3PcacheMakeClean(pPg) was called here. But
// that call was dangerous and had no detectable benefit since the cache
// is normally cleaned by sqlite3PcacheCleanAll() after rollback and so
@@ -31206,7 +33064,7 @@ func pager_playback_one_page(tls *libc.TLS, pPager uintptr, pOffset uintptr, pDo
// If this was page 1, then restore the value of Pager.dbFileVers.
// Do this before any decoding.
if *(*Pgno)(unsafe.Pointer(bp /* pgno */)) == Pgno(1) {
- libc.Xmemcpy(tls, (pPager + 136 /* &.dbFileVers */), ((pData) + 24), uint64(unsafe.Sizeof([16]int8{})))
+ libc.Xmemcpy(tls, (pPager + 136 /* &.dbFileVers */), ((pData) + 24), uint64(unsafe.Sizeof([16]uint8{})))
}
Xsqlite3PcacheRelease(tls, *(*uintptr)(unsafe.Pointer(bp + 8 /* pPg */)))
}
@@ -31254,7 +33112,7 @@ func pager_playback_one_page(tls *libc.TLS, pPager uintptr, pOffset uintptr, pDo
// the entire contents of the super-journal file. This could be
// a couple of kilobytes or so - potentially larger than the page
// size.
-func pager_delsuper(tls *libc.TLS, pPager uintptr, zSuper uintptr) int32 { /* sqlite3.c:54631:12: */
+func pager_delsuper(tls *libc.TLS, pPager uintptr, zSuper uintptr) int32 { /* sqlite3.c:55127:12: */
bp := tls.Alloc(12)
defer tls.Free(12)
@@ -31325,7 +33183,7 @@ __4:
goto delsuper_out
__5:
;
- *(*int8)(unsafe.Pointer(zFree)) = libc.AssignPtrInt8(zFree+1, libc.AssignPtrInt8(zFree+2, libc.AssignPtrInt8(zFree+3, int8(0))))
+ *(*uint8)(unsafe.Pointer(zFree)) = libc.AssignPtrUint8(zFree+1, libc.AssignPtrUint8(zFree+2, libc.AssignPtrUint8(zFree+3, uint8(0))))
zSuperJournal = (zFree + 4)
zSuperPtr = (zSuperJournal + uintptr((*(*I64)(unsafe.Pointer(bp /* nSuperJournal */)) + int64(2))))
rc = Xsqlite3OsRead(tls, pSuper, zSuperJournal, int32(*(*I64)(unsafe.Pointer(bp /* nSuperJournal */))), int64(0))
@@ -31335,8 +33193,8 @@ __5:
goto delsuper_out
__6:
;
- *(*int8)(unsafe.Pointer(zSuperJournal + uintptr(*(*I64)(unsafe.Pointer(bp /* nSuperJournal */))))) = int8(0)
- *(*int8)(unsafe.Pointer(zSuperJournal + uintptr((*(*I64)(unsafe.Pointer(bp /* nSuperJournal */)) + int64(1))))) = int8(0)
+ *(*uint8)(unsafe.Pointer(zSuperJournal + uintptr(*(*I64)(unsafe.Pointer(bp /* nSuperJournal */))))) = uint8(0)
+ *(*uint8)(unsafe.Pointer(zSuperJournal + uintptr((*(*I64)(unsafe.Pointer(bp /* nSuperJournal */)) + int64(1))))) = uint8(0)
zJournal = zSuperJournal
__7:
@@ -31371,7 +33229,7 @@ __11:
__12:
;
- c = (libc.Bool32((int32(*(*int8)(unsafe.Pointer(zSuperPtr))) != 0) && (libc.Xstrcmp(tls, zSuperPtr, zSuper) == 0)))
+ c = (libc.Bool32((int32(*(*uint8)(unsafe.Pointer(zSuperPtr))) != 0) && (libc.Xstrcmp(tls, zSuperPtr, zSuper) == 0)))
if !(c != 0) {
goto __13
}
@@ -31420,7 +33278,7 @@ __14:
//
// If successful, return SQLITE_OK. If an IO error occurs while modifying
// the database file, return the error code to the caller.
-func pager_truncate(tls *libc.TLS, pPager uintptr, nPage Pgno) int32 { /* sqlite3.c:54749:12: */
+func pager_truncate(tls *libc.TLS, pPager uintptr, nPage Pgno) int32 { /* sqlite3.c:55245:12: */
bp := tls.Alloc(8)
defer tls.Free(8)
@@ -31455,7 +33313,7 @@ func pager_truncate(tls *libc.TLS, pPager uintptr, nPage Pgno) int32 { /* sqlite
// Return a sanitized version of the sector-size of OS file pFile. The
// return value is guaranteed to lie between 32 and MAX_SECTOR_SIZE.
-func Xsqlite3SectorSize(tls *libc.TLS, pFile uintptr) int32 { /* sqlite3.c:54785:20: */
+func Xsqlite3SectorSize(tls *libc.TLS, pFile uintptr) int32 { /* sqlite3.c:55281:20: */
var iRet int32 = Xsqlite3OsSectorSize(tls, pFile)
if iRet < 32 {
iRet = 512
@@ -31487,7 +33345,7 @@ func Xsqlite3SectorSize(tls *libc.TLS, pFile uintptr) int32 { /* sqlite3.c:54785
// (that is what POWERSAFE_OVERWRITE means), so we minimize the sector
// size. For backwards compatibility of the rollback journal file format,
// we cannot reduce the effective sector size below 512.
-func setSectorSize(tls *libc.TLS, pPager uintptr) { /* sqlite3.c:54819:13: */
+func setSectorSize(tls *libc.TLS, pPager uintptr) { /* sqlite3.c:55315:13: */
if ((*Pager)(unsafe.Pointer(pPager)).FtempFile != 0) ||
((Xsqlite3OsDeviceCharacteristics(tls, (*Pager)(unsafe.Pointer(pPager)).Ffd) & SQLITE_IOCAP_POWERSAFE_OVERWRITE) != 0) {
@@ -31555,7 +33413,7 @@ func setSectorSize(tls *libc.TLS, pPager uintptr) { /* sqlite3.c:54819:13: */
// If the journal really is hot, reset the pager cache prior rolling
// back any content. If the journal is merely persistent, no reset is
// needed.
-func pager_playback(tls *libc.TLS, pPager uintptr, isHot int32) int32 { /* sqlite3.c:54892:12: */
+func pager_playback(tls *libc.TLS, pPager uintptr, isHot int32) int32 { /* sqlite3.c:55388:12: */
bp := tls.Alloc(40)
defer tls.Free(40)
@@ -31604,7 +33462,7 @@ __1:
// for pageSize.
zSuper = (*Pager)(unsafe.Pointer(pPager)).FpTmpSpace
rc = readSuperJournal(tls, (*Pager)(unsafe.Pointer(pPager)).Fjfd, zSuper, (uint32((*Sqlite3_vfs)(unsafe.Pointer((*Pager)(unsafe.Pointer(pPager)).FpVfs)).FmxPathname + 1)))
- if !((rc == SQLITE_OK) && (*(*int8)(unsafe.Pointer(zSuper)) != 0)) {
+ if !((rc == SQLITE_OK) && (*(*uint8)(unsafe.Pointer(zSuper)) != 0)) {
goto __2
}
rc = Xsqlite3OsAccess(tls, pVfs, zSuper, SQLITE_ACCESS_EXISTS, bp+24 /* &res */)
@@ -31800,11 +33658,11 @@ __24:
if !(rc == SQLITE_OK) {
goto __25
}
- rc = pager_end_transaction(tls, pPager, (libc.Bool32(int32(*(*int8)(unsafe.Pointer(zSuper))) != 0)), 0)
+ rc = pager_end_transaction(tls, pPager, (libc.Bool32(int32(*(*uint8)(unsafe.Pointer(zSuper))) != 0)), 0)
__25:
;
- if !(((rc == SQLITE_OK) && (*(*int8)(unsafe.Pointer(zSuper)) != 0)) && (*(*int32)(unsafe.Pointer(bp + 24 /* res */)) != 0)) {
+ if !(((rc == SQLITE_OK) && (*(*uint8)(unsafe.Pointer(zSuper)) != 0)) && (*(*int32)(unsafe.Pointer(bp + 24 /* res */)) != 0)) {
goto __26
}
// If there was a super-journal and this routine will return success,
@@ -31818,7 +33676,7 @@ __26:
if !((isHot != 0) && (nPlayback != 0)) {
goto __27
}
- Xsqlite3_log(tls, (SQLITE_NOTICE | (int32(2) << 8)), ts+2890, /* "recovered %d pag..." */
+ Xsqlite3_log(tls, (SQLITE_NOTICE | (int32(2) << 8)), ts+3021, /* "recovered %d pag..." */
libc.VaList(bp, nPlayback, (*Pager)(unsafe.Pointer(pPager)).FzJournal))
__27:
;
@@ -31840,7 +33698,7 @@ __27:
//
// If an IO error occurs, then the IO error is returned to the caller.
// Otherwise, SQLITE_OK is returned.
-func readDbPage(tls *libc.TLS, pPg uintptr) int32 { /* sqlite3.c:55109:12: */
+func readDbPage(tls *libc.TLS, pPg uintptr) int32 { /* sqlite3.c:55605:12: */
bp := tls.Alloc(4)
defer tls.Free(4)
@@ -31878,10 +33736,10 @@ func readDbPage(tls *libc.TLS, pPg uintptr) int32 { /* sqlite3.c:55109:12: */
// 24..39 of the database are white noise. But the probability of
// white noise equaling 16 bytes of 0xff is vanishingly small so
// we should still be ok.
- libc.Xmemset(tls, pPager+136 /* &.dbFileVers */, 0xff, uint64(unsafe.Sizeof([16]int8{})))
+ libc.Xmemset(tls, pPager+136 /* &.dbFileVers */, 0xff, uint64(unsafe.Sizeof([16]uint8{})))
} else {
var dbFileVers uintptr = (((*PgHdr)(unsafe.Pointer(pPg)).FpData) + 24)
- libc.Xmemcpy(tls, (pPager + 136 /* &.dbFileVers */), dbFileVers, uint64(unsafe.Sizeof([16]int8{})))
+ libc.Xmemcpy(tls, (pPager + 136 /* &.dbFileVers */), dbFileVers, uint64(unsafe.Sizeof([16]uint8{})))
}
}
@@ -31894,7 +33752,7 @@ func readDbPage(tls *libc.TLS, pPg uintptr) int32 { /* sqlite3.c:55109:12: */
// This is an unconditional update. See also the pager_incr_changecounter()
// routine which only updates the change-counter if the update is actually
// needed, as determined by the pPager->changeCountDone state variable.
-func pager_write_changecounter(tls *libc.TLS, pPg uintptr) { /* sqlite3.c:55172:13: */
+func pager_write_changecounter(tls *libc.TLS, pPg uintptr) { /* sqlite3.c:55668:13: */
var change_counter U32
// Increment the value just read and write it back to byte 24.
@@ -31918,7 +33776,7 @@ func pager_write_changecounter(tls *libc.TLS, pPg uintptr) { /* sqlite3.c:55172:
// references, the page content is reloaded from the database. If the
// attempt to reload content from the database is required and fails,
// return an SQLite error code. Otherwise, SQLITE_OK.
-func pagerUndoCallback(tls *libc.TLS, pCtx uintptr, iPg Pgno) int32 { /* sqlite3.c:55199:12: */
+func pagerUndoCallback(tls *libc.TLS, pCtx uintptr, iPg Pgno) int32 { /* sqlite3.c:55695:12: */
var rc int32 = SQLITE_OK
var pPager uintptr = pCtx
var pPg uintptr
@@ -31930,7 +33788,7 @@ func pagerUndoCallback(tls *libc.TLS, pCtx uintptr, iPg Pgno) int32 { /* sqlite3
} else {
rc = readDbPage(tls, pPg)
if rc == SQLITE_OK {
- (*(*func(*libc.TLS, uintptr))(unsafe.Pointer((pPager + 256 /* &.xReiniter */))))(tls, pPg)
+ (*struct{ f func(*libc.TLS, uintptr) })(unsafe.Pointer(&struct{ uintptr }{(*Pager)(unsafe.Pointer(pPager)).FxReiniter})).f(tls, pPg)
}
Xsqlite3PagerUnrefNotNull(tls, pPg)
}
@@ -31949,7 +33807,7 @@ func pagerUndoCallback(tls *libc.TLS, pCtx uintptr, iPg Pgno) int32 { /* sqlite3
}
// This function is called to rollback a transaction on a WAL database.
-func pagerRollbackWal(tls *libc.TLS, pPager uintptr) int32 { /* sqlite3.c:55234:12: */
+func pagerRollbackWal(tls *libc.TLS, pPager uintptr) int32 { /* sqlite3.c:55730:12: */
var rc int32 // Return Code
var pList uintptr // List of dirty pages to revert
@@ -31980,7 +33838,7 @@ func pagerRollbackWal(tls *libc.TLS, pPager uintptr) int32 { /* sqlite3.c:55234:
//
// The list of pages passed into this routine is always sorted by page number.
// Hence, if page 1 appears anywhere on the list, it will be the first page.
-func pagerWalFrames(tls *libc.TLS, pPager uintptr, pList uintptr, nTruncate Pgno, isCommit int32) int32 { /* sqlite3.c:55266:12: */
+func pagerWalFrames(tls *libc.TLS, pPager uintptr, pList uintptr, nTruncate Pgno, isCommit int32) int32 { /* sqlite3.c:55762:12: */
bp := tls.Alloc(8)
defer tls.Free(8)
*(*uintptr)(unsafe.Pointer(bp)) = pList
@@ -32028,7 +33886,7 @@ func pagerWalFrames(tls *libc.TLS, pPager uintptr, pList uintptr, nTruncate Pgno
// makes a snapshot of the database at the current point in time and preserves
// that snapshot for use by the reader in spite of concurrently changes by
// other writers or checkpointers.
-func pagerBeginReadTransaction(tls *libc.TLS, pPager uintptr) int32 { /* sqlite3.c:55333:12: */
+func pagerBeginReadTransaction(tls *libc.TLS, pPager uintptr) int32 { /* sqlite3.c:55829:12: */
bp := tls.Alloc(4)
defer tls.Free(4)
@@ -32059,7 +33917,7 @@ func pagerBeginReadTransaction(tls *libc.TLS, pPager uintptr) int32 { /* sqlite3
// If no error occurs, SQLITE_OK is returned and the size of the database
// in pages is stored in *pnPage. Otherwise, an error code (perhaps
// SQLITE_IOERR_FSTAT) is returned and *pnPage is left unmodified.
-func pagerPagecount(tls *libc.TLS, pPager uintptr, pnPage uintptr) int32 { /* sqlite3.c:55366:12: */
+func pagerPagecount(tls *libc.TLS, pPager uintptr, pnPage uintptr) int32 { /* sqlite3.c:55862:12: */
bp := tls.Alloc(8)
defer tls.Free(8)
@@ -32113,7 +33971,7 @@ func pagerPagecount(tls *libc.TLS, pPager uintptr, pnPage uintptr) int32 { /* sq
// a WAL on a none-empty database, this ensures there is no race condition
// between the xAccess() below and an xDelete() being executed by some
// other connection.
-func pagerOpenWalIfPresent(tls *libc.TLS, pPager uintptr) int32 { /* sqlite3.c:55426:12: */
+func pagerOpenWalIfPresent(tls *libc.TLS, pPager uintptr) int32 { /* sqlite3.c:55922:12: */
bp := tls.Alloc(8)
defer tls.Free(8)
@@ -32181,7 +34039,7 @@ func pagerOpenWalIfPresent(tls *libc.TLS, pPager uintptr) int32 { /* sqlite3.c:5
// is reset to the value that it held at the start of the savepoint
// (or transaction). No page with a page-number greater than this value
// is played back. If one is encountered it is simply skipped.
-func pagerPlaybackSavepoint(tls *libc.TLS, pPager uintptr, pSavepoint uintptr) int32 { /* sqlite3.c:55493:12: */
+func pagerPlaybackSavepoint(tls *libc.TLS, pPager uintptr, pSavepoint uintptr) int32 { /* sqlite3.c:55989:12: */
bp := tls.Alloc(16)
defer tls.Free(16)
@@ -32290,18 +34148,18 @@ func pagerPlaybackSavepoint(tls *libc.TLS, pPager uintptr, pSavepoint uintptr) i
// Change the maximum number of in-memory pages that are allowed
// before attempting to recycle clean and unused pages.
-func Xsqlite3PagerSetCachesize(tls *libc.TLS, pPager uintptr, mxPage int32) { /* sqlite3.c:55605:21: */
+func Xsqlite3PagerSetCachesize(tls *libc.TLS, pPager uintptr, mxPage int32) { /* sqlite3.c:56101:21: */
Xsqlite3PcacheSetCachesize(tls, (*Pager)(unsafe.Pointer(pPager)).FpPCache, mxPage)
}
// Change the maximum number of in-memory pages that are allowed
// before attempting to spill pages to journal.
-func Xsqlite3PagerSetSpillsize(tls *libc.TLS, pPager uintptr, mxPage int32) int32 { /* sqlite3.c:55613:20: */
+func Xsqlite3PagerSetSpillsize(tls *libc.TLS, pPager uintptr, mxPage int32) int32 { /* sqlite3.c:56109:20: */
return Xsqlite3PcacheSetSpillsize(tls, (*Pager)(unsafe.Pointer(pPager)).FpPCache, mxPage)
}
// Invoke SQLITE_FCNTL_MMAP_SIZE based on the current value of szMmap.
-func pagerFixMaplimit(tls *libc.TLS, pPager uintptr) { /* sqlite3.c:55620:13: */
+func pagerFixMaplimit(tls *libc.TLS, pPager uintptr) { /* sqlite3.c:56116:13: */
bp := tls.Alloc(8)
defer tls.Free(8)
@@ -32317,13 +34175,13 @@ func pagerFixMaplimit(tls *libc.TLS, pPager uintptr) { /* sqlite3.c:55620:13: */
}
// Change the maximum size of any memory mapping made of the database file.
-func Xsqlite3PagerSetMmapLimit(tls *libc.TLS, pPager uintptr, szMmap Sqlite3_int64) { /* sqlite3.c:55636:21: */
+func Xsqlite3PagerSetMmapLimit(tls *libc.TLS, pPager uintptr, szMmap Sqlite3_int64) { /* sqlite3.c:56132:21: */
(*Pager)(unsafe.Pointer(pPager)).FszMmap = szMmap
pagerFixMaplimit(tls, pPager)
}
// Free as much memory as possible from the pager.
-func Xsqlite3PagerShrink(tls *libc.TLS, pPager uintptr) { /* sqlite3.c:55644:21: */
+func Xsqlite3PagerShrink(tls *libc.TLS, pPager uintptr) { /* sqlite3.c:56140:21: */
Xsqlite3PcacheShrink(tls, (*Pager)(unsafe.Pointer(pPager)).FpPCache)
}
@@ -32376,7 +34234,7 @@ func Xsqlite3PagerShrink(tls *libc.TLS, pPager uintptr) { /* sqlite3.c:55644:21:
//
// Numeric values associated with these states are OFF==1, NORMAL=2,
// and FULL=3.
-func Xsqlite3PagerSetFlags(tls *libc.TLS, pPager uintptr, pgFlags uint32) { /* sqlite3.c:55700:21: */
+func Xsqlite3PagerSetFlags(tls *libc.TLS, pPager uintptr, pgFlags uint32) { /* sqlite3.c:56196:21: */
var level uint32 = (pgFlags & uint32(PAGER_SYNCHRONOUS_MASK))
if (*Pager)(unsafe.Pointer(pPager)).FtempFile != 0 {
(*Pager)(unsafe.Pointer(pPager)).FnoSync = U8(1)
@@ -32440,7 +34298,7 @@ func Xsqlite3PagerSetFlags(tls *libc.TLS, pPager uintptr, pgFlags uint32) { /* s
// SQLITE_OPEN_CREATE
// SQLITE_OPEN_EXCLUSIVE
// SQLITE_OPEN_DELETEONCLOSE
-func pagerOpentemp(tls *libc.TLS, pPager uintptr, pFile uintptr, vfsFlags int32) int32 { /* sqlite3.c:55760:12: */
+func pagerOpentemp(tls *libc.TLS, pPager uintptr, pFile uintptr, vfsFlags int32) int32 { /* sqlite3.c:56256:12: */
var rc int32 // Return code
vfsFlags = vfsFlags | (((SQLITE_OPEN_READWRITE | SQLITE_OPEN_CREATE) | SQLITE_OPEN_EXCLUSIVE) | SQLITE_OPEN_DELETEONCLOSE)
@@ -32468,7 +34326,7 @@ func pagerOpentemp(tls *libc.TLS, pPager uintptr, pFile uintptr, vfsFlags int32)
// If the busy-handler callback returns non-zero, the lock is
// retried. If it returns zero, then the SQLITE_BUSY error is
// returned to the caller of the pager API function.
-func Xsqlite3PagerSetBusyHandler(tls *libc.TLS, pPager uintptr, xBusyHandler uintptr, pBusyHandlerArg uintptr) { /* sqlite3.c:55799:21: */
+func Xsqlite3PagerSetBusyHandler(tls *libc.TLS, pPager uintptr, xBusyHandler uintptr, pBusyHandlerArg uintptr) { /* sqlite3.c:56295:21: */
var ap uintptr
(*Pager)(unsafe.Pointer(pPager)).FxBusyHandler = xBusyHandler
(*Pager)(unsafe.Pointer(pPager)).FpBusyHandlerArg = pBusyHandlerArg
@@ -32505,7 +34363,7 @@ func Xsqlite3PagerSetBusyHandler(tls *libc.TLS, pPager uintptr, xBusyHandler uin
// conditions above is not true, the pager was in error state when this
// function was called, or because the memory allocation attempt failed,
// then *pPageSize is set to the old, retained page size before returning.
-func Xsqlite3PagerSetPagesize(tls *libc.TLS, pPager uintptr, pPageSize uintptr, nReserve int32) int32 { /* sqlite3.c:55843:20: */
+func Xsqlite3PagerSetPagesize(tls *libc.TLS, pPager uintptr, pPageSize uintptr, nReserve int32) int32 { /* sqlite3.c:56339:20: */
bp := tls.Alloc(8)
defer tls.Free(8)
@@ -32574,7 +34432,7 @@ func Xsqlite3PagerSetPagesize(tls *libc.TLS, pPager uintptr, pPageSize uintptr,
// during rollback and will be overwritten whenever a rollback
// occurs. But other modules are free to use it too, as long as
// no rollbacks are happening.
-func Xsqlite3PagerTempSpace(tls *libc.TLS, pPager uintptr) uintptr { /* sqlite3.c:55911:21: */
+func Xsqlite3PagerTempSpace(tls *libc.TLS, pPager uintptr) uintptr { /* sqlite3.c:56407:21: */
return (*Pager)(unsafe.Pointer(pPager)).FpTmpSpace
}
@@ -32583,7 +34441,7 @@ func Xsqlite3PagerTempSpace(tls *libc.TLS, pPager uintptr) uintptr { /* sqlite3.
// maximum page count below the current size of the database.
//
// Regardless of mxPage, return the current maximum page count.
-func Xsqlite3PagerMaxPageCount(tls *libc.TLS, pPager uintptr, mxPage Pgno) Pgno { /* sqlite3.c:55922:21: */
+func Xsqlite3PagerMaxPageCount(tls *libc.TLS, pPager uintptr, mxPage Pgno) Pgno { /* sqlite3.c:56418:21: */
if mxPage > Pgno(0) {
(*Pager)(unsafe.Pointer(pPager)).FmxPgno = mxPage
}
@@ -32614,7 +34472,7 @@ func Xsqlite3PagerMaxPageCount(tls *libc.TLS, pPager uintptr, mxPage Pgno) Pgno
// If any IO error apart from SQLITE_IOERR_SHORT_READ is encountered,
// the error code is returned to the caller and the contents of the
// output buffer undefined.
-func Xsqlite3PagerReadFileheader(tls *libc.TLS, pPager uintptr, N int32, pDest uintptr) int32 { /* sqlite3.c:55972:20: */
+func Xsqlite3PagerReadFileheader(tls *libc.TLS, pPager uintptr, N int32, pDest uintptr) int32 { /* sqlite3.c:56468:20: */
var rc int32 = SQLITE_OK
libc.Xmemset(tls, pDest, 0, uint64(N))
@@ -32637,7 +34495,7 @@ func Xsqlite3PagerReadFileheader(tls *libc.TLS, pPager uintptr, N int32, pDest u
//
// However, if the file is between 1 and bytes in size, then
// this is considered a 1 page file.
-func Xsqlite3PagerPagecount(tls *libc.TLS, pPager uintptr, pnPage uintptr) { /* sqlite3.c:56000:21: */
+func Xsqlite3PagerPagecount(tls *libc.TLS, pPager uintptr, pnPage uintptr) { /* sqlite3.c:56496:21: */
*(*int32)(unsafe.Pointer(pnPage)) = int32((*Pager)(unsafe.Pointer(pPager)).FdbSize)
}
@@ -32654,7 +34512,7 @@ func Xsqlite3PagerPagecount(tls *libc.TLS, pPager uintptr, pnPage uintptr) { /*
// Return SQLITE_OK on success and an error code if we cannot obtain
// the lock. If the lock is obtained successfully, set the Pager.state
// variable to locktype before returning.
-func pager_wait_on_lock(tls *libc.TLS, pPager uintptr, locktype int32) int32 { /* sqlite3.c:56021:12: */
+func pager_wait_on_lock(tls *libc.TLS, pPager uintptr, locktype int32) int32 { /* sqlite3.c:56517:12: */
var rc int32 // Return code
// Check that this is either a no-op (because the requested lock is
@@ -32662,7 +34520,9 @@ func pager_wait_on_lock(tls *libc.TLS, pPager uintptr, locktype int32) int32 { /
// may be invoked during, according to the comment above
// sqlite3PagerSetBusyhandler().
- for ok := true; ok; ok = ((rc == SQLITE_BUSY) && ((*(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer((pPager + 224 /* &.xBusyHandler */))))(tls, (*Pager)(unsafe.Pointer(pPager)).FpBusyHandlerArg) != 0)) {
+ for ok := true; ok; ok = ((rc == SQLITE_BUSY) && ((*struct {
+ f func(*libc.TLS, uintptr) int32
+ })(unsafe.Pointer(&struct{ uintptr }{(*Pager)(unsafe.Pointer(pPager)).FxBusyHandler})).f(tls, (*Pager)(unsafe.Pointer(pPager)).FpBusyHandlerArg) != 0)) {
rc = pagerLockDb(tls, pPager, locktype)
}
return rc
@@ -32698,7 +34558,7 @@ func pager_wait_on_lock(tls *libc.TLS, pPager uintptr, locktype int32) int32 { /
// Once this function has been called, the transaction must either be
// rolled back or committed. It is not safe to call this function and
// then continue writing to the database.
-func Xsqlite3PagerTruncateImage(tls *libc.TLS, pPager uintptr, nPage Pgno) { /* sqlite3.c:56085:21: */
+func Xsqlite3PagerTruncateImage(tls *libc.TLS, pPager uintptr, nPage Pgno) { /* sqlite3.c:56581:21: */
(*Pager)(unsafe.Pointer(pPager)).FdbSize = nPage
@@ -32725,7 +34585,7 @@ func Xsqlite3PagerTruncateImage(tls *libc.TLS, pPager uintptr, nPage Pgno) { /*
//
// If everything goes as planned, SQLITE_OK is returned. Otherwise,
// an SQLite error code.
-func pagerSyncHotJournal(tls *libc.TLS, pPager uintptr) int32 { /* sqlite3.c:56116:12: */
+func pagerSyncHotJournal(tls *libc.TLS, pPager uintptr) int32 { /* sqlite3.c:56613:12: */
var rc int32 = SQLITE_OK
if !(int32((*Pager)(unsafe.Pointer(pPager)).FnoSync) != 0) {
rc = Xsqlite3OsSync(tls, (*Pager)(unsafe.Pointer(pPager)).Fjfd, SQLITE_SYNC_NORMAL)
@@ -32744,7 +34604,7 @@ func pagerSyncHotJournal(tls *libc.TLS, pPager uintptr) int32 { /* sqlite3.c:561
//
// Page references obtained by calling this function should be released
// by calling pagerReleaseMapPage().
-func pagerAcquireMapPage(tls *libc.TLS, pPager uintptr, pgno Pgno, pData uintptr, ppPage uintptr) int32 { /* sqlite3.c:56138:12: */
+func pagerAcquireMapPage(tls *libc.TLS, pPager uintptr, pgno Pgno, pData uintptr, ppPage uintptr) int32 { /* sqlite3.c:56635:12: */
var p uintptr // Memory mapped page to return
if (*Pager)(unsafe.Pointer(pPager)).FpMmapFreelist != 0 {
@@ -32774,7 +34634,7 @@ func pagerAcquireMapPage(tls *libc.TLS, pPager uintptr, pgno Pgno, pData uintptr
// Release a reference to page pPg. pPg must have been returned by an
// earlier call to pagerAcquireMapPage().
-func pagerReleaseMapPage(tls *libc.TLS, pPg uintptr) { /* sqlite3.c:56182:13: */
+func pagerReleaseMapPage(tls *libc.TLS, pPg uintptr) { /* sqlite3.c:56679:13: */
var pPager uintptr = (*PgHdr)(unsafe.Pointer(pPg)).FpPager
(*Pager)(unsafe.Pointer(pPager)).FnMmapOut--
(*PgHdr)(unsafe.Pointer(pPg)).FpDirty = (*Pager)(unsafe.Pointer(pPager)).FpMmapFreelist
@@ -32784,7 +34644,7 @@ func pagerReleaseMapPage(tls *libc.TLS, pPg uintptr) { /* sqlite3.c:56182:13: */
}
// Free all PgHdr objects stored in the Pager.pMmapFreelist list.
-func pagerFreeMapHdrs(tls *libc.TLS, pPager uintptr) { /* sqlite3.c:56195:13: */
+func pagerFreeMapHdrs(tls *libc.TLS, pPager uintptr) { /* sqlite3.c:56692:13: */
var p uintptr
var pNext uintptr
for p = (*Pager)(unsafe.Pointer(pPager)).FpMmapFreelist; p != 0; p = pNext {
@@ -32797,7 +34657,7 @@ func pagerFreeMapHdrs(tls *libc.TLS, pPager uintptr) { /* sqlite3.c:56195:13: */
// under the pager. Return SQLITE_OK if the database is still where it ought
// to be on disk. Return non-zero (SQLITE_READONLY_DBMOVED or some other error
// code from sqlite3OsAccess()) if the database has gone missing.
-func databaseIsUnmoved(tls *libc.TLS, pPager uintptr) int32 { /* sqlite3.c:56209:12: */
+func databaseIsUnmoved(tls *libc.TLS, pPager uintptr) int32 { /* sqlite3.c:56706:12: */
bp := tls.Alloc(4)
defer tls.Free(4)
@@ -32835,7 +34695,7 @@ func databaseIsUnmoved(tls *libc.TLS, pPager uintptr) int32 { /* sqlite3.c:56209
// is made to roll it back. If an error occurs during the rollback
// a hot journal may be left in the filesystem but no error is returned
// to the caller.
-func Xsqlite3PagerClose(tls *libc.TLS, pPager uintptr, db uintptr) int32 { /* sqlite3.c:56243:20: */
+func Xsqlite3PagerClose(tls *libc.TLS, pPager uintptr, db uintptr) int32 { /* sqlite3.c:56740:20: */
var pTmp uintptr = (*Pager)(unsafe.Pointer(pPager)).FpTmpSpace
Xsqlite3BeginBenignMalloc(tls)
@@ -32884,7 +34744,7 @@ func Xsqlite3PagerClose(tls *libc.TLS, pPager uintptr, db uintptr) int32 { /* sq
}
// Increment the reference count for page pPg.
-func Xsqlite3PagerRef(tls *libc.TLS, pPg uintptr) { /* sqlite3.c:56312:21: */
+func Xsqlite3PagerRef(tls *libc.TLS, pPg uintptr) { /* sqlite3.c:56809:21: */
Xsqlite3PcacheRef(tls, pPg)
}
@@ -32921,7 +34781,7 @@ func Xsqlite3PagerRef(tls *libc.TLS, pPg uintptr) { /* sqlite3.c:56312:21: */
// If successful, this routine clears the PGHDR_NEED_SYNC flag of every
// page currently held in memory before returning SQLITE_OK. If an IO
// error is encountered, then the IO error code is returned to the caller.
-func syncJournal(tls *libc.TLS, pPager uintptr, newHdr int32) int32 { /* sqlite3.c:56351:12: */
+func syncJournal(tls *libc.TLS, pPager uintptr, newHdr int32) int32 { /* sqlite3.c:56848:12: */
bp := tls.Alloc(20)
defer tls.Free(20)
@@ -33035,7 +34895,7 @@ func syncJournal(tls *libc.TLS, pPager uintptr, newHdr int32) int32 { /* sqlite3
return SQLITE_OK
}
-var zerobyte U8 = U8(0) /* sqlite3.c:56402:27 */
+var zerobyte U8 = U8(0) /* sqlite3.c:56899:27 */
// The argument is the first in a linked list of dirty pages connected
// by the PgHdr.pDirty pointer. This function writes each one of the
@@ -33067,7 +34927,7 @@ var zerobyte U8 = U8(0) /* sqlite3.c:56402:27 */
// If everything is successful, SQLITE_OK is returned. If an IO error
// occurs, an IO error code is returned. Or, if the EXCLUSIVE lock cannot
// be obtained, SQLITE_BUSY is returned.
-func pager_write_pagelist(tls *libc.TLS, pPager uintptr, pList uintptr) int32 { /* sqlite3.c:56494:12: */
+func pager_write_pagelist(tls *libc.TLS, pPager uintptr, pList uintptr) int32 { /* sqlite3.c:56991:12: */
bp := tls.Alloc(8)
defer tls.Free(8)
@@ -33121,7 +34981,7 @@ func pager_write_pagelist(tls *libc.TLS, pPager uintptr, pList uintptr) int32 {
// the value now stored in the database file. If writing this
// page caused the database file to grow, update dbFileSize.
if pgno == Pgno(1) {
- libc.Xmemcpy(tls, (pPager + 136 /* &.dbFileVers */), (pData + 24), uint64(unsafe.Sizeof([16]int8{})))
+ libc.Xmemcpy(tls, (pPager + 136 /* &.dbFileVers */), (pData + 24), uint64(unsafe.Sizeof([16]uint8{})))
}
if pgno > (*Pager)(unsafe.Pointer(pPager)).FdbFileSize {
(*Pager)(unsafe.Pointer(pPager)).FdbFileSize = pgno
@@ -33147,7 +35007,7 @@ func pager_write_pagelist(tls *libc.TLS, pPager uintptr, pList uintptr) int32 {
// SQLITE_OK is returned if everything goes according to plan. An
// SQLITE_IOERR_XXX error code is returned if a call to sqlite3OsOpen()
// fails.
-func openSubJournal(tls *libc.TLS, pPager uintptr) int32 { /* sqlite3.c:56585:12: */
+func openSubJournal(tls *libc.TLS, pPager uintptr) int32 { /* sqlite3.c:57082:12: */
var rc int32 = SQLITE_OK
if !((*Sqlite3_file)(unsafe.Pointer(((*Pager)(unsafe.Pointer(pPager)).Fsjfd))).FpMethods != uintptr(0)) {
var flags int32 = ((((SQLITE_OPEN_SUBJOURNAL | SQLITE_OPEN_READWRITE) |
@@ -33171,7 +35031,7 @@ func openSubJournal(tls *libc.TLS, pPager uintptr) int32 { /* sqlite3.c:56585:12
// error code if the attempt to write to the sub-journal fails, or
// SQLITE_NOMEM if a malloc fails while setting a bit in a savepoint
// bitvec.
-func subjournalPage(tls *libc.TLS, pPg uintptr) int32 { /* sqlite3.c:56611:12: */
+func subjournalPage(tls *libc.TLS, pPg uintptr) int32 { /* sqlite3.c:57108:12: */
var rc int32 = SQLITE_OK
var pPager uintptr = (*PgHdr)(unsafe.Pointer(pPg)).FpPager
if int32((*Pager)(unsafe.Pointer(pPager)).FjournalMode) != PAGER_JOURNALMODE_OFF {
@@ -33202,7 +35062,7 @@ func subjournalPage(tls *libc.TLS, pPg uintptr) int32 { /* sqlite3.c:56611:12: *
return rc
}
-func subjournalPageIfRequired(tls *libc.TLS, pPg uintptr) int32 { /* sqlite3.c:56647:12: */
+func subjournalPageIfRequired(tls *libc.TLS, pPg uintptr) int32 { /* sqlite3.c:57144:12: */
if subjRequiresPage(tls, pPg) != 0 {
return subjournalPage(tls, pPg)
} else {
@@ -33228,7 +35088,7 @@ func subjournalPageIfRequired(tls *libc.TLS, pPg uintptr) int32 { /* sqlite3.c:5
// page clean, the IO error code is returned. If the page cannot be
// made clean for some other reason, but no error occurs, then SQLITE_OK
// is returned by sqlite3PcacheMakeClean() is not called.
-func pagerStress(tls *libc.TLS, p uintptr, pPg uintptr) int32 { /* sqlite3.c:56674:12: */
+func pagerStress(tls *libc.TLS, p uintptr, pPg uintptr) int32 { /* sqlite3.c:57171:12: */
var pPager uintptr = p
var rc int32 = SQLITE_OK
@@ -33290,7 +35150,7 @@ func pagerStress(tls *libc.TLS, p uintptr, pPg uintptr) int32 { /* sqlite3.c:566
}
// Flush all unreferenced dirty pages to disk.
-func Xsqlite3PagerFlush(tls *libc.TLS, pPager uintptr) int32 { /* sqlite3.c:56751:20: */
+func Xsqlite3PagerFlush(tls *libc.TLS, pPager uintptr) int32 { /* sqlite3.c:57248:20: */
var rc int32 = (*Pager)(unsafe.Pointer(pPager)).FerrCode
if !(int32((*Pager)(unsafe.Pointer(pPager)).FmemDb) != 0) {
var pList uintptr = Xsqlite3PcacheDirtyList(tls, (*Pager)(unsafe.Pointer(pPager)).FpPCache)
@@ -33337,7 +35197,7 @@ func Xsqlite3PagerFlush(tls *libc.TLS, pPager uintptr) int32 { /* sqlite3.c:5675
// and error code returned. This function may return SQLITE_NOMEM
// (sqlite3Malloc() is used to allocate memory), SQLITE_CANTOPEN or
// various SQLITE_IO_XXX errors.
-func Xsqlite3PagerOpen(tls *libc.TLS, pVfs uintptr, ppPager uintptr, zFilename uintptr, nExtra int32, flags int32, vfsFlags int32, xReinit uintptr) int32 { /* sqlite3.c:56800:20: */
+func Xsqlite3PagerOpen(tls *libc.TLS, pVfs uintptr, ppPager uintptr, zFilename uintptr, nExtra int32, flags int32, vfsFlags int32, xReinit uintptr) int32 { /* sqlite3.c:57297:20: */
bp := tls.Alloc(16)
defer tls.Free(16)
@@ -33347,6 +35207,7 @@ func Xsqlite3PagerOpen(tls *libc.TLS, pVfs uintptr, ppPager uintptr, zFilename u
var rc int32 // Return code
var tempFile int32 // True for temp files (incl. in-memory files)
var memDb int32 // True if this is an in-memory file
+ var memJM int32 // Memory journal mode
var readOnly int32 // True if this is a read-only file
var journalFileSize int32 // Bytes to allocate for each journal fd
var zPathname uintptr // Full path to database file
@@ -33365,6 +35226,7 @@ func Xsqlite3PagerOpen(tls *libc.TLS, pVfs uintptr, ppPager uintptr, zFilename u
rc = SQLITE_OK
tempFile = 0
memDb = 0
+ memJM = 0
readOnly = 0
zPathname = uintptr(0)
nPathname = 0
@@ -33386,7 +35248,7 @@ func Xsqlite3PagerOpen(tls *libc.TLS, pVfs uintptr, ppPager uintptr, zFilename u
goto __1
}
memDb = 1
- if !((zFilename != 0) && (*(*int8)(unsafe.Pointer(zFilename)) != 0)) {
+ if !((zFilename != 0) && (*(*uint8)(unsafe.Pointer(zFilename)) != 0)) {
goto __2
}
zPathname = Xsqlite3DbStrDup(tls, uintptr(0), zFilename)
@@ -33406,7 +35268,7 @@ __1:
// Compute and store the full pathname in an allocated buffer pointed
// to by zPathname, length nPathname. Or, if this is a temporary file,
// leave both nPathname and zPathname set to 0.
- if !((zFilename != 0) && (*(*int8)(unsafe.Pointer(zFilename)) != 0)) {
+ if !((zFilename != 0) && (*(*uint8)(unsafe.Pointer(zFilename)) != 0)) {
goto __4
}
nPathname = ((*Sqlite3_vfs)(unsafe.Pointer(pVfs)).FmxPathname + 1)
@@ -33417,7 +35279,7 @@ __1:
return SQLITE_NOMEM
__5:
;
- *(*int8)(unsafe.Pointer(zPathname)) = int8(0) // Make sure initialized even if FullPathname() fails
+ *(*uint8)(unsafe.Pointer(zPathname)) = uint8(0) // Make sure initialized even if FullPathname() fails
rc = Xsqlite3OsFullPathname(tls, pVfs, zFilename, nPathname, zPathname)
if !(rc != SQLITE_OK) {
goto __6
@@ -33441,7 +35303,7 @@ __6:
nPathname = Xsqlite3Strlen30(tls, zPathname)
z = libc.AssignUintptr(&zUri, (zFilename + uintptr((Xsqlite3Strlen30(tls, zFilename) + 1))))
__10:
- if !(*(*int8)(unsafe.Pointer(z)) != 0) {
+ if !(*(*uint8)(unsafe.Pointer(z)) != 0) {
goto __11
}
z += (uintptr(libc.Xstrlen(tls, z) + uint64(1)))
@@ -33460,7 +35322,7 @@ __11:
// bytes in length. This means the database cannot be opened,
// as it will not be possible to open the journal file or even
// check for a hot-journal before reading.
- rc = Xsqlite3CantopenError(tls, 56887)
+ rc = Xsqlite3CantopenError(tls, 57384)
__12:
;
if !(rc != SQLITE_OK) {
@@ -33568,7 +35430,7 @@ __15:
(*Pager)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp /* pPager */)))).FzJournal = pPtr
libc.Xmemcpy(tls, pPtr, zPathname, uint64(nPathname))
pPtr += uintptr(nPathname)
- libc.Xmemcpy(tls, pPtr, ts+2917 /* "-journal" */, uint64(8))
+ libc.Xmemcpy(tls, pPtr, ts+3048 /* "-journal" */, uint64(8))
pPtr += (uintptr(8 + 1))
goto __19
__18:
@@ -33583,7 +35445,7 @@ __19:
(*Pager)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp /* pPager */)))).FzWal = pPtr
libc.Xmemcpy(tls, pPtr, zPathname, uint64(nPathname))
pPtr += uintptr(nPathname)
- libc.Xmemcpy(tls, pPtr, ts+2926 /* "-wal" */, uint64(4))
+ libc.Xmemcpy(tls, pPtr, ts+3057 /* "-wal" */, uint64(4))
pPtr += (uintptr(4 + 1))
goto __21
__20:
@@ -33601,12 +35463,13 @@ __22:
(*Pager)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp /* pPager */)))).FvfsFlags = U32(vfsFlags)
// Open the pager file.
- if !((zFilename != 0) && (*(*int8)(unsafe.Pointer(zFilename)) != 0)) {
+ if !((zFilename != 0) && (*(*uint8)(unsafe.Pointer(zFilename)) != 0)) {
goto __23
}
*(*int32)(unsafe.Pointer(bp + 8 /* fout */)) = 0 // VFS flags returned by xOpen()
rc = Xsqlite3OsOpen(tls, pVfs, (*Pager)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp /* pPager */)))).FzFilename, (*Pager)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp /* pPager */)))).Ffd, vfsFlags, bp+8 /* &fout */)
+ memJM = (libc.Bool32((*(*int32)(unsafe.Pointer(bp + 8 /* fout */)) & SQLITE_OPEN_MEMORY) != 0))
readOnly = (libc.Bool32((*(*int32)(unsafe.Pointer(bp + 8 /* fout */)) & SQLITE_OPEN_READONLY) != 0))
// If the file was successfully opened for read/write access,
@@ -33641,9 +35504,9 @@ __27:
;
__26:
;
- (*Pager)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp /* pPager */)))).FnoLock = U8(Xsqlite3_uri_boolean(tls, (*Pager)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp /* pPager */)))).FzFilename, ts+2931 /* "nolock" */, 0))
+ (*Pager)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp /* pPager */)))).FnoLock = U8(Xsqlite3_uri_boolean(tls, (*Pager)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp /* pPager */)))).FzFilename, ts+3062 /* "nolock" */, 0))
if !(((iDc & SQLITE_IOCAP_IMMUTABLE) != 0) ||
- (Xsqlite3_uri_boolean(tls, (*Pager)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp /* pPager */)))).FzFilename, ts+2938 /* "immutable" */, 0) != 0)) {
+ (Xsqlite3_uri_boolean(tls, (*Pager)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp /* pPager */)))).FzFilename, ts+3069 /* "immutable" */, 0) != 0)) {
goto __30
}
vfsFlags = vfsFlags | (SQLITE_OPEN_READONLY)
@@ -33755,7 +35618,7 @@ __35:
(*Pager)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp /* pPager */)))).FjournalMode = U8(PAGER_JOURNALMODE_OFF)
goto __37
__36:
- if !((memDb != 0) || (0 != 0)) {
+ if !((memDb != 0) || (memJM != 0)) {
goto __38
}
(*Pager)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp /* pPager */)))).FjournalMode = U8(PAGER_JOURNALMODE_MEMORY)
@@ -33777,9 +35640,9 @@ __37:
// Return the sqlite3_file for the main database given the name
// of the corresonding WAL or Journal name as passed into
// xOpen.
-func Xsqlite3_database_file_object(tls *libc.TLS, zName uintptr) uintptr { /* sqlite3.c:57171:25: */
+func Xsqlite3_database_file_object(tls *libc.TLS, zName uintptr) uintptr { /* sqlite3.c:57668:25: */
var pPager uintptr
- for (((int32(*(*int8)(unsafe.Pointer(zName + libc.UintptrFromInt32(-1)))) != 0) || (int32(*(*int8)(unsafe.Pointer(zName + libc.UintptrFromInt32(-2)))) != 0)) || (int32(*(*int8)(unsafe.Pointer(zName + libc.UintptrFromInt32(-3)))) != 0)) || (int32(*(*int8)(unsafe.Pointer(zName + libc.UintptrFromInt32(-4)))) != 0) {
+ for (((int32(*(*uint8)(unsafe.Pointer(zName + libc.UintptrFromInt32(-1)))) != 0) || (int32(*(*uint8)(unsafe.Pointer(zName + libc.UintptrFromInt32(-2)))) != 0)) || (int32(*(*uint8)(unsafe.Pointer(zName + libc.UintptrFromInt32(-3)))) != 0)) || (int32(*(*uint8)(unsafe.Pointer(zName + libc.UintptrFromInt32(-4)))) != 0) {
zName--
}
pPager = *(*uintptr)(unsafe.Pointer(((zName - uintptr(4)) - uintptr(uint64(unsafe.Sizeof(uintptr(0)))))))
@@ -33815,7 +35678,7 @@ func Xsqlite3_database_file_object(tls *libc.TLS, zName uintptr) uintptr { /* sq
// set to 0 and SQLITE_OK returned. If an IO error occurs while trying
// to determine whether or not a hot-journal file exists, the IO error
// code is returned and the value of *pExists is undefined.
-func hasHotJournal(tls *libc.TLS, pPager uintptr, pExists uintptr) int32 { /* sqlite3.c:57212:12: */
+func hasHotJournal(tls *libc.TLS, pPager uintptr, pExists uintptr) int32 { /* sqlite3.c:57709:12: */
bp := tls.Alloc(17)
defer tls.Free(17)
@@ -33926,7 +35789,7 @@ func hasHotJournal(tls *libc.TLS, pPager uintptr, pExists uintptr) int32 { /* sq
// If everything is successful, SQLITE_OK is returned. If an IO error
// occurs while locking the database, checking for a hot-journal file or
// rolling back a journal file, the IO error code is returned.
-func Xsqlite3PagerSharedLock(tls *libc.TLS, pPager uintptr) int32 { /* sqlite3.c:57332:20: */
+func Xsqlite3PagerSharedLock(tls *libc.TLS, pPager uintptr) int32 { /* sqlite3.c:57829:20: */
bp := tls.Alloc(28)
defer tls.Free(28)
@@ -33952,7 +35815,7 @@ func Xsqlite3PagerSharedLock(tls *libc.TLS, pPager uintptr) int32 { /* sqlite3.c
// There is a vanishingly small chance that a change will not be
// detected. The chance of an undetected change is so small that
// it can be neglected.
- // var dbFileVers [16]int8 at bp+12, 16
+ // var dbFileVers [16]uint8 at bp+12, 16
// var bHotJournal int32 at bp, 4
rc = SQLITE_OK // Return code
@@ -34052,7 +35915,7 @@ __7:
if !((rc == SQLITE_OK) && ((*(*int32)(unsafe.Pointer(bp + 8 /* fout */)) & SQLITE_OPEN_READONLY) != 0)) {
goto __10
}
- rc = Xsqlite3CantopenError(tls, 57416)
+ rc = Xsqlite3CantopenError(tls, 57913)
Xsqlite3OsClose(tls, (*Pager)(unsafe.Pointer(pPager)).Fjfd)
__10:
;
@@ -34121,7 +35984,7 @@ __5:
goto __16
}
- rc = Xsqlite3OsRead(tls, (*Pager)(unsafe.Pointer(pPager)).Ffd, bp+12 /* &dbFileVers */, int32(unsafe.Sizeof([16]int8{})), int64(24))
+ rc = Xsqlite3OsRead(tls, (*Pager)(unsafe.Pointer(pPager)).Ffd, bp+12 /* &dbFileVers */, int32(unsafe.Sizeof([16]uint8{})), int64(24))
if !(rc != SQLITE_OK) {
goto __17
}
@@ -34131,11 +35994,11 @@ __5:
goto failed
__18:
;
- libc.Xmemset(tls, bp+12 /* &dbFileVers[0] */, 0, uint64(unsafe.Sizeof([16]int8{})))
+ libc.Xmemset(tls, bp+12 /* &dbFileVers[0] */, 0, uint64(unsafe.Sizeof([16]uint8{})))
__17:
;
- if !(libc.Xmemcmp(tls, pPager+136 /* &.dbFileVers */, bp+12 /* &dbFileVers[0] */, uint64(unsafe.Sizeof([16]int8{}))) != 0) {
+ if !(libc.Xmemcmp(tls, pPager+136 /* &.dbFileVers */, bp+12 /* &dbFileVers[0] */, uint64(unsafe.Sizeof([16]uint8{}))) != 0) {
goto __19
}
pager_reset(tls, pPager)
@@ -34201,7 +36064,7 @@ __24:
// Except, in locking_mode=EXCLUSIVE when there is nothing to in
// the rollback journal, the unlock is not performed and there is
// nothing to rollback, so this routine is a no-op.
-func pagerUnlockIfUnused(tls *libc.TLS, pPager uintptr) { /* sqlite3.c:57549:13: */
+func pagerUnlockIfUnused(tls *libc.TLS, pPager uintptr) { /* sqlite3.c:58046:13: */
if Xsqlite3PcacheRefCount(tls, (*Pager)(unsafe.Pointer(pPager)).FpPCache) == 0 {
// because page1 is never memory mapped
pagerUnlockAndRollback(tls, pPager)
@@ -34263,7 +36126,7 @@ func pagerUnlockIfUnused(tls *libc.TLS, pPager uintptr) { /* sqlite3.c:57549:13:
// has to go to disk, and could also playback an old journal if necessary.
// Since Lookup() never goes to disk, it never has to deal with locks
// or journal files.
-func getPageNormal(tls *libc.TLS, pPager uintptr, pgno Pgno, ppPage uintptr, flags int32) int32 { /* sqlite3.c:57613:12: */
+func getPageNormal(tls *libc.TLS, pPager uintptr, pgno Pgno, ppPage uintptr, flags int32) int32 { /* sqlite3.c:58110:12: */
bp := tls.Alloc(8)
defer tls.Free(8)
@@ -34276,7 +36139,7 @@ func getPageNormal(tls *libc.TLS, pPager uintptr, pgno Pgno, ppPage uintptr, fla
if !(pgno == Pgno(0)) {
goto __1
}
- return Xsqlite3CorruptError(tls, 57629)
+ return Xsqlite3CorruptError(tls, 58126)
__1:
;
*(*uintptr)(unsafe.Pointer(bp /* pBase */)) = Xsqlite3PcacheFetch(tls, (*Pager)(unsafe.Pointer(pPager)).FpPCache, pgno, 3)
@@ -34322,7 +36185,7 @@ __5:
if !(pgno == (Pgno((Xsqlite3PendingByte / ((*Pager)(unsafe.Pointer(pPager)).FpageSize)) + 1))) {
goto __7
}
- rc = Xsqlite3CorruptError(tls, 57661)
+ rc = Xsqlite3CorruptError(tls, 58158)
goto pager_acquire_err
__7:
;
@@ -34394,7 +36257,7 @@ __14:
}
// The page getter for when memory-mapped I/O is enabled
-func getPageMMap(tls *libc.TLS, pPager uintptr, pgno Pgno, ppPage uintptr, flags int32) int32 { /* sqlite3.c:57715:12: */
+func getPageMMap(tls *libc.TLS, pPager uintptr, pgno Pgno, ppPage uintptr, flags int32) int32 { /* sqlite3.c:58212:12: */
bp := tls.Alloc(24)
defer tls.Free(24)
@@ -34414,7 +36277,7 @@ func getPageMMap(tls *libc.TLS, pPager uintptr, pgno Pgno, ppPage uintptr, flags
// test in the previous statement, and avoid testing pgno==0 in the
// common case where pgno is large.
if (pgno <= Pgno(1)) && (pgno == Pgno(0)) {
- return Xsqlite3CorruptError(tls, 57740)
+ return Xsqlite3CorruptError(tls, 58237)
}
if (bMmapOk != 0) && ((*Pager)(unsafe.Pointer((pPager))).FpWal != uintptr(0)) {
@@ -34452,7 +36315,7 @@ func getPageMMap(tls *libc.TLS, pPager uintptr, pgno Pgno, ppPage uintptr, flags
}
// The page getter method for when the pager is an error state
-func getPageError(tls *libc.TLS, pPager uintptr, pgno Pgno, ppPage uintptr, flags int32) int32 { /* sqlite3.c:57784:12: */
+func getPageError(tls *libc.TLS, pPager uintptr, pgno Pgno, ppPage uintptr, flags int32) int32 { /* sqlite3.c:58281:12: */
_ = pgno
_ = flags
@@ -34461,8 +36324,10 @@ func getPageError(tls *libc.TLS, pPager uintptr, pgno Pgno, ppPage uintptr, flag
}
// Dispatch all page fetch requests to the appropriate getter method.
-func Xsqlite3PagerGet(tls *libc.TLS, pPager uintptr, pgno Pgno, ppPage uintptr, flags int32) int32 { /* sqlite3.c:57800:20: */
- return (*(*func(*libc.TLS, uintptr, Pgno, uintptr, int32) int32)(unsafe.Pointer((pPager + 264 /* &.xGet */))))(tls, pPager, pgno, ppPage, flags)
+func Xsqlite3PagerGet(tls *libc.TLS, pPager uintptr, pgno Pgno, ppPage uintptr, flags int32) int32 { /* sqlite3.c:58297:20: */
+ return (*struct {
+ f func(*libc.TLS, uintptr, Pgno, uintptr, int32) int32
+ })(unsafe.Pointer(&struct{ uintptr }{(*Pager)(unsafe.Pointer(pPager)).FxGet})).f(tls, pPager, pgno, ppPage, flags)
}
// Acquire a page if it is already in the in-memory cache. Do
@@ -34474,7 +36339,7 @@ func Xsqlite3PagerGet(tls *libc.TLS, pPager uintptr, pgno Pgno, ppPage uintptr,
// in the page if the page is not already in cache. This routine
// returns NULL if the page is not in cache or if a disk I/O error
// has ever happened.
-func Xsqlite3PagerLookup(tls *libc.TLS, pPager uintptr, pgno Pgno) uintptr { /* sqlite3.c:57820:23: */
+func Xsqlite3PagerLookup(tls *libc.TLS, pPager uintptr, pgno Pgno) uintptr { /* sqlite3.c:58317:23: */
var pPage uintptr
pPage = Xsqlite3PcacheFetch(tls, (*Pager)(unsafe.Pointer(pPager)).FpPCache, pgno, 0)
@@ -34495,7 +36360,7 @@ func Xsqlite3PagerLookup(tls *libc.TLS, pPager uintptr, pgno Pgno) uintptr { /*
// Use sqlite3PagerUnrefPageOne() to release page1. This latter routine
// checks the total number of outstanding pages and if the number of
// pages reaches zero it drops the database lock.
-func Xsqlite3PagerUnrefNotNull(tls *libc.TLS, pPg uintptr) { /* sqlite3.c:57843:21: */
+func Xsqlite3PagerUnrefNotNull(tls *libc.TLS, pPg uintptr) { /* sqlite3.c:58340:21: */
if (int32((*DbPage)(unsafe.Pointer(pPg)).Fflags) & PGHDR_MMAP) != 0 {
// Page1 is never memory mapped
@@ -34507,13 +36372,13 @@ func Xsqlite3PagerUnrefNotNull(tls *libc.TLS, pPg uintptr) { /* sqlite3.c:57843:
}
-func Xsqlite3PagerUnref(tls *libc.TLS, pPg uintptr) { /* sqlite3.c:57855:21: */
+func Xsqlite3PagerUnref(tls *libc.TLS, pPg uintptr) { /* sqlite3.c:58352:21: */
if pPg != 0 {
Xsqlite3PagerUnrefNotNull(tls, pPg)
}
}
-func Xsqlite3PagerUnrefPageOne(tls *libc.TLS, pPg uintptr) { /* sqlite3.c:57858:21: */
+func Xsqlite3PagerUnrefPageOne(tls *libc.TLS, pPg uintptr) { /* sqlite3.c:58355:21: */
var pPager uintptr
// Page1 is never memory mapped
@@ -34542,7 +36407,7 @@ func Xsqlite3PagerUnrefPageOne(tls *libc.TLS, pPg uintptr) { /* sqlite3.c:57858:
// Return SQLITE_OK if everything is successful. Otherwise, return
// SQLITE_NOMEM if the attempt to allocate Pager.pInJournal fails, or
// an IO error code if opening or writing the journal file fails.
-func pager_open_journal(tls *libc.TLS, pPager uintptr) int32 { /* sqlite3.c:57890:12: */
+func pager_open_journal(tls *libc.TLS, pPager uintptr) int32 { /* sqlite3.c:58387:12: */
var rc int32 = SQLITE_OK // Return code
var pVfs uintptr = (*Pager)(unsafe.Pointer(pPager)).FpVfs // Local cache of vfs pointer
@@ -34624,7 +36489,7 @@ func pager_open_journal(tls *libc.TLS, pPager uintptr) int32 { /* sqlite3.c:5789
// sub-journal. If the subjInMemory argument is zero, then any required
// sub-journal is implemented in-memory if pPager is an in-memory database,
// or using a temporary file otherwise.
-func Xsqlite3PagerBegin(tls *libc.TLS, pPager uintptr, exFlag int32, subjInMemory int32) int32 { /* sqlite3.c:57979:20: */
+func Xsqlite3PagerBegin(tls *libc.TLS, pPager uintptr, exFlag int32, subjInMemory int32) int32 { /* sqlite3.c:58476:20: */
var rc int32 = SQLITE_OK
if (*Pager)(unsafe.Pointer(pPager)).FerrCode != 0 {
@@ -34684,7 +36549,7 @@ func Xsqlite3PagerBegin(tls *libc.TLS, pPager uintptr, exFlag int32, subjInMemor
}
// Write page pPg onto the end of the rollback journal.
-func pagerAddPageToRollbackJournal(tls *libc.TLS, pPg uintptr) int32 { /* sqlite3.c:58048:28: */
+func pagerAddPageToRollbackJournal(tls *libc.TLS, pPg uintptr) int32 { /* sqlite3.c:58545:28: */
var pPager uintptr = (*PgHdr)(unsafe.Pointer(pPg)).FpPager
var rc int32
var cksum U32
@@ -34734,7 +36599,7 @@ func pagerAddPageToRollbackJournal(tls *libc.TLS, pPg uintptr) int32 { /* sqlite
// one of the journals, the corresponding bit is set in the
// Pager.pInJournal bitvec and the PagerSavepoint.pInSavepoint bitvecs
// of any open savepoints as appropriate.
-func pager_write(tls *libc.TLS, pPg uintptr) int32 { /* sqlite3.c:58105:12: */
+func pager_write(tls *libc.TLS, pPg uintptr) int32 { /* sqlite3.c:58602:12: */
var pPager uintptr = (*PgHdr)(unsafe.Pointer(pPg)).FpPager
var rc int32 = SQLITE_OK
@@ -34808,7 +36673,7 @@ func pager_write(tls *libc.TLS, pPg uintptr) int32 { /* sqlite3.c:58105:12: */
// Usually, the sector size is less than or equal to the page size, in which
// case pages can be individually written. This routine only runs in the
// exceptional case where the page size is smaller than the sector size.
-func pagerWriteLargeSector(tls *libc.TLS, pPg uintptr) int32 { /* sqlite3.c:58197:28: */
+func pagerWriteLargeSector(tls *libc.TLS, pPg uintptr) int32 { /* sqlite3.c:58694:28: */
bp := tls.Alloc(8)
defer tls.Free(8)
@@ -34896,7 +36761,7 @@ func pagerWriteLargeSector(tls *libc.TLS, pPg uintptr) int32 { /* sqlite3.c:5819
//
// If an error occurs, SQLITE_NOMEM or an IO error code is returned
// as appropriate. Otherwise, SQLITE_OK.
-func Xsqlite3PagerWrite(tls *libc.TLS, pPg uintptr) int32 { /* sqlite3.c:58291:20: */
+func Xsqlite3PagerWrite(tls *libc.TLS, pPg uintptr) int32 { /* sqlite3.c:58788:20: */
var pPager uintptr = (*PgHdr)(unsafe.Pointer(pPg)).FpPager
if ((int32((*PgHdr)(unsafe.Pointer(pPg)).Fflags) & PGHDR_WRITEABLE) != 0) && ((*Pager)(unsafe.Pointer(pPager)).FdbSize >= (*PgHdr)(unsafe.Pointer(pPg)).Fpgno) {
@@ -34937,7 +36802,7 @@ func Xsqlite3PagerWrite(tls *libc.TLS, pPg uintptr) int32 { /* sqlite3.c:58291:2
// memory pressure forces page pPg out of the cache, the data does need
// to be written out to disk so that it may be read back in if the
// current transaction is rolled back.
-func Xsqlite3PagerDontWrite(tls *libc.TLS, pPg uintptr) { /* sqlite3.c:58340:21: */
+func Xsqlite3PagerDontWrite(tls *libc.TLS, pPg uintptr) { /* sqlite3.c:58837:21: */
var pPager uintptr = (*PgHdr)(unsafe.Pointer(pPg)).FpPager
if (!(int32((*Pager)(unsafe.Pointer(pPager)).FtempFile) != 0) && ((int32((*PgHdr)(unsafe.Pointer(pPg)).Fflags) & PGHDR_DIRTY) != 0)) && ((*Pager)(unsafe.Pointer(pPager)).FnSavepoint == 0) {
@@ -34967,7 +36832,7 @@ func Xsqlite3PagerDontWrite(tls *libc.TLS, pPg uintptr) { /* sqlite3.c:58340:21:
// if isDirect is non-zero, then the database file is updated directly
// by writing an updated version of page 1 using a call to the
// sqlite3OsWrite() function.
-func pager_incr_changecounter(tls *libc.TLS, pPager uintptr, isDirectMode int32) int32 { /* sqlite3.c:58374:12: */
+func pager_incr_changecounter(tls *libc.TLS, pPager uintptr, isDirectMode int32) int32 { /* sqlite3.c:58871:12: */
bp := tls.Alloc(8)
defer tls.Free(8)
@@ -35018,7 +36883,7 @@ func pager_incr_changecounter(tls *libc.TLS, pPager uintptr, isDirectMode int32)
// next time a read transaction is opened the cache will be
// flushed (as the change-counter values will not match).
var pCopy uintptr = ((zBuf) + 24)
- libc.Xmemcpy(tls, (pPager + 136 /* &.dbFileVers */), pCopy, uint64(unsafe.Sizeof([16]int8{})))
+ libc.Xmemcpy(tls, (pPager + 136 /* &.dbFileVers */), pCopy, uint64(unsafe.Sizeof([16]uint8{})))
(*Pager)(unsafe.Pointer(pPager)).FchangeCountDone = U8(1)
}
} else {
@@ -35037,7 +36902,7 @@ func pager_incr_changecounter(tls *libc.TLS, pPager uintptr, isDirectMode int32)
//
// If successful, or if called on a pager for which it is a no-op, this
// function returns SQLITE_OK. Otherwise, an IO error code is returned.
-func Xsqlite3PagerSync(tls *libc.TLS, pPager uintptr, zSuper uintptr) int32 { /* sqlite3.c:58457:20: */
+func Xsqlite3PagerSync(tls *libc.TLS, pPager uintptr, zSuper uintptr) int32 { /* sqlite3.c:58954:20: */
var rc int32 = SQLITE_OK
var pArg uintptr = zSuper
rc = Xsqlite3OsFileControl(tls, (*Pager)(unsafe.Pointer(pPager)).Ffd, SQLITE_FCNTL_SYNC, pArg)
@@ -35060,7 +36925,7 @@ func Xsqlite3PagerSync(tls *libc.TLS, pPager uintptr, zSuper uintptr) int32 { /*
// successful, or the connection is in WAL mode, SQLITE_OK is returned.
// Otherwise, either SQLITE_BUSY or an SQLITE_IOERR_XXX error code is
// returned.
-func Xsqlite3PagerExclusiveLock(tls *libc.TLS, pPager uintptr) int32 { /* sqlite3.c:58480:20: */
+func Xsqlite3PagerExclusiveLock(tls *libc.TLS, pPager uintptr) int32 { /* sqlite3.c:58977:20: */
var rc int32 = (*Pager)(unsafe.Pointer(pPager)).FerrCode
if rc == SQLITE_OK {
@@ -35096,7 +36961,7 @@ func Xsqlite3PagerExclusiveLock(tls *libc.TLS, pPager uintptr) int32 { /* sqlite
// is not synced. The caller must call sqlite3PagerSync() directly to
// sync the database file before calling CommitPhaseTwo() to delete the
// journal file in this case.
-func Xsqlite3PagerCommitPhaseOne(tls *libc.TLS, pPager uintptr, zSuper uintptr, noSync int32) int32 { /* sqlite3.c:58522:20: */
+func Xsqlite3PagerCommitPhaseOne(tls *libc.TLS, pPager uintptr, zSuper uintptr, noSync int32) int32 { /* sqlite3.c:59019:20: */
bp := tls.Alloc(8)
defer tls.Free(8)
@@ -35286,7 +37151,7 @@ __19:
//
// If an error occurs, an IO error code is returned and the pager
// moves into the error state. Otherwise, SQLITE_OK is returned.
-func Xsqlite3PagerCommitPhaseTwo(tls *libc.TLS, pPager uintptr) int32 { /* sqlite3.c:58752:20: */
+func Xsqlite3PagerCommitPhaseTwo(tls *libc.TLS, pPager uintptr) int32 { /* sqlite3.c:59249:20: */
var rc int32 = SQLITE_OK // Return code
// This routine should not be called if a prior error has occurred.
@@ -35343,7 +37208,7 @@ func Xsqlite3PagerCommitPhaseTwo(tls *libc.TLS, pPager uintptr) int32 { /* sqlit
// current transaction are either expelled from the cache or reverted to
// their pre-transaction state by re-reading data from the database or
// WAL files. The WAL transaction is then closed.
-func Xsqlite3PagerRollback(tls *libc.TLS, pPager uintptr) int32 { /* sqlite3.c:58818:20: */
+func Xsqlite3PagerRollback(tls *libc.TLS, pPager uintptr) int32 { /* sqlite3.c:59315:20: */
var rc int32 = SQLITE_OK // Return code
// PagerRollback() is a no-op if called in READER or OPEN state. If
@@ -35387,13 +37252,13 @@ func Xsqlite3PagerRollback(tls *libc.TLS, pPager uintptr) int32 { /* sqlite3.c:5
// Return TRUE if the database file is opened read-only. Return FALSE
// if the database is (in theory) writable.
-func Xsqlite3PagerIsreadonly(tls *libc.TLS, pPager uintptr) U8 { /* sqlite3.c:58868:19: */
+func Xsqlite3PagerIsreadonly(tls *libc.TLS, pPager uintptr) U8 { /* sqlite3.c:59365:19: */
return (*Pager)(unsafe.Pointer(pPager)).FreadOnly
}
// Return the approximate number of bytes of memory currently
// used by the pager and its associated cache.
-func Xsqlite3PagerMemUsed(tls *libc.TLS, pPager uintptr) int32 { /* sqlite3.c:58885:20: */
+func Xsqlite3PagerMemUsed(tls *libc.TLS, pPager uintptr) int32 { /* sqlite3.c:59382:20: */
var perPageSize int32 = (int32(((uint64((*Pager)(unsafe.Pointer(pPager)).FpageSize + int32((*Pager)(unsafe.Pointer(pPager)).FnExtra))) + uint64(unsafe.Sizeof(PgHdr{}))) +
(uint64(5) * uint64(unsafe.Sizeof(uintptr(0))))))
return (((perPageSize * Xsqlite3PcachePagecount(tls, (*Pager)(unsafe.Pointer(pPager)).FpPCache)) +
@@ -35402,7 +37267,7 @@ func Xsqlite3PagerMemUsed(tls *libc.TLS, pPager uintptr) int32 { /* sqlite3.c:58
}
// Return the number of references to the specified page.
-func Xsqlite3PagerPageRefcount(tls *libc.TLS, pPage uintptr) int32 { /* sqlite3.c:58896:20: */
+func Xsqlite3PagerPageRefcount(tls *libc.TLS, pPage uintptr) int32 { /* sqlite3.c:59393:20: */
return Xsqlite3PcachePageRefcount(tls, pPage)
}
@@ -35415,7 +37280,7 @@ func Xsqlite3PagerPageRefcount(tls *libc.TLS, pPage uintptr) int32 { /* sqlite3.
// current cache hit or miss count, according to the value of eStat. If the
// reset parameter is non-zero, the cache hit or miss count is zeroed before
// returning.
-func Xsqlite3PagerCacheStat(tls *libc.TLS, pPager uintptr, eStat int32, reset int32, pnVal uintptr) { /* sqlite3.c:58932:21: */
+func Xsqlite3PagerCacheStat(tls *libc.TLS, pPager uintptr, eStat int32, reset int32, pnVal uintptr) { /* sqlite3.c:59429:21: */
eStat = eStat - (SQLITE_DBSTATUS_CACHE_HIT)
*(*int32)(unsafe.Pointer(pnVal)) += (*(*int32)(unsafe.Pointer((pPager + 240 /* &.aStat */) + uintptr(eStat)*4)))
@@ -35425,7 +37290,7 @@ func Xsqlite3PagerCacheStat(tls *libc.TLS, pPager uintptr, eStat int32, reset in
}
// Return true if this is an in-memory or temp-file backed pager.
-func Xsqlite3PagerIsMemdb(tls *libc.TLS, pPager uintptr) int32 { /* sqlite3.c:58955:20: */
+func Xsqlite3PagerIsMemdb(tls *libc.TLS, pPager uintptr) int32 { /* sqlite3.c:59452:20: */
return int32((*Pager)(unsafe.Pointer(pPager)).FtempFile)
}
@@ -35437,7 +37302,7 @@ func Xsqlite3PagerIsMemdb(tls *libc.TLS, pPager uintptr) int32 { /* sqlite3.c:58
// If a memory allocation fails, SQLITE_NOMEM is returned. If an error
// occurs while opening the sub-journal file, then an IO error code is
// returned. Otherwise, SQLITE_OK.
-func pagerOpenSavepoint(tls *libc.TLS, pPager uintptr, nSavepoint int32) int32 { /* sqlite3.c:58969:28: */
+func pagerOpenSavepoint(tls *libc.TLS, pPager uintptr, nSavepoint int32) int32 { /* sqlite3.c:59466:28: */
var rc int32 = SQLITE_OK // Return code
var nCurrent int32 = (*Pager)(unsafe.Pointer(pPager)).FnSavepoint // Current number of savepoints
var ii int32 // Iterator variable
@@ -35477,7 +37342,7 @@ func pagerOpenSavepoint(tls *libc.TLS, pPager uintptr, nSavepoint int32) int32 {
return rc
}
-func Xsqlite3PagerOpenSavepoint(tls *libc.TLS, pPager uintptr, nSavepoint int32) int32 { /* sqlite3.c:59015:20: */
+func Xsqlite3PagerOpenSavepoint(tls *libc.TLS, pPager uintptr, nSavepoint int32) int32 { /* sqlite3.c:59512:20: */
if (nSavepoint > (*Pager)(unsafe.Pointer(pPager)).FnSavepoint) && ((*Pager)(unsafe.Pointer(pPager)).FuseJournal != 0) {
return pagerOpenSavepoint(tls, pPager, nSavepoint)
@@ -35515,7 +37380,7 @@ func Xsqlite3PagerOpenSavepoint(tls *libc.TLS, pPager uintptr, nSavepoint int32)
// This function may return SQLITE_NOMEM if a memory allocation fails,
// or an IO error code if an IO error occurs while rolling back a
// savepoint. If no errors occur, SQLITE_OK is returned.
-func Xsqlite3PagerSavepoint(tls *libc.TLS, pPager uintptr, op int32, iSavepoint int32) int32 { /* sqlite3.c:59057:20: */
+func Xsqlite3PagerSavepoint(tls *libc.TLS, pPager uintptr, op int32, iSavepoint int32) int32 { /* sqlite3.c:59554:20: */
var rc int32 = (*Pager)(unsafe.Pointer(pPager)).FerrCode
if (rc == SQLITE_OK) && (iSavepoint < (*Pager)(unsafe.Pointer(pPager)).FnSavepoint) {
@@ -35576,30 +37441,30 @@ func Xsqlite3PagerSavepoint(tls *libc.TLS, pPager uintptr, op int32, iSavepoint
//
// The return value to this routine is always safe to use with
// sqlite3_uri_parameter() and sqlite3_filename_database() and friends.
-func Xsqlite3PagerFilename(tls *libc.TLS, pPager uintptr, nullIfMemDb int32) uintptr { /* sqlite3.c:59138:27: */
+func Xsqlite3PagerFilename(tls *libc.TLS, pPager uintptr, nullIfMemDb int32) uintptr { /* sqlite3.c:59635:27: */
if (nullIfMemDb != 0) && ((*Pager)(unsafe.Pointer(pPager)).FmemDb != 0) {
return (uintptr(unsafe.Pointer(&zFake)) + 4)
}
return (*Pager)(unsafe.Pointer(pPager)).FzFilename
}
-var zFake = [8]int8{int8(0), int8(0), int8(0), int8(0), int8(0), int8(0), int8(0), int8(0)} /* sqlite3.c:59139:21 */
+var zFake = [8]uint8{uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0)} /* sqlite3.c:59636:21 */
// Return the VFS structure for the pager.
-func Xsqlite3PagerVfs(tls *libc.TLS, pPager uintptr) uintptr { /* sqlite3.c:59146:28: */
+func Xsqlite3PagerVfs(tls *libc.TLS, pPager uintptr) uintptr { /* sqlite3.c:59643:28: */
return (*Pager)(unsafe.Pointer(pPager)).FpVfs
}
// Return the file handle for the database file associated
// with the pager. This might return NULL if the file has
// not yet been opened.
-func Xsqlite3PagerFile(tls *libc.TLS, pPager uintptr) uintptr { /* sqlite3.c:59155:29: */
+func Xsqlite3PagerFile(tls *libc.TLS, pPager uintptr) uintptr { /* sqlite3.c:59652:29: */
return (*Pager)(unsafe.Pointer(pPager)).Ffd
}
// Return the file handle for the journal file (if it exists).
// This will be either the rollback journal or the WAL file.
-func Xsqlite3PagerJrnlFile(tls *libc.TLS, pPager uintptr) uintptr { /* sqlite3.c:59163:29: */
+func Xsqlite3PagerJrnlFile(tls *libc.TLS, pPager uintptr) uintptr { /* sqlite3.c:59660:29: */
if (*Pager)(unsafe.Pointer(pPager)).FpWal != 0 {
return Xsqlite3WalFile(tls, (*Pager)(unsafe.Pointer(pPager)).FpWal)
}
@@ -35607,7 +37472,7 @@ func Xsqlite3PagerJrnlFile(tls *libc.TLS, pPager uintptr) uintptr { /* sqlite3.c
}
// Return the full pathname of the journal file.
-func Xsqlite3PagerJournalname(tls *libc.TLS, pPager uintptr) uintptr { /* sqlite3.c:59174:27: */
+func Xsqlite3PagerJournalname(tls *libc.TLS, pPager uintptr) uintptr { /* sqlite3.c:59671:27: */
return (*Pager)(unsafe.Pointer(pPager)).FzJournal
}
@@ -35634,7 +37499,7 @@ func Xsqlite3PagerJournalname(tls *libc.TLS, pPager uintptr) uintptr { /* sqlite
//
// This function may return SQLITE_NOMEM or an IO error code if an error
// occurs. Otherwise, it returns SQLITE_OK.
-func Xsqlite3PagerMovepage(tls *libc.TLS, pPager uintptr, pPg uintptr, pgno Pgno, isCommit int32) int32 { /* sqlite3.c:59204:20: */
+func Xsqlite3PagerMovepage(tls *libc.TLS, pPager uintptr, pPg uintptr, pgno Pgno, isCommit int32) int32 { /* sqlite3.c:59701:20: */
bp := tls.Alloc(8)
defer tls.Free(8)
@@ -35696,7 +37561,7 @@ func Xsqlite3PagerMovepage(tls *libc.TLS, pPager uintptr, pPg uintptr, pgno Pgno
if pPgOld != 0 {
if int32((*PgHdr)(unsafe.Pointer(pPgOld)).FnRef) > 1 {
Xsqlite3PagerUnrefNotNull(tls, pPgOld)
- return Xsqlite3CorruptError(tls, 59278)
+ return Xsqlite3CorruptError(tls, 59775)
}
*(*U16)(unsafe.Pointer(pPg + 52 /* &.flags */)) |= U16((int32((*PgHdr)(unsafe.Pointer(pPgOld)).Fflags) & PGHDR_NEED_SYNC))
if (*Pager)(unsafe.Pointer(pPager)).FtempFile != 0 {
@@ -35756,21 +37621,21 @@ func Xsqlite3PagerMovepage(tls *libc.TLS, pPager uintptr, pPg uintptr, pgno Pgno
// with a page number other than iNew. This function changes the page's
// page number to iNew and sets the value of the PgHdr.flags field to
// the value passed as the third parameter.
-func Xsqlite3PagerRekey(tls *libc.TLS, pPg uintptr, iNew Pgno, flags U16) { /* sqlite3.c:59342:21: */
+func Xsqlite3PagerRekey(tls *libc.TLS, pPg uintptr, iNew Pgno, flags U16) { /* sqlite3.c:59839:21: */
(*DbPage)(unsafe.Pointer(pPg)).Fflags = flags
Xsqlite3PcacheMove(tls, pPg, iNew)
}
// Return a pointer to the data for the specified page.
-func Xsqlite3PagerGetData(tls *libc.TLS, pPg uintptr) uintptr { /* sqlite3.c:59351:21: */
+func Xsqlite3PagerGetData(tls *libc.TLS, pPg uintptr) uintptr { /* sqlite3.c:59848:21: */
return (*DbPage)(unsafe.Pointer(pPg)).FpData
}
// Return a pointer to the Pager.nExtra bytes of "extra" space
// allocated along with the specified page.
-func Xsqlite3PagerGetExtra(tls *libc.TLS, pPg uintptr) uintptr { /* sqlite3.c:59360:21: */
+func Xsqlite3PagerGetExtra(tls *libc.TLS, pPg uintptr) uintptr { /* sqlite3.c:59857:21: */
return (*DbPage)(unsafe.Pointer(pPg)).FpExtra
}
@@ -35782,7 +37647,7 @@ func Xsqlite3PagerGetExtra(tls *libc.TLS, pPg uintptr) uintptr { /* sqlite3.c:59
// The returned value is either PAGER_LOCKINGMODE_NORMAL or
// PAGER_LOCKINGMODE_EXCLUSIVE, indicating the current (possibly updated)
// locking-mode.
-func Xsqlite3PagerLockingMode(tls *libc.TLS, pPager uintptr, eMode int32) int32 { /* sqlite3.c:59374:20: */
+func Xsqlite3PagerLockingMode(tls *libc.TLS, pPager uintptr, eMode int32) int32 { /* sqlite3.c:59871:20: */
if ((eMode >= 0) && !(int32((*Pager)(unsafe.Pointer(pPager)).FtempFile) != 0)) && !(Xsqlite3WalHeapMemory(tls, (*Pager)(unsafe.Pointer(pPager)).FpWal) != 0) {
(*Pager)(unsafe.Pointer(pPager)).FexclusiveMode = U8(eMode)
@@ -35808,7 +37673,7 @@ func Xsqlite3PagerLockingMode(tls *libc.TLS, pPager uintptr, eMode int32) int32
// * Temporary databases cannot have _WAL journalmode.
//
// The returned indicate the current (possibly updated) journal-mode.
-func Xsqlite3PagerSetJournalMode(tls *libc.TLS, pPager uintptr, eMode int32) int32 { /* sqlite3.c:59407:20: */
+func Xsqlite3PagerSetJournalMode(tls *libc.TLS, pPager uintptr, eMode int32) int32 { /* sqlite3.c:59904:20: */
var eOld U8 = (*Pager)(unsafe.Pointer(pPager)).FjournalMode // Prior journalmode
// The eMode parameter is always valid
@@ -35879,14 +37744,14 @@ func Xsqlite3PagerSetJournalMode(tls *libc.TLS, pPager uintptr, eMode int32) int
}
// Return the current journal mode.
-func Xsqlite3PagerGetJournalMode(tls *libc.TLS, pPager uintptr) int32 { /* sqlite3.c:59498:20: */
+func Xsqlite3PagerGetJournalMode(tls *libc.TLS, pPager uintptr) int32 { /* sqlite3.c:59995:20: */
return int32((*Pager)(unsafe.Pointer(pPager)).FjournalMode)
}
// Return TRUE if the pager is in a state where it is OK to change the
// journalmode. Journalmode changes can only happen when the database
// is unmodified.
-func Xsqlite3PagerOkToChangeJournalMode(tls *libc.TLS, pPager uintptr) int32 { /* sqlite3.c:59507:20: */
+func Xsqlite3PagerOkToChangeJournalMode(tls *libc.TLS, pPager uintptr) int32 { /* sqlite3.c:60004:20: */
if int32((*Pager)(unsafe.Pointer(pPager)).FeState) >= PAGER_WRITER_CACHEMOD {
return 0
@@ -35901,7 +37766,7 @@ func Xsqlite3PagerOkToChangeJournalMode(tls *libc.TLS, pPager uintptr) int32 { /
//
// Setting the size limit to -1 means no limit is enforced.
// An attempt to set a limit smaller than -1 is a no-op.
-func Xsqlite3PagerJournalSizeLimit(tls *libc.TLS, pPager uintptr, iLimit I64) I64 { /* sqlite3.c:59520:20: */
+func Xsqlite3PagerJournalSizeLimit(tls *libc.TLS, pPager uintptr, iLimit I64) I64 { /* sqlite3.c:60017:20: */
if iLimit >= int64(-1) {
(*Pager)(unsafe.Pointer(pPager)).FjournalSizeLimit = iLimit
Xsqlite3WalLimit(tls, (*Pager)(unsafe.Pointer(pPager)).FpWal, iLimit)
@@ -35913,12 +37778,12 @@ func Xsqlite3PagerJournalSizeLimit(tls *libc.TLS, pPager uintptr, iLimit I64) I6
// in backup.c maintains the content of this variable. This module
// uses it opaquely as an argument to sqlite3BackupRestart() and
// sqlite3BackupUpdate() only.
-func Xsqlite3PagerBackupPtr(tls *libc.TLS, pPager uintptr) uintptr { /* sqlite3.c:59534:31: */
+func Xsqlite3PagerBackupPtr(tls *libc.TLS, pPager uintptr) uintptr { /* sqlite3.c:60031:31: */
return (pPager + 112 /* &.pBackup */)
}
// Unless this is an in-memory or temporary database, clear the pager cache.
-func Xsqlite3PagerClearCache(tls *libc.TLS, pPager uintptr) { /* sqlite3.c:59542:21: */
+func Xsqlite3PagerClearCache(tls *libc.TLS, pPager uintptr) { /* sqlite3.c:60039:21: */
if int32((*Pager)(unsafe.Pointer(pPager)).FtempFile) == 0 {
pager_reset(tls, pPager)
@@ -35930,7 +37795,7 @@ func Xsqlite3PagerClearCache(tls *libc.TLS, pPager uintptr) { /* sqlite3.c:59542
// or wal_blocking_checkpoint() API functions.
//
// Parameter eMode is one of SQLITE_CHECKPOINT_PASSIVE, FULL or RESTART.
-func Xsqlite3PagerCheckpoint(tls *libc.TLS, pPager uintptr, db uintptr, eMode int32, pnLog uintptr, pnCkpt uintptr) int32 { /* sqlite3.c:59557:20: */
+func Xsqlite3PagerCheckpoint(tls *libc.TLS, pPager uintptr, db uintptr, eMode int32, pnLog uintptr, pnCkpt uintptr) int32 { /* sqlite3.c:60054:20: */
var rc int32 = SQLITE_OK
if (*Pager)(unsafe.Pointer(pPager)).FpWal != 0 {
rc = Xsqlite3WalCheckpoint(tls, (*Pager)(unsafe.Pointer(pPager)).FpWal, db, eMode,
@@ -35947,13 +37812,13 @@ func Xsqlite3PagerCheckpoint(tls *libc.TLS, pPager uintptr, db uintptr, eMode in
return rc
}
-func Xsqlite3PagerWalCallback(tls *libc.TLS, pPager uintptr) int32 { /* sqlite3.c:59576:20: */
+func Xsqlite3PagerWalCallback(tls *libc.TLS, pPager uintptr) int32 { /* sqlite3.c:60073:20: */
return Xsqlite3WalCallback(tls, (*Pager)(unsafe.Pointer(pPager)).FpWal)
}
// Return true if the underlying VFS for the given pager supports the
// primitives necessary for write-ahead logging.
-func Xsqlite3PagerWalSupported(tls *libc.TLS, pPager uintptr) int32 { /* sqlite3.c:59584:20: */
+func Xsqlite3PagerWalSupported(tls *libc.TLS, pPager uintptr) int32 { /* sqlite3.c:60081:20: */
var pMethods uintptr = (*Sqlite3_file)(unsafe.Pointer((*Pager)(unsafe.Pointer(pPager)).Ffd)).FpMethods
if (*Pager)(unsafe.Pointer(pPager)).FnoLock != 0 {
return 0
@@ -35963,7 +37828,7 @@ func Xsqlite3PagerWalSupported(tls *libc.TLS, pPager uintptr) int32 { /* sqlite3
// Attempt to take an exclusive lock on the database file. If a PENDING lock
// is obtained instead, immediately release it.
-func pagerExclusiveLock(tls *libc.TLS, pPager uintptr) int32 { /* sqlite3.c:59594:12: */
+func pagerExclusiveLock(tls *libc.TLS, pPager uintptr) int32 { /* sqlite3.c:60091:12: */
var rc int32 // Return code
rc = pagerLockDb(tls, pPager, EXCLUSIVE_LOCK)
@@ -35980,7 +37845,7 @@ func pagerExclusiveLock(tls *libc.TLS, pPager uintptr) int32 { /* sqlite3.c:5959
// exclusive-locking mode when this function is called, take an EXCLUSIVE
// lock on the database file and use heap-memory to store the wal-index
// in. Otherwise, use the normal shared-memory.
-func pagerOpenWal(tls *libc.TLS, pPager uintptr) int32 { /* sqlite3.c:59614:12: */
+func pagerOpenWal(tls *libc.TLS, pPager uintptr) int32 { /* sqlite3.c:60111:12: */
var rc int32 = SQLITE_OK
// If the pager is already in exclusive-mode, the WAL module will use
@@ -36016,7 +37881,7 @@ func pagerOpenWal(tls *libc.TLS, pPager uintptr) int32 { /* sqlite3.c:59614:12:
// If the pager is open on a temp-file (or in-memory database), or if
// the WAL file is already open, set *pbOpen to 1 and return SQLITE_OK
// without doing anything.
-func Xsqlite3PagerOpenWal(tls *libc.TLS, pPager uintptr, pbOpen uintptr) int32 { /* sqlite3.c:59659:20: */
+func Xsqlite3PagerOpenWal(tls *libc.TLS, pPager uintptr, pbOpen uintptr) int32 { /* sqlite3.c:60156:20: */
var rc int32 = SQLITE_OK // Return code
if !(int32((*Pager)(unsafe.Pointer(pPager)).FtempFile) != 0) && !(int32((*Pager)(unsafe.Pointer(pPager)).FpWal) != 0) {
@@ -36046,7 +37911,7 @@ func Xsqlite3PagerOpenWal(tls *libc.TLS, pPager uintptr, pbOpen uintptr) int32 {
// EXCLUSIVE lock on the database file. If this cannot be obtained, an
// error (SQLITE_BUSY) is returned and the log connection is not closed.
// If successful, the EXCLUSIVE lock is not released before returning.
-func Xsqlite3PagerCloseWal(tls *libc.TLS, pPager uintptr, db uintptr) int32 { /* sqlite3.c:59698:20: */
+func Xsqlite3PagerCloseWal(tls *libc.TLS, pPager uintptr, db uintptr) int32 { /* sqlite3.c:60195:20: */
bp := tls.Alloc(4)
defer tls.Free(4)
@@ -36086,7 +37951,7 @@ func Xsqlite3PagerCloseWal(tls *libc.TLS, pPager uintptr, db uintptr) int32 { /*
// If this is a WAL database, obtain a snapshot handle for the snapshot
// currently open. Otherwise, return an error.
-func Xsqlite3PagerSnapshotGet(tls *libc.TLS, pPager uintptr, ppSnapshot uintptr) int32 { /* sqlite3.c:59767:20: */
+func Xsqlite3PagerSnapshotGet(tls *libc.TLS, pPager uintptr, ppSnapshot uintptr) int32 { /* sqlite3.c:60264:20: */
var rc int32 = SQLITE_ERROR
if (*Pager)(unsafe.Pointer(pPager)).FpWal != 0 {
rc = Xsqlite3WalSnapshotGet(tls, (*Pager)(unsafe.Pointer(pPager)).FpWal, ppSnapshot)
@@ -36097,7 +37962,7 @@ func Xsqlite3PagerSnapshotGet(tls *libc.TLS, pPager uintptr, ppSnapshot uintptr)
// If this is a WAL database, store a pointer to pSnapshot. Next time a
// read transaction is opened, attempt to read from the snapshot it
// identifies. If this is not a WAL database, return an error.
-func Xsqlite3PagerSnapshotOpen(tls *libc.TLS, pPager uintptr, pSnapshot uintptr) int32 { /* sqlite3.c:59780:20: */
+func Xsqlite3PagerSnapshotOpen(tls *libc.TLS, pPager uintptr, pSnapshot uintptr) int32 { /* sqlite3.c:60277:20: */
var rc int32 = SQLITE_OK
if (*Pager)(unsafe.Pointer(pPager)).FpWal != 0 {
Xsqlite3WalSnapshotOpen(tls, (*Pager)(unsafe.Pointer(pPager)).FpWal, pSnapshot)
@@ -36109,7 +37974,7 @@ func Xsqlite3PagerSnapshotOpen(tls *libc.TLS, pPager uintptr, pSnapshot uintptr)
// If this is a WAL database, call sqlite3WalSnapshotRecover(). If this
// is not a WAL database, return an error.
-func Xsqlite3PagerSnapshotRecover(tls *libc.TLS, pPager uintptr) int32 { /* sqlite3.c:59797:20: */
+func Xsqlite3PagerSnapshotRecover(tls *libc.TLS, pPager uintptr) int32 { /* sqlite3.c:60294:20: */
var rc int32
if (*Pager)(unsafe.Pointer(pPager)).FpWal != 0 {
rc = Xsqlite3WalSnapshotRecover(tls, (*Pager)(unsafe.Pointer(pPager)).FpWal)
@@ -36129,7 +37994,7 @@ func Xsqlite3PagerSnapshotRecover(tls *libc.TLS, pPager uintptr) int32 { /* sqli
// the CHECKPOINTER lock cannot be obtained, SQLITE_BUSY. If any error
// occurs (any value other than SQLITE_OK is returned), the CHECKPOINTER
// lock is released before returning.
-func Xsqlite3PagerSnapshotCheck(tls *libc.TLS, pPager uintptr, pSnapshot uintptr) int32 { /* sqlite3.c:59819:20: */
+func Xsqlite3PagerSnapshotCheck(tls *libc.TLS, pPager uintptr, pSnapshot uintptr) int32 { /* sqlite3.c:60316:20: */
var rc int32
if (*Pager)(unsafe.Pointer(pPager)).FpWal != 0 {
rc = Xsqlite3WalSnapshotCheck(tls, (*Pager)(unsafe.Pointer(pPager)).FpWal, pSnapshot)
@@ -36141,7 +38006,7 @@ func Xsqlite3PagerSnapshotCheck(tls *libc.TLS, pPager uintptr, pSnapshot uintptr
// Release a lock obtained by an earlier successful call to
// sqlite3PagerSnapshotCheck().
-func Xsqlite3PagerSnapshotUnlock(tls *libc.TLS, pPager uintptr) { /* sqlite3.c:59833:21: */
+func Xsqlite3PagerSnapshotUnlock(tls *libc.TLS, pPager uintptr) { /* sqlite3.c:60330:21: */
Xsqlite3WalSnapshotUnlock(tls, (*Pager)(unsafe.Pointer(pPager)).FpWal)
}
@@ -36435,7 +38300,7 @@ type WalIndexHdr1 = struct {
FaFrameCksum [2]U32
FaSalt [2]U32
FaCksum [2]U32
-} /* sqlite3.c:1312:9 */
+} /* sqlite3.c:1331:9 */
//************* End of pager.c **********************************************
//************* Begin file wal.c ********************************************
@@ -36714,30 +38579,30 @@ type WalIndexHdr1 = struct {
// byte.
// Object declarations
-type WalIndexHdr = WalIndexHdr1 /* sqlite3.c:60158:28 */
+type WalIndexHdr = WalIndexHdr1 /* sqlite3.c:60655:28 */
type WalIterator1 = struct {
FiPrior U32
FnSegment int32
FaSegment [1]struct {
- FiNext int32
- _ [4]byte
- FaIndex uintptr
- FaPgno uintptr
- FnEntry int32
- FiZero int32
+ FiNext int32
+ F__ccgo_pad1 [4]byte
+ FaIndex uintptr
+ FaPgno uintptr
+ FnEntry int32
+ FiZero int32
}
-} /* sqlite3.c:60159:9 */
+} /* sqlite3.c:60656:9 */
-type WalIterator = WalIterator1 /* sqlite3.c:60159:28 */
+type WalIterator = WalIterator1 /* sqlite3.c:60656:28 */
type WalCkptInfo1 = struct {
FnBackfill U32
FaReadMark [5]U32
FaLock [8]U8
FnBackfillAttempted U32
FnotUsed0 U32
-} /* sqlite3.c:60160:9 */
+} /* sqlite3.c:60657:9 */
-type WalCkptInfo = WalCkptInfo1 /* sqlite3.c:60160:28 */
+type WalCkptInfo = WalCkptInfo1 /* sqlite3.c:60657:28 */
// Candidate values for Wal.exclusiveMode.
@@ -36745,7 +38610,7 @@ type WalCkptInfo = WalCkptInfo1 /* sqlite3.c:60160:28 */
// Each page of the wal-index mapping contains a hash-table made up of
// an array of HASHTABLE_NSLOT elements of the following type.
-type Ht_slot = U16 /* sqlite3.c:60351:13 */
+type Ht_slot = U16 /* sqlite3.c:60848:13 */
// This structure is used to implement an iterator that loops through
// all frames in the WAL in database page order. Where two or more frames
@@ -36761,13 +38626,13 @@ type Ht_slot = U16 /* sqlite3.c:60351:13 */
//
// This functionality is used by the checkpoint code (see walCheckpoint()).
type WalSegment = struct {
- FiNext int32
- _ [4]byte
- FaIndex uintptr
- FaPgno uintptr
- FnEntry int32
- FiZero int32
-} /* sqlite3.c:60159:9 */
+ FiNext int32
+ F__ccgo_pad1 [4]byte
+ FaIndex uintptr
+ FaPgno uintptr
+ FnEntry int32
+ FiZero int32
+} /* sqlite3.c:60656:9 */
// Define the parameters of the hash tables in the wal-index file. There
// is a hash-table following every HASHTABLE_NPAGE page numbers in the
@@ -36794,7 +38659,7 @@ type WalSegment = struct {
// If this call is successful, *ppPage is set to point to the wal-index
// page and SQLITE_OK is returned. If an error (an OOM or VFS error) occurs,
// then an SQLite error code is returned and *ppPage is set to 0.
-func walIndexPageRealloc(tls *libc.TLS, pWal uintptr, iPage int32, ppPage uintptr) int32 { /* sqlite3.c:60418:28: */
+func walIndexPageRealloc(tls *libc.TLS, pWal uintptr, iPage int32, ppPage uintptr) int32 { /* sqlite3.c:60915:28: */
var rc int32 = SQLITE_OK
// Enlarge the pWal->apWiData[] array if required
@@ -36802,13 +38667,13 @@ func walIndexPageRealloc(tls *libc.TLS, pWal uintptr, iPage int32, ppPage uintpt
var nByte Sqlite3_int64 = (Sqlite3_int64(uint64(unsafe.Sizeof(uintptr(0))) * (uint64(iPage + 1))))
var apNew uintptr
libc.AtomicStoreUintptr(&apNew, uintptr(Xsqlite3Realloc(tls, (*Wal)(unsafe.Pointer(pWal)).FapWiData, uint64(nByte))))
- if !(libc.AtomicLoadUintptr(&apNew) != 0) {
- *(*uintptr)(unsafe.Pointer(libc.AtomicLoadUintptr(&ppPage))) = uintptr(0)
+ if !(apNew != 0) {
+ *(*uintptr)(unsafe.Pointer(ppPage)) = uintptr(0)
return SQLITE_NOMEM
}
- libc.Xmemset(tls, (libc.AtomicLoadUintptr(&apNew) + uintptr((*Wal)(unsafe.Pointer(pWal)).FnWiData)*8), 0,
+ libc.Xmemset(tls, (apNew + uintptr((*Wal)(unsafe.Pointer(pWal)).FnWiData)*8), 0,
(uint64(unsafe.Sizeof(uintptr(0))) * (uint64((iPage + 1) - (*Wal)(unsafe.Pointer(pWal)).FnWiData))))
- (*Wal)(unsafe.Pointer(pWal)).FapWiData = libc.AtomicLoadUintptr(&apNew)
+ (*Wal)(unsafe.Pointer(pWal)).FapWiData = apNew
(*Wal)(unsafe.Pointer(pWal)).FnWiData = (iPage + 1)
}
@@ -36835,26 +38700,26 @@ func walIndexPageRealloc(tls *libc.TLS, pWal uintptr, iPage int32, ppPage uintpt
}
}
- *(*uintptr)(unsafe.Pointer(libc.AtomicLoadUintptr(&ppPage))) = *(*uintptr)(unsafe.Pointer((*Wal)(unsafe.Pointer(pWal)).FapWiData + uintptr(iPage)*8))
+ *(*uintptr)(unsafe.Pointer(ppPage)) = *(*uintptr)(unsafe.Pointer((*Wal)(unsafe.Pointer(pWal)).FapWiData + uintptr(iPage)*8))
return rc
}
-func walIndexPage(tls *libc.TLS, pWal uintptr, iPage int32, ppPage uintptr) int32 { /* sqlite3.c:60465:12: */
- if ((*Wal)(unsafe.Pointer(pWal)).FnWiData <= iPage) || ((libc.AssignPtrUintptr(libc.AtomicLoadUintptr(&ppPage), *(*uintptr)(unsafe.Pointer((*Wal)(unsafe.Pointer(pWal)).FapWiData + uintptr(iPage)*8)))) == uintptr(0)) {
- return walIndexPageRealloc(tls, pWal, iPage, libc.AtomicLoadUintptr(&ppPage))
+func walIndexPage(tls *libc.TLS, pWal uintptr, iPage int32, ppPage uintptr) int32 { /* sqlite3.c:60962:12: */
+ if ((*Wal)(unsafe.Pointer(pWal)).FnWiData <= iPage) || ((libc.AssignPtrUintptr(ppPage, *(*uintptr)(unsafe.Pointer((*Wal)(unsafe.Pointer(pWal)).FapWiData + uintptr(iPage)*8)))) == uintptr(0)) {
+ return walIndexPageRealloc(tls, pWal, iPage, ppPage)
}
return SQLITE_OK
}
// Return a pointer to the WalCkptInfo structure in the wal-index.
-func walCkptInfo(tls *libc.TLS, pWal uintptr) uintptr { /* sqlite3.c:60479:29: */
+func walCkptInfo(tls *libc.TLS, pWal uintptr) uintptr { /* sqlite3.c:60976:29: */
return (*(*uintptr)(unsafe.Pointer((*Wal)(unsafe.Pointer(pWal)).FapWiData)) + 24*4)
}
// Return a pointer to the WalIndexHdr structure in the wal-index.
-func walIndexHdr(tls *libc.TLS, pWal uintptr) uintptr { /* sqlite3.c:60487:29: */
+func walIndexHdr(tls *libc.TLS, pWal uintptr) uintptr { /* sqlite3.c:60984:29: */
return *(*uintptr)(unsafe.Pointer((*Wal)(unsafe.Pointer(pWal)).FapWiData))
}
@@ -36872,7 +38737,7 @@ func walIndexHdr(tls *libc.TLS, pWal uintptr) uintptr { /* sqlite3.c:60487:29: *
// The checksum is written back into aOut[] before returning.
//
// nByte must be a positive multiple of 8.
-func walChecksumBytes(tls *libc.TLS, nativeCksum int32, a uintptr, nByte int32, aIn uintptr, aOut uintptr) { /* sqlite3.c:60513:13: */
+func walChecksumBytes(tls *libc.TLS, nativeCksum int32, a uintptr, nByte int32, aIn uintptr, aOut uintptr) { /* sqlite3.c:61010:13: */
var s1 U32
var s2 U32
var aData uintptr = a
@@ -36904,7 +38769,7 @@ func walChecksumBytes(tls *libc.TLS, nativeCksum int32, a uintptr, nByte int32,
// If there is the possibility of concurrent access to the SHM file
// from multiple threads and/or processes, then do a memory barrier.
-func walShmBarrier(tls *libc.TLS, pWal uintptr) { /* sqlite3.c:60556:13: */
+func walShmBarrier(tls *libc.TLS, pWal uintptr) { /* sqlite3.c:61053:13: */
if int32((*Wal)(unsafe.Pointer(pWal)).FexclusiveMode) != WAL_HEAPMEMORY_MODE {
Xsqlite3OsShmBarrier(tls, (*Wal)(unsafe.Pointer(pWal)).FpDbFd)
}
@@ -36919,7 +38784,7 @@ func walShmBarrier(tls *libc.TLS, pWal uintptr) { /* sqlite3.c:60556:13: */
// Write the header information in pWal->hdr into the wal-index.
//
// The checksum on pWal->hdr is updated before it is written.
-func walIndexWriteHdr(tls *libc.TLS, pWal uintptr) { /* sqlite3.c:60580:28: */
+func walIndexWriteHdr(tls *libc.TLS, pWal uintptr) { /* sqlite3.c:61077:28: */
var aHdr uintptr = walIndexHdr(tls, pWal)
var nCksum int32 = int32((uintptr(0) + 40 /* &.aCksum */))
@@ -36927,9 +38792,9 @@ func walIndexWriteHdr(tls *libc.TLS, pWal uintptr) { /* sqlite3.c:60580:28: */
(*Wal)(unsafe.Pointer(pWal)).Fhdr.FiVersion = U32(WALINDEX_MAX_VERSION)
walChecksumBytes(tls, 1, (pWal + 72 /* &.hdr */), nCksum, uintptr(0), pWal+72 /* &.hdr */ +40 /* &.aCksum */)
// Possible TSAN false-positive. See tag-20200519-1
- libc.Xmemcpy(tls, (libc.AtomicLoadUintptr(&aHdr) + 1*48), (pWal + 72 /* &.hdr */), uint64(unsafe.Sizeof(WalIndexHdr{})))
+ libc.Xmemcpy(tls, (aHdr + 1*48), (pWal + 72 /* &.hdr */), uint64(unsafe.Sizeof(WalIndexHdr{})))
walShmBarrier(tls, pWal)
- libc.Xmemcpy(tls, (libc.AtomicLoadUintptr(&aHdr)), (pWal + 72 /* &.hdr */), uint64(unsafe.Sizeof(WalIndexHdr{})))
+ libc.Xmemcpy(tls, (aHdr), (pWal + 72 /* &.hdr */), uint64(unsafe.Sizeof(WalIndexHdr{})))
}
// This function encodes a single frame header and writes it to a buffer
@@ -36943,7 +38808,7 @@ func walIndexWriteHdr(tls *libc.TLS, pWal uintptr) { /* sqlite3.c:60580:28: */
// 12: Salt-2 (copied from the wal-header)
// 16: Checksum-1.
// 20: Checksum-2.
-func walEncodeFrame(tls *libc.TLS, pWal uintptr, iPage U32, nTruncate U32, aData uintptr, aFrame uintptr) { /* sqlite3.c:60607:13: */
+func walEncodeFrame(tls *libc.TLS, pWal uintptr, iPage U32, nTruncate U32, aData uintptr, aFrame uintptr) { /* sqlite3.c:61104:13: */
var nativeCksum int32 // True for native byte-order checksums
var aCksum uintptr = pWal + 72 /* &.hdr */ + 24 /* &.aFrameCksum */
@@ -36952,7 +38817,7 @@ func walEncodeFrame(tls *libc.TLS, pWal uintptr, iPage U32, nTruncate U32, aData
if (*Wal)(unsafe.Pointer(pWal)).FiReCksum == U32(0) {
libc.Xmemcpy(tls, (aFrame + 8), pWal+72 /* &.hdr */ +32 /* &.aSalt */, uint64(8))
- nativeCksum = (libc.Bool32(int32((*Wal)(unsafe.Pointer(pWal)).Fhdr.FbigEndCksum) == (libc.Bool32(int32(*(*int8)(unsafe.Pointer(uintptr(unsafe.Pointer(&Xsqlite3one))))) == 0))))
+ nativeCksum = (libc.Bool32(int32((*Wal)(unsafe.Pointer(pWal)).Fhdr.FbigEndCksum) == (libc.Bool32(int32(*(*uint8)(unsafe.Pointer(uintptr(unsafe.Pointer(&Xsqlite3one))))) == 0))))
walChecksumBytes(tls, nativeCksum, aFrame, 8, aCksum, aCksum)
walChecksumBytes(tls, nativeCksum, aData, int32((*Wal)(unsafe.Pointer(pWal)).FszPage), aCksum, aCksum)
@@ -36966,7 +38831,7 @@ func walEncodeFrame(tls *libc.TLS, pWal uintptr, iPage U32, nTruncate U32, aData
// Check to see if the frame with header in aFrame[] and content
// in aData[] is valid. If it is a valid frame, fill *piPage and
// *pnTruncate and return true. Return if the frame is not valid.
-func walDecodeFrame(tls *libc.TLS, pWal uintptr, piPage uintptr, pnTruncate uintptr, aData uintptr, aFrame uintptr) int32 { /* sqlite3.c:60638:12: */
+func walDecodeFrame(tls *libc.TLS, pWal uintptr, piPage uintptr, pnTruncate uintptr, aData uintptr, aFrame uintptr) int32 { /* sqlite3.c:61135:12: */
var nativeCksum int32 // True for native byte-order checksums
var aCksum uintptr = pWal + 72 /* &.hdr */ + 24 /* &.aFrameCksum */
var pgno U32 // Page number of the frame
@@ -36987,7 +38852,7 @@ func walDecodeFrame(tls *libc.TLS, pWal uintptr, piPage uintptr, pnTruncate uint
// all prior frams, the first 16 bytes of this frame-header,
// and the frame-data matches the checksum in the last 8
// bytes of this frame-header.
- nativeCksum = (libc.Bool32(int32((*Wal)(unsafe.Pointer(pWal)).Fhdr.FbigEndCksum) == (libc.Bool32(int32(*(*int8)(unsafe.Pointer(uintptr(unsafe.Pointer(&Xsqlite3one))))) == 0))))
+ nativeCksum = (libc.Bool32(int32((*Wal)(unsafe.Pointer(pWal)).Fhdr.FbigEndCksum) == (libc.Bool32(int32(*(*uint8)(unsafe.Pointer(uintptr(unsafe.Pointer(&Xsqlite3one))))) == 0))))
walChecksumBytes(tls, nativeCksum, aFrame, 8, aCksum, aCksum)
walChecksumBytes(tls, nativeCksum, aData, int32((*Wal)(unsafe.Pointer(pWal)).FszPage), aCksum, aCksum)
if (*(*U32)(unsafe.Pointer(aCksum)) != Xsqlite3Get4byte(tls, (aFrame+16))) ||
@@ -37008,7 +38873,7 @@ func walDecodeFrame(tls *libc.TLS, pWal uintptr, piPage uintptr, pnTruncate uint
// through the unlocked state first.
//
// In locking_mode=EXCLUSIVE, all of these routines become no-ops.
-func walLockShared(tls *libc.TLS, pWal uintptr, lockIdx int32) int32 { /* sqlite3.c:60717:12: */
+func walLockShared(tls *libc.TLS, pWal uintptr, lockIdx int32) int32 { /* sqlite3.c:61214:12: */
var rc int32
if (*Wal)(unsafe.Pointer(pWal)).FexclusiveMode != 0 {
return SQLITE_OK
@@ -37019,7 +38884,7 @@ func walLockShared(tls *libc.TLS, pWal uintptr, lockIdx int32) int32 { /* sqlite
return rc
}
-func walUnlockShared(tls *libc.TLS, pWal uintptr, lockIdx int32) { /* sqlite3.c:60727:13: */
+func walUnlockShared(tls *libc.TLS, pWal uintptr, lockIdx int32) { /* sqlite3.c:61224:13: */
if (*Wal)(unsafe.Pointer(pWal)).FexclusiveMode != 0 {
return
}
@@ -37028,7 +38893,7 @@ func walUnlockShared(tls *libc.TLS, pWal uintptr, lockIdx int32) { /* sqlite3.c:
}
-func walLockExclusive(tls *libc.TLS, pWal uintptr, lockIdx int32, n int32) int32 { /* sqlite3.c:60733:12: */
+func walLockExclusive(tls *libc.TLS, pWal uintptr, lockIdx int32, n int32) int32 { /* sqlite3.c:61230:12: */
var rc int32
if (*Wal)(unsafe.Pointer(pWal)).FexclusiveMode != 0 {
return SQLITE_OK
@@ -37039,7 +38904,7 @@ func walLockExclusive(tls *libc.TLS, pWal uintptr, lockIdx int32, n int32) int32
return rc
}
-func walUnlockExclusive(tls *libc.TLS, pWal uintptr, lockIdx int32, n int32) { /* sqlite3.c:60743:13: */
+func walUnlockExclusive(tls *libc.TLS, pWal uintptr, lockIdx int32, n int32) { /* sqlite3.c:61240:13: */
if (*Wal)(unsafe.Pointer(pWal)).FexclusiveMode != 0 {
return
}
@@ -37051,12 +38916,12 @@ func walUnlockExclusive(tls *libc.TLS, pWal uintptr, lockIdx int32, n int32) { /
// Compute a hash on a page number. The resulting hash value must land
// between 0 and (HASHTABLE_NSLOT-1). The walHashNext() function advances
// the hash to the next value in the event of a collision.
-func walHash(tls *libc.TLS, iPage U32) int32 { /* sqlite3.c:60756:12: */
+func walHash(tls *libc.TLS, iPage U32) int32 { /* sqlite3.c:61253:12: */
return (int32((iPage * U32(HASHTABLE_HASH_1)) & (U32((HASHTABLE_NPAGE * 2) - 1))))
}
-func walNextHash(tls *libc.TLS, iPriorHash int32) int32 { /* sqlite3.c:60761:12: */
+func walNextHash(tls *libc.TLS, iPriorHash int32) int32 { /* sqlite3.c:61258:12: */
return ((iPriorHash + 1) & ((HASHTABLE_NPAGE * 2) - 1))
}
@@ -37064,16 +38929,16 @@ func walNextHash(tls *libc.TLS, iPriorHash int32) int32 { /* sqlite3.c:60761:12:
// of a page hash table in the wal-index. This becomes the return value
// from walHashGet().
type WalHashLoc1 = struct {
- FaHash uintptr
- FaPgno uintptr
- FiZero U32
- _ [4]byte
-} /* sqlite3.c:60770:9 */
+ FaHash uintptr
+ FaPgno uintptr
+ FiZero U32
+ F__ccgo_pad1 [4]byte
+} /* sqlite3.c:61267:9 */
// An instance of the WalHashLoc object is used to describe the location
// of a page hash table in the wal-index. This becomes the return value
// from walHashGet().
-type WalHashLoc = WalHashLoc1 /* sqlite3.c:60770:27 */
+type WalHashLoc = WalHashLoc1 /* sqlite3.c:61267:27 */
// Return pointers to the hash table and page number array stored on
// page iHash of the wal-index. The wal-index is broken into 32KB pages
@@ -37087,7 +38952,7 @@ type WalHashLoc = WalHashLoc1 /* sqlite3.c:60770:27 */
//
// Finally, set pLoc->aPgno so that pLoc->aPgno[1] is the page number of the
// first frame indexed by the hash table, frame (pLoc->iZero+1).
-func walHashGet(tls *libc.TLS, pWal uintptr, iHash int32, pLoc uintptr) int32 { /* sqlite3.c:60791:12: */
+func walHashGet(tls *libc.TLS, pWal uintptr, iHash int32, pLoc uintptr) int32 { /* sqlite3.c:61288:12: */
var rc int32 // Return code
rc = walIndexPage(tls, pWal, iHash, (pLoc + 8 /* &.aPgno */))
@@ -37109,14 +38974,14 @@ func walHashGet(tls *libc.TLS, pWal uintptr, iHash int32, pLoc uintptr) int32 {
// and page-number array that contain entries corresponding to WAL frame
// iFrame. The wal-index is broken up into 32KB pages. Wal-index pages
// are numbered starting from 0.
-func walFramePage(tls *libc.TLS, iFrame U32) int32 { /* sqlite3.c:60820:12: */
+func walFramePage(tls *libc.TLS, iFrame U32) int32 { /* sqlite3.c:61317:12: */
var iHash int32 = (int32((((uint64(iFrame + U32(HASHTABLE_NPAGE))) - (uint64(HASHTABLE_NPAGE) - (((uint64(unsafe.Sizeof(WalIndexHdr{})) * uint64(2)) + uint64(unsafe.Sizeof(WalCkptInfo{}))) / uint64(unsafe.Sizeof(U32(0)))))) - uint64(1)) / uint64(HASHTABLE_NPAGE)))
return iHash
}
// Return the page number associated with frame iFrame in this WAL.
-func walFramePgno(tls *libc.TLS, pWal uintptr, iFrame U32) U32 { /* sqlite3.c:60835:12: */
+func walFramePgno(tls *libc.TLS, pWal uintptr, iFrame U32) U32 { /* sqlite3.c:61332:12: */
var iHash int32 = walFramePage(tls, iFrame)
if iHash == 0 {
return *(*U32)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer((*Wal)(unsafe.Pointer(pWal)).FapWiData)) + uintptr((((((uint64(unsafe.Sizeof(WalIndexHdr{}))*uint64(2))+uint64(unsafe.Sizeof(WalCkptInfo{})))/uint64(unsafe.Sizeof(U32(0))))+uint64(iFrame))-uint64(1)))*4))
@@ -37134,7 +38999,7 @@ func walFramePgno(tls *libc.TLS, pWal uintptr, iFrame U32) U32 { /* sqlite3.c:60
// updated. Any later hash tables will be automatically cleared when
// pWal->hdr.mxFrame advances to the point where those hash tables are
// actually needed.
-func walCleanupHash(tls *libc.TLS, pWal uintptr) { /* sqlite3.c:60855:13: */
+func walCleanupHash(tls *libc.TLS, pWal uintptr) { /* sqlite3.c:61352:13: */
bp := tls.Alloc(24)
defer tls.Free(24)
@@ -37143,7 +39008,6 @@ func walCleanupHash(tls *libc.TLS, pWal uintptr) { /* sqlite3.c:60855:13: */
var iLimit int32 = 0 // Zero values greater than this
var nByte int32 // Number of bytes to zero in aPgno[]
var i int32 // Used to iterate through aHash[]
- var rc int32 // Return code form walHashGet()
if (*Wal)(unsafe.Pointer(pWal)).Fhdr.FmxFrame == U32(0) {
return
@@ -37153,8 +39017,8 @@ func walCleanupHash(tls *libc.TLS, pWal uintptr) { /* sqlite3.c:60855:13: */
// the entry that corresponds to frame pWal->hdr.mxFrame. It is guaranteed
// that the page said hash-table and array reside on is already mapped.(1)
- rc = walHashGet(tls, pWal, walFramePage(tls, (*Wal)(unsafe.Pointer(pWal)).Fhdr.FmxFrame), bp /* &sLoc */)
- if rc != 0 {
+ i = walHashGet(tls, pWal, walFramePage(tls, (*Wal)(unsafe.Pointer(pWal)).Fhdr.FmxFrame), bp /* &sLoc */)
+ if i != 0 {
return
} // Defense-in-depth, in case (1) above is wrong
@@ -37177,7 +39041,7 @@ func walCleanupHash(tls *libc.TLS, pWal uintptr) { /* sqlite3.c:60855:13: */
// Set an entry in the wal-index that will map database page number
// pPage into WAL frame iFrame.
-func walIndexAppend(tls *libc.TLS, pWal uintptr, iFrame U32, iPage U32) int32 { /* sqlite3.c:60917:12: */
+func walIndexAppend(tls *libc.TLS, pWal uintptr, iFrame U32, iPage U32) int32 { /* sqlite3.c:61413:12: */
bp := tls.Alloc(24)
defer tls.Free(24)
@@ -37218,7 +39082,7 @@ func walIndexAppend(tls *libc.TLS, pWal uintptr, iFrame U32, iPage U32) int32 {
nCollide = idx
for iKey = walHash(tls, iPage); *(*Ht_slot)(unsafe.Pointer((*WalHashLoc)(unsafe.Pointer(bp /* &sLoc */)).FaHash + uintptr(iKey)*2)) != 0; iKey = walNextHash(tls, iKey) {
if (libc.PostDecInt32(&nCollide, 1)) == 0 {
- return Xsqlite3CorruptError(tls, 60957)
+ return Xsqlite3CorruptError(tls, 61453)
}
}
*(*U32)(unsafe.Pointer((*WalHashLoc)(unsafe.Pointer(bp /* &sLoc */)).FaPgno + uintptr(idx)*4)) = iPage
@@ -37237,7 +39101,7 @@ func walIndexAppend(tls *libc.TLS, pWal uintptr, iFrame U32, iPage U32) int32 {
// WAL_RECOVER_LOCK is also held so that other threads will know
// that this thread is running recovery. If unable to establish
// the necessary locks, this routine returns SQLITE_BUSY.
-func walIndexRecover(tls *libc.TLS, pWal uintptr) int32 { /* sqlite3.c:61007:12: */
+func walIndexRecover(tls *libc.TLS, pWal uintptr) int32 { /* sqlite3.c:61503:12: */
bp := tls.Alloc(80)
defer tls.Free(80)
@@ -37336,7 +39200,7 @@ __5:
libc.Xmemcpy(tls, (pWal + 72 /* &.hdr */ + 32 /* &.aSalt */), (bp + 24 /* &aBuf */ + 16), uint64(8))
// Verify that the WAL header checksum is correct
- walChecksumBytes(tls, (libc.Bool32(int32((*Wal)(unsafe.Pointer(pWal)).Fhdr.FbigEndCksum) == (libc.Bool32(int32(*(*int8)(unsafe.Pointer(uintptr(unsafe.Pointer(&Xsqlite3one))))) == 0)))),
+ walChecksumBytes(tls, (libc.Bool32(int32((*Wal)(unsafe.Pointer(pWal)).Fhdr.FbigEndCksum) == (libc.Bool32(int32(*(*uint8)(unsafe.Pointer(uintptr(unsafe.Pointer(&Xsqlite3one))))) == 0)))),
bp+24 /* &aBuf[0] */, (WAL_HDRSIZE - (2 * 4)), uintptr(0), pWal+72 /* &.hdr */ +24 /* &.aFrameCksum */)
if !((*(*U32)(unsafe.Pointer((pWal + 72 /* &.hdr */ + 24 /* &.aFrameCksum */))) != Xsqlite3Get4byte(tls, (bp+24 /* &aBuf */ +24))) ||
(*(*U32)(unsafe.Pointer((pWal + 72 /* &.hdr */ + 24 /* &.aFrameCksum */) + 1*4)) != Xsqlite3Get4byte(tls, (bp+24 /* &aBuf */ +28)))) {
@@ -37352,7 +39216,7 @@ __6:
if !(version != U32(WAL_MAX_VERSION)) {
goto __7
}
- rc = Xsqlite3CantopenError(tls, 61090)
+ rc = Xsqlite3CantopenError(tls, 61586)
goto finished
__7:
;
@@ -37493,9 +39357,9 @@ finished:
// currently holding locks that exclude all other writers and
// checkpointers. Then set the values of read-mark slots 1 through N.
libc.AtomicStoreUintptr(&pInfo, uintptr(walCkptInfo(tls, pWal)))
- (*WalCkptInfo)(unsafe.Pointer(libc.AtomicLoadUintptr(&pInfo))).FnBackfill = U32(0)
- (*WalCkptInfo)(unsafe.Pointer(libc.AtomicLoadUintptr(&pInfo))).FnBackfillAttempted = (*Wal)(unsafe.Pointer(pWal)).Fhdr.FmxFrame
- *(*U32)(unsafe.Pointer((libc.AtomicLoadUintptr(&pInfo) + 4 /* &.aReadMark */))) = U32(0)
+ (*WalCkptInfo)(unsafe.Pointer(pInfo)).FnBackfill = U32(0)
+ (*WalCkptInfo)(unsafe.Pointer(pInfo)).FnBackfillAttempted = (*Wal)(unsafe.Pointer(pWal)).Fhdr.FmxFrame
+ *(*U32)(unsafe.Pointer((pInfo + 4 /* &.aReadMark */))) = U32(0)
i = 1
__22:
if !(i < (SQLITE_SHM_NLOCK - 3)) {
@@ -37508,10 +39372,10 @@ __22:
if !((i == 1) && ((*Wal)(unsafe.Pointer(pWal)).Fhdr.FmxFrame != 0)) {
goto __27
}
- *(*U32)(unsafe.Pointer((libc.AtomicLoadUintptr(&pInfo) + 4 /* &.aReadMark */) + uintptr(i)*4)) = (*Wal)(unsafe.Pointer(pWal)).Fhdr.FmxFrame
+ *(*U32)(unsafe.Pointer((pInfo + 4 /* &.aReadMark */) + uintptr(i)*4)) = (*Wal)(unsafe.Pointer(pWal)).Fhdr.FmxFrame
goto __28
__27:
- *(*U32)(unsafe.Pointer((libc.AtomicLoadUintptr(&pInfo) + 4 /* &.aReadMark */) + uintptr(i)*4)) = READMARK_NOT_USED
+ *(*U32)(unsafe.Pointer((pInfo + 4 /* &.aReadMark */) + uintptr(i)*4)) = READMARK_NOT_USED
__28:
;
walUnlockExclusive(tls, pWal, (3 + (i)), 1)
@@ -37541,7 +39405,7 @@ __24:
goto __30
}
Xsqlite3_log(tls, (SQLITE_NOTICE | (int32(1) << 8)),
- ts+2948, /* "recovered %d fra..." */
+ ts+3079, /* "recovered %d fra..." */
libc.VaList(bp, (*Wal)(unsafe.Pointer(pWal)).Fhdr.FmxFrame, (*Wal)(unsafe.Pointer(pWal)).FzWalName))
__30:
;
@@ -37555,7 +39419,7 @@ recovery_error:
}
// Close an open wal-index.
-func walIndexClose(tls *libc.TLS, pWal uintptr, isDelete int32) { /* sqlite3.c:61229:13: */
+func walIndexClose(tls *libc.TLS, pWal uintptr, isDelete int32) { /* sqlite3.c:61725:13: */
if (int32((*Wal)(unsafe.Pointer(pWal)).FexclusiveMode) == WAL_HEAPMEMORY_MODE) || ((*Wal)(unsafe.Pointer(pWal)).FbShmUnreliable != 0) {
var i int32
for i = 0; i < (*Wal)(unsafe.Pointer(pWal)).FnWiData; i++ {
@@ -37581,7 +39445,7 @@ func walIndexClose(tls *libc.TLS, pWal uintptr, isDelete int32) { /* sqlite3.c:6
// If the log file is successfully opened, SQLITE_OK is returned and
// *ppWal is set to point to a new WAL handle. If an error occurs,
// an SQLite error code is returned and *ppWal is left unmodified.
-func Xsqlite3WalOpen(tls *libc.TLS, pVfs uintptr, pDbFd uintptr, zWalName uintptr, bNoShm int32, mxWalSize I64, ppWal uintptr) int32 { /* sqlite3.c:61257:20: */
+func Xsqlite3WalOpen(tls *libc.TLS, pVfs uintptr, pDbFd uintptr, zWalName uintptr, bNoShm int32, mxWalSize I64, ppWal uintptr) int32 { /* sqlite3.c:61753:20: */
bp := tls.Alloc(4)
defer tls.Free(4)
@@ -37644,7 +39508,7 @@ func Xsqlite3WalOpen(tls *libc.TLS, pVfs uintptr, pDbFd uintptr, zWalName uintpt
}
// Change the size to which the WAL file is trucated on each reset.
-func Xsqlite3WalLimit(tls *libc.TLS, pWal uintptr, iLimit I64) { /* sqlite3.c:61331:21: */
+func Xsqlite3WalLimit(tls *libc.TLS, pWal uintptr, iLimit I64) { /* sqlite3.c:61827:21: */
if pWal != 0 {
(*Wal)(unsafe.Pointer(pWal)).FmxWalSize = iLimit
}
@@ -37658,7 +39522,7 @@ func Xsqlite3WalLimit(tls *libc.TLS, pWal uintptr, iLimit I64) { /* sqlite3.c:61
//
// Return 0 on success. If there are no pages in the WAL with a page
// number larger than *piPage, then return 1.
-func walIteratorNext(tls *libc.TLS, p uintptr, piPage uintptr, piFrame uintptr) int32 { /* sqlite3.c:61345:12: */
+func walIteratorNext(tls *libc.TLS, p uintptr, piPage uintptr, piFrame uintptr) int32 { /* sqlite3.c:61841:12: */
var iMin U32 // Result pgno must be greater than iMin
var iRet U32 = 0xFFFFFFFF // 0xffffffff is never a valid page number
var i int32 // For looping through segments
@@ -37705,7 +39569,7 @@ func walIteratorNext(tls *libc.TLS, p uintptr, piPage uintptr, piFrame uintptr)
// aLeft[X]!=aRight[Y] && aContent[aLeft[X]] == aContent[aRight[Y]]
//
// When that happens, omit the aLeft[X] and use the aRight[Y] index.
-func walMerge(tls *libc.TLS, aContent uintptr, aLeft uintptr, nLeft int32, paRight uintptr, pnRight uintptr, aTmp uintptr) { /* sqlite3.c:61398:13: */
+func walMerge(tls *libc.TLS, aContent uintptr, aLeft uintptr, nLeft int32, paRight uintptr, pnRight uintptr, aTmp uintptr) { /* sqlite3.c:61894:13: */
var iLeft int32 = 0 // Current index in aLeft
var iRight int32 = 0 // Current index in aRight
var iOut int32 = 0 // Current index in output buffer
@@ -37751,7 +39615,7 @@ func walMerge(tls *libc.TLS, aContent uintptr, aLeft uintptr, nLeft int32, paRig
//
// Keep the larger of the two values aList[X] and aList[Y] and discard
// the smaller.
-func walMergesort(tls *libc.TLS, aContent uintptr, aBuffer uintptr, aList uintptr, pnList uintptr) { /* sqlite3.c:61455:13: */
+func walMergesort(tls *libc.TLS, aContent uintptr, aBuffer uintptr, aList uintptr, pnList uintptr) { /* sqlite3.c:61951:13: */
bp := tls.Alloc(220)
defer tls.Free(220)
@@ -37794,13 +39658,13 @@ func walMergesort(tls *libc.TLS, aContent uintptr, aBuffer uintptr, aList uintpt
}
type Sublist = struct {
- FnList int32
- _ [4]byte
- FaList uintptr
-} /* sqlite3.c:61461:3 */
+ FnList int32
+ F__ccgo_pad1 [4]byte
+ FaList uintptr
+} /* sqlite3.c:61957:3 */
// Free an iterator allocated by walIteratorInit().
-func walIteratorFree(tls *libc.TLS, p uintptr) { /* sqlite3.c:61518:13: */
+func walIteratorFree(tls *libc.TLS, p uintptr) { /* sqlite3.c:62014:13: */
Xsqlite3_free(tls, p)
}
@@ -37815,7 +39679,7 @@ func walIteratorFree(tls *libc.TLS, p uintptr) { /* sqlite3.c:61518:13: */
//
// The calling routine should invoke walIteratorFree() to destroy the
// WalIterator object when it has finished with it.
-func walIteratorInit(tls *libc.TLS, pWal uintptr, nBackfill U32, pp uintptr) int32 { /* sqlite3.c:61535:12: */
+func walIteratorInit(tls *libc.TLS, pWal uintptr, nBackfill U32, pp uintptr) int32 { /* sqlite3.c:62031:12: */
bp := tls.Alloc(28)
defer tls.Free(28)
@@ -37900,9 +39764,11 @@ func walIteratorInit(tls *libc.TLS, pWal uintptr, nBackfill U32, pp uintptr) int
// n. If the attempt fails and parameter xBusy is not NULL, then it is a
// busy-handler function. Invoke it and retry the lock until either the
// lock is successfully obtained or the busy-handler returns 0.
-func walBusyLock(tls *libc.TLS, pWal uintptr, xBusy uintptr, pBusyArg uintptr, lockIdx int32, n int32) int32 { /* sqlite3.c:61699:12: */
+func walBusyLock(tls *libc.TLS, pWal uintptr, xBusy uintptr, pBusyArg uintptr, lockIdx int32, n int32) int32 { /* sqlite3.c:62195:12: */
var rc int32
- for ok := true; ok; ok = (((xBusy != 0) && (rc == SQLITE_BUSY)) && ((*(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(&xBusy)))(tls, pBusyArg) != 0)) {
+ for ok := true; ok; ok = (((xBusy != 0) && (rc == SQLITE_BUSY)) && ((*struct {
+ f func(*libc.TLS, uintptr) int32
+ })(unsafe.Pointer(&struct{ uintptr }{xBusy})).f(tls, pBusyArg) != 0)) {
rc = walLockExclusive(tls, pWal, lockIdx, n)
}
return rc
@@ -37910,7 +39776,7 @@ func walBusyLock(tls *libc.TLS, pWal uintptr, xBusy uintptr, pBusyArg uintptr, l
// The cache of the wal-index header must be valid to call this function.
// Return the page-size in bytes used by the database.
-func walPagesize(tls *libc.TLS, pWal uintptr) int32 { /* sqlite3.c:61723:12: */
+func walPagesize(tls *libc.TLS, pWal uintptr) int32 { /* sqlite3.c:62219:12: */
return ((int32((*Wal)(unsafe.Pointer(pWal)).Fhdr.FszPage) & 0xfe00) + ((int32((*Wal)(unsafe.Pointer(pWal)).Fhdr.FszPage) & 0x0001) << 16))
}
@@ -37929,7 +39795,7 @@ func walPagesize(tls *libc.TLS, pWal uintptr) int32 { /* sqlite3.c:61723:12: */
// The value of parameter salt1 is used as the aSalt[1] value in the
// new wal-index header. It should be passed a pseudo-random value (i.e.
// one obtained from sqlite3_randomness()).
-func walRestartHdr(tls *libc.TLS, pWal uintptr, salt1 U32) { /* sqlite3.c:61744:13: */
+func walRestartHdr(tls *libc.TLS, pWal uintptr, salt1 U32) { /* sqlite3.c:62240:13: */
bp := tls.Alloc(4)
defer tls.Free(4)
*(*U32)(unsafe.Pointer(bp)) = salt1
@@ -37942,11 +39808,11 @@ func walRestartHdr(tls *libc.TLS, pWal uintptr, salt1 U32) { /* sqlite3.c:61744:
Xsqlite3Put4byte(tls, (aSalt), (U32(1) + Xsqlite3Get4byte(tls, (aSalt))))
libc.Xmemcpy(tls, ((pWal + 72 /* &.hdr */ + 32 /* &.aSalt */) + 1*4), bp /* &salt1 */, uint64(4))
walIndexWriteHdr(tls, pWal)
- libc.AtomicStoreNInt32((libc.AtomicLoadUintptr(&pInfo) /* &.nBackfill */), int32(0), 0)
- (*WalCkptInfo)(unsafe.Pointer(libc.AtomicLoadUintptr(&pInfo))).FnBackfillAttempted = U32(0)
- *(*U32)(unsafe.Pointer((libc.AtomicLoadUintptr(&pInfo) + 4 /* &.aReadMark */) + 1*4)) = U32(0)
+ libc.AtomicStoreNInt32((pInfo /* &.nBackfill */), int32(0), 0)
+ (*WalCkptInfo)(unsafe.Pointer(pInfo)).FnBackfillAttempted = U32(0)
+ *(*U32)(unsafe.Pointer((pInfo + 4 /* &.aReadMark */) + 1*4)) = U32(0)
for i = 2; i < (SQLITE_SHM_NLOCK - 3); i++ {
- *(*U32)(unsafe.Pointer((libc.AtomicLoadUintptr(&pInfo) + 4 /* &.aReadMark */) + uintptr(i)*4)) = READMARK_NOT_USED
+ *(*U32)(unsafe.Pointer((pInfo + 4 /* &.aReadMark */) + uintptr(i)*4)) = READMARK_NOT_USED
}
}
@@ -37980,7 +39846,7 @@ func walRestartHdr(tls *libc.TLS, pWal uintptr, salt1 U32) { /* sqlite3.c:61744:
// The caller must be holding sufficient locks to ensure that no other
// checkpoint is running (in any other thread or process) at the same
// time.
-func walCheckpoint(tls *libc.TLS, pWal uintptr, db uintptr, eMode int32, xBusy uintptr, pBusyArg uintptr, sync_flags int32, zBuf uintptr) int32 { /* sqlite3.c:61791:12: */
+func walCheckpoint(tls *libc.TLS, pWal uintptr, db uintptr, eMode int32, xBusy uintptr, pBusyArg uintptr, sync_flags int32, zBuf uintptr) int32 { /* sqlite3.c:62287:12: */
bp := tls.Alloc(36)
defer tls.Free(36)
@@ -38014,7 +39880,7 @@ func walCheckpoint(tls *libc.TLS, pWal uintptr, db uintptr, eMode int32, xBusy u
szPage = walPagesize(tls, pWal)
libc.AtomicStoreUintptr(&pInfo, uintptr(walCkptInfo(tls, pWal)))
- if !((*WalCkptInfo)(unsafe.Pointer(libc.AtomicLoadUintptr(&pInfo))).FnBackfill < (*Wal)(unsafe.Pointer(pWal)).Fhdr.FmxFrame) {
+ if !((*WalCkptInfo)(unsafe.Pointer(pInfo)).FnBackfill < (*Wal)(unsafe.Pointer(pWal)).Fhdr.FmxFrame) {
goto __1
}
@@ -38032,7 +39898,7 @@ __2:
if !(i < (SQLITE_SHM_NLOCK - 3)) {
goto __4
}
- y = U32(libc.AtomicLoadNUint32(((libc.AtomicLoadUintptr(&pInfo) + 4 /* &.aReadMark */) + uintptr(i)*4), 0))
+ y = U32(libc.AtomicLoadNUint32(((pInfo + 4 /* &.aReadMark */) + uintptr(i)*4), 0))
if !(mxSafeFrame > y) {
goto __5
}
@@ -38047,7 +39913,7 @@ __2:
}
return READMARK_NOT_USED
}()
- libc.AtomicStoreNUint32(((libc.AtomicLoadUintptr(&pInfo) + 4 /* &.aReadMark */) + uintptr(i)*4), uint32(iMark), 0)
+ libc.AtomicStoreNUint32(((pInfo + 4 /* &.aReadMark */) + uintptr(i)*4), uint32(iMark), 0)
walUnlockExclusive(tls, pWal, (3 + (i)), 1)
goto __7
__6:
@@ -38074,10 +39940,10 @@ __4:
;
// Allocate the iterator
- if !((*WalCkptInfo)(unsafe.Pointer(libc.AtomicLoadUintptr(&pInfo))).FnBackfill < mxSafeFrame) {
+ if !((*WalCkptInfo)(unsafe.Pointer(pInfo)).FnBackfill < mxSafeFrame) {
goto __10
}
- rc = walIteratorInit(tls, pWal, (*WalCkptInfo)(unsafe.Pointer(libc.AtomicLoadUintptr(&pInfo))).FnBackfill, bp /* &pIter */)
+ rc = walIteratorInit(tls, pWal, (*WalCkptInfo)(unsafe.Pointer(pInfo)).FnBackfill, bp /* &pIter */)
__10:
;
@@ -38086,9 +39952,9 @@ __10:
((libc.AssignInt32(&rc, walBusyLock(tls, pWal, xBusy, pBusyArg, (3+(0)), 1))) == SQLITE_OK)) {
goto __11
}
- nBackfill = (*WalCkptInfo)(unsafe.Pointer(libc.AtomicLoadUintptr(&pInfo))).FnBackfill
+ nBackfill = (*WalCkptInfo)(unsafe.Pointer(pInfo)).FnBackfill
- (*WalCkptInfo)(unsafe.Pointer(libc.AtomicLoadUintptr(&pInfo))).FnBackfillAttempted = mxSafeFrame
+ (*WalCkptInfo)(unsafe.Pointer(pInfo)).FnBackfillAttempted = mxSafeFrame
// Sync the WAL to disk
rc = Xsqlite3OsSync(tls, (*Wal)(unsafe.Pointer(pWal)).FpWalFd, (((sync_flags) >> 2) & 0x03))
@@ -38111,7 +39977,7 @@ __10:
// database plus the amount of data in the wal file, plus the
// maximum size of the pending-byte page (65536 bytes), then
// must be corruption somewhere.
- rc = Xsqlite3CorruptError(tls, 61875)
+ rc = Xsqlite3CorruptError(tls, 62371)
goto __15
__14:
Xsqlite3OsFileControlHint(tls, (*Wal)(unsafe.Pointer(pWal)).FpDbFd, SQLITE_FCNTL_SIZE_HINT, bp+16 /* &nReq */)
@@ -38190,7 +40056,7 @@ __23:
if !(rc == SQLITE_OK) {
goto __25
}
- libc.AtomicStoreNUint32((libc.AtomicLoadUintptr(&pInfo) /* &.nBackfill */), uint32(mxSafeFrame), 0)
+ libc.AtomicStoreNUint32((pInfo /* &.nBackfill */), uint32(mxSafeFrame), 0)
__25:
;
__22:
@@ -38220,7 +40086,7 @@ __1:
goto __27
}
- if !((*WalCkptInfo)(unsafe.Pointer(libc.AtomicLoadUintptr(&pInfo))).FnBackfill < (*Wal)(unsafe.Pointer(pWal)).Fhdr.FmxFrame) {
+ if !((*WalCkptInfo)(unsafe.Pointer(pInfo)).FnBackfill < (*Wal)(unsafe.Pointer(pWal)).Fhdr.FmxFrame) {
goto __28
}
rc = SQLITE_BUSY
@@ -38272,7 +40138,7 @@ walcheckpoint_out:
// If the WAL file is currently larger than nMax bytes in size, truncate
// it to exactly nMax bytes. If an error occurs while doing so, ignore it.
-func walLimitSize(tls *libc.TLS, pWal uintptr, nMax I64) { /* sqlite3.c:61977:13: */
+func walLimitSize(tls *libc.TLS, pWal uintptr, nMax I64) { /* sqlite3.c:62473:13: */
bp := tls.Alloc(16)
defer tls.Free(16)
@@ -38286,12 +40152,12 @@ func walLimitSize(tls *libc.TLS, pWal uintptr, nMax I64) { /* sqlite3.c:61977:13
}
Xsqlite3EndBenignMalloc(tls)
if rx != 0 {
- Xsqlite3_log(tls, rx, ts+2985 /* "cannot limit WAL..." */, libc.VaList(bp, (*Wal)(unsafe.Pointer(pWal)).FzWalName))
+ Xsqlite3_log(tls, rx, ts+3116 /* "cannot limit WAL..." */, libc.VaList(bp, (*Wal)(unsafe.Pointer(pWal)).FzWalName))
}
}
// Close a connection to a log file.
-func Xsqlite3WalClose(tls *libc.TLS, pWal uintptr, db uintptr, sync_flags int32, nBuf int32, zBuf uintptr) int32 { /* sqlite3.c:61994:20: */
+func Xsqlite3WalClose(tls *libc.TLS, pWal uintptr, db uintptr, sync_flags int32, nBuf int32, zBuf uintptr) int32 { /* sqlite3.c:62490:20: */
bp := tls.Alloc(4)
defer tls.Free(4)
@@ -38363,7 +40229,7 @@ func Xsqlite3WalClose(tls *libc.TLS, pWal uintptr, db uintptr, sync_flags int32,
//
// If the checksum cannot be verified return non-zero. If the header
// is read successfully and the checksum verified, return zero.
-func walIndexTryHdr(tls *libc.TLS, pWal uintptr, pChanged uintptr) int32 { /* sqlite3.c:62075:27: */
+func walIndexTryHdr(tls *libc.TLS, pWal uintptr, pChanged uintptr) int32 { /* sqlite3.c:62571:27: */
bp := tls.Alloc(104)
defer tls.Free(104)
@@ -38393,9 +40259,9 @@ func walIndexTryHdr(tls *libc.TLS, pWal uintptr, pChanged uintptr) int32 { /* sq
// shared among multiple processes and not all mutex implementions work
// reliably in that environment.
libc.AtomicStoreUintptr(&aHdr, uintptr(walIndexHdr(tls, pWal)))
- libc.Xmemcpy(tls, bp /* &h1 */, (libc.AtomicLoadUintptr(&aHdr)), uint64(unsafe.Sizeof(WalIndexHdr{}))) // Possible TSAN false-positive
+ libc.Xmemcpy(tls, bp /* &h1 */, (aHdr), uint64(unsafe.Sizeof(WalIndexHdr{}))) // Possible TSAN false-positive
walShmBarrier(tls, pWal)
- libc.Xmemcpy(tls, bp+48 /* &h2 */, (libc.AtomicLoadUintptr(&aHdr) + 1*48), uint64(unsafe.Sizeof(WalIndexHdr{})))
+ libc.Xmemcpy(tls, bp+48 /* &h2 */, (aHdr + 1*48), uint64(unsafe.Sizeof(WalIndexHdr{})))
if (libc.Xmemcmp(tls, bp /* &h1 */, bp+48 /* &h2 */, uint64(unsafe.Sizeof(WalIndexHdr{}))) != 0) {
return 1 // Dirty read
@@ -38432,7 +40298,7 @@ func walIndexTryHdr(tls *libc.TLS, pWal uintptr, pChanged uintptr) int32 { /* sq
//
// If the wal-index header is successfully read, return SQLITE_OK.
// Otherwise an SQLite error code.
-func walIndexReadHdr(tls *libc.TLS, pWal uintptr, pChanged uintptr) int32 { /* sqlite3.c:62145:12: */
+func walIndexReadHdr(tls *libc.TLS, pWal uintptr, pChanged uintptr) int32 { /* sqlite3.c:62641:12: */
bp := tls.Alloc(8)
defer tls.Free(8)
@@ -38472,7 +40338,7 @@ func walIndexReadHdr(tls *libc.TLS, pWal uintptr, pChanged uintptr) int32 { /* s
// works, but may fail if the wal-index header is corrupt or currently
// being modified by another thread or process.
badHdr = func() int32 {
- if libc.AtomicLoadPUintptr(bp /* page0 */) != 0 {
+ if *(*uintptr)(unsafe.Pointer(bp /* page0 */)) != 0 {
return walIndexTryHdr(tls, pWal, pChanged)
}
return 1
@@ -38512,7 +40378,7 @@ func walIndexReadHdr(tls *libc.TLS, pWal uintptr, pChanged uintptr) int32 { /* s
// sure the wal-index was not constructed with some future format that
// this version of SQLite cannot understand.
if (badHdr == 0) && ((*Wal)(unsafe.Pointer(pWal)).Fhdr.FiVersion != U32(WALINDEX_MAX_VERSION)) {
- rc = Xsqlite3CantopenError(tls, 62224)
+ rc = Xsqlite3CantopenError(tls, 62720)
}
if (*Wal)(unsafe.Pointer(pWal)).FbShmUnreliable != 0 {
if rc != SQLITE_OK {
@@ -38557,7 +40423,7 @@ func walIndexReadHdr(tls *libc.TLS, pWal uintptr, pChanged uintptr) int32 { /* s
// beginning (including attempting to map the *-shm file).
//
// If an error occurs, an SQLite error code is returned.
-func walBeginShmUnreliable(tls *libc.TLS, pWal uintptr, pChanged uintptr) int32 { /* sqlite3.c:62269:12: */
+func walBeginShmUnreliable(tls *libc.TLS, pWal uintptr, pChanged uintptr) int32 { /* sqlite3.c:62765:12: */
bp := tls.Alloc(64)
defer tls.Free(64)
@@ -38822,7 +40688,7 @@ __15:
// update values of the aReadMark[] array in the header, but if it does
// so it takes care to hold an exclusive lock on the corresponding
// WAL_READ_LOCK() while changing values.
-func walTryBeginRead(tls *libc.TLS, pWal uintptr, pChanged uintptr, useWal int32, cnt int32) int32 { /* sqlite3.c:62464:12: */
+func walTryBeginRead(tls *libc.TLS, pWal uintptr, pChanged uintptr, useWal int32, cnt int32) int32 { /* sqlite3.c:62960:12: */
var pInfo uintptr // Checkpoint information in wal-index
var mxReadMark U32 // Largest aReadMark[] value
var mxI int32 // Index of largest aReadMark[] value
@@ -38898,7 +40764,7 @@ func walTryBeginRead(tls *libc.TLS, pWal uintptr, pChanged uintptr, useWal int32
}
libc.AtomicStoreUintptr(&pInfo, uintptr(walCkptInfo(tls, pWal)))
- if (!(useWal != 0) && (U32(libc.AtomicLoadNUint32((libc.AtomicLoadUintptr(&pInfo) /* &.nBackfill */), 0)) == (*Wal)(unsafe.Pointer(pWal)).Fhdr.FmxFrame)) &&
+ if (!(useWal != 0) && (U32(libc.AtomicLoadNUint32((pInfo /* &.nBackfill */), 0)) == (*Wal)(unsafe.Pointer(pWal)).Fhdr.FmxFrame)) &&
(((*Wal)(unsafe.Pointer(pWal)).FpSnapshot == uintptr(0)) || ((*Wal)(unsafe.Pointer(pWal)).Fhdr.FmxFrame == U32(0))) {
// The WAL has been completely backfilled (or it is empty).
// and can be safely ignored.
@@ -38939,7 +40805,7 @@ func walTryBeginRead(tls *libc.TLS, pWal uintptr, pChanged uintptr, useWal int32
mxFrame = (*WalIndexHdr)(unsafe.Pointer((*Wal)(unsafe.Pointer(pWal)).FpSnapshot)).FmxFrame
}
for i = 1; i < (SQLITE_SHM_NLOCK - 3); i++ {
- var thisMark U32 = U32(libc.AtomicLoadNUint32(((libc.AtomicLoadUintptr(&pInfo) + 4 /* &.aReadMark */) + uintptr(i)*4), 0))
+ var thisMark U32 = U32(libc.AtomicLoadNUint32(((pInfo + 4 /* &.aReadMark */) + uintptr(i)*4), 0))
if (mxReadMark <= thisMark) && (thisMark <= mxFrame) {
mxReadMark = thisMark
@@ -38951,7 +40817,7 @@ func walTryBeginRead(tls *libc.TLS, pWal uintptr, pChanged uintptr, useWal int32
for i = 1; i < (SQLITE_SHM_NLOCK - 3); i++ {
rc = walLockExclusive(tls, pWal, (3 + (i)), 1)
if rc == SQLITE_OK {
- libc.AtomicStoreNUint32(((libc.AtomicLoadUintptr(&pInfo) + 4 /* &.aReadMark */) + uintptr(i)*4), uint32(mxFrame), 0)
+ libc.AtomicStoreNUint32(((pInfo + 4 /* &.aReadMark */) + uintptr(i)*4), uint32(mxFrame), 0)
mxReadMark = mxFrame
mxI = i
walUnlockExclusive(tls, pWal, (3 + (i)), 1)
@@ -39009,9 +40875,9 @@ func walTryBeginRead(tls *libc.TLS, pWal uintptr, pChanged uintptr, useWal int32
// that it can read version A from the database file. However, since
// we can guarantee that the checkpointer that set nBackfill could not
// see any pages past pWal->hdr.mxFrame, this problem does not come up.
- (*Wal)(unsafe.Pointer(pWal)).FminFrame = (U32(libc.AtomicLoadNUint32((libc.AtomicLoadUintptr(&pInfo) /* &.nBackfill */), 0) + 1))
+ (*Wal)(unsafe.Pointer(pWal)).FminFrame = (U32(libc.AtomicLoadNUint32((pInfo /* &.nBackfill */), 0) + 1))
walShmBarrier(tls, pWal)
- if (U32(libc.AtomicLoadNUint32(((libc.AtomicLoadUintptr(&pInfo)+4 /* &.aReadMark */)+uintptr(mxI)*4), 0)) != mxReadMark) ||
+ if (U32(libc.AtomicLoadNUint32(((pInfo+4 /* &.aReadMark */)+uintptr(mxI)*4), 0)) != mxReadMark) ||
(libc.Xmemcmp(tls, walIndexHdr(tls, pWal), (pWal+72 /* &.hdr */), uint64(unsafe.Sizeof(WalIndexHdr{}))) != 0) {
walUnlockShared(tls, pWal, (3 + (mxI)))
return -1
@@ -39039,7 +40905,7 @@ func walTryBeginRead(tls *libc.TLS, pWal uintptr, pChanged uintptr, useWal int32
// SQLITE_OK is returned if successful, or an SQLite error code if an
// error occurs. It is not an error if nBackfillAttempted cannot be
// decreased at all.
-func Xsqlite3WalSnapshotRecover(tls *libc.TLS, pWal uintptr) int32 { /* sqlite3.c:62694:20: */
+func Xsqlite3WalSnapshotRecover(tls *libc.TLS, pWal uintptr) int32 { /* sqlite3.c:63190:20: */
bp := tls.Alloc(32)
defer tls.Free(32)
@@ -39059,8 +40925,8 @@ func Xsqlite3WalSnapshotRecover(tls *libc.TLS, pWal uintptr) int32 { /* sqlite3.
if (pBuf1 == uintptr(0)) || (pBuf2 == uintptr(0)) {
rc = SQLITE_NOMEM
} else {
- var i U32 = (*WalCkptInfo)(unsafe.Pointer(libc.AtomicLoadUintptr(&pInfo))).FnBackfillAttempted
- for i = (*WalCkptInfo)(unsafe.Pointer(libc.AtomicLoadUintptr(&pInfo))).FnBackfillAttempted; i > U32(libc.AtomicLoadNUint32((libc.AtomicLoadUintptr(&pInfo) /* &.nBackfill */), 0)); i-- {
+ var i U32 = (*WalCkptInfo)(unsafe.Pointer(pInfo)).FnBackfillAttempted
+ for i = (*WalCkptInfo)(unsafe.Pointer(pInfo)).FnBackfillAttempted; i > U32(libc.AtomicLoadNUint32((pInfo /* &.nBackfill */), 0)); i-- {
// var sLoc WalHashLoc at bp+8, 24
// Hash table location
var pgno U32 // Page number in db file
@@ -39087,7 +40953,7 @@ func Xsqlite3WalSnapshotRecover(tls *libc.TLS, pWal uintptr) int32 { /* sqlite3.
}
}
- (*WalCkptInfo)(unsafe.Pointer(libc.AtomicLoadUintptr(&pInfo))).FnBackfillAttempted = (i - U32(1))
+ (*WalCkptInfo)(unsafe.Pointer(pInfo)).FnBackfillAttempted = (i - U32(1))
}
}
@@ -39112,7 +40978,7 @@ func Xsqlite3WalSnapshotRecover(tls *libc.TLS, pWal uintptr) int32 { /* sqlite3.
// transaction, then *pChanged is set to 1 before returning. The
// Pager layer will use this to know that its cache is stale and
// needs to be flushed.
-func Xsqlite3WalBeginReadTransaction(tls *libc.TLS, pWal uintptr, pChanged uintptr) int32 { /* sqlite3.c:62764:20: */
+func Xsqlite3WalBeginReadTransaction(tls *libc.TLS, pWal uintptr, pChanged uintptr) int32 { /* sqlite3.c:63260:20: */
var rc int32 // Return code
var cnt int32 = 0 // Number of TryBeginRead attempts
var bChanged int32 = 0
@@ -39167,7 +41033,7 @@ func Xsqlite3WalBeginReadTransaction(tls *libc.TLS, pWal uintptr, pChanged uintp
// with *pSnapshot and set *pChanged as appropriate for opening the
// snapshot.
if !(libc.Xmemcmp(tls, pSnapshot+32 /* &.aSalt */, pWal+72 /* &.hdr */ +32 /* &.aSalt */, uint64(unsafe.Sizeof([2]U32{}))) != 0) &&
- ((*WalIndexHdr)(unsafe.Pointer(pSnapshot)).FmxFrame >= (*WalCkptInfo)(unsafe.Pointer(libc.AtomicLoadUintptr(&pInfo))).FnBackfillAttempted) {
+ ((*WalIndexHdr)(unsafe.Pointer(pSnapshot)).FmxFrame >= (*WalCkptInfo)(unsafe.Pointer(pInfo)).FnBackfillAttempted) {
libc.Xmemcpy(tls, (pWal + 72 /* &.hdr */), pSnapshot, uint64(unsafe.Sizeof(WalIndexHdr{})))
*(*int32)(unsafe.Pointer(pChanged)) = bChanged
@@ -39200,7 +41066,7 @@ func Xsqlite3WalBeginReadTransaction(tls *libc.TLS, pWal uintptr, pChanged uintp
// Finish with a read transaction. All this does is release the
// read-lock.
-func Xsqlite3WalEndReadTransaction(tls *libc.TLS, pWal uintptr) { /* sqlite3.c:62872:21: */
+func Xsqlite3WalEndReadTransaction(tls *libc.TLS, pWal uintptr) { /* sqlite3.c:63368:21: */
Xsqlite3WalEndWriteTransaction(tls, pWal)
if int32((*Wal)(unsafe.Pointer(pWal)).FreadLock) >= 0 {
walUnlockShared(tls, pWal, (3 + (int32((*Wal)(unsafe.Pointer(pWal)).FreadLock))))
@@ -39214,7 +41080,7 @@ func Xsqlite3WalEndReadTransaction(tls *libc.TLS, pWal uintptr) { /* sqlite3.c:6
//
// Return SQLITE_OK if successful, or an error code if an error occurs. If an
// error does occur, the final value of *piRead is undefined.
-func Xsqlite3WalFindFrame(tls *libc.TLS, pWal uintptr, pgno Pgno, piRead uintptr) int32 { /* sqlite3.c:62888:20: */
+func Xsqlite3WalFindFrame(tls *libc.TLS, pWal uintptr, pgno Pgno, piRead uintptr) int32 { /* sqlite3.c:63384:20: */
bp := tls.Alloc(24)
defer tls.Free(24)
@@ -39281,7 +41147,7 @@ func Xsqlite3WalFindFrame(tls *libc.TLS, pWal uintptr, pgno Pgno, piRead uintptr
iRead = iFrame
}
if (libc.PostDecInt32(&nCollide, 1)) == 0 {
- return Xsqlite3CorruptError(tls, 62958)
+ return Xsqlite3CorruptError(tls, 63454)
}
iKey = walNextHash(tls, iKey)
}
@@ -39297,7 +41163,7 @@ func Xsqlite3WalFindFrame(tls *libc.TLS, pWal uintptr, pgno Pgno, piRead uintptr
// Read the contents of frame iRead from the wal file into buffer pOut
// (which is nOut bytes in size). Return SQLITE_OK if successful, or an
// error code otherwise.
-func Xsqlite3WalReadFrame(tls *libc.TLS, pWal uintptr, iRead U32, nOut int32, pOut uintptr) int32 { /* sqlite3.c:62992:20: */
+func Xsqlite3WalReadFrame(tls *libc.TLS, pWal uintptr, iRead U32, nOut int32, pOut uintptr) int32 { /* sqlite3.c:63488:20: */
var sz int32
var iOffset I64
sz = int32((*Wal)(unsafe.Pointer(pWal)).Fhdr.FszPage)
@@ -39314,7 +41180,7 @@ func Xsqlite3WalReadFrame(tls *libc.TLS, pWal uintptr, iRead U32, nOut int32, pO
}
// Return the size of the database in pages (or zero, if unknown).
-func Xsqlite3WalDbsize(tls *libc.TLS, pWal uintptr) Pgno { /* sqlite3.c:63012:21: */
+func Xsqlite3WalDbsize(tls *libc.TLS, pWal uintptr) Pgno { /* sqlite3.c:63508:21: */
if (pWal != 0) && (int32((*Wal)(unsafe.Pointer(pWal)).FreadLock) >= 0) {
return (*Wal)(unsafe.Pointer(pWal)).Fhdr.FnPage
}
@@ -39332,7 +41198,7 @@ func Xsqlite3WalDbsize(tls *libc.TLS, pWal uintptr) Pgno { /* sqlite3.c:63012:21
// returns SQLITE_BUSY in that case and no write transaction is started.
//
// There can only be a single writer active at a time.
-func Xsqlite3WalBeginWriteTransaction(tls *libc.TLS, pWal uintptr) int32 { /* sqlite3.c:63033:20: */
+func Xsqlite3WalBeginWriteTransaction(tls *libc.TLS, pWal uintptr) int32 { /* sqlite3.c:63529:20: */
var rc int32
// Cannot start a write transaction without first holding a read
@@ -39364,7 +41230,7 @@ func Xsqlite3WalBeginWriteTransaction(tls *libc.TLS, pWal uintptr) int32 { /* sq
// End a write transaction. The commit has already been done. This
// routine merely releases the lock.
-func Xsqlite3WalEndWriteTransaction(tls *libc.TLS, pWal uintptr) int32 { /* sqlite3.c:63081:20: */
+func Xsqlite3WalEndWriteTransaction(tls *libc.TLS, pWal uintptr) int32 { /* sqlite3.c:63577:20: */
if (*Wal)(unsafe.Pointer(pWal)).FwriteLock != 0 {
walUnlockExclusive(tls, pWal, WAL_WRITE_LOCK, 1)
(*Wal)(unsafe.Pointer(pWal)).FwriteLock = U8(0)
@@ -39384,7 +41250,7 @@ func Xsqlite3WalEndWriteTransaction(tls *libc.TLS, pWal uintptr) int32 { /* sqli
//
// Otherwise, if the callback function does not return an error, this
// function returns SQLITE_OK.
-func Xsqlite3WalUndo(tls *libc.TLS, pWal uintptr, xUndo uintptr, pUndoCtx uintptr) int32 { /* sqlite3.c:63103:20: */
+func Xsqlite3WalUndo(tls *libc.TLS, pWal uintptr, xUndo uintptr, pUndoCtx uintptr) int32 { /* sqlite3.c:63599:20: */
var rc int32 = SQLITE_OK
if (*Wal)(unsafe.Pointer(pWal)).FwriteLock != 0 {
var iMax Pgno = (*Wal)(unsafe.Pointer(pWal)).Fhdr.FmxFrame
@@ -39406,7 +41272,9 @@ func Xsqlite3WalUndo(tls *libc.TLS, pWal uintptr, xUndo uintptr, pUndoCtx uintpt
// page 1 is never written to the log until the transaction is
// committed. As a result, the call to xUndo may not fail.
- rc = (*(*func(*libc.TLS, uintptr, Pgno) int32)(unsafe.Pointer(&xUndo)))(tls, pUndoCtx, walFramePgno(tls, pWal, iFrame))
+ rc = (*struct {
+ f func(*libc.TLS, uintptr, Pgno) int32
+ })(unsafe.Pointer(&struct{ uintptr }{xUndo})).f(tls, pUndoCtx, walFramePgno(tls, pWal, iFrame))
}
if iMax != (*Wal)(unsafe.Pointer(pWal)).Fhdr.FmxFrame {
walCleanupHash(tls, pWal)
@@ -39419,7 +41287,7 @@ func Xsqlite3WalUndo(tls *libc.TLS, pWal uintptr, xUndo uintptr, pUndoCtx uintpt
// values. This function populates the array with values required to
// "rollback" the write position of the WAL handle back to the current
// point in the event of a savepoint rollback (via WalSavepointUndo()).
-func Xsqlite3WalSavepoint(tls *libc.TLS, pWal uintptr, aWalData uintptr) { /* sqlite3.c:63143:21: */
+func Xsqlite3WalSavepoint(tls *libc.TLS, pWal uintptr, aWalData uintptr) { /* sqlite3.c:63639:21: */
*(*U32)(unsafe.Pointer(aWalData)) = (*Wal)(unsafe.Pointer(pWal)).Fhdr.FmxFrame
*(*U32)(unsafe.Pointer(aWalData + 1*4)) = *(*U32)(unsafe.Pointer((pWal + 72 /* &.hdr */ + 24 /* &.aFrameCksum */)))
@@ -39431,7 +41299,7 @@ func Xsqlite3WalSavepoint(tls *libc.TLS, pWal uintptr, aWalData uintptr) { /* sq
// the values in the aWalData[] array. aWalData must point to an array
// of WAL_SAVEPOINT_NDATA u32 values that has been previously populated
// by a call to WalSavepoint().
-func Xsqlite3WalSavepointUndo(tls *libc.TLS, pWal uintptr, aWalData uintptr) int32 { /* sqlite3.c:63157:20: */
+func Xsqlite3WalSavepointUndo(tls *libc.TLS, pWal uintptr, aWalData uintptr) int32 { /* sqlite3.c:63653:20: */
var rc int32 = SQLITE_OK
if *(*U32)(unsafe.Pointer(aWalData + 3*4)) != (*Wal)(unsafe.Pointer(pWal)).FnCkpt {
@@ -39462,7 +41330,7 @@ func Xsqlite3WalSavepointUndo(tls *libc.TLS, pWal uintptr, aWalData uintptr) int
// SQLITE_OK is returned if no error is encountered (regardless of whether
// or not pWal->hdr.mxFrame is modified). An SQLite error code is returned
// if an error occurs.
-func walRestartLog(tls *libc.TLS, pWal uintptr) int32 { /* sqlite3.c:63194:12: */
+func walRestartLog(tls *libc.TLS, pWal uintptr) int32 { /* sqlite3.c:63690:12: */
bp := tls.Alloc(8)
defer tls.Free(8)
@@ -39472,7 +41340,7 @@ func walRestartLog(tls *libc.TLS, pWal uintptr) int32 { /* sqlite3.c:63194:12: *
if int32((*Wal)(unsafe.Pointer(pWal)).FreadLock) == 0 {
var pInfo uintptr = walCkptInfo(tls, pWal)
- if (*WalCkptInfo)(unsafe.Pointer(libc.AtomicLoadUintptr(&pInfo))).FnBackfill > U32(0) {
+ if (*WalCkptInfo)(unsafe.Pointer(pInfo)).FnBackfill > U32(0) {
// var salt1 U32 at bp, 4
Xsqlite3_randomness(tls, 4, bp /* &salt1 */)
@@ -39516,12 +41384,12 @@ type WalWriter1 = struct {
FiSyncPoint Sqlite3_int64
FsyncFlags int32
FszPage int32
-} /* sqlite3.c:63241:9 */
+} /* sqlite3.c:63737:9 */
// Information about the current state of the WAL file and where
// the next fsync should occur - passed from sqlite3WalFrames() into
// walWriteToLog().
-type WalWriter = WalWriter1 /* sqlite3.c:63247:3 */
+type WalWriter = WalWriter1 /* sqlite3.c:63743:3 */
// Write iAmt bytes of content into the WAL file beginning at iOffset.
// Do a sync when crossing the p->iSyncPoint boundary.
@@ -39529,7 +41397,7 @@ type WalWriter = WalWriter1 /* sqlite3.c:63247:3 */
// In other words, if iSyncPoint is in between iOffset and iOffset+iAmt,
// first write the part before iSyncPoint, then sync, then write the
// rest.
-func walWriteToLog(tls *libc.TLS, p uintptr, pContent uintptr, iAmt int32, iOffset Sqlite3_int64) int32 { /* sqlite3.c:63257:12: */
+func walWriteToLog(tls *libc.TLS, p uintptr, pContent uintptr, iAmt int32, iOffset Sqlite3_int64) int32 { /* sqlite3.c:63753:12: */
var rc int32
if (iOffset < (*WalWriter)(unsafe.Pointer(p)).FiSyncPoint) && ((iOffset + Sqlite3_int64(iAmt)) >= (*WalWriter)(unsafe.Pointer(p)).FiSyncPoint) {
var iFirstAmt int32 = (int32((*WalWriter)(unsafe.Pointer(p)).FiSyncPoint - iOffset))
@@ -39551,7 +41419,7 @@ func walWriteToLog(tls *libc.TLS, p uintptr, pContent uintptr, iAmt int32, iOffs
}
// Write out a single frame of the WAL
-func walWriteOneFrame(tls *libc.TLS, p uintptr, pPage uintptr, nTruncate int32, iOffset Sqlite3_int64) int32 { /* sqlite3.c:63282:12: */
+func walWriteOneFrame(tls *libc.TLS, p uintptr, pPage uintptr, nTruncate int32, iOffset Sqlite3_int64) int32 { /* sqlite3.c:63778:12: */
bp := tls.Alloc(24)
defer tls.Free(24)
@@ -39576,7 +41444,7 @@ func walWriteOneFrame(tls *libc.TLS, p uintptr, pPage uintptr, nTruncate int32,
// with the earliest to have been overwritten.
//
// SQLITE_OK is returned if successful, or an SQLite error code otherwise.
-func walRewriteChecksums(tls *libc.TLS, pWal uintptr, iLast U32) int32 { /* sqlite3.c:63308:12: */
+func walRewriteChecksums(tls *libc.TLS, pWal uintptr, iLast U32) int32 { /* sqlite3.c:63804:12: */
bp := tls.Alloc(24)
defer tls.Free(24)
@@ -39630,7 +41498,7 @@ func walRewriteChecksums(tls *libc.TLS, pWal uintptr, iLast U32) int32 { /* sqli
// Write a set of frames to the log. The caller must hold the write-lock
// on the log file (obtained using sqlite3WalBeginWriteTransaction()).
-func Xsqlite3WalFrames(tls *libc.TLS, pWal uintptr, szPage int32, pList uintptr, nTruncate Pgno, isCommit int32, sync_flags int32) int32 { /* sqlite3.c:63357:20: */
+func Xsqlite3WalFrames(tls *libc.TLS, pWal uintptr, szPage int32, pList uintptr, nTruncate Pgno, isCommit int32, sync_flags int32) int32 { /* sqlite3.c:63853:20: */
bp := tls.Alloc(80)
defer tls.Free(80)
@@ -39670,7 +41538,7 @@ func Xsqlite3WalFrames(tls *libc.TLS, pWal uintptr, szPage int32, pList uintptr,
// var aCksum [2]U32 at bp+32, 8
// Checksum for wal-header
- Xsqlite3Put4byte(tls, (bp /* &aWalHdr */), (uint32(WAL_MAGIC | (libc.Bool32(int32(*(*int8)(unsafe.Pointer(uintptr(unsafe.Pointer(&Xsqlite3one))))) == 0)))))
+ Xsqlite3Put4byte(tls, (bp /* &aWalHdr */), (uint32(WAL_MAGIC | (libc.Bool32(int32(*(*uint8)(unsafe.Pointer(uintptr(unsafe.Pointer(&Xsqlite3one))))) == 0)))))
Xsqlite3Put4byte(tls, (bp /* &aWalHdr */ + 4), uint32(WAL_MAX_VERSION))
Xsqlite3Put4byte(tls, (bp /* &aWalHdr */ + 8), uint32(szPage))
Xsqlite3Put4byte(tls, (bp /* &aWalHdr */ + 12), (*Wal)(unsafe.Pointer(pWal)).FnCkpt)
@@ -39683,7 +41551,7 @@ func Xsqlite3WalFrames(tls *libc.TLS, pWal uintptr, szPage int32, pList uintptr,
Xsqlite3Put4byte(tls, (bp /* &aWalHdr */ + 28), *(*U32)(unsafe.Pointer(bp + 32 /* &aCksum[0] */ + 1*4)))
(*Wal)(unsafe.Pointer(pWal)).FszPage = U32(szPage)
- (*Wal)(unsafe.Pointer(pWal)).Fhdr.FbigEndCksum = (U8(libc.Bool32(int32(*(*int8)(unsafe.Pointer(uintptr(unsafe.Pointer(&Xsqlite3one))))) == 0)))
+ (*Wal)(unsafe.Pointer(pWal)).Fhdr.FbigEndCksum = (U8(libc.Bool32(int32(*(*uint8)(unsafe.Pointer(uintptr(unsafe.Pointer(&Xsqlite3one))))) == 0)))
*(*U32)(unsafe.Pointer((pWal + 72 /* &.hdr */ + 24 /* &.aFrameCksum */))) = *(*U32)(unsafe.Pointer(bp + 32 /* &aCksum[0] */))
*(*U32)(unsafe.Pointer((pWal + 72 /* &.hdr */ + 24 /* &.aFrameCksum */) + 1*4)) = *(*U32)(unsafe.Pointer(bp + 32 /* &aCksum[0] */ + 1*4))
(*Wal)(unsafe.Pointer(pWal)).FtruncateOnCommit = U8(1)
@@ -39863,7 +41731,7 @@ func Xsqlite3WalFrames(tls *libc.TLS, pWal uintptr, szPage int32, pList uintptr,
//
// If parameter xBusy is not NULL, it is a pointer to a busy-handler
// callback. In this case this function runs a blocking checkpoint.
-func Xsqlite3WalCheckpoint(tls *libc.TLS, pWal uintptr, db uintptr, eMode int32, xBusy uintptr, pBusyArg uintptr, sync_flags int32, nBuf int32, zBuf uintptr, pnLog uintptr, pnCkpt uintptr) int32 { /* sqlite3.c:63595:20: */
+func Xsqlite3WalCheckpoint(tls *libc.TLS, pWal uintptr, db uintptr, eMode int32, xBusy uintptr, pBusyArg uintptr, sync_flags int32, nBuf int32, zBuf uintptr, pnLog uintptr, pnCkpt uintptr) int32 { /* sqlite3.c:64091:20: */
bp := tls.Alloc(4)
defer tls.Free(4)
@@ -39928,7 +41796,7 @@ func Xsqlite3WalCheckpoint(tls *libc.TLS, pWal uintptr, db uintptr, eMode int32,
if rc == SQLITE_OK {
if ((*Wal)(unsafe.Pointer(pWal)).Fhdr.FmxFrame != 0) && (walPagesize(tls, pWal) != nBuf) {
- rc = Xsqlite3CorruptError(tls, 63677)
+ rc = Xsqlite3CorruptError(tls, 64173)
} else {
rc = walCheckpoint(tls, pWal, db, eMode2, xBusy2, pBusyArg, sync_flags, zBuf)
}
@@ -39972,7 +41840,7 @@ func Xsqlite3WalCheckpoint(tls *libc.TLS, pWal uintptr, db uintptr, eMode int32,
// number of frames in the WAL at the point of the last commit since
// sqlite3WalCallback() was called. If no commits have occurred since
// the last call, then return 0.
-func Xsqlite3WalCallback(tls *libc.TLS, pWal uintptr) int32 { /* sqlite3.c:63720:20: */
+func Xsqlite3WalCallback(tls *libc.TLS, pWal uintptr) int32 { /* sqlite3.c:64216:20: */
var ret U32 = U32(0)
if pWal != 0 {
ret = (*Wal)(unsafe.Pointer(pWal)).FiCallback
@@ -40003,7 +41871,7 @@ func Xsqlite3WalCallback(tls *libc.TLS, pWal uintptr) int32 { /* sqlite3.c:63720
// not actually change anything. The pager uses this to see if it
// should acquire the database exclusive lock prior to invoking
// the op==1 case.
-func Xsqlite3WalExclusiveMode(tls *libc.TLS, pWal uintptr, op int32) int32 { /* sqlite3.c:63753:20: */
+func Xsqlite3WalExclusiveMode(tls *libc.TLS, pWal uintptr, op int32) int32 { /* sqlite3.c:64249:20: */
var rc int32
// pWal->readLock is usually set, but might be -1 if there was a
@@ -40037,14 +41905,14 @@ func Xsqlite3WalExclusiveMode(tls *libc.TLS, pWal uintptr, op int32) int32 { /*
// Return true if the argument is non-NULL and the WAL module is using
// heap-memory for the wal-index. Otherwise, if the argument is NULL or the
// WAL module is using shared-memory, return false.
-func Xsqlite3WalHeapMemory(tls *libc.TLS, pWal uintptr) int32 { /* sqlite3.c:63795:20: */
+func Xsqlite3WalHeapMemory(tls *libc.TLS, pWal uintptr) int32 { /* sqlite3.c:64291:20: */
return (libc.Bool32((pWal != 0) && (int32((*Wal)(unsafe.Pointer(pWal)).FexclusiveMode) == WAL_HEAPMEMORY_MODE)))
}
// Create a snapshot object. The content of a snapshot is opaque to
// every other subsystem, so the WAL module can put whatever it needs
// in the object.
-func Xsqlite3WalSnapshotGet(tls *libc.TLS, pWal uintptr, ppSnapshot uintptr) int32 { /* sqlite3.c:63804:20: */
+func Xsqlite3WalSnapshotGet(tls *libc.TLS, pWal uintptr, ppSnapshot uintptr) int32 { /* sqlite3.c:64300:20: */
var rc int32 = SQLITE_OK
var pRet uintptr
@@ -40063,16 +41931,16 @@ func Xsqlite3WalSnapshotGet(tls *libc.TLS, pWal uintptr, ppSnapshot uintptr) int
return rc
}
-var aZero = [4]U32{U32(0), U32(0), U32(0), U32(0)} /* sqlite3.c:63807:20 */
+var aZero = [4]U32{U32(0), U32(0), U32(0), U32(0)} /* sqlite3.c:64303:20 */
// Try to open on pSnapshot when the next read-transaction starts
-func Xsqlite3WalSnapshotOpen(tls *libc.TLS, pWal uintptr, pSnapshot uintptr) { /* sqlite3.c:63828:21: */
+func Xsqlite3WalSnapshotOpen(tls *libc.TLS, pWal uintptr, pSnapshot uintptr) { /* sqlite3.c:64324:21: */
(*Wal)(unsafe.Pointer(pWal)).FpSnapshot = pSnapshot
}
// Return a +ve value if snapshot p1 is newer than p2. A -ve value if
// p1 is older than p2 and zero if p1 and p2 are the same snapshot.
-func Xsqlite3_snapshot_cmp(tls *libc.TLS, p1 uintptr, p2 uintptr) int32 { /* sqlite3.c:63839:16: */
+func Xsqlite3_snapshot_cmp(tls *libc.TLS, p1 uintptr, p2 uintptr) int32 { /* sqlite3.c:64335:16: */
var pHdr1 uintptr = p1
var pHdr2 uintptr = p2
@@ -40102,7 +41970,7 @@ func Xsqlite3_snapshot_cmp(tls *libc.TLS, p1 uintptr, p2 uintptr) int32 { /* sql
// the CHECKPOINTER lock cannot be obtained, SQLITE_BUSY. If any error
// occurs (any value other than SQLITE_OK is returned), the CHECKPOINTER
// lock is released before returning.
-func Xsqlite3WalSnapshotCheck(tls *libc.TLS, pWal uintptr, pSnapshot uintptr) int32 { /* sqlite3.c:63863:20: */
+func Xsqlite3WalSnapshotCheck(tls *libc.TLS, pWal uintptr, pSnapshot uintptr) int32 { /* sqlite3.c:64359:20: */
var rc int32
rc = walLockShared(tls, pWal, WAL_CKPT_LOCK)
if rc == SQLITE_OK {
@@ -40118,13 +41986,13 @@ func Xsqlite3WalSnapshotCheck(tls *libc.TLS, pWal uintptr, pSnapshot uintptr) in
// Release a lock obtained by an earlier successful call to
// sqlite3WalSnapshotCheck().
-func Xsqlite3WalSnapshotUnlock(tls *libc.TLS, pWal uintptr) { /* sqlite3.c:63882:21: */
+func Xsqlite3WalSnapshotUnlock(tls *libc.TLS, pWal uintptr) { /* sqlite3.c:64378:21: */
walUnlockShared(tls, pWal, WAL_CKPT_LOCK)
}
// Return the sqlite3_file object for the WAL file
-func Xsqlite3WalFile(tls *libc.TLS, pWal uintptr) uintptr { /* sqlite3.c:63904:29: */
+func Xsqlite3WalFile(tls *libc.TLS, pWal uintptr) uintptr { /* sqlite3.c:64400:29: */
return (*Wal)(unsafe.Pointer(pWal)).FpWalFd
}
@@ -40382,7 +42250,7 @@ type MemPage1 = struct {
FchildPtrSize U8
Fmax1bytePayload U8
FnOverflow U8
- _ [1]byte
+ F__ccgo_pad1 [1]byte
FmaxLocal U16
FminLocal U16
FcellOffset U16
@@ -40390,7 +42258,7 @@ type MemPage1 = struct {
FnCell U16
FmaskPage U16
FaiOvfl [4]U16
- _ [4]byte
+ F__ccgo_pad2 [4]byte
FapOvfl [4]uintptr
FpBt uintptr
FaData uintptr
@@ -40400,7 +42268,7 @@ type MemPage1 = struct {
FpDbPage uintptr
FxCellSize uintptr
FxParseCell uintptr
-} /* sqlite3.c:1312:9 */
+} /* sqlite3.c:1331:9 */
//************* End of wal.c ************************************************
//************* Begin file btmutex.c ****************************************
@@ -40645,25 +42513,25 @@ type MemPage1 = struct {
// small cells will be rare, but they are possible.
// Forward declarations
-type MemPage = MemPage1 /* sqlite3.c:64162:24 */
+type MemPage = MemPage1 /* sqlite3.c:64658:24 */
type BtLock1 = struct {
- FpBtree uintptr
- FiTable Pgno
- FeLock U8
- _ [3]byte
- FpNext uintptr
-} /* sqlite3.c:1312:9 */
+ FpBtree uintptr
+ FiTable Pgno
+ FeLock U8
+ F__ccgo_pad1 [3]byte
+ FpNext uintptr
+} /* sqlite3.c:1331:9 */
-type BtLock = BtLock1 /* sqlite3.c:64163:23 */
+type BtLock = BtLock1 /* sqlite3.c:64659:23 */
type CellInfo1 = struct {
FnKey I64
FpPayload uintptr
FnPayload U32
FnLocal U16
FnSize U16
-} /* sqlite3.c:1312:9 */
+} /* sqlite3.c:1331:9 */
-type CellInfo = CellInfo1 /* sqlite3.c:64164:25 */
+type CellInfo = CellInfo1 /* sqlite3.c:64660:25 */
// Legal values for BtCursor.curFlags
@@ -40773,7 +42641,7 @@ type IntegrityCk1 = struct {
FerrMsg StrAccum
Fheap uintptr
Fdb uintptr
-} /* sqlite3.c:64622:9 */
+} /* sqlite3.c:65118:9 */
// Legal values for BtCursor.curFlags
@@ -40869,7 +42737,7 @@ type IntegrityCk1 = struct {
// the database the corresponding bit is set. This allows integrity-check to
// detect pages that are used twice and orphaned pages (both of which
// indicate corruption).
-type IntegrityCk = IntegrityCk1 /* sqlite3.c:64622:28 */
+type IntegrityCk = IntegrityCk1 /* sqlite3.c:65118:28 */
// Routines to read or write a two- and four-byte big-endian integer values.
@@ -40883,7 +42751,7 @@ type IntegrityCk = IntegrityCk1 /* sqlite3.c:64622:28 */
// Obtain the BtShared mutex associated with B-Tree handle p. Also,
// set BtShared.db to the database handle associated with p and the
// p->locked boolean to true.
-func lockBtreeMutex(tls *libc.TLS, p uintptr) { /* sqlite3.c:64672:13: */
+func lockBtreeMutex(tls *libc.TLS, p uintptr) { /* sqlite3.c:65168:13: */
Xsqlite3_mutex_enter(tls, (*BtShared)(unsafe.Pointer((*Btree)(unsafe.Pointer(p)).FpBt)).Fmutex)
(*BtShared)(unsafe.Pointer((*Btree)(unsafe.Pointer(p)).FpBt)).Fdb = (*Btree)(unsafe.Pointer(p)).Fdb
@@ -40892,7 +42760,7 @@ func lockBtreeMutex(tls *libc.TLS, p uintptr) { /* sqlite3.c:64672:13: */
// Release the BtShared mutex associated with B-Tree handle p and
// clear the p->locked boolean.
-func unlockBtreeMutex(tls *libc.TLS, p uintptr) { /* sqlite3.c:64686:29: */
+func unlockBtreeMutex(tls *libc.TLS, p uintptr) { /* sqlite3.c:65182:29: */
var pBt uintptr = (*Btree)(unsafe.Pointer(p)).FpBt
Xsqlite3_mutex_leave(tls, (*BtShared)(unsafe.Pointer(pBt)).Fmutex)
@@ -40913,7 +42781,7 @@ func unlockBtreeMutex(tls *libc.TLS, p uintptr) { /* sqlite3.c:64686:29: */
// p, then first unlock all of the others on p->pNext, then wait
// for the lock to become available on p, then relock all of the
// subsequent Btrees that desire a lock.
-func Xsqlite3BtreeEnter(tls *libc.TLS, p uintptr) { /* sqlite3.c:64716:21: */
+func Xsqlite3BtreeEnter(tls *libc.TLS, p uintptr) { /* sqlite3.c:65212:21: */
// Some basic sanity checking on the Btree. The list of Btrees
// connected by pNext and pPrev should be in sorted order by
// Btree.pBt value. All elements of the list should belong to
@@ -40941,7 +42809,7 @@ func Xsqlite3BtreeEnter(tls *libc.TLS, p uintptr) { /* sqlite3.c:64716:21: */
// into this routine, we avoid unnecessary stack pointer changes
// and thus help the sqlite3BtreeLock() routine to run much faster
// in the common case.
-func btreeLockCarefully(tls *libc.TLS, p uintptr) { /* sqlite3.c:64750:29: */
+func btreeLockCarefully(tls *libc.TLS, p uintptr) { /* sqlite3.c:65246:29: */
var pLater uintptr
// In most cases, we should be able to acquire the lock we
@@ -40972,7 +42840,7 @@ func btreeLockCarefully(tls *libc.TLS, p uintptr) { /* sqlite3.c:64750:29: */
}
// Exit the recursive mutex on a Btree.
-func Xsqlite3BtreeLeave(tls *libc.TLS, p uintptr) { /* sqlite3.c:64788:21: */
+func Xsqlite3BtreeLeave(tls *libc.TLS, p uintptr) { /* sqlite3.c:65284:21: */
if (*Btree)(unsafe.Pointer(p)).Fsharable != 0 {
@@ -40995,7 +42863,7 @@ func Xsqlite3BtreeLeave(tls *libc.TLS, p uintptr) { /* sqlite3.c:64788:21: */
// to avoid the possibility of deadlock when two threads with
// two or more btrees in common both try to lock all their btrees
// at the same instant.
-func btreeEnterAll(tls *libc.TLS, db uintptr) { /* sqlite3.c:64831:29: */
+func btreeEnterAll(tls *libc.TLS, db uintptr) { /* sqlite3.c:65327:29: */
var i int32
var skipOk int32 = 1
var p uintptr
@@ -41010,13 +42878,13 @@ func btreeEnterAll(tls *libc.TLS, db uintptr) { /* sqlite3.c:64831:29: */
(*Sqlite3)(unsafe.Pointer(db)).FnoSharedCache = U8(skipOk)
}
-func Xsqlite3BtreeEnterAll(tls *libc.TLS, db uintptr) { /* sqlite3.c:64845:21: */
+func Xsqlite3BtreeEnterAll(tls *libc.TLS, db uintptr) { /* sqlite3.c:65341:21: */
if int32((*Sqlite3)(unsafe.Pointer(db)).FnoSharedCache) == 0 {
btreeEnterAll(tls, db)
}
}
-func btreeLeaveAll(tls *libc.TLS, db uintptr) { /* sqlite3.c:64848:29: */
+func btreeLeaveAll(tls *libc.TLS, db uintptr) { /* sqlite3.c:65344:29: */
var i int32
var p uintptr
@@ -41028,7 +42896,7 @@ func btreeLeaveAll(tls *libc.TLS, db uintptr) { /* sqlite3.c:64848:29: */
}
}
-func Xsqlite3BtreeLeaveAll(tls *libc.TLS, db uintptr) { /* sqlite3.c:64857:21: */
+func Xsqlite3BtreeLeaveAll(tls *libc.TLS, db uintptr) { /* sqlite3.c:65353:21: */
if int32((*Sqlite3)(unsafe.Pointer(db)).FnoSharedCache) == 0 {
btreeLeaveAll(tls, db)
}
@@ -41039,11 +42907,11 @@ func Xsqlite3BtreeLeaveAll(tls *libc.TLS, db uintptr) { /* sqlite3.c:64857:21: *
// These entry points are used by incremental I/O only. Enter() is required
// any time OMIT_SHARED_CACHE is not defined, regardless of whether or not
// the build is threadsafe. Leave() is only required by threadsafe builds.
-func Xsqlite3BtreeEnterCursor(tls *libc.TLS, pCur uintptr) { /* sqlite3.c:64943:21: */
+func Xsqlite3BtreeEnterCursor(tls *libc.TLS, pCur uintptr) { /* sqlite3.c:65439:21: */
Xsqlite3BtreeEnter(tls, (*BtCursor)(unsafe.Pointer(pCur)).FpBtree)
}
-func Xsqlite3BtreeLeaveCursor(tls *libc.TLS, pCur uintptr) { /* sqlite3.c:64947:21: */
+func Xsqlite3BtreeLeaveCursor(tls *libc.TLS, pCur uintptr) { /* sqlite3.c:65443:21: */
Xsqlite3BtreeLeave(tls, (*BtCursor)(unsafe.Pointer(pCur)).FpBtree)
}
@@ -41066,7 +42934,7 @@ func Xsqlite3BtreeLeaveCursor(tls *libc.TLS, pCur uintptr) { /* sqlite3.c:64947:
// The header string that appears at the beginning of every
// SQLite database.
-var zMagicHeader = *(*[16]int8)(unsafe.Pointer(ts + 3011 /* "SQLite format 3" */)) /* sqlite3.c:64978:19 */
+var zMagicHeader = *(*[16]uint8)(unsafe.Pointer(ts + 3142 /* "SQLite format 3" */)) /* sqlite3.c:65474:19 */
// Set this global variable to 1 to enable tracing using the TRACE
// macro.
@@ -41092,14 +42960,14 @@ var zMagicHeader = *(*[16]int8)(unsafe.Pointer(ts + 3011 /* "SQLite format 3" */
// test builds.
//
// Access to this variable is protected by SQLITE_MUTEX_STATIC_MAIN.
-var sqlite3SharedCacheList uintptr = uintptr(0) /* sqlite3.c:65033:17 */
+var sqlite3SharedCacheList uintptr = uintptr(0) /* sqlite3.c:65529:17 */
// Enable or disable the shared pager and schema features.
//
// This routine has no effect on existing database connections.
// The shared cache setting effects only future calls to
// sqlite3_open(), sqlite3_open16(), or sqlite3_open_v2().
-func Xsqlite3_enable_shared_cache(tls *libc.TLS, enable int32) int32 { /* sqlite3.c:65045:16: */
+func Xsqlite3_enable_shared_cache(tls *libc.TLS, enable int32) int32 { /* sqlite3.c:65541:16: */
Xsqlite3Config.FsharedCacheEnabled = enable
return SQLITE_OK
}
@@ -41116,7 +42984,7 @@ func Xsqlite3_enable_shared_cache(tls *libc.TLS, enable int32) int32 { /* sqlite
// (READ_LOCK or WRITE_LOCK) on the table with root-page iTab. Return
// SQLITE_OK if the lock may be obtained (by calling
// setSharedCacheTableLock()), or SQLITE_LOCKED if not.
-func querySharedCacheTableLock(tls *libc.TLS, p uintptr, iTab Pgno, eLock U8) int32 { /* sqlite3.c:65244:12: */
+func querySharedCacheTableLock(tls *libc.TLS, p uintptr, iTab Pgno, eLock U8) int32 { /* sqlite3.c:65740:12: */
var pBt uintptr = (*Btree)(unsafe.Pointer(p)).FpBt
var pIter uintptr
@@ -41173,7 +43041,7 @@ func querySharedCacheTableLock(tls *libc.TLS, p uintptr, iTab Pgno, eLock U8) in
//
// SQLITE_OK is returned if the lock is added successfully. SQLITE_NOMEM
// is returned if a malloc attempt fails.
-func setSharedCacheTableLock(tls *libc.TLS, p uintptr, iTable Pgno, eLock U8) int32 { /* sqlite3.c:65316:12: */
+func setSharedCacheTableLock(tls *libc.TLS, p uintptr, iTable Pgno, eLock U8) int32 { /* sqlite3.c:65812:12: */
var pBt uintptr = (*Btree)(unsafe.Pointer(p)).FpBt
var pLock uintptr = uintptr(0)
var pIter uintptr
@@ -41224,7 +43092,7 @@ func setSharedCacheTableLock(tls *libc.TLS, p uintptr, iTable Pgno, eLock U8) in
// This function assumes that Btree p has an open read or write
// transaction. If it does not, then the BTS_PENDING flag
// may be incorrectly cleared.
-func clearAllSharedCacheTableLocks(tls *libc.TLS, p uintptr) { /* sqlite3.c:65380:13: */
+func clearAllSharedCacheTableLocks(tls *libc.TLS, p uintptr) { /* sqlite3.c:65876:13: */
var pBt uintptr = (*Btree)(unsafe.Pointer(p)).FpBt
var ppIter uintptr = (pBt + 120 /* &.pLock */)
@@ -41259,7 +43127,7 @@ func clearAllSharedCacheTableLocks(tls *libc.TLS, p uintptr) { /* sqlite3.c:6538
}
// This function changes all write-locks held by Btree p into read-locks.
-func downgradeAllSharedCacheTableLocks(tls *libc.TLS, p uintptr) { /* sqlite3.c:65424:13: */
+func downgradeAllSharedCacheTableLocks(tls *libc.TLS, p uintptr) { /* sqlite3.c:65920:13: */
var pBt uintptr = (*Btree)(unsafe.Pointer(p)).FpBt
if (*BtShared)(unsafe.Pointer(pBt)).FpWriter == p {
var pLock uintptr
@@ -41283,7 +43151,7 @@ func downgradeAllSharedCacheTableLocks(tls *libc.TLS, p uintptr) { /* sqlite3.c:
// Invalidate the overflow page-list cache for all cursors opened
// on the shared btree structure pBt.
-func invalidateAllOverflowCache(tls *libc.TLS, pBt uintptr) { /* sqlite3.c:65477:13: */
+func invalidateAllOverflowCache(tls *libc.TLS, pBt uintptr) { /* sqlite3.c:65973:13: */
var p uintptr
for p = (*BtShared)(unsafe.Pointer(pBt)).FpCursor; p != 0; p = (*BtCursor)(unsafe.Pointer(p)).FpNext {
@@ -41302,11 +43170,8 @@ func invalidateAllOverflowCache(tls *libc.TLS, pBt uintptr) { /* sqlite3.c:65477
// Otherwise, if argument isClearTable is false, then the row with
// rowid iRow is being replaced or deleted. In this case invalidate
// only those incrblob cursors open on that specific row.
-func invalidateIncrblobCursors(tls *libc.TLS, pBtree uintptr, pgnoRoot Pgno, iRow I64, isClearTable int32) { /* sqlite3.c:65499:13: */
+func invalidateIncrblobCursors(tls *libc.TLS, pBtree uintptr, pgnoRoot Pgno, iRow I64, isClearTable int32) { /* sqlite3.c:65995:13: */
var p uintptr
- if int32((*Btree)(unsafe.Pointer(pBtree)).FhasIncrblobCur) == 0 {
- return
- }
(*Btree)(unsafe.Pointer(pBtree)).FhasIncrblobCur = U8(0)
for p = (*BtShared)(unsafe.Pointer((*Btree)(unsafe.Pointer(pBtree)).FpBt)).FpCursor; p != 0; p = (*BtCursor)(unsafe.Pointer(p)).FpNext {
@@ -41352,7 +43217,7 @@ func invalidateIncrblobCursors(tls *libc.TLS, pBtree uintptr, pgnoRoot Pgno, iRo
// optimization 2 above is omitted if the corresponding bit is already
// set in BtShared.pHasContent. The contents of the bitvec are cleared
// at the end of every transaction.
-func btreeSetHasContent(tls *libc.TLS, pBt uintptr, pgno Pgno) int32 { /* sqlite3.c:65559:12: */
+func btreeSetHasContent(tls *libc.TLS, pBt uintptr, pgno Pgno) int32 { /* sqlite3.c:66055:12: */
var rc int32 = SQLITE_OK
if !(int32((*BtShared)(unsafe.Pointer(pBt)).FpHasContent) != 0) {
@@ -41372,20 +43237,20 @@ func btreeSetHasContent(tls *libc.TLS, pBt uintptr, pgno Pgno) int32 { /* sqlite
// This function is called when a free-list leaf page is removed from the
// free-list for reuse. It returns false if it is safe to retrieve the
// page from the pager layer with the 'no-content' flag set. True otherwise.
-func btreeGetHasContent(tls *libc.TLS, pBt uintptr, pgno Pgno) int32 { /* sqlite3.c:65581:12: */
+func btreeGetHasContent(tls *libc.TLS, pBt uintptr, pgno Pgno) int32 { /* sqlite3.c:66077:12: */
var p uintptr = (*BtShared)(unsafe.Pointer(pBt)).FpHasContent
return (libc.Bool32((p != 0) && ((pgno > Xsqlite3BitvecSize(tls, p)) || (Xsqlite3BitvecTestNotNull(tls, p, pgno) != 0))))
}
// Clear (destroy) the BtShared.pHasContent bitvec. This should be
// invoked at the conclusion of each write-transaction.
-func btreeClearHasContent(tls *libc.TLS, pBt uintptr) { /* sqlite3.c:65590:13: */
+func btreeClearHasContent(tls *libc.TLS, pBt uintptr) { /* sqlite3.c:66086:13: */
Xsqlite3BitvecDestroy(tls, (*BtShared)(unsafe.Pointer(pBt)).FpHasContent)
(*BtShared)(unsafe.Pointer(pBt)).FpHasContent = uintptr(0)
}
// Release all of the apPage[] pages for a cursor.
-func btreeReleaseAllCursorPages(tls *libc.TLS, pCur uintptr) { /* sqlite3.c:65598:13: */
+func btreeReleaseAllCursorPages(tls *libc.TLS, pCur uintptr) { /* sqlite3.c:66094:13: */
var i int32
if int32((*BtCursor)(unsafe.Pointer(pCur)).FiPage) >= 0 {
for i = 0; i < int32((*BtCursor)(unsafe.Pointer(pCur)).FiPage); i++ {
@@ -41407,7 +43272,7 @@ func btreeReleaseAllCursorPages(tls *libc.TLS, pCur uintptr) { /* sqlite3.c:6559
// NULL. If the cursor is open on a non-intkey table, then pCur->pKey is
// set to point to a malloced buffer pCur->nKey bytes in size containing
// the key.
-func saveCursorKey(tls *libc.TLS, pCur uintptr) int32 { /* sqlite3.c:65622:12: */
+func saveCursorKey(tls *libc.TLS, pCur uintptr) int32 { /* sqlite3.c:66118:12: */
var rc int32 = SQLITE_OK
if (*BtCursor)(unsafe.Pointer(pCur)).FcurIntKey != 0 {
@@ -41444,7 +43309,7 @@ func saveCursorKey(tls *libc.TLS, pCur uintptr) int32 { /* sqlite3.c:65622:12: *
//
// The caller must ensure that the cursor is valid (has eState==CURSOR_VALID)
// prior to calling this routine.
-func saveCursorPosition(tls *libc.TLS, pCur uintptr) int32 { /* sqlite3.c:65664:12: */
+func saveCursorPosition(tls *libc.TLS, pCur uintptr) int32 { /* sqlite3.c:66160:12: */
var rc int32
if (int32((*BtCursor)(unsafe.Pointer(pCur)).FcurFlags) & BTCF_Pinned) != 0 {
@@ -41485,7 +43350,7 @@ func saveCursorPosition(tls *libc.TLS, pCur uintptr) int32 { /* sqlite3.c:65664:
// Implementation note: This routine merely checks to see if any cursors
// need to be saved. It calls out to saveCursorsOnList() in the (unusual)
// event that cursors are in need to being saved.
-func saveAllCursors(tls *libc.TLS, pBt uintptr, iRoot Pgno, pExcept uintptr) int32 { /* sqlite3.c:65714:12: */
+func saveAllCursors(tls *libc.TLS, pBt uintptr, iRoot Pgno, pExcept uintptr) int32 { /* sqlite3.c:66210:12: */
var p uintptr
for p = (*BtShared)(unsafe.Pointer(pBt)).FpCursor; p != 0; p = (*BtCursor)(unsafe.Pointer(p)).FpNext {
@@ -41506,7 +43371,7 @@ func saveAllCursors(tls *libc.TLS, pBt uintptr, iRoot Pgno, pExcept uintptr) int
// the cursors if and when a cursor is found that actually requires saving.
// The common case is that no cursors need to be saved, so this routine is
// broken out from its caller to avoid unnecessary stack pointer movement.
-func saveCursorsOnList(tls *libc.TLS, p uintptr, iRoot Pgno, pExcept uintptr) int32 { /* sqlite3.c:65731:28: */
+func saveCursorsOnList(tls *libc.TLS, p uintptr, iRoot Pgno, pExcept uintptr) int32 { /* sqlite3.c:66227:28: */
for ok := true; ok; ok = p != 0 {
if (p != pExcept) && ((Pgno(0) == iRoot) || ((*BtCursor)(unsafe.Pointer(p)).FpgnoRoot == iRoot)) {
if (int32((*BtCursor)(unsafe.Pointer(p)).FeState) == CURSOR_VALID) || (int32((*BtCursor)(unsafe.Pointer(p)).FeState) == CURSOR_SKIPNEXT) {
@@ -41525,7 +43390,7 @@ func saveCursorsOnList(tls *libc.TLS, p uintptr, iRoot Pgno, pExcept uintptr) in
}
// Clear the current cursor position.
-func Xsqlite3BtreeClearCursor(tls *libc.TLS, pCur uintptr) { /* sqlite3.c:65756:21: */
+func Xsqlite3BtreeClearCursor(tls *libc.TLS, pCur uintptr) { /* sqlite3.c:66252:21: */
Xsqlite3_free(tls, (*BtCursor)(unsafe.Pointer(pCur)).FpKey)
(*BtCursor)(unsafe.Pointer(pCur)).FpKey = uintptr(0)
@@ -41535,7 +43400,7 @@ func Xsqlite3BtreeClearCursor(tls *libc.TLS, pCur uintptr) { /* sqlite3.c:65756:
// In this version of BtreeMoveto, pKey is a packed index record
// such as is generated by the OP_MakeRecord opcode. Unpack the
// record and then call BtreeMovetoUnpacked() to do the work.
-func btreeMoveto(tls *libc.TLS, pCur uintptr, pKey uintptr, nKey I64, bias int32, pRes uintptr) int32 { /* sqlite3.c:65768:12: */
+func btreeMoveto(tls *libc.TLS, pCur uintptr, pKey uintptr, nKey I64, bias int32, pRes uintptr) int32 { /* sqlite3.c:66264:12: */
var rc int32 // Status code
var pIdxKey uintptr
var pKeyInfo uintptr // Unpacked index key
@@ -41556,7 +43421,7 @@ __3:
if !((int32((*UnpackedRecord)(unsafe.Pointer(pIdxKey)).FnField) == 0) || (int32((*UnpackedRecord)(unsafe.Pointer(pIdxKey)).FnField) > int32((*KeyInfo)(unsafe.Pointer(pKeyInfo)).FnAllField))) {
goto __4
}
- rc = Xsqlite3CorruptError(tls, 65785)
+ rc = Xsqlite3CorruptError(tls, 66281)
goto moveto_done
__4:
;
@@ -41581,7 +43446,7 @@ __5:
// saved position info stored by saveCursorPosition(), so there can be
// at most one effective restoreCursorPosition() call after each
// saveCursorPosition().
-func btreeRestoreCursorPosition(tls *libc.TLS, pCur uintptr) int32 { /* sqlite3.c:65806:12: */
+func btreeRestoreCursorPosition(tls *libc.TLS, pCur uintptr) int32 { /* sqlite3.c:66302:12: */
bp := tls.Alloc(4)
defer tls.Free(4)
@@ -41621,7 +43486,7 @@ func btreeRestoreCursorPosition(tls *libc.TLS, pCur uintptr) int32 { /* sqlite3.
//
// Use the separate sqlite3BtreeCursorRestore() routine to restore a cursor
// back to where it ought to be if this routine returns true.
-func Xsqlite3BtreeCursorHasMoved(tls *libc.TLS, pCur uintptr) int32 { /* sqlite3.c:65849:20: */
+func Xsqlite3BtreeCursorHasMoved(tls *libc.TLS, pCur uintptr) int32 { /* sqlite3.c:66345:20: */
return (libc.Bool32(CURSOR_VALID != int32(*(*U8)(unsafe.Pointer(pCur)))))
}
@@ -41629,12 +43494,12 @@ func Xsqlite3BtreeCursorHasMoved(tls *libc.TLS, pCur uintptr) int32 { /* sqlite3
// Return a pointer to a fake BtCursor object that will always answer
// false to the sqlite3BtreeCursorHasMoved() routine above. The fake
// cursor returned must not be used with any other Btree interface.
-func Xsqlite3BtreeFakeValidCursor(tls *libc.TLS) uintptr { /* sqlite3.c:65862:25: */
+func Xsqlite3BtreeFakeValidCursor(tls *libc.TLS) uintptr { /* sqlite3.c:66358:25: */
return uintptr(unsafe.Pointer(&fakeCursor))
}
-var fakeCursor U8 = U8(CURSOR_VALID) /* sqlite3.c:65863:13 */
+var fakeCursor U8 = U8(CURSOR_VALID) /* sqlite3.c:66359:13 */
// This routine restores a cursor back to its original position after it
// has been moved by some outside activity (such as a btree rebalance or
@@ -41647,7 +43512,7 @@ var fakeCursor U8 = U8(CURSOR_VALID) /* sqlite3.c:65863:13 */
//
// This routine should only be called for a cursor that just returned
// TRUE from sqlite3BtreeCursorHasMoved().
-func Xsqlite3BtreeCursorRestore(tls *libc.TLS, pCur uintptr, pDifferentRow uintptr) int32 { /* sqlite3.c:65881:20: */
+func Xsqlite3BtreeCursorRestore(tls *libc.TLS, pCur uintptr, pDifferentRow uintptr) int32 { /* sqlite3.c:66377:20: */
var rc int32
rc = func() int32 {
@@ -41669,7 +43534,7 @@ func Xsqlite3BtreeCursorRestore(tls *libc.TLS, pCur uintptr, pDifferentRow uintp
}
// Provide flag hints to the cursor.
-func Xsqlite3BtreeCursorHintFlags(tls *libc.TLS, pCur uintptr, x uint32) { /* sqlite3.c:65913:21: */
+func Xsqlite3BtreeCursorHintFlags(tls *libc.TLS, pCur uintptr, x uint32) { /* sqlite3.c:66409:21: */
(*BtCursor)(unsafe.Pointer(pCur)).Fhints = U8(x)
}
@@ -41681,7 +43546,7 @@ func Xsqlite3BtreeCursorHintFlags(tls *libc.TLS, pCur uintptr, x uint32) { /* sq
// Return 0 (not a valid page) for pgno==1 since there is
// no pointer map associated with page 1. The integrity_check logic
// requires that ptrmapPageno(*,1)!=1.
-func ptrmapPageno(tls *libc.TLS, pBt uintptr, pgno Pgno) Pgno { /* sqlite3.c:65929:13: */
+func ptrmapPageno(tls *libc.TLS, pBt uintptr, pgno Pgno) Pgno { /* sqlite3.c:66425:13: */
var nPagesPerMapPage int32
var iPtrMap Pgno
var ret Pgno
@@ -41706,7 +43571,7 @@ func ptrmapPageno(tls *libc.TLS, pBt uintptr, pgno Pgno) Pgno { /* sqlite3.c:659
// If *pRC is initially non-zero (non-SQLITE_OK) then this routine is
// a no-op. If an error occurs, the appropriate error code is written
// into *pRC.
-func ptrmapPut(tls *libc.TLS, pBt uintptr, key Pgno, eType U8, parent Pgno, pRC uintptr) { /* sqlite3.c:65953:13: */
+func ptrmapPut(tls *libc.TLS, pBt uintptr, key Pgno, eType U8, parent Pgno, pRC uintptr) { /* sqlite3.c:66449:13: */
bp := tls.Alloc(8)
defer tls.Free(8)
@@ -41729,7 +43594,7 @@ __1:
if !(key == Pgno(0)) {
goto __2
}
- *(*int32)(unsafe.Pointer(pRC)) = Xsqlite3CorruptError(tls, 65968)
+ *(*int32)(unsafe.Pointer(pRC)) = Xsqlite3CorruptError(tls, 66464)
return
__2:
;
@@ -41742,13 +43607,13 @@ __2:
return
__3:
;
- if !(int32(*(*int8)(unsafe.Pointer((Xsqlite3PagerGetExtra(tls, *(*uintptr)(unsafe.Pointer(bp /* pDbPage */))))))) != 0) {
+ if !(int32(*(*uint8)(unsafe.Pointer((Xsqlite3PagerGetExtra(tls, *(*uintptr)(unsafe.Pointer(bp /* pDbPage */))))))) != 0) {
goto __4
}
// The first byte of the extra data is the MemPage.isInit byte.
// If that byte is set, it means this page is also being used
// as a btree page.
- *(*int32)(unsafe.Pointer(pRC)) = Xsqlite3CorruptError(tls, 65981)
+ *(*int32)(unsafe.Pointer(pRC)) = Xsqlite3CorruptError(tls, 66477)
goto ptrmap_exit
__4:
;
@@ -41756,7 +43621,7 @@ __4:
if !(offset < 0) {
goto __5
}
- *(*int32)(unsafe.Pointer(pRC)) = Xsqlite3CorruptError(tls, 65986)
+ *(*int32)(unsafe.Pointer(pRC)) = Xsqlite3CorruptError(tls, 66482)
goto ptrmap_exit
__5:
;
@@ -41787,7 +43652,7 @@ ptrmap_exit:
// This routine retrieves the pointer map entry for page 'key', writing
// the type and parent page number to *pEType and *pPgno respectively.
// An error code is returned if something goes wrong, otherwise SQLITE_OK.
-func ptrmapGet(tls *libc.TLS, pBt uintptr, key Pgno, pEType uintptr, pPgno uintptr) int32 { /* sqlite3.c:66012:12: */
+func ptrmapGet(tls *libc.TLS, pBt uintptr, key Pgno, pEType uintptr, pPgno uintptr) int32 { /* sqlite3.c:66508:12: */
bp := tls.Alloc(8)
defer tls.Free(8)
@@ -41808,7 +43673,7 @@ func ptrmapGet(tls *libc.TLS, pBt uintptr, key Pgno, pEType uintptr, pPgno uintp
offset = (int32(Pgno(5) * ((key - Pgno(iPtrmap)) - Pgno(1))))
if offset < 0 {
Xsqlite3PagerUnref(tls, *(*uintptr)(unsafe.Pointer(bp /* pDbPage */)))
- return Xsqlite3CorruptError(tls, 66031)
+ return Xsqlite3CorruptError(tls, 66527)
}
*(*U8)(unsafe.Pointer(pEType)) = *(*U8)(unsafe.Pointer(pPtrmap + uintptr(offset)))
@@ -41818,7 +43683,7 @@ func ptrmapGet(tls *libc.TLS, pBt uintptr, key Pgno, pEType uintptr, pPgno uintp
Xsqlite3PagerUnref(tls, *(*uintptr)(unsafe.Pointer(bp /* pDbPage */)))
if (int32(*(*U8)(unsafe.Pointer(pEType))) < 1) || (int32(*(*U8)(unsafe.Pointer(pEType))) > 5) {
- return Xsqlite3CorruptError(tls, 66039)
+ return Xsqlite3CorruptError(tls, 66535)
}
return SQLITE_OK
}
@@ -41836,7 +43701,7 @@ func ptrmapGet(tls *libc.TLS, pBt uintptr, key Pgno, pEType uintptr, pPgno uintp
// btreeParseCellPtrIndex() for the case when the cell does not fit entirely
// on a single B-tree page. Make necessary adjustments to the CellInfo
// structure.
-func btreeParseCellAdjustSizeForOverflow(tls *libc.TLS, pPage uintptr, pCell uintptr, pInfo uintptr) { /* sqlite3.c:66071:29: */
+func btreeParseCellAdjustSizeForOverflow(tls *libc.TLS, pPage uintptr, pCell uintptr, pInfo uintptr) { /* sqlite3.c:66567:29: */
// If the payload will not fit completely on the local page, we have
// to decide how much to store locally and how much to spill onto
// overflow pages. The strategy is to minimize the amount of unused
@@ -41863,7 +43728,7 @@ func btreeParseCellAdjustSizeForOverflow(tls *libc.TLS, pPage uintptr, pCell uin
// Given a record with nPayload bytes of payload stored within btree
// page pPage, return the number of bytes of payload stored locally.
-func btreePayloadToLocal(tls *libc.TLS, pPage uintptr, nPayload I64) int32 { /* sqlite3.c:66106:12: */
+func btreePayloadToLocal(tls *libc.TLS, pPage uintptr, nPayload I64) int32 { /* sqlite3.c:66602:12: */
var maxLocal int32 // Maximum amount of payload held locally
maxLocal = int32((*MemPage)(unsafe.Pointer(pPage)).FmaxLocal)
if nPayload <= I64(maxLocal) {
@@ -41893,7 +43758,7 @@ func btreePayloadToLocal(tls *libc.TLS, pPage uintptr, nPayload I64) int32 { /*
// There is also a wrapper function btreeParseCell() that works for
// all MemPage types and that references the cell by index rather than
// by pointer.
-func btreeParseCellPtrNoPayload(tls *libc.TLS, pPage uintptr, pCell uintptr, pInfo uintptr) { /* sqlite3.c:66134:13: */
+func btreeParseCellPtrNoPayload(tls *libc.TLS, pPage uintptr, pCell uintptr, pInfo uintptr) { /* sqlite3.c:66630:13: */
_ = pPage
(*CellInfo)(unsafe.Pointer(pInfo)).FnSize = (U16(4 + int32(Xsqlite3GetVarint(tls, (pCell+4), (pInfo /* &.nKey */)))))
@@ -41903,7 +43768,7 @@ func btreeParseCellPtrNoPayload(tls *libc.TLS, pPage uintptr, pCell uintptr, pIn
return
}
-func btreeParseCellPtr(tls *libc.TLS, pPage uintptr, pCell uintptr, pInfo uintptr) { /* sqlite3.c:66151:13: */
+func btreeParseCellPtr(tls *libc.TLS, pPage uintptr, pCell uintptr, pInfo uintptr) { /* sqlite3.c:66647:13: */
bp := tls.Alloc(8)
defer tls.Free(8)
@@ -41968,7 +43833,7 @@ func btreeParseCellPtr(tls *libc.TLS, pPage uintptr, pCell uintptr, pInfo uintpt
}
}
-func btreeParseCellPtrIndex(tls *libc.TLS, pPage uintptr, pCell uintptr, pInfo uintptr) { /* sqlite3.c:66219:13: */
+func btreeParseCellPtrIndex(tls *libc.TLS, pPage uintptr, pCell uintptr, pInfo uintptr) { /* sqlite3.c:66715:13: */
var pIter uintptr // For scanning through pCell
var nPayload U32 // Number of bytes of cell payload
@@ -41999,8 +43864,10 @@ func btreeParseCellPtrIndex(tls *libc.TLS, pPage uintptr, pCell uintptr, pInfo u
}
}
-func btreeParseCell(tls *libc.TLS, pPage uintptr, iCell int32, pInfo uintptr) { /* sqlite3.c:66256:13: */
- (*(*func(*libc.TLS, uintptr, uintptr, uintptr))(unsafe.Pointer((pPage + 128 /* &.xParseCell */))))(tls, pPage, ((*MemPage)(unsafe.Pointer((pPage))).FaData + uintptr((int32((*MemPage)(unsafe.Pointer((pPage))).FmaskPage) & ((int32(*(*U8)(unsafe.Pointer(((*MemPage)(unsafe.Pointer((pPage))).FaCellIdx + uintptr((2 * (iCell))))))) << 8) | int32(*(*U8)(unsafe.Pointer(((*MemPage)(unsafe.Pointer((pPage))).FaCellIdx + uintptr((2 * (iCell)))) + 1))))))), pInfo)
+func btreeParseCell(tls *libc.TLS, pPage uintptr, iCell int32, pInfo uintptr) { /* sqlite3.c:66752:13: */
+ (*struct {
+ f func(*libc.TLS, uintptr, uintptr, uintptr)
+ })(unsafe.Pointer(&struct{ uintptr }{(*MemPage)(unsafe.Pointer(pPage)).FxParseCell})).f(tls, pPage, ((*MemPage)(unsafe.Pointer((pPage))).FaData + uintptr((int32((*MemPage)(unsafe.Pointer((pPage))).FmaskPage) & ((int32(*(*U8)(unsafe.Pointer(((*MemPage)(unsafe.Pointer((pPage))).FaCellIdx + uintptr((2 * (iCell))))))) << 8) | int32(*(*U8)(unsafe.Pointer(((*MemPage)(unsafe.Pointer((pPage))).FaCellIdx + uintptr((2 * (iCell)))) + 1))))))), pInfo)
}
// The following routines are implementations of the MemPage.xCellSize
@@ -42013,7 +43880,7 @@ func btreeParseCell(tls *libc.TLS, pPage uintptr, iCell int32, pInfo uintptr) {
//
// cellSizePtrNoPayload() => table internal nodes
// cellSizePtr() => all index nodes & table leaf nodes
-func cellSizePtr(tls *libc.TLS, pPage uintptr, pCell uintptr) U16 { /* sqlite3.c:66276:12: */
+func cellSizePtr(tls *libc.TLS, pPage uintptr, pCell uintptr) U16 { /* sqlite3.c:66772:12: */
var pIter uintptr = (pCell + uintptr((*MemPage)(unsafe.Pointer(pPage)).FchildPtrSize)) // For looping over bytes of pCell
var pEnd uintptr // End mark for a varint
var nSize U32 // Size value to return
@@ -42054,7 +43921,7 @@ func cellSizePtr(tls *libc.TLS, pPage uintptr, pCell uintptr) U16 { /* sqlite3.c
return U16(nSize)
}
-func cellSizePtrNoPayload(tls *libc.TLS, pPage uintptr, pCell uintptr) U16 { /* sqlite3.c:66324:12: */
+func cellSizePtrNoPayload(tls *libc.TLS, pPage uintptr, pCell uintptr) U16 { /* sqlite3.c:66820:12: */
var pIter uintptr = (pCell + uintptr(4)) // For looping over bytes of pCell
var pEnd uintptr // End mark for a varint
@@ -42071,7 +43938,7 @@ func cellSizePtrNoPayload(tls *libc.TLS, pPage uintptr, pCell uintptr) U16 { /*
// of pPage. (pSrc and pPager are often the same.) If pCell contains a
// pointer to an overflow page, insert an entry into the pointer-map for
// the overflow page that will be valid after pCell has been moved to pPage.
-func ptrmapPutOvflPtr(tls *libc.TLS, pPage uintptr, pSrc uintptr, pCell uintptr, pRC uintptr) { /* sqlite3.c:66362:13: */
+func ptrmapPutOvflPtr(tls *libc.TLS, pPage uintptr, pSrc uintptr, pCell uintptr, pRC uintptr) { /* sqlite3.c:66858:13: */
bp := tls.Alloc(24)
defer tls.Free(24)
@@ -42081,12 +43948,14 @@ func ptrmapPutOvflPtr(tls *libc.TLS, pPage uintptr, pSrc uintptr, pCell uintptr,
return
}
- (*(*func(*libc.TLS, uintptr, uintptr, uintptr))(unsafe.Pointer((pPage + 128 /* &.xParseCell */))))(tls, pPage, pCell, bp /* &info */)
+ (*struct {
+ f func(*libc.TLS, uintptr, uintptr, uintptr)
+ })(unsafe.Pointer(&struct{ uintptr }{(*MemPage)(unsafe.Pointer(pPage)).FxParseCell})).f(tls, pPage, pCell, bp /* &info */)
if U32((*CellInfo)(unsafe.Pointer(bp /* &info */)).FnLocal) < (*CellInfo)(unsafe.Pointer(bp /* &info */)).FnPayload {
var ovfl Pgno
if (Uptr(((*MemPage)(unsafe.Pointer(pSrc)).FaDataEnd)) >= Uptr((pCell))) && (Uptr(((*MemPage)(unsafe.Pointer(pSrc)).FaDataEnd)) < Uptr((pCell + uintptr((*CellInfo)(unsafe.Pointer(bp /* &info */)).FnLocal)))) {
- *(*int32)(unsafe.Pointer(pRC)) = Xsqlite3CorruptError(tls, 66371)
+ *(*int32)(unsafe.Pointer(pRC)) = Xsqlite3CorruptError(tls, 66867)
return
}
ovfl = Xsqlite3Get4byte(tls, (pCell + uintptr((int32((*CellInfo)(unsafe.Pointer(bp /* &info */)).FnSize) - 4))))
@@ -42104,7 +43973,7 @@ func ptrmapPutOvflPtr(tls *libc.TLS, pPage uintptr, pSrc uintptr, pCell uintptr,
// b-tree page so that there are no freeblocks or fragment bytes, all
// unused bytes are contained in the unallocated space region, and all
// cells are packed tightly at the end of the page.
-func defragmentPage(tls *libc.TLS, pPage uintptr, nMaxFrag int32) int32 { /* sqlite3.c:66393:12: */
+func defragmentPage(tls *libc.TLS, pPage uintptr, nMaxFrag int32) int32 { /* sqlite3.c:66889:12: */
var i int32 // Loop counter
var pc int32 // Address of the i-th cell
var hdr int32 // Offset to the page header
@@ -42117,7 +43986,8 @@ func defragmentPage(tls *libc.TLS, pPage uintptr, nMaxFrag int32) int32 { /* sql
var temp uintptr // Temp area for cell content
var src uintptr // Source of content
var iCellFirst int32 // First allowable cell index
- var iCellLast int32
+ var iCellLast int32 // Last possible cell index
+ var iCellStart int32
var pEnd uintptr
var pAddr uintptr
var sz2 int32
@@ -42125,8 +43995,7 @@ func defragmentPage(tls *libc.TLS, pPage uintptr, nMaxFrag int32) int32 { /* sql
var top int32
var iFree2 int32
var iFree int32
- var x int32
- var pAddr1 uintptr // Last possible cell index
+ var pAddr1 uintptr // First cell offset in input
temp = uintptr(0)
src = libc.AssignUintptr(&data, (*MemPage)(unsafe.Pointer(pPage)).FaData)
@@ -42149,7 +44018,7 @@ func defragmentPage(tls *libc.TLS, pPage uintptr, nMaxFrag int32) int32 { /* sql
if !(iFree > (usableSize - 4)) {
goto __2
}
- return Xsqlite3CorruptError(tls, 66429)
+ return Xsqlite3CorruptError(tls, 66926)
__2:
;
if !(iFree != 0) {
@@ -42159,7 +44028,7 @@ __2:
if !(iFree2 > (usableSize - 4)) {
goto __4
}
- return Xsqlite3CorruptError(tls, 66432)
+ return Xsqlite3CorruptError(tls, 66929)
__4:
;
if !((0 == iFree2) || ((int32(*(*uint8)(unsafe.Pointer(data + uintptr(iFree2)))) == 0) && (int32(*(*uint8)(unsafe.Pointer(data + uintptr((iFree2 + 1))))) == 0))) {
@@ -42172,7 +44041,7 @@ __4:
if !(top >= iFree) {
goto __6
}
- return Xsqlite3CorruptError(tls, 66440)
+ return Xsqlite3CorruptError(tls, 66937)
__6:
;
if !(iFree2 != 0) {
@@ -42181,14 +44050,14 @@ __6:
if !((iFree + sz) > iFree2) {
goto __9
}
- return Xsqlite3CorruptError(tls, 66443)
+ return Xsqlite3CorruptError(tls, 66940)
__9:
;
sz2 = ((int32(*(*uint8)(unsafe.Pointer((data + uintptr((iFree2 + 2)))))) << 8) | int32(*(*uint8)(unsafe.Pointer((data + uintptr((iFree2 + 2))) + 1))))
if !((iFree2 + sz2) > usableSize) {
goto __10
}
- return Xsqlite3CorruptError(tls, 66445)
+ return Xsqlite3CorruptError(tls, 66942)
__10:
;
libc.Xmemmove(tls, (data + uintptr(((iFree + sz) + sz2))), (data + uintptr((iFree + sz))), (uint64(iFree2 - (iFree + sz))))
@@ -42198,7 +44067,7 @@ __7:
if !((iFree + sz) > usableSize) {
goto __11
}
- return Xsqlite3CorruptError(tls, 66449)
+ return Xsqlite3CorruptError(tls, 66946)
__11:
;
__8:
@@ -42246,6 +44115,7 @@ __1:
cbrk = usableSize
iCellLast = (usableSize - 4)
+ iCellStart = ((int32(*(*uint8)(unsafe.Pointer((data + uintptr((hdr + 5)))))) << 8) | int32(*(*uint8)(unsafe.Pointer((data + uintptr((hdr + 5))) + 1))))
i = 0
__18:
if !(i < nCell) {
@@ -42256,19 +44126,21 @@ __18:
// These conditions have already been verified in btreeInitPage()
// if PRAGMA cell_size_check=ON.
- if !((pc < iCellFirst) || (pc > iCellLast)) {
+ if !((pc < iCellStart) || (pc > iCellLast)) {
goto __21
}
- return Xsqlite3CorruptError(tls, 66477)
+ return Xsqlite3CorruptError(tls, 66975)
__21:
;
- size = int32((*(*func(*libc.TLS, uintptr, uintptr) U16)(unsafe.Pointer((pPage + 120 /* &.xCellSize */))))(tls, pPage, (src + uintptr(pc))))
+ size = int32((*struct {
+ f func(*libc.TLS, uintptr, uintptr) U16
+ })(unsafe.Pointer(&struct{ uintptr }{(*MemPage)(unsafe.Pointer(pPage)).FxCellSize})).f(tls, pPage, (src + uintptr(pc))))
cbrk = cbrk - (size)
- if !((cbrk < iCellFirst) || ((pc + size) > usableSize)) {
+ if !((cbrk < iCellStart) || ((pc + size) > usableSize)) {
goto __22
}
- return Xsqlite3CorruptError(tls, 66483)
+ return Xsqlite3CorruptError(tls, 66981)
__22:
;
@@ -42284,8 +44156,7 @@ __22:
__24:
;
temp = Xsqlite3PagerTempSpace(tls, (*BtShared)(unsafe.Pointer((*MemPage)(unsafe.Pointer(pPage)).FpBt)).FpPager)
- x = ((int32(*(*uint8)(unsafe.Pointer((data + uintptr((hdr + 5)))))) << 8) | int32(*(*uint8)(unsafe.Pointer((data + uintptr((hdr + 5))) + 1))))
- libc.Xmemcpy(tls, (temp + uintptr(x)), (data + uintptr(x)), (uint64((cbrk + size) - x)))
+ libc.Xmemcpy(tls, (temp + uintptr(iCellStart)), (data + uintptr(iCellStart)), (uint64(usableSize - iCellStart)))
src = temp
__23:
;
@@ -42304,7 +44175,7 @@ defragment_out:
if !(((int32(*(*uint8)(unsafe.Pointer(data + uintptr((hdr + 7))))) + cbrk) - iCellFirst) != (*MemPage)(unsafe.Pointer(pPage)).FnFree) {
goto __25
}
- return Xsqlite3CorruptError(tls, 66504)
+ return Xsqlite3CorruptError(tls, 67000)
__25:
;
@@ -42329,7 +44200,7 @@ __25:
// Slots on the free list that are between 1 and 3 bytes larger than nByte
// will be ignored if adding the extra space to the fragmentation count
// causes the fragmentation count to exceed 60.
-func pageFindSlot(tls *libc.TLS, pPg uintptr, nByte int32, pRc uintptr) uintptr { /* sqlite3.c:66529:11: */
+func pageFindSlot(tls *libc.TLS, pPg uintptr, nByte int32, pRc uintptr) uintptr { /* sqlite3.c:67025:11: */
var hdr int32 = int32((*MemPage)(unsafe.Pointer(pPg)).FhdrOffset) // Offset to page header
var aData uintptr = (*MemPage)(unsafe.Pointer(pPg)).FaData // Page data
var iAddr int32 = (hdr + 1) // Address of ptr to pc
@@ -42358,7 +44229,7 @@ func pageFindSlot(tls *libc.TLS, pPg uintptr, nByte int32, pRc uintptr) uintptr
*(*U8)(unsafe.Pointer(aData + uintptr((hdr + 7)))) += U8((int32(U8(x))))
} else if (x + pc) > maxPC {
// This slot extends off the end of the usable part of the page
- *(*int32)(unsafe.Pointer(pRc)) = Xsqlite3CorruptError(tls, 66558)
+ *(*int32)(unsafe.Pointer(pRc)) = Xsqlite3CorruptError(tls, 67054)
return uintptr(0)
} else {
// The slot remains on the free-list. Reduce its size to account
@@ -42373,14 +44244,14 @@ func pageFindSlot(tls *libc.TLS, pPg uintptr, nByte int32, pRc uintptr) uintptr
if pc <= (iAddr + size) {
if pc != 0 {
// The next slot in the chain is not past the end of the current slot
- *(*int32)(unsafe.Pointer(pRc)) = Xsqlite3CorruptError(tls, 66572)
+ *(*int32)(unsafe.Pointer(pRc)) = Xsqlite3CorruptError(tls, 67068)
}
return uintptr(0)
}
}
if pc > ((maxPC + nByte) - 4) {
// The free slot chain extends off the end of the page
- *(*int32)(unsafe.Pointer(pRc)) = Xsqlite3CorruptError(tls, 66579)
+ *(*int32)(unsafe.Pointer(pRc)) = Xsqlite3CorruptError(tls, 67075)
}
return uintptr(0)
}
@@ -42396,7 +44267,7 @@ func pageFindSlot(tls *libc.TLS, pPg uintptr, nByte int32, pRc uintptr) uintptr
// the first two bytes past the cell pointer area since presumably this
// allocation is being made in order to insert a new cell, so we will
// also end up needing a new cell pointer.
-func allocateSpace(tls *libc.TLS, pPage uintptr, nByte int32, pIdx uintptr) int32 { /* sqlite3.c:66597:12: */
+func allocateSpace(tls *libc.TLS, pPage uintptr, nByte int32, pIdx uintptr) int32 { /* sqlite3.c:67093:12: */
bp := tls.Alloc(4)
defer tls.Free(4)
@@ -42421,7 +44292,7 @@ func allocateSpace(tls *libc.TLS, pPage uintptr, nByte int32, pIdx uintptr) int3
if (top == 0) && ((*BtShared)(unsafe.Pointer((*MemPage)(unsafe.Pointer(pPage)).FpBt)).FusableSize == U32(65536)) {
top = 65536
} else {
- return Xsqlite3CorruptError(tls, 66626)
+ return Xsqlite3CorruptError(tls, 67122)
}
}
@@ -42436,7 +44307,7 @@ func allocateSpace(tls *libc.TLS, pPage uintptr, nByte int32, pIdx uintptr) int3
*(*int32)(unsafe.Pointer(pIdx)) = libc.AssignInt32(&g2, (int32((int64(pSpace) - int64(data)) / 1)))
if g2 <= gap {
- return Xsqlite3CorruptError(tls, 66644)
+ return Xsqlite3CorruptError(tls, 67140)
} else {
return SQLITE_OK
}
@@ -42487,7 +44358,7 @@ func allocateSpace(tls *libc.TLS, pPage uintptr, nByte int32, pIdx uintptr) int3
// does it detect cells or freeblocks that encrouch into the reserved bytes
// at the end of the page. So do additional corruption checks inside this
// routine and return SQLITE_CORRUPT if any problems are found.
-func freeSpace(tls *libc.TLS, pPage uintptr, iStart U16, iSize U16) int32 { /* sqlite3.c:66693:12: */
+func freeSpace(tls *libc.TLS, pPage uintptr, iStart U16, iSize U16) int32 { /* sqlite3.c:67189:12: */
var iPtr U16 // Address of ptr to next freeblock
var iFreeBlk U16 // Address of the next freeblock
var hdr U8 // Page header size. 0 or 100
@@ -42511,12 +44382,12 @@ func freeSpace(tls *libc.TLS, pPage uintptr, iStart U16, iSize U16) int32 { /* s
if int32(iFreeBlk) == 0 {
break
} // TH3: corrupt082.100
- return Xsqlite3CorruptError(tls, 66722)
+ return Xsqlite3CorruptError(tls, 67218)
}
iPtr = iFreeBlk
}
if U32(iFreeBlk) > ((*BtShared)(unsafe.Pointer((*MemPage)(unsafe.Pointer(pPage)).FpBt)).FusableSize - U32(4)) { // TH3: corrupt081.100
- return Xsqlite3CorruptError(tls, 66727)
+ return Xsqlite3CorruptError(tls, 67223)
}
// At this point:
@@ -42527,11 +44398,11 @@ func freeSpace(tls *libc.TLS, pPage uintptr, iStart U16, iSize U16) int32 { /* s
if (iFreeBlk != 0) && ((iEnd + U32(3)) >= U32(iFreeBlk)) {
nFrag = (U8(U32(iFreeBlk) - iEnd))
if iEnd > U32(iFreeBlk) {
- return Xsqlite3CorruptError(tls, 66739)
+ return Xsqlite3CorruptError(tls, 67235)
}
iEnd = (U32(int32(iFreeBlk) + ((int32(*(*uint8)(unsafe.Pointer((data + uintptr((int32(iFreeBlk) + 2)))))) << 8) | int32(*(*uint8)(unsafe.Pointer((data + uintptr((int32(iFreeBlk) + 2))) + 1))))))
if iEnd > (*BtShared)(unsafe.Pointer((*MemPage)(unsafe.Pointer(pPage)).FpBt)).FusableSize {
- return Xsqlite3CorruptError(tls, 66742)
+ return Xsqlite3CorruptError(tls, 67238)
}
iSize = (U16(iEnd - U32(iStart)))
iFreeBlk = (U16((int32(*(*uint8)(unsafe.Pointer((data + uintptr(iFreeBlk))))) << 8) | int32(*(*uint8)(unsafe.Pointer((data + uintptr(iFreeBlk)) + 1)))))
@@ -42544,7 +44415,7 @@ func freeSpace(tls *libc.TLS, pPage uintptr, iStart U16, iSize U16) int32 { /* s
var iPtrEnd int32 = (int32(iPtr) + ((int32(*(*uint8)(unsafe.Pointer((data + uintptr((int32(iPtr) + 2)))))) << 8) | int32(*(*uint8)(unsafe.Pointer((data + uintptr((int32(iPtr) + 2))) + 1)))))
if (iPtrEnd + 3) >= int32(iStart) {
if iPtrEnd > int32(iStart) {
- return Xsqlite3CorruptError(tls, 66755)
+ return Xsqlite3CorruptError(tls, 67251)
}
nFrag = U8(int32(nFrag) + (int32(iStart) - iPtrEnd))
iSize = (U16(iEnd - U32(iPtr)))
@@ -42552,7 +44423,7 @@ func freeSpace(tls *libc.TLS, pPage uintptr, iStart U16, iSize U16) int32 { /* s
}
}
if int32(nFrag) > int32(*(*uint8)(unsafe.Pointer(data + uintptr((int32(hdr) + 7))))) {
- return Xsqlite3CorruptError(tls, 66761)
+ return Xsqlite3CorruptError(tls, 67257)
}
*(*uint8)(unsafe.Pointer(data + uintptr((int32(hdr) + 7)))) -= uint8((int32(nFrag)))
}
@@ -42562,10 +44433,10 @@ func freeSpace(tls *libc.TLS, pPage uintptr, iStart U16, iSize U16) int32 { /* s
// so just extend the cell content area rather than create another
// freelist entry
if int32(iStart) < int32(x) {
- return Xsqlite3CorruptError(tls, 66769)
+ return Xsqlite3CorruptError(tls, 67265)
}
if int32(iPtr) != (int32(hdr) + 1) {
- return Xsqlite3CorruptError(tls, 66770)
+ return Xsqlite3CorruptError(tls, 67266)
}
*(*uint8)(unsafe.Pointer((data + uintptr((int32(hdr) + 1))))) = (U8((int32(iFreeBlk)) >> 8))
*(*uint8)(unsafe.Pointer((data + uintptr((int32(hdr) + 1))) + 1)) = U8(iFreeBlk)
@@ -42599,7 +44470,7 @@ func freeSpace(tls *libc.TLS, pPage uintptr, iStart U16, iSize U16) int32 { /* s
// PTF_ZERODATA | PTF_LEAF
// PTF_LEAFDATA | PTF_INTKEY
// PTF_LEAFDATA | PTF_INTKEY | PTF_LEAF
-func decodeFlags(tls *libc.TLS, pPage uintptr, flagByte int32) int32 { /* sqlite3.c:66800:12: */
+func decodeFlags(tls *libc.TLS, pPage uintptr, flagByte int32) int32 { /* sqlite3.c:67296:12: */
var pBt uintptr // A copy of pPage->pBt
(*MemPage)(unsafe.Pointer(pPage)).Fleaf = (U8(flagByte >> 3))
@@ -42650,7 +44521,7 @@ func decodeFlags(tls *libc.TLS, pPage uintptr, flagByte int32) int32 { /* sqlite
} else {
// EVIDENCE-OF: R-47608-56469 Any other value for the b-tree page type is
// an error.
- return Xsqlite3CorruptError(tls, 66843)
+ return Xsqlite3CorruptError(tls, 67339)
}
(*MemPage)(unsafe.Pointer(pPage)).Fmax1bytePayload = (*BtShared)(unsafe.Pointer(pBt)).Fmax1bytePayload
return SQLITE_OK
@@ -42658,7 +44529,7 @@ func decodeFlags(tls *libc.TLS, pPage uintptr, flagByte int32) int32 { /* sqlite
// Compute the amount of freespace on the page. In other words, fill
// in the pPage->nFree field.
-func btreeComputeFreeSpace(tls *libc.TLS, pPage uintptr) int32 { /* sqlite3.c:66853:12: */
+func btreeComputeFreeSpace(tls *libc.TLS, pPage uintptr) int32 { /* sqlite3.c:67349:12: */
var pc int32 // Address of a freeblock within pPage->aData[]
var hdr U8 // Offset to beginning of page header
var data uintptr // Equal to pPage->aData
@@ -42690,12 +44561,12 @@ func btreeComputeFreeSpace(tls *libc.TLS, pPage uintptr) int32 { /* sqlite3.c:66
if pc < top {
// EVIDENCE-OF: R-55530-52930 In a well-formed b-tree page, there will
// always be at least one cell before the first freeblock.
- return Xsqlite3CorruptError(tls, 66894)
+ return Xsqlite3CorruptError(tls, 67390)
}
for 1 != 0 {
if pc > iCellLast {
// Freeblock off the end of the page
- return Xsqlite3CorruptError(tls, 66899)
+ return Xsqlite3CorruptError(tls, 67395)
}
next = (U32((int32(*(*U8)(unsafe.Pointer((data + uintptr(pc))))) << 8) | int32(*(*U8)(unsafe.Pointer((data + uintptr(pc)) + 1)))))
size = (U32((int32(*(*U8)(unsafe.Pointer((data + uintptr((pc + 2)))))) << 8) | int32(*(*U8)(unsafe.Pointer((data + uintptr((pc + 2))) + 1)))))
@@ -42707,11 +44578,11 @@ func btreeComputeFreeSpace(tls *libc.TLS, pPage uintptr) int32 { /* sqlite3.c:66
}
if next > U32(0) {
// Freeblock not in ascending order
- return Xsqlite3CorruptError(tls, 66909)
+ return Xsqlite3CorruptError(tls, 67405)
}
if (U32(pc) + size) > uint32(usableSize) {
// Last freeblock extends past page end
- return Xsqlite3CorruptError(tls, 66913)
+ return Xsqlite3CorruptError(tls, 67409)
}
}
@@ -42722,7 +44593,7 @@ func btreeComputeFreeSpace(tls *libc.TLS, pPage uintptr) int32 { /* sqlite3.c:66
// serves to verify that the offset to the start of the cell-content
// area, according to the page header, lies within the page.
if (nFree > usableSize) || (nFree < iCellFirst) {
- return Xsqlite3CorruptError(tls, 66925)
+ return Xsqlite3CorruptError(tls, 67421)
}
(*MemPage)(unsafe.Pointer(pPage)).FnFree = int32((U16(nFree - iCellFirst)))
return SQLITE_OK
@@ -42730,7 +44601,7 @@ func btreeComputeFreeSpace(tls *libc.TLS, pPage uintptr) int32 { /* sqlite3.c:66
// Do additional sanity check after btreeInitPage() if
// PRAGMA cell_size_check=ON
-func btreeCellSizeCheck(tls *libc.TLS, pPage uintptr) int32 { /* sqlite3.c:66935:28: */
+func btreeCellSizeCheck(tls *libc.TLS, pPage uintptr) int32 { /* sqlite3.c:67431:28: */
var iCellFirst int32 // First allowable cell or freeblock offset
var iCellLast int32 // Last possible cell or freeblock offset
var i int32 // Index into the cell pointer array
@@ -42752,12 +44623,14 @@ func btreeCellSizeCheck(tls *libc.TLS, pPage uintptr) int32 { /* sqlite3.c:66935
pc = ((int32(*(*U8)(unsafe.Pointer((data + uintptr((cellOffset + (i * 2))))))) << 8) | int32(*(*U8)(unsafe.Pointer((data + uintptr((cellOffset + (i * 2)))) + 1))))
if (pc < iCellFirst) || (pc > iCellLast) {
- return Xsqlite3CorruptError(tls, 66956)
+ return Xsqlite3CorruptError(tls, 67452)
}
- sz = int32((*(*func(*libc.TLS, uintptr, uintptr) U16)(unsafe.Pointer((pPage + 120 /* &.xCellSize */))))(tls, pPage, (data + uintptr(pc))))
+ sz = int32((*struct {
+ f func(*libc.TLS, uintptr, uintptr) U16
+ })(unsafe.Pointer(&struct{ uintptr }{(*MemPage)(unsafe.Pointer(pPage)).FxCellSize})).f(tls, pPage, (data + uintptr(pc))))
if (pc + sz) > usableSize {
- return Xsqlite3CorruptError(tls, 66961)
+ return Xsqlite3CorruptError(tls, 67457)
}
}
return SQLITE_OK
@@ -42770,7 +44643,7 @@ func btreeCellSizeCheck(tls *libc.TLS, pPage uintptr) int32 { /* sqlite3.c:66935
// SQLITE_CORRUPT. Note that a return of SQLITE_OK does not
// guarantee that the page is well-formed. It only shows that
// we failed to detect any corruption.
-func btreeInitPage(tls *libc.TLS, pPage uintptr) int32 { /* sqlite3.c:66976:12: */
+func btreeInitPage(tls *libc.TLS, pPage uintptr) int32 { /* sqlite3.c:67472:12: */
var data uintptr // Equal to pPage->aData
var pBt uintptr // The main btree structure
@@ -42779,7 +44652,7 @@ func btreeInitPage(tls *libc.TLS, pPage uintptr) int32 { /* sqlite3.c:66976:12:
// EVIDENCE-OF: R-28594-02890 The one-byte flag at offset 0 indicating
// the b-tree page type.
if decodeFlags(tls, pPage, int32(*(*U8)(unsafe.Pointer(data)))) != 0 {
- return Xsqlite3CorruptError(tls, 66993)
+ return Xsqlite3CorruptError(tls, 67489)
}
(*MemPage)(unsafe.Pointer(pPage)).FmaskPage = (U16((*BtShared)(unsafe.Pointer(pBt)).FpageSize - U32(1)))
@@ -42793,7 +44666,7 @@ func btreeInitPage(tls *libc.TLS, pPage uintptr) int32 { /* sqlite3.c:66976:12:
(*MemPage)(unsafe.Pointer(pPage)).FnCell = (U16((int32(*(*U8)(unsafe.Pointer((data + 3)))) << 8) | int32(*(*U8)(unsafe.Pointer((data + 3) + 1)))))
if U32((*MemPage)(unsafe.Pointer(pPage)).FnCell) > (((*BtShared)(unsafe.Pointer(pBt)).FpageSize - U32(8)) / U32(6)) {
// To many cells for a single page. The page must be corrupt
- return Xsqlite3CorruptError(tls, 67007)
+ return Xsqlite3CorruptError(tls, 67503)
}
// EVIDENCE-OF: R-24089-57979 If a page contains no cells (which is only
@@ -42811,7 +44684,7 @@ func btreeInitPage(tls *libc.TLS, pPage uintptr) int32 { /* sqlite3.c:66976:12:
// Set up a raw page so that it looks like a database page holding
// no entries.
-func zeroPage(tls *libc.TLS, pPage uintptr, flags int32) { /* sqlite3.c:67029:13: */
+func zeroPage(tls *libc.TLS, pPage uintptr, flags int32) { /* sqlite3.c:67525:13: */
var data uintptr = (*MemPage)(unsafe.Pointer(pPage)).FaData
var pBt uintptr = (*MemPage)(unsafe.Pointer(pPage)).FpBt
var hdr U8 = (*MemPage)(unsafe.Pointer(pPage)).FhdrOffset
@@ -42820,7 +44693,7 @@ func zeroPage(tls *libc.TLS, pPage uintptr, flags int32) { /* sqlite3.c:67029:13
if (int32((*BtShared)(unsafe.Pointer(pBt)).FbtsFlags) & BTS_FAST_SECURE) != 0 {
libc.Xmemset(tls, (data + uintptr(hdr)), 0, (uint64((*BtShared)(unsafe.Pointer(pBt)).FusableSize - U32(hdr))))
}
- *(*uint8)(unsafe.Pointer(data + uintptr(hdr))) = uint8(int8(flags))
+ *(*uint8)(unsafe.Pointer(data + uintptr(hdr))) = uint8(uint8(flags))
first = (U16(int32(hdr) + (func() int32 {
if (flags & PTF_LEAF) == 0 {
return 12
@@ -42846,7 +44719,7 @@ func zeroPage(tls *libc.TLS, pPage uintptr, flags int32) { /* sqlite3.c:67029:13
// Convert a DbPage obtained from the pager into a MemPage used by
// the btree layer.
-func btreePageFromDbPage(tls *libc.TLS, pDbPage uintptr, pgno Pgno, pBt uintptr) uintptr { /* sqlite3.c:67066:16: */
+func btreePageFromDbPage(tls *libc.TLS, pDbPage uintptr, pgno Pgno, pBt uintptr) uintptr { /* sqlite3.c:67562:16: */
var pPage uintptr = Xsqlite3PagerGetExtra(tls, pDbPage)
if pgno != (*MemPage)(unsafe.Pointer(pPage)).Fpgno {
(*MemPage)(unsafe.Pointer(pPage)).FaData = Xsqlite3PagerGetData(tls, pDbPage)
@@ -42873,7 +44746,7 @@ func btreePageFromDbPage(tls *libc.TLS, pDbPage uintptr, pgno Pgno, pBt uintptr)
// If in the future we call sqlite3PagerWrite() on this page, that
// means we have started to be concerned about content and the disk
// read should occur at that point.
-func btreeGetPage(tls *libc.TLS, pBt uintptr, pgno Pgno, ppPage uintptr, flags int32) int32 { /* sqlite3.c:67090:12: */
+func btreeGetPage(tls *libc.TLS, pBt uintptr, pgno Pgno, ppPage uintptr, flags int32) int32 { /* sqlite3.c:67586:12: */
bp := tls.Alloc(8)
defer tls.Free(8)
@@ -42891,7 +44764,7 @@ func btreeGetPage(tls *libc.TLS, pBt uintptr, pgno Pgno, ppPage uintptr, flags i
// Retrieve a page from the pager cache. If the requested page is not
// already in the pager cache return NULL. Initialize the MemPage.pBt and
// MemPage.aData elements if needed.
-func btreePageLookup(tls *libc.TLS, pBt uintptr, pgno Pgno) uintptr { /* sqlite3.c:67112:16: */
+func btreePageLookup(tls *libc.TLS, pBt uintptr, pgno Pgno) uintptr { /* sqlite3.c:67608:16: */
var pDbPage uintptr
pDbPage = Xsqlite3PagerLookup(tls, (*BtShared)(unsafe.Pointer(pBt)).FpPager, pgno)
@@ -42903,11 +44776,11 @@ func btreePageLookup(tls *libc.TLS, pBt uintptr, pgno Pgno) uintptr { /* sqlite3
// Return the size of the database file in pages. If there is any kind of
// error, return ((unsigned int)-1).
-func btreePagecount(tls *libc.TLS, pBt uintptr) Pgno { /* sqlite3.c:67126:13: */
+func btreePagecount(tls *libc.TLS, pBt uintptr) Pgno { /* sqlite3.c:67622:13: */
return (*BtShared)(unsafe.Pointer(pBt)).FnPage
}
-func Xsqlite3BtreeLastPage(tls *libc.TLS, p uintptr) Pgno { /* sqlite3.c:67129:21: */
+func Xsqlite3BtreeLastPage(tls *libc.TLS, p uintptr) Pgno { /* sqlite3.c:67625:21: */
return btreePagecount(tls, (*Btree)(unsafe.Pointer(p)).FpBt)
}
@@ -42923,7 +44796,7 @@ func Xsqlite3BtreeLastPage(tls *libc.TLS, p uintptr) Pgno { /* sqlite3.c:67129:2
//
// If an error occurs, then *ppPage is undefined. It
// may remain unchanged, or it may be set to an invalid value.
-func getAndInitPage(tls *libc.TLS, pBt uintptr, pgno Pgno, ppPage uintptr, pCur uintptr, bReadOnly int32) int32 { /* sqlite3.c:67147:12: */
+func getAndInitPage(tls *libc.TLS, pBt uintptr, pgno Pgno, ppPage uintptr, pCur uintptr, bReadOnly int32) int32 { /* sqlite3.c:67643:12: */
bp := tls.Alloc(8)
defer tls.Free(8)
@@ -42933,7 +44806,7 @@ func getAndInitPage(tls *libc.TLS, pBt uintptr, pgno Pgno, ppPage uintptr, pCur
if !(pgno > btreePagecount(tls, pBt)) {
goto __1
}
- rc = Xsqlite3CorruptError(tls, 67162)
+ rc = Xsqlite3CorruptError(tls, 67658)
goto getAndInitPage_error1
__1:
;
@@ -42964,7 +44837,7 @@ __3:
if !((pCur != 0) && ((int32((*MemPage)(unsafe.Pointer((*(*uintptr)(unsafe.Pointer(ppPage))))).FnCell) < 1) || (int32((*MemPage)(unsafe.Pointer((*(*uintptr)(unsafe.Pointer(ppPage))))).FintKey) != int32((*BtCursor)(unsafe.Pointer(pCur)).FcurIntKey)))) {
goto __5
}
- rc = Xsqlite3CorruptError(tls, 67183)
+ rc = Xsqlite3CorruptError(tls, 67679)
goto getAndInitPage_error2
__5:
;
@@ -42988,18 +44861,18 @@ __6:
// call to btreeGetPage.
//
// Page1 is a special case and must be released using releasePageOne().
-func releasePageNotNull(tls *libc.TLS, pPage uintptr) { /* sqlite3.c:67206:13: */
+func releasePageNotNull(tls *libc.TLS, pPage uintptr) { /* sqlite3.c:67702:13: */
Xsqlite3PagerUnrefNotNull(tls, (*MemPage)(unsafe.Pointer(pPage)).FpDbPage)
}
-func releasePage(tls *libc.TLS, pPage uintptr) { /* sqlite3.c:67215:13: */
+func releasePage(tls *libc.TLS, pPage uintptr) { /* sqlite3.c:67711:13: */
if pPage != 0 {
releasePageNotNull(tls, pPage)
}
}
-func releasePageOne(tls *libc.TLS, pPage uintptr) { /* sqlite3.c:67218:13: */
+func releasePageOne(tls *libc.TLS, pPage uintptr) { /* sqlite3.c:67714:13: */
Xsqlite3PagerUnrefPageOne(tls, (*MemPage)(unsafe.Pointer(pPage)).FpDbPage)
}
@@ -43011,13 +44884,13 @@ func releasePageOne(tls *libc.TLS, pPage uintptr) { /* sqlite3.c:67218:13: */
// * If the page is already in use for some other purpose, immediately
// release it and return an SQLITE_CURRUPT error.
// * Make sure the isInit flag is clear
-func btreeGetUnusedPage(tls *libc.TLS, pBt uintptr, pgno Pgno, ppPage uintptr, flags int32) int32 { /* sqlite3.c:67238:12: */
+func btreeGetUnusedPage(tls *libc.TLS, pBt uintptr, pgno Pgno, ppPage uintptr, flags int32) int32 { /* sqlite3.c:67734:12: */
var rc int32 = btreeGetPage(tls, pBt, pgno, ppPage, flags)
if rc == SQLITE_OK {
if Xsqlite3PagerPageRefcount(tls, (*MemPage)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(ppPage)))).FpDbPage) > 1 {
releasePage(tls, *(*uintptr)(unsafe.Pointer(ppPage)))
*(*uintptr)(unsafe.Pointer(ppPage)) = uintptr(0)
- return Xsqlite3CorruptError(tls, 67249)
+ return Xsqlite3CorruptError(tls, 67745)
}
(*MemPage)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(ppPage)))).FisInit = U8(0)
} else {
@@ -43032,7 +44905,7 @@ func btreeGetUnusedPage(tls *libc.TLS, pBt uintptr, pgno Pgno, ppPage uintptr, f
//
// This routine needs to reset the extra data section at the end of the
// page to agree with the restored data.
-func pageReinit(tls *libc.TLS, pData uintptr) { /* sqlite3.c:67267:13: */
+func pageReinit(tls *libc.TLS, pData uintptr) { /* sqlite3.c:67763:13: */
var pPage uintptr
pPage = Xsqlite3PagerGetExtra(tls, pData)
@@ -43052,7 +44925,7 @@ func pageReinit(tls *libc.TLS, pData uintptr) { /* sqlite3.c:67267:13: */
}
// Invoke the busy handler for a btree.
-func btreeInvokeBusyHandler(tls *libc.TLS, pArg uintptr) int32 { /* sqlite3.c:67289:12: */
+func btreeInvokeBusyHandler(tls *libc.TLS, pArg uintptr) int32 { /* sqlite3.c:67785:12: */
var pBt uintptr = pArg
return Xsqlite3InvokeBusyHandler(tls, ((*BtShared)(unsafe.Pointer(pBt)).Fdb + 632 /* &.busyHandler */))
@@ -43077,7 +44950,7 @@ func btreeInvokeBusyHandler(tls *libc.TLS, pArg uintptr) int32 { /* sqlite3.c:67
// SQLITE_CONSTRAINT error. We cannot allow two or more BtShared
// objects in the same database connection since doing so will lead
// to problems with locking.
-func Xsqlite3BtreeOpen(tls *libc.TLS, pVfs uintptr, zFilename uintptr, db uintptr, ppBtree uintptr, flags int32, vfsFlags int32) int32 { /* sqlite3.c:67317:20: */
+func Xsqlite3BtreeOpen(tls *libc.TLS, pVfs uintptr, zFilename uintptr, db uintptr, ppBtree uintptr, flags int32, vfsFlags int32) int32 { /* sqlite3.c:67813:20: */
bp := tls.Alloc(100)
defer tls.Free(100)
@@ -43108,8 +44981,8 @@ func Xsqlite3BtreeOpen(tls *libc.TLS, pVfs uintptr, zFilename uintptr, db uintpt
pBt = uintptr(0)
mutexOpen = uintptr(0)
rc = SQLITE_OK
- isTempDb = (libc.Bool32((zFilename == uintptr(0)) || (int32(*(*int8)(unsafe.Pointer(zFilename))) == 0)))
- isMemdb = (libc.Bool32((((zFilename != 0) && (libc.Xstrcmp(tls, zFilename, ts+3027 /* ":memory:" */) == 0)) ||
+ isTempDb = (libc.Bool32((zFilename == uintptr(0)) || (int32(*(*uint8)(unsafe.Pointer(zFilename))) == 0)))
+ isMemdb = (libc.Bool32((((zFilename != 0) && (libc.Xstrcmp(tls, zFilename, ts+3158 /* ":memory:" */) == 0)) ||
((isTempDb != 0) && (Xsqlite3TempInMemory(tls, db) != 0))) ||
((vfsFlags & SQLITE_OPEN_MEMORY) != 0)))
@@ -43498,7 +45371,7 @@ __49:
// remove the BtShared structure from the sharing list. Return
// true if the BtShared.nRef counter reaches zero and return
// false if it is still positive.
-func removeFromSharingList(tls *libc.TLS, pBt uintptr) int32 { /* sqlite3.c:67615:12: */
+func removeFromSharingList(tls *libc.TLS, pBt uintptr) int32 { /* sqlite3.c:68111:12: */
var pMainMtx uintptr
var pList uintptr
var removed int32 = 0
@@ -43530,7 +45403,7 @@ func removeFromSharingList(tls *libc.TLS, pBt uintptr) int32 { /* sqlite3.c:6761
// Make sure pBt->pTmpSpace points to an allocation of
// MX_CELL_SIZE(pBt) bytes with a 4-byte prefix for a left-child
// pointer.
-func allocateTempSpace(tls *libc.TLS, pBt uintptr) { /* sqlite3.c:67654:13: */
+func allocateTempSpace(tls *libc.TLS, pBt uintptr) { /* sqlite3.c:68150:13: */
if !(int32((*BtShared)(unsafe.Pointer(pBt)).FpTmpSpace) != 0) {
(*BtShared)(unsafe.Pointer(pBt)).FpTmpSpace = Xsqlite3PageMalloc(tls, int32((*BtShared)(unsafe.Pointer(pBt)).FpageSize))
@@ -43556,7 +45429,7 @@ func allocateTempSpace(tls *libc.TLS, pBt uintptr) { /* sqlite3.c:67654:13: */
}
// Free the pBt->pTmpSpace allocation
-func freeTempSpace(tls *libc.TLS, pBt uintptr) { /* sqlite3.c:67683:13: */
+func freeTempSpace(tls *libc.TLS, pBt uintptr) { /* sqlite3.c:68179:13: */
if (*BtShared)(unsafe.Pointer(pBt)).FpTmpSpace != 0 {
*(*uintptr)(unsafe.Pointer(pBt + 136 /* &.pTmpSpace */)) -= (uintptr(4))
Xsqlite3PageFree(tls, (*BtShared)(unsafe.Pointer(pBt)).FpTmpSpace)
@@ -43565,7 +45438,7 @@ func freeTempSpace(tls *libc.TLS, pBt uintptr) { /* sqlite3.c:67683:13: */
}
// Close an open database and invalidate all cursors.
-func Xsqlite3BtreeClose(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:67694:20: */
+func Xsqlite3BtreeClose(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:68190:20: */
var pBt uintptr = (*Btree)(unsafe.Pointer(p)).FpBt
// Close all cursors opened via this handle.
@@ -43592,7 +45465,7 @@ func Xsqlite3BtreeClose(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:67694:20:
Xsqlite3PagerClose(tls, (*BtShared)(unsafe.Pointer(pBt)).FpPager, (*Btree)(unsafe.Pointer(p)).Fdb)
if ((*BtShared)(unsafe.Pointer(pBt)).FxFreeSchema != 0) && ((*BtShared)(unsafe.Pointer(pBt)).FpSchema != 0) {
- (*(*func(*libc.TLS, uintptr))(unsafe.Pointer((pBt + 80 /* &.xFreeSchema */))))(tls, (*BtShared)(unsafe.Pointer(pBt)).FpSchema)
+ (*struct{ f func(*libc.TLS, uintptr) })(unsafe.Pointer(&struct{ uintptr }{(*BtShared)(unsafe.Pointer(pBt)).FxFreeSchema})).f(tls, (*BtShared)(unsafe.Pointer(pBt)).FpSchema)
}
Xsqlite3DbFree(tls, uintptr(0), (*BtShared)(unsafe.Pointer(pBt)).FpSchema)
freeTempSpace(tls, pBt)
@@ -43615,7 +45488,7 @@ func Xsqlite3BtreeClose(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:67694:20:
// pages in the cache exceeds this soft limit. But the size of the
// cache is allowed to grow larger than this limit if it contains
// dirty pages or pages still in active use.
-func Xsqlite3BtreeSetCacheSize(tls *libc.TLS, p uintptr, mxPage int32) int32 { /* sqlite3.c:67760:20: */
+func Xsqlite3BtreeSetCacheSize(tls *libc.TLS, p uintptr, mxPage int32) int32 { /* sqlite3.c:68256:20: */
var pBt uintptr = (*Btree)(unsafe.Pointer(p)).FpBt
Xsqlite3BtreeEnter(tls, p)
@@ -43632,7 +45505,7 @@ func Xsqlite3BtreeSetCacheSize(tls *libc.TLS, p uintptr, mxPage int32) int32 { /
// The value returned is the current spill size. If zero is passed
// as an argument, no changes are made to the spill size setting, so
// using mxPage of 0 is a way to query the current spill size.
-func Xsqlite3BtreeSetSpillSize(tls *libc.TLS, p uintptr, mxPage int32) int32 { /* sqlite3.c:67779:20: */
+func Xsqlite3BtreeSetSpillSize(tls *libc.TLS, p uintptr, mxPage int32) int32 { /* sqlite3.c:68275:20: */
var pBt uintptr = (*Btree)(unsafe.Pointer(p)).FpBt
var res int32
@@ -43644,7 +45517,7 @@ func Xsqlite3BtreeSetSpillSize(tls *libc.TLS, p uintptr, mxPage int32) int32 { /
// Change the limit on the amount of the database file that may be
// memory mapped.
-func Xsqlite3BtreeSetMmapLimit(tls *libc.TLS, p uintptr, szMmap Sqlite3_int64) int32 { /* sqlite3.c:67794:20: */
+func Xsqlite3BtreeSetMmapLimit(tls *libc.TLS, p uintptr, szMmap Sqlite3_int64) int32 { /* sqlite3.c:68290:20: */
var pBt uintptr = (*Btree)(unsafe.Pointer(p)).FpBt
Xsqlite3BtreeEnter(tls, p)
@@ -43659,7 +45532,7 @@ func Xsqlite3BtreeSetMmapLimit(tls *libc.TLS, p uintptr, szMmap Sqlite3_int64) i
// there is a high probability of damage) Level 2 is the default. There
// is a very low but non-zero probability of damage. Level 3 reduces the
// probability of damage to near zero but with a write performance reduction.
-func Xsqlite3BtreeSetPagerFlags(tls *libc.TLS, p uintptr, pgFlags uint32) int32 { /* sqlite3.c:67813:20: */
+func Xsqlite3BtreeSetPagerFlags(tls *libc.TLS, p uintptr, pgFlags uint32) int32 { /* sqlite3.c:68309:20: */
var pBt uintptr = (*Btree)(unsafe.Pointer(p)).FpBt
Xsqlite3BtreeEnter(tls, p)
@@ -43686,7 +45559,7 @@ func Xsqlite3BtreeSetPagerFlags(tls *libc.TLS, p uintptr, pgFlags uint32) int32
//
// If the iFix!=0 then the BTS_PAGESIZE_FIXED flag is set so that the page size
// and autovacuum mode can no longer be changed.
-func Xsqlite3BtreeSetPageSize(tls *libc.TLS, p uintptr, pageSize int32, nReserve int32, iFix int32) int32 { /* sqlite3.c:67846:20: */
+func Xsqlite3BtreeSetPageSize(tls *libc.TLS, p uintptr, pageSize int32, nReserve int32, iFix int32) int32 { /* sqlite3.c:68342:20: */
var rc int32 = SQLITE_OK
var x int32
var pBt uintptr = (*Btree)(unsafe.Pointer(p)).FpBt
@@ -43720,7 +45593,7 @@ func Xsqlite3BtreeSetPageSize(tls *libc.TLS, p uintptr, pageSize int32, nReserve
}
// Return the currently defined page size
-func Xsqlite3BtreeGetPageSize(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:67878:20: */
+func Xsqlite3BtreeGetPageSize(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:68374:20: */
return int32((*BtShared)(unsafe.Pointer((*Btree)(unsafe.Pointer(p)).FpBt)).FpageSize)
}
@@ -43733,7 +45606,7 @@ func Xsqlite3BtreeGetPageSize(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:678
// database handle that owns *p is not. In this case if sqlite3BtreeEnter()
// were to be called, it might collide with some other operation on the
// database handle that owns *p, causing undefined behavior.
-func Xsqlite3BtreeGetReserveNoMutex(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:67893:20: */
+func Xsqlite3BtreeGetReserveNoMutex(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:68389:20: */
var n int32
n = (int32((*BtShared)(unsafe.Pointer((*Btree)(unsafe.Pointer(p)).FpBt)).FpageSize - (*BtShared)(unsafe.Pointer((*Btree)(unsafe.Pointer(p)).FpBt)).FusableSize))
@@ -43747,7 +45620,7 @@ func Xsqlite3BtreeGetReserveNoMutex(tls *libc.TLS, p uintptr) int32 { /* sqlite3
// The value returned is the larger of the current reserve size and
// the latest reserve size requested by SQLITE_FILECTRL_RESERVE_BYTES.
// The amount of reserve can only grow - never shrink.
-func Xsqlite3BtreeGetRequestedReserve(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:67909:20: */
+func Xsqlite3BtreeGetRequestedReserve(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:68405:20: */
var n1 int32
var n2 int32
Xsqlite3BtreeEnter(tls, p)
@@ -43763,7 +45636,7 @@ func Xsqlite3BtreeGetRequestedReserve(tls *libc.TLS, p uintptr) int32 { /* sqlit
// Set the maximum page count for a database if mxPage is positive.
// No changes are made if mxPage is 0 or negative.
// Regardless of the value of mxPage, return the maximum page count.
-func Xsqlite3BtreeMaxPageCount(tls *libc.TLS, p uintptr, mxPage Pgno) Pgno { /* sqlite3.c:67924:21: */
+func Xsqlite3BtreeMaxPageCount(tls *libc.TLS, p uintptr, mxPage Pgno) Pgno { /* sqlite3.c:68420:21: */
var n Pgno
Xsqlite3BtreeEnter(tls, p)
n = Xsqlite3PagerMaxPageCount(tls, (*BtShared)(unsafe.Pointer((*Btree)(unsafe.Pointer(p)).FpBt)).FpPager, mxPage)
@@ -43787,7 +45660,7 @@ func Xsqlite3BtreeMaxPageCount(tls *libc.TLS, p uintptr, mxPage Pgno) Pgno { /*
// With BTS_SECURE_DELETE, operation is like BTS_OVERWRITE with the addition
// that freelist leaf pages are written back into the database, increasing
// the amount of disk I/O.
-func Xsqlite3BtreeSecureDelete(tls *libc.TLS, p uintptr, newFlag int32) int32 { /* sqlite3.c:67950:20: */
+func Xsqlite3BtreeSecureDelete(tls *libc.TLS, p uintptr, newFlag int32) int32 { /* sqlite3.c:68446:20: */
var b int32
if p == uintptr(0) {
return 0
@@ -43807,7 +45680,7 @@ func Xsqlite3BtreeSecureDelete(tls *libc.TLS, p uintptr, newFlag int32) int32 {
// parameter is non-zero, then auto-vacuum mode is enabled. If zero, it
// is disabled. The default value for the auto-vacuum property is
// determined by the SQLITE_DEFAULT_AUTOVACUUM macro.
-func Xsqlite3BtreeSetAutoVacuum(tls *libc.TLS, p uintptr, autoVacuum int32) int32 { /* sqlite3.c:67971:20: */
+func Xsqlite3BtreeSetAutoVacuum(tls *libc.TLS, p uintptr, autoVacuum int32) int32 { /* sqlite3.c:68467:20: */
var pBt uintptr = (*Btree)(unsafe.Pointer(p)).FpBt
var rc int32 = SQLITE_OK
var av U8 = U8(autoVacuum)
@@ -43840,7 +45713,7 @@ func Xsqlite3BtreeSetAutoVacuum(tls *libc.TLS, p uintptr, autoVacuum int32) int3
// Return the value of the 'auto-vacuum' property. If auto-vacuum is
// enabled 1 is returned. Otherwise 0.
-func Xsqlite3BtreeGetAutoVacuum(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:67995:20: */
+func Xsqlite3BtreeGetAutoVacuum(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:68491:20: */
var rc int32
Xsqlite3BtreeEnter(tls, p)
rc = func() int32 {
@@ -43865,7 +45738,7 @@ func Xsqlite3BtreeGetAutoVacuum(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:6
// well-formed database file, then SQLITE_CORRUPT is returned.
// SQLITE_BUSY is returned if the database is locked. SQLITE_NOMEM
// is returned if we run out of memory.
-func lockBtree(tls *libc.TLS, pBt uintptr) int32 { /* sqlite3.c:68051:12: */
+func lockBtree(tls *libc.TLS, pBt uintptr) int32 { /* sqlite3.c:68547:12: */
bp := tls.Alloc(16)
defer tls.Free(16)
@@ -43983,7 +45856,7 @@ __10:
//
// The original design allowed these amounts to vary, but as of
// version 3.6.0, we require them to be fixed.
- if !(libc.Xmemcmp(tls, (page1+21), ts+3036 /* "@ " */, uint64(3)) != 0) {
+ if !(libc.Xmemcmp(tls, (page1+21), ts+3167 /* "@ " */, uint64(3)) != 0) {
goto __14
}
goto page1_init_failed
@@ -44033,7 +45906,7 @@ __16:
if !((Xsqlite3WritableSchema(tls, (*BtShared)(unsafe.Pointer(pBt)).Fdb) == 0) && (nPage > *(*U32)(unsafe.Pointer(bp + 8 /* nPageFile */)))) {
goto __17
}
- rc = Xsqlite3CorruptError(tls, 68176)
+ rc = Xsqlite3CorruptError(tls, 68672)
goto page1_init_failed
__17:
;
@@ -44105,7 +45978,7 @@ page1_init_failed:
// has the effect of releasing the read lock.
//
// If there is a transaction in progress, this routine is a no-op.
-func unlockBtreeIfUnused(tls *libc.TLS, pBt uintptr) { /* sqlite3.c:68258:13: */
+func unlockBtreeIfUnused(tls *libc.TLS, pBt uintptr) { /* sqlite3.c:68754:13: */
if (int32((*BtShared)(unsafe.Pointer(pBt)).FinTransaction) == TRANS_NONE) && ((*BtShared)(unsafe.Pointer(pBt)).FpPage1 != uintptr(0)) {
var pPage1 uintptr = (*BtShared)(unsafe.Pointer(pBt)).FpPage1
@@ -44118,7 +45991,7 @@ func unlockBtreeIfUnused(tls *libc.TLS, pBt uintptr) { /* sqlite3.c:68258:13: */
// If pBt points to an empty file then convert that empty file
// into a new empty database by initializing the first page of
// the database.
-func newDatabase(tls *libc.TLS, pBt uintptr) int32 { /* sqlite3.c:68275:12: */
+func newDatabase(tls *libc.TLS, pBt uintptr) int32 { /* sqlite3.c:68771:12: */
var pP1 uintptr
var data uintptr
var rc int32
@@ -44158,7 +46031,7 @@ func newDatabase(tls *libc.TLS, pBt uintptr) int32 { /* sqlite3.c:68275:12: */
// Initialize the first page of the database file (creating a database
// consisting of a single page and no schema objects). Return SQLITE_OK
// if successful, or an SQLite error code otherwise.
-func Xsqlite3BtreeNewDb(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:68319:20: */
+func Xsqlite3BtreeNewDb(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:68815:20: */
var rc int32
Xsqlite3BtreeEnter(tls, p)
(*BtShared)(unsafe.Pointer((*Btree)(unsafe.Pointer(p)).FpBt)).FnPage = U32(0)
@@ -44200,7 +46073,7 @@ func Xsqlite3BtreeNewDb(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:68319:20:
// no progress. By returning SQLITE_BUSY and not invoking the busy callback
// when A already has a read lock, we encourage A to give up and let B
// proceed.
-func Xsqlite3BtreeBeginTrans(tls *libc.TLS, p uintptr, wrflag int32, pSchemaVersion uintptr) int32 { /* sqlite3.c:68363:20: */
+func Xsqlite3BtreeBeginTrans(tls *libc.TLS, p uintptr, wrflag int32, pSchemaVersion uintptr) int32 { /* sqlite3.c:68859:20: */
var pBt uintptr
var pPager uintptr
var rc int32
@@ -44464,7 +46337,7 @@ __34:
// Set the pointer-map entries for all children of page pPage. Also, if
// pPage contains cells that point to overflow pages, set the pointer
// map entries for the overflow pages as well.
-func setChildPtrmaps(tls *libc.TLS, pPage uintptr) int32 { /* sqlite3.c:68543:12: */
+func setChildPtrmaps(tls *libc.TLS, pPage uintptr) int32 { /* sqlite3.c:69039:12: */
bp := tls.Alloc(4)
defer tls.Free(4)
@@ -44516,14 +46389,14 @@ func setChildPtrmaps(tls *libc.TLS, pPage uintptr) int32 { /* sqlite3.c:68543:12
//
// PTRMAP_OVERFLOW2: pPage is an overflow-page. The pointer points at the next
// overflow page in the list.
-func modifyPagePointer(tls *libc.TLS, pPage uintptr, iFrom Pgno, iTo Pgno, eType U8) int32 { /* sqlite3.c:68588:12: */
+func modifyPagePointer(tls *libc.TLS, pPage uintptr, iFrom Pgno, iTo Pgno, eType U8) int32 { /* sqlite3.c:69084:12: */
bp := tls.Alloc(24)
defer tls.Free(24)
if int32(eType) == PTRMAP_OVERFLOW2 {
// The pointer is always the first 4 bytes of the page in this case.
if Xsqlite3Get4byte(tls, (*MemPage)(unsafe.Pointer(pPage)).FaData) != iFrom {
- return Xsqlite3CorruptError(tls, 68594)
+ return Xsqlite3CorruptError(tls, 69090)
}
Xsqlite3Put4byte(tls, (*MemPage)(unsafe.Pointer(pPage)).FaData, iTo)
} else {
@@ -44546,10 +46419,12 @@ func modifyPagePointer(tls *libc.TLS, pPage uintptr, iFrom Pgno, iTo Pgno, eType
if int32(eType) == PTRMAP_OVERFLOW1 {
// var info CellInfo at bp, 24
- (*(*func(*libc.TLS, uintptr, uintptr, uintptr))(unsafe.Pointer((pPage + 128 /* &.xParseCell */))))(tls, pPage, pCell, bp /* &info */)
+ (*struct {
+ f func(*libc.TLS, uintptr, uintptr, uintptr)
+ })(unsafe.Pointer(&struct{ uintptr }{(*MemPage)(unsafe.Pointer(pPage)).FxParseCell})).f(tls, pPage, pCell, bp /* &info */)
if U32((*CellInfo)(unsafe.Pointer(bp /* &info */)).FnLocal) < (*CellInfo)(unsafe.Pointer(bp /* &info */)).FnPayload {
if (pCell + uintptr((*CellInfo)(unsafe.Pointer(bp /* &info */)).FnSize)) > ((*MemPage)(unsafe.Pointer(pPage)).FaData + uintptr((*BtShared)(unsafe.Pointer((*MemPage)(unsafe.Pointer(pPage)).FpBt)).FusableSize)) {
- return Xsqlite3CorruptError(tls, 68613)
+ return Xsqlite3CorruptError(tls, 69109)
}
if iFrom == Xsqlite3Get4byte(tls, ((pCell+uintptr((*CellInfo)(unsafe.Pointer(bp /* &info */)).FnSize))-uintptr(4))) {
Xsqlite3Put4byte(tls, ((pCell + uintptr((*CellInfo)(unsafe.Pointer(bp /* &info */)).FnSize)) - uintptr(4)), iTo)
@@ -44566,7 +46441,7 @@ func modifyPagePointer(tls *libc.TLS, pPage uintptr, iFrom Pgno, iTo Pgno, eType
if i == nCell {
if (int32(eType) != PTRMAP_BTREE) || (Xsqlite3Get4byte(tls, ((*MemPage)(unsafe.Pointer(pPage)).FaData+uintptr((int32((*MemPage)(unsafe.Pointer(pPage)).FhdrOffset)+8)))) != iFrom) {
- return Xsqlite3CorruptError(tls, 68631)
+ return Xsqlite3CorruptError(tls, 69127)
}
Xsqlite3Put4byte(tls, ((*MemPage)(unsafe.Pointer(pPage)).FaData + uintptr((int32((*MemPage)(unsafe.Pointer(pPage)).FhdrOffset) + 8))), iTo)
}
@@ -44581,7 +46456,7 @@ func modifyPagePointer(tls *libc.TLS, pPage uintptr, iFrom Pgno, iTo Pgno, eType
// the journal needs to be sync()ed before database page pDbPage->pgno
// can be written to. The caller has already promised not to write to that
// page.
-func relocatePage(tls *libc.TLS, pBt uintptr, pDbPage uintptr, eType U8, iPtrPage Pgno, iFreePage Pgno, isCommit int32) int32 { /* sqlite3.c:68649:12: */
+func relocatePage(tls *libc.TLS, pBt uintptr, pDbPage uintptr, eType U8, iPtrPage Pgno, iFreePage Pgno, isCommit int32) int32 { /* sqlite3.c:69145:12: */
bp := tls.Alloc(16)
defer tls.Free(16)
@@ -44592,7 +46467,7 @@ func relocatePage(tls *libc.TLS, pBt uintptr, pDbPage uintptr, eType U8, iPtrPag
// var rc int32 at bp, 4
if iDbPage < Pgno(3) {
- return Xsqlite3CorruptError(tls, 68666)
+ return Xsqlite3CorruptError(tls, 69162)
}
// Move page iDbPage from its current location to page number iFreePage
@@ -44662,7 +46537,7 @@ func relocatePage(tls *libc.TLS, pBt uintptr, pDbPage uintptr, eType U8, iPtrPag
// caller will keep calling incrVacuumStep() until it returns SQLITE_DONE
// or an error. bCommit is passed true for an auto-vacuum-on-commit
// operation, or false for an incremental vacuum.
-func incrVacuumStep(tls *libc.TLS, pBt uintptr, nFin Pgno, iLastPg Pgno, bCommit int32) int32 { /* sqlite3.c:68743:12: */
+func incrVacuumStep(tls *libc.TLS, pBt uintptr, nFin Pgno, iLastPg Pgno, bCommit int32) int32 { /* sqlite3.c:69239:12: */
bp := tls.Alloc(44)
defer tls.Free(44)
@@ -44684,7 +46559,7 @@ func incrVacuumStep(tls *libc.TLS, pBt uintptr, nFin Pgno, iLastPg Pgno, bCommit
return rc
}
if int32(*(*U8)(unsafe.Pointer(bp /* eType */))) == PTRMAP_ROOTPAGE {
- return Xsqlite3CorruptError(tls, 68764)
+ return Xsqlite3CorruptError(tls, 69260)
}
if int32(*(*U8)(unsafe.Pointer(bp /* eType */))) == PTRMAP_FREEPAGE {
@@ -44759,7 +46634,7 @@ func incrVacuumStep(tls *libc.TLS, pBt uintptr, nFin Pgno, iLastPg Pgno, bCommit
// The database opened by the first argument is an auto-vacuum database
// nOrig pages in size containing nFree free pages. Return the expected
// size of the database in pages following an auto-vacuum operation.
-func finalDbSize(tls *libc.TLS, pBt uintptr, nOrig Pgno, nFree Pgno) Pgno { /* sqlite3.c:68839:13: */
+func finalDbSize(tls *libc.TLS, pBt uintptr, nOrig Pgno, nFree Pgno) Pgno { /* sqlite3.c:69335:13: */
var nEntry int32 // Number of entries on one ptrmap page
var nPtrmap Pgno // Number of PtrMap pages to be freed
var nFin Pgno // Return value
@@ -44783,7 +46658,7 @@ func finalDbSize(tls *libc.TLS, pBt uintptr, nOrig Pgno, nFree Pgno) Pgno { /* s
// If the incremental vacuum is finished after this function has run,
// SQLITE_DONE is returned. If it is not finished, but no error occurred,
// SQLITE_OK is returned. Otherwise an SQLite error code.
-func Xsqlite3BtreeIncrVacuum(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:68865:20: */
+func Xsqlite3BtreeIncrVacuum(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:69361:20: */
var rc int32
var pBt uintptr = (*Btree)(unsafe.Pointer(p)).FpBt
@@ -44797,7 +46672,7 @@ func Xsqlite3BtreeIncrVacuum(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:6886
var nFin Pgno = finalDbSize(tls, pBt, nOrig, nFree)
if (nOrig < nFin) || (nFree >= nOrig) {
- rc = Xsqlite3CorruptError(tls, 68879)
+ rc = Xsqlite3CorruptError(tls, 69375)
} else if nFree > Pgno(0) {
rc = saveAllCursors(tls, pBt, uint32(0), uintptr(0))
if rc == SQLITE_OK {
@@ -44823,7 +46698,7 @@ func Xsqlite3BtreeIncrVacuum(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:6886
// the database file should be truncated to during the commit process.
// i.e. the database has been reorganized so that only the first *pnTrunc
// pages are in use.
-func autoVacuumCommit(tls *libc.TLS, pBt uintptr) int32 { /* sqlite3.c:68907:12: */
+func autoVacuumCommit(tls *libc.TLS, pBt uintptr) int32 { /* sqlite3.c:69403:12: */
var rc int32 = SQLITE_OK
var pPager uintptr = (*BtShared)(unsafe.Pointer(pBt)).FpPager
@@ -44840,13 +46715,13 @@ func autoVacuumCommit(tls *libc.TLS, pBt uintptr) int32 { /* sqlite3.c:68907:12:
// It is not possible to create a database for which the final page
// is either a pointer-map page or the pending-byte page. If one
// is encountered, this indicates corruption.
- return Xsqlite3CorruptError(tls, 68927)
+ return Xsqlite3CorruptError(tls, 69423)
}
nFree = Xsqlite3Get4byte(tls, ((*MemPage)(unsafe.Pointer((*BtShared)(unsafe.Pointer(pBt)).FpPage1)).FaData + 36))
nFin = finalDbSize(tls, pBt, nOrig, nFree)
if nFin > nOrig {
- return Xsqlite3CorruptError(tls, 68932)
+ return Xsqlite3CorruptError(tls, 69428)
}
if nFin < nOrig {
rc = saveAllCursors(tls, pBt, uint32(0), uintptr(0))
@@ -44894,7 +46769,7 @@ func autoVacuumCommit(tls *libc.TLS, pBt uintptr) int32 { /* sqlite3.c:68907:12:
//
// Once this is routine has returned, the only thing required to commit
// the write-transaction for this database file is to delete the journal.
-func Xsqlite3BtreeCommitPhaseOne(tls *libc.TLS, p uintptr, zSuperJrnl uintptr) int32 { /* sqlite3.c:68986:20: */
+func Xsqlite3BtreeCommitPhaseOne(tls *libc.TLS, p uintptr, zSuperJrnl uintptr) int32 { /* sqlite3.c:69482:20: */
var rc int32 = SQLITE_OK
if int32((*Btree)(unsafe.Pointer(p)).FinTrans) == TRANS_WRITE {
var pBt uintptr = (*Btree)(unsafe.Pointer(p)).FpBt
@@ -44917,7 +46792,7 @@ func Xsqlite3BtreeCommitPhaseOne(tls *libc.TLS, p uintptr, zSuperJrnl uintptr) i
// This function is called from both BtreeCommitPhaseTwo() and BtreeRollback()
// at the conclusion of a transaction.
-func btreeEndTransaction(tls *libc.TLS, p uintptr) { /* sqlite3.c:69013:13: */
+func btreeEndTransaction(tls *libc.TLS, p uintptr) { /* sqlite3.c:69509:13: */
var pBt uintptr = (*Btree)(unsafe.Pointer(p)).FpBt
var db uintptr = (*Btree)(unsafe.Pointer(p)).Fdb
@@ -44973,7 +46848,7 @@ func btreeEndTransaction(tls *libc.TLS, p uintptr) { /* sqlite3.c:69013:13: */
//
// This will release the write lock on the database file. If there
// are no active cursors, it also releases the read lock.
-func Xsqlite3BtreeCommitPhaseTwo(tls *libc.TLS, p uintptr, bCleanup int32) int32 { /* sqlite3.c:69075:20: */
+func Xsqlite3BtreeCommitPhaseTwo(tls *libc.TLS, p uintptr, bCleanup int32) int32 { /* sqlite3.c:69571:20: */
if int32((*Btree)(unsafe.Pointer(p)).FinTrans) == TRANS_NONE {
return SQLITE_OK
@@ -45002,7 +46877,7 @@ func Xsqlite3BtreeCommitPhaseTwo(tls *libc.TLS, p uintptr, bCleanup int32) int32
}
// Do both phases of a commit.
-func Xsqlite3BtreeCommit(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:69107:20: */
+func Xsqlite3BtreeCommit(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:69603:20: */
var rc int32
Xsqlite3BtreeEnter(tls, p)
rc = Xsqlite3BtreeCommitPhaseOne(tls, p, uintptr(0))
@@ -45037,7 +46912,7 @@ func Xsqlite3BtreeCommit(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:69107:20
//
// SQLITE_OK is returned if successful, or if an error occurs while
// saving a cursor position, an SQLite error code.
-func Xsqlite3BtreeTripAllCursors(tls *libc.TLS, pBtree uintptr, errCode int32, writeOnly int32) int32 { /* sqlite3.c:69144:20: */
+func Xsqlite3BtreeTripAllCursors(tls *libc.TLS, pBtree uintptr, errCode int32, writeOnly int32) int32 { /* sqlite3.c:69640:20: */
var p uintptr
var rc int32 = SQLITE_OK
@@ -45066,7 +46941,7 @@ func Xsqlite3BtreeTripAllCursors(tls *libc.TLS, pBtree uintptr, errCode int32, w
// Set the pBt->nPage field correctly, according to the current
// state of the database. Assume pBt->pPage1 is valid.
-func btreeSetNPage(tls *libc.TLS, pBt uintptr, pPage1 uintptr) { /* sqlite3.c:69176:13: */
+func btreeSetNPage(tls *libc.TLS, pBt uintptr, pPage1 uintptr) { /* sqlite3.c:69672:13: */
bp := tls.Alloc(4)
defer tls.Free(4)
@@ -45088,7 +46963,7 @@ func btreeSetNPage(tls *libc.TLS, pBt uintptr, pPage1 uintptr) { /* sqlite3.c:69
//
// This will release the write lock on the database file. If there
// are no active cursors, it also releases the read lock.
-func Xsqlite3BtreeRollback(tls *libc.TLS, p uintptr, tripCode int32, writeOnly int32) int32 { /* sqlite3.c:69195:20: */
+func Xsqlite3BtreeRollback(tls *libc.TLS, p uintptr, tripCode int32, writeOnly int32) int32 { /* sqlite3.c:69691:20: */
bp := tls.Alloc(8)
defer tls.Free(8)
@@ -45154,7 +47029,7 @@ func Xsqlite3BtreeRollback(tls *libc.TLS, p uintptr, tripCode int32, writeOnly i
// are no active savepoints and no other statement-transactions open,
// iStatement is 1. This anonymous savepoint can be released or rolled back
// using the sqlite3BtreeSavepoint() function.
-func Xsqlite3BtreeBeginStmt(tls *libc.TLS, p uintptr, iStatement int32) int32 { /* sqlite3.c:69260:20: */
+func Xsqlite3BtreeBeginStmt(tls *libc.TLS, p uintptr, iStatement int32) int32 { /* sqlite3.c:69756:20: */
var rc int32
var pBt uintptr = (*Btree)(unsafe.Pointer(p)).FpBt
Xsqlite3BtreeEnter(tls, p)
@@ -45178,7 +47053,7 @@ func Xsqlite3BtreeBeginStmt(tls *libc.TLS, p uintptr, iStatement int32) int32 {
// contents of the entire transaction are rolled back. This is different
// from a normal transaction rollback, as no locks are released and the
// transaction remains open.
-func Xsqlite3BtreeSavepoint(tls *libc.TLS, p uintptr, op int32, iSavepoint int32) int32 { /* sqlite3.c:69291:20: */
+func Xsqlite3BtreeSavepoint(tls *libc.TLS, p uintptr, op int32, iSavepoint int32) int32 { /* sqlite3.c:69787:20: */
var rc int32 = SQLITE_OK
if (p != 0) && (int32((*Btree)(unsafe.Pointer(p)).FinTrans) == TRANS_WRITE) {
var pBt uintptr = (*Btree)(unsafe.Pointer(p)).FpBt
@@ -45246,7 +47121,7 @@ func Xsqlite3BtreeSavepoint(tls *libc.TLS, p uintptr, op int32, iSavepoint int32
//
// It is assumed that the sqlite3BtreeCursorZero() has been called
// on pCur to initialize the memory space prior to invoking this routine.
-func btreeCursor(tls *libc.TLS, p uintptr, iTable Pgno, wrFlag int32, pKeyInfo uintptr, pCur uintptr) int32 { /* sqlite3.c:69362:12: */
+func btreeCursor(tls *libc.TLS, p uintptr, iTable Pgno, wrFlag int32, pKeyInfo uintptr, pCur uintptr) int32 { /* sqlite3.c:69858:12: */
var pBt uintptr = (*Btree)(unsafe.Pointer(p)).FpBt // Shared b-tree handle
var pX uintptr // Looping over other all cursors
@@ -45265,7 +47140,7 @@ func btreeCursor(tls *libc.TLS, p uintptr, iTable Pgno, wrFlag int32, pKeyInfo u
}
if iTable <= Pgno(1) {
if iTable < Pgno(1) {
- return Xsqlite3CorruptError(tls, 69398)
+ return Xsqlite3CorruptError(tls, 69894)
} else if btreePagecount(tls, pBt) == Pgno(0) {
iTable = Pgno(0)
@@ -45305,7 +47180,7 @@ func btreeCursor(tls *libc.TLS, p uintptr, iTable Pgno, wrFlag int32, pKeyInfo u
return SQLITE_OK
}
-func btreeCursorWithLock(tls *libc.TLS, p uintptr, iTable Pgno, wrFlag int32, pKeyInfo uintptr, pCur uintptr) int32 { /* sqlite3.c:69427:12: */
+func btreeCursorWithLock(tls *libc.TLS, p uintptr, iTable Pgno, wrFlag int32, pKeyInfo uintptr, pCur uintptr) int32 { /* sqlite3.c:69923:12: */
var rc int32
Xsqlite3BtreeEnter(tls, p)
rc = btreeCursor(tls, p, iTable, wrFlag, pKeyInfo, pCur)
@@ -45313,7 +47188,7 @@ func btreeCursorWithLock(tls *libc.TLS, p uintptr, iTable Pgno, wrFlag int32, pK
return rc
}
-func Xsqlite3BtreeCursor(tls *libc.TLS, p uintptr, iTable Pgno, wrFlag int32, pKeyInfo uintptr, pCur uintptr) int32 { /* sqlite3.c:69440:20: */
+func Xsqlite3BtreeCursor(tls *libc.TLS, p uintptr, iTable Pgno, wrFlag int32, pKeyInfo uintptr, pCur uintptr) int32 { /* sqlite3.c:69936:20: */
if (*Btree)(unsafe.Pointer(p)).Fsharable != 0 {
return btreeCursorWithLock(tls, p, iTable, wrFlag, pKeyInfo, pCur)
} else {
@@ -45328,7 +47203,7 @@ func Xsqlite3BtreeCursor(tls *libc.TLS, p uintptr, iTable Pgno, wrFlag int32, pK
// sufficient storage to hold a cursor. The BtCursor object is opaque
// to users so they cannot do the sizeof() themselves - they must call
// this routine.
-func Xsqlite3BtreeCursorSize(tls *libc.TLS) int32 { /* sqlite3.c:69462:20: */
+func Xsqlite3BtreeCursorSize(tls *libc.TLS) int32 { /* sqlite3.c:69958:20: */
return (int32(((uint64(unsafe.Sizeof(BtCursor{}))) + uint64(7)) & libc.Uint64FromInt32(libc.CplInt32(7))))
}
@@ -45338,13 +47213,13 @@ func Xsqlite3BtreeCursorSize(tls *libc.TLS) int32 { /* sqlite3.c:69462:20: */
// to zero. But it turns out that the apPage[] and aiIdx[] arrays
// do not need to be zeroed and they are large, so we can save a lot
// of run-time by skipping the initialization of those elements.
-func Xsqlite3BtreeCursorZero(tls *libc.TLS, p uintptr) { /* sqlite3.c:69474:21: */
+func Xsqlite3BtreeCursorZero(tls *libc.TLS, p uintptr) { /* sqlite3.c:69970:21: */
libc.Xmemset(tls, p, 0, uint64((uintptr(0) + 32 /* &.pBt */)))
}
// Close a cursor. The read lock on the database file is released
// when the last cursor is closed.
-func Xsqlite3BtreeCloseCursor(tls *libc.TLS, pCur uintptr) int32 { /* sqlite3.c:69482:20: */
+func Xsqlite3BtreeCloseCursor(tls *libc.TLS, pCur uintptr) int32 { /* sqlite3.c:69978:20: */
var pBtree uintptr = (*BtCursor)(unsafe.Pointer(pCur)).FpBtree
if pBtree != 0 {
var pBt uintptr = (*BtCursor)(unsafe.Pointer(pCur)).FpBt
@@ -45385,7 +47260,7 @@ func Xsqlite3BtreeCloseCursor(tls *libc.TLS, pCur uintptr) int32 { /* sqlite3.c:
//
// BtCursor.info is a cache of the information in the current cell.
// Using this cache reduces the number of calls to btreeParseCell().
-func getCellInfo(tls *libc.TLS, pCur uintptr) { /* sqlite3.c:69543:29: */
+func getCellInfo(tls *libc.TLS, pCur uintptr) { /* sqlite3.c:70039:29: */
if int32((*BtCursor)(unsafe.Pointer(pCur)).Finfo.FnSize) == 0 {
*(*U8)(unsafe.Pointer(pCur + 1 /* &.curFlags */)) |= U8((BTCF_ValidNKey))
btreeParseCell(tls, (*BtCursor)(unsafe.Pointer(pCur)).FpPage, int32((*BtCursor)(unsafe.Pointer(pCur)).Fix), (pCur + 48 /* &.info */))
@@ -45394,7 +47269,7 @@ func getCellInfo(tls *libc.TLS, pCur uintptr) { /* sqlite3.c:69543:29: */
}
}
-func Xsqlite3BtreeCursorIsValidNN(tls *libc.TLS, pCur uintptr) int32 { /* sqlite3.c:69562:20: */
+func Xsqlite3BtreeCursorIsValidNN(tls *libc.TLS, pCur uintptr) int32 { /* sqlite3.c:70058:20: */
return (libc.Bool32(int32((*BtCursor)(unsafe.Pointer(pCur)).FeState) == CURSOR_VALID))
}
@@ -45403,26 +47278,26 @@ func Xsqlite3BtreeCursorIsValidNN(tls *libc.TLS, pCur uintptr) int32 { /* sqlite
// This routine is only valid for a cursor that is pointing into a
// ordinary table btree. If the cursor points to an index btree or
// is invalid, the result of this routine is undefined.
-func Xsqlite3BtreeIntegerKey(tls *libc.TLS, pCur uintptr) I64 { /* sqlite3.c:69573:20: */
+func Xsqlite3BtreeIntegerKey(tls *libc.TLS, pCur uintptr) I64 { /* sqlite3.c:70069:20: */
getCellInfo(tls, pCur)
return (*BtCursor)(unsafe.Pointer(pCur)).Finfo.FnKey
}
// Pin or unpin a cursor.
-func Xsqlite3BtreeCursorPin(tls *libc.TLS, pCur uintptr) { /* sqlite3.c:69584:21: */
+func Xsqlite3BtreeCursorPin(tls *libc.TLS, pCur uintptr) { /* sqlite3.c:70080:21: */
*(*U8)(unsafe.Pointer(pCur + 1 /* &.curFlags */)) |= U8((BTCF_Pinned))
}
-func Xsqlite3BtreeCursorUnpin(tls *libc.TLS, pCur uintptr) { /* sqlite3.c:69588:21: */
+func Xsqlite3BtreeCursorUnpin(tls *libc.TLS, pCur uintptr) { /* sqlite3.c:70084:21: */
*(*U8)(unsafe.Pointer(pCur + 1 /* &.curFlags */)) &= libc.Uint8FromInt32((libc.CplInt32(BTCF_Pinned)))
}
// Return the offset into the database file for the start of the
// payload to which the cursor is pointing.
-func Xsqlite3BtreeOffset(tls *libc.TLS, pCur uintptr) I64 { /* sqlite3.c:69598:20: */
+func Xsqlite3BtreeOffset(tls *libc.TLS, pCur uintptr) I64 { /* sqlite3.c:70094:20: */
getCellInfo(tls, pCur)
return ((I64((*BtShared)(unsafe.Pointer((*BtCursor)(unsafe.Pointer(pCur)).FpBt)).FpageSize) * (I64((*MemPage)(unsafe.Pointer((*BtCursor)(unsafe.Pointer(pCur)).FpPage)).Fpgno) - int64(1))) + (I64((int64((*BtCursor)(unsafe.Pointer(pCur)).Finfo.FpPayload) - int64((*MemPage)(unsafe.Pointer((*BtCursor)(unsafe.Pointer(pCur)).FpPage)).FaData)) / 1)))
@@ -45435,7 +47310,7 @@ func Xsqlite3BtreeOffset(tls *libc.TLS, pCur uintptr) I64 { /* sqlite3.c:69598:2
// The caller must guarantee that the cursor is pointing to a non-NULL
// valid entry. In other words, the calling procedure must guarantee
// that the cursor has Cursor.eState==CURSOR_VALID.
-func Xsqlite3BtreePayloadSize(tls *libc.TLS, pCur uintptr) U32 { /* sqlite3.c:69616:20: */
+func Xsqlite3BtreePayloadSize(tls *libc.TLS, pCur uintptr) U32 { /* sqlite3.c:70112:20: */
getCellInfo(tls, pCur)
return (*BtCursor)(unsafe.Pointer(pCur)).Finfo.FnPayload
@@ -45452,7 +47327,7 @@ func Xsqlite3BtreePayloadSize(tls *libc.TLS, pCur uintptr) U32 { /* sqlite3.c:69
//
// The current implementation merely returns the size of the underlying
// database file.
-func Xsqlite3BtreeMaxRecordSize(tls *libc.TLS, pCur uintptr) Sqlite3_int64 { /* sqlite3.c:69636:30: */
+func Xsqlite3BtreeMaxRecordSize(tls *libc.TLS, pCur uintptr) Sqlite3_int64 { /* sqlite3.c:70132:30: */
return (Sqlite3_int64((*BtShared)(unsafe.Pointer((*BtCursor)(unsafe.Pointer(pCur)).FpBt)).FpageSize) * Sqlite3_int64((*BtShared)(unsafe.Pointer((*BtCursor)(unsafe.Pointer(pCur)).FpBt)).FnPage))
}
@@ -45474,7 +47349,7 @@ func Xsqlite3BtreeMaxRecordSize(tls *libc.TLS, pCur uintptr) Sqlite3_int64 { /*
// on *ppPage to free the reference. In no reference was obtained (because
// the pointer-map was used to obtain the value for *pPgnoNext), then
// *ppPage is set to zero.
-func getOverflowPage(tls *libc.TLS, pBt uintptr, ovfl Pgno, ppPage uintptr, pPgnoNext uintptr) int32 { /* sqlite3.c:69661:12: */
+func getOverflowPage(tls *libc.TLS, pBt uintptr, ovfl Pgno, ppPage uintptr, pPgnoNext uintptr) int32 { /* sqlite3.c:70157:12: */
bp := tls.Alloc(16)
defer tls.Free(16)
@@ -45542,7 +47417,7 @@ func getOverflowPage(tls *libc.TLS, pBt uintptr, ovfl Pgno, ppPage uintptr, pPgn
// of data are copied from the buffer pBuf to pPayload.
//
// SQLITE_OK is returned on success, otherwise an error code.
-func copyPayload(tls *libc.TLS, pPayload uintptr, pBuf uintptr, nByte int32, eOp int32, pDbPage uintptr) int32 { /* sqlite3.c:69729:12: */
+func copyPayload(tls *libc.TLS, pPayload uintptr, pBuf uintptr, nByte int32, eOp int32, pDbPage uintptr) int32 { /* sqlite3.c:70225:12: */
if eOp != 0 {
// Copy data from buffer to page (a write operation)
var rc int32 = Xsqlite3PagerWrite(tls, pDbPage)
@@ -45584,7 +47459,7 @@ func copyPayload(tls *libc.TLS, pPayload uintptr, pBuf uintptr, nByte int32, eOp
// * An incremental vacuum,
// * A commit in auto_vacuum="full" mode,
// * Creating a table (may require moving an overflow page).
-func accessPayload(tls *libc.TLS, pCur uintptr, offset U32, amt U32, pBuf uintptr, eOp int32) int32 { /* sqlite3.c:69779:12: */
+func accessPayload(tls *libc.TLS, pCur uintptr, offset U32, amt U32, pBuf uintptr, eOp int32) int32 { /* sqlite3.c:70275:12: */
bp := tls.Alloc(16)
defer tls.Free(16)
@@ -45602,7 +47477,7 @@ func accessPayload(tls *libc.TLS, pCur uintptr, offset U32, amt U32, pBuf uintpt
// conditional above is really:
// &aPayload[pCur->info.nLocal] > &pPage->aData[pBt->usableSize]
// but is recast into its current form to avoid integer overflow problems
- return Xsqlite3CorruptError(tls, 69812)
+ return Xsqlite3CorruptError(tls, 70308)
}
// Check if data must be read/written to/from the btree page itself.
@@ -45659,7 +47534,7 @@ func accessPayload(tls *libc.TLS, pCur uintptr, offset U32, amt U32, pBuf uintpt
for *(*Pgno)(unsafe.Pointer(bp /* nextPage */)) != 0 {
// If required, populate the overflow page-list cache.
if *(*Pgno)(unsafe.Pointer(bp /* nextPage */)) > (*BtShared)(unsafe.Pointer(pBt)).FnPage {
- return Xsqlite3CorruptError(tls, 69874)
+ return Xsqlite3CorruptError(tls, 70370)
}
*(*Pgno)(unsafe.Pointer((*BtCursor)(unsafe.Pointer(pCur)).FaOverflow + uintptr(iIdx)*4)) = *(*Pgno)(unsafe.Pointer(bp /* nextPage */))
@@ -45719,7 +47594,7 @@ func accessPayload(tls *libc.TLS, pCur uintptr, offset U32, amt U32, pBuf uintpt
if (rc == SQLITE_OK) && (amt > U32(0)) {
// Overflow chain ends prematurely
- return Xsqlite3CorruptError(tls, 69959)
+ return Xsqlite3CorruptError(tls, 70455)
}
return rc
}
@@ -45739,7 +47614,7 @@ func accessPayload(tls *libc.TLS, pCur uintptr, offset U32, amt U32, pBuf uintpt
// Return SQLITE_OK on success or an error code if anything goes
// wrong. An error is returned if "offset+amt" is larger than
// the available payload.
-func Xsqlite3BtreePayload(tls *libc.TLS, pCur uintptr, offset U32, amt U32, pBuf uintptr) int32 { /* sqlite3.c:69981:20: */
+func Xsqlite3BtreePayload(tls *libc.TLS, pCur uintptr, offset U32, amt U32, pBuf uintptr) int32 { /* sqlite3.c:70477:20: */
return accessPayload(tls, pCur, offset, amt, pBuf, 0)
}
@@ -45747,7 +47622,7 @@ func Xsqlite3BtreePayload(tls *libc.TLS, pCur uintptr, offset U32, amt U32, pBuf
// This variant of sqlite3BtreePayload() works even if the cursor has not
// in the CURSOR_VALID state. It is only used by the sqlite3_blob_read()
// interface.
-func accessPayloadChecked(tls *libc.TLS, pCur uintptr, offset U32, amt U32, pBuf uintptr) int32 { /* sqlite3.c:69995:28: */
+func accessPayloadChecked(tls *libc.TLS, pCur uintptr, offset U32, amt U32, pBuf uintptr) int32 { /* sqlite3.c:70491:28: */
var rc int32
if int32((*BtCursor)(unsafe.Pointer(pCur)).FeState) == CURSOR_INVALID {
return SQLITE_ABORT
@@ -45760,7 +47635,7 @@ func accessPayloadChecked(tls *libc.TLS, pCur uintptr, offset U32, amt U32, pBuf
return accessPayload(tls, pCur, offset, amt, pBuf, 0)
}
-func Xsqlite3BtreePayloadChecked(tls *libc.TLS, pCur uintptr, offset U32, amt U32, pBuf uintptr) int32 { /* sqlite3.c:70009:20: */
+func Xsqlite3BtreePayloadChecked(tls *libc.TLS, pCur uintptr, offset U32, amt U32, pBuf uintptr) int32 { /* sqlite3.c:70505:20: */
if int32((*BtCursor)(unsafe.Pointer(pCur)).FeState) == CURSOR_VALID {
return accessPayload(tls, pCur, offset, amt, pBuf, 0)
@@ -45787,7 +47662,7 @@ func Xsqlite3BtreePayloadChecked(tls *libc.TLS, pCur uintptr, offset U32, amt U3
// The pointer returned by this routine looks directly into the cached
// page of the database. The data might change or move the next time
// any btree routine is called.
-func fetchPayload(tls *libc.TLS, pCur uintptr, pAmt uintptr) uintptr { /* sqlite3.c:70038:19: */
+func fetchPayload(tls *libc.TLS, pCur uintptr, pAmt uintptr) uintptr { /* sqlite3.c:70534:19: */
var amt int32
amt = int32((*BtCursor)(unsafe.Pointer(pCur)).Finfo.FnLocal)
@@ -45818,7 +47693,7 @@ func fetchPayload(tls *libc.TLS, pCur uintptr, pAmt uintptr) uintptr { /* sqlite
//
// These routines is used to get quick access to key and data
// in the common case where no overflow pages are used.
-func Xsqlite3BtreePayloadFetch(tls *libc.TLS, pCur uintptr, pAmt uintptr) uintptr { /* sqlite3.c:70077:27: */
+func Xsqlite3BtreePayloadFetch(tls *libc.TLS, pCur uintptr, pAmt uintptr) uintptr { /* sqlite3.c:70573:27: */
return fetchPayload(tls, pCur, pAmt)
}
@@ -45829,11 +47704,11 @@ func Xsqlite3BtreePayloadFetch(tls *libc.TLS, pCur uintptr, pAmt uintptr) uintpt
// the new child page does not match the flags field of the parent (i.e.
// if an intkey page appears to be the parent of a non-intkey page, or
// vice-versa).
-func moveToChild(tls *libc.TLS, pCur uintptr, newPgno U32) int32 { /* sqlite3.c:70091:12: */
+func moveToChild(tls *libc.TLS, pCur uintptr, newPgno U32) int32 { /* sqlite3.c:70587:12: */
var pBt uintptr = (*BtCursor)(unsafe.Pointer(pCur)).FpBt
if int32((*BtCursor)(unsafe.Pointer(pCur)).FiPage) >= (BTCURSOR_MAX_DEPTH - 1) {
- return Xsqlite3CorruptError(tls, 70099)
+ return Xsqlite3CorruptError(tls, 70595)
}
(*BtCursor)(unsafe.Pointer(pCur)).Finfo.FnSize = U16(0)
*(*U8)(unsafe.Pointer(pCur + 1 /* &.curFlags */)) &= libc.Uint8FromInt32((libc.CplInt32((BTCF_ValidNKey | BTCF_ValidOvfl))))
@@ -45850,7 +47725,7 @@ func moveToChild(tls *libc.TLS, pCur uintptr, newPgno U32) int32 { /* sqlite3.c:
// to the page we are coming from. If we are coming from the
// right-most child page then pCur->idx is set to one more than
// the largest cell index.
-func moveToParent(tls *libc.TLS, pCur uintptr) { /* sqlite3.c:70140:13: */
+func moveToParent(tls *libc.TLS, pCur uintptr) { /* sqlite3.c:70636:13: */
var pLeaf uintptr
(*BtCursor)(unsafe.Pointer(pCur)).Finfo.FnSize = U16(0)
@@ -45880,7 +47755,7 @@ func moveToParent(tls *libc.TLS, pCur uintptr) { /* sqlite3.c:70140:13: */
// indicating a table b-tree, or if the caller did specify a KeyInfo
// structure the flags byte is set to 0x02 or 0x0A, indicating an index
// b-tree).
-func moveToRoot(tls *libc.TLS, pCur uintptr) int32 { /* sqlite3.c:70181:12: */
+func moveToRoot(tls *libc.TLS, pCur uintptr) int32 { /* sqlite3.c:70677:12: */
var pRoot uintptr
var rc int32
var subpage Pgno
@@ -45959,7 +47834,7 @@ __2:
if !((int32((*MemPage)(unsafe.Pointer(pRoot)).FisInit) == 0) || ((libc.Bool32((*BtCursor)(unsafe.Pointer(pCur)).FpKeyInfo == uintptr(0))) != int32((*MemPage)(unsafe.Pointer(pRoot)).FintKey))) {
goto __11
}
- return Xsqlite3CorruptError(tls, 70237)
+ return Xsqlite3CorruptError(tls, 70733)
__11:
;
@@ -45981,7 +47856,7 @@ __12:
if !((*MemPage)(unsafe.Pointer(pRoot)).Fpgno != Pgno(1)) {
goto __16
}
- return Xsqlite3CorruptError(tls, 70250)
+ return Xsqlite3CorruptError(tls, 70746)
__16:
;
subpage = Xsqlite3Get4byte(tls, ((*MemPage)(unsafe.Pointer(pRoot)).FaData + uintptr((int32((*MemPage)(unsafe.Pointer(pRoot)).FhdrOffset) + 8))))
@@ -46003,7 +47878,7 @@ __13:
//
// The left-most leaf is the one with the smallest key - the first
// in ascending order.
-func moveToLeftmost(tls *libc.TLS, pCur uintptr) int32 { /* sqlite3.c:70268:12: */
+func moveToLeftmost(tls *libc.TLS, pCur uintptr) int32 { /* sqlite3.c:70764:12: */
var pgno Pgno
var rc int32 = SQLITE_OK
var pPage uintptr
@@ -46024,7 +47899,7 @@ func moveToLeftmost(tls *libc.TLS, pCur uintptr) int32 { /* sqlite3.c:70268:12:
//
// The right-most entry is the one with the largest key - the last
// key in ascending order.
-func moveToRightmost(tls *libc.TLS, pCur uintptr) int32 { /* sqlite3.c:70293:12: */
+func moveToRightmost(tls *libc.TLS, pCur uintptr) int32 { /* sqlite3.c:70789:12: */
var pgno Pgno
var rc int32 = SQLITE_OK
var pPage uintptr = uintptr(0)
@@ -46045,7 +47920,7 @@ func moveToRightmost(tls *libc.TLS, pCur uintptr) int32 { /* sqlite3.c:70293:12:
// Move the cursor to the first entry in the table. Return SQLITE_OK
// on success. Set *pRes to 0 if the cursor actually points to something
// or set *pRes to 1 if the table is empty.
-func Xsqlite3BtreeFirst(tls *libc.TLS, pCur uintptr, pRes uintptr) int32 { /* sqlite3.c:70316:20: */
+func Xsqlite3BtreeFirst(tls *libc.TLS, pCur uintptr, pRes uintptr) int32 { /* sqlite3.c:70812:20: */
var rc int32
rc = moveToRoot(tls, pCur)
@@ -46064,7 +47939,7 @@ func Xsqlite3BtreeFirst(tls *libc.TLS, pCur uintptr, pRes uintptr) int32 { /* sq
// Move the cursor to the last entry in the table. Return SQLITE_OK
// on success. Set *pRes to 0 if the cursor actually points to something
// or set *pRes to 1 if the table is empty.
-func Xsqlite3BtreeLast(tls *libc.TLS, pCur uintptr, pRes uintptr) int32 { /* sqlite3.c:70338:20: */
+func Xsqlite3BtreeLast(tls *libc.TLS, pCur uintptr, pRes uintptr) int32 { /* sqlite3.c:70834:20: */
var rc int32
// If the cursor already points to the last entry, this is a no-op.
@@ -46120,7 +47995,7 @@ func Xsqlite3BtreeLast(tls *libc.TLS, pCur uintptr, pRes uintptr) int32 { /* sql
//
// For index tables, the pIdxKey->eqSeen field is set to 1 if there
// exists an entry in the table that exactly matches pIdxKey.
-func Xsqlite3BtreeMovetoUnpacked(tls *libc.TLS, pCur uintptr, pIdxKey uintptr, intKey I64, biasRight int32, pRes uintptr) int32 { /* sqlite3.c:70408:20: */
+func Xsqlite3BtreeMovetoUnpacked(tls *libc.TLS, pCur uintptr, pIdxKey uintptr, intKey I64, biasRight int32, pRes uintptr) int32 { /* sqlite3.c:70906:20: */
bp := tls.Alloc(8)
defer tls.Free(8)
@@ -46269,7 +48144,7 @@ __24:
if !(pCell >= (*MemPage)(unsafe.Pointer(pPage)).FaDataEnd) {
goto __26
}
- return Xsqlite3CorruptError(tls, 70515)
+ return Xsqlite3CorruptError(tls, 71013)
__26:
;
goto __24
@@ -46352,7 +48227,9 @@ __35: // Size of the pCell cell in bytes
// single byte varint and the record fits entirely on the main
// b-tree page.
- c = (*(*func(*libc.TLS, int32, uintptr, uintptr) int32)(unsafe.Pointer(&xRecordCompare)))(tls, nCell, (pCell + 1), pIdxKey)
+ c = (*struct {
+ f func(*libc.TLS, int32, uintptr, uintptr) int32
+ })(unsafe.Pointer(&struct{ uintptr }{xRecordCompare})).f(tls, nCell, (pCell + 1), pIdxKey)
goto __39
__38:
if !(!((int32(*(*U8)(unsafe.Pointer(pCell + 1))) & 0x80) != 0) &&
@@ -46362,12 +48239,16 @@ __38:
// The record-size field is a 2 byte varint and the record
// fits entirely on the main b-tree page.
- c = (*(*func(*libc.TLS, int32, uintptr, uintptr) int32)(unsafe.Pointer(&xRecordCompare)))(tls, nCell, (pCell + 2), pIdxKey)
+ c = (*struct {
+ f func(*libc.TLS, int32, uintptr, uintptr) int32
+ })(unsafe.Pointer(&struct{ uintptr }{xRecordCompare})).f(tls, nCell, (pCell + 2), pIdxKey)
goto __41
__40:
pCellBody = (pCell - uintptr((*MemPage)(unsafe.Pointer(pPage)).FchildPtrSize))
nOverrun = 18 // Size of the overrun padding
- (*(*func(*libc.TLS, uintptr, uintptr, uintptr))(unsafe.Pointer((pPage + 128 /* &.xParseCell */))))(tls, pPage, pCellBody, (pCur + 48 /* &.info */))
+ (*struct {
+ f func(*libc.TLS, uintptr, uintptr, uintptr)
+ })(unsafe.Pointer(&struct{ uintptr }{(*MemPage)(unsafe.Pointer(pPage)).FxParseCell})).f(tls, pPage, pCellBody, (pCur + 48 /* &.info */))
nCell = int32((*BtCursor)(unsafe.Pointer(pCur)).Finfo.FnKey)
// True if key size is 2^32 or more
// Invalid key size: 0x80 0x80 0x00
@@ -46376,7 +48257,7 @@ __40:
if !((nCell < 2) || ((U32(nCell) / (*BtShared)(unsafe.Pointer((*BtCursor)(unsafe.Pointer(pCur)).FpBt)).FusableSize) > (*BtShared)(unsafe.Pointer((*BtCursor)(unsafe.Pointer(pCur)).FpBt)).FnPage)) {
goto __42
}
- rc = Xsqlite3CorruptError(tls, 70590)
+ rc = Xsqlite3CorruptError(tls, 71088)
goto moveto_finish
__42:
;
@@ -46425,7 +48306,7 @@ __47:
if !((*UnpackedRecord)(unsafe.Pointer(pIdxKey)).FerrCode != 0) {
goto __49
}
- rc = Xsqlite3CorruptError(tls, 70622)
+ rc = Xsqlite3CorruptError(tls, 71120)
__49:
;
goto moveto_finish
@@ -46495,7 +48376,7 @@ moveto_finish:
// TRUE will be returned after a call to sqlite3BtreeNext() moves
// past the last entry in the table or sqlite3BtreePrev() moves past
// the first entry. TRUE is also returned if the table is empty.
-func Xsqlite3BtreeEof(tls *libc.TLS, pCur uintptr) int32 { /* sqlite3.c:70663:20: */
+func Xsqlite3BtreeEof(tls *libc.TLS, pCur uintptr) int32 { /* sqlite3.c:71161:20: */
// TODO: What if the cursor is in CURSOR_REQUIRESEEK but all table entries
// have been deleted? This API will need to change to return an error code
// as well as the boolean result value.
@@ -46505,7 +48386,7 @@ func Xsqlite3BtreeEof(tls *libc.TLS, pCur uintptr) int32 { /* sqlite3.c:70663:20
// Return an estimate for the number of rows in the table that pCur is
// pointing to. Return a negative number if no estimate is currently
// available.
-func Xsqlite3BtreeRowCountEst(tls *libc.TLS, pCur uintptr) I64 { /* sqlite3.c:70676:20: */
+func Xsqlite3BtreeRowCountEst(tls *libc.TLS, pCur uintptr) I64 { /* sqlite3.c:71174:20: */
var n I64
var i U8
@@ -46544,7 +48425,7 @@ func Xsqlite3BtreeRowCountEst(tls *libc.TLS, pCur uintptr) I64 { /* sqlite3.c:70
// skipped if the SQL index had been a unique index. The F argument
// is a hint to the implement. SQLite btree implementation does not use
// this hint, but COMDB2 does.
-func btreeNext(tls *libc.TLS, pCur uintptr) int32 { /* sqlite3.c:70716:28: */
+func btreeNext(tls *libc.TLS, pCur uintptr) int32 { /* sqlite3.c:71214:28: */
var rc int32
var idx int32
var pPage uintptr
@@ -46581,7 +48462,7 @@ func btreeNext(tls *libc.TLS, pCur uintptr) int32 { /* sqlite3.c:70716:28: */
// has pages in common with the table being queried. See TH3
// module cov1/btree78.test testcase 220 (2018-06-08) for an
// example.
- return Xsqlite3CorruptError(tls, 70747)
+ return Xsqlite3CorruptError(tls, 71245)
}
// If the database file is corrupt, it is possible for the value of idx
@@ -46623,7 +48504,7 @@ func btreeNext(tls *libc.TLS, pCur uintptr) int32 { /* sqlite3.c:70716:28: */
return int32(0)
}
-func Xsqlite3BtreeNext(tls *libc.TLS, pCur uintptr, flags int32) int32 { /* sqlite3.c:70786:20: */
+func Xsqlite3BtreeNext(tls *libc.TLS, pCur uintptr, flags int32) int32 { /* sqlite3.c:71284:20: */
var pPage uintptr
_ = flags // Used in COMDB2 but not native SQLite
@@ -46663,7 +48544,7 @@ func Xsqlite3BtreeNext(tls *libc.TLS, pCur uintptr, flags int32) int32 { /* sqli
// skipped if the SQL index had been a unique index. The F argument is a
// hint to the implement. The native SQLite btree implementation does not
// use this hint, but COMDB2 does.
-func btreePrevious(tls *libc.TLS, pCur uintptr) int32 { /* sqlite3.c:70826:28: */
+func btreePrevious(tls *libc.TLS, pCur uintptr) int32 { /* sqlite3.c:71324:28: */
var rc int32
var pPage uintptr
@@ -46717,7 +48598,7 @@ func btreePrevious(tls *libc.TLS, pCur uintptr) int32 { /* sqlite3.c:70826:28: *
return rc
}
-func Xsqlite3BtreePrevious(tls *libc.TLS, pCur uintptr, flags int32) int32 { /* sqlite3.c:70875:20: */
+func Xsqlite3BtreePrevious(tls *libc.TLS, pCur uintptr, flags int32) int32 { /* sqlite3.c:71373:20: */
_ = flags // Used in COMDB2 but not native SQLite
*(*U8)(unsafe.Pointer(pCur + 1 /* &.curFlags */)) &= libc.Uint8FromInt32((libc.CplInt32(((BTCF_AtLast | BTCF_ValidOvfl) | BTCF_ValidNKey))))
@@ -46751,7 +48632,7 @@ func Xsqlite3BtreePrevious(tls *libc.TLS, pCur uintptr, flags int32) int32 { /*
// eMode is BTALLOC_LT then the page returned will be less than or equal
// to nearby if any such page exists. If eMode is BTALLOC_ANY then there
// are no restrictions on which page is returned.
-func allocateBtreePage(tls *libc.TLS, pBt uintptr, ppPage uintptr, pPgno uintptr, nearby Pgno, eMode U8) int32 { /* sqlite3.c:70913:12: */
+func allocateBtreePage(tls *libc.TLS, pBt uintptr, ppPage uintptr, pPgno uintptr, nearby Pgno, eMode U8) int32 { /* sqlite3.c:71411:12: */
bp := tls.Alloc(32)
defer tls.Free(32)
@@ -46818,7 +48699,7 @@ func allocateBtreePage(tls *libc.TLS, pBt uintptr, ppPage uintptr, pPgno uintptr
if !(n >= mxPage) {
goto __1
}
- return Xsqlite3CorruptError(tls, 70937)
+ return Xsqlite3CorruptError(tls, 71435)
__1:
;
if !(n > U32(0)) {
@@ -46899,7 +48780,7 @@ __15:
if !((iTrunk > mxPage) || (libc.PostIncUint32(&nSearch, 1) > n)) {
goto __16
}
- rc = Xsqlite3CorruptError(tls, 70993)
+ rc = Xsqlite3CorruptError(tls, 71491)
goto __17
__16:
rc = btreeGetUnusedPage(tls, pBt, iTrunk, bp+8 /* &pTrunk */, 0)
@@ -46941,7 +48822,7 @@ __19:
goto __22
}
// Value of k is out of range. Database corruption
- rc = Xsqlite3CorruptError(tls, 71022)
+ rc = Xsqlite3CorruptError(tls, 71520)
goto end_allocate_page
goto __23
__22:
@@ -46986,7 +48867,7 @@ __27:
if !(iNewTrunk > mxPage) {
goto __32
}
- rc = Xsqlite3CorruptError(tls, 71056)
+ rc = Xsqlite3CorruptError(tls, 71554)
goto end_allocate_page
__32:
;
@@ -47097,10 +48978,10 @@ __40:
iPage = Xsqlite3Get4byte(tls, (aData + uintptr((U32(8) + (closest * U32(4))))))
- if !(iPage > mxPage) {
+ if !((iPage > mxPage) || (iPage < Pgno(2))) {
goto __51
}
- rc = Xsqlite3CorruptError(tls, 71121)
+ rc = Xsqlite3CorruptError(tls, 71619)
goto end_allocate_page
__51:
;
@@ -47275,7 +49156,7 @@ end_allocate_page:
//
// If a pointer to a MemPage object is passed as the second argument,
// its reference count is not altered by this function.
-func freePage2(tls *libc.TLS, pBt uintptr, pMemPage uintptr, iPage Pgno) int32 { /* sqlite3.c:71235:12: */
+func freePage2(tls *libc.TLS, pBt uintptr, pMemPage uintptr, iPage Pgno) int32 { /* sqlite3.c:71733:12: */
bp := tls.Alloc(24)
defer tls.Free(24)
@@ -47296,7 +49177,7 @@ func freePage2(tls *libc.TLS, pBt uintptr, pMemPage uintptr, iPage Pgno) int32 {
if !((iPage < Pgno(2)) || (iPage > (*BtShared)(unsafe.Pointer(pBt)).FnPage)) {
goto __1
}
- return Xsqlite3CorruptError(tls, 71248)
+ return Xsqlite3CorruptError(tls, 71746)
__1:
;
if !(pMemPage != 0) {
@@ -47366,7 +49247,7 @@ __7:
if !(iTrunk > btreePagecount(tls, pBt)) {
goto __10
}
- *(*int32)(unsafe.Pointer(bp + 8 /* rc */)) = Xsqlite3CorruptError(tls, 71295)
+ *(*int32)(unsafe.Pointer(bp + 8 /* rc */)) = Xsqlite3CorruptError(tls, 71793)
goto freepage_out
__10:
;
@@ -47383,7 +49264,7 @@ __11:
if !(nLeaf > (((*BtShared)(unsafe.Pointer(pBt)).FusableSize / U32(4)) - U32(2))) {
goto __12
}
- *(*int32)(unsafe.Pointer(bp + 8 /* rc */)) = Xsqlite3CorruptError(tls, 71306)
+ *(*int32)(unsafe.Pointer(bp + 8 /* rc */)) = Xsqlite3CorruptError(tls, 71804)
goto freepage_out
__12:
;
@@ -47464,15 +49345,14 @@ __18:
return *(*int32)(unsafe.Pointer(bp + 8 /* rc */))
}
-func freePage(tls *libc.TLS, pPage uintptr, pRC uintptr) { /* sqlite3.c:71369:13: */
+func freePage(tls *libc.TLS, pPage uintptr, pRC uintptr) { /* sqlite3.c:71867:13: */
if (*(*int32)(unsafe.Pointer(pRC))) == SQLITE_OK {
*(*int32)(unsafe.Pointer(pRC)) = freePage2(tls, (*MemPage)(unsafe.Pointer(pPage)).FpBt, pPage, (*MemPage)(unsafe.Pointer(pPage)).Fpgno)
}
}
-// Free any overflow pages associated with the given Cell. Store
-// size information about the cell in pInfo.
-func clearCell(tls *libc.TLS, pPage uintptr, pCell uintptr, pInfo uintptr) int32 { /* sqlite3.c:71379:12: */
+// Free the overflow pages associated with the given Cell.
+func clearCellOverflow(tls *libc.TLS, pPage uintptr, pCell uintptr, pInfo uintptr) int32 { /* sqlite3.c:71876:28: */
bp := tls.Alloc(12)
defer tls.Free(12)
@@ -47482,14 +49362,9 @@ func clearCell(tls *libc.TLS, pPage uintptr, pCell uintptr, pInfo uintptr) int32
var nOvfl int32
var ovflPageSize U32
- (*(*func(*libc.TLS, uintptr, uintptr, uintptr))(unsafe.Pointer((pPage + 128 /* &.xParseCell */))))(tls, pPage, pCell, pInfo)
- if U32((*CellInfo)(unsafe.Pointer(pInfo)).FnLocal) == (*CellInfo)(unsafe.Pointer(pInfo)).FnPayload {
- return SQLITE_OK // No overflow pages. Return without doing anything
- }
-
if (pCell + uintptr((*CellInfo)(unsafe.Pointer(pInfo)).FnSize)) > (*MemPage)(unsafe.Pointer(pPage)).FaDataEnd {
// Cell extends past end of page
- return Xsqlite3CorruptError(tls, 71399)
+ return Xsqlite3CorruptError(tls, 71893)
}
ovflPgno = Xsqlite3Get4byte(tls, ((pCell + uintptr((*CellInfo)(unsafe.Pointer(pInfo)).FnSize)) - uintptr(4)))
pBt = (*MemPage)(unsafe.Pointer(pPage)).FpBt
@@ -47504,7 +49379,7 @@ func clearCell(tls *libc.TLS, pPage uintptr, pCell uintptr, pInfo uintptr) int32
// 0 is not a legal page number and page 1 cannot be an
// overflow page. Therefore if ovflPgno<2 or past the end of the
// file the database must be corrupt.
- return Xsqlite3CorruptError(tls, 71416)
+ return Xsqlite3CorruptError(tls, 71910)
}
if nOvfl != 0 {
rc = getOverflowPage(tls, pBt, ovflPgno, bp /* &pOvfl */, bp+8 /* &iNext */)
@@ -47524,7 +49399,7 @@ func clearCell(tls *libc.TLS, pPage uintptr, pCell uintptr, pInfo uintptr) int32
// enabled. If this 'overflow' page happens to be a page that the
// caller is iterating through or using in some other way, this
// can be problematic.
- rc = Xsqlite3CorruptError(tls, 71436)
+ rc = Xsqlite3CorruptError(tls, 71930)
} else {
rc = freePage2(tls, pBt, *(*uintptr)(unsafe.Pointer(bp /* pOvfl */)), ovflPgno)
}
@@ -47540,6 +49415,12 @@ func clearCell(tls *libc.TLS, pPage uintptr, pCell uintptr, pInfo uintptr) int32
return SQLITE_OK
}
+// Call xParseCell to compute the size of a cell. If the cell contains
+// overflow, then invoke cellClearOverflow to clear out that overflow.
+// STore the result code (SQLITE_OK or some error code) in rc.
+//
+// Implemented as macro to force inlining for performance.
+
// Create the byte sequence used to represent a cell on page pPage
// and write that byte sequence into pCell[]. Overflow pages are
// allocated and filled in as necessary. The calling procedure
@@ -47550,7 +49431,7 @@ func clearCell(tls *libc.TLS, pPage uintptr, pCell uintptr, pInfo uintptr) int32
// area. pCell might point to some temporary storage. The cell will
// be constructed in this temporary area then copied into pPage->aData
// later.
-func fillInCell(tls *libc.TLS, pPage uintptr, pCell uintptr, pX uintptr, pnSize uintptr) int32 { /* sqlite3.c:71462:12: */
+func fillInCell(tls *libc.TLS, pPage uintptr, pCell uintptr, pX uintptr, pnSize uintptr) int32 { /* sqlite3.c:71971:12: */
bp := tls.Alloc(16)
defer tls.Free(16)
@@ -47732,7 +49613,7 @@ func fillInCell(tls *libc.TLS, pPage uintptr, pCell uintptr, pX uintptr, pnSize
// removes the reference to the cell from pPage.
//
// "sz" must be the number of bytes in the cell.
-func dropCell(tls *libc.TLS, pPage uintptr, idx int32, sz int32, pRC uintptr) { /* sqlite3.c:71652:13: */
+func dropCell(tls *libc.TLS, pPage uintptr, idx int32, sz int32, pRC uintptr) { /* sqlite3.c:72161:13: */
var pc U32 // Offset to cell content of cell being deleted
var data uintptr // pPage->aData
var ptr uintptr // Used to move bytes around within data[]
@@ -47749,7 +49630,7 @@ func dropCell(tls *libc.TLS, pPage uintptr, idx int32, sz int32, pRC uintptr) {
hdr = int32((*MemPage)(unsafe.Pointer(pPage)).FhdrOffset)
if (pc + U32(sz)) > (*BtShared)(unsafe.Pointer((*MemPage)(unsafe.Pointer(pPage)).FpBt)).FusableSize {
- *(*int32)(unsafe.Pointer(pRC)) = Xsqlite3CorruptError(tls, 71672)
+ *(*int32)(unsafe.Pointer(pRC)) = Xsqlite3CorruptError(tls, 72181)
return
}
rc = freeSpace(tls, pPage, uint16(pc), uint16(sz))
@@ -47785,7 +49666,7 @@ func dropCell(tls *libc.TLS, pPage uintptr, idx int32, sz int32, pRC uintptr) {
// pPage->nOverflow is incremented.
//
// *pRC must be SQLITE_OK when this routine is called.
-func insertCell(tls *libc.TLS, pPage uintptr, i int32, pCell uintptr, sz int32, pTemp uintptr, iChild Pgno, pRC uintptr) { /* sqlite3.c:71708:13: */
+func insertCell(tls *libc.TLS, pPage uintptr, i int32, pCell uintptr, sz int32, pTemp uintptr, iChild Pgno, pRC uintptr) { /* sqlite3.c:72217:13: */
bp := tls.Alloc(4)
defer tls.Free(4)
@@ -47939,14 +49820,14 @@ func insertCell(tls *libc.TLS, pPage uintptr, i int32, pCell uintptr, sz int32,
// entries, shift down. The end result is that each ixNx[] entry should
// be larger than the previous
type CellArray1 = struct {
- FnCell int32
- _ [4]byte
- FpRef uintptr
- FapCell uintptr
- FszCell uintptr
- FapEnd [6]uintptr
- FixNx [6]int32
-} /* sqlite3.c:71883:9 */
+ FnCell int32
+ F__ccgo_pad1 [4]byte
+ FpRef uintptr
+ FapCell uintptr
+ FszCell uintptr
+ FapEnd [6]uintptr
+ FixNx [6]int32
+} /* sqlite3.c:72392:9 */
// The following parameters determine how many adjacent pages get involved
// in a balancing operation. NN is the number of neighbors on either side
@@ -48023,16 +49904,18 @@ type CellArray1 = struct {
// cases, ixNx[] entries with higher indexes, and the corresponding apEnd[]
// entries, shift down. The end result is that each ixNx[] entry should
// be larger than the previous
-type CellArray = CellArray1 /* sqlite3.c:71883:26 */
+type CellArray = CellArray1 /* sqlite3.c:72392:26 */
// Make sure the cell sizes at idx, idx+1, ..., idx+N-1 have been
// computed.
-func populateCellCache(tls *libc.TLS, p uintptr, idx int32, N int32) { /* sqlite3.c:71897:13: */
+func populateCellCache(tls *libc.TLS, p uintptr, idx int32, N int32) { /* sqlite3.c:72406:13: */
for N > 0 {
if int32(*(*U16)(unsafe.Pointer((*CellArray)(unsafe.Pointer(p)).FszCell + uintptr(idx)*2))) == 0 {
- *(*U16)(unsafe.Pointer((*CellArray)(unsafe.Pointer(p)).FszCell + uintptr(idx)*2)) = (*(*func(*libc.TLS, uintptr, uintptr) U16)(unsafe.Pointer(((*CellArray)(unsafe.Pointer(p)).FpRef + 120 /* &.xCellSize */))))(tls, (*CellArray)(unsafe.Pointer(p)).FpRef, *(*uintptr)(unsafe.Pointer((*CellArray)(unsafe.Pointer(p)).FapCell + uintptr(idx)*8)))
+ *(*U16)(unsafe.Pointer((*CellArray)(unsafe.Pointer(p)).FszCell + uintptr(idx)*2)) = (*struct {
+ f func(*libc.TLS, uintptr, uintptr) U16
+ })(unsafe.Pointer(&struct{ uintptr }{(*MemPage)(unsafe.Pointer((*CellArray)(unsafe.Pointer(p)).FpRef)).FxCellSize})).f(tls, (*CellArray)(unsafe.Pointer(p)).FpRef, *(*uintptr)(unsafe.Pointer((*CellArray)(unsafe.Pointer(p)).FapCell + uintptr(idx)*8)))
} else {
}
@@ -48042,13 +49925,15 @@ func populateCellCache(tls *libc.TLS, p uintptr, idx int32, N int32) { /* sqlite
}
// Return the size of the Nth element of the cell array
-func computeCellSize(tls *libc.TLS, p uintptr, N int32) U16 { /* sqlite3.c:71915:28: */
+func computeCellSize(tls *libc.TLS, p uintptr, N int32) U16 { /* sqlite3.c:72424:28: */
- *(*U16)(unsafe.Pointer((*CellArray)(unsafe.Pointer(p)).FszCell + uintptr(N)*2)) = (*(*func(*libc.TLS, uintptr, uintptr) U16)(unsafe.Pointer(((*CellArray)(unsafe.Pointer(p)).FpRef + 120 /* &.xCellSize */))))(tls, (*CellArray)(unsafe.Pointer(p)).FpRef, *(*uintptr)(unsafe.Pointer((*CellArray)(unsafe.Pointer(p)).FapCell + uintptr(N)*8)))
+ *(*U16)(unsafe.Pointer((*CellArray)(unsafe.Pointer(p)).FszCell + uintptr(N)*2)) = (*struct {
+ f func(*libc.TLS, uintptr, uintptr) U16
+ })(unsafe.Pointer(&struct{ uintptr }{(*MemPage)(unsafe.Pointer((*CellArray)(unsafe.Pointer(p)).FpRef)).FxCellSize})).f(tls, (*CellArray)(unsafe.Pointer(p)).FpRef, *(*uintptr)(unsafe.Pointer((*CellArray)(unsafe.Pointer(p)).FapCell + uintptr(N)*8)))
return *(*U16)(unsafe.Pointer((*CellArray)(unsafe.Pointer(p)).FszCell + uintptr(N)*2))
}
-func cachedCellSize(tls *libc.TLS, p uintptr, N int32) U16 { /* sqlite3.c:71921:12: */
+func cachedCellSize(tls *libc.TLS, p uintptr, N int32) U16 { /* sqlite3.c:72430:12: */
if *(*U16)(unsafe.Pointer((*CellArray)(unsafe.Pointer(p)).FszCell + uintptr(N)*2)) != 0 {
return *(*U16)(unsafe.Pointer((*CellArray)(unsafe.Pointer(p)).FszCell + uintptr(N)*2))
@@ -48067,7 +49952,7 @@ func cachedCellSize(tls *libc.TLS, p uintptr, N int32) U16 { /* sqlite3.c:71921:
//
// The MemPage.nFree field is invalidated by this function. It is the
// responsibility of the caller to set it correctly.
-func rebuildPage(tls *libc.TLS, pCArray uintptr, iFirst int32, nCell int32, pPg uintptr) int32 { /* sqlite3.c:71940:12: */
+func rebuildPage(tls *libc.TLS, pCArray uintptr, iFirst int32, nCell int32, pPg uintptr) int32 { /* sqlite3.c:72449:12: */
var hdr int32 = int32((*MemPage)(unsafe.Pointer(pPg)).FhdrOffset) // Offset of header on pPg
var aData uintptr = (*MemPage)(unsafe.Pointer(pPg)).FaData // Pointer to data for pPg
var usableSize int32 = int32((*BtShared)(unsafe.Pointer((*MemPage)(unsafe.Pointer(pPg)).FpBt)).FusableSize)
@@ -48096,14 +49981,14 @@ func rebuildPage(tls *libc.TLS, pCArray uintptr, iFirst int32, nCell int32, pPg
var pCell uintptr = *(*uintptr)(unsafe.Pointer((*CellArray)(unsafe.Pointer(pCArray)).FapCell + uintptr(i)*8))
var sz U16 = *(*U16)(unsafe.Pointer((*CellArray)(unsafe.Pointer(pCArray)).FszCell + uintptr(i)*2))
- if (Uptr((pCell)) >= Uptr((aData))) && (Uptr((pCell)) < Uptr((pEnd))) {
+ if (Uptr((pCell)) >= Uptr((aData + uintptr(j)))) && (Uptr((pCell)) < Uptr((pEnd))) {
if (Uptr((pCell + uintptr(sz)))) > Uptr(pEnd) {
- return Xsqlite3CorruptError(tls, 71973)
+ return Xsqlite3CorruptError(tls, 72482)
}
pCell = (pTmp + uintptr(((int64(pCell) - int64(aData)) / 1)))
} else if (Uptr((pCell + uintptr(sz))) > Uptr(pSrcEnd)) &&
(Uptr((pCell)) < Uptr(pSrcEnd)) {
- return Xsqlite3CorruptError(tls, 71978)
+ return Xsqlite3CorruptError(tls, 72487)
}
pData -= uintptr(sz)
@@ -48111,9 +49996,9 @@ func rebuildPage(tls *libc.TLS, pCArray uintptr, iFirst int32, nCell int32, pPg
*(*U8)(unsafe.Pointer((pCellptr) + 1)) = (U8((int64(pData) - int64(aData)) / 1))
pCellptr += uintptr(2)
if pData < pCellptr {
- return Xsqlite3CorruptError(tls, 71984)
+ return Xsqlite3CorruptError(tls, 72493)
}
- libc.Xmemcpy(tls, pData, pCell, uint64(sz))
+ libc.Xmemmove(tls, pData, pCell, uint64(sz))
i++
if i >= iEnd {
@@ -48161,7 +50046,7 @@ func rebuildPage(tls *libc.TLS, pCArray uintptr, iFirst int32, nCell int32, pPg
// all cells - not just those inserted by the current call). If the content
// area must be extended to before this point in order to accomodate all
// cells in apCell[], then the cells do not fit and non-zero is returned.
-func pageInsertArray(tls *libc.TLS, pPg uintptr, pBegin uintptr, ppData uintptr, pCellptr uintptr, iFirst int32, nCell int32, pCArray uintptr) int32 { /* sqlite3.c:72031:12: */
+func pageInsertArray(tls *libc.TLS, pPg uintptr, pBegin uintptr, ppData uintptr, pCellptr uintptr, iFirst int32, nCell int32, pCArray uintptr) int32 { /* sqlite3.c:72539:12: */
bp := tls.Alloc(4)
defer tls.Free(4)
@@ -48199,7 +50084,7 @@ func pageInsertArray(tls *libc.TLS, pPg uintptr, pBegin uintptr, ppData uintptr,
if (Uptr((*(*uintptr)(unsafe.Pointer((*CellArray)(unsafe.Pointer(pCArray)).FapCell + uintptr(i)*8)) + uintptr(sz))) > Uptr(pEnd)) &&
(Uptr((*(*uintptr)(unsafe.Pointer((*CellArray)(unsafe.Pointer(pCArray)).FapCell + uintptr(i)*8)))) < Uptr(pEnd)) {
- Xsqlite3CorruptError(tls, 72070)
+ Xsqlite3CorruptError(tls, 72578)
return 1
}
libc.Xmemmove(tls, pSlot, *(*uintptr)(unsafe.Pointer((*CellArray)(unsafe.Pointer(pCArray)).FapCell + uintptr(i)*8)), uint64(sz))
@@ -48226,7 +50111,7 @@ func pageInsertArray(tls *libc.TLS, pPg uintptr, pBegin uintptr, ppData uintptr,
// The cell-pointers and other fields of the page are not updated.
//
// This function returns the total number of cells added to the free-list.
-func pageFreeArray(tls *libc.TLS, pPg uintptr, iFirst int32, nCell int32, pCArray uintptr) int32 { /* sqlite3.c:72096:12: */
+func pageFreeArray(tls *libc.TLS, pPg uintptr, iFirst int32, nCell int32, pCArray uintptr) int32 { /* sqlite3.c:72604:12: */
var aData uintptr = (*MemPage)(unsafe.Pointer(pPg)).FaData
var pEnd uintptr = (aData + uintptr((*BtShared)(unsafe.Pointer((*MemPage)(unsafe.Pointer(pPg)).FpBt)).FusableSize))
var pStart uintptr = (aData + uintptr(((int32((*MemPage)(unsafe.Pointer(pPg)).FhdrOffset) + 8) + int32((*MemPage)(unsafe.Pointer(pPg)).FchildPtrSize))))
@@ -48278,7 +50163,7 @@ func pageFreeArray(tls *libc.TLS, pPg uintptr, iFirst int32, nCell int32, pCArra
//
// The pPg->nFree field is invalid when this function returns. It is the
// responsibility of the caller to set it correctly.
-func editPage(tls *libc.TLS, pPg uintptr, iOld int32, iNew int32, nNew int32, pCArray uintptr) int32 { /* sqlite3.c:72153:12: */
+func editPage(tls *libc.TLS, pPg uintptr, iOld int32, iNew int32, nNew int32, pCArray uintptr) int32 { /* sqlite3.c:72663:12: */
bp := tls.Alloc(8)
defer tls.Free(8)
@@ -48312,7 +50197,7 @@ func editPage(tls *libc.TLS, pPg uintptr, iOld int32, iNew int32, nNew int32, pC
if !(nShift > nCell) {
goto __2
}
- return Xsqlite3CorruptError(tls, 72179)
+ return Xsqlite3CorruptError(tls, 72689)
__2:
;
libc.Xmemmove(tls, (*MemPage)(unsafe.Pointer(pPg)).FaCellIdx, ((*MemPage)(unsafe.Pointer(pPg)).FaCellIdx + uintptr((nShift * 2))), (uint64(nCell * 2)))
@@ -48446,7 +50331,7 @@ editpage_fail:
// byte page number followed by a variable length integer. In other
// words, at most 13 bytes. Hence the pSpace buffer must be at
// least 13 bytes in size.
-func balance_quick(tls *libc.TLS, pParent uintptr, pPage uintptr, pSpace uintptr) int32 { /* sqlite3.c:72281:12: */
+func balance_quick(tls *libc.TLS, pParent uintptr, pPage uintptr, pSpace uintptr) int32 { /* sqlite3.c:72791:12: */
bp := tls.Alloc(140)
defer tls.Free(140)
@@ -48459,7 +50344,7 @@ func balance_quick(tls *libc.TLS, pParent uintptr, pPage uintptr, pSpace uintptr
// Page number of pNew
if int32((*MemPage)(unsafe.Pointer(pPage)).FnCell) == 0 {
- return Xsqlite3CorruptError(tls, 72291)
+ return Xsqlite3CorruptError(tls, 72801)
} // dbfuzz001.test
// Allocate a new page. This page will become the right-sibling of
@@ -48471,7 +50356,9 @@ func balance_quick(tls *libc.TLS, pParent uintptr, pPage uintptr, pSpace uintptr
var pOut uintptr = (pSpace + 4)
*(*uintptr)(unsafe.Pointer(bp + 16 /* pCell */)) = *(*uintptr)(unsafe.Pointer((pPage + 40 /* &.apOvfl */)))
- *(*U16)(unsafe.Pointer(bp + 24 /* szCell */)) = (*(*func(*libc.TLS, uintptr, uintptr) U16)(unsafe.Pointer((pPage + 120 /* &.xCellSize */))))(tls, pPage, *(*uintptr)(unsafe.Pointer(bp + 16 /* pCell */)))
+ *(*U16)(unsafe.Pointer(bp + 24 /* szCell */)) = (*struct {
+ f func(*libc.TLS, uintptr, uintptr) U16
+ })(unsafe.Pointer(&struct{ uintptr }{(*MemPage)(unsafe.Pointer(pPage)).FxCellSize})).f(tls, pPage, *(*uintptr)(unsafe.Pointer(bp + 16 /* pCell */)))
var pStop uintptr
// var b CellArray at bp+32, 104
@@ -48555,7 +50442,7 @@ func balance_quick(tls *libc.TLS, pParent uintptr, pPage uintptr, pSpace uintptr
// The performance of this function is not critical. It is only used by
// the balance_shallower() and balance_deeper() procedures, neither of
// which are called often under normal circumstances.
-func copyNodeContent(tls *libc.TLS, pFrom uintptr, pTo uintptr, pRC uintptr) { /* sqlite3.c:72436:13: */
+func copyNodeContent(tls *libc.TLS, pFrom uintptr, pTo uintptr, pRC uintptr) { /* sqlite3.c:72946:13: */
if (*(*int32)(unsafe.Pointer(pRC))) == SQLITE_OK {
var pBt uintptr = (*MemPage)(unsafe.Pointer(pFrom)).FpBt
var aFrom uintptr = (*MemPage)(unsafe.Pointer(pFrom)).FaData
@@ -48635,7 +50522,7 @@ func copyNodeContent(tls *libc.TLS, pFrom uintptr, pTo uintptr, pRC uintptr) { /
//
// If aOvflSpace is set to a null pointer, this function returns
// SQLITE_NOMEM.
-func balance_nonroot(tls *libc.TLS, pParent uintptr, iParentIdx int32, aOvflSpace uintptr, isRoot int32, bBulk int32) int32 { /* sqlite3.c:72518:12: */
+func balance_nonroot(tls *libc.TLS, pParent uintptr, iParentIdx int32, aOvflSpace uintptr, isRoot int32, bBulk int32) int32 { /* sqlite3.c:73028:12: */
bp := tls.Alloc(352)
defer tls.Free(352)
@@ -48716,6 +50603,7 @@ func balance_nonroot(tls *libc.TLS, pParent uintptr, iParentIdx int32, aOvflSpac
var pCell1 uintptr
var pTemp1 uintptr
var sz2 int32
+ var pSrcEnd uintptr
var pNew2 uintptr
var iNew1 int32
var iOld1 int32
@@ -48836,13 +50724,17 @@ __16:
}
*(*uintptr)(unsafe.Pointer(bp + 32 /* &apDiv[0] */ + uintptr(i)*8)) = *(*uintptr)(unsafe.Pointer((pParent + 40 /* &.apOvfl */)))
*(*Pgno)(unsafe.Pointer(bp + 272 /* pgno */)) = Xsqlite3Get4byte(tls, *(*uintptr)(unsafe.Pointer(bp + 32 /* &apDiv[0] */ + uintptr(i)*8)))
- *(*int32)(unsafe.Pointer(bp + 48 /* &szNew[0] */ + uintptr(i)*4)) = int32((*(*func(*libc.TLS, uintptr, uintptr) U16)(unsafe.Pointer((pParent + 120 /* &.xCellSize */))))(tls, pParent, *(*uintptr)(unsafe.Pointer(bp + 32 /* &apDiv[0] */ + uintptr(i)*8))))
+ *(*int32)(unsafe.Pointer(bp + 48 /* &szNew[0] */ + uintptr(i)*4)) = int32((*struct {
+ f func(*libc.TLS, uintptr, uintptr) U16
+ })(unsafe.Pointer(&struct{ uintptr }{(*MemPage)(unsafe.Pointer(pParent)).FxCellSize})).f(tls, pParent, *(*uintptr)(unsafe.Pointer(bp + 32 /* &apDiv[0] */ + uintptr(i)*8))))
(*MemPage)(unsafe.Pointer(pParent)).FnOverflow = U8(0)
goto __18
__17:
*(*uintptr)(unsafe.Pointer(bp + 32 /* &apDiv[0] */ + uintptr(i)*8)) = ((*MemPage)(unsafe.Pointer((pParent))).FaData + uintptr((int32((*MemPage)(unsafe.Pointer((pParent))).FmaskPage) & ((int32(*(*U8)(unsafe.Pointer(((*MemPage)(unsafe.Pointer((pParent))).FaCellIdx + uintptr((2 * ((i + nxDiv) - int32((*MemPage)(unsafe.Pointer(pParent)).FnOverflow)))))))) << 8) | int32(*(*U8)(unsafe.Pointer(((*MemPage)(unsafe.Pointer((pParent))).FaCellIdx + uintptr((2 * ((i + nxDiv) - int32((*MemPage)(unsafe.Pointer(pParent)).FnOverflow))))) + 1)))))))
*(*Pgno)(unsafe.Pointer(bp + 272 /* pgno */)) = Xsqlite3Get4byte(tls, *(*uintptr)(unsafe.Pointer(bp + 32 /* &apDiv[0] */ + uintptr(i)*8)))
- *(*int32)(unsafe.Pointer(bp + 48 /* &szNew[0] */ + uintptr(i)*4)) = int32((*(*func(*libc.TLS, uintptr, uintptr) U16)(unsafe.Pointer((pParent + 120 /* &.xCellSize */))))(tls, pParent, *(*uintptr)(unsafe.Pointer(bp + 32 /* &apDiv[0] */ + uintptr(i)*8))))
+ *(*int32)(unsafe.Pointer(bp + 48 /* &szNew[0] */ + uintptr(i)*4)) = int32((*struct {
+ f func(*libc.TLS, uintptr, uintptr) U16
+ })(unsafe.Pointer(&struct{ uintptr }{(*MemPage)(unsafe.Pointer(pParent)).FxCellSize})).f(tls, pParent, *(*uintptr)(unsafe.Pointer(bp + 32 /* &apDiv[0] */ + uintptr(i)*8))))
// Drop the cell from the parent page. apDiv[i] still points to
// the cell within the parent, even though it has been dropped.
@@ -48933,7 +50825,7 @@ __22:
if !(int32(*(*U8)(unsafe.Pointer((*MemPage)(unsafe.Pointer(pOld)).FaData))) != int32(*(*U8)(unsafe.Pointer((*MemPage)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 8 /* &apOld[0] */)))).FaData)))) {
goto __25
}
- *(*int32)(unsafe.Pointer(bp + 68 /* rc */)) = Xsqlite3CorruptError(tls, 72715)
+ *(*int32)(unsafe.Pointer(bp + 68 /* rc */)) = Xsqlite3CorruptError(tls, 73225)
goto balance_cleanup
__25:
;
@@ -48961,7 +50853,7 @@ __25:
if !(limit < int32(*(*U16)(unsafe.Pointer((pOld + 28 /* &.aiOvfl */))))) {
goto __27
}
- *(*int32)(unsafe.Pointer(bp + 68 /* rc */)) = Xsqlite3CorruptError(tls, 72739)
+ *(*int32)(unsafe.Pointer(bp + 68 /* rc */)) = Xsqlite3CorruptError(tls, 73249)
goto balance_cleanup
__27:
;
@@ -49104,7 +50996,9 @@ __46:
if !(j < int32((*MemPage)(unsafe.Pointer(p)).FnOverflow)) {
goto __48
}
- *(*int32)(unsafe.Pointer(bp + 48 /* &szNew */ + uintptr(i)*4)) += (2 + int32((*(*func(*libc.TLS, uintptr, uintptr) U16)(unsafe.Pointer((p + 120 /* &.xCellSize */))))(tls, p, *(*uintptr)(unsafe.Pointer((p + 40 /* &.apOvfl */) + uintptr(j)*8)))))
+ *(*int32)(unsafe.Pointer(bp + 48 /* &szNew */ + uintptr(i)*4)) += (2 + int32((*struct {
+ f func(*libc.TLS, uintptr, uintptr) U16
+ })(unsafe.Pointer(&struct{ uintptr }{(*MemPage)(unsafe.Pointer(p)).FxCellSize})).f(tls, p, *(*uintptr)(unsafe.Pointer((p + 40 /* &.apOvfl */) + uintptr(j)*8)))))
goto __47
__47:
j++
@@ -49138,7 +51032,7 @@ __52:
if !(k > (NB + 2)) {
goto __55
}
- *(*int32)(unsafe.Pointer(bp + 68 /* rc */)) = Xsqlite3CorruptError(tls, 72840)
+ *(*int32)(unsafe.Pointer(bp + 68 /* rc */)) = Xsqlite3CorruptError(tls, 73350)
goto balance_cleanup
__55:
;
@@ -49212,7 +51106,7 @@ __65:
}())) {
goto __67
}
- *(*int32)(unsafe.Pointer(bp + 68 /* rc */)) = Xsqlite3CorruptError(tls, 72873)
+ *(*int32)(unsafe.Pointer(bp + 68 /* rc */)) = Xsqlite3CorruptError(tls, 73383)
goto balance_cleanup
__67:
;
@@ -49285,7 +51179,7 @@ __73:
}())) {
goto __75
}
- *(*int32)(unsafe.Pointer(bp + 68 /* rc */)) = Xsqlite3CorruptError(tls, 72915)
+ *(*int32)(unsafe.Pointer(bp + 68 /* rc */)) = Xsqlite3CorruptError(tls, 73425)
goto balance_cleanup
__75:
;
@@ -49321,7 +51215,7 @@ __76:
if !(Xsqlite3PagerPageRefcount(tls, (*MemPage)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 264 /* pNew */)))).FpDbPage) != (1 + (libc.Bool32(i == (iParentIdx - nxDiv))))) {
goto __81
}
- *(*int32)(unsafe.Pointer(bp + 68 /* rc */)) = Xsqlite3CorruptError(tls, 72946)
+ *(*int32)(unsafe.Pointer(bp + 68 /* rc */)) = Xsqlite3CorruptError(tls, 73456)
__81:
;
if !(*(*int32)(unsafe.Pointer(bp + 68 /* rc */)) != 0) {
@@ -49405,7 +51299,7 @@ __89:
// cache with two separate objects associated with the same
// page number.
- *(*int32)(unsafe.Pointer(bp + 68 /* rc */)) = Xsqlite3CorruptError(tls, 72992)
+ *(*int32)(unsafe.Pointer(bp + 68 /* rc */)) = Xsqlite3CorruptError(tls, 73502)
goto balance_cleanup
__92:
;
@@ -49608,7 +51502,9 @@ __118:
goto __120
}
j--
- (*(*func(*libc.TLS, uintptr, uintptr, uintptr))(unsafe.Pointer((pNew2 + 128 /* &.xParseCell */))))(tls, pNew2, *(*uintptr)(unsafe.Pointer((*CellArray)(unsafe.Pointer(bp+96 /* &b */)).FapCell + uintptr(j)*8)), bp+328 /* &info */)
+ (*struct {
+ f func(*libc.TLS, uintptr, uintptr, uintptr)
+ })(unsafe.Pointer(&struct{ uintptr }{(*MemPage)(unsafe.Pointer(pNew2)).FxParseCell})).f(tls, pNew2, *(*uintptr)(unsafe.Pointer((*CellArray)(unsafe.Pointer(bp+96 /* &b */)).FapCell + uintptr(j)*8)), bp+328 /* &info */)
pCell1 = pTemp1
sz2 = (4 + Xsqlite3PutVarint(tls, (pCell1+4), uint64((*CellInfo)(unsafe.Pointer(bp+328 /* &info */)).FnKey)))
pTemp1 = uintptr(0)
@@ -49629,7 +51525,9 @@ __120:
goto __122
}
- sz2 = int32((*(*func(*libc.TLS, uintptr, uintptr) U16)(unsafe.Pointer((pParent + 120 /* &.xCellSize */))))(tls, pParent, pCell1))
+ sz2 = int32((*struct {
+ f func(*libc.TLS, uintptr, uintptr) U16
+ })(unsafe.Pointer(&struct{ uintptr }{(*MemPage)(unsafe.Pointer(pParent)).FxCellSize})).f(tls, pParent, pCell1))
__122:
;
__121:
@@ -49638,12 +51536,32 @@ __119:
;
iOvflSpace = iOvflSpace + (sz2)
+ k = 0
+__123:
+ if !((*(*int32)(unsafe.Pointer((bp + 96 /* &b */ + 80 /* &.ixNx */) + uintptr(k)*4)) <= i) && (k < (NB * 2))) {
+ goto __125
+ }
+ goto __124
+__124:
+ k++
+ goto __123
+ goto __125
+__125:
+ ;
+ pSrcEnd = *(*uintptr)(unsafe.Pointer((bp + 96 /* &b */ + 32 /* &.apEnd */) + uintptr(k)*8))
+ if !((Uptr((pSrcEnd)) >= Uptr((pCell1))) && (Uptr((pSrcEnd)) < Uptr((pCell1 + uintptr(sz2))))) {
+ goto __126
+ }
+ *(*int32)(unsafe.Pointer(bp + 68 /* rc */)) = Xsqlite3CorruptError(tls, 73659)
+ goto balance_cleanup
+__126:
+ ;
insertCell(tls, pParent, (nxDiv + i), pCell1, sz2, pTemp1, (*MemPage)(unsafe.Pointer(pNew2)).Fpgno, bp+68 /* &rc */)
if !(*(*int32)(unsafe.Pointer(bp + 68 /* rc */)) != SQLITE_OK) {
- goto __123
+ goto __127
}
goto balance_cleanup
-__123:
+__127:
;
goto __116
@@ -49676,9 +51594,9 @@ __117:
// upwards pass simply processes pages that were missed on the downward
// pass.
i = (1 - nNew)
-__124:
+__128:
if !(i < nNew) {
- goto __126
+ goto __130
}
if i < 0 {
iPg = -i
@@ -49687,14 +51605,14 @@ __124:
}
if !(*(*U8)(unsafe.Pointer(bp /* &abDone[0] */ + uintptr(iPg))) != 0) {
- goto __127
+ goto __131
}
- goto __125
-__127:
+ goto __129
+__131:
; // Skip pages already processed
if !((i >= 0) || // On the upwards pass, or...
(*(*int32)(unsafe.Pointer(bp + 72 /* &cntOld[0] */ + uintptr((iPg-1))*4)) >= *(*int32)(unsafe.Pointer(bp + 200 /* &cntNew[0] */ + uintptr((iPg-1))*4)))) {
- goto __128
+ goto __132
}
// Verify condition (1): If cells are moving left, update iPg
@@ -49704,12 +51622,12 @@ __127:
// only after iPg+1 has already been updated.
if !(iPg == 0) {
- goto __129
+ goto __133
}
iNew1 = libc.AssignInt32(&iOld1, 0)
nNewCell = *(*int32)(unsafe.Pointer(bp + 200 /* &cntNew[0] */))
- goto __130
-__129:
+ goto __134
+__133:
if iPg < nOld {
iOld1 = (*(*int32)(unsafe.Pointer(bp + 72 /* &cntOld[0] */ + uintptr((iPg-1))*4)) + libc.BoolInt32(!(leafData != 0)))
} else {
@@ -49717,33 +51635,33 @@ __129:
}
iNew1 = (*(*int32)(unsafe.Pointer(bp + 200 /* &cntNew[0] */ + uintptr((iPg-1))*4)) + libc.BoolInt32(!(leafData != 0)))
nNewCell = (*(*int32)(unsafe.Pointer(bp + 200 /* &cntNew[0] */ + uintptr(iPg)*4)) - iNew1)
-__130:
+__134:
;
*(*int32)(unsafe.Pointer(bp + 68 /* rc */)) = editPage(tls, *(*uintptr)(unsafe.Pointer(bp + 224 /* &apNew[0] */ + uintptr(iPg)*8)), iOld1, iNew1, nNewCell, bp+96 /* &b */)
if !(*(*int32)(unsafe.Pointer(bp + 68 /* rc */)) != 0) {
- goto __131
+ goto __135
}
goto balance_cleanup
-__131:
+__135:
;
*(*U8)(unsafe.Pointer(bp /* &abDone[0] */ + uintptr(iPg)))++
(*MemPage)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 224 /* &apNew[0] */ + uintptr(iPg)*8)))).FnFree = (usableSpace - *(*int32)(unsafe.Pointer(bp + 48 /* &szNew[0] */ + uintptr(iPg)*4)))
-__128:
+__132:
;
- goto __125
-__125:
+ goto __129
+__129:
i++
- goto __124
- goto __126
-__126:
+ goto __128
+ goto __130
+__130:
;
// All pages have been processed exactly once
if !(((isRoot != 0) && (int32((*MemPage)(unsafe.Pointer(pParent)).FnCell) == 0)) && (int32((*MemPage)(unsafe.Pointer(pParent)).FhdrOffset) <= (*MemPage)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 224 /* &apNew[0] */)))).FnFree)) {
- goto __132
+ goto __136
}
// The root page of the b-tree now contains no cells. The only sibling
// page is the right-child of the parent. Copy the contents of the
@@ -49764,76 +51682,76 @@ __126:
copyNodeContent(tls, *(*uintptr)(unsafe.Pointer(bp + 224 /* &apNew[0] */)), pParent, bp+68 /* &rc */)
freePage(tls, *(*uintptr)(unsafe.Pointer(bp + 224 /* &apNew[0] */)), bp+68 /* &rc */)
- goto __133
-__132:
+ goto __137
+__136:
if !(((*BtShared)(unsafe.Pointer(pBt)).FautoVacuum != 0) && !(leafCorrection != 0)) {
- goto __134
+ goto __138
}
// Fix the pointer map entries associated with the right-child of each
// sibling page. All other pointer map entries have already been taken
// care of.
i = 0
-__135:
+__139:
if !(i < nNew) {
- goto __137
+ goto __141
}
key = Xsqlite3Get4byte(tls, ((*MemPage)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 224 /* &apNew[0] */ + uintptr(i)*8)))).FaData + 8))
ptrmapPut(tls, pBt, key, uint8(PTRMAP_BTREE), (*MemPage)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 224 /* &apNew[0] */ + uintptr(i)*8)))).Fpgno, bp+68 /* &rc */)
- goto __136
-__136:
+ goto __140
+__140:
i++
- goto __135
- goto __137
-__137:
+ goto __139
+ goto __141
+__141:
;
-__134:
+__138:
;
-__133:
+__137:
;
// Free any old pages that were not reused as new pages.
i = nNew
-__138:
+__142:
if !(i < nOld) {
- goto __140
+ goto __144
}
freePage(tls, *(*uintptr)(unsafe.Pointer(bp + 8 /* &apOld[0] */ + uintptr(i)*8)), bp+68 /* &rc */)
- goto __139
-__139:
+ goto __143
+__143:
i++
- goto __138
- goto __140
-__140:
+ goto __142
+ goto __144
+__144:
;
// Cleanup before returning.
balance_cleanup:
Xsqlite3DbFree(tls, uintptr(0), (*CellArray)(unsafe.Pointer(bp+96 /* &b */)).FapCell)
i = 0
-__141:
+__145:
if !(i < nOld) {
- goto __143
+ goto __147
}
releasePage(tls, *(*uintptr)(unsafe.Pointer(bp + 8 /* &apOld[0] */ + uintptr(i)*8)))
- goto __142
-__142:
+ goto __146
+__146:
i++
- goto __141
- goto __143
-__143:
+ goto __145
+ goto __147
+__147:
;
i = 0
-__144:
+__148:
if !(i < nNew) {
- goto __146
+ goto __150
}
releasePage(tls, *(*uintptr)(unsafe.Pointer(bp + 224 /* &apNew[0] */ + uintptr(i)*8)))
- goto __145
-__145:
+ goto __149
+__149:
i++
- goto __144
- goto __146
-__146:
+ goto __148
+ goto __150
+__150:
;
return *(*int32)(unsafe.Pointer(bp + 68 /* rc */))
@@ -49856,7 +51774,7 @@ __146:
// page and SQLITE_OK is returned. In this case the caller is required
// to call releasePage() on *ppChild exactly once. If an error occurs,
// an error code is returned and *ppChild is set to 0.
-func balance_deeper(tls *libc.TLS, pRoot uintptr, ppChild uintptr) int32 { /* sqlite3.c:73307:12: */
+func balance_deeper(tls *libc.TLS, pRoot uintptr, ppChild uintptr) int32 { /* sqlite3.c:73824:12: */
bp := tls.Alloc(16)
defer tls.Free(16)
@@ -49907,13 +51825,13 @@ func balance_deeper(tls *libc.TLS, pRoot uintptr, ppChild uintptr) int32 { /* sq
// table linked to the same b-tree. If the secondary insert causes a
// rebalance, that can change content out from under the cursor on the
// first SQL table, violating invariants on the first insert.
-func anotherValidCursor(tls *libc.TLS, pCur uintptr) int32 { /* sqlite3.c:73365:12: */
+func anotherValidCursor(tls *libc.TLS, pCur uintptr) int32 { /* sqlite3.c:73882:12: */
var pOther uintptr
for pOther = (*BtShared)(unsafe.Pointer((*BtCursor)(unsafe.Pointer(pCur)).FpBt)).FpCursor; pOther != 0; pOther = (*BtCursor)(unsafe.Pointer(pOther)).FpNext {
if ((pOther != pCur) &&
(int32((*BtCursor)(unsafe.Pointer(pOther)).FeState) == CURSOR_VALID)) &&
((*BtCursor)(unsafe.Pointer(pOther)).FpPage == (*BtCursor)(unsafe.Pointer(pCur)).FpPage) {
- return Xsqlite3CorruptError(tls, 73372)
+ return Xsqlite3CorruptError(tls, 73889)
}
}
return SQLITE_OK
@@ -49927,7 +51845,7 @@ func anotherValidCursor(tls *libc.TLS, pCur uintptr) int32 { /* sqlite3.c:73365:
// balance_quick()
// balance_deeper()
// balance_nonroot()
-func balance(tls *libc.TLS, pCur uintptr) int32 { /* sqlite3.c:73388:12: */
+func balance(tls *libc.TLS, pCur uintptr) int32 { /* sqlite3.c:73905:12: */
bp := tls.Alloc(13)
defer tls.Free(13)
@@ -50046,7 +51964,7 @@ func balance(tls *libc.TLS, pCur uintptr) int32 { /* sqlite3.c:73388:12: */
// Overwrite content from pX into pDest. Only do the write if the
// content is different from what is already there.
-func btreeOverwriteContent(tls *libc.TLS, pPage uintptr, pDest uintptr, pX uintptr, iOffset int32, iAmt int32) int32 { /* sqlite3.c:73514:12: */
+func btreeOverwriteContent(tls *libc.TLS, pPage uintptr, pDest uintptr, pX uintptr, iOffset int32, iAmt int32) int32 { /* sqlite3.c:74031:12: */
var nData int32 = ((*BtreePayload)(unsafe.Pointer(pX)).FnData - iOffset)
if nData <= 0 {
// Overwritting with zeros
@@ -50088,7 +52006,7 @@ func btreeOverwriteContent(tls *libc.TLS, pPage uintptr, pDest uintptr, pX uintp
// Overwrite the cell that cursor pCur is pointing to with fresh content
// contained in pX.
-func btreeOverwriteCell(tls *libc.TLS, pCur uintptr, pX uintptr) int32 { /* sqlite3.c:73557:12: */
+func btreeOverwriteCell(tls *libc.TLS, pCur uintptr, pX uintptr) int32 { /* sqlite3.c:74074:12: */
bp := tls.Alloc(8)
defer tls.Free(8)
@@ -50102,7 +52020,7 @@ func btreeOverwriteCell(tls *libc.TLS, pCur uintptr, pX uintptr) int32 { /* sqli
if (((*BtCursor)(unsafe.Pointer(pCur)).Finfo.FpPayload + uintptr((*BtCursor)(unsafe.Pointer(pCur)).Finfo.FnLocal)) > (*MemPage)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp /* pPage */)))).FaDataEnd) ||
((*BtCursor)(unsafe.Pointer(pCur)).Finfo.FpPayload < ((*MemPage)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp /* pPage */)))).FaData + uintptr((*MemPage)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp /* pPage */)))).FcellOffset))) {
- return Xsqlite3CorruptError(tls, 73569)
+ return Xsqlite3CorruptError(tls, 74086)
}
// Overwrite the local portion first
rc = btreeOverwriteContent(tls, *(*uintptr)(unsafe.Pointer(bp /* pPage */)), (*BtCursor)(unsafe.Pointer(pCur)).Finfo.FpPayload, pX,
@@ -50126,7 +52044,7 @@ func btreeOverwriteCell(tls *libc.TLS, pCur uintptr, pX uintptr) int32 { /* sqli
return rc
}
if Xsqlite3PagerPageRefcount(tls, (*MemPage)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp /* pPage */)))).FpDbPage) != 1 {
- rc = Xsqlite3CorruptError(tls, 73588)
+ rc = Xsqlite3CorruptError(tls, 74105)
} else {
if (U32(iOffset) + ovflPageSize) < U32(nTotal) {
ovflPgno = Xsqlite3Get4byte(tls, (*MemPage)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp /* pPage */)))).FaData)
@@ -50173,7 +52091,7 @@ func btreeOverwriteCell(tls *libc.TLS, pCur uintptr, pX uintptr) int32 { /* sqli
// if pX->nMem is non-zero, then pX->aMem contains pointers to the unpacked
// key values and pX->aMem can be used instead of pX->pKey to avoid having
// to decode the key.
-func Xsqlite3BtreeInsert(tls *libc.TLS, pCur uintptr, pX uintptr, flags int32, seekResult int32) int32 { /* sqlite3.c:73636:20: */
+func Xsqlite3BtreeInsert(tls *libc.TLS, pCur uintptr, pX uintptr, flags int32, seekResult int32) int32 { /* sqlite3.c:74153:20: */
bp := tls.Alloc(136)
defer tls.Free(136)
@@ -50237,16 +52155,32 @@ __1:
return *(*int32)(unsafe.Pointer(bp + 104 /* rc */))
__3:
;
+ if !((*(*int32)(unsafe.Pointer(bp /* loc */)) != 0) && (int32((*BtCursor)(unsafe.Pointer(pCur)).FiPage) < 0)) {
+ goto __4
+ }
+ // This can only happen if the schema is corrupt such that there is more
+ // than one table or index with the same root page as used by the cursor.
+ // Which can only happen if the SQLITE_NoSchemaError flag was set when
+ // the schema was loaded. This cannot be asserted though, as a user might
+ // set the flag, load the schema, and then unset the flag.
+ return Xsqlite3CorruptError(tls, 74210)
+__4:
+ ;
__2:
;
if !((*BtCursor)(unsafe.Pointer(pCur)).FpKeyInfo == uintptr(0)) {
- goto __4
+ goto __5
}
// If this is an insert into a table b-tree, invalidate any incrblob
// cursors open on the row being replaced
+ if !((*Btree)(unsafe.Pointer(p)).FhasIncrblobCur != 0) {
+ goto __7
+ }
invalidateIncrblobCursors(tls, p, (*BtCursor)(unsafe.Pointer(pCur)).FpgnoRoot, (*BtreePayload)(unsafe.Pointer(pX)).FnKey, 0)
+__7:
+ ;
// If BTREE_SAVEPOSITION is set, the cursor must already be pointing
// to a row with the same key as the new entry being inserted.
@@ -50255,41 +52189,41 @@ __2:
// that the cursor is not pointing to a row to be overwritten.
// So do a complete check.
if !(((int32((*BtCursor)(unsafe.Pointer(pCur)).FcurFlags) & BTCF_ValidNKey) != 0) && ((*BtreePayload)(unsafe.Pointer(pX)).FnKey == (*BtCursor)(unsafe.Pointer(pCur)).Finfo.FnKey)) {
- goto __6
+ goto __8
}
// The cursor is pointing to the entry that is to be
// overwritten
if !((int32((*BtCursor)(unsafe.Pointer(pCur)).Finfo.FnSize) != 0) &&
((*BtCursor)(unsafe.Pointer(pCur)).Finfo.FnPayload == (U32((*BtreePayload)(unsafe.Pointer(pX)).FnData) + U32((*BtreePayload)(unsafe.Pointer(pX)).FnZero)))) {
- goto __8
+ goto __10
}
// New entry is the same size as the old. Do an overwrite
return btreeOverwriteCell(tls, pCur, pX)
-__8:
+__10:
;
- goto __7
-__6:
+ goto __9
+__8:
if !(*(*int32)(unsafe.Pointer(bp /* loc */)) == 0) {
- goto __9
+ goto __11
}
// The cursor is *not* pointing to the cell to be overwritten, nor
// to an adjacent cell. Move the cursor so that it is pointing either
// to the cell to be overwritten or an adjacent cell.
*(*int32)(unsafe.Pointer(bp + 104 /* rc */)) = Xsqlite3BtreeMovetoUnpacked(tls, pCur, uintptr(0), (*BtreePayload)(unsafe.Pointer(pX)).FnKey, (libc.Bool32(flags != 0)), bp /* &loc */)
if !(*(*int32)(unsafe.Pointer(bp + 104 /* rc */)) != 0) {
- goto __10
+ goto __12
}
return *(*int32)(unsafe.Pointer(bp + 104 /* rc */))
-__10:
+__12:
;
-__9:
+__11:
;
-__7:
+__9:
;
- goto __5
-__4:
+ goto __6
+__5:
// This is an index or a WITHOUT ROWID table
// If BTREE_SAVEPOSITION is set, the cursor must already be pointing
@@ -50301,10 +52235,10 @@ __4:
// not pointing to an immediately adjacent cell, then move the cursor
// so that it does.
if !((*(*int32)(unsafe.Pointer(bp /* loc */)) == 0) && ((flags & BTREE_SAVEPOSITION) == 0)) {
- goto __11
+ goto __13
}
if !((*BtreePayload)(unsafe.Pointer(pX)).FnMem != 0) {
- goto __12
+ goto __14
}
(*UnpackedRecord)(unsafe.Pointer(bp + 8 /* &r */)).FpKeyInfo = (*BtCursor)(unsafe.Pointer(pCur)).FpKeyInfo
(*UnpackedRecord)(unsafe.Pointer(bp + 8 /* &r */)).FaMem = (*BtreePayload)(unsafe.Pointer(pX)).FaMem
@@ -50315,128 +52249,140 @@ __4:
(*UnpackedRecord)(unsafe.Pointer(bp + 8 /* &r */)).Fr2 = int8(0)
(*UnpackedRecord)(unsafe.Pointer(bp + 8 /* &r */)).FeqSeen = U8(0)
*(*int32)(unsafe.Pointer(bp + 104 /* rc */)) = Xsqlite3BtreeMovetoUnpacked(tls, pCur, bp+8 /* &r */, int64(0), (libc.Bool32(flags != 0)), bp /* &loc */)
- goto __13
-__12:
+ goto __15
+__14:
*(*int32)(unsafe.Pointer(bp + 104 /* rc */)) = btreeMoveto(tls, pCur, (*BtreePayload)(unsafe.Pointer(pX)).FpKey, (*BtreePayload)(unsafe.Pointer(pX)).FnKey, (libc.Bool32(flags != 0)), bp /* &loc */)
-__13:
+__15:
;
if !(*(*int32)(unsafe.Pointer(bp + 104 /* rc */)) != 0) {
- goto __14
+ goto __16
}
return *(*int32)(unsafe.Pointer(bp + 104 /* rc */))
-__14:
+__16:
;
-__11:
+__13:
;
// If the cursor is currently pointing to an entry to be overwritten
// and the new content is the same as as the old, then use the
// overwrite optimization.
if !(*(*int32)(unsafe.Pointer(bp /* loc */)) == 0) {
- goto __15
+ goto __17
}
getCellInfo(tls, pCur)
if !((*BtCursor)(unsafe.Pointer(pCur)).Finfo.FnKey == (*BtreePayload)(unsafe.Pointer(pX)).FnKey) {
- goto __16
+ goto __18
}
(*BtreePayload)(unsafe.Pointer(bp + 32 /* &x2 */)).FpData = (*BtreePayload)(unsafe.Pointer(pX)).FpKey
(*BtreePayload)(unsafe.Pointer(bp + 32 /* &x2 */)).FnData = int32((*BtreePayload)(unsafe.Pointer(pX)).FnKey)
(*BtreePayload)(unsafe.Pointer(bp + 32 /* &x2 */)).FnZero = 0
return btreeOverwriteCell(tls, pCur, bp+32 /* &x2 */)
-__16:
+__18:
;
-__15:
+__17:
;
-
-__5:
+__6:
;
pPage = (*BtCursor)(unsafe.Pointer(pCur)).FpPage
if !((*MemPage)(unsafe.Pointer(pPage)).FnFree < 0) {
- goto __17
+ goto __19
}
if !(int32((*BtCursor)(unsafe.Pointer(pCur)).FeState) > CURSOR_INVALID) {
- goto __18
+ goto __20
}
- *(*int32)(unsafe.Pointer(bp + 104 /* rc */)) = Xsqlite3CorruptError(tls, 73785)
- goto __19
-__18:
+ *(*int32)(unsafe.Pointer(bp + 104 /* rc */)) = Xsqlite3CorruptError(tls, 74311)
+ goto __21
+__20:
*(*int32)(unsafe.Pointer(bp + 104 /* rc */)) = btreeComputeFreeSpace(tls, pPage)
-__19:
+__21:
;
if !(*(*int32)(unsafe.Pointer(bp + 104 /* rc */)) != 0) {
- goto __20
+ goto __22
}
return *(*int32)(unsafe.Pointer(bp + 104 /* rc */))
-__20:
+__22:
;
-__17:
+__19:
;
newCell = (*BtShared)(unsafe.Pointer(pBt)).FpTmpSpace
if !((flags & BTREE_PREFORMAT) != 0) {
- goto __21
+ goto __23
}
*(*int32)(unsafe.Pointer(bp + 104 /* rc */)) = SQLITE_OK
*(*int32)(unsafe.Pointer(bp + 108 /* szNew */)) = (*BtShared)(unsafe.Pointer(pBt)).FnPreformatSize
if !(*(*int32)(unsafe.Pointer(bp + 108 /* szNew */)) < 4) {
- goto __23
+ goto __25
}
*(*int32)(unsafe.Pointer(bp + 108 /* szNew */)) = 4
-__23:
+__25:
;
if !(((*BtShared)(unsafe.Pointer(pBt)).FautoVacuum != 0) && (*(*int32)(unsafe.Pointer(bp + 108 /* szNew */)) > int32((*MemPage)(unsafe.Pointer(pPage)).FmaxLocal))) {
- goto __24
+ goto __26
}
- (*(*func(*libc.TLS, uintptr, uintptr, uintptr))(unsafe.Pointer((pPage + 128 /* &.xParseCell */))))(tls, pPage, newCell, bp+80 /* &info */)
+ (*struct {
+ f func(*libc.TLS, uintptr, uintptr, uintptr)
+ })(unsafe.Pointer(&struct{ uintptr }{(*MemPage)(unsafe.Pointer(pPage)).FxParseCell})).f(tls, pPage, newCell, bp+80 /* &info */)
if !((*CellInfo)(unsafe.Pointer(bp+80 /* &info */)).FnPayload != U32((*CellInfo)(unsafe.Pointer(bp+80 /* &info */)).FnLocal)) {
- goto __25
+ goto __27
}
ovfl = Xsqlite3Get4byte(tls, (newCell + uintptr((*(*int32)(unsafe.Pointer(bp + 108 /* szNew */)) - 4))))
ptrmapPut(tls, pBt, ovfl, uint8(PTRMAP_OVERFLOW1), (*MemPage)(unsafe.Pointer(pPage)).Fpgno, bp+104 /* &rc */)
-__25:
+__27:
;
-__24:
+__26:
;
- goto __22
-__21:
+ goto __24
+__23:
*(*int32)(unsafe.Pointer(bp + 104 /* rc */)) = fillInCell(tls, pPage, newCell, pX, bp+108 /* &szNew */)
-__22:
+__24:
;
if !(*(*int32)(unsafe.Pointer(bp + 104 /* rc */)) != 0) {
- goto __26
+ goto __28
}
goto end_insert
-__26:
+__28:
;
idx = int32((*BtCursor)(unsafe.Pointer(pCur)).Fix)
if !(*(*int32)(unsafe.Pointer(bp /* loc */)) == 0) {
- goto __27
+ goto __29
}
*(*int32)(unsafe.Pointer(bp + 104 /* rc */)) = Xsqlite3PagerWrite(tls, (*MemPage)(unsafe.Pointer(pPage)).FpDbPage)
if !(*(*int32)(unsafe.Pointer(bp + 104 /* rc */)) != 0) {
- goto __29
+ goto __31
}
goto end_insert
-__29:
+__31:
;
oldCell = ((*MemPage)(unsafe.Pointer((pPage))).FaData + uintptr((int32((*MemPage)(unsafe.Pointer((pPage))).FmaskPage) & ((int32(*(*U8)(unsafe.Pointer(((*MemPage)(unsafe.Pointer((pPage))).FaCellIdx + uintptr((2 * (idx))))))) << 8) | int32(*(*U8)(unsafe.Pointer(((*MemPage)(unsafe.Pointer((pPage))).FaCellIdx + uintptr((2 * (idx)))) + 1)))))))
if !(!(int32((*MemPage)(unsafe.Pointer(pPage)).Fleaf) != 0)) {
- goto __30
+ goto __32
}
libc.Xmemcpy(tls, newCell, oldCell, uint64(4))
-__30:
+__32:
+ ;
+ (*struct {
+ f func(*libc.TLS, uintptr, uintptr, uintptr)
+ })(unsafe.Pointer(&struct{ uintptr }{(*MemPage)(unsafe.Pointer(pPage)).FxParseCell})).f(tls, pPage, oldCell, bp+112 /* &info1 */)
+ if !(U32((*CellInfo)(unsafe.Pointer(bp+112 /* &info1 */)).FnLocal) != (*CellInfo)(unsafe.Pointer(bp+112 /* &info1 */)).FnPayload) {
+ goto __33
+ }
+ *(*int32)(unsafe.Pointer(bp + 104 /* rc */)) = clearCellOverflow(tls, pPage, oldCell, bp+112 /* &info1 */)
+ goto __34
+__33:
+ *(*int32)(unsafe.Pointer(bp + 104 /* rc */)) = SQLITE_OK
+__34:
;
- *(*int32)(unsafe.Pointer(bp + 104 /* rc */)) = clearCell(tls, pPage, oldCell, bp+112 /* &info1 */)
*(*U8)(unsafe.Pointer(pCur + 1 /* &.curFlags */)) &= libc.Uint8FromInt32((libc.CplInt32(BTCF_ValidOvfl)))
if !(((int32((*CellInfo)(unsafe.Pointer(bp+112 /* &info1 */)).FnSize) == *(*int32)(unsafe.Pointer(bp + 108 /* szNew */))) && (U32((*CellInfo)(unsafe.Pointer(bp+112 /* &info1 */)).FnLocal) == (*CellInfo)(unsafe.Pointer(bp+112 /* &info1 */)).FnPayload)) &&
(!(int32((*BtShared)(unsafe.Pointer(pBt)).FautoVacuum) != 0) || (*(*int32)(unsafe.Pointer(bp + 108 /* szNew */)) < int32((*MemPage)(unsafe.Pointer(pPage)).FminLocal)))) {
- goto __31
+ goto __35
}
// Overwrite the old cell with the new if they are the same size.
// We could also try to do this if the old cell is smaller, then add
@@ -50449,42 +52395,42 @@ __30:
// necessary to add the PTRMAP_OVERFLOW1 pointer-map entry.
// clearCell never fails when nLocal==nPayload
if !(oldCell < (((*MemPage)(unsafe.Pointer(pPage)).FaData + uintptr((*MemPage)(unsafe.Pointer(pPage)).FhdrOffset)) + uintptr(10))) {
- goto __32
+ goto __36
}
- return Xsqlite3CorruptError(tls, 73845)
-__32:
+ return Xsqlite3CorruptError(tls, 74371)
+__36:
;
if !((oldCell + uintptr(*(*int32)(unsafe.Pointer(bp + 108 /* szNew */)))) > (*MemPage)(unsafe.Pointer(pPage)).FaDataEnd) {
- goto __33
+ goto __37
}
- return Xsqlite3CorruptError(tls, 73848)
-__33:
+ return Xsqlite3CorruptError(tls, 74374)
+__37:
;
libc.Xmemcpy(tls, oldCell, newCell, uint64(*(*int32)(unsafe.Pointer(bp + 108 /* szNew */))))
return SQLITE_OK
-__31:
+__35:
;
dropCell(tls, pPage, idx, int32((*CellInfo)(unsafe.Pointer(bp+112 /* &info1 */)).FnSize), bp+104 /* &rc */)
if !(*(*int32)(unsafe.Pointer(bp + 104 /* rc */)) != 0) {
- goto __34
+ goto __38
}
goto end_insert
-__34:
+__38:
;
- goto __28
-__27:
+ goto __30
+__29:
if !((*(*int32)(unsafe.Pointer(bp /* loc */)) < 0) && (int32((*MemPage)(unsafe.Pointer(pPage)).FnCell) > 0)) {
- goto __35
+ goto __39
}
idx = int32(libc.PreIncUint16(&(*BtCursor)(unsafe.Pointer(pCur)).Fix, 1))
*(*U8)(unsafe.Pointer(pCur + 1 /* &.curFlags */)) &= libc.Uint8FromInt32((libc.CplInt32(BTCF_ValidNKey)))
- goto __36
-__35:
+ goto __40
+__39:
;
-__36:
+__40:
;
-__28:
+__30:
;
insertCell(tls, pPage, idx, newCell, *(*int32)(unsafe.Pointer(bp + 108 /* szNew */)), uintptr(0), uint32(0), bp+104 /* &rc */)
@@ -50509,7 +52455,7 @@ __28:
// row without seeking the cursor. This can be a big performance boost.
(*BtCursor)(unsafe.Pointer(pCur)).Finfo.FnSize = U16(0)
if !((*MemPage)(unsafe.Pointer(pPage)).FnOverflow != 0) {
- goto __37
+ goto __41
}
*(*U8)(unsafe.Pointer(pCur + 1 /* &.curFlags */)) &= libc.Uint8FromInt32((libc.CplInt32(BTCF_ValidNKey)))
@@ -50522,30 +52468,30 @@ __28:
(*MemPage)(unsafe.Pointer((*BtCursor)(unsafe.Pointer(pCur)).FpPage)).FnOverflow = U8(0)
(*BtCursor)(unsafe.Pointer(pCur)).FeState = U8(CURSOR_INVALID)
if !(((flags & BTREE_SAVEPOSITION) != 0) && (*(*int32)(unsafe.Pointer(bp + 104 /* rc */)) == SQLITE_OK)) {
- goto __38
+ goto __42
}
btreeReleaseAllCursorPages(tls, pCur)
if !((*BtCursor)(unsafe.Pointer(pCur)).FpKeyInfo != 0) {
- goto __39
+ goto __43
}
(*BtCursor)(unsafe.Pointer(pCur)).FpKey = Xsqlite3Malloc(tls, uint64((*BtreePayload)(unsafe.Pointer(pX)).FnKey))
if !((*BtCursor)(unsafe.Pointer(pCur)).FpKey == uintptr(0)) {
- goto __40
+ goto __44
}
*(*int32)(unsafe.Pointer(bp + 104 /* rc */)) = SQLITE_NOMEM
- goto __41
-__40:
+ goto __45
+__44:
libc.Xmemcpy(tls, (*BtCursor)(unsafe.Pointer(pCur)).FpKey, (*BtreePayload)(unsafe.Pointer(pX)).FpKey, uint64((*BtreePayload)(unsafe.Pointer(pX)).FnKey))
-__41:
+__45:
;
-__39:
+__43:
;
(*BtCursor)(unsafe.Pointer(pCur)).FeState = U8(CURSOR_REQUIRESEEK)
(*BtCursor)(unsafe.Pointer(pCur)).FnKey = (*BtreePayload)(unsafe.Pointer(pX)).FnKey
-__38:
+__42:
;
-__37:
+__41:
;
end_insert:
@@ -50565,7 +52511,7 @@ end_insert:
// calling sqlite3BtreeInsert() with the BTREE_PREFORMAT flag specified.
//
// SQLITE_OK is returned if successful, or an SQLite error code otherwise.
-func Xsqlite3BtreeTransferRow(tls *libc.TLS, pDest uintptr, pSrc uintptr, iKey I64) int32 { /* sqlite3.c:73934:20: */
+func Xsqlite3BtreeTransferRow(tls *libc.TLS, pDest uintptr, pSrc uintptr, iKey I64) int32 { /* sqlite3.c:74460:20: */
bp := tls.Alloc(24)
defer tls.Free(24)
@@ -50592,7 +52538,7 @@ func Xsqlite3BtreeTransferRow(tls *libc.TLS, pDest uintptr, pSrc uintptr, iKey I
nIn = U32((*BtCursor)(unsafe.Pointer(pSrc)).Finfo.FnLocal)
aIn = (*BtCursor)(unsafe.Pointer(pSrc)).Finfo.FpPayload
if (aIn + uintptr(nIn)) > (*MemPage)(unsafe.Pointer((*BtCursor)(unsafe.Pointer(pSrc)).FpPage)).FaDataEnd {
- return Xsqlite3CorruptError(tls, 73948)
+ return Xsqlite3CorruptError(tls, 74474)
}
nRem = (*BtCursor)(unsafe.Pointer(pSrc)).Finfo.FnPayload
if (nIn == nRem) && (nIn < U32((*MemPage)(unsafe.Pointer((*BtCursor)(unsafe.Pointer(pDest)).FpPage)).FmaxLocal)) {
@@ -50615,7 +52561,7 @@ func Xsqlite3BtreeTransferRow(tls *libc.TLS, pDest uintptr, pSrc uintptr, iKey I
if nRem > nIn {
if ((aIn + uintptr(nIn)) + uintptr(4)) > (*MemPage)(unsafe.Pointer((*BtCursor)(unsafe.Pointer(pSrc)).FpPage)).FaDataEnd {
- return Xsqlite3CorruptError(tls, 73971)
+ return Xsqlite3CorruptError(tls, 74497)
}
ovflIn = Xsqlite3Get4byte(tls, ((*BtCursor)(unsafe.Pointer(pSrc)).Finfo.FpPayload + uintptr(nIn)))
}
@@ -50697,7 +52643,7 @@ func Xsqlite3BtreeTransferRow(tls *libc.TLS, pDest uintptr, pSrc uintptr, iKey I
// operation on non-FORDELETE cursors is tagged with the AUXDELETE flag.
// The BTREE_AUXDELETE bit is a hint that is not used by this implementation,
// but which might be used by alternative storage engines.
-func Xsqlite3BtreeDelete(tls *libc.TLS, pCur uintptr, flags U8) int32 { /* sqlite3.c:74044:20: */
+func Xsqlite3BtreeDelete(tls *libc.TLS, pCur uintptr, flags U8) int32 { /* sqlite3.c:74570:20: */
bp := tls.Alloc(28)
defer tls.Free(28)
@@ -50716,7 +52662,8 @@ func Xsqlite3BtreeDelete(tls *libc.TLS, pCur uintptr, flags U8) int32 { /* sqlit
if int32((*BtCursor)(unsafe.Pointer(pCur)).FeState) == CURSOR_REQUIRESEEK {
*(*int32)(unsafe.Pointer(bp + 24 /* rc */)) = btreeRestoreCursorPosition(tls, pCur)
- if *(*int32)(unsafe.Pointer(bp + 24 /* rc */)) != 0 {
+
+ if (*(*int32)(unsafe.Pointer(bp + 24 /* rc */)) != 0) || (int32((*BtCursor)(unsafe.Pointer(pCur)).FeState) != CURSOR_VALID) {
return *(*int32)(unsafe.Pointer(bp + 24 /* rc */))
}
}
@@ -50779,7 +52726,7 @@ func Xsqlite3BtreeDelete(tls *libc.TLS, pCur uintptr, flags U8) int32 { /* sqlit
// If this is a delete operation to remove a row from a table b-tree,
// invalidate any incrblob cursors open on the row being deleted.
- if (*BtCursor)(unsafe.Pointer(pCur)).FpKeyInfo == uintptr(0) {
+ if ((*BtCursor)(unsafe.Pointer(pCur)).FpKeyInfo == uintptr(0)) && ((*Btree)(unsafe.Pointer(p)).FhasIncrblobCur != 0) {
invalidateIncrblobCursors(tls, p, (*BtCursor)(unsafe.Pointer(pCur)).FpgnoRoot, (*BtCursor)(unsafe.Pointer(pCur)).Finfo.FnKey, 0)
}
@@ -50790,7 +52737,15 @@ func Xsqlite3BtreeDelete(tls *libc.TLS, pCur uintptr, flags U8) int32 { /* sqlit
if *(*int32)(unsafe.Pointer(bp + 24 /* rc */)) != 0 {
return *(*int32)(unsafe.Pointer(bp + 24 /* rc */))
}
- *(*int32)(unsafe.Pointer(bp + 24 /* rc */)) = clearCell(tls, pPage, pCell, bp /* &info */)
+ (*struct {
+ f func(*libc.TLS, uintptr, uintptr, uintptr)
+ })(unsafe.Pointer(&struct{ uintptr }{(*MemPage)(unsafe.Pointer(pPage)).FxParseCell})).f(tls, pPage, pCell, bp /* &info */)
+ if U32((*CellInfo)(unsafe.Pointer(bp /* &info */)).FnLocal) != (*CellInfo)(unsafe.Pointer(bp /* &info */)).FnPayload {
+ *(*int32)(unsafe.Pointer(bp + 24 /* rc */)) = clearCellOverflow(tls, pPage, pCell, bp /* &info */)
+ } else {
+ *(*int32)(unsafe.Pointer(bp + 24 /* rc */)) = SQLITE_OK
+ }
+
dropCell(tls, pPage, iCellIdx, int32((*CellInfo)(unsafe.Pointer(bp /* &info */)).FnSize), bp+24 /* &rc */)
if *(*int32)(unsafe.Pointer(bp + 24 /* rc */)) != 0 {
return *(*int32)(unsafe.Pointer(bp + 24 /* rc */))
@@ -50820,9 +52775,11 @@ func Xsqlite3BtreeDelete(tls *libc.TLS, pCur uintptr, flags U8) int32 { /* sqlit
}
pCell = ((*MemPage)(unsafe.Pointer((pLeaf))).FaData + uintptr((int32((*MemPage)(unsafe.Pointer((pLeaf))).FmaskPage) & ((int32(*(*U8)(unsafe.Pointer(((*MemPage)(unsafe.Pointer((pLeaf))).FaCellIdx + uintptr((2 * (int32((*MemPage)(unsafe.Pointer(pLeaf)).FnCell) - 1))))))) << 8) | int32(*(*U8)(unsafe.Pointer(((*MemPage)(unsafe.Pointer((pLeaf))).FaCellIdx + uintptr((2 * (int32((*MemPage)(unsafe.Pointer(pLeaf)).FnCell) - 1)))) + 1)))))))
if pCell < ((*MemPage)(unsafe.Pointer(pLeaf)).FaData + 4) {
- return Xsqlite3CorruptError(tls, 74154)
+ return Xsqlite3CorruptError(tls, 74681)
}
- nCell = int32((*(*func(*libc.TLS, uintptr, uintptr) U16)(unsafe.Pointer((pLeaf + 120 /* &.xCellSize */))))(tls, pLeaf, pCell))
+ nCell = int32((*struct {
+ f func(*libc.TLS, uintptr, uintptr) U16
+ })(unsafe.Pointer(&struct{ uintptr }{(*MemPage)(unsafe.Pointer(pLeaf)).FxCellSize})).f(tls, pLeaf, pCell))
pTmp = (*BtShared)(unsafe.Pointer(pBt)).FpTmpSpace
@@ -50895,7 +52852,7 @@ func Xsqlite3BtreeDelete(tls *libc.TLS, pCur uintptr, flags U8) int32 { /* sqlit
//
// BTREE_INTKEY|BTREE_LEAFDATA Used for SQL tables with rowid keys
// BTREE_ZERODATA Used for SQL indices
-func btreeCreateTable(tls *libc.TLS, p uintptr, piTable uintptr, createTabFlags int32) int32 { /* sqlite3.c:74228:12: */
+func btreeCreateTable(tls *libc.TLS, p uintptr, piTable uintptr, createTabFlags int32) int32 { /* sqlite3.c:74755:12: */
bp := tls.Alloc(44)
defer tls.Free(44)
@@ -50925,7 +52882,7 @@ func btreeCreateTable(tls *libc.TLS, p uintptr, piTable uintptr, createTabFlags
// created so far, so the new root-page is (meta[3]+1).
Xsqlite3BtreeGetMeta(tls, p, BTREE_LARGEST_ROOT_PAGE, bp /* &pgnoRoot */)
if *(*Pgno)(unsafe.Pointer(bp /* pgnoRoot */)) > btreePagecount(tls, pBt) {
- return Xsqlite3CorruptError(tls, 74262)
+ return Xsqlite3CorruptError(tls, 74789)
}
*(*Pgno)(unsafe.Pointer(bp /* pgnoRoot */))++
@@ -50968,7 +52925,7 @@ func btreeCreateTable(tls *libc.TLS, p uintptr, piTable uintptr, createTabFlags
}
*(*int32)(unsafe.Pointer(bp + 40 /* rc */)) = ptrmapGet(tls, pBt, *(*Pgno)(unsafe.Pointer(bp /* pgnoRoot */)), bp+32 /* &eType */, bp+36 /* &iPtrPage */)
if (int32(*(*U8)(unsafe.Pointer(bp + 32 /* eType */))) == PTRMAP_ROOTPAGE) || (int32(*(*U8)(unsafe.Pointer(bp + 32 /* eType */))) == PTRMAP_FREEPAGE) {
- *(*int32)(unsafe.Pointer(bp + 40 /* rc */)) = Xsqlite3CorruptError(tls, 74310)
+ *(*int32)(unsafe.Pointer(bp + 40 /* rc */)) = Xsqlite3CorruptError(tls, 74837)
}
if *(*int32)(unsafe.Pointer(bp + 40 /* rc */)) != SQLITE_OK {
releasePage(tls, *(*uintptr)(unsafe.Pointer(bp + 24 /* pRoot */)))
@@ -51031,7 +52988,7 @@ func btreeCreateTable(tls *libc.TLS, p uintptr, piTable uintptr, createTabFlags
return SQLITE_OK
}
-func Xsqlite3BtreeCreateTable(tls *libc.TLS, p uintptr, piTable uintptr, flags int32) int32 { /* sqlite3.c:74373:20: */
+func Xsqlite3BtreeCreateTable(tls *libc.TLS, p uintptr, piTable uintptr, flags int32) int32 { /* sqlite3.c:74900:20: */
var rc int32
Xsqlite3BtreeEnter(tls, p)
rc = btreeCreateTable(tls, p, piTable, flags)
@@ -51041,7 +52998,7 @@ func Xsqlite3BtreeCreateTable(tls *libc.TLS, p uintptr, piTable uintptr, flags i
// Erase the given database page and all its children. Return
// the page to the freelist.
-func clearDatabasePage(tls *libc.TLS, pBt uintptr, pgno Pgno, freePageFlag int32, pnChange uintptr) int32 { /* sqlite3.c:74385:12: */
+func clearDatabasePage(tls *libc.TLS, pBt uintptr, pgno Pgno, freePageFlag int32, pnChange uintptr) int32 { /* sqlite3.c:74912:12: */
bp := tls.Alloc(36)
defer tls.Free(36)
@@ -51057,7 +53014,7 @@ func clearDatabasePage(tls *libc.TLS, pBt uintptr, pgno Pgno, freePageFlag int32
if !(pgno > btreePagecount(tls, pBt)) {
goto __1
}
- return Xsqlite3CorruptError(tls, 74400)
+ return Xsqlite3CorruptError(tls, 74927)
__1:
;
*(*int32)(unsafe.Pointer(bp + 32 /* rc */)) = getAndInitPage(tls, pBt, pgno, bp /* &pPage */, uintptr(0), 0)
@@ -51070,7 +53027,7 @@ __2:
if !((*MemPage)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp /* pPage */)))).FbBusy != 0) {
goto __3
}
- *(*int32)(unsafe.Pointer(bp + 32 /* rc */)) = Xsqlite3CorruptError(tls, 74405)
+ *(*int32)(unsafe.Pointer(bp + 32 /* rc */)) = Xsqlite3CorruptError(tls, 74932)
goto cleardatabasepage_out
__3:
;
@@ -51094,12 +53051,24 @@ __8:
;
__7:
;
- *(*int32)(unsafe.Pointer(bp + 32 /* rc */)) = clearCell(tls, *(*uintptr)(unsafe.Pointer(bp /* pPage */)), pCell, bp+8 /* &info */)
- if !(*(*int32)(unsafe.Pointer(bp + 32 /* rc */)) != 0) {
+ (*struct {
+ f func(*libc.TLS, uintptr, uintptr, uintptr)
+ })(unsafe.Pointer(&struct{ uintptr }{(*MemPage)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp /* pPage */)))).FxParseCell})).f(tls, *(*uintptr)(unsafe.Pointer(bp /* pPage */)), pCell, bp+8 /* &info */)
+ if !(U32((*CellInfo)(unsafe.Pointer(bp+8 /* &info */)).FnLocal) != (*CellInfo)(unsafe.Pointer(bp+8 /* &info */)).FnPayload) {
goto __9
}
- goto cleardatabasepage_out
+ *(*int32)(unsafe.Pointer(bp + 32 /* rc */)) = clearCellOverflow(tls, *(*uintptr)(unsafe.Pointer(bp /* pPage */)), pCell, bp+8 /* &info */)
+ goto __10
__9:
+ *(*int32)(unsafe.Pointer(bp + 32 /* rc */)) = SQLITE_OK
+__10:
+ ;
+
+ if !(*(*int32)(unsafe.Pointer(bp + 32 /* rc */)) != 0) {
+ goto __11
+ }
+ goto cleardatabasepage_out
+__11:
;
goto __5
__5:
@@ -51109,39 +53078,37 @@ __5:
__6:
;
if !(!(int32((*MemPage)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp /* pPage */)))).Fleaf) != 0)) {
- goto __10
+ goto __12
}
*(*int32)(unsafe.Pointer(bp + 32 /* rc */)) = clearDatabasePage(tls, pBt, Xsqlite3Get4byte(tls, ((*MemPage)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp /* pPage */)))).FaData+uintptr((hdr+8)))), 1, pnChange)
if !(*(*int32)(unsafe.Pointer(bp + 32 /* rc */)) != 0) {
- goto __12
+ goto __13
}
goto cleardatabasepage_out
+__13:
+ ;
__12:
;
- goto __11
-__10:
if !(pnChange != 0) {
- goto __13
+ goto __14
}
*(*int32)(unsafe.Pointer(pnChange)) += (int32((*MemPage)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp /* pPage */)))).FnCell))
-__13:
- ;
-__11:
+__14:
;
if !(freePageFlag != 0) {
- goto __14
+ goto __15
}
freePage(tls, *(*uintptr)(unsafe.Pointer(bp /* pPage */)), bp+32 /* &rc */)
- goto __15
-__14:
+ goto __16
+__15:
if !((libc.AssignPtrInt32(bp+32 /* rc */, Xsqlite3PagerWrite(tls, (*MemPage)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp /* pPage */)))).FpDbPage))) == 0) {
- goto __16
+ goto __17
}
zeroPage(tls, *(*uintptr)(unsafe.Pointer(bp /* pPage */)), (int32(*(*U8)(unsafe.Pointer((*MemPage)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp /* pPage */)))).FaData + uintptr(hdr)))) | PTF_LEAF))
-__16:
+__17:
;
-__15:
+__16:
;
cleardatabasepage_out:
@@ -51158,10 +53125,9 @@ cleardatabasepage_out:
// read cursors on the table. Open write cursors are moved to the
// root of the table.
//
-// If pnChange is not NULL, then table iTable must be an intkey table. The
-// integer value pointed to by pnChange is incremented by the number of
-// entries in the table.
-func Xsqlite3BtreeClearTable(tls *libc.TLS, p uintptr, iTable int32, pnChange uintptr) int32 { /* sqlite3.c:74452:20: */
+// If pnChange is not NULL, then the integer value pointed to by pnChange
+// is incremented by the number of entries in the table.
+func Xsqlite3BtreeClearTable(tls *libc.TLS, p uintptr, iTable int32, pnChange uintptr) int32 { /* sqlite3.c:74978:20: */
var rc int32
var pBt uintptr = (*Btree)(unsafe.Pointer(p)).FpBt
Xsqlite3BtreeEnter(tls, p)
@@ -51172,7 +53138,9 @@ func Xsqlite3BtreeClearTable(tls *libc.TLS, p uintptr, iTable int32, pnChange ui
// Invalidate all incrblob cursors open on table iTable (assuming iTable
// is the root of a table b-tree - if it is not, the following call is
// a no-op).
- invalidateIncrblobCursors(tls, p, Pgno(iTable), int64(0), 1)
+ if (*Btree)(unsafe.Pointer(p)).FhasIncrblobCur != 0 {
+ invalidateIncrblobCursors(tls, p, Pgno(iTable), int64(0), 1)
+ }
rc = clearDatabasePage(tls, pBt, Pgno(iTable), 0, pnChange)
}
Xsqlite3BtreeLeave(tls, p)
@@ -51182,7 +53150,7 @@ func Xsqlite3BtreeClearTable(tls *libc.TLS, p uintptr, iTable int32, pnChange ui
// Delete all information from the single table that pCur is open on.
//
// This routine only work for pCur on an ephemeral table.
-func Xsqlite3BtreeClearTableOfCursor(tls *libc.TLS, pCur uintptr) int32 { /* sqlite3.c:74476:20: */
+func Xsqlite3BtreeClearTableOfCursor(tls *libc.TLS, pCur uintptr) int32 { /* sqlite3.c:75004:20: */
return Xsqlite3BtreeClearTable(tls, (*BtCursor)(unsafe.Pointer(pCur)).FpBtree, int32((*BtCursor)(unsafe.Pointer(pCur)).FpgnoRoot), uintptr(0))
}
@@ -51204,7 +53172,7 @@ func Xsqlite3BtreeClearTableOfCursor(tls *libc.TLS, pCur uintptr) int32 { /* sql
// the move. If no page gets moved, *piMoved is set to 0.
// The last root page is recorded in meta[3] and the value of
// meta[3] is updated by this procedure.
-func btreeDropTable(tls *libc.TLS, p uintptr, iTable Pgno, piMoved uintptr) int32 { /* sqlite3.c:74500:12: */
+func btreeDropTable(tls *libc.TLS, p uintptr, iTable Pgno, piMoved uintptr) int32 { /* sqlite3.c:75028:12: */
bp := tls.Alloc(24)
defer tls.Free(24)
@@ -51214,7 +53182,7 @@ func btreeDropTable(tls *libc.TLS, p uintptr, iTable Pgno, piMoved uintptr) int3
var pBt uintptr = (*Btree)(unsafe.Pointer(p)).FpBt
if iTable > btreePagecount(tls, pBt) {
- return Xsqlite3CorruptError(tls, 74509)
+ return Xsqlite3CorruptError(tls, 75037)
}
*(*int32)(unsafe.Pointer(bp + 12 /* rc */)) = btreeGetPage(tls, pBt, iTable, bp /* &pPage */, 0)
@@ -51286,7 +53254,7 @@ func btreeDropTable(tls *libc.TLS, p uintptr, iTable Pgno, piMoved uintptr) int3
return *(*int32)(unsafe.Pointer(bp + 12 /* rc */))
}
-func Xsqlite3BtreeDropTable(tls *libc.TLS, p uintptr, iTable int32, piMoved uintptr) int32 { /* sqlite3.c:74585:20: */
+func Xsqlite3BtreeDropTable(tls *libc.TLS, p uintptr, iTable int32, piMoved uintptr) int32 { /* sqlite3.c:75113:20: */
var rc int32
Xsqlite3BtreeEnter(tls, p)
rc = btreeDropTable(tls, p, uint32(iTable), piMoved)
@@ -51312,7 +53280,7 @@ func Xsqlite3BtreeDropTable(tls *libc.TLS, p uintptr, iTable int32, piMoved uint
// database file. It is a number computed by the pager. But its access
// pattern is the same as header meta values, and so it is convenient to
// read it from this routine.
-func Xsqlite3BtreeGetMeta(tls *libc.TLS, p uintptr, idx int32, pMeta uintptr) { /* sqlite3.c:74614:21: */
+func Xsqlite3BtreeGetMeta(tls *libc.TLS, p uintptr, idx int32, pMeta uintptr) { /* sqlite3.c:75142:21: */
var pBt uintptr = (*Btree)(unsafe.Pointer(p)).FpBt
Xsqlite3BtreeEnter(tls, p)
@@ -51331,7 +53299,7 @@ func Xsqlite3BtreeGetMeta(tls *libc.TLS, p uintptr, idx int32, pMeta uintptr) {
// Write meta-information back into the database. Meta[0] is
// read-only and may not be written.
-func Xsqlite3BtreeUpdateMeta(tls *libc.TLS, p uintptr, idx int32, iMeta U32) int32 { /* sqlite3.c:74644:20: */
+func Xsqlite3BtreeUpdateMeta(tls *libc.TLS, p uintptr, idx int32, iMeta U32) int32 { /* sqlite3.c:75172:20: */
var pBt uintptr = (*Btree)(unsafe.Pointer(p)).FpBt
var pP1 uintptr
var rc int32
@@ -51357,7 +53325,7 @@ func Xsqlite3BtreeUpdateMeta(tls *libc.TLS, p uintptr, idx int32, iMeta U32) int
// SQLITE_OK is returned if the operation is successfully executed.
// Otherwise, if an error is encountered (i.e. an IO error or database
// corruption) an SQLite error code is returned.
-func Xsqlite3BtreeCount(tls *libc.TLS, db uintptr, pCur uintptr, pnEntry uintptr) int32 { /* sqlite3.c:74676:20: */
+func Xsqlite3BtreeCount(tls *libc.TLS, db uintptr, pCur uintptr, pnEntry uintptr) int32 { /* sqlite3.c:75204:20: */
var nEntry I64 = int64(0) // Value to return in *pnEntry
var rc int32 // Return code
@@ -51420,12 +53388,12 @@ func Xsqlite3BtreeCount(tls *libc.TLS, db uintptr, pCur uintptr, pnEntry uintptr
// Return the pager associated with a BTree. This routine is used for
// testing and debugging only.
-func Xsqlite3BtreePager(tls *libc.TLS, p uintptr) uintptr { /* sqlite3.c:74745:22: */
+func Xsqlite3BtreePager(tls *libc.TLS, p uintptr) uintptr { /* sqlite3.c:75273:22: */
return (*BtShared)(unsafe.Pointer((*Btree)(unsafe.Pointer(p)).FpBt)).FpPager
}
// Append a message to the error message string.
-func checkAppendMsg(tls *libc.TLS, pCheck uintptr, zFormat uintptr, va uintptr) { /* sqlite3.c:74753:13: */
+func checkAppendMsg(tls *libc.TLS, pCheck uintptr, zFormat uintptr, va uintptr) { /* sqlite3.c:75281:13: */
bp := tls.Alloc(16)
defer tls.Free(16)
@@ -51438,7 +53406,7 @@ func checkAppendMsg(tls *libc.TLS, pCheck uintptr, zFormat uintptr, va uintptr)
(*IntegrityCk)(unsafe.Pointer(pCheck)).FnErr++
ap = va
if (*IntegrityCk)(unsafe.Pointer(pCheck)).FerrMsg.FnChar != 0 {
- Xsqlite3_str_append(tls, (pCheck + 56 /* &.errMsg */), ts+3040 /* "\n" */, 1)
+ Xsqlite3_str_append(tls, (pCheck + 56 /* &.errMsg */), ts+3171 /* "\n" */, 1)
}
if (*IntegrityCk)(unsafe.Pointer(pCheck)).FzPfx != 0 {
Xsqlite3_str_appendf(tls, (pCheck + 56 /* &.errMsg */), (*IntegrityCk)(unsafe.Pointer(pCheck)).FzPfx, libc.VaList(bp, (*IntegrityCk)(unsafe.Pointer(pCheck)).Fv1, (*IntegrityCk)(unsafe.Pointer(pCheck)).Fv2))
@@ -51452,13 +53420,13 @@ func checkAppendMsg(tls *libc.TLS, pCheck uintptr, zFormat uintptr, va uintptr)
// Return non-zero if the bit in the IntegrityCk.aPgRef[] array that
// corresponds to page iPg is already set.
-func getPageReferenced(tls *libc.TLS, pCheck uintptr, iPg Pgno) int32 { /* sqlite3.c:74783:12: */
+func getPageReferenced(tls *libc.TLS, pCheck uintptr, iPg Pgno) int32 { /* sqlite3.c:75311:12: */
return (int32(*(*U8)(unsafe.Pointer((*IntegrityCk)(unsafe.Pointer(pCheck)).FaPgRef + uintptr((iPg / Pgno(8)))))) & (int32(1) << (iPg & Pgno(0x07))))
}
// Set the bit in the IntegrityCk.aPgRef[] array that corresponds to page iPg.
-func setPageReferenced(tls *libc.TLS, pCheck uintptr, iPg Pgno) { /* sqlite3.c:74791:13: */
+func setPageReferenced(tls *libc.TLS, pCheck uintptr, iPg Pgno) { /* sqlite3.c:75319:13: */
*(*U8)(unsafe.Pointer((*IntegrityCk)(unsafe.Pointer(pCheck)).FaPgRef + uintptr((iPg / Pgno(8))))) |= U8((int32(1) << (iPg & Pgno(0x07))))
}
@@ -51469,16 +53437,16 @@ func setPageReferenced(tls *libc.TLS, pCheck uintptr, iPg Pgno) { /* sqlite3.c:7
// if this is the first reference to the page.
//
// Also check that the page number is in bounds.
-func checkRef(tls *libc.TLS, pCheck uintptr, iPage Pgno) int32 { /* sqlite3.c:74805:12: */
+func checkRef(tls *libc.TLS, pCheck uintptr, iPage Pgno) int32 { /* sqlite3.c:75333:12: */
bp := tls.Alloc(16)
defer tls.Free(16)
if (iPage > (*IntegrityCk)(unsafe.Pointer(pCheck)).FnPage) || (iPage == Pgno(0)) {
- checkAppendMsg(tls, pCheck, ts+3042 /* "invalid page num..." */, libc.VaList(bp, iPage))
+ checkAppendMsg(tls, pCheck, ts+3173 /* "invalid page num..." */, libc.VaList(bp, iPage))
return 1
}
if getPageReferenced(tls, pCheck, iPage) != 0 {
- checkAppendMsg(tls, pCheck, ts+3065 /* "2nd reference to..." */, libc.VaList(bp+8, iPage))
+ checkAppendMsg(tls, pCheck, ts+3196 /* "2nd reference to..." */, libc.VaList(bp+8, iPage))
return 1
}
if libc.AtomicLoadNInt32(((*IntegrityCk)(unsafe.Pointer(pCheck)).Fdb+400 /* &.u1 */ /* &.isInterrupted */), 0) != 0 {
@@ -51491,7 +53459,7 @@ func checkRef(tls *libc.TLS, pCheck uintptr, iPage Pgno) int32 { /* sqlite3.c:74
// Check that the entry in the pointer-map for page iChild maps to
// page iParent, pointer type ptrType. If not, append an error message
// to pCheck.
-func checkPtrmap(tls *libc.TLS, pCheck uintptr, iChild Pgno, eType U8, iParent Pgno) { /* sqlite3.c:74825:13: */
+func checkPtrmap(tls *libc.TLS, pCheck uintptr, iChild Pgno, eType U8, iParent Pgno) { /* sqlite3.c:75353:13: */
bp := tls.Alloc(56)
defer tls.Free(56)
@@ -51505,20 +53473,20 @@ func checkPtrmap(tls *libc.TLS, pCheck uintptr, iChild Pgno, eType U8, iParent P
if (rc == SQLITE_NOMEM) || (rc == (SQLITE_IOERR | (int32(12) << 8))) {
(*IntegrityCk)(unsafe.Pointer(pCheck)).FbOomFault = 1
}
- checkAppendMsg(tls, pCheck, ts+3090 /* "Failed to read p..." */, libc.VaList(bp, iChild))
+ checkAppendMsg(tls, pCheck, ts+3221 /* "Failed to read p..." */, libc.VaList(bp, iChild))
return
}
if (int32(*(*U8)(unsafe.Pointer(bp + 48 /* ePtrmapType */))) != int32(eType)) || (*(*Pgno)(unsafe.Pointer(bp + 52 /* iPtrmapParent */)) != iParent) {
checkAppendMsg(tls, pCheck,
- ts+3119, /* "Bad ptr map entr..." */
+ ts+3250, /* "Bad ptr map entr..." */
libc.VaList(bp+8, iChild, int32(eType), iParent, int32(*(*U8)(unsafe.Pointer(bp + 48 /* ePtrmapType */))), *(*Pgno)(unsafe.Pointer(bp + 52 /* iPtrmapParent */))))
}
}
// Check the integrity of the freelist or of an overflow page list.
// Verify that the number of pages on the list is N.
-func checkList(tls *libc.TLS, pCheck uintptr, isFreeList int32, iPage Pgno, N U32) { /* sqlite3.c:74854:13: */
+func checkList(tls *libc.TLS, pCheck uintptr, isFreeList int32, iPage Pgno, N U32) { /* sqlite3.c:75382:13: */
bp := tls.Alloc(48)
defer tls.Free(48)
@@ -51534,7 +53502,7 @@ func checkList(tls *libc.TLS, pCheck uintptr, isFreeList int32, iPage Pgno, N U3
}
N--
if Xsqlite3PagerGet(tls, (*IntegrityCk)(unsafe.Pointer(pCheck)).FpPager, iPage, bp+40 /* &pOvflPage */, 0) != 0 {
- checkAppendMsg(tls, pCheck, ts+3173 /* "failed to get pa..." */, libc.VaList(bp, iPage))
+ checkAppendMsg(tls, pCheck, ts+3304 /* "failed to get pa..." */, libc.VaList(bp, iPage))
break
}
pOvflData = Xsqlite3PagerGetData(tls, *(*uintptr)(unsafe.Pointer(bp + 40 /* pOvflPage */)))
@@ -51545,7 +53513,7 @@ func checkList(tls *libc.TLS, pCheck uintptr, isFreeList int32, iPage Pgno, N U3
}
if n > (((*BtShared)(unsafe.Pointer((*IntegrityCk)(unsafe.Pointer(pCheck)).FpBt)).FusableSize / U32(4)) - U32(2)) {
checkAppendMsg(tls, pCheck,
- ts+3195 /* "freelist leaf co..." */, libc.VaList(bp+8, iPage))
+ ts+3326 /* "freelist leaf co..." */, libc.VaList(bp+8, iPage))
N--
} else {
for i = 0; i < int32(n); i++ {
@@ -51571,12 +53539,12 @@ func checkList(tls *libc.TLS, pCheck uintptr, isFreeList int32, iPage Pgno, N U3
}
if (N != 0) && (nErrAtStart == (*IntegrityCk)(unsafe.Pointer(pCheck)).FnErr) {
checkAppendMsg(tls, pCheck,
- ts+3234, /* "%s is %d but sho..." */
+ ts+3365, /* "%s is %d but sho..." */
libc.VaList(bp+16, func() uintptr {
if isFreeList != 0 {
- return ts + 3260 /* "size" */
+ return ts + 3391 /* "size" */
}
- return ts + 3265 /* "overflow list le..." */
+ return ts + 3396 /* "overflow list le..." */
}(),
(expected-N), expected))
}
@@ -51602,7 +53570,7 @@ func checkList(tls *libc.TLS, pCheck uintptr, isFreeList int32, iPage Pgno, N U3
// entry represents the span of a cell or freeblock on a btree page.
// The upper 16 bits are the index of the first byte of a range and the
// lower 16 bits are the index of the last byte of that range.
-func btreeHeapInsert(tls *libc.TLS, aHeap uintptr, x U32) { /* sqlite3.c:74943:13: */
+func btreeHeapInsert(tls *libc.TLS, aHeap uintptr, x U32) { /* sqlite3.c:75471:13: */
var j U32
var i U32 = libc.PreIncUint32(&*(*U32)(unsafe.Pointer(aHeap)), 1)
*(*U32)(unsafe.Pointer(aHeap + uintptr(i)*4)) = x
@@ -51614,7 +53582,7 @@ func btreeHeapInsert(tls *libc.TLS, aHeap uintptr, x U32) { /* sqlite3.c:74943:1
}
}
-func btreeHeapPull(tls *libc.TLS, aHeap uintptr, pOut uintptr) int32 { /* sqlite3.c:74953:12: */
+func btreeHeapPull(tls *libc.TLS, aHeap uintptr, pOut uintptr) int32 { /* sqlite3.c:75481:12: */
var j U32
var i U32
var x U32
@@ -51653,7 +53621,7 @@ func btreeHeapPull(tls *libc.TLS, aHeap uintptr, pOut uintptr) int32 { /* sqlite
// 3. Check the integrity of overflow pages.
// 4. Recursively call checkTreePage on all children.
// 5. Verify that the depth of all children is the same.
-func checkTreePage(tls *libc.TLS, pCheck uintptr, iPage Pgno, piMinKey uintptr, maxKey I64) int32 { /* sqlite3.c:74987:12: */
+func checkTreePage(tls *libc.TLS, pCheck uintptr, iPage Pgno, piMinKey uintptr, maxKey I64) int32 { /* sqlite3.c:75515:12: */
bp := tls.Alloc(140)
defer tls.Free(140)
*(*I64)(unsafe.Pointer(bp + 104)) = maxKey
@@ -51720,13 +53688,13 @@ __1:
return 0
__2:
;
- (*IntegrityCk)(unsafe.Pointer(pCheck)).FzPfx = ts + 3286 /* "Page %u: " */
+ (*IntegrityCk)(unsafe.Pointer(pCheck)).FzPfx = ts + 3417 /* "Page %u: " */
(*IntegrityCk)(unsafe.Pointer(pCheck)).Fv1 = iPage
if !((libc.AssignInt32(&rc, btreeGetPage(tls, pBt, iPage, bp+96 /* &pPage */, 0))) != 0) {
goto __3
}
checkAppendMsg(tls, pCheck,
- ts+3296 /* "unable to get th..." */, libc.VaList(bp, rc))
+ ts+3427 /* "unable to get th..." */, libc.VaList(bp, rc))
goto end_of_check
__3:
;
@@ -51740,7 +53708,7 @@ __3:
}
// The only possible error from InitPage
checkAppendMsg(tls, pCheck,
- ts+3334 /* "btreeInitPage() ..." */, libc.VaList(bp+8, rc))
+ ts+3465 /* "btreeInitPage() ..." */, libc.VaList(bp+8, rc))
goto end_of_check
__4:
;
@@ -51748,7 +53716,7 @@ __4:
goto __5
}
- checkAppendMsg(tls, pCheck, ts+3372 /* "free space corru..." */, libc.VaList(bp+16, rc))
+ checkAppendMsg(tls, pCheck, ts+3503 /* "free space corru..." */, libc.VaList(bp+16, rc))
goto end_of_check
__5:
;
@@ -51756,7 +53724,7 @@ __5:
hdr = int32((*MemPage)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 96 /* pPage */)))).FhdrOffset)
// Set up for cell analysis
- (*IntegrityCk)(unsafe.Pointer(pCheck)).FzPfx = ts + 3394 /* "On tree page %u ..." */
+ (*IntegrityCk)(unsafe.Pointer(pCheck)).FzPfx = ts + 3525 /* "On tree page %u ..." */
contentOffset = (U32(((((int32(*(*U8)(unsafe.Pointer((data + uintptr((hdr + 5)))))) << 8) | int32(*(*U8)(unsafe.Pointer((data + uintptr((hdr + 5))) + 1)))) - 1) & 0xffff) + 1))
// Enforced by btreeInitPage()
@@ -51778,7 +53746,7 @@ __5:
if !((*BtShared)(unsafe.Pointer(pBt)).FautoVacuum != 0) {
goto __8
}
- (*IntegrityCk)(unsafe.Pointer(pCheck)).FzPfx = ts + 3420 /* "On page %u at ri..." */
+ (*IntegrityCk)(unsafe.Pointer(pCheck)).FzPfx = ts + 3551 /* "On page %u at ri..." */
checkPtrmap(tls, pCheck, uint32(pgno), uint8(PTRMAP_BTREE), iPage)
__8:
;
@@ -51809,18 +53777,20 @@ __9:
if !((pc < contentOffset) || (pc > (usableSize - U32(4)))) {
goto __12
}
- checkAppendMsg(tls, pCheck, ts+3448, /* "Offset %d out of..." */
+ checkAppendMsg(tls, pCheck, ts+3579, /* "Offset %d out of..." */
libc.VaList(bp+24, pc, contentOffset, (usableSize-U32(4))))
doCoverageCheck = 0
goto __10
__12:
;
pCell = (data + uintptr(pc))
- (*(*func(*libc.TLS, uintptr, uintptr, uintptr))(unsafe.Pointer((*(*uintptr)(unsafe.Pointer(bp + 96 /* pPage */)) + 128 /* &.xParseCell */))))(tls, *(*uintptr)(unsafe.Pointer(bp + 96 /* pPage */)), pCell, bp+112 /* &info */)
+ (*struct {
+ f func(*libc.TLS, uintptr, uintptr, uintptr)
+ })(unsafe.Pointer(&struct{ uintptr }{(*MemPage)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 96 /* pPage */)))).FxParseCell})).f(tls, *(*uintptr)(unsafe.Pointer(bp + 96 /* pPage */)), pCell, bp+112 /* &info */)
if !((pc + U32((*CellInfo)(unsafe.Pointer(bp+112 /* &info */)).FnSize)) > usableSize) {
goto __13
}
- checkAppendMsg(tls, pCheck, ts+3478 /* "Extends off end ..." */, 0)
+ checkAppendMsg(tls, pCheck, ts+3609 /* "Extends off end ..." */, 0)
doCoverageCheck = 0
goto __10
__13:
@@ -51838,7 +53808,7 @@ __13:
}() != 0) {
goto __15
}
- checkAppendMsg(tls, pCheck, ts+3502 /* "Rowid %lld out o..." */, libc.VaList(bp+48, (*CellInfo)(unsafe.Pointer(bp+112 /* &info */)).FnKey))
+ checkAppendMsg(tls, pCheck, ts+3633 /* "Rowid %lld out o..." */, libc.VaList(bp+48, (*CellInfo)(unsafe.Pointer(bp+112 /* &info */)).FnKey))
__15:
;
*(*I64)(unsafe.Pointer(bp + 104 /* maxKey */)) = (*CellInfo)(unsafe.Pointer(bp + 112 /* &info */)).FnKey
@@ -51879,7 +53849,7 @@ __20:
if !(d2 != depth) {
goto __21
}
- checkAppendMsg(tls, pCheck, ts+3526 /* "Child page depth..." */, 0)
+ checkAppendMsg(tls, pCheck, ts+3657 /* "Child page depth..." */, 0)
depth = d2
__21:
;
@@ -51917,7 +53887,9 @@ __24:
goto __26
}
pc = (U32((int32(*(*U8)(unsafe.Pointer((data + uintptr((cellStart + (i * 2))))))) << 8) | int32(*(*U8)(unsafe.Pointer((data + uintptr((cellStart + (i * 2)))) + 1)))))
- size = U32((*(*func(*libc.TLS, uintptr, uintptr) U16)(unsafe.Pointer((*(*uintptr)(unsafe.Pointer(bp + 96 /* pPage */)) + 120 /* &.xCellSize */))))(tls, *(*uintptr)(unsafe.Pointer(bp + 96 /* pPage */)), (data + uintptr(pc))))
+ size = U32((*struct {
+ f func(*libc.TLS, uintptr, uintptr) U16
+ })(unsafe.Pointer(&struct{ uintptr }{(*MemPage)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 96 /* pPage */)))).FxCellSize})).f(tls, *(*uintptr)(unsafe.Pointer(bp + 96 /* pPage */)), (data + uintptr(pc))))
btreeHeapInsert(tls, heap, ((pc << 16) | ((pc + size) - U32(1))))
goto __25
__25:
@@ -51977,7 +53949,7 @@ __29:
goto __31
}
checkAppendMsg(tls, pCheck,
- ts+3551 /* "Multiple uses fo..." */, libc.VaList(bp+56, (*(*U32)(unsafe.Pointer(bp + 136 /* x */))>>16), iPage))
+ ts+3682 /* "Multiple uses fo..." */, libc.VaList(bp+56, (*(*U32)(unsafe.Pointer(bp + 136 /* x */))>>16), iPage))
goto __30
goto __32
__31:
@@ -51997,7 +53969,7 @@ __30:
goto __33
}
checkAppendMsg(tls, pCheck,
- ts+3588, /* "Fragmentation of..." */
+ ts+3719, /* "Fragmentation of..." */
libc.VaList(bp+72, nFrag, int32(*(*U8)(unsafe.Pointer(data + uintptr((hdr + 7))))), iPage))
__33:
;
@@ -52038,7 +54010,7 @@ __34:
// since obviously it is not possible to know which pages are covered by
// the unverified btrees. Except, if aRoot[1] is 1, then the freelist
// checks are still performed.
-func Xsqlite3BtreeIntegrityCheck(tls *libc.TLS, db uintptr, p uintptr, aRoot uintptr, nRoot int32, mxErr int32, pnErr uintptr) uintptr { /* sqlite3.c:75266:21: */
+func Xsqlite3BtreeIntegrityCheck(tls *libc.TLS, db uintptr, p uintptr, aRoot uintptr, nRoot int32, mxErr int32, pnErr uintptr) uintptr { /* sqlite3.c:75794:21: */
bp := tls.Alloc(248)
defer tls.Free(248)
@@ -52047,7 +54019,7 @@ func Xsqlite3BtreeIntegrityCheck(tls *libc.TLS, db uintptr, p uintptr, aRoot uin
var pBt uintptr
var savedDbFlags U64
- // var zErr [100]int8 at bp+136, 100
+ // var zErr [100]uint8 at bp+136, 100
var bPartial int32 // True if not checking all btrees
var bCkFreelist int32
@@ -52088,7 +54060,7 @@ __1:
(*IntegrityCk)(unsafe.Pointer(bp + 32 /* &sCheck */)).Fv2 = 0
(*IntegrityCk)(unsafe.Pointer(bp + 32 /* &sCheck */)).FaPgRef = uintptr(0)
(*IntegrityCk)(unsafe.Pointer(bp + 32 /* &sCheck */)).Fheap = uintptr(0)
- Xsqlite3StrAccumInit(tls, (bp + 32 /* &sCheck */ + 56 /* &.errMsg */), uintptr(0), bp+136 /* &zErr[0] */, int32(unsafe.Sizeof([100]int8{})), SQLITE_MAX_LENGTH)
+ Xsqlite3StrAccumInit(tls, (bp + 32 /* &sCheck */ + 56 /* &.errMsg */), uintptr(0), bp+136 /* &zErr[0] */, int32(unsafe.Sizeof([100]uint8{})), SQLITE_MAX_LENGTH)
(*IntegrityCk)(unsafe.Pointer(bp + 32 /* &sCheck */)).FerrMsg.FprintfFlags = U8(SQLITE_PRINTF_INTERNAL)
if !((*IntegrityCk)(unsafe.Pointer(bp+32 /* &sCheck */)).FnPage == Pgno(0)) {
goto __3
@@ -52126,7 +54098,7 @@ __6:
if !(bCkFreelist != 0) {
goto __7
}
- (*IntegrityCk)(unsafe.Pointer(bp + 32 /* &sCheck */)).FzPfx = ts + 3640 /* "Main freelist: " */
+ (*IntegrityCk)(unsafe.Pointer(bp + 32 /* &sCheck */)).FzPfx = ts + 3771 /* "Main freelist: " */
checkList(tls, bp+32 /* &sCheck */, 1, Xsqlite3Get4byte(tls, ((*MemPage)(unsafe.Pointer((*BtShared)(unsafe.Pointer(pBt)).FpPage1)).FaData+32)),
Xsqlite3Get4byte(tls, ((*MemPage)(unsafe.Pointer((*BtShared)(unsafe.Pointer(pBt)).FpPage1)).FaData+36)))
(*IntegrityCk)(unsafe.Pointer(bp + 32 /* &sCheck */)).FzPfx = uintptr(0)
@@ -52164,7 +54136,7 @@ __13:
goto __15
}
checkAppendMsg(tls, bp+32, /* &sCheck */
- ts+3656, /* "max rootpage (%d..." */
+ ts+3787, /* "max rootpage (%d..." */
libc.VaList(bp, mx, mxInHdr))
__15:
;
@@ -52174,7 +54146,7 @@ __9:
goto __16
}
checkAppendMsg(tls, bp+32, /* &sCheck */
- ts+3701 /* "incremental_vacu..." */, 0)
+ ts+3832 /* "incremental_vacu..." */, 0)
__16:
;
__10:
@@ -52224,13 +54196,13 @@ __23:
if !((getPageReferenced(tls, bp+32 /* &sCheck */, i) == 0) && ((ptrmapPageno(tls, pBt, i) != i) || !(int32((*BtShared)(unsafe.Pointer(pBt)).FautoVacuum) != 0))) {
goto __26
}
- checkAppendMsg(tls, bp+32 /* &sCheck */, ts+3756 /* "Page %d is never..." */, libc.VaList(bp+16, i))
+ checkAppendMsg(tls, bp+32 /* &sCheck */, ts+3887 /* "Page %d is never..." */, libc.VaList(bp+16, i))
__26:
;
if !((getPageReferenced(tls, bp+32 /* &sCheck */, i) != 0) && ((ptrmapPageno(tls, pBt, i) == i) && ((*BtShared)(unsafe.Pointer(pBt)).FautoVacuum != 0))) {
goto __27
}
- checkAppendMsg(tls, bp+32 /* &sCheck */, ts+3778 /* "Pointer map page..." */, libc.VaList(bp+24, i))
+ checkAppendMsg(tls, bp+32 /* &sCheck */, ts+3909 /* "Pointer map page..." */, libc.VaList(bp+24, i))
__27:
;
goto __24
@@ -52272,7 +54244,7 @@ __29:
//
// The pager filename is invariant as long as the pager is
// open so it is safe to access without the BtShared mutex.
-func Xsqlite3BtreeGetFilename(tls *libc.TLS, p uintptr) uintptr { /* sqlite3.c:75421:27: */
+func Xsqlite3BtreeGetFilename(tls *libc.TLS, p uintptr) uintptr { /* sqlite3.c:75949:27: */
return Xsqlite3PagerFilename(tls, (*BtShared)(unsafe.Pointer((*Btree)(unsafe.Pointer(p)).FpBt)).FpPager, 1)
}
@@ -52283,14 +54255,14 @@ func Xsqlite3BtreeGetFilename(tls *libc.TLS, p uintptr) uintptr { /* sqlite3.c:7
//
// The pager journal filename is invariant as long as the pager is
// open so it is safe to access without the BtShared mutex.
-func Xsqlite3BtreeGetJournalname(tls *libc.TLS, p uintptr) uintptr { /* sqlite3.c:75434:27: */
+func Xsqlite3BtreeGetJournalname(tls *libc.TLS, p uintptr) uintptr { /* sqlite3.c:75962:27: */
return Xsqlite3PagerJournalname(tls, (*BtShared)(unsafe.Pointer((*Btree)(unsafe.Pointer(p)).FpBt)).FpPager)
}
// Return one of SQLITE_TXN_NONE, SQLITE_TXN_READ, or SQLITE_TXN_WRITE
// to describe the current transaction state of Btree p.
-func Xsqlite3BtreeTxnState(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:75443:20: */
+func Xsqlite3BtreeTxnState(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:75971:20: */
if p != 0 {
return int32((*Btree)(unsafe.Pointer(p)).FinTrans)
@@ -52304,7 +54276,7 @@ func Xsqlite3BtreeTxnState(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:75443:
// transaction on the shared-cache the argument Btree is connected to.
//
// Parameter eMode is one of SQLITE_CHECKPOINT_PASSIVE, FULL or RESTART.
-func Xsqlite3BtreeCheckpoint(tls *libc.TLS, p uintptr, eMode int32, pnLog uintptr, pnCkpt uintptr) int32 { /* sqlite3.c:75457:20: */
+func Xsqlite3BtreeCheckpoint(tls *libc.TLS, p uintptr, eMode int32, pnLog uintptr, pnCkpt uintptr) int32 { /* sqlite3.c:75985:20: */
var rc int32 = SQLITE_OK
if p != 0 {
var pBt uintptr = (*Btree)(unsafe.Pointer(p)).FpBt
@@ -52320,7 +54292,7 @@ func Xsqlite3BtreeCheckpoint(tls *libc.TLS, p uintptr, eMode int32, pnLog uintpt
}
// Return true if there is currently a backup running on Btree p.
-func Xsqlite3BtreeIsInBackup(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:75476:20: */
+func Xsqlite3BtreeIsInBackup(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:76004:20: */
return (libc.Bool32((*Btree)(unsafe.Pointer(p)).FnBackup != 0))
}
@@ -52343,7 +54315,7 @@ func Xsqlite3BtreeIsInBackup(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:7547
// xFree argument when the memory allocation was made is invoked on the
// blob of allocated memory. The xFree function should not call sqlite3_free()
// on the memory, the btree layer does that.
-func Xsqlite3BtreeSchema(tls *libc.TLS, p uintptr, nBytes int32, xFree uintptr) uintptr { /* sqlite3.c:75502:21: */
+func Xsqlite3BtreeSchema(tls *libc.TLS, p uintptr, nBytes int32, xFree uintptr) uintptr { /* sqlite3.c:76030:21: */
var pBt uintptr = (*Btree)(unsafe.Pointer(p)).FpBt
Xsqlite3BtreeEnter(tls, p)
if !(int32((*BtShared)(unsafe.Pointer(pBt)).FpSchema) != 0) && (nBytes != 0) {
@@ -52357,7 +54329,7 @@ func Xsqlite3BtreeSchema(tls *libc.TLS, p uintptr, nBytes int32, xFree uintptr)
// Return SQLITE_LOCKED_SHAREDCACHE if another user of the same shared
// btree as the argument handle holds an exclusive lock on the
// sqlite_schema table. Otherwise SQLITE_OK.
-func Xsqlite3BtreeSchemaLocked(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:75518:20: */
+func Xsqlite3BtreeSchemaLocked(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:76046:20: */
var rc int32
Xsqlite3BtreeEnter(tls, p)
@@ -52370,7 +54342,7 @@ func Xsqlite3BtreeSchemaLocked(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:75
// Obtain a lock on the table whose root page is iTab. The
// lock is a write lock if isWritelock is true or a read lock
// if it is false.
-func Xsqlite3BtreeLockTable(tls *libc.TLS, p uintptr, iTab int32, isWriteLock U8) int32 { /* sqlite3.c:75535:20: */
+func Xsqlite3BtreeLockTable(tls *libc.TLS, p uintptr, iTab int32, isWriteLock U8) int32 { /* sqlite3.c:76063:20: */
var rc int32 = SQLITE_OK
if (*Btree)(unsafe.Pointer(p)).Fsharable != 0 {
@@ -52394,7 +54366,7 @@ func Xsqlite3BtreeLockTable(tls *libc.TLS, p uintptr, iTab int32, isWriteLock U8
// change the length of the data stored. If this function is called with
// parameters that attempt to write past the end of the existing data,
// no modifications are made and SQLITE_CORRUPT is returned.
-func Xsqlite3BtreePutData(tls *libc.TLS, pCsr uintptr, offset U32, amt U32, z uintptr) int32 { /* sqlite3.c:75565:20: */
+func Xsqlite3BtreePutData(tls *libc.TLS, pCsr uintptr, offset U32, amt U32, z uintptr) int32 { /* sqlite3.c:76093:20: */
var rc int32
rc = func() int32 {
@@ -52434,7 +54406,7 @@ func Xsqlite3BtreePutData(tls *libc.TLS, pCsr uintptr, offset U32, amt U32, z ui
}
// Mark this cursor as an incremental blob cursor.
-func Xsqlite3BtreeIncrblobCursor(tls *libc.TLS, pCur uintptr) { /* sqlite3.c:75613:21: */
+func Xsqlite3BtreeIncrblobCursor(tls *libc.TLS, pCur uintptr) { /* sqlite3.c:76141:21: */
*(*U8)(unsafe.Pointer(pCur + 1 /* &.curFlags */)) |= U8((BTCF_Incrblob))
(*Btree)(unsafe.Pointer((*BtCursor)(unsafe.Pointer(pCur)).FpBtree)).FhasIncrblobCur = U8(1)
}
@@ -52442,7 +54414,7 @@ func Xsqlite3BtreeIncrblobCursor(tls *libc.TLS, pCur uintptr) { /* sqlite3.c:756
// Set both the "read version" (single byte at byte offset 18) and
// "write version" (single byte at byte offset 19) fields in the database
// header to iVersion.
-func Xsqlite3BtreeSetVersion(tls *libc.TLS, pBtree uintptr, iVersion int32) int32 { /* sqlite3.c:75624:20: */
+func Xsqlite3BtreeSetVersion(tls *libc.TLS, pBtree uintptr, iVersion int32) int32 { /* sqlite3.c:76152:20: */
var pBt uintptr = (*Btree)(unsafe.Pointer(pBtree)).FpBt
var rc int32 // Return code
@@ -52474,29 +54446,29 @@ func Xsqlite3BtreeSetVersion(tls *libc.TLS, pBtree uintptr, iVersion int32) int3
// Return true if the cursor has a hint specified. This routine is
// only used from within assert() statements
-func Xsqlite3BtreeCursorHasHint(tls *libc.TLS, pCsr uintptr, mask uint32) int32 { /* sqlite3.c:75659:20: */
+func Xsqlite3BtreeCursorHasHint(tls *libc.TLS, pCsr uintptr, mask uint32) int32 { /* sqlite3.c:76187:20: */
return (libc.Bool32((uint32((*BtCursor)(unsafe.Pointer(pCsr)).Fhints) & mask) != uint32(0)))
}
// Return true if the given Btree is read-only.
-func Xsqlite3BtreeIsReadonly(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:75666:20: */
+func Xsqlite3BtreeIsReadonly(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:76194:20: */
return (libc.Bool32((int32((*BtShared)(unsafe.Pointer((*Btree)(unsafe.Pointer(p)).FpBt)).FbtsFlags) & BTS_READ_ONLY) != 0))
}
// Return the size of the header added to each page by this module.
-func Xsqlite3HeaderSizeBtree(tls *libc.TLS) int32 { /* sqlite3.c:75673:20: */
+func Xsqlite3HeaderSizeBtree(tls *libc.TLS) int32 { /* sqlite3.c:76201:20: */
return (int32(((uint64(unsafe.Sizeof(MemPage{}))) + uint64(7)) & libc.Uint64FromInt32(libc.CplInt32(7))))
}
// Return true if the Btree passed as the only argument is sharable.
-func Xsqlite3BtreeSharable(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:75679:20: */
+func Xsqlite3BtreeSharable(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:76207:20: */
return int32((*Btree)(unsafe.Pointer(p)).Fsharable)
}
// Return the number of connections to the BtShared object accessed by
// the Btree handle passed as the only argument. For private caches
// this is always 1. For shared caches it may be 1 or greater.
-func Xsqlite3BtreeConnectionCount(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:75688:20: */
+func Xsqlite3BtreeConnectionCount(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:76216:20: */
return (*BtShared)(unsafe.Pointer((*Btree)(unsafe.Pointer(p)).FpBt)).FnRef
}
@@ -52536,7 +54508,7 @@ func Xsqlite3BtreeConnectionCount(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c
// If the "temp" database is requested, it may need to be opened by this
// function. If an error occurs while doing so, return 0 and write an
// error message to pErrorDb.
-func findBtree(tls *libc.TLS, pErrorDb uintptr, pDb uintptr, zDb uintptr) uintptr { /* sqlite3.c:75777:14: */
+func findBtree(tls *libc.TLS, pErrorDb uintptr, pDb uintptr, zDb uintptr) uintptr { /* sqlite3.c:76305:14: */
bp := tls.Alloc(424)
defer tls.Free(424)
@@ -52549,7 +54521,7 @@ func findBtree(tls *libc.TLS, pErrorDb uintptr, pDb uintptr, zDb uintptr) uintpt
libc.Xmemset(tls, bp+16 /* &sParse */, 0, uint64(unsafe.Sizeof(Parse{})))
(*Parse)(unsafe.Pointer(bp + 16 /* &sParse */)).Fdb = pDb
if Xsqlite3OpenTempDatabase(tls, bp+16 /* &sParse */) != 0 {
- Xsqlite3ErrorWithMsg(tls, pErrorDb, (*Parse)(unsafe.Pointer(bp+16 /* &sParse */)).Frc, ts+2718 /* "%s" */, libc.VaList(bp, (*Parse)(unsafe.Pointer(bp+16 /* &sParse */)).FzErrMsg))
+ Xsqlite3ErrorWithMsg(tls, pErrorDb, (*Parse)(unsafe.Pointer(bp+16 /* &sParse */)).Frc, ts+2790 /* "%s" */, libc.VaList(bp, (*Parse)(unsafe.Pointer(bp+16 /* &sParse */)).FzErrMsg))
rc = SQLITE_ERROR
}
Xsqlite3DbFree(tls, pErrorDb, (*Parse)(unsafe.Pointer(bp+16 /* &sParse */)).FzErrMsg)
@@ -52560,7 +54532,7 @@ func findBtree(tls *libc.TLS, pErrorDb uintptr, pDb uintptr, zDb uintptr) uintpt
}
if i < 0 {
- Xsqlite3ErrorWithMsg(tls, pErrorDb, SQLITE_ERROR, ts+3812 /* "unknown database..." */, libc.VaList(bp+8, zDb))
+ Xsqlite3ErrorWithMsg(tls, pErrorDb, SQLITE_ERROR, ts+3943 /* "unknown database..." */, libc.VaList(bp+8, zDb))
return uintptr(0)
}
@@ -52569,7 +54541,7 @@ func findBtree(tls *libc.TLS, pErrorDb uintptr, pDb uintptr, zDb uintptr) uintpt
// Attempt to set the page size of the destination to match the page size
// of the source.
-func setDestPgsz(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:75808:12: */
+func setDestPgsz(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:76336:12: */
var rc int32
rc = Xsqlite3BtreeSetPageSize(tls, (*Sqlite3_backup)(unsafe.Pointer(p)).FpDest, Xsqlite3BtreeGetPageSize(tls, (*Sqlite3_backup)(unsafe.Pointer(p)).FpSrc), 0, 0)
return rc
@@ -52579,9 +54551,9 @@ func setDestPgsz(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:75808:12: */
// second argument. If there is not, return SQLITE_OK. Otherwise, if there
// is an open read-transaction, return SQLITE_ERROR and leave an error
// message in database handle db.
-func checkReadTransaction(tls *libc.TLS, db uintptr, p uintptr) int32 { /* sqlite3.c:75820:12: */
+func checkReadTransaction(tls *libc.TLS, db uintptr, p uintptr) int32 { /* sqlite3.c:76348:12: */
if Xsqlite3BtreeTxnState(tls, p) != SQLITE_TXN_NONE {
- Xsqlite3ErrorWithMsg(tls, db, SQLITE_ERROR, ts+3832 /* "destination data..." */, 0)
+ Xsqlite3ErrorWithMsg(tls, db, SQLITE_ERROR, ts+3963 /* "destination data..." */, 0)
return SQLITE_ERROR
}
return SQLITE_OK
@@ -52593,7 +54565,7 @@ func checkReadTransaction(tls *libc.TLS, db uintptr, p uintptr) int32 { /* sqlit
//
// If an error occurs, NULL is returned and an error code and error message
// stored in database handle pDestDb.
-func Xsqlite3_backup_init(tls *libc.TLS, pDestDb uintptr, zDestDb uintptr, pSrcDb uintptr, zSrcDb uintptr) uintptr { /* sqlite3.c:75836:27: */
+func Xsqlite3_backup_init(tls *libc.TLS, pDestDb uintptr, zDestDb uintptr, pSrcDb uintptr, zSrcDb uintptr) uintptr { /* sqlite3.c:76364:27: */
var p uintptr // Value to return
// Lock the source database handle. The destination database
@@ -52608,7 +54580,7 @@ func Xsqlite3_backup_init(tls *libc.TLS, pDestDb uintptr, zDestDb uintptr, pSrcD
if pSrcDb == pDestDb {
Xsqlite3ErrorWithMsg(tls,
- pDestDb, SQLITE_ERROR, ts+3863 /* "source and desti..." */, 0)
+ pDestDb, SQLITE_ERROR, ts+3994 /* "source and desti..." */, 0)
p = uintptr(0)
} else {
// Allocate space for a new sqlite3_backup object...
@@ -52653,14 +54625,14 @@ func Xsqlite3_backup_init(tls *libc.TLS, pDestDb uintptr, zDestDb uintptr, pSrcD
// Argument rc is an SQLite error code. Return true if this error is
// considered fatal if encountered during a backup operation. All errors
// are considered fatal except for SQLITE_BUSY and SQLITE_LOCKED.
-func isFatalError(tls *libc.TLS, rc int32) int32 { /* sqlite3.c:75913:12: */
+func isFatalError(tls *libc.TLS, rc int32) int32 { /* sqlite3.c:76441:12: */
return (libc.Bool32(((rc != SQLITE_OK) && (rc != SQLITE_BUSY)) && (rc != SQLITE_LOCKED)))
}
// Parameter zSrcData points to a buffer containing the data for
// page iSrcPg from the source database. Copy this data into the
// destination database.
-func backupOnePage(tls *libc.TLS, p uintptr, iSrcPg Pgno, zSrcData uintptr, bUpdate int32) int32 { /* sqlite3.c:75922:12: */
+func backupOnePage(tls *libc.TLS, p uintptr, iSrcPg Pgno, zSrcData uintptr, bUpdate int32) int32 { /* sqlite3.c:76450:12: */
bp := tls.Alloc(8)
defer tls.Free(8)
@@ -52722,7 +54694,7 @@ func backupOnePage(tls *libc.TLS, p uintptr, iSrcPg Pgno, zSrcData uintptr, bUpd
//
// Return SQLITE_OK if everything is successful, or an SQLite error
// code if an error occurs.
-func backupTruncateFile(tls *libc.TLS, pFile uintptr, iSize I64) int32 { /* sqlite3.c:75991:12: */
+func backupTruncateFile(tls *libc.TLS, pFile uintptr, iSize I64) int32 { /* sqlite3.c:76519:12: */
bp := tls.Alloc(8)
defer tls.Free(8)
@@ -52737,7 +54709,7 @@ func backupTruncateFile(tls *libc.TLS, pFile uintptr, iSize I64) int32 { /* sqli
// Register this backup object with the associated source pager for
// callbacks when pages are changed or the cache invalidated.
-func attachBackupObject(tls *libc.TLS, p uintptr) { /* sqlite3.c:76004:13: */
+func attachBackupObject(tls *libc.TLS, p uintptr) { /* sqlite3.c:76532:13: */
var pp uintptr
pp = Xsqlite3PagerBackupPtr(tls, Xsqlite3BtreePager(tls, (*Sqlite3_backup)(unsafe.Pointer(p)).FpSrc))
@@ -52747,7 +54719,7 @@ func attachBackupObject(tls *libc.TLS, p uintptr) { /* sqlite3.c:76004:13: */
}
// Copy nPage pages from the source b-tree to the destination.
-func Xsqlite3_backup_step(tls *libc.TLS, p uintptr, nPage int32) int32 { /* sqlite3.c:76016:16: */
+func Xsqlite3_backup_step(tls *libc.TLS, p uintptr, nPage int32) int32 { /* sqlite3.c:76544:16: */
bp := tls.Alloc(32)
defer tls.Free(32)
@@ -52985,7 +54957,7 @@ func Xsqlite3_backup_step(tls *libc.TLS, p uintptr, nPage int32) int32 { /* sqli
}
// Release all resources associated with an sqlite3_backup* handle.
-func Xsqlite3_backup_finish(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:76270:16: */
+func Xsqlite3_backup_finish(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:76798:16: */
var pp uintptr // Ptr to head of pagers backup list
var pSrcDb uintptr // Source database connection
var rc int32 // Value to return
@@ -53043,13 +55015,13 @@ func Xsqlite3_backup_finish(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:76270
// Return the number of pages still to be backed up as of the most recent
// call to sqlite3_backup_step().
-func Xsqlite3_backup_remaining(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:76324:16: */
+func Xsqlite3_backup_remaining(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:76852:16: */
return int32((*Sqlite3_backup)(unsafe.Pointer(p)).FnRemaining)
}
// Return the total number of pages in the source database as of the most
// recent call to sqlite3_backup_step().
-func Xsqlite3_backup_pagecount(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:76338:16: */
+func Xsqlite3_backup_pagecount(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:76866:16: */
return int32((*Sqlite3_backup)(unsafe.Pointer(p)).FnPagecount)
}
@@ -53063,7 +55035,7 @@ func Xsqlite3_backup_pagecount(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:76
// It is assumed that the mutex associated with the BtShared object
// corresponding to the source database is held when this function is
// called.
-func backupUpdate(tls *libc.TLS, p uintptr, iPage Pgno, aData uintptr) { /* sqlite3.c:76360:29: */
+func backupUpdate(tls *libc.TLS, p uintptr, iPage Pgno, aData uintptr) { /* sqlite3.c:76888:29: */
for ok := true; ok; ok = ((libc.AssignUintptr(&p, (*Sqlite3_backup)(unsafe.Pointer(p)).FpNext)) != uintptr(0)) {
@@ -53084,7 +55056,7 @@ func backupUpdate(tls *libc.TLS, p uintptr, iPage Pgno, aData uintptr) { /* sqli
}
}
-func Xsqlite3BackupUpdate(tls *libc.TLS, pBackup uintptr, iPage Pgno, aData uintptr) { /* sqlite3.c:76385:21: */
+func Xsqlite3BackupUpdate(tls *libc.TLS, pBackup uintptr, iPage Pgno, aData uintptr) { /* sqlite3.c:76913:21: */
if pBackup != 0 {
backupUpdate(tls, pBackup, iPage, aData)
}
@@ -53099,7 +55071,7 @@ func Xsqlite3BackupUpdate(tls *libc.TLS, pBackup uintptr, iPage Pgno, aData uint
// It is assumed that the mutex associated with the BtShared object
// corresponding to the source database is held when this function is
// called.
-func Xsqlite3BackupRestart(tls *libc.TLS, pBackup uintptr) { /* sqlite3.c:76400:21: */
+func Xsqlite3BackupRestart(tls *libc.TLS, pBackup uintptr) { /* sqlite3.c:76928:21: */
var p uintptr // Iterator variable
for p = pBackup; p != 0; p = (*Sqlite3_backup)(unsafe.Pointer(p)).FpNext {
@@ -53113,7 +55085,7 @@ func Xsqlite3BackupRestart(tls *libc.TLS, pBackup uintptr) { /* sqlite3.c:76400:
// The size of file pTo may be reduced by this operation. If anything
// goes wrong, the transaction on pTo is rolled back. If successful, the
// transaction is committed before returning.
-func Xsqlite3BtreeCopyFile(tls *libc.TLS, pTo uintptr, pFrom uintptr) int32 { /* sqlite3.c:76417:20: */
+func Xsqlite3BtreeCopyFile(tls *libc.TLS, pTo uintptr, pFrom uintptr) int32 { /* sqlite3.c:76945:20: */
bp := tls.Alloc(80)
defer tls.Free(80)
@@ -53207,7 +55179,7 @@ copy_finished:
// Render a Mem object which is one of MEM_Int, MEM_Real, or MEM_IntReal
// into a buffer.
-func vdbeMemRenderNum(tls *libc.TLS, sz int32, zBuf uintptr, p uintptr) { /* sqlite3.c:76573:13: */
+func vdbeMemRenderNum(tls *libc.TLS, sz int32, zBuf uintptr, p uintptr) { /* sqlite3.c:77103:13: */
bp := tls.Alloc(48)
defer tls.Free(48)
@@ -53222,7 +55194,7 @@ func vdbeMemRenderNum(tls *libc.TLS, sz int32, zBuf uintptr, p uintptr) { /* sql
Xsqlite3Int64ToText(tls, *(*I64)(unsafe.Pointer(bp + 8 /* x */)), zBuf)
} else {
Xsqlite3StrAccumInit(tls, bp+16 /* &acc */, uintptr(0), zBuf, sz, 0)
- Xsqlite3_str_appendf(tls, bp+16 /* &acc */, ts+3903, /* "%!.15g" */
+ Xsqlite3_str_appendf(tls, bp+16 /* &acc */, ts+4034, /* "%!.15g" */
libc.VaList(bp, func() float64 {
if (int32((*Mem)(unsafe.Pointer(p)).Fflags) & MEM_IntReal) != 0 {
return float64(*(*I64)(unsafe.Pointer(p /* &.u */)))
@@ -53230,7 +55202,7 @@ func vdbeMemRenderNum(tls *libc.TLS, sz int32, zBuf uintptr, p uintptr) { /* sql
return *(*float64)(unsafe.Pointer(p /* &.u */))
}()))
- *(*int8)(unsafe.Pointer(zBuf + uintptr((*StrAccum)(unsafe.Pointer(bp+16 /* &acc */)).FnChar))) = int8(0) // Fast version of sqlite3StrAccumFinish(&acc)
+ *(*uint8)(unsafe.Pointer(zBuf + uintptr((*StrAccum)(unsafe.Pointer(bp+16 /* &acc */)).FnChar))) = uint8(0) // Fast version of sqlite3StrAccumFinish(&acc)
}
}
@@ -53245,7 +55217,7 @@ func vdbeMemRenderNum(tls *libc.TLS, sz int32, zBuf uintptr, p uintptr) { /* sql
// SQLITE_OK is returned if the conversion is successful (or not required).
// SQLITE_NOMEM may be returned if a malloc() fails during conversion
// between formats.
-func Xsqlite3VdbeChangeEncoding(tls *libc.TLS, pMem uintptr, desiredEnc int32) int32 { /* sqlite3.c:76666:20: */
+func Xsqlite3VdbeChangeEncoding(tls *libc.TLS, pMem uintptr, desiredEnc int32) int32 { /* sqlite3.c:77196:20: */
var rc int32
if !((int32((*Mem)(unsafe.Pointer(pMem)).Fflags) & MEM_Str) != 0) || (int32((*Mem)(unsafe.Pointer(pMem)).Fenc) == desiredEnc) {
@@ -53265,7 +55237,7 @@ func Xsqlite3VdbeChangeEncoding(tls *libc.TLS, pMem uintptr, desiredEnc int32) i
// pMem->z into the new allocation. pMem must be either a string or
// blob if bPreserve is true. If bPreserve is false, any prior content
// in pMem->z is discarded.
-func Xsqlite3VdbeMemGrow(tls *libc.TLS, pMem uintptr, n int32, bPreserve int32) int32 { /* sqlite3.c:76700:36: */
+func Xsqlite3VdbeMemGrow(tls *libc.TLS, pMem uintptr, n int32, bPreserve int32) int32 { /* sqlite3.c:77230:36: */
// If the bPreserve flag is set to true, then the memory cell must already
// contain a valid string or blob value.
@@ -53302,7 +55274,7 @@ func Xsqlite3VdbeMemGrow(tls *libc.TLS, pMem uintptr, n int32, bPreserve int32)
}
if (int32((*Mem)(unsafe.Pointer(pMem)).Fflags) & MEM_Dyn) != 0 {
- (*(*func(*libc.TLS, uintptr))(unsafe.Pointer((pMem + 48 /* &.xDel */))))(tls, (*Mem)(unsafe.Pointer(pMem)).Fz)
+ (*struct{ f func(*libc.TLS, uintptr) })(unsafe.Pointer(&struct{ uintptr }{(*Mem)(unsafe.Pointer(pMem)).FxDel})).f(tls, (*Mem)(unsafe.Pointer(pMem)).Fz)
}
(*Mem)(unsafe.Pointer(pMem)).Fz = (*Mem)(unsafe.Pointer(pMem)).FzMalloc
@@ -53321,7 +55293,7 @@ func Xsqlite3VdbeMemGrow(tls *libc.TLS, pMem uintptr, n int32, bPreserve int32)
//
// Return SQLITE_OK on success or an error code (probably SQLITE_NOMEM)
// if unable to complete the resizing.
-func Xsqlite3VdbeMemClearAndResize(tls *libc.TLS, pMem uintptr, szNew int32) int32 { /* sqlite3.c:76761:20: */
+func Xsqlite3VdbeMemClearAndResize(tls *libc.TLS, pMem uintptr, szNew int32) int32 { /* sqlite3.c:77293:20: */
if (*Mem)(unsafe.Pointer(pMem)).FszMalloc < szNew {
return Xsqlite3VdbeMemGrow(tls, pMem, szNew, 0)
@@ -53339,13 +55311,13 @@ func Xsqlite3VdbeMemClearAndResize(tls *libc.TLS, pMem uintptr, szNew int32) int
// to be a double-zero byte at an even byte boundary in order to
// terminate a UTF16 string, even if the initial size of the buffer
// is an odd number of bytes.
-func vdbeMemAddTerminator(tls *libc.TLS, pMem uintptr) int32 { /* sqlite3.c:76782:28: */
+func vdbeMemAddTerminator(tls *libc.TLS, pMem uintptr) int32 { /* sqlite3.c:77314:28: */
if Xsqlite3VdbeMemGrow(tls, pMem, ((*Mem)(unsafe.Pointer(pMem)).Fn+3), 1) != 0 {
return SQLITE_NOMEM
}
- *(*int8)(unsafe.Pointer((*Mem)(unsafe.Pointer(pMem)).Fz + uintptr((*Mem)(unsafe.Pointer(pMem)).Fn))) = int8(0)
- *(*int8)(unsafe.Pointer((*Mem)(unsafe.Pointer(pMem)).Fz + uintptr(((*Mem)(unsafe.Pointer(pMem)).Fn + 1)))) = int8(0)
- *(*int8)(unsafe.Pointer((*Mem)(unsafe.Pointer(pMem)).Fz + uintptr(((*Mem)(unsafe.Pointer(pMem)).Fn + 2)))) = int8(0)
+ *(*uint8)(unsafe.Pointer((*Mem)(unsafe.Pointer(pMem)).Fz + uintptr((*Mem)(unsafe.Pointer(pMem)).Fn))) = uint8(0)
+ *(*uint8)(unsafe.Pointer((*Mem)(unsafe.Pointer(pMem)).Fz + uintptr(((*Mem)(unsafe.Pointer(pMem)).Fn + 1)))) = uint8(0)
+ *(*uint8)(unsafe.Pointer((*Mem)(unsafe.Pointer(pMem)).Fz + uintptr(((*Mem)(unsafe.Pointer(pMem)).Fn + 2)))) = uint8(0)
*(*U16)(unsafe.Pointer(pMem + 8 /* &.flags */)) |= U16((MEM_Term))
return SQLITE_OK
}
@@ -53354,7 +55326,7 @@ func vdbeMemAddTerminator(tls *libc.TLS, pMem uintptr) int32 { /* sqlite3.c:7678
// MEM.zMalloc, where it can be safely written.
//
// Return SQLITE_OK on success or SQLITE_NOMEM if malloc fails.
-func Xsqlite3VdbeMemMakeWriteable(tls *libc.TLS, pMem uintptr) int32 { /* sqlite3.c:76799:20: */
+func Xsqlite3VdbeMemMakeWriteable(tls *libc.TLS, pMem uintptr) int32 { /* sqlite3.c:77331:20: */
if (int32((*Mem)(unsafe.Pointer(pMem)).Fflags) & (MEM_Str | MEM_Blob)) != 0 {
if func() int32 {
@@ -53379,7 +55351,7 @@ func Xsqlite3VdbeMemMakeWriteable(tls *libc.TLS, pMem uintptr) int32 { /* sqlite
// If the given Mem* has a zero-filled tail, turn it into an ordinary
// blob stored in dynamically allocated space.
-func Xsqlite3VdbeMemExpandBlob(tls *libc.TLS, pMem uintptr) int32 { /* sqlite3.c:76822:20: */
+func Xsqlite3VdbeMemExpandBlob(tls *libc.TLS, pMem uintptr) int32 { /* sqlite3.c:77354:20: */
var nByte int32
// Set nByte to the number of bytes required to store the expanded blob.
@@ -53401,7 +55373,7 @@ func Xsqlite3VdbeMemExpandBlob(tls *libc.TLS, pMem uintptr) int32 { /* sqlite3.c
}
// Make sure the given Mem is \u0000 terminated.
-func Xsqlite3VdbeMemNulTerminate(tls *libc.TLS, pMem uintptr) int32 { /* sqlite3.c:76850:20: */
+func Xsqlite3VdbeMemNulTerminate(tls *libc.TLS, pMem uintptr) int32 { /* sqlite3.c:77382:20: */
if (int32((*Mem)(unsafe.Pointer(pMem)).Fflags) & (MEM_Term | MEM_Str)) != MEM_Str {
return SQLITE_OK // Nothing to do
@@ -53423,7 +55395,7 @@ func Xsqlite3VdbeMemNulTerminate(tls *libc.TLS, pMem uintptr) int32 { /* sqlite3
// sqlite3_value_text()), or for ensuring that values to be used as btree
// keys are strings. In the former case a NULL pointer is returned the
// user and the latter is an internal programming error.
-func Xsqlite3VdbeMemStringify(tls *libc.TLS, pMem uintptr, enc U8, bForce U8) int32 { /* sqlite3.c:76875:20: */
+func Xsqlite3VdbeMemStringify(tls *libc.TLS, pMem uintptr, enc U8, bForce U8) int32 { /* sqlite3.c:77407:20: */
var nByte int32 = 32
if Xsqlite3VdbeMemClearAndResize(tls, pMem, nByte) != 0 {
@@ -53449,7 +55421,7 @@ func Xsqlite3VdbeMemStringify(tls *libc.TLS, pMem uintptr, enc U8, bForce U8) in
//
// Return SQLITE_ERROR if the finalizer reports an error. SQLITE_OK
// otherwise.
-func Xsqlite3VdbeMemFinalize(tls *libc.TLS, pMem uintptr, pFunc uintptr) int32 { /* sqlite3.c:76909:20: */
+func Xsqlite3VdbeMemFinalize(tls *libc.TLS, pMem uintptr, pFunc uintptr) int32 { /* sqlite3.c:77441:20: */
bp := tls.Alloc(112)
defer tls.Free(112)
@@ -53464,7 +55436,7 @@ func Xsqlite3VdbeMemFinalize(tls *libc.TLS, pMem uintptr, pFunc uintptr) int32 {
(*Sqlite3_context)(unsafe.Pointer(bp /* &ctx */)).FpOut = bp + 56 /* &t */
(*Sqlite3_context)(unsafe.Pointer(bp /* &ctx */)).FpMem = pMem
(*Sqlite3_context)(unsafe.Pointer(bp /* &ctx */)).FpFunc = pFunc
- (*(*func(*libc.TLS, uintptr))(unsafe.Pointer((pFunc + 32 /* &.xFinalize */))))(tls, bp /* &ctx */) // IMP: R-24505-23230
+ (*struct{ f func(*libc.TLS, uintptr) })(unsafe.Pointer(&struct{ uintptr }{(*FuncDef)(unsafe.Pointer(pFunc)).FxFinalize})).f(tls, bp /* &ctx */) // IMP: R-24505-23230
if (*Mem)(unsafe.Pointer(pMem)).FszMalloc > 0 {
Xsqlite3DbFreeNN(tls, (*Mem)(unsafe.Pointer(pMem)).Fdb, (*Mem)(unsafe.Pointer(pMem)).FzMalloc)
@@ -53479,7 +55451,7 @@ func Xsqlite3VdbeMemFinalize(tls *libc.TLS, pMem uintptr, pFunc uintptr) int32 {
//
// SQLITE_ERROR is returned if xValue() reports an error. SQLITE_OK
// otherwise.
-func Xsqlite3VdbeMemAggValue(tls *libc.TLS, pAccum uintptr, pOut uintptr, pFunc uintptr) int32 { /* sqlite3.c:76939:20: */
+func Xsqlite3VdbeMemAggValue(tls *libc.TLS, pAccum uintptr, pOut uintptr, pFunc uintptr) int32 { /* sqlite3.c:77471:20: */
bp := tls.Alloc(56)
defer tls.Free(56)
@@ -53490,7 +55462,7 @@ func Xsqlite3VdbeMemAggValue(tls *libc.TLS, pAccum uintptr, pOut uintptr, pFunc
(*Sqlite3_context)(unsafe.Pointer(bp /* &ctx */)).FpOut = pOut
(*Sqlite3_context)(unsafe.Pointer(bp /* &ctx */)).FpMem = pAccum
(*Sqlite3_context)(unsafe.Pointer(bp /* &ctx */)).FpFunc = pFunc
- (*(*func(*libc.TLS, uintptr))(unsafe.Pointer((pFunc + 40 /* &.xValue */))))(tls, bp /* &ctx */)
+ (*struct{ f func(*libc.TLS, uintptr) })(unsafe.Pointer(&struct{ uintptr }{(*FuncDef)(unsafe.Pointer(pFunc)).FxValue})).f(tls, bp /* &ctx */)
return (*Sqlite3_context)(unsafe.Pointer(bp /* &ctx */)).FisError
}
@@ -53501,7 +55473,7 @@ func Xsqlite3VdbeMemAggValue(tls *libc.TLS, pAccum uintptr, pOut uintptr, pFunc
// This is a helper routine for sqlite3VdbeMemSetNull() and
// for sqlite3VdbeMemRelease(). Use those other routines as the
// entry point for releasing Mem resources.
-func vdbeMemClearExternAndSetNull(tls *libc.TLS, p uintptr) { /* sqlite3.c:76964:29: */
+func vdbeMemClearExternAndSetNull(tls *libc.TLS, p uintptr) { /* sqlite3.c:77496:29: */
if (int32((*Mem)(unsafe.Pointer(p)).Fflags) & MEM_Agg) != 0 {
Xsqlite3VdbeMemFinalize(tls, p, *(*uintptr)(unsafe.Pointer(p /* &.u */)))
@@ -53509,7 +55481,7 @@ func vdbeMemClearExternAndSetNull(tls *libc.TLS, p uintptr) { /* sqlite3.c:76964
}
if (int32((*Mem)(unsafe.Pointer(p)).Fflags) & MEM_Dyn) != 0 {
- (*(*func(*libc.TLS, uintptr))(unsafe.Pointer((p + 48 /* &.xDel */))))(tls, (*Mem)(unsafe.Pointer(p)).Fz)
+ (*struct{ f func(*libc.TLS, uintptr) })(unsafe.Pointer(&struct{ uintptr }{(*Mem)(unsafe.Pointer(p)).FxDel})).f(tls, (*Mem)(unsafe.Pointer(p)).Fz)
}
(*Mem)(unsafe.Pointer(p)).Fflags = U16(MEM_Null)
}
@@ -53520,7 +55492,7 @@ func vdbeMemClearExternAndSetNull(tls *libc.TLS, p uintptr) { /* sqlite3.c:76964
// This is a helper routine invoked by sqlite3VdbeMemRelease() in
// the unusual case where there really is memory in p that needs
// to be freed.
-func vdbeMemClear(tls *libc.TLS, p uintptr) { /* sqlite3.c:76987:29: */
+func vdbeMemClear(tls *libc.TLS, p uintptr) { /* sqlite3.c:77519:29: */
if (int32((*Mem)(unsafe.Pointer((p))).Fflags) & (MEM_Agg | MEM_Dyn)) != 0 {
vdbeMemClearExternAndSetNull(tls, p)
}
@@ -53539,7 +55511,7 @@ func vdbeMemClear(tls *libc.TLS, p uintptr) { /* sqlite3.c:76987:29: */
//
// Use sqlite3VdbeMemSetNull() to release just the Mem.xDel space
// prior to inserting new content into the Mem.
-func Xsqlite3VdbeMemRelease(tls *libc.TLS, p uintptr) { /* sqlite3.c:77008:21: */
+func Xsqlite3VdbeMemRelease(tls *libc.TLS, p uintptr) { /* sqlite3.c:77540:21: */
if ((int32((*Mem)(unsafe.Pointer((p))).Fflags) & (MEM_Agg | MEM_Dyn)) != 0) || ((*Mem)(unsafe.Pointer(p)).FszMalloc != 0) {
vdbeMemClear(tls, p)
@@ -53549,7 +55521,7 @@ func Xsqlite3VdbeMemRelease(tls *libc.TLS, p uintptr) { /* sqlite3.c:77008:21: *
// Convert a 64-bit IEEE double into a 64-bit signed integer.
// If the double is out of range of a 64-bit signed integer then
// return the closest available 64-bit signed integer.
-func doubleToInt64(tls *libc.TLS, r float64) I64 { /* sqlite3.c:77020:28: */
+func doubleToInt64(tls *libc.TLS, r float64) I64 { /* sqlite3.c:77552:28: */
if r <= float64(minInt) {
return minInt
@@ -53561,8 +55533,8 @@ func doubleToInt64(tls *libc.TLS, r float64) I64 { /* sqlite3.c:77020:28: */
return I64(0)
}
-var maxInt I64 = (int64(0xffffffff) | (I64((int64(0x7fffffff))) << 32)) /* sqlite3.c:77032:20 */
-var minInt I64 = ((int64(-1)) - (int64(0xffffffff) | (I64((int64(0x7fffffff))) << 32))) /* sqlite3.c:77033:20 */
+var maxInt I64 = (int64(0xffffffff) | (I64((int64(0x7fffffff))) << 32)) /* sqlite3.c:77564:20 */
+var minInt I64 = ((int64(-1)) - (int64(0xffffffff) | (I64((int64(0x7fffffff))) << 32))) /* sqlite3.c:77565:20 */
// Return some kind of integer value which is the best we can do
// at representing the value that *pMem describes as an integer.
@@ -53573,7 +55545,7 @@ var minInt I64 = ((int64(-1)) - (int64(0xffffffff) | (I64((int64(0x7fffffff))) <
// an SQL-NULL value, return 0.
//
// If pMem represents a string value, its encoding might be changed.
-func memIntValue(tls *libc.TLS, pMem uintptr) I64 { /* sqlite3.c:77056:28: */
+func memIntValue(tls *libc.TLS, pMem uintptr) I64 { /* sqlite3.c:77588:28: */
bp := tls.Alloc(8)
defer tls.Free(8)
@@ -53582,7 +55554,7 @@ func memIntValue(tls *libc.TLS, pMem uintptr) I64 { /* sqlite3.c:77056:28: */
return *(*I64)(unsafe.Pointer(bp /* value */))
}
-func Xsqlite3VdbeIntValue(tls *libc.TLS, pMem uintptr) I64 { /* sqlite3.c:77061:20: */
+func Xsqlite3VdbeIntValue(tls *libc.TLS, pMem uintptr) I64 { /* sqlite3.c:77593:20: */
var flags int32
flags = int32((*Mem)(unsafe.Pointer(pMem)).Fflags)
@@ -53603,7 +55575,7 @@ func Xsqlite3VdbeIntValue(tls *libc.TLS, pMem uintptr) I64 { /* sqlite3.c:77061:
// double. If pMem is already a double or an integer, return its
// value. If it is a string or blob, try to convert it to a double.
// If it is a NULL, return 0.0.
-func memRealValue(tls *libc.TLS, pMem uintptr) float64 { /* sqlite3.c:77084:31: */
+func memRealValue(tls *libc.TLS, pMem uintptr) float64 { /* sqlite3.c:77616:31: */
bp := tls.Alloc(8)
defer tls.Free(8)
@@ -53613,7 +55585,7 @@ func memRealValue(tls *libc.TLS, pMem uintptr) float64 { /* sqlite3.c:77084:31:
return *(*float64)(unsafe.Pointer(bp /* val */))
}
-func Xsqlite3VdbeRealValue(tls *libc.TLS, pMem uintptr) float64 { /* sqlite3.c:77090:23: */
+func Xsqlite3VdbeRealValue(tls *libc.TLS, pMem uintptr) float64 { /* sqlite3.c:77622:23: */
if (int32((*Mem)(unsafe.Pointer(pMem)).Fflags) & MEM_Real) != 0 {
return *(*float64)(unsafe.Pointer(pMem /* &.u */))
@@ -53631,7 +55603,7 @@ func Xsqlite3VdbeRealValue(tls *libc.TLS, pMem uintptr) float64 { /* sqlite3.c:7
// Return 1 if pMem represents true, and return 0 if pMem represents false.
// Return the value ifNull if pMem is NULL.
-func Xsqlite3VdbeBooleanValue(tls *libc.TLS, pMem uintptr, ifNull int32) int32 { /* sqlite3.c:77110:20: */
+func Xsqlite3VdbeBooleanValue(tls *libc.TLS, pMem uintptr, ifNull int32) int32 { /* sqlite3.c:77642:20: */
if (int32((*Mem)(unsafe.Pointer(pMem)).Fflags) & (MEM_Int | MEM_IntReal)) != 0 {
return (libc.Bool32(*(*I64)(unsafe.Pointer(pMem /* &.u */)) != int64(0)))
@@ -53644,7 +55616,7 @@ func Xsqlite3VdbeBooleanValue(tls *libc.TLS, pMem uintptr, ifNull int32) int32 {
// The MEM structure is already a MEM_Real. Try to also make it a
// MEM_Int if we can.
-func Xsqlite3VdbeIntegerAffinity(tls *libc.TLS, pMem uintptr) { /* sqlite3.c:77121:21: */
+func Xsqlite3VdbeIntegerAffinity(tls *libc.TLS, pMem uintptr) { /* sqlite3.c:77653:21: */
var ix I64
ix = doubleToInt64(tls, *(*float64)(unsafe.Pointer(pMem /* &.u */)))
@@ -53665,7 +55637,7 @@ func Xsqlite3VdbeIntegerAffinity(tls *libc.TLS, pMem uintptr) { /* sqlite3.c:771
}
// Convert pMem to type integer. Invalidate any prior representations.
-func Xsqlite3VdbeMemIntegerify(tls *libc.TLS, pMem uintptr) int32 { /* sqlite3.c:77149:20: */
+func Xsqlite3VdbeMemIntegerify(tls *libc.TLS, pMem uintptr) int32 { /* sqlite3.c:77681:20: */
*(*I64)(unsafe.Pointer(pMem /* &.u */)) = Xsqlite3VdbeIntValue(tls, pMem)
(*Mem)(unsafe.Pointer(pMem)).Fflags = (U16((int32((*Mem)(unsafe.Pointer((pMem))).Fflags) & libc.CplInt32((MEM_TypeMask | MEM_Zero))) | MEM_Int))
@@ -53674,7 +55646,7 @@ func Xsqlite3VdbeMemIntegerify(tls *libc.TLS, pMem uintptr) int32 { /* sqlite3.c
// Convert pMem so that it is of type MEM_Real.
// Invalidate any prior representations.
-func Xsqlite3VdbeMemRealify(tls *libc.TLS, pMem uintptr) int32 { /* sqlite3.c:77163:20: */
+func Xsqlite3VdbeMemRealify(tls *libc.TLS, pMem uintptr) int32 { /* sqlite3.c:77695:20: */
*(*float64)(unsafe.Pointer(pMem /* &.u */)) = Xsqlite3VdbeRealValue(tls, pMem)
(*Mem)(unsafe.Pointer(pMem)).Fflags = (U16((int32((*Mem)(unsafe.Pointer((pMem))).Fflags) & libc.CplInt32((MEM_TypeMask | MEM_Zero))) | MEM_Real))
@@ -53689,7 +55661,7 @@ func Xsqlite3VdbeMemRealify(tls *libc.TLS, pMem uintptr) int32 { /* sqlite3.c:77
// For some versions of GCC on 32-bit machines, if you do the more obvious
// comparison of "r1==(double)i" you sometimes get an answer of false even
// though the r1 and (double)i values are bit-for-bit the same.
-func Xsqlite3RealSameAsInt(tls *libc.TLS, r1 float64, i Sqlite3_int64) int32 { /* sqlite3.c:77181:20: */
+func Xsqlite3RealSameAsInt(tls *libc.TLS, r1 float64, i Sqlite3_int64) int32 { /* sqlite3.c:77713:20: */
bp := tls.Alloc(16)
defer tls.Free(16)
*(*float64)(unsafe.Pointer(bp)) = r1
@@ -53706,7 +55678,7 @@ func Xsqlite3RealSameAsInt(tls *libc.TLS, r1 float64, i Sqlite3_int64) int32 { /
// Every effort is made to force the conversion, even if the input
// is a string that does not look completely like a number. Convert
// as much of the string as we can and ignore the rest.
-func Xsqlite3VdbeMemNumerify(tls *libc.TLS, pMem uintptr) int32 { /* sqlite3.c:77196:20: */
+func Xsqlite3VdbeMemNumerify(tls *libc.TLS, pMem uintptr) int32 { /* sqlite3.c:77728:20: */
bp := tls.Alloc(8)
defer tls.Free(8)
@@ -53716,7 +55688,7 @@ func Xsqlite3VdbeMemNumerify(tls *libc.TLS, pMem uintptr) int32 { /* sqlite3.c:7
rc = Xsqlite3AtoF(tls, (*Mem)(unsafe.Pointer(pMem)).Fz, (pMem /* &.u */ /* &.r */), (*Mem)(unsafe.Pointer(pMem)).Fn, (*Mem)(unsafe.Pointer(pMem)).Fenc)
if (((rc == 0) || (rc == 1)) && (Xsqlite3Atoi64(tls, (*Mem)(unsafe.Pointer(pMem)).Fz, bp /* &ix */, (*Mem)(unsafe.Pointer(pMem)).Fn, (*Mem)(unsafe.Pointer(pMem)).Fenc) <= 1)) ||
- (Xsqlite3RealSameAsInt(tls, *(*float64)(unsafe.Pointer(pMem /* &.u */)), libc.AssignPtrInt64(bp /* ix */, I64(*(*float64)(unsafe.Pointer(pMem /* &.u */))))) != 0) {
+ (Xsqlite3RealSameAsInt(tls, *(*float64)(unsafe.Pointer(pMem /* &.u */)), libc.AssignPtrInt64(bp /* ix */, libc.Int64FromFloat64(*(*float64)(unsafe.Pointer(pMem /* &.u */))))) != 0) {
*(*I64)(unsafe.Pointer(pMem /* &.u */)) = *(*Sqlite3_int64)(unsafe.Pointer(bp /* ix */))
(*Mem)(unsafe.Pointer(pMem)).Fflags = (U16((int32((*Mem)(unsafe.Pointer((pMem))).Fflags) & libc.CplInt32((MEM_TypeMask | MEM_Zero))) | MEM_Int))
} else {
@@ -53733,7 +55705,7 @@ func Xsqlite3VdbeMemNumerify(tls *libc.TLS, pMem uintptr) int32 { /* sqlite3.c:7
// is forced. In other words, the value is converted into the desired
// affinity even if that results in loss of data. This routine is
// used (for example) to implement the SQL "cast()" operator.
-func Xsqlite3VdbeMemCast(tls *libc.TLS, pMem uintptr, aff U8, encoding U8) int32 { /* sqlite3.c:77228:20: */
+func Xsqlite3VdbeMemCast(tls *libc.TLS, pMem uintptr, aff U8, encoding U8) int32 { /* sqlite3.c:77760:20: */
if (int32((*Mem)(unsafe.Pointer(pMem)).Fflags) & MEM_Null) != 0 {
return SQLITE_OK
}
@@ -53787,7 +55759,7 @@ func Xsqlite3VdbeMemCast(tls *libc.TLS, pMem uintptr, aff U8, encoding U8) int32
// Initialize bulk memory to be a consistent Mem object.
//
// The minimum amount of initialization feasible is performed.
-func Xsqlite3VdbeMemInit(tls *libc.TLS, pMem uintptr, db uintptr, flags U16) { /* sqlite3.c:77271:21: */
+func Xsqlite3VdbeMemInit(tls *libc.TLS, pMem uintptr, db uintptr, flags U16) { /* sqlite3.c:77803:21: */
(*Mem)(unsafe.Pointer(pMem)).Fflags = flags
(*Mem)(unsafe.Pointer(pMem)).Fdb = db
@@ -53804,7 +55776,7 @@ func Xsqlite3VdbeMemInit(tls *libc.TLS, pMem uintptr, db uintptr, flags U16) { /
// Use this routine to reset the Mem prior to insert a new value.
//
// Use sqlite3VdbeMemRelease() to complete erase the Mem prior to abandoning it.
-func Xsqlite3VdbeMemSetNull(tls *libc.TLS, pMem uintptr) { /* sqlite3.c:77291:21: */
+func Xsqlite3VdbeMemSetNull(tls *libc.TLS, pMem uintptr) { /* sqlite3.c:77823:21: */
if (int32((*Mem)(unsafe.Pointer((pMem))).Fflags) & (MEM_Agg | MEM_Dyn)) != 0 {
vdbeMemClearExternAndSetNull(tls, pMem)
} else {
@@ -53812,13 +55784,13 @@ func Xsqlite3VdbeMemSetNull(tls *libc.TLS, pMem uintptr) { /* sqlite3.c:77291:21
}
}
-func Xsqlite3ValueSetNull(tls *libc.TLS, p uintptr) { /* sqlite3.c:77298:21: */
+func Xsqlite3ValueSetNull(tls *libc.TLS, p uintptr) { /* sqlite3.c:77830:21: */
Xsqlite3VdbeMemSetNull(tls, p)
}
// Delete any previous value and set the value to be a BLOB of length
// n containing all zeros.
-func Xsqlite3VdbeMemSetZeroBlob(tls *libc.TLS, pMem uintptr, n int32) { /* sqlite3.c:77306:21: */
+func Xsqlite3VdbeMemSetZeroBlob(tls *libc.TLS, pMem uintptr, n int32) { /* sqlite3.c:77838:21: */
Xsqlite3VdbeMemRelease(tls, pMem)
(*Mem)(unsafe.Pointer(pMem)).Fflags = (U16(MEM_Blob | MEM_Zero))
(*Mem)(unsafe.Pointer(pMem)).Fn = 0
@@ -53833,7 +55805,7 @@ func Xsqlite3VdbeMemSetZeroBlob(tls *libc.TLS, pMem uintptr, n int32) { /* sqlit
// The pMem is known to contain content that needs to be destroyed prior
// to a value change. So invoke the destructor, then set the value to
// a 64-bit integer.
-func vdbeReleaseAndSetInt64(tls *libc.TLS, pMem uintptr, val I64) { /* sqlite3.c:77321:29: */
+func vdbeReleaseAndSetInt64(tls *libc.TLS, pMem uintptr, val I64) { /* sqlite3.c:77853:29: */
Xsqlite3VdbeMemSetNull(tls, pMem)
*(*I64)(unsafe.Pointer(pMem /* &.u */)) = val
(*Mem)(unsafe.Pointer(pMem)).Fflags = U16(MEM_Int)
@@ -53841,7 +55813,7 @@ func vdbeReleaseAndSetInt64(tls *libc.TLS, pMem uintptr, val I64) { /* sqlite3.c
// Delete any previous value and set the value stored in *pMem to val,
// manifest type INTEGER.
-func Xsqlite3VdbeMemSetInt64(tls *libc.TLS, pMem uintptr, val I64) { /* sqlite3.c:77331:21: */
+func Xsqlite3VdbeMemSetInt64(tls *libc.TLS, pMem uintptr, val I64) { /* sqlite3.c:77863:21: */
if (int32((*Mem)(unsafe.Pointer((pMem))).Fflags) & (MEM_Agg | MEM_Dyn)) != 0 {
vdbeReleaseAndSetInt64(tls, pMem, val)
} else {
@@ -53851,19 +55823,19 @@ func Xsqlite3VdbeMemSetInt64(tls *libc.TLS, pMem uintptr, val I64) { /* sqlite3.
}
// A no-op destructor
-func Xsqlite3NoopDestructor(tls *libc.TLS, p uintptr) { /* sqlite3.c:77341:21: */
+func Xsqlite3NoopDestructor(tls *libc.TLS, p uintptr) { /* sqlite3.c:77873:21: */
_ = p
}
// Set the value stored in *pMem should already be a NULL.
// Also store a pointer to go with it.
-func Xsqlite3VdbeMemSetPointer(tls *libc.TLS, pMem uintptr, pPtr uintptr, zPType uintptr, xDestructor uintptr) { /* sqlite3.c:77347:21: */
+func Xsqlite3VdbeMemSetPointer(tls *libc.TLS, pMem uintptr, pPtr uintptr, zPType uintptr, xDestructor uintptr) { /* sqlite3.c:77879:21: */
*(*uintptr)(unsafe.Pointer(pMem /* &.u */)) = func() uintptr {
if zPType != 0 {
return zPType
}
- return ts + 703 /* "" */
+ return ts + 755 /* "" */
}()
(*Mem)(unsafe.Pointer(pMem)).Fz = pPtr
(*Mem)(unsafe.Pointer(pMem)).Fflags = (U16(((MEM_Null | MEM_Dyn) | MEM_Subtype) | MEM_Term))
@@ -53878,7 +55850,7 @@ func Xsqlite3VdbeMemSetPointer(tls *libc.TLS, pMem uintptr, pPtr uintptr, zPType
// Delete any previous value and set the value stored in *pMem to val,
// manifest type REAL.
-func Xsqlite3VdbeMemSetDouble(tls *libc.TLS, pMem uintptr, val float64) { /* sqlite3.c:77366:21: */
+func Xsqlite3VdbeMemSetDouble(tls *libc.TLS, pMem uintptr, val float64) { /* sqlite3.c:77898:21: */
Xsqlite3VdbeMemSetNull(tls, pMem)
if !(Xsqlite3IsNaN(tls, val) != 0) {
*(*float64)(unsafe.Pointer(pMem /* &.u */)) = val
@@ -53891,7 +55863,7 @@ func Xsqlite3VdbeMemSetDouble(tls *libc.TLS, pMem uintptr, val float64) { /* sql
//
// Return SQLITE_OK on success and SQLITE_NOMEM if a memory allocation
// error occurs.
-func Xsqlite3VdbeMemSetRowSet(tls *libc.TLS, pMem uintptr) int32 { /* sqlite3.c:77393:20: */
+func Xsqlite3VdbeMemSetRowSet(tls *libc.TLS, pMem uintptr) int32 { /* sqlite3.c:77925:20: */
var db uintptr = (*Mem)(unsafe.Pointer(pMem)).Fdb
var p uintptr
@@ -53908,7 +55880,7 @@ func Xsqlite3VdbeMemSetRowSet(tls *libc.TLS, pMem uintptr) int32 { /* sqlite3.c:
// Return true if the Mem object contains a TEXT or BLOB that is
// too large - whose size exceeds SQLITE_MAX_LENGTH.
-func Xsqlite3VdbeMemTooBig(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:77411:20: */
+func Xsqlite3VdbeMemTooBig(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:77943:20: */
if (int32((*Mem)(unsafe.Pointer(p)).Fflags) & (MEM_Str | MEM_Blob)) != 0 {
var n int32 = (*Mem)(unsafe.Pointer(p)).Fn
@@ -53924,13 +55896,13 @@ func Xsqlite3VdbeMemTooBig(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:77411:
// pTo are freed. The pFrom->z field is not duplicated. If
// pFrom->z is used, then pTo->z points to the same thing as pFrom->z
// and flags gets srcType (either MEM_Ephem or MEM_Static).
-func vdbeClrCopy(tls *libc.TLS, pTo uintptr, pFrom uintptr, eType int32) { /* sqlite3.c:77467:29: */
+func vdbeClrCopy(tls *libc.TLS, pTo uintptr, pFrom uintptr, eType int32) { /* sqlite3.c:77999:29: */
vdbeMemClearExternAndSetNull(tls, pTo)
Xsqlite3VdbeMemShallowCopy(tls, pTo, pFrom, eType)
}
-func Xsqlite3VdbeMemShallowCopy(tls *libc.TLS, pTo uintptr, pFrom uintptr, srcType int32) { /* sqlite3.c:77472:21: */
+func Xsqlite3VdbeMemShallowCopy(tls *libc.TLS, pTo uintptr, pFrom uintptr, srcType int32) { /* sqlite3.c:78004:21: */
if (int32((*Mem)(unsafe.Pointer((pTo))).Fflags) & (MEM_Agg | MEM_Dyn)) != 0 {
vdbeClrCopy(tls, pTo, pFrom, srcType)
@@ -53946,7 +55918,7 @@ func Xsqlite3VdbeMemShallowCopy(tls *libc.TLS, pTo uintptr, pFrom uintptr, srcTy
// Make a full copy of pFrom into pTo. Prior contents of pTo are
// freed before the copy is made.
-func Xsqlite3VdbeMemCopy(tls *libc.TLS, pTo uintptr, pFrom uintptr) int32 { /* sqlite3.c:77488:20: */
+func Xsqlite3VdbeMemCopy(tls *libc.TLS, pTo uintptr, pFrom uintptr) int32 { /* sqlite3.c:78020:20: */
var rc int32 = SQLITE_OK
if (int32((*Mem)(unsafe.Pointer((pTo))).Fflags) & (MEM_Agg | MEM_Dyn)) != 0 {
@@ -53968,7 +55940,7 @@ func Xsqlite3VdbeMemCopy(tls *libc.TLS, pTo uintptr, pFrom uintptr) int32 { /* s
// freed. If pFrom contains ephemeral data, a copy is made.
//
// pFrom contains an SQL NULL when this routine returns.
-func Xsqlite3VdbeMemMove(tls *libc.TLS, pTo uintptr, pFrom uintptr) { /* sqlite3.c:77511:21: */
+func Xsqlite3VdbeMemMove(tls *libc.TLS, pTo uintptr, pFrom uintptr) { /* sqlite3.c:78043:21: */
Xsqlite3VdbeMemRelease(tls, pTo)
libc.Xmemcpy(tls, pTo, pFrom, uint64(unsafe.Sizeof(Mem{})))
@@ -53989,8 +55961,8 @@ func Xsqlite3VdbeMemMove(tls *libc.TLS, pTo uintptr, pFrom uintptr) { /* sqlite3
// stored without allocating memory, then it is. If a memory allocation
// is required to store the string, then value of pMem is unchanged. In
// either case, SQLITE_TOOBIG is returned.
-func Xsqlite3VdbeMemSetStr(tls *libc.TLS, pMem uintptr, z uintptr, n int32, enc U8, xDel uintptr) int32 { /* sqlite3.c:77537:20: */
- var nByte int32 = n // New value for pMem->n
+func Xsqlite3VdbeMemSetStr(tls *libc.TLS, pMem uintptr, z uintptr, n I64, enc U8, xDel uintptr) int32 { /* sqlite3.c:78069:20: */
+ var nByte I64 = n // New value for pMem->n
var iLimit int32 // Maximum allowed string or blob size
var flags U16 = U16(0) // New value for pMem->flags
@@ -54011,12 +55983,12 @@ func Xsqlite3VdbeMemSetStr(tls *libc.TLS, pMem uintptr, z uintptr, n int32, enc
}
return uint16(MEM_Str)
}()
- if nByte < 0 {
+ if nByte < int64(0) {
if int32(enc) == SQLITE_UTF8 {
- nByte = (0x7fffffff & int32(libc.Xstrlen(tls, z)))
+ nByte = I64(libc.Xstrlen(tls, z))
} else {
- for nByte = 0; (nByte <= iLimit) && ((int32(*(*int8)(unsafe.Pointer(z + uintptr(nByte)))) | int32(*(*int8)(unsafe.Pointer(z + uintptr((nByte + 1)))))) != 0); nByte = nByte + (2) {
+ for nByte = int64(0); (nByte <= I64(iLimit)) && ((int32(*(*uint8)(unsafe.Pointer(z + uintptr(nByte)))) | int32(*(*uint8)(unsafe.Pointer(z + uintptr((nByte + int64(1))))))) != 0); nByte = nByte + (int64(2)) {
}
}
flags = U16(int32(flags) | (MEM_Term))
@@ -54026,21 +55998,21 @@ func Xsqlite3VdbeMemSetStr(tls *libc.TLS, pMem uintptr, z uintptr, n int32, enc
// also sets a flag in local variable "flags" to indicate the memory
// management (one of MEM_Dyn or MEM_Static).
if xDel == (libc.UintptrFromInt32(-1)) {
- var nAlloc U32 = U32(nByte)
+ var nAlloc I64 = nByte
if (int32(flags) & MEM_Term) != 0 {
- nAlloc = nAlloc + (func() uint32 {
+ nAlloc = nAlloc + (func() int64 {
if int32(enc) == SQLITE_UTF8 {
- return uint32(1)
+ return int64(1)
}
- return uint32(2)
+ return int64(2)
}())
}
- if nByte > iLimit {
+ if nByte > I64(iLimit) {
return Xsqlite3ErrorToParser(tls, (*Mem)(unsafe.Pointer(pMem)).Fdb, SQLITE_TOOBIG)
}
if Xsqlite3VdbeMemClearAndResize(tls, pMem, func() int32 {
- if (nAlloc) > (U32(32)) {
+ if (nAlloc) > (int64(32)) {
return int32(nAlloc)
}
return 32
@@ -54065,10 +56037,12 @@ func Xsqlite3VdbeMemSetStr(tls *libc.TLS, pMem uintptr, z uintptr, n int32, enc
}
}
- (*Mem)(unsafe.Pointer(pMem)).Fn = nByte
+ (*Mem)(unsafe.Pointer(pMem)).Fn = (int32(nByte & int64(0x7fffffff)))
(*Mem)(unsafe.Pointer(pMem)).Fflags = flags
if enc != 0 {
(*Mem)(unsafe.Pointer(pMem)).Fenc = enc
+ } else if (*Mem)(unsafe.Pointer(pMem)).Fdb == uintptr(0) {
+ (*Mem)(unsafe.Pointer(pMem)).Fenc = U8(SQLITE_UTF8)
} else {
(*Mem)(unsafe.Pointer(pMem)).Fenc = (*Sqlite3)(unsafe.Pointer((*Mem)(unsafe.Pointer(pMem)).Fdb)).Fenc
@@ -54078,8 +56052,8 @@ func Xsqlite3VdbeMemSetStr(tls *libc.TLS, pMem uintptr, z uintptr, n int32, enc
return SQLITE_NOMEM
}
- if nByte > iLimit {
- return SQLITE_TOOBIG
+ if nByte > I64(iLimit) {
+ return Xsqlite3ErrorToParser(tls, (*Mem)(unsafe.Pointer(pMem)).Fdb, SQLITE_TOOBIG)
}
return SQLITE_OK
@@ -54098,16 +56072,16 @@ func Xsqlite3VdbeMemSetStr(tls *libc.TLS, pMem uintptr, z uintptr, n int32, enc
//
// If this routine fails for any reason (malloc returns NULL or unable
// to read from the disk) then the pMem is left in an inconsistent state.
-func Xsqlite3VdbeMemFromBtree(tls *libc.TLS, pCur uintptr, offset U32, amt U32, pMem uintptr) int32 { /* sqlite3.c:77645:20: */
+func Xsqlite3VdbeMemFromBtree(tls *libc.TLS, pCur uintptr, offset U32, amt U32, pMem uintptr) int32 { /* sqlite3.c:78177:20: */
var rc int32
(*Mem)(unsafe.Pointer(pMem)).Fflags = U16(MEM_Null)
if Xsqlite3BtreeMaxRecordSize(tls, pCur) < (Sqlite3_int64(offset + amt)) {
- return Xsqlite3CorruptError(tls, 77654)
+ return Xsqlite3CorruptError(tls, 78186)
}
if SQLITE_OK == (libc.AssignInt32(&rc, Xsqlite3VdbeMemClearAndResize(tls, pMem, (int32(amt+U32(1)))))) {
rc = Xsqlite3BtreePayload(tls, pCur, offset, amt, (*Mem)(unsafe.Pointer(pMem)).Fz)
if rc == SQLITE_OK {
- *(*int8)(unsafe.Pointer((*Mem)(unsafe.Pointer(pMem)).Fz + uintptr(amt))) = int8(0) // Overrun area used when reading malformed records
+ *(*uint8)(unsafe.Pointer((*Mem)(unsafe.Pointer(pMem)).Fz + uintptr(amt))) = uint8(0) // Overrun area used when reading malformed records
(*Mem)(unsafe.Pointer(pMem)).Fflags = U16(MEM_Blob)
(*Mem)(unsafe.Pointer(pMem)).Fn = int32(amt)
} else {
@@ -54117,7 +56091,7 @@ func Xsqlite3VdbeMemFromBtree(tls *libc.TLS, pCur uintptr, offset U32, amt U32,
return rc
}
-func Xsqlite3VdbeMemFromBtreeZeroOffset(tls *libc.TLS, pCur uintptr, amt U32, pMem uintptr) int32 { /* sqlite3.c:77668:20: */
+func Xsqlite3VdbeMemFromBtreeZeroOffset(tls *libc.TLS, pCur uintptr, amt U32, pMem uintptr) int32 { /* sqlite3.c:78200:20: */
bp := tls.Alloc(4)
defer tls.Free(4)
@@ -54142,7 +56116,7 @@ func Xsqlite3VdbeMemFromBtreeZeroOffset(tls *libc.TLS, pCur uintptr, amt U32, pM
// The pVal argument is known to be a value other than NULL.
// Convert it into a string with encoding enc and return a pointer
// to a zero-terminated version of that string.
-func valueToText(tls *libc.TLS, pVal uintptr, enc U8) uintptr { /* sqlite3.c:77700:35: */
+func valueToText(tls *libc.TLS, pVal uintptr, enc U8) uintptr { /* sqlite3.c:78232:35: */
if (int32((*Sqlite3_value)(unsafe.Pointer(pVal)).Fflags) & (MEM_Blob | MEM_Str)) != 0 {
if func() int32 {
@@ -54187,7 +56161,7 @@ func valueToText(tls *libc.TLS, pVal uintptr, enc U8) uintptr { /* sqlite3.c:777
// (2006-02-16:) The enc value can be or-ed with SQLITE_UTF16_ALIGNED.
// If that is the case, then the result must be aligned on an even byte
// boundary.
-func Xsqlite3ValueText(tls *libc.TLS, pVal uintptr, enc U8) uintptr { /* sqlite3.c:77743:27: */
+func Xsqlite3ValueText(tls *libc.TLS, pVal uintptr, enc U8) uintptr { /* sqlite3.c:78275:27: */
if !(pVal != 0) {
return uintptr(0)
}
@@ -54203,7 +56177,7 @@ func Xsqlite3ValueText(tls *libc.TLS, pVal uintptr, enc U8) uintptr { /* sqlite3
}
// Create a new sqlite3_value object.
-func Xsqlite3ValueNew(tls *libc.TLS, db uintptr) uintptr { /* sqlite3.c:77761:30: */
+func Xsqlite3ValueNew(tls *libc.TLS, db uintptr) uintptr { /* sqlite3.c:78293:30: */
var p uintptr = Xsqlite3DbMallocZero(tls, db, uint64(unsafe.Sizeof(Mem{})))
if p != 0 {
(*Mem)(unsafe.Pointer(p)).Fflags = U16(MEM_Null)
@@ -54215,12 +56189,12 @@ func Xsqlite3ValueNew(tls *libc.TLS, db uintptr) uintptr { /* sqlite3.c:77761:30
// Context object passed by sqlite3Stat4ProbeSetValue() through to
// valueNew(). See comments above valueNew() for details.
type ValueNewStat4Ctx = struct {
- FpParse uintptr
- FpIdx uintptr
- FppRec uintptr
- FiVal int32
- _ [4]byte
-} /* sqlite3.c:77774:1 */
+ FpParse uintptr
+ FpIdx uintptr
+ FppRec uintptr
+ FiVal int32
+ F__ccgo_pad1 [4]byte
+} /* sqlite3.c:78306:1 */
// Allocate and return a pointer to a new sqlite3_value object. If
// the second argument to this function is NULL, the object is allocated
@@ -54231,7 +56205,7 @@ type ValueNewStat4Ctx = struct {
// already been allocated, allocate the UnpackedRecord structure that
// that function will return to its caller here. Then return a pointer to
// an sqlite3_value within the UnpackedRecord.a[] array.
-func valueNew(tls *libc.TLS, db uintptr, p uintptr) uintptr { /* sqlite3.c:77792:22: */
+func valueNew(tls *libc.TLS, db uintptr, p uintptr) uintptr { /* sqlite3.c:78324:22: */
if p != 0 {
var pRec uintptr = *(*uintptr)(unsafe.Pointer((*ValueNewStat4Ctx)(unsafe.Pointer(p)).FppRec))
@@ -54287,7 +56261,7 @@ func valueNew(tls *libc.TLS, db uintptr, p uintptr) uintptr { /* sqlite3.c:77792
// If the conditions above are not met, this function returns SQLITE_OK
// and sets (*ppVal) to NULL. Or, if an error occurs, (*ppVal) is set to
// NULL and an SQLite error code returned.
-func valueFromFunction(tls *libc.TLS, db uintptr, p uintptr, enc U8, aff U8, ppVal uintptr, pCtx uintptr) int32 { /* sqlite3.c:77854:12: */
+func valueFromFunction(tls *libc.TLS, db uintptr, p uintptr, enc U8, aff U8, ppVal uintptr, pCtx uintptr) int32 { /* sqlite3.c:78386:12: */
bp := tls.Alloc(64)
defer tls.Free(64)
@@ -54369,12 +56343,14 @@ __9:
libc.Xmemset(tls, bp+8 /* &ctx */, 0, uint64(unsafe.Sizeof(Sqlite3_context{})))
(*Sqlite3_context)(unsafe.Pointer(bp + 8 /* &ctx */)).FpOut = pVal
(*Sqlite3_context)(unsafe.Pointer(bp + 8 /* &ctx */)).FpFunc = pFunc
- (*(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer((pFunc + 24 /* &.xSFunc */))))(tls, bp+8 /* &ctx */, nVal, apVal)
+ (*struct {
+ f func(*libc.TLS, uintptr, int32, uintptr)
+ })(unsafe.Pointer(&struct{ uintptr }{(*FuncDef)(unsafe.Pointer(pFunc)).FxSFunc})).f(tls, bp+8 /* &ctx */, nVal, apVal)
if !((*Sqlite3_context)(unsafe.Pointer(bp+8 /* &ctx */)).FisError != 0) {
goto __10
}
rc = (*Sqlite3_context)(unsafe.Pointer(bp + 8 /* &ctx */)).FisError
- Xsqlite3ErrorMsg(tls, (*ValueNewStat4Ctx)(unsafe.Pointer(pCtx)).FpParse, ts+2718 /* "%s" */, libc.VaList(bp, Xsqlite3_value_text(tls, pVal)))
+ Xsqlite3ErrorMsg(tls, (*ValueNewStat4Ctx)(unsafe.Pointer(pCtx)).FpParse, ts+2790 /* "%s" */, libc.VaList(bp, Xsqlite3_value_text(tls, pVal)))
goto __11
__10:
Xsqlite3ValueApplyAffinity(tls, pVal, aff, uint8(SQLITE_UTF8))
@@ -54430,7 +56406,7 @@ __14:
// has been allocated, it is freed before returning. Or, if pCtx is not
// NULL, it is assumed that the caller will free any allocated object
// in all cases.
-func valueFromExpr(tls *libc.TLS, db uintptr, pExpr uintptr, enc U8, affinity U8, ppVal uintptr, pCtx uintptr) int32 { /* sqlite3.c:77948:12: */
+func valueFromExpr(tls *libc.TLS, db uintptr, pExpr uintptr, enc U8, affinity U8, ppVal uintptr, pCtx uintptr) int32 { /* sqlite3.c:78480:12: */
bp := tls.Alloc(24)
defer tls.Free(24)
@@ -54446,7 +56422,7 @@ func valueFromExpr(tls *libc.TLS, db uintptr, pExpr uintptr, enc U8, affinity U8
zVal = uintptr(0)
*(*uintptr)(unsafe.Pointer(bp + 16 /* pVal */)) = uintptr(0)
negInt = 1
- zNeg = ts + 703 /* "" */
+ zNeg = ts + 755 /* "" */
rc = SQLITE_OK
__1:
@@ -54495,7 +56471,7 @@ __4:
pExpr = (*Expr)(unsafe.Pointer(pExpr)).FpLeft
op = int32((*Expr)(unsafe.Pointer(pExpr)).Fop)
negInt = -1
- zNeg = ts + 3910 /* "-" */
+ zNeg = ts + 4041 /* "-" */
__6:
;
@@ -54515,7 +56491,7 @@ __9:
Xsqlite3VdbeMemSetInt64(tls, *(*uintptr)(unsafe.Pointer(bp + 16 /* pVal */)), (I64(*(*int32)(unsafe.Pointer(pExpr + 8 /* &.u */))) * I64(negInt)))
goto __11
__10:
- zVal = Xsqlite3MPrintf(tls, db, ts+3912 /* "%s%s" */, libc.VaList(bp, zNeg, *(*uintptr)(unsafe.Pointer(pExpr + 8 /* &.u */))))
+ zVal = Xsqlite3MPrintf(tls, db, ts+4043 /* "%s%s" */, libc.VaList(bp, zNeg, *(*uintptr)(unsafe.Pointer(pExpr + 8 /* &.u */))))
if !(zVal == uintptr(0)) {
goto __12
}
@@ -54609,7 +56585,7 @@ __29:
zVal = (*(*uintptr)(unsafe.Pointer(pExpr + 8 /* &.u */)) + 2)
nVal = (Xsqlite3Strlen30(tls, zVal) - 1)
- Xsqlite3VdbeMemSetStr(tls, *(*uintptr)(unsafe.Pointer(bp + 16 /* pVal */)), Xsqlite3HexToBlob(tls, db, zVal, nVal), (nVal / 2),
+ Xsqlite3VdbeMemSetStr(tls, *(*uintptr)(unsafe.Pointer(bp + 16 /* pVal */)), Xsqlite3HexToBlob(tls, db, zVal, nVal), (int64(nVal / 2)),
uint8(0), *(*uintptr)(unsafe.Pointer(&struct{ f func(*libc.TLS, uintptr) }{Xsqlite3OomFault})))
goto __28
__27:
@@ -54627,7 +56603,7 @@ __30:
goto __33
}
(*Sqlite3_value)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 16 /* pVal */)))).Fflags = U16(MEM_Int)
- *(*I64)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 16 /* pVal */)) /* &.u */)) = (I64(libc.Bool32(int32(*(*int8)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(pExpr + 8 /* &.u */)) + 4))) == 0)))
+ *(*I64)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 16 /* pVal */)) /* &.u */)) = (I64(libc.Bool32(int32(*(*uint8)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(pExpr + 8 /* &.u */)) + 4))) == 0)))
__33:
;
__32:
@@ -54672,7 +56648,7 @@ __35:
// a pointer written to *ppVal. The caller is responsible for deallocating
// the value by passing it to sqlite3ValueFree() later on. If the expression
// cannot be converted to a value, then *ppVal is set to NULL.
-func Xsqlite3ValueFromExpr(tls *libc.TLS, db uintptr, pExpr uintptr, enc U8, affinity U8, ppVal uintptr) int32 { /* sqlite3.c:78103:20: */
+func Xsqlite3ValueFromExpr(tls *libc.TLS, db uintptr, pExpr uintptr, enc U8, affinity U8, ppVal uintptr) int32 { /* sqlite3.c:78635:20: */
if pExpr != 0 {
return valueFromExpr(tls, db, pExpr, enc, affinity, ppVal, uintptr(0))
}
@@ -54695,7 +56671,7 @@ func Xsqlite3ValueFromExpr(tls *libc.TLS, db uintptr, pExpr uintptr, enc U8, aff
//
// On success, *ppVal is made to point to the extracted value. The caller
// is responsible for ensuring that the value is eventually freed.
-func stat4ValueFromExpr(tls *libc.TLS, pParse uintptr, pExpr uintptr, affinity U8, pAlloc uintptr, ppVal uintptr) int32 { /* sqlite3.c:78132:12: */
+func stat4ValueFromExpr(tls *libc.TLS, pParse uintptr, pExpr uintptr, affinity U8, pAlloc uintptr, ppVal uintptr) int32 { /* sqlite3.c:78664:12: */
bp := tls.Alloc(8)
defer tls.Free(8)
@@ -54763,7 +56739,7 @@ func stat4ValueFromExpr(tls *libc.TLS, pParse uintptr, pExpr uintptr, affinity U
// Unless an error is encountered, SQLITE_OK is returned. It is not an
// error if a value cannot be extracted from pExpr. If an error does
// occur, an SQLite error code is returned.
-func Xsqlite3Stat4ProbeSetValue(tls *libc.TLS, pParse uintptr, pIdx uintptr, ppRec uintptr, pExpr uintptr, nElem int32, iVal int32, pnExtract uintptr) int32 { /* sqlite3.c:78207:20: */
+func Xsqlite3Stat4ProbeSetValue(tls *libc.TLS, pParse uintptr, pIdx uintptr, ppRec uintptr, pExpr uintptr, nElem int32, iVal int32, pnExtract uintptr) int32 { /* sqlite3.c:78739:20: */
bp := tls.Alloc(40)
defer tls.Free(40)
@@ -54808,7 +56784,7 @@ func Xsqlite3Stat4ProbeSetValue(tls *libc.TLS, pParse uintptr, pIdx uintptr, ppR
// (e.g. OOM), return SQLITE_OK and set *ppVal to NULL. Or, if an error
// does occur, return an SQLite error code. The final value of *ppVal
// is undefined in this case.
-func Xsqlite3Stat4ValueFromExpr(tls *libc.TLS, pParse uintptr, pExpr uintptr, affinity U8, ppVal uintptr) int32 { /* sqlite3.c:78252:20: */
+func Xsqlite3Stat4ValueFromExpr(tls *libc.TLS, pParse uintptr, pExpr uintptr, affinity U8, ppVal uintptr) int32 { /* sqlite3.c:78784:20: */
return stat4ValueFromExpr(tls, pParse, pExpr, affinity, uintptr(0), ppVal)
}
@@ -54818,7 +56794,7 @@ func Xsqlite3Stat4ValueFromExpr(tls *libc.TLS, pParse uintptr, pExpr uintptr, af
//
// If *ppVal is initially NULL then the caller is responsible for
// ensuring that the value written into *ppVal is eventually freed.
-func Xsqlite3Stat4Column(tls *libc.TLS, db uintptr, pRec uintptr, nRec int32, iCol int32, ppVal uintptr) int32 { /* sqlite3.c:78269:20: */
+func Xsqlite3Stat4Column(tls *libc.TLS, db uintptr, pRec uintptr, nRec int32, iCol int32, ppVal uintptr) int32 { /* sqlite3.c:78801:20: */
bp := tls.Alloc(8)
defer tls.Free(8)
@@ -54842,7 +56818,7 @@ func Xsqlite3Stat4Column(tls *libc.TLS, db uintptr, pRec uintptr, nRec int32, iC
return Xsqlite3GetVarint32(tls, a, bp /* &nHdr */)
}())
if (*(*int32)(unsafe.Pointer(bp /* nHdr */)) > nRec) || (iHdr >= *(*int32)(unsafe.Pointer(bp /* nHdr */))) {
- return Xsqlite3CorruptError(tls, 78287)
+ return Xsqlite3CorruptError(tls, 78819)
}
iField = *(*int32)(unsafe.Pointer(bp /* nHdr */))
for i = 0; i <= iCol; i++ {
@@ -54857,14 +56833,14 @@ func Xsqlite3Stat4Column(tls *libc.TLS, db uintptr, pRec uintptr, nRec int32, iC
}()))
if iHdr > *(*int32)(unsafe.Pointer(bp /* nHdr */)) {
- return Xsqlite3CorruptError(tls, 78293)
+ return Xsqlite3CorruptError(tls, 78825)
}
szField = int32(Xsqlite3VdbeSerialTypeLen(tls, *(*U32)(unsafe.Pointer(bp + 4 /* t */))))
iField = iField + (szField)
}
if iField > nRec {
- return Xsqlite3CorruptError(tls, 78299)
+ return Xsqlite3CorruptError(tls, 78831)
}
if pMem == uintptr(0) {
pMem = libc.AssignPtrUintptr(ppVal, Xsqlite3ValueNew(tls, db))
@@ -54880,7 +56856,7 @@ func Xsqlite3Stat4Column(tls *libc.TLS, db uintptr, pRec uintptr, nRec int32, iC
// Unless it is NULL, the argument must be an UnpackedRecord object returned
// by an earlier call to sqlite3Stat4ProbeSetValue(). This call deletes
// the object.
-func Xsqlite3Stat4ProbeFree(tls *libc.TLS, pRec uintptr) { /* sqlite3.c:78314:21: */
+func Xsqlite3Stat4ProbeFree(tls *libc.TLS, pRec uintptr) { /* sqlite3.c:78846:21: */
if pRec != 0 {
var i int32
var nCol int32 = int32((*KeyInfo)(unsafe.Pointer((*UnpackedRecord)(unsafe.Pointer(pRec)).FpKeyInfo)).FnAllField)
@@ -54895,14 +56871,14 @@ func Xsqlite3Stat4ProbeFree(tls *libc.TLS, pRec uintptr) { /* sqlite3.c:78314:21
}
// Change the string value of an sqlite3_value object
-func Xsqlite3ValueSetStr(tls *libc.TLS, v uintptr, n int32, z uintptr, enc U8, xDel uintptr) { /* sqlite3.c:78332:21: */
+func Xsqlite3ValueSetStr(tls *libc.TLS, v uintptr, n int32, z uintptr, enc U8, xDel uintptr) { /* sqlite3.c:78864:21: */
if v != 0 {
- Xsqlite3VdbeMemSetStr(tls, v, z, n, enc, xDel)
+ Xsqlite3VdbeMemSetStr(tls, v, z, int64(n), enc, xDel)
}
}
// Free an sqlite3_value object
-func Xsqlite3ValueFree(tls *libc.TLS, v uintptr) { /* sqlite3.c:78345:21: */
+func Xsqlite3ValueFree(tls *libc.TLS, v uintptr) { /* sqlite3.c:78877:21: */
if !(v != 0) {
return
}
@@ -54913,14 +56889,14 @@ func Xsqlite3ValueFree(tls *libc.TLS, v uintptr) { /* sqlite3.c:78345:21: */
// The sqlite3ValueBytes() routine returns the number of bytes in the
// sqlite3_value object assuming that it uses the encoding "enc".
// The valueBytes() routine is a helper function.
-func valueBytes(tls *libc.TLS, pVal uintptr, enc U8) int32 { /* sqlite3.c:78356:28: */
+func valueBytes(tls *libc.TLS, pVal uintptr, enc U8) int32 { /* sqlite3.c:78888:28: */
if valueToText(tls, pVal, enc) != uintptr(0) {
return (*Sqlite3_value)(unsafe.Pointer(pVal)).Fn
}
return 0
}
-func Xsqlite3ValueBytes(tls *libc.TLS, pVal uintptr, enc U8) int32 { /* sqlite3.c:78359:20: */
+func Xsqlite3ValueBytes(tls *libc.TLS, pVal uintptr, enc U8) int32 { /* sqlite3.c:78891:20: */
var p uintptr = pVal
if ((int32((*Mem)(unsafe.Pointer(p)).Fflags) & MEM_Str) != 0) && (int32((*Sqlite3_value)(unsafe.Pointer(pVal)).Fenc) == int32(enc)) {
@@ -54940,7 +56916,7 @@ func Xsqlite3ValueBytes(tls *libc.TLS, pVal uintptr, enc U8) int32 { /* sqlite3.
}
// Create a new virtual database engine.
-func Xsqlite3VdbeCreate(tls *libc.TLS, pParse uintptr) uintptr { /* sqlite3.c:78402:21: */
+func Xsqlite3VdbeCreate(tls *libc.TLS, pParse uintptr) uintptr { /* sqlite3.c:78934:21: */
var db uintptr = (*Parse)(unsafe.Pointer(pParse)).Fdb
var p uintptr
p = Xsqlite3DbMallocRawNN(tls, db, uint64(unsafe.Sizeof(Vdbe{})))
@@ -54964,12 +56940,12 @@ func Xsqlite3VdbeCreate(tls *libc.TLS, pParse uintptr) uintptr { /* sqlite3.c:78
}
// Return the Parse object that owns a Vdbe object.
-func Xsqlite3VdbeParser(tls *libc.TLS, p uintptr) uintptr { /* sqlite3.c:78429:22: */
+func Xsqlite3VdbeParser(tls *libc.TLS, p uintptr) uintptr { /* sqlite3.c:78961:22: */
return (*Vdbe)(unsafe.Pointer(p)).FpParse
}
// Change the error string stored in Vdbe.zErrMsg
-func Xsqlite3VdbeError(tls *libc.TLS, p uintptr, zFormat uintptr, va uintptr) { /* sqlite3.c:78436:21: */
+func Xsqlite3VdbeError(tls *libc.TLS, p uintptr, zFormat uintptr, va uintptr) { /* sqlite3.c:78968:21: */
var ap Va_list
_ = ap
Xsqlite3DbFree(tls, (*Vdbe)(unsafe.Pointer(p)).Fdb, (*Vdbe)(unsafe.Pointer(p)).FzErrMsg)
@@ -54979,7 +56955,7 @@ func Xsqlite3VdbeError(tls *libc.TLS, p uintptr, zFormat uintptr, va uintptr) {
}
// Remember the SQL string for a prepared statement.
-func Xsqlite3VdbeSetSql(tls *libc.TLS, p uintptr, z uintptr, n int32, prepFlags U8) { /* sqlite3.c:78447:21: */
+func Xsqlite3VdbeSetSql(tls *libc.TLS, p uintptr, z uintptr, n int32, prepFlags U8) { /* sqlite3.c:78979:21: */
if p == uintptr(0) {
return
}
@@ -54992,7 +56968,7 @@ func Xsqlite3VdbeSetSql(tls *libc.TLS, p uintptr, z uintptr, n int32, prepFlags
}
// Swap all content between two VDBE structures.
-func Xsqlite3VdbeSwap(tls *libc.TLS, pA uintptr, pB uintptr) { /* sqlite3.c:78497:21: */
+func Xsqlite3VdbeSwap(tls *libc.TLS, pA uintptr, pB uintptr) { /* sqlite3.c:79029:21: */
var tmp Vdbe
var pTmp uintptr
var zTmp uintptr
@@ -55023,7 +56999,7 @@ func Xsqlite3VdbeSwap(tls *libc.TLS, pA uintptr, pB uintptr) { /* sqlite3.c:7849
// SQLITE_NOMEM. In this case Vdbe.aOp and Vdbe.nOpAlloc remain
// unchanged (this is so that any opcodes already allocated can be
// correctly deallocated along with the rest of the Vdbe).
-func growOpArray(tls *libc.TLS, v uintptr, nOp int32) int32 { /* sqlite3.c:78534:12: */
+func growOpArray(tls *libc.TLS, v uintptr, nOp int32) int32 { /* sqlite3.c:79066:12: */
var pNew uintptr
var p uintptr = (*Vdbe)(unsafe.Pointer(v)).FpParse
@@ -55076,7 +57052,7 @@ func growOpArray(tls *libc.TLS, v uintptr, nOp int32) int32 { /* sqlite3.c:78534
// Use the sqlite3VdbeResolveLabel() function to fix an address and
// the sqlite3VdbeChangeP4() function to change the value of the P4
// operand.
-func growOp3(tls *libc.TLS, p uintptr, op int32, p1 int32, p2 int32, p3 int32) int32 { /* sqlite3.c:78605:28: */
+func growOp3(tls *libc.TLS, p uintptr, op int32, p1 int32, p2 int32, p3 int32) int32 { /* sqlite3.c:79137:28: */
if growOpArray(tls, p, 1) != 0 {
return 1
@@ -55085,7 +57061,7 @@ func growOp3(tls *libc.TLS, p uintptr, op int32, p1 int32, p2 int32, p3 int32) i
return Xsqlite3VdbeAddOp3(tls, p, op, p1, p2, p3)
}
-func Xsqlite3VdbeAddOp3(tls *libc.TLS, p uintptr, op int32, p1 int32, p2 int32, p3 int32) int32 { /* sqlite3.c:78611:20: */
+func Xsqlite3VdbeAddOp3(tls *libc.TLS, p uintptr, op int32, p1 int32, p2 int32, p3 int32) int32 { /* sqlite3.c:79143:20: */
var i int32
var pOp uintptr
@@ -55106,26 +57082,26 @@ func Xsqlite3VdbeAddOp3(tls *libc.TLS, p uintptr, op int32, p1 int32, p2 int32,
return i
}
-func Xsqlite3VdbeAddOp0(tls *libc.TLS, p uintptr, op int32) int32 { /* sqlite3.c:78648:20: */
+func Xsqlite3VdbeAddOp0(tls *libc.TLS, p uintptr, op int32) int32 { /* sqlite3.c:79180:20: */
return Xsqlite3VdbeAddOp3(tls, p, op, 0, 0, 0)
}
-func Xsqlite3VdbeAddOp1(tls *libc.TLS, p uintptr, op int32, p1 int32) int32 { /* sqlite3.c:78651:20: */
+func Xsqlite3VdbeAddOp1(tls *libc.TLS, p uintptr, op int32, p1 int32) int32 { /* sqlite3.c:79183:20: */
return Xsqlite3VdbeAddOp3(tls, p, op, p1, 0, 0)
}
-func Xsqlite3VdbeAddOp2(tls *libc.TLS, p uintptr, op int32, p1 int32, p2 int32) int32 { /* sqlite3.c:78654:20: */
+func Xsqlite3VdbeAddOp2(tls *libc.TLS, p uintptr, op int32, p1 int32, p2 int32) int32 { /* sqlite3.c:79186:20: */
return Xsqlite3VdbeAddOp3(tls, p, op, p1, p2, 0)
}
// Generate code for an unconditional jump to instruction iDest
-func Xsqlite3VdbeGoto(tls *libc.TLS, p uintptr, iDest int32) int32 { /* sqlite3.c:78660:20: */
+func Xsqlite3VdbeGoto(tls *libc.TLS, p uintptr, iDest int32) int32 { /* sqlite3.c:79192:20: */
return Xsqlite3VdbeAddOp3(tls, p, OP_Goto, 0, iDest, 0)
}
// Generate code to cause the string zStr to be loaded into
// register iDest
-func Xsqlite3VdbeLoadString(tls *libc.TLS, p uintptr, iDest int32, zStr uintptr) int32 { /* sqlite3.c:78667:20: */
+func Xsqlite3VdbeLoadString(tls *libc.TLS, p uintptr, iDest int32, zStr uintptr) int32 { /* sqlite3.c:79199:20: */
return Xsqlite3VdbeAddOp4(tls, p, OP_String8, 0, iDest, 0, zStr, 0)
}
@@ -55138,16 +57114,16 @@ func Xsqlite3VdbeLoadString(tls *libc.TLS, p uintptr, iDest int32, zStr uintptr)
//
// If the input string does not end with "X" then an OP_ResultRow instruction
// is generated for the values inserted.
-func Xsqlite3VdbeMultiLoad(tls *libc.TLS, p uintptr, iDest int32, zTypes uintptr, va uintptr) { /* sqlite3.c:78682:21: */
+func Xsqlite3VdbeMultiLoad(tls *libc.TLS, p uintptr, iDest int32, zTypes uintptr, va uintptr) { /* sqlite3.c:79214:21: */
var ap Va_list
_ = ap
var i int32
- var c int8
+ var c uint8
var z uintptr
ap = va
i = 0
__1:
- if !((int32(libc.AssignInt8(&c, *(*int8)(unsafe.Pointer(zTypes + uintptr(i)))))) != 0) {
+ if !((int32(libc.AssignUint8(&c, *(*uint8)(unsafe.Pointer(zTypes + uintptr(i)))))) != 0) {
goto __3
}
if !(int32(c) == 's') {
@@ -55186,7 +57162,7 @@ skip_op_resultrow:
}
// Add an opcode that includes the p4 value as a pointer.
-func Xsqlite3VdbeAddOp4(tls *libc.TLS, p uintptr, op int32, p1 int32, p2 int32, p3 int32, zP4 uintptr, p4type int32) int32 { /* sqlite3.c:78705:20: */
+func Xsqlite3VdbeAddOp4(tls *libc.TLS, p uintptr, op int32, p1 int32, p2 int32, p3 int32, zP4 uintptr, p4type int32) int32 { /* sqlite3.c:79237:20: */
var addr int32 = Xsqlite3VdbeAddOp3(tls, p, op, p1, p2, p3)
Xsqlite3VdbeChangeP4(tls, p, addr, zP4, p4type)
return addr
@@ -55200,7 +57176,7 @@ func Xsqlite3VdbeAddOp4(tls *libc.TLS, p uintptr, op int32, p1 int32, p2 int32,
// NC_IdxExpr means called as part of an index expression. NC_PartIdx
// means in the WHERE clause of a partial index. NC_GenCol means called
// while computing a generated column value. 0 is the usual case.
-func Xsqlite3VdbeAddFunctionCall(tls *libc.TLS, pParse uintptr, p1 int32, p2 int32, p3 int32, nArg int32, pFunc uintptr, eCallCtx int32) int32 { /* sqlite3.c:78729:20: */
+func Xsqlite3VdbeAddFunctionCall(tls *libc.TLS, pParse uintptr, p1 int32, p2 int32, p3 int32, nArg int32, pFunc uintptr, eCallCtx int32) int32 { /* sqlite3.c:79261:20: */
var v uintptr = (*Parse)(unsafe.Pointer(pParse)).FpVdbe
var nByte int32
var addr int32
@@ -55232,7 +57208,7 @@ func Xsqlite3VdbeAddFunctionCall(tls *libc.TLS, pParse uintptr, p1 int32, p2 int
// Add an opcode that includes the p4 value with a P4_INT64 or
// P4_REAL type.
-func Xsqlite3VdbeAddOp4Dup8(tls *libc.TLS, p uintptr, op int32, p1 int32, p2 int32, p3 int32, zP4 uintptr, p4type int32) int32 { /* sqlite3.c:78766:20: */
+func Xsqlite3VdbeAddOp4Dup8(tls *libc.TLS, p uintptr, op int32, p1 int32, p2 int32, p3 int32, zP4 uintptr, p4type int32) int32 { /* sqlite3.c:79298:20: */
var p4copy uintptr = Xsqlite3DbMallocRawNN(tls, Xsqlite3VdbeDb(tls, p), uint64(8))
if p4copy != 0 {
libc.Xmemcpy(tls, p4copy, zP4, uint64(8))
@@ -55242,7 +57218,7 @@ func Xsqlite3VdbeAddOp4Dup8(tls *libc.TLS, p uintptr, op int32, p1 int32, p2 int
// Return the address of the current EXPLAIN QUERY PLAN baseline.
// 0 means "none".
-func Xsqlite3VdbeExplainParent(tls *libc.TLS, pParse uintptr) int32 { /* sqlite3.c:78785:20: */
+func Xsqlite3VdbeExplainParent(tls *libc.TLS, pParse uintptr) int32 { /* sqlite3.c:79317:20: */
var pOp uintptr
if (*Parse)(unsafe.Pointer(pParse)).FaddrExplain == 0 {
return 0
@@ -55258,7 +57234,7 @@ func Xsqlite3VdbeExplainParent(tls *libc.TLS, pParse uintptr) int32 { /* sqlite3
//
// If the bPush flag is true, then make this opcode the parent for
// subsequent Explains until sqlite3VdbeExplainPop() is called.
-func Xsqlite3VdbeExplain(tls *libc.TLS, pParse uintptr, bPush U8, zFmt uintptr, va uintptr) { /* sqlite3.c:78809:21: */
+func Xsqlite3VdbeExplain(tls *libc.TLS, pParse uintptr, bPush U8, zFmt uintptr, va uintptr) { /* sqlite3.c:79341:21: */
// Always include the OP_Explain opcodes if SQLITE_DEBUG is defined.
// But omit them (for performance) during production builds
if int32((*Parse)(unsafe.Pointer(pParse)).Fexplain) == 2 {
@@ -55282,7 +57258,7 @@ func Xsqlite3VdbeExplain(tls *libc.TLS, pParse uintptr, bPush U8, zFmt uintptr,
}
// Pop the EXPLAIN QUERY PLAN stack one level.
-func Xsqlite3VdbeExplainPop(tls *libc.TLS, pParse uintptr) { /* sqlite3.c:78837:21: */
+func Xsqlite3VdbeExplainPop(tls *libc.TLS, pParse uintptr) { /* sqlite3.c:79369:21: */
(*Parse)(unsafe.Pointer(pParse)).FaddrExplain = Xsqlite3VdbeExplainParent(tls, pParse)
}
@@ -55293,7 +57269,7 @@ func Xsqlite3VdbeExplainPop(tls *libc.TLS, pParse uintptr) { /* sqlite3.c:78837:
//
// The zWhere string must have been obtained from sqlite3_malloc().
// This routine will take ownership of the allocated memory.
-func Xsqlite3VdbeAddParseSchemaOp(tls *libc.TLS, p uintptr, iDb int32, zWhere uintptr, p5 U16) { /* sqlite3.c:78851:21: */
+func Xsqlite3VdbeAddParseSchemaOp(tls *libc.TLS, p uintptr, iDb int32, zWhere uintptr, p5 U16) { /* sqlite3.c:79383:21: */
var j int32
Xsqlite3VdbeAddOp4(tls, p, OP_ParseSchema, iDb, 0, 0, zWhere, -7)
Xsqlite3VdbeChangeP5(tls, p, p5)
@@ -55304,7 +57280,7 @@ func Xsqlite3VdbeAddParseSchemaOp(tls *libc.TLS, p uintptr, iDb int32, zWhere ui
}
// Add an opcode that includes the p4 value as an integer.
-func Xsqlite3VdbeAddOp4Int(tls *libc.TLS, p uintptr, op int32, p1 int32, p2 int32, p3 int32, p4 int32) int32 { /* sqlite3.c:78862:20: */
+func Xsqlite3VdbeAddOp4Int(tls *libc.TLS, p uintptr, op int32, p1 int32, p2 int32, p3 int32, p4 int32) int32 { /* sqlite3.c:79394:20: */
var addr int32 = Xsqlite3VdbeAddOp3(tls, p, op, p1, p2, p3)
if int32((*Sqlite3)(unsafe.Pointer((*Vdbe)(unsafe.Pointer(p)).Fdb)).FmallocFailed) == 0 {
var pOp uintptr = ((*Vdbe)(unsafe.Pointer(p)).FaOp + uintptr(addr)*24)
@@ -55315,7 +57291,7 @@ func Xsqlite3VdbeAddOp4Int(tls *libc.TLS, p uintptr, op int32, p1 int32, p2 int3
}
// Insert the end of a co-routine
-func Xsqlite3VdbeEndCoroutine(tls *libc.TLS, v uintptr, regYield int32) { /* sqlite3.c:78881:21: */
+func Xsqlite3VdbeEndCoroutine(tls *libc.TLS, v uintptr, regYield int32) { /* sqlite3.c:79413:21: */
Xsqlite3VdbeAddOp1(tls, v, OP_EndCoroutine, regYield)
// Clear the temporary register cache, thereby ensuring that each
@@ -55350,14 +57326,14 @@ func Xsqlite3VdbeEndCoroutine(tls *libc.TLS, v uintptr, regYield int32) { /* sql
// been issued. The negative is stored because
// that gives a performance improvement over storing
// the equivalent positive value.
-func Xsqlite3VdbeMakeLabel(tls *libc.TLS, pParse uintptr) int32 { /* sqlite3.c:78919:20: */
+func Xsqlite3VdbeMakeLabel(tls *libc.TLS, pParse uintptr) int32 { /* sqlite3.c:79451:20: */
return libc.PreDecInt32(&(*Parse)(unsafe.Pointer(pParse)).FnLabel, 1)
}
// Resolve label "x" to be the address of the next instruction to
// be inserted. The parameter "x" must have been obtained from
// a prior call to sqlite3VdbeMakeLabel().
-func resizeResolveLabel(tls *libc.TLS, p uintptr, v uintptr, j int32) { /* sqlite3.c:78928:29: */
+func resizeResolveLabel(tls *libc.TLS, p uintptr, v uintptr, j int32) { /* sqlite3.c:79460:29: */
var nNewSize int32 = (10 - (*Parse)(unsafe.Pointer(p)).FnLabel)
(*Parse)(unsafe.Pointer(p)).FaLabel = Xsqlite3DbReallocOrFree(tls, (*Parse)(unsafe.Pointer(p)).Fdb, (*Parse)(unsafe.Pointer(p)).FaLabel,
(uint64(uint64(nNewSize) * uint64(unsafe.Sizeof(int32(0))))))
@@ -55369,7 +57345,7 @@ func resizeResolveLabel(tls *libc.TLS, p uintptr, v uintptr, j int32) { /* sqlit
}
}
-func Xsqlite3VdbeResolveLabel(tls *libc.TLS, v uintptr, x int32) { /* sqlite3.c:78943:21: */
+func Xsqlite3VdbeResolveLabel(tls *libc.TLS, v uintptr, x int32) { /* sqlite3.c:79475:21: */
var p uintptr = (*Vdbe)(unsafe.Pointer(v)).FpParse
var j int32 = ^x
@@ -55382,13 +57358,13 @@ func Xsqlite3VdbeResolveLabel(tls *libc.TLS, v uintptr, x int32) { /* sqlite3.c:
}
// Mark the VDBE as one that can only be run one time.
-func Xsqlite3VdbeRunOnlyOnce(tls *libc.TLS, p uintptr) { /* sqlite3.c:78965:21: */
- libc.SetBitFieldPtr16Uint32(p+200 /* &.runOnlyOnce */, Bft(1), 5, 0x20)
+func Xsqlite3VdbeRunOnlyOnce(tls *libc.TLS, p uintptr) { /* sqlite3.c:79497:21: */
+ libc.SetBitFieldPtr16Uint32(p+200 /* &.runOnlyOnce */, Bft(1), 10, 0x400)
}
// Mark the VDBE as one that can only be run multiple times.
-func Xsqlite3VdbeReusable(tls *libc.TLS, p uintptr) { /* sqlite3.c:78972:21: */
- libc.SetBitFieldPtr16Uint32(p+200 /* &.runOnlyOnce */, Bft(0), 5, 0x20)
+func Xsqlite3VdbeReusable(tls *libc.TLS, p uintptr) { /* sqlite3.c:79504:21: */
+ libc.SetBitFieldPtr16Uint32(p+200 /* &.runOnlyOnce */, Bft(0), 10, 0x400)
}
// This routine is called after all opcodes have been inserted. It loops
@@ -55410,13 +57386,13 @@ func Xsqlite3VdbeReusable(tls *libc.TLS, p uintptr) { /* sqlite3.c:78972:21: */
// This routine will only function correctly if the mkopcodeh.tcl generator
// script numbers the opcodes correctly. Changes to this routine must be
// coordinated with changes to mkopcodeh.tcl.
-func resolveP2Values(tls *libc.TLS, p uintptr, pMaxFuncArgs uintptr) { /* sqlite3.c:79168:13: */
+func resolveP2Values(tls *libc.TLS, p uintptr, pMaxFuncArgs uintptr) { /* sqlite3.c:79700:13: */
var nMaxArgs int32 = *(*int32)(unsafe.Pointer(pMaxFuncArgs))
var pOp uintptr
var pParse uintptr = (*Vdbe)(unsafe.Pointer(p)).FpParse
var aLabel uintptr = (*Parse)(unsafe.Pointer(pParse)).FaLabel
- libc.SetBitFieldPtr16Uint32(p+200 /* &.readOnly */, Bft(1), 7, 0x80)
- libc.SetBitFieldPtr16Uint32(p+200 /* &.bIsReader */, Bft(0), 8, 0x100)
+ libc.SetBitFieldPtr16Uint32(p+200 /* &.readOnly */, Bft(1), 8, 0x100)
+ libc.SetBitFieldPtr16Uint32(p+200 /* &.bIsReader */, Bft(0), 7, 0x80)
pOp = ((*Vdbe)(unsafe.Pointer(p)).FaOp + uintptr(((*Vdbe)(unsafe.Pointer(p)).FnOp-1))*24)
for 1 != 0 {
@@ -55432,7 +57408,7 @@ func resolveP2Values(tls *libc.TLS, p uintptr, pMaxFuncArgs uintptr) { /* sqlite
case OP_Transaction:
{
if (*Op)(unsafe.Pointer(pOp)).Fp2 != 0 {
- libc.SetBitFieldPtr16Uint32(p+200 /* &.readOnly */, Bft(0), 7, 0x80)
+ libc.SetBitFieldPtr16Uint32(p+200 /* &.readOnly */, Bft(0), 8, 0x100)
}
}
@@ -55441,7 +57417,7 @@ func resolveP2Values(tls *libc.TLS, p uintptr, pMaxFuncArgs uintptr) { /* sqlite
fallthrough
case OP_Savepoint:
{
- libc.SetBitFieldPtr16Uint32(p+200 /* &.bIsReader */, Bft(1), 8, 0x100)
+ libc.SetBitFieldPtr16Uint32(p+200 /* &.bIsReader */, Bft(1), 7, 0x80)
break
}
@@ -55452,8 +57428,8 @@ func resolveP2Values(tls *libc.TLS, p uintptr, pMaxFuncArgs uintptr) { /* sqlite
fallthrough
case OP_JournalMode:
{
- libc.SetBitFieldPtr16Uint32(p+200 /* &.readOnly */, Bft(0), 7, 0x80)
- libc.SetBitFieldPtr16Uint32(p+200 /* &.bIsReader */, Bft(1), 8, 0x100)
+ libc.SetBitFieldPtr16Uint32(p+200 /* &.readOnly */, Bft(0), 8, 0x100)
+ libc.SetBitFieldPtr16Uint32(p+200 /* &.bIsReader */, Bft(1), 7, 0x80)
break
}
@@ -55539,7 +57515,7 @@ func resolveP2Values(tls *libc.TLS, p uintptr, pMaxFuncArgs uintptr) { /* sqlite
}
// Return the address of the next instruction to be inserted.
-func Xsqlite3VdbeCurrentAddr(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:79270:20: */
+func Xsqlite3VdbeCurrentAddr(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:79802:20: */
return (*Vdbe)(unsafe.Pointer(p)).FnOp
}
@@ -55570,7 +57546,7 @@ func Xsqlite3VdbeCurrentAddr(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:7927
// array. Also, *pnMaxArg is set to the larger of its current value and
// the number of entries in the Vdbe.apArg[] array required to execute the
// returned program.
-func Xsqlite3VdbeTakeOpArray(tls *libc.TLS, p uintptr, pnOp uintptr, pnMaxArg uintptr) uintptr { /* sqlite3.c:79327:23: */
+func Xsqlite3VdbeTakeOpArray(tls *libc.TLS, p uintptr, pnOp uintptr, pnMaxArg uintptr) uintptr { /* sqlite3.c:79859:23: */
var aOp uintptr = (*Vdbe)(unsafe.Pointer(p)).FaOp
// Check that sqlite3VdbeUsesBtree() was not called on this VM
@@ -55586,7 +57562,7 @@ func Xsqlite3VdbeTakeOpArray(tls *libc.TLS, p uintptr, pnOp uintptr, pnMaxArg ui
//
// Non-zero P2 arguments to jump instructions are automatically adjusted
// so that the jump target is relative to the first operation inserted.
-func Xsqlite3VdbeAddOpList(tls *libc.TLS, p uintptr, nOp int32, aOp uintptr, iLineno int32) uintptr { /* sqlite3.c:79347:23: */
+func Xsqlite3VdbeAddOpList(tls *libc.TLS, p uintptr, nOp int32, aOp uintptr, iLineno int32) uintptr { /* sqlite3.c:79879:23: */
var i int32
var pOut uintptr
var pFirst uintptr
@@ -55630,23 +57606,23 @@ __3:
// Change the value of the opcode, or P1, P2, P3, or P5 operands
// for a specific instruction.
-func Xsqlite3VdbeChangeOpcode(tls *libc.TLS, p uintptr, addr int32, iNewOpcode U8) { /* sqlite3.c:79423:21: */
+func Xsqlite3VdbeChangeOpcode(tls *libc.TLS, p uintptr, addr int32, iNewOpcode U8) { /* sqlite3.c:79955:21: */
(*VdbeOp)(unsafe.Pointer(Xsqlite3VdbeGetOp(tls, p, addr))).Fopcode = iNewOpcode
}
-func Xsqlite3VdbeChangeP1(tls *libc.TLS, p uintptr, addr int32, val int32) { /* sqlite3.c:79426:21: */
+func Xsqlite3VdbeChangeP1(tls *libc.TLS, p uintptr, addr int32, val int32) { /* sqlite3.c:79958:21: */
(*VdbeOp)(unsafe.Pointer(Xsqlite3VdbeGetOp(tls, p, addr))).Fp1 = val
}
-func Xsqlite3VdbeChangeP2(tls *libc.TLS, p uintptr, addr int32, val int32) { /* sqlite3.c:79429:21: */
+func Xsqlite3VdbeChangeP2(tls *libc.TLS, p uintptr, addr int32, val int32) { /* sqlite3.c:79961:21: */
(*VdbeOp)(unsafe.Pointer(Xsqlite3VdbeGetOp(tls, p, addr))).Fp2 = val
}
-func Xsqlite3VdbeChangeP3(tls *libc.TLS, p uintptr, addr int32, val int32) { /* sqlite3.c:79432:21: */
+func Xsqlite3VdbeChangeP3(tls *libc.TLS, p uintptr, addr int32, val int32) { /* sqlite3.c:79964:21: */
(*VdbeOp)(unsafe.Pointer(Xsqlite3VdbeGetOp(tls, p, addr))).Fp3 = val
}
-func Xsqlite3VdbeChangeP5(tls *libc.TLS, p uintptr, p5 U16) { /* sqlite3.c:79435:21: */
+func Xsqlite3VdbeChangeP5(tls *libc.TLS, p uintptr, p5 U16) { /* sqlite3.c:79967:21: */
if (*Vdbe)(unsafe.Pointer(p)).FnOp > 0 {
(*Op)(unsafe.Pointer((*Vdbe)(unsafe.Pointer(p)).FaOp + uintptr(((*Vdbe)(unsafe.Pointer(p)).FnOp-1))*24)).Fp5 = p5
@@ -55655,7 +57631,7 @@ func Xsqlite3VdbeChangeP5(tls *libc.TLS, p uintptr, p5 U16) { /* sqlite3.c:79435
// Change the P2 operand of instruction addr so that it points to
// the address of the next instruction to be coded.
-func Xsqlite3VdbeJumpHere(tls *libc.TLS, p uintptr, addr int32) { /* sqlite3.c:79444:21: */
+func Xsqlite3VdbeJumpHere(tls *libc.TLS, p uintptr, addr int32) { /* sqlite3.c:79976:21: */
Xsqlite3VdbeChangeP2(tls, p, addr, (*Vdbe)(unsafe.Pointer(p)).FnOp)
}
@@ -55670,7 +57646,7 @@ func Xsqlite3VdbeJumpHere(tls *libc.TLS, p uintptr, addr int32) { /* sqlite3.c:7
//
// 7 Once 0 8 0
// 8 ...
-func Xsqlite3VdbeJumpHereOrPopInst(tls *libc.TLS, p uintptr, addr int32) { /* sqlite3.c:79461:21: */
+func Xsqlite3VdbeJumpHereOrPopInst(tls *libc.TLS, p uintptr, addr int32) { /* sqlite3.c:79993:21: */
if addr == ((*Vdbe)(unsafe.Pointer(p)).FnOp - 1) {
(*Vdbe)(unsafe.Pointer(p)).FnOp--
@@ -55681,26 +57657,26 @@ func Xsqlite3VdbeJumpHereOrPopInst(tls *libc.TLS, p uintptr, addr int32) { /* sq
// If the input FuncDef structure is ephemeral, then free it. If
// the FuncDef is not ephermal, then do nothing.
-func freeEphemeralFunction(tls *libc.TLS, db uintptr, pDef uintptr) { /* sqlite3.c:79481:13: */
+func freeEphemeralFunction(tls *libc.TLS, db uintptr, pDef uintptr) { /* sqlite3.c:80013:13: */
if ((*FuncDef)(unsafe.Pointer(pDef)).FfuncFlags & U32(SQLITE_FUNC_EPHEM)) != U32(0) {
Xsqlite3DbFreeNN(tls, db, pDef)
}
}
// Delete a P4 value if necessary.
-func freeP4Mem(tls *libc.TLS, db uintptr, p uintptr) { /* sqlite3.c:79490:29: */
+func freeP4Mem(tls *libc.TLS, db uintptr, p uintptr) { /* sqlite3.c:80022:29: */
if (*Mem)(unsafe.Pointer(p)).FszMalloc != 0 {
Xsqlite3DbFree(tls, db, (*Mem)(unsafe.Pointer(p)).FzMalloc)
}
Xsqlite3DbFreeNN(tls, db, p)
}
-func freeP4FuncCtx(tls *libc.TLS, db uintptr, p uintptr) { /* sqlite3.c:79494:29: */
+func freeP4FuncCtx(tls *libc.TLS, db uintptr, p uintptr) { /* sqlite3.c:80026:29: */
freeEphemeralFunction(tls, db, (*Sqlite3_context)(unsafe.Pointer(p)).FpFunc)
Xsqlite3DbFreeNN(tls, db, p)
}
-func freeP4(tls *libc.TLS, db uintptr, p4type int32, p4 uintptr) { /* sqlite3.c:79498:13: */
+func freeP4(tls *libc.TLS, db uintptr, p4type int32, p4 uintptr) { /* sqlite3.c:80030:13: */
switch p4type {
case -16:
@@ -55761,7 +57737,7 @@ func freeP4(tls *libc.TLS, db uintptr, p4type int32, p4 uintptr) { /* sqlite3.c:
// Free the space allocated for aOp and any p4 values allocated for the
// opcodes contained within. If aOp is not NULL it is assumed to contain
// nOp entries.
-func vdbeFreeOpArray(tls *libc.TLS, db uintptr, aOp uintptr, nOp int32) { /* sqlite3.c:79547:13: */
+func vdbeFreeOpArray(tls *libc.TLS, db uintptr, aOp uintptr, nOp int32) { /* sqlite3.c:80079:13: */
if aOp != 0 {
var pOp uintptr
for pOp = (aOp + uintptr((nOp-1))*24); pOp >= aOp; pOp -= 24 {
@@ -55776,18 +57752,18 @@ func vdbeFreeOpArray(tls *libc.TLS, db uintptr, aOp uintptr, nOp int32) { /* sql
// Link the SubProgram object passed as the second argument into the linked
// list at Vdbe.pSubProgram. This list is used to delete all sub-program
// objects when the VM is no longer required.
-func Xsqlite3VdbeLinkSubProgram(tls *libc.TLS, pVdbe uintptr, p uintptr) { /* sqlite3.c:79565:21: */
+func Xsqlite3VdbeLinkSubProgram(tls *libc.TLS, pVdbe uintptr, p uintptr) { /* sqlite3.c:80097:21: */
(*SubProgram)(unsafe.Pointer(p)).FpNext = (*Vdbe)(unsafe.Pointer(pVdbe)).FpProgram
(*Vdbe)(unsafe.Pointer(pVdbe)).FpProgram = p
}
// Return true if the given Vdbe has any SubPrograms.
-func Xsqlite3VdbeHasSubProgram(tls *libc.TLS, pVdbe uintptr) int32 { /* sqlite3.c:79573:20: */
+func Xsqlite3VdbeHasSubProgram(tls *libc.TLS, pVdbe uintptr) int32 { /* sqlite3.c:80105:20: */
return (libc.Bool32((*Vdbe)(unsafe.Pointer(pVdbe)).FpProgram != uintptr(0)))
}
// Change the opcode at addr into OP_Noop
-func Xsqlite3VdbeChangeToNoop(tls *libc.TLS, p uintptr, addr int32) int32 { /* sqlite3.c:79580:20: */
+func Xsqlite3VdbeChangeToNoop(tls *libc.TLS, p uintptr, addr int32) int32 { /* sqlite3.c:80112:20: */
var pOp uintptr
if (*Sqlite3)(unsafe.Pointer((*Vdbe)(unsafe.Pointer(p)).Fdb)).FmallocFailed != 0 {
return 0
@@ -55803,7 +57779,7 @@ func Xsqlite3VdbeChangeToNoop(tls *libc.TLS, p uintptr, addr int32) int32 { /* s
// If the last opcode is "op" and it is not a jump destination,
// then remove it. Return true if and only if an opcode was removed.
-func Xsqlite3VdbeDeletePriorOpcode(tls *libc.TLS, p uintptr, op U8) int32 { /* sqlite3.c:79596:20: */
+func Xsqlite3VdbeDeletePriorOpcode(tls *libc.TLS, p uintptr, op U8) int32 { /* sqlite3.c:80128:20: */
if ((*Vdbe)(unsafe.Pointer(p)).FnOp > 0) && (int32((*Op)(unsafe.Pointer((*Vdbe)(unsafe.Pointer(p)).FaOp+uintptr(((*Vdbe)(unsafe.Pointer(p)).FnOp-1))*24)).Fopcode) == int32(op)) {
return Xsqlite3VdbeChangeToNoop(tls, p, ((*Vdbe)(unsafe.Pointer(p)).FnOp - 1))
} else {
@@ -55827,7 +57803,7 @@ func Xsqlite3VdbeDeletePriorOpcode(tls *libc.TLS, p uintptr, op U8) int32 { /* s
// the Vdbe. In these cases we can just copy the pointer.
//
// If addr<0 then change P4 on the most recently inserted instruction.
-func vdbeChangeP4Full(tls *libc.TLS, p uintptr, pOp uintptr, zP4 uintptr, n int32) { /* sqlite3.c:79656:29: */
+func vdbeChangeP4Full(tls *libc.TLS, p uintptr, pOp uintptr, zP4 uintptr, n int32) { /* sqlite3.c:80188:29: */
if (*Op)(unsafe.Pointer(pOp)).Fp4type != 0 {
freeP4(tls, (*Vdbe)(unsafe.Pointer(p)).Fdb, int32((*Op)(unsafe.Pointer(pOp)).Fp4type), *(*uintptr)(unsafe.Pointer(pOp + 16 /* &.p4 */)))
(*Op)(unsafe.Pointer(pOp)).Fp4type = int8(0)
@@ -55844,7 +57820,7 @@ func vdbeChangeP4Full(tls *libc.TLS, p uintptr, pOp uintptr, zP4 uintptr, n int3
}
}
-func Xsqlite3VdbeChangeP4(tls *libc.TLS, p uintptr, addr int32, zP4 uintptr, n int32) { /* sqlite3.c:79675:21: */
+func Xsqlite3VdbeChangeP4(tls *libc.TLS, p uintptr, addr int32, zP4 uintptr, n int32) { /* sqlite3.c:80207:21: */
bp := tls.Alloc(8)
defer tls.Free(8)
*(*uintptr)(unsafe.Pointer(bp)) = zP4
@@ -55891,7 +57867,7 @@ func Xsqlite3VdbeChangeP4(tls *libc.TLS, p uintptr, addr int32, zP4 uintptr, n i
// The P4 operand must not have been previously defined. And the new
// P4 must not be P4_INT32. Use sqlite3VdbeChangeP4() in either of
// those cases.
-func Xsqlite3VdbeAppendP4(tls *libc.TLS, p uintptr, pP4 uintptr, n int32) { /* sqlite3.c:79718:21: */
+func Xsqlite3VdbeAppendP4(tls *libc.TLS, p uintptr, pP4 uintptr, n int32) { /* sqlite3.c:80250:21: */
var pOp uintptr
if (*Sqlite3)(unsafe.Pointer((*Vdbe)(unsafe.Pointer(p)).Fdb)).FmallocFailed != 0 {
@@ -55907,7 +57883,7 @@ func Xsqlite3VdbeAppendP4(tls *libc.TLS, p uintptr, pP4 uintptr, n int32) { /* s
// Set the P4 on the most recently added opcode to the KeyInfo for the
// index given.
-func Xsqlite3VdbeSetP4KeyInfo(tls *libc.TLS, pParse uintptr, pIdx uintptr) { /* sqlite3.c:79738:21: */
+func Xsqlite3VdbeSetP4KeyInfo(tls *libc.TLS, pParse uintptr, pIdx uintptr) { /* sqlite3.c:80270:21: */
var v uintptr = (*Parse)(unsafe.Pointer(pParse)).FpVdbe
var pKeyInfo uintptr
@@ -55928,7 +57904,7 @@ func Xsqlite3VdbeSetP4KeyInfo(tls *libc.TLS, pParse uintptr, pIdx uintptr) { /*
// this routine is a valid pointer. But because the dummy.opcode is 0,
// dummy will never be written to. This is verified by code inspection and
// by running with Valgrind.
-func Xsqlite3VdbeGetOp(tls *libc.TLS, p uintptr, addr int32) uintptr { /* sqlite3.c:79805:23: */ // Ignore the MSVC warning about no initializer
+func Xsqlite3VdbeGetOp(tls *libc.TLS, p uintptr, addr int32) uintptr { /* sqlite3.c:80337:23: */ // Ignore the MSVC warning about no initializer
if addr < 0 {
addr = ((*Vdbe)(unsafe.Pointer(p)).FnOp - 1)
@@ -55942,11 +57918,11 @@ func Xsqlite3VdbeGetOp(tls *libc.TLS, p uintptr, addr int32) uintptr { /* sqlite
return uintptr(0)
}
-var dummy VdbeOp /* sqlite3.c:79808:17: */
+var dummy VdbeOp /* sqlite3.c:80340:17: */
// Compute a string that describes the P4 parameter for an opcode.
// Use zTemp for any required temporary buffer space.
-func Xsqlite3VdbeDisplayP4(tls *libc.TLS, db uintptr, pOp uintptr) uintptr { /* sqlite3.c:80012:21: */
+func Xsqlite3VdbeDisplayP4(tls *libc.TLS, db uintptr, pOp uintptr) uintptr { /* sqlite3.c:80540:21: */
bp := tls.Alloc(176)
defer tls.Free(176)
@@ -55960,34 +57936,34 @@ func Xsqlite3VdbeDisplayP4(tls *libc.TLS, db uintptr, pOp uintptr) uintptr { /*
var j int32
var pKeyInfo uintptr = *(*uintptr)(unsafe.Pointer(pOp + 16 /* &.p4 */))
- Xsqlite3_str_appendf(tls, bp+144 /* &x */, ts+3917 /* "k(%d" */, libc.VaList(bp, int32((*KeyInfo)(unsafe.Pointer(pKeyInfo)).FnKeyField)))
+ Xsqlite3_str_appendf(tls, bp+144 /* &x */, ts+4048 /* "k(%d" */, libc.VaList(bp, int32((*KeyInfo)(unsafe.Pointer(pKeyInfo)).FnKeyField)))
for j = 0; j < int32((*KeyInfo)(unsafe.Pointer(pKeyInfo)).FnKeyField); j++ {
var pColl uintptr = *(*uintptr)(unsafe.Pointer((pKeyInfo + 32 /* &.aColl */) + uintptr(j)*8))
var zColl uintptr
if pColl != 0 {
zColl = (*CollSeq)(unsafe.Pointer(pColl)).FzName
} else {
- zColl = ts + 703 /* "" */
+ zColl = ts + 755 /* "" */
}
- if libc.Xstrcmp(tls, zColl, ts+266 /* "BINARY" */) == 0 {
- zColl = ts + 3922 /* "B" */
+ if libc.Xstrcmp(tls, zColl, ts+318 /* "BINARY" */) == 0 {
+ zColl = ts + 4053 /* "B" */
}
- Xsqlite3_str_appendf(tls, bp+144 /* &x */, ts+3924, /* ",%s%s%s" */
+ Xsqlite3_str_appendf(tls, bp+144 /* &x */, ts+4055, /* ",%s%s%s" */
libc.VaList(bp+8, func() uintptr {
if (int32(*(*U8)(unsafe.Pointer((*KeyInfo)(unsafe.Pointer(pKeyInfo)).FaSortFlags + uintptr(j)))) & KEYINFO_ORDER_DESC) != 0 {
- return ts + 3910 /* "-" */
+ return ts + 4041 /* "-" */
}
- return ts + 703 /* "" */
+ return ts + 755 /* "" */
}(),
func() uintptr {
if (int32(*(*U8)(unsafe.Pointer((*KeyInfo)(unsafe.Pointer(pKeyInfo)).FaSortFlags + uintptr(j)))) & KEYINFO_ORDER_BIGNULL) != 0 {
- return ts + 3932 /* "N." */
+ return ts + 4063 /* "N." */
}
- return ts + 703 /* "" */
+ return ts + 755 /* "" */
}(),
zColl))
}
- Xsqlite3_str_append(tls, bp+144 /* &x */, ts+3935 /* ")" */, 1)
+ Xsqlite3_str_append(tls, bp+144 /* &x */, ts+4066 /* ")" */, 1)
break
}
@@ -55995,7 +57971,7 @@ func Xsqlite3VdbeDisplayP4(tls *libc.TLS, db uintptr, pOp uintptr) uintptr { /*
{
var pColl uintptr = *(*uintptr)(unsafe.Pointer(pOp + 16 /* &.p4 */))
- Xsqlite3_str_appendf(tls, bp+144 /* &x */, ts+3937 /* "%.18s-%s" */, libc.VaList(bp+32, (*CollSeq)(unsafe.Pointer(pColl)).FzName,
+ Xsqlite3_str_appendf(tls, bp+144 /* &x */, ts+4068 /* "%.18s-%s" */, libc.VaList(bp+32, (*CollSeq)(unsafe.Pointer(pColl)).FzName,
encnames[(*CollSeq)(unsafe.Pointer(pColl)).Fenc]))
break
@@ -56003,32 +57979,32 @@ func Xsqlite3VdbeDisplayP4(tls *libc.TLS, db uintptr, pOp uintptr) uintptr { /*
case -8:
{
var pDef uintptr = *(*uintptr)(unsafe.Pointer(pOp + 16 /* &.p4 */))
- Xsqlite3_str_appendf(tls, bp+144 /* &x */, ts+3946 /* "%s(%d)" */, libc.VaList(bp+48, (*FuncDef)(unsafe.Pointer(pDef)).FzName, int32((*FuncDef)(unsafe.Pointer(pDef)).FnArg)))
+ Xsqlite3_str_appendf(tls, bp+144 /* &x */, ts+4077 /* "%s(%d)" */, libc.VaList(bp+48, (*FuncDef)(unsafe.Pointer(pDef)).FzName, int32((*FuncDef)(unsafe.Pointer(pDef)).FnArg)))
break
}
case -16:
{
var pDef uintptr = (*Sqlite3_context)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(pOp + 16 /* &.p4 */)))).FpFunc
- Xsqlite3_str_appendf(tls, bp+144 /* &x */, ts+3946 /* "%s(%d)" */, libc.VaList(bp+64, (*FuncDef)(unsafe.Pointer(pDef)).FzName, int32((*FuncDef)(unsafe.Pointer(pDef)).FnArg)))
+ Xsqlite3_str_appendf(tls, bp+144 /* &x */, ts+4077 /* "%s(%d)" */, libc.VaList(bp+64, (*FuncDef)(unsafe.Pointer(pDef)).FzName, int32((*FuncDef)(unsafe.Pointer(pDef)).FnArg)))
break
}
case -14:
{
- Xsqlite3_str_appendf(tls, bp+144 /* &x */, ts+3953 /* "%lld" */, libc.VaList(bp+80, *(*I64)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(pOp + 16 /* &.p4 */))))))
+ Xsqlite3_str_appendf(tls, bp+144 /* &x */, ts+4084 /* "%lld" */, libc.VaList(bp+80, *(*I64)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(pOp + 16 /* &.p4 */))))))
break
}
case -3:
{
- Xsqlite3_str_appendf(tls, bp+144 /* &x */, ts+3958 /* "%d" */, libc.VaList(bp+88, *(*int32)(unsafe.Pointer(pOp + 16 /* &.p4 */))))
+ Xsqlite3_str_appendf(tls, bp+144 /* &x */, ts+4089 /* "%d" */, libc.VaList(bp+88, *(*int32)(unsafe.Pointer(pOp + 16 /* &.p4 */))))
break
}
case -13:
{
- Xsqlite3_str_appendf(tls, bp+144 /* &x */, ts+486 /* "%.16g" */, libc.VaList(bp+96, *(*float64)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(pOp + 16 /* &.p4 */))))))
+ Xsqlite3_str_appendf(tls, bp+144 /* &x */, ts+538 /* "%.16g" */, libc.VaList(bp+96, *(*float64)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(pOp + 16 /* &.p4 */))))))
break
}
@@ -56038,14 +58014,14 @@ func Xsqlite3VdbeDisplayP4(tls *libc.TLS, db uintptr, pOp uintptr) uintptr { /*
if (int32((*Mem)(unsafe.Pointer(pMem)).Fflags) & MEM_Str) != 0 {
zP4 = (*Mem)(unsafe.Pointer(pMem)).Fz
} else if (int32((*Mem)(unsafe.Pointer(pMem)).Fflags) & (MEM_Int | MEM_IntReal)) != 0 {
- Xsqlite3_str_appendf(tls, bp+144 /* &x */, ts+3953 /* "%lld" */, libc.VaList(bp+104, *(*I64)(unsafe.Pointer(pMem /* &.u */))))
+ Xsqlite3_str_appendf(tls, bp+144 /* &x */, ts+4084 /* "%lld" */, libc.VaList(bp+104, *(*I64)(unsafe.Pointer(pMem /* &.u */))))
} else if (int32((*Mem)(unsafe.Pointer(pMem)).Fflags) & MEM_Real) != 0 {
- Xsqlite3_str_appendf(tls, bp+144 /* &x */, ts+486 /* "%.16g" */, libc.VaList(bp+112, *(*float64)(unsafe.Pointer(pMem /* &.u */))))
+ Xsqlite3_str_appendf(tls, bp+144 /* &x */, ts+538 /* "%.16g" */, libc.VaList(bp+112, *(*float64)(unsafe.Pointer(pMem /* &.u */))))
} else if (int32((*Mem)(unsafe.Pointer(pMem)).Fflags) & MEM_Null) != 0 {
- zP4 = ts + 704 /* "NULL" */
+ zP4 = ts + 756 /* "NULL" */
} else {
- zP4 = ts + 3961 /* "(blob)" */
+ zP4 = ts + 4092 /* "(blob)" */
}
break
@@ -56053,7 +58029,7 @@ func Xsqlite3VdbeDisplayP4(tls *libc.TLS, db uintptr, pOp uintptr) uintptr { /*
case -12:
{
var pVtab uintptr = (*VTable)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(pOp + 16 /* &.p4 */)))).FpVtab
- Xsqlite3_str_appendf(tls, bp+144 /* &x */, ts+3968 /* "vtab:%p" */, libc.VaList(bp+120, pVtab))
+ Xsqlite3_str_appendf(tls, bp+144 /* &x */, ts+4099 /* "vtab:%p" */, libc.VaList(bp+120, pVtab))
break
}
@@ -56064,20 +58040,20 @@ func Xsqlite3VdbeDisplayP4(tls *libc.TLS, db uintptr, pOp uintptr) uintptr { /*
var n U32 = *(*U32)(unsafe.Pointer(ai)) // The first element of an INTARRAY is always the
// count of the number of elements to follow
for i = U32(1); i <= n; i++ {
- Xsqlite3_str_appendf(tls, bp+144 /* &x */, ts+3976 /* "%c%u" */, libc.VaList(bp+128, func() int32 {
+ Xsqlite3_str_appendf(tls, bp+144 /* &x */, ts+4107 /* "%c%u" */, libc.VaList(bp+128, func() int32 {
if i == U32(1) {
return '['
}
return ','
}(), *(*U32)(unsafe.Pointer(ai + uintptr(i)*4))))
}
- Xsqlite3_str_append(tls, bp+144 /* &x */, ts+3981 /* "]" */, 1)
+ Xsqlite3_str_append(tls, bp+144 /* &x */, ts+4112 /* "]" */, 1)
break
}
case -4:
{
- zP4 = ts + 3983 /* "program" */
+ zP4 = ts + 4114 /* "program" */
break
}
@@ -56109,7 +58085,7 @@ func Xsqlite3VdbeDisplayP4(tls *libc.TLS, db uintptr, pOp uintptr) uintptr { /*
return Xsqlite3StrAccumFinish(tls, bp+144 /* &x */)
}
-var encnames = [4]uintptr{ts + 3991 /* "?" */, ts + 3993 /* "8" */, ts + 3995 /* "16LE" */, ts + 4000 /* "16BE" */} /* sqlite3.c:80042:25 */
+var encnames = [4]uintptr{ts + 4122 /* "?" */, ts + 4124 /* "8" */, ts + 4126 /* "16LE" */, ts + 4131 /* "16BE" */} /* sqlite3.c:80570:25 */
// Declare to the Vdbe that the BTree object at db->aDb[i] is used.
//
@@ -56117,7 +58093,7 @@ var encnames = [4]uintptr{ts + 3991 /* "?" */, ts + 3993 /* "8" */, ts + 3995 /*
// attached databases that will be use. A mask of these databases
// is maintained in p->btreeMask. The p->lockMask value is the subset of
// p->btreeMask of databases that will require a lock.
-func Xsqlite3VdbeUsesBtree(tls *libc.TLS, p uintptr, i int32) { /* sqlite3.c:80137:21: */
+func Xsqlite3VdbeUsesBtree(tls *libc.TLS, p uintptr, i int32) { /* sqlite3.c:80665:21: */
*(*YDbMask)(unsafe.Pointer(p + 204 /* &.btreeMask */)) |= (YDbMask((YDbMask(1))) << (i))
if (i != 1) && (Xsqlite3BtreeSharable(tls, (*Db)(unsafe.Pointer((*Sqlite3)(unsafe.Pointer((*Vdbe)(unsafe.Pointer(p)).Fdb)).FaDb+uintptr(i)*32)).FpBt) != 0) {
@@ -56144,7 +58120,7 @@ func Xsqlite3VdbeUsesBtree(tls *libc.TLS, p uintptr, i int32) { /* sqlite3.c:801
// corresponding to btrees that use shared cache. Then the runtime of
// this routine is N*N. But as N is rarely more than 1, this should not
// be a problem.
-func Xsqlite3VdbeEnter(tls *libc.TLS, p uintptr) { /* sqlite3.c:80168:21: */
+func Xsqlite3VdbeEnter(tls *libc.TLS, p uintptr) { /* sqlite3.c:80696:21: */
var i int32
var db uintptr
var aDb uintptr
@@ -56163,7 +58139,7 @@ func Xsqlite3VdbeEnter(tls *libc.TLS, p uintptr) { /* sqlite3.c:80168:21: */
}
// Unlock all of the btrees previously locked by a call to sqlite3VdbeEnter().
-func vdbeLeave(tls *libc.TLS, p uintptr) { /* sqlite3.c:80189:29: */
+func vdbeLeave(tls *libc.TLS, p uintptr) { /* sqlite3.c:80717:29: */
var i int32
var db uintptr
var aDb uintptr
@@ -56178,7 +58154,7 @@ func vdbeLeave(tls *libc.TLS, p uintptr) { /* sqlite3.c:80189:29: */
}
}
-func Xsqlite3VdbeLeave(tls *libc.TLS, p uintptr) { /* sqlite3.c:80203:21: */
+func Xsqlite3VdbeLeave(tls *libc.TLS, p uintptr) { /* sqlite3.c:80731:21: */
if ((*Vdbe)(unsafe.Pointer(p)).FlockMask) == YDbMask(0) {
return
} // The common case
@@ -56186,7 +58162,7 @@ func Xsqlite3VdbeLeave(tls *libc.TLS, p uintptr) { /* sqlite3.c:80203:21: */
}
// Initialize an array of N Mem element.
-func initMemArray(tls *libc.TLS, p uintptr, N int32, db uintptr, flags U16) { /* sqlite3.c:80245:13: */
+func initMemArray(tls *libc.TLS, p uintptr, N int32, db uintptr, flags U16) { /* sqlite3.c:80773:13: */
for (libc.PostDecInt32(&N, 1)) > 0 {
(*Mem)(unsafe.Pointer(p)).Fdb = db
(*Mem)(unsafe.Pointer(p)).Fflags = flags
@@ -56196,7 +58172,7 @@ func initMemArray(tls *libc.TLS, p uintptr, N int32, db uintptr, flags U16) { /*
}
// Release an array of N Mem elements
-func releaseMemArray(tls *libc.TLS, p uintptr, N int32) { /* sqlite3.c:80260:13: */
+func releaseMemArray(tls *libc.TLS, p uintptr, N int32) { /* sqlite3.c:80788:13: */
if (p != 0) && (N != 0) {
var pEnd uintptr = (p + uintptr(N)*56)
var db uintptr = (*Mem)(unsafe.Pointer(p)).Fdb
@@ -56239,7 +58215,7 @@ func releaseMemArray(tls *libc.TLS, p uintptr, N int32) { /* sqlite3.c:80260:13:
//
// This routine does not delete the Frame right away. It merely adds the
// frame to a list of frames to be deleted when the Vdbe halts.
-func Xsqlite3VdbeFrameMemDel(tls *libc.TLS, pArg uintptr) { /* sqlite3.c:80322:21: */
+func Xsqlite3VdbeFrameMemDel(tls *libc.TLS, pArg uintptr) { /* sqlite3.c:80850:21: */
var pFrame uintptr = pArg
(*VdbeFrame)(unsafe.Pointer(pFrame)).FpParent = (*Vdbe)(unsafe.Pointer((*VdbeFrame)(unsafe.Pointer(pFrame)).Fv)).FpDelFrame
@@ -56251,7 +58227,7 @@ func Xsqlite3VdbeFrameMemDel(tls *libc.TLS, pArg uintptr) { /* sqlite3.c:80322:2
//
// Return SQLITE_ROW on success. Return SQLITE_DONE if there are no
// more opcodes to be displayed.
-func Xsqlite3VdbeNextOpcode(tls *libc.TLS, p uintptr, pSub uintptr, eMode int32, piPc uintptr, piAddr uintptr, paOp uintptr) int32 { /* sqlite3.c:80337:20: */
+func Xsqlite3VdbeNextOpcode(tls *libc.TLS, p uintptr, pSub uintptr, eMode int32, piPc uintptr, piAddr uintptr, paOp uintptr) int32 { /* sqlite3.c:80865:20: */
var nRow int32 // Stop when row count reaches this
var nSub int32 = 0 // Number of sub-vdbes seen so far
var apSub uintptr = uintptr(0) // Array of sub-vdbes
@@ -56350,7 +58326,7 @@ func Xsqlite3VdbeNextOpcode(tls *libc.TLS, p uintptr, pSub uintptr, eMode int32,
// Delete a VdbeFrame object and its contents. VdbeFrame objects are
// allocated by the OP_Program opcode in sqlite3VdbeExec().
-func Xsqlite3VdbeFrameDelete(tls *libc.TLS, p uintptr) { /* sqlite3.c:80449:21: */
+func Xsqlite3VdbeFrameDelete(tls *libc.TLS, p uintptr) { /* sqlite3.c:80977:21: */
var i int32
var aMem uintptr = ((p) + 112)
var apCsr uintptr = (aMem + uintptr((*VdbeFrame)(unsafe.Pointer(p)).FnChildMem)*56)
@@ -56379,7 +58355,7 @@ func Xsqlite3VdbeFrameDelete(tls *libc.TLS, p uintptr) { /* sqlite3.c:80449:21:
//
// When p->explain==1, first the main program is listed, then each of
// the trigger subprograms are listed one by one.
-func Xsqlite3VdbeList(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:80481:20: */
+func Xsqlite3VdbeList(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:81009:20: */
bp := tls.Alloc(16)
defer tls.Free(16)
@@ -56389,7 +58365,7 @@ func Xsqlite3VdbeList(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:80481:20: *
// Loop counter
var rc int32 = SQLITE_OK // Return code
var pMem uintptr = ((*Vdbe)(unsafe.Pointer(p)).FaMem + 1*56) // First Mem of result set
- var bListSubprogs int32 = (libc.Bool32(((int32(*(*uint16)(unsafe.Pointer(p + 200 /* &.explain */)) >> 12 & 0x3)) == 1) || (((*Sqlite3)(unsafe.Pointer(db)).Fflags & uint64(SQLITE_TriggerEQP)) != uint64(0))))
+ var bListSubprogs int32 = (libc.Bool32(((int32(*(*uint16)(unsafe.Pointer(p + 200 /* &.explain */)) & 0x3000 >> 12)) == 1) || (((*Sqlite3)(unsafe.Pointer(db)).Fflags & uint64(SQLITE_TriggerEQP)) != uint64(0))))
// var aOp uintptr at bp+8, 8
// Array of opcodes
var pOp uintptr // Current opcode
@@ -56419,7 +58395,7 @@ func Xsqlite3VdbeList(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:80481:20: *
}
// Figure out which opcode is next to display
- rc = Xsqlite3VdbeNextOpcode(tls, p, pSub, (libc.Bool32((int32(*(*uint16)(unsafe.Pointer(p + 200 /* &.explain */)) >> 12 & 0x3)) == 2)), (p + 52 /* &.pc */), bp /* &i */, bp+8 /* &aOp */)
+ rc = Xsqlite3VdbeNextOpcode(tls, p, pSub, (libc.Bool32((int32(*(*uint16)(unsafe.Pointer(p + 200 /* &.explain */)) & 0x3000 >> 12)) == 2)), (p + 52 /* &.pc */), bp /* &i */, bp+8 /* &aOp */)
if rc == SQLITE_OK {
pOp = (*(*uintptr)(unsafe.Pointer(bp + 8 /* aOp */)) + uintptr(*(*int32)(unsafe.Pointer(bp /* i */)))*24)
@@ -56429,23 +58405,23 @@ func Xsqlite3VdbeList(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:80481:20: *
Xsqlite3VdbeError(tls, p, Xsqlite3ErrStr(tls, (*Vdbe)(unsafe.Pointer(p)).Frc), 0)
} else {
var zP4 uintptr = Xsqlite3VdbeDisplayP4(tls, db, pOp)
- if (int32(*(*uint16)(unsafe.Pointer(p + 200 /* &.explain */)) >> 12 & 0x3)) == 2 {
+ if (int32(*(*uint16)(unsafe.Pointer(p + 200 /* &.explain */)) & 0x3000 >> 12)) == 2 {
Xsqlite3VdbeMemSetInt64(tls, pMem, int64((*Op)(unsafe.Pointer(pOp)).Fp1))
Xsqlite3VdbeMemSetInt64(tls, (pMem + uintptr(1)*56), int64((*Op)(unsafe.Pointer(pOp)).Fp2))
Xsqlite3VdbeMemSetInt64(tls, (pMem + uintptr(2)*56), int64((*Op)(unsafe.Pointer(pOp)).Fp3))
- Xsqlite3VdbeMemSetStr(tls, (pMem + uintptr(3)*56), zP4, -1, uint8(SQLITE_UTF8), *(*uintptr)(unsafe.Pointer(&struct{ f func(*libc.TLS, uintptr) }{Xsqlite3_free})))
+ Xsqlite3VdbeMemSetStr(tls, (pMem + uintptr(3)*56), zP4, int64(-1), uint8(SQLITE_UTF8), *(*uintptr)(unsafe.Pointer(&struct{ f func(*libc.TLS, uintptr) }{Xsqlite3_free})))
(*Vdbe)(unsafe.Pointer(p)).FnResColumn = U16(4)
} else {
Xsqlite3VdbeMemSetInt64(tls, (pMem + uintptr(0)*56), int64(*(*int32)(unsafe.Pointer(bp /* i */))))
Xsqlite3VdbeMemSetStr(tls, (pMem + uintptr(1)*56), Xsqlite3OpcodeName(tls, int32((*Op)(unsafe.Pointer(pOp)).Fopcode)),
- -1, uint8(SQLITE_UTF8), uintptr(0))
+ int64(-1), uint8(SQLITE_UTF8), uintptr(0))
Xsqlite3VdbeMemSetInt64(tls, (pMem + uintptr(2)*56), int64((*Op)(unsafe.Pointer(pOp)).Fp1))
Xsqlite3VdbeMemSetInt64(tls, (pMem + uintptr(3)*56), int64((*Op)(unsafe.Pointer(pOp)).Fp2))
Xsqlite3VdbeMemSetInt64(tls, (pMem + uintptr(4)*56), int64((*Op)(unsafe.Pointer(pOp)).Fp3))
// pMem+5 for p4 is done last
Xsqlite3VdbeMemSetInt64(tls, (pMem + uintptr(6)*56), int64((*Op)(unsafe.Pointer(pOp)).Fp5))
Xsqlite3VdbeMemSetNull(tls, (pMem + uintptr(7)*56))
- Xsqlite3VdbeMemSetStr(tls, (pMem + uintptr(5)*56), zP4, -1, uint8(SQLITE_UTF8), *(*uintptr)(unsafe.Pointer(&struct{ f func(*libc.TLS, uintptr) }{Xsqlite3_free})))
+ Xsqlite3VdbeMemSetStr(tls, (pMem + uintptr(5)*56), zP4, int64(-1), uint8(SQLITE_UTF8), *(*uintptr)(unsafe.Pointer(&struct{ f func(*libc.TLS, uintptr) }{Xsqlite3_free})))
(*Vdbe)(unsafe.Pointer(p)).FnResColumn = U16(8)
}
(*Vdbe)(unsafe.Pointer(p)).FpResultSet = pMem
@@ -56468,7 +58444,7 @@ type ReusableSpace = struct {
FpSpace uintptr
FnFree Sqlite3_int64
FnNeeded Sqlite3_int64
-} /* sqlite3.c:80626:1 */
+} /* sqlite3.c:81154:1 */
// Try to allocate nByte bytes of 8-byte aligned bulk memory for pBuf
// from the ReusableSpace object. Return a pointer to the allocated
@@ -56483,7 +58459,7 @@ type ReusableSpace = struct {
// This allocator is employed to repurpose unused slots at the end of the
// opcode array of prepared state for other memory needs of the prepared
// statement.
-func allocSpace(tls *libc.TLS, p uintptr, pBuf uintptr, nByte Sqlite3_int64) uintptr { /* sqlite3.c:80646:13: */
+func allocSpace(tls *libc.TLS, p uintptr, pBuf uintptr, nByte Sqlite3_int64) uintptr { /* sqlite3.c:81174:13: */
if pBuf == uintptr(0) {
nByte = (((nByte) + int64(7)) & int64(libc.CplInt32(7)))
@@ -56500,7 +58476,7 @@ func allocSpace(tls *libc.TLS, p uintptr, pBuf uintptr, nByte Sqlite3_int64) uin
// Rewind the VDBE back to the beginning in preparation for
// running it.
-func Xsqlite3VdbeRewind(tls *libc.TLS, p uintptr) { /* sqlite3.c:80669:21: */
+func Xsqlite3VdbeRewind(tls *libc.TLS, p uintptr) { /* sqlite3.c:81197:21: */
// There should be at least one opcode.
@@ -56533,7 +58509,7 @@ func Xsqlite3VdbeRewind(tls *libc.TLS, p uintptr) { /* sqlite3.c:80669:21: */
//
// Use the sqlite3VdbeRewind() procedure to restore a virtual machine back
// to its initial state after it has been run.
-func Xsqlite3VdbeMakeReady(tls *libc.TLS, p uintptr, pParse uintptr) { /* sqlite3.c:80722:21: */
+func Xsqlite3VdbeMakeReady(tls *libc.TLS, p uintptr, pParse uintptr) { /* sqlite3.c:81250:21: */
bp := tls.Alloc(32)
defer tls.Free(32)
@@ -56574,7 +58550,7 @@ func Xsqlite3VdbeMakeReady(tls *libc.TLS, p uintptr, pParse uintptr) { /* sqlite
(*ReusableSpace)(unsafe.Pointer(bp + 8 /* &x */)).FnFree = (Sqlite3_int64(((*Parse)(unsafe.Pointer(pParse)).FszOpAlloc - n) & libc.CplInt32(7))) // Bytes of unused memory
resolveP2Values(tls, p, bp /* &nArg */)
- libc.SetBitFieldPtr16Uint32(p+200 /* &.usesStmtJournal */, Bft((U8(libc.Bool32(((*Parse)(unsafe.Pointer(pParse)).FisMultiWrite != 0) && ((*Parse)(unsafe.Pointer(pParse)).FmayAbort != 0))))), 6, 0x40)
+ libc.SetBitFieldPtr16Uint32(p+200 /* &.usesStmtJournal */, Bft((U8(libc.Bool32(((*Parse)(unsafe.Pointer(pParse)).FisMultiWrite != 0) && ((*Parse)(unsafe.Pointer(pParse)).FmayAbort != 0))))), 9, 0x200)
if (*Parse)(unsafe.Pointer(pParse)).Fexplain != 0 {
var iFirst int32
var mx int32
@@ -56582,7 +58558,7 @@ func Xsqlite3VdbeMakeReady(tls *libc.TLS, p uintptr, pParse uintptr) { /* sqlite
if nMem < 10 {
nMem = 10
}
- libc.SetBitFieldPtr16Uint32(p+200 /* &.explain */, Bft((*Parse)(unsafe.Pointer(pParse)).Fexplain), 2, 0xc)
+ libc.SetBitFieldPtr16Uint32(p+200 /* &.explain */, Bft((*Parse)(unsafe.Pointer(pParse)).Fexplain), 12, 0x3000)
if int32((*Parse)(unsafe.Pointer(pParse)).Fexplain) == 2 {
Xsqlite3VdbeSetNumCols(tls, p, 4)
iFirst = 8
@@ -56597,7 +58573,7 @@ func Xsqlite3VdbeMakeReady(tls *libc.TLS, p uintptr, pParse uintptr) { /* sqlite
azColName[i], uintptr(0))
}
}
- libc.SetBitFieldPtr16Uint32(p+200 /* &.expired */, Bft(0), 0, 0x3)
+ libc.SetBitFieldPtr16Uint32(p+200 /* &.expired */, Bft(0), 14, 0xc000)
// Memory for registers, parameters, cursor, etc, is allocated in one or two
// passes. On the first pass, we try to reuse unused memory at the
@@ -56640,13 +58616,13 @@ func Xsqlite3VdbeMakeReady(tls *libc.TLS, p uintptr, pParse uintptr) { /* sqlite
}
var azColName = [12]uintptr{
- ts + 4005 /* "addr" */, ts + 4010 /* "opcode" */, ts + 4017 /* "p1" */, ts + 4020 /* "p2" */, ts + 4023 /* "p3" */, ts + 4026 /* "p4" */, ts + 4029 /* "p5" */, ts + 4032, /* "comment" */
- ts + 4040 /* "id" */, ts + 4043 /* "parent" */, ts + 4050 /* "notused" */, ts + 4058, /* "detail" */
-} /* sqlite3.c:80770:23 */
+ ts + 4136 /* "addr" */, ts + 4141 /* "opcode" */, ts + 4148 /* "p1" */, ts + 4151 /* "p2" */, ts + 4154 /* "p3" */, ts + 4157 /* "p4" */, ts + 4160 /* "p5" */, ts + 4163, /* "comment" */
+ ts + 4171 /* "id" */, ts + 4174 /* "parent" */, ts + 4181 /* "notused" */, ts + 4189, /* "detail" */
+} /* sqlite3.c:81298:23 */
// Close a VDBE cursor and release all the resources that cursor
// happens to hold.
-func Xsqlite3VdbeFreeCursor(tls *libc.TLS, p uintptr, pCx uintptr) { /* sqlite3.c:80847:21: */
+func Xsqlite3VdbeFreeCursor(tls *libc.TLS, p uintptr, pCx uintptr) { /* sqlite3.c:81375:21: */
if pCx == uintptr(0) {
return
}
@@ -56671,7 +58647,9 @@ func Xsqlite3VdbeFreeCursor(tls *libc.TLS, p uintptr, pCx uintptr) { /* sqlite3.
var pModule uintptr = (*Sqlite3_vtab)(unsafe.Pointer((*Sqlite3_vtab_cursor)(unsafe.Pointer(pVCur)).FpVtab)).FpModule
(*Sqlite3_vtab)(unsafe.Pointer((*Sqlite3_vtab_cursor)(unsafe.Pointer(pVCur)).FpVtab)).FnRef--
- (*(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer((pModule + 56 /* &.xClose */))))(tls, pVCur)
+ (*struct {
+ f func(*libc.TLS, uintptr) int32
+ })(unsafe.Pointer(&struct{ uintptr }{(*Sqlite3_module)(unsafe.Pointer(pModule)).FxClose})).f(tls, pVCur)
break
}
@@ -56679,7 +58657,7 @@ func Xsqlite3VdbeFreeCursor(tls *libc.TLS, p uintptr, pCx uintptr) { /* sqlite3.
}
// Close all cursors in the current frame.
-func closeCursorsInFrame(tls *libc.TLS, p uintptr) { /* sqlite3.c:80879:13: */
+func closeCursorsInFrame(tls *libc.TLS, p uintptr) { /* sqlite3.c:81407:13: */
if (*Vdbe)(unsafe.Pointer(p)).FapCsr != 0 {
var i int32
for i = 0; i < (*Vdbe)(unsafe.Pointer(p)).FnCursor; i++ {
@@ -56695,7 +58673,7 @@ func closeCursorsInFrame(tls *libc.TLS, p uintptr) { /* sqlite3.c:80879:13: */
// Copy the values stored in the VdbeFrame structure to its Vdbe. This
// is used, for example, when a trigger sub-program is halted to restore
// control to the main program.
-func Xsqlite3VdbeFrameRestore(tls *libc.TLS, pFrame uintptr) int32 { /* sqlite3.c:80897:20: */
+func Xsqlite3VdbeFrameRestore(tls *libc.TLS, pFrame uintptr) int32 { /* sqlite3.c:81425:20: */
var v uintptr = (*VdbeFrame)(unsafe.Pointer(pFrame)).Fv
closeCursorsInFrame(tls, v)
(*Vdbe)(unsafe.Pointer(v)).FaOp = (*VdbeFrame)(unsafe.Pointer(pFrame)).FaOp
@@ -56719,7 +58697,7 @@ func Xsqlite3VdbeFrameRestore(tls *libc.TLS, pFrame uintptr) int32 { /* sqlite3.
// cell array. This is necessary as the memory cell array may contain
// pointers to VdbeFrame objects, which may in turn contain pointers to
// open cursors.
-func closeAllCursors(tls *libc.TLS, p uintptr) { /* sqlite3.c:80926:13: */
+func closeAllCursors(tls *libc.TLS, p uintptr) { /* sqlite3.c:81454:13: */
if (*Vdbe)(unsafe.Pointer(p)).FpFrame != 0 {
var pFrame uintptr
for pFrame = (*Vdbe)(unsafe.Pointer(p)).FpFrame; (*VdbeFrame)(unsafe.Pointer(pFrame)).FpParent != 0; pFrame = (*VdbeFrame)(unsafe.Pointer(pFrame)).FpParent {
@@ -56750,7 +58728,7 @@ func closeAllCursors(tls *libc.TLS, p uintptr) { /* sqlite3.c:80926:13: */
// statement. This is now set at compile time, rather than during
// execution of the vdbe program so that sqlite3_column_count() can
// be called on an SQL statement before sqlite3_step().
-func Xsqlite3VdbeSetNumCols(tls *libc.TLS, p uintptr, nResColumn int32) { /* sqlite3.c:80956:21: */
+func Xsqlite3VdbeSetNumCols(tls *libc.TLS, p uintptr, nResColumn int32) { /* sqlite3.c:81484:21: */
var n int32
var db uintptr = (*Vdbe)(unsafe.Pointer(p)).Fdb
@@ -56775,7 +58753,7 @@ func Xsqlite3VdbeSetNumCols(tls *libc.TLS, p uintptr, nResColumn int32) { /* sql
// The final parameter, xDel, must be one of SQLITE_DYNAMIC, SQLITE_STATIC
// or SQLITE_TRANSIENT. If it is SQLITE_DYNAMIC, then the buffer pointed
// to by zName will be freed by sqlite3DbFree() when the vdbe is destroyed.
-func Xsqlite3VdbeSetColName(tls *libc.TLS, p uintptr, idx int32, var1 int32, zName uintptr, xDel uintptr) int32 { /* sqlite3.c:80981:20: */
+func Xsqlite3VdbeSetColName(tls *libc.TLS, p uintptr, idx int32, var1 int32, zName uintptr, xDel uintptr) int32 { /* sqlite3.c:81509:20: */
var rc int32
var pColName uintptr
@@ -56785,7 +58763,7 @@ func Xsqlite3VdbeSetColName(tls *libc.TLS, p uintptr, idx int32, var1 int32, zNa
}
pColName = ((*Vdbe)(unsafe.Pointer(p)).FaColName + uintptr((idx+(var1*int32((*Vdbe)(unsafe.Pointer(p)).FnResColumn))))*56)
- rc = Xsqlite3VdbeMemSetStr(tls, pColName, zName, -1, uint8(SQLITE_UTF8), xDel)
+ rc = Xsqlite3VdbeMemSetStr(tls, pColName, zName, int64(-1), uint8(SQLITE_UTF8), xDel)
return rc
}
@@ -56794,7 +58772,7 @@ func Xsqlite3VdbeSetColName(tls *libc.TLS, p uintptr, idx int32, var1 int32, zNa
// db. If a transaction is active, commit it. If there is a
// write-transaction spanning more than one database file, this routine
// takes care of the super-journal trickery.
-func vdbeCommit(tls *libc.TLS, db uintptr, p uintptr) int32 { /* sqlite3.c:81009:12: */
+func vdbeCommit(tls *libc.TLS, db uintptr, p uintptr) int32 { /* sqlite3.c:81537:12: */
bp := tls.Alloc(72)
defer tls.Free(72)
@@ -56840,7 +58818,9 @@ func vdbeCommit(tls *libc.TLS, db uintptr, p uintptr) int32 { /* sqlite3.c:81009
// If there are any write-transactions at all, invoke the commit hook
if (needXcommit != 0) && ((*Sqlite3)(unsafe.Pointer(db)).FxCommitCallback != 0) {
- rc = (*(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer((db + 280 /* &.xCommitCallback */))))(tls, (*Sqlite3)(unsafe.Pointer(db)).FpCommitArg)
+ rc = (*struct {
+ f func(*libc.TLS, uintptr) int32
+ })(unsafe.Pointer(&struct{ uintptr }{(*Sqlite3)(unsafe.Pointer(db)).FxCommitCallback})).f(tls, (*Sqlite3)(unsafe.Pointer(db)).FpCommitArg)
if rc != 0 {
return (SQLITE_CONSTRAINT | (int32(2) << 8))
}
@@ -56889,7 +58869,7 @@ func vdbeCommit(tls *libc.TLS, db uintptr, p uintptr) int32 { /* sqlite3.c:81009
// Select a super-journal file name
nMainFile = Xsqlite3Strlen30(tls, zMainFile)
- zSuper = Xsqlite3MPrintf(tls, db, ts+4065 /* "%.4c%s%.16c" */, libc.VaList(bp, 0, zMainFile, 0))
+ zSuper = Xsqlite3MPrintf(tls, db, ts+4196 /* "%.4c%s%.16c" */, libc.VaList(bp, 0, zMainFile, 0))
if zSuper == uintptr(0) {
return SQLITE_NOMEM
}
@@ -56899,16 +58879,16 @@ func vdbeCommit(tls *libc.TLS, db uintptr, p uintptr) int32 { /* sqlite3.c:81009
if retryCount != 0 {
if retryCount > 100 {
- Xsqlite3_log(tls, SQLITE_FULL, ts+4077 /* "MJ delete: %s" */, libc.VaList(bp+24, zSuper))
+ Xsqlite3_log(tls, SQLITE_FULL, ts+4208 /* "MJ delete: %s" */, libc.VaList(bp+24, zSuper))
Xsqlite3OsDelete(tls, pVfs, zSuper, 0)
break
} else if retryCount == 1 {
- Xsqlite3_log(tls, SQLITE_FULL, ts+4091 /* "MJ collide: %s" */, libc.VaList(bp+32, zSuper))
+ Xsqlite3_log(tls, SQLITE_FULL, ts+4222 /* "MJ collide: %s" */, libc.VaList(bp+32, zSuper))
}
}
retryCount++
Xsqlite3_randomness(tls, int32(unsafe.Sizeof(U32(0))), bp+56 /* &iRandom */)
- Xsqlite3_snprintf(tls, 13, (zSuper + uintptr(nMainFile)), ts+4106, /* "-mj%06X9%02X" */
+ Xsqlite3_snprintf(tls, 13, (zSuper + uintptr(nMainFile)), ts+4237, /* "-mj%06X9%02X" */
libc.VaList(bp+40, ((*(*U32)(unsafe.Pointer(bp + 56 /* iRandom */))>>8)&U32(0xffffff)), (*(*U32)(unsafe.Pointer(bp + 56 /* iRandom */))&U32(0xff))))
// The antipenultimate character of the super-journal name must
// be "9" to avoid name collisions when using 8+3 filenames.
@@ -57020,7 +59000,7 @@ var aMJNeeded = [6]U8{
/* TRUNCATE */ U8(1),
/* MEMORY */ U8(0),
/* WAL */ U8(0),
-} /* sqlite3.c:81044:23 */
+} /* sqlite3.c:81572:23 */
// This routine checks that the sqlite3.nVdbeActive count variable
// matches the number of vdbe's in the list sqlite3.pVdbe that are
@@ -57038,7 +59018,7 @@ var aMJNeeded = [6]U8{
//
// If an IO error occurs, an SQLITE_IOERR_XXX error code is returned.
// Otherwise SQLITE_OK.
-func vdbeCloseStatement(tls *libc.TLS, p uintptr, eOp int32) int32 { /* sqlite3.c:81305:28: */
+func vdbeCloseStatement(tls *libc.TLS, p uintptr, eOp int32) int32 { /* sqlite3.c:81833:28: */
var db uintptr = (*Vdbe)(unsafe.Pointer(p)).Fdb
var rc int32 = SQLITE_OK
var i int32
@@ -57081,7 +59061,7 @@ func vdbeCloseStatement(tls *libc.TLS, p uintptr, eOp int32) int32 { /* sqlite3.
return rc
}
-func Xsqlite3VdbeCloseStatement(tls *libc.TLS, p uintptr, eOp int32) int32 { /* sqlite3.c:81351:20: */
+func Xsqlite3VdbeCloseStatement(tls *libc.TLS, p uintptr, eOp int32) int32 { /* sqlite3.c:81879:20: */
if ((*Sqlite3)(unsafe.Pointer((*Vdbe)(unsafe.Pointer(p)).Fdb)).FnStatement != 0) && ((*Vdbe)(unsafe.Pointer(p)).FiStatement != 0) {
return vdbeCloseStatement(tls, p, eOp)
}
@@ -57096,13 +59076,13 @@ func Xsqlite3VdbeCloseStatement(tls *libc.TLS, p uintptr, eOp int32) int32 { /*
// If there are outstanding FK violations and this function returns
// SQLITE_ERROR, set the result of the VM to SQLITE_CONSTRAINT_FOREIGNKEY
// and write an error message to it. Then return SQLITE_ERROR.
-func Xsqlite3VdbeCheckFk(tls *libc.TLS, p uintptr, deferred int32) int32 { /* sqlite3.c:81370:20: */
+func Xsqlite3VdbeCheckFk(tls *libc.TLS, p uintptr, deferred int32) int32 { /* sqlite3.c:81898:20: */
var db uintptr = (*Vdbe)(unsafe.Pointer(p)).Fdb
if ((deferred != 0) && (((*Sqlite3)(unsafe.Pointer(db)).FnDeferredCons + (*Sqlite3)(unsafe.Pointer(db)).FnDeferredImmCons) > int64(0))) ||
(!(deferred != 0) && ((*Vdbe)(unsafe.Pointer(p)).FnFkConstraint > int64(0))) {
(*Vdbe)(unsafe.Pointer(p)).Frc = (SQLITE_CONSTRAINT | (int32(3) << 8))
(*Vdbe)(unsafe.Pointer(p)).FerrorAction = U8(OE_Abort)
- Xsqlite3VdbeError(tls, p, ts+4119 /* "FOREIGN KEY cons..." */, 0)
+ Xsqlite3VdbeError(tls, p, ts+4250 /* "FOREIGN KEY cons..." */, 0)
return SQLITE_ERROR
}
return SQLITE_OK
@@ -57119,7 +59099,7 @@ func Xsqlite3VdbeCheckFk(tls *libc.TLS, p uintptr, deferred int32) int32 { /* sq
// Return an error code. If the commit could not complete because of
// lock contention, return SQLITE_BUSY. If SQLITE_BUSY is returned, it
// means the close did not happen and needs to be repeated.
-func Xsqlite3VdbeHalt(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:81397:20: */
+func Xsqlite3VdbeHalt(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:81925:20: */
var rc int32 // Used to store transient return codes
var db uintptr = (*Vdbe)(unsafe.Pointer(p)).Fdb
@@ -57148,7 +59128,7 @@ func Xsqlite3VdbeHalt(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:81397:20: *
// No commit or rollback needed if the program never started or if the
// SQL statement does not read or write a database file.
- if ((*Vdbe)(unsafe.Pointer(p)).Fpc >= 0) && ((Bft(int32(*(*uint16)(unsafe.Pointer(p + 200 /* &.bIsReader */)) >> 7 & 0x1))) != 0) {
+ if ((*Vdbe)(unsafe.Pointer(p)).Fpc >= 0) && ((Bft(int32(*(*uint16)(unsafe.Pointer(p + 200 /* &.bIsReader */)) & 0x80 >> 7))) != 0) {
var mrc int32 // Primary error code from p->rc
var eStatementOp int32 = 0
var isSpecialError int32 // Set to true if a 'special' error
@@ -57172,8 +59152,8 @@ func Xsqlite3VdbeHalt(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:81397:20: *
// file as part of an effort to free up cache space (see function
// pagerStress() in pager.c), the rollback is required to restore
// the pager to a consistent state.
- if !((int32(*(*uint16)(unsafe.Pointer(p + 200 /* &.readOnly */)) >> 8 & 0x1)) != 0) || (mrc != SQLITE_INTERRUPT) {
- if ((mrc == SQLITE_NOMEM) || (mrc == SQLITE_FULL)) && ((Bft(int32(*(*uint16)(unsafe.Pointer(p + 200 /* &.usesStmtJournal */)) >> 9 & 0x1))) != 0) {
+ if !((int32(*(*uint16)(unsafe.Pointer(p + 200 /* &.readOnly */)) & 0x100 >> 8)) != 0) || (mrc != SQLITE_INTERRUPT) {
+ if ((mrc == SQLITE_NOMEM) || (mrc == SQLITE_FULL)) && ((Bft(int32(*(*uint16)(unsafe.Pointer(p + 200 /* &.usesStmtJournal */)) & 0x200 >> 9))) != 0) {
eStatementOp = SAVEPOINT_ROLLBACK
} else {
// We are forced to roll back the active transaction. Before doing
@@ -57198,11 +59178,11 @@ func Xsqlite3VdbeHalt(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:81397:20: *
// above has occurred.
if (!(((*Sqlite3)(unsafe.Pointer((db))).FnVTrans > 0) && ((*Sqlite3)(unsafe.Pointer((db))).FaVTrans == uintptr(0))) &&
((*Sqlite3)(unsafe.Pointer(db)).FautoCommit != 0)) &&
- ((*Sqlite3)(unsafe.Pointer(db)).FnVdbeWrite == (libc.Bool32((int32(*(*uint16)(unsafe.Pointer(p + 200 /* &.readOnly */)) >> 8 & 0x1)) == 0))) {
+ ((*Sqlite3)(unsafe.Pointer(db)).FnVdbeWrite == (libc.Bool32((int32(*(*uint16)(unsafe.Pointer(p + 200 /* &.readOnly */)) & 0x100 >> 8)) == 0))) {
if ((*Vdbe)(unsafe.Pointer(p)).Frc == SQLITE_OK) || ((int32((*Vdbe)(unsafe.Pointer(p)).FerrorAction) == OE_Fail) && !(isSpecialError != 0)) {
rc = Xsqlite3VdbeCheckFk(tls, p, 1)
if rc != SQLITE_OK {
- if (Bft(int32(*(*uint16)(unsafe.Pointer(p + 200 /* &.readOnly */)) >> 8 & 0x1))) != 0 {
+ if (Bft(int32(*(*uint16)(unsafe.Pointer(p + 200 /* &.readOnly */)) & 0x100 >> 8))) != 0 {
Xsqlite3VdbeLeave(tls, p)
return SQLITE_ERROR
}
@@ -57214,7 +59194,7 @@ func Xsqlite3VdbeHalt(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:81397:20: *
// is required.
rc = vdbeCommit(tls, db, p)
}
- if (rc == SQLITE_BUSY) && ((Bft(int32(*(*uint16)(unsafe.Pointer(p + 200 /* &.readOnly */)) >> 8 & 0x1))) != 0) {
+ if (rc == SQLITE_BUSY) && ((Bft(int32(*(*uint16)(unsafe.Pointer(p + 200 /* &.readOnly */)) & 0x100 >> 8))) != 0) {
Xsqlite3VdbeLeave(tls, p)
return SQLITE_BUSY
} else if rc != SQLITE_OK {
@@ -57267,7 +59247,7 @@ func Xsqlite3VdbeHalt(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:81397:20: *
// If this was an INSERT, UPDATE or DELETE and no statement transaction
// has been rolled back, update the database connection change-counter.
- if (Bft(int32(*(*uint16)(unsafe.Pointer(p + 200 /* &.changeCntOn */)) >> 11 & 0x1))) != 0 {
+ if (Bft(int32(*(*uint16)(unsafe.Pointer(p + 200 /* &.changeCntOn */)) & 0x800 >> 11))) != 0 {
if eStatementOp != SAVEPOINT_ROLLBACK {
Xsqlite3VdbeSetChanges(tls, db, (*Vdbe)(unsafe.Pointer(p)).FnChange)
} else {
@@ -57283,10 +59263,10 @@ func Xsqlite3VdbeHalt(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:81397:20: *
// We have successfully halted and closed the VM. Record this fact.
if (*Vdbe)(unsafe.Pointer(p)).Fpc >= 0 {
(*Sqlite3)(unsafe.Pointer(db)).FnVdbeActive--
- if !((int32(*(*uint16)(unsafe.Pointer(p + 200 /* &.readOnly */)) >> 8 & 0x1)) != 0) {
+ if !((int32(*(*uint16)(unsafe.Pointer(p + 200 /* &.readOnly */)) & 0x100 >> 8)) != 0) {
(*Sqlite3)(unsafe.Pointer(db)).FnVdbeWrite--
}
- if (Bft(int32(*(*uint16)(unsafe.Pointer(p + 200 /* &.bIsReader */)) >> 7 & 0x1))) != 0 {
+ if (Bft(int32(*(*uint16)(unsafe.Pointer(p + 200 /* &.bIsReader */)) & 0x80 >> 7))) != 0 {
(*Sqlite3)(unsafe.Pointer(db)).FnVdbeRead--
}
@@ -57314,7 +59294,7 @@ func Xsqlite3VdbeHalt(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:81397:20: *
// Each VDBE holds the result of the most recent sqlite3_step() call
// in p->rc. This routine sets that result back to SQLITE_OK.
-func Xsqlite3VdbeResetStepResult(tls *libc.TLS, p uintptr) { /* sqlite3.c:81598:21: */
+func Xsqlite3VdbeResetStepResult(tls *libc.TLS, p uintptr) { /* sqlite3.c:82126:21: */
(*Vdbe)(unsafe.Pointer(p)).Frc = SQLITE_OK
}
@@ -57324,7 +59304,7 @@ func Xsqlite3VdbeResetStepResult(tls *libc.TLS, p uintptr) { /* sqlite3.c:81598:
//
// This function does not clear the VDBE error code or message, just
// copies them to the database handle.
-func Xsqlite3VdbeTransferError(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:81610:20: */
+func Xsqlite3VdbeTransferError(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:82138:20: */
var db uintptr = (*Vdbe)(unsafe.Pointer(p)).Fdb
var rc int32 = (*Vdbe)(unsafe.Pointer(p)).Frc
if (*Vdbe)(unsafe.Pointer(p)).FzErrMsg != 0 {
@@ -57352,7 +59332,7 @@ func Xsqlite3VdbeTransferError(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:81
// To look at it another way, this routine resets the state of the
// virtual machine from VDBE_MAGIC_RUN or VDBE_MAGIC_HALT back to
// VDBE_MAGIC_INIT.
-func Xsqlite3VdbeReset(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:81659:20: */
+func Xsqlite3VdbeReset(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:82187:20: */
bp := tls.Alloc(8)
defer tls.Free(8)
@@ -57375,16 +59355,16 @@ func Xsqlite3VdbeReset(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:81659:20:
} else {
(*Sqlite3)(unsafe.Pointer(db)).FerrCode = (*Vdbe)(unsafe.Pointer(p)).Frc
}
- if (Bft(int32(*(*uint16)(unsafe.Pointer(p + 200 /* &.runOnlyOnce */)) >> 10 & 0x1))) != 0 {
- libc.SetBitFieldPtr16Uint32(p+200 /* &.expired */, Bft(1), 0, 0x3)
+ if (Bft(int32(*(*uint16)(unsafe.Pointer(p + 200 /* &.runOnlyOnce */)) & 0x400 >> 10))) != 0 {
+ libc.SetBitFieldPtr16Uint32(p+200 /* &.expired */, Bft(1), 14, 0xc000)
}
- } else if ((*Vdbe)(unsafe.Pointer(p)).Frc != 0) && ((Bft(int32(*(*uint16)(unsafe.Pointer(p + 200 /* &.expired */)) >> 14 & 0x3))) != 0) {
+ } else if ((*Vdbe)(unsafe.Pointer(p)).Frc != 0) && ((Bft(int32(*(*uint16)(unsafe.Pointer(p + 200 /* &.expired */)) & 0xc000 >> 14))) != 0) {
// The expired flag was set on the VDBE before the first call
// to sqlite3_step(). For consistency (since sqlite3_step() was
// called), set the database error in this case as well.
Xsqlite3ErrorWithMsg(tls, db, (*Vdbe)(unsafe.Pointer(p)).Frc, func() uintptr {
if (*Vdbe)(unsafe.Pointer(p)).FzErrMsg != 0 {
- return ts + 2718 /* "%s" */
+ return ts + 2790 /* "%s" */
}
return uintptr(0)
}(), libc.VaList(bp, (*Vdbe)(unsafe.Pointer(p)).FzErrMsg))
@@ -57404,7 +59384,7 @@ func Xsqlite3VdbeReset(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:81659:20:
// Clean up and delete a VDBE after execution. Return an integer which is
// the result code. Write any error message text into *pzErrMsg.
-func Xsqlite3VdbeFinalize(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:81756:20: */
+func Xsqlite3VdbeFinalize(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:82284:20: */
var rc int32 = SQLITE_OK
if ((*Vdbe)(unsafe.Pointer(p)).FiVdbeMagic == U32(VDBE_MAGIC_RUN)) || ((*Vdbe)(unsafe.Pointer(p)).FiVdbeMagic == U32(VDBE_MAGIC_HALT)) {
rc = Xsqlite3VdbeReset(tls, p)
@@ -57428,7 +59408,7 @@ func Xsqlite3VdbeFinalize(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:81756:2
//
// * the corresponding bit in argument mask is clear (where the first
// function parameter corresponds to bit 0 etc.).
-func Xsqlite3VdbeDeleteAuxData(tls *libc.TLS, db uintptr, pp uintptr, iOp int32, mask int32) { /* sqlite3.c:81782:21: */
+func Xsqlite3VdbeDeleteAuxData(tls *libc.TLS, db uintptr, pp uintptr, iOp int32, mask int32) { /* sqlite3.c:82310:21: */
for *(*uintptr)(unsafe.Pointer(pp)) != 0 {
var pAux uintptr = *(*uintptr)(unsafe.Pointer(pp))
if (iOp < 0) ||
@@ -57437,7 +59417,7 @@ func Xsqlite3VdbeDeleteAuxData(tls *libc.TLS, db uintptr, pp uintptr, iOp int32,
(((*AuxData)(unsafe.Pointer(pAux)).FiAuxArg > 31) || !((uint32(mask) & (uint32((uint32(1))) << ((*AuxData)(unsafe.Pointer(pAux)).FiAuxArg))) != 0))) {
if (*AuxData)(unsafe.Pointer(pAux)).FxDeleteAux != 0 {
- (*(*func(*libc.TLS, uintptr))(unsafe.Pointer((pAux + 16 /* &.xDeleteAux */))))(tls, (*AuxData)(unsafe.Pointer(pAux)).FpAux)
+ (*struct{ f func(*libc.TLS, uintptr) })(unsafe.Pointer(&struct{ uintptr }{(*AuxData)(unsafe.Pointer(pAux)).FxDeleteAux})).f(tls, (*AuxData)(unsafe.Pointer(pAux)).FpAux)
}
*(*uintptr)(unsafe.Pointer(pp)) = (*AuxData)(unsafe.Pointer(pAux)).FpNextAux
Xsqlite3DbFree(tls, db, pAux)
@@ -57453,7 +59433,7 @@ func Xsqlite3VdbeDeleteAuxData(tls *libc.TLS, db uintptr, pp uintptr, iOp int32,
// The difference between this function and sqlite3VdbeDelete() is that
// VdbeDelete() also unlinks the Vdbe from the list of VMs associated with
// the database connection and frees the object itself.
-func Xsqlite3VdbeClearObject(tls *libc.TLS, db uintptr, p uintptr) { /* sqlite3.c:81810:21: */
+func Xsqlite3VdbeClearObject(tls *libc.TLS, db uintptr, p uintptr) { /* sqlite3.c:82338:21: */
var pSub uintptr
var pNext uintptr
@@ -57474,7 +59454,7 @@ func Xsqlite3VdbeClearObject(tls *libc.TLS, db uintptr, p uintptr) { /* sqlite3.
}
// Delete an entire VDBE.
-func Xsqlite3VdbeDelete(tls *libc.TLS, p uintptr) { /* sqlite3.c:81851:21: */
+func Xsqlite3VdbeDelete(tls *libc.TLS, p uintptr) { /* sqlite3.c:82379:21: */
var db uintptr
db = (*Vdbe)(unsafe.Pointer(p)).Fdb
@@ -57497,7 +59477,7 @@ func Xsqlite3VdbeDelete(tls *libc.TLS, p uintptr) { /* sqlite3.c:81851:21: */
// The cursor "p" has a pending seek operation that has not yet been
// carried out. Seek the cursor now. If an error occurs, return
// the appropriate error code.
-func Xsqlite3VdbeFinishMoveto(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:81877:36: */
+func Xsqlite3VdbeFinishMoveto(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:82405:36: */
bp := tls.Alloc(4)
defer tls.Free(4)
@@ -57510,7 +59490,7 @@ func Xsqlite3VdbeFinishMoveto(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:818
return rc
}
if *(*int32)(unsafe.Pointer(bp /* res */)) != 0 {
- return Xsqlite3CorruptError(tls, 81887)
+ return Xsqlite3CorruptError(tls, 82415)
}
(*VdbeCursor)(unsafe.Pointer(p)).FdeferredMoveto = U8(0)
(*VdbeCursor)(unsafe.Pointer(p)).FcacheStatus = U32(CACHE_STALE)
@@ -57522,7 +59502,7 @@ func Xsqlite3VdbeFinishMoveto(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:818
// rebalanced. Whatever the cause, try to restore "p" to the place it
// is supposed to be pointing. If the row was deleted out from under the
// cursor, set the cursor to point to a NULL row.
-func handleMovedCursor(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:81903:28: */
+func handleMovedCursor(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:82431:28: */
bp := tls.Alloc(4)
defer tls.Free(4)
@@ -57540,7 +59520,7 @@ func handleMovedCursor(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:81903:28:
// Check to ensure that the cursor is valid. Restore the cursor
// if need be. Return any I/O error from the restore operation.
-func Xsqlite3VdbeCursorRestore(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:81918:20: */
+func Xsqlite3VdbeCursorRestore(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:82446:20: */
if Xsqlite3BtreeCursorHasMoved(tls, *(*uintptr)(unsafe.Pointer(p + 56 /* &.uc */))) != 0 {
return handleMovedCursor(tls, p)
@@ -57559,7 +59539,7 @@ func Xsqlite3VdbeCursorRestore(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:81
//
// If the cursor is already pointing to the correct row and that row has
// not been deleted out from under the cursor, then this routine is a no-op.
-func Xsqlite3VdbeCursorMoveto(tls *libc.TLS, pp uintptr, piCol uintptr) int32 { /* sqlite3.c:81939:20: */
+func Xsqlite3VdbeCursorMoveto(tls *libc.TLS, pp uintptr, piCol uintptr) int32 { /* sqlite3.c:82467:20: */
var p uintptr = *(*uintptr)(unsafe.Pointer(pp))
if (*VdbeCursor)(unsafe.Pointer(p)).FdeferredMoveto != 0 {
@@ -57634,10 +59614,10 @@ var sqlite3SmallTypeSizes = [128]U8{
/* 100 */ U8(44), U8(44), U8(45), U8(45), U8(46), U8(46), U8(47), U8(47), U8(48), U8(48),
/* 110 */ U8(49), U8(49), U8(50), U8(50), U8(51), U8(51), U8(52), U8(52), U8(53), U8(53),
/* 120 */ U8(54), U8(54), U8(55), U8(55), U8(56), U8(56), U8(57), U8(57),
-} /* sqlite3.c:82076:17 */
+} /* sqlite3.c:82604:17 */
// Return the length of the data corresponding to the supplied serial-type.
-func Xsqlite3VdbeSerialTypeLen(tls *libc.TLS, serial_type U32) U32 { /* sqlite3.c:82096:20: */
+func Xsqlite3VdbeSerialTypeLen(tls *libc.TLS, serial_type U32) U32 { /* sqlite3.c:82624:20: */
if serial_type >= U32(128) {
return ((serial_type - U32(12)) / U32(2))
} else {
@@ -57647,7 +59627,7 @@ func Xsqlite3VdbeSerialTypeLen(tls *libc.TLS, serial_type U32) U32 { /* sqlite3.
return U32(0)
}
-func Xsqlite3VdbeOneByteSerialTypeLen(tls *libc.TLS, serial_type U8) U8 { /* sqlite3.c:82105:19: */
+func Xsqlite3VdbeOneByteSerialTypeLen(tls *libc.TLS, serial_type U8) U8 { /* sqlite3.c:82633:19: */
return sqlite3SmallTypeSizes[serial_type]
}
@@ -57696,7 +59676,7 @@ func Xsqlite3VdbeOneByteSerialTypeLen(tls *libc.TLS, serial_type U8) U8 { /* sql
// Return the number of bytes actually written into buf[]. The number
// of bytes in the zero-filled tail is included in the return value only
// if those bytes were zeroed in buf[].
-func Xsqlite3VdbeSerialPut(tls *libc.TLS, buf uintptr, pMem uintptr, serial_type U32) U32 { /* sqlite3.c:82176:20: */
+func Xsqlite3VdbeSerialPut(tls *libc.TLS, buf uintptr, pMem uintptr, serial_type U32) U32 { /* sqlite3.c:82704:20: */
bp := tls.Alloc(8)
defer tls.Free(8)
@@ -57747,7 +59727,7 @@ func Xsqlite3VdbeSerialPut(tls *libc.TLS, buf uintptr, pMem uintptr, serial_type
// The few cases that require local variables are broken out into a separate
// routine so that in most cases the overhead of moving the stack pointer
// is avoided.
-func serialGet(tls *libc.TLS, buf uintptr, serial_type U32, pMem uintptr) U32 { /* sqlite3.c:82230:12: */
+func serialGet(tls *libc.TLS, buf uintptr, serial_type U32, pMem uintptr) U32 { /* sqlite3.c:82758:12: */
bp := tls.Alloc(8)
defer tls.Free(8)
@@ -57775,7 +59755,7 @@ func serialGet(tls *libc.TLS, buf uintptr, serial_type U32, pMem uintptr) U32 {
return U32(8)
}
-func Xsqlite3VdbeSerialGet(tls *libc.TLS, buf uintptr, serial_type U32, pMem uintptr) U32 { /* sqlite3.c:82266:20: */
+func Xsqlite3VdbeSerialGet(tls *libc.TLS, buf uintptr, serial_type U32, pMem uintptr) U32 { /* sqlite3.c:82794:20: */
switch serial_type {
case U32(10):
{ // Internal use only: NULL with virtual table
@@ -57877,7 +59857,7 @@ func Xsqlite3VdbeSerialGet(tls *libc.TLS, buf uintptr, serial_type U32, pMem uin
return U32(0)
}
-var aFlag = [2]U16{(U16(MEM_Blob | MEM_Ephem)), (U16(MEM_Str | MEM_Ephem))} /* sqlite3.c:82348:24 */
+var aFlag = [2]U16{(U16(MEM_Blob | MEM_Ephem)), (U16(MEM_Str | MEM_Ephem))} /* sqlite3.c:82876:24 */
// This routine is used to allocate sufficient space for an UnpackedRecord
// structure large enough to be used with sqlite3VdbeRecordUnpack() if
@@ -57891,7 +59871,7 @@ var aFlag = [2]U16{(U16(MEM_Blob | MEM_Ephem)), (U16(MEM_Str | MEM_Ephem))} /* s
// before returning.
//
// If an OOM error occurs, NULL is returned.
-func Xsqlite3VdbeAllocUnpackedRecord(tls *libc.TLS, pKeyInfo uintptr) uintptr { /* sqlite3.c:82371:31: */
+func Xsqlite3VdbeAllocUnpackedRecord(tls *libc.TLS, pKeyInfo uintptr) uintptr { /* sqlite3.c:82899:31: */
var p uintptr // Unpacked record to return
var nByte int32 // Number of bytes required for *p
nByte = (int32((((uint64(unsafe.Sizeof(UnpackedRecord{}))) + uint64(7)) & libc.Uint64FromInt32(libc.CplInt32(7))) + (uint64(unsafe.Sizeof(Mem{})) * (uint64(int32((*KeyInfo)(unsafe.Pointer(pKeyInfo)).FnKeyField) + 1)))))
@@ -57909,7 +59889,7 @@ func Xsqlite3VdbeAllocUnpackedRecord(tls *libc.TLS, pKeyInfo uintptr) uintptr {
// Given the nKey-byte encoding of a record in pKey[], populate the
// UnpackedRecord structure indicated by the fourth argument with the
// contents of the decoded record.
-func Xsqlite3VdbeRecordUnpack(tls *libc.TLS, pKeyInfo uintptr, nKey int32, pKey uintptr, p uintptr) { /* sqlite3.c:82391:21: */
+func Xsqlite3VdbeRecordUnpack(tls *libc.TLS, pKeyInfo uintptr, nKey int32, pKey uintptr, p uintptr) { /* sqlite3.c:82919:21: */
bp := tls.Alloc(8)
defer tls.Free(8)
@@ -57972,14 +59952,16 @@ func Xsqlite3VdbeRecordUnpack(tls *libc.TLS, pKeyInfo uintptr, nKey int32, pKey
// using the collation sequence pColl. As usual, return a negative , zero
// or positive value if *pMem1 is less than, equal to or greater than
// *pMem2, respectively. Similar in spirit to "rc = (*pMem1) - (*pMem2);".
-func vdbeCompareMemString(tls *libc.TLS, pMem1 uintptr, pMem2 uintptr, pColl uintptr, prcErr uintptr) int32 { /* sqlite3.c:82586:12: */
+func vdbeCompareMemString(tls *libc.TLS, pMem1 uintptr, pMem2 uintptr, pColl uintptr, prcErr uintptr) int32 { /* sqlite3.c:83114:12: */
bp := tls.Alloc(112)
defer tls.Free(112)
if int32((*Mem)(unsafe.Pointer(pMem1)).Fenc) == int32((*CollSeq)(unsafe.Pointer(pColl)).Fenc) {
// The strings are already in the correct encoding. Call the
// comparison function directly
- return (*(*func(*libc.TLS, uintptr, int32, uintptr, int32, uintptr) int32)(unsafe.Pointer((pColl + 24 /* &.xCmp */))))(tls, (*CollSeq)(unsafe.Pointer(pColl)).FpUser, (*Mem)(unsafe.Pointer(pMem1)).Fn, (*Mem)(unsafe.Pointer(pMem1)).Fz, (*Mem)(unsafe.Pointer(pMem2)).Fn, (*Mem)(unsafe.Pointer(pMem2)).Fz)
+ return (*struct {
+ f func(*libc.TLS, uintptr, int32, uintptr, int32, uintptr) int32
+ })(unsafe.Pointer(&struct{ uintptr }{(*CollSeq)(unsafe.Pointer(pColl)).FxCmp})).f(tls, (*CollSeq)(unsafe.Pointer(pColl)).FpUser, (*Mem)(unsafe.Pointer(pMem1)).Fn, (*Mem)(unsafe.Pointer(pMem1)).Fz, (*Mem)(unsafe.Pointer(pMem2)).Fn, (*Mem)(unsafe.Pointer(pMem2)).Fz)
} else {
var rc int32
var v1 uintptr
@@ -58000,7 +59982,9 @@ func vdbeCompareMemString(tls *libc.TLS, pMem1 uintptr, pMem2 uintptr, pColl uin
}
rc = 0
} else {
- rc = (*(*func(*libc.TLS, uintptr, int32, uintptr, int32, uintptr) int32)(unsafe.Pointer((pColl + 24 /* &.xCmp */))))(tls, (*CollSeq)(unsafe.Pointer(pColl)).FpUser, (*Mem)(unsafe.Pointer(bp /* &c1 */)).Fn, v1, (*Mem)(unsafe.Pointer(bp+56 /* &c2 */)).Fn, v2)
+ rc = (*struct {
+ f func(*libc.TLS, uintptr, int32, uintptr, int32, uintptr) int32
+ })(unsafe.Pointer(&struct{ uintptr }{(*CollSeq)(unsafe.Pointer(pColl)).FxCmp})).f(tls, (*CollSeq)(unsafe.Pointer(pColl)).FpUser, (*Mem)(unsafe.Pointer(bp /* &c1 */)).Fn, v1, (*Mem)(unsafe.Pointer(bp+56 /* &c2 */)).Fn, v2)
}
Xsqlite3VdbeMemRelease(tls, bp /* &c1 */)
Xsqlite3VdbeMemRelease(tls, bp+56 /* &c2 */)
@@ -58011,10 +59995,10 @@ func vdbeCompareMemString(tls *libc.TLS, pMem1 uintptr, pMem2 uintptr, pColl uin
// The input pBlob is guaranteed to be a Blob that is not marked
// with MEM_Zero. Return true if it could be a zero-blob.
-func isAllZero(tls *libc.TLS, z uintptr, n int32) int32 { /* sqlite3.c:82623:12: */
+func isAllZero(tls *libc.TLS, z uintptr, n int32) int32 { /* sqlite3.c:83151:12: */
var i int32
for i = 0; i < n; i++ {
- if *(*int8)(unsafe.Pointer(z + uintptr(i))) != 0 {
+ if *(*uint8)(unsafe.Pointer(z + uintptr(i))) != 0 {
return 0
}
}
@@ -58024,7 +60008,7 @@ func isAllZero(tls *libc.TLS, z uintptr, n int32) int32 { /* sqlite3.c:82623:12:
// Compare two blobs. Return negative, zero, or positive if the first
// is less than, equal to, or greater than the second, respectively.
// If one blob is a prefix of the other, then the shorter is the lessor.
-func Xsqlite3BlobCompare(tls *libc.TLS, pB1 uintptr, pB2 uintptr) int32 { /* sqlite3.c:82636:36: */
+func Xsqlite3BlobCompare(tls *libc.TLS, pB1 uintptr, pB2 uintptr) int32 { /* sqlite3.c:83164:36: */
var c int32
var n1 int32 = (*Mem)(unsafe.Pointer(pB1)).Fn
var n2 int32 = (*Mem)(unsafe.Pointer(pB2)).Fn
@@ -58064,7 +60048,7 @@ func Xsqlite3BlobCompare(tls *libc.TLS, pB1 uintptr, pB2 uintptr) int32 { /* sql
// Do a comparison between a 64-bit signed integer and a 64-bit floating-point
// number. Return negative, zero, or positive if the first (i64) is less than,
// equal to, or greater than the second (double).
-func sqlite3IntFloatCompare(tls *libc.TLS, i I64, r float64) int32 { /* sqlite3.c:82669:12: */
+func sqlite3IntFloatCompare(tls *libc.TLS, i I64, r float64) int32 { /* sqlite3.c:83197:12: */
if uint64(unsafe.Sizeof(float64(0))) > uint64(8) {
var x float64 = float64(i)
@@ -58110,7 +60094,7 @@ func sqlite3IntFloatCompare(tls *libc.TLS, i I64, r float64) int32 { /* sqlite3.
// sequence pColl and finally blob's ordered by memcmp().
//
// Two NULL values are considered equal by this function.
-func Xsqlite3MemCompare(tls *libc.TLS, pMem1 uintptr, pMem2 uintptr, pColl uintptr) int32 { /* sqlite3.c:82702:20: */
+func Xsqlite3MemCompare(tls *libc.TLS, pMem1 uintptr, pMem2 uintptr, pColl uintptr) int32 { /* sqlite3.c:83230:20: */
var f1 int32
var f2 int32
var combined_flags int32
@@ -58204,7 +60188,7 @@ func Xsqlite3MemCompare(tls *libc.TLS, pMem1 uintptr, pMem2 uintptr, pColl uintp
// except 7. The second points to a buffer containing an integer value
// serialized according to serial_type. This function deserializes
// and returns the value.
-func vdbeRecordDecodeInt(tls *libc.TLS, serial_type U32, aKey uintptr) I64 { /* sqlite3.c:82801:12: */
+func vdbeRecordDecodeInt(tls *libc.TLS, serial_type U32, aKey uintptr) I64 { /* sqlite3.c:83329:12: */
bp := tls.Alloc(16)
defer tls.Free(16)
@@ -58267,7 +60251,7 @@ func vdbeRecordDecodeInt(tls *libc.TLS, serial_type U32, aKey uintptr) I64 { /*
// SQLITE_CORRUPT and return 0. If an OOM error is encountered,
// pPKey2->errCode is set to SQLITE_NOMEM and, if it is not NULL, the
// malloc-failed flag set on database handle (pPKey2->pKeyInfo->db).
-func Xsqlite3VdbeRecordCompareWithSkip(tls *libc.TLS, nKey1 int32, pKey1 uintptr, pPKey2 uintptr, bSkip int32) int32 { /* sqlite3.c:82856:20: */
+func Xsqlite3VdbeRecordCompareWithSkip(tls *libc.TLS, nKey1 int32, pKey1 uintptr, pPKey2 uintptr, bSkip int32) int32 { /* sqlite3.c:83384:20: */
bp := tls.Alloc(68)
defer tls.Free(68)
@@ -58315,7 +60299,7 @@ func Xsqlite3VdbeRecordCompareWithSkip(tls *libc.TLS, nKey1 int32, pKey1 uintptr
i = 0
}
if d1 > uint32(nKey1) {
- (*UnpackedRecord)(unsafe.Pointer(pPKey2)).FerrCode = U8(Xsqlite3CorruptError(tls, 82887))
+ (*UnpackedRecord)(unsafe.Pointer(pPKey2)).FerrCode = U8(Xsqlite3CorruptError(tls, 83415))
return 0 // Corruption
}
@@ -58380,7 +60364,7 @@ func Xsqlite3VdbeRecordCompareWithSkip(tls *libc.TLS, nKey1 int32, pKey1 uintptr
if ((d1 + U32((*Mem)(unsafe.Pointer(bp+8 /* &mem1 */)).Fn)) > uint32(nKey1)) ||
(int32((*KeyInfo)(unsafe.Pointer((libc.AssignUintptr(&pKeyInfo, (*UnpackedRecord)(unsafe.Pointer(pPKey2)).FpKeyInfo)))).FnAllField) <= i) {
- (*UnpackedRecord)(unsafe.Pointer(pPKey2)).FerrCode = U8(Xsqlite3CorruptError(tls, 82964))
+ (*UnpackedRecord)(unsafe.Pointer(pPKey2)).FerrCode = U8(Xsqlite3CorruptError(tls, 83492))
return 0 // Corruption
} else if *(*uintptr)(unsafe.Pointer((pKeyInfo + 32 /* &.aColl */) + uintptr(i)*8)) != 0 {
(*Mem)(unsafe.Pointer(bp + 8 /* &mem1 */)).Fenc = (*KeyInfo)(unsafe.Pointer(pKeyInfo)).Fenc
@@ -58415,7 +60399,7 @@ func Xsqlite3VdbeRecordCompareWithSkip(tls *libc.TLS, nKey1 int32, pKey1 uintptr
var nStr int32 = (int32((*(*U32)(unsafe.Pointer(bp + 64 /* serial_type */)) - U32(12)) / U32(2)))
if (d1 + U32(nStr)) > uint32(nKey1) {
- (*UnpackedRecord)(unsafe.Pointer(pPKey2)).FerrCode = U8(Xsqlite3CorruptError(tls, 82994))
+ (*UnpackedRecord)(unsafe.Pointer(pPKey2)).FerrCode = U8(Xsqlite3CorruptError(tls, 83522))
return 0 // Corruption
} else if (int32((*Mem)(unsafe.Pointer(pRhs)).Fflags) & MEM_Zero) != 0 {
if !(isAllZero(tls, (aKey1+uintptr(d1)), nStr) != 0) {
@@ -58476,7 +60460,7 @@ func Xsqlite3VdbeRecordCompareWithSkip(tls *libc.TLS, nKey1 int32, pKey1 uintptr
return int32((*UnpackedRecord)(unsafe.Pointer(pPKey2)).Fdefault_rc)
}
-func Xsqlite3VdbeRecordCompare(tls *libc.TLS, nKey1 int32, pKey1 uintptr, pPKey2 uintptr) int32 { /* sqlite3.c:83053:20: */
+func Xsqlite3VdbeRecordCompare(tls *libc.TLS, nKey1 int32, pKey1 uintptr, pPKey2 uintptr) int32 { /* sqlite3.c:83581:20: */
return Xsqlite3VdbeRecordCompareWithSkip(tls, nKey1, pKey1, pPKey2, 0)
}
@@ -58487,7 +60471,7 @@ func Xsqlite3VdbeRecordCompare(tls *libc.TLS, nKey1 int32, pKey1 uintptr, pPKey2
//
// To avoid concerns about buffer overreads, this routine is only used
// on schemas where the maximum valid header size is 63 bytes or less.
-func vdbeRecordCompareInt(tls *libc.TLS, nKey1 int32, pKey1 uintptr, pPKey2 uintptr) int32 { /* sqlite3.c:83070:12: */
+func vdbeRecordCompareInt(tls *libc.TLS, nKey1 int32, pKey1 uintptr, pPKey2 uintptr) int32 { /* sqlite3.c:83598:12: */
bp := tls.Alloc(16)
defer tls.Free(16)
@@ -58592,7 +60576,7 @@ func vdbeRecordCompareInt(tls *libc.TLS, nKey1 int32, pKey1 uintptr, pPKey2 uint
// that (a) the first field of pPKey2 is a string, that (b) the first field
// uses the collation sequence BINARY and (c) that the size-of-header varint
// at the start of (pKey1/nKey1) fits in a single byte.
-func vdbeRecordCompareString(tls *libc.TLS, nKey1 int32, pKey1 uintptr, pPKey2 uintptr) int32 { /* sqlite3.c:83164:12: */
+func vdbeRecordCompareString(tls *libc.TLS, nKey1 int32, pKey1 uintptr, pPKey2 uintptr) int32 { /* sqlite3.c:83692:12: */
bp := tls.Alloc(4)
defer tls.Free(4)
@@ -58616,7 +60600,7 @@ func vdbeRecordCompareString(tls *libc.TLS, nKey1 int32, pKey1 uintptr, pPKey2 u
nStr = ((*(*int32)(unsafe.Pointer(bp /* serial_type */)) - 12) / 2)
if (szHdr + nStr) > nKey1 {
- (*UnpackedRecord)(unsafe.Pointer(pPKey2)).FerrCode = U8(Xsqlite3CorruptError(tls, 83189))
+ (*UnpackedRecord)(unsafe.Pointer(pPKey2)).FerrCode = U8(Xsqlite3CorruptError(tls, 83717))
return 0 // Corruption
}
nCmp = func() int32 {
@@ -58654,7 +60638,7 @@ func vdbeRecordCompareString(tls *libc.TLS, nKey1 int32, pKey1 uintptr, pPKey2 u
// Return a pointer to an sqlite3VdbeRecordCompare() compatible function
// suitable for comparing serialized records to the unpacked record passed
// as the only argument.
-func Xsqlite3VdbeFindCompare(tls *libc.TLS, p uintptr) RecordCompare { /* sqlite3.c:83228:30: */
+func Xsqlite3VdbeFindCompare(tls *libc.TLS, p uintptr) RecordCompare { /* sqlite3.c:83756:30: */
// varintRecordCompareInt() and varintRecordCompareString() both assume
// that the size-of-header varint that occurs at the start of each record
// fits in a single byte (i.e. is 127 or less). varintRecordCompareInt()
@@ -58708,7 +60692,7 @@ func Xsqlite3VdbeFindCompare(tls *libc.TLS, p uintptr) RecordCompare { /* sqlite
//
// pCur might be pointing to text obtained from a corrupt database file.
// So the content cannot be trusted. Do appropriate checks on the content.
-func Xsqlite3VdbeIdxRowid(tls *libc.TLS, db uintptr, pCur uintptr, rowid uintptr) int32 { /* sqlite3.c:83279:20: */
+func Xsqlite3VdbeIdxRowid(tls *libc.TLS, db uintptr, pCur uintptr, rowid uintptr) int32 { /* sqlite3.c:83807:20: */
bp := tls.Alloc(120)
defer tls.Free(120)
@@ -58793,7 +60777,7 @@ __6:
idx_rowid_corruption:
;
Xsqlite3VdbeMemRelease(tls, bp /* &m */)
- return Xsqlite3CorruptError(tls, 83344)
+ return Xsqlite3CorruptError(tls, 83872)
}
// Compare the key of the index entry that cursor pC is pointing to against
@@ -58805,7 +60789,7 @@ idx_rowid_corruption:
// omits the rowid at the end. The rowid at the end of the index entry
// is ignored as well. Hence, this routine only compares the prefixes
// of the keys prior to the final rowid, not the entire key.
-func Xsqlite3VdbeIdxKeyCompare(tls *libc.TLS, db uintptr, pC uintptr, pUnpacked uintptr, res uintptr) int32 { /* sqlite3.c:83358:20: */
+func Xsqlite3VdbeIdxKeyCompare(tls *libc.TLS, db uintptr, pC uintptr, pUnpacked uintptr, res uintptr) int32 { /* sqlite3.c:83886:20: */
bp := tls.Alloc(56)
defer tls.Free(56)
@@ -58821,7 +60805,7 @@ func Xsqlite3VdbeIdxKeyCompare(tls *libc.TLS, db uintptr, pC uintptr, pUnpacked
// that btreeParseCellPtr() and sqlite3GetVarint32() are implemented
if (nCellKey <= int64(0)) || (nCellKey > int64(0x7fffffff)) {
*(*int32)(unsafe.Pointer(res)) = 0
- return Xsqlite3CorruptError(tls, 83377)
+ return Xsqlite3CorruptError(tls, 83905)
}
Xsqlite3VdbeMemInit(tls, bp /* &m */, db, uint16(0))
rc = Xsqlite3VdbeMemFromBtreeZeroOffset(tls, pCur, U32(nCellKey), bp /* &m */)
@@ -58835,7 +60819,7 @@ func Xsqlite3VdbeIdxKeyCompare(tls *libc.TLS, db uintptr, pC uintptr, pUnpacked
// This routine sets the value to be returned by subsequent calls to
// sqlite3_changes() on the database handle 'db'.
-func Xsqlite3VdbeSetChanges(tls *libc.TLS, db uintptr, nChange int32) { /* sqlite3.c:83393:21: */
+func Xsqlite3VdbeSetChanges(tls *libc.TLS, db uintptr, nChange int32) { /* sqlite3.c:83921:21: */
(*Sqlite3)(unsafe.Pointer(db)).FnChange = nChange
*(*int32)(unsafe.Pointer(db + 124 /* &.nTotalChange */)) += (nChange)
@@ -58843,8 +60827,8 @@ func Xsqlite3VdbeSetChanges(tls *libc.TLS, db uintptr, nChange int32) { /* sqlit
// Set a flag in the vdbe to update the change counter when it is finalised
// or reset.
-func Xsqlite3VdbeCountChanges(tls *libc.TLS, v uintptr) { /* sqlite3.c:83403:21: */
- libc.SetBitFieldPtr16Uint32(v+200 /* &.changeCntOn */, Bft(1), 4, 0x10)
+func Xsqlite3VdbeCountChanges(tls *libc.TLS, v uintptr) { /* sqlite3.c:83931:21: */
+ libc.SetBitFieldPtr16Uint32(v+200 /* &.changeCntOn */, Bft(1), 11, 0x800)
}
// Mark every prepared statement associated with a database connection
@@ -58863,20 +60847,20 @@ func Xsqlite3VdbeCountChanges(tls *libc.TLS, v uintptr) { /* sqlite3.c:83403:21:
// Internally, this function just sets the Vdbe.expired flag on all
// prepared statements. The flag is set to 1 for an immediate expiration
// and set to 2 for an advisory expiration.
-func Xsqlite3ExpirePreparedStatements(tls *libc.TLS, db uintptr, iCode int32) { /* sqlite3.c:83425:21: */
+func Xsqlite3ExpirePreparedStatements(tls *libc.TLS, db uintptr, iCode int32) { /* sqlite3.c:83953:21: */
var p uintptr
for p = (*Sqlite3)(unsafe.Pointer(db)).FpVdbe; p != 0; p = (*Vdbe)(unsafe.Pointer(p)).FpNext {
- libc.SetBitFieldPtr16Uint32(p+200 /* &.expired */, (Bft(iCode + 1)), 0, 0x3)
+ libc.SetBitFieldPtr16Uint32(p+200 /* &.expired */, (Bft(iCode + 1)), 14, 0xc000)
}
}
// Return the database associated with the Vdbe.
-func Xsqlite3VdbeDb(tls *libc.TLS, v uintptr) uintptr { /* sqlite3.c:83435:24: */
+func Xsqlite3VdbeDb(tls *libc.TLS, v uintptr) uintptr { /* sqlite3.c:83963:24: */
return (*Vdbe)(unsafe.Pointer(v)).Fdb
}
// Return the SQLITE_PREPARE flags for a Vdbe.
-func Xsqlite3VdbePrepareFlags(tls *libc.TLS, v uintptr) U8 { /* sqlite3.c:83442:19: */
+func Xsqlite3VdbePrepareFlags(tls *libc.TLS, v uintptr) U8 { /* sqlite3.c:83970:19: */
return (*Vdbe)(unsafe.Pointer(v)).FprepFlags
}
@@ -58886,7 +60870,7 @@ func Xsqlite3VdbePrepareFlags(tls *libc.TLS, v uintptr) U8 { /* sqlite3.c:83442:
// constants) to the value before returning it.
//
// The returned value must be freed by the caller using sqlite3ValueFree().
-func Xsqlite3VdbeGetBoundValue(tls *libc.TLS, v uintptr, iVar int32, aff U8) uintptr { /* sqlite3.c:83454:30: */
+func Xsqlite3VdbeGetBoundValue(tls *libc.TLS, v uintptr, iVar int32, aff U8) uintptr { /* sqlite3.c:83982:30: */
if v != 0 {
var pMem uintptr = ((*Vdbe)(unsafe.Pointer(v)).FaVar + uintptr((iVar-1))*56)
@@ -58906,7 +60890,7 @@ func Xsqlite3VdbeGetBoundValue(tls *libc.TLS, v uintptr, iVar int32, aff U8) uin
// Configure SQL variable iVar so that binding a new value to it signals
// to sqlite3_reoptimize() that re-preparing the statement may result
// in a better query plan.
-func Xsqlite3VdbeSetVarmask(tls *libc.TLS, v uintptr, iVar int32) { /* sqlite3.c:83476:21: */
+func Xsqlite3VdbeSetVarmask(tls *libc.TLS, v uintptr, iVar int32) { /* sqlite3.c:84004:21: */
if iVar >= 32 {
*(*U32)(unsafe.Pointer(v + 276 /* &.expmask */)) |= (0x80000000)
@@ -58922,7 +60906,7 @@ func Xsqlite3VdbeSetVarmask(tls *libc.TLS, v uintptr, iVar int32) { /* sqlite3.c
// throw an error if it is given inputs that would make it non-deterministic.
// This routine is invoked by date/time functions that use non-deterministic
// features such as 'now'.
-func Xsqlite3NotPureFunc(tls *libc.TLS, pCtx uintptr) int32 { /* sqlite3.c:83495:20: */
+func Xsqlite3NotPureFunc(tls *libc.TLS, pCtx uintptr) int32 { /* sqlite3.c:84023:20: */
bp := tls.Alloc(16)
defer tls.Free(16)
@@ -58935,13 +60919,13 @@ func Xsqlite3NotPureFunc(tls *libc.TLS, pCtx uintptr) int32 { /* sqlite3.c:83495
var zContext uintptr
var zMsg uintptr
if (int32((*VdbeOp)(unsafe.Pointer(pOp)).Fp5) & NC_IsCheck) != 0 {
- zContext = ts + 4149 /* "a CHECK constrai..." */
+ zContext = ts + 4280 /* "a CHECK constrai..." */
} else if (int32((*VdbeOp)(unsafe.Pointer(pOp)).Fp5) & NC_GenCol) != 0 {
- zContext = ts + 4168 /* "a generated colu..." */
+ zContext = ts + 4299 /* "a generated colu..." */
} else {
- zContext = ts + 4187 /* "an index" */
+ zContext = ts + 4318 /* "an index" */
}
- zMsg = Xsqlite3_mprintf(tls, ts+4196, /* "non-deterministi..." */
+ zMsg = Xsqlite3_mprintf(tls, ts+4327, /* "non-deterministi..." */
libc.VaList(bp, (*FuncDef)(unsafe.Pointer((*Sqlite3_context)(unsafe.Pointer(pCtx)).FpFunc)).FzName, zContext))
Xsqlite3_result_error(tls, pCtx, zMsg, -1)
Xsqlite3_free(tls, zMsg)
@@ -58953,7 +60937,7 @@ func Xsqlite3NotPureFunc(tls *libc.TLS, pCtx uintptr) int32 { /* sqlite3.c:83495
// Transfer error message text from an sqlite3_vtab.zErrMsg (text stored
// in memory obtained from sqlite3_malloc) into a Vdbe.zErrMsg (text stored
// in memory obtained from sqlite3DbMalloc).
-func Xsqlite3VtabImportErrmsg(tls *libc.TLS, p uintptr, pVtab uintptr) { /* sqlite3.c:83526:21: */
+func Xsqlite3VtabImportErrmsg(tls *libc.TLS, p uintptr, pVtab uintptr) { /* sqlite3.c:84054:21: */
if (*Sqlite3_vtab)(unsafe.Pointer(pVtab)).FzErrMsg != 0 {
var db uintptr = (*Vdbe)(unsafe.Pointer(p)).Fdb
Xsqlite3DbFree(tls, db, (*Vdbe)(unsafe.Pointer(p)).FzErrMsg)
@@ -58969,7 +60953,7 @@ func Xsqlite3VtabImportErrmsg(tls *libc.TLS, p uintptr, pVtab uintptr) { /* sqli
//
// This function is used to free UnpackedRecord structures allocated by
// the vdbeUnpackRecord() function found in vdbeapi.c.
-func vdbeFreeUnpacked(tls *libc.TLS, db uintptr, nField int32, p uintptr) { /* sqlite3.c:83547:13: */
+func vdbeFreeUnpacked(tls *libc.TLS, db uintptr, nField int32, p uintptr) { /* sqlite3.c:84075:13: */
if p != 0 {
var i int32
for i = 0; i < nField; i++ {
@@ -58986,7 +60970,7 @@ func vdbeFreeUnpacked(tls *libc.TLS, db uintptr, nField int32, p uintptr) { /* s
// then cursor passed as the second argument should point to the row about
// to be update or deleted. If the application calls sqlite3_preupdate_old(),
// the required value will be read from the row the cursor points to.
-func Xsqlite3VdbePreUpdateHook(tls *libc.TLS, v uintptr, pCsr uintptr, op int32, zDb uintptr, pTab uintptr, iKey1 I64, iReg int32) { /* sqlite3.c:83566:21: */
+func Xsqlite3VdbePreUpdateHook(tls *libc.TLS, v uintptr, pCsr uintptr, op int32, zDb uintptr, pTab uintptr, iKey1 I64, iReg int32, iBlobWrite int32) { /* sqlite3.c:84094:21: */
bp := tls.Alloc(136)
defer tls.Free(136)
@@ -59019,9 +61003,12 @@ func Xsqlite3VdbePreUpdateHook(tls *libc.TLS, v uintptr, pCsr uintptr, op int32,
(*PreUpdate)(unsafe.Pointer(bp /* &preupdate */)).FiKey1 = iKey1
(*PreUpdate)(unsafe.Pointer(bp /* &preupdate */)).FiKey2 = iKey2
(*PreUpdate)(unsafe.Pointer(bp /* &preupdate */)).FpTab = pTab
+ (*PreUpdate)(unsafe.Pointer(bp /* &preupdate */)).FiBlobWrite = iBlobWrite
(*Sqlite3)(unsafe.Pointer(db)).FpPreUpdate = bp /* &preupdate */
- (*(*func(*libc.TLS, uintptr, uintptr, int32, uintptr, uintptr, Sqlite3_int64, Sqlite3_int64))(unsafe.Pointer((db + 336 /* &.xPreUpdateCallback */))))(tls, (*Sqlite3)(unsafe.Pointer(db)).FpPreUpdateArg, db, op, zDb, zTbl, iKey1, iKey2)
+ (*struct {
+ f func(*libc.TLS, uintptr, uintptr, int32, uintptr, uintptr, Sqlite3_int64, Sqlite3_int64)
+ })(unsafe.Pointer(&struct{ uintptr }{(*Sqlite3)(unsafe.Pointer(db)).FxPreUpdateCallback})).f(tls, (*Sqlite3)(unsafe.Pointer(db)).FpPreUpdateArg, db, op, zDb, zTbl, iKey1, iKey2)
(*Sqlite3)(unsafe.Pointer(db)).FpPreUpdate = uintptr(0)
Xsqlite3DbFree(tls, db, (*PreUpdate)(unsafe.Pointer(bp /* &preupdate */)).FaRecord)
vdbeFreeUnpacked(tls, db, (int32((*PreUpdate)(unsafe.Pointer(bp /* &preupdate */)).Fkeyinfo.FnKeyField) + 1), (*PreUpdate)(unsafe.Pointer(bp /* &preupdate */)).FpUnpacked)
@@ -59035,7 +61022,7 @@ func Xsqlite3VdbePreUpdateHook(tls *libc.TLS, v uintptr, pCsr uintptr, op int32,
}
}
-var fakeSortOrder U8 = U8(0) /* sqlite3.c:83579:19 */
+var fakeSortOrder U8 = U8(0) /* sqlite3.c:84108:19 */
//************* End of vdbeaux.c ********************************************
//************* Begin file vdbeapi.c ****************************************
@@ -59061,17 +61048,17 @@ var fakeSortOrder U8 = U8(0) /* sqlite3.c:83579:19 */
// that sqlite3_prepare() generates. For example, if new functions or
// collating sequences are registered or if an authorizer function is
// added or changed.
-func Xsqlite3_expired(tls *libc.TLS, pStmt uintptr) int32 { /* sqlite3.c:83655:16: */
+func Xsqlite3_expired(tls *libc.TLS, pStmt uintptr) int32 { /* sqlite3.c:84185:16: */
var p uintptr = pStmt
- return (libc.Bool32((p == uintptr(0)) || ((Bft(int32(*(*uint16)(unsafe.Pointer(p + 200 /* &.expired */)) >> 14 & 0x3))) != 0)))
+ return (libc.Bool32((p == uintptr(0)) || ((Bft(int32(*(*uint16)(unsafe.Pointer(p + 200 /* &.expired */)) & 0xc000 >> 14))) != 0)))
}
// Check on a Vdbe to make sure it has not been finalized. Log
// an error and return true if it has been finalized (or is otherwise
// invalid). Return false if it is ok.
-func vdbeSafety(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:83666:12: */
+func vdbeSafety(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:84196:12: */
if (*Vdbe)(unsafe.Pointer(p)).Fdb == uintptr(0) {
- Xsqlite3_log(tls, SQLITE_MISUSE, ts+4232 /* "API called with ..." */, 0)
+ Xsqlite3_log(tls, SQLITE_MISUSE, ts+4363 /* "API called with ..." */, 0)
return 1
} else {
return 0
@@ -59079,9 +61066,9 @@ func vdbeSafety(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:83666:12: */
return int32(0)
}
-func vdbeSafetyNotNull(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:83674:12: */
+func vdbeSafetyNotNull(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:84204:12: */
if p == uintptr(0) {
- Xsqlite3_log(tls, SQLITE_MISUSE, ts+4277 /* "API called with ..." */, 0)
+ Xsqlite3_log(tls, SQLITE_MISUSE, ts+4408 /* "API called with ..." */, 0)
return 1
} else {
return vdbeSafety(tls, p)
@@ -59091,7 +61078,7 @@ func vdbeSafetyNotNull(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:83674:12:
// Invoke the profile callback. This routine is only called if we already
// know that the profile callback is defined and needs to be invoked.
-func invokeProfileCallback(tls *libc.TLS, db uintptr, p uintptr) { /* sqlite3.c:83688:29: */
+func invokeProfileCallback(tls *libc.TLS, db uintptr, p uintptr) { /* sqlite3.c:84218:29: */
bp := tls.Alloc(16)
defer tls.Free(16)
@@ -59102,10 +61089,14 @@ func invokeProfileCallback(tls *libc.TLS, db uintptr, p uintptr) { /* sqlite3.c:
Xsqlite3OsCurrentTimeInt64(tls, (*Sqlite3)(unsafe.Pointer(db)).FpVfs, bp /* &iNow */)
*(*Sqlite3_int64)(unsafe.Pointer(bp + 8 /* iElapse */)) = ((*(*Sqlite3_int64)(unsafe.Pointer(bp /* iNow */)) - (*Vdbe)(unsafe.Pointer(p)).FstartTime) * int64(1000000))
if (*Sqlite3)(unsafe.Pointer(db)).FxProfile != 0 {
- (*(*func(*libc.TLS, uintptr, uintptr, U64))(unsafe.Pointer((db + 256 /* &.xProfile */))))(tls, (*Sqlite3)(unsafe.Pointer(db)).FpProfileArg, (*Vdbe)(unsafe.Pointer(p)).FzSql, uint64(*(*Sqlite3_int64)(unsafe.Pointer(bp + 8 /* iElapse */))))
+ (*struct {
+ f func(*libc.TLS, uintptr, uintptr, U64)
+ })(unsafe.Pointer(&struct{ uintptr }{(*Sqlite3)(unsafe.Pointer(db)).FxProfile})).f(tls, (*Sqlite3)(unsafe.Pointer(db)).FpProfileArg, (*Vdbe)(unsafe.Pointer(p)).FzSql, uint64(*(*Sqlite3_int64)(unsafe.Pointer(bp + 8 /* iElapse */))))
}
if (int32((*Sqlite3)(unsafe.Pointer(db)).FmTrace) & SQLITE_TRACE_PROFILE) != 0 {
- (*(*func(*libc.TLS, U32, uintptr, uintptr, uintptr) int32)(unsafe.Pointer((db + 240 /* &.trace */ /* &.xV2 */))))(tls, uint32(SQLITE_TRACE_PROFILE), (*Sqlite3)(unsafe.Pointer(db)).FpTraceArg, p, bp+8 /* &iElapse */)
+ (*struct {
+ f func(*libc.TLS, U32, uintptr, uintptr, uintptr) int32
+ })(unsafe.Pointer(&struct{ uintptr }{*(*uintptr)(unsafe.Pointer(db + 240 /* &.trace */))})).f(tls, uint32(SQLITE_TRACE_PROFILE), (*Sqlite3)(unsafe.Pointer(db)).FpTraceArg, p, bp+8 /* &iElapse */)
}
(*Vdbe)(unsafe.Pointer(p)).FstartTime = int64(0)
}
@@ -59120,7 +61111,7 @@ func invokeProfileCallback(tls *libc.TLS, db uintptr, p uintptr) { /* sqlite3.c:
//
// This routine sets the error code and string returned by
// sqlite3_errcode(), sqlite3_errmsg() and sqlite3_errmsg16().
-func Xsqlite3_finalize(tls *libc.TLS, pStmt uintptr) int32 { /* sqlite3.c:83726:16: */
+func Xsqlite3_finalize(tls *libc.TLS, pStmt uintptr) int32 { /* sqlite3.c:84256:16: */
var rc int32
if pStmt == uintptr(0) {
// IMPLEMENTATION-OF: R-57228-12904 Invoking sqlite3_finalize() on a NULL
@@ -59130,7 +61121,7 @@ func Xsqlite3_finalize(tls *libc.TLS, pStmt uintptr) int32 { /* sqlite3.c:83726:
var v uintptr = pStmt
var db uintptr = (*Vdbe)(unsafe.Pointer(v)).Fdb
if vdbeSafety(tls, v) != 0 {
- return Xsqlite3MisuseError(tls, 83735)
+ return Xsqlite3MisuseError(tls, 84265)
}
Xsqlite3_mutex_enter(tls, (*Sqlite3)(unsafe.Pointer(db)).Fmutex)
if ((*Vdbe)(unsafe.Pointer(v)).FstartTime) > int64(0) {
@@ -59150,7 +61141,7 @@ func Xsqlite3_finalize(tls *libc.TLS, pStmt uintptr) int32 { /* sqlite3.c:83726:
//
// This routine sets the error code and string returned by
// sqlite3_errcode(), sqlite3_errmsg() and sqlite3_errmsg16().
-func Xsqlite3_reset(tls *libc.TLS, pStmt uintptr) int32 { /* sqlite3.c:83753:16: */
+func Xsqlite3_reset(tls *libc.TLS, pStmt uintptr) int32 { /* sqlite3.c:84283:16: */
var rc int32
if pStmt == uintptr(0) {
rc = SQLITE_OK
@@ -59172,7 +61163,7 @@ func Xsqlite3_reset(tls *libc.TLS, pStmt uintptr) int32 { /* sqlite3.c:83753:16:
}
// Set all the parameters in the compiled SQL statement to NULL.
-func Xsqlite3_clear_bindings(tls *libc.TLS, pStmt uintptr) int32 { /* sqlite3.c:83774:16: */
+func Xsqlite3_clear_bindings(tls *libc.TLS, pStmt uintptr) int32 { /* sqlite3.c:84304:16: */
var i int32
var rc int32 = SQLITE_OK
var p uintptr = pStmt
@@ -59184,7 +61175,7 @@ func Xsqlite3_clear_bindings(tls *libc.TLS, pStmt uintptr) int32 { /* sqlite3.c:
}
if (*Vdbe)(unsafe.Pointer(p)).Fexpmask != 0 {
- libc.SetBitFieldPtr16Uint32(p+200 /* &.expired */, Bft(1), 0, 0x3)
+ libc.SetBitFieldPtr16Uint32(p+200 /* &.expired */, Bft(1), 14, 0xc000)
}
Xsqlite3_mutex_leave(tls, mutex)
return rc
@@ -59194,7 +61185,7 @@ func Xsqlite3_clear_bindings(tls *libc.TLS, pStmt uintptr) int32 { /* sqlite3.c:
//
// The following routines extract information from a Mem or sqlite3_value
// structure.
-func Xsqlite3_value_blob(tls *libc.TLS, pVal uintptr) uintptr { /* sqlite3.c:83799:23: */
+func Xsqlite3_value_blob(tls *libc.TLS, pVal uintptr) uintptr { /* sqlite3.c:84329:23: */
var p uintptr = pVal
if (int32((*Mem)(unsafe.Pointer(p)).Fflags) & (MEM_Blob | MEM_Str)) != 0 {
if (func() int32 {
@@ -59217,32 +61208,32 @@ func Xsqlite3_value_blob(tls *libc.TLS, pVal uintptr) uintptr { /* sqlite3.c:837
return uintptr(0)
}
-func Xsqlite3_value_bytes(tls *libc.TLS, pVal uintptr) int32 { /* sqlite3.c:83812:16: */
+func Xsqlite3_value_bytes(tls *libc.TLS, pVal uintptr) int32 { /* sqlite3.c:84342:16: */
return Xsqlite3ValueBytes(tls, pVal, uint8(SQLITE_UTF8))
}
-func Xsqlite3_value_bytes16(tls *libc.TLS, pVal uintptr) int32 { /* sqlite3.c:83815:16: */
+func Xsqlite3_value_bytes16(tls *libc.TLS, pVal uintptr) int32 { /* sqlite3.c:84345:16: */
return Xsqlite3ValueBytes(tls, pVal, func() uint8 {
- if int32(*(*int8)(unsafe.Pointer(uintptr(unsafe.Pointer(&Xsqlite3one))))) == 0 {
+ if int32(*(*uint8)(unsafe.Pointer(uintptr(unsafe.Pointer(&Xsqlite3one))))) == 0 {
return uint8(SQLITE_UTF16BE)
}
return uint8(SQLITE_UTF16LE)
}())
}
-func Xsqlite3_value_double(tls *libc.TLS, pVal uintptr) float64 { /* sqlite3.c:83818:19: */
+func Xsqlite3_value_double(tls *libc.TLS, pVal uintptr) float64 { /* sqlite3.c:84348:19: */
return Xsqlite3VdbeRealValue(tls, pVal)
}
-func Xsqlite3_value_int(tls *libc.TLS, pVal uintptr) int32 { /* sqlite3.c:83821:16: */
+func Xsqlite3_value_int(tls *libc.TLS, pVal uintptr) int32 { /* sqlite3.c:84351:16: */
return int32(Xsqlite3VdbeIntValue(tls, pVal))
}
-func Xsqlite3_value_int64(tls *libc.TLS, pVal uintptr) Sqlite_int64 { /* sqlite3.c:83824:25: */
+func Xsqlite3_value_int64(tls *libc.TLS, pVal uintptr) Sqlite_int64 { /* sqlite3.c:84354:25: */
return Xsqlite3VdbeIntValue(tls, pVal)
}
-func Xsqlite3_value_subtype(tls *libc.TLS, pVal uintptr) uint32 { /* sqlite3.c:83827:25: */
+func Xsqlite3_value_subtype(tls *libc.TLS, pVal uintptr) uint32 { /* sqlite3.c:84357:25: */
var pMem uintptr = pVal
return func() uint32 {
if (int32((*Mem)(unsafe.Pointer(pMem)).Fflags) & MEM_Subtype) != 0 {
@@ -59252,7 +61243,7 @@ func Xsqlite3_value_subtype(tls *libc.TLS, pVal uintptr) uint32 { /* sqlite3.c:8
}()
}
-func Xsqlite3_value_pointer(tls *libc.TLS, pVal uintptr, zPType uintptr) uintptr { /* sqlite3.c:83831:17: */
+func Xsqlite3_value_pointer(tls *libc.TLS, pVal uintptr, zPType uintptr) uintptr { /* sqlite3.c:84361:17: */
var p uintptr = pVal
if ((((int32((*Mem)(unsafe.Pointer(p)).Fflags) & ((MEM_TypeMask | MEM_Term) | MEM_Subtype)) == ((MEM_Null | MEM_Term) | MEM_Subtype)) &&
(zPType != uintptr(0))) &&
@@ -59265,31 +61256,31 @@ func Xsqlite3_value_pointer(tls *libc.TLS, pVal uintptr, zPType uintptr) uintptr
return uintptr(0)
}
-func Xsqlite3_value_text(tls *libc.TLS, pVal uintptr) uintptr { /* sqlite3.c:83844:32: */
+func Xsqlite3_value_text(tls *libc.TLS, pVal uintptr) uintptr { /* sqlite3.c:84374:32: */
return Xsqlite3ValueText(tls, pVal, uint8(SQLITE_UTF8))
}
-func Xsqlite3_value_text16(tls *libc.TLS, pVal uintptr) uintptr { /* sqlite3.c:83848:23: */
+func Xsqlite3_value_text16(tls *libc.TLS, pVal uintptr) uintptr { /* sqlite3.c:84378:23: */
return Xsqlite3ValueText(tls, pVal, func() uint8 {
- if int32(*(*int8)(unsafe.Pointer(uintptr(unsafe.Pointer(&Xsqlite3one))))) == 0 {
+ if int32(*(*uint8)(unsafe.Pointer(uintptr(unsafe.Pointer(&Xsqlite3one))))) == 0 {
return uint8(SQLITE_UTF16BE)
}
return uint8(SQLITE_UTF16LE)
}())
}
-func Xsqlite3_value_text16be(tls *libc.TLS, pVal uintptr) uintptr { /* sqlite3.c:83851:23: */
+func Xsqlite3_value_text16be(tls *libc.TLS, pVal uintptr) uintptr { /* sqlite3.c:84381:23: */
return Xsqlite3ValueText(tls, pVal, uint8(SQLITE_UTF16BE))
}
-func Xsqlite3_value_text16le(tls *libc.TLS, pVal uintptr) uintptr { /* sqlite3.c:83854:23: */
+func Xsqlite3_value_text16le(tls *libc.TLS, pVal uintptr) uintptr { /* sqlite3.c:84384:23: */
return Xsqlite3ValueText(tls, pVal, uint8(SQLITE_UTF16LE))
}
// EVIDENCE-OF: R-12793-43283 Every value in SQLite has one of five
// fundamental datatypes: 64-bit signed integer 64-bit IEEE floating
// point number string BLOB NULL
-func Xsqlite3_value_type(tls *libc.TLS, pVal uintptr) int32 { /* sqlite3.c:83862:16: */
+func Xsqlite3_value_type(tls *libc.TLS, pVal uintptr) int32 { /* sqlite3.c:84392:16: */
return int32(aType[(int32((*Sqlite3_value)(unsafe.Pointer(pVal)).Fflags) & MEM_AffMask)])
}
@@ -59358,20 +61349,20 @@ var aType = [64]U8{
U8(SQLITE_NULL), // 0x3d (not possible)
U8(SQLITE_FLOAT), // 0x3e (not possible)
U8(SQLITE_NULL), // 0x3f (not possible)
-} /* sqlite3.c:83863:19 */
+} /* sqlite3.c:84393:19 */
// Return true if a parameter to xUpdate represents an unchanged column
-func Xsqlite3_value_nochange(tls *libc.TLS, pVal uintptr) int32 { /* sqlite3.c:83948:16: */
+func Xsqlite3_value_nochange(tls *libc.TLS, pVal uintptr) int32 { /* sqlite3.c:84478:16: */
return (libc.Bool32((int32((*Sqlite3_value)(unsafe.Pointer(pVal)).Fflags) & (MEM_Null | MEM_Zero)) == (MEM_Null | MEM_Zero)))
}
// Return true if a parameter value originated from an sqlite3_bind()
-func Xsqlite3_value_frombind(tls *libc.TLS, pVal uintptr) int32 { /* sqlite3.c:83953:16: */
+func Xsqlite3_value_frombind(tls *libc.TLS, pVal uintptr) int32 { /* sqlite3.c:84483:16: */
return (libc.Bool32((int32((*Sqlite3_value)(unsafe.Pointer(pVal)).Fflags) & MEM_FromBind) != 0))
}
// Make a copy of an sqlite3_value object
-func Xsqlite3_value_dup(tls *libc.TLS, pOrig uintptr) uintptr { /* sqlite3.c:83959:26: */
+func Xsqlite3_value_dup(tls *libc.TLS, pOrig uintptr) uintptr { /* sqlite3.c:84489:26: */
var pNew uintptr
if pOrig == uintptr(0) {
return uintptr(0)
@@ -59397,7 +61388,7 @@ func Xsqlite3_value_dup(tls *libc.TLS, pOrig uintptr) uintptr { /* sqlite3.c:839
// Destroy an sqlite3_value object previously obtained from
// sqlite3_value_dup().
-func Xsqlite3_value_free(tls *libc.TLS, pOld uintptr) { /* sqlite3.c:83982:17: */
+func Xsqlite3_value_free(tls *libc.TLS, pOld uintptr) { /* sqlite3.c:84512:17: */
Xsqlite3ValueFree(tls, pOld)
}
@@ -59412,33 +61403,31 @@ func Xsqlite3_value_free(tls *libc.TLS, pOld uintptr) { /* sqlite3.c:83982:17: *
//
// The invokeValueDestructor(P,X) routine invokes destructor function X()
// on value P is not going to be used and need to be destroyed.
-func setResultStrOrError(tls *libc.TLS, pCtx uintptr, z uintptr, n int32, enc U8, xDel uintptr) { /* sqlite3.c:83998:13: */
- if Xsqlite3VdbeMemSetStr(tls, (*Sqlite3_context)(unsafe.Pointer(pCtx)).FpOut, z, n, enc, xDel) == SQLITE_TOOBIG {
+func setResultStrOrError(tls *libc.TLS, pCtx uintptr, z uintptr, n int32, enc U8, xDel uintptr) { /* sqlite3.c:84528:13: */
+ if Xsqlite3VdbeMemSetStr(tls, (*Sqlite3_context)(unsafe.Pointer(pCtx)).FpOut, z, int64(n), enc, xDel) == SQLITE_TOOBIG {
Xsqlite3_result_error_toobig(tls, pCtx)
}
}
-func invokeValueDestructor(tls *libc.TLS, p uintptr, xDel uintptr, pCtx uintptr) int32 { /* sqlite3.c:84009:12: */
+func invokeValueDestructor(tls *libc.TLS, p uintptr, xDel uintptr, pCtx uintptr) int32 { /* sqlite3.c:84539:12: */
if xDel == uintptr(0) {
// noop
} else if xDel == (libc.UintptrFromInt32(-1)) {
// noop
} else {
- (*(*func(*libc.TLS, uintptr))(unsafe.Pointer(&xDel)))(tls, p)
- }
- if pCtx != 0 {
- Xsqlite3_result_error_toobig(tls, pCtx)
+ (*struct{ f func(*libc.TLS, uintptr) })(unsafe.Pointer(&struct{ uintptr }{xDel})).f(tls, p)
}
+ Xsqlite3_result_error_toobig(tls, pCtx)
return SQLITE_TOOBIG
}
-func Xsqlite3_result_blob(tls *libc.TLS, pCtx uintptr, z uintptr, n int32, xDel uintptr) { /* sqlite3.c:84025:17: */
+func Xsqlite3_result_blob(tls *libc.TLS, pCtx uintptr, z uintptr, n int32, xDel uintptr) { /* sqlite3.c:84555:17: */
setResultStrOrError(tls, pCtx, z, n, uint8(0), xDel)
}
-func Xsqlite3_result_blob64(tls *libc.TLS, pCtx uintptr, z uintptr, n Sqlite3_uint64, xDel uintptr) { /* sqlite3.c:84035:17: */
+func Xsqlite3_result_blob64(tls *libc.TLS, pCtx uintptr, z uintptr, n Sqlite3_uint64, xDel uintptr) { /* sqlite3.c:84565:17: */
if n > uint64(0x7fffffff) {
invokeValueDestructor(tls, z, xDel, pCtx)
@@ -59447,44 +61436,44 @@ func Xsqlite3_result_blob64(tls *libc.TLS, pCtx uintptr, z uintptr, n Sqlite3_ui
}
}
-func Xsqlite3_result_double(tls *libc.TLS, pCtx uintptr, rVal float64) { /* sqlite3.c:84049:17: */
+func Xsqlite3_result_double(tls *libc.TLS, pCtx uintptr, rVal float64) { /* sqlite3.c:84579:17: */
Xsqlite3VdbeMemSetDouble(tls, (*Sqlite3_context)(unsafe.Pointer(pCtx)).FpOut, rVal)
}
-func Xsqlite3_result_error(tls *libc.TLS, pCtx uintptr, z uintptr, n int32) { /* sqlite3.c:84053:17: */
+func Xsqlite3_result_error(tls *libc.TLS, pCtx uintptr, z uintptr, n int32) { /* sqlite3.c:84583:17: */
(*Sqlite3_context)(unsafe.Pointer(pCtx)).FisError = SQLITE_ERROR
- Xsqlite3VdbeMemSetStr(tls, (*Sqlite3_context)(unsafe.Pointer(pCtx)).FpOut, z, n, uint8(SQLITE_UTF8), libc.UintptrFromInt32(-1))
+ Xsqlite3VdbeMemSetStr(tls, (*Sqlite3_context)(unsafe.Pointer(pCtx)).FpOut, z, int64(n), uint8(SQLITE_UTF8), libc.UintptrFromInt32(-1))
}
-func Xsqlite3_result_error16(tls *libc.TLS, pCtx uintptr, z uintptr, n int32) { /* sqlite3.c:84059:17: */
+func Xsqlite3_result_error16(tls *libc.TLS, pCtx uintptr, z uintptr, n int32) { /* sqlite3.c:84589:17: */
(*Sqlite3_context)(unsafe.Pointer(pCtx)).FisError = SQLITE_ERROR
- Xsqlite3VdbeMemSetStr(tls, (*Sqlite3_context)(unsafe.Pointer(pCtx)).FpOut, z, n, func() uint8 {
- if int32(*(*int8)(unsafe.Pointer(uintptr(unsafe.Pointer(&Xsqlite3one))))) == 0 {
+ Xsqlite3VdbeMemSetStr(tls, (*Sqlite3_context)(unsafe.Pointer(pCtx)).FpOut, z, int64(n), func() uint8 {
+ if int32(*(*uint8)(unsafe.Pointer(uintptr(unsafe.Pointer(&Xsqlite3one))))) == 0 {
return uint8(SQLITE_UTF16BE)
}
return uint8(SQLITE_UTF16LE)
}(), libc.UintptrFromInt32(-1))
}
-func Xsqlite3_result_int(tls *libc.TLS, pCtx uintptr, iVal int32) { /* sqlite3.c:84065:17: */
+func Xsqlite3_result_int(tls *libc.TLS, pCtx uintptr, iVal int32) { /* sqlite3.c:84595:17: */
Xsqlite3VdbeMemSetInt64(tls, (*Sqlite3_context)(unsafe.Pointer(pCtx)).FpOut, I64(iVal))
}
-func Xsqlite3_result_int64(tls *libc.TLS, pCtx uintptr, iVal I64) { /* sqlite3.c:84069:17: */
+func Xsqlite3_result_int64(tls *libc.TLS, pCtx uintptr, iVal I64) { /* sqlite3.c:84599:17: */
Xsqlite3VdbeMemSetInt64(tls, (*Sqlite3_context)(unsafe.Pointer(pCtx)).FpOut, iVal)
}
-func Xsqlite3_result_null(tls *libc.TLS, pCtx uintptr) { /* sqlite3.c:84073:17: */
+func Xsqlite3_result_null(tls *libc.TLS, pCtx uintptr) { /* sqlite3.c:84603:17: */
Xsqlite3VdbeMemSetNull(tls, (*Sqlite3_context)(unsafe.Pointer(pCtx)).FpOut)
}
-func Xsqlite3_result_pointer(tls *libc.TLS, pCtx uintptr, pPtr uintptr, zPType uintptr, xDestructor uintptr) { /* sqlite3.c:84077:17: */
+func Xsqlite3_result_pointer(tls *libc.TLS, pCtx uintptr, pPtr uintptr, zPType uintptr, xDestructor uintptr) { /* sqlite3.c:84607:17: */
var pOut uintptr = (*Sqlite3_context)(unsafe.Pointer(pCtx)).FpOut
Xsqlite3VdbeMemRelease(tls, pOut)
@@ -59492,23 +61481,23 @@ func Xsqlite3_result_pointer(tls *libc.TLS, pCtx uintptr, pPtr uintptr, zPType u
Xsqlite3VdbeMemSetPointer(tls, pOut, pPtr, zPType, xDestructor)
}
-func Xsqlite3_result_subtype(tls *libc.TLS, pCtx uintptr, eSubtype uint32) { /* sqlite3.c:84089:17: */
+func Xsqlite3_result_subtype(tls *libc.TLS, pCtx uintptr, eSubtype uint32) { /* sqlite3.c:84619:17: */
var pOut uintptr = (*Sqlite3_context)(unsafe.Pointer(pCtx)).FpOut
(*Mem)(unsafe.Pointer(pOut)).FeSubtype = (U8(eSubtype & uint32(0xff)))
*(*U16)(unsafe.Pointer(pOut + 8 /* &.flags */)) |= U16((MEM_Subtype))
}
-func Xsqlite3_result_text(tls *libc.TLS, pCtx uintptr, z uintptr, n int32, xDel uintptr) { /* sqlite3.c:84095:17: */
+func Xsqlite3_result_text(tls *libc.TLS, pCtx uintptr, z uintptr, n int32, xDel uintptr) { /* sqlite3.c:84625:17: */
setResultStrOrError(tls, pCtx, z, n, uint8(SQLITE_UTF8), xDel)
}
-func Xsqlite3_result_text64(tls *libc.TLS, pCtx uintptr, z uintptr, n Sqlite3_uint64, xDel uintptr, enc uint8) { /* sqlite3.c:84104:17: */
+func Xsqlite3_result_text64(tls *libc.TLS, pCtx uintptr, z uintptr, n Sqlite3_uint64, xDel uintptr, enc uint8) { /* sqlite3.c:84634:17: */
if int32(enc) == SQLITE_UTF16 {
enc = func() uint8 {
- if int32(*(*int8)(unsafe.Pointer(uintptr(unsafe.Pointer(&Xsqlite3one))))) == 0 {
+ if int32(*(*uint8)(unsafe.Pointer(uintptr(unsafe.Pointer(&Xsqlite3one))))) == 0 {
return uint8(SQLITE_UTF16BE)
}
return uint8(SQLITE_UTF16LE)
@@ -59521,37 +61510,37 @@ func Xsqlite3_result_text64(tls *libc.TLS, pCtx uintptr, z uintptr, n Sqlite3_ui
}
}
-func Xsqlite3_result_text16(tls *libc.TLS, pCtx uintptr, z uintptr, n int32, xDel uintptr) { /* sqlite3.c:84121:17: */
+func Xsqlite3_result_text16(tls *libc.TLS, pCtx uintptr, z uintptr, n int32, xDel uintptr) { /* sqlite3.c:84651:17: */
setResultStrOrError(tls, pCtx, z, n, func() uint8 {
- if int32(*(*int8)(unsafe.Pointer(uintptr(unsafe.Pointer(&Xsqlite3one))))) == 0 {
+ if int32(*(*uint8)(unsafe.Pointer(uintptr(unsafe.Pointer(&Xsqlite3one))))) == 0 {
return uint8(SQLITE_UTF16BE)
}
return uint8(SQLITE_UTF16LE)
}(), xDel)
}
-func Xsqlite3_result_text16be(tls *libc.TLS, pCtx uintptr, z uintptr, n int32, xDel uintptr) { /* sqlite3.c:84130:17: */
+func Xsqlite3_result_text16be(tls *libc.TLS, pCtx uintptr, z uintptr, n int32, xDel uintptr) { /* sqlite3.c:84660:17: */
setResultStrOrError(tls, pCtx, z, n, uint8(SQLITE_UTF16BE), xDel)
}
-func Xsqlite3_result_text16le(tls *libc.TLS, pCtx uintptr, z uintptr, n int32, xDel uintptr) { /* sqlite3.c:84139:17: */
+func Xsqlite3_result_text16le(tls *libc.TLS, pCtx uintptr, z uintptr, n int32, xDel uintptr) { /* sqlite3.c:84669:17: */
setResultStrOrError(tls, pCtx, z, n, uint8(SQLITE_UTF16LE), xDel)
}
-func Xsqlite3_result_value(tls *libc.TLS, pCtx uintptr, pValue uintptr) { /* sqlite3.c:84149:17: */
+func Xsqlite3_result_value(tls *libc.TLS, pCtx uintptr, pValue uintptr) { /* sqlite3.c:84679:17: */
Xsqlite3VdbeMemCopy(tls, (*Sqlite3_context)(unsafe.Pointer(pCtx)).FpOut, pValue)
}
-func Xsqlite3_result_zeroblob(tls *libc.TLS, pCtx uintptr, n int32) { /* sqlite3.c:84153:17: */
+func Xsqlite3_result_zeroblob(tls *libc.TLS, pCtx uintptr, n int32) { /* sqlite3.c:84683:17: */
Xsqlite3VdbeMemSetZeroBlob(tls, (*Sqlite3_context)(unsafe.Pointer(pCtx)).FpOut, n)
}
-func Xsqlite3_result_zeroblob64(tls *libc.TLS, pCtx uintptr, n U64) int32 { /* sqlite3.c:84157:16: */
+func Xsqlite3_result_zeroblob64(tls *libc.TLS, pCtx uintptr, n U64) int32 { /* sqlite3.c:84687:16: */
var pOut uintptr = (*Sqlite3_context)(unsafe.Pointer(pCtx)).FpOut
if n > U64(*(*int32)(unsafe.Pointer(((*Mem)(unsafe.Pointer(pOut)).Fdb + 128 /* &.aLimit */)))) {
@@ -59561,7 +61550,7 @@ func Xsqlite3_result_zeroblob64(tls *libc.TLS, pCtx uintptr, n U64) int32 { /* s
return SQLITE_OK
}
-func Xsqlite3_result_error_code(tls *libc.TLS, pCtx uintptr, errCode int32) { /* sqlite3.c:84166:17: */
+func Xsqlite3_result_error_code(tls *libc.TLS, pCtx uintptr, errCode int32) { /* sqlite3.c:84696:17: */
(*Sqlite3_context)(unsafe.Pointer(pCtx)).FisError = func() int32 {
if errCode != 0 {
return errCode
@@ -59569,21 +61558,21 @@ func Xsqlite3_result_error_code(tls *libc.TLS, pCtx uintptr, errCode int32) { /*
return -1
}()
if (int32((*Mem)(unsafe.Pointer((*Sqlite3_context)(unsafe.Pointer(pCtx)).FpOut)).Fflags) & MEM_Null) != 0 {
- Xsqlite3VdbeMemSetStr(tls, (*Sqlite3_context)(unsafe.Pointer(pCtx)).FpOut, Xsqlite3ErrStr(tls, errCode), -1,
+ Xsqlite3VdbeMemSetStr(tls, (*Sqlite3_context)(unsafe.Pointer(pCtx)).FpOut, Xsqlite3ErrStr(tls, errCode), int64(-1),
uint8(SQLITE_UTF8), uintptr(0))
}
}
// Force an SQLITE_TOOBIG error.
-func Xsqlite3_result_error_toobig(tls *libc.TLS, pCtx uintptr) { /* sqlite3.c:84178:17: */
+func Xsqlite3_result_error_toobig(tls *libc.TLS, pCtx uintptr) { /* sqlite3.c:84708:17: */
(*Sqlite3_context)(unsafe.Pointer(pCtx)).FisError = SQLITE_TOOBIG
- Xsqlite3VdbeMemSetStr(tls, (*Sqlite3_context)(unsafe.Pointer(pCtx)).FpOut, ts+4317 /* "string or blob t..." */, -1,
+ Xsqlite3VdbeMemSetStr(tls, (*Sqlite3_context)(unsafe.Pointer(pCtx)).FpOut, ts+4448 /* "string or blob t..." */, int64(-1),
uint8(SQLITE_UTF8), uintptr(0))
}
// An SQLITE_NOMEM error.
-func Xsqlite3_result_error_nomem(tls *libc.TLS, pCtx uintptr) { /* sqlite3.c:84186:17: */
+func Xsqlite3_result_error_nomem(tls *libc.TLS, pCtx uintptr) { /* sqlite3.c:84716:17: */
Xsqlite3VdbeMemSetNull(tls, (*Sqlite3_context)(unsafe.Pointer(pCtx)).FpOut)
(*Sqlite3_context)(unsafe.Pointer(pCtx)).FisError = SQLITE_NOMEM
@@ -59593,7 +61582,7 @@ func Xsqlite3_result_error_nomem(tls *libc.TLS, pCtx uintptr) { /* sqlite3.c:841
// Force the INT64 value currently stored as the result to be
// a MEM_IntReal value. See the SQLITE_TESTCTRL_RESULT_INTREAL
// test-control.
-func Xsqlite3ResultIntReal(tls *libc.TLS, pCtx uintptr) { /* sqlite3.c:84198:21: */
+func Xsqlite3ResultIntReal(tls *libc.TLS, pCtx uintptr) { /* sqlite3.c:84728:21: */
if (int32((*Mem)(unsafe.Pointer((*Sqlite3_context)(unsafe.Pointer(pCtx)).FpOut)).Fflags) & MEM_Int) != 0 {
*(*U16)(unsafe.Pointer((*Sqlite3_context)(unsafe.Pointer(pCtx)).FpOut + 8 /* &.flags */)) &= libc.Uint16FromInt32((libc.CplInt32(MEM_Int)))
@@ -59603,7 +61592,7 @@ func Xsqlite3ResultIntReal(tls *libc.TLS, pCtx uintptr) { /* sqlite3.c:84198:21:
// This function is called after a transaction has been committed. It
// invokes callbacks registered with sqlite3_wal_hook() as required.
-func doWalCallbacks(tls *libc.TLS, db uintptr) int32 { /* sqlite3.c:84212:12: */
+func doWalCallbacks(tls *libc.TLS, db uintptr) int32 { /* sqlite3.c:84742:12: */
var rc int32 = SQLITE_OK
var i int32
for i = 0; i < (*Sqlite3)(unsafe.Pointer(db)).FnDb; i++ {
@@ -59614,7 +61603,9 @@ func doWalCallbacks(tls *libc.TLS, db uintptr) int32 { /* sqlite3.c:84212:12: */
nEntry = Xsqlite3PagerWalCallback(tls, Xsqlite3BtreePager(tls, pBt))
Xsqlite3BtreeLeave(tls, pBt)
if ((nEntry > 0) && ((*Sqlite3)(unsafe.Pointer(db)).FxWalCallback != 0)) && (rc == SQLITE_OK) {
- rc = (*(*func(*libc.TLS, uintptr, uintptr, uintptr, int32) int32)(unsafe.Pointer((db + 352 /* &.xWalCallback */))))(tls, (*Sqlite3)(unsafe.Pointer(db)).FpWalArg, db, (*Db)(unsafe.Pointer((*Sqlite3)(unsafe.Pointer(db)).FaDb+uintptr(i)*32)).FzDbSName, nEntry)
+ rc = (*struct {
+ f func(*libc.TLS, uintptr, uintptr, uintptr, int32) int32
+ })(unsafe.Pointer(&struct{ uintptr }{(*Sqlite3)(unsafe.Pointer(db)).FxWalCallback})).f(tls, (*Sqlite3)(unsafe.Pointer(db)).FpWalArg, db, (*Db)(unsafe.Pointer((*Sqlite3)(unsafe.Pointer(db)).FaDb+uintptr(i)*32)).FzDbSName, nEntry)
}
}
}
@@ -59628,7 +61619,7 @@ func doWalCallbacks(tls *libc.TLS, db uintptr) int32 { /* sqlite3.c:84212:12: */
// API. The only thing omitted is the automatic recompile if a
// schema change has occurred. That detail is handled by the
// outer sqlite3_step() wrapper procedure.
-func sqlite3Step(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:84242:12: */
+func sqlite3Step(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:84772:12: */
var db uintptr
var rc int32
@@ -59664,7 +61655,7 @@ __1:
__2:
;
- if !(((*Vdbe)(unsafe.Pointer(p)).Fpc < 0) && ((Bft(int32(*(*uint16)(unsafe.Pointer(p + 200 /* &.expired */)) >> 14 & 0x3))) != 0)) {
+ if !(((*Vdbe)(unsafe.Pointer(p)).Fpc < 0) && ((Bft(int32(*(*uint16)(unsafe.Pointer(p + 200 /* &.expired */)) & 0xc000 >> 14))) != 0)) {
goto __3
}
(*Vdbe)(unsafe.Pointer(p)).Frc = SQLITE_SCHEMA
@@ -59706,13 +61697,13 @@ __8:
;
(*Sqlite3)(unsafe.Pointer(db)).FnVdbeActive++
- if !((int32(*(*uint16)(unsafe.Pointer(p + 200 /* &.readOnly */)) >> 8 & 0x1)) == 0) {
+ if !((int32(*(*uint16)(unsafe.Pointer(p + 200 /* &.readOnly */)) & 0x100 >> 8)) == 0) {
goto __9
}
(*Sqlite3)(unsafe.Pointer(db)).FnVdbeWrite++
__9:
;
- if !((Bft(int32(*(*uint16)(unsafe.Pointer(p + 200 /* &.bIsReader */)) >> 7 & 0x1))) != 0) {
+ if !((Bft(int32(*(*uint16)(unsafe.Pointer(p + 200 /* &.bIsReader */)) & 0x80 >> 7))) != 0) {
goto __10
}
(*Sqlite3)(unsafe.Pointer(db)).FnVdbeRead++
@@ -59721,7 +61712,7 @@ __10:
(*Vdbe)(unsafe.Pointer(p)).Fpc = 0
__5:
;
- if !((Bft(int32(*(*uint16)(unsafe.Pointer(p + 200 /* &.explain */)) >> 12 & 0x3))) != 0) {
+ if !((Bft(int32(*(*uint16)(unsafe.Pointer(p + 200 /* &.explain */)) & 0x3000 >> 12))) != 0) {
goto __11
}
rc = Xsqlite3VdbeList(tls, p)
@@ -59795,14 +61786,14 @@ end_of_step:
// This is the top-level implementation of sqlite3_step(). Call
// sqlite3Step() to do most of the work. If a schema error occurs,
// call sqlite3Reprepare() and try again.
-func Xsqlite3_step(tls *libc.TLS, pStmt uintptr) int32 { /* sqlite3.c:84376:16: */
+func Xsqlite3_step(tls *libc.TLS, pStmt uintptr) int32 { /* sqlite3.c:84906:16: */
var rc int32 = SQLITE_OK // Result from sqlite3Step()
var v uintptr = pStmt // the prepared statement
var cnt int32 = 0 // Counter to prevent infinite loop of reprepares
var db uintptr // The database connection
if vdbeSafetyNotNull(tls, v) != 0 {
- return Xsqlite3MisuseError(tls, 84383)
+ return Xsqlite3MisuseError(tls, 84913)
}
db = (*Vdbe)(unsafe.Pointer(v)).Fdb
Xsqlite3_mutex_enter(tls, (*Sqlite3)(unsafe.Pointer(db)).Fmutex)
@@ -59842,7 +61833,7 @@ func Xsqlite3_step(tls *libc.TLS, pStmt uintptr) int32 { /* sqlite3.c:84376:16:
// Extract the user data from a sqlite3_context structure and return a
// pointer to it.
-func Xsqlite3_user_data(tls *libc.TLS, p uintptr) uintptr { /* sqlite3.c:84425:17: */
+func Xsqlite3_user_data(tls *libc.TLS, p uintptr) uintptr { /* sqlite3.c:84955:17: */
return (*FuncDef)(unsafe.Pointer((*Sqlite3_context)(unsafe.Pointer(p)).FpFunc)).FpUserData
}
@@ -59855,7 +61846,7 @@ func Xsqlite3_user_data(tls *libc.TLS, p uintptr) uintptr { /* sqlite3.c:84425:1
// parameter) of the sqlite3_create_function() and
// sqlite3_create_function16() routines that originally registered the
// application defined function.
-func Xsqlite3_context_db_handle(tls *libc.TLS, p uintptr) uintptr { /* sqlite3.c:84440:20: */
+func Xsqlite3_context_db_handle(tls *libc.TLS, p uintptr) uintptr { /* sqlite3.c:84970:20: */
return (*Mem)(unsafe.Pointer((*Sqlite3_context)(unsafe.Pointer(p)).FpOut)).Fdb
}
@@ -59872,7 +61863,7 @@ func Xsqlite3_context_db_handle(tls *libc.TLS, p uintptr) uintptr { /* sqlite3.c
// Virtual table implements might use this routine to optimize their
// performance by substituting a NULL result, or some other light-weight
// value, as a signal to the xUpdate routine that the column is unchanged.
-func Xsqlite3_vtab_nochange(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:84459:16: */
+func Xsqlite3_vtab_nochange(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:84989:16: */
return Xsqlite3_value_nochange(tls, (*Sqlite3_context)(unsafe.Pointer(p)).FpOut)
}
@@ -59882,7 +61873,7 @@ func Xsqlite3_vtab_nochange(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:84459
// statement, the exact same time is returned for each invocation regardless
// of the amount of time that elapses between invocations. In other words,
// the time returned is always the time of the first call.
-func Xsqlite3StmtCurrentTime(tls *libc.TLS, p uintptr) Sqlite3_int64 { /* sqlite3.c:84471:30: */
+func Xsqlite3StmtCurrentTime(tls *libc.TLS, p uintptr) Sqlite3_int64 { /* sqlite3.c:85001:30: */
bp := tls.Alloc(8)
defer tls.Free(8)
@@ -59905,7 +61896,7 @@ func Xsqlite3StmtCurrentTime(tls *libc.TLS, p uintptr) Sqlite3_int64 { /* sqlite
// Create a new aggregate context for p and return a pointer to
// its pMem->z element.
-func createAggContext(tls *libc.TLS, p uintptr, nByte int32) uintptr { /* sqlite3.c:84491:29: */
+func createAggContext(tls *libc.TLS, p uintptr, nByte int32) uintptr { /* sqlite3.c:85021:29: */
var pMem uintptr = (*Sqlite3_context)(unsafe.Pointer(p)).FpMem
if nByte <= 0 {
@@ -59925,7 +61916,7 @@ func createAggContext(tls *libc.TLS, p uintptr, nByte int32) uintptr { /* sqlite
// Allocate or return the aggregate context for a user function. A new
// context is allocated on the first call. Subsequent calls return the
// same context that was returned on prior calls.
-func Xsqlite3_aggregate_context(tls *libc.TLS, p uintptr, nByte int32) uintptr { /* sqlite3.c:84513:17: */
+func Xsqlite3_aggregate_context(tls *libc.TLS, p uintptr, nByte int32) uintptr { /* sqlite3.c:85043:17: */
if (int32((*Mem)(unsafe.Pointer((*Sqlite3_context)(unsafe.Pointer(p)).FpMem)).Fflags) & MEM_Agg) == 0 {
return createAggContext(tls, p, nByte)
@@ -59943,7 +61934,7 @@ func Xsqlite3_aggregate_context(tls *libc.TLS, p uintptr, nByte int32) uintptr {
// Undocumented behavior: If iArg is negative then access a cache of
// auxiliary data pointers that is available to all functions within a
// single prepared statement. The iArg values must match.
-func Xsqlite3_get_auxdata(tls *libc.TLS, pCtx uintptr, iArg int32) uintptr { /* sqlite3.c:84534:17: */
+func Xsqlite3_get_auxdata(tls *libc.TLS, pCtx uintptr, iArg int32) uintptr { /* sqlite3.c:85064:17: */
var pAuxData uintptr
if (*Sqlite3_context)(unsafe.Pointer(pCtx)).FpVdbe == uintptr(0) {
@@ -59966,7 +61957,7 @@ func Xsqlite3_get_auxdata(tls *libc.TLS, pCtx uintptr, iArg int32) uintptr { /*
// Undocumented behavior: If iArg is negative then make the data available
// to all functions within the current prepared statement using iArg as an
// access code.
-func Xsqlite3_set_auxdata(tls *libc.TLS, pCtx uintptr, iArg int32, pAux uintptr, xDelete uintptr) { /* sqlite3.c:84562:17: */
+func Xsqlite3_set_auxdata(tls *libc.TLS, pCtx uintptr, iArg int32, pAux uintptr, xDelete uintptr) { /* sqlite3.c:85092:17: */
var pAuxData uintptr
var pVdbe uintptr
pVdbe = (*Sqlite3_context)(unsafe.Pointer(pCtx)).FpVdbe
@@ -60021,7 +62012,7 @@ __6:
if !((*AuxData)(unsafe.Pointer(pAuxData)).FxDeleteAux != 0) {
goto __10
}
- (*(*func(*libc.TLS, uintptr))(unsafe.Pointer((pAuxData + 16 /* &.xDeleteAux */))))(tls, (*AuxData)(unsafe.Pointer(pAuxData)).FpAux)
+ (*struct{ f func(*libc.TLS, uintptr) })(unsafe.Pointer(&struct{ uintptr }{(*AuxData)(unsafe.Pointer(pAuxData)).FxDeleteAux})).f(tls, (*AuxData)(unsafe.Pointer(pAuxData)).FpAux)
__10:
;
__7:
@@ -60035,7 +62026,7 @@ failed:
if !(xDelete != 0) {
goto __11
}
- (*(*func(*libc.TLS, uintptr))(unsafe.Pointer(&xDelete)))(tls, pAux)
+ (*struct{ f func(*libc.TLS, uintptr) })(unsafe.Pointer(&struct{ uintptr }{xDelete})).f(tls, pAux)
__11:
}
@@ -60046,13 +62037,13 @@ __11:
// provide only to avoid breaking legacy code. New aggregate function
// implementations should keep their own counts within their aggregate
// context.
-func Xsqlite3_aggregate_count(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:84615:16: */
+func Xsqlite3_aggregate_count(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:85145:16: */
return (*Mem)(unsafe.Pointer((*Sqlite3_context)(unsafe.Pointer(p)).FpMem)).Fn
}
// Return the number of columns in the result set for the statement pStmt.
-func Xsqlite3_column_count(tls *libc.TLS, pStmt uintptr) int32 { /* sqlite3.c:84624:16: */
+func Xsqlite3_column_count(tls *libc.TLS, pStmt uintptr) int32 { /* sqlite3.c:85154:16: */
var pVm uintptr = pStmt
if pVm != 0 {
return int32((*Vdbe)(unsafe.Pointer(pVm)).FnResColumn)
@@ -60062,7 +62053,7 @@ func Xsqlite3_column_count(tls *libc.TLS, pStmt uintptr) int32 { /* sqlite3.c:84
// Return the number of values available from the current row of the
// currently executing statement pStmt.
-func Xsqlite3_data_count(tls *libc.TLS, pStmt uintptr) int32 { /* sqlite3.c:84633:16: */
+func Xsqlite3_data_count(tls *libc.TLS, pStmt uintptr) int32 { /* sqlite3.c:85163:16: */
var pVm uintptr = pStmt
if (pVm == uintptr(0)) || ((*Vdbe)(unsafe.Pointer(pVm)).FpResultSet == uintptr(0)) {
return 0
@@ -60071,19 +62062,19 @@ func Xsqlite3_data_count(tls *libc.TLS, pStmt uintptr) int32 { /* sqlite3.c:8463
}
// Return a pointer to static memory containing an SQL NULL value.
-func columnNullValue(tls *libc.TLS) uintptr { /* sqlite3.c:84642:18: */
+func columnNullValue(tls *libc.TLS) uintptr { /* sqlite3.c:85172:18: */
return uintptr(unsafe.Pointer(&nullMem))
}
var nullMem = Mem{
/* .flags = */ Fflags: U16(MEM_Null),
-} /* sqlite3.c:84652:20 */
+} /* sqlite3.c:85182:20 */
// Check to see if column iCol of the given statement is valid. If
// it is, return a pointer to the Mem for the value of that column.
// If iCol is not valid, return a pointer to a Mem which has a value
// of NULL.
-func columnMem(tls *libc.TLS, pStmt uintptr, i int32) uintptr { /* sqlite3.c:84682:12: */
+func columnMem(tls *libc.TLS, pStmt uintptr, i int32) uintptr { /* sqlite3.c:85212:12: */
var pVm uintptr
var pOut uintptr
@@ -60118,7 +62109,7 @@ func columnMem(tls *libc.TLS, pStmt uintptr, i int32) uintptr { /* sqlite3.c:846
// sqlite3_column_bytes()
// sqlite3_column_bytes16()
// sqiite3_column_blob()
-func columnMallocFailure(tls *libc.TLS, pStmt uintptr) { /* sqlite3.c:84717:13: */
+func columnMallocFailure(tls *libc.TLS, pStmt uintptr) { /* sqlite3.c:85247:13: */
// If malloc() failed during an encoding conversion within an
// sqlite3_column_XXX API, then set the return code of the statement to
// SQLITE_NOMEM. The next call to _step() (if any) will return SQLITE_ERROR
@@ -60135,7 +62126,7 @@ func columnMallocFailure(tls *libc.TLS, pStmt uintptr) { /* sqlite3.c:84717:13:
//
// The following routines are used to access elements of the current row
// in the result set.
-func Xsqlite3_column_blob(tls *libc.TLS, pStmt uintptr, i int32) uintptr { /* sqlite3.c:84737:23: */
+func Xsqlite3_column_blob(tls *libc.TLS, pStmt uintptr, i int32) uintptr { /* sqlite3.c:85267:23: */
var val uintptr
val = Xsqlite3_value_blob(tls, columnMem(tls, pStmt, i))
// Even though there is no encoding conversion, value_blob() might
@@ -60145,43 +62136,43 @@ func Xsqlite3_column_blob(tls *libc.TLS, pStmt uintptr, i int32) uintptr { /* sq
return val
}
-func Xsqlite3_column_bytes(tls *libc.TLS, pStmt uintptr, i int32) int32 { /* sqlite3.c:84747:16: */
+func Xsqlite3_column_bytes(tls *libc.TLS, pStmt uintptr, i int32) int32 { /* sqlite3.c:85277:16: */
var val int32 = Xsqlite3_value_bytes(tls, columnMem(tls, pStmt, i))
columnMallocFailure(tls, pStmt)
return val
}
-func Xsqlite3_column_bytes16(tls *libc.TLS, pStmt uintptr, i int32) int32 { /* sqlite3.c:84752:16: */
+func Xsqlite3_column_bytes16(tls *libc.TLS, pStmt uintptr, i int32) int32 { /* sqlite3.c:85282:16: */
var val int32 = Xsqlite3_value_bytes16(tls, columnMem(tls, pStmt, i))
columnMallocFailure(tls, pStmt)
return val
}
-func Xsqlite3_column_double(tls *libc.TLS, pStmt uintptr, i int32) float64 { /* sqlite3.c:84757:19: */
+func Xsqlite3_column_double(tls *libc.TLS, pStmt uintptr, i int32) float64 { /* sqlite3.c:85287:19: */
var val float64 = Xsqlite3_value_double(tls, columnMem(tls, pStmt, i))
columnMallocFailure(tls, pStmt)
return val
}
-func Xsqlite3_column_int(tls *libc.TLS, pStmt uintptr, i int32) int32 { /* sqlite3.c:84762:16: */
+func Xsqlite3_column_int(tls *libc.TLS, pStmt uintptr, i int32) int32 { /* sqlite3.c:85292:16: */
var val int32 = Xsqlite3_value_int(tls, columnMem(tls, pStmt, i))
columnMallocFailure(tls, pStmt)
return val
}
-func Xsqlite3_column_int64(tls *libc.TLS, pStmt uintptr, i int32) Sqlite_int64 { /* sqlite3.c:84767:25: */
+func Xsqlite3_column_int64(tls *libc.TLS, pStmt uintptr, i int32) Sqlite_int64 { /* sqlite3.c:85297:25: */
var val Sqlite_int64 = Xsqlite3_value_int64(tls, columnMem(tls, pStmt, i))
columnMallocFailure(tls, pStmt)
return val
}
-func Xsqlite3_column_text(tls *libc.TLS, pStmt uintptr, i int32) uintptr { /* sqlite3.c:84772:32: */
+func Xsqlite3_column_text(tls *libc.TLS, pStmt uintptr, i int32) uintptr { /* sqlite3.c:85302:32: */
var val uintptr = Xsqlite3_value_text(tls, columnMem(tls, pStmt, i))
columnMallocFailure(tls, pStmt)
return val
}
-func Xsqlite3_column_value(tls *libc.TLS, pStmt uintptr, i int32) uintptr { /* sqlite3.c:84777:26: */
+func Xsqlite3_column_value(tls *libc.TLS, pStmt uintptr, i int32) uintptr { /* sqlite3.c:85307:26: */
var pOut uintptr = columnMem(tls, pStmt, i)
if (int32((*Mem)(unsafe.Pointer(pOut)).Fflags) & MEM_Static) != 0 {
*(*U16)(unsafe.Pointer(pOut + 8 /* &.flags */)) &= libc.Uint16FromInt32((libc.CplInt32(MEM_Static)))
@@ -60191,13 +62182,13 @@ func Xsqlite3_column_value(tls *libc.TLS, pStmt uintptr, i int32) uintptr { /* s
return pOut
}
-func Xsqlite3_column_text16(tls *libc.TLS, pStmt uintptr, i int32) uintptr { /* sqlite3.c:84787:23: */
+func Xsqlite3_column_text16(tls *libc.TLS, pStmt uintptr, i int32) uintptr { /* sqlite3.c:85317:23: */
var val uintptr = Xsqlite3_value_text16(tls, columnMem(tls, pStmt, i))
columnMallocFailure(tls, pStmt)
return val
}
-func Xsqlite3_column_type(tls *libc.TLS, pStmt uintptr, i int32) int32 { /* sqlite3.c:84793:16: */
+func Xsqlite3_column_type(tls *libc.TLS, pStmt uintptr, i int32) int32 { /* sqlite3.c:85323:16: */
var iType int32 = Xsqlite3_value_type(tls, columnMem(tls, pStmt, i))
columnMallocFailure(tls, pStmt)
return iType
@@ -60217,7 +62208,7 @@ func Xsqlite3_column_type(tls *libc.TLS, pStmt uintptr, i int32) int32 { /* sqli
//
// If the result is not a simple column reference (if it is an expression
// or a constant) then useTypes 2, 3, and 4 return NULL.
-func columnName(tls *libc.TLS, pStmt uintptr, N int32, useUtf16 int32, useType int32) uintptr { /* sqlite3.c:84815:19: */
+func columnName(tls *libc.TLS, pStmt uintptr, N int32, useUtf16 int32, useType int32) uintptr { /* sqlite3.c:85345:19: */
var ret uintptr
var p uintptr
var n int32
@@ -60249,11 +62240,11 @@ func columnName(tls *libc.TLS, pStmt uintptr, N int32, useUtf16 int32, useType i
// Return the name of the Nth column of the result set returned by SQL
// statement pStmt.
-func Xsqlite3_column_name(tls *libc.TLS, pStmt uintptr, N int32) uintptr { /* sqlite3.c:84864:23: */
+func Xsqlite3_column_name(tls *libc.TLS, pStmt uintptr, N int32) uintptr { /* sqlite3.c:85394:23: */
return columnName(tls, pStmt, N, 0, COLNAME_NAME)
}
-func Xsqlite3_column_name16(tls *libc.TLS, pStmt uintptr, N int32) uintptr { /* sqlite3.c:84868:23: */
+func Xsqlite3_column_name16(tls *libc.TLS, pStmt uintptr, N int32) uintptr { /* sqlite3.c:85398:23: */
return columnName(tls, pStmt, N, 1, COLNAME_NAME)
}
@@ -60262,44 +62253,44 @@ func Xsqlite3_column_name16(tls *libc.TLS, pStmt uintptr, N int32) uintptr { /*
// Return the column declaration type (if applicable) of the 'i'th column
// of the result set of SQL statement pStmt.
-func Xsqlite3_column_decltype(tls *libc.TLS, pStmt uintptr, N int32) uintptr { /* sqlite3.c:84887:23: */
+func Xsqlite3_column_decltype(tls *libc.TLS, pStmt uintptr, N int32) uintptr { /* sqlite3.c:85417:23: */
return columnName(tls, pStmt, N, 0, COLNAME_DECLTYPE)
}
-func Xsqlite3_column_decltype16(tls *libc.TLS, pStmt uintptr, N int32) uintptr { /* sqlite3.c:84891:23: */
+func Xsqlite3_column_decltype16(tls *libc.TLS, pStmt uintptr, N int32) uintptr { /* sqlite3.c:85421:23: */
return columnName(tls, pStmt, N, 1, COLNAME_DECLTYPE)
}
// Return the name of the database from which a result column derives.
// NULL is returned if the result column is an expression or constant or
// anything else which is not an unambiguous reference to a database column.
-func Xsqlite3_column_database_name(tls *libc.TLS, pStmt uintptr, N int32) uintptr { /* sqlite3.c:84903:23: */
+func Xsqlite3_column_database_name(tls *libc.TLS, pStmt uintptr, N int32) uintptr { /* sqlite3.c:85433:23: */
return columnName(tls, pStmt, N, 0, COLNAME_DATABASE)
}
-func Xsqlite3_column_database_name16(tls *libc.TLS, pStmt uintptr, N int32) uintptr { /* sqlite3.c:84907:23: */
+func Xsqlite3_column_database_name16(tls *libc.TLS, pStmt uintptr, N int32) uintptr { /* sqlite3.c:85437:23: */
return columnName(tls, pStmt, N, 1, COLNAME_DATABASE)
}
// Return the name of the table from which a result column derives.
// NULL is returned if the result column is an expression or constant or
// anything else which is not an unambiguous reference to a database column.
-func Xsqlite3_column_table_name(tls *libc.TLS, pStmt uintptr, N int32) uintptr { /* sqlite3.c:84917:23: */
+func Xsqlite3_column_table_name(tls *libc.TLS, pStmt uintptr, N int32) uintptr { /* sqlite3.c:85447:23: */
return columnName(tls, pStmt, N, 0, COLNAME_TABLE)
}
-func Xsqlite3_column_table_name16(tls *libc.TLS, pStmt uintptr, N int32) uintptr { /* sqlite3.c:84921:23: */
+func Xsqlite3_column_table_name16(tls *libc.TLS, pStmt uintptr, N int32) uintptr { /* sqlite3.c:85451:23: */
return columnName(tls, pStmt, N, 1, COLNAME_TABLE)
}
// Return the name of the table column from which a result column derives.
// NULL is returned if the result column is an expression or constant or
// anything else which is not an unambiguous reference to a database column.
-func Xsqlite3_column_origin_name(tls *libc.TLS, pStmt uintptr, N int32) uintptr { /* sqlite3.c:84931:23: */
+func Xsqlite3_column_origin_name(tls *libc.TLS, pStmt uintptr, N int32) uintptr { /* sqlite3.c:85461:23: */
return columnName(tls, pStmt, N, 0, COLNAME_COLUMN)
}
-func Xsqlite3_column_origin_name16(tls *libc.TLS, pStmt uintptr, N int32) uintptr { /* sqlite3.c:84935:23: */
+func Xsqlite3_column_origin_name16(tls *libc.TLS, pStmt uintptr, N int32) uintptr { /* sqlite3.c:85465:23: */
return columnName(tls, pStmt, N, 1, COLNAME_COLUMN)
}
@@ -60316,21 +62307,21 @@ func Xsqlite3_column_origin_name16(tls *libc.TLS, pStmt uintptr, N int32) uintpt
//
// The error code stored in database p->db is overwritten with the return
// value in any case.
-func vdbeUnbind(tls *libc.TLS, p uintptr, i int32) int32 { /* sqlite3.c:84957:12: */
+func vdbeUnbind(tls *libc.TLS, p uintptr, i int32) int32 { /* sqlite3.c:85487:12: */
bp := tls.Alloc(8)
defer tls.Free(8)
var pVar uintptr
if vdbeSafetyNotNull(tls, p) != 0 {
- return Xsqlite3MisuseError(tls, 84960)
+ return Xsqlite3MisuseError(tls, 85490)
}
Xsqlite3_mutex_enter(tls, (*Sqlite3)(unsafe.Pointer((*Vdbe)(unsafe.Pointer(p)).Fdb)).Fmutex)
if ((*Vdbe)(unsafe.Pointer(p)).FiVdbeMagic != U32(VDBE_MAGIC_RUN)) || ((*Vdbe)(unsafe.Pointer(p)).Fpc >= 0) {
Xsqlite3Error(tls, (*Vdbe)(unsafe.Pointer(p)).Fdb, SQLITE_MISUSE)
Xsqlite3_mutex_leave(tls, (*Sqlite3)(unsafe.Pointer((*Vdbe)(unsafe.Pointer(p)).Fdb)).Fmutex)
Xsqlite3_log(tls, SQLITE_MISUSE,
- ts+4340 /* "bind on a busy p..." */, libc.VaList(bp, (*Vdbe)(unsafe.Pointer(p)).FzSql))
- return Xsqlite3MisuseError(tls, 84968)
+ ts+4471 /* "bind on a busy p..." */, libc.VaList(bp, (*Vdbe)(unsafe.Pointer(p)).FzSql))
+ return Xsqlite3MisuseError(tls, 85498)
}
if (i < 1) || (i > int32((*Vdbe)(unsafe.Pointer(p)).FnVar)) {
Xsqlite3Error(tls, (*Vdbe)(unsafe.Pointer(p)).Fdb, SQLITE_RANGE)
@@ -60358,13 +62349,13 @@ func vdbeUnbind(tls *libc.TLS, p uintptr, i int32) int32 { /* sqlite3.c:84957:12
}
return (U32(U32(1)) << i)
}())) != U32(0)) {
- libc.SetBitFieldPtr16Uint32(p+200 /* &.expired */, Bft(1), 0, 0x3)
+ libc.SetBitFieldPtr16Uint32(p+200 /* &.expired */, Bft(1), 14, 0xc000)
}
return SQLITE_OK
}
// Bind a text or BLOB value.
-func bindText(tls *libc.TLS, pStmt uintptr, i int32, zData uintptr, nData int32, xDel uintptr, encoding U8) int32 { /* sqlite3.c:85000:12: */
+func bindText(tls *libc.TLS, pStmt uintptr, i int32, zData uintptr, nData I64, xDel uintptr, encoding U8) int32 { /* sqlite3.c:85530:12: */
var p uintptr = pStmt
var pVar uintptr
var rc int32
@@ -60384,27 +62375,22 @@ func bindText(tls *libc.TLS, pStmt uintptr, i int32, zData uintptr, nData int32,
}
Xsqlite3_mutex_leave(tls, (*Sqlite3)(unsafe.Pointer((*Vdbe)(unsafe.Pointer(p)).Fdb)).Fmutex)
} else if (xDel != (uintptr(0))) && (xDel != (libc.UintptrFromInt32(-1))) {
- (*(*func(*libc.TLS, uintptr))(unsafe.Pointer(&xDel)))(tls, zData)
+ (*struct{ f func(*libc.TLS, uintptr) })(unsafe.Pointer(&struct{ uintptr }{xDel})).f(tls, zData)
}
return rc
}
// Bind a blob value to an SQL statement variable.
-func Xsqlite3_bind_blob(tls *libc.TLS, pStmt uintptr, i int32, zData uintptr, nData int32, xDel uintptr) int32 { /* sqlite3.c:85036:16: */
- return bindText(tls, pStmt, i, zData, nData, xDel, uint8(0))
+func Xsqlite3_bind_blob(tls *libc.TLS, pStmt uintptr, i int32, zData uintptr, nData int32, xDel uintptr) int32 { /* sqlite3.c:85566:16: */
+ return bindText(tls, pStmt, i, zData, int64(nData), xDel, uint8(0))
}
-func Xsqlite3_bind_blob64(tls *libc.TLS, pStmt uintptr, i int32, zData uintptr, nData Sqlite3_uint64, xDel uintptr) int32 { /* sqlite3.c:85048:16: */
+func Xsqlite3_bind_blob64(tls *libc.TLS, pStmt uintptr, i int32, zData uintptr, nData Sqlite3_uint64, xDel uintptr) int32 { /* sqlite3.c:85578:16: */
- if nData > uint64(0x7fffffff) {
- return invokeValueDestructor(tls, zData, xDel, uintptr(0))
- } else {
- return bindText(tls, pStmt, i, zData, int32(nData), xDel, uint8(0))
- }
- return int32(0)
+ return bindText(tls, pStmt, i, zData, int64(nData), xDel, uint8(0))
}
-func Xsqlite3_bind_double(tls *libc.TLS, pStmt uintptr, i int32, rValue float64) int32 { /* sqlite3.c:85062:16: */
+func Xsqlite3_bind_double(tls *libc.TLS, pStmt uintptr, i int32, rValue float64) int32 { /* sqlite3.c:85588:16: */
var rc int32
var p uintptr = pStmt
rc = vdbeUnbind(tls, p, i)
@@ -60415,11 +62401,11 @@ func Xsqlite3_bind_double(tls *libc.TLS, pStmt uintptr, i int32, rValue float64)
return rc
}
-func Xsqlite3_bind_int(tls *libc.TLS, p uintptr, i int32, iValue int32) int32 { /* sqlite3.c:85072:16: */
+func Xsqlite3_bind_int(tls *libc.TLS, p uintptr, i int32, iValue int32) int32 { /* sqlite3.c:85598:16: */
return Xsqlite3_bind_int64(tls, p, i, I64(iValue))
}
-func Xsqlite3_bind_int64(tls *libc.TLS, pStmt uintptr, i int32, iValue Sqlite_int64) int32 { /* sqlite3.c:85075:16: */
+func Xsqlite3_bind_int64(tls *libc.TLS, pStmt uintptr, i int32, iValue Sqlite_int64) int32 { /* sqlite3.c:85601:16: */
var rc int32
var p uintptr = pStmt
rc = vdbeUnbind(tls, p, i)
@@ -60430,7 +62416,7 @@ func Xsqlite3_bind_int64(tls *libc.TLS, pStmt uintptr, i int32, iValue Sqlite_in
return rc
}
-func Xsqlite3_bind_null(tls *libc.TLS, pStmt uintptr, i int32) int32 { /* sqlite3.c:85085:16: */
+func Xsqlite3_bind_null(tls *libc.TLS, pStmt uintptr, i int32) int32 { /* sqlite3.c:85611:16: */
var rc int32
var p uintptr = pStmt
rc = vdbeUnbind(tls, p, i)
@@ -60440,7 +62426,7 @@ func Xsqlite3_bind_null(tls *libc.TLS, pStmt uintptr, i int32) int32 { /* sqlite
return rc
}
-func Xsqlite3_bind_pointer(tls *libc.TLS, pStmt uintptr, i int32, pPtr uintptr, zPTtype uintptr, xDestructor uintptr) int32 { /* sqlite3.c:85094:16: */
+func Xsqlite3_bind_pointer(tls *libc.TLS, pStmt uintptr, i int32, pPtr uintptr, zPTtype uintptr, xDestructor uintptr) int32 { /* sqlite3.c:85620:16: */
var rc int32
var p uintptr = pStmt
rc = vdbeUnbind(tls, p, i)
@@ -60448,43 +62434,38 @@ func Xsqlite3_bind_pointer(tls *libc.TLS, pStmt uintptr, i int32, pPtr uintptr,
Xsqlite3VdbeMemSetPointer(tls, ((*Vdbe)(unsafe.Pointer(p)).FaVar + uintptr((i-1))*56), pPtr, zPTtype, xDestructor)
Xsqlite3_mutex_leave(tls, (*Sqlite3)(unsafe.Pointer((*Vdbe)(unsafe.Pointer(p)).Fdb)).Fmutex)
} else if xDestructor != 0 {
- (*(*func(*libc.TLS, uintptr))(unsafe.Pointer(&xDestructor)))(tls, pPtr)
+ (*struct{ f func(*libc.TLS, uintptr) })(unsafe.Pointer(&struct{ uintptr }{xDestructor})).f(tls, pPtr)
}
return rc
}
-func Xsqlite3_bind_text(tls *libc.TLS, pStmt uintptr, i int32, zData uintptr, nData int32, xDel uintptr) int32 { /* sqlite3.c:85112:16: */
- return bindText(tls, pStmt, i, zData, nData, xDel, uint8(SQLITE_UTF8))
+func Xsqlite3_bind_text(tls *libc.TLS, pStmt uintptr, i int32, zData uintptr, nData int32, xDel uintptr) int32 { /* sqlite3.c:85638:16: */
+ return bindText(tls, pStmt, i, zData, int64(nData), xDel, uint8(SQLITE_UTF8))
}
-func Xsqlite3_bind_text64(tls *libc.TLS, pStmt uintptr, i int32, zData uintptr, nData Sqlite3_uint64, xDel uintptr, enc uint8) int32 { /* sqlite3.c:85121:16: */
+func Xsqlite3_bind_text64(tls *libc.TLS, pStmt uintptr, i int32, zData uintptr, nData Sqlite3_uint64, xDel uintptr, enc uint8) int32 { /* sqlite3.c:85647:16: */
- if nData > uint64(0x7fffffff) {
- return invokeValueDestructor(tls, zData, xDel, uintptr(0))
- } else {
- if int32(enc) == SQLITE_UTF16 {
- enc = func() uint8 {
- if int32(*(*int8)(unsafe.Pointer(uintptr(unsafe.Pointer(&Xsqlite3one))))) == 0 {
- return uint8(SQLITE_UTF16BE)
- }
- return uint8(SQLITE_UTF16LE)
- }()
- }
- return bindText(tls, pStmt, i, zData, int32(nData), xDel, enc)
+ if int32(enc) == SQLITE_UTF16 {
+ enc = func() uint8 {
+ if int32(*(*uint8)(unsafe.Pointer(uintptr(unsafe.Pointer(&Xsqlite3one))))) == 0 {
+ return uint8(SQLITE_UTF16BE)
+ }
+ return uint8(SQLITE_UTF16LE)
+ }()
}
- return int32(0)
+ return bindText(tls, pStmt, i, zData, int64(nData), xDel, enc)
}
-func Xsqlite3_bind_text16(tls *libc.TLS, pStmt uintptr, i int32, zData uintptr, nData int32, xDel uintptr) int32 { /* sqlite3.c:85138:16: */
- return bindText(tls, pStmt, i, zData, nData, xDel, func() uint8 {
- if int32(*(*int8)(unsafe.Pointer(uintptr(unsafe.Pointer(&Xsqlite3one))))) == 0 {
+func Xsqlite3_bind_text16(tls *libc.TLS, pStmt uintptr, i int32, zData uintptr, nData int32, xDel uintptr) int32 { /* sqlite3.c:85660:16: */
+ return bindText(tls, pStmt, i, zData, int64(nData), xDel, func() uint8 {
+ if int32(*(*uint8)(unsafe.Pointer(uintptr(unsafe.Pointer(&Xsqlite3one))))) == 0 {
return uint8(SQLITE_UTF16BE)
}
return uint8(SQLITE_UTF16LE)
}())
}
-func Xsqlite3_bind_value(tls *libc.TLS, pStmt uintptr, i int32, pValue uintptr) int32 { /* sqlite3.c:85148:16: */
+func Xsqlite3_bind_value(tls *libc.TLS, pStmt uintptr, i int32, pValue uintptr) int32 { /* sqlite3.c:85670:16: */
var rc int32
switch Xsqlite3_value_type(tls, pValue) {
case SQLITE_INTEGER:
@@ -60511,7 +62492,7 @@ func Xsqlite3_bind_value(tls *libc.TLS, pStmt uintptr, i int32, pValue uintptr)
}
case SQLITE_TEXT:
{
- rc = bindText(tls, pStmt, i, (*Sqlite3_value)(unsafe.Pointer(pValue)).Fz, (*Sqlite3_value)(unsafe.Pointer(pValue)).Fn, libc.UintptrFromInt32(-1),
+ rc = bindText(tls, pStmt, i, (*Sqlite3_value)(unsafe.Pointer(pValue)).Fz, int64((*Sqlite3_value)(unsafe.Pointer(pValue)).Fn), libc.UintptrFromInt32(-1),
(*Sqlite3_value)(unsafe.Pointer(pValue)).Fenc)
break
@@ -60526,7 +62507,7 @@ func Xsqlite3_bind_value(tls *libc.TLS, pStmt uintptr, i int32, pValue uintptr)
return rc
}
-func Xsqlite3_bind_zeroblob(tls *libc.TLS, pStmt uintptr, i int32, n int32) int32 { /* sqlite3.c:85179:16: */
+func Xsqlite3_bind_zeroblob(tls *libc.TLS, pStmt uintptr, i int32, n int32) int32 { /* sqlite3.c:85701:16: */
var rc int32
var p uintptr = pStmt
rc = vdbeUnbind(tls, p, i)
@@ -60537,7 +62518,7 @@ func Xsqlite3_bind_zeroblob(tls *libc.TLS, pStmt uintptr, i int32, n int32) int3
return rc
}
-func Xsqlite3_bind_zeroblob64(tls *libc.TLS, pStmt uintptr, i int32, n Sqlite3_uint64) int32 { /* sqlite3.c:85189:16: */
+func Xsqlite3_bind_zeroblob64(tls *libc.TLS, pStmt uintptr, i int32, n Sqlite3_uint64) int32 { /* sqlite3.c:85711:16: */
var rc int32
var p uintptr = pStmt
Xsqlite3_mutex_enter(tls, (*Sqlite3)(unsafe.Pointer((*Vdbe)(unsafe.Pointer(p)).Fdb)).Fmutex)
@@ -60554,7 +62535,7 @@ func Xsqlite3_bind_zeroblob64(tls *libc.TLS, pStmt uintptr, i int32, n Sqlite3_u
// Return the number of wildcards that can be potentially bound to.
// This routine is added to support DBD::SQLite.
-func Xsqlite3_bind_parameter_count(tls *libc.TLS, pStmt uintptr) int32 { /* sqlite3.c:85208:16: */
+func Xsqlite3_bind_parameter_count(tls *libc.TLS, pStmt uintptr) int32 { /* sqlite3.c:85730:16: */
var p uintptr = pStmt
if p != 0 {
return int32((*Vdbe)(unsafe.Pointer(p)).FnVar)
@@ -60566,7 +62547,7 @@ func Xsqlite3_bind_parameter_count(tls *libc.TLS, pStmt uintptr) int32 { /* sqli
// is out of range or if the wildcard is unnamed.
//
// The result is always UTF-8.
-func Xsqlite3_bind_parameter_name(tls *libc.TLS, pStmt uintptr, i int32) uintptr { /* sqlite3.c:85219:23: */
+func Xsqlite3_bind_parameter_name(tls *libc.TLS, pStmt uintptr, i int32) uintptr { /* sqlite3.c:85741:23: */
var p uintptr = pStmt
if p == uintptr(0) {
return uintptr(0)
@@ -60577,19 +62558,19 @@ func Xsqlite3_bind_parameter_name(tls *libc.TLS, pStmt uintptr, i int32) uintptr
// Given a wildcard parameter name, return the index of the variable
// with that name. If there is no variable with the given name,
// return 0.
-func Xsqlite3VdbeParameterIndex(tls *libc.TLS, p uintptr, zName uintptr, nName int32) int32 { /* sqlite3.c:85230:20: */
+func Xsqlite3VdbeParameterIndex(tls *libc.TLS, p uintptr, zName uintptr, nName int32) int32 { /* sqlite3.c:85752:20: */
if (p == uintptr(0)) || (zName == uintptr(0)) {
return 0
}
return Xsqlite3VListNameToNum(tls, (*Vdbe)(unsafe.Pointer(p)).FpVList, zName, nName)
}
-func Xsqlite3_bind_parameter_index(tls *libc.TLS, pStmt uintptr, zName uintptr) int32 { /* sqlite3.c:85234:16: */
+func Xsqlite3_bind_parameter_index(tls *libc.TLS, pStmt uintptr, zName uintptr) int32 { /* sqlite3.c:85756:16: */
return Xsqlite3VdbeParameterIndex(tls, pStmt, zName, Xsqlite3Strlen30(tls, zName))
}
// Transfer all bindings from the first statement over to the second.
-func Xsqlite3TransferBindings(tls *libc.TLS, pFromStmt uintptr, pToStmt uintptr) int32 { /* sqlite3.c:85241:20: */
+func Xsqlite3TransferBindings(tls *libc.TLS, pFromStmt uintptr, pToStmt uintptr) int32 { /* sqlite3.c:85763:20: */
var pFrom uintptr = pFromStmt
var pTo uintptr = pToStmt
var i int32
@@ -60612,7 +62593,7 @@ func Xsqlite3TransferBindings(tls *libc.TLS, pFromStmt uintptr, pToStmt uintptr)
// If the two statements contain a different number of bindings, then
// an SQLITE_ERROR is returned. Nothing else can go wrong, so otherwise
// SQLITE_OK is returned.
-func Xsqlite3_transfer_bindings(tls *libc.TLS, pFromStmt uintptr, pToStmt uintptr) int32 { /* sqlite3.c:85268:16: */
+func Xsqlite3_transfer_bindings(tls *libc.TLS, pFromStmt uintptr, pToStmt uintptr) int32 { /* sqlite3.c:85790:16: */
var pFrom uintptr = pFromStmt
var pTo uintptr = pToStmt
if int32((*Vdbe)(unsafe.Pointer(pFrom)).FnVar) != int32((*Vdbe)(unsafe.Pointer(pTo)).FnVar) {
@@ -60620,11 +62601,11 @@ func Xsqlite3_transfer_bindings(tls *libc.TLS, pFromStmt uintptr, pToStmt uintpt
}
if (*Vdbe)(unsafe.Pointer(pTo)).Fexpmask != 0 {
- libc.SetBitFieldPtr16Uint32(pTo+200 /* &.expired */, Bft(1), 0, 0x3)
+ libc.SetBitFieldPtr16Uint32(pTo+200 /* &.expired */, Bft(1), 14, 0xc000)
}
if (*Vdbe)(unsafe.Pointer(pFrom)).Fexpmask != 0 {
- libc.SetBitFieldPtr16Uint32(pFrom+200 /* &.expired */, Bft(1), 0, 0x3)
+ libc.SetBitFieldPtr16Uint32(pFrom+200 /* &.expired */, Bft(1), 14, 0xc000)
}
return Xsqlite3TransferBindings(tls, pFromStmt, pToStmt)
}
@@ -60633,7 +62614,7 @@ func Xsqlite3_transfer_bindings(tls *libc.TLS, pFromStmt uintptr, pToStmt uintpt
// in the argument belongs. This is the same database handle that was
// the first argument to the sqlite3_prepare() that was used to create
// the statement in the first place.
-func Xsqlite3_db_handle(tls *libc.TLS, pStmt uintptr) uintptr { /* sqlite3.c:85292:20: */
+func Xsqlite3_db_handle(tls *libc.TLS, pStmt uintptr) uintptr { /* sqlite3.c:85814:20: */
if pStmt != 0 {
return (*Vdbe)(unsafe.Pointer(pStmt)).Fdb
}
@@ -60642,24 +62623,24 @@ func Xsqlite3_db_handle(tls *libc.TLS, pStmt uintptr) uintptr { /* sqlite3.c:852
// Return true if the prepared statement is guaranteed to not modify the
// database.
-func Xsqlite3_stmt_readonly(tls *libc.TLS, pStmt uintptr) int32 { /* sqlite3.c:85300:16: */
+func Xsqlite3_stmt_readonly(tls *libc.TLS, pStmt uintptr) int32 { /* sqlite3.c:85822:16: */
if pStmt != 0 {
- return (int32(*(*uint16)(unsafe.Pointer(pStmt + 200 /* &.readOnly */)) >> 8 & 0x1))
+ return (int32(*(*uint16)(unsafe.Pointer(pStmt + 200 /* &.readOnly */)) & 0x100 >> 8))
}
return 1
}
// Return 1 if the statement is an EXPLAIN and return 2 if the
// statement is an EXPLAIN QUERY PLAN
-func Xsqlite3_stmt_isexplain(tls *libc.TLS, pStmt uintptr) int32 { /* sqlite3.c:85308:16: */
+func Xsqlite3_stmt_isexplain(tls *libc.TLS, pStmt uintptr) int32 { /* sqlite3.c:85830:16: */
if pStmt != 0 {
- return (int32(*(*uint16)(unsafe.Pointer(pStmt + 200 /* &.explain */)) >> 12 & 0x3))
+ return (int32(*(*uint16)(unsafe.Pointer(pStmt + 200 /* &.explain */)) & 0x3000 >> 12))
}
return 0
}
// Return true if the prepared statement is in need of being reset.
-func Xsqlite3_stmt_busy(tls *libc.TLS, pStmt uintptr) int32 { /* sqlite3.c:85315:16: */
+func Xsqlite3_stmt_busy(tls *libc.TLS, pStmt uintptr) int32 { /* sqlite3.c:85837:16: */
var v uintptr = pStmt
return (libc.Bool32(((v != uintptr(0)) && ((*Vdbe)(unsafe.Pointer(v)).FiVdbeMagic == U32(VDBE_MAGIC_RUN))) && ((*Vdbe)(unsafe.Pointer(v)).Fpc >= 0)))
}
@@ -60668,7 +62649,7 @@ func Xsqlite3_stmt_busy(tls *libc.TLS, pStmt uintptr) int32 { /* sqlite3.c:85315
// with database connection pDb. If pStmt is NULL, return the first
// prepared statement for the database connection. Return NULL if there
// are no more.
-func Xsqlite3_next_stmt(tls *libc.TLS, pDb uintptr, pStmt uintptr) uintptr { /* sqlite3.c:85326:25: */
+func Xsqlite3_next_stmt(tls *libc.TLS, pDb uintptr, pStmt uintptr) uintptr { /* sqlite3.c:85848:25: */
var pNext uintptr
Xsqlite3_mutex_enter(tls, (*Sqlite3)(unsafe.Pointer(pDb)).Fmutex)
if pStmt == uintptr(0) {
@@ -60681,7 +62662,7 @@ func Xsqlite3_next_stmt(tls *libc.TLS, pDb uintptr, pStmt uintptr) uintptr { /*
}
// Return the value of a status counter for a prepared statement
-func Xsqlite3_stmt_status(tls *libc.TLS, pStmt uintptr, op int32, resetFlag int32) int32 { /* sqlite3.c:85347:16: */
+func Xsqlite3_stmt_status(tls *libc.TLS, pStmt uintptr, op int32, resetFlag int32) int32 { /* sqlite3.c:85869:16: */
bp := tls.Alloc(4)
defer tls.Free(4)
@@ -60707,7 +62688,7 @@ func Xsqlite3_stmt_status(tls *libc.TLS, pStmt uintptr, op int32, resetFlag int3
}
// Return the SQL associated with a prepared statement
-func Xsqlite3_sql(tls *libc.TLS, pStmt uintptr) uintptr { /* sqlite3.c:85377:23: */
+func Xsqlite3_sql(tls *libc.TLS, pStmt uintptr) uintptr { /* sqlite3.c:85899:23: */
var p uintptr = pStmt
if p != 0 {
return (*Vdbe)(unsafe.Pointer(p)).FzSql
@@ -60722,7 +62703,7 @@ func Xsqlite3_sql(tls *libc.TLS, pStmt uintptr) uintptr { /* sqlite3.c:85377:23:
//
// The SQLITE_TRACE_SIZE_LIMIT puts an upper bound on the size of
// expanded bound parameters.
-func Xsqlite3_expanded_sql(tls *libc.TLS, pStmt uintptr) uintptr { /* sqlite3.c:85391:17: */
+func Xsqlite3_expanded_sql(tls *libc.TLS, pStmt uintptr) uintptr { /* sqlite3.c:85913:17: */
var z uintptr = uintptr(0)
var zSql uintptr = Xsqlite3_sql(tls, pStmt)
if zSql != 0 {
@@ -60737,7 +62718,7 @@ func Xsqlite3_expanded_sql(tls *libc.TLS, pStmt uintptr) uintptr { /* sqlite3.c:
// Allocate and populate an UnpackedRecord structure based on the serialized
// record in nKey/pKey. Return a pointer to the new UnpackedRecord structure
// if successful, or a NULL pointer if an OOM error is encountered.
-func vdbeUnpackRecord(tls *libc.TLS, pKeyInfo uintptr, nKey int32, pKey uintptr) uintptr { /* sqlite3.c:85429:23: */
+func vdbeUnpackRecord(tls *libc.TLS, pKeyInfo uintptr, nKey int32, pKey uintptr) uintptr { /* sqlite3.c:85951:23: */
var pRet uintptr // Return value
pRet = Xsqlite3VdbeAllocUnpackedRecord(tls, pKeyInfo)
@@ -60750,7 +62731,7 @@ func vdbeUnpackRecord(tls *libc.TLS, pKeyInfo uintptr, nKey int32, pKey uintptr)
// This function is called from within a pre-update callback to retrieve
// a field of the row currently being updated or deleted.
-func Xsqlite3_preupdate_old(tls *libc.TLS, db uintptr, iIdx int32, ppValue uintptr) int32 { /* sqlite3.c:85448:16: */
+func Xsqlite3_preupdate_old(tls *libc.TLS, db uintptr, iIdx int32, ppValue uintptr) int32 { /* sqlite3.c:85970:16: */
var p uintptr
var pMem uintptr
var rc int32
@@ -60764,7 +62745,7 @@ func Xsqlite3_preupdate_old(tls *libc.TLS, db uintptr, iIdx int32, ppValue uintp
if !(!(p != 0) || ((*PreUpdate)(unsafe.Pointer(p)).Fop == SQLITE_INSERT)) {
goto __1
}
- rc = Xsqlite3MisuseError(tls, 85456)
+ rc = Xsqlite3MisuseError(tls, 85978)
goto preupdate_old_out
__1:
;
@@ -60856,7 +62837,7 @@ preupdate_old_out:
// This function is called from within a pre-update callback to retrieve
// the number of columns in the row being updated, deleted or inserted.
-func Xsqlite3_preupdate_count(tls *libc.TLS, db uintptr) int32 { /* sqlite3.c:85511:16: */
+func Xsqlite3_preupdate_count(tls *libc.TLS, db uintptr) int32 { /* sqlite3.c:86033:16: */
var p uintptr = (*Sqlite3)(unsafe.Pointer(db)).FpPreUpdate
return func() int32 {
if p != 0 {
@@ -60875,7 +62856,7 @@ func Xsqlite3_preupdate_count(tls *libc.TLS, db uintptr) int32 { /* sqlite3.c:85
//
// For the purposes of the previous paragraph, a foreign key CASCADE, SET NULL
// or SET DEFAULT action is considered a trigger.
-func Xsqlite3_preupdate_depth(tls *libc.TLS, db uintptr) int32 { /* sqlite3.c:85529:16: */
+func Xsqlite3_preupdate_depth(tls *libc.TLS, db uintptr) int32 { /* sqlite3.c:86051:16: */
var p uintptr = (*Sqlite3)(unsafe.Pointer(db)).FpPreUpdate
return func() int32 {
if p != 0 {
@@ -60885,9 +62866,21 @@ func Xsqlite3_preupdate_depth(tls *libc.TLS, db uintptr) int32 { /* sqlite3.c:85
}()
}
+// This function is designed to be called from within a pre-update callback
+// only.
+func Xsqlite3_preupdate_blobwrite(tls *libc.TLS, db uintptr) int32 { /* sqlite3.c:86062:16: */
+ var p uintptr = (*Sqlite3)(unsafe.Pointer(db)).FpPreUpdate
+ return func() int32 {
+ if p != 0 {
+ return (*PreUpdate)(unsafe.Pointer(p)).FiBlobWrite
+ }
+ return -1
+ }()
+}
+
// This function is called from within a pre-update callback to retrieve
// a field of the row currently being updated or inserted.
-func Xsqlite3_preupdate_new(tls *libc.TLS, db uintptr, iIdx int32, ppValue uintptr) int32 { /* sqlite3.c:85540:16: */
+func Xsqlite3_preupdate_new(tls *libc.TLS, db uintptr, iIdx int32, ppValue uintptr) int32 { /* sqlite3.c:86073:16: */
var p uintptr
var rc int32
var pMem uintptr
@@ -60901,7 +62894,7 @@ func Xsqlite3_preupdate_new(tls *libc.TLS, db uintptr, iIdx int32, ppValue uintp
if !(!(p != 0) || ((*PreUpdate)(unsafe.Pointer(p)).Fop == SQLITE_DELETE)) {
goto __1
}
- rc = Xsqlite3MisuseError(tls, 85546)
+ rc = Xsqlite3MisuseError(tls, 86079)
goto preupdate_new_out
__1:
;
@@ -61042,7 +63035,7 @@ preupdate_new_out:
// bytes in this text up to but excluding the first character in
// a host parameter. If the text contains no host parameters, return
// the total number of bytes in the text.
-func findNextHostParameter(tls *libc.TLS, zSql uintptr, pnToken uintptr) int32 { /* sqlite3.c:85710:12: */
+func findNextHostParameter(tls *libc.TLS, zSql uintptr, pnToken uintptr) int32 { /* sqlite3.c:86243:12: */
bp := tls.Alloc(4)
defer tls.Free(4)
@@ -61052,7 +63045,7 @@ func findNextHostParameter(tls *libc.TLS, zSql uintptr, pnToken uintptr) int32 {
var n int32
*(*int32)(unsafe.Pointer(pnToken)) = 0
- for *(*int8)(unsafe.Pointer(zSql)) != 0 {
+ for *(*uint8)(unsafe.Pointer(zSql)) != 0 {
n = Xsqlite3GetToken(tls, zSql, bp /* &tokenType */)
if *(*int32)(unsafe.Pointer(bp /* tokenType */)) == TK_VARIABLE {
@@ -61087,7 +63080,7 @@ func findNextHostParameter(tls *libc.TLS, zSql uintptr, pnToken uintptr) int32 {
// statement for the corresponding OP_Variable opcode. Once the host
// parameter index is known, locate the value in p->aVar[]. Then render
// the value as a literal in place of the host parameter name.
-func Xsqlite3VdbeExpandSql(tls *libc.TLS, p uintptr, zRawSql uintptr) uintptr { /* sqlite3.c:85753:21: */
+func Xsqlite3VdbeExpandSql(tls *libc.TLS, p uintptr, zRawSql uintptr) uintptr { /* sqlite3.c:86286:21: */
bp := tls.Alloc(248)
defer tls.Free(248)
@@ -61103,25 +63096,25 @@ func Xsqlite3VdbeExpandSql(tls *libc.TLS, p uintptr, zRawSql uintptr) uintptr {
// Accumulate the output here
// var utf8 Mem at bp+192, 56
// Used to convert UTF16 into UTF8 for display
- // var zBase [100]int8 at bp+80, 100
+ // var zBase [100]uint8 at bp+80, 100
// Initial working space
db = (*Vdbe)(unsafe.Pointer(p)).Fdb
- Xsqlite3StrAccumInit(tls, bp+48 /* &out */, uintptr(0), bp+80 /* &zBase[0] */, int32(unsafe.Sizeof([100]int8{})),
+ Xsqlite3StrAccumInit(tls, bp+48 /* &out */, uintptr(0), bp+80 /* &zBase[0] */, int32(unsafe.Sizeof([100]uint8{})),
*(*int32)(unsafe.Pointer((db + 128 /* &.aLimit */))))
if (*Sqlite3)(unsafe.Pointer(db)).FnVdbeExec > 1 {
- for *(*int8)(unsafe.Pointer(zRawSql)) != 0 {
+ for *(*uint8)(unsafe.Pointer(zRawSql)) != 0 {
var zStart uintptr = zRawSql
- for (int32(*(*int8)(unsafe.Pointer(libc.PostIncUintptr(&zRawSql, 1)))) != '\n') && (*(*int8)(unsafe.Pointer(zRawSql)) != 0) {
+ for (int32(*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&zRawSql, 1)))) != '\n') && (*(*uint8)(unsafe.Pointer(zRawSql)) != 0) {
}
- Xsqlite3_str_append(tls, bp+48 /* &out */, ts+4380 /* "-- " */, 3)
+ Xsqlite3_str_append(tls, bp+48 /* &out */, ts+4511 /* "-- " */, 3)
Xsqlite3_str_append(tls, bp+48 /* &out */, zStart, (int32((int64(zRawSql) - int64(zStart)) / 1)))
}
} else if int32((*Vdbe)(unsafe.Pointer(p)).FnVar) == 0 {
Xsqlite3_str_append(tls, bp+48 /* &out */, zRawSql, Xsqlite3Strlen30(tls, zRawSql))
} else {
- for *(*int8)(unsafe.Pointer(zRawSql)) != 0 {
+ for *(*uint8)(unsafe.Pointer(zRawSql)) != 0 {
n = findNextHostParameter(tls, zRawSql, bp+180 /* &nToken */)
Xsqlite3_str_append(tls, bp+48 /* &out */, zRawSql, n)
@@ -61130,7 +63123,7 @@ func Xsqlite3VdbeExpandSql(tls *libc.TLS, p uintptr, zRawSql uintptr) uintptr {
if *(*int32)(unsafe.Pointer(bp + 180 /* nToken */)) == 0 {
break
}
- if int32(*(*int8)(unsafe.Pointer(zRawSql))) == '?' {
+ if int32(*(*uint8)(unsafe.Pointer(zRawSql))) == '?' {
if *(*int32)(unsafe.Pointer(bp + 180 /* nToken */)) > 1 {
Xsqlite3GetInt32(tls, (zRawSql + 1), bp+184 /* &idx */)
@@ -61152,18 +63145,18 @@ func Xsqlite3VdbeExpandSql(tls *libc.TLS, p uintptr, zRawSql uintptr) uintptr {
pVar = ((*Vdbe)(unsafe.Pointer(p)).FaVar + uintptr((*(*int32)(unsafe.Pointer(bp + 184 /* idx */))-1))*56)
if (int32((*Mem)(unsafe.Pointer(pVar)).Fflags) & MEM_Null) != 0 {
- Xsqlite3_str_append(tls, bp+48 /* &out */, ts+704 /* "NULL" */, 4)
+ Xsqlite3_str_append(tls, bp+48 /* &out */, ts+756 /* "NULL" */, 4)
} else if (int32((*Mem)(unsafe.Pointer(pVar)).Fflags) & (MEM_Int | MEM_IntReal)) != 0 {
- Xsqlite3_str_appendf(tls, bp+48 /* &out */, ts+3953 /* "%lld" */, libc.VaList(bp, *(*I64)(unsafe.Pointer(pVar /* &.u */))))
+ Xsqlite3_str_appendf(tls, bp+48 /* &out */, ts+4084 /* "%lld" */, libc.VaList(bp, *(*I64)(unsafe.Pointer(pVar /* &.u */))))
} else if (int32((*Mem)(unsafe.Pointer(pVar)).Fflags) & MEM_Real) != 0 {
- Xsqlite3_str_appendf(tls, bp+48 /* &out */, ts+3903 /* "%!.15g" */, libc.VaList(bp+8, *(*float64)(unsafe.Pointer(pVar /* &.u */))))
+ Xsqlite3_str_appendf(tls, bp+48 /* &out */, ts+4034 /* "%!.15g" */, libc.VaList(bp+8, *(*float64)(unsafe.Pointer(pVar /* &.u */))))
} else if (int32((*Mem)(unsafe.Pointer(pVar)).Fflags) & MEM_Str) != 0 {
var nOut int32 // Number of bytes of the string text to include in output
var enc U8 = (*Sqlite3)(unsafe.Pointer(db)).Fenc
if int32(enc) != SQLITE_UTF8 {
libc.Xmemset(tls, bp+192 /* &utf8 */, 0, uint64(unsafe.Sizeof(Mem{})))
(*Mem)(unsafe.Pointer(bp + 192 /* &utf8 */)).Fdb = db
- Xsqlite3VdbeMemSetStr(tls, bp+192 /* &utf8 */, (*Mem)(unsafe.Pointer(pVar)).Fz, (*Mem)(unsafe.Pointer(pVar)).Fn, enc, uintptr(0))
+ Xsqlite3VdbeMemSetStr(tls, bp+192 /* &utf8 */, (*Mem)(unsafe.Pointer(pVar)).Fz, int64((*Mem)(unsafe.Pointer(pVar)).Fn), enc, uintptr(0))
if SQLITE_NOMEM == Xsqlite3VdbeChangeEncoding(tls, bp+192 /* &utf8 */, SQLITE_UTF8) {
(*StrAccum)(unsafe.Pointer(bp + 48 /* &out */)).FaccError = U8(SQLITE_NOMEM)
(*StrAccum)(unsafe.Pointer(bp + 48 /* &out */)).FnAlloc = U32(0)
@@ -61171,21 +63164,21 @@ func Xsqlite3VdbeExpandSql(tls *libc.TLS, p uintptr, zRawSql uintptr) uintptr {
pVar = bp + 192 /* &utf8 */
}
nOut = (*Mem)(unsafe.Pointer(pVar)).Fn
- Xsqlite3_str_appendf(tls, bp+48 /* &out */, ts+4384 /* "'%.*q'" */, libc.VaList(bp+16, nOut, (*Mem)(unsafe.Pointer(pVar)).Fz))
+ Xsqlite3_str_appendf(tls, bp+48 /* &out */, ts+4515 /* "'%.*q'" */, libc.VaList(bp+16, nOut, (*Mem)(unsafe.Pointer(pVar)).Fz))
if int32(enc) != SQLITE_UTF8 {
Xsqlite3VdbeMemRelease(tls, bp+192 /* &utf8 */)
}
} else if (int32((*Mem)(unsafe.Pointer(pVar)).Fflags) & MEM_Zero) != 0 {
- Xsqlite3_str_appendf(tls, bp+48 /* &out */, ts+4391 /* "zeroblob(%d)" */, libc.VaList(bp+32, *(*int32)(unsafe.Pointer(pVar /* &.u */))))
+ Xsqlite3_str_appendf(tls, bp+48 /* &out */, ts+4522 /* "zeroblob(%d)" */, libc.VaList(bp+32, *(*int32)(unsafe.Pointer(pVar /* &.u */))))
} else {
var nOut int32 // Number of bytes of the blob to include in output
- Xsqlite3_str_append(tls, bp+48 /* &out */, ts+4404 /* "x'" */, 2)
+ Xsqlite3_str_append(tls, bp+48 /* &out */, ts+4535 /* "x'" */, 2)
nOut = (*Mem)(unsafe.Pointer(pVar)).Fn
for i = 0; i < nOut; i++ {
- Xsqlite3_str_appendf(tls, bp+48 /* &out */, ts+4407 /* "%02x" */, libc.VaList(bp+40, (int32(*(*int8)(unsafe.Pointer((*Mem)(unsafe.Pointer(pVar)).Fz + uintptr(i))))&0xff)))
+ Xsqlite3_str_appendf(tls, bp+48 /* &out */, ts+4538 /* "%02x" */, libc.VaList(bp+40, (int32(*(*uint8)(unsafe.Pointer((*Mem)(unsafe.Pointer(pVar)).Fz + uintptr(i))))&0xff)))
}
- Xsqlite3_str_append(tls, bp+48 /* &out */, ts+4412 /* "'" */, 1)
+ Xsqlite3_str_append(tls, bp+48 /* &out */, ts+4543 /* "'" */, 1)
}
}
}
@@ -61313,7 +63306,7 @@ func Xsqlite3VdbeExpandSql(tls *libc.TLS, p uintptr, zRawSql uintptr) uintptr {
// Allocate VdbeCursor number iCur. Return a pointer to it. Return NULL
// if we run out of memory.
-func allocateCursor(tls *libc.TLS, p uintptr, iCur int32, nField int32, iDb int32, eCurType U8) uintptr { /* sqlite3.c:86118:19: */
+func allocateCursor(tls *libc.TLS, p uintptr, iCur int32, nField int32, iDb int32, eCurType U8) uintptr { /* sqlite3.c:86651:19: */
// Find the memory cell that will be used to store the blob of memory
// required for this VdbeCursor structure. It is convenient to use a
// vdbe memory cell to manage the memory allocation required for a
@@ -61350,17 +63343,33 @@ func allocateCursor(tls *libc.TLS, p uintptr, iCur int32, nField int32, iDb int3
Xsqlite3VdbeFreeCursor(tls, p, *(*uintptr)(unsafe.Pointer((*Vdbe)(unsafe.Pointer(p)).FapCsr + uintptr(iCur)*8)))
*(*uintptr)(unsafe.Pointer((*Vdbe)(unsafe.Pointer(p)).FapCsr + uintptr(iCur)*8)) = uintptr(0)
}
- if SQLITE_OK == Xsqlite3VdbeMemClearAndResize(tls, pMem, nByte) {
- *(*uintptr)(unsafe.Pointer((*Vdbe)(unsafe.Pointer(p)).FapCsr + uintptr(iCur)*8)) = libc.AssignUintptr(&pCx, (*Mem)(unsafe.Pointer(pMem)).Fz)
- libc.Xmemset(tls, pCx, 0, uint64((uintptr(0) + 48 /* &.pAltCursor */)))
- (*VdbeCursor)(unsafe.Pointer(pCx)).FeCurType = eCurType
- (*VdbeCursor)(unsafe.Pointer(pCx)).FiDb = I8(iDb)
- (*VdbeCursor)(unsafe.Pointer(pCx)).FnField = I16(nField)
- (*VdbeCursor)(unsafe.Pointer(pCx)).FaOffset = ((pCx + 120 /* &.aType */) + uintptr(nField)*4)
- if int32(eCurType) == CURTYPE_BTREE {
- *(*uintptr)(unsafe.Pointer(pCx + 56 /* &.uc */)) = ((*Mem)(unsafe.Pointer(pMem)).Fz + uintptr(((((uint64(unsafe.Sizeof(VdbeCursor{}))) + uint64(7)) & libc.Uint64FromInt32(libc.CplInt32(7))) + ((uint64(2) * uint64(unsafe.Sizeof(U32(0)))) * uint64(nField)))))
- Xsqlite3BtreeCursorZero(tls, *(*uintptr)(unsafe.Pointer(pCx + 56 /* &.uc */)))
+
+ // There used to be a call to sqlite3VdbeMemClearAndResize() to make sure
+ // 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 (*Mem)(unsafe.Pointer(pMem)).FszMalloc < nByte {
+ if (*Mem)(unsafe.Pointer(pMem)).FszMalloc > 0 {
+ Xsqlite3DbFreeNN(tls, (*Mem)(unsafe.Pointer(pMem)).Fdb, (*Mem)(unsafe.Pointer(pMem)).FzMalloc)
}
+ (*Mem)(unsafe.Pointer(pMem)).Fz = libc.AssignPtrUintptr(pMem+24 /* &.zMalloc */, Xsqlite3DbMallocRaw(tls, (*Mem)(unsafe.Pointer(pMem)).Fdb, uint64(nByte)))
+ if (*Mem)(unsafe.Pointer(pMem)).FzMalloc == uintptr(0) {
+ (*Mem)(unsafe.Pointer(pMem)).FszMalloc = 0
+ return uintptr(0)
+ }
+ (*Mem)(unsafe.Pointer(pMem)).FszMalloc = nByte
+ }
+
+ *(*uintptr)(unsafe.Pointer((*Vdbe)(unsafe.Pointer(p)).FapCsr + uintptr(iCur)*8)) = libc.AssignUintptr(&pCx, (*Mem)(unsafe.Pointer(pMem)).FzMalloc)
+ libc.Xmemset(tls, pCx, 0, uint64((uintptr(0) + 48 /* &.pAltCursor */)))
+ (*VdbeCursor)(unsafe.Pointer(pCx)).FeCurType = eCurType
+ (*VdbeCursor)(unsafe.Pointer(pCx)).FiDb = I8(iDb)
+ (*VdbeCursor)(unsafe.Pointer(pCx)).FnField = I16(nField)
+ (*VdbeCursor)(unsafe.Pointer(pCx)).FaOffset = ((pCx + 120 /* &.aType */) + uintptr(nField)*4)
+ if int32(eCurType) == CURTYPE_BTREE {
+ *(*uintptr)(unsafe.Pointer(pCx + 56 /* &.uc */)) = ((*Mem)(unsafe.Pointer(pMem)).Fz + uintptr(((((uint64(unsafe.Sizeof(VdbeCursor{}))) + uint64(7)) & libc.Uint64FromInt32(libc.CplInt32(7))) + ((uint64(2) * uint64(unsafe.Sizeof(U32(0)))) * uint64(nField)))))
+ Xsqlite3BtreeCursorZero(tls, *(*uintptr)(unsafe.Pointer(pCx + 56 /* &.uc */)))
}
return pCx
}
@@ -61369,7 +63378,7 @@ func allocateCursor(tls *libc.TLS, p uintptr, iCur int32, nField int32, iDb int3
// floating point value of rValue. Return true and set *piValue to the
// integer value if the string is in range to be an integer. Otherwise,
// return false.
-func alsoAnInt(tls *libc.TLS, pRec uintptr, rValue float64, piValue uintptr) int32 { /* sqlite3.c:86178:12: */
+func alsoAnInt(tls *libc.TLS, pRec uintptr, rValue float64, piValue uintptr) int32 { /* sqlite3.c:86729:12: */
var iValue I64 = I64(rValue)
if Xsqlite3RealSameAsInt(tls, rValue, iValue) != 0 {
*(*I64)(unsafe.Pointer(piValue)) = iValue
@@ -61391,7 +63400,7 @@ func alsoAnInt(tls *libc.TLS, pRec uintptr, rValue float64, piValue uintptr) int
// If bTryForInt is false, then if the input string contains a decimal
// point or exponential notation, the result is only MEM_Real, even
// if there is an exact integer representation of the quantity.
-func applyNumericAffinity(tls *libc.TLS, pRec uintptr, bTryForInt int32) { /* sqlite3.c:86202:13: */
+func applyNumericAffinity(tls *libc.TLS, pRec uintptr, bTryForInt int32) { /* sqlite3.c:86753:13: */
bp := tls.Alloc(8)
defer tls.Free(8)
@@ -61437,7 +63446,7 @@ func applyNumericAffinity(tls *libc.TLS, pRec uintptr, bTryForInt int32) { /* sq
// SQLITE_AFF_BLOB:
// SQLITE_AFF_NONE:
// No-op. pRec is unchanged.
-func applyAffinity(tls *libc.TLS, pRec uintptr, affinity int8, enc U8) { /* sqlite3.c:86242:13: */
+func applyAffinity(tls *libc.TLS, pRec uintptr, affinity uint8, enc U8) { /* sqlite3.c:86793:13: */
if int32(affinity) >= SQLITE_AFF_NUMERIC {
if (int32((*Mem)(unsafe.Pointer(pRec)).Fflags) & MEM_Int) == 0 { //OPTIMIZATION-IF-FALSE
@@ -61469,7 +63478,7 @@ func applyAffinity(tls *libc.TLS, pRec uintptr, affinity int8, enc U8) { /* sqli
// into a numeric representation. Use either INTEGER or REAL whichever
// is appropriate. But only do the conversion if it is possible without
// loss of information and return the revised type of the argument.
-func Xsqlite3_value_numeric_type(tls *libc.TLS, pVal uintptr) int32 { /* sqlite3.c:86281:16: */
+func Xsqlite3_value_numeric_type(tls *libc.TLS, pVal uintptr) int32 { /* sqlite3.c:86832:16: */
var eType int32 = Xsqlite3_value_type(tls, pVal)
if eType == SQLITE_TEXT {
var pMem uintptr = pVal
@@ -61481,24 +63490,29 @@ func Xsqlite3_value_numeric_type(tls *libc.TLS, pVal uintptr) int32 { /* sqlite3
// Exported version of applyAffinity(). This one works on sqlite3_value*,
// not the internal Mem* type.
-func Xsqlite3ValueApplyAffinity(tls *libc.TLS, pVal uintptr, affinity U8, enc U8) { /* sqlite3.c:86295:21: */
- applyAffinity(tls, pVal, int8(affinity), enc)
+func Xsqlite3ValueApplyAffinity(tls *libc.TLS, pVal uintptr, affinity U8, enc U8) { /* sqlite3.c:86846:21: */
+ applyAffinity(tls, pVal, uint8(affinity), enc)
}
// pMem currently only holds a string type (or maybe a BLOB that we can
// interpret as a string if we want to). Compute its corresponding
// numeric type, if has one. Set the pMem->u.r and pMem->u.i fields
// accordingly.
-func computeNumericType(tls *libc.TLS, pMem uintptr) U16 { /* sqlite3.c:86309:28: */
+func computeNumericType(tls *libc.TLS, pMem uintptr) U16 { /* sqlite3.c:86860:28: */
bp := tls.Alloc(8)
defer tls.Free(8)
var rc int32
// var ix Sqlite3_int64 at bp, 8
- if (int32((*Mem)(unsafe.Pointer((pMem))).Fflags) & MEM_Zero) != 0 {
- Xsqlite3VdbeMemExpandBlob(tls, pMem)
- } else {
+ if func() int32 {
+ if (int32((*Mem)(unsafe.Pointer((pMem))).Fflags) & MEM_Zero) != 0 {
+ return Xsqlite3VdbeMemExpandBlob(tls, pMem)
+ }
+ return 0
+ }() != 0 {
+ *(*I64)(unsafe.Pointer(pMem /* &.u */)) = int64(0)
+ return U16(MEM_Int)
}
rc = Xsqlite3AtoF(tls, (*Mem)(unsafe.Pointer(pMem)).Fz, (pMem /* &.u */ /* &.r */), (*Mem)(unsafe.Pointer(pMem)).Fn, (*Mem)(unsafe.Pointer(pMem)).Fenc)
if rc <= 0 {
@@ -61520,7 +63534,7 @@ func computeNumericType(tls *libc.TLS, pMem uintptr) U16 { /* sqlite3.c:86309:28
//
// Unlike applyNumericAffinity(), this routine does not modify pMem->flags.
// But it does set pMem->u.r and pMem->u.i appropriately.
-func numericType(tls *libc.TLS, pMem uintptr) U16 { /* sqlite3.c:86337:12: */
+func numericType(tls *libc.TLS, pMem uintptr) U16 { /* sqlite3.c:86891:12: */
if (int32((*Mem)(unsafe.Pointer(pMem)).Fflags) & ((MEM_Int | MEM_Real) | MEM_IntReal)) != 0 {
return (U16(int32((*Mem)(unsafe.Pointer(pMem)).Fflags) & ((MEM_Int | MEM_Real) | MEM_IntReal)))
@@ -61534,13 +63548,13 @@ func numericType(tls *libc.TLS, pMem uintptr) U16 { /* sqlite3.c:86337:12: */
// Return the register of pOp->p2 after first preparing it to be
// overwritten with an integer value.
-func out2PrereleaseWithClear(tls *libc.TLS, pOut uintptr) uintptr { /* sqlite3.c:86596:28: */
+func out2PrereleaseWithClear(tls *libc.TLS, pOut uintptr) uintptr { /* sqlite3.c:87155:28: */
Xsqlite3VdbeMemSetNull(tls, pOut)
(*Mem)(unsafe.Pointer(pOut)).Fflags = U16(MEM_Int)
return pOut
}
-func out2Prerelease(tls *libc.TLS, p uintptr, pOp uintptr) uintptr { /* sqlite3.c:86601:12: */
+func out2Prerelease(tls *libc.TLS, p uintptr, pOp uintptr) uintptr { /* sqlite3.c:87160:12: */
var pOut uintptr
pOut = ((*Vdbe)(unsafe.Pointer(p)).FaMem + uintptr((*VdbeOp)(unsafe.Pointer(pOp)).Fp2)*56)
@@ -61556,7 +63570,7 @@ func out2Prerelease(tls *libc.TLS, p uintptr, pOp uintptr) uintptr { /* sqlite3.
// Execute as much of a VDBE program as we can.
// This is the core of sqlite3_step().
-func Xsqlite3VdbeExec(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:86620:20: */
+func Xsqlite3VdbeExec(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:87179:20: */
bp := tls.Alloc(936)
defer tls.Free(936)
@@ -61606,9 +63620,9 @@ func Xsqlite3VdbeExec(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:86620:20: *
var iB1 I64
var op U8 // same as TK_GE, jump, in1, in3
var res int32
- var res2 int32 // Result of the comparison of pIn1 against pIn3
- var affinity int8 // Affinity to use for comparison
- var flags11 U16 // Copy of initial value of pIn1->flags
+ var res2 int32 // Result of the comparison of pIn1 against pIn3
+ var affinity uint8 // Affinity to use for comparison
+ var flags11 U16 // Copy of initial value of pIn1->flags
var flags3 U16
var n2 int32
var i1 int32
@@ -62461,8 +64475,7 @@ __5:
// Synopsis: IF r[P3]==r[P1]
//
// Compare the values in register P1 and P3. If reg(P3)==reg(P1) then
- // jump to address P2. Or if the SQLITE_STOREP2 flag is set in P5, then
- // store the result of comparison in register P2.
+ // jump to address P2.
//
// The SQLITE_AFF_MASK portion of P5 must be an affinity character -
// SQLITE_AFF_TEXT, SQLITE_AFF_INTEGER, and so forth. An attempt is made
@@ -62488,25 +64501,19 @@ __5:
// If neither operand is NULL the result is the same as it would be if
// the SQLITE_NULLEQ flag were omitted from P5.
//
- // If both SQLITE_STOREP2 and SQLITE_KEEPNULL flags are set then the
- // content of r[P2] is only changed if the new value is NULL or 0 (false).
- // In other words, a prior r[P2] value will not be overwritten by 1 (true).
+ // This opcode saves the result of comparison for use by the new
+ // OP_Jump opcode.
// Opcode: Ne P1 P2 P3 P4 P5
// Synopsis: IF r[P3]!=r[P1]
//
// This works just like the Eq opcode except that the jump is taken if
// the operands in registers P1 and P3 are not equal. See the Eq opcode for
// additional information.
- //
- // If both SQLITE_STOREP2 and SQLITE_KEEPNULL flags are set then the
- // content of r[P2] is only changed if the new value is NULL or 1 (true).
- // In other words, a prior r[P2] value will not be overwritten by 0 (false).
// Opcode: Lt P1 P2 P3 P4 P5
// Synopsis: IF r[P3]
case OP_SeekScan:
- goto __92
+ goto __93
// Opcode: SeekHit P1 P2 P3 * *
// Synopsis: set P2<=seekHit<=P3
@@ -63259,14 +65277,14 @@ __5:
//
// P1 must be a valid b-tree cursor.
case OP_SeekHit:
- goto __93
+ goto __94
// Opcode: IfNotOpen P1 P2 * * *
// Synopsis: if( !csr[P1] ) goto P2
//
// If cursor P1 is not open, jump to instruction P2. Otherwise, fall through.
case OP_IfNotOpen:
- goto __94
+ goto __95
// Opcode: Found P1 P2 P3 P4 *
// Synopsis: key=r[P3@P4]
@@ -63355,13 +65373,13 @@ __5:
//
// See also: NotFound, Found, NotExists
case OP_IfNoHope:
- goto __95
+ goto __96
case OP_NoConflict:
- goto __96 // jump, in3
- case OP_NotFound:
goto __97 // jump, in3
+ case OP_NotFound:
+ goto __98 // jump, in3
case OP_Found:
- goto __98
+ goto __99
// Opcode: SeekRowid P1 P2 P3 * *
// Synopsis: intkey=r[P3]
@@ -63409,9 +65427,9 @@ __5:
//
// See also: Found, NotFound, NoConflict, SeekRowid
case OP_SeekRowid:
- goto __99
- case OP_NotExists:
goto __100
+ case OP_NotExists:
+ goto __101
// Opcode: Sequence P1 P2 * * *
// Synopsis: r[P2]=cursor[P1].ctr++
@@ -63421,7 +65439,7 @@ __5:
// The sequence number on the cursor is incremented after this
// instruction.
case OP_Sequence:
- goto __101
+ goto __102
// Opcode: NewRowid P1 P2 P3 * *
// Synopsis: r[P2]=rowid
@@ -63438,7 +65456,7 @@ __5:
// generated record number. This P3 mechanism is used to help implement the
// AUTOINCREMENT feature.
case OP_NewRowid:
- goto __102
+ goto __103
// Opcode: Insert P1 P2 P3 P4 P5
// Synopsis: intkey=r[P3] data=r[P2]
@@ -63477,7 +65495,7 @@ __5:
// This instruction only works on tables. The equivalent instruction
// for indices is OP_IdxInsert.
case OP_Insert:
- goto __103
+ goto __104
// Opcode: RowCell P1 P2 P3 * *
//
@@ -63490,7 +65508,7 @@ __5:
// This opcode must be followed by either an Insert or InsertIdx opcode
// with the OPFLAG_PREFORMAT flag set to complete the insert operation.
case OP_RowCell:
- goto __104
+ goto __105
// Opcode: Delete P1 P2 P3 P4 P5
//
@@ -63527,7 +65545,7 @@ __5:
// of the memory cell that contains the value that the rowid of the row will
// be set to by the update.
case OP_Delete:
- goto __105
+ goto __106
// Opcode: ResetCount * * * * *
//
// The value of the change counter is copied to the database handle
@@ -63535,7 +65553,7 @@ __5:
// Then the VMs internal change counter resets to 0.
// This is used by trigger programs.
case OP_ResetCount:
- goto __106
+ goto __107
// Opcode: SorterCompare P1 P2 P3 P4
// Synopsis: if key(P1)!=trim(r[P3],P4) goto P2
@@ -63552,7 +65570,7 @@ __5:
// Fall through to next instruction if the two records compare equal to
// each other. Jump to P2 if they are different.
case OP_SorterCompare:
- goto __107
+ goto __108
// Opcode: SorterData P1 P2 P3 * *
// Synopsis: r[P2]=data
@@ -63566,7 +65584,7 @@ __5:
// parameter P3. Clearing the P3 column cache as part of this opcode saves
// us from having to issue a separate NullRow instruction to clear that cache.
case OP_SorterData:
- goto __108
+ goto __109
// Opcode: RowData P1 P2 P3 * *
// Synopsis: r[P2]=data
@@ -63596,7 +65614,7 @@ __5:
// The P2 register content is invalidated by opcodes like OP_Function or
// by any use of another cursor pointing to the same table.
case OP_RowData:
- goto __109
+ goto __110
// Opcode: Rowid P1 P2 * * *
// Synopsis: r[P2]=rowid
@@ -63608,7 +65626,7 @@ __5:
// be a separate OP_VRowid opcode for use with virtual tables, but this
// one opcode now works for both table types.
case OP_Rowid:
- goto __110
+ goto __111
// Opcode: NullRow P1 * * * *
//
@@ -63616,7 +65634,7 @@ __5:
// that occur while the cursor is on the null row will always
// write a NULL.
case OP_NullRow:
- goto __111
+ goto __112
// Opcode: SeekEnd P1 * * * *
//
@@ -63639,16 +65657,16 @@ __5:
// from the end toward the beginning. In other words, the cursor is
// configured to use Prev, not Next.
case OP_SeekEnd:
- goto __112
- case OP_Last:
goto __113
+ case OP_Last:
+ goto __114
// Opcode: IfSmaller P1 P2 P3 * *
//
// Estimate the number of rows in the table P1. Jump to P2 if that
// estimate is less than approximately 2**(0.1*P3).
case OP_IfSmaller:
- goto __114
+ goto __115
// Opcode: SorterSort P1 P2 * * *
//
@@ -63670,9 +65688,9 @@ __5:
// regression tests can determine whether or not the optimizer is
// correctly optimizing out sorts.
case OP_SorterSort:
- goto __115 // jump
+ goto __116 // jump
case OP_Sort:
- goto __116
+ goto __117
// Opcode: Rewind P1 P2 * * *
//
// The next use of the Rowid or Column or Next instruction for P1
@@ -63685,7 +65703,7 @@ __5:
// from the beginning toward the end. In other words, the cursor is
// configured to use Next, not Prev.
case OP_Rewind:
- goto __117
+ goto __118
// Opcode: Next P1 P2 P3 P4 P5
//
@@ -63745,11 +65763,11 @@ __5:
// invoked. This opcode advances the cursor to the next sorted
// record, or jumps to P2 if there are no more sorted records.
case OP_SorterNext:
- goto __118
+ goto __119
case OP_Prev:
- goto __119 // jump
+ goto __120 // jump
case OP_Next:
- goto __120
+ goto __121
// Opcode: IdxInsert P1 P2 P3 P4 P5
// Synopsis: key=r[P2]
@@ -63779,7 +65797,7 @@ __5:
// This instruction only works for indices. The equivalent instruction
// for tables is OP_Insert.
case OP_IdxInsert:
- goto __121
+ goto __122
// Opcode: SorterInsert P1 P2 * * *
// Synopsis: key=r[P2]
@@ -63788,7 +65806,7 @@ __5:
// MakeRecord instructions. This opcode writes that key
// into the sorter P1. Data for the entry is nil.
case OP_SorterInsert:
- goto __122
+ goto __123
// Opcode: IdxDelete P1 P2 P3 * P5
// Synopsis: key=r[P2@P3]
@@ -63804,7 +65822,7 @@ __5:
// (example: the EXCEPT operator) it does not matter that no matching
// entry is found. For those cases, P5 is zero.
case OP_IdxDelete:
- goto __123
+ goto __124
// Opcode: DeferredSeek P1 * P3 P4 *
// Synopsis: Move P3 to P1.rowid if needed
@@ -63833,9 +65851,9 @@ __5:
//
// See also: Rowid, MakeRecord.
case OP_DeferredSeek:
- goto __124
- case OP_IdxRowid:
goto __125
+ case OP_IdxRowid:
+ goto __126
// Opcode: FinishSeek P1 * * * *
//
@@ -63843,7 +65861,7 @@ __5:
// seek operation now, without further delay. If the cursor seek has
// already occurred, this instruction is a no-op.
case OP_FinishSeek:
- goto __126
+ goto __127
// Opcode: IdxGE P1 P2 P3 P4 *
// Synopsis: key=r[P3@P4]
@@ -63886,13 +65904,13 @@ __5:
// If the P1 index entry is less than or equal to the key value then jump
// to P2. Otherwise fall through to the next instruction.
case OP_IdxLE:
- goto __127 // jump
- case OP_IdxGT:
goto __128 // jump
- case OP_IdxLT:
+ case OP_IdxGT:
goto __129 // jump
+ case OP_IdxLT:
+ goto __130 // jump
case OP_IdxGE:
- goto __130
+ goto __131
// Opcode: Destroy P1 P2 P3 * *
//
@@ -63921,7 +65939,7 @@ __5:
//
// See also: Clear
case OP_Destroy:
- goto __131
+ goto __132
// Opcode: Clear P1 P2 P3
//
@@ -63933,15 +65951,14 @@ __5:
// P2==1 then the table to be clear is in the auxiliary database file
// that is used to store tables create using CREATE TEMPORARY TABLE.
//
- // If the P3 value is non-zero, then the table referred to must be an
- // intkey table (an SQL table, not an index). In this case the row change
- // count is incremented by the number of rows in the table being cleared.
- // If P3 is greater than zero, then the value stored in register P3 is
- // also incremented by the number of rows in the table being cleared.
+ // If the P3 value is non-zero, then the row change count is incremented
+ // by the number of rows in the table being cleared. If P3 is greater
+ // than zero, then the value stored in register P3 is also incremented
+ // by the number of rows in the table being cleared.
//
// See also: Destroy
case OP_Clear:
- goto __132
+ goto __133
// Opcode: ResetSorter P1 * * * *
//
@@ -63951,7 +65968,7 @@ __5:
// This opcode only works for cursors used for sorting and
// opened with OP_OpenEphemeral or OP_SorterOpen.
case OP_ResetSorter:
- goto __133
+ goto __134
// Opcode: CreateBtree P1 P2 P3 * *
// Synopsis: r[P2]=root iDb=P1 flags=P3
@@ -63962,13 +65979,13 @@ __5:
// it must be 2 (BTREE_BLOBKEY) for an index or WITHOUT ROWID table.
// The root page number of the new b-tree is stored in register P2.
case OP_CreateBtree:
- goto __134
+ goto __135
// Opcode: SqlExec * * * P4 *
//
// Run the SQL statement or statements specified in the P4 string.
case OP_SqlExec:
- goto __135
+ goto __136
// Opcode: ParseSchema P1 * * P4 *
//
@@ -63979,7 +65996,7 @@ __5:
// This opcode invokes the parser to create a new virtual machine,
// then runs the new virtual machine. It is thus a re-entrant opcode.
case OP_ParseSchema:
- goto __136
+ goto __137
// Opcode: LoadAnalysis P1 * * * *
//
@@ -63987,7 +66004,7 @@ __5:
// of that table into the internal index hash table. This will cause
// the analysis to be used when preparing all subsequent queries.
case OP_LoadAnalysis:
- goto __137
+ goto __138
// Opcode: DropTable P1 * * P4 *
//
@@ -63997,7 +66014,7 @@ __5:
// the internal representation of the
// schema consistent with what is on disk.
case OP_DropTable:
- goto __138
+ goto __139
// Opcode: DropIndex P1 * * P4 *
//
@@ -64007,7 +66024,7 @@ __5:
// in order to keep the internal representation of the
// schema consistent with what is on disk.
case OP_DropIndex:
- goto __139
+ goto __140
// Opcode: DropTrigger P1 * * P4 *
//
@@ -64017,7 +66034,7 @@ __5:
// the internal representation of the
// schema consistent with what is on disk.
case OP_DropTrigger:
- goto __140
+ goto __141
// Opcode: IntegrityCk P1 P2 P3 P4 P5
//
@@ -64038,7 +66055,7 @@ __5:
//
// This opcode is used to implement the integrity_check pragma.
case OP_IntegrityCk:
- goto __141
+ goto __142
// Opcode: RowSetAdd P1 P2 * * *
// Synopsis: rowset(P1)=r[P2]
@@ -64048,7 +66065,7 @@ __5:
//
// An assertion fails if P2 is not an integer.
case OP_RowSetAdd:
- goto __142
+ goto __143
// Opcode: RowSetRead P1 P2 P3 * *
// Synopsis: r[P3]=rowset(P1)
@@ -64058,7 +66075,7 @@ __5:
// Or, if RowSet object P1 is initially empty, leave P3
// unchanged and jump to instruction P2.
case OP_RowSetRead:
- goto __143
+ goto __144
// Opcode: RowSetTest P1 P2 P3 P4
// Synopsis: if r[P3] in rowset(P1) goto P2
@@ -64083,7 +66100,7 @@ __5:
// previously inserted as part of set X (only if it was previously
// inserted as part of some other set).
case OP_RowSetTest:
- goto __144
+ goto __145
// Opcode: Program P1 P2 P3 P4 P5
//
@@ -64100,7 +66117,7 @@ __5:
//
// If P5 is non-zero, then recursive program invocation is enabled.
case OP_Program:
- goto __145
+ goto __146
// Opcode: Param P1 P2 * * *
//
@@ -64114,7 +66131,7 @@ __5:
// the value of the P1 argument to the value of the P1 argument to the
// calling OP_Program instruction.
case OP_Param:
- goto __146
+ goto __147
// Opcode: FkCounter P1 P2 * * *
// Synopsis: fkctr[P1]+=P2
@@ -64124,7 +66141,7 @@ __5:
// (deferred foreign key constraints). Otherwise, if P1 is zero, the
// statement counter is incremented (immediate foreign key constraints).
case OP_FkCounter:
- goto __147
+ goto __148
// Opcode: FkIfZero P1 P2 * * *
// Synopsis: if fkctr[P1]==0 goto P2
@@ -64138,7 +66155,7 @@ __5:
// zero, the jump is taken if the statement constraint-counter is zero
// (immediate foreign key constraint violations).
case OP_FkIfZero:
- goto __148
+ goto __149
// Opcode: MemMax P1 P2 * * *
// Synopsis: r[P1]=max(r[P1],r[P2])
@@ -64151,7 +66168,7 @@ __5:
// This instruction throws an error if the memory cell is not initially
// an integer.
case OP_MemMax:
- goto __149
+ goto __150
// Opcode: IfPos P1 P2 P3 * *
// Synopsis: if r[P1]>0 then r[P1]-=P3, goto P2
@@ -64163,7 +66180,7 @@ __5:
// If the initial value of register P1 is less than 1, then the
// value is unchanged and control passes through to the next instruction.
case OP_IfPos:
- goto __150
+ goto __151
// Opcode: OffsetLimit P1 P2 P3 * *
// Synopsis: if r[P1]>0 then r[P2]=r[P1]+max(0,r[P3]) else r[P2]=(-1)
@@ -64183,7 +66200,7 @@ __5:
//
// Otherwise, r[P2] is set to the sum of r[P1] and r[P3].
case OP_OffsetLimit:
- goto __151
+ goto __152
// Opcode: IfNotZero P1 P2 * * *
// Synopsis: if r[P1]!=0 then r[P1]--, goto P2
@@ -64193,7 +66210,7 @@ __5:
// If it is non-zero (negative or positive) and then also jump to P2.
// If register P1 is initially zero, leave it unchanged and fall through.
case OP_IfNotZero:
- goto __152
+ goto __153
// Opcode: DecrJumpZero P1 P2 * * *
// Synopsis: if (--r[P1])==0 goto P2
@@ -64201,7 +66218,7 @@ __5:
// Register P1 must hold an integer. Decrement the value in P1
// and jump to P2 if the new value is exactly zero.
case OP_DecrJumpZero:
- goto __153
+ goto __154
// Opcode: AggStep * P2 P3 P4 P5
// Synopsis: accum=r[P3] step(r[P2@P5])
@@ -64240,11 +66257,11 @@ __5:
// sqlite3_context only happens once, instead of on each call to the
// step function.
case OP_AggInverse:
- goto __154
- case OP_AggStep:
goto __155
- case OP_AggStep1:
+ case OP_AggStep:
goto __156
+ case OP_AggStep1:
+ goto __157
// Opcode: AggFinal P1 P2 * P4 *
// Synopsis: accum=r[P1] N=P2
@@ -64271,9 +66288,9 @@ __5:
// P4 argument is only needed for the case where
// the step function was not previously called.
case OP_AggValue:
- goto __157
- case OP_AggFinal:
goto __158
+ case OP_AggFinal:
+ goto __159
// Opcode: Checkpoint P1 P2 P3 * *
//
@@ -64286,7 +66303,7 @@ __5:
// completes into mem[P3+2]. However on an error, mem[P3+1] and
// mem[P3+2] are initialized to -1.
case OP_Checkpoint:
- goto __159
+ goto __160
// Opcode: JournalMode P1 P2 P3 * *
//
@@ -64299,7 +66316,7 @@ __5:
//
// Write a string containing the final journal-mode to register P2.
case OP_JournalMode:
- goto __160
+ goto __161
// Opcode: Vacuum P1 P2 * * *
//
@@ -64310,7 +66327,7 @@ __5:
// the file into which the result of vacuum should be written. When
// P2 is zero, the vacuum overwrites the original database.
case OP_Vacuum:
- goto __161
+ goto __162
// Opcode: IncrVacuum P1 P2 * * *
//
@@ -64318,7 +66335,7 @@ __5:
// the P1 database. If the vacuum has finished, jump to instruction
// P2. Otherwise, fall through to the next instruction.
case OP_IncrVacuum:
- goto __162
+ goto __163
// Opcode: Expire P1 P2 * * *
//
@@ -64336,21 +66353,21 @@ __5:
// that might help the statement run faster but which does not affect the
// correctness of operation.
case OP_Expire:
- goto __163
+ goto __164
// Opcode: CursorLock P1 * * * *
//
// Lock the btree to which cursor P1 is pointing so that the btree cannot be
// written by an other cursor.
case OP_CursorLock:
- goto __164
+ goto __165
// Opcode: CursorUnlock P1 * * * *
//
// Unlock the btree to which cursor P1 is pointing so that it can be
// written by other cursors.
case OP_CursorUnlock:
- goto __165
+ goto __166
// Opcode: TableLock P1 P2 P3 P4 *
// Synopsis: iDb=P1 root=P2 write=P3
@@ -64367,7 +66384,7 @@ __5:
// P4 contains a pointer to the name of the table being locked. This is only
// used to generate an error message if the lock cannot be obtained.
case OP_TableLock:
- goto __166
+ goto __167
// Opcode: VBegin * * * P4 *
//
@@ -64378,21 +66395,21 @@ __5:
// within a callback to a virtual table xSync() method. If it is, the error
// code will be set to SQLITE_LOCKED.
case OP_VBegin:
- goto __167
+ goto __168
// Opcode: VCreate P1 P2 * * *
//
// P2 is a register that holds the name of a virtual table in database
// P1. Call the xCreate method for that table.
case OP_VCreate:
- goto __168
+ goto __169
// Opcode: VDestroy P1 * * P4 *
//
// P4 is the name of a virtual table in database P1. Call the xDestroy method
// of that table.
case OP_VDestroy:
- goto __169
+ goto __170
// Opcode: VOpen P1 * * P4 *
//
@@ -64400,7 +66417,7 @@ __5:
// P1 is a cursor number. This opcode opens a cursor to the virtual
// table and stores that cursor in P1.
case OP_VOpen:
- goto __170
+ goto __171
// Opcode: VFilter P1 P2 P3 P4 *
// Synopsis: iplan=r[P3] zplan='P4'
@@ -64421,7 +66438,7 @@ __5:
//
// A jump is made to P2 if the result set after filtering would be empty.
case OP_VFilter:
- goto __171
+ goto __172
// Opcode: VColumn P1 P2 P3 * P5
// Synopsis: r[P3]=vcolumn(P2)
@@ -64437,7 +66454,7 @@ __5:
// bits (OPFLAG_LENGTHARG or OPFLAG_TYPEOFARG) but those bits are
// unused by OP_VColumn.
case OP_VColumn:
- goto __172
+ goto __173
// Opcode: VNext P1 P2 * * *
//
@@ -64445,7 +66462,7 @@ __5:
// jump to instruction P2. Or, if the virtual table has reached
// the end of its result set, then fall through to the next instruction.
case OP_VNext:
- goto __173
+ goto __174
// Opcode: VRename P1 * * P4 *
//
@@ -64453,7 +66470,7 @@ __5:
// This opcode invokes the corresponding xRename method. The value
// in register P1 is passed as the zName argument to the xRename method.
case OP_VRename:
- goto __174
+ goto __175
// Opcode: VUpdate P1 P2 P3 P4 P5
// Synopsis: data=r[P3@P2]
@@ -64482,13 +66499,13 @@ __5:
// P5 is the error actions (OE_Replace, OE_Fail, OE_Ignore, etc) to
// apply in the case of a constraint failure on an insert or update.
case OP_VUpdate:
- goto __175
+ goto __176
// Opcode: Pagecount P1 P2 * * *
//
// Write the current number of pages in database P1 to memory cell P2.
case OP_Pagecount:
- goto __176
+ goto __177
// Opcode: MaxPgcnt P1 P2 P3 * *
//
@@ -64498,7 +66515,7 @@ __5:
//
// Store the maximum page count after the change in register P2.
case OP_MaxPgcnt:
- goto __177
+ goto __178
// Opcode: Function P1 P2 P3 P4 *
// Synopsis: r[P3]=func(r[P2@NP])
@@ -64545,9 +66562,9 @@ __5:
//
// See also: AggStep, AggFinal, Function
case OP_PureFunc:
- goto __178 // group
+ goto __179 // group
case OP_Function:
- goto __179
+ goto __180
// Opcode: Trace P1 P2 * P4 *
//
@@ -64573,9 +66590,9 @@ __5:
// If P3 is not zero, then it is an address to jump to if an SQLITE_CORRUPT
// error is encountered.
case OP_Trace:
- goto __180
- case OP_Init:
goto __181
+ case OP_Init:
+ goto __182
// Opcode: Noop * * * * *
//
@@ -64586,7 +66603,7 @@ __5:
// This opcode records information from the optimizer. It is the
// the same as a no-op. This opcodesnever appears in a real VM program.
default:
- goto __182
+ goto __183
}
goto __8
@@ -64654,32 +66671,34 @@ jump_to_p2_and_check_for_interrupt:
// faster according to "valgrind --tool=cachegrind"
check_for_interrupt:
if !(libc.AtomicLoadNInt32((db+400 /* &.u1 */ /* &.isInterrupted */), 0) != 0) {
- goto __183
+ goto __184
}
goto abort_due_to_interrupt
-__183:
+__184:
;
// Call the progress callback if it is configured and the required number
// of VDBE ops have been executed (either since this invocation of
// sqlite3VdbeExec() or since last time the progress callback was called).
// If the progress callback returns non-zero, exit the virtual machine with
// a return code SQLITE_ABORT.
-__184:
+__185:
if !((nVmStep >= nProgressLimit) && ((*Sqlite3)(unsafe.Pointer(db)).FxProgress != uintptr(0))) {
- goto __185
+ goto __186
}
nProgressLimit = nProgressLimit + (U64((*Sqlite3)(unsafe.Pointer(db)).FnProgressOps))
- if !((*(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer((db + 512 /* &.xProgress */))))(tls, (*Sqlite3)(unsafe.Pointer(db)).FpProgressArg) != 0) {
- goto __186
+ if !((*struct {
+ f func(*libc.TLS, uintptr) int32
+ })(unsafe.Pointer(&struct{ uintptr }{(*Sqlite3)(unsafe.Pointer(db)).FxProgress})).f(tls, (*Sqlite3)(unsafe.Pointer(db)).FpProgressArg) != 0) {
+ goto __187
}
nProgressLimit = (uint64(0xffffffff) | (U64((uint64(0xffffffff))) << 32))
rc = SQLITE_INTERRUPT
goto abort_due_to_error
-__186:
+__187:
;
- goto __184
-__185:
+ goto __185
+__186:
;
goto __8
@@ -64730,10 +66749,10 @@ __12: // jump
*(*I64)(unsafe.Pointer(pOut /* &.u */)) = (I64((*Op)(unsafe.Pointer(pOp)).Fp3 - 1))
(*Mem)(unsafe.Pointer(pOut)).Fflags = U16(MEM_Int)
if !((*Op)(unsafe.Pointer(pOp)).Fp2 != 0) {
- goto __187
+ goto __188
}
goto jump_to_p2
-__187:
+__188:
;
goto __8
@@ -64785,10 +66804,10 @@ __14:
__15: // in3
pIn3 = (aMem + uintptr((*Op)(unsafe.Pointer(pOp)).Fp3)*56)
if !((int32((*Mem)(unsafe.Pointer(pIn3)).Fflags) & MEM_Null) == 0) {
- goto __188
+ goto __189
}
goto __8
-__188:
+__189:
;
// Opcode: Halt P1 P2 * P4 P5
@@ -64824,7 +66843,7 @@ __16:
pcx = (int32((int64(pOp) - int64(aOp)) / 24))
if !(((*Op)(unsafe.Pointer(pOp)).Fp1 == SQLITE_OK) && ((*Vdbe)(unsafe.Pointer(p)).FpFrame != 0)) {
- goto __189
+ goto __190
}
// Halt the sub-program. Return control to the parent frame.
pFrame = (*Vdbe)(unsafe.Pointer(p)).FpFrame
@@ -64833,7 +66852,7 @@ __16:
Xsqlite3VdbeSetChanges(tls, db, (*Vdbe)(unsafe.Pointer(p)).FnChange)
pcx = Xsqlite3VdbeFrameRestore(tls, pFrame)
if !((*Op)(unsafe.Pointer(pOp)).Fp2 == OE_Ignore) {
- goto __190
+ goto __191
}
// Instruction pcx is the OP_Program that invoked the sub-program
// currently being halted. If the p2 instruction of this OP_Halt
@@ -64841,48 +66860,48 @@ __16:
// an IGNORE exception. In this case jump to the address specified
// as the p2 of the calling OP_Program.
pcx = ((*Op)(unsafe.Pointer((*Vdbe)(unsafe.Pointer(p)).FaOp+uintptr(pcx)*24)).Fp2 - 1)
-__190:
+__191:
;
aOp = (*Vdbe)(unsafe.Pointer(p)).FaOp
aMem = (*Vdbe)(unsafe.Pointer(p)).FaMem
pOp = (aOp + uintptr(pcx)*24)
goto __8
-__189:
+__190:
;
(*Vdbe)(unsafe.Pointer(p)).Frc = (*Op)(unsafe.Pointer(pOp)).Fp1
(*Vdbe)(unsafe.Pointer(p)).FerrorAction = U8((*Op)(unsafe.Pointer(pOp)).Fp2)
(*Vdbe)(unsafe.Pointer(p)).Fpc = pcx
if !((*Vdbe)(unsafe.Pointer(p)).Frc != 0) {
- goto __191
+ goto __192
}
if !((*Op)(unsafe.Pointer(pOp)).Fp5 != 0) {
- goto __192
+ goto __193
}
- Xsqlite3VdbeError(tls, p, ts+4414 /* "%s constraint fa..." */, libc.VaList(bp, azType[(int32((*Op)(unsafe.Pointer(pOp)).Fp5)-1)]))
+ Xsqlite3VdbeError(tls, p, ts+4545 /* "%s constraint fa..." */, libc.VaList(bp, azType[(int32((*Op)(unsafe.Pointer(pOp)).Fp5)-1)]))
if !(*(*uintptr)(unsafe.Pointer(pOp + 16 /* &.p4 */)) != 0) {
- goto __194
+ goto __195
}
- (*Vdbe)(unsafe.Pointer(p)).FzErrMsg = Xsqlite3MPrintf(tls, db, ts+4435 /* "%z: %s" */, libc.VaList(bp+8, (*Vdbe)(unsafe.Pointer(p)).FzErrMsg, *(*uintptr)(unsafe.Pointer(pOp + 16 /* &.p4 */))))
-__194:
+ (*Vdbe)(unsafe.Pointer(p)).FzErrMsg = Xsqlite3MPrintf(tls, db, ts+4566 /* "%z: %s" */, libc.VaList(bp+8, (*Vdbe)(unsafe.Pointer(p)).FzErrMsg, *(*uintptr)(unsafe.Pointer(pOp + 16 /* &.p4 */))))
+__195:
;
- goto __193
-__192:
- Xsqlite3VdbeError(tls, p, ts+2718 /* "%s" */, libc.VaList(bp+24, *(*uintptr)(unsafe.Pointer(pOp + 16 /* &.p4 */))))
+ goto __194
__193:
+ Xsqlite3VdbeError(tls, p, ts+2790 /* "%s" */, libc.VaList(bp+24, *(*uintptr)(unsafe.Pointer(pOp + 16 /* &.p4 */))))
+__194:
;
- Xsqlite3_log(tls, (*Op)(unsafe.Pointer(pOp)).Fp1, ts+4442 /* "abort at %d in [..." */, libc.VaList(bp+32, pcx, (*Vdbe)(unsafe.Pointer(p)).FzSql, (*Vdbe)(unsafe.Pointer(p)).FzErrMsg))
-__191:
+ Xsqlite3_log(tls, (*Op)(unsafe.Pointer(pOp)).Fp1, ts+4573 /* "abort at %d in [..." */, libc.VaList(bp+32, pcx, (*Vdbe)(unsafe.Pointer(p)).FzSql, (*Vdbe)(unsafe.Pointer(p)).FzErrMsg))
+__192:
;
rc = Xsqlite3VdbeHalt(tls, p)
if !(rc == SQLITE_BUSY) {
- goto __195
+ goto __196
}
(*Vdbe)(unsafe.Pointer(p)).Frc = SQLITE_BUSY
- goto __196
-__195:
+ goto __197
+__196:
;
if (*Vdbe)(unsafe.Pointer(p)).Frc != 0 {
@@ -64890,7 +66909,7 @@ __195:
} else {
rc = SQLITE_DONE
}
-__196:
+__197:
;
goto vdbe_return
@@ -64939,41 +66958,41 @@ __20: // same as TK_STRING, out2
(*Op)(unsafe.Pointer(pOp)).Fp1 = Xsqlite3Strlen30(tls, *(*uintptr)(unsafe.Pointer(pOp + 16 /* &.p4 */)))
if !(int32(encoding) != SQLITE_UTF8) {
- goto __197
+ goto __198
}
- rc = Xsqlite3VdbeMemSetStr(tls, pOut, *(*uintptr)(unsafe.Pointer(pOp + 16 /* &.p4 */)), -1, uint8(SQLITE_UTF8), uintptr(0))
+ rc = Xsqlite3VdbeMemSetStr(tls, pOut, *(*uintptr)(unsafe.Pointer(pOp + 16 /* &.p4 */)), int64(-1), uint8(SQLITE_UTF8), uintptr(0))
if !(rc != 0) {
- goto __198
+ goto __199
}
goto too_big
-__198:
+__199:
;
if !(SQLITE_OK != Xsqlite3VdbeChangeEncoding(tls, pOut, int32(encoding))) {
- goto __199
+ goto __200
}
goto no_mem
-__199:
+__200:
;
(*Mem)(unsafe.Pointer(pOut)).FszMalloc = 0
*(*U16)(unsafe.Pointer(pOut + 8 /* &.flags */)) |= U16((MEM_Static))
if !(int32((*Op)(unsafe.Pointer(pOp)).Fp4type) == (-7)) {
- goto __200
+ goto __201
}
Xsqlite3DbFree(tls, db, *(*uintptr)(unsafe.Pointer(pOp + 16 /* &.p4 */)))
-__200:
+__201:
;
(*Op)(unsafe.Pointer(pOp)).Fp4type = int8(-7)
*(*uintptr)(unsafe.Pointer(pOp + 16 /* &.p4 */)) = (*Mem)(unsafe.Pointer(pOut)).Fz
(*Op)(unsafe.Pointer(pOp)).Fp1 = (*Mem)(unsafe.Pointer(pOut)).Fn
-__197:
+__198:
;
if !((*Op)(unsafe.Pointer(pOp)).Fp1 > *(*int32)(unsafe.Pointer((db + 128 /* &.aLimit */)))) {
- goto __201
+ goto __202
}
goto too_big
-__201:
+__202:
;
(*Op)(unsafe.Pointer(pOp)).Fopcode = U8(OP_String)
@@ -65020,9 +67039,9 @@ __22:
return uint16(MEM_Null)
}())
(*Mem)(unsafe.Pointer(pOut)).Fn = 0
-__202:
+__203:
if !(cnt > 0) {
- goto __203
+ goto __204
}
pOut += 56
@@ -65030,8 +67049,8 @@ __202:
(*Mem)(unsafe.Pointer(pOut)).Fflags = nullFlag
(*Mem)(unsafe.Pointer(pOut)).Fn = 0
cnt--
- goto __202
-__203:
+ goto __203
+__204:
;
goto __8
@@ -65056,7 +67075,7 @@ __23:
__24: // out2
;
pOut = out2Prerelease(tls, p, pOp)
- Xsqlite3VdbeMemSetStr(tls, pOut, *(*uintptr)(unsafe.Pointer(pOp + 16 /* &.p4 */)), (*Op)(unsafe.Pointer(pOp)).Fp1, uint8(0), uintptr(0))
+ Xsqlite3VdbeMemSetStr(tls, pOut, *(*uintptr)(unsafe.Pointer(pOp + 16 /* &.p4 */)), int64((*Op)(unsafe.Pointer(pOp)).Fp1), uint8(0), uintptr(0))
(*Mem)(unsafe.Pointer(pOut)).Fenc = encoding
goto __8
@@ -65074,17 +67093,17 @@ __25: // Value being transferred
pVar = ((*Vdbe)(unsafe.Pointer(p)).FaVar + uintptr(((*Op)(unsafe.Pointer(pOp)).Fp1-1))*56)
if !(Xsqlite3VdbeMemTooBig(tls, pVar) != 0) {
- goto __204
+ goto __205
}
goto too_big
-__204:
+__205:
;
pOut = (aMem + uintptr((*Op)(unsafe.Pointer(pOp)).Fp2)*56)
if !((int32((*Mem)(unsafe.Pointer((pOut))).Fflags) & (MEM_Agg | MEM_Dyn)) != 0) {
- goto __205
+ goto __206
}
Xsqlite3VdbeMemSetNull(tls, pOut)
-__205:
+__206:
;
libc.Xmemcpy(tls, pOut, pVar, uint64((uintptr(0) + 24 /* &.zMalloc */)))
*(*U16)(unsafe.Pointer(pOut + 8 /* &.flags */)) &= libc.Uint16FromInt32((libc.CplInt32((MEM_Dyn | MEM_Ephem))))
@@ -65108,26 +67127,26 @@ __26: // Register to copy to
pIn1 = (aMem + uintptr(p1)*56)
pOut = (aMem + uintptr(p2)*56)
-__206:
+__207:
;
Xsqlite3VdbeMemMove(tls, pOut, pIn1)
if !(((int32((*Mem)(unsafe.Pointer((pOut))).Fflags) & MEM_Ephem) != 0) && (Xsqlite3VdbeMemMakeWriteable(tls, pOut) != 0)) {
- goto __209
+ goto __210
}
goto no_mem
-__209:
+__210:
;
pIn1 += 56
pOut += 56
- goto __207
-__207:
- if libc.PreDecInt32(&n, 1) != 0 {
- goto __206
- }
goto __208
__208:
+ if libc.PreDecInt32(&n, 1) != 0 {
+ goto __207
+ }
+ goto __209
+__209:
;
goto __8
@@ -65144,29 +67163,29 @@ __27:
pIn1 = (aMem + uintptr((*Op)(unsafe.Pointer(pOp)).Fp1)*56)
pOut = (aMem + uintptr((*Op)(unsafe.Pointer(pOp)).Fp2)*56)
-__210:
+__211:
if !(1 != 0) {
- goto __211
+ goto __212
}
Xsqlite3VdbeMemShallowCopy(tls, pOut, pIn1, MEM_Ephem)
if !(((int32((*Mem)(unsafe.Pointer((pOut))).Fflags) & MEM_Ephem) != 0) && (Xsqlite3VdbeMemMakeWriteable(tls, pOut) != 0)) {
- goto __212
+ goto __213
}
goto no_mem
-__212:
+__213:
;
if !((libc.PostDecInt32(&n1, 1)) == 0) {
- goto __213
+ goto __214
}
- goto __211
-__213:
+ goto __212
+__214:
;
pOut += 56
pIn1 += 56
- goto __210
-__211:
+ goto __211
+__212:
;
goto __8
@@ -65216,10 +67235,10 @@ __29: // out2
__30:
;
if !((libc.AssignInt32(&rc, Xsqlite3VdbeCheckFk(tls, p, 0))) != SQLITE_OK) {
- goto __214
+ goto __215
}
goto abort_due_to_error
-__214:
+__215:
;
// Opcode: ResultRow P1 P2 * * *
@@ -65241,39 +67260,41 @@ __31:
// a side effect.
pMem = libc.AssignPtrUintptr(p+160 /* &.pResultSet */, (aMem + uintptr((*Op)(unsafe.Pointer(pOp)).Fp1)*56))
i = 0
-__215:
+__216:
if !(i < (*Op)(unsafe.Pointer(pOp)).Fp2) {
- goto __217
+ goto __218
}
if !(((int32((*Mem)(unsafe.Pointer((pMem + uintptr(i)*56))).Fflags) & MEM_Ephem) != 0) && (Xsqlite3VdbeMemMakeWriteable(tls, (pMem+uintptr(i)*56)) != 0)) {
- goto __218
+ goto __219
}
goto no_mem
-__218:
+__219:
;
Xsqlite3VdbeMemNulTerminate(tls, (pMem + uintptr(i)*56))
- goto __216
-__216:
- i++
- goto __215
goto __217
__217:
+ i++
+ goto __216
+ goto __218
+__218:
;
if !((*Sqlite3)(unsafe.Pointer(db)).FmallocFailed != 0) {
- goto __219
+ goto __220
}
goto no_mem
-__219:
+__220:
;
if !((int32((*Sqlite3)(unsafe.Pointer(db)).FmTrace) & SQLITE_TRACE_ROW) != 0) {
- goto __220
+ goto __221
}
- (*(*func(*libc.TLS, U32, uintptr, uintptr, uintptr) int32)(unsafe.Pointer((db + 240 /* &.trace */ /* &.xV2 */))))(tls, uint32(SQLITE_TRACE_ROW), (*Sqlite3)(unsafe.Pointer(db)).FpTraceArg, p, uintptr(0))
-__220:
+ (*struct {
+ f func(*libc.TLS, U32, uintptr, uintptr, uintptr) int32
+ })(unsafe.Pointer(&struct{ uintptr }{*(*uintptr)(unsafe.Pointer(db + 240 /* &.trace */))})).f(tls, uint32(SQLITE_TRACE_ROW), (*Sqlite3)(unsafe.Pointer(db)).FpTraceArg, p, uintptr(0))
+__221:
;
// Return SQLITE_ROW
@@ -65302,93 +67323,93 @@ __32: // Initial flags for P2
flags1 = (*Mem)(unsafe.Pointer(pIn1)).Fflags
if !(((int32(flags1) | int32((*Mem)(unsafe.Pointer(pIn2)).Fflags)) & MEM_Null) != 0) {
- goto __221
+ goto __222
}
Xsqlite3VdbeMemSetNull(tls, pOut)
goto __8
-__221:
+__222:
;
if !((int32(flags1) & (MEM_Str | MEM_Blob)) == 0) {
- goto __222
+ goto __223
}
if !(Xsqlite3VdbeMemStringify(tls, pIn1, encoding, uint8(0)) != 0) {
- goto __224
+ goto __225
}
goto no_mem
-__224:
+__225:
;
flags1 = (U16(int32((*Mem)(unsafe.Pointer(pIn1)).Fflags) & libc.CplInt32(MEM_Str)))
- goto __223
-__222:
+ goto __224
+__223:
if !((int32(flags1) & MEM_Zero) != 0) {
- goto __225
+ goto __226
}
if !(Xsqlite3VdbeMemExpandBlob(tls, pIn1) != 0) {
- goto __226
+ goto __227
}
goto no_mem
-__226:
+__227:
;
flags1 = (U16(int32((*Mem)(unsafe.Pointer(pIn1)).Fflags) & libc.CplInt32(MEM_Str)))
-__225:
+__226:
;
-__223:
+__224:
;
flags2 = (*Mem)(unsafe.Pointer(pIn2)).Fflags
if !((int32(flags2) & (MEM_Str | MEM_Blob)) == 0) {
- goto __227
+ goto __228
}
if !(Xsqlite3VdbeMemStringify(tls, pIn2, encoding, uint8(0)) != 0) {
- goto __229
+ goto __230
}
goto no_mem
-__229:
+__230:
;
flags2 = (U16(int32((*Mem)(unsafe.Pointer(pIn2)).Fflags) & libc.CplInt32(MEM_Str)))
- goto __228
-__227:
+ goto __229
+__228:
if !((int32(flags2) & MEM_Zero) != 0) {
- goto __230
+ goto __231
}
if !(Xsqlite3VdbeMemExpandBlob(tls, pIn2) != 0) {
- goto __231
+ goto __232
}
goto no_mem
-__231:
+__232:
;
flags2 = (U16(int32((*Mem)(unsafe.Pointer(pIn2)).Fflags) & libc.CplInt32(MEM_Str)))
-__230:
+__231:
;
-__228:
+__229:
;
nByte = (I64((*Mem)(unsafe.Pointer(pIn1)).Fn + (*Mem)(unsafe.Pointer(pIn2)).Fn))
if !(nByte > I64(*(*int32)(unsafe.Pointer((db + 128 /* &.aLimit */))))) {
- goto __232
+ goto __233
}
goto too_big
-__232:
+__233:
;
if !(Xsqlite3VdbeMemGrow(tls, pOut, (int32(nByte)+3), (libc.Bool32(pOut == pIn2))) != 0) {
- goto __233
+ goto __234
}
goto no_mem
-__233:
+__234:
;
(*Mem)(unsafe.Pointer(pOut)).Fflags = (U16((int32((*Mem)(unsafe.Pointer((pOut))).Fflags) & libc.CplInt32((MEM_TypeMask | MEM_Zero))) | MEM_Str))
if !(pOut != pIn2) {
- goto __234
+ goto __235
}
libc.Xmemcpy(tls, (*Mem)(unsafe.Pointer(pOut)).Fz, (*Mem)(unsafe.Pointer(pIn2)).Fz, uint64((*Mem)(unsafe.Pointer(pIn2)).Fn))
(*Mem)(unsafe.Pointer(pIn2)).Fflags = flags2
-__234:
+__235:
;
libc.Xmemcpy(tls, ((*Mem)(unsafe.Pointer(pOut)).Fz + uintptr((*Mem)(unsafe.Pointer(pIn2)).Fn)), (*Mem)(unsafe.Pointer(pIn1)).Fz, uint64((*Mem)(unsafe.Pointer(pIn1)).Fn))
(*Mem)(unsafe.Pointer(pIn1)).Fflags = flags1
- *(*int8)(unsafe.Pointer((*Mem)(unsafe.Pointer(pOut)).Fz + uintptr(nByte))) = int8(0)
- *(*int8)(unsafe.Pointer((*Mem)(unsafe.Pointer(pOut)).Fz + uintptr((nByte + int64(1))))) = int8(0)
- *(*int8)(unsafe.Pointer((*Mem)(unsafe.Pointer(pOut)).Fz + uintptr((nByte + int64(2))))) = int8(0)
+ *(*uint8)(unsafe.Pointer((*Mem)(unsafe.Pointer(pOut)).Fz + uintptr(nByte))) = uint8(0)
+ *(*uint8)(unsafe.Pointer((*Mem)(unsafe.Pointer(pOut)).Fz + uintptr((nByte + int64(1))))) = uint8(0)
+ *(*uint8)(unsafe.Pointer((*Mem)(unsafe.Pointer(pOut)).Fz + uintptr((nByte + int64(2))))) = uint8(0)
*(*U16)(unsafe.Pointer(pOut + 8 /* &.flags */)) |= U16((MEM_Term))
(*Mem)(unsafe.Pointer(pOut)).Fn = int32(nByte)
(*Mem)(unsafe.Pointer(pOut)).Fenc = encoding
@@ -65441,158 +67462,158 @@ __37: // Real value of right operand
pOut = (aMem + uintptr((*Op)(unsafe.Pointer(pOp)).Fp3)*56)
flags = (U16(int32((*Mem)(unsafe.Pointer(pIn1)).Fflags) | int32((*Mem)(unsafe.Pointer(pIn2)).Fflags)))
if !(((int32(type1) & int32(type2)) & MEM_Int) != 0) {
- goto __235
+ goto __236
}
iA = *(*I64)(unsafe.Pointer(pIn1 /* &.u */))
*(*I64)(unsafe.Pointer(bp + 176 /* iB */)) = *(*I64)(unsafe.Pointer(pIn2 /* &.u */))
switch int32((*Op)(unsafe.Pointer(pOp)).Fopcode) {
case OP_Add:
- goto __238
- case OP_Subtract:
goto __239
- case OP_Multiply:
+ case OP_Subtract:
goto __240
- case OP_Divide:
+ case OP_Multiply:
goto __241
- default:
+ case OP_Divide:
goto __242
- }
- goto __237
-__238:
- if !(Xsqlite3AddInt64(tls, bp+176 /* &iB */, iA) != 0) {
+ default:
goto __243
}
- goto fp_math
-__243:
- ;
- goto __237
+ goto __238
__239:
- if !(Xsqlite3SubInt64(tls, bp+176 /* &iB */, iA) != 0) {
+ if !(Xsqlite3AddInt64(tls, bp+176 /* &iB */, iA) != 0) {
goto __244
}
goto fp_math
__244:
;
- goto __237
+ goto __238
__240:
- if !(Xsqlite3MulInt64(tls, bp+176 /* &iB */, iA) != 0) {
+ if !(Xsqlite3SubInt64(tls, bp+176 /* &iB */, iA) != 0) {
goto __245
}
goto fp_math
__245:
;
- goto __237
+ goto __238
__241:
- if !(iA == int64(0)) {
+ if !(Xsqlite3MulInt64(tls, bp+176 /* &iB */, iA) != 0) {
goto __246
}
- goto arithmetic_result_is_null
+ goto fp_math
__246:
;
- if !((iA == int64(-1)) && (*(*I64)(unsafe.Pointer(bp + 176 /* iB */)) == ((int64(-1)) - (int64(0xffffffff) | (I64((int64(0x7fffffff))) << 32))))) {
+ goto __238
+__242:
+ if !(iA == int64(0)) {
goto __247
}
- goto fp_math
+ goto arithmetic_result_is_null
__247:
+ ;
+ if !((iA == int64(-1)) && (*(*I64)(unsafe.Pointer(bp + 176 /* iB */)) == ((int64(-1)) - (int64(0xffffffff) | (I64((int64(0x7fffffff))) << 32))))) {
+ goto __248
+ }
+ goto fp_math
+__248:
;
*(*I64)(unsafe.Pointer(bp + 176 /* iB */)) /= iA
- goto __237
+ goto __238
-__242:
+__243:
if !(iA == int64(0)) {
- goto __248
+ goto __249
}
goto arithmetic_result_is_null
-__248:
+__249:
;
if !(iA == int64(-1)) {
- goto __249
+ goto __250
}
iA = int64(1)
-__249:
+__250:
;
*(*I64)(unsafe.Pointer(bp + 176 /* iB */)) %= iA
- goto __237
+ goto __238
-__237:
+__238:
;
*(*I64)(unsafe.Pointer(pOut /* &.u */)) = *(*I64)(unsafe.Pointer(bp + 176 /* iB */))
(*Mem)(unsafe.Pointer(pOut)).Fflags = (U16((int32((*Mem)(unsafe.Pointer((pOut))).Fflags) & libc.CplInt32((MEM_TypeMask | MEM_Zero))) | MEM_Int))
- goto __236
-__235:
+ goto __237
+__236:
if !((int32(flags) & MEM_Null) != 0) {
- goto __250
+ goto __251
}
goto arithmetic_result_is_null
- goto __251
-__250:
+ goto __252
+__251:
fp_math:
rA = Xsqlite3VdbeRealValue(tls, pIn1)
rB = Xsqlite3VdbeRealValue(tls, pIn2)
switch int32((*Op)(unsafe.Pointer(pOp)).Fopcode) {
case OP_Add:
- goto __253
- case OP_Subtract:
goto __254
- case OP_Multiply:
+ case OP_Subtract:
goto __255
- case OP_Divide:
+ case OP_Multiply:
goto __256
- default:
+ case OP_Divide:
goto __257
+ default:
+ goto __258
}
- goto __252
-__253:
- rB = rB + (rA)
- goto __252
+ goto __253
__254:
- rB = rB - (rA)
- goto __252
+ rB = rB + (rA)
+ goto __253
__255:
- rB = rB * (rA)
- goto __252
+ rB = rB - (rA)
+ goto __253
__256:
+ rB = rB * (rA)
+ goto __253
+__257:
// (double)0 In case of SQLITE_OMIT_FLOATING_POINT...
if !(rA == float64(0)) {
- goto __258
+ goto __259
}
goto arithmetic_result_is_null
-__258:
+__259:
;
rB = rB / (rA)
- goto __252
+ goto __253
-__257:
+__258:
iA = Xsqlite3VdbeIntValue(tls, pIn1)
*(*I64)(unsafe.Pointer(bp + 176 /* iB */)) = Xsqlite3VdbeIntValue(tls, pIn2)
if !(iA == int64(0)) {
- goto __259
+ goto __260
}
goto arithmetic_result_is_null
-__259:
+__260:
;
if !(iA == int64(-1)) {
- goto __260
+ goto __261
}
iA = int64(1)
-__260:
+__261:
;
rB = (float64(*(*I64)(unsafe.Pointer(bp + 176 /* iB */)) % iA))
- goto __252
+ goto __253
-__252:
+__253:
;
if !(Xsqlite3IsNaN(tls, rB) != 0) {
- goto __261
+ goto __262
}
goto arithmetic_result_is_null
-__261:
+__262:
;
*(*float64)(unsafe.Pointer(pOut /* &.u */)) = rB
(*Mem)(unsafe.Pointer(pOut)).Fflags = (U16((int32((*Mem)(unsafe.Pointer((pOut))).Fflags) & libc.CplInt32((MEM_TypeMask | MEM_Zero))) | MEM_Real))
-__251:
+__252:
;
-__236:
+__237:
;
goto __8
@@ -65617,10 +67638,10 @@ arithmetic_result_is_null:
__38:
;
if !((*Op)(unsafe.Pointer(pOp)).Fp1 != 0) {
- goto __262
+ goto __263
}
Xsqlite3VdbeMemSetInt64(tls, (aMem + uintptr((*Op)(unsafe.Pointer(pOp)).Fp1)*56), int64(0))
-__262:
+__263:
;
goto __8
@@ -65659,34 +67680,34 @@ __42:
pIn2 = (aMem + uintptr((*Op)(unsafe.Pointer(pOp)).Fp2)*56)
pOut = (aMem + uintptr((*Op)(unsafe.Pointer(pOp)).Fp3)*56)
if !(((int32((*Mem)(unsafe.Pointer(pIn1)).Fflags) | int32((*Mem)(unsafe.Pointer(pIn2)).Fflags)) & MEM_Null) != 0) {
- goto __263
+ goto __264
}
Xsqlite3VdbeMemSetNull(tls, pOut)
goto __8
-__263:
+__264:
;
*(*I64)(unsafe.Pointer(bp + 192 /* iA1 */)) = Xsqlite3VdbeIntValue(tls, pIn2)
iB1 = Xsqlite3VdbeIntValue(tls, pIn1)
op = (*Op)(unsafe.Pointer(pOp)).Fopcode
if !(int32(op) == OP_BitAnd) {
- goto __264
+ goto __265
}
*(*I64)(unsafe.Pointer(bp + 192 /* iA1 */)) &= iB1
- goto __265
-__264:
+ goto __266
+__265:
if !(int32(op) == OP_BitOr) {
- goto __266
+ goto __267
}
*(*I64)(unsafe.Pointer(bp + 192 /* iA1 */)) |= iB1
- goto __267
-__266:
+ goto __268
+__267:
if !(iB1 != int64(0)) {
- goto __268
+ goto __269
}
// If shifting by a negative amount, shift in the other direction
if !(iB1 < int64(0)) {
- goto __269
+ goto __270
}
op = (U8(((2 * OP_ShiftLeft) + 1) - int32(op)))
@@ -65695,44 +67716,44 @@ __266:
} else {
iB1 = int64(64)
}
-__269:
+__270:
;
if !(iB1 >= int64(64)) {
- goto __270
+ goto __271
}
if (*(*I64)(unsafe.Pointer(bp + 192 /* iA1 */)) >= int64(0)) || (int32(op) == OP_ShiftLeft) {
*(*I64)(unsafe.Pointer(bp + 192 /* iA1 */)) = int64(0)
} else {
*(*I64)(unsafe.Pointer(bp + 192 /* iA1 */)) = int64(-1)
}
- goto __271
-__270:
+ goto __272
+__271:
libc.Xmemcpy(tls, bp+184 /* &uA */, bp+192 /* &iA1 */, uint64(unsafe.Sizeof(U64(0))))
if !(int32(op) == OP_ShiftLeft) {
- goto __272
+ goto __273
}
*(*U64)(unsafe.Pointer(bp + 184 /* uA */)) <<= iB1
- goto __273
-__272:
+ goto __274
+__273:
*(*U64)(unsafe.Pointer(bp + 184 /* uA */)) >>= iB1
// Sign-extend on a right shift of a negative number
if !(*(*I64)(unsafe.Pointer(bp + 192 /* iA1 */)) < int64(0)) {
- goto __274
+ goto __275
}
*(*U64)(unsafe.Pointer(bp + 184 /* uA */)) |= (U64(((U64((uint64(0xffffffff))) << 32) | uint64(0xffffffff))) << (int64(64) - iB1))
-__274:
+__275:
;
-__273:
+__274:
;
libc.Xmemcpy(tls, bp+192 /* &iA1 */, bp+184 /* &uA */, uint64(unsafe.Sizeof(I64(0))))
-__271:
+__272:
;
-__268:
+__269:
;
-__267:
+__268:
;
-__265:
+__266:
;
*(*I64)(unsafe.Pointer(pOut /* &.u */)) = *(*I64)(unsafe.Pointer(bp + 192 /* iA1 */))
(*Mem)(unsafe.Pointer(pOut)).Fflags = (U16((int32((*Mem)(unsafe.Pointer((pOut))).Fflags) & libc.CplInt32((MEM_TypeMask | MEM_Zero))) | MEM_Int))
@@ -65761,26 +67782,26 @@ __43: // in1
__44: // jump, in1
pIn1 = (aMem + uintptr((*Op)(unsafe.Pointer(pOp)).Fp1)*56)
if !((int32((*Mem)(unsafe.Pointer(pIn1)).Fflags) & MEM_Int) == 0) {
- goto __275
+ goto __276
}
- applyAffinity(tls, pIn1, int8(SQLITE_AFF_NUMERIC), encoding)
+ applyAffinity(tls, pIn1, uint8(SQLITE_AFF_NUMERIC), encoding)
if !((int32((*Mem)(unsafe.Pointer(pIn1)).Fflags) & MEM_Int) == 0) {
- goto __276
+ goto __277
}
if !((*Op)(unsafe.Pointer(pOp)).Fp2 == 0) {
- goto __277
+ goto __278
}
rc = SQLITE_MISMATCH
goto abort_due_to_error
- goto __278
-__277:
- goto jump_to_p2
+ goto __279
__278:
+ goto jump_to_p2
+__279:
;
-__276:
+__277:
;
-__275:
+__276:
;
(*Mem)(unsafe.Pointer(pIn1)).Fflags = (U16((int32((*Mem)(unsafe.Pointer((pIn1))).Fflags) & libc.CplInt32((MEM_TypeMask | MEM_Zero))) | MEM_Int))
@@ -65797,12 +67818,12 @@ __275:
__45: // in1
pIn1 = (aMem + uintptr((*Op)(unsafe.Pointer(pOp)).Fp1)*56)
if !((int32((*Mem)(unsafe.Pointer(pIn1)).Fflags) & (MEM_Int | MEM_IntReal)) != 0) {
- goto __279
+ goto __280
}
Xsqlite3VdbeMemRealify(tls, pIn1)
-__279:
+__280:
;
goto __8
@@ -65832,17 +67853,17 @@ __46: // in1
return 0
}()
if !(rc != 0) {
- goto __280
+ goto __281
}
goto abort_due_to_error
-__280:
+__281:
;
rc = Xsqlite3VdbeMemCast(tls, pIn1, uint8((*Op)(unsafe.Pointer(pOp)).Fp2), encoding)
if !(rc != 0) {
- goto __281
+ goto __282
}
goto abort_due_to_error
-__281:
+__282:
;
goto __8
@@ -65851,8 +67872,7 @@ __281:
// Synopsis: IF r[P3]==r[P1]
//
// Compare the values in register P1 and P3. If reg(P3)==reg(P1) then
- // jump to address P2. Or if the SQLITE_STOREP2 flag is set in P5, then
- // store the result of comparison in register P2.
+ // jump to address P2.
//
// The SQLITE_AFF_MASK portion of P5 must be an affinity character -
// SQLITE_AFF_TEXT, SQLITE_AFF_INTEGER, and so forth. An attempt is made
@@ -65878,25 +67898,19 @@ __281:
// If neither operand is NULL the result is the same as it would be if
// the SQLITE_NULLEQ flag were omitted from P5.
//
- // If both SQLITE_STOREP2 and SQLITE_KEEPNULL flags are set then the
- // content of r[P2] is only changed if the new value is NULL or 0 (false).
- // In other words, a prior r[P2] value will not be overwritten by 1 (true).
+ // This opcode saves the result of comparison for use by the new
+ // OP_Jump opcode.
// Opcode: Ne P1 P2 P3 P4 P5
// Synopsis: IF r[P3]!=r[P1]
//
// This works just like the Eq opcode except that the jump is taken if
// the operands in registers P1 and P3 are not equal. See the Eq opcode for
// additional information.
- //
- // If both SQLITE_STOREP2 and SQLITE_KEEPNULL flags are set then the
- // content of r[P2] is only changed if the new value is NULL or 1 (true).
- // In other words, a prior r[P2] value will not be overwritten by 0 (false).
// Opcode: Lt P1 P2 P3 P4 P5
// Synopsis: IF r[P3]flags
pIn3 = (aMem + uintptr((*Op)(unsafe.Pointer(pOp)).Fp3)*56)
flags11 = (*Mem)(unsafe.Pointer(pIn1)).Fflags
flags3 = (*Mem)(unsafe.Pointer(pIn3)).Fflags
+ if !(((int32(flags11) & int32(flags3)) & MEM_Int) != 0) {
+ goto __283
+ }
+
+ // Common case of comparison of two integers
+ if !(*(*I64)(unsafe.Pointer(pIn3 /* &.u */)) > *(*I64)(unsafe.Pointer(pIn1 /* &.u */))) {
+ goto __284
+ }
+ iCompare = +1
+ if !(*(*uint8)(unsafe.Pointer(Xsqlite3aGTb + uintptr((*Op)(unsafe.Pointer(pOp)).Fopcode))) != 0) {
+ goto __286
+ }
+
+ goto jump_to_p2
+__286:
+ ;
+ goto __285
+__284:
+ if !(*(*I64)(unsafe.Pointer(pIn3 /* &.u */)) < *(*I64)(unsafe.Pointer(pIn1 /* &.u */))) {
+ goto __287
+ }
+ iCompare = -1
+ if !(*(*uint8)(unsafe.Pointer(Xsqlite3aLTb + uintptr((*Op)(unsafe.Pointer(pOp)).Fopcode))) != 0) {
+ goto __289
+ }
+
+ goto jump_to_p2
+__289:
+ ;
+ goto __288
+__287:
+ iCompare = 0
+ if !(*(*uint8)(unsafe.Pointer(Xsqlite3aEQb + uintptr((*Op)(unsafe.Pointer(pOp)).Fopcode))) != 0) {
+ goto __290
+ }
+
+ goto jump_to_p2
+__290:
+ ;
+__288:
+ ;
+__285:
+ ;
+
+ goto __8
+__283:
+ ;
if !(((int32(flags11) | int32(flags3)) & MEM_Null) != 0) {
- goto __282
+ goto __291
}
// One or both operands are NULL
if !((int32((*Op)(unsafe.Pointer(pOp)).Fp5) & SQLITE_NULLEQ) != 0) {
- goto __284
+ goto __293
}
// If SQLITE_NULLEQ is set (which will only happen if the operator is
// OP_Eq or OP_Ne) then take the jump or not depending on whether
@@ -65961,158 +68025,125 @@ __52: // Copy of initial value of pIn3->flags
if !((((int32(flags11) & int32(flags3)) & MEM_Null) != 0) &&
((int32(flags3) & MEM_Cleared) == 0)) {
- goto __286
+ goto __295
}
res = 0 // Operands are equal
- goto __287
-__286:
+ goto __296
+__295:
res = func() int32 {
if (int32(flags3) & MEM_Null) != 0 {
return -1
}
return +1
}() // Operands are not equal
-__287:
+__296:
;
- goto __285
-__284:
+ goto __294
+__293:
// SQLITE_NULLEQ is clear and at least one operand is NULL,
// then the result is always NULL.
// The jump is taken if the SQLITE_JUMPIFNULL bit is set.
- if !((int32((*Op)(unsafe.Pointer(pOp)).Fp5) & SQLITE_STOREP2) != 0) {
- goto __288
- }
- pOut = (aMem + uintptr((*Op)(unsafe.Pointer(pOp)).Fp2)*56)
iCompare = 1 // Operands are not equal
- (*Mem)(unsafe.Pointer(pOut)).Fflags = (U16((int32((*Mem)(unsafe.Pointer((pOut))).Fflags) & libc.CplInt32((MEM_TypeMask | MEM_Zero))) | MEM_Null))
-
- goto __289
-__288:
- ;
if !((int32((*Op)(unsafe.Pointer(pOp)).Fp5) & SQLITE_JUMPIFNULL) != 0) {
- goto __290
+ goto __297
}
goto jump_to_p2
-__290:
- ;
-__289:
+__297:
;
goto __8
-__285:
+__294:
;
- goto __283
-__282:
- // Neither operand is NULL. Do a comparison.
- affinity = (int8(int32((*Op)(unsafe.Pointer(pOp)).Fp5) & SQLITE_AFF_MASK))
+ goto __292
+__291:
+ // Neither operand is NULL and we couldn't do the special high-speed
+ // integer comparison case. So do a general-case comparison.
+ affinity = (uint8(int32((*Op)(unsafe.Pointer(pOp)).Fp5) & SQLITE_AFF_MASK))
if !(int32(affinity) >= SQLITE_AFF_NUMERIC) {
- goto __291
+ goto __298
}
if !(((int32(flags11) | int32(flags3)) & MEM_Str) != 0) {
- goto __293
+ goto __300
}
if !((int32(flags11) & (((MEM_Int | MEM_IntReal) | MEM_Real) | MEM_Str)) == MEM_Str) {
- goto __294
+ goto __301
}
applyNumericAffinity(tls, pIn1, 0)
flags3 = (*Mem)(unsafe.Pointer(pIn3)).Fflags
-__294:
+__301:
;
if !((int32(flags3) & (((MEM_Int | MEM_IntReal) | MEM_Real) | MEM_Str)) == MEM_Str) {
- goto __295
+ goto __302
}
applyNumericAffinity(tls, pIn3, 0)
-__295:
- ;
-__293:
+__302:
;
- // Handle the common case of integer comparison here, as an
- // optimization, to avoid a call to sqlite3MemCompare()
- if !(((int32((*Mem)(unsafe.Pointer(pIn1)).Fflags) & int32((*Mem)(unsafe.Pointer(pIn3)).Fflags)) & MEM_Int) != 0) {
- goto __296
- }
- if !(*(*I64)(unsafe.Pointer(pIn3 /* &.u */)) > *(*I64)(unsafe.Pointer(pIn1 /* &.u */))) {
- goto __297
- }
- res = +1
- goto compare_op
-__297:
+__300:
;
- if !(*(*I64)(unsafe.Pointer(pIn3 /* &.u */)) < *(*I64)(unsafe.Pointer(pIn1 /* &.u */))) {
- goto __298
- }
- res = -1
- goto compare_op
+ goto __299
__298:
- ;
- res = 0
- goto compare_op
-__296:
- ;
- goto __292
-__291:
if !(int32(affinity) == SQLITE_AFF_TEXT) {
- goto __299
+ goto __303
}
if !(((int32(flags11) & MEM_Str) == 0) && ((int32(flags11) & ((MEM_Int | MEM_Real) | MEM_IntReal)) != 0)) {
- goto __300
+ goto __304
}
Xsqlite3VdbeMemStringify(tls, pIn1, encoding, uint8(1))
flags11 = (U16((int32((*Mem)(unsafe.Pointer(pIn1)).Fflags) & libc.CplInt32(MEM_TypeMask)) | (int32(flags11) & MEM_TypeMask)))
if !(pIn1 == pIn3) {
- goto __301
+ goto __305
}
flags3 = (U16(int32(flags11) | MEM_Str))
-__301:
+__305:
;
-__300:
+__304:
;
if !(((int32(flags3) & MEM_Str) == 0) && ((int32(flags3) & ((MEM_Int | MEM_Real) | MEM_IntReal)) != 0)) {
- goto __302
+ goto __306
}
Xsqlite3VdbeMemStringify(tls, pIn3, encoding, uint8(1))
flags3 = (U16((int32((*Mem)(unsafe.Pointer(pIn3)).Fflags) & libc.CplInt32(MEM_TypeMask)) | (int32(flags3) & MEM_TypeMask)))
-__302:
+__306:
;
-__299:
+__303:
;
-__292:
+__299:
;
res = Xsqlite3MemCompare(tls, pIn3, pIn1, *(*uintptr)(unsafe.Pointer(pOp + 16 /* &.p4 */)))
-__283:
+__292:
;
-compare_op:
+
// At this point, res is negative, zero, or positive if reg[P1] is
// less than, equal to, or greater than reg[P3], respectively. Compute
// the answer to this operator in res2, depending on what the comparison
// operator actually is. The next block of code depends on the fact
// that the 6 comparison operators are consecutive integers in this
// order: NE, EQ, GT, LE, LT, GE
- ;
if !(res < 0) {
- goto __303
+ goto __307
}
- res2 = int32(aLTb[(int32((*Op)(unsafe.Pointer(pOp)).Fopcode) - OP_Ne)])
- goto __304
-__303:
+ res2 = int32(*(*uint8)(unsafe.Pointer(Xsqlite3aLTb + uintptr((*Op)(unsafe.Pointer(pOp)).Fopcode))))
+ goto __308
+__307:
if !(res == 0) {
- goto __305
+ goto __309
}
- res2 = int32(aEQb[(int32((*Op)(unsafe.Pointer(pOp)).Fopcode) - OP_Ne)])
- goto __306
-__305:
- res2 = int32(aGTb[(int32((*Op)(unsafe.Pointer(pOp)).Fopcode) - OP_Ne)])
-__306:
+ res2 = int32(*(*uint8)(unsafe.Pointer(Xsqlite3aEQb + uintptr((*Op)(unsafe.Pointer(pOp)).Fopcode))))
+ goto __310
+__309:
+ res2 = int32(*(*uint8)(unsafe.Pointer(Xsqlite3aGTb + uintptr((*Op)(unsafe.Pointer(pOp)).Fopcode))))
+__310:
;
-__304:
+__308:
;
+ iCompare = res
// Undo any changes made by applyAffinity() to the input registers.
@@ -66120,63 +68151,29 @@ __304:
(*Mem)(unsafe.Pointer(pIn1)).Fflags = flags11
- if !((int32((*Op)(unsafe.Pointer(pOp)).Fp5) & SQLITE_STOREP2) != 0) {
- goto __307
- }
- pOut = (aMem + uintptr((*Op)(unsafe.Pointer(pOp)).Fp2)*56)
- iCompare = res
- if !((int32((*Op)(unsafe.Pointer(pOp)).Fp5) & SQLITE_KEEPNULL) != 0) {
- goto __309
- }
- // The KEEPNULL flag prevents OP_Eq from overwriting a NULL with 1
- // and prevents OP_Ne from overwriting NULL with 0. This flag
- // is only used in contexts where either:
- // (1) op==OP_Eq && (r[P2]==NULL || r[P2]==0)
- // (2) op==OP_Ne && (r[P2]==NULL || r[P2]==1)
- // Therefore it is not necessary to check the content of r[P2] for
- // NULL.
-
- if !((libc.Bool32(int32((*Op)(unsafe.Pointer(pOp)).Fopcode) == OP_Eq)) == res2) {
- goto __310
- }
- goto __8
-__310:
- ;
-__309:
- ;
-
- (*Mem)(unsafe.Pointer(pOut)).Fflags = (U16((int32((*Mem)(unsafe.Pointer((pOut))).Fflags) & libc.CplInt32((MEM_TypeMask | MEM_Zero))) | MEM_Int))
- *(*I64)(unsafe.Pointer(pOut /* &.u */)) = I64(res2)
-
- goto __308
-__307:
- ;
if !(res2 != 0) {
goto __311
}
goto jump_to_p2
__311:
;
-__308:
- ;
goto __8
- // Opcode: ElseNotEq * P2 * * *
+ // Opcode: ElseEq * P2 * * *
//
// This opcode must follow an OP_Lt or OP_Gt comparison operator. There
// can be zero or more OP_ReleaseReg opcodes intervening, but no other
// opcodes are allowed to occur between this instruction and the previous
- // OP_Lt or OP_Gt. Furthermore, the prior OP_Lt or OP_Gt must have the
- // SQLITE_STOREP2 bit set in the P5 field.
+ // OP_Lt or OP_Gt.
//
// If result of an OP_Eq comparison on the same two operands as the
- // prior OP_Lt or OP_Gt would have been NULL or false (0), then then
- // jump to P2. If the result of an OP_Eq comparison on the two previous
- // operands would have been true (1), then fall through.
+ // prior OP_Lt or OP_Gt would have been true, then jump to P2.
+ // If the result of an OP_Eq comparison on the two previous
+ // operands would have been false or NULL, then fall through.
__53: // same as TK_ESCAPE, jump
;
- if !(iCompare != 0) {
+ if !(iCompare == 0) {
goto __312
}
goto jump_to_p2
@@ -66508,18 +68505,37 @@ __338:
;
goto __8
+ // Opcode: ZeroOrNull P1 P2 P3 * *
+ // Synopsis: r[P2] = 0 OR NULL
+ //
+ // If all both registers P1 and P3 are NOT NULL, then store a zero in
+ // register P2. If either registers P1 or P3 are NULL then put
+ // a NULL in register P2.
+__66: // in1, in2, out2, in3
+ if !(((int32((*Mem)(unsafe.Pointer(aMem+uintptr((*Op)(unsafe.Pointer(pOp)).Fp1)*56)).Fflags) & MEM_Null) != 0) ||
+ ((int32((*Mem)(unsafe.Pointer(aMem+uintptr((*Op)(unsafe.Pointer(pOp)).Fp3)*56)).Fflags) & MEM_Null) != 0)) {
+ goto __339
+ }
+ Xsqlite3VdbeMemSetNull(tls, (aMem + uintptr((*Op)(unsafe.Pointer(pOp)).Fp2)*56))
+ goto __340
+__339:
+ Xsqlite3VdbeMemSetInt64(tls, (aMem + uintptr((*Op)(unsafe.Pointer(pOp)).Fp2)*56), int64(0))
+__340:
+ ;
+ goto __8
+
// Opcode: NotNull P1 P2 * * *
// Synopsis: if r[P1]!=NULL goto P2
//
// Jump to P2 if the value in register P1 is not NULL.
-__66: // same as TK_NOTNULL, jump, in1
+__67: // same as TK_NOTNULL, jump, in1
pIn1 = (aMem + uintptr((*Op)(unsafe.Pointer(pOp)).Fp1)*56)
if !((int32((*Mem)(unsafe.Pointer(pIn1)).Fflags) & MEM_Null) == 0) {
- goto __339
+ goto __341
}
goto jump_to_p2
-__339:
+__341:
;
goto __8
@@ -66530,15 +68546,15 @@ __339:
// If it is, then set register P3 to NULL and jump immediately to P2.
// If P1 is not on a NULL row, then fall through without making any
// changes.
-__67: // jump
+__68: // jump
;
if !((*VdbeCursor)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer((*Vdbe)(unsafe.Pointer(p)).FapCsr + uintptr((*Op)(unsafe.Pointer(pOp)).Fp1)*8)))).FnullRow != 0) {
- goto __340
+ goto __342
}
Xsqlite3VdbeMemSetNull(tls, (aMem + uintptr((*Op)(unsafe.Pointer(pOp)).Fp3)*56))
goto jump_to_p2
-__340:
+__342:
;
goto __8
@@ -66556,18 +68572,18 @@ __340:
//
// This opcode is only available if SQLite is compiled with the
// -DSQLITE_ENABLE_OFFSET_SQL_FUNC option.
-__68: // The VDBE cursor
+__69: // The VDBE cursor
;
pC = *(*uintptr)(unsafe.Pointer((*Vdbe)(unsafe.Pointer(p)).FapCsr + uintptr((*Op)(unsafe.Pointer(pOp)).Fp1)*8))
pOut = ((*Vdbe)(unsafe.Pointer(p)).FaMem + uintptr((*Op)(unsafe.Pointer(pOp)).Fp3)*56)
if !((pC == uintptr(0)) || (int32((*VdbeCursor)(unsafe.Pointer(pC)).FeCurType) != CURTYPE_BTREE)) {
- goto __341
+ goto __343
}
Xsqlite3VdbeMemSetNull(tls, pOut)
- goto __342
-__341:
+ goto __344
+__343:
Xsqlite3VdbeMemSetInt64(tls, pOut, Xsqlite3BtreeOffset(tls, *(*uintptr)(unsafe.Pointer(pC + 56 /* &.uc */))))
-__342:
+__344:
;
goto __8
@@ -66590,7 +68606,7 @@ __342:
// the result is guaranteed to only be used as the argument of a length()
// or typeof() function, respectively. The loading of large blobs can be
// skipped for length() and all content loading can be skipped for typeof().
-__69: // PseudoTable input register
+__70: // PseudoTable input register
;
*(*uintptr)(unsafe.Pointer(bp + 200 /* pC1 */)) = *(*uintptr)(unsafe.Pointer((*Vdbe)(unsafe.Pointer(p)).FapCsr + uintptr((*Op)(unsafe.Pointer(pOp)).Fp1)*8))
@@ -66602,10 +68618,10 @@ __69: // PseudoTable input register
// B-Tree seek.
rc = Xsqlite3VdbeCursorMoveto(tls, bp+200 /* &pC1 */, bp+208 /* &p22 */)
if !(rc != 0) {
- goto __343
+ goto __345
}
goto abort_due_to_error
-__343:
+__345:
;
pDest = (aMem + uintptr((*Op)(unsafe.Pointer(pOp)).Fp3)*56)
@@ -66613,13 +68629,13 @@ __343:
aOffset = (*VdbeCursor)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 200 /* pC1 */)))).FaOffset
if !((*VdbeCursor)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 200 /* pC1 */)))).FcacheStatus != (*Vdbe)(unsafe.Pointer(p)).FcacheCtr) {
- goto __344
+ goto __346
} //OPTIMIZATION-IF-FALSE
if !((*VdbeCursor)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 200 /* pC1 */)))).FnullRow != 0) {
- goto __345
+ goto __347
}
if !(int32((*VdbeCursor)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 200 /* pC1 */)))).FeCurType) == CURTYPE_PSEUDO) {
- goto __347
+ goto __349
}
// For the special case of as pseudo-cursor, the seekResult field
// identifies the register that holds the record
@@ -66628,14 +68644,14 @@ __343:
(*VdbeCursor)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 200 /* pC1 */)))).FpayloadSize = libc.AssignPtrUint32(*(*uintptr)(unsafe.Pointer(bp + 200 /* pC1 */))+116 /* &.szRow */, U32((*Mem)(unsafe.Pointer(pReg)).Fn))
(*VdbeCursor)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 200 /* pC1 */)))).FaRow = (*Mem)(unsafe.Pointer(pReg)).Fz
- goto __348
-__347:
+ goto __350
+__349:
Xsqlite3VdbeMemSetNull(tls, pDest)
goto op_column_out
-__348:
+__350:
;
- goto __346
-__345:
+ goto __348
+__347:
pCrsr = *(*uintptr)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 200 /* pC1 */)) + 56 /* &.uc */))
(*VdbeCursor)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 200 /* pC1 */)))).FpayloadSize = Xsqlite3BtreePayloadSize(tls, pCrsr)
@@ -66643,12 +68659,12 @@ __345:
// Maximum page size is 64KiB
if !((*VdbeCursor)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 200 /* pC1 */)))).FpayloadSize > U32(*(*int32)(unsafe.Pointer((db + 128 /* &.aLimit */))))) {
- goto __349
+ goto __351
}
goto too_big
-__349:
+__351:
;
-__346:
+__348:
;
(*VdbeCursor)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 200 /* pC1 */)))).FcacheStatus = (*Vdbe)(unsafe.Pointer(p)).FcacheCtr
(*VdbeCursor)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 200 /* pC1 */)))).FiHdrOffset = U32(func() uint8 {
@@ -66663,7 +68679,7 @@ __346:
(*VdbeCursor)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 200 /* pC1 */)))).FnHdrParsed = U16(0)
if !((*VdbeCursor)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 200 /* pC1 */)))).FszRow < *(*U32)(unsafe.Pointer(aOffset))) {
- goto __350
+ goto __352
} //OPTIMIZATION-IF-FALSE
// pC->aRow does not have to hold the entire row, but it does at least
// need to cover the header of the record. If pC->aRow does not contain
@@ -66681,13 +68697,13 @@ __346:
// 3-byte type for each of the maximum of 32768 columns plus three
// extra bytes for the header length itself. 32768*3 + 3 = 98307.
if !((*(*U32)(unsafe.Pointer(aOffset)) > U32(98307)) || (*(*U32)(unsafe.Pointer(aOffset)) > (*VdbeCursor)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 200 /* pC1 */)))).FpayloadSize)) {
- goto __352
+ goto __354
}
goto op_column_corrupt
-__352:
+__354:
;
- goto __351
-__350:
+ goto __353
+__352:
// This is an optimization. By skipping over the first few tests
// (ex: pC->nHdrParsed<=p2) in the next section, we achieve a
// measurable performance gain.
@@ -66704,38 +68720,38 @@ __350:
// Conditional skipped
goto op_column_read_header
-__351:
+__353:
;
-__344:
+__346:
;
// Make sure at least the first p2+1 entries of the header have been
// parsed and valid information is in aOffset[] and pC->aType[].
if !(U32((*VdbeCursor)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 200 /* pC1 */)))).FnHdrParsed) <= *(*U32)(unsafe.Pointer(bp + 208 /* p22 */))) {
- goto __353
+ goto __355
}
// If there is more header available for parsing in the record, try
// to extract additional fields up through the p2+1-th field
if !((*VdbeCursor)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 200 /* pC1 */)))).FiHdrOffset < *(*U32)(unsafe.Pointer(aOffset))) {
- goto __355
+ goto __357
}
// Make sure zData points to enough of the record to cover the header.
if !((*VdbeCursor)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 200 /* pC1 */)))).FaRow == uintptr(0)) {
- goto __357
+ goto __359
}
libc.Xmemset(tls, bp+216 /* &sMem */, 0, uint64(unsafe.Sizeof(Mem{})))
rc = Xsqlite3VdbeMemFromBtreeZeroOffset(tls, *(*uintptr)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 200 /* pC1 */)) + 56 /* &.uc */)), *(*U32)(unsafe.Pointer(aOffset)), bp+216 /* &sMem */)
if !(rc != SQLITE_OK) {
- goto __359
+ goto __361
}
goto abort_due_to_error
-__359:
+__361:
;
zData = (*Mem)(unsafe.Pointer(bp + 216 /* &sMem */)).Fz
- goto __358
-__357:
+ goto __360
+__359:
zData = (*VdbeCursor)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 200 /* pC1 */)))).FaRow
-__358:
+__360:
;
// Fill in pC->aType[i] and aOffset[i] values through the p2-th field.
@@ -66745,27 +68761,27 @@ op_column_read_header:
zHdr = (zData + uintptr((*VdbeCursor)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 200 /* pC1 */)))).FiHdrOffset))
zEndHdr = (zData + uintptr(*(*U32)(unsafe.Pointer(aOffset))))
-__360:
+__362:
if !((libc.AssignPtrUint32((*(*uintptr)(unsafe.Pointer(bp + 200 /* pC1 */))+120 /* &.aType */)+uintptr(i2)*4, libc.AssignPtrUint32(bp+272 /* t */, U32(*(*U8)(unsafe.Pointer(zHdr)))))) < U32(0x80)) {
- goto __363
+ goto __365
}
zHdr++
offset64 = offset64 + (U64(Xsqlite3VdbeOneByteSerialTypeLen(tls, uint8(*(*U32)(unsafe.Pointer(bp + 272 /* t */))))))
- goto __364
-__363:
+ goto __366
+__365:
zHdr += uintptr(Xsqlite3GetVarint32(tls, zHdr, bp+272 /* &t */))
*(*U32)(unsafe.Pointer((*(*uintptr)(unsafe.Pointer(bp + 200 /* pC1 */)) + 120 /* &.aType */) + uintptr(i2)*4)) = *(*U32)(unsafe.Pointer(bp + 272 /* t */))
offset64 = offset64 + (U64(Xsqlite3VdbeSerialTypeLen(tls, *(*U32)(unsafe.Pointer(bp + 272 /* t */)))))
-__364:
+__366:
;
*(*U32)(unsafe.Pointer(aOffset + uintptr(libc.PreIncInt32(&i2, 1))*4)) = (U32(offset64 & uint64(0xffffffff)))
- goto __361
-__361:
+ goto __363
+__363:
if (U32(i2) <= *(*U32)(unsafe.Pointer(bp + 208 /* p22 */))) && (zHdr < zEndHdr) {
- goto __360
+ goto __362
}
- goto __362
-__362:
+ goto __364
+__364:
;
// The record is corrupt if any of the following are true:
@@ -66774,63 +68790,63 @@ __362:
// (3) the end of the data extends beyond the end of the record.
if !(((zHdr >= zEndHdr) && ((zHdr > zEndHdr) || (offset64 != U64((*VdbeCursor)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 200 /* pC1 */)))).FpayloadSize)))) ||
(offset64 > U64((*VdbeCursor)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 200 /* pC1 */)))).FpayloadSize))) {
- goto __365
+ goto __367
}
if !(*(*U32)(unsafe.Pointer(aOffset)) == U32(0)) {
- goto __366
+ goto __368
}
i2 = 0
zHdr = zEndHdr
- goto __367
-__366:
+ goto __369
+__368:
if !((*VdbeCursor)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 200 /* pC1 */)))).FaRow == uintptr(0)) {
- goto __368
+ goto __370
}
Xsqlite3VdbeMemRelease(tls, bp+216 /* &sMem */)
-__368:
+__370:
;
goto op_column_corrupt
-__367:
+__369:
;
-__365:
+__367:
;
(*VdbeCursor)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 200 /* pC1 */)))).FnHdrParsed = U16(i2)
(*VdbeCursor)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 200 /* pC1 */)))).FiHdrOffset = (U32((int64(zHdr) - int64(zData)) / 1))
if !((*VdbeCursor)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 200 /* pC1 */)))).FaRow == uintptr(0)) {
- goto __369
+ goto __371
}
Xsqlite3VdbeMemRelease(tls, bp+216 /* &sMem */)
-__369:
+__371:
;
- goto __356
-__355:
+ goto __358
+__357:
*(*U32)(unsafe.Pointer(bp + 272 /* t */)) = U32(0)
-__356:
+__358:
;
// If after trying to extract new entries from the header, nHdrParsed is
// still not up to p2, that means that the record has fewer than p2
// columns. So the result will be either the default value or a NULL.
if !(U32((*VdbeCursor)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 200 /* pC1 */)))).FnHdrParsed) <= *(*U32)(unsafe.Pointer(bp + 208 /* p22 */))) {
- goto __370
+ goto __372
}
if !(int32((*Op)(unsafe.Pointer(pOp)).Fp4type) == (-11)) {
- goto __371
+ goto __373
}
Xsqlite3VdbeMemShallowCopy(tls, pDest, *(*uintptr)(unsafe.Pointer(pOp + 16 /* &.p4 */)), MEM_Static)
- goto __372
-__371:
+ goto __374
+__373:
Xsqlite3VdbeMemSetNull(tls, pDest)
-__372:
+__374:
;
goto op_column_out
-__370:
+__372:
;
- goto __354
-__353:
+ goto __356
+__355:
*(*U32)(unsafe.Pointer(bp + 272 /* t */)) = *(*U32)(unsafe.Pointer((*(*uintptr)(unsafe.Pointer(bp + 200 /* pC1 */)) + 120 /* &.aType */) + uintptr(*(*U32)(unsafe.Pointer(bp + 208 /* p22 */)))*4))
-__354:
+__356:
;
// Extract the content for the p2+1-th column. Control can only
@@ -66838,55 +68854,55 @@ __354:
// all valid.
if !((int32((*Mem)(unsafe.Pointer((pDest))).Fflags) & (MEM_Agg | MEM_Dyn)) != 0) {
- goto __373
+ goto __375
}
Xsqlite3VdbeMemSetNull(tls, pDest)
-__373:
+__375:
;
if !((*VdbeCursor)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 200 /* pC1 */)))).FszRow >= *(*U32)(unsafe.Pointer(aOffset + uintptr((*(*U32)(unsafe.Pointer(bp + 208 /* p22 */))+U32(1)))*4))) {
- goto __374
+ goto __376
}
// This is the common case where the desired content fits on the original
// page - where the content is not on an overflow page
zData = ((*VdbeCursor)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 200 /* pC1 */)))).FaRow + uintptr(*(*U32)(unsafe.Pointer(aOffset + uintptr(*(*U32)(unsafe.Pointer(bp + 208 /* p22 */)))*4))))
if !(*(*U32)(unsafe.Pointer(bp + 272 /* t */)) < U32(12)) {
- goto __376
+ goto __378
}
Xsqlite3VdbeSerialGet(tls, zData, *(*U32)(unsafe.Pointer(bp + 272 /* t */)), pDest)
- goto __377
-__376:
+ goto __379
+__378:
(*Mem)(unsafe.Pointer(pDest)).Fn = libc.AssignInt32(&len, (int32((*(*U32)(unsafe.Pointer(bp + 272 /* t */)) - U32(12)) / U32(2))))
(*Mem)(unsafe.Pointer(pDest)).Fenc = encoding
if !((*Mem)(unsafe.Pointer(pDest)).FszMalloc < (len + 2)) {
- goto __378
+ goto __380
}
(*Mem)(unsafe.Pointer(pDest)).Fflags = U16(MEM_Null)
if !(Xsqlite3VdbeMemGrow(tls, pDest, (len+2), 0) != 0) {
- goto __380
+ goto __382
}
goto no_mem
-__380:
+__382:
;
- goto __379
-__378:
+ goto __381
+__380:
(*Mem)(unsafe.Pointer(pDest)).Fz = (*Mem)(unsafe.Pointer(pDest)).FzMalloc
-__379:
+__381:
;
libc.Xmemcpy(tls, (*Mem)(unsafe.Pointer(pDest)).Fz, zData, uint64(len))
- *(*int8)(unsafe.Pointer((*Mem)(unsafe.Pointer(pDest)).Fz + uintptr(len))) = int8(0)
- *(*int8)(unsafe.Pointer((*Mem)(unsafe.Pointer(pDest)).Fz + uintptr((len + 1)))) = int8(0)
+ *(*uint8)(unsafe.Pointer((*Mem)(unsafe.Pointer(pDest)).Fz + uintptr(len))) = uint8(0)
+ *(*uint8)(unsafe.Pointer((*Mem)(unsafe.Pointer(pDest)).Fz + uintptr((len + 1)))) = uint8(0)
(*Mem)(unsafe.Pointer(pDest)).Fflags = aFlag1[(*(*U32)(unsafe.Pointer(bp + 272 /* t */)) & U32(1))]
-__377:
+__379:
;
- goto __375
-__374:
+ goto __377
+__376:
(*Mem)(unsafe.Pointer(pDest)).Fenc = encoding
// This branch happens only when content is on overflow pages
if !((((int32((*Op)(unsafe.Pointer(pOp)).Fp5) & (OPFLAG_LENGTHARG | OPFLAG_TYPEOFARG)) != 0) &&
(((*(*U32)(unsafe.Pointer(bp + 272 /* t */)) >= U32(12)) && ((*(*U32)(unsafe.Pointer(bp + 272 /* t */)) & U32(1)) == U32(0))) || ((int32((*Op)(unsafe.Pointer(pOp)).Fp5) & OPFLAG_TYPEOFARG) != 0))) ||
((libc.AssignInt32(&len, int32(Xsqlite3VdbeSerialTypeLen(tls, *(*U32)(unsafe.Pointer(bp + 272 /* t */)))))) == 0)) {
- goto __381
+ goto __383
}
// Content is irrelevant for
// 1. the typeof() function,
@@ -66901,20 +68917,20 @@ __374:
// as that array is 256 bytes long (plenty for VdbeMemPrettyPrint())
// and it begins with a bunch of zeros.
Xsqlite3VdbeSerialGet(tls, uintptr(uintptr(unsafe.Pointer(&Xsqlite3CtypeMap))), *(*U32)(unsafe.Pointer(bp + 272 /* t */)), pDest)
- goto __382
-__381:
+ goto __384
+__383:
rc = Xsqlite3VdbeMemFromBtree(tls, *(*uintptr)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 200 /* pC1 */)) + 56 /* &.uc */)), *(*U32)(unsafe.Pointer(aOffset + uintptr(*(*U32)(unsafe.Pointer(bp + 208 /* p22 */)))*4)), uint32(len), pDest)
if !(rc != SQLITE_OK) {
- goto __383
+ goto __385
}
goto abort_due_to_error
-__383:
+__385:
;
Xsqlite3VdbeSerialGet(tls, (*Mem)(unsafe.Pointer(pDest)).Fz, *(*U32)(unsafe.Pointer(bp + 272 /* t */)), pDest)
*(*U16)(unsafe.Pointer(pDest + 8 /* &.flags */)) &= libc.Uint16FromInt32((libc.CplInt32(MEM_Ephem)))
-__382:
+__384:
;
-__375:
+__377:
;
op_column_out:
@@ -66924,15 +68940,15 @@ op_column_out:
op_column_corrupt:
if !((*Op)(unsafe.Pointer(aOp)).Fp3 > 0) {
- goto __384
+ goto __386
}
pOp = (aOp + uintptr(((*Op)(unsafe.Pointer(aOp)).Fp3-1))*24)
goto __8
- goto __385
-__384:
- rc = Xsqlite3CorruptError(tls, 88814)
+ goto __387
+__386:
+ rc = Xsqlite3CorruptError(tls, 89368)
goto abort_due_to_error
-__385:
+__387:
;
// Opcode: Affinity P1 P2 * P4 *
@@ -66943,19 +68959,19 @@ __385:
// P4 is a string that is P2 characters long. The N-th character of the
// string indicates the column affinity that should be used for the N-th
// memory cell in the range.
-__70: // The affinity to be applied
+__71: // The affinity to be applied
zAffinity = *(*uintptr)(unsafe.Pointer(pOp + 16 /* &.p4 */))
pIn1 = (aMem + uintptr((*Op)(unsafe.Pointer(pOp)).Fp1)*56)
-__386:
+__388:
if !(1 != 0) {
- goto __387
+ goto __389
}
- applyAffinity(tls, pIn1, *(*int8)(unsafe.Pointer(zAffinity)), encoding)
- if !((int32(*(*int8)(unsafe.Pointer(zAffinity))) == SQLITE_AFF_REAL) && ((int32((*Mem)(unsafe.Pointer(pIn1)).Fflags) & MEM_Int) != 0)) {
- goto __388
+ applyAffinity(tls, pIn1, *(*uint8)(unsafe.Pointer(zAffinity)), encoding)
+ if !((int32(*(*uint8)(unsafe.Pointer(zAffinity))) == SQLITE_AFF_REAL) && ((int32((*Mem)(unsafe.Pointer(pIn1)).Fflags) & MEM_Int) != 0)) {
+ goto __390
}
// When applying REAL affinity, if the result is still an MEM_Int
// that will fit in 6 bytes, then change the type to MEM_IntReal
@@ -66963,30 +68979,30 @@ __386:
// the type really wants to be REAL.
if !((*(*I64)(unsafe.Pointer(pIn1 /* &.u */)) <= 140737488355327) && (*(*I64)(unsafe.Pointer(pIn1 /* &.u */)) >= -140737488355328)) {
- goto __389
+ goto __391
}
*(*U16)(unsafe.Pointer(pIn1 + 8 /* &.flags */)) |= U16((MEM_IntReal))
*(*U16)(unsafe.Pointer(pIn1 + 8 /* &.flags */)) &= libc.Uint16FromInt32((libc.CplInt32(MEM_Int)))
- goto __390
-__389:
+ goto __392
+__391:
*(*float64)(unsafe.Pointer(pIn1 /* &.u */)) = float64(*(*I64)(unsafe.Pointer(pIn1 /* &.u */)))
*(*U16)(unsafe.Pointer(pIn1 + 8 /* &.flags */)) |= U16((MEM_Real))
*(*U16)(unsafe.Pointer(pIn1 + 8 /* &.flags */)) &= libc.Uint16FromInt32((libc.CplInt32(MEM_Int)))
-__390:
+__392:
;
-__388:
+__390:
;
zAffinity++
- if !(int32(*(*int8)(unsafe.Pointer(zAffinity))) == 0) {
- goto __391
+ if !(int32(*(*uint8)(unsafe.Pointer(zAffinity))) == 0) {
+ goto __393
}
- goto __387
-__391:
+ goto __389
+__393:
;
pIn1 += 56
- goto __386
-__387:
+ goto __388
+__389:
;
goto __8
@@ -67016,7 +69032,7 @@ __387:
// OPFLAG_NOCHNG_MAGIC if the OP_MakeRecord opcode is allowed to
// accept no-change records with serial_type 10. This value is
// only used inside an assert() and does not affect the end result.
-__71: // Where to write next byte of the payload
+__72: // Where to write next byte of the payload
// Assuming the record contains N fields, the record format looks
// like this:
@@ -67050,31 +69066,31 @@ __71: // Where to write next byte of the payload
// Apply the requested affinity to all inputs
if !(zAffinity1 != 0) {
- goto __392
+ goto __394
}
pRec = pData0
-__393:
- applyAffinity(tls, pRec, *(*int8)(unsafe.Pointer(zAffinity1)), encoding)
- if !((int32(*(*int8)(unsafe.Pointer(zAffinity1))) == SQLITE_AFF_REAL) && ((int32((*Mem)(unsafe.Pointer(pRec)).Fflags) & MEM_Int) != 0)) {
- goto __396
+__395:
+ applyAffinity(tls, pRec, *(*uint8)(unsafe.Pointer(zAffinity1)), encoding)
+ if !((int32(*(*uint8)(unsafe.Pointer(zAffinity1))) == SQLITE_AFF_REAL) && ((int32((*Mem)(unsafe.Pointer(pRec)).Fflags) & MEM_Int) != 0)) {
+ goto __398
}
*(*U16)(unsafe.Pointer(pRec + 8 /* &.flags */)) |= U16((MEM_IntReal))
*(*U16)(unsafe.Pointer(pRec + 8 /* &.flags */)) &= libc.Uint16FromInt32((libc.CplInt32(MEM_Int)))
-__396:
+__398:
;
zAffinity1++
pRec += 56
- goto __394
-__394:
- if *(*int8)(unsafe.Pointer(zAffinity1)) != 0 {
- goto __393
+ goto __396
+__396:
+ if *(*uint8)(unsafe.Pointer(zAffinity1)) != 0 {
+ goto __395
}
- goto __395
-__395:
+ goto __397
+__397:
;
-__392:
+__394:
;
// Loop through the elements that will make up the record to figure
@@ -67103,13 +69119,13 @@ __392:
// nData Number of bytes of data space needed for the record
// nZero Zero bytes at the end of the record
pRec = pLast
-__397:
+__399:
;
if !((int32((*Mem)(unsafe.Pointer(pRec)).Fflags) & MEM_Null) != 0) {
- goto __400
+ goto __402
}
if !((int32((*Mem)(unsafe.Pointer(pRec)).Fflags) & MEM_Zero) != 0) {
- goto __402
+ goto __404
}
// Values with MEM_Null and MEM_Zero are created by xColumn virtual
// table methods that never invoke sqlite3_result_xxxxx() while
@@ -67119,77 +69135,77 @@ __397:
// a true sqlite3_value_nochange().
(*Mem)(unsafe.Pointer(pRec)).FuTemp = U32(10)
- goto __403
-__402:
+ goto __405
+__404:
(*Mem)(unsafe.Pointer(pRec)).FuTemp = U32(0)
-__403:
+__405:
;
nHdr++
- goto __401
-__400:
+ goto __403
+__402:
if !((int32((*Mem)(unsafe.Pointer(pRec)).Fflags) & (MEM_Int | MEM_IntReal)) != 0) {
- goto __404
+ goto __406
}
// Figure out whether to use 1, 2, 4, 6 or 8 bytes.
i3 = *(*I64)(unsafe.Pointer(pRec /* &.u */))
if !(i3 < int64(0)) {
- goto __406
+ goto __408
}
uu = U64(^i3)
- goto __407
-__406:
+ goto __409
+__408:
uu = U64(i3)
-__407:
+__409:
;
nHdr++
if !(uu <= uint64(127)) {
- goto __408
+ goto __410
}
if !(((i3 & int64(1)) == i3) && (file_format >= 4)) {
- goto __410
+ goto __412
}
(*Mem)(unsafe.Pointer(pRec)).FuTemp = (U32(8) + U32(uu))
- goto __411
-__410:
+ goto __413
+__412:
nData++
(*Mem)(unsafe.Pointer(pRec)).FuTemp = U32(1)
-__411:
+__413:
;
- goto __409
-__408:
+ goto __411
+__410:
if !(uu <= uint64(32767)) {
- goto __412
+ goto __414
}
nData = nData + (uint64(2))
(*Mem)(unsafe.Pointer(pRec)).FuTemp = U32(2)
- goto __413
-__412:
+ goto __415
+__414:
if !(uu <= uint64(8388607)) {
- goto __414
+ goto __416
}
nData = nData + (uint64(3))
(*Mem)(unsafe.Pointer(pRec)).FuTemp = U32(3)
- goto __415
-__414:
+ goto __417
+__416:
if !(uu <= uint64(2147483647)) {
- goto __416
+ goto __418
}
nData = nData + (uint64(4))
(*Mem)(unsafe.Pointer(pRec)).FuTemp = U32(4)
- goto __417
-__416:
+ goto __419
+__418:
if !(uu <= uint64(140737488355327)) {
- goto __418
+ goto __420
}
nData = nData + (uint64(6))
(*Mem)(unsafe.Pointer(pRec)).FuTemp = U32(5)
- goto __419
-__418:
+ goto __421
+__420:
nData = nData + (uint64(8))
if !((int32((*Mem)(unsafe.Pointer(pRec)).Fflags) & MEM_IntReal) != 0) {
- goto __420
+ goto __422
}
// If the value is IntReal and is going to take up 8 bytes to store
// as an integer, then we might as well make it an 8-byte floating
@@ -67198,9 +69214,11 @@ __418:
*(*U16)(unsafe.Pointer(pRec + 8 /* &.flags */)) &= libc.Uint16FromInt32((libc.CplInt32(MEM_IntReal)))
*(*U16)(unsafe.Pointer(pRec + 8 /* &.flags */)) |= U16((MEM_Real))
(*Mem)(unsafe.Pointer(pRec)).FuTemp = U32(7)
- goto __421
-__420:
+ goto __423
+__422:
(*Mem)(unsafe.Pointer(pRec)).FuTemp = U32(6)
+__423:
+ ;
__421:
;
__419:
@@ -67209,68 +69227,66 @@ __417:
;
__415:
;
-__413:
- ;
-__409:
+__411:
;
- goto __405
-__404:
+ goto __407
+__406:
if !((int32((*Mem)(unsafe.Pointer(pRec)).Fflags) & MEM_Real) != 0) {
- goto __422
+ goto __424
}
nHdr++
nData = nData + (uint64(8))
(*Mem)(unsafe.Pointer(pRec)).FuTemp = U32(7)
- goto __423
-__422:
+ goto __425
+__424:
;
len1 = U32((*Mem)(unsafe.Pointer(pRec)).Fn)
serial_type = (((len1 * U32(2)) + U32(12)) + (U32(libc.Bool32((int32((*Mem)(unsafe.Pointer(pRec)).Fflags) & MEM_Str) != 0))))
if !((int32((*Mem)(unsafe.Pointer(pRec)).Fflags) & MEM_Zero) != 0) {
- goto __424
+ goto __426
}
serial_type = serial_type + (U32(*(*int32)(unsafe.Pointer(pRec /* &.u */)) * 2))
if !(nData != 0) {
- goto __425
+ goto __427
}
if !(Xsqlite3VdbeMemExpandBlob(tls, pRec) != 0) {
- goto __427
+ goto __429
}
goto no_mem
-__427:
+__429:
;
len1 = len1 + (U32(*(*int32)(unsafe.Pointer(pRec /* &.u */))))
- goto __426
-__425:
+ goto __428
+__427:
nZero = nZero + (I64(*(*int32)(unsafe.Pointer(pRec /* &.u */))))
-__426:
+__428:
;
-__424:
+__426:
;
nData = nData + (U64(len1))
nHdr = nHdr + (Xsqlite3VarintLen(tls, uint64(serial_type)))
(*Mem)(unsafe.Pointer(pRec)).FuTemp = serial_type
-__423:
+__425:
;
-__405:
+__407:
;
-__401:
+__403:
;
if !(pRec == pData0) {
- goto __428
+ goto __430
}
- goto __399
-__428:
+ goto __401
+__430:
;
pRec -= 56
- goto __398
-__398:
+ goto __400
+__400:
if 1 != 0 {
- goto __397
+ goto __399
}
- goto __399
-__399:
+ goto __401
+__401:
;
// EVIDENCE-OF: R-22564-11647 The header begins with a single varint
@@ -67279,22 +69295,22 @@ __399:
// itself.
if !(nHdr <= 126) {
- goto __429
+ goto __431
}
// The common case
nHdr = nHdr + (1)
- goto __430
-__429:
+ goto __432
+__431:
// Rare case of a really large header
nVarint = Xsqlite3VarintLen(tls, uint64(nHdr))
nHdr = nHdr + (nVarint)
if !(nVarint < Xsqlite3VarintLen(tls, uint64(nHdr))) {
- goto __431
+ goto __433
}
nHdr++
-__431:
+__433:
;
-__430:
+__432:
;
nByte1 = (I64(U64(nHdr) + nData))
@@ -67303,37 +69319,37 @@ __430:
// be one of the input registers (because the following call to
// sqlite3VdbeMemClearAndResize() could clobber the value before it is used).
if !((nByte1 + nZero) <= I64((*Mem)(unsafe.Pointer(pOut)).FszMalloc)) {
- goto __432
+ goto __434
}
// The output register is already large enough to hold the record.
// No error checks or buffer enlargement is required
(*Mem)(unsafe.Pointer(pOut)).Fz = (*Mem)(unsafe.Pointer(pOut)).FzMalloc
- goto __433
-__432:
+ goto __435
+__434:
// Need to make sure that the output is not too big and then enlarge
// the output register to hold the full result
if !((nByte1 + nZero) > I64(*(*int32)(unsafe.Pointer((db + 128 /* &.aLimit */))))) {
- goto __434
+ goto __436
}
goto too_big
-__434:
+__436:
;
if !(Xsqlite3VdbeMemClearAndResize(tls, pOut, int32(nByte1)) != 0) {
- goto __435
+ goto __437
}
goto no_mem
-__435:
+__437:
;
-__433:
+__435:
;
(*Mem)(unsafe.Pointer(pOut)).Fn = int32(nByte1)
(*Mem)(unsafe.Pointer(pOut)).Fflags = U16(MEM_Blob)
if !(nZero != 0) {
- goto __436
+ goto __438
}
*(*int32)(unsafe.Pointer(pOut /* &.u */)) = int32(nZero)
*(*U16)(unsafe.Pointer(pOut + 8 /* &.flags */)) |= U16((MEM_Zero))
-__436:
+__438:
;
zHdr1 = (*Mem)(unsafe.Pointer(pOut)).Fz
@@ -67348,7 +69364,7 @@ __436:
}())
pRec = pData0
-__437:
+__439:
serial_type = (*Mem)(unsafe.Pointer(pRec)).FuTemp
// EVIDENCE-OF: R-06529-47362 Following the size varint are one or more
// additional varints, one per column.
@@ -67361,13 +69377,13 @@ __437:
// EVIDENCE-OF: R-64536-51728 The values for each column in the record
// immediately follow the header.
zPayload += uintptr(Xsqlite3VdbeSerialPut(tls, zPayload, pRec, serial_type)) // content
- goto __438
-__438:
+ goto __440
+__440:
if (libc.PreIncUintptr(&pRec, 56)) <= pLast {
- goto __437
+ goto __439
}
- goto __439
-__439:
+ goto __441
+__441:
;
goto __8
@@ -67381,25 +69397,25 @@ __439:
// If P3==0, then an exact count is obtained, which involves visiting
// every btree page of the table. But if P3 is non-zero, an estimate
// is returned based on the current cursor position.
-__72:
+__73:
;
pCrsr1 = *(*uintptr)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer((*Vdbe)(unsafe.Pointer(p)).FapCsr + uintptr((*Op)(unsafe.Pointer(pOp)).Fp1)*8)) + 56 /* &.uc */))
if !((*Op)(unsafe.Pointer(pOp)).Fp3 != 0) {
- goto __440
+ goto __442
}
*(*I64)(unsafe.Pointer(bp + 280 /* nEntry */)) = Xsqlite3BtreeRowCountEst(tls, pCrsr1)
- goto __441
-__440:
+ goto __443
+__442:
*(*I64)(unsafe.Pointer(bp + 280 /* nEntry */)) = int64(0) // Not needed. Only used to silence a warning.
rc = Xsqlite3BtreeCount(tls, db, pCrsr1, bp+280 /* &nEntry */)
if !(rc != 0) {
- goto __442
+ goto __444
}
goto abort_due_to_error
-__442:
+__444:
;
-__441:
+__443:
;
pOut = out2Prerelease(tls, p, pOp)
*(*I64)(unsafe.Pointer(pOut /* &.u */)) = *(*I64)(unsafe.Pointer(bp + 280 /* nEntry */))
@@ -67411,7 +69427,7 @@ __441:
// on the value of P1. To open a new savepoint set P1==0 (SAVEPOINT_BEGIN).
// To release (commit) an existing savepoint set P1==1 (SAVEPOINT_RELEASE).
// To rollback an existing savepoint set P1==2 (SAVEPOINT_ROLLBACK).
-__73:
+__74:
p12 = (*Op)(unsafe.Pointer(pOp)).Fp1
zName = *(*uintptr)(unsafe.Pointer(pOp + 16 /* &.p4 */))
@@ -67420,17 +69436,17 @@ __73:
// transaction, then there cannot be any savepoints.
if !(p12 == SAVEPOINT_BEGIN) {
- goto __443
+ goto __445
}
if !((*Sqlite3)(unsafe.Pointer(db)).FnVdbeWrite > 0) {
- goto __445
+ goto __447
}
// A new savepoint cannot be created if there are active write
// statements (i.e. open read/write incremental blob handles).
- Xsqlite3VdbeError(tls, p, ts+4466 /* "cannot open save..." */, 0)
+ Xsqlite3VdbeError(tls, p, ts+4597 /* "cannot open save..." */, 0)
rc = SQLITE_BUSY
- goto __446
-__445:
+ goto __448
+__447:
nName = Xsqlite3Strlen30(tls, zName)
// This call is Ok even if this savepoint is actually a transaction
@@ -67441,16 +69457,16 @@ __445:
rc = Xsqlite3VtabSavepoint(tls, db, SAVEPOINT_BEGIN,
((*Sqlite3)(unsafe.Pointer(db)).FnStatement + (*Sqlite3)(unsafe.Pointer(db)).FnSavepoint))
if !(rc != SQLITE_OK) {
- goto __447
+ goto __449
}
goto abort_due_to_error
-__447:
+__449:
;
// Create a new savepoint structure.
pNew = Xsqlite3DbMallocRawNN(tls, db, (uint64((uint64(unsafe.Sizeof(Savepoint{})) + uint64(nName)) + uint64(1))))
if !(pNew != 0) {
- goto __448
+ goto __450
}
(*Savepoint)(unsafe.Pointer(pNew)).FzName = (pNew + 1*32)
libc.Xmemcpy(tls, (*Savepoint)(unsafe.Pointer(pNew)).FzName, zName, (uint64(nName + 1)))
@@ -67458,14 +69474,14 @@ __447:
// If there is no open transaction, then mark this as a special
// "transaction savepoint".
if !((*Sqlite3)(unsafe.Pointer(db)).FautoCommit != 0) {
- goto __449
+ goto __451
}
(*Sqlite3)(unsafe.Pointer(db)).FautoCommit = U8(0)
(*Sqlite3)(unsafe.Pointer(db)).FisTransactionSavepoint = U8(1)
- goto __450
-__449:
+ goto __452
+__451:
(*Sqlite3)(unsafe.Pointer(db)).FnSavepoint++
-__450:
+__452:
;
// Link the new savepoint into the database handle's list.
@@ -67473,163 +69489,163 @@ __450:
(*Sqlite3)(unsafe.Pointer(db)).FpSavepoint = pNew
(*Savepoint)(unsafe.Pointer(pNew)).FnDeferredCons = (*Sqlite3)(unsafe.Pointer(db)).FnDeferredCons
(*Savepoint)(unsafe.Pointer(pNew)).FnDeferredImmCons = (*Sqlite3)(unsafe.Pointer(db)).FnDeferredImmCons
-__448:
+__450:
;
-__446:
+__448:
;
- goto __444
-__443:
+ goto __446
+__445:
;
iSavepoint = 0
// Find the named savepoint. If there is no such savepoint, then an
// an error is returned to the user.
pSavepoint = (*Sqlite3)(unsafe.Pointer(db)).FpSavepoint
-__451:
+__453:
if !((pSavepoint != 0) && (Xsqlite3StrICmp(tls, (*Savepoint)(unsafe.Pointer(pSavepoint)).FzName, zName) != 0)) {
- goto __453
+ goto __455
}
iSavepoint++
- goto __452
-__452:
+ goto __454
+__454:
pSavepoint = (*Savepoint)(unsafe.Pointer(pSavepoint)).FpNext
- goto __451
goto __453
-__453:
+ goto __455
+__455:
;
if !(!(pSavepoint != 0)) {
- goto __454
+ goto __456
}
- Xsqlite3VdbeError(tls, p, ts+4517 /* "no such savepoin..." */, libc.VaList(bp+56, zName))
+ Xsqlite3VdbeError(tls, p, ts+4648 /* "no such savepoin..." */, libc.VaList(bp+56, zName))
rc = SQLITE_ERROR
- goto __455
-__454:
+ goto __457
+__456:
if !(((*Sqlite3)(unsafe.Pointer(db)).FnVdbeWrite > 0) && (p12 == SAVEPOINT_RELEASE)) {
- goto __456
+ goto __458
}
// It is not possible to release (commit) a savepoint if there are
// active write statements.
Xsqlite3VdbeError(tls, p,
- ts+4539 /* "cannot release s..." */, 0)
+ ts+4670 /* "cannot release s..." */, 0)
rc = SQLITE_BUSY
- goto __457
-__456:
+ goto __459
+__458:
// Determine whether or not this is a transaction savepoint. If so,
// and this is a RELEASE command, then the current transaction
// is committed.
isTransaction = (libc.Bool32(((*Savepoint)(unsafe.Pointer(pSavepoint)).FpNext == uintptr(0)) && ((*Sqlite3)(unsafe.Pointer(db)).FisTransactionSavepoint != 0)))
if !((isTransaction != 0) && (p12 == SAVEPOINT_RELEASE)) {
- goto __458
+ goto __460
}
if !((libc.AssignInt32(&rc, Xsqlite3VdbeCheckFk(tls, p, 1))) != SQLITE_OK) {
- goto __460
+ goto __462
}
goto vdbe_return
-__460:
+__462:
;
(*Sqlite3)(unsafe.Pointer(db)).FautoCommit = U8(1)
if !(Xsqlite3VdbeHalt(tls, p) == SQLITE_BUSY) {
- goto __461
+ goto __463
}
(*Vdbe)(unsafe.Pointer(p)).Fpc = (int32((int64(pOp) - int64(aOp)) / 24))
(*Sqlite3)(unsafe.Pointer(db)).FautoCommit = U8(0)
(*Vdbe)(unsafe.Pointer(p)).Frc = libc.AssignInt32(&rc, SQLITE_BUSY)
goto vdbe_return
-__461:
+__463:
;
rc = (*Vdbe)(unsafe.Pointer(p)).Frc
if !(rc != 0) {
- goto __462
+ goto __464
}
(*Sqlite3)(unsafe.Pointer(db)).FautoCommit = U8(0)
- goto __463
-__462:
+ goto __465
+__464:
(*Sqlite3)(unsafe.Pointer(db)).FisTransactionSavepoint = U8(0)
-__463:
+__465:
;
- goto __459
-__458:
+ goto __461
+__460:
iSavepoint = (((*Sqlite3)(unsafe.Pointer(db)).FnSavepoint - iSavepoint) - 1)
if !(p12 == SAVEPOINT_ROLLBACK) {
- goto __464
+ goto __466
}
isSchemaChange = (libc.Bool32(((*Sqlite3)(unsafe.Pointer(db)).FmDbFlags & U32(DBFLAG_SchemaChange)) != U32(0)))
ii = 0
-__466:
+__468:
if !(ii < (*Sqlite3)(unsafe.Pointer(db)).FnDb) {
- goto __468
+ goto __470
}
rc = Xsqlite3BtreeTripAllCursors(tls, (*Db)(unsafe.Pointer((*Sqlite3)(unsafe.Pointer(db)).FaDb+uintptr(ii)*32)).FpBt,
(SQLITE_ABORT | (int32(2) << 8)),
(libc.Bool32(isSchemaChange == 0)))
if !(rc != SQLITE_OK) {
- goto __469
+ goto __471
}
goto abort_due_to_error
-__469:
+__471:
;
- goto __467
-__467:
+ goto __469
+__469:
ii++
- goto __466
goto __468
-__468:
+ goto __470
+__470:
;
- goto __465
-__464:
+ goto __467
+__466:
;
isSchemaChange = 0
-__465:
+__467:
;
ii = 0
-__470:
+__472:
if !(ii < (*Sqlite3)(unsafe.Pointer(db)).FnDb) {
- goto __472
+ goto __474
}
rc = Xsqlite3BtreeSavepoint(tls, (*Db)(unsafe.Pointer((*Sqlite3)(unsafe.Pointer(db)).FaDb+uintptr(ii)*32)).FpBt, p12, iSavepoint)
if !(rc != SQLITE_OK) {
- goto __473
+ goto __475
}
goto abort_due_to_error
-__473:
+__475:
;
- goto __471
-__471:
+ goto __473
+__473:
ii++
- goto __470
goto __472
-__472:
+ goto __474
+__474:
;
if !(isSchemaChange != 0) {
- goto __474
+ goto __476
}
Xsqlite3ExpirePreparedStatements(tls, db, 0)
Xsqlite3ResetAllSchemasOfConnection(tls, db)
*(*U32)(unsafe.Pointer(db + 44 /* &.mDbFlags */)) |= (U32(DBFLAG_SchemaChange))
-__474:
+__476:
;
-__459:
+__461:
;
if !(rc != 0) {
- goto __475
+ goto __477
}
goto abort_due_to_error
-__475:
+__477:
;
// Regardless of whether this is a RELEASE or ROLLBACK, destroy all
// savepoints nested inside of the savepoint being operated on.
-__476:
+__478:
if !((*Sqlite3)(unsafe.Pointer(db)).FpSavepoint != pSavepoint) {
- goto __477
+ goto __479
}
pTmp = (*Sqlite3)(unsafe.Pointer(db)).FpSavepoint
(*Sqlite3)(unsafe.Pointer(db)).FpSavepoint = (*Savepoint)(unsafe.Pointer(pTmp)).FpNext
Xsqlite3DbFree(tls, db, pTmp)
(*Sqlite3)(unsafe.Pointer(db)).FnSavepoint--
- goto __476
-__477:
+ goto __478
+__479:
;
// If it is a RELEASE, then destroy the savepoint being operated on
@@ -67637,48 +69653,48 @@ __477:
// constraint violations present in the database to the value stored
// when the savepoint was created.
if !(p12 == SAVEPOINT_RELEASE) {
- goto __478
+ goto __480
}
(*Sqlite3)(unsafe.Pointer(db)).FpSavepoint = (*Savepoint)(unsafe.Pointer(pSavepoint)).FpNext
Xsqlite3DbFree(tls, db, pSavepoint)
if !(!(isTransaction != 0)) {
- goto __480
+ goto __482
}
(*Sqlite3)(unsafe.Pointer(db)).FnSavepoint--
-__480:
+__482:
;
- goto __479
-__478:
+ goto __481
+__480:
;
(*Sqlite3)(unsafe.Pointer(db)).FnDeferredCons = (*Savepoint)(unsafe.Pointer(pSavepoint)).FnDeferredCons
(*Sqlite3)(unsafe.Pointer(db)).FnDeferredImmCons = (*Savepoint)(unsafe.Pointer(pSavepoint)).FnDeferredImmCons
-__479:
+__481:
;
if !(!(isTransaction != 0) || (p12 == SAVEPOINT_ROLLBACK)) {
- goto __481
+ goto __483
}
rc = Xsqlite3VtabSavepoint(tls, db, p12, iSavepoint)
if !(rc != SQLITE_OK) {
- goto __482
+ goto __484
}
goto abort_due_to_error
-__482:
+__484:
;
-__481:
+__483:
;
-__457:
+__459:
;
-__455:
+__457:
;
-__444:
+__446:
;
if !(rc != 0) {
- goto __483
+ goto __485
}
goto abort_due_to_error
-__483:
+__485:
;
goto __8
@@ -67691,7 +69707,7 @@ __483:
// there are active writing VMs or active VMs that use shared cache.
//
// This instruction causes the VM to halt.
-__74:
+__75:
desiredAutoCommit = (*Op)(unsafe.Pointer(pOp)).Fp1
iRollback = (*Op)(unsafe.Pointer(pOp)).Fp2
@@ -67699,78 +69715,78 @@ __74:
// At least this one VM is active
if !(desiredAutoCommit != int32((*Sqlite3)(unsafe.Pointer(db)).FautoCommit)) {
- goto __484
+ goto __486
}
if !(iRollback != 0) {
- goto __486
+ goto __488
}
Xsqlite3RollbackAll(tls, db, (SQLITE_ABORT | (int32(2) << 8)))
(*Sqlite3)(unsafe.Pointer(db)).FautoCommit = U8(1)
- goto __487
-__486:
+ goto __489
+__488:
if !((desiredAutoCommit != 0) && ((*Sqlite3)(unsafe.Pointer(db)).FnVdbeWrite > 0)) {
- goto __488
+ goto __490
}
// If this instruction implements a COMMIT and other VMs are writing
// return an error indicating that the other VMs must complete first.
Xsqlite3VdbeError(tls, p,
- ts+4593 /* "cannot commit tr..." */, 0)
+ ts+4724 /* "cannot commit tr..." */, 0)
rc = SQLITE_BUSY
goto abort_due_to_error
- goto __489
-__488:
+ goto __491
+__490:
if !((libc.AssignInt32(&rc, Xsqlite3VdbeCheckFk(tls, p, 1))) != SQLITE_OK) {
- goto __490
+ goto __492
}
goto vdbe_return
- goto __491
-__490:
+ goto __493
+__492:
(*Sqlite3)(unsafe.Pointer(db)).FautoCommit = U8(desiredAutoCommit)
+__493:
+ ;
__491:
;
__489:
;
-__487:
- ;
if !(Xsqlite3VdbeHalt(tls, p) == SQLITE_BUSY) {
- goto __492
+ goto __494
}
(*Vdbe)(unsafe.Pointer(p)).Fpc = (int32((int64(pOp) - int64(aOp)) / 24))
(*Sqlite3)(unsafe.Pointer(db)).FautoCommit = (U8(1 - desiredAutoCommit))
(*Vdbe)(unsafe.Pointer(p)).Frc = libc.AssignInt32(&rc, SQLITE_BUSY)
goto vdbe_return
-__492:
+__494:
;
Xsqlite3CloseSavepoints(tls, db)
if !((*Vdbe)(unsafe.Pointer(p)).Frc == SQLITE_OK) {
- goto __493
+ goto __495
}
rc = SQLITE_DONE
- goto __494
-__493:
+ goto __496
+__495:
rc = SQLITE_ERROR
-__494:
+__496:
;
goto vdbe_return
- goto __485
-__484:
+ goto __487
+__486:
Xsqlite3VdbeError(tls, p,
func() uintptr {
if !(desiredAutoCommit != 0) {
- return ts + 4648 /* "cannot start a t..." */
+ return ts + 4779 /* "cannot start a t..." */
}
return func() uintptr {
if iRollback != 0 {
- return ts + 4696 /* "cannot rollback ..." */
+ return ts + 4827 /* "cannot rollback ..." */
}
- return ts + 4739 /* "cannot commit - ..." */
+ return ts + 4870 /* "cannot commit - ..." */
}()
}(), 0)
rc = SQLITE_ERROR
goto abort_due_to_error
-__485:
+__487:
;
/*NOTREACHED*/
@@ -67808,59 +69824,59 @@ __485:
// generation counter, then an SQLITE_SCHEMA error is raised and execution
// halts. The sqlite3_step() wrapper function might then reprepare the
// statement and rerun it from the beginning.
-__75:
+__76:
*(*int32)(unsafe.Pointer(bp + 288 /* iMeta */)) = 0
if !(((*Op)(unsafe.Pointer(pOp)).Fp2 != 0) && (((*Sqlite3)(unsafe.Pointer(db)).Fflags & uint64(SQLITE_QueryOnly)) != uint64(0))) {
- goto __495
+ goto __497
}
rc = SQLITE_READONLY
goto abort_due_to_error
-__495:
+__497:
;
pBt = (*Db)(unsafe.Pointer((*Sqlite3)(unsafe.Pointer(db)).FaDb + uintptr((*Op)(unsafe.Pointer(pOp)).Fp1)*32)).FpBt
if !(pBt != 0) {
- goto __496
+ goto __498
}
rc = Xsqlite3BtreeBeginTrans(tls, pBt, (*Op)(unsafe.Pointer(pOp)).Fp2, bp+288 /* &iMeta */)
if !(rc != SQLITE_OK) {
- goto __497
+ goto __499
}
if !((rc & 0xff) == SQLITE_BUSY) {
- goto __498
+ goto __500
}
(*Vdbe)(unsafe.Pointer(p)).Fpc = (int32((int64(pOp) - int64(aOp)) / 24))
(*Vdbe)(unsafe.Pointer(p)).Frc = rc
goto vdbe_return
-__498:
+__500:
;
goto abort_due_to_error
-__497:
+__499:
;
- if !((((Bft(int32(*(*uint16)(unsafe.Pointer(p + 200 /* &.usesStmtJournal */)) >> 9 & 0x1))) != 0) &&
+ if !((((Bft(int32(*(*uint16)(unsafe.Pointer(p + 200 /* &.usesStmtJournal */)) & 0x200 >> 9))) != 0) &&
((*Op)(unsafe.Pointer(pOp)).Fp2 != 0)) &&
((int32((*Sqlite3)(unsafe.Pointer(db)).FautoCommit) == 0) || ((*Sqlite3)(unsafe.Pointer(db)).FnVdbeRead > 1))) {
- goto __499
+ goto __501
}
if !((*Vdbe)(unsafe.Pointer(p)).FiStatement == 0) {
- goto __500
+ goto __502
}
(*Sqlite3)(unsafe.Pointer(db)).FnStatement++
(*Vdbe)(unsafe.Pointer(p)).FiStatement = ((*Sqlite3)(unsafe.Pointer(db)).FnSavepoint + (*Sqlite3)(unsafe.Pointer(db)).FnStatement)
-__500:
+__502:
;
rc = Xsqlite3VtabSavepoint(tls, db, SAVEPOINT_BEGIN, ((*Vdbe)(unsafe.Pointer(p)).FiStatement - 1))
if !(rc == SQLITE_OK) {
- goto __501
+ goto __503
}
rc = Xsqlite3BtreeBeginStmt(tls, pBt, (*Vdbe)(unsafe.Pointer(p)).FiStatement)
-__501:
+__503:
;
// Store the current value of the database handles deferred constraint
@@ -67868,21 +69884,21 @@ __501:
// the value of this counter needs to be restored too.
(*Vdbe)(unsafe.Pointer(p)).FnStmtDefCons = (*Sqlite3)(unsafe.Pointer(db)).FnDeferredCons
(*Vdbe)(unsafe.Pointer(p)).FnStmtDefImmCons = (*Sqlite3)(unsafe.Pointer(db)).FnDeferredImmCons
-__499:
+__501:
;
-__496:
+__498:
;
if !(((*Op)(unsafe.Pointer(pOp)).Fp5 != 0) &&
((*(*int32)(unsafe.Pointer(bp + 288 /* iMeta */)) != (*Op)(unsafe.Pointer(pOp)).Fp3) ||
((*Schema)(unsafe.Pointer((*Db)(unsafe.Pointer((*Sqlite3)(unsafe.Pointer(db)).FaDb+uintptr((*Op)(unsafe.Pointer(pOp)).Fp1)*32)).FpSchema)).FiGeneration != *(*int32)(unsafe.Pointer(pOp + 16 /* &.p4 */))))) {
- goto __502
+ goto __504
}
// IMPLEMENTATION-OF: R-03189-51135 As each SQL statement runs, the schema
// version is checked to ensure that the schema has not changed since the
// SQL statement was prepared.
Xsqlite3DbFree(tls, db, (*Vdbe)(unsafe.Pointer(p)).FzErrMsg)
- (*Vdbe)(unsafe.Pointer(p)).FzErrMsg = Xsqlite3DbStrDup(tls, db, ts+4780 /* "database schema ..." */)
+ (*Vdbe)(unsafe.Pointer(p)).FzErrMsg = Xsqlite3DbStrDup(tls, db, ts+4911 /* "database schema ..." */)
// 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.
@@ -67896,20 +69912,20 @@ __496:
// to be invalidated whenever sqlite3_step() is called from within
// a v-table method.
if !((*Schema)(unsafe.Pointer((*Db)(unsafe.Pointer((*Sqlite3)(unsafe.Pointer(db)).FaDb+uintptr((*Op)(unsafe.Pointer(pOp)).Fp1)*32)).FpSchema)).Fschema_cookie != *(*int32)(unsafe.Pointer(bp + 288 /* iMeta */))) {
- goto __503
+ goto __505
}
Xsqlite3ResetOneSchema(tls, db, (*Op)(unsafe.Pointer(pOp)).Fp1)
-__503:
+__505:
;
- libc.SetBitFieldPtr16Uint32(p+200 /* &.expired */, Bft(1), 0, 0x3)
+ libc.SetBitFieldPtr16Uint32(p+200 /* &.expired */, Bft(1), 14, 0xc000)
rc = SQLITE_SCHEMA
-__502:
+__504:
;
if !(rc != 0) {
- goto __504
+ goto __506
}
goto abort_due_to_error
-__504:
+__506:
;
goto __8
@@ -67924,7 +69940,7 @@ __504:
// There must be a read-lock on the database (either a transaction
// must be started or there must be an open cursor) before
// executing this instruction.
-__76:
+__77:
;
iDb = (*Op)(unsafe.Pointer(pOp)).Fp1
iCookie = (*Op)(unsafe.Pointer(pOp)).Fp3
@@ -67948,7 +69964,7 @@ __76:
// schema version is set to P3-P5. The "PRAGMA schema_version=N" statement
// has P5 set to 1, so that the internal schema version will be different
// from the database schema version, resulting in a schema reset.
-__77:
+__78:
;
pDb = ((*Sqlite3)(unsafe.Pointer(db)).FaDb + uintptr((*Op)(unsafe.Pointer(pOp)).Fp1)*32)
@@ -67956,36 +69972,36 @@ __77:
// See note about index shifting on OP_ReadCookie
rc = Xsqlite3BtreeUpdateMeta(tls, (*Db)(unsafe.Pointer(pDb)).FpBt, (*Op)(unsafe.Pointer(pOp)).Fp2, uint32((*Op)(unsafe.Pointer(pOp)).Fp3))
if !((*Op)(unsafe.Pointer(pOp)).Fp2 == BTREE_SCHEMA_VERSION) {
- goto __505
+ goto __507
}
// When the schema cookie changes, record the new cookie internally
(*Schema)(unsafe.Pointer((*Db)(unsafe.Pointer(pDb)).FpSchema)).Fschema_cookie = ((*Op)(unsafe.Pointer(pOp)).Fp3 - int32((*Op)(unsafe.Pointer(pOp)).Fp5))
*(*U32)(unsafe.Pointer(db + 44 /* &.mDbFlags */)) |= (U32(DBFLAG_SchemaChange))
- goto __506
-__505:
+ goto __508
+__507:
if !((*Op)(unsafe.Pointer(pOp)).Fp2 == BTREE_FILE_FORMAT) {
- goto __507
+ goto __509
}
// Record changes in the file format
(*Schema)(unsafe.Pointer((*Db)(unsafe.Pointer(pDb)).FpSchema)).Ffile_format = U8((*Op)(unsafe.Pointer(pOp)).Fp3)
-__507:
+__509:
;
-__506:
+__508:
;
if !((*Op)(unsafe.Pointer(pOp)).Fp1 == 1) {
- goto __508
+ goto __510
}
// Invalidate all prepared statements whenever the TEMP database
// schema is changed. Ticket #1644
Xsqlite3ExpirePreparedStatements(tls, db, 0)
- libc.SetBitFieldPtr16Uint32(p+200 /* &.expired */, Bft(0), 0, 0x3)
-__508:
+ libc.SetBitFieldPtr16Uint32(p+200 /* &.expired */, Bft(0), 14, 0xc000)
+__510:
;
if !(rc != 0) {
- goto __509
+ goto __511
}
goto abort_due_to_error
-__509:
+__511:
;
goto __8
@@ -68070,29 +70086,29 @@ __509:
// in read/write mode.
//
// See also: OP_OpenRead, OP_ReopenIdx
-__78:
+__79:
;
pCur = *(*uintptr)(unsafe.Pointer((*Vdbe)(unsafe.Pointer(p)).FapCsr + uintptr((*Op)(unsafe.Pointer(pOp)).Fp1)*8))
if !((pCur != 0) && ((*VdbeCursor)(unsafe.Pointer(pCur)).FpgnoRoot == U32((*Op)(unsafe.Pointer(pOp)).Fp2))) {
- goto __510
+ goto __512
}
// Guaranteed by the code generator
goto open_cursor_set_hints
-__510:
+__512:
;
// If the cursor is not currently open or is open on a different
// index, then fall through into OP_OpenRead to force a reopen
-__79:
__80:
+__81:
;
- if !((int32(*(*uint16)(unsafe.Pointer(p + 200 /* &.expired */)) >> 14 & 0x3)) == 1) {
- goto __511
+ if !((int32(*(*uint16)(unsafe.Pointer(p + 200 /* &.expired */)) & 0xc000 >> 14)) == 1) {
+ goto __513
}
rc = (SQLITE_ABORT | (int32(2) << 8))
goto abort_due_to_error
-__511:
+__513:
;
nField1 = 0
@@ -68104,24 +70120,24 @@ __511:
pX = (*Db)(unsafe.Pointer(pDb1)).FpBt
if !(int32((*Op)(unsafe.Pointer(pOp)).Fopcode) == OP_OpenWrite) {
- goto __512
+ goto __514
}
wrFlag = (BTREE_WRCSR | (int32((*Op)(unsafe.Pointer(pOp)).Fp5) & OPFLAG_FORDELETE))
if !(int32((*Schema)(unsafe.Pointer((*Db)(unsafe.Pointer(pDb1)).FpSchema)).Ffile_format) < int32((*Vdbe)(unsafe.Pointer(p)).FminWriteFileFormat)) {
- goto __514
+ goto __516
}
(*Vdbe)(unsafe.Pointer(p)).FminWriteFileFormat = (*Schema)(unsafe.Pointer((*Db)(unsafe.Pointer(pDb1)).FpSchema)).Ffile_format
-__514:
+__516:
;
- goto __513
-__512:
+ goto __515
+__514:
wrFlag = 0
-__513:
+__515:
;
if !((int32((*Op)(unsafe.Pointer(pOp)).Fp5) & OPFLAG_P2ISREG) != 0) {
- goto __515
+ goto __517
}
pIn2 = (aMem + uintptr(p23)*56)
@@ -68133,35 +70149,35 @@ __513:
// If there were a failure, the prepared statement would have halted
// before reaching this instruction.
-__515:
+__517:
;
if !(int32((*Op)(unsafe.Pointer(pOp)).Fp4type) == (-9)) {
- goto __516
+ goto __518
}
pKeyInfo1 = *(*uintptr)(unsafe.Pointer(pOp + 16 /* &.p4 */))
nField1 = int32((*KeyInfo)(unsafe.Pointer(pKeyInfo1)).FnAllField)
- goto __517
-__516:
+ goto __519
+__518:
if !(int32((*Op)(unsafe.Pointer(pOp)).Fp4type) == (-3)) {
- goto __518
+ goto __520
}
nField1 = *(*int32)(unsafe.Pointer(pOp + 16 /* &.p4 */))
-__518:
+__520:
;
-__517:
+__519:
;
// Table with INTEGER PRIMARY KEY and nothing else
pCur = allocateCursor(tls, p, (*Op)(unsafe.Pointer(pOp)).Fp1, nField1, iDb1, uint8(CURTYPE_BTREE))
if !(pCur == uintptr(0)) {
- goto __519
+ goto __521
}
goto no_mem
-__519:
+__521:
;
(*VdbeCursor)(unsafe.Pointer(pCur)).FnullRow = U8(1)
- libc.SetBitFieldPtr8Uint32(pCur+8 /* &.isOrdered */, Bool(1), 2, 0x4)
+ libc.SetBitFieldPtr8Uint32(pCur+8 /* &.isOrdered */, Bool(1), 5, 0x20)
(*VdbeCursor)(unsafe.Pointer(pCur)).FpgnoRoot = p23
rc = Xsqlite3BtreeCursor(tls, pX, p23, wrFlag, pKeyInfo1, *(*uintptr)(unsafe.Pointer(pCur + 56 /* &.uc */)))
(*VdbeCursor)(unsafe.Pointer(pCur)).FpKeyInfo = pKeyInfo1
@@ -68177,10 +70193,10 @@ open_cursor_set_hints:
Xsqlite3BtreeCursorHintFlags(tls, *(*uintptr)(unsafe.Pointer(pCur + 56 /* &.uc */)),
(uint32(int32((*Op)(unsafe.Pointer(pOp)).Fp5) & (OPFLAG_BULKCSR | OPFLAG_SEEKEQ))))
if !(rc != 0) {
- goto __520
+ goto __522
}
goto abort_due_to_error
-__520:
+__522:
;
goto __8
@@ -68191,7 +70207,7 @@ __520:
// opcode. Only ephemeral cursors may be duplicated.
//
// Duplicate ephemeral cursors are used for self-joins of materialized views.
-__81: // The new cursor
+__82: // The new cursor
pOrig = *(*uintptr)(unsafe.Pointer((*Vdbe)(unsafe.Pointer(p)).FapCsr + uintptr((*Op)(unsafe.Pointer(pOp)).Fp2)*8))
@@ -68199,20 +70215,20 @@ __81: // The new cursor
pCx = allocateCursor(tls, p, (*Op)(unsafe.Pointer(pOp)).Fp1, int32((*VdbeCursor)(unsafe.Pointer(pOrig)).FnField), -1, uint8(CURTYPE_BTREE))
if !(pCx == uintptr(0)) {
- goto __521
+ goto __523
}
goto no_mem
-__521:
+__523:
;
(*VdbeCursor)(unsafe.Pointer(pCx)).FnullRow = U8(1)
- libc.SetBitFieldPtr8Uint32(pCx+8 /* &.isEphemeral */, Bool(1), 0, 0x1)
+ libc.SetBitFieldPtr8Uint32(pCx+8 /* &.isEphemeral */, Bool(1), 7, 0x80)
(*VdbeCursor)(unsafe.Pointer(pCx)).FpKeyInfo = (*VdbeCursor)(unsafe.Pointer(pOrig)).FpKeyInfo
(*VdbeCursor)(unsafe.Pointer(pCx)).FisTable = (*VdbeCursor)(unsafe.Pointer(pOrig)).FisTable
(*VdbeCursor)(unsafe.Pointer(pCx)).FpgnoRoot = (*VdbeCursor)(unsafe.Pointer(pOrig)).FpgnoRoot
- libc.SetBitFieldPtr8Uint32(pCx+8 /* &.isOrdered */, (Bool(int32(*(*uint8)(unsafe.Pointer(pOrig + 8 /* &.isOrdered */)) >> 5 & 0x1))), 2, 0x4)
+ libc.SetBitFieldPtr8Uint32(pCx+8 /* &.isOrdered */, (Bool(int32(*(*uint8)(unsafe.Pointer(pOrig + 8 /* &.isOrdered */)) & 0x20 >> 5))), 5, 0x20)
(*VdbeCursor)(unsafe.Pointer(pCx)).FpBtx = (*VdbeCursor)(unsafe.Pointer(pOrig)).FpBtx
- libc.SetBitFieldPtr8Uint32(pCx+8 /* &.hasBeenDuped */, Bool(1), 3, 0x8)
- libc.SetBitFieldPtr8Uint32(pOrig+8 /* &.hasBeenDuped */, Bool(1), 3, 0x8)
+ libc.SetBitFieldPtr8Uint32(pCx+8 /* &.hasBeenDuped */, Bool(1), 4, 0x10)
+ libc.SetBitFieldPtr8Uint32(pOrig+8 /* &.hasBeenDuped */, Bool(1), 4, 0x10)
rc = Xsqlite3BtreeCursor(tls, (*VdbeCursor)(unsafe.Pointer(pCx)).FpBtx, (*VdbeCursor)(unsafe.Pointer(pCx)).FpgnoRoot, BTREE_WRCSR,
(*VdbeCursor)(unsafe.Pointer(pCx)).FpKeyInfo, *(*uintptr)(unsafe.Pointer(pCx + 56 /* &.uc */)))
// The sqlite3BtreeCursor() routine can only fail for the first cursor
@@ -68252,24 +70268,24 @@ __521:
// different name to distinguish its use. Tables created using
// by this opcode will be used for automatically created transient
// indices in joins.
-__82:
__83:
+__84:
;
if !((*Op)(unsafe.Pointer(pOp)).Fp3 > 0) {
- goto __522
+ goto __524
}
// Make register reg[P3] into a value that can be used as the data
// form sqlite3BtreeInsert() where the length of the data is zero.
// Only used when number of columns is zero
(*Mem)(unsafe.Pointer(aMem + uintptr((*Op)(unsafe.Pointer(pOp)).Fp3)*56)).Fn = 0
- (*Mem)(unsafe.Pointer(aMem + uintptr((*Op)(unsafe.Pointer(pOp)).Fp3)*56)).Fz = ts + 703 /* "" */
-__522:
+ (*Mem)(unsafe.Pointer(aMem + uintptr((*Op)(unsafe.Pointer(pOp)).Fp3)*56)).Fz = ts + 755 /* "" */
+__524:
;
pCx1 = *(*uintptr)(unsafe.Pointer((*Vdbe)(unsafe.Pointer(p)).FapCsr + uintptr((*Op)(unsafe.Pointer(pOp)).Fp1)*8))
- if !((pCx1 != 0) && !((int32(*(*uint8)(unsafe.Pointer(pCx1 + 8 /* &.hasBeenDuped */)) >> 4 & 0x1)) != 0)) {
- goto __523
+ if !((pCx1 != 0) && !((int32(*(*uint8)(unsafe.Pointer(pCx1 + 8 /* &.hasBeenDuped */)) & 0x10 >> 4)) != 0)) {
+ goto __525
}
// If the ephermeral table is already open and has no duplicates from
// OP_OpenDup, then erase all existing content so that the table is
@@ -68278,71 +70294,71 @@ __522:
(*VdbeCursor)(unsafe.Pointer(pCx1)).FseqCount = int64(0)
(*VdbeCursor)(unsafe.Pointer(pCx1)).FcacheStatus = U32(CACHE_STALE)
rc = Xsqlite3BtreeClearTable(tls, (*VdbeCursor)(unsafe.Pointer(pCx1)).FpBtx, int32((*VdbeCursor)(unsafe.Pointer(pCx1)).FpgnoRoot), uintptr(0))
- goto __524
-__523:
+ goto __526
+__525:
pCx1 = allocateCursor(tls, p, (*Op)(unsafe.Pointer(pOp)).Fp1, (*Op)(unsafe.Pointer(pOp)).Fp2, -1, uint8(CURTYPE_BTREE))
if !(pCx1 == uintptr(0)) {
- goto __525
+ goto __527
}
goto no_mem
-__525:
+__527:
;
- libc.SetBitFieldPtr8Uint32(pCx1+8 /* &.isEphemeral */, Bool(1), 0, 0x1)
+ libc.SetBitFieldPtr8Uint32(pCx1+8 /* &.isEphemeral */, Bool(1), 7, 0x80)
rc = Xsqlite3BtreeOpen(tls, (*Sqlite3)(unsafe.Pointer(db)).FpVfs, uintptr(0), db, (pCx1 + 16 /* &.pBtx */),
((BTREE_OMIT_JOURNAL | BTREE_SINGLE) | int32((*Op)(unsafe.Pointer(pOp)).Fp5)),
vfsFlags)
if !(rc == SQLITE_OK) {
- goto __526
+ goto __528
}
rc = Xsqlite3BtreeBeginTrans(tls, (*VdbeCursor)(unsafe.Pointer(pCx1)).FpBtx, 1, uintptr(0))
if !(rc == SQLITE_OK) {
- goto __527
+ goto __529
}
// If a transient index is required, create it by calling
// sqlite3BtreeCreateTable() with the BTREE_BLOBKEY flag before
// opening it. If a transient table is required, just use the
// automatically created table with root-page 1 (an BLOB_INTKEY table).
if !((libc.AssignPtrUintptr(pCx1+64 /* &.pKeyInfo */, libc.AssignUintptr(&pKeyInfo2, *(*uintptr)(unsafe.Pointer(pOp + 16 /* &.p4 */))))) != uintptr(0)) {
- goto __528
+ goto __530
}
rc = Xsqlite3BtreeCreateTable(tls, (*VdbeCursor)(unsafe.Pointer(pCx1)).FpBtx, (pCx1 + 76 /* &.pgnoRoot */),
(BTREE_BLOBKEY | int32((*Op)(unsafe.Pointer(pOp)).Fp5)))
if !(rc == SQLITE_OK) {
- goto __530
+ goto __532
}
rc = Xsqlite3BtreeCursor(tls, (*VdbeCursor)(unsafe.Pointer(pCx1)).FpBtx, (*VdbeCursor)(unsafe.Pointer(pCx1)).FpgnoRoot, BTREE_WRCSR,
pKeyInfo2, *(*uintptr)(unsafe.Pointer(pCx1 + 56 /* &.uc */)))
-__530:
+__532:
;
(*VdbeCursor)(unsafe.Pointer(pCx1)).FisTable = U8(0)
- goto __529
-__528:
+ goto __531
+__530:
(*VdbeCursor)(unsafe.Pointer(pCx1)).FpgnoRoot = Pgno(SCHEMA_ROOT)
rc = Xsqlite3BtreeCursor(tls, (*VdbeCursor)(unsafe.Pointer(pCx1)).FpBtx, uint32(SCHEMA_ROOT), BTREE_WRCSR,
uintptr(0), *(*uintptr)(unsafe.Pointer(pCx1 + 56 /* &.uc */)))
(*VdbeCursor)(unsafe.Pointer(pCx1)).FisTable = U8(1)
-__529:
+__531:
;
-__527:
+__529:
;
- libc.SetBitFieldPtr8Uint32(pCx1+8 /* &.isOrdered */, (Bool(libc.Bool32(int32((*Op)(unsafe.Pointer(pOp)).Fp5) != BTREE_UNORDERED))), 2, 0x4)
+ libc.SetBitFieldPtr8Uint32(pCx1+8 /* &.isOrdered */, (Bool(libc.Bool32(int32((*Op)(unsafe.Pointer(pOp)).Fp5) != BTREE_UNORDERED))), 5, 0x20)
if !(rc != 0) {
- goto __531
+ goto __533
}
Xsqlite3BtreeClose(tls, (*VdbeCursor)(unsafe.Pointer(pCx1)).FpBtx)
-__531:
+__533:
;
-__526:
+__528:
;
-__524:
+__526:
;
if !(rc != 0) {
- goto __532
+ goto __534
}
goto abort_due_to_error
-__532:
+__534:
;
(*VdbeCursor)(unsafe.Pointer(pCx1)).FnullRow = U8(1)
goto __8
@@ -68356,24 +70372,24 @@ __532:
// If argument P3 is non-zero, then it indicates that the sorter may
// assume that a stable sort considering the first P3 fields of each
// key is sufficient to produce the required results.
-__84:
+__85:
;
pCx2 = allocateCursor(tls, p, (*Op)(unsafe.Pointer(pOp)).Fp1, (*Op)(unsafe.Pointer(pOp)).Fp2, -1, uint8(CURTYPE_SORTER))
if !(pCx2 == uintptr(0)) {
- goto __533
+ goto __535
}
goto no_mem
-__533:
+__535:
;
(*VdbeCursor)(unsafe.Pointer(pCx2)).FpKeyInfo = *(*uintptr)(unsafe.Pointer(pOp + 16 /* &.p4 */))
rc = Xsqlite3VdbeSorterInit(tls, db, (*Op)(unsafe.Pointer(pOp)).Fp3, pCx2)
if !(rc != 0) {
- goto __534
+ goto __536
}
goto abort_due_to_error
-__534:
+__536:
;
goto __8
@@ -68383,15 +70399,15 @@ __534:
// P1 is a sorter cursor. If the sequence counter is currently zero, jump
// to P2. Regardless of whether or not the jump is taken, increment the
// the sequence value.
-__85:
+__86:
;
pC2 = *(*uintptr)(unsafe.Pointer((*Vdbe)(unsafe.Pointer(p)).FapCsr + uintptr((*Op)(unsafe.Pointer(pOp)).Fp1)*8))
if !((libc.PostIncInt64(&(*VdbeCursor)(unsafe.Pointer(pC2)).FseqCount, 1)) == int64(0)) {
- goto __535
+ goto __537
}
goto jump_to_p2
-__535:
+__537:
;
goto __8
@@ -68410,15 +70426,15 @@ __535:
//
// P3 is the number of fields in the records that will be stored by
// the pseudo-table.
-__86:
+__87:
;
pCx3 = allocateCursor(tls, p, (*Op)(unsafe.Pointer(pOp)).Fp1, (*Op)(unsafe.Pointer(pOp)).Fp3, -1, uint8(CURTYPE_PSEUDO))
if !(pCx3 == uintptr(0)) {
- goto __536
+ goto __538
}
goto no_mem
-__536:
+__538:
;
(*VdbeCursor)(unsafe.Pointer(pCx3)).FnullRow = U8(1)
(*VdbeCursor)(unsafe.Pointer(pCx3)).FseekResult = (*Op)(unsafe.Pointer(pOp)).Fp2
@@ -68435,7 +70451,7 @@ __536:
//
// Close a cursor previously opened as P1. If P1 is not
// currently open, this instruction is a no-op.
-__87:
+__88:
;
Xsqlite3VdbeFreeCursor(tls, p, *(*uintptr)(unsafe.Pointer((*Vdbe)(unsafe.Pointer(p)).FapCsr + uintptr((*Op)(unsafe.Pointer(pOp)).Fp1)*8)))
*(*uintptr)(unsafe.Pointer((*Vdbe)(unsafe.Pointer(p)).FapCsr + uintptr((*Op)(unsafe.Pointer(pOp)).Fp1)*8)) = uintptr(0)
@@ -68527,10 +70543,10 @@ __87:
// is an equality search.
//
// See also: Found, NotFound, SeekGt, SeekGe, SeekLt
-__88: // jump, in3, group
__89: // jump, in3, group
__90: // jump, in3, group
-__91: // Only interested in == results
+__91: // jump, in3, group
+__92: // Only interested in == results
;
@@ -68543,7 +70559,7 @@ __91: // Only interested in == results
(*VdbeCursor)(unsafe.Pointer(pC3)).FdeferredMoveto = U8(0)
(*VdbeCursor)(unsafe.Pointer(pC3)).FcacheStatus = U32(CACHE_STALE)
if !((*VdbeCursor)(unsafe.Pointer(pC3)).FisTable != 0) {
- goto __537
+ goto __539
}
// The OPFLAG_SEEKEQ/BTREE_SEEK_EQ flag is only set on index cursors
@@ -68553,10 +70569,10 @@ __91: // Only interested in == results
pIn3 = (aMem + uintptr((*Op)(unsafe.Pointer(pOp)).Fp3)*56)
flags31 = (*Mem)(unsafe.Pointer(pIn3)).Fflags
if !((int32(flags31) & (((MEM_Int | MEM_Real) | MEM_IntReal) | MEM_Str)) == MEM_Str) {
- goto __539
+ goto __541
}
applyNumericAffinity(tls, pIn3, 0)
-__539:
+__541:
;
iKey = Xsqlite3VdbeIntValue(tls, pIn3) // Get the integer key value
newType = (*Mem)(unsafe.Pointer(pIn3)).Fflags // Record the type after applying numeric affinity
@@ -68565,30 +70581,30 @@ __539:
// If the P3 value could not be converted into an integer without
// loss of information, then special processing is required...
if !((int32(newType) & (MEM_Int | MEM_IntReal)) == 0) {
- goto __540
+ goto __542
}
if !((int32(newType) & MEM_Real) == 0) {
- goto __541
+ goto __543
}
if !(((int32(newType) & MEM_Null) != 0) || (oc >= OP_SeekGE)) {
- goto __543
+ goto __545
}
goto jump_to_p2
- goto __544
-__543:
+ goto __546
+__545:
rc = Xsqlite3BtreeLast(tls, *(*uintptr)(unsafe.Pointer(pC3 + 56 /* &.uc */)), bp+296 /* &res1 */)
if !(rc != SQLITE_OK) {
- goto __545
+ goto __547
}
goto abort_due_to_error
-__545:
+__547:
;
goto seek_not_found
-__544:
+__546:
;
- goto __542
-__541:
+ goto __544
+__543:
// If the approximation iKey is larger than the actual real search
// term, substitute >= for > and < for <=. e.g. if the search term
@@ -68597,55 +70613,55 @@ __541:
// (x > 4.9) -> (x >= 5)
// (x <= 4.9) -> (x < 5)
if !(*(*float64)(unsafe.Pointer(pIn3 /* &.u */)) < float64(iKey)) {
- goto __546
+ goto __548
}
if !((oc & 0x0001) == (OP_SeekGT & 0x0001)) {
- goto __548
+ goto __550
}
oc--
-__548:
+__550:
;
- goto __547
-__546:
+ goto __549
+__548:
if !(*(*float64)(unsafe.Pointer(pIn3 /* &.u */)) > float64(iKey)) {
- goto __549
+ goto __551
}
if !((oc & 0x0001) == (OP_SeekLT & 0x0001)) {
- goto __550
+ goto __552
}
oc++
-__550:
+__552:
+ ;
+__551:
;
__549:
;
-__547:
+__544:
;
__542:
;
-__540:
- ;
rc = Xsqlite3BtreeMovetoUnpacked(tls, *(*uintptr)(unsafe.Pointer(pC3 + 56 /* &.uc */)), uintptr(0), int64(U64(iKey)), 0, bp+296 /* &res1 */)
(*VdbeCursor)(unsafe.Pointer(pC3)).FmovetoTarget = iKey // Used by OP_Delete
if !(rc != SQLITE_OK) {
- goto __551
+ goto __553
}
goto abort_due_to_error
-__551:
+__553:
;
- goto __538
-__537:
+ goto __540
+__539:
// For a cursor with the OPFLAG_SEEKEQ/BTREE_SEEK_EQ hint, only the
// OP_SeekGE and OP_SeekLE opcodes are allowed, and these must be
// immediately followed by an OP_IdxGT or OP_IdxLT opcode, respectively,
// with the same key.
if !(Xsqlite3BtreeCursorHasHint(tls, *(*uintptr)(unsafe.Pointer(pC3 + 56 /* &.uc */)), uint32(BTREE_SEEK_EQ)) != 0) {
- goto __552
+ goto __554
}
eqOnly = 1
-__552:
+__554:
;
nField2 = *(*int32)(unsafe.Pointer(pOp + 16 /* &.p4 */))
@@ -68670,97 +70686,97 @@ __552:
(*UnpackedRecord)(unsafe.Pointer(bp + 304 /* &r */)).FeqSeen = U8(0)
rc = Xsqlite3BtreeMovetoUnpacked(tls, *(*uintptr)(unsafe.Pointer(pC3 + 56 /* &.uc */)), bp+304 /* &r */, int64(0), 0, bp+296 /* &res1 */)
if !(rc != SQLITE_OK) {
- goto __553
+ goto __555
}
goto abort_due_to_error
-__553:
+__555:
;
if !((eqOnly != 0) && (int32((*UnpackedRecord)(unsafe.Pointer(bp+304 /* &r */)).FeqSeen) == 0)) {
- goto __554
+ goto __556
}
goto seek_not_found
-__554:
+__556:
;
-__538:
+__540:
;
if !(oc >= OP_SeekGE) {
- goto __555
+ goto __557
}
if !((*(*int32)(unsafe.Pointer(bp + 296 /* res1 */)) < 0) || ((*(*int32)(unsafe.Pointer(bp + 296 /* res1 */)) == 0) && (oc == OP_SeekGT))) {
- goto __557
+ goto __559
}
*(*int32)(unsafe.Pointer(bp + 296 /* res1 */)) = 0
rc = Xsqlite3BtreeNext(tls, *(*uintptr)(unsafe.Pointer(pC3 + 56 /* &.uc */)), 0)
if !(rc != SQLITE_OK) {
- goto __559
+ goto __561
}
if !(rc == SQLITE_DONE) {
- goto __560
+ goto __562
}
rc = SQLITE_OK
*(*int32)(unsafe.Pointer(bp + 296 /* res1 */)) = 1
- goto __561
-__560:
+ goto __563
+__562:
goto abort_due_to_error
+__563:
+ ;
__561:
;
+ goto __560
__559:
+ *(*int32)(unsafe.Pointer(bp + 296 /* res1 */)) = 0
+__560:
;
goto __558
__557:
- *(*int32)(unsafe.Pointer(bp + 296 /* res1 */)) = 0
-__558:
- ;
- goto __556
-__555:
;
if !((*(*int32)(unsafe.Pointer(bp + 296 /* res1 */)) > 0) || ((*(*int32)(unsafe.Pointer(bp + 296 /* res1 */)) == 0) && (oc == OP_SeekLT))) {
- goto __562
+ goto __564
}
*(*int32)(unsafe.Pointer(bp + 296 /* res1 */)) = 0
rc = Xsqlite3BtreePrevious(tls, *(*uintptr)(unsafe.Pointer(pC3 + 56 /* &.uc */)), 0)
if !(rc != SQLITE_OK) {
- goto __564
+ goto __566
}
if !(rc == SQLITE_DONE) {
- goto __565
+ goto __567
}
rc = SQLITE_OK
*(*int32)(unsafe.Pointer(bp + 296 /* res1 */)) = 1
- goto __566
-__565:
+ goto __568
+__567:
goto abort_due_to_error
+__568:
+ ;
__566:
;
+ goto __565
__564:
- ;
- goto __563
-__562:
// res might be negative because the table is empty. Check to
// see if this is the case.
*(*int32)(unsafe.Pointer(bp + 296 /* res1 */)) = Xsqlite3BtreeEof(tls, *(*uintptr)(unsafe.Pointer(pC3 + 56 /* &.uc */)))
-__563:
+__565:
;
-__556:
+__558:
;
seek_not_found:
;
if !(*(*int32)(unsafe.Pointer(bp + 296 /* res1 */)) != 0) {
- goto __567
+ goto __569
}
goto jump_to_p2
- goto __568
-__567:
+ goto __570
+__569:
if !(eqOnly != 0) {
- goto __569
+ goto __571
}
pOp += 24 // Skip the OP_IdxLt or OP_IdxGT that follows
-__569:
+__571:
;
-__568:
+__570:
;
goto __8
@@ -68809,7 +70825,7 @@ __568:
// - If the cursor ends up past the target row (indicating the the target
// row does not exist in the btree) then jump to SeekOP.P2.
//
-__92:
+__93:
;
// pOp->p2 points to the first instruction past the OP_IdxGT that
@@ -68818,10 +70834,10 @@ __92:
pC4 = *(*uintptr)(unsafe.Pointer((*Vdbe)(unsafe.Pointer(p)).FapCsr + uintptr((*Op)(unsafe.Pointer(pOp+1*24)).Fp1)*8))
if !(!(Xsqlite3BtreeCursorIsValidNN(tls, *(*uintptr)(unsafe.Pointer(pC4 + 56 /* &.uc */))) != 0)) {
- goto __570
+ goto __572
}
goto __8
-__570:
+__572:
;
nStep = (*Op)(unsafe.Pointer(pOp)).Fp1
@@ -68830,60 +70846,60 @@ __570:
(*UnpackedRecord)(unsafe.Pointer(bp + 328 /* &r1 */)).Fdefault_rc = int8(0)
(*UnpackedRecord)(unsafe.Pointer(bp + 328 /* &r1 */)).FaMem = (aMem + uintptr((*Op)(unsafe.Pointer(pOp+1*24)).Fp3)*56)
*(*int32)(unsafe.Pointer(bp + 352 /* res3 */)) = 0 // Not needed. Only used to silence a warning.
-__571:
+__573:
if !(1 != 0) {
- goto __572
+ goto __574
}
rc = Xsqlite3VdbeIdxKeyCompare(tls, db, pC4, bp+328 /* &r1 */, bp+352 /* &res3 */)
if !(rc != 0) {
- goto __573
+ goto __575
}
goto abort_due_to_error
-__573:
+__575:
;
if !(*(*int32)(unsafe.Pointer(bp + 352 /* res3 */)) > 0) {
- goto __574
+ goto __576
}
seekscan_search_fail:
;
pOp += 24
goto jump_to_p2
-__574:
+__576:
;
if !(*(*int32)(unsafe.Pointer(bp + 352 /* res3 */)) == 0) {
- goto __575
+ goto __577
}
goto jump_to_p2
- goto __572
-__575:
+ goto __574
+__577:
;
if !(nStep <= 0) {
- goto __576
+ goto __578
}
- goto __572
-__576:
+ goto __574
+__578:
;
nStep--
rc = Xsqlite3BtreeNext(tls, *(*uintptr)(unsafe.Pointer(pC4 + 56 /* &.uc */)), 0)
if !(rc != 0) {
- goto __577
+ goto __579
}
if !(rc == SQLITE_DONE) {
- goto __578
+ goto __580
}
rc = SQLITE_OK
goto seekscan_search_fail
- goto __579
-__578:
+ goto __581
+__580:
goto abort_due_to_error
-__579:
+__581:
;
-__577:
+__579:
;
- goto __571
-__572:
+ goto __573
+__574:
;
goto __8
@@ -68901,23 +70917,23 @@ __572:
// early, thus saving work. This is part of the IN-early-out optimization.
//
// P1 must be a valid b-tree cursor.
-__93:
+__94:
;
pC5 = *(*uintptr)(unsafe.Pointer((*Vdbe)(unsafe.Pointer(p)).FapCsr + uintptr((*Op)(unsafe.Pointer(pOp)).Fp1)*8))
if !(int32((*VdbeCursor)(unsafe.Pointer(pC5)).FseekHit) < (*Op)(unsafe.Pointer(pOp)).Fp2) {
- goto __580
+ goto __582
}
(*VdbeCursor)(unsafe.Pointer(pC5)).FseekHit = U16((*Op)(unsafe.Pointer(pOp)).Fp2)
- goto __581
-__580:
+ goto __583
+__582:
if !(int32((*VdbeCursor)(unsafe.Pointer(pC5)).FseekHit) > (*Op)(unsafe.Pointer(pOp)).Fp3) {
- goto __582
+ goto __584
}
(*VdbeCursor)(unsafe.Pointer(pC5)).FseekHit = U16((*Op)(unsafe.Pointer(pOp)).Fp3)
-__582:
+__584:
;
-__581:
+__583:
;
goto __8
@@ -68925,14 +70941,14 @@ __581:
// Synopsis: if( !csr[P1] ) goto P2
//
// If cursor P1 is not open, jump to instruction P2. Otherwise, fall through.
-__94: // jump
+__95: // jump
;
if !(!(int32(*(*uintptr)(unsafe.Pointer((*Vdbe)(unsafe.Pointer(p)).FapCsr + uintptr((*Op)(unsafe.Pointer(pOp)).Fp1)*8))) != 0)) {
- goto __583
+ goto __585
}
goto jump_to_p2_and_check_for_interrupt
-__583:
+__585:
;
goto __8
@@ -69022,20 +71038,20 @@ __583:
// opcodes do not work after this operation.
//
// See also: NotFound, Found, NotExists
-__95:
+__96:
;
pC6 = *(*uintptr)(unsafe.Pointer((*Vdbe)(unsafe.Pointer(p)).FapCsr + uintptr((*Op)(unsafe.Pointer(pOp)).Fp1)*8))
if !(int32((*VdbeCursor)(unsafe.Pointer(pC6)).FseekHit) >= *(*int32)(unsafe.Pointer(pOp + 16 /* &.p4 */))) {
- goto __584
+ goto __586
}
goto __8
-__584:
+__586:
;
-__96: // jump, in3
__97: // jump, in3
-__98:
+__98: // jump, in3
+__99:
;
pC7 = *(*uintptr)(unsafe.Pointer((*Vdbe)(unsafe.Pointer(p)).FapCsr + uintptr((*Op)(unsafe.Pointer(pOp)).Fp1)*8))
@@ -69043,15 +71059,15 @@ __98:
pIn3 = (aMem + uintptr((*Op)(unsafe.Pointer(pOp)).Fp3)*56)
if !(*(*int32)(unsafe.Pointer(pOp + 16 /* &.p4 */)) > 0) {
- goto __585
+ goto __587
}
(*UnpackedRecord)(unsafe.Pointer(bp + 360 /* &r2 */)).FpKeyInfo = (*VdbeCursor)(unsafe.Pointer(pC7)).FpKeyInfo
(*UnpackedRecord)(unsafe.Pointer(bp + 360 /* &r2 */)).FnField = U16(*(*int32)(unsafe.Pointer(pOp + 16 /* &.p4 */)))
(*UnpackedRecord)(unsafe.Pointer(bp + 360 /* &r2 */)).FaMem = pIn3
pIdxKey = bp + 360 /* &r2 */
pFree = uintptr(0)
- goto __586
-__585:
+ goto __588
+__587:
;
rc = func() int32 {
if (int32((*Mem)(unsafe.Pointer((pIn3))).Fflags) & MEM_Zero) != 0 {
@@ -69061,62 +71077,62 @@ __585:
}()
if !(rc != 0) {
- goto __587
+ goto __589
}
goto no_mem
-__587:
+__589:
;
pFree = libc.AssignUintptr(&pIdxKey, Xsqlite3VdbeAllocUnpackedRecord(tls, (*VdbeCursor)(unsafe.Pointer(pC7)).FpKeyInfo))
if !(pIdxKey == uintptr(0)) {
- goto __588
+ goto __590
}
goto no_mem
-__588:
+__590:
;
Xsqlite3VdbeRecordUnpack(tls, (*VdbeCursor)(unsafe.Pointer(pC7)).FpKeyInfo, (*Mem)(unsafe.Pointer(pIn3)).Fn, (*Mem)(unsafe.Pointer(pIn3)).Fz, pIdxKey)
-__586:
+__588:
;
(*UnpackedRecord)(unsafe.Pointer(pIdxKey)).Fdefault_rc = int8(0)
takeJump = 0
if !(int32((*Op)(unsafe.Pointer(pOp)).Fopcode) == OP_NoConflict) {
- goto __589
+ goto __591
}
// For the OP_NoConflict opcode, take the jump if any of the
// input fields are NULL, since any key with a NULL will not
// conflict
ii1 = 0
-__590:
+__592:
if !(ii1 < int32((*UnpackedRecord)(unsafe.Pointer(pIdxKey)).FnField)) {
- goto __592
+ goto __594
}
if !((int32((*Mem)(unsafe.Pointer((*UnpackedRecord)(unsafe.Pointer(pIdxKey)).FaMem+uintptr(ii1)*56)).Fflags) & MEM_Null) != 0) {
- goto __593
+ goto __595
}
takeJump = 1
- goto __592
-__593:
+ goto __594
+__595:
;
- goto __591
-__591:
+ goto __593
+__593:
ii1++
- goto __590
goto __592
-__592:
+ goto __594
+__594:
;
-__589:
+__591:
;
rc = Xsqlite3BtreeMovetoUnpacked(tls, *(*uintptr)(unsafe.Pointer(pC7 + 56 /* &.uc */)), pIdxKey, int64(0), 0, bp+384 /* &res4 */)
if !(pFree != 0) {
- goto __594
+ goto __596
}
Xsqlite3DbFreeNN(tls, db, pFree)
-__594:
+__596:
;
if !(rc != SQLITE_OK) {
- goto __595
+ goto __597
}
goto abort_due_to_error
-__595:
+__597:
;
(*VdbeCursor)(unsafe.Pointer(pC7)).FseekResult = *(*int32)(unsafe.Pointer(bp + 384 /* res4 */))
alreadyExists = (libc.Bool32(*(*int32)(unsafe.Pointer(bp + 384 /* res4 */)) == 0))
@@ -69124,31 +71140,31 @@ __595:
(*VdbeCursor)(unsafe.Pointer(pC7)).FdeferredMoveto = U8(0)
(*VdbeCursor)(unsafe.Pointer(pC7)).FcacheStatus = U32(CACHE_STALE)
if !(int32((*Op)(unsafe.Pointer(pOp)).Fopcode) == OP_Found) {
- goto __596
+ goto __598
}
if !(alreadyExists != 0) {
- goto __598
+ goto __600
}
goto jump_to_p2
-__598:
+__600:
;
- goto __597
-__596:
+ goto __599
+__598:
;
if !((takeJump != 0) || !(alreadyExists != 0)) {
- goto __599
+ goto __601
}
goto jump_to_p2
-__599:
+__601:
;
if !(int32((*Op)(unsafe.Pointer(pOp)).Fopcode) == OP_IfNoHope) {
- goto __600
+ goto __602
}
(*VdbeCursor)(unsafe.Pointer(pC7)).FseekHit = U16(*(*int32)(unsafe.Pointer(pOp + 16 /* &.p4 */)))
-__600:
+__602:
;
-__597:
+__599:
;
goto __8
@@ -69197,12 +71213,12 @@ __597:
// not work following this opcode.
//
// See also: Found, NotFound, NoConflict, SeekRowid
-__99:
+__100:
pIn3 = (aMem + uintptr((*Op)(unsafe.Pointer(pOp)).Fp3)*56)
if !((int32((*Mem)(unsafe.Pointer(pIn3)).Fflags) & (MEM_Int | MEM_IntReal)) == 0) {
- goto __601
+ goto __603
}
// If pIn3->u.i does not contain an integer, compute iKey as the
// integer value of pIn3. Jump to P2 if pIn3 cannot be converted
@@ -69210,18 +71226,18 @@ __99:
// changing the datatype of pIn3, however, as it is used by other
// parts of the prepared statement.
*(*Mem)(unsafe.Pointer(bp + 392 /* x */)) = *(*Mem)(unsafe.Pointer(pIn3))
- applyAffinity(tls, bp+392 /* &x */, int8(SQLITE_AFF_NUMERIC), encoding)
+ applyAffinity(tls, bp+392 /* &x */, uint8(SQLITE_AFF_NUMERIC), encoding)
if !((int32((*Mem)(unsafe.Pointer(bp+392 /* &x */)).Fflags) & MEM_Int) == 0) {
- goto __602
+ goto __604
}
goto jump_to_p2
-__602:
+__604:
;
iKey1 = U64(*(*I64)(unsafe.Pointer(bp + 392 /* &x */ /* &.u */)))
goto notExistsWithKey
-__601:
+__603:
;
-__100: // jump, in3
+__101: // jump, in3
pIn3 = (aMem + uintptr((*Op)(unsafe.Pointer(pOp)).Fp3)*56)
iKey1 = U64(*(*I64)(unsafe.Pointer(pIn3 /* &.u */)))
@@ -69240,25 +71256,25 @@ notExistsWithKey:
(*VdbeCursor)(unsafe.Pointer(pC8)).FseekResult = *(*int32)(unsafe.Pointer(bp + 448 /* res5 */))
if !(*(*int32)(unsafe.Pointer(bp + 448 /* res5 */)) != 0) {
- goto __603
+ goto __605
}
if !((*Op)(unsafe.Pointer(pOp)).Fp2 == 0) {
- goto __604
+ goto __606
}
- rc = Xsqlite3CorruptError(tls, 90827)
- goto __605
-__604:
+ rc = Xsqlite3CorruptError(tls, 91396)
+ goto __607
+__606:
goto jump_to_p2
-__605:
+__607:
;
-__603:
+__605:
;
if !(rc != 0) {
- goto __606
+ goto __608
}
goto abort_due_to_error
-__606:
+__608:
;
goto __8
@@ -69269,7 +71285,7 @@ __606:
// Write the sequence number into register P2.
// The sequence number on the cursor is incremented after this
// instruction.
-__101: // out2
+__102: // out2
;
pOut = out2Prerelease(tls, p, pOp)
@@ -69290,7 +71306,7 @@ __101: // out2
// an SQLITE_FULL error is generated. The P3 register is updated with the '
// generated record number. This P3 mechanism is used to help implement the
// AUTOINCREMENT feature.
-__102: // Root frame of VDBE
+__103: // Root frame of VDBE
*(*I64)(unsafe.Pointer(bp + 456 /* v */)) = int64(0)
*(*int32)(unsafe.Pointer(bp + 452 /* res6 */)) = 0
@@ -69315,90 +71331,90 @@ __102: // Root frame of VDBE
// Others complain about 0x7ffffffffffffffffLL. The following macro seems
// to provide the constant while making all compilers happy.
- if !(!((int32(*(*uint8)(unsafe.Pointer(pC9 + 8 /* &.useRandomRowid */)) >> 6 & 0x1)) != 0)) {
- goto __607
+ if !(!((int32(*(*uint8)(unsafe.Pointer(pC9 + 8 /* &.useRandomRowid */)) & 0x40 >> 6)) != 0)) {
+ goto __609
}
rc = Xsqlite3BtreeLast(tls, *(*uintptr)(unsafe.Pointer(pC9 + 56 /* &.uc */)), bp+452 /* &res6 */)
if !(rc != SQLITE_OK) {
- goto __608
+ goto __610
}
goto abort_due_to_error
-__608:
+__610:
;
if !(*(*int32)(unsafe.Pointer(bp + 452 /* res6 */)) != 0) {
- goto __609
+ goto __611
}
*(*I64)(unsafe.Pointer(bp + 456 /* v */)) = int64(1) // IMP: R-61914-48074
- goto __610
-__609:
+ goto __612
+__611:
;
*(*I64)(unsafe.Pointer(bp + 456 /* v */)) = Xsqlite3BtreeIntegerKey(tls, *(*uintptr)(unsafe.Pointer(pC9 + 56 /* &.uc */)))
if !(*(*I64)(unsafe.Pointer(bp + 456 /* v */)) >= (int64((U64((uint64(0x7fffffff))) << 32) | uint64(0xffffffff)))) {
- goto __611
+ goto __613
}
- libc.SetBitFieldPtr8Uint32(pC9+8 /* &.useRandomRowid */, Bool(1), 1, 0x2)
- goto __612
-__611:
+ libc.SetBitFieldPtr8Uint32(pC9+8 /* &.useRandomRowid */, Bool(1), 6, 0x40)
+ goto __614
+__613:
*(*I64)(unsafe.Pointer(bp + 456 /* v */))++ // IMP: R-29538-34987
-__612:
+__614:
;
-__610:
+__612:
;
-__607:
+__609:
;
if !((*Op)(unsafe.Pointer(pOp)).Fp3 != 0) {
- goto __613
+ goto __615
}
// Assert that P3 is a valid memory cell.
if !((*Vdbe)(unsafe.Pointer(p)).FpFrame != 0) {
- goto __614
+ goto __616
}
pFrame1 = (*Vdbe)(unsafe.Pointer(p)).FpFrame
-__616:
+__618:
if !((*VdbeFrame)(unsafe.Pointer(pFrame1)).FpParent != 0) {
- goto __618
+ goto __620
}
- goto __617
-__617:
+ goto __619
+__619:
pFrame1 = (*VdbeFrame)(unsafe.Pointer(pFrame1)).FpParent
- goto __616
goto __618
-__618:
+ goto __620
+__620:
;
// Assert that P3 is a valid memory cell.
pMem1 = ((*VdbeFrame)(unsafe.Pointer(pFrame1)).FaMem + uintptr((*Op)(unsafe.Pointer(pOp)).Fp3)*56)
- goto __615
-__614:
+ goto __617
+__616:
// Assert that P3 is a valid memory cell.
;
pMem1 = (aMem + uintptr((*Op)(unsafe.Pointer(pOp)).Fp3)*56)
-__615:
+__617:
;
Xsqlite3VdbeMemIntegerify(tls, pMem1)
// mem(P3) holds an integer
- if !((*(*I64)(unsafe.Pointer(pMem1 /* &.u */)) == (int64((U64((uint64(0x7fffffff))) << 32) | uint64(0xffffffff)))) || ((Bool(int32(*(*uint8)(unsafe.Pointer(pC9 + 8 /* &.useRandomRowid */)) >> 6 & 0x1))) != 0)) {
- goto __619
+ if !((*(*I64)(unsafe.Pointer(pMem1 /* &.u */)) == (int64((U64((uint64(0x7fffffff))) << 32) | uint64(0xffffffff)))) || ((Bool(int32(*(*uint8)(unsafe.Pointer(pC9 + 8 /* &.useRandomRowid */)) & 0x40 >> 6))) != 0)) {
+ goto __621
}
rc = SQLITE_FULL // IMP: R-17817-00630
goto abort_due_to_error
-__619:
+__621:
;
if !(*(*I64)(unsafe.Pointer(bp + 456 /* v */)) < (*(*I64)(unsafe.Pointer(pMem1 /* &.u */)) + int64(1))) {
- goto __620
+ goto __622
}
*(*I64)(unsafe.Pointer(bp + 456 /* v */)) = (*(*I64)(unsafe.Pointer(pMem1 /* &.u */)) + int64(1))
-__620:
+__622:
;
*(*I64)(unsafe.Pointer(pMem1 /* &.u */)) = *(*I64)(unsafe.Pointer(bp + 456 /* v */))
-__613:
+__615:
;
- if !((Bool(int32(*(*uint8)(unsafe.Pointer(pC9 + 8 /* &.useRandomRowid */)) >> 6 & 0x1))) != 0) {
- goto __621
+ if !((Bool(int32(*(*uint8)(unsafe.Pointer(pC9 + 8 /* &.useRandomRowid */)) & 0x40 >> 6))) != 0) {
+ goto __623
}
// IMPLEMENTATION-OF: R-07677-41881 If the largest ROWID is equal to the
// largest possible integer (9223372036854775807) then the database
@@ -69407,36 +71423,36 @@ __613:
// We cannot be in random rowid mode if this is
// an AUTOINCREMENT table.
cnt1 = 0
-__622:
+__624:
Xsqlite3_randomness(tls, int32(unsafe.Sizeof(I64(0))), bp+456 /* &v */)
*(*I64)(unsafe.Pointer(bp + 456 /* v */)) &= (I64((int64((U64((uint64(0x7fffffff))) << 32) | uint64(0xffffffff)))) >> 1)
*(*I64)(unsafe.Pointer(bp + 456 /* v */))++ // Ensure that v is greater than zero
- goto __623
-__623:
+ goto __625
+__625:
if (((libc.AssignInt32(&rc, Xsqlite3BtreeMovetoUnpacked(tls, *(*uintptr)(unsafe.Pointer(pC9 + 56 /* &.uc */)), uintptr(0), int64(U64(*(*I64)(unsafe.Pointer(bp + 456 /* v */)))),
0, bp+452 /* &res6 */))) == SQLITE_OK) &&
(*(*int32)(unsafe.Pointer(bp + 452 /* res6 */)) == 0)) &&
(libc.PreIncInt32(&cnt1, 1) < 100) {
- goto __622
+ goto __624
}
- goto __624
-__624:
+ goto __626
+__626:
;
if !(rc != 0) {
- goto __625
+ goto __627
}
goto abort_due_to_error
-__625:
+__627:
;
if !(*(*int32)(unsafe.Pointer(bp + 452 /* res6 */)) == 0) {
- goto __626
+ goto __628
}
rc = SQLITE_FULL // IMP: R-38219-53002
goto abort_due_to_error
-__626:
+__628:
;
// EV: R-40812-03570
-__621:
+__623:
;
(*VdbeCursor)(unsafe.Pointer(pC9)).FdeferredMoveto = U8(0)
(*VdbeCursor)(unsafe.Pointer(pC9)).FcacheStatus = U32(CACHE_STALE)
@@ -69480,7 +71496,7 @@ __621:
//
// This instruction only works on tables. The equivalent instruction
// for indices is OP_IdxInsert.
-__103: // Payload to be inserted
+__104: // Payload to be inserted
pData = (aMem + uintptr((*Op)(unsafe.Pointer(pOp)).Fp2)*56)
@@ -69491,56 +71507,56 @@ __103: // Payload to be inserted
(*BtreePayload)(unsafe.Pointer(bp + 464 /* &x1 */)).FnKey = *(*I64)(unsafe.Pointer(pKey /* &.u */))
if !((int32((*Op)(unsafe.Pointer(pOp)).Fp4type) == (-6)) && (((*Sqlite3)(unsafe.Pointer((db))).FxPreUpdateCallback != 0) || ((*Sqlite3)(unsafe.Pointer((db))).FxUpdateCallback != 0))) {
- goto __627
+ goto __629
}
zDb = (*Db)(unsafe.Pointer((*Sqlite3)(unsafe.Pointer(db)).FaDb + uintptr((*VdbeCursor)(unsafe.Pointer(pC10)).FiDb)*32)).FzDbSName
pTab = *(*uintptr)(unsafe.Pointer(pOp + 16 /* &.p4 */))
- goto __628
-__627:
+ goto __630
+__629:
pTab = uintptr(0)
zDb = uintptr(0) // Not needed. Silence a compiler warning.
-__628:
+__630:
;
// Invoke the pre-update hook, if any
if !(pTab != 0) {
- goto __629
+ goto __631
}
if !(((*Sqlite3)(unsafe.Pointer(db)).FxPreUpdateCallback != 0) && !((int32((*Op)(unsafe.Pointer(pOp)).Fp5) & OPFLAG_ISUPDATE) != 0)) {
- goto __630
+ goto __632
}
- Xsqlite3VdbePreUpdateHook(tls, p, pC10, SQLITE_INSERT, zDb, pTab, (*BtreePayload)(unsafe.Pointer(bp+464 /* &x1 */)).FnKey, (*Op)(unsafe.Pointer(pOp)).Fp2)
-__630:
+ Xsqlite3VdbePreUpdateHook(tls, p, pC10, SQLITE_INSERT, zDb, pTab, (*BtreePayload)(unsafe.Pointer(bp+464 /* &x1 */)).FnKey, (*Op)(unsafe.Pointer(pOp)).Fp2, -1)
+__632:
;
if !(((*Sqlite3)(unsafe.Pointer(db)).FxUpdateCallback == uintptr(0)) || ((*Table)(unsafe.Pointer(pTab)).FaCol == uintptr(0))) {
- goto __631
+ goto __633
}
// Prevent post-update hook from running in cases when it should not
pTab = uintptr(0)
-__631:
+__633:
;
-__629:
+__631:
;
if !((int32((*Op)(unsafe.Pointer(pOp)).Fp5) & OPFLAG_ISNOOP) != 0) {
- goto __632
+ goto __634
}
goto __8
-__632:
+__634:
;
if !((int32((*Op)(unsafe.Pointer(pOp)).Fp5) & OPFLAG_NCHANGE) != 0) {
- goto __633
+ goto __635
}
(*Vdbe)(unsafe.Pointer(p)).FnChange++
-__633:
+__635:
;
if !((int32((*Op)(unsafe.Pointer(pOp)).Fp5) & OPFLAG_LASTROWID) != 0) {
- goto __634
+ goto __636
}
(*Sqlite3)(unsafe.Pointer(db)).FlastRowid = (*BtreePayload)(unsafe.Pointer(bp + 464 /* &x1 */)).FnKey
-__634:
+__636:
;
(*BtreePayload)(unsafe.Pointer(bp + 464 /* &x1 */)).FpData = (*Mem)(unsafe.Pointer(pData)).Fz
@@ -69552,13 +71568,13 @@ __634:
return 0
}()
if !((int32((*Mem)(unsafe.Pointer(pData)).Fflags) & MEM_Zero) != 0) {
- goto __635
+ goto __637
}
(*BtreePayload)(unsafe.Pointer(bp + 464 /* &x1 */)).FnZero = *(*int32)(unsafe.Pointer(pData /* &.u */))
- goto __636
-__635:
+ goto __638
+__637:
(*BtreePayload)(unsafe.Pointer(bp + 464 /* &x1 */)).FnZero = 0
-__636:
+__638:
;
(*BtreePayload)(unsafe.Pointer(bp + 464 /* &x1 */)).FpKey = uintptr(0)
rc = Xsqlite3BtreeInsert(tls, *(*uintptr)(unsafe.Pointer(pC10 + 56 /* &.uc */)), bp+464, /* &x1 */
@@ -69569,16 +71585,18 @@ __636:
// Invoke the update-hook if required.
if !(rc != 0) {
- goto __637
+ goto __639
}
goto abort_due_to_error
-__637:
+__639:
;
if !(pTab != 0) {
- goto __638
+ goto __640
}
- (*(*func(*libc.TLS, uintptr, int32, uintptr, uintptr, Sqlite_int64))(unsafe.Pointer((db + 312 /* &.xUpdateCallback */))))(tls, (*Sqlite3)(unsafe.Pointer(db)).FpUpdateArg,
+ (*struct {
+ f func(*libc.TLS, uintptr, int32, uintptr, uintptr, Sqlite_int64)
+ })(unsafe.Pointer(&struct{ uintptr }{(*Sqlite3)(unsafe.Pointer(db)).FxUpdateCallback})).f(tls, (*Sqlite3)(unsafe.Pointer(db)).FpUpdateArg,
func() int32 {
if (int32((*Op)(unsafe.Pointer(pOp)).Fp5) & OPFLAG_ISUPDATE) != 0 {
return SQLITE_UPDATE
@@ -69586,7 +71604,7 @@ __637:
return SQLITE_INSERT
}(),
zDb, (*Table)(unsafe.Pointer(pTab)).FzName, (*BtreePayload)(unsafe.Pointer(bp+464 /* &x1 */)).FnKey)
-__638:
+__640:
;
goto __8
@@ -69600,7 +71618,7 @@ __638:
//
// This opcode must be followed by either an Insert or InsertIdx opcode
// with the OPFLAG_PREFORMAT flag set to complete the insert operation.
-__104: // Rowid value to insert with
+__105: // Rowid value to insert with
;
pDest1 = *(*uintptr)(unsafe.Pointer((*Vdbe)(unsafe.Pointer(p)).FapCsr + uintptr((*Op)(unsafe.Pointer(pOp)).Fp1)*8))
@@ -69612,10 +71630,10 @@ __104: // Rowid value to insert with
}
rc = Xsqlite3BtreeTransferRow(tls, *(*uintptr)(unsafe.Pointer(pDest1 + 56 /* &.uc */)), *(*uintptr)(unsafe.Pointer(pSrc + 56 /* &.uc */)), iKey2)
if !(rc != SQLITE_OK) {
- goto __639
+ goto __641
}
goto abort_due_to_error
-__639:
+__641:
;
goto __8
@@ -69653,7 +71671,7 @@ __639:
// If the OPFLAG_ISUPDATE flag is set in P2, then P3 contains the address
// of the memory cell that contains the value that the rowid of the row will
// be set to by the update.
-__105:
+__106:
opflags = (*Op)(unsafe.Pointer(pOp)).Fp2
@@ -69665,27 +71683,27 @@ __105:
// last moved with OP_Next or OP_Prev, not Seek or NotFound, set
// VdbeCursor.movetoTarget to the current rowid.
if !((int32((*Op)(unsafe.Pointer(pOp)).Fp4type) == (-6)) && (((*Sqlite3)(unsafe.Pointer((db))).FxPreUpdateCallback != 0) || ((*Sqlite3)(unsafe.Pointer((db))).FxUpdateCallback != 0))) {
- goto __640
+ goto __642
}
zDb1 = (*Db)(unsafe.Pointer((*Sqlite3)(unsafe.Pointer(db)).FaDb + uintptr((*VdbeCursor)(unsafe.Pointer(pC11)).FiDb)*32)).FzDbSName
pTab1 = *(*uintptr)(unsafe.Pointer(pOp + 16 /* &.p4 */))
if !(((int32((*Op)(unsafe.Pointer(pOp)).Fp5) & OPFLAG_SAVEPOSITION) != 0) && ((*VdbeCursor)(unsafe.Pointer(pC11)).FisTable != 0)) {
- goto __642
+ goto __644
}
(*VdbeCursor)(unsafe.Pointer(pC11)).FmovetoTarget = Xsqlite3BtreeIntegerKey(tls, *(*uintptr)(unsafe.Pointer(pC11 + 56 /* &.uc */)))
-__642:
+__644:
;
- goto __641
-__640:
+ goto __643
+__642:
zDb1 = uintptr(0) // Not needed. Silence a compiler warning.
pTab1 = uintptr(0) // Not needed. Silence a compiler warning.
-__641:
+__643:
;
// Invoke the pre-update-hook if required.
if !(((*Sqlite3)(unsafe.Pointer(db)).FxPreUpdateCallback != 0) && (*(*uintptr)(unsafe.Pointer(pOp + 16 /* &.p4 */)) != 0)) {
- goto __643
+ goto __645
}
Xsqlite3VdbePreUpdateHook(tls, p, pC11,
@@ -69696,14 +71714,14 @@ __641:
return SQLITE_DELETE
}(),
zDb1, pTab1, (*VdbeCursor)(unsafe.Pointer(pC11)).FmovetoTarget,
- (*Op)(unsafe.Pointer(pOp)).Fp3)
-__643:
+ (*Op)(unsafe.Pointer(pOp)).Fp3, -1)
+__645:
;
if !((opflags & OPFLAG_ISNOOP) != 0) {
- goto __644
+ goto __646
}
goto __8
-__644:
+__646:
;
// Only flags that can be set are SAVEPOISTION and AUXDELETE
@@ -69712,26 +71730,28 @@ __644:
(*VdbeCursor)(unsafe.Pointer(pC11)).FcacheStatus = U32(CACHE_STALE)
(*VdbeCursor)(unsafe.Pointer(pC11)).FseekResult = 0
if !(rc != 0) {
- goto __645
+ goto __647
}
goto abort_due_to_error
-__645:
+__647:
;
// Invoke the update-hook if required.
if !((opflags & OPFLAG_NCHANGE) != 0) {
- goto __646
+ goto __648
}
(*Vdbe)(unsafe.Pointer(p)).FnChange++
if !(((*Sqlite3)(unsafe.Pointer(db)).FxUpdateCallback != 0) && (((*Table)(unsafe.Pointer((pTab1))).FtabFlags & U32(TF_WithoutRowid)) == U32(0))) {
- goto __647
+ goto __649
}
- (*(*func(*libc.TLS, uintptr, int32, uintptr, uintptr, Sqlite_int64))(unsafe.Pointer((db + 312 /* &.xUpdateCallback */))))(tls, (*Sqlite3)(unsafe.Pointer(db)).FpUpdateArg, SQLITE_DELETE, zDb1, (*Table)(unsafe.Pointer(pTab1)).FzName,
+ (*struct {
+ f func(*libc.TLS, uintptr, int32, uintptr, uintptr, Sqlite_int64)
+ })(unsafe.Pointer(&struct{ uintptr }{(*Sqlite3)(unsafe.Pointer(db)).FxUpdateCallback})).f(tls, (*Sqlite3)(unsafe.Pointer(db)).FpUpdateArg, SQLITE_DELETE, zDb1, (*Table)(unsafe.Pointer(pTab1)).FzName,
(*VdbeCursor)(unsafe.Pointer(pC11)).FmovetoTarget)
-__647:
+__649:
;
-__646:
+__648:
;
goto __8
@@ -69742,7 +71762,7 @@ __646:
// change counter (returned by subsequent calls to sqlite3_changes()).
// Then the VMs internal change counter resets to 0.
// This is used by trigger programs.
-__106:
+__107:
Xsqlite3VdbeSetChanges(tls, db, (*Vdbe)(unsafe.Pointer(p)).FnChange)
(*Vdbe)(unsafe.Pointer(p)).FnChange = 0
goto __8
@@ -69761,7 +71781,7 @@ __106:
//
// Fall through to next instruction if the two records compare equal to
// each other. Jump to P2 if they are different.
-__107:
+__108:
pC12 = *(*uintptr)(unsafe.Pointer((*Vdbe)(unsafe.Pointer(p)).FapCsr + uintptr((*Op)(unsafe.Pointer(pOp)).Fp1)*8))
@@ -69771,16 +71791,16 @@ __107:
rc = Xsqlite3VdbeSorterCompare(tls, pC12, pIn3, nKeyCol, bp+512 /* &res7 */)
if !(rc != 0) {
- goto __648
+ goto __650
}
goto abort_due_to_error
-__648:
+__650:
;
if !(*(*int32)(unsafe.Pointer(bp + 512 /* res7 */)) != 0) {
- goto __649
+ goto __651
}
goto jump_to_p2
-__649:
+__651:
;
goto __8
@@ -69795,7 +71815,7 @@ __649:
// OpenPseudo. That pseudo-table cursor is the one that is identified by
// parameter P3. Clearing the P3 column cache as part of this opcode saves
// us from having to issue a separate NullRow instruction to clear that cache.
-__108:
+__109:
pOut = (aMem + uintptr((*Op)(unsafe.Pointer(pOp)).Fp2)*56)
pC13 = *(*uintptr)(unsafe.Pointer((*Vdbe)(unsafe.Pointer(p)).FapCsr + uintptr((*Op)(unsafe.Pointer(pOp)).Fp1)*8))
@@ -69803,10 +71823,10 @@ __108:
rc = Xsqlite3VdbeSorterRowkey(tls, pC13, pOut)
if !(rc != 0) {
- goto __650
+ goto __652
}
goto abort_due_to_error
-__650:
+__652:
;
(*VdbeCursor)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer((*Vdbe)(unsafe.Pointer(p)).FapCsr + uintptr((*Op)(unsafe.Pointer(pOp)).Fp3)*8)))).FcacheStatus = U32(CACHE_STALE)
goto __8
@@ -69838,7 +71858,7 @@ __650:
// in OP_Result and any OP_Result will invalidate the P2 register content.
// The P2 register content is invalidated by opcodes like OP_Function or
// by any use of another cursor pointing to the same table.
-__109:
+__110:
pOut = out2Prerelease(tls, p, pOp)
@@ -69856,29 +71876,29 @@ __109:
n3 = Xsqlite3BtreePayloadSize(tls, pCrsr3)
if !(n3 > U32(*(*int32)(unsafe.Pointer((db + 128 /* &.aLimit */))))) {
- goto __651
+ goto __653
}
goto too_big
-__651:
+__653:
;
rc = Xsqlite3VdbeMemFromBtreeZeroOffset(tls, pCrsr3, n3, pOut)
if !(rc != 0) {
- goto __652
+ goto __654
}
goto abort_due_to_error
-__652:
+__654:
;
if !(!((*Op)(unsafe.Pointer(pOp)).Fp3 != 0)) {
- goto __653
+ goto __655
}
if !(((int32((*Mem)(unsafe.Pointer((pOut))).Fflags) & MEM_Ephem) != 0) && (Xsqlite3VdbeMemMakeWriteable(tls, pOut) != 0)) {
- goto __654
+ goto __656
}
goto no_mem
-__654:
+__656:
;
-__653:
+__655:
;
goto __8
@@ -69892,65 +71912,67 @@ __653:
// P1 can be either an ordinary table or a virtual table. There used to
// be a separate OP_VRowid opcode for use with virtual tables, but this
// one opcode now works for both table types.
-__110:
+__111:
pOut = out2Prerelease(tls, p, pOp)
pC15 = *(*uintptr)(unsafe.Pointer((*Vdbe)(unsafe.Pointer(p)).FapCsr + uintptr((*Op)(unsafe.Pointer(pOp)).Fp1)*8))
if !((*VdbeCursor)(unsafe.Pointer(pC15)).FnullRow != 0) {
- goto __655
+ goto __657
}
(*Mem)(unsafe.Pointer(pOut)).Fflags = U16(MEM_Null)
goto __8
- goto __656
-__655:
+ goto __658
+__657:
if !((*VdbeCursor)(unsafe.Pointer(pC15)).FdeferredMoveto != 0) {
- goto __657
+ goto __659
}
*(*I64)(unsafe.Pointer(bp + 520 /* v3 */)) = (*VdbeCursor)(unsafe.Pointer(pC15)).FmovetoTarget
- goto __658
-__657:
+ goto __660
+__659:
if !(int32((*VdbeCursor)(unsafe.Pointer(pC15)).FeCurType) == CURTYPE_VTAB) {
- goto __659
+ goto __661
}
pVtab = (*Sqlite3_vtab_cursor)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(pC15 + 56 /* &.uc */)))).FpVtab
pModule = (*Sqlite3_vtab)(unsafe.Pointer(pVtab)).FpModule
- rc = (*(*func(*libc.TLS, uintptr, uintptr) int32)(unsafe.Pointer((pModule + 96 /* &.xRowid */))))(tls, *(*uintptr)(unsafe.Pointer(pC15 + 56 /* &.uc */)), bp+520 /* &v3 */)
+ rc = (*struct {
+ f func(*libc.TLS, uintptr, uintptr) int32
+ })(unsafe.Pointer(&struct{ uintptr }{(*Sqlite3_module)(unsafe.Pointer(pModule)).FxRowid})).f(tls, *(*uintptr)(unsafe.Pointer(pC15 + 56 /* &.uc */)), bp+520 /* &v3 */)
Xsqlite3VtabImportErrmsg(tls, p, pVtab)
if !(rc != 0) {
- goto __661
+ goto __663
}
goto abort_due_to_error
-__661:
+__663:
;
- goto __660
-__659:
+ goto __662
+__661:
;
rc = Xsqlite3VdbeCursorRestore(tls, pC15)
if !(rc != 0) {
- goto __662
+ goto __664
}
goto abort_due_to_error
-__662:
+__664:
;
if !((*VdbeCursor)(unsafe.Pointer(pC15)).FnullRow != 0) {
- goto __663
+ goto __665
}
(*Mem)(unsafe.Pointer(pOut)).Fflags = U16(MEM_Null)
goto __8
-__663:
+__665:
;
*(*I64)(unsafe.Pointer(bp + 520 /* v3 */)) = Xsqlite3BtreeIntegerKey(tls, *(*uintptr)(unsafe.Pointer(pC15 + 56 /* &.uc */)))
+__662:
+ ;
__660:
;
__658:
;
-__656:
- ;
*(*I64)(unsafe.Pointer(pOut /* &.u */)) = *(*I64)(unsafe.Pointer(bp + 520 /* v3 */))
goto __8
@@ -69959,18 +71981,18 @@ __656:
// Move the cursor P1 to a null row. Any OP_Column operations
// that occur while the cursor is on the null row will always
// write a NULL.
-__111:
+__112:
;
pC16 = *(*uintptr)(unsafe.Pointer((*Vdbe)(unsafe.Pointer(p)).FapCsr + uintptr((*Op)(unsafe.Pointer(pOp)).Fp1)*8))
(*VdbeCursor)(unsafe.Pointer(pC16)).FnullRow = U8(1)
(*VdbeCursor)(unsafe.Pointer(pC16)).FcacheStatus = U32(CACHE_STALE)
if !(int32((*VdbeCursor)(unsafe.Pointer(pC16)).FeCurType) == CURTYPE_BTREE) {
- goto __664
+ goto __666
}
Xsqlite3BtreeClearCursor(tls, *(*uintptr)(unsafe.Pointer(pC16 + 56 /* &.uc */)))
-__664:
+__666:
;
goto __8
@@ -69994,8 +72016,8 @@ __664:
// This opcode leaves the cursor configured to move in reverse order,
// from the end toward the beginning. In other words, the cursor is
// configured to use Prev, not Next.
-__112:
__113:
+__114:
;
pC17 = *(*uintptr)(unsafe.Pointer((*Vdbe)(unsafe.Pointer(p)).FapCsr + uintptr((*Op)(unsafe.Pointer(pOp)).Fp1)*8))
@@ -70003,39 +72025,39 @@ __113:
*(*int32)(unsafe.Pointer(bp + 528 /* res8 */)) = 0
if !(int32((*Op)(unsafe.Pointer(pOp)).Fopcode) == OP_SeekEnd) {
- goto __665
+ goto __667
}
(*VdbeCursor)(unsafe.Pointer(pC17)).FseekResult = -1
if !(Xsqlite3BtreeCursorIsValidNN(tls, pCrsr4) != 0) {
- goto __666
+ goto __668
}
goto __8
-__666:
+__668:
;
-__665:
+__667:
;
rc = Xsqlite3BtreeLast(tls, pCrsr4, bp+528 /* &res8 */)
(*VdbeCursor)(unsafe.Pointer(pC17)).FnullRow = U8(*(*int32)(unsafe.Pointer(bp + 528 /* res8 */)))
(*VdbeCursor)(unsafe.Pointer(pC17)).FdeferredMoveto = U8(0)
(*VdbeCursor)(unsafe.Pointer(pC17)).FcacheStatus = U32(CACHE_STALE)
if !(rc != 0) {
- goto __667
+ goto __669
}
goto abort_due_to_error
-__667:
+__669:
;
if !((*Op)(unsafe.Pointer(pOp)).Fp2 > 0) {
- goto __668
+ goto __670
}
if !(*(*int32)(unsafe.Pointer(bp + 528 /* res8 */)) != 0) {
- goto __669
+ goto __671
}
goto jump_to_p2
-__669:
+__671:
;
-__668:
+__670:
;
goto __8
@@ -70043,7 +72065,7 @@ __668:
//
// Estimate the number of rows in the table P1. Jump to P2 if that
// estimate is less than approximately 2**(0.1*P3).
-__114:
+__115:
;
pC18 = *(*uintptr)(unsafe.Pointer((*Vdbe)(unsafe.Pointer(p)).FapCsr + uintptr((*Op)(unsafe.Pointer(pOp)).Fp1)*8))
@@ -70051,29 +72073,29 @@ __114:
rc = Xsqlite3BtreeFirst(tls, pCrsr5, bp+532 /* &res9 */)
if !(rc != 0) {
- goto __670
+ goto __672
}
goto abort_due_to_error
-__670:
+__672:
;
if !(*(*int32)(unsafe.Pointer(bp + 532 /* res9 */)) == 0) {
- goto __671
+ goto __673
}
sz = Xsqlite3BtreeRowCountEst(tls, pCrsr5)
if !((sz >= int64(0)) && (int32(Xsqlite3LogEst(tls, U64(sz))) < (*Op)(unsafe.Pointer(pOp)).Fp3)) {
- goto __672
+ goto __674
}
*(*int32)(unsafe.Pointer(bp + 532 /* res9 */)) = 1
-__672:
+__674:
;
-__671:
+__673:
;
if !(*(*int32)(unsafe.Pointer(bp + 532 /* res9 */)) != 0) {
- goto __673
+ goto __675
}
goto jump_to_p2
-__673:
+__675:
;
goto __8
@@ -70096,8 +72118,8 @@ __673:
// rewinding so that the global variable will be incremented and
// regression tests can determine whether or not the optimizer is
// correctly optimizing out sorts.
-__115: // jump
__116: // jump
+__117: // jump
*(*U32)(unsafe.Pointer((p + 212 /* &.aCounter */) + 2*4))++
// Opcode: Rewind P1 P2 * * *
@@ -70111,39 +72133,39 @@ __116: // jump
// This opcode leaves the cursor configured to move in forward order,
// from the beginning toward the end. In other words, the cursor is
// configured to use Next, not Prev.
-__117:
+__118:
;
pC19 = *(*uintptr)(unsafe.Pointer((*Vdbe)(unsafe.Pointer(p)).FapCsr + uintptr((*Op)(unsafe.Pointer(pOp)).Fp1)*8))
*(*int32)(unsafe.Pointer(bp + 536 /* res10 */)) = 1
if !(int32((*VdbeCursor)(unsafe.Pointer((pC19))).FeCurType) == CURTYPE_SORTER) {
- goto __674
+ goto __676
}
rc = Xsqlite3VdbeSorterRewind(tls, pC19, bp+536 /* &res10 */)
- goto __675
-__674:
+ goto __677
+__676:
;
pCrsr6 = *(*uintptr)(unsafe.Pointer(pC19 + 56 /* &.uc */))
rc = Xsqlite3BtreeFirst(tls, pCrsr6, bp+536 /* &res10 */)
(*VdbeCursor)(unsafe.Pointer(pC19)).FdeferredMoveto = U8(0)
(*VdbeCursor)(unsafe.Pointer(pC19)).FcacheStatus = U32(CACHE_STALE)
-__675:
+__677:
;
if !(rc != 0) {
- goto __676
+ goto __678
}
goto abort_due_to_error
-__676:
+__678:
;
(*VdbeCursor)(unsafe.Pointer(pC19)).FnullRow = U8(*(*int32)(unsafe.Pointer(bp + 536 /* res10 */)))
if !(*(*int32)(unsafe.Pointer(bp + 536 /* res10 */)) != 0) {
- goto __677
+ goto __679
}
goto jump_to_p2
-__677:
+__679:
;
goto __8
@@ -70204,14 +72226,14 @@ __677:
// sorter object for which the OP_SorterSort opcode has been
// invoked. This opcode advances the cursor to the next sorted
// record, or jumps to P2 if there are no more sorted records.
-__118:
+__119:
pC20 = *(*uintptr)(unsafe.Pointer((*Vdbe)(unsafe.Pointer(p)).FapCsr + uintptr((*Op)(unsafe.Pointer(pOp)).Fp1)*8))
rc = Xsqlite3VdbeSorterNext(tls, db, pC20)
goto next_tail
-__119: // jump
__120: // jump
+__121: // jump
;
pC20 = *(*uintptr)(unsafe.Pointer((*Vdbe)(unsafe.Pointer(p)).FapCsr + uintptr((*Op)(unsafe.Pointer(pOp)).Fp1)*8))
@@ -70219,23 +72241,25 @@ __120: // jump
// The Next opcode is only used after SeekGT, SeekGE, Rewind, and Found.
// The Prev opcode is only used after SeekLT, SeekLE, and Last.
- rc = (*(*func(*libc.TLS, uintptr, int32) int32)(unsafe.Pointer((pOp + 16 /* &.p4 */ /* &.xAdvance */))))(tls, *(*uintptr)(unsafe.Pointer(pC20 + 56 /* &.uc */)), (*Op)(unsafe.Pointer(pOp)).Fp3)
+ rc = (*struct {
+ f func(*libc.TLS, uintptr, int32) int32
+ })(unsafe.Pointer(&struct{ uintptr }{*(*uintptr)(unsafe.Pointer(pOp + 16 /* &.p4 */))})).f(tls, *(*uintptr)(unsafe.Pointer(pC20 + 56 /* &.uc */)), (*Op)(unsafe.Pointer(pOp)).Fp3)
next_tail:
(*VdbeCursor)(unsafe.Pointer(pC20)).FcacheStatus = U32(CACHE_STALE)
if !(rc == SQLITE_OK) {
- goto __678
+ goto __680
}
(*VdbeCursor)(unsafe.Pointer(pC20)).FnullRow = U8(0)
*(*U32)(unsafe.Pointer((p + 212 /* &.aCounter */) + uintptr((*Op)(unsafe.Pointer(pOp)).Fp5)*4))++
goto jump_to_p2_and_check_for_interrupt
-__678:
+__680:
;
if !(rc != SQLITE_DONE) {
- goto __679
+ goto __681
}
goto abort_due_to_error
-__679:
+__681:
;
rc = SQLITE_OK
(*VdbeCursor)(unsafe.Pointer(pC20)).FnullRow = U8(1)
@@ -70268,17 +72292,17 @@ __679:
//
// This instruction only works for indices. The equivalent instruction
// for tables is OP_Insert.
-__121:
+__122:
;
pC21 = *(*uintptr)(unsafe.Pointer((*Vdbe)(unsafe.Pointer(p)).FapCsr + uintptr((*Op)(unsafe.Pointer(pOp)).Fp1)*8))
pIn2 = (aMem + uintptr((*Op)(unsafe.Pointer(pOp)).Fp2)*56)
if !((int32((*Op)(unsafe.Pointer(pOp)).Fp5) & OPFLAG_NCHANGE) != 0) {
- goto __680
+ goto __682
}
(*Vdbe)(unsafe.Pointer(p)).FnChange++
-__680:
+__682:
;
rc = func() int32 {
@@ -70288,10 +72312,10 @@ __680:
return 0
}()
if !(rc != 0) {
- goto __681
+ goto __683
}
goto abort_due_to_error
-__681:
+__683:
;
(*BtreePayload)(unsafe.Pointer(bp + 544 /* &x2 */)).FnKey = Sqlite3_int64((*Mem)(unsafe.Pointer(pIn2)).Fn)
(*BtreePayload)(unsafe.Pointer(bp + 544 /* &x2 */)).FpKey = (*Mem)(unsafe.Pointer(pIn2)).Fz
@@ -70308,10 +72332,10 @@ __681:
(*VdbeCursor)(unsafe.Pointer(pC21)).FcacheStatus = U32(CACHE_STALE)
if !(rc != 0) {
- goto __682
+ goto __684
}
goto abort_due_to_error
-__682:
+__684:
;
goto __8
@@ -70321,7 +72345,7 @@ __682:
// Register P2 holds an SQL index key made using the
// MakeRecord instructions. This opcode writes that key
// into the sorter P1. Data for the entry is nil.
-__122:
+__123:
;
pC22 = *(*uintptr)(unsafe.Pointer((*Vdbe)(unsafe.Pointer(p)).FapCsr + uintptr((*Op)(unsafe.Pointer(pOp)).Fp1)*8))
@@ -70334,17 +72358,17 @@ __122:
return 0
}()
if !(rc != 0) {
- goto __683
+ goto __685
}
goto abort_due_to_error
-__683:
+__685:
;
rc = Xsqlite3VdbeSorterWrite(tls, pC22, pIn2)
if !(rc != 0) {
- goto __684
+ goto __686
}
goto abort_due_to_error
-__684:
+__686:
;
goto __8
@@ -70361,7 +72385,7 @@ __684:
// or deleted is not found. For some uses of IdxDelete
// (example: the EXCEPT operator) it does not matter that no matching
// entry is found. For those cases, P5 is zero.
-__123:
+__124:
;
pC23 = *(*uintptr)(unsafe.Pointer((*Vdbe)(unsafe.Pointer(p)).FapCsr + uintptr((*Op)(unsafe.Pointer(pOp)).Fp1)*8))
@@ -70374,31 +72398,31 @@ __123:
(*UnpackedRecord)(unsafe.Pointer(bp + 592 /* &r3 */)).FaMem = (aMem + uintptr((*Op)(unsafe.Pointer(pOp)).Fp2)*56)
rc = Xsqlite3BtreeMovetoUnpacked(tls, pCrsr7, bp+592 /* &r3 */, int64(0), 0, bp+616 /* &res11 */)
if !(rc != 0) {
- goto __685
+ goto __687
}
goto abort_due_to_error
-__685:
+__687:
;
if !(*(*int32)(unsafe.Pointer(bp + 616 /* res11 */)) == 0) {
- goto __686
+ goto __688
}
rc = Xsqlite3BtreeDelete(tls, pCrsr7, uint8(BTREE_AUXDELETE))
if !(rc != 0) {
- goto __688
+ goto __690
}
goto abort_due_to_error
-__688:
+__690:
;
- goto __687
-__686:
+ goto __689
+__688:
if !((*Op)(unsafe.Pointer(pOp)).Fp5 != 0) {
- goto __689
+ goto __691
}
- rc = Xsqlite3ReportError(tls, (SQLITE_CORRUPT | (int32(3) << 8)), 91877, ts+4808 /* "index corruption" */)
+ rc = Xsqlite3ReportError(tls, (SQLITE_CORRUPT | (int32(3) << 8)), 92446, ts+4939 /* "index corruption" */)
goto abort_due_to_error
-__689:
+__691:
;
-__687:
+__689:
;
(*VdbeCursor)(unsafe.Pointer(pC23)).FcacheStatus = U32(CACHE_STALE)
@@ -70431,8 +72455,8 @@ __687:
// the rowid of the table entry to which this index entry points.
//
// See also: Rowid, MakeRecord.
-__124:
-__125: // Rowid that P1 current points to
+__125:
+__126: // Rowid that P1 current points to
;
pC24 = *(*uintptr)(unsafe.Pointer((*Vdbe)(unsafe.Pointer(p)).FapCsr + uintptr((*Op)(unsafe.Pointer(pOp)).Fp1)*8))
@@ -70445,25 +72469,25 @@ __125: // Rowid that P1 current points to
// out from under the cursor. That will never happens for an IdxRowid
// or Seek opcode
if !(rc != SQLITE_OK) {
- goto __690
+ goto __692
}
goto abort_due_to_error
-__690:
+__692:
;
if !(!(int32((*VdbeCursor)(unsafe.Pointer(pC24)).FnullRow) != 0)) {
- goto __691
+ goto __693
}
*(*I64)(unsafe.Pointer(bp + 624 /* rowid */)) = int64(0) // Not needed. Only used to silence a warning.
rc = Xsqlite3VdbeIdxRowid(tls, db, *(*uintptr)(unsafe.Pointer(pC24 + 56 /* &.uc */)), bp+624 /* &rowid */)
if !(rc != SQLITE_OK) {
- goto __693
+ goto __695
}
goto abort_due_to_error
-__693:
+__695:
;
if !(int32((*Op)(unsafe.Pointer(pOp)).Fopcode) == OP_DeferredSeek) {
- goto __694
+ goto __696
}
pTabCur = *(*uintptr)(unsafe.Pointer((*Vdbe)(unsafe.Pointer(p)).FapCsr + uintptr((*Op)(unsafe.Pointer(pOp)).Fp3)*8))
@@ -70475,17 +72499,17 @@ __693:
(*VdbeCursor)(unsafe.Pointer(pTabCur)).FaAltMap = *(*uintptr)(unsafe.Pointer(pOp + 16 /* &.p4 */))
(*VdbeCursor)(unsafe.Pointer(pTabCur)).FpAltCursor = pC24
- goto __695
-__694:
+ goto __697
+__696:
pOut = out2Prerelease(tls, p, pOp)
*(*I64)(unsafe.Pointer(pOut /* &.u */)) = *(*I64)(unsafe.Pointer(bp + 624 /* rowid */))
-__695:
+__697:
;
- goto __692
-__691:
+ goto __694
+__693:
;
Xsqlite3VdbeMemSetNull(tls, (aMem + uintptr((*Op)(unsafe.Pointer(pOp)).Fp2)*56))
-__692:
+__694:
;
goto __8
@@ -70494,21 +72518,21 @@ __692:
// If cursor P1 was previously moved via OP_DeferredSeek, complete that
// seek operation now, without further delay. If the cursor seek has
// already occurred, this instruction is a no-op.
-__126: // The P1 index cursor
+__127: // The P1 index cursor
;
pC25 = *(*uintptr)(unsafe.Pointer((*Vdbe)(unsafe.Pointer(p)).FapCsr + uintptr((*Op)(unsafe.Pointer(pOp)).Fp1)*8))
if !((*VdbeCursor)(unsafe.Pointer(pC25)).FdeferredMoveto != 0) {
- goto __696
+ goto __698
}
rc = Xsqlite3VdbeFinishMoveto(tls, pC25)
if !(rc != 0) {
- goto __697
+ goto __699
}
goto abort_due_to_error
-__697:
+__699:
;
-__696:
+__698:
;
goto __8
@@ -70552,25 +72576,25 @@ __696:
//
// If the P1 index entry is less than or equal to the key value then jump
// to P2. Otherwise fall through to the next instruction.
-__127: // jump
__128: // jump
__129: // jump
-__130:
+__130: // jump
+__131:
;
pC26 = *(*uintptr)(unsafe.Pointer((*Vdbe)(unsafe.Pointer(p)).FapCsr + uintptr((*Op)(unsafe.Pointer(pOp)).Fp1)*8))
(*UnpackedRecord)(unsafe.Pointer(bp + 688 /* &r4 */)).FpKeyInfo = (*VdbeCursor)(unsafe.Pointer(pC26)).FpKeyInfo
(*UnpackedRecord)(unsafe.Pointer(bp + 688 /* &r4 */)).FnField = U16(*(*int32)(unsafe.Pointer(pOp + 16 /* &.p4 */)))
if !(int32((*Op)(unsafe.Pointer(pOp)).Fopcode) < OP_IdxLT) {
- goto __698
+ goto __700
}
(*UnpackedRecord)(unsafe.Pointer(bp + 688 /* &r4 */)).Fdefault_rc = int8(-1)
- goto __699
-__698:
+ goto __701
+__700:
;
(*UnpackedRecord)(unsafe.Pointer(bp + 688 /* &r4 */)).Fdefault_rc = int8(0)
-__699:
+__701:
;
(*UnpackedRecord)(unsafe.Pointer(bp + 688 /* &r4 */)).FaMem = (aMem + uintptr((*Op)(unsafe.Pointer(pOp)).Fp3)*56)
@@ -70584,19 +72608,19 @@ __699:
// nCellKey will always be between 0 and 0xffffffff because of the way
// that btreeParseCellPtr() and sqlite3GetVarint32() are implemented
if !((nCellKey <= int64(0)) || (nCellKey > int64(0x7fffffff))) {
- goto __700
+ goto __702
}
- rc = Xsqlite3CorruptError(tls, 92081)
+ rc = Xsqlite3CorruptError(tls, 92650)
goto abort_due_to_error
-__700:
+__702:
;
Xsqlite3VdbeMemInit(tls, bp+632 /* &m */, db, uint16(0))
rc = Xsqlite3VdbeMemFromBtreeZeroOffset(tls, pCur1, U32(nCellKey), bp+632 /* &m */)
if !(rc != 0) {
- goto __701
+ goto __703
}
goto abort_due_to_error
-__701:
+__703:
;
res12 = Xsqlite3VdbeRecordCompareWithSkip(tls, (*Mem)(unsafe.Pointer(bp+632 /* &m */)).Fn, (*Mem)(unsafe.Pointer(bp+632 /* &m */)).Fz, bp+688 /* &r4 */, 0)
Xsqlite3VdbeMemRelease(tls, bp+632 /* &m */)
@@ -70604,22 +72628,22 @@ __701:
// End of inlined sqlite3VdbeIdxKeyCompare()
if !((int32((*Op)(unsafe.Pointer(pOp)).Fopcode) & 1) == (OP_IdxLT & 1)) {
- goto __702
+ goto __704
}
res12 = -res12
- goto __703
-__702:
+ goto __705
+__704:
;
res12++
-__703:
+__705:
;
if !(res12 > 0) {
- goto __704
+ goto __706
}
goto jump_to_p2
-__704:
+__706:
;
goto __8
@@ -70649,19 +72673,19 @@ __704:
// and non-autovacuum modes.
//
// See also: Clear
-__131:
+__132:
;
pOut = out2Prerelease(tls, p, pOp)
(*Mem)(unsafe.Pointer(pOut)).Fflags = U16(MEM_Null)
if !((*Sqlite3)(unsafe.Pointer(db)).FnVdbeRead > ((*Sqlite3)(unsafe.Pointer(db)).FnVDestroy + 1)) {
- goto __705
+ goto __707
}
rc = SQLITE_LOCKED
(*Vdbe)(unsafe.Pointer(p)).FerrorAction = U8(OE_Abort)
goto abort_due_to_error
- goto __706
-__705:
+ goto __708
+__707:
iDb2 = (*Op)(unsafe.Pointer(pOp)).Fp3
*(*int32)(unsafe.Pointer(bp + 712 /* iMoved */)) = 0 // Not needed. Only to silence a warning.
@@ -70669,21 +72693,21 @@ __705:
(*Mem)(unsafe.Pointer(pOut)).Fflags = U16(MEM_Int)
*(*I64)(unsafe.Pointer(pOut /* &.u */)) = I64(*(*int32)(unsafe.Pointer(bp + 712 /* iMoved */)))
if !(rc != 0) {
- goto __707
+ goto __709
}
goto abort_due_to_error
-__707:
+__709:
;
if !(*(*int32)(unsafe.Pointer(bp + 712 /* iMoved */)) != 0) {
- goto __708
+ goto __710
}
Xsqlite3RootPageMoved(tls, db, iDb2, uint32(*(*int32)(unsafe.Pointer(bp + 712 /* iMoved */))), uint32((*Op)(unsafe.Pointer(pOp)).Fp1))
// All OP_Destroy operations occur on the same btree
resetSchemaOnFault = (U8(iDb2 + 1))
-__708:
+__710:
;
-__706:
+__708:
;
goto __8
@@ -70697,42 +72721,35 @@ __706:
// P2==1 then the table to be clear is in the auxiliary database file
// that is used to store tables create using CREATE TEMPORARY TABLE.
//
- // If the P3 value is non-zero, then the table referred to must be an
- // intkey table (an SQL table, not an index). In this case the row change
- // count is incremented by the number of rows in the table being cleared.
- // If P3 is greater than zero, then the value stored in register P3 is
- // also incremented by the number of rows in the table being cleared.
+ // If the P3 value is non-zero, then the row change count is incremented
+ // by the number of rows in the table being cleared. If P3 is greater
+ // than zero, then the value stored in register P3 is also incremented
+ // by the number of rows in the table being cleared.
//
// See also: Destroy
-__132:
+__133:
;
*(*int32)(unsafe.Pointer(bp + 716 /* nChange */)) = 0
- rc = Xsqlite3BtreeClearTable(tls,
- (*Db)(unsafe.Pointer((*Sqlite3)(unsafe.Pointer(db)).FaDb+uintptr((*Op)(unsafe.Pointer(pOp)).Fp2)*32)).FpBt, int32(U32((*Op)(unsafe.Pointer(pOp)).Fp1)), func() uintptr {
- if (*Op)(unsafe.Pointer(pOp)).Fp3 != 0 {
- return bp + 716 /* &nChange */
- }
- return uintptr(0)
- }())
+ rc = Xsqlite3BtreeClearTable(tls, (*Db)(unsafe.Pointer((*Sqlite3)(unsafe.Pointer(db)).FaDb+uintptr((*Op)(unsafe.Pointer(pOp)).Fp2)*32)).FpBt, int32(U32((*Op)(unsafe.Pointer(pOp)).Fp1)), bp+716 /* &nChange */)
if !((*Op)(unsafe.Pointer(pOp)).Fp3 != 0) {
- goto __709
+ goto __711
}
*(*int32)(unsafe.Pointer(p + 60 /* &.nChange */)) += (*(*int32)(unsafe.Pointer(bp + 716 /* nChange */)))
if !((*Op)(unsafe.Pointer(pOp)).Fp3 > 0) {
- goto __710
+ goto __712
}
*(*I64)(unsafe.Pointer(aMem + uintptr((*Op)(unsafe.Pointer(pOp)).Fp3)*56 /* &.u */ /* &.i */)) += (I64(*(*int32)(unsafe.Pointer(bp + 716 /* nChange */))))
-__710:
+__712:
;
-__709:
+__711:
;
if !(rc != 0) {
- goto __711
+ goto __713
}
goto abort_due_to_error
-__711:
+__713:
;
goto __8
@@ -70743,26 +72760,26 @@ __711:
//
// This opcode only works for cursors used for sorting and
// opened with OP_OpenEphemeral or OP_SorterOpen.
-__133:
+__134:
;
pC27 = *(*uintptr)(unsafe.Pointer((*Vdbe)(unsafe.Pointer(p)).FapCsr + uintptr((*Op)(unsafe.Pointer(pOp)).Fp1)*8))
if !(int32((*VdbeCursor)(unsafe.Pointer((pC27))).FeCurType) == CURTYPE_SORTER) {
- goto __712
+ goto __714
}
Xsqlite3VdbeSorterReset(tls, db, *(*uintptr)(unsafe.Pointer(pC27 + 56 /* &.uc */)))
- goto __713
-__712:
+ goto __715
+__714:
;
rc = Xsqlite3BtreeClearTableOfCursor(tls, *(*uintptr)(unsafe.Pointer(pC27 + 56 /* &.uc */)))
if !(rc != 0) {
- goto __714
+ goto __716
}
goto abort_due_to_error
-__714:
+__716:
;
-__713:
+__715:
;
goto __8
@@ -70774,7 +72791,7 @@ __713:
// P1>1. The P3 argument must be 1 (BTREE_INTKEY) for a rowid table
// it must be 2 (BTREE_BLOBKEY) for an index or WITHOUT ROWID table.
// The root page number of the new b-tree is stored in register P2.
-__134:
+__135:
;
pOut = out2Prerelease(tls, p, pOp)
*(*Pgno)(unsafe.Pointer(bp + 720 /* pgno */)) = Pgno(0)
@@ -70783,10 +72800,10 @@ __134:
rc = Xsqlite3BtreeCreateTable(tls, (*Db)(unsafe.Pointer(pDb2)).FpBt, bp+720 /* &pgno */, (*Op)(unsafe.Pointer(pOp)).Fp3)
if !(rc != 0) {
- goto __715
+ goto __717
}
goto abort_due_to_error
-__715:
+__717:
;
*(*I64)(unsafe.Pointer(pOut /* &.u */)) = I64(*(*Pgno)(unsafe.Pointer(bp + 720 /* pgno */)))
goto __8
@@ -70794,16 +72811,16 @@ __715:
// Opcode: SqlExec * * * P4 *
//
// Run the SQL statement or statements specified in the P4 string.
-__135:
+__136:
;
(*Sqlite3)(unsafe.Pointer(db)).FnSqlExec++
rc = Xsqlite3_exec(tls, db, *(*uintptr)(unsafe.Pointer(pOp + 16 /* &.p4 */)), uintptr(0), uintptr(0), uintptr(0))
(*Sqlite3)(unsafe.Pointer(db)).FnSqlExec--
if !(rc != 0) {
- goto __716
+ goto __718
}
goto abort_due_to_error
-__716:
+__718:
;
goto __8
@@ -70815,7 +72832,7 @@ __716:
//
// This opcode invokes the parser to create a new virtual machine,
// then runs the new virtual machine. It is thus a re-entrant opcode.
-__136:
+__137:
// Any prepared statement that invokes this opcode will hold mutexes
// on every btree. This is a prerequisite for invoking
@@ -70824,31 +72841,31 @@ __136:
iDb3 = (*Op)(unsafe.Pointer(pOp)).Fp1
if !(*(*uintptr)(unsafe.Pointer(pOp + 16 /* &.p4 */)) == uintptr(0)) {
- goto __717
+ goto __719
}
Xsqlite3SchemaClear(tls, (*Db)(unsafe.Pointer((*Sqlite3)(unsafe.Pointer(db)).FaDb+uintptr(iDb3)*32)).FpSchema)
*(*U32)(unsafe.Pointer(db + 44 /* &.mDbFlags */)) &= (libc.Uint32FromInt32(libc.CplInt32(DBFLAG_SchemaKnownOk)))
rc = Xsqlite3InitOne(tls, db, iDb3, (p + 168 /* &.zErrMsg */), uint32((*Op)(unsafe.Pointer(pOp)).Fp5))
*(*U32)(unsafe.Pointer(db + 44 /* &.mDbFlags */)) |= (U32(DBFLAG_SchemaChange))
- libc.SetBitFieldPtr16Uint32(p+200 /* &.expired */, Bft(0), 0, 0x3)
- goto __718
-__717:
+ libc.SetBitFieldPtr16Uint32(p+200 /* &.expired */, Bft(0), 14, 0xc000)
+ goto __720
+__719:
- zSchema = ts + 4825 /* "sqlite_master" */
+ zSchema = ts + 4956 /* "sqlite_master" */
(*InitData)(unsafe.Pointer(bp + 728 /* &initData */)).Fdb = db
(*InitData)(unsafe.Pointer(bp + 728 /* &initData */)).FiDb = iDb3
(*InitData)(unsafe.Pointer(bp + 728 /* &initData */)).FpzErrMsg = (p + 168 /* &.zErrMsg */)
(*InitData)(unsafe.Pointer(bp + 728 /* &initData */)).FmInitFlags = U32(0)
(*InitData)(unsafe.Pointer(bp + 728 /* &initData */)).FmxPage = Xsqlite3BtreeLastPage(tls, (*Db)(unsafe.Pointer((*Sqlite3)(unsafe.Pointer(db)).FaDb+uintptr(iDb3)*32)).FpBt)
zSql = Xsqlite3MPrintf(tls, db,
- ts+4839, /* "SELECT*FROM\"%w\"...." */
+ ts+4970, /* "SELECT*FROM\"%w\"...." */
libc.VaList(bp+64, (*Db)(unsafe.Pointer((*Sqlite3)(unsafe.Pointer(db)).FaDb+uintptr(iDb3)*32)).FzDbSName, zSchema, *(*uintptr)(unsafe.Pointer(pOp + 16 /* &.p4 */))))
if !(zSql == uintptr(0)) {
- goto __719
+ goto __721
}
rc = SQLITE_NOMEM
- goto __720
-__719:
+ goto __722
+__721:
;
(*Sqlite3)(unsafe.Pointer(db)).Finit.Fbusy = U8(1)
(*InitData)(unsafe.Pointer(bp + 728 /* &initData */)).Frc = SQLITE_OK
@@ -70858,38 +72875,38 @@ __719:
f func(*libc.TLS, uintptr, int32, uintptr, uintptr) int32
}{Xsqlite3InitCallback})), bp+728 /* &initData */, uintptr(0))
if !(rc == SQLITE_OK) {
- goto __721
+ goto __723
}
rc = (*InitData)(unsafe.Pointer(bp + 728 /* &initData */)).Frc
-__721:
+__723:
;
if !((rc == SQLITE_OK) && ((*InitData)(unsafe.Pointer(bp+728 /* &initData */)).FnInitRow == U32(0))) {
- goto __722
+ goto __724
}
// The OP_ParseSchema opcode with a non-NULL P4 argument should parse
// at least one SQL statement. Any less than that indicates that
// the sqlite_schema table is corrupt.
- rc = Xsqlite3CorruptError(tls, 92334)
-__722:
+ rc = Xsqlite3CorruptError(tls, 92902)
+__724:
;
Xsqlite3DbFreeNN(tls, db, zSql)
(*Sqlite3)(unsafe.Pointer(db)).Finit.Fbusy = U8(0)
-__720:
+__722:
;
-__718:
+__720:
;
if !(rc != 0) {
- goto __723
+ goto __725
}
Xsqlite3ResetAllSchemasOfConnection(tls, db)
if !(rc == SQLITE_NOMEM) {
- goto __724
+ goto __726
}
goto no_mem
-__724:
+__726:
;
goto abort_due_to_error
-__723:
+__725:
;
goto __8
@@ -70898,14 +72915,14 @@ __723:
// Read the sqlite_stat1 table for database P1 and load the content
// of that table into the internal index hash table. This will cause
// the analysis to be used when preparing all subsequent queries.
-__137:
+__138:
;
rc = Xsqlite3AnalysisLoad(tls, db, (*Op)(unsafe.Pointer(pOp)).Fp1)
if !(rc != 0) {
- goto __725
+ goto __727
}
goto abort_due_to_error
-__725:
+__727:
;
goto __8
@@ -70916,7 +72933,7 @@ __725:
// is dropped from disk (using the Destroy opcode) in order to keep
// the internal representation of the
// schema consistent with what is on disk.
-__138:
+__139:
;
Xsqlite3UnlinkAndDeleteTable(tls, db, (*Op)(unsafe.Pointer(pOp)).Fp1, *(*uintptr)(unsafe.Pointer(pOp + 16 /* &.p4 */)))
goto __8
@@ -70928,7 +72945,7 @@ __138:
// is dropped from disk (using the Destroy opcode)
// in order to keep the internal representation of the
// schema consistent with what is on disk.
-__139:
+__140:
;
Xsqlite3UnlinkAndDeleteIndex(tls, db, (*Op)(unsafe.Pointer(pOp)).Fp1, *(*uintptr)(unsafe.Pointer(pOp + 16 /* &.p4 */)))
goto __8
@@ -70940,7 +72957,7 @@ __139:
// is dropped from disk (using the Destroy opcode) in order to keep
// the internal representation of the
// schema consistent with what is on disk.
-__140:
+__141:
;
Xsqlite3UnlinkAndDeleteTrigger(tls, db, (*Op)(unsafe.Pointer(pOp)).Fp1, *(*uintptr)(unsafe.Pointer(pOp + 16 /* &.p4 */)))
goto __8
@@ -70963,7 +72980,7 @@ __140:
// file, not the main database file.
//
// This opcode is used to implement the integrity_check pragma.
-__141: // Register keeping track of errors remaining
+__142: // Register keeping track of errors remaining
;
nRoot = (*Op)(unsafe.Pointer(pOp)).Fp2
@@ -70977,22 +72994,22 @@ __141: // Register keeping track of errors remaining
(int32(*(*I64)(unsafe.Pointer(pnErr /* &.u */))) + 1), bp+768 /* &nErr */)
Xsqlite3VdbeMemSetNull(tls, pIn1)
if !(*(*int32)(unsafe.Pointer(bp + 768 /* nErr */)) == 0) {
- goto __726
+ goto __728
}
- goto __727
-__726:
+ goto __729
+__728:
if !(z == uintptr(0)) {
- goto __728
+ goto __730
}
goto no_mem
- goto __729
-__728:
+ goto __731
+__730:
*(*I64)(unsafe.Pointer(pnErr /* &.u */ /* &.i */)) -= (I64(*(*int32)(unsafe.Pointer(bp + 768 /* nErr */)) - 1))
- Xsqlite3VdbeMemSetStr(tls, pIn1, z, -1, uint8(SQLITE_UTF8), *(*uintptr)(unsafe.Pointer(&struct{ f func(*libc.TLS, uintptr) }{Xsqlite3_free})))
-__729:
+ Xsqlite3VdbeMemSetStr(tls, pIn1, z, int64(-1), uint8(SQLITE_UTF8), *(*uintptr)(unsafe.Pointer(&struct{ f func(*libc.TLS, uintptr) }{Xsqlite3_free})))
+__731:
;
-__727:
+__729:
;
Xsqlite3VdbeChangeEncoding(tls, pIn1, int32(encoding))
@@ -71005,20 +73022,20 @@ __727:
// held in register P1.
//
// An assertion fails if P2 is not an integer.
-__142: // in1, in2
+__143: // in1, in2
pIn1 = (aMem + uintptr((*Op)(unsafe.Pointer(pOp)).Fp1)*56)
pIn2 = (aMem + uintptr((*Op)(unsafe.Pointer(pOp)).Fp2)*56)
if !((int32((*Mem)(unsafe.Pointer(pIn1)).Fflags) & MEM_Blob) == 0) {
- goto __730
+ goto __732
}
if !(Xsqlite3VdbeMemSetRowSet(tls, pIn1) != 0) {
- goto __731
+ goto __733
}
goto no_mem
-__731:
+__733:
;
-__730:
+__732:
;
Xsqlite3RowSetInsert(tls, (*Mem)(unsafe.Pointer(pIn1)).Fz, *(*I64)(unsafe.Pointer(pIn2 /* &.u */)))
@@ -71031,24 +73048,24 @@ __730:
// and put that value into register P3.
// Or, if RowSet object P1 is initially empty, leave P3
// unchanged and jump to instruction P2.
-__143:
+__144:
pIn1 = (aMem + uintptr((*Op)(unsafe.Pointer(pOp)).Fp1)*56)
if !(((int32((*Mem)(unsafe.Pointer(pIn1)).Fflags) & MEM_Blob) == 0) ||
(Xsqlite3RowSetNext(tls, (*Mem)(unsafe.Pointer(pIn1)).Fz, bp+776 /* &val */) == 0)) {
- goto __732
+ goto __734
}
// The boolean index is empty
Xsqlite3VdbeMemSetNull(tls, pIn1)
goto jump_to_p2_and_check_for_interrupt
- goto __733
-__732:
+ goto __735
+__734:
// A value was pulled from the index
;
Xsqlite3VdbeMemSetInt64(tls, (aMem + uintptr((*Op)(unsafe.Pointer(pOp)).Fp3)*56), *(*I64)(unsafe.Pointer(bp + 776 /* val */)))
-__733:
+__735:
;
goto check_for_interrupt
@@ -71074,7 +73091,7 @@ __733:
// inserted, there is no need to search to see if the same value was
// previously inserted as part of set X (only if it was previously
// inserted as part of some other set).
-__144:
+__145:
pIn1 = (aMem + uintptr((*Op)(unsafe.Pointer(pOp)).Fp1)*56)
pIn3 = (aMem + uintptr((*Op)(unsafe.Pointer(pOp)).Fp3)*56)
@@ -71083,35 +73100,35 @@ __144:
// If there is anything other than a rowset object in memory cell P1,
// delete it now and initialize P1 with an empty rowset
if !((int32((*Mem)(unsafe.Pointer(pIn1)).Fflags) & MEM_Blob) == 0) {
- goto __734
+ goto __736
}
if !(Xsqlite3VdbeMemSetRowSet(tls, pIn1) != 0) {
- goto __735
+ goto __737
}
goto no_mem
-__735:
+__737:
;
-__734:
+__736:
;
if !(iSet != 0) {
- goto __736
+ goto __738
}
exists = Xsqlite3RowSetTest(tls, (*Mem)(unsafe.Pointer(pIn1)).Fz, iSet, *(*I64)(unsafe.Pointer(pIn3 /* &.u */)))
if !(exists != 0) {
- goto __737
+ goto __739
}
goto jump_to_p2
-__737:
+__739:
;
-__736:
+__738:
;
if !(iSet >= 0) {
- goto __738
+ goto __740
}
Xsqlite3RowSetInsert(tls, (*Mem)(unsafe.Pointer(pIn1)).Fz, *(*I64)(unsafe.Pointer(pIn3 /* &.u */)))
-__738:
+__740:
;
goto __8
@@ -71129,7 +73146,7 @@ __738:
// P4 is a pointer to the VM containing the trigger program.
//
// If P5 is non-zero, then recursive program invocation is enabled.
-__145: // Token identifying trigger
+__146: // Token identifying trigger
pProgram = *(*uintptr)(unsafe.Pointer(pOp + 16 /* &.p4 */))
pRt = (aMem + uintptr((*Op)(unsafe.Pointer(pOp)).Fp3)*56)
@@ -71146,37 +73163,37 @@ __145: // Token identifying trigger
// single trigger all have the same value for the SubProgram.token
// variable.
if !((*Op)(unsafe.Pointer(pOp)).Fp5 != 0) {
- goto __739
+ goto __741
}
t1 = (*SubProgram)(unsafe.Pointer(pProgram)).Ftoken
pFrame2 = (*Vdbe)(unsafe.Pointer(p)).FpFrame
-__740:
+__742:
if !((pFrame2 != 0) && ((*VdbeFrame)(unsafe.Pointer(pFrame2)).Ftoken != t1)) {
- goto __742
+ goto __744
}
- goto __741
-__741:
+ goto __743
+__743:
pFrame2 = (*VdbeFrame)(unsafe.Pointer(pFrame2)).FpParent
- goto __740
goto __742
-__742:
+ goto __744
+__744:
;
if !(pFrame2 != 0) {
- goto __743
+ goto __745
}
goto __8
-__743:
+__745:
;
-__739:
+__741:
;
if !((*Vdbe)(unsafe.Pointer(p)).FnFrame >= *(*int32)(unsafe.Pointer((db + 128 /* &.aLimit */) + 10*4))) {
- goto __744
+ goto __746
}
rc = SQLITE_ERROR
- Xsqlite3VdbeError(tls, p, ts+4882 /* "too many levels ..." */, 0)
+ Xsqlite3VdbeError(tls, p, ts+5013 /* "too many levels ..." */, 0)
goto abort_due_to_error
-__744:
+__746:
;
// Register pRt is used to store the memory required to save the state
@@ -71184,7 +73201,7 @@ __744:
// the trigger program. If this trigger has been fired before, then pRt
// is already allocated. Otherwise, it must be initialized.
if !((int32((*Mem)(unsafe.Pointer(pRt)).Fflags) & MEM_Blob) == 0) {
- goto __745
+ goto __747
}
// SubProgram.nMem is set to the number of memory cells used by the
// program stored in SubProgram.aOp. As well as these, one memory
@@ -71193,10 +73210,10 @@ __744:
nMem = ((*SubProgram)(unsafe.Pointer(pProgram)).FnMem + (*SubProgram)(unsafe.Pointer(pProgram)).FnCsr)
if !((*SubProgram)(unsafe.Pointer(pProgram)).FnCsr == 0) {
- goto __747
+ goto __749
}
nMem++
-__747:
+__749:
;
nByte2 = (int32((((((uint64(unsafe.Sizeof(VdbeFrame{}))) + uint64(7)) & libc.Uint64FromInt32(libc.CplInt32(7))) +
(uint64(nMem) * uint64(unsafe.Sizeof(Mem{})))) +
@@ -71204,10 +73221,10 @@ __747:
(uint64(((*SubProgram)(unsafe.Pointer(pProgram)).FnOp + 7) / 8))))
pFrame2 = Xsqlite3DbMallocZero(tls, db, uint64(nByte2))
if !(!(pFrame2 != 0)) {
- goto __748
+ goto __750
}
goto no_mem
-__748:
+__750:
;
Xsqlite3VdbeMemRelease(tls, pRt)
(*Mem)(unsafe.Pointer(pRt)).Fflags = (U16(MEM_Blob | MEM_Dyn))
@@ -71229,24 +73246,24 @@ __748:
pEnd = (((pFrame2) + 112) + uintptr((*VdbeFrame)(unsafe.Pointer(pFrame2)).FnChildMem)*56)
pMem2 = ((pFrame2) + 112)
-__749:
+__751:
if !(pMem2 != pEnd) {
- goto __751
+ goto __753
}
(*Mem)(unsafe.Pointer(pMem2)).Fflags = U16(MEM_Undefined)
(*Mem)(unsafe.Pointer(pMem2)).Fdb = db
- goto __750
-__750:
+ goto __752
+__752:
pMem2 += 56
- goto __749
goto __751
-__751:
+ goto __753
+__753:
;
- goto __746
-__745:
+ goto __748
+__747:
pFrame2 = (*Mem)(unsafe.Pointer(pRt)).Fz
-__746:
+__748:
;
(*Vdbe)(unsafe.Pointer(p)).FnFrame++
@@ -71281,7 +73298,7 @@ __746:
// The address of the cell in the parent frame is determined by adding
// the value of the P1 argument to the value of the P1 argument to the
// calling OP_Program instruction.
-__146:
+__147:
pOut = out2Prerelease(tls, p, pOp)
pFrame3 = (*Vdbe)(unsafe.Pointer(p)).FpFrame
pIn = ((*VdbeFrame)(unsafe.Pointer(pFrame3)).FaMem + uintptr(((*Op)(unsafe.Pointer(pOp)).Fp1+(*Op)(unsafe.Pointer((*VdbeFrame)(unsafe.Pointer(pFrame3)).FaOp+uintptr((*VdbeFrame)(unsafe.Pointer(pFrame3)).Fpc)*24)).Fp1))*56)
@@ -71295,23 +73312,23 @@ __146:
// If P1 is non-zero, the database constraint counter is incremented
// (deferred foreign key constraints). Otherwise, if P1 is zero, the
// statement counter is incremented (immediate foreign key constraints).
-__147:
+__148:
if !(((*Sqlite3)(unsafe.Pointer(db)).Fflags & uint64(SQLITE_DeferFKs)) != 0) {
- goto __752
+ goto __754
}
*(*I64)(unsafe.Pointer(db + 752 /* &.nDeferredImmCons */)) += (I64((*Op)(unsafe.Pointer(pOp)).Fp2))
- goto __753
-__752:
+ goto __755
+__754:
if !((*Op)(unsafe.Pointer(pOp)).Fp1 != 0) {
- goto __754
+ goto __756
}
*(*I64)(unsafe.Pointer(db + 744 /* &.nDeferredCons */)) += (I64((*Op)(unsafe.Pointer(pOp)).Fp2))
- goto __755
-__754:
+ goto __757
+__756:
*(*I64)(unsafe.Pointer(p + 80 /* &.nFkConstraint */)) += (I64((*Op)(unsafe.Pointer(pOp)).Fp2))
-__755:
+__757:
;
-__753:
+__755:
;
goto __8
@@ -71326,27 +73343,27 @@ __753:
// is zero (the one that counts deferred constraint violations). If P1 is
// zero, the jump is taken if the statement constraint-counter is zero
// (immediate foreign key constraint violations).
-__148: // jump
+__149: // jump
if !((*Op)(unsafe.Pointer(pOp)).Fp1 != 0) {
- goto __756
+ goto __758
}
if !(((*Sqlite3)(unsafe.Pointer(db)).FnDeferredCons == int64(0)) && ((*Sqlite3)(unsafe.Pointer(db)).FnDeferredImmCons == int64(0))) {
- goto __758
+ goto __760
}
goto jump_to_p2
-__758:
+__760:
;
- goto __757
-__756:
+ goto __759
+__758:
;
if !(((*Vdbe)(unsafe.Pointer(p)).FnFkConstraint == int64(0)) && ((*Sqlite3)(unsafe.Pointer(db)).FnDeferredImmCons == int64(0))) {
- goto __759
+ goto __761
}
goto jump_to_p2
-__759:
+__761:
;
-__757:
+__759:
;
goto __8
@@ -71360,37 +73377,37 @@ __757:
//
// This instruction throws an error if the memory cell is not initially
// an integer.
-__149:
+__150:
if !((*Vdbe)(unsafe.Pointer(p)).FpFrame != 0) {
- goto __760
+ goto __762
}
pFrame4 = (*Vdbe)(unsafe.Pointer(p)).FpFrame
-__762:
+__764:
if !((*VdbeFrame)(unsafe.Pointer(pFrame4)).FpParent != 0) {
- goto __764
+ goto __766
}
- goto __763
-__763:
+ goto __765
+__765:
pFrame4 = (*VdbeFrame)(unsafe.Pointer(pFrame4)).FpParent
- goto __762
goto __764
-__764:
+ goto __766
+__766:
;
pIn1 = ((*VdbeFrame)(unsafe.Pointer(pFrame4)).FaMem + uintptr((*Op)(unsafe.Pointer(pOp)).Fp1)*56)
- goto __761
-__760:
+ goto __763
+__762:
pIn1 = (aMem + uintptr((*Op)(unsafe.Pointer(pOp)).Fp1)*56)
-__761:
+__763:
;
Xsqlite3VdbeMemIntegerify(tls, pIn1)
pIn2 = (aMem + uintptr((*Op)(unsafe.Pointer(pOp)).Fp2)*56)
Xsqlite3VdbeMemIntegerify(tls, pIn2)
if !(*(*I64)(unsafe.Pointer(pIn1 /* &.u */)) < *(*I64)(unsafe.Pointer(pIn2 /* &.u */))) {
- goto __765
+ goto __767
}
*(*I64)(unsafe.Pointer(pIn1 /* &.u */)) = *(*I64)(unsafe.Pointer(pIn2 /* &.u */))
-__765:
+__767:
;
goto __8
@@ -71403,15 +73420,15 @@ __765:
//
// If the initial value of register P1 is less than 1, then the
// value is unchanged and control passes through to the next instruction.
-__150: // jump, in1
+__151: // jump, in1
pIn1 = (aMem + uintptr((*Op)(unsafe.Pointer(pOp)).Fp1)*56)
if !(*(*I64)(unsafe.Pointer(pIn1 /* &.u */)) > int64(0)) {
- goto __766
+ goto __768
}
*(*I64)(unsafe.Pointer(pIn1 /* &.u */ /* &.i */)) -= (I64((*Op)(unsafe.Pointer(pOp)).Fp3))
goto jump_to_p2
-__766:
+__768:
;
goto __8
@@ -71432,7 +73449,7 @@ __766:
// and r[P2] is set to -1.
//
// Otherwise, r[P2] is set to the sum of r[P1] and r[P3].
-__151:
+__152:
pIn1 = (aMem + uintptr((*Op)(unsafe.Pointer(pOp)).Fp1)*56)
pIn3 = (aMem + uintptr((*Op)(unsafe.Pointer(pOp)).Fp3)*56)
pOut = out2Prerelease(tls, p, pOp)
@@ -71444,7 +73461,7 @@ __151:
}
return int64(0)
}()) != 0)) {
- goto __767
+ goto __769
}
// If the LIMIT is less than or equal to zero, loop forever. This
// is documented. But also, if the LIMIT+OFFSET exceeds 2^63 then
@@ -71454,10 +73471,10 @@ __151:
// it would take nearly 300 years to actually reach the limit. So
// looping forever is a reasonable approximation.
*(*I64)(unsafe.Pointer(pOut /* &.u */)) = int64(-1)
- goto __768
-__767:
+ goto __770
+__769:
*(*I64)(unsafe.Pointer(pOut /* &.u */)) = *(*I64)(unsafe.Pointer(bp + 784 /* x3 */))
-__768:
+__770:
;
goto __8
@@ -71468,20 +73485,20 @@ __768:
// initially greater than zero, then decrement the value in register P1.
// If it is non-zero (negative or positive) and then also jump to P2.
// If register P1 is initially zero, leave it unchanged and fall through.
-__152: // jump, in1
+__153: // jump, in1
pIn1 = (aMem + uintptr((*Op)(unsafe.Pointer(pOp)).Fp1)*56)
if !(*(*I64)(unsafe.Pointer(pIn1 /* &.u */)) != 0) {
- goto __769
+ goto __771
}
if !(*(*I64)(unsafe.Pointer(pIn1 /* &.u */)) > int64(0)) {
- goto __770
+ goto __772
}
*(*I64)(unsafe.Pointer(pIn1 /* &.u */))--
-__770:
+__772:
;
goto jump_to_p2
-__769:
+__771:
;
goto __8
@@ -71490,21 +73507,21 @@ __769:
//
// Register P1 must hold an integer. Decrement the value in P1
// and jump to P2 if the new value is exactly zero.
-__153: // jump, in1
+__154: // jump, in1
pIn1 = (aMem + uintptr((*Op)(unsafe.Pointer(pOp)).Fp1)*56)
if !(*(*I64)(unsafe.Pointer(pIn1 /* &.u */)) > ((int64(-1)) - (int64(0xffffffff) | (I64((int64(0x7fffffff))) << 32)))) {
- goto __771
+ goto __773
}
*(*I64)(unsafe.Pointer(pIn1 /* &.u */))--
-__771:
+__773:
;
if !(*(*I64)(unsafe.Pointer(pIn1 /* &.u */)) == int64(0)) {
- goto __772
+ goto __774
}
goto jump_to_p2
-__772:
+__774:
;
goto __8
@@ -71544,17 +73561,17 @@ __772:
// the opcode is changed. In this way, the initialization of the
// sqlite3_context only happens once, instead of on each call to the
// step function.
-__154:
__155:
+__156:
;
n4 = int32((*Op)(unsafe.Pointer(pOp)).Fp5)
pCtx = Xsqlite3DbMallocRawNN(tls, db, (uint64((uint64(n4) * uint64(unsafe.Sizeof(uintptr(0)))) + ((uint64(unsafe.Sizeof(Sqlite3_context{})) + uint64(unsafe.Sizeof(Mem{}))) - uint64(unsafe.Sizeof(uintptr(0)))))))
if !(pCtx == uintptr(0)) {
- goto __773
+ goto __775
}
goto no_mem
-__773:
+__775:
;
(*Sqlite3_context)(unsafe.Pointer(pCtx)).FpMem = uintptr(0)
(*Sqlite3_context)(unsafe.Pointer(pCtx)).FpOut = ((pCtx + 48 /* &.argv */) + uintptr(n4)*8)
@@ -71572,7 +73589,7 @@ __773:
(*Op)(unsafe.Pointer(pOp)).Fopcode = U8(OP_AggStep1)
-__156:
+__157:
;
pCtx1 = *(*uintptr)(unsafe.Pointer(pOp + 16 /* &.p4 */))
pMem3 = (aMem + uintptr((*Op)(unsafe.Pointer(pOp)).Fp3)*56)
@@ -71582,71 +73599,75 @@ __156:
// checks to see if the register array has changed, and if so it
// reinitializes the relavant parts of the sqlite3_context object
if !((*Sqlite3_context)(unsafe.Pointer(pCtx1)).FpMem != pMem3) {
- goto __774
+ goto __776
}
(*Sqlite3_context)(unsafe.Pointer(pCtx1)).FpMem = pMem3
i4 = (int32((*Sqlite3_context)(unsafe.Pointer(pCtx1)).Fargc) - 1)
-__775:
+__777:
if !(i4 >= 0) {
- goto __777
+ goto __779
}
*(*uintptr)(unsafe.Pointer((pCtx1 + 48 /* &.argv */) + uintptr(i4)*8)) = (aMem + uintptr(((*Op)(unsafe.Pointer(pOp)).Fp2+i4))*56)
- goto __776
-__776:
+ goto __778
+__778:
i4--
- goto __775
goto __777
-__777:
+ goto __779
+__779:
;
-__774:
+__776:
;
(*Mem)(unsafe.Pointer(pMem3)).Fn++
if !((*Op)(unsafe.Pointer(pOp)).Fp1 != 0) {
- goto __778
+ goto __780
}
- (*(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(((*Sqlite3_context)(unsafe.Pointer(pCtx1)).FpFunc + 48 /* &.xInverse */))))(tls, pCtx1, int32((*Sqlite3_context)(unsafe.Pointer(pCtx1)).Fargc), pCtx1+48 /* &.argv */)
- goto __779
-__778:
- (*(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(((*Sqlite3_context)(unsafe.Pointer(pCtx1)).FpFunc + 24 /* &.xSFunc */))))(tls, pCtx1, int32((*Sqlite3_context)(unsafe.Pointer(pCtx1)).Fargc), pCtx1+48 /* &.argv */)
-__779:
+ (*struct {
+ f func(*libc.TLS, uintptr, int32, uintptr)
+ })(unsafe.Pointer(&struct{ uintptr }{(*FuncDef)(unsafe.Pointer((*Sqlite3_context)(unsafe.Pointer(pCtx1)).FpFunc)).FxInverse})).f(tls, pCtx1, int32((*Sqlite3_context)(unsafe.Pointer(pCtx1)).Fargc), pCtx1+48 /* &.argv */)
+ goto __781
+__780:
+ (*struct {
+ f func(*libc.TLS, uintptr, int32, uintptr)
+ })(unsafe.Pointer(&struct{ uintptr }{(*FuncDef)(unsafe.Pointer((*Sqlite3_context)(unsafe.Pointer(pCtx1)).FpFunc)).FxSFunc})).f(tls, pCtx1, int32((*Sqlite3_context)(unsafe.Pointer(pCtx1)).Fargc), pCtx1+48 /* &.argv */)
+__781:
; // IMP: R-24505-23230
if !((*Sqlite3_context)(unsafe.Pointer(pCtx1)).FisError != 0) {
- goto __780
+ goto __782
}
if !((*Sqlite3_context)(unsafe.Pointer(pCtx1)).FisError > 0) {
- goto __781
+ goto __783
}
- Xsqlite3VdbeError(tls, p, ts+2718 /* "%s" */, libc.VaList(bp+88, Xsqlite3_value_text(tls, (*Sqlite3_context)(unsafe.Pointer(pCtx1)).FpOut)))
+ Xsqlite3VdbeError(tls, p, ts+2790 /* "%s" */, libc.VaList(bp+88, Xsqlite3_value_text(tls, (*Sqlite3_context)(unsafe.Pointer(pCtx1)).FpOut)))
rc = (*Sqlite3_context)(unsafe.Pointer(pCtx1)).FisError
-__781:
+__783:
;
if !((*Sqlite3_context)(unsafe.Pointer(pCtx1)).FskipFlag != 0) {
- goto __782
+ goto __784
}
i4 = (*Op)(unsafe.Pointer(pOp + libc.UintptrFromInt32(-1)*24)).Fp1
if !(i4 != 0) {
- goto __783
+ goto __785
}
Xsqlite3VdbeMemSetInt64(tls, (aMem + uintptr(i4)*56), int64(1))
-__783:
+__785:
;
(*Sqlite3_context)(unsafe.Pointer(pCtx1)).FskipFlag = U8(0)
-__782:
+__784:
;
Xsqlite3VdbeMemRelease(tls, (*Sqlite3_context)(unsafe.Pointer(pCtx1)).FpOut)
(*Mem)(unsafe.Pointer((*Sqlite3_context)(unsafe.Pointer(pCtx1)).FpOut)).Fflags = U16(MEM_Null)
(*Sqlite3_context)(unsafe.Pointer(pCtx1)).FisError = 0
if !(rc != 0) {
- goto __784
+ goto __786
}
goto abort_due_to_error
-__784:
+__786:
;
-__780:
+__782:
;
goto __8
@@ -71675,39 +73696,39 @@ __780:
// functions that can take varying numbers of arguments. The
// P4 argument is only needed for the case where
// the step function was not previously called.
-__157:
__158:
+__159:
;
pMem4 = (aMem + uintptr((*Op)(unsafe.Pointer(pOp)).Fp1)*56)
if !((*Op)(unsafe.Pointer(pOp)).Fp3 != 0) {
- goto __785
+ goto __787
}
rc = Xsqlite3VdbeMemAggValue(tls, pMem4, (aMem + uintptr((*Op)(unsafe.Pointer(pOp)).Fp3)*56), *(*uintptr)(unsafe.Pointer(pOp + 16 /* &.p4 */)))
pMem4 = (aMem + uintptr((*Op)(unsafe.Pointer(pOp)).Fp3)*56)
- goto __786
-__785:
+ goto __788
+__787:
rc = Xsqlite3VdbeMemFinalize(tls, pMem4, *(*uintptr)(unsafe.Pointer(pOp + 16 /* &.p4 */)))
-__786:
+__788:
;
if !(rc != 0) {
- goto __787
+ goto __789
}
- Xsqlite3VdbeError(tls, p, ts+2718 /* "%s" */, libc.VaList(bp+96, Xsqlite3_value_text(tls, pMem4)))
+ Xsqlite3VdbeError(tls, p, ts+2790 /* "%s" */, libc.VaList(bp+96, Xsqlite3_value_text(tls, pMem4)))
goto abort_due_to_error
-__787:
+__789:
;
Xsqlite3VdbeChangeEncoding(tls, pMem4, int32(encoding))
if !(Xsqlite3VdbeMemTooBig(tls, pMem4) != 0) {
- goto __788
+ goto __790
}
goto too_big
-__788:
+__790:
;
goto __8
@@ -71721,7 +73742,7 @@ __788:
// in the WAL that have been checkpointed after the checkpoint
// completes into mem[P3+2]. However on an error, mem[P3+1] and
// mem[P3+2] are initialized to -1.
-__159: // Write results here
+__160: // Write results here
;
*(*int32)(unsafe.Pointer(bp + 792 /* &aRes[0] */)) = 0
@@ -71729,32 +73750,32 @@ __159: // Write results here
rc = Xsqlite3Checkpoint(tls, db, (*Op)(unsafe.Pointer(pOp)).Fp1, (*Op)(unsafe.Pointer(pOp)).Fp2, (bp + 792 /* &aRes */ + 1*4), (bp + 792 /* &aRes */ + 2*4))
if !(rc != 0) {
- goto __789
+ goto __791
}
if !(rc != SQLITE_BUSY) {
- goto __790
+ goto __792
}
goto abort_due_to_error
-__790:
+__792:
;
rc = SQLITE_OK
*(*int32)(unsafe.Pointer(bp + 792 /* &aRes[0] */)) = 1
-__789:
+__791:
;
i5 = 0
pMem5 = (aMem + uintptr((*Op)(unsafe.Pointer(pOp)).Fp3)*56)
-__791:
+__793:
if !(i5 < 3) {
- goto __793
+ goto __795
}
Xsqlite3VdbeMemSetInt64(tls, pMem5, I64(*(*int32)(unsafe.Pointer(bp + 792 /* &aRes[0] */ + uintptr(i5)*4))))
- goto __792
-__792:
+ goto __794
+__794:
i5++
pMem5 += 56
- goto __791
goto __793
-__793:
+ goto __795
+__795:
;
goto __8
@@ -71768,7 +73789,7 @@ __793:
// If changing into or out of WAL mode the procedure is more complicated.
//
// Write a string containing the final journal-mode to register P2.
-__160: // Name of database file for pPager
+__161: // Name of database file for pPager
pOut = out2Prerelease(tls, p, pOp)
eNew = (*Op)(unsafe.Pointer(pOp)).Fp3
@@ -71777,16 +73798,17 @@ __160: // Name of database file for pPager
pPager = Xsqlite3BtreePager(tls, pBt1)
eOld = Xsqlite3PagerGetJournalMode(tls, pPager)
if !(eNew == (-1)) {
- goto __794
+ goto __796
}
eNew = eOld
-__794:
+__796:
;
+
if !(!(Xsqlite3PagerOkToChangeJournalMode(tls, pPager) != 0)) {
- goto __795
+ goto __797
}
eNew = eOld
-__795:
+__797:
;
zFilename = Xsqlite3PagerFilename(tls, pPager, 1)
@@ -71796,34 +73818,34 @@ __795:
if !((eNew == PAGER_JOURNALMODE_WAL) &&
((Xsqlite3Strlen30(tls, zFilename) == 0) || // Temp file
!(Xsqlite3PagerWalSupported(tls, pPager) != 0))) {
- goto __796
+ goto __798
}
eNew = eOld
-__796:
+__798:
;
if !((eNew != eOld) &&
((eOld == PAGER_JOURNALMODE_WAL) || (eNew == PAGER_JOURNALMODE_WAL))) {
- goto __797
+ goto __799
}
if !(!(int32((*Sqlite3)(unsafe.Pointer(db)).FautoCommit) != 0) || ((*Sqlite3)(unsafe.Pointer(db)).FnVdbeRead > 1)) {
- goto __798
+ goto __800
}
rc = SQLITE_ERROR
Xsqlite3VdbeError(tls, p,
- ts+4919, /* "cannot change %s..." */
+ ts+5050, /* "cannot change %s..." */
libc.VaList(bp+104, func() uintptr {
if eNew == PAGER_JOURNALMODE_WAL {
- return ts + 4971 /* "into" */
+ return ts + 5102 /* "into" */
}
- return ts + 4976 /* "out of" */
+ return ts + 5107 /* "out of" */
}()))
goto abort_due_to_error
- goto __799
-__798:
+ goto __801
+__800:
if !(eOld == PAGER_JOURNALMODE_WAL) {
- goto __800
+ goto __802
}
// If leaving WAL mode, close the log file. If successful, the call
// to PagerCloseWal() checkpoints and deletes the write-ahead-log
@@ -71831,29 +73853,29 @@ __798:
// after a successful return.
rc = Xsqlite3PagerCloseWal(tls, pPager, db)
if !(rc == SQLITE_OK) {
- goto __802
+ goto __804
}
Xsqlite3PagerSetJournalMode(tls, pPager, eNew)
-__802:
+__804:
;
- goto __801
-__800:
+ goto __803
+__802:
if !(eOld == PAGER_JOURNALMODE_MEMORY) {
- goto __803
+ goto __805
}
// Cannot transition directly from MEMORY to WAL. Use mode OFF
// as an intermediate
Xsqlite3PagerSetJournalMode(tls, pPager, PAGER_JOURNALMODE_OFF)
-__803:
+__805:
;
-__801:
+__803:
;
// Open a transaction on the database file. Regardless of the journal
// mode, this transaction always uses a rollback journal.
if !(rc == SQLITE_OK) {
- goto __804
+ goto __806
}
rc = Xsqlite3BtreeSetVersion(tls, pBt1, func() int32 {
if eNew == PAGER_JOURNALMODE_WAL {
@@ -71861,18 +73883,18 @@ __801:
}
return 1
}())
-__804:
+__806:
;
-__799:
+__801:
;
-__797:
+__799:
;
if !(rc != 0) {
- goto __805
+ goto __807
}
eNew = eOld
-__805:
+__807:
;
eNew = Xsqlite3PagerSetJournalMode(tls, pPager, eNew)
@@ -71882,10 +73904,10 @@ __805:
(*Mem)(unsafe.Pointer(pOut)).Fenc = U8(SQLITE_UTF8)
Xsqlite3VdbeChangeEncoding(tls, pOut, int32(encoding))
if !(rc != 0) {
- goto __806
+ goto __808
}
goto abort_due_to_error
-__806:
+__808:
;
goto __8
@@ -71897,7 +73919,7 @@ __806:
// If P2 is not zero, then it is a register holding a string which is
// the file into which the result of vacuum should be written. When
// P2 is zero, the vacuum overwrites the original database.
-__161:
+__162:
;
rc = Xsqlite3RunVacuum(tls, (p + 168 /* &.zErrMsg */), db, (*Op)(unsafe.Pointer(pOp)).Fp1,
func() uintptr {
@@ -71907,10 +73929,10 @@ __161:
return uintptr(0)
}())
if !(rc != 0) {
- goto __807
+ goto __809
}
goto abort_due_to_error
-__807:
+__809:
;
goto __8
@@ -71919,24 +73941,24 @@ __807:
// Perform a single step of the incremental vacuum procedure on
// the P1 database. If the vacuum has finished, jump to instruction
// P2. Otherwise, fall through to the next instruction.
-__162:
+__163:
;
pBt2 = (*Db)(unsafe.Pointer((*Sqlite3)(unsafe.Pointer(db)).FaDb + uintptr((*Op)(unsafe.Pointer(pOp)).Fp1)*32)).FpBt
rc = Xsqlite3BtreeIncrVacuum(tls, pBt2)
if !(rc != 0) {
- goto __808
+ goto __810
}
if !(rc != SQLITE_DONE) {
- goto __809
+ goto __811
}
goto abort_due_to_error
-__809:
+__811:
;
rc = SQLITE_OK
goto jump_to_p2
-__808:
+__810:
;
goto __8
@@ -71955,16 +73977,16 @@ __808:
// The P2==1 case occurs when a CREATE INDEX or similar schema change happens
// that might help the statement run faster but which does not affect the
// correctness of operation.
-__163:
+__164:
;
if !(!((*Op)(unsafe.Pointer(pOp)).Fp1 != 0)) {
- goto __810
+ goto __812
}
Xsqlite3ExpirePreparedStatements(tls, db, (*Op)(unsafe.Pointer(pOp)).Fp2)
- goto __811
-__810:
- libc.SetBitFieldPtr16Uint32(p+200 /* &.expired */, (Bft((*Op)(unsafe.Pointer(pOp)).Fp2 + 1)), 0, 0x3)
-__811:
+ goto __813
+__812:
+ libc.SetBitFieldPtr16Uint32(p+200 /* &.expired */, (Bft((*Op)(unsafe.Pointer(pOp)).Fp2 + 1)), 14, 0xc000)
+__813:
;
goto __8
@@ -71972,7 +73994,7 @@ __811:
//
// Lock the btree to which cursor P1 is pointing so that the btree cannot be
// written by an other cursor.
-__164:
+__165:
;
pC28 = *(*uintptr)(unsafe.Pointer((*Vdbe)(unsafe.Pointer(p)).FapCsr + uintptr((*Op)(unsafe.Pointer(pOp)).Fp1)*8))
@@ -71983,7 +74005,7 @@ __164:
//
// Unlock the btree to which cursor P1 is pointing so that it can be
// written by other cursors.
-__165:
+__166:
;
pC29 = *(*uintptr)(unsafe.Pointer((*Vdbe)(unsafe.Pointer(p)).FapCsr + uintptr((*Op)(unsafe.Pointer(pOp)).Fp1)*8))
@@ -72004,28 +74026,28 @@ __165:
//
// P4 contains a pointer to the name of the table being locked. This is only
// used to generate an error message if the lock cannot be obtained.
-__166:
+__167:
isWriteLock = U8((*Op)(unsafe.Pointer(pOp)).Fp3)
if !((isWriteLock != 0) || (uint64(0) == ((*Sqlite3)(unsafe.Pointer(db)).Fflags & uint64(SQLITE_ReadUncommit)))) {
- goto __812
+ goto __814
}
p13 = (*Op)(unsafe.Pointer(pOp)).Fp1
rc = Xsqlite3BtreeLockTable(tls, (*Db)(unsafe.Pointer((*Sqlite3)(unsafe.Pointer(db)).FaDb+uintptr(p13)*32)).FpBt, (*Op)(unsafe.Pointer(pOp)).Fp2, isWriteLock)
if !(rc != 0) {
- goto __813
+ goto __815
}
if !((rc & 0xFF) == SQLITE_LOCKED) {
- goto __814
+ goto __816
}
z1 = *(*uintptr)(unsafe.Pointer(pOp + 16 /* &.p4 */))
- Xsqlite3VdbeError(tls, p, ts+4983 /* "database table i..." */, libc.VaList(bp+112, z1))
-__814:
+ Xsqlite3VdbeError(tls, p, ts+5114 /* "database table i..." */, libc.VaList(bp+112, z1))
+__816:
;
goto abort_due_to_error
-__813:
+__815:
;
-__812:
+__814:
;
goto __8
@@ -72037,20 +74059,20 @@ __812:
// Also, whether or not P4 is set, check that this is not being called from
// within a callback to a virtual table xSync() method. If it is, the error
// code will be set to SQLITE_LOCKED.
-__167:
+__168:
pVTab = *(*uintptr)(unsafe.Pointer(pOp + 16 /* &.p4 */))
rc = Xsqlite3VtabBegin(tls, db, pVTab)
if !(pVTab != 0) {
- goto __815
+ goto __817
}
Xsqlite3VtabImportErrmsg(tls, p, (*VTable)(unsafe.Pointer(pVTab)).FpVtab)
-__815:
+__817:
;
if !(rc != 0) {
- goto __816
+ goto __818
}
goto abort_due_to_error
-__816:
+__818:
;
goto __8
@@ -72058,7 +74080,7 @@ __816:
//
// P2 is a register that holds the name of a virtual table in database
// P1. Call the xCreate method for that table.
-__168: // Name of the virtual table
+__169: // Name of the virtual table
libc.Xmemset(tls, bp+808 /* &sMem1 */, 0, uint64(unsafe.Sizeof(Mem{})))
(*Mem)(unsafe.Pointer(bp + 808 /* &sMem1 */)).Fdb = db
@@ -72070,17 +74092,17 @@ __168: // Name of the virtual table
zTab = Xsqlite3_value_text(tls, bp+808 /* &sMem1 */)
if !(zTab != 0) {
- goto __817
+ goto __819
}
rc = Xsqlite3VtabCallCreate(tls, db, (*Op)(unsafe.Pointer(pOp)).Fp1, zTab, (p + 168 /* &.zErrMsg */))
-__817:
+__819:
;
Xsqlite3VdbeMemRelease(tls, bp+808 /* &sMem1 */)
if !(rc != 0) {
- goto __818
+ goto __820
}
goto abort_due_to_error
-__818:
+__820:
;
goto __8
@@ -72088,16 +74110,16 @@ __818:
//
// P4 is the name of a virtual table in database P1. Call the xDestroy method
// of that table.
-__169:
+__170:
(*Sqlite3)(unsafe.Pointer(db)).FnVDestroy++
rc = Xsqlite3VtabCallDestroy(tls, db, (*Op)(unsafe.Pointer(pOp)).Fp1, *(*uintptr)(unsafe.Pointer(pOp + 16 /* &.p4 */)))
(*Sqlite3)(unsafe.Pointer(db)).FnVDestroy--
if !(rc != 0) {
- goto __819
+ goto __821
}
goto abort_due_to_error
-__819:
+__821:
;
goto __8
@@ -72106,26 +74128,28 @@ __819:
// P4 is a pointer to a virtual table object, an sqlite3_vtab structure.
// P1 is a cursor number. This opcode opens a cursor to the virtual
// table and stores that cursor in P1.
-__170:
+__171:
;
pCur2 = uintptr(0)
*(*uintptr)(unsafe.Pointer(bp + 864 /* pVCur */)) = uintptr(0)
pVtab1 = (*VTable)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(pOp + 16 /* &.p4 */)))).FpVtab
if !((pVtab1 == uintptr(0)) || ((*Sqlite3_vtab)(unsafe.Pointer(pVtab1)).FpModule == uintptr(0))) {
- goto __820
+ goto __822
}
rc = SQLITE_LOCKED
goto abort_due_to_error
-__820:
+__822:
;
pModule1 = (*Sqlite3_vtab)(unsafe.Pointer(pVtab1)).FpModule
- rc = (*(*func(*libc.TLS, uintptr, uintptr) int32)(unsafe.Pointer((pModule1 + 48 /* &.xOpen */))))(tls, pVtab1, bp+864 /* &pVCur */)
+ rc = (*struct {
+ f func(*libc.TLS, uintptr, uintptr) int32
+ })(unsafe.Pointer(&struct{ uintptr }{(*Sqlite3_module)(unsafe.Pointer(pModule1)).FxOpen})).f(tls, pVtab1, bp+864 /* &pVCur */)
Xsqlite3VtabImportErrmsg(tls, p, pVtab1)
if !(rc != 0) {
- goto __821
+ goto __823
}
goto abort_due_to_error
-__821:
+__823:
;
// Initialize sqlite3_vtab_cursor base class
@@ -72134,16 +74158,18 @@ __821:
// Initialize vdbe cursor object
pCur2 = allocateCursor(tls, p, (*Op)(unsafe.Pointer(pOp)).Fp1, 0, -1, uint8(CURTYPE_VTAB))
if !(pCur2 != 0) {
- goto __822
+ goto __824
}
*(*uintptr)(unsafe.Pointer(pCur2 + 56 /* &.uc */)) = *(*uintptr)(unsafe.Pointer(bp + 864 /* pVCur */))
(*Sqlite3_vtab)(unsafe.Pointer(pVtab1)).FnRef++
- goto __823
-__822:
+ goto __825
+__824:
;
- (*(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer((pModule1 + 56 /* &.xClose */))))(tls, *(*uintptr)(unsafe.Pointer(bp + 864 /* pVCur */)))
+ (*struct {
+ f func(*libc.TLS, uintptr) int32
+ })(unsafe.Pointer(&struct{ uintptr }{(*Sqlite3_module)(unsafe.Pointer(pModule1)).FxClose})).f(tls, *(*uintptr)(unsafe.Pointer(bp + 864 /* pVCur */)))
goto no_mem
-__823:
+__825:
;
goto __8
@@ -72165,7 +74191,7 @@ __823:
// xFilter as argv. Register P3+2 becomes argv[0] when passed to xFilter.
//
// A jump is made to P2 if the result set after filtering would be empty.
-__171:
+__172:
pQuery = (aMem + uintptr((*Op)(unsafe.Pointer(pOp)).Fp3)*56)
pArgc = (pQuery + 1*56)
@@ -72184,34 +74210,38 @@ __171:
res13 = 0
apArg = (*Vdbe)(unsafe.Pointer(p)).FapArg
i6 = 0
-__824:
+__826:
if !(i6 < nArg) {
- goto __826
+ goto __828
}
*(*uintptr)(unsafe.Pointer(apArg + uintptr(i6)*8)) = (pArgc + uintptr((i6+1))*56)
- goto __825
-__825:
+ goto __827
+__827:
i6++
- goto __824
goto __826
-__826:
+ goto __828
+__828:
;
- rc = (*(*func(*libc.TLS, uintptr, int32, uintptr, int32, uintptr) int32)(unsafe.Pointer((pModule2 + 64 /* &.xFilter */))))(tls, pVCur1, iQuery, *(*uintptr)(unsafe.Pointer(pOp + 16 /* &.p4 */)), nArg, apArg)
+ rc = (*struct {
+ f func(*libc.TLS, uintptr, int32, uintptr, int32, uintptr) int32
+ })(unsafe.Pointer(&struct{ uintptr }{(*Sqlite3_module)(unsafe.Pointer(pModule2)).FxFilter})).f(tls, pVCur1, iQuery, *(*uintptr)(unsafe.Pointer(pOp + 16 /* &.p4 */)), nArg, apArg)
Xsqlite3VtabImportErrmsg(tls, p, pVtab2)
if !(rc != 0) {
- goto __827
+ goto __829
}
goto abort_due_to_error
-__827:
+__829:
;
- res13 = (*(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer((pModule2 + 80 /* &.xEof */))))(tls, pVCur1)
+ res13 = (*struct {
+ f func(*libc.TLS, uintptr) int32
+ })(unsafe.Pointer(&struct{ uintptr }{(*Sqlite3_module)(unsafe.Pointer(pModule2)).FxEof})).f(tls, pVCur1)
(*VdbeCursor)(unsafe.Pointer(pCur3)).FnullRow = U8(0)
if !(res13 != 0) {
- goto __828
+ goto __830
}
goto jump_to_p2
-__828:
+__830:
;
goto __8
@@ -72228,18 +74258,18 @@ __828:
// table implementation. The P5 column might also contain other
// bits (OPFLAG_LENGTHARG or OPFLAG_TYPEOFARG) but those bits are
// unused by OP_VColumn.
-__172:
+__173:
pCur4 = *(*uintptr)(unsafe.Pointer((*Vdbe)(unsafe.Pointer(p)).FapCsr + uintptr((*Op)(unsafe.Pointer(pOp)).Fp1)*8))
pDest2 = (aMem + uintptr((*Op)(unsafe.Pointer(pOp)).Fp3)*56)
if !((*VdbeCursor)(unsafe.Pointer(pCur4)).FnullRow != 0) {
- goto __829
+ goto __831
}
Xsqlite3VdbeMemSetNull(tls, pDest2)
goto __8
-__829:
+__831:
;
pVtab3 = (*Sqlite3_vtab_cursor)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(pCur4 + 56 /* &.uc */)))).FpVtab
pModule3 = (*Sqlite3_vtab)(unsafe.Pointer(pVtab3)).FpModule
@@ -72248,38 +74278,40 @@ __829:
(*Sqlite3_context)(unsafe.Pointer(bp + 872 /* &sContext */)).FpOut = pDest2
if !((int32((*Op)(unsafe.Pointer(pOp)).Fp5) & OPFLAG_NOCHNG) != 0) {
- goto __830
+ goto __832
}
Xsqlite3VdbeMemSetNull(tls, pDest2)
(*Mem)(unsafe.Pointer(pDest2)).Fflags = (U16(MEM_Null | MEM_Zero))
*(*int32)(unsafe.Pointer(pDest2 /* &.u */)) = 0
- goto __831
-__830:
+ goto __833
+__832:
(*Mem)(unsafe.Pointer(pDest2)).Fflags = (U16((int32((*Mem)(unsafe.Pointer((pDest2))).Fflags) & libc.CplInt32((MEM_TypeMask | MEM_Zero))) | MEM_Null))
-__831:
+__833:
;
- rc = (*(*func(*libc.TLS, uintptr, uintptr, int32) int32)(unsafe.Pointer((pModule3 + 88 /* &.xColumn */))))(tls, *(*uintptr)(unsafe.Pointer(pCur4 + 56 /* &.uc */)), bp+872 /* &sContext */, (*Op)(unsafe.Pointer(pOp)).Fp2)
+ rc = (*struct {
+ f func(*libc.TLS, uintptr, uintptr, int32) int32
+ })(unsafe.Pointer(&struct{ uintptr }{(*Sqlite3_module)(unsafe.Pointer(pModule3)).FxColumn})).f(tls, *(*uintptr)(unsafe.Pointer(pCur4 + 56 /* &.uc */)), bp+872 /* &sContext */, (*Op)(unsafe.Pointer(pOp)).Fp2)
Xsqlite3VtabImportErrmsg(tls, p, pVtab3)
if !((*Sqlite3_context)(unsafe.Pointer(bp+872 /* &sContext */)).FisError > 0) {
- goto __832
+ goto __834
}
- Xsqlite3VdbeError(tls, p, ts+2718 /* "%s" */, libc.VaList(bp+120, Xsqlite3_value_text(tls, pDest2)))
+ Xsqlite3VdbeError(tls, p, ts+2790 /* "%s" */, libc.VaList(bp+120, Xsqlite3_value_text(tls, pDest2)))
rc = (*Sqlite3_context)(unsafe.Pointer(bp + 872 /* &sContext */)).FisError
-__832:
+__834:
;
Xsqlite3VdbeChangeEncoding(tls, pDest2, int32(encoding))
if !(Xsqlite3VdbeMemTooBig(tls, pDest2) != 0) {
- goto __833
+ goto __835
}
goto too_big
-__833:
+__835:
;
if !(rc != 0) {
- goto __834
+ goto __836
}
goto abort_due_to_error
-__834:
+__836:
;
goto __8
@@ -72288,16 +74320,16 @@ __834:
// Advance virtual table P1 to the next row in its result set and
// jump to instruction P2. Or, if the virtual table has reached
// the end of its result set, then fall through to the next instruction.
-__173:
+__174:
res14 = 0
pCur5 = *(*uintptr)(unsafe.Pointer((*Vdbe)(unsafe.Pointer(p)).FapCsr + uintptr((*Op)(unsafe.Pointer(pOp)).Fp1)*8))
if !((*VdbeCursor)(unsafe.Pointer(pCur5)).FnullRow != 0) {
- goto __835
+ goto __837
}
goto __8
-__835:
+__837:
;
pVtab4 = (*Sqlite3_vtab_cursor)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(pCur5 + 56 /* &.uc */)))).FpVtab
pModule4 = (*Sqlite3_vtab)(unsafe.Pointer(pVtab4)).FpModule
@@ -72307,22 +74339,26 @@ __835:
// xNext(). Instead, if an error occurs, true is returned (indicating that
// data is available) and the error code returned when xColumn or
// some other method is next invoked on the save virtual table cursor.
- rc = (*(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer((pModule4 + 72 /* &.xNext */))))(tls, *(*uintptr)(unsafe.Pointer(pCur5 + 56 /* &.uc */)))
+ rc = (*struct {
+ f func(*libc.TLS, uintptr) int32
+ })(unsafe.Pointer(&struct{ uintptr }{(*Sqlite3_module)(unsafe.Pointer(pModule4)).FxNext})).f(tls, *(*uintptr)(unsafe.Pointer(pCur5 + 56 /* &.uc */)))
Xsqlite3VtabImportErrmsg(tls, p, pVtab4)
if !(rc != 0) {
- goto __836
+ goto __838
}
goto abort_due_to_error
-__836:
+__838:
;
- res14 = (*(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer((pModule4 + 80 /* &.xEof */))))(tls, *(*uintptr)(unsafe.Pointer(pCur5 + 56 /* &.uc */)))
+ res14 = (*struct {
+ f func(*libc.TLS, uintptr) int32
+ })(unsafe.Pointer(&struct{ uintptr }{(*Sqlite3_module)(unsafe.Pointer(pModule4)).FxEof})).f(tls, *(*uintptr)(unsafe.Pointer(pCur5 + 56 /* &.uc */)))
if !(!(res14 != 0)) {
- goto __837
+ goto __839
}
// If there is data, jump to P2
goto jump_to_p2_and_check_for_interrupt
-__837:
+__839:
;
goto check_for_interrupt
@@ -72331,7 +74367,7 @@ __837:
// P4 is a pointer to a virtual table object, an sqlite3_vtab structure.
// This opcode invokes the corresponding xRename method. The value
// in register P1 is passed as the zName argument to the xRename method.
-__174:
+__175:
isLegacy = (int32((*Sqlite3)(unsafe.Pointer(db)).Fflags & uint64(SQLITE_LegacyAlter)))
*(*U64)(unsafe.Pointer(db + 48 /* &.flags */)) |= (uint64(SQLITE_LegacyAlter))
@@ -72340,25 +74376,27 @@ __174:
rc = Xsqlite3VdbeChangeEncoding(tls, pName, SQLITE_UTF8)
if !(rc != 0) {
- goto __838
+ goto __840
}
goto abort_due_to_error
-__838:
+__840:
;
- rc = (*(*func(*libc.TLS, uintptr, uintptr) int32)(unsafe.Pointer(((*Sqlite3_vtab)(unsafe.Pointer(pVtab5)).FpModule + 152 /* &.xRename */))))(tls, pVtab5, (*Mem)(unsafe.Pointer(pName)).Fz)
+ rc = (*struct {
+ f func(*libc.TLS, uintptr, uintptr) int32
+ })(unsafe.Pointer(&struct{ uintptr }{(*Sqlite3_module)(unsafe.Pointer((*Sqlite3_vtab)(unsafe.Pointer(pVtab5)).FpModule)).FxRename})).f(tls, pVtab5, (*Mem)(unsafe.Pointer(pName)).Fz)
if !(isLegacy == 0) {
- goto __839
+ goto __841
}
*(*U64)(unsafe.Pointer(db + 48 /* &.flags */)) &= (libc.CplUint64(uint64(SQLITE_LegacyAlter)))
-__839:
+__841:
;
Xsqlite3VtabImportErrmsg(tls, p, pVtab5)
- libc.SetBitFieldPtr16Uint32(p+200 /* &.expired */, Bft(0), 0, 0x3)
+ libc.SetBitFieldPtr16Uint32(p+200 /* &.expired */, Bft(0), 14, 0xc000)
if !(rc != 0) {
- goto __840
+ goto __842
}
goto abort_due_to_error
-__840:
+__842:
;
goto __8
@@ -72388,95 +74426,97 @@ __840:
//
// P5 is the error actions (OE_Replace, OE_Fail, OE_Ignore, etc) to
// apply in the case of a constraint failure on an insert or update.
-__175:
+__176:
;
if !((*Sqlite3)(unsafe.Pointer(db)).FmallocFailed != 0) {
- goto __841
+ goto __843
}
goto no_mem
-__841:
+__843:
;
pVtab6 = (*VTable)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(pOp + 16 /* &.p4 */)))).FpVtab
if !((pVtab6 == uintptr(0)) || ((*Sqlite3_vtab)(unsafe.Pointer(pVtab6)).FpModule == uintptr(0))) {
- goto __842
+ goto __844
}
rc = SQLITE_LOCKED
goto abort_due_to_error
-__842:
+__844:
;
pModule5 = (*Sqlite3_vtab)(unsafe.Pointer(pVtab6)).FpModule
nArg1 = (*Op)(unsafe.Pointer(pOp)).Fp2
if !((*Sqlite3_module)(unsafe.Pointer(pModule5)).FxUpdate != 0) {
- goto __843
+ goto __845
}
vtabOnConflict = (*Sqlite3)(unsafe.Pointer(db)).FvtabOnConflict
apArg1 = (*Vdbe)(unsafe.Pointer(p)).FapArg
pX1 = (aMem + uintptr((*Op)(unsafe.Pointer(pOp)).Fp3)*56)
i7 = 0
-__844:
+__846:
if !(i7 < nArg1) {
- goto __846
+ goto __848
}
*(*uintptr)(unsafe.Pointer(apArg1 + uintptr(i7)*8)) = pX1
pX1 += 56
- goto __845
-__845:
+ goto __847
+__847:
i7++
- goto __844
goto __846
-__846:
+ goto __848
+__848:
;
(*Sqlite3)(unsafe.Pointer(db)).FvtabOnConflict = U8((*Op)(unsafe.Pointer(pOp)).Fp5)
- rc = (*(*func(*libc.TLS, uintptr, int32, uintptr, uintptr) int32)(unsafe.Pointer((pModule5 + 104 /* &.xUpdate */))))(tls, pVtab6, nArg1, apArg1, bp+928 /* &rowid1 */)
+ rc = (*struct {
+ f func(*libc.TLS, uintptr, int32, uintptr, uintptr) int32
+ })(unsafe.Pointer(&struct{ uintptr }{(*Sqlite3_module)(unsafe.Pointer(pModule5)).FxUpdate})).f(tls, pVtab6, nArg1, apArg1, bp+928 /* &rowid1 */)
(*Sqlite3)(unsafe.Pointer(db)).FvtabOnConflict = vtabOnConflict
Xsqlite3VtabImportErrmsg(tls, p, pVtab6)
if !((rc == SQLITE_OK) && ((*Op)(unsafe.Pointer(pOp)).Fp1 != 0)) {
- goto __847
+ goto __849
}
(*Sqlite3)(unsafe.Pointer(db)).FlastRowid = *(*Sqlite_int64)(unsafe.Pointer(bp + 928 /* rowid1 */))
-__847:
+__849:
;
if !(((rc & 0xff) == SQLITE_CONSTRAINT) && ((*VTable)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(pOp + 16 /* &.p4 */)))).FbConstraint != 0)) {
- goto __848
+ goto __850
}
if !(int32((*Op)(unsafe.Pointer(pOp)).Fp5) == OE_Ignore) {
- goto __850
+ goto __852
}
rc = SQLITE_OK
- goto __851
-__850:
+ goto __853
+__852:
(*Vdbe)(unsafe.Pointer(p)).FerrorAction = func() uint8 {
if int32((*Op)(unsafe.Pointer(pOp)).Fp5) == OE_Replace {
return uint8(OE_Abort)
}
return uint8((*Op)(unsafe.Pointer(pOp)).Fp5)
}()
-__851:
+__853:
;
- goto __849
-__848:
+ goto __851
+__850:
(*Vdbe)(unsafe.Pointer(p)).FnChange++
-__849:
+__851:
;
if !(rc != 0) {
- goto __852
+ goto __854
}
goto abort_due_to_error
-__852:
+__854:
;
-__843:
+__845:
;
goto __8
// Opcode: Pagecount P1 P2 * * *
//
// Write the current number of pages in database P1 to memory cell P2.
-__176: // out2
+__177: // out2
pOut = out2Prerelease(tls, p, pOp)
*(*I64)(unsafe.Pointer(pOut /* &.u */)) = I64(Xsqlite3BtreeLastPage(tls, (*Db)(unsafe.Pointer((*Sqlite3)(unsafe.Pointer(db)).FaDb+uintptr((*Op)(unsafe.Pointer(pOp)).Fp1)*32)).FpBt))
goto __8
@@ -72488,22 +74528,22 @@ __176: // out2
// do not change the maximum page count value if P3==0.
//
// Store the maximum page count after the change in register P2.
-__177:
+__178:
pOut = out2Prerelease(tls, p, pOp)
pBt3 = (*Db)(unsafe.Pointer((*Sqlite3)(unsafe.Pointer(db)).FaDb + uintptr((*Op)(unsafe.Pointer(pOp)).Fp1)*32)).FpBt
newMax = uint32(0)
if !((*Op)(unsafe.Pointer(pOp)).Fp3 != 0) {
- goto __853
+ goto __855
}
newMax = Xsqlite3BtreeLastPage(tls, pBt3)
if !(newMax < uint32((*Op)(unsafe.Pointer(pOp)).Fp3)) {
- goto __854
+ goto __856
}
newMax = uint32((*Op)(unsafe.Pointer(pOp)).Fp3)
-__854:
+__856:
;
-__853:
+__855:
;
*(*I64)(unsafe.Pointer(pOut /* &.u */)) = I64(Xsqlite3BtreeMaxPageCount(tls, pBt3, newMax))
goto __8
@@ -72552,8 +74592,8 @@ __853:
// if they were, they throw an error.
//
// See also: AggStep, AggFinal, Function
-__178: // group
-__179:
+__179: // group
+__180:
;
pCtx2 = *(*uintptr)(unsafe.Pointer(pOp + 16 /* &.p4 */))
@@ -72563,64 +74603,66 @@ __179:
// reinitializes the relavant parts of the sqlite3_context object
pOut = (aMem + uintptr((*Op)(unsafe.Pointer(pOp)).Fp3)*56)
if !((*Sqlite3_context)(unsafe.Pointer(pCtx2)).FpOut != pOut) {
- goto __855
+ goto __857
}
(*Sqlite3_context)(unsafe.Pointer(pCtx2)).FpVdbe = p
(*Sqlite3_context)(unsafe.Pointer(pCtx2)).FpOut = pOut
i8 = (int32((*Sqlite3_context)(unsafe.Pointer(pCtx2)).Fargc) - 1)
-__856:
+__858:
if !(i8 >= 0) {
- goto __858
+ goto __860
}
*(*uintptr)(unsafe.Pointer((pCtx2 + 48 /* &.argv */) + uintptr(i8)*8)) = (aMem + uintptr(((*Op)(unsafe.Pointer(pOp)).Fp2+i8))*56)
- goto __857
-__857:
+ goto __859
+__859:
i8--
- goto __856
goto __858
-__858:
+ goto __860
+__860:
;
-__855:
+__857:
;
(*Mem)(unsafe.Pointer(pOut)).Fflags = (U16((int32((*Mem)(unsafe.Pointer((pOut))).Fflags) & libc.CplInt32((MEM_TypeMask | MEM_Zero))) | MEM_Null))
- (*(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(((*Sqlite3_context)(unsafe.Pointer(pCtx2)).FpFunc + 24 /* &.xSFunc */))))(tls, pCtx2, int32((*Sqlite3_context)(unsafe.Pointer(pCtx2)).Fargc), pCtx2+48 /* &.argv */) // IMP: R-24505-23230
+ (*struct {
+ f func(*libc.TLS, uintptr, int32, uintptr)
+ })(unsafe.Pointer(&struct{ uintptr }{(*FuncDef)(unsafe.Pointer((*Sqlite3_context)(unsafe.Pointer(pCtx2)).FpFunc)).FxSFunc})).f(tls, pCtx2, int32((*Sqlite3_context)(unsafe.Pointer(pCtx2)).Fargc), pCtx2+48 /* &.argv */) // IMP: R-24505-23230
// If the function returned an error, throw an exception
if !((*Sqlite3_context)(unsafe.Pointer(pCtx2)).FisError != 0) {
- goto __859
+ goto __861
}
if !((*Sqlite3_context)(unsafe.Pointer(pCtx2)).FisError > 0) {
- goto __860
+ goto __862
}
- Xsqlite3VdbeError(tls, p, ts+2718 /* "%s" */, libc.VaList(bp+128, Xsqlite3_value_text(tls, pOut)))
+ Xsqlite3VdbeError(tls, p, ts+2790 /* "%s" */, libc.VaList(bp+128, Xsqlite3_value_text(tls, pOut)))
rc = (*Sqlite3_context)(unsafe.Pointer(pCtx2)).FisError
-__860:
+__862:
;
Xsqlite3VdbeDeleteAuxData(tls, db, (p + 288 /* &.pAuxData */), (*Sqlite3_context)(unsafe.Pointer(pCtx2)).FiOp, (*Op)(unsafe.Pointer(pOp)).Fp1)
(*Sqlite3_context)(unsafe.Pointer(pCtx2)).FisError = 0
if !(rc != 0) {
- goto __861
+ goto __863
}
goto abort_due_to_error
-__861:
+__863:
;
-__859:
+__861:
;
// Copy the result of the function into register P3
if !((int32((*Mem)(unsafe.Pointer(pOut)).Fflags) & (MEM_Str | MEM_Blob)) != 0) {
- goto __862
+ goto __864
}
Xsqlite3VdbeChangeEncoding(tls, pOut, int32(encoding))
if !(Xsqlite3VdbeMemTooBig(tls, pOut) != 0) {
- goto __863
+ goto __865
}
goto too_big
-__863:
+__865:
;
-__862:
+__864:
;
goto __8
@@ -72648,8 +74690,8 @@ __862:
//
// If P3 is not zero, then it is an address to jump to if an SQLITE_CORRUPT
// error is encountered.
-__180:
__181:
+__182:
// If the P4 argument is not NULL, then it must be an SQL comment string.
// The "--" string is broken up to prevent false-positives with srcck1.c.
@@ -72671,61 +74713,67 @@ __181:
}
return (*Vdbe)(unsafe.Pointer(p)).FzSql
}())) != uintptr(0))) {
- goto __864
+ goto __866
}
if !((int32((*Sqlite3)(unsafe.Pointer(db)).FmTrace) & SQLITE_TRACE_LEGACY) != 0) {
- goto __865
+ goto __867
}
z2 = Xsqlite3VdbeExpandSql(tls, p, zTrace)
- (*(*func(*libc.TLS, uintptr, uintptr))(unsafe.Pointer((db + 240 /* &.trace */ /* &.xLegacy */))))(tls, (*Sqlite3)(unsafe.Pointer(db)).FpTraceArg, z2)
+ (*struct {
+ f func(*libc.TLS, uintptr, uintptr)
+ })(unsafe.Pointer(&struct{ uintptr }{*(*uintptr)(unsafe.Pointer(db + 240 /* &.trace */))})).f(tls, (*Sqlite3)(unsafe.Pointer(db)).FpTraceArg, z2)
Xsqlite3_free(tls, z2)
- goto __866
-__865:
+ goto __868
+__867:
if !((*Sqlite3)(unsafe.Pointer(db)).FnVdbeExec > 1) {
- goto __867
+ goto __869
}
- z3 = Xsqlite3MPrintf(tls, db, ts+5012 /* "-- %s" */, libc.VaList(bp+136, zTrace))
- (*(*func(*libc.TLS, U32, uintptr, uintptr, uintptr) int32)(unsafe.Pointer((db + 240 /* &.trace */ /* &.xV2 */))))(tls, uint32(SQLITE_TRACE_STMT), (*Sqlite3)(unsafe.Pointer(db)).FpTraceArg, p, z3)
+ z3 = Xsqlite3MPrintf(tls, db, ts+5143 /* "-- %s" */, libc.VaList(bp+136, zTrace))
+ (*struct {
+ f func(*libc.TLS, U32, uintptr, uintptr, uintptr) int32
+ })(unsafe.Pointer(&struct{ uintptr }{*(*uintptr)(unsafe.Pointer(db + 240 /* &.trace */))})).f(tls, uint32(SQLITE_TRACE_STMT), (*Sqlite3)(unsafe.Pointer(db)).FpTraceArg, p, z3)
Xsqlite3DbFree(tls, db, z3)
- goto __868
-__867:
- (*(*func(*libc.TLS, U32, uintptr, uintptr, uintptr) int32)(unsafe.Pointer((db + 240 /* &.trace */ /* &.xV2 */))))(tls, uint32(SQLITE_TRACE_STMT), (*Sqlite3)(unsafe.Pointer(db)).FpTraceArg, p, zTrace)
+ goto __870
+__869:
+ (*struct {
+ f func(*libc.TLS, U32, uintptr, uintptr, uintptr) int32
+ })(unsafe.Pointer(&struct{ uintptr }{*(*uintptr)(unsafe.Pointer(db + 240 /* &.trace */))})).f(tls, uint32(SQLITE_TRACE_STMT), (*Sqlite3)(unsafe.Pointer(db)).FpTraceArg, p, zTrace)
+__870:
+ ;
__868:
;
__866:
;
-__864:
- ;
if !((*Op)(unsafe.Pointer(pOp)).Fp1 >= Xsqlite3Config.FiOnceResetThreshold) {
- goto __869
+ goto __871
}
if !(int32((*Op)(unsafe.Pointer(pOp)).Fopcode) == OP_Trace) {
- goto __870
+ goto __872
}
goto __8
-__870:
+__872:
;
i9 = 1
-__871:
+__873:
if !(i9 < (*Vdbe)(unsafe.Pointer(p)).FnOp) {
- goto __873
+ goto __875
}
if !(int32((*Op)(unsafe.Pointer((*Vdbe)(unsafe.Pointer(p)).FaOp+uintptr(i9)*24)).Fopcode) == OP_Once) {
- goto __874
+ goto __876
}
(*Op)(unsafe.Pointer((*Vdbe)(unsafe.Pointer(p)).FaOp + uintptr(i9)*24)).Fp1 = 0
-__874:
+__876:
;
- goto __872
-__872:
+ goto __874
+__874:
i9++
- goto __871
goto __873
-__873:
+ goto __875
+__875:
;
(*Op)(unsafe.Pointer(pOp)).Fp1 = 0
-__869:
+__871:
;
(*Op)(unsafe.Pointer(pOp)).Fp1++
*(*U32)(unsafe.Pointer((p + 212 /* &.aCounter */) + 6*4))++
@@ -72739,7 +74787,7 @@ __869:
// is to say when the EXPLAIN QUERY PLAN syntax is used.)
// This opcode records information from the optimizer. It is the
// the same as a no-op. This opcodesnever appears in a real VM program.
-__182: // This is really OP_Noop, OP_Explain
+__183: // This is really OP_Noop, OP_Explain
;
goto __8
@@ -72770,65 +74818,67 @@ __7:
// an error of some kind.
abort_due_to_error:
if !((*Sqlite3)(unsafe.Pointer(db)).FmallocFailed != 0) {
- goto __875
+ goto __877
}
rc = SQLITE_NOMEM
- goto __876
-__875:
+ goto __878
+__877:
if !(rc == (SQLITE_IOERR | (int32(33) << 8))) {
- goto __877
+ goto __879
}
- rc = Xsqlite3CorruptError(tls, 94170)
-__877:
+ rc = Xsqlite3CorruptError(tls, 94739)
+__879:
;
-__876:
+__878:
;
if !(((*Vdbe)(unsafe.Pointer(p)).FzErrMsg == uintptr(0)) && (rc != (SQLITE_IOERR | (int32(12) << 8)))) {
- goto __878
+ goto __880
}
- Xsqlite3VdbeError(tls, p, ts+2718 /* "%s" */, libc.VaList(bp+144, Xsqlite3ErrStr(tls, rc)))
-__878:
+ Xsqlite3VdbeError(tls, p, ts+2790 /* "%s" */, libc.VaList(bp+144, Xsqlite3ErrStr(tls, rc)))
+__880:
;
(*Vdbe)(unsafe.Pointer(p)).Frc = rc
Xsqlite3SystemError(tls, db, rc)
- Xsqlite3_log(tls, rc, ts+5018, /* "statement aborts..." */
+ Xsqlite3_log(tls, rc, ts+5149, /* "statement aborts..." */
libc.VaList(bp+152, (int32((int64(pOp)-int64(aOp))/24)), (*Vdbe)(unsafe.Pointer(p)).FzSql, (*Vdbe)(unsafe.Pointer(p)).FzErrMsg))
Xsqlite3VdbeHalt(tls, p)
if !(rc == (SQLITE_IOERR | (int32(12) << 8))) {
- goto __879
+ goto __881
}
Xsqlite3OomFault(tls, db)
-__879:
+__881:
;
rc = SQLITE_ERROR
if !(int32(resetSchemaOnFault) > 0) {
- goto __880
+ goto __882
}
Xsqlite3ResetOneSchema(tls, db, (int32(resetSchemaOnFault) - 1))
-__880:
+__882:
;
// This is the only way out of this procedure. We have to
// release the mutexes on btrees that were acquired at the
// top.
vdbe_return:
-__881:
+__883:
if !((nVmStep >= nProgressLimit) && ((*Sqlite3)(unsafe.Pointer(db)).FxProgress != uintptr(0))) {
- goto __882
+ goto __884
}
nProgressLimit = nProgressLimit + (U64((*Sqlite3)(unsafe.Pointer(db)).FnProgressOps))
- if !((*(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer((db + 512 /* &.xProgress */))))(tls, (*Sqlite3)(unsafe.Pointer(db)).FpProgressArg) != 0) {
- goto __883
+ if !((*struct {
+ f func(*libc.TLS, uintptr) int32
+ })(unsafe.Pointer(&struct{ uintptr }{(*Sqlite3)(unsafe.Pointer(db)).FxProgress})).f(tls, (*Sqlite3)(unsafe.Pointer(db)).FpProgressArg) != 0) {
+ goto __885
}
nProgressLimit = (uint64(0xffffffff) | (U64((uint64(0xffffffff))) << 32))
rc = SQLITE_INTERRUPT
goto abort_due_to_error
-__883:
+__885:
;
- goto __881
-__882:
+ goto __883
+__884:
;
*(*U32)(unsafe.Pointer((p + 212 /* &.aCounter */) + 4*4)) += (U32(int32(nVmStep)))
Xsqlite3VdbeLeave(tls, p)
@@ -72838,14 +74888,14 @@ __882:
// Jump to here if a string or blob larger than SQLITE_MAX_LENGTH
// is encountered.
too_big:
- Xsqlite3VdbeError(tls, p, ts+4317 /* "string or blob t..." */, 0)
+ Xsqlite3VdbeError(tls, p, ts+4448 /* "string or blob t..." */, 0)
rc = SQLITE_TOOBIG
goto abort_due_to_error
// Jump to here if a malloc() fails.
no_mem:
Xsqlite3OomFault(tls, db)
- Xsqlite3VdbeError(tls, p, ts+5050 /* "out of memory" */, 0)
+ Xsqlite3VdbeError(tls, p, ts+5181 /* "out of memory" */, 0)
rc = SQLITE_NOMEM
goto abort_due_to_error
@@ -72858,15 +74908,12 @@ abort_due_to_interrupt:
return int32(0)
}
-var azType = [4]uintptr{ts + 5064 /* "NOT NULL" */, ts + 5073 /* "UNIQUE" */, ts + 5080, /* "CHECK" */
- ts + 5086 /* "FOREIGN KEY" */} /* sqlite3.c:87065:25 */
-var aLTb = [6]uint8{uint8(1), uint8(0), uint8(0), uint8(1), uint8(1), uint8(0)} /* sqlite3.c:88082:32 */
-var aEQb = [6]uint8{uint8(0), uint8(1), uint8(0), uint8(1), uint8(0), uint8(1)} /* sqlite3.c:88085:32 */
-var aGTb = [6]uint8{uint8(1), uint8(0), uint8(1), uint8(0), uint8(0), uint8(1)} /* sqlite3.c:88088:32 */
-var and_logic = [9]uint8{uint8(0), uint8(0), uint8(0), uint8(0), uint8(1), uint8(2), uint8(0), uint8(2), uint8(2)} /* sqlite3.c:88308:32 */
-var or_logic = [9]uint8{uint8(0), uint8(1), uint8(2), uint8(1), uint8(1), uint8(1), uint8(2), uint8(1), uint8(2)} /* sqlite3.c:88311:32 */
-var aFlag1 = [2]U16{U16(MEM_Blob), (U16(MEM_Str | MEM_Term))} /* sqlite3.c:88761:24 */
-var vfsFlags int32 = ((((SQLITE_OPEN_READWRITE | SQLITE_OPEN_CREATE) | SQLITE_OPEN_EXCLUSIVE) | SQLITE_OPEN_DELETEONCLOSE) | SQLITE_OPEN_TRANSIENT_DB) /* sqlite3.c:89899:20 */
+var azType = [4]uintptr{ts + 5195 /* "NOT NULL" */, ts + 5204 /* "UNIQUE" */, ts + 5211, /* "CHECK" */
+ ts + 5217 /* "FOREIGN KEY" */} /* sqlite3.c:87624:25 */
+var and_logic = [9]uint8{uint8(0), uint8(0), uint8(0), uint8(0), uint8(1), uint8(2), uint8(0), uint8(2), uint8(2)} /* sqlite3.c:88844:32 */
+var or_logic = [9]uint8{uint8(0), uint8(1), uint8(2), uint8(1), uint8(1), uint8(1), uint8(2), uint8(1), uint8(2)} /* sqlite3.c:88847:32 */
+var aFlag1 = [2]U16{U16(MEM_Blob), (U16(MEM_Str | MEM_Term))} /* sqlite3.c:89315:24 */
+var vfsFlags int32 = ((((SQLITE_OPEN_READWRITE | SQLITE_OPEN_CREATE) | SQLITE_OPEN_EXCLUSIVE) | SQLITE_OPEN_DELETEONCLOSE) | SQLITE_OPEN_TRANSIENT_DB) /* sqlite3.c:90453:20 */
//************* End of vdbe.c ***********************************************
//************* Begin file vdbeblob.c ***************************************
@@ -72888,16 +74935,16 @@ var vfsFlags int32 = ((((SQLITE_OPEN_READWRITE | SQLITE_OPEN_CREATE) | SQLITE_OP
// Valid sqlite3_blob* handles point to Incrblob structures.
type Incrblob1 = struct {
- FnByte int32
- FiOffset int32
- FiCol U16
- _ [6]byte
- FpCsr uintptr
- FpStmt uintptr
- Fdb uintptr
- FzDb uintptr
- FpTab uintptr
-} /* sqlite3.c:94260:9 */
+ FnByte int32
+ FiOffset int32
+ FiCol U16
+ F__ccgo_pad1 [6]byte
+ FpCsr uintptr
+ FpStmt uintptr
+ Fdb uintptr
+ FzDb uintptr
+ FpTab uintptr
+} /* sqlite3.c:94829:9 */
//************* End of vdbe.c ***********************************************
//************* Begin file vdbeblob.c ***************************************
@@ -72918,7 +74965,7 @@ type Incrblob1 = struct {
// #include "vdbeInt.h"
// Valid sqlite3_blob* handles point to Incrblob structures.
-type Incrblob = Incrblob1 /* sqlite3.c:94260:25 */
+type Incrblob = Incrblob1 /* sqlite3.c:94829:25 */
// This function is used by both blob_open() and blob_reopen(). It seeks
// the b-tree cursor associated with blob handle p to point to row iRow.
@@ -72935,7 +74982,7 @@ type Incrblob = Incrblob1 /* sqlite3.c:94260:25 */
// If an error does occur, then the b-tree cursor is closed. All subsequent
// calls to sqlite3_blob_read(), blob_write() or blob_reopen() will
// immediately return SQLITE_ABORT.
-func blobSeekToRow(tls *libc.TLS, p uintptr, iRow Sqlite3_int64, pzErr uintptr) int32 { /* sqlite3.c:94290:12: */
+func blobSeekToRow(tls *libc.TLS, p uintptr, iRow Sqlite3_int64, pzErr uintptr) int32 { /* sqlite3.c:94859:12: */
bp := tls.Alloc(24)
defer tls.Free(24)
@@ -72969,16 +75016,16 @@ func blobSeekToRow(tls *libc.TLS, p uintptr, iRow Sqlite3_int64, pzErr uintptr)
}
if type1 < U32(12) {
- zErr = Xsqlite3MPrintf(tls, (*Incrblob)(unsafe.Pointer(p)).Fdb, ts+5098, /* "cannot open valu..." */
+ zErr = Xsqlite3MPrintf(tls, (*Incrblob)(unsafe.Pointer(p)).Fdb, ts+5229, /* "cannot open valu..." */
libc.VaList(bp, func() uintptr {
if type1 == U32(0) {
- return ts + 5127 /* "null" */
+ return ts + 5258 /* "null" */
}
return func() uintptr {
if type1 == U32(7) {
- return ts + 5132 /* "real" */
+ return ts + 5263 /* "real" */
}
- return ts + 5137 /* "integer" */
+ return ts + 5268 /* "integer" */
}()
}()))
rc = SQLITE_ERROR
@@ -72998,10 +75045,10 @@ func blobSeekToRow(tls *libc.TLS, p uintptr, iRow Sqlite3_int64, pzErr uintptr)
rc = Xsqlite3_finalize(tls, (*Incrblob)(unsafe.Pointer(p)).FpStmt)
(*Incrblob)(unsafe.Pointer(p)).FpStmt = uintptr(0)
if rc == SQLITE_OK {
- zErr = Xsqlite3MPrintf(tls, (*Incrblob)(unsafe.Pointer(p)).Fdb, ts+5145 /* "no such rowid: %..." */, libc.VaList(bp+8, iRow))
+ zErr = Xsqlite3MPrintf(tls, (*Incrblob)(unsafe.Pointer(p)).Fdb, ts+5276 /* "no such rowid: %..." */, libc.VaList(bp+8, iRow))
rc = SQLITE_ERROR
} else {
- zErr = Xsqlite3MPrintf(tls, (*Incrblob)(unsafe.Pointer(p)).Fdb, ts+2718 /* "%s" */, libc.VaList(bp+16, Xsqlite3_errmsg(tls, (*Incrblob)(unsafe.Pointer(p)).Fdb)))
+ zErr = Xsqlite3MPrintf(tls, (*Incrblob)(unsafe.Pointer(p)).Fdb, ts+2790 /* "%s" */, libc.VaList(bp+16, Xsqlite3_errmsg(tls, (*Incrblob)(unsafe.Pointer(p)).Fdb)))
}
}
@@ -73010,7 +75057,7 @@ func blobSeekToRow(tls *libc.TLS, p uintptr, iRow Sqlite3_int64, pzErr uintptr)
}
// Open a blob handle.
-func Xsqlite3_blob_open(tls *libc.TLS, db uintptr, zDb uintptr, zTable uintptr, zColumn uintptr, iRow Sqlite_int64, wrFlag int32, ppBlob uintptr) int32 { /* sqlite3.c:94355:16: */
+func Xsqlite3_blob_open(tls *libc.TLS, db uintptr, zDb uintptr, zTable uintptr, zColumn uintptr, iRow Sqlite_int64, wrFlag int32, ppBlob uintptr) int32 { /* sqlite3.c:94924:16: */
bp := tls.Alloc(464)
defer tls.Free(464)
@@ -73064,21 +75111,21 @@ __4:
goto __5
}
pTab = uintptr(0)
- Xsqlite3ErrorMsg(tls, bp+48 /* &sParse */, ts+5165 /* "cannot open virt..." */, libc.VaList(bp, zTable))
+ Xsqlite3ErrorMsg(tls, bp+48 /* &sParse */, ts+5296 /* "cannot open virt..." */, libc.VaList(bp, zTable))
__5:
;
if !((pTab != 0) && !(((*Table)(unsafe.Pointer((pTab))).FtabFlags & U32(TF_WithoutRowid)) == U32(0))) {
goto __6
}
pTab = uintptr(0)
- Xsqlite3ErrorMsg(tls, bp+48 /* &sParse */, ts+5195 /* "cannot open tabl..." */, libc.VaList(bp+8, zTable))
+ Xsqlite3ErrorMsg(tls, bp+48 /* &sParse */, ts+5326 /* "cannot open tabl..." */, libc.VaList(bp+8, zTable))
__6:
;
if !((pTab != 0) && ((*Table)(unsafe.Pointer(pTab)).FpSelect != 0)) {
goto __7
}
pTab = uintptr(0)
- Xsqlite3ErrorMsg(tls, bp+48 /* &sParse */, ts+5231 /* "cannot open view..." */, libc.VaList(bp+16, zTable))
+ Xsqlite3ErrorMsg(tls, bp+48 /* &sParse */, ts+5362 /* "cannot open view..." */, libc.VaList(bp+16, zTable))
__7:
;
if !(!(pTab != 0)) {
@@ -73123,7 +75170,7 @@ __12:
goto __14
}
Xsqlite3DbFree(tls, db, *(*uintptr)(unsafe.Pointer(bp + 456 /* zErr */)))
- *(*uintptr)(unsafe.Pointer(bp + 456 /* zErr */)) = Xsqlite3MPrintf(tls, db, ts+5252 /* "no such column: ..." */, libc.VaList(bp+24, zColumn))
+ *(*uintptr)(unsafe.Pointer(bp + 456 /* zErr */)) = Xsqlite3MPrintf(tls, db, ts+5383 /* "no such column: ..." */, libc.VaList(bp+24, zColumn))
rc = SQLITE_ERROR
Xsqlite3BtreeLeaveAll(tls, db)
goto blob_open_out
@@ -73152,7 +75199,7 @@ __20:
if !((*sColMap)(unsafe.Pointer((pFKey+64 /* &.aCol */)+uintptr(j)*16)).FiFrom == iCol) {
goto __23
}
- zFault = ts + 5273 /* "foreign key" */
+ zFault = ts + 5404 /* "foreign key" */
__23:
;
goto __21
@@ -73185,7 +75232,7 @@ __27:
if !((int32(*(*I16)(unsafe.Pointer((*Index)(unsafe.Pointer(pIdx)).FaiColumn + uintptr(j1)*2))) == iCol) || (int32(*(*I16)(unsafe.Pointer((*Index)(unsafe.Pointer(pIdx)).FaiColumn + uintptr(j1)*2))) == (-2))) {
goto __30
}
- zFault = ts + 5285 /* "indexed" */
+ zFault = ts + 5416 /* "indexed" */
__30:
;
goto __28
@@ -73206,7 +75253,7 @@ __26:
goto __31
}
Xsqlite3DbFree(tls, db, *(*uintptr)(unsafe.Pointer(bp + 456 /* zErr */)))
- *(*uintptr)(unsafe.Pointer(bp + 456 /* zErr */)) = Xsqlite3MPrintf(tls, db, ts+5293 /* "cannot open %s c..." */, libc.VaList(bp+32, zFault))
+ *(*uintptr)(unsafe.Pointer(bp + 456 /* zErr */)) = Xsqlite3MPrintf(tls, db, ts+5424 /* "cannot open %s c..." */, libc.VaList(bp+32, zFault))
rc = SQLITE_ERROR
Xsqlite3BtreeLeaveAll(tls, db)
goto blob_open_out
@@ -73315,7 +75362,7 @@ __38:
;
Xsqlite3ErrorWithMsg(tls, db, rc, func() uintptr {
if *(*uintptr)(unsafe.Pointer(bp + 456 /* zErr */)) != 0 {
- return ts + 2718 /* "%s" */
+ return ts + 2790 /* "%s" */
}
return uintptr(0)
}(), libc.VaList(bp+40, *(*uintptr)(unsafe.Pointer(bp + 456 /* zErr */))))
@@ -73326,7 +75373,7 @@ __38:
return rc
}
-var iLn int32 = 0 /* sqlite3.c:94498:24 */
+var iLn int32 = 0 /* sqlite3.c:95067:24 */
var openBlob = [6]VdbeOpList{
{Fopcode: U8(OP_TableLock)}, // 0: Acquire a read or write lock
{Fopcode: U8(OP_OpenRead)}, // 1: Open a cursor
@@ -73335,11 +75382,11 @@ var openBlob = [6]VdbeOpList{
{Fopcode: U8(OP_Column), Fp3: int8(1)}, // 3
{Fopcode: U8(OP_ResultRow), Fp1: int8(1)}, // 4
{Fopcode: U8(OP_Halt)}, // 5
-} /* sqlite3.c:94499:31 */
+} /* sqlite3.c:95068:31 */
// Close a blob handle that was previously created using
// sqlite3_blob_open().
-func Xsqlite3_blob_close(tls *libc.TLS, pBlob uintptr) int32 { /* sqlite3.c:94588:16: */
+func Xsqlite3_blob_close(tls *libc.TLS, pBlob uintptr) int32 { /* sqlite3.c:95157:16: */
var p uintptr = pBlob
var rc int32
var db uintptr
@@ -73358,14 +75405,14 @@ func Xsqlite3_blob_close(tls *libc.TLS, pBlob uintptr) int32 { /* sqlite3.c:9458
}
// Perform a read or write operation on a blob
-func blobReadWrite(tls *libc.TLS, pBlob uintptr, z uintptr, n int32, iOffset int32, xCall uintptr) int32 { /* sqlite3.c:94609:12: */
+func blobReadWrite(tls *libc.TLS, pBlob uintptr, z uintptr, n int32, iOffset int32, xCall uintptr) int32 { /* sqlite3.c:95178:12: */
var rc int32
var p uintptr = pBlob
var v uintptr
var db uintptr
if p == uintptr(0) {
- return Xsqlite3MisuseError(tls, 94621)
+ return Xsqlite3MisuseError(tls, 95190)
}
db = (*Incrblob)(unsafe.Pointer(p)).Fdb
Xsqlite3_mutex_enter(tls, (*Sqlite3)(unsafe.Pointer(db)).Fmutex)
@@ -73402,10 +75449,12 @@ func blobReadWrite(tls *libc.TLS, pBlob uintptr, z uintptr, n int32, iOffset int
var iKey Sqlite3_int64
iKey = Xsqlite3BtreeIntegerKey(tls, (*Incrblob)(unsafe.Pointer(p)).FpCsr)
Xsqlite3VdbePreUpdateHook(tls,
- v, *(*uintptr)(unsafe.Pointer((*Vdbe)(unsafe.Pointer(v)).FapCsr)), SQLITE_DELETE, (*Incrblob)(unsafe.Pointer(p)).FzDb, (*Incrblob)(unsafe.Pointer(p)).FpTab, iKey, -1)
+ v, *(*uintptr)(unsafe.Pointer((*Vdbe)(unsafe.Pointer(v)).FapCsr)), SQLITE_DELETE, (*Incrblob)(unsafe.Pointer(p)).FzDb, (*Incrblob)(unsafe.Pointer(p)).FpTab, iKey, -1, int32((*Incrblob)(unsafe.Pointer(p)).FiCol))
}
- rc = (*(*func(*libc.TLS, uintptr, U32, U32, uintptr) int32)(unsafe.Pointer(&xCall)))(tls, (*Incrblob)(unsafe.Pointer(p)).FpCsr, (uint32(iOffset + (*Incrblob)(unsafe.Pointer(p)).FiOffset)), uint32(n), z)
+ rc = (*struct {
+ f func(*libc.TLS, uintptr, U32, U32, uintptr) int32
+ })(unsafe.Pointer(&struct{ uintptr }{xCall})).f(tls, (*Incrblob)(unsafe.Pointer(p)).FpCsr, (uint32(iOffset + (*Incrblob)(unsafe.Pointer(p)).FiOffset)), uint32(n), z)
Xsqlite3BtreeLeaveCursor(tls, (*Incrblob)(unsafe.Pointer(p)).FpCsr)
if rc == SQLITE_ABORT {
Xsqlite3VdbeFinalize(tls, v)
@@ -73421,14 +75470,14 @@ func blobReadWrite(tls *libc.TLS, pBlob uintptr, z uintptr, n int32, iOffset int
}
// Read data from a blob handle.
-func Xsqlite3_blob_read(tls *libc.TLS, pBlob uintptr, z uintptr, n int32, iOffset int32) int32 { /* sqlite3.c:94682:16: */
+func Xsqlite3_blob_read(tls *libc.TLS, pBlob uintptr, z uintptr, n int32, iOffset int32) int32 { /* sqlite3.c:95251:16: */
return blobReadWrite(tls, pBlob, z, n, iOffset, *(*uintptr)(unsafe.Pointer(&struct {
f func(*libc.TLS, uintptr, U32, U32, uintptr) int32
}{Xsqlite3BtreePayloadChecked})))
}
// Write data to a blob handle.
-func Xsqlite3_blob_write(tls *libc.TLS, pBlob uintptr, z uintptr, n int32, iOffset int32) int32 { /* sqlite3.c:94689:16: */
+func Xsqlite3_blob_write(tls *libc.TLS, pBlob uintptr, z uintptr, n int32, iOffset int32) int32 { /* sqlite3.c:95258:16: */
return blobReadWrite(tls, pBlob, z, n, iOffset, *(*uintptr)(unsafe.Pointer(&struct {
f func(*libc.TLS, uintptr, U32, U32, uintptr) int32
}{Xsqlite3BtreePutData})))
@@ -73438,7 +75487,7 @@ func Xsqlite3_blob_write(tls *libc.TLS, pBlob uintptr, z uintptr, n int32, iOffs
//
// The Incrblob.nByte field is fixed for the lifetime of the Incrblob
// so no mutex is required for access.
-func Xsqlite3_blob_bytes(tls *libc.TLS, pBlob uintptr) int32 { /* sqlite3.c:94699:16: */
+func Xsqlite3_blob_bytes(tls *libc.TLS, pBlob uintptr) int32 { /* sqlite3.c:95268:16: */
var p uintptr = pBlob
if (p != 0) && ((*Incrblob)(unsafe.Pointer(p)).FpStmt != 0) {
return (*Incrblob)(unsafe.Pointer(p)).FnByte
@@ -73454,7 +75503,7 @@ func Xsqlite3_blob_bytes(tls *libc.TLS, pBlob uintptr) int32 { /* sqlite3.c:9469
// database handle error code and message set. If this happens, then all
// subsequent calls to sqlite3_blob_xxx() functions (except blob_close())
// immediately return SQLITE_ABORT.
-func Xsqlite3_blob_reopen(tls *libc.TLS, pBlob uintptr, iRow Sqlite3_int64) int32 { /* sqlite3.c:94714:16: */
+func Xsqlite3_blob_reopen(tls *libc.TLS, pBlob uintptr, iRow Sqlite3_int64) int32 { /* sqlite3.c:95283:16: */
bp := tls.Alloc(16)
defer tls.Free(16)
@@ -73463,7 +75512,7 @@ func Xsqlite3_blob_reopen(tls *libc.TLS, pBlob uintptr, iRow Sqlite3_int64) int3
var db uintptr
if p == uintptr(0) {
- return Xsqlite3MisuseError(tls, 94719)
+ return Xsqlite3MisuseError(tls, 95288)
}
db = (*Incrblob)(unsafe.Pointer(p)).Fdb
Xsqlite3_mutex_enter(tls, (*Sqlite3)(unsafe.Pointer(db)).Fmutex)
@@ -73475,11 +75524,12 @@ func Xsqlite3_blob_reopen(tls *libc.TLS, pBlob uintptr, iRow Sqlite3_int64) int3
} else {
// var zErr uintptr at bp+8, 8
+ (*Vdbe)(unsafe.Pointer((*Incrblob)(unsafe.Pointer(p)).FpStmt)).Frc = SQLITE_OK
rc = blobSeekToRow(tls, p, iRow, bp+8 /* &zErr */)
if rc != SQLITE_OK {
Xsqlite3ErrorWithMsg(tls, db, rc, func() uintptr {
if *(*uintptr)(unsafe.Pointer(bp + 8 /* zErr */)) != 0 {
- return ts + 2718 /* "%s" */
+ return ts + 2790 /* "%s" */
}
return uintptr(0)
}(), libc.VaList(bp, *(*uintptr)(unsafe.Pointer(bp + 8 /* zErr */))))
@@ -73644,12 +75694,12 @@ func Xsqlite3_blob_reopen(tls *libc.TLS, pBlob uintptr, iRow Sqlite3_int64) int3
// Private objects used by the sorter
type MergeEngine1 = struct {
- FnTree int32
- _ [4]byte
- FpTask uintptr
- FaTree uintptr
- FaReadr uintptr
-} /* sqlite3.c:21040:9 */
+ FnTree int32
+ F__ccgo_pad1 [4]byte
+ FpTask uintptr
+ FaTree uintptr
+ FaReadr uintptr
+} /* sqlite3.c:21218:9 */
//************* End of vdbeblob.c *******************************************
//************* Begin file vdbesort.c ***************************************
@@ -73800,91 +75850,91 @@ type MergeEngine1 = struct {
// overflows. 512MiB.
// Private objects used by the sorter
-type MergeEngine = MergeEngine1 /* sqlite3.c:94907:28 */ // Merge PMAs together
+type MergeEngine = MergeEngine1 /* sqlite3.c:95477:28 */ // Merge PMAs together
type PmaReader1 = struct {
- FiReadOff I64
- FiEof I64
- FnAlloc int32
- FnKey int32
- FpFd uintptr
- FaAlloc uintptr
- FaKey uintptr
- FaBuffer uintptr
- FnBuffer int32
- _ [4]byte
- FaMap uintptr
- FpIncr uintptr
-} /* sqlite3.c:21040:9 */
+ FiReadOff I64
+ FiEof I64
+ FnAlloc int32
+ FnKey int32
+ FpFd uintptr
+ FaAlloc uintptr
+ FaKey uintptr
+ FaBuffer uintptr
+ FnBuffer int32
+ F__ccgo_pad1 [4]byte
+ FaMap uintptr
+ FpIncr uintptr
+} /* sqlite3.c:21218:9 */
// Merge PMAs together
-type PmaReader = PmaReader1 /* sqlite3.c:94908:26 */ // Incrementally read one PMA
+type PmaReader = PmaReader1 /* sqlite3.c:95478:26 */ // Incrementally read one PMA
type PmaWriter1 = struct {
- FeFWErr int32
- _ [4]byte
- FaBuffer uintptr
- FnBuffer int32
- FiBufStart int32
- FiBufEnd int32
- _ [4]byte
- FiWriteOff I64
- FpFd uintptr
-} /* sqlite3.c:94909:9 */
+ FeFWErr int32
+ F__ccgo_pad1 [4]byte
+ FaBuffer uintptr
+ FnBuffer int32
+ FiBufStart int32
+ FiBufEnd int32
+ F__ccgo_pad2 [4]byte
+ FiWriteOff I64
+ FpFd uintptr
+} /* sqlite3.c:95479:9 */
// Incrementally read one PMA
-type PmaWriter = PmaWriter1 /* sqlite3.c:94909:26 */ // Incrementally write one PMA
+type PmaWriter = PmaWriter1 /* sqlite3.c:95479:26 */ // Incrementally write one PMA
type SorterRecord1 = struct {
- FnVal int32
- _ [4]byte
- Fu struct{ FpNext uintptr }
-} /* sqlite3.c:21040:9 */
+ FnVal int32
+ F__ccgo_pad1 [4]byte
+ Fu struct{ FpNext uintptr }
+} /* sqlite3.c:21218:9 */
// Incrementally write one PMA
-type SorterRecord = SorterRecord1 /* sqlite3.c:94910:29 */ // A record being sorted
+type SorterRecord = SorterRecord1 /* sqlite3.c:95480:29 */ // A record being sorted
type SortSubtask1 = struct {
- FpThread uintptr
- FbDone int32
- _ [4]byte
- FpSorter uintptr
- FpUnpacked uintptr
- Flist SorterList
- FnPMA int32
- _ [4]byte
- FxCompare SorterCompare
- Ffile SorterFile
- Ffile2 SorterFile
-} /* sqlite3.c:21040:9 */
+ FpThread uintptr
+ FbDone int32
+ F__ccgo_pad1 [4]byte
+ FpSorter uintptr
+ FpUnpacked uintptr
+ Flist SorterList
+ FnPMA int32
+ F__ccgo_pad2 [4]byte
+ FxCompare SorterCompare
+ Ffile SorterFile
+ Ffile2 SorterFile
+} /* sqlite3.c:21218:9 */
// A record being sorted
-type SortSubtask = SortSubtask1 /* sqlite3.c:94911:28 */ // A sub-task in the sort process
+type SortSubtask = SortSubtask1 /* sqlite3.c:95481:28 */ // A sub-task in the sort process
type SorterFile1 = struct {
FpFd uintptr
FiEof I64
-} /* sqlite3.c:21040:9 */
+} /* sqlite3.c:21218:9 */
// A sub-task in the sort process
-type SorterFile = SorterFile1 /* sqlite3.c:94912:27 */ // Temporary file object wrapper
+type SorterFile = SorterFile1 /* sqlite3.c:95482:27 */ // Temporary file object wrapper
type SorterList1 = struct {
- FpList uintptr
- FaMemory uintptr
- FszPMA int32
- _ [4]byte
-} /* sqlite3.c:21040:9 */
+ FpList uintptr
+ FaMemory uintptr
+ FszPMA int32
+ F__ccgo_pad1 [4]byte
+} /* sqlite3.c:21218:9 */
// Temporary file object wrapper
-type SorterList = SorterList1 /* sqlite3.c:94913:27 */ // In-memory list of records
+type SorterList = SorterList1 /* sqlite3.c:95483:27 */ // In-memory list of records
type IncrMerger1 = struct {
- FpTask uintptr
- FpMerger uintptr
- FiStartOff I64
- FmxSz int32
- FbEof int32
- FbUseThread int32
- _ [4]byte
- FaFile [2]SorterFile
-} /* sqlite3.c:21040:9 */
+ FpTask uintptr
+ FpMerger uintptr
+ FiStartOff I64
+ FmxSz int32
+ FbEof int32
+ FbUseThread int32
+ F__ccgo_pad1 [4]byte
+ FaFile [2]SorterFile
+} /* sqlite3.c:21218:9 */
// In-memory list of records
-type IncrMerger = IncrMerger1 /* sqlite3.c:94914:27 */
+type IncrMerger = IncrMerger1 /* sqlite3.c:95484:27 */
// This object represents a single thread of control in a sort operation.
// Exactly VdbeSorter.nTask instances of this object are allocated
@@ -73915,11 +75965,11 @@ type IncrMerger = IncrMerger1 /* sqlite3.c:94914:27 */
// In both cases, the effects of the main thread seeing (bDone==0) even
// after the thread has finished are not dire. So we don't worry about
// memory barriers and such here.
-type SorterCompare = uintptr /* sqlite3.c:95041:13 */
+type SorterCompare = uintptr /* sqlite3.c:95611:13 */
// Free all memory belonging to the PmaReader object passed as the
// argument. All structure fields are set to zero before returning.
-func vdbePmaReaderClear(tls *libc.TLS, pReadr uintptr) { /* sqlite3.c:95216:13: */
+func vdbePmaReaderClear(tls *libc.TLS, pReadr uintptr) { /* sqlite3.c:95786:13: */
Xsqlite3_free(tls, (*PmaReader)(unsafe.Pointer(pReadr)).FaAlloc)
Xsqlite3_free(tls, (*PmaReader)(unsafe.Pointer(pReadr)).FaBuffer)
if (*PmaReader)(unsafe.Pointer(pReadr)).FaMap != 0 {
@@ -73936,7 +75986,7 @@ func vdbePmaReaderClear(tls *libc.TLS, pReadr uintptr) { /* sqlite3.c:95216:13:
//
// The buffer returned in *ppOut is only valid until the
// next call to this function.
-func vdbePmaReadBlob(tls *libc.TLS, p uintptr, nByte int32, ppOut uintptr) int32 { /* sqlite3.c:95233:12: */
+func vdbePmaReadBlob(tls *libc.TLS, p uintptr, nByte int32, ppOut uintptr) int32 { /* sqlite3.c:95803:12: */
bp := tls.Alloc(8)
defer tls.Free(8)
@@ -74040,7 +76090,7 @@ func vdbePmaReadBlob(tls *libc.TLS, p uintptr, nByte int32, ppOut uintptr) int32
// Read a varint from the stream of data accessed by p. Set *pnOut to
// the value read.
-func vdbePmaReadVarint(tls *libc.TLS, p uintptr, pnOut uintptr) int32 { /* sqlite3.c:95327:12: */
+func vdbePmaReadVarint(tls *libc.TLS, p uintptr, pnOut uintptr) int32 { /* sqlite3.c:95897:12: */
bp := tls.Alloc(24)
defer tls.Free(24)
@@ -74080,7 +76130,7 @@ func vdbePmaReadVarint(tls *libc.TLS, p uintptr, pnOut uintptr) int32 { /* sqlit
//
// Or, if an error occurs, return an SQLite error code. The final value of
// *pp is undefined in this case.
-func vdbeSorterMapFile(tls *libc.TLS, pTask uintptr, pFile uintptr, pp uintptr) int32 { /* sqlite3.c:95360:12: */
+func vdbeSorterMapFile(tls *libc.TLS, pTask uintptr, pFile uintptr, pp uintptr) int32 { /* sqlite3.c:95930:12: */
var rc int32 = SQLITE_OK
if (*SorterFile)(unsafe.Pointer(pFile)).FiEof <= (I64((*Sqlite3)(unsafe.Pointer((*VdbeSorter)(unsafe.Pointer((*SortSubtask)(unsafe.Pointer(pTask)).FpSorter)).Fdb)).FnMaxSorterMmap)) {
var pFd uintptr = (*SorterFile)(unsafe.Pointer(pFile)).FpFd
@@ -74095,7 +76145,7 @@ func vdbeSorterMapFile(tls *libc.TLS, pTask uintptr, pFile uintptr, pp uintptr)
// Attach PmaReader pReadr to file pFile (if it is not already attached to
// that file) and seek it to offset iOff within the file. Return SQLITE_OK
// if successful, or an SQLite error code if an error occurs.
-func vdbePmaReaderSeek(tls *libc.TLS, pTask uintptr, pReadr uintptr, pFile uintptr, iOff I64) int32 { /* sqlite3.c:95377:12: */
+func vdbePmaReaderSeek(tls *libc.TLS, pTask uintptr, pReadr uintptr, pFile uintptr, iOff I64) int32 { /* sqlite3.c:95947:12: */
var rc int32 = SQLITE_OK
if Xsqlite3FaultSim(tls, 201) != 0 {
@@ -74136,7 +76186,7 @@ func vdbePmaReaderSeek(tls *libc.TLS, pTask uintptr, pReadr uintptr, pFile uintp
// Advance PmaReader pReadr to the next key in its PMA. Return SQLITE_OK if
// no error occurs, or an SQLite error code if one does.
-func vdbePmaReaderNext(tls *libc.TLS, pReadr uintptr) int32 { /* sqlite3.c:95424:12: */
+func vdbePmaReaderNext(tls *libc.TLS, pReadr uintptr) int32 { /* sqlite3.c:95994:12: */
bp := tls.Alloc(8)
defer tls.Free(8)
@@ -74182,7 +76232,7 @@ func vdbePmaReaderNext(tls *libc.TLS, pReadr uintptr) int32 { /* sqlite3.c:95424
//
// If the pnByte parameter is NULL, then it is assumed that the file
// contains a single PMA, and that that PMA omits the initial length varint.
-func vdbePmaReaderInit(tls *libc.TLS, pTask uintptr, pFile uintptr, iStart I64, pReadr uintptr, pnByte uintptr) int32 { /* sqlite3.c:95471:12: */
+func vdbePmaReaderInit(tls *libc.TLS, pTask uintptr, pFile uintptr, iStart I64, pReadr uintptr, pnByte uintptr) int32 { /* sqlite3.c:96041:12: */
bp := tls.Alloc(8)
defer tls.Free(8)
@@ -74205,7 +76255,7 @@ func vdbePmaReaderInit(tls *libc.TLS, pTask uintptr, pFile uintptr, iStart I64,
// A version of vdbeSorterCompare() that assumes that it has already been
// determined that the first field of key1 is equal to the first field of
// key2.
-func vdbeSorterCompareTail(tls *libc.TLS, pTask uintptr, pbKey2Cached uintptr, pKey1 uintptr, nKey1 int32, pKey2 uintptr, nKey2 int32) int32 { /* sqlite3.c:95504:12: */
+func vdbeSorterCompareTail(tls *libc.TLS, pTask uintptr, pbKey2Cached uintptr, pKey1 uintptr, nKey1 int32, pKey2 uintptr, nKey2 int32) int32 { /* sqlite3.c:96074:12: */
var r2 uintptr = (*SortSubtask)(unsafe.Pointer(pTask)).FpUnpacked
if *(*int32)(unsafe.Pointer(pbKey2Cached)) == 0 {
Xsqlite3VdbeRecordUnpack(tls, (*VdbeSorter)(unsafe.Pointer((*SortSubtask)(unsafe.Pointer(pTask)).FpSorter)).FpKeyInfo, nKey2, pKey2, r2)
@@ -74225,7 +76275,7 @@ func vdbeSorterCompareTail(tls *libc.TLS, pTask uintptr, pbKey2Cached uintptr, p
//
// If an OOM error is encountered, (pTask->pUnpacked->error_rc) is set
// to SQLITE_NOMEM.
-func vdbeSorterCompare(tls *libc.TLS, pTask uintptr, pbKey2Cached uintptr, pKey1 uintptr, nKey1 int32, pKey2 uintptr, nKey2 int32) int32 { /* sqlite3.c:95531:12: */
+func vdbeSorterCompare(tls *libc.TLS, pTask uintptr, pbKey2Cached uintptr, pKey1 uintptr, nKey1 int32, pKey2 uintptr, nKey2 int32) int32 { /* sqlite3.c:96101:12: */
var r2 uintptr = (*SortSubtask)(unsafe.Pointer(pTask)).FpUnpacked
if !(*(*int32)(unsafe.Pointer(pbKey2Cached)) != 0) {
Xsqlite3VdbeRecordUnpack(tls, (*VdbeSorter)(unsafe.Pointer((*SortSubtask)(unsafe.Pointer(pTask)).FpSorter)).FpKeyInfo, nKey2, pKey2, r2)
@@ -74237,7 +76287,7 @@ func vdbeSorterCompare(tls *libc.TLS, pTask uintptr, pbKey2Cached uintptr, pKey1
// A specially optimized version of vdbeSorterCompare() that assumes that
// the first field of each key is a TEXT value and that the collation
// sequence to compare them with is BINARY.
-func vdbeSorterCompareText(tls *libc.TLS, pTask uintptr, pbKey2Cached uintptr, pKey1 uintptr, nKey1 int32, pKey2 uintptr, nKey2 int32) int32 { /* sqlite3.c:95550:12: */
+func vdbeSorterCompareText(tls *libc.TLS, pTask uintptr, pbKey2Cached uintptr, pKey1 uintptr, nKey1 int32, pKey2 uintptr, nKey2 int32) int32 { /* sqlite3.c:96120:12: */
bp := tls.Alloc(8)
defer tls.Free(8)
@@ -74287,7 +76337,7 @@ func vdbeSorterCompareText(tls *libc.TLS, pTask uintptr, pbKey2Cached uintptr, p
// A specially optimized version of vdbeSorterCompare() that assumes that
// the first field of each key is an INTEGER value.
-func vdbeSorterCompareInt(tls *libc.TLS, pTask uintptr, pbKey2Cached uintptr, pKey1 uintptr, nKey1 int32, pKey2 uintptr, nKey2 int32) int32 { /* sqlite3.c:95592:12: */
+func vdbeSorterCompareInt(tls *libc.TLS, pTask uintptr, pbKey2Cached uintptr, pKey1 uintptr, nKey1 int32, pKey2 uintptr, nKey2 int32) int32 { /* sqlite3.c:96162:12: */
var p1 uintptr = pKey1
var p2 uintptr = pKey2
var s1 int32 = int32(*(*U8)(unsafe.Pointer(p1 + 1))) // Left hand serial type
@@ -74347,7 +76397,7 @@ func vdbeSorterCompareInt(tls *libc.TLS, pTask uintptr, pbKey2Cached uintptr, pK
return res
}
-var aLen = [10]U8{U8(0), U8(1), U8(2), U8(3), U8(4), U8(6), U8(8), U8(0), U8(0), U8(0)} /* sqlite3.c:95611:21 */
+var aLen = [10]U8{U8(0), U8(1), U8(2), U8(3), U8(4), U8(6), U8(8), U8(0), U8(0), U8(0)} /* sqlite3.c:96181:21 */
// Initialize the temporary index cursor just opened as a sorter cursor.
//
@@ -74366,7 +76416,7 @@ var aLen = [10]U8{U8(0), U8(1), U8(2), U8(3), U8(4), U8(6), U8(8), U8(0), U8(0),
// mode, but not in multi-threaded mode.
//
// SQLITE_OK is returned if successful, or an SQLite error code otherwise.
-func Xsqlite3VdbeSorterInit(tls *libc.TLS, db uintptr, nField int32, pCsr uintptr) int32 { /* sqlite3.c:95675:20: */
+func Xsqlite3VdbeSorterInit(tls *libc.TLS, db uintptr, nField int32, pCsr uintptr) int32 { /* sqlite3.c:96245:20: */
var pgsz int32 // Page size of main database
var i int32 // Used to iterate through aTask[]
var pSorter uintptr // The new sorter
@@ -74462,7 +76512,7 @@ func Xsqlite3VdbeSorterInit(tls *libc.TLS, db uintptr, nField int32, pCsr uintpt
}
// Free the list of sorted records starting at pRecord.
-func vdbeSorterRecordFree(tls *libc.TLS, db uintptr, pRecord uintptr) { /* sqlite3.c:95780:13: */
+func vdbeSorterRecordFree(tls *libc.TLS, db uintptr, pRecord uintptr) { /* sqlite3.c:96350:13: */
var p uintptr
var pNext uintptr
for p = pRecord; p != 0; p = pNext {
@@ -74473,7 +76523,7 @@ func vdbeSorterRecordFree(tls *libc.TLS, db uintptr, pRecord uintptr) { /* sqlit
// Free all resources owned by the object indicated by argument pTask. All
// fields of *pTask are zeroed before returning.
-func vdbeSortSubtaskCleanup(tls *libc.TLS, db uintptr, pTask uintptr) { /* sqlite3.c:95793:13: */
+func vdbeSortSubtaskCleanup(tls *libc.TLS, db uintptr, pTask uintptr) { /* sqlite3.c:96363:13: */
Xsqlite3DbFree(tls, db, (*SortSubtask)(unsafe.Pointer(pTask)).FpUnpacked)
// pTask->list.aMemory can only be non-zero if it was handed memory
// from the main thread. That only occurs SQLITE_MAX_WORKER_THREADS>0
@@ -74493,7 +76543,7 @@ func vdbeSortSubtaskCleanup(tls *libc.TLS, db uintptr, pTask uintptr) { /* sqlit
}
// Join thread pTask->thread.
-func vdbeSorterJoinThread(tls *libc.TLS, pTask uintptr) int32 { /* sqlite3.c:95858:12: */
+func vdbeSorterJoinThread(tls *libc.TLS, pTask uintptr) int32 { /* sqlite3.c:96429:12: */
bp := tls.Alloc(8)
defer tls.Free(8)
@@ -74512,14 +76562,14 @@ func vdbeSorterJoinThread(tls *libc.TLS, pTask uintptr) int32 { /* sqlite3.c:958
}
// Launch a background thread to run xTask(pIn).
-func vdbeSorterCreateThread(tls *libc.TLS, pTask uintptr, xTask uintptr, pIn uintptr) int32 { /* sqlite3.c:95879:12: */
+func vdbeSorterCreateThread(tls *libc.TLS, pTask uintptr, xTask uintptr, pIn uintptr) int32 { /* sqlite3.c:96450:12: */
return Xsqlite3ThreadCreate(tls, (pTask /* &.pThread */), xTask, pIn)
}
// Join all outstanding threads launched by SorterWrite() to create
// level-0 PMAs.
-func vdbeSorterJoinAll(tls *libc.TLS, pSorter uintptr, rcin int32) int32 { /* sqlite3.c:95892:12: */
+func vdbeSorterJoinAll(tls *libc.TLS, pSorter uintptr, rcin int32) int32 { /* sqlite3.c:96463:12: */
var rc int32 = rcin
var i int32
@@ -74545,7 +76595,7 @@ func vdbeSorterJoinAll(tls *libc.TLS, pSorter uintptr, rcin int32) int32 { /* sq
//
// nReader is automatically rounded up to the next power of two.
// nReader may not exceed SORTER_MAX_MERGE_COUNT even after rounding up.
-func vdbeMergeEngineNew(tls *libc.TLS, nReader int32) uintptr { /* sqlite3.c:95922:20: */
+func vdbeMergeEngineNew(tls *libc.TLS, nReader int32) uintptr { /* sqlite3.c:96493:20: */
var N int32 = 2 // Smallest power of two >= nReader
var nByte int32 // Total bytes of space to allocate
var pNew uintptr // Pointer to allocated object to return
@@ -74570,7 +76620,7 @@ func vdbeMergeEngineNew(tls *libc.TLS, nReader int32) uintptr { /* sqlite3.c:959
}
// Free the MergeEngine object passed as the only argument.
-func vdbeMergeEngineFree(tls *libc.TLS, pMerger uintptr) { /* sqlite3.c:95945:13: */
+func vdbeMergeEngineFree(tls *libc.TLS, pMerger uintptr) { /* sqlite3.c:96516:13: */
var i int32
if pMerger != 0 {
for i = 0; i < (*MergeEngine)(unsafe.Pointer(pMerger)).FnTree; i++ {
@@ -74582,7 +76632,7 @@ func vdbeMergeEngineFree(tls *libc.TLS, pMerger uintptr) { /* sqlite3.c:95945:13
// Free all resources associated with the IncrMerger object indicated by
// the first argument.
-func vdbeIncrFree(tls *libc.TLS, pIncr uintptr) { /* sqlite3.c:95959:13: */
+func vdbeIncrFree(tls *libc.TLS, pIncr uintptr) { /* sqlite3.c:96530:13: */
if pIncr != 0 {
if (*IncrMerger)(unsafe.Pointer(pIncr)).FbUseThread != 0 {
vdbeSorterJoinThread(tls, (*IncrMerger)(unsafe.Pointer(pIncr)).FpTask)
@@ -74599,7 +76649,7 @@ func vdbeIncrFree(tls *libc.TLS, pIncr uintptr) { /* sqlite3.c:95959:13: */
}
// Reset a sorting cursor back to its original empty state.
-func Xsqlite3VdbeSorterReset(tls *libc.TLS, db uintptr, pSorter uintptr) { /* sqlite3.c:95976:21: */
+func Xsqlite3VdbeSorterReset(tls *libc.TLS, db uintptr, pSorter uintptr) { /* sqlite3.c:96547:21: */
var i int32
vdbeSorterJoinAll(tls, pSorter, SQLITE_OK)
@@ -74628,7 +76678,7 @@ func Xsqlite3VdbeSorterReset(tls *libc.TLS, db uintptr, pSorter uintptr) { /* sq
}
// Free any cursor components allocated by sqlite3VdbeSorterXXX routines.
-func Xsqlite3VdbeSorterClose(tls *libc.TLS, db uintptr, pCsr uintptr) { /* sqlite3.c:96009:21: */
+func Xsqlite3VdbeSorterClose(tls *libc.TLS, db uintptr, pCsr uintptr) { /* sqlite3.c:96580:21: */
var pSorter uintptr
pSorter = *(*uintptr)(unsafe.Pointer(pCsr + 56 /* &.uc */))
@@ -74647,7 +76697,7 @@ func Xsqlite3VdbeSorterClose(tls *libc.TLS, db uintptr, pCsr uintptr) { /* sqlit
//
// Whether or not the file does end up memory mapped of course depends on
// the specific VFS implementation.
-func vdbeSorterExtendFile(tls *libc.TLS, db uintptr, pFd uintptr, nByte I64) { /* sqlite3.c:96031:13: */
+func vdbeSorterExtendFile(tls *libc.TLS, db uintptr, pFd uintptr, nByte I64) { /* sqlite3.c:96602:13: */
bp := tls.Alloc(24)
defer tls.Free(24)
*(*I64)(unsafe.Pointer(bp + 8)) = nByte
@@ -74665,7 +76715,7 @@ func vdbeSorterExtendFile(tls *libc.TLS, db uintptr, pFd uintptr, nByte I64) { /
// Allocate space for a file-handle and open a temporary file. If successful,
// set *ppFd to point to the malloc'd file-handle and return SQLITE_OK.
// Otherwise, set *ppFd to 0 and return an SQLite error code.
-func vdbeSorterOpenTempFile(tls *libc.TLS, db uintptr, nExtend I64, ppFd uintptr) int32 { /* sqlite3.c:96050:12: */
+func vdbeSorterOpenTempFile(tls *libc.TLS, db uintptr, nExtend I64, ppFd uintptr) int32 { /* sqlite3.c:96621:12: */
bp := tls.Alloc(16)
defer tls.Free(16)
@@ -74689,7 +76739,7 @@ func vdbeSorterOpenTempFile(tls *libc.TLS, db uintptr, nExtend I64, ppFd uintptr
// If it has not already been allocated, allocate the UnpackedRecord
// structure at pTask->pUnpacked. Return SQLITE_OK if successful (or
// if no allocation was required), or SQLITE_NOMEM otherwise.
-func vdbeSortAllocUnpacked(tls *libc.TLS, pTask uintptr) int32 { /* sqlite3.c:96077:12: */
+func vdbeSortAllocUnpacked(tls *libc.TLS, pTask uintptr) int32 { /* sqlite3.c:96648:12: */
if (*SortSubtask)(unsafe.Pointer(pTask)).FpUnpacked == uintptr(0) {
(*SortSubtask)(unsafe.Pointer(pTask)).FpUnpacked = Xsqlite3VdbeAllocUnpackedRecord(tls, (*VdbeSorter)(unsafe.Pointer((*SortSubtask)(unsafe.Pointer(pTask)).FpSorter)).FpKeyInfo)
if (*SortSubtask)(unsafe.Pointer(pTask)).FpUnpacked == uintptr(0) {
@@ -74702,7 +76752,7 @@ func vdbeSortAllocUnpacked(tls *libc.TLS, pTask uintptr) int32 { /* sqlite3.c:96
}
// Merge the two sorted lists p1 and p2 into a single list.
-func vdbeSorterMerge(tls *libc.TLS, pTask uintptr, p1 uintptr, p2 uintptr) uintptr { /* sqlite3.c:96091:21: */
+func vdbeSorterMerge(tls *libc.TLS, pTask uintptr, p1 uintptr, p2 uintptr) uintptr { /* sqlite3.c:96662:21: */
bp := tls.Alloc(12)
defer tls.Free(12)
@@ -74712,7 +76762,9 @@ func vdbeSorterMerge(tls *libc.TLS, pTask uintptr, p1 uintptr, p2 uintptr) uintp
for {
var res int32
- res = (*(*func(*libc.TLS, uintptr, uintptr, uintptr, int32, uintptr, int32) int32)(unsafe.Pointer((pTask + 64 /* &.xCompare */))))(tls,
+ res = (*struct {
+ f func(*libc.TLS, uintptr, uintptr, uintptr, int32, uintptr, int32) int32
+ })(unsafe.Pointer(&struct{ uintptr }{(*SortSubtask)(unsafe.Pointer(pTask)).FxCompare})).f(tls,
pTask, bp+8 /* &bCached */, ((p1) + uintptr(1)*16), (*SorterRecord)(unsafe.Pointer(p1)).FnVal, ((p2) + uintptr(1)*16), (*SorterRecord)(unsafe.Pointer(p2)).FnVal)
if res <= 0 {
@@ -74739,7 +76791,7 @@ func vdbeSorterMerge(tls *libc.TLS, pTask uintptr, p1 uintptr, p2 uintptr) uintp
// Return the SorterCompare function to compare values collected by the
// sorter object passed as the only argument.
-func vdbeSorterGetCompare(tls *libc.TLS, p uintptr) SorterCompare { /* sqlite3.c:96133:22: */
+func vdbeSorterGetCompare(tls *libc.TLS, p uintptr) SorterCompare { /* sqlite3.c:96704:22: */
if int32((*VdbeSorter)(unsafe.Pointer(p)).FtypeMask) == SORTER_TYPE_INTEGER {
return *(*uintptr)(unsafe.Pointer(&struct {
f func(*libc.TLS, uintptr, uintptr, uintptr, int32, uintptr, int32) int32
@@ -74757,7 +76809,7 @@ func vdbeSorterGetCompare(tls *libc.TLS, p uintptr) SorterCompare { /* sqlite3.c
// Sort the linked list of records headed at pTask->pList. Return
// SQLITE_OK if successful, or an SQLite error code (i.e. SQLITE_NOMEM) if
// an error occurs.
-func vdbeSorterSort(tls *libc.TLS, pTask uintptr, pList uintptr) int32 { /* sqlite3.c:96147:12: */
+func vdbeSorterSort(tls *libc.TLS, pTask uintptr, pList uintptr) int32 { /* sqlite3.c:96718:12: */
bp := tls.Alloc(512)
defer tls.Free(512)
@@ -74814,7 +76866,7 @@ func vdbeSorterSort(tls *libc.TLS, pTask uintptr, pList uintptr) int32 { /* sqli
}
// Initialize a PMA-writer object.
-func vdbePmaWriterInit(tls *libc.TLS, pFd uintptr, p uintptr, nBuf int32, iStart I64) { /* sqlite3.c:96198:13: */
+func vdbePmaWriterInit(tls *libc.TLS, pFd uintptr, p uintptr, nBuf int32, iStart I64) { /* sqlite3.c:96769:13: */
libc.Xmemset(tls, p, 0, uint64(unsafe.Sizeof(PmaWriter{})))
(*PmaWriter)(unsafe.Pointer(p)).FaBuffer = Xsqlite3Malloc(tls, uint64(nBuf))
if !(int32((*PmaWriter)(unsafe.Pointer(p)).FaBuffer) != 0) {
@@ -74829,7 +76881,7 @@ func vdbePmaWriterInit(tls *libc.TLS, pFd uintptr, p uintptr, nBuf int32, iStart
// Write nData bytes of data to the PMA. Return SQLITE_OK
// if successful, or an SQLite error code if an error occurs.
-func vdbePmaWriteBlob(tls *libc.TLS, p uintptr, pData uintptr, nData int32) { /* sqlite3.c:96220:13: */
+func vdbePmaWriteBlob(tls *libc.TLS, p uintptr, pData uintptr, nData int32) { /* sqlite3.c:96791:13: */
var nRem int32 = nData
for (nRem > 0) && ((*PmaWriter)(unsafe.Pointer(p)).FeFWErr == 0) {
var nCopy int32 = nRem
@@ -74858,7 +76910,7 @@ func vdbePmaWriteBlob(tls *libc.TLS, p uintptr, pData uintptr, nData int32) { /*
//
// Before returning, set *piEof to the offset immediately following the
// last byte written to the file.
-func vdbePmaWriterFinish(tls *libc.TLS, p uintptr, piEof uintptr) int32 { /* sqlite3.c:96253:12: */
+func vdbePmaWriterFinish(tls *libc.TLS, p uintptr, piEof uintptr) int32 { /* sqlite3.c:96824:12: */
var rc int32
if (((*PmaWriter)(unsafe.Pointer(p)).FeFWErr == 0) && ((*PmaWriter)(unsafe.Pointer(p)).FaBuffer != 0)) && ((*PmaWriter)(unsafe.Pointer(p)).FiBufEnd > (*PmaWriter)(unsafe.Pointer(p)).FiBufStart) {
(*PmaWriter)(unsafe.Pointer(p)).FeFWErr = Xsqlite3OsWrite(tls, (*PmaWriter)(unsafe.Pointer(p)).FpFd,
@@ -74874,7 +76926,7 @@ func vdbePmaWriterFinish(tls *libc.TLS, p uintptr, piEof uintptr) int32 { /* sql
// Write value iVal encoded as a varint to the PMA. Return
// SQLITE_OK if successful, or an SQLite error code if an error occurs.
-func vdbePmaWriteVarint(tls *libc.TLS, p uintptr, iVal U64) { /* sqlite3.c:96272:13: */
+func vdbePmaWriteVarint(tls *libc.TLS, p uintptr, iVal U64) { /* sqlite3.c:96843:13: */
bp := tls.Alloc(10)
defer tls.Free(10)
@@ -74897,7 +76949,7 @@ func vdbePmaWriteVarint(tls *libc.TLS, p uintptr, iVal U64) { /* sqlite3.c:96272
// * One or more records packed end-to-end in order of ascending keys.
// Each record consists of a varint followed by a blob of data (the
// key). The varint is the number of bytes in the blob of data.
-func vdbeSorterListToPMA(tls *libc.TLS, pTask uintptr, pList uintptr) int32 { /* sqlite3.c:96293:12: */
+func vdbeSorterListToPMA(tls *libc.TLS, pTask uintptr, pList uintptr) int32 { /* sqlite3.c:96864:12: */
bp := tls.Alloc(48)
defer tls.Free(48)
@@ -74952,7 +77004,7 @@ func vdbeSorterListToPMA(tls *libc.TLS, pTask uintptr, pList uintptr) int32 { /*
// the MergeEngine has reached the end of all its inputs.
//
// Return SQLITE_OK if successful or an error code if an error occurs.
-func vdbeMergeEngineStep(tls *libc.TLS, pMerger uintptr, pbEof uintptr) int32 { /* sqlite3.c:96357:12: */
+func vdbeMergeEngineStep(tls *libc.TLS, pMerger uintptr, pbEof uintptr) int32 { /* sqlite3.c:96928:12: */
bp := tls.Alloc(4)
defer tls.Free(4)
@@ -74983,7 +77035,9 @@ func vdbeMergeEngineStep(tls *libc.TLS, pMerger uintptr, pbEof uintptr) int32 {
} else if (*PmaReader)(unsafe.Pointer(pReadr2)).FpFd == uintptr(0) {
iRes = -1
} else {
- iRes = (*(*func(*libc.TLS, uintptr, uintptr, uintptr, int32, uintptr, int32) int32)(unsafe.Pointer((pTask + 64 /* &.xCompare */))))(tls, pTask, bp, /* &bCached */
+ iRes = (*struct {
+ f func(*libc.TLS, uintptr, uintptr, uintptr, int32, uintptr, int32) int32
+ })(unsafe.Pointer(&struct{ uintptr }{(*SortSubtask)(unsafe.Pointer(pTask)).FxCompare})).f(tls, pTask, bp, /* &bCached */
(*PmaReader)(unsafe.Pointer(pReadr1)).FaKey, (*PmaReader)(unsafe.Pointer(pReadr1)).FnKey, (*PmaReader)(unsafe.Pointer(pReadr2)).FaKey, (*PmaReader)(unsafe.Pointer(pReadr2)).FnKey)
}
@@ -75026,7 +77080,7 @@ func vdbeMergeEngineStep(tls *libc.TLS, pMerger uintptr, pbEof uintptr) int32 {
}
// The main routine for background threads that write level-0 PMAs.
-func vdbeSorterFlushThread(tls *libc.TLS, pCtx uintptr) uintptr { /* sqlite3.c:96428:13: */
+func vdbeSorterFlushThread(tls *libc.TLS, pCtx uintptr) uintptr { /* sqlite3.c:96999:13: */
var pTask uintptr = pCtx
var rc int32 // Return code
@@ -75037,7 +77091,7 @@ func vdbeSorterFlushThread(tls *libc.TLS, pCtx uintptr) uintptr { /* sqlite3.c:9
// Flush the current contents of VdbeSorter.list to a new PMA, possibly
// using a background thread.
-func vdbeSorterFlushPMA(tls *libc.TLS, pSorter uintptr) int32 { /* sqlite3.c:96442:12: */
+func vdbeSorterFlushPMA(tls *libc.TLS, pSorter uintptr) int32 { /* sqlite3.c:97013:12: */
var rc int32 = SQLITE_OK
var i int32
var pTask uintptr = uintptr(0) // Thread context used to create new PMA
@@ -75101,7 +77155,7 @@ func vdbeSorterFlushPMA(tls *libc.TLS, pSorter uintptr) int32 { /* sqlite3.c:964
}
// Add a record to the sorter.
-func Xsqlite3VdbeSorterWrite(tls *libc.TLS, pCsr uintptr, pVal uintptr) int32 { /* sqlite3.c:96512:20: */
+func Xsqlite3VdbeSorterWrite(tls *libc.TLS, pCsr uintptr, pVal uintptr) int32 { /* sqlite3.c:97083:20: */
bp := tls.Alloc(4)
defer tls.Free(4)
@@ -75217,7 +77271,7 @@ func Xsqlite3VdbeSorterWrite(tls *libc.TLS, pCsr uintptr, pVal uintptr) int32 {
// Read keys from pIncr->pMerger and populate pIncr->aFile[1]. The format
// of the data stored in aFile[1] is the same as that used by regular PMAs,
// except that the number-of-bytes varint is omitted from the start.
-func vdbeIncrPopulate(tls *libc.TLS, pIncr uintptr) int32 { /* sqlite3.c:96624:12: */
+func vdbeIncrPopulate(tls *libc.TLS, pIncr uintptr) int32 { /* sqlite3.c:97195:12: */
bp := tls.Alloc(52)
defer tls.Free(52)
@@ -75263,7 +77317,7 @@ func vdbeIncrPopulate(tls *libc.TLS, pIncr uintptr) int32 { /* sqlite3.c:96624:1
// The main routine for background threads that populate aFile[1] of
// multi-threaded IncrMerger objects.
-func vdbeIncrPopulateThread(tls *libc.TLS, pCtx uintptr) uintptr { /* sqlite3.c:96666:13: */
+func vdbeIncrPopulateThread(tls *libc.TLS, pCtx uintptr) uintptr { /* sqlite3.c:97237:13: */
var pIncr uintptr = pCtx
var pRet uintptr = uintptr(int64(vdbeIncrPopulate(tls, pIncr)))
(*SortSubtask)(unsafe.Pointer((*IncrMerger)(unsafe.Pointer(pIncr)).FpTask)).FbDone = 1
@@ -75271,7 +77325,7 @@ func vdbeIncrPopulateThread(tls *libc.TLS, pCtx uintptr) uintptr { /* sqlite3.c:
}
// Launch a background thread to populate aFile[1] of pIncr.
-func vdbeIncrBgPopulate(tls *libc.TLS, pIncr uintptr) int32 { /* sqlite3.c:96676:12: */
+func vdbeIncrBgPopulate(tls *libc.TLS, pIncr uintptr) int32 { /* sqlite3.c:97247:12: */
var p uintptr = pIncr
return vdbeSorterCreateThread(tls, (*IncrMerger)(unsafe.Pointer(pIncr)).FpTask, *(*uintptr)(unsafe.Pointer(&struct {
@@ -75294,7 +77348,7 @@ func vdbeIncrBgPopulate(tls *libc.TLS, pIncr uintptr) int32 { /* sqlite3.c:96676
// to populate the new aFile[1].
//
// SQLITE_OK is returned on success, or an SQLite error code otherwise.
-func vdbeIncrSwap(tls *libc.TLS, pIncr uintptr) int32 { /* sqlite3.c:96700:12: */
+func vdbeIncrSwap(tls *libc.TLS, pIncr uintptr) int32 { /* sqlite3.c:97271:12: */
var rc int32 = SQLITE_OK
if (*IncrMerger)(unsafe.Pointer(pIncr)).FbUseThread != 0 {
@@ -75328,7 +77382,7 @@ func vdbeIncrSwap(tls *libc.TLS, pIncr uintptr) int32 { /* sqlite3.c:96700:12: *
//
// If an OOM condition is encountered, return NULL. In this case free the
// pMerger argument before returning.
-func vdbeIncrMergerNew(tls *libc.TLS, pTask uintptr, pMerger uintptr, ppOut uintptr) int32 { /* sqlite3.c:96739:12: */
+func vdbeIncrMergerNew(tls *libc.TLS, pTask uintptr, pMerger uintptr, ppOut uintptr) int32 { /* sqlite3.c:97310:12: */
var rc int32 = SQLITE_OK
var pIncr uintptr = libc.AssignPtrUintptr(ppOut, func() uintptr {
if Xsqlite3FaultSim(tls, 100) != 0 {
@@ -75354,7 +77408,7 @@ func vdbeIncrMergerNew(tls *libc.TLS, pTask uintptr, pMerger uintptr, ppOut uint
}
// Set the "use-threads" flag on object pIncr.
-func vdbeIncrMergerSetThreads(tls *libc.TLS, pIncr uintptr) { /* sqlite3.c:96763:13: */
+func vdbeIncrMergerSetThreads(tls *libc.TLS, pIncr uintptr) { /* sqlite3.c:97334:13: */
(*IncrMerger)(unsafe.Pointer(pIncr)).FbUseThread = 1
*(*I64)(unsafe.Pointer((*IncrMerger)(unsafe.Pointer(pIncr)).FpTask + 88 /* &.file2 */ + 8 /* &.iEof */)) -= (I64((*IncrMerger)(unsafe.Pointer(pIncr)).FmxSz))
}
@@ -75362,7 +77416,7 @@ func vdbeIncrMergerSetThreads(tls *libc.TLS, pIncr uintptr) { /* sqlite3.c:96763
// Recompute pMerger->aTree[iOut] by comparing the next keys on the
// two PmaReaders that feed that entry. Neither of the PmaReaders
// are advanced. This routine merely does the comparison.
-func vdbeMergeEngineCompare(tls *libc.TLS, pMerger uintptr, iOut int32) { /* sqlite3.c:96776:13: */
+func vdbeMergeEngineCompare(tls *libc.TLS, pMerger uintptr, iOut int32) { /* sqlite3.c:97347:13: */
bp := tls.Alloc(4)
defer tls.Free(4)
@@ -75392,7 +77446,9 @@ func vdbeMergeEngineCompare(tls *libc.TLS, pMerger uintptr, iOut int32) { /* sql
*(*int32)(unsafe.Pointer(bp /* bCached */)) = 0
var res int32
// from vdbeSortSubtaskMain()
- res = (*(*func(*libc.TLS, uintptr, uintptr, uintptr, int32, uintptr, int32) int32)(unsafe.Pointer((pTask + 64 /* &.xCompare */))))(tls,
+ res = (*struct {
+ f func(*libc.TLS, uintptr, uintptr, uintptr, int32, uintptr, int32) int32
+ })(unsafe.Pointer(&struct{ uintptr }{(*SortSubtask)(unsafe.Pointer(pTask)).FxCompare})).f(tls,
pTask, bp /* &bCached */, (*PmaReader)(unsafe.Pointer(p1)).FaKey, (*PmaReader)(unsafe.Pointer(p1)).FnKey, (*PmaReader)(unsafe.Pointer(p2)).FaKey, (*PmaReader)(unsafe.Pointer(p2)).FnKey)
if res <= 0 {
iRes = i1
@@ -75420,7 +77476,7 @@ func vdbeMergeEngineCompare(tls *libc.TLS, pMerger uintptr, iOut int32) { /* sql
// to pMerger.
//
// SQLITE_OK is returned if successful, or an SQLite error code otherwise.
-func vdbeMergeEngineInit(tls *libc.TLS, pTask uintptr, pMerger uintptr, eMode int32) int32 { /* sqlite3.c:96858:12: */
+func vdbeMergeEngineInit(tls *libc.TLS, pTask uintptr, pMerger uintptr, eMode int32) int32 { /* sqlite3.c:97429:12: */
var rc int32 = SQLITE_OK // Return code
var i int32 // For looping over PmaReader objects
var nTree int32 // Number of subtrees to merge
@@ -75490,7 +77546,7 @@ func vdbeMergeEngineInit(tls *libc.TLS, pTask uintptr, pMerger uintptr, eMode in
// the current PmaReader set to point to the first key in its range.
//
// SQLITE_OK is returned if successful, or an SQLite error code otherwise.
-func vdbePmaReaderIncrMergeInit(tls *libc.TLS, pReadr uintptr, eMode int32) int32 { /* sqlite3.c:96934:12: */
+func vdbePmaReaderIncrMergeInit(tls *libc.TLS, pReadr uintptr, eMode int32) int32 { /* sqlite3.c:97505:12: */
var rc int32 = SQLITE_OK
var pIncr uintptr = (*PmaReader)(unsafe.Pointer(pReadr)).FpIncr
var pTask uintptr = (*IncrMerger)(unsafe.Pointer(pIncr)).FpTask
@@ -75547,7 +77603,7 @@ func vdbePmaReaderIncrMergeInit(tls *libc.TLS, pReadr uintptr, eMode int32) int3
// The main routine for vdbePmaReaderIncrMergeInit() operations run in
// background threads.
-func vdbePmaReaderBgIncrInit(tls *libc.TLS, pCtx uintptr) uintptr { /* sqlite3.c:97001:13: */
+func vdbePmaReaderBgIncrInit(tls *libc.TLS, pCtx uintptr) uintptr { /* sqlite3.c:97572:13: */
var pReader uintptr = pCtx
var pRet uintptr = uintptr(int64(vdbePmaReaderIncrMergeInit(tls, pReader, INCRINIT_TASK)))
(*SortSubtask)(unsafe.Pointer((*IncrMerger)(unsafe.Pointer((*PmaReader)(unsafe.Pointer(pReader)).FpIncr)).FpTask)).FbDone = 1
@@ -75563,7 +77619,7 @@ func vdbePmaReaderBgIncrInit(tls *libc.TLS, pCtx uintptr) uintptr { /* sqlite3.c
// then a background thread is launched to call vdbePmaReaderIncrMergeInit().
// Or, if the IncrMerger is single threaded, the same function is called
// using the current thread.
-func vdbePmaReaderIncrInit(tls *libc.TLS, pReadr uintptr, eMode int32) int32 { /* sqlite3.c:97022:12: */
+func vdbePmaReaderIncrInit(tls *libc.TLS, pReadr uintptr, eMode int32) int32 { /* sqlite3.c:97593:12: */
var pIncr uintptr = (*PmaReader)(unsafe.Pointer(pReadr)).FpIncr // Incremental merger
var rc int32 = SQLITE_OK // Return code
if pIncr != 0 {
@@ -75590,7 +77646,7 @@ func vdbePmaReaderIncrInit(tls *libc.TLS, pReadr uintptr, eMode int32) int32 { /
// set to the offset immediately following the last byte of the last
// PMA before returning. If an error does occur, then the final value of
// *piOffset is undefined.
-func vdbeMergeEngineLevel0(tls *libc.TLS, pTask uintptr, nPMA int32, piOffset uintptr, ppOut uintptr) int32 { /* sqlite3.c:97052:12: */
+func vdbeMergeEngineLevel0(tls *libc.TLS, pTask uintptr, nPMA int32, piOffset uintptr, ppOut uintptr) int32 { /* sqlite3.c:97623:12: */
bp := tls.Alloc(8)
defer tls.Free(8)
@@ -75627,7 +77683,7 @@ func vdbeMergeEngineLevel0(tls *libc.TLS, pTask uintptr, nPMA int32, piOffset ui
// nPMA<=16 -> TreeDepth() == 0
// nPMA<=256 -> TreeDepth() == 1
// nPMA<=65536 -> TreeDepth() == 2
-func vdbeSorterTreeDepth(tls *libc.TLS, nPMA int32) int32 { /* sqlite3.c:97091:12: */
+func vdbeSorterTreeDepth(tls *libc.TLS, nPMA int32) int32 { /* sqlite3.c:97662:12: */
var nDepth int32 = 0
var nDiv I64 = int64(SORTER_MAX_MERGE_COUNT)
for nDiv < I64(nPMA) {
@@ -75643,7 +77699,7 @@ func vdbeSorterTreeDepth(tls *libc.TLS, nPMA int32) int32 { /* sqlite3.c:97091:1
//
// If successful, SQLITE_OK is returned. If an error occurs, an SQLite error
// code is returned and pLeaf is freed.
-func vdbeSorterAddToTree(tls *libc.TLS, pTask uintptr, nDepth int32, iSeq int32, pRoot uintptr, pLeaf uintptr) int32 { /* sqlite3.c:97109:12: */
+func vdbeSorterAddToTree(tls *libc.TLS, pTask uintptr, nDepth int32, iSeq int32, pRoot uintptr, pLeaf uintptr) int32 { /* sqlite3.c:97680:12: */
bp := tls.Alloc(8)
defer tls.Free(8)
@@ -75694,7 +77750,7 @@ func vdbeSorterAddToTree(tls *libc.TLS, pTask uintptr, nDepth int32, iSeq int32,
// MergeEngine object at the root of the tree before returning. Or, if an
// error occurs, an SQLite error code is returned and the final value
// of *ppOut is undefined.
-func vdbeSorterMergeTreeBuild(tls *libc.TLS, pSorter uintptr, ppOut uintptr) int32 { /* sqlite3.c:97165:12: */
+func vdbeSorterMergeTreeBuild(tls *libc.TLS, pSorter uintptr, ppOut uintptr) int32 { /* sqlite3.c:97736:12: */
bp := tls.Alloc(24)
defer tls.Free(24)
@@ -75775,7 +77831,7 @@ func vdbeSorterMergeTreeBuild(tls *libc.TLS, pSorter uintptr, ppOut uintptr) int
// all records stored in the sorter.
//
// SQLITE_OK is returned if successful, or an SQLite error code otherwise.
-func vdbeSorterSetupMerge(tls *libc.TLS, pSorter uintptr) int32 { /* sqlite3.c:97244:12: */
+func vdbeSorterSetupMerge(tls *libc.TLS, pSorter uintptr) int32 { /* sqlite3.c:97815:12: */
bp := tls.Alloc(8)
defer tls.Free(8)
@@ -75850,7 +77906,7 @@ func vdbeSorterSetupMerge(tls *libc.TLS, pSorter uintptr) int32 { /* sqlite3.c:9
// Once the sorter has been populated by calls to sqlite3VdbeSorterWrite,
// this function is called to prepare for iterating through the records
// in sorted order.
-func Xsqlite3VdbeSorterRewind(tls *libc.TLS, pCsr uintptr, pbEof uintptr) int32 { /* sqlite3.c:97326:20: */
+func Xsqlite3VdbeSorterRewind(tls *libc.TLS, pCsr uintptr, pbEof uintptr) int32 { /* sqlite3.c:97897:20: */
var pSorter uintptr
var rc int32 = SQLITE_OK // Return code
@@ -75895,7 +77951,7 @@ func Xsqlite3VdbeSorterRewind(tls *libc.TLS, pCsr uintptr, pbEof uintptr) int32
// SQLITE_OK success
// SQLITE_DONE end of data
// otherwise some kind of error.
-func Xsqlite3VdbeSorterNext(tls *libc.TLS, db uintptr, pCsr uintptr) int32 { /* sqlite3.c:97378:20: */
+func Xsqlite3VdbeSorterNext(tls *libc.TLS, db uintptr, pCsr uintptr) int32 { /* sqlite3.c:97949:20: */
bp := tls.Alloc(4)
defer tls.Free(4)
@@ -75937,7 +77993,7 @@ func Xsqlite3VdbeSorterNext(tls *libc.TLS, db uintptr, pCsr uintptr) int32 { /*
// Return a pointer to a buffer owned by the sorter that contains the
// current key.
-func vdbeSorterRowkey(tls *libc.TLS, pSorter uintptr, pnKey uintptr) uintptr { /* sqlite3.c:97416:13: */
+func vdbeSorterRowkey(tls *libc.TLS, pSorter uintptr, pnKey uintptr) uintptr { /* sqlite3.c:97987:13: */
var pKey uintptr
if (*VdbeSorter)(unsafe.Pointer(pSorter)).FbUsePMA != 0 {
var pReader uintptr
@@ -75956,7 +78012,7 @@ func vdbeSorterRowkey(tls *libc.TLS, pSorter uintptr, pnKey uintptr) uintptr { /
}
// Copy the current sorter key into the memory cell pOut.
-func Xsqlite3VdbeSorterRowkey(tls *libc.TLS, pCsr uintptr, pOut uintptr) int32 { /* sqlite3.c:97443:20: */
+func Xsqlite3VdbeSorterRowkey(tls *libc.TLS, pCsr uintptr, pOut uintptr) int32 { /* sqlite3.c:98014:20: */
bp := tls.Alloc(4)
defer tls.Free(4)
@@ -75991,7 +78047,7 @@ func Xsqlite3VdbeSorterRowkey(tls *libc.TLS, pCsr uintptr, pOut uintptr) int32 {
//
// This routine forms the core of the OP_SorterCompare opcode, which in
// turn is used to verify uniqueness when constructing a UNIQUE INDEX.
-func Xsqlite3VdbeSorterCompare(tls *libc.TLS, pCsr uintptr, pVal uintptr, nKeyCol int32, pRes uintptr) int32 { /* sqlite3.c:97476:20: */
+func Xsqlite3VdbeSorterCompare(tls *libc.TLS, pCsr uintptr, pVal uintptr, nKeyCol int32, pRes uintptr) int32 { /* sqlite3.c:98047:20: */
bp := tls.Alloc(4)
defer tls.Free(4)
@@ -76073,17 +78129,17 @@ func Xsqlite3VdbeSorterCompare(tls *libc.TLS, pCsr uintptr, pVal uintptr, nKeyCo
// Forward references to internal structures
type MemJournal1 = struct {
- FpMethod uintptr
- FnChunkSize int32
- FnSpill int32
- FpFirst uintptr
- Fendpoint FilePoint
- Freadpoint FilePoint
- Fflags int32
- _ [4]byte
- FpVfs uintptr
- FzJournal uintptr
-} /* sqlite3.c:97969:9 */
+ FpMethod uintptr
+ FnChunkSize int32
+ FnSpill int32
+ FpFirst uintptr
+ Fendpoint FilePoint
+ Freadpoint FilePoint
+ Fflags int32
+ F__ccgo_pad1 [4]byte
+ FpVfs uintptr
+ FzJournal uintptr
+} /* sqlite3.c:98540:9 */
//************* End of vdbesort.c *******************************************
//************* Begin file vdbevtab.c ***************************************
@@ -76130,23 +78186,23 @@ type MemJournal1 = struct {
// #include "sqliteInt.h"
// Forward references to internal structures
-type MemJournal = MemJournal1 /* sqlite3.c:97969:27 */
+type MemJournal = MemJournal1 /* sqlite3.c:98540:27 */
type FilePoint1 = struct {
FiOffset Sqlite3_int64
FpChunk uintptr
-} /* sqlite3.c:97969:9 */
+} /* sqlite3.c:98540:9 */
-type FilePoint = FilePoint1 /* sqlite3.c:97970:26 */
+type FilePoint = FilePoint1 /* sqlite3.c:98541:26 */
type FileChunk1 = struct {
FpNext uintptr
FzChunk [8]U8
-} /* sqlite3.c:97969:9 */
+} /* sqlite3.c:98540:9 */
-type FileChunk = FileChunk1 /* sqlite3.c:97971:26 */
+type FileChunk = FileChunk1 /* sqlite3.c:98542:26 */
// Read data from the in-memory journal file. This is the implementation
// of the sqlite3_vfs.xRead method.
-func memjrnlRead(tls *libc.TLS, pJfd uintptr, zBuf uintptr, iAmt int32, iOfst Sqlite_int64) int32 { /* sqlite3.c:98026:12: */
+func memjrnlRead(tls *libc.TLS, pJfd uintptr, zBuf uintptr, iAmt int32, iOfst Sqlite_int64) int32 { /* sqlite3.c:98597:12: */
var p uintptr = pJfd
var zOut uintptr = zBuf
var nRead int32 = iAmt
@@ -76193,7 +78249,7 @@ func memjrnlRead(tls *libc.TLS, pJfd uintptr, zBuf uintptr, iAmt int32, iOfst Sq
}
// Free the list of FileChunk structures headed at MemJournal.pFirst.
-func memjrnlFreeChunks(tls *libc.TLS, pFirst uintptr) { /* sqlite3.c:98073:13: */
+func memjrnlFreeChunks(tls *libc.TLS, pFirst uintptr) { /* sqlite3.c:98644:13: */
var pIter uintptr
var pNext uintptr
for pIter = pFirst; pIter != 0; pIter = pNext {
@@ -76203,7 +78259,7 @@ func memjrnlFreeChunks(tls *libc.TLS, pFirst uintptr) { /* sqlite3.c:98073:13: *
}
// Flush the contents of memory to a real file on disk.
-func memjrnlCreateFile(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:98085:12: */
+func memjrnlCreateFile(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:98656:12: */
var rc int32
var pReal uintptr = p
var copy = *(*MemJournal)(unsafe.Pointer(p))
@@ -76241,7 +78297,7 @@ func memjrnlCreateFile(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:98085:12:
}
// Write data to the file.
-func memjrnlWrite(tls *libc.TLS, pJfd uintptr, zBuf uintptr, iAmt int32, iOfst Sqlite_int64) int32 { /* sqlite3.c:98124:12: */
+func memjrnlWrite(tls *libc.TLS, pJfd uintptr, zBuf uintptr, iAmt int32, iOfst Sqlite_int64) int32 { /* sqlite3.c:98695:12: */
var p uintptr = pJfd
var nWrite int32 = iAmt
var zWrite uintptr = zBuf
@@ -76302,33 +78358,35 @@ func memjrnlWrite(tls *libc.TLS, pJfd uintptr, zBuf uintptr, iAmt int32, iOfst S
}
// Truncate the in-memory file.
-func memjrnlTruncate(tls *libc.TLS, pJfd uintptr, size Sqlite_int64) int32 { /* sqlite3.c:98198:12: */
+func memjrnlTruncate(tls *libc.TLS, pJfd uintptr, size Sqlite_int64) int32 { /* sqlite3.c:98769:12: */
var p uintptr = pJfd
- var pIter uintptr = uintptr(0)
- if size == int64(0) {
- memjrnlFreeChunks(tls, (*MemJournal)(unsafe.Pointer(p)).FpFirst)
- (*MemJournal)(unsafe.Pointer(p)).FpFirst = uintptr(0)
- } else {
- var iOff I64 = I64((*MemJournal)(unsafe.Pointer(p)).FnChunkSize)
- for pIter = (*MemJournal)(unsafe.Pointer(p)).FpFirst; (pIter != 0) && (iOff <= size); pIter = (*FileChunk)(unsafe.Pointer(pIter)).FpNext {
- iOff = iOff + (I64((*MemJournal)(unsafe.Pointer(p)).FnChunkSize))
- }
- if pIter != 0 {
- memjrnlFreeChunks(tls, (*FileChunk)(unsafe.Pointer(pIter)).FpNext)
- (*FileChunk)(unsafe.Pointer(pIter)).FpNext = uintptr(0)
+ if size < (*MemJournal)(unsafe.Pointer(p)).Fendpoint.FiOffset {
+ var pIter uintptr = uintptr(0)
+ if size == int64(0) {
+ memjrnlFreeChunks(tls, (*MemJournal)(unsafe.Pointer(p)).FpFirst)
+ (*MemJournal)(unsafe.Pointer(p)).FpFirst = uintptr(0)
+ } else {
+ var iOff I64 = I64((*MemJournal)(unsafe.Pointer(p)).FnChunkSize)
+ for pIter = (*MemJournal)(unsafe.Pointer(p)).FpFirst; (pIter != 0) && (iOff <= size); pIter = (*FileChunk)(unsafe.Pointer(pIter)).FpNext {
+ iOff = iOff + (I64((*MemJournal)(unsafe.Pointer(p)).FnChunkSize))
+ }
+ if pIter != 0 {
+ memjrnlFreeChunks(tls, (*FileChunk)(unsafe.Pointer(pIter)).FpNext)
+ (*FileChunk)(unsafe.Pointer(pIter)).FpNext = uintptr(0)
+ }
}
- }
- (*MemJournal)(unsafe.Pointer(p)).Fendpoint.FpChunk = pIter
- (*MemJournal)(unsafe.Pointer(p)).Fendpoint.FiOffset = size
- (*MemJournal)(unsafe.Pointer(p)).Freadpoint.FpChunk = uintptr(0)
- (*MemJournal)(unsafe.Pointer(p)).Freadpoint.FiOffset = int64(0)
+ (*MemJournal)(unsafe.Pointer(p)).Fendpoint.FpChunk = pIter
+ (*MemJournal)(unsafe.Pointer(p)).Fendpoint.FiOffset = size
+ (*MemJournal)(unsafe.Pointer(p)).Freadpoint.FpChunk = uintptr(0)
+ (*MemJournal)(unsafe.Pointer(p)).Freadpoint.FiOffset = int64(0)
+ }
return SQLITE_OK
}
// Close the file.
-func memjrnlClose(tls *libc.TLS, pJfd uintptr) int32 { /* sqlite3.c:98226:12: */
+func memjrnlClose(tls *libc.TLS, pJfd uintptr) int32 { /* sqlite3.c:98799:12: */
var p uintptr = pJfd
memjrnlFreeChunks(tls, (*MemJournal)(unsafe.Pointer(p)).FpFirst)
return SQLITE_OK
@@ -76338,14 +78396,14 @@ func memjrnlClose(tls *libc.TLS, pJfd uintptr) int32 { /* sqlite3.c:98226:12: */
//
// If the real file has been created, call its xSync method. Otherwise,
// syncing an in-memory journal is a no-op.
-func memjrnlSync(tls *libc.TLS, pJfd uintptr, flags int32) int32 { /* sqlite3.c:98238:12: */
+func memjrnlSync(tls *libc.TLS, pJfd uintptr, flags int32) int32 { /* sqlite3.c:98811:12: */
_ = pJfd
_ = flags
return SQLITE_OK
}
// Query the size of the file in bytes.
-func memjrnlFileSize(tls *libc.TLS, pJfd uintptr, pSize uintptr) int32 { /* sqlite3.c:98246:12: */
+func memjrnlFileSize(tls *libc.TLS, pJfd uintptr, pSize uintptr) int32 { /* sqlite3.c:98819:12: */
var p uintptr = pJfd
*(*Sqlite_int64)(unsafe.Pointer(pSize)) = (*MemJournal)(unsafe.Pointer(p)).Fendpoint.FiOffset
return SQLITE_OK
@@ -76360,7 +78418,7 @@ var sMemJournalMethods = sqlite3_io_methods{
FxTruncate: 0, // xTruncate
FxSync: 0, // xSync
FxFileSize: 0, // xUnfetch
-} /* sqlite3.c:98255:40 */
+} /* sqlite3.c:98828:40 */
// Open a journal file.
//
@@ -76372,7 +78430,7 @@ var sMemJournalMethods = sqlite3_io_methods{
// but may be flushed to disk later on. In this case the journal file is
// flushed to disk either when it grows larger than nSpill bytes in size,
// or when sqlite3JournalCreate() is called.
-func Xsqlite3JournalOpen(tls *libc.TLS, pVfs uintptr, zName uintptr, pJfd uintptr, flags int32, nSpill int32) int32 { /* sqlite3.c:98289:20: */
+func Xsqlite3JournalOpen(tls *libc.TLS, pVfs uintptr, zName uintptr, pJfd uintptr, flags int32, nSpill int32) int32 { /* sqlite3.c:98862:20: */
var p uintptr = pJfd
// Zero the file-handle object. If nSpill was passed zero, initialize
@@ -76400,20 +78458,20 @@ func Xsqlite3JournalOpen(tls *libc.TLS, pVfs uintptr, zName uintptr, pJfd uintpt
}
// Open an in-memory journal file.
-func Xsqlite3MemJournalOpen(tls *libc.TLS, pJfd uintptr) { /* sqlite3.c:98325:21: */
+func Xsqlite3MemJournalOpen(tls *libc.TLS, pJfd uintptr) { /* sqlite3.c:98898:21: */
Xsqlite3JournalOpen(tls, uintptr(0), uintptr(0), pJfd, 0, -1)
}
// The file-handle passed as the only argument is open on a journal file.
// Return true if this "journal file" is currently stored in heap memory,
// or false otherwise.
-func Xsqlite3JournalIsInMemory(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:98364:20: */
+func Xsqlite3JournalIsInMemory(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:98937:20: */
return (libc.Bool32((*Sqlite3_file)(unsafe.Pointer(p)).FpMethods == uintptr(unsafe.Pointer(&sMemJournalMethods))))
}
// Return the number of bytes required to store a JournalFile that uses vfs
// pVfs to create the underlying on-disk files.
-func Xsqlite3JournalSize(tls *libc.TLS, pVfs uintptr) int32 { /* sqlite3.c:98372:20: */
+func Xsqlite3JournalSize(tls *libc.TLS, pVfs uintptr) int32 { /* sqlite3.c:98945:20: */
return func() int32 {
if ((*Sqlite3_vfs)(unsafe.Pointer(pVfs)).FszOsFile) > (int32(unsafe.Sizeof(MemJournal{}))) {
return (*Sqlite3_vfs)(unsafe.Pointer(pVfs)).FszOsFile
@@ -76442,7 +78500,7 @@ func Xsqlite3JournalSize(tls *libc.TLS, pVfs uintptr) int32 { /* sqlite3.c:98372
// Walk all expressions linked into the list of Window objects passed
// as the second argument.
-func walkWindowList(tls *libc.TLS, pWalker uintptr, pList uintptr, bOneOnly int32) int32 { /* sqlite3.c:98402:12: */
+func walkWindowList(tls *libc.TLS, pWalker uintptr, pList uintptr, bOneOnly int32) int32 { /* sqlite3.c:98975:12: */
var pWin uintptr
for pWin = pList; pWin != 0; pWin = (*Window)(unsafe.Pointer(pWin)).FpNextWin {
var rc int32
@@ -76458,11 +78516,6 @@ func walkWindowList(tls *libc.TLS, pWalker uintptr, pList uintptr, bOneOnly int3
if rc != 0 {
return WRC_Abort
}
-
- // The next two are purely for calls to sqlite3RenameExprUnmap()
- // within sqlite3WindowOffsetExpr(). Because of constraints imposed
- // by sqlite3WindowOffsetExpr(), they can never fail. The results do
- // not matter anyhow.
rc = Xsqlite3WalkExpr(tls, pWalker, (*Window)(unsafe.Pointer(pWin)).FpStart)
if rc != 0 {
return WRC_Abort
@@ -76495,11 +78548,13 @@ func walkWindowList(tls *libc.TLS, pWalker uintptr, pList uintptr, bOneOnly int3
//
// The return value from this routine is WRC_Abort to abandon the tree walk
// and WRC_Continue to continue.
-func walkExpr(tls *libc.TLS, pWalker uintptr, pExpr uintptr) int32 { /* sqlite3.c:98446:28: */
+func walkExpr(tls *libc.TLS, pWalker uintptr, pExpr uintptr) int32 { /* sqlite3.c:99014:28: */
var rc int32
for 1 != 0 {
- rc = (*(*func(*libc.TLS, uintptr, uintptr) int32)(unsafe.Pointer((pWalker + 8 /* &.xExprCallback */))))(tls, pWalker, pExpr)
+ rc = (*struct {
+ f func(*libc.TLS, uintptr, uintptr) int32
+ })(unsafe.Pointer(&struct{ uintptr }{(*Walker)(unsafe.Pointer(pWalker)).FxExprCallback})).f(tls, pWalker, pExpr)
if rc != 0 {
return (rc & WRC_Abort)
}
@@ -76535,7 +78590,7 @@ func walkExpr(tls *libc.TLS, pWalker uintptr, pExpr uintptr) int32 { /* sqlite3.
return WRC_Continue
}
-func Xsqlite3WalkExpr(tls *libc.TLS, pWalker uintptr, pExpr uintptr) int32 { /* sqlite3.c:98478:20: */
+func Xsqlite3WalkExpr(tls *libc.TLS, pWalker uintptr, pExpr uintptr) int32 { /* sqlite3.c:99046:20: */
if pExpr != 0 {
return walkExpr(tls, pWalker, pExpr)
}
@@ -76544,7 +78599,7 @@ func Xsqlite3WalkExpr(tls *libc.TLS, pWalker uintptr, pExpr uintptr) int32 { /*
// Call sqlite3WalkExpr() for every expression in list p or until
// an abort request is seen.
-func Xsqlite3WalkExprList(tls *libc.TLS, pWalker uintptr, p uintptr) int32 { /* sqlite3.c:98486:20: */
+func Xsqlite3WalkExprList(tls *libc.TLS, pWalker uintptr, p uintptr) int32 { /* sqlite3.c:99054:20: */
var i int32
var pItem uintptr
if p != 0 {
@@ -76571,11 +78626,19 @@ func Xsqlite3WalkExprList(tls *libc.TLS, pWalker uintptr, p uintptr) int32 { /*
return WRC_Continue
}
+// This is a no-op callback for Walker->xSelectCallback2. If this
+// callback is set, then the Select->pWinDefn list is traversed.
+func Xsqlite3WalkWinDefnDummyCallback(tls *libc.TLS, pWalker uintptr, p uintptr) { /* sqlite3.c:99069:21: */
+ _ = pWalker
+ _ = p
+ // No-op
+}
+
// Walk all expressions associated with SELECT statement p. Do
// not invoke the SELECT callback on p, but do (of course) invoke
// any expr callbacks and SELECT callbacks that come from subqueries.
// Return WRC_Abort or WRC_Continue.
-func Xsqlite3WalkSelectExpr(tls *libc.TLS, pWalker uintptr, p uintptr) int32 { /* sqlite3.c:98503:20: */
+func Xsqlite3WalkSelectExpr(tls *libc.TLS, pWalker uintptr, p uintptr) int32 { /* sqlite3.c:99081:20: */
if Xsqlite3WalkExprList(tls, pWalker, (*Select)(unsafe.Pointer(p)).FpEList) != 0 {
return WRC_Abort
}
@@ -76594,15 +78657,20 @@ func Xsqlite3WalkSelectExpr(tls *libc.TLS, pWalker uintptr, p uintptr) int32 { /
if Xsqlite3WalkExpr(tls, pWalker, (*Select)(unsafe.Pointer(p)).FpLimit) != 0 {
return WRC_Abort
}
- {
- var pParse uintptr = (*Walker)(unsafe.Pointer(pWalker)).FpParse
- if (pParse != 0) && (int32((*Parse)(unsafe.Pointer(pParse)).FeParseMode) >= PARSE_MODE_RENAME) {
+ if (*Select)(unsafe.Pointer(p)).FpWinDefn != 0 {
+ var pParse uintptr
+ if (((*Walker)(unsafe.Pointer(pWalker)).FxSelectCallback2 == *(*uintptr)(unsafe.Pointer(&struct {
+ f func(*libc.TLS, uintptr, uintptr)
+ }{Xsqlite3WalkWinDefnDummyCallback}))) ||
+ (((libc.AssignUintptr(&pParse, (*Walker)(unsafe.Pointer(pWalker)).FpParse)) != uintptr(0)) && (int32((*Parse)(unsafe.Pointer(pParse)).FeParseMode) >= PARSE_MODE_RENAME))) ||
+ ((*Walker)(unsafe.Pointer(pWalker)).FxSelectCallback2 == *(*uintptr)(unsafe.Pointer(&struct {
+ f func(*libc.TLS, uintptr, uintptr)
+ }{Xsqlite3SelectPopWith}))) {
// The following may return WRC_Abort if there are unresolvable
// symbols (e.g. a table that does not exist) in a window definition.
var rc int32 = walkWindowList(tls, pWalker, (*Select)(unsafe.Pointer(p)).FpWinDefn, 0)
return rc
}
-
}
return WRC_Continue
}
@@ -76612,7 +78680,7 @@ func Xsqlite3WalkSelectExpr(tls *libc.TLS, pWalker uintptr, p uintptr) int32 { /
// callback on p, but do invoke it on each FROM clause subquery
// and on any subqueries further down in the tree. Return
// WRC_Abort or WRC_Continue;
-func Xsqlite3WalkSelectFrom(tls *libc.TLS, pWalker uintptr, p uintptr) int32 { /* sqlite3.c:98531:20: */
+func Xsqlite3WalkSelectFrom(tls *libc.TLS, pWalker uintptr, p uintptr) int32 { /* sqlite3.c:99114:20: */
var pSrc uintptr
var i int32
var pItem uintptr
@@ -76629,7 +78697,7 @@ func Xsqlite3WalkSelectFrom(tls *libc.TLS, pWalker uintptr, p uintptr) int32 { /
if ((*SrcItem)(unsafe.Pointer(pItem)).FpSelect != 0) && (Xsqlite3WalkSelect(tls, pWalker, (*SrcItem)(unsafe.Pointer(pItem)).FpSelect) != 0) {
return WRC_Abort
}
- if ((uint32(int32(*(*uint8)(unsafe.Pointer((pItem + 60 /* &.fg */) + 4 /* &.isTabFunc */)) >> 5 & 0x1))) != 0) &&
+ if ((uint32(int32(*(*uint16)(unsafe.Pointer((pItem + 60 /* &.fg */) + 4 /* &.isTabFunc */)) & 0x2000 >> 13))) != 0) &&
(Xsqlite3WalkExprList(tls, pWalker, *(*uintptr)(unsafe.Pointer(pItem + 96 /* &.u1 */))) != 0) {
return WRC_Abort
}
@@ -76661,7 +78729,7 @@ func Xsqlite3WalkSelectFrom(tls *libc.TLS, pWalker uintptr, p uintptr) int32 { /
//
// If the Walker does not have an xSelectCallback() then this routine
// is a no-op returning WRC_Continue.
-func Xsqlite3WalkSelect(tls *libc.TLS, pWalker uintptr, p uintptr) int32 { /* sqlite3.c:98569:20: */
+func Xsqlite3WalkSelect(tls *libc.TLS, pWalker uintptr, p uintptr) int32 { /* sqlite3.c:99152:20: */
var rc int32
if p == uintptr(0) {
return WRC_Continue
@@ -76670,7 +78738,9 @@ func Xsqlite3WalkSelect(tls *libc.TLS, pWalker uintptr, p uintptr) int32 { /* sq
return WRC_Continue
}
for ok := true; ok; ok = (p != uintptr(0)) {
- rc = (*(*func(*libc.TLS, uintptr, uintptr) int32)(unsafe.Pointer((pWalker + 16 /* &.xSelectCallback */))))(tls, pWalker, p)
+ rc = (*struct {
+ f func(*libc.TLS, uintptr, uintptr) int32
+ })(unsafe.Pointer(&struct{ uintptr }{(*Walker)(unsafe.Pointer(pWalker)).FxSelectCallback})).f(tls, pWalker, p)
if rc != 0 {
return (rc & WRC_Abort)
}
@@ -76679,7 +78749,9 @@ func Xsqlite3WalkSelect(tls *libc.TLS, pWalker uintptr, p uintptr) int32 { /* sq
return WRC_Abort
}
if (*Walker)(unsafe.Pointer(pWalker)).FxSelectCallback2 != 0 {
- (*(*func(*libc.TLS, uintptr, uintptr))(unsafe.Pointer((pWalker + 24 /* &.xSelectCallback2 */))))(tls, pWalker, p)
+ (*struct {
+ f func(*libc.TLS, uintptr, uintptr)
+ })(unsafe.Pointer(&struct{ uintptr }{(*Walker)(unsafe.Pointer(pWalker)).FxSelectCallback2})).f(tls, pWalker, p)
}
p = (*Select)(unsafe.Pointer(p)).FpPrior
}
@@ -76688,13 +78760,13 @@ func Xsqlite3WalkSelect(tls *libc.TLS, pWalker uintptr, p uintptr) int32 { /* sq
// Increase the walkerDepth when entering a subquery, and
// descrease when leaving the subquery.
-func Xsqlite3WalkerDepthIncrease(tls *libc.TLS, pWalker uintptr, pSelect uintptr) int32 { /* sqlite3.c:98592:20: */
+func Xsqlite3WalkerDepthIncrease(tls *libc.TLS, pWalker uintptr, pSelect uintptr) int32 { /* sqlite3.c:99175:20: */
_ = pSelect
(*Walker)(unsafe.Pointer(pWalker)).FwalkerDepth++
return WRC_Continue
}
-func Xsqlite3WalkerDepthDecrease(tls *libc.TLS, pWalker uintptr, pSelect uintptr) { /* sqlite3.c:98597:21: */
+func Xsqlite3WalkerDepthDecrease(tls *libc.TLS, pWalker uintptr, pSelect uintptr) { /* sqlite3.c:99180:21: */
_ = pSelect
(*Walker)(unsafe.Pointer(pWalker)).FwalkerDepth--
}
@@ -76706,7 +78778,7 @@ func Xsqlite3WalkerDepthDecrease(tls *libc.TLS, pWalker uintptr, pSelect uintptr
// when this routine is used for Walker.xExprCallback then
// Walker.xSelectCallback is set to do something useful for every
// subquery in the parser tree.
-func Xsqlite3ExprWalkNoop(tls *libc.TLS, NotUsed uintptr, NotUsed2 uintptr) int32 { /* sqlite3.c:98612:20: */
+func Xsqlite3ExprWalkNoop(tls *libc.TLS, NotUsed uintptr, NotUsed2 uintptr) int32 { /* sqlite3.c:99195:20: */
_ = NotUsed
_ = NotUsed2
return WRC_Continue
@@ -76714,7 +78786,7 @@ func Xsqlite3ExprWalkNoop(tls *libc.TLS, NotUsed uintptr, NotUsed2 uintptr) int3
// No-op routine for the parse-tree walker for SELECT statements.
// subquery in the parser tree.
-func Xsqlite3SelectWalkNoop(tls *libc.TLS, NotUsed uintptr, NotUsed2 uintptr) int32 { /* sqlite3.c:98621:20: */
+func Xsqlite3SelectWalkNoop(tls *libc.TLS, NotUsed uintptr, NotUsed2 uintptr) int32 { /* sqlite3.c:99204:20: */
_ = NotUsed
_ = NotUsed2
return WRC_Continue
@@ -76749,14 +78821,14 @@ func Xsqlite3SelectWalkNoop(tls *libc.TLS, NotUsed uintptr, NotUsed2 uintptr) in
// is a helper function - a callback for the tree walker.
//
// See also the sqlite3WindowExtraAggFuncDepth() routine in window.c
-func incrAggDepth(tls *libc.TLS, pWalker uintptr, pExpr uintptr) int32 { /* sqlite3.c:98662:12: */
+func incrAggDepth(tls *libc.TLS, pWalker uintptr, pExpr uintptr) int32 { /* sqlite3.c:99245:12: */
if int32((*Expr)(unsafe.Pointer(pExpr)).Fop) == TK_AGG_FUNCTION {
*(*U8)(unsafe.Pointer(pExpr + 2 /* &.op2 */)) += U8((*(*int32)(unsafe.Pointer(pWalker + 40 /* &.u */))))
}
return WRC_Continue
}
-func incrAggFunctionDepth(tls *libc.TLS, pExpr uintptr, N int32) { /* sqlite3.c:98666:13: */
+func incrAggFunctionDepth(tls *libc.TLS, pExpr uintptr, N int32) { /* sqlite3.c:99249:13: */
bp := tls.Alloc(48)
defer tls.Free(48)
@@ -76789,7 +78861,7 @@ func incrAggFunctionDepth(tls *libc.TLS, pExpr uintptr, N int32) { /* sqlite3.c:
// zero but it might be more if the alias is contained within a subquery
// of the original expression. The Expr.op2 field of TK_AGG_FUNCTION
// structures must be increased by the nSubquery amount.
-func resolveAlias(tls *libc.TLS, pParse uintptr, pEList uintptr, iCol int32, pExpr uintptr, nSubquery int32) { /* sqlite3.c:98695:13: */
+func resolveAlias(tls *libc.TLS, pParse uintptr, pEList uintptr, iCol int32, pExpr uintptr, nSubquery int32) { /* sqlite3.c:99278:13: */
var pOrig uintptr // The iCol-th column of the result set
var pDup uintptr // Copy of pOrig
var db uintptr // The database connection
@@ -76798,7 +78870,10 @@ func resolveAlias(tls *libc.TLS, pParse uintptr, pEList uintptr, iCol int32, pEx
db = (*Parse)(unsafe.Pointer(pParse)).Fdb
pDup = Xsqlite3ExprDup(tls, db, pOrig, 0)
- if pDup != uintptr(0) {
+ if (*Sqlite3)(unsafe.Pointer(db)).FmallocFailed != 0 {
+ Xsqlite3ExprDelete(tls, db, pDup)
+ pDup = uintptr(0)
+ } else {
incrAggFunctionDepth(tls, pDup, nSubquery)
if int32((*Expr)(unsafe.Pointer(pExpr)).Fop) == TK_COLLATE {
pDup = Xsqlite3ExprAddCollateString(tls, pParse, pDup, *(*uintptr)(unsafe.Pointer(pExpr + 8 /* &.u */)))
@@ -76821,8 +78896,6 @@ func resolveAlias(tls *libc.TLS, pParse uintptr, pEList uintptr, iCol int32, pEx
if ((*Expr)(unsafe.Pointer((pExpr))).Fflags & (U32(EP_WinFunc))) != U32(0) {
if *(*uintptr)(unsafe.Pointer(pExpr + 64 /* &.y */)) != uintptr(0) {
(*Window)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(pExpr + 64 /* &.y */)))).FpOwner = pExpr
- } else {
-
}
}
Xsqlite3DbFree(tls, db, pDup)
@@ -76833,7 +78906,7 @@ func resolveAlias(tls *libc.TLS, pParse uintptr, pEList uintptr, iCol int32, pEx
//
// Return FALSE if the USING clause is NULL or if it does not contain
// zCol.
-func nameInUsingClause(tls *libc.TLS, pUsing uintptr, zCol uintptr) int32 { /* sqlite3.c:98750:12: */
+func nameInUsingClause(tls *libc.TLS, pUsing uintptr, zCol uintptr) int32 { /* sqlite3.c:99334:12: */
if pUsing != 0 {
var k int32
for k = 0; k < (*IdList)(unsafe.Pointer(pUsing)).FnId; k++ {
@@ -76850,22 +78923,22 @@ func nameInUsingClause(tls *libc.TLS, pUsing uintptr, zCol uintptr) int32 { /* s
// Check to see if the zSpan given to this routine matches the zDb, zTab,
// and zCol. If any of zDb, zTab, and zCol are NULL then those fields will
// match anything.
-func Xsqlite3MatchEName(tls *libc.TLS, pItem uintptr, zCol uintptr, zTab uintptr, zDb uintptr) int32 { /* sqlite3.c:98767:20: */
+func Xsqlite3MatchEName(tls *libc.TLS, pItem uintptr, zCol uintptr, zTab uintptr, zDb uintptr) int32 { /* sqlite3.c:99351:20: */
var n int32
var zSpan uintptr
- if (int32(*(*uint8)(unsafe.Pointer(pItem + 20 /* &.eEName */)) >> 6 & 0x3)) != ENAME_TAB {
+ if (int32(*(*uint8)(unsafe.Pointer(pItem + 20 /* &.eEName */)) & 0xc0 >> 6)) != ENAME_TAB {
return 0
}
zSpan = (*ExprList_item)(unsafe.Pointer(pItem)).FzEName
- for n = 0; (*(*int8)(unsafe.Pointer(zSpan + uintptr(n))) != 0) && (int32(*(*int8)(unsafe.Pointer(zSpan + uintptr(n)))) != '.'); n++ {
+ for n = 0; (*(*uint8)(unsafe.Pointer(zSpan + uintptr(n))) != 0) && (int32(*(*uint8)(unsafe.Pointer(zSpan + uintptr(n)))) != '.'); n++ {
}
- if (zDb != 0) && ((Xsqlite3_strnicmp(tls, zSpan, zDb, n) != 0) || (int32(*(*int8)(unsafe.Pointer(zDb + uintptr(n)))) != 0)) {
+ if (zDb != 0) && ((Xsqlite3_strnicmp(tls, zSpan, zDb, n) != 0) || (int32(*(*uint8)(unsafe.Pointer(zDb + uintptr(n)))) != 0)) {
return 0
}
zSpan += (uintptr(n + 1))
- for n = 0; (*(*int8)(unsafe.Pointer(zSpan + uintptr(n))) != 0) && (int32(*(*int8)(unsafe.Pointer(zSpan + uintptr(n)))) != '.'); n++ {
+ for n = 0; (*(*uint8)(unsafe.Pointer(zSpan + uintptr(n))) != 0) && (int32(*(*uint8)(unsafe.Pointer(zSpan + uintptr(n)))) != '.'); n++ {
}
- if (zTab != 0) && ((Xsqlite3_strnicmp(tls, zSpan, zTab, n) != 0) || (int32(*(*int8)(unsafe.Pointer(zTab + uintptr(n)))) != 0)) {
+ if (zTab != 0) && ((Xsqlite3_strnicmp(tls, zSpan, zTab, n) != 0) || (int32(*(*uint8)(unsafe.Pointer(zTab + uintptr(n)))) != 0)) {
return 0
}
zSpan += (uintptr(n + 1))
@@ -76876,7 +78949,7 @@ func Xsqlite3MatchEName(tls *libc.TLS, pItem uintptr, zCol uintptr, zTab uintptr
}
// Return TRUE if the double-quoted string mis-feature should be supported.
-func areDoubleQuotedStringsEnabled(tls *libc.TLS, db uintptr, pTopNC uintptr) int32 { /* sqlite3.c:98796:12: */
+func areDoubleQuotedStringsEnabled(tls *libc.TLS, db uintptr, pTopNC uintptr) int32 { /* sqlite3.c:99380:12: */
if (*Sqlite3)(unsafe.Pointer(db)).Finit.Fbusy != 0 {
return 1
} // Always support for legacy schemas
@@ -76895,7 +78968,7 @@ func areDoubleQuotedStringsEnabled(tls *libc.TLS, db uintptr, pTopNC uintptr) in
// The argument is guaranteed to be a non-NULL Expr node of type TK_COLUMN.
// return the appropriate colUsed mask.
-func Xsqlite3ExprColUsed(tls *libc.TLS, pExpr uintptr) Bitmask { /* sqlite3.c:98814:24: */
+func Xsqlite3ExprColUsed(tls *libc.TLS, pExpr uintptr) Bitmask { /* sqlite3.c:99398:24: */
var n int32
var pExTab uintptr
@@ -76944,7 +79017,7 @@ func Xsqlite3ExprColUsed(tls *libc.TLS, pExpr uintptr) Bitmask { /* sqlite3.c:98
//
// If the name cannot be resolved unambiguously, leave an error message
// in pParse and return WRC_Abort. Return WRC_Prune on success.
-func lookupName(tls *libc.TLS, pParse uintptr, zDb uintptr, zTab uintptr, zCol uintptr, pNC uintptr, pExpr uintptr) int32 { /* sqlite3.c:98862:12: */
+func lookupName(tls *libc.TLS, pParse uintptr, zDb uintptr, zTab uintptr, zCol uintptr, pNC uintptr, pExpr uintptr) int32 { /* sqlite3.c:99446:12: */
bp := tls.Alloc(96)
defer tls.Free(96)
@@ -77026,7 +79099,7 @@ __5:
goto __6
__6:
;
- if !((i == (*Sqlite3)(unsafe.Pointer(db)).FnDb) && (Xsqlite3StrICmp(tls, ts+5327 /* "main" */, zDb) == 0)) {
+ if !((i == (*Sqlite3)(unsafe.Pointer(db)).FnDb) && (Xsqlite3StrICmp(tls, ts+5458 /* "main" */, zDb) == 0)) {
goto __8
}
// This branch is taken when the main database has been renamed
@@ -77229,14 +79302,14 @@ __40:
;
goto __39
__38:
- if !(((op != TK_DELETE) && (zTab != 0)) && (Xsqlite3StrICmp(tls, ts+5332 /* "new" */, zTab) == 0)) {
+ if !(((op != TK_DELETE) && (zTab != 0)) && (Xsqlite3StrICmp(tls, ts+5463 /* "new" */, zTab) == 0)) {
goto __41
}
(*Expr)(unsafe.Pointer(pExpr)).FiTable = 1
pTab = (*Parse)(unsafe.Pointer(pParse)).FpTriggerTab
goto __42
__41:
- if !(((op != TK_INSERT) && (zTab != 0)) && (Xsqlite3StrICmp(tls, ts+5336 /* "old" */, zTab) == 0)) {
+ if !(((op != TK_INSERT) && (zTab != 0)) && (Xsqlite3StrICmp(tls, ts+5467 /* "old" */, zTab) == 0)) {
goto __43
}
(*Expr)(unsafe.Pointer(pExpr)).FiTable = 0
@@ -77253,7 +79326,7 @@ __37:
goto __44
}
pUpsert = *(*uintptr)(unsafe.Pointer(pNC + 16 /* &.uNC */))
- if !((pUpsert != 0) && (Xsqlite3StrICmp(tls, ts+5340 /* "excluded" */, zTab) == 0)) {
+ if !((pUpsert != 0) && (Xsqlite3StrICmp(tls, ts+5471 /* "excluded" */, zTab) == 0)) {
goto __45
}
pTab = (*SrcItem)(unsafe.Pointer(((*Upsert)(unsafe.Pointer(pUpsert)).FpUpsertSrc + 8 /* &.a */))).FpTab
@@ -77339,7 +79412,7 @@ __58:
if !(iCol < 0) {
goto __60
}
- (*Expr)(unsafe.Pointer(pExpr)).FaffExpr = int8(SQLITE_AFF_INTEGER)
+ (*Expr)(unsafe.Pointer(pExpr)).FaffExpr = uint8(SQLITE_AFF_INTEGER)
goto __61
__60:
if !((*Expr)(unsafe.Pointer(pExpr)).FiTable == 0) {
@@ -77388,7 +79461,7 @@ __36:
}
cnt = 1
(*Expr)(unsafe.Pointer(pExpr)).FiColumn = int16(-1)
- (*Expr)(unsafe.Pointer(pExpr)).FaffExpr = int8(SQLITE_AFF_INTEGER)
+ (*Expr)(unsafe.Pointer(pExpr)).FaffExpr = uint8(SQLITE_AFF_INTEGER)
__64:
;
@@ -77408,8 +79481,8 @@ __64:
// clause is not standard SQL. This is a (goofy) SQLite extension, that
// is supported for backwards compatibility only. Hence, we issue a warning
// on sqlite3_log() whenever the capability is used.
- if !(((((*NameContext)(unsafe.Pointer(pNC)).FncFlags & NC_UEList) != 0) &&
- (cnt == 0)) &&
+ if !(((cnt == 0) &&
+ (((*NameContext)(unsafe.Pointer(pNC)).FncFlags & NC_UEList) != 0)) &&
(zTab == uintptr(0))) {
goto __65
}
@@ -77421,7 +79494,7 @@ __66:
goto __68
}
zAs = (*ExprList_item)(unsafe.Pointer((pEList + 8 /* &.a */) + uintptr(j)*32)).FzEName
- if !(((int32(*(*uint8)(unsafe.Pointer(((pEList + 8 /* &.a */) + uintptr(j)*32) + 20 /* &.eEName */)) >> 6 & 0x3)) == ENAME_NAME) &&
+ if !(((int32(*(*uint8)(unsafe.Pointer(((pEList + 8 /* &.a */) + uintptr(j)*32) + 20 /* &.eEName */)) & 0xc0 >> 6)) == ENAME_NAME) &&
(Xsqlite3_stricmp(tls, zAs, zCol) == 0)) {
goto __69
}
@@ -77430,7 +79503,7 @@ __66:
if !((((*NameContext)(unsafe.Pointer(pNC)).FncFlags & NC_AllowAgg) == 0) && (((*Expr)(unsafe.Pointer((pOrig))).Fflags & (U32(EP_Agg))) != U32(0))) {
goto __70
}
- Xsqlite3ErrorMsg(tls, pParse, ts+5349 /* "misuse of aliase..." */, libc.VaList(bp, zAs))
+ Xsqlite3ErrorMsg(tls, pParse, ts+5480 /* "misuse of aliase..." */, libc.VaList(bp, zAs))
return WRC_Abort
__70:
;
@@ -77438,14 +79511,14 @@ __70:
((((*NameContext)(unsafe.Pointer(pNC)).FncFlags & NC_AllowWin) == 0) || (pNC != pTopNC))) {
goto __71
}
- Xsqlite3ErrorMsg(tls, pParse, ts+5380 /* "misuse of aliase..." */, libc.VaList(bp+8, zAs))
+ Xsqlite3ErrorMsg(tls, pParse, ts+5511 /* "misuse of aliase..." */, libc.VaList(bp+8, zAs))
return WRC_Abort
__71:
;
if !(Xsqlite3ExprVectorSize(tls, pOrig) != 1) {
goto __72
}
- Xsqlite3ErrorMsg(tls, pParse, ts+5417 /* "row value misuse..." */, 0)
+ Xsqlite3ErrorMsg(tls, pParse, ts+5548 /* "row value misuse..." */, 0)
return WRC_Abort
__72:
;
@@ -77503,9 +79576,8 @@ __11:
goto __75
}
- if !(((((*Expr)(unsafe.Pointer((pExpr))).Fflags & (U32(EP_DblQuoted))) != U32(0)) &&
- (areDoubleQuotedStringsEnabled(tls, db, pTopNC) != 0)) &&
- (((int32(*(*uint8)(unsafe.Pointer((db + 184 /* &.init */) + 8 /* &.bDropColumn */)) >> 4 & 0x1)) == 0) || (Xsqlite3StrICmp(tls, zCol, *(*uintptr)(unsafe.Pointer((*Sqlite3)(unsafe.Pointer(db)).Finit.FazInit))) != 0))) {
+ if !((((*Expr)(unsafe.Pointer((pExpr))).Fflags & (U32(EP_DblQuoted))) != U32(0)) &&
+ (areDoubleQuotedStringsEnabled(tls, db, pTopNC) != 0)) {
goto __76
}
// If a double-quoted identifier does not match any known column name,
@@ -77521,13 +79593,8 @@ __11:
// Someday, I hope to get rid of this hack. Unfortunately there is
// a huge amount of legacy SQL that uses it. So for now, we just
// issue a warning.
- //
- // 2021-03-15: ticket 1c24a659e6d7f3a1
- // Do not do the ID-to-STRING conversion when doing the schema
- // sanity check following a DROP COLUMN if the identifer name matches
- // the name of the column being dropped.
Xsqlite3_log(tls, SQLITE_WARNING,
- ts+5435 /* "double-quoted st..." */, libc.VaList(bp+16, zCol))
+ ts+5566 /* "double-quoted st..." */, libc.VaList(bp+16, zCol))
(*Expr)(unsafe.Pointer(pExpr)).Fop = U8(TK_STRING)
*(*uintptr)(unsafe.Pointer(pExpr + 64 /* &.y */)) = uintptr(0)
return WRC_Prune
@@ -77548,29 +79615,29 @@ __75:
goto __78
}
if cnt == 0 {
- zErr = ts + 5470 /* "no such column" */
+ zErr = ts + 5601 /* "no such column" */
} else {
- zErr = ts + 5485 /* "ambiguous column..." */
+ zErr = ts + 5616 /* "ambiguous column..." */
}
if !(zDb != 0) {
goto __79
}
- Xsqlite3ErrorMsg(tls, pParse, ts+5507 /* "%s: %s.%s.%s" */, libc.VaList(bp+24, zErr, zDb, zTab, zCol))
+ Xsqlite3ErrorMsg(tls, pParse, ts+5638 /* "%s: %s.%s.%s" */, libc.VaList(bp+24, zErr, zDb, zTab, zCol))
goto __80
__79:
if !(zTab != 0) {
goto __81
}
- Xsqlite3ErrorMsg(tls, pParse, ts+5520 /* "%s: %s.%s" */, libc.VaList(bp+56, zErr, zTab, zCol))
+ Xsqlite3ErrorMsg(tls, pParse, ts+5651 /* "%s: %s.%s" */, libc.VaList(bp+56, zErr, zTab, zCol))
goto __82
__81:
- Xsqlite3ErrorMsg(tls, pParse, ts+5530 /* "%s: %s" */, libc.VaList(bp+80, zErr, zCol))
+ Xsqlite3ErrorMsg(tls, pParse, ts+5661 /* "%s: %s" */, libc.VaList(bp+80, zErr, zCol))
__82:
;
__80:
;
(*Parse)(unsafe.Pointer(pParse)).FcheckSchema = U8(1)
- (*NameContext)(unsafe.Pointer(pTopNC)).FnErr++
+ (*NameContext)(unsafe.Pointer(pTopNC)).FnNcErr++
__78:
;
@@ -77647,7 +79714,7 @@ __86:
// Allocate and return a pointer to an expression to load the column iCol
// from datasource iSrc in SrcList pSrc.
-func Xsqlite3CreateColumnExpr(tls *libc.TLS, db uintptr, pSrc uintptr, iSrc int32, iCol int32) uintptr { /* sqlite3.c:99302:21: */
+func Xsqlite3CreateColumnExpr(tls *libc.TLS, db uintptr, pSrc uintptr, iSrc int32, iCol int32) uintptr { /* sqlite3.c:99880:21: */
var p uintptr = Xsqlite3ExprAlloc(tls, db, TK_COLUMN, uintptr(0), 0)
if p != 0 {
var pItem uintptr = ((pSrc + 8 /* &.a */) + uintptr(iSrc)*112)
@@ -77694,19 +79761,19 @@ func Xsqlite3CreateColumnExpr(tls *libc.TLS, db uintptr, pSrc uintptr, iSrc int3
// As an optimization, since the conditional is almost always false
// (because errors are rare), the conditional is moved outside of the
// function call using a macro.
-func notValidImpl(tls *libc.TLS, pParse uintptr, pNC uintptr, zMsg uintptr, pExpr uintptr) { /* sqlite3.c:99344:13: */
+func notValidImpl(tls *libc.TLS, pParse uintptr, pNC uintptr, zMsg uintptr, pExpr uintptr) { /* sqlite3.c:99922:13: */
bp := tls.Alloc(16)
defer tls.Free(16)
- var zIn uintptr = ts + 5537 /* "partial index WH..." */
+ var zIn uintptr = ts + 5668 /* "partial index WH..." */
if ((*NameContext)(unsafe.Pointer(pNC)).FncFlags & NC_IdxExpr) != 0 {
- zIn = ts + 5565 /* "index expression..." */
+ zIn = ts + 5696 /* "index expression..." */
} else if ((*NameContext)(unsafe.Pointer(pNC)).FncFlags & NC_IsCheck) != 0 {
- zIn = ts + 5583 /* "CHECK constraint..." */
+ zIn = ts + 5714 /* "CHECK constraint..." */
} else if ((*NameContext)(unsafe.Pointer(pNC)).FncFlags & NC_GenCol) != 0 {
- zIn = ts + 5601 /* "generated column..." */
+ zIn = ts + 5732 /* "generated column..." */
}
- Xsqlite3ErrorMsg(tls, pParse, ts+5619 /* "%s prohibited in..." */, libc.VaList(bp, zMsg, zIn))
+ Xsqlite3ErrorMsg(tls, pParse, ts+5750 /* "%s prohibited in..." */, libc.VaList(bp, zMsg, zIn))
if pExpr != 0 {
(*Expr)(unsafe.Pointer(pExpr)).Fop = U8(TK_NULL)
}
@@ -77715,7 +79782,7 @@ func notValidImpl(tls *libc.TLS, pParse uintptr, pNC uintptr, zMsg uintptr, pExp
// Expression p should encode a floating point value between 1.0 and 0.0.
// Return 1024 times this value. Or return -1 if p is not a floating point
// value between 1.0 and 0.0.
-func exprProbability(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:99370:12: */
+func exprProbability(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:99948:12: */
bp := tls.Alloc(8)
defer tls.Free(8)
@@ -77728,7 +79795,7 @@ func exprProbability(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:99370:12: */
if *(*float64)(unsafe.Pointer(bp /* r */)) > 1.0 {
return -1
}
- return (int32(*(*float64)(unsafe.Pointer(bp /* r */)) * 134217728.0))
+ return (libc.Int32FromFloat64(*(*float64)(unsafe.Pointer(bp /* r */)) * 134217728.0))
}
// This routine is callback for sqlite3WalkExpr().
@@ -77740,7 +79807,7 @@ func exprProbability(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:99370:12: */
// This routine also does error checking and name resolution for
// function names. The operator for aggregate functions is changed
// to TK_AGG_FUNCTION.
-func resolveExprStep(tls *libc.TLS, pWalker uintptr, pExpr uintptr) int32 { /* sqlite3.c:99390:12: */
+func resolveExprStep(tls *libc.TLS, pWalker uintptr, pExpr uintptr) int32 { /* sqlite3.c:99968:12: */
bp := tls.Alloc(128)
defer tls.Free(128)
@@ -77767,7 +79834,7 @@ func resolveExprStep(tls *libc.TLS, pWalker uintptr, pExpr uintptr) int32 { /* s
*(*uintptr)(unsafe.Pointer(pExpr + 64 /* &.y */)) = (*SrcItem)(unsafe.Pointer(pItem)).FpTab
(*Expr)(unsafe.Pointer(pExpr)).FiTable = (*SrcItem)(unsafe.Pointer(pItem)).FiCursor
(*Expr)(unsafe.Pointer(pExpr)).FiColumn--
- (*Expr)(unsafe.Pointer(pExpr)).FaffExpr = int8(SQLITE_AFF_INTEGER)
+ (*Expr)(unsafe.Pointer(pExpr)).FaffExpr = uint8(SQLITE_AFF_INTEGER)
break
}
@@ -77814,10 +79881,10 @@ func resolveExprStep(tls *libc.TLS, pWalker uintptr, pExpr uintptr) int32 { /* s
Xsqlite3WalkExpr(tls, pWalker, (*Expr)(unsafe.Pointer(pExpr)).FpLeft)
if (0 == Xsqlite3ExprCanBeNull(tls, (*Expr)(unsafe.Pointer(pExpr)).FpLeft)) && !(int32((*Parse)(unsafe.Pointer(pParse)).FeParseMode) >= PARSE_MODE_RENAME) {
if int32((*Expr)(unsafe.Pointer(pExpr)).Fop) == TK_NOTNULL {
- *(*uintptr)(unsafe.Pointer(pExpr + 8 /* &.u */)) = ts + 5639 /* "true" */
+ *(*uintptr)(unsafe.Pointer(pExpr + 8 /* &.u */)) = ts + 5770 /* "true" */
*(*U32)(unsafe.Pointer(pExpr + 4 /* &.flags */)) |= (U32(EP_IsTrue))
} else {
- *(*uintptr)(unsafe.Pointer(pExpr + 8 /* &.u */)) = ts + 5644 /* "false" */
+ *(*uintptr)(unsafe.Pointer(pExpr + 8 /* &.u */)) = ts + 5775 /* "false" */
*(*U32)(unsafe.Pointer(pExpr + 4 /* &.flags */)) |= (U32(EP_IsFalse))
}
(*Expr)(unsafe.Pointer(pExpr)).Fop = U8(TK_TRUEFALSE)
@@ -77870,7 +79937,7 @@ func resolveExprStep(tls *libc.TLS, pWalker uintptr, pExpr uintptr) int32 { /* s
var pLeft uintptr = (*Expr)(unsafe.Pointer(pExpr)).FpLeft
if ((*NameContext)(unsafe.Pointer((pNC))).FncFlags & (NC_IdxExpr | NC_GenCol)) != 0 {
- notValidImpl(tls, pParse, pNC, ts+5650 /* "the \".\" operator" */, uintptr(0))
+ notValidImpl(tls, pParse, pNC, ts+5781 /* "the \".\" operator" */, uintptr(0))
}
pRight = (*Expr)(unsafe.Pointer(pExpr)).FpRight
@@ -77937,8 +80004,8 @@ func resolveExprStep(tls *libc.TLS, pWalker uintptr, pExpr uintptr) int32 { /* s
if (*Expr)(unsafe.Pointer(pExpr)).FiTable < 0 {
Xsqlite3ErrorMsg(tls, pParse,
- ts+5667 /* "second argument ..." */, 0)
- (*NameContext)(unsafe.Pointer(pNC)).FnErr++
+ ts+5798 /* "second argument ..." */, 0)
+ (*NameContext)(unsafe.Pointer(pNC)).FnNcErr++
}
} else {
// EVIDENCE-OF: R-61304-29449 The unlikely(X) function is
@@ -77951,7 +80018,7 @@ func resolveExprStep(tls *libc.TLS, pWalker uintptr, pExpr uintptr) int32 { /* s
// to likelihood(X,0.9375).
// TUNING: unlikely() probability is 0.0625. likely() is 0.9375
(*Expr)(unsafe.Pointer(pExpr)).FiTable = func() int32 {
- if int32(*(*int8)(unsafe.Pointer((*FuncDef)(unsafe.Pointer(pDef)).FzName))) == 'u' {
+ if int32(*(*uint8)(unsafe.Pointer((*FuncDef)(unsafe.Pointer(pDef)).FzName))) == 'u' {
return 8388608
}
return 125829120
@@ -77962,9 +80029,9 @@ func resolveExprStep(tls *libc.TLS, pWalker uintptr, pExpr uintptr) int32 { /* s
var auth int32 = Xsqlite3AuthCheck(tls, pParse, SQLITE_FUNCTION, uintptr(0), (*FuncDef)(unsafe.Pointer(pDef)).FzName, uintptr(0))
if auth != SQLITE_OK {
if auth == SQLITE_DENY {
- Xsqlite3ErrorMsg(tls, pParse, ts+5738, /* "not authorized t..." */
+ Xsqlite3ErrorMsg(tls, pParse, ts+5869, /* "not authorized t..." */
libc.VaList(bp, (*FuncDef)(unsafe.Pointer(pDef)).FzName))
- (*NameContext)(unsafe.Pointer(pNC)).FnErr++
+ (*NameContext)(unsafe.Pointer(pNC)).FnNcErr++
}
(*Expr)(unsafe.Pointer(pExpr)).Fop = U8(TK_NULL)
return WRC_Prune
@@ -77986,7 +80053,7 @@ func resolveExprStep(tls *libc.TLS, pWalker uintptr, pExpr uintptr) int32 { /* s
// in a CHECK constraint. SQLServer, MySQL, and PostgreSQL all
// all this.
if ((*NameContext)(unsafe.Pointer((pNC))).FncFlags & ((NC_IdxExpr | NC_PartIdx) | NC_GenCol)) != 0 {
- notValidImpl(tls, pParse, pNC, ts+5773 /* "non-deterministi..." */, uintptr(0))
+ notValidImpl(tls, pParse, pNC, ts+5904 /* "non-deterministi..." */, uintptr(0))
}
} else {
@@ -78015,32 +80082,32 @@ func resolveExprStep(tls *libc.TLS, pWalker uintptr, pExpr uintptr) int32 { /* s
if ((pDef != 0) && ((*FuncDef)(unsafe.Pointer(pDef)).FxValue == uintptr(0))) && (pWin != 0) {
Xsqlite3ErrorMsg(tls, pParse,
- ts+5801 /* "%.*s() may not b..." */, libc.VaList(bp+8, nId, zId))
- (*NameContext)(unsafe.Pointer(pNC)).FnErr++
+ ts+5932 /* "%.*s() may not b..." */, libc.VaList(bp+8, nId, zId))
+ (*NameContext)(unsafe.Pointer(pNC)).FnNcErr++
} else if (((is_agg != 0) && (((*NameContext)(unsafe.Pointer(pNC)).FncFlags & NC_AllowAgg) == 0)) ||
(((is_agg != 0) && (((*FuncDef)(unsafe.Pointer(pDef)).FfuncFlags & U32(SQLITE_FUNC_WINDOW)) != 0)) && !(pWin != 0))) ||
(((is_agg != 0) && (pWin != 0)) && (((*NameContext)(unsafe.Pointer(pNC)).FncFlags & NC_AllowWin) == 0)) {
var zType uintptr
if (((*FuncDef)(unsafe.Pointer(pDef)).FfuncFlags & U32(SQLITE_FUNC_WINDOW)) != 0) || (pWin != 0) {
- zType = ts + 5845 /* "window" */
+ zType = ts + 5976 /* "window" */
} else {
- zType = ts + 5852 /* "aggregate" */
+ zType = ts + 5983 /* "aggregate" */
}
- Xsqlite3ErrorMsg(tls, pParse, ts+5862 /* "misuse of %s fun..." */, libc.VaList(bp+24, zType, nId, zId))
- (*NameContext)(unsafe.Pointer(pNC)).FnErr++
+ Xsqlite3ErrorMsg(tls, pParse, ts+5993 /* "misuse of %s fun..." */, libc.VaList(bp+24, zType, nId, zId))
+ (*NameContext)(unsafe.Pointer(pNC)).FnNcErr++
is_agg = 0
} else if (no_such_func != 0) && (int32((*Sqlite3)(unsafe.Pointer((*Parse)(unsafe.Pointer(pParse)).Fdb)).Finit.Fbusy) == 0) {
- Xsqlite3ErrorMsg(tls, pParse, ts+5891 /* "no such function..." */, libc.VaList(bp+48, nId, zId))
- (*NameContext)(unsafe.Pointer(pNC)).FnErr++
+ Xsqlite3ErrorMsg(tls, pParse, ts+6022 /* "no such function..." */, libc.VaList(bp+48, nId, zId))
+ (*NameContext)(unsafe.Pointer(pNC)).FnNcErr++
} else if wrong_num_args != 0 {
- Xsqlite3ErrorMsg(tls, pParse, ts+5914, /* "wrong number of ..." */
+ Xsqlite3ErrorMsg(tls, pParse, ts+6045, /* "wrong number of ..." */
libc.VaList(bp+64, nId, zId))
- (*NameContext)(unsafe.Pointer(pNC)).FnErr++
+ (*NameContext)(unsafe.Pointer(pNC)).FnNcErr++
} else if (is_agg == 0) && (((*Expr)(unsafe.Pointer((pExpr))).Fflags & (U32(EP_WinFunc))) != U32(0)) {
Xsqlite3ErrorMsg(tls, pParse,
- ts+5959, /* "FILTER may not b..." */
+ ts+6090, /* "FILTER may not b..." */
libc.VaList(bp+80, nId, zId))
- (*NameContext)(unsafe.Pointer(pNC)).FnErr++
+ (*NameContext)(unsafe.Pointer(pNC)).FnNcErr++
}
if is_agg != 0 {
// Window functions may not be arguments of aggregate functions.
@@ -78113,7 +80180,7 @@ func resolveExprStep(tls *libc.TLS, pWalker uintptr, pExpr uintptr) int32 { /* s
var nRef int32 = (*NameContext)(unsafe.Pointer(pNC)).FnRef
if ((*NameContext)(unsafe.Pointer((pNC))).FncFlags & (((NC_IsCheck | NC_PartIdx) | NC_IdxExpr) | NC_GenCol)) != 0 {
- notValidImpl(tls, pParse, pNC, ts+6008 /* "subqueries" */, pExpr)
+ notValidImpl(tls, pParse, pNC, ts+6139 /* "subqueries" */, pExpr)
}
Xsqlite3WalkSelect(tls, pWalker, *(*uintptr)(unsafe.Pointer(pExpr + 32 /* &.x */)))
@@ -78130,7 +80197,7 @@ func resolveExprStep(tls *libc.TLS, pWalker uintptr, pExpr uintptr) int32 { /* s
{
if ((*NameContext)(unsafe.Pointer((pNC))).FncFlags & (((NC_IsCheck | NC_PartIdx) | NC_IdxExpr) | NC_GenCol)) != 0 {
- notValidImpl(tls, pParse, pNC, ts+6019 /* "parameters" */, pExpr)
+ notValidImpl(tls, pParse, pNC, ts+6150 /* "parameters" */, pExpr)
}
break
@@ -78190,7 +80257,7 @@ func resolveExprStep(tls *libc.TLS, pWalker uintptr, pExpr uintptr) int32 { /* s
}
if nLeft != nRight {
- Xsqlite3ErrorMsg(tls, pParse, ts+5417 /* "row value misuse..." */, 0)
+ Xsqlite3ErrorMsg(tls, pParse, ts+5548 /* "row value misuse..." */, 0)
}
break
@@ -78212,7 +80279,7 @@ func resolveExprStep(tls *libc.TLS, pWalker uintptr, pExpr uintptr) int32 { /* s
// return 0.
//
// pEList has been resolved. pE has not.
-func resolveAsName(tls *libc.TLS, pParse uintptr, pEList uintptr, pE uintptr) int32 { /* sqlite3.c:99832:12: */
+func resolveAsName(tls *libc.TLS, pParse uintptr, pEList uintptr, pE uintptr) int32 { /* sqlite3.c:100410:12: */
var i int32 // Loop counter
_ = pParse
@@ -78220,7 +80287,7 @@ func resolveAsName(tls *libc.TLS, pParse uintptr, pEList uintptr, pE uintptr) in
if int32((*Expr)(unsafe.Pointer(pE)).Fop) == TK_ID {
var zCol uintptr = *(*uintptr)(unsafe.Pointer(pE + 8 /* &.u */))
for i = 0; i < (*ExprList)(unsafe.Pointer(pEList)).FnExpr; i++ {
- if ((int32(*(*uint8)(unsafe.Pointer(((pEList + 8 /* &.a */) + uintptr(i)*32) + 20 /* &.eEName */)) >> 6 & 0x3)) == ENAME_NAME) &&
+ if ((int32(*(*uint8)(unsafe.Pointer(((pEList + 8 /* &.a */) + uintptr(i)*32) + 20 /* &.eEName */)) & 0xc0 >> 6)) == ENAME_NAME) &&
(Xsqlite3_stricmp(tls, (*ExprList_item)(unsafe.Pointer((pEList+8 /* &.a */)+uintptr(i)*32)).FzEName, zCol) == 0) {
return (i + 1)
}
@@ -78245,7 +80312,7 @@ func resolveAsName(tls *libc.TLS, pParse uintptr, pEList uintptr, pE uintptr) in
// the column.
//
// If there is no match, return 0. Return -1 if an error occurs.
-func resolveOrderByTermToExprList(tls *libc.TLS, pParse uintptr, pSelect uintptr, pE uintptr) int32 { /* sqlite3.c:99872:12: */
+func resolveOrderByTermToExprList(tls *libc.TLS, pParse uintptr, pSelect uintptr, pE uintptr) int32 { /* sqlite3.c:100450:12: */
bp := tls.Alloc(56)
defer tls.Free(56)
@@ -78264,13 +80331,11 @@ func resolveOrderByTermToExprList(tls *libc.TLS, pParse uintptr, pSelect uintptr
(*NameContext)(unsafe.Pointer(bp /* &nc */)).FpParse = pParse
(*NameContext)(unsafe.Pointer(bp /* &nc */)).FpSrcList = (*Select)(unsafe.Pointer(pSelect)).FpSrc
*(*uintptr)(unsafe.Pointer(bp /* &nc */ + 16 /* &.uNC */)) = pEList
- (*NameContext)(unsafe.Pointer(bp /* &nc */)).FncFlags = (NC_AllowAgg | NC_UEList)
- (*NameContext)(unsafe.Pointer(bp /* &nc */)).FnErr = 0
+ (*NameContext)(unsafe.Pointer(bp /* &nc */)).FncFlags = ((NC_AllowAgg | NC_UEList) | NC_NoSelect)
+ (*NameContext)(unsafe.Pointer(bp /* &nc */)).FnNcErr = 0
db = (*Parse)(unsafe.Pointer(pParse)).Fdb
savedSuppErr = (*Sqlite3)(unsafe.Pointer(db)).FsuppressErr
- if (libc.Bool32(int32((*Parse)(unsafe.Pointer(pParse)).FeParseMode) >= PARSE_MODE_RENAME)) == 0 {
- (*Sqlite3)(unsafe.Pointer(db)).FsuppressErr = U8(1)
- }
+ (*Sqlite3)(unsafe.Pointer(db)).FsuppressErr = U8(1)
rc = Xsqlite3ResolveExprNames(tls, bp /* &nc */, pE)
(*Sqlite3)(unsafe.Pointer(db)).FsuppressErr = savedSuppErr
if rc != 0 {
@@ -78291,13 +80356,13 @@ func resolveOrderByTermToExprList(tls *libc.TLS, pParse uintptr, pSelect uintptr
}
// Generate an ORDER BY or GROUP BY term out-of-range error.
-func resolveOutOfRangeError(tls *libc.TLS, pParse uintptr, zType uintptr, i int32, mx int32) { /* sqlite3.c:99919:13: */
+func resolveOutOfRangeError(tls *libc.TLS, pParse uintptr, zType uintptr, i int32, mx int32) { /* sqlite3.c:100497:13: */
bp := tls.Alloc(24)
defer tls.Free(24)
Xsqlite3ErrorMsg(tls, pParse,
- ts+6030 /* "%r %s BY term ou..." */, libc.VaList(bp, i, zType, mx))
+ ts+6161 /* "%r %s BY term ou..." */, libc.VaList(bp, i, zType, mx))
}
// Analyze the ORDER BY clause in a compound SELECT statement. Modify
@@ -78313,7 +80378,7 @@ func resolveOutOfRangeError(tls *libc.TLS, pParse uintptr, zType uintptr, i int3
// the integer column number.
//
// Return the number of errors seen.
-func resolveCompoundOrderBy(tls *libc.TLS, pParse uintptr, pSelect uintptr) int32 { /* sqlite3.c:99945:12: */
+func resolveCompoundOrderBy(tls *libc.TLS, pParse uintptr, pSelect uintptr) int32 { /* sqlite3.c:100523:12: */
bp := tls.Alloc(12)
defer tls.Free(12)
@@ -78329,11 +80394,11 @@ func resolveCompoundOrderBy(tls *libc.TLS, pParse uintptr, pSelect uintptr) int3
}
db = (*Parse)(unsafe.Pointer(pParse)).Fdb
if (*ExprList)(unsafe.Pointer(pOrderBy)).FnExpr > *(*int32)(unsafe.Pointer((db + 128 /* &.aLimit */) + 2*4)) {
- Xsqlite3ErrorMsg(tls, pParse, ts+6086 /* "too many terms i..." */, 0)
+ Xsqlite3ErrorMsg(tls, pParse, ts+6217 /* "too many terms i..." */, 0)
return 1
}
for i = 0; i < (*ExprList)(unsafe.Pointer(pOrderBy)).FnExpr; i++ {
- libc.SetBitFieldPtr8Uint32((pOrderBy+8 /* &.a */)+uintptr(i)*32+20 /* &.done */, uint32(0), 2, 0x4)
+ libc.SetBitFieldPtr8Uint32((pOrderBy+8 /* &.a */)+uintptr(i)*32+20 /* &.done */, uint32(0), 5, 0x20)
}
(*Select)(unsafe.Pointer(pSelect)).FpNext = uintptr(0)
for (*Select)(unsafe.Pointer(pSelect)).FpPrior != 0 {
@@ -78355,7 +80420,7 @@ func resolveCompoundOrderBy(tls *libc.TLS, pParse uintptr, pSelect uintptr) int3
*(*int32)(unsafe.Pointer(bp + 8 /* iCol */)) = -1
var pE uintptr
var pDup uintptr
- if (uint32(int32(*(*uint8)(unsafe.Pointer(pItem + 20 /* &.done */)) >> 5 & 0x1))) != 0 {
+ if (uint32(int32(*(*uint8)(unsafe.Pointer(pItem + 20 /* &.done */)) & 0x20 >> 5))) != 0 {
goto __2
}
pE = Xsqlite3ExprSkipCollateAndLikely(tls, (*ExprList_item)(unsafe.Pointer(pItem)).FpExpr)
@@ -78364,7 +80429,7 @@ func resolveCompoundOrderBy(tls *libc.TLS, pParse uintptr, pSelect uintptr) int3
}
if Xsqlite3ExprIsInteger(tls, pE, bp+8 /* &iCol */) != 0 {
if (*(*int32)(unsafe.Pointer(bp + 8 /* iCol */)) <= 0) || (*(*int32)(unsafe.Pointer(bp + 8 /* iCol */)) > (*ExprList)(unsafe.Pointer(pEList)).FnExpr) {
- resolveOutOfRangeError(tls, pParse, ts+6120 /* "ORDER" */, (i + 1), (*ExprList)(unsafe.Pointer(pEList)).FnExpr)
+ resolveOutOfRangeError(tls, pParse, ts+6251 /* "ORDER" */, (i + 1), (*ExprList)(unsafe.Pointer(pEList)).FnExpr)
return 1
}
} else {
@@ -78377,29 +80442,24 @@ func resolveCompoundOrderBy(tls *libc.TLS, pParse uintptr, pSelect uintptr) int3
// Once the comparisons are finished, the duplicate expression
// is deleted.
//
- // Or, if this is running as part of an ALTER TABLE operation,
- // resolve the symbols in the actual expression, not a duplicate.
- // And, if one of the comparisons is successful, leave the expression
- // as is instead of transforming it to an integer as in the usual
- // case. This allows the code in alter.c to modify column
- // refererences within the ORDER BY expression as required.
- if int32((*Parse)(unsafe.Pointer(pParse)).FeParseMode) >= PARSE_MODE_RENAME {
- pDup = pE
- } else {
- pDup = Xsqlite3ExprDup(tls, db, pE, 0)
- }
+ // If this is running as part of an ALTER TABLE operation and
+ // the symbols resolve successfully, also resolve the symbols in the
+ // actual expression. This allows the code in alter.c to modify
+ // column references within the ORDER BY expression as required.
+ pDup = Xsqlite3ExprDup(tls, db, pE, 0)
if !(int32((*Sqlite3)(unsafe.Pointer(db)).FmallocFailed) != 0) {
*(*int32)(unsafe.Pointer(bp + 8 /* iCol */)) = resolveOrderByTermToExprList(tls, pParse, pSelect, pDup)
+ if (int32((*Parse)(unsafe.Pointer(pParse)).FeParseMode) >= PARSE_MODE_RENAME) && (*(*int32)(unsafe.Pointer(bp + 8 /* iCol */)) > 0) {
+ resolveOrderByTermToExprList(tls, pParse, pSelect, pE)
+ }
}
- if !(int32((*Parse)(unsafe.Pointer(pParse)).FeParseMode) >= PARSE_MODE_RENAME) {
- Xsqlite3ExprDelete(tls, db, pDup)
- }
+ Xsqlite3ExprDelete(tls, db, pDup)
}
}
if *(*int32)(unsafe.Pointer(bp + 8 /* iCol */)) > 0 {
// Convert the ORDER BY term into an integer column number iCol,
- // taking care to preserve the COLLATE clause if it exists
+ // taking care to preserve the COLLATE clause if it exists.
if !(int32((*Parse)(unsafe.Pointer(pParse)).FeParseMode) >= PARSE_MODE_RENAME) {
var pNew uintptr = Xsqlite3Expr(tls, db, TK_INTEGER, uintptr(0))
if pNew == uintptr(0) {
@@ -78421,7 +80481,7 @@ func resolveCompoundOrderBy(tls *libc.TLS, pParse uintptr, pSelect uintptr) int3
Xsqlite3ExprDelete(tls, db, pE)
*(*U16)(unsafe.Pointer(pItem + 24 /* &.u */ /* &.x */ /* &.iOrderByCol */)) = U16(*(*int32)(unsafe.Pointer(bp + 8 /* iCol */)))
}
- libc.SetBitFieldPtr8Uint32(pItem+20 /* &.done */, uint32(1), 2, 0x4)
+ libc.SetBitFieldPtr8Uint32(pItem+20 /* &.done */, uint32(1), 5, 0x20)
} else {
moreToDo = 1
}
@@ -78438,9 +80498,9 @@ func resolveCompoundOrderBy(tls *libc.TLS, pParse uintptr, pSelect uintptr) int3
pSelect = (*Select)(unsafe.Pointer(pSelect)).FpNext
}
for i = 0; i < (*ExprList)(unsafe.Pointer(pOrderBy)).FnExpr; i++ {
- if (int32(*(*uint8)(unsafe.Pointer(((pOrderBy + 8 /* &.a */) + uintptr(i)*32) + 20 /* &.done */)) >> 5 & 0x1)) == 0 {
+ if (int32(*(*uint8)(unsafe.Pointer(((pOrderBy + 8 /* &.a */) + uintptr(i)*32) + 20 /* &.done */)) & 0x20 >> 5)) == 0 {
Xsqlite3ErrorMsg(tls, pParse,
- ts+6126 /* "%r ORDER BY term..." */, libc.VaList(bp, (i+1)))
+ ts+6257 /* "%r ORDER BY term..." */, libc.VaList(bp, (i+1)))
return 1
}
}
@@ -78455,7 +80515,7 @@ func resolveCompoundOrderBy(tls *libc.TLS, pParse uintptr, pSelect uintptr) int3
//
// If any errors are detected, add an error message to pParse and
// return non-zero. Return zero if no errors are seen.
-func Xsqlite3ResolveOrderGroupBy(tls *libc.TLS, pParse uintptr, pSelect uintptr, pOrderBy uintptr, zType uintptr) int32 { /* sqlite3.c:100063:20: */
+func Xsqlite3ResolveOrderGroupBy(tls *libc.TLS, pParse uintptr, pSelect uintptr, pOrderBy uintptr, zType uintptr) int32 { /* sqlite3.c:100636:20: */
bp := tls.Alloc(8)
defer tls.Free(8)
@@ -78468,7 +80528,7 @@ func Xsqlite3ResolveOrderGroupBy(tls *libc.TLS, pParse uintptr, pSelect uintptr,
return 0
}
if (*ExprList)(unsafe.Pointer(pOrderBy)).FnExpr > *(*int32)(unsafe.Pointer((db + 128 /* &.aLimit */) + 2*4)) {
- Xsqlite3ErrorMsg(tls, pParse, ts+6187 /* "too many terms i..." */, libc.VaList(bp, zType))
+ Xsqlite3ErrorMsg(tls, pParse, ts+6318 /* "too many terms i..." */, libc.VaList(bp, zType))
return 1
}
pEList = (*Select)(unsafe.Pointer(pSelect)).FpEList
@@ -78501,7 +80561,7 @@ __3:
}
// Walker callback for windowRemoveExprFromSelect().
-func resolveRemoveWindowsCb(tls *libc.TLS, pWalker uintptr, pExpr uintptr) int32 { /* sqlite3.c:100097:12: */
+func resolveRemoveWindowsCb(tls *libc.TLS, pWalker uintptr, pExpr uintptr) int32 { /* sqlite3.c:100670:12: */
_ = pWalker
if ((*Expr)(unsafe.Pointer((pExpr))).Fflags & (U32(EP_WinFunc))) != U32(0) {
var pWin uintptr = *(*uintptr)(unsafe.Pointer(pExpr + 64 /* &.y */))
@@ -78512,7 +80572,7 @@ func resolveRemoveWindowsCb(tls *libc.TLS, pWalker uintptr, pExpr uintptr) int32
// Remove any Window objects owned by the expression pExpr from the
// Select.pWin list of Select object pSelect.
-func windowRemoveExprFromSelect(tls *libc.TLS, pSelect uintptr, pExpr uintptr) { /* sqlite3.c:100110:13: */
+func windowRemoveExprFromSelect(tls *libc.TLS, pSelect uintptr, pExpr uintptr) { /* sqlite3.c:100683:13: */
bp := tls.Alloc(48)
defer tls.Free(48)
@@ -78544,7 +80604,7 @@ func windowRemoveExprFromSelect(tls *libc.TLS, pSelect uintptr, pExpr uintptr) {
// This routine returns the number of errors. If errors occur, then
// an appropriate error message might be left in pParse. (OOM errors
// excepted.)
-func resolveOrderGroupBy(tls *libc.TLS, pNC uintptr, pSelect uintptr, pOrderBy uintptr, zType uintptr) int32 { /* sqlite3.c:100141:12: */
+func resolveOrderGroupBy(tls *libc.TLS, pNC uintptr, pSelect uintptr, pOrderBy uintptr, zType uintptr) int32 { /* sqlite3.c:100714:12: */
bp := tls.Alloc(4)
defer tls.Free(4)
@@ -78556,9 +80616,6 @@ func resolveOrderGroupBy(tls *libc.TLS, pNC uintptr, pSelect uintptr, pOrderBy u
var pParse uintptr // Parsing context
var nResult int32 // Number of terms in the result set
- if pOrderBy == uintptr(0) {
- return 0
- }
nResult = (*ExprList)(unsafe.Pointer((*Select)(unsafe.Pointer(pSelect)).FpEList)).FnExpr
pParse = (*NameContext)(unsafe.Pointer(pNC)).FpParse
i = 0
@@ -78573,7 +80630,7 @@ __1:
if pE2 == uintptr(0) {
goto __2
}
- if int32(*(*int8)(unsafe.Pointer(zType))) != 'G' {
+ if int32(*(*uint8)(unsafe.Pointer(zType))) != 'G' {
*(*int32)(unsafe.Pointer(bp /* iCol */)) = resolveAsName(tls, pParse, (*Select)(unsafe.Pointer(pSelect)).FpEList, pE2)
if *(*int32)(unsafe.Pointer(bp /* iCol */)) > 0 {
// If an AS-name match is found, mark this ORDER BY column as being
@@ -78624,7 +80681,7 @@ __3:
}
// Resolve names in the SELECT statement p and all of its descendants.
-func resolveSelectStep(tls *libc.TLS, pWalker uintptr, p uintptr) int32 { /* sqlite3.c:100204:12: */
+func resolveSelectStep(tls *libc.TLS, pWalker uintptr, p uintptr) int32 { /* sqlite3.c:100777:12: */
bp := tls.Alloc(56)
defer tls.Free(56)
@@ -78666,6 +80723,7 @@ func resolveSelectStep(tls *libc.TLS, pWalker uintptr, p uintptr) int32 { /* sql
pLeftmost = p
for p != 0 {
+ // SF_Resolved not set if errors suppressed
*(*U32)(unsafe.Pointer(p + 4 /* &.selFlags */)) |= (U32(SF_Resolved))
// Resolve the expressions in the LIMIT and OFFSET clauses. These
@@ -78719,7 +80777,7 @@ func resolveSelectStep(tls *libc.TLS, pWalker uintptr, p uintptr) int32 { /* sql
// context containing the column when it resolves a name.
if pOuterNC != 0 {
- libc.SetBitFieldPtr8Uint32(pItem+60 /* &.fg */ +4 /* &.isCorrelated */, (uint32(libc.Bool32((*NameContext)(unsafe.Pointer(pOuterNC)).FnRef > nRef))), 3, 0x8)
+ libc.SetBitFieldPtr16Uint32(pItem+60 /* &.fg */ +4 /* &.isCorrelated */, (uint32(libc.Bool32((*NameContext)(unsafe.Pointer(pOuterNC)).FnRef > nRef))), 12, 0x1000)
}
}
}
@@ -78747,12 +80805,6 @@ func resolveSelectStep(tls *libc.TLS, pWalker uintptr, p uintptr) int32 { /* sql
*(*int32)(unsafe.Pointer(bp /* &sNC */ + 40 /* &.ncFlags */)) &= (libc.CplInt32(NC_AllowAgg))
}
- // If a HAVING clause is present, then there must be a GROUP BY clause.
- if ((*Select)(unsafe.Pointer(p)).FpHaving != 0) && !(pGroupBy != 0) {
- Xsqlite3ErrorMsg(tls, pParse, ts+6218 /* "a GROUP BY claus..." */, 0)
- return WRC_Abort
- }
-
// Add the output column list to the name-context before parsing the
// other expressions in the SELECT statement. This is so that
// expressions in the WHERE clause (etc.) can refer to expressions by
@@ -78763,8 +80815,14 @@ func resolveSelectStep(tls *libc.TLS, pWalker uintptr, p uintptr) int32 { /* sql
*(*uintptr)(unsafe.Pointer(bp /* &sNC */ + 16 /* &.uNC */)) = (*Select)(unsafe.Pointer(p)).FpEList
*(*int32)(unsafe.Pointer(bp /* &sNC */ + 40 /* &.ncFlags */)) |= (NC_UEList)
- if Xsqlite3ResolveExprNames(tls, bp /* &sNC */, (*Select)(unsafe.Pointer(p)).FpHaving) != 0 {
- return WRC_Abort
+ if (*Select)(unsafe.Pointer(p)).FpHaving != 0 {
+ if !(pGroupBy != 0) {
+ Xsqlite3ErrorMsg(tls, pParse, ts+6349 /* "a GROUP BY claus..." */, 0)
+ return WRC_Abort
+ }
+ if Xsqlite3ResolveExprNames(tls, bp /* &sNC */, (*Select)(unsafe.Pointer(p)).FpHaving) != 0 {
+ return WRC_Abort
+ }
}
if Xsqlite3ResolveExprNames(tls, bp /* &sNC */, (*Select)(unsafe.Pointer(p)).FpWhere) != 0 {
return WRC_Abort
@@ -78773,12 +80831,22 @@ func resolveSelectStep(tls *libc.TLS, pWalker uintptr, p uintptr) int32 { /* sql
// Resolve names in table-valued-function arguments
for i = 0; i < (*SrcList)(unsafe.Pointer((*Select)(unsafe.Pointer(p)).FpSrc)).FnSrc; i++ {
var pItem uintptr = (((*Select)(unsafe.Pointer(p)).FpSrc + 8 /* &.a */) + uintptr(i)*112)
- if ((uint32(int32(*(*uint8)(unsafe.Pointer((pItem + 60 /* &.fg */) + 4 /* &.isTabFunc */)) >> 5 & 0x1))) != 0) &&
+ if ((uint32(int32(*(*uint16)(unsafe.Pointer((pItem + 60 /* &.fg */) + 4 /* &.isTabFunc */)) & 0x2000 >> 13))) != 0) &&
(Xsqlite3ResolveExprListNames(tls, bp /* &sNC */, *(*uintptr)(unsafe.Pointer(pItem + 96 /* &.u1 */))) != 0) {
return WRC_Abort
}
}
+ if int32((*Parse)(unsafe.Pointer(pParse)).FeParseMode) >= PARSE_MODE_RENAME {
+ var pWin uintptr
+ for pWin = (*Select)(unsafe.Pointer(p)).FpWinDefn; pWin != 0; pWin = (*Window)(unsafe.Pointer(pWin)).FpNextWin {
+ if (Xsqlite3ResolveExprListNames(tls, bp /* &sNC */, (*Window)(unsafe.Pointer(pWin)).FpOrderBy) != 0) ||
+ (Xsqlite3ResolveExprListNames(tls, bp /* &sNC */, (*Window)(unsafe.Pointer(pWin)).FpPartition) != 0) {
+ return WRC_Abort
+ }
+ }
+ }
+
// The ORDER BY and GROUP BY clauses may not refer to terms in
// outer queries
(*NameContext)(unsafe.Pointer(bp /* &sNC */)).FpNext = uintptr(0)
@@ -78804,8 +80872,9 @@ func resolveSelectStep(tls *libc.TLS, pWalker uintptr, p uintptr) int32 { /* sql
// than the right-most term, then that is a syntax error. But the error
// 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 (isCompound <= nCompound) && // Defer right-most ORDER BY of a compound
- (resolveOrderGroupBy(tls, bp /* &sNC */, p, (*Select)(unsafe.Pointer(p)).FpOrderBy, ts+6120 /* "ORDER" */) != 0) {
+ if (((*Select)(unsafe.Pointer(p)).FpOrderBy != uintptr(0)) &&
+ (isCompound <= nCompound)) && // Defer right-most ORDER BY of a compound
+ (resolveOrderGroupBy(tls, bp /* &sNC */, p, (*Select)(unsafe.Pointer(p)).FpOrderBy, ts+6251 /* "ORDER" */) != 0) {
return WRC_Abort
}
if (*Sqlite3)(unsafe.Pointer(db)).FmallocFailed != 0 {
@@ -78818,7 +80887,7 @@ func resolveSelectStep(tls *libc.TLS, pWalker uintptr, p uintptr) int32 { /* sql
if pGroupBy != 0 {
var pItem uintptr
- if (resolveOrderGroupBy(tls, bp /* &sNC */, p, pGroupBy, ts+6262 /* "GROUP" */) != 0) || ((*Sqlite3)(unsafe.Pointer(db)).FmallocFailed != 0) {
+ if (resolveOrderGroupBy(tls, bp /* &sNC */, p, pGroupBy, ts+6393 /* "GROUP" */) != 0) || ((*Sqlite3)(unsafe.Pointer(db)).FmallocFailed != 0) {
return WRC_Abort
}
i = 0
@@ -78830,7 +80899,7 @@ func resolveSelectStep(tls *libc.TLS, pWalker uintptr, p uintptr) int32 { /* sql
{
if ((*Expr)(unsafe.Pointer(((*ExprList_item)(unsafe.Pointer(pItem)).FpExpr))).Fflags & (U32(EP_Agg))) != U32(0) {
Xsqlite3ErrorMsg(tls, pParse,
- ts+6268 /* "aggregate functi..." */, 0)
+ ts+6399 /* "aggregate functi..." */, 0)
return WRC_Abort
}
@@ -78844,16 +80913,6 @@ func resolveSelectStep(tls *libc.TLS, pWalker uintptr, p uintptr) int32 { /* sql
__3:
}
- if int32((*Parse)(unsafe.Pointer(pParse)).FeParseMode) >= PARSE_MODE_RENAME {
- var pWin uintptr
- for pWin = (*Select)(unsafe.Pointer(p)).FpWinDefn; pWin != 0; pWin = (*Window)(unsafe.Pointer(pWin)).FpNextWin {
- if (Xsqlite3ResolveExprListNames(tls, bp /* &sNC */, (*Window)(unsafe.Pointer(pWin)).FpOrderBy) != 0) ||
- (Xsqlite3ResolveExprListNames(tls, bp /* &sNC */, (*Window)(unsafe.Pointer(pWin)).FpPartition) != 0) {
- return WRC_Abort
- }
- }
- }
-
// If this is part of a compound SELECT, check that it has the right
// number of expressions in the select list.
if ((*Select)(unsafe.Pointer(p)).FpNext != 0) && ((*ExprList)(unsafe.Pointer((*Select)(unsafe.Pointer(p)).FpEList)).FnExpr != (*ExprList)(unsafe.Pointer((*Select)(unsafe.Pointer((*Select)(unsafe.Pointer(p)).FpNext)).FpEList)).FnExpr) {
@@ -78921,7 +80980,7 @@ func resolveSelectStep(tls *libc.TLS, pWalker uintptr, p uintptr) int32 { /* sql
//
// An error message is left in pParse if anything is amiss. The number
// if errors is returned.
-func Xsqlite3ResolveExprNames(tls *libc.TLS, pNC uintptr, pExpr uintptr) int32 { /* sqlite3.c:100488:20: */
+func Xsqlite3ResolveExprNames(tls *libc.TLS, pNC uintptr, pExpr uintptr) int32 { /* sqlite3.c:101063:20: */
bp := tls.Alloc(48)
defer tls.Free(48)
@@ -78937,9 +80996,14 @@ func Xsqlite3ResolveExprNames(tls *libc.TLS, pNC uintptr, pExpr uintptr) int32 {
(*Walker)(unsafe.Pointer(bp /* &w */)).FxExprCallback = *(*uintptr)(unsafe.Pointer(&struct {
f func(*libc.TLS, uintptr, uintptr) int32
}{resolveExprStep}))
- (*Walker)(unsafe.Pointer(bp /* &w */)).FxSelectCallback = *(*uintptr)(unsafe.Pointer(&struct {
- f func(*libc.TLS, uintptr, uintptr) int32
- }{resolveSelectStep}))
+ (*Walker)(unsafe.Pointer(bp /* &w */)).FxSelectCallback = func() uintptr {
+ if ((*NameContext)(unsafe.Pointer(pNC)).FncFlags & NC_NoSelect) != 0 {
+ return uintptr(0)
+ }
+ return *(*uintptr)(unsafe.Pointer(&struct {
+ f func(*libc.TLS, uintptr, uintptr) int32
+ }{resolveSelectStep}))
+ }()
(*Walker)(unsafe.Pointer(bp /* &w */)).FxSelectCallback2 = uintptr(0)
*(*uintptr)(unsafe.Pointer(bp /* &w */ + 40 /* &.u */)) = pNC
*(*int32)(unsafe.Pointer((*Walker)(unsafe.Pointer(bp /* &w */)).FpParse + 284 /* &.nHeight */)) += ((*Expr)(unsafe.Pointer(pExpr)).FnHeight)
@@ -78951,13 +81015,13 @@ func Xsqlite3ResolveExprNames(tls *libc.TLS, pNC uintptr, pExpr uintptr) int32 {
*(*U32)(unsafe.Pointer(pExpr + 4 /* &.flags */)) |= (U32((*NameContext)(unsafe.Pointer(pNC)).FncFlags & (NC_HasAgg | NC_HasWin)))
*(*int32)(unsafe.Pointer(pNC + 40 /* &.ncFlags */)) |= (savedHasAgg)
- return (libc.Bool32(((*NameContext)(unsafe.Pointer(pNC)).FnErr > 0) || ((*Parse)(unsafe.Pointer((*Walker)(unsafe.Pointer(bp /* &w */)).FpParse)).FnErr > 0)))
+ return (libc.Bool32(((*NameContext)(unsafe.Pointer(pNC)).FnNcErr > 0) || ((*Parse)(unsafe.Pointer((*Walker)(unsafe.Pointer(bp /* &w */)).FpParse)).FnErr > 0)))
}
// Resolve all names for all expression in an expression list. This is
// just like sqlite3ResolveExprNames() except that it works for an expression
// list rather than a single expression.
-func Xsqlite3ResolveExprListNames(tls *libc.TLS, pNC uintptr, pList uintptr) int32 { /* sqlite3.c:100527:20: */
+func Xsqlite3ResolveExprListNames(tls *libc.TLS, pNC uintptr, pList uintptr) int32 { /* sqlite3.c:101102:20: */
bp := tls.Alloc(48)
defer tls.Free(48)
@@ -78996,7 +81060,7 @@ func Xsqlite3ResolveExprListNames(tls *libc.TLS, pNC uintptr, pList uintptr) int
savedHasAgg = savedHasAgg | ((*NameContext)(unsafe.Pointer(pNC)).FncFlags & ((NC_HasAgg | NC_MinMaxAgg) | NC_HasWin))
*(*int32)(unsafe.Pointer(pNC + 40 /* &.ncFlags */)) &= (libc.CplInt32(((NC_HasAgg | NC_MinMaxAgg) | NC_HasWin)))
}
- if ((*NameContext)(unsafe.Pointer(pNC)).FnErr > 0) || ((*Parse)(unsafe.Pointer((*Walker)(unsafe.Pointer(bp /* &w */)).FpParse)).FnErr > 0) {
+ if (*Parse)(unsafe.Pointer((*Walker)(unsafe.Pointer(bp /* &w */)).FpParse)).FnErr > 0 {
return WRC_Abort
}
}
@@ -79014,7 +81078,7 @@ func Xsqlite3ResolveExprListNames(tls *libc.TLS, pNC uintptr, pList uintptr) int
//
// All SELECT statements should have been expanded using
// sqlite3SelectExpand() prior to invoking this routine.
-func Xsqlite3ResolveSelectNames(tls *libc.TLS, pParse uintptr, p uintptr, pOuterNC uintptr) { /* sqlite3.c:100582:21: */
+func Xsqlite3ResolveSelectNames(tls *libc.TLS, pParse uintptr, p uintptr, pOuterNC uintptr) { /* sqlite3.c:101157:21: */
bp := tls.Alloc(48)
defer tls.Free(48)
@@ -79048,7 +81112,7 @@ func Xsqlite3ResolveSelectNames(tls *libc.TLS, pParse uintptr, p uintptr, pOuter
// set to the column number. In case (4), TK_COLUMN nodes cause an error.
//
// Any errors cause an error message to be set in pParse.
-func Xsqlite3ResolveSelfReference(tls *libc.TLS, pParse uintptr, pTab uintptr, type1 int32, pExpr uintptr, pList uintptr) int32 { /* sqlite3.c:100616:20: */
+func Xsqlite3ResolveSelfReference(tls *libc.TLS, pParse uintptr, pTab uintptr, type1 int32, pExpr uintptr, pList uintptr) int32 { /* sqlite3.c:101191:20: */
bp := tls.Alloc(176)
defer tls.Free(176)
@@ -79084,12 +81148,12 @@ func Xsqlite3ResolveSelfReference(tls *libc.TLS, pParse uintptr, pTab uintptr, t
}
// Return the affinity character for a single column of a table.
-func Xsqlite3TableColumnAffinity(tls *libc.TLS, pTab uintptr, iCol int32) int8 { /* sqlite3.c:100676:21: */
+func Xsqlite3TableColumnAffinity(tls *libc.TLS, pTab uintptr, iCol int32) uint8 { /* sqlite3.c:101251:21: */
if iCol >= 0 {
return (*Column)(unsafe.Pointer((*Table)(unsafe.Pointer(pTab)).FaCol + uintptr(iCol)*32)).Faffinity
}
- return int8(SQLITE_AFF_INTEGER)
+ return uint8(SQLITE_AFF_INTEGER)
}
// Return the 'affinity' of the expression pExpr if any.
@@ -79106,7 +81170,7 @@ func Xsqlite3TableColumnAffinity(tls *libc.TLS, pTab uintptr, iCol int32) int8 {
// SELECT * FROM t1 WHERE a;
// SELECT a AS b FROM t1 WHERE b;
// SELECT * FROM t1 WHERE (select a from t1);
-func Xsqlite3ExprAffinity(tls *libc.TLS, pExpr uintptr) int8 { /* sqlite3.c:100697:21: */
+func Xsqlite3ExprAffinity(tls *libc.TLS, pExpr uintptr) uint8 { /* sqlite3.c:101272:21: */
var op int32
for ((*Expr)(unsafe.Pointer((pExpr))).Fflags & (U32(EP_Skip | EP_IfNullRow))) != U32(0) {
@@ -79114,20 +81178,20 @@ func Xsqlite3ExprAffinity(tls *libc.TLS, pExpr uintptr) int8 { /* sqlite3.c:1006
}
op = int32((*Expr)(unsafe.Pointer(pExpr)).Fop)
+ if op == TK_REGISTER {
+ op = int32((*Expr)(unsafe.Pointer(pExpr)).Fop2)
+ }
+ if ((op == TK_COLUMN) || (op == TK_AGG_COLUMN)) && (*(*uintptr)(unsafe.Pointer(pExpr + 64 /* &.y */)) != 0) {
+ return Xsqlite3TableColumnAffinity(tls, *(*uintptr)(unsafe.Pointer(pExpr + 64 /* &.y */)), int32((*Expr)(unsafe.Pointer(pExpr)).FiColumn))
+ }
if op == TK_SELECT {
return Xsqlite3ExprAffinity(tls, (*ExprList_item)(unsafe.Pointer(((*Select)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(pExpr + 32 /* &.x */)))).FpEList + 8 /* &.a */))).FpExpr)
}
- if op == TK_REGISTER {
- op = int32((*Expr)(unsafe.Pointer(pExpr)).Fop2)
- }
if op == TK_CAST {
return Xsqlite3AffinityType(tls, *(*uintptr)(unsafe.Pointer(pExpr + 8 /* &.u */)), uintptr(0))
}
- if ((op == TK_AGG_COLUMN) || (op == TK_COLUMN)) && (*(*uintptr)(unsafe.Pointer(pExpr + 64 /* &.y */)) != 0) {
- return Xsqlite3TableColumnAffinity(tls, *(*uintptr)(unsafe.Pointer(pExpr + 64 /* &.y */)), int32((*Expr)(unsafe.Pointer(pExpr)).FiColumn))
- }
if op == TK_SELECT_COLUMN {
return Xsqlite3ExprAffinity(tls,
@@ -79145,21 +81209,8 @@ func Xsqlite3ExprAffinity(tls *libc.TLS, pExpr uintptr) int8 { /* sqlite3.c:1006
//
// If a memory allocation error occurs, that fact is recorded in pParse->db
// and the pExpr parameter is returned unchanged.
-func Xsqlite3ExprAddCollateToken(tls *libc.TLS, pParse uintptr, pExpr uintptr, pCollName uintptr, dequote int32) uintptr { /* sqlite3.c:100744:21: */
-
- if pExpr == uintptr(0) {
- return uintptr(0)
- }
- if int32((*Expr)(unsafe.Pointer(pExpr)).Fop) == TK_VECTOR {
- var pList uintptr = *(*uintptr)(unsafe.Pointer(pExpr + 32 /* &.x */))
- if pList != uintptr(0) {
- var i int32
- for i = 0; i < (*ExprList)(unsafe.Pointer(pList)).FnExpr; i++ {
- (*ExprList_item)(unsafe.Pointer((pList + 8 /* &.a */) + uintptr(i)*32)).FpExpr = Xsqlite3ExprAddCollateToken(tls, pParse, (*ExprList_item)(unsafe.Pointer((pList+8 /* &.a */)+uintptr(i)*32)).FpExpr,
- pCollName, dequote)
- }
- }
- } else if (*Token)(unsafe.Pointer(pCollName)).Fn > uint32(0) {
+func Xsqlite3ExprAddCollateToken(tls *libc.TLS, pParse uintptr, pExpr uintptr, pCollName uintptr, dequote int32) uintptr { /* sqlite3.c:101319:21: */
+ if (*Token)(unsafe.Pointer(pCollName)).Fn > uint32(0) {
var pNew uintptr = Xsqlite3ExprAlloc(tls, (*Parse)(unsafe.Pointer(pParse)).Fdb, TK_COLLATE, pCollName, dequote)
if pNew != 0 {
(*Expr)(unsafe.Pointer(pNew)).FpLeft = pExpr
@@ -79170,7 +81221,7 @@ func Xsqlite3ExprAddCollateToken(tls *libc.TLS, pParse uintptr, pExpr uintptr, p
return pExpr
}
-func Xsqlite3ExprAddCollateString(tls *libc.TLS, pParse uintptr, pExpr uintptr, zC uintptr) uintptr { /* sqlite3.c:100771:21: */
+func Xsqlite3ExprAddCollateString(tls *libc.TLS, pParse uintptr, pExpr uintptr, zC uintptr) uintptr { /* sqlite3.c:101335:21: */
bp := tls.Alloc(16)
defer tls.Free(16)
@@ -79181,7 +81232,7 @@ func Xsqlite3ExprAddCollateString(tls *libc.TLS, pParse uintptr, pExpr uintptr,
}
// Skip over any TK_COLLATE operators.
-func Xsqlite3ExprSkipCollate(tls *libc.TLS, pExpr uintptr) uintptr { /* sqlite3.c:100781:21: */
+func Xsqlite3ExprSkipCollate(tls *libc.TLS, pExpr uintptr) uintptr { /* sqlite3.c:101345:21: */
for (pExpr != 0) && (((*Expr)(unsafe.Pointer((pExpr))).Fflags & (U32(EP_Skip))) != U32(0)) {
pExpr = (*Expr)(unsafe.Pointer(pExpr)).FpLeft
@@ -79192,7 +81243,7 @@ func Xsqlite3ExprSkipCollate(tls *libc.TLS, pExpr uintptr) uintptr { /* sqlite3.
// Skip over any TK_COLLATE operators and/or any unlikely()
// or likelihood() or likely() functions at the root of an
// expression.
-func Xsqlite3ExprSkipCollateAndLikely(tls *libc.TLS, pExpr uintptr) uintptr { /* sqlite3.c:100794:21: */
+func Xsqlite3ExprSkipCollateAndLikely(tls *libc.TLS, pExpr uintptr) uintptr { /* sqlite3.c:101358:21: */
for (pExpr != 0) && (((*Expr)(unsafe.Pointer((pExpr))).Fflags & (U32(EP_Skip | EP_Unlikely))) != U32(0)) {
if ((*Expr)(unsafe.Pointer((pExpr))).Fflags & (U32(EP_Unlikely))) != U32(0) {
@@ -79217,7 +81268,7 @@ func Xsqlite3ExprSkipCollateAndLikely(tls *libc.TLS, pExpr uintptr) uintptr { /*
// or by the presence of a column with a defined collating sequence.
// COLLATE operators take first precedence. Left operands take
// precedence over right operands.
-func Xsqlite3ExprCollSeq(tls *libc.TLS, pParse uintptr, pExpr uintptr) uintptr { /* sqlite3.c:100823:24: */
+func Xsqlite3ExprCollSeq(tls *libc.TLS, pParse uintptr, pExpr uintptr) uintptr { /* sqlite3.c:101387:24: */
var db uintptr = (*Parse)(unsafe.Pointer(pParse)).Fdb
var pColl uintptr = uintptr(0)
var p uintptr = pExpr
@@ -79287,7 +81338,7 @@ func Xsqlite3ExprCollSeq(tls *libc.TLS, pParse uintptr, pExpr uintptr) uintptr {
//
// The sqlite3ExprCollSeq() routine works the same except that it
// returns NULL if there is no defined collation.
-func Xsqlite3ExprNNCollSeq(tls *libc.TLS, pParse uintptr, pExpr uintptr) uintptr { /* sqlite3.c:100895:24: */
+func Xsqlite3ExprNNCollSeq(tls *libc.TLS, pParse uintptr, pExpr uintptr) uintptr { /* sqlite3.c:101459:24: */
var p uintptr = Xsqlite3ExprCollSeq(tls, pParse, pExpr)
if p == uintptr(0) {
p = (*Sqlite3)(unsafe.Pointer((*Parse)(unsafe.Pointer(pParse)).Fdb)).FpDfltColl
@@ -79297,7 +81348,7 @@ func Xsqlite3ExprNNCollSeq(tls *libc.TLS, pParse uintptr, pExpr uintptr) uintptr
}
// Return TRUE if the two expressions have equivalent collating sequences.
-func Xsqlite3ExprCollSeqMatch(tls *libc.TLS, pParse uintptr, pE1 uintptr, pE2 uintptr) int32 { /* sqlite3.c:100905:20: */
+func Xsqlite3ExprCollSeqMatch(tls *libc.TLS, pParse uintptr, pE1 uintptr, pE2 uintptr) int32 { /* sqlite3.c:101469:20: */
var pColl1 uintptr = Xsqlite3ExprNNCollSeq(tls, pParse, pE1)
var pColl2 uintptr = Xsqlite3ExprNNCollSeq(tls, pParse, pE2)
return (libc.Bool32(Xsqlite3StrICmp(tls, (*CollSeq)(unsafe.Pointer(pColl1)).FzName, (*CollSeq)(unsafe.Pointer(pColl2)).FzName) == 0))
@@ -79306,33 +81357,33 @@ func Xsqlite3ExprCollSeqMatch(tls *libc.TLS, pParse uintptr, pE1 uintptr, pE2 ui
// pExpr is an operand of a comparison operator. aff2 is the
// type affinity of the other operand. This routine returns the
// type affinity that should be used for the comparison operator.
-func Xsqlite3CompareAffinity(tls *libc.TLS, pExpr uintptr, aff2 int8) int8 { /* sqlite3.c:100916:21: */
- var aff1 int8 = Xsqlite3ExprAffinity(tls, pExpr)
+func Xsqlite3CompareAffinity(tls *libc.TLS, pExpr uintptr, aff2 uint8) uint8 { /* sqlite3.c:101480:21: */
+ var aff1 uint8 = Xsqlite3ExprAffinity(tls, pExpr)
if (int32(aff1) > SQLITE_AFF_NONE) && (int32(aff2) > SQLITE_AFF_NONE) {
// Both sides of the comparison are columns. If one has numeric
// affinity, use that. Otherwise use no affinity.
if ((int32(aff1)) >= SQLITE_AFF_NUMERIC) || ((int32(aff2)) >= SQLITE_AFF_NUMERIC) {
- return int8(SQLITE_AFF_NUMERIC)
+ return uint8(SQLITE_AFF_NUMERIC)
} else {
- return int8(SQLITE_AFF_BLOB)
+ return uint8(SQLITE_AFF_BLOB)
}
} else {
// One side is a column, the other is not. Use the columns affinity.
- return (int8((func() int32 {
+ return (uint8((func() int32 {
if int32(aff1) <= SQLITE_AFF_NONE {
return int32(aff2)
}
return int32(aff1)
}()) | SQLITE_AFF_NONE))
}
- return int8(0)
+ return uint8(0)
}
// pExpr is a comparison operator. Return the type affinity that should
// be applied to both operands prior to doing the comparison.
-func comparisonAffinity(tls *libc.TLS, pExpr uintptr) int8 { /* sqlite3.c:100938:13: */
- var aff int8
+func comparisonAffinity(tls *libc.TLS, pExpr uintptr) uint8 { /* sqlite3.c:101502:13: */
+ var aff uint8
aff = Xsqlite3ExprAffinity(tls, (*Expr)(unsafe.Pointer(pExpr)).FpLeft)
if (*Expr)(unsafe.Pointer(pExpr)).FpRight != 0 {
@@ -79340,7 +81391,7 @@ func comparisonAffinity(tls *libc.TLS, pExpr uintptr) int8 { /* sqlite3.c:100938
} else if ((*Expr)(unsafe.Pointer((pExpr))).Fflags & (U32(EP_xIsSelect))) != U32(0) {
aff = Xsqlite3CompareAffinity(tls, (*ExprList_item)(unsafe.Pointer(((*Select)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(pExpr + 32 /* &.x */)))).FpEList + 8 /* &.a */))).FpExpr, aff)
} else if int32(aff) == 0 {
- aff = int8(SQLITE_AFF_BLOB)
+ aff = uint8(SQLITE_AFF_BLOB)
}
return aff
}
@@ -79349,8 +81400,8 @@ func comparisonAffinity(tls *libc.TLS, pExpr uintptr) int8 { /* sqlite3.c:100938
// idx_affinity is the affinity of an indexed column. Return true
// if the index with affinity idx_affinity may be used to implement
// the comparison in pExpr.
-func Xsqlite3IndexAffinityOk(tls *libc.TLS, pExpr uintptr, idx_affinity int8) int32 { /* sqlite3.c:100961:20: */
- var aff int8 = comparisonAffinity(tls, pExpr)
+func Xsqlite3IndexAffinityOk(tls *libc.TLS, pExpr uintptr, idx_affinity uint8) int32 { /* sqlite3.c:101525:20: */
+ var aff uint8 = comparisonAffinity(tls, pExpr)
if int32(aff) < SQLITE_AFF_TEXT {
return 1
}
@@ -79362,9 +81413,9 @@ func Xsqlite3IndexAffinityOk(tls *libc.TLS, pExpr uintptr, idx_affinity int8) in
// Return the P5 value that should be used for a binary comparison
// opcode (OP_Eq, OP_Ge etc.) used to compare pExpr1 and pExpr2.
-func binaryCompareP5(tls *libc.TLS, pExpr1 uintptr, pExpr2 uintptr, jumpIfNull int32) U8 { /* sqlite3.c:100976:11: */
+func binaryCompareP5(tls *libc.TLS, pExpr1 uintptr, pExpr2 uintptr, jumpIfNull int32) U8 { /* sqlite3.c:101540:11: */
var aff U8 = U8(Xsqlite3ExprAffinity(tls, pExpr2))
- aff = (U8(int32(U8(Xsqlite3CompareAffinity(tls, pExpr1, int8(aff)))) | int32(U8(jumpIfNull))))
+ aff = (U8(int32(U8(Xsqlite3CompareAffinity(tls, pExpr1, uint8(aff)))) | int32(U8(jumpIfNull))))
return aff
}
@@ -79378,7 +81429,7 @@ func binaryCompareP5(tls *libc.TLS, pExpr1 uintptr, pExpr2 uintptr, jumpIfNull i
//
// Argument pRight (but not pLeft) may be a null pointer. In this case,
// it is not considered.
-func Xsqlite3BinaryCompareCollSeq(tls *libc.TLS, pParse uintptr, pLeft uintptr, pRight uintptr) uintptr { /* sqlite3.c:100998:24: */
+func Xsqlite3BinaryCompareCollSeq(tls *libc.TLS, pParse uintptr, pLeft uintptr, pRight uintptr) uintptr { /* sqlite3.c:101562:24: */
var pColl uintptr
if ((*Expr)(unsafe.Pointer(pLeft)).Fflags & U32(EP_Collate)) != 0 {
@@ -79401,7 +81452,7 @@ func Xsqlite3BinaryCompareCollSeq(tls *libc.TLS, pParse uintptr, pLeft uintptr,
// However, if the OP_Commuted flag is set, then the order of the operands
// is reversed in the sqlite3BinaryCompareCollSeq() call so that the
// correct collating sequence is found.
-func Xsqlite3ExprCompareCollSeq(tls *libc.TLS, pParse uintptr, p uintptr) uintptr { /* sqlite3.c:101026:24: */
+func Xsqlite3ExprCompareCollSeq(tls *libc.TLS, pParse uintptr, p uintptr) uintptr { /* sqlite3.c:101590:24: */
if ((*Expr)(unsafe.Pointer((p))).Fflags & (U32(EP_Commuted))) != U32(0) {
return Xsqlite3BinaryCompareCollSeq(tls, pParse, (*Expr)(unsafe.Pointer(p)).FpRight, (*Expr)(unsafe.Pointer(p)).FpLeft)
} else {
@@ -79411,7 +81462,7 @@ func Xsqlite3ExprCompareCollSeq(tls *libc.TLS, pParse uintptr, p uintptr) uintpt
}
// Generate code for a comparison operator.
-func codeCompare(tls *libc.TLS, pParse uintptr, pLeft uintptr, pRight uintptr, opcode int32, in1 int32, in2 int32, dest int32, jumpIfNull int32, isCommuted int32) int32 { /* sqlite3.c:101037:12: */
+func codeCompare(tls *libc.TLS, pParse uintptr, pLeft uintptr, pRight uintptr, opcode int32, in1 int32, in2 int32, dest int32, jumpIfNull int32, isCommuted int32) int32 { /* sqlite3.c:101601:12: */
var p5 int32
var addr int32
var p4 uintptr
@@ -79438,7 +81489,7 @@ func codeCompare(tls *libc.TLS, pParse uintptr, pLeft uintptr, pRight uintptr, o
// parser will not generate a TK_VECTOR with fewer than two entries.
// But a TK_SELECT might be either a vector or a scalar. It is only
// considered a vector if it has two or more result columns.
-func Xsqlite3ExprIsVector(tls *libc.TLS, pExpr uintptr) int32 { /* sqlite3.c:101073:20: */
+func Xsqlite3ExprIsVector(tls *libc.TLS, pExpr uintptr) int32 { /* sqlite3.c:101637:20: */
return (libc.Bool32(Xsqlite3ExprVectorSize(tls, pExpr) > 1))
}
@@ -79446,7 +81497,7 @@ func Xsqlite3ExprIsVector(tls *libc.TLS, pExpr uintptr) int32 { /* sqlite3.c:101
// return the number of expressions in the vector. Or, if the expression
// is a sub-select, return the number of columns in the sub-select. For
// any other type of expression, return 1.
-func Xsqlite3ExprVectorSize(tls *libc.TLS, pExpr uintptr) int32 { /* sqlite3.c:101083:20: */
+func Xsqlite3ExprVectorSize(tls *libc.TLS, pExpr uintptr) int32 { /* sqlite3.c:101647:20: */
var op U8 = (*Expr)(unsafe.Pointer(pExpr)).Fop
if int32(op) == TK_REGISTER {
op = (*Expr)(unsafe.Pointer(pExpr)).Fop2
@@ -79474,7 +81525,7 @@ func Xsqlite3ExprVectorSize(tls *libc.TLS, pExpr uintptr) int32 { /* sqlite3.c:1
// just the expression for the i-th term of the result set, and may
// not be ready for evaluation because the table cursor has not yet
// been positioned.
-func Xsqlite3VectorFieldSubexpr(tls *libc.TLS, pVector uintptr, i int32) uintptr { /* sqlite3.c:101110:21: */
+func Xsqlite3VectorFieldSubexpr(tls *libc.TLS, pVector uintptr, i int32) uintptr { /* sqlite3.c:101674:21: */
if Xsqlite3ExprIsVector(tls, pVector) != 0 {
@@ -79506,7 +81557,7 @@ func Xsqlite3VectorFieldSubexpr(tls *libc.TLS, pVector uintptr, i int32) uintptr
// A trick to cause a TK_SELECT pVector to be deleted together with
// the returned Expr object is to attach the pVector to the pRight field
// of the returned TK_SELECT_COLUMN Expr object.
-func Xsqlite3ExprForVectorField(tls *libc.TLS, pParse uintptr, pVector uintptr, iField int32) uintptr { /* sqlite3.c:101144:21: */
+func Xsqlite3ExprForVectorField(tls *libc.TLS, pParse uintptr, pVector uintptr, iField int32) uintptr { /* sqlite3.c:101708:21: */
var pRet uintptr
if int32((*Expr)(unsafe.Pointer(pVector)).Fop) == TK_SELECT {
@@ -79547,7 +81598,7 @@ func Xsqlite3ExprForVectorField(tls *libc.TLS, pParse uintptr, pVector uintptr,
// of registers in which the result is stored).
//
// If pExpr is not a TK_SELECT expression, return 0.
-func exprCodeSubselect(tls *libc.TLS, pParse uintptr, pExpr uintptr) int32 { /* sqlite3.c:101190:12: */
+func exprCodeSubselect(tls *libc.TLS, pParse uintptr, pExpr uintptr) int32 { /* sqlite3.c:101754:12: */
var reg int32 = 0
if int32((*Expr)(unsafe.Pointer(pExpr)).Fop) == TK_SELECT {
reg = Xsqlite3CodeSubselect(tls, pParse, pExpr)
@@ -79571,7 +81622,7 @@ func exprCodeSubselect(tls *libc.TLS, pParse uintptr, pExpr uintptr) int32 { /*
//
// Before returning, output parameter (*ppExpr) is set to point to the
// Expr object corresponding to element iElem of the vector.
-func exprVectorRegister(tls *libc.TLS, pParse uintptr, pVector uintptr, iField int32, regSelect int32, ppExpr uintptr, pRegFree uintptr) int32 { /* sqlite3.c:101218:12: */
+func exprVectorRegister(tls *libc.TLS, pParse uintptr, pVector uintptr, iField int32, regSelect int32, ppExpr uintptr, pRegFree uintptr) int32 { /* sqlite3.c:101782:12: */
var op U8 = (*Expr)(unsafe.Pointer(pVector)).Fop
if int32(op) == TK_REGISTER {
@@ -79582,8 +81633,11 @@ func exprVectorRegister(tls *libc.TLS, pParse uintptr, pVector uintptr, iField i
*(*uintptr)(unsafe.Pointer(ppExpr)) = (*ExprList_item)(unsafe.Pointer(((*Select)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(pVector + 32 /* &.x */)))).FpEList + 8 /* &.a */) + uintptr(iField)*32)).FpExpr
return (regSelect + iField)
}
- *(*uintptr)(unsafe.Pointer(ppExpr)) = (*ExprList_item)(unsafe.Pointer((*(*uintptr)(unsafe.Pointer(pVector + 32 /* &.x */)) + 8 /* &.a */) + uintptr(iField)*32)).FpExpr
- return Xsqlite3ExprCodeTemp(tls, pParse, *(*uintptr)(unsafe.Pointer(ppExpr)), pRegFree)
+ if int32(op) == TK_VECTOR {
+ *(*uintptr)(unsafe.Pointer(ppExpr)) = (*ExprList_item)(unsafe.Pointer((*(*uintptr)(unsafe.Pointer(pVector + 32 /* &.x */)) + 8 /* &.a */) + uintptr(iField)*32)).FpExpr
+ return Xsqlite3ExprCodeTemp(tls, pParse, *(*uintptr)(unsafe.Pointer(ppExpr)), pRegFree)
+ }
+ return 0
}
// Expression pExpr is a comparison between two vector values. Compute
@@ -79595,7 +81649,7 @@ func exprVectorRegister(tls *libc.TLS, pParse uintptr, pVector uintptr, iField i
// if pExpr->op==TK_IS: op==TK_EQ and p5==SQLITE_NULLEQ
// if pExpr->op==TK_ISNOT: op==TK_NE and p5==SQLITE_NULLEQ
// otherwise: op==pExpr->op and p5==0
-func codeVectorCompare(tls *libc.TLS, pParse uintptr, pExpr uintptr, dest int32, op U8, p5 U8) { /* sqlite3.c:101251:13: */
+func codeVectorCompare(tls *libc.TLS, pParse uintptr, pExpr uintptr, dest int32, op U8, p5 U8) { /* sqlite3.c:101818:13: */
bp := tls.Alloc(28)
defer tls.Free(28)
@@ -79607,6 +81661,7 @@ func codeVectorCompare(tls *libc.TLS, pParse uintptr, pExpr uintptr, dest int32,
var regLeft int32 = 0
var regRight int32 = 0
var opx U8 = op
+ var addrCmp int32 = 0
var addrDone int32 = Xsqlite3VdbeMakeLabel(tls, pParse)
var isCommuted int32 = (libc.Bool32(((*Expr)(unsafe.Pointer((pExpr))).Fflags & (U32(EP_Commuted))) != U32(0)))
@@ -79614,62 +81669,75 @@ func codeVectorCompare(tls *libc.TLS, pParse uintptr, pExpr uintptr, dest int32,
return
}
if nLeft != Xsqlite3ExprVectorSize(tls, pRight) {
- Xsqlite3ErrorMsg(tls, pParse, ts+5417 /* "row value misuse..." */, 0)
+ Xsqlite3ErrorMsg(tls, pParse, ts+5548 /* "row value misuse..." */, 0)
return
}
- p5 = U8(int32(p5) | (SQLITE_STOREP2))
- if int32(opx) == TK_LE {
+ if int32(op) == TK_LE {
opx = U8(TK_LT)
}
- if int32(opx) == TK_GE {
+ if int32(op) == TK_GE {
opx = U8(TK_GT)
}
+ if int32(op) == TK_NE {
+ opx = U8(TK_EQ)
+ }
regLeft = exprCodeSubselect(tls, pParse, pLeft)
regRight = exprCodeSubselect(tls, pParse, pRight)
+ Xsqlite3VdbeAddOp2(tls, v, OP_Integer, 1, dest)
for i = 0; 1 != 0; i++ {
*(*int32)(unsafe.Pointer(bp + 8 /* regFree1 */)) = 0
*(*int32)(unsafe.Pointer(bp + 24 /* regFree2 */)) = 0
- // var pL uintptr at bp, 8
-
- // var pR uintptr at bp+16, 8
-
+ *(*uintptr)(unsafe.Pointer(bp /* pL */)) = uintptr(0)
+ *(*uintptr)(unsafe.Pointer(bp + 16 /* pR */)) = uintptr(0)
var r1 int32
var r2 int32
+ if addrCmp != 0 {
+ Xsqlite3VdbeJumpHere(tls, v, addrCmp)
+ }
r1 = exprVectorRegister(tls, pParse, pLeft, i, regLeft, bp /* &pL */, bp+8 /* ®Free1 */)
r2 = exprVectorRegister(tls, pParse, pRight, i, regRight, bp+16 /* &pR */, bp+24 /* ®Free2 */)
- codeCompare(tls, pParse, *(*uintptr)(unsafe.Pointer(bp /* pL */)), *(*uintptr)(unsafe.Pointer(bp + 16 /* pR */)), int32(opx), r1, r2, dest, int32(p5), isCommuted)
+ addrCmp = Xsqlite3VdbeCurrentAddr(tls, v)
+ codeCompare(tls, pParse, *(*uintptr)(unsafe.Pointer(bp /* pL */)), *(*uintptr)(unsafe.Pointer(bp + 16 /* pR */)), int32(opx), r1, r2, addrDone, int32(p5), isCommuted)
Xsqlite3ReleaseTempReg(tls, pParse, *(*int32)(unsafe.Pointer(bp + 8 /* regFree1 */)))
Xsqlite3ReleaseTempReg(tls, pParse, *(*int32)(unsafe.Pointer(bp + 24 /* regFree2 */)))
+ if ((int32(opx) == TK_LT) || (int32(opx) == TK_GT)) && (i < (nLeft - 1)) {
+ addrCmp = Xsqlite3VdbeAddOp0(tls, v, OP_ElseEq)
+
+ }
+ if int32(p5) == SQLITE_NULLEQ {
+ Xsqlite3VdbeAddOp2(tls, v, OP_Integer, 0, dest)
+ } else {
+ Xsqlite3VdbeAddOp3(tls, v, OP_ZeroOrNull, r1, dest, r2)
+ }
if i == (nLeft - 1) {
break
}
if int32(opx) == TK_EQ {
- Xsqlite3VdbeAddOp2(tls, v, OP_IfNot, dest, addrDone)
- p5 = U8(int32(p5) | (SQLITE_KEEPNULL))
- } else if int32(opx) == TK_NE {
- Xsqlite3VdbeAddOp2(tls, v, OP_If, dest, addrDone)
- p5 = U8(int32(p5) | (SQLITE_KEEPNULL))
+ Xsqlite3VdbeAddOp2(tls, v, OP_NotNull, dest, addrDone)
} else {
- Xsqlite3VdbeAddOp2(tls, v, OP_ElseNotEq, 0, addrDone)
-
+ Xsqlite3VdbeAddOp2(tls, v, OP_Goto, 0, addrDone)
if i == (nLeft - 2) {
opx = op
}
}
}
+ Xsqlite3VdbeJumpHere(tls, v, addrCmp)
Xsqlite3VdbeResolveLabel(tls, v, addrDone)
+ if int32(op) == TK_NE {
+ Xsqlite3VdbeAddOp2(tls, v, OP_Not, dest, dest)
+ }
}
// Check that argument nHeight is less than or equal to the maximum
// expression depth allowed. If it is not, leave an error message in
// pParse.
-func Xsqlite3ExprCheckHeight(tls *libc.TLS, pParse uintptr, nHeight int32) int32 { /* sqlite3.c:101336:20: */
+func Xsqlite3ExprCheckHeight(tls *libc.TLS, pParse uintptr, nHeight int32) int32 { /* sqlite3.c:101913:20: */
bp := tls.Alloc(8)
defer tls.Free(8)
@@ -79677,7 +81745,7 @@ func Xsqlite3ExprCheckHeight(tls *libc.TLS, pParse uintptr, nHeight int32) int32
var mxHeight int32 = *(*int32)(unsafe.Pointer(((*Parse)(unsafe.Pointer(pParse)).Fdb + 128 /* &.aLimit */) + 3*4))
if nHeight > mxHeight {
Xsqlite3ErrorMsg(tls, pParse,
- ts+6327 /* "Expression tree ..." */, libc.VaList(bp, mxHeight))
+ ts+6458 /* "Expression tree ..." */, libc.VaList(bp, mxHeight))
rc = SQLITE_ERROR
}
return rc
@@ -79691,7 +81759,7 @@ func Xsqlite3ExprCheckHeight(tls *libc.TLS, pParse uintptr, nHeight int32) int32
// If this maximum height is greater than the current value pointed
// to by pnHeight, the second parameter, then set *pnHeight to that
// value.
-func heightOfExpr(tls *libc.TLS, p uintptr, pnHeight uintptr) { /* sqlite3.c:101357:13: */
+func heightOfExpr(tls *libc.TLS, p uintptr, pnHeight uintptr) { /* sqlite3.c:101934:13: */
if p != 0 {
if (*Expr)(unsafe.Pointer(p)).FnHeight > *(*int32)(unsafe.Pointer(pnHeight)) {
*(*int32)(unsafe.Pointer(pnHeight)) = (*Expr)(unsafe.Pointer(p)).FnHeight
@@ -79699,7 +81767,7 @@ func heightOfExpr(tls *libc.TLS, p uintptr, pnHeight uintptr) { /* sqlite3.c:101
}
}
-func heightOfExprList(tls *libc.TLS, p uintptr, pnHeight uintptr) { /* sqlite3.c:101364:13: */
+func heightOfExprList(tls *libc.TLS, p uintptr, pnHeight uintptr) { /* sqlite3.c:101941:13: */
if p != 0 {
var i int32
for i = 0; i < (*ExprList)(unsafe.Pointer(p)).FnExpr; i++ {
@@ -79708,7 +81776,7 @@ func heightOfExprList(tls *libc.TLS, p uintptr, pnHeight uintptr) { /* sqlite3.c
}
}
-func heightOfSelect(tls *libc.TLS, pSelect uintptr, pnHeight uintptr) { /* sqlite3.c:101372:13: */
+func heightOfSelect(tls *libc.TLS, pSelect uintptr, pnHeight uintptr) { /* sqlite3.c:101949:13: */
var p uintptr
for p = pSelect; p != 0; p = (*Select)(unsafe.Pointer(p)).FpPrior {
heightOfExpr(tls, (*Select)(unsafe.Pointer(p)).FpWhere, pnHeight)
@@ -79728,7 +81796,7 @@ func heightOfSelect(tls *libc.TLS, pSelect uintptr, pnHeight uintptr) { /* sqlit
//
// Also propagate EP_Propagate flags up from Expr.x.pList to Expr.flags,
// if appropriate.
-func exprSetHeight(tls *libc.TLS, p uintptr) { /* sqlite3.c:101394:13: */
+func exprSetHeight(tls *libc.TLS, p uintptr) { /* sqlite3.c:101971:13: */
bp := tls.Alloc(4)
defer tls.Free(4)
@@ -79750,7 +81818,7 @@ func exprSetHeight(tls *libc.TLS, p uintptr) { /* sqlite3.c:101394:13: */
//
// Also propagate all EP_Propagate flags from the Expr.x.pList into
// Expr.flags.
-func Xsqlite3ExprSetHeightAndFlags(tls *libc.TLS, pParse uintptr, p uintptr) { /* sqlite3.c:101415:21: */
+func Xsqlite3ExprSetHeightAndFlags(tls *libc.TLS, pParse uintptr, p uintptr) { /* sqlite3.c:101992:21: */
if (*Parse)(unsafe.Pointer(pParse)).FnErr != 0 {
return
}
@@ -79760,7 +81828,7 @@ func Xsqlite3ExprSetHeightAndFlags(tls *libc.TLS, pParse uintptr, p uintptr) { /
// Return the maximum height of any expression tree referenced
// by the select statement passed as an argument.
-func Xsqlite3SelectExprHeight(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:101425:20: */
+func Xsqlite3SelectExprHeight(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:102002:20: */
bp := tls.Alloc(4)
defer tls.Free(4)
@@ -79787,7 +81855,7 @@ func Xsqlite3SelectExprHeight(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:101
// stored in u.zToken. Instead, the integer values is written
// into u.iValue and the EP_IntValue flag is set. No extra storage
// is allocated to hold the integer text and the dequote flag is ignored.
-func Xsqlite3ExprAlloc(tls *libc.TLS, db uintptr, op int32, pToken uintptr, dequote int32) uintptr { /* sqlite3.c:101464:21: */
+func Xsqlite3ExprAlloc(tls *libc.TLS, db uintptr, op int32, pToken uintptr, dequote int32) uintptr { /* sqlite3.c:102041:21: */
bp := tls.Alloc(4)
defer tls.Free(4)
@@ -79822,8 +81890,8 @@ func Xsqlite3ExprAlloc(tls *libc.TLS, db uintptr, op int32, pToken uintptr, dequ
if (*Token)(unsafe.Pointer(pToken)).Fn != 0 {
libc.Xmemcpy(tls, *(*uintptr)(unsafe.Pointer(pNew + 8 /* &.u */)), (*Token)(unsafe.Pointer(pToken)).Fz, uint64((*Token)(unsafe.Pointer(pToken)).Fn))
}
- *(*int8)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(pNew + 8 /* &.u */)) + uintptr((*Token)(unsafe.Pointer(pToken)).Fn))) = int8(0)
- if (dequote != 0) && ((int32(Xsqlite3CtypeMap[uint8(*(*int8)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(pNew + 8 /* &.u */)))))]) & 0x80) != 0) {
+ *(*uint8)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(pNew + 8 /* &.u */)) + uintptr((*Token)(unsafe.Pointer(pToken)).Fn))) = uint8(0)
+ if (dequote != 0) && ((int32(Xsqlite3CtypeMap[uint8(*(*uint8)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(pNew + 8 /* &.u */)))))]) & 0x80) != 0) {
Xsqlite3DequoteExpr(tls, pNew)
}
}
@@ -79835,7 +81903,7 @@ func Xsqlite3ExprAlloc(tls *libc.TLS, db uintptr, op int32, pToken uintptr, dequ
// Allocate a new expression node from a zero-terminated token that has
// already been dequoted.
-func Xsqlite3Expr(tls *libc.TLS, db uintptr, op int32, zToken uintptr) uintptr { /* sqlite3.c:101512:21: */
+func Xsqlite3Expr(tls *libc.TLS, db uintptr, op int32, zToken uintptr) uintptr { /* sqlite3.c:102089:21: */
bp := tls.Alloc(16)
defer tls.Free(16)
@@ -79850,7 +81918,7 @@ func Xsqlite3Expr(tls *libc.TLS, db uintptr, op int32, zToken uintptr) uintptr {
//
// If pRoot==NULL that means that a memory allocation error has occurred.
// In that case, delete the subtrees pLeft and pRight.
-func Xsqlite3ExprAttachSubtrees(tls *libc.TLS, db uintptr, pRoot uintptr, pLeft uintptr, pRight uintptr) { /* sqlite3.c:101529:21: */
+func Xsqlite3ExprAttachSubtrees(tls *libc.TLS, db uintptr, pRoot uintptr, pLeft uintptr, pRight uintptr) { /* sqlite3.c:102106:21: */
if pRoot == uintptr(0) {
Xsqlite3ExprDelete(tls, db, pLeft)
@@ -79873,7 +81941,7 @@ func Xsqlite3ExprAttachSubtrees(tls *libc.TLS, db uintptr, pRoot uintptr, pLeft
// One or both of the subtrees can be NULL. Return a pointer to the new
// Expr node. Or, if an OOM error occurs, set pParse->db->mallocFailed,
// free the subtrees and return NULL.
-func Xsqlite3PExpr(tls *libc.TLS, pParse uintptr, op int32, pLeft uintptr, pRight uintptr) uintptr { /* sqlite3.c:101559:21: */
+func Xsqlite3PExpr(tls *libc.TLS, pParse uintptr, op int32, pLeft uintptr, pRight uintptr) uintptr { /* sqlite3.c:102136:21: */
var p uintptr
p = Xsqlite3DbMallocRawNN(tls, (*Parse)(unsafe.Pointer(pParse)).Fdb, uint64(unsafe.Sizeof(Expr{})))
if p != 0 {
@@ -79891,7 +81959,7 @@ func Xsqlite3PExpr(tls *libc.TLS, pParse uintptr, op int32, pLeft uintptr, pRigh
// Add pSelect to the Expr.x.pSelect field. Or, if pExpr is NULL (due
// do a memory allocation failure) then delete the pSelect object.
-func Xsqlite3PExprAddSelect(tls *libc.TLS, pParse uintptr, pExpr uintptr, pSelect uintptr) { /* sqlite3.c:101584:21: */
+func Xsqlite3PExprAddSelect(tls *libc.TLS, pParse uintptr, pExpr uintptr, pSelect uintptr) { /* sqlite3.c:102161:21: */
if pExpr != 0 {
*(*uintptr)(unsafe.Pointer(pExpr + 32 /* &.x */)) = pSelect
*(*U32)(unsafe.Pointer(pExpr + 4 /* &.flags */)) |= (U32(EP_xIsSelect | EP_Subquery))
@@ -79908,7 +81976,7 @@ func Xsqlite3PExprAddSelect(tls *libc.TLS, pParse uintptr, pExpr uintptr, pSelec
// If one side or the other of the AND is known to be false, then instead
// of returning an AND expression, just return a constant expression with
// a value of false.
-func Xsqlite3ExprAnd(tls *libc.TLS, pParse uintptr, pLeft uintptr, pRight uintptr) uintptr { /* sqlite3.c:101604:21: */
+func Xsqlite3ExprAnd(tls *libc.TLS, pParse uintptr, pLeft uintptr, pRight uintptr) uintptr { /* sqlite3.c:102181:21: */
var db uintptr = (*Parse)(unsafe.Pointer(pParse)).Fdb
if pLeft == uintptr(0) {
return pRight
@@ -79918,7 +81986,7 @@ func Xsqlite3ExprAnd(tls *libc.TLS, pParse uintptr, pLeft uintptr, pRight uintpt
!(int32((*Parse)(unsafe.Pointer(pParse)).FeParseMode) >= PARSE_MODE_RENAME) {
Xsqlite3ExprDeferredDelete(tls, pParse, pLeft)
Xsqlite3ExprDeferredDelete(tls, pParse, pRight)
- return Xsqlite3Expr(tls, db, TK_INTEGER, ts+6375 /* "0" */)
+ return Xsqlite3Expr(tls, db, TK_INTEGER, ts+6506 /* "0" */)
} else {
return Xsqlite3PExpr(tls, pParse, TK_AND, pLeft, pRight)
}
@@ -79927,7 +81995,7 @@ func Xsqlite3ExprAnd(tls *libc.TLS, pParse uintptr, pLeft uintptr, pRight uintpt
// Construct a new expression node for a function with multiple
// arguments.
-func Xsqlite3ExprFunction(tls *libc.TLS, pParse uintptr, pList uintptr, pToken uintptr, eDistinct int32) uintptr { /* sqlite3.c:101625:21: */
+func Xsqlite3ExprFunction(tls *libc.TLS, pParse uintptr, pList uintptr, pToken uintptr, eDistinct int32) uintptr { /* sqlite3.c:102202:21: */
bp := tls.Alloc(8)
defer tls.Free(8)
@@ -79940,7 +82008,7 @@ func Xsqlite3ExprFunction(tls *libc.TLS, pParse uintptr, pList uintptr, pToken u
return uintptr(0)
}
if (pList != 0) && ((*ExprList)(unsafe.Pointer(pList)).FnExpr > *(*int32)(unsafe.Pointer(((*Parse)(unsafe.Pointer(pParse)).Fdb + 128 /* &.aLimit */) + 6*4))) {
- Xsqlite3ErrorMsg(tls, pParse, ts+6377 /* "too many argumen..." */, libc.VaList(bp, pToken))
+ Xsqlite3ErrorMsg(tls, pParse, ts+6508 /* "too many argumen..." */, libc.VaList(bp, pToken))
}
*(*uintptr)(unsafe.Pointer(pNew + 32 /* &.x */)) = pList
*(*U32)(unsafe.Pointer(pNew + 4 /* &.flags */)) |= (U32(EP_HasFunc))
@@ -79961,7 +82029,7 @@ func Xsqlite3ExprFunction(tls *libc.TLS, pParse uintptr, pList uintptr, pToken u
// top-level SQL
//
// If the function is not usable, create an error.
-func Xsqlite3ExprFunctionUsable(tls *libc.TLS, pParse uintptr, pExpr uintptr, pDef uintptr) { /* sqlite3.c:101661:21: */
+func Xsqlite3ExprFunctionUsable(tls *libc.TLS, pParse uintptr, pExpr uintptr, pDef uintptr) { /* sqlite3.c:102238:21: */
bp := tls.Alloc(8)
defer tls.Free(8)
@@ -79974,7 +82042,7 @@ func Xsqlite3ExprFunctionUsable(tls *libc.TLS, pParse uintptr, pExpr uintptr, pD
// is tagged with SQLITE_FUNC_UNSAFE) and
// SQLITE_DBCONFIG_TRUSTED_SCHEMA is off (meaning
// that the schema is possibly tainted).
- Xsqlite3ErrorMsg(tls, pParse, ts+6411 /* "unsafe use of %s..." */, libc.VaList(bp, (*FuncDef)(unsafe.Pointer(pDef)).FzName))
+ Xsqlite3ErrorMsg(tls, pParse, ts+6542 /* "unsafe use of %s..." */, libc.VaList(bp, (*FuncDef)(unsafe.Pointer(pDef)).FzName))
}
}
}
@@ -79993,7 +82061,7 @@ func Xsqlite3ExprFunctionUsable(tls *libc.TLS, pParse uintptr, pExpr uintptr, pD
// as the previous instance of the same wildcard. Or if this is the first
// instance of the wildcard, the next sequential variable number is
// assigned.
-func Xsqlite3ExprAssignVarNumber(tls *libc.TLS, pParse uintptr, pExpr uintptr, n U32) { /* sqlite3.c:101700:21: */
+func Xsqlite3ExprAssignVarNumber(tls *libc.TLS, pParse uintptr, pExpr uintptr, n U32) { /* sqlite3.c:102277:21: */
bp := tls.Alloc(16)
defer tls.Free(16)
@@ -80007,27 +82075,27 @@ func Xsqlite3ExprAssignVarNumber(tls *libc.TLS, pParse uintptr, pExpr uintptr, n
z = *(*uintptr)(unsafe.Pointer(pExpr + 8 /* &.u */))
- if int32(*(*int8)(unsafe.Pointer(z + 1))) == 0 {
+ if int32(*(*uint8)(unsafe.Pointer(z + 1))) == 0 {
// Wildcard of the form "?". Assign the next variable number
x = libc.PreIncInt16(&(*Parse)(unsafe.Pointer(pParse)).FnVar, 1)
} else {
var doAdd int32 = 0
- if int32(*(*int8)(unsafe.Pointer(z))) == '?' {
+ if int32(*(*uint8)(unsafe.Pointer(z))) == '?' {
// Wildcard of the form "?nnn". Convert "nnn" to an integer and
// use it as the variable number
// var i I64 at bp+8, 8
var bOk int32
if n == U32(2) { //OPTIMIZATION-IF-TRUE
- *(*I64)(unsafe.Pointer(bp + 8 /* i */)) = (I64(int32(*(*int8)(unsafe.Pointer(z + 1))) - '0')) // The common case of ?N for a single digit N
+ *(*I64)(unsafe.Pointer(bp + 8 /* i */)) = (I64(int32(*(*uint8)(unsafe.Pointer(z + 1))) - '0')) // The common case of ?N for a single digit N
bOk = 1
} else {
bOk = (libc.Bool32(0 == Xsqlite3Atoi64(tls, (z+1), bp+8 /* &i */, (int32(n-U32(1))), uint8(SQLITE_UTF8))))
}
if ((bOk == 0) || (*(*I64)(unsafe.Pointer(bp + 8 /* i */)) < int64(1))) || (*(*I64)(unsafe.Pointer(bp + 8 /* i */)) > I64(*(*int32)(unsafe.Pointer((db + 128 /* &.aLimit */) + 9*4)))) {
- Xsqlite3ErrorMsg(tls, pParse, ts+6430, /* "variable number ..." */
+ Xsqlite3ErrorMsg(tls, pParse, ts+6561, /* "variable number ..." */
libc.VaList(bp, *(*int32)(unsafe.Pointer((db + 128 /* &.aLimit */) + 9*4))))
return
}
@@ -80054,12 +82122,12 @@ func Xsqlite3ExprAssignVarNumber(tls *libc.TLS, pParse uintptr, pExpr uintptr, n
}
(*Expr)(unsafe.Pointer(pExpr)).FiColumn = x
if int32(x) > *(*int32)(unsafe.Pointer((db + 128 /* &.aLimit */) + 9*4)) {
- Xsqlite3ErrorMsg(tls, pParse, ts+6473 /* "too many SQL var..." */, 0)
+ Xsqlite3ErrorMsg(tls, pParse, ts+6604 /* "too many SQL var..." */, 0)
}
}
// Recursively delete an expression tree.
-func sqlite3ExprDeleteNN(tls *libc.TLS, db uintptr, p uintptr) { /* sqlite3.c:101768:29: */
+func sqlite3ExprDeleteNN(tls *libc.TLS, db uintptr, p uintptr) { /* sqlite3.c:102345:29: */
// Sanity check: Assert that the IntValue is non-negative if it exists
@@ -80090,7 +82158,7 @@ func sqlite3ExprDeleteNN(tls *libc.TLS, db uintptr, p uintptr) { /* sqlite3.c:10
}
}
-func Xsqlite3ExprDelete(tls *libc.TLS, db uintptr, p uintptr) { /* sqlite3.c:101807:21: */
+func Xsqlite3ExprDelete(tls *libc.TLS, db uintptr, p uintptr) { /* sqlite3.c:102384:21: */
if p != 0 {
sqlite3ExprDeleteNN(tls, db, p)
}
@@ -80104,13 +82172,13 @@ func Xsqlite3ExprDelete(tls *libc.TLS, db uintptr, p uintptr) { /* sqlite3.c:101
//
// The deferred delete is (currently) implemented by adding the
// pExpr to the pParse->pConstExpr list with a register number of 0.
-func Xsqlite3ExprDeferredDelete(tls *libc.TLS, pParse uintptr, pExpr uintptr) { /* sqlite3.c:101822:21: */
+func Xsqlite3ExprDeferredDelete(tls *libc.TLS, pParse uintptr, pExpr uintptr) { /* sqlite3.c:102399:21: */
(*Parse)(unsafe.Pointer(pParse)).FpConstExpr = Xsqlite3ExprListAppend(tls, pParse, (*Parse)(unsafe.Pointer(pParse)).FpConstExpr, pExpr)
}
// Invoke sqlite3RenameExprUnmap() and sqlite3ExprDelete() on the
// expression.
-func Xsqlite3ExprUnmapAndDelete(tls *libc.TLS, pParse uintptr, p uintptr) { /* sqlite3.c:101830:21: */
+func Xsqlite3ExprUnmapAndDelete(tls *libc.TLS, pParse uintptr, p uintptr) { /* sqlite3.c:102407:21: */
if p != 0 {
if int32((*Parse)(unsafe.Pointer(pParse)).FeParseMode) >= PARSE_MODE_RENAME {
Xsqlite3RenameExprUnmap(tls, pParse, p)
@@ -80122,7 +82190,7 @@ func Xsqlite3ExprUnmapAndDelete(tls *libc.TLS, pParse uintptr, p uintptr) { /* s
// Return the number of bytes allocated for the expression structure
// passed as the first argument. This is always one of EXPR_FULLSIZE,
// EXPR_REDUCEDSIZE or EXPR_TOKENONLYSIZE.
-func exprStructSize(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:101844:12: */
+func exprStructSize(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:102421:12: */
if ((*Expr)(unsafe.Pointer((p))).Fflags & (U32(EP_TokenOnly))) != U32(0) {
return int32((uintptr(0) + 16 /* &.pLeft */))
}
@@ -80164,7 +82232,7 @@ func exprStructSize(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:101844:12: */
// to reduce a pristine expression tree from the parser. The implementation
// of dupedExprStructSize() contain multiple assert() statements that attempt
// to enforce this constraint.
-func dupedExprStructSize(tls *libc.TLS, p uintptr, flags int32) int32 { /* sqlite3.c:101884:12: */
+func dupedExprStructSize(tls *libc.TLS, p uintptr, flags int32) int32 { /* sqlite3.c:102461:12: */
var nSize int32
// Only one flag value allowed
@@ -80186,7 +82254,7 @@ func dupedExprStructSize(tls *libc.TLS, p uintptr, flags int32) int32 { /* sqlit
// This function returns the space in bytes required to store the copy
// of the Expr structure and a copy of the Expr.u.zToken string (if that
// string is defined.)
-func dupedExprNodeSize(tls *libc.TLS, p uintptr, flags int32) int32 { /* sqlite3.c:101915:12: */
+func dupedExprNodeSize(tls *libc.TLS, p uintptr, flags int32) int32 { /* sqlite3.c:102492:12: */
var nByte int32 = (dupedExprStructSize(tls, p, flags) & 0xfff)
if !(((*Expr)(unsafe.Pointer((p))).Fflags & (U32(EP_IntValue))) != U32(0)) && (*(*uintptr)(unsafe.Pointer(p + 8 /* &.u */)) != 0) {
nByte = int32(Size_t(nByte) + ((libc.Xstrlen(tls, *(*uintptr)(unsafe.Pointer(p + 8 /* &.u */))) & uint64(0x3fffffff)) + uint64(1)))
@@ -80205,7 +82273,7 @@ func dupedExprNodeSize(tls *libc.TLS, p uintptr, flags int32) int32 { /* sqlite3
// space to duplicate all Expr nodes in the tree formed by Expr.pLeft
// and Expr.pRight variables (but not for any structures pointed to or
// descended from the Expr.x.pList or Expr.x.pSelect variables).
-func dupedExprSize(tls *libc.TLS, p uintptr, flags int32) int32 { /* sqlite3.c:101936:12: */
+func dupedExprSize(tls *libc.TLS, p uintptr, flags int32) int32 { /* sqlite3.c:102513:12: */
var nByte int32 = 0
if p != 0 {
nByte = dupedExprNodeSize(tls, p, flags)
@@ -80222,7 +82290,7 @@ func dupedExprSize(tls *libc.TLS, p uintptr, flags int32) int32 { /* sqlite3.c:1
// (if applicable), and the copies of the p->pLeft and p->pRight expressions,
// if any. Before returning, *pzBuffer is set to the first byte past the
// portion of the buffer copied into by this function.
-func exprDup(tls *libc.TLS, db uintptr, p uintptr, dupFlags int32, pzBuffer uintptr) uintptr { /* sqlite3.c:101955:13: */
+func exprDup(tls *libc.TLS, db uintptr, p uintptr, dupFlags int32, pzBuffer uintptr) uintptr { /* sqlite3.c:102532:13: */
bp := tls.Alloc(8)
defer tls.Free(8)
@@ -80235,6 +82303,7 @@ func exprDup(tls *libc.TLS, db uintptr, p uintptr, dupFlags int32, pzBuffer uint
if pzBuffer != 0 {
*(*uintptr)(unsafe.Pointer(bp /* zAlloc */)) = *(*uintptr)(unsafe.Pointer(pzBuffer))
staticFlag = U32(EP_Static)
+
} else {
*(*uintptr)(unsafe.Pointer(bp /* zAlloc */)) = Xsqlite3DbMallocRawNN(tls, db, uint64(dupedExprSize(tls, p, dupFlags)))
staticFlag = U32(0)
@@ -80331,7 +82400,7 @@ func exprDup(tls *libc.TLS, db uintptr, p uintptr, dupFlags int32, pzBuffer uint
// Create and return a deep copy of the object passed as the second
// argument. If an OOM condition is encountered, NULL is returned
// and the db->mallocFailed flag set.
-func withDup(tls *libc.TLS, db uintptr, p uintptr) uintptr { /* sqlite3.c:102064:13: */
+func Xsqlite3WithDup(tls *libc.TLS, db uintptr, p uintptr) uintptr { /* sqlite3.c:102643:21: */
var pRet uintptr = uintptr(0)
if p != 0 {
var nByte Sqlite3_int64 = (Sqlite3_int64(uint64(unsafe.Sizeof(With{})) + (uint64(unsafe.Sizeof(Cte{})) * (uint64((*With)(unsafe.Pointer(p)).FnCte - 1)))))
@@ -80353,7 +82422,7 @@ func withDup(tls *libc.TLS, db uintptr, p uintptr) uintptr { /* sqlite3.c:102064
// gatherSelectWindowsCallback() are used to scan all the expressions
// an a newly duplicated SELECT statement and gather all of the Window
// objects found there, assembling them onto the linked list at Select->pWin.
-func gatherSelectWindowsCallback(tls *libc.TLS, pWalker uintptr, pExpr uintptr) int32 { /* sqlite3.c:102092:12: */
+func gatherSelectWindowsCallback(tls *libc.TLS, pWalker uintptr, pExpr uintptr) int32 { /* sqlite3.c:102671:12: */
if (int32((*Expr)(unsafe.Pointer(pExpr)).Fop) == TK_FUNCTION) && (((*Expr)(unsafe.Pointer((pExpr))).Fflags & (U32(EP_WinFunc))) != U32(0)) {
var pSelect uintptr = *(*uintptr)(unsafe.Pointer(pWalker + 40 /* &.u */))
var pWin uintptr = *(*uintptr)(unsafe.Pointer(pExpr + 64 /* &.y */))
@@ -80363,14 +82432,14 @@ func gatherSelectWindowsCallback(tls *libc.TLS, pWalker uintptr, pExpr uintptr)
return WRC_Continue
}
-func gatherSelectWindowsSelectCallback(tls *libc.TLS, pWalker uintptr, p uintptr) int32 { /* sqlite3.c:102103:12: */
+func gatherSelectWindowsSelectCallback(tls *libc.TLS, pWalker uintptr, p uintptr) int32 { /* sqlite3.c:102682:12: */
if p == *(*uintptr)(unsafe.Pointer(pWalker + 40 /* &.u */)) {
return WRC_Continue
}
return WRC_Prune
}
-func gatherSelectWindows(tls *libc.TLS, p uintptr) { /* sqlite3.c:102106:13: */
+func gatherSelectWindows(tls *libc.TLS, p uintptr) { /* sqlite3.c:102685:13: */
bp := tls.Alloc(48)
defer tls.Free(48)
@@ -80403,7 +82472,7 @@ func gatherSelectWindows(tls *libc.TLS, p uintptr) { /* sqlite3.c:102106:13: */
// If the EXPRDUP_REDUCE flag is set, then the structure returned is a
// truncated version of the usual Expr structure that will be stored as
// part of the in-memory representation of the database schema.
-func Xsqlite3ExprDup(tls *libc.TLS, db uintptr, p uintptr, flags int32) uintptr { /* sqlite3.c:102135:21: */
+func Xsqlite3ExprDup(tls *libc.TLS, db uintptr, p uintptr, flags int32) uintptr { /* sqlite3.c:102714:21: */
if p != 0 {
return exprDup(tls, db, p, flags, uintptr(0))
@@ -80411,7 +82480,7 @@ func Xsqlite3ExprDup(tls *libc.TLS, db uintptr, p uintptr, flags int32) uintptr
return uintptr(0)
}
-func Xsqlite3ExprListDup(tls *libc.TLS, db uintptr, p uintptr, flags int32) uintptr { /* sqlite3.c:102139:25: */
+func Xsqlite3ExprListDup(tls *libc.TLS, db uintptr, p uintptr, flags int32) uintptr { /* sqlite3.c:102718:25: */
var pNew uintptr
var pItem uintptr
var pOldItem uintptr
@@ -80426,6 +82495,7 @@ func Xsqlite3ExprListDup(tls *libc.TLS, db uintptr, p uintptr, flags int32) uint
return uintptr(0)
}
(*ExprList)(unsafe.Pointer(pNew)).FnExpr = (*ExprList)(unsafe.Pointer(p)).FnExpr
+ (*ExprList)(unsafe.Pointer(pNew)).FnAlloc = (*ExprList)(unsafe.Pointer(p)).FnAlloc
pItem = pNew + 8 /* &.a */
pOldItem = p + 8 /* &.a */
i = 0
@@ -80451,10 +82521,10 @@ __1:
}
(*ExprList_item)(unsafe.Pointer(pItem)).FzEName = Xsqlite3DbStrDup(tls, db, (*ExprList_item)(unsafe.Pointer(pOldItem)).FzEName)
(*ExprList_item)(unsafe.Pointer(pItem)).FsortFlags = (*ExprList_item)(unsafe.Pointer(pOldItem)).FsortFlags
- libc.SetBitFieldPtr8Uint32(pItem+20 /* &.eEName */, (uint32(int32(*(*uint8)(unsafe.Pointer(pOldItem + 20 /* &.eEName */)) >> 6 & 0x3))), 0, 0x3)
- libc.SetBitFieldPtr8Uint32(pItem+20 /* &.done */, uint32(0), 2, 0x4)
- libc.SetBitFieldPtr8Uint32(pItem+20 /* &.bNulls */, (uint32(int32(*(*uint8)(unsafe.Pointer(pOldItem + 20 /* &.bNulls */)) >> 2 & 0x1))), 5, 0x20)
- libc.SetBitFieldPtr8Uint32(pItem+20 /* &.bSorterRef */, (uint32(int32(*(*uint8)(unsafe.Pointer(pOldItem + 20 /* &.bSorterRef */)) >> 3 & 0x1))), 4, 0x10)
+ libc.SetBitFieldPtr8Uint32(pItem+20 /* &.eEName */, (uint32(int32(*(*uint8)(unsafe.Pointer(pOldItem + 20 /* &.eEName */)) & 0xc0 >> 6))), 6, 0xc0)
+ libc.SetBitFieldPtr8Uint32(pItem+20 /* &.done */, uint32(0), 5, 0x20)
+ libc.SetBitFieldPtr8Uint32(pItem+20 /* &.bNulls */, (uint32(int32(*(*uint8)(unsafe.Pointer(pOldItem + 20 /* &.bNulls */)) & 0x4 >> 2))), 2, 0x4)
+ libc.SetBitFieldPtr8Uint32(pItem+20 /* &.bSorterRef */, (uint32(int32(*(*uint8)(unsafe.Pointer(pOldItem + 20 /* &.bSorterRef */)) & 0x8 >> 3))), 3, 0x8)
(*ExprList_item)(unsafe.Pointer(pItem)).Fu = (*ExprList_item)(unsafe.Pointer(pOldItem)).Fu
}
@@ -80474,7 +82544,7 @@ __3:
// the build, then none of the following routines, except for
// sqlite3SelectDup(), can be called. sqlite3SelectDup() is sometimes
// called with a NULL argument.
-func Xsqlite3SrcListDup(tls *libc.TLS, db uintptr, p uintptr, flags int32) uintptr { /* sqlite3.c:102190:24: */
+func Xsqlite3SrcListDup(tls *libc.TLS, db uintptr, p uintptr, flags int32) uintptr { /* sqlite3.c:102771:24: */
var pNew uintptr
var i int32
var nByte int32
@@ -80505,14 +82575,14 @@ func Xsqlite3SrcListDup(tls *libc.TLS, db uintptr, p uintptr, flags int32) uintp
(*SrcItem)(unsafe.Pointer(pNewItem)).FiCursor = (*SrcItem)(unsafe.Pointer(pOldItem)).FiCursor
(*SrcItem)(unsafe.Pointer(pNewItem)).FaddrFillSub = (*SrcItem)(unsafe.Pointer(pOldItem)).FaddrFillSub
(*SrcItem)(unsafe.Pointer(pNewItem)).FregReturn = (*SrcItem)(unsafe.Pointer(pOldItem)).FregReturn
- if (uint32(int32(*(*uint8)(unsafe.Pointer(pNewItem + 60 /* &.fg */ + 4 /* &.isIndexedBy */)) >> 6 & 0x1))) != 0 {
+ if (uint32(int32(*(*uint16)(unsafe.Pointer(pNewItem + 60 /* &.fg */ + 4 /* &.isIndexedBy */)) & 0x4000 >> 14))) != 0 {
*(*uintptr)(unsafe.Pointer(pNewItem + 96 /* &.u1 */)) = Xsqlite3DbStrDup(tls, db, *(*uintptr)(unsafe.Pointer(pOldItem + 96 /* &.u1 */)))
}
(*SrcItem)(unsafe.Pointer(pNewItem)).Fu2 = (*SrcItem)(unsafe.Pointer(pOldItem)).Fu2
- if (uint32(int32(*(*uint8)(unsafe.Pointer(pNewItem + 60 /* &.fg */ + 4 /* &.isCte */)) >> 0 & 0x1))) != 0 {
+ if (uint32(int32(*(*uint16)(unsafe.Pointer(pNewItem + 60 /* &.fg */ + 4 /* &.isCte */)) & 0x100 >> 8))) != 0 {
(*CteUse)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(pNewItem + 104 /* &.u2 */)))).FnUse++
}
- if (uint32(int32(*(*uint8)(unsafe.Pointer(pNewItem + 60 /* &.fg */ + 4 /* &.isTabFunc */)) >> 5 & 0x1))) != 0 {
+ if (uint32(int32(*(*uint16)(unsafe.Pointer(pNewItem + 60 /* &.fg */ + 4 /* &.isTabFunc */)) & 0x2000 >> 13))) != 0 {
*(*uintptr)(unsafe.Pointer(pNewItem + 96 /* &.u1 */)) = Xsqlite3ExprListDup(tls, db, *(*uintptr)(unsafe.Pointer(pOldItem + 96 /* &.u1 */)), flags)
}
pTab = libc.AssignPtrUintptr(pNewItem+32 /* &.pTab */, (*SrcItem)(unsafe.Pointer(pOldItem)).FpTab)
@@ -80527,7 +82597,7 @@ func Xsqlite3SrcListDup(tls *libc.TLS, db uintptr, p uintptr, flags int32) uintp
return pNew
}
-func Xsqlite3IdListDup(tls *libc.TLS, db uintptr, p uintptr) uintptr { /* sqlite3.c:102234:23: */
+func Xsqlite3IdListDup(tls *libc.TLS, db uintptr, p uintptr) uintptr { /* sqlite3.c:102815:23: */
var pNew uintptr
var i int32
@@ -80556,7 +82626,7 @@ func Xsqlite3IdListDup(tls *libc.TLS, db uintptr, p uintptr) uintptr { /* sqlite
return pNew
}
-func Xsqlite3SelectDup(tls *libc.TLS, db uintptr, pDup uintptr, flags int32) uintptr { /* sqlite3.c:102258:23: */
+func Xsqlite3SelectDup(tls *libc.TLS, db uintptr, pDup uintptr, flags int32) uintptr { /* sqlite3.c:102839:23: */
bp := tls.Alloc(8)
defer tls.Free(8)
@@ -80586,13 +82656,21 @@ func Xsqlite3SelectDup(tls *libc.TLS, db uintptr, pDup uintptr, flags int32) uin
*(*int32)(unsafe.Pointer((pNew + 20 /* &.addrOpenEphm */))) = -1
*(*int32)(unsafe.Pointer((pNew + 20 /* &.addrOpenEphm */) + 1*4)) = -1
(*Select)(unsafe.Pointer(pNew)).FnSelectRow = (*Select)(unsafe.Pointer(p)).FnSelectRow
- (*Select)(unsafe.Pointer(pNew)).FpWith = withDup(tls, db, (*Select)(unsafe.Pointer(p)).FpWith)
+ (*Select)(unsafe.Pointer(pNew)).FpWith = Xsqlite3WithDup(tls, db, (*Select)(unsafe.Pointer(p)).FpWith)
(*Select)(unsafe.Pointer(pNew)).FpWin = uintptr(0)
(*Select)(unsafe.Pointer(pNew)).FpWinDefn = Xsqlite3WindowListDup(tls, db, (*Select)(unsafe.Pointer(p)).FpWinDefn)
if ((*Select)(unsafe.Pointer(p)).FpWin != 0) && (int32((*Sqlite3)(unsafe.Pointer(db)).FmallocFailed) == 0) {
gatherSelectWindows(tls, pNew)
}
(*Select)(unsafe.Pointer(pNew)).FselId = (*Select)(unsafe.Pointer(p)).FselId
+ if (*Sqlite3)(unsafe.Pointer(db)).FmallocFailed != 0 {
+ // Any prior OOM might have left the Select object incomplete.
+ // Delete the whole thing rather than allow an incomplete Select
+ // to be used by the code generator.
+ (*Select)(unsafe.Pointer(pNew)).FpNext = uintptr(0)
+ Xsqlite3SelectDelete(tls, db, pNew)
+ break
+ }
*(*uintptr)(unsafe.Pointer(pp)) = pNew
pp = (pNew + 80 /* &.pPrior */)
pNext = pNew
@@ -80614,52 +82692,56 @@ func Xsqlite3SelectDup(tls *libc.TLS, db uintptr, pDup uintptr, flags int32) uin
// If a memory allocation error occurs, the entire list is freed and
// NULL is returned. If non-NULL is returned, then it is guaranteed
// that the new entry was successfully appended.
-func Xsqlite3ExprListAppend(tls *libc.TLS, pParse uintptr, pList uintptr, pExpr uintptr) uintptr { /* sqlite3.c:102321:25: */
+var zeroItem = ExprList_item{} /* sqlite3.c:102910:35 */
+
+func Xsqlite3ExprListAppendNew(tls *libc.TLS, db uintptr, pExpr uintptr) uintptr { /* sqlite3.c:102911:41: */
var pItem uintptr
- var db uintptr
- var pNew uintptr
- db = (*Parse)(unsafe.Pointer(pParse)).Fdb
+ var pList uintptr
- if !(pList == uintptr(0)) {
- goto __1
- }
- pList = Xsqlite3DbMallocRawNN(tls, db, uint64(unsafe.Sizeof(ExprList{})))
- if !(pList == uintptr(0)) {
- goto __3
- }
- goto no_mem
-__3:
- ;
- (*ExprList)(unsafe.Pointer(pList)).FnExpr = 0
- goto __2
-__1:
- if !(((*ExprList)(unsafe.Pointer(pList)).FnExpr & ((*ExprList)(unsafe.Pointer(pList)).FnExpr - 1)) == 0) {
- goto __4
+ pList = Xsqlite3DbMallocRawNN(tls, db, (uint64(unsafe.Sizeof(ExprList{})) + (uint64(unsafe.Sizeof(ExprList_item{})) * uint64(4))))
+ if pList == uintptr(0) {
+ Xsqlite3ExprDelete(tls, db, pExpr)
+ return uintptr(0)
}
+ (*ExprList)(unsafe.Pointer(pList)).FnAlloc = 4
+ (*ExprList)(unsafe.Pointer(pList)).FnExpr = 1
+ pItem = (pList + 8 /* &.a */)
+ *(*ExprList_item)(unsafe.Pointer(pItem)) = zeroItem
+ (*ExprList_item)(unsafe.Pointer(pItem)).FpExpr = pExpr
+ return pList
+}
+
+func Xsqlite3ExprListAppendGrow(tls *libc.TLS, db uintptr, pList uintptr, pExpr uintptr) uintptr { /* sqlite3.c:102930:41: */
+ var pItem uintptr
+ var pNew uintptr
+ *(*int32)(unsafe.Pointer(pList + 4 /* &.nAlloc */)) *= (2)
pNew = Xsqlite3DbRealloc(tls, db, pList,
- (uint64(unsafe.Sizeof(ExprList{})) + ((uint64((int64(2) * Sqlite3_int64((*ExprList)(unsafe.Pointer(pList)).FnExpr)) - int64(1))) * uint64(unsafe.Sizeof(ExprList_item{})))))
- if !(pNew == uintptr(0)) {
- goto __5
+ (uint64(uint64(unsafe.Sizeof(ExprList{})) + ((uint64((*ExprList)(unsafe.Pointer(pList)).FnAlloc - 1)) * uint64(unsafe.Sizeof(ExprList_item{}))))))
+ if pNew == uintptr(0) {
+ Xsqlite3ExprListDelete(tls, db, pList)
+ Xsqlite3ExprDelete(tls, db, pExpr)
+ return uintptr(0)
+ } else {
+ pList = pNew
}
- goto no_mem
-__5:
- ;
- pList = pNew
-__4:
- ;
-__2:
- ;
pItem = ((pList + 8 /* &.a */) + uintptr(libc.PostIncInt32(&(*ExprList)(unsafe.Pointer(pList)).FnExpr, 1))*32)
-
- libc.Xmemset(tls, (pItem + 8 /* &.zEName */), 0, (uint64(unsafe.Sizeof(ExprList_item{})) - (uint64((uintptr(0) + 8 /* &.zEName */)))))
+ *(*ExprList_item)(unsafe.Pointer(pItem)) = zeroItem
(*ExprList_item)(unsafe.Pointer(pItem)).FpExpr = pExpr
return pList
+}
-no_mem:
- // Avoid leaking memory if malloc has failed.
- Xsqlite3ExprDelete(tls, db, pExpr)
- Xsqlite3ExprListDelete(tls, db, pList)
- return uintptr(0)
+func Xsqlite3ExprListAppend(tls *libc.TLS, pParse uintptr, pList uintptr, pExpr uintptr) uintptr { /* sqlite3.c:102952:25: */
+ var pItem uintptr
+ if pList == uintptr(0) {
+ return Xsqlite3ExprListAppendNew(tls, (*Parse)(unsafe.Pointer(pParse)).Fdb, pExpr)
+ }
+ if (*ExprList)(unsafe.Pointer(pList)).FnAlloc < ((*ExprList)(unsafe.Pointer(pList)).FnExpr + 1) {
+ return Xsqlite3ExprListAppendGrow(tls, (*Parse)(unsafe.Pointer(pParse)).Fdb, pList, pExpr)
+ }
+ pItem = ((pList + 8 /* &.a */) + uintptr(libc.PostIncInt32(&(*ExprList)(unsafe.Pointer(pList)).FnExpr, 1))*32)
+ *(*ExprList_item)(unsafe.Pointer(pItem)) = zeroItem
+ (*ExprList_item)(unsafe.Pointer(pItem)).FpExpr = pExpr
+ return pList
}
// pColumns and pExpr form a vector assignment which is part of the SET
@@ -80671,7 +82753,7 @@ no_mem:
// For each term of the vector assignment, append new entries to the
// expression list pList. In the case of a subquery on the RHS, append
// TK_SELECT_COLUMN expressions.
-func Xsqlite3ExprListAppendVector(tls *libc.TLS, pParse uintptr, pList uintptr, pColumns uintptr, pExpr uintptr) uintptr { /* sqlite3.c:102369:25: */
+func Xsqlite3ExprListAppendVector(tls *libc.TLS, pParse uintptr, pList uintptr, pColumns uintptr, pExpr uintptr) uintptr { /* sqlite3.c:102981:25: */
bp := tls.Alloc(16)
defer tls.Free(16)
@@ -80709,7 +82791,7 @@ __2:
if !((int32((*Expr)(unsafe.Pointer(pExpr)).Fop) != TK_SELECT) && ((*IdList)(unsafe.Pointer(pColumns)).FnId != (libc.AssignInt32(&n, Xsqlite3ExprVectorSize(tls, pExpr))))) {
goto __3
}
- Xsqlite3ErrorMsg(tls, pParse, ts+6496, /* "%d columns assig..." */
+ Xsqlite3ErrorMsg(tls, pParse, ts+6627, /* "%d columns assig..." */
libc.VaList(bp, (*IdList)(unsafe.Pointer(pColumns)).FnId, n))
goto vector_append_error
__3:
@@ -80769,7 +82851,7 @@ vector_append_error:
}
// Set the sort order for the last element on the given ExprList.
-func Xsqlite3ExprListSetSortOrder(tls *libc.TLS, p uintptr, iSortOrder int32, eNulls int32) { /* sqlite3.c:102433:21: */
+func Xsqlite3ExprListSetSortOrder(tls *libc.TLS, p uintptr, iSortOrder int32, eNulls int32) { /* sqlite3.c:103045:21: */
var pItem uintptr
if p == uintptr(0) {
return
@@ -80783,7 +82865,7 @@ func Xsqlite3ExprListSetSortOrder(tls *libc.TLS, p uintptr, iSortOrder int32, eN
(*ExprList_item)(unsafe.Pointer(pItem)).FsortFlags = U8(iSortOrder)
if eNulls != -1 {
- libc.SetBitFieldPtr8Uint32(pItem+20 /* &.bNulls */, uint32(1), 5, 0x20)
+ libc.SetBitFieldPtr8Uint32(pItem+20 /* &.bNulls */, uint32(1), 2, 0x4)
if iSortOrder != eNulls {
*(*U8)(unsafe.Pointer(pItem + 16 /* &.sortFlags */)) |= U8((KEYINFO_ORDER_BIGNULL))
}
@@ -80796,7 +82878,7 @@ func Xsqlite3ExprListSetSortOrder(tls *libc.TLS, p uintptr, iSortOrder int32, eN
// pList might be NULL following an OOM error. But pName should never be
// NULL. If a memory allocation fails, the pParse->db->mallocFailed flag
// is set.
-func Xsqlite3ExprListSetName(tls *libc.TLS, pParse uintptr, pList uintptr, pName uintptr, dequote int32) { /* sqlite3.c:102471:21: */
+func Xsqlite3ExprListSetName(tls *libc.TLS, pParse uintptr, pList uintptr, pName uintptr, dequote int32) { /* sqlite3.c:103083:21: */
if pList != 0 {
var pItem uintptr
@@ -80822,7 +82904,7 @@ func Xsqlite3ExprListSetName(tls *libc.TLS, pParse uintptr, pList uintptr, pName
// pList might be NULL following an OOM error. But pSpan should never be
// NULL. If a memory allocation fails, the pParse->db->mallocFailed flag
// is set.
-func Xsqlite3ExprListSetSpan(tls *libc.TLS, pParse uintptr, pList uintptr, zStart uintptr, zEnd uintptr) { /* sqlite3.c:102506:21: */
+func Xsqlite3ExprListSetSpan(tls *libc.TLS, pParse uintptr, pList uintptr, zStart uintptr, zEnd uintptr) { /* sqlite3.c:103118:21: */
var db uintptr = (*Parse)(unsafe.Pointer(pParse)).Fdb
if pList != 0 {
@@ -80830,26 +82912,26 @@ func Xsqlite3ExprListSetSpan(tls *libc.TLS, pParse uintptr, pList uintptr, zStar
if (*ExprList_item)(unsafe.Pointer(pItem)).FzEName == uintptr(0) {
(*ExprList_item)(unsafe.Pointer(pItem)).FzEName = Xsqlite3DbSpanDup(tls, db, zStart, zEnd)
- libc.SetBitFieldPtr8Uint32(pItem+20 /* &.eEName */, uint32(ENAME_SPAN), 0, 0x3)
+ libc.SetBitFieldPtr8Uint32(pItem+20 /* &.eEName */, uint32(ENAME_SPAN), 6, 0xc0)
}
}
}
// If the expression list pEList contains more than iLimit elements,
// leave an error message in pParse.
-func Xsqlite3ExprListCheckLength(tls *libc.TLS, pParse uintptr, pEList uintptr, zObject uintptr) { /* sqlite3.c:102528:21: */
+func Xsqlite3ExprListCheckLength(tls *libc.TLS, pParse uintptr, pEList uintptr, zObject uintptr) { /* sqlite3.c:103140:21: */
bp := tls.Alloc(8)
defer tls.Free(8)
var mx int32 = *(*int32)(unsafe.Pointer(((*Parse)(unsafe.Pointer(pParse)).Fdb + 128 /* &.aLimit */) + 2*4))
if (pEList != 0) && ((*ExprList)(unsafe.Pointer(pEList)).FnExpr > mx) {
- Xsqlite3ErrorMsg(tls, pParse, ts+6526 /* "too many columns..." */, libc.VaList(bp, zObject))
+ Xsqlite3ErrorMsg(tls, pParse, ts+6657 /* "too many columns..." */, libc.VaList(bp, zObject))
}
}
// Delete an entire expression list.
-func exprListDeleteNN(tls *libc.TLS, db uintptr, pList uintptr) { /* sqlite3.c:102544:29: */
+func exprListDeleteNN(tls *libc.TLS, db uintptr, pList uintptr) { /* sqlite3.c:103156:29: */
var i int32 = (*ExprList)(unsafe.Pointer(pList)).FnExpr
var pItem uintptr = pList + 8 /* &.a */
@@ -80861,7 +82943,7 @@ func exprListDeleteNN(tls *libc.TLS, db uintptr, pList uintptr) { /* sqlite3.c:1
Xsqlite3DbFreeNN(tls, db, pList)
}
-func Xsqlite3ExprListDelete(tls *libc.TLS, db uintptr, pList uintptr) { /* sqlite3.c:102555:21: */
+func Xsqlite3ExprListDelete(tls *libc.TLS, db uintptr, pList uintptr) { /* sqlite3.c:103167:21: */
if pList != 0 {
exprListDeleteNN(tls, db, pList)
}
@@ -80869,7 +82951,7 @@ func Xsqlite3ExprListDelete(tls *libc.TLS, db uintptr, pList uintptr) { /* sqlit
// Return the bitwise-OR of all Expr.flags fields in the given
// ExprList.
-func Xsqlite3ExprListFlags(tls *libc.TLS, pList uintptr) U32 { /* sqlite3.c:102563:20: */
+func Xsqlite3ExprListFlags(tls *libc.TLS, pList uintptr) U32 { /* sqlite3.c:103175:20: */
var i int32
var m U32 = U32(0)
@@ -80886,7 +82968,7 @@ func Xsqlite3ExprListFlags(tls *libc.TLS, pList uintptr) U32 { /* sqlite3.c:1025
// pWalker->eCode to zero and abort.
//
// This callback is used by multiple expression walkers.
-func Xsqlite3SelectWalkFail(tls *libc.TLS, pWalker uintptr, NotUsed uintptr) int32 { /* sqlite3.c:102582:20: */
+func Xsqlite3SelectWalkFail(tls *libc.TLS, pWalker uintptr, NotUsed uintptr) int32 { /* sqlite3.c:103194:20: */
_ = NotUsed
(*Walker)(unsafe.Pointer(pWalker)).FeCode = U16(0)
return WRC_Abort
@@ -80898,11 +82980,11 @@ func Xsqlite3SelectWalkFail(tls *libc.TLS, pWalker uintptr, NotUsed uintptr) int
// "true" EP_IsTrue
// "false" EP_IsFalse
// anything else 0
-func Xsqlite3IsTrueOrFalse(tls *libc.TLS, zIn uintptr) U32 { /* sqlite3.c:102596:20: */
- if Xsqlite3StrICmp(tls, zIn, ts+5639 /* "true" */) == 0 {
+func Xsqlite3IsTrueOrFalse(tls *libc.TLS, zIn uintptr) U32 { /* sqlite3.c:103208:20: */
+ if Xsqlite3StrICmp(tls, zIn, ts+5770 /* "true" */) == 0 {
return U32(EP_IsTrue)
}
- if Xsqlite3StrICmp(tls, zIn, ts+5644 /* "false" */) == 0 {
+ if Xsqlite3StrICmp(tls, zIn, ts+5775 /* "false" */) == 0 {
return U32(EP_IsFalse)
}
return U32(0)
@@ -80911,7 +82993,7 @@ func Xsqlite3IsTrueOrFalse(tls *libc.TLS, zIn uintptr) U32 { /* sqlite3.c:102596
// If the input expression is an ID with the name "true" or "false"
// then convert it into an TK_TRUEFALSE term. Return non-zero if
// the conversion happened, and zero if the expression is unaltered.
-func Xsqlite3ExprIdToTrueFalse(tls *libc.TLS, pExpr uintptr) int32 { /* sqlite3.c:102608:20: */
+func Xsqlite3ExprIdToTrueFalse(tls *libc.TLS, pExpr uintptr) int32 { /* sqlite3.c:103220:20: */
var v U32
if !(((*Expr)(unsafe.Pointer((pExpr))).Fflags & (U32(EP_Quoted))) != U32(0)) &&
@@ -80925,10 +83007,10 @@ func Xsqlite3ExprIdToTrueFalse(tls *libc.TLS, pExpr uintptr) int32 { /* sqlite3.
// The argument must be a TK_TRUEFALSE Expr node. Return 1 if it is TRUE
// and 0 if it is FALSE.
-func Xsqlite3ExprTruthValue(tls *libc.TLS, pExpr uintptr) int32 { /* sqlite3.c:102625:20: */
+func Xsqlite3ExprTruthValue(tls *libc.TLS, pExpr uintptr) int32 { /* sqlite3.c:103237:20: */
pExpr = Xsqlite3ExprSkipCollate(tls, pExpr)
- return (libc.Bool32(int32(*(*int8)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(pExpr + 8 /* &.u */)) + 4))) == 0))
+ return (libc.Bool32(int32(*(*uint8)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(pExpr + 8 /* &.u */)) + 4))) == 0))
}
// If pExpr is an AND or OR expression, try to simplify it by eliminating
@@ -80942,7 +83024,7 @@ func Xsqlite3ExprTruthValue(tls *libc.TLS, pExpr uintptr) int32 { /* sqlite3.c:1
// (x<10) AND (y=22 OR false) => (x<10) AND (y=22)
// (x<10) AND (y=22 OR true) => (x<10)
// (y=22) OR true => true
-func Xsqlite3ExprSimplifiedAndOr(tls *libc.TLS, pExpr uintptr) uintptr { /* sqlite3.c:102646:21: */
+func Xsqlite3ExprSimplifiedAndOr(tls *libc.TLS, pExpr uintptr) uintptr { /* sqlite3.c:103258:21: */
if (int32((*Expr)(unsafe.Pointer(pExpr)).Fop) == TK_AND) || (int32((*Expr)(unsafe.Pointer(pExpr)).Fop) == TK_OR) {
var pRight uintptr = Xsqlite3ExprSimplifiedAndOr(tls, (*Expr)(unsafe.Pointer(pExpr)).FpRight)
@@ -80988,7 +83070,7 @@ func Xsqlite3ExprSimplifiedAndOr(tls *libc.TLS, pExpr uintptr) uintptr { /* sqli
// contain a bound parameter because they were generated by older versions
// of SQLite to be parsed by newer versions of SQLite without raising a
// malformed schema error.
-func exprNodeIsConstant(tls *libc.TLS, pWalker uintptr, pExpr uintptr) int32 { /* sqlite3.c:102687:12: */
+func exprNodeIsConstant(tls *libc.TLS, pWalker uintptr, pExpr uintptr) int32 { /* sqlite3.c:103299:12: */
// If pWalker->eCode is 2 then any term of the expression that comes from
// the ON or USING clauses of a left join disqualifies the expression
@@ -81063,7 +83145,7 @@ func exprNodeIsConstant(tls *libc.TLS, pWalker uintptr, pExpr uintptr) int32 { /
return int32(0)
}
-func exprIsConst(tls *libc.TLS, p uintptr, initFlag int32, iCur int32) int32 { /* sqlite3.c:102759:12: */
+func exprIsConst(tls *libc.TLS, p uintptr, initFlag int32, iCur int32) int32 { /* sqlite3.c:103371:12: */
bp := tls.Alloc(48)
defer tls.Free(48)
@@ -81087,7 +83169,7 @@ func exprIsConst(tls *libc.TLS, p uintptr, initFlag int32, iCur int32) int32 { /
// For the purposes of this function, a double-quoted string (ex: "abc")
// is considered a variable but a single-quoted string (ex: 'abc') is
// a constant.
-func Xsqlite3ExprIsConstant(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:102780:20: */
+func Xsqlite3ExprIsConstant(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:103392:20: */
return exprIsConst(tls, p, 1, 0)
}
@@ -81102,7 +83184,7 @@ func Xsqlite3ExprIsConstant(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:10278
// When this routine returns true, it indicates that the expression
// can be added to the pParse->pConstExpr list and evaluated once when
// the prepared statement starts up. See sqlite3ExprCodeRunJustOnce().
-func Xsqlite3ExprIsConstantNotJoin(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:102797:20: */
+func Xsqlite3ExprIsConstantNotJoin(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:103409:20: */
return exprIsConst(tls, p, 2, 0)
}
@@ -81110,12 +83192,12 @@ func Xsqlite3ExprIsConstantNotJoin(tls *libc.TLS, p uintptr) int32 { /* sqlite3.
// for any single row of the table with cursor iCur. In other words, the
// expression must not refer to any non-deterministic function nor any
// table other than iCur.
-func Xsqlite3ExprIsTableConstant(tls *libc.TLS, p uintptr, iCur int32) int32 { /* sqlite3.c:102807:20: */
+func Xsqlite3ExprIsTableConstant(tls *libc.TLS, p uintptr, iCur int32) int32 { /* sqlite3.c:103419:20: */
return exprIsConst(tls, p, 3, iCur)
}
// sqlite3WalkExpr() callback used by sqlite3ExprIsConstantOrGroupBy().
-func exprNodeIsConstantOrGroupBy(tls *libc.TLS, pWalker uintptr, pExpr uintptr) int32 { /* sqlite3.c:102815:12: */
+func exprNodeIsConstantOrGroupBy(tls *libc.TLS, pWalker uintptr, pExpr uintptr) int32 { /* sqlite3.c:103427:12: */
var pGroupBy uintptr = *(*uintptr)(unsafe.Pointer(pWalker + 40 /* &.u */))
var i int32
@@ -81157,7 +83239,7 @@ func exprNodeIsConstantOrGroupBy(tls *libc.TLS, pWalker uintptr, pExpr uintptr)
// alternative collating sequences are uncommon, and this is only an
// optimization, so we take the easy way out and simply require the
// GROUP BY to use the BINARY collating sequence.
-func Xsqlite3ExprIsConstantOrGroupBy(tls *libc.TLS, pParse uintptr, p uintptr, pGroupBy uintptr) int32 { /* sqlite3.c:102859:20: */
+func Xsqlite3ExprIsConstantOrGroupBy(tls *libc.TLS, pParse uintptr, p uintptr, pGroupBy uintptr) int32 { /* sqlite3.c:103471:20: */
bp := tls.Alloc(48)
defer tls.Free(48)
@@ -81193,7 +83275,7 @@ func Xsqlite3ExprIsConstantOrGroupBy(tls *libc.TLS, pParse uintptr, p uintptr, p
// For the purposes of this function, a double-quoted string (ex: "abc")
// is considered a variable but a single-quoted string (ex: 'abc') is
// a constant.
-func Xsqlite3ExprIsConstantOrFunction(tls *libc.TLS, p uintptr, isInit U8) int32 { /* sqlite3.c:102891:20: */
+func Xsqlite3ExprIsConstantOrFunction(tls *libc.TLS, p uintptr, isInit U8) int32 { /* sqlite3.c:103503:20: */
return exprIsConst(tls, p, (4 + int32(isInit)), 0)
}
@@ -81202,7 +83284,7 @@ func Xsqlite3ExprIsConstantOrFunction(tls *libc.TLS, p uintptr, isInit U8) int32
// to fit in a 32-bit integer, return 1 and put the value of the integer
// in *pValue. If the expression is not an integer or if it is too big
// to fit in a signed 32-bit integer, return 0 and leave *pValue unchanged.
-func Xsqlite3ExprIsInteger(tls *libc.TLS, p uintptr, pValue uintptr) int32 { /* sqlite3.c:102920:20: */
+func Xsqlite3ExprIsInteger(tls *libc.TLS, p uintptr, pValue uintptr) int32 { /* sqlite3.c:103532:20: */
bp := tls.Alloc(4)
defer tls.Free(4)
@@ -81255,10 +83337,12 @@ func Xsqlite3ExprIsInteger(tls *libc.TLS, p uintptr, pValue uintptr) int32 { /*
// hand, a false negative (returning FALSE when the result could be NULL)
// will likely result in an incorrect answer. So when in doubt, return
// TRUE.
-func Xsqlite3ExprCanBeNull(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:102966:20: */
+func Xsqlite3ExprCanBeNull(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:103578:20: */
var op U8
+
for (int32((*Expr)(unsafe.Pointer(p)).Fop) == TK_UPLUS) || (int32((*Expr)(unsafe.Pointer(p)).Fop) == TK_UMINUS) {
p = (*Expr)(unsafe.Pointer(p)).FpLeft
+
}
op = (*Expr)(unsafe.Pointer(p)).Fop
if int32(op) == TK_REGISTER {
@@ -81291,7 +83375,7 @@ func Xsqlite3ExprCanBeNull(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:102966
// can be omitted. When in doubt return FALSE. A false negative
// is harmless. A false positive, however, can result in the wrong
// answer.
-func Xsqlite3ExprNeedsNoAffinityChange(tls *libc.TLS, p uintptr, aff int8) int32 { /* sqlite3.c:103000:20: */
+func Xsqlite3ExprNeedsNoAffinityChange(tls *libc.TLS, p uintptr, aff uint8) int32 { /* sqlite3.c:103614:20: */
var op U8
var unaryMinus int32 = 0
if int32(aff) == SQLITE_AFF_BLOB {
@@ -81344,14 +83428,14 @@ func Xsqlite3ExprNeedsNoAffinityChange(tls *libc.TLS, p uintptr, aff int8) int32
}
// Return TRUE if the given string is a row-id column name.
-func Xsqlite3IsRowid(tls *libc.TLS, z uintptr) int32 { /* sqlite3.c:103036:20: */
- if Xsqlite3StrICmp(tls, z, ts+6549 /* "_ROWID_" */) == 0 {
+func Xsqlite3IsRowid(tls *libc.TLS, z uintptr) int32 { /* sqlite3.c:103650:20: */
+ if Xsqlite3StrICmp(tls, z, ts+6680 /* "_ROWID_" */) == 0 {
return 1
}
- if Xsqlite3StrICmp(tls, z, ts+6557 /* "ROWID" */) == 0 {
+ if Xsqlite3StrICmp(tls, z, ts+6688 /* "ROWID" */) == 0 {
return 1
}
- if Xsqlite3StrICmp(tls, z, ts+6563 /* "OID" */) == 0 {
+ if Xsqlite3StrICmp(tls, z, ts+6694 /* "OID" */) == 0 {
return 1
}
return 0
@@ -81362,7 +83446,7 @@ func Xsqlite3IsRowid(tls *libc.TLS, z uintptr) int32 { /* sqlite3.c:103036:20: *
// a pointer to the SELECT statement. If pX is not a SELECT statement,
// or if the SELECT statement needs to be manifested into a transient
// table, then return NULL.
-func isCandidateForInOpt(tls *libc.TLS, pX uintptr) uintptr { /* sqlite3.c:103051:15: */
+func isCandidateForInOpt(tls *libc.TLS, pX uintptr) uintptr { /* sqlite3.c:103665:15: */
var p uintptr
var pSrc uintptr
var pEList uintptr
@@ -81420,7 +83504,7 @@ func isCandidateForInOpt(tls *libc.TLS, pX uintptr) uintptr { /* sqlite3.c:10305
// it contains any NULL entries. Cause the register at regHasNull to be set
// to a non-NULL value if iCur contains no NULLs. Cause register regHasNull
// to be set to NULL if iCur contains one or more NULL values.
-func sqlite3SetHasNullFlag(tls *libc.TLS, v uintptr, iCur int32, regHasNull int32) { /* sqlite3.c:103096:13: */
+func sqlite3SetHasNullFlag(tls *libc.TLS, v uintptr, iCur int32, regHasNull int32) { /* sqlite3.c:103710:13: */
var addr1 int32
Xsqlite3VdbeAddOp2(tls, v, OP_Integer, 0, regHasNull)
addr1 = Xsqlite3VdbeAddOp1(tls, v, OP_Rewind, iCur)
@@ -81432,7 +83516,7 @@ func sqlite3SetHasNullFlag(tls *libc.TLS, v uintptr, iCur int32, regHasNull int3
// The argument is an IN operator with a list (not a subquery) on the
// right-hand side. Return TRUE if that list is constant.
-func sqlite3InRhsIsConstant(tls *libc.TLS, pIn uintptr) int32 { /* sqlite3.c:103113:12: */
+func sqlite3InRhsIsConstant(tls *libc.TLS, pIn uintptr) int32 { /* sqlite3.c:103727:12: */
var pLHS uintptr
var res int32
@@ -81521,7 +83605,7 @@ func sqlite3InRhsIsConstant(tls *libc.TLS, pIn uintptr) int32 { /* sqlite3.c:103
// CREATE INDEX i1 ON t1(b, c, a);
//
// then aiMap[] is populated with {2, 0, 1}.
-func Xsqlite3FindInIndex(tls *libc.TLS, pParse uintptr, pX uintptr, inFlags U32, prRhsHasNull uintptr, aiMap uintptr, piTab uintptr) int32 { /* sqlite3.c:103206:20: */
+func Xsqlite3FindInIndex(tls *libc.TLS, pParse uintptr, pX uintptr, inFlags U32, prRhsHasNull uintptr, aiMap uintptr, piTab uintptr) int32 { /* sqlite3.c:103820:20: */
bp := tls.Alloc(16)
defer tls.Free(16)
@@ -81579,7 +83663,7 @@ func Xsqlite3FindInIndex(tls *libc.TLS, pParse uintptr, pX uintptr, inFlags U32,
Xsqlite3OpenTable(tls, pParse, iTab, iDb, pTab, OP_OpenRead)
eType = IN_INDEX_ROWID
- Xsqlite3VdbeExplain(tls, pParse, uint8(0), ts+6567 /* "USING ROWID SEAR..." */, libc.VaList(bp, (*Table)(unsafe.Pointer(pTab)).FzName))
+ Xsqlite3VdbeExplain(tls, pParse, uint8(0), ts+6698 /* "USING ROWID SEAR..." */, libc.VaList(bp, (*Table)(unsafe.Pointer(pTab)).FzName))
Xsqlite3VdbeJumpHere(tls, v, iAddr)
} else {
var pIdx uintptr // Iterator variable
@@ -81593,8 +83677,8 @@ func Xsqlite3FindInIndex(tls *libc.TLS, pParse uintptr, pX uintptr, inFlags U32,
for i = 0; (i < nExpr) && (affinity_ok != 0); i++ {
var pLhs uintptr = Xsqlite3VectorFieldSubexpr(tls, (*Expr)(unsafe.Pointer(pX)).FpLeft, i)
var iCol int32 = int32((*Expr)(unsafe.Pointer((*ExprList_item)(unsafe.Pointer((pEList + 8 /* &.a */) + uintptr(i)*32)).FpExpr)).FiColumn)
- var idxaff int8 = Xsqlite3TableColumnAffinity(tls, pTab, iCol) // RHS table
- var cmpaff int8 = Xsqlite3CompareAffinity(tls, pLhs, idxaff)
+ var idxaff uint8 = Xsqlite3TableColumnAffinity(tls, pTab, iCol) // RHS table
+ var cmpaff uint8 = Xsqlite3CompareAffinity(tls, pLhs, idxaff)
switch int32(cmpaff) {
case SQLITE_AFF_BLOB:
@@ -81670,7 +83754,7 @@ func Xsqlite3FindInIndex(tls *libc.TLS, pParse uintptr, pX uintptr, inFlags U32,
if colUsed == ((Bitmask((uint64(1))) << (nExpr)) - uint64(1)) {
// If we reach this point, that means the index pIdx is usable
var iAddr int32 = Xsqlite3VdbeAddOp0(tls, v, OP_Once)
- Xsqlite3VdbeExplain(tls, pParse, uint8(0), ts+6614 /* "USING INDEX %s F..." */, libc.VaList(bp+8, (*Index)(unsafe.Pointer(pIdx)).FzName))
+ Xsqlite3VdbeExplain(tls, pParse, uint8(0), ts+6745 /* "USING INDEX %s F..." */, libc.VaList(bp+8, (*Index)(unsafe.Pointer(pIdx)).FzName))
Xsqlite3VdbeAddOp3(tls, v, OP_OpenRead, iTab, int32((*Index)(unsafe.Pointer(pIdx)).Ftnum), iDb)
Xsqlite3VdbeSetP4KeyInfo(tls, pParse, pIdx)
@@ -81739,7 +83823,7 @@ func Xsqlite3FindInIndex(tls *libc.TLS, pParse uintptr, pX uintptr, inFlags U32,
//
// It is the responsibility of the caller to ensure that the returned
// string is eventually freed using sqlite3DbFree().
-func exprINAffinity(tls *libc.TLS, pParse uintptr, pExpr uintptr) uintptr { /* sqlite3.c:103429:13: */
+func exprINAffinity(tls *libc.TLS, pParse uintptr, pExpr uintptr) uintptr { /* sqlite3.c:104043:13: */
var pLeft uintptr = (*Expr)(unsafe.Pointer(pExpr)).FpLeft
var nVal int32 = Xsqlite3ExprVectorSize(tls, pLeft)
var pSelect uintptr
@@ -81755,14 +83839,14 @@ func exprINAffinity(tls *libc.TLS, pParse uintptr, pExpr uintptr) uintptr { /* s
var i int32
for i = 0; i < nVal; i++ {
var pA uintptr = Xsqlite3VectorFieldSubexpr(tls, pLeft, i)
- var a int8 = Xsqlite3ExprAffinity(tls, pA)
+ var a uint8 = Xsqlite3ExprAffinity(tls, pA)
if pSelect != 0 {
- *(*int8)(unsafe.Pointer(zRet + uintptr(i))) = Xsqlite3CompareAffinity(tls, (*ExprList_item)(unsafe.Pointer(((*Select)(unsafe.Pointer(pSelect)).FpEList+8 /* &.a */)+uintptr(i)*32)).FpExpr, a)
+ *(*uint8)(unsafe.Pointer(zRet + uintptr(i))) = Xsqlite3CompareAffinity(tls, (*ExprList_item)(unsafe.Pointer(((*Select)(unsafe.Pointer(pSelect)).FpEList+8 /* &.a */)+uintptr(i)*32)).FpExpr, a)
} else {
- *(*int8)(unsafe.Pointer(zRet + uintptr(i))) = a
+ *(*uint8)(unsafe.Pointer(zRet + uintptr(i))) = a
}
}
- *(*int8)(unsafe.Pointer(zRet + uintptr(nVal))) = int8(0)
+ *(*uint8)(unsafe.Pointer(zRet + uintptr(nVal))) = uint8(0)
}
return zRet
}
@@ -81771,12 +83855,12 @@ func exprINAffinity(tls *libc.TLS, pParse uintptr, pExpr uintptr) uintptr { /* s
// message of the form:
//
// "sub-select returns N columns - expected M"
-func Xsqlite3SubselectError(tls *libc.TLS, pParse uintptr, nActual int32, nExpect int32) { /* sqlite3.c:103461:21: */
+func Xsqlite3SubselectError(tls *libc.TLS, pParse uintptr, nActual int32, nExpect int32) { /* sqlite3.c:104075:21: */
bp := tls.Alloc(16)
defer tls.Free(16)
if (*Parse)(unsafe.Pointer(pParse)).FnErr == 0 {
- var zFmt uintptr = ts + 6645 /* "sub-select retur..." */
+ var zFmt uintptr = ts + 6776 /* "sub-select retur..." */
Xsqlite3ErrorMsg(tls, pParse, zFmt, libc.VaList(bp, nActual, nExpect))
}
}
@@ -81790,11 +83874,11 @@ func Xsqlite3SubselectError(tls *libc.TLS, pParse uintptr, nActual int32, nExpec
// Or, if it is a regular scalar vector:
//
// "row value misused"
-func Xsqlite3VectorErrorMsg(tls *libc.TLS, pParse uintptr, pExpr uintptr) { /* sqlite3.c:103480:21: */
+func Xsqlite3VectorErrorMsg(tls *libc.TLS, pParse uintptr, pExpr uintptr) { /* sqlite3.c:104094:21: */
if ((*Expr)(unsafe.Pointer(pExpr)).Fflags & U32(EP_xIsSelect)) != 0 {
Xsqlite3SubselectError(tls, pParse, (*ExprList)(unsafe.Pointer((*Select)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(pExpr + 32 /* &.x */)))).FpEList)).FnExpr, 1)
} else {
- Xsqlite3ErrorMsg(tls, pParse, ts+5417 /* "row value misuse..." */, 0)
+ Xsqlite3ErrorMsg(tls, pParse, ts+5548 /* "row value misuse..." */, 0)
}
}
@@ -81818,7 +83902,7 @@ func Xsqlite3VectorErrorMsg(tls *libc.TLS, pParse uintptr, pExpr uintptr) { /* s
// if either column has NUMERIC or INTEGER affinity. If neither
// 'x' nor the SELECT... statement are columns, then numeric affinity
// is used.
-func Xsqlite3CodeRhsOfIN(tls *libc.TLS, pParse uintptr, pExpr uintptr, iTab int32) { /* sqlite3.c:103514:21: */
+func Xsqlite3CodeRhsOfIN(tls *libc.TLS, pParse uintptr, pExpr uintptr, iTab int32) { /* sqlite3.c:104128:21: */
bp := tls.Alloc(65)
defer tls.Free(65)
@@ -81847,7 +83931,7 @@ func Xsqlite3CodeRhsOfIN(tls *libc.TLS, pParse uintptr, pExpr uintptr, iTab int3
if ((*Expr)(unsafe.Pointer((pExpr))).Fflags & (U32(EP_Subrtn))) != U32(0) {
addrOnce = Xsqlite3VdbeAddOp0(tls, v, OP_Once)
if ((*Expr)(unsafe.Pointer((pExpr))).Fflags & (U32(EP_xIsSelect))) != U32(0) {
- Xsqlite3VdbeExplain(tls, pParse, uint8(0), ts+6689 /* "REUSE LIST SUBQU..." */, libc.VaList(bp, (*Select)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(pExpr + 32 /* &.x */)))).FselId))
+ Xsqlite3VdbeExplain(tls, pParse, uint8(0), ts+6820 /* "REUSE LIST SUBQU..." */, libc.VaList(bp, (*Select)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(pExpr + 32 /* &.x */)))).FselId))
}
Xsqlite3VdbeAddOp2(tls, v, OP_Gosub, *(*int32)(unsafe.Pointer(pExpr + 64 /* &.y */ /* &.sub */ + 4 /* &.regReturn */)),
*(*int32)(unsafe.Pointer(pExpr + 64 /* &.y */ /* &.sub */ /* &.iAddr */)))
@@ -81883,29 +83967,37 @@ func Xsqlite3CodeRhsOfIN(tls *libc.TLS, pParse uintptr, pExpr uintptr, iTab int3
var pSelect uintptr = *(*uintptr)(unsafe.Pointer(pExpr + 32 /* &.x */))
var pEList uintptr = (*Select)(unsafe.Pointer(pSelect)).FpEList
- Xsqlite3VdbeExplain(tls, pParse, uint8(1), ts+6712 /* "%sLIST SUBQUERY ..." */, libc.VaList(bp+8, func() uintptr {
+ Xsqlite3VdbeExplain(tls, pParse, uint8(1), ts+6843 /* "%sLIST SUBQUERY ..." */, libc.VaList(bp+8, func() uintptr {
if addrOnce != 0 {
- return ts + 703 /* "" */
+ return ts + 755 /* "" */
}
- return ts + 6731 /* "CORRELATED " */
+ return ts + 6862 /* "CORRELATED " */
}(), (*Select)(unsafe.Pointer(pSelect)).FselId))
// If the LHS and RHS of the IN operator do not match, that
// error will have been caught long before we reach this point.
if (*ExprList)(unsafe.Pointer(pEList)).FnExpr == nVal {
+ var pCopy uintptr
// var dest SelectDest at bp+24, 40
var i int32
+ var rc int32
Xsqlite3SelectDestInit(tls, bp+24 /* &dest */, SRT_Set, iTab)
(*SelectDest)(unsafe.Pointer(bp + 24 /* &dest */)).FzAffSdst = exprINAffinity(tls, pParse, pExpr)
(*Select)(unsafe.Pointer(pSelect)).FiLimit = 0
// Caused by OOM in sqlite3KeyInfoAlloc()
- if Xsqlite3Select(tls, pParse, pSelect, bp+24 /* &dest */) != 0 {
- Xsqlite3DbFree(tls, (*Parse)(unsafe.Pointer(pParse)).Fdb, (*SelectDest)(unsafe.Pointer(bp+24 /* &dest */)).FzAffSdst)
+ pCopy = Xsqlite3SelectDup(tls, (*Parse)(unsafe.Pointer(pParse)).Fdb, pSelect, 0)
+ if (*Sqlite3)(unsafe.Pointer((*Parse)(unsafe.Pointer(pParse)).Fdb)).FmallocFailed != 0 {
+ rc = 1
+ } else {
+ rc = Xsqlite3Select(tls, pParse, pCopy, bp+24 /* &dest */)
+ }
+ Xsqlite3SelectDelete(tls, (*Parse)(unsafe.Pointer(pParse)).Fdb, pCopy)
+ Xsqlite3DbFree(tls, (*Parse)(unsafe.Pointer(pParse)).Fdb, (*SelectDest)(unsafe.Pointer(bp+24 /* &dest */)).FzAffSdst)
+ if rc != 0 {
Xsqlite3KeyInfoUnref(tls, pKeyInfo)
return
}
- Xsqlite3DbFree(tls, (*Parse)(unsafe.Pointer(pParse)).Fdb, (*SelectDest)(unsafe.Pointer(bp+24 /* &dest */)).FzAffSdst)
// OOM will cause exit after sqlite3Select()
for i = 0; i < nVal; i++ {
@@ -81921,18 +84013,18 @@ func Xsqlite3CodeRhsOfIN(tls *libc.TLS, pParse uintptr, pExpr uintptr, iTab int3
// store it in the temporary table. If is a column, then use
// that columns affinity when building index keys. If is not
// a column, use numeric affinity.
- // var affinity int8 at bp+64, 1
+ // var affinity uint8 at bp+64, 1
// Affinity of the LHS of the IN
var i int32
var pList uintptr = *(*uintptr)(unsafe.Pointer(pExpr + 32 /* &.x */))
var pItem uintptr
var r1 int32
var r2 int32
- *(*int8)(unsafe.Pointer(bp + 64 /* affinity */)) = Xsqlite3ExprAffinity(tls, pLeft)
- if int32(*(*int8)(unsafe.Pointer(bp + 64 /* affinity */))) <= SQLITE_AFF_NONE {
- *(*int8)(unsafe.Pointer(bp + 64 /* affinity */)) = int8(SQLITE_AFF_BLOB)
- } else if int32(*(*int8)(unsafe.Pointer(bp + 64 /* affinity */))) == SQLITE_AFF_REAL {
- *(*int8)(unsafe.Pointer(bp + 64 /* affinity */)) = int8(SQLITE_AFF_NUMERIC)
+ *(*uint8)(unsafe.Pointer(bp + 64 /* affinity */)) = Xsqlite3ExprAffinity(tls, pLeft)
+ if int32(*(*uint8)(unsafe.Pointer(bp + 64 /* affinity */))) <= SQLITE_AFF_NONE {
+ *(*uint8)(unsafe.Pointer(bp + 64 /* affinity */)) = uint8(SQLITE_AFF_BLOB)
+ } else if int32(*(*uint8)(unsafe.Pointer(bp + 64 /* affinity */))) == SQLITE_AFF_REAL {
+ *(*uint8)(unsafe.Pointer(bp + 64 /* affinity */)) = uint8(SQLITE_AFF_NUMERIC)
}
if pKeyInfo != 0 {
@@ -82002,7 +84094,7 @@ func Xsqlite3CodeRhsOfIN(tls *libc.TLS, pParse uintptr, pExpr uintptr, iTab int3
// the result is stored in a contiguous array of registers and the
// return value is the register of the left-most result column.
// Return 0 if an error occurs.
-func Xsqlite3CodeSubselect(tls *libc.TLS, pParse uintptr, pExpr uintptr) int32 { /* sqlite3.c:103702:20: */
+func Xsqlite3CodeSubselect(tls *libc.TLS, pParse uintptr, pExpr uintptr) int32 { /* sqlite3.c:104320:20: */
bp := tls.Alloc(64)
defer tls.Free(64)
@@ -82016,8 +84108,26 @@ func Xsqlite3CodeSubselect(tls *libc.TLS, pParse uintptr, pExpr uintptr) int32 {
var v uintptr = (*Parse)(unsafe.Pointer(pParse)).FpVdbe
+ if (*Parse)(unsafe.Pointer(pParse)).FnErr != 0 {
+ return 0
+ }
+
pSel = *(*uintptr)(unsafe.Pointer(pExpr + 32 /* &.x */))
+ // If this routine has already been coded, then invoke it as a
+ // subroutine.
+ if ((*Expr)(unsafe.Pointer((pExpr))).Fflags & (U32(EP_Subrtn))) != U32(0) {
+ Xsqlite3VdbeExplain(tls, pParse, uint8(0), ts+6874 /* "REUSE SUBQUERY %..." */, libc.VaList(bp, (*Select)(unsafe.Pointer(pSel)).FselId))
+ Xsqlite3VdbeAddOp2(tls, v, OP_Gosub, *(*int32)(unsafe.Pointer(pExpr + 64 /* &.y */ /* &.sub */ + 4 /* &.regReturn */)),
+ *(*int32)(unsafe.Pointer(pExpr + 64 /* &.y */ /* &.sub */ /* &.iAddr */)))
+ return (*Expr)(unsafe.Pointer(pExpr)).FiTable
+ }
+
+ // Begin coding the subroutine
+ *(*U32)(unsafe.Pointer(pExpr + 4 /* &.flags */)) |= (U32(EP_Subrtn))
+ *(*int32)(unsafe.Pointer(pExpr + 64 /* &.y */ /* &.sub */ + 4 /* &.regReturn */)) = libc.PreIncInt32(&(*Parse)(unsafe.Pointer(pParse)).FnMem, 1)
+ *(*int32)(unsafe.Pointer(pExpr + 64 /* &.y */ /* &.sub */ /* &.iAddr */)) = (Xsqlite3VdbeAddOp2(tls, v, OP_Integer, 0, *(*int32)(unsafe.Pointer(pExpr + 64 /* &.y */ /* &.sub */ + 4 /* &.regReturn */))) + 1)
+
// The evaluation of the EXISTS/SELECT must be repeated every time it
// is encountered if any of the following is true:
//
@@ -82028,20 +84138,6 @@ func Xsqlite3CodeSubselect(tls *libc.TLS, pParse uintptr, pExpr uintptr) int32 {
// If all of the above are false, then we can run this code just once
// save the results, and reuse the same result on subsequent invocations.
if !(((*Expr)(unsafe.Pointer((pExpr))).Fflags & (U32(EP_VarSelect))) != U32(0)) {
- // If this routine has already been coded, then invoke it as a
- // subroutine.
- if ((*Expr)(unsafe.Pointer((pExpr))).Fflags & (U32(EP_Subrtn))) != U32(0) {
- Xsqlite3VdbeExplain(tls, pParse, uint8(0), ts+6743 /* "REUSE SUBQUERY %..." */, libc.VaList(bp, (*Select)(unsafe.Pointer(pSel)).FselId))
- Xsqlite3VdbeAddOp2(tls, v, OP_Gosub, *(*int32)(unsafe.Pointer(pExpr + 64 /* &.y */ /* &.sub */ + 4 /* &.regReturn */)),
- *(*int32)(unsafe.Pointer(pExpr + 64 /* &.y */ /* &.sub */ /* &.iAddr */)))
- return (*Expr)(unsafe.Pointer(pExpr)).FiTable
- }
-
- // Begin coding the subroutine
- *(*U32)(unsafe.Pointer(pExpr + 4 /* &.flags */)) |= (U32(EP_Subrtn))
- *(*int32)(unsafe.Pointer(pExpr + 64 /* &.y */ /* &.sub */ + 4 /* &.regReturn */)) = libc.PreIncInt32(&(*Parse)(unsafe.Pointer(pParse)).FnMem, 1)
- *(*int32)(unsafe.Pointer(pExpr + 64 /* &.y */ /* &.sub */ /* &.iAddr */)) = (Xsqlite3VdbeAddOp2(tls, v, OP_Integer, 0, *(*int32)(unsafe.Pointer(pExpr + 64 /* &.y */ /* &.sub */ + 4 /* &.regReturn */))) + 1)
-
addrOnce = Xsqlite3VdbeAddOp0(tls, v, OP_Once)
}
@@ -82054,11 +84150,11 @@ func Xsqlite3CodeSubselect(tls *libc.TLS, pParse uintptr, pExpr uintptr) int32 {
//
// In both cases, the query is augmented with "LIMIT 1". Any
// preexisting limit is discarded in place of the new LIMIT 1.
- Xsqlite3VdbeExplain(tls, pParse, uint8(1), ts+6761 /* "%sSCALAR SUBQUER..." */, libc.VaList(bp+8, func() uintptr {
+ Xsqlite3VdbeExplain(tls, pParse, uint8(1), ts+6892 /* "%sSCALAR SUBQUER..." */, libc.VaList(bp+8, func() uintptr {
if addrOnce != 0 {
- return ts + 703 /* "" */
+ return ts + 755 /* "" */
}
- return ts + 6731 /* "CORRELATED " */
+ return ts + 6862 /* "CORRELATED " */
}(), (*Select)(unsafe.Pointer(pSel)).FselId))
if int32((*Expr)(unsafe.Pointer(pExpr)).Fop) == TK_SELECT {
nReg = (*ExprList)(unsafe.Pointer((*Select)(unsafe.Pointer(pSel)).FpEList)).FnExpr
@@ -82082,9 +84178,9 @@ func Xsqlite3CodeSubselect(tls *libc.TLS, pParse uintptr, pExpr uintptr) int32 {
// The subquery already has a limit. If the pre-existing limit is X
// then make the new limit X<>0 so that the new limit is either 1 or 0
var db uintptr = (*Parse)(unsafe.Pointer(pParse)).Fdb
- pLimit = Xsqlite3Expr(tls, db, TK_INTEGER, ts+6375 /* "0" */)
+ pLimit = Xsqlite3Expr(tls, db, TK_INTEGER, ts+6506 /* "0" */)
if pLimit != 0 {
- (*Expr)(unsafe.Pointer(pLimit)).FaffExpr = int8(SQLITE_AFF_NUMERIC)
+ (*Expr)(unsafe.Pointer(pLimit)).FaffExpr = uint8(SQLITE_AFF_NUMERIC)
pLimit = Xsqlite3PExpr(tls, pParse, TK_NE,
Xsqlite3ExprDup(tls, db, (*Expr)(unsafe.Pointer((*Select)(unsafe.Pointer(pSel)).FpLimit)).FpLeft, 0), pLimit)
}
@@ -82092,24 +84188,27 @@ func Xsqlite3CodeSubselect(tls *libc.TLS, pParse uintptr, pExpr uintptr) int32 {
(*Expr)(unsafe.Pointer((*Select)(unsafe.Pointer(pSel)).FpLimit)).FpLeft = pLimit
} else {
// If there is no pre-existing limit add a limit of 1
- pLimit = Xsqlite3Expr(tls, (*Parse)(unsafe.Pointer(pParse)).Fdb, TK_INTEGER, ts+6782 /* "1" */)
+ pLimit = Xsqlite3Expr(tls, (*Parse)(unsafe.Pointer(pParse)).Fdb, TK_INTEGER, ts+6913 /* "1" */)
(*Select)(unsafe.Pointer(pSel)).FpLimit = Xsqlite3PExpr(tls, pParse, TK_LIMIT, pLimit, uintptr(0))
}
(*Select)(unsafe.Pointer(pSel)).FiLimit = 0
if Xsqlite3Select(tls, pParse, pSel, bp+24 /* &dest */) != 0 {
+ if (*Parse)(unsafe.Pointer(pParse)).FnErr != 0 {
+ (*Expr)(unsafe.Pointer(pExpr)).Fop2 = (*Expr)(unsafe.Pointer(pExpr)).Fop
+ (*Expr)(unsafe.Pointer(pExpr)).Fop = U8(TK_ERROR)
+ }
return 0
}
(*Expr)(unsafe.Pointer(pExpr)).FiTable = libc.AssignInt32(&rReg, (*SelectDest)(unsafe.Pointer(bp+24 /* &dest */)).FiSDParm)
if addrOnce != 0 {
Xsqlite3VdbeJumpHere(tls, v, addrOnce)
-
- // Subroutine return
- Xsqlite3VdbeAddOp1(tls, v, OP_Return, *(*int32)(unsafe.Pointer(pExpr + 64 /* &.y */ /* &.sub */ + 4 /* &.regReturn */)))
- Xsqlite3VdbeChangeP1(tls, v, (*(*int32)(unsafe.Pointer((pExpr + 64 /* &.y */ /* &.sub */) /* &.iAddr */)) - 1), (Xsqlite3VdbeCurrentAddr(tls, v) - 1))
- Xsqlite3ClearTempRegCache(tls, pParse)
}
+ // Subroutine return
+ Xsqlite3VdbeAddOp1(tls, v, OP_Return, *(*int32)(unsafe.Pointer(pExpr + 64 /* &.y */ /* &.sub */ + 4 /* &.regReturn */)))
+ Xsqlite3VdbeChangeP1(tls, v, (*(*int32)(unsafe.Pointer((pExpr + 64 /* &.y */ /* &.sub */) /* &.iAddr */)) - 1), (Xsqlite3VdbeCurrentAddr(tls, v) - 1))
+ Xsqlite3ClearTempRegCache(tls, pParse)
return rReg
}
@@ -82117,9 +84216,9 @@ func Xsqlite3CodeSubselect(tls *libc.TLS, pParse uintptr, pExpr uintptr) int32 {
// sub-select on the RHS of the IN() operator has the same number of
// columns as the vector on the LHS. Or, if the RHS of the IN() is not
// a sub-query, that the LHS is a vector of size 1.
-func Xsqlite3ExprCheckIN(tls *libc.TLS, pParse uintptr, pIn uintptr) int32 { /* sqlite3.c:103817:20: */
+func Xsqlite3ExprCheckIN(tls *libc.TLS, pParse uintptr, pIn uintptr) int32 { /* sqlite3.c:104440:20: */
var nVector int32 = Xsqlite3ExprVectorSize(tls, (*Expr)(unsafe.Pointer(pIn)).FpLeft)
- if ((*Expr)(unsafe.Pointer(pIn)).Fflags & U32(EP_xIsSelect)) != 0 {
+ if (((*Expr)(unsafe.Pointer(pIn)).Fflags & U32(EP_xIsSelect)) != U32(0)) && !(int32((*Sqlite3)(unsafe.Pointer((*Parse)(unsafe.Pointer(pParse)).Fdb)).FmallocFailed) != 0) {
if nVector != (*ExprList)(unsafe.Pointer((*Select)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(pIn + 32 /* &.x */)))).FpEList)).FnExpr {
Xsqlite3SubselectError(tls, pParse, (*ExprList)(unsafe.Pointer((*Select)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(pIn + 32 /* &.x */)))).FpEList)).FnExpr, nVector)
return 1
@@ -82154,7 +84253,7 @@ func Xsqlite3ExprCheckIN(tls *libc.TLS, pParse uintptr, pIn uintptr) int32 { /*
//
// See the separate in-operator.md documentation file in the canonical
// SQLite source tree for additional information.
-func sqlite3ExprCodeIN(tls *libc.TLS, pParse uintptr, pExpr uintptr, destIfFalse int32, destIfNull int32) { /* sqlite3.c:103858:13: */
+func sqlite3ExprCodeIN(tls *libc.TLS, pParse uintptr, pExpr uintptr, destIfFalse int32, destIfNull int32) { /* sqlite3.c:104481:13: */
bp := tls.Alloc(16)
defer tls.Free(16)
@@ -82210,7 +84309,7 @@ __1:
zAff = exprINAffinity(tls, pParse, pExpr)
nVector = Xsqlite3ExprVectorSize(tls, (*Expr)(unsafe.Pointer(pExpr)).FpLeft)
aiMap = Xsqlite3DbMallocZero(tls,
- (*Parse)(unsafe.Pointer(pParse)).Fdb, (uint64((uint64(nVector) * (uint64(unsafe.Sizeof(int32(0))) + uint64(unsafe.Sizeof(int8(0))))) + uint64(1))))
+ (*Parse)(unsafe.Pointer(pParse)).Fdb, (uint64((uint64(nVector) * (uint64(unsafe.Sizeof(int32(0))) + uint64(unsafe.Sizeof(uint8(0))))) + uint64(1))))
if !((*Sqlite3)(unsafe.Pointer((*Parse)(unsafe.Pointer(pParse)).Fdb)).FmallocFailed != 0) {
goto __2
}
@@ -82332,7 +84431,7 @@ __16:
Xsqlite3VdbeAddOp4(tls, v, op, rLhs, labelOk, r2,
pColl, -2)
- Xsqlite3VdbeChangeP5(tls, v, uint16(*(*int8)(unsafe.Pointer(zAff))))
+ Xsqlite3VdbeChangeP5(tls, v, uint16(*(*uint8)(unsafe.Pointer(zAff))))
goto __18
__17:
if rLhs != r2 {
@@ -82344,7 +84443,7 @@ __17:
Xsqlite3VdbeAddOp4(tls, v, op1, rLhs, destIfFalse, r2,
pColl, -2)
- Xsqlite3VdbeChangeP5(tls, v, (uint16(int32(*(*int8)(unsafe.Pointer(zAff))) | SQLITE_JUMPIFNULL)))
+ Xsqlite3VdbeChangeP5(tls, v, (uint16(int32(*(*uint8)(unsafe.Pointer(zAff))) | SQLITE_JUMPIFNULL)))
__18:
;
goto __14
@@ -82391,12 +84490,18 @@ __23:
goto __25
}
p = Xsqlite3VectorFieldSubexpr(tls, (*Expr)(unsafe.Pointer(pExpr)).FpLeft, i)
- if !(Xsqlite3ExprCanBeNull(tls, p) != 0) {
+ if !((*Sqlite3)(unsafe.Pointer((*Parse)(unsafe.Pointer(pParse)).Fdb)).FmallocFailed != 0) {
goto __26
}
+ goto sqlite3ExprCodeIN_oom_error
+__26:
+ ;
+ if !(Xsqlite3ExprCanBeNull(tls, p) != 0) {
+ goto __27
+ }
Xsqlite3VdbeAddOp2(tls, v, OP_IsNull, (rLhs + i), destStep2)
-__26:
+__27:
;
goto __24
__24:
@@ -82410,7 +84515,7 @@ __25:
// of the RHS using the LHS as a probe. If found, the result is
// true.
if !(eType == IN_INDEX_ROWID) {
- goto __27
+ goto __28
}
// In this case, the RHS is the ROWID of table b-tree and so we also
// know that the RHS is non-NULL. Hence, we combine steps 3 and 4
@@ -82418,41 +84523,41 @@ __25:
Xsqlite3VdbeAddOp3(tls, v, OP_SeekRowid, *(*int32)(unsafe.Pointer(bp + 4 /* iTab */)), destIfFalse, rLhs)
addrTruthOp = Xsqlite3VdbeAddOp0(tls, v, OP_Goto) // Return True
- goto __28
-__27:
+ goto __29
+__28:
Xsqlite3VdbeAddOp4(tls, v, OP_Affinity, rLhs, nVector, 0, zAff, nVector)
if !(destIfFalse == destIfNull) {
- goto __29
+ goto __30
}
// Combine Step 3 and Step 5 into a single opcode
Xsqlite3VdbeAddOp4Int(tls, v, OP_NotFound, *(*int32)(unsafe.Pointer(bp + 4 /* iTab */)), destIfFalse,
rLhs, nVector)
goto sqlite3ExprCodeIN_finished
-__29:
+__30:
;
// Ordinary Step 3, for the case where FALSE and NULL are distinct
addrTruthOp = Xsqlite3VdbeAddOp4Int(tls, v, OP_Found, *(*int32)(unsafe.Pointer(bp + 4 /* iTab */)), 0,
rLhs, nVector)
-__28:
+__29:
;
// Step 4. If the RHS is known to be non-NULL and we did not find
// an match on the search above, then the result must be FALSE.
if !((*(*int32)(unsafe.Pointer(bp /* rRhsHasNull */)) != 0) && (nVector == 1)) {
- goto __30
+ goto __31
}
Xsqlite3VdbeAddOp2(tls, v, OP_NotNull, *(*int32)(unsafe.Pointer(bp /* rRhsHasNull */)), destIfFalse)
-__30:
+__31:
;
// Step 5. If we do not care about the difference between NULL and
// FALSE, then just return false.
if !(destIfFalse == destIfNull) {
- goto __31
+ goto __32
}
Xsqlite3VdbeGoto(tls, v, destIfFalse)
-__31:
+__32:
;
// Step 6: Loop through rows of the RHS. Compare each row to the LHS.
@@ -82462,28 +84567,28 @@ __31:
// For a scalar LHS, it is sufficient to check just the first row
// of the RHS.
if !(destStep6 != 0) {
- goto __32
+ goto __33
}
Xsqlite3VdbeResolveLabel(tls, v, destStep6)
-__32:
+__33:
;
addrTop = Xsqlite3VdbeAddOp2(tls, v, OP_Rewind, *(*int32)(unsafe.Pointer(bp + 4 /* iTab */)), destIfFalse)
if !(nVector > 1) {
- goto __33
+ goto __34
}
destNotNull = Xsqlite3VdbeMakeLabel(tls, pParse)
- goto __34
-__33:
+ goto __35
+__34:
// For nVector==1, combine steps 6 and 7 by immediately returning
// FALSE if the first comparison is not NULL
destNotNull = destIfFalse
-__34:
+__35:
;
i = 0
-__35:
+__36:
if !(i < nVector) {
- goto __37
+ goto __38
}
r3 = Xsqlite3GetTempReg(tls, pParse)
p1 = Xsqlite3VectorFieldSubexpr(tls, pLeft, i)
@@ -82493,16 +84598,16 @@ __35:
pColl1, -2)
Xsqlite3ReleaseTempReg(tls, pParse, r3)
- goto __36
-__36:
- i++
- goto __35
goto __37
__37:
+ i++
+ goto __36
+ goto __38
+__38:
;
Xsqlite3VdbeAddOp2(tls, v, OP_Goto, 0, destIfNull)
if !(nVector > 1) {
- goto __38
+ goto __39
}
Xsqlite3VdbeResolveLabel(tls, v, destNotNull)
Xsqlite3VdbeAddOp2(tls, v, OP_Next, *(*int32)(unsafe.Pointer(bp + 4 /* iTab */)), (addrTop + 1))
@@ -82510,7 +84615,7 @@ __37:
// Step 7: If we reach this point, we know that the result must
// be false.
Xsqlite3VdbeAddOp2(tls, v, OP_Goto, 0, destIfFalse)
-__38:
+__39:
;
// Jumps here in order to return true.
@@ -82518,10 +84623,10 @@ __38:
sqlite3ExprCodeIN_finished:
if !(rLhs != rLhsOrig) {
- goto __39
+ goto __40
}
Xsqlite3ReleaseTempReg(tls, pParse, rLhs)
-__39:
+__40:
;
sqlite3ExprCodeIN_oom_error:
@@ -82535,7 +84640,7 @@ sqlite3ExprCodeIN_oom_error:
// The z[] string will probably not be zero-terminated. But the
// z[n] character is guaranteed to be something that does not look
// like the continuation of the number.
-func codeReal(tls *libc.TLS, v uintptr, z uintptr, negateFlag int32, iMem int32) { /* sqlite3.c:104114:13: */
+func codeReal(tls *libc.TLS, v uintptr, z uintptr, negateFlag int32, iMem int32) { /* sqlite3.c:104738:13: */
bp := tls.Alloc(8)
defer tls.Free(8)
@@ -82555,7 +84660,7 @@ func codeReal(tls *libc.TLS, v uintptr, z uintptr, negateFlag int32, iMem int32)
// text z[0..n-1] into register iMem.
//
// Expr.u.zToken is always UTF8 and zero-terminated.
-func codeInteger(tls *libc.TLS, pParse uintptr, pExpr uintptr, negFlag int32, iMem int32) { /* sqlite3.c:104132:13: */
+func codeInteger(tls *libc.TLS, pParse uintptr, pExpr uintptr, negFlag int32, iMem int32) { /* sqlite3.c:104756:13: */
bp := tls.Alloc(24)
defer tls.Free(24)
@@ -82575,12 +84680,12 @@ func codeInteger(tls *libc.TLS, pParse uintptr, pExpr uintptr, negFlag int32, iM
c = Xsqlite3DecOrHexToI64(tls, z, bp+16 /* &value */)
if (((c == 3) && !(negFlag != 0)) || (c == 2)) || ((negFlag != 0) && (*(*I64)(unsafe.Pointer(bp + 16 /* value */)) == ((int64(-1)) - (int64(0xffffffff) | (I64((int64(0x7fffffff))) << 32))))) {
- if Xsqlite3_strnicmp(tls, z, ts+6784 /* "0x" */, 2) == 0 {
- Xsqlite3ErrorMsg(tls, pParse, ts+6787 /* "hex literal too ..." */, libc.VaList(bp, func() uintptr {
+ if Xsqlite3_strnicmp(tls, z, ts+6915 /* "0x" */, 2) == 0 {
+ Xsqlite3ErrorMsg(tls, pParse, ts+6918 /* "hex literal too ..." */, libc.VaList(bp, func() uintptr {
if negFlag != 0 {
- return ts + 3910 /* "-" */
+ return ts + 4041 /* "-" */
}
- return ts + 703 /* "" */
+ return ts + 755 /* "" */
}(), z))
} else {
codeReal(tls, v, z, negFlag, iMem)
@@ -82600,7 +84705,7 @@ func codeInteger(tls *libc.TLS, pParse uintptr, pExpr uintptr, negFlag int32, iM
// Generate code that will load into register regOut a value that is
// appropriate for the iIdxCol-th column of index pIdx.
-func Xsqlite3ExprCodeLoadIndexColumn(tls *libc.TLS, pParse uintptr, pIdx uintptr, iTabCur int32, iIdxCol int32, regOut int32) { /* sqlite3.c:104169:21: */
+func Xsqlite3ExprCodeLoadIndexColumn(tls *libc.TLS, pParse uintptr, pIdx uintptr, iTabCur int32, iIdxCol int32, regOut int32) { /* sqlite3.c:104793:21: */
var iTabCol I16 = *(*I16)(unsafe.Pointer((*Index)(unsafe.Pointer(pIdx)).FaiColumn + uintptr(iIdxCol)*2))
if int32(iTabCol) == (-2) {
@@ -82615,7 +84720,7 @@ func Xsqlite3ExprCodeLoadIndexColumn(tls *libc.TLS, pParse uintptr, pIdx uintptr
// Generate code that will compute the value of generated column pCol
// and store the result in register regOut
-func Xsqlite3ExprCodeGeneratedColumn(tls *libc.TLS, pParse uintptr, pCol uintptr, regOut int32) { /* sqlite3.c:104194:21: */
+func Xsqlite3ExprCodeGeneratedColumn(tls *libc.TLS, pParse uintptr, pCol uintptr, regOut int32) { /* sqlite3.c:104818:21: */
var iAddr int32
var v uintptr = (*Parse)(unsafe.Pointer(pParse)).FpVdbe
@@ -82634,7 +84739,7 @@ func Xsqlite3ExprCodeGeneratedColumn(tls *libc.TLS, pParse uintptr, pCol uintptr
}
// Generate code to extract the value of the iCol-th column of a table.
-func Xsqlite3ExprCodeGetColumnOfTable(tls *libc.TLS, v uintptr, pTab uintptr, iTabCur int32, iCol int32, regOut int32) { /* sqlite3.c:104219:21: */
+func Xsqlite3ExprCodeGetColumnOfTable(tls *libc.TLS, v uintptr, pTab uintptr, iTabCur int32, iCol int32, regOut int32) { /* sqlite3.c:104843:21: */
bp := tls.Alloc(8)
defer tls.Free(8)
@@ -82655,7 +84760,7 @@ func Xsqlite3ExprCodeGetColumnOfTable(tls *libc.TLS, v uintptr, pTab uintptr, iT
} else if (int32((*Column)(unsafe.Pointer((libc.AssignUintptr(&pCol, ((*Table)(unsafe.Pointer(pTab)).FaCol + uintptr(iCol)*32))))).FcolFlags) & COLFLAG_VIRTUAL) != 0 {
var pParse uintptr = Xsqlite3VdbeParser(tls, v)
if (int32((*Column)(unsafe.Pointer(pCol)).FcolFlags) & COLFLAG_BUSY) != 0 {
- Xsqlite3ErrorMsg(tls, pParse, ts+6813 /* "generated column..." */, libc.VaList(bp, (*Column)(unsafe.Pointer(pCol)).FzName))
+ Xsqlite3ErrorMsg(tls, pParse, ts+6944 /* "generated column..." */, libc.VaList(bp, (*Column)(unsafe.Pointer(pCol)).FzName))
} else {
var savedSelfTab int32 = (*Parse)(unsafe.Pointer(pParse)).FiSelfTab
*(*U16)(unsafe.Pointer(pCol + 28 /* &.colFlags */)) |= U16((COLFLAG_BUSY))
@@ -82684,7 +84789,7 @@ func Xsqlite3ExprCodeGetColumnOfTable(tls *libc.TLS, v uintptr, pTab uintptr, iT
//
// There must be an open cursor to pTab in iTable when this routine
// is called. If iColumn<0 then code is generated that extracts the rowid.
-func Xsqlite3ExprCodeGetColumn(tls *libc.TLS, pParse uintptr, pTab uintptr, iColumn int32, iTable int32, iReg int32, p5 U8) int32 { /* sqlite3.c:104276:20: */
+func Xsqlite3ExprCodeGetColumn(tls *libc.TLS, pParse uintptr, pTab uintptr, iColumn int32, iTable int32, iReg int32, p5 U8) int32 { /* sqlite3.c:104900:20: */
Xsqlite3ExprCodeGetColumnOfTable(tls, (*Parse)(unsafe.Pointer(pParse)).FpVdbe, pTab, iTable, iColumn, iReg)
if p5 != 0 {
@@ -82698,14 +84803,14 @@ func Xsqlite3ExprCodeGetColumn(tls *libc.TLS, pParse uintptr, pTab uintptr, iCol
// Generate code to move content from registers iFrom...iFrom+nReg-1
// over to iTo..iTo+nReg-1.
-func Xsqlite3ExprCodeMove(tls *libc.TLS, pParse uintptr, iFrom int32, iTo int32, nReg int32) { /* sqlite3.c:104297:21: */
+func Xsqlite3ExprCodeMove(tls *libc.TLS, pParse uintptr, iFrom int32, iTo int32, nReg int32) { /* sqlite3.c:104921:21: */
Xsqlite3VdbeAddOp3(tls, (*Parse)(unsafe.Pointer(pParse)).FpVdbe, OP_Move, iFrom, iTo, nReg)
}
// Convert a scalar expression node to a TK_REGISTER referencing
// register iReg. The caller must ensure that iReg already contains
// the correct value for the expression.
-func exprToRegister(tls *libc.TLS, pExpr uintptr, iReg int32) { /* sqlite3.c:104306:13: */
+func exprToRegister(tls *libc.TLS, pExpr uintptr, iReg int32) { /* sqlite3.c:104930:13: */
var p uintptr = Xsqlite3ExprSkipCollateAndLikely(tls, pExpr)
if p == uintptr(0) {
return
@@ -82724,7 +84829,7 @@ func exprToRegister(tls *libc.TLS, pExpr uintptr, iReg int32) { /* sqlite3.c:104
// that register number into *piFreeable. If the returned result register
// is not a temporary or if the expression is a vector set *piFreeable
// to 0.
-func exprCodeVector(tls *libc.TLS, pParse uintptr, p uintptr, piFreeable uintptr) int32 { /* sqlite3.c:104325:12: */
+func exprCodeVector(tls *libc.TLS, pParse uintptr, p uintptr, piFreeable uintptr) int32 { /* sqlite3.c:104949:12: */
var iResult int32
var nResult int32 = Xsqlite3ExprVectorSize(tls, p)
if nResult == 1 {
@@ -82747,7 +84852,7 @@ func exprCodeVector(tls *libc.TLS, pParse uintptr, p uintptr, piFreeable uintptr
// If the last opcode is a OP_Copy, then set the do-not-merge flag (p5)
// so that a subsequent copy will not be merged into this one.
-func setDoNotMergeFlagOnCopy(tls *libc.TLS, v uintptr) { /* sqlite3.c:104354:13: */
+func setDoNotMergeFlagOnCopy(tls *libc.TLS, v uintptr) { /* sqlite3.c:104978:13: */
if int32((*VdbeOp)(unsafe.Pointer(Xsqlite3VdbeGetOp(tls, v, -1))).Fopcode) == OP_Copy {
Xsqlite3VdbeChangeP5(tls, v, uint16(1)) // Tag trailing OP_Copy as not mergable
}
@@ -82755,7 +84860,7 @@ func setDoNotMergeFlagOnCopy(tls *libc.TLS, v uintptr) { /* sqlite3.c:104354:13:
// Generate code to implement special SQL functions that are implemented
// in-line rather than by using the usual callbacks.
-func exprCodeInlineFunction(tls *libc.TLS, pParse uintptr, pFarg uintptr, iFuncId int32, target int32) int32 { /* sqlite3.c:104364:12: */
+func exprCodeInlineFunction(tls *libc.TLS, pParse uintptr, pFarg uintptr, iFuncId int32, target int32) int32 { /* sqlite3.c:104988:12: */
bp := tls.Alloc(72)
defer tls.Free(72)
@@ -82861,7 +84966,7 @@ func exprCodeInlineFunction(tls *libc.TLS, pParse uintptr, pFarg uintptr, iFuncI
// register if it is convenient to do so. The calling function
// must check the return code and move the results to the desired
// register.
-func Xsqlite3ExprCodeTarget(tls *libc.TLS, pParse uintptr, pExpr uintptr, target int32) int32 { /* sqlite3.c:104480:20: */
+func Xsqlite3ExprCodeTarget(tls *libc.TLS, pParse uintptr, pExpr uintptr, target int32) int32 { /* sqlite3.c:105104:20: */
bp := tls.Alloc(192)
defer tls.Free(192)
@@ -83214,7 +85319,7 @@ __69:
if !((int32((*Column)(unsafe.Pointer(pCol1)).FcolFlags) & COLFLAG_BUSY) != 0) {
goto __72
}
- Xsqlite3ErrorMsg(tls, pParse, ts+6813, /* "generated column..." */
+ Xsqlite3ErrorMsg(tls, pParse, ts+6944, /* "generated column..." */
libc.VaList(bp, (*Column)(unsafe.Pointer(pCol1)).FzName))
return 0
__72:
@@ -83304,7 +85409,7 @@ __12:
;
Xsqlite3VdbeAddOp2(tls, v, OP_Variable, int32((*Expr)(unsafe.Pointer(pExpr)).FiColumn), target)
- if !(int32(*(*int8)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(pExpr + 8 /* &.u */)) + 1))) != 0) {
+ if !(int32(*(*uint8)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(pExpr + 8 /* &.u */)) + 1))) != 0) {
goto __77
}
z1 = Xsqlite3VListNumToName(tls, (*Parse)(unsafe.Pointer(pParse)).FpVList, int32((*Expr)(unsafe.Pointer(pExpr)).FiColumn))
@@ -83356,10 +85461,21 @@ __22:
__79:
r1 = Xsqlite3ExprCodeTemp(tls, pParse, pLeft, bp+40 /* ®Free1 */)
r2 = Xsqlite3ExprCodeTemp(tls, pParse, (*Expr)(unsafe.Pointer(pExpr)).FpRight, bp+44 /* ®Free2 */)
- codeCompare(tls, pParse, pLeft, (*Expr)(unsafe.Pointer(pExpr)).FpRight, op,
- r1, r2, inReg, (SQLITE_STOREP2 | p5),
+ Xsqlite3VdbeAddOp2(tls, v, OP_Integer, 1, inReg)
+ codeCompare(tls, pParse, pLeft, (*Expr)(unsafe.Pointer(pExpr)).FpRight, op, r1, r2,
+ (Xsqlite3VdbeCurrentAddr(tls, v) + 2), p5,
(libc.Bool32(((*Expr)(unsafe.Pointer((pExpr))).Fflags & (U32(EP_Commuted))) != U32(0))))
+ if !(p5 == SQLITE_NULLEQ) {
+ goto __81
+ }
+ Xsqlite3VdbeAddOp2(tls, v, OP_Integer, 0, inReg)
+ goto __82
+__81:
+ Xsqlite3VdbeAddOp3(tls, v, OP_ZeroOrNull, r1, inReg, r2)
+__82:
+ ;
+
__80:
;
goto __3
@@ -83388,20 +85504,20 @@ __35:
pLeft1 = (*Expr)(unsafe.Pointer(pExpr)).FpLeft
if !(int32((*Expr)(unsafe.Pointer(pLeft1)).Fop) == TK_INTEGER) {
- goto __81
+ goto __83
}
codeInteger(tls, pParse, pLeft1, 1, target)
return target
- goto __82
-__81:
+ goto __84
+__83:
if !(int32((*Expr)(unsafe.Pointer(pLeft1)).Fop) == TK_FLOAT) {
- goto __83
+ goto __85
}
codeReal(tls, v, *(*uintptr)(unsafe.Pointer(pLeft1 + 8 /* &.u */)), 1, target)
return target
- goto __84
-__83:
+ goto __86
+__85:
(*Expr)(unsafe.Pointer(bp + 48 /* &tempX */)).Fop = U8(TK_INTEGER)
(*Expr)(unsafe.Pointer(bp + 48 /* &tempX */)).Fflags = (U32(EP_IntValue | EP_TokenOnly))
*(*int32)(unsafe.Pointer(bp + 48 /* &tempX */ + 8 /* &.u */)) = 0
@@ -83410,9 +85526,9 @@ __83:
r2 = Xsqlite3ExprCodeTemp(tls, pParse, (*Expr)(unsafe.Pointer(pExpr)).FpLeft, bp+44 /* ®Free2 */)
Xsqlite3VdbeAddOp3(tls, v, OP_Subtract, r2, r1, target)
-__84:
+__86:
;
-__82:
+__84:
;
goto __3
@@ -83452,14 +85568,14 @@ __41:
if !(((pInfo == uintptr(0)) ||
(int32((*Expr)(unsafe.Pointer(pExpr)).FiAgg) < 0)) ||
(int32((*Expr)(unsafe.Pointer(pExpr)).FiAgg) >= (*AggInfo)(unsafe.Pointer(pInfo)).FnFunc)) {
- goto __85
+ goto __87
}
- Xsqlite3ErrorMsg(tls, pParse, ts+6843 /* "misuse of aggreg..." */, libc.VaList(bp+8, *(*uintptr)(unsafe.Pointer(pExpr + 8 /* &.u */))))
- goto __86
-__85:
- return (*AggInfo_func)(unsafe.Pointer((*AggInfo)(unsafe.Pointer(pInfo)).FaFunc + uintptr((*Expr)(unsafe.Pointer(pExpr)).FiAgg)*24)).FiMem
-__86:
+ Xsqlite3ErrorMsg(tls, pParse, ts+6974 /* "misuse of aggreg..." */, libc.VaList(bp+8, *(*uintptr)(unsafe.Pointer(pExpr + 8 /* &.u */))))
+ goto __88
+__87:
+ return (*AggInfo_func)(unsafe.Pointer((*AggInfo)(unsafe.Pointer(pInfo)).FaFunc + uintptr((*Expr)(unsafe.Pointer(pExpr)).FiAgg)*32)).FiMem
+__88:
;
goto __3
@@ -83470,19 +85586,19 @@ __42: // The function name
pColl = uintptr(0) // A collating sequence
if !(((*Expr)(unsafe.Pointer((pExpr))).Fflags & (U32(EP_WinFunc))) != U32(0)) {
- goto __87
+ goto __89
}
return (*Window)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(pExpr + 64 /* &.y */)))).FregResult
-__87:
+__89:
;
if !(((*Parse)(unsafe.Pointer(pParse)).FokConstFactor != 0) && (Xsqlite3ExprIsConstantNotJoin(tls, pExpr) != 0)) {
- goto __88
+ goto __90
}
// SQL functions can be expensive. So try to avoid running them
// multiple times if we know they always give the same result
return Xsqlite3ExprCodeRunJustOnce(tls, pParse, pExpr, -1)
-__88:
+__90:
;
pFarg = *(*uintptr)(unsafe.Pointer(pExpr + 32 /* &.x */))
@@ -83495,66 +85611,66 @@ __88:
zId = *(*uintptr)(unsafe.Pointer(pExpr + 8 /* &.u */))
pDef = Xsqlite3FindFunction(tls, db, zId, nFarg, enc, uint8(0))
if !((pDef == uintptr(0)) || ((*FuncDef)(unsafe.Pointer(pDef)).FxFinalize != uintptr(0))) {
- goto __89
+ goto __91
}
- Xsqlite3ErrorMsg(tls, pParse, ts+6869 /* "unknown function..." */, libc.VaList(bp+16, zId))
+ Xsqlite3ErrorMsg(tls, pParse, ts+7000 /* "unknown function..." */, libc.VaList(bp+16, zId))
goto __3
-__89:
+__91:
;
if !(((*FuncDef)(unsafe.Pointer(pDef)).FfuncFlags & U32(SQLITE_FUNC_INLINE)) != 0) {
- goto __90
+ goto __92
}
return exprCodeInlineFunction(tls, pParse, pFarg,
int32((*FuncDef)(unsafe.Pointer(pDef)).FpUserData), target)
- goto __91
-__90:
+ goto __93
+__92:
if !(((*FuncDef)(unsafe.Pointer(pDef)).FfuncFlags & (U32(SQLITE_FUNC_DIRECT | SQLITE_FUNC_UNSAFE))) != 0) {
- goto __92
+ goto __94
}
Xsqlite3ExprFunctionUsable(tls, pParse, pExpr, pDef)
-__92:
+__94:
;
-__91:
+__93:
;
i = 0
-__93:
+__95:
if !(i < nFarg) {
- goto __95
+ goto __97
}
if !((i < 32) && (Xsqlite3ExprIsConstant(tls, (*ExprList_item)(unsafe.Pointer((pFarg+8 /* &.a */)+uintptr(i)*32)).FpExpr) != 0)) {
- goto __96
+ goto __98
}
constMask = constMask | (uint32((uint32(1))) << (i))
-__96:
+__98:
;
if !((((*FuncDef)(unsafe.Pointer(pDef)).FfuncFlags & U32(SQLITE_FUNC_NEEDCOLL)) != U32(0)) && !(pColl != 0)) {
- goto __97
+ goto __99
}
pColl = Xsqlite3ExprCollSeq(tls, pParse, (*ExprList_item)(unsafe.Pointer((pFarg+8 /* &.a */)+uintptr(i)*32)).FpExpr)
-__97:
+__99:
;
- goto __94
-__94:
+ goto __96
+__96:
i++
- goto __93
goto __95
-__95:
+ goto __97
+__97:
;
if !(pFarg != 0) {
- goto __98
+ goto __100
}
if !(constMask != 0) {
- goto __100
+ goto __102
}
r1 = ((*Parse)(unsafe.Pointer(pParse)).FnMem + 1)
*(*int32)(unsafe.Pointer(pParse + 56 /* &.nMem */)) += (nFarg)
- goto __101
-__100:
+ goto __103
+__102:
r1 = Xsqlite3GetTempRange(tls, pParse, nFarg)
-__101:
+__103:
;
// For length() and typeof() functions with a column argument,
@@ -83562,26 +85678,26 @@ __101:
// or OPFLAG_TYPEOFARG respectively, to avoid unnecessary data
// loading.
if !(((*FuncDef)(unsafe.Pointer(pDef)).FfuncFlags & (U32(SQLITE_FUNC_LENGTH | SQLITE_FUNC_TYPEOF))) != U32(0)) {
- goto __102
+ goto __104
}
exprOp = (*Expr)(unsafe.Pointer((*ExprList_item)(unsafe.Pointer((pFarg + 8 /* &.a */))).FpExpr)).Fop
if !((int32(exprOp) == TK_COLUMN) || (int32(exprOp) == TK_AGG_COLUMN)) {
- goto __103
+ goto __105
}
(*Expr)(unsafe.Pointer((*ExprList_item)(unsafe.Pointer((pFarg + 8 /* &.a */))).FpExpr)).Fop2 = (U8((*FuncDef)(unsafe.Pointer(pDef)).FfuncFlags & (U32(OPFLAG_LENGTHARG | OPFLAG_TYPEOFARG))))
-__103:
+__105:
;
-__102:
+__104:
;
Xsqlite3ExprCodeExprList(tls, pParse, pFarg, r1, 0,
(uint8(SQLITE_ECEL_DUP | SQLITE_ECEL_FACTOR)))
- goto __99
-__98:
+ goto __101
+__100:
r1 = 0
-__99:
+__101:
;
// Possibly overload the function if the first argument is
// a virtual table column.
@@ -83595,64 +85711,64 @@ __99:
// "glob(B,A). We want to use the A in "A glob B" to test
// for function overloading. But we use the B term in "glob(B,A)".
if !((nFarg >= 2) && (((*Expr)(unsafe.Pointer((pExpr))).Fflags & (U32(EP_InfixFunc))) != U32(0))) {
- goto __104
+ goto __106
}
pDef = Xsqlite3VtabOverloadFunction(tls, db, pDef, nFarg, (*ExprList_item)(unsafe.Pointer((pFarg+8 /* &.a */)+1*32)).FpExpr)
- goto __105
-__104:
+ goto __107
+__106:
if !(nFarg > 0) {
- goto __106
+ goto __108
}
pDef = Xsqlite3VtabOverloadFunction(tls, db, pDef, nFarg, (*ExprList_item)(unsafe.Pointer((pFarg + 8 /* &.a */))).FpExpr)
-__106:
+__108:
;
-__105:
+__107:
;
if !(((*FuncDef)(unsafe.Pointer(pDef)).FfuncFlags & U32(SQLITE_FUNC_NEEDCOLL)) != 0) {
- goto __107
+ goto __109
}
if !(!(pColl != 0)) {
- goto __108
+ goto __110
}
pColl = (*Sqlite3)(unsafe.Pointer(db)).FpDfltColl
-__108:
+__110:
;
Xsqlite3VdbeAddOp4(tls, v, OP_CollSeq, 0, 0, 0, pColl, -2)
-__107:
+__109:
;
if !(((*FuncDef)(unsafe.Pointer(pDef)).FfuncFlags & U32(SQLITE_FUNC_OFFSET)) != 0) {
- goto __109
+ goto __111
}
pArg = (*ExprList_item)(unsafe.Pointer((pFarg + 8 /* &.a */))).FpExpr
if !(int32((*Expr)(unsafe.Pointer(pArg)).Fop) == TK_COLUMN) {
- goto __111
+ goto __113
}
Xsqlite3VdbeAddOp3(tls, v, OP_Offset, (*Expr)(unsafe.Pointer(pArg)).FiTable, int32((*Expr)(unsafe.Pointer(pArg)).FiColumn), target)
- goto __112
-__111:
+ goto __114
+__113:
Xsqlite3VdbeAddOp2(tls, v, OP_Null, 0, target)
-__112:
+__114:
;
- goto __110
-__109:
+ goto __112
+__111:
Xsqlite3VdbeAddFunctionCall(tls, pParse, int32(constMask), r1, target, nFarg,
pDef, int32((*Expr)(unsafe.Pointer(pExpr)).Fop2))
-__110:
+__112:
;
if !(nFarg != 0) {
- goto __113
+ goto __115
}
if !(constMask == U32(0)) {
- goto __114
+ goto __116
}
Xsqlite3ReleaseTempRange(tls, pParse, r1, nFarg)
- goto __115
-__114:
+ goto __117
+__116:
;
-__115:
+__117:
;
-__113:
+__115:
;
return target
@@ -83661,39 +85777,39 @@ __44:
;
if !((*Sqlite3)(unsafe.Pointer((*Parse)(unsafe.Pointer(pParse)).Fdb)).FmallocFailed != 0) {
- goto __116
+ goto __118
}
return 0
- goto __117
-__116:
+ goto __119
+__118:
if !((op == TK_SELECT) && ((libc.AssignInt32(&nCol, (*ExprList)(unsafe.Pointer((*Select)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(pExpr + 32 /* &.x */)))).FpEList)).FnExpr)) != 1)) {
- goto __118
+ goto __120
}
Xsqlite3SubselectError(tls, pParse, nCol, 1)
- goto __119
-__118:
+ goto __121
+__120:
return Xsqlite3CodeSubselect(tls, pParse, pExpr)
-__119:
+__121:
;
-__117:
+__119:
;
goto __3
__45:
if !((*Expr)(unsafe.Pointer((*Expr)(unsafe.Pointer(pExpr)).FpLeft)).FiTable == 0) {
- goto __120
+ goto __122
}
(*Expr)(unsafe.Pointer((*Expr)(unsafe.Pointer(pExpr)).FpLeft)).FiTable = Xsqlite3CodeSubselect(tls, pParse, (*Expr)(unsafe.Pointer(pExpr)).FpLeft)
-__120:
+__122:
;
if !(((*Expr)(unsafe.Pointer(pExpr)).FiTable != 0) &&
((*Expr)(unsafe.Pointer(pExpr)).FiTable != (libc.AssignInt32(&n1, Xsqlite3ExprVectorSize(tls, (*Expr)(unsafe.Pointer(pExpr)).FpLeft))))) {
- goto __121
+ goto __123
}
- Xsqlite3ErrorMsg(tls, pParse, ts+6496, /* "%d columns assig..." */
+ Xsqlite3ErrorMsg(tls, pParse, ts+6627, /* "%d columns assig..." */
libc.VaList(bp+24, (*Expr)(unsafe.Pointer(pExpr)).FiTable, n1))
-__121:
+__123:
;
return ((*Expr)(unsafe.Pointer((*Expr)(unsafe.Pointer(pExpr)).FpLeft)).FiTable + int32((*Expr)(unsafe.Pointer(pExpr)).FiColumn))
@@ -83765,15 +85881,15 @@ __51:
// EVIDENCE-OF: R-60985-57662 SQLite will convert the value back to
// floating point when extracting it from the record.
if !((iCol1 >= 0) && (int32((*Column)(unsafe.Pointer((*Table)(unsafe.Pointer(pTab2)).FaCol+uintptr(iCol1)*32)).Faffinity) == SQLITE_AFF_REAL)) {
- goto __122
+ goto __124
}
Xsqlite3VdbeAddOp1(tls, v, OP_RealAffinity, target)
-__122:
+__124:
;
goto __3
__52:
- Xsqlite3ErrorMsg(tls, pParse, ts+5417 /* "row value misuse..." */, 0)
+ Xsqlite3ErrorMsg(tls, pParse, ts+5548 /* "row value misuse..." */, 0)
goto __3
// TK_IF_NULL_ROW Expr nodes are inserted ahead of expressions
@@ -83824,15 +85940,15 @@ __54: // The X expression
nExpr = (*ExprList)(unsafe.Pointer(pEList)).FnExpr
endLabel = Xsqlite3VdbeMakeLabel(tls, pParse)
if !((libc.AssignUintptr(&pX, (*Expr)(unsafe.Pointer(pExpr)).FpLeft)) != uintptr(0)) {
- goto __123
+ goto __125
}
pDel = Xsqlite3ExprDup(tls, db1, pX, 0)
if !((*Sqlite3)(unsafe.Pointer(db1)).FmallocFailed != 0) {
- goto __124
+ goto __126
}
Xsqlite3ExprDelete(tls, db1, pDel)
goto __3
-__124:
+__126:
;
exprToRegister(tls, pDel, exprCodeVector(tls, pParse, pDel, bp+40 /* ®Free1 */))
@@ -83846,22 +85962,22 @@ __124:
// So make sure that the regFree1 register is not reused for other
// purposes and possibly overwritten.
*(*int32)(unsafe.Pointer(bp + 40 /* regFree1 */)) = 0
-__123:
+__125:
;
i1 = 0
-__125:
+__127:
if !(i1 < (nExpr - 1)) {
- goto __127
+ goto __129
}
if !(pX != 0) {
- goto __128
+ goto __130
}
(*Expr)(unsafe.Pointer(bp + 120 /* &opCompare */)).FpRight = (*ExprList_item)(unsafe.Pointer(aListelem + uintptr(i1)*32)).FpExpr
- goto __129
-__128:
+ goto __131
+__130:
pTest = (*ExprList_item)(unsafe.Pointer(aListelem + uintptr(i1)*32)).FpExpr
-__129:
+__131:
;
nextCase = Xsqlite3VdbeMakeLabel(tls, pParse)
@@ -83870,21 +85986,21 @@ __129:
Xsqlite3ExprCode(tls, pParse, (*ExprList_item)(unsafe.Pointer(aListelem+uintptr((i1+1))*32)).FpExpr, target)
Xsqlite3VdbeGoto(tls, v, endLabel)
Xsqlite3VdbeResolveLabel(tls, v, nextCase)
- goto __126
-__126:
+ goto __128
+__128:
i1 = (i1 + 2)
- goto __125
goto __127
-__127:
+ goto __129
+__129:
;
if !((nExpr & 1) != 0) {
- goto __130
+ goto __132
}
Xsqlite3ExprCode(tls, pParse, (*ExprList_item)(unsafe.Pointer((pEList+8 /* &.a */)+uintptr((nExpr-1))*32)).FpExpr, target)
- goto __131
-__130:
+ goto __133
+__132:
Xsqlite3VdbeAddOp2(tls, v, OP_Null, 0, target)
-__131:
+__133:
;
Xsqlite3ExprDelete(tls, db1, pDel)
setDoNotMergeFlagOnCopy(tls, v)
@@ -83894,28 +86010,28 @@ __131:
__55:
;
if !(!(int32((*Parse)(unsafe.Pointer(pParse)).FpTriggerTab) != 0) && !(int32((*Parse)(unsafe.Pointer(pParse)).Fnested) != 0)) {
- goto __132
+ goto __134
}
Xsqlite3ErrorMsg(tls, pParse,
- ts+6892 /* "RAISE() may only..." */, 0)
+ ts+7023 /* "RAISE() may only..." */, 0)
return 0
-__132:
+__134:
;
if !(int32((*Expr)(unsafe.Pointer(pExpr)).FaffExpr) == OE_Abort) {
- goto __133
+ goto __135
}
Xsqlite3MayAbort(tls, pParse)
-__133:
+__135:
;
if !(int32((*Expr)(unsafe.Pointer(pExpr)).FaffExpr) == OE_Ignore) {
- goto __134
+ goto __136
}
Xsqlite3VdbeAddOp4(tls,
v, OP_Halt, SQLITE_OK, OE_Ignore, 0, *(*uintptr)(unsafe.Pointer(pExpr + 8 /* &.u */)), 0)
- goto __135
-__134:
+ goto __137
+__136:
Xsqlite3HaltConstraint(tls, pParse,
func() int32 {
if (*Parse)(unsafe.Pointer(pParse)).FpTriggerTab != 0 {
@@ -83924,7 +86040,7 @@ __134:
return SQLITE_ERROR
}(),
int32((*Expr)(unsafe.Pointer(pExpr)).FaffExpr), *(*uintptr)(unsafe.Pointer(pExpr + 8 /* &.u */)), int8(0), uint8(0))
-__135:
+__137:
;
goto __3
@@ -83936,7 +86052,7 @@ __3:
return inReg
}
-var zAff = *(*[8]int8)(unsafe.Pointer(ts + 6942 /* "B\x00C\x00D\x00E" */)) /* sqlite3.c:104545:29 */
+var zAff = *(*[8]uint8)(unsafe.Pointer(ts + 7073 /* "B\x00C\x00D\x00E" */)) /* sqlite3.c:105169:29 */
// Generate code that will evaluate expression pExpr just one time
// per prepared statement execution.
@@ -83953,7 +86069,7 @@ var zAff = *(*[8]int8)(unsafe.Pointer(ts + 6942 /* "B\x00C\x00D\x00E" */)) /* sq
// code to the same register, if they do not contain function calls and hence
// are factored out into the initialization section at the end of the
// prepared statement.
-func Xsqlite3ExprCodeRunJustOnce(tls *libc.TLS, pParse uintptr, pExpr uintptr, regDest int32) int32 { /* sqlite3.c:105235:20: */
+func Xsqlite3ExprCodeRunJustOnce(tls *libc.TLS, pParse uintptr, pExpr uintptr, regDest int32) int32 { /* sqlite3.c:105866:20: */
var p uintptr
p = (*Parse)(unsafe.Pointer(pParse)).FpConstExpr
@@ -83967,7 +86083,7 @@ func Xsqlite3ExprCodeRunJustOnce(tls *libc.TLS, pParse uintptr, pExpr uintptr, r
goto __3
}
{
- if ((uint32(int32(*(*uint8)(unsafe.Pointer(pItem + 20 /* &.reusable */)) >> 4 & 0x1))) != 0) && (Xsqlite3ExprCompare(tls, uintptr(0), (*ExprList_item)(unsafe.Pointer(pItem)).FpExpr, pExpr, -1) == 0) {
+ if ((uint32(int32(*(*uint8)(unsafe.Pointer(pItem + 20 /* &.reusable */)) & 0x10 >> 4))) != 0) && (Xsqlite3ExprCompare(tls, uintptr(0), (*ExprList_item)(unsafe.Pointer(pItem)).FpExpr, pExpr, -1) == 0) {
return *(*int32)(unsafe.Pointer(pItem + 24 /* &.u */))
}
@@ -84000,7 +86116,7 @@ func Xsqlite3ExprCodeRunJustOnce(tls *libc.TLS, pParse uintptr, pExpr uintptr, r
p = Xsqlite3ExprListAppend(tls, pParse, p, pExpr)
if p != 0 {
var pItem uintptr = ((p + 8 /* &.a */) + uintptr(((*ExprList)(unsafe.Pointer(p)).FnExpr-1))*32)
- libc.SetBitFieldPtr8Uint32(pItem+20 /* &.reusable */, (uint32(libc.Bool32(regDest < 0))), 3, 0x8)
+ libc.SetBitFieldPtr8Uint32(pItem+20 /* &.reusable */, (uint32(libc.Bool32(regDest < 0))), 4, 0x10)
if regDest < 0 {
regDest = libc.PreIncInt32(&(*Parse)(unsafe.Pointer(pParse)).FnMem, 1)
}
@@ -84022,7 +86138,7 @@ func Xsqlite3ExprCodeRunJustOnce(tls *libc.TLS, pParse uintptr, pExpr uintptr, r
// If pExpr is a constant, then this routine might generate this
// code to fill the register in the initialization section of the
// VDBE program, in order to factor it out of the evaluation loop.
-func Xsqlite3ExprCodeTemp(tls *libc.TLS, pParse uintptr, pExpr uintptr, pReg uintptr) int32 { /* sqlite3.c:105292:20: */
+func Xsqlite3ExprCodeTemp(tls *libc.TLS, pParse uintptr, pExpr uintptr, pReg uintptr) int32 { /* sqlite3.c:105923:20: */
var r2 int32
pExpr = Xsqlite3ExprSkipCollateAndLikely(tls, pExpr)
if ((((*Parse)(unsafe.Pointer(pParse)).FokConstFactor != 0) &&
@@ -84047,7 +86163,7 @@ func Xsqlite3ExprCodeTemp(tls *libc.TLS, pParse uintptr, pExpr uintptr, pReg uin
// Generate code that will evaluate expression pExpr and store the
// results in register target. The results are guaranteed to appear
// in register target.
-func Xsqlite3ExprCode(tls *libc.TLS, pParse uintptr, pExpr uintptr, target int32) { /* sqlite3.c:105320:21: */
+func Xsqlite3ExprCode(tls *libc.TLS, pParse uintptr, pExpr uintptr, target int32) { /* sqlite3.c:105951:21: */
var inReg int32
if (*Parse)(unsafe.Pointer(pParse)).FpVdbe == uintptr(0) {
@@ -84068,7 +86184,7 @@ func Xsqlite3ExprCode(tls *libc.TLS, pParse uintptr, pExpr uintptr, target int32
// Make a transient copy of expression pExpr and then code it using
// sqlite3ExprCode(). This routine works just like sqlite3ExprCode()
// except that the input expression is guaranteed to be unchanged.
-func Xsqlite3ExprCodeCopy(tls *libc.TLS, pParse uintptr, pExpr uintptr, target int32) { /* sqlite3.c:105344:21: */
+func Xsqlite3ExprCodeCopy(tls *libc.TLS, pParse uintptr, pExpr uintptr, target int32) { /* sqlite3.c:105975:21: */
var db uintptr = (*Parse)(unsafe.Pointer(pParse)).Fdb
pExpr = Xsqlite3ExprDup(tls, db, pExpr, 0)
if !(int32((*Sqlite3)(unsafe.Pointer(db)).FmallocFailed) != 0) {
@@ -84081,7 +86197,7 @@ func Xsqlite3ExprCodeCopy(tls *libc.TLS, pParse uintptr, pExpr uintptr, target i
// results in register target. The results are guaranteed to appear
// in register target. If the expression is constant, then this routine
// might choose to code the expression at initialization time.
-func Xsqlite3ExprCodeFactorable(tls *libc.TLS, pParse uintptr, pExpr uintptr, target int32) { /* sqlite3.c:105357:21: */
+func Xsqlite3ExprCodeFactorable(tls *libc.TLS, pParse uintptr, pExpr uintptr, target int32) { /* sqlite3.c:105988:21: */
if ((*Parse)(unsafe.Pointer(pParse)).FokConstFactor != 0) && (Xsqlite3ExprIsConstantNotJoin(tls, pExpr) != 0) {
Xsqlite3ExprCodeRunJustOnce(tls, pParse, pExpr, target)
} else {
@@ -84107,7 +86223,7 @@ func Xsqlite3ExprCodeFactorable(tls *libc.TLS, pParse uintptr, pExpr uintptr, ta
// in registers at srcReg, and so the value can be copied from there.
// If SQLITE_ECEL_OMITREF is also set, then the values with u.x.iOrderByCol>0
// are simply omitted rather than being copied from srcReg.
-func Xsqlite3ExprCodeExprList(tls *libc.TLS, pParse uintptr, pList uintptr, target int32, srcReg int32, flags U8) int32 { /* sqlite3.c:105385:20: */
+func Xsqlite3ExprCodeExprList(tls *libc.TLS, pParse uintptr, pList uintptr, target int32, srcReg int32, flags U8) int32 { /* sqlite3.c:106016:20: */
var pItem uintptr
var i int32
var j int32
@@ -84189,7 +86305,7 @@ __3:
// sqlite3ExprIfFalse: Jump to dest if false
//
// The jumpIfNull parameter is ignored if xJumpIf is NULL.
-func exprCodeBetween(tls *libc.TLS, pParse uintptr, pExpr uintptr, dest int32, xJump uintptr, jumpIfNull int32) { /* sqlite3.c:105460:13: */
+func exprCodeBetween(tls *libc.TLS, pParse uintptr, pExpr uintptr, dest int32, xJump uintptr, jumpIfNull int32) { /* sqlite3.c:106091:13: */
bp := tls.Alloc(220)
defer tls.Free(220)
@@ -84220,7 +86336,9 @@ func exprCodeBetween(tls *libc.TLS, pParse uintptr, pExpr uintptr, dest int32, x
(*Expr)(unsafe.Pointer(bp + 72 /* &compRight */)).FpRight = (*ExprList_item)(unsafe.Pointer((*(*uintptr)(unsafe.Pointer(pExpr + 32 /* &.x */)) + 8 /* &.a */) + 1*32)).FpExpr
exprToRegister(tls, pDel, exprCodeVector(tls, pParse, pDel, bp+216 /* ®Free1 */))
if xJump != 0 {
- (*(*func(*libc.TLS, uintptr, uintptr, int32, int32))(unsafe.Pointer(&xJump)))(tls, pParse, bp+144 /* &exprAnd */, dest, jumpIfNull)
+ (*struct {
+ f func(*libc.TLS, uintptr, uintptr, int32, int32)
+ })(unsafe.Pointer(&struct{ uintptr }{xJump})).f(tls, pParse, bp+144 /* &exprAnd */, dest, jumpIfNull)
} else {
// Mark the expression is being from the ON or USING clause of a join
// so that the sqlite3ExprCodeTarget() routine will not attempt to move
@@ -84250,7 +86368,7 @@ func exprCodeBetween(tls *libc.TLS, pParse uintptr, pExpr uintptr, dest int32, x
// operation. Special comments in vdbe.c and the mkopcodeh.awk script in
// the make process cause these values to align. Assert()s in the code
// below verify that the numbers are aligned correctly.
-func Xsqlite3ExprIfTrue(tls *libc.TLS, pParse uintptr, pExpr uintptr, dest int32, jumpIfNull int32) { /* sqlite3.c:105532:21: */
+func Xsqlite3ExprIfTrue(tls *libc.TLS, pParse uintptr, pExpr uintptr, dest int32, jumpIfNull int32) { /* sqlite3.c:106163:21: */
bp := tls.Alloc(8)
defer tls.Free(8)
@@ -84480,7 +86598,7 @@ __3:
// If the expression evaluates to NULL (neither true nor false) then
// jump if jumpIfNull is SQLITE_JUMPIFNULL or fall through if jumpIfNull
// is 0.
-func Xsqlite3ExprIfFalse(tls *libc.TLS, pParse uintptr, pExpr uintptr, dest int32, jumpIfNull int32) { /* sqlite3.c:105674:21: */
+func Xsqlite3ExprIfFalse(tls *libc.TLS, pParse uintptr, pExpr uintptr, dest int32, jumpIfNull int32) { /* sqlite3.c:106305:21: */
bp := tls.Alloc(8)
defer tls.Free(8)
@@ -84728,7 +86846,7 @@ __3:
// Like sqlite3ExprIfFalse() except that a copy is made of pExpr before
// code generation, and that copy is deleted after code generation. This
// ensures that the original pExpr is unchanged.
-func Xsqlite3ExprIfFalseDup(tls *libc.TLS, pParse uintptr, pExpr uintptr, dest int32, jumpIfNull int32) { /* sqlite3.c:105846:21: */
+func Xsqlite3ExprIfFalseDup(tls *libc.TLS, pParse uintptr, pExpr uintptr, dest int32, jumpIfNull int32) { /* sqlite3.c:106477:21: */
var db uintptr = (*Parse)(unsafe.Pointer(pParse)).Fdb
var pCopy uintptr = Xsqlite3ExprDup(tls, db, pExpr, 0)
if int32((*Sqlite3)(unsafe.Pointer(db)).FmallocFailed) == 0 {
@@ -84748,7 +86866,7 @@ func Xsqlite3ExprIfFalseDup(tls *libc.TLS, pParse uintptr, pExpr uintptr, dest i
// same as that currently bound to variable pVar, non-zero is returned.
// Otherwise, if the values are not the same or if pExpr is not a simple
// SQL value, zero is returned.
-func exprCompareVariable(tls *libc.TLS, pParse uintptr, pVar uintptr, pExpr uintptr) int32 { /* sqlite3.c:105868:12: */
+func exprCompareVariable(tls *libc.TLS, pParse uintptr, pVar uintptr, pExpr uintptr) int32 { /* sqlite3.c:106499:12: */
bp := tls.Alloc(8)
defer tls.Free(8)
@@ -84802,7 +86920,7 @@ func exprCompareVariable(tls *libc.TLS, pParse uintptr, pVar uintptr, pExpr uint
// If pParse is NULL (the normal case) then any TK_VARIABLE term in
// Argument pParse should normally be NULL. If it is not NULL and pA or
// pB causes a return value of 2.
-func Xsqlite3ExprCompare(tls *libc.TLS, pParse uintptr, pA uintptr, pB uintptr, iTab int32) int32 { /* sqlite3.c:105920:20: */
+func Xsqlite3ExprCompare(tls *libc.TLS, pParse uintptr, pA uintptr, pB uintptr, iTab int32) int32 { /* sqlite3.c:106551:20: */
var combinedFlags U32
if (pA == uintptr(0)) || (pB == uintptr(0)) {
if pB == pA {
@@ -84902,7 +87020,7 @@ func Xsqlite3ExprCompare(tls *libc.TLS, pParse uintptr, pA uintptr, pB uintptr,
//
// Two NULL pointers are considered to be the same. But a NULL pointer
// always differs from a non-NULL pointer.
-func Xsqlite3ExprListCompare(tls *libc.TLS, pA uintptr, pB uintptr, iTab int32) int32 { /* sqlite3.c:106004:20: */
+func Xsqlite3ExprListCompare(tls *libc.TLS, pA uintptr, pB uintptr, iTab int32) int32 { /* sqlite3.c:106635:20: */
var i int32
if (pA == uintptr(0)) && (pB == uintptr(0)) {
return 0
@@ -84929,7 +87047,7 @@ func Xsqlite3ExprListCompare(tls *libc.TLS, pA uintptr, pB uintptr, iTab int32)
// Like sqlite3ExprCompare() except COLLATE operators at the top-level
// are ignored.
-func Xsqlite3ExprCompareSkip(tls *libc.TLS, pA uintptr, pB uintptr, iTab int32) int32 { /* sqlite3.c:106023:20: */
+func Xsqlite3ExprCompareSkip(tls *libc.TLS, pA uintptr, pB uintptr, iTab int32) int32 { /* sqlite3.c:106654:20: */
return Xsqlite3ExprCompare(tls, uintptr(0),
Xsqlite3ExprSkipCollateAndLikely(tls, pA),
Xsqlite3ExprSkipCollateAndLikely(tls, pB),
@@ -84940,7 +87058,7 @@ func Xsqlite3ExprCompareSkip(tls *libc.TLS, pA uintptr, pB uintptr, iTab int32)
//
// Or if seenNot is true, return non-zero if Expr p can only be
// non-NULL if pNN is not NULL
-func exprImpliesNotNull(tls *libc.TLS, pParse uintptr, p uintptr, pNN uintptr, iTab int32, seenNot int32) int32 { /* sqlite3.c:106036:12: */
+func exprImpliesNotNull(tls *libc.TLS, pParse uintptr, p uintptr, pNN uintptr, iTab int32, seenNot int32) int32 { /* sqlite3.c:106667:12: */
if Xsqlite3ExprCompare(tls, pParse, p, pNN, iTab) == 0 {
return (libc.Bool32(int32((*Expr)(unsafe.Pointer(pNN)).Fop) != TK_NULL))
@@ -85064,7 +87182,7 @@ func exprImpliesNotNull(tls *libc.TLS, pParse uintptr, p uintptr, pNN uintptr, i
// When in doubt, return false. Returning true might give a performance
// improvement. Returning false might cause a performance reduction, but
// it will always give the correct answer and is hence always safe.
-func Xsqlite3ExprImpliesExpr(tls *libc.TLS, pParse uintptr, pE1 uintptr, pE2 uintptr, iTab int32) int32 { /* sqlite3.c:106132:20: */
+func Xsqlite3ExprImpliesExpr(tls *libc.TLS, pParse uintptr, pE1 uintptr, pE2 uintptr, iTab int32) int32 { /* sqlite3.c:106763:20: */
if Xsqlite3ExprCompare(tls, pParse, pE1, pE2, iTab) == 0 {
return 1
}
@@ -85087,7 +87205,7 @@ func Xsqlite3ExprImpliesExpr(tls *libc.TLS, pParse uintptr, pE1 uintptr, pE2 uin
// This routine controls an optimization. False positives (setting
// pWalker->eCode to 1 when it should not be) are deadly, but false-negatives
// (never setting pWalker->eCode) is a harmless missed optimization.
-func impliesNotNullRow(tls *libc.TLS, pWalker uintptr, pExpr uintptr) int32 { /* sqlite3.c:106159:12: */
+func impliesNotNullRow(tls *libc.TLS, pWalker uintptr, pExpr uintptr) int32 { /* sqlite3.c:106790:12: */
if ((*Expr)(unsafe.Pointer((pExpr))).Fflags & (U32(EP_FromJoin))) != U32(0) {
return WRC_Prune
@@ -85193,7 +87311,7 @@ func impliesNotNullRow(tls *libc.TLS, pWalker uintptr, pExpr uintptr) int32 { /*
// clause requires that some column of the right table of the LEFT JOIN
// be non-NULL, then the LEFT JOIN can be safely converted into an
// ordinary join.
-func Xsqlite3ExprImpliesNonNullRow(tls *libc.TLS, p uintptr, iTab int32) int32 { /* sqlite3.c:106264:20: */
+func Xsqlite3ExprImpliesNonNullRow(tls *libc.TLS, p uintptr, iTab int32) int32 { /* sqlite3.c:106895:20: */
bp := tls.Alloc(48)
defer tls.Free(48)
@@ -85227,7 +87345,7 @@ func Xsqlite3ExprImpliesNonNullRow(tls *libc.TLS, p uintptr, iTab int32) int32 {
// Check to see if there are references to columns in table
// pWalker->u.pIdxCover->iCur can be satisfied using the index
// pWalker->u.pIdxCover->pIdx.
-func exprIdxCover(tls *libc.TLS, pWalker uintptr, pExpr uintptr) int32 { /* sqlite3.c:106302:12: */
+func exprIdxCover(tls *libc.TLS, pWalker uintptr, pExpr uintptr) int32 { /* sqlite3.c:106933:12: */
if ((int32((*Expr)(unsafe.Pointer(pExpr)).Fop) == TK_COLUMN) &&
((*Expr)(unsafe.Pointer(pExpr)).FiTable == (*IdxCover)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(pWalker + 40 /* &.u */)))).FiCur)) &&
(int32(Xsqlite3TableColumnToIndex(tls, (*IdxCover)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(pWalker + 40 /* &.u */)))).FpIdx, (*Expr)(unsafe.Pointer(pExpr)).FiColumn)) < 0) {
@@ -85245,7 +87363,7 @@ func exprIdxCover(tls *libc.TLS, pWalker uintptr, pExpr uintptr) int32 { /* sqli
// An index covering an expression means that the expression can be
// evaluated using only the index and without having to lookup the
// corresponding table entry.
-func Xsqlite3ExprCoveredByIndex(tls *libc.TLS, pExpr uintptr, iCur int32, pIdx uintptr) int32 { /* sqlite3.c:106323:20: */
+func Xsqlite3ExprCoveredByIndex(tls *libc.TLS, pExpr uintptr, iCur int32, pIdx uintptr) int32 { /* sqlite3.c:106954:20: */
bp := tls.Alloc(64)
defer tls.Free(64)
@@ -85268,7 +87386,7 @@ func Xsqlite3ExprCoveredByIndex(tls *libc.TLS, pExpr uintptr, iCur int32, pIdx u
// SELECT with a FROM clause encountered during this iteration, set
// SrcCount.iSrcInner to the cursor number of the leftmost object in
// the FROM cause.
-func selectSrcCount(tls *libc.TLS, pWalker uintptr, pSel uintptr) int32 { /* sqlite3.c:106359:12: */
+func selectSrcCount(tls *libc.TLS, pWalker uintptr, pSel uintptr) int32 { /* sqlite3.c:106990:12: */
var p uintptr = *(*uintptr)(unsafe.Pointer(pWalker + 40 /* &.u */))
if (((*SrcCount)(unsafe.Pointer(p)).FiSrcInner == 0x7FFFFFFF) && ((*Select)(unsafe.Pointer(pSel)).FpSrc != 0)) && ((*SrcList)(unsafe.Pointer((*Select)(unsafe.Pointer(pSel)).FpSrc)).FnSrc != 0) {
(*SrcCount)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(pWalker + 40 /* &.u */)))).FiSrcInner = (*SrcItem)(unsafe.Pointer(((*Select)(unsafe.Pointer(pSel)).FpSrc + 8 /* &.a */))).FiCursor
@@ -85277,7 +87395,7 @@ func selectSrcCount(tls *libc.TLS, pWalker uintptr, pSel uintptr) int32 { /* sql
}
// Count the number of references to columns.
-func exprSrcCount(tls *libc.TLS, pWalker uintptr, pExpr uintptr) int32 { /* sqlite3.c:106370:12: */
+func exprSrcCount(tls *libc.TLS, pWalker uintptr, pExpr uintptr) int32 { /* sqlite3.c:107001:12: */
// There was once a NEVER() on the second term on the grounds that
// sqlite3FunctionUsesThisSrc() was always called before
// sqlite3ExprAnalyzeAggregates() and so the TK_COLUMNs have not yet
@@ -85315,7 +87433,7 @@ func exprSrcCount(tls *libc.TLS, pWalker uintptr, pExpr uintptr) int32 { /* sqli
// pSrcList. Return true if they do. Also return true if the function
// has no arguments or has only constant arguments. Return false if pExpr
// references columns but not columns of tables found in pSrcList.
-func Xsqlite3FunctionUsesThisSrc(tls *libc.TLS, pExpr uintptr, pSrcList uintptr) int32 { /* sqlite3.c:106403:20: */
+func Xsqlite3FunctionUsesThisSrc(tls *libc.TLS, pExpr uintptr, pSrcList uintptr) int32 { /* sqlite3.c:107034:20: */
bp := tls.Alloc(72)
defer tls.Free(72)
@@ -85358,7 +87476,7 @@ func Xsqlite3FunctionUsesThisSrc(tls *libc.TLS, pExpr uintptr, pSrcList uintptr)
// This will cause the expression to be deleted automatically when the
// Parse object is destroyed, but the zero register number means that it
// will not generate any code in the preamble.
-func agginfoPersistExprCb(tls *libc.TLS, pWalker uintptr, pExpr uintptr) int32 { /* sqlite3.c:106437:12: */
+func agginfoPersistExprCb(tls *libc.TLS, pWalker uintptr, pExpr uintptr) int32 { /* sqlite3.c:107068:12: */
if (!(((*Expr)(unsafe.Pointer((pExpr))).Fflags & (U32(EP_TokenOnly | EP_Reduced))) != U32(0))) &&
((*Expr)(unsafe.Pointer(pExpr)).FpAggInfo != uintptr(0)) {
var pAggInfo uintptr = (*Expr)(unsafe.Pointer(pExpr)).FpAggInfo
@@ -85377,10 +87495,10 @@ func agginfoPersistExprCb(tls *libc.TLS, pWalker uintptr, pExpr uintptr) int32 {
}
} else {
- if (*AggInfo_func)(unsafe.Pointer((*AggInfo)(unsafe.Pointer(pAggInfo)).FaFunc+uintptr(iAgg)*24)).FpFExpr == pExpr {
+ if (*AggInfo_func)(unsafe.Pointer((*AggInfo)(unsafe.Pointer(pAggInfo)).FaFunc+uintptr(iAgg)*32)).FpFExpr == pExpr {
pExpr = Xsqlite3ExprDup(tls, db, pExpr, 0)
if pExpr != 0 {
- (*AggInfo_func)(unsafe.Pointer((*AggInfo)(unsafe.Pointer(pAggInfo)).FaFunc + uintptr(iAgg)*24)).FpFExpr = pExpr
+ (*AggInfo_func)(unsafe.Pointer((*AggInfo)(unsafe.Pointer(pAggInfo)).FaFunc + uintptr(iAgg)*32)).FpFExpr = pExpr
Xsqlite3ExprDeferredDelete(tls, pParse, pExpr)
}
}
@@ -85391,7 +87509,7 @@ func agginfoPersistExprCb(tls *libc.TLS, pWalker uintptr, pExpr uintptr) int32 {
// Initialize a Walker object so that will persist AggInfo entries referenced
// by the tree that is walked.
-func Xsqlite3AggInfoPersistWalkerInit(tls *libc.TLS, pWalker uintptr, pParse uintptr) { /* sqlite3.c:106473:21: */
+func Xsqlite3AggInfoPersistWalkerInit(tls *libc.TLS, pWalker uintptr, pParse uintptr) { /* sqlite3.c:107104:21: */
libc.Xmemset(tls, pWalker, 0, uint64(unsafe.Sizeof(Walker{})))
(*Walker)(unsafe.Pointer(pWalker)).FpParse = pParse
(*Walker)(unsafe.Pointer(pWalker)).FxExprCallback = *(*uintptr)(unsafe.Pointer(&struct {
@@ -85404,7 +87522,7 @@ func Xsqlite3AggInfoPersistWalkerInit(tls *libc.TLS, pWalker uintptr, pParse uin
// Add a new element to the pAggInfo->aCol[] array. Return the index of
// the new element. Return a negative number if malloc fails.
-func addAggInfoColumn(tls *libc.TLS, db uintptr, pInfo uintptr) int32 { /* sqlite3.c:106484:12: */
+func addAggInfoColumn(tls *libc.TLS, db uintptr, pInfo uintptr) int32 { /* sqlite3.c:107115:12: */
bp := tls.Alloc(4)
defer tls.Free(4)
@@ -85421,7 +87539,7 @@ func addAggInfoColumn(tls *libc.TLS, db uintptr, pInfo uintptr) int32 { /* sqlit
// Add a new element to the pAggInfo->aFunc[] array. Return the index of
// the new element. Return a negative number if malloc fails.
-func addAggInfoFunc(tls *libc.TLS, db uintptr, pInfo uintptr) int32 { /* sqlite3.c:106500:12: */
+func addAggInfoFunc(tls *libc.TLS, db uintptr, pInfo uintptr) int32 { /* sqlite3.c:107131:12: */
bp := tls.Alloc(4)
defer tls.Free(4)
@@ -85439,7 +87557,7 @@ func addAggInfoFunc(tls *libc.TLS, db uintptr, pInfo uintptr) int32 { /* sqlite3
// This is the xExprCallback for a tree walker. It is used to
// implement sqlite3ExprAnalyzeAggregates(). See sqlite3ExprAnalyzeAggregates
// for additional information.
-func analyzeAggregate(tls *libc.TLS, pWalker uintptr, pExpr uintptr) int32 { /* sqlite3.c:106517:12: */
+func analyzeAggregate(tls *libc.TLS, pWalker uintptr, pExpr uintptr) int32 { /* sqlite3.c:107148:12: */
var i int32
var pNC uintptr = *(*uintptr)(unsafe.Pointer(pWalker + 40 /* &.u */))
var pParse uintptr = (*NameContext)(unsafe.Pointer(pNC)).FpParse
@@ -85567,6 +87685,9 @@ func analyzeAggregate(tls *libc.TLS, pWalker uintptr, pExpr uintptr) int32 { /*
goto __12
}
{
+ if (*AggInfo_func)(unsafe.Pointer(pItem)).FpFExpr == pExpr {
+ goto __12
+ }
if Xsqlite3ExprCompare(tls, uintptr(0), (*AggInfo_func)(unsafe.Pointer(pItem)).FpFExpr, pExpr, -1) == 0 {
goto __12
}
@@ -85575,7 +87696,7 @@ func analyzeAggregate(tls *libc.TLS, pWalker uintptr, pExpr uintptr) int32 { /*
goto __11
__11:
i++
- pItem += 24
+ pItem += 32
goto __10
goto __12
__12:
@@ -85586,7 +87707,7 @@ func analyzeAggregate(tls *libc.TLS, pWalker uintptr, pExpr uintptr) int32 { /*
i = addAggInfoFunc(tls, (*Parse)(unsafe.Pointer(pParse)).Fdb, pAggInfo)
if i >= 0 {
- pItem = ((*AggInfo)(unsafe.Pointer(pAggInfo)).FaFunc + uintptr(i)*24)
+ pItem = ((*AggInfo)(unsafe.Pointer(pAggInfo)).FaFunc + uintptr(i)*32)
(*AggInfo_func)(unsafe.Pointer(pItem)).FpFExpr = pExpr
(*AggInfo_func)(unsafe.Pointer(pItem)).FiMem = libc.PreIncInt32(&(*Parse)(unsafe.Pointer(pParse)).FnMem, 1)
@@ -85626,7 +87747,7 @@ func analyzeAggregate(tls *libc.TLS, pWalker uintptr, pExpr uintptr) int32 { /*
//
// This routine should only be called after the expression has been
// analyzed by sqlite3ResolveExprNames().
-func Xsqlite3ExprAnalyzeAggregates(tls *libc.TLS, pNC uintptr, pExpr uintptr) { /* sqlite3.c:106653:21: */
+func Xsqlite3ExprAnalyzeAggregates(tls *libc.TLS, pNC uintptr, pExpr uintptr) { /* sqlite3.c:107285:21: */
bp := tls.Alloc(48)
defer tls.Free(48)
@@ -85652,7 +87773,7 @@ func Xsqlite3ExprAnalyzeAggregates(tls *libc.TLS, pNC uintptr, pExpr uintptr) {
// expression list. Return the number of errors.
//
// If an error is found, the analysis is cut short.
-func Xsqlite3ExprAnalyzeAggList(tls *libc.TLS, pNC uintptr, pList uintptr) { /* sqlite3.c:106671:21: */
+func Xsqlite3ExprAnalyzeAggList(tls *libc.TLS, pNC uintptr, pList uintptr) { /* sqlite3.c:107303:21: */
var pItem uintptr
var i int32
if pList != 0 {
@@ -85677,7 +87798,7 @@ func Xsqlite3ExprAnalyzeAggList(tls *libc.TLS, pNC uintptr, pList uintptr) { /*
}
// Allocate a single new register for use to hold some intermediate result.
-func Xsqlite3GetTempReg(tls *libc.TLS, pParse uintptr) int32 { /* sqlite3.c:106684:20: */
+func Xsqlite3GetTempReg(tls *libc.TLS, pParse uintptr) int32 { /* sqlite3.c:107316:20: */
if int32((*Parse)(unsafe.Pointer(pParse)).FnTempReg) == 0 {
return libc.PreIncInt32(&(*Parse)(unsafe.Pointer(pParse)).FnMem, 1)
}
@@ -85686,7 +87807,7 @@ func Xsqlite3GetTempReg(tls *libc.TLS, pParse uintptr) int32 { /* sqlite3.c:1066
// Deallocate a register, making available for reuse for some other
// purpose.
-func Xsqlite3ReleaseTempReg(tls *libc.TLS, pParse uintptr, iReg int32) { /* sqlite3.c:106695:21: */
+func Xsqlite3ReleaseTempReg(tls *libc.TLS, pParse uintptr, iReg int32) { /* sqlite3.c:107327:21: */
if iReg != 0 {
if int32((*Parse)(unsafe.Pointer(pParse)).FnTempReg) < (int32(uint64(unsafe.Sizeof([8]int32{})) / uint64(unsafe.Sizeof(int32(0))))) {
@@ -85696,7 +87817,7 @@ func Xsqlite3ReleaseTempReg(tls *libc.TLS, pParse uintptr, iReg int32) { /* sqli
}
// Allocate or deallocate a block of nReg consecutive registers.
-func Xsqlite3GetTempRange(tls *libc.TLS, pParse uintptr, nReg int32) int32 { /* sqlite3.c:106707:20: */
+func Xsqlite3GetTempRange(tls *libc.TLS, pParse uintptr, nReg int32) int32 { /* sqlite3.c:107339:20: */
var i int32
var n int32
if nReg == 1 {
@@ -85714,7 +87835,7 @@ func Xsqlite3GetTempRange(tls *libc.TLS, pParse uintptr, nReg int32) int32 { /*
return i
}
-func Xsqlite3ReleaseTempRange(tls *libc.TLS, pParse uintptr, iReg int32, nReg int32) { /* sqlite3.c:106721:21: */
+func Xsqlite3ReleaseTempRange(tls *libc.TLS, pParse uintptr, iReg int32, nReg int32) { /* sqlite3.c:107353:21: */
if nReg == 1 {
Xsqlite3ReleaseTempReg(tls, pParse, iReg)
return
@@ -85732,7 +87853,7 @@ func Xsqlite3ReleaseTempRange(tls *libc.TLS, pParse uintptr, iReg int32, nReg in
// that might be invoked from other parts of the code, to ensure that
// the sub/co-routine does not use registers in common with the code that
// invokes the sub/co-routine.
-func Xsqlite3ClearTempRegCache(tls *libc.TLS, pParse uintptr) { /* sqlite3.c:106741:21: */
+func Xsqlite3ClearTempRegCache(tls *libc.TLS, pParse uintptr) { /* sqlite3.c:107373:21: */
(*Parse)(unsafe.Pointer(pParse)).FnTempReg = U8(0)
(*Parse)(unsafe.Pointer(pParse)).FnRangeReg = 0
}
@@ -85766,14 +87887,15 @@ func Xsqlite3ClearTempRegCache(tls *libc.TLS, pParse uintptr) { /* sqlite3.c:106
// in pParse->zErr (system tables may not be altered) and returns non-zero.
//
// Or, if zName is not a system table, zero is returned.
-func isAlterableTable(tls *libc.TLS, pParse uintptr, pTab uintptr) int32 { /* sqlite3.c:106801:12: */
+func isAlterableTable(tls *libc.TLS, pParse uintptr, pTab uintptr) int32 { /* sqlite3.c:107433:12: */
bp := tls.Alloc(8)
defer tls.Free(8)
- if (0 == Xsqlite3_strnicmp(tls, (*Table)(unsafe.Pointer(pTab)).FzName, ts+6950 /* "sqlite_" */, 7)) ||
+ if ((0 == Xsqlite3_strnicmp(tls, (*Table)(unsafe.Pointer(pTab)).FzName, ts+7081 /* "sqlite_" */, 7)) ||
+ (((*Table)(unsafe.Pointer(pTab)).FtabFlags & U32(TF_Eponymous)) != U32(0))) ||
((((*Table)(unsafe.Pointer(pTab)).FtabFlags & U32(TF_Shadow)) != U32(0)) &&
(Xsqlite3ReadOnlyShadowTables(tls, (*Parse)(unsafe.Pointer(pParse)).Fdb) != 0)) {
- Xsqlite3ErrorMsg(tls, pParse, ts+6958 /* "table %s may not..." */, libc.VaList(bp, (*Table)(unsafe.Pointer(pTab)).FzName))
+ Xsqlite3ErrorMsg(tls, pParse, ts+7089 /* "table %s may not..." */, libc.VaList(bp, (*Table)(unsafe.Pointer(pTab)).FzName))
return 1
}
return 0
@@ -85784,28 +87906,47 @@ func isAlterableTable(tls *libc.TLS, pParse uintptr, pTab uintptr) int32 { /* sq
// called at the end of the generation of an ALTER TABLE ... RENAME ...
// statement to ensure that the operation has not rendered any schema
// objects unusable.
-func renameTestSchema(tls *libc.TLS, pParse uintptr, zDb uintptr, bTemp int32, zWhen uintptr, zDropColumn uintptr) { /* sqlite3.c:106822:13: */
+func renameTestSchema(tls *libc.TLS, pParse uintptr, zDb uintptr, bTemp int32, zWhen uintptr, bNoDQS int32) { /* sqlite3.c:107455:13: */
bp := tls.Alloc(64)
defer tls.Free(64)
(*Parse)(unsafe.Pointer(pParse)).FcolNamesSet = U8(1)
Xsqlite3NestedParse(tls, pParse,
- ts+6986, /* "SELECT 1 FROM \"%..." */
+ ts+7117, /* "SELECT 1 FROM \"%..." */
libc.VaList(bp, zDb,
- zDb, bTemp, zWhen, zDropColumn))
+ zDb, bTemp, zWhen, bNoDQS))
if bTemp == 0 {
Xsqlite3NestedParse(tls, pParse,
- ts+7161, /* "SELECT 1 FROM te..." */
- libc.VaList(bp+40, zDb, zWhen, zDropColumn))
+ ts+7292, /* "SELECT 1 FROM te..." */
+ libc.VaList(bp+40, zDb, zWhen, bNoDQS))
+ }
+}
+
+// Generate VM code to replace any double-quoted strings (but not double-quoted
+// identifiers) within the "sql" column of the sqlite_schema table in
+// database zDb with their single-quoted equivalents. If argument bTemp is
+// not true, similarly update all SQL statements in the sqlite_schema table
+// of the temp db.
+func renameFixQuotes(tls *libc.TLS, pParse uintptr, zDb uintptr, bTemp int32) { /* sqlite3.c:107492:13: */
+ bp := tls.Alloc(16)
+ defer tls.Free(16)
+
+ Xsqlite3NestedParse(tls, pParse,
+
+ ts+7466 /* "UPDATE \"%w\".sqli..." */, libc.VaList(bp, zDb, zDb))
+ if bTemp == 0 {
+ Xsqlite3NestedParse(tls, pParse,
+
+ ts+7613 /* "UPDATE temp.sqli..." */, 0)
}
}
// Generate code to reload the schema for database iDb. And, if iDb!=1, for
// the temp database as well.
-func renameReloadSchema(tls *libc.TLS, pParse uintptr, iDb int32, p5 U16) { /* sqlite3.c:106856:13: */
+func renameReloadSchema(tls *libc.TLS, pParse uintptr, iDb int32, p5 U16) { /* sqlite3.c:107513:13: */
var v uintptr = (*Parse)(unsafe.Pointer(pParse)).FpVdbe
if v != 0 {
Xsqlite3ChangeCookie(tls, pParse, iDb)
@@ -85818,7 +87959,7 @@ func renameReloadSchema(tls *libc.TLS, pParse uintptr, iDb int32, p5 U16) { /* s
// Generate code to implement the "ALTER TABLE xxx RENAME TO yyy"
// command.
-func Xsqlite3AlterRenameTable(tls *libc.TLS, pParse uintptr, pSrc uintptr, pName uintptr) { /* sqlite3.c:106869:21: */
+func Xsqlite3AlterRenameTable(tls *libc.TLS, pParse uintptr, pSrc uintptr, pName uintptr) { /* sqlite3.c:107526:21: */
bp := tls.Alloc(184)
defer tls.Free(184)
@@ -85873,7 +88014,7 @@ __3:
goto __4
}
Xsqlite3ErrorMsg(tls, pParse,
- ts+7335 /* "there is already..." */, libc.VaList(bp, zName))
+ ts+7764 /* "there is already..." */, libc.VaList(bp, zName))
goto exit_rename_table
__4:
;
@@ -85886,7 +88027,7 @@ __4:
goto exit_rename_table
__5:
;
- if !(SQLITE_OK != Xsqlite3CheckObjectName(tls, pParse, zName, ts+7394 /* "table" */, zName)) {
+ if !(SQLITE_OK != Xsqlite3CheckObjectName(tls, pParse, zName, ts+7823 /* "table" */, zName)) {
goto __6
}
goto exit_rename_table
@@ -85896,7 +88037,7 @@ __6:
if !((*Table)(unsafe.Pointer(pTab)).FpSelect != 0) {
goto __7
}
- Xsqlite3ErrorMsg(tls, pParse, ts+7400 /* "view %s may not ..." */, libc.VaList(bp+8, (*Table)(unsafe.Pointer(pTab)).FzName))
+ Xsqlite3ErrorMsg(tls, pParse, ts+7829 /* "view %s may not ..." */, libc.VaList(bp+8, (*Table)(unsafe.Pointer(pTab)).FzName))
goto exit_rename_table
__7:
;
@@ -85949,24 +88090,24 @@ __12:
// the schema to use the new table name.
Xsqlite3NestedParse(tls, pParse,
- ts+7427 /* "UPDATE \"%w\".sqli..." */, libc.VaList(bp+16, zDb, zDb, zTabName, zName, (libc.Bool32(iDb == 1)), zTabName))
+ ts+7856 /* "UPDATE \"%w\".sqli..." */, libc.VaList(bp+16, zDb, zDb, zTabName, zName, (libc.Bool32(iDb == 1)), zTabName))
// Update the tbl_name and name columns of the sqlite_schema table
// as required.
Xsqlite3NestedParse(tls, pParse,
- ts+7611, /* "UPDATE %Q.sqlite..." */
+ ts+8040, /* "UPDATE %Q.sqlite..." */
libc.VaList(bp+64, zDb,
zName, zName, zName,
nTabName, zTabName))
// If the sqlite_sequence table exists in this database, then update
// it with the new table name.
- if !(Xsqlite3FindTable(tls, db, ts+7916 /* "sqlite_sequence" */, zDb) != 0) {
+ if !(Xsqlite3FindTable(tls, db, ts+8345 /* "sqlite_sequence" */, zDb) != 0) {
goto __13
}
Xsqlite3NestedParse(tls, pParse,
- ts+7932, /* "UPDATE \"%w\".sqli..." */
+ ts+8361, /* "UPDATE \"%w\".sqli..." */
libc.VaList(bp+112, zDb, zName, (*Table)(unsafe.Pointer(pTab)).FzName))
__13:
;
@@ -85979,7 +88120,7 @@ __13:
}
Xsqlite3NestedParse(tls, pParse,
- ts+7990 /* "UPDATE sqlite_te..." */, libc.VaList(bp+136, zDb, zTabName, zName, zTabName, zDb, zName))
+ ts+8419 /* "UPDATE sqlite_te..." */, libc.VaList(bp+136, zDb, zTabName, zName, zTabName, zDb, zName))
__14:
;
@@ -85997,7 +88138,7 @@ __15:
;
renameReloadSchema(tls, pParse, iDb, uint16(INITFLAG_AlterRename))
- renameTestSchema(tls, pParse, zDb, (libc.Bool32(iDb == 1)), ts+8254 /* "after rename" */, uintptr(0))
+ renameTestSchema(tls, pParse, zDb, (libc.Bool32(iDb == 1)), ts+8684 /* "after rename" */, 0)
exit_rename_table:
Xsqlite3SrcListDelete(tls, db, pSrc)
@@ -86007,12 +88148,12 @@ exit_rename_table:
// Write code that will raise an error if the table described by
// zDb and zTab is not empty.
-func sqlite3ErrorIfNotEmpty(tls *libc.TLS, pParse uintptr, zDb uintptr, zTab uintptr, zErr uintptr) { /* sqlite3.c:107042:13: */
+func sqlite3ErrorIfNotEmpty(tls *libc.TLS, pParse uintptr, zDb uintptr, zTab uintptr, zErr uintptr) { /* sqlite3.c:107699:13: */
bp := tls.Alloc(24)
defer tls.Free(24)
Xsqlite3NestedParse(tls, pParse,
- ts+8267, /* "SELECT raise(ABO..." */
+ ts+8697, /* "SELECT raise(ABO..." */
libc.VaList(bp, zErr, zDb, zTab))
}
@@ -86022,7 +88163,7 @@ func sqlite3ErrorIfNotEmpty(tls *libc.TLS, pParse uintptr, zDb uintptr, zTab uin
//
// The Table structure pParse->pNewTable was extended to include
// the new column during parsing.
-func Xsqlite3AlterFinishAddColumn(tls *libc.TLS, pParse uintptr, pColDef uintptr) { /* sqlite3.c:107062:21: */
+func Xsqlite3AlterFinishAddColumn(tls *libc.TLS, pParse uintptr, pColDef uintptr) { /* sqlite3.c:107719:21: */
bp := tls.Alloc(48)
defer tls.Free(48)
@@ -86060,12 +88201,12 @@ func Xsqlite3AlterFinishAddColumn(tls *libc.TLS, pParse uintptr, pColDef uintptr
// If there is a NOT NULL constraint, then the default value for the
// column must not be NULL.
if (int32((*Column)(unsafe.Pointer(pCol)).FcolFlags) & COLFLAG_PRIMKEY) != 0 {
- Xsqlite3ErrorMsg(tls, pParse, ts+8305 /* "Cannot add a PRI..." */, 0)
+ Xsqlite3ErrorMsg(tls, pParse, ts+8735 /* "Cannot add a PRI..." */, 0)
return
}
if (*Table)(unsafe.Pointer(pNew)).FpIndex != 0 {
Xsqlite3ErrorMsg(tls, pParse,
- ts+8337 /* "Cannot add a UNI..." */, 0)
+ ts+8767 /* "Cannot add a UNI..." */, 0)
return
}
if (int32((*Column)(unsafe.Pointer(pCol)).FcolFlags) & COLFLAG_GENERATED) == 0 {
@@ -86078,11 +88219,11 @@ func Xsqlite3AlterFinishAddColumn(tls *libc.TLS, pParse uintptr, pColDef uintptr
}
if ((((*Sqlite3)(unsafe.Pointer(db)).Fflags & uint64(SQLITE_ForeignKeys)) != 0) && ((*Table)(unsafe.Pointer(pNew)).FpFKey != 0)) && (pDflt != 0) {
sqlite3ErrorIfNotEmpty(tls, pParse, zDb, zTab,
- ts+8364 /* "Cannot add a REF..." */)
+ ts+8794 /* "Cannot add a REF..." */)
}
if ((*Column)(unsafe.Pointer(pCol)).FnotNull != 0) && !(pDflt != 0) {
sqlite3ErrorIfNotEmpty(tls, pParse, zDb, zTab,
- ts+8423 /* "Cannot add a NOT..." */)
+ ts+8853 /* "Cannot add a NOT..." */)
}
// Ensure the default expression is something that sqlite3ValueFromExpr()
@@ -86098,12 +88239,12 @@ func Xsqlite3AlterFinishAddColumn(tls *libc.TLS, pParse uintptr, pColDef uintptr
}
if !(*(*uintptr)(unsafe.Pointer(bp + 40 /* pVal */)) != 0) {
sqlite3ErrorIfNotEmpty(tls, pParse, zDb, zTab,
- ts+8476 /* "Cannot add a col..." */)
+ ts+8906 /* "Cannot add a col..." */)
}
Xsqlite3ValueFree(tls, *(*uintptr)(unsafe.Pointer(bp + 40 /* pVal */)))
}
} else if (int32((*Column)(unsafe.Pointer(pCol)).FcolFlags) & COLFLAG_STORED) != 0 {
- sqlite3ErrorIfNotEmpty(tls, pParse, zDb, zTab, ts+8522 /* "cannot add a STO..." */)
+ sqlite3ErrorIfNotEmpty(tls, pParse, zDb, zTab, ts+8952 /* "cannot add a STO..." */)
}
// Modify the CREATE TABLE statement.
@@ -86111,15 +88252,15 @@ func Xsqlite3AlterFinishAddColumn(tls *libc.TLS, pParse uintptr, pColDef uintptr
if zCol != 0 {
var zEnd uintptr = (zCol + uintptr(((*Token)(unsafe.Pointer(pColDef)).Fn - uint32(1))))
var savedDbFlags U32 = (*Sqlite3)(unsafe.Pointer(db)).FmDbFlags
- for (zEnd > zCol) && ((int32(*(*int8)(unsafe.Pointer(zEnd))) == ';') || ((int32(Xsqlite3CtypeMap[uint8(*(*int8)(unsafe.Pointer(zEnd)))]) & 0x01) != 0)) {
- *(*int8)(unsafe.Pointer(libc.PostDecUintptr(&zEnd, 1))) = int8(0)
+ for (zEnd > zCol) && ((int32(*(*uint8)(unsafe.Pointer(zEnd))) == ';') || ((int32(Xsqlite3CtypeMap[uint8(*(*uint8)(unsafe.Pointer(zEnd)))]) & 0x01) != 0)) {
+ *(*uint8)(unsafe.Pointer(libc.PostDecUintptr(&zEnd, 1))) = uint8(0)
}
*(*U32)(unsafe.Pointer(db + 44 /* &.mDbFlags */)) |= (U32(DBFLAG_PreferBuiltin))
// substr() operations on characters, but addColOffset is in bytes. So we
// have to use printf() to translate between these units:
Xsqlite3NestedParse(tls, pParse,
- ts+8549, /* "UPDATE \"%w\".sqli..." */
+ ts+8979, /* "UPDATE \"%w\".sqli..." */
libc.VaList(bp, zDb, (*Table)(unsafe.Pointer(pNew)).FaddColOffset, zCol, (*Table)(unsafe.Pointer(pNew)).FaddColOffset,
zTab))
Xsqlite3DbFree(tls, db, zCol)
@@ -86158,7 +88299,7 @@ func Xsqlite3AlterFinishAddColumn(tls *libc.TLS, pParse uintptr, pColDef uintptr
//
// Routine sqlite3AlterFinishAddColumn() will be called to complete
// coding the "ALTER TABLE ... ADD" statement.
-func Xsqlite3AlterBeginAddColumn(tls *libc.TLS, pParse uintptr, pSrc uintptr) { /* sqlite3.c:107210:21: */
+func Xsqlite3AlterBeginAddColumn(tls *libc.TLS, pParse uintptr, pSrc uintptr) { /* sqlite3.c:107867:21: */
bp := tls.Alloc(8)
defer tls.Free(8)
@@ -86190,7 +88331,7 @@ __2:
if !((*Table)(unsafe.Pointer(pTab)).FnModuleArg != 0) {
goto __3
}
- Xsqlite3ErrorMsg(tls, pParse, ts+8695 /* "virtual tables m..." */, 0)
+ Xsqlite3ErrorMsg(tls, pParse, ts+9125 /* "virtual tables m..." */, 0)
goto exit_begin_add_column
__3:
;
@@ -86199,7 +88340,7 @@ __3:
if !((*Table)(unsafe.Pointer(pTab)).FpSelect != 0) {
goto __4
}
- Xsqlite3ErrorMsg(tls, pParse, ts+8729 /* "Cannot add a col..." */, 0)
+ Xsqlite3ErrorMsg(tls, pParse, ts+9159 /* "Cannot add a col..." */, 0)
goto exit_begin_add_column
__4:
;
@@ -86234,7 +88375,7 @@ __6:
nAlloc = ((((int32((*Table)(unsafe.Pointer(pNew)).FnCol) - 1) / 8) * 8) + 8)
(*Table)(unsafe.Pointer(pNew)).FaCol = Xsqlite3DbMallocZero(tls, db, (uint64(uint64(unsafe.Sizeof(Column{})) * uint64(nAlloc))))
- (*Table)(unsafe.Pointer(pNew)).FzName = Xsqlite3MPrintf(tls, db, ts+8759 /* "sqlite_altertab_..." */, libc.VaList(bp, (*Table)(unsafe.Pointer(pTab)).FzName))
+ (*Table)(unsafe.Pointer(pNew)).FzName = Xsqlite3MPrintf(tls, db, ts+9189 /* "sqlite_altertab_..." */, libc.VaList(bp, (*Table)(unsafe.Pointer(pTab)).FzName))
if !(!(int32((*Table)(unsafe.Pointer(pNew)).FaCol) != 0) || !(int32((*Table)(unsafe.Pointer(pNew)).FzName) != 0)) {
goto __7
}
@@ -86275,24 +88416,24 @@ exit_begin_add_column:
// it loads an error message into pParse and returns non-zero.
//
// Or, if pTab is not a view or virtual table, zero is returned.
-func isRealTable(tls *libc.TLS, pParse uintptr, pTab uintptr, bDrop int32) int32 { /* sqlite3.c:107292:12: */
+func isRealTable(tls *libc.TLS, pParse uintptr, pTab uintptr, bDrop int32) int32 { /* sqlite3.c:107949:12: */
bp := tls.Alloc(24)
defer tls.Free(24)
var zType uintptr = uintptr(0)
if (*Table)(unsafe.Pointer(pTab)).FpSelect != 0 {
- zType = ts + 8778 /* "view" */
+ zType = ts + 9208 /* "view" */
}
if (*Table)(unsafe.Pointer(pTab)).FnModuleArg != 0 {
- zType = ts + 8783 /* "virtual table" */
+ zType = ts + 9213 /* "virtual table" */
}
if zType != 0 {
- Xsqlite3ErrorMsg(tls, pParse, ts+8797, /* "cannot %s %s \"%s..." */
+ Xsqlite3ErrorMsg(tls, pParse, ts+9227, /* "cannot %s %s \"%s..." */
libc.VaList(bp, func() uintptr {
if bDrop != 0 {
- return ts + 8815 /* "drop column from" */
+ return ts + 9245 /* "drop column from" */
}
- return ts + 8832 /* "rename columns o..." */
+ return ts + 9262 /* "rename columns o..." */
}(),
zType, (*Table)(unsafe.Pointer(pTab)).FzName))
return 1
@@ -86303,7 +88444,7 @@ func isRealTable(tls *libc.TLS, pParse uintptr, pTab uintptr, bDrop int32) int32
// Handles the following parser reduction:
//
// cmd ::= ALTER TABLE pSrc RENAME COLUMN pOld TO pNew
-func Xsqlite3AlterRenameColumn(tls *libc.TLS, pParse uintptr, pSrc uintptr, pOld uintptr, pNew uintptr) { /* sqlite3.c:107322:21: */
+func Xsqlite3AlterRenameColumn(tls *libc.TLS, pParse uintptr, pSrc uintptr, pOld uintptr, pNew uintptr) { /* sqlite3.c:107979:21: */
bp := tls.Alloc(112)
defer tls.Free(112)
@@ -86385,11 +88526,15 @@ __8:
if !(iCol == int32((*Table)(unsafe.Pointer(pTab)).FnCol)) {
goto __10
}
- Xsqlite3ErrorMsg(tls, pParse, ts+5252 /* "no such column: ..." */, libc.VaList(bp, zOld))
+ Xsqlite3ErrorMsg(tls, pParse, ts+5383 /* "no such column: ..." */, libc.VaList(bp, zOld))
goto exit_rename_column
__10:
;
+ // Ensure the schema contains no double-quoted strings
+ renameTestSchema(tls, pParse, zDb, (libc.Bool32(iSchema == 1)), ts+755 /* "" */, 0)
+ renameFixQuotes(tls, pParse, zDb, (libc.Bool32(iSchema == 1)))
+
// Do the rename operation using a recursive UPDATE statement that
// uses the sqlite_rename_column() SQL function to compute the new
// CREATE statement text for the sqlite_schema table.
@@ -86402,22 +88547,22 @@ __10:
__11:
;
- bQuote = (int32(Xsqlite3CtypeMap[uint8(*(*int8)(unsafe.Pointer((*Token)(unsafe.Pointer(pNew)).Fz)))]) & 0x80)
+ bQuote = (int32(Xsqlite3CtypeMap[uint8(*(*uint8)(unsafe.Pointer((*Token)(unsafe.Pointer(pNew)).Fz)))]) & 0x80)
Xsqlite3NestedParse(tls, pParse,
- ts+8850, /* "UPDATE \"%w\".sqli..." */
+ ts+9280, /* "UPDATE \"%w\".sqli..." */
libc.VaList(bp+8, zDb,
zDb, (*Table)(unsafe.Pointer(pTab)).FzName, iCol, zNew, bQuote, (libc.Bool32(iSchema == 1)),
(*Table)(unsafe.Pointer(pTab)).FzName))
Xsqlite3NestedParse(tls, pParse,
- ts+9068, /* "UPDATE temp.sqli..." */
+ ts+9498, /* "UPDATE temp.sqli..." */
libc.VaList(bp+72, zDb, (*Table)(unsafe.Pointer(pTab)).FzName, iCol, zNew, bQuote))
// Drop and reload the database schema.
renameReloadSchema(tls, pParse, iSchema, uint16(INITFLAG_AlterRename))
- renameTestSchema(tls, pParse, zDb, (libc.Bool32(iSchema == 1)), ts+8254 /* "after rename" */, uintptr(0))
+ renameTestSchema(tls, pParse, zDb, (libc.Bool32(iSchema == 1)), ts+8684 /* "after rename" */, 1)
exit_rename_column:
Xsqlite3SrcListDelete(tls, db, pSrc)
@@ -86428,7 +88573,7 @@ exit_rename_column:
// The context of an ALTER TABLE RENAME COLUMN operation that gets passed
// down into the Walker.
-type RenameCtx = RenameCtx1 /* sqlite3.c:107434:26 */
+type RenameCtx = RenameCtx1 /* sqlite3.c:108095:26 */
// Remember that the parser tree element pPtr was created using
// the token pToken.
@@ -86440,7 +88585,7 @@ type RenameCtx = RenameCtx1 /* sqlite3.c:107434:26 */
// The pPtr argument is returned so that this routine can be used
// with tail recursion in tokenExpr() routine, for a small performance
// improvement.
-func Xsqlite3RenameTokenMap(tls *libc.TLS, pParse uintptr, pPtr uintptr, pToken uintptr) uintptr { /* sqlite3.c:107495:21: */
+func Xsqlite3RenameTokenMap(tls *libc.TLS, pParse uintptr, pPtr uintptr, pToken uintptr) uintptr { /* sqlite3.c:108156:21: */
var pNew uintptr
if int32((*Parse)(unsafe.Pointer(pParse)).FeParseMode) != PARSE_MODE_UNMAP {
@@ -86459,7 +88604,7 @@ func Xsqlite3RenameTokenMap(tls *libc.TLS, pParse uintptr, pPtr uintptr, pToken
// It is assumed that there is already a RenameToken object associated
// with parse tree element pFrom. This function remaps the associated token
// to parse tree element pTo.
-func Xsqlite3RenameTokenRemap(tls *libc.TLS, pParse uintptr, pTo uintptr, pFrom uintptr) { /* sqlite3.c:107517:21: */
+func Xsqlite3RenameTokenRemap(tls *libc.TLS, pParse uintptr, pTo uintptr, pFrom uintptr) { /* sqlite3.c:108178:21: */
var p uintptr
for p = (*Parse)(unsafe.Pointer(pParse)).FpRename; p != 0; p = (*RenameToken)(unsafe.Pointer(p)).FpNext {
@@ -86471,7 +88616,7 @@ func Xsqlite3RenameTokenRemap(tls *libc.TLS, pParse uintptr, pTo uintptr, pFrom
}
// Walker callback used by sqlite3RenameExprUnmap().
-func renameUnmapExprCb(tls *libc.TLS, pWalker uintptr, pExpr uintptr) int32 { /* sqlite3.c:107531:12: */
+func renameUnmapExprCb(tls *libc.TLS, pWalker uintptr, pExpr uintptr) int32 { /* sqlite3.c:108192:12: */
var pParse uintptr = (*Walker)(unsafe.Pointer(pWalker)).FpParse
Xsqlite3RenameTokenRemap(tls, pParse, uintptr(0), pExpr)
return WRC_Continue
@@ -86479,28 +88624,45 @@ func renameUnmapExprCb(tls *libc.TLS, pWalker uintptr, pExpr uintptr) int32 { /*
// Iterate through the Select objects that are part of WITH clauses attached
// to select statement pSelect.
-func renameWalkWith(tls *libc.TLS, pWalker uintptr, pSelect uintptr) { /* sqlite3.c:107541:13: */
+func renameWalkWith(tls *libc.TLS, pWalker uintptr, pSelect uintptr) { /* sqlite3.c:108202:13: */
bp := tls.Alloc(56)
defer tls.Free(56)
var pWith uintptr = (*Select)(unsafe.Pointer(pSelect)).FpWith
if pWith != 0 {
+ var pParse uintptr = (*Walker)(unsafe.Pointer(pWalker)).FpParse
var i int32
+ var pCopy uintptr = uintptr(0)
+
+ if ((*Select)(unsafe.Pointer((*Cte)(unsafe.Pointer((pWith + 16 /* &.a */))).FpSelect)).FselFlags & U32(SF_Expanded)) == U32(0) {
+ // Push a copy of the With object onto the with-stack. We use a copy
+ // here as the original will be expanded and resolved (flags SF_Expanded
+ // and SF_Resolved) below. And the parser code that uses the with-stack
+ // fails if the Select objects on it have already been expanded and
+ // resolved.
+ pCopy = Xsqlite3WithDup(tls, (*Parse)(unsafe.Pointer(pParse)).Fdb, pWith)
+ pCopy = Xsqlite3WithPush(tls, pParse, pCopy, uint8(1))
+ }
for i = 0; i < (*With)(unsafe.Pointer(pWith)).FnCte; i++ {
var p uintptr = (*Cte)(unsafe.Pointer((pWith + 16 /* &.a */) + uintptr(i)*48)).FpSelect
// var sNC NameContext at bp, 56
libc.Xmemset(tls, bp /* &sNC */, 0, uint64(unsafe.Sizeof(NameContext{})))
- (*NameContext)(unsafe.Pointer(bp /* &sNC */)).FpParse = (*Walker)(unsafe.Pointer(pWalker)).FpParse
- Xsqlite3SelectPrep(tls, (*NameContext)(unsafe.Pointer(bp /* &sNC */)).FpParse, p, bp /* &sNC */)
+ (*NameContext)(unsafe.Pointer(bp /* &sNC */)).FpParse = pParse
+ if pCopy != 0 {
+ Xsqlite3SelectPrep(tls, (*NameContext)(unsafe.Pointer(bp /* &sNC */)).FpParse, p, bp /* &sNC */)
+ }
Xsqlite3WalkSelect(tls, pWalker, p)
- Xsqlite3RenameExprlistUnmap(tls, (*Walker)(unsafe.Pointer(pWalker)).FpParse, (*Cte)(unsafe.Pointer((pWith+16 /* &.a */)+uintptr(i)*48)).FpCols)
+ Xsqlite3RenameExprlistUnmap(tls, pParse, (*Cte)(unsafe.Pointer((pWith+16 /* &.a */)+uintptr(i)*48)).FpCols)
+ }
+ if (pCopy != 0) && ((*Parse)(unsafe.Pointer(pParse)).FpWith == pCopy) {
+ (*Parse)(unsafe.Pointer(pParse)).FpWith = (*With)(unsafe.Pointer(pCopy)).FpOuter
}
}
}
// Unmap all tokens in the IdList object passed as the second argument.
-func unmapColumnIdlistNames(tls *libc.TLS, pParse uintptr, pIdList uintptr) { /* sqlite3.c:107560:13: */
+func unmapColumnIdlistNames(tls *libc.TLS, pParse uintptr, pIdList uintptr) { /* sqlite3.c:108236:13: */
if pIdList != 0 {
var ii int32
for ii = 0; ii < (*IdList)(unsafe.Pointer(pIdList)).FnId; ii++ {
@@ -86510,19 +88672,20 @@ func unmapColumnIdlistNames(tls *libc.TLS, pParse uintptr, pIdList uintptr) { /*
}
// Walker callback used by sqlite3RenameExprUnmap().
-func renameUnmapSelectCb(tls *libc.TLS, pWalker uintptr, p uintptr) int32 { /* sqlite3.c:107575:12: */
+func renameUnmapSelectCb(tls *libc.TLS, pWalker uintptr, p uintptr) int32 { /* sqlite3.c:108251:12: */
var pParse uintptr = (*Walker)(unsafe.Pointer(pWalker)).FpParse
var i int32
if (*Parse)(unsafe.Pointer(pParse)).FnErr != 0 {
return WRC_Abort
}
- if ((*Select)(unsafe.Pointer(p)).FselFlags & U32(SF_View)) != 0 {
+ if ((*Select)(unsafe.Pointer(p)).FselFlags & (U32(SF_View | SF_CopyCte))) != 0 {
+
return WRC_Prune
}
if (*Select)(unsafe.Pointer(p)).FpEList != 0 {
var pList uintptr = (*Select)(unsafe.Pointer(p)).FpEList
for i = 0; i < (*ExprList)(unsafe.Pointer(pList)).FnExpr; i++ {
- if ((*ExprList_item)(unsafe.Pointer((pList+8 /* &.a */)+uintptr(i)*32)).FzEName != 0) && ((int32(*(*uint8)(unsafe.Pointer(((pList + 8 /* &.a */) + uintptr(i)*32) + 20 /* &.eEName */)) >> 6 & 0x3)) == ENAME_NAME) {
+ if ((*ExprList_item)(unsafe.Pointer((pList+8 /* &.a */)+uintptr(i)*32)).FzEName != 0) && ((int32(*(*uint8)(unsafe.Pointer(((pList + 8 /* &.a */) + uintptr(i)*32) + 20 /* &.eEName */)) & 0xc0 >> 6)) == ENAME_NAME) {
Xsqlite3RenameTokenRemap(tls, pParse, uintptr(0), (*ExprList_item)(unsafe.Pointer((pList+8 /* &.a */)+uintptr(i)*32)).FzEName)
}
}
@@ -86543,7 +88706,7 @@ func renameUnmapSelectCb(tls *libc.TLS, pWalker uintptr, p uintptr) int32 { /* s
}
// Remove all nodes that are part of expression pExpr from the rename list.
-func Xsqlite3RenameExprUnmap(tls *libc.TLS, pParse uintptr, pExpr uintptr) { /* sqlite3.c:107604:21: */
+func Xsqlite3RenameExprUnmap(tls *libc.TLS, pParse uintptr, pExpr uintptr) { /* sqlite3.c:108284:21: */
bp := tls.Alloc(48)
defer tls.Free(48)
@@ -86565,7 +88728,7 @@ func Xsqlite3RenameExprUnmap(tls *libc.TLS, pParse uintptr, pExpr uintptr) { /*
// Remove all nodes that are part of expression-list pEList from the
// rename list.
-func Xsqlite3RenameExprlistUnmap(tls *libc.TLS, pParse uintptr, pEList uintptr) { /* sqlite3.c:107620:21: */
+func Xsqlite3RenameExprlistUnmap(tls *libc.TLS, pParse uintptr, pEList uintptr) { /* sqlite3.c:108300:21: */
bp := tls.Alloc(48)
defer tls.Free(48)
@@ -86580,7 +88743,7 @@ func Xsqlite3RenameExprlistUnmap(tls *libc.TLS, pParse uintptr, pEList uintptr)
}{renameUnmapExprCb}))
Xsqlite3WalkExprList(tls, bp /* &sWalker */, pEList)
for i = 0; i < (*ExprList)(unsafe.Pointer(pEList)).FnExpr; i++ {
- if (int32(*(*uint8)(unsafe.Pointer(((pEList + 8 /* &.a */) + uintptr(i)*32) + 20 /* &.eEName */)) >> 6 & 0x3)) == ENAME_NAME {
+ if (int32(*(*uint8)(unsafe.Pointer(((pEList + 8 /* &.a */) + uintptr(i)*32) + 20 /* &.eEName */)) & 0xc0 >> 6)) == ENAME_NAME {
Xsqlite3RenameTokenRemap(tls, pParse, uintptr(0), (*ExprList_item)(unsafe.Pointer((pEList+8 /* &.a */)+uintptr(i)*32)).FzEName)
}
}
@@ -86588,7 +88751,7 @@ func Xsqlite3RenameExprlistUnmap(tls *libc.TLS, pParse uintptr, pEList uintptr)
}
// Free the list of RenameToken objects given in the second argument
-func renameTokenFree(tls *libc.TLS, db uintptr, pToken uintptr) { /* sqlite3.c:107639:13: */
+func renameTokenFree(tls *libc.TLS, db uintptr, pToken uintptr) { /* sqlite3.c:108319:13: */
var pNext uintptr
var p uintptr
for p = pToken; p != 0; p = pNext {
@@ -86604,9 +88767,11 @@ func renameTokenFree(tls *libc.TLS, db uintptr, pToken uintptr) { /* sqlite3.c:1
// If the second argument passed to this function is not NULL and a matching
// RenameToken object is found, remove it from the Parse object and add it to
// the list maintained by the RenameCtx object.
-func renameTokenFind(tls *libc.TLS, pParse uintptr, pCtx uintptr, pPtr uintptr) uintptr { /* sqlite3.c:107657:20: */
+func renameTokenFind(tls *libc.TLS, pParse uintptr, pCtx uintptr, pPtr uintptr) uintptr { /* sqlite3.c:108337:20: */
var pp uintptr
-
+ if pPtr == uintptr(0) {
+ return uintptr(0)
+ }
for pp = (pParse + 400 /* &.pRename */); *(*uintptr)(unsafe.Pointer(pp)) != 0; pp = (*(*uintptr)(unsafe.Pointer(pp)) + 24 /* &.pNext */) {
if (*RenameToken)(unsafe.Pointer((*(*uintptr)(unsafe.Pointer(pp))))).Fp == pPtr {
var pToken uintptr = *(*uintptr)(unsafe.Pointer(pp))
@@ -86625,8 +88790,9 @@ func renameTokenFind(tls *libc.TLS, pParse uintptr, pCtx uintptr, pPtr uintptr)
// This is a Walker select callback. It does nothing. It is only required
// because without a dummy callback, sqlite3WalkExpr() and similar do not
// descend into sub-select statements.
-func renameColumnSelectCb(tls *libc.TLS, pWalker uintptr, p uintptr) int32 { /* sqlite3.c:107684:12: */
- if ((*Select)(unsafe.Pointer(p)).FselFlags & U32(SF_View)) != 0 {
+func renameColumnSelectCb(tls *libc.TLS, pWalker uintptr, p uintptr) int32 { /* sqlite3.c:108366:12: */
+ if ((*Select)(unsafe.Pointer(p)).FselFlags & (U32(SF_View | SF_CopyCte))) != 0 {
+
return WRC_Prune
}
renameWalkWith(tls, pWalker, p)
@@ -86640,7 +88806,7 @@ func renameColumnSelectCb(tls *libc.TLS, pWalker uintptr, p uintptr) int32 { /*
// ALTER TABLE statement. If it is, then attach its associated
// RenameToken object to the list of RenameToken objects being
// constructed in RenameCtx object at pWalker->u.pRename.
-func renameColumnExprCb(tls *libc.TLS, pWalker uintptr, pExpr uintptr) int32 { /* sqlite3.c:107699:12: */
+func renameColumnExprCb(tls *libc.TLS, pWalker uintptr, pExpr uintptr) int32 { /* sqlite3.c:108385:12: */
var p uintptr = *(*uintptr)(unsafe.Pointer(pWalker + 40 /* &.u */))
if ((int32((*Expr)(unsafe.Pointer(pExpr)).Fop) == TK_TRIGGER) &&
(int32((*Expr)(unsafe.Pointer(pExpr)).FiColumn) == (*RenameCtx)(unsafe.Pointer(p)).FiCol)) &&
@@ -86661,7 +88827,7 @@ func renameColumnExprCb(tls *libc.TLS, pWalker uintptr, pExpr uintptr) int32 { /
// the input SQL is parsed from left to right. Repeated calls to this routine
// return all column name tokens in the order that they are encountered
// in the SQL statement.
-func renameColumnTokenNext(tls *libc.TLS, pCtx uintptr) uintptr { /* sqlite3.c:107724:20: */
+func renameColumnTokenNext(tls *libc.TLS, pCtx uintptr) uintptr { /* sqlite3.c:108410:20: */
var pBest uintptr = (*RenameCtx)(unsafe.Pointer(pCtx)).FpList
var pToken uintptr
var pp uintptr
@@ -86683,7 +88849,7 @@ func renameColumnTokenNext(tls *libc.TLS, pCtx uintptr) uintptr { /* sqlite3.c:1
// ALTER TABLE RENAME COLUMN program. The error message emitted by the
// sub-routine is currently stored in pParse->zErrMsg. This function
// adds context to the error message and then stores it in pCtx.
-func renameColumnParseError(tls *libc.TLS, pCtx uintptr, zWhen uintptr, pType uintptr, pObject uintptr, pParse uintptr) { /* sqlite3.c:107745:13: */
+func renameColumnParseError(tls *libc.TLS, pCtx uintptr, zWhen uintptr, pType uintptr, pObject uintptr, pParse uintptr) { /* sqlite3.c:108431:13: */
bp := tls.Alloc(40)
defer tls.Free(40)
@@ -86691,12 +88857,12 @@ func renameColumnParseError(tls *libc.TLS, pCtx uintptr, zWhen uintptr, pType ui
var zN uintptr = Xsqlite3_value_text(tls, pObject)
var zErr uintptr
- zErr = Xsqlite3_mprintf(tls, ts+9199, /* "error in %s %s%s..." */
+ zErr = Xsqlite3_mprintf(tls, ts+9629, /* "error in %s %s%s..." */
libc.VaList(bp, zT, zN, func() uintptr {
- if *(*int8)(unsafe.Pointer(zWhen)) != 0 {
- return ts + 9222 /* " " */
+ if *(*uint8)(unsafe.Pointer(zWhen)) != 0 {
+ return ts + 9652 /* " " */
}
- return ts + 703 /* "" */
+ return ts + 755 /* "" */
}(), zWhen,
(*Parse)(unsafe.Pointer(pParse)).FzErrMsg))
Xsqlite3_result_error(tls, pCtx, zErr, -1)
@@ -86707,12 +88873,12 @@ func renameColumnParseError(tls *libc.TLS, pCtx uintptr, zWhen uintptr, pType ui
// pEList->a[i].zName) that matches the string in zOld, extract the
// corresponding rename-token from Parse object pParse and add it
// to the RenameCtx pCtx.
-func renameColumnElistNames(tls *libc.TLS, pParse uintptr, pCtx uintptr, pEList uintptr, zOld uintptr) { /* sqlite3.c:107770:13: */
+func renameColumnElistNames(tls *libc.TLS, pParse uintptr, pCtx uintptr, pEList uintptr, zOld uintptr) { /* sqlite3.c:108456:13: */
if pEList != 0 {
var i int32
for i = 0; i < (*ExprList)(unsafe.Pointer(pEList)).FnExpr; i++ {
var zName uintptr = (*ExprList_item)(unsafe.Pointer((pEList + 8 /* &.a */) + uintptr(i)*32)).FzEName
- if (((int32(*(*uint8)(unsafe.Pointer(((pEList + 8 /* &.a */) + uintptr(i)*32) + 20 /* &.eEName */)) >> 6 & 0x3)) == ENAME_NAME) &&
+ if (((int32(*(*uint8)(unsafe.Pointer(((pEList + 8 /* &.a */) + uintptr(i)*32) + 20 /* &.eEName */)) & 0xc0 >> 6)) == ENAME_NAME) &&
(zName != uintptr(0))) &&
(0 == Xsqlite3_stricmp(tls, zName, zOld)) {
renameTokenFind(tls, pParse, pCtx, zName)
@@ -86724,7 +88890,7 @@ func renameColumnElistNames(tls *libc.TLS, pParse uintptr, pCtx uintptr, pEList
// For each name in the the id-list pIdList (i.e. each pIdList->a[i].zName)
// that matches the string in zOld, extract the corresponding rename-token
// from Parse object pParse and add it to the RenameCtx pCtx.
-func renameColumnIdlistNames(tls *libc.TLS, pParse uintptr, pCtx uintptr, pIdList uintptr, zOld uintptr) { /* sqlite3.c:107795:13: */
+func renameColumnIdlistNames(tls *libc.TLS, pParse uintptr, pCtx uintptr, pIdList uintptr, zOld uintptr) { /* sqlite3.c:108481:13: */
if pIdList != 0 {
var i int32
for i = 0; i < (*IdList)(unsafe.Pointer(pIdList)).FnId; i++ {
@@ -86738,13 +88904,12 @@ func renameColumnIdlistNames(tls *libc.TLS, pParse uintptr, pCtx uintptr, pIdLis
// Parse the SQL statement zSql using Parse object (*p). The Parse object
// is initialized by this function before it is used.
-func renameParseSql(tls *libc.TLS, p uintptr, zDb uintptr, db uintptr, zSql uintptr, bTemp int32, zDropColumn uintptr) int32 { /* sqlite3.c:107817:12: */
- bp := tls.Alloc(16)
- defer tls.Free(16)
- *(*uintptr)(unsafe.Pointer(bp)) = zDropColumn
+func renameParseSql(tls *libc.TLS, p uintptr, zDb uintptr, db uintptr, zSql uintptr, bTemp int32) int32 { /* sqlite3.c:108503:12: */
+ bp := tls.Alloc(8)
+ defer tls.Free(8)
var rc int32
- *(*uintptr)(unsafe.Pointer(bp + 8 /* zErr */)) = uintptr(0)
+ *(*uintptr)(unsafe.Pointer(bp /* zErr */)) = uintptr(0)
(*Sqlite3)(unsafe.Pointer(db)).Finit.FiDb = func() uint8 {
if bTemp != 0 {
@@ -86752,10 +88917,6 @@ func renameParseSql(tls *libc.TLS, p uintptr, zDb uintptr, db uintptr, zSql uint
}
return uint8(Xsqlite3FindDbName(tls, db, zDb))
}()
- if *(*uintptr)(unsafe.Pointer(bp /* zDropColumn */)) != 0 {
- libc.SetBitFieldPtr8Uint32(db+184 /* &.init */ +8 /* &.bDropColumn */, uint32(1), 3, 0x8)
- (*Sqlite3)(unsafe.Pointer(db)).Finit.FazInit = bp /* &zDropColumn */
- }
// Parse the SQL statement passed as the first argument. If no error
// occurs and the parse does not result in a new table, index or
@@ -86765,22 +88926,21 @@ func renameParseSql(tls *libc.TLS, p uintptr, zDb uintptr, db uintptr, zSql uint
(*Parse)(unsafe.Pointer(p)).Fdb = db
(*Parse)(unsafe.Pointer(p)).FnQueryLoop = U32(1)
if zSql != 0 {
- rc = Xsqlite3RunParser(tls, p, zSql, bp+8 /* &zErr */)
+ rc = Xsqlite3RunParser(tls, p, zSql, bp /* &zErr */)
} else {
rc = SQLITE_NOMEM
}
- (*Parse)(unsafe.Pointer(p)).FzErrMsg = *(*uintptr)(unsafe.Pointer(bp + 8 /* zErr */))
+ (*Parse)(unsafe.Pointer(p)).FzErrMsg = *(*uintptr)(unsafe.Pointer(bp /* zErr */))
if (*Sqlite3)(unsafe.Pointer(db)).FmallocFailed != 0 {
rc = SQLITE_NOMEM
}
if (((rc == SQLITE_OK) &&
((*Parse)(unsafe.Pointer(p)).FpNewTable == uintptr(0))) && ((*Parse)(unsafe.Pointer(p)).FpNewIndex == uintptr(0))) && ((*Parse)(unsafe.Pointer(p)).FpNewTrigger == uintptr(0)) {
- rc = Xsqlite3CorruptError(tls, 107849)
+ rc = Xsqlite3CorruptError(tls, 108530)
}
(*Sqlite3)(unsafe.Pointer(db)).Finit.FiDb = U8(0)
- libc.SetBitFieldPtr8Uint32(db+184 /* &.init */ +8 /* &.bDropColumn */, uint32(0), 3, 0x8)
return rc
}
@@ -86791,54 +88951,85 @@ func renameParseSql(tls *libc.TLS, p uintptr, zDb uintptr, db uintptr, zSql uint
//
// Or, if an error occurs (i.e. an OOM condition), an error is left in
// pCtx and an SQLite error code returned.
-func renameEditSql(tls *libc.TLS, pCtx uintptr, pRename uintptr, zSql uintptr, zNew uintptr, bQuote int32) int32 { /* sqlite3.c:107878:12: */
- bp := tls.Alloc(8)
- defer tls.Free(8)
+func renameEditSql(tls *libc.TLS, pCtx uintptr, pRename uintptr, zSql uintptr, zNew uintptr, bQuote int32) int32 { /* sqlite3.c:108558:12: */
+ bp := tls.Alloc(24)
+ defer tls.Free(24)
- var nNew int32 = Xsqlite3Strlen30(tls, zNew)
- var nSql int32 = Xsqlite3Strlen30(tls, zSql)
+ var nNew I64 = I64(Xsqlite3Strlen30(tls, zNew))
+ var nSql I64 = I64(Xsqlite3Strlen30(tls, zSql))
var db uintptr = Xsqlite3_context_db_handle(tls, pCtx)
var rc int32 = SQLITE_OK
- var zQuot uintptr
+ var zQuot uintptr = uintptr(0)
var zOut uintptr
- var nQuot int32
-
- // Set zQuot to point to a buffer containing a quoted copy of the
- // identifier zNew. If the corresponding identifier in the original
- // ALTER TABLE statement was quoted (bQuote==1), then set zNew to
- // point to zQuot so that all substitutions are made using the
- // quoted version of the new column name.
- zQuot = Xsqlite3MPrintf(tls, db, ts+9224 /* "\"%w\"" */, libc.VaList(bp, zNew))
- if zQuot == uintptr(0) {
- return SQLITE_NOMEM
+ var nQuot I64 = int64(0)
+ var zBuf1 uintptr = uintptr(0)
+ var zBuf2 uintptr = uintptr(0)
+
+ if zNew != 0 {
+ // Set zQuot to point to a buffer containing a quoted copy of the
+ // identifier zNew. If the corresponding identifier in the original
+ // ALTER TABLE statement was quoted (bQuote==1), then set zNew to
+ // point to zQuot so that all substitutions are made using the
+ // quoted version of the new column name.
+ zQuot = Xsqlite3MPrintf(tls, db, ts+9654 /* "\"%w\" " */, libc.VaList(bp, zNew))
+ if zQuot == uintptr(0) {
+ return SQLITE_NOMEM
+ } else {
+ nQuot = (I64(Xsqlite3Strlen30(tls, zQuot) - 1))
+ }
+
+ zOut = Xsqlite3DbMallocZero(tls, db, (uint64((nSql + (I64((*RenameCtx)(unsafe.Pointer(pRename)).FnList) * nQuot)) + int64(1))))
} else {
- nQuot = Xsqlite3Strlen30(tls, zQuot)
- }
- if bQuote != 0 {
- zNew = zQuot
- nNew = nQuot
+ zOut = Xsqlite3DbMallocZero(tls, db, (uint64(((nSql * int64(2)) + int64(1)) * int64(3))))
+ if zOut != 0 {
+ zBuf1 = (zOut + uintptr(((nSql * int64(2)) + int64(1))))
+ zBuf2 = (zOut + uintptr(((nSql * int64(4)) + int64(2))))
+ }
}
// At this point pRename->pList contains a list of RenameToken objects
// corresponding to all tokens in the input SQL that must be replaced
- // with the new column name. All that remains is to construct and
- // return the edited SQL string.
-
- zOut = Xsqlite3DbMallocZero(tls, db, (uint64((nSql + ((*RenameCtx)(unsafe.Pointer(pRename)).FnList * nQuot)) + 1)))
+ // 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 {
- var nOut int32 = nSql
+ var nOut int32 = int32(nSql)
libc.Xmemcpy(tls, zOut, zSql, uint64(nSql))
for (*RenameCtx)(unsafe.Pointer(pRename)).FpList != 0 {
var iOff int32 // Offset of token to replace in zOut
- var pBest uintptr = renameColumnTokenNext(tls, pRename)
var nReplace U32
var zReplace uintptr
- if Xsqlite3IsIdChar(tls, uint8(*(*int8)(unsafe.Pointer((*RenameToken)(unsafe.Pointer(pBest)).Ft.Fz)))) != 0 {
- nReplace = U32(nNew)
- zReplace = zNew
+ var pBest uintptr = renameColumnTokenNext(tls, pRename)
+
+ if zNew != 0 {
+ if (bQuote == 0) && (Xsqlite3IsIdChar(tls, uint8(*(*uint8)(unsafe.Pointer((*RenameToken)(unsafe.Pointer(pBest)).Ft.Fz)))) != 0) {
+ nReplace = U32(nNew)
+ zReplace = zNew
+ } else {
+ nReplace = U32(nQuot)
+ zReplace = zQuot
+ if int32(*(*uint8)(unsafe.Pointer((*RenameToken)(unsafe.Pointer(pBest)).Ft.Fz + uintptr((*RenameToken)(unsafe.Pointer(pBest)).Ft.Fn)))) == '"' {
+ nReplace++
+ }
+ }
} else {
- nReplace = U32(nQuot)
- zReplace = zQuot
+ // Dequote the double-quoted token. Then requote it again, this time
+ // using single quotes. If the character immediately following the
+ // original token within the input SQL was a single quote ('), then
+ // add another space after the new, single-quoted version of the
+ // token. This is so that (SELECT "string"'alias') maps to
+ // (SELECT 'string' 'alias'), and not (SELECT 'string''alias').
+ libc.Xmemcpy(tls, zBuf1, (*RenameToken)(unsafe.Pointer(pBest)).Ft.Fz, uint64((*RenameToken)(unsafe.Pointer(pBest)).Ft.Fn))
+ *(*uint8)(unsafe.Pointer(zBuf1 + uintptr((*RenameToken)(unsafe.Pointer(pBest)).Ft.Fn))) = uint8(0)
+ Xsqlite3Dequote(tls, zBuf1)
+ Xsqlite3_snprintf(tls, (int32(nSql * int64(2))), zBuf2, ts+9660 /* "%Q%s" */, libc.VaList(bp+8, zBuf1,
+ func() uintptr {
+ if int32(*(*uint8)(unsafe.Pointer((*RenameToken)(unsafe.Pointer(pBest)).Ft.Fz + uintptr((*RenameToken)(unsafe.Pointer(pBest)).Ft.Fn)))) == '\'' {
+ return ts + 9652 /* " " */
+ }
+ return ts + 755 /* "" */
+ }()))
+ zReplace = zBuf2
+ nReplace = U32(Xsqlite3Strlen30(tls, zReplace))
}
iOff = (int32((int64((*RenameToken)(unsafe.Pointer(pBest)).Ft.Fz) - int64(zSql)) / 1))
@@ -86846,7 +89037,7 @@ func renameEditSql(tls *libc.TLS, pCtx uintptr, pRename uintptr, zSql uintptr, z
libc.Xmemmove(tls, (zOut + uintptr((U32(iOff) + nReplace))), (zOut + uintptr((uint32(iOff) + (*RenameToken)(unsafe.Pointer(pBest)).Ft.Fn))),
(uint64(uint32(nOut) - (uint32(iOff) + (*RenameToken)(unsafe.Pointer(pBest)).Ft.Fn))))
nOut = int32(U32(nOut) + (nReplace - (*RenameToken)(unsafe.Pointer(pBest)).Ft.Fn))
- *(*int8)(unsafe.Pointer(zOut + uintptr(nOut))) = int8(0)
+ *(*uint8)(unsafe.Pointer(zOut + uintptr(nOut))) = uint8(0)
}
libc.Xmemcpy(tls, (zOut + uintptr(iOff)), zReplace, uint64(nReplace))
Xsqlite3DbFree(tls, db, pBest)
@@ -86866,7 +89057,7 @@ func renameEditSql(tls *libc.TLS, pCtx uintptr, pRename uintptr, zSql uintptr, z
// it was read from the schema of database zDb. Return SQLITE_OK if
// successful. Otherwise, return an SQLite error code and leave an error
// message in the Parse object.
-func renameResolveTrigger(tls *libc.TLS, pParse uintptr) int32 { /* sqlite3.c:107960:12: */
+func renameResolveTrigger(tls *libc.TLS, pParse uintptr) int32 { /* sqlite3.c:108665:12: */
bp := tls.Alloc(56)
defer tls.Free(56)
@@ -86961,7 +89152,7 @@ func renameResolveTrigger(tls *libc.TLS, pParse uintptr) int32 { /* sqlite3.c:10
// Invoke sqlite3WalkExpr() or sqlite3WalkSelect() on all Select or Expr
// objects that are part of the trigger passed as the second argument.
-func renameWalkTrigger(tls *libc.TLS, pWalker uintptr, pTrigger uintptr) { /* sqlite3.c:108053:13: */
+func renameWalkTrigger(tls *libc.TLS, pWalker uintptr, pTrigger uintptr) { /* sqlite3.c:108758:13: */
var pStep uintptr
// Find tokens to edit in WHEN clause
@@ -86990,7 +89181,7 @@ func renameWalkTrigger(tls *libc.TLS, pWalker uintptr, pTrigger uintptr) { /* sq
// Free the contents of Parse object (*pParse). Do not free the memory
// occupied by the Parse object itself.
-func renameParseCleanup(tls *libc.TLS, pParse uintptr) { /* sqlite3.c:108084:13: */
+func renameParseCleanup(tls *libc.TLS, pParse uintptr) { /* sqlite3.c:108789:13: */
var db uintptr = (*Parse)(unsafe.Pointer(pParse)).Fdb
var pIdx uintptr
if (*Parse)(unsafe.Pointer(pParse)).FpVdbe != 0 {
@@ -87028,7 +89219,7 @@ func renameParseCleanup(tls *libc.TLS, pParse uintptr) { /* sqlite3.c:108084:13:
// This function is used internally by the ALTER TABLE RENAME COLUMN command.
// It is only accessible to SQL created using sqlite3NestedParse(). It is
// not reachable from ordinary SQL passed into sqlite3_prepare().
-func renameColumnFunc(tls *libc.TLS, context uintptr, NotUsed int32, argv uintptr) { /* sqlite3.c:108124:13: */
+func renameColumnFunc(tls *libc.TLS, context uintptr, NotUsed int32, argv uintptr) { /* sqlite3.c:108829:13: */
bp := tls.Alloc(488)
defer tls.Free(488)
@@ -87114,7 +89305,7 @@ __5:
}()
(*Sqlite3)(unsafe.Pointer(db)).FxAuth = uintptr(0)
- rc = renameParseSql(tls, bp+32 /* &sParse */, zDb, db, zSql, bTemp, uintptr(0))
+ rc = renameParseSql(tls, bp+32 /* &sParse */, zDb, db, zSql, bTemp)
// Find tokens that need to be replaced.
libc.Xmemset(tls, bp+440 /* &sWalker */, 0, uint64(unsafe.Sizeof(Walker{})))
@@ -87171,157 +89362,162 @@ __9:
if !(bFKOnly == 0) {
goto __13
}
+ if !(iCol < int32((*Table)(unsafe.Pointer((*Parse)(unsafe.Pointer(bp+32 /* &sParse */)).FpNewTable)).FnCol)) {
+ goto __14
+ }
renameTokenFind(tls,
bp+32 /* &sParse */, bp /* &sCtx */, (*Column)(unsafe.Pointer((*Table)(unsafe.Pointer((*Parse)(unsafe.Pointer(bp+32 /* &sParse */)).FpNewTable)).FaCol+uintptr(iCol)*32)).FzName)
+__14:
+ ;
if !((*RenameCtx)(unsafe.Pointer(bp /* &sCtx */)).FiCol < 0) {
- goto __14
+ goto __15
}
renameTokenFind(tls, bp+32 /* &sParse */, bp /* &sCtx */, ((*Parse)(unsafe.Pointer(bp+32 /* &sParse */)).FpNewTable + 68 /* &.iPKey */))
-__14:
+__15:
;
Xsqlite3WalkExprList(tls, bp+440 /* &sWalker */, (*Table)(unsafe.Pointer((*Parse)(unsafe.Pointer(bp+32 /* &sParse */)).FpNewTable)).FpCheck)
pIdx = (*Table)(unsafe.Pointer((*Parse)(unsafe.Pointer(bp + 32 /* &sParse */)).FpNewTable)).FpIndex
-__15:
+__16:
if !(pIdx != 0) {
- goto __17
+ goto __18
}
Xsqlite3WalkExprList(tls, bp+440 /* &sWalker */, (*Index)(unsafe.Pointer(pIdx)).FaColExpr)
- goto __16
-__16:
- pIdx = (*Index)(unsafe.Pointer(pIdx)).FpNext
- goto __15
goto __17
__17:
+ pIdx = (*Index)(unsafe.Pointer(pIdx)).FpNext
+ goto __16
+ goto __18
+__18:
;
pIdx = (*Parse)(unsafe.Pointer(bp + 32 /* &sParse */)).FpNewIndex
-__18:
+__19:
if !(pIdx != 0) {
- goto __20
+ goto __21
}
Xsqlite3WalkExprList(tls, bp+440 /* &sWalker */, (*Index)(unsafe.Pointer(pIdx)).FaColExpr)
- goto __19
-__19:
- pIdx = (*Index)(unsafe.Pointer(pIdx)).FpNext
- goto __18
goto __20
__20:
+ pIdx = (*Index)(unsafe.Pointer(pIdx)).FpNext
+ goto __19
+ goto __21
+__21:
;
i = 0
-__21:
+__22:
if !(i < int32((*Table)(unsafe.Pointer((*Parse)(unsafe.Pointer(bp+32 /* &sParse */)).FpNewTable)).FnCol)) {
- goto __23
+ goto __24
}
Xsqlite3WalkExpr(tls, bp+440 /* &sWalker */, (*Column)(unsafe.Pointer((*Table)(unsafe.Pointer((*Parse)(unsafe.Pointer(bp+32 /* &sParse */)).FpNewTable)).FaCol+uintptr(i)*32)).FpDflt)
- goto __22
-__22:
- i++
- goto __21
goto __23
__23:
+ i++
+ goto __22
+ goto __24
+__24:
;
__13:
;
pFKey = (*Table)(unsafe.Pointer((*Parse)(unsafe.Pointer(bp + 32 /* &sParse */)).FpNewTable)).FpFKey
-__24:
+__25:
if !(pFKey != 0) {
- goto __26
+ goto __27
}
i = 0
-__27:
+__28:
if !(i < (*FKey)(unsafe.Pointer(pFKey)).FnCol) {
- goto __29
+ goto __30
}
if !((bFKOnly == 0) && ((*sColMap)(unsafe.Pointer((pFKey+64 /* &.aCol */)+uintptr(i)*16)).FiFrom == iCol)) {
- goto __30
+ goto __31
}
renameTokenFind(tls, bp+32 /* &sParse */, bp /* &sCtx */, ((pFKey + 64 /* &.aCol */) + uintptr(i)*16))
-__30:
+__31:
;
if !((0 == Xsqlite3_stricmp(tls, (*FKey)(unsafe.Pointer(pFKey)).FzTo, zTable)) &&
(0 == Xsqlite3_stricmp(tls, (*sColMap)(unsafe.Pointer((pFKey+64 /* &.aCol */)+uintptr(i)*16)).FzCol, zOld))) {
- goto __31
+ goto __32
}
renameTokenFind(tls, bp+32 /* &sParse */, bp /* &sCtx */, (*sColMap)(unsafe.Pointer((pFKey+64 /* &.aCol */)+uintptr(i)*16)).FzCol)
-__31:
+__32:
;
- goto __28
-__28:
- i++
- goto __27
goto __29
__29:
+ i++
+ goto __28
+ goto __30
+__30:
;
- goto __25
-__25:
- pFKey = (*FKey)(unsafe.Pointer(pFKey)).FpNextFrom
- goto __24
goto __26
__26:
+ pFKey = (*FKey)(unsafe.Pointer(pFKey)).FpNextFrom
+ goto __25
+ goto __27
+__27:
;
__10:
;
goto __8
__7:
if !((*Parse)(unsafe.Pointer(bp+32 /* &sParse */)).FpNewIndex != 0) {
- goto __32
+ goto __33
}
Xsqlite3WalkExprList(tls, bp+440 /* &sWalker */, (*Index)(unsafe.Pointer((*Parse)(unsafe.Pointer(bp+32 /* &sParse */)).FpNewIndex)).FaColExpr)
Xsqlite3WalkExpr(tls, bp+440 /* &sWalker */, (*Index)(unsafe.Pointer((*Parse)(unsafe.Pointer(bp+32 /* &sParse */)).FpNewIndex)).FpPartIdxWhere)
- goto __33
-__32:
+ goto __34
+__33:
rc = renameResolveTrigger(tls, bp+32 /* &sParse */)
if !(rc != SQLITE_OK) {
- goto __34
+ goto __35
}
goto renameColumnFunc_done
-__34:
+__35:
;
pStep = (*Trigger)(unsafe.Pointer((*Parse)(unsafe.Pointer(bp + 32 /* &sParse */)).FpNewTrigger)).Fstep_list
-__35:
+__36:
if !(pStep != 0) {
- goto __37
+ goto __38
}
if !((*TriggerStep)(unsafe.Pointer(pStep)).FzTarget != 0) {
- goto __38
+ goto __39
}
pTarget = Xsqlite3LocateTable(tls, bp+32 /* &sParse */, uint32(0), (*TriggerStep)(unsafe.Pointer(pStep)).FzTarget, zDb)
if !(pTarget == pTab) {
- goto __39
+ goto __40
}
if !((*TriggerStep)(unsafe.Pointer(pStep)).FpUpsert != 0) {
- goto __40
+ goto __41
}
pUpsertSet = (*Upsert)(unsafe.Pointer((*TriggerStep)(unsafe.Pointer(pStep)).FpUpsert)).FpUpsertSet
renameColumnElistNames(tls, bp+32 /* &sParse */, bp /* &sCtx */, pUpsertSet, zOld)
-__40:
+__41:
;
renameColumnIdlistNames(tls, bp+32 /* &sParse */, bp /* &sCtx */, (*TriggerStep)(unsafe.Pointer(pStep)).FpIdList, zOld)
renameColumnElistNames(tls, bp+32 /* &sParse */, bp /* &sCtx */, (*TriggerStep)(unsafe.Pointer(pStep)).FpExprList, zOld)
-__39:
+__40:
;
-__38:
+__39:
;
- goto __36
-__36:
- pStep = (*TriggerStep)(unsafe.Pointer(pStep)).FpNext
- goto __35
goto __37
__37:
+ pStep = (*TriggerStep)(unsafe.Pointer(pStep)).FpNext
+ goto __36
+ goto __38
+__38:
;
// Find tokens to edit in UPDATE OF clause
if !((*Parse)(unsafe.Pointer(bp+32 /* &sParse */)).FpTriggerTab == pTab) {
- goto __41
+ goto __42
}
renameColumnIdlistNames(tls, bp+32 /* &sParse */, bp /* &sCtx */, (*Trigger)(unsafe.Pointer((*Parse)(unsafe.Pointer(bp+32 /* &sParse */)).FpNewTrigger)).FpColumns, zOld)
-__41:
+__42:
;
// Find tokens to edit in various expressions and selects
renameWalkTrigger(tls, bp+440 /* &sWalker */, (*Parse)(unsafe.Pointer(bp+32 /* &sParse */)).FpNewTrigger)
-__33:
+__34:
;
__8:
;
@@ -87330,18 +89526,18 @@ __8:
renameColumnFunc_done:
if !(rc != SQLITE_OK) {
- goto __42
+ goto __43
}
if !((*Parse)(unsafe.Pointer(bp+32 /* &sParse */)).FzErrMsg != 0) {
- goto __43
+ goto __44
}
- renameColumnParseError(tls, context, ts+703 /* "" */, *(*uintptr)(unsafe.Pointer(argv + 1*8)), *(*uintptr)(unsafe.Pointer(argv + 2*8)), bp+32 /* &sParse */)
- goto __44
-__43:
- Xsqlite3_result_error_code(tls, context, rc)
+ renameColumnParseError(tls, context, ts+755 /* "" */, *(*uintptr)(unsafe.Pointer(argv + 1*8)), *(*uintptr)(unsafe.Pointer(argv + 2*8)), bp+32 /* &sParse */)
+ goto __45
__44:
+ Xsqlite3_result_error_code(tls, context, rc)
+__45:
;
-__42:
+__43:
;
renameParseCleanup(tls, bp+32 /* &sParse */)
@@ -87351,7 +89547,7 @@ __42:
}
// Walker expression callback used by "RENAME TABLE".
-func renameTableExprCb(tls *libc.TLS, pWalker uintptr, pExpr uintptr) int32 { /* sqlite3.c:108285:12: */
+func renameTableExprCb(tls *libc.TLS, pWalker uintptr, pExpr uintptr) int32 { /* sqlite3.c:108992:12: */
var p uintptr = *(*uintptr)(unsafe.Pointer(pWalker + 40 /* &.u */))
if (int32((*Expr)(unsafe.Pointer(pExpr)).Fop) == TK_COLUMN) && ((*RenameCtx)(unsafe.Pointer(p)).FpTab == *(*uintptr)(unsafe.Pointer(pExpr + 64 /* &.y */))) {
renameTokenFind(tls, (*Walker)(unsafe.Pointer(pWalker)).FpParse, p, (pExpr + 64 /* &.y */ /* &.pTab */))
@@ -87360,11 +89556,12 @@ func renameTableExprCb(tls *libc.TLS, pWalker uintptr, pExpr uintptr) int32 { /*
}
// Walker select callback used by "RENAME TABLE".
-func renameTableSelectCb(tls *libc.TLS, pWalker uintptr, pSelect uintptr) int32 { /* sqlite3.c:108296:12: */
+func renameTableSelectCb(tls *libc.TLS, pWalker uintptr, pSelect uintptr) int32 { /* sqlite3.c:109003:12: */
var i int32
var p uintptr = *(*uintptr)(unsafe.Pointer(pWalker + 40 /* &.u */))
var pSrc uintptr = (*Select)(unsafe.Pointer(pSelect)).FpSrc
- if ((*Select)(unsafe.Pointer(pSelect)).FselFlags & U32(SF_View)) != 0 {
+ if ((*Select)(unsafe.Pointer(pSelect)).FselFlags & (U32(SF_View | SF_CopyCte))) != 0 {
+
return WRC_Prune
}
if pSrc == uintptr(0) {
@@ -87399,7 +89596,7 @@ func renameTableSelectCb(tls *libc.TLS, pWalker uintptr, pSelect uintptr) int32
//
// sqlite_rename_table('main', 'CREATE TABLE t1(a REFERENCES t2)','t2','t3',0)
// -> 'CREATE TABLE t1(a REFERENCES t3)'
-func renameTableFunc(tls *libc.TLS, context uintptr, NotUsed int32, argv uintptr) { /* sqlite3.c:108336:13: */
+func renameTableFunc(tls *libc.TLS, context uintptr, NotUsed int32, argv uintptr) { /* sqlite3.c:109047:13: */
bp := tls.Alloc(544)
defer tls.Free(544)
@@ -87437,7 +89634,7 @@ func renameTableFunc(tls *libc.TLS, context uintptr, NotUsed int32, argv uintptr
}{renameTableSelectCb}))
*(*uintptr)(unsafe.Pointer(bp + 32 /* &sWalker */ + 40 /* &.u */)) = bp /* &sCtx */
- rc = renameParseSql(tls, bp+80 /* &sParse */, zDb, db, zInput, bTemp, uintptr(0))
+ rc = renameParseSql(tls, bp+80 /* &sParse */, zDb, db, zInput, bTemp)
if rc == SQLITE_OK {
var isLegacy int32 = (int32((*Sqlite3)(unsafe.Pointer(db)).Fflags & uint64(SQLITE_LegacyAlter)))
@@ -87514,7 +89711,7 @@ func renameTableFunc(tls *libc.TLS, context uintptr, NotUsed int32, argv uintptr
}
if rc != SQLITE_OK {
if (*Parse)(unsafe.Pointer(bp+80 /* &sParse */)).FzErrMsg != 0 {
- renameColumnParseError(tls, context, ts+703 /* "" */, *(*uintptr)(unsafe.Pointer(argv + 1*8)), *(*uintptr)(unsafe.Pointer(argv + 2*8)), bp+80 /* &sParse */)
+ renameColumnParseError(tls, context, ts+755 /* "" */, *(*uintptr)(unsafe.Pointer(argv + 1*8)), *(*uintptr)(unsafe.Pointer(argv + 2*8)), bp+80 /* &sParse */)
} else {
Xsqlite3_result_error_code(tls, context, rc)
}
@@ -87529,6 +89726,119 @@ func renameTableFunc(tls *libc.TLS, context uintptr, NotUsed int32, argv uintptr
return
}
+func renameQuotefixExprCb(tls *libc.TLS, pWalker uintptr, pExpr uintptr) int32 { /* sqlite3.c:109185:12: */
+ if (int32((*Expr)(unsafe.Pointer(pExpr)).Fop) == TK_STRING) && (((*Expr)(unsafe.Pointer(pExpr)).Fflags & U32(EP_DblQuoted)) != 0) {
+ renameTokenFind(tls, (*Walker)(unsafe.Pointer(pWalker)).FpParse, *(*uintptr)(unsafe.Pointer(pWalker + 40 /* &.u */)), pExpr)
+ }
+ return WRC_Continue
+}
+
+// The implementation of an SQL scalar function that rewrites DDL statements
+// so that any string literals that use double-quotes are modified so that
+// they use single quotes.
+//
+// Two arguments must be passed:
+//
+// 0: Database name ("main", "temp" etc.).
+// 1: SQL statement to edit.
+//
+// The returned value is the modified SQL statement. For example, given
+// the database schema:
+//
+// CREATE TABLE t1(a, b, c);
+//
+// SELECT sqlite_rename_quotefix('main',
+// 'CREATE VIEW v1 AS SELECT "a", "string" FROM t1'
+// );
+//
+// returns the string:
+//
+// CREATE VIEW v1 AS SELECT "a", 'string' FROM t1
+func renameQuotefixFunc(tls *libc.TLS, context uintptr, NotUsed int32, argv uintptr) { /* sqlite3.c:109215:13: */
+ bp := tls.Alloc(488)
+ defer tls.Free(488)
+
+ var db uintptr = Xsqlite3_context_db_handle(tls, context)
+ var zDb uintptr = Xsqlite3_value_text(tls, *(*uintptr)(unsafe.Pointer(argv)))
+ var zInput uintptr = Xsqlite3_value_text(tls, *(*uintptr)(unsafe.Pointer(argv + 1*8)))
+
+ var xAuth Sqlite3_xauth = (*Sqlite3)(unsafe.Pointer(db)).FxAuth
+ (*Sqlite3)(unsafe.Pointer(db)).FxAuth = uintptr(0)
+
+ Xsqlite3BtreeEnterAll(tls, db)
+
+ _ = NotUsed
+ if (zDb != 0) && (zInput != 0) {
+ var rc int32
+ // var sParse Parse at bp, 408
+
+ rc = renameParseSql(tls, bp /* &sParse */, zDb, db, zInput, 0)
+
+ if rc == SQLITE_OK {
+ // var sCtx RenameCtx at bp+408, 32
+
+ // var sWalker Walker at bp+440, 48
+
+ // Walker to find tokens that need to be replaced.
+ libc.Xmemset(tls, bp+408 /* &sCtx */, 0, uint64(unsafe.Sizeof(RenameCtx{})))
+ libc.Xmemset(tls, bp+440 /* &sWalker */, 0, uint64(unsafe.Sizeof(Walker{})))
+ (*Walker)(unsafe.Pointer(bp + 440 /* &sWalker */)).FpParse = bp /* &sParse */
+ (*Walker)(unsafe.Pointer(bp + 440 /* &sWalker */)).FxExprCallback = *(*uintptr)(unsafe.Pointer(&struct {
+ f func(*libc.TLS, uintptr, uintptr) int32
+ }{renameQuotefixExprCb}))
+ (*Walker)(unsafe.Pointer(bp + 440 /* &sWalker */)).FxSelectCallback = *(*uintptr)(unsafe.Pointer(&struct {
+ f func(*libc.TLS, uintptr, uintptr) int32
+ }{renameColumnSelectCb}))
+ *(*uintptr)(unsafe.Pointer(bp + 440 /* &sWalker */ + 40 /* &.u */)) = bp + 408 /* &sCtx */
+
+ if (*Parse)(unsafe.Pointer(bp /* &sParse */)).FpNewTable != 0 {
+ var pSelect uintptr = (*Table)(unsafe.Pointer((*Parse)(unsafe.Pointer(bp /* &sParse */)).FpNewTable)).FpSelect
+ if pSelect != 0 {
+ *(*U32)(unsafe.Pointer(pSelect + 4 /* &.selFlags */)) &= (libc.Uint32FromInt32(libc.CplInt32(SF_View)))
+ (*Parse)(unsafe.Pointer(bp /* &sParse */)).Frc = SQLITE_OK
+ Xsqlite3SelectPrep(tls, bp /* &sParse */, pSelect, uintptr(0))
+ rc = func() int32 {
+ if (*Sqlite3)(unsafe.Pointer(db)).FmallocFailed != 0 {
+ return SQLITE_NOMEM
+ }
+ return (*Parse)(unsafe.Pointer(bp /* &sParse */)).Frc
+ }()
+ if rc == SQLITE_OK {
+ Xsqlite3WalkSelect(tls, bp+440 /* &sWalker */, pSelect)
+ }
+ } else {
+ var i int32
+ Xsqlite3WalkExprList(tls, bp+440 /* &sWalker */, (*Table)(unsafe.Pointer((*Parse)(unsafe.Pointer(bp /* &sParse */)).FpNewTable)).FpCheck)
+ for i = 0; i < int32((*Table)(unsafe.Pointer((*Parse)(unsafe.Pointer(bp /* &sParse */)).FpNewTable)).FnCol); i++ {
+ Xsqlite3WalkExpr(tls, bp+440 /* &sWalker */, (*Column)(unsafe.Pointer((*Table)(unsafe.Pointer((*Parse)(unsafe.Pointer(bp /* &sParse */)).FpNewTable)).FaCol+uintptr(i)*32)).FpDflt)
+ }
+ }
+ } else if (*Parse)(unsafe.Pointer(bp /* &sParse */)).FpNewIndex != 0 {
+ Xsqlite3WalkExprList(tls, bp+440 /* &sWalker */, (*Index)(unsafe.Pointer((*Parse)(unsafe.Pointer(bp /* &sParse */)).FpNewIndex)).FaColExpr)
+ Xsqlite3WalkExpr(tls, bp+440 /* &sWalker */, (*Index)(unsafe.Pointer((*Parse)(unsafe.Pointer(bp /* &sParse */)).FpNewIndex)).FpPartIdxWhere)
+ } else {
+ rc = renameResolveTrigger(tls, bp /* &sParse */)
+ if rc == SQLITE_OK {
+ renameWalkTrigger(tls, bp+440 /* &sWalker */, (*Parse)(unsafe.Pointer(bp /* &sParse */)).FpNewTrigger)
+ }
+ }
+
+ if rc == SQLITE_OK {
+ rc = renameEditSql(tls, context, bp+408 /* &sCtx */, zInput, uintptr(0), 0)
+ }
+ renameTokenFree(tls, db, (*RenameCtx)(unsafe.Pointer(bp+408 /* &sCtx */)).FpList)
+ }
+ if rc != SQLITE_OK {
+ Xsqlite3_result_error_code(tls, context, rc)
+ }
+ renameParseCleanup(tls, bp /* &sParse */)
+ }
+
+ (*Sqlite3)(unsafe.Pointer(db)).FxAuth = xAuth
+
+ Xsqlite3BtreeLeaveAll(tls, db)
+}
+
// An SQL user function that checks that there are no parse or symbol
// resolution problems in a CREATE TRIGGER|TABLE|VIEW|INDEX statement.
// After an ALTER TABLE .. RENAME operation is performed and the schema
@@ -87541,14 +89851,14 @@ func renameTableFunc(tls *libc.TLS, context uintptr, NotUsed int32, argv uintptr
// 3: Object name.
// 4: True if object is from temp schema.
// 5: "when" part of error message.
-// 6: Name of column being dropped, or NULL.
+// 6: True to disable the DQS quirk when parsing SQL.
//
// Unless it finds an error, this function normally returns NULL. However, it
// returns integer value 1 if:
//
// * the SQL argument creates a trigger, and
// * the table that the trigger is attached to is in database zDb.
-func renameTableTest(tls *libc.TLS, context uintptr, NotUsed int32, argv uintptr) { /* sqlite3.c:108495:13: */
+func renameTableTest(tls *libc.TLS, context uintptr, NotUsed int32, argv uintptr) { /* sqlite3.c:109319:13: */
bp := tls.Alloc(464)
defer tls.Free(464)
@@ -87558,17 +89868,23 @@ func renameTableTest(tls *libc.TLS, context uintptr, NotUsed int32, argv uintptr
var bTemp int32 = Xsqlite3_value_int(tls, *(*uintptr)(unsafe.Pointer(argv + 4*8)))
var isLegacy int32 = (int32((*Sqlite3)(unsafe.Pointer(db)).Fflags & uint64(SQLITE_LegacyAlter)))
var zWhen uintptr = Xsqlite3_value_text(tls, *(*uintptr)(unsafe.Pointer(argv + 5*8)))
- var zDropColumn uintptr = Xsqlite3_value_text(tls, *(*uintptr)(unsafe.Pointer(argv + 6*8)))
+ var bNoDQS int32 = Xsqlite3_value_int(tls, *(*uintptr)(unsafe.Pointer(argv + 6*8)))
var xAuth Sqlite3_xauth = (*Sqlite3)(unsafe.Pointer(db)).FxAuth
(*Sqlite3)(unsafe.Pointer(db)).FxAuth = uintptr(0)
_ = NotUsed
+
if (zDb != 0) && (zInput != 0) {
var rc int32
// var sParse Parse at bp, 408
- rc = renameParseSql(tls, bp /* &sParse */, zDb, db, zInput, bTemp, zDropColumn)
+ var flags int32 = int32((*Sqlite3)(unsafe.Pointer(db)).Fflags)
+ if bNoDQS != 0 {
+ *(*U64)(unsafe.Pointer(db + 48 /* &.flags */)) &= (libc.Uint64FromInt32(libc.CplInt32((SQLITE_DqsDML | SQLITE_DqsDDL))))
+ }
+ rc = renameParseSql(tls, bp /* &sParse */, zDb, db, zInput, bTemp)
+ *(*U64)(unsafe.Pointer(db + 48 /* &.flags */)) |= (U64(flags & (SQLITE_DqsDML | SQLITE_DqsDDL)))
if rc == SQLITE_OK {
if ((isLegacy == 0) && ((*Parse)(unsafe.Pointer(bp /* &sParse */)).FpNewTable != 0)) && ((*Table)(unsafe.Pointer((*Parse)(unsafe.Pointer(bp /* &sParse */)).FpNewTable)).FpSelect != 0) {
// var sNC NameContext at bp+408, 56
@@ -87612,7 +89928,7 @@ func renameTableTest(tls *libc.TLS, context uintptr, NotUsed int32, argv uintptr
//
// The value returned is a string containing the CREATE TABLE statement
// with column argv[2] removed.
-func dropColumnFunc(tls *libc.TLS, context uintptr, NotUsed int32, argv uintptr) { /* sqlite3.c:108562:13: */
+func dropColumnFunc(tls *libc.TLS, context uintptr, NotUsed int32, argv uintptr) { /* sqlite3.c:109390:13: */
bp := tls.Alloc(432)
defer tls.Free(432)
@@ -87640,7 +89956,7 @@ func dropColumnFunc(tls *libc.TLS, context uintptr, NotUsed int32, argv uintptr)
(*Sqlite3)(unsafe.Pointer(db)).FxAuth = uintptr(0)
_ = NotUsed
- rc = renameParseSql(tls, bp+24 /* &sParse */, zDb, db, zSql, (libc.Bool32(iSchema == 1)), uintptr(0))
+ rc = renameParseSql(tls, bp+24 /* &sParse */, zDb, db, zSql, (libc.Bool32(iSchema == 1)))
if !(rc != SQLITE_OK) {
goto __1
}
@@ -87652,7 +89968,7 @@ __1:
goto __2
}
// This can happen if the sqlite_schema table is corrupt
- rc = Xsqlite3CorruptError(tls, 108590)
+ rc = Xsqlite3CorruptError(tls, 109418)
goto drop_column_done
__2:
;
@@ -87667,7 +89983,7 @@ __2:
__3:
zEnd = (zSql + uintptr((*Table)(unsafe.Pointer(pTab)).FaddColOffset))
__5:
- if !((int32(*(*int8)(unsafe.Pointer((*RenameToken)(unsafe.Pointer(pCol)).Ft.Fz))) != 0) && (int32(*(*int8)(unsafe.Pointer((*RenameToken)(unsafe.Pointer(pCol)).Ft.Fz))) != ',')) {
+ if !((int32(*(*uint8)(unsafe.Pointer((*RenameToken)(unsafe.Pointer(pCol)).Ft.Fz))) != 0) && (int32(*(*uint8)(unsafe.Pointer((*RenameToken)(unsafe.Pointer(pCol)).Ft.Fz))) != ',')) {
goto __6
}
(*RenameToken)(unsafe.Pointer(pCol)).Ft.Fz--
@@ -87677,7 +89993,7 @@ __6:
__4:
;
- zNew = Xsqlite3MPrintf(tls, db, ts+9229 /* "%.*s%s" */, libc.VaList(bp, ((int64((*RenameToken)(unsafe.Pointer(pCol)).Ft.Fz)-int64(zSql))/1), zSql, zEnd))
+ zNew = Xsqlite3MPrintf(tls, db, ts+9665 /* "%.*s%s" */, libc.VaList(bp, ((int64((*RenameToken)(unsafe.Pointer(pCol)).Ft.Fz)-int64(zSql))/1), zSql, zEnd))
Xsqlite3_result_text(tls, context, zNew, -1, libc.UintptrFromInt32(-1))
Xsqlite3_free(tls, zNew)
@@ -87697,7 +90013,7 @@ __7:
//
// statement. Argument pSrc contains the possibly qualified name of the
// table being edited, and token pName the name of the column to drop.
-func Xsqlite3AlterDropColumn(tls *libc.TLS, pParse uintptr, pSrc uintptr, pName uintptr) { /* sqlite3.c:108626:21: */
+func Xsqlite3AlterDropColumn(tls *libc.TLS, pParse uintptr, pSrc uintptr, pName uintptr) { /* sqlite3.c:109454:21: */
bp := tls.Alloc(64)
defer tls.Free(64)
@@ -87765,7 +90081,7 @@ __5:
if !(iCol < 0) {
goto __6
}
- Xsqlite3ErrorMsg(tls, pParse, ts+5252 /* "no such column: ..." */, libc.VaList(bp, zCol))
+ Xsqlite3ErrorMsg(tls, pParse, ts+5383 /* "no such column: ..." */, libc.VaList(bp, zCol))
goto exit_drop_column
__6:
;
@@ -87775,12 +90091,12 @@ __6:
if !((int32((*Column)(unsafe.Pointer((*Table)(unsafe.Pointer(pTab)).FaCol+uintptr(iCol)*32)).FcolFlags) & (COLFLAG_PRIMKEY | COLFLAG_UNIQUE)) != 0) {
goto __7
}
- Xsqlite3ErrorMsg(tls, pParse, ts+9236, /* "cannot drop %s c..." */
+ Xsqlite3ErrorMsg(tls, pParse, ts+9672, /* "cannot drop %s c..." */
libc.VaList(bp+8, func() uintptr {
if (int32((*Column)(unsafe.Pointer((*Table)(unsafe.Pointer(pTab)).FaCol+uintptr(iCol)*32)).FcolFlags) & COLFLAG_PRIMKEY) != 0 {
- return ts + 9264 /* "PRIMARY KEY" */
+ return ts + 9700 /* "PRIMARY KEY" */
}
- return ts + 5073 /* "UNIQUE" */
+ return ts + 5204 /* "UNIQUE" */
}(),
zCol))
goto exit_drop_column
@@ -87791,7 +90107,7 @@ __7:
if !(int32((*Table)(unsafe.Pointer(pTab)).FnCol) <= 1) {
goto __8
}
- Xsqlite3ErrorMsg(tls, pParse, ts+9276 /* "cannot drop colu..." */, libc.VaList(bp+24, zCol))
+ Xsqlite3ErrorMsg(tls, pParse, ts+9712 /* "cannot drop colu..." */, libc.VaList(bp+24, zCol))
goto exit_drop_column
__8:
;
@@ -87800,14 +90116,15 @@ __8:
iDb = Xsqlite3SchemaToIndex(tls, db, (*Table)(unsafe.Pointer(pTab)).FpSchema)
zDb = (*Db)(unsafe.Pointer((*Sqlite3)(unsafe.Pointer(db)).FaDb + uintptr(iDb)*32)).FzDbSName
- renameTestSchema(tls, pParse, zDb, (libc.Bool32(iDb == 1)), ts+703 /* "" */, uintptr(0))
+ renameTestSchema(tls, pParse, zDb, (libc.Bool32(iDb == 1)), ts+755 /* "" */, 0)
+ renameFixQuotes(tls, pParse, zDb, (libc.Bool32(iDb == 1)))
Xsqlite3NestedParse(tls, pParse,
- ts+9324 /* "UPDATE \"%w\".sqli..." */, libc.VaList(bp+32, zDb, iDb, iCol, (*Table)(unsafe.Pointer(pTab)).FzName))
+ ts+9760 /* "UPDATE \"%w\".sqli..." */, libc.VaList(bp+32, zDb, iDb, iCol, (*Table)(unsafe.Pointer(pTab)).FzName))
// Drop and reload the database schema.
renameReloadSchema(tls, pParse, iDb, uint16(INITFLAG_AlterDrop))
- renameTestSchema(tls, pParse, zDb, (libc.Bool32(iDb == 1)), ts+9445 /* "after drop colum..." */, zCol)
+ renameTestSchema(tls, pParse, zDb, (libc.Bool32(iDb == 1)), ts+9881 /* "after drop colum..." */, 1)
// Edit rows of table on disk
if !(((*Parse)(unsafe.Pointer(pParse)).FnErr == 0) && ((int32((*Column)(unsafe.Pointer((*Table)(unsafe.Pointer(pTab)).FaCol+uintptr(iCol)*32)).FcolFlags) & COLFLAG_VIRTUAL) == 0)) {
@@ -87913,15 +90230,16 @@ exit_drop_column:
}
// Register built-in functions used to help implement ALTER TABLE
-func Xsqlite3AlterFunctions(tls *libc.TLS) { /* sqlite3.c:108755:21: */
+func Xsqlite3AlterFunctions(tls *libc.TLS) { /* sqlite3.c:109584:21: */
Xsqlite3InsertBuiltinFuncs(tls, uintptr(unsafe.Pointer(&aAlterTableFuncs)), (int32(uint64(unsafe.Sizeof(aAlterTableFuncs)) / uint64(unsafe.Sizeof(FuncDef{})))))
}
-var aAlterTableFuncs = [4]FuncDef{
- {FnArg: int8(9), FfuncFlags: (U32((SQLITE_FUNC_INTERNAL | SQLITE_UTF8) | SQLITE_FUNC_CONSTANT)), FxSFunc: 0, FzName: ts + 9463 /* "sqlite_rename_co..." */},
- {FnArg: int8(7), FfuncFlags: (U32((SQLITE_FUNC_INTERNAL | SQLITE_UTF8) | SQLITE_FUNC_CONSTANT)), FxSFunc: 0, FzName: ts + 9484 /* "sqlite_rename_ta..." */},
- {FnArg: int8(7), FfuncFlags: (U32((SQLITE_FUNC_INTERNAL | SQLITE_UTF8) | SQLITE_FUNC_CONSTANT)), FxSFunc: 0, FzName: ts + 9504 /* "sqlite_rename_te..." */},
- {FnArg: int8(3), FfuncFlags: (U32((SQLITE_FUNC_INTERNAL | SQLITE_UTF8) | SQLITE_FUNC_CONSTANT)), FxSFunc: 0, FzName: ts + 9523 /* "sqlite_drop_colu..." */}} /* sqlite3.c:108756:18 */
+var aAlterTableFuncs = [5]FuncDef{
+ {FnArg: int8(9), FfuncFlags: (U32((SQLITE_FUNC_INTERNAL | SQLITE_UTF8) | SQLITE_FUNC_CONSTANT)), FxSFunc: 0, FzName: ts + 9899 /* "sqlite_rename_co..." */},
+ {FnArg: int8(7), FfuncFlags: (U32((SQLITE_FUNC_INTERNAL | SQLITE_UTF8) | SQLITE_FUNC_CONSTANT)), FxSFunc: 0, FzName: ts + 9920 /* "sqlite_rename_ta..." */},
+ {FnArg: int8(7), FfuncFlags: (U32((SQLITE_FUNC_INTERNAL | SQLITE_UTF8) | SQLITE_FUNC_CONSTANT)), FxSFunc: 0, FzName: ts + 9940 /* "sqlite_rename_te..." */},
+ {FnArg: int8(3), FfuncFlags: (U32((SQLITE_FUNC_INTERNAL | SQLITE_UTF8) | SQLITE_FUNC_CONSTANT)), FxSFunc: 0, FzName: ts + 9959 /* "sqlite_drop_colu..." */},
+ {FnArg: int8(2), FfuncFlags: (U32((SQLITE_FUNC_INTERNAL | SQLITE_UTF8) | SQLITE_FUNC_CONSTANT)), FxSFunc: 0, FzName: ts + 9978 /* "sqlite_rename_qu..." */}} /* sqlite3.c:109585:18 */
//************* End of alter.c **********************************************
//************* Begin file analyze.c ****************************************
@@ -88077,7 +90395,7 @@ var aAlterTableFuncs = [4]FuncDef{
// or it may be a NULL pointer. If it is not NULL, then all entries in
// the sqlite_statN tables associated with the named table are deleted.
// If zWhere==0, then code is generated to delete all stat table entries.
-func openStatTable(tls *libc.TLS, pParse uintptr, iDb int32, iStatCur int32, zWhere uintptr, zWhereType uintptr) { /* sqlite3.c:108933:13: */
+func openStatTable(tls *libc.TLS, pParse uintptr, iDb int32, iStatCur int32, zWhere uintptr, zWhereType uintptr) { /* sqlite3.c:109763:13: */
bp := tls.Alloc(88)
defer tls.Free(88)
@@ -88118,7 +90436,7 @@ func openStatTable(tls *libc.TLS, pParse uintptr, iDb int32, iStatCur int32, zWh
// of the new table in register pParse->regRoot. This is important
// because the OpenWrite opcode below will be needing it.
Xsqlite3NestedParse(tls, pParse,
- ts+9542 /* "CREATE TABLE %Q...." */, libc.VaList(bp, (*Db)(unsafe.Pointer(pDb)).FzDbSName, zTab, aTable[i].FzCols))
+ ts+10001 /* "CREATE TABLE %Q...." */, libc.VaList(bp, (*Db)(unsafe.Pointer(pDb)).FzDbSName, zTab, aTable[i].FzCols))
*(*U32)(unsafe.Pointer(bp + 76 /* &aRoot[0] */ + uintptr(i)*4)) = U32((*Parse)(unsafe.Pointer(pParse)).FregRoot)
*(*U8)(unsafe.Pointer(bp + 72 /* &aCreateTbl[0] */ + uintptr(i))) = U8(OPFLAG_P2ISREG)
}
@@ -88130,10 +90448,10 @@ func openStatTable(tls *libc.TLS, pParse uintptr, iDb int32, iStatCur int32, zWh
Xsqlite3TableLock(tls, pParse, iDb, *(*U32)(unsafe.Pointer(bp + 76 /* &aRoot[0] */ + uintptr(i)*4)), uint8(1), zTab)
if zWhere != 0 {
Xsqlite3NestedParse(tls, pParse,
- ts+9565, /* "DELETE FROM %Q.%..." */
+ ts+10024, /* "DELETE FROM %Q.%..." */
libc.VaList(bp+24, (*Db)(unsafe.Pointer(pDb)).FzDbSName, zTab, zWhereType, zWhere))
} else if (*Sqlite3)(unsafe.Pointer(db)).FxPreUpdateCallback != 0 {
- Xsqlite3NestedParse(tls, pParse, ts+9595 /* "DELETE FROM %Q.%..." */, libc.VaList(bp+56, (*Db)(unsafe.Pointer(pDb)).FzDbSName, zTab))
+ Xsqlite3NestedParse(tls, pParse, ts+10054 /* "DELETE FROM %Q.%..." */, libc.VaList(bp+56, (*Db)(unsafe.Pointer(pDb)).FzDbSName, zTab))
} else {
// The sqlite_stat[134] table already exists. Delete all rows.
Xsqlite3VdbeAddOp2(tls, v, OP_Clear, int32(*(*U32)(unsafe.Pointer(bp + 76 /* &aRoot[0] */ + uintptr(i)*4))), iDb)
@@ -88154,10 +90472,10 @@ var aTable = [3]struct {
FzName uintptr
FzCols uintptr
}{
- {FzName: ts + 9613 /* "sqlite_stat1" */, FzCols: ts + 9626 /* "tbl,idx,stat" */},
- {FzName: ts + 9639 /* "sqlite_stat4" */, FzCols: ts + 9652 /* "tbl,idx,neq,nlt,..." */},
- {FzName: ts + 9680 /* "sqlite_stat3" */},
-} /* sqlite3.c:108943:5 */
+ {FzName: ts + 10072 /* "sqlite_stat1" */, FzCols: ts + 10085 /* "tbl,idx,stat" */},
+ {FzName: ts + 10098 /* "sqlite_stat4" */, FzCols: ts + 10111 /* "tbl,idx,neq,nlt,..." */},
+ {FzName: ts + 10139 /* "sqlite_stat3" */},
+} /* sqlite3.c:109773:5 */
// Recommended number of samples for sqlite_stat4
@@ -88165,49 +90483,49 @@ var aTable = [3]struct {
// share an instance of the following structure to hold their state
// information.
type StatAccum1 = struct {
- Fdb uintptr
- FnEst TRowcnt
- FnRow TRowcnt
- FnLimit int32
- FnCol int32
- FnKeyCol int32
- FnSkipAhead U8
- _ [3]byte
- Fcurrent StatSample
- FnPSample TRowcnt
- FmxSample int32
- FiPrn U32
- _ [4]byte
- FaBest uintptr
- FiMin int32
- FnSample int32
- FnMaxEqZero int32
- FiGet int32
- Fa uintptr
-} /* sqlite3.c:109031:9 */
+ Fdb uintptr
+ FnEst TRowcnt
+ FnRow TRowcnt
+ FnLimit int32
+ FnCol int32
+ FnKeyCol int32
+ FnSkipAhead U8
+ F__ccgo_pad1 [3]byte
+ Fcurrent StatSample
+ FnPSample TRowcnt
+ FmxSample int32
+ FiPrn U32
+ F__ccgo_pad2 [4]byte
+ FaBest uintptr
+ FiMin int32
+ FnSample int32
+ FnMaxEqZero int32
+ FiGet int32
+ Fa uintptr
+} /* sqlite3.c:109861:9 */
// Recommended number of samples for sqlite_stat4
// Three SQL functions - stat_init(), stat_push(), and stat_get() -
// share an instance of the following structure to hold their state
// information.
-type StatAccum = StatAccum1 /* sqlite3.c:109031:26 */
+type StatAccum = StatAccum1 /* sqlite3.c:109861:26 */
type StatSample1 = struct {
- FanEq uintptr
- FanDLt uintptr
- FanLt uintptr
- Fu struct{ FiRowid I64 }
- FnRowid U32
- FisPSample U8
- _ [3]byte
- FiCol int32
- FiHash U32
-} /* sqlite3.c:109031:9 */
-
-type StatSample = StatSample1 /* sqlite3.c:109032:27 */
+ FanEq uintptr
+ FanDLt uintptr
+ FanLt uintptr
+ Fu struct{ FiRowid I64 }
+ FnRowid U32
+ FisPSample U8
+ F__ccgo_pad1 [3]byte
+ FiCol int32
+ FiHash U32
+} /* sqlite3.c:109861:9 */
+
+type StatSample = StatSample1 /* sqlite3.c:109862:27 */
// Reclaim memory used by a StatSample
-func sampleClear(tls *libc.TLS, db uintptr, p uintptr) { /* sqlite3.c:109073:13: */
+func sampleClear(tls *libc.TLS, db uintptr, p uintptr) { /* sqlite3.c:109903:13: */
if (*StatSample)(unsafe.Pointer(p)).FnRowid != 0 {
Xsqlite3DbFree(tls, db, *(*uintptr)(unsafe.Pointer(p + 24 /* &.u */)))
@@ -88216,7 +90534,7 @@ func sampleClear(tls *libc.TLS, db uintptr, p uintptr) { /* sqlite3.c:109073:13:
}
// Initialize the BLOB value of a ROWID
-func sampleSetRowid(tls *libc.TLS, db uintptr, p uintptr, n int32, pData uintptr) { /* sqlite3.c:109085:13: */
+func sampleSetRowid(tls *libc.TLS, db uintptr, p uintptr, n int32, pData uintptr) { /* sqlite3.c:109915:13: */
if (*StatSample)(unsafe.Pointer(p)).FnRowid != 0 {
Xsqlite3DbFree(tls, db, *(*uintptr)(unsafe.Pointer(p + 24 /* &.u */)))
@@ -88231,7 +90549,7 @@ func sampleSetRowid(tls *libc.TLS, db uintptr, p uintptr, n int32, pData uintptr
}
// Initialize the INTEGER value of a ROWID.
-func sampleSetRowidInt64(tls *libc.TLS, db uintptr, p uintptr, iRowid I64) { /* sqlite3.c:109101:13: */
+func sampleSetRowidInt64(tls *libc.TLS, db uintptr, p uintptr, iRowid I64) { /* sqlite3.c:109931:13: */
if (*StatSample)(unsafe.Pointer(p)).FnRowid != 0 {
Xsqlite3DbFree(tls, db, *(*uintptr)(unsafe.Pointer(p + 24 /* &.u */)))
@@ -88241,7 +90559,7 @@ func sampleSetRowidInt64(tls *libc.TLS, db uintptr, p uintptr, iRowid I64) { /*
}
// Copy the contents of object (*pFrom) into (*pTo).
-func sampleCopy(tls *libc.TLS, p uintptr, pTo uintptr, pFrom uintptr) { /* sqlite3.c:109114:13: */
+func sampleCopy(tls *libc.TLS, p uintptr, pTo uintptr, pFrom uintptr) { /* sqlite3.c:109944:13: */
(*StatSample)(unsafe.Pointer(pTo)).FisPSample = (*StatSample)(unsafe.Pointer(pFrom)).FisPSample
(*StatSample)(unsafe.Pointer(pTo)).FiCol = (*StatSample)(unsafe.Pointer(pFrom)).FiCol
(*StatSample)(unsafe.Pointer(pTo)).FiHash = (*StatSample)(unsafe.Pointer(pFrom)).FiHash
@@ -88256,7 +90574,7 @@ func sampleCopy(tls *libc.TLS, p uintptr, pTo uintptr, pFrom uintptr) { /* sqlit
}
// Reclaim all memory of a StatAccum structure.
-func statAccumDestructor(tls *libc.TLS, pOld uintptr) { /* sqlite3.c:109132:13: */
+func statAccumDestructor(tls *libc.TLS, pOld uintptr) { /* sqlite3.c:109962:13: */
var p uintptr = pOld
if (*StatAccum)(unsafe.Pointer(p)).FmxSample != 0 {
var i int32
@@ -88291,7 +90609,7 @@ func statAccumDestructor(tls *libc.TLS, pOld uintptr) { /* sqlite3.c:109132:13:
// value is a pointer to the StatAccum object. The datatype of the
// return value is BLOB, but it is really just a pointer to the StatAccum
// object.
-func statInit(tls *libc.TLS, context uintptr, argc int32, argv uintptr) { /* sqlite3.c:109167:13: */
+func statInit(tls *libc.TLS, context uintptr, argc int32, argv uintptr) { /* sqlite3.c:109997:13: */
var p uintptr
var nCol int32 // Number of columns in index being sampled
var nKeyCol int32 // Number of key columns
@@ -88384,10 +90702,10 @@ func statInit(tls *libc.TLS, context uintptr, argc int32, argv uintptr) { /* sql
}
var statInitFuncdef = FuncDef{
- FnArg: int8(4), // nArg
- FfuncFlags: U32(SQLITE_UTF8), // pNext
- FxSFunc: 0, // xValue, xInverse
- FzName: ts + 9693 /* "stat_init" */} /* sqlite3.c:109254:22 */
+ FnArg: int8(4), // nArg
+ FfuncFlags: U32(SQLITE_UTF8), // pNext
+ FxSFunc: 0, // xValue, xInverse
+ FzName: ts + 10152 /* "stat_init" */} /* sqlite3.c:110084:22 */
// pNew and pOld are both candidate non-periodic samples selected for
// the same column (pNew->iCol==pOld->iCol). Ignoring this column and
@@ -88398,7 +90716,7 @@ var statInitFuncdef = FuncDef{
//
// This function assumes that for each argument sample, the contents of
// the anEq[] array from pSample->anEq[pSample->iCol+1] onwards are valid.
-func sampleIsBetterPost(tls *libc.TLS, pAccum uintptr, pNew uintptr, pOld uintptr) int32 { /* sqlite3.c:109278:12: */
+func sampleIsBetterPost(tls *libc.TLS, pAccum uintptr, pNew uintptr, pOld uintptr) int32 { /* sqlite3.c:110108:12: */
var nCol int32 = (*StatAccum)(unsafe.Pointer(pAccum)).FnCol
var i int32
@@ -88420,7 +90738,7 @@ func sampleIsBetterPost(tls *libc.TLS, pAccum uintptr, pNew uintptr, pOld uintpt
//
// This function assumes that for each argument sample, the contents of
// the anEq[] array from pSample->anEq[pSample->iCol] onwards are valid.
-func sampleIsBetter(tls *libc.TLS, pAccum uintptr, pNew uintptr, pOld uintptr) int32 { /* sqlite3.c:109302:12: */
+func sampleIsBetter(tls *libc.TLS, pAccum uintptr, pNew uintptr, pOld uintptr) int32 { /* sqlite3.c:110132:12: */
var nEqNew TRowcnt = *(*TRowcnt)(unsafe.Pointer((*StatSample)(unsafe.Pointer(pNew)).FanEq + uintptr((*StatSample)(unsafe.Pointer(pNew)).FiCol)*4))
var nEqOld TRowcnt = *(*TRowcnt)(unsafe.Pointer((*StatSample)(unsafe.Pointer(pOld)).FanEq + uintptr((*StatSample)(unsafe.Pointer(pOld)).FiCol)*4))
@@ -88438,7 +90756,7 @@ func sampleIsBetter(tls *libc.TLS, pAccum uintptr, pNew uintptr, pOld uintptr) i
// Copy the contents of sample *pNew into the p->a[] array. If necessary,
// remove the least desirable sample from p->a[] to make room.
-func sampleInsert(tls *libc.TLS, p uintptr, pNew uintptr, nEqZero int32) { /* sqlite3.c:109325:13: */
+func sampleInsert(tls *libc.TLS, p uintptr, pNew uintptr, nEqZero int32) { /* sqlite3.c:110155:13: */
var pSample uintptr
var i int32
var pOld uintptr
@@ -88581,7 +90899,7 @@ __11:
// p->current contains a sample that reflects the previous row of the
// index. The value of anEq[iChng] and subsequent anEq[] elements are
// correct at this point.
-func samplePushPrevious(tls *libc.TLS, p uintptr, iChng int32) { /* sqlite3.c:109417:13: */
+func samplePushPrevious(tls *libc.TLS, p uintptr, iChng int32) { /* sqlite3.c:110247:13: */
var i int32
// Check if any samples from the aBest[] array should be pushed
@@ -88633,7 +90951,7 @@ func samplePushPrevious(tls *libc.TLS, p uintptr, iChng int32) { /* sqlite3.c:10
// if it wants the byte-code to do special processing.
//
// The R parameter is only used for STAT4
-func statPush(tls *libc.TLS, context uintptr, argc int32, argv uintptr) { /* sqlite3.c:109469:13: */
+func statPush(tls *libc.TLS, context uintptr, argc int32, argv uintptr) { /* sqlite3.c:110299:13: */
var i int32
// The three function arguments
@@ -88702,10 +91020,10 @@ func statPush(tls *libc.TLS, context uintptr, argc int32, argv uintptr) { /* sql
}
var statPushFuncdef = FuncDef{
- FnArg: (int8(2 + IsStat4)), // nArg
- FfuncFlags: U32(SQLITE_UTF8), // pNext
- FxSFunc: 0, // xValue, xInverse
- FzName: ts + 9703 /* "stat_push" */} /* sqlite3.c:109544:22 */
+ FnArg: (int8(2 + IsStat4)), // nArg
+ FfuncFlags: U32(SQLITE_UTF8), // pNext
+ FxSFunc: 0, // xValue, xInverse
+ FzName: ts + 10162 /* "stat_push" */} /* sqlite3.c:110374:22 */
// Implementation of the stat_get(P,J) SQL function. This routine is
// used to query statistical information that has been gathered into
@@ -88724,7 +91042,7 @@ var statPushFuncdef = FuncDef{
// STAT_GET_STAT1 and is hence omitted and this routine becomes
// a one-parameter function, stat_get(P), that always returns the
// stat1 table entry information.
-func statGet(tls *libc.TLS, context uintptr, argc int32, argv uintptr) { /* sqlite3.c:109581:13: */
+func statGet(tls *libc.TLS, context uintptr, argc int32, argv uintptr) { /* sqlite3.c:110411:13: */
bp := tls.Alloc(24)
defer tls.Free(24)
@@ -88762,7 +91080,7 @@ func statGet(tls *libc.TLS, context uintptr, argc int32, argv uintptr) { /* sqli
return
}
- Xsqlite3_snprintf(tls, 24, zRet, ts+9713, /* "%llu" */
+ Xsqlite3_snprintf(tls, 24, zRet, ts+10172, /* "%llu" */
libc.VaList(bp, func() uint64 {
if (*StatAccum)(unsafe.Pointer(p)).FnSkipAhead != 0 {
return U64((*StatAccum)(unsafe.Pointer(p)).FnEst)
@@ -88773,7 +91091,7 @@ func statGet(tls *libc.TLS, context uintptr, argc int32, argv uintptr) { /* sqli
for i = 0; i < (*StatAccum)(unsafe.Pointer(p)).FnKeyCol; i++ {
var nDistinct U64 = (U64(*(*TRowcnt)(unsafe.Pointer((*StatAccum)(unsafe.Pointer(p)).Fcurrent.FanDLt + uintptr(i)*4)) + TRowcnt(1)))
var iVal U64 = (((U64((*StatAccum)(unsafe.Pointer(p)).FnRow) + nDistinct) - uint64(1)) / nDistinct)
- Xsqlite3_snprintf(tls, 24, z, ts+9718 /* " %llu" */, libc.VaList(bp+8, iVal))
+ Xsqlite3_snprintf(tls, 24, z, ts+10177 /* " %llu" */, libc.VaList(bp+8, iVal))
z += uintptr(Xsqlite3Strlen30(tls, z))
}
@@ -88822,11 +91140,11 @@ func statGet(tls *libc.TLS, context uintptr, argc int32, argv uintptr) { /* sqli
var i int32
var z uintptr = zRet
for i = 0; i < (*StatAccum)(unsafe.Pointer(p)).FnCol; i++ {
- Xsqlite3_snprintf(tls, 24, z, ts+9724 /* "%llu " */, libc.VaList(bp+16, U64(*(*TRowcnt)(unsafe.Pointer(aCnt + uintptr(i)*4)))))
+ Xsqlite3_snprintf(tls, 24, z, ts+10183 /* "%llu " */, libc.VaList(bp+16, U64(*(*TRowcnt)(unsafe.Pointer(aCnt + uintptr(i)*4)))))
z += uintptr(Xsqlite3Strlen30(tls, z))
}
- *(*int8)(unsafe.Pointer(z + libc.UintptrFromInt32(-1))) = int8(0)
+ *(*uint8)(unsafe.Pointer(z + libc.UintptrFromInt32(-1))) = uint8(0)
Xsqlite3_result_text(tls, context, zRet, -1, *(*uintptr)(unsafe.Pointer(&struct{ f func(*libc.TLS, uintptr) }{Xsqlite3_free})))
}
@@ -88836,12 +91154,12 @@ func statGet(tls *libc.TLS, context uintptr, argc int32, argv uintptr) { /* sqli
}
var statGetFuncdef = FuncDef{
- FnArg: (int8(1 + IsStat4)), // nArg
- FfuncFlags: U32(SQLITE_UTF8), // pNext
- FxSFunc: 0, // xValue, xInverse
- FzName: ts + 9730 /* "stat_get" */} /* sqlite3.c:109696:22 */
+ FnArg: (int8(1 + IsStat4)), // nArg
+ FfuncFlags: U32(SQLITE_UTF8), // pNext
+ FxSFunc: 0, // xValue, xInverse
+ FzName: ts + 10189 /* "stat_get" */} /* sqlite3.c:110526:22 */
-func callStatGet(tls *libc.TLS, pParse uintptr, regStat int32, iParam int32, regOut int32) { /* sqlite3.c:109708:13: */
+func callStatGet(tls *libc.TLS, pParse uintptr, regStat int32, iParam int32, regOut int32) { /* sqlite3.c:110538:13: */
Xsqlite3VdbeAddOp2(tls, (*Parse)(unsafe.Pointer(pParse)).FpVdbe, OP_Integer, iParam, (regStat + 1))
Xsqlite3VdbeAddFunctionCall(tls, pParse, 0, regStat, regOut, (1 + IsStat4),
@@ -88850,7 +91168,7 @@ func callStatGet(tls *libc.TLS, pParse uintptr, regStat int32, iParam int32, reg
// Generate code to do an analysis of all indices associated with
// a single table.
-func analyzeOneTable(tls *libc.TLS, pParse uintptr, pTab uintptr, pOnlyIdx uintptr, iStatCur int32, iMem int32, iTab int32) { /* sqlite3.c:109749:13: */
+func analyzeOneTable(tls *libc.TLS, pParse uintptr, pTab uintptr, pOnlyIdx uintptr, iStatCur int32, iMem int32, iTab int32) { /* sqlite3.c:110579:13: */
var db uintptr = (*Parse)(unsafe.Pointer(pParse)).Fdb // Database handle
var pIdx uintptr // An index to being analyzed
var iIdxCur int32 // Cursor open on index being analyzed
@@ -88886,7 +91204,7 @@ func analyzeOneTable(tls *libc.TLS, pParse uintptr, pTab uintptr, pOnlyIdx uintp
// Do not gather statistics on views or virtual tables
return
}
- if Xsqlite3_strlike(tls, ts+9739 /* "sqlite\\_%" */, (*Table)(unsafe.Pointer(pTab)).FzName, uint32('\\')) == 0 {
+ if Xsqlite3_strlike(tls, ts+10198 /* "sqlite\\_%" */, (*Table)(unsafe.Pointer(pTab)).FzName, uint32('\\')) == 0 {
// Do not gather statistics on system tables
return
}
@@ -88904,7 +91222,7 @@ func analyzeOneTable(tls *libc.TLS, pParse uintptr, pTab uintptr, pOnlyIdx uintp
return
}
(*Table)(unsafe.Pointer(pStat1)).FzName = (pStat1 + 1*120)
- libc.Xmemcpy(tls, (*Table)(unsafe.Pointer(pStat1)).FzName, ts+9613 /* "sqlite_stat1" */, uint64(13))
+ libc.Xmemcpy(tls, (*Table)(unsafe.Pointer(pStat1)).FzName, ts+10072 /* "sqlite_stat1" */, uint64(13))
(*Table)(unsafe.Pointer(pStat1)).FnCol = int16(3)
(*Table)(unsafe.Pointer(pStat1)).FiPKey = int16(-1)
Xsqlite3VdbeAddOp4(tls, (*Parse)(unsafe.Pointer(pParse)).FpVdbe, OP_Noop, 0, 0, 0, pStat1, -17)
@@ -88939,14 +91257,14 @@ func analyzeOneTable(tls *libc.TLS, pParse uintptr, pTab uintptr, pOnlyIdx uintp
if (*Index)(unsafe.Pointer(pIdx)).FpPartIdxWhere == uintptr(0) {
needTableCnt = U8(0)
}
- if !(((*Table)(unsafe.Pointer((pTab))).FtabFlags & U32(TF_WithoutRowid)) == U32(0)) && ((int32(*(*uint16)(unsafe.Pointer((pIdx) + 100 /* &.idxType */)) >> 14 & 0x3)) == SQLITE_IDXTYPE_PRIMARYKEY) {
+ if !(((*Table)(unsafe.Pointer((pTab))).FtabFlags & U32(TF_WithoutRowid)) == U32(0)) && ((int32(*(*uint16)(unsafe.Pointer((pIdx) + 100 /* &.idxType */)) & 0xc000 >> 14)) == SQLITE_IDXTYPE_PRIMARYKEY) {
nCol = int32((*Index)(unsafe.Pointer(pIdx)).FnKeyCol)
zIdxName = (*Table)(unsafe.Pointer(pTab)).FzName
nColTest = (nCol - 1)
} else {
nCol = int32((*Index)(unsafe.Pointer(pIdx)).FnColumn)
zIdxName = (*Index)(unsafe.Pointer(pIdx)).FzName
- if (uint32(int32(*(*uint16)(unsafe.Pointer(pIdx + 100 /* &.uniqNotNull */)) >> 12 & 0x1))) != 0 {
+ if (uint32(int32(*(*uint16)(unsafe.Pointer(pIdx + 100 /* &.uniqNotNull */)) & 0x1000 >> 12))) != 0 {
nColTest = (int32((*Index)(unsafe.Pointer(pIdx)).FnKeyCol) - 1)
} else {
nColTest = (nCol - 1)
@@ -89137,7 +91455,7 @@ func analyzeOneTable(tls *libc.TLS, pParse uintptr, pTab uintptr, pOnlyIdx uintp
// Add the entry to the stat1 table.
callStatGet(tls, pParse, regStat, STAT_GET_STAT1, regStat1)
- Xsqlite3VdbeAddOp4(tls, v, OP_MakeRecord, regTabname, 3, regTemp, ts+9749 /* "BBB" */, 0)
+ Xsqlite3VdbeAddOp4(tls, v, OP_MakeRecord, regTabname, 3, regTemp, ts+10208 /* "BBB" */, 0)
Xsqlite3VdbeAddOp2(tls, v, OP_NewRowid, iStatCur, regNewRowid)
Xsqlite3VdbeAddOp3(tls, v, OP_Insert, iStatCur, regTemp, regNewRowid)
Xsqlite3VdbeChangeP4(tls, v, -1, pStat1, -6)
@@ -89199,7 +91517,7 @@ func analyzeOneTable(tls *libc.TLS, pParse uintptr, pTab uintptr, pOnlyIdx uintp
jZeroRows = Xsqlite3VdbeAddOp1(tls, v, OP_IfNot, regStat1)
Xsqlite3VdbeAddOp2(tls, v, OP_Null, 0, regIdxname)
- Xsqlite3VdbeAddOp4(tls, v, OP_MakeRecord, regTabname, 3, regTemp, ts+9749 /* "BBB" */, 0)
+ Xsqlite3VdbeAddOp4(tls, v, OP_MakeRecord, regTabname, 3, regTemp, ts+10208 /* "BBB" */, 0)
Xsqlite3VdbeAddOp2(tls, v, OP_NewRowid, iStatCur, regNewRowid)
Xsqlite3VdbeAddOp3(tls, v, OP_Insert, iStatCur, regTemp, regNewRowid)
Xsqlite3VdbeChangeP5(tls, v, uint16(OPFLAG_APPEND))
@@ -89210,7 +91528,7 @@ func analyzeOneTable(tls *libc.TLS, pParse uintptr, pTab uintptr, pOnlyIdx uintp
// Generate code that will cause the most recent index analysis to
// be loaded into internal hash tables where is can be used.
-func loadAnalysis(tls *libc.TLS, pParse uintptr, iDb int32) { /* sqlite3.c:110111:13: */
+func loadAnalysis(tls *libc.TLS, pParse uintptr, iDb int32) { /* sqlite3.c:110941:13: */
var v uintptr = Xsqlite3GetVdbe(tls, pParse)
if v != 0 {
Xsqlite3VdbeAddOp1(tls, v, OP_LoadAnalysis, iDb)
@@ -89218,7 +91536,7 @@ func loadAnalysis(tls *libc.TLS, pParse uintptr, iDb int32) { /* sqlite3.c:11011
}
// Generate code that will do an analysis of an entire database
-func analyzeDatabase(tls *libc.TLS, pParse uintptr, iDb int32) { /* sqlite3.c:110121:13: */
+func analyzeDatabase(tls *libc.TLS, pParse uintptr, iDb int32) { /* sqlite3.c:110951:13: */
var db uintptr = (*Parse)(unsafe.Pointer(pParse)).Fdb
var pSchema uintptr = (*Db)(unsafe.Pointer((*Sqlite3)(unsafe.Pointer(db)).FaDb + uintptr(iDb)*32)).FpSchema // Schema of database iDb
var k uintptr
@@ -89243,7 +91561,7 @@ func analyzeDatabase(tls *libc.TLS, pParse uintptr, iDb int32) { /* sqlite3.c:11
// Generate code that will do an analysis of a single table in
// a database. If pOnlyIdx is not NULL then it is a single index
// in pTab that should be analyzed.
-func analyzeTable(tls *libc.TLS, pParse uintptr, pTab uintptr, pOnlyIdx uintptr) { /* sqlite3.c:110148:13: */
+func analyzeTable(tls *libc.TLS, pParse uintptr, pTab uintptr, pOnlyIdx uintptr) { /* sqlite3.c:110978:13: */
var iDb int32
var iStatCur int32
@@ -89252,9 +91570,9 @@ func analyzeTable(tls *libc.TLS, pParse uintptr, pTab uintptr, pOnlyIdx uintptr)
iStatCur = (*Parse)(unsafe.Pointer(pParse)).FnTab
*(*int32)(unsafe.Pointer(pParse + 52 /* &.nTab */)) += (3)
if pOnlyIdx != 0 {
- openStatTable(tls, pParse, iDb, iStatCur, (*Index)(unsafe.Pointer(pOnlyIdx)).FzName, ts+9753 /* "idx" */)
+ openStatTable(tls, pParse, iDb, iStatCur, (*Index)(unsafe.Pointer(pOnlyIdx)).FzName, ts+10212 /* "idx" */)
} else {
- openStatTable(tls, pParse, iDb, iStatCur, (*Table)(unsafe.Pointer(pTab)).FzName, ts+9757 /* "tbl" */)
+ openStatTable(tls, pParse, iDb, iStatCur, (*Table)(unsafe.Pointer(pTab)).FzName, ts+10216 /* "tbl" */)
}
analyzeOneTable(tls, pParse, pTab, pOnlyIdx, iStatCur, ((*Parse)(unsafe.Pointer(pParse)).FnMem + 1), (*Parse)(unsafe.Pointer(pParse)).FnTab)
loadAnalysis(tls, pParse, iDb)
@@ -89270,7 +91588,7 @@ func analyzeTable(tls *libc.TLS, pParse uintptr, pTab uintptr, pOnlyIdx uintptr)
// Form 1 causes all indices in all attached databases to be analyzed.
// Form 2 analyzes all indices the single database named.
// Form 3 analyzes all indices associated with the named table.
-func Xsqlite3Analyze(tls *libc.TLS, pParse uintptr, pName1 uintptr, pName2 uintptr) { /* sqlite3.c:110179:21: */
+func Xsqlite3Analyze(tls *libc.TLS, pParse uintptr, pName1 uintptr, pName2 uintptr) { /* sqlite3.c:111009:21: */
bp := tls.Alloc(8)
defer tls.Free(8)
@@ -89333,27 +91651,27 @@ func Xsqlite3Analyze(tls *libc.TLS, pParse uintptr, pName1 uintptr, pName2 uintp
type analysisInfo = struct {
Fdb uintptr
FzDatabase uintptr
-} /* sqlite3.c:110231:9 */
+} /* sqlite3.c:111061:9 */
// Used to pass information from the analyzer reader through to the
// callback routine.
-type AnalysisInfo = analysisInfo /* sqlite3.c:110231:29 */
+type AnalysisInfo = analysisInfo /* sqlite3.c:111061:29 */
// The first argument points to a nul-terminated string containing a
// list of space separated integers. Read the first nOut of these into
// the array aOut[].
-func decodeIntArray(tls *libc.TLS, zIntArray uintptr, nOut int32, aOut uintptr, aLog uintptr, pIndex uintptr) { /* sqlite3.c:110242:13: */
+func decodeIntArray(tls *libc.TLS, zIntArray uintptr, nOut int32, aOut uintptr, aLog uintptr, pIndex uintptr) { /* sqlite3.c:111072:13: */
var z uintptr = zIntArray
var c int32
var i int32
var v TRowcnt
if z == uintptr(0) {
- z = ts + 703 /* "" */
+ z = ts + 755 /* "" */
}
- for i = 0; (*(*int8)(unsafe.Pointer(z)) != 0) && (i < nOut); i++ {
+ for i = 0; (*(*uint8)(unsafe.Pointer(z)) != 0) && (i < nOut); i++ {
v = TRowcnt(0)
- for ((libc.AssignInt32(&c, int32(*(*int8)(unsafe.Pointer(z))))) >= '0') && (c <= '9') {
+ for ((libc.AssignInt32(&c, int32(*(*uint8)(unsafe.Pointer(z))))) >= '0') && (c <= '9') {
v = (((v * TRowcnt(10)) + TRowcnt(c)) - TRowcnt('0'))
z++
}
@@ -89363,29 +91681,29 @@ func decodeIntArray(tls *libc.TLS, zIntArray uintptr, nOut int32, aOut uintptr,
if aLog != 0 {
*(*LogEst)(unsafe.Pointer(aLog + uintptr(i)*2)) = Xsqlite3LogEst(tls, uint64(v))
}
- if int32(*(*int8)(unsafe.Pointer(z))) == ' ' {
+ if int32(*(*uint8)(unsafe.Pointer(z))) == ' ' {
z++
}
}
if pIndex != 0 {
- libc.SetBitFieldPtr16Uint32(pIndex+100 /* &.bUnordered */, uint32(0), 2, 0x4)
- libc.SetBitFieldPtr16Uint32(pIndex+100 /* &.noSkipScan */, uint32(0), 6, 0x40)
- for *(*int8)(unsafe.Pointer(z)) != 0 {
- if Xsqlite3_strglob(tls, ts+9761 /* "unordered*" */, z) == 0 {
- libc.SetBitFieldPtr16Uint32(pIndex+100 /* &.bUnordered */, uint32(1), 2, 0x4)
- } else if Xsqlite3_strglob(tls, ts+9772 /* "sz=[0-9]*" */, z) == 0 {
+ libc.SetBitFieldPtr16Uint32(pIndex+100 /* &.bUnordered */, uint32(0), 13, 0x2000)
+ libc.SetBitFieldPtr16Uint32(pIndex+100 /* &.noSkipScan */, uint32(0), 9, 0x200)
+ for *(*uint8)(unsafe.Pointer(z)) != 0 {
+ if Xsqlite3_strglob(tls, ts+10220 /* "unordered*" */, z) == 0 {
+ libc.SetBitFieldPtr16Uint32(pIndex+100 /* &.bUnordered */, uint32(1), 13, 0x2000)
+ } else if Xsqlite3_strglob(tls, ts+10231 /* "sz=[0-9]*" */, z) == 0 {
var sz int32 = Xsqlite3Atoi(tls, (z + uintptr(3)))
if sz < 2 {
sz = 2
}
(*Index)(unsafe.Pointer(pIndex)).FszIdxRow = Xsqlite3LogEst(tls, uint64(sz))
- } else if Xsqlite3_strglob(tls, ts+9782 /* "noskipscan*" */, z) == 0 {
- libc.SetBitFieldPtr16Uint32(pIndex+100 /* &.noSkipScan */, uint32(1), 6, 0x40)
+ } else if Xsqlite3_strglob(tls, ts+10241 /* "noskipscan*" */, z) == 0 {
+ libc.SetBitFieldPtr16Uint32(pIndex+100 /* &.noSkipScan */, uint32(1), 9, 0x200)
}
- for (int32(*(*int8)(unsafe.Pointer(z))) != 0) && (int32(*(*int8)(unsafe.Pointer(z))) != ' ') {
+ for (int32(*(*uint8)(unsafe.Pointer(z))) != 0) && (int32(*(*uint8)(unsafe.Pointer(z))) != ' ') {
z++
}
- for int32(*(*int8)(unsafe.Pointer(z))) == ' ' {
+ for int32(*(*uint8)(unsafe.Pointer(z))) == ' ' {
z++
}
}
@@ -89401,7 +91719,7 @@ func decodeIntArray(tls *libc.TLS, zIntArray uintptr, nOut int32, aOut uintptr,
//
// Entries for which argv[1]==NULL simply record the number of rows in
// the table.
-func analysisLoader(tls *libc.TLS, pData uintptr, argc int32, argv uintptr, NotUsed uintptr) int32 { /* sqlite3.c:110315:12: */
+func analysisLoader(tls *libc.TLS, pData uintptr, argc int32, argv uintptr, NotUsed uintptr) int32 { /* sqlite3.c:111145:12: */
bp := tls.Alloc(152)
defer tls.Free(152)
@@ -89442,9 +91760,9 @@ func analysisLoader(tls *libc.TLS, pData uintptr, argc int32, argv uintptr, NotU
}
}
aiRowEst = (*Index)(unsafe.Pointer(pIndex)).FaiRowEst
- libc.SetBitFieldPtr16Uint32(pIndex+100 /* &.bUnordered */, uint32(0), 2, 0x4)
+ libc.SetBitFieldPtr16Uint32(pIndex+100 /* &.bUnordered */, uint32(0), 13, 0x2000)
decodeIntArray(tls, z, nCol, aiRowEst, (*Index)(unsafe.Pointer(pIndex)).FaiRowLogEst, pIndex)
- libc.SetBitFieldPtr16Uint32(pIndex+100 /* &.hasStat1 */, uint32(1), 7, 0x80)
+ libc.SetBitFieldPtr16Uint32(pIndex+100 /* &.hasStat1 */, uint32(1), 8, 0x100)
if (*Index)(unsafe.Pointer(pIndex)).FpPartIdxWhere == uintptr(0) {
(*Table)(unsafe.Pointer(pTable)).FnRowLogEst = *(*LogEst)(unsafe.Pointer((*Index)(unsafe.Pointer(pIndex)).FaiRowLogEst))
*(*U32)(unsafe.Pointer(pTable + 64 /* &.tabFlags */)) |= (U32(TF_HasStat1))
@@ -89463,7 +91781,7 @@ func analysisLoader(tls *libc.TLS, pData uintptr, argc int32, argv uintptr, NotU
// If the Index.aSample variable is not NULL, delete the aSample[] array
// and its contents.
-func Xsqlite3DeleteIndexSamples(tls *libc.TLS, db uintptr, pIdx uintptr) { /* sqlite3.c:110378:21: */
+func Xsqlite3DeleteIndexSamples(tls *libc.TLS, db uintptr, pIdx uintptr) { /* sqlite3.c:111208:21: */
if (*Index)(unsafe.Pointer(pIdx)).FaSample != 0 {
var j int32
for j = 0; j < (*Index)(unsafe.Pointer(pIdx)).FnSample; j++ {
@@ -89480,7 +91798,7 @@ func Xsqlite3DeleteIndexSamples(tls *libc.TLS, db uintptr, pIdx uintptr) { /* sq
// Populate the pIdx->aAvgEq[] array based on the samples currently
// stored in pIdx->aSample[].
-func initAvgEq(tls *libc.TLS, pIdx uintptr) { /* sqlite3.c:110403:13: */
+func initAvgEq(tls *libc.TLS, pIdx uintptr) { /* sqlite3.c:111233:13: */
if pIdx != 0 {
var aSample uintptr = (*Index)(unsafe.Pointer(pIdx)).FaSample
var pFinal uintptr = (aSample + uintptr(((*Index)(unsafe.Pointer(pIdx)).FnSample-1))*40)
@@ -89538,7 +91856,7 @@ func initAvgEq(tls *libc.TLS, pIdx uintptr) { /* sqlite3.c:110403:13: */
// Look up an index by name. Or, if the name of a WITHOUT ROWID table
// is supplied instead, find the PRIMARY KEY index for that table.
-func findIndexOrPrimaryKey(tls *libc.TLS, db uintptr, zName uintptr, zDb uintptr) uintptr { /* sqlite3.c:110462:14: */
+func findIndexOrPrimaryKey(tls *libc.TLS, db uintptr, zName uintptr, zDb uintptr) uintptr { /* sqlite3.c:111292:14: */
var pIdx uintptr = Xsqlite3FindIndex(tls, db, zName, zDb)
if pIdx == uintptr(0) {
var pTab uintptr = Xsqlite3FindTable(tls, db, zName, zDb)
@@ -89559,7 +91877,7 @@ func findIndexOrPrimaryKey(tls *libc.TLS, db uintptr, zName uintptr, zDb uintptr
// zSql2: SELECT idx,neq,nlt,ndlt,sample FROM %Q.sqlite_stat4
//
// where %Q is replaced with the database name before the SQL is executed.
-func loadStatTbl(tls *libc.TLS, db uintptr, zSql1 uintptr, zSql2 uintptr, zDb uintptr) int32 { /* sqlite3.c:110487:12: */
+func loadStatTbl(tls *libc.TLS, db uintptr, zSql1 uintptr, zSql2 uintptr, zDb uintptr) int32 { /* sqlite3.c:111317:12: */
bp := tls.Alloc(24)
defer tls.Free(24)
@@ -89600,7 +91918,7 @@ func loadStatTbl(tls *libc.TLS, db uintptr, zSql1 uintptr, zSql2 uintptr, zDb ui
continue
}
- if !(((*Table)(unsafe.Pointer(((*Index)(unsafe.Pointer(pIdx)).FpTable))).FtabFlags & U32(TF_WithoutRowid)) == U32(0)) && ((int32(*(*uint16)(unsafe.Pointer((pIdx) + 100 /* &.idxType */)) >> 14 & 0x3)) == SQLITE_IDXTYPE_PRIMARYKEY) {
+ if !(((*Table)(unsafe.Pointer(((*Index)(unsafe.Pointer(pIdx)).FpTable))).FtabFlags & U32(TF_WithoutRowid)) == U32(0)) && ((int32(*(*uint16)(unsafe.Pointer((pIdx) + 100 /* &.idxType */)) & 0xc000 >> 14)) == SQLITE_IDXTYPE_PRIMARYKEY) {
nIdxCol = int32((*Index)(unsafe.Pointer(pIdx)).FnKeyCol)
} else {
nIdxCol = int32((*Index)(unsafe.Pointer(pIdx)).FnColumn)
@@ -89695,13 +92013,13 @@ func loadStatTbl(tls *libc.TLS, db uintptr, zSql1 uintptr, zSql2 uintptr, zDb ui
// Load content from the sqlite_stat4 table into
// the Index.aSample[] arrays of all indices.
-func loadStat4(tls *libc.TLS, db uintptr, zDb uintptr) int32 { /* sqlite3.c:110608:12: */
+func loadStat4(tls *libc.TLS, db uintptr, zDb uintptr) int32 { /* sqlite3.c:111438:12: */
var rc int32 = SQLITE_OK // Result codes from subroutines
- if Xsqlite3FindTable(tls, db, ts+9639 /* "sqlite_stat4" */, zDb) != 0 {
+ if Xsqlite3FindTable(tls, db, ts+10098 /* "sqlite_stat4" */, zDb) != 0 {
rc = loadStatTbl(tls, db,
- ts+9794, /* "SELECT idx,count..." */
- ts+9848, /* "SELECT idx,neq,n..." */
+ ts+10253, /* "SELECT idx,count..." */
+ ts+10307, /* "SELECT idx,neq,n..." */
zDb)
}
return rc
@@ -89725,7 +92043,7 @@ func loadStat4(tls *libc.TLS, db uintptr, zDb uintptr) int32 { /* sqlite3.c:1106
// If an OOM error occurs, this function always sets db->mallocFailed.
// This means if the caller does not care about other errors, the return
// code may be ignored.
-func Xsqlite3AnalysisLoad(tls *libc.TLS, db uintptr, iDb int32) int32 { /* sqlite3.c:110643:20: */
+func Xsqlite3AnalysisLoad(tls *libc.TLS, db uintptr, iDb int32) int32 { /* sqlite3.c:111473:20: */
bp := tls.Alloc(24)
defer tls.Free(24)
@@ -89744,7 +92062,7 @@ func Xsqlite3AnalysisLoad(tls *libc.TLS, db uintptr, iDb int32) int32 { /* sqlit
}
for i = (*Hash)(unsafe.Pointer((pSchema + 32 /* &.idxHash */))).Ffirst; i != 0; i = (*HashElem)(unsafe.Pointer(i)).Fnext {
var pIdx uintptr = (*HashElem)(unsafe.Pointer(i)).Fdata
- libc.SetBitFieldPtr16Uint32(pIdx+100 /* &.hasStat1 */, uint32(0), 7, 0x80)
+ libc.SetBitFieldPtr16Uint32(pIdx+100 /* &.hasStat1 */, uint32(0), 8, 0x100)
Xsqlite3DeleteIndexSamples(tls, db, pIdx)
(*Index)(unsafe.Pointer(pIdx)).FaSample = uintptr(0)
}
@@ -89752,9 +92070,9 @@ func Xsqlite3AnalysisLoad(tls *libc.TLS, db uintptr, iDb int32) int32 { /* sqlit
// Load new statistics out of the sqlite_stat1 table
(*AnalysisInfo)(unsafe.Pointer(bp + 8 /* &sInfo */)).Fdb = db
(*AnalysisInfo)(unsafe.Pointer(bp + 8 /* &sInfo */)).FzDatabase = (*Db)(unsafe.Pointer((*Sqlite3)(unsafe.Pointer(db)).FaDb + uintptr(iDb)*32)).FzDbSName
- if Xsqlite3FindTable(tls, db, ts+9613 /* "sqlite_stat1" */, (*AnalysisInfo)(unsafe.Pointer(bp+8 /* &sInfo */)).FzDatabase) != uintptr(0) {
+ if Xsqlite3FindTable(tls, db, ts+10072 /* "sqlite_stat1" */, (*AnalysisInfo)(unsafe.Pointer(bp+8 /* &sInfo */)).FzDatabase) != uintptr(0) {
zSql = Xsqlite3MPrintf(tls, db,
- ts+9900 /* "SELECT tbl,idx,s..." */, libc.VaList(bp, (*AnalysisInfo)(unsafe.Pointer(bp+8 /* &sInfo */)).FzDatabase))
+ ts+10359 /* "SELECT tbl,idx,s..." */, libc.VaList(bp, (*AnalysisInfo)(unsafe.Pointer(bp+8 /* &sInfo */)).FzDatabase))
if zSql == uintptr(0) {
rc = SQLITE_NOMEM
} else {
@@ -89769,7 +92087,7 @@ func Xsqlite3AnalysisLoad(tls *libc.TLS, db uintptr, iDb int32) int32 { /* sqlit
for i = (*Hash)(unsafe.Pointer((pSchema + 32 /* &.idxHash */))).Ffirst; i != 0; i = (*HashElem)(unsafe.Pointer(i)).Fnext {
var pIdx uintptr = (*HashElem)(unsafe.Pointer(i)).Fdata
- if !((int32(*(*uint16)(unsafe.Pointer(pIdx + 100 /* &.hasStat1 */)) >> 8 & 0x1)) != 0) {
+ if !((int32(*(*uint16)(unsafe.Pointer(pIdx + 100 /* &.hasStat1 */)) & 0x100 >> 8)) != 0) {
Xsqlite3DefaultRowEst(tls, pIdx)
}
}
@@ -89830,7 +92148,7 @@ func Xsqlite3AnalysisLoad(tls *libc.TLS, db uintptr, iDb int32) int32 { /* sqlit
// ATTACH DATABASE abc||def AS 'db2'
//
// will fail because neither abc or def can be resolved.
-func resolveAttachExpr(tls *libc.TLS, pName uintptr, pExpr uintptr) int32 { /* sqlite3.c:110748:12: */
+func resolveAttachExpr(tls *libc.TLS, pName uintptr, pExpr uintptr) int32 { /* sqlite3.c:111578:12: */
var rc int32 = SQLITE_OK
if pExpr != 0 {
if int32((*Expr)(unsafe.Pointer(pExpr)).Fop) != TK_ID {
@@ -89844,9 +92162,9 @@ func resolveAttachExpr(tls *libc.TLS, pName uintptr, pExpr uintptr) int32 { /* s
// Return true if zName points to a name that may be used to refer to
// database iDb attached to handle db.
-func Xsqlite3DbIsNamed(tls *libc.TLS, db uintptr, iDb int32, zName uintptr) int32 { /* sqlite3.c:110765:20: */
+func Xsqlite3DbIsNamed(tls *libc.TLS, db uintptr, iDb int32, zName uintptr) int32 { /* sqlite3.c:111595:20: */
return (libc.Bool32((Xsqlite3StrICmp(tls, (*Db)(unsafe.Pointer((*Sqlite3)(unsafe.Pointer(db)).FaDb+uintptr(iDb)*32)).FzDbSName, zName) == 0) ||
- ((iDb == 0) && (Xsqlite3StrICmp(tls, ts+5327 /* "main" */, zName) == 0))))
+ ((iDb == 0) && (Xsqlite3StrICmp(tls, ts+5458 /* "main" */, zName) == 0))))
}
// An SQL user-function registered to do the work of an ATTACH statement. The
@@ -89862,7 +92180,7 @@ func Xsqlite3DbIsNamed(tls *libc.TLS, db uintptr, iDb int32, zName uintptr) int3
// If the db->init.reopenMemdb flags is set, then instead of attaching a
// new database, close the database on db->init.iDb and reopen it as an
// empty MemDB.
-func attachFunc(tls *libc.TLS, context uintptr, NotUsed int32, argv uintptr) { /* sqlite3.c:110787:13: */
+func attachFunc(tls *libc.TLS, context uintptr, NotUsed int32, argv uintptr) { /* sqlite3.c:111617:13: */
bp := tls.Alloc(64)
defer tls.Free(64)
@@ -89897,23 +92215,23 @@ func attachFunc(tls *libc.TLS, context uintptr, NotUsed int32, argv uintptr) { /
if !(zFile == uintptr(0)) {
goto __1
}
- zFile = ts + 703 /* "" */
+ zFile = ts + 755 /* "" */
__1:
;
if !(zName == uintptr(0)) {
goto __2
}
- zName = ts + 703 /* "" */
+ zName = ts + 755 /* "" */
__2:
;
- if !(0 != 0) {
+ if !((uint32(int32(*(*uint8)(unsafe.Pointer(db + 184 /* &.init */ + 8 /* &.reopenMemdb */)) & 0x20 >> 5))) != 0) {
goto __3
}
// This is not a real ATTACH. Instead, this routine is being called
// from sqlite3_deserialize() to close database db->init.iDb and
// reopen it as a MemDB
- *(*uintptr)(unsafe.Pointer(bp + 32 /* pVfs */)) = Xsqlite3_vfs_find(tls, ts+9941 /* "memdb" */)
+ *(*uintptr)(unsafe.Pointer(bp + 32 /* pVfs */)) = Xsqlite3_vfs_find(tls, ts+2962 /* "memdb" */)
if !(*(*uintptr)(unsafe.Pointer(bp + 32 /* pVfs */)) == uintptr(0)) {
goto __5
}
@@ -89929,7 +92247,7 @@ __6:
;
(*Db)(unsafe.Pointer(pNew)).FpBt = uintptr(0)
(*Db)(unsafe.Pointer(pNew)).FpSchema = uintptr(0)
- rc = Xsqlite3BtreeOpen(tls, *(*uintptr)(unsafe.Pointer(bp + 32 /* pVfs */)), ts+9947 /* "x\x00" */, db, (pNew + 8 /* &.pBt */), 0, SQLITE_OPEN_MAIN_DB)
+ rc = Xsqlite3BtreeOpen(tls, *(*uintptr)(unsafe.Pointer(bp + 32 /* pVfs */)), ts+10400 /* "x\x00" */, db, (pNew + 8 /* &.pBt */), 0, SQLITE_OPEN_MAIN_DB)
goto __4
__3:
// This is a real ATTACH
@@ -89942,7 +92260,7 @@ __3:
if !((*Sqlite3)(unsafe.Pointer(db)).FnDb >= (*(*int32)(unsafe.Pointer((db + 128 /* &.aLimit */) + 7*4)) + 2)) {
goto __7
}
- *(*uintptr)(unsafe.Pointer(bp + 56 /* zErrDyn */)) = Xsqlite3MPrintf(tls, db, ts+9950, /* "too many attache..." */
+ *(*uintptr)(unsafe.Pointer(bp + 56 /* zErrDyn */)) = Xsqlite3MPrintf(tls, db, ts+10403, /* "too many attache..." */
libc.VaList(bp, *(*int32)(unsafe.Pointer((db + 128 /* &.aLimit */) + 7*4))))
goto attach_error
__7:
@@ -89956,7 +92274,7 @@ __8:
if !(Xsqlite3DbIsNamed(tls, db, i, zName) != 0) {
goto __11
}
- *(*uintptr)(unsafe.Pointer(bp + 56 /* zErrDyn */)) = Xsqlite3MPrintf(tls, db, ts+9987 /* "database %s is a..." */, libc.VaList(bp+8, zName))
+ *(*uintptr)(unsafe.Pointer(bp + 56 /* zErrDyn */)) = Xsqlite3MPrintf(tls, db, ts+10440 /* "database %s is a..." */, libc.VaList(bp+8, zName))
goto attach_error
__11:
;
@@ -90027,7 +92345,7 @@ __4:
goto __18
}
rc = SQLITE_ERROR
- *(*uintptr)(unsafe.Pointer(bp + 56 /* zErrDyn */)) = Xsqlite3MPrintf(tls, db, ts+10017 /* "database is alre..." */, 0)
+ *(*uintptr)(unsafe.Pointer(bp + 56 /* zErrDyn */)) = Xsqlite3MPrintf(tls, db, ts+10470 /* "database is alre..." */, 0)
goto __19
__18:
if !(rc == SQLITE_OK) {
@@ -90044,7 +92362,7 @@ __21:
goto __23
}
*(*uintptr)(unsafe.Pointer(bp + 56 /* zErrDyn */)) = Xsqlite3MPrintf(tls, db,
- ts+10046 /* "attached databas..." */, 0)
+ ts+10499 /* "attached databas..." */, 0)
rc = SQLITE_ERROR
__23:
;
@@ -90081,7 +92399,7 @@ __24:
Xsqlite3BtreeEnterAll(tls, db)
(*Sqlite3)(unsafe.Pointer(db)).Finit.FiDb = U8(0)
*(*U32)(unsafe.Pointer(db + 44 /* &.mDbFlags */)) &= (libc.Uint32FromInt32(libc.CplInt32(DBFLAG_SchemaKnownOk)))
- if !(!(0 != 0)) {
+ if !(!((int32(*(*uint8)(unsafe.Pointer(db + 184 /* &.init */ + 8 /* &.reopenMemdb */)) & 0x20 >> 5)) != 0)) {
goto __26
}
rc = Xsqlite3Init(tls, db, bp+56 /* &zErrDyn */)
@@ -90094,7 +92412,7 @@ __25:
if !(rc != 0) {
goto __27
}
- if !(!(0 != 0)) {
+ if !(!((int32(*(*uint8)(unsafe.Pointer(db + 184 /* &.init */ + 8 /* &.reopenMemdb */)) & 0x20 >> 5)) != 0)) {
goto __28
}
iDb = ((*Sqlite3)(unsafe.Pointer(db)).FnDb - 1)
@@ -90114,13 +92432,13 @@ __29:
}
Xsqlite3OomFault(tls, db)
Xsqlite3DbFree(tls, db, *(*uintptr)(unsafe.Pointer(bp + 56 /* zErrDyn */)))
- *(*uintptr)(unsafe.Pointer(bp + 56 /* zErrDyn */)) = Xsqlite3MPrintf(tls, db, ts+5050 /* "out of memory" */, 0)
+ *(*uintptr)(unsafe.Pointer(bp + 56 /* zErrDyn */)) = Xsqlite3MPrintf(tls, db, ts+5181 /* "out of memory" */, 0)
goto __31
__30:
if !(*(*uintptr)(unsafe.Pointer(bp + 56 /* zErrDyn */)) == uintptr(0)) {
goto __32
}
- *(*uintptr)(unsafe.Pointer(bp + 56 /* zErrDyn */)) = Xsqlite3MPrintf(tls, db, ts+10114 /* "unable to open d..." */, libc.VaList(bp+16, zFile))
+ *(*uintptr)(unsafe.Pointer(bp + 56 /* zErrDyn */)) = Xsqlite3MPrintf(tls, db, ts+10567 /* "unable to open d..." */, libc.VaList(bp+16, zFile))
__32:
;
__31:
@@ -90155,7 +92473,7 @@ __34:
// DETACH DATABASE x
//
// SELECT sqlite_detach(x)
-func detachFunc(tls *libc.TLS, context uintptr, NotUsed int32, argv uintptr) { /* sqlite3.c:110980:13: */
+func detachFunc(tls *libc.TLS, context uintptr, NotUsed int32, argv uintptr) { /* sqlite3.c:111810:13: */
bp := tls.Alloc(152)
defer tls.Free(152)
@@ -90164,7 +92482,7 @@ func detachFunc(tls *libc.TLS, context uintptr, NotUsed int32, argv uintptr) { /
var i int32
var pDb uintptr
var pEntry uintptr
- // var zErr [128]int8 at bp+24, 128
+ // var zErr [128]uint8 at bp+24, 128
var pTrig uintptr
zName = Xsqlite3_value_text(tls, *(*uintptr)(unsafe.Pointer(argv)))
@@ -90176,7 +92494,7 @@ func detachFunc(tls *libc.TLS, context uintptr, NotUsed int32, argv uintptr) { /
if !(zName == uintptr(0)) {
goto __1
}
- zName = ts + 703 /* "" */
+ zName = ts + 755 /* "" */
__1:
;
i = 0
@@ -90208,14 +92526,14 @@ __4:
if !(i >= (*Sqlite3)(unsafe.Pointer(db)).FnDb) {
goto __7
}
- Xsqlite3_snprintf(tls, int32(unsafe.Sizeof([128]int8{})), bp+24 /* &zErr[0] */, ts+10142 /* "no such database..." */, libc.VaList(bp, zName))
+ Xsqlite3_snprintf(tls, int32(unsafe.Sizeof([128]uint8{})), bp+24 /* &zErr[0] */, ts+10595 /* "no such database..." */, libc.VaList(bp, zName))
goto detach_error
__7:
;
if !(i < 2) {
goto __8
}
- Xsqlite3_snprintf(tls, int32(unsafe.Sizeof([128]int8{})), bp+24 /* &zErr[0] */, ts+10163 /* "cannot detach da..." */, libc.VaList(bp+8, zName))
+ Xsqlite3_snprintf(tls, int32(unsafe.Sizeof([128]uint8{})), bp+24 /* &zErr[0] */, ts+10616 /* "cannot detach da..." */, libc.VaList(bp+8, zName))
goto detach_error
__8:
;
@@ -90223,7 +92541,7 @@ __8:
(Xsqlite3BtreeIsInBackup(tls, (*Db)(unsafe.Pointer(pDb)).FpBt) != 0)) {
goto __9
}
- Xsqlite3_snprintf(tls, int32(unsafe.Sizeof([128]int8{})), bp+24 /* &zErr[0] */, ts+10189 /* "database %s is l..." */, libc.VaList(bp+16, zName))
+ Xsqlite3_snprintf(tls, int32(unsafe.Sizeof([128]uint8{})), bp+24 /* &zErr[0] */, ts+10642 /* "database %s is l..." */, libc.VaList(bp+16, zName))
goto detach_error
__9:
;
@@ -90260,7 +92578,7 @@ detach_error:
// This procedure generates VDBE code for a single invocation of either the
// sqlite_detach() or sqlite_attach() SQL user functions.
-func codeAttach(tls *libc.TLS, pParse uintptr, type1 int32, pFunc uintptr, pAuthArg uintptr, pFilename uintptr, pDbname uintptr, pKey uintptr) { /* sqlite3.c:111042:13: */
+func codeAttach(tls *libc.TLS, pParse uintptr, type1 int32, pFunc uintptr, pAuthArg uintptr, pFilename uintptr, pDbname uintptr, pKey uintptr) { /* sqlite3.c:111872:13: */
bp := tls.Alloc(56)
defer tls.Free(56)
@@ -90338,7 +92656,7 @@ attach_end:
// Called by the parser to compile a DETACH statement.
//
// DETACH pDbname
-func Xsqlite3Detach(tls *libc.TLS, pParse uintptr, pDbname uintptr) { /* sqlite3.c:111113:21: */
+func Xsqlite3Detach(tls *libc.TLS, pParse uintptr, pDbname uintptr) { /* sqlite3.c:111943:21: */
codeAttach(tls, pParse, SQLITE_DETACH, uintptr(unsafe.Pointer(&detach_func)), pDbname, uintptr(0), uintptr(0), pDbname)
}
@@ -90346,12 +92664,12 @@ var detach_func = FuncDef{
FnArg: int8(1), // nArg
FfuncFlags: U32(SQLITE_UTF8), // pNext
FxSFunc: 0, // xValue, xInverse
- FzName: ts + 10211 /* "sqlite_detach" */} /* sqlite3.c:111114:24 */
+ FzName: ts + 10664 /* "sqlite_detach" */} /* sqlite3.c:111944:24 */
// Called by the parser to compile an ATTACH statement.
//
// ATTACH p AS pDbname KEY pKey
-func Xsqlite3Attach(tls *libc.TLS, pParse uintptr, p uintptr, pDbname uintptr, pKey uintptr) { /* sqlite3.c:111133:21: */
+func Xsqlite3Attach(tls *libc.TLS, pParse uintptr, p uintptr, pDbname uintptr, pKey uintptr) { /* sqlite3.c:111963:21: */
codeAttach(tls, pParse, SQLITE_ATTACH, uintptr(unsafe.Pointer(&attach_func)), p, p, pDbname, pKey)
}
@@ -90359,10 +92677,10 @@ var attach_func = FuncDef{
FnArg: int8(3), // nArg
FfuncFlags: U32(SQLITE_UTF8), // pNext
FxSFunc: 0, // xValue, xInverse
- FzName: ts + 10225 /* "sqlite_attach" */} /* sqlite3.c:111134:24 */
+ FzName: ts + 10678 /* "sqlite_attach" */} /* sqlite3.c:111964:24 */
// Expression callback used by sqlite3FixAAAA() routines.
-func fixExprCb(tls *libc.TLS, p uintptr, pExpr uintptr) int32 { /* sqlite3.c:111152:12: */
+func fixExprCb(tls *libc.TLS, p uintptr, pExpr uintptr) int32 { /* sqlite3.c:111982:12: */
bp := tls.Alloc(8)
defer tls.Free(8)
@@ -90374,7 +92692,7 @@ func fixExprCb(tls *libc.TLS, p uintptr, pExpr uintptr) int32 { /* sqlite3.c:111
if (*Sqlite3)(unsafe.Pointer((*Parse)(unsafe.Pointer((*DbFixer)(unsafe.Pointer(pFix)).FpParse)).Fdb)).Finit.Fbusy != 0 {
(*Expr)(unsafe.Pointer(pExpr)).Fop = U8(TK_NULL)
} else {
- Xsqlite3ErrorMsg(tls, (*DbFixer)(unsafe.Pointer(pFix)).FpParse, ts+10239 /* "%s cannot use va..." */, libc.VaList(bp, (*DbFixer)(unsafe.Pointer(pFix)).FzType))
+ Xsqlite3ErrorMsg(tls, (*DbFixer)(unsafe.Pointer(pFix)).FpParse, ts+10692 /* "%s cannot use va..." */, libc.VaList(bp, (*DbFixer)(unsafe.Pointer(pFix)).FzType))
return WRC_Abort
}
}
@@ -90382,7 +92700,7 @@ func fixExprCb(tls *libc.TLS, p uintptr, pExpr uintptr) int32 { /* sqlite3.c:111
}
// Select callback used by sqlite3FixAAAA() routines.
-func fixSelectCb(tls *libc.TLS, p uintptr, pSelect uintptr) int32 { /* sqlite3.c:111169:12: */
+func fixSelectCb(tls *libc.TLS, p uintptr, pSelect uintptr) int32 { /* sqlite3.c:111999:12: */
bp := tls.Alloc(24)
defer tls.Free(24)
@@ -90404,16 +92722,19 @@ __1:
}
{
if int32((*DbFixer)(unsafe.Pointer(pFix)).FbTemp) == 0 {
- if ((*SrcItem)(unsafe.Pointer(pItem)).FzDatabase != 0) && (iDb != Xsqlite3FindDbName(tls, db, (*SrcItem)(unsafe.Pointer(pItem)).FzDatabase)) {
- Xsqlite3ErrorMsg(tls, (*DbFixer)(unsafe.Pointer(pFix)).FpParse,
- ts+10263, /* "%s %T cannot ref..." */
- libc.VaList(bp, (*DbFixer)(unsafe.Pointer(pFix)).FzType, (*DbFixer)(unsafe.Pointer(pFix)).FpName, (*SrcItem)(unsafe.Pointer(pItem)).FzDatabase))
- return WRC_Abort
+ if (*SrcItem)(unsafe.Pointer(pItem)).FzDatabase != 0 {
+ if iDb != Xsqlite3FindDbName(tls, db, (*SrcItem)(unsafe.Pointer(pItem)).FzDatabase) {
+ Xsqlite3ErrorMsg(tls, (*DbFixer)(unsafe.Pointer(pFix)).FpParse,
+ ts+10716, /* "%s %T cannot ref..." */
+ libc.VaList(bp, (*DbFixer)(unsafe.Pointer(pFix)).FzType, (*DbFixer)(unsafe.Pointer(pFix)).FpName, (*SrcItem)(unsafe.Pointer(pItem)).FzDatabase))
+ return WRC_Abort
+ }
+ Xsqlite3DbFree(tls, db, (*SrcItem)(unsafe.Pointer(pItem)).FzDatabase)
+ (*SrcItem)(unsafe.Pointer(pItem)).FzDatabase = uintptr(0)
+ libc.SetBitFieldPtr16Uint32(pItem+60 /* &.fg */ +4 /* &.notCte */, uint32(1), 7, 0x80)
}
- Xsqlite3DbFree(tls, db, (*SrcItem)(unsafe.Pointer(pItem)).FzDatabase)
- (*SrcItem)(unsafe.Pointer(pItem)).FzDatabase = uintptr(0)
(*SrcItem)(unsafe.Pointer(pItem)).FpSchema = (*DbFixer)(unsafe.Pointer(pFix)).FpSchema
- libc.SetBitFieldPtr8Uint32(pItem+60 /* &.fg */ +4 /* &.fromDDL */, uint32(1), 6, 0x40)
+ libc.SetBitFieldPtr16Uint32(pItem+60 /* &.fg */ +4 /* &.fromDDL */, uint32(1), 9, 0x200)
}
if Xsqlite3WalkExpr(tls, (pFix+8 /* &.w */), (*SrcItem)(unsafe.Pointer((pList+8 /* &.a */)+uintptr(i)*112)).FpOn) != 0 {
return WRC_Abort
@@ -90440,7 +92761,7 @@ __3:
// Initialize a DbFixer structure. This routine must be called prior
// to passing the structure to one of the sqliteFixAAAA() routines below.
-func Xsqlite3FixInit(tls *libc.TLS, pFix uintptr, pParse uintptr, iDb int32, zType uintptr, pName uintptr) { /* sqlite3.c:111209:21: */
+func Xsqlite3FixInit(tls *libc.TLS, pFix uintptr, pParse uintptr, iDb int32, zType uintptr, pName uintptr) { /* sqlite3.c:112042:21: */
var db uintptr = (*Parse)(unsafe.Pointer(pParse)).Fdb
(*DbFixer)(unsafe.Pointer(pFix)).FpParse = pParse
@@ -90456,7 +92777,9 @@ func Xsqlite3FixInit(tls *libc.TLS, pFix uintptr, pParse uintptr, iDb int32, zTy
(*DbFixer)(unsafe.Pointer(pFix)).Fw.FxSelectCallback = *(*uintptr)(unsafe.Pointer(&struct {
f func(*libc.TLS, uintptr, uintptr) int32
}{fixSelectCb}))
- (*DbFixer)(unsafe.Pointer(pFix)).Fw.FxSelectCallback2 = uintptr(0)
+ (*DbFixer)(unsafe.Pointer(pFix)).Fw.FxSelectCallback2 = *(*uintptr)(unsafe.Pointer(&struct {
+ f func(*libc.TLS, uintptr, uintptr)
+ }{Xsqlite3WalkWinDefnDummyCallback}))
(*DbFixer)(unsafe.Pointer(pFix)).Fw.FwalkerDepth = 0
(*DbFixer)(unsafe.Pointer(pFix)).Fw.FeCode = U16(0)
*(*uintptr)(unsafe.Pointer(pFix + 8 /* &.w */ + 40 /* &.u */)) = pFix
@@ -90474,7 +92797,7 @@ func Xsqlite3FixInit(tls *libc.TLS, pFix uintptr, pParse uintptr, iDb int32, zTy
// to an object in a different database, an error message is added to
// pParse->zErrMsg and these routines return non-zero. If everything
// checks out, these routines return 0.
-func Xsqlite3FixSrcList(tls *libc.TLS, pFix uintptr, pList uintptr) int32 { /* sqlite3.c:111247:20: */
+func Xsqlite3FixSrcList(tls *libc.TLS, pFix uintptr, pList uintptr) int32 { /* sqlite3.c:112080:20: */
bp := tls.Alloc(128)
defer tls.Free(128)
@@ -90489,15 +92812,15 @@ func Xsqlite3FixSrcList(tls *libc.TLS, pFix uintptr, pList uintptr) int32 { /* s
return res
}
-func Xsqlite3FixSelect(tls *libc.TLS, pFix uintptr, pSelect uintptr) int32 { /* sqlite3.c:111261:20: */
+func Xsqlite3FixSelect(tls *libc.TLS, pFix uintptr, pSelect uintptr) int32 { /* sqlite3.c:112094:20: */
return Xsqlite3WalkSelect(tls, (pFix + 8 /* &.w */), pSelect)
}
-func Xsqlite3FixExpr(tls *libc.TLS, pFix uintptr, pExpr uintptr) int32 { /* sqlite3.c:111267:20: */
+func Xsqlite3FixExpr(tls *libc.TLS, pFix uintptr, pExpr uintptr) int32 { /* sqlite3.c:112100:20: */
return Xsqlite3WalkExpr(tls, (pFix + 8 /* &.w */), pExpr)
}
-func Xsqlite3FixTriggerStep(tls *libc.TLS, pFix uintptr, pStep uintptr) int32 { /* sqlite3.c:111276:20: */
+func Xsqlite3FixTriggerStep(tls *libc.TLS, pFix uintptr, pStep uintptr) int32 { /* sqlite3.c:112109:20: */
for pStep != 0 {
if (((Xsqlite3WalkSelect(tls, (pFix+8 /* &.w */), (*TriggerStep)(unsafe.Pointer(pStep)).FpSelect) != 0) ||
(Xsqlite3WalkExpr(tls, (pFix+8 /* &.w */), (*TriggerStep)(unsafe.Pointer(pStep)).FpWhere) != 0)) ||
@@ -90505,14 +92828,17 @@ func Xsqlite3FixTriggerStep(tls *libc.TLS, pFix uintptr, pStep uintptr) int32 {
(Xsqlite3FixSrcList(tls, pFix, (*TriggerStep)(unsafe.Pointer(pStep)).FpFrom) != 0) {
return 1
}
- if (*TriggerStep)(unsafe.Pointer(pStep)).FpUpsert != 0 {
- var pUp uintptr = (*TriggerStep)(unsafe.Pointer(pStep)).FpUpsert
- if (((Xsqlite3WalkExprList(tls, (pFix+8 /* &.w */), (*Upsert)(unsafe.Pointer(pUp)).FpUpsertTarget) != 0) ||
- (Xsqlite3WalkExpr(tls, (pFix+8 /* &.w */), (*Upsert)(unsafe.Pointer(pUp)).FpUpsertTargetWhere) != 0)) ||
- (Xsqlite3WalkExprList(tls, (pFix+8 /* &.w */), (*Upsert)(unsafe.Pointer(pUp)).FpUpsertSet) != 0)) ||
- (Xsqlite3WalkExpr(tls, (pFix+8 /* &.w */), (*Upsert)(unsafe.Pointer(pUp)).FpUpsertWhere) != 0) {
- return 1
+ {
+ var pUp uintptr
+ for pUp = (*TriggerStep)(unsafe.Pointer(pStep)).FpUpsert; pUp != 0; pUp = (*Upsert)(unsafe.Pointer(pUp)).FpNextUpsert {
+ if (((Xsqlite3WalkExprList(tls, (pFix+8 /* &.w */), (*Upsert)(unsafe.Pointer(pUp)).FpUpsertTarget) != 0) ||
+ (Xsqlite3WalkExpr(tls, (pFix+8 /* &.w */), (*Upsert)(unsafe.Pointer(pUp)).FpUpsertTargetWhere) != 0)) ||
+ (Xsqlite3WalkExprList(tls, (pFix+8 /* &.w */), (*Upsert)(unsafe.Pointer(pUp)).FpUpsertSet) != 0)) ||
+ (Xsqlite3WalkExpr(tls, (pFix+8 /* &.w */), (*Upsert)(unsafe.Pointer(pUp)).FpUpsertWhere) != 0) {
+ return 1
+ }
}
+
}
pStep = (*TriggerStep)(unsafe.Pointer(pStep)).FpNext
}
@@ -90584,7 +92910,7 @@ func Xsqlite3FixTriggerStep(tls *libc.TLS, pFix uintptr, pStep uintptr) int32 {
//
// Setting the auth function to NULL disables this hook. The default
// setting of the auth function is NULL.
-func Xsqlite3_set_authorizer(tls *libc.TLS, db uintptr, xAuth uintptr, pArg uintptr) int32 { /* sqlite3.c:111378:16: */
+func Xsqlite3_set_authorizer(tls *libc.TLS, db uintptr, xAuth uintptr, pArg uintptr) int32 { /* sqlite3.c:112213:16: */
Xsqlite3_mutex_enter(tls, (*Sqlite3)(unsafe.Pointer(db)).Fmutex)
(*Sqlite3)(unsafe.Pointer(db)).FxAuth = xAuth
(*Sqlite3)(unsafe.Pointer(db)).FpAuthArg = pArg
@@ -90597,8 +92923,8 @@ func Xsqlite3_set_authorizer(tls *libc.TLS, db uintptr, xAuth uintptr, pArg uint
// Write an error message into pParse->zErrMsg that explains that the
// user-supplied authorization function returned an illegal value.
-func sqliteAuthBadReturnCode(tls *libc.TLS, pParse uintptr) { /* sqlite3.c:111398:13: */
- Xsqlite3ErrorMsg(tls, pParse, ts+10309 /* "authorizer malfu..." */, 0)
+func sqliteAuthBadReturnCode(tls *libc.TLS, pParse uintptr) { /* sqlite3.c:112233:13: */
+ Xsqlite3ErrorMsg(tls, pParse, ts+10762 /* "authorizer malfu..." */, 0)
(*Parse)(unsafe.Pointer(pParse)).Frc = SQLITE_ERROR
}
@@ -90609,7 +92935,7 @@ func sqliteAuthBadReturnCode(tls *libc.TLS, pParse uintptr) { /* sqlite3.c:11139
// If SQLITE_IGNORE is returned and pExpr is not NULL, then pExpr is changed
// to an SQL NULL expression. Otherwise, if pExpr is NULL, then SQLITE_IGNORE
// is treated as SQLITE_DENY. In this case an error is left in pParse.
-func Xsqlite3AuthReadCol(tls *libc.TLS, pParse uintptr, zTab uintptr, zCol uintptr, iDb int32) int32 { /* sqlite3.c:111412:20: */
+func Xsqlite3AuthReadCol(tls *libc.TLS, pParse uintptr, zTab uintptr, zCol uintptr, iDb int32) int32 { /* sqlite3.c:112247:20: */
bp := tls.Alloc(40)
defer tls.Free(40)
@@ -90620,13 +92946,15 @@ func Xsqlite3AuthReadCol(tls *libc.TLS, pParse uintptr, zTab uintptr, zCol uintp
if (*Sqlite3)(unsafe.Pointer(db)).Finit.Fbusy != 0 {
return SQLITE_OK
}
- rc = (*(*func(*libc.TLS, uintptr, int32, uintptr, uintptr, uintptr, uintptr) int32)(unsafe.Pointer((db + 496 /* &.xAuth */))))(tls, (*Sqlite3)(unsafe.Pointer(db)).FpAuthArg, SQLITE_READ, zTab, zCol, zDb, (*Parse)(unsafe.Pointer(pParse)).FzAuthContext)
+ rc = (*struct {
+ f func(*libc.TLS, uintptr, int32, uintptr, uintptr, uintptr, uintptr) int32
+ })(unsafe.Pointer(&struct{ uintptr }{(*Sqlite3)(unsafe.Pointer(db)).FxAuth})).f(tls, (*Sqlite3)(unsafe.Pointer(db)).FpAuthArg, SQLITE_READ, zTab, zCol, zDb, (*Parse)(unsafe.Pointer(pParse)).FzAuthContext)
if rc == SQLITE_DENY {
- var z uintptr = Xsqlite3_mprintf(tls, ts+10332 /* "%s.%s" */, libc.VaList(bp, zTab, zCol))
+ var z uintptr = Xsqlite3_mprintf(tls, ts+10785 /* "%s.%s" */, libc.VaList(bp, zTab, zCol))
if ((*Sqlite3)(unsafe.Pointer(db)).FnDb > 2) || (iDb != 0) {
- z = Xsqlite3_mprintf(tls, ts+10338 /* "%s.%z" */, libc.VaList(bp+16, zDb, z))
+ z = Xsqlite3_mprintf(tls, ts+10791 /* "%s.%z" */, libc.VaList(bp+16, zDb, z))
}
- Xsqlite3ErrorMsg(tls, pParse, ts+10344 /* "access to %z is ..." */, libc.VaList(bp+32, z))
+ Xsqlite3ErrorMsg(tls, pParse, ts+10797 /* "access to %z is ..." */, libc.VaList(bp+32, z))
(*Parse)(unsafe.Pointer(pParse)).Frc = SQLITE_AUTH
} else if (rc != SQLITE_IGNORE) && (rc != SQLITE_OK) {
sqliteAuthBadReturnCode(tls, pParse)
@@ -90641,7 +92969,7 @@ func Xsqlite3AuthReadCol(tls *libc.TLS, pParse uintptr, zTab uintptr, zCol uintp
// If the auth function returns SQLITE_IGNORE, change the TK_COLUMN
// instruction into a TK_NULL. If the auth function returns SQLITE_DENY,
// then generate an error.
-func Xsqlite3AuthRead(tls *libc.TLS, pParse uintptr, pExpr uintptr, pSchema uintptr, pTabList uintptr) { /* sqlite3.c:111448:21: */
+func Xsqlite3AuthRead(tls *libc.TLS, pParse uintptr, pExpr uintptr, pSchema uintptr, pTabList uintptr) { /* sqlite3.c:112283:21: */
var pTab uintptr = uintptr(0) // The table being read
var zCol uintptr // Name of the column of the table
var iSrc int32 // Index in pTabList->a[] of table being read
@@ -90678,7 +93006,7 @@ func Xsqlite3AuthRead(tls *libc.TLS, pParse uintptr, pExpr uintptr, pSchema uint
zCol = (*Column)(unsafe.Pointer((*Table)(unsafe.Pointer(pTab)).FaCol + uintptr((*Table)(unsafe.Pointer(pTab)).FiPKey)*32)).FzName
} else {
- zCol = ts + 6557 /* "ROWID" */
+ zCol = ts + 6688 /* "ROWID" */
}
if SQLITE_IGNORE == Xsqlite3AuthReadCol(tls, pParse, (*Table)(unsafe.Pointer(pTab)).FzName, zCol, iDb) {
@@ -90690,7 +93018,7 @@ func Xsqlite3AuthRead(tls *libc.TLS, pParse uintptr, pExpr uintptr, pSchema uint
// either SQLITE_OK (zero) or SQLITE_IGNORE or SQLITE_DENY. If SQLITE_DENY
// is returned, then the error count and error message in pParse are
// modified appropriately.
-func Xsqlite3AuthCheck(tls *libc.TLS, pParse uintptr, code int32, zArg1 uintptr, zArg2 uintptr, zArg3 uintptr) int32 { /* sqlite3.c:111505:20: */
+func Xsqlite3AuthCheck(tls *libc.TLS, pParse uintptr, code int32, zArg1 uintptr, zArg2 uintptr, zArg3 uintptr) int32 { /* sqlite3.c:112340:20: */
var db uintptr = (*Parse)(unsafe.Pointer(pParse)).Fdb
var rc int32
@@ -90708,9 +93036,11 @@ func Xsqlite3AuthCheck(tls *libc.TLS, pParse uintptr, code int32, zArg1 uintptr,
// The following testcase() macros show that any of the 3rd through 6th
// parameters can be either NULL or a string.
- rc = (*(*func(*libc.TLS, uintptr, int32, uintptr, uintptr, uintptr, uintptr) int32)(unsafe.Pointer((db + 496 /* &.xAuth */))))(tls, (*Sqlite3)(unsafe.Pointer(db)).FpAuthArg, code, zArg1, zArg2, zArg3, (*Parse)(unsafe.Pointer(pParse)).FzAuthContext)
+ rc = (*struct {
+ f func(*libc.TLS, uintptr, int32, uintptr, uintptr, uintptr, uintptr) int32
+ })(unsafe.Pointer(&struct{ uintptr }{(*Sqlite3)(unsafe.Pointer(db)).FxAuth})).f(tls, (*Sqlite3)(unsafe.Pointer(db)).FpAuthArg, code, zArg1, zArg2, zArg3, (*Parse)(unsafe.Pointer(pParse)).FzAuthContext)
if rc == SQLITE_DENY {
- Xsqlite3ErrorMsg(tls, pParse, ts+10371 /* "not authorized" */, 0)
+ Xsqlite3ErrorMsg(tls, pParse, ts+10824 /* "not authorized" */, 0)
(*Parse)(unsafe.Pointer(pParse)).Frc = SQLITE_AUTH
} else if (rc != SQLITE_OK) && (rc != SQLITE_IGNORE) {
rc = SQLITE_DENY
@@ -90722,7 +93052,7 @@ func Xsqlite3AuthCheck(tls *libc.TLS, pParse uintptr, code int32, zArg1 uintptr,
// Push an authorization context. After this routine is called, the
// zArg3 argument to authorization callbacks will be zContext until
// popped. Or if pParse==0, this routine is a no-op.
-func Xsqlite3AuthContextPush(tls *libc.TLS, pParse uintptr, pContext uintptr, zContext uintptr) { /* sqlite3.c:111554:21: */
+func Xsqlite3AuthContextPush(tls *libc.TLS, pParse uintptr, pContext uintptr, zContext uintptr) { /* sqlite3.c:112389:21: */
(*AuthContext)(unsafe.Pointer(pContext)).FpParse = pParse
(*AuthContext)(unsafe.Pointer(pContext)).FzAuthContext = (*Parse)(unsafe.Pointer(pParse)).FzAuthContext
@@ -90731,7 +93061,7 @@ func Xsqlite3AuthContextPush(tls *libc.TLS, pParse uintptr, pContext uintptr, zC
// Pop an authorization context that was previously pushed
// by sqlite3AuthContextPush
-func Xsqlite3AuthContextPop(tls *libc.TLS, pContext uintptr) { /* sqlite3.c:111569:21: */
+func Xsqlite3AuthContextPop(tls *libc.TLS, pContext uintptr) { /* sqlite3.c:112404:21: */
if (*AuthContext)(unsafe.Pointer(pContext)).FpParse != 0 {
(*Parse)(unsafe.Pointer((*AuthContext)(unsafe.Pointer(pContext)).FpParse)).FzAuthContext = (*AuthContext)(unsafe.Pointer(pContext)).FzAuthContext
(*AuthContext)(unsafe.Pointer(pContext)).FpParse = uintptr(0)
@@ -90746,18 +93076,12 @@ func Xsqlite3AuthContextPop(tls *libc.TLS, pContext uintptr) { /* sqlite3.c:1115
// This routine just records the fact that the lock is desired. The
// code to make the lock occur is generated by a later call to
// codeTableLocks() which occurs during sqlite3FinishCoding().
-func Xsqlite3TableLock(tls *libc.TLS, pParse uintptr, iDb int32, iTab Pgno, isWriteLock U8, zName uintptr) { /* sqlite3.c:111628:21: */
+func lockTable(tls *libc.TLS, pParse uintptr, iDb int32, iTab Pgno, isWriteLock U8, zName uintptr) { /* sqlite3.c:112463:29: */
var pToplevel uintptr
var i int32
var nBytes int32
var p uintptr
- if iDb == 1 {
- return
- }
- if !(Xsqlite3BtreeSharable(tls, (*Db)(unsafe.Pointer((*Sqlite3)(unsafe.Pointer((*Parse)(unsafe.Pointer(pParse)).Fdb)).FaDb+uintptr(iDb)*32)).FpBt) != 0) {
- return
- }
pToplevel = func() uintptr {
if (*Parse)(unsafe.Pointer(pParse)).FpToplevel != 0 {
return (*Parse)(unsafe.Pointer(pParse)).FpToplevel
@@ -90786,9 +93110,19 @@ func Xsqlite3TableLock(tls *libc.TLS, pParse uintptr, iDb int32, iTab Pgno, isWr
}
}
+func Xsqlite3TableLock(tls *libc.TLS, pParse uintptr, iDb int32, iTab Pgno, isWriteLock U8, zName uintptr) { /* sqlite3.c:112499:21: */
+ if iDb == 1 {
+ return
+ }
+ if !(Xsqlite3BtreeSharable(tls, (*Db)(unsafe.Pointer((*Sqlite3)(unsafe.Pointer((*Parse)(unsafe.Pointer(pParse)).Fdb)).FaDb+uintptr(iDb)*32)).FpBt) != 0) {
+ return
+ }
+ lockTable(tls, pParse, iDb, iTab, isWriteLock, zName)
+}
+
// Code an OP_TableLock instruction for each table locked by the
// statement (configured by calls to sqlite3TableLock()).
-func codeTableLocks(tls *libc.TLS, pParse uintptr) { /* sqlite3.c:111671:13: */
+func codeTableLocks(tls *libc.TLS, pParse uintptr) { /* sqlite3.c:112515:13: */
var i int32
var pVdbe uintptr = (*Parse)(unsafe.Pointer(pParse)).FpVdbe
@@ -90812,7 +93146,7 @@ func codeTableLocks(tls *libc.TLS, pParse uintptr) { /* sqlite3.c:111671:13: */
//
// Note that if an error occurred, it might be the case that
// no VDBE code was generated.
-func Xsqlite3FinishCoding(tls *libc.TLS, pParse uintptr) { /* sqlite3.c:111710:21: */
+func Xsqlite3FinishCoding(tls *libc.TLS, pParse uintptr) { /* sqlite3.c:112554:21: */
var db uintptr
var v uintptr
@@ -90953,7 +93287,7 @@ func Xsqlite3FinishCoding(tls *libc.TLS, pParse uintptr) { /* sqlite3.c:111710:2
// Not everything is nestable. This facility is designed to permit
// INSERT, UPDATE, and DELETE operations against the schema table. Use
// care if you decide to try to use this routine for some other purposes.
-func Xsqlite3NestedParse(tls *libc.TLS, pParse uintptr, zFormat uintptr, va uintptr) { /* sqlite3.c:111867:21: */
+func Xsqlite3NestedParse(tls *libc.TLS, pParse uintptr, zFormat uintptr, va uintptr) { /* sqlite3.c:112711:21: */
bp := tls.Alloc(160)
defer tls.Free(160)
@@ -90962,7 +93296,7 @@ func Xsqlite3NestedParse(tls *libc.TLS, pParse uintptr, zFormat uintptr, va uint
var zSql uintptr
*(*uintptr)(unsafe.Pointer(bp + 152 /* zErrMsg */)) = uintptr(0)
var db uintptr = (*Parse)(unsafe.Pointer(pParse)).Fdb
- // var saveBuf [152]int8 at bp, 152
+ // var saveBuf [152]uint8 at bp, 152
if (*Parse)(unsafe.Pointer(pParse)).FnErr != 0 {
return
@@ -91001,7 +93335,7 @@ func Xsqlite3NestedParse(tls *libc.TLS, pParse uintptr, zFormat uintptr, va uint
// auxiliary databases added using the ATTACH command.
//
// See also sqlite3LocateTable().
-func Xsqlite3FindTable(tls *libc.TLS, db uintptr, zName uintptr, zDatabase uintptr) uintptr { /* sqlite3.c:111919:22: */
+func Xsqlite3FindTable(tls *libc.TLS, db uintptr, zName uintptr, zDatabase uintptr) uintptr { /* sqlite3.c:112763:22: */
var p uintptr = uintptr(0)
var i int32
@@ -91016,25 +93350,25 @@ func Xsqlite3FindTable(tls *libc.TLS, db uintptr, zName uintptr, zDatabase uintp
if i >= (*Sqlite3)(unsafe.Pointer(db)).FnDb {
// No match against the official names. But always match "main"
// to schema 0 as a legacy fallback.
- if Xsqlite3StrICmp(tls, zDatabase, ts+5327 /* "main" */) == 0 {
+ if Xsqlite3StrICmp(tls, zDatabase, ts+5458 /* "main" */) == 0 {
i = 0
} else {
return uintptr(0)
}
}
p = Xsqlite3HashFind(tls, ((*Db)(unsafe.Pointer((*Sqlite3)(unsafe.Pointer(db)).FaDb+uintptr(i)*32)).FpSchema + 8 /* &.tblHash */), zName)
- if (p == uintptr(0)) && (Xsqlite3_strnicmp(tls, zName, ts+6950 /* "sqlite_" */, 7) == 0) {
+ if (p == uintptr(0)) && (Xsqlite3_strnicmp(tls, zName, ts+7081 /* "sqlite_" */, 7) == 0) {
if i == 1 {
- if ((Xsqlite3StrICmp(tls, (zName+uintptr(7)), (ts+10386 /* "sqlite_temp_sche..." */ +7)) == 0) ||
- (Xsqlite3StrICmp(tls, (zName+uintptr(7)), (ts+10405 /* "sqlite_schema" */ +7)) == 0)) ||
- (Xsqlite3StrICmp(tls, (zName+uintptr(7)), (ts+4825 /* "sqlite_master" */ +7)) == 0) {
+ if ((Xsqlite3StrICmp(tls, (zName+uintptr(7)), (ts+10839 /* "sqlite_temp_sche..." */ +7)) == 0) ||
+ (Xsqlite3StrICmp(tls, (zName+uintptr(7)), (ts+10858 /* "sqlite_schema" */ +7)) == 0)) ||
+ (Xsqlite3StrICmp(tls, (zName+uintptr(7)), (ts+4956 /* "sqlite_master" */ +7)) == 0) {
p = Xsqlite3HashFind(tls, ((*Db)(unsafe.Pointer((*Sqlite3)(unsafe.Pointer(db)).FaDb+1*32)).FpSchema + 8 /* &.tblHash */),
- ts+10419 /* "sqlite_temp_mast..." */)
+ ts+10872 /* "sqlite_temp_mast..." */)
}
} else {
- if Xsqlite3StrICmp(tls, (zName+uintptr(7)), (ts+10405 /* "sqlite_schema" */ +7)) == 0 {
+ if Xsqlite3StrICmp(tls, (zName+uintptr(7)), (ts+10858 /* "sqlite_schema" */ +7)) == 0 {
p = Xsqlite3HashFind(tls, ((*Db)(unsafe.Pointer((*Sqlite3)(unsafe.Pointer(db)).FaDb+uintptr(i)*32)).FpSchema + 8 /* &.tblHash */),
- ts+4825 /* "sqlite_master" */)
+ ts+4956 /* "sqlite_master" */)
}
}
}
@@ -91057,12 +93391,12 @@ func Xsqlite3FindTable(tls *libc.TLS, db uintptr, zName uintptr, zDatabase uintp
break
}
}
- if (p == uintptr(0)) && (Xsqlite3_strnicmp(tls, zName, ts+6950 /* "sqlite_" */, 7) == 0) {
- if Xsqlite3StrICmp(tls, (zName+uintptr(7)), (ts+10405 /* "sqlite_schema" */ +7)) == 0 {
- p = Xsqlite3HashFind(tls, ((*Db)(unsafe.Pointer((*Sqlite3)(unsafe.Pointer(db)).FaDb)).FpSchema + 8 /* &.tblHash */), ts+4825 /* "sqlite_master" */)
- } else if Xsqlite3StrICmp(tls, (zName+uintptr(7)), (ts+10386 /* "sqlite_temp_sche..." */ +7)) == 0 {
+ if (p == uintptr(0)) && (Xsqlite3_strnicmp(tls, zName, ts+7081 /* "sqlite_" */, 7) == 0) {
+ if Xsqlite3StrICmp(tls, (zName+uintptr(7)), (ts+10858 /* "sqlite_schema" */ +7)) == 0 {
+ p = Xsqlite3HashFind(tls, ((*Db)(unsafe.Pointer((*Sqlite3)(unsafe.Pointer(db)).FaDb)).FpSchema + 8 /* &.tblHash */), ts+4956 /* "sqlite_master" */)
+ } else if Xsqlite3StrICmp(tls, (zName+uintptr(7)), (ts+10839 /* "sqlite_temp_sche..." */ +7)) == 0 {
p = Xsqlite3HashFind(tls, ((*Db)(unsafe.Pointer((*Sqlite3)(unsafe.Pointer(db)).FaDb+1*32)).FpSchema + 8 /* &.tblHash */),
- ts+10419 /* "sqlite_temp_mast..." */)
+ ts+10872 /* "sqlite_temp_mast..." */)
}
}
}
@@ -91077,7 +93411,7 @@ func Xsqlite3FindTable(tls *libc.TLS, db uintptr, zName uintptr, zDatabase uintp
// The difference between this routine and sqlite3FindTable() is that this
// routine leaves an error message in pParse->zErrMsg where
// sqlite3FindTable() does not.
-func Xsqlite3LocateTable(tls *libc.TLS, pParse uintptr, flags U32, zName uintptr, zDbase uintptr) uintptr { /* sqlite3.c:111997:22: */
+func Xsqlite3LocateTable(tls *libc.TLS, pParse uintptr, flags U32, zName uintptr, zDbase uintptr) uintptr { /* sqlite3.c:112841:22: */
bp := tls.Alloc(40)
defer tls.Free(40)
@@ -91096,9 +93430,9 @@ func Xsqlite3LocateTable(tls *libc.TLS, pParse uintptr, flags U32, zName uintptr
// If zName is the not the name of a table in the schema created using
// CREATE, then check to see if it is the name of an virtual table that
// can be an eponymous virtual table.
- if int32((*Parse)(unsafe.Pointer(pParse)).FdisableVtab) == 0 {
+ if (int32((*Parse)(unsafe.Pointer(pParse)).FdisableVtab) == 0) && (int32((*Sqlite3)(unsafe.Pointer(db)).Finit.Fbusy) == 0) {
var pMod uintptr = Xsqlite3HashFind(tls, (db + 536 /* &.aModule */), zName)
- if (pMod == uintptr(0)) && (Xsqlite3_strnicmp(tls, zName, ts+10438 /* "pragma_" */, 7) == 0) {
+ if (pMod == uintptr(0)) && (Xsqlite3_strnicmp(tls, zName, ts+10891 /* "pragma_" */, 7) == 0) {
pMod = Xsqlite3PragmaVtabRegister(tls, db, zName)
}
if (pMod != 0) && (Xsqlite3VtabEponymousTableInit(tls, pParse, pMod) != 0) {
@@ -91116,15 +93450,17 @@ func Xsqlite3LocateTable(tls *libc.TLS, pParse uintptr, flags U32, zName uintptr
if p == uintptr(0) {
var zMsg uintptr
if (flags & U32(LOCATE_VIEW)) != 0 {
- zMsg = ts + 10446 /* "no such view" */
+ zMsg = ts + 10899 /* "no such view" */
} else {
- zMsg = ts + 10459 /* "no such table" */
+ zMsg = ts + 10912 /* "no such table" */
}
if zDbase != 0 {
- Xsqlite3ErrorMsg(tls, pParse, ts+5520 /* "%s: %s.%s" */, libc.VaList(bp, zMsg, zDbase, zName))
+ Xsqlite3ErrorMsg(tls, pParse, ts+5651 /* "%s: %s.%s" */, libc.VaList(bp, zMsg, zDbase, zName))
} else {
- Xsqlite3ErrorMsg(tls, pParse, ts+5530 /* "%s: %s" */, libc.VaList(bp+24, zMsg, zName))
+ Xsqlite3ErrorMsg(tls, pParse, ts+5661 /* "%s: %s" */, libc.VaList(bp+24, zMsg, zName))
}
+ } else {
+
}
return p
@@ -91137,7 +93473,7 @@ func Xsqlite3LocateTable(tls *libc.TLS, pParse uintptr, flags U32, zName uintptr
// the search to schema (p->pSchema) if it is not NULL. p->pSchema may be
// non-NULL if it is part of a view or trigger program definition. See
// sqlite3FixSrcList() for details.
-func Xsqlite3LocateTableItem(tls *libc.TLS, pParse uintptr, flags U32, p uintptr) uintptr { /* sqlite3.c:112057:22: */
+func Xsqlite3LocateTableItem(tls *libc.TLS, pParse uintptr, flags U32, p uintptr) uintptr { /* sqlite3.c:112903:22: */
var zDb uintptr
if (*SrcItem)(unsafe.Pointer(p)).FpSchema != 0 {
@@ -91159,7 +93495,7 @@ func Xsqlite3LocateTableItem(tls *libc.TLS, pParse uintptr, flags U32, p uintptr
// for duplicate index names is done.) The search order is
// TEMP first, then MAIN, then any auxiliary databases added
// using the ATTACH command.
-func Xsqlite3FindIndex(tls *libc.TLS, db uintptr, zName uintptr, zDb uintptr) uintptr { /* sqlite3.c:112085:22: */
+func Xsqlite3FindIndex(tls *libc.TLS, db uintptr, zName uintptr, zDb uintptr) uintptr { /* sqlite3.c:112931:22: */
var p uintptr = uintptr(0)
var i int32
// All mutexes are required for schema access. Make sure we hold them.
@@ -91186,12 +93522,12 @@ func Xsqlite3FindIndex(tls *libc.TLS, db uintptr, zName uintptr, zDb uintptr) ui
}
// Reclaim the memory used by an index
-func Xsqlite3FreeIndex(tls *libc.TLS, db uintptr, p uintptr) { /* sqlite3.c:112105:21: */
+func Xsqlite3FreeIndex(tls *libc.TLS, db uintptr, p uintptr) { /* sqlite3.c:112951:21: */
Xsqlite3DeleteIndexSamples(tls, db, p)
Xsqlite3ExprDelete(tls, db, (*Index)(unsafe.Pointer(p)).FpPartIdxWhere)
Xsqlite3ExprListDelete(tls, db, (*Index)(unsafe.Pointer(p)).FaColExpr)
Xsqlite3DbFree(tls, db, (*Index)(unsafe.Pointer(p)).FzColAff)
- if (uint32(int32(*(*uint16)(unsafe.Pointer(p + 100 /* &.isResized */)) >> 11 & 0x1))) != 0 {
+ if (uint32(int32(*(*uint16)(unsafe.Pointer(p + 100 /* &.isResized */)) & 0x800 >> 11))) != 0 {
Xsqlite3DbFree(tls, db, (*Index)(unsafe.Pointer(p)).FazColl)
}
Xsqlite3_free(tls, (*Index)(unsafe.Pointer(p)).FaiRowEst)
@@ -91202,7 +93538,7 @@ func Xsqlite3FreeIndex(tls *libc.TLS, db uintptr, p uintptr) { /* sqlite3.c:1121
// unlike that index from its Table then remove the index from
// the index hash table and free all memory structures associated
// with the index.
-func Xsqlite3UnlinkAndDeleteIndex(tls *libc.TLS, db uintptr, iDb int32, zIdxName uintptr) { /* sqlite3.c:112125:21: */
+func Xsqlite3UnlinkAndDeleteIndex(tls *libc.TLS, db uintptr, iDb int32, zIdxName uintptr) { /* sqlite3.c:112971:21: */
var pIndex uintptr
var pHash uintptr
@@ -91234,7 +93570,7 @@ func Xsqlite3UnlinkAndDeleteIndex(tls *libc.TLS, db uintptr, iDb int32, zIdxName
//
// Entry 0 (the "main" database) and entry 1 (the "temp" database)
// are never candidates for being collapsed.
-func Xsqlite3CollapseDatabaseArray(tls *libc.TLS, db uintptr) { /* sqlite3.c:112158:21: */
+func Xsqlite3CollapseDatabaseArray(tls *libc.TLS, db uintptr) { /* sqlite3.c:113004:21: */
var i int32
var j int32
for i = libc.AssignInt32(&j, 2); i < (*Sqlite3)(unsafe.Pointer(db)).FnDb; i++ {
@@ -91260,7 +93596,7 @@ func Xsqlite3CollapseDatabaseArray(tls *libc.TLS, db uintptr) { /* sqlite3.c:112
// Reset the schema for the database at index iDb. Also reset the
// TEMP schema. The reset is deferred if db->nSchemaLock is not zero.
// Deferred resets may be run by calling with iDb<0.
-func Xsqlite3ResetOneSchema(tls *libc.TLS, db uintptr, iDb int32) { /* sqlite3.c:112185:21: */
+func Xsqlite3ResetOneSchema(tls *libc.TLS, db uintptr, iDb int32) { /* sqlite3.c:113031:21: */
var i int32
if iDb >= 0 {
@@ -91281,7 +93617,7 @@ func Xsqlite3ResetOneSchema(tls *libc.TLS, db uintptr, iDb int32) { /* sqlite3.c
// Erase all schema information from all attached databases (including
// "main" and "temp") for a single database connection.
-func Xsqlite3ResetAllSchemasOfConnection(tls *libc.TLS, db uintptr) { /* sqlite3.c:112209:21: */
+func Xsqlite3ResetAllSchemasOfConnection(tls *libc.TLS, db uintptr) { /* sqlite3.c:113055:21: */
var i int32
Xsqlite3BtreeEnterAll(tls, db)
for i = 0; i < (*Sqlite3)(unsafe.Pointer(db)).FnDb; i++ {
@@ -91303,13 +93639,13 @@ func Xsqlite3ResetAllSchemasOfConnection(tls *libc.TLS, db uintptr) { /* sqlite3
}
// This routine is called when a commit occurs.
-func Xsqlite3CommitInternalChanges(tls *libc.TLS, db uintptr) { /* sqlite3.c:112233:21: */
+func Xsqlite3CommitInternalChanges(tls *libc.TLS, db uintptr) { /* sqlite3.c:113079:21: */
*(*U32)(unsafe.Pointer(db + 44 /* &.mDbFlags */)) &= (libc.Uint32FromInt32(libc.CplInt32(DBFLAG_SchemaChange)))
}
// Delete memory allocated for the column names of a table or view (the
// Table.aCol[] array).
-func Xsqlite3DeleteColumnNames(tls *libc.TLS, db uintptr, pTable uintptr) { /* sqlite3.c:112241:21: */
+func Xsqlite3DeleteColumnNames(tls *libc.TLS, db uintptr, pTable uintptr) { /* sqlite3.c:113087:21: */
var i int32
var pCol uintptr
@@ -91351,7 +93687,7 @@ func Xsqlite3DeleteColumnNames(tls *libc.TLS, db uintptr, pTable uintptr) { /* s
// lookaside memory, but some ephemeral Table objects do.) Or the
// db parameter can be used with db->pnBytesFreed to measure the memory
// used by the Table object.
-func deleteTable(tls *libc.TLS, db uintptr, pTable uintptr) { /* sqlite3.c:112271:29: */
+func deleteTable(tls *libc.TLS, db uintptr, pTable uintptr) { /* sqlite3.c:113117:29: */
var pIndex uintptr
var pNext uintptr
@@ -91384,7 +93720,7 @@ func deleteTable(tls *libc.TLS, db uintptr, pTable uintptr) { /* sqlite3.c:11227
}
-func Xsqlite3DeleteTable(tls *libc.TLS, db uintptr, pTable uintptr) { /* sqlite3.c:112322:21: */
+func Xsqlite3DeleteTable(tls *libc.TLS, db uintptr, pTable uintptr) { /* sqlite3.c:113168:21: */
// Do not delete the table until the reference count reaches zero.
if !(pTable != 0) {
return
@@ -91397,7 +93733,7 @@ func Xsqlite3DeleteTable(tls *libc.TLS, db uintptr, pTable uintptr) { /* sqlite3
// Unlink the given table from the hash tables and the delete the
// table structure with all its indices and foreign keys.
-func Xsqlite3UnlinkAndDeleteTable(tls *libc.TLS, db uintptr, iDb int32, zTabName uintptr) { /* sqlite3.c:112334:21: */
+func Xsqlite3UnlinkAndDeleteTable(tls *libc.TLS, db uintptr, iDb int32, zTabName uintptr) { /* sqlite3.c:113180:21: */
var p uintptr
var pDb uintptr
@@ -91419,7 +93755,7 @@ func Xsqlite3UnlinkAndDeleteTable(tls *libc.TLS, db uintptr, iDb int32, zTabName
// Tokens are often just pointers into the original SQL text and so
// are not \000 terminated and are not persistent. The returned string
// is \000 terminated and is persistent.
-func Xsqlite3NameFromToken(tls *libc.TLS, db uintptr, pName uintptr) uintptr { /* sqlite3.c:112362:21: */
+func Xsqlite3NameFromToken(tls *libc.TLS, db uintptr, pName uintptr) uintptr { /* sqlite3.c:113208:21: */
var zName uintptr
if pName != 0 {
zName = Xsqlite3DbStrNDup(tls, db, (*Token)(unsafe.Pointer(pName)).Fz, uint64((*Token)(unsafe.Pointer(pName)).Fn))
@@ -91432,9 +93768,9 @@ func Xsqlite3NameFromToken(tls *libc.TLS, db uintptr, pName uintptr) uintptr { /
// Open the sqlite_schema table stored in database number iDb for
// writing. The table is opened using cursor 0.
-func Xsqlite3OpenSchemaTable(tls *libc.TLS, p uintptr, iDb int32) { /* sqlite3.c:112377:21: */
+func Xsqlite3OpenSchemaTable(tls *libc.TLS, p uintptr, iDb int32) { /* sqlite3.c:113223:21: */
var v uintptr = Xsqlite3GetVdbe(tls, p)
- Xsqlite3TableLock(tls, p, iDb, uint32(SCHEMA_ROOT), uint8(1), ts+4825 /* "sqlite_master" */)
+ Xsqlite3TableLock(tls, p, iDb, uint32(SCHEMA_ROOT), uint8(1), ts+4956 /* "sqlite_master" */)
Xsqlite3VdbeAddOp4Int(tls, v, OP_OpenWrite, 0, SCHEMA_ROOT, iDb, 5)
if (*Parse)(unsafe.Pointer(p)).FnTab == 0 {
(*Parse)(unsafe.Pointer(p)).FnTab = 1
@@ -91445,7 +93781,7 @@ func Xsqlite3OpenSchemaTable(tls *libc.TLS, p uintptr, iDb int32) { /* sqlite3.c
// of a database ("main", "temp" or the name of an attached db). This
// function returns the index of the named database in db->aDb[], or
// -1 if the named db cannot be found.
-func Xsqlite3FindDbName(tls *libc.TLS, db uintptr, zName uintptr) int32 { /* sqlite3.c:112392:20: */
+func Xsqlite3FindDbName(tls *libc.TLS, db uintptr, zName uintptr) int32 { /* sqlite3.c:113238:20: */
var i int32 = -1 // Database number
if zName != 0 {
var pDb uintptr
@@ -91461,7 +93797,7 @@ func Xsqlite3FindDbName(tls *libc.TLS, db uintptr, zName uintptr) int32 { /* sql
}
// "main" is always an acceptable alias for the primary database
// even if it has been renamed using SQLITE_DBCONFIG_MAINDBNAME.
- if (i == 0) && (0 == Xsqlite3_stricmp(tls, ts+5327 /* "main" */, zName)) {
+ if (i == 0) && (0 == Xsqlite3_stricmp(tls, ts+5458 /* "main" */, zName)) {
goto __3
}
@@ -91481,7 +93817,7 @@ func Xsqlite3FindDbName(tls *libc.TLS, db uintptr, zName uintptr) int32 { /* sql
// "temp" or the name of an attached db). This routine returns the
// index of the named database in db->aDb[], or -1 if the named db
// does not exist.
-func Xsqlite3FindDb(tls *libc.TLS, db uintptr, pName uintptr) int32 { /* sqlite3.c:112412:20: */
+func Xsqlite3FindDb(tls *libc.TLS, db uintptr, pName uintptr) int32 { /* sqlite3.c:113258:20: */
var i int32 // Database number
var zName uintptr // Name we are searching for
zName = Xsqlite3NameFromToken(tls, db, pName)
@@ -91505,7 +93841,7 @@ func Xsqlite3FindDb(tls *libc.TLS, db uintptr, pName uintptr) int32 { /* sqlite3
// This routine sets the *ppUnqual pointer to point at the token (pName1 or
// pName2) that stores the unqualified table name. The index of the
// database "xxx" is returned.
-func Xsqlite3TwoPartName(tls *libc.TLS, pParse uintptr, pName1 uintptr, pName2 uintptr, pUnqual uintptr) int32 { /* sqlite3.c:112437:20: */
+func Xsqlite3TwoPartName(tls *libc.TLS, pParse uintptr, pName1 uintptr, pName2 uintptr, pUnqual uintptr) int32 { /* sqlite3.c:113283:20: */
bp := tls.Alloc(8)
defer tls.Free(8)
@@ -91514,13 +93850,13 @@ func Xsqlite3TwoPartName(tls *libc.TLS, pParse uintptr, pName1 uintptr, pName2 u
if (*Token)(unsafe.Pointer(pName2)).Fn > uint32(0) {
if (*Sqlite3)(unsafe.Pointer(db)).Finit.Fbusy != 0 {
- Xsqlite3ErrorMsg(tls, pParse, ts+10473 /* "corrupt database" */, 0)
+ Xsqlite3ErrorMsg(tls, pParse, ts+10926 /* "corrupt database" */, 0)
return -1
}
*(*uintptr)(unsafe.Pointer(pUnqual)) = pName2
iDb = Xsqlite3FindDb(tls, db, pName1)
if iDb < 0 {
- Xsqlite3ErrorMsg(tls, pParse, ts+10490 /* "unknown database..." */, libc.VaList(bp, pName1))
+ Xsqlite3ErrorMsg(tls, pParse, ts+10943 /* "unknown database..." */, libc.VaList(bp, pName1))
return -1
}
} else {
@@ -91532,7 +93868,7 @@ func Xsqlite3TwoPartName(tls *libc.TLS, pParse uintptr, pName1 uintptr, pName2 u
}
// True if PRAGMA writable_schema is ON
-func Xsqlite3WritableSchema(tls *libc.TLS, db uintptr) int32 { /* sqlite3.c:112470:20: */
+func Xsqlite3WritableSchema(tls *libc.TLS, db uintptr) int32 { /* sqlite3.c:113316:20: */
return (libc.Bool32(((*Sqlite3)(unsafe.Pointer(db)).Fflags & (uint64(SQLITE_WriteSchema | SQLITE_Defensive))) == uint64(SQLITE_WriteSchema)))
}
@@ -91546,13 +93882,13 @@ func Xsqlite3WritableSchema(tls *libc.TLS, db uintptr) int32 { /* sqlite3.c:1124
// When parsing the sqlite_schema table, this routine also checks to
// make sure the "type", "name", and "tbl_name" columns are consistent
// with the SQL.
-func Xsqlite3CheckObjectName(tls *libc.TLS, pParse uintptr, zName uintptr, zType uintptr, zTblName uintptr) int32 { /* sqlite3.c:112492:20: */
+func Xsqlite3CheckObjectName(tls *libc.TLS, pParse uintptr, zName uintptr, zType uintptr, zTblName uintptr) int32 { /* sqlite3.c:113338:20: */
bp := tls.Alloc(8)
defer tls.Free(8)
var db uintptr = (*Parse)(unsafe.Pointer(pParse)).Fdb
if ((Xsqlite3WritableSchema(tls, db) != 0) ||
- ((uint32(int32(*(*uint8)(unsafe.Pointer((db + 184 /* &.init */) + 8 /* &.imposterTable */)) >> 6 & 0x1))) != 0)) ||
+ ((uint32(int32(*(*uint8)(unsafe.Pointer((db + 184 /* &.init */) + 8 /* &.imposterTable */)) & 0x40 >> 6))) != 0)) ||
!(int32(Xsqlite3Config.FbExtraSchemaChecks) != 0) {
// Skip these error checks for writable_schema=ON
return SQLITE_OK
@@ -91561,13 +93897,13 @@ func Xsqlite3CheckObjectName(tls *libc.TLS, pParse uintptr, zName uintptr, zType
if ((Xsqlite3_stricmp(tls, zType, *(*uintptr)(unsafe.Pointer((*Sqlite3)(unsafe.Pointer(db)).Finit.FazInit))) != 0) ||
(Xsqlite3_stricmp(tls, zName, *(*uintptr)(unsafe.Pointer((*Sqlite3)(unsafe.Pointer(db)).Finit.FazInit + 1*8))) != 0)) ||
(Xsqlite3_stricmp(tls, zTblName, *(*uintptr)(unsafe.Pointer((*Sqlite3)(unsafe.Pointer(db)).Finit.FazInit + 2*8))) != 0) {
- Xsqlite3ErrorMsg(tls, pParse, ts+703 /* "" */, 0) // corruptSchema() will supply the error
+ Xsqlite3ErrorMsg(tls, pParse, ts+755 /* "" */, 0) // corruptSchema() will supply the error
return SQLITE_ERROR
}
} else {
- if ((int32((*Parse)(unsafe.Pointer(pParse)).Fnested) == 0) && (0 == Xsqlite3_strnicmp(tls, zName, ts+6950 /* "sqlite_" */, 7))) ||
+ if ((int32((*Parse)(unsafe.Pointer(pParse)).Fnested) == 0) && (0 == Xsqlite3_strnicmp(tls, zName, ts+7081 /* "sqlite_" */, 7))) ||
((Xsqlite3ReadOnlyShadowTables(tls, db) != 0) && (Xsqlite3ShadowTableName(tls, db, zName) != 0)) {
- Xsqlite3ErrorMsg(tls, pParse, ts+10510, /* "object name rese..." */
+ Xsqlite3ErrorMsg(tls, pParse, ts+10963, /* "object name rese..." */
libc.VaList(bp, zName))
return SQLITE_ERROR
}
@@ -91577,9 +93913,9 @@ func Xsqlite3CheckObjectName(tls *libc.TLS, pParse uintptr, zName uintptr, zType
}
// Return the PRIMARY KEY index of a table
-func Xsqlite3PrimaryKeyIndex(tls *libc.TLS, pTab uintptr) uintptr { /* sqlite3.c:112530:22: */
+func Xsqlite3PrimaryKeyIndex(tls *libc.TLS, pTab uintptr) uintptr { /* sqlite3.c:113376:22: */
var p uintptr
- for p = (*Table)(unsafe.Pointer(pTab)).FpIndex; (p != 0) && !((int32(*(*uint16)(unsafe.Pointer((p) + 100 /* &.idxType */)) >> 14 & 0x3)) == SQLITE_IDXTYPE_PRIMARYKEY); p = (*Index)(unsafe.Pointer(p)).FpNext {
+ for p = (*Table)(unsafe.Pointer(pTab)).FpIndex; (p != 0) && !((int32(*(*uint16)(unsafe.Pointer((p) + 100 /* &.idxType */)) & 0xc000 >> 14)) == SQLITE_IDXTYPE_PRIMARYKEY); p = (*Index)(unsafe.Pointer(p)).FpNext {
}
return p
}
@@ -91588,7 +93924,7 @@ func Xsqlite3PrimaryKeyIndex(tls *libc.TLS, pTab uintptr) uintptr { /* sqlite3.c
// for the column iCol in the table (as defined by the CREATE TABLE statement)
// find the (first) offset of that column in index pIdx. Or return -1
// if column iCol is not used in index pIdx.
-func Xsqlite3TableColumnToIndex(tls *libc.TLS, pIdx uintptr, iCol I16) I16 { /* sqlite3.c:112542:20: */
+func Xsqlite3TableColumnToIndex(tls *libc.TLS, pIdx uintptr, iCol I16) I16 { /* sqlite3.c:113388:20: */
var i int32
for i = 0; i < int32((*Index)(unsafe.Pointer(pIdx)).FnColumn); i++ {
if int32(iCol) == int32(*(*I16)(unsafe.Pointer((*Index)(unsafe.Pointer(pIdx)).FaiColumn + uintptr(i)*2))) {
@@ -91608,7 +93944,7 @@ func Xsqlite3TableColumnToIndex(tls *libc.TLS, pIdx uintptr, iCol I16) I16 { /*
// and only there are VIRTUAL columns to the left.
//
// If SQLITE_OMIT_GENERATED_COLUMNS, this routine is a no-op macro.
-func Xsqlite3StorageColumnToTable(tls *libc.TLS, pTab uintptr, iCol I16) I16 { /* sqlite3.c:112562:20: */
+func Xsqlite3StorageColumnToTable(tls *libc.TLS, pTab uintptr, iCol I16) I16 { /* sqlite3.c:113408:20: */
if ((*Table)(unsafe.Pointer(pTab)).FtabFlags & U32(TF_HasVirtual)) != 0 {
var i int32
for i = 0; i <= int32(iCol); i++ {
@@ -91655,7 +93991,7 @@ func Xsqlite3StorageColumnToTable(tls *libc.TLS, pTab uintptr, iCol I16) I16 { /
// this routine is a no-op macro. If the pTab does not have any virtual
// columns, then this routine is no-op that always return iCol. If iCol
// is negative (indicating the ROWID column) then this routine return iCol.
-func Xsqlite3TableColumnToStorage(tls *libc.TLS, pTab uintptr, iCol I16) I16 { /* sqlite3.c:112610:20: */
+func Xsqlite3TableColumnToStorage(tls *libc.TLS, pTab uintptr, iCol I16) I16 { /* sqlite3.c:113456:20: */
var i int32
var n I16
@@ -91679,6 +94015,21 @@ func Xsqlite3TableColumnToStorage(tls *libc.TLS, pTab uintptr, iCol I16) I16 { /
return I16(0)
}
+// Insert a single OP_JournalMode query opcode in order to force the
+// prepared statement to return false for sqlite3_stmt_readonly(). This
+// is used by CREATE TABLE IF NOT EXISTS and similar if the table already
+// exists, so that the prepared statement for CREATE TABLE IF NOT EXISTS
+// will return false for sqlite3_stmt_readonly() even if that statement
+// is a read-only no-op.
+func sqlite3ForceNotReadOnly(tls *libc.TLS, pParse uintptr) { /* sqlite3.c:113482:13: */
+ var iReg int32 = libc.PreIncInt32(&(*Parse)(unsafe.Pointer(pParse)).FnMem, 1)
+ var v uintptr = Xsqlite3GetVdbe(tls, pParse)
+ if v != 0 {
+ Xsqlite3VdbeAddOp3(tls, v, OP_JournalMode, 0, iReg, -1)
+ Xsqlite3VdbeUsesBtree(tls, v, 0)
+ }
+}
+
// Begin constructing a new table representation in memory. This is
// the first of several action routines that get called in response
// to a CREATE TABLE statement. In particular, this routine is called
@@ -91693,7 +94044,7 @@ func Xsqlite3TableColumnToStorage(tls *libc.TLS, pTab uintptr, iCol I16) I16 { /
// routines will be called to add more information to this record.
// At the end of the CREATE TABLE statement, the sqlite3EndTable() routine
// is called to complete the construction of the new table record.
-func Xsqlite3StartTable(tls *libc.TLS, pParse uintptr, pName1 uintptr, pName2 uintptr, isTemp int32, isView int32, isVirtual int32, noErr int32) { /* sqlite3.c:112644:21: */
+func Xsqlite3StartTable(tls *libc.TLS, pParse uintptr, pName1 uintptr, pName2 uintptr, isTemp int32, isView int32, isVirtual int32, noErr int32) { /* sqlite3.c:113507:21: */
bp := tls.Alloc(24)
defer tls.Free(24)
@@ -91721,9 +94072,9 @@ func Xsqlite3StartTable(tls *libc.TLS, pParse uintptr, pName1 uintptr, pName2 ui
iDb = int32((*Sqlite3)(unsafe.Pointer(db)).Finit.FiDb)
zName = Xsqlite3DbStrDup(tls, db, func() uintptr {
if (!(0 != 0)) && (iDb == 1) {
- return ts + 10419 /* "sqlite_temp_mast..." */
+ return ts + 10872 /* "sqlite_temp_mast..." */
}
- return ts + 4825 /* "sqlite_master" */
+ return ts + 4956 /* "sqlite_master" */
}())
*(*uintptr)(unsafe.Pointer(bp + 16 /* pName */)) = pName1
goto __2
@@ -91741,7 +94092,7 @@ __3:
}
// If creating a temp table, the name may not be qualified. Unless
// the database name is "temp" anyway.
- Xsqlite3ErrorMsg(tls, pParse, ts+10552 /* "temporary table ..." */, 0)
+ Xsqlite3ErrorMsg(tls, pParse, ts+11005 /* "temporary table ..." */, 0)
return
__4:
;
@@ -91769,9 +94120,9 @@ __7:
;
if !(Xsqlite3CheckObjectName(tls, pParse, zName, func() uintptr {
if isView != 0 {
- return ts + 8778 /* "view" */
+ return ts + 9208 /* "view" */
}
- return ts + 7394 /* "table" */
+ return ts + 7823 /* "table" */
}(), zName) != 0) {
goto __8
}
@@ -91788,9 +94139,9 @@ __9:
zDb = (*Db)(unsafe.Pointer((*Sqlite3)(unsafe.Pointer(db)).FaDb + uintptr(iDb)*32)).FzDbSName
if !(Xsqlite3AuthCheck(tls, pParse, SQLITE_INSERT, func() uintptr {
if (!(0 != 0)) && (isTemp == 1) {
- return ts + 10419 /* "sqlite_temp_mast..." */
+ return ts + 10872 /* "sqlite_temp_mast..." */
}
- return ts + 4825 /* "sqlite_master" */
+ return ts + 4956 /* "sqlite_master" */
}(), uintptr(0), zDb) != 0) {
goto __10
}
@@ -91828,11 +94179,12 @@ __13:
if !(!(noErr != 0)) {
goto __15
}
- Xsqlite3ErrorMsg(tls, pParse, ts+10593 /* "table %T already..." */, libc.VaList(bp, *(*uintptr)(unsafe.Pointer(bp + 16 /* pName */))))
+ Xsqlite3ErrorMsg(tls, pParse, ts+11046 /* "table %T already..." */, libc.VaList(bp, *(*uintptr)(unsafe.Pointer(bp + 16 /* pName */))))
goto __16
__15:
;
Xsqlite3CodeVerifySchema(tls, pParse, iDb)
+ sqlite3ForceNotReadOnly(tls, pParse)
__16:
;
goto begin_table_error
@@ -91841,7 +94193,7 @@ __14:
if !(Xsqlite3FindIndex(tls, db, zName, zDb1) != uintptr(0)) {
goto __17
}
- Xsqlite3ErrorMsg(tls, pParse, ts+10617 /* "there is already..." */, libc.VaList(bp+8, zName))
+ Xsqlite3ErrorMsg(tls, pParse, ts+11070 /* "there is already..." */, libc.VaList(bp+8, zName))
goto begin_table_error
__17:
;
@@ -91866,17 +94218,6 @@ __18:
(*Parse)(unsafe.Pointer(pParse)).FpNewTable = pTable
- // 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 !(!(int32((*Parse)(unsafe.Pointer(pParse)).Fnested) != 0) && (libc.Xstrcmp(tls, zName, ts+7916 /* "sqlite_sequence" */) == 0)) {
- goto __19
- }
-
- (*Schema)(unsafe.Pointer((*Table)(unsafe.Pointer(pTable)).FpSchema)).FpSeqTab = pTable
-__19:
- ;
-
// Begin generating the code that will insert the table record into
// the schema table. Note in particular that we must go ahead
// and allocate the record number for the table entry now. Before any
@@ -91885,15 +94226,15 @@ __19:
// indices. Hence, the record number for the table must be allocated
// now.
if !(!(int32((*Sqlite3)(unsafe.Pointer(db)).Finit.Fbusy) != 0) && ((libc.AssignUintptr(&v, Xsqlite3GetVdbe(tls, pParse))) != uintptr(0))) {
- goto __20
+ goto __19
}
Xsqlite3BeginWriteOperation(tls, pParse, 1, iDb)
if !(isVirtual != 0) {
- goto __21
+ goto __20
}
Xsqlite3VdbeAddOp0(tls, v, OP_VBegin)
-__21:
+__20:
;
// If the file format and encoding in the database have not been set,
@@ -91922,14 +94263,14 @@ __21:
// The rowid and root page number values are needed by the code that
// sqlite3EndTable will generate.
if !((isView != 0) || (isVirtual != 0)) {
- goto __22
+ goto __21
}
Xsqlite3VdbeAddOp2(tls, v, OP_Integer, 0, reg2)
- goto __23
-__22:
+ goto __22
+__21:
;
*(*int32)(unsafe.Pointer(pParse + 184 /* &.u1 */)) = Xsqlite3VdbeAddOp3(tls, v, OP_CreateBtree, iDb, reg2, BTREE_INTKEY)
-__23:
+__22:
;
Xsqlite3OpenSchemaTable(tls, pParse, iDb)
Xsqlite3VdbeAddOp2(tls, v, OP_NewRowid, 0, reg1)
@@ -91937,7 +94278,7 @@ __23:
Xsqlite3VdbeAddOp3(tls, v, OP_Insert, 0, reg3, reg1)
Xsqlite3VdbeChangeP5(tls, v, uint16(OPFLAG_APPEND))
Xsqlite3VdbeAddOp0(tls, v, OP_Close)
-__20:
+__19:
;
// Normal (non-error) return.
@@ -91954,8 +94295,8 @@ var aCode = [4]U8{
U8(SQLITE_CREATE_TEMP_TABLE),
U8(SQLITE_CREATE_VIEW),
U8(SQLITE_CREATE_TEMP_VIEW),
-} /* sqlite3.c:112691:21 */
-var nullRow = [6]int8{int8(6), int8(0), int8(0), int8(0), int8(0), int8(0)} /* sqlite3.c:112779:23 */
+} /* sqlite3.c:113554:21 */
+var nullRow = [6]uint8{uint8(6), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0)} /* sqlite3.c:113632:23 */
// Set properties of a table column based on the (magical)
// name of the column.
@@ -91965,10 +94306,10 @@ var nullRow = [6]int8{int8(6), int8(0), int8(0), int8(0), int8(0), int8(0)} /* s
// with any application-generated triggers.
// Clean up the data structures associated with the RETURNING clause.
-func sqlite3DeleteReturning(tls *libc.TLS, db uintptr, pRet uintptr) { /* sqlite3.c:112863:13: */
+func sqlite3DeleteReturning(tls *libc.TLS, db uintptr, pRet uintptr) { /* sqlite3.c:113716:13: */
var pHash uintptr
pHash = ((*Db)(unsafe.Pointer((*Sqlite3)(unsafe.Pointer(db)).FaDb+1*32)).FpSchema + 56 /* &.trigHash */)
- Xsqlite3HashInsert(tls, pHash, ts+10652 /* "sqlite_returning" */, uintptr(0))
+ Xsqlite3HashInsert(tls, pHash, ts+11105 /* "sqlite_returning" */, uintptr(0))
Xsqlite3ExprListDelete(tls, db, (*Returning)(unsafe.Pointer(pRet)).FpReturnEL)
Xsqlite3DbFree(tls, db, pRet)
}
@@ -91987,12 +94328,12 @@ func sqlite3DeleteReturning(tls *libc.TLS, db uintptr, pRet uintptr) { /* sqlite
// is attached to a DELETE, INSERT, or UPDATE, so construct it as a
// RETURNING trigger instead. It will then be converted into the appropriate
// type on the first call to sqlite3TriggersExist().
-func Xsqlite3AddReturning(tls *libc.TLS, pParse uintptr, pList uintptr) { /* sqlite3.c:112887:21: */
+func Xsqlite3AddReturning(tls *libc.TLS, pParse uintptr, pList uintptr) { /* sqlite3.c:113740:21: */
var pRet uintptr
var pHash uintptr
var db uintptr = (*Parse)(unsafe.Pointer(pParse)).Fdb
if (*Parse)(unsafe.Pointer(pParse)).FpNewTrigger != 0 {
- Xsqlite3ErrorMsg(tls, pParse, ts+10669 /* "cannot use RETUR..." */, 0)
+ Xsqlite3ErrorMsg(tls, pParse, ts+11122 /* "cannot use RETUR..." */, 0)
} else {
}
@@ -92013,18 +94354,19 @@ func Xsqlite3AddReturning(tls *libc.TLS, pParse uintptr, pList uintptr) { /* sql
if (*Sqlite3)(unsafe.Pointer(db)).FmallocFailed != 0 {
return
}
- (*Returning)(unsafe.Pointer(pRet)).FretTrig.FzName = ts + 10652 /* "sqlite_returning" */
+ (*Returning)(unsafe.Pointer(pRet)).FretTrig.FzName = ts + 11105 /* "sqlite_returning" */
(*Returning)(unsafe.Pointer(pRet)).FretTrig.Fop = U8(TK_RETURNING)
(*Returning)(unsafe.Pointer(pRet)).FretTrig.Ftr_tm = U8(TRIGGER_AFTER)
(*Returning)(unsafe.Pointer(pRet)).FretTrig.FbReturning = U8(1)
(*Returning)(unsafe.Pointer(pRet)).FretTrig.FpSchema = (*Db)(unsafe.Pointer((*Sqlite3)(unsafe.Pointer(db)).FaDb + 1*32)).FpSchema
+ (*Returning)(unsafe.Pointer(pRet)).FretTrig.FpTabSchema = (*Db)(unsafe.Pointer((*Sqlite3)(unsafe.Pointer(db)).FaDb + 1*32)).FpSchema
(*Returning)(unsafe.Pointer(pRet)).FretTrig.Fstep_list = (pRet + 88 /* &.retTStep */)
(*Returning)(unsafe.Pointer(pRet)).FretTStep.Fop = U8(TK_RETURNING)
(*Returning)(unsafe.Pointer(pRet)).FretTStep.FpTrig = (pRet + 16 /* &.retTrig */)
(*Returning)(unsafe.Pointer(pRet)).FretTStep.FpExprList = pList
pHash = ((*Db)(unsafe.Pointer((*Sqlite3)(unsafe.Pointer(db)).FaDb+1*32)).FpSchema + 56 /* &.trigHash */)
- if Xsqlite3HashInsert(tls, pHash, ts+10652 /* "sqlite_returning" */, (pRet+16 /* &.retTrig */)) ==
+ if Xsqlite3HashInsert(tls, pHash, ts+11105 /* "sqlite_returning" */, (pRet+16 /* &.retTrig */)) ==
(pRet + 16 /* &.retTrig */) {
Xsqlite3OomFault(tls, db)
}
@@ -92036,7 +94378,7 @@ func Xsqlite3AddReturning(tls *libc.TLS, pParse uintptr, pList uintptr) { /* sql
// in a CREATE TABLE statement. sqlite3StartTable() gets called
// first to get things going. Then this routine is called for each
// column.
-func Xsqlite3AddColumn(tls *libc.TLS, pParse uintptr, pName uintptr, pType uintptr) { /* sqlite3.c:112934:21: */
+func Xsqlite3AddColumn(tls *libc.TLS, pParse uintptr, pName uintptr, pType uintptr) { /* sqlite3.c:113788:21: */
bp := tls.Alloc(16)
defer tls.Free(16)
@@ -92052,7 +94394,7 @@ func Xsqlite3AddColumn(tls *libc.TLS, pParse uintptr, pName uintptr, pType uintp
return
}
if (int32((*Table)(unsafe.Pointer(p)).FnCol) + 1) > *(*int32)(unsafe.Pointer((db + 128 /* &.aLimit */) + 2*4)) {
- Xsqlite3ErrorMsg(tls, pParse, ts+10703 /* "too many columns..." */, libc.VaList(bp, (*Table)(unsafe.Pointer(p)).FzName))
+ Xsqlite3ErrorMsg(tls, pParse, ts+11156 /* "too many columns..." */, libc.VaList(bp, (*Table)(unsafe.Pointer(p)).FzName))
return
}
z = Xsqlite3DbMallocRaw(tls, db, (uint64(((*Token)(unsafe.Pointer(pName)).Fn + (*Token)(unsafe.Pointer(pType)).Fn) + uint32(2))))
@@ -92063,12 +94405,12 @@ func Xsqlite3AddColumn(tls *libc.TLS, pParse uintptr, pName uintptr, pType uintp
Xsqlite3RenameTokenMap(tls, pParse, z, pName)
}
libc.Xmemcpy(tls, z, (*Token)(unsafe.Pointer(pName)).Fz, uint64((*Token)(unsafe.Pointer(pName)).Fn))
- *(*int8)(unsafe.Pointer(z + uintptr((*Token)(unsafe.Pointer(pName)).Fn))) = int8(0)
+ *(*uint8)(unsafe.Pointer(z + uintptr((*Token)(unsafe.Pointer(pName)).Fn))) = uint8(0)
Xsqlite3Dequote(tls, z)
hName = Xsqlite3StrIHash(tls, z)
for i = 0; i < int32((*Table)(unsafe.Pointer(p)).FnCol); i++ {
if (int32((*Column)(unsafe.Pointer((*Table)(unsafe.Pointer(p)).FaCol+uintptr(i)*32)).FhName) == int32(hName)) && (Xsqlite3StrICmp(tls, z, (*Column)(unsafe.Pointer((*Table)(unsafe.Pointer(p)).FaCol+uintptr(i)*32)).FzName) == 0) {
- Xsqlite3ErrorMsg(tls, pParse, ts+10726 /* "duplicate column..." */, libc.VaList(bp+8, z))
+ Xsqlite3ErrorMsg(tls, pParse, ts+11179 /* "duplicate column..." */, libc.VaList(bp+8, z))
Xsqlite3DbFree(tls, db, z)
return
}
@@ -92090,12 +94432,12 @@ func Xsqlite3AddColumn(tls *libc.TLS, pParse uintptr, pName uintptr, pType uintp
if (*Token)(unsafe.Pointer(pType)).Fn == uint32(0) {
// If there is no type specified, columns have the default affinity
// 'BLOB' with a default size of 4 bytes.
- (*Column)(unsafe.Pointer(pCol)).Faffinity = int8(SQLITE_AFF_BLOB)
+ (*Column)(unsafe.Pointer(pCol)).Faffinity = uint8(SQLITE_AFF_BLOB)
(*Column)(unsafe.Pointer(pCol)).FszEst = U8(1)
} else {
zType = ((z + uintptr(Xsqlite3Strlen30(tls, z))) + uintptr(1))
libc.Xmemcpy(tls, zType, (*Token)(unsafe.Pointer(pType)).Fz, uint64((*Token)(unsafe.Pointer(pType)).Fn))
- *(*int8)(unsafe.Pointer(zType + uintptr((*Token)(unsafe.Pointer(pType)).Fn))) = int8(0)
+ *(*uint8)(unsafe.Pointer(zType + uintptr((*Token)(unsafe.Pointer(pType)).Fn))) = uint8(0)
Xsqlite3Dequote(tls, zType)
(*Column)(unsafe.Pointer(pCol)).Faffinity = Xsqlite3AffinityType(tls, zType, pCol)
*(*U16)(unsafe.Pointer(pCol + 28 /* &.colFlags */)) |= U16((COLFLAG_HASTYPE))
@@ -92109,7 +94451,7 @@ func Xsqlite3AddColumn(tls *libc.TLS, pParse uintptr, pName uintptr, pType uintp
// parsing a CREATE TABLE statement. A "NOT NULL" constraint has
// been seen on a column. This routine sets the notNull flag on
// the column currently under construction.
-func Xsqlite3AddNotNull(tls *libc.TLS, pParse uintptr, onError int32) { /* sqlite3.c:113006:21: */
+func Xsqlite3AddNotNull(tls *libc.TLS, pParse uintptr, onError int32) { /* sqlite3.c:113860:21: */
var p uintptr
var pCol uintptr
p = (*Parse)(unsafe.Pointer(pParse)).FpNewTable
@@ -92127,7 +94469,7 @@ func Xsqlite3AddNotNull(tls *libc.TLS, pParse uintptr, onError int32) { /* sqlit
for pIdx = (*Table)(unsafe.Pointer(p)).FpIndex; pIdx != 0; pIdx = (*Index)(unsafe.Pointer(pIdx)).FpNext {
if int32(*(*I16)(unsafe.Pointer((*Index)(unsafe.Pointer(pIdx)).FaiColumn))) == (int32((*Table)(unsafe.Pointer(p)).FnCol) - 1) {
- libc.SetBitFieldPtr16Uint32(pIdx+100 /* &.uniqNotNull */, uint32(1), 3, 0x8)
+ libc.SetBitFieldPtr16Uint32(pIdx+100 /* &.uniqNotNull */, uint32(1), 12, 0x1000)
}
}
}
@@ -92156,41 +94498,41 @@ func Xsqlite3AddNotNull(tls *libc.TLS, pParse uintptr, onError int32) { /* sqlit
//
// If none of the substrings in the above table are found,
// SQLITE_AFF_NUMERIC is returned.
-func Xsqlite3AffinityType(tls *libc.TLS, zIn uintptr, pCol uintptr) int8 { /* sqlite3.c:113053:21: */
+func Xsqlite3AffinityType(tls *libc.TLS, zIn uintptr, pCol uintptr) uint8 { /* sqlite3.c:113907:21: */
bp := tls.Alloc(4)
defer tls.Free(4)
var h U32 = U32(0)
- var aff int8 = int8(SQLITE_AFF_NUMERIC)
+ var aff uint8 = uint8(SQLITE_AFF_NUMERIC)
var zChar uintptr = uintptr(0)
- for *(*int8)(unsafe.Pointer(zIn)) != 0 {
- h = ((h << 8) + U32(Xsqlite3UpperToLower[((int32(*(*int8)(unsafe.Pointer(zIn))))&0xff)]))
+ for *(*uint8)(unsafe.Pointer(zIn)) != 0 {
+ h = ((h << 8) + U32(Xsqlite3UpperToLower[((int32(*(*uint8)(unsafe.Pointer(zIn))))&0xff)]))
zIn++
if h == (U32((((int32('c') << 24) + (int32('h') << 16)) + (int32('a') << 8)) + 'r')) { // CHAR
- aff = int8(SQLITE_AFF_TEXT)
+ aff = uint8(SQLITE_AFF_TEXT)
zChar = zIn
} else if h == (U32((((int32('c') << 24) + (int32('l') << 16)) + (int32('o') << 8)) + 'b')) { // CLOB
- aff = int8(SQLITE_AFF_TEXT)
+ aff = uint8(SQLITE_AFF_TEXT)
} else if h == (U32((((int32('t') << 24) + (int32('e') << 16)) + (int32('x') << 8)) + 't')) { // TEXT
- aff = int8(SQLITE_AFF_TEXT)
+ aff = uint8(SQLITE_AFF_TEXT)
} else if (h == (U32((((int32('b') << 24) + (int32('l') << 16)) + (int32('o') << 8)) + 'b'))) && // BLOB
((int32(aff) == SQLITE_AFF_NUMERIC) || (int32(aff) == SQLITE_AFF_REAL)) {
- aff = int8(SQLITE_AFF_BLOB)
- if int32(*(*int8)(unsafe.Pointer(zIn))) == '(' {
+ aff = uint8(SQLITE_AFF_BLOB)
+ if int32(*(*uint8)(unsafe.Pointer(zIn))) == '(' {
zChar = zIn
}
} else if (h == (U32((((int32('r') << 24) + (int32('e') << 16)) + (int32('a') << 8)) + 'l'))) && // REAL
(int32(aff) == SQLITE_AFF_NUMERIC) {
- aff = int8(SQLITE_AFF_REAL)
+ aff = uint8(SQLITE_AFF_REAL)
} else if (h == (U32((((int32('f') << 24) + (int32('l') << 16)) + (int32('o') << 8)) + 'a'))) && // FLOA
(int32(aff) == SQLITE_AFF_NUMERIC) {
- aff = int8(SQLITE_AFF_REAL)
+ aff = uint8(SQLITE_AFF_REAL)
} else if (h == (U32((((int32('d') << 24) + (int32('o') << 16)) + (int32('u') << 8)) + 'b'))) && // DOUB
(int32(aff) == SQLITE_AFF_NUMERIC) {
- aff = int8(SQLITE_AFF_REAL)
+ aff = uint8(SQLITE_AFF_REAL)
} else if (h & U32(0x00FFFFFF)) == (U32(((int32('i') << 16) + (int32('n') << 8)) + 't')) { // INT
- aff = int8(SQLITE_AFF_INTEGER)
+ aff = uint8(SQLITE_AFF_INTEGER)
break
}
}
@@ -92201,8 +94543,8 @@ func Xsqlite3AffinityType(tls *libc.TLS, zIn uintptr, pCol uintptr) int8 { /* sq
*(*int32)(unsafe.Pointer(bp /* v */)) = 0 // default size is approx 4 bytes
if int32(aff) < SQLITE_AFF_NUMERIC {
if zChar != 0 {
- for *(*int8)(unsafe.Pointer(zChar)) != 0 {
- if (int32(Xsqlite3CtypeMap[uint8(*(*int8)(unsafe.Pointer(zChar)))]) & 0x04) != 0 {
+ for *(*uint8)(unsafe.Pointer(zChar)) != 0 {
+ if (int32(Xsqlite3CtypeMap[uint8(*(*uint8)(unsafe.Pointer(zChar)))]) & 0x04) != 0 {
// BLOB(k), VARCHAR(k), CHAR(k) -> r=(k/4+1)
Xsqlite3GetInt32(tls, zChar, bp /* &v */)
break
@@ -92230,7 +94572,7 @@ func Xsqlite3AffinityType(tls *libc.TLS, zIn uintptr, pCol uintptr) int8 { /* sq
//
// This routine is called by the parser while in the middle of
// parsing a CREATE TABLE statement.
-func Xsqlite3AddDefaultValue(tls *libc.TLS, pParse uintptr, pExpr uintptr, zStart uintptr, zEnd uintptr) { /* sqlite3.c:113130:21: */
+func Xsqlite3AddDefaultValue(tls *libc.TLS, pParse uintptr, pExpr uintptr, zStart uintptr, zEnd uintptr) { /* sqlite3.c:113984:21: */
bp := tls.Alloc(80)
defer tls.Free(80)
@@ -92242,11 +94584,11 @@ func Xsqlite3AddDefaultValue(tls *libc.TLS, pParse uintptr, pExpr uintptr, zStar
var isInit int32 = (libc.Bool32(((*Sqlite3)(unsafe.Pointer(db)).Finit.Fbusy != 0) && (int32((*Sqlite3)(unsafe.Pointer(db)).Finit.FiDb) != 1)))
pCol = ((*Table)(unsafe.Pointer(p)).FaCol + uintptr((int32((*Table)(unsafe.Pointer(p)).FnCol)-1))*32)
if !(Xsqlite3ExprIsConstantOrFunction(tls, pExpr, uint8(isInit)) != 0) {
- Xsqlite3ErrorMsg(tls, pParse, ts+10752, /* "default value of..." */
+ Xsqlite3ErrorMsg(tls, pParse, ts+11205, /* "default value of..." */
libc.VaList(bp, (*Column)(unsafe.Pointer(pCol)).FzName))
} else if (int32((*Column)(unsafe.Pointer(pCol)).FcolFlags) & COLFLAG_GENERATED) != 0 {
- Xsqlite3ErrorMsg(tls, pParse, ts+10797 /* "cannot use DEFAU..." */, 0)
+ Xsqlite3ErrorMsg(tls, pParse, ts+11250 /* "cannot use DEFAU..." */, 0)
} else {
// A copy of pExpr is used instead of the original, as pExpr contains
// tokens that point to volatile memory.
@@ -92282,7 +94624,7 @@ func Xsqlite3AddDefaultValue(tls *libc.TLS, pParse uintptr, pExpr uintptr, zStar
// if the expression is just a TK_STRING with an optional COLLATE clause.
// If the expression is anything other than TK_STRING, the expression is
// unchanged.
-func sqlite3StringToId(tls *libc.TLS, p uintptr) { /* sqlite3.c:113189:13: */
+func sqlite3StringToId(tls *libc.TLS, p uintptr) { /* sqlite3.c:114043:13: */
if int32((*Expr)(unsafe.Pointer(p)).Fop) == TK_STRING {
(*Expr)(unsafe.Pointer(p)).Fop = U8(TK_ID)
} else if (int32((*Expr)(unsafe.Pointer(p)).Fop) == TK_COLLATE) && (int32((*Expr)(unsafe.Pointer((*Expr)(unsafe.Pointer(p)).FpLeft)).Fop) == TK_STRING) {
@@ -92291,12 +94633,12 @@ func sqlite3StringToId(tls *libc.TLS, p uintptr) { /* sqlite3.c:113189:13: */
}
// Tag the given column as being part of the PRIMARY KEY
-func makeColumnPartOfPrimaryKey(tls *libc.TLS, pParse uintptr, pCol uintptr) { /* sqlite3.c:113200:13: */
+func makeColumnPartOfPrimaryKey(tls *libc.TLS, pParse uintptr, pCol uintptr) { /* sqlite3.c:114054:13: */
*(*U16)(unsafe.Pointer(pCol + 28 /* &.colFlags */)) |= U16((COLFLAG_PRIMKEY))
if (int32((*Column)(unsafe.Pointer(pCol)).FcolFlags) & COLFLAG_GENERATED) != 0 {
Xsqlite3ErrorMsg(tls, pParse,
- ts+10838 /* "generated column..." */, 0)
+ ts+11291 /* "generated column..." */, 0)
}
}
@@ -92316,7 +94658,7 @@ func makeColumnPartOfPrimaryKey(tls *libc.TLS, pParse uintptr, pCol uintptr) { /
//
// If the key is not an INTEGER PRIMARY KEY, then create a unique
// index for the key. No index is created for INTEGER PRIMARY KEYs.
-func Xsqlite3AddPrimaryKey(tls *libc.TLS, pParse uintptr, pList uintptr, onError int32, autoInc int32, sortOrder int32) { /* sqlite3.c:113230:21: */
+func Xsqlite3AddPrimaryKey(tls *libc.TLS, pParse uintptr, pList uintptr, onError int32, autoInc int32, sortOrder int32) { /* sqlite3.c:114084:21: */
bp := tls.Alloc(8)
defer tls.Free(8)
@@ -92341,7 +94683,7 @@ __1:
goto __2
}
Xsqlite3ErrorMsg(tls, pParse,
- ts+10890 /* "table \"%s\" has m..." */, libc.VaList(bp, (*Table)(unsafe.Pointer(pTab)).FzName))
+ ts+11343 /* "table \"%s\" has m..." */, libc.VaList(bp, (*Table)(unsafe.Pointer(pTab)).FzName))
goto primary_key_exit
__2:
;
@@ -92401,7 +94743,7 @@ __4:
;
if !((((nTerm == 1) &&
(pCol != 0)) &&
- (Xsqlite3StrICmp(tls, Xsqlite3ColumnType(tls, pCol, ts+703 /* "" */), ts+10931 /* "INTEGER" */) == 0)) &&
+ (Xsqlite3StrICmp(tls, Xsqlite3ColumnType(tls, pCol, ts+755 /* "" */), ts+11384 /* "INTEGER" */) == 0)) &&
(sortOrder != SQLITE_SO_DESC)) {
goto __13
}
@@ -92429,7 +94771,7 @@ __13:
goto __17
}
Xsqlite3ErrorMsg(tls, pParse,
- ts+10939 /* "AUTOINCREMENT is..." */, 0)
+ ts+11392 /* "AUTOINCREMENT is..." */, 0)
goto __18
__17:
Xsqlite3CreateIndex(tls, pParse, uintptr(0), uintptr(0), uintptr(0), pList, onError, uintptr(0),
@@ -92446,7 +94788,7 @@ primary_key_exit:
}
// Add a new CHECK constraint to the table currently under construction.
-func Xsqlite3AddCheckConstraint(tls *libc.TLS, pParse uintptr, pCheckExpr uintptr, zStart uintptr, zEnd uintptr) { /* sqlite3.c:113305:21: */
+func Xsqlite3AddCheckConstraint(tls *libc.TLS, pParse uintptr, pCheckExpr uintptr, zStart uintptr, zEnd uintptr) { /* sqlite3.c:114159:21: */
bp := tls.Alloc(16)
defer tls.Free(16)
@@ -92460,9 +94802,9 @@ func Xsqlite3AddCheckConstraint(tls *libc.TLS, pParse uintptr, pCheckExpr uintpt
} else {
// var t Token at bp, 16
- for zStart++; (int32(Xsqlite3CtypeMap[uint8(*(*int8)(unsafe.Pointer(zStart)))]) & 0x01) != 0; zStart++ {
+ for zStart++; (int32(Xsqlite3CtypeMap[uint8(*(*uint8)(unsafe.Pointer(zStart)))]) & 0x01) != 0; zStart++ {
}
- for (int32(Xsqlite3CtypeMap[uint8(*(*int8)(unsafe.Pointer(zEnd + libc.UintptrFromInt32(-1))))]) & 0x01) != 0 {
+ for (int32(Xsqlite3CtypeMap[uint8(*(*uint8)(unsafe.Pointer(zEnd + libc.UintptrFromInt32(-1))))]) & 0x01) != 0 {
zEnd--
}
(*Token)(unsafe.Pointer(bp /* &t */)).Fz = zStart
@@ -92476,7 +94818,7 @@ func Xsqlite3AddCheckConstraint(tls *libc.TLS, pParse uintptr, pCheckExpr uintpt
// Set the collation function of the most recently parsed table column
// to the CollSeq given.
-func Xsqlite3AddCollateType(tls *libc.TLS, pParse uintptr, pToken uintptr) { /* sqlite3.c:113339:21: */
+func Xsqlite3AddCollateType(tls *libc.TLS, pParse uintptr, pToken uintptr) { /* sqlite3.c:114193:21: */
var p uintptr
var i int32
var zColl uintptr // Dequoted name of collation sequence
@@ -92513,7 +94855,7 @@ func Xsqlite3AddCollateType(tls *libc.TLS, pParse uintptr, pToken uintptr) { /*
// Change the most recently parsed column to be a GENERATED ALWAYS AS
// column.
-func Xsqlite3AddGenerated(tls *libc.TLS, pParse uintptr, pExpr uintptr, pType uintptr) { /* sqlite3.c:113374:21: */
+func Xsqlite3AddGenerated(tls *libc.TLS, pParse uintptr, pExpr uintptr, pType uintptr) { /* sqlite3.c:114228:21: */
bp := tls.Alloc(8)
defer tls.Free(8)
@@ -92533,7 +94875,7 @@ __1:
if !(int32((*Parse)(unsafe.Pointer(pParse)).FeParseMode) == PARSE_MODE_DECLARE_VTAB) {
goto __2
}
- Xsqlite3ErrorMsg(tls, pParse, ts+10995 /* "virtual tables c..." */, 0)
+ Xsqlite3ErrorMsg(tls, pParse, ts+11448 /* "virtual tables c..." */, 0)
goto generated_done
__2:
;
@@ -92546,13 +94888,13 @@ __3:
if !(pType != 0) {
goto __4
}
- if !(((*Token)(unsafe.Pointer(pType)).Fn == uint32(7)) && (Xsqlite3_strnicmp(tls, ts+11038 /* "virtual" */, (*Token)(unsafe.Pointer(pType)).Fz, 7) == 0)) {
+ if !(((*Token)(unsafe.Pointer(pType)).Fn == uint32(7)) && (Xsqlite3_strnicmp(tls, ts+11491 /* "virtual" */, (*Token)(unsafe.Pointer(pType)).Fz, 7) == 0)) {
goto __5
}
// no-op
goto __6
__5:
- if !(((*Token)(unsafe.Pointer(pType)).Fn == uint32(6)) && (Xsqlite3_strnicmp(tls, ts+11046 /* "stored" */, (*Token)(unsafe.Pointer(pType)).Fz, 6) == 0)) {
+ if !(((*Token)(unsafe.Pointer(pType)).Fn == uint32(6)) && (Xsqlite3_strnicmp(tls, ts+11499 /* "stored" */, (*Token)(unsafe.Pointer(pType)).Fz, 6) == 0)) {
goto __7
}
eType = U8(COLFLAG_STORED)
@@ -92585,7 +94927,7 @@ __10:
goto generated_done
generated_error:
- Xsqlite3ErrorMsg(tls, pParse, ts+11053, /* "error in generat..." */
+ Xsqlite3ErrorMsg(tls, pParse, ts+11506, /* "error in generat..." */
libc.VaList(bp, (*Column)(unsafe.Pointer(pCol)).FzName))
generated_done:
Xsqlite3ExprDelete(tls, (*Parse)(unsafe.Pointer(pParse)).Fdb, pExpr)
@@ -92608,7 +94950,7 @@ generated_done:
//
// IMPLEMENTATION-OF: R-34230-56049 SQLite automatically increments
// the schema-version whenever the schema changes.
-func Xsqlite3ChangeCookie(tls *libc.TLS, pParse uintptr, iDb int32) { /* sqlite3.c:113442:21: */
+func Xsqlite3ChangeCookie(tls *libc.TLS, pParse uintptr, iDb int32) { /* sqlite3.c:114296:21: */
var db uintptr = (*Parse)(unsafe.Pointer(pParse)).Fdb
var v uintptr = (*Parse)(unsafe.Pointer(pParse)).FpVdbe
@@ -92622,15 +94964,15 @@ func Xsqlite3ChangeCookie(tls *libc.TLS, pParse uintptr, iDb int32) { /* sqlite3
//
// The estimate is conservative. It might be larger that what is
// really needed.
-func identLength(tls *libc.TLS, z uintptr) int32 { /* sqlite3.c:113458:12: */
+func identLength(tls *libc.TLS, z uintptr) int32 { /* sqlite3.c:114312:12: */
var n int32
n = 0
__1:
- if !(*(*int8)(unsafe.Pointer(z)) != 0) {
+ if !(*(*uint8)(unsafe.Pointer(z)) != 0) {
goto __3
}
{
- if int32(*(*int8)(unsafe.Pointer(z))) == '"' {
+ if int32(*(*uint8)(unsafe.Pointer(z))) == '"' {
n++
}
@@ -92657,7 +94999,7 @@ __3:
// characters, does not begin with a digit and is not an SQL keyword,
// then it is copied to the output buffer exactly as it is. Otherwise,
// it is quoted using double-quotes.
-func identPut(tls *libc.TLS, z uintptr, pIdx uintptr, zSignedIdent uintptr) { /* sqlite3.c:113479:13: */
+func identPut(tls *libc.TLS, z uintptr, pIdx uintptr, zSignedIdent uintptr) { /* sqlite3.c:114333:13: */
var zIdent uintptr = zSignedIdent
var i int32
var j int32
@@ -92675,25 +95017,25 @@ func identPut(tls *libc.TLS, z uintptr, pIdx uintptr, zSignedIdent uintptr) { /*
(j == 0)))
if needQuote != 0 {
- *(*int8)(unsafe.Pointer(z + uintptr(libc.PostIncInt32(&i, 1)))) = int8('"')
+ *(*uint8)(unsafe.Pointer(z + uintptr(libc.PostIncInt32(&i, 1)))) = uint8('"')
}
for j = 0; *(*uint8)(unsafe.Pointer(zIdent + uintptr(j))) != 0; j++ {
- *(*int8)(unsafe.Pointer(z + uintptr(libc.PostIncInt32(&i, 1)))) = int8(*(*uint8)(unsafe.Pointer(zIdent + uintptr(j))))
+ *(*uint8)(unsafe.Pointer(z + uintptr(libc.PostIncInt32(&i, 1)))) = uint8(*(*uint8)(unsafe.Pointer(zIdent + uintptr(j))))
if int32(*(*uint8)(unsafe.Pointer(zIdent + uintptr(j)))) == '"' {
- *(*int8)(unsafe.Pointer(z + uintptr(libc.PostIncInt32(&i, 1)))) = int8('"')
+ *(*uint8)(unsafe.Pointer(z + uintptr(libc.PostIncInt32(&i, 1)))) = uint8('"')
}
}
if needQuote != 0 {
- *(*int8)(unsafe.Pointer(z + uintptr(libc.PostIncInt32(&i, 1)))) = int8('"')
+ *(*uint8)(unsafe.Pointer(z + uintptr(libc.PostIncInt32(&i, 1)))) = uint8('"')
}
- *(*int8)(unsafe.Pointer(z + uintptr(i))) = int8(0)
+ *(*uint8)(unsafe.Pointer(z + uintptr(i))) = uint8(0)
*(*int32)(unsafe.Pointer(pIdx)) = i
}
// Generate a CREATE TABLE statement appropriate for the given
// table. Memory to hold the text of the statement is obtained
// from sqliteMalloc() and must be freed by the calling function.
-func createTableStmt(tls *libc.TLS, db uintptr, p uintptr) uintptr { /* sqlite3.c:113507:13: */
+func createTableStmt(tls *libc.TLS, db uintptr, p uintptr) uintptr { /* sqlite3.c:114361:13: */
bp := tls.Alloc(12)
defer tls.Free(12)
@@ -92727,13 +95069,13 @@ __3:
;
n = n + (identLength(tls, (*Table)(unsafe.Pointer(p)).FzName))
if n < 50 {
- zSep = ts + 703 /* "" */
- zSep2 = ts + 11084 /* "," */
- zEnd = ts + 3935 /* ")" */
+ zSep = ts + 755 /* "" */
+ zSep2 = ts + 11537 /* "," */
+ zEnd = ts + 4066 /* ")" */
} else {
- zSep = ts + 11086 /* "\n " */
- zSep2 = ts + 11090 /* ",\n " */
- zEnd = ts + 11095 /* "\n)" */
+ zSep = ts + 11539 /* "\n " */
+ zSep2 = ts + 11543 /* ",\n " */
+ zEnd = ts + 11548 /* "\n)" */
}
n = n + (35 + (6 * int32((*Table)(unsafe.Pointer(p)).FnCol)))
zStmt = Xsqlite3DbMallocRaw(tls, uintptr(0), uint64(n))
@@ -92741,10 +95083,10 @@ __3:
Xsqlite3OomFault(tls, db)
return uintptr(0)
}
- Xsqlite3_snprintf(tls, n, zStmt, ts+11098 /* "CREATE TABLE " */, 0)
+ Xsqlite3_snprintf(tls, n, zStmt, ts+11551 /* "CREATE TABLE " */, 0)
*(*int32)(unsafe.Pointer(bp + 8 /* k */)) = Xsqlite3Strlen30(tls, zStmt)
identPut(tls, zStmt, bp+8 /* &k */, (*Table)(unsafe.Pointer(p)).FzName)
- *(*int8)(unsafe.Pointer(zStmt + uintptr(libc.PostIncInt32(&*(*int32)(unsafe.Pointer(bp + 8 /* k */)), 1)))) = int8('(')
+ *(*uint8)(unsafe.Pointer(zStmt + uintptr(libc.PostIncInt32(&*(*int32)(unsafe.Pointer(bp + 8 /* k */)), 1)))) = uint8('(')
pCol = (*Table)(unsafe.Pointer(p)).FaCol
i = 0
__4:
@@ -92775,21 +95117,21 @@ __5:
goto __6
__6:
;
- Xsqlite3_snprintf(tls, (n - *(*int32)(unsafe.Pointer(bp + 8 /* k */))), (zStmt + uintptr(*(*int32)(unsafe.Pointer(bp + 8 /* k */)))), ts+2718 /* "%s" */, libc.VaList(bp, zEnd))
+ Xsqlite3_snprintf(tls, (n - *(*int32)(unsafe.Pointer(bp + 8 /* k */))), (zStmt + uintptr(*(*int32)(unsafe.Pointer(bp + 8 /* k */)))), ts+2790 /* "%s" */, libc.VaList(bp, zEnd))
return zStmt
}
var azType1 = [5]uintptr{
- /* SQLITE_AFF_BLOB */ ts + 703, /* "" */
- /* SQLITE_AFF_TEXT */ ts + 11112, /* " TEXT" */
- /* SQLITE_AFF_NUMERIC */ ts + 11118, /* " NUM" */
- /* SQLITE_AFF_INTEGER */ ts + 11123, /* " INT" */
- /* SQLITE_AFF_REAL */ ts + 11128, /* " REAL" */
-} /* sqlite3.c:113537:23 */
+ /* SQLITE_AFF_BLOB */ ts + 755, /* "" */
+ /* SQLITE_AFF_TEXT */ ts + 11565, /* " TEXT" */
+ /* SQLITE_AFF_NUMERIC */ ts + 11571, /* " NUM" */
+ /* SQLITE_AFF_INTEGER */ ts + 11576, /* " INT" */
+ /* SQLITE_AFF_REAL */ ts + 11581, /* " REAL" */
+} /* sqlite3.c:114391:23 */
// Resize an Index object to hold N columns total. Return SQLITE_OK
// on success and SQLITE_NOMEM on an OOM error.
-func resizeIndexObject(tls *libc.TLS, db uintptr, pIdx uintptr, N int32) int32 { /* sqlite3.c:113575:12: */
+func resizeIndexObject(tls *libc.TLS, db uintptr, pIdx uintptr, N int32) int32 { /* sqlite3.c:114429:12: */
var zExtra uintptr
var nByte int32
if int32((*Index)(unsafe.Pointer(pIdx)).FnColumn) >= N {
@@ -92813,12 +95155,12 @@ func resizeIndexObject(tls *libc.TLS, db uintptr, pIdx uintptr, N int32) int32 {
libc.Xmemcpy(tls, zExtra, (*Index)(unsafe.Pointer(pIdx)).FaSortOrder, uint64((*Index)(unsafe.Pointer(pIdx)).FnColumn))
(*Index)(unsafe.Pointer(pIdx)).FaSortOrder = zExtra
(*Index)(unsafe.Pointer(pIdx)).FnColumn = U16(N)
- libc.SetBitFieldPtr16Uint32(pIdx+100 /* &.isResized */, uint32(1), 4, 0x10)
+ libc.SetBitFieldPtr16Uint32(pIdx+100 /* &.isResized */, uint32(1), 11, 0x800)
return SQLITE_OK
}
// Estimate the total row width for a table.
-func estimateTableWidth(tls *libc.TLS, pTab uintptr) { /* sqlite3.c:113602:13: */
+func estimateTableWidth(tls *libc.TLS, pTab uintptr) { /* sqlite3.c:114456:13: */
var wTable uint32 = uint32(0)
var pTabCol uintptr
var i int32
@@ -92847,7 +95189,7 @@ __3:
}
// Estimate the average size of a row for an index.
-func estimateIndexWidth(tls *libc.TLS, pIdx uintptr) { /* sqlite3.c:113616:13: */
+func estimateIndexWidth(tls *libc.TLS, pIdx uintptr) { /* sqlite3.c:114470:13: */
var wIndex uint32 = uint32(0)
var i int32
var aCol uintptr = (*Table)(unsafe.Pointer((*Index)(unsafe.Pointer(pIdx)).FpTable)).FaCol
@@ -92867,7 +95209,7 @@ func estimateIndexWidth(tls *libc.TLS, pIdx uintptr) { /* sqlite3.c:113616:13: *
// Return true if column number x is any of the first nCol entries of aiCol[].
// This is used to determine if the column number x appears in any of the
// first nCol entries of an index.
-func hasColumn(tls *libc.TLS, aiCol uintptr, nCol int32, x int32) int32 { /* sqlite3.c:113632:12: */
+func hasColumn(tls *libc.TLS, aiCol uintptr, nCol int32, x int32) int32 { /* sqlite3.c:114486:12: */
for libc.PostDecInt32(&nCol, 1) > 0 {
if x == int32(*(*I16)(unsafe.Pointer(libc.PostIncUintptr(&aiCol, 2)))) {
@@ -92888,7 +95230,7 @@ func hasColumn(tls *libc.TLS, aiCol uintptr, nCol int32, x int32) int32 { /* sql
// This routine differs from hasColumn() in that both the column and the
// collating sequence must match for this routine, but for hasColumn() only
// the column name must match.
-func isDupColumn(tls *libc.TLS, pIdx uintptr, nKey int32, pPk uintptr, iCol int32) int32 { /* sqlite3.c:113655:12: */
+func isDupColumn(tls *libc.TLS, pIdx uintptr, nKey int32, pPk uintptr, iCol int32) int32 { /* sqlite3.c:114509:12: */
var i int32
var j int32
@@ -92921,7 +95263,7 @@ func isDupColumn(tls *libc.TLS, pIdx uintptr, nKey int32, pPk uintptr, iCol int3
//
// The colNotIdxed mask is AND-ed with the SrcList.a[].colUsed mask
// to determine if the index is covering index.
-func recomputeColumnsNotIndexed(tls *libc.TLS, pIdx uintptr) { /* sqlite3.c:113694:13: */
+func recomputeColumnsNotIndexed(tls *libc.TLS, pIdx uintptr) { /* sqlite3.c:114548:13: */
var m Bitmask = uint64(0)
var j int32
var pTab uintptr = (*Index)(unsafe.Pointer(pIdx)).FpTable
@@ -92960,7 +95302,7 @@ func recomputeColumnsNotIndexed(tls *libc.TLS, pIdx uintptr) { /* sqlite3.c:1136
// indices with the PRIMARY KEY columns.
//
// For virtual tables, only (1) is performed.
-func convertToWithoutRowidTable(tls *libc.TLS, pParse uintptr, pTab uintptr) { /* sqlite3.c:113734:13: */
+func convertToWithoutRowidTable(tls *libc.TLS, pParse uintptr, pTab uintptr) { /* sqlite3.c:114588:13: */
bp := tls.Alloc(16)
defer tls.Free(16)
@@ -92974,7 +95316,7 @@ func convertToWithoutRowidTable(tls *libc.TLS, pParse uintptr, pTab uintptr) { /
var v uintptr = (*Parse)(unsafe.Pointer(pParse)).FpVdbe
// Mark every PRIMARY KEY column as NOT NULL (except for imposter tables)
- if !((int32(*(*uint8)(unsafe.Pointer(db + 184 /* &.init */ + 8 /* &.imposterTable */)) >> 6 & 0x1)) != 0) {
+ if !((int32(*(*uint8)(unsafe.Pointer(db + 184 /* &.init */ + 8 /* &.imposterTable */)) & 0x40 >> 6)) != 0) {
for i = 0; i < int32((*Table)(unsafe.Pointer(pTab)).FnCol); i++ {
if (int32((*Column)(unsafe.Pointer((*Table)(unsafe.Pointer(pTab)).FaCol+uintptr(i)*32)).FcolFlags) & COLFLAG_PRIMKEY) != 0 {
(*Column)(unsafe.Pointer((*Table)(unsafe.Pointer(pTab)).FaCol + uintptr(i)*32)).FnotNull = U8(OE_Abort)
@@ -93001,6 +95343,7 @@ func convertToWithoutRowidTable(tls *libc.TLS, pParse uintptr, pTab uintptr) { /
pList = Xsqlite3ExprListAppend(tls, pParse, uintptr(0),
Xsqlite3ExprAlloc(tls, db, TK_ID, bp /* &ipkToken */, 0))
if pList == uintptr(0) {
+ *(*U32)(unsafe.Pointer(pTab + 64 /* &.tabFlags */)) &= (libc.Uint32FromInt32(libc.CplInt32(TF_WithoutRowid)))
return
}
if int32((*Parse)(unsafe.Pointer(pParse)).FeParseMode) >= PARSE_MODE_RENAME {
@@ -93012,6 +95355,7 @@ func convertToWithoutRowidTable(tls *libc.TLS, pParse uintptr, pTab uintptr) { /
Xsqlite3CreateIndex(tls, pParse, uintptr(0), uintptr(0), uintptr(0), pList, int32((*Table)(unsafe.Pointer(pTab)).FkeyConf), uintptr(0), uintptr(0), 0, 0,
uint8(SQLITE_IDXTYPE_PRIMARYKEY))
if ((*Sqlite3)(unsafe.Pointer(db)).FmallocFailed != 0) || ((*Parse)(unsafe.Pointer(pParse)).FnErr != 0) {
+ *(*U32)(unsafe.Pointer(pTab + 64 /* &.tabFlags */)) &= (libc.Uint32FromInt32(libc.CplInt32(TF_WithoutRowid)))
return
}
pPk = Xsqlite3PrimaryKeyIndex(tls, pTab)
@@ -93035,9 +95379,9 @@ func convertToWithoutRowidTable(tls *libc.TLS, pParse uintptr, pTab uintptr) { /
(*Index)(unsafe.Pointer(pPk)).FnKeyCol = U16(j)
}
- libc.SetBitFieldPtr16Uint32(pPk+100 /* &.isCovering */, uint32(1), 5, 0x20)
- if !((int32(*(*uint8)(unsafe.Pointer(db + 184 /* &.init */ + 8 /* &.imposterTable */)) >> 6 & 0x1)) != 0) {
- libc.SetBitFieldPtr16Uint32(pPk+100 /* &.uniqNotNull */, uint32(1), 3, 0x8)
+ libc.SetBitFieldPtr16Uint32(pPk+100 /* &.isCovering */, uint32(1), 10, 0x400)
+ if !((int32(*(*uint8)(unsafe.Pointer(db + 184 /* &.init */ + 8 /* &.imposterTable */)) & 0x40 >> 6)) != 0) {
+ libc.SetBitFieldPtr16Uint32(pPk+100 /* &.uniqNotNull */, uint32(1), 12, 0x1000)
}
nPk = int32(libc.AssignPtrUint16(pPk+96 /* &.nColumn */, (*Index)(unsafe.Pointer(pPk)).FnKeyCol))
@@ -93057,7 +95401,7 @@ func convertToWithoutRowidTable(tls *libc.TLS, pParse uintptr, pTab uintptr) { /
// the final rowid column into one or more columns of the PRIMARY KEY.
for pIdx = (*Table)(unsafe.Pointer(pTab)).FpIndex; pIdx != 0; pIdx = (*Index)(unsafe.Pointer(pIdx)).FpNext {
var n int32
- if (int32(*(*uint16)(unsafe.Pointer((pIdx) + 100 /* &.idxType */)) >> 14 & 0x3)) == SQLITE_IDXTYPE_PRIMARYKEY {
+ if (int32(*(*uint16)(unsafe.Pointer((pIdx) + 100 /* &.idxType */)) & 0xc000 >> 14)) == SQLITE_IDXTYPE_PRIMARYKEY {
continue
}
for i = libc.AssignInt32(&n, 0); i < nPk; i++ {
@@ -93083,7 +95427,7 @@ func convertToWithoutRowidTable(tls *libc.TLS, pParse uintptr, pTab uintptr) { /
*(*uintptr)(unsafe.Pointer((*Index)(unsafe.Pointer(pIdx)).FazColl + uintptr(j)*8)) = *(*uintptr)(unsafe.Pointer((*Index)(unsafe.Pointer(pPk)).FazColl + uintptr(i)*8))
if *(*U8)(unsafe.Pointer((*Index)(unsafe.Pointer(pPk)).FaSortOrder + uintptr(i))) != 0 {
// See ticket https://www.sqlite.org/src/info/bba7b69f9849b5bf
- libc.SetBitFieldPtr16Uint32(pIdx+100 /* &.bAscKeyBug */, uint32(1), 9, 0x200)
+ libc.SetBitFieldPtr16Uint32(pIdx+100 /* &.bAscKeyBug */, uint32(1), 6, 0x40)
}
j++
}
@@ -93119,7 +95463,7 @@ func convertToWithoutRowidTable(tls *libc.TLS, pParse uintptr, pTab uintptr) { /
// Return true if pTab is a virtual table and zName is a shadow table name
// for that virtual table.
-func Xsqlite3IsShadowTableOf(tls *libc.TLS, db uintptr, pTab uintptr, zName uintptr) int32 { /* sqlite3.c:113885:20: */
+func Xsqlite3IsShadowTableOf(tls *libc.TLS, db uintptr, pTab uintptr, zName uintptr) int32 { /* sqlite3.c:114745:20: */
var nName int32 // Length of zName
var pMod uintptr // Module for the virtual table
@@ -93130,7 +95474,7 @@ func Xsqlite3IsShadowTableOf(tls *libc.TLS, db uintptr, pTab uintptr, zName uint
if Xsqlite3_strnicmp(tls, zName, (*Table)(unsafe.Pointer(pTab)).FzName, nName) != 0 {
return 0
}
- if int32(*(*int8)(unsafe.Pointer(zName + uintptr(nName)))) != '_' {
+ if int32(*(*uint8)(unsafe.Pointer(zName + uintptr(nName)))) != '_' {
return 0
}
pMod = Xsqlite3HashFind(tls, (db + 536 /* &.aModule */), *(*uintptr)(unsafe.Pointer((*Table)(unsafe.Pointer(pTab)).FazModuleArg)))
@@ -93143,7 +95487,9 @@ func Xsqlite3IsShadowTableOf(tls *libc.TLS, db uintptr, pTab uintptr, zName uint
if (*Sqlite3_module)(unsafe.Pointer((*Module)(unsafe.Pointer(pMod)).FpModule)).FxShadowName == uintptr(0) {
return 0
}
- return (*(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(((*Module)(unsafe.Pointer(pMod)).FpModule + 184 /* &.xShadowName */))))(tls, ((zName + uintptr(nName)) + uintptr(1)))
+ return (*struct {
+ f func(*libc.TLS, uintptr) int32
+ })(unsafe.Pointer(&struct{ uintptr }{(*Sqlite3_module)(unsafe.Pointer((*Module)(unsafe.Pointer(pMod)).FpModule)).FxShadowName})).f(tls, ((zName + uintptr(nName)) + uintptr(1)))
}
// Return true if zName is a shadow table name in the current database
@@ -93151,16 +95497,16 @@ func Xsqlite3IsShadowTableOf(tls *libc.TLS, db uintptr, pTab uintptr, zName uint
//
// zName is temporarily modified while this routine is running, but is
// restored to its original value prior to this routine returning.
-func Xsqlite3ShadowTableName(tls *libc.TLS, db uintptr, zName uintptr) int32 { /* sqlite3.c:113909:20: */
+func Xsqlite3ShadowTableName(tls *libc.TLS, db uintptr, zName uintptr) int32 { /* sqlite3.c:114769:20: */
var zTail uintptr // Pointer to the last "_" in zName
var pTab uintptr // Table that zName is a shadow of
zTail = libc.Xstrrchr(tls, zName, '_')
if zTail == uintptr(0) {
return 0
}
- *(*int8)(unsafe.Pointer(zTail)) = int8(0)
+ *(*uint8)(unsafe.Pointer(zTail)) = uint8(0)
pTab = Xsqlite3FindTable(tls, db, zName, uintptr(0))
- *(*int8)(unsafe.Pointer(zTail)) = int8('_')
+ *(*uint8)(unsafe.Pointer(zTail)) = uint8('_')
if pTab == uintptr(0) {
return 0
}
@@ -93188,7 +95534,7 @@ func Xsqlite3ShadowTableName(tls *libc.TLS, db uintptr, zName uintptr) int32 { /
// was called to create a table generated from a
// "CREATE TABLE ... AS SELECT ..." statement. The column names of
// the new table will match the result set of the SELECT.
-func Xsqlite3EndTable(tls *libc.TLS, pParse uintptr, pCons uintptr, pEnd uintptr, tabOpts U8, pSelect uintptr) { /* sqlite3.c:113970:21: */
+func Xsqlite3EndTable(tls *libc.TLS, pParse uintptr, pCons uintptr, pEnd uintptr, tabOpts U8, pSelect uintptr) { /* sqlite3.c:114830:21: */
bp := tls.Alloc(144)
defer tls.Free(144)
@@ -93200,7 +95546,6 @@ func Xsqlite3EndTable(tls *libc.TLS, pParse uintptr, pCons uintptr, pEnd uintptr
if (pEnd == uintptr(0)) && (pSelect == uintptr(0)) {
return
}
-
p = (*Parse)(unsafe.Pointer(pParse)).FpNewTable
if p == uintptr(0) {
return
@@ -93220,7 +95565,7 @@ func Xsqlite3EndTable(tls *libc.TLS, pParse uintptr, pCons uintptr, pEnd uintptr
// table itself. So mark it read-only.
if (*Sqlite3)(unsafe.Pointer(db)).Finit.Fbusy != 0 {
if pSelect != 0 {
- Xsqlite3ErrorMsg(tls, pParse, ts+703 /* "" */, 0)
+ Xsqlite3ErrorMsg(tls, pParse, ts+755 /* "" */, 0)
return
}
(*Table)(unsafe.Pointer(p)).Ftnum = (*Sqlite3)(unsafe.Pointer(db)).Finit.FnewTnum
@@ -93233,11 +95578,11 @@ func Xsqlite3EndTable(tls *libc.TLS, pParse uintptr, pCons uintptr, pEnd uintptr
if (int32(tabOpts) & TF_WithoutRowid) != 0 {
if ((*Table)(unsafe.Pointer(p)).FtabFlags & U32(TF_Autoincrement)) != 0 {
Xsqlite3ErrorMsg(tls, pParse,
- ts+11134 /* "AUTOINCREMENT no..." */, 0)
+ ts+11587 /* "AUTOINCREMENT no..." */, 0)
return
}
if ((*Table)(unsafe.Pointer(p)).FtabFlags & U32(TF_HasPrimaryKey)) == U32(0) {
- Xsqlite3ErrorMsg(tls, pParse, ts+11184 /* "PRIMARY KEY miss..." */, libc.VaList(bp, (*Table)(unsafe.Pointer(p)).FzName))
+ Xsqlite3ErrorMsg(tls, pParse, ts+11637 /* "PRIMARY KEY miss..." */, libc.VaList(bp, (*Table)(unsafe.Pointer(p)).FzName))
return
}
*(*U32)(unsafe.Pointer(p + 64 /* &.tabFlags */)) |= (U32(TF_WithoutRowid | TF_NoVisibleRowid))
@@ -93281,7 +95626,7 @@ func Xsqlite3EndTable(tls *libc.TLS, pParse uintptr, pCons uintptr, pEnd uintptr
}
}
if nNG == 0 {
- Xsqlite3ErrorMsg(tls, pParse, ts+11216 /* "must have at lea..." */, 0)
+ Xsqlite3ErrorMsg(tls, pParse, ts+11669 /* "must have at lea..." */, 0)
return
}
}
@@ -93314,12 +95659,12 @@ func Xsqlite3EndTable(tls *libc.TLS, pParse uintptr, pCons uintptr, pEnd uintptr
// Initialize zType for the new view or table.
if (*Table)(unsafe.Pointer(p)).FpSelect == uintptr(0) {
// A regular table
- zType = ts + 7394 /* "table" */
- zType2 = ts + 11260 /* "TABLE" */
+ zType = ts + 7823 /* "table" */
+ zType2 = ts + 11713 /* "TABLE" */
} else {
// A view
- zType = ts + 8778 /* "view" */
- zType2 = ts + 11266 /* "VIEW" */
+ zType = ts + 9208 /* "view" */
+ zType2 = ts + 11719 /* "VIEW" */
}
// If this is a CREATE TABLE xx AS SELECT ..., execute the SELECT
@@ -93357,7 +95702,7 @@ func Xsqlite3EndTable(tls *libc.TLS, pParse uintptr, pCons uintptr, pEnd uintptr
if (*Parse)(unsafe.Pointer(pParse)).FnErr != 0 {
return
}
- pSelTab = Xsqlite3ResultSetOfSelect(tls, pParse, pSelect, int8(SQLITE_AFF_BLOB))
+ pSelTab = Xsqlite3ResultSetOfSelect(tls, pParse, pSelect, uint8(SQLITE_AFF_BLOB))
if pSelTab == uintptr(0) {
return
}
@@ -93396,11 +95741,11 @@ func Xsqlite3EndTable(tls *libc.TLS, pParse uintptr, pCons uintptr, pEnd uintptr
pEnd2 = pEnd
}
n = (int32((int64((*Token)(unsafe.Pointer(pEnd2)).Fz) - int64((*Parse)(unsafe.Pointer(pParse)).FsNameToken.Fz)) / 1))
- if int32(*(*int8)(unsafe.Pointer((*Token)(unsafe.Pointer(pEnd2)).Fz))) != ';' {
+ if int32(*(*uint8)(unsafe.Pointer((*Token)(unsafe.Pointer(pEnd2)).Fz))) != ';' {
n = int32(uint32(n) + ((*Token)(unsafe.Pointer(pEnd2)).Fn))
}
zStmt = Xsqlite3MPrintf(tls, db,
- ts+11271 /* "CREATE %s %.*s" */, libc.VaList(bp+8, zType2, n, (*Parse)(unsafe.Pointer(pParse)).FsNameToken.Fz))
+ ts+11724 /* "CREATE %s %.*s" */, libc.VaList(bp+8, zType2, n, (*Parse)(unsafe.Pointer(pParse)).FsNameToken.Fz))
}
// A slot for the record has already been allocated in the
@@ -93408,7 +95753,7 @@ func Xsqlite3EndTable(tls *libc.TLS, pParse uintptr, pCons uintptr, pEnd uintptr
// the information we've collected.
Xsqlite3NestedParse(tls, pParse,
- ts+11286, /* "UPDATE %Q.sqlite..." */
+ ts+11739, /* "UPDATE %Q.sqlite..." */
libc.VaList(bp+32, (*Db)(unsafe.Pointer((*Sqlite3)(unsafe.Pointer(db)).FaDb+uintptr(iDb)*32)).FzDbSName,
zType,
(*Table)(unsafe.Pointer(p)).FzName,
@@ -93421,19 +95766,19 @@ func Xsqlite3EndTable(tls *libc.TLS, pParse uintptr, pCons uintptr, pEnd uintptr
// Check to see if we need to create an sqlite_sequence table for
// keeping track of autoincrement keys.
- if ((*Table)(unsafe.Pointer(p)).FtabFlags & U32(TF_Autoincrement)) != U32(0) {
+ if (((*Table)(unsafe.Pointer(p)).FtabFlags & U32(TF_Autoincrement)) != U32(0)) && !(int32((*Parse)(unsafe.Pointer(pParse)).FeParseMode) != PARSE_MODE_NORMAL) {
var pDb uintptr = ((*Sqlite3)(unsafe.Pointer(db)).FaDb + uintptr(iDb)*32)
if (*Schema)(unsafe.Pointer((*Db)(unsafe.Pointer(pDb)).FpSchema)).FpSeqTab == uintptr(0) {
Xsqlite3NestedParse(tls, pParse,
- ts+11384, /* "CREATE TABLE %Q...." */
+ ts+11837, /* "CREATE TABLE %Q...." */
libc.VaList(bp+88, (*Db)(unsafe.Pointer(pDb)).FzDbSName))
}
}
// Reparse everything to update our internal data structures
Xsqlite3VdbeAddParseSchemaOp(tls, v, iDb,
- Xsqlite3MPrintf(tls, db, ts+11426 /* "tbl_name='%q' AN..." */, libc.VaList(bp+96, (*Table)(unsafe.Pointer(p)).FzName)), uint16(0))
+ Xsqlite3MPrintf(tls, db, ts+11879 /* "tbl_name='%q' AN..." */, libc.VaList(bp+96, (*Table)(unsafe.Pointer(p)).FzName)), uint16(0))
}
// Add the table to the in-memory representation of the database.
@@ -93449,6 +95794,15 @@ func Xsqlite3EndTable(tls *libc.TLS, pParse uintptr, pCons uintptr, pEnd uintptr
}
(*Parse)(unsafe.Pointer(pParse)).FpNewTable = uintptr(0)
*(*U32)(unsafe.Pointer(db + 44 /* &.mDbFlags */)) |= (U32(DBFLAG_SchemaChange))
+
+ // 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, (*Table)(unsafe.Pointer(p)).FzName, ts+8345 /* "sqlite_sequence" */) == 0 {
+
+ (*Schema)(unsafe.Pointer((*Table)(unsafe.Pointer(p)).FpSchema)).FpSeqTab = p
+ }
}
if !(pSelect != 0) && !(int32((*Table)(unsafe.Pointer(p)).FpSelect) != 0) {
@@ -93461,7 +95815,7 @@ func Xsqlite3EndTable(tls *libc.TLS, pParse uintptr, pCons uintptr, pEnd uintptr
}
// The parser calls this routine in order to create a new VIEW
-func Xsqlite3CreateView(tls *libc.TLS, pParse uintptr, pBegin uintptr, pName1 uintptr, pName2 uintptr, pCNames uintptr, pSelect uintptr, isTemp int32, noErr int32) { /* sqlite3.c:114258:21: */
+func Xsqlite3CreateView(tls *libc.TLS, pParse uintptr, pBegin uintptr, pName1 uintptr, pName2 uintptr, pCNames uintptr, pSelect uintptr, isTemp int32, noErr int32) { /* sqlite3.c:115129:21: */
bp := tls.Alloc(120)
defer tls.Free(120)
@@ -93482,7 +95836,7 @@ func Xsqlite3CreateView(tls *libc.TLS, pParse uintptr, pBegin uintptr, pName1 ui
if !(int32((*Parse)(unsafe.Pointer(pParse)).FnVar) > 0) {
goto __1
}
- Xsqlite3ErrorMsg(tls, pParse, ts+11460 /* "parameters are n..." */, 0)
+ Xsqlite3ErrorMsg(tls, pParse, ts+11913 /* "parameters are n..." */, 0)
goto create_view_fail
__1:
;
@@ -93494,9 +95848,17 @@ __1:
goto create_view_fail
__2:
;
+
+ // Legacy versions of SQLite allowed the use of the magic "rowid" column
+ // on a view, even though views do not have rowids. The following flag
+ // setting fixes this problem. But the fix can be disabled by compiling
+ // with -DSQLITE_ALLOW_ROWID_IN_VIEW in case there are legacy apps that
+ // depend upon the old buggy behavior.
+ *(*U32)(unsafe.Pointer(p + 64 /* &.tabFlags */)) |= (U32(TF_NoVisibleRowid))
+
Xsqlite3TwoPartName(tls, pParse, pName1, pName2, bp /* &pName */)
iDb = Xsqlite3SchemaToIndex(tls, db, (*Table)(unsafe.Pointer(p)).FpSchema)
- Xsqlite3FixInit(tls, bp+8 /* &sFix */, pParse, iDb, ts+8778 /* "view" */, *(*uintptr)(unsafe.Pointer(bp /* pName */)))
+ Xsqlite3FixInit(tls, bp+8 /* &sFix */, pParse, iDb, ts+9208 /* "view" */, *(*uintptr)(unsafe.Pointer(bp /* pName */)))
if !(Xsqlite3FixSelect(tls, bp+8 /* &sFix */, pSelect) != 0) {
goto __3
}
@@ -93531,7 +95893,7 @@ __6:
// the end.
*(*Token)(unsafe.Pointer(bp + 104 /* sEnd */)) = (*Parse)(unsafe.Pointer(pParse)).FsLastToken
- if !(int32(*(*int8)(unsafe.Pointer((*Token)(unsafe.Pointer(bp + 104 /* &sEnd */)).Fz))) != ';') {
+ if !(int32(*(*uint8)(unsafe.Pointer((*Token)(unsafe.Pointer(bp + 104 /* &sEnd */)).Fz))) != ';') {
goto __7
}
*(*uintptr)(unsafe.Pointer(bp + 104 /* &sEnd */ /* &.z */)) += (uintptr((*Token)(unsafe.Pointer(bp + 104 /* &sEnd */)).Fn))
@@ -93542,7 +95904,7 @@ __7:
z = (*Token)(unsafe.Pointer(pBegin)).Fz
__8:
- if !((int32(Xsqlite3CtypeMap[uint8(*(*int8)(unsafe.Pointer(z + uintptr((n - 1)))))]) & 0x01) != 0) {
+ if !((int32(Xsqlite3CtypeMap[uint8(*(*uint8)(unsafe.Pointer(z + uintptr((n - 1)))))]) & 0x01) != 0) {
goto __9
}
n--
@@ -93570,7 +95932,7 @@ __10:
// The Table structure pTable is really a VIEW. Fill in the names of
// the columns of the view in the pTable structure. Return the number
// of errors. If an error is seen leave an error message in pParse->zErrMsg.
-func Xsqlite3ViewGetColumnNames(tls *libc.TLS, pParse uintptr, pTable uintptr) int32 { /* sqlite3.c:114339:20: */
+func Xsqlite3ViewGetColumnNames(tls *libc.TLS, pParse uintptr, pTable uintptr) int32 { /* sqlite3.c:115220:20: */
bp := tls.Alloc(8)
defer tls.Free(8)
@@ -93613,7 +95975,7 @@ func Xsqlite3ViewGetColumnNames(tls *libc.TLS, pParse uintptr, pTable uintptr) i
// CREATE TEMP VIEW ex1 AS SELECT a FROM ex1;
// SELECT * FROM temp.ex1;
if int32((*Table)(unsafe.Pointer(pTable)).FnCol) < 0 {
- Xsqlite3ErrorMsg(tls, pParse, ts+11496 /* "view %s is circu..." */, libc.VaList(bp, (*Table)(unsafe.Pointer(pTable)).FzName))
+ Xsqlite3ErrorMsg(tls, pParse, ts+11949 /* "view %s is circu..." */, libc.VaList(bp, (*Table)(unsafe.Pointer(pTable)).FzName))
return 1
}
@@ -93635,7 +95997,7 @@ func Xsqlite3ViewGetColumnNames(tls *libc.TLS, pParse uintptr, pTable uintptr) i
(*Sqlite3)(unsafe.Pointer(db)).Flookaside.Fsz = U16(0)
xAuth = (*Sqlite3)(unsafe.Pointer(db)).FxAuth
(*Sqlite3)(unsafe.Pointer(db)).FxAuth = uintptr(0)
- pSelTab = Xsqlite3ResultSetOfSelect(tls, pParse, pSel, int8(SQLITE_AFF_NONE))
+ pSelTab = Xsqlite3ResultSetOfSelect(tls, pParse, pSel, uint8(SQLITE_AFF_NONE))
(*Sqlite3)(unsafe.Pointer(db)).FxAuth = xAuth
(*Parse)(unsafe.Pointer(pParse)).FnTab = n
if pSelTab == uintptr(0) {
@@ -93653,7 +96015,7 @@ func Xsqlite3ViewGetColumnNames(tls *libc.TLS, pParse uintptr, pTable uintptr) i
((*Parse)(unsafe.Pointer(pParse)).FnErr == 0)) &&
(int32((*Table)(unsafe.Pointer(pTable)).FnCol) == (*ExprList)(unsafe.Pointer((*Select)(unsafe.Pointer(pSel)).FpEList)).FnExpr) {
Xsqlite3SelectAddColumnTypeAndCollation(tls, pParse, pTable, pSel,
- int8(SQLITE_AFF_NONE))
+ uint8(SQLITE_AFF_NONE))
}
} else {
// CREATE VIEW name AS... without an argument list. Construct
@@ -93690,7 +96052,7 @@ func Xsqlite3ViewGetColumnNames(tls *libc.TLS, pParse uintptr, pTable uintptr) i
}
// Clear the column names from every VIEW in database idx.
-func sqliteViewResetAll(tls *libc.TLS, db uintptr, idx int32) { /* sqlite3.c:114470:13: */
+func sqliteViewResetAll(tls *libc.TLS, db uintptr, idx int32) { /* sqlite3.c:115351:13: */
var i uintptr
if !((int32((*Schema)(unsafe.Pointer((*Db)(unsafe.Pointer((*Sqlite3)(unsafe.Pointer((db))).FaDb+uintptr(idx)*32)).FpSchema)).FschemaFlags) & (DB_UnresetViews)) == (DB_UnresetViews)) {
@@ -93722,7 +96084,7 @@ func sqliteViewResetAll(tls *libc.TLS, db uintptr, idx int32) { /* sqlite3.c:114
// We must continue looping until all tables and indices with
// rootpage==iFrom have been converted to have a rootpage of iTo
// in order to be certain that we got the right one.
-func Xsqlite3RootPageMoved(tls *libc.TLS, db uintptr, iDb int32, iFrom Pgno, iTo Pgno) { /* sqlite3.c:114506:21: */
+func Xsqlite3RootPageMoved(tls *libc.TLS, db uintptr, iDb int32, iFrom Pgno, iTo Pgno) { /* sqlite3.c:115387:21: */
var pElem uintptr
var pHash uintptr
var pDb uintptr
@@ -93748,14 +96110,14 @@ func Xsqlite3RootPageMoved(tls *libc.TLS, db uintptr, iDb int32, iFrom Pgno, iTo
// Also write code to modify the sqlite_schema table and internal schema
// if a root-page of another table is moved by the btree-layer whilst
// erasing iTable (this can happen with an auto-vacuum database).
-func destroyRootPage(tls *libc.TLS, pParse uintptr, iTable int32, iDb int32) { /* sqlite3.c:114536:13: */
+func destroyRootPage(tls *libc.TLS, pParse uintptr, iTable int32, iDb int32) { /* sqlite3.c:115417:13: */
bp := tls.Alloc(32)
defer tls.Free(32)
var v uintptr = Xsqlite3GetVdbe(tls, pParse)
var r1 int32 = Xsqlite3GetTempReg(tls, pParse)
if iTable < 2 {
- Xsqlite3ErrorMsg(tls, pParse, ts+11526 /* "corrupt schema" */, 0)
+ Xsqlite3ErrorMsg(tls, pParse, ts+11979 /* "corrupt schema" */, 0)
}
Xsqlite3VdbeAddOp3(tls, v, OP_Destroy, iTable, r1, iDb)
Xsqlite3MayAbort(tls, pParse)
@@ -93769,7 +96131,7 @@ func destroyRootPage(tls *libc.TLS, pParse uintptr, iTable int32, iDb int32) { /
// token for additional information.
Xsqlite3NestedParse(tls, pParse,
- ts+11541, /* "UPDATE %Q.sqlite..." */
+ ts+11994, /* "UPDATE %Q.sqlite..." */
libc.VaList(bp, (*Db)(unsafe.Pointer((*Sqlite3)(unsafe.Pointer((*Parse)(unsafe.Pointer(pParse)).Fdb)).FaDb+uintptr(iDb)*32)).FzDbSName, iTable, r1, r1))
Xsqlite3ReleaseTempReg(tls, pParse, r1)
}
@@ -93778,7 +96140,7 @@ func destroyRootPage(tls *libc.TLS, pParse uintptr, iTable int32, iDb int32) { /
// Code to update the sqlite_schema tables and internal schema definitions
// in case a root-page belonging to another table is moved by the btree layer
// is also added (this can happen with an auto-vacuum database).
-func destroyTable(tls *libc.TLS, pParse uintptr, pTab uintptr) { /* sqlite3.c:114566:13: */
+func destroyTable(tls *libc.TLS, pParse uintptr, pTab uintptr) { /* sqlite3.c:115447:13: */
// If the database may be auto-vacuum capable (if SQLITE_OMIT_AUTOVACUUM
// is not defined), then it is important to call OP_Destroy on the
// table and index root-pages in order, starting with the numerically
@@ -93824,26 +96186,26 @@ func destroyTable(tls *libc.TLS, pParse uintptr, pTab uintptr) { /* sqlite3.c:11
// Remove entries from the sqlite_statN tables (for N in (1,2,3))
// after a DROP INDEX or DROP TABLE command.
-func sqlite3ClearStatTables(tls *libc.TLS, pParse uintptr, iDb int32, zType uintptr, zName uintptr) { /* sqlite3.c:114615:13: */
+func sqlite3ClearStatTables(tls *libc.TLS, pParse uintptr, iDb int32, zType uintptr, zName uintptr) { /* sqlite3.c:115496:13: */
bp := tls.Alloc(64)
defer tls.Free(64)
var i int32
var zDbName uintptr = (*Db)(unsafe.Pointer((*Sqlite3)(unsafe.Pointer((*Parse)(unsafe.Pointer(pParse)).Fdb)).FaDb + uintptr(iDb)*32)).FzDbSName
for i = 1; i <= 4; i++ {
- // var zTab [24]int8 at bp+40, 24
+ // var zTab [24]uint8 at bp+40, 24
- Xsqlite3_snprintf(tls, int32(unsafe.Sizeof([24]int8{})), bp+40 /* &zTab[0] */, ts+11608 /* "sqlite_stat%d" */, libc.VaList(bp, i))
+ Xsqlite3_snprintf(tls, int32(unsafe.Sizeof([24]uint8{})), bp+40 /* &zTab[0] */, ts+12061 /* "sqlite_stat%d" */, libc.VaList(bp, i))
if Xsqlite3FindTable(tls, (*Parse)(unsafe.Pointer(pParse)).Fdb, bp+40 /* &zTab[0] */, zDbName) != 0 {
Xsqlite3NestedParse(tls, pParse,
- ts+9565, /* "DELETE FROM %Q.%..." */
+ ts+10024, /* "DELETE FROM %Q.%..." */
libc.VaList(bp+8, zDbName, bp+40 /* &zTab[0] */, zType, zName))
}
}
}
// Generate code to drop a table.
-func Xsqlite3CodeDropTable(tls *libc.TLS, pParse uintptr, pTab uintptr, iDb int32, isView int32) { /* sqlite3.c:114638:21: */
+func Xsqlite3CodeDropTable(tls *libc.TLS, pParse uintptr, pTab uintptr, iDb int32, isView int32) { /* sqlite3.c:115519:21: */
bp := tls.Alloc(32)
defer tls.Free(32)
@@ -93876,7 +96238,7 @@ func Xsqlite3CodeDropTable(tls *libc.TLS, pParse uintptr, pTab uintptr, iDb int3
// move as a result of the drop (can happen in auto-vacuum mode).
if ((*Table)(unsafe.Pointer(pTab)).FtabFlags & U32(TF_Autoincrement)) != 0 {
Xsqlite3NestedParse(tls, pParse,
- ts+11622, /* "DELETE FROM %Q.s..." */
+ ts+12075, /* "DELETE FROM %Q.s..." */
libc.VaList(bp, (*Db)(unsafe.Pointer(pDb)).FzDbSName, (*Table)(unsafe.Pointer(pTab)).FzName))
}
@@ -93888,7 +96250,7 @@ func Xsqlite3CodeDropTable(tls *libc.TLS, pParse uintptr, pTab uintptr, iDb int3
// database.
Xsqlite3NestedParse(tls, pParse,
- ts+11667, /* "DELETE FROM %Q.s..." */
+ ts+12120, /* "DELETE FROM %Q.s..." */
libc.VaList(bp+16, (*Db)(unsafe.Pointer(pDb)).FzDbSName, (*Table)(unsafe.Pointer(pTab)).FzName))
if !(isView != 0) && !((*Table)(unsafe.Pointer(pTab)).FnModuleArg != 0) {
destroyTable(tls, pParse, pTab)
@@ -93907,7 +96269,7 @@ func Xsqlite3CodeDropTable(tls *libc.TLS, pParse uintptr, pTab uintptr, iDb int3
// Return TRUE if shadow tables should be read-only in the current
// context.
-func Xsqlite3ReadOnlyShadowTables(tls *libc.TLS, db uintptr) int32 { /* sqlite3.c:114711:20: */
+func Xsqlite3ReadOnlyShadowTables(tls *libc.TLS, db uintptr) int32 { /* sqlite3.c:115592:20: */
if ((((*Sqlite3)(unsafe.Pointer(db)).Fflags & uint64(SQLITE_Defensive)) != uint64(0)) &&
((*Sqlite3)(unsafe.Pointer(db)).FpVtabCtx == uintptr(0))) &&
((*Sqlite3)(unsafe.Pointer(db)).FnVdbeExec == 0) {
@@ -93917,12 +96279,12 @@ func Xsqlite3ReadOnlyShadowTables(tls *libc.TLS, db uintptr) int32 { /* sqlite3.
}
// Return true if it is not allowed to drop the given table
-func tableMayNotBeDropped(tls *libc.TLS, db uintptr, pTab uintptr) int32 { /* sqlite3.c:114726:12: */
- if Xsqlite3_strnicmp(tls, (*Table)(unsafe.Pointer(pTab)).FzName, ts+6950 /* "sqlite_" */, 7) == 0 {
- if Xsqlite3_strnicmp(tls, ((*Table)(unsafe.Pointer(pTab)).FzName+uintptr(7)), ts+2341 /* "stat" */, 4) == 0 {
+func tableMayNotBeDropped(tls *libc.TLS, db uintptr, pTab uintptr) int32 { /* sqlite3.c:115607:12: */
+ if Xsqlite3_strnicmp(tls, (*Table)(unsafe.Pointer(pTab)).FzName, ts+7081 /* "sqlite_" */, 7) == 0 {
+ if Xsqlite3_strnicmp(tls, ((*Table)(unsafe.Pointer(pTab)).FzName+uintptr(7)), ts+2413 /* "stat" */, 4) == 0 {
return 0
}
- if Xsqlite3_strnicmp(tls, ((*Table)(unsafe.Pointer(pTab)).FzName+uintptr(7)), ts+6019 /* "parameters" */, 10) == 0 {
+ if Xsqlite3_strnicmp(tls, ((*Table)(unsafe.Pointer(pTab)).FzName+uintptr(7)), ts+6150 /* "parameters" */, 10) == 0 {
return 0
}
return 1
@@ -93935,7 +96297,7 @@ func tableMayNotBeDropped(tls *libc.TLS, db uintptr, pTab uintptr) int32 { /* sq
// This routine is called to do the work of a DROP TABLE statement.
// pName is the name of the table to be dropped.
-func Xsqlite3DropTable(tls *libc.TLS, pParse uintptr, pName uintptr, isView int32, noErr int32) { /* sqlite3.c:114742:21: */
+func Xsqlite3DropTable(tls *libc.TLS, pParse uintptr, pName uintptr, isView int32, noErr int32) { /* sqlite3.c:115623:21: */
bp := tls.Alloc(24)
defer tls.Free(24)
@@ -93984,6 +96346,7 @@ __4:
goto __6
}
Xsqlite3CodeVerifyNamedSchema(tls, pParse, (*SrcItem)(unsafe.Pointer((pName + 8 /* &.a */))).FzDatabase)
+ sqlite3ForceNotReadOnly(tls, pParse)
__6:
;
goto exit_drop_table
@@ -94002,9 +96365,9 @@ __7:
zTab = func() uintptr {
if (!(0 != 0)) && (iDb == 1) {
- return ts + 10419 /* "sqlite_temp_mast..." */
+ return ts + 10872 /* "sqlite_temp_mast..." */
}
- return ts + 4825 /* "sqlite_master" */
+ return ts + 4956 /* "sqlite_master" */
}()
zDb = (*Db)(unsafe.Pointer((*Sqlite3)(unsafe.Pointer(db)).FaDb + uintptr(iDb)*32)).FzDbSName
zArg2 = uintptr(0)
@@ -94064,7 +96427,7 @@ __18:
if !(tableMayNotBeDropped(tls, db, pTab) != 0) {
goto __19
}
- Xsqlite3ErrorMsg(tls, pParse, ts+11734 /* "table %s may not..." */, libc.VaList(bp, (*Table)(unsafe.Pointer(pTab)).FzName))
+ Xsqlite3ErrorMsg(tls, pParse, ts+12187 /* "table %s may not..." */, libc.VaList(bp, (*Table)(unsafe.Pointer(pTab)).FzName))
goto exit_drop_table
__19:
;
@@ -94074,14 +96437,14 @@ __19:
if !((isView != 0) && ((*Table)(unsafe.Pointer(pTab)).FpSelect == uintptr(0))) {
goto __20
}
- Xsqlite3ErrorMsg(tls, pParse, ts+11762 /* "use DROP TABLE t..." */, libc.VaList(bp+8, (*Table)(unsafe.Pointer(pTab)).FzName))
+ Xsqlite3ErrorMsg(tls, pParse, ts+12215 /* "use DROP TABLE t..." */, libc.VaList(bp+8, (*Table)(unsafe.Pointer(pTab)).FzName))
goto exit_drop_table
__20:
;
if !(!(isView != 0) && ((*Table)(unsafe.Pointer(pTab)).FpSelect != 0)) {
goto __21
}
- Xsqlite3ErrorMsg(tls, pParse, ts+11796 /* "use DROP VIEW to..." */, libc.VaList(bp+16, (*Table)(unsafe.Pointer(pTab)).FzName))
+ Xsqlite3ErrorMsg(tls, pParse, ts+12249 /* "use DROP VIEW to..." */, libc.VaList(bp+16, (*Table)(unsafe.Pointer(pTab)).FzName))
goto exit_drop_table
__21:
;
@@ -94096,7 +96459,7 @@ __21:
if !(!(isView != 0)) {
goto __23
}
- sqlite3ClearStatTables(tls, pParse, iDb, ts+9757 /* "tbl" */, (*Table)(unsafe.Pointer(pTab)).FzName)
+ sqlite3ClearStatTables(tls, pParse, iDb, ts+10216 /* "tbl" */, (*Table)(unsafe.Pointer(pTab)).FzName)
Xsqlite3FkDropTable(tls, pParse, pName, pTab)
__23:
;
@@ -94122,7 +96485,7 @@ exit_drop_table:
//
// The foreign key is set for IMMEDIATE processing. A subsequent call
// to sqlite3DeferForeignKey() might change this to DEFERRED.
-func Xsqlite3CreateForeignKey(tls *libc.TLS, pParse uintptr, pFromCol uintptr, pTo uintptr, pToCol uintptr, flags int32) { /* sqlite3.c:114859:21: */
+func Xsqlite3CreateForeignKey(tls *libc.TLS, pParse uintptr, pFromCol uintptr, pTo uintptr, pToCol uintptr, flags int32) { /* sqlite3.c:115743:21: */
bp := tls.Alloc(24)
defer tls.Free(24)
@@ -94161,7 +96524,7 @@ __4:
goto __5
}
Xsqlite3ErrorMsg(tls, pParse,
- ts+11828, /* "foreign key on %..." */
+ ts+12281, /* "foreign key on %..." */
libc.VaList(bp, (*Column)(unsafe.Pointer((*Table)(unsafe.Pointer(p)).FaCol+uintptr(iCol)*32)).FzName, pTo))
goto fk_end
__5:
@@ -94174,7 +96537,7 @@ __2:
}
Xsqlite3ErrorMsg(tls, pParse,
- ts+11891 /* "number of column..." */, 0)
+ ts+12344 /* "number of column..." */, 0)
goto fk_end
goto __7
__6:
@@ -94220,7 +96583,7 @@ __12:
__13:
;
libc.Xmemcpy(tls, z, (*Token)(unsafe.Pointer(pTo)).Fz, uint64((*Token)(unsafe.Pointer(pTo)).Fn))
- *(*int8)(unsafe.Pointer(z + uintptr((*Token)(unsafe.Pointer(pTo)).Fn))) = int8(0)
+ *(*uint8)(unsafe.Pointer(z + uintptr((*Token)(unsafe.Pointer(pTo)).Fn))) = uint8(0)
Xsqlite3Dequote(tls, z)
z += (uintptr((*Token)(unsafe.Pointer(pTo)).Fn + uint32(1)))
(*FKey)(unsafe.Pointer(pFKey)).FnCol = nCol
@@ -94258,7 +96621,7 @@ __21:
goto __23
}
Xsqlite3ErrorMsg(tls, pParse,
- ts+11985, /* "unknown column \"..." */
+ ts+12438, /* "unknown column \"..." */
libc.VaList(bp+16, (*ExprList_item)(unsafe.Pointer((pFromCol+8 /* &.a */)+uintptr(i)*32)).FzEName))
goto fk_end
__23:
@@ -94295,7 +96658,7 @@ __26:
__29:
;
libc.Xmemcpy(tls, z, (*ExprList_item)(unsafe.Pointer((pToCol+8 /* &.a */)+uintptr(i)*32)).FzEName, uint64(n))
- *(*int8)(unsafe.Pointer(z + uintptr(n))) = int8(0)
+ *(*uint8)(unsafe.Pointer(z + uintptr(n))) = uint8(0)
z += (uintptr(n + 1))
goto __27
__27:
@@ -94343,7 +96706,7 @@ fk_end:
// parameter is 1 for INITIALLY DEFERRED and 0 for INITIALLY IMMEDIATE.
// The behavior of the most recently created foreign key is adjusted
// accordingly.
-func Xsqlite3DeferForeignKey(tls *libc.TLS, pParse uintptr, isDeferred int32) { /* sqlite3.c:114989:21: */
+func Xsqlite3DeferForeignKey(tls *libc.TLS, pParse uintptr, isDeferred int32) { /* sqlite3.c:115873:21: */
var pTab uintptr
var pFKey uintptr
if ((libc.AssignUintptr(&pTab, (*Parse)(unsafe.Pointer(pParse)).FpNewTable)) == uintptr(0)) || ((libc.AssignUintptr(&pFKey, (*Table)(unsafe.Pointer(pTab)).FpFKey)) == uintptr(0)) {
@@ -94362,7 +96725,7 @@ func Xsqlite3DeferForeignKey(tls *libc.TLS, pParse uintptr, isDeferred int32) {
// root page number of the index. If memRootPage is negative, then
// the index already exists and must be cleared before being refilled and
// the root page number of the index is taken from pIndex->tnum.
-func sqlite3RefillIndex(tls *libc.TLS, pParse uintptr, pIndex uintptr, memRootPage int32) { /* sqlite3.c:115010:13: */
+func sqlite3RefillIndex(tls *libc.TLS, pParse uintptr, pIndex uintptr, memRootPage int32) { /* sqlite3.c:115894:13: */
bp := tls.Alloc(4)
defer tls.Free(4)
@@ -94449,7 +96812,7 @@ func sqlite3RefillIndex(tls *libc.TLS, pParse uintptr, pIndex uintptr, memRootPa
addr2 = Xsqlite3VdbeCurrentAddr(tls, v)
}
Xsqlite3VdbeAddOp3(tls, v, OP_SorterData, iSorter, regRecord, iIdx)
- if !((int32(*(*uint16)(unsafe.Pointer(pIndex + 100 /* &.bAscKeyBug */)) >> 6 & 0x1)) != 0) {
+ if !((int32(*(*uint16)(unsafe.Pointer(pIndex + 100 /* &.bAscKeyBug */)) & 0x40 >> 6)) != 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
@@ -94474,7 +96837,7 @@ func sqlite3RefillIndex(tls *libc.TLS, pParse uintptr, pIndex uintptr, memRootPa
// Increase the allocation size to provide an extra nExtra bytes
// of 8-byte aligned space after the Index object and return a
// pointer to this extra space in *ppExtra.
-func Xsqlite3AllocateIndexObject(tls *libc.TLS, db uintptr, nCol I16, nExtra int32, ppExtra uintptr) uintptr { /* sqlite3.c:115116:22: */
+func Xsqlite3AllocateIndexObject(tls *libc.TLS, db uintptr, nCol I16, nExtra int32, ppExtra uintptr) uintptr { /* sqlite3.c:116000:22: */
var p uintptr // Allocated index object
var nByte int32 // Bytes of space for Index object + arrays
@@ -94499,21 +96862,21 @@ func Xsqlite3AllocateIndexObject(tls *libc.TLS, db uintptr, nCol I16, nExtra int
// If expression list pList contains an expression that was parsed with
// an explicit "NULLS FIRST" or "NULLS LAST" clause, leave an error in
// pParse and return non-zero. Otherwise, return zero.
-func Xsqlite3HasExplicitNulls(tls *libc.TLS, pParse uintptr, pList uintptr) int32 { /* sqlite3.c:115149:20: */
+func Xsqlite3HasExplicitNulls(tls *libc.TLS, pParse uintptr, pList uintptr) int32 { /* sqlite3.c:116033:20: */
bp := tls.Alloc(8)
defer tls.Free(8)
if pList != 0 {
var i int32
for i = 0; i < (*ExprList)(unsafe.Pointer(pList)).FnExpr; i++ {
- if (uint32(int32(*(*uint8)(unsafe.Pointer((pList + 8 /* &.a */) + uintptr(i)*32 + 20 /* &.bNulls */)) >> 2 & 0x1))) != 0 {
+ if (uint32(int32(*(*uint8)(unsafe.Pointer((pList + 8 /* &.a */) + uintptr(i)*32 + 20 /* &.bNulls */)) & 0x4 >> 2))) != 0 {
var sf U8 = (*ExprList_item)(unsafe.Pointer((pList + 8 /* &.a */) + uintptr(i)*32)).FsortFlags
- Xsqlite3ErrorMsg(tls, pParse, ts+12031, /* "unsupported use ..." */
+ Xsqlite3ErrorMsg(tls, pParse, ts+12484, /* "unsupported use ..." */
libc.VaList(bp, func() uintptr {
if (int32(sf) == 0) || (int32(sf) == 3) {
- return ts + 12059 /* "FIRST" */
+ return ts + 12512 /* "FIRST" */
}
- return ts + 12065 /* "LAST" */
+ return ts + 12518 /* "LAST" */
}()))
return 1
}
@@ -94532,7 +96895,7 @@ func Xsqlite3HasExplicitNulls(tls *libc.TLS, pParse uintptr, pList uintptr) int3
// pList is a list of columns to be indexed. pList will be NULL if this
// is a primary key or unique-constraint on the most recent column added
// to the table currently under construction.
-func Xsqlite3CreateIndex(tls *libc.TLS, pParse uintptr, pName1 uintptr, pName2 uintptr, pTblName uintptr, pList uintptr, onError int32, pStart uintptr, pPIWhere uintptr, sortOrder int32, ifNotExist int32, idxType U8) { /* sqlite3.c:115177:21: */
+func Xsqlite3CreateIndex(tls *libc.TLS, pParse uintptr, pName1 uintptr, pName2 uintptr, pTblName uintptr, pList uintptr, onError int32, pStart uintptr, pPIWhere uintptr, sortOrder int32, ifNotExist int32, idxType U8) { /* sqlite3.c:116061:21: */
bp := tls.Alloc(256)
defer tls.Free(256)
@@ -94671,7 +97034,7 @@ __9:
__8:
;
- Xsqlite3FixInit(tls, bp+136 /* &sFix */, pParse, iDb, ts+12070 /* "index" */, *(*uintptr)(unsafe.Pointer(bp + 128 /* pName */)))
+ Xsqlite3FixInit(tls, bp+136 /* &sFix */, pParse, iDb, ts+12523 /* "index" */, *(*uintptr)(unsafe.Pointer(bp + 128 /* pName */)))
if !(Xsqlite3FixSrcList(tls, bp+136 /* &sFix */, pTblName) != 0) {
goto __10
}
@@ -94692,7 +97055,7 @@ __11:
goto __12
}
Xsqlite3ErrorMsg(tls, pParse,
- ts+12076, /* "cannot create a ..." */
+ ts+12529, /* "cannot create a ..." */
libc.VaList(bp, (*Table)(unsafe.Pointer(pTab)).FzName))
goto exit_create_index
__12:
@@ -94719,26 +97082,26 @@ __6:
;
pDb = ((*Sqlite3)(unsafe.Pointer(db)).FaDb + uintptr(iDb)*32)
- if !(((Xsqlite3_strnicmp(tls, (*Table)(unsafe.Pointer(pTab)).FzName, ts+6950 /* "sqlite_" */, 7) == 0) &&
+ if !(((Xsqlite3_strnicmp(tls, (*Table)(unsafe.Pointer(pTab)).FzName, ts+7081 /* "sqlite_" */, 7) == 0) &&
(int32((*Sqlite3)(unsafe.Pointer(db)).Finit.Fbusy) == 0)) &&
(pTblName != uintptr(0))) {
goto __15
}
- Xsqlite3ErrorMsg(tls, pParse, ts+12126 /* "table %s may not..." */, libc.VaList(bp+8, (*Table)(unsafe.Pointer(pTab)).FzName))
+ Xsqlite3ErrorMsg(tls, pParse, ts+12579 /* "table %s may not..." */, libc.VaList(bp+8, (*Table)(unsafe.Pointer(pTab)).FzName))
goto exit_create_index
__15:
;
if !((*Table)(unsafe.Pointer(pTab)).FpSelect != 0) {
goto __16
}
- Xsqlite3ErrorMsg(tls, pParse, ts+12154 /* "views may not be..." */, 0)
+ Xsqlite3ErrorMsg(tls, pParse, ts+12607 /* "views may not be..." */, 0)
goto exit_create_index
__16:
;
if !((*Table)(unsafe.Pointer(pTab)).FnModuleArg != 0) {
goto __17
}
- Xsqlite3ErrorMsg(tls, pParse, ts+12179 /* "virtual tables m..." */, 0)
+ Xsqlite3ErrorMsg(tls, pParse, ts+12632 /* "virtual tables m..." */, 0)
goto exit_create_index
__17:
;
@@ -94765,7 +97128,7 @@ __17:
__20:
;
- if !(SQLITE_OK != Xsqlite3CheckObjectName(tls, pParse, zName, ts+12070 /* "index" */, (*Table)(unsafe.Pointer(pTab)).FzName)) {
+ if !(SQLITE_OK != Xsqlite3CheckObjectName(tls, pParse, zName, ts+12523 /* "index" */, (*Table)(unsafe.Pointer(pTab)).FzName)) {
goto __21
}
goto exit_create_index
@@ -94780,7 +97143,7 @@ __21:
if !(Xsqlite3FindTable(tls, db, zName, uintptr(0)) != uintptr(0)) {
goto __24
}
- Xsqlite3ErrorMsg(tls, pParse, ts+12213 /* "there is already..." */, libc.VaList(bp+16, zName))
+ Xsqlite3ErrorMsg(tls, pParse, ts+12666 /* "there is already..." */, libc.VaList(bp+16, zName))
goto exit_create_index
__24:
;
@@ -94792,11 +97155,12 @@ __23:
if !(!(ifNotExist != 0)) {
goto __26
}
- Xsqlite3ErrorMsg(tls, pParse, ts+12247 /* "index %s already..." */, libc.VaList(bp+24, zName))
+ Xsqlite3ErrorMsg(tls, pParse, ts+12700 /* "index %s already..." */, libc.VaList(bp+24, zName))
goto __27
__26:
;
Xsqlite3CodeVerifySchema(tls, pParse, iDb)
+ sqlite3ForceNotReadOnly(tls, pParse)
__27:
;
goto exit_create_index
@@ -94820,7 +97184,7 @@ __29:
goto __30
__30:
;
- zName = Xsqlite3MPrintf(tls, db, ts+12271 /* "sqlite_autoindex..." */, libc.VaList(bp+32, (*Table)(unsafe.Pointer(pTab)).FzName, n))
+ zName = Xsqlite3MPrintf(tls, db, ts+12724 /* "sqlite_autoindex..." */, libc.VaList(bp+32, (*Table)(unsafe.Pointer(pTab)).FzName, n))
if !(zName == uintptr(0)) {
goto __31
}
@@ -94836,7 +97200,7 @@ __31:
if !(int32((*Parse)(unsafe.Pointer(pParse)).FeParseMode) != PARSE_MODE_NORMAL) {
goto __32
}
- *(*int8)(unsafe.Pointer(zName + 7))++
+ *(*uint8)(unsafe.Pointer(zName + 7))++
__32:
;
__19:
@@ -94849,9 +97213,9 @@ __19:
zDb = (*Db)(unsafe.Pointer(pDb)).FzDbSName
if !(Xsqlite3AuthCheck(tls, pParse, SQLITE_INSERT, func() uintptr {
if (!(0 != 0)) && (iDb == 1) {
- return ts + 10419 /* "sqlite_temp_mast..." */
+ return ts + 10872 /* "sqlite_temp_mast..." */
}
- return ts + 4825 /* "sqlite_master" */
+ return ts + 4956 /* "sqlite_master" */
}(), uintptr(0), zDb) != 0) {
goto __34
}
@@ -94895,7 +97259,7 @@ __39:
Xsqlite3ExprListSetSortOrder(tls, pList, sortOrder, -1)
goto __38
__37:
- Xsqlite3ExprListCheckLength(tls, pParse, pList, ts+12070 /* "index" */)
+ Xsqlite3ExprListCheckLength(tls, pParse, pList, ts+12523 /* "index" */)
if !((*Parse)(unsafe.Pointer(pParse)).FnErr != 0) {
goto __40
}
@@ -94950,8 +97314,8 @@ __45:
libc.Xmemcpy(tls, (*Index)(unsafe.Pointer(pIndex)).FzName, zName, (uint64(nName + 1)))
(*Index)(unsafe.Pointer(pIndex)).FpTable = pTab
(*Index)(unsafe.Pointer(pIndex)).FonError = U8(onError)
- libc.SetBitFieldPtr16Uint32(pIndex+100 /* &.uniqNotNull */, (uint32(libc.Bool32(onError != OE_None))), 3, 0x8)
- libc.SetBitFieldPtr16Uint32(pIndex+100 /* &.idxType */, uint32(idxType), 0, 0x3)
+ libc.SetBitFieldPtr16Uint32(pIndex+100 /* &.uniqNotNull */, (uint32(libc.Bool32(onError != OE_None))), 12, 0x1000)
+ libc.SetBitFieldPtr16Uint32(pIndex+100 /* &.idxType */, uint32(idxType), 14, 0xc000)
(*Index)(unsafe.Pointer(pIndex)).FpSchema = (*Db)(unsafe.Pointer((*Sqlite3)(unsafe.Pointer(db)).FaDb + uintptr(iDb)*32)).FpSchema
(*Index)(unsafe.Pointer(pIndex)).FnKeyCol = U16((*ExprList)(unsafe.Pointer(pList)).FnExpr)
if !(pPIWhere != 0) {
@@ -95012,7 +97376,7 @@ __53:
goto __56
}
Xsqlite3ErrorMsg(tls, pParse,
- ts+12294 /* "expressions proh..." */, 0)
+ ts+12747 /* "expressions proh..." */, 0)
goto exit_create_index
__56:
;
@@ -95025,7 +97389,7 @@ __57:
;
j = -2
*(*I16)(unsafe.Pointer((*Index)(unsafe.Pointer(pIndex)).FaiColumn + uintptr(i)*2)) = int16(-2)
- libc.SetBitFieldPtr16Uint32(pIndex+100 /* &.uniqNotNull */, uint32(0), 3, 0x8)
+ libc.SetBitFieldPtr16Uint32(pIndex+100 /* &.uniqNotNull */, uint32(0), 12, 0x1000)
goto __55
__54:
j = int32((*Expr)(unsafe.Pointer(pCExpr)).FiColumn)
@@ -95039,13 +97403,13 @@ __58:
if !(int32((*Column)(unsafe.Pointer((*Table)(unsafe.Pointer(pTab)).FaCol+uintptr(j)*32)).FnotNull) == 0) {
goto __60
}
- libc.SetBitFieldPtr16Uint32(pIndex+100 /* &.uniqNotNull */, uint32(0), 3, 0x8)
+ libc.SetBitFieldPtr16Uint32(pIndex+100 /* &.uniqNotNull */, uint32(0), 12, 0x1000)
__60:
;
if !((int32((*Column)(unsafe.Pointer((*Table)(unsafe.Pointer(pTab)).FaCol+uintptr(j)*32)).FcolFlags) & COLFLAG_VIRTUAL) != 0) {
goto __61
}
- libc.SetBitFieldPtr16Uint32(pIndex+100 /* &.bHasVCol */, uint32(1), 10, 0x400)
+ libc.SetBitFieldPtr16Uint32(pIndex+100 /* &.bHasVCol */, uint32(1), 5, 0x20)
__61:
;
__59:
@@ -95153,7 +97517,7 @@ __74:
if !((pTblName != uintptr(0)) && (int32((*Index)(unsafe.Pointer(pIndex)).FnColumn) >= int32((*Table)(unsafe.Pointer(pTab)).FnCol))) {
goto __75
}
- libc.SetBitFieldPtr16Uint32(pIndex+100 /* &.isCovering */, uint32(1), 5, 0x20)
+ libc.SetBitFieldPtr16Uint32(pIndex+100 /* &.isCovering */, uint32(1), 10, 0x400)
j = 0
__76:
if !(j < int32((*Table)(unsafe.Pointer(pTab)).FnCol)) {
@@ -95171,7 +97535,7 @@ __79:
goto __77
__80:
;
- libc.SetBitFieldPtr16Uint32(pIndex+100 /* &.isCovering */, uint32(0), 5, 0x20)
+ libc.SetBitFieldPtr16Uint32(pIndex+100 /* &.isCovering */, uint32(0), 10, 0x400)
goto __78
goto __77
__77:
@@ -95241,7 +97605,7 @@ __88:
goto __93
}
Xsqlite3ErrorMsg(tls, pParse,
- ts+12355 /* "conflicting ON C..." */, libc.VaList(bp+48, 0))
+ ts+12808 /* "conflicting ON C..." */, libc.VaList(bp+48, 0))
__93:
;
if !(int32((*Index)(unsafe.Pointer(pIdx)).FonError) == OE_Default) {
@@ -95255,7 +97619,7 @@ __92:
if !(int32(idxType) == SQLITE_IDXTYPE_PRIMARYKEY) {
goto __95
}
- libc.SetBitFieldPtr16Uint32(pIdx+100 /* &.idxType */, uint32(idxType), 0, 0x3)
+ libc.SetBitFieldPtr16Uint32(pIdx+100 /* &.idxType */, uint32(idxType), 14, 0xc000)
__95:
;
if !(int32((*Parse)(unsafe.Pointer(pParse)).FeParseMode) >= PARSE_MODE_RENAME) {
@@ -95297,8 +97661,8 @@ __81:
if !(Xsqlite3IndexHasDuplicateRootPage(tls, pIndex) != 0) {
goto __101
}
- Xsqlite3ErrorMsg(tls, pParse, ts+12397 /* "invalid rootpage" */, 0)
- (*Parse)(unsafe.Pointer(pParse)).Frc = Xsqlite3CorruptError(tls, 115629)
+ Xsqlite3ErrorMsg(tls, pParse, ts+12850 /* "invalid rootpage" */, 0)
+ (*Parse)(unsafe.Pointer(pParse)).Frc = Xsqlite3CorruptError(tls, 116514)
goto exit_create_index
__101:
;
@@ -95348,19 +97712,19 @@ __104:
goto __105
}
n1 = (int32(uint32((int32((int64((*Parse)(unsafe.Pointer(pParse)).FsLastToken.Fz) - int64((*Token)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 128 /* pName */)))).Fz)) / 1))) + (*Parse)(unsafe.Pointer(pParse)).FsLastToken.Fn))
- if !(int32(*(*int8)(unsafe.Pointer((*Token)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 128 /* pName */)))).Fz + uintptr((n1 - 1))))) == ';') {
+ if !(int32(*(*uint8)(unsafe.Pointer((*Token)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 128 /* pName */)))).Fz + uintptr((n1 - 1))))) == ';') {
goto __107
}
n1--
__107:
;
// A named index with an explicit CREATE INDEX statement
- zStmt = Xsqlite3MPrintf(tls, db, ts+12414, /* "CREATE%s INDEX %..." */
+ zStmt = Xsqlite3MPrintf(tls, db, ts+12867, /* "CREATE%s INDEX %..." */
libc.VaList(bp+56, func() uintptr {
if onError == OE_None {
- return ts + 703 /* "" */
+ return ts + 755 /* "" */
}
- return ts + 12434 /* " UNIQUE" */
+ return ts + 12887 /* " UNIQUE" */
}(), n1, (*Token)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 128 /* pName */)))).Fz))
goto __106
__105:
@@ -95372,7 +97736,7 @@ __106:
// Add an entry in sqlite_schema for this index
Xsqlite3NestedParse(tls, pParse,
- ts+12442, /* "INSERT INTO %Q.s..." */
+ ts+12895, /* "INSERT INTO %Q.s..." */
libc.VaList(bp+80, (*Db)(unsafe.Pointer((*Sqlite3)(unsafe.Pointer(db)).FaDb+uintptr(iDb)*32)).FzDbSName,
(*Index)(unsafe.Pointer(pIndex)).FzName,
(*Table)(unsafe.Pointer(pTab)).FzName,
@@ -95388,7 +97752,7 @@ __106:
sqlite3RefillIndex(tls, pParse, pIndex, iMem)
Xsqlite3ChangeCookie(tls, pParse, iDb)
Xsqlite3VdbeAddParseSchemaOp(tls, v, iDb,
- Xsqlite3MPrintf(tls, db, ts+12501 /* "name='%q' AND ty..." */, libc.VaList(bp+120, (*Index)(unsafe.Pointer(pIndex)).FzName)), uint16(0))
+ Xsqlite3MPrintf(tls, db, ts+12954 /* "name='%q' AND ty..." */, libc.VaList(bp+120, (*Index)(unsafe.Pointer(pIndex)).FzName)), uint16(0))
Xsqlite3VdbeAddOp2(tls, v, OP_Expire, 0, 1)
__108:
;
@@ -95489,7 +97853,7 @@ __113:
// Apart from that, we have little to go on besides intuition as to
// how aiRowEst[] should be initialized. The numbers generated here
// are based on typical values found in actual indices.
-func Xsqlite3DefaultRowEst(tls *libc.TLS, pIdx uintptr) { /* sqlite3.c:115784:21: */
+func Xsqlite3DefaultRowEst(tls *libc.TLS, pIdx uintptr) { /* sqlite3.c:116669:21: */
var a uintptr = (*Index)(unsafe.Pointer(pIdx)).FaiRowLogEst
var x LogEst
var nCopy int32 = func() int32 {
@@ -95533,13 +97897,13 @@ func Xsqlite3DefaultRowEst(tls *libc.TLS, pIdx uintptr) { /* sqlite3.c:115784:21
}
}
-var aVal = [5]LogEst{int16(33), int16(32), int16(30), int16(28), int16(26)} /* sqlite3.c:115786:23 */
+var aVal = [5]LogEst{int16(33), int16(32), int16(30), int16(28), int16(26)} /* sqlite3.c:116671:23 */
// This routine will drop an existing named index. This routine
// implements the DROP INDEX statement.
-func Xsqlite3DropIndex(tls *libc.TLS, pParse uintptr, pName uintptr, ifExists int32) { /* sqlite3.c:115828:21: */
- bp := tls.Alloc(40)
- defer tls.Free(40)
+func Xsqlite3DropIndex(tls *libc.TLS, pParse uintptr, pName uintptr, ifExists int32) { /* sqlite3.c:116713:21: */
+ bp := tls.Alloc(32)
+ defer tls.Free(32)
var pIndex uintptr
var v uintptr
@@ -95572,21 +97936,22 @@ __2:
if !(!(ifExists != 0)) {
goto __4
}
- Xsqlite3ErrorMsg(tls, pParse, ts+12528 /* "no such index: %..." */, libc.VaList(bp, pName, 0))
+ Xsqlite3ErrorMsg(tls, pParse, ts+12981 /* "no such index: %..." */, libc.VaList(bp, pName+8 /* &.a */))
goto __5
__4:
Xsqlite3CodeVerifyNamedSchema(tls, pParse, (*SrcItem)(unsafe.Pointer((pName + 8 /* &.a */))).FzDatabase)
+ sqlite3ForceNotReadOnly(tls, pParse)
__5:
;
(*Parse)(unsafe.Pointer(pParse)).FcheckSchema = U8(1)
goto exit_drop_index
__3:
;
- if !((int32(*(*uint16)(unsafe.Pointer(pIndex + 100 /* &.idxType */)) >> 14 & 0x3)) != SQLITE_IDXTYPE_APPDEF) {
+ if !((int32(*(*uint16)(unsafe.Pointer(pIndex + 100 /* &.idxType */)) & 0xc000 >> 14)) != SQLITE_IDXTYPE_APPDEF) {
goto __6
}
Xsqlite3ErrorMsg(tls, pParse,
- ts+12546 /* "index associated..." */, libc.VaList(bp+16, 0))
+ ts+12999 /* "index associated..." */, libc.VaList(bp+8, 0))
goto exit_drop_index
__6:
;
@@ -95597,9 +97962,9 @@ __6:
zDb = (*Db)(unsafe.Pointer((*Sqlite3)(unsafe.Pointer(db)).FaDb + uintptr(iDb)*32)).FzDbSName
zTab = func() uintptr {
if (!(0 != 0)) && (iDb == 1) {
- return ts + 10419 /* "sqlite_temp_mast..." */
+ return ts + 10872 /* "sqlite_temp_mast..." */
}
- return ts + 4825 /* "sqlite_master" */
+ return ts + 4956 /* "sqlite_master" */
}()
if !(Xsqlite3AuthCheck(tls, pParse, SQLITE_DELETE, zTab, uintptr(0), zDb) != 0) {
goto __7
@@ -95607,7 +97972,7 @@ __6:
goto exit_drop_index
__7:
;
- if !(!(0 != 0) && (iDb != 0)) {
+ if !(!(0 != 0) && (iDb == 1)) {
goto __8
}
code = SQLITE_DROP_TEMP_INDEX
@@ -95627,9 +97992,9 @@ __9:
}
Xsqlite3BeginWriteOperation(tls, pParse, 1, iDb)
Xsqlite3NestedParse(tls, pParse,
- ts+12619, /* "DELETE FROM %Q.s..." */
- libc.VaList(bp+24, (*Db)(unsafe.Pointer((*Sqlite3)(unsafe.Pointer(db)).FaDb+uintptr(iDb)*32)).FzDbSName, (*Index)(unsafe.Pointer(pIndex)).FzName))
- sqlite3ClearStatTables(tls, pParse, iDb, ts+9753 /* "idx" */, (*Index)(unsafe.Pointer(pIndex)).FzName)
+ ts+13072, /* "DELETE FROM %Q.s..." */
+ libc.VaList(bp+16, (*Db)(unsafe.Pointer((*Sqlite3)(unsafe.Pointer(db)).FaDb+uintptr(iDb)*32)).FzDbSName, (*Index)(unsafe.Pointer(pIndex)).FzName))
+ sqlite3ClearStatTables(tls, pParse, iDb, ts+10212 /* "idx" */, (*Index)(unsafe.Pointer(pIndex)).FzName)
Xsqlite3ChangeCookie(tls, pParse, iDb)
destroyRootPage(tls, pParse, int32((*Index)(unsafe.Pointer(pIndex)).Ftnum), iDb)
Xsqlite3VdbeAddOp4(tls, v, OP_DropIndex, iDb, 0, 0, (*Index)(unsafe.Pointer(pIndex)).FzName, 0)
@@ -95655,7 +98020,7 @@ exit_drop_index:
//
// Otherwise, if the realloc() fails, *pIdx is set to -1, *pnEntry remains
// unchanged and a copy of pArray returned.
-func Xsqlite3ArrayAllocate(tls *libc.TLS, db uintptr, pArray uintptr, szEntry int32, pnEntry uintptr, pIdx uintptr) uintptr { /* sqlite3.c:115909:21: */
+func Xsqlite3ArrayAllocate(tls *libc.TLS, db uintptr, pArray uintptr, szEntry int32, pnEntry uintptr, pIdx uintptr) uintptr { /* sqlite3.c:116795:21: */
var z uintptr
var n Sqlite3_int64 = Sqlite3_int64(libc.AssignPtrInt32(pIdx, *(*int32)(unsafe.Pointer(pnEntry))))
if (n & (n - int64(1))) == int64(0) {
@@ -95682,7 +98047,7 @@ func Xsqlite3ArrayAllocate(tls *libc.TLS, db uintptr, pArray uintptr, szEntry in
// need be.
//
// A new IdList is returned, or NULL if malloc() fails.
-func Xsqlite3IdListAppend(tls *libc.TLS, pParse uintptr, pList uintptr, pToken uintptr) uintptr { /* sqlite3.c:115939:23: */
+func Xsqlite3IdListAppend(tls *libc.TLS, pParse uintptr, pList uintptr, pToken uintptr) uintptr { /* sqlite3.c:116825:23: */
bp := tls.Alloc(4)
defer tls.Free(4)
@@ -95713,7 +98078,7 @@ func Xsqlite3IdListAppend(tls *libc.TLS, pParse uintptr, pList uintptr, pToken u
}
// Delete an IdList.
-func Xsqlite3IdListDelete(tls *libc.TLS, db uintptr, pList uintptr) { /* sqlite3.c:115967:21: */
+func Xsqlite3IdListDelete(tls *libc.TLS, db uintptr, pList uintptr) { /* sqlite3.c:116853:21: */
var i int32
if pList == uintptr(0) {
return
@@ -95727,7 +98092,7 @@ func Xsqlite3IdListDelete(tls *libc.TLS, db uintptr, pList uintptr) { /* sqlite3
// Return the index in pList of the identifier named zId. Return -1
// if not found.
-func Xsqlite3IdListIndex(tls *libc.TLS, pList uintptr, zName uintptr) int32 { /* sqlite3.c:115981:20: */
+func Xsqlite3IdListIndex(tls *libc.TLS, pList uintptr, zName uintptr) int32 { /* sqlite3.c:116867:20: */
var i int32
if pList == uintptr(0) {
return -1
@@ -95765,7 +98130,7 @@ func Xsqlite3IdListIndex(tls *libc.TLS, pList uintptr, zName uintptr) int32 { /*
// If a memory allocation fails or the SrcList becomes too large, leave
// the original SrcList unchanged, return NULL, and leave an error message
// in pParse.
-func Xsqlite3SrcListEnlarge(tls *libc.TLS, pParse uintptr, pSrc uintptr, nExtra int32, iStart int32) uintptr { /* sqlite3.c:116022:24: */
+func Xsqlite3SrcListEnlarge(tls *libc.TLS, pParse uintptr, pSrc uintptr, nExtra int32, iStart int32) uintptr { /* sqlite3.c:116908:24: */
bp := tls.Alloc(8)
defer tls.Free(8)
@@ -95780,7 +98145,7 @@ func Xsqlite3SrcListEnlarge(tls *libc.TLS, pParse uintptr, pSrc uintptr, nExtra
var db uintptr = (*Parse)(unsafe.Pointer(pParse)).Fdb
if ((*SrcList)(unsafe.Pointer(pSrc)).FnSrc + nExtra) >= SQLITE_MAX_SRCLIST {
- Xsqlite3ErrorMsg(tls, pParse, ts+12679, /* "too many FROM cl..." */
+ Xsqlite3ErrorMsg(tls, pParse, ts+13132, /* "too many FROM cl..." */
libc.VaList(bp, SQLITE_MAX_SRCLIST))
return uintptr(0)
}
@@ -95847,7 +98212,7 @@ func Xsqlite3SrcListEnlarge(tls *libc.TLS, pParse uintptr, pSrc uintptr, nExtra
//
// Both pTable and pDatabase are assumed to be quoted. They are dequoted
// before being added to the SrcList.
-func Xsqlite3SrcListAppend(tls *libc.TLS, pParse uintptr, pList uintptr, pTable uintptr, pDatabase uintptr) uintptr { /* sqlite3.c:116111:24: */
+func Xsqlite3SrcListAppend(tls *libc.TLS, pParse uintptr, pList uintptr, pTable uintptr, pDatabase uintptr) uintptr { /* sqlite3.c:116997:24: */
var pItem uintptr
var db uintptr
// Cannot have C without B
@@ -95886,7 +98251,7 @@ func Xsqlite3SrcListAppend(tls *libc.TLS, pParse uintptr, pList uintptr, pTable
}
// Assign VdbeCursor index numbers to all tables in a SrcList
-func Xsqlite3SrcListAssignCursors(tls *libc.TLS, pParse uintptr, pList uintptr) { /* sqlite3.c:116156:21: */
+func Xsqlite3SrcListAssignCursors(tls *libc.TLS, pParse uintptr, pList uintptr) { /* sqlite3.c:117042:21: */
var i int32
var pItem uintptr
@@ -95918,7 +98283,7 @@ func Xsqlite3SrcListAssignCursors(tls *libc.TLS, pParse uintptr, pList uintptr)
}
// Delete an entire SrcList including all its substructure.
-func Xsqlite3SrcListDelete(tls *libc.TLS, db uintptr, pList uintptr) { /* sqlite3.c:116174:21: */
+func Xsqlite3SrcListDelete(tls *libc.TLS, db uintptr, pList uintptr) { /* sqlite3.c:117060:21: */
var i int32
var pItem uintptr
if pList == uintptr(0) {
@@ -95938,10 +98303,10 @@ __1:
if (*SrcItem)(unsafe.Pointer(pItem)).FzAlias != 0 {
Xsqlite3DbFreeNN(tls, db, (*SrcItem)(unsafe.Pointer(pItem)).FzAlias)
}
- if (uint32(int32(*(*uint8)(unsafe.Pointer(pItem + 60 /* &.fg */ + 4 /* &.isIndexedBy */)) >> 6 & 0x1))) != 0 {
+ if (uint32(int32(*(*uint16)(unsafe.Pointer(pItem + 60 /* &.fg */ + 4 /* &.isIndexedBy */)) & 0x4000 >> 14))) != 0 {
Xsqlite3DbFree(tls, db, *(*uintptr)(unsafe.Pointer(pItem + 96 /* &.u1 */)))
}
- if (uint32(int32(*(*uint8)(unsafe.Pointer(pItem + 60 /* &.fg */ + 4 /* &.isTabFunc */)) >> 5 & 0x1))) != 0 {
+ if (uint32(int32(*(*uint16)(unsafe.Pointer(pItem + 60 /* &.fg */ + 4 /* &.isTabFunc */)) & 0x2000 >> 13))) != 0 {
Xsqlite3ExprListDelete(tls, db, *(*uintptr)(unsafe.Pointer(pItem + 96 /* &.u1 */)))
}
Xsqlite3DeleteTable(tls, db, (*SrcItem)(unsafe.Pointer(pItem)).FpTab)
@@ -95981,7 +98346,7 @@ __3:
//
// Return a new SrcList which encodes is the FROM with the new
// term added.
-func Xsqlite3SrcListAppendFromTerm(tls *libc.TLS, pParse uintptr, p uintptr, pTable uintptr, pDatabase uintptr, pAlias uintptr, pSubquery uintptr, pOn uintptr, pUsing uintptr) uintptr { /* sqlite3.c:116208:24: */
+func Xsqlite3SrcListAppendFromTerm(tls *libc.TLS, pParse uintptr, p uintptr, pTable uintptr, pDatabase uintptr, pAlias uintptr, pSubquery uintptr, pOn uintptr, pUsing uintptr) uintptr { /* sqlite3.c:117094:24: */
bp := tls.Alloc(8)
defer tls.Free(8)
@@ -95992,12 +98357,12 @@ func Xsqlite3SrcListAppendFromTerm(tls *libc.TLS, pParse uintptr, p uintptr, pTa
if !(!(p != 0) && ((pOn != 0) || (pUsing != 0))) {
goto __1
}
- Xsqlite3ErrorMsg(tls, pParse, ts+12715, /* "a JOIN clause is..." */
+ Xsqlite3ErrorMsg(tls, pParse, ts+13168, /* "a JOIN clause is..." */
libc.VaList(bp, func() uintptr {
if pOn != 0 {
- return ts + 12751 /* "ON" */
+ return ts + 13204 /* "ON" */
}
- return ts + 12754 /* "USING" */
+ return ts + 13207 /* "USING" */
}()))
goto append_from_error
__1:
@@ -96045,7 +98410,7 @@ append_from_error:
// Add an INDEXED BY or NOT INDEXED clause to the most recently added
// element of the source-list passed as the second argument.
-func Xsqlite3SrcListIndexedBy(tls *libc.TLS, pParse uintptr, p uintptr, pIndexedBy uintptr) { /* sqlite3.c:116259:21: */
+func Xsqlite3SrcListIndexedBy(tls *libc.TLS, pParse uintptr, p uintptr, pIndexedBy uintptr) { /* sqlite3.c:117145:21: */
if (p != 0) && ((*Token)(unsafe.Pointer(pIndexedBy)).Fn > uint32(0)) {
var pItem uintptr
@@ -96055,10 +98420,10 @@ func Xsqlite3SrcListIndexedBy(tls *libc.TLS, pParse uintptr, p uintptr, pIndexed
if ((*Token)(unsafe.Pointer(pIndexedBy)).Fn == uint32(1)) && !(int32((*Token)(unsafe.Pointer(pIndexedBy)).Fz) != 0) {
// A "NOT INDEXED" clause was supplied. See parse.y
// construct "indexed_opt" for details.
- libc.SetBitFieldPtr8Uint32(pItem+60 /* &.fg */ +4 /* &.notIndexed */, uint32(1), 0, 0x1)
+ libc.SetBitFieldPtr16Uint32(pItem+60 /* &.fg */ +4 /* &.notIndexed */, uint32(1), 15, 0x8000)
} else {
*(*uintptr)(unsafe.Pointer(pItem + 96 /* &.u1 */)) = Xsqlite3NameFromToken(tls, (*Parse)(unsafe.Pointer(pParse)).Fdb, pIndexedBy)
- libc.SetBitFieldPtr8Uint32(pItem+60 /* &.fg */ +4 /* &.isIndexedBy */, uint32(1), 1, 0x2)
+ libc.SetBitFieldPtr16Uint32(pItem+60 /* &.fg */ +4 /* &.isIndexedBy */, uint32(1), 14, 0x4000)
}
}
}
@@ -96066,7 +98431,7 @@ func Xsqlite3SrcListIndexedBy(tls *libc.TLS, pParse uintptr, p uintptr, pIndexed
// Append the contents of SrcList p2 to SrcList p1 and return the resulting
// SrcList. Or, if an error occurs, return NULL. In all cases, p1 and p2
// are deleted by this function.
-func Xsqlite3SrcListAppendList(tls *libc.TLS, pParse uintptr, p1 uintptr, p2 uintptr) uintptr { /* sqlite3.c:116284:24: */
+func Xsqlite3SrcListAppendList(tls *libc.TLS, pParse uintptr, p1 uintptr, p2 uintptr) uintptr { /* sqlite3.c:117170:24: */
if p2 != 0 {
var pNew uintptr = Xsqlite3SrcListEnlarge(tls, pParse, p1, (*SrcList)(unsafe.Pointer(p2)).FnSrc, 1)
@@ -96083,12 +98448,12 @@ func Xsqlite3SrcListAppendList(tls *libc.TLS, pParse uintptr, p1 uintptr, p2 uin
// Add the list of function arguments to the SrcList entry for a
// table-valued-function.
-func Xsqlite3SrcListFuncArgs(tls *libc.TLS, pParse uintptr, p uintptr, pList uintptr) { /* sqlite3.c:116303:21: */
+func Xsqlite3SrcListFuncArgs(tls *libc.TLS, pParse uintptr, p uintptr, pList uintptr) { /* sqlite3.c:117189:21: */
if p != 0 {
var pItem uintptr = ((p + 8 /* &.a */) + uintptr(((*SrcList)(unsafe.Pointer(p)).FnSrc-1))*112)
*(*uintptr)(unsafe.Pointer(pItem + 96 /* &.u1 */)) = pList
- libc.SetBitFieldPtr8Uint32(pItem+60 /* &.fg */ +4 /* &.isTabFunc */, uint32(1), 2, 0x4)
+ libc.SetBitFieldPtr16Uint32(pItem+60 /* &.fg */ +4 /* &.isTabFunc */, uint32(1), 13, 0x2000)
} else {
Xsqlite3ExprListDelete(tls, (*Parse)(unsafe.Pointer(pParse)).Fdb, pList)
}
@@ -96107,7 +98472,7 @@ func Xsqlite3SrcListFuncArgs(tls *libc.TLS, pParse uintptr, p uintptr, pList uin
// The operator is "natural cross join". The A and B operands are stored
// in p->a[0] and p->a[1], respectively. The parser initially stores the
// operator with A. This routine shifts that operator over to B.
-func Xsqlite3SrcListShiftJoinType(tls *libc.TLS, p uintptr) { /* sqlite3.c:116331:21: */
+func Xsqlite3SrcListShiftJoinType(tls *libc.TLS, p uintptr) { /* sqlite3.c:117217:21: */
if p != 0 {
var i int32
for i = ((*SrcList)(unsafe.Pointer(p)).FnSrc - 1); i > 0; i-- {
@@ -96118,14 +98483,14 @@ func Xsqlite3SrcListShiftJoinType(tls *libc.TLS, p uintptr) { /* sqlite3.c:11633
}
// Generate VDBE code for a BEGIN statement.
-func Xsqlite3BeginTransaction(tls *libc.TLS, pParse uintptr, type1 int32) { /* sqlite3.c:116344:21: */
+func Xsqlite3BeginTransaction(tls *libc.TLS, pParse uintptr, type1 int32) { /* sqlite3.c:117230:21: */
var db uintptr
var v uintptr
var i int32
db = (*Parse)(unsafe.Pointer(pParse)).Fdb
- if Xsqlite3AuthCheck(tls, pParse, SQLITE_TRANSACTION, ts+12760 /* "BEGIN" */, uintptr(0), uintptr(0)) != 0 {
+ if Xsqlite3AuthCheck(tls, pParse, SQLITE_TRANSACTION, ts+13213 /* "BEGIN" */, uintptr(0), uintptr(0)) != 0 {
return
}
v = Xsqlite3GetVdbe(tls, pParse)
@@ -96153,7 +98518,7 @@ func Xsqlite3BeginTransaction(tls *libc.TLS, pParse uintptr, type1 int32) { /* s
// Generate VDBE code for a COMMIT or ROLLBACK statement.
// Code for ROLLBACK is generated if eType==TK_ROLLBACK. Otherwise
// code is generated for a COMMIT.
-func Xsqlite3EndTransaction(tls *libc.TLS, pParse uintptr, eType int32) { /* sqlite3.c:116380:21: */
+func Xsqlite3EndTransaction(tls *libc.TLS, pParse uintptr, eType int32) { /* sqlite3.c:117266:21: */
var v uintptr
var isRollback int32
@@ -96161,9 +98526,9 @@ func Xsqlite3EndTransaction(tls *libc.TLS, pParse uintptr, eType int32) { /* sql
if Xsqlite3AuthCheck(tls, pParse, SQLITE_TRANSACTION,
func() uintptr {
if isRollback != 0 {
- return ts + 12766 /* "ROLLBACK" */
+ return ts + 13219 /* "ROLLBACK" */
}
- return ts + 12775 /* "COMMIT" */
+ return ts + 13228 /* "COMMIT" */
}(), uintptr(0), uintptr(0)) != 0 {
return
}
@@ -96175,7 +98540,7 @@ func Xsqlite3EndTransaction(tls *libc.TLS, pParse uintptr, eType int32) { /* sql
// This function is called by the parser when it parses a command to create,
// release or rollback an SQL savepoint.
-func Xsqlite3Savepoint(tls *libc.TLS, pParse uintptr, op int32, pName uintptr) { /* sqlite3.c:116402:21: */
+func Xsqlite3Savepoint(tls *libc.TLS, pParse uintptr, op int32, pName uintptr) { /* sqlite3.c:117288:21: */
var zName uintptr = Xsqlite3NameFromToken(tls, (*Parse)(unsafe.Pointer(pParse)).Fdb, pName)
if zName != 0 {
var v uintptr = Xsqlite3GetVdbe(tls, pParse)
@@ -96188,11 +98553,11 @@ func Xsqlite3Savepoint(tls *libc.TLS, pParse uintptr, op int32, pName uintptr) {
}
}
-var az = [3]uintptr{ts + 12760 /* "BEGIN" */, ts + 12782 /* "RELEASE" */, ts + 12766 /* "ROLLBACK" */} /* sqlite3.c:116407:23 */
+var az = [3]uintptr{ts + 13213 /* "BEGIN" */, ts + 13235 /* "RELEASE" */, ts + 13219 /* "ROLLBACK" */} /* sqlite3.c:117293:23 */
// Make sure the TEMP database is open and available for use. Return
// the number of errors. Leave any error messages in the pParse structure.
-func Xsqlite3OpenTempDatabase(tls *libc.TLS, pParse uintptr) int32 { /* sqlite3.c:116422:20: */
+func Xsqlite3OpenTempDatabase(tls *libc.TLS, pParse uintptr) int32 { /* sqlite3.c:117308:20: */
bp := tls.Alloc(8)
defer tls.Free(8)
@@ -96204,7 +98569,7 @@ func Xsqlite3OpenTempDatabase(tls *libc.TLS, pParse uintptr) int32 { /* sqlite3.
rc = Xsqlite3BtreeOpen(tls, (*Sqlite3)(unsafe.Pointer(db)).FpVfs, uintptr(0), db, bp /* &pBt */, 0, flags)
if rc != SQLITE_OK {
Xsqlite3ErrorMsg(tls, pParse,
- ts+12790 /* "unable to open a..." */, 0)
+ ts+13243 /* "unable to open a..." */, 0)
(*Parse)(unsafe.Pointer(pParse)).Frc = rc
return 1
}
@@ -96218,13 +98583,13 @@ func Xsqlite3OpenTempDatabase(tls *libc.TLS, pParse uintptr) int32 { /* sqlite3.
return 0
}
-var flags int32 = ((((SQLITE_OPEN_READWRITE | SQLITE_OPEN_CREATE) | SQLITE_OPEN_EXCLUSIVE) | SQLITE_OPEN_DELETEONCLOSE) | SQLITE_OPEN_TEMP_DB) /* sqlite3.c:116427:22 */
+var flags int32 = ((((SQLITE_OPEN_READWRITE | SQLITE_OPEN_CREATE) | SQLITE_OPEN_EXCLUSIVE) | SQLITE_OPEN_DELETEONCLOSE) | SQLITE_OPEN_TEMP_DB) /* sqlite3.c:117313:22 */
// Record the fact that the schema cookie will need to be verified
// for database iDb. The code to actually verify the schema cookie
// will occur at the end of the top-level VDBE and will be generated
// later, by sqlite3FinishCoding().
-func sqlite3CodeVerifySchemaAtToplevel(tls *libc.TLS, pToplevel uintptr, iDb int32) { /* sqlite3.c:116457:13: */
+func sqlite3CodeVerifySchemaAtToplevel(tls *libc.TLS, pToplevel uintptr, iDb int32) { /* sqlite3.c:117343:13: */
if (libc.Bool32((((*Parse)(unsafe.Pointer(pToplevel)).FcookieMask) & (YDbMask((YDbMask(1))) << (iDb))) != YDbMask(0))) == 0 {
*(*YDbMask)(unsafe.Pointer(pToplevel + 116 /* &.cookieMask */)) |= (YDbMask((YDbMask(1))) << (iDb))
@@ -96234,7 +98599,7 @@ func sqlite3CodeVerifySchemaAtToplevel(tls *libc.TLS, pToplevel uintptr, iDb int
}
}
-func Xsqlite3CodeVerifySchema(tls *libc.TLS, pParse uintptr, iDb int32) { /* sqlite3.c:116469:21: */
+func Xsqlite3CodeVerifySchema(tls *libc.TLS, pParse uintptr, iDb int32) { /* sqlite3.c:117355:21: */
sqlite3CodeVerifySchemaAtToplevel(tls, func() uintptr {
if (*Parse)(unsafe.Pointer(pParse)).FpToplevel != 0 {
return (*Parse)(unsafe.Pointer(pParse)).FpToplevel
@@ -96245,7 +98610,7 @@ func Xsqlite3CodeVerifySchema(tls *libc.TLS, pParse uintptr, iDb int32) { /* sql
// If argument zDb is NULL, then call sqlite3CodeVerifySchema() for each
// attached database. Otherwise, invoke it for the database named zDb only.
-func Xsqlite3CodeVerifyNamedSchema(tls *libc.TLS, pParse uintptr, zDb uintptr) { /* sqlite3.c:116478:21: */
+func Xsqlite3CodeVerifyNamedSchema(tls *libc.TLS, pParse uintptr, zDb uintptr) { /* sqlite3.c:117364:21: */
var db uintptr = (*Parse)(unsafe.Pointer(pParse)).Fdb
var i int32
for i = 0; i < (*Sqlite3)(unsafe.Pointer(db)).FnDb; i++ {
@@ -96267,7 +98632,7 @@ func Xsqlite3CodeVerifyNamedSchema(tls *libc.TLS, pParse uintptr, zDb uintptr) {
// rollback the whole transaction. For operations where all constraints
// can be checked before any changes are made to the database, it is never
// necessary to undo a write and the checkpoint should not be set.
-func Xsqlite3BeginWriteOperation(tls *libc.TLS, pParse uintptr, setStatement int32, iDb int32) { /* sqlite3.c:116502:21: */
+func Xsqlite3BeginWriteOperation(tls *libc.TLS, pParse uintptr, setStatement int32, iDb int32) { /* sqlite3.c:117388:21: */
var pToplevel uintptr = func() uintptr {
if (*Parse)(unsafe.Pointer(pParse)).FpToplevel != 0 {
return (*Parse)(unsafe.Pointer(pParse)).FpToplevel
@@ -96284,7 +98649,7 @@ func Xsqlite3BeginWriteOperation(tls *libc.TLS, pParse uintptr, setStatement int
// inserting multiple rows in a table, or inserting a row and index entries.)
// If an abort occurs after some of these writes have completed, then it will
// be necessary to undo the completed writes.
-func Xsqlite3MultiWrite(tls *libc.TLS, pParse uintptr) { /* sqlite3.c:116516:21: */
+func Xsqlite3MultiWrite(tls *libc.TLS, pParse uintptr) { /* sqlite3.c:117402:21: */
var pToplevel uintptr = func() uintptr {
if (*Parse)(unsafe.Pointer(pParse)).FpToplevel != 0 {
return (*Parse)(unsafe.Pointer(pParse)).FpToplevel
@@ -96308,7 +98673,7 @@ func Xsqlite3MultiWrite(tls *libc.TLS, pParse uintptr) { /* sqlite3.c:116516:21:
// particular, it prevents us from writing an effective
// implementation of sqlite3AssertMayAbort()) and so we have chosen
// to take the safe route and skip the optimization.
-func Xsqlite3MayAbort(tls *libc.TLS, pParse uintptr) { /* sqlite3.c:116537:21: */
+func Xsqlite3MayAbort(tls *libc.TLS, pParse uintptr) { /* sqlite3.c:117423:21: */
var pToplevel uintptr = func() uintptr {
if (*Parse)(unsafe.Pointer(pParse)).FpToplevel != 0 {
return (*Parse)(unsafe.Pointer(pParse)).FpToplevel
@@ -96321,7 +98686,7 @@ func Xsqlite3MayAbort(tls *libc.TLS, pParse uintptr) { /* sqlite3.c:116537:21: *
// Code an OP_Halt that causes the vdbe to return an SQLITE_CONSTRAINT
// error. The onError parameter determines which (if any) of the statement
// and/or current transaction is rolled back.
-func Xsqlite3HaltConstraint(tls *libc.TLS, pParse uintptr, errCode int32, onError int32, p4 uintptr, p4type I8, p5Errmsg U8) { /* sqlite3.c:116547:21: */
+func Xsqlite3HaltConstraint(tls *libc.TLS, pParse uintptr, errCode int32, onError int32, p4 uintptr, p4type I8, p5Errmsg U8) { /* sqlite3.c:117433:21: */
var v uintptr
v = Xsqlite3GetVdbe(tls, pParse)
@@ -96334,7 +98699,7 @@ func Xsqlite3HaltConstraint(tls *libc.TLS, pParse uintptr, errCode int32, onErro
}
// Code an OP_Halt due to UNIQUE or PRIMARY KEY constraint violation.
-func Xsqlite3UniqueConstraint(tls *libc.TLS, pParse uintptr, onError int32, pIdx uintptr) { /* sqlite3.c:116569:21: */
+func Xsqlite3UniqueConstraint(tls *libc.TLS, pParse uintptr, onError int32, pIdx uintptr) { /* sqlite3.c:117455:21: */
bp := tls.Alloc(40)
defer tls.Free(40)
@@ -96347,24 +98712,24 @@ func Xsqlite3UniqueConstraint(tls *libc.TLS, pParse uintptr, onError int32, pIdx
Xsqlite3StrAccumInit(tls, bp+8 /* &errMsg */, (*Parse)(unsafe.Pointer(pParse)).Fdb, uintptr(0), 0,
*(*int32)(unsafe.Pointer(((*Parse)(unsafe.Pointer(pParse)).Fdb + 128 /* &.aLimit */))))
if (*Index)(unsafe.Pointer(pIdx)).FaColExpr != 0 {
- Xsqlite3_str_appendf(tls, bp+8 /* &errMsg */, ts+12860 /* "index '%q'" */, libc.VaList(bp, (*Index)(unsafe.Pointer(pIdx)).FzName))
+ Xsqlite3_str_appendf(tls, bp+8 /* &errMsg */, ts+13313 /* "index '%q'" */, libc.VaList(bp, (*Index)(unsafe.Pointer(pIdx)).FzName))
} else {
for j = 0; j < int32((*Index)(unsafe.Pointer(pIdx)).FnKeyCol); j++ {
var zCol uintptr
zCol = (*Column)(unsafe.Pointer((*Table)(unsafe.Pointer(pTab)).FaCol + uintptr(*(*I16)(unsafe.Pointer((*Index)(unsafe.Pointer(pIdx)).FaiColumn + uintptr(j)*2)))*32)).FzName
if j != 0 {
- Xsqlite3_str_append(tls, bp+8 /* &errMsg */, ts+12871 /* ", " */, 2)
+ Xsqlite3_str_append(tls, bp+8 /* &errMsg */, ts+13324 /* ", " */, 2)
}
Xsqlite3_str_appendall(tls, bp+8 /* &errMsg */, (*Table)(unsafe.Pointer(pTab)).FzName)
- Xsqlite3_str_append(tls, bp+8 /* &errMsg */, ts+716 /* "." */, 1)
+ Xsqlite3_str_append(tls, bp+8 /* &errMsg */, ts+768 /* "." */, 1)
Xsqlite3_str_appendall(tls, bp+8 /* &errMsg */, zCol)
}
}
zErr = Xsqlite3StrAccumFinish(tls, bp+8 /* &errMsg */)
Xsqlite3HaltConstraint(tls, pParse,
func() int32 {
- if (int32(*(*uint16)(unsafe.Pointer((pIdx) + 100 /* &.idxType */)) >> 14 & 0x3)) == SQLITE_IDXTYPE_PRIMARYKEY {
+ if (int32(*(*uint16)(unsafe.Pointer((pIdx) + 100 /* &.idxType */)) & 0xc000 >> 14)) == SQLITE_IDXTYPE_PRIMARYKEY {
return (SQLITE_CONSTRAINT | (int32(6) << 8))
}
return (SQLITE_CONSTRAINT | (int32(8) << 8))
@@ -96373,18 +98738,18 @@ func Xsqlite3UniqueConstraint(tls *libc.TLS, pParse uintptr, onError int32, pIdx
}
// Code an OP_Halt due to non-unique rowid.
-func Xsqlite3RowidConstraint(tls *libc.TLS, pParse uintptr, onError int32, pTab uintptr) { /* sqlite3.c:116605:21: */
+func Xsqlite3RowidConstraint(tls *libc.TLS, pParse uintptr, onError int32, pTab uintptr) { /* sqlite3.c:117491:21: */
bp := tls.Alloc(24)
defer tls.Free(24)
var zMsg uintptr
var rc int32
if int32((*Table)(unsafe.Pointer(pTab)).FiPKey) >= 0 {
- zMsg = Xsqlite3MPrintf(tls, (*Parse)(unsafe.Pointer(pParse)).Fdb, ts+10332 /* "%s.%s" */, libc.VaList(bp, (*Table)(unsafe.Pointer(pTab)).FzName,
+ zMsg = Xsqlite3MPrintf(tls, (*Parse)(unsafe.Pointer(pParse)).Fdb, ts+10785 /* "%s.%s" */, libc.VaList(bp, (*Table)(unsafe.Pointer(pTab)).FzName,
(*Column)(unsafe.Pointer((*Table)(unsafe.Pointer(pTab)).FaCol+uintptr((*Table)(unsafe.Pointer(pTab)).FiPKey)*32)).FzName))
rc = (SQLITE_CONSTRAINT | (int32(6) << 8))
} else {
- zMsg = Xsqlite3MPrintf(tls, (*Parse)(unsafe.Pointer(pParse)).Fdb, ts+12874 /* "%s.rowid" */, libc.VaList(bp+16, (*Table)(unsafe.Pointer(pTab)).FzName))
+ zMsg = Xsqlite3MPrintf(tls, (*Parse)(unsafe.Pointer(pParse)).Fdb, ts+13327 /* "%s.rowid" */, libc.VaList(bp+16, (*Table)(unsafe.Pointer(pTab)).FzName))
rc = (SQLITE_CONSTRAINT | (int32(10) << 8))
}
Xsqlite3HaltConstraint(tls, pParse, rc, onError, zMsg, int8(-7),
@@ -96393,7 +98758,7 @@ func Xsqlite3RowidConstraint(tls *libc.TLS, pParse uintptr, onError int32, pTab
// Check to see if pIndex uses the collating sequence pColl. Return
// true if it does and false if it does not.
-func collationMatch(tls *libc.TLS, zColl uintptr, pIndex uintptr) int32 { /* sqlite3.c:116629:12: */
+func collationMatch(tls *libc.TLS, zColl uintptr, pIndex uintptr) int32 { /* sqlite3.c:117515:12: */
var i int32
for i = 0; i < int32((*Index)(unsafe.Pointer(pIndex)).FnColumn); i++ {
@@ -96408,7 +98773,7 @@ func collationMatch(tls *libc.TLS, zColl uintptr, pIndex uintptr) int32 { /* sql
// Recompute all indices of pTab that use the collating sequence pColl.
// If pColl==0 then recompute all indices of pTab.
-func reindexTable(tls *libc.TLS, pParse uintptr, pTab uintptr, zColl uintptr) { /* sqlite3.c:116648:13: */
+func reindexTable(tls *libc.TLS, pParse uintptr, pTab uintptr, zColl uintptr) { /* sqlite3.c:117534:13: */
if !((*Table)(unsafe.Pointer(pTab)).FnModuleArg != 0) {
var pIndex uintptr // An index associated with pTab
@@ -96425,7 +98790,7 @@ func reindexTable(tls *libc.TLS, pParse uintptr, pTab uintptr, zColl uintptr) {
// Recompute all indices of all tables in all databases where the
// indices use the collating sequence pColl. If pColl==0 then recompute
// all indices everywhere.
-func reindexDatabases(tls *libc.TLS, pParse uintptr, zColl uintptr) { /* sqlite3.c:116669:13: */
+func reindexDatabases(tls *libc.TLS, pParse uintptr, zColl uintptr) { /* sqlite3.c:117555:13: */
var pDb uintptr // A single database
var iDb int32 // The database index number
var db uintptr = (*Parse)(unsafe.Pointer(pParse)).Fdb // The database connection
@@ -96467,7 +98832,7 @@ __3:
// Form 2 rebuilds all indices in all databases that use the named
// collating function. Forms 3 and 4 rebuild the named index or all
// indices associated with the named table.
-func Xsqlite3Reindex(tls *libc.TLS, pParse uintptr, pName1 uintptr, pName2 uintptr) { /* sqlite3.c:116701:21: */
+func Xsqlite3Reindex(tls *libc.TLS, pParse uintptr, pName1 uintptr, pName2 uintptr) { /* sqlite3.c:117587:21: */
bp := tls.Alloc(8)
defer tls.Free(8)
@@ -96527,14 +98892,14 @@ func Xsqlite3Reindex(tls *libc.TLS, pParse uintptr, pName1 uintptr, pName2 uintp
sqlite3RefillIndex(tls, pParse, pIndex, -1)
return
}
- Xsqlite3ErrorMsg(tls, pParse, ts+12883 /* "unable to identi..." */, 0)
+ Xsqlite3ErrorMsg(tls, pParse, ts+13336 /* "unable to identi..." */, 0)
}
// Return a KeyInfo structure that is appropriate for the given Index.
//
// The caller should invoke sqlite3KeyInfoUnref() on the returned object
// when it has finished using it.
-func Xsqlite3KeyInfoOfIndex(tls *libc.TLS, pParse uintptr, pIdx uintptr) uintptr { /* sqlite3.c:116761:24: */
+func Xsqlite3KeyInfoOfIndex(tls *libc.TLS, pParse uintptr, pIdx uintptr) uintptr { /* sqlite3.c:117647:24: */
var i int32
var nCol int32 = int32((*Index)(unsafe.Pointer(pIdx)).FnColumn)
var nKey int32 = int32((*Index)(unsafe.Pointer(pIdx)).FnKeyCol)
@@ -96542,7 +98907,7 @@ func Xsqlite3KeyInfoOfIndex(tls *libc.TLS, pParse uintptr, pIdx uintptr) uintptr
if (*Parse)(unsafe.Pointer(pParse)).FnErr != 0 {
return uintptr(0)
}
- if (uint32(int32(*(*uint16)(unsafe.Pointer(pIdx + 100 /* &.uniqNotNull */)) >> 12 & 0x1))) != 0 {
+ if (uint32(int32(*(*uint16)(unsafe.Pointer(pIdx + 100 /* &.uniqNotNull */)) & 0x1000 >> 12))) != 0 {
pKey = Xsqlite3KeyInfoAlloc(tls, (*Parse)(unsafe.Pointer(pParse)).Fdb, nKey, (nCol - nKey))
} else {
pKey = Xsqlite3KeyInfoAlloc(tls, (*Parse)(unsafe.Pointer(pParse)).Fdb, nCol, 0)
@@ -96562,14 +98927,14 @@ func Xsqlite3KeyInfoOfIndex(tls *libc.TLS, pParse uintptr, pIdx uintptr) uintptr
}
if (*Parse)(unsafe.Pointer(pParse)).FnErr != 0 {
- if (int32(*(*uint16)(unsafe.Pointer(pIdx + 100 /* &.bNoQuery */)) >> 7 & 0x1)) == 0 {
+ if (int32(*(*uint16)(unsafe.Pointer(pIdx + 100 /* &.bNoQuery */)) & 0x80 >> 7)) == 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
// reactive the index. The application had the chance to register
// the missing index using the collation-needed callback. For
// simplicity, SQLite will not give the application a second chance.
- libc.SetBitFieldPtr16Uint32(pIdx+100 /* &.bNoQuery */, uint32(1), 8, 0x100)
+ libc.SetBitFieldPtr16Uint32(pIdx+100 /* &.bNoQuery */, uint32(1), 7, 0x80)
(*Parse)(unsafe.Pointer(pParse)).Frc = (SQLITE_ERROR | (int32(2) << 8))
}
Xsqlite3KeyInfoUnref(tls, pKey)
@@ -96580,7 +98945,7 @@ func Xsqlite3KeyInfoOfIndex(tls *libc.TLS, pParse uintptr, pIdx uintptr) uintptr
}
// Create a new CTE object
-func Xsqlite3CteNew(tls *libc.TLS, pParse uintptr, pName uintptr, pArglist uintptr, pQuery uintptr, eM10d U8) uintptr { /* sqlite3.c:116805:20: */
+func Xsqlite3CteNew(tls *libc.TLS, pParse uintptr, pName uintptr, pArglist uintptr, pQuery uintptr, eM10d U8) uintptr { /* sqlite3.c:117691:20: */
var pNew uintptr
var db uintptr = (*Parse)(unsafe.Pointer(pParse)).Fdb
@@ -96600,7 +98965,7 @@ func Xsqlite3CteNew(tls *libc.TLS, pParse uintptr, pName uintptr, pArglist uintp
// Clear information from a Cte object, but do not deallocate storage
// for the object itself.
-func cteClear(tls *libc.TLS, db uintptr, pCte uintptr) { /* sqlite3.c:116834:13: */
+func cteClear(tls *libc.TLS, db uintptr, pCte uintptr) { /* sqlite3.c:117720:13: */
Xsqlite3ExprListDelete(tls, db, (*Cte)(unsafe.Pointer(pCte)).FpCols)
Xsqlite3SelectDelete(tls, db, (*Cte)(unsafe.Pointer(pCte)).FpSelect)
@@ -96608,7 +98973,7 @@ func cteClear(tls *libc.TLS, db uintptr, pCte uintptr) { /* sqlite3.c:116834:13:
}
// Free the contents of the CTE object passed as the second argument.
-func Xsqlite3CteDelete(tls *libc.TLS, db uintptr, pCte uintptr) { /* sqlite3.c:116844:21: */
+func Xsqlite3CteDelete(tls *libc.TLS, db uintptr, pCte uintptr) { /* sqlite3.c:117730:21: */
cteClear(tls, db, pCte)
Xsqlite3DbFree(tls, db, pCte)
@@ -96618,7 +98983,7 @@ func Xsqlite3CteDelete(tls *libc.TLS, db uintptr, pCte uintptr) { /* sqlite3.c:1
// WITH clause. The CTE described by teh third argument is added to
// the WITH clause of the second argument. If the second argument is
// NULL, then a new WITH argument is created.
-func Xsqlite3WithAdd(tls *libc.TLS, pParse uintptr, pWith uintptr, pCte uintptr) uintptr { /* sqlite3.c:116856:21: */
+func Xsqlite3WithAdd(tls *libc.TLS, pParse uintptr, pWith uintptr, pCte uintptr) uintptr { /* sqlite3.c:117742:21: */
bp := tls.Alloc(8)
defer tls.Free(8)
@@ -96637,7 +99002,7 @@ func Xsqlite3WithAdd(tls *libc.TLS, pParse uintptr, pWith uintptr, pCte uintptr)
var i int32
for i = 0; i < (*With)(unsafe.Pointer(pWith)).FnCte; i++ {
if Xsqlite3StrICmp(tls, zName, (*Cte)(unsafe.Pointer((pWith+16 /* &.a */)+uintptr(i)*48)).FzName) == 0 {
- Xsqlite3ErrorMsg(tls, pParse, ts+12929 /* "duplicate WITH t..." */, libc.VaList(bp, zName))
+ Xsqlite3ErrorMsg(tls, pParse, ts+13382 /* "duplicate WITH t..." */, libc.VaList(bp, zName))
}
}
}
@@ -96661,7 +99026,7 @@ func Xsqlite3WithAdd(tls *libc.TLS, pParse uintptr, pWith uintptr, pCte uintptr)
}
// Free the contents of the With object passed as the second argument.
-func Xsqlite3WithDelete(tls *libc.TLS, db uintptr, pWith uintptr) { /* sqlite3.c:116903:21: */
+func Xsqlite3WithDelete(tls *libc.TLS, db uintptr, pWith uintptr) { /* sqlite3.c:117789:21: */
if pWith != 0 {
var i int32
for i = 0; i < (*With)(unsafe.Pointer(pWith)).FnCte; i++ {
@@ -96691,14 +99056,16 @@ func Xsqlite3WithDelete(tls *libc.TLS, db uintptr, pWith uintptr) { /* sqlite3.c
// Invoke the 'collation needed' callback to request a collation sequence
// in the encoding enc of name zName, length nName.
-func callCollNeeded(tls *libc.TLS, db uintptr, enc int32, zName uintptr) { /* sqlite3.c:116938:13: */
+func callCollNeeded(tls *libc.TLS, db uintptr, enc int32, zName uintptr) { /* sqlite3.c:117824:13: */
if (*Sqlite3)(unsafe.Pointer(db)).FxCollNeeded != 0 {
var zExternal uintptr = Xsqlite3DbStrDup(tls, db, zName)
if !(zExternal != 0) {
return
}
- (*(*func(*libc.TLS, uintptr, uintptr, int32, uintptr))(unsafe.Pointer((db + 368 /* &.xCollNeeded */))))(tls, (*Sqlite3)(unsafe.Pointer(db)).FpCollNeededArg, db, enc, zExternal)
+ (*struct {
+ f func(*libc.TLS, uintptr, uintptr, int32, uintptr)
+ })(unsafe.Pointer(&struct{ uintptr }{(*Sqlite3)(unsafe.Pointer(db)).FxCollNeeded})).f(tls, (*Sqlite3)(unsafe.Pointer(db)).FpCollNeededArg, db, enc, zExternal)
Xsqlite3DbFree(tls, db, zExternal)
}
if (*Sqlite3)(unsafe.Pointer(db)).FxCollNeeded16 != 0 {
@@ -96706,13 +99073,15 @@ func callCollNeeded(tls *libc.TLS, db uintptr, enc int32, zName uintptr) { /* sq
var pTmp uintptr = Xsqlite3ValueNew(tls, db)
Xsqlite3ValueSetStr(tls, pTmp, -1, zName, uint8(SQLITE_UTF8), uintptr(0))
zExternal = Xsqlite3ValueText(tls, pTmp, func() uint8 {
- if int32(*(*int8)(unsafe.Pointer(uintptr(unsafe.Pointer(&Xsqlite3one))))) == 0 {
+ if int32(*(*uint8)(unsafe.Pointer(uintptr(unsafe.Pointer(&Xsqlite3one))))) == 0 {
return uint8(SQLITE_UTF16BE)
}
return uint8(SQLITE_UTF16LE)
}())
if zExternal != 0 {
- (*(*func(*libc.TLS, uintptr, uintptr, int32, uintptr))(unsafe.Pointer((db + 376 /* &.xCollNeeded16 */))))(tls, (*Sqlite3)(unsafe.Pointer(db)).FpCollNeededArg, db, int32((*Sqlite3)(unsafe.Pointer(db)).Fenc), zExternal)
+ (*struct {
+ f func(*libc.TLS, uintptr, uintptr, int32, uintptr)
+ })(unsafe.Pointer(&struct{ uintptr }{(*Sqlite3)(unsafe.Pointer(db)).FxCollNeeded16})).f(tls, (*Sqlite3)(unsafe.Pointer(db)).FpCollNeededArg, db, int32((*Sqlite3)(unsafe.Pointer(db)).Fenc), zExternal)
}
Xsqlite3ValueFree(tls, pTmp)
}
@@ -96723,7 +99092,7 @@ func callCollNeeded(tls *libc.TLS, db uintptr, enc int32, zName uintptr) { /* sq
// of this collation function (for other text encodings) available. Use one
// of these instead if they exist. Avoid a UTF-8 <-> UTF-16 conversion if
// possible.
-func synthCollSeq(tls *libc.TLS, db uintptr, pColl uintptr) int32 { /* sqlite3.c:116967:12: */
+func synthCollSeq(tls *libc.TLS, db uintptr, pColl uintptr) int32 { /* sqlite3.c:117853:12: */
var pColl2 uintptr
var z uintptr = (*CollSeq)(unsafe.Pointer(pColl)).FzName
var i int32
@@ -96738,7 +99107,7 @@ func synthCollSeq(tls *libc.TLS, db uintptr, pColl uintptr) int32 { /* sqlite3.c
return SQLITE_ERROR
}
-var aEnc = [3]U8{U8(SQLITE_UTF16BE), U8(SQLITE_UTF16LE), U8(SQLITE_UTF8)} /* sqlite3.c:116971:19 */
+var aEnc = [3]U8{U8(SQLITE_UTF16BE), U8(SQLITE_UTF16LE), U8(SQLITE_UTF8)} /* sqlite3.c:117857:19 */
// This routine is called on a collation sequence before it is used to
// check that it is defined. An undefined collation sequence exists when
@@ -96749,7 +99118,7 @@ var aEnc = [3]U8{U8(SQLITE_UTF16BE), U8(SQLITE_UTF16LE), U8(SQLITE_UTF8)} /* sql
// request a definition of the collating sequence. If this doesn't work,
// an equivalent collating sequence that uses a text encoding different
// from the main database is substituted, if one is available.
-func Xsqlite3CheckCollSeq(tls *libc.TLS, pParse uintptr, pColl uintptr) int32 { /* sqlite3.c:116994:20: */
+func Xsqlite3CheckCollSeq(tls *libc.TLS, pParse uintptr, pColl uintptr) int32 { /* sqlite3.c:117880:20: */
if (pColl != 0) && ((*CollSeq)(unsafe.Pointer(pColl)).FxCmp == uintptr(0)) {
var zName uintptr = (*CollSeq)(unsafe.Pointer(pColl)).FzName
var db uintptr = (*Parse)(unsafe.Pointer(pParse)).Fdb
@@ -96773,7 +99142,7 @@ func Xsqlite3CheckCollSeq(tls *libc.TLS, pParse uintptr, pColl uintptr) int32 {
// Stored immediately after the three collation sequences is a copy of
// the collation sequence name. A pointer to this string is stored in
// each collation sequence structure.
-func findCollSeqEntry(tls *libc.TLS, db uintptr, zName uintptr, create int32) uintptr { /* sqlite3.c:117022:16: */
+func findCollSeqEntry(tls *libc.TLS, db uintptr, zName uintptr, create int32) uintptr { /* sqlite3.c:117908:16: */
var pColl uintptr
pColl = Xsqlite3HashFind(tls, (db + 608 /* &.aCollSeq */), zName)
@@ -96818,7 +99187,7 @@ func findCollSeqEntry(tls *libc.TLS, db uintptr, zName uintptr, create int32) ui
// cannot be found.
//
// See also: sqlite3LocateCollSeq(), sqlite3GetCollSeq()
-func Xsqlite3FindCollSeq(tls *libc.TLS, db uintptr, enc U8, zName uintptr, create int32) uintptr { /* sqlite3.c:117074:24: */
+func Xsqlite3FindCollSeq(tls *libc.TLS, db uintptr, enc U8, zName uintptr, create int32) uintptr { /* sqlite3.c:117960:24: */
var pColl uintptr
if zName != 0 {
@@ -96834,7 +99203,7 @@ func Xsqlite3FindCollSeq(tls *libc.TLS, db uintptr, enc U8, zName uintptr, creat
// Change the text encoding for a database connection. This means that
// the pDfltColl must change as well.
-func Xsqlite3SetTextEncoding(tls *libc.TLS, db uintptr, enc U8) { /* sqlite3.c:117096:21: */
+func Xsqlite3SetTextEncoding(tls *libc.TLS, db uintptr, enc U8) { /* sqlite3.c:117982:21: */
(*Sqlite3)(unsafe.Pointer(db)).Fenc = enc
// EVIDENCE-OF: R-08308-17224 The default collating function for all
@@ -96854,7 +99223,7 @@ func Xsqlite3SetTextEncoding(tls *libc.TLS, db uintptr, enc U8) { /* sqlite3.c:1
// sequence can be found. If no collation is found, leave an error message.
//
// See also: sqlite3LocateCollSeq(), sqlite3FindCollSeq()
-func Xsqlite3GetCollSeq(tls *libc.TLS, pParse uintptr, enc U8, pColl uintptr, zName uintptr) uintptr { /* sqlite3.c:117119:24: */
+func Xsqlite3GetCollSeq(tls *libc.TLS, pParse uintptr, enc U8, pColl uintptr, zName uintptr) uintptr { /* sqlite3.c:118005:24: */
bp := tls.Alloc(8)
defer tls.Free(8)
@@ -96876,7 +99245,7 @@ func Xsqlite3GetCollSeq(tls *libc.TLS, pParse uintptr, enc U8, pColl uintptr, zN
}
if p == uintptr(0) {
- Xsqlite3ErrorMsg(tls, pParse, ts+12959 /* "no such collatio..." */, libc.VaList(bp, zName))
+ Xsqlite3ErrorMsg(tls, pParse, ts+13412 /* "no such collatio..." */, libc.VaList(bp, zName))
(*Parse)(unsafe.Pointer(pParse)).Frc = (SQLITE_ERROR | (int32(1) << 8))
}
return p
@@ -96900,7 +99269,7 @@ func Xsqlite3GetCollSeq(tls *libc.TLS, pParse uintptr, enc U8, pColl uintptr, zN
// and generates an error message.
//
// See also: sqlite3FindCollSeq(), sqlite3GetCollSeq()
-func Xsqlite3LocateCollSeq(tls *libc.TLS, pParse uintptr, zName uintptr) uintptr { /* sqlite3.c:117170:24: */
+func Xsqlite3LocateCollSeq(tls *libc.TLS, pParse uintptr, zName uintptr) uintptr { /* sqlite3.c:118056:24: */
var db uintptr = (*Parse)(unsafe.Pointer(pParse)).Fdb
var enc U8 = (*Sqlite3)(unsafe.Pointer(db)).Fenc
var initbusy U8 = (*Sqlite3)(unsafe.Pointer(db)).Finit.Fbusy
@@ -96941,7 +99310,7 @@ func Xsqlite3LocateCollSeq(tls *libc.TLS, pParse uintptr, zName uintptr) uintptr
// If nArg==(-2) then any function with a non-null xSFunc is
// a perfect match and any function with xSFunc NULL is
// a non-match.
-func matchQuality(tls *libc.TLS, p uintptr, nArg int32, enc U8) int32 { /* sqlite3.c:117213:12: */
+func matchQuality(tls *libc.TLS, p uintptr, nArg int32, enc U8) int32 { /* sqlite3.c:118099:12: */
var match int32
// Wrong number of arguments means "no match"
@@ -96977,7 +99346,7 @@ func matchQuality(tls *libc.TLS, p uintptr, nArg int32, enc U8) int32 { /* sqlit
// Search a FuncDefHash for a function with the given name. Return
// a pointer to the matching FuncDef if found, or 0 if there is no match.
-func Xsqlite3FunctionSearch(tls *libc.TLS, h int32, zFunc uintptr) uintptr { /* sqlite3.c:117249:24: */
+func Xsqlite3FunctionSearch(tls *libc.TLS, h int32, zFunc uintptr) uintptr { /* sqlite3.c:118135:24: */
var p uintptr
for p = *(*uintptr)(unsafe.Pointer((uintptr(unsafe.Pointer(&Xsqlite3BuiltinFunctions)) /* &.a */) + uintptr(h)*8)); p != 0; p = *(*uintptr)(unsafe.Pointer(p + 64 /* &.u */)) {
if Xsqlite3StrICmp(tls, (*FuncDef)(unsafe.Pointer(p)).FzName, zFunc) == 0 {
@@ -96988,13 +99357,13 @@ func Xsqlite3FunctionSearch(tls *libc.TLS, h int32, zFunc uintptr) uintptr { /*
}
// Insert a new FuncDef into a FuncDefHash hash table.
-func Xsqlite3InsertBuiltinFuncs(tls *libc.TLS, aDef uintptr, nDef int32) { /* sqlite3.c:117265:21: */
+func Xsqlite3InsertBuiltinFuncs(tls *libc.TLS, aDef uintptr, nDef int32) { /* sqlite3.c:118151:21: */
var i int32
for i = 0; i < nDef; i++ {
var pOther uintptr
var zName uintptr = (*FuncDef)(unsafe.Pointer(aDef + uintptr(i)*72)).FzName
var nName int32 = Xsqlite3Strlen30(tls, zName)
- var h int32 = (((int32(*(*int8)(unsafe.Pointer(zName)))) + (nName)) % SQLITE_FUNC_HASH_SZ)
+ var h int32 = (((int32(*(*uint8)(unsafe.Pointer(zName)))) + (nName)) % SQLITE_FUNC_HASH_SZ)
pOther = Xsqlite3FunctionSearch(tls, h, zName)
if pOther != 0 {
@@ -97026,7 +99395,7 @@ func Xsqlite3InsertBuiltinFuncs(tls *libc.TLS, aDef uintptr, nDef int32) { /* sq
// If createFlag is false, then a function with the required name and
// number of arguments may be returned even if the eTextRep flag does not
// match that requested.
-func Xsqlite3FindFunction(tls *libc.TLS, db uintptr, zName uintptr, nArg int32, enc U8, createFlag U8) uintptr { /* sqlite3.c:117310:24: */
+func Xsqlite3FindFunction(tls *libc.TLS, db uintptr, zName uintptr, nArg int32, enc U8, createFlag U8) uintptr { /* sqlite3.c:118196:24: */
var p uintptr // Iterator variable
var pBest uintptr = uintptr(0) // Best match found so far
var bestScore int32 = 0 // Score of best match
@@ -97059,7 +99428,7 @@ func Xsqlite3FindFunction(tls *libc.TLS, db uintptr, zName uintptr, nArg int32,
// So we must not search for built-ins when creating a new function.
if !(createFlag != 0) && ((pBest == uintptr(0)) || (((*Sqlite3)(unsafe.Pointer(db)).FmDbFlags & U32(DBFLAG_PreferBuiltin)) != U32(0))) {
bestScore = 0
- h = (((int32(Xsqlite3UpperToLower[U8(*(*int8)(unsafe.Pointer(zName)))])) + (nName)) % SQLITE_FUNC_HASH_SZ)
+ h = (((int32(Xsqlite3UpperToLower[U8(*(*uint8)(unsafe.Pointer(zName)))])) + (nName)) % SQLITE_FUNC_HASH_SZ)
p = Xsqlite3FunctionSearch(tls, h, zName)
for p != 0 {
var score int32 = matchQuality(tls, p, nArg, enc)
@@ -97106,7 +99475,7 @@ func Xsqlite3FindFunction(tls *libc.TLS, db uintptr, zName uintptr, nArg int32,
// of the schema hash tables).
//
// The Schema.cache_size variable is not cleared.
-func Xsqlite3SchemaClear(tls *libc.TLS, p uintptr) { /* sqlite3.c:117402:21: */
+func Xsqlite3SchemaClear(tls *libc.TLS, p uintptr) { /* sqlite3.c:118288:21: */
bp := tls.Alloc(48)
defer tls.Free(48)
@@ -97141,7 +99510,7 @@ func Xsqlite3SchemaClear(tls *libc.TLS, p uintptr) { /* sqlite3.c:117402:21: */
// Find and return the schema associated with a BTree. Create
// a new one if necessary.
-func Xsqlite3SchemaGet(tls *libc.TLS, db uintptr, pBt uintptr) uintptr { /* sqlite3.c:117434:23: */
+func Xsqlite3SchemaGet(tls *libc.TLS, db uintptr, pBt uintptr) uintptr { /* sqlite3.c:118320:23: */
var p uintptr
if pBt != 0 {
p = Xsqlite3BtreeSchema(tls, pBt, int32(unsafe.Sizeof(Schema{})), *(*uintptr)(unsafe.Pointer(&struct{ f func(*libc.TLS, uintptr) }{Xsqlite3SchemaClear})))
@@ -97188,7 +99557,7 @@ func Xsqlite3SchemaGet(tls *libc.TLS, db uintptr, pBt uintptr) uintptr { /* sqli
// pSrc->a[0].pTab Pointer to the Table object
// pSrc->a[0].pIndex Pointer to the INDEXED BY index, if there is one
//
-func Xsqlite3SrcListLookup(tls *libc.TLS, pParse uintptr, pSrc uintptr) uintptr { /* sqlite3.c:117485:22: */
+func Xsqlite3SrcListLookup(tls *libc.TLS, pParse uintptr, pSrc uintptr) uintptr { /* sqlite3.c:118371:22: */
var pItem uintptr = pSrc + 8 /* &.a */
var pTab uintptr
@@ -97197,7 +99566,7 @@ func Xsqlite3SrcListLookup(tls *libc.TLS, pParse uintptr, pSrc uintptr) uintptr
(*SrcItem)(unsafe.Pointer(pItem)).FpTab = pTab
if pTab != 0 {
(*Table)(unsafe.Pointer(pTab)).FnTabRef++
- if ((uint32(int32(*(*uint8)(unsafe.Pointer((pItem + 60 /* &.fg */) + 4 /* &.isIndexedBy */)) >> 6 & 0x1))) != 0) && (Xsqlite3IndexedByLookup(tls, pParse, pItem) != 0) {
+ if ((uint32(int32(*(*uint16)(unsafe.Pointer((pItem + 60 /* &.fg */) + 4 /* &.isIndexedBy */)) & 0x4000 >> 14))) != 0) && (Xsqlite3IndexedByLookup(tls, pParse, pItem) != 0) {
pTab = uintptr(0)
}
}
@@ -97218,7 +99587,7 @@ func Xsqlite3SrcListLookup(tls *libc.TLS, pParse uintptr, pSrc uintptr) uintptr
// 3) The table is a shadow table, the database connection is in
// defensive mode, and the current sqlite3_prepare()
// is for a top-level SQL statement.
-func tabIsReadOnly(tls *libc.TLS, pParse uintptr, pTab uintptr) int32 { /* sqlite3.c:117516:12: */
+func tabIsReadOnly(tls *libc.TLS, pParse uintptr, pTab uintptr) int32 { /* sqlite3.c:118402:12: */
var db uintptr
if (*Table)(unsafe.Pointer(pTab)).FnModuleArg != 0 {
return (libc.Bool32((*Sqlite3_module)(unsafe.Pointer((*Module)(unsafe.Pointer((*VTable)(unsafe.Pointer(Xsqlite3GetVTable(tls, (*Parse)(unsafe.Pointer(pParse)).Fdb, pTab))).FpMod)).FpModule)).FxUpdate == uintptr(0)))
@@ -97237,16 +99606,16 @@ func tabIsReadOnly(tls *libc.TLS, pParse uintptr, pTab uintptr) int32 { /* sqlit
// Check to make sure the given table is writable. If it is not
// writable, generate an error message and return 1. If it is
// writable return 0;
-func Xsqlite3IsReadOnly(tls *libc.TLS, pParse uintptr, pTab uintptr, viewOk int32) int32 { /* sqlite3.c:117535:20: */
+func Xsqlite3IsReadOnly(tls *libc.TLS, pParse uintptr, pTab uintptr, viewOk int32) int32 { /* sqlite3.c:118421:20: */
bp := tls.Alloc(16)
defer tls.Free(16)
if tabIsReadOnly(tls, pParse, pTab) != 0 {
- Xsqlite3ErrorMsg(tls, pParse, ts+12990 /* "table %s may not..." */, libc.VaList(bp, (*Table)(unsafe.Pointer(pTab)).FzName))
+ Xsqlite3ErrorMsg(tls, pParse, ts+13443 /* "table %s may not..." */, libc.VaList(bp, (*Table)(unsafe.Pointer(pTab)).FzName))
return 1
}
if !(viewOk != 0) && ((*Table)(unsafe.Pointer(pTab)).FpSelect != 0) {
- Xsqlite3ErrorMsg(tls, pParse, ts+13019 /* "cannot modify %s..." */, libc.VaList(bp+8, (*Table)(unsafe.Pointer(pTab)).FzName))
+ Xsqlite3ErrorMsg(tls, pParse, ts+13472 /* "cannot modify %s..." */, libc.VaList(bp+8, (*Table)(unsafe.Pointer(pTab)).FzName))
return 1
}
return 0
@@ -97255,7 +99624,7 @@ func Xsqlite3IsReadOnly(tls *libc.TLS, pParse uintptr, pTab uintptr, viewOk int3
// Evaluate a view and store its result in an ephemeral table. The
// pWhere argument is an optional WHERE clause that restricts the
// set of rows in the view that are to be added to the ephemeral table.
-func Xsqlite3MaterializeView(tls *libc.TLS, pParse uintptr, pView uintptr, pWhere uintptr, pOrderBy uintptr, pLimit uintptr, iCur int32) { /* sqlite3.c:117556:21: */
+func Xsqlite3MaterializeView(tls *libc.TLS, pParse uintptr, pView uintptr, pWhere uintptr, pOrderBy uintptr, pLimit uintptr, iCur int32) { /* sqlite3.c:118442:21: */
bp := tls.Alloc(40)
defer tls.Free(40)
@@ -97287,7 +99656,7 @@ func Xsqlite3MaterializeView(tls *libc.TLS, pParse uintptr, pView uintptr, pWher
// DELETE FROM table_wxyz WHERE a<5 AND b NOT NULL;
// \________/ \________________/
// pTabList pWhere
-func Xsqlite3DeleteFrom(tls *libc.TLS, pParse uintptr, pTabList uintptr, pWhere uintptr, pOrderBy uintptr, pLimit uintptr) { /* sqlite3.c:117694:21: */
+func Xsqlite3DeleteFrom(tls *libc.TLS, pParse uintptr, pTabList uintptr, pWhere uintptr, pOrderBy uintptr, pLimit uintptr) { /* sqlite3.c:118580:21: */
bp := tls.Alloc(88)
defer tls.Free(88)
@@ -97521,6 +99890,17 @@ __18:
}
Xsqlite3VdbeAddOp2(tls, v, OP_Clear, int32((*Index)(unsafe.Pointer(pIdx)).Ftnum), iDb)
+ if !(((int32(*(*uint16)(unsafe.Pointer((pIdx) + 100 /* &.idxType */)) & 0xc000 >> 14)) == SQLITE_IDXTYPE_PRIMARYKEY) && !(((*Table)(unsafe.Pointer((pTab))).FtabFlags & U32(TF_WithoutRowid)) == U32(0))) {
+ goto __21
+ }
+ Xsqlite3VdbeChangeP3(tls, v, -1, func() int32 {
+ if memCnt != 0 {
+ return memCnt
+ }
+ return -1
+ }())
+__21:
+ ;
goto __19
__19:
pIdx = (*Index)(unsafe.Pointer(pIdx)).FpNext
@@ -97533,10 +99913,10 @@ __15:
wcf = (U16(WHERE_ONEPASS_DESIRED | WHERE_DUPLICATES_OK))
if !(((*NameContext)(unsafe.Pointer(bp+16 /* &sNC */)).FncFlags & NC_VarSelect) != 0) {
- goto __21
+ goto __22
}
bComplex = 1
-__21:
+__22:
;
wcf = U16(int32(wcf) | (func() int32 {
if bComplex != 0 {
@@ -97545,15 +99925,15 @@ __21:
return WHERE_ONEPASS_MULTIROW
}()))
if !(((*Table)(unsafe.Pointer((pTab))).FtabFlags & U32(TF_WithoutRowid)) == U32(0)) {
- goto __22
+ goto __23
}
// For a rowid table, initialize the RowSet to an empty set
pPk = uintptr(0)
nPk = int16(1)
iRowSet = libc.PreIncInt32(&(*Parse)(unsafe.Pointer(pParse)).FnMem, 1)
Xsqlite3VdbeAddOp2(tls, v, OP_Null, 0, iRowSet)
- goto __23
-__22:
+ goto __24
+__23:
// For a WITHOUT ROWID table, create an ephemeral table used to
// hold all primary keys for rows to be deleted.
pPk = Xsqlite3PrimaryKeyIndex(tls, pTab)
@@ -97564,7 +99944,7 @@ __22:
iEphCur = libc.PostIncInt32(&(*Parse)(unsafe.Pointer(pParse)).FnTab, 1)
addrEphOpen = Xsqlite3VdbeAddOp2(tls, v, OP_OpenEphemeral, iEphCur, int32(nPk))
Xsqlite3VdbeSetP4KeyInfo(tls, pParse, pPk)
-__23:
+__24:
;
// Construct a query to find the rowid or primary key for every row
@@ -97576,63 +99956,63 @@ __23:
// ONEPASS_MULTI: One-pass approach - any number of rows may be deleted.
pWInfo = Xsqlite3WhereBegin(tls, pParse, pTabList, pWhere, uintptr(0), uintptr(0), wcf, (iTabCur + 1))
if !(pWInfo == uintptr(0)) {
- goto __24
+ goto __25
}
goto delete_from_cleanup
-__24:
+__25:
;
eOnePass = Xsqlite3WhereOkOnePass(tls, pWInfo, bp+72 /* &aiCurOnePass[0] */)
if !(eOnePass != ONEPASS_SINGLE) {
- goto __25
+ goto __26
}
Xsqlite3MultiWrite(tls, pParse)
-__25:
+__26:
;
if !(Xsqlite3WhereUsesDeferredSeek(tls, pWInfo) != 0) {
- goto __26
+ goto __27
}
Xsqlite3VdbeAddOp1(tls, v, OP_FinishSeek, iTabCur)
-__26:
+__27:
;
// Keep track of the number of rows to be deleted
if !(memCnt != 0) {
- goto __27
+ goto __28
}
Xsqlite3VdbeAddOp2(tls, v, OP_AddImm, memCnt, 1)
-__27:
+__28:
;
// Extract the rowid or primary key for the current row
if !(pPk != 0) {
- goto __28
+ goto __29
}
i = 0
-__30:
+__31:
if !(i < int32(nPk)) {
- goto __32
+ goto __33
}
Xsqlite3ExprCodeGetColumnOfTable(tls, v, pTab, iTabCur,
int32(*(*I16)(unsafe.Pointer((*Index)(unsafe.Pointer(pPk)).FaiColumn + uintptr(i)*2))), (iPk + i))
- goto __31
-__31:
- i++
- goto __30
goto __32
__32:
+ i++
+ goto __31
+ goto __33
+__33:
;
iKey = iPk
- goto __29
-__28:
+ goto __30
+__29:
iKey = libc.PreIncInt32(&(*Parse)(unsafe.Pointer(pParse)).FnMem, 1)
Xsqlite3ExprCodeGetColumnOfTable(tls, v, pTab, iTabCur, -1, iKey)
-__29:
+__30:
;
if !(eOnePass != ONEPASS_OFF) {
- goto __33
+ goto __34
}
// For ONEPASS, no need to store the rowid/primary-key. There is only
// one, so just keep it in its register(s) and fall through to the
@@ -97640,37 +100020,37 @@ __29:
nKey = nPk // OP_Found will use an unpacked key
aToOpen = Xsqlite3DbMallocRawNN(tls, db, (uint64(nIdx + 2)))
if !(aToOpen == uintptr(0)) {
- goto __35
+ goto __36
}
Xsqlite3WhereEnd(tls, pWInfo)
goto delete_from_cleanup
-__35:
+__36:
;
libc.Xmemset(tls, aToOpen, 1, (uint64(nIdx + 1)))
*(*U8)(unsafe.Pointer(aToOpen + uintptr((nIdx + 1)))) = U8(0)
if !(*(*int32)(unsafe.Pointer(bp + 72 /* &aiCurOnePass[0] */)) >= 0) {
- goto __36
+ goto __37
}
*(*U8)(unsafe.Pointer(aToOpen + uintptr((*(*int32)(unsafe.Pointer(bp + 72 /* &aiCurOnePass[0] */)) - iTabCur)))) = U8(0)
-__36:
+__37:
;
if !(*(*int32)(unsafe.Pointer(bp + 72 /* &aiCurOnePass[0] */ + 1*4)) >= 0) {
- goto __37
+ goto __38
}
*(*U8)(unsafe.Pointer(aToOpen + uintptr((*(*int32)(unsafe.Pointer(bp + 72 /* &aiCurOnePass[0] */ + 1*4)) - iTabCur)))) = U8(0)
-__37:
+__38:
;
if !(addrEphOpen != 0) {
- goto __38
+ goto __39
}
Xsqlite3VdbeChangeToNoop(tls, v, addrEphOpen)
-__38:
+__39:
;
addrBypass = Xsqlite3VdbeMakeLabel(tls, pParse)
- goto __34
-__33:
+ goto __35
+__34:
if !(pPk != 0) {
- goto __39
+ goto __40
}
// Add the PK key for this row to the temporary table
iKey = libc.PreIncInt32(&(*Parse)(unsafe.Pointer(pParse)).FnMem, 1)
@@ -97678,15 +100058,15 @@ __33:
Xsqlite3VdbeAddOp4(tls, v, OP_MakeRecord, iPk, int32(nPk), iKey,
Xsqlite3IndexAffinityStr(tls, (*Parse)(unsafe.Pointer(pParse)).Fdb, pPk), int32(nPk))
Xsqlite3VdbeAddOp4Int(tls, v, OP_IdxInsert, iEphCur, iKey, iPk, int32(nPk))
- goto __40
-__39:
+ goto __41
+__40:
// Add the rowid of the row to be deleted to the RowSet
nKey = int16(1) // OP_DeferredSeek always uses a single rowid
Xsqlite3VdbeAddOp2(tls, v, OP_RowSetAdd, iRowSet, iKey)
-__40:
+__41:
;
Xsqlite3WhereEnd(tls, pWInfo)
-__34:
+__35:
;
// Unless this is a view, open cursors for the table we are
@@ -97694,118 +100074,118 @@ __34:
// only effect this statement has is to fire the INSTEAD OF
// triggers.
if !(!(isView != 0)) {
- goto __41
+ goto __42
}
iAddrOnce = 0
if !(eOnePass == ONEPASS_MULTI) {
- goto __42
+ goto __43
}
iAddrOnce = Xsqlite3VdbeAddOp0(tls, v, OP_Once)
-__42:
+__43:
;
Xsqlite3OpenTableAndIndices(tls, pParse, pTab, OP_OpenWrite, uint8(OPFLAG_FORDELETE),
iTabCur, aToOpen, bp+80 /* &iDataCur */, bp+84 /* &iIdxCur */)
if !(eOnePass == ONEPASS_MULTI) {
- goto __43
+ goto __44
}
Xsqlite3VdbeJumpHereOrPopInst(tls, v, iAddrOnce)
-__43:
+__44:
;
-__41:
+__42:
;
// Set up a loop over the rowids/primary-keys that were found in the
// where-clause loop above.
if !(eOnePass != ONEPASS_OFF) {
- goto __44
+ goto __45
}
// OP_Found will use an unpacked key
if !(!((*Table)(unsafe.Pointer(pTab)).FnModuleArg != 0) && (*(*U8)(unsafe.Pointer(aToOpen + uintptr((*(*int32)(unsafe.Pointer(bp + 80 /* iDataCur */)) - iTabCur)))) != 0)) {
- goto __46
+ goto __47
}
Xsqlite3VdbeAddOp4Int(tls, v, OP_NotFound, *(*int32)(unsafe.Pointer(bp + 80 /* iDataCur */)), addrBypass, iKey, int32(nKey))
-__46:
+__47:
;
- goto __45
-__44:
+ goto __46
+__45:
if !(pPk != 0) {
- goto __47
+ goto __48
}
addrLoop = Xsqlite3VdbeAddOp1(tls, v, OP_Rewind, iEphCur)
if !((*Table)(unsafe.Pointer(pTab)).FnModuleArg != 0) {
- goto __49
+ goto __50
}
Xsqlite3VdbeAddOp3(tls, v, OP_Column, iEphCur, 0, iKey)
- goto __50
-__49:
- Xsqlite3VdbeAddOp2(tls, v, OP_RowData, iEphCur, iKey)
+ goto __51
__50:
+ Xsqlite3VdbeAddOp2(tls, v, OP_RowData, iEphCur, iKey)
+__51:
;
// OP_Found will use a composite key
- goto __48
-__47:
+ goto __49
+__48:
addrLoop = Xsqlite3VdbeAddOp3(tls, v, OP_RowSetRead, iRowSet, 0, iKey)
-__48:
+__49:
;
-__45:
+__46:
;
// Delete the row
if !((*Table)(unsafe.Pointer(pTab)).FnModuleArg != 0) {
- goto __51
+ goto __52
}
pVTab = Xsqlite3GetVTable(tls, db, pTab)
Xsqlite3VtabMakeWritable(tls, pParse, pTab)
Xsqlite3MayAbort(tls, pParse)
if !(eOnePass == ONEPASS_SINGLE) {
- goto __53
+ goto __54
}
Xsqlite3VdbeAddOp1(tls, v, OP_Close, iTabCur)
if !((*Parse)(unsafe.Pointer((pParse))).FpToplevel == uintptr(0)) {
- goto __54
+ goto __55
}
(*Parse)(unsafe.Pointer(pParse)).FisMultiWrite = U8(0)
-__54:
+__55:
;
-__53:
+__54:
;
Xsqlite3VdbeAddOp4(tls, v, OP_VUpdate, 0, 1, iKey, pVTab, -12)
Xsqlite3VdbeChangeP5(tls, v, uint16(OE_Abort))
- goto __52
-__51:
+ goto __53
+__52:
count = (libc.Bool32(int32((*Parse)(unsafe.Pointer(pParse)).Fnested) == 0)) // True to count changes
Xsqlite3GenerateRowDelete(tls, pParse, pTab, pTrigger, *(*int32)(unsafe.Pointer(bp + 80 /* iDataCur */)), *(*int32)(unsafe.Pointer(bp + 84 /* iIdxCur */)),
iKey, nKey, uint8(count), uint8(OE_Default), uint8(eOnePass), *(*int32)(unsafe.Pointer(bp + 72 /* &aiCurOnePass[0] */ + 1*4)))
-__52:
+__53:
;
// End of the loop over all rowids/primary-keys.
if !(eOnePass != ONEPASS_OFF) {
- goto __55
+ goto __56
}
Xsqlite3VdbeResolveLabel(tls, v, addrBypass)
Xsqlite3WhereEnd(tls, pWInfo)
- goto __56
-__55:
+ goto __57
+__56:
if !(pPk != 0) {
- goto __57
+ goto __58
}
Xsqlite3VdbeAddOp2(tls, v, OP_Next, iEphCur, (addrLoop + 1))
Xsqlite3VdbeJumpHere(tls, v, addrLoop)
- goto __58
-__57:
+ goto __59
+__58:
Xsqlite3VdbeGoto(tls, v, addrLoop)
Xsqlite3VdbeJumpHere(tls, v, addrLoop)
-__58:
+__59:
;
-__56:
+__57:
;
__16:
; // End non-truncate path
@@ -97814,22 +100194,22 @@ __16:
// maximum rowid counter values recorded while inserting into
// autoincrement tables.
if !((int32((*Parse)(unsafe.Pointer(pParse)).Fnested) == 0) && ((*Parse)(unsafe.Pointer(pParse)).FpTriggerTab == uintptr(0))) {
- goto __59
+ goto __60
}
Xsqlite3AutoincrementEnd(tls, pParse)
-__59:
+__60:
;
// Return the number of rows that were deleted. If this routine is
// generating code because of a call to sqlite3NestedParse(), do not
// invoke the callback function.
if !(memCnt != 0) {
- goto __60
+ goto __61
}
Xsqlite3VdbeAddOp2(tls, v, OP_ChngCntRow, memCnt, 1)
Xsqlite3VdbeSetNumCols(tls, v, 1)
- Xsqlite3VdbeSetColName(tls, v, 0, COLNAME_NAME, ts+13057 /* "rows deleted" */, uintptr(0))
-__60:
+ Xsqlite3VdbeSetColName(tls, v, 0, COLNAME_NAME, ts+13510 /* "rows deleted" */, uintptr(0))
+__61:
;
delete_from_cleanup:
@@ -97883,7 +100263,7 @@ delete_from_cleanup:
// starting at iIdxCur) that already points to the index entry to be deleted.
// Except, this optimization is disabled if there are BEFORE triggers since
// the trigger body might have moved the cursor.
-func Xsqlite3GenerateRowDelete(tls *libc.TLS, pParse uintptr, pTab uintptr, pTrigger uintptr, iDataCur int32, iIdxCur int32, iPk int32, nPk I16, count U8, onconf U8, eMode U8, iIdxNoSeek int32) { /* sqlite3.c:118139:21: */
+func Xsqlite3GenerateRowDelete(tls *libc.TLS, pParse uintptr, pTab uintptr, pTrigger uintptr, iDataCur int32, iIdxCur int32, iPk int32, nPk I16, count U8, onconf U8, eMode U8, iIdxNoSeek int32) { /* sqlite3.c:119028:21: */
var v uintptr = (*Parse)(unsafe.Pointer(pParse)).FpVdbe // Vdbe
var iOld int32 = 0 // First register in OLD.* array
var iLabel int32 // Label resolved to end of generated code
@@ -97973,7 +100353,7 @@ func Xsqlite3GenerateRowDelete(tls *libc.TLS, pParse uintptr, pTab uintptr, pTri
}
return 0
}())
- if (int32((*Parse)(unsafe.Pointer(pParse)).Fnested) == 0) || (0 == Xsqlite3_stricmp(tls, (*Table)(unsafe.Pointer(pTab)).FzName, ts+9613 /* "sqlite_stat1" */)) {
+ if (int32((*Parse)(unsafe.Pointer(pParse)).Fnested) == 0) || (0 == Xsqlite3_stricmp(tls, (*Table)(unsafe.Pointer(pTab)).FzName, ts+10072 /* "sqlite_stat1" */)) {
Xsqlite3VdbeAppendP4(tls, v, pTab, -6)
}
if int32(eMode) != ONEPASS_OFF {
@@ -98020,7 +100400,7 @@ func Xsqlite3GenerateRowDelete(tls *libc.TLS, pParse uintptr, pTab uintptr, pTri
//
// 3. The "iDataCur" cursor must be already be positioned on the row
// that is to be deleted.
-func Xsqlite3GenerateRowIndexDelete(tls *libc.TLS, pParse uintptr, pTab uintptr, iDataCur int32, iIdxCur int32, aRegIdx uintptr, iIdxNoSeek int32) { /* sqlite3.c:118291:21: */
+func Xsqlite3GenerateRowIndexDelete(tls *libc.TLS, pParse uintptr, pTab uintptr, iDataCur int32, iIdxCur int32, aRegIdx uintptr, iIdxNoSeek int32) { /* sqlite3.c:119180:21: */
bp := tls.Alloc(4)
defer tls.Free(4)
@@ -98061,7 +100441,7 @@ __1:
bp /* &iPartIdxLabel */, pPrior, r1)
Xsqlite3VdbeAddOp3(tls, v, OP_IdxDelete, (iIdxCur + i), r1,
func() int32 {
- if (uint32(int32(*(*uint16)(unsafe.Pointer(pIdx + 100 /* &.uniqNotNull */)) >> 12 & 0x1))) != 0 {
+ if (uint32(int32(*(*uint16)(unsafe.Pointer(pIdx + 100 /* &.uniqNotNull */)) & 0x1000 >> 12))) != 0 {
return int32((*Index)(unsafe.Pointer(pIdx)).FnKeyCol)
}
return int32((*Index)(unsafe.Pointer(pIdx)).FnColumn)
@@ -98109,7 +100489,7 @@ __3:
// This optimization is helpful when doing a DELETE or an INTEGRITY_CHECK
// on a table with multiple indices, and especially with the ROWID or
// PRIMARY KEY columns of the index.
-func Xsqlite3GenerateIndexKey(tls *libc.TLS, pParse uintptr, pIdx uintptr, iDataCur int32, regOut int32, prefixOnly int32, piPartIdxLabel uintptr, pPrior uintptr, regPrior int32) int32 { /* sqlite3.c:118356:20: */
+func Xsqlite3GenerateIndexKey(tls *libc.TLS, pParse uintptr, pIdx uintptr, iDataCur int32, regOut int32, prefixOnly int32, piPartIdxLabel uintptr, pPrior uintptr, regPrior int32) int32 { /* sqlite3.c:119245:20: */
var v uintptr = (*Parse)(unsafe.Pointer(pParse)).FpVdbe
var j int32
var regBase int32
@@ -98128,7 +100508,7 @@ func Xsqlite3GenerateIndexKey(tls *libc.TLS, pParse uintptr, pIdx uintptr, iData
*(*int32)(unsafe.Pointer(piPartIdxLabel)) = 0
}
}
- if (prefixOnly != 0) && ((uint32(int32(*(*uint16)(unsafe.Pointer(pIdx + 100 /* &.uniqNotNull */)) >> 12 & 0x1))) != 0) {
+ if (prefixOnly != 0) && ((uint32(int32(*(*uint16)(unsafe.Pointer(pIdx + 100 /* &.uniqNotNull */)) & 0x1000 >> 12))) != 0) {
nCol = int32((*Index)(unsafe.Pointer(pIdx)).FnKeyCol)
} else {
nCol = int32((*Index)(unsafe.Pointer(pIdx)).FnColumn)
@@ -98145,13 +100525,15 @@ func Xsqlite3GenerateIndexKey(tls *libc.TLS, pParse uintptr, pIdx uintptr, iData
continue
}
Xsqlite3ExprCodeLoadIndexColumn(tls, pParse, pIdx, iDataCur, j, (regBase + j))
- // If the column affinity is REAL but the number is an integer, then it
- // might be stored in the table as an integer (using a compact
- // representation) then converted to REAL by an OP_RealAffinity opcode.
- // But we are getting ready to store this value back into an index, where
- // it should be converted by to INTEGER again. So omit the OP_RealAffinity
- // opcode if it is present
- Xsqlite3VdbeDeletePriorOpcode(tls, v, uint8(OP_RealAffinity))
+ if int32(*(*I16)(unsafe.Pointer((*Index)(unsafe.Pointer(pIdx)).FaiColumn + uintptr(j)*2))) >= 0 {
+ // If the column affinity is REAL but the number is an integer, then it
+ // might be stored in the table as an integer (using a compact
+ // representation) then converted to REAL by an OP_RealAffinity opcode.
+ // But we are getting ready to store this value back into an index, where
+ // it should be converted by to INTEGER again. So omit the
+ // OP_RealAffinity opcode if it is present
+ Xsqlite3VdbeDeletePriorOpcode(tls, v, uint8(OP_RealAffinity))
+ }
}
if regOut != 0 {
Xsqlite3VdbeAddOp3(tls, v, OP_MakeRecord, regBase, nCol, regOut)
@@ -98163,7 +100545,7 @@ func Xsqlite3GenerateIndexKey(tls *libc.TLS, pParse uintptr, pIdx uintptr, iData
// If a prior call to sqlite3GenerateIndexKey() generated a jump-over label
// because it was a partial index, then this routine should be called to
// resolve that label.
-func Xsqlite3ResolvePartIdxLabel(tls *libc.TLS, pParse uintptr, iLabel int32) { /* sqlite3.c:118416:21: */
+func Xsqlite3ResolvePartIdxLabel(tls *libc.TLS, pParse uintptr, iLabel int32) { /* sqlite3.c:119307:21: */
if iLabel != 0 {
Xsqlite3VdbeResolveLabel(tls, (*Parse)(unsafe.Pointer(pParse)).FpVdbe, iLabel)
}
@@ -98191,7 +100573,7 @@ func Xsqlite3ResolvePartIdxLabel(tls *libc.TLS, pParse uintptr, iLabel int32) {
// #include "vdbeInt.h"
// Return the collating function associated with a function.
-func sqlite3GetFuncCollSeq(tls *libc.TLS, context uintptr) uintptr { /* sqlite3.c:118450:16: */
+func sqlite3GetFuncCollSeq(tls *libc.TLS, context uintptr) uintptr { /* sqlite3.c:119341:16: */
var pOp uintptr
pOp = ((*Vdbe)(unsafe.Pointer((*Sqlite3_context)(unsafe.Pointer(context)).FpVdbe)).FaOp + uintptr(((*Sqlite3_context)(unsafe.Pointer(context)).FiOp-1))*24)
@@ -98201,14 +100583,14 @@ func sqlite3GetFuncCollSeq(tls *libc.TLS, context uintptr) uintptr { /* sqlite3.
// Indicate that the accumulator load should be skipped on this
// iteration of the aggregate loop.
-func sqlite3SkipAccumulatorLoad(tls *libc.TLS, context uintptr) { /* sqlite3.c:118463:13: */
+func sqlite3SkipAccumulatorLoad(tls *libc.TLS, context uintptr) { /* sqlite3.c:119354:13: */
(*Sqlite3_context)(unsafe.Pointer(context)).FisError = -1
(*Sqlite3_context)(unsafe.Pointer(context)).FskipFlag = U8(1)
}
// Implementation of the non-aggregate min() and max() functions
-func minmaxFunc(tls *libc.TLS, context uintptr, argc int32, argv uintptr) { /* sqlite3.c:118472:13: */
+func minmaxFunc(tls *libc.TLS, context uintptr, argc int32, argv uintptr) { /* sqlite3.c:119363:13: */
var i int32
var mask int32 // 0 for min() or 0xffffffff for max()
var iBest int32
@@ -98238,7 +100620,7 @@ func minmaxFunc(tls *libc.TLS, context uintptr, argc int32, argv uintptr) { /* s
}
// Return the type of the argument.
-func typeofFunc(tls *libc.TLS, context uintptr, NotUsed int32, argv uintptr) { /* sqlite3.c:118502:13: */
+func typeofFunc(tls *libc.TLS, context uintptr, NotUsed int32, argv uintptr) { /* sqlite3.c:119393:13: */
var i int32 = (Xsqlite3_value_type(tls, *(*uintptr)(unsafe.Pointer(argv))) - 1)
_ = NotUsed
@@ -98249,10 +100631,10 @@ func typeofFunc(tls *libc.TLS, context uintptr, NotUsed int32, argv uintptr) { /
Xsqlite3_result_text(tls, context, azType2[i], -1, uintptr(0))
}
-var azType2 = [5]uintptr{ts + 5137 /* "integer" */, ts + 5132 /* "real" */, ts + 13070 /* "text" */, ts + 13075 /* "blob" */, ts + 5127 /* "null" */} /* sqlite3.c:118507:21 */
+var azType2 = [5]uintptr{ts + 5268 /* "integer" */, ts + 5263 /* "real" */, ts + 13523 /* "text" */, ts + 13528 /* "blob" */, ts + 5258 /* "null" */} /* sqlite3.c:119398:21 */
// Implementation of the length() function
-func lengthFunc(tls *libc.TLS, context uintptr, argc int32, argv uintptr) { /* sqlite3.c:118527:13: */
+func lengthFunc(tls *libc.TLS, context uintptr, argc int32, argv uintptr) { /* sqlite3.c:119418:13: */
_ = argc
switch Xsqlite3_value_type(tls, *(*uintptr)(unsafe.Pointer(argv))) {
@@ -98301,7 +100683,7 @@ func lengthFunc(tls *libc.TLS, context uintptr, argc int32, argv uintptr) { /* s
//
// IMP: R-23979-26855 The abs(X) function returns the absolute value of
// the numeric argument X.
-func absFunc(tls *libc.TLS, context uintptr, argc int32, argv uintptr) { /* sqlite3.c:118569:13: */
+func absFunc(tls *libc.TLS, context uintptr, argc int32, argv uintptr) { /* sqlite3.c:119460:13: */
_ = argc
switch Xsqlite3_value_type(tls, *(*uintptr)(unsafe.Pointer(argv))) {
@@ -98313,7 +100695,7 @@ func absFunc(tls *libc.TLS, context uintptr, argc int32, argv uintptr) { /* sqli
// IMP: R-31676-45509 If X is the integer -9223372036854775808
// then abs(X) throws an integer overflow error since there is no
// equivalent positive 64-bit two complement value.
- Xsqlite3_result_error(tls, context, ts+13080 /* "integer overflow" */, -1)
+ Xsqlite3_result_error(tls, context, ts+13533 /* "integer overflow" */, -1)
return
}
iVal = -iVal
@@ -98355,7 +100737,7 @@ func absFunc(tls *libc.TLS, context uintptr, argc int32, argv uintptr) { /* sqli
// If both haystack and needle are BLOBs, then the result is one more than
// the number of bytes in haystack prior to the first occurrence of needle,
// or 0 if needle never occurs in haystack.
-func instrFunc(tls *libc.TLS, context uintptr, argc int32, argv uintptr) { /* sqlite3.c:118618:13: */
+func instrFunc(tls *libc.TLS, context uintptr, argc int32, argv uintptr) { /* sqlite3.c:119509:13: */
var zHaystack uintptr
var zNeedle uintptr
var nHaystack int32
@@ -98470,7 +100852,7 @@ endInstrOOM:
}
// Implementation of the printf() function.
-func printfFunc(tls *libc.TLS, context uintptr, argc int32, argv uintptr) { /* sqlite3.c:118686:13: */
+func printfFunc(tls *libc.TLS, context uintptr, argc int32, argv uintptr) { /* sqlite3.c:119577:13: */
bp := tls.Alloc(56)
defer tls.Free(56)
@@ -98505,7 +100887,7 @@ func printfFunc(tls *libc.TLS, context uintptr, argc int32, argv uintptr) { /* s
// If p1 is negative, then we begin abs(p1) from the end of x[].
//
// If p2 is negative, return the p2 characters preceding p1.
-func substrFunc(tls *libc.TLS, context uintptr, argc int32, argv uintptr) { /* sqlite3.c:118722:13: */
+func substrFunc(tls *libc.TLS, context uintptr, argc int32, argv uintptr) { /* sqlite3.c:119613:13: */
var z uintptr
var z2 uintptr
var len int32
@@ -98613,7 +100995,7 @@ func substrFunc(tls *libc.TLS, context uintptr, argc int32, argv uintptr) { /* s
}
// Implementation of the round() function
-func roundFunc(tls *libc.TLS, context uintptr, argc int32, argv uintptr) { /* sqlite3.c:118817:13: */
+func roundFunc(tls *libc.TLS, context uintptr, argc int32, argv uintptr) { /* sqlite3.c:119708:13: */
bp := tls.Alloc(24)
defer tls.Free(24)
@@ -98644,14 +101026,14 @@ func roundFunc(tls *libc.TLS, context uintptr, argc int32, argv uintptr) { /* sq
if (*(*float64)(unsafe.Pointer(bp + 16 /* r */)) < -4503599627370496.0) || (*(*float64)(unsafe.Pointer(bp + 16 /* r */)) > +4503599627370496.0) {
// The value has no fractional part so there is nothing to round
} else if n == 0 {
- *(*float64)(unsafe.Pointer(bp + 16 /* r */)) = float64((Sqlite_int64(*(*float64)(unsafe.Pointer(bp + 16 /* r */)) + (func() float64 {
+ *(*float64)(unsafe.Pointer(bp + 16 /* r */)) = float64((libc.Int64FromFloat64(*(*float64)(unsafe.Pointer(bp + 16 /* r */)) + (func() float64 {
if *(*float64)(unsafe.Pointer(bp + 16 /* r */)) < float64(0) {
return -0.5
}
return +0.5
}()))))
} else {
- zBuf = Xsqlite3_mprintf(tls, ts+13097 /* "%.*f" */, libc.VaList(bp, n, *(*float64)(unsafe.Pointer(bp + 16 /* r */))))
+ zBuf = Xsqlite3_mprintf(tls, ts+13550 /* "%.*f" */, libc.VaList(bp, n, *(*float64)(unsafe.Pointer(bp + 16 /* r */))))
if zBuf == uintptr(0) {
Xsqlite3_result_error_nomem(tls, context)
return
@@ -98667,7 +101049,7 @@ func roundFunc(tls *libc.TLS, context uintptr, argc int32, argv uintptr) { /* sq
// the database handle that malloc() has failed and return NULL.
// If nByte is larger than the maximum string or blob length, then
// raise an SQLITE_TOOBIG exception and return NULL.
-func contextMalloc(tls *libc.TLS, context uintptr, nByte I64) uintptr { /* sqlite3.c:118858:13: */
+func contextMalloc(tls *libc.TLS, context uintptr, nByte I64) uintptr { /* sqlite3.c:119749:13: */
var z uintptr
var db uintptr = Xsqlite3_context_db_handle(tls, context)
@@ -98684,7 +101066,7 @@ func contextMalloc(tls *libc.TLS, context uintptr, nByte I64) uintptr { /* sqlit
}
// Implementation of the upper() and lower() SQL functions.
-func upperFunc(tls *libc.TLS, context uintptr, argc int32, argv uintptr) { /* sqlite3.c:118879:13: */
+func upperFunc(tls *libc.TLS, context uintptr, argc int32, argv uintptr) { /* sqlite3.c:119770:13: */
var z1 uintptr
var z2 uintptr
var i int32
@@ -98698,14 +101080,14 @@ func upperFunc(tls *libc.TLS, context uintptr, argc int32, argv uintptr) { /* sq
z1 = contextMalloc(tls, context, ((I64(n)) + int64(1)))
if z1 != 0 {
for i = 0; i < n; i++ {
- *(*int8)(unsafe.Pointer(z1 + uintptr(i))) = (int8((int32(*(*int8)(unsafe.Pointer(z2 + uintptr(i))))) & ^(int32(Xsqlite3CtypeMap[uint8(*(*int8)(unsafe.Pointer(z2 + uintptr(i))))]) & 0x20)))
+ *(*uint8)(unsafe.Pointer(z1 + uintptr(i))) = (uint8((int32(*(*uint8)(unsafe.Pointer(z2 + uintptr(i))))) & ^(int32(Xsqlite3CtypeMap[uint8(*(*uint8)(unsafe.Pointer(z2 + uintptr(i))))]) & 0x20)))
}
Xsqlite3_result_text(tls, context, z1, n, *(*uintptr)(unsafe.Pointer(&struct{ f func(*libc.TLS, uintptr) }{Xsqlite3_free})))
}
}
}
-func lowerFunc(tls *libc.TLS, context uintptr, argc int32, argv uintptr) { /* sqlite3.c:118898:13: */
+func lowerFunc(tls *libc.TLS, context uintptr, argc int32, argv uintptr) { /* sqlite3.c:119789:13: */
var z1 uintptr
var z2 uintptr
var i int32
@@ -98719,7 +101101,7 @@ func lowerFunc(tls *libc.TLS, context uintptr, argc int32, argv uintptr) { /* sq
z1 = contextMalloc(tls, context, ((I64(n)) + int64(1)))
if z1 != 0 {
for i = 0; i < n; i++ {
- *(*int8)(unsafe.Pointer(z1 + uintptr(i))) = int8(Xsqlite3UpperToLower[uint8(*(*int8)(unsafe.Pointer(z2 + uintptr(i))))])
+ *(*uint8)(unsafe.Pointer(z1 + uintptr(i))) = uint8(Xsqlite3UpperToLower[uint8(*(*uint8)(unsafe.Pointer(z2 + uintptr(i))))])
}
Xsqlite3_result_text(tls, context, z1, n, *(*uintptr)(unsafe.Pointer(&struct{ f func(*libc.TLS, uintptr) }{Xsqlite3_free})))
}
@@ -98734,7 +101116,7 @@ func lowerFunc(tls *libc.TLS, context uintptr, argc int32, argv uintptr) { /* sq
// is. We might as well use the "version()" function as a substitute.
// Implementation of random(). Return a random integer.
-func randomFunc(tls *libc.TLS, context uintptr, NotUsed int32, NotUsed2 uintptr) { /* sqlite3.c:118931:13: */
+func randomFunc(tls *libc.TLS, context uintptr, NotUsed int32, NotUsed2 uintptr) { /* sqlite3.c:119822:13: */
bp := tls.Alloc(8)
defer tls.Free(8)
@@ -98758,7 +101140,7 @@ func randomFunc(tls *libc.TLS, context uintptr, NotUsed int32, NotUsed2 uintptr)
// Implementation of randomblob(N). Return a random blob
// that is N bytes long.
-func randomBlob(tls *libc.TLS, context uintptr, argc int32, argv uintptr) { /* sqlite3.c:118957:13: */
+func randomBlob(tls *libc.TLS, context uintptr, argc int32, argv uintptr) { /* sqlite3.c:119848:13: */
var n Sqlite3_int64
var p uintptr
@@ -98776,7 +101158,7 @@ func randomBlob(tls *libc.TLS, context uintptr, argc int32, argv uintptr) { /* s
// Implementation of the last_insert_rowid() SQL function. The return
// value is the same as the sqlite3_last_insert_rowid() API function.
-func last_insert_rowid(tls *libc.TLS, context uintptr, NotUsed int32, NotUsed2 uintptr) { /* sqlite3.c:118981:13: */
+func last_insert_rowid(tls *libc.TLS, context uintptr, NotUsed int32, NotUsed2 uintptr) { /* sqlite3.c:119872:13: */
var db uintptr = Xsqlite3_context_db_handle(tls, context)
_ = NotUsed
_ = NotUsed2
@@ -98791,7 +101173,7 @@ func last_insert_rowid(tls *libc.TLS, context uintptr, NotUsed int32, NotUsed2 u
// IMP: R-62073-11209 The changes() SQL function is a wrapper
// around the sqlite3_changes() C/C++ function and hence follows the same
// rules for counting changes.
-func changes(tls *libc.TLS, context uintptr, NotUsed int32, NotUsed2 uintptr) { /* sqlite3.c:119001:13: */
+func changes(tls *libc.TLS, context uintptr, NotUsed int32, NotUsed2 uintptr) { /* sqlite3.c:119892:13: */
var db uintptr = Xsqlite3_context_db_handle(tls, context)
_ = NotUsed
_ = NotUsed2
@@ -98800,7 +101182,7 @@ func changes(tls *libc.TLS, context uintptr, NotUsed int32, NotUsed2 uintptr) {
// Implementation of the total_changes() SQL function. The return value is
// the same as the sqlite3_total_changes() API function.
-func total_changes(tls *libc.TLS, context uintptr, NotUsed int32, NotUsed2 uintptr) { /* sqlite3.c:119015:13: */
+func total_changes(tls *libc.TLS, context uintptr, NotUsed int32, NotUsed2 uintptr) { /* sqlite3.c:119906:13: */
var db uintptr = Xsqlite3_context_db_handle(tls, context)
_ = NotUsed
_ = NotUsed2
@@ -98815,20 +101197,20 @@ type compareInfo = struct {
FmatchOne U8
FmatchSet U8
FnoCase U8
-} /* sqlite3.c:119030:1 */
+} /* sqlite3.c:119921:1 */
// For LIKE and GLOB matching on EBCDIC machines, assume that every
// character is exactly one byte in size. Also, provde the Utf8Read()
// macro for fast reading of the next character in the common case where
// the next character is ASCII.
-var globInfo = compareInfo{FmatchAll: U8('*'), FmatchOne: U8('?'), FmatchSet: U8('[')} /* sqlite3.c:119050:33 */
+var globInfo = compareInfo{FmatchAll: U8('*'), FmatchOne: U8('?'), FmatchSet: U8('[')} /* sqlite3.c:119941:33 */
// The correct SQL-92 behavior is for the LIKE operator to ignore
// case. Thus 'a' LIKE 'A' would be true.
-var likeInfoNorm = compareInfo{FmatchAll: U8('%'), FmatchOne: U8('_'), FnoCase: U8(1)} /* sqlite3.c:119053:33 */
+var likeInfoNorm = compareInfo{FmatchAll: U8('%'), FmatchOne: U8('_'), FnoCase: U8(1)} /* sqlite3.c:119944:33 */
// If SQLITE_CASE_SENSITIVE_LIKE is defined, then the LIKE operator
// is case sensitive causing 'a' LIKE 'A' to be false
-var likeInfoAlt = compareInfo{FmatchAll: U8('%'), FmatchOne: U8('_')} /* sqlite3.c:119056:33 */
+var likeInfoAlt = compareInfo{FmatchAll: U8('%'), FmatchOne: U8('_')} /* sqlite3.c:119947:33 */
// Possible error returns from patternMatch()
@@ -98868,7 +101250,7 @@ var likeInfoAlt = compareInfo{FmatchAll: U8('%'), FmatchOne: U8('_')} /* sqlite3
// The comments within this routine usually assume glob matching.
//
// This routine is usually quick, but can be N**2 in the worst case.
-func patternCompare(tls *libc.TLS, zPattern uintptr, zString uintptr, pInfo uintptr, matchOther U32) int32 { /* sqlite3.c:119103:12: */
+func patternCompare(tls *libc.TLS, zPattern uintptr, zString uintptr, pInfo uintptr, matchOther U32) int32 { /* sqlite3.c:119994:12: */
bp := tls.Alloc(19)
defer tls.Free(19)
*(*uintptr)(unsafe.Pointer(bp)) = zPattern
@@ -98941,16 +101323,16 @@ func patternCompare(tls *libc.TLS, zPattern uintptr, zString uintptr, pInfo uint
// c but in the other case and search the input string for either
// c or cx.
if c <= U32(0x80) {
- // var zStop [3]int8 at bp+16, 3
+ // var zStop [3]uint8 at bp+16, 3
var bMatch int32
if noCase != 0 {
- *(*int8)(unsafe.Pointer(bp + 16 /* &zStop[0] */)) = (int8((c) & U32(^(int32(Xsqlite3CtypeMap[uint8(c)]) & 0x20))))
- *(*int8)(unsafe.Pointer(bp + 16 /* &zStop[0] */ + 1)) = int8(Xsqlite3UpperToLower[uint8(c)])
- *(*int8)(unsafe.Pointer(bp + 16 /* &zStop[0] */ + 2)) = int8(0)
+ *(*uint8)(unsafe.Pointer(bp + 16 /* &zStop[0] */)) = (uint8((c) & U32(^(int32(Xsqlite3CtypeMap[uint8(c)]) & 0x20))))
+ *(*uint8)(unsafe.Pointer(bp + 16 /* &zStop[0] */ + 1)) = uint8(Xsqlite3UpperToLower[uint8(c)])
+ *(*uint8)(unsafe.Pointer(bp + 16 /* &zStop[0] */ + 2)) = uint8(0)
} else {
- *(*int8)(unsafe.Pointer(bp + 16 /* &zStop[0] */)) = int8(c)
- *(*int8)(unsafe.Pointer(bp + 16 /* &zStop[0] */ + 1)) = int8(0)
+ *(*uint8)(unsafe.Pointer(bp + 16 /* &zStop[0] */)) = uint8(c)
+ *(*uint8)(unsafe.Pointer(bp + 16 /* &zStop[0] */ + 1)) = uint8(0)
}
for 1 != 0 {
*(*uintptr)(unsafe.Pointer(bp + 8 /* zString */)) += uintptr(libc.Xstrcspn(tls, *(*uintptr)(unsafe.Pointer(bp + 8 /* zString */)), bp+16 /* &zStop[0] */))
@@ -99054,13 +101436,13 @@ func patternCompare(tls *libc.TLS, zPattern uintptr, zString uintptr, pInfo uint
// The sqlite3_strglob() interface. Return 0 on a match (like strcmp()) and
// non-zero if there is no match.
-func Xsqlite3_strglob(tls *libc.TLS, zGlobPattern uintptr, zString uintptr) int32 { /* sqlite3.c:119236:16: */
+func Xsqlite3_strglob(tls *libc.TLS, zGlobPattern uintptr, zString uintptr) int32 { /* sqlite3.c:120127:16: */
return patternCompare(tls, zGlobPattern, zString, uintptr(unsafe.Pointer(&globInfo)), uint32('['))
}
// The sqlite3_strlike() interface. Return 0 on a match and non-zero for
// a miss - like strcmp().
-func Xsqlite3_strlike(tls *libc.TLS, zPattern uintptr, zStr uintptr, esc uint32) int32 { /* sqlite3.c:119244:16: */
+func Xsqlite3_strlike(tls *libc.TLS, zPattern uintptr, zStr uintptr, esc uint32) int32 { /* sqlite3.c:120135:16: */
return patternCompare(tls, zPattern, zStr, uintptr(unsafe.Pointer(&likeInfoNorm)), esc)
}
@@ -99078,7 +101460,7 @@ func Xsqlite3_strlike(tls *libc.TLS, zPattern uintptr, zStr uintptr, esc uint32)
//
// This same function (with a different compareInfo structure) computes
// the GLOB operator.
-func likeFunc(tls *libc.TLS, context uintptr, argc int32, argv uintptr) { /* sqlite3.c:119270:13: */
+func likeFunc(tls *libc.TLS, context uintptr, argc int32, argv uintptr) { /* sqlite3.c:120161:13: */
bp := tls.Alloc(12)
defer tls.Free(12)
@@ -99101,7 +101483,7 @@ func likeFunc(tls *libc.TLS, context uintptr, argc int32, argv uintptr) { /* sql
nPat = Xsqlite3_value_bytes(tls, *(*uintptr)(unsafe.Pointer(argv)))
if nPat > *(*int32)(unsafe.Pointer((db + 128 /* &.aLimit */) + 8*4)) {
- Xsqlite3_result_error(tls, context, ts+13102 /* "LIKE or GLOB pat..." */, -1)
+ Xsqlite3_result_error(tls, context, ts+13555 /* "LIKE or GLOB pat..." */, -1)
return
}
if argc == 3 {
@@ -99113,7 +101495,7 @@ func likeFunc(tls *libc.TLS, context uintptr, argc int32, argv uintptr) { /* sql
}
if Xsqlite3Utf8CharLen(tls, *(*uintptr)(unsafe.Pointer(bp /* zEsc */)), -1) != 1 {
Xsqlite3_result_error(tls, context,
- ts+13135 /* "ESCAPE expressio..." */, -1)
+ ts+13588 /* "ESCAPE expressio..." */, -1)
return
}
escape = Xsqlite3Utf8Read(tls, bp /* &zEsc */)
@@ -99141,7 +101523,7 @@ func likeFunc(tls *libc.TLS, context uintptr, argc int32, argv uintptr) { /* sql
// Implementation of the NULLIF(x,y) function. The result is the first
// argument if the arguments are different. The result is NULL if the
// arguments are equal to each other.
-func nullifFunc(tls *libc.TLS, context uintptr, NotUsed int32, argv uintptr) { /* sqlite3.c:119341:13: */
+func nullifFunc(tls *libc.TLS, context uintptr, NotUsed int32, argv uintptr) { /* sqlite3.c:120232:13: */
var pColl uintptr = sqlite3GetFuncCollSeq(tls, context)
_ = NotUsed
if Xsqlite3MemCompare(tls, *(*uintptr)(unsafe.Pointer(argv)), *(*uintptr)(unsafe.Pointer(argv + 1*8)), pColl) != 0 {
@@ -99151,7 +101533,7 @@ func nullifFunc(tls *libc.TLS, context uintptr, NotUsed int32, argv uintptr) { /
// Implementation of the sqlite_version() function. The result is the version
// of the SQLite library that is running.
-func versionFunc(tls *libc.TLS, context uintptr, NotUsed int32, NotUsed2 uintptr) { /* sqlite3.c:119357:13: */
+func versionFunc(tls *libc.TLS, context uintptr, NotUsed int32, NotUsed2 uintptr) { /* sqlite3.c:120248:13: */
_ = NotUsed
_ = NotUsed2
// IMP: R-48699-48617 This function is an SQL wrapper around the
@@ -99162,7 +101544,7 @@ func versionFunc(tls *libc.TLS, context uintptr, NotUsed int32, NotUsed2 uintptr
// Implementation of the sqlite_source_id() function. The result is a string
// that identifies the particular version of the source code used to build
// SQLite.
-func sourceidFunc(tls *libc.TLS, context uintptr, NotUsed int32, NotUsed2 uintptr) { /* sqlite3.c:119373:13: */
+func sourceidFunc(tls *libc.TLS, context uintptr, NotUsed int32, NotUsed2 uintptr) { /* sqlite3.c:120264:13: */
_ = NotUsed
_ = NotUsed2
// IMP: R-24470-31136 This function is an SQL wrapper around the
@@ -99173,19 +101555,19 @@ func sourceidFunc(tls *libc.TLS, context uintptr, NotUsed int32, NotUsed2 uintpt
// Implementation of the sqlite_log() function. This is a wrapper around
// sqlite3_log(). The return value is NULL. The function exists purely for
// its side-effects.
-func errlogFunc(tls *libc.TLS, context uintptr, argc int32, argv uintptr) { /* sqlite3.c:119389:13: */
+func errlogFunc(tls *libc.TLS, context uintptr, argc int32, argv uintptr) { /* sqlite3.c:120280:13: */
bp := tls.Alloc(8)
defer tls.Free(8)
_ = argc
_ = context
- Xsqlite3_log(tls, Xsqlite3_value_int(tls, *(*uintptr)(unsafe.Pointer(argv))), ts+2718 /* "%s" */, libc.VaList(bp, Xsqlite3_value_text(tls, *(*uintptr)(unsafe.Pointer(argv + 1*8)))))
+ Xsqlite3_log(tls, Xsqlite3_value_int(tls, *(*uintptr)(unsafe.Pointer(argv))), ts+2790 /* "%s" */, libc.VaList(bp, Xsqlite3_value_text(tls, *(*uintptr)(unsafe.Pointer(argv + 1*8)))))
}
// Implementation of the sqlite_compileoption_used() function.
// The result is an integer that identifies if the compiler option
// was used to build SQLite.
-func compileoptionusedFunc(tls *libc.TLS, context uintptr, argc int32, argv uintptr) { /* sqlite3.c:119405:13: */
+func compileoptionusedFunc(tls *libc.TLS, context uintptr, argc int32, argv uintptr) { /* sqlite3.c:120296:13: */
var zOptName uintptr
_ = argc
@@ -99200,7 +101582,7 @@ func compileoptionusedFunc(tls *libc.TLS, context uintptr, argc int32, argv uint
// Implementation of the sqlite_compileoption_get() function.
// The result is a string that identifies the compiler options
// used to build SQLite.
-func compileoptiongetFunc(tls *libc.TLS, context uintptr, argc int32, argv uintptr) { /* sqlite3.c:119429:13: */
+func compileoptiongetFunc(tls *libc.TLS, context uintptr, argc int32, argv uintptr) { /* sqlite3.c:120320:13: */
var n int32
_ = argc
@@ -99212,17 +101594,17 @@ func compileoptiongetFunc(tls *libc.TLS, context uintptr, argc int32, argv uintp
// Array for converting from half-bytes (nybbles) into ASCII hex
// digits.
-var hexdigits = [16]int8{
- int8('0'), int8('1'), int8('2'), int8('3'), int8('4'), int8('5'), int8('6'), int8('7'),
- int8('8'), int8('9'), int8('A'), int8('B'), int8('C'), int8('D'), int8('E'), int8('F'),
-} /* sqlite3.c:119447:19 */
+var hexdigits = [16]uint8{
+ uint8('0'), uint8('1'), uint8('2'), uint8('3'), uint8('4'), uint8('5'), uint8('6'), uint8('7'),
+ uint8('8'), uint8('9'), uint8('A'), uint8('B'), uint8('C'), uint8('D'), uint8('E'), uint8('F'),
+} /* sqlite3.c:120338:19 */
// Implementation of the QUOTE() function. This function takes a single
// argument. If the argument is numeric, the return value is the same as
// the argument. If the argument is NULL, the return value is the string
// "NULL". Otherwise, the argument is enclosed in single quotes with
// single-quote escapes.
-func quoteFunc(tls *libc.TLS, context uintptr, argc int32, argv uintptr) { /* sqlite3.c:119459:13: */
+func quoteFunc(tls *libc.TLS, context uintptr, argc int32, argv uintptr) { /* sqlite3.c:120350:13: */
bp := tls.Alloc(80)
defer tls.Free(80)
@@ -99233,13 +101615,13 @@ func quoteFunc(tls *libc.TLS, context uintptr, argc int32, argv uintptr) { /* sq
var r1 float64
// var r2 float64 at bp+72, 8
- // var zBuf [50]int8 at bp+16, 50
+ // var zBuf [50]uint8 at bp+16, 50
r1 = Xsqlite3_value_double(tls, *(*uintptr)(unsafe.Pointer(argv)))
- Xsqlite3_snprintf(tls, int32(unsafe.Sizeof([50]int8{})), bp+16 /* &zBuf[0] */, ts+3903 /* "%!.15g" */, libc.VaList(bp, r1))
+ Xsqlite3_snprintf(tls, int32(unsafe.Sizeof([50]uint8{})), bp+16 /* &zBuf[0] */, ts+4034 /* "%!.15g" */, libc.VaList(bp, r1))
Xsqlite3AtoF(tls, bp+16 /* &zBuf[0] */, bp+72 /* &r2 */, 20, uint8(SQLITE_UTF8))
if r1 != *(*float64)(unsafe.Pointer(bp + 72 /* r2 */)) {
- Xsqlite3_snprintf(tls, int32(unsafe.Sizeof([50]int8{})), bp+16 /* &zBuf[0] */, ts+13180 /* "%!.20e" */, libc.VaList(bp+8, r1))
+ Xsqlite3_snprintf(tls, int32(unsafe.Sizeof([50]uint8{})), bp+16 /* &zBuf[0] */, ts+13633 /* "%!.20e" */, libc.VaList(bp+8, r1))
}
Xsqlite3_result_text(tls, context, bp+16 /* &zBuf[0] */, -1, libc.UintptrFromInt32(-1))
break
@@ -99261,13 +101643,13 @@ func quoteFunc(tls *libc.TLS, context uintptr, argc int32, argv uintptr) { /* sq
if zText != 0 {
var i int32
for i = 0; i < nBlob; i++ {
- *(*int8)(unsafe.Pointer(zText + uintptr(((i * 2) + 2)))) = hexdigits[((int32(*(*int8)(unsafe.Pointer(zBlob + uintptr(i)))) >> 4) & 0x0F)]
- *(*int8)(unsafe.Pointer(zText + uintptr(((i * 2) + 3)))) = hexdigits[((int32(*(*int8)(unsafe.Pointer(zBlob + uintptr(i))))) & 0x0F)]
+ *(*uint8)(unsafe.Pointer(zText + uintptr(((i * 2) + 2)))) = hexdigits[((int32(*(*uint8)(unsafe.Pointer(zBlob + uintptr(i)))) >> 4) & 0x0F)]
+ *(*uint8)(unsafe.Pointer(zText + uintptr(((i * 2) + 3)))) = hexdigits[((int32(*(*uint8)(unsafe.Pointer(zBlob + uintptr(i))))) & 0x0F)]
}
- *(*int8)(unsafe.Pointer(zText + uintptr(((nBlob * 2) + 2)))) = int8('\'')
- *(*int8)(unsafe.Pointer(zText + uintptr(((nBlob * 2) + 3)))) = int8(0)
- *(*int8)(unsafe.Pointer(zText)) = int8('X')
- *(*int8)(unsafe.Pointer(zText + 1)) = int8('\'')
+ *(*uint8)(unsafe.Pointer(zText + uintptr(((nBlob * 2) + 2)))) = uint8('\'')
+ *(*uint8)(unsafe.Pointer(zText + uintptr(((nBlob * 2) + 3)))) = uint8(0)
+ *(*uint8)(unsafe.Pointer(zText)) = uint8('X')
+ *(*uint8)(unsafe.Pointer(zText + 1)) = uint8('\'')
Xsqlite3_result_text(tls, context, zText, -1, libc.UintptrFromInt32(-1))
Xsqlite3_free(tls, zText)
}
@@ -99294,17 +101676,17 @@ func quoteFunc(tls *libc.TLS, context uintptr, argc int32, argv uintptr) { /* sq
}
z = contextMalloc(tls, context, (((I64(i)) + (I64(n))) + int64(3)))
if z != 0 {
- *(*int8)(unsafe.Pointer(z)) = int8('\'')
+ *(*uint8)(unsafe.Pointer(z)) = uint8('\'')
i = 0
j = 1
for ; *(*uint8)(unsafe.Pointer(zArg + uintptr(i))) != 0; i++ {
- *(*int8)(unsafe.Pointer(z + uintptr(libc.PostIncInt32(&j, 1)))) = int8(*(*uint8)(unsafe.Pointer(zArg + uintptr(i))))
+ *(*uint8)(unsafe.Pointer(z + uintptr(libc.PostIncInt32(&j, 1)))) = uint8(*(*uint8)(unsafe.Pointer(zArg + uintptr(i))))
if int32(*(*uint8)(unsafe.Pointer(zArg + uintptr(i)))) == '\'' {
- *(*int8)(unsafe.Pointer(z + uintptr(libc.PostIncInt32(&j, 1)))) = int8('\'')
+ *(*uint8)(unsafe.Pointer(z + uintptr(libc.PostIncInt32(&j, 1)))) = uint8('\'')
}
}
- *(*int8)(unsafe.Pointer(z + uintptr(libc.PostIncInt32(&j, 1)))) = int8('\'')
- *(*int8)(unsafe.Pointer(z + uintptr(j))) = int8(0)
+ *(*uint8)(unsafe.Pointer(z + uintptr(libc.PostIncInt32(&j, 1)))) = uint8('\'')
+ *(*uint8)(unsafe.Pointer(z + uintptr(j))) = uint8(0)
Xsqlite3_result_text(tls, context, z, j, *(*uintptr)(unsafe.Pointer(&struct{ f func(*libc.TLS, uintptr) }{Xsqlite3_free})))
}
break
@@ -99313,7 +101695,7 @@ func quoteFunc(tls *libc.TLS, context uintptr, argc int32, argv uintptr) { /* sq
default:
{
- Xsqlite3_result_text(tls, context, ts+704 /* "NULL" */, 4, uintptr(0))
+ Xsqlite3_result_text(tls, context, ts+756 /* "NULL" */, 4, uintptr(0))
break
}
@@ -99322,7 +101704,7 @@ func quoteFunc(tls *libc.TLS, context uintptr, argc int32, argv uintptr) { /* sq
// The unicode() function. Return the integer unicode code-point value
// for the first character of the input string.
-func unicodeFunc(tls *libc.TLS, context uintptr, argc int32, argv uintptr) { /* sqlite3.c:119535:13: */
+func unicodeFunc(tls *libc.TLS, context uintptr, argc int32, argv uintptr) { /* sqlite3.c:120426:13: */
bp := tls.Alloc(8)
defer tls.Free(8)
@@ -99336,7 +101718,7 @@ func unicodeFunc(tls *libc.TLS, context uintptr, argc int32, argv uintptr) { /*
// The char() function takes zero or more arguments, each of which is
// an integer. It constructs a string where each character of the string
// is the unicode character for the corresponding integer argument.
-func charFunc(tls *libc.TLS, context uintptr, argc int32, argv uintptr) { /* sqlite3.c:119550:13: */
+func charFunc(tls *libc.TLS, context uintptr, argc int32, argv uintptr) { /* sqlite3.c:120441:13: */
var z uintptr
var zOut uintptr
var i int32
@@ -99374,7 +101756,7 @@ func charFunc(tls *libc.TLS, context uintptr, argc int32, argv uintptr) { /* sql
// The hex() function. Interpret the argument as a blob. Return
// a hexadecimal rendering as text.
-func hexFunc(tls *libc.TLS, context uintptr, argc int32, argv uintptr) { /* sqlite3.c:119591:13: */
+func hexFunc(tls *libc.TLS, context uintptr, argc int32, argv uintptr) { /* sqlite3.c:120482:13: */
var i int32
var n int32
var pBlob uintptr
@@ -99394,8 +101776,8 @@ func hexFunc(tls *libc.TLS, context uintptr, argc int32, argv uintptr) { /* sqli
}
{
var c uint8 = *(*uint8)(unsafe.Pointer(pBlob))
- *(*int8)(unsafe.Pointer(libc.PostIncUintptr(&z, 1))) = hexdigits[((int32(c) >> 4) & 0xf)]
- *(*int8)(unsafe.Pointer(libc.PostIncUintptr(&z, 1))) = hexdigits[(int32(c) & 0xf)]
+ *(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&z, 1))) = hexdigits[((int32(c) >> 4) & 0xf)]
+ *(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&z, 1))) = hexdigits[(int32(c) & 0xf)]
}
goto __2
@@ -99406,13 +101788,13 @@ func hexFunc(tls *libc.TLS, context uintptr, argc int32, argv uintptr) { /* sqli
goto __3
__3:
;
- *(*int8)(unsafe.Pointer(z)) = int8(0)
+ *(*uint8)(unsafe.Pointer(z)) = uint8(0)
Xsqlite3_result_text(tls, context, zHex, (n * 2), *(*uintptr)(unsafe.Pointer(&struct{ f func(*libc.TLS, uintptr) }{Xsqlite3_free})))
}
}
// The zeroblob(N) function returns a zero-filled blob of size N bytes.
-func zeroblobFunc(tls *libc.TLS, context uintptr, argc int32, argv uintptr) { /* sqlite3.c:119619:13: */
+func zeroblobFunc(tls *libc.TLS, context uintptr, argc int32, argv uintptr) { /* sqlite3.c:120510:13: */
var n I64
var rc int32
@@ -99431,7 +101813,7 @@ func zeroblobFunc(tls *libc.TLS, context uintptr, argc int32, argv uintptr) { /*
// them A, B, and C. The result is also a string which is derived
// from A by replacing every occurrence of B with C. The match
// must be exact. Collating sequences are not used.
-func replaceFunc(tls *libc.TLS, context uintptr, argc int32, argv uintptr) { /* sqlite3.c:119642:13: */
+func replaceFunc(tls *libc.TLS, context uintptr, argc int32, argv uintptr) { /* sqlite3.c:120533:13: */
var zStr uintptr // The input string A
var zPattern uintptr // The pattern string B
var zRep uintptr // The replacement string C
@@ -99520,10 +101902,10 @@ func replaceFunc(tls *libc.TLS, context uintptr, argc int32, argv uintptr) { /*
// Implementation of the TRIM(), LTRIM(), and RTRIM() functions.
// The userdata is 0x1 for left trim, 0x2 for right trim, 0x3 for both.
-func trimFunc(tls *libc.TLS, context uintptr, argc int32, argv uintptr) { /* sqlite3.c:119735:13: */
+func trimFunc(tls *libc.TLS, context uintptr, argc int32, argv uintptr) { /* sqlite3.c:120626:13: */
var zIn uintptr // Input string
var zCharSet uintptr // Set of characters to trim
- var nIn int32 // Number of bytes in input
+ var nIn uint32 // Number of bytes in input
var flags int32 // 1: trimleft 2: trimright 3: trim
var i int32 // Loop counter
var aLen uintptr = uintptr(0) // Length of each character in zCharSet
@@ -99537,7 +101919,7 @@ func trimFunc(tls *libc.TLS, context uintptr, argc int32, argv uintptr) { /* sql
if zIn == uintptr(0) {
return
}
- nIn = Xsqlite3_value_bytes(tls, *(*uintptr)(unsafe.Pointer(argv)))
+ nIn = uint32(Xsqlite3_value_bytes(tls, *(*uintptr)(unsafe.Pointer(argv))))
if argc == 1 {
nChar = 1
@@ -99561,7 +101943,8 @@ func trimFunc(tls *libc.TLS, context uintptr, argc int32, argv uintptr) { /* sql
}
if nChar > 0 {
- azChar = contextMalloc(tls, context, (int64((uint64(I64(nChar))) * (uint64(unsafe.Sizeof(uintptr(0))) + uint64(1)))))
+ azChar = contextMalloc(tls, context,
+ (int64((uint64(I64(nChar))) * (uint64(unsafe.Sizeof(uintptr(0))) + uint64(unsafe.Sizeof(uint32(0)))))))
if azChar == uintptr(0) {
return
}
@@ -99578,17 +101961,17 @@ func trimFunc(tls *libc.TLS, context uintptr, argc int32, argv uintptr) { /* sql
}
}
- *(*uint8)(unsafe.Pointer(aLen + uintptr(nChar))) = (U8((int64(z) - int64(*(*uintptr)(unsafe.Pointer(azChar + uintptr(nChar)*8)))) / 1))
+ *(*uint32)(unsafe.Pointer(aLen + uintptr(nChar)*4)) = (uint32((int64(z) - int64(*(*uintptr)(unsafe.Pointer(azChar + uintptr(nChar)*8)))) / 1))
}
}
}
if nChar > 0 {
flags = int32(Xsqlite3_user_data(tls, context))
if (flags & 1) != 0 {
- for nIn > 0 {
- var len int32 = 0
+ for nIn > uint32(0) {
+ var len uint32 = uint32(0)
for i = 0; i < nChar; i++ {
- len = int32(*(*uint8)(unsafe.Pointer(aLen + uintptr(i))))
+ len = *(*uint32)(unsafe.Pointer(aLen + uintptr(i)*4))
if (len <= nIn) && (libc.Xmemcmp(tls, zIn, *(*uintptr)(unsafe.Pointer(azChar + uintptr(i)*8)), uint64(len)) == 0) {
break
}
@@ -99601,10 +101984,10 @@ func trimFunc(tls *libc.TLS, context uintptr, argc int32, argv uintptr) { /* sql
}
}
if (flags & 2) != 0 {
- for nIn > 0 {
- var len int32 = 0
+ for nIn > uint32(0) {
+ var len uint32 = uint32(0)
for i = 0; i < nChar; i++ {
- len = int32(*(*uint8)(unsafe.Pointer(aLen + uintptr(i))))
+ len = *(*uint32)(unsafe.Pointer(aLen + uintptr(i)*4))
if (len <= nIn) && (libc.Xmemcmp(tls, (zIn+uintptr((nIn-len))), *(*uintptr)(unsafe.Pointer(azChar + uintptr(i)*8)), uint64(len)) == 0) {
break
}
@@ -99619,11 +102002,11 @@ func trimFunc(tls *libc.TLS, context uintptr, argc int32, argv uintptr) { /* sql
Xsqlite3_free(tls, azChar)
}
}
- Xsqlite3_result_text(tls, context, zIn, nIn, libc.UintptrFromInt32(-1))
+ Xsqlite3_result_text(tls, context, zIn, int32(nIn), libc.UintptrFromInt32(-1))
}
-var lenOne = [1]uint8{uint8(1)} /* sqlite3.c:119757:32 */
-var azOne = [1]uintptr{uintptr(ts + 9222 /* " " */)} /* sqlite3.c:119758:26 */
+var lenOne = [1]uint32{uint32(1)} /* sqlite3.c:120648:27 */
+var azOne = [1]uintptr{uintptr(ts + 9652 /* " " */)} /* sqlite3.c:120649:26 */
// IMP: R-25361-16150 This function is omitted from SQLite by default. It
// is only available if the SQLITE_SOUNDEX compile-time option is used
@@ -99632,11 +102015,11 @@ var azOne = [1]uintptr{uintptr(ts + 9222 /* " " */)} /* sqlite3.c:119758:26 */
//
// IMP: R-59782-00072 The soundex(X) function returns a string that is the
// soundex encoding of the string X.
-func soundexFunc(tls *libc.TLS, context uintptr, argc int32, argv uintptr) { /* sqlite3.c:119847:13: */
+func soundexFunc(tls *libc.TLS, context uintptr, argc int32, argv uintptr) { /* sqlite3.c:120739:13: */
bp := tls.Alloc(8)
defer tls.Free(8)
- // var zResult [8]int8 at bp, 8
+ // var zResult [8]uint8 at bp, 8
var zIn uintptr
var i int32
@@ -99644,33 +102027,33 @@ func soundexFunc(tls *libc.TLS, context uintptr, argc int32, argv uintptr) { /*
zIn = Xsqlite3_value_text(tls, *(*uintptr)(unsafe.Pointer(argv)))
if zIn == uintptr(0) {
- zIn = ts + 703 /* "" */
+ zIn = ts + 755 /* "" */
}
for i = 0; (*(*U8)(unsafe.Pointer(zIn + uintptr(i))) != 0) && !((int32(Xsqlite3CtypeMap[*(*U8)(unsafe.Pointer(zIn + uintptr(i)))]) & 0x02) != 0); i++ {
}
if *(*U8)(unsafe.Pointer(zIn + uintptr(i))) != 0 {
var prevcode U8 = iCode[(int32(*(*U8)(unsafe.Pointer(zIn + uintptr(i)))) & 0x7f)]
- *(*int8)(unsafe.Pointer(bp /* &zResult[0] */)) = (int8((int32(*(*U8)(unsafe.Pointer(zIn + uintptr(i))))) & ^(int32(Xsqlite3CtypeMap[*(*U8)(unsafe.Pointer(zIn + uintptr(i)))]) & 0x20)))
+ *(*uint8)(unsafe.Pointer(bp /* &zResult[0] */)) = (uint8((int32(*(*U8)(unsafe.Pointer(zIn + uintptr(i))))) & ^(int32(Xsqlite3CtypeMap[*(*U8)(unsafe.Pointer(zIn + uintptr(i)))]) & 0x20)))
for j = 1; (j < 4) && (*(*U8)(unsafe.Pointer(zIn + uintptr(i))) != 0); i++ {
var code int32 = int32(iCode[(int32(*(*U8)(unsafe.Pointer(zIn + uintptr(i)))) & 0x7f)])
if code > 0 {
if code != int32(prevcode) {
prevcode = U8(code)
- *(*int8)(unsafe.Pointer(bp /* &zResult[0] */ + uintptr(libc.PostIncInt32(&j, 1)))) = (int8(code + '0'))
+ *(*uint8)(unsafe.Pointer(bp /* &zResult[0] */ + uintptr(libc.PostIncInt32(&j, 1)))) = (uint8(code + '0'))
}
} else {
prevcode = U8(0)
}
}
for j < 4 {
- *(*int8)(unsafe.Pointer(bp /* &zResult[0] */ + uintptr(libc.PostIncInt32(&j, 1)))) = int8('0')
+ *(*uint8)(unsafe.Pointer(bp /* &zResult[0] */ + uintptr(libc.PostIncInt32(&j, 1)))) = uint8('0')
}
- *(*int8)(unsafe.Pointer(bp /* &zResult[0] */ + uintptr(j))) = int8(0)
+ *(*uint8)(unsafe.Pointer(bp /* &zResult[0] */ + uintptr(j))) = uint8(0)
Xsqlite3_result_text(tls, context, bp /* &zResult[0] */, 4, libc.UintptrFromInt32(-1))
} else {
// IMP: R-64894-50321 The string "?000" is returned if the argument
// is NULL or contains no ASCII alphabetic characters.
- Xsqlite3_result_text(tls, context, ts+13187 /* "?000" */, 4, uintptr(0))
+ Xsqlite3_result_text(tls, context, ts+13640 /* "?000" */, 4, uintptr(0))
}
}
@@ -99683,10 +102066,10 @@ var iCode = [128]uint8{
uint8(1), uint8(2), uint8(6), uint8(2), uint8(3), uint8(0), uint8(1), uint8(0), uint8(2), uint8(0), uint8(2), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0),
uint8(0), uint8(0), uint8(1), uint8(2), uint8(3), uint8(0), uint8(1), uint8(2), uint8(0), uint8(0), uint8(2), uint8(2), uint8(4), uint8(5), uint8(5), uint8(0),
uint8(1), uint8(2), uint8(6), uint8(2), uint8(3), uint8(0), uint8(1), uint8(0), uint8(2), uint8(0), uint8(2), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0),
-} /* sqlite3.c:119855:30 */
+} /* sqlite3.c:120747:30 */
// A function that loads a shared-library extension then returns NULL.
-func loadExt(tls *libc.TLS, context uintptr, argc int32, argv uintptr) { /* sqlite3.c:119900:13: */
+func loadExt(tls *libc.TLS, context uintptr, argc int32, argv uintptr) { /* sqlite3.c:120792:13: */
bp := tls.Alloc(8)
defer tls.Free(8)
@@ -99698,7 +102081,7 @@ func loadExt(tls *libc.TLS, context uintptr, argc int32, argv uintptr) { /* sqli
// Disallow the load_extension() SQL function unless the SQLITE_LoadExtFunc
// flag is set. See the sqlite3_enable_load_extension() API.
if ((*Sqlite3)(unsafe.Pointer(db)).Fflags & uint64(SQLITE_LoadExtFunc)) == uint64(0) {
- Xsqlite3_result_error(tls, context, ts+10371 /* "not authorized" */, -1)
+ Xsqlite3_result_error(tls, context, ts+10824 /* "not authorized" */, -1)
return
}
@@ -99716,17 +102099,17 @@ func loadExt(tls *libc.TLS, context uintptr, argc int32, argv uintptr) { /* sqli
// An instance of the following structure holds the context of a
// sum() or avg() aggregate computation.
type SumCtx1 = struct {
- FrSum float64
- FiSum I64
- Fcnt I64
- Foverflow U8
- Fapprox U8
- _ [6]byte
-} /* sqlite3.c:119931:9 */
+ FrSum float64
+ FiSum I64
+ Fcnt I64
+ Foverflow U8
+ Fapprox U8
+ F__ccgo_pad1 [6]byte
+} /* sqlite3.c:120823:9 */
// An instance of the following structure holds the context of a
// sum() or avg() aggregate computation.
-type SumCtx = SumCtx1 /* sqlite3.c:119931:23 */
+type SumCtx = SumCtx1 /* sqlite3.c:120823:23 */
// Routines used to compute the sum, average, and total.
//
@@ -99736,7 +102119,7 @@ type SumCtx = SumCtx1 /* sqlite3.c:119931:23 */
// SUM might return an integer if it never encounters a floating point
// value. TOTAL never fails, but SUM might through an exception if
// it overflows an integer.
-func sumStep(tls *libc.TLS, context uintptr, argc int32, argv uintptr) { /* sqlite3.c:119950:13: */
+func sumStep(tls *libc.TLS, context uintptr, argc int32, argv uintptr) { /* sqlite3.c:120842:13: */
var p uintptr
var type1 int32
@@ -99758,7 +102141,7 @@ func sumStep(tls *libc.TLS, context uintptr, argc int32, argv uintptr) { /* sqli
}
}
-func sumInverse(tls *libc.TLS, context uintptr, argc int32, argv uintptr) { /* sqlite3.c:119972:13: */
+func sumInverse(tls *libc.TLS, context uintptr, argc int32, argv uintptr) { /* sqlite3.c:120864:13: */
var p uintptr
var type1 int32
@@ -99781,12 +102164,12 @@ func sumInverse(tls *libc.TLS, context uintptr, argc int32, argv uintptr) { /* s
}
}
-func sumFinalize(tls *libc.TLS, context uintptr) { /* sqlite3.c:119997:13: */
+func sumFinalize(tls *libc.TLS, context uintptr) { /* sqlite3.c:120889:13: */
var p uintptr
p = Xsqlite3_aggregate_context(tls, context, 0)
if (p != 0) && ((*SumCtx)(unsafe.Pointer(p)).Fcnt > int64(0)) {
if (*SumCtx)(unsafe.Pointer(p)).Foverflow != 0 {
- Xsqlite3_result_error(tls, context, ts+13080 /* "integer overflow" */, -1)
+ Xsqlite3_result_error(tls, context, ts+13533 /* "integer overflow" */, -1)
} else if (*SumCtx)(unsafe.Pointer(p)).Fapprox != 0 {
Xsqlite3_result_double(tls, context, (*SumCtx)(unsafe.Pointer(p)).FrSum)
} else {
@@ -99795,7 +102178,7 @@ func sumFinalize(tls *libc.TLS, context uintptr) { /* sqlite3.c:119997:13: */
}
}
-func avgFinalize(tls *libc.TLS, context uintptr) { /* sqlite3.c:120010:13: */
+func avgFinalize(tls *libc.TLS, context uintptr) { /* sqlite3.c:120902:13: */
var p uintptr
p = Xsqlite3_aggregate_context(tls, context, 0)
if (p != 0) && ((*SumCtx)(unsafe.Pointer(p)).Fcnt > int64(0)) {
@@ -99803,7 +102186,7 @@ func avgFinalize(tls *libc.TLS, context uintptr) { /* sqlite3.c:120010:13: */
}
}
-func totalFinalize(tls *libc.TLS, context uintptr) { /* sqlite3.c:120017:13: */
+func totalFinalize(tls *libc.TLS, context uintptr) { /* sqlite3.c:120909:13: */
var p uintptr
p = Xsqlite3_aggregate_context(tls, context, 0)
// (double)0 In case of SQLITE_OMIT_FLOATING_POINT...
@@ -99817,14 +102200,14 @@ func totalFinalize(tls *libc.TLS, context uintptr) { /* sqlite3.c:120017:13: */
// The following structure keeps track of state information for the
// count() aggregate function.
-type CountCtx1 = struct{ Fn I64 } /* sqlite3.c:120028:9 */
+type CountCtx1 = struct{ Fn I64 } /* sqlite3.c:120920:9 */
// The following structure keeps track of state information for the
// count() aggregate function.
-type CountCtx = CountCtx1 /* sqlite3.c:120028:25 */
+type CountCtx = CountCtx1 /* sqlite3.c:120920:25 */
// Routines to implement the count() aggregate function.
-func countStep(tls *libc.TLS, context uintptr, argc int32, argv uintptr) { /* sqlite3.c:120039:13: */
+func countStep(tls *libc.TLS, context uintptr, argc int32, argv uintptr) { /* sqlite3.c:120931:13: */
var p uintptr
p = Xsqlite3_aggregate_context(tls, context, int32(unsafe.Sizeof(CountCtx{})))
if ((argc == 0) || (SQLITE_NULL != Xsqlite3_value_type(tls, *(*uintptr)(unsafe.Pointer(argv))))) && (p != 0) {
@@ -99838,7 +102221,7 @@ func countStep(tls *libc.TLS, context uintptr, argc int32, argv uintptr) { /* sq
}
-func countFinalize(tls *libc.TLS, context uintptr) { /* sqlite3.c:120055:13: */
+func countFinalize(tls *libc.TLS, context uintptr) { /* sqlite3.c:120947:13: */
var p uintptr
p = Xsqlite3_aggregate_context(tls, context, 0)
Xsqlite3_result_int64(tls, context, func() int64 {
@@ -99849,7 +102232,7 @@ func countFinalize(tls *libc.TLS, context uintptr) { /* sqlite3.c:120055:13: */
}())
}
-func countInverse(tls *libc.TLS, ctx uintptr, argc int32, argv uintptr) { /* sqlite3.c:120061:13: */
+func countInverse(tls *libc.TLS, ctx uintptr, argc int32, argv uintptr) { /* sqlite3.c:120953:13: */
var p uintptr
p = Xsqlite3_aggregate_context(tls, ctx, int32(unsafe.Sizeof(CountCtx{})))
// p is always non-NULL since countStep() will have been called first
@@ -99859,7 +102242,7 @@ func countInverse(tls *libc.TLS, ctx uintptr, argc int32, argv uintptr) { /* sql
}
// Routines to implement min() and max() aggregate functions.
-func minmaxStep(tls *libc.TLS, context uintptr, NotUsed int32, argv uintptr) { /* sqlite3.c:120079:13: */
+func minmaxStep(tls *libc.TLS, context uintptr, NotUsed int32, argv uintptr) { /* sqlite3.c:120971:13: */
var pArg uintptr = *(*uintptr)(unsafe.Pointer(argv))
var pBest uintptr
_ = NotUsed
@@ -99897,7 +102280,7 @@ func minmaxStep(tls *libc.TLS, context uintptr, NotUsed int32, argv uintptr) { /
}
}
-func minMaxValueFinalize(tls *libc.TLS, context uintptr, bValue int32) { /* sqlite3.c:120117:13: */
+func minMaxValueFinalize(tls *libc.TLS, context uintptr, bValue int32) { /* sqlite3.c:121009:13: */
var pRes uintptr
pRes = Xsqlite3_aggregate_context(tls, context, 0)
if pRes != 0 {
@@ -99910,16 +102293,16 @@ func minMaxValueFinalize(tls *libc.TLS, context uintptr, bValue int32) { /* sqli
}
}
-func minMaxValue(tls *libc.TLS, context uintptr) { /* sqlite3.c:120128:13: */
+func minMaxValue(tls *libc.TLS, context uintptr) { /* sqlite3.c:121020:13: */
minMaxValueFinalize(tls, context, 1)
}
-func minMaxFinalize(tls *libc.TLS, context uintptr) { /* sqlite3.c:120134:13: */
+func minMaxFinalize(tls *libc.TLS, context uintptr) { /* sqlite3.c:121026:13: */
minMaxValueFinalize(tls, context, 0)
}
// group_concat(EXPR, ?SEPARATOR?)
-func groupConcatStep(tls *libc.TLS, context uintptr, argc int32, argv uintptr) { /* sqlite3.c:120141:13: */
+func groupConcatStep(tls *libc.TLS, context uintptr, argc int32, argv uintptr) { /* sqlite3.c:121033:13: */
var zVal uintptr
var pAccum uintptr
var zSep uintptr
@@ -99940,7 +102323,7 @@ func groupConcatStep(tls *libc.TLS, context uintptr, argc int32, argv uintptr) {
zSep = Xsqlite3_value_text(tls, *(*uintptr)(unsafe.Pointer(argv + 1*8)))
nSep = Xsqlite3_value_bytes(tls, *(*uintptr)(unsafe.Pointer(argv + 1*8)))
} else {
- zSep = ts + 11084 /* "," */
+ zSep = ts + 11537 /* "," */
nSep = 1
}
if zSep != 0 {
@@ -99955,7 +102338,7 @@ func groupConcatStep(tls *libc.TLS, context uintptr, argc int32, argv uintptr) {
}
}
-func groupConcatInverse(tls *libc.TLS, context uintptr, argc int32, argv uintptr) { /* sqlite3.c:120174:13: */
+func groupConcatInverse(tls *libc.TLS, context uintptr, argc int32, argv uintptr) { /* sqlite3.c:121066:13: */
var n int32
var pAccum uintptr
@@ -99984,7 +102367,7 @@ func groupConcatInverse(tls *libc.TLS, context uintptr, argc int32, argv uintptr
}
}
-func groupConcatFinalize(tls *libc.TLS, context uintptr) { /* sqlite3.c:120205:13: */
+func groupConcatFinalize(tls *libc.TLS, context uintptr) { /* sqlite3.c:121097:13: */
var pAccum uintptr
pAccum = Xsqlite3_aggregate_context(tls, context, 0)
if pAccum != 0 {
@@ -99999,7 +102382,7 @@ func groupConcatFinalize(tls *libc.TLS, context uintptr) { /* sqlite3.c:120205:1
}
}
-func groupConcatValue(tls *libc.TLS, context uintptr) { /* sqlite3.c:120220:13: */
+func groupConcatValue(tls *libc.TLS, context uintptr) { /* sqlite3.c:121112:13: */
var pAccum uintptr
pAccum = Xsqlite3_aggregate_context(tls, context, 0)
if pAccum != 0 {
@@ -100017,8 +102400,8 @@ func groupConcatValue(tls *libc.TLS, context uintptr) { /* sqlite3.c:120220:13:
// This routine does per-connection function registration. Most
// of the built-in functions above are part of the global function set.
// This routine only deals with those that are not global.
-func Xsqlite3RegisterPerConnectionBuiltinFunctions(tls *libc.TLS, db uintptr) { /* sqlite3.c:120243:21: */
- var rc int32 = Xsqlite3_overload_function(tls, db, ts+13192 /* "MATCH" */, 2)
+func Xsqlite3RegisterPerConnectionBuiltinFunctions(tls *libc.TLS, db uintptr) { /* sqlite3.c:121135:21: */
+ var rc int32 = Xsqlite3_overload_function(tls, db, ts+13645 /* "MATCH" */, 2)
if rc == SQLITE_NOMEM {
Xsqlite3OomFault(tls, db)
@@ -100028,7 +102411,7 @@ func Xsqlite3RegisterPerConnectionBuiltinFunctions(tls *libc.TLS, db uintptr) {
// Re-register the built-in LIKE functions. The caseSensitive
// parameter determines whether or not the LIKE operator is case
// sensitive.
-func Xsqlite3RegisterLikeFunctions(tls *libc.TLS, db uintptr, caseSensitive int32) { /* sqlite3.c:120256:21: */
+func Xsqlite3RegisterLikeFunctions(tls *libc.TLS, db uintptr, caseSensitive int32) { /* sqlite3.c:121148:21: */
var pInfo uintptr
var flags int32
if caseSensitive != 0 {
@@ -100038,14 +102421,14 @@ func Xsqlite3RegisterLikeFunctions(tls *libc.TLS, db uintptr, caseSensitive int3
pInfo = uintptr(unsafe.Pointer(&likeInfoNorm))
flags = SQLITE_FUNC_LIKE
}
- Xsqlite3CreateFunc(tls, db, ts+13198 /* "like" */, 2, SQLITE_UTF8, pInfo, *(*uintptr)(unsafe.Pointer(&struct {
+ Xsqlite3CreateFunc(tls, db, ts+13651 /* "like" */, 2, SQLITE_UTF8, pInfo, *(*uintptr)(unsafe.Pointer(&struct {
f func(*libc.TLS, uintptr, int32, uintptr)
}{likeFunc})), uintptr(0), uintptr(0), uintptr(0), uintptr(0), uintptr(0))
- Xsqlite3CreateFunc(tls, db, ts+13198 /* "like" */, 3, SQLITE_UTF8, pInfo, *(*uintptr)(unsafe.Pointer(&struct {
+ Xsqlite3CreateFunc(tls, db, ts+13651 /* "like" */, 3, SQLITE_UTF8, pInfo, *(*uintptr)(unsafe.Pointer(&struct {
f func(*libc.TLS, uintptr, int32, uintptr)
}{likeFunc})), uintptr(0), uintptr(0), uintptr(0), uintptr(0), uintptr(0))
- *(*U32)(unsafe.Pointer(Xsqlite3FindFunction(tls, db, ts+13198 /* "like" */, 2, uint8(SQLITE_UTF8), uint8(0)) + 4 /* &.funcFlags */)) |= (U32(flags))
- *(*U32)(unsafe.Pointer(Xsqlite3FindFunction(tls, db, ts+13198 /* "like" */, 3, uint8(SQLITE_UTF8), uint8(0)) + 4 /* &.funcFlags */)) |= (U32(flags))
+ *(*U32)(unsafe.Pointer(Xsqlite3FindFunction(tls, db, ts+13651 /* "like" */, 2, uint8(SQLITE_UTF8), uint8(0)) + 4 /* &.funcFlags */)) |= (U32(flags))
+ *(*U32)(unsafe.Pointer(Xsqlite3FindFunction(tls, db, ts+13651 /* "like" */, 3, uint8(SQLITE_UTF8), uint8(0)) + 4 /* &.funcFlags */)) |= (U32(flags))
}
// pExpr points to an expression which implements a function. If
@@ -100063,7 +102446,7 @@ func Xsqlite3RegisterLikeFunctions(tls *libc.TLS, db uintptr, caseSensitive int3
// the function (default for LIKE). If the function makes the distinction
// between uppercase and lowercase (as does GLOB) then *pIsNocase is set to
// false.
-func Xsqlite3IsLikeFunction(tls *libc.TLS, db uintptr, pExpr uintptr, pIsNocase uintptr, aWc uintptr) int32 { /* sqlite3.c:120289:20: */
+func Xsqlite3IsLikeFunction(tls *libc.TLS, db uintptr, pExpr uintptr, pIsNocase uintptr, aWc uintptr) int32 { /* sqlite3.c:121181:20: */
var pDef uintptr
var nExpr int32
@@ -100083,7 +102466,7 @@ func Xsqlite3IsLikeFunction(tls *libc.TLS, db uintptr, pExpr uintptr, pIsNocase
libc.Xmemcpy(tls, aWc, (*FuncDef)(unsafe.Pointer(pDef)).FpUserData, uint64(3))
if nExpr < 3 {
- *(*int8)(unsafe.Pointer(aWc + 3)) = int8(0)
+ *(*uint8)(unsafe.Pointer(aWc + 3)) = uint8(0)
} else {
var pEscape uintptr = (*ExprList_item)(unsafe.Pointer((*(*uintptr)(unsafe.Pointer(pExpr + 32 /* &.x */)) + 8 /* &.a */) + 2*32)).FpExpr
var zEscape uintptr
@@ -100091,16 +102474,16 @@ func Xsqlite3IsLikeFunction(tls *libc.TLS, db uintptr, pExpr uintptr, pIsNocase
return 0
}
zEscape = *(*uintptr)(unsafe.Pointer(pEscape + 8 /* &.u */))
- if (int32(*(*int8)(unsafe.Pointer(zEscape))) == 0) || (int32(*(*int8)(unsafe.Pointer(zEscape + 1))) != 0) {
+ if (int32(*(*uint8)(unsafe.Pointer(zEscape))) == 0) || (int32(*(*uint8)(unsafe.Pointer(zEscape + 1))) != 0) {
return 0
}
- if int32(*(*int8)(unsafe.Pointer(zEscape))) == int32(*(*int8)(unsafe.Pointer(aWc))) {
+ if int32(*(*uint8)(unsafe.Pointer(zEscape))) == int32(*(*uint8)(unsafe.Pointer(aWc))) {
return 0
}
- if int32(*(*int8)(unsafe.Pointer(zEscape))) == int32(*(*int8)(unsafe.Pointer(aWc + 1))) {
+ if int32(*(*uint8)(unsafe.Pointer(zEscape))) == int32(*(*uint8)(unsafe.Pointer(aWc + 1))) {
return 0
}
- *(*int8)(unsafe.Pointer(aWc + 3)) = *(*int8)(unsafe.Pointer(zEscape))
+ *(*uint8)(unsafe.Pointer(aWc + 3)) = *(*uint8)(unsafe.Pointer(zEscape))
}
*(*int32)(unsafe.Pointer(pIsNocase)) = (libc.Bool32(((*FuncDef)(unsafe.Pointer(pDef)).FfuncFlags & U32(SQLITE_FUNC_CASE)) == U32(0)))
@@ -100112,7 +102495,7 @@ func Xsqlite3IsLikeFunction(tls *libc.TLS, db uintptr, pExpr uintptr, pIsNocase
// Extra math functions that require linking with -lm
// Implementation of sign(X) function.
-func signFunc(tls *libc.TLS, context uintptr, argc int32, argv uintptr) { /* sqlite3.c:120515:13: */
+func signFunc(tls *libc.TLS, context uintptr, argc int32, argv uintptr) { /* sqlite3.c:121405:13: */
var type0 int32
var x float64
_ = argc
@@ -100140,7 +102523,7 @@ func signFunc(tls *libc.TLS, context uintptr, argc int32, argv uintptr) { /* sql
// a consequence of calling sqlite3_initialize()).
//
// After this routine runs
-func Xsqlite3RegisterBuiltinFunctions(tls *libc.TLS) { /* sqlite3.c:120537:21: */
+func Xsqlite3RegisterBuiltinFunctions(tls *libc.TLS) { /* sqlite3.c:121427:21: */
Xsqlite3AlterFunctions(tls)
Xsqlite3WindowFunctions(tls)
Xsqlite3RegisterDateTimeFunctions(tls)
@@ -100150,76 +102533,76 @@ func Xsqlite3RegisterBuiltinFunctions(tls *libc.TLS) { /* sqlite3.c:120537:21: *
var aBuiltinFunc = [68]FuncDef{
//**** Functions only available with SQLITE_TESTCTRL_INTERNAL_FUNCTIONS ****
- {FnArg: int8(2), FfuncFlags: (U32(((((SQLITE_UTF8 | SQLITE_FUNC_INTERNAL) | SQLITE_FUNC_TEST) | SQLITE_FUNC_INLINE) | SQLITE_FUNC_CONSTANT) | (0))), FpUserData: uintptr(int64(INLINEFUNC_implies_nonnull_row)), FxSFunc: 0, FzName: ts + 13203 /* "implies_nonnull_..." */},
- {FnArg: int8(2), FfuncFlags: (U32(((((SQLITE_UTF8 | SQLITE_FUNC_INTERNAL) | SQLITE_FUNC_TEST) | SQLITE_FUNC_INLINE) | SQLITE_FUNC_CONSTANT) | (0))), FpUserData: uintptr(int64(INLINEFUNC_expr_compare)), FxSFunc: 0, FzName: ts + 13223 /* "expr_compare" */},
- {FnArg: int8(2), FfuncFlags: (U32(((((SQLITE_UTF8 | SQLITE_FUNC_INTERNAL) | SQLITE_FUNC_TEST) | SQLITE_FUNC_INLINE) | SQLITE_FUNC_CONSTANT) | (0))), FpUserData: uintptr(int64(INLINEFUNC_expr_implies_expr)), FxSFunc: 0, FzName: ts + 13236 /* "expr_implies_exp..." */},
+ {FnArg: int8(2), FfuncFlags: (U32(((((SQLITE_UTF8 | SQLITE_FUNC_INTERNAL) | SQLITE_FUNC_TEST) | SQLITE_FUNC_INLINE) | SQLITE_FUNC_CONSTANT) | (0))), FpUserData: uintptr(int64(INLINEFUNC_implies_nonnull_row)), FxSFunc: 0, FzName: ts + 13656 /* "implies_nonnull_..." */},
+ {FnArg: int8(2), FfuncFlags: (U32(((((SQLITE_UTF8 | SQLITE_FUNC_INTERNAL) | SQLITE_FUNC_TEST) | SQLITE_FUNC_INLINE) | SQLITE_FUNC_CONSTANT) | (0))), FpUserData: uintptr(int64(INLINEFUNC_expr_compare)), FxSFunc: 0, FzName: ts + 13676 /* "expr_compare" */},
+ {FnArg: int8(2), FfuncFlags: (U32(((((SQLITE_UTF8 | SQLITE_FUNC_INTERNAL) | SQLITE_FUNC_TEST) | SQLITE_FUNC_INLINE) | SQLITE_FUNC_CONSTANT) | (0))), FpUserData: uintptr(int64(INLINEFUNC_expr_implies_expr)), FxSFunc: 0, FzName: ts + 13689 /* "expr_implies_exp..." */},
//**** Regular functions ****
- {FnArg: int8(1), FfuncFlags: (U32((SQLITE_FUNC_CONSTANT | SQLITE_UTF8) | (0 * SQLITE_FUNC_NEEDCOLL))), FxSFunc: 0, FzName: ts + 13254 /* "soundex" */},
- {FnArg: int8(1), FfuncFlags: (U32((SQLITE_UTF8 | SQLITE_DIRECTONLY) | SQLITE_FUNC_UNSAFE)), FxSFunc: 0, FzName: ts + 13262 /* "load_extension" */},
- {FnArg: int8(2), FfuncFlags: (U32((SQLITE_UTF8 | SQLITE_DIRECTONLY) | SQLITE_FUNC_UNSAFE)), FxSFunc: 0, FzName: ts + 13262 /* "load_extension" */},
- {FnArg: int8(1), FfuncFlags: (U32(SQLITE_FUNC_SLOCHNG | SQLITE_UTF8)), FxSFunc: 0, FzName: ts + 13277 /* "sqlite_compileop..." */},
- {FnArg: int8(1), FfuncFlags: (U32(SQLITE_FUNC_SLOCHNG | SQLITE_UTF8)), FxSFunc: 0, FzName: ts + 13303 /* "sqlite_compileop..." */},
- {FnArg: int8(1), FfuncFlags: (U32(((SQLITE_UTF8 | SQLITE_FUNC_INLINE) | SQLITE_FUNC_CONSTANT) | (SQLITE_FUNC_UNLIKELY))), FpUserData: uintptr(int64(INLINEFUNC_unlikely)), FxSFunc: 0, FzName: ts + 13328 /* "unlikely" */},
- {FnArg: int8(2), FfuncFlags: (U32(((SQLITE_UTF8 | SQLITE_FUNC_INLINE) | SQLITE_FUNC_CONSTANT) | (SQLITE_FUNC_UNLIKELY))), FpUserData: uintptr(int64(INLINEFUNC_unlikely)), FxSFunc: 0, FzName: ts + 13337 /* "likelihood" */},
- {FnArg: int8(1), FfuncFlags: (U32(((SQLITE_UTF8 | SQLITE_FUNC_INLINE) | SQLITE_FUNC_CONSTANT) | (SQLITE_FUNC_UNLIKELY))), FpUserData: uintptr(int64(INLINEFUNC_unlikely)), FxSFunc: 0, FzName: ts + 13348 /* "likely" */},
- {FnArg: int8(1), FfuncFlags: (U32((((SQLITE_FUNC_CONSTANT | SQLITE_UTF8) | (0 * SQLITE_FUNC_NEEDCOLL)) | SQLITE_FUNC_OFFSET) | SQLITE_FUNC_TYPEOF)), FxSFunc: 0, FzName: ts + 13355 /* "sqlite_offset" */},
- {FnArg: int8(1), FfuncFlags: (U32((SQLITE_FUNC_CONSTANT | SQLITE_UTF8) | (0 * SQLITE_FUNC_NEEDCOLL))), FpUserData: uintptr(int64(1)), FxSFunc: 0, FzName: ts + 13369 /* "ltrim" */},
- {FnArg: int8(2), FfuncFlags: (U32((SQLITE_FUNC_CONSTANT | SQLITE_UTF8) | (0 * SQLITE_FUNC_NEEDCOLL))), FpUserData: uintptr(int64(1)), FxSFunc: 0, FzName: ts + 13369 /* "ltrim" */},
- {FnArg: int8(1), FfuncFlags: (U32((SQLITE_FUNC_CONSTANT | SQLITE_UTF8) | (0 * SQLITE_FUNC_NEEDCOLL))), FpUserData: uintptr(int64(2)), FxSFunc: 0, FzName: ts + 13375 /* "rtrim" */},
- {FnArg: int8(2), FfuncFlags: (U32((SQLITE_FUNC_CONSTANT | SQLITE_UTF8) | (0 * SQLITE_FUNC_NEEDCOLL))), FpUserData: uintptr(int64(2)), FxSFunc: 0, FzName: ts + 13375 /* "rtrim" */},
- {FnArg: int8(1), FfuncFlags: (U32((SQLITE_FUNC_CONSTANT | SQLITE_UTF8) | (0 * SQLITE_FUNC_NEEDCOLL))), FpUserData: uintptr(int64(3)), FxSFunc: 0, FzName: ts + 13381 /* "trim" */},
- {FnArg: int8(2), FfuncFlags: (U32((SQLITE_FUNC_CONSTANT | SQLITE_UTF8) | (0 * SQLITE_FUNC_NEEDCOLL))), FpUserData: uintptr(int64(3)), FxSFunc: 0, FzName: ts + 13381 /* "trim" */},
- {FnArg: int8(-1), FfuncFlags: (U32((SQLITE_FUNC_CONSTANT | SQLITE_UTF8) | (1 * SQLITE_FUNC_NEEDCOLL))), FxSFunc: 0, FzName: ts + 13386 /* "min" */},
- {FfuncFlags: (U32((SQLITE_FUNC_CONSTANT | SQLITE_UTF8) | (1 * SQLITE_FUNC_NEEDCOLL))), FzName: ts + 13386 /* "min" */},
- {FnArg: int8(1), FfuncFlags: (U32((SQLITE_UTF8 | (1 * SQLITE_FUNC_NEEDCOLL)) | SQLITE_FUNC_MINMAX)), FxSFunc: 0, FxFinalize: 0, FxValue: 0, FzName: ts + 13386 /* "min" */},
- {FnArg: int8(-1), FfuncFlags: (U32((SQLITE_FUNC_CONSTANT | SQLITE_UTF8) | (1 * SQLITE_FUNC_NEEDCOLL))), FpUserData: uintptr(int64(1)), FxSFunc: 0, FzName: ts + 13390 /* "max" */},
- {FfuncFlags: (U32((SQLITE_FUNC_CONSTANT | SQLITE_UTF8) | (1 * SQLITE_FUNC_NEEDCOLL))), FpUserData: uintptr(int64(1)), FzName: ts + 13390 /* "max" */},
- {FnArg: int8(1), FfuncFlags: (U32((SQLITE_UTF8 | (1 * SQLITE_FUNC_NEEDCOLL)) | SQLITE_FUNC_MINMAX)), FpUserData: uintptr(int64(1)), FxSFunc: 0, FxFinalize: 0, FxValue: 0, FzName: ts + 13390 /* "max" */},
- {FnArg: int8(1), FfuncFlags: (U32(((SQLITE_FUNC_CONSTANT | SQLITE_UTF8) | (0 * SQLITE_FUNC_NEEDCOLL)) | SQLITE_FUNC_TYPEOF)), FxSFunc: 0, FzName: ts + 13394 /* "typeof" */},
- {FnArg: int8(1), FfuncFlags: (U32(((SQLITE_FUNC_CONSTANT | SQLITE_UTF8) | (0 * SQLITE_FUNC_NEEDCOLL)) | SQLITE_FUNC_LENGTH)), FxSFunc: 0, FzName: ts + 13401 /* "length" */},
- {FnArg: int8(2), FfuncFlags: (U32((SQLITE_FUNC_CONSTANT | SQLITE_UTF8) | (0 * SQLITE_FUNC_NEEDCOLL))), FxSFunc: 0, FzName: ts + 13408 /* "instr" */},
- {FnArg: int8(-1), FfuncFlags: (U32((SQLITE_FUNC_CONSTANT | SQLITE_UTF8) | (0 * SQLITE_FUNC_NEEDCOLL))), FxSFunc: 0, FzName: ts + 13414 /* "printf" */},
- {FnArg: int8(1), FfuncFlags: (U32((SQLITE_FUNC_CONSTANT | SQLITE_UTF8) | (0 * SQLITE_FUNC_NEEDCOLL))), FxSFunc: 0, FzName: ts + 13421 /* "unicode" */},
- {FnArg: int8(-1), FfuncFlags: (U32((SQLITE_FUNC_CONSTANT | SQLITE_UTF8) | (0 * SQLITE_FUNC_NEEDCOLL))), FxSFunc: 0, FzName: ts + 13429 /* "char" */},
- {FnArg: int8(1), FfuncFlags: (U32((SQLITE_FUNC_CONSTANT | SQLITE_UTF8) | (0 * SQLITE_FUNC_NEEDCOLL))), FxSFunc: 0, FzName: ts + 13434 /* "abs" */},
- {FnArg: int8(1), FfuncFlags: (U32((SQLITE_FUNC_CONSTANT | SQLITE_UTF8) | (0 * SQLITE_FUNC_NEEDCOLL))), FxSFunc: 0, FzName: ts + 13438 /* "round" */},
- {FnArg: int8(2), FfuncFlags: (U32((SQLITE_FUNC_CONSTANT | SQLITE_UTF8) | (0 * SQLITE_FUNC_NEEDCOLL))), FxSFunc: 0, FzName: ts + 13438 /* "round" */},
- {FnArg: int8(1), FfuncFlags: (U32((SQLITE_FUNC_CONSTANT | SQLITE_UTF8) | (0 * SQLITE_FUNC_NEEDCOLL))), FxSFunc: 0, FzName: ts + 13444 /* "upper" */},
- {FnArg: int8(1), FfuncFlags: (U32((SQLITE_FUNC_CONSTANT | SQLITE_UTF8) | (0 * SQLITE_FUNC_NEEDCOLL))), FxSFunc: 0, FzName: ts + 13450 /* "lower" */},
- {FnArg: int8(1), FfuncFlags: (U32((SQLITE_FUNC_CONSTANT | SQLITE_UTF8) | (0 * SQLITE_FUNC_NEEDCOLL))), FxSFunc: 0, FzName: ts + 13456 /* "hex" */},
- {FnArg: int8(2), FfuncFlags: (U32(((SQLITE_UTF8 | SQLITE_FUNC_INLINE) | SQLITE_FUNC_CONSTANT) | (0))), FxSFunc: 0, FzName: ts + 13460 /* "ifnull" */},
- {FfuncFlags: (U32(SQLITE_UTF8 | (0 * SQLITE_FUNC_NEEDCOLL))), FxSFunc: 0, FzName: ts + 13467 /* "random" */},
- {FnArg: int8(1), FfuncFlags: (U32(SQLITE_UTF8 | (0 * SQLITE_FUNC_NEEDCOLL))), FxSFunc: 0, FzName: ts + 13474 /* "randomblob" */},
- {FnArg: int8(2), FfuncFlags: (U32((SQLITE_FUNC_CONSTANT | SQLITE_UTF8) | (1 * SQLITE_FUNC_NEEDCOLL))), FxSFunc: 0, FzName: ts + 13485 /* "nullif" */},
- {FfuncFlags: (U32(SQLITE_FUNC_SLOCHNG | SQLITE_UTF8)), FxSFunc: 0, FzName: ts + 13492 /* "sqlite_version" */},
- {FfuncFlags: (U32(SQLITE_FUNC_SLOCHNG | SQLITE_UTF8)), FxSFunc: 0, FzName: ts + 13507 /* "sqlite_source_id" */},
- {FnArg: int8(2), FfuncFlags: (U32((SQLITE_FUNC_CONSTANT | SQLITE_UTF8) | (0 * SQLITE_FUNC_NEEDCOLL))), FxSFunc: 0, FzName: ts + 13524 /* "sqlite_log" */},
- {FnArg: int8(1), FfuncFlags: (U32((SQLITE_FUNC_CONSTANT | SQLITE_UTF8) | (0 * SQLITE_FUNC_NEEDCOLL))), FxSFunc: 0, FzName: ts + 13535 /* "quote" */},
- {FfuncFlags: (U32(SQLITE_UTF8 | (0 * SQLITE_FUNC_NEEDCOLL))), FxSFunc: 0, FzName: ts + 13541 /* "last_insert_rowi..." */},
- {FfuncFlags: (U32(SQLITE_UTF8 | (0 * SQLITE_FUNC_NEEDCOLL))), FxSFunc: 0, FzName: ts + 13559 /* "changes" */},
- {FfuncFlags: (U32(SQLITE_UTF8 | (0 * SQLITE_FUNC_NEEDCOLL))), FxSFunc: 0, FzName: ts + 13567 /* "total_changes" */},
- {FnArg: int8(3), FfuncFlags: (U32((SQLITE_FUNC_CONSTANT | SQLITE_UTF8) | (0 * SQLITE_FUNC_NEEDCOLL))), FxSFunc: 0, FzName: ts + 13581 /* "replace" */},
- {FnArg: int8(1), FfuncFlags: (U32((SQLITE_FUNC_CONSTANT | SQLITE_UTF8) | (0 * SQLITE_FUNC_NEEDCOLL))), FxSFunc: 0, FzName: ts + 13589 /* "zeroblob" */},
- {FnArg: int8(2), FfuncFlags: (U32((SQLITE_FUNC_CONSTANT | SQLITE_UTF8) | (0 * SQLITE_FUNC_NEEDCOLL))), FxSFunc: 0, FzName: ts + 13598 /* "substr" */},
- {FnArg: int8(3), FfuncFlags: (U32((SQLITE_FUNC_CONSTANT | SQLITE_UTF8) | (0 * SQLITE_FUNC_NEEDCOLL))), FxSFunc: 0, FzName: ts + 13598 /* "substr" */},
- {FnArg: int8(2), FfuncFlags: (U32((SQLITE_FUNC_CONSTANT | SQLITE_UTF8) | (0 * SQLITE_FUNC_NEEDCOLL))), FxSFunc: 0, FzName: ts + 13605 /* "substring" */},
- {FnArg: int8(3), FfuncFlags: (U32((SQLITE_FUNC_CONSTANT | SQLITE_UTF8) | (0 * SQLITE_FUNC_NEEDCOLL))), FxSFunc: 0, FzName: ts + 13605 /* "substring" */},
- {FnArg: int8(1), FfuncFlags: (U32((SQLITE_UTF8 | (0 * SQLITE_FUNC_NEEDCOLL)) | 0)), FxSFunc: 0, FxFinalize: 0, FxValue: 0, FxInverse: 0, FzName: ts + 13615 /* "sum" */},
- {FnArg: int8(1), FfuncFlags: (U32((SQLITE_UTF8 | (0 * SQLITE_FUNC_NEEDCOLL)) | 0)), FxSFunc: 0, FxFinalize: 0, FxValue: 0, FxInverse: 0, FzName: ts + 13619 /* "total" */},
- {FnArg: int8(1), FfuncFlags: (U32((SQLITE_UTF8 | (0 * SQLITE_FUNC_NEEDCOLL)) | 0)), FxSFunc: 0, FxFinalize: 0, FxValue: 0, FxInverse: 0, FzName: ts + 13625 /* "avg" */},
- {FfuncFlags: (U32((SQLITE_UTF8 | (0 * SQLITE_FUNC_NEEDCOLL)) | SQLITE_FUNC_COUNT)), FxSFunc: 0, FxFinalize: 0, FxValue: 0, FxInverse: 0, FzName: ts + 13629 /* "count" */},
- {FnArg: int8(1), FfuncFlags: (U32((SQLITE_UTF8 | (0 * SQLITE_FUNC_NEEDCOLL)) | 0)), FxSFunc: 0, FxFinalize: 0, FxValue: 0, FxInverse: 0, FzName: ts + 13629 /* "count" */},
- {FnArg: int8(1), FfuncFlags: (U32((SQLITE_UTF8 | (0 * SQLITE_FUNC_NEEDCOLL)) | 0)), FxSFunc: 0, FxFinalize: 0, FxValue: 0, FxInverse: 0, FzName: ts + 13635 /* "group_concat" */},
- {FnArg: int8(2), FfuncFlags: (U32((SQLITE_UTF8 | (0 * SQLITE_FUNC_NEEDCOLL)) | 0)), FxSFunc: 0, FxFinalize: 0, FxValue: 0, FxInverse: 0, FzName: ts + 13635 /* "group_concat" */},
-
- {FnArg: int8(2), FfuncFlags: (U32(((SQLITE_FUNC_CONSTANT | SQLITE_UTF8) | SQLITE_FUNC_LIKE) | SQLITE_FUNC_CASE)), FpUserData: 0, FxSFunc: 0, FzName: ts + 13648 /* "glob" */},
- {FnArg: int8(2), FfuncFlags: (U32((SQLITE_FUNC_CONSTANT | SQLITE_UTF8) | SQLITE_FUNC_LIKE)), FpUserData: 0, FxSFunc: 0, FzName: ts + 13198 /* "like" */},
- {FnArg: int8(3), FfuncFlags: (U32((SQLITE_FUNC_CONSTANT | SQLITE_UTF8) | SQLITE_FUNC_LIKE)), FpUserData: 0, FxSFunc: 0, FzName: ts + 13198 /* "like" */},
- {FnArg: int8(1), FfuncFlags: (U32((SQLITE_FUNC_CONSTANT | SQLITE_UTF8) | (0 * SQLITE_FUNC_NEEDCOLL))), FzName: ts + 13653 /* "coalesce" */},
- {FfuncFlags: (U32((SQLITE_FUNC_CONSTANT | SQLITE_UTF8) | (0 * SQLITE_FUNC_NEEDCOLL))), FzName: ts + 13653 /* "coalesce" */},
- {FnArg: int8(1), FfuncFlags: (U32((SQLITE_FUNC_CONSTANT | SQLITE_UTF8) | (0 * SQLITE_FUNC_NEEDCOLL))), FxSFunc: 0, FzName: ts + 13662 /* "sign" */},
- {FnArg: int8(-1), FfuncFlags: (U32(((SQLITE_UTF8 | SQLITE_FUNC_INLINE) | SQLITE_FUNC_CONSTANT) | (0))), FxSFunc: 0, FzName: ts + 13653 /* "coalesce" */},
- {FnArg: int8(3), FfuncFlags: (U32(((SQLITE_UTF8 | SQLITE_FUNC_INLINE) | SQLITE_FUNC_CONSTANT) | (0))), FpUserData: uintptr(int64(INLINEFUNC_iif)), FxSFunc: 0, FzName: ts + 13667 /* "iif" */}} /* sqlite3.c:120548:18 */
+ {FnArg: int8(1), FfuncFlags: (U32((SQLITE_FUNC_CONSTANT | SQLITE_UTF8) | (0 * SQLITE_FUNC_NEEDCOLL))), FxSFunc: 0, FzName: ts + 13707 /* "soundex" */},
+ {FnArg: int8(1), FfuncFlags: (U32((SQLITE_UTF8 | SQLITE_DIRECTONLY) | SQLITE_FUNC_UNSAFE)), FxSFunc: 0, FzName: ts + 13715 /* "load_extension" */},
+ {FnArg: int8(2), FfuncFlags: (U32((SQLITE_UTF8 | SQLITE_DIRECTONLY) | SQLITE_FUNC_UNSAFE)), FxSFunc: 0, FzName: ts + 13715 /* "load_extension" */},
+ {FnArg: int8(1), FfuncFlags: (U32(SQLITE_FUNC_SLOCHNG | SQLITE_UTF8)), FxSFunc: 0, FzName: ts + 13730 /* "sqlite_compileop..." */},
+ {FnArg: int8(1), FfuncFlags: (U32(SQLITE_FUNC_SLOCHNG | SQLITE_UTF8)), FxSFunc: 0, FzName: ts + 13756 /* "sqlite_compileop..." */},
+ {FnArg: int8(1), FfuncFlags: (U32(((SQLITE_UTF8 | SQLITE_FUNC_INLINE) | SQLITE_FUNC_CONSTANT) | (SQLITE_FUNC_UNLIKELY))), FpUserData: uintptr(int64(INLINEFUNC_unlikely)), FxSFunc: 0, FzName: ts + 13781 /* "unlikely" */},
+ {FnArg: int8(2), FfuncFlags: (U32(((SQLITE_UTF8 | SQLITE_FUNC_INLINE) | SQLITE_FUNC_CONSTANT) | (SQLITE_FUNC_UNLIKELY))), FpUserData: uintptr(int64(INLINEFUNC_unlikely)), FxSFunc: 0, FzName: ts + 13790 /* "likelihood" */},
+ {FnArg: int8(1), FfuncFlags: (U32(((SQLITE_UTF8 | SQLITE_FUNC_INLINE) | SQLITE_FUNC_CONSTANT) | (SQLITE_FUNC_UNLIKELY))), FpUserData: uintptr(int64(INLINEFUNC_unlikely)), FxSFunc: 0, FzName: ts + 13801 /* "likely" */},
+ {FnArg: int8(1), FfuncFlags: (U32((((SQLITE_FUNC_CONSTANT | SQLITE_UTF8) | (0 * SQLITE_FUNC_NEEDCOLL)) | SQLITE_FUNC_OFFSET) | SQLITE_FUNC_TYPEOF)), FxSFunc: 0, FzName: ts + 13808 /* "sqlite_offset" */},
+ {FnArg: int8(1), FfuncFlags: (U32((SQLITE_FUNC_CONSTANT | SQLITE_UTF8) | (0 * SQLITE_FUNC_NEEDCOLL))), FpUserData: uintptr(int64(1)), FxSFunc: 0, FzName: ts + 13822 /* "ltrim" */},
+ {FnArg: int8(2), FfuncFlags: (U32((SQLITE_FUNC_CONSTANT | SQLITE_UTF8) | (0 * SQLITE_FUNC_NEEDCOLL))), FpUserData: uintptr(int64(1)), FxSFunc: 0, FzName: ts + 13822 /* "ltrim" */},
+ {FnArg: int8(1), FfuncFlags: (U32((SQLITE_FUNC_CONSTANT | SQLITE_UTF8) | (0 * SQLITE_FUNC_NEEDCOLL))), FpUserData: uintptr(int64(2)), FxSFunc: 0, FzName: ts + 13828 /* "rtrim" */},
+ {FnArg: int8(2), FfuncFlags: (U32((SQLITE_FUNC_CONSTANT | SQLITE_UTF8) | (0 * SQLITE_FUNC_NEEDCOLL))), FpUserData: uintptr(int64(2)), FxSFunc: 0, FzName: ts + 13828 /* "rtrim" */},
+ {FnArg: int8(1), FfuncFlags: (U32((SQLITE_FUNC_CONSTANT | SQLITE_UTF8) | (0 * SQLITE_FUNC_NEEDCOLL))), FpUserData: uintptr(int64(3)), FxSFunc: 0, FzName: ts + 13834 /* "trim" */},
+ {FnArg: int8(2), FfuncFlags: (U32((SQLITE_FUNC_CONSTANT | SQLITE_UTF8) | (0 * SQLITE_FUNC_NEEDCOLL))), FpUserData: uintptr(int64(3)), FxSFunc: 0, FzName: ts + 13834 /* "trim" */},
+ {FnArg: int8(-1), FfuncFlags: (U32((SQLITE_FUNC_CONSTANT | SQLITE_UTF8) | (1 * SQLITE_FUNC_NEEDCOLL))), FxSFunc: 0, FzName: ts + 13839 /* "min" */},
+ {FfuncFlags: (U32((SQLITE_FUNC_CONSTANT | SQLITE_UTF8) | (1 * SQLITE_FUNC_NEEDCOLL))), FzName: ts + 13839 /* "min" */},
+ {FnArg: int8(1), FfuncFlags: (U32((SQLITE_UTF8 | (1 * SQLITE_FUNC_NEEDCOLL)) | SQLITE_FUNC_MINMAX)), FxSFunc: 0, FxFinalize: 0, FxValue: 0, FzName: ts + 13839 /* "min" */},
+ {FnArg: int8(-1), FfuncFlags: (U32((SQLITE_FUNC_CONSTANT | SQLITE_UTF8) | (1 * SQLITE_FUNC_NEEDCOLL))), FpUserData: uintptr(int64(1)), FxSFunc: 0, FzName: ts + 13843 /* "max" */},
+ {FfuncFlags: (U32((SQLITE_FUNC_CONSTANT | SQLITE_UTF8) | (1 * SQLITE_FUNC_NEEDCOLL))), FpUserData: uintptr(int64(1)), FzName: ts + 13843 /* "max" */},
+ {FnArg: int8(1), FfuncFlags: (U32((SQLITE_UTF8 | (1 * SQLITE_FUNC_NEEDCOLL)) | SQLITE_FUNC_MINMAX)), FpUserData: uintptr(int64(1)), FxSFunc: 0, FxFinalize: 0, FxValue: 0, FzName: ts + 13843 /* "max" */},
+ {FnArg: int8(1), FfuncFlags: (U32(((SQLITE_FUNC_CONSTANT | SQLITE_UTF8) | (0 * SQLITE_FUNC_NEEDCOLL)) | SQLITE_FUNC_TYPEOF)), FxSFunc: 0, FzName: ts + 13847 /* "typeof" */},
+ {FnArg: int8(1), FfuncFlags: (U32(((SQLITE_FUNC_CONSTANT | SQLITE_UTF8) | (0 * SQLITE_FUNC_NEEDCOLL)) | SQLITE_FUNC_LENGTH)), FxSFunc: 0, FzName: ts + 13854 /* "length" */},
+ {FnArg: int8(2), FfuncFlags: (U32((SQLITE_FUNC_CONSTANT | SQLITE_UTF8) | (0 * SQLITE_FUNC_NEEDCOLL))), FxSFunc: 0, FzName: ts + 13861 /* "instr" */},
+ {FnArg: int8(-1), FfuncFlags: (U32((SQLITE_FUNC_CONSTANT | SQLITE_UTF8) | (0 * SQLITE_FUNC_NEEDCOLL))), FxSFunc: 0, FzName: ts + 13867 /* "printf" */},
+ {FnArg: int8(1), FfuncFlags: (U32((SQLITE_FUNC_CONSTANT | SQLITE_UTF8) | (0 * SQLITE_FUNC_NEEDCOLL))), FxSFunc: 0, FzName: ts + 13874 /* "unicode" */},
+ {FnArg: int8(-1), FfuncFlags: (U32((SQLITE_FUNC_CONSTANT | SQLITE_UTF8) | (0 * SQLITE_FUNC_NEEDCOLL))), FxSFunc: 0, FzName: ts + 13882 /* "char" */},
+ {FnArg: int8(1), FfuncFlags: (U32((SQLITE_FUNC_CONSTANT | SQLITE_UTF8) | (0 * SQLITE_FUNC_NEEDCOLL))), FxSFunc: 0, FzName: ts + 13887 /* "abs" */},
+ {FnArg: int8(1), FfuncFlags: (U32((SQLITE_FUNC_CONSTANT | SQLITE_UTF8) | (0 * SQLITE_FUNC_NEEDCOLL))), FxSFunc: 0, FzName: ts + 13891 /* "round" */},
+ {FnArg: int8(2), FfuncFlags: (U32((SQLITE_FUNC_CONSTANT | SQLITE_UTF8) | (0 * SQLITE_FUNC_NEEDCOLL))), FxSFunc: 0, FzName: ts + 13891 /* "round" */},
+ {FnArg: int8(1), FfuncFlags: (U32((SQLITE_FUNC_CONSTANT | SQLITE_UTF8) | (0 * SQLITE_FUNC_NEEDCOLL))), FxSFunc: 0, FzName: ts + 13897 /* "upper" */},
+ {FnArg: int8(1), FfuncFlags: (U32((SQLITE_FUNC_CONSTANT | SQLITE_UTF8) | (0 * SQLITE_FUNC_NEEDCOLL))), FxSFunc: 0, FzName: ts + 13903 /* "lower" */},
+ {FnArg: int8(1), FfuncFlags: (U32((SQLITE_FUNC_CONSTANT | SQLITE_UTF8) | (0 * SQLITE_FUNC_NEEDCOLL))), FxSFunc: 0, FzName: ts + 13909 /* "hex" */},
+ {FnArg: int8(2), FfuncFlags: (U32(((SQLITE_UTF8 | SQLITE_FUNC_INLINE) | SQLITE_FUNC_CONSTANT) | (0))), FxSFunc: 0, FzName: ts + 13913 /* "ifnull" */},
+ {FfuncFlags: (U32(SQLITE_UTF8 | (0 * SQLITE_FUNC_NEEDCOLL))), FxSFunc: 0, FzName: ts + 13920 /* "random" */},
+ {FnArg: int8(1), FfuncFlags: (U32(SQLITE_UTF8 | (0 * SQLITE_FUNC_NEEDCOLL))), FxSFunc: 0, FzName: ts + 13927 /* "randomblob" */},
+ {FnArg: int8(2), FfuncFlags: (U32((SQLITE_FUNC_CONSTANT | SQLITE_UTF8) | (1 * SQLITE_FUNC_NEEDCOLL))), FxSFunc: 0, FzName: ts + 13938 /* "nullif" */},
+ {FfuncFlags: (U32(SQLITE_FUNC_SLOCHNG | SQLITE_UTF8)), FxSFunc: 0, FzName: ts + 13945 /* "sqlite_version" */},
+ {FfuncFlags: (U32(SQLITE_FUNC_SLOCHNG | SQLITE_UTF8)), FxSFunc: 0, FzName: ts + 13960 /* "sqlite_source_id" */},
+ {FnArg: int8(2), FfuncFlags: (U32((SQLITE_FUNC_CONSTANT | SQLITE_UTF8) | (0 * SQLITE_FUNC_NEEDCOLL))), FxSFunc: 0, FzName: ts + 13977 /* "sqlite_log" */},
+ {FnArg: int8(1), FfuncFlags: (U32((SQLITE_FUNC_CONSTANT | SQLITE_UTF8) | (0 * SQLITE_FUNC_NEEDCOLL))), FxSFunc: 0, FzName: ts + 13988 /* "quote" */},
+ {FfuncFlags: (U32(SQLITE_UTF8 | (0 * SQLITE_FUNC_NEEDCOLL))), FxSFunc: 0, FzName: ts + 13994 /* "last_insert_rowi..." */},
+ {FfuncFlags: (U32(SQLITE_UTF8 | (0 * SQLITE_FUNC_NEEDCOLL))), FxSFunc: 0, FzName: ts + 14012 /* "changes" */},
+ {FfuncFlags: (U32(SQLITE_UTF8 | (0 * SQLITE_FUNC_NEEDCOLL))), FxSFunc: 0, FzName: ts + 14020 /* "total_changes" */},
+ {FnArg: int8(3), FfuncFlags: (U32((SQLITE_FUNC_CONSTANT | SQLITE_UTF8) | (0 * SQLITE_FUNC_NEEDCOLL))), FxSFunc: 0, FzName: ts + 14034 /* "replace" */},
+ {FnArg: int8(1), FfuncFlags: (U32((SQLITE_FUNC_CONSTANT | SQLITE_UTF8) | (0 * SQLITE_FUNC_NEEDCOLL))), FxSFunc: 0, FzName: ts + 14042 /* "zeroblob" */},
+ {FnArg: int8(2), FfuncFlags: (U32((SQLITE_FUNC_CONSTANT | SQLITE_UTF8) | (0 * SQLITE_FUNC_NEEDCOLL))), FxSFunc: 0, FzName: ts + 14051 /* "substr" */},
+ {FnArg: int8(3), FfuncFlags: (U32((SQLITE_FUNC_CONSTANT | SQLITE_UTF8) | (0 * SQLITE_FUNC_NEEDCOLL))), FxSFunc: 0, FzName: ts + 14051 /* "substr" */},
+ {FnArg: int8(2), FfuncFlags: (U32((SQLITE_FUNC_CONSTANT | SQLITE_UTF8) | (0 * SQLITE_FUNC_NEEDCOLL))), FxSFunc: 0, FzName: ts + 14058 /* "substring" */},
+ {FnArg: int8(3), FfuncFlags: (U32((SQLITE_FUNC_CONSTANT | SQLITE_UTF8) | (0 * SQLITE_FUNC_NEEDCOLL))), FxSFunc: 0, FzName: ts + 14058 /* "substring" */},
+ {FnArg: int8(1), FfuncFlags: (U32((SQLITE_UTF8 | (0 * SQLITE_FUNC_NEEDCOLL)) | 0)), FxSFunc: 0, FxFinalize: 0, FxValue: 0, FxInverse: 0, FzName: ts + 14068 /* "sum" */},
+ {FnArg: int8(1), FfuncFlags: (U32((SQLITE_UTF8 | (0 * SQLITE_FUNC_NEEDCOLL)) | 0)), FxSFunc: 0, FxFinalize: 0, FxValue: 0, FxInverse: 0, FzName: ts + 14072 /* "total" */},
+ {FnArg: int8(1), FfuncFlags: (U32((SQLITE_UTF8 | (0 * SQLITE_FUNC_NEEDCOLL)) | 0)), FxSFunc: 0, FxFinalize: 0, FxValue: 0, FxInverse: 0, FzName: ts + 14078 /* "avg" */},
+ {FfuncFlags: (U32((SQLITE_UTF8 | (0 * SQLITE_FUNC_NEEDCOLL)) | SQLITE_FUNC_COUNT)), FxSFunc: 0, FxFinalize: 0, FxValue: 0, FxInverse: 0, FzName: ts + 14082 /* "count" */},
+ {FnArg: int8(1), FfuncFlags: (U32((SQLITE_UTF8 | (0 * SQLITE_FUNC_NEEDCOLL)) | 0)), FxSFunc: 0, FxFinalize: 0, FxValue: 0, FxInverse: 0, FzName: ts + 14082 /* "count" */},
+ {FnArg: int8(1), FfuncFlags: (U32((SQLITE_UTF8 | (0 * SQLITE_FUNC_NEEDCOLL)) | 0)), FxSFunc: 0, FxFinalize: 0, FxValue: 0, FxInverse: 0, FzName: ts + 14088 /* "group_concat" */},
+ {FnArg: int8(2), FfuncFlags: (U32((SQLITE_UTF8 | (0 * SQLITE_FUNC_NEEDCOLL)) | 0)), FxSFunc: 0, FxFinalize: 0, FxValue: 0, FxInverse: 0, FzName: ts + 14088 /* "group_concat" */},
+
+ {FnArg: int8(2), FfuncFlags: (U32(((SQLITE_FUNC_CONSTANT | SQLITE_UTF8) | SQLITE_FUNC_LIKE) | SQLITE_FUNC_CASE)), FpUserData: 0, FxSFunc: 0, FzName: ts + 14101 /* "glob" */},
+ {FnArg: int8(2), FfuncFlags: (U32((SQLITE_FUNC_CONSTANT | SQLITE_UTF8) | SQLITE_FUNC_LIKE)), FpUserData: 0, FxSFunc: 0, FzName: ts + 13651 /* "like" */},
+ {FnArg: int8(3), FfuncFlags: (U32((SQLITE_FUNC_CONSTANT | SQLITE_UTF8) | SQLITE_FUNC_LIKE)), FpUserData: 0, FxSFunc: 0, FzName: ts + 13651 /* "like" */},
+ {FnArg: int8(1), FfuncFlags: (U32((SQLITE_FUNC_CONSTANT | SQLITE_UTF8) | (0 * SQLITE_FUNC_NEEDCOLL))), FzName: ts + 14106 /* "coalesce" */},
+ {FfuncFlags: (U32((SQLITE_FUNC_CONSTANT | SQLITE_UTF8) | (0 * SQLITE_FUNC_NEEDCOLL))), FzName: ts + 14106 /* "coalesce" */},
+ {FnArg: int8(1), FfuncFlags: (U32((SQLITE_FUNC_CONSTANT | SQLITE_UTF8) | (0 * SQLITE_FUNC_NEEDCOLL))), FxSFunc: 0, FzName: ts + 14115 /* "sign" */},
+ {FnArg: int8(-1), FfuncFlags: (U32(((SQLITE_UTF8 | SQLITE_FUNC_INLINE) | SQLITE_FUNC_CONSTANT) | (0))), FxSFunc: 0, FzName: ts + 14106 /* "coalesce" */},
+ {FnArg: int8(3), FfuncFlags: (U32(((SQLITE_UTF8 | SQLITE_FUNC_INLINE) | SQLITE_FUNC_CONSTANT) | (0))), FpUserData: uintptr(int64(INLINEFUNC_iif)), FxSFunc: 0, FzName: ts + 14120 /* "iif" */}} /* sqlite3.c:121438:18 */
//************* End of func.c ***********************************************
//************* Begin file fkey.c *******************************************
@@ -100394,7 +102777,7 @@ var aBuiltinFunc = [68]FuncDef{
// then non-zero is returned, and a "foreign key mismatch" error loaded
// into pParse. If an OOM error occurs, non-zero is returned and the
// pParse->db->mallocFailed flag is set.
-func Xsqlite3FkLocateIndex(tls *libc.TLS, pParse uintptr, pParent uintptr, pFKey uintptr, ppIdx uintptr, paiCol uintptr) int32 { /* sqlite3.c:120896:20: */
+func Xsqlite3FkLocateIndex(tls *libc.TLS, pParse uintptr, pParent uintptr, pFKey uintptr, ppIdx uintptr, paiCol uintptr) int32 { /* sqlite3.c:121786:20: */
bp := tls.Alloc(16)
defer tls.Free(16)
@@ -100446,7 +102829,7 @@ func Xsqlite3FkLocateIndex(tls *libc.TLS, pParse uintptr, pParent uintptr, pFKey
// If zKey is NULL, then this foreign key is implicitly mapped to
// the PRIMARY KEY of table pParent. The PRIMARY KEY index may be
// identified by the test.
- if (int32(*(*uint16)(unsafe.Pointer((pIdx) + 100 /* &.idxType */)) >> 14 & 0x3)) == SQLITE_IDXTYPE_PRIMARYKEY {
+ if (int32(*(*uint16)(unsafe.Pointer((pIdx) + 100 /* &.idxType */)) & 0xc000 >> 14)) == SQLITE_IDXTYPE_PRIMARYKEY {
if aiCol != 0 {
var i int32
for i = 0; i < nCol; i++ {
@@ -100505,7 +102888,7 @@ func Xsqlite3FkLocateIndex(tls *libc.TLS, pParse uintptr, pParent uintptr, pFKey
if !(pIdx != 0) {
if !(int32((*Parse)(unsafe.Pointer(pParse)).FdisableTriggers) != 0) {
Xsqlite3ErrorMsg(tls, pParse,
- ts+13671, /* "foreign key mism..." */
+ ts+14124, /* "foreign key mism..." */
libc.VaList(bp, (*Table)(unsafe.Pointer((*FKey)(unsafe.Pointer(pFKey)).FpFrom)).FzName, (*FKey)(unsafe.Pointer(pFKey)).FzTo))
}
Xsqlite3DbFree(tls, (*Parse)(unsafe.Pointer(pParse)).Fdb, aiCol)
@@ -100540,7 +102923,7 @@ func Xsqlite3FkLocateIndex(tls *libc.TLS, pParse uintptr, pParent uintptr, pFKey
//
// These operations are identified in the comment at the top of this file
// (fkey.c) as "I.1" and "D.1".
-func fkLookupParent(tls *libc.TLS, pParse uintptr, iDb int32, pTab uintptr, pIdx uintptr, pFKey uintptr, aiCol uintptr, regData int32, nIncr int32, isIgnore int32) { /* sqlite3.c:121031:13: */
+func fkLookupParent(tls *libc.TLS, pParse uintptr, iDb int32, pTab uintptr, pIdx uintptr, pFKey uintptr, aiCol uintptr, regData int32, nIncr int32, isIgnore int32) { /* sqlite3.c:121921:13: */
var i int32 // Iterator variable
var v uintptr = Xsqlite3GetVdbe(tls, pParse) // Vdbe to add code to
var iCur int32 = ((*Parse)(unsafe.Pointer(pParse)).FnTab - 1) // Cursor number to use
@@ -100670,7 +103053,7 @@ func fkLookupParent(tls *libc.TLS, pParse uintptr, iDb int32, pTab uintptr, pIdx
// regBase is the first of an array of register that contains the data
// for pTab. regBase itself holds the rowid. regBase+1 holds the first
// column. regBase+2 holds the second column, and so forth.
-func exprTableRegister(tls *libc.TLS, pParse uintptr, pTab uintptr, regBase int32, iCol I16) uintptr { /* sqlite3.c:121184:13: */
+func exprTableRegister(tls *libc.TLS, pParse uintptr, pTab uintptr, regBase int32, iCol I16) uintptr { /* sqlite3.c:122074:13: */
var pExpr uintptr
var pCol uintptr
var zColl uintptr
@@ -100689,7 +103072,7 @@ func exprTableRegister(tls *libc.TLS, pParse uintptr, pTab uintptr, regBase int3
pExpr = Xsqlite3ExprAddCollateString(tls, pParse, pExpr, zColl)
} else {
(*Expr)(unsafe.Pointer(pExpr)).FiTable = regBase
- (*Expr)(unsafe.Pointer(pExpr)).FaffExpr = int8(SQLITE_AFF_INTEGER)
+ (*Expr)(unsafe.Pointer(pExpr)).FaffExpr = uint8(SQLITE_AFF_INTEGER)
}
}
return pExpr
@@ -100697,7 +103080,7 @@ func exprTableRegister(tls *libc.TLS, pParse uintptr, pTab uintptr, regBase int3
// Return an Expr object that refers to column iCol of table pTab which
// has cursor iCur.
-func exprTableColumn(tls *libc.TLS, db uintptr, pTab uintptr, iCursor int32, iCol I16) uintptr { /* sqlite3.c:121216:13: */
+func exprTableColumn(tls *libc.TLS, db uintptr, pTab uintptr, iCursor int32, iCol I16) uintptr { /* sqlite3.c:122106:13: */
var pExpr uintptr = Xsqlite3Expr(tls, db, TK_COLUMN, uintptr(0))
if pExpr != 0 {
*(*uintptr)(unsafe.Pointer(pExpr + 64 /* &.y */)) = pTab
@@ -100737,7 +103120,7 @@ func exprTableColumn(tls *libc.TLS, db uintptr, pTab uintptr, iCursor int32, iCo
//
// These operations are identified in the comment at the top of this file
// (fkey.c) as "I.2" and "D.2".
-func fkScanChildren(tls *libc.TLS, pParse uintptr, pSrc uintptr, pTab uintptr, pIdx uintptr, pFKey uintptr, aiCol uintptr, regData int32, nIncr int32) { /* sqlite3.c:121263:13: */
+func fkScanChildren(tls *libc.TLS, pParse uintptr, pSrc uintptr, pTab uintptr, pIdx uintptr, pFKey uintptr, aiCol uintptr, regData int32, nIncr int32) { /* sqlite3.c:122153:13: */
bp := tls.Alloc(56)
defer tls.Free(56)
@@ -100861,7 +103244,7 @@ func fkScanChildren(tls *libc.TLS, pParse uintptr, pSrc uintptr, pTab uintptr, p
// "t2". Calling this function with "t2" as the argument would return a
// NULL pointer (as there are no FK constraints for which t2 is the parent
// table).
-func Xsqlite3FkReferences(tls *libc.TLS, pTab uintptr) uintptr { /* sqlite3.c:121392:21: */
+func Xsqlite3FkReferences(tls *libc.TLS, pTab uintptr) uintptr { /* sqlite3.c:122282:21: */
return Xsqlite3HashFind(tls, ((*Table)(unsafe.Pointer(pTab)).FpSchema + 80 /* &.fkeyHash */), (*Table)(unsafe.Pointer(pTab)).FzName)
}
@@ -100871,7 +103254,7 @@ func Xsqlite3FkReferences(tls *libc.TLS, pTab uintptr) uintptr { /* sqlite3.c:12
//
// The Trigger structure or any of its sub-components may be allocated from
// the lookaside buffer belonging to database handle dbMem.
-func fkTriggerDelete(tls *libc.TLS, dbMem uintptr, p uintptr) { /* sqlite3.c:121404:13: */
+func fkTriggerDelete(tls *libc.TLS, dbMem uintptr, p uintptr) { /* sqlite3.c:122294:13: */
if p != 0 {
var pStep uintptr = (*Trigger)(unsafe.Pointer(p)).Fstep_list
Xsqlite3ExprDelete(tls, dbMem, (*TriggerStep)(unsafe.Pointer(pStep)).FpWhere)
@@ -100897,7 +103280,7 @@ func fkTriggerDelete(tls *libc.TLS, dbMem uintptr, p uintptr) { /* sqlite3.c:121
// then the equivalent of "DELETE FROM " is executed before dropping
// the table from the database. Triggers are disabled while running this
// DELETE, but foreign key actions are not.
-func Xsqlite3FkDropTable(tls *libc.TLS, pParse uintptr, pName uintptr, pTab uintptr) { /* sqlite3.c:121432:21: */
+func Xsqlite3FkDropTable(tls *libc.TLS, pParse uintptr, pName uintptr, pTab uintptr) { /* sqlite3.c:122322:21: */
var db uintptr = (*Parse)(unsafe.Pointer(pParse)).Fdb
if (((*Sqlite3)(unsafe.Pointer(db)).Fflags & uint64(SQLITE_ForeignKeys)) != 0) && !((*Table)(unsafe.Pointer(pTab)).FnModuleArg != 0) {
var iSkip int32 = 0
@@ -100960,7 +103343,7 @@ func Xsqlite3FkDropTable(tls *libc.TLS, pParse uintptr, pName uintptr, pTab uint
//
// This function returns true if any of the columns that are part of the
// child key for FK constraint *p are modified.
-func fkChildIsModified(tls *libc.TLS, pTab uintptr, p uintptr, aChange uintptr, bChngRowid int32) int32 { /* sqlite3.c:121495:12: */
+func fkChildIsModified(tls *libc.TLS, pTab uintptr, p uintptr, aChange uintptr, bChngRowid int32) int32 { /* sqlite3.c:122385:12: */
var i int32
for i = 0; i < (*FKey)(unsafe.Pointer(p)).FnCol; i++ {
var iChildKey int32 = (*sColMap)(unsafe.Pointer((p + 64 /* &.aCol */) + uintptr(i)*16)).FiFrom
@@ -100984,7 +103367,7 @@ func fkChildIsModified(tls *libc.TLS, pTab uintptr, p uintptr, aChange uintptr,
//
// This function returns true if any of the columns that are part of the
// parent key for FK constraint *p are modified.
-func fkParentIsModified(tls *libc.TLS, pTab uintptr, p uintptr, aChange uintptr, bChngRowid int32) int32 { /* sqlite3.c:121522:12: */
+func fkParentIsModified(tls *libc.TLS, pTab uintptr, p uintptr, aChange uintptr, bChngRowid int32) int32 { /* sqlite3.c:122412:12: */
var i int32
for i = 0; i < (*FKey)(unsafe.Pointer(p)).FnCol; i++ {
var zKey uintptr = (*sColMap)(unsafe.Pointer((p + 64 /* &.aCol */) + uintptr(i)*16)).FzCol
@@ -101008,7 +103391,7 @@ func fkParentIsModified(tls *libc.TLS, pTab uintptr, p uintptr, aChange uintptr,
// Return true if the parser passed as the first argument is being
// used to code a trigger that is really a "SET NULL" action belonging
// to trigger pFKey.
-func isSetNullAction(tls *libc.TLS, pParse uintptr, pFKey uintptr) int32 { /* sqlite3.c:121551:12: */
+func isSetNullAction(tls *libc.TLS, pParse uintptr, pFKey uintptr) int32 { /* sqlite3.c:122441:12: */
var pTop uintptr = func() uintptr {
if (*Parse)(unsafe.Pointer(pParse)).FpToplevel != 0 {
return (*Parse)(unsafe.Pointer(pParse)).FpToplevel
@@ -101043,7 +103426,7 @@ func isSetNullAction(tls *libc.TLS, pParse uintptr, pFKey uintptr) int32 { /* sq
// the original record is deleted from the table using the calling convention
// described for DELETE. Then again after the original record is deleted
// but before the new record is inserted using the INSERT convention.
-func Xsqlite3FkCheck(tls *libc.TLS, pParse uintptr, pTab uintptr, regOld int32, regNew int32, aChange uintptr, bChngRowid int32) { /* sqlite3.c:121584:21: */
+func Xsqlite3FkCheck(tls *libc.TLS, pParse uintptr, pTab uintptr, regOld int32, regNew int32, aChange uintptr, bChngRowid int32) { /* sqlite3.c:122474:21: */
bp := tls.Alloc(40)
defer tls.Free(40)
@@ -101242,7 +103625,7 @@ func Xsqlite3FkCheck(tls *libc.TLS, pParse uintptr, pTab uintptr, regOld int32,
// This function is called before generating code to update or delete a
// row contained in table pTab.
-func Xsqlite3FkOldmask(tls *libc.TLS, pParse uintptr, pTab uintptr) U32 { /* sqlite3.c:121786:20: */
+func Xsqlite3FkOldmask(tls *libc.TLS, pParse uintptr, pTab uintptr) U32 { /* sqlite3.c:122676:20: */
bp := tls.Alloc(8)
defer tls.Free(8)
@@ -101301,7 +103684,7 @@ func Xsqlite3FkOldmask(tls *libc.TLS, pParse uintptr, pTab uintptr) U32 { /* sql
// not "NO ACTION" (i.e. is CASCADE, SET DEFAULT or SET NULL).
//
// Or, assuming some other foreign key processing is required, 1.
-func Xsqlite3FkRequired(tls *libc.TLS, pParse uintptr, pTab uintptr, aChange uintptr, chngRowid int32) int32 { /* sqlite3.c:121836:20: */
+func Xsqlite3FkRequired(tls *libc.TLS, pParse uintptr, pTab uintptr, aChange uintptr, chngRowid int32) int32 { /* sqlite3.c:122726:20: */
var eRet int32 = 1 // Value to return if bHaveFK is true
var bHaveFK int32 = 0 // If FK processing is required
if ((*Sqlite3)(unsafe.Pointer((*Parse)(unsafe.Pointer(pParse)).Fdb)).Fflags & uint64(SQLITE_ForeignKeys)) != 0 {
@@ -101369,7 +103752,7 @@ func Xsqlite3FkRequired(tls *libc.TLS, pParse uintptr, pTab uintptr, aChange uin
// The returned pointer is cached as part of the foreign key object. It
// is eventually freed along with the rest of the foreign key object by
// sqlite3FkDelete().
-func fkActionTrigger(tls *libc.TLS, pParse uintptr, pTab uintptr, pFKey uintptr, pChanges uintptr) uintptr { /* sqlite3.c:121904:16: */
+func fkActionTrigger(tls *libc.TLS, pParse uintptr, pTab uintptr, pFKey uintptr, pChanges uintptr) uintptr { /* sqlite3.c:122794:16: */
bp := tls.Alloc(96)
defer tls.Free(96)
@@ -101401,8 +103784,8 @@ func fkActionTrigger(tls *libc.TLS, pParse uintptr, pTab uintptr, pFKey uintptr,
}
for i = 0; i < (*FKey)(unsafe.Pointer(pFKey)).FnCol; i++ {
- *(*Token)(unsafe.Pointer(bp + 48 /* tOld */)) = Token{Fz: ts + 5336 /* "old" */, Fn: uint32(3)} // Literal "old" token
- *(*Token)(unsafe.Pointer(bp + 64 /* tNew */)) = Token{Fz: ts + 5332 /* "new" */, Fn: uint32(3)} // Literal "new" token
+ *(*Token)(unsafe.Pointer(bp + 48 /* tOld */)) = Token{Fz: ts + 5467 /* "old" */, Fn: uint32(3)} // Literal "old" token
+ *(*Token)(unsafe.Pointer(bp + 64 /* tNew */)) = Token{Fz: ts + 5463 /* "new" */, Fn: uint32(3)} // Literal "new" token
// var tFromCol Token at bp+32, 16
// Name of column in child table
// var tToCol Token at bp+16, 16
@@ -101490,9 +103873,9 @@ func fkActionTrigger(tls *libc.TLS, pParse uintptr, pTab uintptr, pFKey uintptr,
(*Token)(unsafe.Pointer(bp + 80 /* &tFrom */)).Fz = zFrom
(*Token)(unsafe.Pointer(bp + 80 /* &tFrom */)).Fn = uint32(nFrom)
- pRaise = Xsqlite3Expr(tls, db, TK_RAISE, ts+4119 /* "FOREIGN KEY cons..." */)
+ pRaise = Xsqlite3Expr(tls, db, TK_RAISE, ts+4250 /* "FOREIGN KEY cons..." */)
if pRaise != 0 {
- (*Expr)(unsafe.Pointer(pRaise)).FaffExpr = int8(OE_Abort)
+ (*Expr)(unsafe.Pointer(pRaise)).FaffExpr = uint8(OE_Abort)
}
pSelect = Xsqlite3SelectNew(tls, pParse,
Xsqlite3ExprListAppend(tls, pParse, uintptr(0), pRaise),
@@ -101571,7 +103954,7 @@ func fkActionTrigger(tls *libc.TLS, pParse uintptr, pTab uintptr, pFKey uintptr,
// This function is called when deleting or updating a row to implement
// any required CASCADE, SET NULL or SET DEFAULT actions.
-func Xsqlite3FkActions(tls *libc.TLS, pParse uintptr, pTab uintptr, pChanges uintptr, regOld int32, aChange uintptr, bChngRowid int32) { /* sqlite3.c:122096:21: */
+func Xsqlite3FkActions(tls *libc.TLS, pParse uintptr, pTab uintptr, pChanges uintptr, regOld int32, aChange uintptr, bChngRowid int32) { /* sqlite3.c:122986:21: */
// If foreign-key support is enabled, iterate through all FKs that
// refer to table pTab. If there is an action associated with the FK
// for this operation (either update or delete), invoke the associated
@@ -101592,7 +103975,7 @@ func Xsqlite3FkActions(tls *libc.TLS, pParse uintptr, pTab uintptr, pChanges uin
// Free all memory associated with foreign key definitions attached to
// table pTab. Remove the deleted foreign keys from the Schema.fkeyHash
// hash table.
-func Xsqlite3FkDelete(tls *libc.TLS, db uintptr, pTab uintptr) { /* sqlite3.c:122128:21: */
+func Xsqlite3FkDelete(tls *libc.TLS, db uintptr, pTab uintptr) { /* sqlite3.c:123018:21: */
var pFKey uintptr // Iterator variable
var pNext uintptr // Copy of pFKey->pNextFrom
@@ -101652,7 +104035,7 @@ func Xsqlite3FkDelete(tls *libc.TLS, db uintptr, pTab uintptr) { /* sqlite3.c:12
//
// If pTab is a WITHOUT ROWID table, then it is the PRIMARY KEY index
// for that table that is actually opened.
-func Xsqlite3OpenTable(tls *libc.TLS, pParse uintptr, iCur int32, iDb int32, pTab uintptr, opcode int32) { /* sqlite3.c:122194:21: */
+func Xsqlite3OpenTable(tls *libc.TLS, pParse uintptr, iCur int32, iDb int32, pTab uintptr, opcode int32) { /* sqlite3.c:123084:21: */
var v uintptr
v = (*Parse)(unsafe.Pointer(pParse)).FpVdbe
@@ -101694,7 +104077,7 @@ func Xsqlite3OpenTable(tls *libc.TLS, pParse uintptr, iCur int32, iDb int32, pTa
// Memory for the buffer containing the column index affinity string
// is managed along with the rest of the Index structure. It will be
// released when sqlite3DeleteIndex() is called.
-func Xsqlite3IndexAffinityStr(tls *libc.TLS, db uintptr, pIdx uintptr) uintptr { /* sqlite3.c:122241:27: */
+func Xsqlite3IndexAffinityStr(tls *libc.TLS, db uintptr, pIdx uintptr) uintptr { /* sqlite3.c:123131:27: */
if !(int32((*Index)(unsafe.Pointer(pIdx)).FzColAff) != 0) {
// The first time a column affinity string for a particular index is
// required, it is allocated and populated here. It is then stored as
@@ -101712,24 +104095,24 @@ func Xsqlite3IndexAffinityStr(tls *libc.TLS, db uintptr, pIdx uintptr) uintptr {
}
for n = 0; n < int32((*Index)(unsafe.Pointer(pIdx)).FnColumn); n++ {
var x I16 = *(*I16)(unsafe.Pointer((*Index)(unsafe.Pointer(pIdx)).FaiColumn + uintptr(n)*2))
- var aff int8
+ var aff uint8
if int32(x) >= 0 {
aff = (*Column)(unsafe.Pointer((*Table)(unsafe.Pointer(pTab)).FaCol + uintptr(x)*32)).Faffinity
} else if int32(x) == (-1) {
- aff = int8(SQLITE_AFF_INTEGER)
+ aff = uint8(SQLITE_AFF_INTEGER)
} else {
aff = Xsqlite3ExprAffinity(tls, (*ExprList_item)(unsafe.Pointer(((*Index)(unsafe.Pointer(pIdx)).FaColExpr+8 /* &.a */)+uintptr(n)*32)).FpExpr)
}
if int32(aff) < SQLITE_AFF_BLOB {
- aff = int8(SQLITE_AFF_BLOB)
+ aff = uint8(SQLITE_AFF_BLOB)
}
if int32(aff) > SQLITE_AFF_NUMERIC {
- aff = int8(SQLITE_AFF_NUMERIC)
+ aff = uint8(SQLITE_AFF_NUMERIC)
}
- *(*int8)(unsafe.Pointer((*Index)(unsafe.Pointer(pIdx)).FzColAff + uintptr(n))) = aff
+ *(*uint8)(unsafe.Pointer((*Index)(unsafe.Pointer(pIdx)).FzColAff + uintptr(n))) = aff
}
- *(*int8)(unsafe.Pointer((*Index)(unsafe.Pointer(pIdx)).FzColAff + uintptr(n))) = int8(0)
+ *(*uint8)(unsafe.Pointer((*Index)(unsafe.Pointer(pIdx)).FzColAff + uintptr(n))) = uint8(0)
}
return (*Index)(unsafe.Pointer(pIdx)).FzColAff
@@ -101753,7 +104136,7 @@ func Xsqlite3IndexAffinityStr(tls *libc.TLS, db uintptr, pIdx uintptr) uintptr {
// 'C' NUMERIC
// 'D' INTEGER
// 'E' REAL
-func Xsqlite3TableAffinity(tls *libc.TLS, v uintptr, pTab uintptr, iReg int32) { /* sqlite3.c:122300:21: */
+func Xsqlite3TableAffinity(tls *libc.TLS, v uintptr, pTab uintptr, iReg int32) { /* sqlite3.c:123190:21: */
var i int32
var j int32
var zColAff uintptr = (*Table)(unsafe.Pointer(pTab)).FzColAff
@@ -101768,11 +104151,11 @@ func Xsqlite3TableAffinity(tls *libc.TLS, v uintptr, pTab uintptr, iReg int32) {
for i = libc.AssignInt32(&j, 0); i < int32((*Table)(unsafe.Pointer(pTab)).FnCol); i++ {
if (int32((*Column)(unsafe.Pointer((*Table)(unsafe.Pointer(pTab)).FaCol+uintptr(i)*32)).FcolFlags) & COLFLAG_VIRTUAL) == 0 {
- *(*int8)(unsafe.Pointer(zColAff + uintptr(libc.PostIncInt32(&j, 1)))) = (*Column)(unsafe.Pointer((*Table)(unsafe.Pointer(pTab)).FaCol + uintptr(i)*32)).Faffinity
+ *(*uint8)(unsafe.Pointer(zColAff + uintptr(libc.PostIncInt32(&j, 1)))) = (*Column)(unsafe.Pointer((*Table)(unsafe.Pointer(pTab)).FaCol + uintptr(i)*32)).Faffinity
}
}
- for ok := true; ok; ok = ((j >= 0) && (int32(*(*int8)(unsafe.Pointer(zColAff + uintptr(j)))) <= SQLITE_AFF_BLOB)) {
- *(*int8)(unsafe.Pointer(zColAff + uintptr(libc.PostDecInt32(&j, 1)))) = int8(0)
+ for ok := true; ok; ok = ((j >= 0) && (int32(*(*uint8)(unsafe.Pointer(zColAff + uintptr(j)))) <= SQLITE_AFF_BLOB)) {
+ *(*uint8)(unsafe.Pointer(zColAff + uintptr(libc.PostDecInt32(&j, 1)))) = uint8(0)
}
(*Table)(unsafe.Pointer(pTab)).FzColAff = zColAff
}
@@ -101791,7 +104174,7 @@ func Xsqlite3TableAffinity(tls *libc.TLS, v uintptr, pTab uintptr, iReg int32) {
// have been opened at any point in the VDBE program. This is used to see if
// a statement of the form "INSERT INTO SELECT ..." can
// run without using a temporary table for the results of the SELECT.
-func readsTable(tls *libc.TLS, p uintptr, iDb int32, pTab uintptr) int32 { /* sqlite3.c:122339:12: */
+func readsTable(tls *libc.TLS, p uintptr, iDb int32, pTab uintptr) int32 { /* sqlite3.c:123229:12: */
var v uintptr = Xsqlite3GetVdbe(tls, p)
var i int32
var iEnd int32 = Xsqlite3VdbeCurrentAddr(tls, v)
@@ -101827,7 +104210,7 @@ func readsTable(tls *libc.TLS, p uintptr, iDb int32, pTab uintptr) int32 { /* sq
// This walker callback will compute the union of colFlags flags for all
// referenced columns in a CHECK constraint or generated column expression.
-func exprColumnFlagUnion(tls *libc.TLS, pWalker uintptr, pExpr uintptr) int32 { /* sqlite3.c:122376:12: */
+func exprColumnFlagUnion(tls *libc.TLS, pWalker uintptr, pExpr uintptr) int32 { /* sqlite3.c:123266:12: */
if (int32((*Expr)(unsafe.Pointer(pExpr)).Fop) == TK_COLUMN) && (int32((*Expr)(unsafe.Pointer(pExpr)).FiColumn) >= 0) {
*(*U16)(unsafe.Pointer(pWalker + 36 /* &.eCode */)) |= U16((int32((*Column)(unsafe.Pointer((*Table1)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(pWalker + 40 /* &.u */)))).FaCol + uintptr((*Expr)(unsafe.Pointer(pExpr)).FiColumn)*32)).FcolFlags)))
@@ -101840,7 +104223,7 @@ func exprColumnFlagUnion(tls *libc.TLS, pWalker uintptr, pExpr uintptr) int32 {
// or VIRTUAL columns have not yet been initialized. This routine goes
// back and computes the values for those columns based on the previously
// computed normal columns.
-func Xsqlite3ComputeGeneratedColumns(tls *libc.TLS, pParse uintptr, iRegStore int32, pTab uintptr) { /* sqlite3.c:122392:21: */
+func Xsqlite3ComputeGeneratedColumns(tls *libc.TLS, pParse uintptr, iRegStore int32, pTab uintptr) { /* sqlite3.c:123282:21: */
bp := tls.Alloc(56)
defer tls.Free(56)
@@ -101863,12 +104246,12 @@ func Xsqlite3ComputeGeneratedColumns(tls *libc.TLS, pParse uintptr, iRegStore in
var jj int32
var zP4 uintptr = *(*uintptr)(unsafe.Pointer(pOp + 16 /* &.p4 */))
- for ii = libc.AssignInt32(&jj, 0); *(*int8)(unsafe.Pointer(zP4 + uintptr(jj))) != 0; ii++ {
+ for ii = libc.AssignInt32(&jj, 0); *(*uint8)(unsafe.Pointer(zP4 + uintptr(jj))) != 0; ii++ {
if (int32((*Column)(unsafe.Pointer((*Table)(unsafe.Pointer(pTab)).FaCol+uintptr(ii)*32)).FcolFlags) & COLFLAG_VIRTUAL) != 0 {
continue
}
if (int32((*Column)(unsafe.Pointer((*Table)(unsafe.Pointer(pTab)).FaCol+uintptr(ii)*32)).FcolFlags) & COLFLAG_STORED) != 0 {
- *(*int8)(unsafe.Pointer(zP4 + uintptr(jj))) = int8(SQLITE_AFF_NONE)
+ *(*uint8)(unsafe.Pointer(zP4 + uintptr(jj))) = uint8(SQLITE_AFF_NONE)
}
jj++
}
@@ -101920,7 +104303,7 @@ func Xsqlite3ComputeGeneratedColumns(tls *libc.TLS, pParse uintptr, iRegStore in
}
}
if pRedo != 0 {
- Xsqlite3ErrorMsg(tls, pParse, ts+6813 /* "generated column..." */, libc.VaList(bp, (*Column)(unsafe.Pointer(pRedo)).FzName))
+ Xsqlite3ErrorMsg(tls, pParse, ts+6944 /* "generated column..." */, libc.VaList(bp, (*Column)(unsafe.Pointer(pRedo)).FzName))
}
(*Parse)(unsafe.Pointer(pParse)).FiSelfTab = 0
}
@@ -101946,7 +104329,7 @@ func Xsqlite3ComputeGeneratedColumns(tls *libc.TLS, pParse uintptr, iRegStore in
//
// The 2nd register is the one that is returned. That is all the
// insert routine needs to know about.
-func autoIncBegin(tls *libc.TLS, pParse uintptr, iDb int32, pTab uintptr) int32 { /* sqlite3.c:122510:12: */
+func autoIncBegin(tls *libc.TLS, pParse uintptr, iDb int32, pTab uintptr) int32 { /* sqlite3.c:123400:12: */
var memId int32 = 0 // Register holding maximum rowid
if (((*Table)(unsafe.Pointer(pTab)).FtabFlags & U32(TF_Autoincrement)) != U32(0)) &&
@@ -102000,7 +104383,7 @@ func autoIncBegin(tls *libc.TLS, pParse uintptr, iDb int32, pTab uintptr) int32
// This routine generates code that will initialize all of the
// register used by the autoincrement tracker.
-func Xsqlite3AutoincrementBegin(tls *libc.TLS, pParse uintptr) { /* sqlite3.c:122561:21: */
+func Xsqlite3AutoincrementBegin(tls *libc.TLS, pParse uintptr) { /* sqlite3.c:123451:21: */
var p uintptr // Information about an AUTOINCREMENT
var db uintptr = (*Parse)(unsafe.Pointer(pParse)).Fdb // The database connection
var pDb uintptr // Database only autoinc table
@@ -102040,7 +104423,7 @@ func Xsqlite3AutoincrementBegin(tls *libc.TLS, pParse uintptr) { /* sqlite3.c:12
}
}
-var iLn1 int32 = 0 /* sqlite3.c:122575:22 */
+var iLn1 int32 = 0 /* sqlite3.c:123465:22 */
var autoInc = [12]VdbeOpList{
/* 0 */ {Fopcode: U8(OP_Null)},
/* 1 */ {Fopcode: U8(OP_Rewind), Fp2: int8(10)},
@@ -102054,7 +104437,7 @@ var autoInc = [12]VdbeOpList{
/* 9 */ {Fopcode: U8(OP_Next), Fp2: int8(2)},
/* 10 */ {Fopcode: U8(OP_Integer)},
/* 11 */ {Fopcode: U8(OP_Close)},
-} /* sqlite3.c:122576:29 */
+} /* sqlite3.c:123466:29 */
// Update the maximum rowid for an autoincrement calculation.
//
@@ -102062,7 +104445,7 @@ var autoInc = [12]VdbeOpList{
// new rowid that is about to be inserted. If that new rowid is
// larger than the maximum rowid in the memId memory cell, then the
// memory cell is updated.
-func autoIncStep(tls *libc.TLS, pParse uintptr, memId int32, regRowid int32) { /* sqlite3.c:122622:13: */
+func autoIncStep(tls *libc.TLS, pParse uintptr, memId int32, regRowid int32) { /* sqlite3.c:123512:13: */
if memId > 0 {
Xsqlite3VdbeAddOp2(tls, (*Parse)(unsafe.Pointer(pParse)).FpVdbe, OP_MemMax, memId, regRowid)
}
@@ -102073,7 +104456,7 @@ func autoIncStep(tls *libc.TLS, pParse uintptr, memId int32, regRowid int32) { /
// Every statement that might do an INSERT into an autoincrement
// table (either directly or through triggers) needs to call this
// routine just before the "exit" code.
-func autoIncrementEnd(tls *libc.TLS, pParse uintptr) { /* sqlite3.c:122635:29: */
+func autoIncrementEnd(tls *libc.TLS, pParse uintptr) { /* sqlite3.c:123525:29: */
var p uintptr
var v uintptr = (*Parse)(unsafe.Pointer(pParse)).FpVdbe
var db uintptr = (*Parse)(unsafe.Pointer(pParse)).Fdb
@@ -102104,16 +104487,16 @@ func autoIncrementEnd(tls *libc.TLS, pParse uintptr) { /* sqlite3.c:122635:29: *
}
}
-var iLn2 int32 = 0 /* sqlite3.c:122642:22 */
+var iLn2 int32 = 0 /* sqlite3.c:123532:22 */
var autoIncEnd = [5]VdbeOpList{
/* 0 */ {Fopcode: U8(OP_NotNull), Fp2: int8(2)},
/* 1 */ {Fopcode: U8(OP_NewRowid)},
/* 2 */ {Fopcode: U8(OP_MakeRecord), Fp2: int8(2)},
/* 3 */ {Fopcode: U8(OP_Insert)},
/* 4 */ {Fopcode: U8(OP_Close)},
-} /* sqlite3.c:122643:29 */
+} /* sqlite3.c:123533:29 */
-func Xsqlite3AutoincrementEnd(tls *libc.TLS, pParse uintptr) { /* sqlite3.c:122672:21: */
+func Xsqlite3AutoincrementEnd(tls *libc.TLS, pParse uintptr) { /* sqlite3.c:123562:21: */
if (*Parse)(unsafe.Pointer(pParse)).FpAinc != 0 {
autoIncrementEnd(tls, pParse)
}
@@ -102214,9 +104597,9 @@ func Xsqlite3AutoincrementEnd(tls *libc.TLS, pParse uintptr) { /* sqlite3.c:1226
// transfer values form intermediate table into
// end loop
// D: cleanup
-func Xsqlite3Insert(tls *libc.TLS, pParse uintptr, pTabList uintptr, pSelect uintptr, pColumn uintptr, onError int32, pUpsert uintptr) { /* sqlite3.c:122791:21: */
- bp := tls.Alloc(204)
- defer tls.Free(204)
+func Xsqlite3Insert(tls *libc.TLS, pParse uintptr, pTabList uintptr, pSelect uintptr, pColumn uintptr, onError int32, pUpsert uintptr) { /* sqlite3.c:123681:21: */
+ bp := tls.Alloc(188)
+ defer tls.Free(188)
var db uintptr // The main database structure
var pTab uintptr // The table to insert into. aka TABLE
@@ -102226,16 +104609,16 @@ func Xsqlite3Insert(tls *libc.TLS, pParse uintptr, pTabList uintptr, pSelect uin
var pIdx uintptr // For looping over indices of the table
var nColumn int32 // Number of columns in the data
var nHidden int32 // Number of hidden columns if TABLE is virtual
- // var iDataCur int32 at bp+192, 4
+ // var iDataCur int32 at bp+176, 4
// VDBE cursor that is the main data repository
- // var iIdxCur int32 at bp+196, 4
+ // var iIdxCur int32 at bp+180, 4
// First index cursor
var ipkColumn int32 // Column that is the INTEGER PRIMARY KEY
var endOfLoop int32 // Label for the end of the insertion loop
var srcTab int32 // Data comes from this temporary cursor if >=0
var addrInsTop int32 // Jump to label "D"
var addrCont int32 // Top of insert loop. Label "C" in templates 3 and 4
- // var dest SelectDest at bp+96, 40
+ // var dest SelectDest at bp+80, 40
// Destination for SELECT on rhs of INSERT
var iDb int32 // Index of database holding TABLE
var useTempTable U8 // Store SELECT results in intermediate table
@@ -102256,7 +104639,7 @@ func Xsqlite3Insert(tls *libc.TLS, pParse uintptr, pTabList uintptr, pSelect uin
var isView int32 // True if attempting to insert into a view
var pTrigger uintptr // List of triggers on pTab, if required
- // var tmask int32 at bp+88, 4
+ // var tmask int32 at bp+72, 4
// Invoke the coroutine to extract information from the SELECT
// and add it to a transient table srcTab. The code generated
@@ -102277,7 +104660,7 @@ func Xsqlite3Insert(tls *libc.TLS, pParse uintptr, pTabList uintptr, pSelect uin
var rc int32
// This is the case if the data for the INSERT is coming from a
// single-row VALUES clause
- // var sNC NameContext at bp+136, 56
+ // var sNC NameContext at bp+120, 56
var nIdx int32
var pNx uintptr
@@ -102288,12 +104671,12 @@ func Xsqlite3Insert(tls *libc.TLS, pParse uintptr, pTabList uintptr, pSelect uin
var pIpk uintptr
var addr11 int32
var pVTab uintptr
- // var isReplace int32 at bp+200, 4
+ // var isReplace int32 at bp+184, 4
// Set to true if constraints may cause a replace
var bUseSeek int32
nHidden = 0
- *(*int32)(unsafe.Pointer(bp + 192 /* iDataCur */)) = 0
- *(*int32)(unsafe.Pointer(bp + 196 /* iIdxCur */)) = 0
+ *(*int32)(unsafe.Pointer(bp + 176 /* iDataCur */)) = 0
+ *(*int32)(unsafe.Pointer(bp + 180 /* iIdxCur */)) = 0
ipkColumn = -1
srcTab = 0
addrInsTop = 0
@@ -102313,7 +104696,7 @@ func Xsqlite3Insert(tls *libc.TLS, pParse uintptr, pTabList uintptr, pSelect uin
goto insert_cleanup
__1:
;
- (*SelectDest)(unsafe.Pointer(bp + 96 /* &dest */)).FiSDParm = 0 // Suppress a harmless compiler warning
+ (*SelectDest)(unsafe.Pointer(bp + 80 /* &dest */)).FiSDParm = 0 // Suppress a harmless compiler warning
// If the Select object is really just a simple VALUES() list with a
// single row (the common case) then keep that one row of values
@@ -102350,7 +104733,7 @@ __4:
// Figure out if we have any triggers and if the table being
// inserted into is a view
- pTrigger = Xsqlite3TriggersExist(tls, pParse, pTab, TK_INSERT, uintptr(0), bp+88 /* &tmask */)
+ pTrigger = Xsqlite3TriggersExist(tls, pParse, pTab, TK_INSERT, uintptr(0), bp+72 /* &tmask */)
isView = (libc.Bool32((*Table)(unsafe.Pointer(pTab)).FpSelect != uintptr(0)))
// If pTab is really a view, make sure it has been initialized.
@@ -102363,7 +104746,7 @@ __5:
;
// Cannot insert into a read-only table.
- if !(Xsqlite3IsReadOnly(tls, pParse, pTab, *(*int32)(unsafe.Pointer(bp + 88 /* tmask */))) != 0) {
+ if !(Xsqlite3IsReadOnly(tls, pParse, pTab, *(*int32)(unsafe.Pointer(bp + 72 /* tmask */))) != 0) {
goto __6
}
goto insert_cleanup
@@ -102484,7 +104867,7 @@ __23:
goto __24
}
Xsqlite3ErrorMsg(tls, pParse,
- ts+13716, /* "cannot INSERT in..." */
+ ts+14169, /* "cannot INSERT in..." */
libc.VaList(bp, (*Column)(unsafe.Pointer((*Table)(unsafe.Pointer(pTab)).FaCol+uintptr(j)*32)).FzName))
goto insert_cleanup
__24:
@@ -102509,8 +104892,8 @@ __20:
bIdListInOrder = U8(0)
goto __27
__26:
- Xsqlite3ErrorMsg(tls, pParse, ts+13757, /* "table %S has no ..." */
- libc.VaList(bp+8, pTabList, 0, (*IdList_item)(unsafe.Pointer((*IdList)(unsafe.Pointer(pColumn)).Fa+uintptr(i)*16)).FzName))
+ Xsqlite3ErrorMsg(tls, pParse, ts+14210, /* "table %S has no ..." */
+ libc.VaList(bp+8, pTabList+8 /* &.a */, (*IdList_item)(unsafe.Pointer((*IdList)(unsafe.Pointer(pColumn)).Fa+uintptr(i)*16)).FzName))
(*Parse)(unsafe.Pointer(pParse)).FcheckSchema = U8(1)
goto insert_cleanup
__27:
@@ -102538,16 +104921,16 @@ __11:
regYield = libc.PreIncInt32(&(*Parse)(unsafe.Pointer(pParse)).FnMem, 1)
addrTop = (Xsqlite3VdbeCurrentAddr(tls, v) + 1)
Xsqlite3VdbeAddOp3(tls, v, OP_InitCoroutine, regYield, 0, addrTop)
- Xsqlite3SelectDestInit(tls, bp+96 /* &dest */, SRT_Coroutine, regYield)
- (*SelectDest)(unsafe.Pointer(bp + 96 /* &dest */)).FiSdst = func() int32 {
+ Xsqlite3SelectDestInit(tls, bp+80 /* &dest */, SRT_Coroutine, regYield)
+ (*SelectDest)(unsafe.Pointer(bp + 80 /* &dest */)).FiSdst = func() int32 {
if bIdListInOrder != 0 {
return regData
}
return 0
}()
- (*SelectDest)(unsafe.Pointer(bp + 96 /* &dest */)).FnSdst = int32((*Table)(unsafe.Pointer(pTab)).FnCol)
- rc = Xsqlite3Select(tls, pParse, pSelect, bp+96 /* &dest */)
- regFromSelect = (*SelectDest)(unsafe.Pointer(bp + 96 /* &dest */)).FiSdst
+ (*SelectDest)(unsafe.Pointer(bp + 80 /* &dest */)).FnSdst = int32((*Table)(unsafe.Pointer(pTab)).FnCol)
+ rc = Xsqlite3Select(tls, pParse, pSelect, bp+80 /* &dest */)
+ regFromSelect = (*SelectDest)(unsafe.Pointer(bp + 80 /* &dest */)).FiSdst
if !(((rc != 0) || ((*Sqlite3)(unsafe.Pointer(db)).FmallocFailed != 0)) || ((*Parse)(unsafe.Pointer(pParse)).FnErr != 0)) {
goto __30
}
@@ -102582,7 +104965,7 @@ __31:
regRec = Xsqlite3GetTempReg(tls, pParse)
regTempRowid = Xsqlite3GetTempReg(tls, pParse)
Xsqlite3VdbeAddOp2(tls, v, OP_OpenEphemeral, srcTab, nColumn)
- addrL = Xsqlite3VdbeAddOp1(tls, v, OP_Yield, (*SelectDest)(unsafe.Pointer(bp+96 /* &dest */)).FiSDParm)
+ addrL = Xsqlite3VdbeAddOp1(tls, v, OP_Yield, (*SelectDest)(unsafe.Pointer(bp+80 /* &dest */)).FiSDParm)
Xsqlite3VdbeAddOp3(tls, v, OP_MakeRecord, regFromSelect, nColumn, regRec)
Xsqlite3VdbeAddOp2(tls, v, OP_NewRowid, srcTab, regTempRowid)
Xsqlite3VdbeAddOp3(tls, v, OP_Insert, srcTab, regRec, regTempRowid)
@@ -102594,15 +104977,15 @@ __32:
;
goto __29
__28:
- libc.Xmemset(tls, bp+136 /* &sNC */, 0, uint64(unsafe.Sizeof(NameContext{})))
- (*NameContext)(unsafe.Pointer(bp + 136 /* &sNC */)).FpParse = pParse
+ libc.Xmemset(tls, bp+120 /* &sNC */, 0, uint64(unsafe.Sizeof(NameContext{})))
+ (*NameContext)(unsafe.Pointer(bp + 120 /* &sNC */)).FpParse = pParse
srcTab = -1
if !(pList != 0) {
goto __33
}
nColumn = (*ExprList)(unsafe.Pointer(pList)).FnExpr
- if !(Xsqlite3ResolveExprListNames(tls, bp+136 /* &sNC */, pList) != 0) {
+ if !(Xsqlite3ResolveExprListNames(tls, bp+120 /* &sNC */, pList) != 0) {
goto __35
}
goto insert_cleanup
@@ -102679,8 +105062,8 @@ __42:
goto __47
}
Xsqlite3ErrorMsg(tls, pParse,
- ts+13789, /* "table %S has %d ..." */
- libc.VaList(bp+32, pTabList, 0, (int32((*Table)(unsafe.Pointer(pTab)).FnCol)-nHidden), nColumn))
+ ts+14242, /* "table %S has %d ..." */
+ libc.VaList(bp+24, pTabList+8 /* &.a */, (int32((*Table)(unsafe.Pointer(pTab)).FnCol)-nHidden), nColumn))
goto insert_cleanup
__47:
;
@@ -102689,7 +105072,7 @@ __36:
if !((pColumn != uintptr(0)) && (nColumn != (*IdList)(unsafe.Pointer(pColumn)).FnId)) {
goto __48
}
- Xsqlite3ErrorMsg(tls, pParse, ts+13841 /* "%d values for %d..." */, libc.VaList(bp+64, nColumn, (*IdList)(unsafe.Pointer(pColumn)).FnId))
+ Xsqlite3ErrorMsg(tls, pParse, ts+14294 /* "%d values for %d..." */, libc.VaList(bp+48, nColumn, (*IdList)(unsafe.Pointer(pColumn)).FnId))
goto insert_cleanup
__48:
;
@@ -102711,7 +105094,7 @@ __49:
goto __50
}
nIdx = Xsqlite3OpenTableAndIndices(tls, pParse, pTab, OP_OpenWrite, uint8(0), -1, uintptr(0),
- bp+192 /* &iDataCur */, bp+196 /* &iIdxCur */)
+ bp+176 /* &iDataCur */, bp+180 /* &iIdxCur */)
aRegIdx = Xsqlite3DbMallocRawNN(tls, db, (uint64(uint64(unsafe.Sizeof(int32(0))) * (uint64(nIdx + 2)))))
if !(aRegIdx == uintptr(0)) {
goto __51
@@ -102745,15 +105128,15 @@ __50:
if !((*Table)(unsafe.Pointer(pTab)).FnModuleArg != 0) {
goto __56
}
- Xsqlite3ErrorMsg(tls, pParse, ts+13866, /* "UPSERT not imple..." */
- libc.VaList(bp+80, (*Table)(unsafe.Pointer(pTab)).FzName))
+ Xsqlite3ErrorMsg(tls, pParse, ts+14319, /* "UPSERT not imple..." */
+ libc.VaList(bp+64, (*Table)(unsafe.Pointer(pTab)).FzName))
goto insert_cleanup
__56:
;
if !((*Table)(unsafe.Pointer(pTab)).FpSelect != 0) {
goto __57
}
- Xsqlite3ErrorMsg(tls, pParse, ts+13912 /* "cannot UPSERT a ..." */, 0)
+ Xsqlite3ErrorMsg(tls, pParse, ts+14365 /* "cannot UPSERT a ..." */, 0)
goto insert_cleanup
__57:
;
@@ -102763,13 +105146,13 @@ __57:
goto insert_cleanup
__58:
;
- (*SrcItem)(unsafe.Pointer((pTabList + 8 /* &.a */))).FiCursor = *(*int32)(unsafe.Pointer(bp + 192 /* iDataCur */))
+ (*SrcItem)(unsafe.Pointer((pTabList + 8 /* &.a */))).FiCursor = *(*int32)(unsafe.Pointer(bp + 176 /* iDataCur */))
pNx = pUpsert
__59:
(*Upsert)(unsafe.Pointer(pNx)).FpUpsertSrc = pTabList
(*Upsert)(unsafe.Pointer(pNx)).FregData = regData
- (*Upsert)(unsafe.Pointer(pNx)).FiDataCur = *(*int32)(unsafe.Pointer(bp + 192 /* iDataCur */))
- (*Upsert)(unsafe.Pointer(pNx)).FiIdxCur = *(*int32)(unsafe.Pointer(bp + 196 /* iIdxCur */))
+ (*Upsert)(unsafe.Pointer(pNx)).FiDataCur = *(*int32)(unsafe.Pointer(bp + 176 /* iDataCur */))
+ (*Upsert)(unsafe.Pointer(pNx)).FiIdxCur = *(*int32)(unsafe.Pointer(bp + 180 /* iIdxCur */))
if !((*Upsert)(unsafe.Pointer(pNx)).FpUpsertTarget != 0) {
goto __62
}
@@ -102820,7 +105203,7 @@ __64:
// goto C
// D: ...
- addrInsTop = libc.AssignInt32(&addrCont, Xsqlite3VdbeAddOp1(tls, v, OP_Yield, (*SelectDest)(unsafe.Pointer(bp+96 /* &dest */)).FiSDParm))
+ addrInsTop = libc.AssignInt32(&addrCont, Xsqlite3VdbeAddOp1(tls, v, OP_Yield, (*SelectDest)(unsafe.Pointer(bp+80 /* &dest */)).FiSDParm))
if !(ipkColumn >= 0) {
goto __67
@@ -102882,7 +105265,7 @@ __73:
// triggers, the slots used for stored columns will be OP_Copy-ed
// to a second block of registers, so the register needs to be
// initialized to NULL to avoid an uninitialized register read
- if !((*(*int32)(unsafe.Pointer(bp + 88 /* tmask */)) & TRIGGER_BEFORE) != 0) {
+ if !((*(*int32)(unsafe.Pointer(bp + 72 /* tmask */)) & TRIGGER_BEFORE) != 0) {
goto __77
}
Xsqlite3VdbeAddOp1(tls, v, OP_SoftNull, iRegStore)
@@ -102980,7 +105363,7 @@ __70:
// Run the BEFORE and INSTEAD OF triggers, if there are any
endOfLoop = Xsqlite3VdbeMakeLabel(tls, pParse)
- if !((*(*int32)(unsafe.Pointer(bp + 88 /* tmask */)) & TRIGGER_BEFORE) != 0) {
+ if !((*(*int32)(unsafe.Pointer(bp + 72 /* tmask */)) & TRIGGER_BEFORE) != 0) {
goto __92
}
regCols = Xsqlite3GetTempRange(tls, pParse, (int32((*Table)(unsafe.Pointer(pTab)).FnCol) + 1))
@@ -103079,7 +105462,7 @@ __105:
if !((int32((*Expr)(unsafe.Pointer(pIpk)).Fop) == TK_NULL) && !((*Table)(unsafe.Pointer(pTab)).FnModuleArg != 0)) {
goto __107
}
- Xsqlite3VdbeAddOp3(tls, v, OP_NewRowid, *(*int32)(unsafe.Pointer(bp + 192 /* iDataCur */)), regRowid, regAutoinc)
+ Xsqlite3VdbeAddOp3(tls, v, OP_NewRowid, *(*int32)(unsafe.Pointer(bp + 176 /* iDataCur */)), regRowid, regAutoinc)
appendFlag = U8(1)
goto __108
__107:
@@ -103099,7 +105482,7 @@ __104:
goto __110
}
addr11 = Xsqlite3VdbeAddOp1(tls, v, OP_NotNull, regRowid)
- Xsqlite3VdbeAddOp3(tls, v, OP_NewRowid, *(*int32)(unsafe.Pointer(bp + 192 /* iDataCur */)), regRowid, regAutoinc)
+ Xsqlite3VdbeAddOp3(tls, v, OP_NewRowid, *(*int32)(unsafe.Pointer(bp + 176 /* iDataCur */)), regRowid, regAutoinc)
Xsqlite3VdbeJumpHere(tls, v, addr11)
goto __111
__110:
@@ -103118,7 +105501,7 @@ __101:
Xsqlite3VdbeAddOp2(tls, v, OP_Null, 0, regRowid)
goto __113
__112:
- Xsqlite3VdbeAddOp3(tls, v, OP_NewRowid, *(*int32)(unsafe.Pointer(bp + 192 /* iDataCur */)), regRowid, regAutoinc)
+ Xsqlite3VdbeAddOp3(tls, v, OP_NewRowid, *(*int32)(unsafe.Pointer(bp + 176 /* iDataCur */)), regRowid, regAutoinc)
appendFlag = U8(1)
__113:
;
@@ -103154,9 +105537,10 @@ __114:
Xsqlite3MayAbort(tls, pParse)
goto __116
__115:
- // True to use OPFLAG_SEEKRESULT
- Xsqlite3GenerateConstraintChecks(tls, pParse, pTab, aRegIdx, *(*int32)(unsafe.Pointer(bp + 192 /* iDataCur */)), *(*int32)(unsafe.Pointer(bp + 196 /* iIdxCur */)),
- regIns, 0, (uint8(libc.Bool32(ipkColumn >= 0))), uint8(onError), endOfLoop, bp+200 /* &isReplace */, uintptr(0), pUpsert)
+
+ *(*int32)(unsafe.Pointer(bp + 184 /* isReplace */)) = 0 // True to use OPFLAG_SEEKRESULT
+ Xsqlite3GenerateConstraintChecks(tls, pParse, pTab, aRegIdx, *(*int32)(unsafe.Pointer(bp + 176 /* iDataCur */)), *(*int32)(unsafe.Pointer(bp + 180 /* iIdxCur */)),
+ regIns, 0, (uint8(libc.Bool32(ipkColumn >= 0))), uint8(onError), endOfLoop, bp+184 /* &isReplace */, uintptr(0), pUpsert)
Xsqlite3FkCheck(tls, pParse, pTab, 0, regIns, uintptr(0), 0)
// Set the OPFLAG_USESEEKRESULT flag if either (a) there are no REPLACE
@@ -103167,8 +105551,8 @@ __115:
// cursor that is disturbed. And these instructions both clear the
// VdbeCursor.seekResult variable, disabling the OPFLAG_USESEEKRESULT
// functionality.
- bUseSeek = (libc.Bool32((*(*int32)(unsafe.Pointer(bp + 200 /* isReplace */)) == 0) || !(Xsqlite3VdbeHasSubProgram(tls, v) != 0)))
- Xsqlite3CompleteInsertion(tls, pParse, pTab, *(*int32)(unsafe.Pointer(bp + 192 /* iDataCur */)), *(*int32)(unsafe.Pointer(bp + 196 /* iIdxCur */)),
+ bUseSeek = (libc.Bool32((*(*int32)(unsafe.Pointer(bp + 184 /* isReplace */)) == 0) || !(Xsqlite3VdbeHasSubProgram(tls, v) != 0)))
+ Xsqlite3CompleteInsertion(tls, pParse, pTab, *(*int32)(unsafe.Pointer(bp + 176 /* iDataCur */)), *(*int32)(unsafe.Pointer(bp + 180 /* iIdxCur */)),
regIns, aRegIdx, 0, int32(appendFlag), bUseSeek)
__116:
;
@@ -103232,7 +105616,7 @@ __122:
}
Xsqlite3VdbeAddOp2(tls, v, OP_ChngCntRow, regRowCount, 1)
Xsqlite3VdbeSetNumCols(tls, v, 1)
- Xsqlite3VdbeSetColName(tls, v, 0, COLNAME_NAME, ts+13933 /* "rows inserted" */, uintptr(0))
+ Xsqlite3VdbeSetColName(tls, v, 0, COLNAME_NAME, ts+14386 /* "rows inserted" */, uintptr(0))
__123:
;
@@ -103256,7 +105640,7 @@ insert_cleanup:
// Set bit 0x01 of pWalker->eCode if pWalker->eCode to 0 and if this
// expression node references any of the
// columns that are being modifed by an UPDATE statement.
-func checkConstraintExprNode(tls *libc.TLS, pWalker uintptr, pExpr uintptr) int32 { /* sqlite3.c:123531:12: */
+func checkConstraintExprNode(tls *libc.TLS, pWalker uintptr, pExpr uintptr) int32 { /* sqlite3.c:124428:12: */
if int32((*Expr)(unsafe.Pointer(pExpr)).Fop) == TK_COLUMN {
if int32((*Expr)(unsafe.Pointer(pExpr)).FiColumn) >= 0 {
@@ -103283,7 +105667,7 @@ func checkConstraintExprNode(tls *libc.TLS, pWalker uintptr, pExpr uintptr) int3
// The operation of this routine is the same - return true if an only if
// the expression uses one or more of columns identified by the second and
// third arguments.
-func Xsqlite3ExprReferencesUpdatedColumn(tls *libc.TLS, pExpr uintptr, aiChng uintptr, chngRowid int32) int32 { /* sqlite3.c:123560:20: */
+func Xsqlite3ExprReferencesUpdatedColumn(tls *libc.TLS, pExpr uintptr, aiChng uintptr, chngRowid int32) int32 { /* sqlite3.c:124457:20: */
bp := tls.Alloc(48)
defer tls.Free(48)
@@ -103314,10 +105698,10 @@ func Xsqlite3ExprReferencesUpdatedColumn(tls *libc.TLS, pExpr uintptr, aiChng ui
// of a table in either Index.pNext order, or in some other order established
// by an array of IndexListTerm objects.
type IndexListTerm1 = struct {
- Fp uintptr
- Fix int32
- _ [4]byte
-} /* sqlite3.c:123593:9 */
+ Fp uintptr
+ Fix int32
+ F__ccgo_pad1 [4]byte
+} /* sqlite3.c:124490:9 */
// The sqlite3GenerateConstraintChecks() routine usually wants to visit
// the indexes of a table in the order provided in the Table->pIndex list.
@@ -103328,20 +105712,20 @@ type IndexListTerm1 = struct {
// The IndexIterator object is used to walk through all of the indexes
// of a table in either Index.pNext order, or in some other order established
// by an array of IndexListTerm objects.
-type IndexListTerm = IndexListTerm1 /* sqlite3.c:123593:30 */
+type IndexListTerm = IndexListTerm1 /* sqlite3.c:124490:30 */
type IndexIterator1 = struct {
FeType int32
Fi int32
Fu struct {
- Flx struct{ FpIdx uintptr }
- _ [8]byte
+ Flx struct{ FpIdx uintptr }
+ F__ccgo_pad1 [8]byte
}
-} /* sqlite3.c:123594:9 */
+} /* sqlite3.c:124491:9 */
-type IndexIterator = IndexIterator1 /* sqlite3.c:123594:30 */
+type IndexIterator = IndexIterator1 /* sqlite3.c:124491:30 */
// Return the first index on the list
-func indexIteratorFirst(tls *libc.TLS, pIter uintptr, pIx uintptr) uintptr { /* sqlite3.c:123618:14: */
+func indexIteratorFirst(tls *libc.TLS, pIter uintptr, pIx uintptr) uintptr { /* sqlite3.c:124515:14: */
if (*IndexIterator)(unsafe.Pointer(pIter)).FeType != 0 {
*(*int32)(unsafe.Pointer(pIx)) = (*IndexListTerm)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer((pIter + 8 /* &.u */ /* &.ax */) + 8 /* &.aIdx */)))).Fix
@@ -103354,7 +105738,7 @@ func indexIteratorFirst(tls *libc.TLS, pIter uintptr, pIx uintptr) uintptr { /*
}
// Return the next index from the list. Return NULL when out of indexes
-func indexIteratorNext(tls *libc.TLS, pIter uintptr, pIx uintptr) uintptr { /* sqlite3.c:123630:14: */
+func indexIteratorNext(tls *libc.TLS, pIter uintptr, pIx uintptr) uintptr { /* sqlite3.c:124527:14: */
if (*IndexIterator)(unsafe.Pointer(pIter)).FeType != 0 {
var i int32 = libc.PreIncInt32(&(*IndexIterator)(unsafe.Pointer(pIter)).Fi, 1)
if i >= *(*int32)(unsafe.Pointer((pIter + 8 /* &.u */ /* &.ax */) /* &.nIdx */)) {
@@ -103460,7 +105844,7 @@ func indexIteratorNext(tls *libc.TLS, pIter uintptr, pIx uintptr) uintptr { /* s
// Or if overrideError==OE_Default, then the pParse->onError parameter
// is used. Or if pParse->onError==OE_Default then the onError value
// for the constraint is used.
-func Xsqlite3GenerateConstraintChecks(tls *libc.TLS, pParse uintptr, pTab uintptr, aRegIdx uintptr, iDataCur int32, iIdxCur int32, regNewData int32, regOldData int32, pkChng U8, overrideError U8, ignoreDest int32, pbMayReplace uintptr, aiChng uintptr, pUpsert uintptr) { /* sqlite3.c:123737:21: */
+func Xsqlite3GenerateConstraintChecks(tls *libc.TLS, pParse uintptr, pTab uintptr, aRegIdx uintptr, iDataCur int32, iIdxCur int32, regNewData int32, regOldData int32, pkChng U8, overrideError U8, ignoreDest int32, pbMayReplace uintptr, aiChng uintptr, pUpsert uintptr) { /* sqlite3.c:124634:21: */
bp := tls.Alloc(72)
defer tls.Free(72)
@@ -103576,7 +105960,7 @@ func Xsqlite3GenerateConstraintChecks(tls *libc.TLS, pParse uintptr, pTab uintpt
fallthrough
case OE_Fail:
{
- var zMsg uintptr = Xsqlite3MPrintf(tls, db, ts+10332 /* "%s.%s" */, libc.VaList(bp, (*Table)(unsafe.Pointer(pTab)).FzName,
+ var zMsg uintptr = Xsqlite3MPrintf(tls, db, ts+10785 /* "%s.%s" */, libc.VaList(bp, (*Table)(unsafe.Pointer(pTab)).FzName,
(*Column)(unsafe.Pointer(pCol)).FzName))
Xsqlite3VdbeAddOp3(tls, v, OP_HaltIfNull, (SQLITE_CONSTRAINT | (int32(5) << 8)),
onError, iReg)
@@ -104126,7 +106510,7 @@ func Xsqlite3GenerateConstraintChecks(tls *libc.TLS, pParse uintptr, pTab uintpt
var addrJump int32 = (Xsqlite3VdbeCurrentAddr(tls, v) + int32((*Index)(unsafe.Pointer(pPk)).FnKeyCol))
var op int32 = OP_Ne
var regCmp int32 = func() int32 {
- if (int32(*(*uint16)(unsafe.Pointer((pIdx) + 100 /* &.idxType */)) >> 14 & 0x3)) == SQLITE_IDXTYPE_PRIMARYKEY {
+ if (int32(*(*uint16)(unsafe.Pointer((pIdx) + 100 /* &.idxType */)) & 0xc000 >> 14)) == SQLITE_IDXTYPE_PRIMARYKEY {
return regIdx
}
return regR
@@ -104316,7 +106700,7 @@ func Xsqlite3GenerateConstraintChecks(tls *libc.TLS, pParse uintptr, pTab uintpt
// number is iCur, and register regData contains the new record for the
// PK index. This function adds code to invoke the pre-update hook,
// if one is registered.
-func codeWithoutRowidPreupdate(tls *libc.TLS, pParse uintptr, pTab uintptr, iCur int32, regData int32) { /* sqlite3.c:124590:13: */
+func codeWithoutRowidPreupdate(tls *libc.TLS, pParse uintptr, pTab uintptr, iCur int32, regData int32) { /* sqlite3.c:125487:13: */
var v uintptr = (*Parse)(unsafe.Pointer(pParse)).FpVdbe
var r int32 = Xsqlite3GetTempReg(tls, pParse)
@@ -104333,7 +106717,7 @@ func codeWithoutRowidPreupdate(tls *libc.TLS, pParse uintptr, pTab uintptr, iCur
//
// The arguments to this routine should be the same as the first six
// arguments to sqlite3GenerateConstraintChecks.
-func Xsqlite3CompleteInsertion(tls *libc.TLS, pParse uintptr, pTab uintptr, iDataCur int32, iIdxCur int32, regNewData int32, aRegIdx uintptr, update_flags int32, appendBias int32, useSeekResult int32) { /* sqlite3.c:124618:21: */
+func Xsqlite3CompleteInsertion(tls *libc.TLS, pParse uintptr, pTab uintptr, iDataCur int32, iIdxCur int32, regNewData int32, aRegIdx uintptr, update_flags int32, appendBias int32, useSeekResult int32) { /* sqlite3.c:125515:21: */
var v uintptr // Prepared statements under construction
var pIdx uintptr // An index being inserted or updated
var pik_flags U8 // flag values passed to the btree insert
@@ -104364,7 +106748,7 @@ __1:
}
return uint8(0)
}()
- if ((int32(*(*uint16)(unsafe.Pointer((pIdx) + 100 /* &.idxType */)) >> 14 & 0x3)) == SQLITE_IDXTYPE_PRIMARYKEY) && !(((*Table)(unsafe.Pointer((pTab))).FtabFlags & U32(TF_WithoutRowid)) == U32(0)) {
+ if ((int32(*(*uint16)(unsafe.Pointer((pIdx) + 100 /* &.idxType */)) & 0xc000 >> 14)) == SQLITE_IDXTYPE_PRIMARYKEY) && !(((*Table)(unsafe.Pointer((pTab))).FtabFlags & U32(TF_WithoutRowid)) == U32(0)) {
pik_flags = U8(int32(pik_flags) | (OPFLAG_NCHANGE))
pik_flags = U8(int32(pik_flags) | (update_flags & OPFLAG_SAVEPOSITION))
@@ -104375,7 +106759,7 @@ __1:
Xsqlite3VdbeAddOp4Int(tls, v, OP_IdxInsert, (iIdxCur + i), *(*int32)(unsafe.Pointer(aRegIdx + uintptr(i)*4)),
(*(*int32)(unsafe.Pointer(aRegIdx + uintptr(i)*4)) + 1),
func() int32 {
- if (uint32(int32(*(*uint16)(unsafe.Pointer(pIdx + 100 /* &.uniqNotNull */)) >> 12 & 0x1))) != 0 {
+ if (uint32(int32(*(*uint16)(unsafe.Pointer(pIdx + 100 /* &.uniqNotNull */)) & 0x1000 >> 12))) != 0 {
return int32((*Index)(unsafe.Pointer(pIdx)).FnKeyCol)
}
return int32((*Index)(unsafe.Pointer(pIdx)).FnColumn)
@@ -104437,7 +106821,7 @@ __3:
//
// If pTab is a virtual table, then this routine is a no-op and the
// *piDataCur and *piIdxCur values are left uninitialized.
-func Xsqlite3OpenTableAndIndices(tls *libc.TLS, pParse uintptr, pTab uintptr, op int32, p5 U8, iBase int32, aToOpen uintptr, piDataCur uintptr, piIdxCur uintptr) int32 { /* sqlite3.c:124707:20: */
+func Xsqlite3OpenTableAndIndices(tls *libc.TLS, pParse uintptr, pTab uintptr, op int32, p5 U8, iBase int32, aToOpen uintptr, piDataCur uintptr, piIdxCur uintptr) int32 { /* sqlite3.c:125604:20: */
var i int32
var iDb int32
var iDataCur int32
@@ -104477,7 +106861,7 @@ __1:
{
var iIdxCur int32 = libc.PostIncInt32(&iBase, 1)
- if ((int32(*(*uint16)(unsafe.Pointer((pIdx) + 100 /* &.idxType */)) >> 14 & 0x3)) == SQLITE_IDXTYPE_PRIMARYKEY) && !(((*Table)(unsafe.Pointer((pTab))).FtabFlags & U32(TF_WithoutRowid)) == U32(0)) {
+ if ((int32(*(*uint16)(unsafe.Pointer((pIdx) + 100 /* &.idxType */)) & 0xc000 >> 14)) == SQLITE_IDXTYPE_PRIMARYKEY) && !(((*Table)(unsafe.Pointer((pTab))).FtabFlags & U32(TF_WithoutRowid)) == U32(0)) {
if piDataCur != 0 {
*(*int32)(unsafe.Pointer(piDataCur)) = iIdxCur
}
@@ -104514,7 +106898,7 @@ __3:
// * The same onError processing (OE_Abort, OE_Ignore, etc)
// * The same collating sequence on each column
// * The index has the exact same WHERE clause
-func xferCompatibleIndex(tls *libc.TLS, pDest uintptr, pSrc uintptr) int32 { /* sqlite3.c:124785:12: */
+func xferCompatibleIndex(tls *libc.TLS, pDest uintptr, pSrc uintptr) int32 { /* sqlite3.c:125682:12: */
var i int32
if (int32((*Index)(unsafe.Pointer(pDest)).FnKeyCol) != int32((*Index)(unsafe.Pointer(pSrc)).FnKeyCol)) || (int32((*Index)(unsafe.Pointer(pDest)).FnColumn) != int32((*Index)(unsafe.Pointer(pSrc)).FnColumn)) {
@@ -104572,7 +106956,7 @@ func xferCompatibleIndex(tls *libc.TLS, pDest uintptr, pSrc uintptr) int32 { /*
// is no chance that the xfer optimization can be applied.
//
// This optimization is particularly useful at making VACUUM run faster.
-func xferOptimization(tls *libc.TLS, pParse uintptr, pDest uintptr, pSelect uintptr, onError int32, iDbDest int32) int32 { /* sqlite3.c:124846:12: */
+func xferOptimization(tls *libc.TLS, pParse uintptr, pDest uintptr, pSelect uintptr, onError int32, iDbDest int32) int32 { /* sqlite3.c:125743:12: */
var db uintptr = (*Parse)(unsafe.Pointer(pParse)).Fdb
var pEList uintptr // The result set of the SELECT
var pSrc uintptr // The table in the FROM clause of SELECT
@@ -104890,14 +107274,14 @@ func xferOptimization(tls *libc.TLS, pParse uintptr, pDest uintptr, pSelect uint
Xsqlite3VdbeAddOp1(tls, v, OP_SeekEnd, iDest)
Xsqlite3VdbeAddOp2(tls, v, OP_RowCell, iDest, iSrc)
}
- } else if !(((*Table)(unsafe.Pointer((pSrc))).FtabFlags & U32(TF_WithoutRowid)) == U32(0)) && ((int32(*(*uint16)(unsafe.Pointer(pDestIdx + 100 /* &.idxType */)) >> 14 & 0x3)) == SQLITE_IDXTYPE_PRIMARYKEY) {
+ } else if !(((*Table)(unsafe.Pointer((pSrc))).FtabFlags & U32(TF_WithoutRowid)) == U32(0)) && ((int32(*(*uint16)(unsafe.Pointer(pDestIdx + 100 /* &.idxType */)) & 0xc000 >> 14)) == SQLITE_IDXTYPE_PRIMARYKEY) {
idxInsFlags = U8(int32(idxInsFlags) | (OPFLAG_NCHANGE))
}
if int32(idxInsFlags) != (OPFLAG_USESEEKRESULT | OPFLAG_PREFORMAT) {
Xsqlite3VdbeAddOp3(tls, v, OP_RowData, iSrc, regData, 1)
if ((((*Sqlite3)(unsafe.Pointer(db)).FmDbFlags & U32(DBFLAG_Vacuum)) == U32(0)) &&
!(((*Table)(unsafe.Pointer((pDest))).FtabFlags & U32(TF_WithoutRowid)) == U32(0))) &&
- ((int32(*(*uint16)(unsafe.Pointer((pDestIdx) + 100 /* &.idxType */)) >> 14 & 0x3)) == SQLITE_IDXTYPE_PRIMARYKEY) {
+ ((int32(*(*uint16)(unsafe.Pointer((pDestIdx) + 100 /* &.idxType */)) & 0xc000 >> 14)) == SQLITE_IDXTYPE_PRIMARYKEY) {
codeWithoutRowidPreupdate(tls, pParse, pDest, iDest, regData)
}
}
@@ -104952,7 +107336,7 @@ func xferOptimization(tls *libc.TLS, pParse uintptr, pDest uintptr, pSelect uint
// the xCallback() function is called. pArg becomes the first
// argument to xCallback(). If xCallback=NULL then no callback
// is invoked, even for queries.
-func Xsqlite3_exec(tls *libc.TLS, db uintptr, zSql uintptr, xCallback Sqlite3_callback, pArg uintptr, pzErrMsg uintptr) int32 { /* sqlite3.c:125256:16: */
+func Xsqlite3_exec(tls *libc.TLS, db uintptr, zSql uintptr, xCallback Sqlite3_callback, pArg uintptr, pzErrMsg uintptr) int32 { /* sqlite3.c:126153:16: */
bp := tls.Alloc(16)
defer tls.Free(16)
@@ -104973,20 +107357,20 @@ func Xsqlite3_exec(tls *libc.TLS, db uintptr, zSql uintptr, xCallback Sqlite3_ca
if !(!(Xsqlite3SafetyCheckOk(tls, db) != 0)) {
goto __1
}
- return Xsqlite3MisuseError(tls, 125269)
+ return Xsqlite3MisuseError(tls, 126166)
__1:
;
if !(zSql == uintptr(0)) {
goto __2
}
- zSql = ts + 703 /* "" */
+ zSql = ts + 755 /* "" */
__2:
;
Xsqlite3_mutex_enter(tls, (*Sqlite3)(unsafe.Pointer(db)).Fmutex)
Xsqlite3Error(tls, db, SQLITE_OK)
__3:
- if !((rc == SQLITE_OK) && (*(*int8)(unsafe.Pointer(zSql)) != 0)) {
+ if !((rc == SQLITE_OK) && (*(*uint8)(unsafe.Pointer(zSql)) != 0)) {
goto __4
}
nCol = 0
@@ -105079,7 +107463,9 @@ __18:
*(*uintptr)(unsafe.Pointer(azVals + uintptr(i)*8)) = uintptr(0)
__15:
;
- if !((*(*func(*libc.TLS, uintptr, int32, uintptr, uintptr) int32)(unsafe.Pointer(&xCallback)))(tls, pArg, nCol, azVals, azCols) != 0) {
+ if !((*struct {
+ f func(*libc.TLS, uintptr, int32, uintptr, uintptr) int32
+ })(unsafe.Pointer(&struct{ uintptr }{xCallback})).f(tls, pArg, nCol, azVals, azCols) != 0) {
goto __20
}
// EVIDENCE-OF: R-38229-40159 If the callback function to
@@ -105102,7 +107488,7 @@ __9:
*(*uintptr)(unsafe.Pointer(bp /* pStmt */)) = uintptr(0)
zSql = *(*uintptr)(unsafe.Pointer(bp + 8 /* zLeftover */))
__22:
- if !((int32(Xsqlite3CtypeMap[uint8(*(*int8)(unsafe.Pointer(zSql)))]) & 0x01) != 0) {
+ if !((int32(Xsqlite3CtypeMap[uint8(*(*uint8)(unsafe.Pointer(zSql)))]) & 0x01) != 0) {
goto __23
}
zSql++
@@ -105160,7 +107546,7 @@ __26:
// This is the function signature used for all extension entry points. It
// is also defined in the file "loadext.c".
-type Sqlite3_loadext_entry = uintptr /* sqlite3.c:125736:13 */
+type Sqlite3_loadext_entry = uintptr /* sqlite3.c:126633:13 */
// The following macros redefine the API routines so that they are
// redirected through the global sqlite3_api structure.
@@ -105482,7 +107868,7 @@ var sqlite3Apis = Sqlite3_api_routines{
Fdatabase_file_object: 0,
// Version 3.34.0 and later
Ftxn_state: 0,
-} /* sqlite3.c:126170:35 */
+} /* sqlite3.c:127067:35 */
// True if x is the directory separator character
@@ -105496,24 +107882,37 @@ var sqlite3Apis = Sqlite3_api_routines{
// If an error occurs and pzErrMsg is not 0, then fill *pzErrMsg with
// error message text. The calling function should free this memory
// by calling sqlite3DbFree(db, ).
-func sqlite3LoadExtension(tls *libc.TLS, db uintptr, zFile uintptr, zProc uintptr, pzErrMsg uintptr) int32 { /* sqlite3.c:126542:12: */
- bp := tls.Alloc(56)
- defer tls.Free(56)
+func sqlite3LoadExtension(tls *libc.TLS, db uintptr, zFile uintptr, zProc uintptr, pzErrMsg uintptr) int32 { /* sqlite3.c:127439:12: */
+ bp := tls.Alloc(64)
+ defer tls.Free(64)
- var pVfs uintptr = (*Sqlite3)(unsafe.Pointer(db)).FpVfs
+ var pVfs uintptr
var handle uintptr
var xInit Sqlite3_loadext_entry
- *(*uintptr)(unsafe.Pointer(bp + 48 /* zErrmsg */)) = uintptr(0)
+ // var zErrmsg uintptr at bp+56, 8
+
var zEntry uintptr
- var zAltEntry uintptr = uintptr(0)
+ var zAltEntry uintptr
var aHandle uintptr
- var nMsg U64 = (U64(300 + Xsqlite3Strlen30(tls, zFile)))
+ var nMsg U64
var ii int32
var rc int32
+ var zAltFile uintptr
+ var iFile int32
+ var iEntry int32
+ var c int32
+ var ncFile int32
+ pVfs = (*Sqlite3)(unsafe.Pointer(db)).FpVfs
+ *(*uintptr)(unsafe.Pointer(bp + 56 /* zErrmsg */)) = uintptr(0)
+ zAltEntry = uintptr(0)
+ nMsg = U64(libc.Xstrlen(tls, zFile))
- if pzErrMsg != 0 {
- *(*uintptr)(unsafe.Pointer(pzErrMsg)) = uintptr(0)
+ if !(pzErrMsg != 0) {
+ goto __1
}
+ *(*uintptr)(unsafe.Pointer(pzErrMsg)) = uintptr(0)
+__1:
+ ;
// Ticket #1863. To avoid a creating security problems for older
// applications that relink against newer versions of SQLite, the
@@ -105521,39 +107920,64 @@ func sqlite3LoadExtension(tls *libc.TLS, db uintptr, zFile uintptr, zProc uintpt
// must call either sqlite3_enable_load_extension(db) or
// sqlite3_db_config(db, SQLITE_DBCONFIG_ENABLE_LOAD_EXTENSION, 1, 0)
// to turn on extension loading.
- if ((*Sqlite3)(unsafe.Pointer(db)).Fflags & uint64(SQLITE_LoadExtension)) == uint64(0) {
- if pzErrMsg != 0 {
- *(*uintptr)(unsafe.Pointer(pzErrMsg)) = Xsqlite3_mprintf(tls, ts+10371 /* "not authorized" */, 0)
- }
- return SQLITE_ERROR
+ if !(((*Sqlite3)(unsafe.Pointer(db)).Fflags & uint64(SQLITE_LoadExtension)) == uint64(0)) {
+ goto __2
+ }
+ if !(pzErrMsg != 0) {
+ goto __3
}
+ *(*uintptr)(unsafe.Pointer(pzErrMsg)) = Xsqlite3_mprintf(tls, ts+10824 /* "not authorized" */, 0)
+__3:
+ ;
+ return SQLITE_ERROR
+__2:
+ ;
if zProc != 0 {
zEntry = zProc
} else {
- zEntry = ts + 13947 /* "sqlite3_extensio..." */
+ zEntry = ts + 14400 /* "sqlite3_extensio..." */
}
+ // tag-20210611-1. Some dlopen() implementations will segfault if given
+ // an oversize filename. Most filesystems have a pathname limit of 4K,
+ // so limit the extension filename length to about twice that.
+ // https://sqlite.org/forum/forumpost/08a0d6d9bf
+ if !(nMsg > uint64(FILENAME_MAX)) {
+ goto __4
+ }
+ goto extension_not_found
+__4:
+ ;
+
handle = Xsqlite3OsDlOpen(tls, pVfs, zFile)
- for ii = 0; (ii < (int32(uint64(unsafe.Sizeof(azEndings)) / uint64(unsafe.Sizeof(uintptr(0)))))) && (handle == uintptr(0)); ii++ {
- var zAltFile uintptr = Xsqlite3_mprintf(tls, ts+10332 /* "%s.%s" */, libc.VaList(bp, zFile, azEndings[ii]))
- if zAltFile == uintptr(0) {
- return SQLITE_NOMEM
- }
- handle = Xsqlite3OsDlOpen(tls, pVfs, zAltFile)
- Xsqlite3_free(tls, zAltFile)
+ ii = 0
+__5:
+ if !((ii < (int32(uint64(unsafe.Sizeof(azEndings)) / uint64(unsafe.Sizeof(uintptr(0)))))) && (handle == uintptr(0))) {
+ goto __7
}
- if handle == uintptr(0) {
- if pzErrMsg != 0 {
- *(*uintptr)(unsafe.Pointer(pzErrMsg)) = libc.AssignPtrUintptr(bp+48 /* zErrmsg */, Xsqlite3_malloc64(tls, nMsg))
- if *(*uintptr)(unsafe.Pointer(bp + 48 /* zErrmsg */)) != 0 {
- Xsqlite3_snprintf(tls, int32(nMsg), *(*uintptr)(unsafe.Pointer(bp + 48 /* zErrmsg */)),
- ts+13970 /* "unable to open s..." */, libc.VaList(bp+16, zFile))
- Xsqlite3OsDlError(tls, pVfs, (int32(nMsg - uint64(1))), *(*uintptr)(unsafe.Pointer(bp + 48 /* zErrmsg */)))
- }
- }
- return SQLITE_ERROR
+ zAltFile = Xsqlite3_mprintf(tls, ts+10785 /* "%s.%s" */, libc.VaList(bp, zFile, azEndings[ii]))
+ if !(zAltFile == uintptr(0)) {
+ goto __8
+ }
+ return SQLITE_NOMEM
+__8:
+ ;
+ handle = Xsqlite3OsDlOpen(tls, pVfs, zAltFile)
+ Xsqlite3_free(tls, zAltFile)
+ goto __6
+__6:
+ ii++
+ goto __5
+ goto __7
+__7:
+ ;
+ if !(handle == uintptr(0)) {
+ goto __9
}
+ goto extension_not_found
+__9:
+ ;
xInit = Xsqlite3OsDlSym(tls, pVfs, handle, zEntry)
// If no entry point was specified and the default legacy
@@ -105566,80 +107990,155 @@ func sqlite3LoadExtension(tls *libc.TLS, db uintptr, zFile uintptr, zProc uintpt
//
// /usr/local/lib/libExample5.4.3.so ==> sqlite3_example_init
// C:/lib/mathfuncs.dll ==> sqlite3_mathfuncs_init
- if (xInit == uintptr(0)) && (zProc == uintptr(0)) {
- var iFile int32
- var iEntry int32
- var c int32
- var ncFile int32 = Xsqlite3Strlen30(tls, zFile)
- zAltEntry = Xsqlite3_malloc64(tls, (uint64(ncFile + 30)))
- if zAltEntry == uintptr(0) {
- Xsqlite3OsDlClose(tls, pVfs, handle)
- return SQLITE_NOMEM
- }
- libc.Xmemcpy(tls, zAltEntry, ts+14005 /* "sqlite3_" */, uint64(8))
- for iFile = (ncFile - 1); (iFile >= 0) && !((int32(*(*int8)(unsafe.Pointer(zFile + uintptr(iFile))))) == '/'); iFile-- {
- }
- iFile++
- if Xsqlite3_strnicmp(tls, (zFile+uintptr(iFile)), ts+14014 /* "lib" */, 3) == 0 {
- iFile = iFile + (3)
- }
- for iEntry = 8; ((libc.AssignInt32(&c, int32(*(*int8)(unsafe.Pointer(zFile + uintptr(iFile)))))) != 0) && (c != '.'); iFile++ {
- if (int32(Xsqlite3CtypeMap[uint8(c)]) & 0x02) != 0 {
- *(*int8)(unsafe.Pointer(zAltEntry + uintptr(libc.PostIncInt32(&iEntry, 1)))) = int8(Xsqlite3UpperToLower[uint32(c)])
- }
- }
- libc.Xmemcpy(tls, (zAltEntry + uintptr(iEntry)), ts+14018 /* "_init" */, uint64(6))
- zEntry = zAltEntry
- xInit = Xsqlite3OsDlSym(tls, pVfs, handle, zEntry)
+ if !((xInit == uintptr(0)) && (zProc == uintptr(0))) {
+ goto __10
}
- if xInit == uintptr(0) {
- if pzErrMsg != 0 {
- nMsg = nMsg + (U64(Xsqlite3Strlen30(tls, zEntry)))
- *(*uintptr)(unsafe.Pointer(pzErrMsg)) = libc.AssignPtrUintptr(bp+48 /* zErrmsg */, Xsqlite3_malloc64(tls, nMsg))
- if *(*uintptr)(unsafe.Pointer(bp + 48 /* zErrmsg */)) != 0 {
- Xsqlite3_snprintf(tls, int32(nMsg), *(*uintptr)(unsafe.Pointer(bp + 48 /* zErrmsg */)),
- ts+14024 /* "no entry point [..." */, libc.VaList(bp+24, zEntry, zFile))
- Xsqlite3OsDlError(tls, pVfs, (int32(nMsg - uint64(1))), *(*uintptr)(unsafe.Pointer(bp + 48 /* zErrmsg */)))
- }
- }
- Xsqlite3OsDlClose(tls, pVfs, handle)
- Xsqlite3_free(tls, zAltEntry)
- return SQLITE_ERROR
+ ncFile = Xsqlite3Strlen30(tls, zFile)
+ zAltEntry = Xsqlite3_malloc64(tls, (uint64(ncFile + 30)))
+ if !(zAltEntry == uintptr(0)) {
+ goto __11
}
+ Xsqlite3OsDlClose(tls, pVfs, handle)
+ return SQLITE_NOMEM
+__11:
+ ;
+ libc.Xmemcpy(tls, zAltEntry, ts+14423 /* "sqlite3_" */, uint64(8))
+ iFile = (ncFile - 1)
+__12:
+ if !((iFile >= 0) && !((int32(*(*uint8)(unsafe.Pointer(zFile + uintptr(iFile))))) == '/')) {
+ goto __14
+ }
+ goto __13
+__13:
+ iFile--
+ goto __12
+ goto __14
+__14:
+ ;
+ iFile++
+ if !(Xsqlite3_strnicmp(tls, (zFile+uintptr(iFile)), ts+14432 /* "lib" */, 3) == 0) {
+ goto __15
+ }
+ iFile = iFile + (3)
+__15:
+ ;
+ iEntry = 8
+__16:
+ if !(((libc.AssignInt32(&c, int32(*(*uint8)(unsafe.Pointer(zFile + uintptr(iFile)))))) != 0) && (c != '.')) {
+ goto __18
+ }
+ if !((int32(Xsqlite3CtypeMap[uint8(c)]) & 0x02) != 0) {
+ goto __19
+ }
+ *(*uint8)(unsafe.Pointer(zAltEntry + uintptr(libc.PostIncInt32(&iEntry, 1)))) = uint8(Xsqlite3UpperToLower[uint32(c)])
+__19:
+ ;
+ goto __17
+__17:
+ iFile++
+ goto __16
+ goto __18
+__18:
+ ;
+ libc.Xmemcpy(tls, (zAltEntry + uintptr(iEntry)), ts+14436 /* "_init" */, uint64(6))
+ zEntry = zAltEntry
+ xInit = Xsqlite3OsDlSym(tls, pVfs, handle, zEntry)
+__10:
+ ;
+ if !(xInit == uintptr(0)) {
+ goto __20
+ }
+ if !(pzErrMsg != 0) {
+ goto __21
+ }
+ nMsg = nMsg + (U64(libc.Xstrlen(tls, zEntry) + uint64(300)))
+ *(*uintptr)(unsafe.Pointer(pzErrMsg)) = libc.AssignPtrUintptr(bp+56 /* zErrmsg */, Xsqlite3_malloc64(tls, nMsg))
+ if !(*(*uintptr)(unsafe.Pointer(bp + 56 /* zErrmsg */)) != 0) {
+ goto __22
+ }
+ // zErrmsg would be NULL if not so
+ Xsqlite3_snprintf(tls, int32(nMsg), *(*uintptr)(unsafe.Pointer(bp + 56 /* zErrmsg */)),
+ ts+14442 /* "no entry point [..." */, libc.VaList(bp+16, zEntry, zFile))
+ Xsqlite3OsDlError(tls, pVfs, (int32(nMsg - uint64(1))), *(*uintptr)(unsafe.Pointer(bp + 56 /* zErrmsg */)))
+__22:
+ ;
+__21:
+ ;
+ Xsqlite3OsDlClose(tls, pVfs, handle)
Xsqlite3_free(tls, zAltEntry)
- rc = (*(*func(*libc.TLS, uintptr, uintptr, uintptr) int32)(unsafe.Pointer(&xInit)))(tls, db, bp+48 /* &zErrmsg */, uintptr(unsafe.Pointer(&sqlite3Apis)))
- if rc != 0 {
- if rc == (SQLITE_OK | (int32(1) << 8)) {
- return SQLITE_OK
- }
- if pzErrMsg != 0 {
- *(*uintptr)(unsafe.Pointer(pzErrMsg)) = Xsqlite3_mprintf(tls, ts+14067 /* "error during ini..." */, libc.VaList(bp+40, *(*uintptr)(unsafe.Pointer(bp + 48 /* zErrmsg */))))
- }
- Xsqlite3_free(tls, *(*uintptr)(unsafe.Pointer(bp + 48 /* zErrmsg */)))
- Xsqlite3OsDlClose(tls, pVfs, handle)
- return SQLITE_ERROR
+ return SQLITE_ERROR
+__20:
+ ;
+ Xsqlite3_free(tls, zAltEntry)
+ rc = (*struct {
+ f func(*libc.TLS, uintptr, uintptr, uintptr) int32
+ })(unsafe.Pointer(&struct{ uintptr }{xInit})).f(tls, db, bp+56 /* &zErrmsg */, uintptr(unsafe.Pointer(&sqlite3Apis)))
+ if !(rc != 0) {
+ goto __23
+ }
+ if !(rc == (SQLITE_OK | (int32(1) << 8))) {
+ goto __24
+ }
+ return SQLITE_OK
+__24:
+ ;
+ if !(pzErrMsg != 0) {
+ goto __25
}
+ *(*uintptr)(unsafe.Pointer(pzErrMsg)) = Xsqlite3_mprintf(tls, ts+14485 /* "error during ini..." */, libc.VaList(bp+32, *(*uintptr)(unsafe.Pointer(bp + 56 /* zErrmsg */))))
+__25:
+ ;
+ Xsqlite3_free(tls, *(*uintptr)(unsafe.Pointer(bp + 56 /* zErrmsg */)))
+ Xsqlite3OsDlClose(tls, pVfs, handle)
+ return SQLITE_ERROR
+__23:
+ ;
// Append the new shared library handle to the db->aExtension array.
aHandle = Xsqlite3DbMallocZero(tls, db, (uint64(uint64(unsafe.Sizeof(handle)) * (uint64((*Sqlite3)(unsafe.Pointer(db)).FnExtension + 1)))))
- if aHandle == uintptr(0) {
- return SQLITE_NOMEM
+ if !(aHandle == uintptr(0)) {
+ goto __26
}
- if (*Sqlite3)(unsafe.Pointer(db)).FnExtension > 0 {
- libc.Xmemcpy(tls, aHandle, (*Sqlite3)(unsafe.Pointer(db)).FaExtension, (uint64(unsafe.Sizeof(handle)) * uint64((*Sqlite3)(unsafe.Pointer(db)).FnExtension)))
+ return SQLITE_NOMEM
+__26:
+ ;
+ if !((*Sqlite3)(unsafe.Pointer(db)).FnExtension > 0) {
+ goto __27
}
+ libc.Xmemcpy(tls, aHandle, (*Sqlite3)(unsafe.Pointer(db)).FaExtension, (uint64(unsafe.Sizeof(handle)) * uint64((*Sqlite3)(unsafe.Pointer(db)).FnExtension)))
+__27:
+ ;
Xsqlite3DbFree(tls, db, (*Sqlite3)(unsafe.Pointer(db)).FaExtension)
(*Sqlite3)(unsafe.Pointer(db)).FaExtension = aHandle
*(*uintptr)(unsafe.Pointer((*Sqlite3)(unsafe.Pointer(db)).FaExtension + uintptr(libc.PostIncInt32(&(*Sqlite3)(unsafe.Pointer(db)).FnExtension, 1))*8)) = handle
return SQLITE_OK
+
+extension_not_found:
+ if !(pzErrMsg != 0) {
+ goto __28
+ }
+ nMsg = nMsg + (uint64(300))
+ *(*uintptr)(unsafe.Pointer(pzErrMsg)) = libc.AssignPtrUintptr(bp+56 /* zErrmsg */, Xsqlite3_malloc64(tls, nMsg))
+ if !(*(*uintptr)(unsafe.Pointer(bp + 56 /* zErrmsg */)) != 0) {
+ goto __29
+ }
+ // zErrmsg would be NULL if not so
+ Xsqlite3_snprintf(tls, int32(nMsg), *(*uintptr)(unsafe.Pointer(bp + 56 /* zErrmsg */)),
+ ts+14517 /* "unable to open s..." */, libc.VaList(bp+40, FILENAME_MAX, zFile))
+ Xsqlite3OsDlError(tls, pVfs, (int32(nMsg - uint64(1))), *(*uintptr)(unsafe.Pointer(bp + 56 /* zErrmsg */)))
+__29:
+ ;
+__28:
+ ;
+ return SQLITE_ERROR
}
var azEndings = [1]uintptr{
- ts + 14099, /* "so" */
-} /* sqlite3.c:126560:21 */
+ ts + 14554, /* "so" */
+} /* sqlite3.c:127457:21 */
-func Xsqlite3_load_extension(tls *libc.TLS, db uintptr, zFile uintptr, zProc uintptr, pzErrMsg uintptr) int32 { /* sqlite3.c:126683:16: */
+func Xsqlite3_load_extension(tls *libc.TLS, db uintptr, zFile uintptr, zProc uintptr, pzErrMsg uintptr) int32 { /* sqlite3.c:127590:16: */
var rc int32
Xsqlite3_mutex_enter(tls, (*Sqlite3)(unsafe.Pointer(db)).Fmutex)
rc = sqlite3LoadExtension(tls, db, zFile, zProc, pzErrMsg)
@@ -105650,7 +108149,7 @@ func Xsqlite3_load_extension(tls *libc.TLS, db uintptr, zFile uintptr, zProc uin
// Call this routine when the database connection is closing in order
// to clean up loaded extensions
-func Xsqlite3CloseExtensions(tls *libc.TLS, db uintptr) { /* sqlite3.c:126701:21: */
+func Xsqlite3CloseExtensions(tls *libc.TLS, db uintptr) { /* sqlite3.c:127608:21: */
var i int32
for i = 0; i < (*Sqlite3)(unsafe.Pointer(db)).FnExtension; i++ {
@@ -105661,7 +108160,7 @@ func Xsqlite3CloseExtensions(tls *libc.TLS, db uintptr) { /* sqlite3.c:126701:21
// Enable or disable extension loading. Extension loading is disabled by
// default so as not to open security holes in older applications.
-func Xsqlite3_enable_load_extension(tls *libc.TLS, db uintptr, onoff int32) int32 { /* sqlite3.c:126714:16: */
+func Xsqlite3_enable_load_extension(tls *libc.TLS, db uintptr, onoff int32) int32 { /* sqlite3.c:127621:16: */
Xsqlite3_mutex_enter(tls, (*Sqlite3)(unsafe.Pointer(db)).Fmutex)
if onoff != 0 {
*(*U64)(unsafe.Pointer(db + 48 /* &.flags */)) |= (uint64(SQLITE_LoadExtension | SQLITE_LoadExtFunc))
@@ -105678,18 +108177,18 @@ func Xsqlite3_enable_load_extension(tls *libc.TLS, db uintptr, onoff int32) int3
// This list is shared across threads. The SQLITE_MUTEX_STATIC_MAIN
// mutex must be held while accessing this list.
type sqlite3AutoExtList = struct {
- FnExt U32
- _ [4]byte
- FaExt uintptr
-} /* sqlite3.c:126734:9 */
+ FnExt U32
+ F__ccgo_pad1 [4]byte
+ FaExt uintptr
+} /* sqlite3.c:127641:9 */
// The following object holds the list of automatically loaded
// extensions.
//
// This list is shared across threads. The SQLITE_MUTEX_STATIC_MAIN
// mutex must be held while accessing this list.
-type Sqlite3AutoExtList = sqlite3AutoExtList /* sqlite3.c:126734:35 */
-var sqlite3Autoext = sqlite3AutoExtList{} /* sqlite3.c:126738:3 */
+type Sqlite3AutoExtList = sqlite3AutoExtList /* sqlite3.c:127641:35 */
+var sqlite3Autoext = sqlite3AutoExtList{} /* sqlite3.c:127645:3 */
// The "wsdAutoext" macro will resolve to the autoextension
// state vector. If writable static data is unsupported on the target,
@@ -105699,7 +108198,7 @@ var sqlite3Autoext = sqlite3AutoExtList{} /* sqlite3.c:126738:3 */
// Register a statically linked extension that is automatically
// loaded by every new database connection.
-func Xsqlite3_auto_extension(tls *libc.TLS, xInit uintptr) int32 { /* sqlite3.c:126760:16: */
+func Xsqlite3_auto_extension(tls *libc.TLS, xInit uintptr) int32 { /* sqlite3.c:127667:16: */
var rc int32 = SQLITE_OK
rc = Xsqlite3_initialize(tls)
if rc != 0 {
@@ -105740,7 +108239,7 @@ func Xsqlite3_auto_extension(tls *libc.TLS, xInit uintptr) int32 { /* sqlite3.c:
//
// Return 1 if xInit was found on the list and removed. Return 0 if xInit
// was not on the list.
-func Xsqlite3_cancel_auto_extension(tls *libc.TLS, xInit uintptr) int32 { /* sqlite3.c:126807:16: */
+func Xsqlite3_cancel_auto_extension(tls *libc.TLS, xInit uintptr) int32 { /* sqlite3.c:127714:16: */
var mutex uintptr = Xsqlite3MutexAlloc(tls, SQLITE_MUTEX_STATIC_MAIN)
var i int32
var n int32 = 0
@@ -105759,7 +108258,7 @@ func Xsqlite3_cancel_auto_extension(tls *libc.TLS, xInit uintptr) int32 { /* sql
}
// Reset the automatic extension loading mechanism.
-func Xsqlite3_reset_auto_extension(tls *libc.TLS) { /* sqlite3.c:126832:17: */
+func Xsqlite3_reset_auto_extension(tls *libc.TLS) { /* sqlite3.c:127739:17: */
if Xsqlite3_initialize(tls) == SQLITE_OK {
var mutex uintptr = Xsqlite3MutexAlloc(tls, SQLITE_MUTEX_STATIC_MAIN)
@@ -105774,7 +108273,7 @@ func Xsqlite3_reset_auto_extension(tls *libc.TLS) { /* sqlite3.c:126832:17: */
// Load all automatic extensions.
//
// If anything goes wrong, set an error in the database connection.
-func Xsqlite3AutoLoadExtensions(tls *libc.TLS, db uintptr) { /* sqlite3.c:126854:21: */
+func Xsqlite3AutoLoadExtensions(tls *libc.TLS, db uintptr) { /* sqlite3.c:127761:21: */
bp := tls.Alloc(16)
defer tls.Free(16)
@@ -105801,9 +108300,11 @@ func Xsqlite3AutoLoadExtensions(tls *libc.TLS, db uintptr) { /* sqlite3.c:126854
}
Xsqlite3_mutex_leave(tls, mutex)
*(*uintptr)(unsafe.Pointer(bp + 8 /* zErrmsg */)) = uintptr(0)
- if (xInit != 0) && ((libc.AssignInt32(&rc, (*(*func(*libc.TLS, uintptr, uintptr, uintptr) int32)(unsafe.Pointer(&xInit)))(tls, db, bp+8 /* &zErrmsg */, pThunk))) != 0) {
+ if (xInit != 0) && ((libc.AssignInt32(&rc, (*struct {
+ f func(*libc.TLS, uintptr, uintptr, uintptr) int32
+ })(unsafe.Pointer(&struct{ uintptr }{xInit})).f(tls, db, bp+8 /* &zErrmsg */, pThunk))) != 0) {
Xsqlite3ErrorWithMsg(tls, db, rc,
- ts+14102 /* "automatic extens..." */, libc.VaList(bp, *(*uintptr)(unsafe.Pointer(bp + 8 /* zErrmsg */))))
+ ts+14557 /* "automatic extens..." */, libc.VaList(bp, *(*uintptr)(unsafe.Pointer(bp + 8 /* zErrmsg */))))
go1 = 0
}
Xsqlite3_free(tls, *(*uintptr)(unsafe.Pointer(bp + 8 /* zErrmsg */)))
@@ -105848,309 +108349,309 @@ func Xsqlite3AutoLoadExtensions(tls *libc.TLS, db uintptr) { /* sqlite3.c:126854
// or that return single-column results where the name of the
// result column is different from the name of the pragma
var pragCName = [51]uintptr{
- /* 0 */ ts + 4040, /* "id" */ // Used by: foreign_key_list
- /* 1 */ ts + 14141, /* "seq" */
- /* 2 */ ts + 7394, /* "table" */
- /* 3 */ ts + 14145, /* "from" */
- /* 4 */ ts + 14150, /* "to" */
- /* 5 */ ts + 14153, /* "on_update" */
- /* 6 */ ts + 14163, /* "on_delete" */
- /* 7 */ ts + 14173, /* "match" */
- /* 8 */ ts + 14179, /* "cid" */ // Used by: table_xinfo
- /* 9 */ ts + 14183, /* "name" */
- /* 10 */ ts + 14188, /* "type" */
- /* 11 */ ts + 14193, /* "notnull" */
- /* 12 */ ts + 14201, /* "dflt_value" */
- /* 13 */ ts + 14212, /* "pk" */
- /* 14 */ ts + 14215, /* "hidden" */
+ /* 0 */ ts + 4171, /* "id" */ // Used by: foreign_key_list
+ /* 1 */ ts + 14596, /* "seq" */
+ /* 2 */ ts + 7823, /* "table" */
+ /* 3 */ ts + 14600, /* "from" */
+ /* 4 */ ts + 14605, /* "to" */
+ /* 5 */ ts + 14608, /* "on_update" */
+ /* 6 */ ts + 14618, /* "on_delete" */
+ /* 7 */ ts + 14628, /* "match" */
+ /* 8 */ ts + 14634, /* "cid" */ // Used by: table_xinfo
+ /* 9 */ ts + 14638, /* "name" */
+ /* 10 */ ts + 14643, /* "type" */
+ /* 11 */ ts + 14648, /* "notnull" */
+ /* 12 */ ts + 14656, /* "dflt_value" */
+ /* 13 */ ts + 14667, /* "pk" */
+ /* 14 */ ts + 14670, /* "hidden" */
// table_info reuses 8
- /* 15 */ ts + 14222, /* "seqno" */ // Used by: index_xinfo
- /* 16 */ ts + 14179, /* "cid" */
- /* 17 */ ts + 14183, /* "name" */
- /* 18 */ ts + 14228, /* "desc" */
- /* 19 */ ts + 14233, /* "coll" */
- /* 20 */ ts + 14238, /* "key" */
- /* 21 */ ts + 14183, /* "name" */ // Used by: function_list
- /* 22 */ ts + 14242, /* "builtin" */
- /* 23 */ ts + 14188, /* "type" */
- /* 24 */ ts + 14250, /* "enc" */
- /* 25 */ ts + 14254, /* "narg" */
- /* 26 */ ts + 14259, /* "flags" */
- /* 27 */ ts + 9757, /* "tbl" */ // Used by: stats
- /* 28 */ ts + 9753, /* "idx" */
- /* 29 */ ts + 14265, /* "wdth" */
- /* 30 */ ts + 14270, /* "hght" */
- /* 31 */ ts + 14275, /* "flgs" */
- /* 32 */ ts + 14141, /* "seq" */ // Used by: index_list
- /* 33 */ ts + 14183, /* "name" */
- /* 34 */ ts + 14280, /* "unique" */
- /* 35 */ ts + 14287, /* "origin" */
- /* 36 */ ts + 14294, /* "partial" */
- /* 37 */ ts + 7394, /* "table" */ // Used by: foreign_key_check
- /* 38 */ ts + 14302, /* "rowid" */
- /* 39 */ ts + 4043, /* "parent" */
- /* 40 */ ts + 14308, /* "fkid" */
+ /* 15 */ ts + 14677, /* "seqno" */ // Used by: index_xinfo
+ /* 16 */ ts + 14634, /* "cid" */
+ /* 17 */ ts + 14638, /* "name" */
+ /* 18 */ ts + 14683, /* "desc" */
+ /* 19 */ ts + 14688, /* "coll" */
+ /* 20 */ ts + 14693, /* "key" */
+ /* 21 */ ts + 14638, /* "name" */ // Used by: function_list
+ /* 22 */ ts + 14697, /* "builtin" */
+ /* 23 */ ts + 14643, /* "type" */
+ /* 24 */ ts + 14705, /* "enc" */
+ /* 25 */ ts + 14709, /* "narg" */
+ /* 26 */ ts + 14714, /* "flags" */
+ /* 27 */ ts + 10216, /* "tbl" */ // Used by: stats
+ /* 28 */ ts + 10212, /* "idx" */
+ /* 29 */ ts + 14720, /* "wdth" */
+ /* 30 */ ts + 14725, /* "hght" */
+ /* 31 */ ts + 14730, /* "flgs" */
+ /* 32 */ ts + 14596, /* "seq" */ // Used by: index_list
+ /* 33 */ ts + 14638, /* "name" */
+ /* 34 */ ts + 14735, /* "unique" */
+ /* 35 */ ts + 14742, /* "origin" */
+ /* 36 */ ts + 14749, /* "partial" */
+ /* 37 */ ts + 7823, /* "table" */ // Used by: foreign_key_check
+ /* 38 */ ts + 14757, /* "rowid" */
+ /* 39 */ ts + 4174, /* "parent" */
+ /* 40 */ ts + 14763, /* "fkid" */
// index_info reuses 15
- /* 41 */ ts + 14141, /* "seq" */ // Used by: database_list
- /* 42 */ ts + 14183, /* "name" */
- /* 43 */ ts + 14313, /* "file" */
- /* 44 */ ts + 14318, /* "busy" */ // Used by: wal_checkpoint
- /* 45 */ ts + 14323, /* "log" */
- /* 46 */ ts + 14327, /* "checkpointed" */
+ /* 41 */ ts + 14596, /* "seq" */ // Used by: database_list
+ /* 42 */ ts + 14638, /* "name" */
+ /* 43 */ ts + 14768, /* "file" */
+ /* 44 */ ts + 14773, /* "busy" */ // Used by: wal_checkpoint
+ /* 45 */ ts + 14778, /* "log" */
+ /* 46 */ ts + 14782, /* "checkpointed" */
// collation_list reuses 32
- /* 47 */ ts + 14340, /* "database" */ // Used by: lock_status
- /* 48 */ ts + 14349, /* "status" */
- /* 49 */ ts + 14356, /* "cache_size" */ // Used by: default_cache_size
+ /* 47 */ ts + 14795, /* "database" */ // Used by: lock_status
+ /* 48 */ ts + 14804, /* "status" */
+ /* 49 */ ts + 14811, /* "cache_size" */ // Used by: default_cache_size
// module_list pragma_list reuses 9
- /* 50 */ ts + 14367, /* "timeout" */ // Used by: busy_timeout
-} /* sqlite3.c:126994:19 */
+ /* 50 */ ts + 14822, /* "timeout" */ // Used by: busy_timeout
+} /* sqlite3.c:127901:19 */
// Definitions of all built-in pragmas
type PragmaName1 = struct {
- FzName uintptr
- FePragTyp U8
- FmPragFlg U8
- FiPragCName U8
- FnPragCName U8
- _ [4]byte
- FiArg U64
-} /* sqlite3.c:127053:9 */
+ FzName uintptr
+ FePragTyp U8
+ FmPragFlg U8
+ FiPragCName U8
+ FnPragCName U8
+ F__ccgo_pad1 [4]byte
+ FiArg U64
+} /* sqlite3.c:127960:9 */
// Definitions of all built-in pragmas
-type PragmaName = PragmaName1 /* sqlite3.c:127060:3 */
+type PragmaName = PragmaName1 /* sqlite3.c:127967:3 */
var aPragmaName = [65]PragmaName{
- { /* zName: */ FzName: ts + 14375, /* "analysis_limit" */
+ { /* zName: */ FzName: ts + 14830, /* "analysis_limit" */
/* ePragTyp: */ FePragTyp: U8(PragTyp_ANALYSIS_LIMIT),
/* ePragFlg: */ FmPragFlg: U8(PragFlg_Result0)},
- { /* zName: */ FzName: ts + 14390, /* "application_id" */
+ { /* zName: */ FzName: ts + 14845, /* "application_id" */
/* ePragTyp: */ FePragTyp: U8(PragTyp_HEADER_VALUE),
/* ePragFlg: */ FmPragFlg: (U8(PragFlg_NoColumns1 | PragFlg_Result0)),
/* iArg: */ FiArg: uint64(BTREE_APPLICATION_ID)},
- { /* zName: */ FzName: ts + 14405, /* "auto_vacuum" */
+ { /* zName: */ FzName: ts + 14860, /* "auto_vacuum" */
/* ePragTyp: */ FePragTyp: U8(PragTyp_AUTO_VACUUM),
/* ePragFlg: */ FmPragFlg: (U8(((PragFlg_NeedSchema | PragFlg_Result0) | PragFlg_SchemaReq) | PragFlg_NoColumns1))},
- { /* zName: */ FzName: ts + 14417, /* "automatic_index" */
+ { /* zName: */ FzName: ts + 14872, /* "automatic_index" */
/* ePragTyp: */ FePragTyp: U8(PragTyp_FLAG),
/* ePragFlg: */ FmPragFlg: (U8(PragFlg_Result0 | PragFlg_NoColumns1)),
/* iArg: */ FiArg: uint64(SQLITE_AutoIndex)},
- { /* zName: */ FzName: ts + 14433, /* "busy_timeout" */
+ { /* zName: */ FzName: ts + 14888, /* "busy_timeout" */
/* ePragTyp: */ FePragTyp: U8(PragTyp_BUSY_TIMEOUT),
/* ePragFlg: */ FmPragFlg: U8(PragFlg_Result0),
/* ColNames: */ FiPragCName: U8(50), FnPragCName: U8(1)},
- { /* zName: */ FzName: ts + 14356, /* "cache_size" */
+ { /* zName: */ FzName: ts + 14811, /* "cache_size" */
/* ePragTyp: */ FePragTyp: U8(PragTyp_CACHE_SIZE),
/* ePragFlg: */ FmPragFlg: (U8(((PragFlg_NeedSchema | PragFlg_Result0) | PragFlg_SchemaReq) | PragFlg_NoColumns1))},
- { /* zName: */ FzName: ts + 14446, /* "cache_spill" */
+ { /* zName: */ FzName: ts + 14901, /* "cache_spill" */
/* ePragTyp: */ FePragTyp: U8(PragTyp_CACHE_SPILL),
/* ePragFlg: */ FmPragFlg: (U8((PragFlg_Result0 | PragFlg_SchemaReq) | PragFlg_NoColumns1))},
- { /* zName: */ FzName: ts + 14458, /* "case_sensitive_l..." */
+ { /* zName: */ FzName: ts + 14913, /* "case_sensitive_l..." */
/* ePragTyp: */ FePragTyp: U8(PragTyp_CASE_SENSITIVE_LIKE),
/* ePragFlg: */ FmPragFlg: U8(PragFlg_NoColumns)},
- { /* zName: */ FzName: ts + 14478, /* "cell_size_check" */
+ { /* zName: */ FzName: ts + 14933, /* "cell_size_check" */
/* ePragTyp: */ FePragTyp: U8(PragTyp_FLAG),
/* ePragFlg: */ FmPragFlg: (U8(PragFlg_Result0 | PragFlg_NoColumns1)),
/* iArg: */ FiArg: uint64(SQLITE_CellSizeCk)},
- { /* zName: */ FzName: ts + 14494, /* "checkpoint_fullf..." */
+ { /* zName: */ FzName: ts + 14949, /* "checkpoint_fullf..." */
/* ePragTyp: */ FePragTyp: U8(PragTyp_FLAG),
/* ePragFlg: */ FmPragFlg: (U8(PragFlg_Result0 | PragFlg_NoColumns1)),
/* iArg: */ FiArg: uint64(SQLITE_CkptFullFSync)},
- { /* zName: */ FzName: ts + 14515, /* "collation_list" */
+ { /* zName: */ FzName: ts + 14970, /* "collation_list" */
/* ePragTyp: */ FePragTyp: U8(PragTyp_COLLATION_LIST),
/* ePragFlg: */ FmPragFlg: U8(PragFlg_Result0),
/* ColNames: */ FiPragCName: U8(32), FnPragCName: U8(2)},
- { /* zName: */ FzName: ts + 14530, /* "compile_options" */
+ { /* zName: */ FzName: ts + 14985, /* "compile_options" */
/* ePragTyp: */ FePragTyp: U8(PragTyp_COMPILE_OPTIONS),
/* ePragFlg: */ FmPragFlg: U8(PragFlg_Result0)},
- { /* zName: */ FzName: ts + 14546, /* "count_changes" */
+ { /* zName: */ FzName: ts + 15001, /* "count_changes" */
/* ePragTyp: */ FePragTyp: U8(PragTyp_FLAG),
/* ePragFlg: */ FmPragFlg: (U8(PragFlg_Result0 | PragFlg_NoColumns1)),
/* iArg: */ FiArg: (U64((uint64(0x00001))) << 32)},
- { /* zName: */ FzName: ts + 14560, /* "data_version" */
+ { /* zName: */ FzName: ts + 15015, /* "data_version" */
/* ePragTyp: */ FePragTyp: U8(PragTyp_HEADER_VALUE),
/* ePragFlg: */ FmPragFlg: (U8(PragFlg_ReadOnly | PragFlg_Result0)),
/* iArg: */ FiArg: uint64(BTREE_DATA_VERSION)},
- { /* zName: */ FzName: ts + 14573, /* "database_list" */
+ { /* zName: */ FzName: ts + 15028, /* "database_list" */
/* ePragTyp: */ FePragTyp: U8(PragTyp_DATABASE_LIST),
/* ePragFlg: */ FmPragFlg: (U8(PragFlg_NeedSchema | PragFlg_Result0)),
/* ColNames: */ FiPragCName: U8(41), FnPragCName: U8(3)},
- { /* zName: */ FzName: ts + 14587, /* "default_cache_si..." */
+ { /* zName: */ FzName: ts + 15042, /* "default_cache_si..." */
/* ePragTyp: */ FePragTyp: U8(PragTyp_DEFAULT_CACHE_SIZE),
/* ePragFlg: */ FmPragFlg: (U8(((PragFlg_NeedSchema | PragFlg_Result0) | PragFlg_SchemaReq) | PragFlg_NoColumns1)),
/* ColNames: */ FiPragCName: U8(49), FnPragCName: U8(1)},
- { /* zName: */ FzName: ts + 14606, /* "defer_foreign_ke..." */
+ { /* zName: */ FzName: ts + 15061, /* "defer_foreign_ke..." */
/* ePragTyp: */ FePragTyp: U8(PragTyp_FLAG),
/* ePragFlg: */ FmPragFlg: (U8(PragFlg_Result0 | PragFlg_NoColumns1)),
/* iArg: */ FiArg: uint64(SQLITE_DeferFKs)},
- { /* zName: */ FzName: ts + 14625, /* "empty_result_cal..." */
+ { /* zName: */ FzName: ts + 15080, /* "empty_result_cal..." */
/* ePragTyp: */ FePragTyp: U8(PragTyp_FLAG),
/* ePragFlg: */ FmPragFlg: (U8(PragFlg_Result0 | PragFlg_NoColumns1)),
/* iArg: */ FiArg: uint64(SQLITE_NullCallback)},
- { /* zName: */ FzName: ts + 14648, /* "encoding" */
+ { /* zName: */ FzName: ts + 15103, /* "encoding" */
/* ePragTyp: */ FePragTyp: U8(PragTyp_ENCODING),
/* ePragFlg: */ FmPragFlg: (U8(PragFlg_Result0 | PragFlg_NoColumns1))},
- { /* zName: */ FzName: ts + 14657, /* "foreign_key_chec..." */
+ { /* zName: */ FzName: ts + 15112, /* "foreign_key_chec..." */
/* ePragTyp: */ FePragTyp: U8(PragTyp_FOREIGN_KEY_CHECK),
/* ePragFlg: */ FmPragFlg: (U8(((PragFlg_NeedSchema | PragFlg_Result0) | PragFlg_Result1) | PragFlg_SchemaOpt)),
/* ColNames: */ FiPragCName: U8(37), FnPragCName: U8(4)},
- { /* zName: */ FzName: ts + 14675, /* "foreign_key_list" */
+ { /* zName: */ FzName: ts + 15130, /* "foreign_key_list" */
/* ePragTyp: */ FePragTyp: U8(PragTyp_FOREIGN_KEY_LIST),
/* ePragFlg: */ FmPragFlg: (U8((PragFlg_NeedSchema | PragFlg_Result1) | PragFlg_SchemaOpt)), FnPragCName: U8(8)},
- { /* zName: */ FzName: ts + 14692, /* "foreign_keys" */
+ { /* zName: */ FzName: ts + 15147, /* "foreign_keys" */
/* ePragTyp: */ FePragTyp: U8(PragTyp_FLAG),
/* ePragFlg: */ FmPragFlg: (U8(PragFlg_Result0 | PragFlg_NoColumns1)),
/* iArg: */ FiArg: uint64(SQLITE_ForeignKeys)},
- { /* zName: */ FzName: ts + 14705, /* "freelist_count" */
+ { /* zName: */ FzName: ts + 15160, /* "freelist_count" */
/* ePragTyp: */ FePragTyp: U8(PragTyp_HEADER_VALUE),
/* ePragFlg: */ FmPragFlg: (U8(PragFlg_ReadOnly | PragFlg_Result0))},
- { /* zName: */ FzName: ts + 14720, /* "full_column_name..." */
+ { /* zName: */ FzName: ts + 15175, /* "full_column_name..." */
/* ePragTyp: */ FePragTyp: U8(PragTyp_FLAG),
/* ePragFlg: */ FmPragFlg: (U8(PragFlg_Result0 | PragFlg_NoColumns1)),
/* iArg: */ FiArg: uint64(SQLITE_FullColNames)},
- { /* zName: */ FzName: ts + 14738, /* "fullfsync" */
+ { /* zName: */ FzName: ts + 15193, /* "fullfsync" */
/* ePragTyp: */ FePragTyp: U8(PragTyp_FLAG),
/* ePragFlg: */ FmPragFlg: (U8(PragFlg_Result0 | PragFlg_NoColumns1)),
/* iArg: */ FiArg: uint64(SQLITE_FullFSync)},
- { /* zName: */ FzName: ts + 14748, /* "function_list" */
+ { /* zName: */ FzName: ts + 15203, /* "function_list" */
/* ePragTyp: */ FePragTyp: U8(PragTyp_FUNCTION_LIST),
/* ePragFlg: */ FmPragFlg: U8(PragFlg_Result0),
/* ColNames: */ FiPragCName: U8(21), FnPragCName: U8(6)},
- { /* zName: */ FzName: ts + 14762, /* "hard_heap_limit" */
+ { /* zName: */ FzName: ts + 15217, /* "hard_heap_limit" */
/* ePragTyp: */ FePragTyp: U8(PragTyp_HARD_HEAP_LIMIT),
/* ePragFlg: */ FmPragFlg: U8(PragFlg_Result0)},
- { /* zName: */ FzName: ts + 14778, /* "ignore_check_con..." */
+ { /* zName: */ FzName: ts + 15233, /* "ignore_check_con..." */
/* ePragTyp: */ FePragTyp: U8(PragTyp_FLAG),
/* ePragFlg: */ FmPragFlg: (U8(PragFlg_Result0 | PragFlg_NoColumns1)),
/* iArg: */ FiArg: uint64(SQLITE_IgnoreChecks)},
- { /* zName: */ FzName: ts + 14803, /* "incremental_vacu..." */
+ { /* zName: */ FzName: ts + 15258, /* "incremental_vacu..." */
/* ePragTyp: */ FePragTyp: U8(PragTyp_INCREMENTAL_VACUUM),
/* ePragFlg: */ FmPragFlg: (U8(PragFlg_NeedSchema | PragFlg_NoColumns))},
- { /* zName: */ FzName: ts + 14822, /* "index_info" */
+ { /* zName: */ FzName: ts + 15277, /* "index_info" */
/* ePragTyp: */ FePragTyp: U8(PragTyp_INDEX_INFO),
/* ePragFlg: */ FmPragFlg: (U8((PragFlg_NeedSchema | PragFlg_Result1) | PragFlg_SchemaOpt)),
/* ColNames: */ FiPragCName: U8(15), FnPragCName: U8(3)},
- { /* zName: */ FzName: ts + 14833, /* "index_list" */
+ { /* zName: */ FzName: ts + 15288, /* "index_list" */
/* ePragTyp: */ FePragTyp: U8(PragTyp_INDEX_LIST),
/* ePragFlg: */ FmPragFlg: (U8((PragFlg_NeedSchema | PragFlg_Result1) | PragFlg_SchemaOpt)),
/* ColNames: */ FiPragCName: U8(32), FnPragCName: U8(5)},
- { /* zName: */ FzName: ts + 14844, /* "index_xinfo" */
+ { /* zName: */ FzName: ts + 15299, /* "index_xinfo" */
/* ePragTyp: */ FePragTyp: U8(PragTyp_INDEX_INFO),
/* ePragFlg: */ FmPragFlg: (U8((PragFlg_NeedSchema | PragFlg_Result1) | PragFlg_SchemaOpt)),
/* ColNames: */ FiPragCName: U8(15), FnPragCName: U8(6),
/* iArg: */ FiArg: uint64(1)},
- { /* zName: */ FzName: ts + 14856, /* "integrity_check" */
+ { /* zName: */ FzName: ts + 15311, /* "integrity_check" */
/* ePragTyp: */ FePragTyp: U8(PragTyp_INTEGRITY_CHECK),
/* ePragFlg: */ FmPragFlg: (U8((PragFlg_NeedSchema | PragFlg_Result0) | PragFlg_Result1))},
- { /* zName: */ FzName: ts + 14872, /* "journal_mode" */
+ { /* zName: */ FzName: ts + 15327, /* "journal_mode" */
/* ePragTyp: */ FePragTyp: U8(PragTyp_JOURNAL_MODE),
/* ePragFlg: */ FmPragFlg: (U8((PragFlg_NeedSchema | PragFlg_Result0) | PragFlg_SchemaReq))},
- { /* zName: */ FzName: ts + 14885, /* "journal_size_lim..." */
+ { /* zName: */ FzName: ts + 15340, /* "journal_size_lim..." */
/* ePragTyp: */ FePragTyp: U8(PragTyp_JOURNAL_SIZE_LIMIT),
/* ePragFlg: */ FmPragFlg: (U8(PragFlg_Result0 | PragFlg_SchemaReq))},
- { /* zName: */ FzName: ts + 14904, /* "legacy_alter_tab..." */
+ { /* zName: */ FzName: ts + 15359, /* "legacy_alter_tab..." */
/* ePragTyp: */ FePragTyp: U8(PragTyp_FLAG),
/* ePragFlg: */ FmPragFlg: (U8(PragFlg_Result0 | PragFlg_NoColumns1)),
/* iArg: */ FiArg: uint64(SQLITE_LegacyAlter)},
- { /* zName: */ FzName: ts + 14923, /* "locking_mode" */
+ { /* zName: */ FzName: ts + 15378, /* "locking_mode" */
/* ePragTyp: */ FePragTyp: U8(PragTyp_LOCKING_MODE),
/* ePragFlg: */ FmPragFlg: (U8(PragFlg_Result0 | PragFlg_SchemaReq))},
- { /* zName: */ FzName: ts + 14936, /* "max_page_count" */
+ { /* zName: */ FzName: ts + 15391, /* "max_page_count" */
/* ePragTyp: */ FePragTyp: U8(PragTyp_PAGE_COUNT),
/* ePragFlg: */ FmPragFlg: (U8((PragFlg_NeedSchema | PragFlg_Result0) | PragFlg_SchemaReq))},
- { /* zName: */ FzName: ts + 14951, /* "mmap_size" */
+ { /* zName: */ FzName: ts + 15406, /* "mmap_size" */
/* ePragTyp: */ FePragTyp: U8(PragTyp_MMAP_SIZE)},
- { /* zName: */ FzName: ts + 14961, /* "module_list" */
+ { /* zName: */ FzName: ts + 15416, /* "module_list" */
/* ePragTyp: */ FePragTyp: U8(PragTyp_MODULE_LIST),
/* ePragFlg: */ FmPragFlg: U8(PragFlg_Result0),
/* ColNames: */ FiPragCName: U8(9), FnPragCName: U8(1)},
- { /* zName: */ FzName: ts + 14973, /* "optimize" */
+ { /* zName: */ FzName: ts + 15428, /* "optimize" */
/* ePragTyp: */ FePragTyp: U8(PragTyp_OPTIMIZE),
/* ePragFlg: */ FmPragFlg: (U8(PragFlg_Result1 | PragFlg_NeedSchema))},
- { /* zName: */ FzName: ts + 14982, /* "page_count" */
+ { /* zName: */ FzName: ts + 15437, /* "page_count" */
/* ePragTyp: */ FePragTyp: U8(PragTyp_PAGE_COUNT),
/* ePragFlg: */ FmPragFlg: (U8((PragFlg_NeedSchema | PragFlg_Result0) | PragFlg_SchemaReq))},
- { /* zName: */ FzName: ts + 14993, /* "page_size" */
+ { /* zName: */ FzName: ts + 15448, /* "page_size" */
/* ePragTyp: */ FePragTyp: U8(PragTyp_PAGE_SIZE),
/* ePragFlg: */ FmPragFlg: (U8((PragFlg_Result0 | PragFlg_SchemaReq) | PragFlg_NoColumns1))},
- { /* zName: */ FzName: ts + 15003, /* "pragma_list" */
+ { /* zName: */ FzName: ts + 15458, /* "pragma_list" */
/* ePragTyp: */ FePragTyp: U8(PragTyp_PRAGMA_LIST),
/* ePragFlg: */ FmPragFlg: U8(PragFlg_Result0),
/* ColNames: */ FiPragCName: U8(9), FnPragCName: U8(1)},
- { /* zName: */ FzName: ts + 15015, /* "query_only" */
+ { /* zName: */ FzName: ts + 15470, /* "query_only" */
/* ePragTyp: */ FePragTyp: U8(PragTyp_FLAG),
/* ePragFlg: */ FmPragFlg: (U8(PragFlg_Result0 | PragFlg_NoColumns1)),
/* iArg: */ FiArg: uint64(SQLITE_QueryOnly)},
- { /* zName: */ FzName: ts + 15026, /* "quick_check" */
+ { /* zName: */ FzName: ts + 15481, /* "quick_check" */
/* ePragTyp: */ FePragTyp: U8(PragTyp_INTEGRITY_CHECK),
/* ePragFlg: */ FmPragFlg: (U8((PragFlg_NeedSchema | PragFlg_Result0) | PragFlg_Result1))},
- { /* zName: */ FzName: ts + 15038, /* "read_uncommitted" */
+ { /* zName: */ FzName: ts + 15493, /* "read_uncommitted" */
/* ePragTyp: */ FePragTyp: U8(PragTyp_FLAG),
/* ePragFlg: */ FmPragFlg: (U8(PragFlg_Result0 | PragFlg_NoColumns1)),
/* iArg: */ FiArg: uint64(SQLITE_ReadUncommit)},
- { /* zName: */ FzName: ts + 15055, /* "recursive_trigge..." */
+ { /* zName: */ FzName: ts + 15510, /* "recursive_trigge..." */
/* ePragTyp: */ FePragTyp: U8(PragTyp_FLAG),
/* ePragFlg: */ FmPragFlg: (U8(PragFlg_Result0 | PragFlg_NoColumns1)),
/* iArg: */ FiArg: uint64(SQLITE_RecTriggers)},
- { /* zName: */ FzName: ts + 15074, /* "reverse_unordere..." */
+ { /* zName: */ FzName: ts + 15529, /* "reverse_unordere..." */
/* ePragTyp: */ FePragTyp: U8(PragTyp_FLAG),
/* ePragFlg: */ FmPragFlg: (U8(PragFlg_Result0 | PragFlg_NoColumns1)),
/* iArg: */ FiArg: uint64(SQLITE_ReverseOrder)},
- { /* zName: */ FzName: ts + 15100, /* "schema_version" */
+ { /* zName: */ FzName: ts + 15555, /* "schema_version" */
/* ePragTyp: */ FePragTyp: U8(PragTyp_HEADER_VALUE),
/* ePragFlg: */ FmPragFlg: (U8(PragFlg_NoColumns1 | PragFlg_Result0)),
/* iArg: */ FiArg: uint64(BTREE_SCHEMA_VERSION)},
- { /* zName: */ FzName: ts + 15115, /* "secure_delete" */
+ { /* zName: */ FzName: ts + 15570, /* "secure_delete" */
/* ePragTyp: */ FePragTyp: U8(PragTyp_SECURE_DELETE),
/* ePragFlg: */ FmPragFlg: U8(PragFlg_Result0)},
- { /* zName: */ FzName: ts + 15129, /* "short_column_nam..." */
+ { /* zName: */ FzName: ts + 15584, /* "short_column_nam..." */
/* ePragTyp: */ FePragTyp: U8(PragTyp_FLAG),
/* ePragFlg: */ FmPragFlg: (U8(PragFlg_Result0 | PragFlg_NoColumns1)),
/* iArg: */ FiArg: uint64(SQLITE_ShortColNames)},
- { /* zName: */ FzName: ts + 15148, /* "shrink_memory" */
+ { /* zName: */ FzName: ts + 15603, /* "shrink_memory" */
/* ePragTyp: */ FePragTyp: U8(PragTyp_SHRINK_MEMORY),
/* ePragFlg: */ FmPragFlg: U8(PragFlg_NoColumns)},
- { /* zName: */ FzName: ts + 15162, /* "soft_heap_limit" */
+ { /* zName: */ FzName: ts + 15617, /* "soft_heap_limit" */
/* ePragTyp: */ FePragTyp: U8(PragTyp_SOFT_HEAP_LIMIT),
/* ePragFlg: */ FmPragFlg: U8(PragFlg_Result0)},
- { /* zName: */ FzName: ts + 15178, /* "synchronous" */
+ { /* zName: */ FzName: ts + 15633, /* "synchronous" */
/* ePragTyp: */ FePragTyp: U8(PragTyp_SYNCHRONOUS),
/* ePragFlg: */ FmPragFlg: (U8(((PragFlg_NeedSchema | PragFlg_Result0) | PragFlg_SchemaReq) | PragFlg_NoColumns1))},
- { /* zName: */ FzName: ts + 15190, /* "table_info" */
+ { /* zName: */ FzName: ts + 15645, /* "table_info" */
/* ePragTyp: */ FePragTyp: U8(PragTyp_TABLE_INFO),
/* ePragFlg: */ FmPragFlg: (U8((PragFlg_NeedSchema | PragFlg_Result1) | PragFlg_SchemaOpt)),
/* ColNames: */ FiPragCName: U8(8), FnPragCName: U8(6)},
- { /* zName: */ FzName: ts + 15201, /* "table_xinfo" */
+ { /* zName: */ FzName: ts + 15656, /* "table_xinfo" */
/* ePragTyp: */ FePragTyp: U8(PragTyp_TABLE_INFO),
/* ePragFlg: */ FmPragFlg: (U8((PragFlg_NeedSchema | PragFlg_Result1) | PragFlg_SchemaOpt)),
/* ColNames: */ FiPragCName: U8(8), FnPragCName: U8(7),
/* iArg: */ FiArg: uint64(1)},
- { /* zName: */ FzName: ts + 15213, /* "temp_store" */
+ { /* zName: */ FzName: ts + 15668, /* "temp_store" */
/* ePragTyp: */ FePragTyp: U8(PragTyp_TEMP_STORE),
/* ePragFlg: */ FmPragFlg: (U8(PragFlg_Result0 | PragFlg_NoColumns1))},
- { /* zName: */ FzName: ts + 15224, /* "temp_store_direc..." */
+ { /* zName: */ FzName: ts + 15679, /* "temp_store_direc..." */
/* ePragTyp: */ FePragTyp: U8(PragTyp_TEMP_STORE_DIRECTORY),
/* ePragFlg: */ FmPragFlg: U8(PragFlg_NoColumns1)},
- { /* zName: */ FzName: ts + 15245, /* "threads" */
+ { /* zName: */ FzName: ts + 15700, /* "threads" */
/* ePragTyp: */ FePragTyp: U8(PragTyp_THREADS),
/* ePragFlg: */ FmPragFlg: U8(PragFlg_Result0)},
- { /* zName: */ FzName: ts + 15253, /* "trusted_schema" */
+ { /* zName: */ FzName: ts + 15708, /* "trusted_schema" */
/* ePragTyp: */ FePragTyp: U8(PragTyp_FLAG),
/* ePragFlg: */ FmPragFlg: (U8(PragFlg_Result0 | PragFlg_NoColumns1)),
/* iArg: */ FiArg: uint64(SQLITE_TrustedSchema)},
- { /* zName: */ FzName: ts + 15268, /* "user_version" */
+ { /* zName: */ FzName: ts + 15723, /* "user_version" */
/* ePragTyp: */ FePragTyp: U8(PragTyp_HEADER_VALUE),
/* ePragFlg: */ FmPragFlg: (U8(PragFlg_NoColumns1 | PragFlg_Result0)),
/* iArg: */ FiArg: uint64(BTREE_USER_VERSION)},
- { /* zName: */ FzName: ts + 15281, /* "wal_autocheckpoi..." */
+ { /* zName: */ FzName: ts + 15736, /* "wal_autocheckpoi..." */
/* ePragTyp: */ FePragTyp: U8(PragTyp_WAL_AUTOCHECKPOINT)},
- { /* zName: */ FzName: ts + 15300, /* "wal_checkpoint" */
+ { /* zName: */ FzName: ts + 15755, /* "wal_checkpoint" */
/* ePragTyp: */ FePragTyp: U8(PragTyp_WAL_CHECKPOINT),
/* ePragFlg: */ FmPragFlg: U8(PragFlg_NeedSchema),
/* ColNames: */ FiPragCName: U8(44), FnPragCName: U8(3)},
- { /* zName: */ FzName: ts + 15315, /* "writable_schema" */
+ { /* zName: */ FzName: ts + 15770, /* "writable_schema" */
/* ePragTyp: */ FePragTyp: U8(PragTyp_FLAG),
/* ePragFlg: */ FmPragFlg: (U8(PragFlg_Result0 | PragFlg_NoColumns1)),
/* iArg: */ FiArg: (uint64(SQLITE_WriteSchema | SQLITE_NoSchemaError))},
-} /* sqlite3.c:127061:25 */
+} /* sqlite3.c:127968:25 */
// Number of pragmas: 67 on by default, 77 total.
@@ -106166,11 +108667,11 @@ var aPragmaName = [65]PragmaName{
// should be passed into sqlite3BtreeSetSafetyLevel(). The is done
// to support legacy SQL code. The safety level used to be boolean
// and older scripts may have used numbers 0 for OFF and 1 for ON.
-func getSafetyLevel(tls *libc.TLS, z uintptr, omitFull int32, dflt U8) U8 { /* sqlite3.c:127590:11: */
+func getSafetyLevel(tls *libc.TLS, z uintptr, omitFull int32, dflt U8) U8 { /* sqlite3.c:128497:11: */
// on no off false yes true extra full
var i int32
var n int32
- if (int32(Xsqlite3CtypeMap[uint8(*(*int8)(unsafe.Pointer(z)))]) & 0x04) != 0 {
+ if (int32(Xsqlite3CtypeMap[uint8(*(*uint8)(unsafe.Pointer(z)))]) & 0x04) != 0 {
return U8(Xsqlite3Atoi(tls, z))
}
n = Xsqlite3Strlen30(tls, z)
@@ -106183,13 +108684,13 @@ func getSafetyLevel(tls *libc.TLS, z uintptr, omitFull int32, dflt U8) U8 { /* s
return dflt
}
-var zText = *(*[25]int8)(unsafe.Pointer(ts + 15331 /* "onoffalseyestrue..." */)) /* sqlite3.c:127592:21 */
-var iOffset = [8]U8{U8(0), U8(1), U8(2), U8(4), U8(9), U8(12), U8(15), U8(20)} /* sqlite3.c:127593:19 */
-var iLength = [8]U8{U8(2), U8(2), U8(3), U8(5), U8(3), U8(4), U8(5), U8(4)} /* sqlite3.c:127594:19 */
-var iValue = [8]U8{U8(1), U8(0), U8(0), U8(0), U8(1), U8(1), U8(3), U8(2)} /* sqlite3.c:127595:19 */
+var zText = *(*[25]uint8)(unsafe.Pointer(ts + 15786 /* "onoffalseyestrue..." */)) /* sqlite3.c:128499:21 */
+var iOffset = [8]U8{U8(0), U8(1), U8(2), U8(4), U8(9), U8(12), U8(15), U8(20)} /* sqlite3.c:128500:19 */
+var iLength = [8]U8{U8(2), U8(2), U8(3), U8(5), U8(3), U8(4), U8(5), U8(4)} /* sqlite3.c:128501:19 */
+var iValue = [8]U8{U8(1), U8(0), U8(0), U8(0), U8(1), U8(1), U8(3), U8(2)} /* sqlite3.c:128502:19 */
// Interpret the given string as a boolean value.
-func Xsqlite3GetBoolean(tls *libc.TLS, z uintptr, dflt U8) U8 { /* sqlite3.c:127615:19: */
+func Xsqlite3GetBoolean(tls *libc.TLS, z uintptr, dflt U8) U8 { /* sqlite3.c:128522:19: */
return (U8(libc.Bool32(int32(getSafetyLevel(tls, z, 1, dflt)) != 0)))
}
@@ -106198,12 +108699,12 @@ func Xsqlite3GetBoolean(tls *libc.TLS, z uintptr, dflt U8) U8 { /* sqlite3.c:127
// the rest of the file if PRAGMAs are omitted from the build.
// Interpret the given string as a locking mode value.
-func getLockingMode(tls *libc.TLS, z uintptr) int32 { /* sqlite3.c:127628:12: */
+func getLockingMode(tls *libc.TLS, z uintptr) int32 { /* sqlite3.c:128535:12: */
if z != 0 {
- if 0 == Xsqlite3StrICmp(tls, z, ts+15356 /* "exclusive" */) {
+ if 0 == Xsqlite3StrICmp(tls, z, ts+15811 /* "exclusive" */) {
return PAGER_LOCKINGMODE_EXCLUSIVE
}
- if 0 == Xsqlite3StrICmp(tls, z, ts+15366 /* "normal" */) {
+ if 0 == Xsqlite3StrICmp(tls, z, ts+15821 /* "normal" */) {
return PAGER_LOCKINGMODE_NORMAL
}
}
@@ -106214,15 +108715,15 @@ func getLockingMode(tls *libc.TLS, z uintptr) int32 { /* sqlite3.c:127628:12: */
//
// The following strings, "none", "full" and "incremental" are
// acceptable, as are their numeric equivalents: 0, 1 and 2 respectively.
-func getAutoVacuum(tls *libc.TLS, z uintptr) int32 { /* sqlite3.c:127643:12: */
+func getAutoVacuum(tls *libc.TLS, z uintptr) int32 { /* sqlite3.c:128550:12: */
var i int32
- if 0 == Xsqlite3StrICmp(tls, z, ts+15373 /* "none" */) {
+ if 0 == Xsqlite3StrICmp(tls, z, ts+15828 /* "none" */) {
return BTREE_AUTOVACUUM_NONE
}
- if 0 == Xsqlite3StrICmp(tls, z, ts+15378 /* "full" */) {
+ if 0 == Xsqlite3StrICmp(tls, z, ts+15833 /* "full" */) {
return BTREE_AUTOVACUUM_FULL
}
- if 0 == Xsqlite3StrICmp(tls, z, ts+15383 /* "incremental" */) {
+ if 0 == Xsqlite3StrICmp(tls, z, ts+15838 /* "incremental" */) {
return BTREE_AUTOVACUUM_INCR
}
i = Xsqlite3Atoi(tls, z)
@@ -106237,12 +108738,12 @@ func getAutoVacuum(tls *libc.TLS, z uintptr) int32 { /* sqlite3.c:127643:12: */
// Interpret the given string as a temp db location. Return 1 for file
// backed temporary databases, 2 for the Red-Black tree in memory database
// and 0 to use the compile-time default.
-func getTempStore(tls *libc.TLS, z uintptr) int32 { /* sqlite3.c:127659:12: */
- if (int32(*(*int8)(unsafe.Pointer(z))) >= '0') && (int32(*(*int8)(unsafe.Pointer(z))) <= '2') {
- return (int32(*(*int8)(unsafe.Pointer(z))) - '0')
- } else if Xsqlite3StrICmp(tls, z, ts+14313 /* "file" */) == 0 {
+func getTempStore(tls *libc.TLS, z uintptr) int32 { /* sqlite3.c:128566:12: */
+ if (int32(*(*uint8)(unsafe.Pointer(z))) >= '0') && (int32(*(*uint8)(unsafe.Pointer(z))) <= '2') {
+ return (int32(*(*uint8)(unsafe.Pointer(z))) - '0')
+ } else if Xsqlite3StrICmp(tls, z, ts+14768 /* "file" */) == 0 {
return 1
- } else if Xsqlite3StrICmp(tls, z, ts+15395 /* "memory" */) == 0 {
+ } else if Xsqlite3StrICmp(tls, z, ts+15850 /* "memory" */) == 0 {
return 2
} else {
return 0
@@ -106252,13 +108753,13 @@ func getTempStore(tls *libc.TLS, z uintptr) int32 { /* sqlite3.c:127659:12: */
// Invalidate temp storage, either when the temp storage is changed
// from default, or when 'file' and the temp_store_directory has changed
-func invalidateTempStorage(tls *libc.TLS, pParse uintptr) int32 { /* sqlite3.c:127677:12: */
+func invalidateTempStorage(tls *libc.TLS, pParse uintptr) int32 { /* sqlite3.c:128584:12: */
var db uintptr = (*Parse)(unsafe.Pointer(pParse)).Fdb
if (*Db)(unsafe.Pointer((*Sqlite3)(unsafe.Pointer(db)).FaDb+1*32)).FpBt != uintptr(0) {
if !(int32((*Sqlite3)(unsafe.Pointer(db)).FautoCommit) != 0) ||
(Xsqlite3BtreeTxnState(tls, (*Db)(unsafe.Pointer((*Sqlite3)(unsafe.Pointer(db)).FaDb+1*32)).FpBt) != SQLITE_TXN_NONE) {
Xsqlite3ErrorMsg(tls, pParse,
- ts+15402 /* "temporary storag..." */, 0)
+ ts+15857 /* "temporary storag..." */, 0)
return SQLITE_ERROR
}
Xsqlite3BtreeClose(tls, (*Db)(unsafe.Pointer((*Sqlite3)(unsafe.Pointer(db)).FaDb+1*32)).FpBt)
@@ -106271,7 +108772,7 @@ func invalidateTempStorage(tls *libc.TLS, pParse uintptr) int32 { /* sqlite3.c:1
// If the TEMP database is open, close it and mark the database schema
// as needing reloading. This must be done when using the SQLITE_TEMP_STORE
// or DEFAULT_TEMP_STORE pragmas.
-func changeTempStorage(tls *libc.TLS, pParse uintptr, zStorageType uintptr) int32 { /* sqlite3.c:127701:12: */
+func changeTempStorage(tls *libc.TLS, pParse uintptr, zStorageType uintptr) int32 { /* sqlite3.c:128608:12: */
var ts int32 = getTempStore(tls, zStorageType)
var db uintptr = (*Parse)(unsafe.Pointer(pParse)).Fdb
if int32((*Sqlite3)(unsafe.Pointer(db)).Ftemp_store) == ts {
@@ -106285,7 +108786,7 @@ func changeTempStorage(tls *libc.TLS, pParse uintptr, zStorageType uintptr) int3
}
// Set result column names for a pragma.
-func setPragmaResultColumnNames(tls *libc.TLS, v uintptr, pPragma uintptr) { /* sqlite3.c:127716:13: */
+func setPragmaResultColumnNames(tls *libc.TLS, v uintptr, pPragma uintptr) { /* sqlite3.c:128623:13: */
var n U8 = (*PragmaName)(unsafe.Pointer(pPragma)).FnPragCName
Xsqlite3VdbeSetNumCols(tls, v, func() int32 {
if int32(n) == 0 {
@@ -106319,7 +108820,7 @@ func setPragmaResultColumnNames(tls *libc.TLS, v uintptr, pPragma uintptr) { /*
}
// Generate code to return a single integer value.
-func returnSingleInt(tls *libc.TLS, v uintptr, value I64) { /* sqlite3.c:127735:13: */
+func returnSingleInt(tls *libc.TLS, v uintptr, value I64) { /* sqlite3.c:128642:13: */
bp := tls.Alloc(8)
defer tls.Free(8)
*(*I64)(unsafe.Pointer(bp)) = value
@@ -106329,7 +108830,7 @@ func returnSingleInt(tls *libc.TLS, v uintptr, value I64) { /* sqlite3.c:127735:
}
// Generate code to return a single text value.
-func returnSingleText(tls *libc.TLS, v uintptr, zValue uintptr) { /* sqlite3.c:127743:13: */
+func returnSingleText(tls *libc.TLS, v uintptr, zValue uintptr) { /* sqlite3.c:128650:13: */
if zValue != 0 {
Xsqlite3VdbeLoadString(tls, v, 1, zValue)
Xsqlite3VdbeAddOp2(tls, v, OP_ResultRow, 1, 1)
@@ -106338,7 +108839,7 @@ func returnSingleText(tls *libc.TLS, v uintptr, zValue uintptr) { /* sqlite3.c:1
// Set the safety_level and pager flags for pager iDb. Or if iDb<0
// set these values for all pagers.
-func setAllPagerFlags(tls *libc.TLS, db uintptr) { /* sqlite3.c:127759:13: */
+func setAllPagerFlags(tls *libc.TLS, db uintptr) { /* sqlite3.c:128666:13: */
if (*Sqlite3)(unsafe.Pointer(db)).FautoCommit != 0 {
var pDb uintptr = (*Sqlite3)(unsafe.Pointer(db)).FaDb
var n int32 = (*Sqlite3)(unsafe.Pointer(db)).FnDb
@@ -106354,23 +108855,23 @@ func setAllPagerFlags(tls *libc.TLS, db uintptr) { /* sqlite3.c:127759:13: */
}
// Return a human-readable name for a constraint resolution action.
-func actionName(tls *libc.TLS, action U8) uintptr { /* sqlite3.c:127787:19: */
+func actionName(tls *libc.TLS, action U8) uintptr { /* sqlite3.c:128694:19: */
var zName uintptr
switch int32(action) {
case OE_SetNull:
- zName = ts + 15464 /* "SET NULL" */
+ zName = ts + 15919 /* "SET NULL" */
break
case OE_SetDflt:
- zName = ts + 15473 /* "SET DEFAULT" */
+ zName = ts + 15928 /* "SET DEFAULT" */
break
case OE_Cascade:
- zName = ts + 15485 /* "CASCADE" */
+ zName = ts + 15940 /* "CASCADE" */
break
case OE_Restrict:
- zName = ts + 15493 /* "RESTRICT" */
+ zName = ts + 15948 /* "RESTRICT" */
break
default:
- zName = ts + 15502 /* "NO ACTION" */
+ zName = ts + 15957 /* "NO ACTION" */
break
}
return zName
@@ -106379,7 +108880,7 @@ func actionName(tls *libc.TLS, action U8) uintptr { /* sqlite3.c:127787:19: */
// Parameter eMode must be one of the PAGER_JOURNALMODE_XXX constants
// defined in pager.h. This function returns the associated lowercase
// journal-mode name.
-func Xsqlite3JournalModename(tls *libc.TLS, eMode int32) uintptr { /* sqlite3.c:127807:27: */
+func Xsqlite3JournalModename(tls *libc.TLS, eMode int32) uintptr { /* sqlite3.c:128714:27: */
if eMode == (int32(uint64(unsafe.Sizeof(azModeName)) / uint64(unsafe.Sizeof(uintptr(0))))) {
return uintptr(0)
@@ -106388,11 +108889,11 @@ func Xsqlite3JournalModename(tls *libc.TLS, eMode int32) uintptr { /* sqlite3.c:
}
var azModeName = [6]uintptr{
- ts + 15512 /* "delete" */, ts + 15519 /* "persist" */, ts + 15527 /* "off" */, ts + 15531 /* "truncate" */, ts + 15395 /* "memory" */, ts + 15540, /* "wal" */
-} /* sqlite3.c:127808:15 */
+ ts + 15967 /* "delete" */, ts + 15974 /* "persist" */, ts + 15982 /* "off" */, ts + 15986 /* "truncate" */, ts + 15850 /* "memory" */, ts + 15995, /* "wal" */
+} /* sqlite3.c:128715:15 */
// Locate a pragma in the aPragmaName[] array.
-func pragmaLocate(tls *libc.TLS, zName uintptr) uintptr { /* sqlite3.c:127829:25: */
+func pragmaLocate(tls *libc.TLS, zName uintptr) uintptr { /* sqlite3.c:128736:25: */
var upr int32
var lwr int32
var mid int32 = 0
@@ -106419,7 +108920,7 @@ func pragmaLocate(tls *libc.TLS, zName uintptr) uintptr { /* sqlite3.c:127829:25
// Create zero or more entries in the output for the SQL functions
// defined by FuncDef p.
-func pragmaFunclistLine(tls *libc.TLS, v uintptr, p uintptr, isBuiltin int32, showInternFuncs int32) { /* sqlite3.c:127850:13: */
+func pragmaFunclistLine(tls *libc.TLS, v uintptr, p uintptr, isBuiltin int32, showInternFuncs int32) { /* sqlite3.c:128757:13: */
bp := tls.Alloc(48)
defer tls.Free(48)
@@ -106434,13 +108935,13 @@ func pragmaFunclistLine(tls *libc.TLS, v uintptr, p uintptr, isBuiltin int32, sh
continue
}
if (*FuncDef)(unsafe.Pointer(p)).FxValue != uintptr(0) {
- zType = ts + 15544 /* "w" */
+ zType = ts + 15999 /* "w" */
} else if (*FuncDef)(unsafe.Pointer(p)).FxFinalize != uintptr(0) {
- zType = ts + 15546 /* "a" */
+ zType = ts + 16001 /* "a" */
} else {
- zType = ts + 15548 /* "s" */
+ zType = ts + 16003 /* "s" */
}
- Xsqlite3VdbeMultiLoad(tls, v, 1, ts+15550, /* "sissii" */
+ Xsqlite3VdbeMultiLoad(tls, v, 1, ts+16005, /* "sissii" */
libc.VaList(bp, (*FuncDef)(unsafe.Pointer(p)).FzName, isBuiltin,
zType, azEnc[((*FuncDef)(unsafe.Pointer(p)).FfuncFlags&U32(SQLITE_FUNC_ENCMASK))],
int32((*FuncDef)(unsafe.Pointer(p)).FnArg),
@@ -106448,15 +108949,15 @@ func pragmaFunclistLine(tls *libc.TLS, v uintptr, p uintptr, isBuiltin int32, sh
}
}
-var mask U32 = (U32((((SQLITE_DETERMINISTIC | SQLITE_DIRECTONLY) | SQLITE_SUBTYPE) | SQLITE_INNOCUOUS) | SQLITE_FUNC_INTERNAL)) /* sqlite3.c:127858:22 */
-var azEnc = [4]uintptr{uintptr(0), ts + 15557 /* "utf8" */, ts + 15562 /* "utf16le" */, ts + 15570 /* "utf16be" */} /* sqlite3.c:127865:23 */
+var mask U32 = (U32((((SQLITE_DETERMINISTIC | SQLITE_DIRECTONLY) | SQLITE_SUBTYPE) | SQLITE_INNOCUOUS) | SQLITE_FUNC_INTERNAL)) /* sqlite3.c:128765:22 */
+var azEnc = [4]uintptr{uintptr(0), ts + 16012 /* "utf8" */, ts + 16017 /* "utf16le" */, ts + 16025 /* "utf16be" */} /* sqlite3.c:128772:23 */
// Helper subroutine for PRAGMA integrity_check:
//
// Generate code to output a single-column result row with a value of the
// string held in register 3. Decrement the result count in register 1
// and halt if the maximum number of result rows have been issued.
-func integrityCheckResultRow(tls *libc.TLS, v uintptr) int32 { /* sqlite3.c:127902:12: */
+func integrityCheckResultRow(tls *libc.TLS, v uintptr) int32 { /* sqlite3.c:128809:12: */
var addr int32
Xsqlite3VdbeAddOp2(tls, v, OP_ResultRow, 3, 1)
addr = Xsqlite3VdbeAddOp3(tls, v, OP_IfPos, 1, (Xsqlite3VdbeCurrentAddr(tls, v) + 2), 1)
@@ -106478,7 +108979,7 @@ func integrityCheckResultRow(tls *libc.TLS, v uintptr) int32 { /* sqlite3.c:1279
// If the left side is "database.id" then pId1 is the database name
// and pId2 is the id. If the left side is just "id" then pId1 is the
// id and pId2 is any empty string.
-func Xsqlite3Pragma(tls *libc.TLS, pParse uintptr, pId1 uintptr, pId2 uintptr, pValue uintptr, minusFlag int32) { /* sqlite3.c:127926:21: */
+func Xsqlite3Pragma(tls *libc.TLS, pParse uintptr, pId1 uintptr, pId2 uintptr, pValue uintptr, minusFlag int32) { /* sqlite3.c:128833:21: */
bp := tls.Alloc(528)
defer tls.Free(528)
@@ -106711,7 +109212,7 @@ __4:
if !(minusFlag != 0) {
goto __5
}
- zRight = Xsqlite3MPrintf(tls, db, ts+15578 /* "-%T" */, libc.VaList(bp, pValue))
+ zRight = Xsqlite3MPrintf(tls, db, ts+16033 /* "-%T" */, libc.VaList(bp, pValue))
goto __6
__5:
zRight = Xsqlite3NameFromToken(tls, db, pValue)
@@ -106766,7 +109267,7 @@ __8:
if !(*(*uintptr)(unsafe.Pointer(bp + 368 /* &aFcntl[0] */)) != 0) {
goto __10
}
- Xsqlite3ErrorMsg(tls, pParse, ts+2718 /* "%s" */, libc.VaList(bp+8, *(*uintptr)(unsafe.Pointer(bp + 368 /* &aFcntl[0] */))))
+ Xsqlite3ErrorMsg(tls, pParse, ts+2790 /* "%s" */, libc.VaList(bp+8, *(*uintptr)(unsafe.Pointer(bp + 368 /* &aFcntl[0] */))))
Xsqlite3_free(tls, *(*uintptr)(unsafe.Pointer(bp + 368 /* &aFcntl[0] */)))
__10:
;
@@ -107338,7 +109839,7 @@ __18:
if !(zRight != 0) {
goto __62
}
- if !(Xsqlite3_stricmp(tls, zRight, ts+15582 /* "fast" */) == 0) {
+ if !(Xsqlite3_stricmp(tls, zRight, ts+16037 /* "fast" */) == 0) {
goto __63
}
b = 2
@@ -107390,7 +109891,7 @@ __19:
*(*I64)(unsafe.Pointer(bp + 400 /* x */)) = int64(0)
Xsqlite3CodeVerifySchema(tls, pParse, iDb)
iReg = libc.PreIncInt32(&(*Parse)(unsafe.Pointer(pParse)).FnMem, 1)
- if !((int32(Xsqlite3UpperToLower[uint8(*(*int8)(unsafe.Pointer(zLeft)))])) == 'p') {
+ if !((int32(Xsqlite3UpperToLower[uint8(*(*uint8)(unsafe.Pointer(zLeft)))])) == 'p') {
goto __69
}
Xsqlite3VdbeAddOp2(tls, v, OP_Pagecount, iDb, iReg)
@@ -107427,7 +109928,7 @@ __70:
// PRAGMA [schema.]locking_mode
// PRAGMA [schema.]locking_mode = (normal|exclusive)
__20:
- zRet = ts + 15366 /* "normal" */
+ zRet = ts + 15821 /* "normal" */
eMode = getLockingMode(tls, zRight)
if !(((*Token)(unsafe.Pointer(pId2)).Fn == uint32(0)) && (eMode == -1)) {
@@ -107468,7 +109969,7 @@ __77:
if !(eMode == PAGER_LOCKINGMODE_EXCLUSIVE) {
goto __82
}
- zRet = ts + 15356 /* "exclusive" */
+ zRet = ts + 15811 /* "exclusive" */
__82:
;
returnSingleText(tls, v, zRet)
@@ -107826,14 +110327,14 @@ __29:
returnSingleText(tls, v, Xsqlite3_temp_directory)
goto __123
__122:
- if !(*(*int8)(unsafe.Pointer(zRight)) != 0) {
+ if !(*(*uint8)(unsafe.Pointer(zRight)) != 0) {
goto __124
}
rc = Xsqlite3OsAccess(tls, (*Sqlite3)(unsafe.Pointer(db)).FpVfs, zRight, SQLITE_ACCESS_READWRITE, bp+432 /* &res */)
if !((rc != SQLITE_OK) || (*(*int32)(unsafe.Pointer(bp + 432 /* res */)) == 0)) {
goto __125
}
- Xsqlite3ErrorMsg(tls, pParse, ts+15587 /* "not a writable d..." */, 0)
+ Xsqlite3ErrorMsg(tls, pParse, ts+16042 /* "not a writable d..." */, 0)
goto pragma_out
__125:
;
@@ -107848,10 +110349,10 @@ __124:
__126:
;
Xsqlite3_free(tls, Xsqlite3_temp_directory)
- if !(*(*int8)(unsafe.Pointer(zRight)) != 0) {
+ if !(*(*uint8)(unsafe.Pointer(zRight)) != 0) {
goto __127
}
- Xsqlite3_temp_directory = Xsqlite3_mprintf(tls, ts+2718 /* "%s" */, libc.VaList(bp+16, zRight))
+ Xsqlite3_temp_directory = Xsqlite3_mprintf(tls, ts+2790 /* "%s" */, libc.VaList(bp+16, zRight))
goto __128
__127:
Xsqlite3_temp_directory = uintptr(0)
@@ -107879,7 +110380,7 @@ __129:
goto __131
}
Xsqlite3ErrorMsg(tls, pParse,
- ts+15612 /* "Safety level may..." */, 0)
+ ts+16067 /* "Safety level may..." */, 0)
goto __132
__131:
if !(iDb != 1) {
@@ -108038,13 +110539,13 @@ __153:
Xsqlite3VdbeMultiLoad(tls, v, 1, func() uintptr {
if (*PragmaName)(unsafe.Pointer(pPragma)).FiArg != 0 {
- return ts + 15665 /* "issisii" */
+ return ts + 16120 /* "issisii" */
}
- return ts + 15673 /* "issisi" */
+ return ts + 16128 /* "issisi" */
}(),
libc.VaList(bp+24, (i-nHidden),
(*Column)(unsafe.Pointer(pCol)).FzName,
- Xsqlite3ColumnType(tls, pCol, ts+703 /* "" */),
+ Xsqlite3ColumnType(tls, pCol, ts+755 /* "" */),
func() int32 {
if (*Column)(unsafe.Pointer(pCol)).FnotNull != 0 {
return 1
@@ -108119,7 +110620,7 @@ __165:
goto __167
}
cnum = *(*I16)(unsafe.Pointer((*Index)(unsafe.Pointer(pIdx)).FaiColumn + uintptr(i1)*2))
- Xsqlite3VdbeMultiLoad(tls, v, 1, ts+15680 /* "iisX" */, libc.VaList(bp+80, i1, int32(cnum),
+ Xsqlite3VdbeMultiLoad(tls, v, 1, ts+16135 /* "iisX" */, libc.VaList(bp+80, i1, int32(cnum),
func() uintptr {
if int32(cnum) < 0 {
return uintptr(0)
@@ -108129,7 +110630,7 @@ __165:
if !((*PragmaName)(unsafe.Pointer(pPragma)).FiArg != 0) {
goto __168
}
- Xsqlite3VdbeMultiLoad(tls, v, 4, ts+15685, /* "isiX" */
+ Xsqlite3VdbeMultiLoad(tls, v, 4, ts+16140, /* "isiX" */
libc.VaList(bp+104, int32(*(*U8)(unsafe.Pointer((*Index)(unsafe.Pointer(pIdx)).FaSortOrder + uintptr(i1)))),
*(*uintptr)(unsafe.Pointer((*Index)(unsafe.Pointer(pIdx)).FazColl + uintptr(i1)*8)),
(libc.Bool32(i1 < int32((*Index)(unsafe.Pointer(pIdx)).FnKeyCol)))))
@@ -108166,12 +110667,12 @@ __171:
if !(pIdx1 != 0) {
goto __173
}
- *(*[3]uintptr)(unsafe.Pointer(bp + 440 /* azOrigin */)) = [3]uintptr{ts + 15690 /* "c" */, ts + 15692 /* "u" */, ts + 14212 /* "pk" */}
- Xsqlite3VdbeMultiLoad(tls, v, 1, ts+15694, /* "isisi" */
+ *(*[3]uintptr)(unsafe.Pointer(bp + 440 /* azOrigin */)) = [3]uintptr{ts + 16145 /* "c" */, ts + 16147 /* "u" */, ts + 14667 /* "pk" */}
+ Xsqlite3VdbeMultiLoad(tls, v, 1, ts+16149, /* "isisi" */
libc.VaList(bp+128, i2,
(*Index)(unsafe.Pointer(pIdx1)).FzName,
(libc.Bool32(int32((*Index)(unsafe.Pointer((pIdx1))).FonError) != OE_None)),
- *(*uintptr)(unsafe.Pointer(bp + 440 /* &azOrigin[0] */ + uintptr((uint32(int32(*(*uint16)(unsafe.Pointer(pIdx1 + 100 /* &.idxType */))>>14&0x3))))*8)),
+ *(*uintptr)(unsafe.Pointer(bp + 440 /* &azOrigin[0] */ + uintptr((uint32(int32(*(*uint16)(unsafe.Pointer(pIdx1 + 100 /* &.idxType */))&0xc000>>14))))*8)),
(libc.Bool32((*Index)(unsafe.Pointer(pIdx1)).FpPartIdxWhere != uintptr(0)))))
goto __172
__172:
@@ -108201,7 +110702,7 @@ __174:
__177:
;
- Xsqlite3VdbeMultiLoad(tls, v, 1, ts+15700, /* "iss" */
+ Xsqlite3VdbeMultiLoad(tls, v, 1, ts+16155, /* "iss" */
libc.VaList(bp+168, i3,
(*Db)(unsafe.Pointer((*Sqlite3)(unsafe.Pointer(db)).FaDb+uintptr(i3)*32)).FzDbSName,
Xsqlite3BtreeGetFilename(tls, (*Db)(unsafe.Pointer((*Sqlite3)(unsafe.Pointer(db)).FaDb+uintptr(i3)*32)).FpBt)))
@@ -108224,7 +110725,7 @@ __178:
goto __180
}
pColl = (*HashElem)(unsafe.Pointer(p)).Fdata
- Xsqlite3VdbeMultiLoad(tls, v, 1, ts+15704 /* "is" */, libc.VaList(bp+192, libc.PostIncInt32(&i4, 1), (*CollSeq)(unsafe.Pointer(pColl)).FzName))
+ Xsqlite3VdbeMultiLoad(tls, v, 1, ts+16159 /* "is" */, libc.VaList(bp+192, libc.PostIncInt32(&i4, 1), (*CollSeq)(unsafe.Pointer(pColl)).FzName))
goto __179
__179:
p = (*HashElem)(unsafe.Pointer(p)).Fnext
@@ -108288,7 +110789,7 @@ __190:
goto __192
}
pMod = (*HashElem)(unsafe.Pointer(j1)).Fdata
- Xsqlite3VdbeMultiLoad(tls, v, 1, ts+15548 /* "s" */, libc.VaList(bp+208, (*Module)(unsafe.Pointer(pMod)).FzName))
+ Xsqlite3VdbeMultiLoad(tls, v, 1, ts+16003 /* "s" */, libc.VaList(bp+208, (*Module)(unsafe.Pointer(pMod)).FzName))
goto __191
__191:
j1 = (*HashElem)(unsafe.Pointer(j1)).Fnext
@@ -108305,7 +110806,7 @@ __193:
if !(i6 < (int32(uint64(unsafe.Sizeof(aPragmaName)) / uint64(unsafe.Sizeof(PragmaName{}))))) {
goto __195
}
- Xsqlite3VdbeMultiLoad(tls, v, 1, ts+15548 /* "s" */, libc.VaList(bp+216, aPragmaName[i6].FzName))
+ Xsqlite3VdbeMultiLoad(tls, v, 1, ts+16003 /* "s" */, libc.VaList(bp+216, aPragmaName[i6].FzName))
goto __194
__194:
i6++
@@ -108341,7 +110842,7 @@ __201:
if !(j2 < (*FKey)(unsafe.Pointer(pFK)).FnCol) {
goto __203
}
- Xsqlite3VdbeMultiLoad(tls, v, 1, ts+15707, /* "iissssss" */
+ Xsqlite3VdbeMultiLoad(tls, v, 1, ts+16162, /* "iissssss" */
libc.VaList(bp+224, i7,
j2,
(*FKey)(unsafe.Pointer(pFK)).FzTo,
@@ -108349,7 +110850,7 @@ __201:
(*sColMap)(unsafe.Pointer((pFK+64 /* &.aCol */)+uintptr(j2)*16)).FzCol,
actionName(tls, *(*U8)(unsafe.Pointer((pFK + 45 /* &.aAction */) + 1))), // ON UPDATE
actionName(tls, *(*U8)(unsafe.Pointer((pFK + 45 /* &.aAction */)))), // ON DELETE
- ts+15716 /* "NONE" */))
+ ts+16171 /* "NONE" */))
goto __202
__202:
j2++
@@ -108542,7 +111043,7 @@ __230:
Xsqlite3VdbeAddOp2(tls, v, OP_Null, 0, (regResult + 1))
__231:
;
- Xsqlite3VdbeMultiLoad(tls, v, (regResult + 2), ts+15721 /* "siX" */, libc.VaList(bp+288, (*FKey)(unsafe.Pointer(pFK1)).FzTo, (i8-1)))
+ Xsqlite3VdbeMultiLoad(tls, v, (regResult + 2), ts+16176 /* "siX" */, libc.VaList(bp+288, (*FKey)(unsafe.Pointer(pFK1)).FzTo, (i8-1)))
Xsqlite3VdbeAddOp2(tls, v, OP_ResultRow, regResult, 4)
Xsqlite3VdbeResolveLabel(tls, v, addrOk)
Xsqlite3DbFree(tls, db, *(*uintptr)(unsafe.Pointer(bp + 472 /* aiCols */)))
@@ -108600,7 +111101,7 @@ __232:
__43:
pObjTab = uintptr(0) // Check only this one table, if not NULL
- isQuick = (libc.Bool32((int32(Xsqlite3UpperToLower[uint8(*(*int8)(unsafe.Pointer(zLeft)))])) == 'q'))
+ isQuick = (libc.Bool32((int32(Xsqlite3UpperToLower[uint8(*(*uint8)(unsafe.Pointer(zLeft)))])) == 'q'))
// If the PRAGMA command was of the form "PRAGMA .integrity_check",
// then iDb is set to the index of the database identified by .
@@ -108808,7 +111309,7 @@ __258:
Xsqlite3VdbeChangeP5(tls, v, uint16(U8(i9)))
addr1 = Xsqlite3VdbeAddOp1(tls, v, OP_IsNull, 2)
Xsqlite3VdbeAddOp4(tls, v, OP_String8, 0, 3, 0,
- Xsqlite3MPrintf(tls, db, ts+15725 /* "*** in database ..." */, libc.VaList(bp+304, (*Db)(unsafe.Pointer((*Sqlite3)(unsafe.Pointer(db)).FaDb+uintptr(i9)*32)).FzDbSName)),
+ Xsqlite3MPrintf(tls, db, ts+16180 /* "*** in database ..." */, libc.VaList(bp+304, (*Db)(unsafe.Pointer((*Sqlite3)(unsafe.Pointer(db)).FaDb+uintptr(i9)*32)).FzDbSName)),
-7)
Xsqlite3VdbeAddOp3(tls, v, OP_Concat, 2, 3, 3)
integrityCheckResultRow(tls, v)
@@ -108898,7 +111399,7 @@ __277:
__278:
;
jmp2 = Xsqlite3VdbeAddOp1(tls, v, OP_NotNull, 3)
- zErr = Xsqlite3MPrintf(tls, db, ts+15749 /* "NULL value in %s..." */, libc.VaList(bp+312, (*Table)(unsafe.Pointer(pTab7)).FzName,
+ zErr = Xsqlite3MPrintf(tls, db, ts+16204 /* "NULL value in %s..." */, libc.VaList(bp+312, (*Table)(unsafe.Pointer(pTab7)).FzName,
(*Column)(unsafe.Pointer((*Table)(unsafe.Pointer(pTab7)).FaCol+uintptr(j4)*32)).FzName))
Xsqlite3VdbeAddOp4(tls, v, OP_String8, 0, 3, 0, zErr, -7)
integrityCheckResultRow(tls, v)
@@ -108938,7 +111439,7 @@ __283:
SQLITE_JUMPIFNULL)
Xsqlite3VdbeResolveLabel(tls, v, addrCkFault)
(*Parse)(unsafe.Pointer(pParse)).FiSelfTab = 0
- zErr1 = Xsqlite3MPrintf(tls, db, ts+15769, /* "CHECK constraint..." */
+ zErr1 = Xsqlite3MPrintf(tls, db, ts+16224, /* "CHECK constraint..." */
libc.VaList(bp+328, (*Table)(unsafe.Pointer(pTab7)).FzName))
Xsqlite3VdbeAddOp4(tls, v, OP_String8, 0, 3, 0, zErr1, -7)
integrityCheckResultRow(tls, v)
@@ -108972,9 +111473,9 @@ __288:
// Verify that an index entry exists for the current table row
jmp21 = Xsqlite3VdbeAddOp4Int(tls, v, OP_Found, (*(*int32)(unsafe.Pointer(bp + 488 /* iIdxCur */)) + j4), ckUniq, r1,
int32((*Index)(unsafe.Pointer(pIdx5)).FnColumn))
- Xsqlite3VdbeLoadString(tls, v, 3, ts+15799 /* "row " */)
+ Xsqlite3VdbeLoadString(tls, v, 3, ts+16254 /* "row " */)
Xsqlite3VdbeAddOp3(tls, v, OP_Concat, 7, 3, 3)
- Xsqlite3VdbeLoadString(tls, v, 4, ts+15804 /* " missing from in..." */)
+ Xsqlite3VdbeLoadString(tls, v, 4, ts+16259 /* " missing from in..." */)
Xsqlite3VdbeAddOp3(tls, v, OP_Concat, 4, 3, 3)
jmp5 = Xsqlite3VdbeLoadString(tls, v, 4, (*Index)(unsafe.Pointer(pIdx5)).FzName)
Xsqlite3VdbeAddOp3(tls, v, OP_Concat, 4, 3, 3)
@@ -109014,7 +111515,7 @@ __292:
Xsqlite3VdbeJumpHere(tls, v, jmp6)
Xsqlite3VdbeAddOp4Int(tls, v, OP_IdxGT, (*(*int32)(unsafe.Pointer(bp + 488 /* iIdxCur */)) + j4), uniqOk, r1,
int32((*Index)(unsafe.Pointer(pIdx5)).FnKeyCol))
- Xsqlite3VdbeLoadString(tls, v, 3, ts+15825 /* "non-unique entry..." */)
+ Xsqlite3VdbeLoadString(tls, v, 3, ts+16280 /* "non-unique entry..." */)
Xsqlite3VdbeGoto(tls, v, jmp5)
Xsqlite3VdbeResolveLabel(tls, v, uniqOk)
__289:
@@ -109036,7 +111537,7 @@ __284:
if !(!(isQuick != 0)) {
goto __294
}
- Xsqlite3VdbeLoadString(tls, v, 2, ts+15852 /* "wrong # of entri..." */)
+ Xsqlite3VdbeLoadString(tls, v, 2, ts+16307 /* "wrong # of entri..." */)
j4 = 0
pIdx5 = (*Table)(unsafe.Pointer(pTab7)).FpIndex
__295:
@@ -109087,7 +111588,7 @@ __240:
}
(*VdbeOp)(unsafe.Pointer(aOp2)).Fp2 = (1 - *(*int32)(unsafe.Pointer(bp + 480 /* mxErr */)))
(*VdbeOp)(unsafe.Pointer(aOp2 + 2*24)).Fp4type = int8(-1)
- *(*uintptr)(unsafe.Pointer(aOp2 + 2*24 + 16 /* &.p4 */)) = ts + 15881 /* "ok" */
+ *(*uintptr)(unsafe.Pointer(aOp2 + 2*24 + 16 /* &.p4 */)) = ts + 16336 /* "ok" */
(*VdbeOp)(unsafe.Pointer(aOp2 + 5*24)).Fp4type = int8(-1)
*(*uintptr)(unsafe.Pointer(aOp2 + 5*24 + 16 /* &.p4 */)) = Xsqlite3ErrStr(tls, SQLITE_CORRUPT)
__299:
@@ -109149,7 +111650,7 @@ __304:
enc = (*EncName)(unsafe.Pointer(pEnc)).Fenc
} else {
enc = func() uint8 {
- if int32(*(*int8)(unsafe.Pointer(uintptr(unsafe.Pointer(&Xsqlite3one))))) == 0 {
+ if int32(*(*uint8)(unsafe.Pointer(uintptr(unsafe.Pointer(&Xsqlite3one))))) == 0 {
return uint8(SQLITE_UTF16BE)
}
return uint8(SQLITE_UTF16LE)
@@ -109170,7 +111671,7 @@ __306:
if !(!(int32((*EncName)(unsafe.Pointer(pEnc)).FzName) != 0)) {
goto __308
}
- Xsqlite3ErrorMsg(tls, pParse, ts+15884 /* "unsupported enco..." */, libc.VaList(bp+336, zRight))
+ Xsqlite3ErrorMsg(tls, pParse, ts+16339 /* "unsupported enco..." */, libc.VaList(bp+336, zRight))
__308:
;
__303:
@@ -109282,19 +111783,19 @@ __47:
if !(zRight != 0) {
goto __315
}
- if !(Xsqlite3StrICmp(tls, zRight, ts+15378 /* "full" */) == 0) {
+ if !(Xsqlite3StrICmp(tls, zRight, ts+15833 /* "full" */) == 0) {
goto __316
}
eMode2 = SQLITE_CHECKPOINT_FULL
goto __317
__316:
- if !(Xsqlite3StrICmp(tls, zRight, ts+15909 /* "restart" */) == 0) {
+ if !(Xsqlite3StrICmp(tls, zRight, ts+16364 /* "restart" */) == 0) {
goto __318
}
eMode2 = SQLITE_CHECKPOINT_RESTART
goto __319
__318:
- if !(Xsqlite3StrICmp(tls, zRight, ts+15531 /* "truncate" */) == 0) {
+ if !(Xsqlite3StrICmp(tls, zRight, ts+15986 /* "truncate" */) == 0) {
goto __320
}
eMode2 = SQLITE_CHECKPOINT_TRUNCATE
@@ -109458,7 +111959,7 @@ __333:
if !(pIdx6 != 0) {
goto __335
}
- if !(!((int32(*(*uint16)(unsafe.Pointer(pIdx6 + 100 /* &.hasStat1 */)) >> 8 & 0x1)) != 0)) {
+ if !(!((int32(*(*uint16)(unsafe.Pointer(pIdx6 + 100 /* &.hasStat1 */)) & 0x100 >> 8)) != 0)) {
goto __336
}
szThreshold = int16(0) // Always analyze if any index lacks statistics
@@ -109481,7 +111982,7 @@ __335:
__337:
;
- zSubSql = Xsqlite3MPrintf(tls, db, ts+15917, /* "ANALYZE \"%w\".\"%w..." */
+ zSubSql = Xsqlite3MPrintf(tls, db, ts+16372, /* "ANALYZE \"%w\".\"%w..." */
libc.VaList(bp+344, (*Db)(unsafe.Pointer((*Sqlite3)(unsafe.Pointer(db)).FaDb+uintptr(iDb)*32)).FzDbSName, (*Table)(unsafe.Pointer(pTab8)).FzName))
if !((opMask & U32(0x01)) != 0) {
goto __338
@@ -109629,12 +112130,12 @@ pragma_out:
}
type EncName = struct {
- FzName uintptr
- Fenc U8
- _ [7]byte
-} /* sqlite3.c:129375:18 */
+ FzName uintptr
+ Fenc U8
+ F__ccgo_pad1 [7]byte
+} /* sqlite3.c:130282:18 */
-var iLn3 int32 = 0 /* sqlite3.c:128051:22 */
+var iLn3 int32 = 0 /* sqlite3.c:128958:22 */
var getCacheSize = [9]VdbeOpList{
{Fopcode: U8(OP_Transaction)}, // 0
{Fopcode: U8(OP_ReadCookie), Fp2: int8(1), Fp3: int8(BTREE_DEFAULT_CACHE_SIZE)}, // 1
@@ -109645,16 +112146,16 @@ var getCacheSize = [9]VdbeOpList{
{Fopcode: U8(OP_Integer), Fp2: int8(1)}, // 6
{Fopcode: U8(OP_Noop)},
{Fopcode: U8(OP_ResultRow), Fp1: int8(1), Fp2: int8(1)},
-} /* sqlite3.c:128052:29 */
-var iLn4 int32 = 0 /* sqlite3.c:128320:26 */
+} /* sqlite3.c:128959:29 */
+var iLn4 int32 = 0 /* sqlite3.c:129227:26 */
var setMeta6 = [5]VdbeOpList{
{Fopcode: U8(OP_Transaction), Fp2: int8(1)}, // 0
{Fopcode: U8(OP_ReadCookie), Fp2: int8(1), Fp3: int8(BTREE_LARGEST_ROOT_PAGE)},
{Fopcode: U8(OP_If), Fp1: int8(1)}, // 2
{Fopcode: U8(OP_Halt), Fp2: int8(OE_Abort)}, // 3
{Fopcode: U8(OP_SetCookie), Fp2: int8(BTREE_INCR_VACUUM)}, // 4
-} /* sqlite3.c:128321:33 */
-var iLn5 int32 = 0 /* sqlite3.c:129325:24 */
+} /* sqlite3.c:129228:33 */
+var iLn5 int32 = 0 /* sqlite3.c:130232:24 */
var endCode = [7]VdbeOpList{
{Fopcode: U8(OP_AddImm), Fp1: int8(1)}, // 0
{Fopcode: U8(OP_IfNotZero), Fp1: int8(1), Fp2: int8(4)}, // 1
@@ -109663,56 +112164,56 @@ var endCode = [7]VdbeOpList{
{Fopcode: U8(OP_Halt)}, // 4
{Fopcode: U8(OP_String8), Fp2: int8(3)}, // 5
{Fopcode: U8(OP_Goto), Fp2: int8(3)}, // 6
-} /* sqlite3.c:129326:31 */
+} /* sqlite3.c:130233:31 */
var encnames1 = [9]EncName{
- {FzName: ts + 15935 /* "UTF8" */, Fenc: U8(SQLITE_UTF8)},
- {FzName: ts + 15940 /* "UTF-8" */, Fenc: U8(SQLITE_UTF8)}, // Must be element [1]
- {FzName: ts + 15946 /* "UTF-16le" */, Fenc: U8(SQLITE_UTF16LE)}, // Must be element [2]
- {FzName: ts + 15955 /* "UTF-16be" */, Fenc: U8(SQLITE_UTF16BE)}, // Must be element [3]
- {FzName: ts + 15964 /* "UTF16le" */, Fenc: U8(SQLITE_UTF16LE)},
- {FzName: ts + 15972 /* "UTF16be" */, Fenc: U8(SQLITE_UTF16BE)},
- {FzName: ts + 15980 /* "UTF-16" */}, // SQLITE_UTF16NATIVE
- {FzName: ts + 15987 /* "UTF16" */}, // SQLITE_UTF16NATIVE
+ {FzName: ts + 16390 /* "UTF8" */, Fenc: U8(SQLITE_UTF8)},
+ {FzName: ts + 16395 /* "UTF-8" */, Fenc: U8(SQLITE_UTF8)}, // Must be element [1]
+ {FzName: ts + 16401 /* "UTF-16le" */, Fenc: U8(SQLITE_UTF16LE)}, // Must be element [2]
+ {FzName: ts + 16410 /* "UTF-16be" */, Fenc: U8(SQLITE_UTF16BE)}, // Must be element [3]
+ {FzName: ts + 16419 /* "UTF16le" */, Fenc: U8(SQLITE_UTF16LE)},
+ {FzName: ts + 16427 /* "UTF16be" */, Fenc: U8(SQLITE_UTF16BE)},
+ {FzName: ts + 16435 /* "UTF-16" */}, // SQLITE_UTF16NATIVE
+ {FzName: ts + 16442 /* "UTF16" */}, // SQLITE_UTF16NATIVE
{},
-} /* sqlite3.c:129378:7 */
+} /* sqlite3.c:130285:7 */
var setCookie = [2]VdbeOpList{
{Fopcode: U8(OP_Transaction), Fp2: int8(1)}, // 0
{Fopcode: U8(OP_SetCookie)}, // 1
-} /* sqlite3.c:129458:31 */
+} /* sqlite3.c:130365:31 */
var readCookie = [3]VdbeOpList{
{Fopcode: U8(OP_Transaction)}, // 0
{Fopcode: U8(OP_ReadCookie), Fp2: int8(1)}, // 1
{Fopcode: U8(OP_ResultRow), Fp1: int8(1), Fp2: int8(1)},
-} /* sqlite3.c:129473:31 */
+} /* sqlite3.c:130380:31 */
// ****************************************************************************
//
// Implementation of an eponymous virtual table that runs a pragma.
//
type PragmaVtab1 = struct {
- Fbase Sqlite3_vtab
- Fdb uintptr
- FpName uintptr
- FnHidden U8
- FiHidden U8
- _ [6]byte
-} /* sqlite3.c:129833:9 */
+ Fbase Sqlite3_vtab
+ Fdb uintptr
+ FpName uintptr
+ FnHidden U8
+ FiHidden U8
+ F__ccgo_pad1 [6]byte
+} /* sqlite3.c:130740:9 */
// ****************************************************************************
//
// Implementation of an eponymous virtual table that runs a pragma.
//
-type PragmaVtab = PragmaVtab1 /* sqlite3.c:129833:27 */
+type PragmaVtab = PragmaVtab1 /* sqlite3.c:130740:27 */
type PragmaVtabCursor1 = struct {
Fbase Sqlite3_vtab_cursor
FpPragma uintptr
FiRowid Sqlite_int64
FazArg [2]uintptr
-} /* sqlite3.c:129834:9 */
+} /* sqlite3.c:130741:9 */
-type PragmaVtabCursor = PragmaVtabCursor1 /* sqlite3.c:129834:33 */
+type PragmaVtabCursor = PragmaVtabCursor1 /* sqlite3.c:130741:33 */
// Pragma virtual table module xConnect method.
-func pragmaVtabConnect(tls *libc.TLS, db uintptr, pAux uintptr, argc int32, argv uintptr, ppVtab uintptr, pzErr uintptr) int32 { /* sqlite3.c:129852:12: */
+func pragmaVtabConnect(tls *libc.TLS, db uintptr, pAux uintptr, argc int32, argv uintptr, ppVtab uintptr, pzErr uintptr) int32 { /* sqlite3.c:130759:12: */
bp := tls.Alloc(264)
defer tls.Free(264)
@@ -109721,15 +112222,15 @@ func pragmaVtabConnect(tls *libc.TLS, db uintptr, pAux uintptr, argc int32, argv
var rc int32
var i int32
var j int32
- var cSep int8 = int8('(')
+ var cSep uint8 = uint8('(')
// var acc StrAccum at bp+32, 32
- // var zBuf [200]int8 at bp+64, 200
+ // var zBuf [200]uint8 at bp+64, 200
_ = argc
_ = argv
- Xsqlite3StrAccumInit(tls, bp+32 /* &acc */, uintptr(0), bp+64 /* &zBuf[0] */, int32(unsafe.Sizeof([200]int8{})), 0)
- Xsqlite3_str_appendall(tls, bp+32 /* &acc */, ts+15993 /* "CREATE TABLE x" */)
+ Xsqlite3StrAccumInit(tls, bp+32 /* &acc */, uintptr(0), bp+64 /* &zBuf[0] */, int32(unsafe.Sizeof([200]uint8{})), 0)
+ Xsqlite3_str_appendall(tls, bp+32 /* &acc */, ts+16448 /* "CREATE TABLE x" */)
i = 0
j = int32((*PragmaName)(unsafe.Pointer(pPragma)).FiPragCName)
__1:
@@ -109737,8 +112238,8 @@ __1:
goto __3
}
{
- Xsqlite3_str_appendf(tls, bp+32 /* &acc */, ts+16008 /* "%c\"%s\"" */, libc.VaList(bp, int32(cSep), pragCName[j]))
- cSep = int8(',')
+ Xsqlite3_str_appendf(tls, bp+32 /* &acc */, ts+16463 /* "%c\"%s\"" */, libc.VaList(bp, int32(cSep), pragCName[j]))
+ cSep = uint8(',')
}
goto __2
@@ -109750,19 +112251,19 @@ __2:
__3:
;
if i == 0 {
- Xsqlite3_str_appendf(tls, bp+32 /* &acc */, ts+16015 /* "(\"%s\"" */, libc.VaList(bp+16, (*PragmaName)(unsafe.Pointer(pPragma)).FzName))
+ Xsqlite3_str_appendf(tls, bp+32 /* &acc */, ts+16470 /* "(\"%s\"" */, libc.VaList(bp+16, (*PragmaName)(unsafe.Pointer(pPragma)).FzName))
i++
}
j = 0
if (int32((*PragmaName)(unsafe.Pointer(pPragma)).FmPragFlg) & PragFlg_Result1) != 0 {
- Xsqlite3_str_appendall(tls, bp+32 /* &acc */, ts+16021 /* ",arg HIDDEN" */)
+ Xsqlite3_str_appendall(tls, bp+32 /* &acc */, ts+16476 /* ",arg HIDDEN" */)
j++
}
if (int32((*PragmaName)(unsafe.Pointer(pPragma)).FmPragFlg) & (PragFlg_SchemaOpt | PragFlg_SchemaReq)) != 0 {
- Xsqlite3_str_appendall(tls, bp+32 /* &acc */, ts+16033 /* ",schema HIDDEN" */)
+ Xsqlite3_str_appendall(tls, bp+32 /* &acc */, ts+16488 /* ",schema HIDDEN" */)
j++
}
- Xsqlite3_str_append(tls, bp+32 /* &acc */, ts+3935 /* ")" */, 1)
+ Xsqlite3_str_append(tls, bp+32 /* &acc */, ts+4066 /* ")" */, 1)
Xsqlite3StrAccumFinish(tls, bp+32 /* &acc */)
rc = Xsqlite3_declare_vtab(tls, db, bp+64 /* &zBuf[0] */)
@@ -109778,7 +112279,7 @@ __3:
(*PragmaVtab)(unsafe.Pointer(pTab)).FnHidden = U8(j)
}
} else {
- *(*uintptr)(unsafe.Pointer(pzErr)) = Xsqlite3_mprintf(tls, ts+2718 /* "%s" */, libc.VaList(bp+24, Xsqlite3_errmsg(tls, db)))
+ *(*uintptr)(unsafe.Pointer(pzErr)) = Xsqlite3_mprintf(tls, ts+2790 /* "%s" */, libc.VaList(bp+24, Xsqlite3_errmsg(tls, db)))
}
*(*uintptr)(unsafe.Pointer(ppVtab)) = pTab
@@ -109786,7 +112287,7 @@ __3:
}
// Pragma virtual table module xDisconnect method.
-func pragmaVtabDisconnect(tls *libc.TLS, pVtab uintptr) int32 { /* sqlite3.c:129914:12: */
+func pragmaVtabDisconnect(tls *libc.TLS, pVtab uintptr) int32 { /* sqlite3.c:130821:12: */
var pTab uintptr = pVtab
Xsqlite3_free(tls, pTab)
return SQLITE_OK
@@ -109798,7 +112299,7 @@ func pragmaVtabDisconnect(tls *libc.TLS, pVtab uintptr) int32 { /* sqlite3.c:129
// query planner to give == constraints on as many hidden parameters as
// possible, and especially on the first hidden parameter. So return a
// high cost if hidden parameters are unconstrained.
-func pragmaVtabBestIndex(tls *libc.TLS, tab uintptr, pIdxInfo uintptr) int32 { /* sqlite3.c:129927:12: */
+func pragmaVtabBestIndex(tls *libc.TLS, tab uintptr, pIdxInfo uintptr) int32 { /* sqlite3.c:130834:12: */
bp := tls.Alloc(8)
defer tls.Free(8)
@@ -109863,7 +112364,7 @@ __3:
}
// Create a new cursor for the pragma virtual table
-func pragmaVtabOpen(tls *libc.TLS, pVtab uintptr, ppCursor uintptr) int32 { /* sqlite3.c:129964:12: */
+func pragmaVtabOpen(tls *libc.TLS, pVtab uintptr, ppCursor uintptr) int32 { /* sqlite3.c:130871:12: */
var pCsr uintptr
pCsr = Xsqlite3_malloc(tls, int32(unsafe.Sizeof(PragmaVtabCursor{})))
if pCsr == uintptr(0) {
@@ -109876,7 +112377,7 @@ func pragmaVtabOpen(tls *libc.TLS, pVtab uintptr, ppCursor uintptr) int32 { /* s
}
// Clear all content from pragma virtual table cursor.
-func pragmaVtabCursorClear(tls *libc.TLS, pCsr uintptr) { /* sqlite3.c:129975:13: */
+func pragmaVtabCursorClear(tls *libc.TLS, pCsr uintptr) { /* sqlite3.c:130882:13: */
var i int32
Xsqlite3_finalize(tls, (*PragmaVtabCursor)(unsafe.Pointer(pCsr)).FpPragma)
(*PragmaVtabCursor)(unsafe.Pointer(pCsr)).FpPragma = uintptr(0)
@@ -109887,7 +112388,7 @@ func pragmaVtabCursorClear(tls *libc.TLS, pCsr uintptr) { /* sqlite3.c:129975:13
}
// Close a pragma virtual table cursor
-func pragmaVtabClose(tls *libc.TLS, cur uintptr) int32 { /* sqlite3.c:129986:12: */
+func pragmaVtabClose(tls *libc.TLS, cur uintptr) int32 { /* sqlite3.c:130893:12: */
var pCsr uintptr = cur
pragmaVtabCursorClear(tls, pCsr)
Xsqlite3_free(tls, pCsr)
@@ -109895,7 +112396,7 @@ func pragmaVtabClose(tls *libc.TLS, cur uintptr) int32 { /* sqlite3.c:129986:12:
}
// Advance the pragma virtual table cursor to the next row
-func pragmaVtabNext(tls *libc.TLS, pVtabCursor uintptr) int32 { /* sqlite3.c:129994:12: */
+func pragmaVtabNext(tls *libc.TLS, pVtabCursor uintptr) int32 { /* sqlite3.c:130901:12: */
var pCsr uintptr = pVtabCursor
var rc int32 = SQLITE_OK
@@ -109911,7 +112412,7 @@ func pragmaVtabNext(tls *libc.TLS, pVtabCursor uintptr) int32 { /* sqlite3.c:129
}
// Pragma virtual table module xFilter method.
-func pragmaVtabFilter(tls *libc.TLS, pVtabCursor uintptr, idxNum int32, idxStr uintptr, argc int32, argv uintptr) int32 { /* sqlite3.c:130012:12: */
+func pragmaVtabFilter(tls *libc.TLS, pVtabCursor uintptr, idxNum int32, idxStr uintptr, argc int32, argv uintptr) int32 { /* sqlite3.c:130919:12: */
bp := tls.Alloc(64)
defer tls.Free(64)
@@ -109941,7 +112442,7 @@ __1:
var zText uintptr = Xsqlite3_value_text(tls, *(*uintptr)(unsafe.Pointer(argv + uintptr(i)*8)))
if zText != 0 {
- *(*uintptr)(unsafe.Pointer((pCsr + 24 /* &.azArg */) + uintptr(j)*8)) = Xsqlite3_mprintf(tls, ts+2718 /* "%s" */, libc.VaList(bp, zText))
+ *(*uintptr)(unsafe.Pointer((pCsr + 24 /* &.azArg */) + uintptr(j)*8)) = Xsqlite3_mprintf(tls, ts+2790 /* "%s" */, libc.VaList(bp, zText))
if *(*uintptr)(unsafe.Pointer((pCsr + 24 /* &.azArg */) + uintptr(j)*8)) == uintptr(0) {
return SQLITE_NOMEM
}
@@ -109957,13 +112458,13 @@ __2:
__3:
;
Xsqlite3StrAccumInit(tls, bp+32 /* &acc */, uintptr(0), uintptr(0), 0, *(*int32)(unsafe.Pointer(((*PragmaVtab)(unsafe.Pointer(pTab)).Fdb + 128 /* &.aLimit */) + 1*4)))
- Xsqlite3_str_appendall(tls, bp+32 /* &acc */, ts+16048 /* "PRAGMA " */)
+ Xsqlite3_str_appendall(tls, bp+32 /* &acc */, ts+16503 /* "PRAGMA " */)
if *(*uintptr)(unsafe.Pointer((pCsr + 24 /* &.azArg */) + 1*8)) != 0 {
- Xsqlite3_str_appendf(tls, bp+32 /* &acc */, ts+16056 /* "%Q." */, libc.VaList(bp+8, *(*uintptr)(unsafe.Pointer((pCsr + 24 /* &.azArg */) + 1*8))))
+ Xsqlite3_str_appendf(tls, bp+32 /* &acc */, ts+16511 /* "%Q." */, libc.VaList(bp+8, *(*uintptr)(unsafe.Pointer((pCsr + 24 /* &.azArg */) + 1*8))))
}
Xsqlite3_str_appendall(tls, bp+32 /* &acc */, (*PragmaName)(unsafe.Pointer((*PragmaVtab)(unsafe.Pointer(pTab)).FpName)).FzName)
if *(*uintptr)(unsafe.Pointer((pCsr + 24 /* &.azArg */))) != 0 {
- Xsqlite3_str_appendf(tls, bp+32 /* &acc */, ts+16060 /* "=%Q" */, libc.VaList(bp+16, *(*uintptr)(unsafe.Pointer((pCsr + 24 /* &.azArg */)))))
+ Xsqlite3_str_appendf(tls, bp+32 /* &acc */, ts+16515 /* "=%Q" */, libc.VaList(bp+16, *(*uintptr)(unsafe.Pointer((pCsr + 24 /* &.azArg */)))))
}
zSql = Xsqlite3StrAccumFinish(tls, bp+32 /* &acc */)
if zSql == uintptr(0) {
@@ -109972,21 +112473,21 @@ __3:
rc = Xsqlite3_prepare_v2(tls, (*PragmaVtab)(unsafe.Pointer(pTab)).Fdb, zSql, -1, (pCsr + 8 /* &.pPragma */), uintptr(0))
Xsqlite3_free(tls, zSql)
if rc != SQLITE_OK {
- (*PragmaVtab)(unsafe.Pointer(pTab)).Fbase.FzErrMsg = Xsqlite3_mprintf(tls, ts+2718 /* "%s" */, libc.VaList(bp+24, Xsqlite3_errmsg(tls, (*PragmaVtab)(unsafe.Pointer(pTab)).Fdb)))
+ (*PragmaVtab)(unsafe.Pointer(pTab)).Fbase.FzErrMsg = Xsqlite3_mprintf(tls, ts+2790 /* "%s" */, libc.VaList(bp+24, Xsqlite3_errmsg(tls, (*PragmaVtab)(unsafe.Pointer(pTab)).Fdb)))
return rc
}
return pragmaVtabNext(tls, pVtabCursor)
}
// Pragma virtual table module xEof method.
-func pragmaVtabEof(tls *libc.TLS, pVtabCursor uintptr) int32 { /* sqlite3.c:130062:12: */
+func pragmaVtabEof(tls *libc.TLS, pVtabCursor uintptr) int32 { /* sqlite3.c:130969:12: */
var pCsr uintptr = pVtabCursor
return (libc.Bool32((*PragmaVtabCursor)(unsafe.Pointer(pCsr)).FpPragma == uintptr(0)))
}
// The xColumn method simply returns the corresponding column from
// the PRAGMA.
-func pragmaVtabColumn(tls *libc.TLS, pVtabCursor uintptr, ctx uintptr, i int32) int32 { /* sqlite3.c:130070:12: */
+func pragmaVtabColumn(tls *libc.TLS, pVtabCursor uintptr, ctx uintptr, i int32) int32 { /* sqlite3.c:130977:12: */
var pCsr uintptr = pVtabCursor
var pTab uintptr = (*Sqlite3_vtab_cursor)(unsafe.Pointer(pVtabCursor)).FpVtab
if i < int32((*PragmaVtab)(unsafe.Pointer(pTab)).FiHidden) {
@@ -109998,7 +112499,7 @@ func pragmaVtabColumn(tls *libc.TLS, pVtabCursor uintptr, ctx uintptr, i int32)
}
// Pragma virtual table module xRowid method.
-func pragmaVtabRowid(tls *libc.TLS, pVtabCursor uintptr, p uintptr) int32 { /* sqlite3.c:130088:12: */
+func pragmaVtabRowid(tls *libc.TLS, pVtabCursor uintptr, p uintptr) int32 { /* sqlite3.c:130995:12: */
var pCsr uintptr = pVtabCursor
*(*Sqlite_int64)(unsafe.Pointer(p)) = (*PragmaVtabCursor)(unsafe.Pointer(pCsr)).FiRowid
return SQLITE_OK
@@ -110016,12 +112517,12 @@ var pragmaVtabModule = Sqlite3_module{ // xCreate - create a table
FxEof: 0, // xEof
FxColumn: 0, // xColumn - read data
FxRowid: 0, // xShadowName
-} /* sqlite3.c:130095:29 */
+} /* sqlite3.c:131002:29 */
// Check to see if zTabName is really the name of a pragma. If it is,
// then register an eponymous virtual table for that pragma and return
// a pointer to the Module object for the new virtual table.
-func Xsqlite3PragmaVtabRegister(tls *libc.TLS, db uintptr, zName uintptr) uintptr { /* sqlite3.c:130127:23: */
+func Xsqlite3PragmaVtabRegister(tls *libc.TLS, db uintptr, zName uintptr) uintptr { /* sqlite3.c:131034:23: */
var pName uintptr
pName = pragmaLocate(tls, (zName + uintptr(7)))
@@ -110054,7 +112555,7 @@ func Xsqlite3PragmaVtabRegister(tls *libc.TLS, db uintptr, zName uintptr) uintpt
// Fill the InitData structure with an error message that indicates
// that the database is corrupt.
-func corruptSchema(tls *libc.TLS, pData uintptr, azObj uintptr, zExtra uintptr) { /* sqlite3.c:130164:13: */
+func corruptSchema(tls *libc.TLS, pData uintptr, azObj uintptr, zExtra uintptr) { /* sqlite3.c:131071:13: */
bp := tls.Alloc(56)
defer tls.Free(56)
@@ -110065,38 +112566,38 @@ func corruptSchema(tls *libc.TLS, pData uintptr, azObj uintptr, zExtra uintptr)
// A error message has already been generated. Do not overwrite it
} else if ((*InitData)(unsafe.Pointer(pData)).FmInitFlags & (U32(INITFLAG_AlterRename | INITFLAG_AlterDrop))) != 0 {
*(*uintptr)(unsafe.Pointer((*InitData)(unsafe.Pointer(pData)).FpzErrMsg)) = Xsqlite3MPrintf(tls, db,
- ts+16064 /* "error in %s %s a..." */, libc.VaList(bp, *(*uintptr)(unsafe.Pointer(azObj)), *(*uintptr)(unsafe.Pointer(azObj + 1*8)),
+ ts+16519 /* "error in %s %s a..." */, libc.VaList(bp, *(*uintptr)(unsafe.Pointer(azObj)), *(*uintptr)(unsafe.Pointer(azObj + 1*8)),
func() uintptr {
if ((*InitData)(unsafe.Pointer(pData)).FmInitFlags & U32(INITFLAG_AlterRename)) != 0 {
- return ts + 16092 /* "rename" */
+ return ts + 16547 /* "rename" */
}
- return ts + 16099 /* "drop column" */
+ return ts + 16554 /* "drop column" */
}(),
zExtra))
(*InitData)(unsafe.Pointer(pData)).Frc = SQLITE_ERROR
} else if ((*Sqlite3)(unsafe.Pointer(db)).Fflags & uint64(SQLITE_WriteSchema)) != 0 {
- (*InitData)(unsafe.Pointer(pData)).Frc = Xsqlite3CorruptError(tls, 130182)
+ (*InitData)(unsafe.Pointer(pData)).Frc = Xsqlite3CorruptError(tls, 131089)
} else {
var z uintptr
var zObj uintptr
if *(*uintptr)(unsafe.Pointer(azObj + 1*8)) != 0 {
zObj = *(*uintptr)(unsafe.Pointer(azObj + 1*8))
} else {
- zObj = ts + 3991 /* "?" */
+ zObj = ts + 4122 /* "?" */
}
- z = Xsqlite3MPrintf(tls, db, ts+16111 /* "malformed databa..." */, libc.VaList(bp+32, zObj))
- if (zExtra != 0) && (*(*int8)(unsafe.Pointer(zExtra)) != 0) {
- z = Xsqlite3MPrintf(tls, db, ts+16142 /* "%z - %s" */, libc.VaList(bp+40, z, zExtra))
+ z = Xsqlite3MPrintf(tls, db, ts+16566 /* "malformed databa..." */, libc.VaList(bp+32, zObj))
+ if (zExtra != 0) && (*(*uint8)(unsafe.Pointer(zExtra)) != 0) {
+ z = Xsqlite3MPrintf(tls, db, ts+16597 /* "%z - %s" */, libc.VaList(bp+40, z, zExtra))
}
*(*uintptr)(unsafe.Pointer((*InitData)(unsafe.Pointer(pData)).FpzErrMsg)) = z
- (*InitData)(unsafe.Pointer(pData)).Frc = Xsqlite3CorruptError(tls, 130189)
+ (*InitData)(unsafe.Pointer(pData)).Frc = Xsqlite3CorruptError(tls, 131096)
}
}
// Check to see if any sibling index (another index on the same table)
// of pIndex has the same root page number, and if it does, return true.
// This would indicate a corrupt schema.
-func Xsqlite3IndexHasDuplicateRootPage(tls *libc.TLS, pIndex uintptr) int32 { /* sqlite3.c:130198:20: */
+func Xsqlite3IndexHasDuplicateRootPage(tls *libc.TLS, pIndex uintptr) int32 { /* sqlite3.c:131105:20: */
var p uintptr
for p = (*Table)(unsafe.Pointer((*Index)(unsafe.Pointer(pIndex)).FpTable)).FpIndex; p != 0; p = (*Index)(unsafe.Pointer(p)).FpNext {
if ((*Index)(unsafe.Pointer(p)).Ftnum == (*Index)(unsafe.Pointer(pIndex)).Ftnum) && (p != pIndex) {
@@ -110118,7 +112619,7 @@ func Xsqlite3IndexHasDuplicateRootPage(tls *libc.TLS, pIndex uintptr) int32 { /*
// argv[3] = root page number for table or index. 0 for trigger or view.
// argv[4] = SQL text for the CREATE statement.
//
-func Xsqlite3InitCallback(tls *libc.TLS, pInit uintptr, argc int32, argv uintptr, NotUsed uintptr) int32 { /* sqlite3.c:130232:20: */
+func Xsqlite3InitCallback(tls *libc.TLS, pInit uintptr, argc int32, argv uintptr, NotUsed uintptr) int32 { /* sqlite3.c:131139:20: */
bp := tls.Alloc(8)
defer tls.Free(8)
@@ -110130,20 +112631,20 @@ func Xsqlite3InitCallback(tls *libc.TLS, pInit uintptr, argc int32, argv uintptr
_ = argc
*(*U32)(unsafe.Pointer(db + 44 /* &.mDbFlags */)) |= (U32(DBFLAG_EncodingFixed))
+ if argv == uintptr(0) {
+ return 0
+ } // Might happen if EMPTY_RESULT_CALLBACKS are on
(*InitData)(unsafe.Pointer(pData)).FnInitRow++
if (*Sqlite3)(unsafe.Pointer(db)).FmallocFailed != 0 {
corruptSchema(tls, pData, argv, uintptr(0))
return 1
}
- if argv == uintptr(0) {
- return 0
- } // Might happen if EMPTY_RESULT_CALLBACKS are on
if *(*uintptr)(unsafe.Pointer(argv + 3*8)) == uintptr(0) {
corruptSchema(tls, pData, argv, uintptr(0))
} else if ((*(*uintptr)(unsafe.Pointer(argv + 4*8)) != 0) &&
- ('c' == int32(Xsqlite3UpperToLower[uint8(*(*int8)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(argv + 4*8)))))]))) &&
- ('r' == int32(Xsqlite3UpperToLower[uint8(*(*int8)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(argv + 4*8)) + 1)))])) {
+ ('c' == int32(Xsqlite3UpperToLower[uint8(*(*uint8)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(argv + 4*8)))))]))) &&
+ ('r' == int32(Xsqlite3UpperToLower[uint8(*(*uint8)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(argv + 4*8)) + 1)))])) {
// Call the parser to process a CREATE TABLE, INDEX or VIEW.
// But because db->init.busy is set to 1, no VDBE code is generated
// or executed. All the parser does is build the internal data
@@ -110163,10 +112664,10 @@ func Xsqlite3InitCallback(tls *libc.TLS, pInit uintptr, argc int32, argv uintptr
if (Xsqlite3GetUInt32(tls, *(*uintptr)(unsafe.Pointer(argv + 3*8)), (db+184 /* &.init */ /* &.newTnum */)) == 0) ||
(((*Sqlite3)(unsafe.Pointer(db)).Finit.FnewTnum > (*InitData)(unsafe.Pointer(pData)).FmxPage) && ((*InitData)(unsafe.Pointer(pData)).FmxPage > Pgno(0))) {
if Xsqlite3Config.FbExtraSchemaChecks != 0 {
- corruptSchema(tls, pData, argv, ts+12397 /* "invalid rootpage" */)
+ corruptSchema(tls, pData, argv, ts+12850 /* "invalid rootpage" */)
}
}
- libc.SetBitFieldPtr8Uint32(db+184 /* &.init */ +8 /* &.orphanTrigger */, uint32(0), 0, 0x1)
+ libc.SetBitFieldPtr8Uint32(db+184 /* &.init */ +8 /* &.orphanTrigger */, uint32(0), 7, 0x80)
(*Sqlite3)(unsafe.Pointer(db)).Finit.FazInit = argv
*(*uintptr)(unsafe.Pointer(bp /* pStmt */)) = uintptr(0)
sqlite3Prepare(tls, db, *(*uintptr)(unsafe.Pointer(argv + 4*8)), -1, uint32(0), uintptr(0), bp /* &pStmt */, uintptr(0))
@@ -110175,7 +112676,7 @@ func Xsqlite3InitCallback(tls *libc.TLS, pInit uintptr, argc int32, argv uintptr
(*Sqlite3)(unsafe.Pointer(db)).Finit.FiDb = saved_iDb
// assert( saved_iDb==0 || (db->mDbFlags & DBFLAG_Vacuum)!=0 );
if SQLITE_OK != rc {
- if (uint32(int32(*(*uint8)(unsafe.Pointer(db + 184 /* &.init */ + 8 /* &.orphanTrigger */)) >> 7 & 0x1))) != 0 {
+ if (uint32(int32(*(*uint8)(unsafe.Pointer(db + 184 /* &.init */ + 8 /* &.orphanTrigger */)) & 0x80 >> 7))) != 0 {
} else {
if rc > (*InitData)(unsafe.Pointer(pData)).Frc {
@@ -110189,7 +112690,7 @@ func Xsqlite3InitCallback(tls *libc.TLS, pInit uintptr, argc int32, argv uintptr
}
}
Xsqlite3_finalize(tls, *(*uintptr)(unsafe.Pointer(bp /* pStmt */)))
- } else if (*(*uintptr)(unsafe.Pointer(argv + 1*8)) == uintptr(0)) || ((*(*uintptr)(unsafe.Pointer(argv + 4*8)) != uintptr(0)) && (int32(*(*int8)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(argv + 4*8))))) != 0)) {
+ } else if (*(*uintptr)(unsafe.Pointer(argv + 1*8)) == uintptr(0)) || ((*(*uintptr)(unsafe.Pointer(argv + 4*8)) != uintptr(0)) && (int32(*(*uint8)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(argv + 4*8))))) != 0)) {
corruptSchema(tls, pData, argv, uintptr(0))
} else {
// If the SQL column is blank it means this is an index that
@@ -110200,13 +112701,13 @@ func Xsqlite3InitCallback(tls *libc.TLS, pInit uintptr, argc int32, argv uintptr
var pIndex uintptr
pIndex = Xsqlite3FindIndex(tls, db, *(*uintptr)(unsafe.Pointer(argv + 1*8)), (*Db)(unsafe.Pointer((*Sqlite3)(unsafe.Pointer(db)).FaDb+uintptr(iDb)*32)).FzDbSName)
if pIndex == uintptr(0) {
- corruptSchema(tls, pData, argv, ts+16150 /* "orphan index" */)
+ corruptSchema(tls, pData, argv, ts+16605 /* "orphan index" */)
} else if (((Xsqlite3GetUInt32(tls, *(*uintptr)(unsafe.Pointer(argv + 3*8)), (pIndex+88 /* &.tnum */)) == 0) ||
((*Index)(unsafe.Pointer(pIndex)).Ftnum < Pgno(2))) ||
((*Index)(unsafe.Pointer(pIndex)).Ftnum > (*InitData)(unsafe.Pointer(pData)).FmxPage)) ||
(Xsqlite3IndexHasDuplicateRootPage(tls, pIndex) != 0) {
if Xsqlite3Config.FbExtraSchemaChecks != 0 {
- corruptSchema(tls, pData, argv, ts+12397 /* "invalid rootpage" */)
+ corruptSchema(tls, pData, argv, ts+12850 /* "invalid rootpage" */)
}
}
}
@@ -110219,7 +112720,7 @@ func Xsqlite3InitCallback(tls *libc.TLS, pInit uintptr, argc int32, argv uintptr
// database. iDb==1 should never be used. iDb>=2 is used for
// auxiliary databases. Return one of the SQLITE_ error codes to
// indicate success or failure.
-func Xsqlite3InitOne(tls *libc.TLS, db uintptr, iDb int32, pzErrMsg uintptr, mFlags U32) int32 { /* sqlite3.c:130334:20: */
+func Xsqlite3InitOne(tls *libc.TLS, db uintptr, iDb int32, pzErrMsg uintptr, mFlags U32) int32 { /* sqlite3.c:131241:20: */
bp := tls.Alloc(124)
defer tls.Free(124)
@@ -110249,16 +112750,16 @@ func Xsqlite3InitOne(tls *libc.TLS, db uintptr, iDb int32, pzErrMsg uintptr, mFl
// table name will be inserted automatically by the parser so we can just
// use the abbreviation "x" here. The parser will also automatically tag
// the schema table as read-only.
- *(*uintptr)(unsafe.Pointer(bp + 16 /* &azArg[0] */)) = ts + 7394 /* "table" */
+ *(*uintptr)(unsafe.Pointer(bp + 16 /* &azArg[0] */)) = ts + 7823 /* "table" */
*(*uintptr)(unsafe.Pointer(bp + 16 /* &azArg[0] */ + 1*8)) = libc.AssignUintptr(&zSchemaTabName, func() uintptr {
if (!(0 != 0)) && (iDb == 1) {
- return ts + 10419 /* "sqlite_temp_mast..." */
+ return ts + 10872 /* "sqlite_temp_mast..." */
}
- return ts + 4825 /* "sqlite_master" */
+ return ts + 4956 /* "sqlite_master" */
}())
*(*uintptr)(unsafe.Pointer(bp + 16 /* &azArg[0] */ + 2*8)) = *(*uintptr)(unsafe.Pointer(bp + 16 /* &azArg[0] */ + 1*8))
- *(*uintptr)(unsafe.Pointer(bp + 16 /* &azArg[0] */ + 3*8)) = ts + 6782 /* "1" */
- *(*uintptr)(unsafe.Pointer(bp + 16 /* &azArg[0] */ + 4*8)) = ts + 16163 /* "CREATE TABLE x(t..." */
+ *(*uintptr)(unsafe.Pointer(bp + 16 /* &azArg[0] */ + 3*8)) = ts + 6913 /* "1" */
+ *(*uintptr)(unsafe.Pointer(bp + 16 /* &azArg[0] */ + 4*8)) = ts + 16618 /* "CREATE TABLE x(t..." */
*(*uintptr)(unsafe.Pointer(bp + 16 /* &azArg[0] */ + 5*8)) = uintptr(0)
(*InitData)(unsafe.Pointer(bp + 64 /* &initData */)).Fdb = db
(*InitData)(unsafe.Pointer(bp + 64 /* &initData */)).FiDb = iDb
@@ -110371,7 +112872,7 @@ __10:
goto __13
}
Xsqlite3SetString(tls, pzErrMsg, db,
- ts+10046 /* "attached databas..." */)
+ ts+10499 /* "attached databas..." */)
rc = SQLITE_ERROR
goto initone_error_out
__13:
@@ -110411,7 +112912,7 @@ __16:
if !(int32((*Schema)(unsafe.Pointer((*Db)(unsafe.Pointer(pDb)).FpSchema)).Ffile_format) > SQLITE_MAX_FILE_FORMAT) {
goto __17
}
- Xsqlite3SetString(tls, pzErrMsg, db, ts+16235 /* "unsupported file..." */)
+ Xsqlite3SetString(tls, pzErrMsg, db, ts+16690 /* "unsupported file..." */)
rc = SQLITE_ERROR
goto initone_error_out
__17:
@@ -110433,7 +112934,7 @@ __18:
(*InitData)(unsafe.Pointer(bp + 64 /* &initData */)).FmxPage = Xsqlite3BtreeLastPage(tls, (*Db)(unsafe.Pointer(pDb)).FpBt)
zSql = Xsqlite3MPrintf(tls, db,
- ts+16259, /* "SELECT*FROM\"%w\"...." */
+ ts+16714, /* "SELECT*FROM\"%w\"...." */
libc.VaList(bp, (*Db)(unsafe.Pointer((*Sqlite3)(unsafe.Pointer(db)).FaDb+uintptr(iDb)*32)).FzDbSName, zSchemaTabName))
xAuth = (*Sqlite3)(unsafe.Pointer(db)).FxAuth
@@ -110462,20 +112963,25 @@ __20:
}
rc = SQLITE_NOMEM
Xsqlite3ResetAllSchemasOfConnection(tls, db)
+ pDb = ((*Sqlite3)(unsafe.Pointer(db)).FaDb + uintptr(iDb)*32)
+ goto __22
__21:
- ;
if !((rc == SQLITE_OK) || (((*Sqlite3)(unsafe.Pointer(db)).Fflags & uint64(SQLITE_NoSchemaError)) != 0)) {
- goto __22
+ goto __23
}
- // Black magic: If the SQLITE_NoSchemaError flag is set, then consider
- // the schema loaded, even if errors occurred. In this situation the
- // current sqlite3_prepare() operation will fail, but the following one
- // will attempt to compile the supplied statement against whatever subset
- // of the schema was loaded before the error occurred. The primary
- // purpose of this is to allow access to the sqlite_schema table
- // even when its contents have been corrupted.
+ // Hack: If the SQLITE_NoSchemaError flag is set, then consider
+ // the schema loaded, even if errors (other than OOM) occurred. In
+ // this situation the current sqlite3_prepare() operation will fail,
+ // but the following one will attempt to compile the supplied statement
+ // against whatever subset of the schema was loaded before the error
+ // occurred.
+ //
+ // The primary purpose of this is to allow access to the sqlite_schema
+ // table even when its contents have been corrupted.
*(*U16)(unsafe.Pointer((*Db)(unsafe.Pointer((*Sqlite3)(unsafe.Pointer((db))).FaDb+uintptr(iDb)*32)).FpSchema + 114 /* &.schemaFlags */)) |= U16((DB_SchemaLoaded))
rc = SQLITE_OK
+__23:
+ ;
__22:
;
@@ -110484,25 +112990,25 @@ __22:
// before that point, jump to error_out.
initone_error_out:
if !(openedTransaction != 0) {
- goto __23
+ goto __24
}
Xsqlite3BtreeCommit(tls, (*Db)(unsafe.Pointer(pDb)).FpBt)
-__23:
+__24:
;
Xsqlite3BtreeLeave(tls, (*Db)(unsafe.Pointer(pDb)).FpBt)
error_out:
if !(rc != 0) {
- goto __24
+ goto __25
}
if !((rc == SQLITE_NOMEM) || (rc == (SQLITE_IOERR | (int32(12) << 8)))) {
- goto __25
+ goto __26
}
Xsqlite3OomFault(tls, db)
-__25:
+__26:
;
Xsqlite3ResetOneSchema(tls, db, iDb)
-__24:
+__25:
;
(*Sqlite3)(unsafe.Pointer(db)).Finit.Fbusy = U8(0)
return rc
@@ -110515,7 +113021,7 @@ __24:
//
// After a database is initialized, the DB_SchemaLoaded bit is set
// bit is set in the flags field of the Db structure.
-func Xsqlite3Init(tls *libc.TLS, db uintptr, pzErrMsg uintptr) int32 { /* sqlite3.c:130569:20: */
+func Xsqlite3Init(tls *libc.TLS, db uintptr, pzErrMsg uintptr) int32 { /* sqlite3.c:131480:20: */
var i int32
var rc int32
var commit_internal int32 = libc.BoolInt32(!(((*Sqlite3)(unsafe.Pointer(db)).FmDbFlags & U32(DBFLAG_SchemaChange)) != 0))
@@ -110547,7 +113053,7 @@ func Xsqlite3Init(tls *libc.TLS, db uintptr, pzErrMsg uintptr) int32 { /* sqlite
// This routine is a no-op if the database schema is already initialized.
// Otherwise, the schema is loaded. An error code is returned.
-func Xsqlite3ReadSchema(tls *libc.TLS, pParse uintptr) int32 { /* sqlite3.c:130601:20: */
+func Xsqlite3ReadSchema(tls *libc.TLS, pParse uintptr) int32 { /* sqlite3.c:131512:20: */
var rc int32 = SQLITE_OK
var db uintptr = (*Parse)(unsafe.Pointer(pParse)).Fdb
@@ -110566,7 +113072,7 @@ func Xsqlite3ReadSchema(tls *libc.TLS, pParse uintptr) int32 { /* sqlite3.c:1306
// Check schema cookies in all databases. If any cookie is out
// of date set pParse->rc to SQLITE_SCHEMA. If all schema cookies
// make no changes to pParse->rc.
-func schemaIsValid(tls *libc.TLS, pParse uintptr) { /* sqlite3.c:130623:13: */
+func schemaIsValid(tls *libc.TLS, pParse uintptr) { /* sqlite3.c:131534:13: */
bp := tls.Alloc(4)
defer tls.Free(4)
@@ -110589,6 +113095,7 @@ func schemaIsValid(tls *libc.TLS, pParse uintptr) { /* sqlite3.c:130623:13: */
rc = Xsqlite3BtreeBeginTrans(tls, pBt, 0, uintptr(0))
if (rc == SQLITE_NOMEM) || (rc == (SQLITE_IOERR | (int32(12) << 8))) {
Xsqlite3OomFault(tls, db)
+ (*Parse)(unsafe.Pointer(pParse)).Frc = SQLITE_NOMEM
}
if rc != SQLITE_OK {
return
@@ -110618,7 +113125,7 @@ func schemaIsValid(tls *libc.TLS, pParse uintptr) { /* sqlite3.c:130623:13: */
//
// If the same database is attached more than once, the first
// attached database is returned.
-func Xsqlite3SchemaToIndex(tls *libc.TLS, db uintptr, pSchema uintptr) int32 { /* sqlite3.c:130672:20: */
+func Xsqlite3SchemaToIndex(tls *libc.TLS, db uintptr, pSchema uintptr) int32 { /* sqlite3.c:131584:20: */
var i int32 = -32768
// If pSchema is NULL, then return -32768. This happens when code in
@@ -110645,12 +113152,14 @@ func Xsqlite3SchemaToIndex(tls *libc.TLS, db uintptr, pSchema uintptr) int32 { /
}
// Free all memory allocations in the pParse object
-func Xsqlite3ParserReset(tls *libc.TLS, pParse uintptr) { /* sqlite3.c:130702:21: */
+func Xsqlite3ParserReset(tls *libc.TLS, pParse uintptr) { /* sqlite3.c:131614:21: */
var db uintptr = (*Parse)(unsafe.Pointer(pParse)).Fdb
for (*Parse)(unsafe.Pointer(pParse)).FpCleanup != 0 {
var pCleanup uintptr = (*Parse)(unsafe.Pointer(pParse)).FpCleanup
(*Parse)(unsafe.Pointer(pParse)).FpCleanup = (*ParseCleanup)(unsafe.Pointer(pCleanup)).FpNext
- (*(*func(*libc.TLS, uintptr, uintptr))(unsafe.Pointer((pCleanup + 16 /* &.xCleanup */))))(tls, db, (*ParseCleanup)(unsafe.Pointer(pCleanup)).FpPtr)
+ (*struct {
+ f func(*libc.TLS, uintptr, uintptr)
+ })(unsafe.Pointer(&struct{ uintptr }{(*ParseCleanup)(unsafe.Pointer(pCleanup)).FxCleanup})).f(tls, db, (*ParseCleanup)(unsafe.Pointer(pCleanup)).FpPtr)
Xsqlite3DbFreeNN(tls, db, pCleanup)
}
Xsqlite3DbFree(tls, db, (*Parse)(unsafe.Pointer(pParse)).FaLabel)
@@ -110696,7 +113205,7 @@ func Xsqlite3ParserReset(tls *libc.TLS, pParse uintptr) { /* sqlite3.c:130702:21
// return value thereafter. Something like this:
//
// pObj = sqlite3ParserAddCleanup(pParse, destructor, pObj);
-func Xsqlite3ParserAddCleanup(tls *libc.TLS, pParse uintptr, xCleanup uintptr, pPtr uintptr) uintptr { /* sqlite3.c:130750:21: */
+func Xsqlite3ParserAddCleanup(tls *libc.TLS, pParse uintptr, xCleanup uintptr, pPtr uintptr) uintptr { /* sqlite3.c:131662:21: */
var pCleanup uintptr = Xsqlite3DbMallocRaw(tls, (*Parse)(unsafe.Pointer(pParse)).Fdb, uint64(unsafe.Sizeof(ParseCleanup{})))
if pCleanup != 0 {
(*ParseCleanup)(unsafe.Pointer(pCleanup)).FpNext = (*Parse)(unsafe.Pointer(pParse)).FpCleanup
@@ -110704,14 +113213,16 @@ func Xsqlite3ParserAddCleanup(tls *libc.TLS, pParse uintptr, xCleanup uintptr, p
(*ParseCleanup)(unsafe.Pointer(pCleanup)).FpPtr = pPtr
(*ParseCleanup)(unsafe.Pointer(pCleanup)).FxCleanup = xCleanup
} else {
- (*(*func(*libc.TLS, uintptr, uintptr))(unsafe.Pointer(&xCleanup)))(tls, (*Parse)(unsafe.Pointer(pParse)).Fdb, pPtr)
+ (*struct {
+ f func(*libc.TLS, uintptr, uintptr)
+ })(unsafe.Pointer(&struct{ uintptr }{xCleanup})).f(tls, (*Parse)(unsafe.Pointer(pParse)).Fdb, pPtr)
pPtr = uintptr(0)
}
return pPtr
}
// Compile the UTF-8 encoded SQL statement zSql into a statement handle.
-func sqlite3Prepare(tls *libc.TLS, db uintptr, zSql uintptr, nBytes int32, prepFlags U32, pReprepare uintptr, ppStmt uintptr, pzTail uintptr) int32 { /* sqlite3.c:130774:12: */
+func sqlite3Prepare(tls *libc.TLS, db uintptr, zSql uintptr, nBytes int32, prepFlags U32, pReprepare uintptr, ppStmt uintptr, pzTail uintptr) int32 { /* sqlite3.c:131686:12: */
bp := tls.Alloc(432)
defer tls.Free(432)
@@ -110787,7 +113298,7 @@ __3:
goto __7
}
zDb = (*Db)(unsafe.Pointer((*Sqlite3)(unsafe.Pointer(db)).FaDb + uintptr(i)*32)).FzDbSName
- Xsqlite3ErrorWithMsg(tls, db, rc, ts+16293 /* "database schema ..." */, libc.VaList(bp, zDb))
+ Xsqlite3ErrorWithMsg(tls, db, rc, ts+16748 /* "database schema ..." */, libc.VaList(bp, zDb))
goto end_prepare
__7:
@@ -110807,7 +113318,7 @@ __2:
Xsqlite3VtabUnlockList(tls, db)
(*Parse)(unsafe.Pointer(bp + 16 /* &sParse */)).Fdb = db
- if !((nBytes >= 0) && ((nBytes == 0) || (int32(*(*int8)(unsafe.Pointer(zSql + uintptr((nBytes - 1))))) != 0))) {
+ if !((nBytes >= 0) && ((nBytes == 0) || (int32(*(*uint8)(unsafe.Pointer(zSql + uintptr((nBytes - 1))))) != 0))) {
goto __8
}
mxLen = *(*int32)(unsafe.Pointer((db + 128 /* &.aLimit */) + 1*4))
@@ -110815,7 +113326,7 @@ __2:
if !(nBytes > mxLen) {
goto __10
}
- Xsqlite3ErrorWithMsg(tls, db, SQLITE_TOOBIG, ts+16323 /* "statement too lo..." */, 0)
+ Xsqlite3ErrorWithMsg(tls, db, SQLITE_TOOBIG, ts+16778 /* "statement too lo..." */, 0)
rc = Xsqlite3ApiExit(tls, db, SQLITE_TOOBIG)
goto end_prepare
__10:
@@ -110855,6 +113366,7 @@ __14:
goto __15
}
(*Parse)(unsafe.Pointer(bp + 16 /* &sParse */)).Frc = SQLITE_NOMEM
+ (*Parse)(unsafe.Pointer(bp + 16 /* &sParse */)).FcheckSchema = U8(0)
__15:
;
if !(((*Parse)(unsafe.Pointer(bp+16 /* &sParse */)).Frc != SQLITE_OK) && ((*Parse)(unsafe.Pointer(bp+16 /* &sParse */)).Frc != SQLITE_DONE)) {
@@ -110877,7 +113389,7 @@ __19:
if !(*(*uintptr)(unsafe.Pointer(bp + 424 /* zErrMsg */)) != 0) {
goto __20
}
- Xsqlite3ErrorWithMsg(tls, db, rc, ts+2718 /* "%s" */, libc.VaList(bp+8, *(*uintptr)(unsafe.Pointer(bp + 424 /* zErrMsg */))))
+ Xsqlite3ErrorWithMsg(tls, db, rc, ts+2790 /* "%s" */, libc.VaList(bp+8, *(*uintptr)(unsafe.Pointer(bp + 424 /* zErrMsg */))))
Xsqlite3DbFree(tls, db, *(*uintptr)(unsafe.Pointer(bp + 424 /* zErrMsg */)))
goto __21
__20:
@@ -110911,13 +113423,13 @@ end_prepare:
return rc
}
-func sqlite3LockAndPrepare(tls *libc.TLS, db uintptr, zSql uintptr, nBytes int32, prepFlags U32, pOld uintptr, ppStmt uintptr, pzTail uintptr) int32 { /* sqlite3.c:130914:12: */
+func sqlite3LockAndPrepare(tls *libc.TLS, db uintptr, zSql uintptr, nBytes int32, prepFlags U32, pOld uintptr, ppStmt uintptr, pzTail uintptr) int32 { /* sqlite3.c:131827:12: */
var rc int32
var cnt int32 = 0
*(*uintptr)(unsafe.Pointer(ppStmt)) = uintptr(0)
if !(Xsqlite3SafetyCheckOk(tls, db) != 0) || (zSql == uintptr(0)) {
- return Xsqlite3MisuseError(tls, 130931)
+ return Xsqlite3MisuseError(tls, 131844)
}
Xsqlite3_mutex_enter(tls, (*Sqlite3)(unsafe.Pointer(db)).Fmutex)
Xsqlite3BtreeEnterAll(tls, db)
@@ -110943,7 +113455,7 @@ func sqlite3LockAndPrepare(tls *libc.TLS, db uintptr, zSql uintptr, nBytes int32
// if the statement cannot be recompiled because another connection has
// locked the sqlite3_schema table, return SQLITE_LOCKED. If any other error
// occurs, return SQLITE_SCHEMA.
-func Xsqlite3Reprepare(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:130960:20: */
+func Xsqlite3Reprepare(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:131873:20: */
bp := tls.Alloc(8)
defer tls.Free(8)
@@ -110982,14 +113494,14 @@ func Xsqlite3Reprepare(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:130960:20:
// sqlite3_step(). In the new version, the original SQL text is retained
// and the statement is automatically recompiled if an schema change
// occurs.
-func Xsqlite3_prepare(tls *libc.TLS, db uintptr, zSql uintptr, nBytes int32, ppStmt uintptr, pzTail uintptr) int32 { /* sqlite3.c:130999:16: */
+func Xsqlite3_prepare(tls *libc.TLS, db uintptr, zSql uintptr, nBytes int32, ppStmt uintptr, pzTail uintptr) int32 { /* sqlite3.c:131912:16: */
var rc int32
rc = sqlite3LockAndPrepare(tls, db, zSql, nBytes, uint32(0), uintptr(0), ppStmt, pzTail)
// VERIFY: F13021
return rc
}
-func Xsqlite3_prepare_v2(tls *libc.TLS, db uintptr, zSql uintptr, nBytes int32, ppStmt uintptr, pzTail uintptr) int32 { /* sqlite3.c:131011:16: */
+func Xsqlite3_prepare_v2(tls *libc.TLS, db uintptr, zSql uintptr, nBytes int32, ppStmt uintptr, pzTail uintptr) int32 { /* sqlite3.c:131924:16: */
var rc int32
// EVIDENCE-OF: R-37923-12173 The sqlite3_prepare_v2() interface works
// exactly the same as sqlite3_prepare_v3() with a zero prepFlags
@@ -111002,7 +113514,7 @@ func Xsqlite3_prepare_v2(tls *libc.TLS, db uintptr, zSql uintptr, nBytes int32,
return rc
}
-func Xsqlite3_prepare_v3(tls *libc.TLS, db uintptr, zSql uintptr, nBytes int32, prepFlags uint32, ppStmt uintptr, pzTail uintptr) int32 { /* sqlite3.c:131029:16: */
+func Xsqlite3_prepare_v3(tls *libc.TLS, db uintptr, zSql uintptr, nBytes int32, prepFlags uint32, ppStmt uintptr, pzTail uintptr) int32 { /* sqlite3.c:131942:16: */
var rc int32
// EVIDENCE-OF: R-56861-42673 sqlite3_prepare_v3() differs from
// sqlite3_prepare_v2() only in having the extra prepFlags parameter,
@@ -111019,7 +113531,7 @@ func Xsqlite3_prepare_v3(tls *libc.TLS, db uintptr, zSql uintptr, nBytes int32,
}
// Compile the UTF-16 encoded SQL statement zSql into a statement handle.
-func sqlite3Prepare16(tls *libc.TLS, db uintptr, zSql uintptr, nBytes int32, prepFlags U32, ppStmt uintptr, pzTail uintptr) int32 { /* sqlite3.c:131057:12: */
+func sqlite3Prepare16(tls *libc.TLS, db uintptr, zSql uintptr, nBytes int32, prepFlags U32, ppStmt uintptr, pzTail uintptr) int32 { /* sqlite3.c:131970:12: */
bp := tls.Alloc(8)
defer tls.Free(8)
@@ -111032,18 +113544,18 @@ func sqlite3Prepare16(tls *libc.TLS, db uintptr, zSql uintptr, nBytes int32, pre
*(*uintptr)(unsafe.Pointer(ppStmt)) = uintptr(0)
if !(Xsqlite3SafetyCheckOk(tls, db) != 0) || (zSql == uintptr(0)) {
- return Xsqlite3MisuseError(tls, 131078)
+ return Xsqlite3MisuseError(tls, 131991)
}
if nBytes >= 0 {
var sz int32
var z uintptr = zSql
- for sz = 0; (sz < nBytes) && ((int32(*(*int8)(unsafe.Pointer(z + uintptr(sz)))) != 0) || (int32(*(*int8)(unsafe.Pointer(z + uintptr((sz + 1))))) != 0)); sz = sz + (2) {
+ for sz = 0; (sz < nBytes) && ((int32(*(*uint8)(unsafe.Pointer(z + uintptr(sz)))) != 0) || (int32(*(*uint8)(unsafe.Pointer(z + uintptr((sz + 1))))) != 0)); sz = sz + (2) {
}
nBytes = sz
}
Xsqlite3_mutex_enter(tls, (*Sqlite3)(unsafe.Pointer(db)).Fmutex)
zSql8 = Xsqlite3Utf16to8(tls, db, zSql, nBytes, func() uint8 {
- if int32(*(*int8)(unsafe.Pointer(uintptr(unsafe.Pointer(&Xsqlite3one))))) == 0 {
+ if int32(*(*uint8)(unsafe.Pointer(uintptr(unsafe.Pointer(&Xsqlite3one))))) == 0 {
return uint8(SQLITE_UTF16BE)
}
return uint8(SQLITE_UTF16LE)
@@ -111072,21 +113584,21 @@ func sqlite3Prepare16(tls *libc.TLS, db uintptr, zSql uintptr, nBytes int32, pre
// sqlite3_step(). In the new version, the original SQL text is retained
// and the statement is automatically recompiled if an schema change
// occurs.
-func Xsqlite3_prepare16(tls *libc.TLS, db uintptr, zSql uintptr, nBytes int32, ppStmt uintptr, pzTail uintptr) int32 { /* sqlite3.c:131115:16: */
+func Xsqlite3_prepare16(tls *libc.TLS, db uintptr, zSql uintptr, nBytes int32, ppStmt uintptr, pzTail uintptr) int32 { /* sqlite3.c:132028:16: */
var rc int32
rc = sqlite3Prepare16(tls, db, zSql, nBytes, uint32(0), ppStmt, pzTail)
// VERIFY: F13021
return rc
}
-func Xsqlite3_prepare16_v2(tls *libc.TLS, db uintptr, zSql uintptr, nBytes int32, ppStmt uintptr, pzTail uintptr) int32 { /* sqlite3.c:131127:16: */
+func Xsqlite3_prepare16_v2(tls *libc.TLS, db uintptr, zSql uintptr, nBytes int32, ppStmt uintptr, pzTail uintptr) int32 { /* sqlite3.c:132040:16: */
var rc int32
rc = sqlite3Prepare16(tls, db, zSql, nBytes, uint32(SQLITE_PREPARE_SAVESQL), ppStmt, pzTail)
// VERIFY: F13021
return rc
}
-func Xsqlite3_prepare16_v3(tls *libc.TLS, db uintptr, zSql uintptr, nBytes int32, prepFlags uint32, ppStmt uintptr, pzTail uintptr) int32 { /* sqlite3.c:131139:16: */
+func Xsqlite3_prepare16_v3(tls *libc.TLS, db uintptr, zSql uintptr, nBytes int32, prepFlags uint32, ppStmt uintptr, pzTail uintptr) int32 { /* sqlite3.c:132052:16: */
var rc int32
rc = sqlite3Prepare16(tls, db, zSql, nBytes,
(uint32(SQLITE_PREPARE_SAVESQL) | (prepFlags & uint32(SQLITE_PREPARE_MASK))),
@@ -111115,12 +113627,12 @@ func Xsqlite3_prepare16_v3(tls *libc.TLS, db uintptr, zSql uintptr, nBytes int32
// how to process the DISTINCT keyword, to simplify passing that information
// into the selectInnerLoop() routine.
type DistinctCtx1 = struct {
- FisTnct U8
- FeTnctType U8
- _ [2]byte
- FtabTnct int32
- FaddrTnct int32
-} /* sqlite3.c:131180:9 */
+ FisTnct U8
+ FeTnctType U8
+ F__ccgo_pad1 [2]byte
+ FtabTnct int32
+ FaddrTnct int32
+} /* sqlite3.c:132093:9 */
//************* End of prepare.c ********************************************
//************* Begin file select.c *****************************************
@@ -111141,7 +113653,7 @@ type DistinctCtx1 = struct {
// An instance of the following object is used to record information about
// how to process the DISTINCT keyword, to simplify passing that information
// into the selectInnerLoop() routine.
-type DistinctCtx = DistinctCtx1 /* sqlite3.c:131180:28 */
+type DistinctCtx = DistinctCtx1 /* sqlite3.c:132093:28 */
// An instance of the following object is used to record information about
// the ORDER BY (or GROUP BY) clause of query is being coded.
@@ -111169,9 +113681,9 @@ type SortCtx1 = struct {
FlabelDone int32
FlabelOBLopt int32
FsortFlags U8
- _ [3]byte
+ F__ccgo_pad1 [3]byte
FpDeferredRowLoad uintptr
-} /* sqlite3.c:131206:9 */
+} /* sqlite3.c:132119:9 */
// An instance of the following object is used to record information about
// the ORDER BY (or GROUP BY) clause of query is being coded.
@@ -111189,19 +113701,19 @@ type SortCtx1 = struct {
// When the sorter-reference optimization is used, there is one entry in the
// aDefer[] array for each database table that may be read as values are
// extracted from the sorter.
-type SortCtx = SortCtx1 /* sqlite3.c:131206:24 */
+type SortCtx = SortCtx1 /* sqlite3.c:132119:24 */
type RowLoadInfo1 = struct {
- FregResult int32
- FecelFlags U8
- _ [3]byte
-} /* sqlite3.c:131206:9 */
+ FregResult int32
+ FecelFlags U8
+ F__ccgo_pad1 [3]byte
+} /* sqlite3.c:132119:9 */
// Delete all the content of a Select structure. Deallocate the structure
// itself depending on the value of bFree
//
// If bFree==1, call sqlite3DbFree() on the p object.
// If bFree==0, Leave the first Select object unfreed
-func clearSelect(tls *libc.TLS, db uintptr, p uintptr, bFree int32) { /* sqlite3.c:131236:13: */
+func clearSelect(tls *libc.TLS, db uintptr, p uintptr, bFree int32) { /* sqlite3.c:132149:13: */
for p != 0 {
var pPrior uintptr = (*Select)(unsafe.Pointer(p)).FpPrior
Xsqlite3ExprListDelete(tls, db, (*Select)(unsafe.Pointer(p)).FpEList)
@@ -111230,7 +113742,7 @@ func clearSelect(tls *libc.TLS, db uintptr, p uintptr, bFree int32) { /* sqlite3
}
// Initialize a SelectDest structure.
-func Xsqlite3SelectDestInit(tls *libc.TLS, pDest uintptr, eDest int32, iParm int32) { /* sqlite3.c:131265:21: */
+func Xsqlite3SelectDestInit(tls *libc.TLS, pDest uintptr, eDest int32, iParm int32) { /* sqlite3.c:132178:21: */
(*SelectDest)(unsafe.Pointer(pDest)).FeDest = U8(eDest)
(*SelectDest)(unsafe.Pointer(pDest)).FiSDParm = iParm
(*SelectDest)(unsafe.Pointer(pDest)).FiSDParm2 = 0
@@ -111241,7 +113753,7 @@ func Xsqlite3SelectDestInit(tls *libc.TLS, pDest uintptr, eDest int32, iParm int
// Allocate a new Select structure and return a pointer to that
// structure.
-func Xsqlite3SelectNew(tls *libc.TLS, pParse uintptr, pEList uintptr, pSrc uintptr, pWhere uintptr, pGroupBy uintptr, pHaving uintptr, pOrderBy uintptr, selFlags U32, pLimit uintptr) uintptr { /* sqlite3.c:131279:23: */
+func Xsqlite3SelectNew(tls *libc.TLS, pParse uintptr, pEList uintptr, pSrc uintptr, pWhere uintptr, pGroupBy uintptr, pHaving uintptr, pOrderBy uintptr, selFlags U32, pLimit uintptr) uintptr { /* sqlite3.c:132192:23: */
bp := tls.Alloc(128)
defer tls.Free(128)
@@ -111291,14 +113803,14 @@ func Xsqlite3SelectNew(tls *libc.TLS, pParse uintptr, pEList uintptr, pSrc uintp
}
// Delete the given Select structure and all of its substructures.
-func Xsqlite3SelectDelete(tls *libc.TLS, db uintptr, p uintptr) { /* sqlite3.c:131337:21: */
+func Xsqlite3SelectDelete(tls *libc.TLS, db uintptr, p uintptr) { /* sqlite3.c:132250:21: */
if p != 0 {
clearSelect(tls, db, p, 1)
}
}
// Return a pointer to the right-most SELECT statement in a compound.
-func findRightmost(tls *libc.TLS, p uintptr) uintptr { /* sqlite3.c:131344:15: */
+func findRightmost(tls *libc.TLS, p uintptr) uintptr { /* sqlite3.c:132257:15: */
for (*Select)(unsafe.Pointer(p)).FpNext != 0 {
p = (*Select)(unsafe.Pointer(p)).FpNext
}
@@ -111320,7 +113832,7 @@ func findRightmost(tls *libc.TLS, p uintptr) uintptr { /* sqlite3.c:131344:15: *
//
// If an illegal or unsupported join type is seen, then still return
// a join type, but put an error in the pParse structure.
-func Xsqlite3JoinType(tls *libc.TLS, pParse uintptr, pA uintptr, pB uintptr, pC uintptr) int32 { /* sqlite3.c:131366:20: */
+func Xsqlite3JoinType(tls *libc.TLS, pParse uintptr, pA uintptr, pB uintptr, pC uintptr) int32 { /* sqlite3.c:132279:20: */
bp := tls.Alloc(56)
defer tls.Free(56)
@@ -111357,24 +113869,24 @@ func Xsqlite3JoinType(tls *libc.TLS, pParse uintptr, pA uintptr, pB uintptr, pC
}
}
if ((jointype & (JT_INNER | JT_OUTER)) == (JT_INNER | JT_OUTER)) || ((jointype & JT_ERROR) != 0) {
- var zSp uintptr = ts + 9222 /* " " */
+ var zSp uintptr = ts + 9652 /* " " */
if pC == uintptr(0) {
zSp++
}
Xsqlite3ErrorMsg(tls, pParse,
- ts+16342 /* "unknown or unsup..." */, libc.VaList(bp, pA, pB, zSp, pC))
+ ts+16797 /* "unknown or unsup..." */, libc.VaList(bp, pA, pB, zSp, pC))
jointype = JT_INNER
} else if ((jointype & JT_OUTER) != 0) &&
((jointype & (JT_LEFT | JT_RIGHT)) != JT_LEFT) {
Xsqlite3ErrorMsg(tls, pParse,
- ts+16386 /* "RIGHT and FULL O..." */, 0)
+ ts+16841 /* "RIGHT and FULL O..." */, 0)
jointype = JT_INNER
}
return jointype
}
-var zKeyText = *(*[34]int8)(unsafe.Pointer(ts + 16441 /* "naturaleftouteri..." */)) /* sqlite3.c:131371:21 */
+var zKeyText = *(*[34]uint8)(unsafe.Pointer(ts + 16896 /* "naturaleftouteri..." */)) /* sqlite3.c:132284:21 */
var aKeyword = [7]struct {
Fi U8
FnChar U8
@@ -111387,11 +113899,11 @@ var aKeyword = [7]struct {
/* full */ {Fi: U8(19), FnChar: U8(4), Fcode: (U8((JT_LEFT | JT_RIGHT) | JT_OUTER))},
/* inner */ {Fi: U8(23), FnChar: U8(5), Fcode: U8(JT_INNER)},
/* cross */ {Fi: U8(28), FnChar: U8(5), Fcode: (U8(JT_INNER | JT_CROSS))},
-} /* sqlite3.c:131376:5 */
+} /* sqlite3.c:132289:5 */
// Return the index of a column in a table. Return -1 if the column
// is not contained in the table.
-func Xsqlite3ColumnIndex(tls *libc.TLS, pTab uintptr, zCol uintptr) int32 { /* sqlite3.c:131427:20: */
+func Xsqlite3ColumnIndex(tls *libc.TLS, pTab uintptr, zCol uintptr) int32 { /* sqlite3.c:132340:20: */
var i int32
var h U8 = Xsqlite3StrIHash(tls, zCol)
var pCol uintptr
@@ -111425,7 +113937,7 @@ __3:
// of the matching column and return TRUE.
//
// If not found, return FALSE.
-func tableAndColumnIndex(tls *libc.TLS, pSrc uintptr, N int32, zCol uintptr, piTab uintptr, piCol uintptr, bIgnoreHidden int32) int32 { /* sqlite3.c:131446:12: */
+func tableAndColumnIndex(tls *libc.TLS, pSrc uintptr, N int32, zCol uintptr, piTab uintptr, piCol uintptr, bIgnoreHidden int32) int32 { /* sqlite3.c:132359:12: */
var i int32 // For looping over tables in pSrc
var iCol int32 // Index of column matching zCol
@@ -111453,7 +113965,7 @@ func tableAndColumnIndex(tls *libc.TLS, pSrc uintptr, N int32, zCol uintptr, piT
// where tab1 is the iSrc'th table in SrcList pSrc and tab2 is the
// (iSrc+1)'th. Column col1 is column iColLeft of tab1, and col2 is
// column iColRight of tab2.
-func addWhereTerm(tls *libc.TLS, pParse uintptr, pSrc uintptr, iLeft int32, iColLeft int32, iRight int32, iColRight int32, isOuterJoin int32, ppWhere uintptr) { /* sqlite3.c:131484:13: */
+func addWhereTerm(tls *libc.TLS, pParse uintptr, pSrc uintptr, iLeft int32, iColLeft int32, iRight int32, iColRight int32, isOuterJoin int32, ppWhere uintptr) { /* sqlite3.c:132397:13: */
var db uintptr = (*Parse)(unsafe.Pointer(pParse)).Fdb
var pE1 uintptr
var pE2 uintptr
@@ -111495,7 +114007,7 @@ func addWhereTerm(tls *libc.TLS, pParse uintptr, pSrc uintptr, iLeft int32, iCol
// defer the handling of t1.x=5, it will be processed immediately
// after the t1 loop and rows with t1.x!=5 will never appear in
// the output, which is incorrect.
-func Xsqlite3SetJoinExpr(tls *libc.TLS, p uintptr, iTable int32) { /* sqlite3.c:131543:21: */
+func Xsqlite3SetJoinExpr(tls *libc.TLS, p uintptr, iTable int32) { /* sqlite3.c:132456:21: */
for p != 0 {
*(*U32)(unsafe.Pointer(p + 4 /* &.flags */)) |= (U32(EP_FromJoin))
@@ -111516,7 +114028,7 @@ func Xsqlite3SetJoinExpr(tls *libc.TLS, p uintptr, iTable int32) { /* sqlite3.c:
// an ordinary term that omits the EP_FromJoin mark.
//
// This happens when a LEFT JOIN is simplified into an ordinary JOIN.
-func unsetJoinExpr(tls *libc.TLS, p uintptr, iTable int32) { /* sqlite3.c:131566:13: */
+func unsetJoinExpr(tls *libc.TLS, p uintptr, iTable int32) { /* sqlite3.c:132479:13: */
for p != 0 {
if (((*Expr)(unsafe.Pointer((p))).Fflags & (U32(EP_FromJoin))) != U32(0)) &&
((iTable < 0) || ((*Expr)(unsafe.Pointer(p)).FiRightJoinTable == iTable)) {
@@ -111548,7 +114060,7 @@ func unsetJoinExpr(tls *libc.TLS, p uintptr, iTable int32) { /* sqlite3.c:131566
// also attached to the left entry.
//
// This routine returns the number of errors encountered.
-func sqliteProcessJoin(tls *libc.TLS, pParse uintptr, p uintptr) int32 { /* sqlite3.c:131600:12: */
+func sqliteProcessJoin(tls *libc.TLS, pParse uintptr, p uintptr) int32 { /* sqlite3.c:132513:12: */
bp := tls.Alloc(32)
defer tls.Free(32)
@@ -111580,7 +114092,7 @@ __1:
if (int32((*SrcItem)(unsafe.Pointer(pRight)).Ffg.Fjointype) & JT_NATURAL) != 0 {
if ((*SrcItem)(unsafe.Pointer(pRight)).FpOn != 0) || ((*SrcItem)(unsafe.Pointer(pRight)).FpUsing != 0) {
Xsqlite3ErrorMsg(tls, pParse,
- ts+16475 /* "a NATURAL join m..." */, libc.VaList(bp, 0))
+ ts+16930 /* "a NATURAL join m..." */, libc.VaList(bp, 0))
return 1
}
for j = 0; j < int32((*Table)(unsafe.Pointer(pRightTab)).FnCol); j++ {
@@ -111604,7 +114116,7 @@ __1:
// Disallow both ON and USING clauses in the same join
if ((*SrcItem)(unsafe.Pointer(pRight)).FpOn != 0) && ((*SrcItem)(unsafe.Pointer(pRight)).FpUsing != 0) {
Xsqlite3ErrorMsg(tls, pParse,
- ts+16525 /* "cannot have both..." */, 0)
+ ts+16980 /* "cannot have both..." */, 0)
return 1
}
@@ -111639,7 +114151,7 @@ __1:
if (iRightCol < 0) ||
!(tableAndColumnIndex(tls, pSrc, (i+1), zName, bp+24 /* &iLeft */, bp+28 /* &iLeftCol */, 0) != 0) {
Xsqlite3ErrorMsg(tls, pParse,
- ts+16580 /* "cannot join usin..." */, libc.VaList(bp+8, zName))
+ ts+17035 /* "cannot join usin..." */, libc.VaList(bp+8, zName))
return 1
}
addWhereTerm(tls, pParse, pSrc, *(*int32)(unsafe.Pointer(bp + 24 /* iLeft */)), *(*int32)(unsafe.Pointer(bp + 28 /* iLeftCol */)), (i + 1), iRightCol,
@@ -111662,11 +114174,11 @@ __3:
// An instance of this object holds information (beyond pParse and pSelect)
// needed to load the next result row that is to be added to the sorter.
-type RowLoadInfo = RowLoadInfo1 /* sqlite3.c:131692:28 */
+type RowLoadInfo = RowLoadInfo1 /* sqlite3.c:132605:28 */
// This routine does the work of loading query data into an array of
// registers so that it can be added to the sorter.
-func innerLoopLoadRow(tls *libc.TLS, pParse uintptr, pSelect uintptr, pInfo uintptr) { /* sqlite3.c:131706:13: */
+func innerLoopLoadRow(tls *libc.TLS, pParse uintptr, pSelect uintptr, pInfo uintptr) { /* sqlite3.c:132619:13: */
Xsqlite3ExprCodeExprList(tls, pParse, (*Select)(unsafe.Pointer(pSelect)).FpEList, (*RowLoadInfo)(unsafe.Pointer(pInfo)).FregResult,
0, (*RowLoadInfo)(unsafe.Pointer(pInfo)).FecelFlags)
}
@@ -111675,7 +114187,7 @@ func innerLoopLoadRow(tls *libc.TLS, pParse uintptr, pSelect uintptr, pInfo uint
// added into the sorter.
//
// Return the register in which the result is stored.
-func makeSorterRecord(tls *libc.TLS, pParse uintptr, pSort uintptr, pSelect uintptr, regBase int32, nBase int32) int32 { /* sqlite3.c:131727:12: */
+func makeSorterRecord(tls *libc.TLS, pParse uintptr, pSort uintptr, pSelect uintptr, regBase int32, nBase int32) int32 { /* sqlite3.c:132640:12: */
var nOBSat int32 = (*SortCtx)(unsafe.Pointer(pSort)).FnOBSat
var v uintptr = (*Parse)(unsafe.Pointer(pParse)).FpVdbe
var regOut int32 = libc.PreIncInt32(&(*Parse)(unsafe.Pointer(pParse)).FnMem, 1)
@@ -111688,7 +114200,7 @@ func makeSorterRecord(tls *libc.TLS, pParse uintptr, pSort uintptr, pSelect uint
// Generate code that will push the record in registers regData
// through regData+nData-1 onto the sorter.
-func pushOntoSorter(tls *libc.TLS, pParse uintptr, pSort uintptr, pSelect uintptr, regData int32, regOrigData int32, nData int32, nPrefixReg int32) { /* sqlite3.c:131748:13: */
+func pushOntoSorter(tls *libc.TLS, pParse uintptr, pSort uintptr, pSelect uintptr, regData int32, regOrigData int32, nData int32, nPrefixReg int32) { /* sqlite3.c:132661:13: */
var v uintptr = (*Parse)(unsafe.Pointer(pParse)).FpVdbe // Stmt under construction
var bSeq int32 = (libc.Bool32((int32((*SortCtx)(unsafe.Pointer(pSort)).FsortFlags) & SORTFLAG_UseSorter) == 0))
var nExpr int32 = (*ExprList)(unsafe.Pointer((*SortCtx)(unsafe.Pointer(pSort)).FpOrderBy)).FnExpr // No. of ORDER BY terms
@@ -111831,31 +114343,153 @@ func pushOntoSorter(tls *libc.TLS, pParse uintptr, pSort uintptr, pSelect uintpt
}
// Add code to implement the OFFSET
-func codeOffset(tls *libc.TLS, v uintptr, iOffset int32, iContinue int32) { /* sqlite3.c:131890:13: */
+func codeOffset(tls *libc.TLS, v uintptr, iOffset int32, iContinue int32) { /* sqlite3.c:132803:13: */
if iOffset > 0 {
Xsqlite3VdbeAddOp3(tls, v, OP_IfPos, iOffset, iContinue, 1)
}
}
-// Add code that will check to make sure the N registers starting at iMem
-// form a distinct entry. iTab is a sorting index that holds previously
-// seen combinations of the N values. A new entry is made in iTab
-// if the current N values are new.
+// Add code that will check to make sure the array of registers starting at
+// iMem form a distinct entry. This is used by both "SELECT DISTINCT ..." and
+// distinct aggregates ("SELECT count(DISTINCT ) ..."). Three strategies
+// are available. Which is used depends on the value of parameter eTnctType,
+// as follows:
//
-// A jump to addrRepeat is made and the N+1 values are popped from the
-// stack if the top N elements are not distinct.
-func codeDistinct(tls *libc.TLS, pParse uintptr, iTab int32, addrRepeat int32, N int32, iMem int32) { /* sqlite3.c:131910:13: */
- var v uintptr
- var r1 int32
+// WHERE_DISTINCT_UNORDERED/WHERE_DISTINCT_NOOP:
+// Build an ephemeral table that contains all entries seen before and
+// skip entries which have been seen before.
+//
+// Parameter iTab is the cursor number of an ephemeral table that must
+// be opened before the VM code generated by this routine is executed.
+// The ephemeral cursor table is queried for a record identical to the
+// record formed by the current array of registers. If one is found,
+// jump to VM address addrRepeat. Otherwise, insert a new record into
+// the ephemeral cursor and proceed.
+//
+// The returned value in this case is a copy of parameter iTab.
+//
+// WHERE_DISTINCT_ORDERED:
+// In this case rows are being delivered sorted order. The ephermal
+// table is not required. Instead, the current set of values
+// is compared against previous row. If they match, the new row
+// is not distinct and control jumps to VM address addrRepeat. Otherwise,
+// the VM program proceeds with processing the new row.
+//
+// The returned value in this case is the register number of the first
+// in an array of registers used to store the previous result row so that
+// it can be compared to the next. The caller must ensure that this
+// register is initialized to NULL. (The fixDistinctOpenEph() routine
+// will take care of this initialization.)
+//
+// WHERE_DISTINCT_UNIQUE:
+// In this case it has already been determined that the rows are distinct.
+// No special action is required. The return value is zero.
+//
+// Parameter pEList is the list of expressions used to generated the
+// contents of each row. It is used by this routine to determine (a)
+// how many elements there are in the array of registers and (b) the
+// collation sequences that should be used for the comparisons if
+// eTnctType is WHERE_DISTINCT_ORDERED.
+func codeDistinct(tls *libc.TLS, pParse uintptr, eTnctType int32, iTab int32, addrRepeat int32, pEList uintptr, regElem int32) int32 { /* sqlite3.c:132857:12: */
+ var iRet int32 = 0
+ var nResultCol int32 = (*ExprList)(unsafe.Pointer(pEList)).FnExpr
+ var v uintptr = (*Parse)(unsafe.Pointer(pParse)).FpVdbe
- v = (*Parse)(unsafe.Pointer(pParse)).FpVdbe
- r1 = Xsqlite3GetTempReg(tls, pParse)
- Xsqlite3VdbeAddOp4Int(tls, v, OP_Found, iTab, addrRepeat, iMem, N)
- Xsqlite3VdbeAddOp3(tls, v, OP_MakeRecord, iMem, N, r1)
- Xsqlite3VdbeAddOp4Int(tls, v, OP_IdxInsert, iTab, r1, iMem, N)
- Xsqlite3VdbeChangeP5(tls, v, uint16(OPFLAG_USESEEKRESULT))
- Xsqlite3ReleaseTempReg(tls, pParse, r1)
+ switch eTnctType {
+ case WHERE_DISTINCT_ORDERED:
+ {
+ var i int32
+ var iJump int32 // Jump destination
+ var regPrev int32 // Previous row content
+
+ // Allocate space for the previous row
+ iRet = libc.AssignInt32(®Prev, ((*Parse)(unsafe.Pointer(pParse)).FnMem + 1))
+ *(*int32)(unsafe.Pointer(pParse + 56 /* &.nMem */)) += (nResultCol)
+
+ iJump = (Xsqlite3VdbeCurrentAddr(tls, v) + nResultCol)
+ for i = 0; i < nResultCol; i++ {
+ var pColl uintptr = Xsqlite3ExprCollSeq(tls, pParse, (*ExprList_item)(unsafe.Pointer((pEList+8 /* &.a */)+uintptr(i)*32)).FpExpr)
+ if i < (nResultCol - 1) {
+ Xsqlite3VdbeAddOp3(tls, v, OP_Ne, (regElem + i), iJump, (regPrev + i))
+
+ } else {
+ Xsqlite3VdbeAddOp3(tls, v, OP_Eq, (regElem + i), addrRepeat, (regPrev + i))
+
+ }
+ Xsqlite3VdbeChangeP4(tls, v, -1, pColl, -2)
+ Xsqlite3VdbeChangeP5(tls, v, uint16(SQLITE_NULLEQ))
+ }
+
+ Xsqlite3VdbeAddOp3(tls, v, OP_Copy, regElem, regPrev, (nResultCol - 1))
+ break
+
+ }
+
+ case WHERE_DISTINCT_UNIQUE:
+ {
+ // nothing to do
+ break
+
+ }
+
+ default:
+ {
+ var r1 int32 = Xsqlite3GetTempReg(tls, pParse)
+ Xsqlite3VdbeAddOp4Int(tls, v, OP_Found, iTab, addrRepeat, regElem, nResultCol)
+
+ Xsqlite3VdbeAddOp3(tls, v, OP_MakeRecord, regElem, nResultCol, r1)
+ Xsqlite3VdbeAddOp4Int(tls, v, OP_IdxInsert, iTab, r1, regElem, nResultCol)
+ Xsqlite3VdbeChangeP5(tls, v, uint16(OPFLAG_USESEEKRESULT))
+ Xsqlite3ReleaseTempReg(tls, pParse, r1)
+ iRet = iTab
+ break
+
+ }
+ }
+
+ return iRet
+}
+
+// This routine runs after codeDistinct(). It makes necessary
+// adjustments to the OP_OpenEphemeral opcode that the codeDistinct()
+// routine made use of. This processing must be done separately since
+// sometimes codeDistinct is called before the OP_OpenEphemeral is actually
+// laid down.
+//
+// WHERE_DISTINCT_NOOP:
+// WHERE_DISTINCT_UNORDERED:
+//
+// No adjustments necessary. This function is a no-op.
+//
+// WHERE_DISTINCT_UNIQUE:
+//
+// The ephemeral table is not needed. So change the
+// OP_OpenEphemeral opcode into an OP_Noop.
+//
+// WHERE_DISTINCT_ORDERED:
+//
+// The ephemeral table is not needed. But we do need register
+// iVal to be initialized to NULL. So change the OP_OpenEphemeral
+// into an OP_Null on the iVal register.
+func fixDistinctOpenEph(tls *libc.TLS, pParse uintptr, eTnctType int32, iVal int32, iOpenEphAddr int32) { /* sqlite3.c:132941:13: */
+ if (eTnctType == WHERE_DISTINCT_UNIQUE) || (eTnctType == WHERE_DISTINCT_ORDERED) {
+ var v uintptr = (*Parse)(unsafe.Pointer(pParse)).FpVdbe
+ Xsqlite3VdbeChangeToNoop(tls, v, iOpenEphAddr)
+ if int32((*VdbeOp)(unsafe.Pointer(Xsqlite3VdbeGetOp(tls, v, (iOpenEphAddr+1)))).Fopcode) == OP_Explain {
+ Xsqlite3VdbeChangeToNoop(tls, v, (iOpenEphAddr + 1))
+ }
+ if eTnctType == WHERE_DISTINCT_ORDERED {
+ // Change the OP_OpenEphemeral to an OP_Null that sets the MEM_Cleared
+ // bit on the first register of the previous value. This will cause the
+ // OP_Ne added in codeDistinct() to always fail on the first iteration of
+ // the loop even if the first row is all NULLs.
+ var pOp uintptr = Xsqlite3VdbeGetOp(tls, v, iOpenEphAddr)
+ (*VdbeOp)(unsafe.Pointer(pOp)).Fopcode = U8(OP_Null)
+ (*VdbeOp)(unsafe.Pointer(pOp)).Fp1 = 1
+ (*VdbeOp)(unsafe.Pointer(pOp)).Fp2 = iVal
+ }
+ }
}
// This routine generates the code for the inside of the inner loop
@@ -111865,7 +114499,7 @@ func codeDistinct(tls *libc.TLS, pParse uintptr, iTab int32, addrRepeat int32, N
// are evaluated in order to get the data for this row. If srcTab is
// zero or more, then data is pulled from srcTab and p->pEList is used only
// to get the number of columns and the collation sequence for each column.
-func selectInnerLoop(tls *libc.TLS, pParse uintptr, p uintptr, srcTab int32, pSort uintptr, pDistinct uintptr, pDest uintptr, iContinue int32, iBreak int32) { /* sqlite3.c:132019:13: */
+func selectInnerLoop(tls *libc.TLS, pParse uintptr, p uintptr, srcTab int32, pSort uintptr, pDistinct uintptr, pDest uintptr, iContinue int32, iBreak int32) { /* sqlite3.c:133056:13: */
bp := tls.Alloc(8)
defer tls.Free(8)
@@ -111982,66 +114616,11 @@ func selectInnerLoop(tls *libc.TLS, pParse uintptr, p uintptr, srcTab int32, pSo
// and this row has been seen before, then do not make this row
// part of the result.
if hasDistinct != 0 {
- switch int32((*DistinctCtx)(unsafe.Pointer(pDistinct)).FeTnctType) {
- case WHERE_DISTINCT_ORDERED:
- {
- var pOp uintptr // No longer required OpenEphemeral instr.
- var iJump int32 // Jump destination
- var regPrev int32 // Previous row content
-
- // Allocate space for the previous row
- regPrev = ((*Parse)(unsafe.Pointer(pParse)).FnMem + 1)
- *(*int32)(unsafe.Pointer(pParse + 56 /* &.nMem */)) += (nResultCol)
-
- // Change the OP_OpenEphemeral coded earlier to an OP_Null
- // sets the MEM_Cleared bit on the first register of the
- // previous value. This will cause the OP_Ne below to always
- // fail on the first iteration of the loop even if the first
- // row is all NULLs.
- Xsqlite3VdbeChangeToNoop(tls, v, (*DistinctCtx)(unsafe.Pointer(pDistinct)).FaddrTnct)
- pOp = Xsqlite3VdbeGetOp(tls, v, (*DistinctCtx)(unsafe.Pointer(pDistinct)).FaddrTnct)
- (*VdbeOp)(unsafe.Pointer(pOp)).Fopcode = U8(OP_Null)
- (*VdbeOp)(unsafe.Pointer(pOp)).Fp1 = 1
- (*VdbeOp)(unsafe.Pointer(pOp)).Fp2 = regPrev
- pOp = uintptr(0) // Ensure pOp is not used after sqlite3VdbeAddOp()
-
- iJump = (Xsqlite3VdbeCurrentAddr(tls, v) + nResultCol)
- for i = 0; i < nResultCol; i++ {
- var pColl uintptr = Xsqlite3ExprCollSeq(tls, pParse, (*ExprList_item)(unsafe.Pointer(((*Select)(unsafe.Pointer(p)).FpEList+8 /* &.a */)+uintptr(i)*32)).FpExpr)
- if i < (nResultCol - 1) {
- Xsqlite3VdbeAddOp3(tls, v, OP_Ne, (regResult + i), iJump, (regPrev + i))
-
- } else {
- Xsqlite3VdbeAddOp3(tls, v, OP_Eq, (regResult + i), iContinue, (regPrev + i))
-
- }
- Xsqlite3VdbeChangeP4(tls, v, -1, pColl, -2)
- Xsqlite3VdbeChangeP5(tls, v, uint16(SQLITE_NULLEQ))
- }
-
- Xsqlite3VdbeAddOp3(tls, v, OP_Copy, regResult, regPrev, (nResultCol - 1))
- break
-
- }
- fallthrough
+ var eType int32 = int32((*DistinctCtx)(unsafe.Pointer(pDistinct)).FeTnctType)
+ var iTab int32 = (*DistinctCtx)(unsafe.Pointer(pDistinct)).FtabTnct
- case WHERE_DISTINCT_UNIQUE:
- {
- Xsqlite3VdbeChangeToNoop(tls, v, (*DistinctCtx)(unsafe.Pointer(pDistinct)).FaddrTnct)
- break
-
- }
- fallthrough
-
- default:
- {
-
- codeDistinct(tls, pParse, (*DistinctCtx)(unsafe.Pointer(pDistinct)).FtabTnct, iContinue, nResultCol,
- regResult)
- break
-
- }
- }
+ iTab = codeDistinct(tls, pParse, eType, iTab, iContinue, (*Select)(unsafe.Pointer(p)).FpEList, regResult)
+ fixDistinctOpenEph(tls, pParse, eType, iTab, (*DistinctCtx)(unsafe.Pointer(pDistinct)).FaddrTnct)
if pSort == uintptr(0) {
codeOffset(tls, v, (*Select)(unsafe.Pointer(p)).FiOffset, iContinue)
}
@@ -112276,7 +114855,7 @@ func selectInnerLoop(tls *libc.TLS, pParse uintptr, p uintptr, srcTab int32, pSo
// Allocate a KeyInfo object sufficient for an index of N key columns and
// X extra columns.
-func Xsqlite3KeyInfoAlloc(tls *libc.TLS, db uintptr, N int32, X int32) uintptr { /* sqlite3.c:132461:24: */
+func Xsqlite3KeyInfoAlloc(tls *libc.TLS, db uintptr, N int32, X int32) uintptr { /* sqlite3.c:133450:24: */
var nExtra int32 = (int32(((uint64(N + X)) * (uint64(unsafe.Sizeof(uintptr(0))) + uint64(1))) - uint64(unsafe.Sizeof(uintptr(0)))))
var p uintptr = Xsqlite3DbMallocRawNN(tls, db, (uint64(uint64(unsafe.Sizeof(KeyInfo{})) + uint64(nExtra))))
if p != 0 {
@@ -112294,7 +114873,7 @@ func Xsqlite3KeyInfoAlloc(tls *libc.TLS, db uintptr, N int32, X int32) uintptr {
}
// Deallocate a KeyInfo object
-func Xsqlite3KeyInfoUnref(tls *libc.TLS, p uintptr) { /* sqlite3.c:132481:21: */
+func Xsqlite3KeyInfoUnref(tls *libc.TLS, p uintptr) { /* sqlite3.c:133470:21: */
if p != 0 {
(*KeyInfo)(unsafe.Pointer(p)).FnRef--
@@ -112305,7 +114884,7 @@ func Xsqlite3KeyInfoUnref(tls *libc.TLS, p uintptr) { /* sqlite3.c:132481:21: */
}
// Make a new pointer to a KeyInfo object
-func Xsqlite3KeyInfoRef(tls *libc.TLS, p uintptr) uintptr { /* sqlite3.c:132492:24: */
+func Xsqlite3KeyInfoRef(tls *libc.TLS, p uintptr) uintptr { /* sqlite3.c:133481:24: */
if p != 0 {
(*KeyInfo)(unsafe.Pointer(p)).FnRef++
@@ -112325,7 +114904,7 @@ func Xsqlite3KeyInfoRef(tls *libc.TLS, p uintptr) uintptr { /* sqlite3.c:132492:
// Space to hold the KeyInfo structure is obtained from malloc. The calling
// function is responsible for seeing that this structure is eventually
// freed.
-func Xsqlite3KeyInfoFromExprList(tls *libc.TLS, pParse uintptr, pList uintptr, iStart int32, nExtra int32) uintptr { /* sqlite3.c:132524:24: */
+func Xsqlite3KeyInfoFromExprList(tls *libc.TLS, pParse uintptr, pList uintptr, iStart int32, nExtra int32) uintptr { /* sqlite3.c:133513:24: */
var nExpr int32
var pInfo uintptr
var pItem uintptr
@@ -112359,20 +114938,20 @@ func Xsqlite3KeyInfoFromExprList(tls *libc.TLS, pParse uintptr, pList uintptr, i
}
// Name of the connection operator, used for error messages.
-func Xsqlite3SelectOpName(tls *libc.TLS, id int32) uintptr { /* sqlite3.c:132551:27: */
+func Xsqlite3SelectOpName(tls *libc.TLS, id int32) uintptr { /* sqlite3.c:133540:27: */
var z uintptr
switch id {
case TK_ALL:
- z = ts + 16644 /* "UNION ALL" */
+ z = ts + 17099 /* "UNION ALL" */
break
case TK_INTERSECT:
- z = ts + 16654 /* "INTERSECT" */
+ z = ts + 17109 /* "INTERSECT" */
break
case TK_EXCEPT:
- z = ts + 16664 /* "EXCEPT" */
+ z = ts + 17119 /* "EXCEPT" */
break
default:
- z = ts + 16671 /* "UNION" */
+ z = ts + 17126 /* "UNION" */
break
}
return z
@@ -112386,11 +114965,11 @@ func Xsqlite3SelectOpName(tls *libc.TLS, id int32) uintptr { /* sqlite3.c:132551
//
// where xxx is one of "DISTINCT", "ORDER BY" or "GROUP BY". Exactly which
// is determined by the zUsage argument.
-func explainTempTable(tls *libc.TLS, pParse uintptr, zUsage uintptr) { /* sqlite3.c:132573:13: */
+func explainTempTable(tls *libc.TLS, pParse uintptr, zUsage uintptr) { /* sqlite3.c:133562:13: */
bp := tls.Alloc(8)
defer tls.Free(8)
- Xsqlite3VdbeExplain(tls, pParse, uint8(0), ts+16677 /* "USE TEMP B-TREE ..." */, libc.VaList(bp, zUsage))
+ Xsqlite3VdbeExplain(tls, pParse, uint8(0), ts+17132 /* "USE TEMP B-TREE ..." */, libc.VaList(bp, zUsage))
}
// Assign expression b to lvalue a. A second, no-op, version of this macro
@@ -112403,7 +114982,7 @@ func explainTempTable(tls *libc.TLS, pParse uintptr, zUsage uintptr) { /* sqlite
// then the results were placed in a sorter. After the loop is terminated
// we need to run the sorter and output the results. The following
// routine generates the code needed to do that.
-func generateSortTail(tls *libc.TLS, pParse uintptr, p uintptr, pSort uintptr, nColumn int32, pDest uintptr) { /* sqlite3.c:132599:13: */
+func generateSortTail(tls *libc.TLS, pParse uintptr, p uintptr, pSort uintptr, nColumn int32, pDest uintptr) { /* sqlite3.c:133588:13: */
var v uintptr = (*Parse)(unsafe.Pointer(pParse)).FpVdbe // The prepared statement
var addrBreak int32 = (*SortCtx)(unsafe.Pointer(pSort)).FlabelDone // Jump here to exit loop
var addrContinue int32 = Xsqlite3VdbeMakeLabel(tls, pParse) // Jump here for next cycle
@@ -112579,7 +115158,7 @@ func generateSortTail(tls *libc.TLS, pParse uintptr, p uintptr, pSort uintptr, n
//
// This routine has either 3 or 6 parameters depending on whether or not
// the SQLITE_ENABLE_COLUMN_METADATA compile-time option is used.
-func columnTypeImpl(tls *libc.TLS, pNC uintptr, pExpr uintptr, pzOrigDb uintptr, pzOrigTab uintptr, pzOrigCol uintptr) uintptr { /* sqlite3.c:132824:19: */
+func columnTypeImpl(tls *libc.TLS, pNC uintptr, pExpr uintptr, pzOrigDb uintptr, pzOrigTab uintptr, pzOrigCol uintptr) uintptr { /* sqlite3.c:133813:19: */
bp := tls.Alloc(136)
defer tls.Free(136)
@@ -112635,7 +115214,8 @@ func columnTypeImpl(tls *libc.TLS, pNC uintptr, pExpr uintptr, pzOrigDb uintptr,
// The "table" is actually a sub-select or a view in the FROM clause
// of the SELECT statement. Return the declaration type and origin
// data for the result-set column of the sub-select.
- if (iCol >= 0) && (iCol < (*ExprList)(unsafe.Pointer((*Select)(unsafe.Pointer(pS)).FpEList)).FnExpr) {
+ if (iCol < (*ExprList)(unsafe.Pointer((*Select)(unsafe.Pointer(pS)).FpEList)).FnExpr) &&
+ (iCol >= 0) {
// If iCol is less than zero, then the expression requests the
// rowid of the sub-select or view. This expression is legal (see
// test case misc2.2.2) - it always evaluates to NULL.
@@ -112655,8 +115235,8 @@ func columnTypeImpl(tls *libc.TLS, pNC uintptr, pExpr uintptr, pzOrigDb uintptr,
}
if iCol < 0 {
- zType = ts + 10931 /* "INTEGER" */
- *(*uintptr)(unsafe.Pointer(bp + 72 /* zOrigCol */)) = ts + 14302 /* "rowid" */
+ zType = ts + 11384 /* "INTEGER" */
+ *(*uintptr)(unsafe.Pointer(bp + 72 /* zOrigCol */)) = ts + 14757 /* "rowid" */
} else {
*(*uintptr)(unsafe.Pointer(bp + 72 /* zOrigCol */)) = (*Column)(unsafe.Pointer((*Table)(unsafe.Pointer(pTab)).FaCol + uintptr(iCol)*32)).FzName
zType = Xsqlite3ColumnType(tls, ((*Table)(unsafe.Pointer(pTab)).FaCol + uintptr(iCol)*32), uintptr(0))
@@ -112700,7 +115280,7 @@ func columnTypeImpl(tls *libc.TLS, pNC uintptr, pExpr uintptr, pzOrigDb uintptr,
// Generate code that will tell the VDBE the declaration types of columns
// in the result set.
-func generateColumnTypes(tls *libc.TLS, pParse uintptr, pTabList uintptr, pEList uintptr) { /* sqlite3.c:132967:13: */
+func generateColumnTypes(tls *libc.TLS, pParse uintptr, pTabList uintptr, pEList uintptr) { /* sqlite3.c:133962:13: */
bp := tls.Alloc(80)
defer tls.Free(80)
@@ -112757,7 +115337,7 @@ func generateColumnTypes(tls *libc.TLS, pParse uintptr, pTabList uintptr, pEList
// full=ON, short=ANY: If the result refers directly to a table column,
// then the result column name with the table name
// prefix, ex: TABLE.COLUMN. Otherwise use zSpan.
-func generateColumnNames(tls *libc.TLS, pParse uintptr, pSelect uintptr) { /* sqlite3.c:133034:13: */
+func Xsqlite3GenerateColumnNames(tls *libc.TLS, pParse uintptr, pSelect uintptr) { /* sqlite3.c:134029:21: */
bp := tls.Alloc(24)
defer tls.Free(24)
@@ -112795,7 +115375,7 @@ func generateColumnNames(tls *libc.TLS, pParse uintptr, pSelect uintptr) { /* sq
// Agg processing has not run yet
// Covering idx not yet coded
- if ((*ExprList_item)(unsafe.Pointer((pEList+8 /* &.a */)+uintptr(i)*32)).FzEName != 0) && ((int32(*(*uint8)(unsafe.Pointer(((pEList + 8 /* &.a */) + uintptr(i)*32) + 20 /* &.eEName */)) >> 6 & 0x3)) == ENAME_NAME) {
+ if ((*ExprList_item)(unsafe.Pointer((pEList+8 /* &.a */)+uintptr(i)*32)).FzEName != 0) && ((int32(*(*uint8)(unsafe.Pointer(((pEList + 8 /* &.a */) + uintptr(i)*32) + 20 /* &.eEName */)) & 0xc0 >> 6)) == ENAME_NAME) {
// An AS clause always takes first priority
var zName uintptr = (*ExprList_item)(unsafe.Pointer((pEList + 8 /* &.a */) + uintptr(i)*32)).FzEName
Xsqlite3VdbeSetColName(tls, v, i, COLNAME_NAME, zName, libc.UintptrFromInt32(-1))
@@ -112809,13 +115389,13 @@ func generateColumnNames(tls *libc.TLS, pParse uintptr, pSelect uintptr) { /* sq
}
if iCol < 0 {
- zCol = ts + 14302 /* "rowid" */
+ zCol = ts + 14757 /* "rowid" */
} else {
zCol = (*Column)(unsafe.Pointer((*Table)(unsafe.Pointer(pTab)).FaCol + uintptr(iCol)*32)).FzName
}
if fullName != 0 {
var zName uintptr = uintptr(0)
- zName = Xsqlite3MPrintf(tls, db, ts+10332 /* "%s.%s" */, libc.VaList(bp, (*Table)(unsafe.Pointer(pTab)).FzName, zCol))
+ zName = Xsqlite3MPrintf(tls, db, ts+10785 /* "%s.%s" */, libc.VaList(bp, (*Table)(unsafe.Pointer(pTab)).FzName, zCol))
Xsqlite3VdbeSetColName(tls, v, i, COLNAME_NAME, zName, *(*uintptr)(unsafe.Pointer(&struct{ f func(*libc.TLS, uintptr) }{Xsqlite3OomFault})))
} else {
Xsqlite3VdbeSetColName(tls, v, i, COLNAME_NAME, zCol, libc.UintptrFromInt32(-1))
@@ -112823,7 +115403,7 @@ func generateColumnNames(tls *libc.TLS, pParse uintptr, pSelect uintptr) { /* sq
} else {
var z uintptr = (*ExprList_item)(unsafe.Pointer((pEList + 8 /* &.a */) + uintptr(i)*32)).FzEName
if z == uintptr(0) {
- z = Xsqlite3MPrintf(tls, db, ts+16700 /* "column%d" */, libc.VaList(bp+16, (i+1)))
+ z = Xsqlite3MPrintf(tls, db, ts+17155 /* "column%d" */, libc.VaList(bp+16, (i+1)))
} else {
z = Xsqlite3DbStrDup(tls, db, z)
}
@@ -112852,8 +115432,8 @@ func generateColumnNames(tls *libc.TLS, pParse uintptr, pSelect uintptr) { /* sq
// and will break if those assumptions changes. Hence, use extreme caution
// when modifying this routine to avoid breaking legacy.
//
-// See Also: generateColumnNames()
-func Xsqlite3ColumnsFromExprList(tls *libc.TLS, pParse uintptr, pEList uintptr, pnCol uintptr, paCol uintptr) int32 { /* sqlite3.c:133126:20: */
+// See Also: sqlite3GenerateColumnNames()
+func Xsqlite3ColumnsFromExprList(tls *libc.TLS, pParse uintptr, pEList uintptr, pnCol uintptr, paCol uintptr) int32 { /* sqlite3.c:134121:20: */
bp := tls.Alloc(60)
defer tls.Free(60)
@@ -112895,7 +115475,7 @@ __1:
}
{
// Get an appropriate name for the column
- if ((libc.AssignUintptr(&zName, (*ExprList_item)(unsafe.Pointer((pEList+8 /* &.a */)+uintptr(i)*32)).FzEName)) != uintptr(0)) && ((int32(*(*uint8)(unsafe.Pointer(((pEList + 8 /* &.a */) + uintptr(i)*32) + 20 /* &.eEName */)) >> 6 & 0x3)) == ENAME_NAME) {
+ if ((libc.AssignUintptr(&zName, (*ExprList_item)(unsafe.Pointer((pEList+8 /* &.a */)+uintptr(i)*32)).FzEName)) != uintptr(0)) && ((int32(*(*uint8)(unsafe.Pointer(((pEList + 8 /* &.a */) + uintptr(i)*32) + 20 /* &.eEName */)) & 0xc0 >> 6)) == ENAME_NAME) {
// If the column contains an "AS " phrase, use as the name
} else {
var pColExpr uintptr = Xsqlite3ExprSkipCollateAndLikely(tls, (*ExprList_item)(unsafe.Pointer((pEList+8 /* &.a */)+uintptr(i)*32)).FpExpr)
@@ -112912,7 +115492,7 @@ __1:
if iCol >= 0 {
zName = (*Column)(unsafe.Pointer((*Table)(unsafe.Pointer(pTab)).FaCol + uintptr(iCol)*32)).FzName
} else {
- zName = ts + 14302 /* "rowid" */
+ zName = ts + 14757 /* "rowid" */
}
} else if int32((*Expr)(unsafe.Pointer(pColExpr)).Fop) == TK_ID {
@@ -112925,7 +115505,7 @@ __1:
if (zName != 0) && !(Xsqlite3IsTrueOrFalse(tls, zName) != 0) {
zName = Xsqlite3DbStrDup(tls, db, zName)
} else {
- zName = Xsqlite3MPrintf(tls, db, ts+16700 /* "column%d" */, libc.VaList(bp, (i+1)))
+ zName = Xsqlite3MPrintf(tls, db, ts+17155 /* "column%d" */, libc.VaList(bp, (i+1)))
}
// Make sure the column name is unique. If the name is not unique,
@@ -112934,13 +115514,13 @@ __1:
for (zName != 0) && (Xsqlite3HashFind(tls, bp+32 /* &ht */, zName) != uintptr(0)) {
nName = Xsqlite3Strlen30(tls, zName)
if nName > 0 {
- for j = (nName - 1); (j > 0) && ((int32(Xsqlite3CtypeMap[uint8(*(*int8)(unsafe.Pointer(zName + uintptr(j))))]) & 0x04) != 0); j-- {
+ for j = (nName - 1); (j > 0) && ((int32(Xsqlite3CtypeMap[uint8(*(*uint8)(unsafe.Pointer(zName + uintptr(j))))]) & 0x04) != 0); j-- {
}
- if int32(*(*int8)(unsafe.Pointer(zName + uintptr(j)))) == ':' {
+ if int32(*(*uint8)(unsafe.Pointer(zName + uintptr(j)))) == ':' {
nName = j
}
}
- zName = Xsqlite3MPrintf(tls, db, ts+16709 /* "%.*z:%u" */, libc.VaList(bp+8, nName, zName, libc.PreIncUint32(&*(*U32)(unsafe.Pointer(bp + 56 /* cnt */)), 1)))
+ zName = Xsqlite3MPrintf(tls, db, ts+17164 /* "%.*z:%u" */, libc.VaList(bp+8, nName, zName, libc.PreIncUint32(&*(*U32)(unsafe.Pointer(bp + 56 /* cnt */)), 1)))
if *(*U32)(unsafe.Pointer(bp + 56 /* cnt */)) > U32(3) {
Xsqlite3_randomness(tls, int32(unsafe.Sizeof(U32(0))), bp+56 /* &cnt */)
}
@@ -112983,7 +115563,7 @@ __3:
//
// This routine requires that all identifiers in the SELECT
// statement be resolved.
-func Xsqlite3SelectAddColumnTypeAndCollation(tls *libc.TLS, pParse uintptr, pTab uintptr, pSelect uintptr, aff int8) { /* sqlite3.c:133230:21: */
+func Xsqlite3SelectAddColumnTypeAndCollation(tls *libc.TLS, pParse uintptr, pTab uintptr, pSelect uintptr, aff uint8) { /* sqlite3.c:134225:21: */
bp := tls.Alloc(56)
defer tls.Free(56)
@@ -113048,7 +115628,7 @@ __3:
// Given a SELECT statement, generate a Table structure that describes
// the result set of that SELECT.
-func Xsqlite3ResultSetOfSelect(tls *libc.TLS, pParse uintptr, pSelect uintptr, aff int8) uintptr { /* sqlite3.c:133281:22: */
+func Xsqlite3ResultSetOfSelect(tls *libc.TLS, pParse uintptr, pSelect uintptr, aff uint8) uintptr { /* sqlite3.c:134276:22: */
var pTab uintptr
var db uintptr = (*Parse)(unsafe.Pointer(pParse)).Fdb
var savedFlags U64
@@ -113083,7 +115663,7 @@ func Xsqlite3ResultSetOfSelect(tls *libc.TLS, pParse uintptr, pSelect uintptr, a
// Get a VDBE for the given parser context. Create a new one if necessary.
// If an error occurs, return NULL and leave a message in pParse.
-func Xsqlite3GetVdbe(tls *libc.TLS, pParse uintptr) uintptr { /* sqlite3.c:133314:21: */
+func Xsqlite3GetVdbe(tls *libc.TLS, pParse uintptr) uintptr { /* sqlite3.c:134309:21: */
if (*Parse)(unsafe.Pointer(pParse)).FpVdbe != 0 {
return (*Parse)(unsafe.Pointer(pParse)).FpVdbe
}
@@ -113115,7 +115695,7 @@ func Xsqlite3GetVdbe(tls *libc.TLS, pParse uintptr) uintptr { /* sqlite3.c:13331
// redefined. The UNION ALL operator uses this property to force
// the reuse of the same limit and offset registers across multiple
// SELECT statements.
-func computeLimitRegisters(tls *libc.TLS, pParse uintptr, p uintptr, iBreak int32) { /* sqlite3.c:133350:13: */
+func computeLimitRegisters(tls *libc.TLS, pParse uintptr, p uintptr, iBreak int32) { /* sqlite3.c:134345:13: */
bp := tls.Alloc(4)
defer tls.Free(4)
@@ -113172,7 +115752,7 @@ func computeLimitRegisters(tls *libc.TLS, pParse uintptr, p uintptr, iBreak int3
//
// The collating sequence for the compound select is taken from the
// left-most term of the select that has a collating sequence.
-func multiSelectCollSeq(tls *libc.TLS, pParse uintptr, p uintptr, iCol int32) uintptr { /* sqlite3.c:133407:16: */
+func multiSelectCollSeq(tls *libc.TLS, pParse uintptr, p uintptr, iCol int32) uintptr { /* sqlite3.c:134402:16: */
var pRet uintptr
if (*Select)(unsafe.Pointer(p)).FpPrior != 0 {
pRet = multiSelectCollSeq(tls, pParse, (*Select)(unsafe.Pointer(p)).FpPrior, iCol)
@@ -113196,7 +115776,7 @@ func multiSelectCollSeq(tls *libc.TLS, pParse uintptr, p uintptr, iCol int32) ui
// Space to hold the KeyInfo structure is obtained from malloc. The calling
// function is responsible for ensuring that this structure is eventually
// freed.
-func multiSelectOrderByKeyInfo(tls *libc.TLS, pParse uintptr, p uintptr, nExtra int32) uintptr { /* sqlite3.c:133433:16: */
+func multiSelectOrderByKeyInfo(tls *libc.TLS, pParse uintptr, p uintptr, nExtra int32) uintptr { /* sqlite3.c:134428:16: */
var pOrderBy uintptr = (*Select)(unsafe.Pointer(p)).FpOrderBy
var nOrderBy int32 = (*ExprList)(unsafe.Pointer((*Select)(unsafe.Pointer(p)).FpOrderBy)).FnExpr
var db uintptr = (*Parse)(unsafe.Pointer(pParse)).Fdb
@@ -113260,7 +115840,7 @@ func multiSelectOrderByKeyInfo(tls *libc.TLS, pParse uintptr, p uintptr, nExtra
// with a positive value, then the first OFFSET outputs are discarded rather
// than being sent to pDest. The LIMIT count does not begin until after OFFSET
// rows have been skipped.
-func generateWithRecursiveQuery(tls *libc.TLS, pParse uintptr, p uintptr, pDest uintptr) { /* sqlite3.c:133499:13: */
+func generateWithRecursiveQuery(tls *libc.TLS, pParse uintptr, p uintptr, pDest uintptr) { /* sqlite3.c:134494:13: */
bp := tls.Alloc(40)
defer tls.Free(40)
@@ -113297,7 +115877,7 @@ func generateWithRecursiveQuery(tls *libc.TLS, pParse uintptr, p uintptr, pDest
if !((*Select)(unsafe.Pointer(p)).FpWin != 0) {
goto __1
}
- Xsqlite3ErrorMsg(tls, pParse, ts+16717 /* "cannot use windo..." */, 0)
+ Xsqlite3ErrorMsg(tls, pParse, ts+17172 /* "cannot use windo..." */, 0)
return
__1:
;
@@ -113327,7 +115907,7 @@ __3:
if !(i < (*SrcList)(unsafe.Pointer(pSrc)).FnSrc) {
goto __5
}
- if !((uint32(int32(*(*uint8)(unsafe.Pointer((pSrc + 8 /* &.a */) + uintptr(i)*112 + 60 /* &.fg */ + 4 /* &.isRecursive */)) >> 2 & 0x1))) != 0) {
+ if !((uint32(int32(*(*uint16)(unsafe.Pointer((pSrc + 8 /* &.a */) + uintptr(i)*112 + 60 /* &.fg */ + 4 /* &.isRecursive */)) & 0x400 >> 10))) != 0) {
goto __6
}
iCurrent = (*SrcItem)(unsafe.Pointer((pSrc + 8 /* &.a */) + uintptr(i)*112)).FiCursor
@@ -113408,7 +115988,7 @@ __12:
if !(((*Select)(unsafe.Pointer(pFirstRec)).FselFlags & U32(SF_Aggregate)) != 0) {
goto __15
}
- Xsqlite3ErrorMsg(tls, pParse, ts+16766 /* "recursive aggreg..." */, 0)
+ Xsqlite3ErrorMsg(tls, pParse, ts+17221 /* "recursive aggreg..." */, 0)
goto end_of_recursive_query
__15:
;
@@ -113430,7 +116010,7 @@ __14:
// Store the results of the setup-query in Queue.
pSetup = (*Select)(unsafe.Pointer(pFirstRec)).FpPrior
(*Select)(unsafe.Pointer(pSetup)).FpNext = uintptr(0)
- Xsqlite3VdbeExplain(tls, pParse, uint8(1), ts+16808 /* "SETUP" */, 0)
+ Xsqlite3VdbeExplain(tls, pParse, uint8(1), ts+17263 /* "SETUP" */, 0)
rc = Xsqlite3Select(tls, pParse, pSetup, bp /* &destQueue */)
(*Select)(unsafe.Pointer(pSetup)).FpNext = p
if !(rc != 0) {
@@ -113473,7 +116053,7 @@ __20:
// Execute the recursive SELECT taking the single row in Current as
// the value for the recursive-table. Store the results in the Queue.
(*Select)(unsafe.Pointer(pFirstRec)).FpPrior = uintptr(0)
- Xsqlite3VdbeExplain(tls, pParse, uint8(1), ts+16814 /* "RECURSIVE STEP" */, 0)
+ Xsqlite3VdbeExplain(tls, pParse, uint8(1), ts+17269 /* "RECURSIVE STEP" */, 0)
Xsqlite3Select(tls, pParse, p, bp /* &destQueue */)
(*Select)(unsafe.Pointer(pFirstRec)).FpPrior = pSetup
@@ -113503,7 +116083,7 @@ end_of_recursive_query:
// clause occurs within scalar expression (ex: "SELECT (VALUES(1),(2),(3))").
// The sqlite3CodeSubselect will have added the LIMIT 1 clause in tht case.
// Since the limit is exactly 1, we only need to evalutes the left-most VALUES.
-func multiSelectValues(tls *libc.TLS, pParse uintptr, p uintptr, pDest uintptr) int32 { /* sqlite3.c:133676:12: */
+func multiSelectValues(tls *libc.TLS, pParse uintptr, p uintptr, pDest uintptr) int32 { /* sqlite3.c:134671:12: */
bp := tls.Alloc(16)
defer tls.Free(16)
@@ -113523,11 +116103,11 @@ func multiSelectValues(tls *libc.TLS, pParse uintptr, p uintptr, pDest uintptr)
p = (*Select)(unsafe.Pointer(p)).FpPrior
nRow = nRow + (bShowAll)
}
- Xsqlite3VdbeExplain(tls, pParse, uint8(0), ts+16829 /* "SCAN %d CONSTANT..." */, libc.VaList(bp, nRow, func() uintptr {
+ Xsqlite3VdbeExplain(tls, pParse, uint8(0), ts+17284 /* "SCAN %d CONSTANT..." */, libc.VaList(bp, nRow, func() uintptr {
if nRow == 1 {
- return ts + 703 /* "" */
+ return ts + 755 /* "" */
}
- return ts + 16852 /* "S" */
+ return ts + 17307 /* "S" */
}()))
for p != 0 {
selectInnerLoop(tls, pParse, p, -1, uintptr(0), uintptr(0), pDest, 1, 1)
@@ -113543,7 +116123,7 @@ func multiSelectValues(tls *libc.TLS, pParse uintptr, p uintptr, pDest uintptr)
// Return true if the SELECT statement which is known to be the recursive
// part of a recursive CTE still has its anchor terms attached. If the
// anchor terms have already been removed, then return false.
-func hasAnchor(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:133713:12: */
+func hasAnchor(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:134708:12: */
for (p != 0) && (((*Select)(unsafe.Pointer(p)).FselFlags & U32(SF_Recursive)) != U32(0)) {
p = (*Select)(unsafe.Pointer(p)).FpPrior
}
@@ -113579,7 +116159,7 @@ func hasAnchor(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:133713:12: */
//
// Notice that because of the way SQLite parses compound SELECTs, the
// individual selects always group from left to right.
-func multiSelect(tls *libc.TLS, pParse uintptr, p uintptr, pDest uintptr) int32 { /* sqlite3.c:133749:12: */
+func multiSelect(tls *libc.TLS, pParse uintptr, p uintptr, pDest uintptr) int32 { /* sqlite3.c:134744:12: */
bp := tls.Alloc(144)
defer tls.Free(144)
@@ -113679,8 +116259,8 @@ __6:
if !((*Select)(unsafe.Pointer(pPrior)).FpPrior == uintptr(0)) {
goto __8
}
- Xsqlite3VdbeExplain(tls, pParse, uint8(1), ts+16854 /* "COMPOUND QUERY" */, 0)
- Xsqlite3VdbeExplain(tls, pParse, uint8(1), ts+16869 /* "LEFT-MOST SUBQUE..." */, 0)
+ Xsqlite3VdbeExplain(tls, pParse, uint8(1), ts+17309 /* "COMPOUND QUERY" */, 0)
+ Xsqlite3VdbeExplain(tls, pParse, uint8(1), ts+17324 /* "LEFT-MOST SUBQUE..." */, 0)
__8:
;
@@ -113698,10 +116278,12 @@ __8:
goto __9
__10:
addr = 0
+ *(*int32)(unsafe.Pointer(bp + 56 /* nLimit */)) = 0 // Initialize to suppress harmless compiler warning
(*Select)(unsafe.Pointer(pPrior)).FiLimit = (*Select)(unsafe.Pointer(p)).FiLimit
(*Select)(unsafe.Pointer(pPrior)).FiOffset = (*Select)(unsafe.Pointer(p)).FiOffset
(*Select)(unsafe.Pointer(pPrior)).FpLimit = (*Select)(unsafe.Pointer(p)).FpLimit
+
rc = Xsqlite3Select(tls, pParse, pPrior, bp+16 /* &dest */)
(*Select)(unsafe.Pointer(pPrior)).FpLimit = uintptr(0)
if !(rc != 0) {
@@ -113727,7 +116309,8 @@ __16:
;
__15:
;
- Xsqlite3VdbeExplain(tls, pParse, uint8(1), ts+16644 /* "UNION ALL" */, 0)
+ Xsqlite3VdbeExplain(tls, pParse, uint8(1), ts+17099 /* "UNION ALL" */, 0)
+
rc = Xsqlite3Select(tls, pParse, p, bp+16 /* &dest */)
pDelete = (*Select)(unsafe.Pointer(p)).FpPrior
@@ -113778,6 +116361,7 @@ __20:
// Code the SELECT statements to our left
Xsqlite3SelectDestInit(tls, bp+64 /* &uniondest */, priorOp, unionTab)
+
rc = Xsqlite3Select(tls, pParse, pPrior, bp+64 /* &uniondest */)
if !(rc != 0) {
goto __21
@@ -113801,7 +116385,8 @@ __23:
pLimit = (*Select)(unsafe.Pointer(p)).FpLimit
(*Select)(unsafe.Pointer(p)).FpLimit = uintptr(0)
(*SelectDest)(unsafe.Pointer(bp + 64 /* &uniondest */)).FeDest = op
- Xsqlite3VdbeExplain(tls, pParse, uint8(1), ts+16888 /* "%s USING TEMP B-..." */, libc.VaList(bp, Xsqlite3SelectOpName(tls, int32((*Select)(unsafe.Pointer(p)).Fop))))
+ Xsqlite3VdbeExplain(tls, pParse, uint8(1), ts+17343 /* "%s USING TEMP B-..." */, libc.VaList(bp, Xsqlite3SelectOpName(tls, int32((*Select)(unsafe.Pointer(p)).Fop))))
+
rc = Xsqlite3Select(tls, pParse, p, bp+64 /* &uniondest */)
pDelete = (*Select)(unsafe.Pointer(p)).FpPrior
@@ -113855,6 +116440,7 @@ __13:
// Code the SELECTs to our left into temporary table "tab1".
Xsqlite3SelectDestInit(tls, bp+104 /* &intersectdest */, SRT_Union, tab1)
+
rc = Xsqlite3Select(tls, pParse, pPrior, bp+104 /* &intersectdest */)
if !(rc != 0) {
goto __26
@@ -113871,7 +116457,8 @@ __26:
pLimit1 = (*Select)(unsafe.Pointer(p)).FpLimit
(*Select)(unsafe.Pointer(p)).FpLimit = uintptr(0)
(*SelectDest)(unsafe.Pointer(bp + 104 /* &intersectdest */)).FiSDParm = tab2
- Xsqlite3VdbeExplain(tls, pParse, uint8(1), ts+16888 /* "%s USING TEMP B-..." */, libc.VaList(bp+8, Xsqlite3SelectOpName(tls, int32((*Select)(unsafe.Pointer(p)).Fop))))
+ Xsqlite3VdbeExplain(tls, pParse, uint8(1), ts+17343 /* "%s USING TEMP B-..." */, libc.VaList(bp+8, Xsqlite3SelectOpName(tls, int32((*Select)(unsafe.Pointer(p)).Fop))))
+
rc = Xsqlite3Select(tls, pParse, p, bp+104 /* &intersectdest */)
pDelete = (*Select)(unsafe.Pointer(p)).FpPrior
@@ -114026,15 +116613,15 @@ multi_select_end:
// Error message for when two or more terms of a compound select have different
// size result sets.
-func Xsqlite3SelectWrongNumTermsError(tls *libc.TLS, pParse uintptr, p uintptr) { /* sqlite3.c:134094:21: */
+func Xsqlite3SelectWrongNumTermsError(tls *libc.TLS, pParse uintptr, p uintptr) { /* sqlite3.c:135095:21: */
bp := tls.Alloc(8)
defer tls.Free(8)
if ((*Select)(unsafe.Pointer(p)).FselFlags & U32(SF_Values)) != 0 {
- Xsqlite3ErrorMsg(tls, pParse, ts+16909 /* "all VALUES must ..." */, 0)
+ Xsqlite3ErrorMsg(tls, pParse, ts+17364 /* "all VALUES must ..." */, 0)
} else {
Xsqlite3ErrorMsg(tls, pParse,
- ts+16955, /* "SELECTs to the l..." */
+ ts+17410, /* "SELECTs to the l..." */
libc.VaList(bp, Xsqlite3SelectOpName(tls, int32((*Select)(unsafe.Pointer(p)).Fop))))
}
}
@@ -114057,7 +116644,7 @@ func Xsqlite3SelectWrongNumTermsError(tls *libc.TLS, pParse uintptr, p uintptr)
//
// If the LIMIT found in p->iLimit is reached, jump immediately to
// iBreak.
-func generateOutputSubroutine(tls *libc.TLS, pParse uintptr, p uintptr, pIn uintptr, pDest uintptr, regReturn int32, regPrev int32, pKeyInfo uintptr, iBreak int32) int32 { /* sqlite3.c:134124:12: */
+func generateOutputSubroutine(tls *libc.TLS, pParse uintptr, p uintptr, pIn uintptr, pDest uintptr, regReturn int32, regPrev int32, pKeyInfo uintptr, iBreak int32) int32 { /* sqlite3.c:135125:12: */
var v uintptr = (*Parse)(unsafe.Pointer(pParse)).FpVdbe
var iContinue int32
var addr int32
@@ -114253,7 +116840,7 @@ func generateOutputSubroutine(tls *libc.TLS, pParse uintptr, p uintptr, pIn uint
// actually called using Gosub and they do not Return. EofA and EofB loop
// until all data is exhausted then jump to the "end" labe. AltB, AeqB,
// and AgtB jump to either L2 or to one of EofA or EofB.
-func multiSelectOrderBy(tls *libc.TLS, pParse uintptr, p uintptr, pDest uintptr) int32 { /* sqlite3.c:134332:12: */
+func multiSelectOrderBy(tls *libc.TLS, pParse uintptr, p uintptr, pDest uintptr) int32 { /* sqlite3.c:135333:12: */
bp := tls.Alloc(88)
defer tls.Free(88)
@@ -114414,9 +117001,9 @@ func multiSelectOrderBy(tls *libc.TLS, pParse uintptr, p uintptr, pDest uintptr)
// Separate the left and the right query from one another
(*Select)(unsafe.Pointer(p)).FpPrior = uintptr(0)
(*Select)(unsafe.Pointer(pPrior)).FpNext = uintptr(0)
- Xsqlite3ResolveOrderGroupBy(tls, pParse, p, (*Select)(unsafe.Pointer(p)).FpOrderBy, ts+6120 /* "ORDER" */)
+ Xsqlite3ResolveOrderGroupBy(tls, pParse, p, (*Select)(unsafe.Pointer(p)).FpOrderBy, ts+6251 /* "ORDER" */)
if (*Select)(unsafe.Pointer(pPrior)).FpPrior == uintptr(0) {
- Xsqlite3ResolveOrderGroupBy(tls, pParse, pPrior, (*Select)(unsafe.Pointer(pPrior)).FpOrderBy, ts+6120 /* "ORDER" */)
+ Xsqlite3ResolveOrderGroupBy(tls, pParse, pPrior, (*Select)(unsafe.Pointer(pPrior)).FpOrderBy, ts+6251 /* "ORDER" */)
}
// Compute the limit registers
@@ -114445,7 +117032,7 @@ func multiSelectOrderBy(tls *libc.TLS, pParse uintptr, p uintptr, pDest uintptr)
Xsqlite3SelectDestInit(tls, bp+8 /* &destA */, SRT_Coroutine, regAddrA)
Xsqlite3SelectDestInit(tls, bp+48 /* &destB */, SRT_Coroutine, regAddrB)
- Xsqlite3VdbeExplain(tls, pParse, uint8(1), ts+17037 /* "MERGE (%s)" */, libc.VaList(bp, Xsqlite3SelectOpName(tls, int32((*Select)(unsafe.Pointer(p)).Fop))))
+ Xsqlite3VdbeExplain(tls, pParse, uint8(1), ts+17492 /* "MERGE (%s)" */, libc.VaList(bp, Xsqlite3SelectOpName(tls, int32((*Select)(unsafe.Pointer(p)).Fop))))
// Generate a coroutine to evaluate the SELECT statement to the
// left of the compound operator - the "A" select.
@@ -114453,7 +117040,7 @@ func multiSelectOrderBy(tls *libc.TLS, pParse uintptr, p uintptr, pDest uintptr)
addr1 = Xsqlite3VdbeAddOp3(tls, v, OP_InitCoroutine, regAddrA, 0, addrSelectA)
(*Select)(unsafe.Pointer(pPrior)).FiLimit = regLimitA
- Xsqlite3VdbeExplain(tls, pParse, uint8(1), ts+17048 /* "LEFT" */, 0)
+ Xsqlite3VdbeExplain(tls, pParse, uint8(1), ts+17503 /* "LEFT" */, 0)
Xsqlite3Select(tls, pParse, pPrior, bp+8 /* &destA */)
Xsqlite3VdbeEndCoroutine(tls, v, regAddrA)
Xsqlite3VdbeJumpHere(tls, v, addr1)
@@ -114467,7 +117054,7 @@ func multiSelectOrderBy(tls *libc.TLS, pParse uintptr, p uintptr, pDest uintptr)
savedOffset = (*Select)(unsafe.Pointer(p)).FiOffset
(*Select)(unsafe.Pointer(p)).FiLimit = regLimitB
(*Select)(unsafe.Pointer(p)).FiOffset = 0
- Xsqlite3VdbeExplain(tls, pParse, uint8(1), ts+17053 /* "RIGHT" */, 0)
+ Xsqlite3VdbeExplain(tls, pParse, uint8(1), ts+17508 /* "RIGHT" */, 0)
Xsqlite3Select(tls, pParse, p, bp+48 /* &destB */)
(*Select)(unsafe.Pointer(p)).FiLimit = savedLimit
(*Select)(unsafe.Pointer(p)).FiOffset = savedOffset
@@ -114568,6 +117155,9 @@ func multiSelectOrderBy(tls *libc.TLS, pParse uintptr, p uintptr, pDest uintptr)
(*Select)(unsafe.Pointer(p)).FpPrior = pPrior
(*Select)(unsafe.Pointer(pPrior)).FpNext = p
+ Xsqlite3ExprListDelete(tls, db, (*Select)(unsafe.Pointer(pPrior)).FpOrderBy)
+ (*Select)(unsafe.Pointer(pPrior)).FpOrderBy = uintptr(0)
+
// ** TBD: Insert subroutine calls to close cursors on incomplete
// subqueries ***
Xsqlite3VdbeExplainPop(tls, pParse)
@@ -114580,20 +117170,20 @@ func multiSelectOrderBy(tls *libc.TLS, pParse uintptr, p uintptr, pDest uintptr)
// All references to columns in table iTable are to be replaced by corresponding
// expressions in pEList.
type SubstContext1 = struct {
- FpParse uintptr
- FiTable int32
- FiNewTable int32
- FisLeftJoin int32
- _ [4]byte
- FpEList uintptr
-} /* sqlite3.c:134639:9 */
+ FpParse uintptr
+ FiTable int32
+ FiNewTable int32
+ FisLeftJoin int32
+ F__ccgo_pad1 [4]byte
+ FpEList uintptr
+} /* sqlite3.c:135643:9 */
// An instance of the SubstContext object describes an substitution edit
// to be performed on a parse tree.
//
// All references to columns in table iTable are to be replaced by corresponding
// expressions in pEList.
-type SubstContext = SubstContext1 /* sqlite3.c:134645:3 */
+type SubstContext = SubstContext1 /* sqlite3.c:135649:3 */
// Scan through the expression pExpr. Replace every reference to
// a column in table number iTable with a copy of the iColumn-th
@@ -114606,7 +117196,7 @@ type SubstContext = SubstContext1 /* sqlite3.c:134645:3 */
// FORM clause entry is iTable. This routine makes the necessary
// changes to pExpr so that it refers directly to the source table
// of the subquery rather the result set of the subquery.
-func substExpr(tls *libc.TLS, pSubst uintptr, pExpr uintptr) uintptr { /* sqlite3.c:134664:13: */
+func substExpr(tls *libc.TLS, pSubst uintptr, pExpr uintptr) uintptr { /* sqlite3.c:135668:13: */
bp := tls.Alloc(72)
defer tls.Free(72)
@@ -114620,9 +117210,7 @@ func substExpr(tls *libc.TLS, pSubst uintptr, pExpr uintptr) uintptr { /* sqlite
if ((int32((*Expr)(unsafe.Pointer(pExpr)).Fop) == TK_COLUMN) &&
((*Expr)(unsafe.Pointer(pExpr)).FiTable == (*SubstContext)(unsafe.Pointer(pSubst)).FiTable)) &&
!(((*Expr)(unsafe.Pointer((pExpr))).Fflags & (U32(EP_FixedCol))) != U32(0)) {
- if int32((*Expr)(unsafe.Pointer(pExpr)).FiColumn) < 0 {
- (*Expr)(unsafe.Pointer(pExpr)).Fop = U8(TK_NULL)
- } else {
+ {
var pNew uintptr
var pCopy uintptr = (*ExprList_item)(unsafe.Pointer(((*SubstContext)(unsafe.Pointer(pSubst)).FpEList + 8 /* &.a */) + uintptr((*Expr)(unsafe.Pointer(pExpr)).FiColumn)*32)).FpExpr
// var ifNullRow Expr at bp, 72
@@ -114641,10 +117229,14 @@ func substExpr(tls *libc.TLS, pSubst uintptr, pExpr uintptr) uintptr { /* sqlite
}
pNew = Xsqlite3ExprDup(tls, db, pCopy, 0)
- if (pNew != 0) && ((*SubstContext)(unsafe.Pointer(pSubst)).FisLeftJoin != 0) {
+ if (*Sqlite3)(unsafe.Pointer(db)).FmallocFailed != 0 {
+ Xsqlite3ExprDelete(tls, db, pNew)
+ return pExpr
+ }
+ if (*SubstContext)(unsafe.Pointer(pSubst)).FisLeftJoin != 0 {
*(*U32)(unsafe.Pointer(pNew + 4 /* &.flags */)) |= (U32(EP_CanBeNull))
}
- if (pNew != 0) && (((*Expr)(unsafe.Pointer((pExpr))).Fflags & (U32(EP_FromJoin))) != U32(0)) {
+ if ((*Expr)(unsafe.Pointer((pExpr))).Fflags & (U32(EP_FromJoin))) != U32(0) {
Xsqlite3SetJoinExpr(tls, pNew, (*Expr)(unsafe.Pointer(pExpr)).FiRightJoinTable)
}
Xsqlite3ExprDelete(tls, db, pExpr)
@@ -114652,20 +117244,19 @@ func substExpr(tls *libc.TLS, pSubst uintptr, pExpr uintptr) uintptr { /* sqlite
// Ensure that the expression now has an implicit collation sequence,
// just as it did when it was a column of a view or sub-query.
- if pExpr != 0 {
- if (int32((*Expr)(unsafe.Pointer(pExpr)).Fop) != TK_COLUMN) && (int32((*Expr)(unsafe.Pointer(pExpr)).Fop) != TK_COLLATE) {
- var pColl uintptr = Xsqlite3ExprCollSeq(tls, (*SubstContext)(unsafe.Pointer(pSubst)).FpParse, pExpr)
- pExpr = Xsqlite3ExprAddCollateString(tls, (*SubstContext)(unsafe.Pointer(pSubst)).FpParse, pExpr,
- func() uintptr {
- if pColl != 0 {
- return (*CollSeq)(unsafe.Pointer(pColl)).FzName
- }
- return ts + 266 /* "BINARY" */
- }())
- }
- *(*U32)(unsafe.Pointer(pExpr + 4 /* &.flags */)) &= (libc.Uint32FromInt32(libc.CplInt32(EP_Collate)))
+ if (int32((*Expr)(unsafe.Pointer(pExpr)).Fop) != TK_COLUMN) && (int32((*Expr)(unsafe.Pointer(pExpr)).Fop) != TK_COLLATE) {
+ var pColl uintptr = Xsqlite3ExprCollSeq(tls, (*SubstContext)(unsafe.Pointer(pSubst)).FpParse, pExpr)
+ pExpr = Xsqlite3ExprAddCollateString(tls, (*SubstContext)(unsafe.Pointer(pSubst)).FpParse, pExpr,
+ func() uintptr {
+ if pColl != 0 {
+ return (*CollSeq)(unsafe.Pointer(pColl)).FzName
+ }
+ return ts + 318 /* "BINARY" */
+ }())
}
+ *(*U32)(unsafe.Pointer(pExpr + 4 /* &.flags */)) &= (libc.Uint32FromInt32(libc.CplInt32(EP_Collate)))
}
+
}
} else {
if (int32((*Expr)(unsafe.Pointer(pExpr)).Fop) == TK_IF_NULL_ROW) && ((*Expr)(unsafe.Pointer(pExpr)).FiTable == (*SubstContext)(unsafe.Pointer(pSubst)).FiTable) {
@@ -114688,7 +117279,7 @@ func substExpr(tls *libc.TLS, pSubst uintptr, pExpr uintptr) uintptr { /* sqlite
return pExpr
}
-func substExprList(tls *libc.TLS, pSubst uintptr, pList uintptr) { /* sqlite3.c:134744:13: */
+func substExprList(tls *libc.TLS, pSubst uintptr, pList uintptr) { /* sqlite3.c:135753:13: */
var i int32
if pList == uintptr(0) {
return
@@ -114698,7 +117289,7 @@ func substExprList(tls *libc.TLS, pSubst uintptr, pList uintptr) { /* sqlite3.c:
}
}
-func substSelect(tls *libc.TLS, pSubst uintptr, p uintptr, doPrior int32) { /* sqlite3.c:134754:13: */
+func substSelect(tls *libc.TLS, pSubst uintptr, p uintptr, doPrior int32) { /* sqlite3.c:135763:13: */
var pSrc uintptr
var pItem uintptr
var i int32
@@ -114721,7 +117312,7 @@ func substSelect(tls *libc.TLS, pSubst uintptr, p uintptr, doPrior int32) { /* s
}
{
substSelect(tls, pSubst, (*SrcItem)(unsafe.Pointer(pItem)).FpSelect, 1)
- if (uint32(int32(*(*uint8)(unsafe.Pointer(pItem + 60 /* &.fg */ + 4 /* &.isTabFunc */)) >> 5 & 0x1))) != 0 {
+ if (uint32(int32(*(*uint16)(unsafe.Pointer(pItem + 60 /* &.fg */ + 4 /* &.isTabFunc */)) & 0x2000 >> 13))) != 0 {
substExprList(tls, pSubst, *(*uintptr)(unsafe.Pointer(pItem + 96 /* &.u1 */)))
}
@@ -114741,7 +117332,7 @@ func substSelect(tls *libc.TLS, pSubst uintptr, p uintptr, doPrior int32) { /* s
//
// This routine scans the entire SELECT statement and recomputes the
// pSrcItem->colUsed mask.
-func recomputeColumnsUsedExpr(tls *libc.TLS, pWalker uintptr, pExpr uintptr) int32 { /* sqlite3.c:134789:12: */
+func recomputeColumnsUsedExpr(tls *libc.TLS, pWalker uintptr, pExpr uintptr) int32 { /* sqlite3.c:135798:12: */
var pItem uintptr
if int32((*Expr)(unsafe.Pointer(pExpr)).Fop) != TK_COLUMN {
return WRC_Continue
@@ -114757,7 +117348,7 @@ func recomputeColumnsUsedExpr(tls *libc.TLS, pWalker uintptr, pExpr uintptr) int
return WRC_Continue
}
-func recomputeColumnsUsed(tls *libc.TLS, pSelect uintptr, pSrcItem uintptr) { /* sqlite3.c:134798:13: */
+func recomputeColumnsUsed(tls *libc.TLS, pSelect uintptr, pSrcItem uintptr) { /* sqlite3.c:135807:13: */
bp := tls.Alloc(48)
defer tls.Free(48)
@@ -114789,7 +117380,7 @@ func recomputeColumnsUsed(tls *libc.TLS, pSelect uintptr, pSrcItem uintptr) { /*
//
// If pSrc contains any sub-selects, call this routine recursively
// on the FROM clause of each such sub-select, with iExcept set to -1.
-func srclistRenumberCursors(tls *libc.TLS, pParse uintptr, aCsrMap uintptr, pSrc uintptr, iExcept int32) { /* sqlite3.c:134827:13: */
+func srclistRenumberCursors(tls *libc.TLS, pParse uintptr, aCsrMap uintptr, pSrc uintptr, iExcept int32) { /* sqlite3.c:135836:13: */
var i int32
var pItem uintptr
i = 0
@@ -114801,7 +117392,10 @@ __1:
{
if i != iExcept {
var p uintptr
- (*SrcItem)(unsafe.Pointer(pItem)).FiCursor = libc.AssignPtrInt32(aCsrMap+uintptr((*SrcItem)(unsafe.Pointer(pItem)).FiCursor)*4, libc.PostIncInt32(&(*Parse)(unsafe.Pointer(pParse)).FnTab, 1))
+ if !((int32(*(*uint16)(unsafe.Pointer(pItem + 60 /* &.fg */ + 4 /* &.isRecursive */)) & 0x400 >> 10)) != 0) || (*(*int32)(unsafe.Pointer(aCsrMap + uintptr((*SrcItem)(unsafe.Pointer(pItem)).FiCursor)*4)) == 0) {
+ *(*int32)(unsafe.Pointer(aCsrMap + uintptr((*SrcItem)(unsafe.Pointer(pItem)).FiCursor)*4)) = libc.PostIncInt32(&(*Parse)(unsafe.Pointer(pParse)).FnTab, 1)
+ }
+ (*SrcItem)(unsafe.Pointer(pItem)).FiCursor = *(*int32)(unsafe.Pointer(aCsrMap + uintptr((*SrcItem)(unsafe.Pointer(pItem)).FiCursor)*4))
for p = (*SrcItem)(unsafe.Pointer(pItem)).FpSelect; p != 0; p = (*Select)(unsafe.Pointer(p)).FpPrior {
srclistRenumberCursors(tls, pParse, aCsrMap, (*Select)(unsafe.Pointer(p)).FpSrc, -1)
}
@@ -114819,7 +117413,7 @@ __3:
// Expression walker callback used by renumberCursors() to update
// Expr objects to match newly assigned cursor numbers.
-func renumberCursorsCb(tls *libc.TLS, pWalker uintptr, pExpr uintptr) int32 { /* sqlite3.c:134850:12: */
+func renumberCursorsCb(tls *libc.TLS, pWalker uintptr, pExpr uintptr) int32 { /* sqlite3.c:135862:12: */
var aCsrMap uintptr = *(*uintptr)(unsafe.Pointer(pWalker + 40 /* &.u */))
var op int32 = int32((*Expr)(unsafe.Pointer(pExpr)).Fop)
if ((op == TK_COLUMN) || (op == TK_IF_NULL_ROW)) && (*(*int32)(unsafe.Pointer(aCsrMap + uintptr((*Expr)(unsafe.Pointer(pExpr)).FiTable)*4)) != 0) {
@@ -114847,7 +117441,7 @@ func renumberCursorsCb(tls *libc.TLS, pWalker uintptr, pExpr uintptr) int32 { /*
// * the array entries for all cursor numbers that do *not* appear in
// FROM clauses of the select statement as described above are
// initialized to zero.
-func renumberCursors(tls *libc.TLS, pParse uintptr, p uintptr, iExcept int32, aCsrMap uintptr) { /* sqlite3.c:134880:13: */
+func renumberCursors(tls *libc.TLS, pParse uintptr, p uintptr, iExcept int32, aCsrMap uintptr) { /* sqlite3.c:135892:13: */
bp := tls.Alloc(48)
defer tls.Free(48)
@@ -115017,7 +117611,7 @@ func renumberCursors(tls *libc.TLS, pParse uintptr, p uintptr, iExcept int32, aC
//
// All of the expression analysis must occur on both the outer query and
// the subquery before this routine runs.
-func flattenSubquery(tls *libc.TLS, pParse uintptr, p uintptr, iFrom int32, isAgg int32) int32 { /* sqlite3.c:135051:12: */
+func flattenSubquery(tls *libc.TLS, pParse uintptr, p uintptr, iFrom int32, isAgg int32) int32 { /* sqlite3.c:136063:12: */
bp := tls.Alloc(80)
defer tls.Free(80)
@@ -115439,7 +118033,7 @@ __3:
// A structure to keep track of all of the column values that are fixed to
// a known value due to WHERE clause constraints of the form COLUMN=VALUE.
-type WhereConst = WhereConst1 /* sqlite3.c:135474:27 */
+type WhereConst = WhereConst1 /* sqlite3.c:136486:27 */
// Add a new entry to the pConst object. Except, do not add duplicate
// pColumn entires. Also, do not add if doing so would not be appropriate.
@@ -115447,7 +118041,7 @@ type WhereConst = WhereConst1 /* sqlite3.c:135474:27 */
// The caller guarantees the pColumn is a column and pValue is a constant.
// This routine has to do some additional checks before completing the
// insert.
-func constInsert(tls *libc.TLS, pConst uintptr, pColumn uintptr, pValue uintptr, pExpr uintptr) { /* sqlite3.c:135490:13: */
+func constInsert(tls *libc.TLS, pConst uintptr, pColumn uintptr, pValue uintptr, pExpr uintptr) { /* sqlite3.c:136504:13: */
var i int32
if ((*Expr)(unsafe.Pointer((pColumn))).Fflags & (U32(EP_FixedCol))) != U32(0) {
@@ -115470,6 +118064,9 @@ func constInsert(tls *libc.TLS, pConst uintptr, pColumn uintptr, pValue uintptr,
return // Already present. Return without doing anything.
}
}
+ if int32(Xsqlite3ExprAffinity(tls, pColumn)) == SQLITE_AFF_BLOB {
+ (*WhereConst)(unsafe.Pointer(pConst)).FbHasAffBlob = 1
+ }
(*WhereConst)(unsafe.Pointer(pConst)).FnConst++
(*WhereConst)(unsafe.Pointer(pConst)).FapExpr = Xsqlite3DbReallocOrFree(tls, (*Parse)(unsafe.Pointer((*WhereConst)(unsafe.Pointer(pConst)).FpParse)).Fdb, (*WhereConst)(unsafe.Pointer(pConst)).FapExpr,
@@ -115486,7 +118083,7 @@ func constInsert(tls *libc.TLS, pConst uintptr, pColumn uintptr, pValue uintptr,
// is a constant expression and where the term must be true because it
// is part of the AND-connected terms of the expression. For each term
// found, add it to the pConst structure.
-func findConstInWhere(tls *libc.TLS, pConst uintptr, pExpr uintptr) { /* sqlite3.c:135535:13: */
+func findConstInWhere(tls *libc.TLS, pConst uintptr, pExpr uintptr) { /* sqlite3.c:136552:13: */
var pRight uintptr
var pLeft uintptr
if pExpr == uintptr(0) {
@@ -115514,13 +118111,18 @@ func findConstInWhere(tls *libc.TLS, pConst uintptr, pExpr uintptr) { /* sqlite3
}
}
-// This is a Walker expression callback. pExpr is a candidate expression
-// to be replaced by a value. If pExpr is equivalent to one of the
-// columns named in pWalker->u.pConst, then overwrite it with its
-// corresponding value.
-func propagateConstantExprRewrite(tls *libc.TLS, pWalker uintptr, pExpr uintptr) int32 { /* sqlite3.c:135563:12: */
+// This is a helper function for Walker callback propagateConstantExprRewrite().
+//
+// Argument pExpr is a candidate expression to be replaced by a value. If
+// pExpr is equivalent to one of the columns named in pWalker->u.pConst,
+// then overwrite it with the corresponding value. Except, do not do so
+// if argument bIgnoreAffBlob is non-zero and the affinity of pExpr
+// is SQLITE_AFF_BLOB.
+func propagateConstantExprRewriteOne(tls *libc.TLS, pConst uintptr, pExpr uintptr, bIgnoreAffBlob int32) int32 { /* sqlite3.c:136583:12: */
var i int32
- var pConst uintptr
+ if *(*U8)(unsafe.Pointer((*WhereConst)(unsafe.Pointer(pConst)).FpOomFault)) != 0 {
+ return WRC_Prune
+ }
if int32((*Expr)(unsafe.Pointer(pExpr)).Fop) != TK_COLUMN {
return WRC_Continue
}
@@ -115528,7 +118130,6 @@ func propagateConstantExprRewrite(tls *libc.TLS, pWalker uintptr, pExpr uintptr)
return WRC_Continue
}
- pConst = *(*uintptr)(unsafe.Pointer(pWalker + 40 /* &.u */))
for i = 0; i < (*WhereConst)(unsafe.Pointer(pConst)).FnConst; i++ {
var pColumn uintptr = *(*uintptr)(unsafe.Pointer((*WhereConst)(unsafe.Pointer(pConst)).FapExpr + uintptr((i*2))*8))
if pColumn == pExpr {
@@ -115540,17 +118141,55 @@ func propagateConstantExprRewrite(tls *libc.TLS, pWalker uintptr, pExpr uintptr)
if int32((*Expr)(unsafe.Pointer(pColumn)).FiColumn) != int32((*Expr)(unsafe.Pointer(pExpr)).FiColumn) {
continue
}
+ if (bIgnoreAffBlob != 0) && (int32(Xsqlite3ExprAffinity(tls, pColumn)) == SQLITE_AFF_BLOB) {
+ break
+ }
// A match is found. Add the EP_FixedCol property
(*WhereConst)(unsafe.Pointer(pConst)).FnChng++
*(*U32)(unsafe.Pointer(pExpr + 4 /* &.flags */)) &= (libc.Uint32FromInt32(libc.CplInt32(EP_Leaf)))
*(*U32)(unsafe.Pointer(pExpr + 4 /* &.flags */)) |= (U32(EP_FixedCol))
(*Expr)(unsafe.Pointer(pExpr)).FpLeft = Xsqlite3ExprDup(tls, (*Parse)(unsafe.Pointer((*WhereConst)(unsafe.Pointer(pConst)).FpParse)).Fdb, *(*uintptr)(unsafe.Pointer((*WhereConst)(unsafe.Pointer(pConst)).FapExpr + uintptr(((i*2)+1))*8)), 0)
+ if (*Sqlite3)(unsafe.Pointer((*Parse)(unsafe.Pointer((*WhereConst)(unsafe.Pointer(pConst)).FpParse)).Fdb)).FmallocFailed != 0 {
+ return WRC_Prune
+ }
break
}
return WRC_Prune
}
+// This is a Walker expression callback. pExpr is a node from the WHERE
+// clause of a SELECT statement. This function examines pExpr to see if
+// any substitutions based on the contents of pWalker->u.pConst should
+// be made to pExpr or its immediate children.
+//
+// A substitution is made if:
+//
+// + pExpr is a column with an affinity other than BLOB that matches
+// one of the columns in pWalker->u.pConst, or
+//
+// + pExpr is a binary comparison operator (=, <=, >=, <, >) that
+// uses an affinity other than TEXT and one of its immediate
+// children is a column that matches one of the columns in
+// pWalker->u.pConst.
+func propagateConstantExprRewrite(tls *libc.TLS, pWalker uintptr, pExpr uintptr) int32 { /* sqlite3.c:136632:12: */
+ var pConst uintptr = *(*uintptr)(unsafe.Pointer(pWalker + 40 /* &.u */))
+
+ if (*WhereConst)(unsafe.Pointer(pConst)).FbHasAffBlob != 0 {
+ if ((int32((*Expr)(unsafe.Pointer(pExpr)).Fop) >= TK_EQ) && (int32((*Expr)(unsafe.Pointer(pExpr)).Fop) <= TK_GE)) ||
+ (int32((*Expr)(unsafe.Pointer(pExpr)).Fop) == TK_IS) {
+ propagateConstantExprRewriteOne(tls, pConst, (*Expr)(unsafe.Pointer(pExpr)).FpLeft, 0)
+ if *(*U8)(unsafe.Pointer((*WhereConst)(unsafe.Pointer(pConst)).FpOomFault)) != 0 {
+ return WRC_Prune
+ }
+ if int32(Xsqlite3ExprAffinity(tls, (*Expr)(unsafe.Pointer(pExpr)).FpLeft)) != SQLITE_AFF_TEXT {
+ propagateConstantExprRewriteOne(tls, pConst, (*Expr)(unsafe.Pointer(pExpr)).FpRight, 0)
+ }
+ }
+ }
+ return propagateConstantExprRewriteOne(tls, pConst, pExpr, (*WhereConst)(unsafe.Pointer(pConst)).FbHasAffBlob)
+}
+
// The WHERE-clause constant propagation optimization.
//
// If the WHERE clause contains terms of the form COLUMN=CONSTANT or
@@ -115585,34 +118224,51 @@ func propagateConstantExprRewrite(tls *libc.TLS, pWalker uintptr, pExpr uintptr)
// routines know to generate the constant "123" instead of looking up the
// column value. Also, to avoid collation problems, this optimization is
// only attempted if the "a=123" term uses the default BINARY collation.
-func propagateConstants(tls *libc.TLS, pParse uintptr, p uintptr) int32 { /* sqlite3.c:135625:12: */
- bp := tls.Alloc(72)
- defer tls.Free(72)
+//
+// 2021-05-25 forum post 6a06202608: Another troublesome case is...
+//
+// CREATE TABLE t1(x);
+// INSERT INTO t1 VALUES(10.0);
+// SELECT 1 FROM t1 WHERE x=10 AND x LIKE 10;
+//
+// The query should return no rows, because the t1.x value is '10.0' not '10'
+// and '10.0' is not LIKE '10'. But if we are not careful, the first WHERE
+// term "x=10" will cause the second WHERE term to become "10 LIKE 10",
+// resulting in a false positive. To avoid this, constant propagation for
+// columns with BLOB affinity is only allowed if the constant is used with
+// operators ==, <=, <, >=, >, or IS in a way that will cause the correct
+// type conversions to occur. See logic associated with the bHasAffBlob flag
+// for details.
+func propagateConstants(tls *libc.TLS, pParse uintptr, p uintptr) int32 { /* sqlite3.c:136703:12: */
+ bp := tls.Alloc(88)
+ defer tls.Free(88)
- // var x WhereConst at bp, 24
+ // var x WhereConst at bp, 40
- // var w Walker at bp+24, 48
+ // var w Walker at bp+40, 48
var nChng int32 = 0
(*WhereConst)(unsafe.Pointer(bp /* &x */)).FpParse = pParse
+ (*WhereConst)(unsafe.Pointer(bp /* &x */)).FpOomFault = ((*Parse)(unsafe.Pointer(pParse)).Fdb + 99 /* &.mallocFailed */)
for ok := true; ok; ok = (*WhereConst)(unsafe.Pointer(bp /* &x */)).FnChng != 0 {
(*WhereConst)(unsafe.Pointer(bp /* &x */)).FnConst = 0
(*WhereConst)(unsafe.Pointer(bp /* &x */)).FnChng = 0
(*WhereConst)(unsafe.Pointer(bp /* &x */)).FapExpr = uintptr(0)
+ (*WhereConst)(unsafe.Pointer(bp /* &x */)).FbHasAffBlob = 0
findConstInWhere(tls, bp /* &x */, (*Select)(unsafe.Pointer(p)).FpWhere)
if (*WhereConst)(unsafe.Pointer(bp /* &x */)).FnConst != 0 {
- libc.Xmemset(tls, bp+24 /* &w */, 0, uint64(unsafe.Sizeof(Walker{})))
- (*Walker)(unsafe.Pointer(bp + 24 /* &w */)).FpParse = pParse
- (*Walker)(unsafe.Pointer(bp + 24 /* &w */)).FxExprCallback = *(*uintptr)(unsafe.Pointer(&struct {
+ libc.Xmemset(tls, bp+40 /* &w */, 0, uint64(unsafe.Sizeof(Walker{})))
+ (*Walker)(unsafe.Pointer(bp + 40 /* &w */)).FpParse = pParse
+ (*Walker)(unsafe.Pointer(bp + 40 /* &w */)).FxExprCallback = *(*uintptr)(unsafe.Pointer(&struct {
f func(*libc.TLS, uintptr, uintptr) int32
}{propagateConstantExprRewrite}))
- (*Walker)(unsafe.Pointer(bp + 24 /* &w */)).FxSelectCallback = *(*uintptr)(unsafe.Pointer(&struct {
+ (*Walker)(unsafe.Pointer(bp + 40 /* &w */)).FxSelectCallback = *(*uintptr)(unsafe.Pointer(&struct {
f func(*libc.TLS, uintptr, uintptr) int32
}{Xsqlite3SelectWalkNoop}))
- (*Walker)(unsafe.Pointer(bp + 24 /* &w */)).FxSelectCallback2 = uintptr(0)
- (*Walker)(unsafe.Pointer(bp + 24 /* &w */)).FwalkerDepth = 0
- *(*uintptr)(unsafe.Pointer(bp + 24 /* &w */ + 40 /* &.u */)) = bp /* &x */
- Xsqlite3WalkExpr(tls, bp+24 /* &w */, (*Select)(unsafe.Pointer(p)).FpWhere)
+ (*Walker)(unsafe.Pointer(bp + 40 /* &w */)).FxSelectCallback2 = uintptr(0)
+ (*Walker)(unsafe.Pointer(bp + 40 /* &w */)).FwalkerDepth = 0
+ *(*uintptr)(unsafe.Pointer(bp + 40 /* &w */ + 40 /* &.u */)) = bp /* &x */
+ Xsqlite3WalkExpr(tls, bp+40 /* &w */, (*Select)(unsafe.Pointer(p)).FpWhere)
Xsqlite3DbFree(tls, (*Parse)(unsafe.Pointer((*WhereConst)(unsafe.Pointer(bp /* &x */)).FpParse)).Fdb, (*WhereConst)(unsafe.Pointer(bp /* &x */)).FapExpr)
nChng = nChng + ((*WhereConst)(unsafe.Pointer(bp /* &x */)).FnChng)
}
@@ -115636,7 +118292,7 @@ func propagateConstants(tls *libc.TLS, pParse uintptr, p uintptr) int32 { /* sql
//
// * the sub-query uses only one distinct window frame, and
// * that the window frame has a PARTITION BY clase.
-func pushDownWindowCheck(tls *libc.TLS, pParse uintptr, pSubq uintptr, pExpr uintptr) int32 { /* sqlite3.c:135674:12: */
+func pushDownWindowCheck(tls *libc.TLS, pParse uintptr, pSubq uintptr, pExpr uintptr) int32 { /* sqlite3.c:136754:12: */
return Xsqlite3ExprIsConstantOrGroupBy(tls, pParse, pExpr, (*Window)(unsafe.Pointer((*Select)(unsafe.Pointer(pSubq)).FpWin)).FpPartition)
}
@@ -115707,7 +118363,7 @@ func pushDownWindowCheck(tls *libc.TLS, pParse uintptr, pSubq uintptr, pExpr uin
//
// Return 0 if no changes are made and non-zero if one or more WHERE clause
// terms are duplicated into the subquery.
-func pushDownWhereTerms(tls *libc.TLS, pParse uintptr, pSubq uintptr, pWhere uintptr, iCursor int32, isLeftJoin int32) int32 { /* sqlite3.c:135752:12: */
+func pushDownWhereTerms(tls *libc.TLS, pParse uintptr, pSubq uintptr, pWhere uintptr, iCursor int32, isLeftJoin int32) int32 { /* sqlite3.c:136832:12: */
bp := tls.Alloc(32)
defer tls.Free(32)
@@ -115794,7 +118450,7 @@ func pushDownWhereTerms(tls *libc.TLS, pParse uintptr, pSubq uintptr, pWhere uin
// This routine must be called after aggregate functions have been
// located but before their arguments have been subjected to aggregate
// analysis.
-func minMaxQuery(tls *libc.TLS, db uintptr, pFunc uintptr, ppMinMax uintptr) U8 { /* sqlite3.c:135854:11: */
+func minMaxQuery(tls *libc.TLS, db uintptr, pFunc uintptr, ppMinMax uintptr) U8 { /* sqlite3.c:136934:11: */
var eRet int32 = WHERE_ORDERBY_NORMAL // Return value
var pEList uintptr = *(*uintptr)(unsafe.Pointer(pFunc + 32 /* &.x */)) // Arguments to agg function
var zFunc uintptr // Name of aggregate function pFunc
@@ -115808,12 +118464,12 @@ func minMaxQuery(tls *libc.TLS, db uintptr, pFunc uintptr, ppMinMax uintptr) U8
return U8(eRet)
}
zFunc = *(*uintptr)(unsafe.Pointer(pFunc + 8 /* &.u */))
- if Xsqlite3StrICmp(tls, zFunc, ts+13386 /* "min" */) == 0 {
+ if Xsqlite3StrICmp(tls, zFunc, ts+13839 /* "min" */) == 0 {
eRet = WHERE_ORDERBY_MIN
if Xsqlite3ExprCanBeNull(tls, (*ExprList_item)(unsafe.Pointer((pEList+8 /* &.a */))).FpExpr) != 0 {
sortFlags = U8(KEYINFO_ORDER_BIGNULL)
}
- } else if Xsqlite3StrICmp(tls, zFunc, ts+13390 /* "max" */) == 0 {
+ } else if Xsqlite3StrICmp(tls, zFunc, ts+13843 /* "max" */) == 0 {
eRet = WHERE_ORDERBY_MAX
sortFlags = U8(KEYINFO_ORDER_DESC)
} else {
@@ -115836,7 +118492,7 @@ func minMaxQuery(tls *libc.TLS, db uintptr, pFunc uintptr, ppMinMax uintptr) U8
// where table is a database table, not a sub-select or view. If the query
// does match this pattern, then a pointer to the Table object representing
// is returned. Otherwise, 0 is returned.
-func isSimpleCount(tls *libc.TLS, p uintptr, pAggInfo uintptr) uintptr { /* sqlite3.c:135900:14: */
+func isSimpleCount(tls *libc.TLS, p uintptr, pAggInfo uintptr) uintptr { /* sqlite3.c:136980:14: */
var pTab uintptr
var pExpr uintptr
@@ -115871,7 +118527,7 @@ func isSimpleCount(tls *libc.TLS, p uintptr, pAggInfo uintptr) uintptr { /* sqli
// was such a clause and the named index cannot be found, return
// SQLITE_ERROR and leave an error in pParse. Otherwise, populate
// pFrom->pIndex and return SQLITE_OK.
-func Xsqlite3IndexedByLookup(tls *libc.TLS, pParse uintptr, pFrom uintptr) int32 { /* sqlite3.c:135931:20: */
+func Xsqlite3IndexedByLookup(tls *libc.TLS, pParse uintptr, pFrom uintptr) int32 { /* sqlite3.c:137011:20: */
bp := tls.Alloc(16)
defer tls.Free(16)
@@ -115882,7 +118538,7 @@ func Xsqlite3IndexedByLookup(tls *libc.TLS, pParse uintptr, pFrom uintptr) int32
for pIdx = (*Table)(unsafe.Pointer(pTab)).FpIndex; (pIdx != 0) && (Xsqlite3StrICmp(tls, (*Index)(unsafe.Pointer(pIdx)).FzName, zIndexedBy) != 0); pIdx = (*Index)(unsafe.Pointer(pIdx)).FpNext {
}
if !(pIdx != 0) {
- Xsqlite3ErrorMsg(tls, pParse, ts+17059 /* "no such index: %..." */, libc.VaList(bp, zIndexedBy, 0))
+ Xsqlite3ErrorMsg(tls, pParse, ts+17514 /* "no such index: %..." */, libc.VaList(bp, zIndexedBy, 0))
(*Parse)(unsafe.Pointer(pParse)).FcheckSchema = U8(1)
return SQLITE_ERROR
}
@@ -115909,7 +118565,7 @@ func Xsqlite3IndexedByLookup(tls *libc.TLS, pParse uintptr, pFrom uintptr) int32
// This transformation is only needed for EXCEPT, INTERSECT, and UNION.
// The UNION ALL operator works fine with multiSelectOrderBy() even when
// there are COLLATE terms in the ORDER BY.
-func convertCompoundSelectToSubquery(tls *libc.TLS, pWalker uintptr, p uintptr) int32 { /* sqlite3.c:135972:12: */
+func convertCompoundSelectToSubquery(tls *libc.TLS, pWalker uintptr, p uintptr) int32 { /* sqlite3.c:137052:12: */
bp := tls.Alloc(16)
defer tls.Free(16)
@@ -115988,12 +118644,12 @@ func convertCompoundSelectToSubquery(tls *libc.TLS, pWalker uintptr, p uintptr)
// Check to see if the FROM clause term pFrom has table-valued function
// arguments. If it does, leave an error message in pParse and return
// non-zero, since pFrom is not allowed to be a table-valued function.
-func cannotBeFunction(tls *libc.TLS, pParse uintptr, pFrom uintptr) int32 { /* sqlite3.c:136037:12: */
+func cannotBeFunction(tls *libc.TLS, pParse uintptr, pFrom uintptr) int32 { /* sqlite3.c:137117:12: */
bp := tls.Alloc(8)
defer tls.Free(8)
- if (uint32(int32(*(*uint8)(unsafe.Pointer(pFrom + 60 /* &.fg */ + 4 /* &.isTabFunc */)) >> 5 & 0x1))) != 0 {
- Xsqlite3ErrorMsg(tls, pParse, ts+17077 /* "'%s' is not a fu..." */, libc.VaList(bp, (*SrcItem)(unsafe.Pointer(pFrom)).FzName))
+ if (uint32(int32(*(*uint16)(unsafe.Pointer(pFrom + 60 /* &.fg */ + 4 /* &.isTabFunc */)) & 0x2000 >> 13))) != 0 {
+ Xsqlite3ErrorMsg(tls, pParse, ts+17532 /* "'%s' is not a fu..." */, libc.VaList(bp, (*SrcItem)(unsafe.Pointer(pFrom)).FzName))
return 1
}
return 0
@@ -116007,7 +118663,7 @@ func cannotBeFunction(tls *libc.TLS, pParse uintptr, pFrom uintptr) int32 { /* s
//
// If a non-NULL value is returned, set *ppContext to point to the With
// object that the returned CTE belongs to.
-func searchWith(tls *libc.TLS, pWith uintptr, pItem uintptr, ppContext uintptr) uintptr { /* sqlite3.c:136056:19: */
+func searchWith(tls *libc.TLS, pWith uintptr, pItem uintptr, ppContext uintptr) uintptr { /* sqlite3.c:137136:19: */
var zName uintptr = (*SrcItem)(unsafe.Pointer(pItem)).FzName
var p uintptr
@@ -116019,6 +118675,9 @@ func searchWith(tls *libc.TLS, pWith uintptr, pItem uintptr, ppContext uintptr)
return ((p + 16 /* &.a */) + uintptr(i)*48)
}
}
+ if (*With)(unsafe.Pointer(p)).FbView != 0 {
+ break
+ }
}
return uintptr(0)
}
@@ -116028,24 +118687,36 @@ func searchWith(tls *libc.TLS, pWith uintptr, pItem uintptr, ppContext uintptr)
//
// This routine pushes the WITH clause passed as the second argument
// onto the top of the stack. If argument bFree is true, then this
-// WITH clause will never be popped from the stack. In this case it
-// should be freed along with the Parse object. In other cases, when
+// WITH clause will never be popped from the stack but should instead
+// be freed along with the Parse object. In other cases, when
// bFree==0, the With object will be freed along with the SELECT
// statement with which it is associated.
-func Xsqlite3WithPush(tls *libc.TLS, pParse uintptr, pWith uintptr, bFree U8) { /* sqlite3.c:136087:21: */
+//
+// This routine returns a copy of pWith. Or, if bFree is true and
+// the pWith object is destroyed immediately due to an OOM condition,
+// then this routine return NULL.
+//
+// If bFree is true, do not continue to use the pWith pointer after
+// calling this routine, Instead, use only the return value.
+func Xsqlite3WithPush(tls *libc.TLS, pParse uintptr, pWith uintptr, bFree U8) uintptr { /* sqlite3.c:137175:21: */
if pWith != 0 {
-
- (*With)(unsafe.Pointer(pWith)).FpOuter = (*Parse)(unsafe.Pointer(pParse)).FpWith
- (*Parse)(unsafe.Pointer(pParse)).FpWith = pWith
if bFree != 0 {
- Xsqlite3ParserAddCleanup(tls, pParse,
+ pWith = Xsqlite3ParserAddCleanup(tls, pParse,
*(*uintptr)(unsafe.Pointer(&struct {
f func(*libc.TLS, uintptr, uintptr)
}{Xsqlite3WithDelete})),
pWith)
+ if pWith == uintptr(0) {
+ return uintptr(0)
+ }
+ }
+ if (*Parse)(unsafe.Pointer(pParse)).FnErr == 0 {
+ (*With)(unsafe.Pointer(pWith)).FpOuter = (*Parse)(unsafe.Pointer(pParse)).FpWith
+ (*Parse)(unsafe.Pointer(pParse)).FpWith = pWith
}
}
+ return pWith
}
// This function checks if argument pFrom refers to a CTE declared by
@@ -116060,7 +118731,7 @@ func Xsqlite3WithPush(tls *libc.TLS, pParse uintptr, pWith uintptr, bFree U8) {
// Return 0 if no match is found.
// Return 1 if a match is found.
// Return 2 if an error condition is detected.
-func resolveFromTermToCte(tls *libc.TLS, pParse uintptr, pWalker uintptr, pFrom uintptr) int32 { /* sqlite3.c:136115:12: */
+func resolveFromTermToCte(tls *libc.TLS, pParse uintptr, pWalker uintptr, pFrom uintptr) int32 { /* sqlite3.c:137206:12: */
bp := tls.Alloc(48)
defer tls.Free(48)
@@ -116072,11 +118743,23 @@ func resolveFromTermToCte(tls *libc.TLS, pParse uintptr, pWalker uintptr, pFrom
// There are no WITH clauses in the stack. No match is possible
return 0
}
+ if (*Parse)(unsafe.Pointer(pParse)).FnErr != 0 {
+ // Prior errors might have left pParse->pWith in a goofy state, so
+ // go no further.
+ return 0
+ }
if (*SrcItem)(unsafe.Pointer(pFrom)).FzDatabase != uintptr(0) {
// The FROM term contains a schema qualifier (ex: main.t1) and so
// it cannot possibly be a CTE reference.
return 0
}
+ if (uint32(int32(*(*uint16)(unsafe.Pointer(pFrom + 60 /* &.fg */ + 4 /* &.notCte */)) & 0x80 >> 7))) != 0 {
+ // The FROM term is specifically excluded from matching a CTE.
+ // (1) It is part of a trigger that used to have zDatabase but had
+ // zDatabase removed by sqlite3FixTriggerStep().
+ // (2) This is the first term in the FROM clause of an UPDATE.
+ return 0
+ }
pCte = searchWith(tls, (*Parse)(unsafe.Pointer(pParse)).FpWith, pFrom, bp+40 /* &pWith */)
if pCte != 0 {
var db uintptr = (*Parse)(unsafe.Pointer(pParse)).Fdb
@@ -116128,8 +118811,9 @@ func resolveFromTermToCte(tls *libc.TLS, pParse uintptr, pWalker uintptr, pFrom
if (*Sqlite3)(unsafe.Pointer(db)).FmallocFailed != 0 {
return 2
}
+ *(*U32)(unsafe.Pointer((*SrcItem)(unsafe.Pointer(pFrom)).FpSelect + 4 /* &.selFlags */)) |= (U32(SF_CopyCte))
- libc.SetBitFieldPtr8Uint32(pFrom+60 /* &.fg */ +4 /* &.isCte */, uint32(1), 7, 0x80)
+ libc.SetBitFieldPtr16Uint32(pFrom+60 /* &.fg */ +4 /* &.isCte */, uint32(1), 8, 0x100)
*(*uintptr)(unsafe.Pointer(pFrom + 104 /* &.u2 */)) = pCteUse
(*CteUse)(unsafe.Pointer(pCteUse)).FnUse++
if ((*CteUse)(unsafe.Pointer(pCteUse)).FnUse >= 2) && (int32((*CteUse)(unsafe.Pointer(pCteUse)).FeM10d) == M10d_Any) {
@@ -116150,10 +118834,10 @@ func resolveFromTermToCte(tls *libc.TLS, pParse uintptr, pWalker uintptr, pFrom
(0 == Xsqlite3StrICmp(tls, (*SrcItem)(unsafe.Pointer(pItem)).FzName, (*Cte)(unsafe.Pointer(pCte)).FzName)) {
(*SrcItem)(unsafe.Pointer(pItem)).FpTab = pTab
(*Table)(unsafe.Pointer(pTab)).FnTabRef++
- libc.SetBitFieldPtr8Uint32(pItem+60 /* &.fg */ +4 /* &.isRecursive */, uint32(1), 5, 0x20)
+ libc.SetBitFieldPtr16Uint32(pItem+60 /* &.fg */ +4 /* &.isRecursive */, uint32(1), 10, 0x400)
if ((*Select)(unsafe.Pointer(pRecTerm)).FselFlags & U32(SF_Recursive)) != 0 {
Xsqlite3ErrorMsg(tls, pParse,
- ts+17100 /* "multiple referen..." */, libc.VaList(bp+8, (*Cte)(unsafe.Pointer(pCte)).FzName))
+ ts+17555 /* "multiple referen..." */, libc.VaList(bp+8, (*Cte)(unsafe.Pointer(pCte)).FzName))
return 2
}
*(*U32)(unsafe.Pointer(pRecTerm + 4 /* &.selFlags */)) |= (U32(SF_Recursive))
@@ -116169,7 +118853,7 @@ func resolveFromTermToCte(tls *libc.TLS, pParse uintptr, pWalker uintptr, pFrom
pRecTerm = (*Select)(unsafe.Pointer(pRecTerm)).FpPrior
}
- (*Cte)(unsafe.Pointer(pCte)).FzCteErr = ts + 17143 /* "circular referen..." */
+ (*Cte)(unsafe.Pointer(pCte)).FzCteErr = ts + 17598 /* "circular referen..." */
pSavedWith = (*Parse)(unsafe.Pointer(pParse)).FpWith
(*Parse)(unsafe.Pointer(pParse)).FpWith = *(*uintptr)(unsafe.Pointer(bp + 40 /* pWith */))
if ((*Select)(unsafe.Pointer(pSel)).FselFlags & U32(SF_Recursive)) != 0 {
@@ -116195,7 +118879,7 @@ func resolveFromTermToCte(tls *libc.TLS, pParse uintptr, pWalker uintptr, pFrom
pEList = (*Select)(unsafe.Pointer(pLeft)).FpEList
if (*Cte)(unsafe.Pointer(pCte)).FpCols != 0 {
if (pEList != 0) && ((*ExprList)(unsafe.Pointer(pEList)).FnExpr != (*ExprList)(unsafe.Pointer((*Cte)(unsafe.Pointer(pCte)).FpCols)).FnExpr) {
- Xsqlite3ErrorMsg(tls, pParse, ts+17166, /* "table %s has %d ..." */
+ Xsqlite3ErrorMsg(tls, pParse, ts+17621, /* "table %s has %d ..." */
libc.VaList(bp+16, (*Cte)(unsafe.Pointer(pCte)).FzName, (*ExprList)(unsafe.Pointer(pEList)).FnExpr, (*ExprList)(unsafe.Pointer((*Cte)(unsafe.Pointer(pCte)).FpCols)).FnExpr))
(*Parse)(unsafe.Pointer(pParse)).FpWith = pSavedWith
return 2
@@ -116206,9 +118890,9 @@ func resolveFromTermToCte(tls *libc.TLS, pParse uintptr, pWalker uintptr, pFrom
Xsqlite3ColumnsFromExprList(tls, pParse, pEList, (pTab + 70 /* &.nCol */), (pTab + 8 /* &.aCol */))
if bMayRecursive != 0 {
if ((*Select)(unsafe.Pointer(pSel)).FselFlags & U32(SF_Recursive)) != 0 {
- (*Cte)(unsafe.Pointer(pCte)).FzCteErr = ts + 17204 /* "multiple recursi..." */
+ (*Cte)(unsafe.Pointer(pCte)).FzCteErr = ts + 17659 /* "multiple recursi..." */
} else {
- (*Cte)(unsafe.Pointer(pCte)).FzCteErr = ts + 17238 /* "recursive refere..." */
+ (*Cte)(unsafe.Pointer(pCte)).FzCteErr = ts + 17693 /* "recursive refere..." */
}
Xsqlite3WalkSelect(tls, pWalker, pSel)
}
@@ -116225,7 +118909,7 @@ func resolveFromTermToCte(tls *libc.TLS, pParse uintptr, pWalker uintptr, pFrom
// This function is used as the xSelectCallback2() callback by
// sqlite3SelectExpand() when walking a SELECT tree to resolve table
// names and other FROM clause elements.
-func selectPopWith(tls *libc.TLS, pWalker uintptr, p uintptr) { /* sqlite3.c:136281:13: */
+func Xsqlite3SelectPopWith(tls *libc.TLS, pWalker uintptr, p uintptr) { /* sqlite3.c:137386:21: */
var pParse uintptr = (*Walker)(unsafe.Pointer(pWalker)).FpParse
if ((*Parse)(unsafe.Pointer(pParse)).FpWith != 0) && ((*Select)(unsafe.Pointer(p)).FpPrior == uintptr(0)) {
var pWith uintptr = (*Select)(unsafe.Pointer(findRightmost(tls, p))).FpWith
@@ -116241,7 +118925,7 @@ func selectPopWith(tls *libc.TLS, pWalker uintptr, p uintptr) { /* sqlite3.c:136
// allocates and populates the SrcList_item.pTab object. If successful,
// SQLITE_OK is returned. Otherwise, if an OOM error is encountered,
// SQLITE_NOMEM.
-func Xsqlite3ExpandSubquery(tls *libc.TLS, pParse uintptr, pFrom uintptr) int32 { /* sqlite3.c:136302:20: */
+func Xsqlite3ExpandSubquery(tls *libc.TLS, pParse uintptr, pFrom uintptr) int32 { /* sqlite3.c:137405:20: */
bp := tls.Alloc(8)
defer tls.Free(8)
@@ -116256,7 +118940,7 @@ func Xsqlite3ExpandSubquery(tls *libc.TLS, pParse uintptr, pFrom uintptr) int32
if (*SrcItem)(unsafe.Pointer(pFrom)).FzAlias != 0 {
(*Table)(unsafe.Pointer(pTab)).FzName = Xsqlite3DbStrDup(tls, (*Parse)(unsafe.Pointer(pParse)).Fdb, (*SrcItem)(unsafe.Pointer(pFrom)).FzAlias)
} else {
- (*Table)(unsafe.Pointer(pTab)).FzName = Xsqlite3MPrintf(tls, (*Parse)(unsafe.Pointer(pParse)).Fdb, ts+17276 /* "subquery_%u" */, libc.VaList(bp, (*Select)(unsafe.Pointer(pSel)).FselId))
+ (*Table)(unsafe.Pointer(pTab)).FzName = Xsqlite3MPrintf(tls, (*Parse)(unsafe.Pointer(pParse)).Fdb, ts+17731 /* "subquery_%u" */, libc.VaList(bp, (*Select)(unsafe.Pointer(pSel)).FselId))
}
for (*Select)(unsafe.Pointer(pSel)).FpPrior != 0 {
pSel = (*Select)(unsafe.Pointer(pSel)).FpPrior
@@ -116264,7 +118948,8 @@ func Xsqlite3ExpandSubquery(tls *libc.TLS, pParse uintptr, pFrom uintptr) int32
Xsqlite3ColumnsFromExprList(tls, pParse, (*Select)(unsafe.Pointer(pSel)).FpEList, (pTab + 70 /* &.nCol */), (pTab + 8 /* &.aCol */))
(*Table)(unsafe.Pointer(pTab)).FiPKey = int16(-1)
(*Table)(unsafe.Pointer(pTab)).FnRowLogEst = int16(200)
- *(*U32)(unsafe.Pointer(pTab + 64 /* &.tabFlags */)) |= (U32(TF_Ephemeral))
+ // The usual case - do not allow ROWID on a subquery
+ *(*U32)(unsafe.Pointer(pTab + 64 /* &.tabFlags */)) |= (U32(TF_Ephemeral | TF_NoVisibleRowid))
if (*Parse)(unsafe.Pointer(pParse)).FnErr != 0 {
return SQLITE_ERROR
@@ -116294,7 +118979,7 @@ func Xsqlite3ExpandSubquery(tls *libc.TLS, pParse uintptr, pFrom uintptr) int32
// If found, expand each "*" to be every column in every table
// and TABLE.* to be every column in TABLE.
//
-func selectExpander(tls *libc.TLS, pWalker uintptr, p uintptr) int32 { /* sqlite3.c:136348:12: */
+func selectExpander(tls *libc.TLS, pWalker uintptr, p uintptr) int32 { /* sqlite3.c:137457:12: */
bp := tls.Alloc(88)
defer tls.Free(88)
@@ -116327,6 +119012,15 @@ func selectExpander(tls *libc.TLS, pWalker uintptr, p uintptr) int32 { /* sqlite
}
pTabList = (*Select)(unsafe.Pointer(p)).FpSrc
pEList = (*Select)(unsafe.Pointer(p)).FpEList
+ if ((*Parse)(unsafe.Pointer(pParse)).FpWith != 0) && (((*Select)(unsafe.Pointer(p)).FselFlags & U32(SF_View)) != 0) {
+ if (*Select)(unsafe.Pointer(p)).FpWith == uintptr(0) {
+ (*Select)(unsafe.Pointer(p)).FpWith = Xsqlite3DbMallocZero(tls, db, uint64(unsafe.Sizeof(With{})))
+ if (*Select)(unsafe.Pointer(p)).FpWith == uintptr(0) {
+ return WRC_Abort
+ }
+ }
+ (*With)(unsafe.Pointer((*Select)(unsafe.Pointer(p)).FpWith)).FbView = 1
+ }
Xsqlite3WithPush(tls, pParse, (*Select)(unsafe.Pointer(p)).FpWith, uint8(0))
// Make sure cursor numbers have been assigned to all entries in
@@ -116373,7 +119067,7 @@ __1:
return WRC_Abort
}
if (*Table)(unsafe.Pointer(pTab)).FnTabRef >= U32(0xffff) {
- Xsqlite3ErrorMsg(tls, pParse, ts+17288, /* "too many referen..." */
+ Xsqlite3ErrorMsg(tls, pParse, ts+17743, /* "too many referen..." */
libc.VaList(bp, (*Table)(unsafe.Pointer(pTab)).FzName))
(*SrcItem)(unsafe.Pointer(pFrom)).FpTab = uintptr(0)
return WRC_Abort
@@ -116392,14 +119086,15 @@ __1:
if (((*Table)(unsafe.Pointer(pTab)).FpSelect != 0) &&
(((*Sqlite3)(unsafe.Pointer(db)).Fflags & uint64(SQLITE_EnableView)) == uint64(0))) &&
((*Table)(unsafe.Pointer(pTab)).FpSchema != (*Db)(unsafe.Pointer((*Sqlite3)(unsafe.Pointer(db)).FaDb+1*32)).FpSchema) {
- Xsqlite3ErrorMsg(tls, pParse, ts+17327, /* "access to view \"..." */
+ Xsqlite3ErrorMsg(tls, pParse, ts+17782, /* "access to view \"..." */
libc.VaList(bp+8, (*Table)(unsafe.Pointer(pTab)).FzName))
}
+
if ((((*Table)(unsafe.Pointer(pTab)).FnModuleArg != 0) &&
- ((uint32(int32(*(*uint8)(unsafe.Pointer((pFrom + 60 /* &.fg */) + 4 /* &.fromDDL */)) >> 1 & 0x1))) != 0)) &&
+ ((uint32(int32(*(*uint16)(unsafe.Pointer((pFrom + 60 /* &.fg */) + 4 /* &.fromDDL */)) & 0x200 >> 9))) != 0)) &&
((*Table)(unsafe.Pointer(pTab)).FpVTable != uintptr(0))) &&
(int32((*VTable)(unsafe.Pointer((*Table)(unsafe.Pointer(pTab)).FpVTable)).FeVtabRisk) > (libc.Bool32(((*Sqlite3)(unsafe.Pointer(db)).Fflags & uint64(SQLITE_TrustedSchema)) != uint64(0)))) {
- Xsqlite3ErrorMsg(tls, pParse, ts+17358, /* "unsafe use of vi..." */
+ Xsqlite3ErrorMsg(tls, pParse, ts+17813, /* "unsafe use of vi..." */
libc.VaList(bp+16, (*Table)(unsafe.Pointer(pTab)).FzName))
}
(*SrcItem)(unsafe.Pointer(pFrom)).FpSelect = Xsqlite3SelectDup(tls, db, (*Table)(unsafe.Pointer(pTab)).FpSelect, 0)
@@ -116413,7 +119108,7 @@ __1:
}
// Locate the index named by the INDEXED BY clause, if any.
- if ((uint32(int32(*(*uint8)(unsafe.Pointer((pFrom + 60 /* &.fg */) + 4 /* &.isIndexedBy */)) >> 6 & 0x1))) != 0) && (Xsqlite3IndexedByLookup(tls, pParse, pFrom) != 0) {
+ if ((uint32(int32(*(*uint16)(unsafe.Pointer((pFrom + 60 /* &.fg */) + 4 /* &.isIndexedBy */)) & 0x4000 >> 14))) != 0) && (Xsqlite3IndexedByLookup(tls, pParse, pFrom) != 0) {
return WRC_Abort
}
@@ -116474,7 +119169,7 @@ __3:
pNew = Xsqlite3ExprListAppend(tls, pParse, pNew, (*ExprList_item)(unsafe.Pointer(a+uintptr(k)*32)).FpExpr)
if pNew != 0 {
(*ExprList_item)(unsafe.Pointer((pNew + 8 /* &.a */) + uintptr(((*ExprList)(unsafe.Pointer(pNew)).FnExpr-1))*32)).FzEName = (*ExprList_item)(unsafe.Pointer(a + uintptr(k)*32)).FzEName
- libc.SetBitFieldPtr8Uint32((pNew+8 /* &.a */)+uintptr(((*ExprList)(unsafe.Pointer(pNew)).FnExpr-1))*32+20 /* &.eEName */, (uint32(int32(*(*uint8)(unsafe.Pointer(a + uintptr(k)*32 + 20 /* &.eEName */)) >> 6 & 0x3))), 0, 0x3)
+ libc.SetBitFieldPtr8Uint32((pNew+8 /* &.a */)+uintptr(((*ExprList)(unsafe.Pointer(pNew)).FnExpr-1))*32+20 /* &.eEName */, (uint32(int32(*(*uint8)(unsafe.Pointer(a + uintptr(k)*32 + 20 /* &.eEName */)) & 0xc0 >> 6))), 6, 0xc0)
(*ExprList_item)(unsafe.Pointer(a + uintptr(k)*32)).FzEName = uintptr(0)
}
(*ExprList_item)(unsafe.Pointer(a + uintptr(k)*32)).FpExpr = uintptr(0)
@@ -116514,7 +119209,7 @@ __3:
if iDb >= 0 {
zSchemaName = (*Db)(unsafe.Pointer((*Sqlite3)(unsafe.Pointer(db)).FaDb + uintptr(iDb)*32)).FzDbSName
} else {
- zSchemaName = ts + 17391 /* "*" */
+ zSchemaName = ts + 17846 /* "*" */
}
}
for j = 0; j < int32((*Table)(unsafe.Pointer(pTab)).FnCol); j++ {
@@ -116563,7 +119258,7 @@ __3:
pExpr = Xsqlite3PExpr(tls, pParse, TK_DOT, pLeft, pExpr)
}
if longNames != 0 {
- zColname = Xsqlite3MPrintf(tls, db, ts+10332 /* "%s.%s" */, libc.VaList(bp+24, zTabName, zName))
+ zColname = Xsqlite3MPrintf(tls, db, ts+10785 /* "%s.%s" */, libc.VaList(bp+24, zTabName, zName))
zToFree = zColname
}
} else {
@@ -116579,11 +119274,11 @@ __3:
(*ExprList_item)(unsafe.Pointer(pX)).FzEName = Xsqlite3DbStrDup(tls, db, (*ExprList_item)(unsafe.Pointer(((*Select)(unsafe.Pointer(pSub)).FpEList+8 /* &.a */)+uintptr(j)*32)).FzEName)
} else {
- (*ExprList_item)(unsafe.Pointer(pX)).FzEName = Xsqlite3MPrintf(tls, db, ts+17393, /* "%s.%s.%s" */
+ (*ExprList_item)(unsafe.Pointer(pX)).FzEName = Xsqlite3MPrintf(tls, db, ts+17848, /* "%s.%s.%s" */
libc.VaList(bp+40, zSchemaName, zTabName, zColname))
}
- libc.SetBitFieldPtr8Uint32(pX+20 /* &.eEName */, uint32(ENAME_TAB), 0, 0x3)
+ libc.SetBitFieldPtr8Uint32(pX+20 /* &.eEName */, uint32(ENAME_TAB), 6, 0xc0)
}
Xsqlite3DbFree(tls, db, zToFree)
}
@@ -116599,9 +119294,9 @@ __3:
;
if !(tableSeen != 0) {
if zTName != 0 {
- Xsqlite3ErrorMsg(tls, pParse, ts+17402 /* "no such table: %..." */, libc.VaList(bp+64, zTName))
+ Xsqlite3ErrorMsg(tls, pParse, ts+17857 /* "no such table: %..." */, libc.VaList(bp+64, zTName))
} else {
- Xsqlite3ErrorMsg(tls, pParse, ts+17420 /* "no tables specif..." */, 0)
+ Xsqlite3ErrorMsg(tls, pParse, ts+17875 /* "no tables specif..." */, 0)
}
}
}
@@ -116611,7 +119306,7 @@ __3:
}
if (*Select)(unsafe.Pointer(p)).FpEList != 0 {
if (*ExprList)(unsafe.Pointer((*Select)(unsafe.Pointer(p)).FpEList)).FnExpr > *(*int32)(unsafe.Pointer((db + 128 /* &.aLimit */) + 2*4)) {
- Xsqlite3ErrorMsg(tls, pParse, ts+17440 /* "too many columns..." */, 0)
+ Xsqlite3ErrorMsg(tls, pParse, ts+17895 /* "too many columns..." */, 0)
return WRC_Abort
}
if (elistFlags & (U32(EP_HasFunc | EP_Subquery))) != U32(0) {
@@ -116632,7 +119327,7 @@ __3:
// If anything goes wrong, an error message is written into pParse.
// The calling function can detect the problem by looking at pParse->nErr
// and/or pParse->db->mallocFailed.
-func sqlite3SelectExpand(tls *libc.TLS, pParse uintptr, pSelect uintptr) { /* sqlite3.c:136663:13: */
+func sqlite3SelectExpand(tls *libc.TLS, pParse uintptr, pSelect uintptr) { /* sqlite3.c:137782:13: */
bp := tls.Alloc(48)
defer tls.Free(48)
@@ -116654,7 +119349,7 @@ func sqlite3SelectExpand(tls *libc.TLS, pParse uintptr, pSelect uintptr) { /* sq
}{selectExpander}))
(*Walker)(unsafe.Pointer(bp /* &w */)).FxSelectCallback2 = *(*uintptr)(unsafe.Pointer(&struct {
f func(*libc.TLS, uintptr, uintptr)
- }{selectPopWith}))
+ }{Xsqlite3SelectPopWith}))
(*Walker)(unsafe.Pointer(bp /* &w */)).FeCode = U16(0)
Xsqlite3WalkSelect(tls, bp /* &w */, pSelect)
}
@@ -116670,7 +119365,7 @@ func sqlite3SelectExpand(tls *libc.TLS, pParse uintptr, pSelect uintptr) { /* sq
// by selectExpander() but the type and collation information was omitted
// at that point because identifiers had not yet been resolved. This
// routine is called after identifier resolution.
-func selectAddSubqueryTypeInfo(tls *libc.TLS, pWalker uintptr, p uintptr) { /* sqlite3.c:136693:13: */
+func selectAddSubqueryTypeInfo(tls *libc.TLS, pWalker uintptr, p uintptr) { /* sqlite3.c:137812:13: */
var pParse uintptr
var i int32
var pTabList uintptr
@@ -116699,7 +119394,7 @@ __1:
pSel = (*Select)(unsafe.Pointer(pSel)).FpPrior
}
Xsqlite3SelectAddColumnTypeAndCollation(tls, pParse, pTab, pSel,
- int8(SQLITE_AFF_NONE))
+ uint8(SQLITE_AFF_NONE))
}
}
@@ -116718,7 +119413,7 @@ __3:
// SELECT statement.
//
// Use this routine after name resolution.
-func sqlite3SelectAddTypeInfo(tls *libc.TLS, pParse uintptr, pSelect uintptr) { /* sqlite3.c:136728:13: */
+func sqlite3SelectAddTypeInfo(tls *libc.TLS, pParse uintptr, pSelect uintptr) { /* sqlite3.c:137847:13: */
bp := tls.Alloc(48)
defer tls.Free(48)
@@ -116747,7 +119442,7 @@ func sqlite3SelectAddTypeInfo(tls *libc.TLS, pParse uintptr, pSelect uintptr) {
// * Identifiers in expression are matched to tables.
//
// This routine acts recursively on all subqueries within the SELECT.
-func Xsqlite3SelectPrep(tls *libc.TLS, pParse uintptr, p uintptr, pOuterNC uintptr) { /* sqlite3.c:136752:21: */
+func Xsqlite3SelectPrep(tls *libc.TLS, pParse uintptr, p uintptr, pOuterNC uintptr) { /* sqlite3.c:137871:21: */
if (*Sqlite3)(unsafe.Pointer((*Parse)(unsafe.Pointer(pParse)).Fdb)).FmallocFailed != 0 {
return
@@ -116772,7 +119467,10 @@ func Xsqlite3SelectPrep(tls *libc.TLS, pParse uintptr, p uintptr, pOuterNC uintp
// intermediate results while calculating an aggregate. This
// routine generates code that stores NULLs in all of those memory
// cells.
-func resetAccumulator(tls *libc.TLS, pParse uintptr, pAggInfo uintptr) { /* sqlite3.c:136775:13: */
+func resetAccumulator(tls *libc.TLS, pParse uintptr, pAggInfo uintptr) { /* sqlite3.c:137894:13: */
+ bp := tls.Alloc(8)
+ defer tls.Free(8)
+
var v uintptr = (*Parse)(unsafe.Pointer(pParse)).FpVdbe
var i int32
var pFunc uintptr
@@ -116796,12 +119494,13 @@ __1:
if (*(*uintptr)(unsafe.Pointer(pE + 32 /* &.x */)) == uintptr(0)) || ((*ExprList)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(pE + 32 /* &.x */)))).FnExpr != 1) {
Xsqlite3ErrorMsg(tls, pParse,
- ts+17471 /* "DISTINCT aggrega..." */, 0)
+ ts+17926 /* "DISTINCT aggrega..." */, 0)
(*AggInfo_func)(unsafe.Pointer(pFunc)).FiDistinct = -1
} else {
var pKeyInfo uintptr = Xsqlite3KeyInfoFromExprList(tls, pParse, *(*uintptr)(unsafe.Pointer(pE + 32 /* &.x */)), 0, 0)
- Xsqlite3VdbeAddOp4(tls, v, OP_OpenEphemeral, (*AggInfo_func)(unsafe.Pointer(pFunc)).FiDistinct, 0, 0,
- pKeyInfo, -9)
+ (*AggInfo_func)(unsafe.Pointer(pFunc)).FiDistAddr = Xsqlite3VdbeAddOp4(tls, v, OP_OpenEphemeral,
+ (*AggInfo_func)(unsafe.Pointer(pFunc)).FiDistinct, 0, 0, pKeyInfo, -9)
+ Xsqlite3VdbeExplain(tls, pParse, uint8(0), ts+17977 /* "USE TEMP B-TREE ..." */, libc.VaList(bp, (*FuncDef)(unsafe.Pointer((*AggInfo_func)(unsafe.Pointer(pFunc)).FpFunc)).FzName))
}
}
@@ -116809,7 +119508,7 @@ __1:
goto __2
__2:
i++
- pFunc += 24
+ pFunc += 32
goto __1
goto __3
__3:
@@ -116817,7 +119516,7 @@ __3:
// Invoke the OP_AggFinalize opcode for every aggregate function
// in the AggInfo structure.
-func finalizeAggFunctions(tls *libc.TLS, pParse uintptr, pAggInfo uintptr) { /* sqlite3.c:136817:13: */
+func finalizeAggFunctions(tls *libc.TLS, pParse uintptr, pAggInfo uintptr) { /* sqlite3.c:137938:13: */
var v uintptr = (*Parse)(unsafe.Pointer(pParse)).FpVdbe
var i int32
var pF uintptr
@@ -116842,7 +119541,7 @@ __1:
goto __2
__2:
i++
- pF += 24
+ pF += 32
goto __1
goto __3
__3:
@@ -116855,7 +119554,7 @@ __3:
// in pAggInfo, then only populate the pAggInfo->nAccumulator accumulator
// registers if register regAcc contains 0. The caller will take care
// of setting and clearing regAcc.
-func updateAccumulator(tls *libc.TLS, pParse uintptr, regAcc int32, pAggInfo uintptr) { /* sqlite3.c:136839:13: */
+func updateAccumulator(tls *libc.TLS, pParse uintptr, regAcc int32, pAggInfo uintptr, eDistinctType int32) { /* sqlite3.c:137960:13: */
var v uintptr = (*Parse)(unsafe.Pointer(pParse)).FpVdbe
var i int32
var regHit int32 = 0
@@ -116907,13 +119606,12 @@ __1:
nArg = 0
regAgg = 0
}
- if (*AggInfo_func)(unsafe.Pointer(pF)).FiDistinct >= 0 {
+ if ((*AggInfo_func)(unsafe.Pointer(pF)).FiDistinct >= 0) && (pList != 0) {
if addrNext == 0 {
addrNext = Xsqlite3VdbeMakeLabel(tls, pParse)
}
- // Error condition
- // Also an error
- codeDistinct(tls, pParse, (*AggInfo_func)(unsafe.Pointer(pF)).FiDistinct, addrNext, 1, regAgg)
+ (*AggInfo_func)(unsafe.Pointer(pF)).FiDistinct = codeDistinct(tls, pParse, eDistinctType,
+ (*AggInfo_func)(unsafe.Pointer(pF)).FiDistinct, addrNext, pList, regAgg)
}
if ((*FuncDef)(unsafe.Pointer((*AggInfo_func)(unsafe.Pointer(pF)).FpFunc)).FfuncFlags & U32(SQLITE_FUNC_NEEDCOLL)) != 0 {
var pColl uintptr = uintptr(0)
@@ -116958,7 +119656,7 @@ __1:
goto __2
__2:
i++
- pF += 24
+ pF += 32
goto __1
goto __3
__3:
@@ -116996,25 +119694,25 @@ __9:
// Add a single OP_Explain instruction to the VDBE to explain a simple
// count(*) query ("SELECT count(*) FROM pTab").
-func explainSimpleCount(tls *libc.TLS, pParse uintptr, pTab uintptr, pIdx uintptr) { /* sqlite3.c:136936:13: */
+func explainSimpleCount(tls *libc.TLS, pParse uintptr, pTab uintptr, pIdx uintptr) { /* sqlite3.c:138061:13: */
bp := tls.Alloc(24)
defer tls.Free(24)
if int32((*Parse)(unsafe.Pointer(pParse)).Fexplain) == 2 {
- var bCover int32 = (libc.Bool32((pIdx != uintptr(0)) && ((((*Table)(unsafe.Pointer((pTab))).FtabFlags & U32(TF_WithoutRowid)) == U32(0)) || !((int32(*(*uint16)(unsafe.Pointer((pIdx) + 100 /* &.idxType */)) >> 14 & 0x3)) == SQLITE_IDXTYPE_PRIMARYKEY))))
- Xsqlite3VdbeExplain(tls, pParse, uint8(0), ts+17522, /* "SCAN TABLE %s%s%..." */
+ var bCover int32 = (libc.Bool32((pIdx != uintptr(0)) && ((((*Table)(unsafe.Pointer((pTab))).FtabFlags & U32(TF_WithoutRowid)) == U32(0)) || !((int32(*(*uint16)(unsafe.Pointer((pIdx) + 100 /* &.idxType */)) & 0xc000 >> 14)) == SQLITE_IDXTYPE_PRIMARYKEY))))
+ Xsqlite3VdbeExplain(tls, pParse, uint8(0), ts+18010, /* "SCAN %s%s%s" */
libc.VaList(bp, (*Table)(unsafe.Pointer(pTab)).FzName,
func() uintptr {
if bCover != 0 {
- return ts + 17540 /* " USING COVERING ..." */
+ return ts + 18022 /* " USING COVERING ..." */
}
- return ts + 703 /* "" */
+ return ts + 755 /* "" */
}(),
func() uintptr {
if bCover != 0 {
return (*Index)(unsafe.Pointer(pIdx)).FzName
}
- return ts + 703 /* "" */
+ return ts + 755 /* "" */
}()))
}
}
@@ -117028,13 +119726,13 @@ func explainSimpleCount(tls *libc.TLS, pParse uintptr, pTab uintptr, pIdx uintpt
// sub-expression matches the criteria for being moved to the WHERE
// clause. If so, add it to the WHERE clause and replace the sub-expression
// within the HAVING expression with a constant "1".
-func havingToWhereExprCb(tls *libc.TLS, pWalker uintptr, pExpr uintptr) int32 { /* sqlite3.c:136965:12: */
+func havingToWhereExprCb(tls *libc.TLS, pWalker uintptr, pExpr uintptr) int32 { /* sqlite3.c:138090:12: */
if int32((*Expr)(unsafe.Pointer(pExpr)).Fop) != TK_AND {
var pS uintptr = *(*uintptr)(unsafe.Pointer(pWalker + 40 /* &.u */))
if (Xsqlite3ExprIsConstantOrGroupBy(tls, (*Walker)(unsafe.Pointer(pWalker)).FpParse, pExpr, (*Select)(unsafe.Pointer(pS)).FpGroupBy) != 0) &&
((libc.Bool32(((*Expr)(unsafe.Pointer((pExpr))).Fflags & (U32(EP_FromJoin | EP_IsFalse))) == U32(EP_IsFalse))) == 0) {
var db uintptr = (*Parse)(unsafe.Pointer((*Walker)(unsafe.Pointer(pWalker)).FpParse)).Fdb
- var pNew uintptr = Xsqlite3Expr(tls, db, TK_INTEGER, ts+6782 /* "1" */)
+ var pNew uintptr = Xsqlite3Expr(tls, db, TK_INTEGER, ts+6913 /* "1" */)
if pNew != 0 {
var pWhere uintptr = (*Select)(unsafe.Pointer(pS)).FpWhere
{
@@ -117066,7 +119764,7 @@ func havingToWhereExprCb(tls *libc.TLS, pWalker uintptr, pExpr uintptr) int32 {
// A term of the HAVING expression is eligible for transfer if it consists
// entirely of constants and expressions that are also GROUP BY terms that
// use the "BINARY" collation sequence.
-func havingToWhere(tls *libc.TLS, pParse uintptr, p uintptr) { /* sqlite3.c:137001:13: */
+func havingToWhere(tls *libc.TLS, pParse uintptr, p uintptr) { /* sqlite3.c:138126:13: */
bp := tls.Alloc(48)
defer tls.Free(48)
@@ -117084,7 +119782,7 @@ func havingToWhere(tls *libc.TLS, pParse uintptr, p uintptr) { /* sqlite3.c:1370
// Check to see if the pThis entry of pTabList is a self-join of a prior view.
// If it is, then return the SrcList_item for the prior view. If it is not,
// then return 0.
-func isSelfJoinView(tls *libc.TLS, pTabList uintptr, pThis uintptr) uintptr { /* sqlite3.c:137021:16: */
+func isSelfJoinView(tls *libc.TLS, pTabList uintptr, pThis uintptr) uintptr { /* sqlite3.c:138146:16: */
var pItem uintptr
if ((*Select)(unsafe.Pointer((*SrcItem)(unsafe.Pointer(pThis)).FpSelect)).FselFlags & U32(SF_PushDown)) != 0 {
@@ -117095,7 +119793,7 @@ func isSelfJoinView(tls *libc.TLS, pTabList uintptr, pThis uintptr) uintptr { /*
if (*SrcItem)(unsafe.Pointer(pItem)).FpSelect == uintptr(0) {
continue
}
- if (uint32(int32(*(*uint8)(unsafe.Pointer(pItem + 60 /* &.fg */ + 4 /* &.viaCoroutine */)) >> 3 & 0x1))) != 0 {
+ if (uint32(int32(*(*uint16)(unsafe.Pointer(pItem + 60 /* &.fg */ + 4 /* &.viaCoroutine */)) & 0x800 >> 11))) != 0 {
continue
}
if (*SrcItem)(unsafe.Pointer(pItem)).FzName == uintptr(0) {
@@ -117125,7 +119823,7 @@ func isSelfJoinView(tls *libc.TLS, pTabList uintptr, pThis uintptr) uintptr { /*
}
// Deallocate a single AggInfo object
-func agginfoFree(tls *libc.TLS, db uintptr, p uintptr) { /* sqlite3.c:137056:13: */
+func agginfoFree(tls *libc.TLS, db uintptr, p uintptr) { /* sqlite3.c:138181:13: */
Xsqlite3DbFree(tls, db, (*AggInfo)(unsafe.Pointer(p)).FaCol)
Xsqlite3DbFree(tls, db, (*AggInfo)(unsafe.Pointer(p)).FaFunc)
Xsqlite3DbFreeNN(tls, db, p)
@@ -117142,7 +119840,7 @@ func agginfoFree(tls *libc.TLS, db uintptr, p uintptr) { /* sqlite3.c:137056:13:
//
// This routine does NOT free the Select structure passed in. The
// calling function needs to do that.
-func Xsqlite3Select(tls *libc.TLS, pParse uintptr, p uintptr, pDest uintptr) int32 { /* sqlite3.c:137162:20: */
+func Xsqlite3Select(tls *libc.TLS, pParse uintptr, p uintptr, pDest uintptr) int32 { /* sqlite3.c:138287:20: */
bp := tls.Alloc(216)
defer tls.Free(216)
@@ -117181,7 +119879,7 @@ func Xsqlite3Select(tls *libc.TLS, pParse uintptr, p uintptr, pDest uintptr) int
// holds the result of the materialization.
var pCteUse uintptr
var pCteUse1 uintptr
- // Materalize the view. If the view is not correlated, generate a
+ // Materialize the view. If the view is not correlated, generate a
// subroutine to do the materialization so that subsequent uses of
// the same view can reuse the materialization.
var topAddr int32
@@ -117206,6 +119904,7 @@ func Xsqlite3Select(tls *libc.TLS, pParse uintptr, p uintptr, pDest uintptr) int
var k int32 // Loop counter
var pItem2 uintptr
var pExpr uintptr
+ var pExpr1 uintptr
var r1 int32
var pCol uintptr
// Rows are coming out in undetermined order. We have to push
@@ -117216,6 +119915,7 @@ func Xsqlite3Select(tls *libc.TLS, pParse uintptr, p uintptr, pDest uintptr) int
var regRecord int32
var nCol int32
var nGroupBy int32
+ var pF uintptr
var pKeyInfo1 uintptr // Keying information for the group by clause
var addr1 int32 // A-vs-B comparision jump
var addrOutputRow int32 // Start of subroutine that outputs a result row
@@ -117224,7 +119924,10 @@ func Xsqlite3Select(tls *libc.TLS, pParse uintptr, p uintptr, pDest uintptr) int
var addrTopOfLoop int32 // Top of the input loop
var addrSortingIdx int32 // The OP_OpenEphemeral for the sorting index
var addrReset int32 // Subroutine for resetting the accumulator
- var regReset int32
+ var regReset int32 // Return address register for reset subroutine
+ var pDistinct uintptr
+ var distFlag U16
+ var eDist int32
// If isSimpleCount() returns a pointer to a Table structure, then
// the SQL statement is of the form:
//
@@ -117243,7 +119946,11 @@ func Xsqlite3Select(tls *libc.TLS, pParse uintptr, p uintptr, pDest uintptr) int
var pKeyInfo2 uintptr // Keyinfo for scanned index
var pBest uintptr // Best index found so far
var iRoot Pgno
- var regAcc int32
+ var pF1 uintptr
+ var regAcc int32 // "populate accumulators" flag
+ var pDistinct1 uintptr
+ var distFlag1 U16
+ var eDist1 int32
var pTab1 uintptr
// This case when there exist aggregate functions or a GROUP BY clause
// or both
@@ -117327,7 +120034,7 @@ __7:
goto __10
}
Xsqlite3ErrorMsg(tls, pParse,
- ts+17563, /* "target object/al..." */
+ ts+18045, /* "target object/al..." */
libc.VaList(bp, func() uintptr {
if (*SrcItem)(unsafe.Pointer(p0)).FzAlias != 0 {
return (*SrcItem)(unsafe.Pointer(p0)).FzAlias
@@ -117350,12 +120057,11 @@ __6:
if !(int32((*SelectDest)(unsafe.Pointer(pDest)).FeDest) == SRT_Output) {
goto __11
}
- generateColumnNames(tls, pParse, p)
+ Xsqlite3GenerateColumnNames(tls, pParse, p)
__11:
;
- rc = Xsqlite3WindowRewrite(tls, pParse, p)
- if !(rc != 0) {
+ if !(Xsqlite3WindowRewrite(tls, pParse, p) != 0) {
goto __12
}
@@ -117408,7 +120114,7 @@ __17:
if !(int32((*Table)(unsafe.Pointer(pTab)).FnCol) != (*ExprList)(unsafe.Pointer((*Select)(unsafe.Pointer(pSub)).FpEList)).FnExpr) {
goto __18
}
- Xsqlite3ErrorMsg(tls, pParse, ts+17617, /* "expected %d colu..." */
+ Xsqlite3ErrorMsg(tls, pParse, ts+18099, /* "expected %d colu..." */
libc.VaList(bp+8, int32((*Table)(unsafe.Pointer(pTab)).FnCol), (*Table)(unsafe.Pointer(pTab)).FzName, (*ExprList)(unsafe.Pointer((*Select)(unsafe.Pointer(pSub)).FpEList)).FnExpr))
goto select_end
__18:
@@ -117509,7 +120215,8 @@ __25:
// a join. No need to speed time on this operation for non-join queries
// as the equivalent optimization will be handled by query planner in
// sqlite3WhereBegin().
- if !((((*SrcList)(unsafe.Pointer(pTabList)).FnSrc > 1) &&
+ if !(((((*Select)(unsafe.Pointer(p)).FpWhere != uintptr(0)) &&
+ (int32((*Expr)(unsafe.Pointer((*Select)(unsafe.Pointer(p)).FpWhere)).Fop) == TK_AND)) &&
(((*Sqlite3)(unsafe.Pointer((db))).FdbOptFlags & (U32(SQLITE_PropagateConst))) == U32(0))) &&
(propagateConstants(tls, pParse, p) != 0)) {
goto __27
@@ -117548,7 +120255,7 @@ __29:
if !(((*SrcItem)(unsafe.Pointer(pItem1)).FcolUsed == uint64(0)) && ((*SrcItem)(unsafe.Pointer(pItem1)).FzName != uintptr(0))) {
goto __32
}
- Xsqlite3AuthCheck(tls, pParse, SQLITE_READ, (*SrcItem)(unsafe.Pointer(pItem1)).FzName, ts+703 /* "" */, (*SrcItem)(unsafe.Pointer(pItem1)).FzDatabase)
+ Xsqlite3AuthCheck(tls, pParse, SQLITE_READ, (*SrcItem)(unsafe.Pointer(pItem1)).FzName, ts+755 /* "" */, (*SrcItem)(unsafe.Pointer(pItem1)).FzDatabase)
__32:
;
@@ -117561,17 +120268,7 @@ __32:
__33:
;
- // The code for a subquery should only be generated once, though it is
- // technically harmless for it to be generated multiple times. The
- // following assert() will detect if something changes to cause
- // the same subquery to be coded multiple times, as a signal to the
- // developers to try to optimize the situation.
- //
- // Update 2019-07-24:
- // See ticket https://sqlite.org/src/tktview/c52b09c7f38903b1311cec40.
- // The dbsqlfuzz fuzzer found a case where the same subquery gets
- // coded twice. So this assert() now becomes a testcase(). It should
- // be very rare, though.
+ // The code for a subquery should only be generated once.
// Increment Parse.nHeight by the height of the largest expression
// tree referred to by this, the parent select. The child select
@@ -117584,7 +120281,7 @@ __33:
// Make copies of constant WHERE-clause terms in the outer query down
// inside the subquery. This can help the subquery to run more efficiently.
if !(((((*Sqlite3)(unsafe.Pointer((db))).FdbOptFlags & (U32(SQLITE_PushDown))) == U32(0)) &&
- (((int32(*(*uint8)(unsafe.Pointer((pItem1 + 60 /* &.fg */) + 4 /* &.isCte */)) >> 0 & 0x1)) == 0) || (int32((*CteUse)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(pItem1 + 104 /* &.u2 */)))).FeM10d) != M10d_Yes))) &&
+ (((int32(*(*uint16)(unsafe.Pointer((pItem1 + 60 /* &.fg */) + 4 /* &.isCte */)) & 0x100 >> 8)) == 0) || (int32((*CteUse)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(pItem1 + 104 /* &.u2 */)))).FeM10d) != M10d_Yes))) &&
(pushDownWhereTerms(tls, pParse, pSub1, (*Select)(unsafe.Pointer(p)).FpWhere, (*SrcItem)(unsafe.Pointer(pItem1)).FiCursor,
(libc.Bool32((int32((*SrcItem)(unsafe.Pointer(pItem1)).Ffg.Fjointype)&JT_OUTER) != 0))) != 0)) {
goto __34
@@ -117611,7 +120308,7 @@ __35:
if !(((i == 0) &&
(((*SrcList)(unsafe.Pointer(pTabList)).FnSrc == 1) ||
((int32((*SrcItem)(unsafe.Pointer((pTabList+8 /* &.a */)+1*112)).Ffg.Fjointype) & (JT_LEFT | JT_CROSS)) != 0))) && // (1)
- (((int32(*(*uint8)(unsafe.Pointer((pItem1 + 60 /* &.fg */) + 4 /* &.isCte */)) >> 0 & 0x1)) == 0) || (int32((*CteUse)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(pItem1 + 104 /* &.u2 */)))).FeM10d) != M10d_Yes))) {
+ (((int32(*(*uint16)(unsafe.Pointer((pItem1 + 60 /* &.fg */) + 4 /* &.isCte */)) & 0x100 >> 8)) == 0) || (int32((*CteUse)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(pItem1 + 104 /* &.u2 */)))).FeM10d) != M10d_Yes))) {
goto __36
}
// Implement a co-routine that will return a single row of the result
@@ -117623,17 +120320,17 @@ __35:
(*SrcItem)(unsafe.Pointer(pItem1)).FaddrFillSub = addrTop
Xsqlite3SelectDestInit(tls, bp+96 /* &dest */, SRT_Coroutine, (*SrcItem)(unsafe.Pointer(pItem1)).FregReturn)
- Xsqlite3VdbeExplain(tls, pParse, uint8(1), ts+17657 /* "CO-ROUTINE %u" */, libc.VaList(bp+32, (*Select)(unsafe.Pointer(pSub1)).FselId))
+ Xsqlite3VdbeExplain(tls, pParse, uint8(1), ts+18139 /* "CO-ROUTINE %!S" */, libc.VaList(bp+32, pItem1))
Xsqlite3Select(tls, pParse, pSub1, bp+96 /* &dest */)
(*Table)(unsafe.Pointer((*SrcItem)(unsafe.Pointer(pItem1)).FpTab)).FnRowLogEst = (*Select)(unsafe.Pointer(pSub1)).FnSelectRow
- libc.SetBitFieldPtr8Uint32(pItem1+60 /* &.fg */ +4 /* &.viaCoroutine */, uint32(1), 4, 0x10)
+ libc.SetBitFieldPtr16Uint32(pItem1+60 /* &.fg */ +4 /* &.viaCoroutine */, uint32(1), 11, 0x800)
(*SrcItem)(unsafe.Pointer(pItem1)).FregResult = (*SelectDest)(unsafe.Pointer(bp + 96 /* &dest */)).FiSdst
Xsqlite3VdbeEndCoroutine(tls, v, (*SrcItem)(unsafe.Pointer(pItem1)).FregReturn)
Xsqlite3VdbeJumpHere(tls, v, (addrTop - 1))
Xsqlite3ClearTempRegCache(tls, pParse)
goto __37
__36:
- if !(((uint32(int32(*(*uint8)(unsafe.Pointer((pItem1 + 60 /* &.fg */) + 4 /* &.isCte */)) >> 0 & 0x1))) != 0) && ((*CteUse)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(pItem1 + 104 /* &.u2 */)))).FaddrM9e > 0)) {
+ if !(((uint32(int32(*(*uint16)(unsafe.Pointer((pItem1 + 60 /* &.fg */) + 4 /* &.isCte */)) & 0x100 >> 8))) != 0) && ((*CteUse)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(pItem1 + 104 /* &.u2 */)))).FaddrM9e > 0)) {
goto __38
}
// This is a CTE for which materialization code has already been
@@ -117668,11 +120365,10 @@ __43:
__41:
onceAddr = 0
- // Ticket c52b09c7f38903b1311
(*SrcItem)(unsafe.Pointer(pItem1)).FregReturn = libc.PreIncInt32(&(*Parse)(unsafe.Pointer(pParse)).FnMem, 1)
topAddr = Xsqlite3VdbeAddOp2(tls, v, OP_Integer, 0, (*SrcItem)(unsafe.Pointer(pItem1)).FregReturn)
(*SrcItem)(unsafe.Pointer(pItem1)).FaddrFillSub = (topAddr + 1)
- if !((int32(*(*uint8)(unsafe.Pointer((pItem1 + 60 /* &.fg */) + 4 /* &.isCorrelated */)) >> 4 & 0x1)) == 0) {
+ if !((int32(*(*uint16)(unsafe.Pointer((pItem1 + 60 /* &.fg */) + 4 /* &.isCorrelated */)) & 0x1000 >> 12)) == 0) {
goto __44
}
// If the subquery is not correlated and if we are not inside of
@@ -117686,7 +120382,7 @@ __44:
__45:
;
Xsqlite3SelectDestInit(tls, bp+96 /* &dest */, SRT_EphemTab, (*SrcItem)(unsafe.Pointer(pItem1)).FiCursor)
- Xsqlite3VdbeExplain(tls, pParse, uint8(1), ts+17671 /* "MATERIALIZE %u" */, libc.VaList(bp+40, (*Select)(unsafe.Pointer(pSub1)).FselId))
+ Xsqlite3VdbeExplain(tls, pParse, uint8(1), ts+18154 /* "MATERIALIZE %!S" */, libc.VaList(bp+40, pItem1))
Xsqlite3Select(tls, pParse, pSub1, bp+96 /* &dest */)
(*Table)(unsafe.Pointer((*SrcItem)(unsafe.Pointer(pItem1)).FpTab)).FnRowLogEst = (*Select)(unsafe.Pointer(pSub1)).FnSelectRow
if !(onceAddr != 0) {
@@ -117699,7 +120395,7 @@ __46:
Xsqlite3VdbeChangeP1(tls, v, topAddr, retAddr)
Xsqlite3ClearTempRegCache(tls, pParse)
- if !(((uint32(int32(*(*uint8)(unsafe.Pointer((pItem1 + 60 /* &.fg */) + 4 /* &.isCte */)) >> 0 & 0x1))) != 0) && ((int32(*(*uint8)(unsafe.Pointer((pItem1 + 60 /* &.fg */) + 4 /* &.isCorrelated */)) >> 4 & 0x1)) == 0)) {
+ if !(((uint32(int32(*(*uint16)(unsafe.Pointer((pItem1 + 60 /* &.fg */) + 4 /* &.isCte */)) & 0x100 >> 8))) != 0) && ((int32(*(*uint16)(unsafe.Pointer((pItem1 + 60 /* &.fg */) + 4 /* &.isCorrelated */)) & 0x1000 >> 12)) == 0)) {
goto __47
}
pCteUse1 = *(*uintptr)(unsafe.Pointer(pItem1 + 104 /* &.u2 */))
@@ -118092,7 +120788,7 @@ __88:
if !(i < (*AggInfo)(unsafe.Pointer(pAggInfo)).FnFunc) {
goto __90
}
- pExpr = (*AggInfo_func)(unsafe.Pointer((*AggInfo)(unsafe.Pointer(pAggInfo)).FaFunc + uintptr(i)*24)).FpFExpr
+ pExpr = (*AggInfo_func)(unsafe.Pointer((*AggInfo)(unsafe.Pointer(pAggInfo)).FaFunc + uintptr(i)*32)).FpFExpr
*(*int32)(unsafe.Pointer(bp + 152 /* &sNC */ + 40 /* &.ncFlags */)) |= (NC_InAggFunc)
Xsqlite3ExprAnalyzeAggList(tls, bp+152 /* &sNC */, *(*uintptr)(unsafe.Pointer(pExpr + 32 /* &.x */)))
@@ -118124,6 +120820,26 @@ __92:
if !(pGroupBy != 0) {
goto __93
} // Return address register for reset subroutine
+ pDistinct = uintptr(0)
+ distFlag = U16(0)
+ eDist = WHERE_DISTINCT_NOOP
+
+ if !((((*AggInfo)(unsafe.Pointer(pAggInfo)).FnFunc == 1) &&
+ ((*AggInfo_func)(unsafe.Pointer((*AggInfo)(unsafe.Pointer(pAggInfo)).FaFunc)).FiDistinct >= 0)) &&
+ (*(*uintptr)(unsafe.Pointer((*AggInfo_func)(unsafe.Pointer((*AggInfo)(unsafe.Pointer(pAggInfo)).FaFunc)).FpFExpr + 32 /* &.x */)) != 0)) {
+ goto __95
+ }
+ pExpr1 = (*ExprList_item)(unsafe.Pointer((*(*uintptr)(unsafe.Pointer((*AggInfo_func)(unsafe.Pointer((*AggInfo)(unsafe.Pointer(pAggInfo)).FaFunc)).FpFExpr + 32 /* &.x */)) + 8 /* &.a */))).FpExpr
+ pExpr1 = Xsqlite3ExprDup(tls, db, pExpr1, 0)
+ pDistinct = Xsqlite3ExprListDup(tls, db, pGroupBy, 0)
+ pDistinct = Xsqlite3ExprListAppend(tls, pParse, pDistinct, pExpr1)
+ if pDistinct != 0 {
+ distFlag = (uint16(WHERE_WANT_DISTINCT | WHERE_AGG_DISTINCT))
+ } else {
+ distFlag = uint16(0)
+ }
+__95:
+ ;
// 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
@@ -118157,36 +120873,38 @@ __92:
// in the right order to begin with.
Xsqlite3VdbeAddOp2(tls, v, OP_Gosub, regReset, addrReset)
- pWInfo = Xsqlite3WhereBegin(tls, pParse, pTabList, pWhere, pGroupBy, uintptr(0),
- (uint16(WHERE_GROUPBY | (func() int32 {
+ pWInfo = Xsqlite3WhereBegin(tls, pParse, pTabList, pWhere, pGroupBy, pDistinct,
+ (uint16((WHERE_GROUPBY | (func() int32 {
if orderByGrp != 0 {
return WHERE_SORTBYGROUP
}
return 0
- }()))), 0)
+ }())) | int32(distFlag))), 0)
if !(pWInfo == uintptr(0)) {
- goto __95
+ goto __96
}
+ Xsqlite3ExprListDelete(tls, db, pDistinct)
goto select_end
-__95:
+__96:
;
+ eDist = Xsqlite3WhereIsDistinct(tls, pWInfo)
if !(Xsqlite3WhereIsOrdered(tls, pWInfo) == (*ExprList)(unsafe.Pointer(pGroupBy)).FnExpr) {
- goto __96
+ goto __97
}
// The optimizer is able to deliver rows in group by order so
// we do not have to sort. The OP_OpenEphemeral table will be
// cancelled later because we still need to use the pKeyInfo
groupBySort = 0
- goto __97
-__96:
+ goto __98
+__97:
explainTempTable(tls, pParse,
func() uintptr {
if ((*DistinctCtx)(unsafe.Pointer(bp+136 /* &sDistinct */)).FisTnct != 0) && (((*Select)(unsafe.Pointer(p)).FselFlags & U32(SF_Distinct)) == U32(0)) {
- return ts + 17686 /* "DISTINCT" */
+ return ts + 18170 /* "DISTINCT" */
}
- return ts + 17695 /* "GROUP BY" */
+ return ts + 18179 /* "GROUP BY" */
}())
groupBySort = 1
@@ -118194,48 +120912,48 @@ __96:
nCol = nGroupBy
j = nGroupBy
i = 0
-__98:
+__99:
if !(i < (*AggInfo)(unsafe.Pointer(pAggInfo)).FnColumn) {
- goto __100
+ goto __101
}
if !(int32((*AggInfo_col)(unsafe.Pointer((*AggInfo)(unsafe.Pointer(pAggInfo)).FaCol+uintptr(i)*32)).FiSorterColumn) >= j) {
- goto __101
+ goto __102
}
nCol++
j++
-__101:
+__102:
;
- goto __99
-__99:
- i++
- goto __98
goto __100
__100:
+ i++
+ goto __99
+ goto __101
+__101:
;
regBase = Xsqlite3GetTempRange(tls, pParse, nCol)
Xsqlite3ExprCodeExprList(tls, pParse, pGroupBy, regBase, 0, uint8(0))
j = nGroupBy
i = 0
-__102:
+__103:
if !(i < (*AggInfo)(unsafe.Pointer(pAggInfo)).FnColumn) {
- goto __104
+ goto __105
}
pCol = ((*AggInfo)(unsafe.Pointer(pAggInfo)).FaCol + uintptr(i)*32)
if !(int32((*AggInfo_col)(unsafe.Pointer(pCol)).FiSorterColumn) >= j) {
- goto __105
+ goto __106
}
r1 = (j + regBase)
Xsqlite3ExprCodeGetColumnOfTable(tls, v,
(*AggInfo_col)(unsafe.Pointer(pCol)).FpTab, (*AggInfo_col)(unsafe.Pointer(pCol)).FiTable, int32((*AggInfo_col)(unsafe.Pointer(pCol)).FiColumn), r1)
j++
-__105:
+__106:
;
- goto __103
-__103:
- i++
- goto __102
goto __104
__104:
+ i++
+ goto __103
+ goto __105
+__105:
;
regRecord = Xsqlite3GetTempReg(tls, pParse)
Xsqlite3VdbeAddOp3(tls, v, OP_MakeRecord, regBase, nCol, regRecord)
@@ -118250,7 +120968,7 @@ __104:
Xsqlite3VdbeAddOp2(tls, v, OP_SorterSort, (*AggInfo)(unsafe.Pointer(pAggInfo)).FsortingIdx, addrEnd)
(*AggInfo)(unsafe.Pointer(pAggInfo)).FuseSortingIdx = U8(1)
-__97:
+__98:
;
// If the index or temporary table used by the GROUP BY sort
@@ -118262,11 +120980,11 @@ __97:
// disable this optimization for testing purposes.
if !(((orderByGrp != 0) && (((*Sqlite3)(unsafe.Pointer((db))).FdbOptFlags & (U32(SQLITE_GroupByOrder))) == U32(0))) &&
((groupBySort != 0) || (Xsqlite3WhereIsSorted(tls, pWInfo) != 0))) {
- goto __106
+ goto __107
}
(*SortCtx)(unsafe.Pointer(bp + 48 /* &sSort */)).FpOrderBy = uintptr(0)
Xsqlite3VdbeChangeToNoop(tls, v, (*SortCtx)(unsafe.Pointer(bp+48 /* &sSort */)).FaddrSortIndex)
-__106:
+__107:
;
// Evaluate the current GROUP BY terms and store in b0, b1, b2...
@@ -118275,33 +120993,33 @@ __106:
// from the previous row currently stored in a0, a1, a2...
addrTopOfLoop = Xsqlite3VdbeCurrentAddr(tls, v)
if !(groupBySort != 0) {
- goto __107
+ goto __108
}
Xsqlite3VdbeAddOp3(tls, v, OP_SorterData, (*AggInfo)(unsafe.Pointer(pAggInfo)).FsortingIdx,
sortOut, sortPTab)
-__107:
+__108:
;
j = 0
-__108:
+__109:
if !(j < (*ExprList)(unsafe.Pointer(pGroupBy)).FnExpr) {
- goto __110
+ goto __111
}
if !(groupBySort != 0) {
- goto __111
+ goto __112
}
Xsqlite3VdbeAddOp3(tls, v, OP_Column, sortPTab, j, (iBMem + j))
- goto __112
-__111:
+ goto __113
+__112:
(*AggInfo)(unsafe.Pointer(pAggInfo)).FdirectMode = U8(1)
Xsqlite3ExprCode(tls, pParse, (*ExprList_item)(unsafe.Pointer((pGroupBy+8 /* &.a */)+uintptr(j)*32)).FpExpr, (iBMem + j))
-__112:
+__113:
;
- goto __109
-__109:
- j++
- goto __108
goto __110
__110:
+ j++
+ goto __109
+ goto __111
+__111:
;
Xsqlite3VdbeAddOp4(tls, v, OP_Compare, iAMem, iBMem, (*ExprList)(unsafe.Pointer(pGroupBy)).FnExpr,
Xsqlite3KeyInfoRef(tls, pKeyInfo1), -9)
@@ -118326,22 +121044,23 @@ __110:
// Update the aggregate accumulators based on the content of
// the current row
Xsqlite3VdbeJumpHere(tls, v, addr1)
- updateAccumulator(tls, pParse, iUseFlag, pAggInfo)
+ updateAccumulator(tls, pParse, iUseFlag, pAggInfo, eDist)
Xsqlite3VdbeAddOp2(tls, v, OP_Integer, 1, iUseFlag)
// End of the loop
if !(groupBySort != 0) {
- goto __113
+ goto __114
}
Xsqlite3VdbeAddOp2(tls, v, OP_SorterNext, (*AggInfo)(unsafe.Pointer(pAggInfo)).FsortingIdx, addrTopOfLoop)
- goto __114
-__113:
+ goto __115
+__114:
;
Xsqlite3WhereEnd(tls, pWInfo)
Xsqlite3VdbeChangeToNoop(tls, v, addrSortingIdx)
-__114:
+__115:
;
+ Xsqlite3ExprListDelete(tls, db, pDistinct)
// Output the final row of result
Xsqlite3VdbeAddOp2(tls, v, OP_Gosub, regOutputRow, addrOutputRow)
@@ -118378,10 +121097,17 @@ __114:
Xsqlite3VdbeAddOp1(tls, v, OP_Return, regReset)
+ if !(eDist != WHERE_DISTINCT_NOOP) {
+ goto __116
+ }
+ pF = ((*AggInfo)(unsafe.Pointer(pAggInfo)).FaFunc)
+ fixDistinctOpenEph(tls, pParse, eDist, (*AggInfo_func)(unsafe.Pointer(pF)).FiDistinct, (*AggInfo_func)(unsafe.Pointer(pF)).FiDistAddr)
+__116:
+ ;
goto __94
__93:
if !((libc.AssignUintptr(&pTab1, isSimpleCount(tls, p, pAggInfo))) != uintptr(0)) {
- goto __115
+ goto __117
}
// If isSimpleCount() returns a pointer to a Table structure, then
// the SQL statement is of the form:
@@ -118413,59 +121139,61 @@ __93:
// In practice the KeyInfo structure will not be used. It is only
// passed to keep OP_OpenRead happy.
if !(!(((*Table)(unsafe.Pointer((pTab1))).FtabFlags & U32(TF_WithoutRowid)) == U32(0))) {
- goto __117
+ goto __119
}
pBest = Xsqlite3PrimaryKeyIndex(tls, pTab1)
-__117:
+__119:
;
- if !(!((int32(*(*uint8)(unsafe.Pointer(((*Select)(unsafe.Pointer(p)).FpSrc + 8 /* &.a */) + 60 /* &.fg */ + 4 /* &.notIndexed */)) >> 7 & 0x1)) != 0)) {
- goto __118
+ if !(!((int32(*(*uint16)(unsafe.Pointer(((*Select)(unsafe.Pointer(p)).FpSrc + 8 /* &.a */) + 60 /* &.fg */ + 4 /* &.notIndexed */)) & 0x8000 >> 15)) != 0)) {
+ goto __120
}
pIdx = (*Table)(unsafe.Pointer(pTab1)).FpIndex
-__119:
+__121:
if !(pIdx != 0) {
- goto __121
+ goto __123
}
- if !(((((int32(*(*uint16)(unsafe.Pointer(pIdx + 100 /* &.bUnordered */)) >> 13 & 0x1)) == 0) &&
+ if !(((((int32(*(*uint16)(unsafe.Pointer(pIdx + 100 /* &.bUnordered */)) & 0x2000 >> 13)) == 0) &&
(int32((*Index)(unsafe.Pointer(pIdx)).FszIdxRow) < int32((*Table)(unsafe.Pointer(pTab1)).FszTabRow))) &&
((*Index)(unsafe.Pointer(pIdx)).FpPartIdxWhere == uintptr(0))) &&
(!(pBest != 0) || (int32((*Index)(unsafe.Pointer(pIdx)).FszIdxRow) < int32((*Index)(unsafe.Pointer(pBest)).FszIdxRow)))) {
- goto __122
+ goto __124
}
pBest = pIdx
-__122:
+__124:
;
- goto __120
-__120:
+ goto __122
+__122:
pIdx = (*Index)(unsafe.Pointer(pIdx)).FpNext
- goto __119
goto __121
-__121:
+ goto __123
+__123:
;
-__118:
+__120:
;
if !(pBest != 0) {
- goto __123
+ goto __125
}
iRoot = (*Index)(unsafe.Pointer(pBest)).Ftnum
pKeyInfo2 = Xsqlite3KeyInfoOfIndex(tls, pParse, pBest)
-__123:
+__125:
;
// Open a read-only cursor, execute the OP_Count, close the cursor.
Xsqlite3VdbeAddOp4Int(tls, v, OP_OpenRead, iCsr, int32(iRoot), iDb, 1)
if !(pKeyInfo2 != 0) {
- goto __124
+ goto __126
}
Xsqlite3VdbeChangeP4(tls, v, -1, pKeyInfo2, -9)
-__124:
+__126:
;
Xsqlite3VdbeAddOp2(tls, v, OP_Count, iCsr, (*AggInfo_func)(unsafe.Pointer((*AggInfo)(unsafe.Pointer(pAggInfo)).FaFunc)).FiMem)
Xsqlite3VdbeAddOp1(tls, v, OP_Close, iCsr)
explainSimpleCount(tls, pParse, pTab1, pBest)
- goto __116
-__115:
+ goto __118
+__117:
regAcc = 0 // "populate accumulators" flag
+ pDistinct1 = uintptr(0)
+ distFlag1 = U16(0)
// If there are accumulator registers but no min() or max() functions
// without FILTER clauses, allocate register regAcc. Register regAcc
@@ -118477,40 +121205,53 @@ __115:
// least once even if the FILTER clause means the min() or max()
// function visits zero rows.
if !((*AggInfo)(unsafe.Pointer(pAggInfo)).FnAccumulator != 0) {
- goto __125
+ goto __127
}
i = 0
-__126:
+__129:
if !(i < (*AggInfo)(unsafe.Pointer(pAggInfo)).FnFunc) {
- goto __128
+ goto __131
}
- if !(((*Expr)(unsafe.Pointer(((*AggInfo_func)(unsafe.Pointer((*AggInfo)(unsafe.Pointer(pAggInfo)).FaFunc + uintptr(i)*24)).FpFExpr))).Fflags & (U32(EP_WinFunc))) != U32(0)) {
- goto __129
+ if !(((*Expr)(unsafe.Pointer(((*AggInfo_func)(unsafe.Pointer((*AggInfo)(unsafe.Pointer(pAggInfo)).FaFunc + uintptr(i)*32)).FpFExpr))).Fflags & (U32(EP_WinFunc))) != U32(0)) {
+ goto __132
}
- goto __127
-__129:
+ goto __130
+__132:
;
- if !(((*FuncDef)(unsafe.Pointer((*AggInfo_func)(unsafe.Pointer((*AggInfo)(unsafe.Pointer(pAggInfo)).FaFunc+uintptr(i)*24)).FpFunc)).FfuncFlags & U32(SQLITE_FUNC_NEEDCOLL)) != 0) {
- goto __130
+ if !(((*FuncDef)(unsafe.Pointer((*AggInfo_func)(unsafe.Pointer((*AggInfo)(unsafe.Pointer(pAggInfo)).FaFunc+uintptr(i)*32)).FpFunc)).FfuncFlags & U32(SQLITE_FUNC_NEEDCOLL)) != 0) {
+ goto __133
}
- goto __128
-__130:
+ goto __131
+__133:
;
- goto __127
-__127:
+ goto __130
+__130:
i++
- goto __126
- goto __128
-__128:
+ goto __129
+ goto __131
+__131:
;
if !(i == (*AggInfo)(unsafe.Pointer(pAggInfo)).FnFunc) {
- goto __131
+ goto __134
}
regAcc = libc.PreIncInt32(&(*Parse)(unsafe.Pointer(pParse)).FnMem, 1)
Xsqlite3VdbeAddOp2(tls, v, OP_Integer, 0, regAcc)
-__131:
+__134:
;
-__125:
+ goto __128
+__127:
+ if !(((*AggInfo)(unsafe.Pointer(pAggInfo)).FnFunc == 1) && ((*AggInfo_func)(unsafe.Pointer((*AggInfo)(unsafe.Pointer(pAggInfo)).FaFunc)).FiDistinct >= 0)) {
+ goto __135
+ }
+ pDistinct1 = *(*uintptr)(unsafe.Pointer((*AggInfo_func)(unsafe.Pointer((*AggInfo)(unsafe.Pointer(pAggInfo)).FaFunc)).FpFExpr + 32 /* &.x */))
+ if pDistinct1 != 0 {
+ distFlag1 = (uint16(WHERE_WANT_DISTINCT | WHERE_AGG_DISTINCT))
+ } else {
+ distFlag1 = uint16(0)
+ }
+__135:
+ ;
+__128:
;
// This case runs if the aggregate has no GROUP BY clause. The
@@ -118525,31 +121266,40 @@ __125:
// be an appropriate ORDER BY expression for the optimization.
pWInfo = Xsqlite3WhereBegin(tls, pParse, pTabList, pWhere, *(*uintptr)(unsafe.Pointer(bp + 208 /* pMinMaxOrderBy */)),
- uintptr(0), uint16(minMaxFlag), 0)
+ pDistinct1, (uint16(int32(minMaxFlag) | int32(distFlag1))), 0)
if !(pWInfo == uintptr(0)) {
- goto __132
+ goto __136
}
goto select_end
-__132:
+__136:
+ ;
+
+ eDist1 = Xsqlite3WhereIsDistinct(tls, pWInfo)
+ updateAccumulator(tls, pParse, regAcc, pAggInfo, eDist1)
+ if !(eDist1 != WHERE_DISTINCT_NOOP) {
+ goto __137
+ }
+ pF1 = ((*AggInfo)(unsafe.Pointer(pAggInfo)).FaFunc)
+ fixDistinctOpenEph(tls, pParse, eDist1, (*AggInfo_func)(unsafe.Pointer(pF1)).FiDistinct, (*AggInfo_func)(unsafe.Pointer(pF1)).FiDistAddr)
+__137:
;
- updateAccumulator(tls, pParse, regAcc, pAggInfo)
if !(regAcc != 0) {
- goto __133
+ goto __138
}
Xsqlite3VdbeAddOp2(tls, v, OP_Integer, 1, regAcc)
-__133:
+__138:
;
if !(minMaxFlag != 0) {
- goto __134
+ goto __139
}
Xsqlite3WhereMinMaxOptEarlyOut(tls, v, pWInfo)
-__134:
+__139:
;
Xsqlite3WhereEnd(tls, pWInfo)
finalizeAggFunctions(tls, pParse, pAggInfo)
-__116:
+__118:
;
(*SortCtx)(unsafe.Pointer(bp + 48 /* &sSort */)).FpOrderBy = uintptr(0)
@@ -118564,27 +121314,27 @@ __58:
; // endif aggregate query
if !(int32((*DistinctCtx)(unsafe.Pointer(bp+136 /* &sDistinct */)).FeTnctType) == WHERE_DISTINCT_UNORDERED) {
- goto __135
+ goto __140
}
- explainTempTable(tls, pParse, ts+17686 /* "DISTINCT" */)
-__135:
+ explainTempTable(tls, pParse, ts+18170 /* "DISTINCT" */)
+__140:
;
// If there is an ORDER BY clause, then we need to sort the results
// and send them to the callback one by one.
if !((*SortCtx)(unsafe.Pointer(bp+48 /* &sSort */)).FpOrderBy != 0) {
- goto __136
+ goto __141
}
explainTempTable(tls, pParse,
func() uintptr {
if (*SortCtx)(unsafe.Pointer(bp+48 /* &sSort */)).FnOBSat > 0 {
- return ts + 17704 /* "RIGHT PART OF OR..." */
+ return ts + 18188 /* "RIGHT PART OF OR..." */
}
- return ts + 17727 /* "ORDER BY" */
+ return ts + 18211 /* "ORDER BY" */
}())
generateSortTail(tls, pParse, p, bp+48 /* &sSort */, (*ExprList)(unsafe.Pointer(pEList)).FnExpr, pDest)
-__136:
+__141:
;
// Jump here to skip this query
@@ -118597,6 +121347,8 @@ __136:
// Control jumps to here if an error is encountered above, or upon
// successful coding of the SELECT.
select_end:
+ ;
+ *(*int32)(unsafe.Pointer(pParse + 48 /* &.nErr */)) += (int32((*Sqlite3)(unsafe.Pointer(db)).FmallocFailed))
Xsqlite3ExprListDelete(tls, db, *(*uintptr)(unsafe.Pointer(bp + 208 /* pMinMaxOrderBy */)))
Xsqlite3VdbeExplainPop(tls, pParse)
@@ -118626,15 +121378,15 @@ select_end:
// This structure is used to pass data from sqlite3_get_table() through
// to the callback function is uses to build the result.
type TabResult1 = struct {
- FazResult uintptr
- FzErrMsg uintptr
- FnAlloc U32
- FnRow U32
- FnColumn U32
- FnData U32
- Frc int32
- _ [4]byte
-} /* sqlite3.c:138348:9 */
+ FazResult uintptr
+ FzErrMsg uintptr
+ FnAlloc U32
+ FnRow U32
+ FnColumn U32
+ FnData U32
+ Frc int32
+ F__ccgo_pad1 [4]byte
+} /* sqlite3.c:139498:9 */
//************* End of select.c *********************************************
//************* Begin file table.c ******************************************
@@ -118658,12 +121410,12 @@ type TabResult1 = struct {
// This structure is used to pass data from sqlite3_get_table() through
// to the callback function is uses to build the result.
-type TabResult = TabResult1 /* sqlite3.c:138356:3 */
+type TabResult = TabResult1 /* sqlite3.c:139506:3 */
// This routine is called once for each row in the result table. Its job
// is to fill in the TabResult structure appropriately, allocating new
// memory as necessary.
-func sqlite3_get_table_cb(tls *libc.TLS, pArg uintptr, nCol int32, argv uintptr, colv uintptr) int32 { /* sqlite3.c:138363:12: */
+func sqlite3_get_table_cb(tls *libc.TLS, pArg uintptr, nCol int32, argv uintptr, colv uintptr) int32 { /* sqlite3.c:139513:12: */
bp := tls.Alloc(8)
defer tls.Free(8)
@@ -118712,7 +121464,7 @@ __7:
if !(i < nCol) {
goto __9
}
- z = Xsqlite3_mprintf(tls, ts+2718 /* "%s" */, libc.VaList(bp, *(*uintptr)(unsafe.Pointer(colv + uintptr(i)*8))))
+ z = Xsqlite3_mprintf(tls, ts+2790 /* "%s" */, libc.VaList(bp, *(*uintptr)(unsafe.Pointer(colv + uintptr(i)*8))))
if !(z == uintptr(0)) {
goto __10
}
@@ -118734,7 +121486,7 @@ __5:
}
Xsqlite3_free(tls, (*TabResult)(unsafe.Pointer(p)).FzErrMsg)
(*TabResult)(unsafe.Pointer(p)).FzErrMsg = Xsqlite3_mprintf(tls,
- ts+17736 /* "sqlite3_get_tabl..." */, 0)
+ ts+18220 /* "sqlite3_get_tabl..." */, 0)
(*TabResult)(unsafe.Pointer(p)).Frc = SQLITE_ERROR
return 1
__11:
@@ -118794,7 +121546,7 @@ malloc_failed:
// from malloc(). But the caller cannot free this memory directly.
// Instead, the entire table should be passed to sqlite3_free_table() when
// the calling procedure is finished using it.
-func Xsqlite3_get_table(tls *libc.TLS, db uintptr, zSql uintptr, pazResult uintptr, pnRow uintptr, pnColumn uintptr, pzErrMsg uintptr) int32 { /* sqlite3.c:138437:16: */
+func Xsqlite3_get_table(tls *libc.TLS, db uintptr, zSql uintptr, pazResult uintptr, pnRow uintptr, pnColumn uintptr, pzErrMsg uintptr) int32 { /* sqlite3.c:139587:16: */
bp := tls.Alloc(48)
defer tls.Free(48)
@@ -118833,7 +121585,7 @@ func Xsqlite3_get_table(tls *libc.TLS, db uintptr, zSql uintptr, pazResult uintp
if (*TabResult)(unsafe.Pointer(bp+8 /* &res */)).FzErrMsg != 0 {
if pzErrMsg != 0 {
Xsqlite3_free(tls, *(*uintptr)(unsafe.Pointer(pzErrMsg)))
- *(*uintptr)(unsafe.Pointer(pzErrMsg)) = Xsqlite3_mprintf(tls, ts+2718 /* "%s" */, libc.VaList(bp, (*TabResult)(unsafe.Pointer(bp+8 /* &res */)).FzErrMsg))
+ *(*uintptr)(unsafe.Pointer(pzErrMsg)) = Xsqlite3_mprintf(tls, ts+2790 /* "%s" */, libc.VaList(bp, (*TabResult)(unsafe.Pointer(bp+8 /* &res */)).FzErrMsg))
}
Xsqlite3_free(tls, (*TabResult)(unsafe.Pointer(bp+8 /* &res */)).FzErrMsg)
}
@@ -118866,7 +121618,7 @@ func Xsqlite3_get_table(tls *libc.TLS, db uintptr, zSql uintptr, pazResult uintp
}
// This routine frees the space the sqlite3_get_table() malloced.
-func Xsqlite3_free_table(tls *libc.TLS, azResult uintptr) { /* sqlite3.c:138506:17: */
+func Xsqlite3_free_table(tls *libc.TLS, azResult uintptr) { /* sqlite3.c:139656:17: */
if azResult != 0 {
var i int32
var n int32
@@ -118897,7 +121649,7 @@ func Xsqlite3_free_table(tls *libc.TLS, azResult uintptr) { /* sqlite3.c:138506:
// #include "sqliteInt.h"
// Delete a linked list of TriggerStep structures.
-func Xsqlite3DeleteTriggerStep(tls *libc.TLS, db uintptr, pTriggerStep uintptr) { /* sqlite3.c:138541:21: */
+func Xsqlite3DeleteTriggerStep(tls *libc.TLS, db uintptr, pTriggerStep uintptr) { /* sqlite3.c:139691:21: */
for pTriggerStep != 0 {
var pTmp uintptr = pTriggerStep
pTriggerStep = (*TriggerStep)(unsafe.Pointer(pTriggerStep)).FpNext
@@ -118926,7 +121678,7 @@ func Xsqlite3DeleteTriggerStep(tls *libc.TLS, db uintptr, pTriggerStep uintptr)
// To state it another way: This routine returns a list of all triggers
// that fire off of pTab. The list will include any TEMP triggers on
// pTab as well as the triggers lised in pTab->pTrigger.
-func Xsqlite3TriggerList(tls *libc.TLS, pParse uintptr, pTab uintptr) uintptr { /* sqlite3.c:138572:24: */
+func Xsqlite3TriggerList(tls *libc.TLS, pParse uintptr, pTab uintptr) uintptr { /* sqlite3.c:139722:24: */
var pTmpSchema uintptr // Schema of the pTab table
var pList uintptr // List of triggers to return
var p uintptr // Loop variable for TEMP triggers
@@ -118936,26 +121688,24 @@ func Xsqlite3TriggerList(tls *libc.TLS, pParse uintptr, pTab uintptr) uintptr {
}
pTmpSchema = (*Db)(unsafe.Pointer((*Sqlite3)(unsafe.Pointer((*Parse)(unsafe.Pointer(pParse)).Fdb)).FaDb + 1*32)).FpSchema
p = (*Hash)(unsafe.Pointer((pTmpSchema + 56 /* &.trigHash */))).Ffirst
- if p == uintptr(0) {
- return (*Table)(unsafe.Pointer(pTab)).FpTrigger
- }
pList = (*Table)(unsafe.Pointer(pTab)).FpTrigger
- if pTmpSchema != (*Table)(unsafe.Pointer(pTab)).FpSchema {
- for p != 0 {
- var pTrig uintptr = (*HashElem)(unsafe.Pointer(p)).Fdata
- if ((*Trigger)(unsafe.Pointer(pTrig)).FpTabSchema == (*Table)(unsafe.Pointer(pTab)).FpSchema) &&
- (0 == Xsqlite3StrICmp(tls, (*Trigger)(unsafe.Pointer(pTrig)).Ftable, (*Table)(unsafe.Pointer(pTab)).FzName)) {
- (*Trigger)(unsafe.Pointer(pTrig)).FpNext = pList
- pList = pTrig
- } else if int32((*Trigger)(unsafe.Pointer(pTrig)).Fop) == TK_RETURNING {
-
- (*Trigger)(unsafe.Pointer(pTrig)).Ftable = (*Table)(unsafe.Pointer(pTab)).FzName
- (*Trigger)(unsafe.Pointer(pTrig)).FpTabSchema = (*Table)(unsafe.Pointer(pTab)).FpSchema
- (*Trigger)(unsafe.Pointer(pTrig)).FpNext = pList
- pList = pTrig
- }
- p = (*HashElem)(unsafe.Pointer(p)).Fnext
- }
+ for p != 0 {
+ var pTrig uintptr = (*HashElem)(unsafe.Pointer(p)).Fdata
+ if ((((*Trigger)(unsafe.Pointer(pTrig)).FpTabSchema == (*Table)(unsafe.Pointer(pTab)).FpSchema) &&
+ ((*Trigger)(unsafe.Pointer(pTrig)).Ftable != 0)) &&
+ (0 == Xsqlite3StrICmp(tls, (*Trigger)(unsafe.Pointer(pTrig)).Ftable, (*Table)(unsafe.Pointer(pTab)).FzName))) &&
+ ((*Trigger)(unsafe.Pointer(pTrig)).FpTabSchema != pTmpSchema) {
+ (*Trigger)(unsafe.Pointer(pTrig)).FpNext = pList
+ pList = pTrig
+ } else if (int32((*Trigger)(unsafe.Pointer(pTrig)).Fop) == TK_RETURNING) &&
+ ((*Sqlite3)(unsafe.Pointer((*Parse)(unsafe.Pointer(pParse)).Fdb)).FpVtabCtx == uintptr(0)) {
+
+ (*Trigger)(unsafe.Pointer(pTrig)).Ftable = (*Table)(unsafe.Pointer(pTab)).FzName
+ (*Trigger)(unsafe.Pointer(pTrig)).FpTabSchema = (*Table)(unsafe.Pointer(pTab)).FpSchema
+ (*Trigger)(unsafe.Pointer(pTrig)).FpNext = pList
+ pList = pTrig
+ }
+ p = (*HashElem)(unsafe.Pointer(p)).Fnext
}
return pList
}
@@ -118966,18 +121716,18 @@ func Xsqlite3TriggerList(tls *libc.TLS, pParse uintptr, pTab uintptr) uintptr {
// in pParse->pNewTrigger. After the trigger actions have been parsed, the
// sqlite3FinishTrigger() function is called to complete the trigger
// construction process.
-func Xsqlite3BeginTrigger(tls *libc.TLS, pParse uintptr, pName1 uintptr, pName2 uintptr, tr_tm int32, op int32, pColumns uintptr, pTableName uintptr, pWhen uintptr, isTemp int32, noErr int32) { /* sqlite3.c:138616:21: */
- bp := tls.Alloc(152)
- defer tls.Free(152)
+func Xsqlite3BeginTrigger(tls *libc.TLS, pParse uintptr, pName1 uintptr, pName2 uintptr, tr_tm int32, op int32, pColumns uintptr, pTableName uintptr, pWhen uintptr, isTemp int32, noErr int32) { /* sqlite3.c:139778:21: */
+ bp := tls.Alloc(136)
+ defer tls.Free(136)
var pTrigger uintptr // The new trigger
var pTab uintptr // Table that the trigger fires off of
var zName uintptr // Name of the trigger
var db uintptr // The database connection
var iDb int32 // The database to store the trigger in
- // var pName uintptr at bp+48, 8
+ // var pName uintptr at bp+32, 8
// The unqualified db name
- // var sFix DbFixer at bp+56, 96
+ // var sFix DbFixer at bp+40, 96
var iTabDb int32
var code int32
@@ -118996,16 +121746,16 @@ func Xsqlite3BeginTrigger(tls *libc.TLS, pParse uintptr, pName1 uintptr, pName2
if !((*Token)(unsafe.Pointer(pName2)).Fn > uint32(0)) {
goto __3
}
- Xsqlite3ErrorMsg(tls, pParse, ts+17801 /* "temporary trigge..." */, 0)
+ Xsqlite3ErrorMsg(tls, pParse, ts+18285 /* "temporary trigge..." */, 0)
goto trigger_cleanup
__3:
;
iDb = 1
- *(*uintptr)(unsafe.Pointer(bp + 48 /* pName */)) = pName1
+ *(*uintptr)(unsafe.Pointer(bp + 32 /* pName */)) = pName1
goto __2
__1:
// Figure out the db that the trigger will be created in
- iDb = Xsqlite3TwoPartName(tls, pParse, pName1, pName2, bp+48 /* &pName */)
+ iDb = Xsqlite3TwoPartName(tls, pParse, pName1, pName2, bp+32 /* &pName */)
if !(iDb < 0) {
goto __4
}
@@ -119057,8 +121807,8 @@ __7:
__8:
;
- Xsqlite3FixInit(tls, bp+56 /* &sFix */, pParse, iDb, ts+17847 /* "trigger" */, *(*uintptr)(unsafe.Pointer(bp + 48 /* pName */)))
- if !(Xsqlite3FixSrcList(tls, bp+56 /* &sFix */, pTableName) != 0) {
+ Xsqlite3FixInit(tls, bp+40 /* &sFix */, pParse, iDb, ts+18331 /* "trigger" */, *(*uintptr)(unsafe.Pointer(bp + 32 /* pName */)))
+ if !(Xsqlite3FixSrcList(tls, bp+40 /* &sFix */, pTableName) != 0) {
goto __9
}
goto trigger_cleanup
@@ -119075,14 +121825,14 @@ __10:
if !((*Table)(unsafe.Pointer(pTab)).FnModuleArg != 0) {
goto __11
}
- Xsqlite3ErrorMsg(tls, pParse, ts+17855 /* "cannot create tr..." */, 0)
+ Xsqlite3ErrorMsg(tls, pParse, ts+18339 /* "cannot create tr..." */, 0)
goto trigger_orphan_error
__11:
;
// Check that the trigger name is not reserved and that no trigger of the
// specified name exists
- zName = Xsqlite3NameFromToken(tls, db, *(*uintptr)(unsafe.Pointer(bp + 48 /* pName */)))
+ zName = Xsqlite3NameFromToken(tls, db, *(*uintptr)(unsafe.Pointer(bp + 32 /* pName */)))
if !(zName == uintptr(0)) {
goto __12
}
@@ -119090,7 +121840,7 @@ __11:
goto trigger_cleanup
__12:
;
- if !(Xsqlite3CheckObjectName(tls, pParse, zName, ts+17847 /* "trigger" */, (*Table)(unsafe.Pointer(pTab)).FzName) != 0) {
+ if !(Xsqlite3CheckObjectName(tls, pParse, zName, ts+18331 /* "trigger" */, (*Table)(unsafe.Pointer(pTab)).FzName) != 0) {
goto __13
}
goto trigger_cleanup
@@ -119106,7 +121856,7 @@ __13:
if !(!(noErr != 0)) {
goto __16
}
- Xsqlite3ErrorMsg(tls, pParse, ts+17896 /* "trigger %T alrea..." */, libc.VaList(bp, *(*uintptr)(unsafe.Pointer(bp + 48 /* pName */))))
+ Xsqlite3ErrorMsg(tls, pParse, ts+18380 /* "trigger %T alrea..." */, libc.VaList(bp, *(*uintptr)(unsafe.Pointer(bp + 32 /* pName */))))
goto __17
__16:
;
@@ -119120,10 +121870,10 @@ __14:
;
// Do not create a trigger on a system table
- if !(Xsqlite3_strnicmp(tls, (*Table)(unsafe.Pointer(pTab)).FzName, ts+6950 /* "sqlite_" */, 7) == 0) {
+ if !(Xsqlite3_strnicmp(tls, (*Table)(unsafe.Pointer(pTab)).FzName, ts+7081 /* "sqlite_" */, 7) == 0) {
goto __18
}
- Xsqlite3ErrorMsg(tls, pParse, ts+17922 /* "cannot create tr..." */, 0)
+ Xsqlite3ErrorMsg(tls, pParse, ts+18406 /* "cannot create tr..." */, 0)
goto trigger_cleanup
__18:
;
@@ -119133,13 +121883,13 @@ __18:
if !(((*Table)(unsafe.Pointer(pTab)).FpSelect != 0) && (tr_tm != TK_INSTEAD)) {
goto __19
}
- Xsqlite3ErrorMsg(tls, pParse, ts+17960, /* "cannot create %s..." */
+ Xsqlite3ErrorMsg(tls, pParse, ts+18444, /* "cannot create %s..." */
libc.VaList(bp+8, func() uintptr {
if tr_tm == TK_BEFORE {
- return ts + 17997 /* "BEFORE" */
+ return ts + 18481 /* "BEFORE" */
}
- return ts + 18004 /* "AFTER" */
- }(), pTableName, 0))
+ return ts + 18488 /* "AFTER" */
+ }(), pTableName+8 /* &.a */))
goto trigger_orphan_error
__19:
;
@@ -119147,7 +121897,7 @@ __19:
goto __20
}
Xsqlite3ErrorMsg(tls, pParse,
- ts+18010 /* "cannot create IN..." */, libc.VaList(bp+32, pTableName, 0))
+ ts+18494 /* "cannot create IN..." */, libc.VaList(bp+24, pTableName+8 /* &.a */))
goto trigger_orphan_error
__20:
;
@@ -119177,9 +121927,9 @@ __23:
;
if !(Xsqlite3AuthCheck(tls, pParse, SQLITE_INSERT, func() uintptr {
if (!(0 != 0)) && (iTabDb == 1) {
- return ts + 10419 /* "sqlite_temp_mast..." */
+ return ts + 10872 /* "sqlite_temp_mast..." */
}
- return ts + 4825 /* "sqlite_master" */
+ return ts + 4956 /* "sqlite_master" */
}(), uintptr(0), zDb) != 0) {
goto __24
}
@@ -119265,7 +122015,7 @@ trigger_orphan_error:
// "orphaned trigger" - a trigger whose associated table is missing.
//
// 2020-11-05 see also https://sqlite.org/forum/forumpost/157dc791df
- libc.SetBitFieldPtr8Uint32(db+184 /* &.init */ +8 /* &.orphanTrigger */, uint32(1), 0, 0x1)
+ libc.SetBitFieldPtr8Uint32(db+184 /* &.init */ +8 /* &.orphanTrigger */, uint32(1), 7, 0x80)
__31:
;
goto trigger_cleanup
@@ -119273,7 +122023,7 @@ __31:
// This routine is called after all of the trigger actions have been parsed
// in order to complete the process of building the trigger.
-func Xsqlite3FinishTrigger(tls *libc.TLS, pParse uintptr, pStepList uintptr, pAll uintptr) { /* sqlite3.c:138823:21: */
+func Xsqlite3FinishTrigger(tls *libc.TLS, pParse uintptr, pStepList uintptr, pAll uintptr) { /* sqlite3.c:139985:21: */
bp := tls.Alloc(152)
defer tls.Free(152)
@@ -119313,7 +122063,7 @@ __2:
__3:
;
Xsqlite3TokenInit(tls, bp+40 /* &nameToken */, (*Trigger)(unsafe.Pointer(pTrig)).FzName)
- Xsqlite3FixInit(tls, bp+56 /* &sFix */, pParse, iDb, ts+17847 /* "trigger" */, bp+40 /* &nameToken */)
+ Xsqlite3FixInit(tls, bp+56 /* &sFix */, pParse, iDb, ts+18331 /* "trigger" */, bp+40 /* &nameToken */)
if !((Xsqlite3FixTriggerStep(tls, bp+56 /* &sFix */, (*Trigger)(unsafe.Pointer(pTrig)).Fstep_list) != 0) ||
(Xsqlite3FixExpr(tls, bp+56 /* &sFix */, (*Trigger)(unsafe.Pointer(pTrig)).FpWhen) != 0)) {
goto __4
@@ -119350,13 +122100,13 @@ __8:
Xsqlite3NestedParse(tls, pParse,
- ts+18056, /* "INSERT INTO %Q.s..." */
+ ts+18540, /* "INSERT INTO %Q.s..." */
libc.VaList(bp, (*Db)(unsafe.Pointer((*Sqlite3)(unsafe.Pointer(db)).FaDb+uintptr(iDb)*32)).FzDbSName, zName,
(*Trigger)(unsafe.Pointer(pTrig)).Ftable, z))
Xsqlite3DbFree(tls, db, z)
Xsqlite3ChangeCookie(tls, pParse, iDb)
Xsqlite3VdbeAddParseSchemaOp(tls, v, iDb,
- Xsqlite3MPrintf(tls, db, ts+18131 /* "type='trigger' A..." */, libc.VaList(bp+32, zName)), uint16(0))
+ Xsqlite3MPrintf(tls, db, ts+18615 /* "type='trigger' A..." */, libc.VaList(bp+32, zName)), uint16(0))
__7:
;
__6:
@@ -119397,13 +122147,13 @@ triggerfinish_cleanup:
// Duplicate a range of text from an SQL statement, then convert all
// whitespace characters into ordinary space characters.
-func triggerSpanDup(tls *libc.TLS, db uintptr, zStart uintptr, zEnd uintptr) uintptr { /* sqlite3.c:138911:13: */
+func triggerSpanDup(tls *libc.TLS, db uintptr, zStart uintptr, zEnd uintptr) uintptr { /* sqlite3.c:140073:13: */
var z uintptr = Xsqlite3DbSpanDup(tls, db, zStart, zEnd)
var i int32
if z != 0 {
- for i = 0; *(*int8)(unsafe.Pointer(z + uintptr(i))) != 0; i++ {
- if (int32(Xsqlite3CtypeMap[uint8(*(*int8)(unsafe.Pointer(z + uintptr(i))))]) & 0x01) != 0 {
- *(*int8)(unsafe.Pointer(z + uintptr(i))) = int8(' ')
+ for i = 0; *(*uint8)(unsafe.Pointer(z + uintptr(i))) != 0; i++ {
+ if (int32(Xsqlite3CtypeMap[uint8(*(*uint8)(unsafe.Pointer(z + uintptr(i))))]) & 0x01) != 0 {
+ *(*uint8)(unsafe.Pointer(z + uintptr(i))) = uint8(' ')
}
}
}
@@ -119415,7 +122165,7 @@ func triggerSpanDup(tls *libc.TLS, db uintptr, zStart uintptr, zEnd uintptr) uin
//
// The parser calls this routine when it finds a SELECT statement in
// body of a TRIGGER.
-func Xsqlite3TriggerSelectStep(tls *libc.TLS, db uintptr, pSelect uintptr, zStart uintptr, zEnd uintptr) uintptr { /* sqlite3.c:138925:28: */
+func Xsqlite3TriggerSelectStep(tls *libc.TLS, db uintptr, pSelect uintptr, zStart uintptr, zEnd uintptr) uintptr { /* sqlite3.c:140087:28: */
var pTriggerStep uintptr = Xsqlite3DbMallocZero(tls, db, uint64(unsafe.Sizeof(TriggerStep{})))
if pTriggerStep == uintptr(0) {
Xsqlite3SelectDelete(tls, db, pSelect)
@@ -119432,7 +122182,7 @@ func Xsqlite3TriggerSelectStep(tls *libc.TLS, db uintptr, pSelect uintptr, zStar
// holds both the TriggerStep object and the TriggerStep.target.z string.
//
// If an OOM error occurs, NULL is returned and db->mallocFailed is set.
-func triggerStepAllocate(tls *libc.TLS, pParse uintptr, op U8, pName uintptr, zStart uintptr, zEnd uintptr) uintptr { /* sqlite3.c:138949:20: */
+func triggerStepAllocate(tls *libc.TLS, pParse uintptr, op U8, pName uintptr, zStart uintptr, zEnd uintptr) uintptr { /* sqlite3.c:140111:20: */
var db uintptr = (*Parse)(unsafe.Pointer(pParse)).Fdb
var pTriggerStep uintptr
@@ -119456,7 +122206,7 @@ func triggerStepAllocate(tls *libc.TLS, pParse uintptr, op U8, pName uintptr, zS
//
// The parser calls this routine when it sees an INSERT inside the
// body of a trigger.
-func Xsqlite3TriggerInsertStep(tls *libc.TLS, pParse uintptr, pTableName uintptr, pColumn uintptr, pSelect uintptr, orconf U8, pUpsert uintptr, zStart uintptr, zEnd uintptr) uintptr { /* sqlite3.c:138981:28: */
+func Xsqlite3TriggerInsertStep(tls *libc.TLS, pParse uintptr, pTableName uintptr, pColumn uintptr, pSelect uintptr, orconf U8, pUpsert uintptr, zStart uintptr, zEnd uintptr) uintptr { /* sqlite3.c:140143:28: */
var db uintptr = (*Parse)(unsafe.Pointer(pParse)).Fdb
var pTriggerStep uintptr
@@ -119488,7 +122238,7 @@ func Xsqlite3TriggerInsertStep(tls *libc.TLS, pParse uintptr, pTableName uintptr
// Construct a trigger step that implements an UPDATE statement and return
// a pointer to that trigger step. The parser calls this routine when it
// sees an UPDATE statement inside the body of a CREATE TRIGGER.
-func Xsqlite3TriggerUpdateStep(tls *libc.TLS, pParse uintptr, pTableName uintptr, pFrom uintptr, pEList uintptr, pWhere uintptr, orconf U8, zStart uintptr, zEnd uintptr) uintptr { /* sqlite3.c:139026:28: */
+func Xsqlite3TriggerUpdateStep(tls *libc.TLS, pParse uintptr, pTableName uintptr, pFrom uintptr, pEList uintptr, pWhere uintptr, orconf U8, zStart uintptr, zEnd uintptr) uintptr { /* sqlite3.c:140188:28: */
var db uintptr = (*Parse)(unsafe.Pointer(pParse)).Fdb
var pTriggerStep uintptr
@@ -119517,7 +122267,7 @@ func Xsqlite3TriggerUpdateStep(tls *libc.TLS, pParse uintptr, pTableName uintptr
// Construct a trigger step that implements a DELETE statement and return
// a pointer to that trigger step. The parser calls this routine when it
// sees a DELETE statement inside the body of a CREATE TRIGGER.
-func Xsqlite3TriggerDeleteStep(tls *libc.TLS, pParse uintptr, pTableName uintptr, pWhere uintptr, zStart uintptr, zEnd uintptr) uintptr { /* sqlite3.c:139066:28: */
+func Xsqlite3TriggerDeleteStep(tls *libc.TLS, pParse uintptr, pTableName uintptr, pWhere uintptr, zStart uintptr, zEnd uintptr) uintptr { /* sqlite3.c:140228:28: */
var db uintptr = (*Parse)(unsafe.Pointer(pParse)).Fdb
var pTriggerStep uintptr
@@ -119536,7 +122286,7 @@ func Xsqlite3TriggerDeleteStep(tls *libc.TLS, pParse uintptr, pTableName uintptr
}
// Recursively delete a Trigger structure
-func Xsqlite3DeleteTrigger(tls *libc.TLS, db uintptr, pTrigger uintptr) { /* sqlite3.c:139093:21: */
+func Xsqlite3DeleteTrigger(tls *libc.TLS, db uintptr, pTrigger uintptr) { /* sqlite3.c:140255:21: */
if (pTrigger == uintptr(0)) || ((*Trigger)(unsafe.Pointer(pTrigger)).FbReturning != 0) {
return
}
@@ -119556,9 +122306,9 @@ func Xsqlite3DeleteTrigger(tls *libc.TLS, db uintptr, pTrigger uintptr) { /* sql
// same job as this routine except it takes a pointer to the trigger
// instead of the trigger name.
//
-func Xsqlite3DropTrigger(tls *libc.TLS, pParse uintptr, pName uintptr, noErr int32) { /* sqlite3.c:139111:21: */
- bp := tls.Alloc(16)
- defer tls.Free(16)
+func Xsqlite3DropTrigger(tls *libc.TLS, pParse uintptr, pName uintptr, noErr int32) { /* sqlite3.c:140273:21: */
+ bp := tls.Alloc(8)
+ defer tls.Free(8)
var pTrigger uintptr
var i int32
@@ -119622,7 +122372,7 @@ __5:
if !(!(noErr != 0)) {
goto __9
}
- Xsqlite3ErrorMsg(tls, pParse, ts+18160 /* "no such trigger:..." */, libc.VaList(bp, pName, 0))
+ Xsqlite3ErrorMsg(tls, pParse, ts+18644 /* "no such trigger:..." */, libc.VaList(bp, pName+8 /* &.a */))
goto __10
__9:
Xsqlite3CodeVerifyNamedSchema(tls, pParse, zDb)
@@ -119640,12 +122390,12 @@ drop_trigger_cleanup:
// Return a pointer to the Table structure for the table that a trigger
// is set on.
-func tableOfTrigger(tls *libc.TLS, pTrigger uintptr) uintptr { /* sqlite3.c:139153:14: */
+func tableOfTrigger(tls *libc.TLS, pTrigger uintptr) uintptr { /* sqlite3.c:140315:14: */
return Xsqlite3HashFind(tls, ((*Trigger)(unsafe.Pointer(pTrigger)).FpTabSchema + 8 /* &.tblHash */), (*Trigger)(unsafe.Pointer(pTrigger)).Ftable)
}
// Drop a trigger given a pointer to that trigger.
-func Xsqlite3DropTriggerPtr(tls *libc.TLS, pParse uintptr, pTrigger uintptr) { /* sqlite3.c:139161:21: */
+func Xsqlite3DropTriggerPtr(tls *libc.TLS, pParse uintptr, pTrigger uintptr) { /* sqlite3.c:140323:21: */
bp := tls.Alloc(16)
defer tls.Free(16)
@@ -119663,9 +122413,9 @@ func Xsqlite3DropTriggerPtr(tls *libc.TLS, pParse uintptr, pTrigger uintptr) { /
var zDb uintptr = (*Db)(unsafe.Pointer((*Sqlite3)(unsafe.Pointer(db)).FaDb + uintptr(iDb)*32)).FzDbSName
var zTab uintptr = func() uintptr {
if (!(0 != 0)) && (iDb == 1) {
- return ts + 10419 /* "sqlite_temp_mast..." */
+ return ts + 10872 /* "sqlite_temp_mast..." */
}
- return ts + 4825 /* "sqlite_master" */
+ return ts + 4956 /* "sqlite_master" */
}()
if iDb == 1 {
code = SQLITE_DROP_TEMP_TRIGGER
@@ -119678,7 +122428,7 @@ func Xsqlite3DropTriggerPtr(tls *libc.TLS, pParse uintptr, pTrigger uintptr) { /
// Generate code to destroy the database record of the trigger.
if (libc.AssignUintptr(&v, Xsqlite3GetVdbe(tls, pParse))) != uintptr(0) {
Xsqlite3NestedParse(tls, pParse,
- ts+18180, /* "DELETE FROM %Q.s..." */
+ ts+18664, /* "DELETE FROM %Q.s..." */
libc.VaList(bp, (*Db)(unsafe.Pointer((*Sqlite3)(unsafe.Pointer(db)).FaDb+uintptr(iDb)*32)).FzDbSName, (*Trigger)(unsafe.Pointer(pTrigger)).FzName))
Xsqlite3ChangeCookie(tls, pParse, iDb)
Xsqlite3VdbeAddOp4(tls, v, OP_DropTrigger, iDb, 0, 0, (*Trigger)(unsafe.Pointer(pTrigger)).FzName, 0)
@@ -119686,7 +122436,7 @@ func Xsqlite3DropTriggerPtr(tls *libc.TLS, pParse uintptr, pTrigger uintptr) { /
}
// Remove a trigger from the hash tables of the sqlite* pointer.
-func Xsqlite3UnlinkAndDeleteTrigger(tls *libc.TLS, db uintptr, iDb int32, zName uintptr) { /* sqlite3.c:139199:21: */
+func Xsqlite3UnlinkAndDeleteTrigger(tls *libc.TLS, db uintptr, iDb int32, zName uintptr) { /* sqlite3.c:140361:21: */
var pTrigger uintptr
var pHash uintptr
@@ -119717,7 +122467,7 @@ func Xsqlite3UnlinkAndDeleteTrigger(tls *libc.TLS, db uintptr, iDb int32, zName
// wildcard that matches anything. Likewise if pEList==NULL then
// it matches anything so always return true. Return false only
// if there is no match.
-func checkColumnOverlap(tls *libc.TLS, pIdList uintptr, pEList uintptr) int32 { /* sqlite3.c:139233:12: */
+func checkColumnOverlap(tls *libc.TLS, pIdList uintptr, pEList uintptr) int32 { /* sqlite3.c:140395:12: */
var e int32
if (pIdList == uintptr(0)) || (pEList == uintptr(0)) {
return 1
@@ -119734,7 +122484,7 @@ func checkColumnOverlap(tls *libc.TLS, pIdList uintptr, pEList uintptr) int32 {
// one trigger that must be fired when an operation of type 'op' is
// performed on the table, and, if that operation is an UPDATE, if at
// least one of the columns in pChanges is being modified.
-func Xsqlite3TriggersExist(tls *libc.TLS, pParse uintptr, pTab uintptr, op int32, pChanges uintptr, pMask uintptr) uintptr { /* sqlite3.c:139248:24: */
+func Xsqlite3TriggersExist(tls *libc.TLS, pParse uintptr, pTab uintptr, op int32, pChanges uintptr, pMask uintptr) uintptr { /* sqlite3.c:140410:24: */
bp := tls.Alloc(8)
defer tls.Free(8)
@@ -119797,12 +122547,12 @@ __9:
goto __15
}
Xsqlite3ErrorMsg(tls, pParse,
- ts+18242, /* "%s RETURNING is ..." */
+ ts+18726, /* "%s RETURNING is ..." */
libc.VaList(bp, func() uintptr {
if op == TK_DELETE {
- return ts + 18290 /* "DELETE" */
+ return ts + 18774 /* "DELETE" */
}
- return ts + 18297 /* "UPDATE" */
+ return ts + 18781 /* "UPDATE" */
}()))
__15:
;
@@ -119861,7 +122611,7 @@ __17:
// referring to a target in another database. An exception is when the
// trigger is in TEMP in which case it can refer to any other database it
// wants.
-func Xsqlite3TriggerStepSrc(tls *libc.TLS, pParse uintptr, pStep uintptr) uintptr { /* sqlite3.c:139322:24: */
+func Xsqlite3TriggerStepSrc(tls *libc.TLS, pParse uintptr, pStep uintptr) uintptr { /* sqlite3.c:140484:24: */
var db uintptr = (*Parse)(unsafe.Pointer(pParse)).Fdb
var pSrc uintptr // SrcList to be returned
var zName uintptr = Xsqlite3DbStrDup(tls, db, (*TriggerStep)(unsafe.Pointer(pStep)).FzTarget)
@@ -119886,7 +122636,7 @@ func Xsqlite3TriggerStepSrc(tls *libc.TLS, pParse uintptr, pStep uintptr) uintpt
// Return true if the pExpr term from the RETURNING clause argument
// list is of the form "*". Raise an error if the terms if of the
// form "table.*".
-func isAsteriskTerm(tls *libc.TLS, pParse uintptr, pTerm uintptr) int32 { /* sqlite3.c:139353:12: */
+func isAsteriskTerm(tls *libc.TLS, pParse uintptr, pTerm uintptr) int32 { /* sqlite3.c:140515:12: */
if int32((*Expr)(unsafe.Pointer(pTerm)).Fop) == TK_ASTERISK {
return 1
@@ -119898,7 +122648,7 @@ func isAsteriskTerm(tls *libc.TLS, pParse uintptr, pTerm uintptr) int32 { /* sql
if int32((*Expr)(unsafe.Pointer((*Expr)(unsafe.Pointer(pTerm)).FpRight)).Fop) != TK_ASTERISK {
return 0
}
- Xsqlite3ErrorMsg(tls, pParse, ts+18304 /* "RETURNING may no..." */, 0)
+ Xsqlite3ErrorMsg(tls, pParse, ts+18788 /* "RETURNING may no..." */, 0)
return 1
}
@@ -119907,7 +122657,7 @@ func isAsteriskTerm(tls *libc.TLS, pParse uintptr, pTerm uintptr) int32 { /* sql
//
// This routine makes a copy of the pList, and at the same time expands
// any "*" wildcards to be the complete set of columns from pTab.
-func sqlite3ExpandReturning(tls *libc.TLS, pParse uintptr, pList uintptr, pTab uintptr) uintptr { /* sqlite3.c:139373:17: */
+func sqlite3ExpandReturning(tls *libc.TLS, pParse uintptr, pList uintptr, pTab uintptr) uintptr { /* sqlite3.c:140535:17: */
var pNew uintptr = uintptr(0)
var db uintptr = (*Parse)(unsafe.Pointer(pParse)).Fdb
var i int32
@@ -119929,7 +122679,7 @@ func sqlite3ExpandReturning(tls *libc.TLS, pParse uintptr, pList uintptr, pTab u
if !(int32((*Sqlite3)(unsafe.Pointer(db)).FmallocFailed) != 0) {
var pItem uintptr = ((pNew + 8 /* &.a */) + uintptr(((*ExprList)(unsafe.Pointer(pNew)).FnExpr-1))*32)
(*ExprList_item)(unsafe.Pointer(pItem)).FzEName = Xsqlite3DbStrDup(tls, db, (*Column)(unsafe.Pointer((*Table)(unsafe.Pointer(pTab)).FaCol+uintptr(jj)*32)).FzName)
- libc.SetBitFieldPtr8Uint32(pItem+20 /* &.eEName */, uint32(ENAME_NAME), 0, 0x3)
+ libc.SetBitFieldPtr8Uint32(pItem+20 /* &.eEName */, uint32(ENAME_NAME), 6, 0xc0)
}
}
} else {
@@ -119938,63 +122688,70 @@ func sqlite3ExpandReturning(tls *libc.TLS, pParse uintptr, pList uintptr, pTab u
if !(int32((*Sqlite3)(unsafe.Pointer(db)).FmallocFailed) != 0) && ((*ExprList_item)(unsafe.Pointer((pList+8 /* &.a */)+uintptr(i)*32)).FzEName != uintptr(0)) {
var pItem uintptr = ((pNew + 8 /* &.a */) + uintptr(((*ExprList)(unsafe.Pointer(pNew)).FnExpr-1))*32)
(*ExprList_item)(unsafe.Pointer(pItem)).FzEName = Xsqlite3DbStrDup(tls, db, (*ExprList_item)(unsafe.Pointer((pList+8 /* &.a */)+uintptr(i)*32)).FzEName)
- libc.SetBitFieldPtr8Uint32(pItem+20 /* &.eEName */, (uint32(int32(*(*uint8)(unsafe.Pointer((pList + 8 /* &.a */) + uintptr(i)*32 + 20 /* &.eEName */)) >> 6 & 0x3))), 0, 0x3)
+ libc.SetBitFieldPtr8Uint32(pItem+20 /* &.eEName */, (uint32(int32(*(*uint8)(unsafe.Pointer((pList + 8 /* &.a */) + uintptr(i)*32 + 20 /* &.eEName */)) & 0xc0 >> 6))), 6, 0xc0)
}
}
}
- if !(int32((*Sqlite3)(unsafe.Pointer(db)).FmallocFailed) != 0) {
- var v uintptr = (*Parse)(unsafe.Pointer(pParse)).FpVdbe
-
- Xsqlite3VdbeSetNumCols(tls, v, (*ExprList)(unsafe.Pointer(pNew)).FnExpr)
- for i = 0; i < (*ExprList)(unsafe.Pointer(pNew)).FnExpr; i++ {
- Xsqlite3VdbeSetColName(tls, v, i, COLNAME_NAME, (*ExprList_item)(unsafe.Pointer((pNew+8 /* &.a */)+uintptr(i)*32)).FzEName,
- libc.UintptrFromInt32(-1))
- }
- }
return pNew
}
// Generate code for the RETURNING trigger. Unlike other triggers
// that invoke a subprogram in the bytecode, the code for RETURNING
// is generated in-line.
-func codeReturningTrigger(tls *libc.TLS, pParse uintptr, pTrigger uintptr, pTab uintptr, regIn int32) { /* sqlite3.c:139425:13: */
- bp := tls.Alloc(56)
- defer tls.Free(56)
+func codeReturningTrigger(tls *libc.TLS, pParse uintptr, pTrigger uintptr, pTab uintptr, regIn int32) { /* sqlite3.c:140578:13: */
+ bp := tls.Alloc(304)
+ defer tls.Free(304)
var v uintptr = (*Parse)(unsafe.Pointer(pParse)).FpVdbe
+ var db uintptr = (*Parse)(unsafe.Pointer(pParse)).Fdb
var pNew uintptr
var pReturning uintptr
+ // var sSelect Select at bp, 128
+
+ // var sFrom SrcList at bp+128, 120
pReturning = *(*uintptr)(unsafe.Pointer(pParse + 184 /* &.u1 */))
+ libc.Xmemset(tls, bp /* &sSelect */, 0, uint64(unsafe.Sizeof(Select{})))
+ libc.Xmemset(tls, bp+128 /* &sFrom */, 0, uint64(unsafe.Sizeof(SrcList{})))
+ (*Select)(unsafe.Pointer(bp /* &sSelect */)).FpEList = Xsqlite3ExprListDup(tls, db, (*Returning)(unsafe.Pointer(pReturning)).FpReturnEL, 0)
+ (*Select)(unsafe.Pointer(bp /* &sSelect */)).FpSrc = bp + 128 /* &sFrom */
+ (*SrcList)(unsafe.Pointer(bp + 128 /* &sFrom */)).FnSrc = 1
+ (*SrcItem)(unsafe.Pointer((bp + 128 /* &sFrom */ + 8 /* &.a */))).FpTab = pTab
+ Xsqlite3SelectPrep(tls, pParse, bp /* &sSelect */, uintptr(0))
+ if (int32((*Sqlite3)(unsafe.Pointer(db)).FmallocFailed) == 0) && ((*Parse)(unsafe.Pointer(pParse)).FnErr == 0) {
+ Xsqlite3GenerateColumnNames(tls, pParse, bp /* &sSelect */)
+ }
+ Xsqlite3ExprListDelete(tls, db, (*Select)(unsafe.Pointer(bp /* &sSelect */)).FpEList)
pNew = sqlite3ExpandReturning(tls, pParse, (*Returning)(unsafe.Pointer(pReturning)).FpReturnEL, pTab)
if pNew != 0 {
- // var sNC NameContext at bp, 56
+ // var sNC NameContext at bp+248, 56
- libc.Xmemset(tls, bp /* &sNC */, 0, uint64(unsafe.Sizeof(NameContext{})))
+ libc.Xmemset(tls, bp+248 /* &sNC */, 0, uint64(unsafe.Sizeof(NameContext{})))
if (*Returning)(unsafe.Pointer(pReturning)).FnRetCol == 0 {
(*Returning)(unsafe.Pointer(pReturning)).FnRetCol = (*ExprList)(unsafe.Pointer(pNew)).FnExpr
(*Returning)(unsafe.Pointer(pReturning)).FiRetCur = libc.PostIncInt32(&(*Parse)(unsafe.Pointer(pParse)).FnTab, 1)
}
- (*NameContext)(unsafe.Pointer(bp /* &sNC */)).FpParse = pParse
- *(*int32)(unsafe.Pointer(bp /* &sNC */ + 16 /* &.uNC */)) = regIn
- (*NameContext)(unsafe.Pointer(bp /* &sNC */)).FncFlags = NC_UBaseReg
+ (*NameContext)(unsafe.Pointer(bp + 248 /* &sNC */)).FpParse = pParse
+ *(*int32)(unsafe.Pointer(bp + 248 /* &sNC */ + 16 /* &.uNC */)) = regIn
+ (*NameContext)(unsafe.Pointer(bp + 248 /* &sNC */)).FncFlags = NC_UBaseReg
(*Parse)(unsafe.Pointer(pParse)).FeTriggerOp = (*Trigger)(unsafe.Pointer(pTrigger)).Fop
(*Parse)(unsafe.Pointer(pParse)).FpTriggerTab = pTab
- if Xsqlite3ResolveExprListNames(tls, bp /* &sNC */, pNew) == SQLITE_OK {
+ if Xsqlite3ResolveExprListNames(tls, bp+248 /* &sNC */, pNew) == SQLITE_OK {
var i int32
var nCol int32 = (*ExprList)(unsafe.Pointer(pNew)).FnExpr
var reg int32 = ((*Parse)(unsafe.Pointer(pParse)).FnMem + 1)
*(*int32)(unsafe.Pointer(pParse + 56 /* &.nMem */)) += (nCol + 2)
(*Returning)(unsafe.Pointer(pReturning)).FiRetReg = reg
for i = 0; i < nCol; i++ {
- Xsqlite3ExprCodeFactorable(tls, pParse, (*ExprList_item)(unsafe.Pointer((pNew+8 /* &.a */)+uintptr(i)*32)).FpExpr, (reg + i))
+ var pCol uintptr = (*ExprList_item)(unsafe.Pointer((pNew + 8 /* &.a */) + uintptr(i)*32)).FpExpr
+ Xsqlite3ExprCodeFactorable(tls, pParse, pCol, (reg + i))
}
Xsqlite3VdbeAddOp3(tls, v, OP_MakeRecord, reg, i, (reg + i))
Xsqlite3VdbeAddOp2(tls, v, OP_NewRowid, (*Returning)(unsafe.Pointer(pReturning)).FiRetCur, ((reg + i) + 1))
Xsqlite3VdbeAddOp3(tls, v, OP_Insert, (*Returning)(unsafe.Pointer(pReturning)).FiRetCur, (reg + i), ((reg + i) + 1))
}
- Xsqlite3ExprListDelete(tls, (*Parse)(unsafe.Pointer(pParse)).Fdb, pNew)
+ Xsqlite3ExprListDelete(tls, db, pNew)
(*Parse)(unsafe.Pointer(pParse)).FeTriggerOp = U8(0)
(*Parse)(unsafe.Pointer(pParse)).FpTriggerTab = uintptr(0)
}
@@ -120002,7 +122759,7 @@ func codeReturningTrigger(tls *libc.TLS, pParse uintptr, pTrigger uintptr, pTab
// Generate VDBE code for the statements inside the body of a single
// trigger.
-func codeTriggerProgram(tls *libc.TLS, pParse uintptr, pStepList uintptr, orconf int32) int32 { /* sqlite3.c:139477:12: */
+func codeTriggerProgram(tls *libc.TLS, pParse uintptr, pStepList uintptr, orconf int32) int32 { /* sqlite3.c:140645:12: */
bp := tls.Alloc(48)
defer tls.Free(48)
@@ -120032,7 +122789,7 @@ func codeTriggerProgram(tls *libc.TLS, pParse uintptr, pStepList uintptr, orconf
if (*TriggerStep)(unsafe.Pointer(pStep)).FzSpan != 0 {
Xsqlite3VdbeAddOp4(tls, v, OP_Trace, 0x7fffffff, 1, 0,
- Xsqlite3MPrintf(tls, db, ts+5012 /* "-- %s" */, libc.VaList(bp, (*TriggerStep)(unsafe.Pointer(pStep)).FzSpan)),
+ Xsqlite3MPrintf(tls, db, ts+5143 /* "-- %s" */, libc.VaList(bp, (*TriggerStep)(unsafe.Pointer(pStep)).FzSpan)),
-7)
}
@@ -120089,7 +122846,7 @@ func codeTriggerProgram(tls *libc.TLS, pParse uintptr, pStepList uintptr, orconf
// Parse context structure pFrom has just been used to create a sub-vdbe
// (trigger program). If an error has occurred, transfer error information
// from pFrom to pTo.
-func transferParseError(tls *libc.TLS, pTo uintptr, pFrom uintptr) { /* sqlite3.c:139581:13: */
+func transferParseError(tls *libc.TLS, pTo uintptr, pFrom uintptr) { /* sqlite3.c:140749:13: */
if (*Parse)(unsafe.Pointer(pTo)).FnErr == 0 {
(*Parse)(unsafe.Pointer(pTo)).FzErrMsg = (*Parse)(unsafe.Pointer(pFrom)).FzErrMsg
@@ -120102,7 +122859,7 @@ func transferParseError(tls *libc.TLS, pTo uintptr, pFrom uintptr) { /* sqlite3.
// Create and populate a new TriggerPrg object with a sub-program
// implementing trigger pTrigger with ON CONFLICT policy orconf.
-func codeRowTrigger(tls *libc.TLS, pParse uintptr, pTrigger uintptr, pTab uintptr, orconf int32) uintptr { /* sqlite3.c:139597:19: */
+func codeRowTrigger(tls *libc.TLS, pParse uintptr, pTrigger uintptr, pTab uintptr, orconf int32) uintptr { /* sqlite3.c:140765:19: */
bp := tls.Alloc(64)
defer tls.Free(64)
@@ -120162,7 +122919,7 @@ func codeRowTrigger(tls *libc.TLS, pParse uintptr, pTrigger uintptr, pTab uintpt
if (*Trigger)(unsafe.Pointer(pTrigger)).FzName != 0 {
Xsqlite3VdbeChangeP4(tls, v, -1,
- Xsqlite3MPrintf(tls, db, ts+18346 /* "-- TRIGGER %s" */, libc.VaList(bp, (*Trigger)(unsafe.Pointer(pTrigger)).FzName)), -7)
+ Xsqlite3MPrintf(tls, db, ts+18830 /* "-- TRIGGER %s" */, libc.VaList(bp, (*Trigger)(unsafe.Pointer(pTrigger)).FzName)), -7)
}
// If one was specified, code the WHEN clause. If it evaluates to false
@@ -120170,8 +122927,8 @@ func codeRowTrigger(tls *libc.TLS, pParse uintptr, pTrigger uintptr, pTab uintpt
// OP_Halt inserted at the end of the program.
if (*Trigger)(unsafe.Pointer(pTrigger)).FpWhen != 0 {
pWhen = Xsqlite3ExprDup(tls, db, (*Trigger)(unsafe.Pointer(pTrigger)).FpWhen, 0)
- if (SQLITE_OK == Xsqlite3ResolveExprNames(tls, bp+8 /* &sNC */, pWhen)) &&
- (int32((*Sqlite3)(unsafe.Pointer(db)).FmallocFailed) == 0) {
+ if (int32((*Sqlite3)(unsafe.Pointer(db)).FmallocFailed) == 0) &&
+ (SQLITE_OK == Xsqlite3ResolveExprNames(tls, bp+8 /* &sNC */, pWhen)) {
iEndTrigger = Xsqlite3VdbeMakeLabel(tls, pSubParse)
Xsqlite3ExprIfFalse(tls, pSubParse, pWhen, iEndTrigger, SQLITE_JUMPIFNULL)
}
@@ -120209,7 +122966,7 @@ func codeRowTrigger(tls *libc.TLS, pParse uintptr, pTrigger uintptr, pTab uintpt
// trigger pTrigger with default ON CONFLICT algorithm orconf. If no such
// TriggerPrg object exists, a new object is allocated and populated before
// being returned.
-func getRowTrigger(tls *libc.TLS, pParse uintptr, pTrigger uintptr, pTab uintptr, orconf int32) uintptr { /* sqlite3.c:139712:19: */
+func getRowTrigger(tls *libc.TLS, pParse uintptr, pTrigger uintptr, pTab uintptr, orconf int32) uintptr { /* sqlite3.c:140880:19: */
var pRoot uintptr = func() uintptr {
if (*Parse)(unsafe.Pointer(pParse)).FpToplevel != 0 {
return (*Parse)(unsafe.Pointer(pParse)).FpToplevel
@@ -120237,7 +122994,7 @@ func getRowTrigger(tls *libc.TLS, pParse uintptr, pTrigger uintptr, pTab uintptr
// table pTab. The reg, orconf and ignoreJump parameters passed to this
// function are the same as those described in the header function for
// sqlite3CodeRowTrigger()
-func Xsqlite3CodeRowTriggerDirect(tls *libc.TLS, pParse uintptr, p uintptr, pTab uintptr, reg int32, orconf int32, ignoreJump int32) { /* sqlite3.c:139746:21: */
+func Xsqlite3CodeRowTriggerDirect(tls *libc.TLS, pParse uintptr, p uintptr, pTab uintptr, reg int32, orconf int32, ignoreJump int32) { /* sqlite3.c:140914:21: */
var v uintptr = Xsqlite3GetVdbe(tls, pParse) // Main VM
var pPrg uintptr
pPrg = getRowTrigger(tls, pParse, p, pTab, orconf)
@@ -120297,7 +123054,7 @@ func Xsqlite3CodeRowTriggerDirect(tls *libc.TLS, pParse uintptr, p uintptr, pTab
// trigger program to use (REPLACE, IGNORE etc.). Parameter ignoreJump
// is the instruction that control should jump to if a trigger program
// raises an IGNORE exception.
-func Xsqlite3CodeRowTrigger(tls *libc.TLS, pParse uintptr, pTrigger uintptr, op int32, pChanges uintptr, tr_tm int32, pTab uintptr, reg int32, orconf int32, ignoreJump int32) { /* sqlite3.c:139818:21: */
+func Xsqlite3CodeRowTrigger(tls *libc.TLS, pParse uintptr, pTrigger uintptr, op int32, pChanges uintptr, tr_tm int32, pTab uintptr, reg int32, orconf int32, ignoreJump int32) { /* sqlite3.c:140986:21: */
var p uintptr // Used to iterate through pTrigger list
for p = pTrigger; p != 0; p = (*Trigger)(unsafe.Pointer(p)).FpNext {
@@ -120345,7 +123102,7 @@ func Xsqlite3CodeRowTrigger(tls *libc.TLS, pParse uintptr, pTrigger uintptr, op
// included in the returned mask if the TRIGGER_BEFORE bit is set in the
// tr_tm parameter. Similarly, values accessed by AFTER triggers are only
// included in the returned mask if the TRIGGER_AFTER bit is set in tr_tm.
-func Xsqlite3TriggerColmask(tls *libc.TLS, pParse uintptr, pTrigger uintptr, pChanges uintptr, isNew int32, tr_tm int32, pTab uintptr, orconf int32) U32 { /* sqlite3.c:139888:20: */
+func Xsqlite3TriggerColmask(tls *libc.TLS, pParse uintptr, pTrigger uintptr, pChanges uintptr, isNew int32, tr_tm int32, pTab uintptr, orconf int32) U32 { /* sqlite3.c:141056:20: */
var op int32
if pChanges != 0 {
op = TK_UPDATE
@@ -120402,7 +123159,7 @@ func Xsqlite3TriggerColmask(tls *libc.TLS, pParse uintptr, pTrigger uintptr, pCh
// (not a virtual table) then the value might have been stored as an
// integer. In that case, add an OP_RealAffinity opcode to make sure
// it has been converted into REAL.
-func Xsqlite3ColumnDefault(tls *libc.TLS, v uintptr, pTab uintptr, i int32, iReg int32) { /* sqlite3.c:139986:21: */
+func Xsqlite3ColumnDefault(tls *libc.TLS, v uintptr, pTab uintptr, i int32, iReg int32) { /* sqlite3.c:141154:21: */
bp := tls.Alloc(8)
defer tls.Free(8)
@@ -120431,7 +123188,7 @@ func Xsqlite3ColumnDefault(tls *libc.TLS, v uintptr, pTab uintptr, i int32, iReg
// aXRef[j] will be non-negative if column j of the original table is
// being updated. chngRowid will be true if the rowid of the table is
// being updated.
-func indexColumnIsBeingUpdated(tls *libc.TLS, pIdx uintptr, iCol int32, aXRef uintptr, chngRowid int32) int32 { /* sqlite3.c:140018:12: */
+func indexColumnIsBeingUpdated(tls *libc.TLS, pIdx uintptr, iCol int32, aXRef uintptr, chngRowid int32) int32 { /* sqlite3.c:141186:12: */
var iIdxCol I16 = *(*I16)(unsafe.Pointer((*Index)(unsafe.Pointer(pIdx)).FaiColumn + uintptr(iCol)*2))
// Cannot index rowid
if int32(iIdxCol) >= 0 {
@@ -120452,7 +123209,7 @@ func indexColumnIsBeingUpdated(tls *libc.TLS, pIdx uintptr, iCol int32, aXRef ui
// aXRef[j] will be non-negative if column j of the original table is
// being updated. chngRowid will be true if the rowid of the table is
// being updated.
-func indexWhereClauseMightChange(tls *libc.TLS, pIdx uintptr, aXRef uintptr, chngRowid int32) int32 { /* sqlite3.c:140048:12: */
+func indexWhereClauseMightChange(tls *libc.TLS, pIdx uintptr, aXRef uintptr, chngRowid int32) int32 { /* sqlite3.c:141216:12: */
if (*Index)(unsafe.Pointer(pIdx)).FpPartIdxWhere == uintptr(0) {
return 0
}
@@ -120464,7 +123221,7 @@ func indexWhereClauseMightChange(tls *libc.TLS, pIdx uintptr, aXRef uintptr, chn
// Expr.iColumn set to value (iCol+1). The resolver will modify the
// expression to be a TK_COLUMN reading column iCol of the first
// table in the source-list (pSrc->a[0]).
-func exprRowColumn(tls *libc.TLS, pParse uintptr, iCol int32) uintptr { /* sqlite3.c:140064:13: */
+func exprRowColumn(tls *libc.TLS, pParse uintptr, iCol int32) uintptr { /* sqlite3.c:141232:13: */
var pRet uintptr = Xsqlite3PExpr(tls, pParse, TK_ROW, uintptr(0), uintptr(0))
if pRet != 0 {
(*Expr)(unsafe.Pointer(pRet)).FiColumn = (YnVar(iCol + 1))
@@ -120508,7 +123265,7 @@ func exprRowColumn(tls *libc.TLS, pParse uintptr, iCol int32) uintptr { /* sqlit
// records with automatically assigned integer keys For intkey tables, the
// rowid value in is used as the integer key, and the
// remaining fields make up the table record.
-func updateFromSelect(tls *libc.TLS, pParse uintptr, iEph int32, pPk uintptr, pChanges uintptr, pTabList uintptr, pWhere uintptr, pOrderBy uintptr, pLimit uintptr) { /* sqlite3.c:140108:13: */
+func updateFromSelect(tls *libc.TLS, pParse uintptr, iEph int32, pPk uintptr, pChanges uintptr, pTabList uintptr, pWhere uintptr, pOrderBy uintptr, pLimit uintptr) { /* sqlite3.c:141276:13: */
bp := tls.Alloc(40)
defer tls.Free(40)
@@ -120533,6 +123290,7 @@ func updateFromSelect(tls *libc.TLS, pParse uintptr, iEph int32, pPk uintptr, pC
pWhere2 = Xsqlite3ExprDup(tls, db, pWhere, 0)
if pSrc != 0 {
+ libc.SetBitFieldPtr16Uint32((pSrc+8 /* &.a */)+60 /* &.fg */ +4 /* &.notCte */, uint32(1), 7, 0x80)
(*SrcItem)(unsafe.Pointer((pSrc + 8 /* &.a */))).FiCursor = -1
(*Table)(unsafe.Pointer((*SrcItem)(unsafe.Pointer((pSrc + 8 /* &.a */))).FpTab)).FnTabRef--
(*SrcItem)(unsafe.Pointer((pSrc + 8 /* &.a */))).FpTab = uintptr(0)
@@ -120560,6 +123318,7 @@ func updateFromSelect(tls *libc.TLS, pParse uintptr, iEph int32, pPk uintptr, pC
}
pList = Xsqlite3ExprListAppend(tls, pParse, uintptr(0), Xsqlite3PExpr(tls, pParse, TK_ROW, uintptr(0), uintptr(0)))
}
+
if pChanges != 0 {
for i = 0; i < (*ExprList)(unsafe.Pointer(pChanges)).FnExpr; i++ {
pList = Xsqlite3ExprListAppend(tls, pParse, pList,
@@ -120586,7 +123345,7 @@ func updateFromSelect(tls *libc.TLS, pParse uintptr, iEph int32, pPk uintptr, pC
// onError | pChanges | pWhere
// \_______________________/
// pTabList
-func Xsqlite3Update(tls *libc.TLS, pParse uintptr, pTabList uintptr, pChanges uintptr, pWhere uintptr, onError int32, pOrderBy uintptr, pLimit uintptr, pUpsert uintptr) { /* sqlite3.c:140202:21: */
+func Xsqlite3Update(tls *libc.TLS, pParse uintptr, pTabList uintptr, pChanges uintptr, pWhere uintptr, onError int32, pOrderBy uintptr, pLimit uintptr, pUpsert uintptr) { /* sqlite3.c:141372:21: */
bp := tls.Alloc(108)
defer tls.Free(108)
@@ -120863,7 +123622,7 @@ __25:
}
Xsqlite3ErrorMsg(tls, pParse,
- ts+18360, /* "cannot UPDATE ge..." */
+ ts+18844, /* "cannot UPDATE ge..." */
libc.VaList(bp, (*Column)(unsafe.Pointer((*Table)(unsafe.Pointer(pTab)).FaCol+uintptr(j)*32)).FzName))
goto update_cleanup
__27:
@@ -120895,7 +123654,7 @@ __21:
iRowidExpr = i
goto __30
__29:
- Xsqlite3ErrorMsg(tls, pParse, ts+18396 /* "no such column: ..." */, libc.VaList(bp+8, (*ExprList_item)(unsafe.Pointer((pChanges+8 /* &.a */)+uintptr(i)*32)).FzEName))
+ Xsqlite3ErrorMsg(tls, pParse, ts+18880 /* "no such column: ..." */, libc.VaList(bp+8, (*ExprList_item)(unsafe.Pointer((pChanges+8 /* &.a */)+uintptr(i)*32)).FzEName))
(*Parse)(unsafe.Pointer(pParse)).FcheckSchema = U8(1)
goto update_cleanup
__30:
@@ -120906,7 +123665,7 @@ __28:
rc = Xsqlite3AuthCheck(tls, pParse, SQLITE_UPDATE, (*Table)(unsafe.Pointer(pTab)).FzName,
func() uintptr {
if j < 0 {
- return ts + 6557 /* "ROWID" */
+ return ts + 6688 /* "ROWID" */
}
return (*Column)(unsafe.Pointer((*Table)(unsafe.Pointer(pTab)).FaCol + uintptr(j)*32)).FzName
}(),
@@ -121441,7 +124200,8 @@ __96:
if !(eOnePass != ONEPASS_OFF) {
goto __102
}
- if !((!(isView != 0) && (*(*int32)(unsafe.Pointer(bp + 96 /* &aiCurOnePass[0] */)) != iDataCur)) && (*(*int32)(unsafe.Pointer(bp + 96 /* &aiCurOnePass[0] */ + 1*4)) != iDataCur)) {
+ if !((*(*int32)(unsafe.Pointer(bp + 96 /* &aiCurOnePass[0] */)) != iDataCur) &&
+ (*(*int32)(unsafe.Pointer(bp + 96 /* &aiCurOnePass[0] */ + 1*4)) != iDataCur)) {
goto __104
}
@@ -121936,7 +124696,7 @@ __168:
}
Xsqlite3VdbeAddOp2(tls, v, OP_ChngCntRow, regRowCount, 1)
Xsqlite3VdbeSetNumCols(tls, v, 1)
- Xsqlite3VdbeSetColName(tls, v, 0, COLNAME_NAME, ts+18415 /* "rows updated" */, uintptr(0))
+ Xsqlite3VdbeSetColName(tls, v, 0, COLNAME_NAME, ts+18899 /* "rows updated" */, uintptr(0))
__169:
;
@@ -121972,7 +124732,7 @@ update_cleanup:
// The "onepass" strategy does not use an ephemeral table. Instead, it
// stores the same values (A, B and C above) in a register array and
// makes a single invocation of VUpdate.
-func updateVirtualTable(tls *libc.TLS, pParse uintptr, pSrc uintptr, pTab uintptr, pChanges uintptr, pRowid uintptr, aXRef uintptr, pWhere uintptr, onError int32) { /* sqlite3.c:141084:13: */
+func updateVirtualTable(tls *libc.TLS, pParse uintptr, pSrc uintptr, pTab uintptr, pChanges uintptr, pRowid uintptr, aXRef uintptr, pWhere uintptr, onError int32) { /* sqlite3.c:142259:13: */
bp := tls.Alloc(8)
defer tls.Free(8)
@@ -122144,7 +124904,7 @@ func updateVirtualTable(tls *libc.TLS, pParse uintptr, pSrc uintptr, pTab uintpt
// #include "sqliteInt.h"
// Free a list of Upsert objects
-func upsertDelete(tls *libc.TLS, db uintptr, p uintptr) { /* sqlite3.c:141270:29: */
+func upsertDelete(tls *libc.TLS, db uintptr, p uintptr) { /* sqlite3.c:142445:29: */
for ok := true; ok; ok = p != 0 {
var pNext uintptr = (*Upsert)(unsafe.Pointer(p)).FpNextUpsert
Xsqlite3ExprListDelete(tls, db, (*Upsert)(unsafe.Pointer(p)).FpUpsertTarget)
@@ -122157,14 +124917,14 @@ func upsertDelete(tls *libc.TLS, db uintptr, p uintptr) { /* sqlite3.c:141270:29
}
}
-func Xsqlite3UpsertDelete(tls *libc.TLS, db uintptr, p uintptr) { /* sqlite3.c:141282:21: */
+func Xsqlite3UpsertDelete(tls *libc.TLS, db uintptr, p uintptr) { /* sqlite3.c:142457:21: */
if p != 0 {
upsertDelete(tls, db, p)
}
}
// Duplicate an Upsert object.
-func Xsqlite3UpsertDup(tls *libc.TLS, db uintptr, p uintptr) uintptr { /* sqlite3.c:141290:23: */
+func Xsqlite3UpsertDup(tls *libc.TLS, db uintptr, p uintptr) uintptr { /* sqlite3.c:142465:23: */
if p == uintptr(0) {
return uintptr(0)
}
@@ -122177,7 +124937,7 @@ func Xsqlite3UpsertDup(tls *libc.TLS, db uintptr, p uintptr) uintptr { /* sqlite
}
// Create a new Upsert object.
-func Xsqlite3UpsertNew(tls *libc.TLS, db uintptr, pTarget uintptr, pTargetWhere uintptr, pSet uintptr, pWhere uintptr, pNext uintptr) uintptr { /* sqlite3.c:141304:23: */
+func Xsqlite3UpsertNew(tls *libc.TLS, db uintptr, pTarget uintptr, pTargetWhere uintptr, pSet uintptr, pWhere uintptr, pNext uintptr) uintptr { /* sqlite3.c:142479:23: */
var pNew uintptr
pNew = Xsqlite3DbMallocZero(tls, db, uint64(unsafe.Sizeof(Upsert{})))
if pNew == uintptr(0) {
@@ -122203,7 +124963,7 @@ func Xsqlite3UpsertNew(tls *libc.TLS, db uintptr, pTarget uintptr, pTargetWhere
//
// Return SQLITE_OK if everything works, or an error code is something
// is wrong.
-func Xsqlite3UpsertAnalyzeTarget(tls *libc.TLS, pParse uintptr, pTabList uintptr, pUpsert uintptr) int32 { /* sqlite3.c:141339:20: */
+func Xsqlite3UpsertAnalyzeTarget(tls *libc.TLS, pParse uintptr, pTabList uintptr, pUpsert uintptr) int32 { /* sqlite3.c:142514:20: */
bp := tls.Alloc(232)
defer tls.Free(232)
@@ -122318,15 +125078,15 @@ __1:
break
}
if (*Upsert)(unsafe.Pointer(pUpsert)).FpUpsertIdx == uintptr(0) {
- // var zWhich [16]int8 at bp+216, 16
+ // var zWhich [16]uint8 at bp+216, 16
if (nClause == 0) && ((*Upsert)(unsafe.Pointer(pUpsert)).FpNextUpsert == uintptr(0)) {
- *(*int8)(unsafe.Pointer(bp + 216 /* &zWhich[0] */)) = int8(0)
+ *(*uint8)(unsafe.Pointer(bp + 216 /* &zWhich[0] */)) = uint8(0)
} else {
- Xsqlite3_snprintf(tls, int32(unsafe.Sizeof([16]int8{})), bp+216 /* &zWhich[0] */, ts+18428 /* "%r " */, libc.VaList(bp, (nClause+1)))
+ Xsqlite3_snprintf(tls, int32(unsafe.Sizeof([16]uint8{})), bp+216 /* &zWhich[0] */, ts+18912 /* "%r " */, libc.VaList(bp, (nClause+1)))
}
Xsqlite3ErrorMsg(tls, pParse,
- ts+18432 /* "%sON CONFLICT cl..." */, libc.VaList(bp+8, bp+216 /* &zWhich[0] */))
+ ts+18916 /* "%sON CONFLICT cl..." */, libc.VaList(bp+8, bp+216 /* &zWhich[0] */))
return SQLITE_ERROR
}
@@ -122345,7 +125105,7 @@ __3:
// Return true if pUpsert is the last ON CONFLICT clause with a
// conflict target, or if pUpsert is followed by another ON CONFLICT
// clause that targets the INTEGER PRIMARY KEY.
-func Xsqlite3UpsertNextIsIPK(tls *libc.TLS, pUpsert uintptr) int32 { /* sqlite3.c:141466:20: */
+func Xsqlite3UpsertNextIsIPK(tls *libc.TLS, pUpsert uintptr) int32 { /* sqlite3.c:142641:20: */
var pNext uintptr
if pUpsert == uintptr(0) {
return 0
@@ -122367,7 +125127,7 @@ func Xsqlite3UpsertNextIsIPK(tls *libc.TLS, pUpsert uintptr) int32 { /* sqlite3.
// a particular index pIdx, return a pointer to the particular ON CONFLICT
// clause that applies to the index. Or, if the index is not subject to
// any ON CONFLICT clause, return NULL.
-func Xsqlite3UpsertOfIndex(tls *libc.TLS, pUpsert uintptr, pIdx uintptr) uintptr { /* sqlite3.c:141482:23: */
+func Xsqlite3UpsertOfIndex(tls *libc.TLS, pUpsert uintptr, pIdx uintptr) uintptr { /* sqlite3.c:142657:23: */
for ((pUpsert != 0) &&
((*Upsert)(unsafe.Pointer(pUpsert)).FpUpsertTarget != uintptr(0))) &&
((*Upsert)(unsafe.Pointer(pUpsert)).FpUpsertIdx != pIdx) {
@@ -122383,7 +125143,7 @@ func Xsqlite3UpsertOfIndex(tls *libc.TLS, pUpsert uintptr, pIdx uintptr) uintptr
// currently points to the conflicting table row. Otherwise, if pIdx
// is not NULL, then pIdx is the constraint that failed and iCur is a
// cursor points to the conflicting row.
-func Xsqlite3UpsertDoUpdate(tls *libc.TLS, pParse uintptr, pUpsert uintptr, pTab uintptr, pIdx uintptr, iCur int32) { /* sqlite3.c:141502:21: */
+func Xsqlite3UpsertDoUpdate(tls *libc.TLS, pParse uintptr, pUpsert uintptr, pTab uintptr, pIdx uintptr, iCur int32) { /* sqlite3.c:142677:21: */
var v uintptr = (*Parse)(unsafe.Pointer(pParse)).FpVdbe
var db uintptr = (*Parse)(unsafe.Pointer(pParse)).Fdb
var pSrc uintptr // FROM clause for the UPDATE
@@ -122417,7 +125177,7 @@ func Xsqlite3UpsertDoUpdate(tls *libc.TLS, pParse uintptr, pUpsert uintptr, pTab
i = Xsqlite3VdbeAddOp4Int(tls, v, OP_Found, iDataCur, 0, iPk, nPk)
Xsqlite3VdbeAddOp4(tls, v, OP_Halt, SQLITE_CORRUPT, OE_Abort, 0,
- ts+10473 /* "corrupt database" */, -1)
+ ts+10926 /* "corrupt database" */, -1)
Xsqlite3MayAbort(tls, pParse)
Xsqlite3VdbeJumpHere(tls, v, i)
}
@@ -122463,7 +125223,7 @@ func Xsqlite3UpsertDoUpdate(tls *libc.TLS, pParse uintptr, pUpsert uintptr, pTab
//
// The execSqlF() routine does the same thing, except it accepts
// a format string as its third argument
-func execSql(tls *libc.TLS, db uintptr, pzErrMsg uintptr, zSql uintptr) int32 { /* sqlite3.c:141599:12: */
+func execSql(tls *libc.TLS, db uintptr, pzErrMsg uintptr, zSql uintptr) int32 { /* sqlite3.c:142774:12: */
bp := tls.Alloc(8)
defer tls.Free(8)
@@ -122485,7 +125245,7 @@ func execSql(tls *libc.TLS, db uintptr, pzErrMsg uintptr, zSql uintptr) int32 {
// then run VACUUM to get those statements to execute at inappropriate
// times.
if (zSubSql != 0) &&
- ((libc.Xstrncmp(tls, zSubSql, ts+18505 /* "CRE" */, uint64(3)) == 0) || (libc.Xstrncmp(tls, zSubSql, ts+18509 /* "INS" */, uint64(3)) == 0)) {
+ ((libc.Xstrncmp(tls, zSubSql, ts+18989 /* "CRE" */, uint64(3)) == 0) || (libc.Xstrncmp(tls, zSubSql, ts+18993 /* "INS" */, uint64(3)) == 0)) {
rc = execSql(tls, db, pzErrMsg, zSubSql)
if rc != SQLITE_OK {
break
@@ -122503,7 +125263,7 @@ func execSql(tls *libc.TLS, db uintptr, pzErrMsg uintptr, zSql uintptr) int32 {
return rc
}
-func execSqlF(tls *libc.TLS, db uintptr, pzErrMsg uintptr, zSql uintptr, va uintptr) int32 { /* sqlite3.c:141629:12: */
+func execSqlF(tls *libc.TLS, db uintptr, pzErrMsg uintptr, zSql uintptr, va uintptr) int32 { /* sqlite3.c:142804:12: */
var z uintptr
var ap Va_list
_ = ap
@@ -122547,7 +125307,7 @@ func execSqlF(tls *libc.TLS, db uintptr, pzErrMsg uintptr, zSql uintptr, va uint
// And a power loss in between deleting the original and renaming the
// transient would cause the database file to appear to be deleted
// following reboot.
-func Xsqlite3Vacuum(tls *libc.TLS, pParse uintptr, pNm uintptr, pInto uintptr) { /* sqlite3.c:141672:21: */
+func Xsqlite3Vacuum(tls *libc.TLS, pParse uintptr, pNm uintptr, pInto uintptr) { /* sqlite3.c:142847:21: */
bp := tls.Alloc(8)
defer tls.Free(8)
*(*uintptr)(unsafe.Pointer(bp)) = pNm
@@ -122604,7 +125364,7 @@ build_vacuum_end:
}
// This routine implements the OP_Vacuum opcode of the VDBE.
-func Xsqlite3RunVacuum(tls *libc.TLS, pzErrMsg uintptr, db uintptr, iDb int32, pOut uintptr) int32 { /* sqlite3.c:141710:36: */
+func Xsqlite3RunVacuum(tls *libc.TLS, pzErrMsg uintptr, db uintptr, iDb int32, pOut uintptr) int32 { /* sqlite3.c:142885:36: */
bp := tls.Alloc(52)
defer tls.Free(52)
@@ -122635,14 +125395,14 @@ func Xsqlite3RunVacuum(tls *libc.TLS, pzErrMsg uintptr, db uintptr, iDb int32, p
if !(!(int32((*Sqlite3)(unsafe.Pointer(db)).FautoCommit) != 0)) {
goto __1
}
- Xsqlite3SetString(tls, pzErrMsg, db, ts+18513 /* "cannot VACUUM fr..." */)
+ Xsqlite3SetString(tls, pzErrMsg, db, ts+18997 /* "cannot VACUUM fr..." */)
return SQLITE_ERROR // IMP: R-12218-18073
__1:
;
if !((*Sqlite3)(unsafe.Pointer(db)).FnVdbeActive > 1) {
goto __2
}
- Xsqlite3SetString(tls, pzErrMsg, db, ts+18553 /* "cannot VACUUM - ..." */)
+ Xsqlite3SetString(tls, pzErrMsg, db, ts+19037 /* "cannot VACUUM - ..." */)
return SQLITE_ERROR // IMP: R-15610-35227
__2:
;
@@ -122653,7 +125413,7 @@ __2:
if !(Xsqlite3_value_type(tls, pOut) != SQLITE_TEXT) {
goto __5
}
- Xsqlite3SetString(tls, pzErrMsg, db, ts+18596 /* "non-text filenam..." */)
+ Xsqlite3SetString(tls, pzErrMsg, db, ts+19080 /* "non-text filenam..." */)
return SQLITE_ERROR
__5:
;
@@ -122662,7 +125422,7 @@ __5:
*(*uint32)(unsafe.Pointer(db + 76 /* &.openFlags */)) |= (uint32(SQLITE_OPEN_CREATE | SQLITE_OPEN_READWRITE))
goto __4
__3:
- zOut = ts + 703 /* "" */
+ zOut = ts + 755 /* "" */
__4:
;
@@ -122698,7 +125458,7 @@ __4:
// time to parse and run the PRAGMA to turn journalling off than it does
// to write the journal header file.
nDb = (*Sqlite3)(unsafe.Pointer(db)).FnDb
- rc = execSqlF(tls, db, pzErrMsg, ts+18614 /* "ATTACH %Q AS vac..." */, libc.VaList(bp, zOut))
+ rc = execSqlF(tls, db, pzErrMsg, ts+19098 /* "ATTACH %Q AS vac..." */, libc.VaList(bp, zOut))
(*Sqlite3)(unsafe.Pointer(db)).FopenFlags = saved_openFlags
if !(rc != SQLITE_OK) {
goto __6
@@ -122719,7 +125479,7 @@ __6:
goto __8
}
rc = SQLITE_ERROR
- Xsqlite3SetString(tls, pzErrMsg, db, ts+18637 /* "output file alre..." */)
+ Xsqlite3SetString(tls, pzErrMsg, db, ts+19121 /* "output file alre..." */)
goto end_of_vacuum
__8:
;
@@ -122735,7 +125495,7 @@ __7:
// Begin a transaction and take an exclusive lock on the main database
// file. This is done before the sqlite3BtreeGetPageSize(pMain) call below,
// to ensure that we do not try to change the page-size on a WAL database.
- rc = execSql(tls, db, pzErrMsg, ts+12760 /* "BEGIN" */)
+ rc = execSql(tls, db, pzErrMsg, ts+13213 /* "BEGIN" */)
if !(rc != SQLITE_OK) {
goto __9
}
@@ -122786,7 +125546,7 @@ __12:
(*Sqlite3)(unsafe.Pointer(db)).Finit.FiDb = U8(nDb) // force new CREATE statements into vacuum_db
rc = execSqlF(tls, db, pzErrMsg,
- ts+18664, /* "SELECT sql FROM ..." */
+ ts+19148, /* "SELECT sql FROM ..." */
libc.VaList(bp+8, zDbMain))
if !(rc != SQLITE_OK) {
goto __13
@@ -122796,7 +125556,7 @@ __13:
;
rc = execSqlF(tls, db, pzErrMsg,
- ts+18772, /* "SELECT sql FROM ..." */
+ ts+19256, /* "SELECT sql FROM ..." */
libc.VaList(bp+16, zDbMain))
if !(rc != SQLITE_OK) {
goto __14
@@ -122811,7 +125571,7 @@ __14:
// the contents to the temporary database.
rc = execSqlF(tls, db, pzErrMsg,
- ts+18826, /* "SELECT'INSERT IN..." */
+ ts+19310, /* "SELECT'INSERT IN..." */
libc.VaList(bp+24, zDbMain))
*(*U32)(unsafe.Pointer(db + 44 /* &.mDbFlags */)) &= (libc.Uint32FromInt32(libc.CplInt32(DBFLAG_Vacuum)))
@@ -122828,7 +125588,7 @@ __15:
// from the schema table.
rc = execSqlF(tls, db, pzErrMsg,
- ts+18977, /* "INSERT INTO vacu..." */
+ ts+19461, /* "INSERT INTO vacu..." */
libc.VaList(bp+32, zDbMain))
if !(rc != 0) {
goto __16
@@ -122941,7 +125701,7 @@ var aCopy = [10]uint8{
uint8(BTREE_TEXT_ENCODING), uint8(0), // Preserve the text encoding
uint8(BTREE_USER_VERSION), uint8(0), // Preserve the user version
uint8(BTREE_APPLICATION_ID), uint8(0), // Preserve the application id
-} /* sqlite3.c:141901:32 */
+} /* sqlite3.c:143076:32 */
// Construct and install a Module object for a virtual table. When this
// routine is called, it is guaranteed that all appropriate locks are held
@@ -122949,7 +125709,7 @@ var aCopy = [10]uint8{
//
// If there already exists a module with zName, replace it with the new one.
// If pModule==0, then delete the module zName if it exists.
-func Xsqlite3VtabCreateModule(tls *libc.TLS, db uintptr, zName uintptr, pModule uintptr, pAux uintptr, xDestroy uintptr) uintptr { /* sqlite3.c:142013:23: */
+func Xsqlite3VtabCreateModule(tls *libc.TLS, db uintptr, zName uintptr, pModule uintptr, pAux uintptr, xDestroy uintptr) uintptr { /* sqlite3.c:143188:23: */
var pMod uintptr
var pDel uintptr
var zCopy uintptr
@@ -122989,32 +125749,32 @@ func Xsqlite3VtabCreateModule(tls *libc.TLS, db uintptr, zName uintptr, pModule
// The actual function that does the work of creating a new module.
// This function implements the sqlite3_create_module() and
// sqlite3_create_module_v2() interfaces.
-func createModule(tls *libc.TLS, db uintptr, zName uintptr, pModule uintptr, pAux uintptr, xDestroy uintptr) int32 { /* sqlite3.c:142061:12: */
+func createModule(tls *libc.TLS, db uintptr, zName uintptr, pModule uintptr, pAux uintptr, xDestroy uintptr) int32 { /* sqlite3.c:143236:12: */
var rc int32 = SQLITE_OK
Xsqlite3_mutex_enter(tls, (*Sqlite3)(unsafe.Pointer(db)).Fmutex)
Xsqlite3VtabCreateModule(tls, db, zName, pModule, pAux, xDestroy)
rc = Xsqlite3ApiExit(tls, db, rc)
if (rc != SQLITE_OK) && (xDestroy != 0) {
- (*(*func(*libc.TLS, uintptr))(unsafe.Pointer(&xDestroy)))(tls, pAux)
+ (*struct{ f func(*libc.TLS, uintptr) })(unsafe.Pointer(&struct{ uintptr }{xDestroy})).f(tls, pAux)
}
Xsqlite3_mutex_leave(tls, (*Sqlite3)(unsafe.Pointer(db)).Fmutex)
return rc
}
// External API function used to create a new virtual-table module.
-func Xsqlite3_create_module(tls *libc.TLS, db uintptr, zName uintptr, pModule uintptr, pAux uintptr) int32 { /* sqlite3.c:142082:16: */
+func Xsqlite3_create_module(tls *libc.TLS, db uintptr, zName uintptr, pModule uintptr, pAux uintptr) int32 { /* sqlite3.c:143257:16: */
return createModule(tls, db, zName, pModule, pAux, uintptr(0))
}
// External API function used to create a new virtual-table module.
-func Xsqlite3_create_module_v2(tls *libc.TLS, db uintptr, zName uintptr, pModule uintptr, pAux uintptr, xDestroy uintptr) int32 { /* sqlite3.c:142097:16: */
+func Xsqlite3_create_module_v2(tls *libc.TLS, db uintptr, zName uintptr, pModule uintptr, pAux uintptr, xDestroy uintptr) int32 { /* sqlite3.c:143272:16: */
return createModule(tls, db, zName, pModule, pAux, xDestroy)
}
// External API to drop all virtual-table modules, except those named
// on the azNames list.
-func Xsqlite3_drop_modules(tls *libc.TLS, db uintptr, azNames uintptr) int32 { /* sqlite3.c:142114:16: */
+func Xsqlite3_drop_modules(tls *libc.TLS, db uintptr, azNames uintptr) int32 { /* sqlite3.c:143289:16: */
var pThis uintptr
var pNext uintptr
for pThis = (*Hash)(unsafe.Pointer((db + 536 /* &.aModule */))).Ffirst; pThis != 0; pThis = pNext {
@@ -123035,12 +125795,12 @@ func Xsqlite3_drop_modules(tls *libc.TLS, db uintptr, azNames uintptr) int32 { /
// Decrement the reference count on a Module object. Destroy the
// module when the reference count reaches zero.
-func Xsqlite3VtabModuleUnref(tls *libc.TLS, db uintptr, pMod uintptr) { /* sqlite3.c:142136:21: */
+func Xsqlite3VtabModuleUnref(tls *libc.TLS, db uintptr, pMod uintptr) { /* sqlite3.c:143311:21: */
(*Module)(unsafe.Pointer(pMod)).FnRefModule--
if (*Module)(unsafe.Pointer(pMod)).FnRefModule == 0 {
if (*Module)(unsafe.Pointer(pMod)).FxDestroy != 0 {
- (*(*func(*libc.TLS, uintptr))(unsafe.Pointer((pMod + 32 /* &.xDestroy */))))(tls, (*Module)(unsafe.Pointer(pMod)).FpAux)
+ (*struct{ f func(*libc.TLS, uintptr) })(unsafe.Pointer(&struct{ uintptr }{(*Module)(unsafe.Pointer(pMod)).FxDestroy})).f(tls, (*Module)(unsafe.Pointer(pMod)).FpAux)
}
Xsqlite3DbFree(tls, db, pMod)
@@ -123053,14 +125813,14 @@ func Xsqlite3VtabModuleUnref(tls *libc.TLS, db uintptr, pMod uintptr) { /* sqlit
//
// If a disconnect is attempted while a virtual table is locked,
// the disconnect is deferred until all locks have been removed.
-func Xsqlite3VtabLock(tls *libc.TLS, pVTab uintptr) { /* sqlite3.c:142156:21: */
+func Xsqlite3VtabLock(tls *libc.TLS, pVTab uintptr) { /* sqlite3.c:143331:21: */
(*VTable)(unsafe.Pointer(pVTab)).FnRef++
}
// pTab is a pointer to a Table structure representing a virtual-table.
// Return a pointer to the VTable object used by connection db to access
// this virtual-table, if one has been created, or NULL otherwise.
-func Xsqlite3GetVTable(tls *libc.TLS, db uintptr, pTab uintptr) uintptr { /* sqlite3.c:142166:23: */
+func Xsqlite3GetVTable(tls *libc.TLS, db uintptr, pTab uintptr) uintptr { /* sqlite3.c:143341:23: */
var pVtab uintptr
for pVtab = (*Table)(unsafe.Pointer(pTab)).FpVTable; (pVtab != 0) && ((*VTable)(unsafe.Pointer(pVtab)).Fdb != db); pVtab = (*VTable)(unsafe.Pointer(pVtab)).FpNext {
@@ -123070,7 +125830,7 @@ func Xsqlite3GetVTable(tls *libc.TLS, db uintptr, pTab uintptr) uintptr { /* sql
// Decrement the ref-count on a virtual table object. When the ref-count
// reaches zero, call the xDisconnect() method to delete the object.
-func Xsqlite3VtabUnlock(tls *libc.TLS, pVTab uintptr) { /* sqlite3.c:142177:21: */
+func Xsqlite3VtabUnlock(tls *libc.TLS, pVTab uintptr) { /* sqlite3.c:143352:21: */
var db uintptr = (*VTable)(unsafe.Pointer(pVTab)).Fdb
(*VTable)(unsafe.Pointer(pVTab)).FnRef--
@@ -123078,7 +125838,9 @@ func Xsqlite3VtabUnlock(tls *libc.TLS, pVTab uintptr) { /* sqlite3.c:142177:21:
var p uintptr = (*VTable)(unsafe.Pointer(pVTab)).FpVtab
Xsqlite3VtabModuleUnref(tls, (*VTable)(unsafe.Pointer(pVTab)).Fdb, (*VTable)(unsafe.Pointer(pVTab)).FpMod)
if p != 0 {
- (*(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(((*Sqlite3_vtab)(unsafe.Pointer(p)).FpModule + 32 /* &.xDisconnect */))))(tls, p)
+ (*struct {
+ f func(*libc.TLS, uintptr) int32
+ })(unsafe.Pointer(&struct{ uintptr }{(*Sqlite3_module)(unsafe.Pointer((*Sqlite3_vtab)(unsafe.Pointer(p)).FpModule)).FxDisconnect})).f(tls, p)
}
Xsqlite3DbFree(tls, db, pVTab)
}
@@ -123089,7 +125851,7 @@ func Xsqlite3VtabUnlock(tls *libc.TLS, pVTab uintptr) { /* sqlite3.c:142177:21:
// database connections to be disconnected at the next opportunity.
// Except, if argument db is not NULL, then the entry associated with
// connection db is left in the p->pVTable list.
-func vtabDisconnectAll(tls *libc.TLS, db uintptr, p uintptr) uintptr { /* sqlite3.c:142202:15: */
+func vtabDisconnectAll(tls *libc.TLS, db uintptr, p uintptr) uintptr { /* sqlite3.c:143377:15: */
var pRet uintptr = uintptr(0)
var pVTable uintptr = (*Table)(unsafe.Pointer(p)).FpVTable
(*Table)(unsafe.Pointer(p)).FpVTable = uintptr(0)
@@ -123124,7 +125886,7 @@ func vtabDisconnectAll(tls *libc.TLS, db uintptr, p uintptr) uintptr { /* sqlite
// used when closing database connection db to free all of its VTable
// objects without disturbing the rest of the Schema object (which may
// be being used by other shared-cache connections).
-func Xsqlite3VtabDisconnect(tls *libc.TLS, db uintptr, p uintptr) { /* sqlite3.c:142242:21: */
+func Xsqlite3VtabDisconnect(tls *libc.TLS, db uintptr, p uintptr) { /* sqlite3.c:143417:21: */
var ppVTab uintptr
for ppVTab = (p + 96 /* &.pVTable */); *(*uintptr)(unsafe.Pointer(ppVTab)) != 0; ppVTab = (*(*uintptr)(unsafe.Pointer(ppVTab)) + 40 /* &.pNext */) {
@@ -123155,7 +125917,7 @@ func Xsqlite3VtabDisconnect(tls *libc.TLS, db uintptr, p uintptr) { /* sqlite3.c
//
// As a result, a sqlite3.pDisconnect cannot be accessed simultaneously
// by multiple threads. It is thread-safe.
-func Xsqlite3VtabUnlockList(tls *libc.TLS, db uintptr) { /* sqlite3.c:142280:21: */
+func Xsqlite3VtabUnlockList(tls *libc.TLS, db uintptr) { /* sqlite3.c:143455:21: */
var p uintptr = (*Sqlite3)(unsafe.Pointer(db)).FpDisconnect
if p != 0 {
@@ -123181,7 +125943,7 @@ func Xsqlite3VtabUnlockList(tls *libc.TLS, db uintptr) { /* sqlite3.c:142280:21:
// structure being xDisconnected and free). Any other VTable structures
// in the list are moved to the sqlite3.pDisconnect list of the associated
// database connection.
-func Xsqlite3VtabClear(tls *libc.TLS, db uintptr, p uintptr) { /* sqlite3.c:142311:21: */
+func Xsqlite3VtabClear(tls *libc.TLS, db uintptr, p uintptr) { /* sqlite3.c:143486:21: */
if !(db != 0) || ((*Sqlite3)(unsafe.Pointer(db)).FpnBytesFreed == uintptr(0)) {
vtabDisconnectAll(tls, uintptr(0), p)
}
@@ -123200,7 +125962,7 @@ func Xsqlite3VtabClear(tls *libc.TLS, db uintptr, p uintptr) { /* sqlite3.c:1423
// The string is not copied - the pointer is stored. The
// string will be freed automatically when the table is
// deleted.
-func addModuleArgument(tls *libc.TLS, pParse uintptr, pTable uintptr, zArg uintptr) { /* sqlite3.c:142328:13: */
+func addModuleArgument(tls *libc.TLS, pParse uintptr, pTable uintptr, zArg uintptr) { /* sqlite3.c:143503:13: */
bp := tls.Alloc(8)
defer tls.Free(8)
@@ -123208,7 +125970,7 @@ func addModuleArgument(tls *libc.TLS, pParse uintptr, pTable uintptr, zArg uintp
var azModuleArg uintptr
var db uintptr = (*Parse)(unsafe.Pointer(pParse)).Fdb
if ((*Table)(unsafe.Pointer(pTable)).FnModuleArg + 3) >= *(*int32)(unsafe.Pointer((db + 128 /* &.aLimit */) + 2*4)) {
- Xsqlite3ErrorMsg(tls, pParse, ts+10703 /* "too many columns..." */, libc.VaList(bp, (*Table)(unsafe.Pointer(pTable)).FzName))
+ Xsqlite3ErrorMsg(tls, pParse, ts+11156 /* "too many columns..." */, libc.VaList(bp, (*Table)(unsafe.Pointer(pTable)).FzName))
}
azModuleArg = Xsqlite3DbRealloc(tls, db, (*Table)(unsafe.Pointer(pTable)).FazModuleArg, uint64(nBytes))
if azModuleArg == uintptr(0) {
@@ -123224,7 +125986,7 @@ func addModuleArgument(tls *libc.TLS, pParse uintptr, pTable uintptr, zArg uintp
// The parser calls this routine when it first sees a CREATE VIRTUAL TABLE
// statement. The module name has been parsed, but the optional list
// of parameters that follow the module name are still pending.
-func Xsqlite3VtabBeginParse(tls *libc.TLS, pParse uintptr, pName1 uintptr, pName2 uintptr, pModuleName uintptr, ifNotExists int32) { /* sqlite3.c:142351:21: */
+func Xsqlite3VtabBeginParse(tls *libc.TLS, pParse uintptr, pName1 uintptr, pName2 uintptr, pModuleName uintptr, ifNotExists int32) { /* sqlite3.c:143526:21: */
var pTable uintptr // The new virtual table
var db uintptr // Database connection
@@ -123257,7 +126019,7 @@ func Xsqlite3VtabBeginParse(tls *libc.TLS, pParse uintptr, pName1 uintptr, pName
// This routine takes the module argument that has been accumulating
// in pParse->zArg[] and appends it to the list of arguments on the
// virtual table currently under construction in pParse->pTable.
-func addArgumentToVtab(tls *libc.TLS, pParse uintptr) { /* sqlite3.c:142399:13: */
+func addArgumentToVtab(tls *libc.TLS, pParse uintptr) { /* sqlite3.c:143574:13: */
if ((*Parse)(unsafe.Pointer(pParse)).FsArg.Fz != 0) && ((*Parse)(unsafe.Pointer(pParse)).FpNewTable != 0) {
var z uintptr = (*Parse)(unsafe.Pointer(pParse)).FsArg.Fz
var n int32 = int32((*Parse)(unsafe.Pointer(pParse)).FsArg.Fn)
@@ -123268,7 +126030,7 @@ func addArgumentToVtab(tls *libc.TLS, pParse uintptr) { /* sqlite3.c:142399:13:
// The parser calls this routine after the CREATE VIRTUAL TABLE statement
// has been completely parsed.
-func Xsqlite3VtabFinishParse(tls *libc.TLS, pParse uintptr, pEnd uintptr) { /* sqlite3.c:142412:21: */
+func Xsqlite3VtabFinishParse(tls *libc.TLS, pParse uintptr, pEnd uintptr) { /* sqlite3.c:143587:21: */
bp := tls.Alloc(64)
defer tls.Free(64)
@@ -123302,7 +126064,7 @@ func Xsqlite3VtabFinishParse(tls *libc.TLS, pParse uintptr, pEnd uintptr) { /* s
if pEnd != 0 {
(*Parse)(unsafe.Pointer(pParse)).FsNameToken.Fn = (uint32((int32((int64((*Token)(unsafe.Pointer(pEnd)).Fz) - int64((*Parse)(unsafe.Pointer(pParse)).FsNameToken.Fz)) / 1))) + (*Token)(unsafe.Pointer(pEnd)).Fn)
}
- zStmt = Xsqlite3MPrintf(tls, db, ts+19107 /* "CREATE VIRTUAL T..." */, libc.VaList(bp, (pParse+240 /* &.sNameToken */)))
+ zStmt = Xsqlite3MPrintf(tls, db, ts+19591 /* "CREATE VIRTUAL T..." */, libc.VaList(bp, (pParse+240 /* &.sNameToken */)))
// A slot for the record has already been allocated in the
// schema table. We just need to update that slot with all
@@ -123314,7 +126076,7 @@ func Xsqlite3VtabFinishParse(tls *libc.TLS, pParse uintptr, pEnd uintptr) { /* s
iDb = Xsqlite3SchemaToIndex(tls, db, (*Table)(unsafe.Pointer(pTab)).FpSchema)
Xsqlite3NestedParse(tls, pParse,
- ts+19131, /* "UPDATE %Q.sqlite..." */
+ ts+19615, /* "UPDATE %Q.sqlite..." */
libc.VaList(bp+8, (*Db)(unsafe.Pointer((*Sqlite3)(unsafe.Pointer(db)).FaDb+uintptr(iDb)*32)).FzDbSName,
(*Table)(unsafe.Pointer(pTab)).FzName,
(*Table)(unsafe.Pointer(pTab)).FzName,
@@ -123324,7 +126086,7 @@ func Xsqlite3VtabFinishParse(tls *libc.TLS, pParse uintptr, pEnd uintptr) { /* s
Xsqlite3ChangeCookie(tls, pParse, iDb)
Xsqlite3VdbeAddOp0(tls, v, OP_Expire)
- zWhere = Xsqlite3MPrintf(tls, db, ts+19230 /* "name=%Q AND sql=..." */, libc.VaList(bp+48, (*Table)(unsafe.Pointer(pTab)).FzName, zStmt))
+ zWhere = Xsqlite3MPrintf(tls, db, ts+19714 /* "name=%Q AND sql=..." */, libc.VaList(bp+48, (*Table)(unsafe.Pointer(pTab)).FzName, zStmt))
Xsqlite3VdbeAddParseSchemaOp(tls, v, iDb, zWhere, uint16(0))
Xsqlite3DbFree(tls, db, zStmt)
@@ -123348,7 +126110,7 @@ func Xsqlite3VtabFinishParse(tls *libc.TLS, pParse uintptr, pEnd uintptr) { /* s
// The parser calls this routine when it sees the first token
// of an argument to the module name in a CREATE VIRTUAL TABLE statement.
-func Xsqlite3VtabArgInit(tls *libc.TLS, pParse uintptr) { /* sqlite3.c:142498:21: */
+func Xsqlite3VtabArgInit(tls *libc.TLS, pParse uintptr) { /* sqlite3.c:143673:21: */
addArgumentToVtab(tls, pParse)
(*Parse)(unsafe.Pointer(pParse)).FsArg.Fz = uintptr(0)
(*Parse)(unsafe.Pointer(pParse)).FsArg.Fn = uint32(0)
@@ -123356,7 +126118,7 @@ func Xsqlite3VtabArgInit(tls *libc.TLS, pParse uintptr) { /* sqlite3.c:142498:21
// The parser calls this routine for each token after the first token
// in an argument to the module name in a CREATE VIRTUAL TABLE statement.
-func Xsqlite3VtabArgExtend(tls *libc.TLS, pParse uintptr, p uintptr) { /* sqlite3.c:142508:21: */
+func Xsqlite3VtabArgExtend(tls *libc.TLS, pParse uintptr, p uintptr) { /* sqlite3.c:143683:21: */
var pArg uintptr = (pParse + 352 /* &.sArg */)
if (*Token)(unsafe.Pointer(pArg)).Fz == uintptr(0) {
(*Token)(unsafe.Pointer(pArg)).Fz = (*Token)(unsafe.Pointer(p)).Fz
@@ -123370,7 +126132,7 @@ func Xsqlite3VtabArgExtend(tls *libc.TLS, pParse uintptr, p uintptr) { /* sqlite
// Invoke a virtual table constructor (either xCreate or xConnect). The
// pointer to the function to invoke is passed as the fourth parameter
// to this procedure.
-func vtabCallConstructor(tls *libc.TLS, db uintptr, pTab uintptr, pMod uintptr, xConstruct uintptr, pzErr uintptr) int32 { /* sqlite3.c:142524:12: */
+func vtabCallConstructor(tls *libc.TLS, db uintptr, pTab uintptr, pMod uintptr, xConstruct uintptr, pzErr uintptr) int32 { /* sqlite3.c:143699:12: */
bp := tls.Alloc(72)
defer tls.Free(72)
@@ -123389,7 +126151,7 @@ func vtabCallConstructor(tls *libc.TLS, db uintptr, pTab uintptr, pMod uintptr,
for pCtx = (*Sqlite3)(unsafe.Pointer(db)).FpVtabCtx; pCtx != 0; pCtx = (*VtabCtx)(unsafe.Pointer(pCtx)).FpPrior {
if (*VtabCtx)(unsafe.Pointer(pCtx)).FpTab == pTab {
*(*uintptr)(unsafe.Pointer(pzErr)) = Xsqlite3MPrintf(tls, db,
- ts+19249 /* "vtable construct..." */, libc.VaList(bp, (*Table)(unsafe.Pointer(pTab)).FzName))
+ ts+19733 /* "vtable construct..." */, libc.VaList(bp, (*Table)(unsafe.Pointer(pTab)).FzName))
return SQLITE_LOCKED
}
}
@@ -123419,7 +126181,9 @@ func vtabCallConstructor(tls *libc.TLS, db uintptr, pTab uintptr, pMod uintptr,
(*VtabCtx)(unsafe.Pointer(bp + 32 /* &sCtx */)).FpPrior = (*Sqlite3)(unsafe.Pointer(db)).FpVtabCtx
(*VtabCtx)(unsafe.Pointer(bp + 32 /* &sCtx */)).FbDeclared = 0
(*Sqlite3)(unsafe.Pointer(db)).FpVtabCtx = bp + 32 /* &sCtx */
- rc = (*(*func(*libc.TLS, uintptr, uintptr, int32, uintptr, uintptr, uintptr) int32)(unsafe.Pointer(&xConstruct)))(tls, db, (*Module)(unsafe.Pointer(pMod)).FpAux, nArg, azArg, (pVTable + 16 /* &.pVtab */), bp+64 /* &zErr */)
+ rc = (*struct {
+ f func(*libc.TLS, uintptr, uintptr, int32, uintptr, uintptr, uintptr) int32
+ })(unsafe.Pointer(&struct{ uintptr }{xConstruct})).f(tls, db, (*Module)(unsafe.Pointer(pMod)).FpAux, nArg, azArg, (pVTable + 16 /* &.pVtab */), bp+64 /* &zErr */)
(*Sqlite3)(unsafe.Pointer(db)).FpVtabCtx = (*VtabCtx)(unsafe.Pointer(bp + 32 /* &sCtx */)).FpPrior
if rc == SQLITE_NOMEM {
Xsqlite3OomFault(tls, db)
@@ -123427,9 +126191,9 @@ func vtabCallConstructor(tls *libc.TLS, db uintptr, pTab uintptr, pMod uintptr,
if SQLITE_OK != rc {
if *(*uintptr)(unsafe.Pointer(bp + 64 /* zErr */)) == uintptr(0) {
- *(*uintptr)(unsafe.Pointer(pzErr)) = Xsqlite3MPrintf(tls, db, ts+19291 /* "vtable construct..." */, libc.VaList(bp+8, zModuleName))
+ *(*uintptr)(unsafe.Pointer(pzErr)) = Xsqlite3MPrintf(tls, db, ts+19775 /* "vtable construct..." */, libc.VaList(bp+8, zModuleName))
} else {
- *(*uintptr)(unsafe.Pointer(pzErr)) = Xsqlite3MPrintf(tls, db, ts+2718 /* "%s" */, libc.VaList(bp+16, *(*uintptr)(unsafe.Pointer(bp + 64 /* zErr */))))
+ *(*uintptr)(unsafe.Pointer(pzErr)) = Xsqlite3MPrintf(tls, db, ts+2790 /* "%s" */, libc.VaList(bp+16, *(*uintptr)(unsafe.Pointer(bp + 64 /* zErr */))))
Xsqlite3_free(tls, *(*uintptr)(unsafe.Pointer(bp + 64 /* zErr */)))
}
Xsqlite3DbFree(tls, db, pVTable)
@@ -123441,7 +126205,7 @@ func vtabCallConstructor(tls *libc.TLS, db uintptr, pTab uintptr, pMod uintptr,
(*Module)(unsafe.Pointer(pMod)).FnRefModule++
(*VTable)(unsafe.Pointer(pVTable)).FnRef = 1
if (*VtabCtx)(unsafe.Pointer(bp+32 /* &sCtx */)).FbDeclared == 0 {
- var zFormat uintptr = ts + 19321 /* "vtable construct..." */
+ var zFormat uintptr = ts + 19805 /* "vtable construct..." */
*(*uintptr)(unsafe.Pointer(pzErr)) = Xsqlite3MPrintf(tls, db, zFormat, libc.VaList(bp+24, (*Table)(unsafe.Pointer(pTab)).FzName))
Xsqlite3VtabUnlock(tls, pVTable)
rc = SQLITE_ERROR
@@ -123457,31 +126221,31 @@ func vtabCallConstructor(tls *libc.TLS, db uintptr, pTab uintptr, pMod uintptr,
(*Table)(unsafe.Pointer(pTab)).FpVTable = pVTable
for iCol = 0; iCol < int32((*Table)(unsafe.Pointer(pTab)).FnCol); iCol++ {
- var zType uintptr = Xsqlite3ColumnType(tls, ((*Table)(unsafe.Pointer(pTab)).FaCol + uintptr(iCol)*32), ts+703 /* "" */)
+ var zType uintptr = Xsqlite3ColumnType(tls, ((*Table)(unsafe.Pointer(pTab)).FaCol + uintptr(iCol)*32), ts+755 /* "" */)
var nType int32
var i int32 = 0
nType = Xsqlite3Strlen30(tls, zType)
for i = 0; i < nType; i++ {
- if ((0 == Xsqlite3_strnicmp(tls, ts+14215 /* "hidden" */, (zType+uintptr(i)), 6)) &&
- ((i == 0) || (int32(*(*int8)(unsafe.Pointer(zType + uintptr((i - 1))))) == ' '))) &&
- ((int32(*(*int8)(unsafe.Pointer(zType + uintptr((i + 6))))) == 0) || (int32(*(*int8)(unsafe.Pointer(zType + uintptr((i + 6))))) == ' ')) {
+ if ((0 == Xsqlite3_strnicmp(tls, ts+14670 /* "hidden" */, (zType+uintptr(i)), 6)) &&
+ ((i == 0) || (int32(*(*uint8)(unsafe.Pointer(zType + uintptr((i - 1))))) == ' '))) &&
+ ((int32(*(*uint8)(unsafe.Pointer(zType + uintptr((i + 6))))) == 0) || (int32(*(*uint8)(unsafe.Pointer(zType + uintptr((i + 6))))) == ' ')) {
break
}
}
if i < nType {
var j int32
var nDel int32 = (6 + (func() int32 {
- if *(*int8)(unsafe.Pointer(zType + uintptr((i + 6)))) != 0 {
+ if *(*uint8)(unsafe.Pointer(zType + uintptr((i + 6)))) != 0 {
return 1
}
return 0
}()))
for j = i; (j + nDel) <= nType; j++ {
- *(*int8)(unsafe.Pointer(zType + uintptr(j))) = *(*int8)(unsafe.Pointer(zType + uintptr((j + nDel))))
+ *(*uint8)(unsafe.Pointer(zType + uintptr(j))) = *(*uint8)(unsafe.Pointer(zType + uintptr((j + nDel))))
}
- if (int32(*(*int8)(unsafe.Pointer(zType + uintptr(i)))) == 0) && (i > 0) {
+ if (int32(*(*uint8)(unsafe.Pointer(zType + uintptr(i)))) == 0) && (i > 0) {
- *(*int8)(unsafe.Pointer(zType + uintptr((i - 1)))) = int8(0)
+ *(*uint8)(unsafe.Pointer(zType + uintptr((i - 1)))) = uint8(0)
}
*(*U16)(unsafe.Pointer((*Table)(unsafe.Pointer(pTab)).FaCol + uintptr(iCol)*32 + 28 /* &.colFlags */)) |= U16((COLFLAG_HIDDEN))
*(*U32)(unsafe.Pointer(pTab + 64 /* &.tabFlags */)) |= (U32(TF_HasHidden))
@@ -123502,7 +126266,7 @@ func vtabCallConstructor(tls *libc.TLS, db uintptr, pTab uintptr, pMod uintptr,
// and an error left in pParse.
//
// This call is a no-op if table pTab is not a virtual table.
-func Xsqlite3VtabCallConnect(tls *libc.TLS, pParse uintptr, pTab uintptr) int32 { /* sqlite3.c:142657:20: */
+func Xsqlite3VtabCallConnect(tls *libc.TLS, pParse uintptr, pTab uintptr) int32 { /* sqlite3.c:143832:20: */
bp := tls.Alloc(24)
defer tls.Free(24)
@@ -123521,13 +126285,13 @@ func Xsqlite3VtabCallConnect(tls *libc.TLS, pParse uintptr, pTab uintptr) int32
if !(pMod != 0) {
var zModule uintptr = *(*uintptr)(unsafe.Pointer((*Table)(unsafe.Pointer(pTab)).FazModuleArg))
- Xsqlite3ErrorMsg(tls, pParse, ts+19367 /* "no such module: ..." */, libc.VaList(bp, zModule))
+ Xsqlite3ErrorMsg(tls, pParse, ts+19851 /* "no such module: ..." */, libc.VaList(bp, zModule))
rc = SQLITE_ERROR
} else {
*(*uintptr)(unsafe.Pointer(bp + 16 /* zErr */)) = uintptr(0)
rc = vtabCallConstructor(tls, db, pTab, pMod, (*Sqlite3_module)(unsafe.Pointer((*Module)(unsafe.Pointer(pMod)).FpModule)).FxConnect, bp+16 /* &zErr */)
if rc != SQLITE_OK {
- Xsqlite3ErrorMsg(tls, pParse, ts+2718 /* "%s" */, libc.VaList(bp+8, *(*uintptr)(unsafe.Pointer(bp + 16 /* zErr */))))
+ Xsqlite3ErrorMsg(tls, pParse, ts+2790 /* "%s" */, libc.VaList(bp+8, *(*uintptr)(unsafe.Pointer(bp + 16 /* zErr */))))
(*Parse)(unsafe.Pointer(pParse)).Frc = rc
}
Xsqlite3DbFree(tls, db, *(*uintptr)(unsafe.Pointer(bp + 16 /* zErr */)))
@@ -123538,7 +126302,7 @@ func Xsqlite3VtabCallConnect(tls *libc.TLS, pParse uintptr, pTab uintptr) int32
// Grow the db->aVTrans[] array so that there is room for at least one
// more v-table. Return SQLITE_NOMEM if a malloc fails, or SQLITE_OK otherwise.
-func growVTrans(tls *libc.TLS, db uintptr) int32 { /* sqlite3.c:142692:12: */
+func growVTrans(tls *libc.TLS, db uintptr) int32 { /* sqlite3.c:143867:12: */
var ARRAY_INCR int32 = 5
// Grow the sqlite3.aVTrans array if required
@@ -123558,7 +126322,7 @@ func growVTrans(tls *libc.TLS, db uintptr) int32 { /* sqlite3.c:142692:12: */
// Add the virtual table pVTab to the array sqlite3.aVTrans[]. Space should
// have already been reserved using growVTrans().
-func addToVTrans(tls *libc.TLS, db uintptr, pVTab uintptr) { /* sqlite3.c:142715:13: */
+func addToVTrans(tls *libc.TLS, db uintptr, pVTab uintptr) { /* sqlite3.c:143890:13: */
// Add pVtab to the end of sqlite3.aVTrans
*(*uintptr)(unsafe.Pointer((*Sqlite3)(unsafe.Pointer(db)).FaVTrans + uintptr(libc.PostIncInt32(&(*Sqlite3)(unsafe.Pointer(db)).FnVTrans, 1))*8)) = pVTab
Xsqlite3VtabLock(tls, pVTab)
@@ -123570,7 +126334,7 @@ func addToVTrans(tls *libc.TLS, db uintptr, pVTab uintptr) { /* sqlite3.c:142715
// If an error occurs, *pzErr is set to point to an English language
// description of the error and an SQLITE_XXX error code is returned.
// In this case the caller must call sqlite3DbFree(db, ) on *pzErr.
-func Xsqlite3VtabCallCreate(tls *libc.TLS, db uintptr, iDb int32, zTab uintptr, pzErr uintptr) int32 { /* sqlite3.c:142729:20: */
+func Xsqlite3VtabCallCreate(tls *libc.TLS, db uintptr, iDb int32, zTab uintptr, pzErr uintptr) int32 { /* sqlite3.c:143904:20: */
bp := tls.Alloc(8)
defer tls.Free(8)
@@ -123589,7 +126353,7 @@ func Xsqlite3VtabCallCreate(tls *libc.TLS, db uintptr, iDb int32, zTab uintptr,
// invoke it now. If the module has not been registered, return an
// error. Otherwise, do nothing.
if ((pMod == uintptr(0)) || ((*Sqlite3_module)(unsafe.Pointer((*Module)(unsafe.Pointer(pMod)).FpModule)).FxCreate == uintptr(0))) || ((*Sqlite3_module)(unsafe.Pointer((*Module)(unsafe.Pointer(pMod)).FpModule)).FxDestroy == uintptr(0)) {
- *(*uintptr)(unsafe.Pointer(pzErr)) = Xsqlite3MPrintf(tls, db, ts+19367 /* "no such module: ..." */, libc.VaList(bp, zMod))
+ *(*uintptr)(unsafe.Pointer(pzErr)) = Xsqlite3MPrintf(tls, db, ts+19851 /* "no such module: ..." */, libc.VaList(bp, zMod))
rc = SQLITE_ERROR
} else {
rc = vtabCallConstructor(tls, db, pTab, pMod, (*Sqlite3_module)(unsafe.Pointer((*Module)(unsafe.Pointer(pMod)).FpModule)).FxCreate, pzErr)
@@ -123610,7 +126374,7 @@ func Xsqlite3VtabCallCreate(tls *libc.TLS, db uintptr, iDb int32, zTab uintptr,
// This function is used to set the schema of a virtual table. It is only
// valid to call this function from within the xCreate() or xConnect() of a
// virtual table module.
-func Xsqlite3_declare_vtab(tls *libc.TLS, db uintptr, zCreateTable uintptr) int32 { /* sqlite3.c:142770:16: */
+func Xsqlite3_declare_vtab(tls *libc.TLS, db uintptr, zCreateTable uintptr) int32 { /* sqlite3.c:143945:16: */
bp := tls.Alloc(424)
defer tls.Free(424)
@@ -123625,7 +126389,7 @@ func Xsqlite3_declare_vtab(tls *libc.TLS, db uintptr, zCreateTable uintptr) int3
if !(pCtx != 0) || ((*VtabCtx)(unsafe.Pointer(pCtx)).FbDeclared != 0) {
Xsqlite3Error(tls, db, SQLITE_MISUSE)
Xsqlite3_mutex_leave(tls, (*Sqlite3)(unsafe.Pointer(db)).Fmutex)
- return Xsqlite3MisuseError(tls, 142787)
+ return Xsqlite3MisuseError(tls, 143962)
}
pTab = (*VtabCtx)(unsafe.Pointer(pCtx)).FpTab
@@ -123666,7 +126430,7 @@ func Xsqlite3_declare_vtab(tls *libc.TLS, db uintptr, zCreateTable uintptr) int3
} else {
Xsqlite3ErrorWithMsg(tls, db, SQLITE_ERROR, func() uintptr {
if *(*uintptr)(unsafe.Pointer(bp + 416 /* zErr */)) != 0 {
- return ts + 2718 /* "%s" */
+ return ts + 2790 /* "%s" */
}
return uintptr(0)
}(), libc.VaList(bp, *(*uintptr)(unsafe.Pointer(bp + 416 /* zErr */))))
@@ -123691,7 +126455,7 @@ func Xsqlite3_declare_vtab(tls *libc.TLS, db uintptr, zCreateTable uintptr) int3
// when a DROP TABLE is mentioned.
//
// This call is a no-op if zTab is not a virtual table.
-func Xsqlite3VtabCallDestroy(tls *libc.TLS, db uintptr, iDb int32, zTab uintptr) int32 { /* sqlite3.c:142855:20: */
+func Xsqlite3VtabCallDestroy(tls *libc.TLS, db uintptr, iDb int32, zTab uintptr) int32 { /* sqlite3.c:144030:20: */
var rc int32 = SQLITE_OK
var pTab uintptr
@@ -123712,7 +126476,9 @@ func Xsqlite3VtabCallDestroy(tls *libc.TLS, db uintptr, iDb int32, zTab uintptr)
}
(*Table)(unsafe.Pointer(pTab)).FnTabRef++
- rc = (*(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(&xDestroy)))(tls, (*VTable)(unsafe.Pointer(p)).FpVtab)
+ rc = (*struct {
+ f func(*libc.TLS, uintptr) int32
+ })(unsafe.Pointer(&struct{ uintptr }{xDestroy})).f(tls, (*VTable)(unsafe.Pointer(p)).FpVtab)
// Remove the sqlite3_vtab* from the aVTrans[] array, if applicable
if rc == SQLITE_OK {
@@ -123732,7 +126498,7 @@ func Xsqlite3VtabCallDestroy(tls *libc.TLS, db uintptr, iDb int32, zTab uintptr)
// the offset of the method to call in the sqlite3_module structure.
//
// The array is cleared after invoking the callbacks.
-func callFinaliser(tls *libc.TLS, db uintptr, offset int32) { /* sqlite3.c:142896:13: */
+func callFinaliser(tls *libc.TLS, db uintptr, offset int32) { /* sqlite3.c:144071:13: */
var i int32
if (*Sqlite3)(unsafe.Pointer(db)).FaVTrans != 0 {
var aVTrans uintptr = (*Sqlite3)(unsafe.Pointer(db)).FaVTrans
@@ -123744,7 +126510,9 @@ func callFinaliser(tls *libc.TLS, db uintptr, offset int32) { /* sqlite3.c:14289
var x uintptr
x = *(*uintptr)(unsafe.Pointer(((*Sqlite3_vtab)(unsafe.Pointer(p)).FpModule + uintptr(offset))))
if x != 0 {
- (*(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(&x)))(tls, p)
+ (*struct {
+ f func(*libc.TLS, uintptr) int32
+ })(unsafe.Pointer(&struct{ uintptr }{x})).f(tls, p)
}
}
(*VTable)(unsafe.Pointer(pVTab)).FiSavepoint = 0
@@ -123760,7 +126528,7 @@ func callFinaliser(tls *libc.TLS, db uintptr, offset int32) { /* sqlite3.c:14289
// SQLITE_OK if all xSync operations are successful.
//
// If an error message is available, leave it in p->zErrMsg.
-func Xsqlite3VtabSync(tls *libc.TLS, db uintptr, p uintptr) int32 { /* sqlite3.c:142924:20: */
+func Xsqlite3VtabSync(tls *libc.TLS, db uintptr, p uintptr) int32 { /* sqlite3.c:144099:20: */
var i int32
var rc int32 = SQLITE_OK
var aVTrans uintptr = (*Sqlite3)(unsafe.Pointer(db)).FaVTrans
@@ -123770,7 +126538,9 @@ func Xsqlite3VtabSync(tls *libc.TLS, db uintptr, p uintptr) int32 { /* sqlite3.c
var x uintptr
var pVtab uintptr = (*VTable)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(aVTrans + uintptr(i)*8)))).FpVtab
if (pVtab != 0) && ((libc.AssignUintptr(&x, (*Sqlite3_module)(unsafe.Pointer((*Sqlite3_vtab)(unsafe.Pointer(pVtab)).FpModule)).FxSync)) != uintptr(0)) {
- rc = (*(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(&x)))(tls, pVtab)
+ rc = (*struct {
+ f func(*libc.TLS, uintptr) int32
+ })(unsafe.Pointer(&struct{ uintptr }{x})).f(tls, pVtab)
Xsqlite3VtabImportErrmsg(tls, p, pVtab)
}
}
@@ -123780,14 +126550,14 @@ func Xsqlite3VtabSync(tls *libc.TLS, db uintptr, p uintptr) int32 { /* sqlite3.c
// Invoke the xRollback method of all virtual tables in the
// sqlite3.aVTrans array. Then clear the array itself.
-func Xsqlite3VtabRollback(tls *libc.TLS, db uintptr) int32 { /* sqlite3.c:142946:20: */
+func Xsqlite3VtabRollback(tls *libc.TLS, db uintptr) int32 { /* sqlite3.c:144121:20: */
callFinaliser(tls, db, int32((uintptr(0) + 136 /* &.xRollback */)))
return SQLITE_OK
}
// Invoke the xCommit method of all virtual tables in the
// sqlite3.aVTrans array. Then clear the array itself.
-func Xsqlite3VtabCommit(tls *libc.TLS, db uintptr) int32 { /* sqlite3.c:142955:20: */
+func Xsqlite3VtabCommit(tls *libc.TLS, db uintptr) int32 { /* sqlite3.c:144130:20: */
callFinaliser(tls, db, int32((uintptr(0) + 128 /* &.xCommit */)))
return SQLITE_OK
}
@@ -123798,7 +126568,7 @@ func Xsqlite3VtabCommit(tls *libc.TLS, db uintptr) int32 { /* sqlite3.c:142955:2
//
// If the xBegin call is successful, place the sqlite3_vtab pointer
// in the sqlite3.aVTrans array.
-func Xsqlite3VtabBegin(tls *libc.TLS, db uintptr, pVTab uintptr) int32 { /* sqlite3.c:142968:20: */
+func Xsqlite3VtabBegin(tls *libc.TLS, db uintptr, pVTab uintptr) int32 { /* sqlite3.c:144143:20: */
var rc int32 = SQLITE_OK
var pModule uintptr
@@ -123828,13 +126598,17 @@ func Xsqlite3VtabBegin(tls *libc.TLS, db uintptr, pVTab uintptr) int32 { /* sqli
// sqlite3.aVTrans[] array.
rc = growVTrans(tls, db)
if rc == SQLITE_OK {
- rc = (*(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer((pModule + 112 /* &.xBegin */))))(tls, (*VTable)(unsafe.Pointer(pVTab)).FpVtab)
+ rc = (*struct {
+ f func(*libc.TLS, uintptr) int32
+ })(unsafe.Pointer(&struct{ uintptr }{(*Sqlite3_module)(unsafe.Pointer(pModule)).FxBegin})).f(tls, (*VTable)(unsafe.Pointer(pVTab)).FpVtab)
if rc == SQLITE_OK {
var iSvpt int32 = ((*Sqlite3)(unsafe.Pointer(db)).FnStatement + (*Sqlite3)(unsafe.Pointer(db)).FnSavepoint)
addToVTrans(tls, db, pVTab)
if (iSvpt != 0) && ((*Sqlite3_module)(unsafe.Pointer(pModule)).FxSavepoint != 0) {
(*VTable)(unsafe.Pointer(pVTab)).FiSavepoint = iSvpt
- rc = (*(*func(*libc.TLS, uintptr, int32) int32)(unsafe.Pointer((pModule + 160 /* &.xSavepoint */))))(tls, (*VTable)(unsafe.Pointer(pVTab)).FpVtab, (iSvpt - 1))
+ rc = (*struct {
+ f func(*libc.TLS, uintptr, int32) int32
+ })(unsafe.Pointer(&struct{ uintptr }{(*Sqlite3_module)(unsafe.Pointer(pModule)).FxSavepoint})).f(tls, (*VTable)(unsafe.Pointer(pVTab)).FpVtab, (iSvpt - 1))
}
}
}
@@ -123855,7 +126629,7 @@ func Xsqlite3VtabBegin(tls *libc.TLS, db uintptr, pVTab uintptr) int32 { /* sqli
// processing is abandoned and the error returned to the caller of this
// function immediately. If all calls to virtual table methods are successful,
// SQLITE_OK is returned.
-func Xsqlite3VtabSavepoint(tls *libc.TLS, db uintptr, op int32, iSavepoint int32) int32 { /* sqlite3.c:143028:20: */
+func Xsqlite3VtabSavepoint(tls *libc.TLS, db uintptr, op int32, iSavepoint int32) int32 { /* sqlite3.c:144203:20: */
var rc int32 = SQLITE_OK
if (*Sqlite3)(unsafe.Pointer(db)).FaVTrans != 0 {
@@ -123881,7 +126655,9 @@ func Xsqlite3VtabSavepoint(tls *libc.TLS, db uintptr, op int32, iSavepoint int32
break
}
if (xMethod != 0) && ((*VTable)(unsafe.Pointer(pVTab)).FiSavepoint > iSavepoint) {
- rc = (*(*func(*libc.TLS, uintptr, int32) int32)(unsafe.Pointer(&xMethod)))(tls, (*VTable)(unsafe.Pointer(pVTab)).FpVtab, iSavepoint)
+ rc = (*struct {
+ f func(*libc.TLS, uintptr, int32) int32
+ })(unsafe.Pointer(&struct{ uintptr }{xMethod})).f(tls, (*VTable)(unsafe.Pointer(pVTab)).FpVtab, iSavepoint)
}
Xsqlite3VtabUnlock(tls, pVTab)
}
@@ -123901,7 +126677,7 @@ func Xsqlite3VtabSavepoint(tls *libc.TLS, db uintptr, op int32, iSavepoint int32
// Return either the pDef argument (indicating no change) or a
// new FuncDef structure that is marked as ephemeral using the
// SQLITE_FUNC_EPHEM flag.
-func Xsqlite3VtabOverloadFunction(tls *libc.TLS, db uintptr, pDef uintptr, nArg int32, pExpr uintptr) uintptr { /* sqlite3.c:143076:24: */
+func Xsqlite3VtabOverloadFunction(tls *libc.TLS, db uintptr, pDef uintptr, nArg int32, pExpr uintptr) uintptr { /* sqlite3.c:144251:24: */
bp := tls.Alloc(16)
defer tls.Free(16)
@@ -123940,7 +126716,9 @@ func Xsqlite3VtabOverloadFunction(tls *libc.TLS, db uintptr, pDef uintptr, nArg
// Though undocumented, we have historically always invoked xFindFunction
// with an all lower-case function name. Continue in this tradition to
// avoid any chance of an incompatibility.
- rc = (*(*func(*libc.TLS, uintptr, int32, uintptr, uintptr, uintptr) int32)(unsafe.Pointer((pMod + 144 /* &.xFindFunction */))))(tls, pVtab, nArg, (*FuncDef)(unsafe.Pointer(pDef)).FzName, bp /* &xSFunc */, bp+8 /* &pArg */)
+ rc = (*struct {
+ f func(*libc.TLS, uintptr, int32, uintptr, uintptr, uintptr) int32
+ })(unsafe.Pointer(&struct{ uintptr }{(*Sqlite3_module)(unsafe.Pointer(pMod)).FxFindFunction})).f(tls, pVtab, nArg, (*FuncDef)(unsafe.Pointer(pDef)).FzName, bp /* &xSFunc */, bp+8 /* &pArg */)
if rc == 0 {
return pDef
}
@@ -123965,7 +126743,7 @@ func Xsqlite3VtabOverloadFunction(tls *libc.TLS, db uintptr, pDef uintptr, nArg
// array so that an OP_VBegin will get generated for it. Add pTab to the
// array if it is missing. If pTab is already in the array, this routine
// is a no-op.
-func Xsqlite3VtabMakeWritable(tls *libc.TLS, pParse uintptr, pTab uintptr) { /* sqlite3.c:143145:21: */
+func Xsqlite3VtabMakeWritable(tls *libc.TLS, pParse uintptr, pTab uintptr) { /* sqlite3.c:144320:21: */
var pToplevel uintptr = func() uintptr {
if (*Parse)(unsafe.Pointer(pParse)).FpToplevel != 0 {
return (*Parse)(unsafe.Pointer(pParse)).FpToplevel
@@ -124003,7 +126781,7 @@ func Xsqlite3VtabMakeWritable(tls *libc.TLS, pParse uintptr, pTab uintptr) { /*
//
// Any virtual table module for which xConnect and xCreate are the same
// method can have an eponymous virtual table instance.
-func Xsqlite3VtabEponymousTableInit(tls *libc.TLS, pParse uintptr, pMod uintptr) int32 { /* sqlite3.c:143178:20: */
+func Xsqlite3VtabEponymousTableInit(tls *libc.TLS, pParse uintptr, pMod uintptr) int32 { /* sqlite3.c:144353:20: */
bp := tls.Alloc(16)
defer tls.Free(16)
@@ -124032,12 +126810,13 @@ func Xsqlite3VtabEponymousTableInit(tls *libc.TLS, pParse uintptr, pMod uintptr)
(*Table)(unsafe.Pointer(pTab)).FpSchema = (*Db)(unsafe.Pointer((*Sqlite3)(unsafe.Pointer(db)).FaDb)).FpSchema
(*Table)(unsafe.Pointer(pTab)).FiPKey = int16(-1)
+ *(*U32)(unsafe.Pointer(pTab + 64 /* &.tabFlags */)) |= (U32(TF_Eponymous))
addModuleArgument(tls, pParse, pTab, Xsqlite3DbStrDup(tls, db, (*Table)(unsafe.Pointer(pTab)).FzName))
addModuleArgument(tls, pParse, pTab, uintptr(0))
addModuleArgument(tls, pParse, pTab, Xsqlite3DbStrDup(tls, db, (*Table)(unsafe.Pointer(pTab)).FzName))
rc = vtabCallConstructor(tls, db, pTab, pMod, (*Sqlite3_module)(unsafe.Pointer(pModule)).FxConnect, bp+8 /* &zErr */)
if rc != 0 {
- Xsqlite3ErrorMsg(tls, pParse, ts+2718 /* "%s" */, libc.VaList(bp, *(*uintptr)(unsafe.Pointer(bp + 8 /* zErr */))))
+ Xsqlite3ErrorMsg(tls, pParse, ts+2790 /* "%s" */, libc.VaList(bp, *(*uintptr)(unsafe.Pointer(bp + 8 /* zErr */))))
Xsqlite3DbFree(tls, db, *(*uintptr)(unsafe.Pointer(bp + 8 /* zErr */)))
Xsqlite3VtabEponymousTableClear(tls, db, pMod)
return 0
@@ -124047,7 +126826,7 @@ func Xsqlite3VtabEponymousTableInit(tls *libc.TLS, pParse uintptr, pMod uintptr)
// Erase the eponymous virtual table instance associated with
// virtual table module pMod, if it exists.
-func Xsqlite3VtabEponymousTableClear(tls *libc.TLS, db uintptr, pMod uintptr) { /* sqlite3.c:143215:21: */
+func Xsqlite3VtabEponymousTableClear(tls *libc.TLS, db uintptr, pMod uintptr) { /* sqlite3.c:144391:21: */
var pTab uintptr = (*Module)(unsafe.Pointer(pMod)).FpEpoTab
if pTab != uintptr(0) {
// Mark the table as Ephemeral prior to deleting it, so that the
@@ -124064,19 +126843,19 @@ func Xsqlite3VtabEponymousTableClear(tls *libc.TLS, db uintptr, pMod uintptr) {
//
// The results of this routine are undefined unless it is called from
// within an xUpdate method.
-func Xsqlite3_vtab_on_conflict(tls *libc.TLS, db uintptr) int32 { /* sqlite3.c:143234:16: */
+func Xsqlite3_vtab_on_conflict(tls *libc.TLS, db uintptr) int32 { /* sqlite3.c:144410:16: */
return int32(aMap[(int32((*Sqlite3)(unsafe.Pointer(db)).FvtabOnConflict) - 1)])
}
var aMap = [5]uint8{
uint8(SQLITE_ROLLBACK), uint8(SQLITE_ABORT), uint8(SQLITE_FAIL), uint8(SQLITE_IGNORE), uint8(SQLITE_REPLACE),
-} /* sqlite3.c:143235:30 */
+} /* sqlite3.c:144411:30 */
// Call from within the xCreate() or xConnect() methods to provide
// the SQLite core with additional information about the behavior
// of the virtual table being implemented.
-func Xsqlite3_vtab_config(tls *libc.TLS, db uintptr, op int32, va uintptr) int32 { /* sqlite3.c:143252:16: */
+func Xsqlite3_vtab_config(tls *libc.TLS, db uintptr, op int32, va uintptr) int32 { /* sqlite3.c:144428:16: */
var ap Va_list
_ = ap
var rc int32 = SQLITE_OK
@@ -124085,7 +126864,7 @@ func Xsqlite3_vtab_config(tls *libc.TLS, db uintptr, op int32, va uintptr) int32
Xsqlite3_mutex_enter(tls, (*Sqlite3)(unsafe.Pointer(db)).Fmutex)
p = (*Sqlite3)(unsafe.Pointer(db)).FpVtabCtx
if !(p != 0) {
- rc = Xsqlite3MisuseError(tls, 143263)
+ rc = Xsqlite3MisuseError(tls, 144439)
} else {
ap = va
@@ -124113,7 +126892,7 @@ func Xsqlite3_vtab_config(tls *libc.TLS, db uintptr, op int32, va uintptr) int32
fallthrough
default:
{
- rc = Xsqlite3MisuseError(tls, 143281)
+ rc = Xsqlite3MisuseError(tls, 144457)
break
}
@@ -124167,17 +126946,17 @@ func Xsqlite3_vtab_config(tls *libc.TLS, db uintptr, op int32, va uintptr) int32
// Forward references
type WhereClause1 = struct {
- FpWInfo uintptr
- FpOuter uintptr
- Fop U8
- FhasOr U8
- _ [2]byte
- FnTerm int32
- FnSlot int32
- _ [4]byte
- Fa uintptr
- FaStatic [8]WhereTerm
-} /* sqlite3.c:14827:9 */
+ FpWInfo uintptr
+ FpOuter uintptr
+ Fop U8
+ FhasOr U8
+ F__ccgo_pad1 [2]byte
+ FnTerm int32
+ FnSlot int32
+ F__ccgo_pad2 [4]byte
+ Fa uintptr
+ FaStatic [8]WhereTerm
+} /* sqlite3.c:14936:9 */
//************* End of vtab.c ***********************************************
//************* Begin file wherecode.c **************************************
@@ -124217,23 +126996,23 @@ type WhereClause1 = struct {
// a separate source file for easier editing.
// Forward references
-type WhereClause = WhereClause1 /* sqlite3.c:143341:28 */
+type WhereClause = WhereClause1 /* sqlite3.c:144517:28 */
type WhereMaskSet1 = struct {
FbVarSelect int32
Fn int32
Fix [64]int32
-} /* sqlite3.c:14827:9 */
+} /* sqlite3.c:14936:9 */
-type WhereMaskSet = WhereMaskSet1 /* sqlite3.c:143342:29 */
+type WhereMaskSet = WhereMaskSet1 /* sqlite3.c:144518:29 */
type WhereOrInfo1 = struct {
Fwc WhereClause
Findexable Bitmask
-} /* sqlite3.c:143343:9 */
+} /* sqlite3.c:144519:9 */
-type WhereOrInfo = WhereOrInfo1 /* sqlite3.c:143343:28 */
-type WhereAndInfo1 = struct{ Fwc WhereClause } /* sqlite3.c:143344:9 */
+type WhereOrInfo = WhereOrInfo1 /* sqlite3.c:144519:28 */
+type WhereAndInfo1 = struct{ Fwc WhereClause } /* sqlite3.c:144520:9 */
-type WhereAndInfo = WhereAndInfo1 /* sqlite3.c:143344:29 */
+type WhereAndInfo = WhereAndInfo1 /* sqlite3.c:144520:29 */
type WhereLevel1 = struct {
FiLeftJoin int32
FiTabCur int32
@@ -124254,16 +127033,16 @@ type WhereLevel1 = struct {
Fp2 int32
Fu struct {
Fin struct {
- FnIn int32
- _ [4]byte
- FaInLoop uintptr
+ FnIn int32
+ F__ccgo_pad1 [4]byte
+ FaInLoop uintptr
}
}
FpWLoop uintptr
FnotReady Bitmask
-} /* sqlite3.c:14827:9 */
+} /* sqlite3.c:14936:9 */
-type WhereLevel = WhereLevel1 /* sqlite3.c:143345:27 */
+type WhereLevel = WhereLevel1 /* sqlite3.c:144521:27 */
type WhereLoop1 = struct {
Fprereq Bitmask
FmaskSelf Bitmask
@@ -124285,25 +127064,25 @@ type WhereLoop1 = struct {
FnLTerm U16
FnSkip U16
FnLSlot U16
- _ [6]byte
+ F__ccgo_pad1 [6]byte
FaLTerm uintptr
FpNextLoop uintptr
FaLTermSpace [3]uintptr
-} /* sqlite3.c:14827:9 */
+} /* sqlite3.c:14936:9 */
-type WhereLoop = WhereLoop1 /* sqlite3.c:143346:26 */
+type WhereLoop = WhereLoop1 /* sqlite3.c:144522:26 */
type WherePath1 = struct {
- FmaskLoop Bitmask
- FrevLoop Bitmask
- FnRow LogEst
- FrCost LogEst
- FrUnsorted LogEst
- FisOrdered I8
- _ [1]byte
- FaLoop uintptr
-} /* sqlite3.c:143347:9 */
-
-type WherePath = WherePath1 /* sqlite3.c:143347:26 */
+ FmaskLoop Bitmask
+ FrevLoop Bitmask
+ FnRow LogEst
+ FrCost LogEst
+ FrUnsorted LogEst
+ FisOrdered I8
+ F__ccgo_pad1 [1]byte
+ FaLoop uintptr
+} /* sqlite3.c:144523:9 */
+
+type WherePath = WherePath1 /* sqlite3.c:144523:26 */
type WhereTerm1 = struct {
FpExpr uintptr
FpWC uintptr
@@ -124315,65 +127094,65 @@ type WhereTerm1 = struct {
FiParent int32
FleftCursor int32
Fu struct {
- _ [0]uint64
- Fx struct {
+ F__ccgo_pad1 [0]uint64
+ Fx struct {
FleftColumn int32
FiField int32
}
}
FprereqRight Bitmask
FprereqAll Bitmask
-} /* sqlite3.c:14827:9 */
+} /* sqlite3.c:14936:9 */
-type WhereTerm = WhereTerm1 /* sqlite3.c:143348:26 */
+type WhereTerm = WhereTerm1 /* sqlite3.c:144524:26 */
type WhereLoopBuilder1 = struct {
- FpWInfo uintptr
- FpWC uintptr
- FpOrderBy uintptr
- FpNew uintptr
- FpOrSet uintptr
- FpRec uintptr
- FnRecValid int32
- FbldFlags1 uint8
- FbldFlags2 uint8
- _ [2]byte
- FiPlanLimit uint32
- _ [4]byte
-} /* sqlite3.c:143349:9 */
-
-type WhereLoopBuilder = WhereLoopBuilder1 /* sqlite3.c:143349:33 */
+ FpWInfo uintptr
+ FpWC uintptr
+ FpOrderBy uintptr
+ FpNew uintptr
+ FpOrSet uintptr
+ FpRec uintptr
+ FnRecValid int32
+ FbldFlags1 uint8
+ FbldFlags2 uint8
+ F__ccgo_pad1 [2]byte
+ FiPlanLimit uint32
+ F__ccgo_pad2 [4]byte
+} /* sqlite3.c:144525:9 */
+
+type WhereLoopBuilder = WhereLoopBuilder1 /* sqlite3.c:144525:33 */
type WhereScan1 = struct {
- FpOrigWC uintptr
- FpWC uintptr
- FzCollName uintptr
- FpIdxExpr uintptr
- Fidxaff int8
- FnEquiv uint8
- FiEquiv uint8
- _ [1]byte
- FopMask U32
- Fk int32
- FaiCur [11]int32
- FaiColumn [11]I16
- _ [2]byte
-} /* sqlite3.c:143350:9 */
-
-type WhereScan = WhereScan1 /* sqlite3.c:143350:26 */
+ FpOrigWC uintptr
+ FpWC uintptr
+ FzCollName uintptr
+ FpIdxExpr uintptr
+ Fidxaff uint8
+ FnEquiv uint8
+ FiEquiv uint8
+ F__ccgo_pad1 [1]byte
+ FopMask U32
+ Fk int32
+ FaiCur [11]int32
+ FaiColumn [11]I16
+ F__ccgo_pad2 [2]byte
+} /* sqlite3.c:144526:9 */
+
+type WhereScan = WhereScan1 /* sqlite3.c:144526:26 */
type WhereOrCost1 = struct {
- Fprereq Bitmask
- FrRun LogEst
- FnOut LogEst
- _ [4]byte
-} /* sqlite3.c:143349:9 */
+ Fprereq Bitmask
+ FrRun LogEst
+ FnOut LogEst
+ F__ccgo_pad1 [4]byte
+} /* sqlite3.c:144525:9 */
-type WhereOrCost = WhereOrCost1 /* sqlite3.c:143351:28 */
+type WhereOrCost = WhereOrCost1 /* sqlite3.c:144527:28 */
type WhereOrSet1 = struct {
- Fn U16
- _ [6]byte
- Fa [3]WhereOrCost
-} /* sqlite3.c:143349:9 */
+ Fn U16
+ F__ccgo_pad1 [6]byte
+ Fa [3]WhereOrCost
+} /* sqlite3.c:144525:9 */
-type WhereOrSet = WhereOrSet1 /* sqlite3.c:143352:27 */
+type WhereOrSet = WhereOrSet1 /* sqlite3.c:144528:27 */
// This object contains information needed to implement a single nested
// loop in WHERE clause.
@@ -124389,13 +127168,13 @@ type WhereOrSet = WhereOrSet1 /* sqlite3.c:143352:27 */
// the loop nested order, with WhereInfo.a[0] being the outer loop and
// WhereInfo.a[WhereInfo.nLevel-1] being the inner loop.
type InLoop = struct {
- FiCur int32
- FaddrInTop int32
- FiBase int32
- FnPrefix int32
- FeEndLoopOp U8
- _ [3]byte
-} /* sqlite3.c:143391:7 */
+ FiCur int32
+ FaddrInTop int32
+ FiBase int32
+ FnPrefix int32
+ FeEndLoopOp U8
+ F__ccgo_pad1 [3]byte
+} /* sqlite3.c:144567:7 */
// Allowed values for WhereLoopBuider.bldFlags
@@ -124421,7 +127200,7 @@ type WhereExprMod1 = struct {
FpNext uintptr
FpExpr uintptr
Forig Expr
-} /* sqlite3.c:14827:9 */
+} /* sqlite3.c:14936:9 */
// Allowed values for WhereLoopBuider.bldFlags
@@ -124443,7 +127222,7 @@ type WhereExprMod1 = struct {
// of an index rather than an expression or a virtual column. All
// such transformations need to be undone at the end of WHERE clause
// processing.
-type WhereExprMod = WhereExprMod1 /* sqlite3.c:143755:29 */
+type WhereExprMod = WhereExprMod1 /* sqlite3.c:144931:29 */
// Bitmasks for the operators on WhereTerm objects. These are all
// operators that are of interest to the query planner. An
@@ -124465,13 +127244,13 @@ type WhereExprMod = WhereExprMod1 /* sqlite3.c:143755:29 */
//************* Continuing where we left off in wherecode.c *****************
// Return the name of the i-th column of the pIdx index.
-func explainIndexColumnName(tls *libc.TLS, pIdx uintptr, i int32) uintptr { /* sqlite3.c:143935:19: */
+func explainIndexColumnName(tls *libc.TLS, pIdx uintptr, i int32) uintptr { /* sqlite3.c:145112:19: */
i = int32(*(*I16)(unsafe.Pointer((*Index)(unsafe.Pointer(pIdx)).FaiColumn + uintptr(i)*2)))
if i == (-2) {
- return ts + 19386 /* "" */
+ return ts + 19870 /* "" */
}
if i == (-1) {
- return ts + 14302 /* "rowid" */
+ return ts + 14757 /* "rowid" */
}
return (*Column)(unsafe.Pointer((*Table)(unsafe.Pointer((*Index)(unsafe.Pointer(pIdx)).FpTable)).FaCol + uintptr(i)*32)).FzName
}
@@ -124482,39 +127261,39 @@ func explainIndexColumnName(tls *libc.TLS, pIdx uintptr, i int32) uintptr { /* s
// at a time. This routine adds a new term to the end of the expression.
// Terms are separated by AND so add the "AND" text for second and subsequent
// terms only.
-func explainAppendTerm(tls *libc.TLS, pStr uintptr, pIdx uintptr, nTerm int32, iTerm int32, bAnd int32, zOp uintptr) { /* sqlite3.c:143950:13: */
+func explainAppendTerm(tls *libc.TLS, pStr uintptr, pIdx uintptr, nTerm int32, iTerm int32, bAnd int32, zOp uintptr) { /* sqlite3.c:145127:13: */
var i int32
if bAnd != 0 {
- Xsqlite3_str_append(tls, pStr, ts+19393 /* " AND " */, 5)
+ Xsqlite3_str_append(tls, pStr, ts+19877 /* " AND " */, 5)
}
if nTerm > 1 {
- Xsqlite3_str_append(tls, pStr, ts+19399 /* "(" */, 1)
+ Xsqlite3_str_append(tls, pStr, ts+19883 /* "(" */, 1)
}
for i = 0; i < nTerm; i++ {
if i != 0 {
- Xsqlite3_str_append(tls, pStr, ts+11084 /* "," */, 1)
+ Xsqlite3_str_append(tls, pStr, ts+11537 /* "," */, 1)
}
Xsqlite3_str_appendall(tls, pStr, explainIndexColumnName(tls, pIdx, (iTerm+i)))
}
if nTerm > 1 {
- Xsqlite3_str_append(tls, pStr, ts+3935 /* ")" */, 1)
+ Xsqlite3_str_append(tls, pStr, ts+4066 /* ")" */, 1)
}
Xsqlite3_str_append(tls, pStr, zOp, 1)
if nTerm > 1 {
- Xsqlite3_str_append(tls, pStr, ts+19399 /* "(" */, 1)
+ Xsqlite3_str_append(tls, pStr, ts+19883 /* "(" */, 1)
}
for i = 0; i < nTerm; i++ {
if i != 0 {
- Xsqlite3_str_append(tls, pStr, ts+11084 /* "," */, 1)
+ Xsqlite3_str_append(tls, pStr, ts+11537 /* "," */, 1)
}
- Xsqlite3_str_append(tls, pStr, ts+3991 /* "?" */, 1)
+ Xsqlite3_str_append(tls, pStr, ts+4122 /* "?" */, 1)
}
if nTerm > 1 {
- Xsqlite3_str_append(tls, pStr, ts+3935 /* ")" */, 1)
+ Xsqlite3_str_append(tls, pStr, ts+4066 /* ")" */, 1)
}
}
@@ -124530,7 +127309,7 @@ func explainAppendTerm(tls *libc.TLS, pStr uintptr, pIdx uintptr, nTerm int32, i
// string similar to:
//
// "a=? AND b>?"
-func explainIndexRange(tls *libc.TLS, pStr uintptr, pLoop uintptr) { /* sqlite3.c:143994:13: */
+func explainIndexRange(tls *libc.TLS, pStr uintptr, pLoop uintptr) { /* sqlite3.c:145171:13: */
bp := tls.Alloc(8)
defer tls.Free(8)
@@ -124543,29 +127322,29 @@ func explainIndexRange(tls *libc.TLS, pStr uintptr, pLoop uintptr) { /* sqlite3.
if (int32(nEq) == 0) && (((*WhereLoop)(unsafe.Pointer(pLoop)).FwsFlags & (U32(WHERE_BTM_LIMIT | WHERE_TOP_LIMIT))) == U32(0)) {
return
}
- Xsqlite3_str_append(tls, pStr, ts+19401 /* " (" */, 2)
+ Xsqlite3_str_append(tls, pStr, ts+19885 /* " (" */, 2)
for i = 0; i < int32(nEq); i++ {
var z uintptr = explainIndexColumnName(tls, pIndex, i)
if i != 0 {
- Xsqlite3_str_append(tls, pStr, ts+19393 /* " AND " */, 5)
+ Xsqlite3_str_append(tls, pStr, ts+19877 /* " AND " */, 5)
}
Xsqlite3_str_appendf(tls, pStr, func() uintptr {
if i >= int32(nSkip) {
- return ts + 19404 /* "%s=?" */
+ return ts + 19888 /* "%s=?" */
}
- return ts + 19409 /* "ANY(%s)" */
+ return ts + 19893 /* "ANY(%s)" */
}(), libc.VaList(bp, z))
}
j = i
if ((*WhereLoop)(unsafe.Pointer(pLoop)).FwsFlags & U32(WHERE_BTM_LIMIT)) != 0 {
- explainAppendTerm(tls, pStr, pIndex, int32(*(*U16)(unsafe.Pointer(pLoop + 24 /* &.u */ /* &.btree */ + 2 /* &.nBtm */))), j, i, ts+19417 /* ">" */)
+ explainAppendTerm(tls, pStr, pIndex, int32(*(*U16)(unsafe.Pointer(pLoop + 24 /* &.u */ /* &.btree */ + 2 /* &.nBtm */))), j, i, ts+19901 /* ">" */)
i = 1
}
if ((*WhereLoop)(unsafe.Pointer(pLoop)).FwsFlags & U32(WHERE_TOP_LIMIT)) != 0 {
- explainAppendTerm(tls, pStr, pIndex, int32(*(*U16)(unsafe.Pointer(pLoop + 24 /* &.u */ /* &.btree */ + 4 /* &.nTop */))), j, i, ts+19419 /* "<" */)
+ explainAppendTerm(tls, pStr, pIndex, int32(*(*U16)(unsafe.Pointer(pLoop + 24 /* &.u */ /* &.btree */ + 4 /* &.nTop */))), j, i, ts+19903 /* "<" */)
}
- Xsqlite3_str_append(tls, pStr, ts+3935 /* ")" */, 1)
+ Xsqlite3_str_append(tls, pStr, ts+4066 /* ")" */, 1)
}
// This function is a no-op unless currently processing an EXPLAIN QUERY PLAN
@@ -124575,9 +127354,9 @@ func explainIndexRange(tls *libc.TLS, pStr uintptr, pLoop uintptr) { /* sqlite3.
//
// If an OP_Explain opcode is added to the VM, its address is returned.
// Otherwise, if no OP_Explain is coded, zero is returned.
-func Xsqlite3WhereExplainOneScan(tls *libc.TLS, pParse uintptr, pTabList uintptr, pLevel uintptr, wctrlFlags U16) int32 { /* sqlite3.c:144028:20: */
- bp := tls.Alloc(188)
- defer tls.Free(188)
+func Xsqlite3WhereExplainOneScan(tls *libc.TLS, pParse uintptr, pTabList uintptr, pLevel uintptr, wctrlFlags U16) int32 { /* sqlite3.c:145205:20: */
+ bp := tls.Alloc(180)
+ defer tls.Free(180)
var ret int32 = 0
if int32((*Parse)(unsafe.Pointer((func() uintptr {
@@ -124593,9 +127372,9 @@ func Xsqlite3WhereExplainOneScan(tls *libc.TLS, pParse uintptr, pTabList uintptr
var pLoop uintptr // The controlling WhereLoop object
var flags U32 // Flags that describe this loop
var zMsg uintptr // Text to add to EQP output
- // var str StrAccum at bp+56, 32
+ // var str StrAccum at bp+48, 32
// EQP output string
- // var zBuf [100]int8 at bp+88, 100
+ // var zBuf [100]uint8 at bp+80, 100
// Initial space for EQP output string
pLoop = (*WhereLevel)(unsafe.Pointer(pLevel)).FpWLoop
@@ -124608,65 +127387,57 @@ func Xsqlite3WhereExplainOneScan(tls *libc.TLS, pParse uintptr, pTabList uintptr
(((flags & U32(WHERE_VIRTUALTABLE)) == U32(0)) && (int32(*(*U16)(unsafe.Pointer((pLoop + 24 /* &.u */ /* &.btree */) /* &.nEq */))) > 0))) ||
((int32(wctrlFlags) & (WHERE_ORDERBY_MIN | WHERE_ORDERBY_MAX)) != 0)))
- Xsqlite3StrAccumInit(tls, bp+56 /* &str */, db, bp+88 /* &zBuf[0] */, int32(unsafe.Sizeof([100]int8{})), SQLITE_MAX_LENGTH)
- Xsqlite3_str_appendall(tls, bp+56 /* &str */, func() uintptr {
+ Xsqlite3StrAccumInit(tls, bp+48 /* &str */, db, bp+80 /* &zBuf[0] */, int32(unsafe.Sizeof([100]uint8{})), SQLITE_MAX_LENGTH)
+ (*StrAccum)(unsafe.Pointer(bp + 48 /* &str */)).FprintfFlags = U8(SQLITE_PRINTF_INTERNAL)
+ Xsqlite3_str_appendf(tls, bp+48 /* &str */, ts+19905 /* "%s %S" */, libc.VaList(bp, func() uintptr {
if isSearch != 0 {
- return ts + 19421 /* "SEARCH" */
+ return ts + 19911 /* "SEARCH" */
}
- return ts + 19428 /* "SCAN" */
- }())
- if (*SrcItem)(unsafe.Pointer(pItem)).FpSelect != 0 {
- Xsqlite3_str_appendf(tls, bp+56 /* &str */, ts+19433 /* " SUBQUERY %u" */, libc.VaList(bp, (*Select)(unsafe.Pointer((*SrcItem)(unsafe.Pointer(pItem)).FpSelect)).FselId))
- } else {
- Xsqlite3_str_appendf(tls, bp+56 /* &str */, ts+19446 /* " TABLE %s" */, libc.VaList(bp+8, (*SrcItem)(unsafe.Pointer(pItem)).FzName))
- }
-
- if (*SrcItem)(unsafe.Pointer(pItem)).FzAlias != 0 {
- Xsqlite3_str_appendf(tls, bp+56 /* &str */, ts+19456 /* " AS %s" */, libc.VaList(bp+16, (*SrcItem)(unsafe.Pointer(pItem)).FzAlias))
- }
+ return ts + 19918 /* "SCAN" */
+ }(), pItem))
if (flags & (U32(WHERE_IPK | WHERE_VIRTUALTABLE))) == U32(0) {
var zFmt uintptr = uintptr(0)
var pIdx uintptr
pIdx = *(*uintptr)(unsafe.Pointer(pLoop + 24 /* &.u */ /* &.btree */ + 8 /* &.pIndex */))
- if !(((*Table)(unsafe.Pointer(((*SrcItem)(unsafe.Pointer(pItem)).FpTab))).FtabFlags & U32(TF_WithoutRowid)) == U32(0)) && ((int32(*(*uint16)(unsafe.Pointer((pIdx) + 100 /* &.idxType */)) >> 14 & 0x3)) == SQLITE_IDXTYPE_PRIMARYKEY) {
+ if !(((*Table)(unsafe.Pointer(((*SrcItem)(unsafe.Pointer(pItem)).FpTab))).FtabFlags & U32(TF_WithoutRowid)) == U32(0)) && ((int32(*(*uint16)(unsafe.Pointer((pIdx) + 100 /* &.idxType */)) & 0xc000 >> 14)) == SQLITE_IDXTYPE_PRIMARYKEY) {
if isSearch != 0 {
- zFmt = ts + 9264 /* "PRIMARY KEY" */
+ zFmt = ts + 9700 /* "PRIMARY KEY" */
}
} else if (flags & U32(WHERE_PARTIALIDX)) != 0 {
- zFmt = ts + 19463 /* "AUTOMATIC PARTIA..." */
+ zFmt = ts + 19923 /* "AUTOMATIC PARTIA..." */
} else if (flags & U32(WHERE_AUTO_INDEX)) != 0 {
- zFmt = ts + 19496 /* "AUTOMATIC COVERI..." */
+ zFmt = ts + 19956 /* "AUTOMATIC COVERI..." */
} else if (flags & U32(WHERE_IDX_ONLY)) != 0 {
- zFmt = ts + 19521 /* "COVERING INDEX %..." */
+ zFmt = ts + 19981 /* "COVERING INDEX %..." */
} else {
- zFmt = ts + 19539 /* "INDEX %s" */
+ zFmt = ts + 19999 /* "INDEX %s" */
}
if zFmt != 0 {
- Xsqlite3_str_append(tls, bp+56 /* &str */, ts+19548 /* " USING " */, 7)
- Xsqlite3_str_appendf(tls, bp+56 /* &str */, zFmt, libc.VaList(bp+24, (*Index)(unsafe.Pointer(pIdx)).FzName))
- explainIndexRange(tls, bp+56 /* &str */, pLoop)
+ Xsqlite3_str_append(tls, bp+48 /* &str */, ts+20008 /* " USING " */, 7)
+ Xsqlite3_str_appendf(tls, bp+48 /* &str */, zFmt, libc.VaList(bp+16, (*Index)(unsafe.Pointer(pIdx)).FzName))
+ explainIndexRange(tls, bp+48 /* &str */, pLoop)
}
} else if ((flags & U32(WHERE_IPK)) != U32(0)) && ((flags & U32(WHERE_CONSTRAINT)) != U32(0)) {
var zRangeOp uintptr
if (flags & (U32(WHERE_COLUMN_EQ | WHERE_COLUMN_IN))) != 0 {
- zRangeOp = ts + 19556 /* "=" */
+ zRangeOp = ts + 20016 /* "=" */
} else if (flags & U32(WHERE_BOTH_LIMIT)) == U32(WHERE_BOTH_LIMIT) {
- zRangeOp = ts + 19558 /* ">? AND rowid<" */
+ zRangeOp = ts + 20018 /* ">? AND rowid<" */
} else if (flags & U32(WHERE_BTM_LIMIT)) != 0 {
- zRangeOp = ts + 19417 /* ">" */
+ zRangeOp = ts + 19901 /* ">" */
} else {
- zRangeOp = ts + 19419 /* "<" */
+ zRangeOp = ts + 19903 /* "<" */
}
- Xsqlite3_str_appendf(tls, bp+56, /* &str */
- ts+19572 /* " USING INTEGER P..." */, libc.VaList(bp+32, zRangeOp))
+ Xsqlite3_str_appendf(tls, bp+48, /* &str */
+ ts+20032 /* " USING INTEGER P..." */, libc.VaList(bp+24, zRangeOp))
} else if (flags & U32(WHERE_VIRTUALTABLE)) != U32(0) {
- Xsqlite3_str_appendf(tls, bp+56 /* &str */, ts+19610, /* " VIRTUAL TABLE I..." */
- libc.VaList(bp+40, *(*int32)(unsafe.Pointer(pLoop + 24 /* &.u */ /* &.vtab */ /* &.idxNum */)), *(*uintptr)(unsafe.Pointer(pLoop + 24 /* &.u */ /* &.vtab */ + 8 /* &.idxStr */))))
+ Xsqlite3_str_appendf(tls, bp+48 /* &str */, ts+20070, /* " VIRTUAL TABLE I..." */
+ libc.VaList(bp+32, *(*int32)(unsafe.Pointer(pLoop + 24 /* &.u */ /* &.vtab */ /* &.idxNum */)), *(*uintptr)(unsafe.Pointer(pLoop + 24 /* &.u */ /* &.vtab */ + 8 /* &.idxStr */))))
}
- zMsg = Xsqlite3StrAccumFinish(tls, bp+56 /* &str */)
+ zMsg = Xsqlite3StrAccumFinish(tls, bp+48 /* &str */)
ret = Xsqlite3VdbeAddOp4(tls, v, OP_Explain, Xsqlite3VdbeCurrentAddr(tls, v),
(*Parse)(unsafe.Pointer(pParse)).FaddrExplain, 0, zMsg, -7)
@@ -124714,7 +127485,7 @@ func Xsqlite3WhereExplainOneScan(tls *libc.TLS, pParse uintptr, pTabList uintptr
// The TERM_LIKECOND marking indicates that the term should be coded inside
// a conditional such that is only evaluated on the second pass of a
// LIKE-optimization loop, when scanning BLOBs instead of strings.
-func disableTerm(tls *libc.TLS, pLevel uintptr, pTerm uintptr) { /* sqlite3.c:144203:13: */
+func disableTerm(tls *libc.TLS, pLevel uintptr, pTerm uintptr) { /* sqlite3.c:145372:13: */
var nLoop int32 = 0
for (((int32((*WhereTerm)(unsafe.Pointer(pTerm)).FwtFlags) & TERM_CODED) == 0) &&
@@ -124747,7 +127518,7 @@ func disableTerm(tls *libc.TLS, pLevel uintptr, pTerm uintptr) { /* sqlite3.c:14
//
// This routine makes its own copy of zAff so that the caller is free
// to modify zAff after this routine returns.
-func codeApplyAffinity(tls *libc.TLS, pParse uintptr, base int32, n int32, zAff uintptr) { /* sqlite3.c:144235:13: */
+func codeApplyAffinity(tls *libc.TLS, pParse uintptr, base int32, n int32, zAff uintptr) { /* sqlite3.c:145410:13: */
var v uintptr = (*Parse)(unsafe.Pointer(pParse)).FpVdbe
if zAff == uintptr(0) {
@@ -124757,12 +127528,12 @@ func codeApplyAffinity(tls *libc.TLS, pParse uintptr, base int32, n int32, zAff
// Adjust base and n to skip over SQLITE_AFF_BLOB and SQLITE_AFF_NONE
// entries at the beginning and end of the affinity string.
- for (n > 0) && (int32(*(*int8)(unsafe.Pointer(zAff))) <= SQLITE_AFF_BLOB) {
+ for (n > 0) && (int32(*(*uint8)(unsafe.Pointer(zAff))) <= SQLITE_AFF_BLOB) {
n--
base++
zAff++
}
- for (n > 1) && (int32(*(*int8)(unsafe.Pointer(zAff + uintptr((n - 1))))) <= SQLITE_AFF_BLOB) {
+ for (n > 1) && (int32(*(*uint8)(unsafe.Pointer(zAff + uintptr((n - 1))))) <= SQLITE_AFF_BLOB) {
n--
}
@@ -124780,13 +127551,13 @@ func codeApplyAffinity(tls *libc.TLS, pParse uintptr, base int32, n int32, zAff
//
// * the comparison will be performed with no affinity, or
// * the affinity change in zAff is guaranteed not to change the value.
-func updateRangeAffinityStr(tls *libc.TLS, pRight uintptr, n int32, zAff uintptr) { /* sqlite3.c:144272:13: */
+func updateRangeAffinityStr(tls *libc.TLS, pRight uintptr, n int32, zAff uintptr) { /* sqlite3.c:145447:13: */
var i int32
for i = 0; i < n; i++ {
var p uintptr = Xsqlite3VectorFieldSubexpr(tls, pRight, i)
- if (int32(Xsqlite3CompareAffinity(tls, p, *(*int8)(unsafe.Pointer(zAff + uintptr(i))))) == SQLITE_AFF_BLOB) ||
- (Xsqlite3ExprNeedsNoAffinityChange(tls, p, *(*int8)(unsafe.Pointer(zAff + uintptr(i)))) != 0) {
- *(*int8)(unsafe.Pointer(zAff + uintptr(i))) = int8(SQLITE_AFF_BLOB)
+ if (int32(Xsqlite3CompareAffinity(tls, p, *(*uint8)(unsafe.Pointer(zAff + uintptr(i))))) == SQLITE_AFF_BLOB) ||
+ (Xsqlite3ExprNeedsNoAffinityChange(tls, p, *(*uint8)(unsafe.Pointer(zAff + uintptr(i)))) != 0) {
+ *(*uint8)(unsafe.Pointer(zAff + uintptr(i))) = uint8(SQLITE_AFF_BLOB)
}
}
}
@@ -124818,7 +127589,7 @@ func updateRangeAffinityStr(tls *libc.TLS, pRight uintptr, n int32, zAff uintptr
// The reduced pX is different from the original (obviously) and thus is
// only used for indexing, to improve performance. The original unaltered
// IN expression must also be run on each output row for correctness.
-func removeUnindexableInClauseTerms(tls *libc.TLS, pParse uintptr, iEq int32, pLoop uintptr, pX uintptr) uintptr { /* sqlite3.c:144318:13: */
+func removeUnindexableInClauseTerms(tls *libc.TLS, pParse uintptr, iEq int32, pLoop uintptr, pX uintptr) uintptr { /* sqlite3.c:145493:13: */
var db uintptr = (*Parse)(unsafe.Pointer(pParse)).Fdb
var pNew uintptr
pNew = Xsqlite3ExprDup(tls, db, pX, 0)
@@ -124888,7 +127659,7 @@ func removeUnindexableInClauseTerms(tls *libc.TLS, pParse uintptr, iEq int32, pL
// For a constraint of the form X=expr, the expression is evaluated in
// straight-line code. For constraints of the form X IN (...)
// this routine sets up a loop that will iterate over all values of X.
-func codeEqualityTerm(tls *libc.TLS, pParse uintptr, pTerm uintptr, pLevel uintptr, iEq int32, bRev int32, iTarget int32) int32 { /* sqlite3.c:144400:12: */
+func codeEqualityTerm(tls *libc.TLS, pParse uintptr, pTerm uintptr, pLevel uintptr, iEq int32, bRev int32, iTarget int32) int32 { /* sqlite3.c:145575:12: */
bp := tls.Alloc(4)
defer tls.Free(4)
@@ -125021,7 +127792,20 @@ func codeEqualityTerm(tls *libc.TLS, pParse uintptr, pTerm uintptr, pLevel uintp
}
Xsqlite3DbFree(tls, (*Parse)(unsafe.Pointer(pParse)).Fdb, aiMap)
}
- disableTerm(tls, pLevel, pTerm)
+
+ // As an optimization, try to disable the WHERE clause term that is
+ // driving the index as it will always be true. The correct answer is
+ // obtained regardless, but we might get the answer with fewer CPU cycles
+ // by omitting the term.
+ //
+ // But do not disable the term unless we are certain that the term is
+ // not a transitive constraint. For an example of where that does not
+ // work, see https://sqlite.org/forum/forumpost/eb8613976a (2021-05-04)
+ if (((*WhereLoop1)(unsafe.Pointer((*WhereLevel)(unsafe.Pointer(pLevel)).FpWLoop)).FwsFlags & U32(WHERE_TRANSCONS)) == U32(0)) ||
+ ((int32((*WhereTerm)(unsafe.Pointer(pTerm)).FeOperator) & WO_EQUIV) == 0) {
+ disableTerm(tls, pLevel, pTerm)
+ }
+
return iReg
}
@@ -125068,7 +127852,7 @@ func codeEqualityTerm(tls *libc.TLS, pParse uintptr, pTerm uintptr, pLevel uintp
// no conversion should be attempted before using a t2.b value as part of
// a key to search the index. Hence the first byte in the returned affinity
// string in this example would be set to SQLITE_AFF_BLOB.
-func codeAllEqualityTerms(tls *libc.TLS, pParse uintptr, pLevel uintptr, bRev int32, nExtraReg int32, pzAff uintptr) int32 { /* sqlite3.c:144581:12: */
+func codeAllEqualityTerms(tls *libc.TLS, pParse uintptr, pLevel uintptr, bRev int32, nExtraReg int32, pzAff uintptr) int32 { /* sqlite3.c:145771:12: */
var nEq U16 // The number of == or IN constraints to code
var nSkip U16 // Number of left-most columns to skip
var v uintptr = (*Parse)(unsafe.Pointer(pParse)).FpVdbe // The vm under construction
@@ -125096,6 +127880,7 @@ func codeAllEqualityTerms(tls *libc.TLS, pParse uintptr, pLevel uintptr, bRev in
if nSkip != 0 {
var iIdxCur int32 = (*WhereLevel)(unsafe.Pointer(pLevel)).FiIdxCur
+ Xsqlite3VdbeAddOp3(tls, v, OP_Null, 0, regBase, ((regBase + int32(nSkip)) - 1))
Xsqlite3VdbeAddOp1(tls, v, func() int32 {
if bRev != 0 {
return OP_Last
@@ -125134,7 +127919,7 @@ func codeAllEqualityTerms(tls *libc.TLS, pParse uintptr, pLevel uintptr, bRev in
Xsqlite3ReleaseTempReg(tls, pParse, regBase)
regBase = r1
} else {
- Xsqlite3VdbeAddOp2(tls, v, OP_SCopy, r1, (regBase + j))
+ Xsqlite3VdbeAddOp2(tls, v, OP_Copy, r1, (regBase + j))
}
}
if (int32((*WhereTerm)(unsafe.Pointer(pTerm)).FeOperator) & WO_IN) != 0 {
@@ -125144,7 +127929,7 @@ func codeAllEqualityTerms(tls *libc.TLS, pParse uintptr, pLevel uintptr, bRev in
// sqlite3FindInIndex() routine has already ensured that the
// affinity of the comparison has been applied to the value.
if zAff != 0 {
- *(*int8)(unsafe.Pointer(zAff + uintptr(j))) = int8(SQLITE_AFF_BLOB)
+ *(*uint8)(unsafe.Pointer(zAff + uintptr(j))) = uint8(SQLITE_AFF_BLOB)
}
}
} else if (int32((*WhereTerm)(unsafe.Pointer(pTerm)).FeOperator) & WO_ISNULL) == 0 {
@@ -125153,12 +127938,12 @@ func codeAllEqualityTerms(tls *libc.TLS, pParse uintptr, pLevel uintptr, bRev in
Xsqlite3VdbeAddOp2(tls, v, OP_IsNull, (regBase + j), (*WhereLevel)(unsafe.Pointer(pLevel)).FaddrBrk)
}
- if zAff != 0 {
- if int32(Xsqlite3CompareAffinity(tls, pRight, *(*int8)(unsafe.Pointer(zAff + uintptr(j))))) == SQLITE_AFF_BLOB {
- *(*int8)(unsafe.Pointer(zAff + uintptr(j))) = int8(SQLITE_AFF_BLOB)
+ if (int32((*Sqlite3)(unsafe.Pointer((*Parse)(unsafe.Pointer(pParse)).Fdb)).FmallocFailed) == 0) && ((*Parse)(unsafe.Pointer(pParse)).FnErr == 0) {
+ if int32(Xsqlite3CompareAffinity(tls, pRight, *(*uint8)(unsafe.Pointer(zAff + uintptr(j))))) == SQLITE_AFF_BLOB {
+ *(*uint8)(unsafe.Pointer(zAff + uintptr(j))) = uint8(SQLITE_AFF_BLOB)
}
- if Xsqlite3ExprNeedsNoAffinityChange(tls, pRight, *(*int8)(unsafe.Pointer(zAff + uintptr(j)))) != 0 {
- *(*int8)(unsafe.Pointer(zAff + uintptr(j))) = int8(SQLITE_AFF_BLOB)
+ if Xsqlite3ExprNeedsNoAffinityChange(tls, pRight, *(*uint8)(unsafe.Pointer(zAff + uintptr(j)))) != 0 {
+ *(*uint8)(unsafe.Pointer(zAff + uintptr(j))) = uint8(SQLITE_AFF_BLOB)
}
}
}
@@ -125183,11 +127968,11 @@ func codeAllEqualityTerms(tls *libc.TLS, pParse uintptr, pLevel uintptr, bRev in
// on. For each table column, if the column is the i'th column of the
// index, then the corresponding array entry is set to (i+1). If the column
// does not appear in the index at all, the array entry is set to 0.
-func codeDeferredSeek(tls *libc.TLS, pWInfo uintptr, pIdx uintptr, iCur int32, iIdxCur int32) { /* sqlite3.c:144953:13: */
+func codeDeferredSeek(tls *libc.TLS, pWInfo uintptr, pIdx uintptr, iCur int32, iIdxCur int32) { /* sqlite3.c:146144:13: */
var pParse uintptr = (*WhereInfo)(unsafe.Pointer(pWInfo)).FpParse // Parse context
var v uintptr = (*Parse)(unsafe.Pointer(pParse)).FpVdbe // Vdbe to generate code within
- libc.SetBitFieldPtr8Uint32(pWInfo+68 /* &.bDeferredSeek */, uint32(1), 0, 0x1)
+ libc.SetBitFieldPtr8Uint32(pWInfo+68 /* &.bDeferredSeek */, uint32(1), 7, 0x80)
Xsqlite3VdbeAddOp3(tls, v, OP_DeferredSeek, iIdxCur, 0, iCur)
if ((int32((*WhereInfo)(unsafe.Pointer(pWInfo)).FwctrlFlags) & WHERE_OR_SUBCLAUSE) != 0) &&
(((*Parse)(unsafe.Pointer(func() uintptr {
@@ -125224,7 +128009,7 @@ func codeDeferredSeek(tls *libc.TLS, pWInfo uintptr, pIdx uintptr, iCur int32, i
// If the expression is not a vector, then nReg must be passed 1. In
// this case, generate code to evaluate the expression and leave the
// result in register iReg.
-func codeExprOrVector(tls *libc.TLS, pParse uintptr, p uintptr, iReg int32, nReg int32) { /* sqlite3.c:144997:13: */
+func codeExprOrVector(tls *libc.TLS, pParse uintptr, p uintptr, iReg int32, nReg int32) { /* sqlite3.c:146188:13: */
if (p != 0) && (Xsqlite3ExprIsVector(tls, p) != 0) {
if ((*Expr)(unsafe.Pointer(p)).Fflags & U32(EP_xIsSelect)) != 0 {
@@ -125250,10 +128035,10 @@ func codeExprOrVector(tls *libc.TLS, pParse uintptr, p uintptr, iReg int32, nReg
// An instance of the IdxExprTrans object carries information about a
// mapping from an expression on table columns into a column in an index
// down through the Walker.
-type IdxExprTrans = IdxExprTrans1 /* sqlite3.c:145035:3 */
+type IdxExprTrans = IdxExprTrans1 /* sqlite3.c:146226:3 */
// Preserve pExpr on the WhereETrans list of the WhereInfo.
-func preserveExpr(tls *libc.TLS, pTrans uintptr, pExpr uintptr) { /* sqlite3.c:145040:13: */
+func preserveExpr(tls *libc.TLS, pTrans uintptr, pExpr uintptr) { /* sqlite3.c:146231:13: */
var pNew uintptr
pNew = Xsqlite3DbMallocRaw(tls, (*IdxExprTrans)(unsafe.Pointer(pTrans)).Fdb, uint64(unsafe.Sizeof(WhereExprMod{})))
if pNew == uintptr(0) {
@@ -125270,7 +128055,7 @@ func preserveExpr(tls *libc.TLS, pTrans uintptr, pExpr uintptr) { /* sqlite3.c:1
//
// If pExpr matches, then transform it into a reference to the index column
// that contains the value of pExpr.
-func whereIndexExprTransNode(tls *libc.TLS, p uintptr, pExpr uintptr) int32 { /* sqlite3.c:145056:12: */
+func whereIndexExprTransNode(tls *libc.TLS, p uintptr, pExpr uintptr) int32 { /* sqlite3.c:146247:12: */
var pX uintptr = *(*uintptr)(unsafe.Pointer(p + 40 /* &.u */))
if Xsqlite3ExprCompare(tls, uintptr(0), pExpr, (*IdxExprTrans)(unsafe.Pointer(pX)).FpIdxExpr, (*IdxExprTrans)(unsafe.Pointer(pX)).FiTabCur) == 0 {
preserveExpr(tls, pX, pExpr)
@@ -125290,7 +128075,7 @@ func whereIndexExprTransNode(tls *libc.TLS, p uintptr, pExpr uintptr) int32 { /*
// A walker node callback that translates a column reference to a table
// into a corresponding column reference of an index.
-func whereIndexExprTransColumn(tls *libc.TLS, p uintptr, pExpr uintptr) int32 { /* sqlite3.c:145078:12: */
+func whereIndexExprTransColumn(tls *libc.TLS, p uintptr, pExpr uintptr) int32 { /* sqlite3.c:146269:12: */
if int32((*Expr)(unsafe.Pointer(pExpr)).Fop) == TK_COLUMN {
var pX uintptr = *(*uintptr)(unsafe.Pointer(p + 40 /* &.u */))
if ((*Expr)(unsafe.Pointer(pExpr)).FiTable == (*IdxExprTrans)(unsafe.Pointer(pX)).FiTabCur) && (int32((*Expr)(unsafe.Pointer(pExpr)).FiColumn) == (*IdxExprTrans)(unsafe.Pointer(pX)).FiTabCol) {
@@ -125312,7 +128097,7 @@ func whereIndexExprTransColumn(tls *libc.TLS, p uintptr, pExpr uintptr) int32 {
// 2019-10-24: Updated to also translate references to a VIRTUAL column in
// the table into references to the corresponding (stored) column of the
// index.
-func whereIndexExprTrans(tls *libc.TLS, pIdx uintptr, iTabCur int32, iIdxCur int32, pWInfo uintptr) { /* sqlite3.c:145103:13: */
+func whereIndexExprTrans(tls *libc.TLS, pIdx uintptr, iTabCur int32, iIdxCur int32, pWInfo uintptr) { /* sqlite3.c:146294:13: */
bp := tls.Alloc(88)
defer tls.Free(88)
@@ -125324,7 +128109,7 @@ func whereIndexExprTrans(tls *libc.TLS, pIdx uintptr, iTabCur int32, iIdxCur int
// var x IdxExprTrans at bp+48, 40
aColExpr = (*Index)(unsafe.Pointer(pIdx)).FaColExpr
- if (aColExpr == uintptr(0)) && !((int32(*(*uint16)(unsafe.Pointer(pIdx + 100 /* &.bHasVCol */)) >> 5 & 0x1)) != 0) {
+ if (aColExpr == uintptr(0)) && !((int32(*(*uint16)(unsafe.Pointer(pIdx + 100 /* &.bHasVCol */)) & 0x20 >> 5)) != 0) {
// The index does not reference any expressions or virtual columns
// so no translations are needed.
return
@@ -125376,7 +128161,7 @@ func whereIndexExprTrans(tls *libc.TLS, pIdx uintptr, iTabCur int32, iIdxCur int
// WHERE clause terms on the query, and if any of those terms must be
// true because pTruth is true, then mark those WHERE clause terms as
// coded.
-func whereApplyPartialIndexConstraints(tls *libc.TLS, pTruth uintptr, iTabCur int32, pWC uintptr) { /* sqlite3.c:145166:13: */
+func whereApplyPartialIndexConstraints(tls *libc.TLS, pTruth uintptr, iTabCur int32, pWC uintptr) { /* sqlite3.c:146357:13: */
var i int32
var pTerm uintptr
for int32((*Expr)(unsafe.Pointer(pTruth)).Fop) == TK_AND {
@@ -125411,7 +128196,7 @@ __3:
// Generate code for the start of the iLevel-th loop in the WHERE clause
// implementation described by pWInfo.
-func Xsqlite3WhereCodeOneLoopStart(tls *libc.TLS, pParse uintptr, v uintptr, pWInfo uintptr, iLevel int32, pLevel uintptr, notReady Bitmask) Bitmask { /* sqlite3.c:145191:24: */
+func Xsqlite3WhereCodeOneLoopStart(tls *libc.TLS, pParse uintptr, v uintptr, pWInfo uintptr, iLevel int32, pLevel uintptr, notReady Bitmask) Bitmask { /* sqlite3.c:146382:24: */
bp := tls.Alloc(96)
defer tls.Free(96)
@@ -125470,7 +128255,7 @@ func Xsqlite3WhereCodeOneLoopStart(tls *libc.TLS, pParse uintptr, v uintptr, pWI
addrHalt = (*WhereLevel)(unsafe.Pointer((pWInfo + 856 /* &.a */) + uintptr(j)*88)).FaddrBrk
// Special case of a FROM clause subquery implemented as a co-routine
- if (uint32(int32(*(*uint8)(unsafe.Pointer(pTabItem + 60 /* &.fg */ + 4 /* &.viaCoroutine */)) >> 3 & 0x1))) != 0 {
+ if (uint32(int32(*(*uint16)(unsafe.Pointer(pTabItem + 60 /* &.fg */ + 4 /* &.viaCoroutine */)) & 0x800 >> 11))) != 0 {
var regYield int32 = (*SrcItem)(unsafe.Pointer(pTabItem)).FregReturn
Xsqlite3VdbeAddOp3(tls, v, OP_InitCoroutine, regYield, 0, (*SrcItem)(unsafe.Pointer(pTabItem)).FaddrFillSub)
(*WhereLevel)(unsafe.Pointer(pLevel)).Fp2 = Xsqlite3VdbeAddOp2(tls, v, OP_Yield, regYield, addrBrk)
@@ -125785,8 +128570,7 @@ func Xsqlite3WhereCodeOneLoopStart(tls *libc.TLS, pParse uintptr, v uintptr, pWI
// If we are doing a reverse order scan on an ascending index, or
// a forward order scan on a descending index, interchange the
// start and end terms (pRangeStart and pRangeEnd).
- if ((int32(nEq) < int32((*Index)(unsafe.Pointer(pIdx)).FnKeyCol)) && (bRev == (libc.Bool32(int32(*(*U8)(unsafe.Pointer((*Index)(unsafe.Pointer(pIdx)).FaSortOrder + uintptr(nEq)))) == SQLITE_SO_ASC)))) ||
- ((bRev != 0) && (int32((*Index)(unsafe.Pointer(pIdx)).FnKeyCol) == int32(nEq))) {
+ if (int32(nEq) < int32((*Index)(unsafe.Pointer(pIdx)).FnColumn)) && (bRev == (libc.Bool32(int32(*(*U8)(unsafe.Pointer((*Index)(unsafe.Pointer(pIdx)).FaSortOrder + uintptr(nEq)))) == SQLITE_SO_ASC))) {
{
var t uintptr = pRangeEnd
pRangeEnd = pRangeStart
@@ -126197,7 +128981,7 @@ func Xsqlite3WhereCodeOneLoopStart(tls *libc.TLS, pParse uintptr, v uintptr, pWI
// The extra 0x10000 bit on the opcode is masked off and does not
// become part of the new Expr.op. However, it does make the
// op==TK_AND comparison inside of sqlite3PExpr() false, and this
- // prevents sqlite3PExpr() from implementing AND short-circuit
+ // prevents sqlite3PExpr() from applying the AND short-circuit
// optimization, which we do not want here.
pAndExpr = Xsqlite3PExpr(tls, pParse, (TK_AND | 0x10000), uintptr(0), pAndExpr)
}
@@ -126206,20 +128990,26 @@ func Xsqlite3WhereCodeOneLoopStart(tls *libc.TLS, pParse uintptr, v uintptr, pWI
// Run a separate WHERE clause for each term of the OR clause. After
// eliminating duplicates from other WHERE clauses, the action for each
// sub-WHERE clause is to to invoke the main loop body as a subroutine.
- Xsqlite3VdbeExplain(tls, pParse, uint8(1), ts+19637 /* "MULTI-INDEX OR" */, 0)
+ Xsqlite3VdbeExplain(tls, pParse, uint8(1), ts+20097 /* "MULTI-INDEX OR" */, 0)
for ii = 0; ii < (*WhereClause)(unsafe.Pointer(pOrWc)).FnTerm; ii++ {
var pOrTerm uintptr = ((*WhereClause)(unsafe.Pointer(pOrWc)).Fa + uintptr(ii)*56)
if ((*WhereTerm)(unsafe.Pointer(pOrTerm)).FleftCursor == iCur) || ((int32((*WhereTerm)(unsafe.Pointer(pOrTerm)).FeOperator) & WO_AND) != 0) {
var pSubWInfo uintptr // Info for single OR-term scan
var pOrExpr uintptr = (*WhereTerm)(unsafe.Pointer(pOrTerm)).FpExpr // Current OR clause term
+ var pDelete uintptr // Local copy of OR clause term
var jmp1 int32 = 0 // Address of jump operation
// See TH3 vtab25.400 and ticket 614b25314c766238
+ pDelete = libc.AssignUintptr(&pOrExpr, Xsqlite3ExprDup(tls, db, pOrExpr, 0))
+ if (*Sqlite3)(unsafe.Pointer(db)).FmallocFailed != 0 {
+ Xsqlite3ExprDelete(tls, db, pDelete)
+ continue
+ }
if pAndExpr != 0 {
(*Expr)(unsafe.Pointer(pAndExpr)).FpLeft = pOrExpr
pOrExpr = pAndExpr
}
// Loop through table entries that match term pOrTerm.
- Xsqlite3VdbeExplain(tls, pParse, uint8(1), ts+19652 /* "INDEX %d" */, libc.VaList(bp, (ii+1)))
+ Xsqlite3VdbeExplain(tls, pParse, uint8(1), ts+20112 /* "INDEX %d" */, libc.VaList(bp, (ii+1)))
pSubWInfo = Xsqlite3WhereBegin(tls, pParse, pOrTab, pOrExpr, uintptr(0), uintptr(0),
uint16(WHERE_OR_SUBCLAUSE), iCovCur)
@@ -126302,7 +129092,7 @@ func Xsqlite3WhereCodeOneLoopStart(tls *libc.TLS, pParse uintptr, v uintptr, pWI
// contained one or more AND term from a notReady table. The
// terms from the notReady table could not be tested and will
// need to be tested later.
- if (uint32(int32(*(*uint8)(unsafe.Pointer(pSubWInfo + 68 /* &.untestedTerms */)) >> 6 & 0x1))) != 0 {
+ if (uint32(int32(*(*uint8)(unsafe.Pointer(pSubWInfo + 68 /* &.untestedTerms */)) & 0x40 >> 6))) != 0 {
untestedTerms = 1
}
@@ -126321,20 +129111,21 @@ func Xsqlite3WhereCodeOneLoopStart(tls *libc.TLS, pParse uintptr, v uintptr, pWI
if ((((*WhereLoop)(unsafe.Pointer(pSubLoop)).FwsFlags & U32(WHERE_INDEXED)) != U32(0)) &&
((ii == 0) || (*(*uintptr)(unsafe.Pointer((pSubLoop + 24 /* &.u */ /* &.btree */) + 8 /* &.pIndex */)) == pCov))) &&
- ((((*Table)(unsafe.Pointer((pTab))).FtabFlags & U32(TF_WithoutRowid)) == U32(0)) || !((int32(*(*uint16)(unsafe.Pointer((*(*uintptr)(unsafe.Pointer(pSubLoop + 24 /* &.u */ /* &.btree */ + 8 /* &.pIndex */))) + 100 /* &.idxType */)) >> 14 & 0x3)) == SQLITE_IDXTYPE_PRIMARYKEY)) {
+ ((((*Table)(unsafe.Pointer((pTab))).FtabFlags & U32(TF_WithoutRowid)) == U32(0)) || !((int32(*(*uint16)(unsafe.Pointer((*(*uintptr)(unsafe.Pointer(pSubLoop + 24 /* &.u */ /* &.btree */ + 8 /* &.pIndex */))) + 100 /* &.idxType */)) & 0xc000 >> 14)) == SQLITE_IDXTYPE_PRIMARYKEY)) {
pCov = *(*uintptr)(unsafe.Pointer(pSubLoop + 24 /* &.u */ /* &.btree */ + 8 /* &.pIndex */))
} else {
pCov = uintptr(0)
}
if Xsqlite3WhereUsesDeferredSeek(tls, pSubWInfo) != 0 {
- libc.SetBitFieldPtr8Uint32(pWInfo+68 /* &.bDeferredSeek */, uint32(1), 0, 0x1)
+ libc.SetBitFieldPtr8Uint32(pWInfo+68 /* &.bDeferredSeek */, uint32(1), 7, 0x80)
}
// Finish the loop through table entries that match term pOrTerm.
Xsqlite3WhereEnd(tls, pSubWInfo)
Xsqlite3VdbeExplainPop(tls, pParse)
}
+ Xsqlite3ExprDelete(tls, db, pDelete)
}
}
Xsqlite3VdbeExplainPop(tls, pParse)
@@ -126358,7 +129149,7 @@ func Xsqlite3WhereCodeOneLoopStart(tls *libc.TLS, pParse uintptr, v uintptr, pWI
}
} else {
- if (uint32(int32(*(*uint8)(unsafe.Pointer(pTabItem + 60 /* &.fg */ + 4 /* &.isRecursive */)) >> 2 & 0x1))) != 0 {
+ if (uint32(int32(*(*uint16)(unsafe.Pointer(pTabItem + 60 /* &.fg */ + 4 /* &.isRecursive */)) & 0x400 >> 10))) != 0 {
// Tables marked isRecursive have only a single row that is stored in
// a pseudo-cursor. No need to Rewind or Next such cursors.
(*WhereLevel)(unsafe.Pointer(pLevel)).Fop = U8(OP_Noop)
@@ -126408,7 +129199,7 @@ func Xsqlite3WhereCodeOneLoopStart(tls *libc.TLS, pParse uintptr, v uintptr, pWI
}
if ((*WhereTerm)(unsafe.Pointer(pTerm)).FprereqAll & (*WhereLevel)(unsafe.Pointer(pLevel)).FnotReady) != uint64(0) {
- libc.SetBitFieldPtr8Uint32(pWInfo+68 /* &.untestedTerms */, uint32(1), 1, 0x2)
+ libc.SetBitFieldPtr8Uint32(pWInfo+68 /* &.untestedTerms */, uint32(1), 6, 0x40)
goto __2
}
pE = (*WhereTerm)(unsafe.Pointer(pTerm)).FpExpr
@@ -126506,6 +129297,7 @@ __4:
*(*Expr)(unsafe.Pointer(bp + 24 /* sEAlt */)) = *(*Expr)(unsafe.Pointer((*WhereTerm)(unsafe.Pointer(pAlt)).FpExpr))
(*Expr)(unsafe.Pointer(bp + 24 /* &sEAlt */)).FpLeft = (*Expr)(unsafe.Pointer(pE)).FpLeft
Xsqlite3ExprIfFalse(tls, pParse, bp+24 /* &sEAlt */, addrCont, SQLITE_JUMPIFNULL)
+ *(*U16)(unsafe.Pointer(pAlt + 18 /* &.wtFlags */)) |= U16((TERM_CODED))
}
goto __5
@@ -126564,24 +129356,24 @@ var aStartOp = [8]U8{
U8(OP_SeekLT), // 5: (start_constraints && !startEq && bRev)
U8(OP_SeekGE), // 6: (start_constraints && startEq && !bRev)
U8(OP_SeekLE), // 7: (start_constraints && startEq && bRev)
-} /* sqlite3.c:145538:21 */
+} /* sqlite3.c:146729:21 */
var aEndOp = [4]U8{
U8(OP_IdxGE), // 0: (end_constraints && !bRev && !endEq)
U8(OP_IdxGT), // 1: (end_constraints && !bRev && endEq)
U8(OP_IdxLE), // 2: (end_constraints && bRev && !endEq)
U8(OP_IdxLT), // 3: (end_constraints && bRev && endEq)
-} /* sqlite3.c:145548:21 */
-var aStep = [2]U8{U8(OP_Next), U8(OP_Prev)} /* sqlite3.c:146224:21 */
-var aStart = [2]U8{U8(OP_Rewind), U8(OP_Last)} /* sqlite3.c:146225:21 */
+} /* sqlite3.c:146739:21 */
+var aStep = [2]U8{U8(OP_Next), U8(OP_Prev)} /* sqlite3.c:147420:21 */
+var aStart = [2]U8{U8(OP_Rewind), U8(OP_Last)} /* sqlite3.c:147421:21 */
// Deallocate all memory associated with a WhereOrInfo object.
-func whereOrInfoDelete(tls *libc.TLS, db uintptr, p uintptr) { /* sqlite3.c:146432:13: */
+func whereOrInfoDelete(tls *libc.TLS, db uintptr, p uintptr) { /* sqlite3.c:147629:13: */
Xsqlite3WhereClauseClear(tls, (p /* &.wc */))
Xsqlite3DbFree(tls, db, p)
}
// Deallocate all memory associated with a WhereAndInfo object.
-func whereAndInfoDelete(tls *libc.TLS, db uintptr, p uintptr) { /* sqlite3.c:146440:13: */
+func whereAndInfoDelete(tls *libc.TLS, db uintptr, p uintptr) { /* sqlite3.c:147637:13: */
Xsqlite3WhereClauseClear(tls, (p /* &.wc */))
Xsqlite3DbFree(tls, db, p)
}
@@ -126603,7 +129395,7 @@ func whereAndInfoDelete(tls *libc.TLS, db uintptr, p uintptr) { /* sqlite3.c:146
// WhereTerms. All pointers to WhereTerms should be invalidated after
// calling this routine. Such pointers may be reinitialized by referencing
// the pWC->a[] array.
-func whereClauseInsert(tls *libc.TLS, pWC uintptr, p uintptr, wtFlags U16) int32 { /* sqlite3.c:146464:12: */
+func whereClauseInsert(tls *libc.TLS, pWC uintptr, p uintptr, wtFlags U16) int32 { /* sqlite3.c:147661:12: */
var pTerm uintptr
var idx int32
@@ -126642,14 +129434,14 @@ func whereClauseInsert(tls *libc.TLS, pWC uintptr, p uintptr, wtFlags U16) int32
// Return TRUE if the given operator is one of the operators that is
// allowed for an indexable WHERE clause term. The allowed operators are
// "=", "<", ">", "<=", ">=", "IN", "IS", and "IS NULL"
-func allowedOp(tls *libc.TLS, op int32) int32 { /* sqlite3.c:146505:12: */
+func allowedOp(tls *libc.TLS, op int32) int32 { /* sqlite3.c:147702:12: */
return (libc.Bool32((((op == TK_IN) || ((op >= TK_EQ) && (op <= TK_GE))) || (op == TK_ISNULL)) || (op == TK_IS)))
}
// Commute a comparison operator. Expressions of the form "X op Y"
// are converted into "Y op X".
-func exprCommute(tls *libc.TLS, pParse uintptr, pExpr uintptr) U16 { /* sqlite3.c:146517:12: */
+func exprCommute(tls *libc.TLS, pParse uintptr, pExpr uintptr) U16 { /* sqlite3.c:147714:12: */
if ((int32((*Expr)(unsafe.Pointer((*Expr)(unsafe.Pointer(pExpr)).FpLeft)).Fop) == TK_VECTOR) ||
(int32((*Expr)(unsafe.Pointer((*Expr)(unsafe.Pointer(pExpr)).FpRight)).Fop) == TK_VECTOR)) ||
(Xsqlite3BinaryCompareCollSeq(tls, pParse, (*Expr)(unsafe.Pointer(pExpr)).FpLeft, (*Expr)(unsafe.Pointer(pExpr)).FpRight) != Xsqlite3BinaryCompareCollSeq(tls, pParse, (*Expr)(unsafe.Pointer(pExpr)).FpRight, (*Expr)(unsafe.Pointer(pExpr)).FpLeft)) {
@@ -126669,7 +129461,7 @@ func exprCommute(tls *libc.TLS, pParse uintptr, pExpr uintptr) U16 { /* sqlite3.
}
// Translate from TK_xx operator to WO_xx bitmask.
-func operatorMask(tls *libc.TLS, op int32) U16 { /* sqlite3.c:146540:12: */
+func operatorMask(tls *libc.TLS, op int32) U16 { /* sqlite3.c:147737:12: */
var c U16
if op == TK_IN {
@@ -126696,7 +129488,7 @@ func operatorMask(tls *libc.TLS, op int32) U16 { /* sqlite3.c:146540:12: */
// that virtual tables cannot participate in the LIKE optimization.) The
// collating sequence for the column on the LHS must be appropriate for
// the operator.
-func isLikeOrGlob(tls *libc.TLS, pParse uintptr, pExpr uintptr, ppPrefix uintptr, pisComplete uintptr, pnoCase uintptr) int32 { /* sqlite3.c:146578:12: */
+func isLikeOrGlob(tls *libc.TLS, pParse uintptr, pExpr uintptr, ppPrefix uintptr, pisComplete uintptr, pnoCase uintptr) int32 { /* sqlite3.c:147775:12: */
bp := tls.Alloc(16)
defer tls.Free(16)
@@ -126764,14 +129556,14 @@ func isLikeOrGlob(tls *libc.TLS, pParse uintptr, pExpr uintptr, ppPrefix uintptr
var iFrom int32
var iTo int32
var zNew uintptr = *(*uintptr)(unsafe.Pointer(pPrefix + 8 /* &.u */))
- *(*int8)(unsafe.Pointer(zNew + uintptr(cnt))) = int8(0)
+ *(*uint8)(unsafe.Pointer(zNew + uintptr(cnt))) = uint8(0)
for iFrom = libc.AssignInt32(&iTo, 0); iFrom < cnt; iFrom++ {
- if int32(*(*int8)(unsafe.Pointer(zNew + uintptr(iFrom)))) == int32(*(*U8)(unsafe.Pointer(bp /* &wc[0] */ + 3))) {
+ if int32(*(*uint8)(unsafe.Pointer(zNew + uintptr(iFrom)))) == int32(*(*U8)(unsafe.Pointer(bp /* &wc[0] */ + 3))) {
iFrom++
}
- *(*int8)(unsafe.Pointer(zNew + uintptr(libc.PostIncInt32(&iTo, 1)))) = *(*int8)(unsafe.Pointer(zNew + uintptr(iFrom)))
+ *(*uint8)(unsafe.Pointer(zNew + uintptr(libc.PostIncInt32(&iTo, 1)))) = *(*uint8)(unsafe.Pointer(zNew + uintptr(iFrom)))
}
- *(*int8)(unsafe.Pointer(zNew + uintptr(iTo))) = int8(0)
+ *(*uint8)(unsafe.Pointer(zNew + uintptr(iTo))) = uint8(0)
// If the LHS is not an ordinary column with TEXT affinity, then the
// pattern prefix boundaries (both the start and end boundaries) must
@@ -126793,12 +129585,12 @@ func isLikeOrGlob(tls *libc.TLS, pParse uintptr, pExpr uintptr, ppPrefix uintptr
isNum = Xsqlite3AtoF(tls, zNew, bp+8 /* &rDummy */, iTo, uint8(SQLITE_UTF8))
if isNum <= 0 {
- if (iTo == 1) && (int32(*(*int8)(unsafe.Pointer(zNew))) == '-') {
+ if (iTo == 1) && (int32(*(*uint8)(unsafe.Pointer(zNew))) == '-') {
isNum = +1
} else {
- *(*int8)(unsafe.Pointer(zNew + uintptr((iTo - 1))))++
+ *(*uint8)(unsafe.Pointer(zNew + uintptr((iTo - 1))))++
isNum = Xsqlite3AtoF(tls, zNew, bp+8 /* &rDummy */, iTo, uint8(SQLITE_UTF8))
- *(*int8)(unsafe.Pointer(zNew + uintptr((iTo - 1))))--
+ *(*uint8)(unsafe.Pointer(zNew + uintptr((iTo - 1))))--
}
}
if isNum > 0 {
@@ -126815,7 +129607,7 @@ func isLikeOrGlob(tls *libc.TLS, pParse uintptr, pExpr uintptr, ppPrefix uintptr
if op == TK_VARIABLE {
var v uintptr = (*Parse)(unsafe.Pointer(pParse)).FpVdbe
Xsqlite3VdbeSetVarmask(tls, v, int32((*Expr)(unsafe.Pointer(pRight)).FiColumn))
- if (*(*int32)(unsafe.Pointer(pisComplete)) != 0) && (*(*int8)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(pRight + 8 /* &.u */)) + 1)) != 0) {
+ if (*(*int32)(unsafe.Pointer(pisComplete)) != 0) && (*(*uint8)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(pRight + 8 /* &.u */)) + 1)) != 0) {
// If the rhs of the LIKE expression is a variable, and the current
// value of the variable means there is no need to invoke the LIKE
// function, then no OP_Variable will be added to the program.
@@ -126861,7 +129653,7 @@ func isLikeOrGlob(tls *libc.TLS, pParse uintptr, pExpr uintptr, ppPrefix uintptr
// of virtual table in forms (5) or (7) then return 2.
//
// If the expression matches none of the patterns above, return 0.
-func isAuxiliaryVtabOperator(tls *libc.TLS, db uintptr, pExpr uintptr, peOp2 uintptr, ppLeft uintptr, ppRight uintptr) int32 { /* sqlite3.c:146750:12: */
+func isAuxiliaryVtabOperator(tls *libc.TLS, db uintptr, pExpr uintptr, peOp2 uintptr, ppLeft uintptr, ppRight uintptr) int32 { /* sqlite3.c:147947:12: */
bp := tls.Alloc(16)
defer tls.Free(16)
@@ -126916,7 +129708,9 @@ func isAuxiliaryVtabOperator(tls *libc.TLS, db uintptr, pExpr uintptr, peOp2 uin
pMod = (*Sqlite3_vtab)(unsafe.Pointer(pVtab)).FpModule
if (*Sqlite3_module)(unsafe.Pointer(pMod)).FxFindFunction != uintptr(0) {
- i = (*(*func(*libc.TLS, uintptr, int32, uintptr, uintptr, uintptr) int32)(unsafe.Pointer((pMod + 144 /* &.xFindFunction */))))(tls, pVtab, 2, *(*uintptr)(unsafe.Pointer(pExpr + 8 /* &.u */)), bp /* &xNotUsed */, bp+8 /* &pNotUsed */)
+ i = (*struct {
+ f func(*libc.TLS, uintptr, int32, uintptr, uintptr, uintptr) int32
+ })(unsafe.Pointer(&struct{ uintptr }{(*Sqlite3_module)(unsafe.Pointer(pMod)).FxFindFunction})).f(tls, pVtab, 2, *(*uintptr)(unsafe.Pointer(pExpr + 8 /* &.u */)), bp /* &xNotUsed */, bp+8 /* &pNotUsed */)
if i >= SQLITE_INDEX_CONSTRAINT_FUNCTION {
*(*uint8)(unsafe.Pointer(peOp2)) = uint8(i)
*(*uintptr)(unsafe.Pointer(ppRight)) = (*ExprList_item)(unsafe.Pointer((pList + 8 /* &.a */) + 1*32)).FpExpr
@@ -126960,21 +129754,21 @@ func isAuxiliaryVtabOperator(tls *libc.TLS, db uintptr, pExpr uintptr, peOp2 uin
}
type Op2 = struct {
- FzOp uintptr
- FeOp2 uint8
- _ [7]byte
-} /* sqlite3.c:146758:18 */
+ FzOp uintptr
+ FeOp2 uint8
+ F__ccgo_pad1 [7]byte
+} /* sqlite3.c:147955:18 */
var aOp = [4]Op2{
- {FzOp: ts + 14173 /* "match" */, FeOp2: uint8(SQLITE_INDEX_CONSTRAINT_MATCH)},
- {FzOp: ts + 13648 /* "glob" */, FeOp2: uint8(SQLITE_INDEX_CONSTRAINT_GLOB)},
- {FzOp: ts + 13198 /* "like" */, FeOp2: uint8(SQLITE_INDEX_CONSTRAINT_LIKE)},
- {FzOp: ts + 19661 /* "regexp" */, FeOp2: uint8(SQLITE_INDEX_CONSTRAINT_REGEXP)},
-} /* sqlite3.c:146761:7 */
+ {FzOp: ts + 14628 /* "match" */, FeOp2: uint8(SQLITE_INDEX_CONSTRAINT_MATCH)},
+ {FzOp: ts + 14101 /* "glob" */, FeOp2: uint8(SQLITE_INDEX_CONSTRAINT_GLOB)},
+ {FzOp: ts + 13651 /* "like" */, FeOp2: uint8(SQLITE_INDEX_CONSTRAINT_LIKE)},
+ {FzOp: ts + 20121 /* "regexp" */, FeOp2: uint8(SQLITE_INDEX_CONSTRAINT_REGEXP)},
+} /* sqlite3.c:147958:7 */
// If the pBase expression originated in the ON or USING clause of
// a join, then transfer the appropriate markings over to derived.
-func transferJoinMarkings(tls *libc.TLS, pDerived uintptr, pBase uintptr) { /* sqlite3.c:146855:13: */
+func transferJoinMarkings(tls *libc.TLS, pDerived uintptr, pBase uintptr) { /* sqlite3.c:148052:13: */
if pDerived != 0 {
*(*U32)(unsafe.Pointer(pDerived + 4 /* &.flags */)) |= ((*Expr)(unsafe.Pointer(pBase)).Fflags & U32(EP_FromJoin))
(*Expr)(unsafe.Pointer(pDerived)).FiRightJoinTable = (*Expr)(unsafe.Pointer(pBase)).FiRightJoinTable
@@ -126982,7 +129776,7 @@ func transferJoinMarkings(tls *libc.TLS, pDerived uintptr, pBase uintptr) { /* s
}
// Mark term iChild as being a child of term iParent
-func markTermAsChild(tls *libc.TLS, pWC uintptr, iChild int32, iParent int32) { /* sqlite3.c:146865:13: */
+func markTermAsChild(tls *libc.TLS, pWC uintptr, iChild int32, iParent int32) { /* sqlite3.c:148062:13: */
(*WhereTerm)(unsafe.Pointer((*WhereClause)(unsafe.Pointer(pWC)).Fa + uintptr(iChild)*56)).FiParent = iParent
(*WhereTerm)(unsafe.Pointer((*WhereClause)(unsafe.Pointer(pWC)).Fa + uintptr(iChild)*56)).FtruthProb = (*WhereTerm)(unsafe.Pointer((*WhereClause)(unsafe.Pointer(pWC)).Fa + uintptr(iParent)*56)).FtruthProb
(*WhereTerm)(unsafe.Pointer((*WhereClause)(unsafe.Pointer(pWC)).Fa+uintptr(iParent)*56)).FnChild++
@@ -126991,7 +129785,7 @@ func markTermAsChild(tls *libc.TLS, pWC uintptr, iChild int32, iParent int32) {
// Return the N-th AND-connected subterm of pTerm. Or if pTerm is not
// a conjunction, then return just pTerm when N==0. If N is exceeds
// the number of available subterms, return NULL.
-func whereNthSubterm(tls *libc.TLS, pTerm uintptr, N int32) uintptr { /* sqlite3.c:146876:18: */
+func whereNthSubterm(tls *libc.TLS, pTerm uintptr, N int32) uintptr { /* sqlite3.c:148073:18: */
if int32((*WhereTerm)(unsafe.Pointer(pTerm)).FeOperator) != WO_AND {
if N == 0 {
return pTerm
@@ -127022,7 +129816,7 @@ func whereNthSubterm(tls *libc.TLS, pTerm uintptr, N int32) uintptr { /* sqlite3
// The following is NOT generated:
//
// xy --> x!=y
-func whereCombineDisjuncts(tls *libc.TLS, pSrc uintptr, pWC uintptr, pOne uintptr, pTwo uintptr) { /* sqlite3.c:146906:13: */
+func whereCombineDisjuncts(tls *libc.TLS, pSrc uintptr, pWC uintptr, pOne uintptr, pTwo uintptr) { /* sqlite3.c:148103:13: */
var eOp U16 = (U16(int32((*WhereTerm)(unsafe.Pointer(pOne)).FeOperator) | int32((*WhereTerm)(unsafe.Pointer(pTwo)).FeOperator)))
var db uintptr // Database connection (for malloc)
var pNew uintptr // New virtual expression
@@ -127155,7 +129949,7 @@ func whereCombineDisjuncts(tls *libc.TLS, pSrc uintptr, pWC uintptr, pOne uintpt
//
// If none of cases 1, 2, or 3 apply, then leave the eOperator set to
// zero. This term is not useful for search.
-func exprAnalyzeOrTerm(tls *libc.TLS, pSrc uintptr, pWC uintptr, idxTerm int32) { /* sqlite3.c:147033:13: */
+func exprAnalyzeOrTerm(tls *libc.TLS, pSrc uintptr, pWC uintptr, idxTerm int32) { /* sqlite3.c:148230:13: */
var pWInfo uintptr = (*WhereClause)(unsafe.Pointer(pWC)).FpWInfo // WHERE clause processing context
var pParse uintptr = (*WhereInfo)(unsafe.Pointer(pWInfo)).FpParse // Parser context
var db uintptr = (*Parse)(unsafe.Pointer(pParse)).Fdb // Database connection
@@ -127451,7 +130245,7 @@ __3:
idxNew = whereClauseInsert(tls, pWC, pNew, (uint16(TERM_VIRTUAL | TERM_DYNAMIC)))
exprAnalyze(tls, pSrc, pWC, idxNew)
- // pTerm = &pWC->a[idxTerm]; // would be needed if pTerm where used again
+ // pTerm = &pWC->a[idxTerm]; // would be needed if pTerm where reused
markTermAsChild(tls, pWC, idxNew, idxTerm)
} else {
Xsqlite3ExprListDelete(tls, db, pList)
@@ -127473,9 +130267,9 @@ __3:
// for the LHS anyplace else in the WHERE clause where the LHS column occurs.
// This is an optimization. No harm comes from returning 0. But if 1 is
// returned when it should not be, then incorrect answers might result.
-func termIsEquivalence(tls *libc.TLS, pParse uintptr, pExpr uintptr) int32 { /* sqlite3.c:147304:12: */
- var aff1 int8
- var aff2 int8
+func termIsEquivalence(tls *libc.TLS, pParse uintptr, pExpr uintptr) int32 { /* sqlite3.c:148501:12: */
+ var aff1 uint8
+ var aff2 uint8
var pColl uintptr
if !(((*Sqlite3)(unsafe.Pointer(((*Parse)(unsafe.Pointer(pParse)).Fdb))).FdbOptFlags & (U32(SQLITE_Transitive))) == U32(0)) {
return 0
@@ -127502,7 +130296,7 @@ func termIsEquivalence(tls *libc.TLS, pParse uintptr, pExpr uintptr) int32 { /*
// Recursively walk the expressions of a SELECT statement and generate
// a bitmask indicating which tables are used in that expression
// tree.
-func exprSelectUsage(tls *libc.TLS, pMaskSet uintptr, pS uintptr) Bitmask { /* sqlite3.c:147327:16: */
+func exprSelectUsage(tls *libc.TLS, pMaskSet uintptr, pS uintptr) Bitmask { /* sqlite3.c:148524:16: */
var mask Bitmask = uint64(0)
for pS != 0 {
var pSrc uintptr = (*Select)(unsafe.Pointer(pS)).FpSrc
@@ -127516,7 +130310,7 @@ func exprSelectUsage(tls *libc.TLS, pMaskSet uintptr, pS uintptr) Bitmask { /* s
for i = 0; i < (*SrcList)(unsafe.Pointer(pSrc)).FnSrc; i++ {
mask = mask | (exprSelectUsage(tls, pMaskSet, (*SrcItem)(unsafe.Pointer((pSrc+8 /* &.a */)+uintptr(i)*112)).FpSelect))
mask = mask | (Xsqlite3WhereExprUsage(tls, pMaskSet, (*SrcItem)(unsafe.Pointer((pSrc+8 /* &.a */)+uintptr(i)*112)).FpOn))
- if (uint32(int32(*(*uint8)(unsafe.Pointer((pSrc + 8 /* &.a */) + uintptr(i)*112 + 60 /* &.fg */ + 4 /* &.isTabFunc */)) >> 5 & 0x1))) != 0 {
+ if (uint32(int32(*(*uint16)(unsafe.Pointer((pSrc + 8 /* &.a */) + uintptr(i)*112 + 60 /* &.fg */ + 4 /* &.isTabFunc */)) & 0x2000 >> 13))) != 0 {
mask = mask | (Xsqlite3WhereExprListUsage(tls, pMaskSet, *(*uintptr)(unsafe.Pointer((pSrc + 8 /* &.a */) + uintptr(i)*112 + 96 /* &.u1 */))))
}
}
@@ -127537,7 +130331,7 @@ func exprSelectUsage(tls *libc.TLS, pMaskSet uintptr, pS uintptr) Bitmask { /* s
// If pExpr is a TK_COLUMN column reference, then this routine always returns
// true even if that particular column is not indexed, because the column
// might be added to an automatic index later.
-func exprMightBeIndexed2(tls *libc.TLS, pFrom uintptr, mPrereq Bitmask, aiCurCol uintptr, pExpr uintptr) int32 { /* sqlite3.c:147364:28: */
+func exprMightBeIndexed2(tls *libc.TLS, pFrom uintptr, mPrereq Bitmask, aiCurCol uintptr, pExpr uintptr) int32 { /* sqlite3.c:148561:28: */
var pIdx uintptr
var i int32
var iCur int32
@@ -127575,13 +130369,14 @@ __3:
return 0
}
-func exprMightBeIndexed(tls *libc.TLS, pFrom uintptr, mPrereq Bitmask, aiCurCol uintptr, pExpr uintptr, op int32) int32 { /* sqlite3.c:147388:12: */
+func exprMightBeIndexed(tls *libc.TLS, pFrom uintptr, mPrereq Bitmask, aiCurCol uintptr, pExpr uintptr, op int32) int32 { /* sqlite3.c:148585:12: */
// If this expression is a vector to the left or right of a
// inequality constraint (>, <, >= or <=), perform the processing
// on the first element of the vector.
if (int32((*Expr)(unsafe.Pointer(pExpr)).Fop) == TK_VECTOR) && ((op >= TK_GT) && (op <= TK_GE)) {
pExpr = (*ExprList_item)(unsafe.Pointer((*(*uintptr)(unsafe.Pointer(pExpr + 32 /* &.x */)) + 8 /* &.a */))).FpExpr
+
}
if int32((*Expr)(unsafe.Pointer(pExpr)).Fop) == TK_COLUMN {
@@ -127598,302 +130393,6 @@ func exprMightBeIndexed(tls *libc.TLS, pFrom uintptr, mPrereq Bitmask, aiCurCol
return exprMightBeIndexed2(tls, pFrom, mPrereq, aiCurCol, pExpr)
}
-// Expression callback for exprUsesSrclist().
-func exprUsesSrclistCb(tls *libc.TLS, p uintptr, pExpr uintptr) int32 { /* sqlite3.c:147418:12: */
- if int32((*Expr)(unsafe.Pointer(pExpr)).Fop) == TK_COLUMN {
- var pSrc uintptr = *(*uintptr)(unsafe.Pointer(p + 40 /* &.u */))
- var iCsr int32 = (*Expr)(unsafe.Pointer(pExpr)).FiTable
- var ii int32
- for ii = 0; ii < (*SrcList)(unsafe.Pointer(pSrc)).FnSrc; ii++ {
- if (*SrcItem)(unsafe.Pointer((pSrc+8 /* &.a */)+uintptr(ii)*112)).FiCursor == iCsr {
- if (*Walker)(unsafe.Pointer(p)).FeCode != 0 {
- return WRC_Abort
- }
- return WRC_Continue
- }
- }
- if (*Walker)(unsafe.Pointer(p)).FeCode != 0 {
- return WRC_Continue
- }
- return WRC_Abort
- }
- return WRC_Continue
-}
-
-// Select callback for exprUsesSrclist().
-func exprUsesSrclistSelectCb(tls *libc.TLS, NotUsed1 uintptr, NotUsed2 uintptr) int32 { /* sqlite3.c:147436:12: */
- _ = NotUsed1
- _ = NotUsed2
- return WRC_Abort
-}
-
-// This function always returns true if expression pExpr contains
-// a sub-select.
-//
-// If there is no sub-select in pExpr, then return true if pExpr
-// contains a TK_COLUMN node for a table that is (bUses==1)
-// or is not (bUses==0) in pSrc.
-//
-// Said another way:
-//
-// bUses Return Meaning
-// -------- ------ ------------------------------------------------
-//
-// bUses==1 true pExpr contains either a sub-select or a
-// TK_COLUMN referencing pSrc.
-//
-// bUses==1 false pExpr contains no sub-selects and all TK_COLUMN
-// nodes reference tables not found in pSrc
-//
-// bUses==0 true pExpr contains either a sub-select or a TK_COLUMN
-// that references a table not in pSrc.
-//
-// bUses==0 false pExpr contains no sub-selects and all TK_COLUMN
-// nodes reference pSrc
-func exprUsesSrclist(tls *libc.TLS, pSrc uintptr, pExpr uintptr, bUses int32) int32 { /* sqlite3.c:147467:12: */
- bp := tls.Alloc(48)
- defer tls.Free(48)
-
- // var sWalker Walker at bp, 48
-
- libc.Xmemset(tls, bp /* &sWalker */, 0, uint64(unsafe.Sizeof(Walker{})))
- (*Walker)(unsafe.Pointer(bp /* &sWalker */)).FeCode = U16(bUses)
- *(*uintptr)(unsafe.Pointer(bp /* &sWalker */ + 40 /* &.u */)) = pSrc
- (*Walker)(unsafe.Pointer(bp /* &sWalker */)).FxExprCallback = *(*uintptr)(unsafe.Pointer(&struct {
- f func(*libc.TLS, uintptr, uintptr) int32
- }{exprUsesSrclistCb}))
- (*Walker)(unsafe.Pointer(bp /* &sWalker */)).FxSelectCallback = *(*uintptr)(unsafe.Pointer(&struct {
- f func(*libc.TLS, uintptr, uintptr) int32
- }{exprUsesSrclistSelectCb}))
- return (libc.Bool32(Xsqlite3WalkExpr(tls, bp /* &sWalker */, pExpr) == WRC_Abort))
-}
-
-// Context object used by exprExistsToInIter() as it iterates through an
-// expression tree.
-type ExistsToInCtx = struct {
- FpSrc uintptr
- FpInLhs uintptr
- FpEq uintptr
- FppAnd uintptr
- FppParent uintptr
-} /* sqlite3.c:147481:1 */
-
-// Iterate through all AND connected nodes in the expression tree
-// headed by (*ppExpr), populating the structure passed as the first
-// argument with the values required by exprAnalyzeExistsFindEq().
-//
-// This function returns non-zero if the expression tree does not meet
-// the two conditions described by the header comment for
-// exprAnalyzeExistsFindEq(), or zero if it does.
-func exprExistsToInIter(tls *libc.TLS, p uintptr, ppExpr uintptr) int32 { /* sqlite3.c:147498:12: */
- var pExpr uintptr = *(*uintptr)(unsafe.Pointer(ppExpr))
- switch int32((*Expr)(unsafe.Pointer(pExpr)).Fop) {
- case TK_AND:
- (*ExistsToInCtx)(unsafe.Pointer(p)).FppParent = ppExpr
- if exprExistsToInIter(tls, p, (pExpr+16 /* &.pLeft */)) != 0 {
- return 1
- }
- (*ExistsToInCtx)(unsafe.Pointer(p)).FppParent = ppExpr
- if exprExistsToInIter(tls, p, (pExpr+24 /* &.pRight */)) != 0 {
- return 1
- }
- break
- case TK_EQ:
- {
- var bLeft int32 = exprUsesSrclist(tls, (*ExistsToInCtx)(unsafe.Pointer(p)).FpSrc, (*Expr)(unsafe.Pointer(pExpr)).FpLeft, 0)
- var bRight int32 = exprUsesSrclist(tls, (*ExistsToInCtx)(unsafe.Pointer(p)).FpSrc, (*Expr)(unsafe.Pointer(pExpr)).FpRight, 0)
- if (bLeft != 0) || (bRight != 0) {
- if ((bLeft != 0) && (bRight != 0)) || ((*ExistsToInCtx)(unsafe.Pointer(p)).FpInLhs != 0) {
- return 1
- }
- (*ExistsToInCtx)(unsafe.Pointer(p)).FpInLhs = func() uintptr {
- if bLeft != 0 {
- return (*Expr)(unsafe.Pointer(pExpr)).FpLeft
- }
- return (*Expr)(unsafe.Pointer(pExpr)).FpRight
- }()
- if exprUsesSrclist(tls, (*ExistsToInCtx)(unsafe.Pointer(p)).FpSrc, (*ExistsToInCtx)(unsafe.Pointer(p)).FpInLhs, 1) != 0 {
- return 1
- }
- (*ExistsToInCtx)(unsafe.Pointer(p)).FpEq = pExpr
- (*ExistsToInCtx)(unsafe.Pointer(p)).FppAnd = (*ExistsToInCtx)(unsafe.Pointer(p)).FppParent
- }
- break
-
- }
- default:
- if exprUsesSrclist(tls, (*ExistsToInCtx)(unsafe.Pointer(p)).FpSrc, pExpr, 0) != 0 {
- return 1
- }
- break
- }
-
- return 0
-}
-
-// This function is used by exprAnalyzeExists() when creating virtual IN(...)
-// terms equivalent to user-supplied EXIST(...) clauses. It splits the WHERE
-// clause of the Select object passed as the first argument into one or more
-// expressions joined by AND operators, and then tests if the following are
-// true:
-//
-// 1. Exactly one of the AND separated terms refers to the outer
-// query, and it is an == (TK_EQ) expression.
-//
-// 2. Only one side of the == expression refers to the outer query, and
-// it does not refer to any columns from the inner query.
-//
-// If both these conditions are true, then a pointer to the side of the ==
-// expression that refers to the outer query is returned. The caller will
-// use this expression as the LHS of the IN(...) virtual term. Or, if one
-// or both of the above conditions are not true, NULL is returned.
-//
-// If non-NULL is returned and ppEq is non-NULL, *ppEq is set to point
-// to the == expression node before returning. If pppAnd is non-NULL and
-// the == node is not the root of the WHERE clause, then *pppAnd is set
-// to point to the pointer to the AND node that is the parent of the ==
-// node within the WHERE expression tree.
-func exprAnalyzeExistsFindEq(tls *libc.TLS, pSel uintptr, ppEq uintptr, pppAnd uintptr) uintptr { /* sqlite3.c:147553:13: */
- bp := tls.Alloc(40)
- defer tls.Free(40)
-
- // var ctx ExistsToInCtx at bp, 40
-
- libc.Xmemset(tls, bp /* &ctx */, 0, uint64(unsafe.Sizeof(ExistsToInCtx{})))
- (*ExistsToInCtx)(unsafe.Pointer(bp /* &ctx */)).FpSrc = (*Select)(unsafe.Pointer(pSel)).FpSrc
- if exprExistsToInIter(tls, bp /* &ctx */, (pSel+48 /* &.pWhere */)) != 0 {
- return uintptr(0)
- }
- if ppEq != 0 {
- *(*uintptr)(unsafe.Pointer(ppEq)) = (*ExistsToInCtx)(unsafe.Pointer(bp /* &ctx */)).FpEq
- }
- if pppAnd != 0 {
- *(*uintptr)(unsafe.Pointer(pppAnd)) = (*ExistsToInCtx)(unsafe.Pointer(bp /* &ctx */)).FppAnd
- }
- return (*ExistsToInCtx)(unsafe.Pointer(bp /* &ctx */)).FpInLhs
-}
-
-// Term idxTerm of the WHERE clause passed as the second argument is an
-// EXISTS expression with a correlated SELECT statement on the RHS.
-// This function analyzes the SELECT statement, and if possible adds an
-// equivalent "? IN(SELECT...)" virtual term to the WHERE clause.
-//
-// For an EXISTS term such as the following:
-//
-// EXISTS (SELECT ... FROM WHERE = AND )
-//
-// The virtual IN() term added is:
-//
-// IN (SELECT FROM WHERE )
-//
-// The virtual term is only added if the following conditions are met:
-//
-// 1. The sub-select must not be an aggregate or use window functions,
-//
-// 2. The sub-select must not be a compound SELECT,
-//
-// 3. Expression must refer to at least one column from the outer
-// query, and must not refer to any column from the inner query
-// (i.e. from ).
-//
-// 4. and must not refer to any values from the outer query.
-// In other words, once has been removed, the inner query
-// must not be correlated.
-//
-func exprAnalyzeExists(tls *libc.TLS, pSrc uintptr, pWC uintptr, idxTerm int32) { /* sqlite3.c:147598:13: */
- bp := tls.Alloc(16)
- defer tls.Free(16)
-
- var pParse uintptr = (*WhereInfo)(unsafe.Pointer((*WhereClause)(unsafe.Pointer(pWC)).FpWInfo)).FpParse
- var pTerm uintptr = ((*WhereClause)(unsafe.Pointer(pWC)).Fa + uintptr(idxTerm)*56)
- var pExpr uintptr = (*WhereTerm)(unsafe.Pointer(pTerm)).FpExpr
- var pSel uintptr = *(*uintptr)(unsafe.Pointer(pExpr + 32 /* &.x */))
- var pDup uintptr = uintptr(0)
- *(*uintptr)(unsafe.Pointer(bp /* pEq */)) = uintptr(0)
- var pRet uintptr = uintptr(0)
- var pInLhs uintptr = uintptr(0)
- *(*uintptr)(unsafe.Pointer(bp + 8 /* ppAnd */)) = uintptr(0)
- var idxNew int32
- var db uintptr = (*Parse)(unsafe.Pointer(pParse)).Fdb
-
- if ((*Select)(unsafe.Pointer(pSel)).FselFlags & U32(SF_Aggregate)) != 0 {
- return
- }
- if (*Select)(unsafe.Pointer(pSel)).FpWin != 0 {
- return
- }
- if (*Select)(unsafe.Pointer(pSel)).FpPrior != 0 {
- return
- }
- if (*Select)(unsafe.Pointer(pSel)).FpWhere == uintptr(0) {
- return
- }
- if (*Select)(unsafe.Pointer(pSel)).FpLimit != 0 {
- return
- }
- if uintptr(0) == exprAnalyzeExistsFindEq(tls, pSel, uintptr(0), uintptr(0)) {
- return
- }
-
- pDup = Xsqlite3ExprDup(tls, db, pExpr, 0)
- if (*Sqlite3)(unsafe.Pointer(db)).FmallocFailed != 0 {
- Xsqlite3ExprDelete(tls, db, pDup)
- return
- }
- pSel = *(*uintptr)(unsafe.Pointer(pDup + 32 /* &.x */))
- Xsqlite3ExprListDelete(tls, db, (*Select)(unsafe.Pointer(pSel)).FpEList)
- (*Select)(unsafe.Pointer(pSel)).FpEList = uintptr(0)
-
- pInLhs = exprAnalyzeExistsFindEq(tls, pSel, bp /* &pEq */, bp+8 /* &ppAnd */)
-
- if pInLhs == (*Expr)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp /* pEq */)))).FpLeft {
- pRet = (*Expr)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp /* pEq */)))).FpRight
- } else {
- var p uintptr = Xsqlite3ExprCompareCollSeq(tls, pParse, *(*uintptr)(unsafe.Pointer(bp /* pEq */)))
- pInLhs = Xsqlite3ExprAddCollateString(tls, pParse, pInLhs, func() uintptr {
- if p != 0 {
- return (*CollSeq)(unsafe.Pointer(p)).FzName
- }
- return ts + 266 /* "BINARY" */
- }())
- pRet = (*Expr)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp /* pEq */)))).FpLeft
- }
-
- (*Expr)(unsafe.Pointer(pDup)).Fop = U8(TK_IN)
- (*Expr)(unsafe.Pointer(pDup)).FpLeft = pInLhs
- *(*U32)(unsafe.Pointer(pDup + 4 /* &.flags */)) &= (libc.Uint32FromInt32(libc.CplInt32(EP_VarSelect)))
- if int32((*Expr)(unsafe.Pointer(pRet)).Fop) == TK_VECTOR {
- (*Select)(unsafe.Pointer(pSel)).FpEList = *(*uintptr)(unsafe.Pointer(pRet + 32 /* &.x */))
- *(*uintptr)(unsafe.Pointer(pRet + 32 /* &.x */)) = uintptr(0)
- Xsqlite3ExprDelete(tls, db, pRet)
- } else {
- (*Select)(unsafe.Pointer(pSel)).FpEList = Xsqlite3ExprListAppend(tls, pParse, uintptr(0), pRet)
- }
- (*Expr)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp /* pEq */)))).FpLeft = uintptr(0)
- (*Expr)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp /* pEq */)))).FpRight = uintptr(0)
- if *(*uintptr)(unsafe.Pointer(bp + 8 /* ppAnd */)) != 0 {
- var pAnd uintptr = *(*uintptr)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 8 /* ppAnd */))))
- var pOther uintptr
- if (*Expr)(unsafe.Pointer(pAnd)).FpLeft == *(*uintptr)(unsafe.Pointer(bp /* pEq */)) {
- pOther = (*Expr)(unsafe.Pointer(pAnd)).FpRight
- } else {
- pOther = (*Expr)(unsafe.Pointer(pAnd)).FpLeft
- }
- (*Expr)(unsafe.Pointer(pAnd)).FpLeft = libc.AssignPtrUintptr(pAnd+24 /* &.pRight */, uintptr(0))
- Xsqlite3ExprDelete(tls, db, pAnd)
- *(*uintptr)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 8 /* ppAnd */)))) = pOther
- } else {
-
- (*Select)(unsafe.Pointer(pSel)).FpWhere = uintptr(0)
- }
- Xsqlite3ExprDelete(tls, db, *(*uintptr)(unsafe.Pointer(bp /* pEq */)))
-
- idxNew = whereClauseInsert(tls, pWC, pDup, (uint16(TERM_VIRTUAL | TERM_DYNAMIC)))
- exprAnalyze(tls, pSrc, pWC, idxNew)
- markTermAsChild(tls, pWC, idxNew, idxTerm)
- *(*U16)(unsafe.Pointer((*WhereClause)(unsafe.Pointer(pWC)).Fa + uintptr(idxTerm)*56 + 18 /* &.wtFlags */)) |= U16((TERM_COPIED))
-}
-
// The input to this routine is an WhereTerm structure with only the
// "pExpr" field filled in. The job of this routine is to analyze the
// subexpression and populate all the other fields of the WhereTerm
@@ -127910,7 +130409,7 @@ func exprAnalyzeExists(tls *libc.TLS, pSrc uintptr, pWC uintptr, idxTerm int32)
// needs to be freed with the WhereClause) and TERM_VIRTUAL (because it
// is a commuted copy of a prior term.) The original term has nChild=1
// and the copy has idxParent set to the index of the original term.
-func exprAnalyze(tls *libc.TLS, pSrc uintptr, pWC uintptr, idxTerm int32) { /* sqlite3.c:147704:13: */
+func exprAnalyze(tls *libc.TLS, pSrc uintptr, pWC uintptr, idxTerm int32) { /* sqlite3.c:148632:13: */
bp := tls.Alloc(48)
defer tls.Free(48)
@@ -127965,7 +130464,7 @@ func exprAnalyze(tls *libc.TLS, pSrc uintptr, pWC uintptr, idxTerm int32) { /* s
extraRight = (x - uint64(1)) // ON clause terms may not be used with an index
// on left table of a LEFT JOIN. Ticket #3015
if (prereqAll >> 1) >= x {
- Xsqlite3ErrorMsg(tls, pParse, ts+19668 /* "ON clause refere..." */, 0)
+ Xsqlite3ErrorMsg(tls, pParse, ts+20128 /* "ON clause refere..." */, 0)
return
}
}
@@ -127998,8 +130497,9 @@ func exprAnalyze(tls *libc.TLS, pSrc uintptr, pWC uintptr, idxTerm int32) { /* s
if op == TK_IS {
*(*U16)(unsafe.Pointer(pTerm + 18 /* &.wtFlags */)) |= U16((TERM_IS))
}
- if (pRight != 0) &&
- (exprMightBeIndexed(tls, pSrc, (*WhereTerm)(unsafe.Pointer(pTerm)).FprereqRight, bp /* &aiCurCol[0] */, pRight, op) != 0) {
+ if ((pRight != 0) &&
+ (exprMightBeIndexed(tls, pSrc, (*WhereTerm)(unsafe.Pointer(pTerm)).FprereqRight, bp /* &aiCurCol[0] */, pRight, op) != 0)) &&
+ !(((*Expr)(unsafe.Pointer((pRight))).Fflags & (U32(EP_FixedCol))) != U32(0)) {
var pNew uintptr
var pDup uintptr
var eExtraOp U16 = U16(0) // Extra bits for pNew->eOperator
@@ -128040,7 +130540,7 @@ func exprAnalyze(tls *libc.TLS, pSrc uintptr, pWC uintptr, idxTerm int32) { /* s
(*WhereTerm)(unsafe.Pointer(pNew)).FeOperator = (U16((int32(operatorMask(tls, int32((*Expr)(unsafe.Pointer(pDup)).Fop))) + int32(eExtraOp)) & int32(opMask)))
} else if (op == TK_ISNULL) && (0 == Xsqlite3ExprCanBeNull(tls, pLeft)) {
(*Expr)(unsafe.Pointer(pExpr)).Fop = U8(TK_TRUEFALSE)
- *(*uintptr)(unsafe.Pointer(pExpr + 8 /* &.u */)) = ts + 5644 /* "false" */
+ *(*uintptr)(unsafe.Pointer(pExpr + 8 /* &.u */)) = ts + 5775 /* "false" */
*(*U32)(unsafe.Pointer(pExpr + 4 /* &.flags */)) |= (U32(EP_IsFalse))
(*WhereTerm)(unsafe.Pointer(pTerm)).FprereqAll = uint64(0)
(*WhereTerm)(unsafe.Pointer(pTerm)).FeOperator = U16(0)
@@ -128066,12 +130566,6 @@ func exprAnalyze(tls *libc.TLS, pSrc uintptr, pWC uintptr, idxTerm int32) { /* s
exprAnalyzeOrTerm(tls, pSrc, pWC, idxTerm)
pTerm = ((*WhereClause)(unsafe.Pointer(pWC)).Fa + uintptr(idxTerm)*56)
- } else if int32((*Expr)(unsafe.Pointer(pExpr)).Fop) == TK_EXISTS {
- // Perhaps treat an EXISTS operator as an IN operator
- if (((*Expr)(unsafe.Pointer(pExpr)).Fflags & U32(EP_VarSelect)) != U32(0)) &&
- (((*Sqlite3)(unsafe.Pointer((db))).FdbOptFlags & (U32(SQLITE_ExistsToIN))) == U32(0)) {
- exprAnalyzeExists(tls, pSrc, pWC, idxTerm)
- }
} else if int32((*Expr)(unsafe.Pointer(pExpr)).Fop) == TK_NOTNULL {
if ((int32((*Expr)(unsafe.Pointer((*Expr)(unsafe.Pointer(pExpr)).FpLeft)).Fop) == TK_COLUMN) &&
(int32((*Expr)(unsafe.Pointer((*Expr)(unsafe.Pointer(pExpr)).FpLeft)).FiColumn) >= 0)) &&
@@ -128119,11 +130613,11 @@ func exprAnalyze(tls *libc.TLS, pSrc uintptr, pWC uintptr, idxTerm int32) { /* s
// the range constraints also work for BLOBs
if (*(*int32)(unsafe.Pointer(bp + 20 /* noCase */)) != 0) && !(int32((*Sqlite3)(unsafe.Pointer((*Parse)(unsafe.Pointer(pParse)).Fdb)).FmallocFailed) != 0) {
var i int32
- var c int8
+ var c uint8
*(*U16)(unsafe.Pointer(pTerm + 18 /* &.wtFlags */)) |= U16((TERM_LIKE))
- for i = 0; (int32(libc.AssignInt8(&c, *(*int8)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 8 /* pStr1 */)) + 8 /* &.u */)) + uintptr(i)))))) != 0; i++ {
- *(*int8)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 8 /* pStr1 */)) + 8 /* &.u */)) + uintptr(i))) = (int8((int32(c)) & ^(int32(Xsqlite3CtypeMap[uint8(c)]) & 0x20)))
- *(*int8)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(pStr2 + 8 /* &.u */)) + uintptr(i))) = int8(Xsqlite3UpperToLower[uint8(c)])
+ for i = 0; (int32(libc.AssignUint8(&c, *(*uint8)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 8 /* pStr1 */)) + 8 /* &.u */)) + uintptr(i)))))) != 0; i++ {
+ *(*uint8)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 8 /* pStr1 */)) + 8 /* &.u */)) + uintptr(i))) = (uint8((int32(c)) & ^(int32(Xsqlite3CtypeMap[uint8(c)]) & 0x20)))
+ *(*uint8)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(pStr2 + 8 /* &.u */)) + uintptr(i))) = uint8(Xsqlite3UpperToLower[uint8(c)])
}
}
@@ -128147,7 +130641,7 @@ func exprAnalyze(tls *libc.TLS, pSrc uintptr, pWC uintptr, idxTerm int32) { /* s
}
zCollSeqName = func() uintptr {
if *(*int32)(unsafe.Pointer(bp + 20 /* noCase */)) != 0 {
- return ts + 19709 /* "NOCASE" */
+ return ts + 20169 /* "NOCASE" */
}
return uintptr(unsafe.Pointer(&Xsqlite3StrBINARY))
}()
@@ -128265,7 +130759,7 @@ func exprAnalyze(tls *libc.TLS, pSrc uintptr, pWC uintptr, idxTerm int32) { /* s
*(*Bitmask)(unsafe.Pointer(pTerm + 40 /* &.prereqRight */)) |= (extraRight)
}
-var ops = [2]U8{U8(TK_GE), U8(TK_LE)} /* sqlite3.c:147847:21 */
+var ops = [2]U8{U8(TK_GE), U8(TK_LE)} /* sqlite3.c:148776:21 */
// **************************************************************************
//
@@ -128288,7 +130782,7 @@ var ops = [2]U8{U8(TK_GE), U8(TK_LE)} /* sqlite3.c:147847:21 */
// In the previous sentence and in the diagram, "slot[]" refers to
// the WhereClause.a[] array. The slot[] array grows as needed to contain
// all terms of the WHERE clause.
-func Xsqlite3WhereSplit(tls *libc.TLS, pWC uintptr, pExpr uintptr, op U8) { /* sqlite3.c:148143:21: */
+func Xsqlite3WhereSplit(tls *libc.TLS, pWC uintptr, pExpr uintptr, op U8) { /* sqlite3.c:149062:21: */
var pE2 uintptr = Xsqlite3ExprSkipCollateAndLikely(tls, pExpr)
(*WhereClause)(unsafe.Pointer(pWC)).Fop = op
@@ -128304,7 +130798,7 @@ func Xsqlite3WhereSplit(tls *libc.TLS, pWC uintptr, pExpr uintptr, op U8) { /* s
}
// Initialize a preallocated WhereClause structure.
-func Xsqlite3WhereClauseInit(tls *libc.TLS, pWC uintptr, pWInfo uintptr) { /* sqlite3.c:148159:21: */
+func Xsqlite3WhereClauseInit(tls *libc.TLS, pWC uintptr, pWInfo uintptr) { /* sqlite3.c:149078:21: */
(*WhereClause)(unsafe.Pointer(pWC)).FpWInfo = pWInfo
(*WhereClause)(unsafe.Pointer(pWC)).FhasOr = U8(0)
(*WhereClause)(unsafe.Pointer(pWC)).FpOuter = uintptr(0)
@@ -128316,7 +130810,7 @@ func Xsqlite3WhereClauseInit(tls *libc.TLS, pWC uintptr, pWInfo uintptr) { /* sq
// Deallocate a WhereClause structure. The WhereClause structure
// itself is not freed. This routine is the inverse of
// sqlite3WhereClauseInit().
-func Xsqlite3WhereClauseClear(tls *libc.TLS, pWC uintptr) { /* sqlite3.c:148176:21: */
+func Xsqlite3WhereClauseClear(tls *libc.TLS, pWC uintptr) { /* sqlite3.c:149095:21: */
var i int32
var a uintptr
var db uintptr = (*Parse)(unsafe.Pointer((*WhereInfo)(unsafe.Pointer((*WhereClause)(unsafe.Pointer(pWC)).FpWInfo)).FpParse)).Fdb
@@ -128353,7 +130847,7 @@ __3:
// These routines walk (recursively) an expression tree and generate
// a bitmask indicating which tables are used in that expression
// tree.
-func Xsqlite3WhereExprUsageNN(tls *libc.TLS, pMaskSet uintptr, p uintptr) Bitmask { /* sqlite3.c:148201:24: */
+func Xsqlite3WhereExprUsageNN(tls *libc.TLS, pMaskSet uintptr, p uintptr) Bitmask { /* sqlite3.c:149120:24: */
var mask Bitmask
if (int32((*Expr)(unsafe.Pointer(p)).Fop) == TK_COLUMN) && !(((*Expr)(unsafe.Pointer((p))).Fflags & (U32(EP_FixedCol))) != U32(0)) {
return Xsqlite3WhereGetMask(tls, pMaskSet, (*Expr)(unsafe.Pointer(p)).FiTable)
@@ -128388,14 +130882,14 @@ func Xsqlite3WhereExprUsageNN(tls *libc.TLS, pMaskSet uintptr, p uintptr) Bitmas
return mask
}
-func Xsqlite3WhereExprUsage(tls *libc.TLS, pMaskSet uintptr, p uintptr) Bitmask { /* sqlite3.c:148229:24: */
+func Xsqlite3WhereExprUsage(tls *libc.TLS, pMaskSet uintptr, p uintptr) Bitmask { /* sqlite3.c:149148:24: */
if p != 0 {
return Xsqlite3WhereExprUsageNN(tls, pMaskSet, p)
}
return uint64(0)
}
-func Xsqlite3WhereExprListUsage(tls *libc.TLS, pMaskSet uintptr, pList uintptr) Bitmask { /* sqlite3.c:148232:24: */
+func Xsqlite3WhereExprListUsage(tls *libc.TLS, pMaskSet uintptr, pList uintptr) Bitmask { /* sqlite3.c:149151:24: */
var i int32
var mask Bitmask = uint64(0)
if pList != 0 {
@@ -128412,7 +130906,7 @@ func Xsqlite3WhereExprListUsage(tls *libc.TLS, pMaskSet uintptr, pList uintptr)
// end of the WHERE clause. We do not want to analyze these new
// virtual terms, so start analyzing at the end and work forward
// so that the added virtual terms are never processed.
-func Xsqlite3WhereExprAnalyze(tls *libc.TLS, pTabList uintptr, pWC uintptr) { /* sqlite3.c:148252:21: */
+func Xsqlite3WhereExprAnalyze(tls *libc.TLS, pTabList uintptr, pWC uintptr) { /* sqlite3.c:149171:21: */
var i int32
for i = ((*WhereClause)(unsafe.Pointer(pWC)).FnTerm - 1); i >= 0; i-- {
exprAnalyze(tls, pTabList, pWC, i)
@@ -128424,7 +130918,7 @@ func Xsqlite3WhereExprAnalyze(tls *libc.TLS, pTabList uintptr, pWC uintptr) { /*
//
// Each function argument translates into an equality constraint against
// a HIDDEN column in the table.
-func Xsqlite3WhereTabFuncArgs(tls *libc.TLS, pParse uintptr, pItem uintptr, pWC uintptr) { /* sqlite3.c:148269:21: */
+func Xsqlite3WhereTabFuncArgs(tls *libc.TLS, pParse uintptr, pItem uintptr, pWC uintptr) { /* sqlite3.c:149188:21: */
bp := tls.Alloc(16)
defer tls.Free(16)
@@ -128434,7 +130928,7 @@ func Xsqlite3WhereTabFuncArgs(tls *libc.TLS, pParse uintptr, pItem uintptr, pWC
var pArgs uintptr
var pColRef uintptr
var pTerm uintptr
- if (int32(*(*uint8)(unsafe.Pointer((pItem + 60 /* &.fg */) + 4 /* &.isTabFunc */)) >> 5 & 0x1)) == 0 {
+ if (int32(*(*uint16)(unsafe.Pointer((pItem + 60 /* &.fg */) + 4 /* &.isTabFunc */)) & 0x2000 >> 13)) == 0 {
return
}
pTab = (*SrcItem)(unsafe.Pointer(pItem)).FpTab
@@ -128449,7 +130943,7 @@ func Xsqlite3WhereTabFuncArgs(tls *libc.TLS, pParse uintptr, pItem uintptr, pWC
k++
}
if k >= int32((*Table)(unsafe.Pointer(pTab)).FnCol) {
- Xsqlite3ErrorMsg(tls, pParse, ts+19716, /* "too many argumen..." */
+ Xsqlite3ErrorMsg(tls, pParse, ts+20176, /* "too many argumen..." */
libc.VaList(bp, (*Table)(unsafe.Pointer(pTab)).FzName, j))
return
}
@@ -128501,7 +130995,7 @@ func Xsqlite3WhereTabFuncArgs(tls *libc.TLS, pParse uintptr, pItem uintptr, pWC
type HiddenIndexInfo1 = struct {
FpWC uintptr
FpParse uintptr
-} /* sqlite3.c:148339:9 */
+} /* sqlite3.c:149258:9 */
//************* End of whereexpr.c ******************************************
//************* Begin file where.c ******************************************
@@ -128531,16 +131025,16 @@ type HiddenIndexInfo1 = struct {
// This object is not an API and can be changed from one release to the
// next. As long as allocateIndexInfo() and sqlite3_vtab_collation()
// agree on the structure, all will be well.
-type HiddenIndexInfo = HiddenIndexInfo1 /* sqlite3.c:148339:32 */
+type HiddenIndexInfo = HiddenIndexInfo1 /* sqlite3.c:149258:32 */
// Return the estimated number of output rows from a WHERE clause
-func Xsqlite3WhereOutputRowCount(tls *libc.TLS, pWInfo uintptr) LogEst { /* sqlite3.c:148351:23: */
+func Xsqlite3WhereOutputRowCount(tls *libc.TLS, pWInfo uintptr) LogEst { /* sqlite3.c:149270:23: */
return (*WhereInfo)(unsafe.Pointer(pWInfo)).FnRowOut
}
// Return one of the WHERE_DISTINCT_xxxxx values to indicate how this
// WHERE clause returns outputs for DISTINCT processing.
-func Xsqlite3WhereIsDistinct(tls *libc.TLS, pWInfo uintptr) int32 { /* sqlite3.c:148359:20: */
+func Xsqlite3WhereIsDistinct(tls *libc.TLS, pWInfo uintptr) int32 { /* sqlite3.c:149278:20: */
return int32((*WhereInfo)(unsafe.Pointer(pWInfo)).FeDistinct)
}
@@ -128550,7 +131044,7 @@ func Xsqlite3WhereIsDistinct(tls *libc.TLS, pWInfo uintptr) int32 { /* sqlite3.c
// terms means that no sorting is needed at all. A return that
// is positive but less than the number of ORDER BY terms means that
// block sorting is required.
-func Xsqlite3WhereIsOrdered(tls *libc.TLS, pWInfo uintptr) int32 { /* sqlite3.c:148371:20: */
+func Xsqlite3WhereIsOrdered(tls *libc.TLS, pWInfo uintptr) int32 { /* sqlite3.c:149290:20: */
return int32((*WhereInfo)(unsafe.Pointer(pWInfo)).FnOBSat)
}
@@ -128575,9 +131069,9 @@ func Xsqlite3WhereIsOrdered(tls *libc.TLS, pWInfo uintptr) int32 { /* sqlite3.c:
// Returning the continuation the second inner loop is an optimization
// that might make the code run a little faster, but should not change
// the final answer.
-func Xsqlite3WhereOrderByLimitOptLabel(tls *libc.TLS, pWInfo uintptr) int32 { /* sqlite3.c:148398:20: */
+func Xsqlite3WhereOrderByLimitOptLabel(tls *libc.TLS, pWInfo uintptr) int32 { /* sqlite3.c:149317:20: */
var pInner uintptr
- if !((int32(*(*uint8)(unsafe.Pointer(pWInfo + 68 /* &.bOrderedInnerLoop */)) >> 5 & 0x1)) != 0) {
+ if !((int32(*(*uint8)(unsafe.Pointer(pWInfo + 68 /* &.bOrderedInnerLoop */)) & 0x20 >> 5)) != 0) {
// The ORDER BY LIMIT optimization does not apply. Jump to the
// continuation of the inner-most loop.
return (*WhereInfo)(unsafe.Pointer(pWInfo)).FiContinue
@@ -128596,10 +131090,10 @@ func Xsqlite3WhereOrderByLimitOptLabel(tls *libc.TLS, pWInfo uintptr) int32 { /*
// Any extra OP_Goto that is coded here is an optimization. The
// correct answer should be obtained regardless. This OP_Goto just
// makes the answer appear faster.
-func Xsqlite3WhereMinMaxOptEarlyOut(tls *libc.TLS, v uintptr, pWInfo uintptr) { /* sqlite3.c:148421:21: */
+func Xsqlite3WhereMinMaxOptEarlyOut(tls *libc.TLS, v uintptr, pWInfo uintptr) { /* sqlite3.c:149340:21: */
var pInner uintptr
var i int32
- if !((int32(*(*uint8)(unsafe.Pointer(pWInfo + 68 /* &.bOrderedInnerLoop */)) >> 5 & 0x1)) != 0) {
+ if !((int32(*(*uint8)(unsafe.Pointer(pWInfo + 68 /* &.bOrderedInnerLoop */)) & 0x20 >> 5)) != 0) {
return
}
if int32((*WhereInfo)(unsafe.Pointer(pWInfo)).FnOBSat) == 0 {
@@ -128617,14 +131111,14 @@ func Xsqlite3WhereMinMaxOptEarlyOut(tls *libc.TLS, v uintptr, pWInfo uintptr) {
// Return the VDBE address or label to jump to in order to continue
// immediately with the next row of a WHERE clause.
-func Xsqlite3WhereContinueLabel(tls *libc.TLS, pWInfo uintptr) int32 { /* sqlite3.c:148440:20: */
+func Xsqlite3WhereContinueLabel(tls *libc.TLS, pWInfo uintptr) int32 { /* sqlite3.c:149359:20: */
return (*WhereInfo)(unsafe.Pointer(pWInfo)).FiContinue
}
// Return the VDBE address or label to jump to in order to break
// out of a WHERE loop.
-func Xsqlite3WhereBreakLabel(tls *libc.TLS, pWInfo uintptr) int32 { /* sqlite3.c:148449:20: */
+func Xsqlite3WhereBreakLabel(tls *libc.TLS, pWInfo uintptr) int32 { /* sqlite3.c:149368:20: */
return (*WhereInfo)(unsafe.Pointer(pWInfo)).FiBreak
}
@@ -128643,19 +131137,19 @@ func Xsqlite3WhereBreakLabel(tls *libc.TLS, pWInfo uintptr) int32 { /* sqlite3.c
//
// aiCur[0] and aiCur[1] both get -1 if the where-clause logic is
// unable to use the ONEPASS optimization.
-func Xsqlite3WhereOkOnePass(tls *libc.TLS, pWInfo uintptr, aiCur uintptr) int32 { /* sqlite3.c:148470:20: */
+func Xsqlite3WhereOkOnePass(tls *libc.TLS, pWInfo uintptr, aiCur uintptr) int32 { /* sqlite3.c:149389:20: */
libc.Xmemcpy(tls, aiCur, pWInfo+40 /* &.aiCurOnePass */, (uint64(unsafe.Sizeof(int32(0))) * uint64(2)))
return int32((*WhereInfo)(unsafe.Pointer(pWInfo)).FeOnePass)
}
// Return TRUE if the WHERE loop uses the OP_DeferredSeek opcode to move
// the data cursor to the row selected by the index cursor.
-func Xsqlite3WhereUsesDeferredSeek(tls *libc.TLS, pWInfo uintptr) int32 { /* sqlite3.c:148486:20: */
- return (int32(*(*uint8)(unsafe.Pointer(pWInfo + 68 /* &.bDeferredSeek */)) >> 7 & 0x1))
+func Xsqlite3WhereUsesDeferredSeek(tls *libc.TLS, pWInfo uintptr) int32 { /* sqlite3.c:149405:20: */
+ return (int32(*(*uint8)(unsafe.Pointer(pWInfo + 68 /* &.bDeferredSeek */)) & 0x80 >> 7))
}
// Move the content of pSrc into pDest
-func whereOrMove(tls *libc.TLS, pDest uintptr, pSrc uintptr) { /* sqlite3.c:148493:13: */
+func whereOrMove(tls *libc.TLS, pDest uintptr, pSrc uintptr) { /* sqlite3.c:149412:13: */
(*WhereOrSet)(unsafe.Pointer(pDest)).Fn = (*WhereOrSet)(unsafe.Pointer(pSrc)).Fn
libc.Xmemcpy(tls, pDest+8 /* &.a */, pSrc+8 /* &.a */, (uint64((*WhereOrSet)(unsafe.Pointer(pDest)).Fn) * uint64(unsafe.Sizeof(WhereOrCost{}))))
}
@@ -128665,7 +131159,7 @@ func whereOrMove(tls *libc.TLS, pDest uintptr, pSrc uintptr) { /* sqlite3.c:1484
// The new entry might overwrite an existing entry, or it might be
// appended, or it might be discarded. Do whatever is the right thing
// so that pSet keeps the N_OR_COST best entries seen so far.
-func whereOrInsert(tls *libc.TLS, pSet uintptr, prereq Bitmask, rRun LogEst, nOut LogEst) int32 { /* sqlite3.c:148505:12: */
+func whereOrInsert(tls *libc.TLS, pSet uintptr, prereq Bitmask, rRun LogEst, nOut LogEst) int32 { /* sqlite3.c:149424:12: */
var i U16
var p uintptr
i = (*WhereOrSet)(unsafe.Pointer(pSet)).Fn
@@ -128742,7 +131236,7 @@ __13:
// Return the bitmask for the given cursor number. Return 0 if
// iCursor is not in the set.
-func Xsqlite3WhereGetMask(tls *libc.TLS, pMaskSet uintptr, iCursor int32) Bitmask { /* sqlite3.c:148542:24: */
+func Xsqlite3WhereGetMask(tls *libc.TLS, pMaskSet uintptr, iCursor int32) Bitmask { /* sqlite3.c:149461:24: */
var i int32
for i = 0; i < (*WhereMaskSet)(unsafe.Pointer(pMaskSet)).Fn; i++ {
@@ -128759,16 +131253,16 @@ func Xsqlite3WhereGetMask(tls *libc.TLS, pMaskSet uintptr, iCursor int32) Bitmas
// tables in the FROM clause is limited by a test early in the
// sqlite3WhereBegin() routine. So we know that the pMaskSet->ix[]
// array will never overflow.
-func createMask(tls *libc.TLS, pMaskSet uintptr, iCursor int32) { /* sqlite3.c:148561:13: */
+func createMask(tls *libc.TLS, pMaskSet uintptr, iCursor int32) { /* sqlite3.c:149480:13: */
*(*int32)(unsafe.Pointer((pMaskSet + 8 /* &.ix */) + uintptr(libc.PostIncInt32(&(*WhereMaskSet)(unsafe.Pointer(pMaskSet)).Fn, 1))*4)) = iCursor
}
// If the right-hand branch of the expression is a TK_COLUMN, then return
// a pointer to the right-hand branch. Otherwise, return NULL.
-func whereRightSubexprIsColumn(tls *libc.TLS, p uintptr) uintptr { /* sqlite3.c:148570:13: */
+func whereRightSubexprIsColumn(tls *libc.TLS, p uintptr) uintptr { /* sqlite3.c:149489:13: */
p = Xsqlite3ExprSkipCollateAndLikely(tls, (*Expr)(unsafe.Pointer(p)).FpRight)
- if (p != uintptr(0)) && (int32((*Expr)(unsafe.Pointer(p)).Fop) == TK_COLUMN) {
+ if ((p != uintptr(0)) && (int32((*Expr)(unsafe.Pointer(p)).Fop) == TK_COLUMN)) && !(((*Expr)(unsafe.Pointer((p))).Fflags & (U32(EP_FixedCol))) != U32(0)) {
return p
}
return uintptr(0)
@@ -128777,7 +131271,7 @@ func whereRightSubexprIsColumn(tls *libc.TLS, p uintptr) uintptr { /* sqlite3.c:
// Advance to the next WhereTerm that matches according to the criteria
// established when the pScan object was initialized by whereScanInit().
// Return NULL if there are no more matching WhereTerms.
-func whereScanNext(tls *libc.TLS, pScan uintptr) uintptr { /* sqlite3.c:148581:18: */
+func whereScanNext(tls *libc.TLS, pScan uintptr) uintptr { /* sqlite3.c:149502:18: */
var iCur int32 // The cursor on the LHS of the term
var iColumn I16 // The column on the LHS of the term. -1 for IPK
var pX uintptr // An expression being tested
@@ -128876,7 +131370,7 @@ func whereScanNext(tls *libc.TLS, pScan uintptr) uintptr { /* sqlite3.c:148581:1
// It is factored out into a separate tail-recursion subroutine so that
// the normal whereScanInit() routine, which is a high-runner, does not
// need to push registers onto the stack as part of its prologue.
-func whereScanInitIndexExpr(tls *libc.TLS, pScan uintptr) uintptr { /* sqlite3.c:148668:34: */
+func whereScanInitIndexExpr(tls *libc.TLS, pScan uintptr) uintptr { /* sqlite3.c:149601:34: */
(*WhereScan)(unsafe.Pointer(pScan)).Fidxaff = Xsqlite3ExprAffinity(tls, (*WhereScan)(unsafe.Pointer(pScan)).FpIdxExpr)
return whereScanNext(tls, pScan)
}
@@ -128898,11 +131392,11 @@ func whereScanInitIndexExpr(tls *libc.TLS, pScan uintptr) uintptr { /* sqlite3.c
//
// If X is not the INTEGER PRIMARY KEY then X must be compatible with
// index pIdx.
-func whereScanInit(tls *libc.TLS, pScan uintptr, pWC uintptr, iCur int32, iColumn int32, opMask U32, pIdx uintptr) uintptr { /* sqlite3.c:148692:18: */
+func whereScanInit(tls *libc.TLS, pScan uintptr, pWC uintptr, iCur int32, iColumn int32, opMask U32, pIdx uintptr) uintptr { /* sqlite3.c:149625:18: */
(*WhereScan)(unsafe.Pointer(pScan)).FpOrigWC = pWC
(*WhereScan)(unsafe.Pointer(pScan)).FpWC = pWC
(*WhereScan)(unsafe.Pointer(pScan)).FpIdxExpr = uintptr(0)
- (*WhereScan)(unsafe.Pointer(pScan)).Fidxaff = int8(0)
+ (*WhereScan)(unsafe.Pointer(pScan)).Fidxaff = uint8(0)
(*WhereScan)(unsafe.Pointer(pScan)).FzCollName = uintptr(0)
(*WhereScan)(unsafe.Pointer(pScan)).FopMask = opMask
(*WhereScan)(unsafe.Pointer(pScan)).Fk = 0
@@ -128953,7 +131447,7 @@ func whereScanInit(tls *libc.TLS, pScan uintptr, pWC uintptr, iCur int32, iColum
// the form "X Y" where Y is a column in another table if no terms of
// the form "X " exist. If no terms with a constant RHS
// exist, try to return a term that does not use WO_EQUIV.
-func Xsqlite3WhereFindTerm(tls *libc.TLS, pWC uintptr, iCur int32, iColumn int32, notReady Bitmask, op U32, pIdx uintptr) uintptr { /* sqlite3.c:148756:26: */
+func Xsqlite3WhereFindTerm(tls *libc.TLS, pWC uintptr, iCur int32, iColumn int32, notReady Bitmask, op U32, pIdx uintptr) uintptr { /* sqlite3.c:149689:26: */
bp := tls.Alloc(112)
defer tls.Free(112)
@@ -128983,14 +131477,14 @@ func Xsqlite3WhereFindTerm(tls *libc.TLS, pWC uintptr, iCur int32, iColumn int32
//
// If such an expression is found, its index in pList->a[] is returned. If
// no expression is found, -1 is returned.
-func findIndexCol(tls *libc.TLS, pParse uintptr, pList uintptr, iBase int32, pIdx uintptr, iCol int32) int32 { /* sqlite3.c:148790:12: */
+func findIndexCol(tls *libc.TLS, pParse uintptr, pList uintptr, iBase int32, pIdx uintptr, iCol int32) int32 { /* sqlite3.c:149723:12: */
var i int32
var zColl uintptr = *(*uintptr)(unsafe.Pointer((*Index)(unsafe.Pointer(pIdx)).FazColl + uintptr(iCol)*8))
for i = 0; i < (*ExprList)(unsafe.Pointer(pList)).FnExpr; i++ {
var p uintptr = Xsqlite3ExprSkipCollateAndLikely(tls, (*ExprList_item)(unsafe.Pointer((pList+8 /* &.a */)+uintptr(i)*32)).FpExpr)
if (((p != uintptr(0)) &&
- (int32((*Expr)(unsafe.Pointer(p)).Fop) == TK_COLUMN)) &&
+ ((int32((*Expr)(unsafe.Pointer(p)).Fop) == TK_COLUMN) || (int32((*Expr)(unsafe.Pointer(p)).Fop) == TK_AGG_COLUMN))) &&
(int32((*Expr)(unsafe.Pointer(p)).FiColumn) == int32(*(*I16)(unsafe.Pointer((*Index)(unsafe.Pointer(pIdx)).FaiColumn + uintptr(iCol)*2))))) &&
((*Expr)(unsafe.Pointer(p)).FiTable == iBase) {
var pColl uintptr = Xsqlite3ExprNNCollSeq(tls, pParse, (*ExprList_item)(unsafe.Pointer((pList+8 /* &.a */)+uintptr(i)*32)).FpExpr)
@@ -129004,7 +131498,7 @@ func findIndexCol(tls *libc.TLS, pParse uintptr, pList uintptr, iBase int32, pId
}
// Return TRUE if the iCol-th column of index pIdx is NOT NULL
-func indexColumnNotNull(tls *libc.TLS, pIdx uintptr, iCol int32) int32 { /* sqlite3.c:148820:12: */
+func indexColumnNotNull(tls *libc.TLS, pIdx uintptr, iCol int32) int32 { /* sqlite3.c:149753:12: */
var j int32
j = int32(*(*I16)(unsafe.Pointer((*Index)(unsafe.Pointer(pIdx)).FaiColumn + uintptr(iCol)*2)))
@@ -129025,7 +131519,7 @@ func indexColumnNotNull(tls *libc.TLS, pIdx uintptr, iCol int32) int32 { /* sqli
//
// A DISTINCT list is redundant if any subset of the columns in the
// DISTINCT list are collectively unique and individually non-null.
-func isDistinctRedundant(tls *libc.TLS, pParse uintptr, pTabList uintptr, pWC uintptr, pDistinct uintptr) int32 { /* sqlite3.c:148843:12: */
+func isDistinctRedundant(tls *libc.TLS, pParse uintptr, pTabList uintptr, pWC uintptr, pDistinct uintptr) int32 { /* sqlite3.c:149776:12: */
var pTab uintptr
var pIdx uintptr
var i int32
@@ -129048,7 +131542,10 @@ func isDistinctRedundant(tls *libc.TLS, pParse uintptr, pTabList uintptr, pWC ui
if p == uintptr(0) {
continue
}
- if ((int32((*Expr)(unsafe.Pointer(p)).Fop) == TK_COLUMN) && ((*Expr)(unsafe.Pointer(p)).FiTable == iBase)) && (int32((*Expr)(unsafe.Pointer(p)).FiColumn) < 0) {
+ if (int32((*Expr)(unsafe.Pointer(p)).Fop) != TK_COLUMN) && (int32((*Expr)(unsafe.Pointer(p)).Fop) != TK_AGG_COLUMN) {
+ continue
+ }
+ if ((*Expr)(unsafe.Pointer(p)).FiTable == iBase) && (int32((*Expr)(unsafe.Pointer(p)).FiColumn) < 0) {
return 1
}
}
@@ -129069,6 +131566,9 @@ func isDistinctRedundant(tls *libc.TLS, pParse uintptr, pTabList uintptr, pWC ui
if !(int32((*Index)(unsafe.Pointer((pIdx))).FonError) != OE_None) {
continue
}
+ if (*Index)(unsafe.Pointer(pIdx)).FpPartIdxWhere != 0 {
+ continue
+ }
for i = 0; i < int32((*Index)(unsafe.Pointer(pIdx)).FnKeyCol); i++ {
if uintptr(0) == Xsqlite3WhereFindTerm(tls, pWC, iBase, i, libc.CplUint64(uint64(0)), uint32(WO_EQ), pIdx) {
if findIndexCol(tls, pParse, pDistinct, iBase, pIdx, i) < 0 {
@@ -129089,7 +131589,7 @@ func isDistinctRedundant(tls *libc.TLS, pParse uintptr, pTabList uintptr, pWC ui
}
// Estimate the logarithm of the input value to base 2.
-func estLog(tls *libc.TLS, N LogEst) LogEst { /* sqlite3.c:148905:15: */
+func estLog(tls *libc.TLS, N LogEst) LogEst { /* sqlite3.c:149840:15: */
if int32(N) <= 10 {
return int16(0)
}
@@ -129106,7 +131606,7 @@ func estLog(tls *libc.TLS, N LogEst) LogEst { /* sqlite3.c:148905:15: */
// cursor iTabCur are transformed into OP_Sequence opcode for the
// iAutoidxCur cursor, in order to generate unique rowids for the
// automatic index being generated.
-func translateColumnToCopy(tls *libc.TLS, pParse uintptr, iStart int32, iTabCur int32, iRegister int32, iAutoidxCur int32) { /* sqlite3.c:148921:13: */
+func translateColumnToCopy(tls *libc.TLS, pParse uintptr, iStart int32, iTabCur int32, iRegister int32, iAutoidxCur int32) { /* sqlite3.c:149856:13: */
var v uintptr = (*Parse)(unsafe.Pointer(pParse)).FpVdbe
var pOp uintptr = Xsqlite3VdbeGetOp(tls, v, iStart)
var iEnd int32 = Xsqlite3VdbeCurrentAddr(tls, v)
@@ -129127,14 +131627,8 @@ __1:
(*VdbeOp)(unsafe.Pointer(pOp)).Fp2 = (*VdbeOp)(unsafe.Pointer(pOp)).Fp3
(*VdbeOp)(unsafe.Pointer(pOp)).Fp3 = 0
} else if int32((*VdbeOp)(unsafe.Pointer(pOp)).Fopcode) == OP_Rowid {
- if iAutoidxCur != 0 {
- (*VdbeOp)(unsafe.Pointer(pOp)).Fopcode = U8(OP_Sequence)
- (*VdbeOp)(unsafe.Pointer(pOp)).Fp1 = iAutoidxCur
- } else {
- (*VdbeOp)(unsafe.Pointer(pOp)).Fopcode = U8(OP_Null)
- (*VdbeOp)(unsafe.Pointer(pOp)).Fp1 = 0
- (*VdbeOp)(unsafe.Pointer(pOp)).Fp3 = 0
- }
+ (*VdbeOp)(unsafe.Pointer(pOp)).Fopcode = U8(OP_Sequence)
+ (*VdbeOp)(unsafe.Pointer(pOp)).Fp1 = iAutoidxCur
}
}
@@ -129155,8 +131649,8 @@ __3:
// Return TRUE if the WHERE clause term pTerm is of a form where it
// could be used with an index to access pSrc, assuming an appropriate
// index existed.
-func termCanDriveIndex(tls *libc.TLS, pTerm uintptr, pSrc uintptr, notReady Bitmask) int32 { /* sqlite3.c:149003:12: */
- var aff int8
+func termCanDriveIndex(tls *libc.TLS, pTerm uintptr, pSrc uintptr, notReady Bitmask) int32 { /* sqlite3.c:149938:12: */
+ var aff uint8
if (*WhereTerm)(unsafe.Pointer(pTerm)).FleftCursor != (*SrcItem)(unsafe.Pointer(pSrc)).FiCursor {
return 0
}
@@ -129188,7 +131682,7 @@ func termCanDriveIndex(tls *libc.TLS, pTerm uintptr, pSrc uintptr, notReady Bitm
// Generate code to construct the Index object for an automatic index
// and to set up the WhereLevel object pLevel so that the code generator
// makes use of the automatic index.
-func constructAutomaticIndex(tls *libc.TLS, pParse uintptr, pWC uintptr, pSrc uintptr, notReady Bitmask, pLevel uintptr) { /* sqlite3.c:149036:13: */
+func constructAutomaticIndex(tls *libc.TLS, pParse uintptr, pWC uintptr, pSrc uintptr, notReady Bitmask, pLevel uintptr) { /* sqlite3.c:149971:13: */
bp := tls.Alloc(24)
defer tls.Free(24)
@@ -129272,7 +131766,7 @@ __4:
goto __6
}
Xsqlite3_log(tls, (SQLITE_WARNING | (int32(1) << 8)),
- ts+19752 /* "automatic index ..." */, libc.VaList(bp, (*Table)(unsafe.Pointer(pTable)).FzName,
+ ts+20212 /* "automatic index ..." */, libc.VaList(bp, (*Table)(unsafe.Pointer(pTable)).FzName,
(*Column)(unsafe.Pointer((*Table)(unsafe.Pointer(pTable)).FaCol+uintptr(iCol)*32)).FzName))
sentWarning = U8(1)
__6:
@@ -129353,7 +131847,7 @@ __13:
__14:
;
*(*uintptr)(unsafe.Pointer(pLoop + 24 /* &.u */ /* &.btree */ + 8 /* &.pIndex */)) = pIdx
- (*Index)(unsafe.Pointer(pIdx)).FzName = ts + 19778 /* "auto-index" */
+ (*Index)(unsafe.Pointer(pIdx)).FzName = ts + 20238 /* "auto-index" */
(*Index)(unsafe.Pointer(pIdx)).FpTable = pTable
n = 0
idxCols = uint64(0)
@@ -129453,7 +131947,7 @@ __24:
// Fill the automatic index with content
pTabItem = (((*WhereInfo)(unsafe.Pointer((*WhereClause)(unsafe.Pointer(pWC)).FpWInfo)).FpTabList + 8 /* &.a */) + uintptr((*WhereLevel)(unsafe.Pointer(pLevel)).FiFrom)*112)
- if !((uint32(int32(*(*uint8)(unsafe.Pointer(pTabItem + 60 /* &.fg */ + 4 /* &.viaCoroutine */)) >> 3 & 0x1))) != 0) {
+ if !((uint32(int32(*(*uint16)(unsafe.Pointer(pTabItem + 60 /* &.fg */ + 4 /* &.viaCoroutine */)) & 0x800 >> 11))) != 0) {
goto __28
}
regYield = (*SrcItem)(unsafe.Pointer(pTabItem)).FregReturn
@@ -129485,7 +131979,7 @@ __30:
Xsqlite3VdbeResolveLabel(tls, v, iContinue)
__31:
;
- if !((uint32(int32(*(*uint8)(unsafe.Pointer(pTabItem + 60 /* &.fg */ + 4 /* &.viaCoroutine */)) >> 3 & 0x1))) != 0) {
+ if !((uint32(int32(*(*uint16)(unsafe.Pointer(pTabItem + 60 /* &.fg */ + 4 /* &.viaCoroutine */)) & 0x800 >> 11))) != 0) {
goto __32
}
Xsqlite3VdbeChangeP2(tls, v, addrCounter, (regBase + n))
@@ -129493,7 +131987,7 @@ __31:
translateColumnToCopy(tls, pParse, addrTop, (*WhereLevel)(unsafe.Pointer(pLevel)).FiTabCur,
(*SrcItem)(unsafe.Pointer(pTabItem)).FregResult, (*WhereLevel)(unsafe.Pointer(pLevel)).FiIdxCur)
Xsqlite3VdbeGoto(tls, v, addrTop)
- libc.SetBitFieldPtr8Uint32(pTabItem+60 /* &.fg */ +4 /* &.viaCoroutine */, uint32(0), 4, 0x10)
+ libc.SetBitFieldPtr16Uint32(pTabItem+60 /* &.fg */ +4 /* &.viaCoroutine */, uint32(0), 11, 0x800)
goto __33
__32:
Xsqlite3VdbeAddOp2(tls, v, OP_Next, (*WhereLevel)(unsafe.Pointer(pLevel)).FiTabCur, (addrTop + 1))
@@ -129513,7 +132007,7 @@ end_auto_index_create:
// Allocate and populate an sqlite3_index_info structure. It is the
// responsibility of the caller to eventually release the structure
// by passing the pointer returned by this function to sqlite3_free().
-func allocateIndexInfo(tls *libc.TLS, pParse uintptr, pWC uintptr, mUnusable Bitmask, pSrc uintptr, pOrderBy uintptr, pmNoOmit uintptr) uintptr { /* sqlite3.c:149243:27: */
+func allocateIndexInfo(tls *libc.TLS, pParse uintptr, pWC uintptr, mUnusable Bitmask, pSrc uintptr, pOrderBy uintptr, pmNoOmit uintptr) uintptr { /* sqlite3.c:150178:27: */
var i int32
var j int32
var nTerm int32
@@ -129586,7 +132080,7 @@ __3:
((uint64(unsafe.Sizeof(sqlite3_index_constraint{})) + uint64(unsafe.Sizeof(sqlite3_index_constraint_usage{}))) * uint64(nTerm))) +
(uint64(unsafe.Sizeof(sqlite3_index_orderby{})) * uint64(nOrderBy))) + uint64(unsafe.Sizeof(HiddenIndexInfo1{})))))
if pIdxInfo == uintptr(0) {
- Xsqlite3ErrorMsg(tls, pParse, ts+5050 /* "out of memory" */, 0)
+ Xsqlite3ErrorMsg(tls, pParse, ts+5181 /* "out of memory" */, 0)
return uintptr(0)
}
pHidden = (pIdxInfo + 1*96)
@@ -129700,22 +132194,24 @@ __6:
// Whether or not an error is returned, it is the responsibility of the
// caller to eventually free p->idxStr if p->needToFreeIdxStr indicates
// that this is required.
-func vtabBestIndex(tls *libc.TLS, pParse uintptr, pTab uintptr, p uintptr) int32 { /* sqlite3.c:149398:12: */
+func vtabBestIndex(tls *libc.TLS, pParse uintptr, pTab uintptr, p uintptr) int32 { /* sqlite3.c:150333:12: */
bp := tls.Alloc(16)
defer tls.Free(16)
var pVtab uintptr = (*VTable)(unsafe.Pointer(Xsqlite3GetVTable(tls, (*Parse)(unsafe.Pointer(pParse)).Fdb, pTab))).FpVtab
var rc int32
- rc = (*(*func(*libc.TLS, uintptr, uintptr) int32)(unsafe.Pointer(((*Sqlite3_vtab)(unsafe.Pointer(pVtab)).FpModule + 24 /* &.xBestIndex */))))(tls, pVtab, p)
+ rc = (*struct {
+ f func(*libc.TLS, uintptr, uintptr) int32
+ })(unsafe.Pointer(&struct{ uintptr }{(*Sqlite3_module)(unsafe.Pointer((*Sqlite3_vtab)(unsafe.Pointer(pVtab)).FpModule)).FxBestIndex})).f(tls, pVtab, p)
if (rc != SQLITE_OK) && (rc != SQLITE_CONSTRAINT) {
if rc == SQLITE_NOMEM {
Xsqlite3OomFault(tls, (*Parse)(unsafe.Pointer(pParse)).Fdb)
} else if !(int32((*Sqlite3_vtab)(unsafe.Pointer(pVtab)).FzErrMsg) != 0) {
- Xsqlite3ErrorMsg(tls, pParse, ts+2718 /* "%s" */, libc.VaList(bp, Xsqlite3ErrStr(tls, rc)))
+ Xsqlite3ErrorMsg(tls, pParse, ts+2790 /* "%s" */, libc.VaList(bp, Xsqlite3ErrStr(tls, rc)))
} else {
- Xsqlite3ErrorMsg(tls, pParse, ts+2718 /* "%s" */, libc.VaList(bp+8, (*Sqlite3_vtab)(unsafe.Pointer(pVtab)).FzErrMsg))
+ Xsqlite3ErrorMsg(tls, pParse, ts+2790 /* "%s" */, libc.VaList(bp+8, (*Sqlite3_vtab)(unsafe.Pointer(pVtab)).FzErrMsg))
}
}
Xsqlite3_free(tls, (*Sqlite3_vtab)(unsafe.Pointer(pVtab)).FzErrMsg)
@@ -129734,7 +132230,7 @@ func vtabBestIndex(tls *libc.TLS, pParse uintptr, pTab uintptr, p uintptr) int32
// into the aSample[] array - it is an index into a virtual set of samples
// based on the contents of aSample[] and the number of fields in record
// pRec.
-func whereKeyStats(tls *libc.TLS, pParse uintptr, pIdx uintptr, pRec uintptr, roundUp int32, aStat uintptr) int32 { /* sqlite3.c:149435:12: */
+func whereKeyStats(tls *libc.TLS, pParse uintptr, pIdx uintptr, pRec uintptr, roundUp int32, aStat uintptr) int32 { /* sqlite3.c:150370:12: */
var aSample uintptr = (*Index)(unsafe.Pointer(pIdx)).FaSample
var iCol int32 // Index of required stats in anEq[] etc.
var i int32 // Index of first sample >= pRec
@@ -129873,7 +132369,7 @@ func whereKeyStats(tls *libc.TLS, pParse uintptr, pIdx uintptr, pRec uintptr, ro
// then the return value is the likelihood multiplied by the number of
// input rows. Otherwise, this function assumes that an "IS NOT NULL" term
// has a likelihood of 0.50, and any other term a likelihood of 0.25.
-func whereRangeAdjust(tls *libc.TLS, pTerm uintptr, nNew LogEst) LogEst { /* sqlite3.c:149627:15: */
+func whereRangeAdjust(tls *libc.TLS, pTerm uintptr, nNew LogEst) LogEst { /* sqlite3.c:150562:15: */
var nRet LogEst = nNew
if pTerm != 0 {
if int32((*WhereTerm)(unsafe.Pointer(pTerm)).FtruthProb) <= 0 {
@@ -129886,15 +132382,15 @@ func whereRangeAdjust(tls *libc.TLS, pTerm uintptr, nNew LogEst) LogEst { /* sql
}
// Return the affinity for a single column of an index.
-func Xsqlite3IndexColumnAffinity(tls *libc.TLS, db uintptr, pIdx uintptr, iCol int32) int8 { /* sqlite3.c:149644:21: */
+func Xsqlite3IndexColumnAffinity(tls *libc.TLS, db uintptr, pIdx uintptr, iCol int32) uint8 { /* sqlite3.c:150579:21: */
if !(int32((*Index)(unsafe.Pointer(pIdx)).FzColAff) != 0) {
if Xsqlite3IndexAffinityStr(tls, db, pIdx) == uintptr(0) {
- return int8(SQLITE_AFF_BLOB)
+ return uint8(SQLITE_AFF_BLOB)
}
}
- return *(*int8)(unsafe.Pointer((*Index)(unsafe.Pointer(pIdx)).FzColAff + uintptr(iCol)))
+ return *(*uint8)(unsafe.Pointer((*Index)(unsafe.Pointer(pIdx)).FzColAff + uintptr(iCol)))
}
// This function is called to estimate the number of rows visited by a
@@ -129930,7 +132426,7 @@ func Xsqlite3IndexColumnAffinity(tls *libc.TLS, db uintptr, pIdx uintptr, iCol i
//
// If an error occurs, an SQLite error code is returned. Otherwise,
// SQLITE_OK.
-func whereRangeSkipScanEst(tls *libc.TLS, pParse uintptr, pLower uintptr, pUpper uintptr, pLoop uintptr, pbDone uintptr) int32 { /* sqlite3.c:149691:12: */
+func whereRangeSkipScanEst(tls *libc.TLS, pParse uintptr, pLower uintptr, pUpper uintptr, pLoop uintptr, pbDone uintptr) int32 { /* sqlite3.c:150626:12: */
bp := tls.Alloc(24)
defer tls.Free(24)
@@ -130045,7 +132541,7 @@ func whereRangeSkipScanEst(tls *libc.TLS, pParse uintptr, pLower uintptr, pUpper
// used, a single range inequality reduces the search space by a factor of 4.
// and a pair of constraints (x>? AND x) reduces the expected number of
// rows visited by a factor of 64.
-func whereRangeScanEst(tls *libc.TLS, pParse uintptr, pBuilder uintptr, pLower uintptr, pUpper uintptr, pLoop uintptr) int32 { /* sqlite3.c:149803:12: */
+func whereRangeScanEst(tls *libc.TLS, pParse uintptr, pBuilder uintptr, pLower uintptr, pUpper uintptr, pLoop uintptr) int32 { /* sqlite3.c:150738:12: */
bp := tls.Alloc(28)
defer tls.Free(28)
@@ -130241,7 +132737,7 @@ func whereRangeScanEst(tls *libc.TLS, pParse uintptr, pBuilder uintptr, pLower u
// required for string comparison, or if unable to allocate memory
// for a UTF conversion required for comparison. The error is stored
// in the pParse structure.
-func whereEqualScanEst(tls *libc.TLS, pParse uintptr, pBuilder uintptr, pExpr uintptr, pnRow uintptr) int32 { /* sqlite3.c:149984:12: */
+func whereEqualScanEst(tls *libc.TLS, pParse uintptr, pBuilder uintptr, pExpr uintptr, pnRow uintptr) int32 { /* sqlite3.c:150919:12: */
bp := tls.Alloc(20)
defer tls.Free(20)
@@ -130297,7 +132793,7 @@ func whereEqualScanEst(tls *libc.TLS, pParse uintptr, pBuilder uintptr, pExpr ui
// required for string comparison, or if unable to allocate memory
// for a UTF conversion required for comparison. The error is stored
// in the pParse structure.
-func whereInScanEst(tls *libc.TLS, pParse uintptr, pBuilder uintptr, pList uintptr, pnRow uintptr) int32 { /* sqlite3.c:150048:12: */
+func whereInScanEst(tls *libc.TLS, pParse uintptr, pBuilder uintptr, pList uintptr, pnRow uintptr) int32 { /* sqlite3.c:150983:12: */
bp := tls.Alloc(4)
defer tls.Free(4)
@@ -130330,7 +132826,7 @@ func whereInScanEst(tls *libc.TLS, pParse uintptr, pBuilder uintptr, pList uintp
// Convert bulk memory into a valid WhereLoop that can be passed
// to whereLoopClear harmlessly.
-func whereLoopInit(tls *libc.TLS, p uintptr) { /* sqlite3.c:150194:13: */
+func whereLoopInit(tls *libc.TLS, p uintptr) { /* sqlite3.c:151129:13: */
(*WhereLoop)(unsafe.Pointer(p)).FaLTerm = p + 72 /* &.aLTermSpace */
(*WhereLoop)(unsafe.Pointer(p)).FnLTerm = U16(0)
(*WhereLoop)(unsafe.Pointer(p)).FnLSlot = U16((int32(uint64(unsafe.Sizeof([3]uintptr{})) / uint64(unsafe.Sizeof(uintptr(0))))))
@@ -130338,7 +132834,7 @@ func whereLoopInit(tls *libc.TLS, p uintptr) { /* sqlite3.c:150194:13: */
}
// Clear the WhereLoop.u union. Leave WhereLoop.pLTerm intact.
-func whereLoopClearUnion(tls *libc.TLS, db uintptr, p uintptr) { /* sqlite3.c:150204:13: */
+func whereLoopClearUnion(tls *libc.TLS, db uintptr, p uintptr) { /* sqlite3.c:151139:13: */
if ((*WhereLoop)(unsafe.Pointer(p)).FwsFlags & (U32(WHERE_VIRTUALTABLE | WHERE_AUTO_INDEX))) != 0 {
if (((*WhereLoop)(unsafe.Pointer(p)).FwsFlags & U32(WHERE_VIRTUALTABLE)) != U32(0)) && (*(*U8)(unsafe.Pointer((p + 24 /* &.u */ /* &.vtab */) + 4 /* &.needFree */)) != 0) {
Xsqlite3_free(tls, *(*uintptr)(unsafe.Pointer(p + 24 /* &.u */ /* &.vtab */ + 8 /* &.idxStr */)))
@@ -130353,7 +132849,7 @@ func whereLoopClearUnion(tls *libc.TLS, db uintptr, p uintptr) { /* sqlite3.c:15
}
// Deallocate internal memory used by a WhereLoop object
-func whereLoopClear(tls *libc.TLS, db uintptr, p uintptr) { /* sqlite3.c:150221:13: */
+func whereLoopClear(tls *libc.TLS, db uintptr, p uintptr) { /* sqlite3.c:151156:13: */
if (*WhereLoop)(unsafe.Pointer(p)).FaLTerm != p+72 /* &.aLTermSpace */ {
Xsqlite3DbFreeNN(tls, db, (*WhereLoop)(unsafe.Pointer(p)).FaLTerm)
}
@@ -130362,7 +132858,7 @@ func whereLoopClear(tls *libc.TLS, db uintptr, p uintptr) { /* sqlite3.c:150221:
}
// Increase the memory allocation for pLoop->aLTerm[] to be at least n.
-func whereLoopResize(tls *libc.TLS, db uintptr, p uintptr, n int32) int32 { /* sqlite3.c:150230:12: */
+func whereLoopResize(tls *libc.TLS, db uintptr, p uintptr, n int32) int32 { /* sqlite3.c:151165:12: */
var paNew uintptr
if int32((*WhereLoop)(unsafe.Pointer(p)).FnLSlot) >= n {
return SQLITE_OK
@@ -130382,18 +132878,10 @@ func whereLoopResize(tls *libc.TLS, db uintptr, p uintptr, n int32) int32 { /* s
}
// Transfer content from the second pLoop into the first.
-func whereLoopXfer(tls *libc.TLS, db uintptr, pTo uintptr, pFrom uintptr) int32 { /* sqlite3.c:150246:12: */
+func whereLoopXfer(tls *libc.TLS, db uintptr, pTo uintptr, pFrom uintptr) int32 { /* sqlite3.c:151181:12: */
whereLoopClearUnion(tls, db, pTo)
if whereLoopResize(tls, db, pTo, int32((*WhereLoop)(unsafe.Pointer(pFrom)).FnLTerm)) != 0 {
- libc.Xmemset(tls, (pTo + 24 /* &.u */), 0, uint64(unsafe.Sizeof(struct {
- Fbtree struct {
- FnEq U16
- FnBtm U16
- FnTop U16
- FnDistinctCol U16
- FpIndex uintptr
- }
- }{})))
+ libc.Xmemset(tls, pTo, 0, uint64((uintptr(0) + 48 /* &.nLSlot */)))
return SQLITE_NOMEM
}
libc.Xmemcpy(tls, pTo, pFrom, uint64((uintptr(0) + 48 /* &.nLSlot */)))
@@ -130407,13 +132895,13 @@ func whereLoopXfer(tls *libc.TLS, db uintptr, pTo uintptr, pFrom uintptr) int32
}
// Delete a WhereLoop object
-func whereLoopDelete(tls *libc.TLS, db uintptr, p uintptr) { /* sqlite3.c:150265:13: */
+func whereLoopDelete(tls *libc.TLS, db uintptr, p uintptr) { /* sqlite3.c:151200:13: */
whereLoopClear(tls, db, p)
Xsqlite3DbFreeNN(tls, db, p)
}
// Free a WhereInfo structure
-func whereInfoFree(tls *libc.TLS, db uintptr, pWInfo uintptr) { /* sqlite3.c:150273:13: */
+func whereInfoFree(tls *libc.TLS, db uintptr, pWInfo uintptr) { /* sqlite3.c:151208:13: */
var i int32
for i = 0; i < int32((*WhereInfo)(unsafe.Pointer(pWInfo)).FnLevel); i++ {
@@ -130432,6 +132920,16 @@ func whereInfoFree(tls *libc.TLS, db uintptr, pWInfo uintptr) { /* sqlite3.c:150
Xsqlite3DbFreeNN(tls, db, pWInfo)
}
+// Undo all Expr node modifications
+func whereUndoExprMods(tls *libc.TLS, pWInfo uintptr) { /* sqlite3.c:151229:13: */
+ for (*WhereInfo)(unsafe.Pointer(pWInfo)).FpExprMods != 0 {
+ var p uintptr = (*WhereInfo)(unsafe.Pointer(pWInfo)).FpExprMods
+ (*WhereInfo)(unsafe.Pointer(pWInfo)).FpExprMods = (*WhereExprMod)(unsafe.Pointer(p)).FpNext
+ libc.Xmemcpy(tls, (*WhereExprMod)(unsafe.Pointer(p)).FpExpr, (p + 16 /* &.orig */), uint64(unsafe.Sizeof(Expr{})))
+ Xsqlite3DbFree(tls, (*Parse)(unsafe.Pointer((*WhereInfo)(unsafe.Pointer(pWInfo)).FpParse)).Fdb, p)
+ }
+}
+
// Return TRUE if all of the following are true:
//
// (1) X has the same or lower cost that Y
@@ -130448,7 +132946,7 @@ func whereInfoFree(tls *libc.TLS, db uintptr, pWInfo uintptr) { /* sqlite3.c:150
// deserve a lower cost even if it is a proper subset of Y. Constraint (5)
// was added because a covering index probably deserves to have a lower cost
// than a non-covering index even if it is a proper subset.
-func whereLoopCheaperProperSubset(tls *libc.TLS, pX uintptr, pY uintptr) int32 { /* sqlite3.c:150310:12: */
+func whereLoopCheaperProperSubset(tls *libc.TLS, pX uintptr, pY uintptr) int32 { /* sqlite3.c:151256:12: */
var i int32
var j int32
if (int32((*WhereLoop)(unsafe.Pointer(pX)).FnLTerm) - int32((*WhereLoop)(unsafe.Pointer(pX)).FnSkip)) >= (int32((*WhereLoop)(unsafe.Pointer(pY)).FnLTerm) - int32((*WhereLoop)(unsafe.Pointer(pY)).FnSkip)) {
@@ -130497,7 +132995,7 @@ func whereLoopCheaperProperSubset(tls *libc.TLS, pX uintptr, pY uintptr) int32 {
// To say "WhereLoop X is a proper subset of Y" means that X uses fewer
// WHERE clause terms than Y and that every WHERE clause term used by X is
// also used by Y.
-func whereLoopAdjustCost(tls *libc.TLS, p uintptr, pTemplate uintptr) { /* sqlite3.c:150351:13: */
+func whereLoopAdjustCost(tls *libc.TLS, p uintptr, pTemplate uintptr) { /* sqlite3.c:151297:13: */
if ((*WhereLoop)(unsafe.Pointer(pTemplate)).FwsFlags & U32(WHERE_INDEXED)) == U32(0) {
return
}
@@ -130536,7 +133034,7 @@ func whereLoopAdjustCost(tls *libc.TLS, p uintptr, pTemplate uintptr) { /* sqlit
// If pTemplate cannot replace any existing element of the list but needs
// to be added to the list as a new entry, then return a pointer to the
// tail of the list.
-func whereLoopFindLesser(tls *libc.TLS, ppPrev uintptr, pTemplate uintptr) uintptr { /* sqlite3.c:150388:18: */
+func whereLoopFindLesser(tls *libc.TLS, ppPrev uintptr, pTemplate uintptr) uintptr { /* sqlite3.c:151334:18: */
var p uintptr
p = *(*uintptr)(unsafe.Pointer(ppPrev))
__1:
@@ -130625,7 +133123,7 @@ __3:
// (2) They have the same iSortIdx.
// (3) The template has same or fewer dependencies than the current loop
// (4) The template has the same or lower cost than the current loop
-func whereLoopInsert(tls *libc.TLS, pBuilder uintptr, pTemplate uintptr) int32 { /* sqlite3.c:150476:12: */
+func whereLoopInsert(tls *libc.TLS, pBuilder uintptr, pTemplate uintptr) int32 { /* sqlite3.c:151422:12: */
var ppPrev uintptr
var p uintptr
var pWInfo uintptr = (*WhereLoopBuilder)(unsafe.Pointer(pBuilder)).FpWInfo
@@ -130698,7 +133196,7 @@ func whereLoopInsert(tls *libc.TLS, pBuilder uintptr, pTemplate uintptr) int32 {
rc = whereLoopXfer(tls, db, p, pTemplate)
if ((*WhereLoop)(unsafe.Pointer(p)).FwsFlags & U32(WHERE_VIRTUALTABLE)) == U32(0) {
var pIndex uintptr = *(*uintptr)(unsafe.Pointer(p + 24 /* &.u */ /* &.btree */ + 8 /* &.pIndex */))
- if (pIndex != 0) && ((int32(*(*uint16)(unsafe.Pointer(pIndex + 100 /* &.idxType */)) >> 14 & 0x3)) == SQLITE_IDXTYPE_IPK) {
+ if (pIndex != 0) && ((int32(*(*uint16)(unsafe.Pointer(pIndex + 100 /* &.idxType */)) & 0xc000 >> 14)) == SQLITE_IDXTYPE_IPK) {
*(*uintptr)(unsafe.Pointer(p + 24 /* &.u */ /* &.btree */ + 8 /* &.pIndex */)) = uintptr(0)
}
}
@@ -130732,7 +133230,7 @@ func whereLoopInsert(tls *libc.TLS, pBuilder uintptr, pTemplate uintptr) int32 {
// "x" column is boolean or else -1 or 0 or 1 is a common default value
// on the "x" column and so in that case only cap the output row estimate
// at 1/2 instead of 1/4.
-func whereLoopOutputAdjust(tls *libc.TLS, pWC uintptr, pLoop uintptr, nRow LogEst) { /* sqlite3.c:150613:13: */
+func whereLoopOutputAdjust(tls *libc.TLS, pWC uintptr, pLoop uintptr, nRow LogEst) { /* sqlite3.c:151559:13: */
bp := tls.Alloc(4)
defer tls.Free(4)
@@ -130828,7 +133326,7 @@ __3:
//
// then this function would be invoked with nEq=1. The value returned in
// this case is 3.
-func whereRangeVectorLen(tls *libc.TLS, pParse uintptr, iCur int32, pIdx uintptr, nEq int32, pTerm uintptr) int32 { /* sqlite3.c:150683:12: */
+func whereRangeVectorLen(tls *libc.TLS, pParse uintptr, iCur int32, pIdx uintptr, nEq int32, pTerm uintptr) int32 { /* sqlite3.c:151629:12: */
var nCmp int32 = Xsqlite3ExprVectorSize(tls, (*Expr)(unsafe.Pointer((*WhereTerm)(unsafe.Pointer(pTerm)).FpExpr)).FpLeft)
var i int32
@@ -130841,9 +133339,9 @@ func whereRangeVectorLen(tls *libc.TLS, pParse uintptr, iCur int32, pIdx uintptr
for i = 1; i < nCmp; i++ {
// Test if comparison i of pTerm is compatible with column (i+nEq)
// of the index. If not, exit the loop.
- var aff int8 // Comparison affinity
- var idxaff int8 = int8(0) // Indexed columns affinity
- var pColl uintptr // Comparison collation sequence
+ var aff uint8 // Comparison affinity
+ var idxaff uint8 = uint8(0) // Indexed columns affinity
+ var pColl uintptr // Comparison collation sequence
var pLhs uintptr = (*ExprList_item)(unsafe.Pointer((*(*uintptr)(unsafe.Pointer((*Expr)(unsafe.Pointer((*WhereTerm)(unsafe.Pointer(pTerm)).FpExpr)).FpLeft + 32 /* &.x */)) + 8 /* &.a */) + uintptr(i)*32)).FpExpr
var pRhs uintptr = (*Expr)(unsafe.Pointer((*WhereTerm)(unsafe.Pointer(pTerm)).FpExpr)).FpRight
if ((*Expr)(unsafe.Pointer(pRhs)).Fflags & U32(EP_xIsSelect)) != 0 {
@@ -130893,7 +133391,7 @@ func whereRangeVectorLen(tls *libc.TLS, pParse uintptr, iCur int32, pIdx uintptr
//
// If pProbe->idxType==SQLITE_IDXTYPE_IPK, that means pIndex is
// a fake index used for the INTEGER PRIMARY KEY.
-func whereLoopAddBtreeIndex(tls *libc.TLS, pBuilder uintptr, pSrc uintptr, pProbe uintptr, nInMul LogEst) int32 { /* sqlite3.c:150754:12: */
+func whereLoopAddBtreeIndex(tls *libc.TLS, pBuilder uintptr, pSrc uintptr, pProbe uintptr, nInMul LogEst) int32 { /* sqlite3.c:151700:12: */
bp := tls.Alloc(116)
defer tls.Free(116)
@@ -130930,7 +133428,7 @@ func whereLoopAddBtreeIndex(tls *libc.TLS, pBuilder uintptr, pSrc uintptr, pProb
opMask = (((((((WO_EQ | WO_IN) | (int32(WO_EQ) << (TK_GT - TK_EQ))) | (int32(WO_EQ) << (TK_GE - TK_EQ))) | (int32(WO_EQ) << (TK_LT - TK_EQ))) | (int32(WO_EQ) << (TK_LE - TK_EQ))) | WO_ISNULL) | WO_IS)
}
- if (uint32(int32(*(*uint16)(unsafe.Pointer(pProbe + 100 /* &.bUnordered */)) >> 13 & 0x1))) != 0 {
+ if (uint32(int32(*(*uint16)(unsafe.Pointer(pProbe + 100 /* &.bUnordered */)) & 0x2000 >> 13))) != 0 {
opMask = opMask & (libc.CplInt32(((((int32(WO_EQ) << (TK_GT - TK_EQ)) | (int32(WO_EQ) << (TK_GE - TK_EQ))) | (int32(WO_EQ) << (TK_LT - TK_EQ))) | (int32(WO_EQ) << (TK_LE - TK_EQ)))))
}
@@ -131012,10 +133510,10 @@ func whereLoopAddBtreeIndex(tls *libc.TLS, pBuilder uintptr, pSrc uintptr, pProb
// "x IN (value, value, ...)"
nIn = int32(Xsqlite3LogEst(tls, uint64((*ExprList)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(pExpr + 32 /* &.x */)))).FnExpr)))
}
- if ((uint32(int32(*(*uint16)(unsafe.Pointer(pProbe + 100 /* &.hasStat1 */)) >> 8 & 0x1))) != 0) && (int32(rLogSize) >= 10) {
+ if ((uint32(int32(*(*uint16)(unsafe.Pointer(pProbe + 100 /* &.hasStat1 */)) & 0x100 >> 8))) != 0) && (int32(rLogSize) >= 10) {
var M LogEst
var logK LogEst
- var safetyMargin LogEst
+ var x LogEst
// Let:
// N = the total number of rows in the table
// K = the number of entries on the RHS of the IN operator
@@ -131037,12 +133535,16 @@ func whereLoopAddBtreeIndex(tls *libc.TLS, pBuilder uintptr, pSrc uintptr, pProb
// tables (less than 2 rows) as it is pointless in that case.
M = *(*LogEst)(unsafe.Pointer((*Index)(unsafe.Pointer(pProbe)).FaiRowLogEst + uintptr(saved_nEq)*2))
logK = estLog(tls, int16(nIn))
- safetyMargin = int16(10) // TUNING: extra weight for indexed IN
- if ((int32(M) + int32(logK)) + int32(safetyMargin)) < (nIn + int32(rLogSize)) {
+ // TUNING v----- 10 to bias toward indexed IN
+ x = (LogEst(((int32(M) + int32(logK)) + 10) - (nIn + int32(rLogSize))))
+ if int32(x) >= 0 {
+
+ } else if (int32(nInMul) < 2) && (((*Sqlite3)(unsafe.Pointer((db))).FdbOptFlags & (U32(SQLITE_SeekScan))) == U32(0)) {
*(*U32)(unsafe.Pointer(pNew + 40 /* &.wsFlags */)) |= (U32(WHERE_IN_SEEKSCAN))
} else {
+ continue
}
}
*(*U32)(unsafe.Pointer(pNew + 40 /* &.wsFlags */)) |= (U32(WHERE_COLUMN_IN))
@@ -131052,13 +133554,16 @@ func whereLoopAddBtreeIndex(tls *libc.TLS, pBuilder uintptr, pSrc uintptr, pProb
if (iCol == (-1)) ||
(((iCol >= 0) && (int32(nInMul) == 0)) && (int32(saved_nEq) == (int32((*Index)(unsafe.Pointer(pProbe)).FnKeyCol) - 1))) {
- if ((iCol == (-1)) || ((uint32(int32(*(*uint16)(unsafe.Pointer(pProbe + 100 /* &.uniqNotNull */)) >> 12 & 0x1))) != 0)) ||
+ if ((iCol == (-1)) || ((uint32(int32(*(*uint16)(unsafe.Pointer(pProbe + 100 /* &.uniqNotNull */)) & 0x1000 >> 12))) != 0)) ||
(((int32((*Index)(unsafe.Pointer(pProbe)).FnKeyCol) == 1) && ((*Index)(unsafe.Pointer(pProbe)).FonError != 0)) && (int32(eOp) == WO_EQ)) {
*(*U32)(unsafe.Pointer(pNew + 40 /* &.wsFlags */)) |= (U32(WHERE_ONEROW))
} else {
*(*U32)(unsafe.Pointer(pNew + 40 /* &.wsFlags */)) |= (U32(WHERE_UNQ_WANTED))
}
}
+ if int32((*WhereScan)(unsafe.Pointer(bp /* &scan */)).FiEquiv) > 1 {
+ *(*U32)(unsafe.Pointer(pNew + 40 /* &.wsFlags */)) |= (U32(WHERE_TRANSCONS))
+ }
} else if (int32(eOp) & WO_ISNULL) != 0 {
*(*U32)(unsafe.Pointer(pNew + 40 /* &.wsFlags */)) |= (U32(WHERE_COLUMN_NULL))
} else if (int32(eOp) & ((int32(WO_EQ) << (TK_GT - TK_EQ)) | (int32(WO_EQ) << (TK_GE - TK_EQ)))) != 0 {
@@ -131186,8 +133691,9 @@ func whereLoopAddBtreeIndex(tls *libc.TLS, pBuilder uintptr, pSrc uintptr, pProb
(*WhereLoop)(unsafe.Pointer(pNew)).FnOut = nOutUnadjusted
}
- if (((*WhereLoop)(unsafe.Pointer(pNew)).FwsFlags & U32(WHERE_TOP_LIMIT)) == U32(0)) &&
- (int32(*(*U16)(unsafe.Pointer((pNew + 24 /* &.u */ /* &.btree */) /* &.nEq */))) < int32((*Index)(unsafe.Pointer(pProbe)).FnColumn)) {
+ if ((((*WhereLoop)(unsafe.Pointer(pNew)).FwsFlags & U32(WHERE_TOP_LIMIT)) == U32(0)) &&
+ (int32(*(*U16)(unsafe.Pointer((pNew + 24 /* &.u */ /* &.btree */) /* &.nEq */))) < int32((*Index)(unsafe.Pointer(pProbe)).FnColumn))) &&
+ ((int32(*(*U16)(unsafe.Pointer((pNew + 24 /* &.u */ /* &.btree */) /* &.nEq */))) < int32((*Index)(unsafe.Pointer(pProbe)).FnKeyCol)) || ((int32(*(*uint16)(unsafe.Pointer(pProbe + 100 /* &.idxType */)) & 0xc000 >> 14)) != SQLITE_IDXTYPE_PRIMARYKEY)) {
whereLoopAddBtreeIndex(tls, pBuilder, pSrc, pProbe, (int16(int32(nInMul) + nIn)))
}
(*WhereLoop)(unsafe.Pointer(pNew)).FnOut = saved_nOut
@@ -131216,8 +133722,8 @@ func whereLoopAddBtreeIndex(tls *libc.TLS, pBuilder uintptr, pSrc uintptr, pProb
if (((((((int32(saved_nEq) == int32(saved_nSkip)) &&
((int32(saved_nEq) + 1) < int32((*Index)(unsafe.Pointer(pProbe)).FnKeyCol))) &&
(int32(saved_nEq) == int32((*WhereLoop)(unsafe.Pointer(pNew)).FnLTerm))) &&
- ((int32(*(*uint16)(unsafe.Pointer(pProbe + 100 /* &.noSkipScan */)) >> 9 & 0x1)) == 0)) &&
- ((int32(*(*uint16)(unsafe.Pointer(pProbe + 100 /* &.hasStat1 */)) >> 8 & 0x1)) != 0)) &&
+ ((int32(*(*uint16)(unsafe.Pointer(pProbe + 100 /* &.noSkipScan */)) & 0x200 >> 9)) == 0)) &&
+ ((int32(*(*uint16)(unsafe.Pointer(pProbe + 100 /* &.hasStat1 */)) & 0x100 >> 8)) != 0)) &&
(((*Sqlite3)(unsafe.Pointer((db))).FdbOptFlags & (U32(SQLITE_SkipScan))) == U32(0))) &&
(int32(*(*LogEst)(unsafe.Pointer((*Index)(unsafe.Pointer(pProbe)).FaiRowLogEst + uintptr((int32(saved_nEq)+1))*2))) >= 42)) && // TUNING: Minimum for skip-scan
((libc.AssignInt32(&rc, whereLoopResize(tls, db, pNew, (int32((*WhereLoop)(unsafe.Pointer(pNew)).FnLTerm)+1)))) == SQLITE_OK) {
@@ -131247,13 +133753,13 @@ func whereLoopAddBtreeIndex(tls *libc.TLS, pBuilder uintptr, pSrc uintptr, pProb
// Return False if pBuilder does not contain an ORDER BY clause or
// if there is no way for pIndex to be useful in implementing that
// ORDER BY clause.
-func indexMightHelpWithOrderBy(tls *libc.TLS, pBuilder uintptr, pIndex uintptr, iCursor int32) int32 { /* sqlite3.c:151140:12: */
+func indexMightHelpWithOrderBy(tls *libc.TLS, pBuilder uintptr, pIndex uintptr, iCursor int32) int32 { /* sqlite3.c:152100:12: */
var pOB uintptr
var aColExpr uintptr
var ii int32
var jj int32
- if (uint32(int32(*(*uint16)(unsafe.Pointer(pIndex + 100 /* &.bUnordered */)) >> 13 & 0x1))) != 0 {
+ if (uint32(int32(*(*uint16)(unsafe.Pointer(pIndex + 100 /* &.bUnordered */)) & 0x2000 >> 13))) != 0 {
return 0
}
if (libc.AssignUintptr(&pOB, (*WhereInfo)(unsafe.Pointer((*WhereLoopBuilder)(unsafe.Pointer(pBuilder)).FpWInfo)).FpOrderBy)) == uintptr(0) {
@@ -131289,7 +133795,7 @@ func indexMightHelpWithOrderBy(tls *libc.TLS, pBuilder uintptr, pIndex uintptr,
// Check to see if a partial index with pPartIndexWhere can be used
// in the current query. Return true if it can be and false if not.
-func whereUsablePartialIndex(tls *libc.TLS, iTab int32, isLeft int32, pWC uintptr, pWhere uintptr) int32 { /* sqlite3.c:151174:12: */
+func whereUsablePartialIndex(tls *libc.TLS, iTab int32, isLeft int32, pWC uintptr, pWhere uintptr) int32 { /* sqlite3.c:152134:12: */
var i int32
var pTerm uintptr
var pParse uintptr = (*WhereInfo)(unsafe.Pointer((*WhereClause)(unsafe.Pointer(pWC)).FpWInfo)).FpParse
@@ -131311,9 +133817,10 @@ __1:
{
var pExpr uintptr
pExpr = (*WhereTerm)(unsafe.Pointer(pTerm)).FpExpr
- if ((!(((*Expr)(unsafe.Pointer((pExpr))).Fflags & (U32(EP_FromJoin))) != U32(0)) || ((*Expr)(unsafe.Pointer(pExpr)).FiRightJoinTable == iTab)) &&
+ if (((!(((*Expr)(unsafe.Pointer((pExpr))).Fflags & (U32(EP_FromJoin))) != U32(0)) || ((*Expr)(unsafe.Pointer(pExpr)).FiRightJoinTable == iTab)) &&
((isLeft == 0) || (((*Expr)(unsafe.Pointer((pExpr))).Fflags & (U32(EP_FromJoin))) != U32(0)))) &&
- (Xsqlite3ExprImpliesExpr(tls, pParse, pExpr, pWhere, iTab) != 0) {
+ (Xsqlite3ExprImpliesExpr(tls, pParse, pExpr, pWhere, iTab) != 0)) &&
+ ((int32((*WhereTerm)(unsafe.Pointer(pTerm)).FwtFlags) & TERM_VNULL) == 0) {
return 1
}
@@ -131363,7 +133870,7 @@ __3:
// bias the scoring in favor of using an index, since the worst-case
// performance of using an index is far better than the worst-case performance
// of a full table scan.
-func whereLoopAddBtree(tls *libc.TLS, pBuilder uintptr, mPrereq Bitmask) int32 { /* sqlite3.c:151237:12: */
+func whereLoopAddBtree(tls *libc.TLS, pBuilder uintptr, mPrereq Bitmask) int32 { /* sqlite3.c:152198:12: */
bp := tls.Alloc(158)
defer tls.Free(158)
@@ -131392,7 +133899,7 @@ func whereLoopAddBtree(tls *libc.TLS, pBuilder uintptr, mPrereq Bitmask) int32 {
pTab = (*SrcItem)(unsafe.Pointer(pSrc)).FpTab
pWC = (*WhereLoopBuilder)(unsafe.Pointer(pBuilder)).FpWC
- if (uint32(int32(*(*uint8)(unsafe.Pointer(pSrc + 60 /* &.fg */ + 4 /* &.isIndexedBy */)) >> 6 & 0x1))) != 0 {
+ if (uint32(int32(*(*uint16)(unsafe.Pointer(pSrc + 60 /* &.fg */ + 4 /* &.isIndexedBy */)) & 0x4000 >> 14))) != 0 {
// An INDEXED BY clause specifies a particular index to use
pProbe = *(*uintptr)(unsafe.Pointer(pSrc + 104 /* &.u2 */))
} else if !(((*Table)(unsafe.Pointer((pTab))).FtabFlags & U32(TF_WithoutRowid)) == U32(0)) {
@@ -131411,11 +133918,11 @@ func whereLoopAddBtree(tls *libc.TLS, pBuilder uintptr, mPrereq Bitmask) int32 {
(*Index)(unsafe.Pointer(bp /* &sPk */)).FonError = U8(OE_Replace)
(*Index)(unsafe.Pointer(bp /* &sPk */)).FpTable = pTab
(*Index)(unsafe.Pointer(bp /* &sPk */)).FszIdxRow = (*Table)(unsafe.Pointer(pTab)).FszTabRow
- libc.SetBitFieldPtr16Uint32(bp /* &sPk */ +100 /* &.idxType */, uint32(SQLITE_IDXTYPE_IPK), 0, 0x3)
+ libc.SetBitFieldPtr16Uint32(bp /* &sPk */ +100 /* &.idxType */, uint32(SQLITE_IDXTYPE_IPK), 14, 0xc000)
*(*LogEst)(unsafe.Pointer(bp + 154 /* &aiRowEstPk[0] */)) = (*Table)(unsafe.Pointer(pTab)).FnRowLogEst
*(*LogEst)(unsafe.Pointer(bp + 154 /* &aiRowEstPk[0] */ + 1*2)) = int16(0)
pFirst = (*Table)(unsafe.Pointer((*SrcItem)(unsafe.Pointer(pSrc)).FpTab)).FpIndex
- if (int32(*(*uint8)(unsafe.Pointer((pSrc + 60 /* &.fg */) + 4 /* &.notIndexed */)) >> 7 & 0x1)) == 0 {
+ if (int32(*(*uint16)(unsafe.Pointer((pSrc + 60 /* &.fg */) + 4 /* &.notIndexed */)) & 0x8000 >> 15)) == 0 {
// The real indices of the table are only considered if the
// NOT INDEXED qualifier is omitted from the FROM clause
(*Index)(unsafe.Pointer(bp /* &sPk */)).FpNext = pFirst
@@ -131429,11 +133936,11 @@ func whereLoopAddBtree(tls *libc.TLS, pBuilder uintptr, mPrereq Bitmask) int32 {
if ((((((!(int32((*WhereLoopBuilder)(unsafe.Pointer(pBuilder)).FpOrSet) != 0) && // Not part of an OR optimization
((int32((*WhereInfo)(unsafe.Pointer(pWInfo)).FwctrlFlags) & WHERE_OR_SUBCLAUSE) == 0)) &&
(((*Sqlite3)(unsafe.Pointer((*Parse)(unsafe.Pointer((*WhereInfo)(unsafe.Pointer(pWInfo)).FpParse)).Fdb)).Fflags & uint64(SQLITE_AutoIndex)) != uint64(0))) &&
- !((int32(*(*uint8)(unsafe.Pointer(pSrc + 60 /* &.fg */ + 4 /* &.isIndexedBy */)) >> 6 & 0x1)) != 0)) && // Has no INDEXED BY clause
- !((int32(*(*uint8)(unsafe.Pointer(pSrc + 60 /* &.fg */ + 4 /* &.notIndexed */)) >> 7 & 0x1)) != 0)) && // Has no NOT INDEXED clause
+ !((int32(*(*uint16)(unsafe.Pointer(pSrc + 60 /* &.fg */ + 4 /* &.isIndexedBy */)) & 0x4000 >> 14)) != 0)) && // Has no INDEXED BY clause
+ !((int32(*(*uint16)(unsafe.Pointer(pSrc + 60 /* &.fg */ + 4 /* &.notIndexed */)) & 0x8000 >> 15)) != 0)) && // Has no NOT INDEXED clause
(((*Table)(unsafe.Pointer((pTab))).FtabFlags & U32(TF_WithoutRowid)) == U32(0))) && // Not WITHOUT ROWID table. (FIXME: Why not?)
- !((int32(*(*uint8)(unsafe.Pointer(pSrc + 60 /* &.fg */ + 4 /* &.isCorrelated */)) >> 4 & 0x1)) != 0)) && // Not a correlated subquery
- !((int32(*(*uint8)(unsafe.Pointer(pSrc + 60 /* &.fg */ + 4 /* &.isRecursive */)) >> 2 & 0x1)) != 0) {
+ !((int32(*(*uint16)(unsafe.Pointer(pSrc + 60 /* &.fg */ + 4 /* &.isCorrelated */)) & 0x1000 >> 12)) != 0)) && // Not a correlated subquery
+ !((int32(*(*uint16)(unsafe.Pointer(pSrc + 60 /* &.fg */ + 4 /* &.isRecursive */)) & 0x400 >> 10)) != 0) {
// Generate auto-index WhereLoops
var pTerm uintptr
var pWCEnd uintptr = ((*WhereClause)(unsafe.Pointer(pWC)).Fa + uintptr((*WhereClause)(unsafe.Pointer(pWC)).FnTerm)*56)
@@ -131492,7 +133999,7 @@ __1:
// See ticket [98d973b8f5]
goto __2 // Partial index inappropriate for this query
}
- if (uint32(int32(*(*uint16)(unsafe.Pointer(pProbe + 100 /* &.bNoQuery */)) >> 7 & 0x1))) != 0 {
+ if (uint32(int32(*(*uint16)(unsafe.Pointer(pProbe + 100 /* &.bNoQuery */)) & 0x80 >> 7))) != 0 {
goto __2
}
rSize = *(*LogEst)(unsafe.Pointer((*Index)(unsafe.Pointer(pProbe)).FaiRowLogEst))
@@ -131510,7 +134017,7 @@ __1:
// The ONEPASS_DESIRED flags never occurs together with ORDER BY
- if (int32(*(*uint16)(unsafe.Pointer(pProbe + 100 /* &.idxType */)) >> 14 & 0x3)) == SQLITE_IDXTYPE_IPK {
+ if (int32(*(*uint16)(unsafe.Pointer(pProbe + 100 /* &.idxType */)) & 0xc000 >> 14)) == SQLITE_IDXTYPE_IPK {
// Integer primary key index
(*WhereLoop)(unsafe.Pointer(pNew)).FwsFlags = U32(WHERE_IPK)
@@ -131542,7 +134049,7 @@ __1:
}
} else {
var m Bitmask
- if (uint32(int32(*(*uint16)(unsafe.Pointer(pProbe + 100 /* &.isCovering */)) >> 10 & 0x1))) != 0 {
+ if (uint32(int32(*(*uint16)(unsafe.Pointer(pProbe + 100 /* &.isCovering */)) & 0x400 >> 10))) != 0 {
(*WhereLoop)(unsafe.Pointer(pNew)).FwsFlags = (U32(WHERE_IDX_ONLY | WHERE_INDEXED))
m = uint64(0)
} else {
@@ -131559,9 +134066,9 @@ __1:
if ((((b != 0) ||
!(((*Table)(unsafe.Pointer((pTab))).FtabFlags & U32(TF_WithoutRowid)) == U32(0))) ||
((*Index)(unsafe.Pointer(pProbe)).FpPartIdxWhere != uintptr(0))) ||
- ((uint32(int32(*(*uint8)(unsafe.Pointer((pSrc + 60 /* &.fg */) + 4 /* &.isIndexedBy */)) >> 6 & 0x1))) != 0)) ||
+ ((uint32(int32(*(*uint16)(unsafe.Pointer((pSrc + 60 /* &.fg */) + 4 /* &.isIndexedBy */)) & 0x4000 >> 14))) != 0)) ||
((((((m == uint64(0)) &&
- ((int32(*(*uint16)(unsafe.Pointer(pProbe + 100 /* &.bUnordered */)) >> 13 & 0x1)) == 0)) &&
+ ((int32(*(*uint16)(unsafe.Pointer(pProbe + 100 /* &.bUnordered */)) & 0x2000 >> 13)) == 0)) &&
(int32((*Index)(unsafe.Pointer(pProbe)).FszIdxRow) < int32((*Table)(unsafe.Pointer(pTab)).FszTabRow))) &&
((int32((*WhereInfo)(unsafe.Pointer(pWInfo)).FwctrlFlags) & WHERE_ONEPASS_DESIRED) == 0)) &&
(Xsqlite3Config.FbUseCis != 0)) &&
@@ -131633,7 +134140,7 @@ __1:
goto __2
__2:
pProbe = func() uintptr {
- if (uint32(int32(*(*uint8)(unsafe.Pointer(pSrc + 60 /* &.fg */ + 4 /* &.isIndexedBy */)) >> 6 & 0x1))) != 0 {
+ if (uint32(int32(*(*uint16)(unsafe.Pointer(pSrc + 60 /* &.fg */ + 4 /* &.isIndexedBy */)) & 0x4000 >> 14))) != 0 {
return uintptr(0)
}
return (*Index)(unsafe.Pointer(pProbe)).FpNext
@@ -131664,7 +134171,7 @@ __3:
//
// Output parameter *pbIn is set to true if the plan added to pBuilder
// uses one or more WO_IN terms, or false otherwise.
-func whereLoopAddVirtualOne(tls *libc.TLS, pBuilder uintptr, mPrereq Bitmask, mUsable Bitmask, mExclude U16, pIdxInfo uintptr, mNoOmit U16, pbIn uintptr) int32 { /* sqlite3.c:151511:12: */
+func whereLoopAddVirtualOne(tls *libc.TLS, pBuilder uintptr, mPrereq Bitmask, mUsable Bitmask, mExclude U16, pIdxInfo uintptr, mNoOmit U16, pbIn uintptr) int32 { /* sqlite3.c:152472:12: */
bp := tls.Alloc(16)
defer tls.Free(16)
@@ -131754,7 +134261,7 @@ __4:
(j >= (*WhereClause)(unsafe.Pointer(pWC)).FnTerm)) ||
(*(*uintptr)(unsafe.Pointer((*WhereLoop)(unsafe.Pointer(pNew)).FaLTerm + uintptr(iTerm)*8)) != uintptr(0))) ||
(int32((*sqlite3_index_constraint)(unsafe.Pointer(pIdxCons)).Fusable) == 0) {
- Xsqlite3ErrorMsg(tls, pParse, ts+19789 /* "%s.xBestIndex ma..." */, libc.VaList(bp, (*Table)(unsafe.Pointer((*SrcItem)(unsafe.Pointer(pSrc)).FpTab)).FzName))
+ Xsqlite3ErrorMsg(tls, pParse, ts+20249 /* "%s.xBestIndex ma..." */, libc.VaList(bp, (*Table)(unsafe.Pointer((*SrcItem)(unsafe.Pointer(pSrc)).FpTab)).FzName))
return SQLITE_ERROR
}
@@ -131802,7 +134309,7 @@ __6:
if *(*uintptr)(unsafe.Pointer((*WhereLoop)(unsafe.Pointer(pNew)).FaLTerm + uintptr(i)*8)) == uintptr(0) {
// The non-zero argvIdx values must be contiguous. Raise an
// error if they are not
- Xsqlite3ErrorMsg(tls, pParse, ts+19789 /* "%s.xBestIndex ma..." */, libc.VaList(bp+8, (*Table)(unsafe.Pointer((*SrcItem)(unsafe.Pointer(pSrc)).FpTab)).FzName))
+ Xsqlite3ErrorMsg(tls, pParse, ts+20249 /* "%s.xBestIndex ma..." */, libc.VaList(bp+8, (*Table)(unsafe.Pointer((*SrcItem)(unsafe.Pointer(pSrc)).FpTab)).FzName))
return SQLITE_ERROR
}
@@ -131843,7 +134350,7 @@ __6:
// sequence associated with element iCons of the sqlite3_index_info.aConstraint
// array. Or, if iCons is out of range or there is no active xBestIndex
// call, return NULL.
-func Xsqlite3_vtab_collation(tls *libc.TLS, pIdxInfo uintptr, iCons int32) uintptr { /* sqlite3.c:151671:23: */
+func Xsqlite3_vtab_collation(tls *libc.TLS, pIdxInfo uintptr, iCons int32) uintptr { /* sqlite3.c:152632:23: */
var pHidden uintptr = (pIdxInfo + 1*96)
var zRet uintptr = uintptr(0)
if (iCons >= 0) && (iCons < (*Sqlite3_index_info)(unsafe.Pointer(pIdxInfo)).FnConstraint) {
@@ -131886,7 +134393,7 @@ func Xsqlite3_vtab_collation(tls *libc.TLS, pIdxInfo uintptr, iCons int32) uintp
// Conversely, all tables in mUnusable must be scanned after the current
// virtual table, so any terms for which the prerequisites overlap with
// mUnusable should always be configured as "not-usable" for xBestIndex.
-func whereLoopAddVirtual(tls *libc.TLS, pBuilder uintptr, mPrereq Bitmask, mUnusable Bitmask) int32 { /* sqlite3.c:151711:12: */
+func whereLoopAddVirtual(tls *libc.TLS, pBuilder uintptr, mPrereq Bitmask, mUnusable Bitmask) int32 { /* sqlite3.c:152672:12: */
bp := tls.Alloc(8)
defer tls.Free(8)
@@ -132015,7 +134522,7 @@ func whereLoopAddVirtual(tls *libc.TLS, pBuilder uintptr, mPrereq Bitmask, mUnus
// Add WhereLoop entries to handle OR terms. This works for either
// btrees or virtual tables.
-func whereLoopAddOr(tls *libc.TLS, pBuilder uintptr, mPrereq Bitmask, mUnusable Bitmask) int32 { /* sqlite3.c:151834:12: */
+func whereLoopAddOr(tls *libc.TLS, pBuilder uintptr, mPrereq Bitmask, mUnusable Bitmask) int32 { /* sqlite3.c:152795:12: */
bp := tls.Alloc(720)
defer tls.Free(720)
@@ -132139,7 +134646,7 @@ func whereLoopAddOr(tls *libc.TLS, pBuilder uintptr, mPrereq Bitmask, mUnusable
}
// Add all WhereLoop objects for all tables
-func whereLoopAddAll(tls *libc.TLS, pBuilder uintptr) int32 { /* sqlite3.c:151958:12: */
+func whereLoopAddAll(tls *libc.TLS, pBuilder uintptr) int32 { /* sqlite3.c:152921:12: */
var pWInfo uintptr = (*WhereLoopBuilder)(unsafe.Pointer(pBuilder)).FpWInfo
var mPrereq Bitmask = uint64(0)
var mPrior Bitmask = uint64(0)
@@ -132191,7 +134698,7 @@ __1:
if (rc != 0) || ((*Sqlite3)(unsafe.Pointer(db)).FmallocFailed != 0) {
if rc == SQLITE_DONE {
// We hit the query planner search limit set by iPlanLimit
- Xsqlite3_log(tls, SQLITE_WARNING, ts+19815 /* "abbreviated quer..." */, 0)
+ Xsqlite3_log(tls, SQLITE_WARNING, ts+20275 /* "abbreviated quer..." */, 0)
rc = SQLITE_OK
} else {
goto __3
@@ -132227,7 +134734,7 @@ __3:
// as equivalent rows are grouped together. Thus for GROUP BY and DISTINCT
// the pOrderBy terms can be matched in any order. With ORDER BY, the
// pOrderBy terms must be matched in strict left-to-right order.
-func wherePathSatisfiesOrderBy(tls *libc.TLS, pWInfo uintptr, pOrderBy uintptr, pPath uintptr, wctrlFlags U16, nLoop U16, pLast uintptr, pRevMask uintptr) I8 { /* sqlite3.c:152036:11: */
+func wherePathSatisfiesOrderBy(tls *libc.TLS, pWInfo uintptr, pOrderBy uintptr, pPath uintptr, wctrlFlags U16, nLoop U16, pLast uintptr, pRevMask uintptr) I8 { /* sqlite3.c:152999:11: */
var revSet U8 // True if rev is known
var rev U8 // Composite sort order
var revIdx U8 // Index sort order
@@ -132325,7 +134832,7 @@ func wherePathSatisfiesOrderBy(tls *libc.TLS, pWInfo uintptr, pOrderBy uintptr,
if pOBExpr == uintptr(0) {
continue
}
- if int32((*Expr)(unsafe.Pointer(pOBExpr)).Fop) != TK_COLUMN {
+ if (int32((*Expr)(unsafe.Pointer(pOBExpr)).Fop) != TK_COLUMN) && (int32((*Expr)(unsafe.Pointer(pOBExpr)).Fop) != TK_AGG_COLUMN) {
continue
}
if (*Expr)(unsafe.Pointer(pOBExpr)).FiTable != iCur {
@@ -132365,12 +134872,16 @@ func wherePathSatisfiesOrderBy(tls *libc.TLS, pWInfo uintptr, pOrderBy uintptr,
pIndex = uintptr(0)
nKeyCol = U16(0)
nColumn = U16(1)
- } else if ((libc.AssignUintptr(&pIndex, *(*uintptr)(unsafe.Pointer(pLoop + 24 /* &.u */ /* &.btree */ + 8 /* &.pIndex */)))) == uintptr(0)) || ((uint32(int32(*(*uint16)(unsafe.Pointer(pIndex + 100 /* &.bUnordered */)) >> 13 & 0x1))) != 0) {
+ } else if ((libc.AssignUintptr(&pIndex, *(*uintptr)(unsafe.Pointer(pLoop + 24 /* &.u */ /* &.btree */ + 8 /* &.pIndex */)))) == uintptr(0)) || ((uint32(int32(*(*uint16)(unsafe.Pointer(pIndex + 100 /* &.bUnordered */)) & 0x2000 >> 13))) != 0) {
return int8(0)
} else {
nKeyCol = (*Index)(unsafe.Pointer(pIndex)).FnKeyCol
nColumn = (*Index)(unsafe.Pointer(pIndex)).FnColumn
+ // All relevant terms of the index must also be non-NULL in order
+ // for isOrderDistinct to be true. So the isOrderDistint value
+ // computed here might be a false positive. Corrections will be
+ // made at tag-20210426-1 below
isOrderDistinct = (U8(libc.Bool32((int32((*Index)(unsafe.Pointer((pIndex))).FonError) != OE_None) &&
(((*WhereLoop)(unsafe.Pointer(pLoop)).FwsFlags & U32(WHERE_SKIPSCAN)) == U32(0)))))
}
@@ -132432,12 +134943,16 @@ func wherePathSatisfiesOrderBy(tls *libc.TLS, pWInfo uintptr, pOrderBy uintptr,
}
// An unconstrained column that might be NULL means that this
- // WhereLoop is not well-ordered
- if (((isOrderDistinct != 0) &&
- (iColumn >= 0)) &&
- (j >= int32(*(*U16)(unsafe.Pointer((pLoop + 24 /* &.u */ /* &.btree */) /* &.nEq */))))) &&
- (int32((*Column)(unsafe.Pointer((*Table)(unsafe.Pointer((*Index)(unsafe.Pointer(pIndex)).FpTable)).FaCol+uintptr(iColumn)*32)).FnotNull) == 0) {
- isOrderDistinct = U8(0)
+ // WhereLoop is not well-ordered. tag-20210426-1
+ if isOrderDistinct != 0 {
+ if ((iColumn >= 0) &&
+ (j >= int32(*(*U16)(unsafe.Pointer((pLoop + 24 /* &.u */ /* &.btree */) /* &.nEq */))))) &&
+ (int32((*Column)(unsafe.Pointer((*Table)(unsafe.Pointer((*Index)(unsafe.Pointer(pIndex)).FpTable)).FaCol+uintptr(iColumn)*32)).FnotNull) == 0) {
+ isOrderDistinct = U8(0)
+ }
+ if iColumn == (-2) {
+ isOrderDistinct = U8(0)
+ }
}
// Find the ORDER BY term that corresponds to the j-th column
@@ -132456,7 +134971,7 @@ func wherePathSatisfiesOrderBy(tls *libc.TLS, pWInfo uintptr, pOrderBy uintptr,
bOnce = U8(0)
}
if iColumn >= (-1) {
- if int32((*Expr)(unsafe.Pointer(pOBExpr)).Fop) != TK_COLUMN {
+ if (int32((*Expr)(unsafe.Pointer(pOBExpr)).Fop) != TK_COLUMN) && (int32((*Expr)(unsafe.Pointer(pOBExpr)).Fop) != TK_AGG_COLUMN) {
continue
}
if (*Expr)(unsafe.Pointer(pOBExpr)).FiTable != iCur {
@@ -132582,15 +135097,15 @@ func wherePathSatisfiesOrderBy(tls *libc.TLS, pWInfo uintptr, pOrderBy uintptr,
//
// SELECT * FROM t1 GROUP BY x,y ORDER BY x,y; -- IsSorted()==1
// SELECT * FROM t1 GROUP BY y,x ORDER BY y,x; -- IsSorted()==0
-func Xsqlite3WhereIsSorted(tls *libc.TLS, pWInfo uintptr) int32 { /* sqlite3.c:152373:20: */
+func Xsqlite3WhereIsSorted(tls *libc.TLS, pWInfo uintptr) int32 { /* sqlite3.c:153344:20: */
- return (int32(*(*uint8)(unsafe.Pointer(pWInfo + 68 /* &.sorted */)) >> 4 & 0x1))
+ return (int32(*(*uint8)(unsafe.Pointer(pWInfo + 68 /* &.sorted */)) & 0x10 >> 4))
}
// Return the cost of sorting nRow rows, assuming that the keys have
// nOrderby columns and that the first nSorted columns are already in
// order.
-func whereSortingCost(tls *libc.TLS, pWInfo uintptr, nRow LogEst, nOrderBy int32, nSorted int32) LogEst { /* sqlite3.c:152396:15: */
+func whereSortingCost(tls *libc.TLS, pWInfo uintptr, nRow LogEst, nOrderBy int32, nSorted int32) LogEst { /* sqlite3.c:153367:15: */
// TUNING: Estimated cost of a full external sort, where N is
// the number of rows to sort is:
//
@@ -132637,7 +135152,7 @@ func whereSortingCost(tls *libc.TLS, pWInfo uintptr, nRow LogEst, nOrderBy int32
//
// Return SQLITE_OK on success or SQLITE_NOMEM of a memory allocation
// error occurs.
-func wherePathSolver(tls *libc.TLS, pWInfo uintptr, nRowEst LogEst) int32 { /* sqlite3.c:152449:12: */
+func wherePathSolver(tls *libc.TLS, pWInfo uintptr, nRowEst LogEst) int32 { /* sqlite3.c:153420:12: */
bp := tls.Alloc(32)
defer tls.Free(32)
@@ -132952,7 +135467,7 @@ __3:
}
if nFrom == 0 {
- Xsqlite3ErrorMsg(tls, pParse, ts+19850 /* "no query solutio..." */, 0)
+ Xsqlite3ErrorMsg(tls, pParse, ts+20310 /* "no query solutio..." */, 0)
Xsqlite3DbFreeNN(tls, db, pSpace)
return SQLITE_ERROR
}
@@ -132984,7 +135499,7 @@ __3:
(*WhereInfo)(unsafe.Pointer(pWInfo)).FeDistinct = U8(WHERE_DISTINCT_ORDERED)
}
}
- libc.SetBitFieldPtr8Uint32(pWInfo+68 /* &.bOrderedInnerLoop */, uint32(0), 2, 0x4)
+ libc.SetBitFieldPtr8Uint32(pWInfo+68 /* &.bOrderedInnerLoop */, uint32(0), 5, 0x20)
if (*WhereInfo)(unsafe.Pointer(pWInfo)).FpOrderBy != 0 {
if (int32((*WhereInfo)(unsafe.Pointer(pWInfo)).FwctrlFlags) & WHERE_DISTINCTBY) != 0 {
if int32((*WherePath)(unsafe.Pointer(pFrom)).FisOrdered) == (*ExprList)(unsafe.Pointer((*WhereInfo)(unsafe.Pointer(pWInfo)).FpOrderBy)).FnExpr {
@@ -133004,7 +135519,7 @@ __3:
uint16(WHERE_ORDERBY_LIMIT), (uint16(nLoop - 1)), *(*uintptr)(unsafe.Pointer((*WherePath)(unsafe.Pointer(pFrom)).FaLoop + uintptr((nLoop-1))*8)), bp+16 /* &m */))
if rc == (*ExprList)(unsafe.Pointer((*WhereInfo)(unsafe.Pointer(pWInfo)).FpOrderBy)).FnExpr {
- libc.SetBitFieldPtr8Uint32(pWInfo+68 /* &.bOrderedInnerLoop */, uint32(1), 2, 0x4)
+ libc.SetBitFieldPtr8Uint32(pWInfo+68 /* &.bOrderedInnerLoop */, uint32(1), 5, 0x20)
(*WhereInfo)(unsafe.Pointer(pWInfo)).FrevMask = *(*Bitmask)(unsafe.Pointer(bp + 16 /* m */))
}
}
@@ -133012,7 +135527,7 @@ __3:
} else if ((nLoop != 0) &&
(int32((*WhereInfo)(unsafe.Pointer(pWInfo)).FnOBSat) == 1)) &&
((int32((*WhereInfo)(unsafe.Pointer(pWInfo)).FwctrlFlags) & (WHERE_ORDERBY_MIN | WHERE_ORDERBY_MAX)) != 0) {
- libc.SetBitFieldPtr8Uint32(pWInfo+68 /* &.bOrderedInnerLoop */, uint32(1), 2, 0x4)
+ libc.SetBitFieldPtr8Uint32(pWInfo+68 /* &.bOrderedInnerLoop */, uint32(1), 5, 0x20)
}
}
if (((int32((*WhereInfo)(unsafe.Pointer(pWInfo)).FwctrlFlags) & WHERE_SORTBYGROUP) != 0) &&
@@ -133022,7 +135537,7 @@ __3:
pFrom, uint16(0), (uint16(nLoop - 1)), *(*uintptr)(unsafe.Pointer((*WherePath)(unsafe.Pointer(pFrom)).FaLoop + uintptr((nLoop-1))*8)), bp+24 /* &revMask */))
if nOrder == (*ExprList)(unsafe.Pointer((*WhereInfo)(unsafe.Pointer(pWInfo)).FpOrderBy)).FnExpr {
- libc.SetBitFieldPtr8Uint32(pWInfo+68 /* &.sorted */, uint32(1), 3, 0x8)
+ libc.SetBitFieldPtr8Uint32(pWInfo+68 /* &.sorted */, uint32(1), 4, 0x10)
(*WhereInfo)(unsafe.Pointer(pWInfo)).FrevMask = *(*Bitmask)(unsafe.Pointer(bp + 24 /* revMask */))
}
}
@@ -133044,7 +135559,7 @@ __3:
// Return non-zero on success, if this query can be handled by this
// no-frills query planner. Return zero if this query needs the
// general-purpose query planner.
-func whereShortCut(tls *libc.TLS, pBuilder uintptr) int32 { /* sqlite3.c:152841:12: */
+func whereShortCut(tls *libc.TLS, pBuilder uintptr) int32 { /* sqlite3.c:153812:12: */
var pWInfo uintptr
var pItem uintptr
var pWC uintptr
@@ -133065,7 +135580,7 @@ func whereShortCut(tls *libc.TLS, pBuilder uintptr) int32 { /* sqlite3.c:152841:
if (*Table)(unsafe.Pointer(pTab)).FnModuleArg != 0 {
return 0
}
- if (uint32(int32(*(*uint8)(unsafe.Pointer(pItem + 60 /* &.fg */ + 4 /* &.isIndexedBy */)) >> 6 & 0x1))) != 0 {
+ if (uint32(int32(*(*uint16)(unsafe.Pointer(pItem + 60 /* &.fg */ + 4 /* &.isIndexedBy */)) & 0x4000 >> 14))) != 0 {
return 0
}
iCur = (*SrcItem)(unsafe.Pointer(pItem)).FiCursor
@@ -133091,7 +135606,7 @@ func whereShortCut(tls *libc.TLS, pBuilder uintptr) int32 { /* sqlite3.c:152841:
(int32((*Index)(unsafe.Pointer(pIdx)).FnKeyCol) > (int32(uint64(unsafe.Sizeof([3]uintptr{})) / uint64(unsafe.Sizeof(uintptr(0)))))) {
continue
}
- if (uint32(int32(*(*uint16)(unsafe.Pointer(pIdx + 100 /* &.uniqNotNull */)) >> 12 & 0x1))) != 0 {
+ if (uint32(int32(*(*uint16)(unsafe.Pointer(pIdx + 100 /* &.uniqNotNull */)) & 0x1000 >> 12))) != 0 {
opMask = (WO_EQ | WO_IS)
} else {
opMask = WO_EQ
@@ -133108,7 +135623,7 @@ func whereShortCut(tls *libc.TLS, pBuilder uintptr) int32 { /* sqlite3.c:152841:
continue
}
(*WhereLoop)(unsafe.Pointer(pLoop)).FwsFlags = (U32((WHERE_COLUMN_EQ | WHERE_ONEROW) | WHERE_INDEXED))
- if ((uint32(int32(*(*uint16)(unsafe.Pointer(pIdx + 100 /* &.isCovering */)) >> 10 & 0x1))) != 0) || (((*SrcItem)(unsafe.Pointer(pItem)).FcolUsed & (*Index)(unsafe.Pointer(pIdx)).FcolNotIdxed) == uint64(0)) {
+ if ((uint32(int32(*(*uint16)(unsafe.Pointer(pIdx + 100 /* &.isCovering */)) & 0x400 >> 10))) != 0) || (((*SrcItem)(unsafe.Pointer(pItem)).FcolUsed & (*Index)(unsafe.Pointer(pIdx)).FcolNotIdxed) == uint64(0)) {
*(*U32)(unsafe.Pointer(pLoop + 40 /* &.wsFlags */)) |= (U32(WHERE_IDX_ONLY))
}
(*WhereLoop)(unsafe.Pointer(pLoop)).FnLTerm = U16(j)
@@ -133138,7 +135653,7 @@ func whereShortCut(tls *libc.TLS, pBuilder uintptr) int32 { /* sqlite3.c:152841:
}
// Helper function for exprIsDeterministic().
-func exprNodeIsDeterministic(tls *libc.TLS, pWalker uintptr, pExpr uintptr) int32 { /* sqlite3.c:152923:12: */
+func exprNodeIsDeterministic(tls *libc.TLS, pWalker uintptr, pExpr uintptr) int32 { /* sqlite3.c:153894:12: */
if (int32((*Expr)(unsafe.Pointer(pExpr)).Fop) == TK_FUNCTION) && ((libc.Bool32(((*Expr)(unsafe.Pointer((pExpr))).Fflags & (U32(EP_ConstFunc))) != U32(0))) == 0) {
(*Walker)(unsafe.Pointer(pWalker)).FeCode = U16(0)
return WRC_Abort
@@ -133149,7 +135664,7 @@ func exprNodeIsDeterministic(tls *libc.TLS, pWalker uintptr, pExpr uintptr) int3
// Return true if the expression contains no non-deterministic SQL
// functions. Do not consider non-deterministic SQL functions that are
// part of sub-select statements.
-func exprIsDeterministic(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:152936:12: */
+func exprIsDeterministic(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:153907:12: */
bp := tls.Alloc(48)
defer tls.Free(48)
@@ -133253,7 +135768,7 @@ func exprIsDeterministic(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:152936:1
// the first cursor in an array of cursors for all indices. iIdxCur should
// be used to compute the appropriate cursor depending on which index is
// used.
-func Xsqlite3WhereBegin(tls *libc.TLS, pParse uintptr, pTabList uintptr, pWhere uintptr, pOrderBy uintptr, pResultSet uintptr, wctrlFlags U16, iAuxArg int32) uintptr { /* sqlite3.c:153056:26: */
+func Xsqlite3WhereBegin(tls *libc.TLS, pParse uintptr, pTabList uintptr, pWhere uintptr, pOrderBy uintptr, pResultSet uintptr, wctrlFlags U16, iAuxArg int32) uintptr { /* sqlite3.c:154027:26: */
bp := tls.Alloc(72)
defer tls.Free(72)
@@ -133333,7 +135848,7 @@ __2:
if !((*SrcList)(unsafe.Pointer(pTabList)).FnSrc > (int32(uint64(unsafe.Sizeof(Bitmask(0))) * uint64(8)))) {
goto __3
}
- Xsqlite3ErrorMsg(tls, pParse, ts+19868 /* "at most %d table..." */, libc.VaList(bp, (int32(uint64(unsafe.Sizeof(Bitmask(0)))*uint64(8)))))
+ Xsqlite3ErrorMsg(tls, pParse, ts+20328 /* "at most %d table..." */, libc.VaList(bp, (int32(uint64(unsafe.Sizeof(Bitmask(0)))*uint64(8)))))
return uintptr(0)
__3:
;
@@ -133408,7 +135923,7 @@ __7:
(*WhereInfo)(unsafe.Pointer(pWInfo)).FeDistinct = U8(WHERE_DISTINCT_UNIQUE)
__8:
;
- Xsqlite3VdbeExplain(tls, pParse, uint8(0), ts+19896 /* "SCAN CONSTANT RO..." */, 0)
+ Xsqlite3VdbeExplain(tls, pParse, uint8(0), ts+20356 /* "SCAN CONSTANT RO..." */, 0)
goto __6
__5:
// Assign a bit from the bitmask to every term in the FROM clause.
@@ -133613,8 +136128,9 @@ __32:
// LEFT JOIN t2
// LEFT JOIN t3 ON (t1.ipk=t3.ipk)
notReady = libc.CplUint64(uint64(0))
- if !(((int32((*WhereInfo)(unsafe.Pointer(pWInfo)).FnLevel) >= 2) &&
- (pResultSet != uintptr(0))) && // guarantees condition (1) above
+ if !((((int32((*WhereInfo)(unsafe.Pointer(pWInfo)).FnLevel) >= 2) &&
+ (pResultSet != uintptr(0))) && // these two combine to guarantee
+ (0 == (int32(wctrlFlags) & WHERE_AGG_DISTINCT))) && // condition (1) above
(((*Sqlite3)(unsafe.Pointer((db))).FdbOptFlags & (U32(SQLITE_OmitNoopJoin))) == U32(0))) {
goto __33
}
@@ -133870,7 +136386,7 @@ __60:
op1 = OP_OpenRead
// iAuxArg is always set to a positive value if ONEPASS is possible
- if !((!(((*Table)(unsafe.Pointer((pTab))).FtabFlags & U32(TF_WithoutRowid)) == U32(0)) && ((int32(*(*uint16)(unsafe.Pointer((pIx) + 100 /* &.idxType */)) >> 14 & 0x3)) == SQLITE_IDXTYPE_PRIMARYKEY)) &&
+ if !((!(((*Table)(unsafe.Pointer((pTab))).FtabFlags & U32(TF_WithoutRowid)) == U32(0)) && ((int32(*(*uint16)(unsafe.Pointer((pIx) + 100 /* &.idxType */)) & 0xc000 >> 14)) == SQLITE_IDXTYPE_PRIMARYKEY)) &&
((int32(wctrlFlags) & WHERE_OR_SUBCLAUSE) != 0)) {
goto __73
}
@@ -134010,6 +136526,8 @@ whereBeginError:
if !(pWInfo != 0) {
goto __91
}
+
+ whereUndoExprMods(tls, pWInfo)
(*Parse)(unsafe.Pointer(pParse)).FnQueryLoop = U32((*WhereInfo)(unsafe.Pointer(pWInfo)).FsavedNQueryLoop)
whereInfoFree(tls, db, pWInfo)
__91:
@@ -134024,7 +136542,7 @@ __91:
// Generate the end of the WHERE loop. See comments on
// sqlite3WhereBegin() for additional information.
-func Xsqlite3WhereEnd(tls *libc.TLS, pWInfo uintptr) { /* sqlite3.c:153652:21: */
+func Xsqlite3WhereEnd(tls *libc.TLS, pWInfo uintptr) { /* sqlite3.c:154626:21: */
var pParse uintptr = (*WhereInfo)(unsafe.Pointer(pWInfo)).FpParse
var v uintptr = (*Parse)(unsafe.Pointer(pParse)).FpVdbe
var i int32
@@ -134047,7 +136565,7 @@ func Xsqlite3WhereEnd(tls *libc.TLS, pWInfo uintptr) { /* sqlite3.c:153652:21: *
if (((((int32((*WhereInfo)(unsafe.Pointer(pWInfo)).FeDistinct) == WHERE_DISTINCT_ORDERED) &&
(i == (int32((*WhereInfo)(unsafe.Pointer(pWInfo)).FnLevel) - 1))) && // Ticket [ef9318757b152e3] 2017-10-21
(((*WhereLoop)(unsafe.Pointer(pLoop)).FwsFlags & U32(WHERE_INDEXED)) != U32(0))) &&
- ((uint32(int32(*(*uint16)(unsafe.Pointer((libc.AssignUintptr(&pIdx, *(*uintptr)(unsafe.Pointer(pLoop + 24 /* &.u */ /* &.btree */ + 8 /* &.pIndex */)))) + 100 /* &.hasStat1 */)) >> 8 & 0x1))) != 0)) &&
+ ((uint32(int32(*(*uint16)(unsafe.Pointer((libc.AssignUintptr(&pIdx, *(*uintptr)(unsafe.Pointer(pLoop + 24 /* &.u */ /* &.btree */ + 8 /* &.pIndex */)))) + 100 /* &.hasStat1 */)) & 0x100 >> 8))) != 0)) &&
((libc.AssignInt32(&n, int32(*(*U16)(unsafe.Pointer(pLoop + 24 /* &.u */ /* &.btree */ + 6 /* &.nDistinctCol */))))) > 0)) &&
(int32(*(*LogEst)(unsafe.Pointer((*Index)(unsafe.Pointer(pIdx)).FaiRowLogEst + uintptr(n)*2))) >= 36) {
var r1 int32 = ((*Parse)(unsafe.Pointer(pParse)).FnMem + 1)
@@ -134093,9 +136611,10 @@ func Xsqlite3WhereEnd(tls *libc.TLS, pWInfo uintptr) { /* sqlite3.c:153652:21: *
goto __3
}
{
- Xsqlite3VdbeJumpHere(tls, v, ((*InLoop)(unsafe.Pointer(pIn)).FaddrInTop + 1))
- if int32((*InLoop)(unsafe.Pointer(pIn)).FeEndLoopOp) != OP_Noop {
- if (*InLoop)(unsafe.Pointer(pIn)).FnPrefix != 0 {
+
+ Xsqlite3VdbeJumpHere(tls, v, (*(*int32)(unsafe.Pointer(pIn + 4)) + 1))
+ if int32(*(*U8)(unsafe.Pointer(pIn + 16))) != OP_Noop {
+ if *(*int32)(unsafe.Pointer(pIn + 12)) != 0 {
var bEarlyOut int32 = (libc.Bool32((((*WhereLoop)(unsafe.Pointer(pLoop)).FwsFlags & U32(WHERE_VIRTUALTABLE)) == U32(0)) &&
(((*WhereLoop)(unsafe.Pointer(pLoop)).FwsFlags & U32(WHERE_IN_EARLYOUT)) != U32(0))))
if (*WhereLevel)(unsafe.Pointer(pLevel)).FiLeftJoin != 0 {
@@ -134107,21 +136626,26 @@ func Xsqlite3WhereEnd(tls *libc.TLS, pWInfo uintptr) { /* sqlite3.c:153652:21: *
// return the null-row. So, if the cursor is not open yet,
// jump over the OP_Next or OP_Prev instruction about to
// be coded.
- Xsqlite3VdbeAddOp2(tls, v, OP_IfNotOpen, (*InLoop)(unsafe.Pointer(pIn)).FiCur,
+ Xsqlite3VdbeAddOp2(tls, v, OP_IfNotOpen, *(*int32)(unsafe.Pointer(pIn)),
((Xsqlite3VdbeCurrentAddr(tls, v) + 2) + bEarlyOut))
}
if bEarlyOut != 0 {
Xsqlite3VdbeAddOp4Int(tls, v, OP_IfNoHope, (*WhereLevel)(unsafe.Pointer(pLevel)).FiIdxCur,
(Xsqlite3VdbeCurrentAddr(tls, v) + 2),
- (*InLoop)(unsafe.Pointer(pIn)).FiBase, (*InLoop)(unsafe.Pointer(pIn)).FnPrefix)
+ *(*int32)(unsafe.Pointer(pIn + 8)), *(*int32)(unsafe.Pointer(pIn + 12)))
+ // Retarget the OP_IsNull against the left operand of IN so
+ // it jumps past the OP_IfNoHope. This is because the
+ // OP_IsNull also bypasses the OP_Affinity opcode that is
+ // required by OP_IfNoHope.
+ Xsqlite3VdbeJumpHere(tls, v, (*(*int32)(unsafe.Pointer(pIn + 4)) + 1))
}
}
- Xsqlite3VdbeAddOp2(tls, v, int32((*InLoop)(unsafe.Pointer(pIn)).FeEndLoopOp), (*InLoop)(unsafe.Pointer(pIn)).FiCur, (*InLoop)(unsafe.Pointer(pIn)).FaddrInTop)
+ Xsqlite3VdbeAddOp2(tls, v, int32(*(*U8)(unsafe.Pointer(pIn + 16))), *(*int32)(unsafe.Pointer(pIn)), *(*int32)(unsafe.Pointer(pIn + 4)))
}
- Xsqlite3VdbeJumpHere(tls, v, ((*InLoop)(unsafe.Pointer(pIn)).FaddrInTop - 1))
+ Xsqlite3VdbeJumpHere(tls, v, (*(*int32)(unsafe.Pointer(pIn + 4)) - 1))
}
goto __2
@@ -134185,7 +136709,7 @@ __4:
// For a co-routine, change all OP_Column references to the table of
// the co-routine into OP_Copy of result contained in a register.
// OP_Rowid becomes OP_Null.
- if (uint32(int32(*(*uint8)(unsafe.Pointer(pTabItem + 60 /* &.fg */ + 4 /* &.viaCoroutine */)) >> 3 & 0x1))) != 0 {
+ if (uint32(int32(*(*uint16)(unsafe.Pointer(pTabItem + 60 /* &.fg */ + 4 /* &.viaCoroutine */)) & 0x800 >> 11))) != 0 {
translateColumnToCopy(tls, pParse, (*WhereLevel)(unsafe.Pointer(pLevel)).FaddrBody, (*WhereLevel)(unsafe.Pointer(pLevel)).FiTabCur,
(*SrcItem)(unsafe.Pointer(pTabItem)).FregResult, 0)
@@ -134261,15 +136785,10 @@ __5:
__6:
;
- // Undo all Expr node modifications
- for (*WhereInfo)(unsafe.Pointer(pWInfo)).FpExprMods != 0 {
- var p uintptr = (*WhereInfo)(unsafe.Pointer(pWInfo)).FpExprMods
- (*WhereInfo)(unsafe.Pointer(pWInfo)).FpExprMods = (*WhereExprMod)(unsafe.Pointer(p)).FpNext
- libc.Xmemcpy(tls, (*WhereExprMod)(unsafe.Pointer(p)).FpExpr, (p + 16 /* &.orig */), uint64(unsafe.Sizeof(Expr{})))
- Xsqlite3DbFree(tls, db, p)
- }
-
// Final cleanup
+ if (*WhereInfo)(unsafe.Pointer(pWInfo)).FpExprMods != 0 {
+ whereUndoExprMods(tls, pWInfo)
+ }
(*Parse)(unsafe.Pointer(pParse)).FnQueryLoop = U32((*WhereInfo)(unsafe.Pointer(pWInfo)).FsavedNQueryLoop)
whereInfoFree(tls, db, pWInfo)
return
@@ -134415,7 +136934,7 @@ __6:
// window frame has been coerced to:
//
// ROWS BETWEEN UNBOUNDED PRECEDING AND CURRENT ROW
-func row_numberStepFunc(tls *libc.TLS, pCtx uintptr, nArg int32, apArg uintptr) { /* sqlite3.c:154084:13: */
+func row_numberStepFunc(tls *libc.TLS, pCtx uintptr, nArg int32, apArg uintptr) { /* sqlite3.c:155058:13: */
var p uintptr = Xsqlite3_aggregate_context(tls, pCtx, int32(unsafe.Sizeof(I64(0))))
if p != 0 {
(*(*I64)(unsafe.Pointer(p)))++
@@ -134424,7 +136943,7 @@ func row_numberStepFunc(tls *libc.TLS, pCtx uintptr, nArg int32, apArg uintptr)
_ = apArg
}
-func row_numberValueFunc(tls *libc.TLS, pCtx uintptr) { /* sqlite3.c:154094:13: */
+func row_numberValueFunc(tls *libc.TLS, pCtx uintptr) { /* sqlite3.c:155068:13: */
var p uintptr = Xsqlite3_aggregate_context(tls, pCtx, int32(unsafe.Sizeof(I64(0))))
Xsqlite3_result_int64(tls, pCtx, func() int64 {
if p != 0 {
@@ -134440,13 +136959,13 @@ type CallCount = struct {
FnValue I64
FnStep I64
FnTotal I64
-} /* sqlite3.c:154103:1 */
+} /* sqlite3.c:155077:1 */
// Implementation of built-in window function dense_rank(). Assumes that
// the window frame has been set to:
//
// RANGE BETWEEN UNBOUNDED PRECEDING AND CURRENT ROW
-func dense_rankStepFunc(tls *libc.TLS, pCtx uintptr, nArg int32, apArg uintptr) { /* sqlite3.c:154115:13: */
+func dense_rankStepFunc(tls *libc.TLS, pCtx uintptr, nArg int32, apArg uintptr) { /* sqlite3.c:155089:13: */
var p uintptr
p = Xsqlite3_aggregate_context(tls, pCtx, int32(unsafe.Sizeof(CallCount{})))
if p != 0 {
@@ -134456,7 +136975,7 @@ func dense_rankStepFunc(tls *libc.TLS, pCtx uintptr, nArg int32, apArg uintptr)
_ = apArg
}
-func dense_rankValueFunc(tls *libc.TLS, pCtx uintptr) { /* sqlite3.c:154126:13: */
+func dense_rankValueFunc(tls *libc.TLS, pCtx uintptr) { /* sqlite3.c:155100:13: */
var p uintptr
p = Xsqlite3_aggregate_context(tls, pCtx, int32(unsafe.Sizeof(CallCount{})))
if p != 0 {
@@ -134474,9 +136993,9 @@ func dense_rankValueFunc(tls *libc.TLS, pCtx uintptr) { /* sqlite3.c:154126:13:
type NthValueCtx = struct {
FnStep I64
FpValue uintptr
-} /* sqlite3.c:154143:1 */
+} /* sqlite3.c:155117:1 */
-func nth_valueStepFunc(tls *libc.TLS, pCtx uintptr, nArg int32, apArg uintptr) { /* sqlite3.c:154147:13: */
+func nth_valueStepFunc(tls *libc.TLS, pCtx uintptr, nArg int32, apArg uintptr) { /* sqlite3.c:155121:13: */
var p uintptr
var fVal float64
var iVal I64
@@ -134539,10 +137058,10 @@ __1:
error_out:
Xsqlite3_result_error(tls,
- pCtx, ts+19914 /* "second argument ..." */, -1)
+ pCtx, ts+20374 /* "second argument ..." */, -1)
}
-func nth_valueFinalizeFunc(tls *libc.TLS, pCtx uintptr) { /* sqlite3.c:154188:13: */
+func nth_valueFinalizeFunc(tls *libc.TLS, pCtx uintptr) { /* sqlite3.c:155162:13: */
var p uintptr
p = Xsqlite3_aggregate_context(tls, pCtx, 0)
if (p != 0) && ((*NthValueCtx)(unsafe.Pointer(p)).FpValue != 0) {
@@ -134552,7 +137071,7 @@ func nth_valueFinalizeFunc(tls *libc.TLS, pCtx uintptr) { /* sqlite3.c:154188:13
}
}
-func first_valueStepFunc(tls *libc.TLS, pCtx uintptr, nArg int32, apArg uintptr) { /* sqlite3.c:154200:13: */
+func first_valueStepFunc(tls *libc.TLS, pCtx uintptr, nArg int32, apArg uintptr) { /* sqlite3.c:155174:13: */
var p uintptr
p = Xsqlite3_aggregate_context(tls, pCtx, int32(unsafe.Sizeof(NthValueCtx{})))
if (p != 0) && ((*NthValueCtx)(unsafe.Pointer(p)).FpValue == uintptr(0)) {
@@ -134565,7 +137084,7 @@ func first_valueStepFunc(tls *libc.TLS, pCtx uintptr, nArg int32, apArg uintptr)
_ = apArg
}
-func first_valueFinalizeFunc(tls *libc.TLS, pCtx uintptr) { /* sqlite3.c:154216:13: */
+func first_valueFinalizeFunc(tls *libc.TLS, pCtx uintptr) { /* sqlite3.c:155190:13: */
var p uintptr
p = Xsqlite3_aggregate_context(tls, pCtx, int32(unsafe.Sizeof(NthValueCtx{})))
if (p != 0) && ((*NthValueCtx)(unsafe.Pointer(p)).FpValue != 0) {
@@ -134579,7 +137098,7 @@ func first_valueFinalizeFunc(tls *libc.TLS, pCtx uintptr) { /* sqlite3.c:154216:
// the window frame has been set to:
//
// RANGE BETWEEN UNBOUNDED PRECEDING AND CURRENT ROW
-func rankStepFunc(tls *libc.TLS, pCtx uintptr, nArg int32, apArg uintptr) { /* sqlite3.c:154234:13: */
+func rankStepFunc(tls *libc.TLS, pCtx uintptr, nArg int32, apArg uintptr) { /* sqlite3.c:155208:13: */
var p uintptr
p = Xsqlite3_aggregate_context(tls, pCtx, int32(unsafe.Sizeof(CallCount{})))
if p != 0 {
@@ -134592,7 +137111,7 @@ func rankStepFunc(tls *libc.TLS, pCtx uintptr, nArg int32, apArg uintptr) { /* s
_ = apArg
}
-func rankValueFunc(tls *libc.TLS, pCtx uintptr) { /* sqlite3.c:154250:13: */
+func rankValueFunc(tls *libc.TLS, pCtx uintptr) { /* sqlite3.c:155224:13: */
var p uintptr
p = Xsqlite3_aggregate_context(tls, pCtx, int32(unsafe.Sizeof(CallCount{})))
if p != 0 {
@@ -134605,7 +137124,7 @@ func rankValueFunc(tls *libc.TLS, pCtx uintptr) { /* sqlite3.c:154250:13: */
// the window frame has been set to:
//
// GROUPS BETWEEN CURRENT ROW AND UNBOUNDED FOLLOWING
-func percent_rankStepFunc(tls *libc.TLS, pCtx uintptr, nArg int32, apArg uintptr) { /* sqlite3.c:154265:13: */
+func percent_rankStepFunc(tls *libc.TLS, pCtx uintptr, nArg int32, apArg uintptr) { /* sqlite3.c:155239:13: */
var p uintptr
_ = nArg
_ = apArg
@@ -134615,7 +137134,7 @@ func percent_rankStepFunc(tls *libc.TLS, pCtx uintptr, nArg int32, apArg uintptr
}
}
-func percent_rankInvFunc(tls *libc.TLS, pCtx uintptr, nArg int32, apArg uintptr) { /* sqlite3.c:154278:13: */
+func percent_rankInvFunc(tls *libc.TLS, pCtx uintptr, nArg int32, apArg uintptr) { /* sqlite3.c:155252:13: */
var p uintptr
_ = nArg
_ = apArg
@@ -134623,7 +137142,7 @@ func percent_rankInvFunc(tls *libc.TLS, pCtx uintptr, nArg int32, apArg uintptr)
(*CallCount)(unsafe.Pointer(p)).FnStep++
}
-func percent_rankValueFunc(tls *libc.TLS, pCtx uintptr) { /* sqlite3.c:154289:13: */
+func percent_rankValueFunc(tls *libc.TLS, pCtx uintptr) { /* sqlite3.c:155263:13: */
var p uintptr
p = Xsqlite3_aggregate_context(tls, pCtx, int32(unsafe.Sizeof(CallCount{})))
if p != 0 {
@@ -134641,7 +137160,7 @@ func percent_rankValueFunc(tls *libc.TLS, pCtx uintptr) { /* sqlite3.c:154289:13
// the window frame has been set to:
//
// GROUPS BETWEEN 1 FOLLOWING AND UNBOUNDED FOLLOWING
-func cume_distStepFunc(tls *libc.TLS, pCtx uintptr, nArg int32, apArg uintptr) { /* sqlite3.c:154310:13: */
+func cume_distStepFunc(tls *libc.TLS, pCtx uintptr, nArg int32, apArg uintptr) { /* sqlite3.c:155284:13: */
var p uintptr
_ = nArg
_ = apArg
@@ -134651,7 +137170,7 @@ func cume_distStepFunc(tls *libc.TLS, pCtx uintptr, nArg int32, apArg uintptr) {
}
}
-func cume_distInvFunc(tls *libc.TLS, pCtx uintptr, nArg int32, apArg uintptr) { /* sqlite3.c:154323:13: */
+func cume_distInvFunc(tls *libc.TLS, pCtx uintptr, nArg int32, apArg uintptr) { /* sqlite3.c:155297:13: */
var p uintptr
_ = nArg
_ = apArg
@@ -134659,7 +137178,7 @@ func cume_distInvFunc(tls *libc.TLS, pCtx uintptr, nArg int32, apArg uintptr) {
(*CallCount)(unsafe.Pointer(p)).FnStep++
}
-func cume_distValueFunc(tls *libc.TLS, pCtx uintptr) { /* sqlite3.c:154334:13: */
+func cume_distValueFunc(tls *libc.TLS, pCtx uintptr) { /* sqlite3.c:155308:13: */
var p uintptr
p = Xsqlite3_aggregate_context(tls, pCtx, 0)
if p != 0 {
@@ -134673,13 +137192,13 @@ type NtileCtx = struct {
FnTotal I64
FnParam I64
FiRow I64
-} /* sqlite3.c:154347:1 */
+} /* sqlite3.c:155321:1 */
// Implementation of ntile(). This assumes that the window frame has
// been coerced to:
//
// ROWS CURRENT ROW AND UNBOUNDED FOLLOWING
-func ntileStepFunc(tls *libc.TLS, pCtx uintptr, nArg int32, apArg uintptr) { /* sqlite3.c:154359:13: */
+func ntileStepFunc(tls *libc.TLS, pCtx uintptr, nArg int32, apArg uintptr) { /* sqlite3.c:155333:13: */
var p uintptr
_ = nArg
p = Xsqlite3_aggregate_context(tls, pCtx, int32(unsafe.Sizeof(NtileCtx{})))
@@ -134688,14 +137207,14 @@ func ntileStepFunc(tls *libc.TLS, pCtx uintptr, nArg int32, apArg uintptr) { /*
(*NtileCtx)(unsafe.Pointer(p)).FnParam = Xsqlite3_value_int64(tls, *(*uintptr)(unsafe.Pointer(apArg)))
if (*NtileCtx)(unsafe.Pointer(p)).FnParam <= int64(0) {
Xsqlite3_result_error(tls,
- pCtx, ts+19970 /* "argument of ntil..." */, -1)
+ pCtx, ts+20430 /* "argument of ntil..." */, -1)
}
}
(*NtileCtx)(unsafe.Pointer(p)).FnTotal++
}
}
-func ntileInvFunc(tls *libc.TLS, pCtx uintptr, nArg int32, apArg uintptr) { /* sqlite3.c:154379:13: */
+func ntileInvFunc(tls *libc.TLS, pCtx uintptr, nArg int32, apArg uintptr) { /* sqlite3.c:155353:13: */
var p uintptr
_ = nArg
_ = apArg
@@ -134703,7 +137222,7 @@ func ntileInvFunc(tls *libc.TLS, pCtx uintptr, nArg int32, apArg uintptr) { /* s
(*NtileCtx)(unsafe.Pointer(p)).FiRow++
}
-func ntileValueFunc(tls *libc.TLS, pCtx uintptr) { /* sqlite3.c:154390:13: */
+func ntileValueFunc(tls *libc.TLS, pCtx uintptr) { /* sqlite3.c:155364:13: */
var p uintptr
p = Xsqlite3_aggregate_context(tls, pCtx, int32(unsafe.Sizeof(NtileCtx{})))
if (p != 0) && ((*NtileCtx)(unsafe.Pointer(p)).FnParam > int64(0)) {
@@ -134726,13 +137245,13 @@ func ntileValueFunc(tls *libc.TLS, pCtx uintptr) { /* sqlite3.c:154390:13: */
// Context object for last_value() window function.
type LastValueCtx = struct {
- FpVal uintptr
- FnVal int32
- _ [4]byte
-} /* sqlite3.c:154417:1 */
+ FpVal uintptr
+ FnVal int32
+ F__ccgo_pad1 [4]byte
+} /* sqlite3.c:155391:1 */
// Implementation of last_value().
-func last_valueStepFunc(tls *libc.TLS, pCtx uintptr, nArg int32, apArg uintptr) { /* sqlite3.c:154425:13: */
+func last_valueStepFunc(tls *libc.TLS, pCtx uintptr, nArg int32, apArg uintptr) { /* sqlite3.c:155399:13: */
var p uintptr
_ = nArg
p = Xsqlite3_aggregate_context(tls, pCtx, int32(unsafe.Sizeof(LastValueCtx{})))
@@ -134747,7 +137266,7 @@ func last_valueStepFunc(tls *libc.TLS, pCtx uintptr, nArg int32, apArg uintptr)
}
}
-func last_valueInvFunc(tls *libc.TLS, pCtx uintptr, nArg int32, apArg uintptr) { /* sqlite3.c:154443:13: */
+func last_valueInvFunc(tls *libc.TLS, pCtx uintptr, nArg int32, apArg uintptr) { /* sqlite3.c:155417:13: */
var p uintptr
_ = nArg
_ = apArg
@@ -134761,7 +137280,7 @@ func last_valueInvFunc(tls *libc.TLS, pCtx uintptr, nArg int32, apArg uintptr) {
}
}
-func last_valueValueFunc(tls *libc.TLS, pCtx uintptr) { /* sqlite3.c:154460:13: */
+func last_valueValueFunc(tls *libc.TLS, pCtx uintptr) { /* sqlite3.c:155434:13: */
var p uintptr
p = Xsqlite3_aggregate_context(tls, pCtx, 0)
if (p != 0) && ((*LastValueCtx)(unsafe.Pointer(p)).FpVal != 0) {
@@ -134769,7 +137288,7 @@ func last_valueValueFunc(tls *libc.TLS, pCtx uintptr) { /* sqlite3.c:154460:13:
}
}
-func last_valueFinalizeFunc(tls *libc.TLS, pCtx uintptr) { /* sqlite3.c:154467:13: */
+func last_valueFinalizeFunc(tls *libc.TLS, pCtx uintptr) { /* sqlite3.c:155441:13: */
var p uintptr
p = Xsqlite3_aggregate_context(tls, pCtx, int32(unsafe.Sizeof(LastValueCtx{})))
if (p != 0) && ((*LastValueCtx)(unsafe.Pointer(p)).FpVal != 0) {
@@ -134785,17 +137304,17 @@ func last_valueFinalizeFunc(tls *libc.TLS, pCtx uintptr) { /* sqlite3.c:154467:1
// comparison of the zName pointer. Example:
//
// if( pFuncDef->zName==row_valueName ){ ... }
-var row_numberName = *(*[11]int8)(unsafe.Pointer(ts + 20015 /* "row_number" */)) /* sqlite3.c:154485:19 */
-var dense_rankName = *(*[11]int8)(unsafe.Pointer(ts + 20026 /* "dense_rank" */)) /* sqlite3.c:154486:19 */
-var rankName = *(*[5]int8)(unsafe.Pointer(ts + 20037 /* "rank" */)) /* sqlite3.c:154487:19 */
-var percent_rankName = *(*[13]int8)(unsafe.Pointer(ts + 20042 /* "percent_rank" */)) /* sqlite3.c:154488:19 */
-var cume_distName = *(*[10]int8)(unsafe.Pointer(ts + 20055 /* "cume_dist" */)) /* sqlite3.c:154489:19 */
-var ntileName = *(*[6]int8)(unsafe.Pointer(ts + 20065 /* "ntile" */)) /* sqlite3.c:154490:19 */
-var last_valueName = *(*[11]int8)(unsafe.Pointer(ts + 20071 /* "last_value" */)) /* sqlite3.c:154491:19 */
-var nth_valueName = *(*[10]int8)(unsafe.Pointer(ts + 20082 /* "nth_value" */)) /* sqlite3.c:154492:19 */
-var first_valueName = *(*[12]int8)(unsafe.Pointer(ts + 20092 /* "first_value" */)) /* sqlite3.c:154493:19 */
-var leadName = *(*[5]int8)(unsafe.Pointer(ts + 20104 /* "lead" */)) /* sqlite3.c:154494:19 */
-var lagName = *(*[4]int8)(unsafe.Pointer(ts + 20109 /* "lag" */)) /* sqlite3.c:154495:19 */
+var row_numberName = *(*[11]uint8)(unsafe.Pointer(ts + 20475 /* "row_number" */)) /* sqlite3.c:155459:19 */
+var dense_rankName = *(*[11]uint8)(unsafe.Pointer(ts + 20486 /* "dense_rank" */)) /* sqlite3.c:155460:19 */
+var rankName = *(*[5]uint8)(unsafe.Pointer(ts + 20497 /* "rank" */)) /* sqlite3.c:155461:19 */
+var percent_rankName = *(*[13]uint8)(unsafe.Pointer(ts + 20502 /* "percent_rank" */)) /* sqlite3.c:155462:19 */
+var cume_distName = *(*[10]uint8)(unsafe.Pointer(ts + 20515 /* "cume_dist" */)) /* sqlite3.c:155463:19 */
+var ntileName = *(*[6]uint8)(unsafe.Pointer(ts + 20525 /* "ntile" */)) /* sqlite3.c:155464:19 */
+var last_valueName = *(*[11]uint8)(unsafe.Pointer(ts + 20531 /* "last_value" */)) /* sqlite3.c:155465:19 */
+var nth_valueName = *(*[10]uint8)(unsafe.Pointer(ts + 20542 /* "nth_value" */)) /* sqlite3.c:155466:19 */
+var first_valueName = *(*[12]uint8)(unsafe.Pointer(ts + 20552 /* "first_value" */)) /* sqlite3.c:155467:19 */
+var leadName = *(*[5]uint8)(unsafe.Pointer(ts + 20564 /* "lead" */)) /* sqlite3.c:155468:19 */
+var lagName = *(*[4]uint8)(unsafe.Pointer(ts + 20569 /* "lag" */)) /* sqlite3.c:155469:19 */
// No-op implementations of xStep() and xFinalize(). Used as place-holders
// for built-in window functions that never call those interfaces.
@@ -134804,7 +137323,7 @@ var lagName = *(*[4]int8)(unsafe.Pointer(ts + 20109 /* "lag" */))
// noopStepFunc() is never called, and so it is marked with NO_TEST to
// let the test coverage routine know not to expect this function to be
// invoked.
-func noopStepFunc(tls *libc.TLS, p uintptr, n int32, a uintptr) { /* sqlite3.c:154506:13: */ //NO_TEST
+func noopStepFunc(tls *libc.TLS, p uintptr, n int32, a uintptr) { /* sqlite3.c:155480:13: */ //NO_TEST
_ = p //NO_TEST
_ = n //NO_TEST
_ = a //NO_TEST
@@ -134812,7 +137331,7 @@ func noopStepFunc(tls *libc.TLS, p uintptr, n int32, a uintptr) { /* sqlite3.c:1
}
//NO_TEST
-func noopValueFunc(tls *libc.TLS, p uintptr) { /* sqlite3.c:154516:13: */
+func noopValueFunc(tls *libc.TLS, p uintptr) { /* sqlite3.c:155490:13: */
_ = p /*no-op*/
}
@@ -134827,7 +137346,7 @@ func noopValueFunc(tls *libc.TLS, p uintptr) { /* sqlite3.c:154516:13: */
// xInverse.
// Register those built-in window functions that are not also aggregates.
-func Xsqlite3WindowFunctions(tls *libc.TLS) { /* sqlite3.c:154547:21: */
+func Xsqlite3WindowFunctions(tls *libc.TLS) { /* sqlite3.c:155521:21: */
Xsqlite3InsertBuiltinFuncs(tls, uintptr(unsafe.Pointer(&aWindowFuncs)), (int32(uint64(unsafe.Sizeof(aWindowFuncs)) / uint64(unsafe.Sizeof(FuncDef{})))))
}
@@ -134846,9 +137365,9 @@ var aWindowFuncs = [15]FuncDef{
{FnArg: int8(3), FfuncFlags: (U32((SQLITE_UTF8 | SQLITE_FUNC_WINDOW) | 0)), FxSFunc: 0, FxFinalize: 0, FxValue: 0, FxInverse: 0, FzName: 0},
{FnArg: int8(1), FfuncFlags: (U32((SQLITE_UTF8 | SQLITE_FUNC_WINDOW) | 0)), FxSFunc: 0, FxFinalize: 0, FxValue: 0, FxInverse: 0, FzName: 0},
{FnArg: int8(2), FfuncFlags: (U32((SQLITE_UTF8 | SQLITE_FUNC_WINDOW) | 0)), FxSFunc: 0, FxFinalize: 0, FxValue: 0, FxInverse: 0, FzName: 0},
- {FnArg: int8(3), FfuncFlags: (U32((SQLITE_UTF8 | SQLITE_FUNC_WINDOW) | 0)), FxSFunc: 0, FxFinalize: 0, FxValue: 0, FxInverse: 0, FzName: 0}} /* sqlite3.c:154548:18 */
+ {FnArg: int8(3), FfuncFlags: (U32((SQLITE_UTF8 | SQLITE_FUNC_WINDOW) | 0)), FxSFunc: 0, FxFinalize: 0, FxValue: 0, FxInverse: 0, FzName: 0}} /* sqlite3.c:155522:18 */
-func windowFind(tls *libc.TLS, pParse uintptr, pList uintptr, zName uintptr) uintptr { /* sqlite3.c:154568:15: */
+func windowFind(tls *libc.TLS, pParse uintptr, pList uintptr, zName uintptr) uintptr { /* sqlite3.c:155542:15: */
bp := tls.Alloc(8)
defer tls.Free(8)
@@ -134859,7 +137378,7 @@ func windowFind(tls *libc.TLS, pParse uintptr, pList uintptr, zName uintptr) uin
}
}
if p == uintptr(0) {
- Xsqlite3ErrorMsg(tls, pParse, ts+20113 /* "no such window: ..." */, libc.VaList(bp, zName))
+ Xsqlite3ErrorMsg(tls, pParse, ts+20573 /* "no such window: ..." */, libc.VaList(bp, zName))
}
return p
}
@@ -134879,7 +137398,7 @@ func windowFind(tls *libc.TLS, pParse uintptr, pList uintptr, zName uintptr) uin
// * If the function is a built-in window function that requires the
// window to be coerced (see "BUILT-IN WINDOW FUNCTIONS" at the top
// of this file), pWin is updated here.
-func Xsqlite3WindowUpdate(tls *libc.TLS, pParse uintptr, pList uintptr, pWin uintptr, pFunc uintptr) { /* sqlite3.c:154596:21: */
+func Xsqlite3WindowUpdate(tls *libc.TLS, pParse uintptr, pList uintptr, pWin uintptr, pFunc uintptr) { /* sqlite3.c:155570:21: */
bp := tls.Alloc(192)
defer tls.Free(192)
@@ -134903,12 +137422,12 @@ func Xsqlite3WindowUpdate(tls *libc.TLS, pParse uintptr, pList uintptr, pWin uin
(((*Window)(unsafe.Pointer(pWin)).FpStart != 0) || ((*Window)(unsafe.Pointer(pWin)).FpEnd != 0))) &&
(((*Window)(unsafe.Pointer(pWin)).FpOrderBy == uintptr(0)) || ((*ExprList)(unsafe.Pointer((*Window)(unsafe.Pointer(pWin)).FpOrderBy)).FnExpr != 1)) {
Xsqlite3ErrorMsg(tls, pParse,
- ts+20132 /* "RANGE with offse..." */, 0)
+ ts+20592 /* "RANGE with offse..." */, 0)
} else if ((*FuncDef)(unsafe.Pointer(pFunc)).FfuncFlags & U32(SQLITE_FUNC_WINDOW)) != 0 {
var db uintptr = (*Parse)(unsafe.Pointer(pParse)).Fdb
if (*Window)(unsafe.Pointer(pWin)).FpFilter != 0 {
Xsqlite3ErrorMsg(tls, pParse,
- ts+20203 /* "FILTER clause ma..." */, 0)
+ ts+20663 /* "FILTER clause ma..." */, 0)
} else {
*(*[8]WindowUpdate)(unsafe.Pointer(bp /* aUp */)) = [8]WindowUpdate{
{FzFunc: uintptr(unsafe.Pointer(&row_numberName)), FeFrmType: TK_ROWS, FeStart: TK_UNBOUNDED, FeEnd: TK_CURRENT},
@@ -134931,7 +137450,7 @@ func Xsqlite3WindowUpdate(tls *libc.TLS, pParse uintptr, pList uintptr, pWin uin
(*Window)(unsafe.Pointer(pWin)).FeEnd = U8((*WindowUpdate)(unsafe.Pointer(bp /* &aUp */ + uintptr(i)*24)).FeEnd)
(*Window)(unsafe.Pointer(pWin)).FeExclude = U8(0)
if int32((*Window)(unsafe.Pointer(pWin)).FeStart) == TK_FOLLOWING {
- (*Window)(unsafe.Pointer(pWin)).FpStart = Xsqlite3Expr(tls, db, TK_INTEGER, ts+6782 /* "1" */)
+ (*Window)(unsafe.Pointer(pWin)).FpStart = Xsqlite3Expr(tls, db, TK_INTEGER, ts+6913 /* "1" */)
}
break
}
@@ -134942,21 +137461,21 @@ func Xsqlite3WindowUpdate(tls *libc.TLS, pParse uintptr, pList uintptr, pWin uin
}
type WindowUpdate = struct {
- FzFunc uintptr
- FeFrmType int32
- FeStart int32
- FeEnd int32
- _ [4]byte
-} /* sqlite3.c:154631:7 */
+ FzFunc uintptr
+ FeFrmType int32
+ FeStart int32
+ FeEnd int32
+ F__ccgo_pad1 [4]byte
+} /* sqlite3.c:155605:7 */
// Context object passed through sqlite3WalkExprList() to
// selectWindowRewriteExprCb() by selectWindowRewriteEList().
-type WindowRewrite = WindowRewrite1 /* sqlite3.c:154671:30 */
+type WindowRewrite = WindowRewrite1 /* sqlite3.c:155645:30 */
// Callback function used by selectWindowRewriteEList(). If necessary,
// this function appends to the output expression-list and updates
// expression (*ppExpr) in place.
-func selectWindowRewriteExprCb(tls *libc.TLS, pWalker uintptr, pExpr uintptr) int32 { /* sqlite3.c:154685:12: */
+func selectWindowRewriteExprCb(tls *libc.TLS, pWalker uintptr, pExpr uintptr) int32 { /* sqlite3.c:155659:12: */
var p uintptr = *(*uintptr)(unsafe.Pointer(pWalker + 40 /* &.u */))
var pParse uintptr = (*Walker)(unsafe.Pointer(pWalker)).FpParse
@@ -135003,6 +137522,9 @@ func selectWindowRewriteExprCb(tls *libc.TLS, pWalker uintptr, pExpr uintptr) in
case TK_COLUMN:
{
var iCol int32 = -1
+ if (*Sqlite3)(unsafe.Pointer((*Parse)(unsafe.Pointer(pParse)).Fdb)).FmallocFailed != 0 {
+ return WRC_Abort
+ }
if (*WindowRewrite1)(unsafe.Pointer(p)).FpSub != 0 {
var i int32
for i = 0; i < (*ExprList)(unsafe.Pointer((*WindowRewrite1)(unsafe.Pointer(p)).FpSub)).FnExpr; i++ {
@@ -135052,7 +137574,7 @@ func selectWindowRewriteExprCb(tls *libc.TLS, pWalker uintptr, pExpr uintptr) in
return WRC_Continue
}
-func selectWindowRewriteSelectCb(tls *libc.TLS, pWalker uintptr, pSelect uintptr) int32 { /* sqlite3.c:154766:12: */
+func selectWindowRewriteSelectCb(tls *libc.TLS, pWalker uintptr, pSelect uintptr) int32 { /* sqlite3.c:155741:12: */
var p uintptr = *(*uintptr)(unsafe.Pointer(pWalker + 40 /* &.u */))
var pSave uintptr = (*WindowRewrite1)(unsafe.Pointer(p)).FpSubSelect
if pSave == pSelect {
@@ -135076,7 +137598,7 @@ func selectWindowRewriteSelectCb(tls *libc.TLS, pWalker uintptr, pSelect uintptr
// with a TK_COLUMN that reads the (N-1)th element of table
// pWin->iEphCsr, where N is the number of elements in (*ppSub) after
// appending the new one.
-func selectWindowRewriteEList(tls *libc.TLS, pParse uintptr, pWin uintptr, pSrc uintptr, pEList uintptr, pTab uintptr, ppSub uintptr) { /* sqlite3.c:154793:13: */
+func selectWindowRewriteEList(tls *libc.TLS, pParse uintptr, pWin uintptr, pSrc uintptr, pEList uintptr, pTab uintptr, ppSub uintptr) { /* sqlite3.c:155768:13: */
bp := tls.Alloc(88)
defer tls.Free(88)
@@ -135108,7 +137630,7 @@ func selectWindowRewriteEList(tls *libc.TLS, pParse uintptr, pWin uintptr, pSrc
// Append a copy of each expression in expression-list pAppend to
// expression list pList. Return a pointer to the result list.
-func exprListAppendList(tls *libc.TLS, pParse uintptr, pList uintptr, pAppend uintptr, bIntToNull int32) uintptr { /* sqlite3.c:154827:17: */
+func exprListAppendList(tls *libc.TLS, pParse uintptr, pList uintptr, pAppend uintptr, bIntToNull int32) uintptr { /* sqlite3.c:155802:17: */
bp := tls.Alloc(4)
defer tls.Free(4)
@@ -135121,9 +137643,14 @@ func exprListAppendList(tls *libc.TLS, pParse uintptr, pList uintptr, pAppend ui
nInit = 0
}
for i = 0; i < (*ExprList)(unsafe.Pointer(pAppend)).FnExpr; i++ {
- var pDup uintptr = Xsqlite3ExprDup(tls, (*Parse)(unsafe.Pointer(pParse)).Fdb, (*ExprList_item)(unsafe.Pointer((pAppend+8 /* &.a */)+uintptr(i)*32)).FpExpr, 0)
+ var db uintptr = (*Parse)(unsafe.Pointer(pParse)).Fdb
+ var pDup uintptr = Xsqlite3ExprDup(tls, db, (*ExprList_item)(unsafe.Pointer((pAppend+8 /* &.a */)+uintptr(i)*32)).FpExpr, 0)
- if (bIntToNull != 0) && (pDup != 0) {
+ if (*Sqlite3)(unsafe.Pointer(db)).FmallocFailed != 0 {
+ Xsqlite3ExprDelete(tls, db, pDup)
+ break
+ }
+ if bIntToNull != 0 {
// var iDummy int32 at bp, 4
var pSub uintptr
@@ -135151,7 +137678,7 @@ func exprListAppendList(tls *libc.TLS, pParse uintptr, pList uintptr, pAppend ui
// due to the extra subquery layer that was added.
//
// See also the incrAggDepth() routine in resolve.c
-func sqlite3WindowExtraAggFuncDepth(tls *libc.TLS, pWalker uintptr, pExpr uintptr) int32 { /* sqlite3.c:154866:12: */
+func sqlite3WindowExtraAggFuncDepth(tls *libc.TLS, pWalker uintptr, pExpr uintptr) int32 { /* sqlite3.c:155846:12: */
if (int32((*Expr)(unsafe.Pointer(pExpr)).Fop) == TK_AGG_FUNCTION) &&
(int32((*Expr)(unsafe.Pointer(pExpr)).Fop2) >= (*Walker)(unsafe.Pointer(pWalker)).FwalkerDepth) {
(*Expr)(unsafe.Pointer(pExpr)).Fop2++
@@ -135159,12 +137686,23 @@ func sqlite3WindowExtraAggFuncDepth(tls *libc.TLS, pWalker uintptr, pExpr uintpt
return WRC_Continue
}
+func disallowAggregatesInOrderByCb(tls *libc.TLS, pWalker uintptr, pExpr uintptr) int32 { /* sqlite3.c:155855:12: */
+ bp := tls.Alloc(8)
+ defer tls.Free(8)
+
+ if (int32((*Expr)(unsafe.Pointer(pExpr)).Fop) == TK_AGG_FUNCTION) && ((*Expr)(unsafe.Pointer(pExpr)).FpAggInfo == uintptr(0)) {
+ Xsqlite3ErrorMsg(tls, (*Walker)(unsafe.Pointer(pWalker)).FpParse,
+ ts+6974 /* "misuse of aggreg..." */, libc.VaList(bp, *(*uintptr)(unsafe.Pointer(pExpr + 8 /* &.u */))))
+ }
+ return WRC_Continue
+}
+
// If the SELECT statement passed as the second argument does not invoke
// any SQL window functions, this function is a no-op. Otherwise, it
// rewrites the SELECT statement so that window function xStep functions
// are invoked in the correct order as described under "SELECT REWRITING"
// at the top of this file.
-func Xsqlite3WindowRewrite(tls *libc.TLS, pParse uintptr, p uintptr) int32 { /* sqlite3.c:154882:20: */
+func Xsqlite3WindowRewrite(tls *libc.TLS, pParse uintptr, p uintptr) int32 { /* sqlite3.c:155870:20: */
bp := tls.Alloc(56)
defer tls.Free(56)
@@ -135193,6 +137731,13 @@ func Xsqlite3WindowRewrite(tls *libc.TLS, pParse uintptr, p uintptr) int32 { /*
}
Xsqlite3AggInfoPersistWalkerInit(tls, bp /* &w */, pParse)
Xsqlite3WalkSelect(tls, bp /* &w */, p)
+ if ((*Select)(unsafe.Pointer(p)).FselFlags & U32(SF_Aggregate)) == U32(0) {
+ (*Walker)(unsafe.Pointer(bp /* &w */)).FxExprCallback = *(*uintptr)(unsafe.Pointer(&struct {
+ f func(*libc.TLS, uintptr, uintptr) int32
+ }{disallowAggregatesInOrderByCb}))
+ (*Walker)(unsafe.Pointer(bp /* &w */)).FxSelectCallback = uintptr(0)
+ Xsqlite3WalkExprList(tls, bp /* &w */, (*Select)(unsafe.Pointer(p)).FpOrderBy)
+ }
(*Select)(unsafe.Pointer(p)).FpSrc = uintptr(0)
(*Select)(unsafe.Pointer(p)).FpWhere = uintptr(0)
@@ -135277,7 +137822,7 @@ func Xsqlite3WindowRewrite(tls *libc.TLS, pParse uintptr, p uintptr) int32 { /*
// keep everything legal in this case.
if *(*uintptr)(unsafe.Pointer(bp + 48 /* pSublist */)) == uintptr(0) {
*(*uintptr)(unsafe.Pointer(bp + 48 /* pSublist */)) = Xsqlite3ExprListAppend(tls, pParse, uintptr(0),
- Xsqlite3Expr(tls, db, TK_INTEGER, ts+6375 /* "0" */))
+ Xsqlite3Expr(tls, db, TK_INTEGER, ts+6506 /* "0" */))
}
pSub = Xsqlite3SelectNew(tls,
@@ -135289,7 +137834,7 @@ func Xsqlite3WindowRewrite(tls *libc.TLS, pParse uintptr, p uintptr) int32 { /*
(*SrcItem)(unsafe.Pointer(((*Select)(unsafe.Pointer(p)).FpSrc + 8 /* &.a */))).FpSelect = pSub
Xsqlite3SrcListAssignCursors(tls, pParse, (*Select)(unsafe.Pointer(p)).FpSrc)
*(*U32)(unsafe.Pointer(pSub + 4 /* &.selFlags */)) |= (U32(SF_Expanded))
- pTab2 = Xsqlite3ResultSetOfSelect(tls, pParse, pSub, int8(SQLITE_AFF_NONE))
+ pTab2 = Xsqlite3ResultSetOfSelect(tls, pParse, pSub, uint8(SQLITE_AFF_NONE))
*(*U32)(unsafe.Pointer(pSub + 4 /* &.selFlags */)) |= (selFlags & U32(SF_Aggregate))
if pTab2 == uintptr(0) {
// Might actually be some other kind of error, but in that case
@@ -135333,7 +137878,7 @@ func Xsqlite3WindowRewrite(tls *libc.TLS, pParse uintptr, p uintptr) int32 { /*
// Unlink the Window object from the Select to which it is attached,
// if it is attached.
-func Xsqlite3WindowUnlinkFromSelect(tls *libc.TLS, p uintptr) { /* sqlite3.c:155032:21: */
+func Xsqlite3WindowUnlinkFromSelect(tls *libc.TLS, p uintptr) { /* sqlite3.c:156025:21: */
if (*Window)(unsafe.Pointer(p)).FppThis != 0 {
*(*uintptr)(unsafe.Pointer((*Window)(unsafe.Pointer(p)).FppThis)) = (*Window)(unsafe.Pointer(p)).FpNextWin
if (*Window)(unsafe.Pointer(p)).FpNextWin != 0 {
@@ -135344,7 +137889,7 @@ func Xsqlite3WindowUnlinkFromSelect(tls *libc.TLS, p uintptr) { /* sqlite3.c:155
}
// Free the Window object passed as the second argument.
-func Xsqlite3WindowDelete(tls *libc.TLS, db uintptr, p uintptr) { /* sqlite3.c:155043:21: */
+func Xsqlite3WindowDelete(tls *libc.TLS, db uintptr, p uintptr) { /* sqlite3.c:156036:21: */
if p != 0 {
Xsqlite3WindowUnlinkFromSelect(tls, p)
Xsqlite3ExprDelete(tls, db, (*Window)(unsafe.Pointer(p)).FpFilter)
@@ -135359,7 +137904,7 @@ func Xsqlite3WindowDelete(tls *libc.TLS, db uintptr, p uintptr) { /* sqlite3.c:1
}
// Free the linked list of Window objects starting at the second argument.
-func Xsqlite3WindowListDelete(tls *libc.TLS, db uintptr, p uintptr) { /* sqlite3.c:155060:21: */
+func Xsqlite3WindowListDelete(tls *libc.TLS, db uintptr, p uintptr) { /* sqlite3.c:156053:21: */
for p != 0 {
var pNext uintptr = (*Window)(unsafe.Pointer(p)).FpNextWin
Xsqlite3WindowDelete(tls, db, p)
@@ -135372,7 +137917,7 @@ func Xsqlite3WindowListDelete(tls *libc.TLS, db uintptr, p uintptr) { /* sqlite3
// constant, change it to NULL. The fact that it is then a non-negative
// integer will be caught later. But it is important not to leave
// variable values in the expression tree.
-func sqlite3WindowOffsetExpr(tls *libc.TLS, pParse uintptr, pExpr uintptr) uintptr { /* sqlite3.c:155075:13: */
+func sqlite3WindowOffsetExpr(tls *libc.TLS, pParse uintptr, pExpr uintptr) uintptr { /* sqlite3.c:156068:13: */
if 0 == Xsqlite3ExprIsConstant(tls, pExpr) {
if int32((*Parse)(unsafe.Pointer(pParse)).FeParseMode) >= PARSE_MODE_RENAME {
Xsqlite3RenameExprUnmap(tls, pParse, pExpr)
@@ -135384,7 +137929,7 @@ func sqlite3WindowOffsetExpr(tls *libc.TLS, pParse uintptr, pExpr uintptr) uintp
}
// Allocate and return a new Window object describing a Window Definition.
-func Xsqlite3WindowAlloc(tls *libc.TLS, pParse uintptr, eType int32, eStart int32, pStart uintptr, eEnd int32, pEnd uintptr, eExclude U8) uintptr { /* sqlite3.c:155087:23: */
+func Xsqlite3WindowAlloc(tls *libc.TLS, pParse uintptr, eType int32, eStart int32, pStart uintptr, eEnd int32, pEnd uintptr, eExclude U8) uintptr { /* sqlite3.c:156080:23: */
var pWin uintptr
var bImplicitFrame int32
pWin = uintptr(0)
@@ -135417,7 +137962,7 @@ __1:
((eStart == TK_FOLLOWING) && ((eEnd == TK_PRECEDING) || (eEnd == TK_CURRENT)))) {
goto __2
}
- Xsqlite3ErrorMsg(tls, pParse, ts+20266 /* "unsupported fram..." */, 0)
+ Xsqlite3ErrorMsg(tls, pParse, ts+20726 /* "unsupported fram..." */, 0)
goto windowAllocErr
__2:
;
@@ -135453,7 +137998,7 @@ windowAllocErr:
// Attach PARTITION and ORDER BY clauses pPartition and pOrderBy to window
// pWin. Also, if parameter pBase is not NULL, set pWin->zBase to the
// equivalent nul-terminated string.
-func Xsqlite3WindowAssemble(tls *libc.TLS, pParse uintptr, pWin uintptr, pPartition uintptr, pOrderBy uintptr, pBase uintptr) uintptr { /* sqlite3.c:155159:23: */
+func Xsqlite3WindowAssemble(tls *libc.TLS, pParse uintptr, pWin uintptr, pPartition uintptr, pOrderBy uintptr, pBase uintptr) uintptr { /* sqlite3.c:156152:23: */
if pWin != 0 {
(*Window)(unsafe.Pointer(pWin)).FpPartition = pPartition
(*Window)(unsafe.Pointer(pWin)).FpOrderBy = pOrderBy
@@ -135472,7 +138017,7 @@ func Xsqlite3WindowAssemble(tls *libc.TLS, pParse uintptr, pWin uintptr, pPartit
// stored in the linked list starting at pWin->pNextWin. This function
// either updates *pWin according to the base specification, or else
// leaves an error in pParse.
-func Xsqlite3WindowChain(tls *libc.TLS, pParse uintptr, pWin uintptr, pList uintptr) { /* sqlite3.c:155186:21: */
+func Xsqlite3WindowChain(tls *libc.TLS, pParse uintptr, pWin uintptr, pList uintptr) { /* sqlite3.c:156179:21: */
bp := tls.Alloc(16)
defer tls.Free(16)
@@ -135483,15 +138028,15 @@ func Xsqlite3WindowChain(tls *libc.TLS, pParse uintptr, pWin uintptr, pList uint
var zErr uintptr = uintptr(0)
// Check for errors
if (*Window)(unsafe.Pointer(pWin)).FpPartition != 0 {
- zErr = ts + 20298 /* "PARTITION clause" */
+ zErr = ts + 20758 /* "PARTITION clause" */
} else if ((*Window)(unsafe.Pointer(pExist)).FpOrderBy != 0) && ((*Window)(unsafe.Pointer(pWin)).FpOrderBy != 0) {
- zErr = ts + 20315 /* "ORDER BY clause" */
+ zErr = ts + 20775 /* "ORDER BY clause" */
} else if int32((*Window)(unsafe.Pointer(pExist)).FbImplicitFrame) == 0 {
- zErr = ts + 20331 /* "frame specificat..." */
+ zErr = ts + 20791 /* "frame specificat..." */
}
if zErr != 0 {
Xsqlite3ErrorMsg(tls, pParse,
- ts+20351 /* "cannot override ..." */, libc.VaList(bp, zErr, (*Window)(unsafe.Pointer(pWin)).FzBase))
+ ts+20811 /* "cannot override ..." */, libc.VaList(bp, zErr, (*Window)(unsafe.Pointer(pWin)).FzBase))
} else {
(*Window)(unsafe.Pointer(pWin)).FpPartition = Xsqlite3ExprListDup(tls, db, (*Window)(unsafe.Pointer(pExist)).FpPartition, 0)
if (*Window)(unsafe.Pointer(pExist)).FpOrderBy != 0 {
@@ -135506,7 +138051,7 @@ func Xsqlite3WindowChain(tls *libc.TLS, pParse uintptr, pWin uintptr, pList uint
}
// Attach window object pWin to expression p.
-func Xsqlite3WindowAttach(tls *libc.TLS, pParse uintptr, p uintptr, pWin uintptr) { /* sqlite3.c:155220:21: */
+func Xsqlite3WindowAttach(tls *libc.TLS, pParse uintptr, p uintptr, pWin uintptr) { /* sqlite3.c:156213:21: */
if p != 0 {
*(*uintptr)(unsafe.Pointer(p + 64 /* &.y */)) = pWin
@@ -135514,7 +138059,7 @@ func Xsqlite3WindowAttach(tls *libc.TLS, pParse uintptr, p uintptr, pWin uintptr
(*Window)(unsafe.Pointer(pWin)).FpOwner = p
if (((*Expr)(unsafe.Pointer(p)).Fflags & U32(EP_Distinct)) != 0) && (int32((*Window)(unsafe.Pointer(pWin)).FeFrmType) != TK_FILTER) {
Xsqlite3ErrorMsg(tls, pParse,
- ts+20384 /* "DISTINCT is not ..." */, 0)
+ ts+20844 /* "DISTINCT is not ..." */, 0)
}
} else {
Xsqlite3WindowDelete(tls, (*Parse)(unsafe.Pointer(pParse)).Fdb, pWin)
@@ -135525,7 +138070,7 @@ func Xsqlite3WindowAttach(tls *libc.TLS, pParse uintptr, p uintptr, pWin uintptr
// to be processed as part of SELECT statement pSel). The window is linked
// in if either (a) there are no other windows already linked to this
// SELECT, or (b) the windows already linked use a compatible window frame.
-func Xsqlite3WindowLink(tls *libc.TLS, pSel uintptr, pWin uintptr) { /* sqlite3.c:155243:21: */
+func Xsqlite3WindowLink(tls *libc.TLS, pSel uintptr, pWin uintptr) { /* sqlite3.c:156236:21: */
if pSel != 0 {
if (uintptr(0) == (*Select)(unsafe.Pointer(pSel)).FpWin) || (0 == Xsqlite3WindowCompare(tls, uintptr(0), (*Select)(unsafe.Pointer(pSel)).FpWin, pWin, 0)) {
(*Window)(unsafe.Pointer(pWin)).FpNextWin = (*Select)(unsafe.Pointer(pSel)).FpWin
@@ -135545,7 +138090,7 @@ func Xsqlite3WindowLink(tls *libc.TLS, pSel uintptr, pWin uintptr) { /* sqlite3.
// Return 0 if the two window objects are identical, 1 if they are
// different, or 2 if it cannot be determined if the objects are identical
// or not. Identical window objects can be processed in a single scan.
-func Xsqlite3WindowCompare(tls *libc.TLS, pParse uintptr, p1 uintptr, p2 uintptr, bFilter int32) int32 { /* sqlite3.c:155265:20: */
+func Xsqlite3WindowCompare(tls *libc.TLS, pParse uintptr, p1 uintptr, p2 uintptr, bFilter int32) int32 { /* sqlite3.c:156258:20: */
var res int32
if (p1 == uintptr(0)) || (p2 == uintptr(0)) {
return 1
@@ -135585,7 +138130,7 @@ func Xsqlite3WindowCompare(tls *libc.TLS, pParse uintptr, p1 uintptr, p2 uintptr
// This is called by code in select.c before it calls sqlite3WhereBegin()
// to begin iterating through the sub-query results. It is used to allocate
// and initialize registers and cursors used by sqlite3WindowCodeStep().
-func Xsqlite3WindowCodeInit(tls *libc.TLS, pParse uintptr, pSelect uintptr) { /* sqlite3.c:155294:21: */
+func Xsqlite3WindowCodeInit(tls *libc.TLS, pParse uintptr, pSelect uintptr) { /* sqlite3.c:156287:21: */
var nEphExpr int32 = (*ExprList)(unsafe.Pointer((*Select)(unsafe.Pointer((*SrcItem)(unsafe.Pointer(((*Select)(unsafe.Pointer(pSelect)).FpSrc + 8 /* &.a */))).FpSelect)).FpEList)).FnExpr
var pMWin uintptr = (*Select)(unsafe.Pointer(pSelect)).FpWin
var pWin uintptr
@@ -135632,7 +138177,7 @@ func Xsqlite3WindowCodeInit(tls *libc.TLS, pParse uintptr, pSelect uintptr) { /*
(*Window)(unsafe.Pointer(pWin)).FcsrApp = libc.PostIncInt32(&(*Parse)(unsafe.Pointer(pParse)).FnTab, 1)
(*Window)(unsafe.Pointer(pWin)).FregApp = ((*Parse)(unsafe.Pointer(pParse)).FnMem + 1)
*(*int32)(unsafe.Pointer(pParse + 56 /* &.nMem */)) += (3)
- if (pKeyInfo != 0) && (int32(*(*int8)(unsafe.Pointer((*FuncDef)(unsafe.Pointer((*Window)(unsafe.Pointer(pWin)).FpFunc)).FzName + 1))) == 'i') {
+ if (pKeyInfo != 0) && (int32(*(*uint8)(unsafe.Pointer((*FuncDef)(unsafe.Pointer((*Window)(unsafe.Pointer(pWin)).FpFunc)).FzName + 1))) == 'i') {
*(*U8)(unsafe.Pointer((*KeyInfo)(unsafe.Pointer(pKeyInfo)).FaSortFlags)) = U8(KEYINFO_ORDER_DESC)
}
@@ -135658,14 +138203,14 @@ func Xsqlite3WindowCodeInit(tls *libc.TLS, pParse uintptr, pSelect uintptr) { /*
// evaluated and the result left in register reg. This function generates VM
// code to check that the value is a non-negative integer and throws an
// exception if it is not.
-func windowCheckValue(tls *libc.TLS, pParse uintptr, reg int32, eCond int32) { /* sqlite3.c:155378:13: */
+func windowCheckValue(tls *libc.TLS, pParse uintptr, reg int32, eCond int32) { /* sqlite3.c:156371:13: */
var v uintptr = Xsqlite3GetVdbe(tls, pParse)
var regZero int32 = Xsqlite3GetTempReg(tls, pParse)
Xsqlite3VdbeAddOp2(tls, v, OP_Integer, 0, regZero)
if eCond >= WINDOW_STARTING_NUM {
var regString int32 = Xsqlite3GetTempReg(tls, pParse)
- Xsqlite3VdbeAddOp4(tls, v, OP_String8, 0, regString, 0, ts+703 /* "" */, -1)
+ Xsqlite3VdbeAddOp4(tls, v, OP_String8, 0, regString, 0, ts+755 /* "" */, -1)
Xsqlite3VdbeAddOp3(tls, v, OP_Ge, regString, (Xsqlite3VdbeCurrentAddr(tls, v) + 2), reg)
Xsqlite3VdbeChangeP5(tls, v, (uint16(SQLITE_AFF_NUMERIC | SQLITE_JUMPIFNULL)))
@@ -135687,17 +138232,17 @@ func windowCheckValue(tls *libc.TLS, pParse uintptr, reg int32, eCond int32) { /
}
var azErr = [5]uintptr{
- ts + 20431, /* "frame starting o..." */
- ts + 20484, /* "frame ending off..." */
- ts + 19914, /* "second argument ..." */
- ts + 20535, /* "frame starting o..." */
- ts + 20587, /* "frame ending off..." */
-} /* sqlite3.c:155379:21 */
-var aOp1 = [5]int32{OP_Ge, OP_Ge, OP_Gt, OP_Ge, OP_Ge} /* sqlite3.c:155386:14 */
+ ts + 20891, /* "frame starting o..." */
+ ts + 20944, /* "frame ending off..." */
+ ts + 20374, /* "second argument ..." */
+ ts + 20995, /* "frame starting o..." */
+ ts + 21047, /* "frame ending off..." */
+} /* sqlite3.c:156372:21 */
+var aOp1 = [5]int32{OP_Ge, OP_Ge, OP_Gt, OP_Ge, OP_Ge} /* sqlite3.c:156379:14 */
// Return the number of arguments passed to the window-function associated
// with the object passed as the only argument to this function.
-func windowArgCount(tls *libc.TLS, pWin uintptr) int32 { /* sqlite3.c:155425:12: */
+func windowArgCount(tls *libc.TLS, pWin uintptr) int32 { /* sqlite3.c:156418:12: */
var pList uintptr = *(*uintptr)(unsafe.Pointer((*Window)(unsafe.Pointer(pWin)).FpOwner + 32 /* &.x */))
return func() int32 {
if pList != 0 {
@@ -135708,29 +138253,31 @@ func windowArgCount(tls *libc.TLS, pWin uintptr) int32 { /* sqlite3.c:155425:12:
}
type WindowCodeArg1 = struct {
- FpParse uintptr
- FpMWin uintptr
- FpVdbe uintptr
- FaddrGosub int32
- FregGosub int32
- FregArg int32
- FeDelete int32
- Fstart WindowCsrAndReg
- Fcurrent WindowCsrAndReg
- Fend WindowCsrAndReg
-} /* sqlite3.c:155430:9 */
-
-type WindowCodeArg = WindowCodeArg1 /* sqlite3.c:155430:30 */
+ FpParse uintptr
+ FpMWin uintptr
+ FpVdbe uintptr
+ FaddrGosub int32
+ FregGosub int32
+ FregArg int32
+ FeDelete int32
+ FregRowid int32
+ Fstart WindowCsrAndReg
+ Fcurrent WindowCsrAndReg
+ Fend WindowCsrAndReg
+ F__ccgo_pad1 [4]byte
+} /* sqlite3.c:156423:9 */
+
+type WindowCodeArg = WindowCodeArg1 /* sqlite3.c:156423:30 */
type WindowCsrAndReg1 = struct {
Fcsr int32
Freg int32
-} /* sqlite3.c:155430:9 */
+} /* sqlite3.c:156423:9 */
-type WindowCsrAndReg = WindowCsrAndReg1 /* sqlite3.c:155431:32 */
+type WindowCsrAndReg = WindowCsrAndReg1 /* sqlite3.c:156424:32 */
// Generate VM code to read the window frames peer values from cursor csr into
// an array of registers starting at reg.
-func windowReadPeerValues(tls *libc.TLS, p uintptr, csr int32, reg int32) { /* sqlite3.c:155514:13: */
+func windowReadPeerValues(tls *libc.TLS, p uintptr, csr int32, reg int32) { /* sqlite3.c:156508:13: */
var pMWin uintptr = (*WindowCodeArg)(unsafe.Pointer(p)).FpMWin
var pOrderBy uintptr = (*Window)(unsafe.Pointer(pMWin)).FpOrderBy
if pOrderBy != 0 {
@@ -135766,7 +138313,7 @@ func windowReadPeerValues(tls *libc.TLS, p uintptr, csr int32, reg int32) { /* s
//
// If argument regPartSize is non-zero, then it is a register containing the
// number of rows in the current partition.
-func windowAggStep(tls *libc.TLS, p uintptr, pMWin uintptr, csr int32, bInverse int32, reg int32) { /* sqlite3.c:155551:13: */
+func windowAggStep(tls *libc.TLS, p uintptr, pMWin uintptr, csr int32, bInverse int32, reg int32) { /* sqlite3.c:156545:13: */
var pParse uintptr = (*WindowCodeArg)(unsafe.Pointer(p)).FpParse
var v uintptr = Xsqlite3GetVdbe(tls, pParse)
var pWin uintptr
@@ -135828,16 +138375,15 @@ func windowAggStep(tls *libc.TLS, p uintptr, pMWin uintptr, csr int32, bInverse
}
if (*Window)(unsafe.Pointer(pWin)).FbExprArgs != 0 {
- var iStart int32 = Xsqlite3VdbeCurrentAddr(tls, v)
- var pOp uintptr
- var pEnd uintptr
+ var iOp int32 = Xsqlite3VdbeCurrentAddr(tls, v)
+ var iEnd int32
nArg = (*ExprList)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer((*Window)(unsafe.Pointer(pWin)).FpOwner + 32 /* &.x */)))).FnExpr
regArg = Xsqlite3GetTempRange(tls, pParse, nArg)
Xsqlite3ExprCodeExprList(tls, pParse, *(*uintptr)(unsafe.Pointer((*Window)(unsafe.Pointer(pWin)).FpOwner + 32 /* &.x */)), regArg, 0, uint8(0))
- pEnd = Xsqlite3VdbeGetOp(tls, v, -1)
- for pOp = Xsqlite3VdbeGetOp(tls, v, iStart); pOp <= pEnd; pOp += 24 {
+ for iEnd = Xsqlite3VdbeCurrentAddr(tls, v); iOp < iEnd; iOp++ {
+ var pOp uintptr = Xsqlite3VdbeGetOp(tls, v, iOp)
if (int32((*VdbeOp)(unsafe.Pointer(pOp)).Fopcode) == OP_Column) && ((*VdbeOp)(unsafe.Pointer(pOp)).Fp1 == (*Window)(unsafe.Pointer(pWin)).FiEphCsr) {
(*VdbeOp)(unsafe.Pointer(pOp)).Fp1 = csr
}
@@ -135874,7 +138420,7 @@ func windowAggStep(tls *libc.TLS, p uintptr, pMWin uintptr, csr int32, bInverse
// (bFin==1) for each window function in the linked list starting at
// pMWin. Or, for built-in window-functions that do not use the standard
// API, generate the equivalent VM code.
-func windowAggFinal(tls *libc.TLS, p uintptr, bFin int32) { /* sqlite3.c:155665:13: */
+func windowAggFinal(tls *libc.TLS, p uintptr, bFin int32) { /* sqlite3.c:156659:13: */
var pParse uintptr = (*WindowCodeArg)(unsafe.Pointer(p)).FpParse
var pMWin uintptr = (*WindowCodeArg)(unsafe.Pointer(p)).FpMWin
var v uintptr = Xsqlite3GetVdbe(tls, pParse)
@@ -135910,7 +138456,7 @@ func windowAggFinal(tls *libc.TLS, p uintptr, bFin int32) { /* sqlite3.c:155665:
// p->pMWin list by doing a full scan of the current window frame. Store the
// results in the Window.regResult registers, ready to return the upper
// layer.
-func windowFullScan(tls *libc.TLS, p uintptr) { /* sqlite3.c:155704:13: */
+func windowFullScan(tls *libc.TLS, p uintptr) { /* sqlite3.c:156698:13: */
var pWin uintptr
var pParse uintptr = (*WindowCodeArg)(unsafe.Pointer(p)).FpParse
var pMWin uintptr = (*WindowCodeArg)(unsafe.Pointer(p)).FpMWin
@@ -136017,7 +138563,7 @@ func windowFullScan(tls *libc.TLS, p uintptr) { /* sqlite3.c:155704:13: */
// first_value()
// lag()
// lead()
-func windowReturnOneRow(tls *libc.TLS, p uintptr) { /* sqlite3.c:155810:13: */
+func windowReturnOneRow(tls *libc.TLS, p uintptr) { /* sqlite3.c:156804:13: */
var pMWin uintptr = (*WindowCodeArg)(unsafe.Pointer(p)).FpMWin
var v uintptr = (*WindowCodeArg)(unsafe.Pointer(p)).FpVdbe
@@ -136099,7 +138645,7 @@ func windowReturnOneRow(tls *libc.TLS, p uintptr) { /* sqlite3.c:155810:13: */
// in the linked list passed as the second argument to NULL. And perform
// any equivalent initialization required by any built-in window functions
// in the list.
-func windowInitAccum(tls *libc.TLS, pParse uintptr, pMWin uintptr) int32 { /* sqlite3.c:155886:12: */
+func windowInitAccum(tls *libc.TLS, pParse uintptr, pMWin uintptr) int32 { /* sqlite3.c:156880:12: */
var v uintptr = Xsqlite3GetVdbe(tls, pParse)
var regArg int32
var nArg int32 = 0
@@ -136134,7 +138680,7 @@ func windowInitAccum(tls *libc.TLS, pParse uintptr, pMWin uintptr) int32 { /* sq
// Return true if the current frame should be cached in the ephemeral table,
// even if there are no xInverse() calls required.
-func windowCacheFrame(tls *libc.TLS, pMWin uintptr) int32 { /* sqlite3.c:155918:12: */
+func windowCacheFrame(tls *libc.TLS, pMWin uintptr) int32 { /* sqlite3.c:156912:12: */
var pWin uintptr
if (*Window)(unsafe.Pointer(pMWin)).FregStartRowid != 0 {
return 1
@@ -136159,7 +138705,7 @@ func windowCacheFrame(tls *libc.TLS, pMWin uintptr) int32 { /* sqlite3.c:155918:
// If the two arrays are not equal, the contents of regNew is copied to
// regOld and control falls through. Otherwise, if the contents of the arrays
// are equal, an OP_Goto is executed. The address of the OP_Goto is returned.
-func windowIfNewPeer(tls *libc.TLS, pParse uintptr, pOrderBy uintptr, regNew int32, regOld int32, addr int32) { /* sqlite3.c:155944:13: */
+func windowIfNewPeer(tls *libc.TLS, pParse uintptr, pOrderBy uintptr, regNew int32, regOld int32, addr int32) { /* sqlite3.c:156938:13: */
var v uintptr = Xsqlite3GetVdbe(tls, pParse)
if pOrderBy != 0 {
var nVal int32 = (*ExprList)(unsafe.Pointer(pOrderBy)).FnExpr
@@ -136194,9 +138740,9 @@ func windowIfNewPeer(tls *libc.TLS, pParse uintptr, pOrderBy uintptr, regNew int
// if( csr1.peerVal - regVal <= csr2.peerVal ) goto lbl;
//
// A special type of arithmetic is used such that if csr1.peerVal is not
-// a numeric type (real or integer), then the result of the addition addition
+// a numeric type (real or integer), then the result of the addition
// or subtraction is a a copy of csr1.peerVal.
-func windowCodeRangeTest(tls *libc.TLS, p uintptr, op int32, csr1 int32, regVal int32, csr2 int32, lbl int32) { /* sqlite3.c:155990:13: */
+func windowCodeRangeTest(tls *libc.TLS, p uintptr, op int32, csr1 int32, regVal int32, csr2 int32, lbl int32) { /* sqlite3.c:156984:13: */
var pParse uintptr = (*WindowCodeArg)(unsafe.Pointer(p)).FpParse
var v uintptr = Xsqlite3GetVdbe(tls, pParse)
var pOrderBy uintptr = (*Window)(unsafe.Pointer((*WindowCodeArg)(unsafe.Pointer(p)).FpMWin)).FpOrderBy // ORDER BY clause for window
@@ -136205,8 +138751,13 @@ func windowCodeRangeTest(tls *libc.TLS, p uintptr, op int32, csr1 int32, regVal
var regString int32 = libc.PreIncInt32(&(*Parse)(unsafe.Pointer(pParse)).FnMem, 1) // Reg. for constant value ''
var arith int32 = OP_Add // OP_Add or OP_Subtract
var addrGe int32 // Jump destination
+ var addrDone int32 = Xsqlite3VdbeMakeLabel(tls, pParse) // Address past OP_Ge
var pColl uintptr
+ // Read the peer-value from each cursor into a register
+ windowReadPeerValues(tls, p, csr1, reg1)
+ windowReadPeerValues(tls, p, csr2, reg2)
+
if (int32((*ExprList_item)(unsafe.Pointer((pOrderBy + 8 /* &.a */))).FsortFlags) & KEYINFO_ORDER_DESC) != 0 {
switch op {
case OP_Ge:
@@ -136224,29 +138775,6 @@ func windowCodeRangeTest(tls *libc.TLS, p uintptr, op int32, csr1 int32, regVal
arith = OP_Subtract
}
- // Read the peer-value from each cursor into a register
- windowReadPeerValues(tls, p, csr1, reg1)
- windowReadPeerValues(tls, p, csr2, reg2)
-
- // Register reg1 currently contains csr1.peerVal (the peer-value from csr1).
- // This block adds (or subtracts for DESC) the numeric value in regVal
- // from it. Or, if reg1 is not numeric (it is a NULL, a text value or a blob),
- // then leave reg1 as it is. In pseudo-code, this is implemented as:
- //
- // if( reg1>='' ) goto addrGe;
- // reg1 = reg1 +/- regVal
- // addrGe:
- //
- // Since all strings and blobs are greater-than-or-equal-to an empty string,
- // the add/subtract is skipped for these, as required. If reg1 is a NULL,
- // then the arithmetic is performed, but since adding or subtracting from
- // NULL is always NULL anyway, this case is handled as required too.
- Xsqlite3VdbeAddOp4(tls, v, OP_String8, 0, regString, 0, ts+703 /* "" */, -1)
- addrGe = Xsqlite3VdbeAddOp3(tls, v, OP_Ge, regString, 0, reg1)
-
- Xsqlite3VdbeAddOp3(tls, v, arith, regVal, reg1, reg1)
- Xsqlite3VdbeJumpHere(tls, v, addrGe)
-
// If the BIGNULL flag is set for the ORDER BY, then it is required to
// consider NULL values to be larger than all other values, instead of
// the usual smaller. The VDBE opcodes OP_Ge and so on do not handle this
@@ -136287,16 +138815,38 @@ func windowCodeRangeTest(tls *libc.TLS, p uintptr, op int32, csr1 int32, regVal
default: /* no-op */
break
}
- Xsqlite3VdbeAddOp2(tls, v, OP_Goto, 0, (Xsqlite3VdbeCurrentAddr(tls, v) + 3))
+ Xsqlite3VdbeAddOp2(tls, v, OP_Goto, 0, addrDone)
// This block runs if reg1 is not NULL, but reg2 is.
Xsqlite3VdbeJumpHere(tls, v, addr)
Xsqlite3VdbeAddOp2(tls, v, OP_IsNull, reg2, lbl)
if (op == OP_Gt) || (op == OP_Ge) {
- Xsqlite3VdbeChangeP2(tls, v, -1, (Xsqlite3VdbeCurrentAddr(tls, v) + 1))
+ Xsqlite3VdbeChangeP2(tls, v, -1, addrDone)
}
}
+ // Register reg1 currently contains csr1.peerVal (the peer-value from csr1).
+ // This block adds (or subtracts for DESC) the numeric value in regVal
+ // from it. Or, if reg1 is not numeric (it is a NULL, a text value or a blob),
+ // then leave reg1 as it is. In pseudo-code, this is implemented as:
+ //
+ // if( reg1>='' ) goto addrGe;
+ // reg1 = reg1 +/- regVal
+ // addrGe:
+ //
+ // Since all strings and blobs are greater-than-or-equal-to an empty string,
+ // the add/subtract is skipped for these, as required. If reg1 is a NULL,
+ // then the arithmetic is performed, but since adding or subtracting from
+ // NULL is always NULL anyway, this case is handled as required too.
+ Xsqlite3VdbeAddOp4(tls, v, OP_String8, 0, regString, 0, ts+755 /* "" */, -1)
+ addrGe = Xsqlite3VdbeAddOp3(tls, v, OP_Ge, regString, 0, reg1)
+
+ if ((op == OP_Ge) && (arith == OP_Add)) || ((op == OP_Le) && (arith == OP_Subtract)) {
+ Xsqlite3VdbeAddOp3(tls, v, op, reg2, lbl, reg1)
+ }
+ Xsqlite3VdbeAddOp3(tls, v, arith, regVal, reg1, reg1)
+ Xsqlite3VdbeJumpHere(tls, v, addrGe)
+
// Compare registers reg2 and reg1, taking the jump if required. Note that
// control skips over this test if the BIGNULL flag is set and either
// reg1 or reg2 contain a NULL value.
@@ -136304,6 +138854,7 @@ func windowCodeRangeTest(tls *libc.TLS, p uintptr, op int32, csr1 int32, regVal
pColl = Xsqlite3ExprNNCollSeq(tls, pParse, (*ExprList_item)(unsafe.Pointer((pOrderBy + 8 /* &.a */))).FpExpr)
Xsqlite3VdbeAppendP4(tls, v, pColl, -2)
Xsqlite3VdbeChangeP5(tls, v, uint16(SQLITE_NULLEQ))
+ Xsqlite3VdbeResolveLabel(tls, v, addrDone)
Xsqlite3ReleaseTempReg(tls, pParse, reg1)
Xsqlite3ReleaseTempReg(tls, pParse, reg2)
@@ -136314,7 +138865,7 @@ func windowCodeRangeTest(tls *libc.TLS, p uintptr, op int32, csr1 int32, regVal
// generates VM code for a single RETURN_ROW, AGGSTEP or AGGINVERSE
// operation. Refer to the header comment for sqlite3WindowCodeStep() for
// details.
-func windowCodeOp(tls *libc.TLS, p uintptr, op int32, regCountdown int32, jumpOnEof int32) int32 { /* sqlite3.c:156118:12: */
+func windowCodeOp(tls *libc.TLS, p uintptr, op int32, regCountdown int32, jumpOnEof int32) int32 { /* sqlite3.c:157117:12: */
var csr int32
var reg int32
var pParse uintptr = (*WindowCodeArg)(unsafe.Pointer(p)).FpParse
@@ -136364,15 +138915,23 @@ func windowCodeOp(tls *libc.TLS, p uintptr, op int32, regCountdown int32, jumpOn
// If this is a (RANGE BETWEEN a FOLLOWING AND b FOLLOWING) or
// (RANGE BETWEEN b PRECEDING AND a PRECEDING) frame, ensure the
// start cursor does not advance past the end cursor within the
- // temporary table. It otherwise might, if (a>b).
- if (((int32((*Window)(unsafe.Pointer(pMWin)).FeStart) == int32((*Window)(unsafe.Pointer(pMWin)).FeEnd)) && (regCountdown != 0)) &&
- (int32((*Window)(unsafe.Pointer(pMWin)).FeFrmType) == TK_RANGE)) && (op == WINDOW_AGGINVERSE) {
+ // temporary table. It otherwise might, if (a>b). Also ensure that,
+ // if the input cursor is still finding new rows, that the end
+ // cursor does not go past it to EOF.
+ if ((int32((*Window)(unsafe.Pointer(pMWin)).FeStart) == int32((*Window)(unsafe.Pointer(pMWin)).FeEnd)) && (regCountdown != 0)) &&
+ (int32((*Window)(unsafe.Pointer(pMWin)).FeFrmType) == TK_RANGE) {
var regRowid1 int32 = Xsqlite3GetTempReg(tls, pParse)
var regRowid2 int32 = Xsqlite3GetTempReg(tls, pParse)
- Xsqlite3VdbeAddOp2(tls, v, OP_Rowid, (*WindowCodeArg)(unsafe.Pointer(p)).Fstart.Fcsr, regRowid1)
- Xsqlite3VdbeAddOp2(tls, v, OP_Rowid, (*WindowCodeArg)(unsafe.Pointer(p)).Fend.Fcsr, regRowid2)
- Xsqlite3VdbeAddOp3(tls, v, OP_Ge, regRowid2, lblDone, regRowid1)
+ if op == WINDOW_AGGINVERSE {
+ Xsqlite3VdbeAddOp2(tls, v, OP_Rowid, (*WindowCodeArg)(unsafe.Pointer(p)).Fstart.Fcsr, regRowid1)
+ Xsqlite3VdbeAddOp2(tls, v, OP_Rowid, (*WindowCodeArg)(unsafe.Pointer(p)).Fend.Fcsr, regRowid2)
+ Xsqlite3VdbeAddOp3(tls, v, OP_Ge, regRowid2, lblDone, regRowid1)
+
+ } else if (*WindowCodeArg)(unsafe.Pointer(p)).FregRowid != 0 {
+ Xsqlite3VdbeAddOp2(tls, v, OP_Rowid, (*WindowCodeArg)(unsafe.Pointer(p)).Fend.Fcsr, regRowid1)
+ Xsqlite3VdbeAddOp3(tls, v, OP_Ge, (*WindowCodeArg)(unsafe.Pointer(p)).FregRowid, lblDone, regRowid1)
+ }
Xsqlite3ReleaseTempReg(tls, pParse, regRowid1)
Xsqlite3ReleaseTempReg(tls, pParse, regRowid2)
@@ -136454,7 +139013,7 @@ func windowCodeOp(tls *libc.TLS, p uintptr, op int32, regCountdown int32, jumpOn
// Allocate and return a duplicate of the Window object indicated by the
// third argument. Set the Window.pOwner field of the new object to
// pOwner.
-func Xsqlite3WindowDup(tls *libc.TLS, db uintptr, pOwner uintptr, p uintptr) uintptr { /* sqlite3.c:156259:23: */
+func Xsqlite3WindowDup(tls *libc.TLS, db uintptr, pOwner uintptr, p uintptr) uintptr { /* sqlite3.c:157266:23: */
var pNew uintptr = uintptr(0)
if p != 0 {
pNew = Xsqlite3DbMallocZero(tls, db, uint64(unsafe.Sizeof(Window{})))
@@ -136485,7 +139044,7 @@ func Xsqlite3WindowDup(tls *libc.TLS, db uintptr, pOwner uintptr, p uintptr) uin
// Return a copy of the linked list of Window objects passed as the
// second argument.
-func Xsqlite3WindowListDup(tls *libc.TLS, db uintptr, p uintptr) uintptr { /* sqlite3.c:156292:23: */
+func Xsqlite3WindowListDup(tls *libc.TLS, db uintptr, p uintptr) uintptr { /* sqlite3.c:157299:23: */
bp := tls.Alloc(8)
defer tls.Free(8)
@@ -136510,7 +139069,7 @@ func Xsqlite3WindowListDup(tls *libc.TLS, db uintptr, p uintptr) uintptr { /* sq
//
// If an OOM error occurs, this function sets the Parse.db.mallocFailed
// flag and returns zero.
-func windowExprGtZero(tls *libc.TLS, pParse uintptr, pExpr uintptr) int32 { /* sqlite3.c:156314:12: */
+func windowExprGtZero(tls *libc.TLS, pParse uintptr, pExpr uintptr) int32 { /* sqlite3.c:157321:12: */
bp := tls.Alloc(8)
defer tls.Free(8)
@@ -136858,9 +139417,9 @@ func windowExprGtZero(tls *libc.TLS, pParse uintptr, pExpr uintptr) int32 { /* s
//
// The text above leaves out many details. Refer to the code and comments
// below for a more complete picture.
-func Xsqlite3WindowCodeStep(tls *libc.TLS, pParse uintptr, p uintptr, pWInfo uintptr, regGosub int32, addrGosub int32) { /* sqlite3.c:156661:21: */
- bp := tls.Alloc(64)
- defer tls.Free(64)
+func Xsqlite3WindowCodeStep(tls *libc.TLS, pParse uintptr, p uintptr, pWInfo uintptr, regGosub int32, addrGosub int32) { /* sqlite3.c:157668:21: */
+ bp := tls.Alloc(72)
+ defer tls.Free(72)
var pMWin uintptr = (*Select)(unsafe.Pointer(p)).FpWin
var pOrderBy uintptr = (*Window)(unsafe.Pointer(pMWin)).FpOrderBy
@@ -136875,11 +139434,10 @@ func Xsqlite3WindowCodeStep(tls *libc.TLS, pParse uintptr, p uintptr, pWInfo uin
var addrEmpty int32 // Address of OP_Rewind in flush:
var regNew int32 // Array of registers holding new input row
var regRecord int32 // regNew array in record form
- var regRowid int32 // Rowid for regRecord in eph table
var regNewPeer int32 = 0 // Peer values for new row (part of regNew)
var regPeer int32 = 0 // Peer values for current row
var regFlushPart int32 = 0 // Register for "Gosub flush_partition"
- // var s WindowCodeArg at bp, 64
+ // var s WindowCodeArg at bp, 72
// Context object for sub-routines
var lblWhereEnd int32 // Label just before sqlite3WhereEnd() code
var regStart int32 = 0 // Value of PRECEDING
@@ -136935,7 +139493,7 @@ func Xsqlite3WindowCodeStep(tls *libc.TLS, pParse uintptr, p uintptr, pWInfo uin
regNew = ((*Parse)(unsafe.Pointer(pParse)).FnMem + 1)
*(*int32)(unsafe.Pointer(pParse + 56 /* &.nMem */)) += (nInput)
regRecord = libc.PreIncInt32(&(*Parse)(unsafe.Pointer(pParse)).FnMem, 1)
- regRowid = libc.PreIncInt32(&(*Parse)(unsafe.Pointer(pParse)).FnMem, 1)
+ (*WindowCodeArg)(unsafe.Pointer(bp /* &s */)).FregRowid = libc.PreIncInt32(&(*Parse)(unsafe.Pointer(pParse)).FnMem, 1)
// If the window frame contains an " PRECEDING" or " FOLLOWING"
// clause, allocate registers to store the results of evaluating each
@@ -137002,9 +139560,9 @@ func Xsqlite3WindowCodeStep(tls *libc.TLS, pParse uintptr, p uintptr, pWInfo uin
}
// Insert the new row into the ephemeral table
- Xsqlite3VdbeAddOp2(tls, v, OP_NewRowid, csrWrite, regRowid)
- Xsqlite3VdbeAddOp3(tls, v, OP_Insert, csrWrite, regRecord, regRowid)
- addrNe = Xsqlite3VdbeAddOp3(tls, v, OP_Ne, (*Window)(unsafe.Pointer(pMWin)).FregOne, 0, regRowid)
+ Xsqlite3VdbeAddOp2(tls, v, OP_NewRowid, csrWrite, (*WindowCodeArg)(unsafe.Pointer(bp /* &s */)).FregRowid)
+ Xsqlite3VdbeAddOp3(tls, v, OP_Insert, csrWrite, regRecord, (*WindowCodeArg)(unsafe.Pointer(bp /* &s */)).FregRowid)
+ addrNe = Xsqlite3VdbeAddOp3(tls, v, OP_Ne, (*Window)(unsafe.Pointer(pMWin)).FregOne, 0, (*WindowCodeArg)(unsafe.Pointer(bp /* &s */)).FregRowid)
// This block is run for the first row of each partition
(*WindowCodeArg)(unsafe.Pointer(bp /* &s */)).FregArg = windowInitAccum(tls, pParse, pMWin)
@@ -137141,6 +139699,7 @@ func Xsqlite3WindowCodeStep(tls *libc.TLS, pParse uintptr, p uintptr, pWInfo uin
Xsqlite3VdbeJumpHere(tls, v, addrGosubFlush)
}
+ (*WindowCodeArg)(unsafe.Pointer(bp /* &s */)).FregRowid = 0
addrEmpty = Xsqlite3VdbeAddOp1(tls, v, OP_Rewind, csrWrite)
if int32((*Window)(unsafe.Pointer(pMWin)).FeEnd) == TK_PRECEDING {
@@ -137252,20 +139811,20 @@ func Xsqlite3WindowCodeStep(tls *libc.TLS, pParse uintptr, p uintptr, pWInfo uin
//
// Then the "b" IdList records the list "a,b,c".
type TrigEvent = struct {
- Fa int32
- _ [4]byte
- Fb uintptr
-} /* sqlite3.c:157061:1 */
+ Fa int32
+ F__ccgo_pad1 [4]byte
+ Fb uintptr
+} /* sqlite3.c:158068:1 */
type FrameBound = struct {
- FeType int32
- _ [4]byte
- FpExpr uintptr
-} /* sqlite3.c:157063:1 */
+ FeType int32
+ F__ccgo_pad1 [4]byte
+ FpExpr uintptr
+} /* sqlite3.c:158070:1 */
// Disable lookaside memory allocation for objects that might be
// shared across database connections.
-func disableLookaside(tls *libc.TLS, pParse uintptr) { /* sqlite3.c:157069:13: */
+func disableLookaside(tls *libc.TLS, pParse uintptr) { /* sqlite3.c:158076:13: */
var db uintptr = (*Parse)(unsafe.Pointer(pParse)).Fdb
(*Parse)(unsafe.Pointer(pParse)).FdisableLookaside++
(*Sqlite3)(unsafe.Pointer(db)).Flookaside.FbDisable++
@@ -137275,7 +139834,7 @@ func disableLookaside(tls *libc.TLS, pParse uintptr) { /* sqlite3.c:157069:13: *
// For a compound SELECT statement, make sure p->pPrior->pNext==p for
// all elements in the list. And make sure list length does not exceed
// SQLITE_LIMIT_COMPOUND_SELECT.
-func parserDoubleLinkSelect(tls *libc.TLS, pParse uintptr, p uintptr) { /* sqlite3.c:157102:15: */
+func parserDoubleLinkSelect(tls *libc.TLS, pParse uintptr, p uintptr) { /* sqlite3.c:158109:15: */
bp := tls.Alloc(16)
defer tls.Free(16)
@@ -137294,19 +139853,19 @@ func parserDoubleLinkSelect(tls *libc.TLS, pParse uintptr, p uintptr) { /* sqlit
}
cnt++
if ((*Select)(unsafe.Pointer(pLoop)).FpOrderBy != 0) || ((*Select)(unsafe.Pointer(pLoop)).FpLimit != 0) {
- Xsqlite3ErrorMsg(tls, pParse, ts+20637, /* "%s clause should..." */
+ Xsqlite3ErrorMsg(tls, pParse, ts+21097, /* "%s clause should..." */
libc.VaList(bp, func() uintptr {
if (*Select)(unsafe.Pointer(pLoop)).FpOrderBy != uintptr(0) {
- return ts + 17727 /* "ORDER BY" */
+ return ts + 18211 /* "ORDER BY" */
}
- return ts + 20679 /* "LIMIT" */
+ return ts + 21139 /* "LIMIT" */
}(),
Xsqlite3SelectOpName(tls, int32((*Select)(unsafe.Pointer(pNext)).Fop))))
break
}
}
if ((((*Select)(unsafe.Pointer(p)).FselFlags & U32(SF_MultiValue)) == U32(0)) && ((libc.AssignInt32(&mxSelect, *(*int32)(unsafe.Pointer(((*Parse)(unsafe.Pointer(pParse)).Fdb + 128 /* &.aLimit */) + 4*4)))) > 0)) && (cnt > mxSelect) {
- Xsqlite3ErrorMsg(tls, pParse, ts+20685 /* "too many terms i..." */, 0)
+ Xsqlite3ErrorMsg(tls, pParse, ts+21145 /* "too many terms i..." */, 0)
}
}
@@ -137314,7 +139873,7 @@ func parserDoubleLinkSelect(tls *libc.TLS, pParse uintptr, p uintptr) { /* sqlit
// Attach a With object describing the WITH clause to a Select
// object describing the query for which the WITH clause is a prefix.
-func attachWithToSelect(tls *libc.TLS, pParse uintptr, pSelect uintptr, pWith uintptr) uintptr { /* sqlite3.c:157133:17: */
+func attachWithToSelect(tls *libc.TLS, pParse uintptr, pSelect uintptr, pWith uintptr) uintptr { /* sqlite3.c:158140:17: */
if pSelect != 0 {
(*Select)(unsafe.Pointer(pSelect)).FpWith = pWith
parserDoubleLinkSelect(tls, pParse, pSelect)
@@ -137328,7 +139887,7 @@ func attachWithToSelect(tls *libc.TLS, pParse uintptr, pSelect uintptr, pWith ui
// Construct a new Expr object from a single identifier. Use the
// new Expr to populate pOut. Set the span of pOut to be the identifier
// that created the expression.
-func tokenExpr(tls *libc.TLS, pParse uintptr, op int32, t Token) uintptr { /* sqlite3.c:157148:15: */
+func tokenExpr(tls *libc.TLS, pParse uintptr, op int32, t Token) uintptr { /* sqlite3.c:158155:15: */
bp := tls.Alloc(16)
defer tls.Free(16)
*(*Token)(unsafe.Pointer(bp)) = t
@@ -137337,7 +139896,7 @@ func tokenExpr(tls *libc.TLS, pParse uintptr, op int32, t Token) uintptr { /* sq
if p != 0 {
// memset(p, 0, sizeof(Expr));
(*Expr)(unsafe.Pointer(p)).Fop = U8(op)
- (*Expr)(unsafe.Pointer(p)).FaffExpr = int8(0)
+ (*Expr)(unsafe.Pointer(p)).FaffExpr = uint8(0)
(*Expr)(unsafe.Pointer(p)).Fflags = U32(EP_Leaf)
(*Expr)(unsafe.Pointer(p)).FiAgg = int16(-1)
@@ -137350,8 +139909,8 @@ func tokenExpr(tls *libc.TLS, pParse uintptr, op int32, t Token) uintptr { /* sq
(*Expr)(unsafe.Pointer(p)).FiColumn = int16(0)
*(*uintptr)(unsafe.Pointer(p + 8 /* &.u */)) = (p + 1*72)
libc.Xmemcpy(tls, *(*uintptr)(unsafe.Pointer(p + 8 /* &.u */)), (*Token)(unsafe.Pointer(bp /* &t */)).Fz, uint64((*Token)(unsafe.Pointer(bp /* &t */)).Fn))
- *(*int8)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(p + 8 /* &.u */)) + uintptr((*Token)(unsafe.Pointer(bp /* &t */)).Fn))) = int8(0)
- if (int32(Xsqlite3CtypeMap[uint8(*(*int8)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(p + 8 /* &.u */)))))]) & 0x80) != 0 {
+ *(*uint8)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(p + 8 /* &.u */)) + uintptr((*Token)(unsafe.Pointer(bp /* &t */)).Fn))) = uint8(0)
+ if (int32(Xsqlite3CtypeMap[uint8(*(*uint8)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(p + 8 /* &.u */)))))]) & 0x80) != 0 {
Xsqlite3DequoteExpr(tls, p)
}
(*Expr)(unsafe.Pointer(p)).FnHeight = 1
@@ -137365,7 +139924,7 @@ func tokenExpr(tls *libc.TLS, pParse uintptr, op int32, t Token) uintptr { /* sq
// A routine to convert a binary TK_IS or TK_ISNOT expression into a
// unary TK_ISNULL or TK_NOTNULL expression.
-func binaryToUnaryIfNull(tls *libc.TLS, pParse uintptr, pY uintptr, pA uintptr, op int32) { /* sqlite3.c:157183:15: */
+func binaryToUnaryIfNull(tls *libc.TLS, pParse uintptr, pY uintptr, pA uintptr, op int32) { /* sqlite3.c:158190:15: */
var db uintptr = (*Parse)(unsafe.Pointer(pParse)).Fdb
if (((pA != 0) && (pY != 0)) && (int32((*Expr)(unsafe.Pointer(pY)).Fop) == TK_NULL)) && !(int32((*Parse)(unsafe.Pointer(pParse)).FeParseMode) >= PARSE_MODE_RENAME) {
(*Expr)(unsafe.Pointer(pA)).Fop = U8(op)
@@ -137379,14 +139938,14 @@ func binaryToUnaryIfNull(tls *libc.TLS, pParse uintptr, pY uintptr, pA uintptr,
// list of identifiers. Report an error if the ID list contains
// a COLLATE clause or an ASC or DESC keyword, except ignore the
// error while parsing a legacy schema.
-func parserAddExprIdListTerm(tls *libc.TLS, pParse uintptr, pPrior uintptr, pIdToken uintptr, hasCollate int32, sortOrder int32) uintptr { /* sqlite3.c:157197:19: */
+func parserAddExprIdListTerm(tls *libc.TLS, pParse uintptr, pPrior uintptr, pIdToken uintptr, hasCollate int32, sortOrder int32) uintptr { /* sqlite3.c:158204:19: */
bp := tls.Alloc(16)
defer tls.Free(16)
var p uintptr = Xsqlite3ExprListAppend(tls, pParse, pPrior, uintptr(0))
if ((hasCollate != 0) || (sortOrder != -1)) &&
(int32((*Sqlite3)(unsafe.Pointer((*Parse)(unsafe.Pointer(pParse)).Fdb)).Finit.Fbusy) == 0) {
- Xsqlite3ErrorMsg(tls, pParse, ts+20719, /* "syntax error aft..." */
+ Xsqlite3ErrorMsg(tls, pParse, ts+21179, /* "syntax error aft..." */
libc.VaList(bp, (*Token)(unsafe.Pointer(pIdToken)).Fn, (*Token)(unsafe.Pointer(pIdToken)).Fz))
}
Xsqlite3ExprListSetName(tls, pParse, p, pIdToken, 1)
@@ -137451,10 +140010,10 @@ func parserAddExprIdListTerm(tls *libc.TLS, pParse uintptr, pPrior uintptr, pIdT
// YY_MAX_REDUCE Maximum value for reduce actions
//************ Begin control #defines ****************************************
type YYMINORTYPE = struct {
- _ [0]uint64
- Fyyinit int32
- _ [12]byte
-} /* sqlite3.c:157486:3 */
+ F__ccgo_pad1 [0]uint64
+ Fyyinit int32
+ F__ccgo_pad2 [12]byte
+} /* sqlite3.c:158494:3 */
//************ End control #defines ******************************************
// Define the yytestcase() macro to be a no-op if is not already defined
@@ -137515,439 +140074,440 @@ type YYMINORTYPE = struct {
// yy_default[] Default action for each state.
//
// Begin parsing tables *********************************************
-var yy_action = [2020]uint16{
- /* 0 */ uint16(563), uint16(1295), uint16(563), uint16(1274), uint16(168), uint16(361), uint16(115), uint16(112), uint16(218), uint16(373),
+var yy_action = [2023]uint16{
+ /* 0 */ uint16(563), uint16(1295), uint16(563), uint16(1274), uint16(168), uint16(1257), uint16(115), uint16(112), uint16(218), uint16(373),
/* 10 */ uint16(563), uint16(1295), uint16(374), uint16(563), uint16(488), uint16(563), uint16(115), uint16(112), uint16(218), uint16(406),
/* 20 */ uint16(1300), uint16(1300), uint16(41), uint16(41), uint16(41), uint16(41), uint16(514), uint16(1504), uint16(520), uint16(1298),
- /* 30 */ uint16(1298), uint16(959), uint16(41), uint16(41), uint16(1257), uint16(71), uint16(71), uint16(51), uint16(51), uint16(960),
+ /* 30 */ uint16(1298), uint16(959), uint16(41), uint16(41), uint16(1260), uint16(71), uint16(71), uint16(51), uint16(51), uint16(960),
/* 40 */ uint16(557), uint16(557), uint16(557), uint16(122), uint16(123), uint16(113), uint16(1200), uint16(1200), uint16(1035), uint16(1038),
/* 50 */ uint16(1028), uint16(1028), uint16(120), uint16(120), uint16(121), uint16(121), uint16(121), uint16(121), uint16(414), uint16(406),
/* 60 */ uint16(273), uint16(273), uint16(273), uint16(273), uint16(115), uint16(112), uint16(218), uint16(115), uint16(112), uint16(218),
- /* 70 */ uint16(197), uint16(268), uint16(545), uint16(560), uint16(515), uint16(560), uint16(1260), uint16(563), uint16(385), uint16(248),
+ /* 70 */ uint16(197), uint16(268), uint16(545), uint16(560), uint16(515), uint16(560), uint16(211), uint16(563), uint16(385), uint16(248),
/* 80 */ uint16(215), uint16(521), uint16(399), uint16(122), uint16(123), uint16(113), uint16(1200), uint16(1200), uint16(1035), uint16(1038),
/* 90 */ uint16(1028), uint16(1028), uint16(120), uint16(120), uint16(121), uint16(121), uint16(121), uint16(121), uint16(540), uint16(13),
/* 100 */ uint16(13), uint16(1259), uint16(119), uint16(119), uint16(119), uint16(119), uint16(118), uint16(118), uint16(117), uint16(117),
- /* 110 */ uint16(117), uint16(116), uint16(441), uint16(1176), uint16(419), uint16(1531), uint16(446), uint16(137), uint16(512), uint16(1539),
- /* 120 */ uint16(1545), uint16(372), uint16(1547), uint16(6), uint16(371), uint16(1176), uint16(1148), uint16(1584), uint16(1148), uint16(406),
- /* 130 */ uint16(1545), uint16(534), uint16(115), uint16(112), uint16(218), uint16(1267), uint16(99), uint16(441), uint16(121), uint16(121),
+ /* 110 */ uint16(117), uint16(116), uint16(441), uint16(1176), uint16(419), uint16(197), uint16(446), uint16(320), uint16(512), uint16(1539),
+ /* 120 */ uint16(1545), uint16(372), uint16(1547), uint16(6), uint16(371), uint16(1176), uint16(1148), uint16(394), uint16(1148), uint16(406),
+ /* 130 */ uint16(1545), uint16(534), uint16(115), uint16(112), uint16(218), uint16(1415), uint16(99), uint16(30), uint16(121), uint16(121),
/* 140 */ uint16(121), uint16(121), uint16(119), uint16(119), uint16(119), uint16(119), uint16(118), uint16(118), uint16(117), uint16(117),
/* 150 */ uint16(117), uint16(116), uint16(441), uint16(122), uint16(123), uint16(113), uint16(1200), uint16(1200), uint16(1035), uint16(1038),
- /* 160 */ uint16(1028), uint16(1028), uint16(120), uint16(120), uint16(121), uint16(121), uint16(121), uint16(121), uint16(197), uint16(1176),
- /* 170 */ uint16(1177), uint16(1178), uint16(241), uint16(304), uint16(554), uint16(501), uint16(498), uint16(497), uint16(473), uint16(124),
- /* 180 */ uint16(394), uint16(1176), uint16(1177), uint16(1178), uint16(1176), uint16(496), uint16(119), uint16(119), uint16(119), uint16(119),
- /* 190 */ uint16(118), uint16(118), uint16(117), uint16(117), uint16(117), uint16(116), uint16(441), uint16(139), uint16(540), uint16(406),
+ /* 160 */ uint16(1028), uint16(1028), uint16(120), uint16(120), uint16(121), uint16(121), uint16(121), uint16(121), uint16(31), uint16(1176),
+ /* 170 */ uint16(1177), uint16(1178), uint16(241), uint16(357), uint16(1558), uint16(501), uint16(498), uint16(497), uint16(317), uint16(124),
+ /* 180 */ uint16(319), uint16(1176), uint16(1177), uint16(1178), uint16(1176), uint16(496), uint16(119), uint16(119), uint16(119), uint16(119),
+ /* 190 */ uint16(118), uint16(118), uint16(117), uint16(117), uint16(117), uint16(116), uint16(441), uint16(139), uint16(96), uint16(406),
/* 200 */ uint16(121), uint16(121), uint16(121), uint16(121), uint16(114), uint16(117), uint16(117), uint16(117), uint16(116), uint16(441),
/* 210 */ uint16(541), uint16(1532), uint16(119), uint16(119), uint16(119), uint16(119), uint16(118), uint16(118), uint16(117), uint16(117),
/* 220 */ uint16(117), uint16(116), uint16(441), uint16(122), uint16(123), uint16(113), uint16(1200), uint16(1200), uint16(1035), uint16(1038),
- /* 230 */ uint16(1028), uint16(1028), uint16(120), uint16(120), uint16(121), uint16(121), uint16(121), uint16(121), uint16(406), uint16(320),
- /* 240 */ uint16(1176), uint16(1177), uint16(1178), uint16(81), uint16(342), uint16(1590), uint16(396), uint16(80), uint16(119), uint16(119),
- /* 250 */ uint16(119), uint16(119), uint16(118), uint16(118), uint16(117), uint16(117), uint16(117), uint16(116), uint16(441), uint16(1176),
- /* 260 */ uint16(211), uint16(450), uint16(122), uint16(123), uint16(113), uint16(1200), uint16(1200), uint16(1035), uint16(1038), uint16(1028),
- /* 270 */ uint16(1028), uint16(120), uint16(120), uint16(121), uint16(121), uint16(121), uint16(121), uint16(251), uint16(450), uint16(449),
- /* 280 */ uint16(273), uint16(273), uint16(119), uint16(119), uint16(119), uint16(119), uint16(118), uint16(118), uint16(117), uint16(117),
- /* 290 */ uint16(117), uint16(116), uint16(441), uint16(560), uint16(1224), uint16(1), uint16(1), uint16(569), uint16(2), uint16(1228),
- /* 300 */ uint16(317), uint16(1176), uint16(319), uint16(1561), uint16(305), uint16(337), uint16(140), uint16(340), uint16(406), uint16(430),
- /* 310 */ uint16(469), uint16(1533), uint16(1197), uint16(1308), uint16(348), uint16(1176), uint16(1177), uint16(1178), uint16(168), uint16(462),
+ /* 230 */ uint16(1028), uint16(1028), uint16(120), uint16(120), uint16(121), uint16(121), uint16(121), uint16(121), uint16(406), uint16(441),
+ /* 240 */ uint16(1176), uint16(1177), uint16(1178), uint16(81), uint16(439), uint16(439), uint16(439), uint16(80), uint16(119), uint16(119),
+ /* 250 */ uint16(119), uint16(119), uint16(118), uint16(118), uint16(117), uint16(117), uint16(117), uint16(116), uint16(441), uint16(488),
+ /* 260 */ uint16(1176), uint16(318), uint16(122), uint16(123), uint16(113), uint16(1200), uint16(1200), uint16(1035), uint16(1038), uint16(1028),
+ /* 270 */ uint16(1028), uint16(120), uint16(120), uint16(121), uint16(121), uint16(121), uint16(121), uint16(493), uint16(1025), uint16(1025),
+ /* 280 */ uint16(1036), uint16(1039), uint16(119), uint16(119), uint16(119), uint16(119), uint16(118), uint16(118), uint16(117), uint16(117),
+ /* 290 */ uint16(117), uint16(116), uint16(441), uint16(1584), uint16(995), uint16(1224), uint16(1), uint16(1), uint16(569), uint16(2),
+ /* 300 */ uint16(1228), uint16(1267), uint16(137), uint16(1503), uint16(245), uint16(305), uint16(473), uint16(140), uint16(406), uint16(860),
+ /* 310 */ uint16(561), uint16(1176), uint16(914), uint16(914), uint16(1308), uint16(359), uint16(1176), uint16(1177), uint16(1178), uint16(462),
/* 320 */ uint16(330), uint16(119), uint16(119), uint16(119), uint16(119), uint16(118), uint16(118), uint16(117), uint16(117), uint16(117),
/* 330 */ uint16(116), uint16(441), uint16(122), uint16(123), uint16(113), uint16(1200), uint16(1200), uint16(1035), uint16(1038), uint16(1028),
- /* 340 */ uint16(1028), uint16(120), uint16(120), uint16(121), uint16(121), uint16(121), uint16(121), uint16(273), uint16(273), uint16(563),
- /* 350 */ uint16(83), uint16(450), uint16(416), uint16(1564), uint16(569), uint16(2), uint16(1228), uint16(1176), uint16(1177), uint16(1178),
- /* 360 */ uint16(560), uint16(305), uint16(471), uint16(140), uint16(944), uint16(995), uint16(860), uint16(563), uint16(467), uint16(1197),
- /* 370 */ uint16(1308), uint16(13), uint16(13), uint16(137), uint16(229), uint16(118), uint16(118), uint16(117), uint16(117), uint16(117),
- /* 380 */ uint16(116), uint16(441), uint16(96), uint16(318), uint16(946), uint16(504), uint16(424), uint16(361), uint16(562), uint16(71),
- /* 390 */ uint16(71), uint16(119), uint16(119), uint16(119), uint16(119), uint16(118), uint16(118), uint16(117), uint16(117), uint16(117),
- /* 400 */ uint16(116), uint16(441), uint16(427), uint16(205), uint16(273), uint16(273), uint16(445), uint16(1015), uint16(259), uint16(276),
- /* 410 */ uint16(356), uint16(507), uint16(351), uint16(506), uint16(246), uint16(406), uint16(959), uint16(560), uint16(328), uint16(344),
- /* 420 */ uint16(347), uint16(315), uint16(860), uint16(1006), uint16(960), uint16(126), uint16(545), uint16(1005), uint16(313), uint16(304),
- /* 430 */ uint16(554), uint16(229), uint16(538), uint16(1539), uint16(148), uint16(544), uint16(281), uint16(6), uint16(203), uint16(122),
+ /* 340 */ uint16(1028), uint16(120), uint16(120), uint16(121), uint16(121), uint16(121), uint16(121), uint16(328), uint16(273), uint16(273),
+ /* 350 */ uint16(1015), uint16(83), uint16(1029), uint16(425), uint16(1564), uint16(569), uint16(2), uint16(1228), uint16(304), uint16(554),
+ /* 360 */ uint16(925), uint16(560), uint16(305), uint16(944), uint16(140), uint16(860), uint16(1006), uint16(1176), uint16(1177), uint16(1178),
+ /* 370 */ uint16(1005), uint16(1308), uint16(411), uint16(213), uint16(511), uint16(229), uint16(119), uint16(119), uint16(119), uint16(119),
+ /* 380 */ uint16(118), uint16(118), uint16(117), uint16(117), uint16(117), uint16(116), uint16(441), uint16(519), uint16(347), uint16(116),
+ /* 390 */ uint16(441), uint16(119), uint16(119), uint16(119), uint16(119), uint16(118), uint16(118), uint16(117), uint16(117), uint16(117),
+ /* 400 */ uint16(116), uint16(441), uint16(1005), uint16(1005), uint16(1007), uint16(273), uint16(273), uint16(445), uint16(563), uint16(16),
+ /* 410 */ uint16(16), uint16(1590), uint16(563), uint16(1540), uint16(563), uint16(406), uint16(1176), uint16(6), uint16(560), uint16(344),
+ /* 420 */ uint16(182), uint16(118), uint16(118), uint16(117), uint16(117), uint16(117), uint16(116), uint16(441), uint16(416), uint16(142),
+ /* 430 */ uint16(71), uint16(71), uint16(229), uint16(563), uint16(71), uint16(71), uint16(55), uint16(55), uint16(203), uint16(122),
/* 440 */ uint16(123), uint16(113), uint16(1200), uint16(1200), uint16(1035), uint16(1038), uint16(1028), uint16(1028), uint16(120), uint16(120),
- /* 450 */ uint16(121), uint16(121), uint16(121), uint16(121), uint16(563), uint16(217), uint16(563), uint16(12), uint16(406), uint16(1005),
- /* 460 */ uint16(1005), uint16(1007), uint16(502), uint16(445), uint16(119), uint16(119), uint16(119), uint16(119), uint16(118), uint16(118),
- /* 470 */ uint16(117), uint16(117), uint16(117), uint16(116), uint16(441), uint16(452), uint16(71), uint16(71), uint16(70), uint16(70),
- /* 480 */ uint16(944), uint16(137), uint16(122), uint16(123), uint16(113), uint16(1200), uint16(1200), uint16(1035), uint16(1038), uint16(1028),
- /* 490 */ uint16(1028), uint16(120), uint16(120), uint16(121), uint16(121), uint16(121), uint16(121), uint16(1530), uint16(119), uint16(119),
- /* 500 */ uint16(119), uint16(119), uint16(118), uint16(118), uint16(117), uint16(117), uint16(117), uint16(116), uint16(441), uint16(403),
- /* 510 */ uint16(402), uint16(241), uint16(1176), uint16(545), uint16(501), uint16(498), uint16(497), uint16(1468), uint16(1143), uint16(451),
- /* 520 */ uint16(267), uint16(267), uint16(513), uint16(1540), uint16(496), uint16(142), uint16(1176), uint16(6), uint16(406), uint16(530),
- /* 530 */ uint16(194), uint16(1143), uint16(864), uint16(560), uint16(1143), uint16(461), uint16(182), uint16(304), uint16(554), uint16(32),
- /* 540 */ uint16(379), uint16(119), uint16(119), uint16(119), uint16(119), uint16(118), uint16(118), uint16(117), uint16(117), uint16(117),
+ /* 450 */ uint16(121), uint16(121), uint16(121), uint16(121), uint16(217), uint16(13), uint16(13), uint16(1176), uint16(406), uint16(568),
+ /* 460 */ uint16(1400), uint16(1228), uint16(502), uint16(137), uint16(445), uint16(168), uint16(305), uint16(545), uint16(140), uint16(1180),
+ /* 470 */ uint16(424), uint16(545), uint16(1176), uint16(1177), uint16(1178), uint16(1308), uint16(544), uint16(438), uint16(437), uint16(944),
+ /* 480 */ uint16(513), uint16(452), uint16(122), uint16(123), uint16(113), uint16(1200), uint16(1200), uint16(1035), uint16(1038), uint16(1028),
+ /* 490 */ uint16(1028), uint16(120), uint16(120), uint16(121), uint16(121), uint16(121), uint16(121), uint16(315), uint16(119), uint16(119),
+ /* 500 */ uint16(119), uint16(119), uint16(118), uint16(118), uint16(117), uint16(117), uint16(117), uint16(116), uint16(441), uint16(273),
+ /* 510 */ uint16(273), uint16(1143), uint16(416), uint16(1176), uint16(1177), uint16(1178), uint16(543), uint16(563), uint16(1143), uint16(304),
+ /* 520 */ uint16(554), uint16(1561), uint16(560), uint16(1207), uint16(1143), uint16(1207), uint16(1180), uint16(1143), uint16(406), uint16(530),
+ /* 530 */ uint16(421), uint16(1143), uint16(864), uint16(183), uint16(1143), uint16(143), uint16(229), uint16(562), uint16(32), uint16(71),
+ /* 540 */ uint16(71), uint16(119), uint16(119), uint16(119), uint16(119), uint16(118), uint16(118), uint16(117), uint16(117), uint16(117),
/* 550 */ uint16(116), uint16(441), uint16(122), uint16(123), uint16(113), uint16(1200), uint16(1200), uint16(1035), uint16(1038), uint16(1028),
- /* 560 */ uint16(1028), uint16(120), uint16(120), uint16(121), uint16(121), uint16(121), uint16(121), uint16(406), uint16(1176), uint16(1177),
- /* 570 */ uint16(1178), uint16(857), uint16(568), uint16(1176), uint16(1228), uint16(925), uint16(1176), uint16(454), uint16(361), uint16(305),
- /* 580 */ uint16(189), uint16(140), uint16(1176), uint16(1177), uint16(1178), uint16(519), uint16(529), uint16(404), uint16(1308), uint16(183),
+ /* 560 */ uint16(1028), uint16(120), uint16(120), uint16(121), uint16(121), uint16(121), uint16(121), uint16(406), uint16(445), uint16(241),
+ /* 570 */ uint16(1176), uint16(857), uint16(501), uint16(498), uint16(497), uint16(1176), uint16(526), uint16(189), uint16(245), uint16(538),
+ /* 580 */ uint16(1539), uint16(282), uint16(496), uint16(370), uint16(6), uint16(563), uint16(529), uint16(477), uint16(5), uint16(279),
/* 590 */ uint16(1015), uint16(122), uint16(123), uint16(113), uint16(1200), uint16(1200), uint16(1035), uint16(1038), uint16(1028), uint16(1028),
- /* 600 */ uint16(120), uint16(120), uint16(121), uint16(121), uint16(121), uint16(121), uint16(1006), uint16(16), uint16(16), uint16(370),
+ /* 600 */ uint16(120), uint16(120), uint16(121), uint16(121), uint16(121), uint16(121), uint16(1006), uint16(13), uint16(13), uint16(1414),
/* 610 */ uint16(1005), uint16(119), uint16(119), uint16(119), uint16(119), uint16(118), uint16(118), uint16(117), uint16(117), uint16(117),
- /* 620 */ uint16(116), uint16(441), uint16(273), uint16(273), uint16(1537), uint16(150), uint16(1176), uint16(98), uint16(6), uint16(1176),
- /* 630 */ uint16(1177), uint16(1178), uint16(1176), uint16(1177), uint16(1178), uint16(560), uint16(380), uint16(406), uint16(376), uint16(438),
- /* 640 */ uint16(437), uint16(1161), uint16(1005), uint16(1005), uint16(1007), uint16(1025), uint16(1025), uint16(1036), uint16(1039), uint16(229),
+ /* 620 */ uint16(116), uint16(441), uint16(426), uint16(273), uint16(273), uint16(1176), uint16(1176), uint16(1177), uint16(1178), uint16(1619),
+ /* 630 */ uint16(392), uint16(1176), uint16(1177), uint16(1178), uint16(1176), uint16(342), uint16(560), uint16(406), uint16(525), uint16(361),
+ /* 640 */ uint16(430), uint16(1161), uint16(1005), uint16(1005), uint16(1007), uint16(348), uint16(411), uint16(357), uint16(1558), uint16(488),
/* 650 */ uint16(119), uint16(119), uint16(119), uint16(119), uint16(118), uint16(118), uint16(117), uint16(117), uint16(117), uint16(116),
/* 660 */ uint16(441), uint16(122), uint16(123), uint16(113), uint16(1200), uint16(1200), uint16(1035), uint16(1038), uint16(1028), uint16(1028),
- /* 670 */ uint16(120), uint16(120), uint16(121), uint16(121), uint16(121), uint16(121), uint16(406), uint16(1143), uint16(1619), uint16(392),
- /* 680 */ uint16(1016), uint16(445), uint16(1176), uint16(1177), uint16(1178), uint16(1207), uint16(525), uint16(1207), uint16(1530), uint16(995),
- /* 690 */ uint16(1143), uint16(304), uint16(554), uint16(1143), uint16(5), uint16(563), uint16(543), uint16(3), uint16(361), uint16(216),
+ /* 670 */ uint16(120), uint16(120), uint16(121), uint16(121), uint16(121), uint16(121), uint16(406), uint16(830), uint16(831), uint16(832),
+ /* 680 */ uint16(1016), uint16(1176), uint16(1177), uint16(1178), uint16(396), uint16(285), uint16(148), uint16(1312), uint16(304), uint16(554),
+ /* 690 */ uint16(1176), uint16(1177), uint16(1178), uint16(1467), uint16(216), uint16(3), uint16(337), uint16(137), uint16(340), uint16(560),
/* 700 */ uint16(122), uint16(123), uint16(113), uint16(1200), uint16(1200), uint16(1035), uint16(1038), uint16(1028), uint16(1028), uint16(120),
- /* 710 */ uint16(120), uint16(121), uint16(121), uint16(121), uint16(121), uint16(143), uint16(563), uint16(13), uint16(13), uint16(1029),
+ /* 710 */ uint16(120), uint16(121), uint16(121), uint16(121), uint16(121), uint16(563), uint16(504), uint16(946), uint16(273), uint16(273),
/* 720 */ uint16(119), uint16(119), uint16(119), uint16(119), uint16(118), uint16(118), uint16(117), uint16(117), uint16(117), uint16(116),
- /* 730 */ uint16(441), uint16(1176), uint16(426), uint16(563), uint16(1176), uint16(563), uint16(274), uint16(274), uint16(13), uint16(13),
- /* 740 */ uint16(1078), uint16(1176), uint16(328), uint16(457), uint16(316), uint16(147), uint16(406), uint16(211), uint16(361), uint16(560),
- /* 750 */ uint16(1000), uint16(213), uint16(511), uint16(293), uint16(477), uint16(55), uint16(55), uint16(71), uint16(71), uint16(119),
+ /* 730 */ uint16(441), uint16(560), uint16(1176), uint16(427), uint16(563), uint16(451), uint16(98), uint16(13), uint16(13), uint16(259),
+ /* 740 */ uint16(276), uint16(356), uint16(507), uint16(351), uint16(506), uint16(246), uint16(406), uint16(361), uint16(469), uint16(1530),
+ /* 750 */ uint16(1000), uint16(347), uint16(293), uint16(304), uint16(554), uint16(1589), uint16(71), uint16(71), uint16(889), uint16(119),
/* 760 */ uint16(119), uint16(119), uint16(119), uint16(118), uint16(118), uint16(117), uint16(117), uint16(117), uint16(116), uint16(441),
/* 770 */ uint16(122), uint16(123), uint16(113), uint16(1200), uint16(1200), uint16(1035), uint16(1038), uint16(1028), uint16(1028), uint16(120),
- /* 780 */ uint16(120), uint16(121), uint16(121), uint16(121), uint16(121), uint16(406), uint16(455), uint16(1176), uint16(1177), uint16(1178),
- /* 790 */ uint16(1176), uint16(1177), uint16(1178), uint16(471), uint16(526), uint16(149), uint16(404), uint16(1176), uint16(1177), uint16(1178),
- /* 800 */ uint16(105), uint16(270), uint16(103), uint16(563), uint16(944), uint16(563), uint16(116), uint16(441), uint16(1530), uint16(122),
+ /* 780 */ uint16(120), uint16(121), uint16(121), uint16(121), uint16(121), uint16(406), uint16(1143), uint16(1078), uint16(1176), uint16(1177),
+ /* 790 */ uint16(1178), uint16(416), uint16(1080), uint16(300), uint16(150), uint16(995), uint16(1080), uint16(361), uint16(361), uint16(1143),
+ /* 800 */ uint16(361), uint16(378), uint16(1143), uint16(477), uint16(563), uint16(244), uint16(243), uint16(242), uint16(1278), uint16(122),
/* 810 */ uint16(123), uint16(113), uint16(1200), uint16(1200), uint16(1035), uint16(1038), uint16(1028), uint16(1028), uint16(120), uint16(120),
- /* 820 */ uint16(121), uint16(121), uint16(121), uint16(121), uint16(945), uint16(13), uint16(13), uint16(13), uint16(13), uint16(119),
+ /* 820 */ uint16(121), uint16(121), uint16(121), uint16(121), uint16(563), uint16(880), uint16(13), uint16(13), uint16(483), uint16(119),
/* 830 */ uint16(119), uint16(119), uint16(119), uint16(118), uint16(118), uint16(117), uint16(117), uint16(117), uint16(116), uint16(441),
- /* 840 */ uint16(191), uint16(563), uint16(192), uint16(563), uint16(416), uint16(439), uint16(439), uint16(439), uint16(1083), uint16(1083),
- /* 850 */ uint16(485), uint16(561), uint16(285), uint16(914), uint16(914), uint16(406), uint16(462), uint16(330), uint16(1530), uint16(830),
- /* 860 */ uint16(831), uint16(832), uint16(206), uint16(71), uint16(71), uint16(71), uint16(71), uint16(286), uint16(119), uint16(119),
+ /* 840 */ uint16(1176), uint16(191), uint16(540), uint16(563), uint16(147), uint16(149), uint16(13), uint16(13), uint16(328), uint16(457),
+ /* 850 */ uint16(316), uint16(1083), uint16(1083), uint16(485), uint16(1537), uint16(406), uint16(505), uint16(1530), uint16(6), uint16(1514),
+ /* 860 */ uint16(284), uint16(192), uint16(1277), uint16(145), uint16(881), uint16(71), uint16(71), uint16(488), uint16(119), uint16(119),
/* 870 */ uint16(119), uint16(119), uint16(118), uint16(118), uint16(117), uint16(117), uint16(117), uint16(116), uint16(441), uint16(122),
/* 880 */ uint16(123), uint16(113), uint16(1200), uint16(1200), uint16(1035), uint16(1038), uint16(1028), uint16(1028), uint16(120), uint16(120),
- /* 890 */ uint16(121), uint16(121), uint16(121), uint16(121), uint16(563), uint16(217), uint16(563), uint16(1122), uint16(1617), uint16(406),
- /* 900 */ uint16(300), uint16(1617), uint16(301), uint16(416), uint16(1278), uint16(1473), uint16(244), uint16(243), uint16(242), uint16(1249),
- /* 910 */ uint16(412), uint16(556), uint16(412), uint16(282), uint16(842), uint16(279), uint16(71), uint16(71), uint16(71), uint16(71),
- /* 920 */ uint16(944), uint16(1415), uint16(1473), uint16(1475), uint16(101), uint16(113), uint16(1200), uint16(1200), uint16(1035), uint16(1038),
+ /* 890 */ uint16(121), uint16(121), uint16(121), uint16(121), uint16(563), uint16(471), uint16(1176), uint16(1177), uint16(1178), uint16(406),
+ /* 900 */ uint16(852), uint16(327), uint16(301), uint16(462), uint16(330), uint16(1516), uint16(270), uint16(1530), uint16(1530), uint16(944),
+ /* 910 */ uint16(1531), uint16(1307), uint16(313), uint16(9), uint16(842), uint16(251), uint16(71), uint16(71), uint16(477), uint16(428),
+ /* 920 */ uint16(146), uint16(488), uint16(38), uint16(945), uint16(101), uint16(113), uint16(1200), uint16(1200), uint16(1035), uint16(1038),
/* 930 */ uint16(1028), uint16(1028), uint16(120), uint16(120), uint16(121), uint16(121), uint16(121), uint16(121), uint16(119), uint16(119),
- /* 940 */ uint16(119), uint16(119), uint16(118), uint16(118), uint16(117), uint16(117), uint16(117), uint16(116), uint16(441), uint16(273),
- /* 950 */ uint16(273), uint16(1099), uint16(563), uint16(436), uint16(1143), uint16(440), uint16(563), uint16(1122), uint16(1618), uint16(357),
- /* 960 */ uint16(1558), uint16(1618), uint16(560), uint16(546), uint16(488), uint16(197), uint16(1100), uint16(1143), uint16(378), uint16(290),
- /* 970 */ uint16(1143), uint16(1306), uint16(284), uint16(460), uint16(71), uint16(71), uint16(1120), uint16(405), uint16(13), uint16(13),
- /* 980 */ uint16(145), uint16(1101), uint16(119), uint16(119), uint16(119), uint16(119), uint16(118), uint16(118), uint16(117), uint16(117),
- /* 990 */ uint16(117), uint16(116), uint16(441), uint16(542), uint16(104), uint16(1473), uint16(509), uint16(273), uint16(273), uint16(294),
- /* 1000 */ uint16(1514), uint16(294), uint16(900), uint16(273), uint16(273), uint16(273), uint16(273), uint16(563), uint16(1503), uint16(563),
- /* 1010 */ uint16(560), uint16(545), uint16(901), uint16(464), uint16(406), uint16(1058), uint16(560), uint16(852), uint16(560), uint16(198),
- /* 1020 */ uint16(547), uint16(1080), uint16(920), uint16(404), uint16(1400), uint16(1080), uint16(146), uint16(919), uint16(38), uint16(56),
- /* 1030 */ uint16(56), uint16(15), uint16(15), uint16(563), uint16(406), uint16(12), uint16(1120), uint16(471), uint16(122), uint16(123),
+ /* 940 */ uint16(119), uint16(119), uint16(118), uint16(118), uint16(117), uint16(117), uint16(117), uint16(116), uint16(441), uint16(563),
+ /* 950 */ uint16(1197), uint16(1099), uint16(563), uint16(436), uint16(563), uint16(1533), uint16(563), uint16(852), uint16(1122), uint16(1617),
+ /* 960 */ uint16(454), uint16(290), uint16(1617), uint16(546), uint16(251), uint16(1303), uint16(1100), uint16(267), uint16(267), uint16(281),
+ /* 970 */ uint16(404), uint16(70), uint16(70), uint16(460), uint16(71), uint16(71), uint16(71), uint16(71), uint16(13), uint16(13),
+ /* 980 */ uint16(560), uint16(1101), uint16(119), uint16(119), uint16(119), uint16(119), uint16(118), uint16(118), uint16(117), uint16(117),
+ /* 990 */ uint16(117), uint16(116), uint16(441), uint16(542), uint16(104), uint16(273), uint16(273), uint16(273), uint16(273), uint16(1197),
+ /* 1000 */ uint16(217), uint16(1468), uint16(900), uint16(471), uint16(450), uint16(563), uint16(1473), uint16(1197), uint16(560), uint16(447),
+ /* 1010 */ uint16(560), uint16(545), uint16(901), uint16(440), uint16(406), uint16(1058), uint16(292), uint16(274), uint16(274), uint16(198),
+ /* 1020 */ uint16(547), uint16(450), uint16(449), uint16(1473), uint16(1475), uint16(944), uint16(455), uint16(56), uint16(56), uint16(410),
+ /* 1030 */ uint16(560), uint16(1122), uint16(1618), uint16(379), uint16(406), uint16(1618), uint16(404), uint16(1120), uint16(122), uint16(123),
/* 1040 */ uint16(113), uint16(1200), uint16(1200), uint16(1035), uint16(1038), uint16(1028), uint16(1028), uint16(120), uint16(120), uint16(121),
- /* 1050 */ uint16(121), uint16(121), uint16(121), uint16(1460), uint16(406), uint16(43), uint16(43), uint16(483), uint16(122), uint16(123),
+ /* 1050 */ uint16(121), uint16(121), uint16(121), uint16(1460), uint16(406), uint16(12), uint16(1197), uint16(1512), uint16(122), uint16(123),
/* 1060 */ uint16(113), uint16(1200), uint16(1200), uint16(1035), uint16(1038), uint16(1028), uint16(1028), uint16(120), uint16(120), uint16(121),
- /* 1070 */ uint16(121), uint16(121), uint16(121), uint16(563), uint16(852), uint16(9), uint16(471), uint16(251), uint16(122), uint16(111),
+ /* 1070 */ uint16(121), uint16(121), uint16(121), uint16(308), uint16(471), uint16(126), uint16(359), uint16(286), uint16(122), uint16(111),
/* 1080 */ uint16(113), uint16(1200), uint16(1200), uint16(1035), uint16(1038), uint16(1028), uint16(1028), uint16(120), uint16(120), uint16(121),
- /* 1090 */ uint16(121), uint16(121), uint16(121), uint16(563), uint16(421), uint16(57), uint16(57), uint16(119), uint16(119), uint16(119),
- /* 1100 */ uint16(119), uint16(118), uint16(118), uint16(117), uint16(117), uint16(117), uint16(116), uint16(441), uint16(1176), uint16(493),
- /* 1110 */ uint16(563), uint16(289), uint16(1197), uint16(478), uint16(1516), uint16(44), uint16(44), uint16(119), uint16(119), uint16(119),
- /* 1120 */ uint16(119), uint16(118), uint16(118), uint16(117), uint16(117), uint16(117), uint16(116), uint16(441), uint16(880), uint16(563),
- /* 1130 */ uint16(536), uint16(563), uint16(58), uint16(58), uint16(488), uint16(1414), uint16(245), uint16(119), uint16(119), uint16(119),
- /* 1140 */ uint16(119), uint16(118), uint16(118), uint16(117), uint16(117), uint16(117), uint16(116), uint16(441), uint16(563), uint16(535),
- /* 1150 */ uint16(291), uint16(59), uint16(59), uint16(60), uint16(60), uint16(438), uint16(437), uint16(406), uint16(1154), uint16(505),
- /* 1160 */ uint16(304), uint16(554), uint16(477), uint16(1204), uint16(1176), uint16(1177), uint16(1178), uint16(881), uint16(1206), uint16(1197),
- /* 1170 */ uint16(61), uint16(61), uint16(1246), uint16(357), uint16(1558), uint16(1538), uint16(1205), uint16(563), uint16(1467), uint16(6),
- /* 1180 */ uint16(1176), uint16(488), uint16(123), uint16(113), uint16(1200), uint16(1200), uint16(1035), uint16(1038), uint16(1028), uint16(1028),
- /* 1190 */ uint16(120), uint16(120), uint16(121), uint16(121), uint16(121), uint16(121), uint16(1400), uint16(1143), uint16(410), uint16(62),
- /* 1200 */ uint16(62), uint16(1207), uint16(1099), uint16(1207), uint16(411), uint16(447), uint16(273), uint16(273), uint16(537), uint16(1154),
- /* 1210 */ uint16(1143), uint16(108), uint16(555), uint16(1143), uint16(4), uint16(391), uint16(1220), uint16(1100), uint16(1512), uint16(560),
- /* 1220 */ uint16(347), uint16(516), uint16(428), uint16(548), uint16(308), uint16(1307), uint16(1536), uint16(1077), uint16(558), uint16(1077),
- /* 1230 */ uint16(6), uint16(488), uint16(1101), uint16(1400), uint16(488), uint16(309), uint16(1176), uint16(1177), uint16(1178), uint16(563),
+ /* 1090 */ uint16(121), uint16(121), uint16(121), uint16(309), uint16(450), uint16(471), uint16(1473), uint16(119), uint16(119), uint16(119),
+ /* 1100 */ uint16(119), uint16(118), uint16(118), uint16(117), uint16(117), uint16(117), uint16(116), uint16(441), uint16(1176), uint16(563),
+ /* 1110 */ uint16(1120), uint16(482), uint16(563), uint16(312), uint16(433), uint16(479), uint16(197), uint16(119), uint16(119), uint16(119),
+ /* 1120 */ uint16(119), uint16(118), uint16(118), uint16(117), uint16(117), uint16(117), uint16(116), uint16(441), uint16(405), uint16(12),
+ /* 1130 */ uint16(536), uint16(15), uint16(15), uint16(478), uint16(43), uint16(43), uint16(509), uint16(119), uint16(119), uint16(119),
+ /* 1140 */ uint16(119), uint16(118), uint16(118), uint16(117), uint16(117), uint16(117), uint16(116), uint16(441), uint16(289), uint16(535),
+ /* 1150 */ uint16(294), uint16(563), uint16(294), uint16(391), uint16(1220), uint16(438), uint16(437), uint16(406), uint16(1154), uint16(403),
+ /* 1160 */ uint16(402), uint16(1400), uint16(920), uint16(1204), uint16(1176), uint16(1177), uint16(1178), uint16(919), uint16(1206), uint16(291),
+ /* 1170 */ uint16(1306), uint16(1249), uint16(412), uint16(57), uint16(57), uint16(488), uint16(1205), uint16(563), uint16(556), uint16(412),
+ /* 1180 */ uint16(1176), uint16(1344), uint16(123), uint16(113), uint16(1200), uint16(1200), uint16(1035), uint16(1038), uint16(1028), uint16(1028),
+ /* 1190 */ uint16(120), uint16(120), uint16(121), uint16(121), uint16(121), uint16(121), uint16(1400), uint16(1143), uint16(563), uint16(44),
+ /* 1200 */ uint16(44), uint16(1207), uint16(194), uint16(1207), uint16(273), uint16(273), uint16(1400), uint16(461), uint16(537), uint16(1154),
+ /* 1210 */ uint16(1143), uint16(108), uint16(555), uint16(1143), uint16(4), uint16(391), uint16(1121), uint16(560), uint16(1538), uint16(335),
+ /* 1220 */ uint16(58), uint16(58), uint16(6), uint16(1246), uint16(1099), uint16(380), uint16(1400), uint16(376), uint16(558), uint16(1536),
+ /* 1230 */ uint16(563), uint16(422), uint16(1221), uint16(6), uint16(304), uint16(554), uint16(1176), uint16(1177), uint16(1178), uint16(1100),
/* 1240 */ uint16(119), uint16(119), uint16(119), uint16(119), uint16(118), uint16(118), uint16(117), uint16(117), uint16(117), uint16(116),
- /* 1250 */ uint16(441), uint16(442), uint16(278), uint16(551), uint16(563), uint16(273), uint16(273), uint16(273), uint16(273), uint16(563),
- /* 1260 */ uint16(327), uint16(45), uint16(45), uint16(552), uint16(563), uint16(528), uint16(422), uint16(563), uint16(560), uint16(1400),
- /* 1270 */ uint16(560), uint16(108), uint16(555), uint16(137), uint16(4), uint16(1303), uint16(46), uint16(46), uint16(335), uint16(563),
- /* 1280 */ uint16(482), uint16(47), uint16(47), uint16(477), uint16(479), uint16(307), uint16(49), uint16(49), uint16(558), uint16(50),
- /* 1290 */ uint16(50), uint16(563), uint16(1015), uint16(563), uint16(1221), uint16(563), uint16(1400), uint16(563), uint16(106), uint16(106),
- /* 1300 */ uint16(8), uint16(63), uint16(63), uint16(423), uint16(563), uint16(107), uint16(312), uint16(442), uint16(565), uint16(564),
- /* 1310 */ uint16(563), uint16(442), uint16(1005), uint16(64), uint16(64), uint16(65), uint16(65), uint16(14), uint16(14), uint16(66),
- /* 1320 */ uint16(66), uint16(391), uint16(1121), uint16(552), uint16(1312), uint16(1180), uint16(128), uint16(128), uint16(563), uint16(304),
- /* 1330 */ uint16(554), uint16(563), uint16(67), uint16(67), uint16(563), uint16(359), uint16(560), uint16(532), uint16(563), uint16(484),
- /* 1340 */ uint16(563), uint16(1196), uint16(531), uint16(222), uint16(1005), uint16(1005), uint16(1007), uint16(1008), uint16(27), uint16(522),
- /* 1350 */ uint16(52), uint16(52), uint16(1015), uint16(68), uint16(68), uint16(563), uint16(69), uint16(69), uint16(106), uint16(106),
- /* 1360 */ uint16(53), uint16(53), uint16(156), uint16(156), uint16(563), uint16(107), uint16(434), uint16(442), uint16(565), uint16(564),
- /* 1370 */ uint16(272), uint16(215), uint16(1005), uint16(425), uint16(563), uint16(359), uint16(563), uint16(157), uint16(157), uint16(563),
- /* 1380 */ uint16(1535), uint16(292), uint16(1180), uint16(98), uint16(6), uint16(1344), uint16(76), uint16(76), uint16(1215), uint16(475),
- /* 1390 */ uint16(413), uint16(169), uint16(226), uint16(563), uint16(245), uint16(563), uint16(54), uint16(54), uint16(72), uint16(72),
- /* 1400 */ uint16(1221), uint16(129), uint16(129), uint16(1343), uint16(1005), uint16(1005), uint16(1007), uint16(1008), uint16(27), uint16(1563),
- /* 1410 */ uint16(1165), uint16(444), uint16(456), uint16(433), uint16(277), uint16(73), uint16(73), uint16(130), uint16(130), uint16(389),
- /* 1420 */ uint16(389), uint16(388), uint16(262), uint16(386), uint16(1165), uint16(444), uint16(839), uint16(1519), uint16(277), uint16(108),
- /* 1430 */ uint16(555), uint16(321), uint16(4), uint16(389), uint16(389), uint16(388), uint16(262), uint16(386), uint16(563), uint16(223),
- /* 1440 */ uint16(839), uint16(311), uint16(468), uint16(84), uint16(202), uint16(523), uint16(558), uint16(1492), uint16(303), uint16(310),
- /* 1450 */ uint16(563), uint16(110), uint16(404), uint16(223), uint16(563), uint16(311), uint16(206), uint16(30), uint16(404), uint16(277),
- /* 1460 */ uint16(131), uint16(131), uint16(411), uint16(310), uint16(389), uint16(389), uint16(388), uint16(262), uint16(386), uint16(442),
- /* 1470 */ uint16(920), uint16(839), uint16(127), uint16(127), uint16(563), uint16(919), uint16(155), uint16(155), uint16(1491), uint16(225),
- /* 1480 */ uint16(563), uint16(552), uint16(871), uint16(563), uint16(223), uint16(476), uint16(311), uint16(161), uint16(31), uint16(563),
- /* 1490 */ uint16(135), uint16(563), uint16(480), uint16(225), uint16(310), uint16(532), uint16(154), uint16(154), uint16(332), uint16(17),
- /* 1500 */ uint16(533), uint16(161), uint16(136), uint16(136), uint16(135), uint16(134), uint16(134), uint16(224), uint16(228), uint16(355),
- /* 1510 */ uint16(1015), uint16(132), uint16(132), uint16(133), uint16(133), uint16(1589), uint16(106), uint16(106), uint16(889), uint16(354),
- /* 1520 */ uint16(563), uint16(224), uint16(563), uint16(107), uint16(225), uint16(442), uint16(565), uint16(564), uint16(1117), uint16(275),
- /* 1530 */ uint16(1005), uint16(393), uint16(161), uint16(518), uint16(563), uint16(135), uint16(108), uint16(555), uint16(417), uint16(4),
- /* 1540 */ uint16(1340), uint16(407), uint16(75), uint16(75), uint16(77), uint16(77), uint16(304), uint16(554), uint16(867), uint16(563),
- /* 1550 */ uint16(336), uint16(563), uint16(224), uint16(558), uint16(463), uint16(407), uint16(74), uint16(74), uint16(465), uint16(1065),
- /* 1560 */ uint16(304), uint16(554), uint16(1005), uint16(1005), uint16(1007), uint16(1008), uint16(27), uint16(962), uint16(963), uint16(543),
- /* 1570 */ uint16(448), uint16(42), uint16(42), uint16(48), uint16(48), uint16(326), uint16(442), uint16(325), uint16(98), uint16(997),
- /* 1580 */ uint16(470), uint16(287), uint16(250), uint16(250), uint16(448), uint16(1009), uint16(407), uint16(472), uint16(552), uint16(339),
- /* 1590 */ uint16(250), uint16(304), uint16(554), uint16(879), uint16(878), uint16(331), uint16(108), uint16(555), uint16(98), uint16(4),
- /* 1600 */ uint16(1277), uint16(494), uint16(532), uint16(345), uint16(247), uint16(867), uint16(98), uint16(531), uint16(341), uint16(886),
- /* 1610 */ uint16(887), uint16(1126), uint16(1076), uint16(558), uint16(1076), uint16(448), uint16(1065), uint16(1015), uint16(1061), uint16(953),
- /* 1620 */ uint16(343), uint16(247), uint16(250), uint16(106), uint16(106), uint16(1291), uint16(917), uint16(1276), uint16(850), uint16(110),
- /* 1630 */ uint16(107), uint16(144), uint16(442), uint16(565), uint16(564), uint16(918), uint16(442), uint16(1005), uint16(110), uint16(1275),
- /* 1640 */ uint16(350), uint16(360), uint16(1009), uint16(1331), uint16(1352), uint16(299), uint16(1399), uint16(1577), uint16(552), uint16(1327),
- /* 1650 */ uint16(1552), uint16(550), uint16(1338), uint16(549), uint16(1405), uint16(1256), uint16(1248), uint16(1237), uint16(1236), uint16(1238),
- /* 1660 */ uint16(1571), uint16(489), uint16(265), uint16(200), uint16(1324), uint16(363), uint16(365), uint16(367), uint16(11), uint16(1005),
- /* 1670 */ uint16(1005), uint16(1007), uint16(1008), uint16(27), uint16(390), uint16(221), uint16(1386), uint16(1015), uint16(280), uint16(1391),
- /* 1680 */ uint16(1381), uint16(208), uint16(323), uint16(106), uint16(106), uint16(924), uint16(1374), uint16(453), uint16(283), uint16(324),
- /* 1690 */ uint16(107), uint16(474), uint16(442), uint16(565), uint16(564), uint16(1390), uint16(499), uint16(1005), uint16(212), uint16(288),
- /* 1700 */ uint16(1274), uint16(397), uint16(353), uint16(108), uint16(555), uint16(195), uint16(4), uint16(1464), uint16(369), uint16(1463),
- /* 1710 */ uint16(1574), uint16(1215), uint16(1212), uint16(329), uint16(553), uint16(171), uint16(207), uint16(383), uint16(1511), uint16(196),
- /* 1720 */ uint16(558), uint16(254), uint16(1509), uint16(415), uint16(100), uint16(555), uint16(83), uint16(4), uint16(204), uint16(1005),
- /* 1730 */ uint16(1005), uint16(1007), uint16(1008), uint16(27), uint16(219), uint16(79), uint16(82), uint16(1469), uint16(180), uint16(166),
- /* 1740 */ uint16(173), uint16(558), uint16(458), uint16(442), uint16(175), uint16(176), uint16(177), uint16(178), uint16(35), uint16(1387),
- /* 1750 */ uint16(492), uint16(459), uint16(231), uint16(1395), uint16(96), uint16(552), uint16(1393), uint16(1392), uint16(395), uint16(184),
- /* 1760 */ uint16(481), uint16(466), uint16(36), uint16(235), uint16(442), uint16(89), uint16(398), uint16(266), uint16(487), uint16(1480),
- /* 1770 */ uint16(1458), uint16(237), uint16(188), uint16(338), uint16(508), uint16(429), uint16(552), uint16(490), uint16(400), uint16(238),
- /* 1780 */ uint16(334), uint16(1239), uint16(239), uint16(1294), uint16(1015), uint16(1293), uint16(1292), uint16(1285), uint16(91), uint16(871),
- /* 1790 */ uint16(106), uint16(106), uint16(213), uint16(431), uint16(1588), uint16(432), uint16(524), uint16(107), uint16(517), uint16(442),
- /* 1800 */ uint16(565), uint16(564), uint16(401), uint16(1264), uint16(1005), uint16(1015), uint16(1263), uint16(1587), uint16(352), uint16(1262),
- /* 1810 */ uint16(1557), uint16(106), uint16(106), uint16(1586), uint16(1284), uint16(297), uint16(298), uint16(358), uint16(107), uint16(1335),
- /* 1820 */ uint16(442), uint16(565), uint16(564), uint16(95), uint16(362), uint16(1005), uint16(253), uint16(252), uint16(435), uint16(125),
- /* 1830 */ uint16(543), uint16(10), uint16(1444), uint16(1543), uint16(377), uint16(1542), uint16(1005), uint16(1005), uint16(1007), uint16(1008),
- /* 1840 */ uint16(27), uint16(302), uint16(102), uint16(97), uint16(527), uint16(1336), uint16(260), uint16(1317), uint16(364), uint16(1245),
- /* 1850 */ uint16(1334), uint16(34), uint16(566), uint16(1171), uint16(366), uint16(381), uint16(375), uint16(1005), uint16(1005), uint16(1007),
- /* 1860 */ uint16(1008), uint16(27), uint16(1333), uint16(1359), uint16(368), uint16(1316), uint16(199), uint16(382), uint16(261), uint16(263),
- /* 1870 */ uint16(264), uint16(1358), uint16(158), uint16(1496), uint16(141), uint16(1497), uint16(1495), uint16(567), uint16(1234), uint16(1229),
- /* 1880 */ uint16(1494), uint16(295), uint16(159), uint16(209), uint16(210), uint16(78), uint16(826), uint16(443), uint16(201), uint16(306),
- /* 1890 */ uint16(220), uint16(1075), uint16(138), uint16(1073), uint16(160), uint16(314), uint16(162), uint16(172), uint16(1196), uint16(174),
- /* 1900 */ uint16(903), uint16(227), uint16(230), uint16(322), uint16(1089), uint16(179), uint16(163), uint16(164), uint16(418), uint16(85),
- /* 1910 */ uint16(420), uint16(181), uint16(170), uint16(408), uint16(409), uint16(86), uint16(87), uint16(165), uint16(88), uint16(1092),
- /* 1920 */ uint16(232), uint16(233), uint16(1088), uint16(151), uint16(18), uint16(234), uint16(1081), uint16(250), uint16(333), uint16(185),
- /* 1930 */ uint16(1209), uint16(486), uint16(236), uint16(186), uint16(37), uint16(841), uint16(491), uint16(354), uint16(240), uint16(346),
- /* 1940 */ uint16(503), uint16(187), uint16(90), uint16(167), uint16(19), uint16(495), uint16(20), uint16(869), uint16(500), uint16(349),
- /* 1950 */ uint16(92), uint16(882), uint16(296), uint16(152), uint16(93), uint16(510), uint16(1127), uint16(1159), uint16(153), uint16(1041),
- /* 1960 */ uint16(214), uint16(1128), uint16(39), uint16(94), uint16(269), uint16(271), uint16(952), uint16(190), uint16(947), uint16(110),
- /* 1970 */ uint16(1149), uint16(1145), uint16(1153), uint16(249), uint16(1133), uint16(1147), uint16(7), uint16(33), uint16(21), uint16(193),
- /* 1980 */ uint16(22), uint16(23), uint16(24), uint16(25), uint16(1152), uint16(539), uint16(98), uint16(1056), uint16(26), uint16(1042),
- /* 1990 */ uint16(1040), uint16(1044), uint16(1098), uint16(1045), uint16(1097), uint16(256), uint16(255), uint16(28), uint16(40), uint16(387),
- /* 2000 */ uint16(1010), uint16(851), uint16(109), uint16(29), uint16(1167), uint16(559), uint16(384), uint16(257), uint16(913), uint16(258),
- /* 2010 */ uint16(1166), uint16(1579), uint16(1225), uint16(1225), uint16(1225), uint16(1225), uint16(1225), uint16(1225), uint16(1225), uint16(1578),
-} /* sqlite3.c:157580:27 */
-var yy_lookahead = [2203]uint16{
- /* 0 */ uint16(191), uint16(220), uint16(191), uint16(222), uint16(191), uint16(191), uint16(271), uint16(272), uint16(273), uint16(216),
- /* 10 */ uint16(191), uint16(230), uint16(216), uint16(191), uint16(191), uint16(191), uint16(271), uint16(272), uint16(273), uint16(19),
- /* 20 */ uint16(232), uint16(233), uint16(213), uint16(214), uint16(213), uint16(214), uint16(202), uint16(292), uint16(202), uint16(232),
- /* 30 */ uint16(233), uint16(31), uint16(213), uint16(214), uint16(213), uint16(213), uint16(214), uint16(213), uint16(214), uint16(39),
- /* 40 */ uint16(207), uint16(208), uint16(209), uint16(43), uint16(44), uint16(45), uint16(46), uint16(47), uint16(48), uint16(49),
- /* 50 */ uint16(50), uint16(51), uint16(52), uint16(53), uint16(54), uint16(55), uint16(56), uint16(57), uint16(235), uint16(19),
- /* 60 */ uint16(236), uint16(237), uint16(236), uint16(237), uint16(271), uint16(272), uint16(273), uint16(271), uint16(272), uint16(273),
- /* 70 */ uint16(191), uint16(210), uint16(250), uint16(249), uint16(250), uint16(249), uint16(213), uint16(191), uint16(199), uint16(253),
- /* 80 */ uint16(254), uint16(259), uint16(203), uint16(43), uint16(44), uint16(45), uint16(46), uint16(47), uint16(48), uint16(49),
- /* 90 */ uint16(50), uint16(51), uint16(52), uint16(53), uint16(54), uint16(55), uint16(56), uint16(57), uint16(191), uint16(213),
- /* 100 */ uint16(214), uint16(213), uint16(102), uint16(103), uint16(104), uint16(105), uint16(106), uint16(107), uint16(108), uint16(109),
- /* 110 */ uint16(110), uint16(111), uint16(112), uint16(59), uint16(228), uint16(301), uint16(293), uint16(81), uint16(305), uint16(306),
- /* 120 */ uint16(311), uint16(312), uint16(311), uint16(310), uint16(313), uint16(59), uint16(86), uint16(212), uint16(88), uint16(19),
- /* 130 */ uint16(311), uint16(312), uint16(271), uint16(272), uint16(273), uint16(220), uint16(26), uint16(112), uint16(54), uint16(55),
+ /* 1250 */ uint16(441), uint16(442), uint16(59), uint16(59), uint16(1101), uint16(516), uint16(1535), uint16(273), uint16(273), uint16(563),
+ /* 1260 */ uint16(6), uint16(563), uint16(110), uint16(552), uint16(563), uint16(528), uint16(423), uint16(413), uint16(169), uint16(548),
+ /* 1270 */ uint16(560), uint16(108), uint16(555), uint16(137), uint16(4), uint16(551), uint16(484), uint16(272), uint16(215), uint16(222),
+ /* 1280 */ uint16(211), uint16(60), uint16(60), uint16(61), uint16(61), uint16(98), uint16(62), uint16(62), uint16(558), uint16(273),
+ /* 1290 */ uint16(273), uint16(563), uint16(1015), uint16(467), uint16(1221), uint16(563), uint16(434), uint16(563), uint16(106), uint16(106),
+ /* 1300 */ uint16(8), uint16(920), uint16(560), uint16(273), uint16(273), uint16(107), uint16(919), uint16(442), uint16(565), uint16(564),
+ /* 1310 */ uint16(563), uint16(442), uint16(1005), uint16(45), uint16(45), uint16(464), uint16(560), uint16(46), uint16(46), uint16(47),
+ /* 1320 */ uint16(47), uint16(84), uint16(202), uint16(552), uint16(1215), uint16(404), uint16(468), uint16(563), uint16(205), uint16(304),
+ /* 1330 */ uint16(554), uint16(563), uint16(49), uint16(49), uint16(563), uint16(522), uint16(404), uint16(532), uint16(563), uint16(867),
+ /* 1340 */ uint16(563), uint16(105), uint16(531), uint16(103), uint16(1005), uint16(1005), uint16(1007), uint16(1008), uint16(27), uint16(50),
+ /* 1350 */ uint16(50), uint16(563), uint16(1015), uint16(63), uint16(63), uint16(475), uint16(64), uint16(64), uint16(106), uint16(106),
+ /* 1360 */ uint16(65), uint16(65), uint16(14), uint16(14), uint16(17), uint16(107), uint16(563), uint16(442), uint16(565), uint16(564),
+ /* 1370 */ uint16(563), uint16(303), uint16(1005), uint16(66), uint16(66), uint16(563), uint16(226), uint16(563), uint16(959), uint16(563),
+ /* 1380 */ uint16(543), uint16(404), uint16(1196), uint16(1343), uint16(871), uint16(278), uint16(960), uint16(456), uint16(128), uint16(128),
+ /* 1390 */ uint16(563), uint16(1065), uint16(67), uint16(67), uint16(563), uint16(206), uint16(867), uint16(52), uint16(52), uint16(68),
+ /* 1400 */ uint16(68), uint16(69), uint16(69), uint16(417), uint16(1005), uint16(1005), uint16(1007), uint16(1008), uint16(27), uint16(1563),
+ /* 1410 */ uint16(1165), uint16(444), uint16(53), uint16(53), uint16(277), uint16(1519), uint16(156), uint16(156), uint16(307), uint16(389),
+ /* 1420 */ uint16(389), uint16(388), uint16(262), uint16(386), uint16(1165), uint16(444), uint16(839), uint16(321), uint16(277), uint16(108),
+ /* 1430 */ uint16(555), uint16(523), uint16(4), uint16(389), uint16(389), uint16(388), uint16(262), uint16(386), uint16(563), uint16(223),
+ /* 1440 */ uint16(839), uint16(311), uint16(326), uint16(1492), uint16(1117), uint16(98), uint16(558), uint16(393), uint16(1065), uint16(310),
+ /* 1450 */ uint16(563), uint16(476), uint16(563), uint16(223), uint16(563), uint16(311), uint16(879), uint16(878), uint16(1009), uint16(277),
+ /* 1460 */ uint16(157), uint16(157), uint16(463), uint16(310), uint16(389), uint16(389), uint16(388), uint16(262), uint16(386), uint16(442),
+ /* 1470 */ uint16(518), uint16(839), uint16(76), uint16(76), uint16(54), uint16(54), uint16(72), uint16(72), uint16(355), uint16(225),
+ /* 1480 */ uint16(563), uint16(552), uint16(275), uint16(563), uint16(223), uint16(325), uint16(311), uint16(161), uint16(354), uint16(465),
+ /* 1490 */ uint16(135), uint16(563), uint16(228), uint16(225), uint16(310), uint16(532), uint16(563), uint16(206), uint16(886), uint16(887),
+ /* 1500 */ uint16(533), uint16(161), uint16(129), uint16(129), uint16(135), uint16(73), uint16(73), uint16(224), uint16(962), uint16(963),
+ /* 1510 */ uint16(1015), uint16(563), uint16(287), uint16(130), uint16(130), uint16(1009), uint16(106), uint16(106), uint16(131), uint16(131),
+ /* 1520 */ uint16(563), uint16(224), uint16(563), uint16(107), uint16(225), uint16(442), uint16(565), uint16(564), uint16(997), uint16(1276),
+ /* 1530 */ uint16(1005), uint16(250), uint16(161), uint16(127), uint16(127), uint16(135), uint16(108), uint16(555), uint16(1077), uint16(4),
+ /* 1540 */ uint16(1077), uint16(407), uint16(155), uint16(155), uint16(154), uint16(154), uint16(304), uint16(554), uint16(1126), uint16(563),
+ /* 1550 */ uint16(1331), uint16(563), uint16(224), uint16(558), uint16(470), uint16(407), uint16(563), uint16(250), uint16(563), uint16(1491),
+ /* 1560 */ uint16(304), uint16(554), uint16(1005), uint16(1005), uint16(1007), uint16(1008), uint16(27), uint16(563), uint16(480), uint16(332),
+ /* 1570 */ uint16(448), uint16(136), uint16(136), uint16(134), uint16(134), uint16(1340), uint16(442), uint16(336), uint16(132), uint16(132),
+ /* 1580 */ uint16(133), uint16(133), uint16(563), uint16(1076), uint16(448), uint16(1076), uint16(407), uint16(563), uint16(552), uint16(75),
+ /* 1590 */ uint16(75), uint16(304), uint16(554), uint16(339), uint16(341), uint16(343), uint16(108), uint16(555), uint16(563), uint16(4),
+ /* 1600 */ uint16(1577), uint16(299), uint16(532), uint16(563), uint16(77), uint16(77), uint16(1291), uint16(531), uint16(472), uint16(74),
+ /* 1610 */ uint16(74), uint16(250), uint16(1275), uint16(558), uint16(350), uint16(448), uint16(331), uint16(1015), uint16(360), uint16(98),
+ /* 1620 */ uint16(42), uint16(42), uint16(1352), uint16(106), uint16(106), uint16(48), uint16(48), uint16(1399), uint16(494), uint16(1327),
+ /* 1630 */ uint16(107), uint16(247), uint16(442), uint16(565), uint16(564), uint16(345), uint16(442), uint16(1005), uint16(98), uint16(1061),
+ /* 1640 */ uint16(953), uint16(917), uint16(247), uint16(250), uint16(110), uint16(1552), uint16(550), uint16(850), uint16(552), uint16(918),
+ /* 1650 */ uint16(144), uint16(1338), uint16(110), uint16(549), uint16(1405), uint16(1256), uint16(1248), uint16(1237), uint16(1236), uint16(1238),
+ /* 1660 */ uint16(1571), uint16(1324), uint16(208), uint16(390), uint16(489), uint16(265), uint16(363), uint16(200), uint16(365), uint16(1005),
+ /* 1670 */ uint16(1005), uint16(1007), uint16(1008), uint16(27), uint16(11), uint16(280), uint16(221), uint16(1015), uint16(323), uint16(474),
+ /* 1680 */ uint16(1274), uint16(367), uint16(212), uint16(106), uint16(106), uint16(924), uint16(1386), uint16(324), uint16(288), uint16(1381),
+ /* 1690 */ uint16(107), uint16(453), uint16(442), uint16(565), uint16(564), uint16(283), uint16(329), uint16(1005), uint16(1391), uint16(499),
+ /* 1700 */ uint16(353), uint16(1374), uint16(1464), uint16(108), uint16(555), uint16(1463), uint16(4), uint16(1574), uint16(1390), uint16(397),
+ /* 1710 */ uint16(1215), uint16(171), uint16(254), uint16(369), uint16(383), uint16(207), uint16(195), uint16(196), uint16(1511), uint16(553),
+ /* 1720 */ uint16(558), uint16(1509), uint16(415), uint16(1212), uint16(100), uint16(555), uint16(83), uint16(4), uint16(204), uint16(1005),
+ /* 1730 */ uint16(1005), uint16(1007), uint16(1008), uint16(27), uint16(180), uint16(166), uint16(173), uint16(219), uint16(79), uint16(82),
+ /* 1740 */ uint16(458), uint16(558), uint16(175), uint16(442), uint16(35), uint16(1387), uint16(176), uint16(459), uint16(177), uint16(178),
+ /* 1750 */ uint16(492), uint16(231), uint16(96), uint16(1469), uint16(395), uint16(552), uint16(1393), uint16(1392), uint16(36), uint16(466),
+ /* 1760 */ uint16(1395), uint16(184), uint16(398), uint16(481), uint16(442), uint16(1458), uint16(235), uint16(89), uint16(1480), uint16(487),
+ /* 1770 */ uint16(266), uint16(334), uint16(237), uint16(188), uint16(490), uint16(400), uint16(552), uint16(338), uint16(238), uint16(508),
+ /* 1780 */ uint16(1239), uint16(239), uint16(1294), uint16(1293), uint16(1015), uint16(1292), uint16(1285), uint16(429), uint16(91), uint16(871),
+ /* 1790 */ uint16(106), uint16(106), uint16(1588), uint16(213), uint16(401), uint16(1587), uint16(431), uint16(107), uint16(1264), uint16(442),
+ /* 1800 */ uint16(565), uint16(564), uint16(1263), uint16(352), uint16(1005), uint16(1015), uint16(1262), uint16(1586), uint16(1557), uint16(517),
+ /* 1810 */ uint16(432), uint16(106), uint16(106), uint16(1284), uint16(297), uint16(298), uint16(358), uint16(524), uint16(107), uint16(1335),
+ /* 1820 */ uint16(442), uint16(565), uint16(564), uint16(95), uint16(1336), uint16(1005), uint16(252), uint16(253), uint16(435), uint16(125),
+ /* 1830 */ uint16(543), uint16(1543), uint16(10), uint16(1444), uint16(377), uint16(1542), uint16(1005), uint16(1005), uint16(1007), uint16(1008),
+ /* 1840 */ uint16(27), uint16(97), uint16(527), uint16(375), uint16(362), uint16(102), uint16(260), uint16(364), uint16(381), uint16(1317),
+ /* 1850 */ uint16(382), uint16(1334), uint16(366), uint16(1245), uint16(1333), uint16(1316), uint16(368), uint16(1005), uint16(1005), uint16(1007),
+ /* 1860 */ uint16(1008), uint16(27), uint16(1359), uint16(1358), uint16(34), uint16(199), uint16(1171), uint16(566), uint16(261), uint16(263),
+ /* 1870 */ uint16(264), uint16(567), uint16(1234), uint16(158), uint16(1229), uint16(141), uint16(295), uint16(159), uint16(1496), uint16(302),
+ /* 1880 */ uint16(1497), uint16(1495), uint16(1494), uint16(160), uint16(826), uint16(209), uint16(443), uint16(201), uint16(306), uint16(210),
+ /* 1890 */ uint16(78), uint16(220), uint16(1075), uint16(138), uint16(1073), uint16(314), uint16(162), uint16(172), uint16(1196), uint16(227),
+ /* 1900 */ uint16(174), uint16(903), uint16(322), uint16(230), uint16(1089), uint16(179), uint16(163), uint16(164), uint16(418), uint16(408),
+ /* 1910 */ uint16(409), uint16(170), uint16(181), uint16(85), uint16(86), uint16(420), uint16(87), uint16(165), uint16(1092), uint16(88),
+ /* 1920 */ uint16(233), uint16(232), uint16(1088), uint16(151), uint16(18), uint16(234), uint16(1081), uint16(250), uint16(333), uint16(1209),
+ /* 1930 */ uint16(185), uint16(486), uint16(236), uint16(186), uint16(37), uint16(841), uint16(491), uint16(354), uint16(240), uint16(346),
+ /* 1940 */ uint16(495), uint16(187), uint16(90), uint16(869), uint16(19), uint16(20), uint16(500), uint16(503), uint16(349), uint16(92),
+ /* 1950 */ uint16(167), uint16(152), uint16(296), uint16(882), uint16(93), uint16(510), uint16(94), uint16(1159), uint16(153), uint16(1041),
+ /* 1960 */ uint16(1128), uint16(39), uint16(214), uint16(269), uint16(1127), uint16(271), uint16(249), uint16(952), uint16(190), uint16(947),
+ /* 1970 */ uint16(110), uint16(1149), uint16(21), uint16(7), uint16(1153), uint16(22), uint16(1145), uint16(23), uint16(1147), uint16(24),
+ /* 1980 */ uint16(1133), uint16(25), uint16(1152), uint16(33), uint16(539), uint16(193), uint16(26), uint16(1056), uint16(98), uint16(1042),
+ /* 1990 */ uint16(1040), uint16(1044), uint16(1098), uint16(1045), uint16(1097), uint16(256), uint16(255), uint16(28), uint16(40), uint16(257),
+ /* 2000 */ uint16(1010), uint16(851), uint16(109), uint16(29), uint16(913), uint16(559), uint16(384), uint16(387), uint16(258), uint16(1167),
+ /* 2010 */ uint16(1166), uint16(1225), uint16(1225), uint16(1225), uint16(1579), uint16(1225), uint16(1225), uint16(1225), uint16(1225), uint16(1225),
+ /* 2020 */ uint16(1225), uint16(1225), uint16(1578),
+} /* sqlite3.c:158588:27 */
+var yy_lookahead = [2207]uint16{
+ /* 0 */ uint16(192), uint16(221), uint16(192), uint16(223), uint16(192), uint16(214), uint16(272), uint16(273), uint16(274), uint16(217),
+ /* 10 */ uint16(192), uint16(231), uint16(217), uint16(192), uint16(192), uint16(192), uint16(272), uint16(273), uint16(274), uint16(19),
+ /* 20 */ uint16(233), uint16(234), uint16(214), uint16(215), uint16(214), uint16(215), uint16(203), uint16(293), uint16(203), uint16(233),
+ /* 30 */ uint16(234), uint16(31), uint16(214), uint16(215), uint16(214), uint16(214), uint16(215), uint16(214), uint16(215), uint16(39),
+ /* 40 */ uint16(208), uint16(209), uint16(210), uint16(43), uint16(44), uint16(45), uint16(46), uint16(47), uint16(48), uint16(49),
+ /* 50 */ uint16(50), uint16(51), uint16(52), uint16(53), uint16(54), uint16(55), uint16(56), uint16(57), uint16(236), uint16(19),
+ /* 60 */ uint16(237), uint16(238), uint16(237), uint16(238), uint16(272), uint16(273), uint16(274), uint16(272), uint16(273), uint16(274),
+ /* 70 */ uint16(192), uint16(211), uint16(251), uint16(250), uint16(251), uint16(250), uint16(26), uint16(192), uint16(200), uint16(254),
+ /* 80 */ uint16(255), uint16(260), uint16(204), uint16(43), uint16(44), uint16(45), uint16(46), uint16(47), uint16(48), uint16(49),
+ /* 90 */ uint16(50), uint16(51), uint16(52), uint16(53), uint16(54), uint16(55), uint16(56), uint16(57), uint16(192), uint16(214),
+ /* 100 */ uint16(215), uint16(214), uint16(102), uint16(103), uint16(104), uint16(105), uint16(106), uint16(107), uint16(108), uint16(109),
+ /* 110 */ uint16(110), uint16(111), uint16(112), uint16(59), uint16(229), uint16(192), uint16(294), uint16(16), uint16(306), uint16(307),
+ /* 120 */ uint16(312), uint16(313), uint16(312), uint16(311), uint16(314), uint16(59), uint16(86), uint16(204), uint16(88), uint16(19),
+ /* 130 */ uint16(312), uint16(313), uint16(272), uint16(273), uint16(274), uint16(271), uint16(26), uint16(22), uint16(54), uint16(55),
/* 140 */ uint16(56), uint16(57), uint16(102), uint16(103), uint16(104), uint16(105), uint16(106), uint16(107), uint16(108), uint16(109),
/* 150 */ uint16(110), uint16(111), uint16(112), uint16(43), uint16(44), uint16(45), uint16(46), uint16(47), uint16(48), uint16(49),
- /* 160 */ uint16(50), uint16(51), uint16(52), uint16(53), uint16(54), uint16(55), uint16(56), uint16(57), uint16(191), uint16(115),
- /* 170 */ uint16(116), uint16(117), uint16(118), uint16(137), uint16(138), uint16(121), uint16(122), uint16(123), uint16(191), uint16(69),
- /* 180 */ uint16(203), uint16(115), uint16(116), uint16(117), uint16(59), uint16(131), uint16(102), uint16(103), uint16(104), uint16(105),
- /* 190 */ uint16(106), uint16(107), uint16(108), uint16(109), uint16(110), uint16(111), uint16(112), uint16(72), uint16(191), uint16(19),
+ /* 160 */ uint16(50), uint16(51), uint16(52), uint16(53), uint16(54), uint16(55), uint16(56), uint16(57), uint16(53), uint16(115),
+ /* 170 */ uint16(116), uint16(117), uint16(118), uint16(309), uint16(310), uint16(121), uint16(122), uint16(123), uint16(77), uint16(69),
+ /* 180 */ uint16(79), uint16(115), uint16(116), uint16(117), uint16(59), uint16(131), uint16(102), uint16(103), uint16(104), uint16(105),
+ /* 190 */ uint16(106), uint16(107), uint16(108), uint16(109), uint16(110), uint16(111), uint16(112), uint16(72), uint16(148), uint16(19),
/* 200 */ uint16(54), uint16(55), uint16(56), uint16(57), uint16(58), uint16(108), uint16(109), uint16(110), uint16(111), uint16(112),
- /* 210 */ uint16(303), uint16(304), uint16(102), uint16(103), uint16(104), uint16(105), uint16(106), uint16(107), uint16(108), uint16(109),
+ /* 210 */ uint16(304), uint16(305), uint16(102), uint16(103), uint16(104), uint16(105), uint16(106), uint16(107), uint16(108), uint16(109),
/* 220 */ uint16(110), uint16(111), uint16(112), uint16(43), uint16(44), uint16(45), uint16(46), uint16(47), uint16(48), uint16(49),
- /* 230 */ uint16(50), uint16(51), uint16(52), uint16(53), uint16(54), uint16(55), uint16(56), uint16(57), uint16(19), uint16(16),
- /* 240 */ uint16(115), uint16(116), uint16(117), uint16(24), uint16(16), uint16(227), uint16(202), uint16(67), uint16(102), uint16(103),
- /* 250 */ uint16(104), uint16(105), uint16(106), uint16(107), uint16(108), uint16(109), uint16(110), uint16(111), uint16(112), uint16(59),
- /* 260 */ uint16(26), uint16(191), uint16(43), uint16(44), uint16(45), uint16(46), uint16(47), uint16(48), uint16(49), uint16(50),
- /* 270 */ uint16(51), uint16(52), uint16(53), uint16(54), uint16(55), uint16(56), uint16(57), uint16(24), uint16(208), uint16(209),
- /* 280 */ uint16(236), uint16(237), uint16(102), uint16(103), uint16(104), uint16(105), uint16(106), uint16(107), uint16(108), uint16(109),
- /* 290 */ uint16(110), uint16(111), uint16(112), uint16(249), uint16(183), uint16(184), uint16(185), uint16(186), uint16(187), uint16(188),
- /* 300 */ uint16(77), uint16(59), uint16(79), uint16(191), uint16(193), uint16(77), uint16(195), uint16(79), uint16(19), uint16(19),
- /* 310 */ uint16(266), uint16(304), uint16(59), uint16(202), uint16(24), uint16(115), uint16(116), uint16(117), uint16(191), uint16(127),
+ /* 230 */ uint16(50), uint16(51), uint16(52), uint16(53), uint16(54), uint16(55), uint16(56), uint16(57), uint16(19), uint16(112),
+ /* 240 */ uint16(115), uint16(116), uint16(117), uint16(24), uint16(208), uint16(209), uint16(210), uint16(67), uint16(102), uint16(103),
+ /* 250 */ uint16(104), uint16(105), uint16(106), uint16(107), uint16(108), uint16(109), uint16(110), uint16(111), uint16(112), uint16(192),
+ /* 260 */ uint16(59), uint16(160), uint16(43), uint16(44), uint16(45), uint16(46), uint16(47), uint16(48), uint16(49), uint16(50),
+ /* 270 */ uint16(51), uint16(52), uint16(53), uint16(54), uint16(55), uint16(56), uint16(57), uint16(19), uint16(46), uint16(47),
+ /* 280 */ uint16(48), uint16(49), uint16(102), uint16(103), uint16(104), uint16(105), uint16(106), uint16(107), uint16(108), uint16(109),
+ /* 290 */ uint16(110), uint16(111), uint16(112), uint16(213), uint16(73), uint16(184), uint16(185), uint16(186), uint16(187), uint16(188),
+ /* 300 */ uint16(189), uint16(221), uint16(81), uint16(236), uint16(46), uint16(194), uint16(192), uint16(196), uint16(19), uint16(59),
+ /* 310 */ uint16(133), uint16(59), uint16(135), uint16(136), uint16(203), uint16(192), uint16(115), uint16(116), uint16(117), uint16(127),
/* 320 */ uint16(128), uint16(102), uint16(103), uint16(104), uint16(105), uint16(106), uint16(107), uint16(108), uint16(109), uint16(110),
/* 330 */ uint16(111), uint16(112), uint16(43), uint16(44), uint16(45), uint16(46), uint16(47), uint16(48), uint16(49), uint16(50),
- /* 340 */ uint16(51), uint16(52), uint16(53), uint16(54), uint16(55), uint16(56), uint16(57), uint16(236), uint16(237), uint16(191),
- /* 350 */ uint16(150), uint16(281), uint16(191), uint16(185), uint16(186), uint16(187), uint16(188), uint16(115), uint16(116), uint16(117),
- /* 360 */ uint16(249), uint16(193), uint16(191), uint16(195), uint16(26), uint16(73), uint16(59), uint16(191), uint16(114), uint16(116),
- /* 370 */ uint16(202), uint16(213), uint16(214), uint16(81), uint16(263), uint16(106), uint16(107), uint16(108), uint16(109), uint16(110),
- /* 380 */ uint16(111), uint16(112), uint16(148), uint16(160), uint16(142), uint16(95), uint16(228), uint16(191), uint16(191), uint16(213),
- /* 390 */ uint16(214), uint16(102), uint16(103), uint16(104), uint16(105), uint16(106), uint16(107), uint16(108), uint16(109), uint16(110),
- /* 400 */ uint16(111), uint16(112), uint16(112), uint16(149), uint16(236), uint16(237), uint16(295), uint16(100), uint16(118), uint16(119),
- /* 410 */ uint16(120), uint16(121), uint16(122), uint16(123), uint16(124), uint16(19), uint16(31), uint16(249), uint16(126), uint16(23),
- /* 420 */ uint16(130), uint16(260), uint16(115), uint16(116), uint16(39), uint16(22), uint16(250), uint16(120), uint16(191), uint16(137),
- /* 430 */ uint16(138), uint16(263), uint16(305), uint16(306), uint16(238), uint16(259), uint16(265), uint16(310), uint16(149), uint16(43),
+ /* 340 */ uint16(51), uint16(52), uint16(53), uint16(54), uint16(55), uint16(56), uint16(57), uint16(126), uint16(237), uint16(238),
+ /* 350 */ uint16(100), uint16(150), uint16(120), uint16(230), uint16(186), uint16(187), uint16(188), uint16(189), uint16(137), uint16(138),
+ /* 360 */ uint16(108), uint16(250), uint16(194), uint16(26), uint16(196), uint16(115), uint16(116), uint16(115), uint16(116), uint16(117),
+ /* 370 */ uint16(120), uint16(203), uint16(114), uint16(164), uint16(165), uint16(264), uint16(102), uint16(103), uint16(104), uint16(105),
+ /* 380 */ uint16(106), uint16(107), uint16(108), uint16(109), uint16(110), uint16(111), uint16(112), uint16(192), uint16(130), uint16(111),
+ /* 390 */ uint16(112), uint16(102), uint16(103), uint16(104), uint16(105), uint16(106), uint16(107), uint16(108), uint16(109), uint16(110),
+ /* 400 */ uint16(111), uint16(112), uint16(152), uint16(153), uint16(154), uint16(237), uint16(238), uint16(296), uint16(192), uint16(214),
+ /* 410 */ uint16(215), uint16(228), uint16(192), uint16(307), uint16(192), uint16(19), uint16(59), uint16(311), uint16(250), uint16(23),
+ /* 420 */ uint16(22), uint16(106), uint16(107), uint16(108), uint16(109), uint16(110), uint16(111), uint16(112), uint16(192), uint16(72),
+ /* 430 */ uint16(214), uint16(215), uint16(264), uint16(192), uint16(214), uint16(215), uint16(214), uint16(215), uint16(149), uint16(43),
/* 440 */ uint16(44), uint16(45), uint16(46), uint16(47), uint16(48), uint16(49), uint16(50), uint16(51), uint16(52), uint16(53),
- /* 450 */ uint16(54), uint16(55), uint16(56), uint16(57), uint16(191), uint16(117), uint16(191), uint16(210), uint16(19), uint16(152),
- /* 460 */ uint16(153), uint16(154), uint16(23), uint16(295), uint16(102), uint16(103), uint16(104), uint16(105), uint16(106), uint16(107),
- /* 470 */ uint16(108), uint16(109), uint16(110), uint16(111), uint16(112), uint16(266), uint16(213), uint16(214), uint16(213), uint16(214),
- /* 480 */ uint16(142), uint16(81), uint16(43), uint16(44), uint16(45), uint16(46), uint16(47), uint16(48), uint16(49), uint16(50),
- /* 490 */ uint16(51), uint16(52), uint16(53), uint16(54), uint16(55), uint16(56), uint16(57), uint16(301), uint16(102), uint16(103),
- /* 500 */ uint16(104), uint16(105), uint16(106), uint16(107), uint16(108), uint16(109), uint16(110), uint16(111), uint16(112), uint16(106),
- /* 510 */ uint16(107), uint16(118), uint16(59), uint16(250), uint16(121), uint16(122), uint16(123), uint16(280), uint16(76), uint16(119),
- /* 520 */ uint16(236), uint16(237), uint16(259), uint16(306), uint16(131), uint16(72), uint16(59), uint16(310), uint16(19), uint16(87),
- /* 530 */ uint16(283), uint16(89), uint16(23), uint16(249), uint16(92), uint16(288), uint16(22), uint16(137), uint16(138), uint16(22),
- /* 540 */ uint16(275), uint16(102), uint16(103), uint16(104), uint16(105), uint16(106), uint16(107), uint16(108), uint16(109), uint16(110),
+ /* 450 */ uint16(54), uint16(55), uint16(56), uint16(57), uint16(117), uint16(214), uint16(215), uint16(59), uint16(19), uint16(187),
+ /* 460 */ uint16(192), uint16(189), uint16(23), uint16(81), uint16(296), uint16(192), uint16(194), uint16(251), uint16(196), uint16(59),
+ /* 470 */ uint16(229), uint16(251), uint16(115), uint16(116), uint16(117), uint16(203), uint16(260), uint16(106), uint16(107), uint16(142),
+ /* 480 */ uint16(260), uint16(267), uint16(43), uint16(44), uint16(45), uint16(46), uint16(47), uint16(48), uint16(49), uint16(50),
+ /* 490 */ uint16(51), uint16(52), uint16(53), uint16(54), uint16(55), uint16(56), uint16(57), uint16(261), uint16(102), uint16(103),
+ /* 500 */ uint16(104), uint16(105), uint16(106), uint16(107), uint16(108), uint16(109), uint16(110), uint16(111), uint16(112), uint16(237),
+ /* 510 */ uint16(238), uint16(76), uint16(192), uint16(115), uint16(116), uint16(117), uint16(144), uint16(192), uint16(76), uint16(137),
+ /* 520 */ uint16(138), uint16(192), uint16(250), uint16(152), uint16(89), uint16(154), uint16(116), uint16(92), uint16(19), uint16(87),
+ /* 530 */ uint16(262), uint16(89), uint16(23), uint16(22), uint16(92), uint16(163), uint16(264), uint16(192), uint16(22), uint16(214),
+ /* 540 */ uint16(215), uint16(102), uint16(103), uint16(104), uint16(105), uint16(106), uint16(107), uint16(108), uint16(109), uint16(110),
/* 550 */ uint16(111), uint16(112), uint16(43), uint16(44), uint16(45), uint16(46), uint16(47), uint16(48), uint16(49), uint16(50),
- /* 560 */ uint16(51), uint16(52), uint16(53), uint16(54), uint16(55), uint16(56), uint16(57), uint16(19), uint16(115), uint16(116),
- /* 570 */ uint16(117), uint16(23), uint16(186), uint16(59), uint16(188), uint16(108), uint16(59), uint16(241), uint16(191), uint16(193),
- /* 580 */ uint16(26), uint16(195), uint16(115), uint16(116), uint16(117), uint16(191), uint16(144), uint16(251), uint16(202), uint16(22),
+ /* 560 */ uint16(51), uint16(52), uint16(53), uint16(54), uint16(55), uint16(56), uint16(57), uint16(19), uint16(296), uint16(118),
+ /* 570 */ uint16(59), uint16(23), uint16(121), uint16(122), uint16(123), uint16(59), uint16(251), uint16(26), uint16(46), uint16(306),
+ /* 580 */ uint16(307), uint16(261), uint16(131), uint16(192), uint16(311), uint16(192), uint16(144), uint16(192), uint16(22), uint16(203),
/* 590 */ uint16(100), uint16(43), uint16(44), uint16(45), uint16(46), uint16(47), uint16(48), uint16(49), uint16(50), uint16(51),
- /* 600 */ uint16(52), uint16(53), uint16(54), uint16(55), uint16(56), uint16(57), uint16(116), uint16(213), uint16(214), uint16(191),
+ /* 600 */ uint16(52), uint16(53), uint16(54), uint16(55), uint16(56), uint16(57), uint16(116), uint16(214), uint16(215), uint16(271),
/* 610 */ uint16(120), uint16(102), uint16(103), uint16(104), uint16(105), uint16(106), uint16(107), uint16(108), uint16(109), uint16(110),
- /* 620 */ uint16(111), uint16(112), uint16(236), uint16(237), uint16(306), uint16(238), uint16(59), uint16(26), uint16(310), uint16(115),
- /* 630 */ uint16(116), uint16(117), uint16(115), uint16(116), uint16(117), uint16(249), uint16(246), uint16(19), uint16(248), uint16(106),
- /* 640 */ uint16(107), uint16(23), uint16(152), uint16(153), uint16(154), uint16(46), uint16(47), uint16(48), uint16(49), uint16(263),
+ /* 620 */ uint16(111), uint16(112), uint16(229), uint16(237), uint16(238), uint16(59), uint16(115), uint16(116), uint16(117), uint16(299),
+ /* 630 */ uint16(300), uint16(115), uint16(116), uint16(117), uint16(59), uint16(16), uint16(250), uint16(19), uint16(192), uint16(192),
+ /* 640 */ uint16(19), uint16(23), uint16(152), uint16(153), uint16(154), uint16(24), uint16(114), uint16(309), uint16(310), uint16(192),
/* 650 */ uint16(102), uint16(103), uint16(104), uint16(105), uint16(106), uint16(107), uint16(108), uint16(109), uint16(110), uint16(111),
/* 660 */ uint16(112), uint16(43), uint16(44), uint16(45), uint16(46), uint16(47), uint16(48), uint16(49), uint16(50), uint16(51),
- /* 670 */ uint16(52), uint16(53), uint16(54), uint16(55), uint16(56), uint16(57), uint16(19), uint16(76), uint16(298), uint16(299),
- /* 680 */ uint16(23), uint16(295), uint16(115), uint16(116), uint16(117), uint16(152), uint16(191), uint16(154), uint16(301), uint16(73),
- /* 690 */ uint16(89), uint16(137), uint16(138), uint16(92), uint16(22), uint16(191), uint16(144), uint16(22), uint16(191), uint16(191),
+ /* 670 */ uint16(52), uint16(53), uint16(54), uint16(55), uint16(56), uint16(57), uint16(19), uint16(7), uint16(8), uint16(9),
+ /* 680 */ uint16(23), uint16(115), uint16(116), uint16(117), uint16(203), uint16(290), uint16(239), uint16(238), uint16(137), uint16(138),
+ /* 690 */ uint16(115), uint16(116), uint16(117), uint16(236), uint16(192), uint16(22), uint16(77), uint16(81), uint16(79), uint16(250),
/* 700 */ uint16(43), uint16(44), uint16(45), uint16(46), uint16(47), uint16(48), uint16(49), uint16(50), uint16(51), uint16(52),
- /* 710 */ uint16(53), uint16(54), uint16(55), uint16(56), uint16(57), uint16(163), uint16(191), uint16(213), uint16(214), uint16(120),
+ /* 710 */ uint16(53), uint16(54), uint16(55), uint16(56), uint16(57), uint16(192), uint16(95), uint16(142), uint16(237), uint16(238),
/* 720 */ uint16(102), uint16(103), uint16(104), uint16(105), uint16(106), uint16(107), uint16(108), uint16(109), uint16(110), uint16(111),
- /* 730 */ uint16(112), uint16(59), uint16(228), uint16(191), uint16(59), uint16(191), uint16(236), uint16(237), uint16(213), uint16(214),
- /* 740 */ uint16(11), uint16(59), uint16(126), uint16(127), uint16(128), uint16(238), uint16(19), uint16(26), uint16(191), uint16(249),
- /* 750 */ uint16(23), uint16(164), uint16(165), uint16(228), uint16(191), uint16(213), uint16(214), uint16(213), uint16(214), uint16(102),
+ /* 730 */ uint16(112), uint16(250), uint16(59), uint16(112), uint16(192), uint16(119), uint16(26), uint16(214), uint16(215), uint16(118),
+ /* 740 */ uint16(119), uint16(120), uint16(121), uint16(122), uint16(123), uint16(124), uint16(19), uint16(192), uint16(267), uint16(302),
+ /* 750 */ uint16(23), uint16(130), uint16(229), uint16(137), uint16(138), uint16(23), uint16(214), uint16(215), uint16(26), uint16(102),
/* 760 */ uint16(103), uint16(104), uint16(105), uint16(106), uint16(107), uint16(108), uint16(109), uint16(110), uint16(111), uint16(112),
/* 770 */ uint16(43), uint16(44), uint16(45), uint16(46), uint16(47), uint16(48), uint16(49), uint16(50), uint16(51), uint16(52),
- /* 780 */ uint16(53), uint16(54), uint16(55), uint16(56), uint16(57), uint16(19), uint16(241), uint16(115), uint16(116), uint16(117),
- /* 790 */ uint16(115), uint16(116), uint16(117), uint16(191), uint16(250), uint16(238), uint16(251), uint16(115), uint16(116), uint16(117),
- /* 800 */ uint16(157), uint16(23), uint16(159), uint16(191), uint16(26), uint16(191), uint16(111), uint16(112), uint16(301), uint16(43),
+ /* 780 */ uint16(53), uint16(54), uint16(55), uint16(56), uint16(57), uint16(19), uint16(76), uint16(11), uint16(115), uint16(116),
+ /* 790 */ uint16(117), uint16(192), uint16(29), uint16(251), uint16(239), uint16(73), uint16(33), uint16(192), uint16(192), uint16(89),
+ /* 800 */ uint16(192), uint16(192), uint16(92), uint16(192), uint16(192), uint16(126), uint16(127), uint16(128), uint16(224), uint16(43),
/* 810 */ uint16(44), uint16(45), uint16(46), uint16(47), uint16(48), uint16(49), uint16(50), uint16(51), uint16(52), uint16(53),
- /* 820 */ uint16(54), uint16(55), uint16(56), uint16(57), uint16(142), uint16(213), uint16(214), uint16(213), uint16(214), uint16(102),
+ /* 820 */ uint16(54), uint16(55), uint16(56), uint16(57), uint16(192), uint16(35), uint16(214), uint16(215), uint16(65), uint16(102),
/* 830 */ uint16(103), uint16(104), uint16(105), uint16(106), uint16(107), uint16(108), uint16(109), uint16(110), uint16(111), uint16(112),
- /* 840 */ uint16(228), uint16(191), uint16(228), uint16(191), uint16(191), uint16(207), uint16(208), uint16(209), uint16(126), uint16(127),
- /* 850 */ uint16(128), uint16(133), uint16(289), uint16(135), uint16(136), uint16(19), uint16(127), uint16(128), uint16(301), uint16(7),
- /* 860 */ uint16(8), uint16(9), uint16(141), uint16(213), uint16(214), uint16(213), uint16(214), uint16(265), uint16(102), uint16(103),
+ /* 840 */ uint16(59), uint16(229), uint16(192), uint16(192), uint16(239), uint16(239), uint16(214), uint16(215), uint16(126), uint16(127),
+ /* 850 */ uint16(128), uint16(126), uint16(127), uint16(128), uint16(307), uint16(19), uint16(66), uint16(302), uint16(311), uint16(192),
+ /* 860 */ uint16(261), uint16(229), uint16(224), uint16(22), uint16(74), uint16(214), uint16(215), uint16(192), uint16(102), uint16(103),
/* 870 */ uint16(104), uint16(105), uint16(106), uint16(107), uint16(108), uint16(109), uint16(110), uint16(111), uint16(112), uint16(43),
/* 880 */ uint16(44), uint16(45), uint16(46), uint16(47), uint16(48), uint16(49), uint16(50), uint16(51), uint16(52), uint16(53),
- /* 890 */ uint16(54), uint16(55), uint16(56), uint16(57), uint16(191), uint16(117), uint16(191), uint16(22), uint16(23), uint16(19),
- /* 900 */ uint16(250), uint16(26), uint16(250), uint16(191), uint16(223), uint16(191), uint16(126), uint16(127), uint16(128), uint16(205),
- /* 910 */ uint16(206), uint16(205), uint16(206), uint16(260), uint16(21), uint16(202), uint16(213), uint16(214), uint16(213), uint16(214),
- /* 920 */ uint16(142), uint16(270), uint16(208), uint16(209), uint16(158), uint16(45), uint16(46), uint16(47), uint16(48), uint16(49),
+ /* 890 */ uint16(54), uint16(55), uint16(56), uint16(57), uint16(192), uint16(192), uint16(115), uint16(116), uint16(117), uint16(19),
+ /* 900 */ uint16(59), uint16(290), uint16(251), uint16(127), uint16(128), uint16(192), uint16(23), uint16(302), uint16(302), uint16(26),
+ /* 910 */ uint16(302), uint16(236), uint16(192), uint16(22), uint16(21), uint16(24), uint16(214), uint16(215), uint16(192), uint16(129),
+ /* 920 */ uint16(22), uint16(192), uint16(24), uint16(142), uint16(158), uint16(45), uint16(46), uint16(47), uint16(48), uint16(49),
/* 930 */ uint16(50), uint16(51), uint16(52), uint16(53), uint16(54), uint16(55), uint16(56), uint16(57), uint16(102), uint16(103),
- /* 940 */ uint16(104), uint16(105), uint16(106), uint16(107), uint16(108), uint16(109), uint16(110), uint16(111), uint16(112), uint16(236),
- /* 950 */ uint16(237), uint16(12), uint16(191), uint16(250), uint16(76), uint16(250), uint16(191), uint16(22), uint16(23), uint16(308),
- /* 960 */ uint16(309), uint16(26), uint16(249), uint16(202), uint16(191), uint16(191), uint16(27), uint16(89), uint16(191), uint16(202),
- /* 970 */ uint16(92), uint16(202), uint16(260), uint16(80), uint16(213), uint16(214), uint16(101), uint16(203), uint16(213), uint16(214),
- /* 980 */ uint16(22), uint16(42), uint16(102), uint16(103), uint16(104), uint16(105), uint16(106), uint16(107), uint16(108), uint16(109),
- /* 990 */ uint16(110), uint16(111), uint16(112), uint16(228), uint16(158), uint16(281), uint16(108), uint16(236), uint16(237), uint16(225),
- /* 1000 */ uint16(191), uint16(227), uint16(63), uint16(236), uint16(237), uint16(236), uint16(237), uint16(191), uint16(235), uint16(191),
- /* 1010 */ uint16(249), uint16(250), uint16(73), uint16(241), uint16(19), uint16(122), uint16(249), uint16(59), uint16(249), uint16(24),
- /* 1020 */ uint16(259), uint16(29), uint16(134), uint16(251), uint16(191), uint16(33), uint16(22), uint16(139), uint16(24), uint16(213),
- /* 1030 */ uint16(214), uint16(213), uint16(214), uint16(191), uint16(19), uint16(210), uint16(101), uint16(191), uint16(43), uint16(44),
+ /* 940 */ uint16(104), uint16(105), uint16(106), uint16(107), uint16(108), uint16(109), uint16(110), uint16(111), uint16(112), uint16(192),
+ /* 950 */ uint16(59), uint16(12), uint16(192), uint16(251), uint16(192), uint16(305), uint16(192), uint16(116), uint16(22), uint16(23),
+ /* 960 */ uint16(242), uint16(203), uint16(26), uint16(203), uint16(24), uint16(236), uint16(27), uint16(237), uint16(238), uint16(266),
+ /* 970 */ uint16(252), uint16(214), uint16(215), uint16(80), uint16(214), uint16(215), uint16(214), uint16(215), uint16(214), uint16(215),
+ /* 980 */ uint16(250), uint16(42), uint16(102), uint16(103), uint16(104), uint16(105), uint16(106), uint16(107), uint16(108), uint16(109),
+ /* 990 */ uint16(110), uint16(111), uint16(112), uint16(229), uint16(158), uint16(237), uint16(238), uint16(237), uint16(238), uint16(59),
+ /* 1000 */ uint16(117), uint16(281), uint16(63), uint16(192), uint16(192), uint16(192), uint16(192), uint16(116), uint16(250), uint16(192),
+ /* 1010 */ uint16(250), uint16(251), uint16(73), uint16(251), uint16(19), uint16(122), uint16(290), uint16(237), uint16(238), uint16(24),
+ /* 1020 */ uint16(260), uint16(209), uint16(210), uint16(209), uint16(210), uint16(142), uint16(242), uint16(214), uint16(215), uint16(197),
+ /* 1030 */ uint16(250), uint16(22), uint16(23), uint16(276), uint16(19), uint16(26), uint16(252), uint16(101), uint16(43), uint16(44),
/* 1040 */ uint16(45), uint16(46), uint16(47), uint16(48), uint16(49), uint16(50), uint16(51), uint16(52), uint16(53), uint16(54),
- /* 1050 */ uint16(55), uint16(56), uint16(57), uint16(160), uint16(19), uint16(213), uint16(214), uint16(65), uint16(43), uint16(44),
+ /* 1050 */ uint16(55), uint16(56), uint16(57), uint16(160), uint16(19), uint16(211), uint16(116), uint16(192), uint16(43), uint16(44),
/* 1060 */ uint16(45), uint16(46), uint16(47), uint16(48), uint16(49), uint16(50), uint16(51), uint16(52), uint16(53), uint16(54),
- /* 1070 */ uint16(55), uint16(56), uint16(57), uint16(191), uint16(116), uint16(22), uint16(191), uint16(24), uint16(43), uint16(44),
+ /* 1070 */ uint16(55), uint16(56), uint16(57), uint16(192), uint16(192), uint16(22), uint16(192), uint16(266), uint16(43), uint16(44),
/* 1080 */ uint16(45), uint16(46), uint16(47), uint16(48), uint16(49), uint16(50), uint16(51), uint16(52), uint16(53), uint16(54),
- /* 1090 */ uint16(55), uint16(56), uint16(57), uint16(191), uint16(261), uint16(213), uint16(214), uint16(102), uint16(103), uint16(104),
- /* 1100 */ uint16(105), uint16(106), uint16(107), uint16(108), uint16(109), uint16(110), uint16(111), uint16(112), uint16(59), uint16(19),
- /* 1110 */ uint16(191), uint16(265), uint16(59), uint16(288), uint16(191), uint16(213), uint16(214), uint16(102), uint16(103), uint16(104),
- /* 1120 */ uint16(105), uint16(106), uint16(107), uint16(108), uint16(109), uint16(110), uint16(111), uint16(112), uint16(35), uint16(191),
- /* 1130 */ uint16(66), uint16(191), uint16(213), uint16(214), uint16(191), uint16(270), uint16(46), uint16(102), uint16(103), uint16(104),
- /* 1140 */ uint16(105), uint16(106), uint16(107), uint16(108), uint16(109), uint16(110), uint16(111), uint16(112), uint16(191), uint16(85),
- /* 1150 */ uint16(265), uint16(213), uint16(214), uint16(213), uint16(214), uint16(106), uint16(107), uint16(19), uint16(94), uint16(66),
- /* 1160 */ uint16(137), uint16(138), uint16(191), uint16(114), uint16(115), uint16(116), uint16(117), uint16(74), uint16(119), uint16(116),
- /* 1170 */ uint16(213), uint16(214), uint16(202), uint16(308), uint16(309), uint16(306), uint16(127), uint16(191), uint16(235), uint16(310),
- /* 1180 */ uint16(59), uint16(191), uint16(44), uint16(45), uint16(46), uint16(47), uint16(48), uint16(49), uint16(50), uint16(51),
- /* 1190 */ uint16(52), uint16(53), uint16(54), uint16(55), uint16(56), uint16(57), uint16(191), uint16(76), uint16(196), uint16(213),
- /* 1200 */ uint16(214), uint16(152), uint16(12), uint16(154), uint16(114), uint16(191), uint16(236), uint16(237), uint16(87), uint16(145),
- /* 1210 */ uint16(89), uint16(19), uint16(20), uint16(92), uint16(22), uint16(22), uint16(23), uint16(27), uint16(191), uint16(249),
- /* 1220 */ uint16(130), uint16(202), uint16(129), uint16(202), uint16(191), uint16(235), uint16(306), uint16(152), uint16(36), uint16(154),
- /* 1230 */ uint16(310), uint16(191), uint16(42), uint16(191), uint16(191), uint16(191), uint16(115), uint16(116), uint16(117), uint16(191),
+ /* 1090 */ uint16(55), uint16(56), uint16(57), uint16(192), uint16(282), uint16(192), uint16(282), uint16(102), uint16(103), uint16(104),
+ /* 1100 */ uint16(105), uint16(106), uint16(107), uint16(108), uint16(109), uint16(110), uint16(111), uint16(112), uint16(59), uint16(192),
+ /* 1110 */ uint16(101), uint16(279), uint16(192), uint16(192), uint16(230), uint16(283), uint16(192), uint16(102), uint16(103), uint16(104),
+ /* 1120 */ uint16(105), uint16(106), uint16(107), uint16(108), uint16(109), uint16(110), uint16(111), uint16(112), uint16(204), uint16(211),
+ /* 1130 */ uint16(66), uint16(214), uint16(215), uint16(289), uint16(214), uint16(215), uint16(108), uint16(102), uint16(103), uint16(104),
+ /* 1140 */ uint16(105), uint16(106), uint16(107), uint16(108), uint16(109), uint16(110), uint16(111), uint16(112), uint16(266), uint16(85),
+ /* 1150 */ uint16(226), uint16(192), uint16(228), uint16(22), uint16(23), uint16(106), uint16(107), uint16(19), uint16(94), uint16(106),
+ /* 1160 */ uint16(107), uint16(192), uint16(134), uint16(114), uint16(115), uint16(116), uint16(117), uint16(139), uint16(119), uint16(266),
+ /* 1170 */ uint16(203), uint16(206), uint16(207), uint16(214), uint16(215), uint16(192), uint16(127), uint16(192), uint16(206), uint16(207),
+ /* 1180 */ uint16(59), uint16(192), uint16(44), uint16(45), uint16(46), uint16(47), uint16(48), uint16(49), uint16(50), uint16(51),
+ /* 1190 */ uint16(52), uint16(53), uint16(54), uint16(55), uint16(56), uint16(57), uint16(192), uint16(76), uint16(192), uint16(214),
+ /* 1200 */ uint16(215), uint16(152), uint16(284), uint16(154), uint16(237), uint16(238), uint16(192), uint16(289), uint16(87), uint16(145),
+ /* 1210 */ uint16(89), uint16(19), uint16(20), uint16(92), uint16(22), uint16(22), uint16(23), uint16(250), uint16(307), uint16(236),
+ /* 1220 */ uint16(214), uint16(215), uint16(311), uint16(203), uint16(12), uint16(247), uint16(192), uint16(249), uint16(36), uint16(307),
+ /* 1230 */ uint16(192), uint16(262), uint16(101), uint16(311), uint16(137), uint16(138), uint16(115), uint16(116), uint16(117), uint16(27),
/* 1240 */ uint16(102), uint16(103), uint16(104), uint16(105), uint16(106), uint16(107), uint16(108), uint16(109), uint16(110), uint16(111),
- /* 1250 */ uint16(112), uint16(59), uint16(99), uint16(63), uint16(191), uint16(236), uint16(237), uint16(236), uint16(237), uint16(191),
- /* 1260 */ uint16(289), uint16(213), uint16(214), uint16(71), uint16(191), uint16(144), uint16(261), uint16(191), uint16(249), uint16(191),
- /* 1270 */ uint16(249), uint16(19), uint16(20), uint16(81), uint16(22), uint16(235), uint16(213), uint16(214), uint16(235), uint16(191),
- /* 1280 */ uint16(278), uint16(213), uint16(214), uint16(191), uint16(282), uint16(132), uint16(213), uint16(214), uint16(36), uint16(213),
- /* 1290 */ uint16(214), uint16(191), uint16(100), uint16(191), uint16(101), uint16(191), uint16(191), uint16(191), uint16(106), uint16(107),
- /* 1300 */ uint16(48), uint16(213), uint16(214), uint16(261), uint16(191), uint16(113), uint16(191), uint16(115), uint16(116), uint16(117),
- /* 1310 */ uint16(191), uint16(59), uint16(120), uint16(213), uint16(214), uint16(213), uint16(214), uint16(213), uint16(214), uint16(213),
- /* 1320 */ uint16(214), uint16(22), uint16(23), uint16(71), uint16(237), uint16(59), uint16(213), uint16(214), uint16(191), uint16(137),
- /* 1330 */ uint16(138), uint16(191), uint16(213), uint16(214), uint16(191), uint16(191), uint16(249), uint16(85), uint16(191), uint16(261),
- /* 1340 */ uint16(191), uint16(26), uint16(90), uint16(15), uint16(152), uint16(153), uint16(154), uint16(155), uint16(156), uint16(19),
- /* 1350 */ uint16(213), uint16(214), uint16(100), uint16(213), uint16(214), uint16(191), uint16(213), uint16(214), uint16(106), uint16(107),
- /* 1360 */ uint16(213), uint16(214), uint16(213), uint16(214), uint16(191), uint16(113), uint16(261), uint16(115), uint16(116), uint16(117),
- /* 1370 */ uint16(253), uint16(254), uint16(120), uint16(229), uint16(191), uint16(191), uint16(191), uint16(213), uint16(214), uint16(191),
- /* 1380 */ uint16(306), uint16(289), uint16(116), uint16(26), uint16(310), uint16(191), uint16(213), uint16(214), uint16(60), uint16(19),
- /* 1390 */ uint16(296), uint16(297), uint16(24), uint16(191), uint16(46), uint16(191), uint16(213), uint16(214), uint16(213), uint16(214),
- /* 1400 */ uint16(101), uint16(213), uint16(214), uint16(191), uint16(152), uint16(153), uint16(154), uint16(155), uint16(156), uint16(0),
- /* 1410 */ uint16(1), uint16(2), uint16(191), uint16(229), uint16(5), uint16(213), uint16(214), uint16(213), uint16(214), uint16(10),
- /* 1420 */ uint16(11), uint16(12), uint16(13), uint16(14), uint16(1), uint16(2), uint16(17), uint16(191), uint16(5), uint16(19),
- /* 1430 */ uint16(20), uint16(191), uint16(22), uint16(10), uint16(11), uint16(12), uint16(13), uint16(14), uint16(191), uint16(30),
- /* 1440 */ uint16(17), uint16(32), uint16(241), uint16(148), uint16(149), uint16(115), uint16(36), uint16(191), uint16(241), uint16(40),
- /* 1450 */ uint16(191), uint16(26), uint16(251), uint16(30), uint16(191), uint16(32), uint16(141), uint16(22), uint16(251), uint16(5),
- /* 1460 */ uint16(213), uint16(214), uint16(114), uint16(40), uint16(10), uint16(11), uint16(12), uint16(13), uint16(14), uint16(59),
- /* 1470 */ uint16(134), uint16(17), uint16(213), uint16(214), uint16(191), uint16(139), uint16(213), uint16(214), uint16(191), uint16(70),
- /* 1480 */ uint16(191), uint16(71), uint16(125), uint16(191), uint16(30), uint16(115), uint16(32), uint16(78), uint16(53), uint16(191),
- /* 1490 */ uint16(81), uint16(191), uint16(191), uint16(70), uint16(40), uint16(85), uint16(213), uint16(214), uint16(191), uint16(22),
- /* 1500 */ uint16(90), uint16(78), uint16(213), uint16(214), uint16(81), uint16(213), uint16(214), uint16(98), uint16(140), uint16(120),
- /* 1510 */ uint16(100), uint16(213), uint16(214), uint16(213), uint16(214), uint16(23), uint16(106), uint16(107), uint16(26), uint16(130),
- /* 1520 */ uint16(191), uint16(98), uint16(191), uint16(113), uint16(70), uint16(115), uint16(116), uint16(117), uint16(23), uint16(22),
- /* 1530 */ uint16(120), uint16(26), uint16(78), uint16(19), uint16(191), uint16(81), uint16(19), uint16(20), uint16(61), uint16(22),
- /* 1540 */ uint16(191), uint16(132), uint16(213), uint16(214), uint16(213), uint16(214), uint16(137), uint16(138), uint16(59), uint16(191),
- /* 1550 */ uint16(191), uint16(191), uint16(98), uint16(36), uint16(128), uint16(132), uint16(213), uint16(214), uint16(128), uint16(59),
- /* 1560 */ uint16(137), uint16(138), uint16(152), uint16(153), uint16(154), uint16(155), uint16(156), uint16(83), uint16(84), uint16(144),
- /* 1570 */ uint16(161), uint16(213), uint16(214), uint16(213), uint16(214), uint16(23), uint16(59), uint16(151), uint16(26), uint16(23),
- /* 1580 */ uint16(23), uint16(151), uint16(26), uint16(26), uint16(161), uint16(59), uint16(132), uint16(23), uint16(71), uint16(191),
- /* 1590 */ uint16(26), uint16(137), uint16(138), uint16(119), uint16(120), uint16(23), uint16(19), uint16(20), uint16(26), uint16(22),
- /* 1600 */ uint16(223), uint16(23), uint16(85), uint16(23), uint16(26), uint16(116), uint16(26), uint16(90), uint16(191), uint16(7),
- /* 1610 */ uint16(8), uint16(97), uint16(152), uint16(36), uint16(154), uint16(161), uint16(116), uint16(100), uint16(23), uint16(23),
- /* 1620 */ uint16(191), uint16(26), uint16(26), uint16(106), uint16(107), uint16(191), uint16(23), uint16(223), uint16(23), uint16(26),
- /* 1630 */ uint16(113), uint16(26), uint16(115), uint16(116), uint16(117), uint16(23), uint16(59), uint16(120), uint16(26), uint16(191),
- /* 1640 */ uint16(191), uint16(191), uint16(116), uint16(255), uint16(191), uint16(252), uint16(191), uint16(140), uint16(71), uint16(191),
- /* 1650 */ uint16(315), uint16(233), uint16(191), uint16(191), uint16(191), uint16(191), uint16(191), uint16(191), uint16(191), uint16(191),
- /* 1660 */ uint16(191), uint16(285), uint16(284), uint16(239), uint16(252), uint16(252), uint16(252), uint16(252), uint16(240), uint16(152),
- /* 1670 */ uint16(153), uint16(154), uint16(155), uint16(156), uint16(189), uint16(294), uint16(268), uint16(100), uint16(242), uint16(268),
- /* 1680 */ uint16(264), uint16(211), uint16(290), uint16(106), uint16(107), uint16(108), uint16(264), uint16(256), uint16(256), uint16(243),
- /* 1690 */ uint16(113), uint16(290), uint16(115), uint16(116), uint16(117), uint16(268), uint16(217), uint16(120), uint16(226), uint16(243),
- /* 1700 */ uint16(222), uint16(268), uint16(216), uint16(19), uint16(20), uint16(246), uint16(22), uint16(216), uint16(256), uint16(216),
- /* 1710 */ uint16(194), uint16(60), uint16(38), uint16(242), uint16(277), uint16(294), uint16(240), uint16(242), uint16(198), uint16(246),
- /* 1720 */ uint16(36), uint16(140), uint16(198), uint16(198), uint16(19), uint16(20), uint16(150), uint16(22), uint16(149), uint16(152),
- /* 1730 */ uint16(153), uint16(154), uint16(155), uint16(156), uint16(294), uint16(291), uint16(291), uint16(280), uint16(22), uint16(43),
- /* 1740 */ uint16(231), uint16(36), uint16(18), uint16(59), uint16(234), uint16(234), uint16(234), uint16(234), uint16(267), uint16(269),
- /* 1750 */ uint16(18), uint16(198), uint16(197), uint16(231), uint16(148), uint16(71), uint16(269), uint16(269), uint16(243), uint16(231),
- /* 1760 */ uint16(198), uint16(243), uint16(267), uint16(197), uint16(59), uint16(157), uint16(243), uint16(198), uint16(62), uint16(287),
- /* 1770 */ uint16(243), uint16(197), uint16(22), uint16(198), uint16(114), uint16(64), uint16(71), uint16(218), uint16(218), uint16(197),
- /* 1780 */ uint16(286), uint16(198), uint16(197), uint16(215), uint16(100), uint16(215), uint16(215), uint16(224), uint16(22), uint16(125),
- /* 1790 */ uint16(106), uint16(107), uint16(164), uint16(24), uint16(221), uint16(112), uint16(143), uint16(113), uint16(302), uint16(115),
- /* 1800 */ uint16(116), uint16(117), uint16(218), uint16(215), uint16(120), uint16(100), uint16(217), uint16(221), uint16(215), uint16(215),
- /* 1810 */ uint16(309), uint16(106), uint16(107), uint16(215), uint16(224), uint16(279), uint16(279), uint16(218), uint16(113), uint16(258),
- /* 1820 */ uint16(115), uint16(116), uint16(117), uint16(114), uint16(257), uint16(120), uint16(91), uint16(198), uint16(82), uint16(147),
- /* 1830 */ uint16(144), uint16(22), uint16(274), uint16(314), uint16(198), uint16(314), uint16(152), uint16(153), uint16(154), uint16(155),
- /* 1840 */ uint16(156), uint16(276), uint16(157), uint16(146), uint16(145), uint16(258), uint16(25), uint16(247), uint16(257), uint16(201),
- /* 1850 */ uint16(258), uint16(26), uint16(200), uint16(13), uint16(257), uint16(244), uint16(246), uint16(152), uint16(153), uint16(154),
- /* 1860 */ uint16(155), uint16(156), uint16(258), uint16(262), uint16(257), uint16(247), uint16(245), uint16(243), uint16(192), uint16(192),
- /* 1870 */ uint16(6), uint16(262), uint16(204), uint16(210), uint16(219), uint16(210), uint16(210), uint16(190), uint16(190), uint16(190),
- /* 1880 */ uint16(210), uint16(219), uint16(204), uint16(211), uint16(211), uint16(210), uint16(4), uint16(3), uint16(22), uint16(162),
- /* 1890 */ uint16(15), uint16(23), uint16(16), uint16(23), uint16(204), uint16(138), uint16(129), uint16(150), uint16(26), uint16(141),
- /* 1900 */ uint16(20), uint16(24), uint16(143), uint16(16), uint16(1), uint16(141), uint16(129), uint16(129), uint16(61), uint16(53),
- /* 1910 */ uint16(37), uint16(150), uint16(297), uint16(300), uint16(300), uint16(53), uint16(53), uint16(129), uint16(53), uint16(115),
- /* 1920 */ uint16(34), uint16(140), uint16(1), uint16(5), uint16(22), uint16(114), uint16(68), uint16(26), uint16(160), uint16(68),
- /* 1930 */ uint16(75), uint16(41), uint16(140), uint16(114), uint16(24), uint16(20), uint16(19), uint16(130), uint16(124), uint16(23),
- /* 1940 */ uint16(96), uint16(22), uint16(22), uint16(37), uint16(22), uint16(67), uint16(22), uint16(59), uint16(67), uint16(24),
- /* 1950 */ uint16(22), uint16(28), uint16(67), uint16(23), uint16(148), uint16(22), uint16(97), uint16(23), uint16(23), uint16(23),
- /* 1960 */ uint16(140), uint16(23), uint16(22), uint16(26), uint16(23), uint16(23), uint16(115), uint16(22), uint16(142), uint16(26),
- /* 1970 */ uint16(75), uint16(88), uint16(75), uint16(34), uint16(23), uint16(86), uint16(44), uint16(22), uint16(34), uint16(26),
- /* 1980 */ uint16(34), uint16(34), uint16(34), uint16(34), uint16(93), uint16(24), uint16(26), uint16(23), uint16(34), uint16(23),
- /* 1990 */ uint16(23), uint16(23), uint16(23), uint16(11), uint16(23), uint16(22), uint16(26), uint16(22), uint16(22), uint16(15),
- /* 2000 */ uint16(23), uint16(23), uint16(22), uint16(22), uint16(1), uint16(26), uint16(23), uint16(140), uint16(134), uint16(140),
- /* 2010 */ uint16(1), uint16(140), uint16(316), uint16(316), uint16(316), uint16(316), uint16(316), uint16(316), uint16(316), uint16(140),
- /* 2020 */ uint16(316), uint16(316), uint16(316), uint16(316), uint16(316), uint16(316), uint16(316), uint16(316), uint16(316), uint16(316),
- /* 2030 */ uint16(316), uint16(316), uint16(316), uint16(316), uint16(316), uint16(316), uint16(316), uint16(316), uint16(316), uint16(316),
- /* 2040 */ uint16(316), uint16(316), uint16(316), uint16(316), uint16(316), uint16(316), uint16(316), uint16(316), uint16(316), uint16(316),
- /* 2050 */ uint16(316), uint16(316), uint16(316), uint16(316), uint16(316), uint16(316), uint16(316), uint16(316), uint16(316), uint16(316),
- /* 2060 */ uint16(316), uint16(316), uint16(316), uint16(316), uint16(316), uint16(316), uint16(316), uint16(316), uint16(316), uint16(316),
- /* 2070 */ uint16(316), uint16(316), uint16(316), uint16(316), uint16(316), uint16(316), uint16(316), uint16(316), uint16(316), uint16(316),
- /* 2080 */ uint16(316), uint16(316), uint16(316), uint16(316), uint16(316), uint16(316), uint16(316), uint16(316), uint16(316), uint16(316),
- /* 2090 */ uint16(316), uint16(316), uint16(316), uint16(316), uint16(316), uint16(316), uint16(316), uint16(316), uint16(316), uint16(316),
- /* 2100 */ uint16(316), uint16(316), uint16(316), uint16(316), uint16(316), uint16(316), uint16(316), uint16(316), uint16(316), uint16(316),
- /* 2110 */ uint16(316), uint16(316), uint16(316), uint16(316), uint16(316), uint16(316), uint16(316), uint16(316), uint16(316), uint16(316),
- /* 2120 */ uint16(316), uint16(316), uint16(316), uint16(316), uint16(316), uint16(316), uint16(316), uint16(316), uint16(316), uint16(316),
- /* 2130 */ uint16(316), uint16(316), uint16(316), uint16(316), uint16(316), uint16(316), uint16(316), uint16(316), uint16(316), uint16(316),
- /* 2140 */ uint16(316), uint16(316), uint16(316), uint16(316), uint16(316), uint16(316), uint16(316), uint16(316), uint16(316), uint16(316),
- /* 2150 */ uint16(316), uint16(316), uint16(316), uint16(316), uint16(316), uint16(316), uint16(316), uint16(316), uint16(316), uint16(316),
- /* 2160 */ uint16(316), uint16(316), uint16(316), uint16(316), uint16(316), uint16(316), uint16(316), uint16(316), uint16(316), uint16(316),
- /* 2170 */ uint16(316), uint16(316), uint16(316), uint16(316), uint16(316), uint16(316), uint16(316), uint16(316), uint16(316), uint16(316),
- /* 2180 */ uint16(316), uint16(316), uint16(316), uint16(316), uint16(316), uint16(316), uint16(316), uint16(316), uint16(316), uint16(316),
- /* 2190 */ uint16(316), uint16(316), uint16(316), uint16(316), uint16(316), uint16(316), uint16(316), uint16(316), uint16(316), uint16(316),
- /* 2200 */ uint16(316), uint16(316), uint16(316),
-} /* sqlite3.c:157784:25 */
+ /* 1250 */ uint16(112), uint16(59), uint16(214), uint16(215), uint16(42), uint16(203), uint16(307), uint16(237), uint16(238), uint16(192),
+ /* 1260 */ uint16(311), uint16(192), uint16(26), uint16(71), uint16(192), uint16(144), uint16(262), uint16(297), uint16(298), uint16(203),
+ /* 1270 */ uint16(250), uint16(19), uint16(20), uint16(81), uint16(22), uint16(63), uint16(262), uint16(254), uint16(255), uint16(15),
+ /* 1280 */ uint16(26), uint16(214), uint16(215), uint16(214), uint16(215), uint16(26), uint16(214), uint16(215), uint16(36), uint16(237),
+ /* 1290 */ uint16(238), uint16(192), uint16(100), uint16(114), uint16(101), uint16(192), uint16(262), uint16(192), uint16(106), uint16(107),
+ /* 1300 */ uint16(48), uint16(134), uint16(250), uint16(237), uint16(238), uint16(113), uint16(139), uint16(115), uint16(116), uint16(117),
+ /* 1310 */ uint16(192), uint16(59), uint16(120), uint16(214), uint16(215), uint16(242), uint16(250), uint16(214), uint16(215), uint16(214),
+ /* 1320 */ uint16(215), uint16(148), uint16(149), uint16(71), uint16(60), uint16(252), uint16(242), uint16(192), uint16(149), uint16(137),
+ /* 1330 */ uint16(138), uint16(192), uint16(214), uint16(215), uint16(192), uint16(19), uint16(252), uint16(85), uint16(192), uint16(59),
+ /* 1340 */ uint16(192), uint16(157), uint16(90), uint16(159), uint16(152), uint16(153), uint16(154), uint16(155), uint16(156), uint16(214),
+ /* 1350 */ uint16(215), uint16(192), uint16(100), uint16(214), uint16(215), uint16(19), uint16(214), uint16(215), uint16(106), uint16(107),
+ /* 1360 */ uint16(214), uint16(215), uint16(214), uint16(215), uint16(22), uint16(113), uint16(192), uint16(115), uint16(116), uint16(117),
+ /* 1370 */ uint16(192), uint16(242), uint16(120), uint16(214), uint16(215), uint16(192), uint16(24), uint16(192), uint16(31), uint16(192),
+ /* 1380 */ uint16(144), uint16(252), uint16(26), uint16(192), uint16(125), uint16(99), uint16(39), uint16(192), uint16(214), uint16(215),
+ /* 1390 */ uint16(192), uint16(59), uint16(214), uint16(215), uint16(192), uint16(141), uint16(116), uint16(214), uint16(215), uint16(214),
+ /* 1400 */ uint16(215), uint16(214), uint16(215), uint16(61), uint16(152), uint16(153), uint16(154), uint16(155), uint16(156), uint16(0),
+ /* 1410 */ uint16(1), uint16(2), uint16(214), uint16(215), uint16(5), uint16(192), uint16(214), uint16(215), uint16(132), uint16(10),
+ /* 1420 */ uint16(11), uint16(12), uint16(13), uint16(14), uint16(1), uint16(2), uint16(17), uint16(192), uint16(5), uint16(19),
+ /* 1430 */ uint16(20), uint16(115), uint16(22), uint16(10), uint16(11), uint16(12), uint16(13), uint16(14), uint16(192), uint16(30),
+ /* 1440 */ uint16(17), uint16(32), uint16(23), uint16(192), uint16(23), uint16(26), uint16(36), uint16(26), uint16(116), uint16(40),
+ /* 1450 */ uint16(192), uint16(115), uint16(192), uint16(30), uint16(192), uint16(32), uint16(119), uint16(120), uint16(59), uint16(5),
+ /* 1460 */ uint16(214), uint16(215), uint16(128), uint16(40), uint16(10), uint16(11), uint16(12), uint16(13), uint16(14), uint16(59),
+ /* 1470 */ uint16(19), uint16(17), uint16(214), uint16(215), uint16(214), uint16(215), uint16(214), uint16(215), uint16(120), uint16(70),
+ /* 1480 */ uint16(192), uint16(71), uint16(22), uint16(192), uint16(30), uint16(151), uint16(32), uint16(78), uint16(130), uint16(128),
+ /* 1490 */ uint16(81), uint16(192), uint16(140), uint16(70), uint16(40), uint16(85), uint16(192), uint16(141), uint16(7), uint16(8),
+ /* 1500 */ uint16(90), uint16(78), uint16(214), uint16(215), uint16(81), uint16(214), uint16(215), uint16(98), uint16(83), uint16(84),
+ /* 1510 */ uint16(100), uint16(192), uint16(151), uint16(214), uint16(215), uint16(116), uint16(106), uint16(107), uint16(214), uint16(215),
+ /* 1520 */ uint16(192), uint16(98), uint16(192), uint16(113), uint16(70), uint16(115), uint16(116), uint16(117), uint16(23), uint16(224),
+ /* 1530 */ uint16(120), uint16(26), uint16(78), uint16(214), uint16(215), uint16(81), uint16(19), uint16(20), uint16(152), uint16(22),
+ /* 1540 */ uint16(154), uint16(132), uint16(214), uint16(215), uint16(214), uint16(215), uint16(137), uint16(138), uint16(97), uint16(192),
+ /* 1550 */ uint16(256), uint16(192), uint16(98), uint16(36), uint16(23), uint16(132), uint16(192), uint16(26), uint16(192), uint16(192),
+ /* 1560 */ uint16(137), uint16(138), uint16(152), uint16(153), uint16(154), uint16(155), uint16(156), uint16(192), uint16(192), uint16(192),
+ /* 1570 */ uint16(161), uint16(214), uint16(215), uint16(214), uint16(215), uint16(192), uint16(59), uint16(192), uint16(214), uint16(215),
+ /* 1580 */ uint16(214), uint16(215), uint16(192), uint16(152), uint16(161), uint16(154), uint16(132), uint16(192), uint16(71), uint16(214),
+ /* 1590 */ uint16(215), uint16(137), uint16(138), uint16(192), uint16(192), uint16(192), uint16(19), uint16(20), uint16(192), uint16(22),
+ /* 1600 */ uint16(140), uint16(253), uint16(85), uint16(192), uint16(214), uint16(215), uint16(192), uint16(90), uint16(23), uint16(214),
+ /* 1610 */ uint16(215), uint16(26), uint16(192), uint16(36), uint16(192), uint16(161), uint16(23), uint16(100), uint16(192), uint16(26),
+ /* 1620 */ uint16(214), uint16(215), uint16(192), uint16(106), uint16(107), uint16(214), uint16(215), uint16(192), uint16(23), uint16(192),
+ /* 1630 */ uint16(113), uint16(26), uint16(115), uint16(116), uint16(117), uint16(23), uint16(59), uint16(120), uint16(26), uint16(23),
+ /* 1640 */ uint16(23), uint16(23), uint16(26), uint16(26), uint16(26), uint16(316), uint16(234), uint16(23), uint16(71), uint16(23),
+ /* 1650 */ uint16(26), uint16(192), uint16(26), uint16(192), uint16(192), uint16(192), uint16(192), uint16(192), uint16(192), uint16(192),
+ /* 1660 */ uint16(192), uint16(253), uint16(212), uint16(190), uint16(286), uint16(285), uint16(253), uint16(240), uint16(253), uint16(152),
+ /* 1670 */ uint16(153), uint16(154), uint16(155), uint16(156), uint16(241), uint16(243), uint16(295), uint16(100), uint16(291), uint16(291),
+ /* 1680 */ uint16(223), uint16(253), uint16(227), uint16(106), uint16(107), uint16(108), uint16(269), uint16(244), uint16(244), uint16(265),
+ /* 1690 */ uint16(113), uint16(257), uint16(115), uint16(116), uint16(117), uint16(257), uint16(243), uint16(120), uint16(269), uint16(218),
+ /* 1700 */ uint16(217), uint16(265), uint16(217), uint16(19), uint16(20), uint16(217), uint16(22), uint16(195), uint16(269), uint16(269),
+ /* 1710 */ uint16(60), uint16(295), uint16(140), uint16(257), uint16(243), uint16(241), uint16(247), uint16(247), uint16(199), uint16(278),
+ /* 1720 */ uint16(36), uint16(199), uint16(199), uint16(38), uint16(19), uint16(20), uint16(150), uint16(22), uint16(149), uint16(152),
+ /* 1730 */ uint16(153), uint16(154), uint16(155), uint16(156), uint16(22), uint16(43), uint16(232), uint16(295), uint16(292), uint16(292),
+ /* 1740 */ uint16(18), uint16(36), uint16(235), uint16(59), uint16(268), uint16(270), uint16(235), uint16(199), uint16(235), uint16(235),
+ /* 1750 */ uint16(18), uint16(198), uint16(148), uint16(281), uint16(244), uint16(71), uint16(270), uint16(270), uint16(268), uint16(244),
+ /* 1760 */ uint16(232), uint16(232), uint16(244), uint16(199), uint16(59), uint16(244), uint16(198), uint16(157), uint16(288), uint16(62),
+ /* 1770 */ uint16(199), uint16(287), uint16(198), uint16(22), uint16(219), uint16(219), uint16(71), uint16(199), uint16(198), uint16(114),
+ /* 1780 */ uint16(199), uint16(198), uint16(216), uint16(216), uint16(100), uint16(216), uint16(225), uint16(64), uint16(22), uint16(125),
+ /* 1790 */ uint16(106), uint16(107), uint16(222), uint16(164), uint16(219), uint16(222), uint16(24), uint16(113), uint16(216), uint16(115),
+ /* 1800 */ uint16(116), uint16(117), uint16(218), uint16(216), uint16(120), uint16(100), uint16(216), uint16(216), uint16(310), uint16(303),
+ /* 1810 */ uint16(112), uint16(106), uint16(107), uint16(225), uint16(280), uint16(280), uint16(219), uint16(143), uint16(113), uint16(259),
+ /* 1820 */ uint16(115), uint16(116), uint16(117), uint16(114), uint16(259), uint16(120), uint16(199), uint16(91), uint16(82), uint16(147),
+ /* 1830 */ uint16(144), uint16(315), uint16(22), uint16(275), uint16(199), uint16(315), uint16(152), uint16(153), uint16(154), uint16(155),
+ /* 1840 */ uint16(156), uint16(146), uint16(145), uint16(247), uint16(258), uint16(157), uint16(25), uint16(258), uint16(245), uint16(248),
+ /* 1850 */ uint16(244), uint16(259), uint16(258), uint16(202), uint16(259), uint16(248), uint16(258), uint16(152), uint16(153), uint16(154),
+ /* 1860 */ uint16(155), uint16(156), uint16(263), uint16(263), uint16(26), uint16(246), uint16(13), uint16(201), uint16(193), uint16(193),
+ /* 1870 */ uint16(6), uint16(191), uint16(191), uint16(205), uint16(191), uint16(220), uint16(220), uint16(205), uint16(211), uint16(277),
+ /* 1880 */ uint16(211), uint16(211), uint16(211), uint16(205), uint16(4), uint16(212), uint16(3), uint16(22), uint16(162), uint16(212),
+ /* 1890 */ uint16(211), uint16(15), uint16(23), uint16(16), uint16(23), uint16(138), uint16(129), uint16(150), uint16(26), uint16(24),
+ /* 1900 */ uint16(141), uint16(20), uint16(16), uint16(143), uint16(1), uint16(141), uint16(129), uint16(129), uint16(61), uint16(301),
+ /* 1910 */ uint16(301), uint16(298), uint16(150), uint16(53), uint16(53), uint16(37), uint16(53), uint16(129), uint16(115), uint16(53),
+ /* 1920 */ uint16(140), uint16(34), uint16(1), uint16(5), uint16(22), uint16(114), uint16(68), uint16(26), uint16(160), uint16(75),
+ /* 1930 */ uint16(68), uint16(41), uint16(140), uint16(114), uint16(24), uint16(20), uint16(19), uint16(130), uint16(124), uint16(23),
+ /* 1940 */ uint16(67), uint16(22), uint16(22), uint16(59), uint16(22), uint16(22), uint16(67), uint16(96), uint16(24), uint16(22),
+ /* 1950 */ uint16(37), uint16(23), uint16(67), uint16(28), uint16(148), uint16(22), uint16(26), uint16(23), uint16(23), uint16(23),
+ /* 1960 */ uint16(23), uint16(22), uint16(140), uint16(23), uint16(97), uint16(23), uint16(34), uint16(115), uint16(22), uint16(142),
+ /* 1970 */ uint16(26), uint16(75), uint16(34), uint16(44), uint16(75), uint16(34), uint16(88), uint16(34), uint16(86), uint16(34),
+ /* 1980 */ uint16(23), uint16(34), uint16(93), uint16(22), uint16(24), uint16(26), uint16(34), uint16(23), uint16(26), uint16(23),
+ /* 1990 */ uint16(23), uint16(23), uint16(23), uint16(11), uint16(23), uint16(22), uint16(26), uint16(22), uint16(22), uint16(140),
+ /* 2000 */ uint16(23), uint16(23), uint16(22), uint16(22), uint16(134), uint16(26), uint16(23), uint16(15), uint16(140), uint16(1),
+ /* 2010 */ uint16(1), uint16(317), uint16(317), uint16(317), uint16(140), uint16(317), uint16(317), uint16(317), uint16(317), uint16(317),
+ /* 2020 */ uint16(317), uint16(317), uint16(140), uint16(317), uint16(317), uint16(317), uint16(317), uint16(317), uint16(317), uint16(317),
+ /* 2030 */ uint16(317), uint16(317), uint16(317), uint16(317), uint16(317), uint16(317), uint16(317), uint16(317), uint16(317), uint16(317),
+ /* 2040 */ uint16(317), uint16(317), uint16(317), uint16(317), uint16(317), uint16(317), uint16(317), uint16(317), uint16(317), uint16(317),
+ /* 2050 */ uint16(317), uint16(317), uint16(317), uint16(317), uint16(317), uint16(317), uint16(317), uint16(317), uint16(317), uint16(317),
+ /* 2060 */ uint16(317), uint16(317), uint16(317), uint16(317), uint16(317), uint16(317), uint16(317), uint16(317), uint16(317), uint16(317),
+ /* 2070 */ uint16(317), uint16(317), uint16(317), uint16(317), uint16(317), uint16(317), uint16(317), uint16(317), uint16(317), uint16(317),
+ /* 2080 */ uint16(317), uint16(317), uint16(317), uint16(317), uint16(317), uint16(317), uint16(317), uint16(317), uint16(317), uint16(317),
+ /* 2090 */ uint16(317), uint16(317), uint16(317), uint16(317), uint16(317), uint16(317), uint16(317), uint16(317), uint16(317), uint16(317),
+ /* 2100 */ uint16(317), uint16(317), uint16(317), uint16(317), uint16(317), uint16(317), uint16(317), uint16(317), uint16(317), uint16(317),
+ /* 2110 */ uint16(317), uint16(317), uint16(317), uint16(317), uint16(317), uint16(317), uint16(317), uint16(317), uint16(317), uint16(317),
+ /* 2120 */ uint16(317), uint16(317), uint16(317), uint16(317), uint16(317), uint16(317), uint16(317), uint16(317), uint16(317), uint16(317),
+ /* 2130 */ uint16(317), uint16(317), uint16(317), uint16(317), uint16(317), uint16(317), uint16(317), uint16(317), uint16(317), uint16(317),
+ /* 2140 */ uint16(317), uint16(317), uint16(317), uint16(317), uint16(317), uint16(317), uint16(317), uint16(317), uint16(317), uint16(317),
+ /* 2150 */ uint16(317), uint16(317), uint16(317), uint16(317), uint16(317), uint16(317), uint16(317), uint16(317), uint16(317), uint16(317),
+ /* 2160 */ uint16(317), uint16(317), uint16(317), uint16(317), uint16(317), uint16(317), uint16(317), uint16(317), uint16(317), uint16(317),
+ /* 2170 */ uint16(317), uint16(317), uint16(317), uint16(317), uint16(317), uint16(317), uint16(317), uint16(317), uint16(317), uint16(317),
+ /* 2180 */ uint16(317), uint16(317), uint16(317), uint16(317), uint16(317), uint16(317), uint16(317), uint16(317), uint16(317), uint16(317),
+ /* 2190 */ uint16(317), uint16(317), uint16(317), uint16(317), uint16(317), uint16(317), uint16(317), uint16(317), uint16(317), uint16(317),
+ /* 2200 */ uint16(317), uint16(317), uint16(317), uint16(317), uint16(317), uint16(317), uint16(317),
+} /* sqlite3.c:158793:25 */
var yy_shift_ofst = [570]uint16{
- /* 0 */ uint16(1423), uint16(1409), uint16(1454), uint16(1192), uint16(1192), uint16(36), uint16(1252), uint16(1410), uint16(1517), uint16(1684),
- /* 10 */ uint16(1684), uint16(1684), uint16(292), uint16(0), uint16(0), uint16(180), uint16(1015), uint16(1684), uint16(1684), uint16(1684),
+ /* 0 */ uint16(1423), uint16(1409), uint16(1454), uint16(1192), uint16(1192), uint16(382), uint16(1252), uint16(1410), uint16(1517), uint16(1684),
+ /* 10 */ uint16(1684), uint16(1684), uint16(221), uint16(0), uint16(0), uint16(180), uint16(1015), uint16(1684), uint16(1684), uint16(1684),
/* 20 */ uint16(1684), uint16(1684), uint16(1684), uint16(1684), uint16(1684), uint16(1684), uint16(1684), uint16(1684), uint16(1684), uint16(1684),
- /* 30 */ uint16(1049), uint16(1049), uint16(1121), uint16(1121), uint16(54), uint16(400), uint16(36), uint16(36), uint16(36), uint16(36),
- /* 40 */ uint16(36), uint16(40), uint16(110), uint16(219), uint16(289), uint16(396), uint16(439), uint16(509), uint16(548), uint16(618),
+ /* 30 */ uint16(1049), uint16(1049), uint16(1121), uint16(1121), uint16(54), uint16(616), uint16(382), uint16(382), uint16(382), uint16(382),
+ /* 40 */ uint16(382), uint16(40), uint16(110), uint16(219), uint16(289), uint16(396), uint16(439), uint16(509), uint16(548), uint16(618),
/* 50 */ uint16(657), uint16(727), uint16(766), uint16(836), uint16(995), uint16(1015), uint16(1015), uint16(1015), uint16(1015), uint16(1015),
/* 60 */ uint16(1015), uint16(1015), uint16(1015), uint16(1015), uint16(1015), uint16(1015), uint16(1015), uint16(1015), uint16(1015), uint16(1015),
/* 70 */ uint16(1015), uint16(1015), uint16(1015), uint16(1035), uint16(1015), uint16(1138), uint16(880), uint16(880), uint16(1577), uint16(1684),
@@ -137956,94 +140516,94 @@ var yy_shift_ofst = [570]uint16{
/* 100 */ uint16(1684), uint16(1684), uint16(1684), uint16(1684), uint16(1684), uint16(1684), uint16(1684), uint16(1684), uint16(1684), uint16(1684),
/* 110 */ uint16(1684), uint16(1684), uint16(1684), uint16(1705), uint16(1684), uint16(1684), uint16(1684), uint16(1684), uint16(1684), uint16(1684),
/* 120 */ uint16(1684), uint16(1684), uint16(1684), uint16(1684), uint16(1684), uint16(1684), uint16(1684), uint16(146), uint16(84), uint16(84),
- /* 130 */ uint16(84), uint16(84), uint16(84), uint16(362), uint16(269), uint16(125), uint16(97), uint16(453), uint16(66), uint16(66),
- /* 140 */ uint16(893), uint16(1090), uint16(66), uint16(66), uint16(533), uint16(533), uint16(66), uint16(554), uint16(554), uint16(554),
- /* 150 */ uint16(554), uint16(192), uint16(587), uint16(587), uint16(695), uint16(25), uint16(2020), uint16(2020), uint16(290), uint16(290),
- /* 160 */ uint16(290), uint16(200), uint16(514), uint16(514), uint16(514), uint16(514), uint16(939), uint16(939), uint16(442), uint16(875),
- /* 170 */ uint16(935), uint16(66), uint16(66), uint16(66), uint16(66), uint16(66), uint16(66), uint16(66), uint16(66), uint16(66),
+ /* 130 */ uint16(84), uint16(84), uint16(84), uint16(274), uint16(315), uint16(125), uint16(97), uint16(357), uint16(66), uint16(66),
+ /* 140 */ uint16(893), uint16(258), uint16(66), uint16(66), uint16(371), uint16(371), uint16(66), uint16(551), uint16(551), uint16(551),
+ /* 150 */ uint16(551), uint16(192), uint16(209), uint16(209), uint16(278), uint16(127), uint16(2023), uint16(2023), uint16(621), uint16(621),
+ /* 160 */ uint16(621), uint16(201), uint16(398), uint16(398), uint16(398), uint16(398), uint16(939), uint16(939), uint16(442), uint16(936),
+ /* 170 */ uint16(1009), uint16(66), uint16(66), uint16(66), uint16(66), uint16(66), uint16(66), uint16(66), uint16(66), uint16(66),
/* 180 */ uint16(66), uint16(66), uint16(66), uint16(66), uint16(66), uint16(66), uint16(66), uint16(66), uint16(66), uint16(66),
- /* 190 */ uint16(66), uint16(601), uint16(601), uint16(66), uint16(729), uint16(878), uint16(878), uint16(1266), uint16(1266), uint16(552),
- /* 200 */ uint16(1023), uint16(2020), uint16(2020), uint16(2020), uint16(2020), uint16(2020), uint16(2020), uint16(2020), uint16(307), uint16(490),
- /* 210 */ uint16(490), uint16(567), uint16(393), uint16(517), uint16(467), uint16(672), uint16(242), uint16(682), uint16(675), uint16(66),
- /* 220 */ uint16(66), uint16(66), uint16(66), uint16(66), uint16(66), uint16(66), uint16(66), uint16(66), uint16(66), uint16(616),
+ /* 190 */ uint16(66), uint16(710), uint16(710), uint16(66), uint16(776), uint16(435), uint16(435), uint16(410), uint16(410), uint16(372),
+ /* 200 */ uint16(1097), uint16(2023), uint16(2023), uint16(2023), uint16(2023), uint16(2023), uint16(2023), uint16(2023), uint16(250), uint16(490),
+ /* 210 */ uint16(490), uint16(511), uint16(451), uint16(516), uint16(252), uint16(566), uint16(575), uint16(781), uint16(673), uint16(66),
+ /* 220 */ uint16(66), uint16(66), uint16(66), uint16(66), uint16(66), uint16(66), uint16(66), uint16(66), uint16(66), uint16(722),
/* 230 */ uint16(66), uint16(66), uint16(66), uint16(66), uint16(66), uint16(66), uint16(66), uint16(66), uint16(66), uint16(66),
- /* 240 */ uint16(66), uint16(66), uint16(1093), uint16(1093), uint16(1093), uint16(66), uint16(66), uint16(66), uint16(778), uint16(66),
- /* 250 */ uint16(66), uint16(66), uint16(1053), uint16(1064), uint16(66), uint16(66), uint16(1190), uint16(66), uint16(66), uint16(66),
- /* 260 */ uint16(66), uint16(66), uint16(66), uint16(66), uint16(66), uint16(722), uint16(992), uint16(718), uint16(253), uint16(253),
- /* 270 */ uint16(253), uint16(253), uint16(338), uint16(718), uint16(718), uint16(888), uint16(403), uint16(852), uint16(1328), uint16(254),
- /* 280 */ uint16(1295), uint16(721), uint16(1330), uint16(1295), uint16(1330), uint16(1370), uint16(234), uint16(254), uint16(254), uint16(234),
- /* 290 */ uint16(254), uint16(721), uint16(1370), uint16(1357), uint16(1492), uint16(1348), uint16(385), uint16(385), uint16(385), uint16(1330),
- /* 300 */ uint16(1425), uint16(1425), uint16(643), uint16(1315), uint16(1336), uint16(1004), uint16(1651), uint16(1651), uint16(1581), uint16(1581),
- /* 310 */ uint16(1674), uint16(1674), uint16(1581), uint16(1576), uint16(1579), uint16(1716), uint16(1696), uint16(1724), uint16(1724), uint16(1724),
- /* 320 */ uint16(1724), uint16(1581), uint16(1732), uint16(1606), uint16(1579), uint16(1579), uint16(1606), uint16(1716), uint16(1696), uint16(1606),
- /* 330 */ uint16(1696), uint16(1606), uint16(1581), uint16(1732), uint16(1608), uint16(1706), uint16(1581), uint16(1732), uint16(1750), uint16(1581),
- /* 340 */ uint16(1732), uint16(1581), uint16(1732), uint16(1750), uint16(1660), uint16(1660), uint16(1660), uint16(1711), uint16(1766), uint16(1766),
- /* 350 */ uint16(1750), uint16(1660), uint16(1664), uint16(1660), uint16(1711), uint16(1660), uint16(1660), uint16(1628), uint16(1769), uint16(1683),
- /* 360 */ uint16(1683), uint16(1750), uint16(1653), uint16(1709), uint16(1653), uint16(1709), uint16(1653), uint16(1709), uint16(1653), uint16(1709),
- /* 370 */ uint16(1581), uint16(1735), uint16(1735), uint16(1746), uint16(1746), uint16(1682), uint16(1686), uint16(1809), uint16(1581), uint16(1685),
- /* 380 */ uint16(1682), uint16(1697), uint16(1699), uint16(1606), uint16(1821), uint16(1825), uint16(1840), uint16(1840), uint16(1864), uint16(1864),
- /* 390 */ uint16(1864), uint16(2020), uint16(2020), uint16(2020), uint16(2020), uint16(2020), uint16(2020), uint16(2020), uint16(2020), uint16(2020),
- /* 400 */ uint16(2020), uint16(2020), uint16(2020), uint16(2020), uint16(2020), uint16(2020), uint16(599), uint16(223), uint16(1193), uint16(1299),
- /* 410 */ uint16(228), uint16(780), uint16(958), uint16(1505), uint16(1153), uint16(1435), uint16(1368), uint16(1426), uint16(1430), uint16(1552),
- /* 420 */ uint16(1477), uint16(1556), uint16(1557), uint16(1564), uint16(1572), uint16(1578), uint16(1580), uint16(1489), uint16(1474), uint16(1602),
- /* 430 */ uint16(1389), uint16(1514), uint16(1500), uint16(1595), uint16(1596), uint16(1484), uint16(1603), uint16(1075), uint16(1460), uint16(1605),
- /* 440 */ uint16(1612), uint16(1526), uint16(1507), uint16(1882), uint16(1884), uint16(1866), uint16(1727), uint16(1875), uint16(1876), uint16(1868),
- /* 450 */ uint16(1870), uint16(1757), uint16(1747), uint16(1767), uint16(1872), uint16(1872), uint16(1877), uint16(1758), uint16(1880), uint16(1759),
- /* 460 */ uint16(1887), uint16(1903), uint16(1764), uint16(1777), uint16(1872), uint16(1778), uint16(1847), uint16(1873), uint16(1872), uint16(1761),
- /* 470 */ uint16(1856), uint16(1862), uint16(1863), uint16(1865), uint16(1788), uint16(1804), uint16(1886), uint16(1781), uint16(1921), uint16(1918),
- /* 480 */ uint16(1902), uint16(1811), uint16(1768), uint16(1858), uint16(1901), uint16(1861), uint16(1855), uint16(1890), uint16(1792), uint16(1819),
- /* 490 */ uint16(1910), uint16(1915), uint16(1917), uint16(1807), uint16(1814), uint16(1919), uint16(1878), uint16(1920), uint16(1922), uint16(1916),
- /* 500 */ uint16(1924), uint16(1881), uint16(1888), uint16(1925), uint16(1844), uint16(1923), uint16(1928), uint16(1885), uint16(1906), uint16(1930),
- /* 510 */ uint16(1806), uint16(1933), uint16(1934), uint16(1935), uint16(1936), uint16(1937), uint16(1938), uint16(1940), uint16(1859), uint16(1820),
- /* 520 */ uint16(1941), uint16(1942), uint16(1851), uint16(1939), uint16(1945), uint16(1826), uint16(1943), uint16(1944), uint16(1946), uint16(1947),
- /* 530 */ uint16(1948), uint16(1883), uint16(1895), uint16(1889), uint16(1932), uint16(1897), uint16(1891), uint16(1949), uint16(1951), uint16(1955),
- /* 540 */ uint16(1961), uint16(1953), uint16(1960), uint16(1954), uint16(1964), uint16(1943), uint16(1966), uint16(1967), uint16(1968), uint16(1969),
+ /* 240 */ uint16(66), uint16(66), uint16(790), uint16(790), uint16(790), uint16(66), uint16(66), uint16(66), uint16(883), uint16(66),
+ /* 250 */ uint16(66), uint16(66), uint16(891), uint16(1064), uint16(66), uint16(66), uint16(1212), uint16(66), uint16(66), uint16(66),
+ /* 260 */ uint16(66), uint16(66), uint16(66), uint16(66), uint16(66), uint16(725), uint16(763), uint16(177), uint16(940), uint16(940),
+ /* 270 */ uint16(940), uint16(940), uint16(337), uint16(177), uint16(177), uint16(1028), uint16(1053), uint16(670), uint16(1264), uint16(1179),
+ /* 280 */ uint16(1173), uint16(1254), uint16(1316), uint16(1173), uint16(1316), uint16(1336), uint16(50), uint16(1179), uint16(1179), uint16(50),
+ /* 290 */ uint16(1179), uint16(1254), uint16(1336), uint16(1259), uint16(732), uint16(532), uint16(1347), uint16(1347), uint16(1347), uint16(1316),
+ /* 300 */ uint16(1236), uint16(1236), uint16(1184), uint16(1356), uint16(1167), uint16(898), uint16(1650), uint16(1650), uint16(1572), uint16(1572),
+ /* 310 */ uint16(1685), uint16(1685), uint16(1572), uint16(1576), uint16(1579), uint16(1712), uint16(1692), uint16(1722), uint16(1722), uint16(1722),
+ /* 320 */ uint16(1722), uint16(1572), uint16(1732), uint16(1604), uint16(1579), uint16(1579), uint16(1604), uint16(1712), uint16(1692), uint16(1604),
+ /* 330 */ uint16(1692), uint16(1604), uint16(1572), uint16(1732), uint16(1610), uint16(1707), uint16(1572), uint16(1732), uint16(1751), uint16(1572),
+ /* 340 */ uint16(1732), uint16(1572), uint16(1732), uint16(1751), uint16(1665), uint16(1665), uint16(1665), uint16(1723), uint16(1766), uint16(1766),
+ /* 350 */ uint16(1751), uint16(1665), uint16(1664), uint16(1665), uint16(1723), uint16(1665), uint16(1665), uint16(1629), uint16(1772), uint16(1698),
+ /* 360 */ uint16(1698), uint16(1751), uint16(1674), uint16(1709), uint16(1674), uint16(1709), uint16(1674), uint16(1709), uint16(1674), uint16(1709),
+ /* 370 */ uint16(1572), uint16(1736), uint16(1736), uint16(1746), uint16(1746), uint16(1682), uint16(1686), uint16(1810), uint16(1572), uint16(1688),
+ /* 380 */ uint16(1682), uint16(1695), uint16(1697), uint16(1604), uint16(1821), uint16(1838), uint16(1853), uint16(1853), uint16(1864), uint16(1864),
+ /* 390 */ uint16(1864), uint16(2023), uint16(2023), uint16(2023), uint16(2023), uint16(2023), uint16(2023), uint16(2023), uint16(2023), uint16(2023),
+ /* 400 */ uint16(2023), uint16(2023), uint16(2023), uint16(2023), uint16(2023), uint16(2023), uint16(232), uint16(101), uint16(1131), uint16(1193),
+ /* 410 */ uint16(619), uint16(679), uint16(841), uint16(1421), uint16(1286), uint16(115), uint16(1352), uint16(1334), uint16(1361), uint16(1419),
+ /* 420 */ uint16(1342), uint16(1505), uint16(1531), uint16(1585), uint16(1593), uint16(1605), uint16(1612), uint16(1280), uint16(1337), uint16(1491),
+ /* 430 */ uint16(1358), uint16(1451), uint16(1332), uint16(1616), uint16(1617), uint16(1425), uint16(1618), uint16(1386), uint16(1431), uint16(1624),
+ /* 440 */ uint16(1626), uint16(1399), uint16(1460), uint16(1880), uint16(1883), uint16(1865), uint16(1726), uint16(1876), uint16(1877), uint16(1869),
+ /* 450 */ uint16(1871), uint16(1757), uint16(1747), uint16(1767), uint16(1872), uint16(1872), uint16(1875), uint16(1759), uint16(1881), uint16(1760),
+ /* 460 */ uint16(1886), uint16(1903), uint16(1764), uint16(1777), uint16(1872), uint16(1778), uint16(1847), uint16(1878), uint16(1872), uint16(1762),
+ /* 470 */ uint16(1860), uint16(1861), uint16(1863), uint16(1866), uint16(1788), uint16(1803), uint16(1887), uint16(1780), uint16(1921), uint16(1918),
+ /* 480 */ uint16(1902), uint16(1811), uint16(1768), uint16(1858), uint16(1901), uint16(1862), uint16(1854), uint16(1890), uint16(1792), uint16(1819),
+ /* 490 */ uint16(1910), uint16(1915), uint16(1917), uint16(1807), uint16(1814), uint16(1919), uint16(1873), uint16(1920), uint16(1922), uint16(1916),
+ /* 500 */ uint16(1923), uint16(1879), uint16(1884), uint16(1924), uint16(1851), uint16(1925), uint16(1927), uint16(1885), uint16(1913), uint16(1928),
+ /* 510 */ uint16(1806), uint16(1933), uint16(1934), uint16(1935), uint16(1936), uint16(1930), uint16(1937), uint16(1939), uint16(1867), uint16(1822),
+ /* 520 */ uint16(1940), uint16(1942), uint16(1852), uint16(1932), uint16(1946), uint16(1827), uint16(1944), uint16(1938), uint16(1941), uint16(1943),
+ /* 530 */ uint16(1945), uint16(1888), uint16(1896), uint16(1892), uint16(1929), uint16(1899), uint16(1889), uint16(1947), uint16(1957), uint16(1961),
+ /* 540 */ uint16(1960), uint16(1959), uint16(1962), uint16(1952), uint16(1964), uint16(1944), uint16(1966), uint16(1967), uint16(1968), uint16(1969),
/* 550 */ uint16(1970), uint16(1971), uint16(1973), uint16(1982), uint16(1975), uint16(1976), uint16(1977), uint16(1978), uint16(1980), uint16(1981),
- /* 560 */ uint16(1979), uint16(1874), uint16(1867), uint16(1869), uint16(1871), uint16(1879), uint16(1983), uint16(1984), uint16(2003), uint16(2009),
-} /* sqlite3.c:158010:33 */
+ /* 560 */ uint16(1979), uint16(1870), uint16(1859), uint16(1868), uint16(1874), uint16(1882), uint16(1983), uint16(1992), uint16(2008), uint16(2009),
+} /* sqlite3.c:159019:33 */
var yy_reduce_ofst = [406]int16{
- /* 0 */ int16(111), int16(168), int16(386), int16(761), int16(-176), int16(-174), int16(-191), int16(-189), int16(-181), int16(-178),
- /* 10 */ int16(176), int16(263), int16(44), int16(-207), int16(-204), int16(-265), int16(-139), int16(-114), int16(158), int16(504),
- /* 20 */ int16(525), int16(544), int16(612), int16(614), int16(650), int16(652), int16(765), int16(265), int16(703), int16(705),
- /* 30 */ int16(70), int16(714), int16(-187), int16(127), int16(774), int16(713), int16(767), int16(769), int16(970), int16(1019),
- /* 40 */ int16(1021), int16(-255), int16(-255), int16(-255), int16(-255), int16(-255), int16(-255), int16(-255), int16(-255), int16(-255),
- /* 50 */ int16(-255), int16(-255), int16(-255), int16(-255), int16(-255), int16(-255), int16(-255), int16(-255), int16(-255), int16(-255),
- /* 60 */ int16(-255), int16(-255), int16(-255), int16(-255), int16(-255), int16(-255), int16(-255), int16(-255), int16(-255), int16(-255),
- /* 70 */ int16(-255), int16(-255), int16(-255), int16(-255), int16(-255), int16(-255), int16(-255), int16(-255), int16(394), int16(542),
- /* 80 */ int16(816), int16(818), int16(842), int16(882), int16(902), int16(919), int16(938), int16(940), int16(957), int16(986),
- /* 90 */ int16(1048), int16(1063), int16(1068), int16(1073), int16(1076), int16(1088), int16(1100), int16(1102), int16(1104), int16(1106),
- /* 100 */ int16(1113), int16(1119), int16(1137), int16(1140), int16(1143), int16(1147), int16(1149), int16(1164), int16(1173), int16(1183),
- /* 110 */ int16(1185), int16(1188), int16(1202), int16(1204), int16(1247), int16(1259), int16(1263), int16(1283), int16(1289), int16(1292),
- /* 120 */ int16(1298), int16(1300), int16(1329), int16(1331), int16(1343), int16(1358), int16(1360), int16(-255), int16(-255), int16(-255),
- /* 130 */ int16(-255), int16(-255), int16(-255), int16(-255), int16(-255), int16(196), int16(-255), int16(387), int16(-177), int16(507),
- /* 140 */ int16(1002), int16(-219), int16(557), int16(-93), int16(-167), int16(638), int16(-121), int16(284), int16(500), int16(284),
- /* 150 */ int16(500), int16(247), int16(651), int16(865), int16(-255), int16(-255), int16(-255), int16(-255), int16(-85), int16(-85),
- /* 160 */ int16(-85), int16(237), int16(171), int16(602), int16(846), int16(885), int16(-212), int16(-203), int16(217), int16(380),
- /* 170 */ int16(380), int16(-23), int16(161), int16(653), int16(712), int16(773), int16(943), int16(990), int16(1040), int16(563),
- /* 180 */ int16(833), int16(971), int16(1005), int16(1042), int16(1092), int16(1078), int16(1043), int16(1144), int16(1184), int16(-186),
- /* 190 */ int16(1105), int16(318), int16(869), int16(7), int16(825), int16(920), int16(1074), int16(704), int16(706), int16(390),
- /* 200 */ int16(1087), int16(1094), int16(336), int16(545), int16(772), int16(1201), int16(1117), int16(1207), int16(-179), int16(-137),
- /* 210 */ int16(-112), int16(-13), int16(18), int16(112), int16(197), int16(418), int16(495), int16(508), int16(777), int16(809),
- /* 220 */ int16(923), int16(1014), int16(1027), int16(1033), int16(1044), int16(1115), int16(1194), int16(1212), int16(1221), int16(209),
- /* 230 */ int16(1236), int16(1240), int16(1256), int16(1287), int16(1301), int16(1307), int16(1349), int16(1359), int16(1398), int16(1417),
- /* 240 */ int16(1429), int16(1434), int16(681), int16(1377), int16(1404), int16(1448), int16(1449), int16(1450), int16(1388), int16(1453),
- /* 250 */ int16(1455), int16(1458), int16(1393), int16(1335), int16(1461), int16(1462), int16(1418), int16(1463), int16(197), int16(1464),
- /* 260 */ int16(1465), int16(1466), int16(1467), int16(1468), int16(1469), int16(1376), int16(1378), int16(1424), int16(1412), int16(1413),
- /* 270 */ int16(1414), int16(1415), int16(1388), int16(1424), int16(1424), int16(1428), int16(1470), int16(1485), int16(1381), int16(1408),
- /* 280 */ int16(1416), int16(1436), int16(1431), int16(1422), int16(1432), int16(1392), int16(1446), int16(1411), int16(1427), int16(1456),
- /* 290 */ int16(1433), int16(1471), int16(1401), int16(1479), int16(1472), int16(1478), int16(1486), int16(1491), int16(1493), int16(1452),
- /* 300 */ int16(1459), int16(1473), int16(1437), int16(1475), int16(1476), int16(1516), int16(1421), int16(1440), int16(1520), int16(1524),
- /* 310 */ int16(1444), int16(1445), int16(1525), int16(1457), int16(1480), int16(1481), int16(1509), int16(1510), int16(1511), int16(1512),
- /* 320 */ int16(1513), int16(1553), int16(1555), int16(1515), int16(1487), int16(1488), int16(1518), int16(1495), int16(1522), int16(1523),
- /* 330 */ int16(1528), int16(1527), int16(1562), int16(1566), int16(1482), int16(1494), int16(1569), int16(1574), int16(1559), int16(1575),
- /* 340 */ int16(1582), int16(1583), int16(1585), int16(1560), int16(1568), int16(1570), int16(1571), int16(1563), int16(1573), int16(1586),
- /* 350 */ int16(1584), int16(1588), int16(1589), int16(1593), int16(1590), int16(1594), int16(1598), int16(1501), int16(1496), int16(1536),
- /* 360 */ int16(1537), int16(1599), int16(1561), int16(1567), int16(1587), int16(1591), int16(1592), int16(1597), int16(1604), int16(1607),
- /* 370 */ int16(1629), int16(1519), int16(1521), int16(1601), int16(1609), int16(1600), int16(1610), int16(1558), int16(1636), int16(1565),
- /* 380 */ int16(1618), int16(1621), int16(1611), int16(1624), int16(1648), int16(1652), int16(1676), int16(1677), int16(1687), int16(1688),
- /* 390 */ int16(1689), int16(1613), int16(1614), int16(1615), int16(1668), int16(1663), int16(1665), int16(1666), int16(1670), int16(1678),
- /* 400 */ int16(1655), int16(1662), int16(1672), int16(1673), int16(1675), int16(1690),
-} /* sqlite3.c:158072:20 */
+ /* 0 */ int16(111), int16(168), int16(272), int16(760), int16(-177), int16(-175), int16(-192), int16(-190), int16(-182), int16(-179),
+ /* 10 */ int16(216), int16(220), int16(481), int16(-208), int16(-205), int16(-266), int16(-140), int16(-115), int16(241), int16(393),
+ /* 20 */ int16(523), int16(325), int16(612), int16(632), int16(542), int16(651), int16(764), int16(757), int16(702), int16(762),
+ /* 30 */ int16(812), int16(814), int16(-188), int16(273), int16(924), int16(386), int16(758), int16(967), int16(1020), int16(1052),
+ /* 40 */ int16(1066), int16(-256), int16(-256), int16(-256), int16(-256), int16(-256), int16(-256), int16(-256), int16(-256), int16(-256),
+ /* 50 */ int16(-256), int16(-256), int16(-256), int16(-256), int16(-256), int16(-256), int16(-256), int16(-256), int16(-256), int16(-256),
+ /* 60 */ int16(-256), int16(-256), int16(-256), int16(-256), int16(-256), int16(-256), int16(-256), int16(-256), int16(-256), int16(-256),
+ /* 70 */ int16(-256), int16(-256), int16(-256), int16(-256), int16(-256), int16(-256), int16(-256), int16(-256), int16(195), int16(222),
+ /* 80 */ int16(813), int16(917), int16(920), int16(959), int16(985), int16(1006), int16(1038), int16(1067), int16(1069), int16(1072),
+ /* 90 */ int16(1099), int16(1103), int16(1105), int16(1118), int16(1135), int16(1139), int16(1142), int16(1146), int16(1148), int16(1159),
+ /* 100 */ int16(1174), int16(1178), int16(1183), int16(1185), int16(1187), int16(1198), int16(1202), int16(1246), int16(1258), int16(1260),
+ /* 110 */ int16(1262), int16(1288), int16(1291), int16(1299), int16(1304), int16(1319), int16(1328), int16(1330), int16(1357), int16(1359),
+ /* 120 */ int16(1364), int16(1366), int16(1375), int16(1390), int16(1395), int16(1406), int16(1411), int16(-256), int16(-256), int16(-256),
+ /* 130 */ int16(-256), int16(-256), int16(-256), int16(-256), int16(-256), int16(447), int16(-256), int16(555), int16(-178), int16(605),
+ /* 140 */ int16(832), int16(-220), int16(606), int16(-94), int16(-168), int16(36), int16(-122), int16(730), int16(780), int16(730),
+ /* 150 */ int16(780), int16(918), int16(-136), int16(338), int16(-256), int16(-256), int16(-256), int16(-256), int16(80), int16(80),
+ /* 160 */ int16(80), int16(720), int16(703), int16(811), int16(882), int16(903), int16(-213), int16(-204), int16(106), int16(330),
+ /* 170 */ int16(330), int16(-77), int16(236), int16(320), int16(599), int16(67), int16(457), int16(675), int16(729), int16(395),
+ /* 180 */ int16(268), int16(611), int16(969), int16(1004), int16(726), int16(1014), int16(983), int16(123), int16(884), int16(608),
+ /* 190 */ int16(1034), int16(547), int16(911), int16(650), int16(844), int16(922), int16(949), int16(965), int16(972), int16(978),
+ /* 200 */ int16(449), int16(970), int16(718), int16(784), int16(1073), int16(1084), int16(1023), int16(1129), int16(-209), int16(-180),
+ /* 210 */ int16(-113), int16(114), int16(183), int16(329), int16(345), int16(391), int16(446), int16(502), int16(609), int16(667),
+ /* 220 */ int16(713), int16(817), int16(865), int16(881), int16(901), int16(921), int16(989), int16(1191), int16(1195), int16(214),
+ /* 230 */ int16(1223), int16(1235), int16(1251), int16(1367), int16(1376), int16(1377), int16(1383), int16(1385), int16(1401), int16(1402),
+ /* 240 */ int16(1403), int16(1414), int16(584), int16(638), int16(1305), int16(1420), int16(1422), int16(1426), int16(1294), int16(1430),
+ /* 250 */ int16(1435), int16(1437), int16(1348), int16(1329), int16(1459), int16(1461), int16(1412), int16(1462), int16(345), int16(1463),
+ /* 260 */ int16(1464), int16(1465), int16(1466), int16(1467), int16(1468), int16(1378), int16(1380), int16(1427), int16(1408), int16(1413),
+ /* 270 */ int16(1415), int16(1428), int16(1294), int16(1427), int16(1427), int16(1433), int16(1450), int16(1473), int16(1381), int16(1417),
+ /* 280 */ int16(1424), int16(1432), int16(1434), int16(1436), int16(1438), int16(1387), int16(1443), int16(1429), int16(1439), int16(1444),
+ /* 290 */ int16(1440), int16(1453), int16(1388), int16(1481), int16(1455), int16(1457), int16(1483), int16(1485), int16(1488), int16(1456),
+ /* 300 */ int16(1469), int16(1470), int16(1441), int16(1471), int16(1474), int16(1512), int16(1416), int16(1442), int16(1519), int16(1522),
+ /* 310 */ int16(1446), int16(1447), int16(1523), int16(1472), int16(1475), int16(1476), int16(1504), int16(1507), int16(1511), int16(1513),
+ /* 320 */ int16(1514), int16(1548), int16(1553), int16(1510), int16(1486), int16(1487), int16(1515), int16(1490), int16(1528), int16(1518),
+ /* 330 */ int16(1529), int16(1521), int16(1564), int16(1568), int16(1480), int16(1484), int16(1571), int16(1574), int16(1555), int16(1578),
+ /* 340 */ int16(1580), int16(1581), int16(1583), int16(1556), int16(1566), int16(1567), int16(1569), int16(1561), int16(1570), int16(1573),
+ /* 350 */ int16(1575), int16(1582), int16(1584), int16(1587), int16(1588), int16(1590), int16(1591), int16(1498), int16(1506), int16(1534),
+ /* 360 */ int16(1535), int16(1597), int16(1560), int16(1586), int16(1565), int16(1589), int16(1592), int16(1594), int16(1595), int16(1598),
+ /* 370 */ int16(1627), int16(1516), int16(1520), int16(1599), int16(1600), int16(1601), int16(1596), int16(1558), int16(1635), int16(1602),
+ /* 380 */ int16(1607), int16(1619), int16(1603), int16(1606), int16(1651), int16(1666), int16(1675), int16(1676), int16(1680), int16(1681),
+ /* 390 */ int16(1683), int16(1608), int16(1609), int16(1613), int16(1668), int16(1667), int16(1669), int16(1670), int16(1671), int16(1672),
+ /* 400 */ int16(1655), int16(1656), int16(1673), int16(1677), int16(1679), int16(1678),
+} /* sqlite3.c:159081:20 */
var yy_default = [570]uint16{
/* 0 */ uint16(1623), uint16(1623), uint16(1623), uint16(1453), uint16(1223), uint16(1332), uint16(1223), uint16(1223), uint16(1223), uint16(1453),
/* 10 */ uint16(1453), uint16(1453), uint16(1223), uint16(1362), uint16(1362), uint16(1506), uint16(1254), uint16(1223), uint16(1223), uint16(1223),
@@ -138102,7 +140662,7 @@ var yy_default = [570]uint16{
/* 540 */ uint16(1223), uint16(1556), uint16(1357), uint16(1223), uint16(1223), uint16(1602), uint16(1223), uint16(1223), uint16(1223), uint16(1223),
/* 550 */ uint16(1223), uint16(1223), uint16(1223), uint16(1223), uint16(1223), uint16(1223), uint16(1223), uint16(1223), uint16(1223), uint16(1223),
/* 560 */ uint16(1596), uint16(1313), uint16(1404), uint16(1223), uint16(1403), uint16(1407), uint16(1223), uint16(1235), uint16(1223), uint16(1223),
-} /* sqlite3.c:158115:27 */
+} /* sqlite3.c:159124:27 */
//********* End of lemon-generated parsing tables ****************************
// The next table maps tokens (terminal symbols) into fallback tokens.
@@ -138118,7 +140678,7 @@ var yy_default = [570]uint16{
// This feature can be used, for example, to cause some keywords in a language
// to revert to identifiers if they keyword does not apply in the context where
// it appears.
-var yyFallback = [183]uint16{
+var yyFallback = [184]uint16{
uint16(0), // $ => nothing
uint16(0), // SEMI => nothing
uint16(59), // EXPLAIN => ID
@@ -138300,9 +140860,10 @@ var yyFallback = [183]uint16{
uint16(0), // IF_NULL_ROW => nothing
uint16(0), // ASTERISK => nothing
uint16(0), // SPAN => nothing
+ uint16(0), // ERROR => nothing
uint16(0), // SPACE => nothing
uint16(0), // ILLEGAL => nothing
-} /* sqlite3.c:158191:25 */
+} /* sqlite3.c:159200:25 */
// The following structure represents a single element of the
// parser's stack. Information stored includes:
@@ -138320,13 +140881,13 @@ var yyFallback = [183]uint16{
// actually contains the reduce action for the second half of the
// SHIFTREDUCE.
type yyStackEntry = struct {
- Fstateno uint16
- Fmajor uint16
- _ [4]byte
- Fminor YYMINORTYPE
-} /* sqlite3.c:158394:1 */
+ Fstateno uint16
+ Fmajor uint16
+ F__ccgo_pad1 [4]byte
+ Fminor YYMINORTYPE
+} /* sqlite3.c:159404:1 */
-type YyStackEntry = yyStackEntry /* sqlite3.c:158401:29 */
+type YyStackEntry = yyStackEntry /* sqlite3.c:159411:29 */
// The state of the parser is completely contained in an instance of
// the following structure
@@ -138335,9 +140896,9 @@ type yyParser = struct {
FpParse uintptr
Fyystack [100]YyStackEntry
FyystackEnd uintptr
-} /* sqlite3.c:158405:1 */
+} /* sqlite3.c:159415:1 */
-type YyParser = yyParser /* sqlite3.c:158424:25 */
+type YyParser = yyParser /* sqlite3.c:159434:25 */
// Datatype of the argument to the memory allocated passed as the
// second argument to sqlite3ParserAlloc() below. This can be changed by
@@ -138345,7 +140906,7 @@ type YyParser = yyParser /* sqlite3.c:158424:25 */
// grammar.
// Initialize a new parser that has already been allocated.
-func Xsqlite3ParserInit(tls *libc.TLS, yypRawParser uintptr, pParse uintptr) { /* sqlite3.c:159232:21: */
+func Xsqlite3ParserInit(tls *libc.TLS, yypRawParser uintptr, pParse uintptr) { /* sqlite3.c:160243:21: */
var yypParser uintptr = yypRawParser
(*YyParser)(unsafe.Pointer(yypParser)).FpParse = pParse
(*YyParser)(unsafe.Pointer(yypParser)).Fyytos = yypParser + 16 /* &.yystack */
@@ -138360,7 +140921,7 @@ func Xsqlite3ParserInit(tls *libc.TLS, yypRawParser uintptr, pParse uintptr) { /
// a pointer to the value to be deleted. The code used to do the
// deletions is derived from the %destructor and/or %token_destructor
// directives of the input grammar.
-func yy_destructor(tls *libc.TLS, yypParser uintptr, yymajor uint16, yypminor uintptr) { /* sqlite3.c:159290:13: */
+func yy_destructor(tls *libc.TLS, yypParser uintptr, yymajor uint16, yypminor uintptr) { /* sqlite3.c:160301:13: */
var pParse uintptr = (*YyParser)(unsafe.Pointer(yypParser)).FpParse
switch int32(yymajor) {
@@ -138374,137 +140935,137 @@ func yy_destructor(tls *libc.TLS, yypParser uintptr, yymajor uint16, yypminor ui
// which appear on the RHS of the rule, but which are *not* used
// inside the C code.
//******** Begin destructor definitions **************************************
- case 202:
+ case 203:
fallthrough // select
- case 236:
- fallthrough // selectnowith
case 237:
+ fallthrough // selectnowith
+ case 238:
fallthrough // oneselect
- case 249: /* values */
+ case 250: /* values */
{
- Xsqlite3SelectDelete(tls, (*Parse)(unsafe.Pointer(pParse)).Fdb, *(*uintptr)(unsafe.Pointer(yypminor /* .Fyy307 */)))
+ Xsqlite3SelectDelete(tls, (*Parse)(unsafe.Pointer(pParse)).Fdb, *(*uintptr)(unsafe.Pointer(yypminor /* .Fyy81 */)))
}
break
- case 213:
- fallthrough // term
case 214:
+ fallthrough // term
+ case 215:
fallthrough // expr
- case 243:
+ case 244:
fallthrough // where_opt
- case 245:
+ case 246:
fallthrough // having_opt
- case 257:
+ case 258:
fallthrough // on_opt
- case 264:
+ case 265:
fallthrough // where_opt_ret
- case 275:
+ case 276:
fallthrough // case_operand
- case 277:
+ case 278:
fallthrough // case_else
- case 280:
+ case 281:
fallthrough // vinto
- case 287:
+ case 288:
fallthrough // when_clause
- case 292:
+ case 293:
fallthrough // key_opt
- case 308: /* filter_clause */
+ case 309: /* filter_clause */
{
- Xsqlite3ExprDelete(tls, (*Parse)(unsafe.Pointer(pParse)).Fdb, *(*uintptr)(unsafe.Pointer(yypminor /* .Fyy602 */)))
+ Xsqlite3ExprDelete(tls, (*Parse)(unsafe.Pointer(pParse)).Fdb, *(*uintptr)(unsafe.Pointer(yypminor /* .Fyy404 */)))
}
break
- case 218:
+ case 219:
fallthrough // eidlist_opt
- case 228:
- fallthrough // sortlist
case 229:
+ fallthrough // sortlist
+ case 230:
fallthrough // eidlist
- case 241:
+ case 242:
fallthrough // selcollist
- case 244:
+ case 245:
fallthrough // groupby_opt
- case 246:
+ case 247:
fallthrough // orderby_opt
- case 250:
- fallthrough // nexprlist
case 251:
+ fallthrough // nexprlist
+ case 252:
fallthrough // sclp
- case 259:
+ case 260:
fallthrough // exprlist
- case 265:
+ case 266:
fallthrough // setlist
- case 274:
+ case 275:
fallthrough // paren_exprlist
- case 276:
+ case 277:
fallthrough // case_exprlist
- case 307: /* part_opt */
+ case 308: /* part_opt */
{
- Xsqlite3ExprListDelete(tls, (*Parse)(unsafe.Pointer(pParse)).Fdb, *(*uintptr)(unsafe.Pointer(yypminor /* .Fyy338 */)))
+ Xsqlite3ExprListDelete(tls, (*Parse)(unsafe.Pointer(pParse)).Fdb, *(*uintptr)(unsafe.Pointer(yypminor /* .Fyy70 */)))
}
break
- case 235:
+ case 236:
fallthrough // fullname
- case 242:
+ case 243:
fallthrough // from
- case 253:
- fallthrough // seltablist
case 254:
+ fallthrough // seltablist
+ case 255:
fallthrough // stl_prefix
- case 260: /* xfullname */
+ case 261: /* xfullname */
{
- Xsqlite3SrcListDelete(tls, (*Parse)(unsafe.Pointer(pParse)).Fdb, *(*uintptr)(unsafe.Pointer(yypminor /* .Fyy291 */)))
+ Xsqlite3SrcListDelete(tls, (*Parse)(unsafe.Pointer(pParse)).Fdb, *(*uintptr)(unsafe.Pointer(yypminor /* .Fyy153 */)))
}
break
- case 238: /* wqlist */
+ case 239: /* wqlist */
{
- Xsqlite3WithDelete(tls, (*Parse)(unsafe.Pointer(pParse)).Fdb, *(*uintptr)(unsafe.Pointer(yypminor /* .Fyy195 */)))
+ Xsqlite3WithDelete(tls, (*Parse)(unsafe.Pointer(pParse)).Fdb, *(*uintptr)(unsafe.Pointer(yypminor /* .Fyy103 */)))
}
break
- case 248:
+ case 249:
fallthrough // window_clause
- case 303: /* windowdefn_list */
+ case 304: /* windowdefn_list */
{
- Xsqlite3WindowListDelete(tls, (*Parse)(unsafe.Pointer(pParse)).Fdb, *(*uintptr)(unsafe.Pointer(yypminor /* .Fyy19 */)))
+ Xsqlite3WindowListDelete(tls, (*Parse)(unsafe.Pointer(pParse)).Fdb, *(*uintptr)(unsafe.Pointer(yypminor /* .Fyy49 */)))
}
break
- case 258:
+ case 259:
fallthrough // using_opt
- case 261:
+ case 262:
fallthrough // idlist
- case 267: /* idlist_opt */
+ case 268: /* idlist_opt */
{
- Xsqlite3IdListDelete(tls, (*Parse)(unsafe.Pointer(pParse)).Fdb, *(*uintptr)(unsafe.Pointer(yypminor /* .Fyy288 */)))
+ Xsqlite3IdListDelete(tls, (*Parse)(unsafe.Pointer(pParse)).Fdb, *(*uintptr)(unsafe.Pointer(yypminor /* .Fyy436 */)))
}
break
- case 270:
+ case 271:
fallthrough // filter_over
- case 304:
- fallthrough // windowdefn
case 305:
- fallthrough // window
+ fallthrough // windowdefn
case 306:
+ fallthrough // window
+ case 307:
fallthrough // frame_opt
- case 309: /* over_clause */
+ case 310: /* over_clause */
{
- Xsqlite3WindowDelete(tls, (*Parse)(unsafe.Pointer(pParse)).Fdb, *(*uintptr)(unsafe.Pointer(yypminor /* .Fyy19 */)))
+ Xsqlite3WindowDelete(tls, (*Parse)(unsafe.Pointer(pParse)).Fdb, *(*uintptr)(unsafe.Pointer(yypminor /* .Fyy49 */)))
}
break
- case 283:
+ case 284:
fallthrough // trigger_cmd_list
- case 288: /* trigger_cmd */
+ case 289: /* trigger_cmd */
{
- Xsqlite3DeleteTriggerStep(tls, (*Parse)(unsafe.Pointer(pParse)).Fdb, *(*uintptr)(unsafe.Pointer(yypminor /* .Fyy483 */)))
+ Xsqlite3DeleteTriggerStep(tls, (*Parse)(unsafe.Pointer(pParse)).Fdb, *(*uintptr)(unsafe.Pointer(yypminor /* .Fyy157 */)))
}
break
- case 285: /* trigger_event */
+ case 286: /* trigger_event */
{
Xsqlite3IdListDelete(tls, (*Parse)(unsafe.Pointer(pParse)).Fdb, (*TrigEvent)(unsafe.Pointer(yypminor)).Fb)
}
break
- case 311:
- fallthrough // frame_bound
case 312:
+ fallthrough // frame_bound
+ case 313:
fallthrough // frame_bound_s
- case 313: /* frame_bound_e */
+ case 314: /* frame_bound_e */
{
Xsqlite3ExprDelete(tls, (*Parse)(unsafe.Pointer(pParse)).Fdb, (*FrameBound)(unsafe.Pointer(yypminor)).FpExpr)
}
@@ -138519,7 +141080,7 @@ func yy_destructor(tls *libc.TLS, yypParser uintptr, yymajor uint16, yypminor ui
//
// If there is a destructor routine associated with the token which
// is popped from the stack, then call it.
-func yy_pop_parser_stack(tls *libc.TLS, pParser uintptr) { /* sqlite3.c:159415:13: */
+func yy_pop_parser_stack(tls *libc.TLS, pParser uintptr) { /* sqlite3.c:160426:13: */
var yytos uintptr
yytos = libc.PostDecUintptr(&(*YyParser)(unsafe.Pointer(pParser)).Fyytos, 24)
@@ -138527,7 +141088,7 @@ func yy_pop_parser_stack(tls *libc.TLS, pParser uintptr) { /* sqlite3.c:159415:1
}
// Clear all secondary memory allocations from the parser
-func Xsqlite3ParserFinalize(tls *libc.TLS, p uintptr) { /* sqlite3.c:159433:21: */
+func Xsqlite3ParserFinalize(tls *libc.TLS, p uintptr) { /* sqlite3.c:160444:21: */
var pParser uintptr = p
for (*YyParser)(unsafe.Pointer(pParser)).Fyytos > pParser+16 /* &.yystack */ {
yy_pop_parser_stack(tls, pParser)
@@ -138550,7 +141111,7 @@ func Xsqlite3ParserFinalize(tls *libc.TLS, p uintptr) { /* sqlite3.c:159433:21:
// Find the appropriate action for a parser given the terminal
// look-ahead token iLookAhead.
-func yy_find_shift_action(tls *libc.TLS, iLookAhead uint16, stateno uint16) uint16 { /* sqlite3.c:159513:21: */
+func yy_find_shift_action(tls *libc.TLS, iLookAhead uint16, stateno uint16) uint16 { /* sqlite3.c:160524:21: */
var i int32
if int32(stateno) > YY_MAX_SHIFT {
@@ -138590,7 +141151,7 @@ func yy_find_shift_action(tls *libc.TLS, iLookAhead uint16, stateno uint16) uint
// Find the appropriate action for a parser given the non-terminal
// look-ahead token iLookAhead.
-func yy_find_reduce_action(tls *libc.TLS, stateno uint16, iLookAhead uint16) uint16 { /* sqlite3.c:159578:21: */
+func yy_find_reduce_action(tls *libc.TLS, stateno uint16, iLookAhead uint16) uint16 { /* sqlite3.c:160589:21: */
var i int32
i = int32(yy_reduce_ofst[stateno])
@@ -138601,7 +141162,7 @@ func yy_find_reduce_action(tls *libc.TLS, stateno uint16, iLookAhead uint16) uin
}
// The following routine is called if the stack overflows.
-func yyStackOverflow(tls *libc.TLS, yypParser uintptr) { /* sqlite3.c:159607:13: */
+func yyStackOverflow(tls *libc.TLS, yypParser uintptr) { /* sqlite3.c:160618:13: */
var pParse uintptr = (*YyParser)(unsafe.Pointer(yypParser)).FpParse
for (*YyParser)(unsafe.Pointer(yypParser)).Fyytos > yypParser+16 /* &.yystack */ {
@@ -138611,7 +141172,7 @@ func yyStackOverflow(tls *libc.TLS, yypParser uintptr) { /* sqlite3.c:159607:13:
// stack every overflows
//******* Begin %stack_overflow code *****************************************
- Xsqlite3ErrorMsg(tls, pParse, ts+20757 /* "parser stack ove..." */, 0)
+ Xsqlite3ErrorMsg(tls, pParse, ts+21217 /* "parser stack ove..." */, 0)
//******* End %stack_overflow code *******************************************
(*YyParser)(unsafe.Pointer(yypParser)).FpParse = pParse
@@ -138620,7 +141181,7 @@ func yyStackOverflow(tls *libc.TLS, yypParser uintptr) { /* sqlite3.c:159607:13:
// Print tracing information for a SHIFT action
// Perform a shift action.
-func yy_shift(tls *libc.TLS, yypParser uintptr, yyNewState uint16, yyMajor uint16, yyMinor Token) { /* sqlite3.c:159650:13: */
+func yy_shift(tls *libc.TLS, yypParser uintptr, yyNewState uint16, yyMajor uint16, yyMinor Token) { /* sqlite3.c:160661:13: */
var yytos uintptr
(*YyParser)(unsafe.Pointer(yypParser)).Fyytos += 24
if (*YyParser)(unsafe.Pointer(yypParser)).Fyytos > (*YyParser)(unsafe.Pointer(yypParser)).FyystackEnd {
@@ -138641,405 +141202,405 @@ func yy_shift(tls *libc.TLS, yypParser uintptr, yyNewState uint16, yyMajor uint1
// For rule J, yyRuleInfoLhs[J] contains the symbol on the left-hand side
// of that rule
var yyRuleInfoLhs = [398]uint16{
- uint16(187), // (0) explain ::= EXPLAIN
- uint16(187), // (1) explain ::= EXPLAIN QUERY PLAN
- uint16(186), // (2) cmdx ::= cmd
- uint16(188), // (3) cmd ::= BEGIN transtype trans_opt
- uint16(189), // (4) transtype ::=
- uint16(189), // (5) transtype ::= DEFERRED
- uint16(189), // (6) transtype ::= IMMEDIATE
- uint16(189), // (7) transtype ::= EXCLUSIVE
- uint16(188), // (8) cmd ::= COMMIT|END trans_opt
- uint16(188), // (9) cmd ::= ROLLBACK trans_opt
- uint16(188), // (10) cmd ::= SAVEPOINT nm
- uint16(188), // (11) cmd ::= RELEASE savepoint_opt nm
- uint16(188), // (12) cmd ::= ROLLBACK trans_opt TO savepoint_opt nm
- uint16(193), // (13) create_table ::= createkw temp TABLE ifnotexists nm dbnm
- uint16(195), // (14) createkw ::= CREATE
- uint16(197), // (15) ifnotexists ::=
- uint16(197), // (16) ifnotexists ::= IF NOT EXISTS
- uint16(196), // (17) temp ::= TEMP
- uint16(196), // (18) temp ::=
- uint16(194), // (19) create_table_args ::= LP columnlist conslist_opt RP table_options
- uint16(194), // (20) create_table_args ::= AS select
- uint16(201), // (21) table_options ::=
- uint16(201), // (22) table_options ::= WITHOUT nm
- uint16(203), // (23) columnname ::= nm typetoken
- uint16(205), // (24) typetoken ::=
- uint16(205), // (25) typetoken ::= typename LP signed RP
- uint16(205), // (26) typetoken ::= typename LP signed COMMA signed RP
- uint16(206), // (27) typename ::= typename ID|STRING
- uint16(210), // (28) scanpt ::=
- uint16(211), // (29) scantok ::=
- uint16(212), // (30) ccons ::= CONSTRAINT nm
- uint16(212), // (31) ccons ::= DEFAULT scantok term
- uint16(212), // (32) ccons ::= DEFAULT LP expr RP
- uint16(212), // (33) ccons ::= DEFAULT PLUS scantok term
- uint16(212), // (34) ccons ::= DEFAULT MINUS scantok term
- uint16(212), // (35) ccons ::= DEFAULT scantok ID|INDEXED
- uint16(212), // (36) ccons ::= NOT NULL onconf
- uint16(212), // (37) ccons ::= PRIMARY KEY sortorder onconf autoinc
- uint16(212), // (38) ccons ::= UNIQUE onconf
- uint16(212), // (39) ccons ::= CHECK LP expr RP
- uint16(212), // (40) ccons ::= REFERENCES nm eidlist_opt refargs
- uint16(212), // (41) ccons ::= defer_subclause
- uint16(212), // (42) ccons ::= COLLATE ID|STRING
- uint16(221), // (43) generated ::= LP expr RP
- uint16(221), // (44) generated ::= LP expr RP ID
- uint16(217), // (45) autoinc ::=
- uint16(217), // (46) autoinc ::= AUTOINCR
- uint16(219), // (47) refargs ::=
- uint16(219), // (48) refargs ::= refargs refarg
- uint16(222), // (49) refarg ::= MATCH nm
- uint16(222), // (50) refarg ::= ON INSERT refact
- uint16(222), // (51) refarg ::= ON DELETE refact
- uint16(222), // (52) refarg ::= ON UPDATE refact
- uint16(223), // (53) refact ::= SET NULL
- uint16(223), // (54) refact ::= SET DEFAULT
- uint16(223), // (55) refact ::= CASCADE
- uint16(223), // (56) refact ::= RESTRICT
- uint16(223), // (57) refact ::= NO ACTION
- uint16(220), // (58) defer_subclause ::= NOT DEFERRABLE init_deferred_pred_opt
- uint16(220), // (59) defer_subclause ::= DEFERRABLE init_deferred_pred_opt
- uint16(224), // (60) init_deferred_pred_opt ::=
- uint16(224), // (61) init_deferred_pred_opt ::= INITIALLY DEFERRED
- uint16(224), // (62) init_deferred_pred_opt ::= INITIALLY IMMEDIATE
- uint16(200), // (63) conslist_opt ::=
- uint16(226), // (64) tconscomma ::= COMMA
- uint16(227), // (65) tcons ::= CONSTRAINT nm
- uint16(227), // (66) tcons ::= PRIMARY KEY LP sortlist autoinc RP onconf
- uint16(227), // (67) tcons ::= UNIQUE LP sortlist RP onconf
- uint16(227), // (68) tcons ::= CHECK LP expr RP onconf
- uint16(227), // (69) tcons ::= FOREIGN KEY LP eidlist RP REFERENCES nm eidlist_opt refargs defer_subclause_opt
- uint16(230), // (70) defer_subclause_opt ::=
- uint16(215), // (71) onconf ::=
- uint16(215), // (72) onconf ::= ON CONFLICT resolvetype
- uint16(231), // (73) orconf ::=
- uint16(231), // (74) orconf ::= OR resolvetype
- uint16(232), // (75) resolvetype ::= IGNORE
- uint16(232), // (76) resolvetype ::= REPLACE
- uint16(188), // (77) cmd ::= DROP TABLE ifexists fullname
- uint16(234), // (78) ifexists ::= IF EXISTS
- uint16(234), // (79) ifexists ::=
- uint16(188), // (80) cmd ::= createkw temp VIEW ifnotexists nm dbnm eidlist_opt AS select
- uint16(188), // (81) cmd ::= DROP VIEW ifexists fullname
- uint16(188), // (82) cmd ::= select
- uint16(202), // (83) select ::= WITH wqlist selectnowith
- uint16(202), // (84) select ::= WITH RECURSIVE wqlist selectnowith
- uint16(202), // (85) select ::= selectnowith
- uint16(236), // (86) selectnowith ::= selectnowith multiselect_op oneselect
- uint16(239), // (87) multiselect_op ::= UNION
- uint16(239), // (88) multiselect_op ::= UNION ALL
- uint16(239), // (89) multiselect_op ::= EXCEPT|INTERSECT
- uint16(237), // (90) oneselect ::= SELECT distinct selcollist from where_opt groupby_opt having_opt orderby_opt limit_opt
- uint16(237), // (91) oneselect ::= SELECT distinct selcollist from where_opt groupby_opt having_opt window_clause orderby_opt limit_opt
- uint16(249), // (92) values ::= VALUES LP nexprlist RP
- uint16(249), // (93) values ::= values COMMA LP nexprlist RP
- uint16(240), // (94) distinct ::= DISTINCT
- uint16(240), // (95) distinct ::= ALL
- uint16(240), // (96) distinct ::=
- uint16(251), // (97) sclp ::=
- uint16(241), // (98) selcollist ::= sclp scanpt expr scanpt as
- uint16(241), // (99) selcollist ::= sclp scanpt STAR
- uint16(241), // (100) selcollist ::= sclp scanpt nm DOT STAR
- uint16(252), // (101) as ::= AS nm
- uint16(252), // (102) as ::=
- uint16(242), // (103) from ::=
- uint16(242), // (104) from ::= FROM seltablist
- uint16(254), // (105) stl_prefix ::= seltablist joinop
- uint16(254), // (106) stl_prefix ::=
- uint16(253), // (107) seltablist ::= stl_prefix nm dbnm as indexed_opt on_opt using_opt
- uint16(253), // (108) seltablist ::= stl_prefix nm dbnm LP exprlist RP as on_opt using_opt
- uint16(253), // (109) seltablist ::= stl_prefix LP select RP as on_opt using_opt
- uint16(253), // (110) seltablist ::= stl_prefix LP seltablist RP as on_opt using_opt
- uint16(198), // (111) dbnm ::=
- uint16(198), // (112) dbnm ::= DOT nm
- uint16(235), // (113) fullname ::= nm
- uint16(235), // (114) fullname ::= nm DOT nm
- uint16(260), // (115) xfullname ::= nm
- uint16(260), // (116) xfullname ::= nm DOT nm
- uint16(260), // (117) xfullname ::= nm DOT nm AS nm
- uint16(260), // (118) xfullname ::= nm AS nm
- uint16(255), // (119) joinop ::= COMMA|JOIN
- uint16(255), // (120) joinop ::= JOIN_KW JOIN
- uint16(255), // (121) joinop ::= JOIN_KW nm JOIN
- uint16(255), // (122) joinop ::= JOIN_KW nm nm JOIN
- uint16(257), // (123) on_opt ::= ON expr
- uint16(257), // (124) on_opt ::=
- uint16(256), // (125) indexed_opt ::=
- uint16(256), // (126) indexed_opt ::= INDEXED BY nm
- uint16(256), // (127) indexed_opt ::= NOT INDEXED
- uint16(258), // (128) using_opt ::= USING LP idlist RP
- uint16(258), // (129) using_opt ::=
- uint16(246), // (130) orderby_opt ::=
- uint16(246), // (131) orderby_opt ::= ORDER BY sortlist
- uint16(228), // (132) sortlist ::= sortlist COMMA expr sortorder nulls
- uint16(228), // (133) sortlist ::= expr sortorder nulls
- uint16(216), // (134) sortorder ::= ASC
- uint16(216), // (135) sortorder ::= DESC
- uint16(216), // (136) sortorder ::=
- uint16(262), // (137) nulls ::= NULLS FIRST
- uint16(262), // (138) nulls ::= NULLS LAST
- uint16(262), // (139) nulls ::=
- uint16(244), // (140) groupby_opt ::=
- uint16(244), // (141) groupby_opt ::= GROUP BY nexprlist
- uint16(245), // (142) having_opt ::=
- uint16(245), // (143) having_opt ::= HAVING expr
- uint16(247), // (144) limit_opt ::=
- uint16(247), // (145) limit_opt ::= LIMIT expr
- uint16(247), // (146) limit_opt ::= LIMIT expr OFFSET expr
- uint16(247), // (147) limit_opt ::= LIMIT expr COMMA expr
- uint16(188), // (148) cmd ::= with DELETE FROM xfullname indexed_opt where_opt_ret
- uint16(243), // (149) where_opt ::=
- uint16(243), // (150) where_opt ::= WHERE expr
- uint16(264), // (151) where_opt_ret ::=
- uint16(264), // (152) where_opt_ret ::= WHERE expr
- uint16(264), // (153) where_opt_ret ::= RETURNING selcollist
- uint16(264), // (154) where_opt_ret ::= WHERE expr RETURNING selcollist
- uint16(188), // (155) cmd ::= with UPDATE orconf xfullname indexed_opt SET setlist from where_opt_ret
- uint16(265), // (156) setlist ::= setlist COMMA nm EQ expr
- uint16(265), // (157) setlist ::= setlist COMMA LP idlist RP EQ expr
- uint16(265), // (158) setlist ::= nm EQ expr
- uint16(265), // (159) setlist ::= LP idlist RP EQ expr
- uint16(188), // (160) cmd ::= with insert_cmd INTO xfullname idlist_opt select upsert
- uint16(188), // (161) cmd ::= with insert_cmd INTO xfullname idlist_opt DEFAULT VALUES returning
- uint16(268), // (162) upsert ::=
- uint16(268), // (163) upsert ::= RETURNING selcollist
- uint16(268), // (164) upsert ::= ON CONFLICT LP sortlist RP where_opt DO UPDATE SET setlist where_opt upsert
- uint16(268), // (165) upsert ::= ON CONFLICT LP sortlist RP where_opt DO NOTHING upsert
- uint16(268), // (166) upsert ::= ON CONFLICT DO NOTHING returning
- uint16(268), // (167) upsert ::= ON CONFLICT DO UPDATE SET setlist where_opt returning
- uint16(269), // (168) returning ::= RETURNING selcollist
- uint16(266), // (169) insert_cmd ::= INSERT orconf
- uint16(266), // (170) insert_cmd ::= REPLACE
- uint16(267), // (171) idlist_opt ::=
- uint16(267), // (172) idlist_opt ::= LP idlist RP
- uint16(261), // (173) idlist ::= idlist COMMA nm
- uint16(261), // (174) idlist ::= nm
- uint16(214), // (175) expr ::= LP expr RP
- uint16(214), // (176) expr ::= ID|INDEXED
- uint16(214), // (177) expr ::= JOIN_KW
- uint16(214), // (178) expr ::= nm DOT nm
- uint16(214), // (179) expr ::= nm DOT nm DOT nm
- uint16(213), // (180) term ::= NULL|FLOAT|BLOB
- uint16(213), // (181) term ::= STRING
- uint16(213), // (182) term ::= INTEGER
- uint16(214), // (183) expr ::= VARIABLE
- uint16(214), // (184) expr ::= expr COLLATE ID|STRING
- uint16(214), // (185) expr ::= CAST LP expr AS typetoken RP
- uint16(214), // (186) expr ::= ID|INDEXED LP distinct exprlist RP
- uint16(214), // (187) expr ::= ID|INDEXED LP STAR RP
- uint16(214), // (188) expr ::= ID|INDEXED LP distinct exprlist RP filter_over
- uint16(214), // (189) expr ::= ID|INDEXED LP STAR RP filter_over
- uint16(213), // (190) term ::= CTIME_KW
- uint16(214), // (191) expr ::= LP nexprlist COMMA expr RP
- uint16(214), // (192) expr ::= expr AND expr
- uint16(214), // (193) expr ::= expr OR expr
- uint16(214), // (194) expr ::= expr LT|GT|GE|LE expr
- uint16(214), // (195) expr ::= expr EQ|NE expr
- uint16(214), // (196) expr ::= expr BITAND|BITOR|LSHIFT|RSHIFT expr
- uint16(214), // (197) expr ::= expr PLUS|MINUS expr
- uint16(214), // (198) expr ::= expr STAR|SLASH|REM expr
- uint16(214), // (199) expr ::= expr CONCAT expr
- uint16(271), // (200) likeop ::= NOT LIKE_KW|MATCH
- uint16(214), // (201) expr ::= expr likeop expr
- uint16(214), // (202) expr ::= expr likeop expr ESCAPE expr
- uint16(214), // (203) expr ::= expr ISNULL|NOTNULL
- uint16(214), // (204) expr ::= expr NOT NULL
- uint16(214), // (205) expr ::= expr IS expr
- uint16(214), // (206) expr ::= expr IS NOT expr
- uint16(214), // (207) expr ::= NOT expr
- uint16(214), // (208) expr ::= BITNOT expr
- uint16(214), // (209) expr ::= PLUS|MINUS expr
- uint16(272), // (210) between_op ::= BETWEEN
- uint16(272), // (211) between_op ::= NOT BETWEEN
- uint16(214), // (212) expr ::= expr between_op expr AND expr
- uint16(273), // (213) in_op ::= IN
- uint16(273), // (214) in_op ::= NOT IN
- uint16(214), // (215) expr ::= expr in_op LP exprlist RP
- uint16(214), // (216) expr ::= LP select RP
- uint16(214), // (217) expr ::= expr in_op LP select RP
- uint16(214), // (218) expr ::= expr in_op nm dbnm paren_exprlist
- uint16(214), // (219) expr ::= EXISTS LP select RP
- uint16(214), // (220) expr ::= CASE case_operand case_exprlist case_else END
- uint16(276), // (221) case_exprlist ::= case_exprlist WHEN expr THEN expr
- uint16(276), // (222) case_exprlist ::= WHEN expr THEN expr
- uint16(277), // (223) case_else ::= ELSE expr
- uint16(277), // (224) case_else ::=
- uint16(275), // (225) case_operand ::= expr
- uint16(275), // (226) case_operand ::=
- uint16(259), // (227) exprlist ::=
- uint16(250), // (228) nexprlist ::= nexprlist COMMA expr
- uint16(250), // (229) nexprlist ::= expr
- uint16(274), // (230) paren_exprlist ::=
- uint16(274), // (231) paren_exprlist ::= LP exprlist RP
- uint16(188), // (232) cmd ::= createkw uniqueflag INDEX ifnotexists nm dbnm ON nm LP sortlist RP where_opt
- uint16(278), // (233) uniqueflag ::= UNIQUE
- uint16(278), // (234) uniqueflag ::=
- uint16(218), // (235) eidlist_opt ::=
- uint16(218), // (236) eidlist_opt ::= LP eidlist RP
- uint16(229), // (237) eidlist ::= eidlist COMMA nm collate sortorder
- uint16(229), // (238) eidlist ::= nm collate sortorder
- uint16(279), // (239) collate ::=
- uint16(279), // (240) collate ::= COLLATE ID|STRING
- uint16(188), // (241) cmd ::= DROP INDEX ifexists fullname
- uint16(188), // (242) cmd ::= VACUUM vinto
- uint16(188), // (243) cmd ::= VACUUM nm vinto
- uint16(280), // (244) vinto ::= INTO expr
- uint16(280), // (245) vinto ::=
- uint16(188), // (246) cmd ::= PRAGMA nm dbnm
- uint16(188), // (247) cmd ::= PRAGMA nm dbnm EQ nmnum
- uint16(188), // (248) cmd ::= PRAGMA nm dbnm LP nmnum RP
- uint16(188), // (249) cmd ::= PRAGMA nm dbnm EQ minus_num
- uint16(188), // (250) cmd ::= PRAGMA nm dbnm LP minus_num RP
- uint16(208), // (251) plus_num ::= PLUS INTEGER|FLOAT
- uint16(209), // (252) minus_num ::= MINUS INTEGER|FLOAT
- uint16(188), // (253) cmd ::= createkw trigger_decl BEGIN trigger_cmd_list END
- uint16(282), // (254) trigger_decl ::= temp TRIGGER ifnotexists nm dbnm trigger_time trigger_event ON fullname foreach_clause when_clause
- uint16(284), // (255) trigger_time ::= BEFORE|AFTER
- uint16(284), // (256) trigger_time ::= INSTEAD OF
- uint16(284), // (257) trigger_time ::=
- uint16(285), // (258) trigger_event ::= DELETE|INSERT
- uint16(285), // (259) trigger_event ::= UPDATE
- uint16(285), // (260) trigger_event ::= UPDATE OF idlist
- uint16(287), // (261) when_clause ::=
- uint16(287), // (262) when_clause ::= WHEN expr
- uint16(283), // (263) trigger_cmd_list ::= trigger_cmd_list trigger_cmd SEMI
- uint16(283), // (264) trigger_cmd_list ::= trigger_cmd SEMI
- uint16(289), // (265) trnm ::= nm DOT nm
- uint16(290), // (266) tridxby ::= INDEXED BY nm
- uint16(290), // (267) tridxby ::= NOT INDEXED
- uint16(288), // (268) trigger_cmd ::= UPDATE orconf trnm tridxby SET setlist from where_opt scanpt
- uint16(288), // (269) trigger_cmd ::= scanpt insert_cmd INTO trnm idlist_opt select upsert scanpt
- uint16(288), // (270) trigger_cmd ::= DELETE FROM trnm tridxby where_opt scanpt
- uint16(288), // (271) trigger_cmd ::= scanpt select scanpt
- uint16(214), // (272) expr ::= RAISE LP IGNORE RP
- uint16(214), // (273) expr ::= RAISE LP raisetype COMMA nm RP
- uint16(233), // (274) raisetype ::= ROLLBACK
- uint16(233), // (275) raisetype ::= ABORT
- uint16(233), // (276) raisetype ::= FAIL
- uint16(188), // (277) cmd ::= DROP TRIGGER ifexists fullname
- uint16(188), // (278) cmd ::= ATTACH database_kw_opt expr AS expr key_opt
- uint16(188), // (279) cmd ::= DETACH database_kw_opt expr
- uint16(292), // (280) key_opt ::=
- uint16(292), // (281) key_opt ::= KEY expr
- uint16(188), // (282) cmd ::= REINDEX
- uint16(188), // (283) cmd ::= REINDEX nm dbnm
- uint16(188), // (284) cmd ::= ANALYZE
- uint16(188), // (285) cmd ::= ANALYZE nm dbnm
- uint16(188), // (286) cmd ::= ALTER TABLE fullname RENAME TO nm
- uint16(188), // (287) cmd ::= ALTER TABLE add_column_fullname ADD kwcolumn_opt columnname carglist
- uint16(188), // (288) cmd ::= ALTER TABLE fullname DROP kwcolumn_opt nm
- uint16(293), // (289) add_column_fullname ::= fullname
- uint16(188), // (290) cmd ::= ALTER TABLE fullname RENAME kwcolumn_opt nm TO nm
- uint16(188), // (291) cmd ::= create_vtab
- uint16(188), // (292) cmd ::= create_vtab LP vtabarglist RP
- uint16(295), // (293) create_vtab ::= createkw VIRTUAL TABLE ifnotexists nm dbnm USING nm
- uint16(297), // (294) vtabarg ::=
- uint16(298), // (295) vtabargtoken ::= ANY
- uint16(298), // (296) vtabargtoken ::= lp anylist RP
- uint16(299), // (297) lp ::= LP
- uint16(263), // (298) with ::= WITH wqlist
- uint16(263), // (299) with ::= WITH RECURSIVE wqlist
- uint16(302), // (300) wqas ::= AS
- uint16(302), // (301) wqas ::= AS MATERIALIZED
- uint16(302), // (302) wqas ::= AS NOT MATERIALIZED
- uint16(301), // (303) wqitem ::= nm eidlist_opt wqas LP select RP
- uint16(238), // (304) wqlist ::= wqitem
- uint16(238), // (305) wqlist ::= wqlist COMMA wqitem
- uint16(303), // (306) windowdefn_list ::= windowdefn
- uint16(303), // (307) windowdefn_list ::= windowdefn_list COMMA windowdefn
- uint16(304), // (308) windowdefn ::= nm AS LP window RP
- uint16(305), // (309) window ::= PARTITION BY nexprlist orderby_opt frame_opt
- uint16(305), // (310) window ::= nm PARTITION BY nexprlist orderby_opt frame_opt
- uint16(305), // (311) window ::= ORDER BY sortlist frame_opt
- uint16(305), // (312) window ::= nm ORDER BY sortlist frame_opt
- uint16(305), // (313) window ::= frame_opt
- uint16(305), // (314) window ::= nm frame_opt
- uint16(306), // (315) frame_opt ::=
- uint16(306), // (316) frame_opt ::= range_or_rows frame_bound_s frame_exclude_opt
- uint16(306), // (317) frame_opt ::= range_or_rows BETWEEN frame_bound_s AND frame_bound_e frame_exclude_opt
- uint16(310), // (318) range_or_rows ::= RANGE|ROWS|GROUPS
- uint16(312), // (319) frame_bound_s ::= frame_bound
- uint16(312), // (320) frame_bound_s ::= UNBOUNDED PRECEDING
- uint16(313), // (321) frame_bound_e ::= frame_bound
- uint16(313), // (322) frame_bound_e ::= UNBOUNDED FOLLOWING
- uint16(311), // (323) frame_bound ::= expr PRECEDING|FOLLOWING
- uint16(311), // (324) frame_bound ::= CURRENT ROW
- uint16(314), // (325) frame_exclude_opt ::=
- uint16(314), // (326) frame_exclude_opt ::= EXCLUDE frame_exclude
- uint16(315), // (327) frame_exclude ::= NO OTHERS
- uint16(315), // (328) frame_exclude ::= CURRENT ROW
- uint16(315), // (329) frame_exclude ::= GROUP|TIES
- uint16(248), // (330) window_clause ::= WINDOW windowdefn_list
- uint16(270), // (331) filter_over ::= filter_clause over_clause
- uint16(270), // (332) filter_over ::= over_clause
- uint16(270), // (333) filter_over ::= filter_clause
- uint16(309), // (334) over_clause ::= OVER LP window RP
- uint16(309), // (335) over_clause ::= OVER nm
- uint16(308), // (336) filter_clause ::= FILTER LP WHERE expr RP
- uint16(183), // (337) input ::= cmdlist
- uint16(184), // (338) cmdlist ::= cmdlist ecmd
- uint16(184), // (339) cmdlist ::= ecmd
- uint16(185), // (340) ecmd ::= SEMI
- uint16(185), // (341) ecmd ::= cmdx SEMI
- uint16(185), // (342) ecmd ::= explain cmdx SEMI
- uint16(190), // (343) trans_opt ::=
- uint16(190), // (344) trans_opt ::= TRANSACTION
- uint16(190), // (345) trans_opt ::= TRANSACTION nm
- uint16(192), // (346) savepoint_opt ::= SAVEPOINT
- uint16(192), // (347) savepoint_opt ::=
- uint16(188), // (348) cmd ::= create_table create_table_args
- uint16(199), // (349) columnlist ::= columnlist COMMA columnname carglist
- uint16(199), // (350) columnlist ::= columnname carglist
- uint16(191), // (351) nm ::= ID|INDEXED
- uint16(191), // (352) nm ::= STRING
- uint16(191), // (353) nm ::= JOIN_KW
- uint16(205), // (354) typetoken ::= typename
- uint16(206), // (355) typename ::= ID|STRING
- uint16(207), // (356) signed ::= plus_num
- uint16(207), // (357) signed ::= minus_num
- uint16(204), // (358) carglist ::= carglist ccons
- uint16(204), // (359) carglist ::=
- uint16(212), // (360) ccons ::= NULL onconf
- uint16(212), // (361) ccons ::= GENERATED ALWAYS AS generated
- uint16(212), // (362) ccons ::= AS generated
- uint16(200), // (363) conslist_opt ::= COMMA conslist
- uint16(225), // (364) conslist ::= conslist tconscomma tcons
- uint16(225), // (365) conslist ::= tcons
- uint16(226), // (366) tconscomma ::=
- uint16(230), // (367) defer_subclause_opt ::= defer_subclause
- uint16(232), // (368) resolvetype ::= raisetype
- uint16(236), // (369) selectnowith ::= oneselect
- uint16(237), // (370) oneselect ::= values
- uint16(251), // (371) sclp ::= selcollist COMMA
- uint16(252), // (372) as ::= ID|STRING
- uint16(269), // (373) returning ::=
- uint16(214), // (374) expr ::= term
- uint16(271), // (375) likeop ::= LIKE_KW|MATCH
- uint16(259), // (376) exprlist ::= nexprlist
- uint16(281), // (377) nmnum ::= plus_num
- uint16(281), // (378) nmnum ::= nm
- uint16(281), // (379) nmnum ::= ON
- uint16(281), // (380) nmnum ::= DELETE
- uint16(281), // (381) nmnum ::= DEFAULT
- uint16(208), // (382) plus_num ::= INTEGER|FLOAT
- uint16(286), // (383) foreach_clause ::=
- uint16(286), // (384) foreach_clause ::= FOR EACH ROW
- uint16(289), // (385) trnm ::= nm
- uint16(290), // (386) tridxby ::=
- uint16(291), // (387) database_kw_opt ::= DATABASE
- uint16(291), // (388) database_kw_opt ::=
- uint16(294), // (389) kwcolumn_opt ::=
- uint16(294), // (390) kwcolumn_opt ::= COLUMNKW
- uint16(296), // (391) vtabarglist ::= vtabarg
- uint16(296), // (392) vtabarglist ::= vtabarglist COMMA vtabarg
- uint16(297), // (393) vtabarg ::= vtabarg vtabargtoken
- uint16(300), // (394) anylist ::=
- uint16(300), // (395) anylist ::= anylist LP anylist RP
- uint16(300), // (396) anylist ::= anylist ANY
- uint16(263), // (397) with ::=
-} /* sqlite3.c:159691:25 */
+ uint16(188), // (0) explain ::= EXPLAIN
+ uint16(188), // (1) explain ::= EXPLAIN QUERY PLAN
+ uint16(187), // (2) cmdx ::= cmd
+ uint16(189), // (3) cmd ::= BEGIN transtype trans_opt
+ uint16(190), // (4) transtype ::=
+ uint16(190), // (5) transtype ::= DEFERRED
+ uint16(190), // (6) transtype ::= IMMEDIATE
+ uint16(190), // (7) transtype ::= EXCLUSIVE
+ uint16(189), // (8) cmd ::= COMMIT|END trans_opt
+ uint16(189), // (9) cmd ::= ROLLBACK trans_opt
+ uint16(189), // (10) cmd ::= SAVEPOINT nm
+ uint16(189), // (11) cmd ::= RELEASE savepoint_opt nm
+ uint16(189), // (12) cmd ::= ROLLBACK trans_opt TO savepoint_opt nm
+ uint16(194), // (13) create_table ::= createkw temp TABLE ifnotexists nm dbnm
+ uint16(196), // (14) createkw ::= CREATE
+ uint16(198), // (15) ifnotexists ::=
+ uint16(198), // (16) ifnotexists ::= IF NOT EXISTS
+ uint16(197), // (17) temp ::= TEMP
+ uint16(197), // (18) temp ::=
+ uint16(195), // (19) create_table_args ::= LP columnlist conslist_opt RP table_options
+ uint16(195), // (20) create_table_args ::= AS select
+ uint16(202), // (21) table_options ::=
+ uint16(202), // (22) table_options ::= WITHOUT nm
+ uint16(204), // (23) columnname ::= nm typetoken
+ uint16(206), // (24) typetoken ::=
+ uint16(206), // (25) typetoken ::= typename LP signed RP
+ uint16(206), // (26) typetoken ::= typename LP signed COMMA signed RP
+ uint16(207), // (27) typename ::= typename ID|STRING
+ uint16(211), // (28) scanpt ::=
+ uint16(212), // (29) scantok ::=
+ uint16(213), // (30) ccons ::= CONSTRAINT nm
+ uint16(213), // (31) ccons ::= DEFAULT scantok term
+ uint16(213), // (32) ccons ::= DEFAULT LP expr RP
+ uint16(213), // (33) ccons ::= DEFAULT PLUS scantok term
+ uint16(213), // (34) ccons ::= DEFAULT MINUS scantok term
+ uint16(213), // (35) ccons ::= DEFAULT scantok ID|INDEXED
+ uint16(213), // (36) ccons ::= NOT NULL onconf
+ uint16(213), // (37) ccons ::= PRIMARY KEY sortorder onconf autoinc
+ uint16(213), // (38) ccons ::= UNIQUE onconf
+ uint16(213), // (39) ccons ::= CHECK LP expr RP
+ uint16(213), // (40) ccons ::= REFERENCES nm eidlist_opt refargs
+ uint16(213), // (41) ccons ::= defer_subclause
+ uint16(213), // (42) ccons ::= COLLATE ID|STRING
+ uint16(222), // (43) generated ::= LP expr RP
+ uint16(222), // (44) generated ::= LP expr RP ID
+ uint16(218), // (45) autoinc ::=
+ uint16(218), // (46) autoinc ::= AUTOINCR
+ uint16(220), // (47) refargs ::=
+ uint16(220), // (48) refargs ::= refargs refarg
+ uint16(223), // (49) refarg ::= MATCH nm
+ uint16(223), // (50) refarg ::= ON INSERT refact
+ uint16(223), // (51) refarg ::= ON DELETE refact
+ uint16(223), // (52) refarg ::= ON UPDATE refact
+ uint16(224), // (53) refact ::= SET NULL
+ uint16(224), // (54) refact ::= SET DEFAULT
+ uint16(224), // (55) refact ::= CASCADE
+ uint16(224), // (56) refact ::= RESTRICT
+ uint16(224), // (57) refact ::= NO ACTION
+ uint16(221), // (58) defer_subclause ::= NOT DEFERRABLE init_deferred_pred_opt
+ uint16(221), // (59) defer_subclause ::= DEFERRABLE init_deferred_pred_opt
+ uint16(225), // (60) init_deferred_pred_opt ::=
+ uint16(225), // (61) init_deferred_pred_opt ::= INITIALLY DEFERRED
+ uint16(225), // (62) init_deferred_pred_opt ::= INITIALLY IMMEDIATE
+ uint16(201), // (63) conslist_opt ::=
+ uint16(227), // (64) tconscomma ::= COMMA
+ uint16(228), // (65) tcons ::= CONSTRAINT nm
+ uint16(228), // (66) tcons ::= PRIMARY KEY LP sortlist autoinc RP onconf
+ uint16(228), // (67) tcons ::= UNIQUE LP sortlist RP onconf
+ uint16(228), // (68) tcons ::= CHECK LP expr RP onconf
+ uint16(228), // (69) tcons ::= FOREIGN KEY LP eidlist RP REFERENCES nm eidlist_opt refargs defer_subclause_opt
+ uint16(231), // (70) defer_subclause_opt ::=
+ uint16(216), // (71) onconf ::=
+ uint16(216), // (72) onconf ::= ON CONFLICT resolvetype
+ uint16(232), // (73) orconf ::=
+ uint16(232), // (74) orconf ::= OR resolvetype
+ uint16(233), // (75) resolvetype ::= IGNORE
+ uint16(233), // (76) resolvetype ::= REPLACE
+ uint16(189), // (77) cmd ::= DROP TABLE ifexists fullname
+ uint16(235), // (78) ifexists ::= IF EXISTS
+ uint16(235), // (79) ifexists ::=
+ uint16(189), // (80) cmd ::= createkw temp VIEW ifnotexists nm dbnm eidlist_opt AS select
+ uint16(189), // (81) cmd ::= DROP VIEW ifexists fullname
+ uint16(189), // (82) cmd ::= select
+ uint16(203), // (83) select ::= WITH wqlist selectnowith
+ uint16(203), // (84) select ::= WITH RECURSIVE wqlist selectnowith
+ uint16(203), // (85) select ::= selectnowith
+ uint16(237), // (86) selectnowith ::= selectnowith multiselect_op oneselect
+ uint16(240), // (87) multiselect_op ::= UNION
+ uint16(240), // (88) multiselect_op ::= UNION ALL
+ uint16(240), // (89) multiselect_op ::= EXCEPT|INTERSECT
+ uint16(238), // (90) oneselect ::= SELECT distinct selcollist from where_opt groupby_opt having_opt orderby_opt limit_opt
+ uint16(238), // (91) oneselect ::= SELECT distinct selcollist from where_opt groupby_opt having_opt window_clause orderby_opt limit_opt
+ uint16(250), // (92) values ::= VALUES LP nexprlist RP
+ uint16(250), // (93) values ::= values COMMA LP nexprlist RP
+ uint16(241), // (94) distinct ::= DISTINCT
+ uint16(241), // (95) distinct ::= ALL
+ uint16(241), // (96) distinct ::=
+ uint16(252), // (97) sclp ::=
+ uint16(242), // (98) selcollist ::= sclp scanpt expr scanpt as
+ uint16(242), // (99) selcollist ::= sclp scanpt STAR
+ uint16(242), // (100) selcollist ::= sclp scanpt nm DOT STAR
+ uint16(253), // (101) as ::= AS nm
+ uint16(253), // (102) as ::=
+ uint16(243), // (103) from ::=
+ uint16(243), // (104) from ::= FROM seltablist
+ uint16(255), // (105) stl_prefix ::= seltablist joinop
+ uint16(255), // (106) stl_prefix ::=
+ uint16(254), // (107) seltablist ::= stl_prefix nm dbnm as indexed_opt on_opt using_opt
+ uint16(254), // (108) seltablist ::= stl_prefix nm dbnm LP exprlist RP as on_opt using_opt
+ uint16(254), // (109) seltablist ::= stl_prefix LP select RP as on_opt using_opt
+ uint16(254), // (110) seltablist ::= stl_prefix LP seltablist RP as on_opt using_opt
+ uint16(199), // (111) dbnm ::=
+ uint16(199), // (112) dbnm ::= DOT nm
+ uint16(236), // (113) fullname ::= nm
+ uint16(236), // (114) fullname ::= nm DOT nm
+ uint16(261), // (115) xfullname ::= nm
+ uint16(261), // (116) xfullname ::= nm DOT nm
+ uint16(261), // (117) xfullname ::= nm DOT nm AS nm
+ uint16(261), // (118) xfullname ::= nm AS nm
+ uint16(256), // (119) joinop ::= COMMA|JOIN
+ uint16(256), // (120) joinop ::= JOIN_KW JOIN
+ uint16(256), // (121) joinop ::= JOIN_KW nm JOIN
+ uint16(256), // (122) joinop ::= JOIN_KW nm nm JOIN
+ uint16(258), // (123) on_opt ::= ON expr
+ uint16(258), // (124) on_opt ::=
+ uint16(257), // (125) indexed_opt ::=
+ uint16(257), // (126) indexed_opt ::= INDEXED BY nm
+ uint16(257), // (127) indexed_opt ::= NOT INDEXED
+ uint16(259), // (128) using_opt ::= USING LP idlist RP
+ uint16(259), // (129) using_opt ::=
+ uint16(247), // (130) orderby_opt ::=
+ uint16(247), // (131) orderby_opt ::= ORDER BY sortlist
+ uint16(229), // (132) sortlist ::= sortlist COMMA expr sortorder nulls
+ uint16(229), // (133) sortlist ::= expr sortorder nulls
+ uint16(217), // (134) sortorder ::= ASC
+ uint16(217), // (135) sortorder ::= DESC
+ uint16(217), // (136) sortorder ::=
+ uint16(263), // (137) nulls ::= NULLS FIRST
+ uint16(263), // (138) nulls ::= NULLS LAST
+ uint16(263), // (139) nulls ::=
+ uint16(245), // (140) groupby_opt ::=
+ uint16(245), // (141) groupby_opt ::= GROUP BY nexprlist
+ uint16(246), // (142) having_opt ::=
+ uint16(246), // (143) having_opt ::= HAVING expr
+ uint16(248), // (144) limit_opt ::=
+ uint16(248), // (145) limit_opt ::= LIMIT expr
+ uint16(248), // (146) limit_opt ::= LIMIT expr OFFSET expr
+ uint16(248), // (147) limit_opt ::= LIMIT expr COMMA expr
+ uint16(189), // (148) cmd ::= with DELETE FROM xfullname indexed_opt where_opt_ret
+ uint16(244), // (149) where_opt ::=
+ uint16(244), // (150) where_opt ::= WHERE expr
+ uint16(265), // (151) where_opt_ret ::=
+ uint16(265), // (152) where_opt_ret ::= WHERE expr
+ uint16(265), // (153) where_opt_ret ::= RETURNING selcollist
+ uint16(265), // (154) where_opt_ret ::= WHERE expr RETURNING selcollist
+ uint16(189), // (155) cmd ::= with UPDATE orconf xfullname indexed_opt SET setlist from where_opt_ret
+ uint16(266), // (156) setlist ::= setlist COMMA nm EQ expr
+ uint16(266), // (157) setlist ::= setlist COMMA LP idlist RP EQ expr
+ uint16(266), // (158) setlist ::= nm EQ expr
+ uint16(266), // (159) setlist ::= LP idlist RP EQ expr
+ uint16(189), // (160) cmd ::= with insert_cmd INTO xfullname idlist_opt select upsert
+ uint16(189), // (161) cmd ::= with insert_cmd INTO xfullname idlist_opt DEFAULT VALUES returning
+ uint16(269), // (162) upsert ::=
+ uint16(269), // (163) upsert ::= RETURNING selcollist
+ uint16(269), // (164) upsert ::= ON CONFLICT LP sortlist RP where_opt DO UPDATE SET setlist where_opt upsert
+ uint16(269), // (165) upsert ::= ON CONFLICT LP sortlist RP where_opt DO NOTHING upsert
+ uint16(269), // (166) upsert ::= ON CONFLICT DO NOTHING returning
+ uint16(269), // (167) upsert ::= ON CONFLICT DO UPDATE SET setlist where_opt returning
+ uint16(270), // (168) returning ::= RETURNING selcollist
+ uint16(267), // (169) insert_cmd ::= INSERT orconf
+ uint16(267), // (170) insert_cmd ::= REPLACE
+ uint16(268), // (171) idlist_opt ::=
+ uint16(268), // (172) idlist_opt ::= LP idlist RP
+ uint16(262), // (173) idlist ::= idlist COMMA nm
+ uint16(262), // (174) idlist ::= nm
+ uint16(215), // (175) expr ::= LP expr RP
+ uint16(215), // (176) expr ::= ID|INDEXED
+ uint16(215), // (177) expr ::= JOIN_KW
+ uint16(215), // (178) expr ::= nm DOT nm
+ uint16(215), // (179) expr ::= nm DOT nm DOT nm
+ uint16(214), // (180) term ::= NULL|FLOAT|BLOB
+ uint16(214), // (181) term ::= STRING
+ uint16(214), // (182) term ::= INTEGER
+ uint16(215), // (183) expr ::= VARIABLE
+ uint16(215), // (184) expr ::= expr COLLATE ID|STRING
+ uint16(215), // (185) expr ::= CAST LP expr AS typetoken RP
+ uint16(215), // (186) expr ::= ID|INDEXED LP distinct exprlist RP
+ uint16(215), // (187) expr ::= ID|INDEXED LP STAR RP
+ uint16(215), // (188) expr ::= ID|INDEXED LP distinct exprlist RP filter_over
+ uint16(215), // (189) expr ::= ID|INDEXED LP STAR RP filter_over
+ uint16(214), // (190) term ::= CTIME_KW
+ uint16(215), // (191) expr ::= LP nexprlist COMMA expr RP
+ uint16(215), // (192) expr ::= expr AND expr
+ uint16(215), // (193) expr ::= expr OR expr
+ uint16(215), // (194) expr ::= expr LT|GT|GE|LE expr
+ uint16(215), // (195) expr ::= expr EQ|NE expr
+ uint16(215), // (196) expr ::= expr BITAND|BITOR|LSHIFT|RSHIFT expr
+ uint16(215), // (197) expr ::= expr PLUS|MINUS expr
+ uint16(215), // (198) expr ::= expr STAR|SLASH|REM expr
+ uint16(215), // (199) expr ::= expr CONCAT expr
+ uint16(272), // (200) likeop ::= NOT LIKE_KW|MATCH
+ uint16(215), // (201) expr ::= expr likeop expr
+ uint16(215), // (202) expr ::= expr likeop expr ESCAPE expr
+ uint16(215), // (203) expr ::= expr ISNULL|NOTNULL
+ uint16(215), // (204) expr ::= expr NOT NULL
+ uint16(215), // (205) expr ::= expr IS expr
+ uint16(215), // (206) expr ::= expr IS NOT expr
+ uint16(215), // (207) expr ::= NOT expr
+ uint16(215), // (208) expr ::= BITNOT expr
+ uint16(215), // (209) expr ::= PLUS|MINUS expr
+ uint16(273), // (210) between_op ::= BETWEEN
+ uint16(273), // (211) between_op ::= NOT BETWEEN
+ uint16(215), // (212) expr ::= expr between_op expr AND expr
+ uint16(274), // (213) in_op ::= IN
+ uint16(274), // (214) in_op ::= NOT IN
+ uint16(215), // (215) expr ::= expr in_op LP exprlist RP
+ uint16(215), // (216) expr ::= LP select RP
+ uint16(215), // (217) expr ::= expr in_op LP select RP
+ uint16(215), // (218) expr ::= expr in_op nm dbnm paren_exprlist
+ uint16(215), // (219) expr ::= EXISTS LP select RP
+ uint16(215), // (220) expr ::= CASE case_operand case_exprlist case_else END
+ uint16(277), // (221) case_exprlist ::= case_exprlist WHEN expr THEN expr
+ uint16(277), // (222) case_exprlist ::= WHEN expr THEN expr
+ uint16(278), // (223) case_else ::= ELSE expr
+ uint16(278), // (224) case_else ::=
+ uint16(276), // (225) case_operand ::= expr
+ uint16(276), // (226) case_operand ::=
+ uint16(260), // (227) exprlist ::=
+ uint16(251), // (228) nexprlist ::= nexprlist COMMA expr
+ uint16(251), // (229) nexprlist ::= expr
+ uint16(275), // (230) paren_exprlist ::=
+ uint16(275), // (231) paren_exprlist ::= LP exprlist RP
+ uint16(189), // (232) cmd ::= createkw uniqueflag INDEX ifnotexists nm dbnm ON nm LP sortlist RP where_opt
+ uint16(279), // (233) uniqueflag ::= UNIQUE
+ uint16(279), // (234) uniqueflag ::=
+ uint16(219), // (235) eidlist_opt ::=
+ uint16(219), // (236) eidlist_opt ::= LP eidlist RP
+ uint16(230), // (237) eidlist ::= eidlist COMMA nm collate sortorder
+ uint16(230), // (238) eidlist ::= nm collate sortorder
+ uint16(280), // (239) collate ::=
+ uint16(280), // (240) collate ::= COLLATE ID|STRING
+ uint16(189), // (241) cmd ::= DROP INDEX ifexists fullname
+ uint16(189), // (242) cmd ::= VACUUM vinto
+ uint16(189), // (243) cmd ::= VACUUM nm vinto
+ uint16(281), // (244) vinto ::= INTO expr
+ uint16(281), // (245) vinto ::=
+ uint16(189), // (246) cmd ::= PRAGMA nm dbnm
+ uint16(189), // (247) cmd ::= PRAGMA nm dbnm EQ nmnum
+ uint16(189), // (248) cmd ::= PRAGMA nm dbnm LP nmnum RP
+ uint16(189), // (249) cmd ::= PRAGMA nm dbnm EQ minus_num
+ uint16(189), // (250) cmd ::= PRAGMA nm dbnm LP minus_num RP
+ uint16(209), // (251) plus_num ::= PLUS INTEGER|FLOAT
+ uint16(210), // (252) minus_num ::= MINUS INTEGER|FLOAT
+ uint16(189), // (253) cmd ::= createkw trigger_decl BEGIN trigger_cmd_list END
+ uint16(283), // (254) trigger_decl ::= temp TRIGGER ifnotexists nm dbnm trigger_time trigger_event ON fullname foreach_clause when_clause
+ uint16(285), // (255) trigger_time ::= BEFORE|AFTER
+ uint16(285), // (256) trigger_time ::= INSTEAD OF
+ uint16(285), // (257) trigger_time ::=
+ uint16(286), // (258) trigger_event ::= DELETE|INSERT
+ uint16(286), // (259) trigger_event ::= UPDATE
+ uint16(286), // (260) trigger_event ::= UPDATE OF idlist
+ uint16(288), // (261) when_clause ::=
+ uint16(288), // (262) when_clause ::= WHEN expr
+ uint16(284), // (263) trigger_cmd_list ::= trigger_cmd_list trigger_cmd SEMI
+ uint16(284), // (264) trigger_cmd_list ::= trigger_cmd SEMI
+ uint16(290), // (265) trnm ::= nm DOT nm
+ uint16(291), // (266) tridxby ::= INDEXED BY nm
+ uint16(291), // (267) tridxby ::= NOT INDEXED
+ uint16(289), // (268) trigger_cmd ::= UPDATE orconf trnm tridxby SET setlist from where_opt scanpt
+ uint16(289), // (269) trigger_cmd ::= scanpt insert_cmd INTO trnm idlist_opt select upsert scanpt
+ uint16(289), // (270) trigger_cmd ::= DELETE FROM trnm tridxby where_opt scanpt
+ uint16(289), // (271) trigger_cmd ::= scanpt select scanpt
+ uint16(215), // (272) expr ::= RAISE LP IGNORE RP
+ uint16(215), // (273) expr ::= RAISE LP raisetype COMMA nm RP
+ uint16(234), // (274) raisetype ::= ROLLBACK
+ uint16(234), // (275) raisetype ::= ABORT
+ uint16(234), // (276) raisetype ::= FAIL
+ uint16(189), // (277) cmd ::= DROP TRIGGER ifexists fullname
+ uint16(189), // (278) cmd ::= ATTACH database_kw_opt expr AS expr key_opt
+ uint16(189), // (279) cmd ::= DETACH database_kw_opt expr
+ uint16(293), // (280) key_opt ::=
+ uint16(293), // (281) key_opt ::= KEY expr
+ uint16(189), // (282) cmd ::= REINDEX
+ uint16(189), // (283) cmd ::= REINDEX nm dbnm
+ uint16(189), // (284) cmd ::= ANALYZE
+ uint16(189), // (285) cmd ::= ANALYZE nm dbnm
+ uint16(189), // (286) cmd ::= ALTER TABLE fullname RENAME TO nm
+ uint16(189), // (287) cmd ::= ALTER TABLE add_column_fullname ADD kwcolumn_opt columnname carglist
+ uint16(189), // (288) cmd ::= ALTER TABLE fullname DROP kwcolumn_opt nm
+ uint16(294), // (289) add_column_fullname ::= fullname
+ uint16(189), // (290) cmd ::= ALTER TABLE fullname RENAME kwcolumn_opt nm TO nm
+ uint16(189), // (291) cmd ::= create_vtab
+ uint16(189), // (292) cmd ::= create_vtab LP vtabarglist RP
+ uint16(296), // (293) create_vtab ::= createkw VIRTUAL TABLE ifnotexists nm dbnm USING nm
+ uint16(298), // (294) vtabarg ::=
+ uint16(299), // (295) vtabargtoken ::= ANY
+ uint16(299), // (296) vtabargtoken ::= lp anylist RP
+ uint16(300), // (297) lp ::= LP
+ uint16(264), // (298) with ::= WITH wqlist
+ uint16(264), // (299) with ::= WITH RECURSIVE wqlist
+ uint16(303), // (300) wqas ::= AS
+ uint16(303), // (301) wqas ::= AS MATERIALIZED
+ uint16(303), // (302) wqas ::= AS NOT MATERIALIZED
+ uint16(302), // (303) wqitem ::= nm eidlist_opt wqas LP select RP
+ uint16(239), // (304) wqlist ::= wqitem
+ uint16(239), // (305) wqlist ::= wqlist COMMA wqitem
+ uint16(304), // (306) windowdefn_list ::= windowdefn
+ uint16(304), // (307) windowdefn_list ::= windowdefn_list COMMA windowdefn
+ uint16(305), // (308) windowdefn ::= nm AS LP window RP
+ uint16(306), // (309) window ::= PARTITION BY nexprlist orderby_opt frame_opt
+ uint16(306), // (310) window ::= nm PARTITION BY nexprlist orderby_opt frame_opt
+ uint16(306), // (311) window ::= ORDER BY sortlist frame_opt
+ uint16(306), // (312) window ::= nm ORDER BY sortlist frame_opt
+ uint16(306), // (313) window ::= frame_opt
+ uint16(306), // (314) window ::= nm frame_opt
+ uint16(307), // (315) frame_opt ::=
+ uint16(307), // (316) frame_opt ::= range_or_rows frame_bound_s frame_exclude_opt
+ uint16(307), // (317) frame_opt ::= range_or_rows BETWEEN frame_bound_s AND frame_bound_e frame_exclude_opt
+ uint16(311), // (318) range_or_rows ::= RANGE|ROWS|GROUPS
+ uint16(313), // (319) frame_bound_s ::= frame_bound
+ uint16(313), // (320) frame_bound_s ::= UNBOUNDED PRECEDING
+ uint16(314), // (321) frame_bound_e ::= frame_bound
+ uint16(314), // (322) frame_bound_e ::= UNBOUNDED FOLLOWING
+ uint16(312), // (323) frame_bound ::= expr PRECEDING|FOLLOWING
+ uint16(312), // (324) frame_bound ::= CURRENT ROW
+ uint16(315), // (325) frame_exclude_opt ::=
+ uint16(315), // (326) frame_exclude_opt ::= EXCLUDE frame_exclude
+ uint16(316), // (327) frame_exclude ::= NO OTHERS
+ uint16(316), // (328) frame_exclude ::= CURRENT ROW
+ uint16(316), // (329) frame_exclude ::= GROUP|TIES
+ uint16(249), // (330) window_clause ::= WINDOW windowdefn_list
+ uint16(271), // (331) filter_over ::= filter_clause over_clause
+ uint16(271), // (332) filter_over ::= over_clause
+ uint16(271), // (333) filter_over ::= filter_clause
+ uint16(310), // (334) over_clause ::= OVER LP window RP
+ uint16(310), // (335) over_clause ::= OVER nm
+ uint16(309), // (336) filter_clause ::= FILTER LP WHERE expr RP
+ uint16(184), // (337) input ::= cmdlist
+ uint16(185), // (338) cmdlist ::= cmdlist ecmd
+ uint16(185), // (339) cmdlist ::= ecmd
+ uint16(186), // (340) ecmd ::= SEMI
+ uint16(186), // (341) ecmd ::= cmdx SEMI
+ uint16(186), // (342) ecmd ::= explain cmdx SEMI
+ uint16(191), // (343) trans_opt ::=
+ uint16(191), // (344) trans_opt ::= TRANSACTION
+ uint16(191), // (345) trans_opt ::= TRANSACTION nm
+ uint16(193), // (346) savepoint_opt ::= SAVEPOINT
+ uint16(193), // (347) savepoint_opt ::=
+ uint16(189), // (348) cmd ::= create_table create_table_args
+ uint16(200), // (349) columnlist ::= columnlist COMMA columnname carglist
+ uint16(200), // (350) columnlist ::= columnname carglist
+ uint16(192), // (351) nm ::= ID|INDEXED
+ uint16(192), // (352) nm ::= STRING
+ uint16(192), // (353) nm ::= JOIN_KW
+ uint16(206), // (354) typetoken ::= typename
+ uint16(207), // (355) typename ::= ID|STRING
+ uint16(208), // (356) signed ::= plus_num
+ uint16(208), // (357) signed ::= minus_num
+ uint16(205), // (358) carglist ::= carglist ccons
+ uint16(205), // (359) carglist ::=
+ uint16(213), // (360) ccons ::= NULL onconf
+ uint16(213), // (361) ccons ::= GENERATED ALWAYS AS generated
+ uint16(213), // (362) ccons ::= AS generated
+ uint16(201), // (363) conslist_opt ::= COMMA conslist
+ uint16(226), // (364) conslist ::= conslist tconscomma tcons
+ uint16(226), // (365) conslist ::= tcons
+ uint16(227), // (366) tconscomma ::=
+ uint16(231), // (367) defer_subclause_opt ::= defer_subclause
+ uint16(233), // (368) resolvetype ::= raisetype
+ uint16(237), // (369) selectnowith ::= oneselect
+ uint16(238), // (370) oneselect ::= values
+ uint16(252), // (371) sclp ::= selcollist COMMA
+ uint16(253), // (372) as ::= ID|STRING
+ uint16(270), // (373) returning ::=
+ uint16(215), // (374) expr ::= term
+ uint16(272), // (375) likeop ::= LIKE_KW|MATCH
+ uint16(260), // (376) exprlist ::= nexprlist
+ uint16(282), // (377) nmnum ::= plus_num
+ uint16(282), // (378) nmnum ::= nm
+ uint16(282), // (379) nmnum ::= ON
+ uint16(282), // (380) nmnum ::= DELETE
+ uint16(282), // (381) nmnum ::= DEFAULT
+ uint16(209), // (382) plus_num ::= INTEGER|FLOAT
+ uint16(287), // (383) foreach_clause ::=
+ uint16(287), // (384) foreach_clause ::= FOR EACH ROW
+ uint16(290), // (385) trnm ::= nm
+ uint16(291), // (386) tridxby ::=
+ uint16(292), // (387) database_kw_opt ::= DATABASE
+ uint16(292), // (388) database_kw_opt ::=
+ uint16(295), // (389) kwcolumn_opt ::=
+ uint16(295), // (390) kwcolumn_opt ::= COLUMNKW
+ uint16(297), // (391) vtabarglist ::= vtabarg
+ uint16(297), // (392) vtabarglist ::= vtabarglist COMMA vtabarg
+ uint16(298), // (393) vtabarg ::= vtabarg vtabargtoken
+ uint16(301), // (394) anylist ::=
+ uint16(301), // (395) anylist ::= anylist LP anylist RP
+ uint16(301), // (396) anylist ::= anylist ANY
+ uint16(264), // (397) with ::=
+} /* sqlite3.c:160702:25 */
// For rule J, yyRuleInfoNRhs[J] contains the negative of the number
// of symbols on the right-hand side of that rule.
@@ -139442,7 +142003,7 @@ var yyRuleInfoNRhs = [398]int8{
int8(-4), // (395) anylist ::= anylist LP anylist RP
int8(-2), // (396) anylist ::= anylist ANY
int8(0), // (397) with ::=
-} /* sqlite3.c:160094:26 */
+} /* sqlite3.c:161105:26 */
// Forward Declaration
@@ -139454,7 +142015,7 @@ var yyRuleInfoNRhs = [398]int8{
// if the lookahead token has already been consumed. As this procedure is
// only called from one place, optimizing compilers will in-line it, which
// means that the extra parameters have no performance impact.
-func yy_reduce(tls *libc.TLS, yypParser uintptr, yyruleno uint32, yyLookahead int32, yyLookaheadToken Token, pParse uintptr) uint16 { /* sqlite3.c:160507:21: */
+func yy_reduce(tls *libc.TLS, yypParser uintptr, yyruleno uint32, yyLookahead int32, yyLookaheadToken Token, pParse uintptr) uint16 { /* sqlite3.c:161518:21: */
bp := tls.Alloc(128)
defer tls.Free(128)
@@ -139572,11 +142133,9 @@ func yy_reduce(tls *libc.TLS, yypParser uintptr, yyruleno uint32, yyLookahead in
*(*int32)(unsafe.Pointer(yymsp + libc.UintptrFromInt32(-2)*24 + 8 /* &.minor */)) = 1
}
break
- case uint32(17):
- fallthrough // temp ::= TEMP
- case uint32(46): /* autoinc ::= AUTOINCR */
+ case uint32(17): /* temp ::= TEMP */
{
- *(*int32)(unsafe.Pointer(yymsp + 8 /* &.minor */)) = 1
+ *(*int32)(unsafe.Pointer(yymsp + 8 /* &.minor */)) = (libc.Bool32(int32((*Sqlite3)(unsafe.Pointer((*Parse)(unsafe.Pointer(pParse)).Fdb)).Finit.Fbusy) == 0))
}
break
case uint32(19): /* create_table_args ::= LP columnlist conslist_opt RP table_options */
@@ -139592,11 +142151,11 @@ func yy_reduce(tls *libc.TLS, yypParser uintptr, yyruleno uint32, yyLookahead in
break
case uint32(22): /* table_options ::= WITHOUT nm */
{
- if ((*Token)(unsafe.Pointer(yymsp+8 /* &.minor */)).Fn == uint32(5)) && (Xsqlite3_strnicmp(tls, (*Token)(unsafe.Pointer(yymsp+8 /* &.minor */)).Fz, ts+14302 /* "rowid" */, 5) == 0) {
+ if ((*Token)(unsafe.Pointer(yymsp+8 /* &.minor */)).Fn == uint32(5)) && (Xsqlite3_strnicmp(tls, (*Token)(unsafe.Pointer(yymsp+8 /* &.minor */)).Fz, ts+14757 /* "rowid" */, 5) == 0) {
*(*int32)(unsafe.Pointer(yymsp + libc.UintptrFromInt32(-1)*24 + 8 /* &.minor */)) = (TF_WithoutRowid | TF_NoVisibleRowid)
} else {
*(*int32)(unsafe.Pointer(yymsp + libc.UintptrFromInt32(-1)*24 + 8 /* &.minor */)) = 0
- Xsqlite3ErrorMsg(tls, pParse, ts+20779 /* "unknown table op..." */, libc.VaList(bp, (*Token)(unsafe.Pointer(yymsp+8 /* &.minor */)).Fn, (*Token)(unsafe.Pointer(yymsp+8 /* &.minor */)).Fz))
+ Xsqlite3ErrorMsg(tls, pParse, ts+21239 /* "unknown table op..." */, libc.VaList(bp, (*Token)(unsafe.Pointer(yymsp+8 /* &.minor */)).Fn, (*Token)(unsafe.Pointer(yymsp+8 /* &.minor */)).Fz))
}
}
break
@@ -139726,6 +142285,11 @@ func yy_reduce(tls *libc.TLS, yypParser uintptr, yyruleno uint32, yyLookahead in
Xsqlite3AddGenerated(tls, pParse, *(*uintptr)(unsafe.Pointer(yymsp + libc.UintptrFromInt32(-2)*24 + 8 /* &.minor */)), (yymsp + 8 /* &.minor */ /* &.yy0 */))
}
break
+ case uint32(46): /* autoinc ::= AUTOINCR */
+ {
+ *(*int32)(unsafe.Pointer(yymsp + 8 /* &.minor */)) = 1
+ }
+ break
case uint32(47): /* refargs ::= */
{
*(*int32)(unsafe.Pointer(yymsp + 1*24 + 8 /* &.minor */)) = (OE_None * 0x0101) /* EV: R-19803-45884 */
@@ -139733,31 +142297,31 @@ func yy_reduce(tls *libc.TLS, yypParser uintptr, yyruleno uint32, yyLookahead in
break
case uint32(48): /* refargs ::= refargs refarg */
{
- *(*int32)(unsafe.Pointer(yymsp + libc.UintptrFromInt32(-1)*24 + 8 /* &.minor */)) = ((*(*int32)(unsafe.Pointer(yymsp + libc.UintptrFromInt32(-1)*24 + 8 /* &.minor */)) & ^*(*int32)(unsafe.Pointer((yymsp + 8 /* &.minor */ /* &.yy615 */) + 4 /* &.mask */))) | *(*int32)(unsafe.Pointer((yymsp + 8 /* &.minor */ /* &.yy615 */) /* &.value */)))
+ *(*int32)(unsafe.Pointer(yymsp + libc.UintptrFromInt32(-1)*24 + 8 /* &.minor */)) = ((*(*int32)(unsafe.Pointer(yymsp + libc.UintptrFromInt32(-1)*24 + 8 /* &.minor */)) & ^*(*int32)(unsafe.Pointer((yymsp + 8 /* &.minor */ /* &.yy139 */) + 4 /* &.mask */))) | *(*int32)(unsafe.Pointer((yymsp + 8 /* &.minor */ /* &.yy139 */) /* &.value */)))
}
break
case uint32(49): /* refarg ::= MATCH nm */
{
- *(*int32)(unsafe.Pointer(yymsp + libc.UintptrFromInt32(-1)*24 + 8 /* &.minor */ /* &.yy615 */ /* &.value */)) = 0
- *(*int32)(unsafe.Pointer(yymsp + libc.UintptrFromInt32(-1)*24 + 8 /* &.minor */ /* &.yy615 */ + 4 /* &.mask */)) = 0x000000
+ *(*int32)(unsafe.Pointer(yymsp + libc.UintptrFromInt32(-1)*24 + 8 /* &.minor */ /* &.yy139 */ /* &.value */)) = 0
+ *(*int32)(unsafe.Pointer(yymsp + libc.UintptrFromInt32(-1)*24 + 8 /* &.minor */ /* &.yy139 */ + 4 /* &.mask */)) = 0x000000
}
break
case uint32(50): /* refarg ::= ON INSERT refact */
{
- *(*int32)(unsafe.Pointer(yymsp + libc.UintptrFromInt32(-2)*24 + 8 /* &.minor */ /* &.yy615 */ /* &.value */)) = 0
- *(*int32)(unsafe.Pointer(yymsp + libc.UintptrFromInt32(-2)*24 + 8 /* &.minor */ /* &.yy615 */ + 4 /* &.mask */)) = 0x000000
+ *(*int32)(unsafe.Pointer(yymsp + libc.UintptrFromInt32(-2)*24 + 8 /* &.minor */ /* &.yy139 */ /* &.value */)) = 0
+ *(*int32)(unsafe.Pointer(yymsp + libc.UintptrFromInt32(-2)*24 + 8 /* &.minor */ /* &.yy139 */ + 4 /* &.mask */)) = 0x000000
}
break
case uint32(51): /* refarg ::= ON DELETE refact */
{
- *(*int32)(unsafe.Pointer(yymsp + libc.UintptrFromInt32(-2)*24 + 8 /* &.minor */ /* &.yy615 */ /* &.value */)) = *(*int32)(unsafe.Pointer(yymsp + 8 /* &.minor */))
- *(*int32)(unsafe.Pointer(yymsp + libc.UintptrFromInt32(-2)*24 + 8 /* &.minor */ /* &.yy615 */ + 4 /* &.mask */)) = 0x0000ff
+ *(*int32)(unsafe.Pointer(yymsp + libc.UintptrFromInt32(-2)*24 + 8 /* &.minor */ /* &.yy139 */ /* &.value */)) = *(*int32)(unsafe.Pointer(yymsp + 8 /* &.minor */))
+ *(*int32)(unsafe.Pointer(yymsp + libc.UintptrFromInt32(-2)*24 + 8 /* &.minor */ /* &.yy139 */ + 4 /* &.mask */)) = 0x0000ff
}
break
case uint32(52): /* refarg ::= ON UPDATE refact */
{
- *(*int32)(unsafe.Pointer(yymsp + libc.UintptrFromInt32(-2)*24 + 8 /* &.minor */ /* &.yy615 */ /* &.value */)) = (*(*int32)(unsafe.Pointer(yymsp + 8 /* &.minor */)) << 8)
- *(*int32)(unsafe.Pointer(yymsp + libc.UintptrFromInt32(-2)*24 + 8 /* &.minor */ /* &.yy615 */ + 4 /* &.mask */)) = 0x00ff00
+ *(*int32)(unsafe.Pointer(yymsp + libc.UintptrFromInt32(-2)*24 + 8 /* &.minor */ /* &.yy139 */ /* &.value */)) = (*(*int32)(unsafe.Pointer(yymsp + 8 /* &.minor */)) << 8)
+ *(*int32)(unsafe.Pointer(yymsp + libc.UintptrFromInt32(-2)*24 + 8 /* &.minor */ /* &.yy139 */ + 4 /* &.mask */)) = 0x00ff00
}
break
case uint32(53): /* refact ::= SET NULL */
@@ -140096,11 +142660,11 @@ func yy_reduce(tls *libc.TLS, yypParser uintptr, yyruleno uint32, yyLookahead in
(*SrcItem)(unsafe.Pointer(pNew)).FzName = (*SrcItem)(unsafe.Pointer(pOld)).FzName
(*SrcItem)(unsafe.Pointer(pNew)).FzDatabase = (*SrcItem)(unsafe.Pointer(pOld)).FzDatabase
(*SrcItem)(unsafe.Pointer(pNew)).FpSelect = (*SrcItem)(unsafe.Pointer(pOld)).FpSelect
- if (uint32(int32(*(*uint8)(unsafe.Pointer(pOld + 60 /* &.fg */ + 4 /* &.isTabFunc */)) >> 5 & 0x1))) != 0 {
+ if (uint32(int32(*(*uint16)(unsafe.Pointer(pOld + 60 /* &.fg */ + 4 /* &.isTabFunc */)) & 0x2000 >> 13))) != 0 {
*(*uintptr)(unsafe.Pointer(pNew + 96 /* &.u1 */)) = *(*uintptr)(unsafe.Pointer(pOld + 96 /* &.u1 */))
*(*uintptr)(unsafe.Pointer(pOld + 96 /* &.u1 */)) = uintptr(0)
- libc.SetBitFieldPtr8Uint32(pOld+60 /* &.fg */ +4 /* &.isTabFunc */, uint32(0), 2, 0x4)
- libc.SetBitFieldPtr8Uint32(pNew+60 /* &.fg */ +4 /* &.isTabFunc */, uint32(1), 2, 0x4)
+ libc.SetBitFieldPtr16Uint32(pOld+60 /* &.fg */ +4 /* &.isTabFunc */, uint32(0), 13, 0x2000)
+ libc.SetBitFieldPtr16Uint32(pNew+60 /* &.fg */ +4 /* &.isTabFunc */, uint32(1), 13, 0x2000)
}
(*SrcItem)(unsafe.Pointer(pOld)).FzName = libc.AssignPtrUintptr(pOld+8 /* &.zDatabase */, uintptr(0))
(*SrcItem)(unsafe.Pointer(pOld)).FpSelect = uintptr(0)
@@ -140326,7 +142890,7 @@ func yy_reduce(tls *libc.TLS, yypParser uintptr, yyruleno uint32, yyLookahead in
case uint32(155): /* cmd ::= with UPDATE orconf xfullname indexed_opt SET setlist from where_opt_ret */
{
Xsqlite3SrcListIndexedBy(tls, pParse, *(*uintptr)(unsafe.Pointer(yymsp + libc.UintptrFromInt32(-5)*24 + 8 /* &.minor */)), (yymsp + libc.UintptrFromInt32(-4)*24 + 8 /* &.minor */ /* &.yy0 */))
- Xsqlite3ExprListCheckLength(tls, pParse, *(*uintptr)(unsafe.Pointer(yymsp + libc.UintptrFromInt32(-2)*24 + 8 /* &.minor */)), ts+20806 /* "set list" */)
+ Xsqlite3ExprListCheckLength(tls, pParse, *(*uintptr)(unsafe.Pointer(yymsp + libc.UintptrFromInt32(-2)*24 + 8 /* &.minor */)), ts+21266 /* "set list" */)
*(*uintptr)(unsafe.Pointer(yymsp + libc.UintptrFromInt32(-5)*24 + 8 /* &.minor */)) = Xsqlite3SrcListAppendList(tls, pParse, *(*uintptr)(unsafe.Pointer(yymsp + libc.UintptrFromInt32(-5)*24 + 8 /* &.minor */)), *(*uintptr)(unsafe.Pointer(yymsp + libc.UintptrFromInt32(-1)*24 + 8 /* &.minor */)))
Xsqlite3Update(tls, pParse, *(*uintptr)(unsafe.Pointer(yymsp + libc.UintptrFromInt32(-5)*24 + 8 /* &.minor */)), *(*uintptr)(unsafe.Pointer(yymsp + libc.UintptrFromInt32(-2)*24 + 8 /* &.minor */)), *(*uintptr)(unsafe.Pointer(yymsp + 8 /* &.minor */)), *(*int32)(unsafe.Pointer(yymsp + libc.UintptrFromInt32(-6)*24 + 8 /* &.minor */)), uintptr(0), uintptr(0), uintptr(0))
}
@@ -140468,7 +143032,7 @@ func yy_reduce(tls *libc.TLS, yypParser uintptr, yyruleno uint32, yyLookahead in
break
case uint32(183): /* expr ::= VARIABLE */
{
- if !((int32(*(*int8)(unsafe.Pointer((*Token)(unsafe.Pointer(yymsp + 8 /* &.minor */)).Fz))) == '#') && ((int32(Xsqlite3CtypeMap[uint8(*(*int8)(unsafe.Pointer((*Token)(unsafe.Pointer(yymsp+8 /* &.minor */)).Fz + 1)))]) & 0x04) != 0)) {
+ if !((int32(*(*uint8)(unsafe.Pointer((*Token)(unsafe.Pointer(yymsp + 8 /* &.minor */)).Fz))) == '#') && ((int32(Xsqlite3CtypeMap[uint8(*(*uint8)(unsafe.Pointer((*Token)(unsafe.Pointer(yymsp+8 /* &.minor */)).Fz + 1)))]) & 0x04) != 0)) {
var n U32 = (*Token)(unsafe.Pointer(yymsp + 8 /* &.minor */)).Fn
*(*uintptr)(unsafe.Pointer(yymsp + 8 /* &.minor */)) = tokenExpr(tls, pParse, TK_VARIABLE, *(*Token)(unsafe.Pointer(yymsp + 8 /* &.minor */)))
Xsqlite3ExprAssignVarNumber(tls, pParse, *(*uintptr)(unsafe.Pointer(yymsp + 8 /* &.minor */)), n)
@@ -140479,7 +143043,7 @@ func yy_reduce(tls *libc.TLS, yypParser uintptr, yyruleno uint32, yyLookahead in
*(*Token)(unsafe.Pointer(bp + 96 /* t */)) = *(*Token)(unsafe.Pointer(yymsp + 8 /* &.minor */)) //A-overwrites-X
if int32((*Parse)(unsafe.Pointer(pParse)).Fnested) == 0 {
- Xsqlite3ErrorMsg(tls, pParse, ts+20815 /* "near \"%T\": synta..." */, libc.VaList(bp+16, bp+96 /* &t */))
+ Xsqlite3ErrorMsg(tls, pParse, ts+21275 /* "near \"%T\": synta..." */, libc.VaList(bp+16, bp+96 /* &t */))
*(*uintptr)(unsafe.Pointer(yymsp + 8 /* &.minor */)) = uintptr(0)
} else {
*(*uintptr)(unsafe.Pointer(yymsp + 8 /* &.minor */)) = Xsqlite3PExpr(tls, pParse, TK_REGISTER, uintptr(0), uintptr(0))
@@ -140683,9 +143247,9 @@ func yy_reduce(tls *libc.TLS, yypParser uintptr, yyruleno uint32, yyLookahead in
Xsqlite3ExprUnmapAndDelete(tls, pParse, *(*uintptr)(unsafe.Pointer(yymsp + libc.UintptrFromInt32(-4)*24 + 8 /* &.minor */)))
*(*uintptr)(unsafe.Pointer(yymsp + libc.UintptrFromInt32(-4)*24 + 8 /* &.minor */)) = Xsqlite3Expr(tls, (*Parse)(unsafe.Pointer(pParse)).Fdb, TK_INTEGER, func() uintptr {
if *(*int32)(unsafe.Pointer(yymsp + libc.UintptrFromInt32(-3)*24 + 8 /* &.minor */)) != 0 {
- return ts + 6782 /* "1" */
+ return ts + 6913 /* "1" */
}
- return ts + 6375 /* "0" */
+ return ts + 6506 /* "0" */
}())
} else if ((*ExprList)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(yymsp + libc.UintptrFromInt32(-1)*24 + 8 /* &.minor */)))).FnExpr == 1) && (Xsqlite3ExprIsConstant(tls, (*ExprList_item)(unsafe.Pointer((*(*uintptr)(unsafe.Pointer(yymsp + libc.UintptrFromInt32(-1)*24 + 8 /* &.minor */))+8 /* &.a */))).FpExpr) != 0) {
var pRHS uintptr = (*ExprList_item)(unsafe.Pointer((*(*uintptr)(unsafe.Pointer(yymsp + libc.UintptrFromInt32(-1)*24 + 8 /* &.minor */)) + 8 /* &.a */))).FpExpr
@@ -140751,7 +143315,7 @@ func yy_reduce(tls *libc.TLS, yypParser uintptr, yyruleno uint32, yyLookahead in
case uint32(219): /* expr ::= EXISTS LP select RP */
{
var p uintptr
- p = libc.AssignPtrUintptr(yymsp+libc.UintptrFromInt32(-3)*24+8 /* &.minor */ /* &.yy602 */, Xsqlite3PExpr(tls, pParse, TK_EXISTS, uintptr(0), uintptr(0)))
+ p = libc.AssignPtrUintptr(yymsp+libc.UintptrFromInt32(-3)*24+8 /* &.minor */ /* &.yy404 */, Xsqlite3PExpr(tls, pParse, TK_EXISTS, uintptr(0), uintptr(0)))
Xsqlite3PExprAddSelect(tls, pParse, p, *(*uintptr)(unsafe.Pointer(yymsp + libc.UintptrFromInt32(-1)*24 + 8 /* &.minor */)))
}
@@ -140960,21 +143524,21 @@ func yy_reduce(tls *libc.TLS, yypParser uintptr, yyruleno uint32, yyLookahead in
*(*Token)(unsafe.Pointer(yymsp + libc.UintptrFromInt32(-2)*24 + 8 /* &.minor */)) = *(*Token)(unsafe.Pointer(yymsp + 8 /* &.minor */))
Xsqlite3ErrorMsg(tls, pParse,
- ts+20839 /* "qualified table ..." */, 0)
+ ts+21299 /* "qualified table ..." */, 0)
}
break
case uint32(266): /* tridxby ::= INDEXED BY nm */
{
Xsqlite3ErrorMsg(tls, pParse,
- ts+20934 /* "the INDEXED BY c..." */, 0)
+ ts+21394 /* "the INDEXED BY c..." */, 0)
}
break
case uint32(267): /* tridxby ::= NOT INDEXED */
{
Xsqlite3ErrorMsg(tls, pParse,
- ts+21018 /* "the NOT INDEXED ..." */, 0)
+ ts+21478 /* "the NOT INDEXED ..." */, 0)
}
break
case uint32(268): /* trigger_cmd ::= UPDATE orconf trnm tridxby SET setlist from where_opt scanpt */
@@ -140985,7 +143549,7 @@ func yy_reduce(tls *libc.TLS, yypParser uintptr, yyruleno uint32, yyLookahead in
break
case uint32(269): /* trigger_cmd ::= scanpt insert_cmd INTO trnm idlist_opt select upsert scanpt */
{
- *(*uintptr)(unsafe.Pointer(bp + 80 /* &yylhsminor */)) = Xsqlite3TriggerInsertStep(tls, pParse, (yymsp + libc.UintptrFromInt32(-4)*24 + 8 /* &.minor */ /* &.yy0 */), *(*uintptr)(unsafe.Pointer(yymsp + libc.UintptrFromInt32(-3)*24 + 8 /* &.minor */)), *(*uintptr)(unsafe.Pointer(yymsp + libc.UintptrFromInt32(-2)*24 + 8 /* &.minor */)), uint8(*(*int32)(unsafe.Pointer(yymsp + libc.UintptrFromInt32(-6)*24 + 8 /* &.minor */))), *(*uintptr)(unsafe.Pointer(yymsp + libc.UintptrFromInt32(-1)*24 + 8 /* &.minor */)), *(*uintptr)(unsafe.Pointer(yymsp + libc.UintptrFromInt32(-7)*24 + 8 /* &.minor */)), *(*uintptr)(unsafe.Pointer(yymsp + 8 /* &.minor */))) //yylhsminor.yy483-overwrites-yymsp[-6].minor.yy60
+ *(*uintptr)(unsafe.Pointer(bp + 80 /* &yylhsminor */)) = Xsqlite3TriggerInsertStep(tls, pParse, (yymsp + libc.UintptrFromInt32(-4)*24 + 8 /* &.minor */ /* &.yy0 */), *(*uintptr)(unsafe.Pointer(yymsp + libc.UintptrFromInt32(-3)*24 + 8 /* &.minor */)), *(*uintptr)(unsafe.Pointer(yymsp + libc.UintptrFromInt32(-2)*24 + 8 /* &.minor */)), uint8(*(*int32)(unsafe.Pointer(yymsp + libc.UintptrFromInt32(-6)*24 + 8 /* &.minor */))), *(*uintptr)(unsafe.Pointer(yymsp + libc.UintptrFromInt32(-1)*24 + 8 /* &.minor */)), *(*uintptr)(unsafe.Pointer(yymsp + libc.UintptrFromInt32(-7)*24 + 8 /* &.minor */)), *(*uintptr)(unsafe.Pointer(yymsp + 8 /* &.minor */))) //yylhsminor.yy157-overwrites-yymsp[-6].minor.yy376
}
*(*uintptr)(unsafe.Pointer(yymsp + libc.UintptrFromInt32(-7)*24 + 8 /* &.minor */)) = *(*uintptr)(unsafe.Pointer(bp + 80 /* &yylhsminor */))
break
@@ -140997,7 +143561,7 @@ func yy_reduce(tls *libc.TLS, yypParser uintptr, yyruleno uint32, yyLookahead in
break
case uint32(271): /* trigger_cmd ::= scanpt select scanpt */
{
- *(*uintptr)(unsafe.Pointer(bp + 80 /* &yylhsminor */)) = Xsqlite3TriggerSelectStep(tls, (*Parse)(unsafe.Pointer(pParse)).Fdb, *(*uintptr)(unsafe.Pointer(yymsp + libc.UintptrFromInt32(-1)*24 + 8 /* &.minor */)), *(*uintptr)(unsafe.Pointer(yymsp + libc.UintptrFromInt32(-2)*24 + 8 /* &.minor */)), *(*uintptr)(unsafe.Pointer(yymsp + 8 /* &.minor */))) /*yylhsminor.yy483-overwrites-yymsp[-1].minor.yy307*/
+ *(*uintptr)(unsafe.Pointer(bp + 80 /* &yylhsminor */)) = Xsqlite3TriggerSelectStep(tls, (*Parse)(unsafe.Pointer(pParse)).Fdb, *(*uintptr)(unsafe.Pointer(yymsp + libc.UintptrFromInt32(-1)*24 + 8 /* &.minor */)), *(*uintptr)(unsafe.Pointer(yymsp + libc.UintptrFromInt32(-2)*24 + 8 /* &.minor */)), *(*uintptr)(unsafe.Pointer(yymsp + 8 /* &.minor */))) /*yylhsminor.yy157-overwrites-yymsp[-1].minor.yy81*/
}
*(*uintptr)(unsafe.Pointer(yymsp + libc.UintptrFromInt32(-2)*24 + 8 /* &.minor */)) = *(*uintptr)(unsafe.Pointer(bp + 80 /* &yylhsminor */))
break
@@ -141005,7 +143569,7 @@ func yy_reduce(tls *libc.TLS, yypParser uintptr, yyruleno uint32, yyLookahead in
{
*(*uintptr)(unsafe.Pointer(yymsp + libc.UintptrFromInt32(-3)*24 + 8 /* &.minor */)) = Xsqlite3PExpr(tls, pParse, TK_RAISE, uintptr(0), uintptr(0))
if *(*uintptr)(unsafe.Pointer(yymsp + libc.UintptrFromInt32(-3)*24 + 8 /* &.minor */)) != 0 {
- (*Expr)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(yymsp + libc.UintptrFromInt32(-3)*24 + 8 /* &.minor */)))).FaffExpr = int8(OE_Ignore)
+ (*Expr)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(yymsp + libc.UintptrFromInt32(-3)*24 + 8 /* &.minor */)))).FaffExpr = uint8(OE_Ignore)
}
}
break
@@ -141013,7 +143577,7 @@ func yy_reduce(tls *libc.TLS, yypParser uintptr, yyruleno uint32, yyLookahead in
{
*(*uintptr)(unsafe.Pointer(yymsp + libc.UintptrFromInt32(-5)*24 + 8 /* &.minor */)) = Xsqlite3ExprAlloc(tls, (*Parse)(unsafe.Pointer(pParse)).Fdb, TK_RAISE, (yymsp + libc.UintptrFromInt32(-1)*24 + 8 /* &.minor */ /* &.yy0 */), 1)
if *(*uintptr)(unsafe.Pointer(yymsp + libc.UintptrFromInt32(-5)*24 + 8 /* &.minor */)) != 0 {
- (*Expr)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(yymsp + libc.UintptrFromInt32(-5)*24 + 8 /* &.minor */)))).FaffExpr = int8(*(*int32)(unsafe.Pointer(yymsp + libc.UintptrFromInt32(-3)*24 + 8 /* &.minor */)))
+ (*Expr)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(yymsp + libc.UintptrFromInt32(-5)*24 + 8 /* &.minor */)))).FaffExpr = uint8(*(*int32)(unsafe.Pointer(yymsp + libc.UintptrFromInt32(-3)*24 + 8 /* &.minor */)))
}
}
break
@@ -141287,7 +143851,11 @@ func yy_reduce(tls *libc.TLS, yypParser uintptr, yyruleno uint32, yyLookahead in
break
case uint32(331): /* filter_over ::= filter_clause over_clause */
{
- (*Window)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(yymsp + 8 /* &.minor */)))).FpFilter = *(*uintptr)(unsafe.Pointer(yymsp + libc.UintptrFromInt32(-1)*24 + 8 /* &.minor */))
+ if *(*uintptr)(unsafe.Pointer(yymsp + 8 /* &.minor */)) != 0 {
+ (*Window)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(yymsp + 8 /* &.minor */)))).FpFilter = *(*uintptr)(unsafe.Pointer(yymsp + libc.UintptrFromInt32(-1)*24 + 8 /* &.minor */))
+ } else {
+ Xsqlite3ExprDelete(tls, (*Parse)(unsafe.Pointer(pParse)).Fdb, *(*uintptr)(unsafe.Pointer(yymsp + libc.UintptrFromInt32(-1)*24 + 8 /* &.minor */)))
+ }
*(*uintptr)(unsafe.Pointer(bp + 80 /* &yylhsminor */)) = *(*uintptr)(unsafe.Pointer(yymsp + 8 /* &.minor */))
}
*(*uintptr)(unsafe.Pointer(yymsp + libc.UintptrFromInt32(-1)*24 + 8 /* &.minor */)) = *(*uintptr)(unsafe.Pointer(bp + 80 /* &yylhsminor */))
@@ -141409,7 +143977,7 @@ func yy_reduce(tls *libc.TLS, yypParser uintptr, yyruleno uint32, yyLookahead in
// The following code executes when the parse fails
// The following code executes when a syntax error first occurs.
-func yy_syntax_error(tls *libc.TLS, yypParser uintptr, yymajor int32, yyminor Token) { /* sqlite3.c:162027:13: */
+func yy_syntax_error(tls *libc.TLS, yypParser uintptr, yymajor int32, yyminor Token) { /* sqlite3.c:163044:13: */
bp := tls.Alloc(24)
defer tls.Free(24)
*(*Token)(unsafe.Pointer(bp + 8)) = yyminor
@@ -141418,10 +143986,10 @@ func yy_syntax_error(tls *libc.TLS, yypParser uintptr, yymajor int32, yyminor To
//*********** Begin %syntax_error code ***************************************
_ = yymajor // Silence some compiler warnings
- if *(*int8)(unsafe.Pointer((*Token)(unsafe.Pointer(bp + 8 /* &yyminor */)).Fz)) != 0 {
- Xsqlite3ErrorMsg(tls, pParse, ts+20815 /* "near \"%T\": synta..." */, libc.VaList(bp, bp+8 /* &yyminor */))
+ if *(*uint8)(unsafe.Pointer((*Token)(unsafe.Pointer(bp + 8 /* &yyminor */)).Fz)) != 0 {
+ Xsqlite3ErrorMsg(tls, pParse, ts+21275 /* "near \"%T\": synta..." */, libc.VaList(bp, bp+8 /* &yyminor */))
} else {
- Xsqlite3ErrorMsg(tls, pParse, ts+21103 /* "incomplete input" */, 0)
+ Xsqlite3ErrorMsg(tls, pParse, ts+21563 /* "incomplete input" */, 0)
}
//*********** End %syntax_error code *****************************************
@@ -141429,7 +143997,7 @@ func yy_syntax_error(tls *libc.TLS, yypParser uintptr, yymajor int32, yyminor To
}
// The following is executed when the parser accepts
-func yy_accept(tls *libc.TLS, yypParser uintptr) { /* sqlite3.c:162051:13: */
+func yy_accept(tls *libc.TLS, yypParser uintptr) { /* sqlite3.c:163068:13: */
var pParse uintptr = (*YyParser)(unsafe.Pointer(yypParser)).FpParse
@@ -141459,7 +144027,7 @@ func yy_accept(tls *libc.TLS, yypParser uintptr) { /* sqlite3.c:162051:13: */
//
// Outputs:
// None.
-func Xsqlite3Parser(tls *libc.TLS, yyp uintptr, yymajor int32, yyminor Token) { /* sqlite3.c:162092:21: */
+func Xsqlite3Parser(tls *libc.TLS, yyp uintptr, yymajor int32, yyminor Token) { /* sqlite3.c:163109:21: */
bp := tls.Alloc(16)
defer tls.Free(16)
@@ -141513,7 +144081,7 @@ func Xsqlite3Parser(tls *libc.TLS, yyp uintptr, yymajor int32, yyminor Token) {
// Return the fallback token corresponding to canonical token iToken, or
// 0 if iToken has no fallback.
-func Xsqlite3ParserFallback(tls *libc.TLS, iToken int32) int32 { /* sqlite3.c:162310:20: */
+func Xsqlite3ParserFallback(tls *libc.TLS, iToken int32) int32 { /* sqlite3.c:163327:20: */
return int32(yyFallback[iToken])
}
@@ -141556,15 +144124,15 @@ var aiClass = [256]uint8{
/* 5x */ uint8(1), uint8(1), uint8(1), uint8(1), uint8(1), uint8(1), uint8(1), uint8(1), uint8(0), uint8(2), uint8(2), uint8(9), uint8(28), uint8(28), uint8(28), uint8(2),
/* 6x */ uint8(8), uint8(1), uint8(1), uint8(1), uint8(1), uint8(1), uint8(1), uint8(1), uint8(1), uint8(1), uint8(1), uint8(1), uint8(1), uint8(1), uint8(1), uint8(1),
/* 7x */ uint8(1), uint8(1), uint8(1), uint8(1), uint8(1), uint8(1), uint8(1), uint8(1), uint8(0), uint8(2), uint8(2), uint8(28), uint8(10), uint8(28), uint8(25), uint8(28),
- /* 8x */ uint8(2), uint8(2), uint8(2), uint8(2), uint8(2), uint8(2), uint8(2), uint8(2), uint8(2), uint8(2), uint8(2), uint8(2), uint8(2), uint8(2), uint8(2), uint8(2),
- /* 9x */ uint8(2), uint8(2), uint8(2), uint8(2), uint8(2), uint8(2), uint8(2), uint8(2), uint8(2), uint8(2), uint8(2), uint8(2), uint8(2), uint8(2), uint8(2), uint8(2),
- /* Ax */ uint8(2), uint8(2), uint8(2), uint8(2), uint8(2), uint8(2), uint8(2), uint8(2), uint8(2), uint8(2), uint8(2), uint8(2), uint8(2), uint8(2), uint8(2), uint8(2),
- /* Bx */ uint8(2), uint8(2), uint8(2), uint8(2), uint8(2), uint8(2), uint8(2), uint8(2), uint8(2), uint8(2), uint8(2), uint8(2), uint8(2), uint8(2), uint8(2), uint8(2),
- /* Cx */ uint8(2), uint8(2), uint8(2), uint8(2), uint8(2), uint8(2), uint8(2), uint8(2), uint8(2), uint8(2), uint8(2), uint8(2), uint8(2), uint8(2), uint8(2), uint8(2),
- /* Dx */ uint8(2), uint8(2), uint8(2), uint8(2), uint8(2), uint8(2), uint8(2), uint8(2), uint8(2), uint8(2), uint8(2), uint8(2), uint8(2), uint8(2), uint8(2), uint8(2),
- /* Ex */ uint8(2), uint8(2), uint8(2), uint8(2), uint8(2), uint8(2), uint8(2), uint8(2), uint8(2), uint8(2), uint8(2), uint8(2), uint8(2), uint8(2), uint8(2), uint8(2),
- /* Fx */ uint8(2), uint8(2), uint8(2), uint8(2), uint8(2), uint8(2), uint8(2), uint8(2), uint8(2), uint8(2), uint8(2), uint8(2), uint8(2), uint8(2), uint8(2), uint8(2),
-} /* sqlite3.c:162381:28 */
+ /* 8x */ uint8(27), uint8(27), uint8(27), uint8(27), uint8(27), uint8(27), uint8(27), uint8(27), uint8(27), uint8(27), uint8(27), uint8(27), uint8(27), uint8(27), uint8(27), uint8(27),
+ /* 9x */ uint8(27), uint8(27), uint8(27), uint8(27), uint8(27), uint8(27), uint8(27), uint8(27), uint8(27), uint8(27), uint8(27), uint8(27), uint8(27), uint8(27), uint8(27), uint8(27),
+ /* Ax */ uint8(27), uint8(27), uint8(27), uint8(27), uint8(27), uint8(27), uint8(27), uint8(27), uint8(27), uint8(27), uint8(27), uint8(27), uint8(27), uint8(27), uint8(27), uint8(27),
+ /* Bx */ uint8(27), uint8(27), uint8(27), uint8(27), uint8(27), uint8(27), uint8(27), uint8(27), uint8(27), uint8(27), uint8(27), uint8(27), uint8(27), uint8(27), uint8(27), uint8(27),
+ /* Cx */ uint8(27), uint8(27), uint8(27), uint8(27), uint8(27), uint8(27), uint8(27), uint8(27), uint8(27), uint8(27), uint8(27), uint8(27), uint8(27), uint8(27), uint8(27), uint8(27),
+ /* Dx */ uint8(27), uint8(27), uint8(27), uint8(27), uint8(27), uint8(27), uint8(27), uint8(27), uint8(27), uint8(27), uint8(27), uint8(27), uint8(27), uint8(27), uint8(27), uint8(27),
+ /* Ex */ uint8(27), uint8(27), uint8(27), uint8(27), uint8(27), uint8(27), uint8(27), uint8(27), uint8(27), uint8(27), uint8(27), uint8(27), uint8(27), uint8(27), uint8(27), uint8(30),
+ /* Fx */ uint8(27), uint8(27), uint8(27), uint8(27), uint8(27), uint8(27), uint8(27), uint8(27), uint8(27), uint8(27), uint8(27), uint8(27), uint8(27), uint8(27), uint8(27), uint8(27),
+} /* sqlite3.c:163399:28 */
// The charMap() macro maps alphabetic characters (only) into their
// lower-case ASCII equivalent. On ASCII machines, this is just
@@ -141612,45 +144180,45 @@ var aiClass = [256]uint8{
// EPLACEFIRSTFOLLOWINGFROMFULLIMITIFORDERESTRICTOTHERSOVER
// ETURNINGRIGHTROLLBACKROWSUNBOUNDEDUNIONUSINGVACUUMVIEWINDOWBY
// INITIALLYPRIMARY
-var zKWText = [666]int8{
- int8('R'), int8('E'), int8('I'), int8('N'), int8('D'), int8('E'), int8('X'), int8('E'), int8('D'), int8('E'), int8('S'), int8('C'), int8('A'), int8('P'), int8('E'), int8('A'), int8('C'), int8('H'),
- int8('E'), int8('C'), int8('K'), int8('E'), int8('Y'), int8('B'), int8('E'), int8('F'), int8('O'), int8('R'), int8('E'), int8('I'), int8('G'), int8('N'), int8('O'), int8('R'), int8('E'), int8('G'),
- int8('E'), int8('X'), int8('P'), int8('L'), int8('A'), int8('I'), int8('N'), int8('S'), int8('T'), int8('E'), int8('A'), int8('D'), int8('D'), int8('A'), int8('T'), int8('A'), int8('B'), int8('A'),
- int8('S'), int8('E'), int8('L'), int8('E'), int8('C'), int8('T'), int8('A'), int8('B'), int8('L'), int8('E'), int8('F'), int8('T'), int8('H'), int8('E'), int8('N'), int8('D'), int8('E'), int8('F'),
- int8('E'), int8('R'), int8('R'), int8('A'), int8('B'), int8('L'), int8('E'), int8('L'), int8('S'), int8('E'), int8('X'), int8('C'), int8('L'), int8('U'), int8('D'), int8('E'), int8('L'), int8('E'),
- int8('T'), int8('E'), int8('M'), int8('P'), int8('O'), int8('R'), int8('A'), int8('R'), int8('Y'), int8('I'), int8('S'), int8('N'), int8('U'), int8('L'), int8('L'), int8('S'), int8('A'), int8('V'),
- int8('E'), int8('P'), int8('O'), int8('I'), int8('N'), int8('T'), int8('E'), int8('R'), int8('S'), int8('E'), int8('C'), int8('T'), int8('I'), int8('E'), int8('S'), int8('N'), int8('O'), int8('T'),
- int8('N'), int8('U'), int8('L'), int8('L'), int8('I'), int8('K'), int8('E'), int8('X'), int8('C'), int8('E'), int8('P'), int8('T'), int8('R'), int8('A'), int8('N'), int8('S'), int8('A'), int8('C'),
- int8('T'), int8('I'), int8('O'), int8('N'), int8('A'), int8('T'), int8('U'), int8('R'), int8('A'), int8('L'), int8('T'), int8('E'), int8('R'), int8('A'), int8('I'), int8('S'), int8('E'), int8('X'),
- int8('C'), int8('L'), int8('U'), int8('S'), int8('I'), int8('V'), int8('E'), int8('X'), int8('I'), int8('S'), int8('T'), int8('S'), int8('C'), int8('O'), int8('N'), int8('S'), int8('T'), int8('R'),
- int8('A'), int8('I'), int8('N'), int8('T'), int8('O'), int8('F'), int8('F'), int8('S'), int8('E'), int8('T'), int8('R'), int8('I'), int8('G'), int8('G'), int8('E'), int8('R'), int8('A'), int8('N'),
- int8('G'), int8('E'), int8('N'), int8('E'), int8('R'), int8('A'), int8('T'), int8('E'), int8('D'), int8('E'), int8('T'), int8('A'), int8('C'), int8('H'), int8('A'), int8('V'), int8('I'), int8('N'),
- int8('G'), int8('L'), int8('O'), int8('B'), int8('E'), int8('G'), int8('I'), int8('N'), int8('N'), int8('E'), int8('R'), int8('E'), int8('F'), int8('E'), int8('R'), int8('E'), int8('N'), int8('C'),
- int8('E'), int8('S'), int8('U'), int8('N'), int8('I'), int8('Q'), int8('U'), int8('E'), int8('R'), int8('Y'), int8('W'), int8('I'), int8('T'), int8('H'), int8('O'), int8('U'), int8('T'), int8('E'),
- int8('R'), int8('E'), int8('L'), int8('E'), int8('A'), int8('S'), int8('E'), int8('A'), int8('T'), int8('T'), int8('A'), int8('C'), int8('H'), int8('B'), int8('E'), int8('T'), int8('W'), int8('E'),
- int8('E'), int8('N'), int8('O'), int8('T'), int8('H'), int8('I'), int8('N'), int8('G'), int8('R'), int8('O'), int8('U'), int8('P'), int8('S'), int8('C'), int8('A'), int8('S'), int8('C'), int8('A'),
- int8('D'), int8('E'), int8('F'), int8('A'), int8('U'), int8('L'), int8('T'), int8('C'), int8('A'), int8('S'), int8('E'), int8('C'), int8('O'), int8('L'), int8('L'), int8('A'), int8('T'), int8('E'),
- int8('C'), int8('R'), int8('E'), int8('A'), int8('T'), int8('E'), int8('C'), int8('U'), int8('R'), int8('R'), int8('E'), int8('N'), int8('T'), int8('_'), int8('D'), int8('A'), int8('T'), int8('E'),
- int8('I'), int8('M'), int8('M'), int8('E'), int8('D'), int8('I'), int8('A'), int8('T'), int8('E'), int8('J'), int8('O'), int8('I'), int8('N'), int8('S'), int8('E'), int8('R'), int8('T'), int8('M'),
- int8('A'), int8('T'), int8('C'), int8('H'), int8('P'), int8('L'), int8('A'), int8('N'), int8('A'), int8('L'), int8('Y'), int8('Z'), int8('E'), int8('P'), int8('R'), int8('A'), int8('G'), int8('M'),
- int8('A'), int8('T'), int8('E'), int8('R'), int8('I'), int8('A'), int8('L'), int8('I'), int8('Z'), int8('E'), int8('D'), int8('E'), int8('F'), int8('E'), int8('R'), int8('R'), int8('E'), int8('D'),
- int8('I'), int8('S'), int8('T'), int8('I'), int8('N'), int8('C'), int8('T'), int8('U'), int8('P'), int8('D'), int8('A'), int8('T'), int8('E'), int8('V'), int8('A'), int8('L'), int8('U'), int8('E'),
- int8('S'), int8('V'), int8('I'), int8('R'), int8('T'), int8('U'), int8('A'), int8('L'), int8('W'), int8('A'), int8('Y'), int8('S'), int8('W'), int8('H'), int8('E'), int8('N'), int8('W'), int8('H'),
- int8('E'), int8('R'), int8('E'), int8('C'), int8('U'), int8('R'), int8('S'), int8('I'), int8('V'), int8('E'), int8('A'), int8('B'), int8('O'), int8('R'), int8('T'), int8('A'), int8('F'), int8('T'),
- int8('E'), int8('R'), int8('E'), int8('N'), int8('A'), int8('M'), int8('E'), int8('A'), int8('N'), int8('D'), int8('R'), int8('O'), int8('P'), int8('A'), int8('R'), int8('T'), int8('I'), int8('T'),
- int8('I'), int8('O'), int8('N'), int8('A'), int8('U'), int8('T'), int8('O'), int8('I'), int8('N'), int8('C'), int8('R'), int8('E'), int8('M'), int8('E'), int8('N'), int8('T'), int8('C'), int8('A'),
- int8('S'), int8('T'), int8('C'), int8('O'), int8('L'), int8('U'), int8('M'), int8('N'), int8('C'), int8('O'), int8('M'), int8('M'), int8('I'), int8('T'), int8('C'), int8('O'), int8('N'), int8('F'),
- int8('L'), int8('I'), int8('C'), int8('T'), int8('C'), int8('R'), int8('O'), int8('S'), int8('S'), int8('C'), int8('U'), int8('R'), int8('R'), int8('E'), int8('N'), int8('T'), int8('_'), int8('T'),
- int8('I'), int8('M'), int8('E'), int8('S'), int8('T'), int8('A'), int8('M'), int8('P'), int8('R'), int8('E'), int8('C'), int8('E'), int8('D'), int8('I'), int8('N'), int8('G'), int8('F'), int8('A'),
- int8('I'), int8('L'), int8('A'), int8('S'), int8('T'), int8('F'), int8('I'), int8('L'), int8('T'), int8('E'), int8('R'), int8('E'), int8('P'), int8('L'), int8('A'), int8('C'), int8('E'), int8('F'),
- int8('I'), int8('R'), int8('S'), int8('T'), int8('F'), int8('O'), int8('L'), int8('L'), int8('O'), int8('W'), int8('I'), int8('N'), int8('G'), int8('F'), int8('R'), int8('O'), int8('M'), int8('F'),
- int8('U'), int8('L'), int8('L'), int8('I'), int8('M'), int8('I'), int8('T'), int8('I'), int8('F'), int8('O'), int8('R'), int8('D'), int8('E'), int8('R'), int8('E'), int8('S'), int8('T'), int8('R'),
- int8('I'), int8('C'), int8('T'), int8('O'), int8('T'), int8('H'), int8('E'), int8('R'), int8('S'), int8('O'), int8('V'), int8('E'), int8('R'), int8('E'), int8('T'), int8('U'), int8('R'), int8('N'),
- int8('I'), int8('N'), int8('G'), int8('R'), int8('I'), int8('G'), int8('H'), int8('T'), int8('R'), int8('O'), int8('L'), int8('L'), int8('B'), int8('A'), int8('C'), int8('K'), int8('R'), int8('O'),
- int8('W'), int8('S'), int8('U'), int8('N'), int8('B'), int8('O'), int8('U'), int8('N'), int8('D'), int8('E'), int8('D'), int8('U'), int8('N'), int8('I'), int8('O'), int8('N'), int8('U'), int8('S'),
- int8('I'), int8('N'), int8('G'), int8('V'), int8('A'), int8('C'), int8('U'), int8('U'), int8('M'), int8('V'), int8('I'), int8('E'), int8('W'), int8('I'), int8('N'), int8('D'), int8('O'), int8('W'),
- int8('B'), int8('Y'), int8('I'), int8('N'), int8('I'), int8('T'), int8('I'), int8('A'), int8('L'), int8('L'), int8('Y'), int8('P'), int8('R'), int8('I'), int8('M'), int8('A'), int8('R'), int8('Y'),
-} /* sqlite3.c:162497:19 */
+var zKWText = [666]uint8{
+ uint8('R'), uint8('E'), uint8('I'), uint8('N'), uint8('D'), uint8('E'), uint8('X'), uint8('E'), uint8('D'), uint8('E'), uint8('S'), uint8('C'), uint8('A'), uint8('P'), uint8('E'), uint8('A'), uint8('C'), uint8('H'),
+ uint8('E'), uint8('C'), uint8('K'), uint8('E'), uint8('Y'), uint8('B'), uint8('E'), uint8('F'), uint8('O'), uint8('R'), uint8('E'), uint8('I'), uint8('G'), uint8('N'), uint8('O'), uint8('R'), uint8('E'), uint8('G'),
+ uint8('E'), uint8('X'), uint8('P'), uint8('L'), uint8('A'), uint8('I'), uint8('N'), uint8('S'), uint8('T'), uint8('E'), uint8('A'), uint8('D'), uint8('D'), uint8('A'), uint8('T'), uint8('A'), uint8('B'), uint8('A'),
+ uint8('S'), uint8('E'), uint8('L'), uint8('E'), uint8('C'), uint8('T'), uint8('A'), uint8('B'), uint8('L'), uint8('E'), uint8('F'), uint8('T'), uint8('H'), uint8('E'), uint8('N'), uint8('D'), uint8('E'), uint8('F'),
+ uint8('E'), uint8('R'), uint8('R'), uint8('A'), uint8('B'), uint8('L'), uint8('E'), uint8('L'), uint8('S'), uint8('E'), uint8('X'), uint8('C'), uint8('L'), uint8('U'), uint8('D'), uint8('E'), uint8('L'), uint8('E'),
+ uint8('T'), uint8('E'), uint8('M'), uint8('P'), uint8('O'), uint8('R'), uint8('A'), uint8('R'), uint8('Y'), uint8('I'), uint8('S'), uint8('N'), uint8('U'), uint8('L'), uint8('L'), uint8('S'), uint8('A'), uint8('V'),
+ uint8('E'), uint8('P'), uint8('O'), uint8('I'), uint8('N'), uint8('T'), uint8('E'), uint8('R'), uint8('S'), uint8('E'), uint8('C'), uint8('T'), uint8('I'), uint8('E'), uint8('S'), uint8('N'), uint8('O'), uint8('T'),
+ uint8('N'), uint8('U'), uint8('L'), uint8('L'), uint8('I'), uint8('K'), uint8('E'), uint8('X'), uint8('C'), uint8('E'), uint8('P'), uint8('T'), uint8('R'), uint8('A'), uint8('N'), uint8('S'), uint8('A'), uint8('C'),
+ uint8('T'), uint8('I'), uint8('O'), uint8('N'), uint8('A'), uint8('T'), uint8('U'), uint8('R'), uint8('A'), uint8('L'), uint8('T'), uint8('E'), uint8('R'), uint8('A'), uint8('I'), uint8('S'), uint8('E'), uint8('X'),
+ uint8('C'), uint8('L'), uint8('U'), uint8('S'), uint8('I'), uint8('V'), uint8('E'), uint8('X'), uint8('I'), uint8('S'), uint8('T'), uint8('S'), uint8('C'), uint8('O'), uint8('N'), uint8('S'), uint8('T'), uint8('R'),
+ uint8('A'), uint8('I'), uint8('N'), uint8('T'), uint8('O'), uint8('F'), uint8('F'), uint8('S'), uint8('E'), uint8('T'), uint8('R'), uint8('I'), uint8('G'), uint8('G'), uint8('E'), uint8('R'), uint8('A'), uint8('N'),
+ uint8('G'), uint8('E'), uint8('N'), uint8('E'), uint8('R'), uint8('A'), uint8('T'), uint8('E'), uint8('D'), uint8('E'), uint8('T'), uint8('A'), uint8('C'), uint8('H'), uint8('A'), uint8('V'), uint8('I'), uint8('N'),
+ uint8('G'), uint8('L'), uint8('O'), uint8('B'), uint8('E'), uint8('G'), uint8('I'), uint8('N'), uint8('N'), uint8('E'), uint8('R'), uint8('E'), uint8('F'), uint8('E'), uint8('R'), uint8('E'), uint8('N'), uint8('C'),
+ uint8('E'), uint8('S'), uint8('U'), uint8('N'), uint8('I'), uint8('Q'), uint8('U'), uint8('E'), uint8('R'), uint8('Y'), uint8('W'), uint8('I'), uint8('T'), uint8('H'), uint8('O'), uint8('U'), uint8('T'), uint8('E'),
+ uint8('R'), uint8('E'), uint8('L'), uint8('E'), uint8('A'), uint8('S'), uint8('E'), uint8('A'), uint8('T'), uint8('T'), uint8('A'), uint8('C'), uint8('H'), uint8('B'), uint8('E'), uint8('T'), uint8('W'), uint8('E'),
+ uint8('E'), uint8('N'), uint8('O'), uint8('T'), uint8('H'), uint8('I'), uint8('N'), uint8('G'), uint8('R'), uint8('O'), uint8('U'), uint8('P'), uint8('S'), uint8('C'), uint8('A'), uint8('S'), uint8('C'), uint8('A'),
+ uint8('D'), uint8('E'), uint8('F'), uint8('A'), uint8('U'), uint8('L'), uint8('T'), uint8('C'), uint8('A'), uint8('S'), uint8('E'), uint8('C'), uint8('O'), uint8('L'), uint8('L'), uint8('A'), uint8('T'), uint8('E'),
+ uint8('C'), uint8('R'), uint8('E'), uint8('A'), uint8('T'), uint8('E'), uint8('C'), uint8('U'), uint8('R'), uint8('R'), uint8('E'), uint8('N'), uint8('T'), uint8('_'), uint8('D'), uint8('A'), uint8('T'), uint8('E'),
+ uint8('I'), uint8('M'), uint8('M'), uint8('E'), uint8('D'), uint8('I'), uint8('A'), uint8('T'), uint8('E'), uint8('J'), uint8('O'), uint8('I'), uint8('N'), uint8('S'), uint8('E'), uint8('R'), uint8('T'), uint8('M'),
+ uint8('A'), uint8('T'), uint8('C'), uint8('H'), uint8('P'), uint8('L'), uint8('A'), uint8('N'), uint8('A'), uint8('L'), uint8('Y'), uint8('Z'), uint8('E'), uint8('P'), uint8('R'), uint8('A'), uint8('G'), uint8('M'),
+ uint8('A'), uint8('T'), uint8('E'), uint8('R'), uint8('I'), uint8('A'), uint8('L'), uint8('I'), uint8('Z'), uint8('E'), uint8('D'), uint8('E'), uint8('F'), uint8('E'), uint8('R'), uint8('R'), uint8('E'), uint8('D'),
+ uint8('I'), uint8('S'), uint8('T'), uint8('I'), uint8('N'), uint8('C'), uint8('T'), uint8('U'), uint8('P'), uint8('D'), uint8('A'), uint8('T'), uint8('E'), uint8('V'), uint8('A'), uint8('L'), uint8('U'), uint8('E'),
+ uint8('S'), uint8('V'), uint8('I'), uint8('R'), uint8('T'), uint8('U'), uint8('A'), uint8('L'), uint8('W'), uint8('A'), uint8('Y'), uint8('S'), uint8('W'), uint8('H'), uint8('E'), uint8('N'), uint8('W'), uint8('H'),
+ uint8('E'), uint8('R'), uint8('E'), uint8('C'), uint8('U'), uint8('R'), uint8('S'), uint8('I'), uint8('V'), uint8('E'), uint8('A'), uint8('B'), uint8('O'), uint8('R'), uint8('T'), uint8('A'), uint8('F'), uint8('T'),
+ uint8('E'), uint8('R'), uint8('E'), uint8('N'), uint8('A'), uint8('M'), uint8('E'), uint8('A'), uint8('N'), uint8('D'), uint8('R'), uint8('O'), uint8('P'), uint8('A'), uint8('R'), uint8('T'), uint8('I'), uint8('T'),
+ uint8('I'), uint8('O'), uint8('N'), uint8('A'), uint8('U'), uint8('T'), uint8('O'), uint8('I'), uint8('N'), uint8('C'), uint8('R'), uint8('E'), uint8('M'), uint8('E'), uint8('N'), uint8('T'), uint8('C'), uint8('A'),
+ uint8('S'), uint8('T'), uint8('C'), uint8('O'), uint8('L'), uint8('U'), uint8('M'), uint8('N'), uint8('C'), uint8('O'), uint8('M'), uint8('M'), uint8('I'), uint8('T'), uint8('C'), uint8('O'), uint8('N'), uint8('F'),
+ uint8('L'), uint8('I'), uint8('C'), uint8('T'), uint8('C'), uint8('R'), uint8('O'), uint8('S'), uint8('S'), uint8('C'), uint8('U'), uint8('R'), uint8('R'), uint8('E'), uint8('N'), uint8('T'), uint8('_'), uint8('T'),
+ uint8('I'), uint8('M'), uint8('E'), uint8('S'), uint8('T'), uint8('A'), uint8('M'), uint8('P'), uint8('R'), uint8('E'), uint8('C'), uint8('E'), uint8('D'), uint8('I'), uint8('N'), uint8('G'), uint8('F'), uint8('A'),
+ uint8('I'), uint8('L'), uint8('A'), uint8('S'), uint8('T'), uint8('F'), uint8('I'), uint8('L'), uint8('T'), uint8('E'), uint8('R'), uint8('E'), uint8('P'), uint8('L'), uint8('A'), uint8('C'), uint8('E'), uint8('F'),
+ uint8('I'), uint8('R'), uint8('S'), uint8('T'), uint8('F'), uint8('O'), uint8('L'), uint8('L'), uint8('O'), uint8('W'), uint8('I'), uint8('N'), uint8('G'), uint8('F'), uint8('R'), uint8('O'), uint8('M'), uint8('F'),
+ uint8('U'), uint8('L'), uint8('L'), uint8('I'), uint8('M'), uint8('I'), uint8('T'), uint8('I'), uint8('F'), uint8('O'), uint8('R'), uint8('D'), uint8('E'), uint8('R'), uint8('E'), uint8('S'), uint8('T'), uint8('R'),
+ uint8('I'), uint8('C'), uint8('T'), uint8('O'), uint8('T'), uint8('H'), uint8('E'), uint8('R'), uint8('S'), uint8('O'), uint8('V'), uint8('E'), uint8('R'), uint8('E'), uint8('T'), uint8('U'), uint8('R'), uint8('N'),
+ uint8('I'), uint8('N'), uint8('G'), uint8('R'), uint8('I'), uint8('G'), uint8('H'), uint8('T'), uint8('R'), uint8('O'), uint8('L'), uint8('L'), uint8('B'), uint8('A'), uint8('C'), uint8('K'), uint8('R'), uint8('O'),
+ uint8('W'), uint8('S'), uint8('U'), uint8('N'), uint8('B'), uint8('O'), uint8('U'), uint8('N'), uint8('D'), uint8('E'), uint8('D'), uint8('U'), uint8('N'), uint8('I'), uint8('O'), uint8('N'), uint8('U'), uint8('S'),
+ uint8('I'), uint8('N'), uint8('G'), uint8('V'), uint8('A'), uint8('C'), uint8('U'), uint8('U'), uint8('M'), uint8('V'), uint8('I'), uint8('E'), uint8('W'), uint8('I'), uint8('N'), uint8('D'), uint8('O'), uint8('W'),
+ uint8('B'), uint8('Y'), uint8('I'), uint8('N'), uint8('I'), uint8('T'), uint8('I'), uint8('A'), uint8('L'), uint8('L'), uint8('Y'), uint8('P'), uint8('R'), uint8('I'), uint8('M'), uint8('A'), uint8('R'), uint8('Y'),
+} /* sqlite3.c:163515:19 */
// aKWHash[i] is the hash value for the i-th keyword
var aKWHash = [127]uint8{
uint8(84), uint8(92), uint8(134), uint8(82), uint8(105), uint8(29), uint8(0), uint8(0), uint8(94), uint8(0), uint8(85), uint8(72), uint8(0),
@@ -141663,7 +144231,7 @@ var aKWHash = [127]uint8{
uint8(50), uint8(124), uint8(0), uint8(100), uint8(0), uint8(18), uint8(121), uint8(144), uint8(56), uint8(130), uint8(139), uint8(88), uint8(83),
uint8(37), uint8(30), uint8(126), uint8(0), uint8(0), uint8(108), uint8(51), uint8(131), uint8(128), uint8(0), uint8(34), uint8(0), uint8(0),
uint8(132), uint8(0), uint8(98), uint8(38), uint8(39), uint8(0), uint8(20), uint8(45), uint8(117), uint8(93),
-} /* sqlite3.c:162537:28 */
+} /* sqlite3.c:163555:28 */
// aKWNext[] forms the hash collision chain. If aKWHash[i]==0
// then the i-th keyword has no more hash collisions. Otherwise,
// the next keyword with the same hash is aKWHash[i]-1.
@@ -141680,7 +144248,7 @@ var aKWNext = [147]uint8{
uint8(112), uint8(21), uint8(7), uint8(67), uint8(0), uint8(79), uint8(96), uint8(118), uint8(0), uint8(0), uint8(68), uint8(0), uint8(0),
uint8(99), uint8(44), uint8(0), uint8(55), uint8(0), uint8(76), uint8(0), uint8(95), uint8(32), uint8(33), uint8(57), uint8(25), uint8(0),
uint8(102), uint8(0), uint8(0), uint8(87),
-} /* sqlite3.c:162552:28 */
+} /* sqlite3.c:163570:28 */
// aKWLen[i] is the length (in bytes) of the i-th keyword
var aKWLen = [147]uint8{
uint8(7), uint8(7), uint8(5), uint8(4), uint8(6), uint8(4), uint8(5), uint8(3), uint8(6), uint8(7), uint8(3), uint8(6), uint8(6),
@@ -141695,7 +144263,7 @@ var aKWLen = [147]uint8{
uint8(4), uint8(4), uint8(6), uint8(7), uint8(5), uint8(9), uint8(4), uint8(4), uint8(5), uint8(2), uint8(5), uint8(8), uint8(6),
uint8(4), uint8(9), uint8(5), uint8(8), uint8(4), uint8(3), uint8(9), uint8(5), uint8(5), uint8(6), uint8(4), uint8(6), uint8(2),
uint8(2), uint8(9), uint8(3), uint8(7),
-} /* sqlite3.c:162567:28 */
+} /* sqlite3.c:163585:28 */
// aKWOffset[i] is the index into zKWText[] of the start of
// the text for the i-th keyword.
var aKWOffset = [147]uint16{
@@ -141711,7 +144279,7 @@ var aKWOffset = [147]uint16{
uint16(520), uint16(523), uint16(527), uint16(532), uint16(539), uint16(544), uint16(553), uint16(557), uint16(560), uint16(565), uint16(567), uint16(571), uint16(579),
uint16(585), uint16(588), uint16(597), uint16(602), uint16(610), uint16(610), uint16(614), uint16(623), uint16(628), uint16(633), uint16(639), uint16(642), uint16(645),
uint16(648), uint16(650), uint16(655), uint16(659),
-} /* sqlite3.c:162583:33 */
+} /* sqlite3.c:163601:33 */
// aKWCode[i] is the parser symbol code for the i-th keyword
var aKWCode = [147]uint8{
uint8(TK_REINDEX), uint8(TK_INDEXED), uint8(TK_INDEX), uint8(TK_DESC), uint8(TK_ESCAPE),
@@ -141744,7 +144312,7 @@ var aKWCode = [147]uint8{
uint8(TK_ROW), uint8(TK_UNBOUNDED), uint8(TK_UNION), uint8(TK_USING), uint8(TK_VACUUM),
uint8(TK_VIEW), uint8(TK_WINDOW), uint8(TK_DO), uint8(TK_BY), uint8(TK_INITIALLY),
uint8(TK_ALL), uint8(TK_PRIMARY),
-} /* sqlite3.c:162598:28 */
+} /* sqlite3.c:163616:28 */
// Hash table decoded:
// 0: INSERT
@@ -141877,25 +144445,25 @@ var aKWCode = [147]uint8{
// Check to see if z[0..n-1] is a keyword. If it is, write the
// parser symbol code for that keyword into *pType. Always
// return the integer n (the length of the token).
-func keywordCode(tls *libc.TLS, z uintptr, n int32, pType uintptr) int32 { /* sqlite3.c:162762:12: */
+func keywordCode(tls *libc.TLS, z uintptr, n int32, pType uintptr) int32 { /* sqlite3.c:163780:12: */
var i int32
var j int32
var zKW uintptr
if n >= 2 {
- i = ((((int32(Xsqlite3UpperToLower[uint8(*(*int8)(unsafe.Pointer(z)))]) * 4) ^ (int32(Xsqlite3UpperToLower[uint8(*(*int8)(unsafe.Pointer(z + uintptr((n - 1)))))]) * 3)) ^ (n * 1)) % 127)
+ i = ((((int32(Xsqlite3UpperToLower[uint8(*(*uint8)(unsafe.Pointer(z)))]) * 4) ^ (int32(Xsqlite3UpperToLower[uint8(*(*uint8)(unsafe.Pointer(z + uintptr((n - 1)))))]) * 3)) ^ (n * 1)) % 127)
for i = ((int32(aKWHash[i])) - 1); i >= 0; i = ((int32(aKWNext[i])) - 1) {
if int32(aKWLen[i]) != n {
continue
}
zKW = (uintptr(unsafe.Pointer(&zKWText)) + uintptr(aKWOffset[i]))
- if (int32(*(*int8)(unsafe.Pointer(z))) & libc.CplInt32(0x20)) != int32(*(*int8)(unsafe.Pointer(zKW))) {
+ if (int32(*(*uint8)(unsafe.Pointer(z))) & libc.CplInt32(0x20)) != int32(*(*uint8)(unsafe.Pointer(zKW))) {
continue
}
- if (int32(*(*int8)(unsafe.Pointer(z + 1))) & libc.CplInt32(0x20)) != int32(*(*int8)(unsafe.Pointer(zKW + 1))) {
+ if (int32(*(*uint8)(unsafe.Pointer(z + 1))) & libc.CplInt32(0x20)) != int32(*(*uint8)(unsafe.Pointer(zKW + 1))) {
continue
}
j = 2
- for (j < n) && ((int32(*(*int8)(unsafe.Pointer(z + uintptr(j)))) & libc.CplInt32(0x20)) == int32(*(*int8)(unsafe.Pointer(zKW + uintptr(j))))) {
+ for (j < n) && ((int32(*(*uint8)(unsafe.Pointer(z + uintptr(j)))) & libc.CplInt32(0x20)) == int32(*(*uint8)(unsafe.Pointer(zKW + uintptr(j))))) {
j++
}
if j < n {
@@ -142055,7 +144623,7 @@ func keywordCode(tls *libc.TLS, z uintptr, n int32, pType uintptr) int32 { /* sq
return n
}
-func Xsqlite3KeywordCode(tls *libc.TLS, z uintptr, n int32) int32 { /* sqlite3.c:162936:20: */
+func Xsqlite3KeywordCode(tls *libc.TLS, z uintptr, n int32) int32 { /* sqlite3.c:163954:20: */
bp := tls.Alloc(4)
defer tls.Free(4)
@@ -142064,7 +144632,7 @@ func Xsqlite3KeywordCode(tls *libc.TLS, z uintptr, n int32) int32 { /* sqlite3.c
return *(*int32)(unsafe.Pointer(bp /* id */))
}
-func Xsqlite3_keyword_name(tls *libc.TLS, i int32, pzName uintptr, pnName uintptr) int32 { /* sqlite3.c:162942:16: */
+func Xsqlite3_keyword_name(tls *libc.TLS, i int32, pzName uintptr, pnName uintptr) int32 { /* sqlite3.c:163960:16: */
if (i < 0) || (i >= SQLITE_N_KEYWORD) {
return SQLITE_ERROR
}
@@ -142073,11 +144641,11 @@ func Xsqlite3_keyword_name(tls *libc.TLS, i int32, pzName uintptr, pnName uintpt
return SQLITE_OK
}
-func Xsqlite3_keyword_count(tls *libc.TLS) int32 { /* sqlite3.c:162948:16: */
+func Xsqlite3_keyword_count(tls *libc.TLS) int32 { /* sqlite3.c:163966:16: */
return SQLITE_N_KEYWORD
}
-func Xsqlite3_keyword_check(tls *libc.TLS, zName uintptr, nName int32) int32 { /* sqlite3.c:162949:16: */
+func Xsqlite3_keyword_check(tls *libc.TLS, zName uintptr, nName int32) int32 { /* sqlite3.c:163967:16: */
return (libc.Bool32(TK_ID != Xsqlite3KeywordCode(tls, zName, nName)))
}
@@ -142100,13 +144668,13 @@ func Xsqlite3_keyword_check(tls *libc.TLS, zName uintptr, nName int32) int32 { /
// But the feature is undocumented.
// Make the IdChar function accessible from ctime.c and alter.c
-func Xsqlite3IsIdChar(tls *libc.TLS, c U8) int32 { /* sqlite3.c:162996:20: */
+func Xsqlite3IsIdChar(tls *libc.TLS, c U8) int32 { /* sqlite3.c:164014:20: */
return (libc.Bool32((int32(Xsqlite3CtypeMap[c]) & 0x46) != 0))
}
// Return the id of the next token in string (*pz). Before returning, set
// (*pz) to point to the byte following the parsed token.
-func getToken(tls *libc.TLS, pz uintptr) int32 { /* sqlite3.c:163003:12: */
+func getToken(tls *libc.TLS, pz uintptr) int32 { /* sqlite3.c:164021:12: */
bp := tls.Alloc(4)
defer tls.Free(4)
@@ -142156,7 +144724,7 @@ func getToken(tls *libc.TLS, pz uintptr) int32 { /* sqlite3.c:163003:12: */
//
// * the previous token was TK_RP, and
// * the next token is TK_LP.
-func analyzeWindowKeyword(tls *libc.TLS, z uintptr) int32 { /* sqlite3.c:163052:12: */
+func analyzeWindowKeyword(tls *libc.TLS, z uintptr) int32 { /* sqlite3.c:164070:12: */
bp := tls.Alloc(8)
defer tls.Free(8)
*(*uintptr)(unsafe.Pointer(bp)) = z
@@ -142173,7 +144741,7 @@ func analyzeWindowKeyword(tls *libc.TLS, z uintptr) int32 { /* sqlite3.c:163052:
return TK_WINDOW
}
-func analyzeOverKeyword(tls *libc.TLS, z uintptr, lastToken int32) int32 { /* sqlite3.c:163060:12: */
+func analyzeOverKeyword(tls *libc.TLS, z uintptr, lastToken int32) int32 { /* sqlite3.c:164078:12: */
bp := tls.Alloc(8)
defer tls.Free(8)
*(*uintptr)(unsafe.Pointer(bp)) = z
@@ -142187,7 +144755,7 @@ func analyzeOverKeyword(tls *libc.TLS, z uintptr, lastToken int32) int32 { /* sq
return TK_ID
}
-func analyzeFilterKeyword(tls *libc.TLS, z uintptr, lastToken int32) int32 { /* sqlite3.c:163067:12: */
+func analyzeFilterKeyword(tls *libc.TLS, z uintptr, lastToken int32) int32 { /* sqlite3.c:164085:12: */
bp := tls.Alloc(8)
defer tls.Free(8)
*(*uintptr)(unsafe.Pointer(bp)) = z
@@ -142200,7 +144768,7 @@ func analyzeFilterKeyword(tls *libc.TLS, z uintptr, lastToken int32) int32 { /*
// Return the length (in bytes) of the token that begins at z[0].
// Store the token type in *tokenType before returning.
-func Xsqlite3GetToken(tls *libc.TLS, z uintptr, tokenType uintptr) int32 { /* sqlite3.c:163079:20: */
+func Xsqlite3GetToken(tls *libc.TLS, z uintptr, tokenType uintptr) int32 { /* sqlite3.c:164097:20: */
var i int32
var c int32
switch int32(aiClass[*(*uint8)(unsafe.Pointer(z))]) { // Switch on the character-class of the first byte
@@ -142527,6 +145095,16 @@ func Xsqlite3GetToken(tls *libc.TLS, z uintptr, tokenType uintptr) int32 { /* sq
i = 1
break
+ }
+ case CC_BOM:
+ {
+ if (int32(*(*uint8)(unsafe.Pointer(z + 1))) == 0xbb) && (int32(*(*uint8)(unsafe.Pointer(z + 2))) == 0xbf) {
+ *(*int32)(unsafe.Pointer(tokenType)) = TK_SPACE
+ return 3
+ }
+ i = 1
+ break
+
}
case CC_NUL:
{
@@ -142553,7 +145131,7 @@ func Xsqlite3GetToken(tls *libc.TLS, z uintptr, tokenType uintptr) int32 { /* sq
// then an and attempt is made to write an error message into
// memory obtained from sqlite3_malloc() and to make *pzErrMsg point to that
// error message.
-func Xsqlite3RunParser(tls *libc.TLS, pParse uintptr, zSql uintptr, pzErrMsg uintptr) int32 { /* sqlite3.c:163366:20: */
+func Xsqlite3RunParser(tls *libc.TLS, pParse uintptr, zSql uintptr, pzErrMsg uintptr) int32 { /* sqlite3.c:164392:20: */
bp := tls.Alloc(2468)
defer tls.Free(2468)
@@ -142597,7 +145175,7 @@ func Xsqlite3RunParser(tls *libc.TLS, pParse uintptr, zSql uintptr, pzErrMsg uin
zSql += uintptr(n)
continue
}
- if int32(*(*int8)(unsafe.Pointer(zSql))) == 0 {
+ if int32(*(*uint8)(unsafe.Pointer(zSql))) == 0 {
// Upon reaching the end of input, call the parser two more times
// with tokens TK_SEMI and 0, in that order.
if lastTokenParsed == TK_SEMI {
@@ -142618,7 +145196,7 @@ func Xsqlite3RunParser(tls *libc.TLS, pParse uintptr, zSql uintptr, pzErrMsg uin
*(*int32)(unsafe.Pointer(bp + 2464 /* tokenType */)) = analyzeFilterKeyword(tls, (zSql + 6), lastTokenParsed)
} else {
- Xsqlite3ErrorMsg(tls, pParse, ts+21120 /* "unrecognized tok..." */, libc.VaList(bp, n, zSql))
+ Xsqlite3ErrorMsg(tls, pParse, ts+21580 /* "unrecognized tok..." */, libc.VaList(bp, n, zSql))
break
}
}
@@ -142638,12 +145216,12 @@ func Xsqlite3RunParser(tls *libc.TLS, pParse uintptr, zSql uintptr, pzErrMsg uin
(*Parse)(unsafe.Pointer(pParse)).Frc = SQLITE_NOMEM
}
if (((*Parse)(unsafe.Pointer(pParse)).Frc != SQLITE_OK) && ((*Parse)(unsafe.Pointer(pParse)).Frc != SQLITE_DONE)) && ((*Parse)(unsafe.Pointer(pParse)).FzErrMsg == uintptr(0)) {
- (*Parse)(unsafe.Pointer(pParse)).FzErrMsg = Xsqlite3MPrintf(tls, db, ts+2718 /* "%s" */, libc.VaList(bp+16, Xsqlite3ErrStr(tls, (*Parse)(unsafe.Pointer(pParse)).Frc)))
+ (*Parse)(unsafe.Pointer(pParse)).FzErrMsg = Xsqlite3MPrintf(tls, db, ts+2790 /* "%s" */, libc.VaList(bp+16, Xsqlite3ErrStr(tls, (*Parse)(unsafe.Pointer(pParse)).Frc)))
}
if (*Parse)(unsafe.Pointer(pParse)).FzErrMsg != 0 {
*(*uintptr)(unsafe.Pointer(pzErrMsg)) = (*Parse)(unsafe.Pointer(pParse)).FzErrMsg
- Xsqlite3_log(tls, (*Parse)(unsafe.Pointer(pParse)).Frc, ts+21147, /* "%s in \"%s\"" */
+ Xsqlite3_log(tls, (*Parse)(unsafe.Pointer(pParse)).Frc, ts+21607, /* "%s in \"%s\"" */
libc.VaList(bp+24, *(*uintptr)(unsafe.Pointer(pzErrMsg)), (*Parse)(unsafe.Pointer(pParse)).FzTail))
(*Parse)(unsafe.Pointer(pParse)).FzErrMsg = uintptr(0)
nErr++
@@ -142752,12 +145330,12 @@ func Xsqlite3RunParser(tls *libc.TLS, pParse uintptr, zSql uintptr, pzErrMsg uin
// If we compile with SQLITE_OMIT_TRIGGER, all of the computation needed
// to recognize the end of a trigger can be omitted. All we have to do
// is look for a semicolon that is not part of an string or comment.
-func Xsqlite3_complete(tls *libc.TLS, zSql uintptr) int32 { /* sqlite3.c:163770:16: */
+func Xsqlite3_complete(tls *libc.TLS, zSql uintptr) int32 { /* sqlite3.c:164796:16: */
var state U8 = U8(0) // Current state, using numbers defined in header comment
var token U8
- for *(*int8)(unsafe.Pointer(zSql)) != 0 {
- switch int32(*(*int8)(unsafe.Pointer(zSql))) {
+ for *(*uint8)(unsafe.Pointer(zSql)) != 0 {
+ switch int32(*(*uint8)(unsafe.Pointer(zSql))) {
case ';':
{ // A semicolon
token = U8(TkSEMI)
@@ -142780,15 +145358,15 @@ func Xsqlite3_complete(tls *libc.TLS, zSql uintptr) int32 { /* sqlite3.c:163770:
}
case '/':
{ // C-style comments
- if int32(*(*int8)(unsafe.Pointer(zSql + 1))) != '*' {
+ if int32(*(*uint8)(unsafe.Pointer(zSql + 1))) != '*' {
token = U8(TkOTHER)
break
}
zSql += uintptr(2)
- for (*(*int8)(unsafe.Pointer(zSql)) != 0) && ((int32(*(*int8)(unsafe.Pointer(zSql))) != '*') || (int32(*(*int8)(unsafe.Pointer(zSql + 1))) != '/')) {
+ for (*(*uint8)(unsafe.Pointer(zSql)) != 0) && ((int32(*(*uint8)(unsafe.Pointer(zSql))) != '*') || (int32(*(*uint8)(unsafe.Pointer(zSql + 1))) != '/')) {
zSql++
}
- if int32(*(*int8)(unsafe.Pointer(zSql))) == 0 {
+ if int32(*(*uint8)(unsafe.Pointer(zSql))) == 0 {
return 0
}
zSql++
@@ -142798,14 +145376,14 @@ func Xsqlite3_complete(tls *libc.TLS, zSql uintptr) int32 { /* sqlite3.c:163770:
}
case '-':
{ // SQL-style comments from "--" to end of line
- if int32(*(*int8)(unsafe.Pointer(zSql + 1))) != '-' {
+ if int32(*(*uint8)(unsafe.Pointer(zSql + 1))) != '-' {
token = U8(TkOTHER)
break
}
- for (*(*int8)(unsafe.Pointer(zSql)) != 0) && (int32(*(*int8)(unsafe.Pointer(zSql))) != '\n') {
+ for (*(*uint8)(unsafe.Pointer(zSql)) != 0) && (int32(*(*uint8)(unsafe.Pointer(zSql))) != '\n') {
zSql++
}
- if int32(*(*int8)(unsafe.Pointer(zSql))) == 0 {
+ if int32(*(*uint8)(unsafe.Pointer(zSql))) == 0 {
return (libc.Bool32(int32(state) == 1))
}
token = U8(TkWS)
@@ -142815,10 +145393,10 @@ func Xsqlite3_complete(tls *libc.TLS, zSql uintptr) int32 { /* sqlite3.c:163770:
case '[':
{ // Microsoft-style identifiers in [...]
zSql++
- for (*(*int8)(unsafe.Pointer(zSql)) != 0) && (int32(*(*int8)(unsafe.Pointer(zSql))) != ']') {
+ for (*(*uint8)(unsafe.Pointer(zSql)) != 0) && (int32(*(*uint8)(unsafe.Pointer(zSql))) != ']') {
zSql++
}
- if int32(*(*int8)(unsafe.Pointer(zSql))) == 0 {
+ if int32(*(*uint8)(unsafe.Pointer(zSql))) == 0 {
return 0
}
token = U8(TkOTHER)
@@ -142831,12 +145409,12 @@ func Xsqlite3_complete(tls *libc.TLS, zSql uintptr) int32 { /* sqlite3.c:163770:
fallthrough // single- and double-quoted strings
case '\'':
{
- var c int32 = int32(*(*int8)(unsafe.Pointer(zSql)))
+ var c int32 = int32(*(*uint8)(unsafe.Pointer(zSql)))
zSql++
- for (*(*int8)(unsafe.Pointer(zSql)) != 0) && (int32(*(*int8)(unsafe.Pointer(zSql))) != c) {
+ for (*(*uint8)(unsafe.Pointer(zSql)) != 0) && (int32(*(*uint8)(unsafe.Pointer(zSql))) != c) {
zSql++
}
- if int32(*(*int8)(unsafe.Pointer(zSql))) == 0 {
+ if int32(*(*uint8)(unsafe.Pointer(zSql))) == 0 {
return 0
}
token = U8(TkOTHER)
@@ -142845,17 +145423,17 @@ func Xsqlite3_complete(tls *libc.TLS, zSql uintptr) int32 { /* sqlite3.c:163770:
}
default:
{
- if (int32(Xsqlite3CtypeMap[U8(*(*int8)(unsafe.Pointer(zSql)))]) & 0x46) != 0 {
+ if (int32(Xsqlite3CtypeMap[U8(*(*uint8)(unsafe.Pointer(zSql)))]) & 0x46) != 0 {
// Keywords and unquoted identifiers
var nId int32
- for nId = 1; (int32(Xsqlite3CtypeMap[uint8(*(*int8)(unsafe.Pointer(zSql + uintptr(nId))))]) & 0x46) != 0; nId++ {
+ for nId = 1; (int32(Xsqlite3CtypeMap[uint8(*(*uint8)(unsafe.Pointer(zSql + uintptr(nId))))]) & 0x46) != 0; nId++ {
}
- switch int32(*(*int8)(unsafe.Pointer(zSql))) {
+ switch int32(*(*uint8)(unsafe.Pointer(zSql))) {
case 'c':
fallthrough
case 'C':
{
- if (nId == 6) && (Xsqlite3_strnicmp(tls, zSql, ts+21158 /* "create" */, 6) == 0) {
+ if (nId == 6) && (Xsqlite3_strnicmp(tls, zSql, ts+21618 /* "create" */, 6) == 0) {
token = U8(TkCREATE)
} else {
token = U8(TkOTHER)
@@ -142868,11 +145446,11 @@ func Xsqlite3_complete(tls *libc.TLS, zSql uintptr) int32 { /* sqlite3.c:163770:
fallthrough
case 'T':
{
- if (nId == 7) && (Xsqlite3_strnicmp(tls, zSql, ts+17847 /* "trigger" */, 7) == 0) {
+ if (nId == 7) && (Xsqlite3_strnicmp(tls, zSql, ts+18331 /* "trigger" */, 7) == 0) {
token = U8(TkTRIGGER)
- } else if (nId == 4) && (Xsqlite3_strnicmp(tls, zSql, ts+21165 /* "temp" */, 4) == 0) {
+ } else if (nId == 4) && (Xsqlite3_strnicmp(tls, zSql, ts+21625 /* "temp" */, 4) == 0) {
token = U8(TkTEMP)
- } else if (nId == 9) && (Xsqlite3_strnicmp(tls, zSql, ts+21170 /* "temporary" */, 9) == 0) {
+ } else if (nId == 9) && (Xsqlite3_strnicmp(tls, zSql, ts+21630 /* "temporary" */, 9) == 0) {
token = U8(TkTEMP)
} else {
token = U8(TkOTHER)
@@ -142885,9 +145463,9 @@ func Xsqlite3_complete(tls *libc.TLS, zSql uintptr) int32 { /* sqlite3.c:163770:
fallthrough
case 'E':
{
- if (nId == 3) && (Xsqlite3_strnicmp(tls, zSql, ts+21180 /* "end" */, 3) == 0) {
+ if (nId == 3) && (Xsqlite3_strnicmp(tls, zSql, ts+21640 /* "end" */, 3) == 0) {
token = U8(TkEND)
- } else if (nId == 7) && (Xsqlite3_strnicmp(tls, zSql, ts+21184 /* "explain" */, 7) == 0) {
+ } else if (nId == 7) && (Xsqlite3_strnicmp(tls, zSql, ts+21644 /* "explain" */, 7) == 0) {
token = U8(TkEXPLAIN)
} else {
token = U8(TkOTHER)
@@ -142929,12 +145507,12 @@ var trans = [8][8]U8{
/* 5 TRIGGER: */ {U8(6), U8(5), U8(5), U8(5), U8(5), U8(5), U8(5), U8(5)},
/* 6 SEMI: */ {U8(6), U8(6), U8(5), U8(5), U8(5), U8(5), U8(5), U8(7)},
/* 7 END: */ {U8(1), U8(7), U8(5), U8(5), U8(5), U8(5), U8(5), U8(5)},
-} /* sqlite3.c:163778:19 */
+} /* sqlite3.c:164804:19 */
// This routine is the same as the sqlite3_complete() routine described
// above, except that the parameter is required to be UTF-16 encoded, not
// UTF-8.
-func Xsqlite3_complete16(tls *libc.TLS, zSql uintptr) int32 { /* sqlite3.c:163935:16: */
+func Xsqlite3_complete16(tls *libc.TLS, zSql uintptr) int32 { /* sqlite3.c:164961:16: */
var pVal uintptr
var zSql8 uintptr
var rc int32
@@ -142945,7 +145523,7 @@ func Xsqlite3_complete16(tls *libc.TLS, zSql uintptr) int32 { /* sqlite3.c:16393
}
pVal = Xsqlite3ValueNew(tls, uintptr(0))
Xsqlite3ValueSetStr(tls, pVal, -1, zSql, func() uint8 {
- if int32(*(*int8)(unsafe.Pointer(uintptr(unsafe.Pointer(&Xsqlite3one))))) == 0 {
+ if int32(*(*uint8)(unsafe.Pointer(uintptr(unsafe.Pointer(&Xsqlite3one))))) == 0 {
return uint8(SQLITE_UTF16BE)
}
return uint8(SQLITE_UTF16LE)
@@ -142966,7 +145544,7 @@ func Xsqlite3_complete16(tls *libc.TLS, zSql uintptr) int32 { /* sqlite3.c:16393
// This is an extension initializer that is a no-op and always
// succeeds, except that it fails if the fault-simulation is set
// to 500.
-func sqlite3TestExtInit(tls *libc.TLS, db uintptr) int32 { /* sqlite3.c:164087:12: */
+func sqlite3TestExtInit(tls *libc.TLS, db uintptr) int32 { /* sqlite3.c:165113:12: */
_ = db
return Xsqlite3FaultSim(tls, 500)
}
@@ -142978,11 +145556,11 @@ var sqlite3BuiltinExtensions = [4]uintptr{
0,
0,
0,
-} /* sqlite3.c:164117:12 */
+} /* sqlite3.c:165143:12 */
// IMPLEMENTATION-OF: R-53536-42575 The sqlite3_libversion() function returns
// a pointer to the to the sqlite3_version[] string constant.
-func Xsqlite3_libversion(tls *libc.TLS) uintptr { /* sqlite3.c:164164:23: */
+func Xsqlite3_libversion(tls *libc.TLS) uintptr { /* sqlite3.c:165190:23: */
return uintptr(unsafe.Pointer(&Xsqlite3_version))
}
@@ -142995,14 +145573,14 @@ func Xsqlite3_libversion(tls *libc.TLS) uintptr { /* sqlite3.c:164164:23: */
// IMPLEMENTATION-OF: R-35210-63508 The sqlite3_libversion_number() function
// returns an integer equal to SQLITE_VERSION_NUMBER.
-func Xsqlite3_libversion_number(tls *libc.TLS) int32 { /* sqlite3.c:164177:16: */
+func Xsqlite3_libversion_number(tls *libc.TLS) int32 { /* sqlite3.c:165203:16: */
return SQLITE_VERSION_NUMBER
}
// IMPLEMENTATION-OF: R-20790-14025 The sqlite3_threadsafe() function returns
// zero if and only if SQLite was compiled with mutexing code omitted due to
// the SQLITE_THREADSAFE compile-time option being set to 0.
-func Xsqlite3_threadsafe(tls *libc.TLS) int32 { /* sqlite3.c:164183:16: */
+func Xsqlite3_threadsafe(tls *libc.TLS) int32 { /* sqlite3.c:165209:16: */
return SQLITE_THREADSAFE
}
@@ -143015,14 +145593,14 @@ func Xsqlite3_threadsafe(tls *libc.TLS) int32 { /* sqlite3.c:164183:16: */
// temporary files.
//
// See also the "PRAGMA temp_store_directory" SQL command.
-var Xsqlite3_temp_directory uintptr = uintptr(0) /* sqlite3.c:164214:17 */
+var Xsqlite3_temp_directory uintptr = uintptr(0) /* sqlite3.c:165240:17 */
// If the following global variable points to a string which is the
// name of a directory, then that directory will be used to store
// all database files specified with a relative pathname.
//
// See also the "PRAGMA data_store_directory" SQL command.
-var Xsqlite3_data_directory uintptr = uintptr(0) /* sqlite3.c:164223:17 */
+var Xsqlite3_data_directory uintptr = uintptr(0) /* sqlite3.c:165249:17 */
// Initialize SQLite.
//
@@ -143053,7 +145631,7 @@ var Xsqlite3_data_directory uintptr = uintptr(0) /* sqlite3.c:164223:17 */
//
// * Recursive calls to this routine from thread X return immediately
// without blocking.
-func Xsqlite3_initialize(tls *libc.TLS) int32 { /* sqlite3.c:164256:16: */
+func Xsqlite3_initialize(tls *libc.TLS) int32 { /* sqlite3.c:165282:16: */
var pMainMtx uintptr // The main static mutex
var rc int32 // Result code
@@ -143138,6 +145716,9 @@ func Xsqlite3_initialize(tls *libc.TLS) int32 { /* sqlite3.c:164256:16: */
Xsqlite3Config.FisPCacheInit = 1
rc = Xsqlite3OsInit(tls)
}
+ if rc == SQLITE_OK {
+ rc = Xsqlite3MemdbInit(tls)
+ }
if rc == SQLITE_OK {
Xsqlite3PCacheBufferSetup(tls, Xsqlite3Config.FpPage,
Xsqlite3Config.FszPage, Xsqlite3Config.FnPage)
@@ -143176,7 +145757,7 @@ func Xsqlite3_initialize(tls *libc.TLS) int32 { /* sqlite3.c:164256:16: */
// routine is not threadsafe. But it is safe to invoke this routine
// on when SQLite is already shut down. If SQLite is already shut down
// when this routine is invoked, then this routine is a harmless no-op.
-func Xsqlite3_shutdown(tls *libc.TLS) int32 { /* sqlite3.c:164431:16: */
+func Xsqlite3_shutdown(tls *libc.TLS) int32 { /* sqlite3.c:165457:16: */
if Xsqlite3Config.FisInit != 0 {
Xsqlite3_os_end(tls)
@@ -143215,7 +145796,7 @@ func Xsqlite3_shutdown(tls *libc.TLS) int32 { /* sqlite3.c:164431:16: */
// database connections or memory allocations. This routine is not
// threadsafe. Failure to heed these warnings can lead to unpredictable
// behavior.
-func Xsqlite3_config(tls *libc.TLS, op int32, va uintptr) int32 { /* sqlite3.c:164485:16: */
+func Xsqlite3_config(tls *libc.TLS, op int32, va uintptr) int32 { /* sqlite3.c:165511:16: */
var ap Va_list
_ = ap
var rc int32 = SQLITE_OK
@@ -143223,7 +145804,7 @@ func Xsqlite3_config(tls *libc.TLS, op int32, va uintptr) int32 { /* sqlite3.c:1
// sqlite3_config() shall return SQLITE_MISUSE if it is invoked while
// the SQLite library is in use.
if Xsqlite3Config.FisInit != 0 {
- return Xsqlite3MisuseError(tls, 164491)
+ return Xsqlite3MisuseError(tls, 165517)
}
ap = va
@@ -143466,6 +146047,13 @@ func Xsqlite3_config(tls *libc.TLS, op int32, va uintptr) int32 { /* sqlite3.c:1
}
+ case SQLITE_CONFIG_MEMDB_MAXSIZE:
+ {
+ Xsqlite3Config.FmxMemdbSize = Sqlite3_int64(libc.VaInt64(&ap))
+ break
+
+ }
+
default:
{
rc = SQLITE_ERROR
@@ -143486,7 +146074,7 @@ func Xsqlite3_config(tls *libc.TLS, op int32, va uintptr) int32 { /* sqlite3.c:1
// space for the lookaside memory is obtained from sqlite3_malloc().
// If pStart is not NULL then it is sz*cnt bytes of memory to use for
// the lookaside memory.
-func setupLookaside(tls *libc.TLS, db uintptr, pBuf uintptr, sz int32, cnt int32) int32 { /* sqlite3.c:164803:12: */
+func setupLookaside(tls *libc.TLS, db uintptr, pBuf uintptr, sz int32, cnt int32) int32 { /* sqlite3.c:165829:12: */
var pStart uintptr
var szAlloc Sqlite3_int64 = (Sqlite3_int64(sz) * Sqlite3_int64(cnt))
var nBig int32 // Number of full-size slots
@@ -143584,13 +146172,13 @@ func setupLookaside(tls *libc.TLS, db uintptr, pBuf uintptr, sz int32, cnt int32
}
// Return the mutex associated with a database connection.
-func Xsqlite3_db_mutex(tls *libc.TLS, db uintptr) uintptr { /* sqlite3.c:164903:26: */
+func Xsqlite3_db_mutex(tls *libc.TLS, db uintptr) uintptr { /* sqlite3.c:165929:26: */
return (*Sqlite3)(unsafe.Pointer(db)).Fmutex
}
// Free up as much memory as we can from the given database
// connection.
-func Xsqlite3_db_release_memory(tls *libc.TLS, db uintptr) int32 { /* sqlite3.c:164917:16: */
+func Xsqlite3_db_release_memory(tls *libc.TLS, db uintptr) int32 { /* sqlite3.c:165943:16: */
var i int32
Xsqlite3_mutex_enter(tls, (*Sqlite3)(unsafe.Pointer(db)).Fmutex)
@@ -143609,7 +146197,7 @@ func Xsqlite3_db_release_memory(tls *libc.TLS, db uintptr) int32 { /* sqlite3.c:
// Flush any dirty pages in the pager-cache for any attached database
// to disk.
-func Xsqlite3_db_cacheflush(tls *libc.TLS, db uintptr) int32 { /* sqlite3.c:164941:16: */
+func Xsqlite3_db_cacheflush(tls *libc.TLS, db uintptr) int32 { /* sqlite3.c:165967:16: */
var i int32
var rc int32 = SQLITE_OK
var bSeenBusy int32 = 0
@@ -143638,7 +146226,7 @@ func Xsqlite3_db_cacheflush(tls *libc.TLS, db uintptr) int32 { /* sqlite3.c:1649
}
// Configuration settings for an individual database connection
-func Xsqlite3_db_config(tls *libc.TLS, db uintptr, op int32, va uintptr) int32 { /* sqlite3.c:164970:16: */
+func Xsqlite3_db_config(tls *libc.TLS, db uintptr, op int32, va uintptr) int32 { /* sqlite3.c:165996:16: */
var ap Va_list
_ = ap
var rc int32
@@ -143717,11 +146305,11 @@ var aFlagOp = [16]struct {
{Fop: SQLITE_DBCONFIG_DQS_DML, Fmask: U32(SQLITE_DqsDML)},
{Fop: SQLITE_DBCONFIG_LEGACY_FILE_FORMAT, Fmask: U32(SQLITE_LegacyFileFmt)},
{Fop: SQLITE_DBCONFIG_TRUSTED_SCHEMA, Fmask: U32(SQLITE_TrustedSchema)},
-} /* sqlite3.c:164993:9 */
+} /* sqlite3.c:166019:9 */
// This is the default collating function named "BINARY" which is always
// available.
-func binCollFunc(tls *libc.TLS, NotUsed uintptr, nKey1 int32, pKey1 uintptr, nKey2 int32, pKey2 uintptr) int32 { /* sqlite3.c:165045:12: */
+func binCollFunc(tls *libc.TLS, NotUsed uintptr, nKey1 int32, pKey1 uintptr, nKey2 int32, pKey2 uintptr) int32 { /* sqlite3.c:166071:12: */
var rc int32
var n int32
_ = NotUsed
@@ -143743,7 +146331,7 @@ func binCollFunc(tls *libc.TLS, NotUsed uintptr, nKey1 int32, pKey1 uintptr, nKe
// This is the collating function named "RTRIM" which is always
// available. Ignore trailing spaces.
-func rtrimCollFunc(tls *libc.TLS, pUser uintptr, nKey1 int32, pKey1 uintptr, nKey2 int32, pKey2 uintptr) int32 { /* sqlite3.c:165068:12: */
+func rtrimCollFunc(tls *libc.TLS, pUser uintptr, nKey1 int32, pKey1 uintptr, nKey2 int32, pKey2 uintptr) int32 { /* sqlite3.c:166094:12: */
var pK1 uintptr = pKey1
var pK2 uintptr = pKey2
for (nKey1 != 0) && (int32(*(*U8)(unsafe.Pointer(pK1 + uintptr((nKey1 - 1))))) == ' ') {
@@ -143756,7 +146344,7 @@ func rtrimCollFunc(tls *libc.TLS, pUser uintptr, nKey1 int32, pKey1 uintptr, nKe
}
// Return true if CollSeq is the default built-in BINARY.
-func Xsqlite3IsBinary(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:165083:20: */
+func Xsqlite3IsBinary(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:166109:20: */
return (libc.Bool32((p == uintptr(0)) || ((*CollSeq)(unsafe.Pointer(p)).FxCmp == *(*uintptr)(unsafe.Pointer(&struct {
f func(*libc.TLS, uintptr, int32, uintptr, int32, uintptr) int32
@@ -143770,7 +146358,7 @@ func Xsqlite3IsBinary(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:165083:20:
// extends only to the 26 characters used in the English language.
//
// At the moment there is only a UTF-8 implementation.
-func nocaseCollatingFunc(tls *libc.TLS, NotUsed uintptr, nKey1 int32, pKey1 uintptr, nKey2 int32, pKey2 uintptr) int32 { /* sqlite3.c:165097:12: */
+func nocaseCollatingFunc(tls *libc.TLS, NotUsed uintptr, nKey1 int32, pKey1 uintptr, nKey2 int32, pKey2 uintptr) int32 { /* sqlite3.c:166123:12: */
var r int32 = Xsqlite3_strnicmp(tls,
pKey1, pKey2, func() int32 {
if nKey1 < nKey2 {
@@ -143786,31 +146374,31 @@ func nocaseCollatingFunc(tls *libc.TLS, NotUsed uintptr, nKey1 int32, pKey1 uint
}
// Return the ROWID of the most recent insert
-func Xsqlite3_last_insert_rowid(tls *libc.TLS, db uintptr) Sqlite_int64 { /* sqlite3.c:165114:25: */
+func Xsqlite3_last_insert_rowid(tls *libc.TLS, db uintptr) Sqlite_int64 { /* sqlite3.c:166140:25: */
return (*Sqlite3)(unsafe.Pointer(db)).FlastRowid
}
// Set the value returned by the sqlite3_last_insert_rowid() API function.
-func Xsqlite3_set_last_insert_rowid(tls *libc.TLS, db uintptr, iRowid Sqlite3_int64) { /* sqlite3.c:165127:17: */
+func Xsqlite3_set_last_insert_rowid(tls *libc.TLS, db uintptr, iRowid Sqlite3_int64) { /* sqlite3.c:166153:17: */
Xsqlite3_mutex_enter(tls, (*Sqlite3)(unsafe.Pointer(db)).Fmutex)
(*Sqlite3)(unsafe.Pointer(db)).FlastRowid = iRowid
Xsqlite3_mutex_leave(tls, (*Sqlite3)(unsafe.Pointer(db)).Fmutex)
}
// Return the number of changes in the most recent call to sqlite3_exec().
-func Xsqlite3_changes(tls *libc.TLS, db uintptr) int32 { /* sqlite3.c:165142:16: */
+func Xsqlite3_changes(tls *libc.TLS, db uintptr) int32 { /* sqlite3.c:166168:16: */
return (*Sqlite3)(unsafe.Pointer(db)).FnChange
}
// Return the number of changes since the database handle was opened.
-func Xsqlite3_total_changes(tls *libc.TLS, db uintptr) int32 { /* sqlite3.c:165155:16: */
+func Xsqlite3_total_changes(tls *libc.TLS, db uintptr) int32 { /* sqlite3.c:166181:16: */
return (*Sqlite3)(unsafe.Pointer(db)).FnTotalChange
}
// Close all open savepoints. This function only manipulates fields of the
// database handle object, it does not close any savepoints that may be open
// at the b-tree/pager level.
-func Xsqlite3CloseSavepoints(tls *libc.TLS, db uintptr) { /* sqlite3.c:165170:21: */
+func Xsqlite3CloseSavepoints(tls *libc.TLS, db uintptr) { /* sqlite3.c:166196:21: */
for (*Sqlite3)(unsafe.Pointer(db)).FpSavepoint != 0 {
var pTmp uintptr = (*Sqlite3)(unsafe.Pointer(db)).FpSavepoint
(*Sqlite3)(unsafe.Pointer(db)).FpSavepoint = (*Savepoint)(unsafe.Pointer(pTmp)).FpNext
@@ -143825,12 +146413,12 @@ func Xsqlite3CloseSavepoints(tls *libc.TLS, db uintptr) { /* sqlite3.c:165170:21
// if this is not the last copy of the function, do not invoke it. Multiple
// copies of a single function are created when create_function() is called
// with SQLITE_ANY as the encoding.
-func functionDestroy(tls *libc.TLS, db uintptr, p uintptr) { /* sqlite3.c:165187:13: */
+func functionDestroy(tls *libc.TLS, db uintptr, p uintptr) { /* sqlite3.c:166213:13: */
var pDestructor uintptr = *(*uintptr)(unsafe.Pointer(p + 64 /* &.u */))
if pDestructor != 0 {
(*FuncDestructor)(unsafe.Pointer(pDestructor)).FnRef--
if (*FuncDestructor)(unsafe.Pointer(pDestructor)).FnRef == 0 {
- (*(*func(*libc.TLS, uintptr))(unsafe.Pointer((pDestructor + 8 /* &.xDestroy */))))(tls, (*FuncDestructor)(unsafe.Pointer(pDestructor)).FpUserData)
+ (*struct{ f func(*libc.TLS, uintptr) })(unsafe.Pointer(&struct{ uintptr }{(*FuncDestructor)(unsafe.Pointer(pDestructor)).FxDestroy})).f(tls, (*FuncDestructor)(unsafe.Pointer(pDestructor)).FpUserData)
Xsqlite3DbFree(tls, db, pDestructor)
}
}
@@ -143838,7 +146426,7 @@ func functionDestroy(tls *libc.TLS, db uintptr, p uintptr) { /* sqlite3.c:165187
// Disconnect all sqlite3_vtab objects that belong to database connection
// db. This is called when db is being closed.
-func disconnectAllVtab(tls *libc.TLS, db uintptr) { /* sqlite3.c:165202:13: */
+func disconnectAllVtab(tls *libc.TLS, db uintptr) { /* sqlite3.c:166228:13: */
var i int32
var p uintptr
Xsqlite3BtreeEnterAll(tls, db)
@@ -143865,7 +146453,7 @@ func disconnectAllVtab(tls *libc.TLS, db uintptr) { /* sqlite3.c:165202:13: */
// Return TRUE if database connection db has unfinalized prepared
// statements or unfinished sqlite3_backup objects.
-func connectionIsBusy(tls *libc.TLS, db uintptr) int32 { /* sqlite3.c:165233:12: */
+func connectionIsBusy(tls *libc.TLS, db uintptr) int32 { /* sqlite3.c:166259:12: */
var j int32
if (*Sqlite3)(unsafe.Pointer(db)).FpVdbe != 0 {
@@ -143881,18 +146469,20 @@ func connectionIsBusy(tls *libc.TLS, db uintptr) int32 { /* sqlite3.c:165233:12:
}
// Close an existing SQLite database
-func sqlite3Close(tls *libc.TLS, db uintptr, forceZombie int32) int32 { /* sqlite3.c:165247:12: */
+func sqlite3Close(tls *libc.TLS, db uintptr, forceZombie int32) int32 { /* sqlite3.c:166273:12: */
if !(db != 0) {
// EVIDENCE-OF: R-63257-11740 Calling sqlite3_close() or
// sqlite3_close_v2() with a NULL pointer argument is a harmless no-op.
return SQLITE_OK
}
if !(Xsqlite3SafetyCheckSickOrOk(tls, db) != 0) {
- return Xsqlite3MisuseError(tls, 165254)
+ return Xsqlite3MisuseError(tls, 166280)
}
Xsqlite3_mutex_enter(tls, (*Sqlite3)(unsafe.Pointer(db)).Fmutex)
if (int32((*Sqlite3)(unsafe.Pointer(db)).FmTrace) & SQLITE_TRACE_CLOSE) != 0 {
- (*(*func(*libc.TLS, U32, uintptr, uintptr, uintptr) int32)(unsafe.Pointer((db + 240 /* &.trace */ /* &.xV2 */))))(tls, uint32(SQLITE_TRACE_CLOSE), (*Sqlite3)(unsafe.Pointer(db)).FpTraceArg, db, uintptr(0))
+ (*struct {
+ f func(*libc.TLS, U32, uintptr, uintptr, uintptr) int32
+ })(unsafe.Pointer(&struct{ uintptr }{*(*uintptr)(unsafe.Pointer(db + 240 /* &.trace */))})).f(tls, uint32(SQLITE_TRACE_CLOSE), (*Sqlite3)(unsafe.Pointer(db)).FpTraceArg, db, uintptr(0))
}
// Force xDisconnect calls on all virtual tables
@@ -143910,7 +146500,7 @@ func sqlite3Close(tls *libc.TLS, db uintptr, forceZombie int32) int32 { /* sqlit
// SQLITE_BUSY if the connection can not be closed immediately.
if !(forceZombie != 0) && (connectionIsBusy(tls, db) != 0) {
Xsqlite3ErrorWithMsg(tls, db, SQLITE_BUSY,
- ts+21192 /* "unable to close ..." */, 0)
+ ts+21652 /* "unable to close ..." */, 0)
Xsqlite3_mutex_leave(tls, (*Sqlite3)(unsafe.Pointer(db)).Fmutex)
return SQLITE_BUSY
}
@@ -143923,7 +146513,7 @@ func sqlite3Close(tls *libc.TLS, db uintptr, forceZombie int32) int32 { /* sqlit
// Return the transaction state for a single databse, or the maximum
// transaction state over all attached databases if zSchema is null.
-func Xsqlite3_txn_state(tls *libc.TLS, db uintptr, zSchema uintptr) int32 { /* sqlite3.c:165301:16: */
+func Xsqlite3_txn_state(tls *libc.TLS, db uintptr, zSchema uintptr) int32 { /* sqlite3.c:166327:16: */
var iDb int32
var nDb int32
var iTxn int32 = -1
@@ -143955,16 +146545,16 @@ func Xsqlite3_txn_state(tls *libc.TLS, db uintptr, zSchema uintptr) int32 { /* s
// Two variations on the public interface for closing a database
// connection. The sqlite3_close() version returns SQLITE_BUSY and
-// leaves the connection option if there are unfinalized prepared
+// leaves the connection open if there are unfinalized prepared
// statements or unfinished sqlite3_backups. The sqlite3_close_v2()
// version forces the connection to become a zombie if there are
// unclosed resources, and arranges for deallocation when the last
// prepare statement or sqlite3_backup closes.
-func Xsqlite3_close(tls *libc.TLS, db uintptr) int32 { /* sqlite3.c:165336:16: */
+func Xsqlite3_close(tls *libc.TLS, db uintptr) int32 { /* sqlite3.c:166362:16: */
return sqlite3Close(tls, db, 0)
}
-func Xsqlite3_close_v2(tls *libc.TLS, db uintptr) int32 { /* sqlite3.c:165337:16: */
+func Xsqlite3_close_v2(tls *libc.TLS, db uintptr) int32 { /* sqlite3.c:166363:16: */
return sqlite3Close(tls, db, 1)
}
@@ -143974,7 +146564,7 @@ func Xsqlite3_close_v2(tls *libc.TLS, db uintptr) int32 { /* sqlite3.c:165337:16
// has been a prior call to sqlite3_close(db) or sqlite3_close_v2(db)) and
// every sqlite3_stmt has now been finalized and every sqlite3_backup has
// finished, then free all resources.
-func Xsqlite3LeaveMutexAndCloseZombie(tls *libc.TLS, db uintptr) { /* sqlite3.c:165348:21: */
+func Xsqlite3LeaveMutexAndCloseZombie(tls *libc.TLS, db uintptr) { /* sqlite3.c:166374:21: */
var i uintptr // Hash table iterator
var j int32
@@ -144041,7 +146631,7 @@ func Xsqlite3LeaveMutexAndCloseZombie(tls *libc.TLS, db uintptr) { /* sqlite3.c:
// Invoke any destructors registered for collation sequence user data.
for j = 0; j < 3; j++ {
if (*CollSeq)(unsafe.Pointer(pColl+uintptr(j)*40)).FxDel != 0 {
- (*(*func(*libc.TLS, uintptr))(unsafe.Pointer((pColl + uintptr(j)*40 + 32 /* &.xDel */))))(tls, (*CollSeq)(unsafe.Pointer(pColl+uintptr(j)*40)).FpUser)
+ (*struct{ f func(*libc.TLS, uintptr) })(unsafe.Pointer(&struct{ uintptr }{(*CollSeq)(unsafe.Pointer(pColl + uintptr(j)*40)).FxDel})).f(tls, (*CollSeq)(unsafe.Pointer(pColl+uintptr(j)*40)).FpUser)
}
}
Xsqlite3DbFree(tls, db, pColl)
@@ -144081,7 +146671,7 @@ func Xsqlite3LeaveMutexAndCloseZombie(tls *libc.TLS, db uintptr) { /* sqlite3.c:
// breaker") and made to return tripCode if there are any further
// attempts to use that cursor. Read cursors remain open and valid
// but are "saved" in case the table pages are moved around.
-func Xsqlite3RollbackAll(tls *libc.TLS, db uintptr, tripCode int32) { /* sqlite3.c:165468:21: */
+func Xsqlite3RollbackAll(tls *libc.TLS, db uintptr, tripCode int32) { /* sqlite3.c:166494:21: */
var i int32
var inTrans int32 = 0
var schemaChange int32
@@ -144122,7 +146712,7 @@ func Xsqlite3RollbackAll(tls *libc.TLS, db uintptr, tripCode int32) { /* sqlite3
// If one has been configured, invoke the rollback-hook callback
if ((*Sqlite3)(unsafe.Pointer(db)).FxRollbackCallback != 0) && ((inTrans != 0) || !(int32((*Sqlite3)(unsafe.Pointer(db)).FautoCommit) != 0)) {
- (*(*func(*libc.TLS, uintptr))(unsafe.Pointer((db + 296 /* &.xRollbackCallback */))))(tls, (*Sqlite3)(unsafe.Pointer(db)).FpRollbackArg)
+ (*struct{ f func(*libc.TLS, uintptr) })(unsafe.Pointer(&struct{ uintptr }{(*Sqlite3)(unsafe.Pointer(db)).FxRollbackCallback})).f(tls, (*Sqlite3)(unsafe.Pointer(db)).FpRollbackArg)
}
}
@@ -144131,24 +146721,24 @@ func Xsqlite3RollbackAll(tls *libc.TLS, db uintptr, tripCode int32) { /* sqlite3
// Return a static string that describes the kind of error specified in the
// argument.
-func Xsqlite3ErrStr(tls *libc.TLS, rc int32) uintptr { /* sqlite3.c:165629:27: */
- var zErr uintptr = ts + 21260 /* "unknown error" */
+func Xsqlite3ErrStr(tls *libc.TLS, rc int32) uintptr { /* sqlite3.c:166655:27: */
+ var zErr uintptr = ts + 21720 /* "unknown error" */
switch rc {
case (SQLITE_ABORT | (int32(2) << 8)):
{
- zErr = ts + 21274 /* "abort due to ROL..." */
+ zErr = ts + 21734 /* "abort due to ROL..." */
break
}
case SQLITE_ROW:
{
- zErr = ts + 21296 /* "another row avai..." */
+ zErr = ts + 21756 /* "another row avai..." */
break
}
case SQLITE_DONE:
{
- zErr = ts + 21318 /* "no more rows ava..." */
+ zErr = ts + 21778 /* "no more rows ava..." */
break
}
@@ -144166,36 +146756,36 @@ func Xsqlite3ErrStr(tls *libc.TLS, rc int32) uintptr { /* sqlite3.c:165629:27: *
}
var aMsg = [29]uintptr{
- /* SQLITE_OK */ ts + 21341, /* "not an error" */
- /* SQLITE_ERROR */ ts + 21354, /* "SQL logic error" */
+ /* SQLITE_OK */ ts + 21801, /* "not an error" */
+ /* SQLITE_ERROR */ ts + 21814, /* "SQL logic error" */
/* SQLITE_INTERNAL */ uintptr(0),
- /* SQLITE_PERM */ ts + 21370, /* "access permissio..." */
- /* SQLITE_ABORT */ ts + 21395, /* "query aborted" */
- /* SQLITE_BUSY */ ts + 21409, /* "database is lock..." */
- /* SQLITE_LOCKED */ ts + 21428, /* "database table i..." */
- /* SQLITE_NOMEM */ ts + 5050, /* "out of memory" */
- /* SQLITE_READONLY */ ts + 21453, /* "attempt to write..." */
- /* SQLITE_INTERRUPT */ ts + 21490, /* "interrupted" */
- /* SQLITE_IOERR */ ts + 21502, /* "disk I/O error" */
- /* SQLITE_CORRUPT */ ts + 21517, /* "database disk im..." */
- /* SQLITE_NOTFOUND */ ts + 21550, /* "unknown operatio..." */
- /* SQLITE_FULL */ ts + 21568, /* "database or disk..." */
- /* SQLITE_CANTOPEN */ ts + 21593, /* "unable to open d..." */
- /* SQLITE_PROTOCOL */ ts + 21622, /* "locking protocol" */
+ /* SQLITE_PERM */ ts + 21830, /* "access permissio..." */
+ /* SQLITE_ABORT */ ts + 21855, /* "query aborted" */
+ /* SQLITE_BUSY */ ts + 21869, /* "database is lock..." */
+ /* SQLITE_LOCKED */ ts + 21888, /* "database table i..." */
+ /* SQLITE_NOMEM */ ts + 5181, /* "out of memory" */
+ /* SQLITE_READONLY */ ts + 21913, /* "attempt to write..." */
+ /* SQLITE_INTERRUPT */ ts + 21950, /* "interrupted" */
+ /* SQLITE_IOERR */ ts + 21962, /* "disk I/O error" */
+ /* SQLITE_CORRUPT */ ts + 21977, /* "database disk im..." */
+ /* SQLITE_NOTFOUND */ ts + 22010, /* "unknown operatio..." */
+ /* SQLITE_FULL */ ts + 22028, /* "database or disk..." */
+ /* SQLITE_CANTOPEN */ ts + 22053, /* "unable to open d..." */
+ /* SQLITE_PROTOCOL */ ts + 22082, /* "locking protocol" */
/* SQLITE_EMPTY */ uintptr(0),
- /* SQLITE_SCHEMA */ ts + 4780, /* "database schema ..." */
- /* SQLITE_TOOBIG */ ts + 4317, /* "string or blob t..." */
- /* SQLITE_CONSTRAINT */ ts + 21639, /* "constraint faile..." */
- /* SQLITE_MISMATCH */ ts + 21657, /* "datatype mismatc..." */
- /* SQLITE_MISUSE */ ts + 21675, /* "bad parameter or..." */
+ /* SQLITE_SCHEMA */ ts + 4911, /* "database schema ..." */
+ /* SQLITE_TOOBIG */ ts + 4448, /* "string or blob t..." */
+ /* SQLITE_CONSTRAINT */ ts + 22099, /* "constraint faile..." */
+ /* SQLITE_MISMATCH */ ts + 22117, /* "datatype mismatc..." */
+ /* SQLITE_MISUSE */ ts + 22135, /* "bad parameter or..." */
/* SQLITE_NOLFS */ uintptr(0),
- /* SQLITE_AUTH */ ts + 21709, /* "authorization de..." */
+ /* SQLITE_AUTH */ ts + 22169, /* "authorization de..." */
/* SQLITE_FORMAT */ uintptr(0),
- /* SQLITE_RANGE */ ts + 21730, /* "column index out..." */
- /* SQLITE_NOTADB */ ts + 21756, /* "file is not a da..." */
- /* SQLITE_NOTICE */ ts + 21779, /* "notification mes..." */
- /* SQLITE_WARNING */ ts + 21800, /* "warning message" */
-} /* sqlite3.c:165630:20 */
+ /* SQLITE_RANGE */ ts + 22190, /* "column index out..." */
+ /* SQLITE_NOTADB */ ts + 22216, /* "file is not a da..." */
+ /* SQLITE_NOTICE */ ts + 22239, /* "notification mes..." */
+ /* SQLITE_WARNING */ ts + 22260, /* "warning message" */
+} /* sqlite3.c:166656:20 */
// This routine implements a busy callback that sleeps and tries
// again until a timeout value is reached. The timeout value is
@@ -144204,7 +146794,7 @@ var aMsg = [29]uintptr{
//
// Return non-zero to retry the lock. Return zero to stop trying
// and cause SQLite to return SQLITE_BUSY.
-func sqliteDefaultBusyCallback(tls *libc.TLS, ptr uintptr, count int32) int32 { /* sqlite3.c:165699:12: */
+func sqliteDefaultBusyCallback(tls *libc.TLS, ptr uintptr, count int32) int32 { /* sqlite3.c:166725:12: */
var db uintptr = ptr
var tmout int32 = (*Sqlite3)(unsafe.Pointer(db)).FbusyTimeout
var delay int32
@@ -144227,8 +146817,8 @@ func sqliteDefaultBusyCallback(tls *libc.TLS, ptr uintptr, count int32) int32 {
return 1
}
-var delays = [12]U8{U8(1), U8(2), U8(5), U8(10), U8(15), U8(20), U8(25), U8(25), U8(25), U8(50), U8(50), U8(100)} /* sqlite3.c:165706:19 */
-var totals = [12]U8{U8(0), U8(1), U8(3), U8(8), U8(18), U8(33), U8(53), U8(78), U8(103), U8(128), U8(178), U8(228)} /* sqlite3.c:165708:19 */
+var delays = [12]U8{U8(1), U8(2), U8(5), U8(10), U8(15), U8(20), U8(25), U8(25), U8(25), U8(50), U8(50), U8(100)} /* sqlite3.c:166732:19 */
+var totals = [12]U8{U8(0), U8(1), U8(3), U8(8), U8(18), U8(33), U8(53), U8(78), U8(103), U8(128), U8(178), U8(228)} /* sqlite3.c:166734:19 */
// Invoke the given busy handler.
//
@@ -144237,12 +146827,14 @@ var totals = [12]U8{U8(0), U8(1), U8(3), U8(8), U8(18), U8(33), U8(53), U8(78),
//
// If this routine returns non-zero, the lock is retried. If it
// returns 0, the operation aborts with an SQLITE_BUSY error.
-func Xsqlite3InvokeBusyHandler(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:165751:20: */
+func Xsqlite3InvokeBusyHandler(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:166777:20: */
var rc int32
if ((*BusyHandler)(unsafe.Pointer(p)).FxBusyHandler == uintptr(0)) || ((*BusyHandler)(unsafe.Pointer(p)).FnBusy < 0) {
return 0
}
- rc = (*(*func(*libc.TLS, uintptr, int32) int32)(unsafe.Pointer((p /* &.xBusyHandler */))))(tls, (*BusyHandler)(unsafe.Pointer(p)).FpBusyArg, (*BusyHandler)(unsafe.Pointer(p)).FnBusy)
+ rc = (*struct {
+ f func(*libc.TLS, uintptr, int32) int32
+ })(unsafe.Pointer(&struct{ uintptr }{(*BusyHandler)(unsafe.Pointer(p)).FxBusyHandler})).f(tls, (*BusyHandler)(unsafe.Pointer(p)).FpBusyArg, (*BusyHandler)(unsafe.Pointer(p)).FnBusy)
if rc == 0 {
(*BusyHandler)(unsafe.Pointer(p)).FnBusy = -1
} else {
@@ -144253,7 +146845,7 @@ func Xsqlite3InvokeBusyHandler(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:16
// This routine sets the busy callback for an Sqlite database to the
// given callback function with the given argument.
-func Xsqlite3_busy_handler(tls *libc.TLS, db uintptr, xBusy uintptr, pArg uintptr) int32 { /* sqlite3.c:165767:16: */
+func Xsqlite3_busy_handler(tls *libc.TLS, db uintptr, xBusy uintptr, pArg uintptr) int32 { /* sqlite3.c:166793:16: */
Xsqlite3_mutex_enter(tls, (*Sqlite3)(unsafe.Pointer(db)).Fmutex)
(*Sqlite3)(unsafe.Pointer(db)).FbusyHandler.FxBusyHandler = xBusy
(*Sqlite3)(unsafe.Pointer(db)).FbusyHandler.FpBusyArg = pArg
@@ -144266,7 +146858,7 @@ func Xsqlite3_busy_handler(tls *libc.TLS, db uintptr, xBusy uintptr, pArg uintpt
// This routine sets the progress callback for an Sqlite database to the
// given callback function with the given argument. The progress callback will
// be invoked every nOps opcodes.
-func Xsqlite3_progress_handler(tls *libc.TLS, db uintptr, nOps int32, xProgress uintptr, pArg uintptr) { /* sqlite3.c:165790:17: */
+func Xsqlite3_progress_handler(tls *libc.TLS, db uintptr, nOps int32, xProgress uintptr, pArg uintptr) { /* sqlite3.c:166816:17: */
Xsqlite3_mutex_enter(tls, (*Sqlite3)(unsafe.Pointer(db)).Fmutex)
if nOps > 0 {
(*Sqlite3)(unsafe.Pointer(db)).FxProgress = xProgress
@@ -144282,7 +146874,7 @@ func Xsqlite3_progress_handler(tls *libc.TLS, db uintptr, nOps int32, xProgress
// This routine installs a default busy handler that waits for the
// specified number of milliseconds before returning 0.
-func Xsqlite3_busy_timeout(tls *libc.TLS, db uintptr, ms int32) int32 { /* sqlite3.c:165821:16: */
+func Xsqlite3_busy_timeout(tls *libc.TLS, db uintptr, ms int32) int32 { /* sqlite3.c:166847:16: */
if ms > 0 {
Xsqlite3_busy_handler(tls, db, *(*uintptr)(unsafe.Pointer(&struct {
f func(*libc.TLS, uintptr, int32) int32
@@ -144296,7 +146888,7 @@ func Xsqlite3_busy_timeout(tls *libc.TLS, db uintptr, ms int32) int32 { /* sqlit
}
// Cause any pending operation to stop at its earliest opportunity.
-func Xsqlite3_interrupt(tls *libc.TLS, db uintptr) { /* sqlite3.c:165838:17: */
+func Xsqlite3_interrupt(tls *libc.TLS, db uintptr) { /* sqlite3.c:166864:17: */
libc.AtomicStoreNInt32((db + 400 /* &.u1 */ /* &.isInterrupted */), int32(1), 0)
}
@@ -144304,7 +146896,7 @@ func Xsqlite3_interrupt(tls *libc.TLS, db uintptr) { /* sqlite3.c:165838:17: */
// that it is designed to be called by internal code. The difference is
// that if a malloc() fails in sqlite3_create_function(), an error code
// is returned and the mallocFailed flag cleared.
-func Xsqlite3CreateFunc(tls *libc.TLS, db uintptr, zFunctionName uintptr, nArg int32, enc int32, pUserData uintptr, xSFunc uintptr, xStep uintptr, xFinal uintptr, xValue uintptr, xInverse uintptr, pDestructor uintptr) int32 { /* sqlite3.c:165855:20: */
+func Xsqlite3CreateFunc(tls *libc.TLS, db uintptr, zFunctionName uintptr, nArg int32, enc int32, pUserData uintptr, xSFunc uintptr, xStep uintptr, xFinal uintptr, xValue uintptr, xInverse uintptr, pDestructor uintptr) int32 { /* sqlite3.c:166881:20: */
var p uintptr
var nName int32
_ = nName
@@ -144316,7 +146908,7 @@ func Xsqlite3CreateFunc(tls *libc.TLS, db uintptr, zFunctionName uintptr, nArg i
((libc.Bool32(xValue == uintptr(0))) != (libc.Bool32(xInverse == uintptr(0))))) || // Both or neither of xValue, xInverse
((nArg < -1) || (nArg > SQLITE_MAX_FUNCTION_ARG))) ||
(255 < (libc.AssignInt32(&nName, Xsqlite3Strlen30(tls, zFunctionName)))) {
- return Xsqlite3MisuseError(tls, 165881)
+ return Xsqlite3MisuseError(tls, 166907)
}
extraFlags = (enc & (((SQLITE_DETERMINISTIC | SQLITE_DIRECTONLY) | SQLITE_SUBTYPE) | SQLITE_INNOCUOUS))
@@ -144335,7 +146927,7 @@ func Xsqlite3CreateFunc(tls *libc.TLS, db uintptr, zFunctionName uintptr, nArg i
// to the hash table.
if enc == SQLITE_UTF16 {
enc = func() int32 {
- if int32(*(*int8)(unsafe.Pointer(uintptr(unsafe.Pointer(&Xsqlite3one))))) == 0 {
+ if int32(*(*uint8)(unsafe.Pointer(uintptr(unsafe.Pointer(&Xsqlite3one))))) == 0 {
return SQLITE_UTF16BE
}
return SQLITE_UTF16LE
@@ -144364,12 +146956,16 @@ func Xsqlite3CreateFunc(tls *libc.TLS, db uintptr, zFunctionName uintptr, nArg i
if ((p != 0) && (((*FuncDef)(unsafe.Pointer(p)).FfuncFlags & U32(SQLITE_FUNC_ENCMASK)) == U32(enc))) && (int32((*FuncDef)(unsafe.Pointer(p)).FnArg) == nArg) {
if (*Sqlite3)(unsafe.Pointer(db)).FnVdbeActive != 0 {
Xsqlite3ErrorWithMsg(tls, db, SQLITE_BUSY,
- ts+21816 /* "unable to delete..." */, 0)
+ ts+22276 /* "unable to delete..." */, 0)
return SQLITE_BUSY
} else {
Xsqlite3ExpirePreparedStatements(tls, db, 0)
}
+ } else if (xSFunc == uintptr(0)) && (xFinal == uintptr(0)) {
+ // Trying to delete a function that does not exist. This is a no-op.
+ // https://sqlite.org/forum/forumpost/726219164b
+ return SQLITE_OK
}
p = Xsqlite3FindFunction(tls, db, zFunctionName, nArg, U8(enc), uint8(1))
@@ -144407,7 +147003,7 @@ func Xsqlite3CreateFunc(tls *libc.TLS, db uintptr, zFunctionName uintptr, nArg i
// sqlite3_create_function()
// sqlite3_create_function_v2()
// sqlite3_create_window_function()
-func createFunctionApi(tls *libc.TLS, db uintptr, zFunc uintptr, nArg int32, enc int32, p uintptr, xSFunc uintptr, xStep uintptr, xFinal uintptr, xValue uintptr, xInverse uintptr, xDestroy uintptr) int32 { /* sqlite3.c:165975:12: */
+func createFunctionApi(tls *libc.TLS, db uintptr, zFunc uintptr, nArg int32, enc int32, p uintptr, xSFunc uintptr, xStep uintptr, xFinal uintptr, xValue uintptr, xInverse uintptr, xDestroy uintptr) int32 { /* sqlite3.c:167005:12: */
var rc int32
var pArg uintptr
rc = SQLITE_ERROR
@@ -144422,7 +147018,7 @@ func createFunctionApi(tls *libc.TLS, db uintptr, zFunc uintptr, nArg int32, enc
goto __2
}
Xsqlite3OomFault(tls, db)
- (*(*func(*libc.TLS, uintptr))(unsafe.Pointer(&xDestroy)))(tls, p)
+ (*struct{ f func(*libc.TLS, uintptr) })(unsafe.Pointer(&struct{ uintptr }{xDestroy})).f(tls, p)
goto out
__2:
;
@@ -144437,7 +147033,7 @@ __1:
goto __3
}
- (*(*func(*libc.TLS, uintptr))(unsafe.Pointer(&xDestroy)))(tls, p)
+ (*struct{ f func(*libc.TLS, uintptr) })(unsafe.Pointer(&struct{ uintptr }{xDestroy})).f(tls, p)
Xsqlite3_free(tls, pArg)
__3:
;
@@ -144449,29 +147045,29 @@ out:
}
// Create new user functions.
-func Xsqlite3_create_function(tls *libc.TLS, db uintptr, zFunc uintptr, nArg int32, enc int32, p uintptr, xSFunc uintptr, xStep uintptr, xFinal uintptr) int32 { /* sqlite3.c:166026:16: */
+func Xsqlite3_create_function(tls *libc.TLS, db uintptr, zFunc uintptr, nArg int32, enc int32, p uintptr, xSFunc uintptr, xStep uintptr, xFinal uintptr) int32 { /* sqlite3.c:167056:16: */
return createFunctionApi(tls, db, zFunc, nArg, enc, p, xSFunc, xStep,
xFinal, uintptr(0), uintptr(0), uintptr(0))
}
-func Xsqlite3_create_function_v2(tls *libc.TLS, db uintptr, zFunc uintptr, nArg int32, enc int32, p uintptr, xSFunc uintptr, xStep uintptr, xFinal uintptr, xDestroy uintptr) int32 { /* sqlite3.c:166039:16: */
+func Xsqlite3_create_function_v2(tls *libc.TLS, db uintptr, zFunc uintptr, nArg int32, enc int32, p uintptr, xSFunc uintptr, xStep uintptr, xFinal uintptr, xDestroy uintptr) int32 { /* sqlite3.c:167069:16: */
return createFunctionApi(tls, db, zFunc, nArg, enc, p, xSFunc, xStep,
xFinal, uintptr(0), uintptr(0), xDestroy)
}
-func Xsqlite3_create_window_function(tls *libc.TLS, db uintptr, zFunc uintptr, nArg int32, enc int32, p uintptr, xStep uintptr, xFinal uintptr, xValue uintptr, xInverse uintptr, xDestroy uintptr) int32 { /* sqlite3.c:166053:16: */
+func Xsqlite3_create_window_function(tls *libc.TLS, db uintptr, zFunc uintptr, nArg int32, enc int32, p uintptr, xStep uintptr, xFinal uintptr, xValue uintptr, xInverse uintptr, xDestroy uintptr) int32 { /* sqlite3.c:167083:16: */
return createFunctionApi(tls, db, zFunc, nArg, enc, p, uintptr(0), xStep,
xFinal, xValue, xInverse, xDestroy)
}
-func Xsqlite3_create_function16(tls *libc.TLS, db uintptr, zFunctionName uintptr, nArg int32, eTextRep int32, p uintptr, xSFunc uintptr, xStep uintptr, xFinal uintptr) int32 { /* sqlite3.c:166070:16: */
+func Xsqlite3_create_function16(tls *libc.TLS, db uintptr, zFunctionName uintptr, nArg int32, eTextRep int32, p uintptr, xSFunc uintptr, xStep uintptr, xFinal uintptr) int32 { /* sqlite3.c:167100:16: */
var rc int32
var zFunc8 uintptr
Xsqlite3_mutex_enter(tls, (*Sqlite3)(unsafe.Pointer(db)).Fmutex)
zFunc8 = Xsqlite3Utf16to8(tls, db, zFunctionName, -1, func() uint8 {
- if int32(*(*int8)(unsafe.Pointer(uintptr(unsafe.Pointer(&Xsqlite3one))))) == 0 {
+ if int32(*(*uint8)(unsafe.Pointer(uintptr(unsafe.Pointer(&Xsqlite3one))))) == 0 {
return uint8(SQLITE_UTF16BE)
}
return uint8(SQLITE_UTF16LE)
@@ -144489,7 +147085,7 @@ func Xsqlite3_create_function16(tls *libc.TLS, db uintptr, zFunctionName uintptr
// SQL function that use this routine so that the functions will exist
// for name resolution but are actually overloaded by the xFindFunction
// method of virtual tables.
-func sqlite3InvalidFunction(tls *libc.TLS, context uintptr, NotUsed int32, NotUsed2 uintptr) { /* sqlite3.c:166106:13: */
+func sqlite3InvalidFunction(tls *libc.TLS, context uintptr, NotUsed int32, NotUsed2 uintptr) { /* sqlite3.c:167136:13: */
bp := tls.Alloc(8)
defer tls.Free(8)
@@ -144498,7 +147094,7 @@ func sqlite3InvalidFunction(tls *libc.TLS, context uintptr, NotUsed int32, NotUs
_ = NotUsed
_ = NotUsed2
zErr = Xsqlite3_mprintf(tls,
- ts+21879 /* "unable to use fu..." */, libc.VaList(bp, zName))
+ ts+22339 /* "unable to use fu..." */, libc.VaList(bp, zName))
Xsqlite3_result_error(tls, context, zErr, -1)
Xsqlite3_free(tls, zErr)
}
@@ -144513,7 +147109,7 @@ func sqlite3InvalidFunction(tls *libc.TLS, context uintptr, NotUsed int32, NotUs
// should call this routine to make sure the global function exists.
// A global function must exist in order for name resolution to work
// properly.
-func Xsqlite3_overload_function(tls *libc.TLS, db uintptr, zName uintptr, nArg int32) int32 { /* sqlite3.c:166132:16: */
+func Xsqlite3_overload_function(tls *libc.TLS, db uintptr, zName uintptr, nArg int32) int32 { /* sqlite3.c:167162:16: */
var rc int32
var zCopy uintptr
@@ -144539,7 +147135,7 @@ func Xsqlite3_overload_function(tls *libc.TLS, db uintptr, zName uintptr, nArg i
// A NULL trace function means that no tracing is executes. A non-NULL
// trace is a pointer to a function that is invoked at the start of each
// SQL statement.
-func Xsqlite3_trace(tls *libc.TLS, db uintptr, xTrace uintptr, pArg uintptr) uintptr { /* sqlite3.c:166165:17: */
+func Xsqlite3_trace(tls *libc.TLS, db uintptr, xTrace uintptr, pArg uintptr) uintptr { /* sqlite3.c:167195:17: */
var pOld uintptr
Xsqlite3_mutex_enter(tls, (*Sqlite3)(unsafe.Pointer(db)).Fmutex)
@@ -144557,7 +147153,7 @@ func Xsqlite3_trace(tls *libc.TLS, db uintptr, xTrace uintptr, pArg uintptr) uin
}
// Register a trace callback using the version-2 interface.
-func Xsqlite3_trace_v2(tls *libc.TLS, db uintptr, mTrace uint32, xTrace uintptr, pArg uintptr) int32 { /* sqlite3.c:166186:16: */
+func Xsqlite3_trace_v2(tls *libc.TLS, db uintptr, mTrace uint32, xTrace uintptr, pArg uintptr) int32 { /* sqlite3.c:167216:16: */
Xsqlite3_mutex_enter(tls, (*Sqlite3)(unsafe.Pointer(db)).Fmutex)
if mTrace == uint32(0) {
xTrace = uintptr(0)
@@ -144578,7 +147174,7 @@ func Xsqlite3_trace_v2(tls *libc.TLS, db uintptr, mTrace uint32, xTrace uintptr,
// A NULL profile function means that no profiling is executes. A non-NULL
// profile is a pointer to a function that is invoked at the conclusion of
// each SQL statement that is run.
-func Xsqlite3_profile(tls *libc.TLS, db uintptr, xProfile uintptr, pArg uintptr) uintptr { /* sqlite3.c:166216:17: */
+func Xsqlite3_profile(tls *libc.TLS, db uintptr, xProfile uintptr, pArg uintptr) uintptr { /* sqlite3.c:167246:17: */
var pOld uintptr
Xsqlite3_mutex_enter(tls, (*Sqlite3)(unsafe.Pointer(db)).Fmutex)
@@ -144596,7 +147192,7 @@ func Xsqlite3_profile(tls *libc.TLS, db uintptr, xProfile uintptr, pArg uintptr)
// Register a function to be invoked when a transaction commits.
// If the invoked function returns non-zero, then the commit becomes a
// rollback.
-func Xsqlite3_commit_hook(tls *libc.TLS, db uintptr, xCallback uintptr, pArg uintptr) uintptr { /* sqlite3.c:166246:17: */
+func Xsqlite3_commit_hook(tls *libc.TLS, db uintptr, xCallback uintptr, pArg uintptr) uintptr { /* sqlite3.c:167276:17: */
var pOld uintptr
Xsqlite3_mutex_enter(tls, (*Sqlite3)(unsafe.Pointer(db)).Fmutex)
@@ -144609,7 +147205,7 @@ func Xsqlite3_commit_hook(tls *libc.TLS, db uintptr, xCallback uintptr, pArg uin
// Register a callback to be invoked each time a row is updated,
// inserted or deleted using this database connection.
-func Xsqlite3_update_hook(tls *libc.TLS, db uintptr, xCallback uintptr, pArg uintptr) uintptr { /* sqlite3.c:166271:17: */
+func Xsqlite3_update_hook(tls *libc.TLS, db uintptr, xCallback uintptr, pArg uintptr) uintptr { /* sqlite3.c:167301:17: */
var pRet uintptr
Xsqlite3_mutex_enter(tls, (*Sqlite3)(unsafe.Pointer(db)).Fmutex)
@@ -144622,7 +147218,7 @@ func Xsqlite3_update_hook(tls *libc.TLS, db uintptr, xCallback uintptr, pArg uin
// Register a callback to be invoked each time a transaction is rolled
// back by this database connection.
-func Xsqlite3_rollback_hook(tls *libc.TLS, db uintptr, xCallback uintptr, pArg uintptr) uintptr { /* sqlite3.c:166296:17: */
+func Xsqlite3_rollback_hook(tls *libc.TLS, db uintptr, xCallback uintptr, pArg uintptr) uintptr { /* sqlite3.c:167326:17: */
var pRet uintptr
Xsqlite3_mutex_enter(tls, (*Sqlite3)(unsafe.Pointer(db)).Fmutex)
@@ -144635,7 +147231,7 @@ func Xsqlite3_rollback_hook(tls *libc.TLS, db uintptr, xCallback uintptr, pArg u
// Register a callback to be invoked each time a row is updated,
// inserted or deleted using this database connection.
-func Xsqlite3_preupdate_hook(tls *libc.TLS, db uintptr, xCallback uintptr, pArg uintptr) uintptr { /* sqlite3.c:166322:17: */
+func Xsqlite3_preupdate_hook(tls *libc.TLS, db uintptr, xCallback uintptr, pArg uintptr) uintptr { /* sqlite3.c:167352:17: */
var pRet uintptr
Xsqlite3_mutex_enter(tls, (*Sqlite3)(unsafe.Pointer(db)).Fmutex)
pRet = (*Sqlite3)(unsafe.Pointer(db)).FpPreUpdateArg
@@ -144649,7 +147245,7 @@ func Xsqlite3_preupdate_hook(tls *libc.TLS, db uintptr, xCallback uintptr, pArg
// Invoke sqlite3_wal_checkpoint if the number of frames in the log file
// is greater than sqlite3.pWalArg cast to an integer (the value configured by
// wal_autocheckpoint()).
-func Xsqlite3WalDefaultHook(tls *libc.TLS, pClientData uintptr, db uintptr, zDb uintptr, nFrame int32) int32 { /* sqlite3.c:166345:20: */
+func Xsqlite3WalDefaultHook(tls *libc.TLS, pClientData uintptr, db uintptr, zDb uintptr, nFrame int32) int32 { /* sqlite3.c:167375:20: */
if nFrame >= (int32(pClientData)) {
Xsqlite3BeginBenignMalloc(tls)
Xsqlite3_wal_checkpoint(tls, db, zDb)
@@ -144667,7 +147263,7 @@ func Xsqlite3WalDefaultHook(tls *libc.TLS, pClientData uintptr, db uintptr, zDb
// registered using sqlite3_wal_hook(). Likewise, registering a callback
// using sqlite3_wal_hook() disables the automatic checkpoint mechanism
// configured by this function.
-func Xsqlite3_wal_autocheckpoint(tls *libc.TLS, db uintptr, nFrame int32) int32 { /* sqlite3.c:166371:16: */
+func Xsqlite3_wal_autocheckpoint(tls *libc.TLS, db uintptr, nFrame int32) int32 { /* sqlite3.c:167401:16: */
if nFrame > 0 {
Xsqlite3_wal_hook(tls, db, *(*uintptr)(unsafe.Pointer(&struct {
f func(*libc.TLS, uintptr, uintptr, uintptr, int32) int32
@@ -144680,7 +147276,7 @@ func Xsqlite3_wal_autocheckpoint(tls *libc.TLS, db uintptr, nFrame int32) int32
// Register a callback to be invoked each time a transaction is written
// into the write-ahead-log by this database connection.
-func Xsqlite3_wal_hook(tls *libc.TLS, db uintptr, xCallback uintptr, pArg uintptr) uintptr { /* sqlite3.c:166392:17: */
+func Xsqlite3_wal_hook(tls *libc.TLS, db uintptr, xCallback uintptr, pArg uintptr) uintptr { /* sqlite3.c:167422:17: */
var pRet uintptr
Xsqlite3_mutex_enter(tls, (*Sqlite3)(unsafe.Pointer(db)).Fmutex)
pRet = (*Sqlite3)(unsafe.Pointer(db)).FpWalArg
@@ -144691,7 +147287,7 @@ func Xsqlite3_wal_hook(tls *libc.TLS, db uintptr, xCallback uintptr, pArg uintpt
}
// Checkpoint database zDb.
-func Xsqlite3_wal_checkpoint_v2(tls *libc.TLS, db uintptr, zDb uintptr, eMode int32, pnLog uintptr, pnCkpt uintptr) int32 { /* sqlite3.c:166419:16: */
+func Xsqlite3_wal_checkpoint_v2(tls *libc.TLS, db uintptr, zDb uintptr, eMode int32, pnLog uintptr, pnCkpt uintptr) int32 { /* sqlite3.c:167449:16: */
bp := tls.Alloc(8)
defer tls.Free(8)
@@ -144713,14 +147309,14 @@ func Xsqlite3_wal_checkpoint_v2(tls *libc.TLS, db uintptr, zDb uintptr, eMode in
}
Xsqlite3_mutex_enter(tls, (*Sqlite3)(unsafe.Pointer(db)).Fmutex)
- if (zDb != 0) && (*(*int8)(unsafe.Pointer(zDb)) != 0) {
+ if (zDb != 0) && (*(*uint8)(unsafe.Pointer(zDb)) != 0) {
iDb = Xsqlite3FindDbName(tls, db, zDb)
} else {
iDb = (SQLITE_MAX_ATTACHED + 2) // This means process all schemas
}
if iDb < 0 {
rc = SQLITE_ERROR
- Xsqlite3ErrorWithMsg(tls, db, SQLITE_ERROR, ts+21930 /* "unknown database..." */, libc.VaList(bp, zDb))
+ Xsqlite3ErrorWithMsg(tls, db, SQLITE_ERROR, ts+22390 /* "unknown database..." */, libc.VaList(bp, zDb))
} else {
(*Sqlite3)(unsafe.Pointer(db)).FbusyHandler.FnBusy = 0
rc = Xsqlite3Checkpoint(tls, db, iDb, eMode, pnLog, pnCkpt)
@@ -144741,7 +147337,7 @@ func Xsqlite3_wal_checkpoint_v2(tls *libc.TLS, db uintptr, zDb uintptr, eMode in
// Checkpoint database zDb. If zDb is NULL, or if the buffer zDb points
// to contains a zero-length string, all attached databases are
// checkpointed.
-func Xsqlite3_wal_checkpoint(tls *libc.TLS, db uintptr, zDb uintptr) int32 { /* sqlite3.c:166483:16: */
+func Xsqlite3_wal_checkpoint(tls *libc.TLS, db uintptr, zDb uintptr) int32 { /* sqlite3.c:167513:16: */
// EVIDENCE-OF: R-41613-20553 The sqlite3_wal_checkpoint(D,X) is equivalent to
// sqlite3_wal_checkpoint_v2(D,X,SQLITE_CHECKPOINT_PASSIVE,0,0).
return Xsqlite3_wal_checkpoint_v2(tls, db, zDb, SQLITE_CHECKPOINT_PASSIVE, uintptr(0), uintptr(0))
@@ -144765,7 +147361,7 @@ func Xsqlite3_wal_checkpoint(tls *libc.TLS, db uintptr, zDb uintptr) int32 { /*
//
// Parameter eMode is one of SQLITE_CHECKPOINT_PASSIVE, FULL, RESTART
// or TRUNCATE.
-func Xsqlite3Checkpoint(tls *libc.TLS, db uintptr, iDb int32, eMode int32, pnLog uintptr, pnCkpt uintptr) int32 { /* sqlite3.c:166510:20: */
+func Xsqlite3Checkpoint(tls *libc.TLS, db uintptr, iDb int32, eMode int32, pnLog uintptr, pnCkpt uintptr) int32 { /* sqlite3.c:167540:20: */
var rc int32 = SQLITE_OK // Return code
var i int32 // Used to iterate through attached dbs
var bBusy int32 = 0 // True if SQLITE_BUSY has been encountered
@@ -144807,19 +147403,19 @@ func Xsqlite3Checkpoint(tls *libc.TLS, db uintptr, iDb int32, eMode int32, pnLog
// 2 2 memory (return 1)
// 2 0 memory (return 1)
// 3 any memory (return 1)
-func Xsqlite3TempInMemory(tls *libc.TLS, db uintptr) int32 { /* sqlite3.c:166556:20: */
+func Xsqlite3TempInMemory(tls *libc.TLS, db uintptr) int32 { /* sqlite3.c:167586:20: */
return (libc.Bool32(int32((*Sqlite3)(unsafe.Pointer(db)).Ftemp_store) == 2))
}
// Return UTF-8 encoded English language explanation of the most recent
// error.
-func Xsqlite3_errmsg(tls *libc.TLS, db uintptr) uintptr { /* sqlite3.c:166577:23: */
+func Xsqlite3_errmsg(tls *libc.TLS, db uintptr) uintptr { /* sqlite3.c:167607:23: */
var z uintptr
if !(db != 0) {
return Xsqlite3ErrStr(tls, SQLITE_NOMEM)
}
if !(Xsqlite3SafetyCheckSickOrOk(tls, db) != 0) {
- return Xsqlite3ErrStr(tls, Xsqlite3MisuseError(tls, 166583))
+ return Xsqlite3ErrStr(tls, Xsqlite3MisuseError(tls, 167613))
}
Xsqlite3_mutex_enter(tls, (*Sqlite3)(unsafe.Pointer(db)).Fmutex)
if (*Sqlite3)(unsafe.Pointer(db)).FmallocFailed != 0 {
@@ -144842,7 +147438,7 @@ func Xsqlite3_errmsg(tls *libc.TLS, db uintptr) uintptr { /* sqlite3.c:166577:23
// Return UTF-16 encoded English language explanation of the most recent
// error.
-func Xsqlite3_errmsg16(tls *libc.TLS, db uintptr) uintptr { /* sqlite3.c:166605:23: */
+func Xsqlite3_errmsg16(tls *libc.TLS, db uintptr) uintptr { /* sqlite3.c:167635:23: */
var z uintptr
if !(db != 0) {
return uintptr(uintptr(unsafe.Pointer(&outOfMem)))
@@ -144871,18 +147467,18 @@ func Xsqlite3_errmsg16(tls *libc.TLS, db uintptr) uintptr { /* sqlite3.c:166605:
var outOfMem = [14]U16{
U16('o'), U16('u'), U16('t'), U16(' '), U16('o'), U16('f'), U16(' '), U16('m'), U16('e'), U16('m'), U16('o'), U16('r'), U16('y'), U16(0),
-} /* sqlite3.c:166606:20 */
+} /* sqlite3.c:167636:20 */
var misuse = [34]U16{
U16('b'), U16('a'), U16('d'), U16(' '), U16('p'), U16('a'), U16('r'), U16('a'), U16('m'), U16('e'), U16('t'), U16('e'), U16('r'), U16(' '),
U16('o'), U16('r'), U16(' '), U16('o'), U16('t'), U16('h'), U16('e'), U16('r'), U16(' '), U16('A'), U16('P'), U16('I'), U16(' '),
U16('m'), U16('i'), U16('s'), U16('u'), U16('s'), U16('e'), U16(0),
-} /* sqlite3.c:166609:20 */
+} /* sqlite3.c:167639:20 */
// Return the most recent error code generated by an SQLite routine. If NULL is
// passed to this function, we assume a malloc() failed during sqlite3_open().
-func Xsqlite3_errcode(tls *libc.TLS, db uintptr) int32 { /* sqlite3.c:166647:16: */
+func Xsqlite3_errcode(tls *libc.TLS, db uintptr) int32 { /* sqlite3.c:167677:16: */
if (db != 0) && !(Xsqlite3SafetyCheckSickOrOk(tls, db) != 0) {
- return Xsqlite3MisuseError(tls, 166649)
+ return Xsqlite3MisuseError(tls, 167679)
}
if !(db != 0) || ((*Sqlite3)(unsafe.Pointer(db)).FmallocFailed != 0) {
return SQLITE_NOMEM
@@ -144890,9 +147486,9 @@ func Xsqlite3_errcode(tls *libc.TLS, db uintptr) int32 { /* sqlite3.c:166647:16:
return ((*Sqlite3)(unsafe.Pointer(db)).FerrCode & (*Sqlite3)(unsafe.Pointer(db)).FerrMask)
}
-func Xsqlite3_extended_errcode(tls *libc.TLS, db uintptr) int32 { /* sqlite3.c:166656:16: */
+func Xsqlite3_extended_errcode(tls *libc.TLS, db uintptr) int32 { /* sqlite3.c:167686:16: */
if (db != 0) && !(Xsqlite3SafetyCheckSickOrOk(tls, db) != 0) {
- return Xsqlite3MisuseError(tls, 166658)
+ return Xsqlite3MisuseError(tls, 167688)
}
if !(db != 0) || ((*Sqlite3)(unsafe.Pointer(db)).FmallocFailed != 0) {
return SQLITE_NOMEM
@@ -144900,7 +147496,7 @@ func Xsqlite3_extended_errcode(tls *libc.TLS, db uintptr) int32 { /* sqlite3.c:1
return (*Sqlite3)(unsafe.Pointer(db)).FerrCode
}
-func Xsqlite3_system_errno(tls *libc.TLS, db uintptr) int32 { /* sqlite3.c:166665:16: */
+func Xsqlite3_system_errno(tls *libc.TLS, db uintptr) int32 { /* sqlite3.c:167695:16: */
if db != 0 {
return (*Sqlite3)(unsafe.Pointer(db)).FiSysErrno
}
@@ -144910,13 +147506,13 @@ func Xsqlite3_system_errno(tls *libc.TLS, db uintptr) int32 { /* sqlite3.c:16666
// Return a string that describes the kind of error specified in the
// argument. For now, this simply calls the internal sqlite3ErrStr()
// function.
-func Xsqlite3_errstr(tls *libc.TLS, rc int32) uintptr { /* sqlite3.c:166674:23: */
+func Xsqlite3_errstr(tls *libc.TLS, rc int32) uintptr { /* sqlite3.c:167704:23: */
return Xsqlite3ErrStr(tls, rc)
}
// Create a new collating function for database "db". The name is zName
// and the encoding is enc.
-func createCollation(tls *libc.TLS, db uintptr, zName uintptr, enc U8, pCtx uintptr, xCompare uintptr, xDel uintptr) int32 { /* sqlite3.c:166682:12: */
+func createCollation(tls *libc.TLS, db uintptr, zName uintptr, enc U8, pCtx uintptr, xCompare uintptr, xDel uintptr) int32 { /* sqlite3.c:167712:12: */
var pColl uintptr
var enc2 int32
@@ -144927,14 +147523,14 @@ func createCollation(tls *libc.TLS, db uintptr, zName uintptr, enc U8, pCtx uint
if (enc2 == SQLITE_UTF16) || (enc2 == SQLITE_UTF16_ALIGNED) {
enc2 = func() int32 {
- if int32(*(*int8)(unsafe.Pointer(uintptr(unsafe.Pointer(&Xsqlite3one))))) == 0 {
+ if int32(*(*uint8)(unsafe.Pointer(uintptr(unsafe.Pointer(&Xsqlite3one))))) == 0 {
return SQLITE_UTF16BE
}
return SQLITE_UTF16LE
}()
}
if (enc2 < SQLITE_UTF8) || (enc2 > SQLITE_UTF16BE) {
- return Xsqlite3MisuseError(tls, 166706)
+ return Xsqlite3MisuseError(tls, 167736)
}
// Check if this call is removing or replacing an existing collation
@@ -144944,7 +147540,7 @@ func createCollation(tls *libc.TLS, db uintptr, zName uintptr, enc U8, pCtx uint
if (pColl != 0) && ((*CollSeq)(unsafe.Pointer(pColl)).FxCmp != 0) {
if (*Sqlite3)(unsafe.Pointer(db)).FnVdbeActive != 0 {
Xsqlite3ErrorWithMsg(tls, db, SQLITE_BUSY,
- ts+21951 /* "unable to delete..." */, 0)
+ ts+22411 /* "unable to delete..." */, 0)
return SQLITE_BUSY
}
Xsqlite3ExpirePreparedStatements(tls, db, 0)
@@ -144961,7 +147557,7 @@ func createCollation(tls *libc.TLS, db uintptr, zName uintptr, enc U8, pCtx uint
var p uintptr = (aColl + uintptr(j)*40)
if int32((*CollSeq)(unsafe.Pointer(p)).Fenc) == int32((*CollSeq)(unsafe.Pointer(pColl)).Fenc) {
if (*CollSeq)(unsafe.Pointer(p)).FxDel != 0 {
- (*(*func(*libc.TLS, uintptr))(unsafe.Pointer((p + 32 /* &.xDel */))))(tls, (*CollSeq)(unsafe.Pointer(p)).FpUser)
+ (*struct{ f func(*libc.TLS, uintptr) })(unsafe.Pointer(&struct{ uintptr }{(*CollSeq)(unsafe.Pointer(p)).FxDel})).f(tls, (*CollSeq)(unsafe.Pointer(p)).FpUser)
}
(*CollSeq)(unsafe.Pointer(p)).FxCmp = uintptr(0)
}
@@ -144997,7 +147593,7 @@ var aHardLimit = [12]int32{
SQLITE_MAX_VARIABLE_NUMBER, // IMP: R-38091-32352
SQLITE_MAX_TRIGGER_DEPTH,
SQLITE_MAX_WORKER_THREADS,
-} /* sqlite3.c:166759:18 */
+} /* sqlite3.c:167789:18 */
// Make sure the hard limits are set to reasonable values
@@ -145009,7 +147605,7 @@ var aHardLimit = [12]int32{
// A new lower limit does not shrink existing constructs.
// It merely prevents new constructs that exceed the limit
// from forming.
-func Xsqlite3_limit(tls *libc.TLS, db uintptr, limitId int32, newLimit int32) int32 { /* sqlite3.c:166822:16: */
+func Xsqlite3_limit(tls *libc.TLS, db uintptr, limitId int32, newLimit int32) int32 { /* sqlite3.c:167852:16: */
var oldLimit int32
// EVIDENCE-OF: R-30189-54097 For each limit category SQLITE_LIMIT_NAME
@@ -145054,7 +147650,7 @@ func Xsqlite3_limit(tls *libc.TLS, db uintptr, limitId int32, newLimit int32) in
// may be set to point to a buffer containing an English language error
// message. It is the responsibility of the caller to eventually release
// this buffer by calling sqlite3_free().
-func Xsqlite3ParseUri(tls *libc.TLS, zDefaultVfs uintptr, zUri uintptr, pFlags uintptr, ppVfs uintptr, pzFile uintptr, pzErrMsg uintptr) int32 { /* sqlite3.c:166892:20: */
+func Xsqlite3ParseUri(tls *libc.TLS, zDefaultVfs uintptr, zUri uintptr, pFlags uintptr, ppVfs uintptr, pzFile uintptr, pzErrMsg uintptr) int32 { /* sqlite3.c:167922:20: */
bp := tls.Alloc(56)
defer tls.Free(56)
@@ -145062,7 +147658,7 @@ func Xsqlite3ParseUri(tls *libc.TLS, zDefaultVfs uintptr, zUri uintptr, pFlags u
var flags uint32
var zVfs uintptr
var zFile uintptr
- var c int8
+ var c uint8
var nUri int32
var octet int32
var z uintptr
@@ -145087,7 +147683,7 @@ func Xsqlite3ParseUri(tls *libc.TLS, zDefaultVfs uintptr, zUri uintptr, pFlags u
if !(((((flags & uint32(SQLITE_OPEN_URI)) != 0) || // IMP: R-48725-32206
(Xsqlite3Config.FbOpenUri != 0)) && // IMP: R-51689-46548
- (nUri >= 5)) && (libc.Xmemcmp(tls, zUri, ts+22019 /* "file:" */, uint64(5)) == 0)) {
+ (nUri >= 5)) && (libc.Xmemcmp(tls, zUri, ts+22479 /* "file:" */, uint64(5)) == 0)) {
goto __1
} // Input character index
iOut = 0 // Output character index
@@ -145102,7 +147698,7 @@ __3:
if !(iIn < nUri) {
goto __5
}
- nByte = nByte + (U64(libc.Bool32(int32(*(*int8)(unsafe.Pointer(zUri + uintptr(iIn)))) == '&')))
+ nByte = nByte + (U64(libc.Bool32(int32(*(*uint8)(unsafe.Pointer(zUri + uintptr(iIn)))) == '&')))
goto __4
__4:
iIn++
@@ -145123,22 +147719,22 @@ __6:
iIn = 5
// Discard the scheme and authority segments of the URI.
- if !((int32(*(*int8)(unsafe.Pointer(zUri + 5))) == '/') && (int32(*(*int8)(unsafe.Pointer(zUri + 6))) == '/')) {
+ if !((int32(*(*uint8)(unsafe.Pointer(zUri + 5))) == '/') && (int32(*(*uint8)(unsafe.Pointer(zUri + 6))) == '/')) {
goto __7
}
iIn = 7
__8:
- if !((*(*int8)(unsafe.Pointer(zUri + uintptr(iIn))) != 0) && (int32(*(*int8)(unsafe.Pointer(zUri + uintptr(iIn)))) != '/')) {
+ if !((*(*uint8)(unsafe.Pointer(zUri + uintptr(iIn))) != 0) && (int32(*(*uint8)(unsafe.Pointer(zUri + uintptr(iIn)))) != '/')) {
goto __9
}
iIn++
goto __8
__9:
;
- if !((iIn != 7) && ((iIn != 16) || (libc.Xmemcmp(tls, ts+22025 /* "localhost" */, (zUri+7), uint64(9)) != 0))) {
+ if !((iIn != 7) && ((iIn != 16) || (libc.Xmemcmp(tls, ts+22485 /* "localhost" */, (zUri+7), uint64(9)) != 0))) {
goto __10
}
- *(*uintptr)(unsafe.Pointer(pzErrMsg)) = Xsqlite3_mprintf(tls, ts+22035, /* "invalid uri auth..." */
+ *(*uintptr)(unsafe.Pointer(pzErrMsg)) = Xsqlite3_mprintf(tls, ts+22495, /* "invalid uri auth..." */
libc.VaList(bp, (iIn-7), (zUri+7)))
rc = SQLITE_ERROR
goto parse_uri_out
@@ -145158,17 +147754,17 @@ __7:
// 2: Parsing value section of a name=value query parameter.
eState = 0
__11:
- if !(((int32(libc.AssignInt8(&c, *(*int8)(unsafe.Pointer(zUri + uintptr(iIn)))))) != 0) && (int32(c) != '#')) {
+ if !(((int32(libc.AssignUint8(&c, *(*uint8)(unsafe.Pointer(zUri + uintptr(iIn)))))) != 0) && (int32(c) != '#')) {
goto __12
}
iIn++
if !(((int32(c) == '%') &&
- ((int32(Xsqlite3CtypeMap[uint8(*(*int8)(unsafe.Pointer(zUri + uintptr(iIn))))]) & 0x08) != 0)) &&
- ((int32(Xsqlite3CtypeMap[uint8(*(*int8)(unsafe.Pointer(zUri + uintptr((iIn + 1)))))]) & 0x08) != 0)) {
+ ((int32(Xsqlite3CtypeMap[uint8(*(*uint8)(unsafe.Pointer(zUri + uintptr(iIn))))]) & 0x08) != 0)) &&
+ ((int32(Xsqlite3CtypeMap[uint8(*(*uint8)(unsafe.Pointer(zUri + uintptr((iIn + 1)))))]) & 0x08) != 0)) {
goto __13
}
- octet = (int32(Xsqlite3HexToInt(tls, int32(*(*int8)(unsafe.Pointer(zUri + uintptr(libc.PostIncInt32(&iIn, 1))))))) << 4)
- octet = octet + (int32(Xsqlite3HexToInt(tls, int32(*(*int8)(unsafe.Pointer(zUri + uintptr(libc.PostIncInt32(&iIn, 1))))))))
+ octet = (int32(Xsqlite3HexToInt(tls, int32(*(*uint8)(unsafe.Pointer(zUri + uintptr(libc.PostIncInt32(&iIn, 1))))))) << 4)
+ octet = octet + (int32(Xsqlite3HexToInt(tls, int32(*(*uint8)(unsafe.Pointer(zUri + uintptr(libc.PostIncInt32(&iIn, 1))))))))
if !(octet == 0) {
goto __15
@@ -145178,7 +147774,7 @@ __11:
// value currently being parsed. So ignore the current character
// and skip to the next "?", "=" or "&", as appropriate.
__16:
- if !((((((int32(libc.AssignInt8(&c, *(*int8)(unsafe.Pointer(zUri + uintptr(iIn)))))) != 0) && (int32(c) != '#')) &&
+ if !((((((int32(libc.AssignUint8(&c, *(*uint8)(unsafe.Pointer(zUri + uintptr(iIn)))))) != 0) && (int32(c) != '#')) &&
((eState != 0) || (int32(c) != '?'))) &&
((eState != 1) || ((int32(c) != '=') && (int32(c) != '&')))) &&
((eState != 2) || (int32(c) != '&'))) {
@@ -145191,18 +147787,18 @@ __17:
goto __11
__15:
;
- c = int8(octet)
+ c = uint8(octet)
goto __14
__13:
if !((eState == 1) && ((int32(c) == '&') || (int32(c) == '='))) {
goto __18
}
- if !(int32(*(*int8)(unsafe.Pointer(zFile + uintptr((iOut - 1))))) == 0) {
+ if !(int32(*(*uint8)(unsafe.Pointer(zFile + uintptr((iOut - 1))))) == 0) {
goto __20
}
// An empty option name. Ignore this option altogether.
__21:
- if !(((*(*int8)(unsafe.Pointer(zUri + uintptr(iIn))) != 0) && (int32(*(*int8)(unsafe.Pointer(zUri + uintptr(iIn)))) != '#')) && (int32(*(*int8)(unsafe.Pointer(zUri + uintptr((iIn - 1))))) != '&')) {
+ if !(((*(*uint8)(unsafe.Pointer(zUri + uintptr(iIn))) != 0) && (int32(*(*uint8)(unsafe.Pointer(zUri + uintptr(iIn)))) != '#')) && (int32(*(*uint8)(unsafe.Pointer(zUri + uintptr((iIn - 1))))) != '&')) {
goto __22
}
iIn++
@@ -145215,19 +147811,19 @@ __20:
if !(int32(c) == '&') {
goto __23
}
- *(*int8)(unsafe.Pointer(zFile + uintptr(libc.PostIncInt32(&iOut, 1)))) = int8(0)
+ *(*uint8)(unsafe.Pointer(zFile + uintptr(libc.PostIncInt32(&iOut, 1)))) = uint8(0)
goto __24
__23:
eState = 2
__24:
;
- c = int8(0)
+ c = uint8(0)
goto __19
__18:
if !(((eState == 0) && (int32(c) == '?')) || ((eState == 2) && (int32(c) == '&'))) {
goto __25
}
- c = int8(0)
+ c = uint8(0)
eState = 1
__25:
;
@@ -145235,14 +147831,14 @@ __19:
;
__14:
;
- *(*int8)(unsafe.Pointer(zFile + uintptr(libc.PostIncInt32(&iOut, 1)))) = c
+ *(*uint8)(unsafe.Pointer(zFile + uintptr(libc.PostIncInt32(&iOut, 1)))) = c
goto __11
__12:
;
if !(eState == 1) {
goto __26
}
- *(*int8)(unsafe.Pointer(zFile + uintptr(libc.PostIncInt32(&iOut, 1)))) = int8(0)
+ *(*uint8)(unsafe.Pointer(zFile + uintptr(libc.PostIncInt32(&iOut, 1)))) = uint8(0)
__26:
;
libc.Xmemset(tls, (zFile + uintptr(iOut)), 0, uint64(4)) // end-of-options + empty journal filenames
@@ -145253,14 +147849,14 @@ __26:
// method.
zOpt = (zFile + uintptr((Xsqlite3Strlen30(tls, zFile) + 1)))
__27:
- if !(*(*int8)(unsafe.Pointer(zOpt)) != 0) {
+ if !(*(*uint8)(unsafe.Pointer(zOpt)) != 0) {
goto __28
}
nOpt = Xsqlite3Strlen30(tls, zOpt)
zVal = (zOpt + uintptr((nOpt + 1)))
nVal = Xsqlite3Strlen30(tls, zVal)
- if !((nOpt == 3) && (libc.Xmemcmp(tls, ts+22063 /* "vfs" */, zOpt, uint64(3)) == 0)) {
+ if !((nOpt == 3) && (libc.Xmemcmp(tls, ts+22523 /* "vfs" */, zOpt, uint64(3)) == 0)) {
goto __29
}
zVfs = zVal
@@ -145271,17 +147867,17 @@ __29:
mask = 0
limit = 0
- if !((nOpt == 5) && (libc.Xmemcmp(tls, ts+22067 /* "cache" */, zOpt, uint64(5)) == 0)) {
+ if !((nOpt == 5) && (libc.Xmemcmp(tls, ts+22527 /* "cache" */, zOpt, uint64(5)) == 0)) {
goto __31
}
mask = (SQLITE_OPEN_SHAREDCACHE | SQLITE_OPEN_PRIVATECACHE)
aMode = uintptr(unsafe.Pointer(&aCacheMode))
limit = mask
- zModeType = ts + 22067 /* "cache" */
+ zModeType = ts + 22527 /* "cache" */
__31:
;
- if !((nOpt == 4) && (libc.Xmemcmp(tls, ts+22073 /* "mode" */, zOpt, uint64(4)) == 0)) {
+ if !((nOpt == 4) && (libc.Xmemcmp(tls, ts+22533 /* "mode" */, zOpt, uint64(4)) == 0)) {
goto __32
}
@@ -145289,7 +147885,7 @@ __31:
SQLITE_OPEN_CREATE) | SQLITE_OPEN_MEMORY)
aMode = uintptr(unsafe.Pointer(&aOpenMode))
limit = (int32(uint32(mask) & flags))
- zModeType = ts + 2327 /* "access" */
+ zModeType = ts + 2399 /* "access" */
__32:
;
@@ -145320,7 +147916,7 @@ __36:
if !(mode == 0) {
goto __38
}
- *(*uintptr)(unsafe.Pointer(pzErrMsg)) = Xsqlite3_mprintf(tls, ts+22078 /* "no such %s mode:..." */, libc.VaList(bp+16, zModeType, zVal))
+ *(*uintptr)(unsafe.Pointer(pzErrMsg)) = Xsqlite3_mprintf(tls, ts+22538 /* "no such %s mode:..." */, libc.VaList(bp+16, zModeType, zVal))
rc = SQLITE_ERROR
goto parse_uri_out
__38:
@@ -145328,7 +147924,7 @@ __38:
if !((mode & libc.CplInt32(SQLITE_OPEN_MEMORY)) > limit) {
goto __39
}
- *(*uintptr)(unsafe.Pointer(pzErrMsg)) = Xsqlite3_mprintf(tls, ts+22098, /* "%s mode not allo..." */
+ *(*uintptr)(unsafe.Pointer(pzErrMsg)) = Xsqlite3_mprintf(tls, ts+22558, /* "%s mode not allo..." */
libc.VaList(bp+32, zModeType, zVal))
rc = SQLITE_PERM
goto parse_uri_out
@@ -145371,7 +147967,7 @@ __2:
if !(*(*uintptr)(unsafe.Pointer(ppVfs)) == uintptr(0)) {
goto __42
}
- *(*uintptr)(unsafe.Pointer(pzErrMsg)) = Xsqlite3_mprintf(tls, ts+22122 /* "no such vfs: %s" */, libc.VaList(bp+48, zVfs))
+ *(*uintptr)(unsafe.Pointer(pzErrMsg)) = Xsqlite3_mprintf(tls, ts+22582 /* "no such vfs: %s" */, libc.VaList(bp+48, zVfs))
rc = SQLITE_ERROR
__42:
;
@@ -145389,29 +147985,29 @@ __43:
}
type OpenMode = struct {
- Fz uintptr
- Fmode int32
- _ [4]byte
-} /* sqlite3.c:167034:9 */
+ Fz uintptr
+ Fmode int32
+ F__ccgo_pad1 [4]byte
+} /* sqlite3.c:168064:9 */
var aCacheMode = [3]OpenMode{
- {Fz: ts + 22138 /* "shared" */, Fmode: SQLITE_OPEN_SHAREDCACHE},
- {Fz: ts + 22145 /* "private" */, Fmode: SQLITE_OPEN_PRIVATECACHE},
+ {Fz: ts + 22598 /* "shared" */, Fmode: SQLITE_OPEN_SHAREDCACHE},
+ {Fz: ts + 22605 /* "private" */, Fmode: SQLITE_OPEN_PRIVATECACHE},
{},
-} /* sqlite3.c:167043:34 */
+} /* sqlite3.c:168073:34 */
var aOpenMode = [5]OpenMode{
- {Fz: ts + 22153 /* "ro" */, Fmode: SQLITE_OPEN_READONLY},
- {Fz: ts + 22156 /* "rw" */, Fmode: SQLITE_OPEN_READWRITE},
- {Fz: ts + 22159 /* "rwc" */, Fmode: (SQLITE_OPEN_READWRITE | SQLITE_OPEN_CREATE)},
- {Fz: ts + 15395 /* "memory" */, Fmode: SQLITE_OPEN_MEMORY},
+ {Fz: ts + 22613 /* "ro" */, Fmode: SQLITE_OPEN_READONLY},
+ {Fz: ts + 22616 /* "rw" */, Fmode: SQLITE_OPEN_READWRITE},
+ {Fz: ts + 22619 /* "rwc" */, Fmode: (SQLITE_OPEN_READWRITE | SQLITE_OPEN_CREATE)},
+ {Fz: ts + 15850 /* "memory" */, Fmode: SQLITE_OPEN_MEMORY},
{},
-} /* sqlite3.c:167055:34 */
+} /* sqlite3.c:168085:34 */
// This routine does the core work of extracting URI parameters from a
// database filename for the sqlite3_uri_parameter() interface.
-func uriParameter(tls *libc.TLS, zFilename uintptr, zParam uintptr) uintptr { /* sqlite3.c:167129:19: */
+func uriParameter(tls *libc.TLS, zFilename uintptr, zParam uintptr) uintptr { /* sqlite3.c:168159:19: */
zFilename += (uintptr(Xsqlite3Strlen30(tls, zFilename) + 1))
- for *(*int8)(unsafe.Pointer(zFilename)) != 0 {
+ for *(*uint8)(unsafe.Pointer(zFilename)) != 0 {
var x int32 = libc.Xstrcmp(tls, zFilename, zParam)
zFilename += (uintptr(Xsqlite3Strlen30(tls, zFilename) + 1))
if x == 0 {
@@ -145425,7 +148021,7 @@ func uriParameter(tls *libc.TLS, zFilename uintptr, zParam uintptr) uintptr { /*
// This routine does the work of opening a database on behalf of
// sqlite3_open() and sqlite3_open16(). The database filename "zFilename"
// is UTF-8 encoded.
-func openDatabase(tls *libc.TLS, zFilename uintptr, ppDb uintptr, flags uint32, zVfs uintptr) int32 { /* sqlite3.c:167147:12: */
+func openDatabase(tls *libc.TLS, zFilename uintptr, ppDb uintptr, flags uint32, zVfs uintptr) int32 { /* sqlite3.c:168177:12: */
bp := tls.Alloc(32)
defer tls.Free(32)
*(*uint32)(unsafe.Pointer(bp + 8)) = flags
@@ -145585,10 +148181,10 @@ __12:
createCollation(tls, db, uintptr(unsafe.Pointer(&Xsqlite3StrBINARY)), uint8(SQLITE_UTF16LE), uintptr(0), *(*uintptr)(unsafe.Pointer(&struct {
f func(*libc.TLS, uintptr, int32, uintptr, int32, uintptr) int32
}{binCollFunc})), uintptr(0))
- createCollation(tls, db, ts+19709 /* "NOCASE" */, uint8(SQLITE_UTF8), uintptr(0), *(*uintptr)(unsafe.Pointer(&struct {
+ createCollation(tls, db, ts+20169 /* "NOCASE" */, uint8(SQLITE_UTF8), uintptr(0), *(*uintptr)(unsafe.Pointer(&struct {
f func(*libc.TLS, uintptr, int32, uintptr, int32, uintptr) int32
}{nocaseCollatingFunc})), uintptr(0))
- createCollation(tls, db, ts+22163 /* "RTRIM" */, uint8(SQLITE_UTF8), uintptr(0), *(*uintptr)(unsafe.Pointer(&struct {
+ createCollation(tls, db, ts+22623 /* "RTRIM" */, uint8(SQLITE_UTF8), uintptr(0), *(*uintptr)(unsafe.Pointer(&struct {
f func(*libc.TLS, uintptr, int32, uintptr, int32, uintptr) int32
}{rtrimCollFunc})), uintptr(0))
if !((*Sqlite3)(unsafe.Pointer(db)).FmallocFailed != 0) {
@@ -145617,7 +148213,7 @@ __15:
if !(((int32(1) << (*(*uint32)(unsafe.Pointer(bp + 8 /* flags */)) & uint32(7))) & 0x46) == 0) {
goto __16
}
- rc = Xsqlite3MisuseError(tls, 167352) // IMP: R-18321-05872
+ rc = Xsqlite3MisuseError(tls, 168382) // IMP: R-18321-05872
goto __17
__16:
rc = Xsqlite3ParseUri(tls, zVfs, zFilename, bp+8 /* &flags */, (db /* &.pVfs */), bp+16 /* &zOpen */, bp+24 /* &zErrMsg */)
@@ -145634,7 +148230,7 @@ __19:
;
Xsqlite3ErrorWithMsg(tls, db, rc, func() uintptr {
if *(*uintptr)(unsafe.Pointer(bp + 24 /* zErrMsg */)) != 0 {
- return ts + 2718 /* "%s" */
+ return ts + 2790 /* "%s" */
}
return uintptr(0)
}(), libc.VaList(bp, *(*uintptr)(unsafe.Pointer(bp + 24 /* zErrMsg */))))
@@ -145672,9 +148268,9 @@ __22:
// The default safety_level for the main database is FULL; for the temp
// database it is OFF. This matches the pager layer defaults.
- (*Db)(unsafe.Pointer((*Sqlite3)(unsafe.Pointer(db)).FaDb)).FzDbSName = ts + 5327 /* "main" */
+ (*Db)(unsafe.Pointer((*Sqlite3)(unsafe.Pointer(db)).FaDb)).FzDbSName = ts + 5458 /* "main" */
(*Db)(unsafe.Pointer((*Sqlite3)(unsafe.Pointer(db)).FaDb)).Fsafety_level = (U8(SQLITE_DEFAULT_SYNCHRONOUS + 1))
- (*Db)(unsafe.Pointer((*Sqlite3)(unsafe.Pointer(db)).FaDb + 1*32)).FzDbSName = ts + 21165 /* "temp" */
+ (*Db)(unsafe.Pointer((*Sqlite3)(unsafe.Pointer(db)).FaDb + 1*32)).FzDbSName = ts + 21625 /* "temp" */
(*Db)(unsafe.Pointer((*Sqlite3)(unsafe.Pointer(db)).FaDb + 1*32)).Fsafety_level = U8(PAGER_SYNCHRONOUS_OFF)
(*Sqlite3)(unsafe.Pointer(db)).Fmagic = SQLITE_MAGIC_OPEN
@@ -145771,17 +148367,17 @@ __32:
}
// Open a new database handle.
-func Xsqlite3_open(tls *libc.TLS, zFilename uintptr, ppDb uintptr) int32 { /* sqlite3.c:167474:16: */
+func Xsqlite3_open(tls *libc.TLS, zFilename uintptr, ppDb uintptr) int32 { /* sqlite3.c:168504:16: */
return openDatabase(tls, zFilename, ppDb,
(uint32(SQLITE_OPEN_READWRITE | SQLITE_OPEN_CREATE)), uintptr(0))
}
-func Xsqlite3_open_v2(tls *libc.TLS, filename uintptr, ppDb uintptr, flags int32, zVfs uintptr) int32 { /* sqlite3.c:167481:16: */
+func Xsqlite3_open_v2(tls *libc.TLS, filename uintptr, ppDb uintptr, flags int32, zVfs uintptr) int32 { /* sqlite3.c:168511:16: */
return openDatabase(tls, filename, ppDb, uint32(flags), zVfs)
}
// Open a new database handle.
-func Xsqlite3_open16(tls *libc.TLS, zFilename uintptr, ppDb uintptr) int32 { /* sqlite3.c:167494:16: */
+func Xsqlite3_open16(tls *libc.TLS, zFilename uintptr, ppDb uintptr) int32 { /* sqlite3.c:168524:16: */
var zFilename8 uintptr // zFilename encoded in UTF-8 instead of UTF-16
var pVal uintptr
var rc int32
@@ -145792,11 +148388,11 @@ func Xsqlite3_open16(tls *libc.TLS, zFilename uintptr, ppDb uintptr) int32 { /*
return rc
}
if zFilename == uintptr(0) {
- zFilename = ts + 22169 /* "\x00\x00" */
+ zFilename = ts + 22629 /* "\x00\x00" */
}
pVal = Xsqlite3ValueNew(tls, uintptr(0))
Xsqlite3ValueSetStr(tls, pVal, -1, zFilename, func() uint8 {
- if int32(*(*int8)(unsafe.Pointer(uintptr(unsafe.Pointer(&Xsqlite3one))))) == 0 {
+ if int32(*(*uint8)(unsafe.Pointer(uintptr(unsafe.Pointer(&Xsqlite3one))))) == 0 {
return uint8(SQLITE_UTF16BE)
}
return uint8(SQLITE_UTF16LE)
@@ -145808,7 +148404,7 @@ func Xsqlite3_open16(tls *libc.TLS, zFilename uintptr, ppDb uintptr) int32 { /*
if (rc == SQLITE_OK) && !((int32((*Schema)(unsafe.Pointer((*Db)(unsafe.Pointer((*Sqlite3)(unsafe.Pointer((*(*uintptr)(unsafe.Pointer(ppDb))))).FaDb)).FpSchema)).FschemaFlags) & (DB_SchemaLoaded)) == (DB_SchemaLoaded)) {
((*Schema)(unsafe.Pointer((*Db)(unsafe.Pointer((*Sqlite3)(unsafe.Pointer((*(*uintptr)(unsafe.Pointer(ppDb))))).FaDb)).FpSchema)).Fenc) = libc.AssignPtrUint8(*(*uintptr)(unsafe.Pointer(ppDb))+96 /* &.enc */, func() uint8 {
- if int32(*(*int8)(unsafe.Pointer(uintptr(unsafe.Pointer(&Xsqlite3one))))) == 0 {
+ if int32(*(*uint8)(unsafe.Pointer(uintptr(unsafe.Pointer(&Xsqlite3one))))) == 0 {
return uint8(SQLITE_UTF16BE)
}
return uint8(SQLITE_UTF16LE)
@@ -145823,12 +148419,12 @@ func Xsqlite3_open16(tls *libc.TLS, zFilename uintptr, ppDb uintptr) int32 { /*
}
// Register a new collation sequence with the database handle db.
-func Xsqlite3_create_collation(tls *libc.TLS, db uintptr, zName uintptr, enc int32, pCtx uintptr, xCompare uintptr) int32 { /* sqlite3.c:167533:16: */
+func Xsqlite3_create_collation(tls *libc.TLS, db uintptr, zName uintptr, enc int32, pCtx uintptr, xCompare uintptr) int32 { /* sqlite3.c:168563:16: */
return Xsqlite3_create_collation_v2(tls, db, zName, enc, pCtx, xCompare, uintptr(0))
}
// Register a new collation sequence with the database handle db.
-func Xsqlite3_create_collation_v2(tls *libc.TLS, db uintptr, zName uintptr, enc int32, pCtx uintptr, xCompare uintptr, xDel uintptr) int32 { /* sqlite3.c:167546:16: */
+func Xsqlite3_create_collation_v2(tls *libc.TLS, db uintptr, zName uintptr, enc int32, pCtx uintptr, xCompare uintptr, xDel uintptr) int32 { /* sqlite3.c:168576:16: */
var rc int32
Xsqlite3_mutex_enter(tls, (*Sqlite3)(unsafe.Pointer(db)).Fmutex)
@@ -145840,14 +148436,14 @@ func Xsqlite3_create_collation_v2(tls *libc.TLS, db uintptr, zName uintptr, enc
}
// Register a new collation sequence with the database handle db.
-func Xsqlite3_create_collation16(tls *libc.TLS, db uintptr, zName uintptr, enc int32, pCtx uintptr, xCompare uintptr) int32 { /* sqlite3.c:167571:16: */
+func Xsqlite3_create_collation16(tls *libc.TLS, db uintptr, zName uintptr, enc int32, pCtx uintptr, xCompare uintptr) int32 { /* sqlite3.c:168601:16: */
var rc int32 = SQLITE_OK
var zName8 uintptr
Xsqlite3_mutex_enter(tls, (*Sqlite3)(unsafe.Pointer(db)).Fmutex)
zName8 = Xsqlite3Utf16to8(tls, db, zName, -1, func() uint8 {
- if int32(*(*int8)(unsafe.Pointer(uintptr(unsafe.Pointer(&Xsqlite3one))))) == 0 {
+ if int32(*(*uint8)(unsafe.Pointer(uintptr(unsafe.Pointer(&Xsqlite3one))))) == 0 {
return uint8(SQLITE_UTF16BE)
}
return uint8(SQLITE_UTF16LE)
@@ -145863,7 +148459,7 @@ func Xsqlite3_create_collation16(tls *libc.TLS, db uintptr, zName uintptr, enc i
// Register a collation sequence factory callback with the database handle
// db. Replace any previously installed collation sequence factory.
-func Xsqlite3_collation_needed(tls *libc.TLS, db uintptr, pCollNeededArg uintptr, xCollNeeded uintptr) int32 { /* sqlite3.c:167601:16: */
+func Xsqlite3_collation_needed(tls *libc.TLS, db uintptr, pCollNeededArg uintptr, xCollNeeded uintptr) int32 { /* sqlite3.c:168631:16: */
Xsqlite3_mutex_enter(tls, (*Sqlite3)(unsafe.Pointer(db)).Fmutex)
(*Sqlite3)(unsafe.Pointer(db)).FxCollNeeded = xCollNeeded
(*Sqlite3)(unsafe.Pointer(db)).FxCollNeeded16 = uintptr(0)
@@ -145874,7 +148470,7 @@ func Xsqlite3_collation_needed(tls *libc.TLS, db uintptr, pCollNeededArg uintptr
// Register a collation sequence factory callback with the database handle
// db. Replace any previously installed collation sequence factory.
-func Xsqlite3_collation_needed16(tls *libc.TLS, db uintptr, pCollNeededArg uintptr, xCollNeeded16 uintptr) int32 { /* sqlite3.c:167622:16: */
+func Xsqlite3_collation_needed16(tls *libc.TLS, db uintptr, pCollNeededArg uintptr, xCollNeeded16 uintptr) int32 { /* sqlite3.c:168652:16: */
Xsqlite3_mutex_enter(tls, (*Sqlite3)(unsafe.Pointer(db)).Fmutex)
(*Sqlite3)(unsafe.Pointer(db)).FxCollNeeded = uintptr(0)
(*Sqlite3)(unsafe.Pointer(db)).FxCollNeeded16 = xCollNeeded16
@@ -145885,7 +148481,7 @@ func Xsqlite3_collation_needed16(tls *libc.TLS, db uintptr, pCollNeededArg uintp
// This function is now an anachronism. It used to be used to recover from a
// malloc() failure, but SQLite now does this automatically.
-func Xsqlite3_global_recover(tls *libc.TLS) int32 { /* sqlite3.c:167644:16: */
+func Xsqlite3_global_recover(tls *libc.TLS) int32 { /* sqlite3.c:168674:16: */
return SQLITE_OK
}
@@ -145893,7 +148489,7 @@ func Xsqlite3_global_recover(tls *libc.TLS) int32 { /* sqlite3.c:167644:16: */
// mode. Return TRUE if it is and FALSE if not. Autocommit mode is on
// by default. Autocommit is disabled by a BEGIN statement and reenabled
// by the next COMMIT or ROLLBACK.
-func Xsqlite3_get_autocommit(tls *libc.TLS, db uintptr) int32 { /* sqlite3.c:167655:16: */
+func Xsqlite3_get_autocommit(tls *libc.TLS, db uintptr) int32 { /* sqlite3.c:168685:16: */
return int32((*Sqlite3)(unsafe.Pointer(db)).FautoCommit)
}
@@ -145906,28 +148502,28 @@ func Xsqlite3_get_autocommit(tls *libc.TLS, db uintptr) int32 { /* sqlite3.c:167
//
// 2. Invoke sqlite3_log() to provide the source code location where
// a low-level error is first detected.
-func Xsqlite3ReportError(tls *libc.TLS, iErr int32, lineno int32, zType uintptr) int32 { /* sqlite3.c:167676:20: */
+func Xsqlite3ReportError(tls *libc.TLS, iErr int32, lineno int32, zType uintptr) int32 { /* sqlite3.c:168706:20: */
bp := tls.Alloc(24)
defer tls.Free(24)
- Xsqlite3_log(tls, iErr, ts+22172, /* "%s at line %d of..." */
+ Xsqlite3_log(tls, iErr, ts+22632, /* "%s at line %d of..." */
libc.VaList(bp, zType, lineno, (uintptr(20)+Xsqlite3_sourceid(tls))))
return iErr
}
-func Xsqlite3CorruptError(tls *libc.TLS, lineno int32) int32 { /* sqlite3.c:167681:20: */
+func Xsqlite3CorruptError(tls *libc.TLS, lineno int32) int32 { /* sqlite3.c:168711:20: */
- return Xsqlite3ReportError(tls, SQLITE_CORRUPT, lineno, ts+22197 /* "database corrupt..." */)
+ return Xsqlite3ReportError(tls, SQLITE_CORRUPT, lineno, ts+22657 /* "database corrupt..." */)
}
-func Xsqlite3MisuseError(tls *libc.TLS, lineno int32) int32 { /* sqlite3.c:167685:20: */
+func Xsqlite3MisuseError(tls *libc.TLS, lineno int32) int32 { /* sqlite3.c:168715:20: */
- return Xsqlite3ReportError(tls, SQLITE_MISUSE, lineno, ts+22217 /* "misuse" */)
+ return Xsqlite3ReportError(tls, SQLITE_MISUSE, lineno, ts+22677 /* "misuse" */)
}
-func Xsqlite3CantopenError(tls *libc.TLS, lineno int32) int32 { /* sqlite3.c:167689:20: */
+func Xsqlite3CantopenError(tls *libc.TLS, lineno int32) int32 { /* sqlite3.c:168719:20: */
- return Xsqlite3ReportError(tls, SQLITE_CANTOPEN, lineno, ts+22224 /* "cannot open file" */)
+ return Xsqlite3ReportError(tls, SQLITE_CANTOPEN, lineno, ts+22684 /* "cannot open file" */)
}
// This is a convenience routine that makes sure that all thread-specific
@@ -145935,12 +148531,12 @@ func Xsqlite3CantopenError(tls *libc.TLS, lineno int32) int32 { /* sqlite3.c:167
//
// SQLite no longer uses thread-specific data so this routine is now a
// no-op. It is retained for historical compatibility.
-func Xsqlite3_thread_cleanup(tls *libc.TLS) { /* sqlite3.c:167720:17: */
+func Xsqlite3_thread_cleanup(tls *libc.TLS) { /* sqlite3.c:168750:17: */
}
// Return meta information about a specific column of a database table.
// See comment in sqlite3.h (sqlite.h.in) for details.
-func Xsqlite3_table_column_metadata(tls *libc.TLS, db uintptr, zDbName uintptr, zTableName uintptr, zColumnName uintptr, pzDataType uintptr, pzCollSeq uintptr, pNotNull uintptr, pPrimaryKey uintptr, pAutoinc uintptr) int32 { /* sqlite3.c:167728:16: */
+func Xsqlite3_table_column_metadata(tls *libc.TLS, db uintptr, zDbName uintptr, zTableName uintptr, zColumnName uintptr, pzDataType uintptr, pzCollSeq uintptr, pNotNull uintptr, pPrimaryKey uintptr, pAutoinc uintptr) int32 { /* sqlite3.c:168758:16: */
bp := tls.Alloc(32)
defer tls.Free(32)
@@ -146054,7 +148650,7 @@ __4:
autoinc = (libc.Bool32((int32((*Table)(unsafe.Pointer(pTab)).FiPKey) == iCol) && (((*Table)(unsafe.Pointer(pTab)).FtabFlags & U32(TF_Autoincrement)) != U32(0))))
goto __13
__12:
- zDataType = ts + 10931 /* "INTEGER" */
+ zDataType = ts + 11384 /* "INTEGER" */
primarykey = 1
__13:
;
@@ -146106,14 +148702,14 @@ __19:
goto __20
}
Xsqlite3DbFree(tls, db, *(*uintptr)(unsafe.Pointer(bp + 24 /* zErrMsg */)))
- *(*uintptr)(unsafe.Pointer(bp + 24 /* zErrMsg */)) = Xsqlite3MPrintf(tls, db, ts+22241 /* "no such table co..." */, libc.VaList(bp, zTableName,
+ *(*uintptr)(unsafe.Pointer(bp + 24 /* zErrMsg */)) = Xsqlite3MPrintf(tls, db, ts+22701 /* "no such table co..." */, libc.VaList(bp, zTableName,
zColumnName))
rc = SQLITE_ERROR
__20:
;
Xsqlite3ErrorWithMsg(tls, db, rc, func() uintptr {
if *(*uintptr)(unsafe.Pointer(bp + 24 /* zErrMsg */)) != 0 {
- return ts + 2718 /* "%s" */
+ return ts + 2790 /* "%s" */
}
return uintptr(0)
}(), libc.VaList(bp+16, *(*uintptr)(unsafe.Pointer(bp + 24 /* zErrMsg */))))
@@ -146124,7 +148720,7 @@ __20:
}
// Sleep for a little while. Return the amount of time slept.
-func Xsqlite3_sleep(tls *libc.TLS, ms int32) int32 { /* sqlite3.c:167846:16: */
+func Xsqlite3_sleep(tls *libc.TLS, ms int32) int32 { /* sqlite3.c:168876:16: */
var pVfs uintptr
var rc int32
pVfs = Xsqlite3_vfs_find(tls, uintptr(0))
@@ -146139,7 +148735,7 @@ func Xsqlite3_sleep(tls *libc.TLS, ms int32) int32 { /* sqlite3.c:167846:16: */
}
// Enable or disable the extended result codes.
-func Xsqlite3_extended_result_codes(tls *libc.TLS, db uintptr, onoff int32) int32 { /* sqlite3.c:167862:16: */
+func Xsqlite3_extended_result_codes(tls *libc.TLS, db uintptr, onoff int32) int32 { /* sqlite3.c:168892:16: */
Xsqlite3_mutex_enter(tls, (*Sqlite3)(unsafe.Pointer(db)).Fmutex)
(*Sqlite3)(unsafe.Pointer(db)).FerrMask = func() int32 {
if onoff != 0 {
@@ -146152,7 +148748,7 @@ func Xsqlite3_extended_result_codes(tls *libc.TLS, db uintptr, onoff int32) int3
}
// Invoke the xFileControl method on a particular database.
-func Xsqlite3_file_control(tls *libc.TLS, db uintptr, zDbName uintptr, op int32, pArg uintptr) int32 { /* sqlite3.c:167875:16: */
+func Xsqlite3_file_control(tls *libc.TLS, db uintptr, zDbName uintptr, op int32, pArg uintptr) int32 { /* sqlite3.c:168905:16: */
var rc int32 = SQLITE_ERROR
var pBtree uintptr
@@ -146197,7 +148793,7 @@ func Xsqlite3_file_control(tls *libc.TLS, db uintptr, zDbName uintptr, op int32,
}
// Interface to the testing logic.
-func Xsqlite3_test_control(tls *libc.TLS, op int32, va uintptr) int32 { /* sqlite3.c:167925:16: */
+func Xsqlite3_test_control(tls *libc.TLS, op int32, va uintptr) int32 { /* sqlite3.c:168955:16: */
var rc int32 = 0
var ap Va_list
_ = ap
@@ -146340,7 +148936,7 @@ func Xsqlite3_test_control(tls *libc.TLS, op int32, va uintptr) int32 { /* sqlit
{
var x int32 = 0
- rc = libc.AtomicLoadInt32(&x)
+ rc = x
break
}
@@ -146393,7 +148989,7 @@ func Xsqlite3_test_control(tls *libc.TLS, op int32, va uintptr) int32 { /* sqlit
// 123410 little-endian, determined at compile-time
case SQLITE_TESTCTRL_BYTEORDER:
{
- rc = (((SQLITE_BYTEORDER * 100) + ((libc.Bool32(int32(*(*int8)(unsafe.Pointer(uintptr(unsafe.Pointer(&Xsqlite3one))))) == 1)) * 10)) + (libc.Bool32(int32(*(*int8)(unsafe.Pointer(uintptr(unsafe.Pointer(&Xsqlite3one))))) == 0)))
+ rc = (((SQLITE_BYTEORDER * 100) + ((libc.Bool32(int32(*(*uint8)(unsafe.Pointer(uintptr(unsafe.Pointer(&Xsqlite3one))))) == 1)) * 10)) + (libc.Bool32(int32(*(*uint8)(unsafe.Pointer(uintptr(unsafe.Pointer(&Xsqlite3one))))) == 0)))
break
}
@@ -146532,7 +149128,7 @@ func Xsqlite3_test_control(tls *libc.TLS, op int32, va uintptr) int32 { /* sqlit
var db uintptr = libc.VaUintptr(&ap)
Xsqlite3_mutex_enter(tls, (*Sqlite3)(unsafe.Pointer(db)).Fmutex)
(*Sqlite3)(unsafe.Pointer(db)).Finit.FiDb = U8(Xsqlite3FindDbName(tls, db, libc.VaUintptr(&ap)))
- (*Sqlite3)(unsafe.Pointer(db)).Finit.Fbusy = U8(libc.AssignBitFieldPtr8Uint32(db+184 /* &.init */ +8 /* &.imposterTable */, uint32(libc.VaInt32(&ap)), 1, 1, 0x2))
+ (*Sqlite3)(unsafe.Pointer(db)).Finit.Fbusy = U8(libc.AssignBitFieldPtr8Uint32(db+184 /* &.init */ +8 /* &.imposterTable */, uint32(libc.VaInt32(&ap)), 1, 6, 0x40))
(*Sqlite3)(unsafe.Pointer(db)).Finit.FnewTnum = Pgno(libc.VaInt32(&ap))
if (int32((*Sqlite3)(unsafe.Pointer(db)).Finit.Fbusy) == 0) && ((*Sqlite3)(unsafe.Pointer(db)).Finit.FnewTnum > Pgno(0)) {
Xsqlite3ResetAllSchemasOfConnection(tls, db)
@@ -146607,6 +149203,7 @@ func Xsqlite3_test_control(tls *libc.TLS, op int32, va uintptr) int32 { /* sqlit
break
}
+
}
_ = ap
return rc
@@ -146618,8 +149215,8 @@ func Xsqlite3_test_control(tls *libc.TLS, op int32, va uintptr) int32 { /* sqlit
// backwards for the first byte following four consecutive zero bytes.
//
// This only works if the filename passed in was obtained from the Pager.
-func databaseName(tls *libc.TLS, zName uintptr) uintptr { /* sqlite3.c:168349:19: */
- for (((int32(*(*int8)(unsafe.Pointer(zName + libc.UintptrFromInt32(-1)))) != 0) || (int32(*(*int8)(unsafe.Pointer(zName + libc.UintptrFromInt32(-2)))) != 0)) || (int32(*(*int8)(unsafe.Pointer(zName + libc.UintptrFromInt32(-3)))) != 0)) || (int32(*(*int8)(unsafe.Pointer(zName + libc.UintptrFromInt32(-4)))) != 0) {
+func databaseName(tls *libc.TLS, zName uintptr) uintptr { /* sqlite3.c:169409:19: */
+ for (((int32(*(*uint8)(unsafe.Pointer(zName + libc.UintptrFromInt32(-1)))) != 0) || (int32(*(*uint8)(unsafe.Pointer(zName + libc.UintptrFromInt32(-2)))) != 0)) || (int32(*(*uint8)(unsafe.Pointer(zName + libc.UintptrFromInt32(-3)))) != 0)) || (int32(*(*uint8)(unsafe.Pointer(zName + libc.UintptrFromInt32(-4)))) != 0) {
zName--
}
return zName
@@ -146627,7 +149224,7 @@ func databaseName(tls *libc.TLS, zName uintptr) uintptr { /* sqlite3.c:168349:19
// Append text z[] to the end of p[]. Return a pointer to the first
// character after then zero terminator on the new text in p[].
-func appendText(tls *libc.TLS, p uintptr, z uintptr) uintptr { /* sqlite3.c:168360:13: */
+func appendText(tls *libc.TLS, p uintptr, z uintptr) uintptr { /* sqlite3.c:169420:13: */
var n Size_t = libc.Xstrlen(tls, z)
libc.Xmemcpy(tls, p, z, (n + uint64(1)))
return ((p + uintptr(n)) + uintptr(1))
@@ -146640,7 +149237,7 @@ func appendText(tls *libc.TLS, p uintptr, z uintptr) uintptr { /* sqlite3.c:1683
//
// Memory layout must be compatible with that generated by the pager
// and expected by sqlite3_uri_parameter() and databaseName().
-func Xsqlite3_create_filename(tls *libc.TLS, zDatabase uintptr, zJournal uintptr, zWal uintptr, nParam int32, azParam uintptr) uintptr { /* sqlite3.c:168375:17: */
+func Xsqlite3_create_filename(tls *libc.TLS, zDatabase uintptr, zJournal uintptr, zWal uintptr, nParam int32, azParam uintptr) uintptr { /* sqlite3.c:169435:17: */
var nByte Sqlite3_int64
var i int32
var pResult uintptr
@@ -146659,11 +149256,11 @@ func Xsqlite3_create_filename(tls *libc.TLS, zDatabase uintptr, zJournal uintptr
for i = 0; i < (nParam * 2); i++ {
p = appendText(tls, p, *(*uintptr)(unsafe.Pointer(azParam + uintptr(i)*8)))
}
- *(*int8)(unsafe.Pointer(libc.PostIncUintptr(&p, 1))) = int8(0)
+ *(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&p, 1))) = uint8(0)
p = appendText(tls, p, zJournal)
p = appendText(tls, p, zWal)
- *(*int8)(unsafe.Pointer(libc.PostIncUintptr(&p, 1))) = int8(0)
- *(*int8)(unsafe.Pointer(libc.PostIncUintptr(&p, 1))) = int8(0)
+ *(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&p, 1))) = uint8(0)
+ *(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&p, 1))) = uint8(0)
return (pResult + uintptr(4))
}
@@ -146671,7 +149268,7 @@ func Xsqlite3_create_filename(tls *libc.TLS, zDatabase uintptr, zJournal uintptr
// Free memory obtained from sqlite3_create_filename(). It is a severe
// error to call this routine with any parameter other than a pointer
// previously obtained from sqlite3_create_filename() or a NULL pointer.
-func Xsqlite3_free_filename(tls *libc.TLS, p uintptr) { /* sqlite3.c:168411:17: */
+func Xsqlite3_free_filename(tls *libc.TLS, p uintptr) { /* sqlite3.c:169471:17: */
if p == uintptr(0) {
return
}
@@ -146688,7 +149285,7 @@ func Xsqlite3_free_filename(tls *libc.TLS, p uintptr) { /* sqlite3.c:168411:17:
// query parameter we seek. This routine returns the value of the zParam
// parameter if it exists. If the parameter does not exist, this routine
// returns a NULL pointer.
-func Xsqlite3_uri_parameter(tls *libc.TLS, zFilename uintptr, zParam uintptr) uintptr { /* sqlite3.c:168429:23: */
+func Xsqlite3_uri_parameter(tls *libc.TLS, zFilename uintptr, zParam uintptr) uintptr { /* sqlite3.c:169489:23: */
if (zFilename == uintptr(0)) || (zParam == uintptr(0)) {
return uintptr(0)
}
@@ -146697,24 +149294,24 @@ func Xsqlite3_uri_parameter(tls *libc.TLS, zFilename uintptr, zParam uintptr) ui
}
// Return a pointer to the name of Nth query parameter of the filename.
-func Xsqlite3_uri_key(tls *libc.TLS, zFilename uintptr, N int32) uintptr { /* sqlite3.c:168438:23: */
+func Xsqlite3_uri_key(tls *libc.TLS, zFilename uintptr, N int32) uintptr { /* sqlite3.c:169498:23: */
if (zFilename == uintptr(0)) || (N < 0) {
return uintptr(0)
}
zFilename = databaseName(tls, zFilename)
zFilename += (uintptr(Xsqlite3Strlen30(tls, zFilename) + 1))
- for (*(*int8)(unsafe.Pointer(zFilename)) != 0) && ((libc.PostDecInt32(&N, 1)) > 0) {
+ for (*(*uint8)(unsafe.Pointer(zFilename)) != 0) && ((libc.PostDecInt32(&N, 1)) > 0) {
zFilename += (uintptr(Xsqlite3Strlen30(tls, zFilename) + 1))
zFilename += (uintptr(Xsqlite3Strlen30(tls, zFilename) + 1))
}
- if *(*int8)(unsafe.Pointer(zFilename)) != 0 {
+ if *(*uint8)(unsafe.Pointer(zFilename)) != 0 {
return zFilename
}
return uintptr(0)
}
// Return a boolean value for a query parameter.
-func Xsqlite3_uri_boolean(tls *libc.TLS, zFilename uintptr, zParam uintptr, bDflt int32) int32 { /* sqlite3.c:168452:16: */
+func Xsqlite3_uri_boolean(tls *libc.TLS, zFilename uintptr, zParam uintptr, bDflt int32) int32 { /* sqlite3.c:169512:16: */
var z uintptr = Xsqlite3_uri_parameter(tls, zFilename, zParam)
bDflt = (libc.Bool32(bDflt != 0))
if z != 0 {
@@ -146724,7 +149321,7 @@ func Xsqlite3_uri_boolean(tls *libc.TLS, zFilename uintptr, zParam uintptr, bDfl
}
// Return a 64-bit integer value for a query parameter.
-func Xsqlite3_uri_int64(tls *libc.TLS, zFilename uintptr, zParam uintptr, bDflt Sqlite3_int64) Sqlite3_int64 { /* sqlite3.c:168461:26: */
+func Xsqlite3_uri_int64(tls *libc.TLS, zFilename uintptr, zParam uintptr, bDflt Sqlite3_int64) Sqlite3_int64 { /* sqlite3.c:169521:26: */
bp := tls.Alloc(8)
defer tls.Free(8)
@@ -146745,28 +149342,28 @@ func Xsqlite3_uri_int64(tls *libc.TLS, zFilename uintptr, zParam uintptr, bDflt
// passing free() a pointer that was not obtained from malloc() - it is
// an error that we cannot easily detect but that will likely cause memory
// corruption.
-func Xsqlite3_filename_database(tls *libc.TLS, zFilename uintptr) uintptr { /* sqlite3.c:168484:23: */
+func Xsqlite3_filename_database(tls *libc.TLS, zFilename uintptr) uintptr { /* sqlite3.c:169544:23: */
return databaseName(tls, zFilename)
}
-func Xsqlite3_filename_journal(tls *libc.TLS, zFilename uintptr) uintptr { /* sqlite3.c:168487:23: */
+func Xsqlite3_filename_journal(tls *libc.TLS, zFilename uintptr) uintptr { /* sqlite3.c:169547:23: */
zFilename = databaseName(tls, zFilename)
zFilename += (uintptr(Xsqlite3Strlen30(tls, zFilename) + 1))
- for *(*int8)(unsafe.Pointer(zFilename)) != 0 {
+ for *(*uint8)(unsafe.Pointer(zFilename)) != 0 {
zFilename += (uintptr(Xsqlite3Strlen30(tls, zFilename) + 1))
zFilename += (uintptr(Xsqlite3Strlen30(tls, zFilename) + 1))
}
return (zFilename + uintptr(1))
}
-func Xsqlite3_filename_wal(tls *libc.TLS, zFilename uintptr) uintptr { /* sqlite3.c:168496:23: */
+func Xsqlite3_filename_wal(tls *libc.TLS, zFilename uintptr) uintptr { /* sqlite3.c:169556:23: */
zFilename = Xsqlite3_filename_journal(tls, zFilename)
zFilename += (uintptr(Xsqlite3Strlen30(tls, zFilename) + 1))
return zFilename
}
// Return the Btree pointer identified by zDbName. Return NULL if not found.
-func Xsqlite3DbNameToBtree(tls *libc.TLS, db uintptr, zDbName uintptr) uintptr { /* sqlite3.c:168509:22: */
+func Xsqlite3DbNameToBtree(tls *libc.TLS, db uintptr, zDbName uintptr) uintptr { /* sqlite3.c:169569:22: */
var iDb int32
if zDbName != 0 {
iDb = Xsqlite3FindDbName(tls, db, zDbName)
@@ -146781,7 +149378,7 @@ func Xsqlite3DbNameToBtree(tls *libc.TLS, db uintptr, zDbName uintptr) uintptr {
// Return the filename of the database associated with a database
// connection.
-func Xsqlite3_db_filename(tls *libc.TLS, db uintptr, zDbName uintptr) uintptr { /* sqlite3.c:168518:23: */
+func Xsqlite3_db_filename(tls *libc.TLS, db uintptr, zDbName uintptr) uintptr { /* sqlite3.c:169578:23: */
var pBt uintptr
pBt = Xsqlite3DbNameToBtree(tls, db, zDbName)
if pBt != 0 {
@@ -146792,7 +149389,7 @@ func Xsqlite3_db_filename(tls *libc.TLS, db uintptr, zDbName uintptr) uintptr {
// Return 1 if database is read-only or 0 if read/write. Return -1 if
// no such database exists.
-func Xsqlite3_db_readonly(tls *libc.TLS, db uintptr, zDbName uintptr) int32 { /* sqlite3.c:168534:16: */
+func Xsqlite3_db_readonly(tls *libc.TLS, db uintptr, zDbName uintptr) int32 { /* sqlite3.c:169594:16: */
var pBt uintptr
pBt = Xsqlite3DbNameToBtree(tls, db, zDbName)
if pBt != 0 {
@@ -146803,7 +149400,7 @@ func Xsqlite3_db_readonly(tls *libc.TLS, db uintptr, zDbName uintptr) int32 { /*
// Obtain a snapshot handle for the snapshot of database zDb currently
// being read by handle db.
-func Xsqlite3_snapshot_get(tls *libc.TLS, db uintptr, zDb uintptr, ppSnapshot uintptr) int32 { /* sqlite3.c:168551:16: */
+func Xsqlite3_snapshot_get(tls *libc.TLS, db uintptr, zDb uintptr, ppSnapshot uintptr) int32 { /* sqlite3.c:169611:16: */
var rc int32 = SQLITE_ERROR
Xsqlite3_mutex_enter(tls, (*Sqlite3)(unsafe.Pointer(db)).Fmutex)
@@ -146826,7 +149423,7 @@ func Xsqlite3_snapshot_get(tls *libc.TLS, db uintptr, zDb uintptr, ppSnapshot ui
}
// Open a read-transaction on the snapshot idendified by pSnapshot.
-func Xsqlite3_snapshot_open(tls *libc.TLS, db uintptr, zDb uintptr, pSnapshot uintptr) int32 { /* sqlite3.c:168587:16: */
+func Xsqlite3_snapshot_open(tls *libc.TLS, db uintptr, zDb uintptr, pSnapshot uintptr) int32 { /* sqlite3.c:169647:16: */
var rc int32 = SQLITE_ERROR
Xsqlite3_mutex_enter(tls, (*Sqlite3)(unsafe.Pointer(db)).Fmutex)
@@ -146869,7 +149466,7 @@ func Xsqlite3_snapshot_open(tls *libc.TLS, db uintptr, zDb uintptr, pSnapshot ui
// Recover as many snapshots as possible from the wal file associated with
// schema zDb of database db.
-func Xsqlite3_snapshot_recover(tls *libc.TLS, db uintptr, zDb uintptr) int32 { /* sqlite3.c:168643:16: */
+func Xsqlite3_snapshot_recover(tls *libc.TLS, db uintptr, zDb uintptr) int32 { /* sqlite3.c:169703:16: */
var rc int32 = SQLITE_ERROR
var iDb int32
@@ -146890,7 +149487,7 @@ func Xsqlite3_snapshot_recover(tls *libc.TLS, db uintptr, zDb uintptr) int32 { /
}
// Free a snapshot handle obtained from sqlite3_snapshot_get().
-func Xsqlite3_snapshot_free(tls *libc.TLS, pSnapshot uintptr) { /* sqlite3.c:168674:17: */
+func Xsqlite3_snapshot_free(tls *libc.TLS, pSnapshot uintptr) { /* sqlite3.c:169734:17: */
Xsqlite3_free(tls, pSnapshot)
}
@@ -146899,7 +149496,7 @@ func Xsqlite3_snapshot_free(tls *libc.TLS, pSnapshot uintptr) { /* sqlite3.c:168
//
// The name can optionally begin with "SQLITE_" but the "SQLITE_" prefix
// is not required for a match.
-func Xsqlite3_compileoption_used(tls *libc.TLS, zOptName uintptr) int32 { /* sqlite3.c:168687:16: */
+func Xsqlite3_compileoption_used(tls *libc.TLS, zOptName uintptr) int32 { /* sqlite3.c:169747:16: */
bp := tls.Alloc(4)
defer tls.Free(4)
@@ -146911,7 +149508,7 @@ func Xsqlite3_compileoption_used(tls *libc.TLS, zOptName uintptr) int32 { /* sql
azCompileOpt = Xsqlite3CompileOptions(tls, bp /* &nOpt */)
- if Xsqlite3_strnicmp(tls, zOptName, ts+22269 /* "SQLITE_" */, 7) == 0 {
+ if Xsqlite3_strnicmp(tls, zOptName, ts+22729 /* "SQLITE_" */, 7) == 0 {
zOptName += uintptr(7)
}
n = Xsqlite3Strlen30(tls, zOptName)
@@ -146920,7 +149517,7 @@ func Xsqlite3_compileoption_used(tls *libc.TLS, zOptName uintptr) int32 { /* sql
// adequate. No need for a binary search.
for i = 0; i < *(*int32)(unsafe.Pointer(bp /* nOpt */)); i++ {
if (Xsqlite3_strnicmp(tls, zOptName, *(*uintptr)(unsafe.Pointer(azCompileOpt + uintptr(i)*8)), n) == 0) &&
- (Xsqlite3IsIdChar(tls, uint8(*(*int8)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(azCompileOpt + uintptr(i)*8)) + uintptr(n))))) == 0) {
+ (Xsqlite3IsIdChar(tls, uint8(*(*uint8)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(azCompileOpt + uintptr(i)*8)) + uintptr(n))))) == 0) {
return 1
}
}
@@ -146929,7 +149526,7 @@ func Xsqlite3_compileoption_used(tls *libc.TLS, zOptName uintptr) int32 { /* sql
// Return the N-th compile-time option string. If N is out of range,
// return a NULL pointer.
-func Xsqlite3_compileoption_get(tls *libc.TLS, N int32) uintptr { /* sqlite3.c:168720:23: */
+func Xsqlite3_compileoption_get(tls *libc.TLS, N int32) uintptr { /* sqlite3.c:169780:23: */
bp := tls.Alloc(4)
defer tls.Free(4)
@@ -146974,11 +149571,11 @@ func Xsqlite3_compileoption_get(tls *libc.TLS, N int32) uintptr { /* sqlite3.c:1
// for which either sqlite3.pBlockingConnection or sqlite3.pUnlockConnection
// is not NULL. This variable may only accessed while the STATIC_MAIN
// mutex is held.
-var sqlite3BlockedList uintptr = uintptr(0) /* sqlite3.c:168772:16 */
+var sqlite3BlockedList uintptr = uintptr(0) /* sqlite3.c:169832:16 */
// Remove connection db from the blocked connections list. If connection
// db is not currently a part of the list, this function is a no-op.
-func removeFromBlockedList(tls *libc.TLS, db uintptr) { /* sqlite3.c:168815:13: */
+func removeFromBlockedList(tls *libc.TLS, db uintptr) { /* sqlite3.c:169875:13: */
var pp uintptr
for pp = uintptr(unsafe.Pointer(&sqlite3BlockedList)); *(*uintptr)(unsafe.Pointer(pp)) != 0; pp = (*(*uintptr)(unsafe.Pointer(pp)) + 800 /* &.pNextBlocked */) {
@@ -146991,7 +149588,7 @@ func removeFromBlockedList(tls *libc.TLS, db uintptr) { /* sqlite3.c:168815:13:
// Add connection db to the blocked connections list. It is assumed
// that it is not already a part of the list.
-func addToBlockedList(tls *libc.TLS, db uintptr) { /* sqlite3.c:168830:13: */
+func addToBlockedList(tls *libc.TLS, db uintptr) { /* sqlite3.c:169890:13: */
var pp uintptr
for pp = uintptr(unsafe.Pointer(&sqlite3BlockedList)); (*(*uintptr)(unsafe.Pointer(pp)) != 0) && ((*Sqlite3)(unsafe.Pointer((*(*uintptr)(unsafe.Pointer(pp))))).FxUnlockNotify != (*Sqlite3)(unsafe.Pointer(db)).FxUnlockNotify); pp = (*(*uintptr)(unsafe.Pointer(pp)) + 800 /* &.pNextBlocked */) {
@@ -147001,13 +149598,13 @@ func addToBlockedList(tls *libc.TLS, db uintptr) { /* sqlite3.c:168830:13: */
}
// Obtain the STATIC_MAIN mutex.
-func enterMutex(tls *libc.TLS) { /* sqlite3.c:168845:13: */
+func enterMutex(tls *libc.TLS) { /* sqlite3.c:169905:13: */
Xsqlite3_mutex_enter(tls, Xsqlite3MutexAlloc(tls, SQLITE_MUTEX_STATIC_MAIN))
}
// Release the STATIC_MAIN mutex.
-func leaveMutex(tls *libc.TLS) { /* sqlite3.c:168853:13: */
+func leaveMutex(tls *libc.TLS) { /* sqlite3.c:169913:13: */
Xsqlite3_mutex_leave(tls, Xsqlite3MutexAlloc(tls, SQLITE_MUTEX_STATIC_MAIN))
}
@@ -147031,7 +149628,7 @@ func leaveMutex(tls *libc.TLS) { /* sqlite3.c:168853:13: */
// Each call to this routine overrides any prior callbacks registered
// on the same "db". If xNotify==0 then any prior callbacks are immediately
// cancelled.
-func Xsqlite3_unlock_notify(tls *libc.TLS, db uintptr, xNotify uintptr, pArg uintptr) int32 { /* sqlite3.c:168880:16: */
+func Xsqlite3_unlock_notify(tls *libc.TLS, db uintptr, xNotify uintptr, pArg uintptr) int32 { /* sqlite3.c:169940:16: */
bp := tls.Alloc(8)
defer tls.Free(8)
*(*uintptr)(unsafe.Pointer(bp)) = pArg
@@ -147051,7 +149648,9 @@ func Xsqlite3_unlock_notify(tls *libc.TLS, db uintptr, xNotify uintptr, pArg uin
// The blocking transaction has been concluded. Or there never was a
// blocking transaction. In either case, invoke the notify callback
// immediately.
- (*(*func(*libc.TLS, uintptr, int32))(unsafe.Pointer(&xNotify)))(tls, bp /* &pArg */, 1)
+ (*struct {
+ f func(*libc.TLS, uintptr, int32)
+ })(unsafe.Pointer(&struct{ uintptr }{xNotify})).f(tls, bp /* &pArg */, 1)
} else {
var p uintptr
@@ -147072,7 +149671,7 @@ func Xsqlite3_unlock_notify(tls *libc.TLS, db uintptr, xNotify uintptr, pArg uin
Xsqlite3ErrorWithMsg(tls, db, rc, func() uintptr {
if rc != 0 {
- return ts + 22277 /* "database is dead..." */
+ return ts + 22737 /* "database is dead..." */
}
return uintptr(0)
}(), 0)
@@ -147084,7 +149683,7 @@ func Xsqlite3_unlock_notify(tls *libc.TLS, db uintptr, xNotify uintptr, pArg uin
// associated with connection db. The operation will return SQLITE_LOCKED
// to the user because it requires a lock that will not be available
// until connection pBlocker concludes its current transaction.
-func Xsqlite3ConnectionBlocked(tls *libc.TLS, db uintptr, pBlocker uintptr) { /* sqlite3.c:168930:21: */
+func Xsqlite3ConnectionBlocked(tls *libc.TLS, db uintptr, pBlocker uintptr) { /* sqlite3.c:169990:21: */
enterMutex(tls)
if ((*Sqlite3)(unsafe.Pointer(db)).FpBlockingConnection == uintptr(0)) && ((*Sqlite3)(unsafe.Pointer(db)).FpUnlockConnection == uintptr(0)) {
addToBlockedList(tls, db)
@@ -147110,7 +149709,7 @@ func Xsqlite3ConnectionBlocked(tls *libc.TLS, db uintptr, pBlocker uintptr) { /*
// 3) If the two steps above mean that pBlockingConnection==0 and
// pUnlockConnection==0, remove the entry from the blocked connections
// list.
-func Xsqlite3ConnectionUnlocked(tls *libc.TLS, db uintptr) { /* sqlite3.c:168958:21: */
+func Xsqlite3ConnectionUnlocked(tls *libc.TLS, db uintptr) { /* sqlite3.c:170018:21: */
bp := tls.Alloc(128)
defer tls.Free(128)
@@ -147138,7 +149737,9 @@ func Xsqlite3ConnectionUnlocked(tls *libc.TLS, db uintptr) { /* sqlite3.c:168958
if (*Sqlite3)(unsafe.Pointer(p)).FpUnlockConnection == db {
if ((*Sqlite3)(unsafe.Pointer(p)).FxUnlockNotify != xUnlockNotify) && (nArg != 0) {
- (*(*func(*libc.TLS, uintptr, int32))(unsafe.Pointer(&xUnlockNotify)))(tls, aArg, nArg)
+ (*struct {
+ f func(*libc.TLS, uintptr, int32)
+ })(unsafe.Pointer(&struct{ uintptr }{xUnlockNotify})).f(tls, aArg, nArg)
nArg = 0
}
@@ -147176,7 +149777,9 @@ func Xsqlite3ConnectionUnlocked(tls *libc.TLS, db uintptr) { /* sqlite3.c:168958
// reduce the applications ability to prioritize multiple
// connections. But it is the best that can be done under the
// circumstances.
- (*(*func(*libc.TLS, uintptr, int32))(unsafe.Pointer(&xUnlockNotify)))(tls, aArg, nArg)
+ (*struct {
+ f func(*libc.TLS, uintptr, int32)
+ })(unsafe.Pointer(&struct{ uintptr }{xUnlockNotify})).f(tls, aArg, nArg)
nArg = 0
}
}
@@ -147200,7 +149803,9 @@ func Xsqlite3ConnectionUnlocked(tls *libc.TLS, db uintptr) { /* sqlite3.c:168958
}
if nArg != 0 {
- (*(*func(*libc.TLS, uintptr, int32))(unsafe.Pointer(&xUnlockNotify)))(tls, aArg, nArg)
+ (*struct {
+ f func(*libc.TLS, uintptr, int32)
+ })(unsafe.Pointer(&struct{ uintptr }{xUnlockNotify})).f(tls, aArg, nArg)
}
Xsqlite3_free(tls, aDyn)
leaveMutex(tls) // Leave STATIC_MAIN mutex
@@ -147208,7 +149813,7 @@ func Xsqlite3ConnectionUnlocked(tls *libc.TLS, db uintptr) { /* sqlite3.c:168958
// This is called when the database connection passed as an argument is
// being closed. The connection is removed from the blocked list.
-func Xsqlite3ConnectionClosed(tls *libc.TLS, db uintptr) { /* sqlite3.c:169057:21: */
+func Xsqlite3ConnectionClosed(tls *libc.TLS, db uintptr) { /* sqlite3.c:170117:21: */
Xsqlite3ConnectionUnlocked(tls, db)
enterMutex(tls)
removeFromBlockedList(tls, db)
@@ -147808,63 +150413,63 @@ func Xsqlite3ConnectionClosed(tls *libc.TLS, db uintptr) { /* sqlite3.c:169057:2
// Growing our own isspace() routine this way is twice as fast as
// the library isspace() function, resulting in a 7% overall performance
// increase for the parser. (Ubuntu14.10 gcc 4.8.4 x64 with -Os).
-var jsonIsSpace = [256]int8{
- int8(0), int8(0), int8(0), int8(0), int8(0), int8(0), int8(0), int8(0), int8(0), int8(1), int8(1), int8(0), int8(0), int8(1), int8(0), int8(0),
- int8(0), int8(0), int8(0), int8(0), int8(0), int8(0), int8(0), int8(0), int8(0), int8(0), int8(0), int8(0), int8(0), int8(0), int8(0), int8(0),
- int8(1), int8(0), int8(0), int8(0), int8(0), int8(0), int8(0), int8(0), int8(0), int8(0), int8(0), int8(0), int8(0), int8(0), int8(0), int8(0),
- int8(0), int8(0), int8(0), int8(0), int8(0), int8(0), int8(0), int8(0), int8(0), int8(0), int8(0), int8(0), int8(0), int8(0), int8(0), int8(0),
- int8(0), int8(0), int8(0), int8(0), int8(0), int8(0), int8(0), int8(0), int8(0), int8(0), int8(0), int8(0), int8(0), int8(0), int8(0), int8(0),
- int8(0), int8(0), int8(0), int8(0), int8(0), int8(0), int8(0), int8(0), int8(0), int8(0), int8(0), int8(0), int8(0), int8(0), int8(0), int8(0),
- int8(0), int8(0), int8(0), int8(0), int8(0), int8(0), int8(0), int8(0), int8(0), int8(0), int8(0), int8(0), int8(0), int8(0), int8(0), int8(0),
- int8(0), int8(0), int8(0), int8(0), int8(0), int8(0), int8(0), int8(0), int8(0), int8(0), int8(0), int8(0), int8(0), int8(0), int8(0), int8(0),
- int8(0), int8(0), int8(0), int8(0), int8(0), int8(0), int8(0), int8(0), int8(0), int8(0), int8(0), int8(0), int8(0), int8(0), int8(0), int8(0),
- int8(0), int8(0), int8(0), int8(0), int8(0), int8(0), int8(0), int8(0), int8(0), int8(0), int8(0), int8(0), int8(0), int8(0), int8(0), int8(0),
- int8(0), int8(0), int8(0), int8(0), int8(0), int8(0), int8(0), int8(0), int8(0), int8(0), int8(0), int8(0), int8(0), int8(0), int8(0), int8(0),
- int8(0), int8(0), int8(0), int8(0), int8(0), int8(0), int8(0), int8(0), int8(0), int8(0), int8(0), int8(0), int8(0), int8(0), int8(0), int8(0),
- int8(0), int8(0), int8(0), int8(0), int8(0), int8(0), int8(0), int8(0), int8(0), int8(0), int8(0), int8(0), int8(0), int8(0), int8(0), int8(0),
- int8(0), int8(0), int8(0), int8(0), int8(0), int8(0), int8(0), int8(0), int8(0), int8(0), int8(0), int8(0), int8(0), int8(0), int8(0), int8(0),
- int8(0), int8(0), int8(0), int8(0), int8(0), int8(0), int8(0), int8(0), int8(0), int8(0), int8(0), int8(0), int8(0), int8(0), int8(0), int8(0),
- int8(0), int8(0), int8(0), int8(0), int8(0), int8(0), int8(0), int8(0), int8(0), int8(0), int8(0), int8(0), int8(0), int8(0), int8(0), int8(0),
-} /* sqlite3.c:188634:19 */
+var jsonIsSpace = [256]uint8{
+ uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(1), uint8(1), uint8(0), uint8(0), uint8(1), uint8(0), uint8(0),
+ uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0),
+ uint8(1), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0),
+ uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0),
+ uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0),
+ uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0),
+ uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0),
+ uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0),
+ uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0),
+ uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0),
+ uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0),
+ uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0),
+ uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0),
+ uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0),
+ uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0),
+ uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0),
+} /* sqlite3.c:189706:19 */
// Objects
type JsonString1 = struct {
- FpCtx uintptr
- FzBuf uintptr
- FnAlloc U64
- FnUsed U64
- FbStatic U8
- FbErr U8
- FzSpace [100]int8
- _ [2]byte
-} /* sqlite3.c:188664:9 */
+ FpCtx uintptr
+ FzBuf uintptr
+ FnAlloc U64
+ FnUsed U64
+ FbStatic U8
+ FbErr U8
+ FzSpace [100]uint8
+ F__ccgo_pad1 [2]byte
+} /* sqlite3.c:189736:9 */
// Objects
-type JsonString = JsonString1 /* sqlite3.c:188664:27 */
+type JsonString = JsonString1 /* sqlite3.c:189736:27 */
type JsonNode1 = struct {
- FeType U8
- FjnFlags U8
- _ [2]byte
- Fn U32
- Fu struct{ FzJContent uintptr }
-} /* sqlite3.c:188665:9 */
-
-type JsonNode = JsonNode1 /* sqlite3.c:188665:25 */
+ FeType U8
+ FjnFlags U8
+ F__ccgo_pad1 [2]byte
+ Fn U32
+ Fu struct{ FzJContent uintptr }
+} /* sqlite3.c:189737:9 */
+
+type JsonNode = JsonNode1 /* sqlite3.c:189737:25 */
type JsonParse1 = struct {
- FnNode U32
- FnAlloc U32
- FaNode uintptr
- FzJson uintptr
- FaUp uintptr
- Foom U8
- FnErr U8
- FiDepth U16
- FnJson int32
- FiHold U32
- _ [4]byte
-} /* sqlite3.c:188666:9 */
-
-type JsonParse = JsonParse1 /* sqlite3.c:188666:26 */
+ FnNode U32
+ FnAlloc U32
+ FaNode uintptr
+ FzJson uintptr
+ FaUp uintptr
+ Foom U8
+ FnErr U8
+ FiDepth U16
+ FnJson int32
+ FiHold U32
+ F__ccgo_pad1 [4]byte
+} /* sqlite3.c:189738:9 */
+
+type JsonParse = JsonParse1 /* sqlite3.c:189738:26 */
// JSON type values
@@ -147872,8 +150477,8 @@ type JsonParse = JsonParse1 /* sqlite3.c:188666:26 */
// Names of the various JSON types:
var jsonType = [8]uintptr{
- ts + 5127 /* "null" */, ts + 5639 /* "true" */, ts + 5644 /* "false" */, ts + 5137 /* "integer" */, ts + 5132 /* "real" */, ts + 13070 /* "text" */, ts + 22300 /* "array" */, ts + 22306, /* "object" */
-} /* sqlite3.c:188699:19 */
+ ts + 5258 /* "null" */, ts + 5770 /* "true" */, ts + 5775 /* "false" */, ts + 5268 /* "integer" */, ts + 5263 /* "real" */, ts + 13523 /* "text" */, ts + 22760 /* "array" */, ts + 22766, /* "object" */
+} /* sqlite3.c:189771:19 */
// Maximum nesting depth of JSON for this implementation.
//
@@ -147887,15 +150492,15 @@ var jsonType = [8]uintptr{
//
// Set the JsonString object to an empty string
-func jsonZero(tls *libc.TLS, p uintptr) { /* sqlite3.c:188759:13: */
+func jsonZero(tls *libc.TLS, p uintptr) { /* sqlite3.c:189831:13: */
(*JsonString)(unsafe.Pointer(p)).FzBuf = p + 34 /* &.zSpace */
- (*JsonString)(unsafe.Pointer(p)).FnAlloc = U64(unsafe.Sizeof([100]int8{}))
+ (*JsonString)(unsafe.Pointer(p)).FnAlloc = U64(unsafe.Sizeof([100]uint8{}))
(*JsonString)(unsafe.Pointer(p)).FnUsed = uint64(0)
(*JsonString)(unsafe.Pointer(p)).FbStatic = U8(1)
}
// Initialize the JsonString object
-func jsonInit(tls *libc.TLS, p uintptr, pCtx uintptr) { /* sqlite3.c:188768:13: */
+func jsonInit(tls *libc.TLS, p uintptr, pCtx uintptr) { /* sqlite3.c:189840:13: */
(*JsonString)(unsafe.Pointer(p)).FpCtx = pCtx
(*JsonString)(unsafe.Pointer(p)).FbErr = U8(0)
jsonZero(tls, p)
@@ -147903,7 +150508,7 @@ func jsonInit(tls *libc.TLS, p uintptr, pCtx uintptr) { /* sqlite3.c:188768:13:
// Free all allocated memory and reset the JsonString object back to its
// initial state.
-func jsonReset(tls *libc.TLS, p uintptr) { /* sqlite3.c:188778:13: */
+func jsonReset(tls *libc.TLS, p uintptr) { /* sqlite3.c:189850:13: */
if !(int32((*JsonString)(unsafe.Pointer(p)).FbStatic) != 0) {
Xsqlite3_free(tls, (*JsonString)(unsafe.Pointer(p)).FzBuf)
}
@@ -147911,7 +150516,7 @@ func jsonReset(tls *libc.TLS, p uintptr) { /* sqlite3.c:188778:13: */
}
// Report an out-of-memory (OOM) condition
-func jsonOom(tls *libc.TLS, p uintptr) { /* sqlite3.c:188786:13: */
+func jsonOom(tls *libc.TLS, p uintptr) { /* sqlite3.c:189858:13: */
(*JsonString)(unsafe.Pointer(p)).FbErr = U8(1)
Xsqlite3_result_error_nomem(tls, (*JsonString)(unsafe.Pointer(p)).FpCtx)
jsonReset(tls, p)
@@ -147919,7 +150524,7 @@ func jsonOom(tls *libc.TLS, p uintptr) { /* sqlite3.c:188786:13: */
// Enlarge pJson->zBuf so that it can hold at least N more bytes.
// Return zero on success. Return non-zero on an OOM error
-func jsonGrow(tls *libc.TLS, p uintptr, N U32) int32 { /* sqlite3.c:188795:12: */
+func jsonGrow(tls *libc.TLS, p uintptr, N U32) int32 { /* sqlite3.c:189867:12: */
var nTotal U64
if U64(N) < (*JsonString)(unsafe.Pointer(p)).FnAlloc {
nTotal = ((*JsonString)(unsafe.Pointer(p)).FnAlloc * uint64(2))
@@ -147952,7 +150557,7 @@ func jsonGrow(tls *libc.TLS, p uintptr, N U32) int32 { /* sqlite3.c:188795:12: *
}
// Append N bytes from zIn onto the end of the JsonString string.
-func jsonAppendRaw(tls *libc.TLS, p uintptr, zIn uintptr, N U32) { /* sqlite3.c:188822:13: */
+func jsonAppendRaw(tls *libc.TLS, p uintptr, zIn uintptr, N U32) { /* sqlite3.c:189894:13: */
if N == U32(0) {
return
}
@@ -147964,7 +150569,7 @@ func jsonAppendRaw(tls *libc.TLS, p uintptr, zIn uintptr, N U32) { /* sqlite3.c:
}
// Append formatted text (not to exceed N bytes) to the JsonString.
-func jsonPrintf(tls *libc.TLS, N int32, p uintptr, zFormat uintptr, va uintptr) { /* sqlite3.c:188831:13: */
+func jsonPrintf(tls *libc.TLS, N int32, p uintptr, zFormat uintptr, va uintptr) { /* sqlite3.c:189903:13: */
var ap Va_list
_ = ap
if (((*JsonString)(unsafe.Pointer(p)).FnUsed + U64(N)) >= (*JsonString)(unsafe.Pointer(p)).FnAlloc) && (jsonGrow(tls, p, uint32(N)) != 0) {
@@ -147977,23 +150582,23 @@ func jsonPrintf(tls *libc.TLS, N int32, p uintptr, zFormat uintptr, va uintptr)
}
// Append a single character
-func jsonAppendChar(tls *libc.TLS, p uintptr, c int8) { /* sqlite3.c:188842:13: */
+func jsonAppendChar(tls *libc.TLS, p uintptr, c uint8) { /* sqlite3.c:189914:13: */
if ((*JsonString)(unsafe.Pointer(p)).FnUsed >= (*JsonString)(unsafe.Pointer(p)).FnAlloc) && (jsonGrow(tls, p, uint32(1)) != 0) {
return
}
- *(*int8)(unsafe.Pointer((*JsonString)(unsafe.Pointer(p)).FzBuf + uintptr(libc.PostIncUint64(&(*JsonString)(unsafe.Pointer(p)).FnUsed, 1)))) = c
+ *(*uint8)(unsafe.Pointer((*JsonString)(unsafe.Pointer(p)).FzBuf + uintptr(libc.PostIncUint64(&(*JsonString)(unsafe.Pointer(p)).FnUsed, 1)))) = c
}
// Append a comma separator to the output buffer, if the previous
// character is not '[' or '{'.
-func jsonAppendSeparator(tls *libc.TLS, p uintptr) { /* sqlite3.c:188850:13: */
- var c int8
+func jsonAppendSeparator(tls *libc.TLS, p uintptr) { /* sqlite3.c:189922:13: */
+ var c uint8
if (*JsonString)(unsafe.Pointer(p)).FnUsed == uint64(0) {
return
}
- c = *(*int8)(unsafe.Pointer((*JsonString)(unsafe.Pointer(p)).FzBuf + uintptr(((*JsonString)(unsafe.Pointer(p)).FnUsed - uint64(1)))))
+ c = *(*uint8)(unsafe.Pointer((*JsonString)(unsafe.Pointer(p)).FzBuf + uintptr(((*JsonString)(unsafe.Pointer(p)).FnUsed - uint64(1)))))
if (int32(c) != '[') && (int32(c) != '{') {
- jsonAppendChar(tls, p, int8(','))
+ jsonAppendChar(tls, p, uint8(','))
}
}
@@ -148001,16 +150606,16 @@ func jsonAppendSeparator(tls *libc.TLS, p uintptr) { /* sqlite3.c:188850:13: */
// under construction. Enclose the string in "..." and escape
// any double-quotes or backslash characters contained within the
// string.
-func jsonAppendString(tls *libc.TLS, p uintptr, zIn uintptr, N U32) { /* sqlite3.c:188862:13: */
+func jsonAppendString(tls *libc.TLS, p uintptr, zIn uintptr, N U32) { /* sqlite3.c:189934:13: */
var i U32
var c uint8
- if !((((U64(N) + (*JsonString)(unsafe.Pointer(p)).FnUsed) + uint64(2)) >= (*JsonString)(unsafe.Pointer(p)).FnAlloc) && (jsonGrow(tls, p, (N+U32(2))) != 0)) {
+ if !((zIn == uintptr(0)) || ((((U64(N) + (*JsonString)(unsafe.Pointer(p)).FnUsed) + uint64(2)) >= (*JsonString)(unsafe.Pointer(p)).FnAlloc) && (jsonGrow(tls, p, (N+U32(2))) != 0))) {
goto __1
}
return
__1:
;
- *(*int8)(unsafe.Pointer((*JsonString)(unsafe.Pointer(p)).FzBuf + uintptr(libc.PostIncUint64(&(*JsonString)(unsafe.Pointer(p)).FnUsed, 1)))) = int8('"')
+ *(*uint8)(unsafe.Pointer((*JsonString)(unsafe.Pointer(p)).FzBuf + uintptr(libc.PostIncUint64(&(*JsonString)(unsafe.Pointer(p)).FnUsed, 1)))) = uint8('"')
i = U32(0)
__2:
if !(i < N) {
@@ -148027,7 +150632,7 @@ json_simple_escape:
return
__7:
;
- *(*int8)(unsafe.Pointer((*JsonString)(unsafe.Pointer(p)).FzBuf + uintptr(libc.PostIncUint64(&(*JsonString)(unsafe.Pointer(p)).FnUsed, 1)))) = int8('\\')
+ *(*uint8)(unsafe.Pointer((*JsonString)(unsafe.Pointer(p)).FzBuf + uintptr(libc.PostIncUint64(&(*JsonString)(unsafe.Pointer(p)).FnUsed, 1)))) = uint8('\\')
goto __6
__5:
if !(int32(c) <= 0x1f) {
@@ -148047,17 +150652,17 @@ __9:
return
__10:
;
- *(*int8)(unsafe.Pointer((*JsonString)(unsafe.Pointer(p)).FzBuf + uintptr(libc.PostIncUint64(&(*JsonString)(unsafe.Pointer(p)).FnUsed, 1)))) = int8('\\')
- *(*int8)(unsafe.Pointer((*JsonString)(unsafe.Pointer(p)).FzBuf + uintptr(libc.PostIncUint64(&(*JsonString)(unsafe.Pointer(p)).FnUsed, 1)))) = int8('u')
- *(*int8)(unsafe.Pointer((*JsonString)(unsafe.Pointer(p)).FzBuf + uintptr(libc.PostIncUint64(&(*JsonString)(unsafe.Pointer(p)).FnUsed, 1)))) = int8('0')
- *(*int8)(unsafe.Pointer((*JsonString)(unsafe.Pointer(p)).FzBuf + uintptr(libc.PostIncUint64(&(*JsonString)(unsafe.Pointer(p)).FnUsed, 1)))) = int8('0')
- *(*int8)(unsafe.Pointer((*JsonString)(unsafe.Pointer(p)).FzBuf + uintptr(libc.PostIncUint64(&(*JsonString)(unsafe.Pointer(p)).FnUsed, 1)))) = (int8('0' + (int32(c) >> 4)))
- c = uint8(*(*int8)(unsafe.Pointer(ts + 22313 /* "0123456789abcdef" */ + uintptr((int32(c) & 0xf)))))
+ *(*uint8)(unsafe.Pointer((*JsonString)(unsafe.Pointer(p)).FzBuf + uintptr(libc.PostIncUint64(&(*JsonString)(unsafe.Pointer(p)).FnUsed, 1)))) = uint8('\\')
+ *(*uint8)(unsafe.Pointer((*JsonString)(unsafe.Pointer(p)).FzBuf + uintptr(libc.PostIncUint64(&(*JsonString)(unsafe.Pointer(p)).FnUsed, 1)))) = uint8('u')
+ *(*uint8)(unsafe.Pointer((*JsonString)(unsafe.Pointer(p)).FzBuf + uintptr(libc.PostIncUint64(&(*JsonString)(unsafe.Pointer(p)).FnUsed, 1)))) = uint8('0')
+ *(*uint8)(unsafe.Pointer((*JsonString)(unsafe.Pointer(p)).FzBuf + uintptr(libc.PostIncUint64(&(*JsonString)(unsafe.Pointer(p)).FnUsed, 1)))) = uint8('0')
+ *(*uint8)(unsafe.Pointer((*JsonString)(unsafe.Pointer(p)).FzBuf + uintptr(libc.PostIncUint64(&(*JsonString)(unsafe.Pointer(p)).FnUsed, 1)))) = (uint8('0' + (int32(c) >> 4)))
+ c = uint8(*(*uint8)(unsafe.Pointer(ts + 22773 /* "0123456789abcdef" */ + uintptr((int32(c) & 0xf)))))
__8:
;
__6:
;
- *(*int8)(unsafe.Pointer((*JsonString)(unsafe.Pointer(p)).FzBuf + uintptr(libc.PostIncUint64(&(*JsonString)(unsafe.Pointer(p)).FnUsed, 1)))) = int8(c)
+ *(*uint8)(unsafe.Pointer((*JsonString)(unsafe.Pointer(p)).FzBuf + uintptr(libc.PostIncUint64(&(*JsonString)(unsafe.Pointer(p)).FnUsed, 1)))) = uint8(c)
goto __3
__3:
i++
@@ -148065,22 +150670,22 @@ __3:
goto __4
__4:
;
- *(*int8)(unsafe.Pointer((*JsonString)(unsafe.Pointer(p)).FzBuf + uintptr(libc.PostIncUint64(&(*JsonString)(unsafe.Pointer(p)).FnUsed, 1)))) = int8('"')
+ *(*uint8)(unsafe.Pointer((*JsonString)(unsafe.Pointer(p)).FzBuf + uintptr(libc.PostIncUint64(&(*JsonString)(unsafe.Pointer(p)).FnUsed, 1)))) = uint8('"')
}
-var aSpecial = [32]int8{
- int8(0), int8(0), int8(0), int8(0), int8(0), int8(0), int8(0), int8(0), int8('b'), int8('t'), int8('n'), int8(0), int8('f'), int8('r'), int8(0), int8(0),
- int8(0), int8(0), int8(0), int8(0), int8(0), int8(0), int8(0), int8(0), int8(0), int8(0), int8(0), int8(0), int8(0), int8(0), int8(0), int8(0),
-} /* sqlite3.c:188873:25 */
+var aSpecial = [32]uint8{
+ uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8('b'), uint8('t'), uint8('n'), uint8(0), uint8('f'), uint8('r'), uint8(0), uint8(0),
+ uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0),
+} /* sqlite3.c:189945:25 */
// Append a function parameter value to the JSON string under
// construction.
-func jsonAppendValue(tls *libc.TLS, p uintptr, pValue uintptr) { /* sqlite3.c:188905:13: */
+func jsonAppendValue(tls *libc.TLS, p uintptr, pValue uintptr) { /* sqlite3.c:189977:13: */
switch Xsqlite3_value_type(tls, pValue) {
case SQLITE_NULL:
{
- jsonAppendRaw(tls, p, ts+5127 /* "null" */, uint32(4))
+ jsonAppendRaw(tls, p, ts+5258 /* "null" */, uint32(4))
break
}
@@ -148109,7 +150714,7 @@ func jsonAppendValue(tls *libc.TLS, p uintptr, pValue uintptr) { /* sqlite3.c:18
default:
{
if int32((*JsonString)(unsafe.Pointer(p)).FbErr) == 0 {
- Xsqlite3_result_error(tls, (*JsonString)(unsafe.Pointer(p)).FpCtx, ts+22330 /* "JSON cannot hold..." */, -1)
+ Xsqlite3_result_error(tls, (*JsonString)(unsafe.Pointer(p)).FpCtx, ts+22790 /* "JSON cannot hold..." */, -1)
(*JsonString)(unsafe.Pointer(p)).FbErr = U8(2)
jsonReset(tls, p)
}
@@ -148120,7 +150725,7 @@ func jsonAppendValue(tls *libc.TLS, p uintptr, pValue uintptr) { /* sqlite3.c:18
}
// Make the JSON in p the result of the SQL function.
-func jsonResult(tls *libc.TLS, p uintptr) { /* sqlite3.c:188945:13: */
+func jsonResult(tls *libc.TLS, p uintptr) { /* sqlite3.c:190017:13: */
if int32((*JsonString)(unsafe.Pointer(p)).FbErr) == 0 {
Xsqlite3_result_text64(tls, (*JsonString)(unsafe.Pointer(p)).FpCtx, (*JsonString)(unsafe.Pointer(p)).FzBuf, (*JsonString)(unsafe.Pointer(p)).FnUsed,
func() uintptr {
@@ -148147,7 +150752,7 @@ func jsonResult(tls *libc.TLS, p uintptr) { /* sqlite3.c:188945:13: */
// Appended elements are not counted. The value returned is the number
// by which the JsonNode counter should increment in order to go to the
// next peer value.
-func jsonNodeSize(tls *libc.TLS, pNode uintptr) U32 { /* sqlite3.c:188968:12: */
+func jsonNodeSize(tls *libc.TLS, pNode uintptr) U32 { /* sqlite3.c:190040:12: */
if int32((*JsonNode)(unsafe.Pointer(pNode)).FeType) >= JSON_ARRAY {
return ((*JsonNode)(unsafe.Pointer(pNode)).Fn + U32(1))
}
@@ -148156,7 +150761,7 @@ func jsonNodeSize(tls *libc.TLS, pNode uintptr) U32 { /* sqlite3.c:188968:12: */
// Reclaim all memory allocated by a JsonParse object. But do not
// delete the JsonParse object itself.
-func jsonParseReset(tls *libc.TLS, pParse uintptr) { /* sqlite3.c:188976:13: */
+func jsonParseReset(tls *libc.TLS, pParse uintptr) { /* sqlite3.c:190048:13: */
Xsqlite3_free(tls, (*JsonParse)(unsafe.Pointer(pParse)).FaNode)
(*JsonParse)(unsafe.Pointer(pParse)).FaNode = uintptr(0)
(*JsonParse)(unsafe.Pointer(pParse)).FnNode = U32(0)
@@ -148166,7 +150771,7 @@ func jsonParseReset(tls *libc.TLS, pParse uintptr) { /* sqlite3.c:188976:13: */
}
// Free a JsonParse object that was obtained from sqlite3_malloc().
-func jsonParseFree(tls *libc.TLS, pParse uintptr) { /* sqlite3.c:188988:13: */
+func jsonParseFree(tls *libc.TLS, pParse uintptr) { /* sqlite3.c:190060:13: */
jsonParseReset(tls, pParse)
Xsqlite3_free(tls, pParse)
}
@@ -148174,7 +150779,7 @@ func jsonParseFree(tls *libc.TLS, pParse uintptr) { /* sqlite3.c:188988:13: */
// Convert the JsonNode pNode into a pure JSON string and
// append to pOut. Subsubstructure is also included. Return
// the number of JsonNode objects that are encoded.
-func jsonRenderNode(tls *libc.TLS, pNode uintptr, pOut uintptr, aReplace uintptr) { /* sqlite3.c:188998:13: */
+func jsonRenderNode(tls *libc.TLS, pNode uintptr, pOut uintptr, aReplace uintptr) { /* sqlite3.c:190070:13: */
if (int32((*JsonNode)(unsafe.Pointer(pNode)).FjnFlags) & (JNODE_REPLACE | JNODE_PATCH)) != 0 {
if (int32((*JsonNode)(unsafe.Pointer(pNode)).FjnFlags) & JNODE_REPLACE) != 0 {
jsonAppendValue(tls, pOut, *(*uintptr)(unsafe.Pointer(aReplace + uintptr(*(*U32)(unsafe.Pointer(pNode + 8 /* &.u */)))*8)))
@@ -148186,19 +150791,19 @@ func jsonRenderNode(tls *libc.TLS, pNode uintptr, pOut uintptr, aReplace uintptr
default:
{
- jsonAppendRaw(tls, pOut, ts+5127 /* "null" */, uint32(4))
+ jsonAppendRaw(tls, pOut, ts+5258 /* "null" */, uint32(4))
break
}
case JSON_TRUE:
{
- jsonAppendRaw(tls, pOut, ts+5639 /* "true" */, uint32(4))
+ jsonAppendRaw(tls, pOut, ts+5770 /* "true" */, uint32(4))
break
}
case JSON_FALSE:
{
- jsonAppendRaw(tls, pOut, ts+5644 /* "false" */, uint32(5))
+ jsonAppendRaw(tls, pOut, ts+5775 /* "false" */, uint32(5))
break
}
@@ -148222,7 +150827,7 @@ func jsonRenderNode(tls *libc.TLS, pNode uintptr, pOut uintptr, aReplace uintptr
case JSON_ARRAY:
{
var j U32 = U32(1)
- jsonAppendChar(tls, pOut, int8('['))
+ jsonAppendChar(tls, pOut, uint8('['))
for {
for j <= (*JsonNode)(unsafe.Pointer(pNode)).Fn {
if (int32((*JsonNode)(unsafe.Pointer(pNode+uintptr(j)*16)).FjnFlags) & JNODE_REMOVE) == 0 {
@@ -148237,20 +150842,20 @@ func jsonRenderNode(tls *libc.TLS, pNode uintptr, pOut uintptr, aReplace uintptr
pNode = (pNode + uintptr(*(*U32)(unsafe.Pointer(pNode + 8 /* &.u */)))*16)
j = U32(1)
}
- jsonAppendChar(tls, pOut, int8(']'))
+ jsonAppendChar(tls, pOut, uint8(']'))
break
}
case JSON_OBJECT:
{
var j U32 = U32(1)
- jsonAppendChar(tls, pOut, int8('{'))
+ jsonAppendChar(tls, pOut, uint8('{'))
for {
for j <= (*JsonNode)(unsafe.Pointer(pNode)).Fn {
if (int32((*JsonNode)(unsafe.Pointer(pNode+uintptr((j+U32(1)))*16)).FjnFlags) & JNODE_REMOVE) == 0 {
jsonAppendSeparator(tls, pOut)
jsonRenderNode(tls, (pNode + uintptr(j)*16), pOut, aReplace)
- jsonAppendChar(tls, pOut, int8(':'))
+ jsonAppendChar(tls, pOut, uint8(':'))
jsonRenderNode(tls, (pNode + uintptr((j+U32(1)))*16), pOut, aReplace)
}
j = j + (U32(1) + jsonNodeSize(tls, (pNode+uintptr((j+U32(1)))*16)))
@@ -148261,7 +150866,7 @@ func jsonRenderNode(tls *libc.TLS, pNode uintptr, pOut uintptr, aReplace uintptr
pNode = (pNode + uintptr(*(*U32)(unsafe.Pointer(pNode + 8 /* &.u */)))*16)
j = U32(1)
}
- jsonAppendChar(tls, pOut, int8('}'))
+ jsonAppendChar(tls, pOut, uint8('}'))
break
}
@@ -148269,7 +150874,7 @@ func jsonRenderNode(tls *libc.TLS, pNode uintptr, pOut uintptr, aReplace uintptr
}
// Return a JsonNode and all its descendents as a JSON string.
-func jsonReturnJson(tls *libc.TLS, pNode uintptr, pCtx uintptr, aReplace uintptr) { /* sqlite3.c:189080:13: */
+func jsonReturnJson(tls *libc.TLS, pNode uintptr, pCtx uintptr, aReplace uintptr) { /* sqlite3.c:190152:13: */
bp := tls.Alloc(136)
defer tls.Free(136)
@@ -148284,25 +150889,25 @@ func jsonReturnJson(tls *libc.TLS, pNode uintptr, pCtx uintptr, aReplace uintptr
// Translate a single byte of Hex into an integer.
// This routine only works if h really is a valid hexadecimal
// character: 0..9a..fA..F
-func jsonHexToInt(tls *libc.TLS, h int32) U8 { /* sqlite3.c:189097:11: */
+func jsonHexToInt(tls *libc.TLS, h int32) U8 { /* sqlite3.c:190169:11: */
h = h + (9 * (1 & (h >> 6)))
return (U8(h & 0xf))
}
// Convert a 4-byte hex string into an integer
-func jsonHexToInt4(tls *libc.TLS, z uintptr) U32 { /* sqlite3.c:189110:12: */
+func jsonHexToInt4(tls *libc.TLS, z uintptr) U32 { /* sqlite3.c:190182:12: */
var v U32
- v = (U32((((int32(jsonHexToInt(tls, int32(*(*int8)(unsafe.Pointer(z))))) << 12) +
- (int32(jsonHexToInt(tls, int32(*(*int8)(unsafe.Pointer(z + 1))))) << 8)) +
- (int32(jsonHexToInt(tls, int32(*(*int8)(unsafe.Pointer(z + 2))))) << 4)) +
- int32(jsonHexToInt(tls, int32(*(*int8)(unsafe.Pointer(z + 3)))))))
+ v = (U32((((int32(jsonHexToInt(tls, int32(*(*uint8)(unsafe.Pointer(z))))) << 12) +
+ (int32(jsonHexToInt(tls, int32(*(*uint8)(unsafe.Pointer(z + 1))))) << 8)) +
+ (int32(jsonHexToInt(tls, int32(*(*uint8)(unsafe.Pointer(z + 2))))) << 4)) +
+ int32(jsonHexToInt(tls, int32(*(*uint8)(unsafe.Pointer(z + 3)))))))
return v
}
// Make the JsonNode the return value of the function.
-func jsonReturn(tls *libc.TLS, pNode uintptr, pCtx uintptr, aReplace uintptr) { /* sqlite3.c:189126:13: */
+func jsonReturn(tls *libc.TLS, pNode uintptr, pCtx uintptr, aReplace uintptr) { /* sqlite3.c:190198:13: */
bp := tls.Alloc(8)
defer tls.Free(8)
@@ -148314,7 +150919,7 @@ func jsonReturn(tls *libc.TLS, pNode uintptr, pCtx uintptr, aReplace uintptr) {
var z1 uintptr
var vlo U32
var v1 U32
- var c int8
+ var c uint8
// Translate JSON formatted string into raw text
var i1 U32
var n U32
@@ -148356,17 +150961,17 @@ __4:
__5:
i = int64(0)
z = *(*uintptr)(unsafe.Pointer(pNode + 8 /* &.u */))
- if !(int32(*(*int8)(unsafe.Pointer(z))) == '-') {
+ if !(int32(*(*uint8)(unsafe.Pointer(z))) == '-') {
goto __10
}
z++
__10:
;
__11:
- if !((int32(*(*int8)(unsafe.Pointer(z))) >= '0') && (int32(*(*int8)(unsafe.Pointer(z))) <= '9')) {
+ if !((int32(*(*uint8)(unsafe.Pointer(z))) >= '0') && (int32(*(*uint8)(unsafe.Pointer(z))) <= '9')) {
goto __12
}
- v = (uint32(int32(*(*int8)(unsafe.Pointer(libc.PostIncUintptr(&z, 1)))) - '0'))
+ v = (uint32(int32(*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&z, 1)))) - '0'))
if !(i >= ((int64(0xffffffff) | (I64((int64(0x7fffffff))) << 32)) / int64(10))) {
goto __13
}
@@ -148376,7 +150981,7 @@ __11:
goto int_as_real
__14:
;
- if !((int32(*(*int8)(unsafe.Pointer(z))) >= '0') && (int32(*(*int8)(unsafe.Pointer(z))) <= '9')) {
+ if !((int32(*(*uint8)(unsafe.Pointer(z))) >= '0') && (int32(*(*uint8)(unsafe.Pointer(z))) <= '9')) {
goto __15
}
goto int_as_real
@@ -148391,7 +150996,7 @@ __16:
if !(v == uint32(8)) {
goto __17
}
- if !(int32(*(*int8)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(pNode + 8 /* &.u */))))) == '-') {
+ if !(int32(*(*uint8)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(pNode + 8 /* &.u */))))) == '-') {
goto __18
}
Xsqlite3_result_int64(tls, pCtx, ((int64(-1)) - (int64(0xffffffff) | (I64((int64(0x7fffffff))) << 32))))
@@ -148409,7 +151014,7 @@ __13:
goto __11
__12:
;
- if !(int32(*(*int8)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(pNode + 8 /* &.u */))))) == '-') {
+ if !(int32(*(*uint8)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(pNode + 8 /* &.u */))))) == '-') {
goto __20
}
i = -i
@@ -148453,14 +151058,14 @@ __24:
if !(i1 < (n - U32(1))) {
goto __26
}
- c = *(*int8)(unsafe.Pointer(z2 + uintptr(i1)))
+ c = *(*uint8)(unsafe.Pointer(z2 + uintptr(i1)))
if !(int32(c) != '\\') {
goto __27
}
- *(*int8)(unsafe.Pointer(zOut + uintptr(libc.PostIncUint32(&j, 1)))) = c
+ *(*uint8)(unsafe.Pointer(zOut + uintptr(libc.PostIncUint32(&j, 1)))) = c
goto __28
__27:
- c = *(*int8)(unsafe.Pointer(z2 + uintptr(libc.PreIncUint32(&i1, 1))))
+ c = *(*uint8)(unsafe.Pointer(z2 + uintptr(libc.PreIncUint32(&i1, 1))))
if !(int32(c) == 'u') {
goto __29
}
@@ -148475,35 +151080,35 @@ __31:
if !(v1 <= U32(0x7f)) {
goto __32
}
- *(*int8)(unsafe.Pointer(zOut + uintptr(libc.PostIncUint32(&j, 1)))) = int8(v1)
+ *(*uint8)(unsafe.Pointer(zOut + uintptr(libc.PostIncUint32(&j, 1)))) = uint8(v1)
goto __33
__32:
if !(v1 <= U32(0x7ff)) {
goto __34
}
- *(*int8)(unsafe.Pointer(zOut + uintptr(libc.PostIncUint32(&j, 1)))) = (int8(U32(0xc0) | (v1 >> 6)))
- *(*int8)(unsafe.Pointer(zOut + uintptr(libc.PostIncUint32(&j, 1)))) = (int8(U32(0x80) | (v1 & U32(0x3f))))
+ *(*uint8)(unsafe.Pointer(zOut + uintptr(libc.PostIncUint32(&j, 1)))) = (uint8(U32(0xc0) | (v1 >> 6)))
+ *(*uint8)(unsafe.Pointer(zOut + uintptr(libc.PostIncUint32(&j, 1)))) = (uint8(U32(0x80) | (v1 & U32(0x3f))))
goto __35
__34:
if !((((((v1 & U32(0xfc00)) == U32(0xd800)) &&
(i1 < (n - U32(6)))) &&
- (int32(*(*int8)(unsafe.Pointer(z2 + uintptr((i1 + U32(1)))))) == '\\')) &&
- (int32(*(*int8)(unsafe.Pointer(z2 + uintptr((i1 + U32(2)))))) == 'u')) &&
+ (int32(*(*uint8)(unsafe.Pointer(z2 + uintptr((i1 + U32(1)))))) == '\\')) &&
+ (int32(*(*uint8)(unsafe.Pointer(z2 + uintptr((i1 + U32(2)))))) == 'u')) &&
(((libc.AssignUint32(&vlo, jsonHexToInt4(tls, ((z2+uintptr(i1))+uintptr(3))))) & U32(0xfc00)) == U32(0xdc00))) {
goto __36
}
// We have a surrogate pair
v1 = ((((v1 & U32(0x3ff)) << 10) + (vlo & U32(0x3ff))) + U32(0x10000))
i1 = i1 + (U32(6))
- *(*int8)(unsafe.Pointer(zOut + uintptr(libc.PostIncUint32(&j, 1)))) = (int8(U32(0xf0) | (v1 >> 18)))
- *(*int8)(unsafe.Pointer(zOut + uintptr(libc.PostIncUint32(&j, 1)))) = (int8(U32(0x80) | ((v1 >> 12) & U32(0x3f))))
- *(*int8)(unsafe.Pointer(zOut + uintptr(libc.PostIncUint32(&j, 1)))) = (int8(U32(0x80) | ((v1 >> 6) & U32(0x3f))))
- *(*int8)(unsafe.Pointer(zOut + uintptr(libc.PostIncUint32(&j, 1)))) = (int8(U32(0x80) | (v1 & U32(0x3f))))
+ *(*uint8)(unsafe.Pointer(zOut + uintptr(libc.PostIncUint32(&j, 1)))) = (uint8(U32(0xf0) | (v1 >> 18)))
+ *(*uint8)(unsafe.Pointer(zOut + uintptr(libc.PostIncUint32(&j, 1)))) = (uint8(U32(0x80) | ((v1 >> 12) & U32(0x3f))))
+ *(*uint8)(unsafe.Pointer(zOut + uintptr(libc.PostIncUint32(&j, 1)))) = (uint8(U32(0x80) | ((v1 >> 6) & U32(0x3f))))
+ *(*uint8)(unsafe.Pointer(zOut + uintptr(libc.PostIncUint32(&j, 1)))) = (uint8(U32(0x80) | (v1 & U32(0x3f))))
goto __37
__36:
- *(*int8)(unsafe.Pointer(zOut + uintptr(libc.PostIncUint32(&j, 1)))) = (int8(U32(0xe0) | (v1 >> 12)))
- *(*int8)(unsafe.Pointer(zOut + uintptr(libc.PostIncUint32(&j, 1)))) = (int8(U32(0x80) | ((v1 >> 6) & U32(0x3f))))
- *(*int8)(unsafe.Pointer(zOut + uintptr(libc.PostIncUint32(&j, 1)))) = (int8(U32(0x80) | (v1 & U32(0x3f))))
+ *(*uint8)(unsafe.Pointer(zOut + uintptr(libc.PostIncUint32(&j, 1)))) = (uint8(U32(0xe0) | (v1 >> 12)))
+ *(*uint8)(unsafe.Pointer(zOut + uintptr(libc.PostIncUint32(&j, 1)))) = (uint8(U32(0x80) | ((v1 >> 6) & U32(0x3f))))
+ *(*uint8)(unsafe.Pointer(zOut + uintptr(libc.PostIncUint32(&j, 1)))) = (uint8(U32(0x80) | (v1 & U32(0x3f))))
__37:
;
__35:
@@ -148515,31 +151120,31 @@ __29:
if !(int32(c) == 'b') {
goto __38
}
- c = int8('\b')
+ c = uint8('\b')
goto __39
__38:
if !(int32(c) == 'f') {
goto __40
}
- c = int8('\f')
+ c = uint8('\f')
goto __41
__40:
if !(int32(c) == 'n') {
goto __42
}
- c = int8('\n')
+ c = uint8('\n')
goto __43
__42:
if !(int32(c) == 'r') {
goto __44
}
- c = int8('\r')
+ c = uint8('\r')
goto __45
__44:
if !(int32(c) == 't') {
goto __46
}
- c = int8('\t')
+ c = uint8('\t')
__46:
;
__45:
@@ -148550,7 +151155,7 @@ __41:
;
__39:
;
- *(*int8)(unsafe.Pointer(zOut + uintptr(libc.PostIncUint32(&j, 1)))) = c
+ *(*uint8)(unsafe.Pointer(zOut + uintptr(libc.PostIncUint32(&j, 1)))) = c
__30:
;
__28:
@@ -148562,7 +151167,7 @@ __25:
goto __26
__26:
;
- *(*int8)(unsafe.Pointer(zOut + uintptr(j))) = int8(0)
+ *(*uint8)(unsafe.Pointer(zOut + uintptr(j))) = uint8(0)
Xsqlite3_result_text(tls, pCtx, zOut, int32(j), *(*uintptr)(unsafe.Pointer(&struct{ f func(*libc.TLS, uintptr) }{Xsqlite3_free})))
__22:
;
@@ -148579,7 +151184,7 @@ __1:
// A macro to hint to the compiler that a function should not be
// inlined.
-func jsonParseAddNodeExpand(tls *libc.TLS, pParse uintptr, eType U32, n U32, zContent uintptr) int32 { /* sqlite3.c:189290:26: */
+func jsonParseAddNodeExpand(tls *libc.TLS, pParse uintptr, eType U32, n U32, zContent uintptr) int32 { /* sqlite3.c:190362:26: */
var nNew U32
var pNew uintptr
@@ -148601,7 +151206,7 @@ func jsonParseAddNodeExpand(tls *libc.TLS, pParse uintptr, eType U32, n U32, zCo
// Create a new JsonNode instance based on the arguments and append that
// instance to the JsonParse. Return the index in pParse->aNode[] of the
// new node, or -1 if a memory allocation fails.
-func jsonParseAddNode(tls *libc.TLS, pParse uintptr, eType U32, n U32, zContent uintptr) int32 { /* sqlite3.c:189317:12: */
+func jsonParseAddNode(tls *libc.TLS, pParse uintptr, eType U32, n U32, zContent uintptr) int32 { /* sqlite3.c:190389:12: */
var p uintptr
if (*JsonParse)(unsafe.Pointer(pParse)).FnNode >= (*JsonParse)(unsafe.Pointer(pParse)).FnAlloc {
return jsonParseAddNodeExpand(tls, pParse, eType, n, zContent)
@@ -148615,10 +151220,10 @@ func jsonParseAddNode(tls *libc.TLS, pParse uintptr, eType U32, n U32, zContent
}
// Return true if z[] begins with 4 (or more) hexadecimal digits
-func jsonIs4Hex(tls *libc.TLS, z uintptr) int32 { /* sqlite3.c:189338:12: */
+func jsonIs4Hex(tls *libc.TLS, z uintptr) int32 { /* sqlite3.c:190410:12: */
var i int32
for i = 0; i < 4; i++ {
- if !((int32(Xsqlite3CtypeMap[uint8(*(*int8)(unsafe.Pointer(z + uintptr(i))))]) & 0x08) != 0) {
+ if !((int32(Xsqlite3CtypeMap[uint8(*(*uint8)(unsafe.Pointer(z + uintptr(i))))]) & 0x08) != 0) {
return 0
}
}
@@ -148631,24 +151236,24 @@ func jsonIs4Hex(tls *libc.TLS, z uintptr) int32 { /* sqlite3.c:189338:12: */
// Return negative for a syntax error. Special cases: return -2 if the
// first non-whitespace character is '}' and return -3 if the first
// non-whitespace character is ']'.
-func jsonParseValue(tls *libc.TLS, pParse uintptr, i U32) int32 { /* sqlite3.c:189352:12: */
- var c int8
+func jsonParseValue(tls *libc.TLS, pParse uintptr, i U32) int32 { /* sqlite3.c:190424:12: */
+ var c uint8
var j U32
var iThis int32
var x int32
var pNode uintptr
var z uintptr = (*JsonParse)(unsafe.Pointer(pParse)).FzJson
- for jsonIsSpace[uint8(*(*int8)(unsafe.Pointer(z + uintptr(i))))] != 0 {
+ for jsonIsSpace[uint8(*(*uint8)(unsafe.Pointer(z + uintptr(i))))] != 0 {
i++
}
- if (int32(libc.AssignInt8(&c, *(*int8)(unsafe.Pointer(z + uintptr(i)))))) == '{' {
+ if (int32(libc.AssignUint8(&c, *(*uint8)(unsafe.Pointer(z + uintptr(i)))))) == '{' {
// Parse object
iThis = jsonParseAddNode(tls, pParse, uint32(JSON_OBJECT), uint32(0), uintptr(0))
if iThis < 0 {
return -1
}
for j = (i + U32(1)); ; j++ {
- for jsonIsSpace[uint8(*(*int8)(unsafe.Pointer(z + uintptr(j))))] != 0 {
+ for jsonIsSpace[uint8(*(*uint8)(unsafe.Pointer(z + uintptr(j))))] != 0 {
j++
}
if int32(libc.PreIncUint16(&(*JsonParse)(unsafe.Pointer(pParse)).FiDepth, 1)) > JSON_MAX_DEPTH {
@@ -148671,10 +151276,10 @@ func jsonParseValue(tls *libc.TLS, pParse uintptr, i U32) int32 { /* sqlite3.c:1
}
*(*U8)(unsafe.Pointer(pNode + 1 /* &.jnFlags */)) |= U8((JNODE_LABEL))
j = U32(x)
- for jsonIsSpace[uint8(*(*int8)(unsafe.Pointer(z + uintptr(j))))] != 0 {
+ for jsonIsSpace[uint8(*(*uint8)(unsafe.Pointer(z + uintptr(j))))] != 0 {
j++
}
- if int32(*(*int8)(unsafe.Pointer(z + uintptr(j)))) != ':' {
+ if int32(*(*uint8)(unsafe.Pointer(z + uintptr(j)))) != ':' {
return -1
}
j++
@@ -148684,10 +151289,10 @@ func jsonParseValue(tls *libc.TLS, pParse uintptr, i U32) int32 { /* sqlite3.c:1
return -1
}
j = U32(x)
- for jsonIsSpace[uint8(*(*int8)(unsafe.Pointer(z + uintptr(j))))] != 0 {
+ for jsonIsSpace[uint8(*(*uint8)(unsafe.Pointer(z + uintptr(j))))] != 0 {
j++
}
- c = *(*int8)(unsafe.Pointer(z + uintptr(j)))
+ c = *(*uint8)(unsafe.Pointer(z + uintptr(j)))
if int32(c) == ',' {
continue
}
@@ -148705,7 +151310,7 @@ func jsonParseValue(tls *libc.TLS, pParse uintptr, i U32) int32 { /* sqlite3.c:1
return -1
}
for j = (i + U32(1)); ; j++ {
- for jsonIsSpace[uint8(*(*int8)(unsafe.Pointer(z + uintptr(j))))] != 0 {
+ for jsonIsSpace[uint8(*(*uint8)(unsafe.Pointer(z + uintptr(j))))] != 0 {
j++
}
if int32(libc.PreIncUint16(&(*JsonParse)(unsafe.Pointer(pParse)).FiDepth, 1)) > JSON_MAX_DEPTH {
@@ -148720,10 +151325,10 @@ func jsonParseValue(tls *libc.TLS, pParse uintptr, i U32) int32 { /* sqlite3.c:1
return -1
}
j = U32(x)
- for jsonIsSpace[uint8(*(*int8)(unsafe.Pointer(z + uintptr(j))))] != 0 {
+ for jsonIsSpace[uint8(*(*uint8)(unsafe.Pointer(z + uintptr(j))))] != 0 {
j++
}
- c = *(*int8)(unsafe.Pointer(z + uintptr(j)))
+ c = *(*uint8)(unsafe.Pointer(z + uintptr(j)))
if int32(c) == ',' {
continue
}
@@ -148739,13 +151344,13 @@ func jsonParseValue(tls *libc.TLS, pParse uintptr, i U32) int32 { /* sqlite3.c:1
var jnFlags U8 = U8(0)
j = (i + U32(1))
for {
- c = *(*int8)(unsafe.Pointer(z + uintptr(j)))
+ c = *(*uint8)(unsafe.Pointer(z + uintptr(j)))
if (int32(c) & libc.CplInt32(0x1f)) == 0 {
// Control characters are not allowed in strings
return -1
}
if int32(c) == '\\' {
- c = *(*int8)(unsafe.Pointer(z + uintptr(libc.PreIncUint32(&j, 1))))
+ c = *(*uint8)(unsafe.Pointer(z + uintptr(libc.PreIncUint32(&j, 1))))
if ((((((((int32(c) == '"') || (int32(c) == '\\')) || (int32(c) == '/')) || (int32(c) == 'b')) || (int32(c) == 'f')) ||
(int32(c) == 'n')) || (int32(c) == 'r')) || (int32(c) == 't')) ||
((int32(c) == 'u') && (jsonIs4Hex(tls, ((z+uintptr(j))+uintptr(1))) != 0)) {
@@ -148764,18 +151369,18 @@ func jsonParseValue(tls *libc.TLS, pParse uintptr, i U32) int32 { /* sqlite3.c:1
}
return (int32(j + U32(1)))
} else if ((int32(c) == 'n') &&
- (libc.Xstrncmp(tls, (z+uintptr(i)), ts+5127 /* "null" */, uint64(4)) == 0)) &&
- !((int32(Xsqlite3CtypeMap[uint8(*(*int8)(unsafe.Pointer(z + uintptr((i + U32(4))))))]) & 0x06) != 0) {
+ (libc.Xstrncmp(tls, (z+uintptr(i)), ts+5258 /* "null" */, uint64(4)) == 0)) &&
+ !((int32(Xsqlite3CtypeMap[uint8(*(*uint8)(unsafe.Pointer(z + uintptr((i + U32(4))))))]) & 0x06) != 0) {
jsonParseAddNode(tls, pParse, uint32(JSON_NULL), uint32(0), uintptr(0))
return (int32(i + U32(4)))
} else if ((int32(c) == 't') &&
- (libc.Xstrncmp(tls, (z+uintptr(i)), ts+5639 /* "true" */, uint64(4)) == 0)) &&
- !((int32(Xsqlite3CtypeMap[uint8(*(*int8)(unsafe.Pointer(z + uintptr((i + U32(4))))))]) & 0x06) != 0) {
+ (libc.Xstrncmp(tls, (z+uintptr(i)), ts+5770 /* "true" */, uint64(4)) == 0)) &&
+ !((int32(Xsqlite3CtypeMap[uint8(*(*uint8)(unsafe.Pointer(z + uintptr((i + U32(4))))))]) & 0x06) != 0) {
jsonParseAddNode(tls, pParse, uint32(JSON_TRUE), uint32(0), uintptr(0))
return (int32(i + U32(4)))
} else if ((int32(c) == 'f') &&
- (libc.Xstrncmp(tls, (z+uintptr(i)), ts+5644 /* "false" */, uint64(5)) == 0)) &&
- !((int32(Xsqlite3CtypeMap[uint8(*(*int8)(unsafe.Pointer(z + uintptr((i + U32(5))))))]) & 0x06) != 0) {
+ (libc.Xstrncmp(tls, (z+uintptr(i)), ts+5775 /* "false" */, uint64(5)) == 0)) &&
+ !((int32(Xsqlite3CtypeMap[uint8(*(*uint8)(unsafe.Pointer(z + uintptr((i + U32(5))))))]) & 0x06) != 0) {
jsonParseAddNode(tls, pParse, uint32(JSON_FALSE), uint32(0), uintptr(0))
return (int32(i + U32(5)))
} else if (int32(c) == '-') || ((int32(c) >= '0') && (int32(c) <= '9')) {
@@ -148789,18 +151394,18 @@ func jsonParseValue(tls *libc.TLS, pParse uintptr, i U32) int32 { /* sqlite3.c:1
} else {
j = i
}
- if ((int32(*(*int8)(unsafe.Pointer(z + uintptr(j)))) == '0') && (int32(*(*int8)(unsafe.Pointer(z + uintptr((j + U32(1)))))) >= '0')) && (int32(*(*int8)(unsafe.Pointer(z + uintptr((j + U32(1)))))) <= '9') {
+ if ((int32(*(*uint8)(unsafe.Pointer(z + uintptr(j)))) == '0') && (int32(*(*uint8)(unsafe.Pointer(z + uintptr((j + U32(1)))))) >= '0')) && (int32(*(*uint8)(unsafe.Pointer(z + uintptr((j + U32(1)))))) <= '9') {
return -1
}
}
j = (i + U32(1))
for ; ; j++ {
- c = *(*int8)(unsafe.Pointer(z + uintptr(j)))
+ c = *(*uint8)(unsafe.Pointer(z + uintptr(j)))
if (int32(c) >= '0') && (int32(c) <= '9') {
continue
}
if int32(c) == '.' {
- if int32(*(*int8)(unsafe.Pointer(z + uintptr((j - U32(1)))))) == '-' {
+ if int32(*(*uint8)(unsafe.Pointer(z + uintptr((j - U32(1)))))) == '-' {
return -1
}
if seenDP != 0 {
@@ -148810,17 +151415,17 @@ func jsonParseValue(tls *libc.TLS, pParse uintptr, i U32) int32 { /* sqlite3.c:1
continue
}
if (int32(c) == 'e') || (int32(c) == 'E') {
- if int32(*(*int8)(unsafe.Pointer(z + uintptr((j - U32(1)))))) < '0' {
+ if int32(*(*uint8)(unsafe.Pointer(z + uintptr((j - U32(1)))))) < '0' {
return -1
}
if seenE != 0 {
return -1
}
seenDP = libc.AssignUint8(&seenE, U8(1))
- c = *(*int8)(unsafe.Pointer(z + uintptr((j + U32(1)))))
+ c = *(*uint8)(unsafe.Pointer(z + uintptr((j + U32(1)))))
if (int32(c) == '+') || (int32(c) == '-') {
j++
- c = *(*int8)(unsafe.Pointer(z + uintptr((j + U32(1)))))
+ c = *(*uint8)(unsafe.Pointer(z + uintptr((j + U32(1)))))
}
if (int32(c) < '0') || (int32(c) > '9') {
return -1
@@ -148829,7 +151434,7 @@ func jsonParseValue(tls *libc.TLS, pParse uintptr, i U32) int32 { /* sqlite3.c:1
}
break
}
- if int32(*(*int8)(unsafe.Pointer(z + uintptr((j - U32(1)))))) < '0' {
+ if int32(*(*uint8)(unsafe.Pointer(z + uintptr((j - U32(1)))))) < '0' {
return -1
}
jsonParseAddNode(tls, pParse, func() uint32 {
@@ -148857,7 +151462,7 @@ func jsonParseValue(tls *libc.TLS, pParse uintptr, i U32) int32 { /* sqlite3.c:1
// pParse.
//
// pParse is uninitialized when this routine is called.
-func jsonParse(tls *libc.TLS, pParse uintptr, pCtx uintptr, zJson uintptr) int32 { /* sqlite3.c:189512:12: */
+func jsonParse(tls *libc.TLS, pParse uintptr, pCtx uintptr, zJson uintptr) int32 { /* sqlite3.c:190584:12: */
var i int32
libc.Xmemset(tls, pParse, 0, uint64(unsafe.Sizeof(JsonParse{})))
if zJson == uintptr(0) {
@@ -148870,10 +151475,10 @@ func jsonParse(tls *libc.TLS, pParse uintptr, pCtx uintptr, zJson uintptr) int32
}
if i > 0 {
- for jsonIsSpace[uint8(*(*int8)(unsafe.Pointer(zJson + uintptr(i))))] != 0 {
+ for jsonIsSpace[uint8(*(*uint8)(unsafe.Pointer(zJson + uintptr(i))))] != 0 {
i++
}
- if *(*int8)(unsafe.Pointer(zJson + uintptr(i))) != 0 {
+ if *(*uint8)(unsafe.Pointer(zJson + uintptr(i))) != 0 {
i = -1
}
}
@@ -148882,7 +151487,7 @@ func jsonParse(tls *libc.TLS, pParse uintptr, pCtx uintptr, zJson uintptr) int32
if (*JsonParse)(unsafe.Pointer(pParse)).Foom != 0 {
Xsqlite3_result_error_nomem(tls, pCtx)
} else {
- Xsqlite3_result_error(tls, pCtx, ts+22359 /* "malformed JSON" */, -1)
+ Xsqlite3_result_error(tls, pCtx, ts+22819 /* "malformed JSON" */, -1)
}
}
jsonParseReset(tls, pParse)
@@ -148893,7 +151498,7 @@ func jsonParse(tls *libc.TLS, pParse uintptr, pCtx uintptr, zJson uintptr) int32
// Mark node i of pParse as being a child of iParent. Call recursively
// to fill in all the descendants of node i.
-func jsonParseFillInParentage(tls *libc.TLS, pParse uintptr, i U32, iParent U32) { /* sqlite3.c:189545:13: */
+func jsonParseFillInParentage(tls *libc.TLS, pParse uintptr, i U32, iParent U32) { /* sqlite3.c:190617:13: */
var pNode uintptr = ((*JsonParse)(unsafe.Pointer(pParse)).FaNode + uintptr(i)*16)
var j U32
*(*U32)(unsafe.Pointer((*JsonParse)(unsafe.Pointer(pParse)).FaUp + uintptr(i)*4)) = iParent
@@ -148924,7 +151529,7 @@ func jsonParseFillInParentage(tls *libc.TLS, pParse uintptr, i U32, iParent U32)
}
// Compute the parentage of all nodes in a completed parse.
-func jsonParseFindParents(tls *libc.TLS, pParse uintptr) int32 { /* sqlite3.c:189572:12: */
+func jsonParseFindParents(tls *libc.TLS, pParse uintptr) int32 { /* sqlite3.c:190644:12: */
var aUp uintptr
aUp = libc.AssignPtrUintptr(pParse+24 /* &.aUp */, Xsqlite3_malloc64(tls, (uint64(uint64(unsafe.Sizeof(U32(0)))*uint64((*JsonParse)(unsafe.Pointer(pParse)).FnNode)))))
@@ -148944,7 +151549,7 @@ func jsonParseFindParents(tls *libc.TLS, pParse uintptr) int32 { /* sqlite3.c:18
// is no longer valid, parse the JSON again and return the new parse,
// and also register the new parse so that it will be available for
// future sqlite3_get_auxdata() calls.
-func jsonParseCached(tls *libc.TLS, pCtx uintptr, argv uintptr, pErrCtx uintptr) uintptr { /* sqlite3.c:189598:18: */
+func jsonParseCached(tls *libc.TLS, pCtx uintptr, argv uintptr, pErrCtx uintptr) uintptr { /* sqlite3.c:190670:18: */
var zJson uintptr = Xsqlite3_value_text(tls, *(*uintptr)(unsafe.Pointer(argv)))
var nJson int32 = Xsqlite3_value_bytes(tls, *(*uintptr)(unsafe.Pointer(argv)))
var p uintptr
@@ -149001,7 +151606,7 @@ func jsonParseCached(tls *libc.TLS, pCtx uintptr, argv uintptr, pErrCtx uintptr)
// Compare the OBJECT label at pNode against zKey,nKey. Return true on
// a match.
-func jsonLabelCompare(tls *libc.TLS, pNode uintptr, zKey uintptr, nKey U32) int32 { /* sqlite3.c:189660:12: */
+func jsonLabelCompare(tls *libc.TLS, pNode uintptr, zKey uintptr, nKey U32) int32 { /* sqlite3.c:190732:12: */
if (int32((*JsonNode)(unsafe.Pointer(pNode)).FjnFlags) & JNODE_RAW) != 0 {
if (*JsonNode)(unsafe.Pointer(pNode)).Fn != nKey {
return 0
@@ -149023,29 +151628,29 @@ func jsonLabelCompare(tls *libc.TLS, pNode uintptr, zKey uintptr, nKey U32) int3
// If pApnd!=0, then try to append new nodes to complete zPath if it is
// possible to do so and if no existing node corresponds to zPath. If
// new nodes are appended *pApnd is set to 1.
-func jsonLookupStep(tls *libc.TLS, pParse uintptr, iRoot U32, zPath uintptr, pApnd uintptr, pzErr uintptr) uintptr { /* sqlite3.c:189682:17: */
+func jsonLookupStep(tls *libc.TLS, pParse uintptr, iRoot U32, zPath uintptr, pApnd uintptr, pzErr uintptr) uintptr { /* sqlite3.c:190754:17: */
var i U32
var j U32
var nKey U32
var zKey uintptr
var pRoot uintptr = ((*JsonParse)(unsafe.Pointer(pParse)).FaNode + uintptr(iRoot)*16)
- if int32(*(*int8)(unsafe.Pointer(zPath))) == 0 {
+ if int32(*(*uint8)(unsafe.Pointer(zPath))) == 0 {
return pRoot
}
if (int32((*JsonNode)(unsafe.Pointer(pRoot)).FjnFlags) & JNODE_REPLACE) != 0 {
return uintptr(0)
}
- if int32(*(*int8)(unsafe.Pointer(zPath))) == '.' {
+ if int32(*(*uint8)(unsafe.Pointer(zPath))) == '.' {
if int32((*JsonNode)(unsafe.Pointer(pRoot)).FeType) != JSON_OBJECT {
return uintptr(0)
}
zPath++
- if int32(*(*int8)(unsafe.Pointer(zPath))) == '"' {
+ if int32(*(*uint8)(unsafe.Pointer(zPath))) == '"' {
zKey = (zPath + uintptr(1))
- for i = U32(1); (*(*int8)(unsafe.Pointer(zPath + uintptr(i))) != 0) && (int32(*(*int8)(unsafe.Pointer(zPath + uintptr(i)))) != '"'); i++ {
+ for i = U32(1); (*(*uint8)(unsafe.Pointer(zPath + uintptr(i))) != 0) && (int32(*(*uint8)(unsafe.Pointer(zPath + uintptr(i)))) != '"'); i++ {
}
nKey = (i - U32(1))
- if *(*int8)(unsafe.Pointer(zPath + uintptr(i))) != 0 {
+ if *(*uint8)(unsafe.Pointer(zPath + uintptr(i))) != 0 {
i++
} else {
*(*uintptr)(unsafe.Pointer(pzErr)) = zPath
@@ -149053,7 +151658,7 @@ func jsonLookupStep(tls *libc.TLS, pParse uintptr, iRoot U32, zPath uintptr, pAp
}
} else {
zKey = zPath
- for i = U32(0); ((*(*int8)(unsafe.Pointer(zPath + uintptr(i))) != 0) && (int32(*(*int8)(unsafe.Pointer(zPath + uintptr(i)))) != '.')) && (int32(*(*int8)(unsafe.Pointer(zPath + uintptr(i)))) != '['); i++ {
+ for i = U32(0); ((*(*uint8)(unsafe.Pointer(zPath + uintptr(i))) != 0) && (int32(*(*uint8)(unsafe.Pointer(zPath + uintptr(i)))) != '.')) && (int32(*(*uint8)(unsafe.Pointer(zPath + uintptr(i)))) != '['); i++ {
}
nKey = i
}
@@ -149096,15 +151701,15 @@ func jsonLookupStep(tls *libc.TLS, pParse uintptr, iRoot U32, zPath uintptr, pAp
}
return pNode
}
- } else if int32(*(*int8)(unsafe.Pointer(zPath))) == '[' {
+ } else if int32(*(*uint8)(unsafe.Pointer(zPath))) == '[' {
i = U32(0)
j = U32(1)
- for (int32(Xsqlite3CtypeMap[uint8(*(*int8)(unsafe.Pointer(zPath + uintptr(j))))]) & 0x04) != 0 {
- i = (((i * U32(10)) + U32(*(*int8)(unsafe.Pointer(zPath + uintptr(j))))) - U32('0'))
+ for (int32(Xsqlite3CtypeMap[uint8(*(*uint8)(unsafe.Pointer(zPath + uintptr(j))))]) & 0x04) != 0 {
+ i = (((i * U32(10)) + U32(*(*uint8)(unsafe.Pointer(zPath + uintptr(j))))) - U32('0'))
j++
}
- if (j < U32(2)) || (int32(*(*int8)(unsafe.Pointer(zPath + uintptr(j)))) != ']') {
- if int32(*(*int8)(unsafe.Pointer(zPath + 1))) == '#' {
+ if (j < U32(2)) || (int32(*(*uint8)(unsafe.Pointer(zPath + uintptr(j)))) != ']') {
+ if int32(*(*uint8)(unsafe.Pointer(zPath + 1))) == '#' {
var pBase uintptr = pRoot
var iBase int32 = int32(iRoot)
if int32((*JsonNode)(unsafe.Pointer(pRoot)).FeType) != JSON_ARRAY {
@@ -149125,11 +151730,11 @@ func jsonLookupStep(tls *libc.TLS, pParse uintptr, iRoot U32, zPath uintptr, pAp
j = U32(1)
}
j = U32(2)
- if (int32(*(*int8)(unsafe.Pointer(zPath + 2))) == '-') && ((int32(Xsqlite3CtypeMap[uint8(*(*int8)(unsafe.Pointer(zPath + 3)))]) & 0x04) != 0) {
+ if (int32(*(*uint8)(unsafe.Pointer(zPath + 2))) == '-') && ((int32(Xsqlite3CtypeMap[uint8(*(*uint8)(unsafe.Pointer(zPath + 3)))]) & 0x04) != 0) {
var x uint32 = uint32(0)
j = U32(3)
- for ok := true; ok; ok = ((int32(Xsqlite3CtypeMap[uint8(*(*int8)(unsafe.Pointer(zPath + uintptr(j))))]) & 0x04) != 0) {
- x = (((x * uint32(10)) + uint32(*(*int8)(unsafe.Pointer(zPath + uintptr(j))))) - uint32('0'))
+ for ok := true; ok; ok = ((int32(Xsqlite3CtypeMap[uint8(*(*uint8)(unsafe.Pointer(zPath + uintptr(j))))]) & 0x04) != 0) {
+ x = (((x * uint32(10)) + uint32(*(*uint8)(unsafe.Pointer(zPath + uintptr(j))))) - uint32('0'))
j++
}
if x > i {
@@ -149137,7 +151742,7 @@ func jsonLookupStep(tls *libc.TLS, pParse uintptr, iRoot U32, zPath uintptr, pAp
}
i = i - (x)
}
- if int32(*(*int8)(unsafe.Pointer(zPath + uintptr(j)))) != ']' {
+ if int32(*(*uint8)(unsafe.Pointer(zPath + uintptr(j)))) != ']' {
*(*uintptr)(unsafe.Pointer(pzErr)) = zPath
return uintptr(0)
}
@@ -149191,18 +151796,18 @@ func jsonLookupStep(tls *libc.TLS, pParse uintptr, iRoot U32, zPath uintptr, pAp
// Append content to pParse that will complete zPath. Return a pointer
// to the inserted node, or return NULL if the append fails.
-func jsonLookupAppend(tls *libc.TLS, pParse uintptr, zPath uintptr, pApnd uintptr, pzErr uintptr) uintptr { /* sqlite3.c:189827:17: */
+func jsonLookupAppend(tls *libc.TLS, pParse uintptr, zPath uintptr, pApnd uintptr, pzErr uintptr) uintptr { /* sqlite3.c:190899:17: */
*(*int32)(unsafe.Pointer(pApnd)) = 1
- if int32(*(*int8)(unsafe.Pointer(zPath))) == 0 {
+ if int32(*(*uint8)(unsafe.Pointer(zPath))) == 0 {
jsonParseAddNode(tls, pParse, uint32(JSON_NULL), uint32(0), uintptr(0))
if (*JsonParse)(unsafe.Pointer(pParse)).Foom != 0 {
return uintptr(0)
}
return ((*JsonParse)(unsafe.Pointer(pParse)).FaNode + uintptr(((*JsonParse)(unsafe.Pointer(pParse)).FnNode-U32(1)))*16)
}
- if int32(*(*int8)(unsafe.Pointer(zPath))) == '.' {
+ if int32(*(*uint8)(unsafe.Pointer(zPath))) == '.' {
jsonParseAddNode(tls, pParse, uint32(JSON_OBJECT), uint32(0), uintptr(0))
- } else if libc.Xstrncmp(tls, zPath, ts+22374 /* "[0]" */, uint64(3)) == 0 {
+ } else if libc.Xstrncmp(tls, zPath, ts+22834 /* "[0]" */, uint64(3)) == 0 {
jsonParseAddNode(tls, pParse, uint32(JSON_ARRAY), uint32(0), uintptr(0))
} else {
return uintptr(0)
@@ -149215,11 +151820,11 @@ func jsonLookupAppend(tls *libc.TLS, pParse uintptr, zPath uintptr, pApnd uintpt
// Return the text of a syntax error message on a JSON path. Space is
// obtained from sqlite3_malloc().
-func jsonPathSyntaxError(tls *libc.TLS, zErr uintptr) uintptr { /* sqlite3.c:189853:13: */
+func jsonPathSyntaxError(tls *libc.TLS, zErr uintptr) uintptr { /* sqlite3.c:190925:13: */
bp := tls.Alloc(8)
defer tls.Free(8)
- return Xsqlite3_mprintf(tls, ts+22378 /* "JSON path error ..." */, libc.VaList(bp, zErr))
+ return Xsqlite3_mprintf(tls, ts+22838 /* "JSON path error ..." */, libc.VaList(bp, zErr))
}
// Do a node lookup using zPath. Return a pointer to the node on success.
@@ -149230,7 +151835,7 @@ func jsonPathSyntaxError(tls *libc.TLS, zErr uintptr) uintptr { /* sqlite3.c:189
//
// If pApnd!=NULL then try to append missing nodes and set *pApnd = 1 if
// nodes are appended.
-func jsonLookup(tls *libc.TLS, pParse uintptr, zPath uintptr, pApnd uintptr, pCtx uintptr) uintptr { /* sqlite3.c:189867:17: */
+func jsonLookup(tls *libc.TLS, pParse uintptr, zPath uintptr, pApnd uintptr, pCtx uintptr) uintptr { /* sqlite3.c:190939:17: */
bp := tls.Alloc(8)
defer tls.Free(8)
@@ -149247,7 +151852,7 @@ func jsonLookup(tls *libc.TLS, pParse uintptr, zPath uintptr, pApnd uintptr, pCt
return uintptr(0)
__1:
;
- if !(int32(*(*int8)(unsafe.Pointer(zPath))) != '$') {
+ if !(int32(*(*uint8)(unsafe.Pointer(zPath))) != '$') {
goto __2
}
*(*uintptr)(unsafe.Pointer(bp /* zErr */)) = zPath
@@ -149282,18 +151887,18 @@ __5:
// Report the wrong number of arguments for json_insert(), json_replace()
// or json_set().
-func jsonWrongNumArgs(tls *libc.TLS, pCtx uintptr, zFuncName uintptr) { /* sqlite3.c:189904:13: */
+func jsonWrongNumArgs(tls *libc.TLS, pCtx uintptr, zFuncName uintptr) { /* sqlite3.c:190976:13: */
bp := tls.Alloc(8)
defer tls.Free(8)
- var zMsg uintptr = Xsqlite3_mprintf(tls, ts+22404, /* "json_%s() needs ..." */
+ var zMsg uintptr = Xsqlite3_mprintf(tls, ts+22864, /* "json_%s() needs ..." */
libc.VaList(bp, zFuncName))
Xsqlite3_result_error(tls, pCtx, zMsg, -1)
Xsqlite3_free(tls, zMsg)
}
// Mark all NULL entries in the Object passed in as JNODE_REMOVE.
-func jsonRemoveAllNulls(tls *libc.TLS, pNode uintptr) { /* sqlite3.c:189917:13: */
+func jsonRemoveAllNulls(tls *libc.TLS, pNode uintptr) { /* sqlite3.c:190989:13: */
var i int32
var n int32
@@ -149324,7 +151929,7 @@ func jsonRemoveAllNulls(tls *libc.TLS, pNode uintptr) { /* sqlite3.c:189917:13:
// corresponding to the SQL value input. Mostly this means putting
// double-quotes around strings and returning the unquoted string "null"
// when given a NULL input.
-func jsonQuoteFunc(tls *libc.TLS, ctx uintptr, argc int32, argv uintptr) { /* sqlite3.c:190002:13: */
+func jsonQuoteFunc(tls *libc.TLS, ctx uintptr, argc int32, argv uintptr) { /* sqlite3.c:191074:13: */
bp := tls.Alloc(136)
defer tls.Free(136)
@@ -149341,7 +151946,7 @@ func jsonQuoteFunc(tls *libc.TLS, ctx uintptr, argc int32, argv uintptr) { /* sq
// Implementation of the json_array(VALUE,...) function. Return a JSON
// array that contains all values given in arguments. Or if any argument
// is a BLOB, throw an error.
-func jsonArrayFunc(tls *libc.TLS, ctx uintptr, argc int32, argv uintptr) { /* sqlite3.c:190021:13: */
+func jsonArrayFunc(tls *libc.TLS, ctx uintptr, argc int32, argv uintptr) { /* sqlite3.c:191093:13: */
bp := tls.Alloc(136)
defer tls.Free(136)
@@ -149349,12 +151954,12 @@ func jsonArrayFunc(tls *libc.TLS, ctx uintptr, argc int32, argv uintptr) { /* sq
// var jx JsonString at bp, 136
jsonInit(tls, bp /* &jx */, ctx)
- jsonAppendChar(tls, bp /* &jx */, int8('['))
+ jsonAppendChar(tls, bp /* &jx */, uint8('['))
for i = 0; i < argc; i++ {
jsonAppendSeparator(tls, bp /* &jx */)
jsonAppendValue(tls, bp /* &jx */, *(*uintptr)(unsafe.Pointer(argv + uintptr(i)*8)))
}
- jsonAppendChar(tls, bp /* &jx */, int8(']'))
+ jsonAppendChar(tls, bp /* &jx */, uint8(']'))
jsonResult(tls, bp /* &jx */)
Xsqlite3_result_subtype(tls, ctx, uint32(JSON_SUBTYPE))
}
@@ -149364,7 +151969,7 @@ func jsonArrayFunc(tls *libc.TLS, ctx uintptr, argc int32, argv uintptr) { /* sq
//
// Return the number of elements in the top-level JSON array.
// Return 0 if the input is not a well-formed JSON array.
-func jsonArrayLengthFunc(tls *libc.TLS, ctx uintptr, argc int32, argv uintptr) { /* sqlite3.c:190048:13: */
+func jsonArrayLengthFunc(tls *libc.TLS, ctx uintptr, argc int32, argv uintptr) { /* sqlite3.c:191120:13: */
var p uintptr // The parse
var n Sqlite3_int64 = int64(0)
var i U32
@@ -149399,7 +152004,7 @@ func jsonArrayLengthFunc(tls *libc.TLS, ctx uintptr, argc int32, argv uintptr) {
// PATH element. If there are multiple PATHs, then return a JSON array
// with the result from each path. Throw an error if the JSON or any PATH
// is malformed.
-func jsonExtractFunc(tls *libc.TLS, ctx uintptr, argc int32, argv uintptr) { /* sqlite3.c:190087:13: */
+func jsonExtractFunc(tls *libc.TLS, ctx uintptr, argc int32, argv uintptr) { /* sqlite3.c:191159:13: */
bp := tls.Alloc(136)
defer tls.Free(136)
@@ -149418,7 +152023,7 @@ func jsonExtractFunc(tls *libc.TLS, ctx uintptr, argc int32, argv uintptr) { /*
return
}
jsonInit(tls, bp /* &jx */, ctx)
- jsonAppendChar(tls, bp /* &jx */, int8('['))
+ jsonAppendChar(tls, bp /* &jx */, uint8('['))
for i = 1; i < argc; i++ {
zPath = Xsqlite3_value_text(tls, *(*uintptr)(unsafe.Pointer(argv + uintptr(i)*8)))
pNode = jsonLookup(tls, p, zPath, uintptr(0), ctx)
@@ -149430,14 +152035,14 @@ func jsonExtractFunc(tls *libc.TLS, ctx uintptr, argc int32, argv uintptr) { /*
if pNode != 0 {
jsonRenderNode(tls, pNode, bp /* &jx */, uintptr(0))
} else {
- jsonAppendRaw(tls, bp /* &jx */, ts+5127 /* "null" */, uint32(4))
+ jsonAppendRaw(tls, bp /* &jx */, ts+5258 /* "null" */, uint32(4))
}
} else if pNode != 0 {
jsonReturn(tls, pNode, ctx, uintptr(0))
}
}
if (argc > 2) && (i == argc) {
- jsonAppendChar(tls, bp /* &jx */, int8(']'))
+ jsonAppendChar(tls, bp /* &jx */, uint8(']'))
jsonResult(tls, bp /* &jx */)
Xsqlite3_result_subtype(tls, ctx, uint32(JSON_SUBTYPE))
}
@@ -149445,7 +152050,7 @@ func jsonExtractFunc(tls *libc.TLS, ctx uintptr, argc int32, argv uintptr) { /*
}
// This is the RFC 7396 MergePatch algorithm.
-func jsonMergePatch(tls *libc.TLS, pParse uintptr, iTarget U32, pPatch uintptr) uintptr { /* sqlite3.c:190128:17: */
+func jsonMergePatch(tls *libc.TLS, pParse uintptr, iTarget U32, pPatch uintptr) uintptr { /* sqlite3.c:191200:17: */
var i U32
var j U32
var iRoot U32
@@ -149514,7 +152119,7 @@ func jsonMergePatch(tls *libc.TLS, pParse uintptr, iTarget U32, pPatch uintptr)
// Implementation of the json_mergepatch(JSON1,JSON2) function. Return a JSON
// object that is the result of running the RFC 7396 MergePatch() algorithm
// on the two arguments.
-func jsonPatchFunc(tls *libc.TLS, ctx uintptr, argc int32, argv uintptr) { /* sqlite3.c:190198:13: */
+func jsonPatchFunc(tls *libc.TLS, ctx uintptr, argc int32, argv uintptr) { /* sqlite3.c:191270:13: */
bp := tls.Alloc(96)
defer tls.Free(96)
@@ -149546,7 +152151,7 @@ func jsonPatchFunc(tls *libc.TLS, ctx uintptr, argc int32, argv uintptr) { /* sq
// Implementation of the json_object(NAME,VALUE,...) function. Return a JSON
// object that contains all name/value given in arguments. Or if any name
// is not a string or if any value is a BLOB, throw an error.
-func jsonObjectFunc(tls *libc.TLS, ctx uintptr, argc int32, argv uintptr) { /* sqlite3.c:190230:13: */
+func jsonObjectFunc(tls *libc.TLS, ctx uintptr, argc int32, argv uintptr) { /* sqlite3.c:191302:13: */
bp := tls.Alloc(136)
defer tls.Free(136)
@@ -149558,14 +152163,14 @@ func jsonObjectFunc(tls *libc.TLS, ctx uintptr, argc int32, argv uintptr) { /* s
if (argc & 1) != 0 {
Xsqlite3_result_error(tls, ctx,
- ts+22447 /* "json_object() re..." */, -1)
+ ts+22907 /* "json_object() re..." */, -1)
return
}
jsonInit(tls, bp /* &jx */, ctx)
- jsonAppendChar(tls, bp /* &jx */, int8('{'))
+ jsonAppendChar(tls, bp /* &jx */, uint8('{'))
for i = 0; i < argc; i = i + (2) {
if Xsqlite3_value_type(tls, *(*uintptr)(unsafe.Pointer(argv + uintptr(i)*8))) != SQLITE_TEXT {
- Xsqlite3_result_error(tls, ctx, ts+22498 /* "json_object() la..." */, -1)
+ Xsqlite3_result_error(tls, ctx, ts+22958 /* "json_object() la..." */, -1)
jsonReset(tls, bp /* &jx */)
return
}
@@ -149573,10 +152178,10 @@ func jsonObjectFunc(tls *libc.TLS, ctx uintptr, argc int32, argv uintptr) { /* s
z = Xsqlite3_value_text(tls, *(*uintptr)(unsafe.Pointer(argv + uintptr(i)*8)))
n = U32(Xsqlite3_value_bytes(tls, *(*uintptr)(unsafe.Pointer(argv + uintptr(i)*8))))
jsonAppendString(tls, bp /* &jx */, z, n)
- jsonAppendChar(tls, bp /* &jx */, int8(':'))
+ jsonAppendChar(tls, bp /* &jx */, uint8(':'))
jsonAppendValue(tls, bp /* &jx */, *(*uintptr)(unsafe.Pointer(argv + uintptr((i+1))*8)))
}
- jsonAppendChar(tls, bp /* &jx */, int8('}'))
+ jsonAppendChar(tls, bp /* &jx */, uint8('}'))
jsonResult(tls, bp /* &jx */)
Xsqlite3_result_subtype(tls, ctx, uint32(JSON_SUBTYPE))
}
@@ -149585,7 +152190,7 @@ func jsonObjectFunc(tls *libc.TLS, ctx uintptr, argc int32, argv uintptr) { /* s
//
// Remove the named elements from JSON and return the result. malformed
// JSON or PATH arguments result in an error.
-func jsonRemoveFunc(tls *libc.TLS, ctx uintptr, argc int32, argv uintptr) { /* sqlite3.c:190272:13: */
+func jsonRemoveFunc(tls *libc.TLS, ctx uintptr, argc int32, argv uintptr) { /* sqlite3.c:191344:13: */
bp := tls.Alloc(48)
defer tls.Free(48)
@@ -149654,7 +152259,7 @@ remove_done:
//
// Replace the value at PATH with VALUE. If PATH does not already exist,
// this routine is a no-op. If JSON or PATH is malformed, throw an error.
-func jsonReplaceFunc(tls *libc.TLS, ctx uintptr, argc int32, argv uintptr) { /* sqlite3.c:190305:13: */
+func jsonReplaceFunc(tls *libc.TLS, ctx uintptr, argc int32, argv uintptr) { /* sqlite3.c:191377:13: */
bp := tls.Alloc(48)
defer tls.Free(48)
@@ -149673,7 +152278,7 @@ __1:
if !((argc & 1) == 0) {
goto __2
}
- jsonWrongNumArgs(tls, ctx, ts+13581 /* "replace" */)
+ jsonWrongNumArgs(tls, ctx, ts+14034 /* "replace" */)
return
__2:
;
@@ -149734,7 +152339,7 @@ replace_err:
//
// Create PATH and initialize it to VALUE. If PATH already exists, this
// routine is a no-op. If JSON or PATH is malformed, throw an error.
-func jsonSetFunc(tls *libc.TLS, ctx uintptr, argc int32, argv uintptr) { /* sqlite3.c:190352:13: */
+func jsonSetFunc(tls *libc.TLS, ctx uintptr, argc int32, argv uintptr) { /* sqlite3.c:191424:13: */
bp := tls.Alloc(52)
defer tls.Free(52)
@@ -149759,9 +152364,9 @@ __1:
}
jsonWrongNumArgs(tls, ctx, func() uintptr {
if bIsSet != 0 {
- return ts + 22532 /* "set" */
+ return ts + 22992 /* "set" */
}
- return ts + 22536 /* "insert" */
+ return ts + 22996 /* "insert" */
}())
return
__2:
@@ -149830,7 +152435,7 @@ jsonSetDone:
//
// Return the top-level "type" of a JSON string. Throw an error if
// either the JSON or PATH inputs are not well-formed.
-func jsonTypeFunc(tls *libc.TLS, ctx uintptr, argc int32, argv uintptr) { /* sqlite3.c:190401:13: */
+func jsonTypeFunc(tls *libc.TLS, ctx uintptr, argc int32, argv uintptr) { /* sqlite3.c:191473:13: */
var p uintptr // The parse
var zPath uintptr
var pNode uintptr
@@ -149854,7 +152459,7 @@ func jsonTypeFunc(tls *libc.TLS, ctx uintptr, argc int32, argv uintptr) { /* sql
//
// Return 1 if JSON is a well-formed JSON string according to RFC-7159.
// Return 0 otherwise.
-func jsonValidFunc(tls *libc.TLS, ctx uintptr, argc int32, argv uintptr) { /* sqlite3.c:190429:13: */
+func jsonValidFunc(tls *libc.TLS, ctx uintptr, argc int32, argv uintptr) { /* sqlite3.c:191501:13: */
var p uintptr // The parse
_ = argc
p = jsonParseCached(tls, ctx, argv, uintptr(0))
@@ -149868,28 +152473,28 @@ func jsonValidFunc(tls *libc.TLS, ctx uintptr, argc int32, argv uintptr) { /* sq
// json_group_array(VALUE)
//
// Return a JSON array composed of all values in the aggregate.
-func jsonArrayStep(tls *libc.TLS, ctx uintptr, argc int32, argv uintptr) { /* sqlite3.c:190449:13: */
+func jsonArrayStep(tls *libc.TLS, ctx uintptr, argc int32, argv uintptr) { /* sqlite3.c:191521:13: */
var pStr uintptr
_ = argc
pStr = Xsqlite3_aggregate_context(tls, ctx, int32(unsafe.Sizeof(JsonString{})))
if pStr != 0 {
if (*JsonString)(unsafe.Pointer(pStr)).FzBuf == uintptr(0) {
jsonInit(tls, pStr, ctx)
- jsonAppendChar(tls, pStr, int8('['))
+ jsonAppendChar(tls, pStr, uint8('['))
} else if (*JsonString)(unsafe.Pointer(pStr)).FnUsed > uint64(1) {
- jsonAppendChar(tls, pStr, int8(','))
- (*JsonString)(unsafe.Pointer(pStr)).FpCtx = ctx
+ jsonAppendChar(tls, pStr, uint8(','))
}
+ (*JsonString)(unsafe.Pointer(pStr)).FpCtx = ctx
jsonAppendValue(tls, pStr, *(*uintptr)(unsafe.Pointer(argv)))
}
}
-func jsonArrayCompute(tls *libc.TLS, ctx uintptr, isFinal int32) { /* sqlite3.c:190468:13: */
+func jsonArrayCompute(tls *libc.TLS, ctx uintptr, isFinal int32) { /* sqlite3.c:191540:13: */
var pStr uintptr
pStr = Xsqlite3_aggregate_context(tls, ctx, 0)
if pStr != 0 {
(*JsonString)(unsafe.Pointer(pStr)).FpCtx = ctx
- jsonAppendChar(tls, pStr, int8(']'))
+ jsonAppendChar(tls, pStr, uint8(']'))
if (*JsonString)(unsafe.Pointer(pStr)).FbErr != 0 {
if int32((*JsonString)(unsafe.Pointer(pStr)).FbErr) == 1 {
Xsqlite3_result_error_nomem(tls, ctx)
@@ -149909,16 +152514,16 @@ func jsonArrayCompute(tls *libc.TLS, ctx uintptr, isFinal int32) { /* sqlite3.c:
(*JsonString)(unsafe.Pointer(pStr)).FnUsed--
}
} else {
- Xsqlite3_result_text(tls, ctx, ts+22543 /* "[]" */, 2, uintptr(0))
+ Xsqlite3_result_text(tls, ctx, ts+23003 /* "[]" */, 2, uintptr(0))
}
Xsqlite3_result_subtype(tls, ctx, uint32(JSON_SUBTYPE))
}
-func jsonArrayValue(tls *libc.TLS, ctx uintptr) { /* sqlite3.c:190490:13: */
+func jsonArrayValue(tls *libc.TLS, ctx uintptr) { /* sqlite3.c:191562:13: */
jsonArrayCompute(tls, ctx, 0)
}
-func jsonArrayFinal(tls *libc.TLS, ctx uintptr) { /* sqlite3.c:190493:13: */
+func jsonArrayFinal(tls *libc.TLS, ctx uintptr) { /* sqlite3.c:191565:13: */
jsonArrayCompute(tls, ctx, 1)
}
@@ -149926,12 +152531,12 @@ func jsonArrayFinal(tls *libc.TLS, ctx uintptr) { /* sqlite3.c:190493:13: */
// It works by removing the first element of the group by searching forward
// to the first comma (",") that is not within a string and deleting all
// text through that comma.
-func jsonGroupInverse(tls *libc.TLS, ctx uintptr, argc int32, argv uintptr) { /* sqlite3.c:190504:13: */
+func jsonGroupInverse(tls *libc.TLS, ctx uintptr, argc int32, argv uintptr) { /* sqlite3.c:191576:13: */
var i uint32
var inStr int32 = 0
var nNest int32 = 0
var z uintptr
- var c int8
+ var c uint8
var pStr uintptr
_ = argc
_ = argv
@@ -149942,11 +152547,7 @@ func jsonGroupInverse(tls *libc.TLS, ctx uintptr, argc int32, argv uintptr) { /*
return
}
z = (*JsonString)(unsafe.Pointer(pStr)).FzBuf
- for i = uint32(1); (((int32(libc.AssignInt8(&c, *(*int8)(unsafe.Pointer(z + uintptr(i)))))) != ',') || (inStr != 0)) || (nNest != 0); i++ {
- if U64(i) >= (*JsonString)(unsafe.Pointer(pStr)).FnUsed {
- (*JsonString)(unsafe.Pointer(pStr)).FnUsed = uint64(1)
- return
- }
+ for i = uint32(1); (U64(i) < (*JsonString)(unsafe.Pointer(pStr)).FnUsed) && ((((int32(libc.AssignUint8(&c, *(*uint8)(unsafe.Pointer(z + uintptr(i)))))) != ',') || (inStr != 0)) || (nNest != 0)); i++ {
if int32(c) == '"' {
inStr = libc.BoolInt32(!(inStr != 0))
} else if int32(c) == '\\' {
@@ -149960,14 +152561,19 @@ func jsonGroupInverse(tls *libc.TLS, ctx uintptr, argc int32, argv uintptr) { /*
}
}
}
- *(*U64)(unsafe.Pointer(pStr + 24 /* &.nUsed */)) -= (U64(i))
- libc.Xmemmove(tls, (z + 1), (z + uintptr((i + uint32(1)))), (Size_t((*JsonString)(unsafe.Pointer(pStr)).FnUsed) - uint64(1)))
+ if U64(i) < (*JsonString)(unsafe.Pointer(pStr)).FnUsed {
+ *(*U64)(unsafe.Pointer(pStr + 24 /* &.nUsed */)) -= (U64(i))
+ libc.Xmemmove(tls, (z + 1), (z + uintptr((i + uint32(1)))), (Size_t((*JsonString)(unsafe.Pointer(pStr)).FnUsed) - uint64(1)))
+ *(*uint8)(unsafe.Pointer(z + uintptr((*JsonString)(unsafe.Pointer(pStr)).FnUsed))) = uint8(0)
+ } else {
+ (*JsonString)(unsafe.Pointer(pStr)).FnUsed = uint64(1)
+ }
}
// json_group_obj(NAME,VALUE)
//
// Return a JSON object composed of all names and values in the aggregate.
-func jsonObjectStep(tls *libc.TLS, ctx uintptr, argc int32, argv uintptr) { /* sqlite3.c:190551:13: */
+func jsonObjectStep(tls *libc.TLS, ctx uintptr, argc int32, argv uintptr) { /* sqlite3.c:191624:13: */
var pStr uintptr
var z uintptr
var n U32
@@ -149976,24 +152582,24 @@ func jsonObjectStep(tls *libc.TLS, ctx uintptr, argc int32, argv uintptr) { /* s
if pStr != 0 {
if (*JsonString)(unsafe.Pointer(pStr)).FzBuf == uintptr(0) {
jsonInit(tls, pStr, ctx)
- jsonAppendChar(tls, pStr, int8('{'))
+ jsonAppendChar(tls, pStr, uint8('{'))
} else if (*JsonString)(unsafe.Pointer(pStr)).FnUsed > uint64(1) {
- jsonAppendChar(tls, pStr, int8(','))
- (*JsonString)(unsafe.Pointer(pStr)).FpCtx = ctx
+ jsonAppendChar(tls, pStr, uint8(','))
}
+ (*JsonString)(unsafe.Pointer(pStr)).FpCtx = ctx
z = Xsqlite3_value_text(tls, *(*uintptr)(unsafe.Pointer(argv)))
n = U32(Xsqlite3_value_bytes(tls, *(*uintptr)(unsafe.Pointer(argv))))
jsonAppendString(tls, pStr, z, n)
- jsonAppendChar(tls, pStr, int8(':'))
+ jsonAppendChar(tls, pStr, uint8(':'))
jsonAppendValue(tls, pStr, *(*uintptr)(unsafe.Pointer(argv + 1*8)))
}
}
-func jsonObjectCompute(tls *libc.TLS, ctx uintptr, isFinal int32) { /* sqlite3.c:190576:13: */
+func jsonObjectCompute(tls *libc.TLS, ctx uintptr, isFinal int32) { /* sqlite3.c:191649:13: */
var pStr uintptr
pStr = Xsqlite3_aggregate_context(tls, ctx, 0)
if pStr != 0 {
- jsonAppendChar(tls, pStr, int8('}'))
+ jsonAppendChar(tls, pStr, uint8('}'))
if (*JsonString)(unsafe.Pointer(pStr)).FbErr != 0 {
if int32((*JsonString)(unsafe.Pointer(pStr)).FbErr) == 1 {
Xsqlite3_result_error_nomem(tls, ctx)
@@ -150013,16 +152619,16 @@ func jsonObjectCompute(tls *libc.TLS, ctx uintptr, isFinal int32) { /* sqlite3.c
(*JsonString)(unsafe.Pointer(pStr)).FnUsed--
}
} else {
- Xsqlite3_result_text(tls, ctx, ts+22546 /* "{}" */, 2, uintptr(0))
+ Xsqlite3_result_text(tls, ctx, ts+23006 /* "{}" */, 2, uintptr(0))
}
Xsqlite3_result_subtype(tls, ctx, uint32(JSON_SUBTYPE))
}
-func jsonObjectValue(tls *libc.TLS, ctx uintptr) { /* sqlite3.c:190597:13: */
+func jsonObjectValue(tls *libc.TLS, ctx uintptr) { /* sqlite3.c:191670:13: */
jsonObjectCompute(tls, ctx, 0)
}
-func jsonObjectFinal(tls *libc.TLS, ctx uintptr) { /* sqlite3.c:190600:13: */
+func jsonObjectFinal(tls *libc.TLS, ctx uintptr) { /* sqlite3.c:191673:13: */
jsonObjectCompute(tls, ctx, 1)
}
@@ -150031,27 +152637,27 @@ func jsonObjectFinal(tls *libc.TLS, ctx uintptr) { /* sqlite3.c:190600:13: */
// The json_each virtual table
//
type JsonEachCursor1 = struct {
- Fbase Sqlite3_vtab_cursor
- FiRowid U32
- FiBegin U32
- Fi U32
- FiEnd U32
- FeType U8
- FbRecursive U8
- _ [6]byte
- FzJson uintptr
- FzRoot uintptr
- FsParse JsonParse
-} /* sqlite3.c:190610:9 */
+ Fbase Sqlite3_vtab_cursor
+ FiRowid U32
+ FiBegin U32
+ Fi U32
+ FiEnd U32
+ FeType U8
+ FbRecursive U8
+ F__ccgo_pad1 [6]byte
+ FzJson uintptr
+ FzRoot uintptr
+ FsParse JsonParse
+} /* sqlite3.c:191683:9 */
// ***************************************************************************
//
// The json_each virtual table
//
-type JsonEachCursor = JsonEachCursor1 /* sqlite3.c:190610:31 */
+type JsonEachCursor = JsonEachCursor1 /* sqlite3.c:191683:31 */
// Constructor for the json_each virtual table
-func jsonEachConnect(tls *libc.TLS, db uintptr, pAux uintptr, argc int32, argv uintptr, ppVtab uintptr, pzErr uintptr) int32 { /* sqlite3.c:190625:12: */
+func jsonEachConnect(tls *libc.TLS, db uintptr, pAux uintptr, argc int32, argv uintptr, ppVtab uintptr, pzErr uintptr) int32 { /* sqlite3.c:191698:12: */
var pNew uintptr
var rc int32
@@ -150066,7 +152672,7 @@ func jsonEachConnect(tls *libc.TLS, db uintptr, pAux uintptr, argc int32, argv u
_ = pAux
rc = Xsqlite3_declare_vtab(tls, db,
- ts+22549 /* "CREATE TABLE x(k..." */)
+ ts+23009 /* "CREATE TABLE x(k..." */)
if rc == SQLITE_OK {
pNew = libc.AssignPtrUintptr(ppVtab, Xsqlite3_malloc(tls, int32(unsafe.Sizeof(Sqlite3_vtab{}))))
if pNew == uintptr(0) {
@@ -150079,13 +152685,13 @@ func jsonEachConnect(tls *libc.TLS, db uintptr, pAux uintptr, argc int32, argv u
}
// destructor for json_each virtual table
-func jsonEachDisconnect(tls *libc.TLS, pVtab uintptr) int32 { /* sqlite3.c:190667:12: */
+func jsonEachDisconnect(tls *libc.TLS, pVtab uintptr) int32 { /* sqlite3.c:191740:12: */
Xsqlite3_free(tls, pVtab)
return SQLITE_OK
}
// constructor for a JsonEachCursor object for json_each().
-func jsonEachOpenEach(tls *libc.TLS, p uintptr, ppCursor uintptr) int32 { /* sqlite3.c:190673:12: */
+func jsonEachOpenEach(tls *libc.TLS, p uintptr, ppCursor uintptr) int32 { /* sqlite3.c:191746:12: */
var pCur uintptr
_ = p
@@ -150099,7 +152705,7 @@ func jsonEachOpenEach(tls *libc.TLS, p uintptr, ppCursor uintptr) int32 { /* sql
}
// constructor for a JsonEachCursor object for json_tree().
-func jsonEachOpenTree(tls *libc.TLS, p uintptr, ppCursor uintptr) int32 { /* sqlite3.c:190685:12: */
+func jsonEachOpenTree(tls *libc.TLS, p uintptr, ppCursor uintptr) int32 { /* sqlite3.c:191758:12: */
var rc int32 = jsonEachOpenEach(tls, p, ppCursor)
if rc == SQLITE_OK {
var pCur uintptr = *(*uintptr)(unsafe.Pointer(ppCursor))
@@ -150110,7 +152716,7 @@ func jsonEachOpenTree(tls *libc.TLS, p uintptr, ppCursor uintptr) int32 { /* sql
// Reset a JsonEachCursor back to its original state. Free any memory
// held.
-func jsonEachCursorReset(tls *libc.TLS, p uintptr) { /* sqlite3.c:190696:13: */
+func jsonEachCursorReset(tls *libc.TLS, p uintptr) { /* sqlite3.c:191769:13: */
Xsqlite3_free(tls, (*JsonEachCursor)(unsafe.Pointer(p)).FzJson)
Xsqlite3_free(tls, (*JsonEachCursor)(unsafe.Pointer(p)).FzRoot)
jsonParseReset(tls, (p + 48 /* &.sParse */))
@@ -150123,7 +152729,7 @@ func jsonEachCursorReset(tls *libc.TLS, p uintptr) { /* sqlite3.c:190696:13: */
}
// Destructor for a jsonEachCursor object
-func jsonEachClose(tls *libc.TLS, cur uintptr) int32 { /* sqlite3.c:190709:12: */
+func jsonEachClose(tls *libc.TLS, cur uintptr) int32 { /* sqlite3.c:191782:12: */
var p uintptr = cur
jsonEachCursorReset(tls, p)
Xsqlite3_free(tls, cur)
@@ -150132,13 +152738,13 @@ func jsonEachClose(tls *libc.TLS, cur uintptr) int32 { /* sqlite3.c:190709:12: *
// Return TRUE if the jsonEachCursor object has been advanced off the end
// of the JSON object
-func jsonEachEof(tls *libc.TLS, cur uintptr) int32 { /* sqlite3.c:190718:12: */
+func jsonEachEof(tls *libc.TLS, cur uintptr) int32 { /* sqlite3.c:191791:12: */
var p uintptr = cur
return (libc.Bool32((*JsonEachCursor)(unsafe.Pointer(p)).Fi >= (*JsonEachCursor)(unsafe.Pointer(p)).FiEnd))
}
// Advance the cursor to the next element for json_tree()
-func jsonEachNext(tls *libc.TLS, cur uintptr) int32 { /* sqlite3.c:190724:12: */
+func jsonEachNext(tls *libc.TLS, cur uintptr) int32 { /* sqlite3.c:191797:12: */
var p uintptr = cur
if (*JsonEachCursor)(unsafe.Pointer(p)).FbRecursive != 0 {
if (int32((*JsonNode)(unsafe.Pointer((*JsonEachCursor)(unsafe.Pointer(p)).FsParse.FaNode+uintptr((*JsonEachCursor)(unsafe.Pointer(p)).Fi)*16)).FjnFlags) & JNODE_LABEL) != 0 {
@@ -150188,7 +152794,7 @@ func jsonEachNext(tls *libc.TLS, cur uintptr) int32 { /* sqlite3.c:190724:12: */
}
// Append the name of the path for element i to pStr
-func jsonEachComputePath(tls *libc.TLS, p uintptr, pStr uintptr, i U32) { /* sqlite3.c:190765:13: */
+func jsonEachComputePath(tls *libc.TLS, p uintptr, pStr uintptr, i U32) { /* sqlite3.c:191838:13: */
bp := tls.Alloc(24)
defer tls.Free(24)
@@ -150196,7 +152802,7 @@ func jsonEachComputePath(tls *libc.TLS, p uintptr, pStr uintptr, i U32) { /* sql
var pUp uintptr
var iUp U32
if i == U32(0) {
- jsonAppendChar(tls, pStr, int8('$'))
+ jsonAppendChar(tls, pStr, uint8('$'))
return
}
iUp = *(*U32)(unsafe.Pointer((*JsonEachCursor)(unsafe.Pointer(p)).FsParse.FaUp + uintptr(i)*4))
@@ -150204,19 +152810,19 @@ func jsonEachComputePath(tls *libc.TLS, p uintptr, pStr uintptr, i U32) { /* sql
pNode = ((*JsonEachCursor)(unsafe.Pointer(p)).FsParse.FaNode + uintptr(i)*16)
pUp = ((*JsonEachCursor)(unsafe.Pointer(p)).FsParse.FaNode + uintptr(iUp)*16)
if int32((*JsonNode)(unsafe.Pointer(pUp)).FeType) == JSON_ARRAY {
- jsonPrintf(tls, 30, pStr, ts+22632 /* "[%d]" */, libc.VaList(bp, *(*U32)(unsafe.Pointer(pUp + 8 /* &.u */))))
+ jsonPrintf(tls, 30, pStr, ts+23092 /* "[%d]" */, libc.VaList(bp, *(*U32)(unsafe.Pointer(pUp + 8 /* &.u */))))
} else {
if (int32((*JsonNode)(unsafe.Pointer(pNode)).FjnFlags) & JNODE_LABEL) == 0 {
pNode -= 16
}
- jsonPrintf(tls, (int32((*JsonNode)(unsafe.Pointer(pNode)).Fn + U32(1))), pStr, ts+22637 /* ".%.*s" */, libc.VaList(bp+8, ((*JsonNode)(unsafe.Pointer(pNode)).Fn-U32(2)), (*(*uintptr)(unsafe.Pointer(pNode + 8 /* &.u */))+uintptr(1))))
+ jsonPrintf(tls, (int32((*JsonNode)(unsafe.Pointer(pNode)).Fn + U32(1))), pStr, ts+23097 /* ".%.*s" */, libc.VaList(bp+8, ((*JsonNode)(unsafe.Pointer(pNode)).Fn-U32(2)), (*(*uintptr)(unsafe.Pointer(pNode + 8 /* &.u */))+uintptr(1))))
}
}
// Return the value of a column
-func jsonEachColumn(tls *libc.TLS, cur uintptr, ctx uintptr, i int32) int32 { /* sqlite3.c:190792:12: */
+func jsonEachColumn(tls *libc.TLS, cur uintptr, ctx uintptr, i int32) int32 { /* sqlite3.c:191865:12: */
bp := tls.Alloc(296)
defer tls.Free(296)
@@ -150301,12 +152907,12 @@ func jsonEachColumn(tls *libc.TLS, cur uintptr, ctx uintptr, i int32) int32 { /*
if (*JsonEachCursor)(unsafe.Pointer(p)).FzRoot != 0 {
jsonAppendRaw(tls, bp+24 /* &x */, (*JsonEachCursor)(unsafe.Pointer(p)).FzRoot, uint32(int32(libc.Xstrlen(tls, (*JsonEachCursor)(unsafe.Pointer(p)).FzRoot))))
} else {
- jsonAppendChar(tls, bp+24 /* &x */, int8('$'))
+ jsonAppendChar(tls, bp+24 /* &x */, uint8('$'))
}
if int32((*JsonEachCursor)(unsafe.Pointer(p)).FeType) == JSON_ARRAY {
- jsonPrintf(tls, 30, bp+24 /* &x */, ts+22632 /* "[%d]" */, libc.VaList(bp, (*JsonEachCursor)(unsafe.Pointer(p)).FiRowid))
+ jsonPrintf(tls, 30, bp+24 /* &x */, ts+23092 /* "[%d]" */, libc.VaList(bp, (*JsonEachCursor)(unsafe.Pointer(p)).FiRowid))
} else if int32((*JsonEachCursor)(unsafe.Pointer(p)).FeType) == JSON_OBJECT {
- jsonPrintf(tls, int32((*JsonNode)(unsafe.Pointer(pThis)).Fn), bp+24 /* &x */, ts+22637 /* ".%.*s" */, libc.VaList(bp+8, ((*JsonNode)(unsafe.Pointer(pThis)).Fn-U32(2)), (*(*uintptr)(unsafe.Pointer(pThis + 8 /* &.u */))+uintptr(1))))
+ jsonPrintf(tls, int32((*JsonNode)(unsafe.Pointer(pThis)).Fn), bp+24 /* &x */, ts+23097 /* ".%.*s" */, libc.VaList(bp+8, ((*JsonNode)(unsafe.Pointer(pThis)).Fn-U32(2)), (*(*uintptr)(unsafe.Pointer(pThis + 8 /* &.u */))+uintptr(1))))
}
}
jsonResult(tls, bp+24 /* &x */)
@@ -150330,7 +152936,7 @@ func jsonEachColumn(tls *libc.TLS, cur uintptr, ctx uintptr, i int32) int32 { /*
{
var zRoot uintptr = (*JsonEachCursor)(unsafe.Pointer(p)).FzRoot
if zRoot == uintptr(0) {
- zRoot = ts + 22643 /* "$" */
+ zRoot = ts + 23103 /* "$" */
}
Xsqlite3_result_text(tls, ctx, zRoot, -1, uintptr(0))
break
@@ -150348,7 +152954,7 @@ func jsonEachColumn(tls *libc.TLS, cur uintptr, ctx uintptr, i int32) int32 { /*
}
// Return the current rowid value
-func jsonEachRowid(tls *libc.TLS, cur uintptr, pRowid uintptr) int32 { /* sqlite3.c:190891:12: */
+func jsonEachRowid(tls *libc.TLS, cur uintptr, pRowid uintptr) int32 { /* sqlite3.c:191964:12: */
var p uintptr = cur
*(*Sqlite_int64)(unsafe.Pointer(pRowid)) = Sqlite_int64((*JsonEachCursor)(unsafe.Pointer(p)).FiRowid)
return SQLITE_OK
@@ -150358,7 +152964,7 @@ func jsonEachRowid(tls *libc.TLS, cur uintptr, pRowid uintptr) int32 { /* sqlite
// column. Without such a constraint, the table cannot operate. idxNum is
// 1 if the constraint is found, 3 if the constraint and zRoot are found,
// and 0 otherwise.
-func jsonEachBestIndex(tls *libc.TLS, tab uintptr, pIdxInfo uintptr) int32 { /* sqlite3.c:190902:12: */
+func jsonEachBestIndex(tls *libc.TLS, tab uintptr, pIdxInfo uintptr) int32 { /* sqlite3.c:191975:12: */
bp := tls.Alloc(8)
defer tls.Free(8)
@@ -150433,7 +153039,7 @@ __3:
}
// Start a search on a new JSON string
-func jsonEachFilter(tls *libc.TLS, cur uintptr, idxNum int32, idxStr uintptr, argc int32, argv uintptr) int32 { /* sqlite3.c:190960:12: */
+func jsonEachFilter(tls *libc.TLS, cur uintptr, idxNum int32, idxStr uintptr, argc int32, argv uintptr) int32 { /* sqlite3.c:192033:12: */
bp := tls.Alloc(8)
defer tls.Free(8)
@@ -150462,7 +153068,7 @@ func jsonEachFilter(tls *libc.TLS, cur uintptr, idxNum int32, idxStr uintptr, ar
var rc int32 = SQLITE_NOMEM
if int32((*JsonEachCursor)(unsafe.Pointer(p)).FsParse.Foom) == 0 {
Xsqlite3_free(tls, (*Sqlite3_vtab)(unsafe.Pointer((*Sqlite3_vtab_cursor)(unsafe.Pointer(cur)).FpVtab)).FzErrMsg)
- (*Sqlite3_vtab)(unsafe.Pointer((*Sqlite3_vtab_cursor)(unsafe.Pointer(cur)).FpVtab)).FzErrMsg = Xsqlite3_mprintf(tls, ts+22359 /* "malformed JSON" */, 0)
+ (*Sqlite3_vtab)(unsafe.Pointer((*Sqlite3_vtab_cursor)(unsafe.Pointer(cur)).FpVtab)).FzErrMsg = Xsqlite3_mprintf(tls, ts+22819 /* "malformed JSON" */, 0)
if (*Sqlite3_vtab)(unsafe.Pointer((*Sqlite3_vtab_cursor)(unsafe.Pointer(cur)).FpVtab)).FzErrMsg != 0 {
rc = SQLITE_ERROR
}
@@ -150486,7 +153092,7 @@ func jsonEachFilter(tls *libc.TLS, cur uintptr, idxNum int32, idxStr uintptr, ar
return SQLITE_NOMEM
}
libc.Xmemcpy(tls, (*JsonEachCursor)(unsafe.Pointer(p)).FzRoot, zRoot, (Size_t(n) + uint64(1)))
- if int32(*(*int8)(unsafe.Pointer(zRoot))) != '$' {
+ if int32(*(*uint8)(unsafe.Pointer(zRoot))) != '$' {
*(*uintptr)(unsafe.Pointer(bp /* zErr */)) = zRoot
} else {
pNode = jsonLookupStep(tls, (p + 48 /* &.sParse */), uint32(0), ((*JsonEachCursor)(unsafe.Pointer(p)).FzRoot + uintptr(1)), uintptr(0), bp /* &zErr */)
@@ -150537,7 +153143,7 @@ var jsonEachModule = Sqlite3_module{ // xCreate
FxEof: 0, // xEof - check for end of scan
FxColumn: 0, // xColumn - read data
FxRowid: 0, // xShadowName
-} /* sqlite3.c:191039:23 */
+} /* sqlite3.c:192112:23 */
// The methods of the json_tree virtual table.
var jsonTreeModule = Sqlite3_module{ // xCreate
@@ -150551,7 +153157,7 @@ var jsonTreeModule = Sqlite3_module{ // xCreate
FxEof: 0, // xEof - check for end of scan
FxColumn: 0, // xColumn - read data
FxRowid: 0, // xShadowName
-} /* sqlite3.c:191067:23 */
+} /* sqlite3.c:192140:23 */
// ***************************************************************************
//
@@ -150560,7 +153166,7 @@ var jsonTreeModule = Sqlite3_module{ // xCreate
// functions and the virtual table implemented by this file.
//
-func Xsqlite3Json1Init(tls *libc.TLS, db uintptr) int32 { /* sqlite3.c:191101:20: */
+func Xsqlite3Json1Init(tls *libc.TLS, db uintptr) int32 { /* sqlite3.c:192174:20: */
var rc int32 = SQLITE_OK
var i uint32
for i = uint32(0); (uint64(i) < (uint64(unsafe.Sizeof(aFunc)) / uint64(unsafe.Sizeof(struct {
@@ -150574,12 +153180,12 @@ func Xsqlite3Json1Init(tls *libc.TLS, db uintptr) int32 { /* sqlite3.c:191101:20
aFunc[i].FxFunc, uintptr(0), uintptr(0))
}
for i = uint32(0); (uint64(i) < (uint64(unsafe.Sizeof(aAgg)) / uint64(unsafe.Sizeof(struct {
- FzName uintptr
- FnArg int32
- _ [4]byte
- FxStep uintptr
- FxFinal uintptr
- FxValue uintptr
+ FzName uintptr
+ FnArg int32
+ F__ccgo_pad1 [4]byte
+ FxStep uintptr
+ FxFinal uintptr
+ FxValue uintptr
}{})))) && (rc == SQLITE_OK); i++ {
rc = Xsqlite3_create_window_function(tls, db, aAgg[i].FzName, aAgg[i].FnArg,
(SQLITE_SUBTYPE | enc), uintptr(0),
@@ -150603,43 +153209,43 @@ var aFunc = [15]struct {
Fflag int32
FxFunc uintptr
}{
- {FzName: ts + 22645 /* "json" */, FnArg: 1, FxFunc: 0},
- {FzName: ts + 22650 /* "json_array" */, FnArg: -1, FxFunc: 0},
- {FzName: ts + 22661 /* "json_array_lengt..." */, FnArg: 1, FxFunc: 0},
- {FzName: ts + 22661 /* "json_array_lengt..." */, FnArg: 2, FxFunc: 0},
- {FzName: ts + 22679 /* "json_extract" */, FnArg: -1, FxFunc: 0},
- {FzName: ts + 22692 /* "json_insert" */, FnArg: -1, FxFunc: 0},
- {FzName: ts + 22704 /* "json_object" */, FnArg: -1, FxFunc: 0},
- {FzName: ts + 22716 /* "json_patch" */, FnArg: 2, FxFunc: 0},
- {FzName: ts + 22727 /* "json_quote" */, FnArg: 1, FxFunc: 0},
- {FzName: ts + 22738 /* "json_remove" */, FnArg: -1, FxFunc: 0},
- {FzName: ts + 22750 /* "json_replace" */, FnArg: -1, FxFunc: 0},
- {FzName: ts + 22763 /* "json_set" */, FnArg: -1, Fflag: 1, FxFunc: 0},
- {FzName: ts + 22772 /* "json_type" */, FnArg: 1, FxFunc: 0},
- {FzName: ts + 22772 /* "json_type" */, FnArg: 2, FxFunc: 0},
- {FzName: ts + 22782 /* "json_valid" */, FnArg: 1, FxFunc: 0},
-} /* sqlite3.c:191109:5 */
+ {FzName: ts + 23105 /* "json" */, FnArg: 1, FxFunc: 0},
+ {FzName: ts + 23110 /* "json_array" */, FnArg: -1, FxFunc: 0},
+ {FzName: ts + 23121 /* "json_array_lengt..." */, FnArg: 1, FxFunc: 0},
+ {FzName: ts + 23121 /* "json_array_lengt..." */, FnArg: 2, FxFunc: 0},
+ {FzName: ts + 23139 /* "json_extract" */, FnArg: -1, FxFunc: 0},
+ {FzName: ts + 23152 /* "json_insert" */, FnArg: -1, FxFunc: 0},
+ {FzName: ts + 23164 /* "json_object" */, FnArg: -1, FxFunc: 0},
+ {FzName: ts + 23176 /* "json_patch" */, FnArg: 2, FxFunc: 0},
+ {FzName: ts + 23187 /* "json_quote" */, FnArg: 1, FxFunc: 0},
+ {FzName: ts + 23198 /* "json_remove" */, FnArg: -1, FxFunc: 0},
+ {FzName: ts + 23210 /* "json_replace" */, FnArg: -1, FxFunc: 0},
+ {FzName: ts + 23223 /* "json_set" */, FnArg: -1, Fflag: 1, FxFunc: 0},
+ {FzName: ts + 23232 /* "json_type" */, FnArg: 1, FxFunc: 0},
+ {FzName: ts + 23232 /* "json_type" */, FnArg: 2, FxFunc: 0},
+ {FzName: ts + 23242 /* "json_valid" */, FnArg: 1, FxFunc: 0},
+} /* sqlite3.c:192182:5 */
var aAgg = [2]struct {
- FzName uintptr
- FnArg int32
- _ [4]byte
- FxStep uintptr
- FxFinal uintptr
- FxValue uintptr
+ FzName uintptr
+ FnArg int32
+ F__ccgo_pad1 [4]byte
+ FxStep uintptr
+ FxFinal uintptr
+ FxValue uintptr
}{
- {FzName: ts + 22793 /* "json_group_array" */, FnArg: 1,
+ {FzName: ts + 23253 /* "json_group_array" */, FnArg: 1,
FxStep: 0, FxFinal: 0, FxValue: 0},
- {FzName: ts + 22810 /* "json_group_objec..." */, FnArg: 2,
+ {FzName: ts + 23270 /* "json_group_objec..." */, FnArg: 2,
FxStep: 0, FxFinal: 0, FxValue: 0},
-} /* sqlite3.c:191138:5 */
+} /* sqlite3.c:192211:5 */
var aMod = [2]struct {
FzName uintptr
FpModule uintptr
}{
- {FzName: ts + 22828 /* "json_each" */, FpModule: 0},
- {FzName: ts + 22838 /* "json_tree" */, FpModule: 0},
-} /* sqlite3.c:191148:5 */
-var enc int32 = ((SQLITE_UTF8 | SQLITE_DETERMINISTIC) | SQLITE_INNOCUOUS) /* sqlite3.c:191153:20 */ // In the SQLite core
+ {FzName: ts + 23288 /* "json_each" */, FpModule: 0},
+ {FzName: ts + 23298 /* "json_tree" */, FpModule: 0},
+} /* sqlite3.c:192221:5 */
+var enc int32 = ((SQLITE_UTF8 | SQLITE_DETERMINISTIC) | SQLITE_INNOCUOUS) /* sqlite3.c:192226:20 */ // In the SQLite core
// #include
// #include
@@ -150659,19 +153265,19 @@ type Rtree1 = struct {
FinWrTrans U8
FnAux U8
FnAuxNotNull U8
- _ [1]byte
+ F__ccgo_pad1 [1]byte
FiDepth int32
FzDb uintptr
FzName uintptr
FnBusy U32
- _ [4]byte
+ F__ccgo_pad2 [4]byte
FnRowEst I64
FnCursor U32
FnNodeRef U32
FzReadAuxSql uintptr
FpDeleted uintptr
FiReinsertHeight int32
- _ [4]byte
+ F__ccgo_pad3 [4]byte
FpNodeBlob uintptr
FpWriteNode uintptr
FpDeleteNode uintptr
@@ -150683,7 +153289,7 @@ type Rtree1 = struct {
FpDeleteParent uintptr
FpWriteAux uintptr
FaHash [97]uintptr
-} /* sqlite3.c:191289:9 */
+} /* sqlite3.c:192362:9 */
// In the SQLite core
@@ -150694,30 +153300,30 @@ type Rtree1 = struct {
// The following macro is used to suppress compiler warnings.
-type Rtree = Rtree1 /* sqlite3.c:191289:22 */
+type Rtree = Rtree1 /* sqlite3.c:192362:22 */
type RtreeCursor1 = struct {
Fbase Sqlite3_vtab_cursor
FatEOF U8
FbPoint U8
FbAuxValid U8
- _ [1]byte
+ F__ccgo_pad1 [1]byte
FiStrategy int32
FnConstraint int32
- _ [4]byte
+ F__ccgo_pad2 [4]byte
FaConstraint uintptr
FnPointAlloc int32
FnPoint int32
FmxLevel int32
- _ [4]byte
+ F__ccgo_pad3 [4]byte
FaPoint uintptr
FpReadAux uintptr
FsPoint RtreeSearchPoint
FaNode [5]uintptr
FanQueue [41]U32
- _ [4]byte
-} /* sqlite3.c:191290:9 */
+ F__ccgo_pad4 [4]byte
+} /* sqlite3.c:192363:9 */
-type RtreeCursor = RtreeCursor1 /* sqlite3.c:191290:28 */
+type RtreeCursor = RtreeCursor1 /* sqlite3.c:192363:28 */
type RtreeNode1 = struct {
FpParent uintptr
FiNode I64
@@ -150725,63 +153331,63 @@ type RtreeNode1 = struct {
FisDirty int32
FzData uintptr
FpNext uintptr
-} /* sqlite3.c:191289:9 */
+} /* sqlite3.c:192362:9 */
-type RtreeNode = RtreeNode1 /* sqlite3.c:191291:26 */
+type RtreeNode = RtreeNode1 /* sqlite3.c:192364:26 */
type RtreeCell1 = struct {
FiRowid I64
FaCoord [10]RtreeCoord
-} /* sqlite3.c:191292:9 */
+} /* sqlite3.c:192365:9 */
-type RtreeCell = RtreeCell1 /* sqlite3.c:191292:26 */
+type RtreeCell = RtreeCell1 /* sqlite3.c:192365:26 */
type RtreeConstraint1 = struct {
FiCoord int32
Fop int32
Fu struct{ FrValue RtreeDValue }
FpInfo uintptr
-} /* sqlite3.c:191290:9 */
+} /* sqlite3.c:192363:9 */
-type RtreeConstraint = RtreeConstraint1 /* sqlite3.c:191293:32 */
+type RtreeConstraint = RtreeConstraint1 /* sqlite3.c:192366:32 */
type RtreeMatchArg1 = struct {
- FiSize U32
- _ [4]byte
- Fcb RtreeGeomCallback
- FnParam int32
- _ [4]byte
- FapSqlParam uintptr
- FaParam [1]RtreeDValue
-} /* sqlite3.c:191294:9 */
-
-type RtreeMatchArg = RtreeMatchArg1 /* sqlite3.c:191294:30 */
+ FiSize U32
+ F__ccgo_pad1 [4]byte
+ Fcb RtreeGeomCallback
+ FnParam int32
+ F__ccgo_pad2 [4]byte
+ FapSqlParam uintptr
+ FaParam [1]RtreeDValue
+} /* sqlite3.c:192367:9 */
+
+type RtreeMatchArg = RtreeMatchArg1 /* sqlite3.c:192367:30 */
type RtreeGeomCallback1 = struct {
FxGeom uintptr
FxQueryFunc uintptr
FxDestructor uintptr
FpContext uintptr
-} /* sqlite3.c:191294:9 */
+} /* sqlite3.c:192367:9 */
-type RtreeGeomCallback = RtreeGeomCallback1 /* sqlite3.c:191295:34 */
-type RtreeCoord1 = struct{ Ff RtreeValue } /* sqlite3.c:191292:9 */
+type RtreeGeomCallback = RtreeGeomCallback1 /* sqlite3.c:192368:34 */
+type RtreeCoord1 = struct{ Ff RtreeValue } /* sqlite3.c:192365:9 */
-type RtreeCoord = RtreeCoord1 /* sqlite3.c:191296:26 */
+type RtreeCoord = RtreeCoord1 /* sqlite3.c:192369:26 */
type RtreeSearchPoint1 = struct {
- FrScore RtreeDValue
- Fid Sqlite3_int64
- FiLevel U8
- FeWithin U8
- FiCell U8
- _ [5]byte
-} /* sqlite3.c:191290:9 */
+ FrScore RtreeDValue
+ Fid Sqlite3_int64
+ FiLevel U8
+ FeWithin U8
+ FiCell U8
+ F__ccgo_pad1 [5]byte
+} /* sqlite3.c:192363:9 */
-type RtreeSearchPoint = RtreeSearchPoint1 /* sqlite3.c:191297:33 */
+type RtreeSearchPoint = RtreeSearchPoint1 /* sqlite3.c:192370:33 */
// Possible values for Rtree.eCoordType:
// If SQLITE_RTREE_INT_ONLY is defined, then this virtual table will
// only deal with integer coordinates. No floating point operations
// will be done.
-type RtreeDValue = float64 /* sqlite3.c:191392:18 */ // High accuracy coordinate
-type RtreeValue = float32 /* sqlite3.c:191393:17 */
+type RtreeDValue = float64 /* sqlite3.c:192465:18 */ // High accuracy coordinate
+type RtreeValue = float32 /* sqlite3.c:192466:17 */
// What version of GCC is being used. 0 means GCC is not being used .
// Note that the GCC_VERSION macro will also be set correctly when using
@@ -150807,28 +153413,28 @@ type RtreeValue = float32 /* sqlite3.c:191393:17 */
// Functions to deserialize a 16 bit integer, 32 bit real number and
// 64 bit integer. The deserialized value is returned.
-func readInt16(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:191672:12: */
+func readInt16(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:192745:12: */
return ((int32(*(*U8)(unsafe.Pointer(p))) << 8) + int32(*(*U8)(unsafe.Pointer(p + 1))))
}
-func readCoord(tls *libc.TLS, p uintptr, pCoord uintptr) { /* sqlite3.c:191675:13: */
+func readCoord(tls *libc.TLS, p uintptr, pCoord uintptr) { /* sqlite3.c:192748:13: */
// p is always 4-byte aligned
(*(*U32)(unsafe.Pointer(pCoord /* .Fu */))) = (((((U32(*(*U8)(unsafe.Pointer(p)))) << 24) + ((U32(*(*U8)(unsafe.Pointer(p + 1)))) << 16)) + ((U32(*(*U8)(unsafe.Pointer(p + 2)))) << 8)) + ((U32(*(*U8)(unsafe.Pointer(p + 3)))) << 0))
}
-func readInt64(tls *libc.TLS, p uintptr) I64 { /* sqlite3.c:191692:12: */
+func readInt64(tls *libc.TLS, p uintptr) I64 { /* sqlite3.c:192765:12: */
return (I64(((((((((U64(*(*U8)(unsafe.Pointer(p)))) << 56) + ((U64(*(*U8)(unsafe.Pointer(p + 1)))) << 48)) + ((U64(*(*U8)(unsafe.Pointer(p + 2)))) << 40)) + ((U64(*(*U8)(unsafe.Pointer(p + 3)))) << 32)) + ((U64(*(*U8)(unsafe.Pointer(p + 4)))) << 24)) + ((U64(*(*U8)(unsafe.Pointer(p + 5)))) << 16)) + ((U64(*(*U8)(unsafe.Pointer(p + 6)))) << 8)) + ((U64(*(*U8)(unsafe.Pointer(p + 7)))) << 0)))
}
// Functions to serialize a 16 bit integer, 32 bit real number and
// 64 bit integer. The value returned is the number of bytes written
// to the argument buffer (always 2, 4 and 8 respectively).
-func writeInt16(tls *libc.TLS, p uintptr, i int32) { /* sqlite3.c:191724:13: */
+func writeInt16(tls *libc.TLS, p uintptr, i int32) { /* sqlite3.c:192797:13: */
*(*U8)(unsafe.Pointer(p)) = (U8((i >> 8) & 0xFF))
*(*U8)(unsafe.Pointer(p + 1)) = (U8((i >> 0) & 0xFF))
}
-func writeCoord(tls *libc.TLS, p uintptr, pCoord uintptr) int32 { /* sqlite3.c:191728:12: */
+func writeCoord(tls *libc.TLS, p uintptr, pCoord uintptr) int32 { /* sqlite3.c:192801:12: */
var i U32
// p is always 4-byte aligned
@@ -150840,7 +153446,7 @@ func writeCoord(tls *libc.TLS, p uintptr, pCoord uintptr) int32 { /* sqlite3.c:1
return 4
}
-func writeInt64(tls *libc.TLS, p uintptr, i I64) int32 { /* sqlite3.c:191751:12: */
+func writeInt64(tls *libc.TLS, p uintptr, i I64) int32 { /* sqlite3.c:192824:12: */
*(*U8)(unsafe.Pointer(p)) = (U8((i >> 56) & int64(0xFF)))
*(*U8)(unsafe.Pointer(p + 1)) = (U8((i >> 48) & int64(0xFF)))
*(*U8)(unsafe.Pointer(p + 2)) = (U8((i >> 40) & int64(0xFF)))
@@ -150853,7 +153459,7 @@ func writeInt64(tls *libc.TLS, p uintptr, i I64) int32 { /* sqlite3.c:191751:12:
}
// Increment the reference count of node p.
-func nodeReference(tls *libc.TLS, p uintptr) { /* sqlite3.c:191776:13: */
+func nodeReference(tls *libc.TLS, p uintptr) { /* sqlite3.c:192849:13: */
if p != 0 {
(*RtreeNode)(unsafe.Pointer(p)).FnRef++
@@ -150861,20 +153467,20 @@ func nodeReference(tls *libc.TLS, p uintptr) { /* sqlite3.c:191776:13: */
}
// Clear the content of node p (set all bytes to 0x00).
-func nodeZero(tls *libc.TLS, pRtree uintptr, p uintptr) { /* sqlite3.c:191786:13: */
+func nodeZero(tls *libc.TLS, pRtree uintptr, p uintptr) { /* sqlite3.c:192859:13: */
libc.Xmemset(tls, ((*RtreeNode)(unsafe.Pointer(p)).FzData + 2), 0, (uint64((*Rtree)(unsafe.Pointer(pRtree)).FiNodeSize - 2)))
(*RtreeNode)(unsafe.Pointer(p)).FisDirty = 1
}
// Given a node number iNode, return the corresponding key to use
// in the Rtree.aHash table.
-func nodeHash(tls *libc.TLS, iNode I64) uint32 { /* sqlite3.c:191795:21: */
+func nodeHash(tls *libc.TLS, iNode I64) uint32 { /* sqlite3.c:192868:21: */
return ((uint32(iNode)) % uint32(HASHSIZE))
}
// Search the node hash table for node iNode. If found, return a pointer
// to it. Otherwise, return 0.
-func nodeHashLookup(tls *libc.TLS, pRtree uintptr, iNode I64) uintptr { /* sqlite3.c:191803:18: */
+func nodeHashLookup(tls *libc.TLS, pRtree uintptr, iNode I64) uintptr { /* sqlite3.c:192876:18: */
var p uintptr
for p = *(*uintptr)(unsafe.Pointer((pRtree + 192 /* &.aHash */) + uintptr(nodeHash(tls, iNode))*8)); (p != 0) && ((*RtreeNode)(unsafe.Pointer(p)).FiNode != iNode); p = (*RtreeNode)(unsafe.Pointer(p)).FpNext {
}
@@ -150882,7 +153488,7 @@ func nodeHashLookup(tls *libc.TLS, pRtree uintptr, iNode I64) uintptr { /* sqlit
}
// Add node pNode to the node hash table.
-func nodeHashInsert(tls *libc.TLS, pRtree uintptr, pNode uintptr) { /* sqlite3.c:191812:13: */
+func nodeHashInsert(tls *libc.TLS, pRtree uintptr, pNode uintptr) { /* sqlite3.c:192885:13: */
var iHash int32
iHash = int32(nodeHash(tls, (*RtreeNode)(unsafe.Pointer(pNode)).FiNode))
@@ -150891,7 +153497,7 @@ func nodeHashInsert(tls *libc.TLS, pRtree uintptr, pNode uintptr) { /* sqlite3.c
}
// Remove node pNode from the node hash table.
-func nodeHashDelete(tls *libc.TLS, pRtree uintptr, pNode uintptr) { /* sqlite3.c:191823:13: */
+func nodeHashDelete(tls *libc.TLS, pRtree uintptr, pNode uintptr) { /* sqlite3.c:192896:13: */
var pp uintptr
if (*RtreeNode)(unsafe.Pointer(pNode)).FiNode != int64(0) {
pp = ((pRtree + 192 /* &.aHash */) + uintptr(nodeHash(tls, (*RtreeNode)(unsafe.Pointer(pNode)).FiNode))*8)
@@ -150906,7 +153512,7 @@ func nodeHashDelete(tls *libc.TLS, pRtree uintptr, pNode uintptr) { /* sqlite3.c
// indicating that node has not yet been assigned a node number. It is
// assigned a node number when nodeWrite() is called to write the
// node contents out to the database.
-func nodeNew(tls *libc.TLS, pRtree uintptr, pParent uintptr) uintptr { /* sqlite3.c:191839:18: */
+func nodeNew(tls *libc.TLS, pRtree uintptr, pParent uintptr) uintptr { /* sqlite3.c:192912:18: */
var pNode uintptr
pNode = Xsqlite3_malloc64(tls, (uint64(uint64(unsafe.Sizeof(RtreeNode{})) + uint64((*Rtree)(unsafe.Pointer(pRtree)).FiNodeSize))))
if pNode != 0 {
@@ -150922,7 +153528,7 @@ func nodeNew(tls *libc.TLS, pRtree uintptr, pParent uintptr) uintptr { /* sqlite
}
// Clear the Rtree.pNodeBlob object
-func nodeBlobReset(tls *libc.TLS, pRtree uintptr) { /* sqlite3.c:191857:13: */
+func nodeBlobReset(tls *libc.TLS, pRtree uintptr) { /* sqlite3.c:192930:13: */
if (((*Rtree)(unsafe.Pointer(pRtree)).FpNodeBlob != 0) && (int32((*Rtree)(unsafe.Pointer(pRtree)).FinWrTrans) == 0)) && ((*Rtree)(unsafe.Pointer(pRtree)).FnCursor == U32(0)) {
var pBlob uintptr = (*Rtree)(unsafe.Pointer(pRtree)).FpNodeBlob
(*Rtree)(unsafe.Pointer(pRtree)).FpNodeBlob = uintptr(0)
@@ -150932,7 +153538,7 @@ func nodeBlobReset(tls *libc.TLS, pRtree uintptr) { /* sqlite3.c:191857:13: */
// Check to see if pNode is the same as pParent or any of the parents
// of pParent.
-func nodeInParentChain(tls *libc.TLS, pNode uintptr, pParent uintptr) int32 { /* sqlite3.c:191869:12: */
+func nodeInParentChain(tls *libc.TLS, pNode uintptr, pParent uintptr) int32 { /* sqlite3.c:192942:12: */
for ok := true; ok; ok = pParent != 0 {
if pNode == pParent {
return 1
@@ -150943,7 +153549,7 @@ func nodeInParentChain(tls *libc.TLS, pNode uintptr, pParent uintptr) int32 { /*
}
// Obtain a reference to an r-tree node.
-func nodeAcquire(tls *libc.TLS, pRtree uintptr, iNode I64, pParent uintptr, ppNode uintptr) int32 { /* sqlite3.c:191880:12: */
+func nodeAcquire(tls *libc.TLS, pRtree uintptr, iNode I64, pParent uintptr, ppNode uintptr) int32 { /* sqlite3.c:192953:12: */
bp := tls.Alloc(8)
defer tls.Free(8)
@@ -150982,11 +153588,11 @@ func nodeAcquire(tls *libc.TLS, pRtree uintptr, iNode I64, pParent uintptr, ppNo
}
}
if (*Rtree)(unsafe.Pointer(pRtree)).FpNodeBlob == uintptr(0) {
- var zTab uintptr = Xsqlite3_mprintf(tls, ts+22848 /* "%s_node" */, libc.VaList(bp, (*Rtree)(unsafe.Pointer(pRtree)).FzName))
+ var zTab uintptr = Xsqlite3_mprintf(tls, ts+23308 /* "%s_node" */, libc.VaList(bp, (*Rtree)(unsafe.Pointer(pRtree)).FzName))
if zTab == uintptr(0) {
return SQLITE_NOMEM
}
- rc = Xsqlite3_blob_open(tls, (*Rtree)(unsafe.Pointer(pRtree)).Fdb, (*Rtree)(unsafe.Pointer(pRtree)).FzDb, zTab, ts+22856 /* "data" */, iNode, 0,
+ rc = Xsqlite3_blob_open(tls, (*Rtree)(unsafe.Pointer(pRtree)).Fdb, (*Rtree)(unsafe.Pointer(pRtree)).FzDb, zTab, ts+23316 /* "data" */, iNode, 0,
(pRtree + 112 /* &.pNodeBlob */))
Xsqlite3_free(tls, zTab)
}
@@ -151060,7 +153666,7 @@ func nodeAcquire(tls *libc.TLS, pRtree uintptr, iNode I64, pParent uintptr, ppNo
}
// Overwrite cell iCell of node pNode with the contents of pCell.
-func nodeOverwriteCell(tls *libc.TLS, pRtree uintptr, pNode uintptr, pCell uintptr, iCell int32) { /* sqlite3.c:192000:13: */
+func nodeOverwriteCell(tls *libc.TLS, pRtree uintptr, pNode uintptr, pCell uintptr, iCell int32) { /* sqlite3.c:193073:13: */
var ii int32
var p uintptr = ((*RtreeNode)(unsafe.Pointer(pNode)).FzData + uintptr((4 + (int32((*Rtree)(unsafe.Pointer(pRtree)).FnBytesPerCell) * iCell))))
p += uintptr(writeInt64(tls, p, (*RtreeCell)(unsafe.Pointer(pCell)).FiRowid))
@@ -151071,7 +153677,7 @@ func nodeOverwriteCell(tls *libc.TLS, pRtree uintptr, pNode uintptr, pCell uintp
}
// Remove the cell with index iCell from node pNode.
-func nodeDeleteCell(tls *libc.TLS, pRtree uintptr, pNode uintptr, iCell int32) { /* sqlite3.c:192018:13: */
+func nodeDeleteCell(tls *libc.TLS, pRtree uintptr, pNode uintptr, iCell int32) { /* sqlite3.c:193091:13: */
var pDst uintptr = ((*RtreeNode)(unsafe.Pointer(pNode)).FzData + uintptr((4 + (int32((*Rtree)(unsafe.Pointer(pRtree)).FnBytesPerCell) * iCell))))
var pSrc uintptr = (pDst + uintptr((*Rtree)(unsafe.Pointer(pRtree)).FnBytesPerCell))
var nByte int32 = (((readInt16(tls, ((*RtreeNode)(unsafe.Pointer((pNode))).FzData+2)) - iCell) - 1) * int32((*Rtree)(unsafe.Pointer(pRtree)).FnBytesPerCell))
@@ -151084,7 +153690,7 @@ func nodeDeleteCell(tls *libc.TLS, pRtree uintptr, pNode uintptr, iCell int32) {
// is successful, return SQLITE_OK.
//
// If there is not enough free space in pNode, return SQLITE_FULL.
-func nodeInsertCell(tls *libc.TLS, pRtree uintptr, pNode uintptr, pCell uintptr) int32 { /* sqlite3.c:192033:12: */
+func nodeInsertCell(tls *libc.TLS, pRtree uintptr, pNode uintptr, pCell uintptr) int32 { /* sqlite3.c:193106:12: */
var nCell int32 // Current number of cells in pNode
var nMaxCell int32 // Maximum number of cells for pNode
@@ -151101,7 +153707,7 @@ func nodeInsertCell(tls *libc.TLS, pRtree uintptr, pNode uintptr, pCell uintptr)
}
// If the node is dirty, write it out to the database.
-func nodeWrite(tls *libc.TLS, pRtree uintptr, pNode uintptr) int32 { /* sqlite3.c:192057:12: */
+func nodeWrite(tls *libc.TLS, pRtree uintptr, pNode uintptr) int32 { /* sqlite3.c:193130:12: */
var rc int32 = SQLITE_OK
if (*RtreeNode)(unsafe.Pointer(pNode)).FisDirty != 0 {
var p uintptr = (*Rtree)(unsafe.Pointer(pRtree)).FpWriteNode
@@ -151125,7 +153731,7 @@ func nodeWrite(tls *libc.TLS, pRtree uintptr, pNode uintptr) int32 { /* sqlite3.
// Release a reference to a node. If the node is dirty and the reference
// count drops to zero, the node data is written to the database.
-func nodeRelease(tls *libc.TLS, pRtree uintptr, pNode uintptr) int32 { /* sqlite3.c:192083:12: */
+func nodeRelease(tls *libc.TLS, pRtree uintptr, pNode uintptr) int32 { /* sqlite3.c:193156:12: */
var rc int32 = SQLITE_OK
if pNode != 0 {
@@ -151151,19 +153757,19 @@ func nodeRelease(tls *libc.TLS, pRtree uintptr, pNode uintptr) int32 { /* sqlite
// Return the 64-bit integer value associated with cell iCell of
// node pNode. If pNode is a leaf node, this is a rowid. If it is
// an internal node, then the 64-bit integer is a child page number.
-func nodeGetRowid(tls *libc.TLS, pRtree uintptr, pNode uintptr, iCell int32) I64 { /* sqlite3.c:192112:12: */
+func nodeGetRowid(tls *libc.TLS, pRtree uintptr, pNode uintptr, iCell int32) I64 { /* sqlite3.c:193185:12: */
return readInt64(tls, ((*RtreeNode)(unsafe.Pointer(pNode)).FzData + uintptr((4 + (int32((*Rtree)(unsafe.Pointer(pRtree)).FnBytesPerCell) * iCell)))))
}
// Return coordinate iCoord from cell iCell in node pNode.
-func nodeGetCoord(tls *libc.TLS, pRtree uintptr, pNode uintptr, iCell int32, iCoord int32, pCoord uintptr) { /* sqlite3.c:192124:13: */
+func nodeGetCoord(tls *libc.TLS, pRtree uintptr, pNode uintptr, iCell int32, iCoord int32, pCoord uintptr) { /* sqlite3.c:193197:13: */
readCoord(tls, ((*RtreeNode)(unsafe.Pointer(pNode)).FzData + uintptr(((12 + (int32((*Rtree)(unsafe.Pointer(pRtree)).FnBytesPerCell) * iCell)) + (4 * iCoord)))), pCoord)
}
// Deserialize cell iCell of node pNode. Populate the structure pointed
// to by pCell with the results.
-func nodeGetCell(tls *libc.TLS, pRtree uintptr, pNode uintptr, iCell int32, pCell uintptr) { /* sqlite3.c:192138:13: */
+func nodeGetCell(tls *libc.TLS, pRtree uintptr, pNode uintptr, iCell int32, pCell uintptr) { /* sqlite3.c:193211:13: */
var pData uintptr
var pCoord uintptr
var ii int32 = 0
@@ -151179,23 +153785,23 @@ func nodeGetCell(tls *libc.TLS, pRtree uintptr, pNode uintptr, iCell int32, pCel
}
// Rtree virtual table module xCreate method.
-func rtreeCreate(tls *libc.TLS, db uintptr, pAux uintptr, argc int32, argv uintptr, ppVtab uintptr, pzErr uintptr) int32 { /* sqlite3.c:192169:12: */
+func rtreeCreate(tls *libc.TLS, db uintptr, pAux uintptr, argc int32, argv uintptr, ppVtab uintptr, pzErr uintptr) int32 { /* sqlite3.c:193242:12: */
return rtreeInit(tls, db, pAux, argc, argv, ppVtab, pzErr, 1)
}
// Rtree virtual table module xConnect method.
-func rtreeConnect(tls *libc.TLS, db uintptr, pAux uintptr, argc int32, argv uintptr, ppVtab uintptr, pzErr uintptr) int32 { /* sqlite3.c:192182:12: */
+func rtreeConnect(tls *libc.TLS, db uintptr, pAux uintptr, argc int32, argv uintptr, ppVtab uintptr, pzErr uintptr) int32 { /* sqlite3.c:193255:12: */
return rtreeInit(tls, db, pAux, argc, argv, ppVtab, pzErr, 0)
}
// Increment the r-tree reference count.
-func rtreeReference(tls *libc.TLS, pRtree uintptr) { /* sqlite3.c:192195:13: */
+func rtreeReference(tls *libc.TLS, pRtree uintptr) { /* sqlite3.c:193268:13: */
(*Rtree)(unsafe.Pointer(pRtree)).FnBusy++
}
// Decrement the r-tree reference count. When the reference count reaches
// zero the structure is deleted.
-func rtreeRelease(tls *libc.TLS, pRtree uintptr) { /* sqlite3.c:192203:13: */
+func rtreeRelease(tls *libc.TLS, pRtree uintptr) { /* sqlite3.c:193276:13: */
(*Rtree)(unsafe.Pointer(pRtree)).FnBusy--
if (*Rtree)(unsafe.Pointer(pRtree)).FnBusy == U32(0) {
(*Rtree)(unsafe.Pointer(pRtree)).FinWrTrans = U8(0)
@@ -151217,13 +153823,13 @@ func rtreeRelease(tls *libc.TLS, pRtree uintptr) { /* sqlite3.c:192203:13: */
}
// Rtree virtual table module xDisconnect method.
-func rtreeDisconnect(tls *libc.TLS, pVtab uintptr) int32 { /* sqlite3.c:192227:12: */
+func rtreeDisconnect(tls *libc.TLS, pVtab uintptr) int32 { /* sqlite3.c:193300:12: */
rtreeRelease(tls, pVtab)
return SQLITE_OK
}
// Rtree virtual table module xDestroy method.
-func rtreeDestroy(tls *libc.TLS, pVtab uintptr) int32 { /* sqlite3.c:192235:12: */
+func rtreeDestroy(tls *libc.TLS, pVtab uintptr) int32 { /* sqlite3.c:193308:12: */
bp := tls.Alloc(48)
defer tls.Free(48)
@@ -151231,7 +153837,7 @@ func rtreeDestroy(tls *libc.TLS, pVtab uintptr) int32 { /* sqlite3.c:192235:12:
var rc int32
var zCreate uintptr = Xsqlite3_mprintf(tls,
- ts+22861, /* "DROP TABLE '%q'...." */
+ ts+23321, /* "DROP TABLE '%q'...." */
libc.VaList(bp, (*Rtree)(unsafe.Pointer(pRtree)).FzDb, (*Rtree)(unsafe.Pointer(pRtree)).FzName,
(*Rtree)(unsafe.Pointer(pRtree)).FzDb, (*Rtree)(unsafe.Pointer(pRtree)).FzName,
(*Rtree)(unsafe.Pointer(pRtree)).FzDb, (*Rtree)(unsafe.Pointer(pRtree)).FzName))
@@ -151250,7 +153856,7 @@ func rtreeDestroy(tls *libc.TLS, pVtab uintptr) int32 { /* sqlite3.c:192235:12:
}
// Rtree virtual table module xOpen method.
-func rtreeOpen(tls *libc.TLS, pVTab uintptr, ppCursor uintptr) int32 { /* sqlite3.c:192263:12: */
+func rtreeOpen(tls *libc.TLS, pVTab uintptr, ppCursor uintptr) int32 { /* sqlite3.c:193336:12: */
var rc int32 = SQLITE_NOMEM
var pRtree uintptr = pVTab
var pCsr uintptr
@@ -151268,7 +153874,7 @@ func rtreeOpen(tls *libc.TLS, pVTab uintptr, ppCursor uintptr) int32 { /* sqlite
}
// Reset a cursor back to its initial state.
-func resetCursor(tls *libc.TLS, pCsr uintptr) { /* sqlite3.c:192284:13: */
+func resetCursor(tls *libc.TLS, pCsr uintptr) { /* sqlite3.c:193357:13: */
var pRtree uintptr = (*RtreeCursor)(unsafe.Pointer(pCsr)).Fbase.FpVtab
var ii int32
var pStmt uintptr
@@ -151278,7 +153884,7 @@ func resetCursor(tls *libc.TLS, pCsr uintptr) { /* sqlite3.c:192284:13: */
var pInfo uintptr = (*RtreeConstraint)(unsafe.Pointer((*RtreeCursor)(unsafe.Pointer(pCsr)).FaConstraint + uintptr(i)*24)).FpInfo
if pInfo != 0 {
if (*Sqlite3_rtree_query_info)(unsafe.Pointer(pInfo)).FxDelUser != 0 {
- (*(*func(*libc.TLS, uintptr))(unsafe.Pointer((pInfo + 32 /* &.xDelUser */))))(tls, (*Sqlite3_rtree_query_info)(unsafe.Pointer(pInfo)).FpUser)
+ (*struct{ f func(*libc.TLS, uintptr) })(unsafe.Pointer(&struct{ uintptr }{(*Sqlite3_rtree_query_info)(unsafe.Pointer(pInfo)).FxDelUser})).f(tls, (*Sqlite3_rtree_query_info)(unsafe.Pointer(pInfo)).FpUser)
}
Xsqlite3_free(tls, pInfo)
}
@@ -151298,7 +153904,7 @@ func resetCursor(tls *libc.TLS, pCsr uintptr) { /* sqlite3.c:192284:13: */
}
// Rtree virtual table module xClose method.
-func rtreeClose(tls *libc.TLS, cur uintptr) int32 { /* sqlite3.c:192312:12: */
+func rtreeClose(tls *libc.TLS, cur uintptr) int32 { /* sqlite3.c:193385:12: */
var pRtree uintptr = (*Sqlite3_vtab_cursor)(unsafe.Pointer(cur)).FpVtab
var pCsr uintptr = cur
@@ -151314,7 +153920,7 @@ func rtreeClose(tls *libc.TLS, cur uintptr) int32 { /* sqlite3.c:192312:12: */
//
// Return non-zero if the cursor does not currently point to a valid
// record (i.e if the scan has finished), or zero otherwise.
-func rtreeEof(tls *libc.TLS, cur uintptr) int32 { /* sqlite3.c:192330:12: */
+func rtreeEof(tls *libc.TLS, cur uintptr) int32 { /* sqlite3.c:193403:12: */
var pCsr uintptr = cur
return int32((*RtreeCursor)(unsafe.Pointer(pCsr)).FatEOF)
}
@@ -151331,7 +153937,7 @@ func rtreeEof(tls *libc.TLS, cur uintptr) int32 { /* sqlite3.c:192330:12: */
// Check the RTree node or entry given by pCellData and p against the MATCH
// constraint pConstraint.
-func rtreeCallbackConstraint(tls *libc.TLS, pConstraint uintptr, eInt int32, pCellData uintptr, pSearch uintptr, prScore uintptr, peWithin uintptr) int32 { /* sqlite3.c:192385:12: */
+func rtreeCallbackConstraint(tls *libc.TLS, pConstraint uintptr, eInt int32, pCellData uintptr, pSearch uintptr, prScore uintptr, peWithin uintptr) int32 { /* sqlite3.c:193458:12: */
bp := tls.Alloc(92)
defer tls.Free(92)
@@ -151414,7 +154020,9 @@ func rtreeCallbackConstraint(tls *libc.TLS, pConstraint uintptr, eInt int32, pCe
}
if (*RtreeConstraint)(unsafe.Pointer(pConstraint)).Fop == RTREE_MATCH {
*(*int32)(unsafe.Pointer(bp + 88 /* eWithin */)) = 0
- rc = (*(*func(*libc.TLS, uintptr, int32, uintptr, uintptr) int32)(unsafe.Pointer((pConstraint + 8 /* &.u */ /* &.xGeom */))))(tls, pInfo,
+ rc = (*struct {
+ f func(*libc.TLS, uintptr, int32, uintptr, uintptr) int32
+ })(unsafe.Pointer(&struct{ uintptr }{*(*uintptr)(unsafe.Pointer(pConstraint + 8 /* &.u */))})).f(tls, pInfo,
nCoord, bp+8 /* &aCoord[0] */, bp+88 /* &eWithin */)
if *(*int32)(unsafe.Pointer(bp + 88 /* eWithin */)) == 0 {
*(*int32)(unsafe.Pointer(peWithin)) = NOT_WITHIN
@@ -151425,7 +154033,9 @@ func rtreeCallbackConstraint(tls *libc.TLS, pConstraint uintptr, eInt int32, pCe
(*Sqlite3_rtree_query_info)(unsafe.Pointer(pInfo)).FiLevel = (int32((*RtreeSearchPoint)(unsafe.Pointer(pSearch)).FiLevel) - 1)
(*Sqlite3_rtree_query_info)(unsafe.Pointer(pInfo)).FrScore = libc.AssignPtrFloat64(pInfo+80 /* &.rParentScore */, (*RtreeSearchPoint)(unsafe.Pointer(pSearch)).FrScore)
(*Sqlite3_rtree_query_info)(unsafe.Pointer(pInfo)).FeWithin = libc.AssignPtrInt32(pInfo+88 /* &.eParentWithin */, int32((*RtreeSearchPoint)(unsafe.Pointer(pSearch)).FeWithin))
- rc = (*(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer((pConstraint + 8 /* &.u */ /* &.xQueryFunc */))))(tls, pInfo)
+ rc = (*struct {
+ f func(*libc.TLS, uintptr) int32
+ })(unsafe.Pointer(&struct{ uintptr }{*(*uintptr)(unsafe.Pointer(pConstraint + 8 /* &.u */))})).f(tls, pInfo)
if (*Sqlite3_rtree_query_info)(unsafe.Pointer(pInfo)).FeWithin < *(*int32)(unsafe.Pointer(peWithin)) {
*(*int32)(unsafe.Pointer(peWithin)) = (*Sqlite3_rtree_query_info)(unsafe.Pointer(pInfo)).FeWithin
}
@@ -151439,7 +154049,7 @@ func rtreeCallbackConstraint(tls *libc.TLS, pConstraint uintptr, eInt int32, pCe
// Check the internal RTree node given by pCellData against constraint p.
// If this constraint cannot be satisfied by any child within the node,
// set *peWithin to NOT_WITHIN.
-func rtreeNonleafConstraint(tls *libc.TLS, p uintptr, eInt int32, pCellData uintptr, peWithin uintptr) { /* sqlite3.c:192461:13: */
+func rtreeNonleafConstraint(tls *libc.TLS, p uintptr, eInt int32, pCellData uintptr, peWithin uintptr) { /* sqlite3.c:193534:13: */
bp := tls.Alloc(8)
defer tls.Free(8)
@@ -151510,7 +154120,7 @@ func rtreeNonleafConstraint(tls *libc.TLS, p uintptr, eInt int32, pCellData uint
//
// The op is given by p->op. The xN is p->iCoord-th coordinate in
// pCellData. $val is given by p->u.rValue.
-func rtreeLeafConstraint(tls *libc.TLS, p uintptr, eInt int32, pCellData uintptr, peWithin uintptr) { /* sqlite3.c:192509:13: */
+func rtreeLeafConstraint(tls *libc.TLS, p uintptr, eInt int32, pCellData uintptr, peWithin uintptr) { /* sqlite3.c:193582:13: */
bp := tls.Alloc(4)
defer tls.Free(4)
@@ -151565,7 +154175,7 @@ func rtreeLeafConstraint(tls *libc.TLS, p uintptr, eInt int32, pCellData uintptr
// One of the cells in node pNode is guaranteed to have a 64-bit
// integer value equal to iRowid. Return the index of this cell.
-func nodeRowidIndex(tls *libc.TLS, pRtree uintptr, pNode uintptr, iRowid I64, piIndex uintptr) int32 { /* sqlite3.c:192539:12: */
+func nodeRowidIndex(tls *libc.TLS, pRtree uintptr, pNode uintptr, iRowid I64, piIndex uintptr) int32 { /* sqlite3.c:193612:12: */
var ii int32
var nCell int32 = readInt16(tls, ((*RtreeNode)(unsafe.Pointer((pNode))).FzData + 2))
@@ -151581,7 +154191,7 @@ func nodeRowidIndex(tls *libc.TLS, pRtree uintptr, pNode uintptr, iRowid I64, pi
// Return the index of the cell containing a pointer to node pNode
// in its parent. If pNode is the root node, return -1.
-func nodeParentIndex(tls *libc.TLS, pRtree uintptr, pNode uintptr, piIndex uintptr) int32 { /* sqlite3.c:192562:12: */
+func nodeParentIndex(tls *libc.TLS, pRtree uintptr, pNode uintptr, piIndex uintptr) int32 { /* sqlite3.c:193635:12: */
var pParent uintptr = (*RtreeNode)(unsafe.Pointer(pNode)).FpParent
if pParent != 0 {
return nodeRowidIndex(tls, pRtree, pParent, (*RtreeNode)(unsafe.Pointer(pNode)).FiNode, piIndex)
@@ -151598,7 +154208,7 @@ func nodeParentIndex(tls *libc.TLS, pRtree uintptr, pNode uintptr, piIndex uintp
// iLevel values coming first. In this way, if rScore is the same for all
// SearchPoints, then iLevel becomes the deciding factor and the result
// is a depth-first search, which is the desired default behavior.
-func rtreeSearchPointCompare(tls *libc.TLS, pA uintptr, pB uintptr) int32 { /* sqlite3.c:192581:12: */
+func rtreeSearchPointCompare(tls *libc.TLS, pA uintptr, pB uintptr) int32 { /* sqlite3.c:193654:12: */
if (*RtreeSearchPoint)(unsafe.Pointer(pA)).FrScore < (*RtreeSearchPoint)(unsafe.Pointer(pB)).FrScore {
return -1
}
@@ -151615,7 +154225,7 @@ func rtreeSearchPointCompare(tls *libc.TLS, pA uintptr, pB uintptr) int32 { /* s
}
// Interchange two search points in a cursor.
-func rtreeSearchPointSwap(tls *libc.TLS, p uintptr, i int32, j int32) { /* sqlite3.c:192595:13: */
+func rtreeSearchPointSwap(tls *libc.TLS, p uintptr, i int32, j int32) { /* sqlite3.c:193668:13: */
var t = *(*RtreeSearchPoint)(unsafe.Pointer((*RtreeCursor)(unsafe.Pointer(p)).FaPoint + uintptr(i)*24))
*(*RtreeSearchPoint)(unsafe.Pointer((*RtreeCursor)(unsafe.Pointer(p)).FaPoint + uintptr(i)*24)) = *(*RtreeSearchPoint)(unsafe.Pointer((*RtreeCursor)(unsafe.Pointer(p)).FaPoint + uintptr(j)*24))
@@ -151635,7 +154245,7 @@ func rtreeSearchPointSwap(tls *libc.TLS, p uintptr, i int32, j int32) { /* sqlit
}
// Return the search point with the lowest current score.
-func rtreeSearchPointFirst(tls *libc.TLS, pCur uintptr) uintptr { /* sqlite3.c:192616:25: */
+func rtreeSearchPointFirst(tls *libc.TLS, pCur uintptr) uintptr { /* sqlite3.c:193689:25: */
if (*RtreeCursor)(unsafe.Pointer(pCur)).FbPoint != 0 {
return (pCur + 64 /* &.sPoint */)
}
@@ -151646,7 +154256,7 @@ func rtreeSearchPointFirst(tls *libc.TLS, pCur uintptr) uintptr { /* sqlite3.c:1
}
// Get the RtreeNode for the search point with the lowest score.
-func rtreeNodeOfFirstSearchPoint(tls *libc.TLS, pCur uintptr, pRC uintptr) uintptr { /* sqlite3.c:192623:18: */
+func rtreeNodeOfFirstSearchPoint(tls *libc.TLS, pCur uintptr, pRC uintptr) uintptr { /* sqlite3.c:193696:18: */
var id Sqlite3_int64
var ii int32 = (1 - int32((*RtreeCursor)(unsafe.Pointer(pCur)).FbPoint))
@@ -151663,7 +154273,7 @@ func rtreeNodeOfFirstSearchPoint(tls *libc.TLS, pCur uintptr, pRC uintptr) uintp
}
// Push a new element onto the priority queue
-func rtreeEnqueue(tls *libc.TLS, pCur uintptr, rScore RtreeDValue, iLevel U8) uintptr { /* sqlite3.c:192639:25: */
+func rtreeEnqueue(tls *libc.TLS, pCur uintptr, rScore RtreeDValue, iLevel U8) uintptr { /* sqlite3.c:193712:25: */
var i int32
var j int32
var pNew uintptr
@@ -151697,7 +154307,7 @@ func rtreeEnqueue(tls *libc.TLS, pCur uintptr, rScore RtreeDValue, iLevel U8) ui
// Allocate a new RtreeSearchPoint and return a pointer to it. Return
// NULL if malloc fails.
-func rtreeSearchPointNew(tls *libc.TLS, pCur uintptr, rScore RtreeDValue, iLevel U8) uintptr { /* sqlite3.c:192674:25: */
+func rtreeSearchPointNew(tls *libc.TLS, pCur uintptr, rScore RtreeDValue, iLevel U8) uintptr { /* sqlite3.c:193747:25: */
var pNew uintptr
var pFirst uintptr
pFirst = rtreeSearchPointFirst(tls, pCur)
@@ -151732,7 +154342,7 @@ func rtreeSearchPointNew(tls *libc.TLS, pCur uintptr, rScore RtreeDValue, iLevel
}
// Remove the search point with the lowest current score.
-func rtreeSearchPointPop(tls *libc.TLS, p uintptr) { /* sqlite3.c:192741:13: */
+func rtreeSearchPointPop(tls *libc.TLS, p uintptr) { /* sqlite3.c:193814:13: */
var i int32
var j int32
var k int32
@@ -151780,7 +154390,7 @@ func rtreeSearchPointPop(tls *libc.TLS, p uintptr) { /* sqlite3.c:192741:13: */
// contains an entry suitable for returning as a result-set row,
// or until the RtreeSearchPoint queue is empty, indicating that the
// query has completed.
-func rtreeStepToLeaf(tls *libc.TLS, pCur uintptr) int32 { /* sqlite3.c:192789:12: */
+func rtreeStepToLeaf(tls *libc.TLS, pCur uintptr) int32 { /* sqlite3.c:193862:12: */
bp := tls.Alloc(20)
defer tls.Free(20)
@@ -151873,7 +154483,7 @@ func rtreeStepToLeaf(tls *libc.TLS, pCur uintptr) int32 { /* sqlite3.c:192789:12
}
// Rtree virtual table module xNext method.
-func rtreeNext(tls *libc.TLS, pVtabCursor uintptr) int32 { /* sqlite3.c:192870:12: */
+func rtreeNext(tls *libc.TLS, pVtabCursor uintptr) int32 { /* sqlite3.c:193943:12: */
var pCsr uintptr = pVtabCursor
var rc int32 = SQLITE_OK
@@ -151889,7 +154499,7 @@ func rtreeNext(tls *libc.TLS, pVtabCursor uintptr) int32 { /* sqlite3.c:192870:1
}
// Rtree virtual table module xRowid method.
-func rtreeRowid(tls *libc.TLS, pVtabCursor uintptr, pRowid uintptr) int32 { /* sqlite3.c:192888:12: */
+func rtreeRowid(tls *libc.TLS, pVtabCursor uintptr, pRowid uintptr) int32 { /* sqlite3.c:193961:12: */
bp := tls.Alloc(4)
defer tls.Free(4)
@@ -151904,7 +154514,7 @@ func rtreeRowid(tls *libc.TLS, pVtabCursor uintptr, pRowid uintptr) int32 { /* s
}
// Rtree virtual table module xColumn method.
-func rtreeColumn(tls *libc.TLS, cur uintptr, ctx uintptr, i int32) int32 { /* sqlite3.c:192902:12: */
+func rtreeColumn(tls *libc.TLS, cur uintptr, ctx uintptr, i int32) int32 { /* sqlite3.c:193975:12: */
bp := tls.Alloc(8)
defer tls.Free(8)
@@ -151965,7 +154575,7 @@ func rtreeColumn(tls *libc.TLS, cur uintptr, ctx uintptr, i int32) int32 { /* sq
// return SQLITE_OK. If there is no such record in the table, set
// *ppLeaf to 0 and return SQLITE_OK. If an error occurs, set *ppLeaf
// to zero and return an SQLite error code.
-func findLeafNode(tls *libc.TLS, pRtree uintptr, iRowid I64, ppLeaf uintptr, piNode uintptr) int32 { /* sqlite3.c:192956:12: */
+func findLeafNode(tls *libc.TLS, pRtree uintptr, iRowid I64, ppLeaf uintptr, piNode uintptr) int32 { /* sqlite3.c:194029:12: */
var rc int32
*(*uintptr)(unsafe.Pointer(ppLeaf)) = uintptr(0)
Xsqlite3_bind_int64(tls, (*Rtree)(unsafe.Pointer(pRtree)).FpReadRowid, 1, iRowid)
@@ -151986,12 +154596,12 @@ func findLeafNode(tls *libc.TLS, pRtree uintptr, iRowid I64, ppLeaf uintptr, piN
// as the second argument for a MATCH constraint. The value passed as the
// first argument to this function is the right-hand operand to the MATCH
// operator.
-func deserializeGeometry(tls *libc.TLS, pValue uintptr, pCons uintptr) int32 { /* sqlite3.c:192982:12: */
+func deserializeGeometry(tls *libc.TLS, pValue uintptr, pCons uintptr) int32 { /* sqlite3.c:194055:12: */
var pBlob uintptr
var pSrc uintptr // BLOB returned by geometry function
var pInfo uintptr // Callback information
- pSrc = Xsqlite3_value_pointer(tls, pValue, ts+22943 /* "RtreeMatchArg" */)
+ pSrc = Xsqlite3_value_pointer(tls, pValue, ts+23403 /* "RtreeMatchArg" */)
if pSrc == uintptr(0) {
return SQLITE_ERROR
}
@@ -152018,7 +154628,7 @@ func deserializeGeometry(tls *libc.TLS, pValue uintptr, pCons uintptr) int32 { /
}
// Rtree virtual table module xFilter method.
-func rtreeFilter(tls *libc.TLS, pVtabCursor uintptr, idxNum int32, idxStr uintptr, argc int32, argv uintptr) int32 { /* sqlite3.c:193012:12: */
+func rtreeFilter(tls *libc.TLS, pVtabCursor uintptr, idxNum int32, idxStr uintptr, argc int32, argv uintptr) int32 { /* sqlite3.c:194085:12: */
bp := tls.Alloc(32)
defer tls.Free(32)
@@ -152078,8 +154688,8 @@ func rtreeFilter(tls *libc.TLS, pVtabCursor uintptr, idxNum int32, idxStr uintpt
for ii = 0; ii < argc; ii++ {
var p uintptr = ((*RtreeCursor)(unsafe.Pointer(pCsr)).FaConstraint + uintptr(ii)*24)
var eType int32 = Xsqlite3_value_numeric_type(tls, *(*uintptr)(unsafe.Pointer(argv + uintptr(ii)*8)))
- (*RtreeConstraint)(unsafe.Pointer(p)).Fop = int32(*(*int8)(unsafe.Pointer(idxStr + uintptr((ii * 2)))))
- (*RtreeConstraint)(unsafe.Pointer(p)).FiCoord = (int32(*(*int8)(unsafe.Pointer(idxStr + uintptr(((ii * 2) + 1))))) - '0')
+ (*RtreeConstraint)(unsafe.Pointer(p)).Fop = int32(*(*uint8)(unsafe.Pointer(idxStr + uintptr((ii * 2)))))
+ (*RtreeConstraint)(unsafe.Pointer(p)).FiCoord = (int32(*(*uint8)(unsafe.Pointer(idxStr + uintptr(((ii * 2) + 1))))) - '0')
if (*RtreeConstraint)(unsafe.Pointer(p)).Fop >= RTREE_MATCH {
// A MATCH operator. The right-hand-side must be a blob that
// can be cast into an RtreeMatchArg object. One created using
@@ -152160,7 +154770,7 @@ func rtreeFilter(tls *libc.TLS, pVtabCursor uintptr, idxNum int32, idxStr uintpt
// The second of each pair of bytes identifies the coordinate column
// to which the constraint applies. The leftmost coordinate column
// is 'a', the second from the left 'b' etc.
-func rtreeBestIndex(tls *libc.TLS, tab uintptr, pIdxInfo uintptr) int32 { /* sqlite3.c:193162:12: */
+func rtreeBestIndex(tls *libc.TLS, tab uintptr, pIdxInfo uintptr) int32 { /* sqlite3.c:194235:12: */
bp := tls.Alloc(49)
defer tls.Free(49)
@@ -152171,9 +154781,9 @@ func rtreeBestIndex(tls *libc.TLS, tab uintptr, pIdxInfo uintptr) int32 { /* sql
var nRow I64 // Estimated rows returned by this scan
var iIdx int32 = 0
- // var zIdxStr [41]int8 at bp+8, 41
+ // var zIdxStr [41]uint8 at bp+8, 41
- libc.Xmemset(tls, bp+8 /* &zIdxStr[0] */, 0, uint64(unsafe.Sizeof([41]int8{})))
+ libc.Xmemset(tls, bp+8 /* &zIdxStr[0] */, 0, uint64(unsafe.Sizeof([41]uint8{})))
// Check if there exists a MATCH constraint - even an unusable one. If there
// is, do not consider the lookup-by-rowid plan as using such a plan would
@@ -152185,7 +154795,7 @@ func rtreeBestIndex(tls *libc.TLS, tab uintptr, pIdxInfo uintptr) int32 { /* sql
}
}
- for ii = 0; (ii < (*Sqlite3_index_info)(unsafe.Pointer(pIdxInfo)).FnConstraint) && (iIdx < (int32(uint64(unsafe.Sizeof([41]int8{})) - uint64(1)))); ii++ {
+ for ii = 0; (ii < (*Sqlite3_index_info)(unsafe.Pointer(pIdxInfo)).FnConstraint) && (iIdx < (int32(uint64(unsafe.Sizeof([41]uint8{})) - uint64(1)))); ii++ {
var p uintptr = ((*Sqlite3_index_info)(unsafe.Pointer(pIdxInfo)).FaConstraint + uintptr(ii)*12)
if (((bMatch == 0) && ((*sqlite3_index_constraint)(unsafe.Pointer(p)).Fusable != 0)) &&
@@ -152245,8 +154855,8 @@ func rtreeBestIndex(tls *libc.TLS, tab uintptr, pIdxInfo uintptr) int32 { /* sql
break
}
if op != 0 {
- *(*int8)(unsafe.Pointer(bp + 8 /* &zIdxStr[0] */ + uintptr(libc.PostIncInt32(&iIdx, 1)))) = int8(op)
- *(*int8)(unsafe.Pointer(bp + 8 /* &zIdxStr[0] */ + uintptr(libc.PostIncInt32(&iIdx, 1)))) = (int8(((*sqlite3_index_constraint)(unsafe.Pointer(p)).FiColumn - 1) + '0'))
+ *(*uint8)(unsafe.Pointer(bp + 8 /* &zIdxStr[0] */ + uintptr(libc.PostIncInt32(&iIdx, 1)))) = uint8(op)
+ *(*uint8)(unsafe.Pointer(bp + 8 /* &zIdxStr[0] */ + uintptr(libc.PostIncInt32(&iIdx, 1)))) = (uint8(((*sqlite3_index_constraint)(unsafe.Pointer(p)).FiColumn - 1) + '0'))
(*sqlite3_index_constraint_usage)(unsafe.Pointer((*Sqlite3_index_info)(unsafe.Pointer(pIdxInfo)).FaConstraintUsage + uintptr(ii)*8)).FargvIndex = (iIdx / 2)
(*sqlite3_index_constraint_usage)(unsafe.Pointer((*Sqlite3_index_info)(unsafe.Pointer(pIdxInfo)).FaConstraintUsage + uintptr(ii)*8)).Fomit = uint8(1)
}
@@ -152255,7 +154865,7 @@ func rtreeBestIndex(tls *libc.TLS, tab uintptr, pIdxInfo uintptr) int32 { /* sql
(*Sqlite3_index_info)(unsafe.Pointer(pIdxInfo)).FidxNum = 2
(*Sqlite3_index_info)(unsafe.Pointer(pIdxInfo)).FneedToFreeIdxStr = 1
- if (iIdx > 0) && (uintptr(0) == (libc.AssignPtrUintptr(pIdxInfo+48 /* &.idxStr */, Xsqlite3_mprintf(tls, ts+2718 /* "%s" */, libc.VaList(bp, bp+8 /* &zIdxStr[0] */))))) {
+ if (iIdx > 0) && (uintptr(0) == (libc.AssignPtrUintptr(pIdxInfo+48 /* &.idxStr */, Xsqlite3_mprintf(tls, ts+2790 /* "%s" */, libc.VaList(bp, bp+8 /* &zIdxStr[0] */))))) {
return SQLITE_NOMEM
}
@@ -152267,7 +154877,7 @@ func rtreeBestIndex(tls *libc.TLS, tab uintptr, pIdxInfo uintptr) int32 { /* sql
}
// Return the N-dimensional volumn of the cell stored in *p.
-func cellArea(tls *libc.TLS, pRtree uintptr, p uintptr) RtreeDValue { /* sqlite3.c:193251:20: */
+func cellArea(tls *libc.TLS, pRtree uintptr, p uintptr) RtreeDValue { /* sqlite3.c:194324:20: */
var area RtreeDValue = RtreeDValue(1)
if int32((*Rtree)(unsafe.Pointer(pRtree)).FeCoordType) == RTREE_COORD_REAL32 {
@@ -152310,7 +154920,7 @@ func cellArea(tls *libc.TLS, pRtree uintptr, p uintptr) RtreeDValue { /* sqlite3
// Return the margin length of cell p. The margin length is the sum
// of the objects size in each dimension.
-func cellMargin(tls *libc.TLS, pRtree uintptr, p uintptr) RtreeDValue { /* sqlite3.c:193281:20: */
+func cellMargin(tls *libc.TLS, pRtree uintptr, p uintptr) RtreeDValue { /* sqlite3.c:194354:20: */
var margin RtreeDValue = RtreeDValue(0)
var ii int32 = (int32((*Rtree)(unsafe.Pointer(pRtree)).FnDim2) - 2)
for ok := true; ok; ok = (ii >= 0) {
@@ -152331,7 +154941,7 @@ func cellMargin(tls *libc.TLS, pRtree uintptr, p uintptr) RtreeDValue { /* sqlit
}
// Store the union of cells p1 and p2 in p1.
-func cellUnion(tls *libc.TLS, pRtree uintptr, p1 uintptr, p2 uintptr) { /* sqlite3.c:193294:13: */
+func cellUnion(tls *libc.TLS, pRtree uintptr, p1 uintptr, p2 uintptr) { /* sqlite3.c:194367:13: */
var ii int32 = 0
if int32((*Rtree)(unsafe.Pointer(pRtree)).FeCoordType) == RTREE_COORD_REAL32 {
for ok := true; ok; ok = (ii < int32((*Rtree)(unsafe.Pointer(pRtree)).FnDim2)) {
@@ -152370,7 +154980,7 @@ func cellUnion(tls *libc.TLS, pRtree uintptr, p1 uintptr, p2 uintptr) { /* sqlit
// Return true if the area covered by p2 is a subset of the area covered
// by p1. False otherwise.
-func cellContains(tls *libc.TLS, pRtree uintptr, p1 uintptr, p2 uintptr) int32 { /* sqlite3.c:193315:12: */
+func cellContains(tls *libc.TLS, pRtree uintptr, p1 uintptr, p2 uintptr) int32 { /* sqlite3.c:194388:12: */
var ii int32
var isInt int32 = (libc.Bool32(int32((*Rtree)(unsafe.Pointer(pRtree)).FeCoordType) == RTREE_COORD_INT32))
for ii = 0; ii < int32((*Rtree)(unsafe.Pointer(pRtree)).FnDim2); ii = ii + (2) {
@@ -152385,7 +154995,7 @@ func cellContains(tls *libc.TLS, pRtree uintptr, p1 uintptr, p2 uintptr) int32 {
}
// Return the amount cell p would grow by if it were unioned with pCell.
-func cellGrowth(tls *libc.TLS, pRtree uintptr, p uintptr, pCell uintptr) RtreeDValue { /* sqlite3.c:193333:20: */
+func cellGrowth(tls *libc.TLS, pRtree uintptr, p uintptr, pCell uintptr) RtreeDValue { /* sqlite3.c:194406:20: */
bp := tls.Alloc(48)
defer tls.Free(48)
@@ -152398,7 +155008,7 @@ func cellGrowth(tls *libc.TLS, pRtree uintptr, p uintptr, pCell uintptr) RtreeDV
return (cellArea(tls, pRtree, bp /* &cell */) - area)
}
-func cellOverlap(tls *libc.TLS, pRtree uintptr, p uintptr, aCell uintptr, nCell int32) RtreeDValue { /* sqlite3.c:193342:20: */
+func cellOverlap(tls *libc.TLS, pRtree uintptr, p uintptr, aCell uintptr, nCell int32) RtreeDValue { /* sqlite3.c:194415:20: */
var ii int32
var overlap RtreeDValue = 0.0
for ii = 0; ii < nCell; ii++ {
@@ -152473,7 +155083,7 @@ func cellOverlap(tls *libc.TLS, pRtree uintptr, p uintptr, aCell uintptr, nCell
// This function implements the ChooseLeaf algorithm from Gutman[84].
// ChooseSubTree in r*tree terminology.
-func sChooseLeaf(tls *libc.TLS, pRtree uintptr, pCell uintptr, iHeight int32, ppLeaf uintptr) int32 { /* sqlite3.c:193374:12: */
+func sChooseLeaf(tls *libc.TLS, pRtree uintptr, pCell uintptr, iHeight int32, ppLeaf uintptr) int32 { /* sqlite3.c:194447:12: */
bp := tls.Alloc(64)
defer tls.Free(64)
@@ -152529,7 +155139,7 @@ func sChooseLeaf(tls *libc.TLS, pRtree uintptr, pCell uintptr, iHeight int32, pp
// A cell with the same content as pCell has just been inserted into
// the node pNode. This function updates the bounding box cells in
// all ancestor elements.
-func sAdjustTree(tls *libc.TLS, pRtree uintptr, pNode uintptr, pCell uintptr) int32 { /* sqlite3.c:193434:12: */
+func sAdjustTree(tls *libc.TLS, pRtree uintptr, pNode uintptr, pCell uintptr) int32 { /* sqlite3.c:194507:12: */
bp := tls.Alloc(56)
defer tls.Free(56)
@@ -152558,7 +155168,7 @@ func sAdjustTree(tls *libc.TLS, pRtree uintptr, pNode uintptr, pCell uintptr) in
}
// Write mapping (iRowid->iNode) to the _rowid table.
-func rowidWrite(tls *libc.TLS, pRtree uintptr, iRowid Sqlite3_int64, iNode Sqlite3_int64) int32 { /* sqlite3.c:193465:12: */
+func rowidWrite(tls *libc.TLS, pRtree uintptr, iRowid Sqlite3_int64, iNode Sqlite3_int64) int32 { /* sqlite3.c:194538:12: */
Xsqlite3_bind_int64(tls, (*Rtree)(unsafe.Pointer(pRtree)).FpWriteRowid, 1, iRowid)
Xsqlite3_bind_int64(tls, (*Rtree)(unsafe.Pointer(pRtree)).FpWriteRowid, 2, iNode)
Xsqlite3_step(tls, (*Rtree)(unsafe.Pointer(pRtree)).FpWriteRowid)
@@ -152566,7 +155176,7 @@ func rowidWrite(tls *libc.TLS, pRtree uintptr, iRowid Sqlite3_int64, iNode Sqlit
}
// Write mapping (iNode->iPar) to the _parent table.
-func parentWrite(tls *libc.TLS, pRtree uintptr, iNode Sqlite3_int64, iPar Sqlite3_int64) int32 { /* sqlite3.c:193475:12: */
+func parentWrite(tls *libc.TLS, pRtree uintptr, iNode Sqlite3_int64, iPar Sqlite3_int64) int32 { /* sqlite3.c:194548:12: */
Xsqlite3_bind_int64(tls, (*Rtree)(unsafe.Pointer(pRtree)).FpWriteParent, 1, iNode)
Xsqlite3_bind_int64(tls, (*Rtree)(unsafe.Pointer(pRtree)).FpWriteParent, 2, iPar)
Xsqlite3_step(tls, (*Rtree)(unsafe.Pointer(pRtree)).FpWriteParent)
@@ -152588,7 +155198,7 @@ func parentWrite(tls *libc.TLS, pRtree uintptr, iNode Sqlite3_int64, iPar Sqlite
//
// The aSpare array is used as temporary working space by the
// sorting algorithm.
-func sSortByDistance(tls *libc.TLS, aIdx uintptr, nIdx int32, aDistance uintptr, aSpare uintptr) { /* sqlite3.c:193502:13: */
+func sSortByDistance(tls *libc.TLS, aIdx uintptr, nIdx int32, aDistance uintptr, aSpare uintptr) { /* sqlite3.c:194575:13: */
if nIdx > 1 {
var iLeft int32 = 0
var iRight int32 = 0
@@ -152636,7 +155246,7 @@ func sSortByDistance(tls *libc.TLS, aIdx uintptr, nIdx int32, aDistance uintptr,
//
// The aSpare array is used as temporary working space by the
// sorting algorithm.
-func sSortByDimension(tls *libc.TLS, pRtree uintptr, aIdx uintptr, nIdx int32, iDim int32, aCell uintptr, aSpare uintptr) { /* sqlite3.c:193568:13: */
+func sSortByDimension(tls *libc.TLS, pRtree uintptr, aIdx uintptr, nIdx int32, iDim int32, aCell uintptr, aSpare uintptr) { /* sqlite3.c:194641:13: */
if nIdx > 1 {
var iLeft int32 = 0
@@ -152692,7 +155302,7 @@ func sSortByDimension(tls *libc.TLS, pRtree uintptr, aIdx uintptr, nIdx int32, i
}
// Implementation of the R*-tree variant of SplitNode from Beckman[1990].
-func splitNodeStartree(tls *libc.TLS, pRtree uintptr, aCell uintptr, nCell int32, pLeft uintptr, pRight uintptr, pBboxLeft uintptr, pBboxRight uintptr) int32 { /* sqlite3.c:193627:12: */
+func splitNodeStartree(tls *libc.TLS, pRtree uintptr, aCell uintptr, nCell int32, pLeft uintptr, pRight uintptr, pBboxLeft uintptr, pBboxRight uintptr) int32 { /* sqlite3.c:194700:12: */
bp := tls.Alloc(96)
defer tls.Free(96)
@@ -152791,7 +155401,7 @@ func splitNodeStartree(tls *libc.TLS, pRtree uintptr, aCell uintptr, nCell int32
return SQLITE_OK
}
-func updateMapping(tls *libc.TLS, pRtree uintptr, iRowid I64, pNode uintptr, iHeight int32) int32 { /* sqlite3.c:193725:12: */
+func updateMapping(tls *libc.TLS, pRtree uintptr, iRowid I64, pNode uintptr, iHeight int32) int32 { /* sqlite3.c:194798:12: */
var xSetMapping uintptr
xSetMapping = func() uintptr {
if iHeight == 0 {
@@ -152811,10 +155421,12 @@ func updateMapping(tls *libc.TLS, pRtree uintptr, iRowid I64, pNode uintptr, iHe
(*RtreeNode)(unsafe.Pointer(pChild)).FpParent = pNode
}
}
- return (*(*func(*libc.TLS, uintptr, Sqlite3_int64, Sqlite3_int64) int32)(unsafe.Pointer(&xSetMapping)))(tls, pRtree, iRowid, (*RtreeNode)(unsafe.Pointer(pNode)).FiNode)
+ return (*struct {
+ f func(*libc.TLS, uintptr, Sqlite3_int64, Sqlite3_int64) int32
+ })(unsafe.Pointer(&struct{ uintptr }{xSetMapping})).f(tls, pRtree, iRowid, (*RtreeNode)(unsafe.Pointer(pNode)).FiNode)
}
-func sSplitNode(tls *libc.TLS, pRtree uintptr, pNode uintptr, pCell uintptr, iHeight int32) int32 { /* sqlite3.c:193744:12: */
+func sSplitNode(tls *libc.TLS, pRtree uintptr, pNode uintptr, pCell uintptr, iHeight int32) int32 { /* sqlite3.c:194817:12: */
bp := tls.Alloc(100)
defer tls.Free(100)
@@ -153048,7 +155660,7 @@ splitnode_out:
// rowid of the row to delete, which can be used to find the leaf on which
// the entry resides (argument pLeaf). Once the leaf is located, this
// function is called to determine its ancestry.
-func fixLeafParent(tls *libc.TLS, pRtree uintptr, pLeaf uintptr) int32 { /* sqlite3.c:193891:12: */
+func fixLeafParent(tls *libc.TLS, pRtree uintptr, pLeaf uintptr) int32 { /* sqlite3.c:194964:12: */
var rc int32 = SQLITE_OK
var pChild uintptr = pLeaf
for ((rc == SQLITE_OK) && ((*RtreeNode)(unsafe.Pointer(pChild)).FiNode != int64(1))) && ((*RtreeNode)(unsafe.Pointer(pChild)).FpParent == uintptr(0)) {
@@ -153083,7 +155695,7 @@ func fixLeafParent(tls *libc.TLS, pRtree uintptr, pLeaf uintptr) int32 { /* sqli
return rc
}
-func removeNode(tls *libc.TLS, pRtree uintptr, pNode uintptr, iHeight int32) int32 { /* sqlite3.c:193926:12: */
+func removeNode(tls *libc.TLS, pRtree uintptr, pNode uintptr, iHeight int32) int32 { /* sqlite3.c:194999:12: */
bp := tls.Alloc(4)
defer tls.Free(4)
@@ -153132,7 +155744,7 @@ func removeNode(tls *libc.TLS, pRtree uintptr, pNode uintptr, iHeight int32) int
return SQLITE_OK
}
-func fixBoundingBox(tls *libc.TLS, pRtree uintptr, pNode uintptr) int32 { /* sqlite3.c:193975:12: */
+func fixBoundingBox(tls *libc.TLS, pRtree uintptr, pNode uintptr) int32 { /* sqlite3.c:195048:12: */
bp := tls.Alloc(100)
defer tls.Free(100)
@@ -153163,7 +155775,7 @@ func fixBoundingBox(tls *libc.TLS, pRtree uintptr, pNode uintptr) int32 { /* sql
// Delete the cell at index iCell of node pNode. After removing the
// cell, adjust the r-tree data structure if required.
-func deleteCell(tls *libc.TLS, pRtree uintptr, pNode uintptr, iCell int32, iHeight int32) int32 { /* sqlite3.c:194002:12: */
+func deleteCell(tls *libc.TLS, pRtree uintptr, pNode uintptr, iCell int32, iHeight int32) int32 { /* sqlite3.c:195075:12: */
var pParent uintptr
var rc int32
@@ -153192,7 +155804,7 @@ func deleteCell(tls *libc.TLS, pRtree uintptr, pNode uintptr, iCell int32, iHeig
return rc
}
-func sReinsert(tls *libc.TLS, pRtree uintptr, pNode uintptr, pCell uintptr, iHeight int32) int32 { /* sqlite3.c:194033:12: */
+func sReinsert(tls *libc.TLS, pRtree uintptr, pNode uintptr, pCell uintptr, iHeight int32) int32 { /* sqlite3.c:195106:12: */
bp := tls.Alloc(48)
defer tls.Free(48)
@@ -153307,7 +155919,7 @@ func sReinsert(tls *libc.TLS, pRtree uintptr, pNode uintptr, pCell uintptr, iHei
// Insert cell pCell into node pNode. Node pNode is the head of a
// subtree iHeight high (leaf nodes have iHeight==0).
-func rtreeInsertCell(tls *libc.TLS, pRtree uintptr, pNode uintptr, pCell uintptr, iHeight int32) int32 { /* sqlite3.c:194138:12: */
+func rtreeInsertCell(tls *libc.TLS, pRtree uintptr, pNode uintptr, pCell uintptr, iHeight int32) int32 { /* sqlite3.c:195211:12: */
var rc int32 = SQLITE_OK
if iHeight > 0 {
var pChild uintptr = nodeHashLookup(tls, pRtree, (*RtreeCell)(unsafe.Pointer(pCell)).FiRowid)
@@ -153337,7 +155949,7 @@ func rtreeInsertCell(tls *libc.TLS, pRtree uintptr, pNode uintptr, pCell uintptr
return rc
}
-func reinsertNodeContent(tls *libc.TLS, pRtree uintptr, pNode uintptr) int32 { /* sqlite3.c:194173:12: */
+func reinsertNodeContent(tls *libc.TLS, pRtree uintptr, pNode uintptr) int32 { /* sqlite3.c:195246:12: */
bp := tls.Alloc(56)
defer tls.Free(56)
@@ -153368,7 +155980,7 @@ func reinsertNodeContent(tls *libc.TLS, pRtree uintptr, pNode uintptr) int32 { /
}
// Select a currently unused rowid for a new r-tree record.
-func rtreeNewRowid(tls *libc.TLS, pRtree uintptr, piRowid uintptr) int32 { /* sqlite3.c:194202:12: */
+func rtreeNewRowid(tls *libc.TLS, pRtree uintptr, piRowid uintptr) int32 { /* sqlite3.c:195275:12: */
var rc int32
Xsqlite3_bind_null(tls, (*Rtree)(unsafe.Pointer(pRtree)).FpWriteRowid, 1)
Xsqlite3_bind_null(tls, (*Rtree)(unsafe.Pointer(pRtree)).FpWriteRowid, 2)
@@ -153379,7 +155991,7 @@ func rtreeNewRowid(tls *libc.TLS, pRtree uintptr, piRowid uintptr) int32 { /* sq
}
// Remove the entry with rowid=iDelete from the r-tree structure.
-func rtreeDeleteRowid(tls *libc.TLS, pRtree uintptr, iDelete Sqlite3_int64) int32 { /* sqlite3.c:194215:12: */
+func rtreeDeleteRowid(tls *libc.TLS, pRtree uintptr, iDelete Sqlite3_int64) int32 { /* sqlite3.c:195288:12: */
bp := tls.Alloc(32)
defer tls.Free(32)
@@ -153468,7 +156080,7 @@ func rtreeDeleteRowid(tls *libc.TLS, pRtree uintptr, iDelete Sqlite3_int64) int3
// Convert an sqlite3_value into an RtreeValue (presumably a float)
// while taking care to round toward negative or positive, respectively.
-func rtreeValueDown(tls *libc.TLS, v uintptr) RtreeValue { /* sqlite3.c:194312:19: */
+func rtreeValueDown(tls *libc.TLS, v uintptr) RtreeValue { /* sqlite3.c:195385:19: */
var d float64 = Xsqlite3_value_double(tls, v)
var f float32 = float32(d)
if float64(f) > d {
@@ -153482,7 +156094,7 @@ func rtreeValueDown(tls *libc.TLS, v uintptr) RtreeValue { /* sqlite3.c:194312:1
return f
}
-func rtreeValueUp(tls *libc.TLS, v uintptr) RtreeValue { /* sqlite3.c:194320:19: */
+func rtreeValueUp(tls *libc.TLS, v uintptr) RtreeValue { /* sqlite3.c:195393:19: */
var d float64 = Xsqlite3_value_double(tls, v)
var f float32 = float32(d)
if float64(f) < d {
@@ -153507,7 +156119,7 @@ func rtreeValueUp(tls *libc.TLS, v uintptr) RtreeValue { /* sqlite3.c:194320:19:
// (c1<=c2) constraint on columns iCol and iCol+1 that has failed.
//
// If an OOM occurs, SQLITE_NOMEM is returned instead of SQLITE_CONSTRAINT.
-func rtreeConstraintError(tls *libc.TLS, pRtree uintptr, iCol int32) int32 { /* sqlite3.c:194343:12: */
+func rtreeConstraintError(tls *libc.TLS, pRtree uintptr, iCol int32) int32 { /* sqlite3.c:195416:12: */
bp := tls.Alloc(64)
defer tls.Free(64)
@@ -153515,7 +156127,7 @@ func rtreeConstraintError(tls *libc.TLS, pRtree uintptr, iCol int32) int32 { /*
var zSql uintptr
var rc int32
- zSql = Xsqlite3_mprintf(tls, ts+22957 /* "SELECT * FROM %Q..." */, libc.VaList(bp, (*Rtree)(unsafe.Pointer(pRtree)).FzDb, (*Rtree)(unsafe.Pointer(pRtree)).FzName))
+ zSql = Xsqlite3_mprintf(tls, ts+23417 /* "SELECT * FROM %Q..." */, libc.VaList(bp, (*Rtree)(unsafe.Pointer(pRtree)).FzDb, (*Rtree)(unsafe.Pointer(pRtree)).FzName))
if zSql != 0 {
rc = Xsqlite3_prepare_v2(tls, (*Rtree)(unsafe.Pointer(pRtree)).Fdb, zSql, -1, bp+56 /* &pStmt */, uintptr(0))
} else {
@@ -153527,12 +156139,12 @@ func rtreeConstraintError(tls *libc.TLS, pRtree uintptr, iCol int32) int32 { /*
if iCol == 0 {
var zCol uintptr = Xsqlite3_column_name(tls, *(*uintptr)(unsafe.Pointer(bp + 56 /* pStmt */)), 0)
(*Rtree)(unsafe.Pointer(pRtree)).Fbase.FzErrMsg = Xsqlite3_mprintf(tls,
- ts+22977 /* "UNIQUE constrain..." */, libc.VaList(bp+16, (*Rtree)(unsafe.Pointer(pRtree)).FzName, zCol))
+ ts+23437 /* "UNIQUE constrain..." */, libc.VaList(bp+16, (*Rtree)(unsafe.Pointer(pRtree)).FzName, zCol))
} else {
var zCol1 uintptr = Xsqlite3_column_name(tls, *(*uintptr)(unsafe.Pointer(bp + 56 /* pStmt */)), iCol)
var zCol2 uintptr = Xsqlite3_column_name(tls, *(*uintptr)(unsafe.Pointer(bp + 56 /* pStmt */)), (iCol + 1))
(*Rtree)(unsafe.Pointer(pRtree)).Fbase.FzErrMsg = Xsqlite3_mprintf(tls,
- ts+23009 /* "rtree constraint..." */, libc.VaList(bp+32, (*Rtree)(unsafe.Pointer(pRtree)).FzName, zCol1, zCol2))
+ ts+23469 /* "rtree constraint..." */, libc.VaList(bp+32, (*Rtree)(unsafe.Pointer(pRtree)).FzName, zCol1, zCol2))
}
}
@@ -153546,7 +156158,7 @@ func rtreeConstraintError(tls *libc.TLS, pRtree uintptr, iCol int32) int32 { /*
}
// The xUpdate method for rtree module virtual tables.
-func rtreeUpdate(tls *libc.TLS, pVtab uintptr, nData int32, aData uintptr, pRowid uintptr) int32 { /* sqlite3.c:194381:12: */
+func rtreeUpdate(tls *libc.TLS, pVtab uintptr, nData int32, aData uintptr, pRowid uintptr) int32 { /* sqlite3.c:195454:12: */
bp := tls.Alloc(56)
defer tls.Free(56)
@@ -153775,7 +156387,7 @@ constraint:
}
// Called when a transaction starts.
-func rtreeBeginTransaction(tls *libc.TLS, pVtab uintptr) int32 { /* sqlite3.c:194529:12: */
+func rtreeBeginTransaction(tls *libc.TLS, pVtab uintptr) int32 { /* sqlite3.c:195602:12: */
var pRtree uintptr = pVtab
(*Rtree)(unsafe.Pointer(pRtree)).FinWrTrans++
@@ -153784,7 +156396,7 @@ func rtreeBeginTransaction(tls *libc.TLS, pVtab uintptr) int32 { /* sqlite3.c:19
// Called when a transaction completes (either by COMMIT or ROLLBACK).
// The sqlite3_blob object should be released at this point.
-func rtreeEndTransaction(tls *libc.TLS, pVtab uintptr) int32 { /* sqlite3.c:194540:12: */
+func rtreeEndTransaction(tls *libc.TLS, pVtab uintptr) int32 { /* sqlite3.c:195613:12: */
var pRtree uintptr = pVtab
(*Rtree)(unsafe.Pointer(pRtree)).FinWrTrans = U8(0)
nodeBlobReset(tls, pRtree)
@@ -153792,7 +156404,7 @@ func rtreeEndTransaction(tls *libc.TLS, pVtab uintptr) int32 { /* sqlite3.c:1945
}
// The xRename method for rtree module virtual tables.
-func rtreeRename(tls *libc.TLS, pVtab uintptr, zNewName uintptr) int32 { /* sqlite3.c:194550:12: */
+func rtreeRename(tls *libc.TLS, pVtab uintptr, zNewName uintptr) int32 { /* sqlite3.c:195623:12: */
bp := tls.Alloc(72)
defer tls.Free(72)
@@ -153800,7 +156412,7 @@ func rtreeRename(tls *libc.TLS, pVtab uintptr, zNewName uintptr) int32 { /* sqli
var rc int32 = SQLITE_NOMEM
var zSql uintptr = Xsqlite3_mprintf(tls,
- ts+23046 /* "ALTER TABLE %Q.'..." */, libc.VaList(bp, (*Rtree)(unsafe.Pointer(pRtree)).FzDb, (*Rtree)(unsafe.Pointer(pRtree)).FzName, zNewName, (*Rtree)(unsafe.Pointer(pRtree)).FzDb, (*Rtree)(unsafe.Pointer(pRtree)).FzName, zNewName, (*Rtree)(unsafe.Pointer(pRtree)).FzDb, (*Rtree)(unsafe.Pointer(pRtree)).FzName, zNewName))
+ ts+23506 /* "ALTER TABLE %Q.'..." */, libc.VaList(bp, (*Rtree)(unsafe.Pointer(pRtree)).FzDb, (*Rtree)(unsafe.Pointer(pRtree)).FzName, zNewName, (*Rtree)(unsafe.Pointer(pRtree)).FzDb, (*Rtree)(unsafe.Pointer(pRtree)).FzName, zNewName, (*Rtree)(unsafe.Pointer(pRtree)).FzDb, (*Rtree)(unsafe.Pointer(pRtree)).FzName, zNewName))
if zSql != 0 {
nodeBlobReset(tls, pRtree)
rc = Xsqlite3_exec(tls, (*Rtree)(unsafe.Pointer(pRtree)).Fdb, zSql, uintptr(0), uintptr(0), uintptr(0))
@@ -153821,7 +156433,7 @@ func rtreeRename(tls *libc.TLS, pVtab uintptr, zNewName uintptr) int32 { /* sqli
// INSERT INTO rtree...
// DROP TABLE ; -- Would fail with SQLITE_LOCKED
// COMMIT;
-func rtreeSavepoint(tls *libc.TLS, pVtab uintptr, iSavepoint int32) int32 { /* sqlite3.c:194583:12: */
+func rtreeSavepoint(tls *libc.TLS, pVtab uintptr, iSavepoint int32) int32 { /* sqlite3.c:195656:12: */
var pRtree uintptr = pVtab
var iwt U8 = (*Rtree)(unsafe.Pointer(pRtree)).FinWrTrans
_ = iSavepoint
@@ -153834,11 +156446,11 @@ func rtreeSavepoint(tls *libc.TLS, pVtab uintptr, iSavepoint int32) int32 { /* s
// This function populates the pRtree->nRowEst variable with an estimate
// of the number of rows in the virtual table. If possible, this is based
// on sqlite_stat1 data. Otherwise, use RTREE_DEFAULT_ROWEST.
-func rtreeQueryStat1(tls *libc.TLS, db uintptr, pRtree uintptr) int32 { /* sqlite3.c:194598:12: */
+func rtreeQueryStat1(tls *libc.TLS, db uintptr, pRtree uintptr) int32 { /* sqlite3.c:195671:12: */
bp := tls.Alloc(24)
defer tls.Free(24)
- var zFmt uintptr = ts + 23191 /* "SELECT stat FROM..." */
+ var zFmt uintptr = ts + 23651 /* "SELECT stat FROM..." */
var zSql uintptr
// var p uintptr at bp+16, 8
@@ -153846,7 +156458,7 @@ func rtreeQueryStat1(tls *libc.TLS, db uintptr, pRtree uintptr) int32 { /* sqlit
var nRow I64 = int64(0)
rc = Xsqlite3_table_column_metadata(tls,
- db, (*Rtree)(unsafe.Pointer(pRtree)).FzDb, ts+9613 /* "sqlite_stat1" */, uintptr(0), uintptr(0), uintptr(0), uintptr(0), uintptr(0), uintptr(0))
+ db, (*Rtree)(unsafe.Pointer(pRtree)).FzDb, ts+10072 /* "sqlite_stat1" */, uintptr(0), uintptr(0), uintptr(0), uintptr(0), uintptr(0), uintptr(0))
if rc != SQLITE_OK {
(*Rtree)(unsafe.Pointer(pRtree)).FnRowEst = int64(RTREE_DEFAULT_ROWEST)
if rc == SQLITE_ERROR {
@@ -153888,7 +156500,7 @@ func rtreeQueryStat1(tls *libc.TLS, db uintptr, pRtree uintptr) int32 { /* sqlit
// Return true if zName is the extension on one of the shadow tables used
// by this module.
-func rtreeShadowName(tls *libc.TLS, zName uintptr) int32 { /* sqlite3.c:194642:12: */
+func rtreeShadowName(tls *libc.TLS, zName uintptr) int32 { /* sqlite3.c:195715:12: */
var i uint32
for i = uint32(0); uint64(i) < (uint64(unsafe.Sizeof(azName1)) / uint64(unsafe.Sizeof(uintptr(0)))); i++ {
if Xsqlite3_stricmp(tls, zName, azName1[i]) == 0 {
@@ -153899,8 +156511,8 @@ func rtreeShadowName(tls *libc.TLS, zName uintptr) int32 { /* sqlite3.c:194642:1
}
var azName1 = [3]uintptr{
- ts + 23247 /* "node" */, ts + 4043 /* "parent" */, ts + 14302, /* "rowid" */
-} /* sqlite3.c:194643:21 */
+ ts + 23707 /* "node" */, ts + 4174 /* "parent" */, ts + 14757, /* "rowid" */
+} /* sqlite3.c:195716:21 */
var rtreeModule = Sqlite3_module{
FiVersion: 3, // iVersion
@@ -153924,9 +156536,9 @@ var rtreeModule = Sqlite3_module{
FxRename: 0, // xRename - rename the table
FxSavepoint: 0, // xRollbackTo
FxShadowName: 0, // xShadowName
-} /* sqlite3.c:194653:23 */
+} /* sqlite3.c:195726:23 */
-func rtreeSqlInit(tls *libc.TLS, pRtree uintptr, db uintptr, zDb uintptr, zPrefix uintptr, isCreate int32) int32 { /* sqlite3.c:194680:12: */
+func rtreeSqlInit(tls *libc.TLS, pRtree uintptr, db uintptr, zDb uintptr, zPrefix uintptr, isCreate int32) int32 { /* sqlite3.c:195753:12: */
bp := tls.Alloc(232)
defer tls.Free(232)
@@ -153943,19 +156555,19 @@ func rtreeSqlInit(tls *libc.TLS, pRtree uintptr, db uintptr, zDb uintptr, zPrefi
var p uintptr = Xsqlite3_str_new(tls, db)
var ii int32
Xsqlite3_str_appendf(tls, p,
- ts+23252, /* "CREATE TABLE \"%w..." */
+ ts+23712, /* "CREATE TABLE \"%w..." */
libc.VaList(bp, zDb, zPrefix))
for ii = 0; ii < int32((*Rtree)(unsafe.Pointer(pRtree)).FnAux); ii++ {
- Xsqlite3_str_appendf(tls, p, ts+23314 /* ",a%d" */, libc.VaList(bp+16, ii))
+ Xsqlite3_str_appendf(tls, p, ts+23774 /* ",a%d" */, libc.VaList(bp+16, ii))
}
Xsqlite3_str_appendf(tls, p,
- ts+23319, /* ");CREATE TABLE \"..." */
+ ts+23779, /* ");CREATE TABLE \"..." */
libc.VaList(bp+24, zDb, zPrefix))
Xsqlite3_str_appendf(tls, p,
- ts+23383, /* "CREATE TABLE \"%w..." */
+ ts+23843, /* "CREATE TABLE \"%w..." */
libc.VaList(bp+40, zDb, zPrefix))
Xsqlite3_str_appendf(tls, p,
- ts+23453, /* "INSERT INTO \"%w\"..." */
+ ts+23913, /* "INSERT INTO \"%w\"..." */
libc.VaList(bp+56, zDb, zPrefix, (*Rtree)(unsafe.Pointer(pRtree)).FiNodeSize))
zCreate = Xsqlite3_str_finish(tls, p)
if !(zCreate != 0) {
@@ -153986,7 +156598,7 @@ func rtreeSqlInit(tls *libc.TLS, pRtree uintptr, db uintptr, zDb uintptr, zPrefi
} else {
// An UPSERT is very slightly slower than REPLACE, but it is needed
// if there are auxiliary columns
- zFormat = ts + 23502 /* "INSERT INTO\"%w\"...." */
+ zFormat = ts + 23962 /* "INSERT INTO\"%w\"...." */
}
zSql = Xsqlite3_mprintf(tls, zFormat, libc.VaList(bp+80, zDb, zPrefix))
if zSql != 0 {
@@ -153998,7 +156610,7 @@ func rtreeSqlInit(tls *libc.TLS, pRtree uintptr, db uintptr, zDb uintptr, zPrefi
}
if (*Rtree)(unsafe.Pointer(pRtree)).FnAux != 0 {
(*Rtree)(unsafe.Pointer(pRtree)).FzReadAuxSql = Xsqlite3_mprintf(tls,
- ts+23610, /* "SELECT * FROM \"%..." */
+ ts+24070, /* "SELECT * FROM \"%..." */
libc.VaList(bp+96, zDb, zPrefix))
if (*Rtree)(unsafe.Pointer(pRtree)).FzReadAuxSql == uintptr(0) {
rc = SQLITE_NOMEM
@@ -154006,18 +156618,18 @@ func rtreeSqlInit(tls *libc.TLS, pRtree uintptr, db uintptr, zDb uintptr, zPrefi
var p uintptr = Xsqlite3_str_new(tls, db)
var ii int32
var zSql uintptr
- Xsqlite3_str_appendf(tls, p, ts+23655 /* "UPDATE \"%w\".\"%w_..." */, libc.VaList(bp+112, zDb, zPrefix))
+ Xsqlite3_str_appendf(tls, p, ts+24115 /* "UPDATE \"%w\".\"%w_..." */, libc.VaList(bp+112, zDb, zPrefix))
for ii = 0; ii < int32((*Rtree)(unsafe.Pointer(pRtree)).FnAux); ii++ {
if ii != 0 {
- Xsqlite3_str_append(tls, p, ts+11084 /* "," */, 1)
+ Xsqlite3_str_append(tls, p, ts+11537 /* "," */, 1)
}
if ii < int32((*Rtree)(unsafe.Pointer(pRtree)).FnAuxNotNull) {
- Xsqlite3_str_appendf(tls, p, ts+23682 /* "a%d=coalesce(?%d..." */, libc.VaList(bp+128, ii, (ii+2), ii))
+ Xsqlite3_str_appendf(tls, p, ts+24142 /* "a%d=coalesce(?%d..." */, libc.VaList(bp+128, ii, (ii+2), ii))
} else {
- Xsqlite3_str_appendf(tls, p, ts+23704 /* "a%d=?%d" */, libc.VaList(bp+152, ii, (ii+2)))
+ Xsqlite3_str_appendf(tls, p, ts+24164 /* "a%d=?%d" */, libc.VaList(bp+152, ii, (ii+2)))
}
}
- Xsqlite3_str_appendf(tls, p, ts+23712 /* " WHERE rowid=?1" */, 0)
+ Xsqlite3_str_appendf(tls, p, ts+24172 /* " WHERE rowid=?1" */, 0)
zSql = Xsqlite3_str_finish(tls, p)
if zSql == uintptr(0) {
rc = SQLITE_NOMEM
@@ -154033,26 +156645,26 @@ func rtreeSqlInit(tls *libc.TLS, pRtree uintptr, db uintptr, zDb uintptr, zPrefi
var azSql = [8]uintptr{
// Write the xxx_node table
- ts + 23728, /* "INSERT OR REPLAC..." */
- ts + 23781, /* "DELETE FROM '%q'..." */
+ ts + 24188, /* "INSERT OR REPLAC..." */
+ ts + 24241, /* "DELETE FROM '%q'..." */
// Read and write the xxx_rowid table
- ts + 23826, /* "SELECT nodeno FR..." */
- ts + 23878, /* "INSERT OR REPLAC..." */
- ts + 23932, /* "DELETE FROM '%q'..." */
+ ts + 24286, /* "SELECT nodeno FR..." */
+ ts + 24338, /* "INSERT OR REPLAC..." */
+ ts + 24392, /* "DELETE FROM '%q'..." */
// Read and write the xxx_parent table
- ts + 23977, /* "SELECT parentnod..." */
- ts + 24035, /* "INSERT OR REPLAC..." */
- ts + 24090, /* "DELETE FROM '%q'..." */
-} /* sqlite3.c:194690:21 */
+ ts + 24437, /* "SELECT parentnod..." */
+ ts + 24495, /* "INSERT OR REPLAC..." */
+ ts + 24550, /* "DELETE FROM '%q'..." */
+} /* sqlite3.c:195763:21 */
// The second argument to this function contains the text of an SQL statement
// that returns a single integer value. The statement is compiled and executed
// using database connection db. If successful, the integer value returned
// is written to *piVal and SQLITE_OK returned. Otherwise, an SQLite error
// code is returned and the value of *piVal after returning is not defined.
-func getIntFromStmt(tls *libc.TLS, db uintptr, zSql uintptr, piVal uintptr) int32 { /* sqlite3.c:194810:12: */
+func getIntFromStmt(tls *libc.TLS, db uintptr, zSql uintptr, piVal uintptr) int32 { /* sqlite3.c:195883:12: */
bp := tls.Alloc(8)
defer tls.Free(8)
@@ -154083,7 +156695,7 @@ func getIntFromStmt(tls *libc.TLS, db uintptr, zSql uintptr, piVal uintptr) int3
// This ensures that each node is stored on a single database page. If the
// database page-size is so large that more than RTREE_MAXCELLS entries
// would fit in a single node, use a smaller node-size.
-func getNodeSize(tls *libc.TLS, db uintptr, pRtree uintptr, isCreate int32, pzErr uintptr) int32 { /* sqlite3.c:194840:12: */
+func getNodeSize(tls *libc.TLS, db uintptr, pRtree uintptr, isCreate int32, pzErr uintptr) int32 { /* sqlite3.c:195913:12: */
bp := tls.Alloc(52)
defer tls.Free(52)
@@ -154091,7 +156703,7 @@ func getNodeSize(tls *libc.TLS, db uintptr, pRtree uintptr, isCreate int32, pzEr
var zSql uintptr
if isCreate != 0 {
*(*int32)(unsafe.Pointer(bp + 48 /* iPageSize */)) = 0
- zSql = Xsqlite3_mprintf(tls, ts+24137 /* "PRAGMA %Q.page_s..." */, libc.VaList(bp, (*Rtree)(unsafe.Pointer(pRtree)).FzDb))
+ zSql = Xsqlite3_mprintf(tls, ts+24597 /* "PRAGMA %Q.page_s..." */, libc.VaList(bp, (*Rtree)(unsafe.Pointer(pRtree)).FzDb))
rc = getIntFromStmt(tls, db, zSql, bp+48 /* &iPageSize */)
if rc == SQLITE_OK {
(*Rtree)(unsafe.Pointer(pRtree)).FiNodeSize = (*(*int32)(unsafe.Pointer(bp + 48 /* iPageSize */)) - 64)
@@ -154099,19 +156711,19 @@ func getNodeSize(tls *libc.TLS, db uintptr, pRtree uintptr, isCreate int32, pzEr
(*Rtree)(unsafe.Pointer(pRtree)).FiNodeSize = (4 + (int32((*Rtree)(unsafe.Pointer(pRtree)).FnBytesPerCell) * RTREE_MAXCELLS))
}
} else {
- *(*uintptr)(unsafe.Pointer(pzErr)) = Xsqlite3_mprintf(tls, ts+2718 /* "%s" */, libc.VaList(bp+8, Xsqlite3_errmsg(tls, db)))
+ *(*uintptr)(unsafe.Pointer(pzErr)) = Xsqlite3_mprintf(tls, ts+2790 /* "%s" */, libc.VaList(bp+8, Xsqlite3_errmsg(tls, db)))
}
} else {
zSql = Xsqlite3_mprintf(tls,
- ts+24157, /* "SELECT length(da..." */
+ ts+24617, /* "SELECT length(da..." */
libc.VaList(bp+16, (*Rtree)(unsafe.Pointer(pRtree)).FzDb, (*Rtree)(unsafe.Pointer(pRtree)).FzName))
rc = getIntFromStmt(tls, db, zSql, (pRtree + 32 /* &.iNodeSize */))
if rc != SQLITE_OK {
- *(*uintptr)(unsafe.Pointer(pzErr)) = Xsqlite3_mprintf(tls, ts+2718 /* "%s" */, libc.VaList(bp+32, Xsqlite3_errmsg(tls, db)))
+ *(*uintptr)(unsafe.Pointer(pzErr)) = Xsqlite3_mprintf(tls, ts+2790 /* "%s" */, libc.VaList(bp+32, Xsqlite3_errmsg(tls, db)))
} else if (*Rtree)(unsafe.Pointer(pRtree)).FiNodeSize < (512 - 64) {
rc = (SQLITE_CORRUPT | (int32(1) << 8))
- *(*uintptr)(unsafe.Pointer(pzErr)) = Xsqlite3_mprintf(tls, ts+24214, /* "undersize RTree ..." */
+ *(*uintptr)(unsafe.Pointer(pzErr)) = Xsqlite3_mprintf(tls, ts+24674, /* "undersize RTree ..." */
libc.VaList(bp+40, (*Rtree)(unsafe.Pointer(pRtree)).FzName))
}
}
@@ -154121,7 +156733,7 @@ func getNodeSize(tls *libc.TLS, db uintptr, pRtree uintptr, isCreate int32, pzEr
}
// Return the length of a token
-func rtreeTokenLength(tls *libc.TLS, z uintptr) int32 { /* sqlite3.c:194883:12: */
+func rtreeTokenLength(tls *libc.TLS, z uintptr) int32 { /* sqlite3.c:195956:12: */
bp := tls.Alloc(4)
defer tls.Free(4)
@@ -154136,7 +156748,7 @@ func rtreeTokenLength(tls *libc.TLS, z uintptr) int32 { /* sqlite3.c:194883:12:
// argv[1] -> database name
// argv[2] -> table name
// argv[...] -> column names...
-func rtreeInit(tls *libc.TLS, db uintptr, pAux uintptr, argc int32, argv uintptr, ppVtab uintptr, pzErr uintptr, isCreate int32) int32 { /* sqlite3.c:194897:12: */
+func rtreeInit(tls *libc.TLS, db uintptr, pAux uintptr, argc int32, argv uintptr, ppVtab uintptr, pzErr uintptr, isCreate int32) int32 { /* sqlite3.c:195970:12: */
bp := tls.Alloc(136)
defer tls.Free(136)
@@ -154162,17 +156774,17 @@ func rtreeInit(tls *libc.TLS, db uintptr, pAux uintptr, argc int32, argv uintptr
ii = 4
*(*[5]uintptr)(unsafe.Pointer(bp + 96 /* aErrMsg */)) = [5]uintptr{
uintptr(0), // 0
- ts + 24249, /* "Wrong number of ..." */ // 1
- ts + 24292, /* "Too few columns ..." */ // 2
- ts + 24327, /* "Too many columns..." */ // 3
- ts + 24363, /* "Auxiliary rtree ..." */ // 4
+ ts + 24709, /* "Wrong number of ..." */ // 1
+ ts + 24752, /* "Too few columns ..." */ // 2
+ ts + 24787, /* "Too many columns..." */ // 3
+ ts + 24823, /* "Auxiliary rtree ..." */ // 4
}
// Aux columns counted by a u8
if !((argc < 6) || (argc > (RTREE_MAX_AUX_COLUMN + 3))) {
goto __1
}
- *(*uintptr)(unsafe.Pointer(pzErr)) = Xsqlite3_mprintf(tls, ts+2718 /* "%s" */, libc.VaList(bp, *(*uintptr)(unsafe.Pointer(bp + 96 /* &aErrMsg[0] */ + uintptr((2+(libc.Bool32(argc >= 6))))*8))))
+ *(*uintptr)(unsafe.Pointer(pzErr)) = Xsqlite3_mprintf(tls, ts+2790 /* "%s" */, libc.VaList(bp, *(*uintptr)(unsafe.Pointer(bp + 96 /* &aErrMsg[0] */ + uintptr((2+(libc.Bool32(argc >= 6))))*8))))
return SQLITE_ERROR
__1:
;
@@ -154202,7 +156814,7 @@ __2:
// that is successful, call sqlite3_declare_vtab() to configure
// the r-tree table schema.
pSql = Xsqlite3_str_new(tls, db)
- Xsqlite3_str_appendf(tls, pSql, ts+24400, /* "CREATE TABLE x(%..." */
+ Xsqlite3_str_appendf(tls, pSql, ts+24860, /* "CREATE TABLE x(%..." */
libc.VaList(bp+16, rtreeTokenLength(tls, *(*uintptr)(unsafe.Pointer(argv + 3*8))), *(*uintptr)(unsafe.Pointer(argv + 3*8))))
ii = 4
__3:
@@ -154210,11 +156822,11 @@ __3:
goto __5
}
zArg = *(*uintptr)(unsafe.Pointer(argv + uintptr(ii)*8))
- if !(int32(*(*int8)(unsafe.Pointer(zArg))) == '+') {
+ if !(int32(*(*uint8)(unsafe.Pointer(zArg))) == '+') {
goto __6
}
(*Rtree)(unsafe.Pointer(pRtree)).FnAux++
- Xsqlite3_str_appendf(tls, pSql, ts+24424 /* ",%.*s" */, libc.VaList(bp+32, rtreeTokenLength(tls, (zArg+uintptr(1))), (zArg+uintptr(1))))
+ Xsqlite3_str_appendf(tls, pSql, ts+24884 /* ",%.*s" */, libc.VaList(bp+32, rtreeTokenLength(tls, (zArg+uintptr(1))), (zArg+uintptr(1))))
goto __7
__6:
if !(int32((*Rtree)(unsafe.Pointer(pRtree)).FnAux) > 0) {
@@ -154237,7 +156849,7 @@ __4:
goto __5
__5:
;
- Xsqlite3_str_appendf(tls, pSql, ts+24430 /* ");" */, 0)
+ Xsqlite3_str_appendf(tls, pSql, ts+24890 /* ");" */, 0)
zSql = Xsqlite3_str_finish(tls, pSql)
if !(!(zSql != 0)) {
goto __10
@@ -154248,14 +156860,14 @@ __10:
if !(ii < argc) {
goto __12
}
- *(*uintptr)(unsafe.Pointer(pzErr)) = Xsqlite3_mprintf(tls, ts+2718 /* "%s" */, libc.VaList(bp+64, *(*uintptr)(unsafe.Pointer(bp + 96 /* &aErrMsg[0] */ + 4*8))))
+ *(*uintptr)(unsafe.Pointer(pzErr)) = Xsqlite3_mprintf(tls, ts+2790 /* "%s" */, libc.VaList(bp+64, *(*uintptr)(unsafe.Pointer(bp + 96 /* &aErrMsg[0] */ + 4*8))))
rc = SQLITE_ERROR
goto __13
__12:
if !(SQLITE_OK != (libc.AssignInt32(&rc, Xsqlite3_declare_vtab(tls, db, zSql)))) {
goto __14
}
- *(*uintptr)(unsafe.Pointer(pzErr)) = Xsqlite3_mprintf(tls, ts+2718 /* "%s" */, libc.VaList(bp+72, Xsqlite3_errmsg(tls, db)))
+ *(*uintptr)(unsafe.Pointer(pzErr)) = Xsqlite3_mprintf(tls, ts+2790 /* "%s" */, libc.VaList(bp+72, Xsqlite3_errmsg(tls, db)))
__14:
;
__13:
@@ -154298,7 +156910,7 @@ __17:
if !(iErr != 0) {
goto __22
}
- *(*uintptr)(unsafe.Pointer(pzErr)) = Xsqlite3_mprintf(tls, ts+2718 /* "%s" */, libc.VaList(bp+80, *(*uintptr)(unsafe.Pointer(bp + 96 /* &aErrMsg[0] */ + uintptr(iErr)*8))))
+ *(*uintptr)(unsafe.Pointer(pzErr)) = Xsqlite3_mprintf(tls, ts+2790 /* "%s" */, libc.VaList(bp+80, *(*uintptr)(unsafe.Pointer(bp + 96 /* &aErrMsg[0] */ + uintptr(iErr)*8))))
goto rtreeInit_fail
__22:
;
@@ -154316,7 +156928,7 @@ __23:
if !(rc != 0) {
goto __24
}
- *(*uintptr)(unsafe.Pointer(pzErr)) = Xsqlite3_mprintf(tls, ts+2718 /* "%s" */, libc.VaList(bp+88, Xsqlite3_errmsg(tls, db)))
+ *(*uintptr)(unsafe.Pointer(pzErr)) = Xsqlite3_mprintf(tls, ts+2790 /* "%s" */, libc.VaList(bp+88, Xsqlite3_errmsg(tls, db)))
goto rtreeInit_fail
__24:
;
@@ -154336,7 +156948,7 @@ __25:
return rc
}
-var azFormat = [2]uintptr{ts + 24433 /* ",%.*s REAL" */, ts + 24444 /* ",%.*s INT" */} /* sqlite3.c:194963:25 */
+var azFormat = [2]uintptr{ts + 24893 /* ",%.*s REAL" */, ts + 24904 /* ",%.*s INT" */} /* sqlite3.c:196036:25 */
// Implementation of a scalar function that decodes r-tree nodes to
// human readable strings. This can be used for debugging and analysis.
@@ -154352,7 +156964,7 @@ var azFormat = [2]uintptr{ts + 24433 /* ",%.*s REAL" */, ts + 24444 /* ",%.*s IN
// entry for each cell in the r-tree node. Each entry is itself a
// list, containing the 8-byte rowid/pageno followed by the
// *2 coordinates.
-func rtreenode(tls *libc.TLS, ctx uintptr, nArg int32, apArg uintptr) { /* sqlite3.c:195034:13: */
+func rtreenode(tls *libc.TLS, ctx uintptr, nArg int32, apArg uintptr) { /* sqlite3.c:196107:13: */
bp := tls.Alloc(1072)
defer tls.Free(1072)
@@ -154391,13 +157003,13 @@ func rtreenode(tls *libc.TLS, ctx uintptr, nArg int32, apArg uintptr) { /* sqlit
nodeGetCell(tls, bp+56 /* &tree */, bp+16 /* &node */, ii, bp+1024 /* &cell */)
if ii > 0 {
- Xsqlite3_str_append(tls, pOut, ts+9222 /* " " */, 1)
+ Xsqlite3_str_append(tls, pOut, ts+9652 /* " " */, 1)
}
- Xsqlite3_str_appendf(tls, pOut, ts+24454 /* "{%lld" */, libc.VaList(bp, (*RtreeCell)(unsafe.Pointer(bp+1024 /* &cell */)).FiRowid))
+ Xsqlite3_str_appendf(tls, pOut, ts+24914 /* "{%lld" */, libc.VaList(bp, (*RtreeCell)(unsafe.Pointer(bp+1024 /* &cell */)).FiRowid))
for jj = 0; jj < int32((*Rtree)(unsafe.Pointer(bp+56 /* &tree */)).FnDim2); jj++ {
- Xsqlite3_str_appendf(tls, pOut, ts+24460 /* " %g" */, libc.VaList(bp+8, float64(*(*RtreeValue)(unsafe.Pointer((bp + 1024 /* &cell */ + 8 /* &.aCoord */) + uintptr(jj)*4)))))
+ Xsqlite3_str_appendf(tls, pOut, ts+24920 /* " %g" */, libc.VaList(bp+8, float64(*(*RtreeValue)(unsafe.Pointer((bp + 1024 /* &cell */ + 8 /* &.aCoord */) + uintptr(jj)*4)))))
}
- Xsqlite3_str_append(tls, pOut, ts+24464 /* "}" */, 1)
+ Xsqlite3_str_append(tls, pOut, ts+24924 /* "}" */, 1)
}
errCode = Xsqlite3_str_errcode(tls, pOut)
Xsqlite3_result_text(tls, ctx, Xsqlite3_str_finish(tls, pOut), -1, *(*uintptr)(unsafe.Pointer(&struct{ f func(*libc.TLS, uintptr) }{Xsqlite3_free})))
@@ -154412,14 +157024,18 @@ func rtreenode(tls *libc.TLS, ctx uintptr, nArg int32, apArg uintptr) { /* sqlit
// The depth value is 0 for all nodes other than the root node, and the root
// node always has nodeno=1, so the example above is the primary use for this
// routine. This routine is intended for testing and analysis only.
-func rtreedepth(tls *libc.TLS, ctx uintptr, nArg int32, apArg uintptr) { /* sqlite3.c:195085:13: */
+func rtreedepth(tls *libc.TLS, ctx uintptr, nArg int32, apArg uintptr) { /* sqlite3.c:196158:13: */
_ = nArg
if (Xsqlite3_value_type(tls, *(*uintptr)(unsafe.Pointer(apArg))) != SQLITE_BLOB) ||
(Xsqlite3_value_bytes(tls, *(*uintptr)(unsafe.Pointer(apArg))) < 2) {
- Xsqlite3_result_error(tls, ctx, ts+24466 /* "Invalid argument..." */, -1)
+ Xsqlite3_result_error(tls, ctx, ts+24926 /* "Invalid argument..." */, -1)
} else {
var zBlob uintptr = Xsqlite3_value_blob(tls, *(*uintptr)(unsafe.Pointer(apArg)))
- Xsqlite3_result_int(tls, ctx, readInt16(tls, zBlob))
+ if zBlob != 0 {
+ Xsqlite3_result_int(tls, ctx, readInt16(tls, zBlob))
+ } else {
+ Xsqlite3_result_error_nomem(tls, ctx)
+ }
}
}
@@ -154436,19 +157052,19 @@ type RtreeCheck1 = struct {
FnLeaf int32
FnNonLeaf int32
Frc int32
- _ [4]byte
+ F__ccgo_pad1 [4]byte
FzReport uintptr
FnErr int32
- _ [4]byte
-} /* sqlite3.c:195101:9 */
+ F__ccgo_pad2 [4]byte
+} /* sqlite3.c:196179:9 */
// Context object passed between the various routines that make up the
// implementation of integrity-check function rtreecheck().
-type RtreeCheck = RtreeCheck1 /* sqlite3.c:195101:27 */
+type RtreeCheck = RtreeCheck1 /* sqlite3.c:196179:27 */
// Reset SQL statement pStmt. If the sqlite3_reset() call returns an error,
// and RtreeCheck.rc==SQLITE_OK, set RtreeCheck.rc to the error code.
-func rtreeCheckReset(tls *libc.TLS, pCheck uintptr, pStmt uintptr) { /* sqlite3.c:195123:13: */
+func rtreeCheckReset(tls *libc.TLS, pCheck uintptr, pStmt uintptr) { /* sqlite3.c:196201:13: */
var rc int32 = Xsqlite3_reset(tls, pStmt)
if (*RtreeCheck)(unsafe.Pointer(pCheck)).Frc == SQLITE_OK {
(*RtreeCheck)(unsafe.Pointer(pCheck)).Frc = rc
@@ -154461,7 +157077,7 @@ func rtreeCheckReset(tls *libc.TLS, pCheck uintptr, pStmt uintptr) { /* sqlite3.
//
// If successful, a pointer to the new SQL statement is returned. Otherwise,
// NULL is returned and an error code left in RtreeCheck.rc.
-func rtreeCheckPrepare(tls *libc.TLS, pCheck uintptr, zFmt uintptr, va uintptr) uintptr { /* sqlite3.c:195136:21: */
+func rtreeCheckPrepare(tls *libc.TLS, pCheck uintptr, zFmt uintptr, va uintptr) uintptr { /* sqlite3.c:196214:21: */
bp := tls.Alloc(8)
defer tls.Free(8)
@@ -154489,7 +157105,7 @@ func rtreeCheckPrepare(tls *libc.TLS, pCheck uintptr, zFmt uintptr, va uintptr)
// The second and subsequent arguments to this function are a printf()
// style format string and arguments. This function formats the string and
// appends it to the report being accumuated in pCheck.
-func rtreeCheckAppendMsg(tls *libc.TLS, pCheck uintptr, zFmt uintptr, va uintptr) { /* sqlite3.c:195165:13: */
+func rtreeCheckAppendMsg(tls *libc.TLS, pCheck uintptr, zFmt uintptr, va uintptr) { /* sqlite3.c:196243:13: */
bp := tls.Alloc(24)
defer tls.Free(24)
@@ -154501,12 +157117,12 @@ func rtreeCheckAppendMsg(tls *libc.TLS, pCheck uintptr, zFmt uintptr, va uintptr
if z == uintptr(0) {
(*RtreeCheck)(unsafe.Pointer(pCheck)).Frc = SQLITE_NOMEM
} else {
- (*RtreeCheck)(unsafe.Pointer(pCheck)).FzReport = Xsqlite3_mprintf(tls, ts+24499, /* "%z%s%z" */
+ (*RtreeCheck)(unsafe.Pointer(pCheck)).FzReport = Xsqlite3_mprintf(tls, ts+24959, /* "%z%s%z" */
libc.VaList(bp, (*RtreeCheck)(unsafe.Pointer(pCheck)).FzReport, func() uintptr {
if (*RtreeCheck)(unsafe.Pointer(pCheck)).FzReport != 0 {
- return ts + 3040 /* "\n" */
+ return ts + 3171 /* "\n" */
}
- return ts + 703 /* "" */
+ return ts + 755 /* "" */
}(), z))
if (*RtreeCheck)(unsafe.Pointer(pCheck)).FzReport == uintptr(0) {
(*RtreeCheck)(unsafe.Pointer(pCheck)).Frc = SQLITE_NOMEM
@@ -154529,7 +157145,7 @@ func rtreeCheckAppendMsg(tls *libc.TLS, pCheck uintptr, zFmt uintptr, va uintptr
// Or, if an error does occur, NULL is returned and an error code left
// in the RtreeCheck object. The final value of *pnNode is undefined in
// this case.
-func rtreeCheckGetNode(tls *libc.TLS, pCheck uintptr, iNode I64, pnNode uintptr) uintptr { /* sqlite3.c:195199:11: */
+func rtreeCheckGetNode(tls *libc.TLS, pCheck uintptr, iNode I64, pnNode uintptr) uintptr { /* sqlite3.c:196277:11: */
bp := tls.Alloc(24)
defer tls.Free(24)
@@ -154537,7 +157153,7 @@ func rtreeCheckGetNode(tls *libc.TLS, pCheck uintptr, iNode I64, pnNode uintptr)
if ((*RtreeCheck)(unsafe.Pointer(pCheck)).Frc == SQLITE_OK) && ((*RtreeCheck)(unsafe.Pointer(pCheck)).FpGetNode == uintptr(0)) {
(*RtreeCheck)(unsafe.Pointer(pCheck)).FpGetNode = rtreeCheckPrepare(tls, pCheck,
- ts+24506, /* "SELECT data FROM..." */
+ ts+24966, /* "SELECT data FROM..." */
libc.VaList(bp, (*RtreeCheck)(unsafe.Pointer(pCheck)).FzDb, (*RtreeCheck)(unsafe.Pointer(pCheck)).FzTab))
}
@@ -154556,7 +157172,7 @@ func rtreeCheckGetNode(tls *libc.TLS, pCheck uintptr, iNode I64, pnNode uintptr)
}
rtreeCheckReset(tls, pCheck, (*RtreeCheck)(unsafe.Pointer(pCheck)).FpGetNode)
if ((*RtreeCheck)(unsafe.Pointer(pCheck)).Frc == SQLITE_OK) && (pRet == uintptr(0)) {
- rtreeCheckAppendMsg(tls, pCheck, ts+24551 /* "Node %lld missin..." */, libc.VaList(bp+16, iNode))
+ rtreeCheckAppendMsg(tls, pCheck, ts+25011 /* "Node %lld missin..." */, libc.VaList(bp+16, iNode))
}
}
@@ -154573,15 +157189,15 @@ func rtreeCheckGetNode(tls *libc.TLS, pCheck uintptr, iNode I64, pnNode uintptr)
// In both cases, this function checks that there exists an entry with
// IPK value iKey and the second column set to iVal.
//
-func rtreeCheckMapping(tls *libc.TLS, pCheck uintptr, bLeaf int32, iKey I64, iVal I64) { /* sqlite3.c:195243:13: */
+func rtreeCheckMapping(tls *libc.TLS, pCheck uintptr, bLeaf int32, iKey I64, iVal I64) { /* sqlite3.c:196321:13: */
bp := tls.Alloc(96)
defer tls.Free(96)
var rc int32
var pStmt uintptr
*(*[2]uintptr)(unsafe.Pointer(bp + 80 /* azSql */)) = [2]uintptr{
- ts + 24583, /* "SELECT parentnod..." */
- ts + 24637, /* "SELECT nodeno FR..." */
+ ts + 25043, /* "SELECT parentnod..." */
+ ts + 25097, /* "SELECT nodeno FR..." */
}
if *(*uintptr)(unsafe.Pointer((pCheck + 40 /* &.aCheckMapping */) + uintptr(bLeaf)*8)) == uintptr(0) {
@@ -154596,23 +157212,23 @@ func rtreeCheckMapping(tls *libc.TLS, pCheck uintptr, bLeaf int32, iKey I64, iVa
Xsqlite3_bind_int64(tls, pStmt, 1, iKey)
rc = Xsqlite3_step(tls, pStmt)
if rc == SQLITE_DONE {
- rtreeCheckAppendMsg(tls, pCheck, ts+24685, /* "Mapping (%lld ->..." */
+ rtreeCheckAppendMsg(tls, pCheck, ts+25145, /* "Mapping (%lld ->..." */
libc.VaList(bp+16, iKey, iVal, func() uintptr {
if bLeaf != 0 {
- return ts + 24730 /* "%_rowid" */
+ return ts + 25190 /* "%_rowid" */
}
- return ts + 24738 /* "%_parent" */
+ return ts + 25198 /* "%_parent" */
}()))
} else if rc == SQLITE_ROW {
var ii I64 = Xsqlite3_column_int64(tls, pStmt, 0)
if ii != iVal {
rtreeCheckAppendMsg(tls, pCheck,
- ts+24747, /* "Found (%lld -> %..." */
+ ts+25207, /* "Found (%lld -> %..." */
libc.VaList(bp+40, iKey, ii, func() uintptr {
if bLeaf != 0 {
- return ts + 24730 /* "%_rowid" */
+ return ts + 25190 /* "%_rowid" */
}
- return ts + 24738 /* "%_parent" */
+ return ts + 25198 /* "%_parent" */
}(), iKey, iVal))
}
}
@@ -154629,7 +157245,7 @@ func rtreeCheckMapping(tls *libc.TLS, pCheck uintptr, bLeaf int32, iKey I64, iVa
// containing pCell. In this case it is also verified that the two
// sets of coordinates are mutually consistent and an error message added
// to the RtreeCheck object if they are not.
-func rtreeCheckCellCoord(tls *libc.TLS, pCheck uintptr, iNode I64, iCell int32, pCell uintptr, pParent uintptr) { /* sqlite3.c:195295:13: */
+func rtreeCheckCellCoord(tls *libc.TLS, pCheck uintptr, iNode I64, iCell int32, pCell uintptr, pParent uintptr) { /* sqlite3.c:196373:13: */
bp := tls.Alloc(64)
defer tls.Free(64)
@@ -154655,7 +157271,7 @@ func rtreeCheckCellCoord(tls *libc.TLS, pCheck uintptr, iNode I64, iCell int32,
return (libc.Bool32(*(*RtreeValue)(unsafe.Pointer(bp + 48 /* &c1 */)) > *(*RtreeValue)(unsafe.Pointer(bp + 52 /* &c2 */))))
}() != 0 {
rtreeCheckAppendMsg(tls, pCheck,
- ts+24805 /* "Dimension %d of ..." */, libc.VaList(bp, i, iCell, iNode))
+ ts+25265 /* "Dimension %d of ..." */, libc.VaList(bp, i, iCell, iNode))
}
if pParent != 0 {
@@ -154675,7 +157291,7 @@ func rtreeCheckCellCoord(tls *libc.TLS, pCheck uintptr, iNode I64, iCell int32,
return (libc.Bool32(*(*RtreeValue)(unsafe.Pointer(bp + 52 /* &c2 */)) > *(*RtreeValue)(unsafe.Pointer(bp + 60 /* &p2 */))))
}() != 0) {
rtreeCheckAppendMsg(tls, pCheck,
- ts+24853 /* "Dimension %d of ..." */, libc.VaList(bp+24, i, iCell, iNode))
+ ts+25313 /* "Dimension %d of ..." */, libc.VaList(bp+24, i, iCell, iNode))
}
}
}
@@ -154687,7 +157303,7 @@ func rtreeCheckCellCoord(tls *libc.TLS, pCheck uintptr, iNode I64, iCell int32,
//
// If any problems are discovered, an error message is appended to the
// report accumulated in the RtreeCheck object.
-func rtreeCheckNode(tls *libc.TLS, pCheck uintptr, iDepth int32, aParent uintptr, iNode I64) { /* sqlite3.c:195341:13: */
+func rtreeCheckNode(tls *libc.TLS, pCheck uintptr, iDepth int32, aParent uintptr, iNode I64) { /* sqlite3.c:196419:13: */
bp := tls.Alloc(52)
defer tls.Free(52)
@@ -154698,14 +157314,14 @@ func rtreeCheckNode(tls *libc.TLS, pCheck uintptr, iDepth int32, aParent uintptr
if aNode != 0 {
if *(*int32)(unsafe.Pointer(bp + 48 /* nNode */)) < 4 {
rtreeCheckAppendMsg(tls, pCheck,
- ts+24920 /* "Node %lld is too..." */, libc.VaList(bp, iNode, *(*int32)(unsafe.Pointer(bp + 48 /* nNode */))))
+ ts+25380 /* "Node %lld is too..." */, libc.VaList(bp, iNode, *(*int32)(unsafe.Pointer(bp + 48 /* nNode */))))
} else {
var nCell int32 // Number of cells on page
var i int32 // Used to iterate through cells
if aParent == uintptr(0) {
iDepth = readInt16(tls, aNode)
if iDepth > RTREE_MAX_DEPTH {
- rtreeCheckAppendMsg(tls, pCheck, ts+24954 /* "Rtree depth out ..." */, libc.VaList(bp+16, iDepth))
+ rtreeCheckAppendMsg(tls, pCheck, ts+25414 /* "Rtree depth out ..." */, libc.VaList(bp+16, iDepth))
Xsqlite3_free(tls, aNode)
return
}
@@ -154713,7 +157329,7 @@ func rtreeCheckNode(tls *libc.TLS, pCheck uintptr, iDepth int32, aParent uintptr
nCell = readInt16(tls, (aNode + 2))
if (4 + (nCell * (8 + (((*RtreeCheck)(unsafe.Pointer(pCheck)).FnDim * 2) * 4)))) > *(*int32)(unsafe.Pointer(bp + 48 /* nNode */)) {
rtreeCheckAppendMsg(tls, pCheck,
- ts+24984, /* "Node %lld is too..." */
+ ts+25444, /* "Node %lld is too..." */
libc.VaList(bp+24, iNode, nCell, *(*int32)(unsafe.Pointer(bp + 48 /* nNode */))))
} else {
for i = 0; i < nCell; i++ {
@@ -154741,20 +157357,20 @@ func rtreeCheckNode(tls *libc.TLS, pCheck uintptr, iDepth int32, aParent uintptr
// %_rowid or %_parent table is exactly nExpect. If not, it adds
// an error message to the report in the RtreeCheck object indicated
// by the first argument.
-func rtreeCheckCount(tls *libc.TLS, pCheck uintptr, zTbl uintptr, nExpect I64) { /* sqlite3.c:195404:13: */
+func rtreeCheckCount(tls *libc.TLS, pCheck uintptr, zTbl uintptr, nExpect I64) { /* sqlite3.c:196482:13: */
bp := tls.Alloc(48)
defer tls.Free(48)
if (*RtreeCheck)(unsafe.Pointer(pCheck)).Frc == SQLITE_OK {
var pCount uintptr
- pCount = rtreeCheckPrepare(tls, pCheck, ts+25039, /* "SELECT count(*) ..." */
+ pCount = rtreeCheckPrepare(tls, pCheck, ts+25499, /* "SELECT count(*) ..." */
libc.VaList(bp, (*RtreeCheck)(unsafe.Pointer(pCheck)).FzDb, (*RtreeCheck)(unsafe.Pointer(pCheck)).FzTab, zTbl))
if pCount != 0 {
if Xsqlite3_step(tls, pCount) == SQLITE_ROW {
var nActual I64 = Xsqlite3_column_int64(tls, pCount, 0)
if nActual != nExpect {
rtreeCheckAppendMsg(tls, pCheck,
- ts+25070 /* "Wrong number of ..." */, libc.VaList(bp+24, zTbl, nExpect, nActual))
+ ts+25530 /* "Wrong number of ..." */, libc.VaList(bp+24, zTbl, nExpect, nActual))
}
}
(*RtreeCheck)(unsafe.Pointer(pCheck)).Frc = Xsqlite3_finalize(tls, pCount)
@@ -154764,7 +157380,7 @@ func rtreeCheckCount(tls *libc.TLS, pCheck uintptr, zTbl uintptr, nExpect I64) {
// This function does the bulk of the work for the rtree integrity-check.
// It is called by rtreecheck(), which is the SQL function implementation.
-func rtreeCheckTable(tls *libc.TLS, db uintptr, zDb uintptr, zTab uintptr, pzReport uintptr) int32 { /* sqlite3.c:195428:12: */
+func rtreeCheckTable(tls *libc.TLS, db uintptr, zDb uintptr, zTab uintptr, pzReport uintptr) int32 { /* sqlite3.c:196506:12: */
bp := tls.Alloc(120)
defer tls.Free(120)
@@ -154784,13 +157400,13 @@ func rtreeCheckTable(tls *libc.TLS, db uintptr, zDb uintptr, zTab uintptr, pzRep
// to ensure that the queries run as part of this integrity-check operate
// on a consistent snapshot.
if Xsqlite3_get_autocommit(tls, db) != 0 {
- (*RtreeCheck)(unsafe.Pointer(bp + 32 /* &check */)).Frc = Xsqlite3_exec(tls, db, ts+12760 /* "BEGIN" */, uintptr(0), uintptr(0), uintptr(0))
+ (*RtreeCheck)(unsafe.Pointer(bp + 32 /* &check */)).Frc = Xsqlite3_exec(tls, db, ts+13213 /* "BEGIN" */, uintptr(0), uintptr(0), uintptr(0))
bEnd = 1
}
// Find the number of auxiliary columns
if (*RtreeCheck)(unsafe.Pointer(bp+32 /* &check */)).Frc == SQLITE_OK {
- pStmt = rtreeCheckPrepare(tls, bp+32 /* &check */, ts+25137 /* "SELECT * FROM %Q..." */, libc.VaList(bp, zDb, zTab))
+ pStmt = rtreeCheckPrepare(tls, bp+32 /* &check */, ts+25597 /* "SELECT * FROM %Q..." */, libc.VaList(bp, zDb, zTab))
if pStmt != 0 {
nAux = (Xsqlite3_column_count(tls, pStmt) - 2)
Xsqlite3_finalize(tls, pStmt)
@@ -154799,12 +157415,12 @@ func rtreeCheckTable(tls *libc.TLS, db uintptr, zDb uintptr, zTab uintptr, pzRep
}
// Find number of dimensions in the rtree table.
- pStmt = rtreeCheckPrepare(tls, bp+32 /* &check */, ts+22957 /* "SELECT * FROM %Q..." */, libc.VaList(bp+16, zDb, zTab))
+ pStmt = rtreeCheckPrepare(tls, bp+32 /* &check */, ts+23417 /* "SELECT * FROM %Q..." */, libc.VaList(bp+16, zDb, zTab))
if pStmt != 0 {
var rc int32
(*RtreeCheck)(unsafe.Pointer(bp + 32 /* &check */)).FnDim = (((Xsqlite3_column_count(tls, pStmt) - 1) - nAux) / 2)
if (*RtreeCheck)(unsafe.Pointer(bp+32 /* &check */)).FnDim < 1 {
- rtreeCheckAppendMsg(tls, bp+32 /* &check */, ts+25165 /* "Schema corrupt o..." */, 0)
+ rtreeCheckAppendMsg(tls, bp+32 /* &check */, ts+25625 /* "Schema corrupt o..." */, 0)
} else if SQLITE_ROW == Xsqlite3_step(tls, pStmt) {
(*RtreeCheck)(unsafe.Pointer(bp + 32 /* &check */)).FbInt = (libc.Bool32(Xsqlite3_column_type(tls, pStmt, 1) == SQLITE_INTEGER))
}
@@ -154819,8 +157435,8 @@ func rtreeCheckTable(tls *libc.TLS, db uintptr, zDb uintptr, zTab uintptr, pzRep
if (*RtreeCheck)(unsafe.Pointer(bp+32 /* &check */)).Frc == SQLITE_OK {
rtreeCheckNode(tls, bp+32 /* &check */, 0, uintptr(0), int64(1))
}
- rtreeCheckCount(tls, bp+32 /* &check */, ts+25196 /* "_rowid" */, int64((*RtreeCheck)(unsafe.Pointer(bp+32 /* &check */)).FnLeaf))
- rtreeCheckCount(tls, bp+32 /* &check */, ts+25203 /* "_parent" */, int64((*RtreeCheck)(unsafe.Pointer(bp+32 /* &check */)).FnNonLeaf))
+ rtreeCheckCount(tls, bp+32 /* &check */, ts+25656 /* "_rowid" */, int64((*RtreeCheck)(unsafe.Pointer(bp+32 /* &check */)).FnLeaf))
+ rtreeCheckCount(tls, bp+32 /* &check */, ts+25663 /* "_parent" */, int64((*RtreeCheck)(unsafe.Pointer(bp+32 /* &check */)).FnNonLeaf))
}
// Finalize SQL statements used by the integrity-check
@@ -154830,7 +157446,7 @@ func rtreeCheckTable(tls *libc.TLS, db uintptr, zDb uintptr, zTab uintptr, pzRep
// If one was opened, close the transaction
if bEnd != 0 {
- var rc int32 = Xsqlite3_exec(tls, db, ts+25211 /* "END" */, uintptr(0), uintptr(0), uintptr(0))
+ var rc int32 = Xsqlite3_exec(tls, db, ts+25671 /* "END" */, uintptr(0), uintptr(0), uintptr(0))
if (*RtreeCheck)(unsafe.Pointer(bp+32 /* &check */)).Frc == SQLITE_OK {
(*RtreeCheck)(unsafe.Pointer(bp + 32 /* &check */)).Frc = rc
}
@@ -154870,13 +157486,13 @@ func rtreeCheckTable(tls *libc.TLS, db uintptr, zDb uintptr, zTab uintptr, pzRep
// as there are non-leaf cells in the r-tree structure, and that
// there is a non-leaf cell that corresponds to each entry in the
// %_parent table.
-func rtreecheck(tls *libc.TLS, ctx uintptr, nArg int32, apArg uintptr) { /* sqlite3.c:195533:13: */
+func rtreecheck(tls *libc.TLS, ctx uintptr, nArg int32, apArg uintptr) { /* sqlite3.c:196611:13: */
bp := tls.Alloc(8)
defer tls.Free(8)
if (nArg != 1) && (nArg != 2) {
Xsqlite3_result_error(tls, ctx,
- ts+25215 /* "wrong number of ..." */, -1)
+ ts+25675 /* "wrong number of ..." */, -1)
} else {
var rc int32
*(*uintptr)(unsafe.Pointer(bp /* zReport */)) = uintptr(0)
@@ -154884,7 +157500,7 @@ func rtreecheck(tls *libc.TLS, ctx uintptr, nArg int32, apArg uintptr) { /* sqli
var zTab uintptr
if nArg == 1 {
zTab = zDb
- zDb = ts + 5327 /* "main" */
+ zDb = ts + 5458 /* "main" */
} else {
zTab = Xsqlite3_value_text(tls, *(*uintptr)(unsafe.Pointer(apArg + 1*8)))
}
@@ -154894,7 +157510,7 @@ func rtreecheck(tls *libc.TLS, ctx uintptr, nArg int32, apArg uintptr) { /* sqli
if *(*uintptr)(unsafe.Pointer(bp /* zReport */)) != 0 {
return *(*uintptr)(unsafe.Pointer(bp /* zReport */))
}
- return ts + 15881 /* "ok" */
+ return ts + 16336 /* "ok" */
}(), -1, libc.UintptrFromInt32(-1))
} else {
Xsqlite3_result_error_code(tls, ctx, rc)
@@ -154929,7 +157545,7 @@ func rtreecheck(tls *libc.TLS, ctx uintptr, nArg int32, apArg uintptr) { /* sqli
// Compiler and version
// Datatype for coordinates
-type GeoCoord = float32 /* sqlite3.c:195657:15 */
+type GeoCoord = float32 /* sqlite3.c:196735:15 */
// Internal representation of a polygon.
//
@@ -154955,7 +157571,7 @@ type GeoPoly1 = struct {
FnVertex int32
Fhdr [4]uint8
Fa [8]GeoCoord
-} /* sqlite3.c:195681:9 */
+} /* sqlite3.c:196759:9 */
// Internal representation of a polygon.
//
@@ -154977,7 +157593,7 @@ type GeoPoly1 = struct {
// warnings coming from some compiler (notably, clang). In reality, the size
// of each GeoPoly memory allocate is adjusted as necessary so that the
// GeoPoly.a[] array at the end is the appropriate size.
-type GeoPoly = GeoPoly1 /* sqlite3.c:195681:24 */
+type GeoPoly = GeoPoly1 /* sqlite3.c:196759:24 */
// The size of a memory allocation needed for a GeoPoly object sufficient
// to hold N coordinate pairs.
@@ -154988,13 +157604,13 @@ type GeoPoly = GeoPoly1 /* sqlite3.c:195681:24 */
// State of a parse of a GeoJSON input.
type GeoParse1 = struct {
- Fz uintptr
- FnVertex int32
- FnAlloc int32
- FnErr int32
- _ [4]byte
- Fa uintptr
-} /* sqlite3.c:195704:9 */
+ Fz uintptr
+ FnVertex int32
+ FnAlloc int32
+ FnErr int32
+ F__ccgo_pad1 [4]byte
+ Fa uintptr
+} /* sqlite3.c:196782:9 */
// The size of a memory allocation needed for a GeoPoly object sufficient
// to hold N coordinate pairs.
@@ -155004,10 +157620,10 @@ type GeoParse1 = struct {
// to silence (incorrect) UBSAN warnings if the array index is too large.
// State of a parse of a GeoJSON input.
-type GeoParse = GeoParse1 /* sqlite3.c:195704:25 */
+type GeoParse = GeoParse1 /* sqlite3.c:196782:25 */
// Do a 4-byte byte swap
-func geopolySwab32(tls *libc.TLS, a uintptr) { /* sqlite3.c:195714:13: */
+func geopolySwab32(tls *libc.TLS, a uintptr) { /* sqlite3.c:196792:13: */
var t uint8 = *(*uint8)(unsafe.Pointer(a))
*(*uint8)(unsafe.Pointer(a)) = *(*uint8)(unsafe.Pointer(a + 3))
*(*uint8)(unsafe.Pointer(a + 3)) = t
@@ -155017,33 +157633,33 @@ func geopolySwab32(tls *libc.TLS, a uintptr) { /* sqlite3.c:195714:13: */
}
// Skip whitespace. Return the next non-whitespace character.
-func geopolySkipSpace(tls *libc.TLS, p uintptr) int8 { /* sqlite3.c:195724:13: */
+func geopolySkipSpace(tls *libc.TLS, p uintptr) uint8 { /* sqlite3.c:196802:13: */
for jsonIsSpace[*(*uint8)(unsafe.Pointer((*GeoParse)(unsafe.Pointer(p)).Fz))] != 0 {
(*GeoParse)(unsafe.Pointer(p)).Fz++
}
- return int8(*(*uint8)(unsafe.Pointer((*GeoParse)(unsafe.Pointer(p)).Fz)))
+ return uint8(*(*uint8)(unsafe.Pointer((*GeoParse)(unsafe.Pointer(p)).Fz)))
}
// Parse out a number. Write the value into *pVal if pVal!=0.
// return non-zero on success and zero if the next token is not a number.
-func geopolyParseNumber(tls *libc.TLS, p uintptr, pVal uintptr) int32 { /* sqlite3.c:195732:12: */
+func geopolyParseNumber(tls *libc.TLS, p uintptr, pVal uintptr) int32 { /* sqlite3.c:196810:12: */
bp := tls.Alloc(8)
defer tls.Free(8)
- var c int8 = geopolySkipSpace(tls, p)
+ var c uint8 = geopolySkipSpace(tls, p)
var z uintptr = (*GeoParse)(unsafe.Pointer(p)).Fz
var j int32 = 0
var seenDP int32 = 0
var seenE int32 = 0
if int32(c) == '-' {
j = 1
- c = int8(*(*uint8)(unsafe.Pointer(z + uintptr(j))))
+ c = uint8(*(*uint8)(unsafe.Pointer(z + uintptr(j))))
}
if ((int32(c) == '0') && (int32(*(*uint8)(unsafe.Pointer(z + uintptr((j + 1))))) >= '0')) && (int32(*(*uint8)(unsafe.Pointer(z + uintptr((j + 1))))) <= '9') {
return 0
}
for ; ; j++ {
- c = int8(*(*uint8)(unsafe.Pointer(z + uintptr(j))))
+ c = uint8(*(*uint8)(unsafe.Pointer(z + uintptr(j))))
if (int32(Xsqlite3CtypeMap[uint8(c)]) & 0x04) != 0 {
continue
}
@@ -155065,10 +157681,10 @@ func geopolyParseNumber(tls *libc.TLS, p uintptr, pVal uintptr) int32 { /* sqlit
return -1
}
seenDP = libc.AssignInt32(&seenE, 1)
- c = int8(*(*uint8)(unsafe.Pointer(z + uintptr((j + 1)))))
+ c = uint8(*(*uint8)(unsafe.Pointer(z + uintptr((j + 1)))))
if (int32(c) == '+') || (int32(c) == '-') {
j++
- c = int8(*(*uint8)(unsafe.Pointer(z + uintptr((j + 1)))))
+ c = uint8(*(*uint8)(unsafe.Pointer(z + uintptr((j + 1)))))
}
if (int32(c) < '0') || (int32(c) > '9') {
return 0
@@ -155098,7 +157714,7 @@ func geopolyParseNumber(tls *libc.TLS, p uintptr, pVal uintptr) int32 { /* sqlit
// that object.
//
// If any error occurs, return NULL.
-func geopolyParseJson(tls *libc.TLS, z uintptr, pRc uintptr) uintptr { /* sqlite3.c:195790:16: */
+func geopolyParseJson(tls *libc.TLS, z uintptr, pRc uintptr) uintptr { /* sqlite3.c:196868:16: */
bp := tls.Alloc(36)
defer tls.Free(36)
@@ -155107,7 +157723,7 @@ func geopolyParseJson(tls *libc.TLS, z uintptr, pRc uintptr) uintptr { /* sqlite
var rc int32
var aNew uintptr
var ii int32
- var c int8
+ var c uint8
var pOut uintptr
// var x int32 at bp+32, 4
rc = SQLITE_OK
@@ -155243,7 +157859,7 @@ __16:
// in the binary format or JSON text. Compute a GeoPoly object and
// return a pointer to that object. Or if the input is not a well-formed
// polygon, put an error message in sqlite3_context and return NULL.
-func geopolyFuncParam(tls *libc.TLS, pCtx uintptr, pVal uintptr, pRc uintptr) uintptr { /* sqlite3.c:195867:16: */
+func geopolyFuncParam(tls *libc.TLS, pCtx uintptr, pVal uintptr, pRc uintptr) uintptr { /* sqlite3.c:196945:16: */
bp := tls.Alloc(4)
defer tls.Free(4)
@@ -155253,6 +157869,10 @@ func geopolyFuncParam(tls *libc.TLS, pCtx uintptr, pVal uintptr, pRc uintptr) ui
((uint64(libc.AssignInt32(&nByte, Xsqlite3_value_bytes(tls, pVal)))) >= (uint64(4) + (uint64(6) * uint64(unsafe.Sizeof(GeoCoord(0)))))) {
var a uintptr = Xsqlite3_value_blob(tls, pVal)
var nVertex int32
+ if a == uintptr(0) {
+ Xsqlite3_result_error_nomem(tls, pCtx)
+ return uintptr(0)
+ }
nVertex = (((int32(*(*uint8)(unsafe.Pointer(a + 1))) << 16) + (int32(*(*uint8)(unsafe.Pointer(a + 2))) << 8)) + int32(*(*uint8)(unsafe.Pointer(a + 3))))
if ((int32(*(*uint8)(unsafe.Pointer(a))) == 0) || (int32(*(*uint8)(unsafe.Pointer(a))) == 1)) &&
((((uint64(nVertex * 2)) * uint64(unsafe.Sizeof(GeoCoord(0)))) + uint64(4)) == uint64(uint32(nByte))) {
@@ -155305,7 +157925,7 @@ func geopolyFuncParam(tls *libc.TLS, pCtx uintptr, pVal uintptr, pRc uintptr) ui
// If the input is a well-formed Geopoly BLOB or JSON string
// then return the BLOB representation of the polygon. Otherwise
// return NULL.
-func geopolyBlobFunc(tls *libc.TLS, context uintptr, argc int32, argv uintptr) { /* sqlite3.c:195923:13: */
+func geopolyBlobFunc(tls *libc.TLS, context uintptr, argc int32, argv uintptr) { /* sqlite3.c:197005:13: */
var p uintptr = geopolyFuncParam(tls, context, *(*uintptr)(unsafe.Pointer(argv)), uintptr(0))
if p != 0 {
Xsqlite3_result_blob(tls, context, p+4, /* &.hdr */
@@ -155318,7 +157938,7 @@ func geopolyBlobFunc(tls *libc.TLS, context uintptr, argc int32, argv uintptr) {
//
// Interpret X as a polygon and render it as a JSON array
// of coordinates. Or, if X is not a valid polygon, return NULL.
-func geopolyJsonFunc(tls *libc.TLS, context uintptr, argc int32, argv uintptr) { /* sqlite3.c:195942:13: */
+func geopolyJsonFunc(tls *libc.TLS, context uintptr, argc int32, argv uintptr) { /* sqlite3.c:197024:13: */
bp := tls.Alloc(32)
defer tls.Free(32)
@@ -155327,11 +157947,11 @@ func geopolyJsonFunc(tls *libc.TLS, context uintptr, argc int32, argv uintptr) {
var db uintptr = Xsqlite3_context_db_handle(tls, context)
var x uintptr = Xsqlite3_str_new(tls, db)
var i int32
- Xsqlite3_str_append(tls, x, ts+25266 /* "[" */, 1)
+ Xsqlite3_str_append(tls, x, ts+25726 /* "[" */, 1)
for i = 0; i < (*GeoPoly)(unsafe.Pointer(p)).FnVertex; i++ {
- Xsqlite3_str_appendf(tls, x, ts+25268 /* "[%!g,%!g]," */, libc.VaList(bp, float64(*(*GeoCoord)(unsafe.Pointer((p + 8 /* &.a */) + uintptr(((i)*2))*4))), float64(*(*GeoCoord)(unsafe.Pointer((p + 8 /* &.a */) + uintptr((((i)*2)+1))*4)))))
+ Xsqlite3_str_appendf(tls, x, ts+25728 /* "[%!g,%!g]," */, libc.VaList(bp, float64(*(*GeoCoord)(unsafe.Pointer((p + 8 /* &.a */) + uintptr(((i)*2))*4))), float64(*(*GeoCoord)(unsafe.Pointer((p + 8 /* &.a */) + uintptr((((i)*2)+1))*4)))))
}
- Xsqlite3_str_appendf(tls, x, ts+25279 /* "[%!g,%!g]]" */, libc.VaList(bp+16, float64(*(*GeoCoord)(unsafe.Pointer((p + 8 /* &.a */)))), float64(*(*GeoCoord)(unsafe.Pointer((p + 8 /* &.a */) + 1*4)))))
+ Xsqlite3_str_appendf(tls, x, ts+25739 /* "[%!g,%!g]]" */, libc.VaList(bp+16, float64(*(*GeoCoord)(unsafe.Pointer((p + 8 /* &.a */)))), float64(*(*GeoCoord)(unsafe.Pointer((p + 8 /* &.a */) + 1*4)))))
Xsqlite3_result_text(tls, context, Xsqlite3_str_finish(tls, x), -1, *(*uintptr)(unsafe.Pointer(&struct{ f func(*libc.TLS, uintptr) }{Xsqlite3_free})))
Xsqlite3_free(tls, p)
}
@@ -155341,7 +157961,7 @@ func geopolyJsonFunc(tls *libc.TLS, context uintptr, argc int32, argv uintptr) {
//
// Interpret X as a polygon and render it as a SVG .
// Additional arguments are added as attributes to the .
-func geopolySvgFunc(tls *libc.TLS, context uintptr, argc int32, argv uintptr) { /* sqlite3.c:195968:13: */
+func geopolySvgFunc(tls *libc.TLS, context uintptr, argc int32, argv uintptr) { /* sqlite3.c:197050:13: */
bp := tls.Alloc(48)
defer tls.Free(48)
@@ -155354,20 +157974,20 @@ func geopolySvgFunc(tls *libc.TLS, context uintptr, argc int32, argv uintptr) {
var db uintptr = Xsqlite3_context_db_handle(tls, context)
var x uintptr = Xsqlite3_str_new(tls, db)
var i int32
- var cSep int8 = int8('\'')
- Xsqlite3_str_appendf(tls, x, ts+25290 /* "" */, 0)
+ Xsqlite3_str_appendf(tls, x, ts+25788 /* ">" */, 0)
Xsqlite3_result_text(tls, context, Xsqlite3_str_finish(tls, x), -1, *(*uintptr)(unsafe.Pointer(&struct{ f func(*libc.TLS, uintptr) }{Xsqlite3_free})))
Xsqlite3_free(tls, p)
}
@@ -155387,7 +158007,7 @@ func geopolySvgFunc(tls *libc.TLS, context uintptr, argc int32, argv uintptr) {
// Rotate by R around the point (0,0):
//
// geopoly_xform(poly, cos(R), sin(R), -sin(R), cos(R), 0, 0)
-func geopolyXformFunc(tls *libc.TLS, context uintptr, argc int32, argv uintptr) { /* sqlite3.c:196015:13: */
+func geopolyXformFunc(tls *libc.TLS, context uintptr, argc int32, argv uintptr) { /* sqlite3.c:197097:13: */
var p uintptr = geopolyFuncParam(tls, context, *(*uintptr)(unsafe.Pointer(argv)), uintptr(0))
var A float64 = Xsqlite3_value_double(tls, *(*uintptr)(unsafe.Pointer(argv + 1*8)))
var B float64 = Xsqlite3_value_double(tls, *(*uintptr)(unsafe.Pointer(argv + 2*8)))
@@ -155420,7 +158040,7 @@ func geopolyXformFunc(tls *libc.TLS, context uintptr, argc int32, argv uintptr)
// This routine can also be used to detect polygons that rotate in
// the wrong direction. Polygons are suppose to be counter-clockwise (CCW).
// This routine returns a negative value for clockwise (CW) polygons.
-func geopolyArea(tls *libc.TLS, p uintptr) float64 { /* sqlite3.c:196051:15: */
+func geopolyArea(tls *libc.TLS, p uintptr) float64 { /* sqlite3.c:197133:15: */
var rArea float64 = 0.0
var ii int32
for ii = 0; ii < ((*GeoPoly)(unsafe.Pointer(p)).FnVertex - 1); ii++ {
@@ -155440,7 +158060,7 @@ func geopolyArea(tls *libc.TLS, p uintptr) float64 { /* sqlite3.c:196051:15: */
// enclosed by the polygon. If the polygon circulates clockwise instead
// of counterclockwise (as it should) then return the negative of the
// enclosed area. Otherwise return NULL.
-func geopolyAreaFunc(tls *libc.TLS, context uintptr, argc int32, argv uintptr) { /* sqlite3.c:196073:13: */
+func geopolyAreaFunc(tls *libc.TLS, context uintptr, argc int32, argv uintptr) { /* sqlite3.c:197155:13: */
var p uintptr = geopolyFuncParam(tls, context, *(*uintptr)(unsafe.Pointer(argv)), uintptr(0))
if p != 0 {
Xsqlite3_result_double(tls, context, geopolyArea(tls, p))
@@ -155459,7 +158079,7 @@ func geopolyAreaFunc(tls *libc.TLS, context uintptr, argc int32, argv uintptr) {
//
// Use this routine to sanitize historical inputs that that sometimes
// contain polygons that wind in the wrong direction.
-func geopolyCcwFunc(tls *libc.TLS, context uintptr, argc int32, argv uintptr) { /* sqlite3.c:196098:13: */
+func geopolyCcwFunc(tls *libc.TLS, context uintptr, argc int32, argv uintptr) { /* sqlite3.c:197180:13: */
var p uintptr = geopolyFuncParam(tls, context, *(*uintptr)(unsafe.Pointer(argv)), uintptr(0))
if p != 0 {
if geopolyArea(tls, p) < 0.0 {
@@ -155495,7 +158115,7 @@ func geopolyCcwFunc(tls *libc.TLS, context uintptr, argc int32, argv uintptr) {
}
// Fast approximation for sine(X) for X between -0.5*pi and 2*pi
-func geopolySine(tls *libc.TLS, r float64) float64 { /* sqlite3.c:196126:15: */
+func geopolySine(tls *libc.TLS, r float64) float64 { /* sqlite3.c:197208:15: */
if r >= (float64(1.5) * 3.1415926535897932385) {
r = r - (float64(2.0) * 3.1415926535897932385)
@@ -155515,7 +158135,7 @@ func geopolySine(tls *libc.TLS, r float64) float64 { /* sqlite3.c:196126:15: */
//
// Construct a simple, convex, regular polygon centered at X, Y
// with circumradius R and with N sides.
-func geopolyRegularFunc(tls *libc.TLS, context uintptr, argc int32, argv uintptr) { /* sqlite3.c:196147:13: */
+func geopolyRegularFunc(tls *libc.TLS, context uintptr, argc int32, argv uintptr) { /* sqlite3.c:197229:13: */
bp := tls.Alloc(4)
defer tls.Free(4)
@@ -155560,7 +158180,7 @@ func geopolyRegularFunc(tls *libc.TLS, context uintptr, argc int32, argv uintptr
//
// If pPoly is NULL but aCoord is not NULL, then compute a new GeoPoly from
// the bounding box in aCoord and return a pointer to that GeoPoly.
-func geopolyBBox(tls *libc.TLS, context uintptr, pPoly uintptr, aCoord uintptr, pRc uintptr) uintptr { /* sqlite3.c:196190:16: */
+func geopolyBBox(tls *libc.TLS, context uintptr, pPoly uintptr, aCoord uintptr, pRc uintptr) uintptr { /* sqlite3.c:197272:16: */
bp := tls.Alloc(4)
defer tls.Free(4)
@@ -155689,14 +158309,19 @@ __16:
;
goto __4
__3:
+ if !(aCoord != 0) {
+ goto __20
+ }
libc.Xmemset(tls, aCoord, 0, (uint64(unsafe.Sizeof(RtreeCoord{})) * uint64(4)))
+__20:
+ ;
__4:
;
return pOut
}
// Implementation of the geopoly_bbox(X) SQL function.
-func geopolyBBoxFunc(tls *libc.TLS, context uintptr, argc int32, argv uintptr) { /* sqlite3.c:196261:13: */
+func geopolyBBoxFunc(tls *libc.TLS, context uintptr, argc int32, argv uintptr) { /* sqlite3.c:197343:13: */
var p uintptr = geopolyBBox(tls, context, *(*uintptr)(unsafe.Pointer(argv)), uintptr(0), uintptr(0))
if p != 0 {
Xsqlite3_result_blob(tls, context, p+4, /* &.hdr */
@@ -155709,13 +158334,13 @@ func geopolyBBoxFunc(tls *libc.TLS, context uintptr, argc int32, argv uintptr) {
type GeoBBox1 = struct {
FisInit int32
Fa [4]RtreeCoord
-} /* sqlite3.c:196277:9 */
+} /* sqlite3.c:197359:9 */
// State vector for the geopoly_group_bbox() aggregate function.
-type GeoBBox = GeoBBox1 /* sqlite3.c:196277:24 */
+type GeoBBox = GeoBBox1 /* sqlite3.c:197359:24 */
// Implementation of the geopoly_group_bbox(X) aggregate SQL function.
-func geopolyBBoxStep(tls *libc.TLS, context uintptr, argc int32, argv uintptr) { /* sqlite3.c:196287:13: */
+func geopolyBBoxStep(tls *libc.TLS, context uintptr, argc int32, argv uintptr) { /* sqlite3.c:197369:13: */
bp := tls.Alloc(20)
defer tls.Free(20)
@@ -155749,7 +158374,7 @@ func geopolyBBoxStep(tls *libc.TLS, context uintptr, argc int32, argv uintptr) {
}
}
-func geopolyBBoxFinal(tls *libc.TLS, context uintptr) { /* sqlite3.c:196310:13: */
+func geopolyBBoxFinal(tls *libc.TLS, context uintptr) { /* sqlite3.c:197392:13: */
var p uintptr
var pBBox uintptr
pBBox = Xsqlite3_aggregate_context(tls, context, 0)
@@ -155776,7 +158401,7 @@ func geopolyBBoxFinal(tls *libc.TLS, context uintptr) { /* sqlite3.c:196310:13:
//
// The left-most coordinate min(x1,x2) is not considered to be part of
// the line segment for the purposes of this analysis.
-func pointBeneathLine(tls *libc.TLS, x0 float64, y0 float64, x1 float64, y1 float64, x2 float64, y2 float64) int32 { /* sqlite3.c:196340:12: */
+func pointBeneathLine(tls *libc.TLS, x0 float64, y0 float64, x1 float64, y1 float64, x2 float64, y2 float64) int32 { /* sqlite3.c:197422:12: */
var y float64
if (x0 == x1) && (y0 == y1) {
return 2
@@ -155817,7 +158442,7 @@ func pointBeneathLine(tls *libc.TLS, x0 float64, y0 float64, x1 float64, y1 floa
// Return +2 if point X,Y is within polygon P.
// Return +1 if point X,Y is on the polygon boundary.
// Return 0 if point X,Y is outside the polygon
-func geopolyContainsPointFunc(tls *libc.TLS, context uintptr, argc int32, argv uintptr) { /* sqlite3.c:196371:13: */
+func geopolyContainsPointFunc(tls *libc.TLS, context uintptr, argc int32, argv uintptr) { /* sqlite3.c:197453:13: */
var p1 uintptr = geopolyFuncParam(tls, context, *(*uintptr)(unsafe.Pointer(argv)), uintptr(0))
var x0 float64 = Xsqlite3_value_double(tls, *(*uintptr)(unsafe.Pointer(argv + 1*8)))
var y0 float64 = Xsqlite3_value_double(tls, *(*uintptr)(unsafe.Pointer(argv + 2*8)))
@@ -155855,7 +158480,7 @@ func geopolyContainsPointFunc(tls *libc.TLS, context uintptr, argc int32, argv u
// Return +1 if P2 is contained within P1
// Return 0 if any part of P2 is on the outside of P1
//
-func geopolyWithinFunc(tls *libc.TLS, context uintptr, argc int32, argv uintptr) { /* sqlite3.c:196414:13: */
+func geopolyWithinFunc(tls *libc.TLS, context uintptr, argc int32, argv uintptr) { /* sqlite3.c:197496:13: */
var p1 uintptr = geopolyFuncParam(tls, context, *(*uintptr)(unsafe.Pointer(argv)), uintptr(0))
var p2 uintptr = geopolyFuncParam(tls, context, *(*uintptr)(unsafe.Pointer(argv + 1*8)), uintptr(0))
if (p1 != 0) && (p2 != 0) {
@@ -155882,39 +158507,39 @@ func geopolyWithinFunc(tls *libc.TLS, context uintptr, argc int32, argv uintptr)
// Objects used by the overlap algorihm.
type GeoEvent1 = struct {
- Fx float64
- FeType int32
- _ [4]byte
- FpSeg uintptr
- FpNext uintptr
-} /* sqlite3.c:196434:9 */
+ Fx float64
+ FeType int32
+ F__ccgo_pad1 [4]byte
+ FpSeg uintptr
+ FpNext uintptr
+} /* sqlite3.c:197516:9 */
// Objects used by the overlap algorihm.
-type GeoEvent = GeoEvent1 /* sqlite3.c:196434:25 */
+type GeoEvent = GeoEvent1 /* sqlite3.c:197516:25 */
type GeoSegment1 = struct {
- FC float64
- FB float64
- Fy float64
- Fy0 float32
- Fside uint8
- _ [3]byte
- Fidx uint32
- _ [4]byte
- FpNext uintptr
-} /* sqlite3.c:196434:9 */
+ FC float64
+ FB float64
+ Fy float64
+ Fy0 float32
+ Fside uint8
+ F__ccgo_pad1 [3]byte
+ Fidx uint32
+ F__ccgo_pad2 [4]byte
+ FpNext uintptr
+} /* sqlite3.c:197516:9 */
-type GeoSegment = GeoSegment1 /* sqlite3.c:196435:27 */
+type GeoSegment = GeoSegment1 /* sqlite3.c:197517:27 */
type GeoOverlap1 = struct {
FaEvent uintptr
FaSegment uintptr
FnEvent int32
FnSegment int32
-} /* sqlite3.c:196436:9 */
+} /* sqlite3.c:197518:9 */
-type GeoOverlap = GeoOverlap1 /* sqlite3.c:196436:27 */
+type GeoOverlap = GeoOverlap1 /* sqlite3.c:197518:27 */
// Add a single segment and its associated events.
-func geopolyAddOneSegment(tls *libc.TLS, p uintptr, x0 GeoCoord, y0 GeoCoord, x1 GeoCoord, y1 GeoCoord, side uint8, idx uint32) { /* sqlite3.c:196461:13: */
+func geopolyAddOneSegment(tls *libc.TLS, p uintptr, x0 GeoCoord, y0 GeoCoord, x1 GeoCoord, y1 GeoCoord, side uint8, idx uint32) { /* sqlite3.c:197543:13: */
var pSeg uintptr
var pEvent uintptr
if x0 == x1 {
@@ -155948,7 +158573,7 @@ func geopolyAddOneSegment(tls *libc.TLS, p uintptr, x0 GeoCoord, y0 GeoCoord, x1
}
// Insert all segments and events for polygon pPoly.
-func geopolyAddSegments(tls *libc.TLS, p uintptr, pPoly uintptr, side uint8) { /* sqlite3.c:196505:13: */
+func geopolyAddSegments(tls *libc.TLS, p uintptr, pPoly uintptr, side uint8) { /* sqlite3.c:197587:13: */
var i uint32
var x uintptr
for i = uint32(0); i < (uint32((*GeoPoly)(unsafe.Pointer(pPoly)).FnVertex) - uint32(1)); i++ {
@@ -155960,7 +158585,7 @@ func geopolyAddSegments(tls *libc.TLS, p uintptr, pPoly uintptr, side uint8) { /
}
// Merge two lists of sorted events by X coordinate
-func geopolyEventMerge(tls *libc.TLS, pLeft uintptr, pRight uintptr) uintptr { /* sqlite3.c:196523:17: */
+func geopolyEventMerge(tls *libc.TLS, pLeft uintptr, pRight uintptr) uintptr { /* sqlite3.c:197605:17: */
bp := tls.Alloc(32)
defer tls.Free(32)
@@ -155990,7 +158615,7 @@ func geopolyEventMerge(tls *libc.TLS, pLeft uintptr, pRight uintptr) uintptr { /
}
// Sort an array of nEvent event objects into a list.
-func geopolySortEventsByX(tls *libc.TLS, aEvent uintptr, nEvent int32) uintptr { /* sqlite3.c:196545:17: */
+func geopolySortEventsByX(tls *libc.TLS, aEvent uintptr, nEvent int32) uintptr { /* sqlite3.c:197627:17: */
bp := tls.Alloc(400)
defer tls.Free(400)
@@ -156020,7 +158645,7 @@ func geopolySortEventsByX(tls *libc.TLS, aEvent uintptr, nEvent int32) uintptr {
}
// Merge two lists of sorted segments by Y, and then by C.
-func geopolySegmentMerge(tls *libc.TLS, pLeft uintptr, pRight uintptr) uintptr { /* sqlite3.c:196570:19: */
+func geopolySegmentMerge(tls *libc.TLS, pLeft uintptr, pRight uintptr) uintptr { /* sqlite3.c:197652:19: */
bp := tls.Alloc(48)
defer tls.Free(48)
@@ -156055,7 +158680,7 @@ func geopolySegmentMerge(tls *libc.TLS, pLeft uintptr, pRight uintptr) uintptr {
// Sort a list of GeoSegments in order of increasing Y and in the event of
// a tie, increasing C (slope).
-func geopolySortSegmentsByYAndC(tls *libc.TLS, pList uintptr) uintptr { /* sqlite3.c:196595:19: */
+func geopolySortSegmentsByYAndC(tls *libc.TLS, pList uintptr) uintptr { /* sqlite3.c:197677:19: */
bp := tls.Alloc(400)
defer tls.Free(400)
@@ -156085,7 +158710,7 @@ func geopolySortSegmentsByYAndC(tls *libc.TLS, pList uintptr) uintptr { /* sqlit
}
// Determine the overlap between two polygons
-func geopolyOverlap(tls *libc.TLS, p1 uintptr, p2 uintptr) int32 { /* sqlite3.c:196621:12: */
+func geopolyOverlap(tls *libc.TLS, p1 uintptr, p2 uintptr) int32 { /* sqlite3.c:197703:12: */
bp := tls.Alloc(4)
defer tls.Free(4)
@@ -156312,7 +158937,7 @@ geopolyOverlapDone:
// 3 P2 is completely contained within P1
// 4 P1 and P2 are the same polygon
// NULL Either P1 or P2 or both are not valid polygons
-func geopolyOverlapFunc(tls *libc.TLS, context uintptr, argc int32, argv uintptr) { /* sqlite3.c:196744:13: */
+func geopolyOverlapFunc(tls *libc.TLS, context uintptr, argc int32, argv uintptr) { /* sqlite3.c:197826:13: */
var p1 uintptr = geopolyFuncParam(tls, context, *(*uintptr)(unsafe.Pointer(argv)), uintptr(0))
var p2 uintptr = geopolyFuncParam(tls, context, *(*uintptr)(unsafe.Pointer(argv + 1*8)), uintptr(0))
if (p1 != 0) && (p2 != 0) {
@@ -156328,7 +158953,7 @@ func geopolyOverlapFunc(tls *libc.TLS, context uintptr, argc int32, argv uintptr
}
// Enable or disable debugging output
-func geopolyDebugFunc(tls *libc.TLS, context uintptr, argc int32, argv uintptr) { /* sqlite3.c:196766:13: */
+func geopolyDebugFunc(tls *libc.TLS, context uintptr, argc int32, argv uintptr) { /* sqlite3.c:197848:13: */
}
// This function is the implementation of both the xConnect and xCreate
@@ -156338,7 +158963,7 @@ func geopolyDebugFunc(tls *libc.TLS, context uintptr, argc int32, argv uintptr)
// argv[1] -> database name
// argv[2] -> table name
// argv[...] -> column names...
-func geopolyInit(tls *libc.TLS, db uintptr, pAux uintptr, argc int32, argv uintptr, ppVtab uintptr, pzErr uintptr, isCreate int32) int32 { /* sqlite3.c:196785:12: */
+func geopolyInit(tls *libc.TLS, db uintptr, pAux uintptr, argc int32, argv uintptr, ppVtab uintptr, pzErr uintptr, isCreate int32) int32 { /* sqlite3.c:197867:12: */
bp := tls.Alloc(32)
defer tls.Free(32)
@@ -156378,7 +159003,7 @@ __1:
// that is successful, call sqlite3_declare_vtab() to configure
// the r-tree table schema.
pSql = Xsqlite3_str_new(tls, db)
- Xsqlite3_str_appendf(tls, pSql, ts+25341 /* "CREATE TABLE x(_..." */, 0)
+ Xsqlite3_str_appendf(tls, pSql, ts+25801 /* "CREATE TABLE x(_..." */, 0)
(*Rtree)(unsafe.Pointer(pRtree)).FnAux = U8(1) // Add one for _shape
(*Rtree)(unsafe.Pointer(pRtree)).FnAuxNotNull = U8(1) // The _shape column is always not-null
ii = 3
@@ -156387,7 +159012,7 @@ __2:
goto __4
}
(*Rtree)(unsafe.Pointer(pRtree)).FnAux++
- Xsqlite3_str_appendf(tls, pSql, ts+25363 /* ",%s" */, libc.VaList(bp+8, *(*uintptr)(unsafe.Pointer(argv + uintptr(ii)*8))))
+ Xsqlite3_str_appendf(tls, pSql, ts+25823 /* ",%s" */, libc.VaList(bp+8, *(*uintptr)(unsafe.Pointer(argv + uintptr(ii)*8))))
goto __3
__3:
ii++
@@ -156395,7 +159020,7 @@ __3:
goto __4
__4:
;
- Xsqlite3_str_appendf(tls, pSql, ts+24430 /* ");" */, 0)
+ Xsqlite3_str_appendf(tls, pSql, ts+24890 /* ");" */, 0)
zSql = Xsqlite3_str_finish(tls, pSql)
if !(!(zSql != 0)) {
goto __5
@@ -156406,7 +159031,7 @@ __5:
if !(SQLITE_OK != (libc.AssignInt32(&rc, Xsqlite3_declare_vtab(tls, db, zSql)))) {
goto __7
}
- *(*uintptr)(unsafe.Pointer(pzErr)) = Xsqlite3_mprintf(tls, ts+2718 /* "%s" */, libc.VaList(bp+16, Xsqlite3_errmsg(tls, db)))
+ *(*uintptr)(unsafe.Pointer(pzErr)) = Xsqlite3_mprintf(tls, ts+2790 /* "%s" */, libc.VaList(bp+16, Xsqlite3_errmsg(tls, db)))
__7:
;
__6:
@@ -156432,7 +159057,7 @@ __9:
if !(rc != 0) {
goto __10
}
- *(*uintptr)(unsafe.Pointer(pzErr)) = Xsqlite3_mprintf(tls, ts+2718 /* "%s" */, libc.VaList(bp+24, Xsqlite3_errmsg(tls, db)))
+ *(*uintptr)(unsafe.Pointer(pzErr)) = Xsqlite3_mprintf(tls, ts+2790 /* "%s" */, libc.VaList(bp+24, Xsqlite3_errmsg(tls, db)))
goto geopolyInit_fail
__10:
;
@@ -156453,12 +159078,12 @@ __11:
}
// GEOPOLY virtual table module xCreate method.
-func geopolyCreate(tls *libc.TLS, db uintptr, pAux uintptr, argc int32, argv uintptr, ppVtab uintptr, pzErr uintptr) int32 { /* sqlite3.c:196869:12: */
+func geopolyCreate(tls *libc.TLS, db uintptr, pAux uintptr, argc int32, argv uintptr, ppVtab uintptr, pzErr uintptr) int32 { /* sqlite3.c:197951:12: */
return geopolyInit(tls, db, pAux, argc, argv, ppVtab, pzErr, 1)
}
// GEOPOLY virtual table module xConnect method.
-func geopolyConnect(tls *libc.TLS, db uintptr, pAux uintptr, argc int32, argv uintptr, ppVtab uintptr, pzErr uintptr) int32 { /* sqlite3.c:196882:12: */
+func geopolyConnect(tls *libc.TLS, db uintptr, pAux uintptr, argc int32, argv uintptr, ppVtab uintptr, pzErr uintptr) int32 { /* sqlite3.c:197964:12: */
return geopolyInit(tls, db, pAux, argc, argv, ppVtab, pzErr, 0)
}
@@ -156472,7 +159097,7 @@ func geopolyConnect(tls *libc.TLS, db uintptr, pAux uintptr, argc int32, argv ui
// 3 search for objects overlapping the same bounding box
// that contains polygon argv[0]
// 4 full table scan
-func geopolyFilter(tls *libc.TLS, pVtabCursor uintptr, idxNum int32, idxStr uintptr, argc int32, argv uintptr) int32 { /* sqlite3.c:196905:12: */
+func geopolyFilter(tls *libc.TLS, pVtabCursor uintptr, idxNum int32, idxStr uintptr, argc int32, argv uintptr) int32 { /* sqlite3.c:197987:12: */
bp := tls.Alloc(52)
defer tls.Free(52)
@@ -156639,7 +159264,7 @@ geopoly_filter_end:
// 3 "rtree" R-tree within query using geopoly_within()
// 4 "fullscan" full-table scan.
// ------------------------------------------------
-func geopolyBestIndex(tls *libc.TLS, tab uintptr, pIdxInfo uintptr) int32 { /* sqlite3.c:197036:12: */
+func geopolyBestIndex(tls *libc.TLS, tab uintptr, pIdxInfo uintptr) int32 { /* sqlite3.c:198118:12: */
var ii int32
var iRowidTerm int32 = -1
var iFuncTerm int32 = -1
@@ -156665,7 +159290,7 @@ func geopolyBestIndex(tls *libc.TLS, tab uintptr, pIdxInfo uintptr) int32 { /* s
if iRowidTerm >= 0 {
(*Sqlite3_index_info)(unsafe.Pointer(pIdxInfo)).FidxNum = 1
- (*Sqlite3_index_info)(unsafe.Pointer(pIdxInfo)).FidxStr = ts + 14302 /* "rowid" */
+ (*Sqlite3_index_info)(unsafe.Pointer(pIdxInfo)).FidxStr = ts + 14757 /* "rowid" */
(*sqlite3_index_constraint_usage)(unsafe.Pointer((*Sqlite3_index_info)(unsafe.Pointer(pIdxInfo)).FaConstraintUsage + uintptr(iRowidTerm)*8)).FargvIndex = 1
(*sqlite3_index_constraint_usage)(unsafe.Pointer((*Sqlite3_index_info)(unsafe.Pointer(pIdxInfo)).FaConstraintUsage + uintptr(iRowidTerm)*8)).Fomit = uint8(1)
(*Sqlite3_index_info)(unsafe.Pointer(pIdxInfo)).FestimatedCost = 30.0
@@ -156675,7 +159300,7 @@ func geopolyBestIndex(tls *libc.TLS, tab uintptr, pIdxInfo uintptr) int32 { /* s
}
if iFuncTerm >= 0 {
(*Sqlite3_index_info)(unsafe.Pointer(pIdxInfo)).FidxNum = idxNum
- (*Sqlite3_index_info)(unsafe.Pointer(pIdxInfo)).FidxStr = ts + 25367 /* "rtree" */
+ (*Sqlite3_index_info)(unsafe.Pointer(pIdxInfo)).FidxStr = ts + 25827 /* "rtree" */
(*sqlite3_index_constraint_usage)(unsafe.Pointer((*Sqlite3_index_info)(unsafe.Pointer(pIdxInfo)).FaConstraintUsage + uintptr(iFuncTerm)*8)).FargvIndex = 1
(*sqlite3_index_constraint_usage)(unsafe.Pointer((*Sqlite3_index_info)(unsafe.Pointer(pIdxInfo)).FaConstraintUsage + uintptr(iFuncTerm)*8)).Fomit = uint8(0)
(*Sqlite3_index_info)(unsafe.Pointer(pIdxInfo)).FestimatedCost = 300.0
@@ -156683,14 +159308,14 @@ func geopolyBestIndex(tls *libc.TLS, tab uintptr, pIdxInfo uintptr) int32 { /* s
return SQLITE_OK
}
(*Sqlite3_index_info)(unsafe.Pointer(pIdxInfo)).FidxNum = 4
- (*Sqlite3_index_info)(unsafe.Pointer(pIdxInfo)).FidxStr = ts + 25373 /* "fullscan" */
+ (*Sqlite3_index_info)(unsafe.Pointer(pIdxInfo)).FidxStr = ts + 25833 /* "fullscan" */
(*Sqlite3_index_info)(unsafe.Pointer(pIdxInfo)).FestimatedCost = 3000000.0
(*Sqlite3_index_info)(unsafe.Pointer(pIdxInfo)).FestimatedRows = int64(100000)
return SQLITE_OK
}
// GEOPOLY virtual table module xColumn method.
-func geopolyColumn(tls *libc.TLS, cur uintptr, ctx uintptr, i int32) int32 { /* sqlite3.c:197088:12: */
+func geopolyColumn(tls *libc.TLS, cur uintptr, ctx uintptr, i int32) int32 { /* sqlite3.c:198170:12: */
bp := tls.Alloc(4)
defer tls.Free(4)
@@ -156755,7 +159380,7 @@ func geopolyColumn(tls *libc.TLS, cur uintptr, ctx uintptr, i int32) int32 { /*
// argv[1] = rowid after the change. Never NULL
// argv[2] = new value for _shape
// argv[3] = new value for first application-defined column....
-func geopolyUpdate(tls *libc.TLS, pVtab uintptr, nData int32, aData uintptr, pRowid uintptr) int32 { /* sqlite3.c:197143:12: */
+func geopolyUpdate(tls *libc.TLS, pVtab uintptr, nData int32, aData uintptr, pRowid uintptr) int32 { /* sqlite3.c:198225:12: */
bp := tls.Alloc(64)
defer tls.Free(64)
@@ -156821,7 +159446,7 @@ __1:
if !(*(*int32)(unsafe.Pointer(bp + 48 /* rc */)) == SQLITE_ERROR) {
goto __4
}
- (*Sqlite3_vtab)(unsafe.Pointer(pVtab)).FzErrMsg = Xsqlite3_mprintf(tls, ts+25382 /* "_shape does not ..." */, 0)
+ (*Sqlite3_vtab)(unsafe.Pointer(pVtab)).FzErrMsg = Xsqlite3_mprintf(tls, ts+25842 /* "_shape does not ..." */, 0)
__4:
;
goto geopoly_update_end
@@ -156965,15 +159590,15 @@ geopoly_update_end:
// Report that geopoly_overlap() is an overloaded function suitable
// for use in xBestIndex.
-func geopolyFindFunction(tls *libc.TLS, pVtab uintptr, nArg int32, zName uintptr, pxFunc uintptr, ppArg uintptr) int32 { /* sqlite3.c:197279:12: */
- if Xsqlite3_stricmp(tls, zName, ts+25422 /* "geopoly_overlap" */) == 0 {
+func geopolyFindFunction(tls *libc.TLS, pVtab uintptr, nArg int32, zName uintptr, pxFunc uintptr, ppArg uintptr) int32 { /* sqlite3.c:198361:12: */
+ if Xsqlite3_stricmp(tls, zName, ts+25882 /* "geopoly_overlap" */) == 0 {
*(*uintptr)(unsafe.Pointer(pxFunc)) = *(*uintptr)(unsafe.Pointer(&struct {
f func(*libc.TLS, uintptr, int32, uintptr)
}{geopolyOverlapFunc}))
*(*uintptr)(unsafe.Pointer(ppArg)) = uintptr(0)
return SQLITE_INDEX_CONSTRAINT_FUNCTION
}
- if Xsqlite3_stricmp(tls, zName, ts+25438 /* "geopoly_within" */) == 0 {
+ if Xsqlite3_stricmp(tls, zName, ts+25898 /* "geopoly_within" */) == 0 {
*(*uintptr)(unsafe.Pointer(pxFunc)) = *(*uintptr)(unsafe.Pointer(&struct {
f func(*libc.TLS, uintptr, int32, uintptr)
}{geopolyWithinFunc}))
@@ -157006,17 +159631,17 @@ var geopolyModule = Sqlite3_module{
FxRename: 0, // xRename - rename the table
FxSavepoint: 0, // xRollbackTo
FxShadowName: 0, // xShadowName
-} /* sqlite3.c:197300:23 */
+} /* sqlite3.c:198382:23 */
-func sqlite3_geopoly_init(tls *libc.TLS, db uintptr) int32 { /* sqlite3.c:197327:12: */
+func sqlite3_geopoly_init(tls *libc.TLS, db uintptr) int32 { /* sqlite3.c:198409:12: */
var rc int32 = SQLITE_OK
var i int32
for i = 0; (uint64(i) < (uint64(unsafe.Sizeof(aFunc1)) / uint64(unsafe.Sizeof(struct {
- FxFunc uintptr
- FnArg int8
- FbPure uint8
- _ [6]byte
- FzName uintptr
+ FxFunc uintptr
+ FnArg int8
+ FbPure uint8
+ F__ccgo_pad1 [6]byte
+ FzName uintptr
}{})))) && (rc == SQLITE_OK); i++ {
var enc int32
if aFunc1[i].FbPure != 0 {
@@ -157038,38 +159663,38 @@ func sqlite3_geopoly_init(tls *libc.TLS, db uintptr) int32 { /* sqlite3.c:197327
uintptr(0), aAgg1[i].FxStep, aAgg1[i].FxFinal)
}
if rc == SQLITE_OK {
- rc = Xsqlite3_create_module_v2(tls, db, ts+25453 /* "geopoly" */, uintptr(unsafe.Pointer(&geopolyModule)), uintptr(0), uintptr(0))
+ rc = Xsqlite3_create_module_v2(tls, db, ts+25913 /* "geopoly" */, uintptr(unsafe.Pointer(&geopolyModule)), uintptr(0), uintptr(0))
}
return rc
}
var aFunc1 = [12]struct {
- FxFunc uintptr
- FnArg int8
- FbPure uint8
- _ [6]byte
- FzName uintptr
+ FxFunc uintptr
+ FnArg int8
+ FbPure uint8
+ F__ccgo_pad1 [6]byte
+ FzName uintptr
}{
- {FxFunc: 0, FnArg: int8(1), FbPure: uint8(1), FzName: ts + 25461 /* "geopoly_area" */},
- {FxFunc: 0, FnArg: int8(1), FbPure: uint8(1), FzName: ts + 25474 /* "geopoly_blob" */},
- {FxFunc: 0, FnArg: int8(1), FbPure: uint8(1), FzName: ts + 25487 /* "geopoly_json" */},
- {FxFunc: 0, FnArg: int8(-1), FbPure: uint8(1), FzName: ts + 25500 /* "geopoly_svg" */},
- {FxFunc: 0, FnArg: int8(2), FbPure: uint8(1), FzName: ts + 25438 /* "geopoly_within" */},
- {FxFunc: 0, FnArg: int8(3), FbPure: uint8(1), FzName: ts + 25512 /* "geopoly_contains..." */},
- {FxFunc: 0, FnArg: int8(2), FbPure: uint8(1), FzName: ts + 25422 /* "geopoly_overlap" */},
- {FxFunc: 0, FnArg: int8(1), FzName: ts + 25535 /* "geopoly_debug" */},
- {FxFunc: 0, FnArg: int8(1), FbPure: uint8(1), FzName: ts + 25549 /* "geopoly_bbox" */},
- {FxFunc: 0, FnArg: int8(7), FbPure: uint8(1), FzName: ts + 25562 /* "geopoly_xform" */},
- {FxFunc: 0, FnArg: int8(4), FbPure: uint8(1), FzName: ts + 25576 /* "geopoly_regular" */},
- {FxFunc: 0, FnArg: int8(1), FbPure: uint8(1), FzName: ts + 25592 /* "geopoly_ccw" */},
-} /* sqlite3.c:197334:5 */
+ {FxFunc: 0, FnArg: int8(1), FbPure: uint8(1), FzName: ts + 25921 /* "geopoly_area" */},
+ {FxFunc: 0, FnArg: int8(1), FbPure: uint8(1), FzName: ts + 25934 /* "geopoly_blob" */},
+ {FxFunc: 0, FnArg: int8(1), FbPure: uint8(1), FzName: ts + 25947 /* "geopoly_json" */},
+ {FxFunc: 0, FnArg: int8(-1), FbPure: uint8(1), FzName: ts + 25960 /* "geopoly_svg" */},
+ {FxFunc: 0, FnArg: int8(2), FbPure: uint8(1), FzName: ts + 25898 /* "geopoly_within" */},
+ {FxFunc: 0, FnArg: int8(3), FbPure: uint8(1), FzName: ts + 25972 /* "geopoly_contains..." */},
+ {FxFunc: 0, FnArg: int8(2), FbPure: uint8(1), FzName: ts + 25882 /* "geopoly_overlap" */},
+ {FxFunc: 0, FnArg: int8(1), FzName: ts + 25995 /* "geopoly_debug" */},
+ {FxFunc: 0, FnArg: int8(1), FbPure: uint8(1), FzName: ts + 26009 /* "geopoly_bbox" */},
+ {FxFunc: 0, FnArg: int8(7), FbPure: uint8(1), FzName: ts + 26022 /* "geopoly_xform" */},
+ {FxFunc: 0, FnArg: int8(4), FbPure: uint8(1), FzName: ts + 26036 /* "geopoly_regular" */},
+ {FxFunc: 0, FnArg: int8(1), FbPure: uint8(1), FzName: ts + 26052 /* "geopoly_ccw" */},
+} /* sqlite3.c:198416:5 */
var aAgg1 = [1]struct {
FxStep uintptr
FxFinal uintptr
FzName uintptr
}{
- {FxStep: 0, FxFinal: 0, FzName: ts + 25604 /* "geopoly_group_bb..." */},
-} /* sqlite3.c:197352:5 */
+ {FxStep: 0, FxFinal: 0, FzName: ts + 26064 /* "geopoly_group_bb..." */},
+} /* sqlite3.c:198434:5 */
//************* End of geopoly.c ********************************************
//************* Continuing where we left off in rtree.c *********************
@@ -157077,30 +159702,30 @@ var aAgg1 = [1]struct {
// Register the r-tree module with database handle db. This creates the
// virtual table module "rtree" and the debugging/analysis scalar
// function "rtreenode".
-func Xsqlite3RtreeInit(tls *libc.TLS, db uintptr) int32 { /* sqlite3.c:197387:20: */
+func Xsqlite3RtreeInit(tls *libc.TLS, db uintptr) int32 { /* sqlite3.c:198469:20: */
var utf8 int32 = SQLITE_UTF8
var rc int32
- rc = Xsqlite3_create_function(tls, db, ts+25623 /* "rtreenode" */, 2, utf8, uintptr(0), *(*uintptr)(unsafe.Pointer(&struct {
+ rc = Xsqlite3_create_function(tls, db, ts+26083 /* "rtreenode" */, 2, utf8, uintptr(0), *(*uintptr)(unsafe.Pointer(&struct {
f func(*libc.TLS, uintptr, int32, uintptr)
}{rtreenode})), uintptr(0), uintptr(0))
if rc == SQLITE_OK {
- rc = Xsqlite3_create_function(tls, db, ts+25633 /* "rtreedepth" */, 1, utf8, uintptr(0), *(*uintptr)(unsafe.Pointer(&struct {
+ rc = Xsqlite3_create_function(tls, db, ts+26093 /* "rtreedepth" */, 1, utf8, uintptr(0), *(*uintptr)(unsafe.Pointer(&struct {
f func(*libc.TLS, uintptr, int32, uintptr)
}{rtreedepth})), uintptr(0), uintptr(0))
}
if rc == SQLITE_OK {
- rc = Xsqlite3_create_function(tls, db, ts+25644 /* "rtreecheck" */, -1, utf8, uintptr(0), *(*uintptr)(unsafe.Pointer(&struct {
+ rc = Xsqlite3_create_function(tls, db, ts+26104 /* "rtreecheck" */, -1, utf8, uintptr(0), *(*uintptr)(unsafe.Pointer(&struct {
f func(*libc.TLS, uintptr, int32, uintptr)
}{rtreecheck})), uintptr(0), uintptr(0))
}
if rc == SQLITE_OK {
var c uintptr = uintptr(RTREE_COORD_REAL32)
- rc = Xsqlite3_create_module_v2(tls, db, ts+25367 /* "rtree" */, uintptr(unsafe.Pointer(&rtreeModule)), c, uintptr(0))
+ rc = Xsqlite3_create_module_v2(tls, db, ts+25827 /* "rtree" */, uintptr(unsafe.Pointer(&rtreeModule)), c, uintptr(0))
}
if rc == SQLITE_OK {
var c uintptr = uintptr(RTREE_COORD_INT32)
- rc = Xsqlite3_create_module_v2(tls, db, ts+25655 /* "rtree_i32" */, uintptr(unsafe.Pointer(&rtreeModule)), c, uintptr(0))
+ rc = Xsqlite3_create_module_v2(tls, db, ts+26115 /* "rtree_i32" */, uintptr(unsafe.Pointer(&rtreeModule)), c, uintptr(0))
}
if rc == SQLITE_OK {
rc = sqlite3_geopoly_init(tls, db)
@@ -157114,16 +159739,16 @@ func Xsqlite3RtreeInit(tls *libc.TLS, db uintptr) int32 { /* sqlite3.c:197387:20
// or sqlite3_rtree_query_callback(). In other words, this routine is the
// destructor for an RtreeGeomCallback objecct. This routine is called when
// the corresponding SQL function is deleted.
-func rtreeFreeCallback(tls *libc.TLS, p uintptr) { /* sqlite3.c:197426:13: */
+func rtreeFreeCallback(tls *libc.TLS, p uintptr) { /* sqlite3.c:198508:13: */
var pInfo uintptr = p
if (*RtreeGeomCallback)(unsafe.Pointer(pInfo)).FxDestructor != 0 {
- (*(*func(*libc.TLS, uintptr))(unsafe.Pointer((pInfo + 16 /* &.xDestructor */))))(tls, (*RtreeGeomCallback)(unsafe.Pointer(pInfo)).FpContext)
+ (*struct{ f func(*libc.TLS, uintptr) })(unsafe.Pointer(&struct{ uintptr }{(*RtreeGeomCallback)(unsafe.Pointer(pInfo)).FxDestructor})).f(tls, (*RtreeGeomCallback)(unsafe.Pointer(pInfo)).FpContext)
}
Xsqlite3_free(tls, p)
}
// This routine frees the BLOB that is returned by geomCallback().
-func rtreeMatchArgFree(tls *libc.TLS, pArg uintptr) { /* sqlite3.c:197435:13: */
+func rtreeMatchArgFree(tls *libc.TLS, pArg uintptr) { /* sqlite3.c:198517:13: */
var i int32
var p uintptr = pArg
for i = 0; i < (*RtreeMatchArg)(unsafe.Pointer(p)).FnParam; i++ {
@@ -157144,7 +159769,7 @@ func rtreeMatchArgFree(tls *libc.TLS, pArg uintptr) { /* sqlite3.c:197435:13: */
// The R-Tree MATCH operator will read the returned BLOB, deserialize
// the RtreeMatchArg object, and use the RtreeMatchArg object to figure
// out which elements of the R-Tree should be returned by the query.
-func geomCallback(tls *libc.TLS, ctx uintptr, nArg int32, aArg uintptr) { /* sqlite3.c:197458:13: */
+func geomCallback(tls *libc.TLS, ctx uintptr, nArg int32, aArg uintptr) { /* sqlite3.c:198540:13: */
var pGeomCtx uintptr = Xsqlite3_user_data(tls, ctx)
var pBlob uintptr
var nBlob Sqlite3_int64
@@ -157172,13 +159797,13 @@ func geomCallback(tls *libc.TLS, ctx uintptr, nArg int32, aArg uintptr) { /* sql
Xsqlite3_result_error_nomem(tls, ctx)
rtreeMatchArgFree(tls, pBlob)
} else {
- Xsqlite3_result_pointer(tls, ctx, pBlob, ts+22943 /* "RtreeMatchArg" */, *(*uintptr)(unsafe.Pointer(&struct{ f func(*libc.TLS, uintptr) }{rtreeMatchArgFree})))
+ Xsqlite3_result_pointer(tls, ctx, pBlob, ts+23403 /* "RtreeMatchArg" */, *(*uintptr)(unsafe.Pointer(&struct{ f func(*libc.TLS, uintptr) }{rtreeMatchArgFree})))
}
}
}
// Register a new geometry function for use with the r-tree MATCH operator.
-func Xsqlite3_rtree_geometry_callback(tls *libc.TLS, db uintptr, zGeom uintptr, xGeom uintptr, pContext uintptr) int32 { /* sqlite3.c:197496:16: */
+func Xsqlite3_rtree_geometry_callback(tls *libc.TLS, db uintptr, zGeom uintptr, xGeom uintptr, pContext uintptr) int32 { /* sqlite3.c:198578:16: */
var pGeomCtx uintptr // Context object for new user-function
// Allocate and populate the context object.
@@ -157198,7 +159823,7 @@ func Xsqlite3_rtree_geometry_callback(tls *libc.TLS, db uintptr, zGeom uintptr,
// Register a new 2nd-generation geometry function for use with the
// r-tree MATCH operator.
-func Xsqlite3_rtree_query_callback(tls *libc.TLS, db uintptr, zQueryFunc uintptr, xQueryFunc uintptr, pContext uintptr, xDestructor uintptr) int32 { /* sqlite3.c:197520:16: */
+func Xsqlite3_rtree_query_callback(tls *libc.TLS, db uintptr, zQueryFunc uintptr, xQueryFunc uintptr, pContext uintptr, xDestructor uintptr) int32 { /* sqlite3.c:198602:16: */
var pGeomCtx uintptr // Context object for new user-function
// Allocate and populate the context object.
@@ -157617,16 +160242,16 @@ func Xsqlite3_rtree_query_callback(tls *libc.TLS, db uintptr, zQueryFunc uintptr
type sqlite3rbu = struct {
FeStage int32
- _ [4]byte
+ F__ccgo_pad1 [4]byte
FdbMain uintptr
FdbRbu uintptr
FzTarget uintptr
FzRbu uintptr
FzState uintptr
- FzStateDb [5]int8
- _ [3]byte
+ FzStateDb [5]uint8
+ F__ccgo_pad2 [3]byte
Frc int32
- _ [4]byte
+ F__ccgo_pad3 [4]byte
FzErrmsg uintptr
FnStep int32
FnProgress int32
@@ -157634,7 +160259,7 @@ type sqlite3rbu = struct {
FzVfsName uintptr
FpTargetFd uintptr
FnPagePerSector int32
- _ [4]byte
+ F__ccgo_pad4 [4]byte
FiOalSz I64
FnPhaseOneStep I64
FiMaxFrame U32
@@ -157643,15 +160268,15 @@ type sqlite3rbu = struct {
FnFrameAlloc int32
FaFrame uintptr
Fpgsz int32
- _ [4]byte
+ F__ccgo_pad5 [4]byte
FaBuf uintptr
FiWalCksum I64
FszTemp I64
FszTempLimit I64
FnRbu int32
- _ [4]byte
+ F__ccgo_pad6 [4]byte
FpRbuFd uintptr
-} /* sqlite3.c:198747:9 */
+} /* sqlite3.c:199829:9 */
//************* End of rtree.c **********************************************
//************* Begin file icu.c ********************************************
@@ -158052,7 +160677,7 @@ type sqlite3rbu = struct {
// #include "sqlite3.h" ** Required for error code definitions **
-type Sqlite3rbu = sqlite3rbu /* sqlite3.c:198747:27 */
+type Sqlite3rbu = sqlite3rbu /* sqlite3.c:199829:27 */
//************* End of sqlite3rbu.h *****************************************
//************* Continuing where we left off in sqlite3rbu.c ****************
@@ -158114,7 +160739,7 @@ type Sqlite3rbu = sqlite3rbu /* sqlite3.c:198747:27 */
type RbuFrame1 = struct {
FiDbPage U32
FiWalFrame U32
-} /* sqlite3.c:198747:9 */
+} /* sqlite3.c:199829:9 */
//************* End of sqlite3rbu.h *****************************************
//************* Continuing where we left off in sqlite3rbu.c ****************
@@ -158173,65 +160798,65 @@ type RbuFrame1 = struct {
// Only valid if STAGE==1. The RBU database name of the table
// currently being read.
-type RbuFrame = RbuFrame1 /* sqlite3.c:199171:25 */
+type RbuFrame = RbuFrame1 /* sqlite3.c:200253:25 */
type RbuObjIter1 = struct {
- FpTblIter uintptr
- FpIdxIter uintptr
- FnTblCol int32
- _ [4]byte
- FazTblCol uintptr
- FazTblType uintptr
- FaiSrcOrder uintptr
- FabTblPk uintptr
- FabNotNull uintptr
- FabIndexed uintptr
- FeType int32
- FbCleanup int32
- FzTbl uintptr
- FzDataTbl uintptr
- FzIdx uintptr
- FiTnum int32
- FiPkTnum int32
- FbUnique int32
- FnIndex int32
- FnCol int32
- _ [4]byte
- FpSelect uintptr
- FpInsert uintptr
- FpDelete uintptr
- FpTmpInsert uintptr
- FnIdxCol int32
- _ [4]byte
- FaIdxCol uintptr
- FzIdxSql uintptr
- FpRbuUpdate uintptr
-} /* sqlite3.c:198747:9 */
-
-type RbuObjIter = RbuObjIter1 /* sqlite3.c:199172:27 */
+ FpTblIter uintptr
+ FpIdxIter uintptr
+ FnTblCol int32
+ F__ccgo_pad1 [4]byte
+ FazTblCol uintptr
+ FazTblType uintptr
+ FaiSrcOrder uintptr
+ FabTblPk uintptr
+ FabNotNull uintptr
+ FabIndexed uintptr
+ FeType int32
+ FbCleanup int32
+ FzTbl uintptr
+ FzDataTbl uintptr
+ FzIdx uintptr
+ FiTnum int32
+ FiPkTnum int32
+ FbUnique int32
+ FnIndex int32
+ FnCol int32
+ F__ccgo_pad2 [4]byte
+ FpSelect uintptr
+ FpInsert uintptr
+ FpDelete uintptr
+ FpTmpInsert uintptr
+ FnIdxCol int32
+ F__ccgo_pad3 [4]byte
+ FaIdxCol uintptr
+ FzIdxSql uintptr
+ FpRbuUpdate uintptr
+} /* sqlite3.c:199829:9 */
+
+type RbuObjIter = RbuObjIter1 /* sqlite3.c:200254:27 */
type RbuState1 = struct {
FeStage int32
- _ [4]byte
+ F__ccgo_pad1 [4]byte
FzTbl uintptr
FzDataTbl uintptr
FzIdx uintptr
FiWalCksum I64
FnRow int32
- _ [4]byte
+ F__ccgo_pad2 [4]byte
FnProgress I64
FiCookie U32
- _ [4]byte
+ F__ccgo_pad3 [4]byte
FiOalSz I64
FnPhaseOneStep I64
-} /* sqlite3.c:199173:9 */
+} /* sqlite3.c:200255:9 */
-type RbuState = RbuState1 /* sqlite3.c:199173:25 */
+type RbuState = RbuState1 /* sqlite3.c:200255:25 */
type RbuSpan1 = struct {
- FzSpan uintptr
- FnSpan int32
- _ [4]byte
-} /* sqlite3.c:198747:9 */
+ FzSpan uintptr
+ FnSpan int32
+ F__ccgo_pad1 [4]byte
+} /* sqlite3.c:199829:9 */
-type RbuSpan = RbuSpan1 /* sqlite3.c:199174:24 */
+type RbuSpan = RbuSpan1 /* sqlite3.c:200256:24 */
type rbu_vfs = struct {
Fbase Sqlite3_vfs
FpRealVfs uintptr
@@ -158239,9 +160864,9 @@ type rbu_vfs = struct {
FpRbu uintptr
FpMain uintptr
FpMainRbu uintptr
-} /* sqlite3.c:198747:9 */
+} /* sqlite3.c:199829:9 */
-type Rbu_vfs = rbu_vfs /* sqlite3.c:199175:24 */
+type Rbu_vfs = rbu_vfs /* sqlite3.c:200257:24 */
type rbu_file = struct {
Fbase Sqlite3_file
FpReal uintptr
@@ -158252,7 +160877,7 @@ type rbu_file = struct {
FiCookie U32
FiWriteVer U8
FbNolock U8
- _ [2]byte
+ F__ccgo_pad1 [2]byte
FnShm int32
FapShm uintptr
FzDel uintptr
@@ -158260,16 +160885,16 @@ type rbu_file = struct {
FpWalFd uintptr
FpMainNext uintptr
FpMainRbuNext uintptr
-} /* sqlite3.c:198747:9 */
+} /* sqlite3.c:199829:9 */
-type Rbu_file = rbu_file /* sqlite3.c:199176:25 */
+type Rbu_file = rbu_file /* sqlite3.c:200258:25 */
type RbuUpdateStmt1 = struct {
FzMask uintptr
FpUpdate uintptr
FpNext uintptr
-} /* sqlite3.c:198747:9 */
+} /* sqlite3.c:199829:9 */
-type RbuUpdateStmt = RbuUpdateStmt1 /* sqlite3.c:199177:30 */
+type RbuUpdateStmt = RbuUpdateStmt1 /* sqlite3.c:200259:30 */
// True for an RBU vacuum handle, or false otherwise.
@@ -158288,7 +160913,7 @@ type RbuUpdateStmt = RbuUpdateStmt1 /* sqlite3.c:199177:30 */
// finished, leave *pz pointing to the first character past the end of
// the integer. The *pLen parameter holds the length of the string
// in *pz and is decremented once for each character in the integer.
-func rbuDeltaGetInt(tls *libc.TLS, pz uintptr, pLen uintptr) uint32 { /* sqlite3.c:199467:21: */
+func rbuDeltaGetInt(tls *libc.TLS, pz uintptr, pLen uintptr) uint32 { /* sqlite3.c:200549:21: */
var v uint32 = uint32(0)
var c int32
var z uintptr = *(*uintptr)(unsafe.Pointer(pz))
@@ -158311,7 +160936,7 @@ var zValue = [128]int8{
int8(25), int8(26), int8(27), int8(28), int8(29), int8(30), int8(31), int8(32), int8(33), int8(34), int8(35), int8(-1), int8(-1), int8(-1), int8(-1), int8(36),
int8(-1), int8(37), int8(38), int8(39), int8(40), int8(41), int8(42), int8(43), int8(44), int8(45), int8(46), int8(47), int8(48), int8(49), int8(50), int8(51),
int8(52), int8(53), int8(54), int8(55), int8(56), int8(57), int8(58), int8(59), int8(60), int8(61), int8(62), int8(-1), int8(-1), int8(-1), int8(63), int8(-1),
-} /* sqlite3.c:199468:28 */
+} /* sqlite3.c:200550:28 */
// Apply a delta.
//
@@ -158331,7 +160956,7 @@ var zValue = [128]int8{
//
// Refer to the delta_create() documentation above for a description
// of the delta file format.
-func rbuDeltaApply(tls *libc.TLS, zSrc uintptr, lenSrc int32, zDelta uintptr, lenDelta int32, zOut uintptr) int32 { /* sqlite3.c:199548:12: */
+func rbuDeltaApply(tls *libc.TLS, zSrc uintptr, lenSrc int32, zDelta uintptr, lenDelta int32, zOut uintptr) int32 { /* sqlite3.c:200630:12: */
bp := tls.Alloc(12)
defer tls.Free(12)
*(*uintptr)(unsafe.Pointer(bp)) = zDelta
@@ -158341,23 +160966,23 @@ func rbuDeltaApply(tls *libc.TLS, zSrc uintptr, lenSrc int32, zDelta uintptr, le
var total uint32 = uint32(0)
limit = rbuDeltaGetInt(tls, bp /* &zDelta */, bp+8 /* &lenDelta */)
- if int32(*(*int8)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp /* zDelta */))))) != '\n' {
+ if int32(*(*uint8)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp /* zDelta */))))) != '\n' {
// ERROR: size integer not terminated by "\n"
return -1
}
*(*uintptr)(unsafe.Pointer(bp /* zDelta */))++
*(*int32)(unsafe.Pointer(bp + 8 /* lenDelta */))--
- for (*(*int8)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp /* zDelta */)))) != 0) && (*(*int32)(unsafe.Pointer(bp + 8 /* lenDelta */)) > 0) {
+ for (*(*uint8)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp /* zDelta */)))) != 0) && (*(*int32)(unsafe.Pointer(bp + 8 /* lenDelta */)) > 0) {
var cnt uint32
var ofst uint32
cnt = rbuDeltaGetInt(tls, bp /* &zDelta */, bp+8 /* &lenDelta */)
- switch int32(*(*int8)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp /* zDelta */))))) {
+ switch int32(*(*uint8)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp /* zDelta */))))) {
case '@':
{
*(*uintptr)(unsafe.Pointer(bp /* zDelta */))++
*(*int32)(unsafe.Pointer(bp + 8 /* lenDelta */))--
ofst = rbuDeltaGetInt(tls, bp /* &zDelta */, bp+8 /* &lenDelta */)
- if (*(*int32)(unsafe.Pointer(bp + 8 /* lenDelta */)) > 0) && (int32(*(*int8)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp /* zDelta */))))) != ',') {
+ if (*(*int32)(unsafe.Pointer(bp + 8 /* lenDelta */)) > 0) && (int32(*(*uint8)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp /* zDelta */))))) != ',') {
// ERROR: copy command not terminated by ','
return -1
}
@@ -158401,7 +161026,7 @@ func rbuDeltaApply(tls *libc.TLS, zSrc uintptr, lenSrc int32, zDelta uintptr, le
{
*(*uintptr)(unsafe.Pointer(bp /* zDelta */))++
*(*int32)(unsafe.Pointer(bp + 8 /* lenDelta */))--
- *(*int8)(unsafe.Pointer(zOut)) = int8(0)
+ *(*uint8)(unsafe.Pointer(zOut)) = uint8(0)
if total != limit {
// ERROR: generated size does not match predicted size
return -1
@@ -158421,7 +161046,7 @@ func rbuDeltaApply(tls *libc.TLS, zSrc uintptr, lenSrc int32, zDelta uintptr, le
return -1
}
-func rbuDeltaOutputSize(tls *libc.TLS, zDelta uintptr, lenDelta int32) int32 { /* sqlite3.c:199634:12: */
+func rbuDeltaOutputSize(tls *libc.TLS, zDelta uintptr, lenDelta int32) int32 { /* sqlite3.c:200716:12: */
bp := tls.Alloc(12)
defer tls.Free(12)
*(*uintptr)(unsafe.Pointer(bp)) = zDelta
@@ -158429,7 +161054,7 @@ func rbuDeltaOutputSize(tls *libc.TLS, zDelta uintptr, lenDelta int32) int32 { /
var size int32
size = int32(rbuDeltaGetInt(tls, bp /* &zDelta */, bp+8 /* &lenDelta */))
- if int32(*(*int8)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp /* zDelta */))))) != '\n' {
+ if int32(*(*uint8)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp /* zDelta */))))) != '\n' {
// ERROR: size integer not terminated by "\n"
return -1
}
@@ -158446,7 +161071,7 @@ func rbuDeltaOutputSize(tls *libc.TLS, zDelta uintptr, lenDelta int32) int32 { /
// arguments must be passed to this function. The first is the blob to
// patch and the second the patch to apply. If no error occurs, this
// function returns the patched blob.
-func rbuFossilDeltaFunc(tls *libc.TLS, context uintptr, argc int32, argv uintptr) { /* sqlite3.c:199656:13: */
+func rbuFossilDeltaFunc(tls *libc.TLS, context uintptr, argc int32, argv uintptr) { /* sqlite3.c:200738:13: */
var aDelta uintptr
var nDelta int32
var aOrig uintptr
@@ -158463,7 +161088,7 @@ func rbuFossilDeltaFunc(tls *libc.TLS, context uintptr, argc int32, argv uintptr
// Figure out the size of the output
nOut = rbuDeltaOutputSize(tls, aDelta, nDelta)
if nOut < 0 {
- Xsqlite3_result_error(tls, context, ts+25665 /* "corrupt fossil d..." */, -1)
+ Xsqlite3_result_error(tls, context, ts+26125 /* "corrupt fossil d..." */, -1)
return
}
@@ -158474,7 +161099,7 @@ func rbuFossilDeltaFunc(tls *libc.TLS, context uintptr, argc int32, argv uintptr
nOut2 = rbuDeltaApply(tls, aOrig, nOrig, aDelta, nDelta, aOut)
if nOut2 != nOut {
Xsqlite3_free(tls, aOut)
- Xsqlite3_result_error(tls, context, ts+25665 /* "corrupt fossil d..." */, -1)
+ Xsqlite3_result_error(tls, context, ts+26125 /* "corrupt fossil d..." */, -1)
} else {
Xsqlite3_result_blob(tls, context, aOut, nOut, *(*uintptr)(unsafe.Pointer(&struct{ f func(*libc.TLS, uintptr) }{Xsqlite3_free})))
}
@@ -158489,13 +161114,13 @@ func rbuFossilDeltaFunc(tls *libc.TLS, context uintptr, argc int32, argv uintptr
// an SQLite error code. Additionally, set output variable *pzErrmsg to
// point to a buffer containing an error message. It is the responsibility
// of the caller to (eventually) free this buffer using sqlite3_free().
-func prepareAndCollectError(tls *libc.TLS, db uintptr, ppStmt uintptr, pzErrmsg uintptr, zSql uintptr) int32 { /* sqlite3.c:199709:12: */
+func prepareAndCollectError(tls *libc.TLS, db uintptr, ppStmt uintptr, pzErrmsg uintptr, zSql uintptr) int32 { /* sqlite3.c:200791:12: */
bp := tls.Alloc(8)
defer tls.Free(8)
var rc int32 = Xsqlite3_prepare_v2(tls, db, zSql, -1, ppStmt, uintptr(0))
if rc != SQLITE_OK {
- *(*uintptr)(unsafe.Pointer(pzErrmsg)) = Xsqlite3_mprintf(tls, ts+2718 /* "%s" */, libc.VaList(bp, Xsqlite3_errmsg(tls, db)))
+ *(*uintptr)(unsafe.Pointer(pzErrmsg)) = Xsqlite3_mprintf(tls, ts+2790 /* "%s" */, libc.VaList(bp, Xsqlite3_errmsg(tls, db)))
*(*uintptr)(unsafe.Pointer(ppStmt)) = uintptr(0)
}
return rc
@@ -158507,13 +161132,13 @@ func prepareAndCollectError(tls *libc.TLS, db uintptr, ppStmt uintptr, pzErrmsg
// If an error has occurred, then set *pzErrmsg to point to a buffer
// containing an error message. It is the responsibility of the caller
// to eventually free this buffer using sqlite3_free().
-func resetAndCollectError(tls *libc.TLS, pStmt uintptr, pzErrmsg uintptr) int32 { /* sqlite3.c:199731:12: */
+func resetAndCollectError(tls *libc.TLS, pStmt uintptr, pzErrmsg uintptr) int32 { /* sqlite3.c:200813:12: */
bp := tls.Alloc(8)
defer tls.Free(8)
var rc int32 = Xsqlite3_reset(tls, pStmt)
if rc != SQLITE_OK {
- *(*uintptr)(unsafe.Pointer(pzErrmsg)) = Xsqlite3_mprintf(tls, ts+2718 /* "%s" */, libc.VaList(bp, Xsqlite3_errmsg(tls, Xsqlite3_db_handle(tls, pStmt))))
+ *(*uintptr)(unsafe.Pointer(pzErrmsg)) = Xsqlite3_mprintf(tls, ts+2790 /* "%s" */, libc.VaList(bp, Xsqlite3_errmsg(tls, Xsqlite3_db_handle(tls, pStmt))))
}
return rc
}
@@ -158531,7 +161156,7 @@ func resetAndCollectError(tls *libc.TLS, pStmt uintptr, pzErrmsg uintptr) int32
//
// If argument zSql is NULL, this function assumes that an OOM has occurred.
// In this case SQLITE_NOMEM is returned and *ppStmt set to NULL.
-func prepareFreeAndCollectError(tls *libc.TLS, db uintptr, ppStmt uintptr, pzErrmsg uintptr, zSql uintptr) int32 { /* sqlite3.c:199754:12: */
+func prepareFreeAndCollectError(tls *libc.TLS, db uintptr, ppStmt uintptr, pzErrmsg uintptr, zSql uintptr) int32 { /* sqlite3.c:200836:12: */
var rc int32
if zSql == uintptr(0) {
@@ -158546,7 +161171,7 @@ func prepareFreeAndCollectError(tls *libc.TLS, db uintptr, ppStmt uintptr, pzErr
// Free the RbuObjIter.azTblCol[] and RbuObjIter.abTblPk[] arrays allocated
// by an earlier call to rbuObjIterCacheTableInfo().
-func rbuObjIterFreeCols(tls *libc.TLS, pIter uintptr) { /* sqlite3.c:199776:13: */
+func rbuObjIterFreeCols(tls *libc.TLS, pIter uintptr) { /* sqlite3.c:200858:13: */
var i int32
for i = 0; i < (*RbuObjIter)(unsafe.Pointer(pIter)).FnTblCol; i++ {
Xsqlite3_free(tls, *(*uintptr)(unsafe.Pointer((*RbuObjIter)(unsafe.Pointer(pIter)).FazTblCol + uintptr(i)*8)))
@@ -158564,7 +161189,7 @@ func rbuObjIterFreeCols(tls *libc.TLS, pIter uintptr) { /* sqlite3.c:199776:13:
// Finalize all statements and free all allocations that are specific to
// the current object (table/index pair).
-func rbuObjIterClearStatements(tls *libc.TLS, pIter uintptr) { /* sqlite3.c:199796:13: */
+func rbuObjIterClearStatements(tls *libc.TLS, pIter uintptr) { /* sqlite3.c:200878:13: */
var pUp uintptr
Xsqlite3_finalize(tls, (*RbuObjIter)(unsafe.Pointer(pIter)).FpSelect)
@@ -158594,7 +161219,7 @@ func rbuObjIterClearStatements(tls *libc.TLS, pIter uintptr) { /* sqlite3.c:1997
// Clean up any resources allocated as part of the iterator object passed
// as the only argument.
-func rbuObjIterFinalize(tls *libc.TLS, pIter uintptr) { /* sqlite3.c:199828:13: */
+func rbuObjIterFinalize(tls *libc.TLS, pIter uintptr) { /* sqlite3.c:200910:13: */
rbuObjIterClearStatements(tls, pIter)
Xsqlite3_finalize(tls, (*RbuObjIter)(unsafe.Pointer(pIter)).FpTblIter)
Xsqlite3_finalize(tls, (*RbuObjIter)(unsafe.Pointer(pIter)).FpIdxIter)
@@ -158608,7 +161233,7 @@ func rbuObjIterFinalize(tls *libc.TLS, pIter uintptr) { /* sqlite3.c:199828:13:
// pointing to the next entry. Otherwise, an error code and message is
// left in the RBU handle passed as the first argument. A copy of the
// error code is returned.
-func rbuObjIterNext(tls *libc.TLS, p uintptr, pIter uintptr) int32 { /* sqlite3.c:199844:12: */
+func rbuObjIterNext(tls *libc.TLS, p uintptr, pIter uintptr) int32 { /* sqlite3.c:200926:12: */
var rc int32 = (*Sqlite3rbu)(unsafe.Pointer(p)).Frc
if rc == SQLITE_OK {
@@ -158617,7 +161242,7 @@ func rbuObjIterNext(tls *libc.TLS, p uintptr, pIter uintptr) int32 { /* sqlite3.
if (*RbuObjIter)(unsafe.Pointer(pIter)).FzIdx == uintptr(0) {
rc = Xsqlite3_exec(tls, (*Sqlite3rbu)(unsafe.Pointer(p)).FdbMain,
- ts+25686 /* "DROP TRIGGER IF ..." */, uintptr(0), uintptr(0), (p + 64 /* &.zErrmsg */))
+ ts+26146 /* "DROP TRIGGER IF ..." */, uintptr(0), uintptr(0), (p + 64 /* &.zErrmsg */))
}
if rc == SQLITE_OK {
@@ -158689,7 +161314,7 @@ func rbuObjIterNext(tls *libc.TLS, p uintptr, pIter uintptr) int32 { /* sqlite3.
//
// For an rbu vacuum handle, a copy of the first argument is returned if
// the second argument is either missing or 0 (not a view).
-func rbuTargetNameFunc(tls *libc.TLS, pCtx uintptr, argc int32, argv uintptr) { /* sqlite3.c:199924:13: */
+func rbuTargetNameFunc(tls *libc.TLS, pCtx uintptr, argc int32, argv uintptr) { /* sqlite3.c:201006:13: */
var p uintptr = Xsqlite3_user_data(tls, pCtx)
var zIn uintptr
@@ -158701,11 +161326,11 @@ func rbuTargetNameFunc(tls *libc.TLS, pCtx uintptr, argc int32, argv uintptr) {
Xsqlite3_result_text(tls, pCtx, zIn, -1, uintptr(0))
}
} else {
- if (libc.Xstrlen(tls, zIn) > uint64(4)) && (libc.Xmemcmp(tls, ts+22856 /* "data" */, zIn, uint64(4)) == 0) {
+ if (libc.Xstrlen(tls, zIn) > uint64(4)) && (libc.Xmemcmp(tls, ts+23316 /* "data" */, zIn, uint64(4)) == 0) {
var i int32
- for i = 4; (int32(*(*int8)(unsafe.Pointer(zIn + uintptr(i)))) >= '0') && (int32(*(*int8)(unsafe.Pointer(zIn + uintptr(i)))) <= '9'); i++ {
+ for i = 4; (int32(*(*uint8)(unsafe.Pointer(zIn + uintptr(i)))) >= '0') && (int32(*(*uint8)(unsafe.Pointer(zIn + uintptr(i)))) <= '9'); i++ {
}
- if (int32(*(*int8)(unsafe.Pointer(zIn + uintptr(i)))) == '_') && (*(*int8)(unsafe.Pointer(zIn + uintptr((i + 1)))) != 0) {
+ if (int32(*(*uint8)(unsafe.Pointer(zIn + uintptr(i)))) == '_') && (*(*uint8)(unsafe.Pointer(zIn + uintptr((i + 1)))) != 0) {
Xsqlite3_result_text(tls, pCtx, (zIn + uintptr((i + 1))), -1, uintptr(0))
}
}
@@ -158719,7 +161344,7 @@ func rbuTargetNameFunc(tls *libc.TLS, pCtx uintptr, argc int32, argv uintptr) {
// pointing to the first entry. Otherwise, an error code and message is
// left in the RBU handle passed as the first argument. A copy of the
// error code is returned.
-func rbuObjIterFirst(tls *libc.TLS, p uintptr, pIter uintptr) int32 { /* sqlite3.c:199960:12: */
+func rbuObjIterFirst(tls *libc.TLS, p uintptr, pIter uintptr) int32 { /* sqlite3.c:201042:12: */
bp := tls.Alloc(8)
defer tls.Free(8)
@@ -158729,17 +161354,17 @@ func rbuObjIterFirst(tls *libc.TLS, p uintptr, pIter uintptr) int32 { /* sqlite3
rc = prepareFreeAndCollectError(tls, (*Sqlite3rbu)(unsafe.Pointer(p)).FdbRbu, (pIter /* &.pTblIter */), (p + 64 /* &.zErrmsg */),
Xsqlite3_mprintf(tls,
- ts+25857 /* "SELECT rbu_targe..." */, libc.VaList(bp, func() uintptr {
+ ts+26317 /* "SELECT rbu_targe..." */, libc.VaList(bp, func() uintptr {
if (*Sqlite3rbu)(unsafe.Pointer((p))).FzTarget == uintptr(0) {
- return ts + 26007 /* "AND rootpage!=0 ..." */
+ return ts + 26467 /* "AND rootpage!=0 ..." */
}
- return ts + 703 /* "" */
+ return ts + 755 /* "" */
}())))
if rc == SQLITE_OK {
rc = prepareAndCollectError(tls, (*Sqlite3rbu)(unsafe.Pointer(p)).FdbMain, (pIter + 8 /* &.pIdxIter */), (p + 64 /* &.zErrmsg */),
- ts+26048 /* "SELECT name, roo..." */)
+ ts+26508 /* "SELECT name, roo..." */)
}
(*RbuObjIter)(unsafe.Pointer(pIter)).FbCleanup = 1
@@ -158754,7 +161379,7 @@ func rbuObjIterFirst(tls *libc.TLS, p uintptr, pIter uintptr) int32 { /* sqlite3
// than SQLITE_OK), then this function returns NULL without modifying the
// stored error code. In this case it still calls sqlite3_free() on any
// printf() parameters associated with %z conversions.
-func rbuMPrintf(tls *libc.TLS, p uintptr, zFmt uintptr, va uintptr) uintptr { /* sqlite3.c:199995:13: */
+func rbuMPrintf(tls *libc.TLS, p uintptr, zFmt uintptr, va uintptr) uintptr { /* sqlite3.c:201077:13: */
var zSql uintptr = uintptr(0)
var ap Va_list
_ = ap
@@ -158780,7 +161405,7 @@ func rbuMPrintf(tls *libc.TLS, p uintptr, zFmt uintptr, va uintptr) uintptr { /*
// If an error occurs, an error code and error message is stored in the
// RBU handle. If an error has already occurred when this function is
// called, it is a no-op.
-func rbuMPrintfExec(tls *libc.TLS, p uintptr, db uintptr, zFmt uintptr, va uintptr) int32 { /* sqlite3.c:200020:12: */
+func rbuMPrintfExec(tls *libc.TLS, p uintptr, db uintptr, zFmt uintptr, va uintptr) int32 { /* sqlite3.c:201102:12: */
var ap Va_list
_ = ap
var zSql uintptr
@@ -158806,7 +161431,7 @@ func rbuMPrintfExec(tls *libc.TLS, p uintptr, db uintptr, zFmt uintptr, va uintp
// error has already occurred when this function is called, return NULL
// immediately without attempting the allocation or modifying the stored
// error code.
-func rbuMalloc(tls *libc.TLS, p uintptr, nByte Sqlite3_int64) uintptr { /* sqlite3.c:200047:13: */
+func rbuMalloc(tls *libc.TLS, p uintptr, nByte Sqlite3_int64) uintptr { /* sqlite3.c:201129:13: */
var pRet uintptr = uintptr(0)
if (*Sqlite3rbu)(unsafe.Pointer(p)).Frc == SQLITE_OK {
@@ -158823,7 +161448,7 @@ func rbuMalloc(tls *libc.TLS, p uintptr, nByte Sqlite3_int64) uintptr { /* sqlit
// Allocate and zero the pIter->azTblCol[] and abTblPk[] arrays so that
// there is room for at least nCol elements. If an OOM occurs, store an
// error code in the RBU handle passed as the first argument.
-func rbuAllocateIterArrays(tls *libc.TLS, p uintptr, pIter uintptr, nCol int32) { /* sqlite3.c:200067:13: */
+func rbuAllocateIterArrays(tls *libc.TLS, p uintptr, pIter uintptr, nCol int32) { /* sqlite3.c:201149:13: */
var nByte Sqlite3_int64 = (Sqlite3_int64((((uint64(2) * uint64(unsafe.Sizeof(uintptr(0)))) + uint64(unsafe.Sizeof(int32(0)))) + (uint64(3) * uint64(unsafe.Sizeof(U8(0))))) * uint64(nCol)))
var azNew uintptr
@@ -158846,7 +161471,7 @@ func rbuAllocateIterArrays(tls *libc.TLS, p uintptr, pIter uintptr, nCol int32)
// If an OOM condition is encountered when attempting to allocate memory,
// output variable (*pRc) is set to SQLITE_NOMEM before returning. Otherwise,
// if the allocation succeeds, (*pRc) is left unchanged.
-func rbuStrndup(tls *libc.TLS, zStr uintptr, pRc uintptr) uintptr { /* sqlite3.c:200092:13: */
+func rbuStrndup(tls *libc.TLS, zStr uintptr, pRc uintptr) uintptr { /* sqlite3.c:201174:13: */
var zRet uintptr = uintptr(0)
if *(*int32)(unsafe.Pointer(pRc)) == SQLITE_OK {
@@ -158869,7 +161494,7 @@ func rbuStrndup(tls *libc.TLS, zStr uintptr, pRc uintptr) uintptr { /* sqlite3.c
// If the sqlite3_finalize() call indicates that an error occurs, and the
// rbu handle error code is not already set, set the error code and error
// message accordingly.
-func rbuFinalize(tls *libc.TLS, p uintptr, pStmt uintptr) { /* sqlite3.c:200117:13: */
+func rbuFinalize(tls *libc.TLS, p uintptr, pStmt uintptr) { /* sqlite3.c:201199:13: */
bp := tls.Alloc(8)
defer tls.Free(8)
@@ -158877,7 +161502,7 @@ func rbuFinalize(tls *libc.TLS, p uintptr, pStmt uintptr) { /* sqlite3.c:200117:
var rc int32 = Xsqlite3_finalize(tls, pStmt)
if ((*Sqlite3rbu)(unsafe.Pointer(p)).Frc == SQLITE_OK) && (rc != SQLITE_OK) {
(*Sqlite3rbu)(unsafe.Pointer(p)).Frc = rc
- (*Sqlite3rbu)(unsafe.Pointer(p)).FzErrmsg = Xsqlite3_mprintf(tls, ts+2718 /* "%s" */, libc.VaList(bp, Xsqlite3_errmsg(tls, db)))
+ (*Sqlite3rbu)(unsafe.Pointer(p)).FzErrmsg = Xsqlite3_mprintf(tls, ts+2790 /* "%s" */, libc.VaList(bp, Xsqlite3_errmsg(tls, db)))
}
}
@@ -158919,7 +161544,7 @@ func rbuFinalize(tls *libc.TLS, p uintptr, pStmt uintptr) { /* sqlite3.c:200117:
// }else{
// return RBU_PK_NONE
// }
-func rbuTableType(tls *libc.TLS, p uintptr, zTab uintptr, peType uintptr, piTnum uintptr, piPk uintptr) { /* sqlite3.c:200165:13: */
+func rbuTableType(tls *libc.TLS, p uintptr, zTab uintptr, peType uintptr, piTnum uintptr, piPk uintptr) { /* sqlite3.c:201247:13: */
bp := tls.Alloc(64)
defer tls.Free(64)
@@ -158940,7 +161565,7 @@ func rbuTableType(tls *libc.TLS, p uintptr, zTab uintptr, peType uintptr, piTnum
(*Sqlite3rbu)(unsafe.Pointer(p)).Frc = prepareFreeAndCollectError(tls, (*Sqlite3rbu)(unsafe.Pointer(p)).FdbMain, (bp + 32 /* &aStmt */), (p + 64 /* &.zErrmsg */),
Xsqlite3_mprintf(tls,
- ts+26173 /* "SELECT (sql LIKE..." */, libc.VaList(bp, zTab)))
+ ts+26633 /* "SELECT (sql LIKE..." */, libc.VaList(bp, zTab)))
if !(((*Sqlite3rbu)(unsafe.Pointer(p)).Frc != SQLITE_OK) || (Xsqlite3_step(tls, *(*uintptr)(unsafe.Pointer(bp + 32 /* &aStmt[0] */))) != SQLITE_ROW)) {
goto __1
}
@@ -158958,7 +161583,7 @@ __2:
*(*int32)(unsafe.Pointer(piTnum)) = Xsqlite3_column_int(tls, *(*uintptr)(unsafe.Pointer(bp + 32 /* &aStmt[0] */)), 1)
(*Sqlite3rbu)(unsafe.Pointer(p)).Frc = prepareFreeAndCollectError(tls, (*Sqlite3rbu)(unsafe.Pointer(p)).FdbMain, (bp + 32 /* &aStmt */ + 1*8), (p + 64 /* &.zErrmsg */),
- Xsqlite3_mprintf(tls, ts+26254 /* "PRAGMA index_lis..." */, libc.VaList(bp+8, zTab)))
+ Xsqlite3_mprintf(tls, ts+26714 /* "PRAGMA index_lis..." */, libc.VaList(bp+8, zTab)))
if !((*Sqlite3rbu)(unsafe.Pointer(p)).Frc != 0) {
goto __3
}
@@ -158976,7 +161601,7 @@ __4:
}
(*Sqlite3rbu)(unsafe.Pointer(p)).Frc = prepareFreeAndCollectError(tls, (*Sqlite3rbu)(unsafe.Pointer(p)).FdbMain, (bp + 32 /* &aStmt */ + 2*8), (p + 64 /* &.zErrmsg */),
Xsqlite3_mprintf(tls,
- ts+26275 /* "SELECT rootpage ..." */, libc.VaList(bp+16, zIdx)))
+ ts+26735 /* "SELECT rootpage ..." */, libc.VaList(bp+16, zIdx)))
if !((*Sqlite3rbu)(unsafe.Pointer(p)).Frc == SQLITE_OK) {
goto __7
}
@@ -159000,7 +161625,7 @@ __5:
;
(*Sqlite3rbu)(unsafe.Pointer(p)).Frc = prepareFreeAndCollectError(tls, (*Sqlite3rbu)(unsafe.Pointer(p)).FdbMain, (bp + 32 /* &aStmt */ + 3*8), (p + 64 /* &.zErrmsg */),
- Xsqlite3_mprintf(tls, ts+26326 /* "PRAGMA table_inf..." */, libc.VaList(bp+24, zTab)))
+ Xsqlite3_mprintf(tls, ts+26786 /* "PRAGMA table_inf..." */, libc.VaList(bp+24, zTab)))
if !((*Sqlite3rbu)(unsafe.Pointer(p)).Frc == SQLITE_OK) {
goto __10
}
@@ -159039,7 +161664,7 @@ __16:
// This is a helper function for rbuObjIterCacheTableInfo(). It populates
// the pIter->abIndexed[] array.
-func rbuObjIterCacheIndexedCols(tls *libc.TLS, p uintptr, pIter uintptr) { /* sqlite3.c:200249:13: */
+func rbuObjIterCacheIndexedCols(tls *libc.TLS, p uintptr, pIter uintptr) { /* sqlite3.c:201331:13: */
bp := tls.Alloc(32)
defer tls.Free(32)
@@ -159049,7 +161674,7 @@ func rbuObjIterCacheIndexedCols(tls *libc.TLS, p uintptr, pIter uintptr) { /* sq
if (*Sqlite3rbu)(unsafe.Pointer(p)).Frc == SQLITE_OK {
libc.Xmemcpy(tls, (*RbuObjIter)(unsafe.Pointer(pIter)).FabIndexed, (*RbuObjIter)(unsafe.Pointer(pIter)).FabTblPk, (uint64(unsafe.Sizeof(U8(0))) * uint64((*RbuObjIter)(unsafe.Pointer(pIter)).FnTblCol)))
(*Sqlite3rbu)(unsafe.Pointer(p)).Frc = prepareFreeAndCollectError(tls, (*Sqlite3rbu)(unsafe.Pointer(p)).FdbMain, bp+16 /* &pList */, (p + 64 /* &.zErrmsg */),
- Xsqlite3_mprintf(tls, ts+26347 /* "PRAGMA main.inde..." */, libc.VaList(bp, (*RbuObjIter)(unsafe.Pointer(pIter)).FzTbl)))
+ Xsqlite3_mprintf(tls, ts+26807 /* "PRAGMA main.inde..." */, libc.VaList(bp, (*RbuObjIter)(unsafe.Pointer(pIter)).FzTbl)))
}
(*RbuObjIter)(unsafe.Pointer(pIter)).FnIndex = 0
@@ -159064,7 +161689,7 @@ func rbuObjIterCacheIndexedCols(tls *libc.TLS, p uintptr, pIter uintptr) { /* sq
libc.Xmemset(tls, (*RbuObjIter)(unsafe.Pointer(pIter)).FabIndexed, 0x01, (uint64(unsafe.Sizeof(U8(0))) * uint64((*RbuObjIter)(unsafe.Pointer(pIter)).FnTblCol)))
}
(*Sqlite3rbu)(unsafe.Pointer(p)).Frc = prepareFreeAndCollectError(tls, (*Sqlite3rbu)(unsafe.Pointer(p)).FdbMain, bp+24 /* &pXInfo */, (p + 64 /* &.zErrmsg */),
- Xsqlite3_mprintf(tls, ts+26375 /* "PRAGMA main.inde..." */, libc.VaList(bp+8, zIdx)))
+ Xsqlite3_mprintf(tls, ts+26835 /* "PRAGMA main.inde..." */, libc.VaList(bp+8, zIdx)))
for ((*Sqlite3rbu)(unsafe.Pointer(p)).Frc == SQLITE_OK) && (SQLITE_ROW == Xsqlite3_step(tls, *(*uintptr)(unsafe.Pointer(bp + 24 /* pXInfo */)))) {
var iCid int32 = Xsqlite3_column_int(tls, *(*uintptr)(unsafe.Pointer(bp + 24 /* pXInfo */)), 1)
if iCid >= 0 {
@@ -159097,7 +161722,7 @@ func rbuObjIterCacheIndexedCols(tls *libc.TLS, p uintptr, pIter uintptr) { /* sq
// Return SQLITE_OK if successful, or an SQLite error code otherwise. If
// an error does occur, an error code and error message are also left in
// the RBU handle.
-func rbuObjIterCacheTableInfo(tls *libc.TLS, p uintptr, pIter uintptr) int32 { /* sqlite3.c:200303:12: */
+func rbuObjIterCacheTableInfo(tls *libc.TLS, p uintptr, pIter uintptr) int32 { /* sqlite3.c:201385:12: */
bp := tls.Alloc(72)
defer tls.Free(72)
@@ -159114,7 +161739,7 @@ func rbuObjIterCacheTableInfo(tls *libc.TLS, p uintptr, pIter uintptr) int32 { /
rbuTableType(tls, p, (*RbuObjIter)(unsafe.Pointer(pIter)).FzTbl, (pIter + 72 /* &.eType */), bp+56 /* &iTnum */, (pIter + 108 /* &.iPkTnum */))
if ((*Sqlite3rbu)(unsafe.Pointer(p)).Frc == SQLITE_OK) && ((*RbuObjIter)(unsafe.Pointer(pIter)).FeType == RBU_PK_NOTABLE) {
(*Sqlite3rbu)(unsafe.Pointer(p)).Frc = SQLITE_ERROR
- (*Sqlite3rbu)(unsafe.Pointer(p)).FzErrmsg = Xsqlite3_mprintf(tls, ts+17402 /* "no such table: %..." */, libc.VaList(bp, (*RbuObjIter)(unsafe.Pointer(pIter)).FzTbl))
+ (*Sqlite3rbu)(unsafe.Pointer(p)).FzErrmsg = Xsqlite3_mprintf(tls, ts+17857 /* "no such table: %..." */, libc.VaList(bp, (*RbuObjIter)(unsafe.Pointer(pIter)).FzTbl))
}
if (*Sqlite3rbu)(unsafe.Pointer(p)).Frc != 0 {
return (*Sqlite3rbu)(unsafe.Pointer(p)).Frc
@@ -159127,18 +161752,18 @@ func rbuObjIterCacheTableInfo(tls *libc.TLS, p uintptr, pIter uintptr) int32 { /
// of the input table. Ignore any input table columns that begin with
// "rbu_".
(*Sqlite3rbu)(unsafe.Pointer(p)).Frc = prepareFreeAndCollectError(tls, (*Sqlite3rbu)(unsafe.Pointer(p)).FdbRbu, bp+64 /* &pStmt */, (p + 64 /* &.zErrmsg */),
- Xsqlite3_mprintf(tls, ts+26404 /* "SELECT * FROM '%..." */, libc.VaList(bp+8, (*RbuObjIter)(unsafe.Pointer(pIter)).FzDataTbl)))
+ Xsqlite3_mprintf(tls, ts+26864 /* "SELECT * FROM '%..." */, libc.VaList(bp+8, (*RbuObjIter)(unsafe.Pointer(pIter)).FzDataTbl)))
if (*Sqlite3rbu)(unsafe.Pointer(p)).Frc == SQLITE_OK {
nCol = Xsqlite3_column_count(tls, *(*uintptr)(unsafe.Pointer(bp + 64 /* pStmt */)))
rbuAllocateIterArrays(tls, p, pIter, nCol)
}
for i = 0; ((*Sqlite3rbu)(unsafe.Pointer(p)).Frc == SQLITE_OK) && (i < nCol); i++ {
var zName uintptr = Xsqlite3_column_name(tls, *(*uintptr)(unsafe.Pointer(bp + 64 /* pStmt */)), i)
- if Xsqlite3_strnicmp(tls, ts+26423 /* "rbu_" */, zName, 4) != 0 {
+ if Xsqlite3_strnicmp(tls, ts+26883 /* "rbu_" */, zName, 4) != 0 {
var zCopy uintptr = rbuStrndup(tls, zName, (p + 56 /* &.rc */))
*(*int32)(unsafe.Pointer((*RbuObjIter)(unsafe.Pointer(pIter)).FaiSrcOrder + uintptr((*RbuObjIter)(unsafe.Pointer(pIter)).FnTblCol)*4)) = (*RbuObjIter)(unsafe.Pointer(pIter)).FnTblCol
*(*uintptr)(unsafe.Pointer((*RbuObjIter)(unsafe.Pointer(pIter)).FazTblCol + uintptr(libc.PostIncInt32(&(*RbuObjIter)(unsafe.Pointer(pIter)).FnTblCol, 1))*8)) = zCopy
- } else if 0 == Xsqlite3_stricmp(tls, ts+26428 /* "rbu_rowid" */, zName) {
+ } else if 0 == Xsqlite3_stricmp(tls, ts+26888 /* "rbu_rowid" */, zName) {
bRbuRowid = 1
}
}
@@ -159150,12 +161775,12 @@ func rbuObjIterCacheTableInfo(tls *libc.TLS, p uintptr, pIter uintptr) int32 { /
(bRbuRowid != (libc.Bool32(((*RbuObjIter)(unsafe.Pointer(pIter)).FeType == RBU_PK_VTAB) || ((*RbuObjIter)(unsafe.Pointer(pIter)).FeType == RBU_PK_NONE)))) {
(*Sqlite3rbu)(unsafe.Pointer(p)).Frc = SQLITE_ERROR
(*Sqlite3rbu)(unsafe.Pointer(p)).FzErrmsg = Xsqlite3_mprintf(tls,
- ts+26438 /* "table %q %s rbu_..." */, libc.VaList(bp+16, (*RbuObjIter)(unsafe.Pointer(pIter)).FzDataTbl,
+ ts+26898 /* "table %q %s rbu_..." */, libc.VaList(bp+16, (*RbuObjIter)(unsafe.Pointer(pIter)).FzDataTbl,
func() uintptr {
if bRbuRowid != 0 {
- return ts + 26467 /* "may not have" */
+ return ts + 26927 /* "may not have" */
}
- return ts + 26480 /* "requires" */
+ return ts + 26940 /* "requires" */
}()))
}
@@ -159164,7 +161789,7 @@ func rbuObjIterCacheTableInfo(tls *libc.TLS, p uintptr, pIter uintptr) int32 { /
// aiTblOrder[] arrays at the same time.
if (*Sqlite3rbu)(unsafe.Pointer(p)).Frc == SQLITE_OK {
(*Sqlite3rbu)(unsafe.Pointer(p)).Frc = prepareFreeAndCollectError(tls, (*Sqlite3rbu)(unsafe.Pointer(p)).FdbMain, bp+64 /* &pStmt */, (p + 64 /* &.zErrmsg */),
- Xsqlite3_mprintf(tls, ts+26489 /* "PRAGMA table_inf..." */, libc.VaList(bp+32, (*RbuObjIter)(unsafe.Pointer(pIter)).FzTbl)))
+ Xsqlite3_mprintf(tls, ts+26949 /* "PRAGMA table_inf..." */, libc.VaList(bp+32, (*RbuObjIter)(unsafe.Pointer(pIter)).FzTbl)))
}
for ((*Sqlite3rbu)(unsafe.Pointer(p)).Frc == SQLITE_OK) && (SQLITE_ROW == Xsqlite3_step(tls, *(*uintptr)(unsafe.Pointer(bp + 64 /* pStmt */)))) {
var zName uintptr = Xsqlite3_column_text(tls, *(*uintptr)(unsafe.Pointer(bp + 64 /* pStmt */)), 1)
@@ -159178,7 +161803,7 @@ func rbuObjIterCacheTableInfo(tls *libc.TLS, p uintptr, pIter uintptr) int32 { /
}
if i == (*RbuObjIter)(unsafe.Pointer(pIter)).FnTblCol {
(*Sqlite3rbu)(unsafe.Pointer(p)).Frc = SQLITE_ERROR
- (*Sqlite3rbu)(unsafe.Pointer(p)).FzErrmsg = Xsqlite3_mprintf(tls, ts+26511, /* "column missing f..." */
+ (*Sqlite3rbu)(unsafe.Pointer(p)).FzErrmsg = Xsqlite3_mprintf(tls, ts+26971, /* "column missing f..." */
libc.VaList(bp+40, (*RbuObjIter)(unsafe.Pointer(pIter)).FzDataTbl, zName))
} else {
var iPk int32 = Xsqlite3_column_int(tls, *(*uintptr)(unsafe.Pointer(bp + 64 /* pStmt */)), 5)
@@ -159219,17 +161844,17 @@ func rbuObjIterCacheTableInfo(tls *libc.TLS, p uintptr, pIter uintptr) int32 { /
// This function constructs and returns a pointer to a nul-terminated
// string containing some SQL clause or list based on one or more of the
// column names currently stored in the pIter->azTblCol[] array.
-func rbuObjIterGetCollist(tls *libc.TLS, p uintptr, pIter uintptr) uintptr { /* sqlite3.c:200413:13: */
+func rbuObjIterGetCollist(tls *libc.TLS, p uintptr, pIter uintptr) uintptr { /* sqlite3.c:201495:13: */
bp := tls.Alloc(24)
defer tls.Free(24)
var zList uintptr = uintptr(0)
- var zSep uintptr = ts + 703 /* "" */
+ var zSep uintptr = ts + 755 /* "" */
var i int32
for i = 0; i < (*RbuObjIter)(unsafe.Pointer(pIter)).FnTblCol; i++ {
var z uintptr = *(*uintptr)(unsafe.Pointer((*RbuObjIter)(unsafe.Pointer(pIter)).FazTblCol + uintptr(i)*8))
- zList = rbuMPrintf(tls, p, ts+26538 /* "%z%s\"%w\"" */, libc.VaList(bp, zList, zSep, z))
- zSep = ts + 12871 /* ", " */
+ zList = rbuMPrintf(tls, p, ts+26998 /* "%z%s\"%w\"" */, libc.VaList(bp, zList, zSep, z))
+ zSep = ts + 13324 /* ", " */
}
return zList
}
@@ -159238,19 +161863,19 @@ func rbuObjIterGetCollist(tls *libc.TLS, p uintptr, pIter uintptr) uintptr { /*
// in order, for the current table. Before each column name, add the text
// zPre. After each column name, add the zPost text. Use zSeparator as
// the separator text (usually ", ").
-func rbuObjIterGetPkList(tls *libc.TLS, p uintptr, pIter uintptr, zPre uintptr, zSeparator uintptr, zPost uintptr) uintptr { /* sqlite3.c:200434:13: */
+func rbuObjIterGetPkList(tls *libc.TLS, p uintptr, pIter uintptr, zPre uintptr, zSeparator uintptr, zPost uintptr) uintptr { /* sqlite3.c:201516:13: */
bp := tls.Alloc(40)
defer tls.Free(40)
var iPk int32 = 1
var zRet uintptr = uintptr(0)
- var zSep uintptr = ts + 703 /* "" */
+ var zSep uintptr = ts + 755 /* "" */
for 1 != 0 {
var i int32
for i = 0; i < (*RbuObjIter)(unsafe.Pointer(pIter)).FnTblCol; i++ {
if int32(*(*U8)(unsafe.Pointer((*RbuObjIter)(unsafe.Pointer(pIter)).FabTblPk + uintptr(i)))) == iPk {
var zCol uintptr = *(*uintptr)(unsafe.Pointer((*RbuObjIter)(unsafe.Pointer(pIter)).FazTblCol + uintptr(i)*8))
- zRet = rbuMPrintf(tls, p, ts+26547 /* "%z%s%s\"%w\"%s" */, libc.VaList(bp, zRet, zSep, zPre, zCol, zPost))
+ zRet = rbuMPrintf(tls, p, ts+27007 /* "%z%s%s\"%w\"%s" */, libc.VaList(bp, zRet, zSep, zPre, zCol, zPost))
zSep = zSeparator
break
}
@@ -159280,7 +161905,7 @@ func rbuObjIterGetPkList(tls *libc.TLS, p uintptr, pIter uintptr, zPre uintptr,
//
// Instead of "?" placeholders, the actual WHERE clauses created by
// this function contain literal SQL values.
-func rbuVacuumTableStart(tls *libc.TLS, p uintptr, pIter uintptr, bRowid int32, zWrite uintptr) uintptr { /* sqlite3.c:200479:13: */
+func rbuVacuumTableStart(tls *libc.TLS, p uintptr, pIter uintptr, bRowid int32, zWrite uintptr) uintptr { /* sqlite3.c:201561:13: */
bp := tls.Alloc(80)
defer tls.Free(80)
@@ -159289,25 +161914,25 @@ func rbuVacuumTableStart(tls *libc.TLS, p uintptr, pIter uintptr, bRowid int32,
if bRowid != 0 {
(*Sqlite3rbu)(unsafe.Pointer(p)).Frc = prepareFreeAndCollectError(tls, (*Sqlite3rbu)(unsafe.Pointer(p)).FdbMain, bp+72 /* &pMax */, (p + 64 /* &.zErrmsg */),
Xsqlite3_mprintf(tls,
- ts+26560 /* "SELECT max(_rowi..." */, libc.VaList(bp, zWrite, (*RbuObjIter)(unsafe.Pointer(pIter)).FzTbl)))
+ ts+27020 /* "SELECT max(_rowi..." */, libc.VaList(bp, zWrite, (*RbuObjIter)(unsafe.Pointer(pIter)).FzTbl)))
if ((*Sqlite3rbu)(unsafe.Pointer(p)).Frc == SQLITE_OK) && (SQLITE_ROW == Xsqlite3_step(tls, *(*uintptr)(unsafe.Pointer(bp + 72 /* pMax */)))) {
var iMax Sqlite3_int64 = Xsqlite3_column_int64(tls, *(*uintptr)(unsafe.Pointer(bp + 72 /* pMax */)), 0)
- zRet = rbuMPrintf(tls, p, ts+26592 /* " WHERE _rowid_ >..." */, libc.VaList(bp+16, iMax))
+ zRet = rbuMPrintf(tls, p, ts+27052 /* " WHERE _rowid_ >..." */, libc.VaList(bp+16, iMax))
}
rbuFinalize(tls, p, *(*uintptr)(unsafe.Pointer(bp + 72 /* pMax */)))
} else {
- var zOrder uintptr = rbuObjIterGetPkList(tls, p, pIter, ts+703 /* "" */, ts+12871 /* ", " */, ts+26615 /* " DESC" */)
- var zSelect uintptr = rbuObjIterGetPkList(tls, p, pIter, ts+26621 /* "quote(" */, ts+26628 /* "||','||" */, ts+3935 /* ")" */)
- var zList uintptr = rbuObjIterGetPkList(tls, p, pIter, ts+703 /* "" */, ts+12871 /* ", " */, ts+703 /* "" */)
+ var zOrder uintptr = rbuObjIterGetPkList(tls, p, pIter, ts+755 /* "" */, ts+13324 /* ", " */, ts+27075 /* " DESC" */)
+ var zSelect uintptr = rbuObjIterGetPkList(tls, p, pIter, ts+27081 /* "quote(" */, ts+27088 /* "||','||" */, ts+4066 /* ")" */)
+ var zList uintptr = rbuObjIterGetPkList(tls, p, pIter, ts+755 /* "" */, ts+13324 /* ", " */, ts+755 /* "" */)
if (*Sqlite3rbu)(unsafe.Pointer(p)).Frc == SQLITE_OK {
(*Sqlite3rbu)(unsafe.Pointer(p)).Frc = prepareFreeAndCollectError(tls, (*Sqlite3rbu)(unsafe.Pointer(p)).FdbMain, bp+72 /* &pMax */, (p + 64 /* &.zErrmsg */),
Xsqlite3_mprintf(tls,
- ts+26636, /* "SELECT %s FROM \"..." */
+ ts+27096, /* "SELECT %s FROM \"..." */
libc.VaList(bp+24, zSelect, zWrite, (*RbuObjIter)(unsafe.Pointer(pIter)).FzTbl, zOrder)))
if ((*Sqlite3rbu)(unsafe.Pointer(p)).Frc == SQLITE_OK) && (SQLITE_ROW == Xsqlite3_step(tls, *(*uintptr)(unsafe.Pointer(bp + 72 /* pMax */)))) {
var zVal uintptr = Xsqlite3_column_text(tls, *(*uintptr)(unsafe.Pointer(bp + 72 /* pMax */)), 0)
- zRet = rbuMPrintf(tls, p, ts+26678 /* " WHERE (%s) > (%..." */, libc.VaList(bp+56, zList, zVal))
+ zRet = rbuMPrintf(tls, p, ts+27138 /* " WHERE (%s) > (%..." */, libc.VaList(bp+56, zList, zVal))
}
rbuFinalize(tls, p, *(*uintptr)(unsafe.Pointer(bp + 72 /* pMax */)))
}
@@ -159339,7 +161964,7 @@ func rbuVacuumTableStart(tls *libc.TLS, p uintptr, pIter uintptr, bRowid int32,
// If the expression cannot be created, NULL is returned. In this case,
// the caller has to use an OFFSET clause to extract only the required
// rows from the sourct table, just as it does for an RBU update operation.
-func XrbuVacuumIndexStart(tls *libc.TLS, p uintptr, pIter uintptr) uintptr { /* sqlite3.c:200546:6: */
+func XrbuVacuumIndexStart(tls *libc.TLS, p uintptr, pIter uintptr) uintptr { /* sqlite3.c:201628:6: */
bp := tls.Alloc(192)
defer tls.Free(192)
@@ -159365,12 +161990,12 @@ func XrbuVacuumIndexStart(tls *libc.TLS, p uintptr, pIter uintptr) uintptr { /*
zVector = uintptr(0)
zRet = uintptr(0)
bFailed = 0
- zSep = ts + 703 /* "" */
+ zSep = ts + 755 /* "" */
iCol = 0
*(*uintptr)(unsafe.Pointer(bp + 176 /* pXInfo */)) = uintptr(0)
(*Sqlite3rbu)(unsafe.Pointer(p)).Frc = prepareFreeAndCollectError(tls, (*Sqlite3rbu)(unsafe.Pointer(p)).FdbMain, bp+176 /* &pXInfo */, (p + 64 /* &.zErrmsg */),
- Xsqlite3_mprintf(tls, ts+26375 /* "PRAGMA main.inde..." */, libc.VaList(bp, (*RbuObjIter)(unsafe.Pointer(pIter)).FzIdx)))
+ Xsqlite3_mprintf(tls, ts+26835 /* "PRAGMA main.inde..." */, libc.VaList(bp, (*RbuObjIter)(unsafe.Pointer(pIter)).FzIdx)))
__1:
if !(((*Sqlite3rbu)(unsafe.Pointer(p)).Frc == SQLITE_OK) && (SQLITE_ROW == Xsqlite3_step(tls, *(*uintptr)(unsafe.Pointer(bp + 176 /* pXInfo */))))) {
goto __2
@@ -159407,7 +162032,7 @@ __10:
zCol = *(*uintptr)(unsafe.Pointer((*RbuObjIter)(unsafe.Pointer(pIter)).FazTblCol + uintptr(i)*8))
goto __7
__6:
- zCol = ts + 26698 /* "_rowid_" */
+ zCol = ts + 27158 /* "_rowid_" */
__7:
;
goto __5
@@ -159416,13 +162041,13 @@ __4:
__5:
;
- zLhs = rbuMPrintf(tls, p, ts+26706, /* "%z%s \"%w\" COLLAT..." */
+ zLhs = rbuMPrintf(tls, p, ts+27166, /* "%z%s \"%w\" COLLAT..." */
libc.VaList(bp+8, zLhs, zSep, zCol, zCollate))
- zOrder = rbuMPrintf(tls, p, ts+26727, /* "%z%s \"rbu_imp_%d..." */
+ zOrder = rbuMPrintf(tls, p, ts+27187, /* "%z%s \"rbu_imp_%d..." */
libc.VaList(bp+40, zOrder, zSep, iCol, zCol, zCollate))
- zSelect = rbuMPrintf(tls, p, ts+26763, /* "%z%s quote(\"rbu_..." */
+ zSelect = rbuMPrintf(tls, p, ts+27223, /* "%z%s quote(\"rbu_..." */
libc.VaList(bp+80, zSelect, zSep, iCol, zCol))
- zSep = ts + 12871 /* ", " */
+ zSep = ts + 13324 /* ", " */
iCol++
goto __1
__2:
@@ -159441,27 +162066,35 @@ __11:
*(*uintptr)(unsafe.Pointer(bp + 184 /* pSel */)) = uintptr(0)
(*Sqlite3rbu)(unsafe.Pointer(p)).Frc = prepareFreeAndCollectError(tls, (*Sqlite3rbu)(unsafe.Pointer(p)).FdbMain, bp+184 /* &pSel */, (p + 64 /* &.zErrmsg */),
- Xsqlite3_mprintf(tls, ts+26790, /* "SELECT %s FROM \"..." */
+ Xsqlite3_mprintf(tls, ts+27250, /* "SELECT %s FROM \"..." */
libc.VaList(bp+112, zSelect, (*RbuObjIter)(unsafe.Pointer(pIter)).FzTbl, zOrder)))
if !(((*Sqlite3rbu)(unsafe.Pointer(p)).Frc == SQLITE_OK) && (SQLITE_ROW == Xsqlite3_step(tls, *(*uintptr)(unsafe.Pointer(bp + 184 /* pSel */))))) {
goto __13
}
- zSep = ts + 703 /* "" */
+ zSep = ts + 755 /* "" */
iCol = 0
__14:
if !(iCol < (*RbuObjIter)(unsafe.Pointer(pIter)).FnCol) {
goto __16
}
zQuoted = Xsqlite3_column_text(tls, *(*uintptr)(unsafe.Pointer(bp + 184 /* pSel */)), iCol)
- if !(int32(*(*int8)(unsafe.Pointer(zQuoted))) == 'N') {
+ if !(zQuoted == uintptr(0)) {
goto __17
}
+ (*Sqlite3rbu)(unsafe.Pointer(p)).Frc = SQLITE_NOMEM
+ goto __18
+__17:
+ if !(int32(*(*uint8)(unsafe.Pointer(zQuoted))) == 'N') {
+ goto __19
+ }
bFailed = 1
goto __16
-__17:
+__19:
+ ;
+__18:
;
- zVector = rbuMPrintf(tls, p, ts+26838 /* "%z%s%s" */, libc.VaList(bp+136, zVector, zSep, zQuoted))
- zSep = ts + 12871 /* ", " */
+ zVector = rbuMPrintf(tls, p, ts+27298 /* "%z%s%s" */, libc.VaList(bp+136, zVector, zSep, zQuoted))
+ zSep = ts + 13324 /* ", " */
goto __15
__15:
iCol++
@@ -159471,10 +162104,10 @@ __16:
;
if !(!(bFailed != 0)) {
- goto __18
+ goto __20
}
- zRet = rbuMPrintf(tls, p, ts+26845 /* "(%s) > (%s)" */, libc.VaList(bp+160, zLhs, zVector))
-__18:
+ zRet = rbuMPrintf(tls, p, ts+27305 /* "(%s) > (%s)" */, libc.VaList(bp+160, zLhs, zVector))
+__20:
;
__13:
;
@@ -159512,7 +162145,7 @@ index_start_out:
// pzImposterCols: ...
// pzImposterPk: ...
// pzWhere: ...
-func rbuObjIterGetIndexCols(tls *libc.TLS, p uintptr, pIter uintptr, pzImposterCols uintptr, pzImposterPk uintptr, pzWhere uintptr, pnBind uintptr) uintptr { /* sqlite3.c:200659:13: */
+func rbuObjIterGetIndexCols(tls *libc.TLS, p uintptr, pIter uintptr, pzImposterCols uintptr, pzImposterPk uintptr, pzWhere uintptr, pnBind uintptr) uintptr { /* sqlite3.c:201743:13: */
bp := tls.Alloc(208)
defer tls.Free(208)
@@ -159523,14 +162156,14 @@ func rbuObjIterGetIndexCols(tls *libc.TLS, p uintptr, pIter uintptr, pzImposterC
var zImpPK uintptr = uintptr(0) // String to return via *pzImposterPK
var zWhere uintptr = uintptr(0) // String to return via *pzWhere
var nBind int32 = 0 // Value to return via *pnBind
- var zCom uintptr = ts + 703 /* "" */ // Set to ", " later on
- var zAnd uintptr = ts + 703 /* "" */ // Set to " AND " later on
+ var zCom uintptr = ts + 755 /* "" */ // Set to ", " later on
+ var zAnd uintptr = ts + 755 /* "" */ // Set to " AND " later on
*(*uintptr)(unsafe.Pointer(bp + 200 /* pXInfo */)) = uintptr(0) // PRAGMA index_xinfo = ?
if rc == SQLITE_OK {
rc = prepareFreeAndCollectError(tls, (*Sqlite3rbu)(unsafe.Pointer(p)).FdbMain, bp+200 /* &pXInfo */, (p + 64 /* &.zErrmsg */),
- Xsqlite3_mprintf(tls, ts+26375 /* "PRAGMA main.inde..." */, libc.VaList(bp, (*RbuObjIter)(unsafe.Pointer(pIter)).FzIdx)))
+ Xsqlite3_mprintf(tls, ts+26835 /* "PRAGMA main.inde..." */, libc.VaList(bp, (*RbuObjIter)(unsafe.Pointer(pIter)).FzIdx)))
}
for (rc == SQLITE_OK) && (SQLITE_ROW == Xsqlite3_step(tls, *(*uintptr)(unsafe.Pointer(bp + 200 /* pXInfo */)))) {
@@ -159542,9 +162175,9 @@ func rbuObjIterGetIndexCols(tls *libc.TLS, p uintptr, pIter uintptr, pzImposterC
if iCid == -2 {
var iSeq int32 = Xsqlite3_column_int(tls, *(*uintptr)(unsafe.Pointer(bp + 200 /* pXInfo */)), 0)
- zRet = Xsqlite3_mprintf(tls, ts+26857 /* "%z%s(%.*s) COLLA..." */, libc.VaList(bp+8, zRet, zCom,
+ zRet = Xsqlite3_mprintf(tls, ts+27317 /* "%z%s(%.*s) COLLA..." */, libc.VaList(bp+8, zRet, zCom,
(*RbuSpan)(unsafe.Pointer((*RbuObjIter)(unsafe.Pointer(pIter)).FaIdxCol+uintptr(iSeq)*16)).FnSpan, (*RbuSpan)(unsafe.Pointer((*RbuObjIter)(unsafe.Pointer(pIter)).FaIdxCol+uintptr(iSeq)*16)).FzSpan, zCollate))
- zType = ts + 703 /* "" */
+ zType = ts + 755 /* "" */
} else {
if iCid < 0 {
// An integer primary key. If the table has an explicit IPK, use
@@ -159556,37 +162189,37 @@ func rbuObjIterGetIndexCols(tls *libc.TLS, p uintptr, pIter uintptr, pzImposterC
zCol = *(*uintptr)(unsafe.Pointer((*RbuObjIter)(unsafe.Pointer(pIter)).FazTblCol + uintptr(i)*8))
} else if (*Sqlite3rbu)(unsafe.Pointer((p))).FzTarget == uintptr(0) {
- zCol = ts + 26698 /* "_rowid_" */
+ zCol = ts + 27158 /* "_rowid_" */
} else {
- zCol = ts + 26428 /* "rbu_rowid" */
+ zCol = ts + 26888 /* "rbu_rowid" */
}
- zType = ts + 10931 /* "INTEGER" */
+ zType = ts + 11384 /* "INTEGER" */
} else {
zCol = *(*uintptr)(unsafe.Pointer((*RbuObjIter)(unsafe.Pointer(pIter)).FazTblCol + uintptr(iCid)*8))
zType = *(*uintptr)(unsafe.Pointer((*RbuObjIter)(unsafe.Pointer(pIter)).FazTblType + uintptr(iCid)*8))
}
- zRet = Xsqlite3_mprintf(tls, ts+26879 /* "%z%s\"%w\" COLLATE..." */, libc.VaList(bp+48, zRet, zCom, zCol, zCollate))
+ zRet = Xsqlite3_mprintf(tls, ts+27339 /* "%z%s\"%w\" COLLATE..." */, libc.VaList(bp+48, zRet, zCom, zCol, zCollate))
}
if ((*RbuObjIter)(unsafe.Pointer(pIter)).FbUnique == 0) || (Xsqlite3_column_int(tls, *(*uintptr)(unsafe.Pointer(bp + 200 /* pXInfo */)), 5) != 0) {
var zOrder uintptr = func() uintptr {
if bDesc != 0 {
- return ts + 26615 /* " DESC" */
+ return ts + 27075 /* " DESC" */
}
- return ts + 703 /* "" */
+ return ts + 755 /* "" */
}()
- zImpPK = Xsqlite3_mprintf(tls, ts+26899, /* "%z%s\"rbu_imp_%d%..." */
+ zImpPK = Xsqlite3_mprintf(tls, ts+27359, /* "%z%s\"rbu_imp_%d%..." */
libc.VaList(bp+80, zImpPK, zCom, nBind, zCol, zOrder))
}
- zImpCols = Xsqlite3_mprintf(tls, ts+26920, /* "%z%s\"rbu_imp_%d%..." */
+ zImpCols = Xsqlite3_mprintf(tls, ts+27380, /* "%z%s\"rbu_imp_%d%..." */
libc.VaList(bp+120, zImpCols, zCom, nBind, zCol, zType, zCollate))
zWhere = Xsqlite3_mprintf(tls,
- ts+26953 /* "%z%s\"rbu_imp_%d%..." */, libc.VaList(bp+168, zWhere, zAnd, nBind, zCol))
+ ts+27413 /* "%z%s\"rbu_imp_%d%..." */, libc.VaList(bp+168, zWhere, zAnd, nBind, zCol))
if (((zRet == uintptr(0)) || (zImpPK == uintptr(0))) || (zImpCols == uintptr(0))) || (zWhere == uintptr(0)) {
rc = SQLITE_NOMEM
}
- zCom = ts + 12871 /* ", " */
- zAnd = ts + 19393 /* " AND " */
+ zCom = ts + 13324 /* ", " */
+ zAnd = ts + 19877 /* " AND " */
nBind++
}
@@ -159623,22 +162256,22 @@ func rbuObjIterGetIndexCols(tls *libc.TLS, p uintptr, pIter uintptr, pzImposterC
//
// For tables with implicit rowids - RBU_PK_EXTERNAL and RBU_PK_NONE, append
// the text ", old._rowid_" to the returned value.
-func rbuObjIterGetOldlist(tls *libc.TLS, p uintptr, pIter uintptr, zObj uintptr) uintptr { /* sqlite3.c:200771:13: */
+func rbuObjIterGetOldlist(tls *libc.TLS, p uintptr, pIter uintptr, zObj uintptr) uintptr { /* sqlite3.c:201855:13: */
bp := tls.Alloc(64)
defer tls.Free(64)
var zList uintptr = uintptr(0)
if ((*Sqlite3rbu)(unsafe.Pointer(p)).Frc == SQLITE_OK) && ((*RbuObjIter)(unsafe.Pointer(pIter)).FabIndexed != 0) {
- var zS uintptr = ts + 703 /* "" */
+ var zS uintptr = ts + 755 /* "" */
var i int32
for i = 0; i < (*RbuObjIter)(unsafe.Pointer(pIter)).FnTblCol; i++ {
if *(*U8)(unsafe.Pointer((*RbuObjIter)(unsafe.Pointer(pIter)).FabIndexed + uintptr(i))) != 0 {
var zCol uintptr = *(*uintptr)(unsafe.Pointer((*RbuObjIter)(unsafe.Pointer(pIter)).FazTblCol + uintptr(i)*8))
- zList = Xsqlite3_mprintf(tls, ts+26977 /* "%z%s%s.\"%w\"" */, libc.VaList(bp, zList, zS, zObj, zCol))
+ zList = Xsqlite3_mprintf(tls, ts+27437 /* "%z%s%s.\"%w\"" */, libc.VaList(bp, zList, zS, zObj, zCol))
} else {
- zList = Xsqlite3_mprintf(tls, ts+26989 /* "%z%sNULL" */, libc.VaList(bp+32, zList, zS))
+ zList = Xsqlite3_mprintf(tls, ts+27449 /* "%z%sNULL" */, libc.VaList(bp+32, zList, zS))
}
- zS = ts + 12871 /* ", " */
+ zS = ts + 13324 /* ", " */
if zList == uintptr(0) {
(*Sqlite3rbu)(unsafe.Pointer(p)).Frc = SQLITE_NOMEM
break
@@ -159647,7 +162280,7 @@ func rbuObjIterGetOldlist(tls *libc.TLS, p uintptr, pIter uintptr, zObj uintptr)
// For a table with implicit rowids, append "old._rowid_" to the list.
if ((*RbuObjIter)(unsafe.Pointer(pIter)).FeType == RBU_PK_EXTERNAL) || ((*RbuObjIter)(unsafe.Pointer(pIter)).FeType == RBU_PK_NONE) {
- zList = rbuMPrintf(tls, p, ts+26998 /* "%z, %s._rowid_" */, libc.VaList(bp+48, zList, zObj))
+ zList = rbuMPrintf(tls, p, ts+27458 /* "%z, %s._rowid_" */, libc.VaList(bp+48, zList, zObj))
}
}
return zList
@@ -159661,33 +162294,33 @@ func rbuObjIterGetOldlist(tls *libc.TLS, p uintptr, pIter uintptr, zObj uintptr)
// Return the string:
//
// "b = ?1 AND c = ?2"
-func rbuObjIterGetWhere(tls *libc.TLS, p uintptr, pIter uintptr) uintptr { /* sqlite3.c:200812:13: */
+func rbuObjIterGetWhere(tls *libc.TLS, p uintptr, pIter uintptr) uintptr { /* sqlite3.c:201896:13: */
bp := tls.Alloc(80)
defer tls.Free(80)
var zList uintptr = uintptr(0)
if ((*RbuObjIter)(unsafe.Pointer(pIter)).FeType == RBU_PK_VTAB) || ((*RbuObjIter)(unsafe.Pointer(pIter)).FeType == RBU_PK_NONE) {
- zList = rbuMPrintf(tls, p, ts+27013 /* "_rowid_ = ?%d" */, libc.VaList(bp, ((*RbuObjIter)(unsafe.Pointer(pIter)).FnTblCol+1)))
+ zList = rbuMPrintf(tls, p, ts+27473 /* "_rowid_ = ?%d" */, libc.VaList(bp, ((*RbuObjIter)(unsafe.Pointer(pIter)).FnTblCol+1)))
} else if (*RbuObjIter)(unsafe.Pointer(pIter)).FeType == RBU_PK_EXTERNAL {
- var zSep uintptr = ts + 703 /* "" */
+ var zSep uintptr = ts + 755 /* "" */
var i int32
for i = 0; i < (*RbuObjIter)(unsafe.Pointer(pIter)).FnTblCol; i++ {
if *(*U8)(unsafe.Pointer((*RbuObjIter)(unsafe.Pointer(pIter)).FabTblPk + uintptr(i))) != 0 {
- zList = rbuMPrintf(tls, p, ts+27027 /* "%z%sc%d=?%d" */, libc.VaList(bp+8, zList, zSep, i, (i+1)))
- zSep = ts + 19393 /* " AND " */
+ zList = rbuMPrintf(tls, p, ts+27487 /* "%z%sc%d=?%d" */, libc.VaList(bp+8, zList, zSep, i, (i+1)))
+ zSep = ts + 19877 /* " AND " */
}
}
zList = rbuMPrintf(tls, p,
- ts+27039 /* "_rowid_ = (SELEC..." */, libc.VaList(bp+40, zList))
+ ts+27499 /* "_rowid_ = (SELEC..." */, libc.VaList(bp+40, zList))
} else {
- var zSep uintptr = ts + 703 /* "" */
+ var zSep uintptr = ts + 755 /* "" */
var i int32
for i = 0; i < (*RbuObjIter)(unsafe.Pointer(pIter)).FnTblCol; i++ {
if *(*U8)(unsafe.Pointer((*RbuObjIter)(unsafe.Pointer(pIter)).FabTblPk + uintptr(i))) != 0 {
var zCol uintptr = *(*uintptr)(unsafe.Pointer((*RbuObjIter)(unsafe.Pointer(pIter)).FazTblCol + uintptr(i)*8))
- zList = rbuMPrintf(tls, p, ts+27089 /* "%z%s\"%w\"=?%d" */, libc.VaList(bp+48, zList, zSep, zCol, (i+1)))
- zSep = ts + 19393 /* " AND " */
+ zList = rbuMPrintf(tls, p, ts+27549 /* "%z%s\"%w\"=?%d" */, libc.VaList(bp+48, zList, zSep, zCol, (i+1)))
+ zSep = ts + 19877 /* " AND " */
}
}
}
@@ -159699,9 +162332,9 @@ func rbuObjIterGetWhere(tls *libc.TLS, p uintptr, pIter uintptr) uintptr { /* sq
// is something wrong with the rbu_control value in the rbu_control value
// stored in the (p->nCol+1)'th column. Set the error code and error message
// of the RBU handle to something reflecting this.
-func rbuBadControlError(tls *libc.TLS, p uintptr) { /* sqlite3.c:200853:13: */
+func rbuBadControlError(tls *libc.TLS, p uintptr) { /* sqlite3.c:201937:13: */
(*Sqlite3rbu)(unsafe.Pointer(p)).Frc = SQLITE_ERROR
- (*Sqlite3rbu)(unsafe.Pointer(p)).FzErrmsg = Xsqlite3_mprintf(tls, ts+27102 /* "invalid rbu_cont..." */, 0)
+ (*Sqlite3rbu)(unsafe.Pointer(p)).FzErrmsg = Xsqlite3_mprintf(tls, ts+27562 /* "invalid rbu_cont..." */, 0)
}
// Return a nul-terminated string containing the comma separated list of
@@ -159719,7 +162352,7 @@ func rbuBadControlError(tls *libc.TLS, p uintptr) { /* sqlite3.c:200853:13: */
// argument and NULL is returned. Or, if an error has already occurred
// when this function is called, NULL is returned immediately, without
// attempting the allocation or modifying the stored error code.
-func rbuObjIterGetSetlist(tls *libc.TLS, p uintptr, pIter uintptr, zMask uintptr) uintptr { /* sqlite3.c:200876:13: */
+func rbuObjIterGetSetlist(tls *libc.TLS, p uintptr, pIter uintptr, zMask uintptr) uintptr { /* sqlite3.c:201960:13: */
bp := tls.Alloc(112)
defer tls.Free(112)
@@ -159730,21 +162363,21 @@ func rbuObjIterGetSetlist(tls *libc.TLS, p uintptr, pIter uintptr, zMask uintptr
if int32(libc.Xstrlen(tls, zMask)) != (*RbuObjIter)(unsafe.Pointer(pIter)).FnTblCol {
rbuBadControlError(tls, p)
} else {
- var zSep uintptr = ts + 703 /* "" */
+ var zSep uintptr = ts + 755 /* "" */
for i = 0; i < (*RbuObjIter)(unsafe.Pointer(pIter)).FnTblCol; i++ {
- var c int8 = *(*int8)(unsafe.Pointer(zMask + uintptr(*(*int32)(unsafe.Pointer((*RbuObjIter)(unsafe.Pointer(pIter)).FaiSrcOrder + uintptr(i)*4)))))
+ var c uint8 = *(*uint8)(unsafe.Pointer(zMask + uintptr(*(*int32)(unsafe.Pointer((*RbuObjIter)(unsafe.Pointer(pIter)).FaiSrcOrder + uintptr(i)*4)))))
if int32(c) == 'x' {
- zList = rbuMPrintf(tls, p, ts+27089, /* "%z%s\"%w\"=?%d" */
+ zList = rbuMPrintf(tls, p, ts+27549, /* "%z%s\"%w\"=?%d" */
libc.VaList(bp, zList, zSep, *(*uintptr)(unsafe.Pointer((*RbuObjIter)(unsafe.Pointer(pIter)).FazTblCol + uintptr(i)*8)), (i+1)))
- zSep = ts + 12871 /* ", " */
+ zSep = ts + 13324 /* ", " */
} else if int32(c) == 'd' {
- zList = rbuMPrintf(tls, p, ts+27128, /* "%z%s\"%w\"=rbu_del..." */
+ zList = rbuMPrintf(tls, p, ts+27588, /* "%z%s\"%w\"=rbu_del..." */
libc.VaList(bp+32, zList, zSep, *(*uintptr)(unsafe.Pointer((*RbuObjIter)(unsafe.Pointer(pIter)).FazTblCol + uintptr(i)*8)), *(*uintptr)(unsafe.Pointer((*RbuObjIter)(unsafe.Pointer(pIter)).FazTblCol + uintptr(i)*8)), (i+1)))
- zSep = ts + 12871 /* ", " */
+ zSep = ts + 13324 /* ", " */
} else if int32(c) == 'f' {
- zList = rbuMPrintf(tls, p, ts+27158, /* "%z%s\"%w\"=rbu_fos..." */
+ zList = rbuMPrintf(tls, p, ts+27618, /* "%z%s\"%w\"=rbu_fos..." */
libc.VaList(bp+72, zList, zSep, *(*uintptr)(unsafe.Pointer((*RbuObjIter)(unsafe.Pointer(pIter)).FazTblCol + uintptr(i)*8)), *(*uintptr)(unsafe.Pointer((*RbuObjIter)(unsafe.Pointer(pIter)).FazTblCol + uintptr(i)*8)), (i+1)))
- zSep = ts + 12871 /* ", " */
+ zSep = ts + 13324 /* ", " */
}
}
}
@@ -159765,7 +162398,7 @@ func rbuObjIterGetSetlist(tls *libc.TLS, p uintptr, pIter uintptr, zMask uintptr
// argument and NULL is returned. Or, if an error has already occurred
// when this function is called, NULL is returned immediately, without
// attempting the allocation or modifying the stored error code.
-func rbuObjIterGetBindlist(tls *libc.TLS, p uintptr, nBind int32) uintptr { /* sqlite3.c:200930:13: */
+func rbuObjIterGetBindlist(tls *libc.TLS, p uintptr, nBind int32) uintptr { /* sqlite3.c:202014:13: */
var zRet uintptr = uintptr(0)
var nByte Sqlite3_int64 = ((int64(2) * Sqlite3_int64(nBind)) + int64(1))
@@ -159773,12 +162406,12 @@ func rbuObjIterGetBindlist(tls *libc.TLS, p uintptr, nBind int32) uintptr { /* s
if zRet != 0 {
var i int32
for i = 0; i < nBind; i++ {
- *(*int8)(unsafe.Pointer(zRet + uintptr((i * 2)))) = int8('?')
- *(*int8)(unsafe.Pointer(zRet + uintptr(((i * 2) + 1)))) = func() int8 {
+ *(*uint8)(unsafe.Pointer(zRet + uintptr((i * 2)))) = uint8('?')
+ *(*uint8)(unsafe.Pointer(zRet + uintptr(((i * 2) + 1)))) = func() uint8 {
if (i + 1) == nBind {
- return int8(0)
+ return uint8(0)
}
- return int8(',')
+ return uint8(',')
}()
}
}
@@ -159795,26 +162428,26 @@ func rbuObjIterGetBindlist(tls *libc.TLS, p uintptr, nBind int32) uintptr { /* s
// this function returns:
//
// PRIMARY KEY("b", "a" DESC)
-func rbuWithoutRowidPK(tls *libc.TLS, p uintptr, pIter uintptr) uintptr { /* sqlite3.c:200957:13: */
+func rbuWithoutRowidPK(tls *libc.TLS, p uintptr, pIter uintptr) uintptr { /* sqlite3.c:202041:13: */
bp := tls.Alloc(72)
defer tls.Free(72)
var z uintptr = uintptr(0)
if (*Sqlite3rbu)(unsafe.Pointer(p)).Frc == SQLITE_OK {
- var zSep uintptr = ts + 27195 /* "PRIMARY KEY(" */
+ var zSep uintptr = ts + 27655 /* "PRIMARY KEY(" */
*(*uintptr)(unsafe.Pointer(bp + 56 /* pXList */)) = uintptr(0) // PRAGMA index_list = (pIter->zTbl)
*(*uintptr)(unsafe.Pointer(bp + 64 /* pXInfo */)) = uintptr(0) // PRAGMA index_xinfo =
(*Sqlite3rbu)(unsafe.Pointer(p)).Frc = prepareFreeAndCollectError(tls, (*Sqlite3rbu)(unsafe.Pointer(p)).FdbMain, bp+56 /* &pXList */, (p + 64 /* &.zErrmsg */),
- Xsqlite3_mprintf(tls, ts+26347 /* "PRAGMA main.inde..." */, libc.VaList(bp, (*RbuObjIter)(unsafe.Pointer(pIter)).FzTbl)))
+ Xsqlite3_mprintf(tls, ts+26807 /* "PRAGMA main.inde..." */, libc.VaList(bp, (*RbuObjIter)(unsafe.Pointer(pIter)).FzTbl)))
for ((*Sqlite3rbu)(unsafe.Pointer(p)).Frc == SQLITE_OK) && (SQLITE_ROW == Xsqlite3_step(tls, *(*uintptr)(unsafe.Pointer(bp + 56 /* pXList */)))) {
var zOrig uintptr = Xsqlite3_column_text(tls, *(*uintptr)(unsafe.Pointer(bp + 56 /* pXList */)), 3)
- if (zOrig != 0) && (libc.Xstrcmp(tls, zOrig, ts+14212 /* "pk" */) == 0) {
+ if (zOrig != 0) && (libc.Xstrcmp(tls, zOrig, ts+14667 /* "pk" */) == 0) {
var zIdx uintptr = Xsqlite3_column_text(tls, *(*uintptr)(unsafe.Pointer(bp + 56 /* pXList */)), 1)
if zIdx != 0 {
(*Sqlite3rbu)(unsafe.Pointer(p)).Frc = prepareFreeAndCollectError(tls, (*Sqlite3rbu)(unsafe.Pointer(p)).FdbMain, bp+64 /* &pXInfo */, (p + 64 /* &.zErrmsg */),
- Xsqlite3_mprintf(tls, ts+26375 /* "PRAGMA main.inde..." */, libc.VaList(bp+8, zIdx)))
+ Xsqlite3_mprintf(tls, ts+26835 /* "PRAGMA main.inde..." */, libc.VaList(bp+8, zIdx)))
}
break
}
@@ -159827,15 +162460,15 @@ func rbuWithoutRowidPK(tls *libc.TLS, p uintptr, pIter uintptr) uintptr { /* sql
var zCol uintptr = Xsqlite3_column_text(tls, *(*uintptr)(unsafe.Pointer(bp + 64 /* pXInfo */)), 2)
var zDesc uintptr
if Xsqlite3_column_int(tls, *(*uintptr)(unsafe.Pointer(bp + 64 /* pXInfo */)), 3) != 0 {
- zDesc = ts + 26615 /* " DESC" */
+ zDesc = ts + 27075 /* " DESC" */
} else {
- zDesc = ts + 703 /* "" */
+ zDesc = ts + 755 /* "" */
}
- z = rbuMPrintf(tls, p, ts+27208 /* "%z%s\"%w\"%s" */, libc.VaList(bp+16, z, zSep, zCol, zDesc))
- zSep = ts + 12871 /* ", " */
+ z = rbuMPrintf(tls, p, ts+27668 /* "%z%s\"%w\"%s" */, libc.VaList(bp+16, z, zSep, zCol, zDesc))
+ zSep = ts + 13324 /* ", " */
}
}
- z = rbuMPrintf(tls, p, ts+27219 /* "%z)" */, libc.VaList(bp+48, z))
+ z = rbuMPrintf(tls, p, ts+27679 /* "%z)" */, libc.VaList(bp+48, z))
rbuFinalize(tls, p, *(*uintptr)(unsafe.Pointer(bp + 64 /* pXInfo */)))
}
return z
@@ -159858,7 +162491,7 @@ func rbuWithoutRowidPK(tls *libc.TLS, p uintptr, pIter uintptr) uintptr { /* sql
//
// CREATE TABLE rbu_imposter2(c1 TEXT, c2 REAL, id INTEGER) WITHOUT ROWID;
//
-func rbuCreateImposterTable2(tls *libc.TLS, p uintptr, pIter uintptr) { /* sqlite3.c:201016:13: */
+func rbuCreateImposterTable2(tls *libc.TLS, p uintptr, pIter uintptr) { /* sqlite3.c:202100:13: */
bp := tls.Alloc(184)
defer tls.Free(184)
@@ -159867,7 +162500,7 @@ func rbuCreateImposterTable2(tls *libc.TLS, p uintptr, pIter uintptr) { /* sqlit
*(*uintptr)(unsafe.Pointer(bp + 168 /* pQuery */)) = uintptr(0) // SELECT name ... WHERE rootpage = $tnum
var zIdx uintptr = uintptr(0) // Name of PK index
*(*uintptr)(unsafe.Pointer(bp + 176 /* pXInfo */)) = uintptr(0) // PRAGMA main.index_xinfo = $zIdx
- var zComma uintptr = ts + 703 /* "" */
+ var zComma uintptr = ts + 755 /* "" */
var zCols uintptr = uintptr(0) // Used to build up list of table cols
var zPk uintptr = uintptr(0) // Used to build up table PK declaration
@@ -159875,7 +162508,7 @@ func rbuCreateImposterTable2(tls *libc.TLS, p uintptr, pIter uintptr) { /* sqlit
// This is needed for the argument to "PRAGMA index_xinfo". Set
// zIdx to point to a nul-terminated string containing this name.
(*Sqlite3rbu)(unsafe.Pointer(p)).Frc = prepareAndCollectError(tls, (*Sqlite3rbu)(unsafe.Pointer(p)).FdbMain, bp+168 /* &pQuery */, (p + 64 /* &.zErrmsg */),
- ts+27223 /* "SELECT name FROM..." */)
+ ts+27683 /* "SELECT name FROM..." */)
if (*Sqlite3rbu)(unsafe.Pointer(p)).Frc == SQLITE_OK {
Xsqlite3_bind_int(tls, *(*uintptr)(unsafe.Pointer(bp + 168 /* pQuery */)), 1, tnum)
if SQLITE_ROW == Xsqlite3_step(tls, *(*uintptr)(unsafe.Pointer(bp + 168 /* pQuery */))) {
@@ -159884,7 +162517,7 @@ func rbuCreateImposterTable2(tls *libc.TLS, p uintptr, pIter uintptr) { /* sqlit
}
if zIdx != 0 {
(*Sqlite3rbu)(unsafe.Pointer(p)).Frc = prepareFreeAndCollectError(tls, (*Sqlite3rbu)(unsafe.Pointer(p)).FdbMain, bp+176 /* &pXInfo */, (p + 64 /* &.zErrmsg */),
- Xsqlite3_mprintf(tls, ts+26375 /* "PRAGMA main.inde..." */, libc.VaList(bp, zIdx)))
+ Xsqlite3_mprintf(tls, ts+26835 /* "PRAGMA main.inde..." */, libc.VaList(bp, zIdx)))
}
rbuFinalize(tls, p, *(*uintptr)(unsafe.Pointer(bp + 168 /* pQuery */)))
@@ -159894,25 +162527,25 @@ func rbuCreateImposterTable2(tls *libc.TLS, p uintptr, pIter uintptr) { /* sqlit
var iCid int32 = Xsqlite3_column_int(tls, *(*uintptr)(unsafe.Pointer(bp + 176 /* pXInfo */)), 1)
var bDesc int32 = Xsqlite3_column_int(tls, *(*uintptr)(unsafe.Pointer(bp + 176 /* pXInfo */)), 3)
var zCollate uintptr = Xsqlite3_column_text(tls, *(*uintptr)(unsafe.Pointer(bp + 176 /* pXInfo */)), 4)
- zCols = rbuMPrintf(tls, p, ts+27273 /* "%z%sc%d %s COLLA..." */, libc.VaList(bp+8, zCols, zComma,
+ zCols = rbuMPrintf(tls, p, ts+27733 /* "%z%sc%d %s COLLA..." */, libc.VaList(bp+8, zCols, zComma,
iCid, *(*uintptr)(unsafe.Pointer((*RbuObjIter)(unsafe.Pointer(pIter)).FazTblType + uintptr(iCid)*8)), zCollate))
- zPk = rbuMPrintf(tls, p, ts+27295 /* "%z%sc%d%s" */, libc.VaList(bp+48, zPk, zComma, iCid, func() uintptr {
+ zPk = rbuMPrintf(tls, p, ts+27755 /* "%z%sc%d%s" */, libc.VaList(bp+48, zPk, zComma, iCid, func() uintptr {
if bDesc != 0 {
- return ts + 26615 /* " DESC" */
+ return ts + 27075 /* " DESC" */
}
- return ts + 703 /* "" */
+ return ts + 755 /* "" */
}()))
- zComma = ts + 12871 /* ", " */
+ zComma = ts + 13324 /* ", " */
}
}
- zCols = rbuMPrintf(tls, p, ts+27305 /* "%z, id INTEGER" */, libc.VaList(bp+80, zCols))
+ zCols = rbuMPrintf(tls, p, ts+27765 /* "%z, id INTEGER" */, libc.VaList(bp+80, zCols))
rbuFinalize(tls, p, *(*uintptr)(unsafe.Pointer(bp + 176 /* pXInfo */)))
- Xsqlite3_test_control(tls, SQLITE_TESTCTRL_IMPOSTER, libc.VaList(bp+88, (*Sqlite3rbu)(unsafe.Pointer(p)).FdbMain, ts+5327 /* "main" */, 1, tnum))
+ Xsqlite3_test_control(tls, SQLITE_TESTCTRL_IMPOSTER, libc.VaList(bp+88, (*Sqlite3rbu)(unsafe.Pointer(p)).FdbMain, ts+5458 /* "main" */, 1, tnum))
rbuMPrintfExec(tls, p, (*Sqlite3rbu)(unsafe.Pointer(p)).FdbMain,
- ts+27320, /* "CREATE TABLE rbu..." */
+ ts+27780, /* "CREATE TABLE rbu..." */
libc.VaList(bp+120, zCols, zPk))
- Xsqlite3_test_control(tls, SQLITE_TESTCTRL_IMPOSTER, libc.VaList(bp+136, (*Sqlite3rbu)(unsafe.Pointer(p)).FdbMain, ts+5327 /* "main" */, 0, 0))
+ Xsqlite3_test_control(tls, SQLITE_TESTCTRL_IMPOSTER, libc.VaList(bp+136, (*Sqlite3rbu)(unsafe.Pointer(p)).FdbMain, ts+5458 /* "main" */, 0, 0))
}
}
@@ -159934,58 +162567,58 @@ func rbuCreateImposterTable2(tls *libc.TLS, p uintptr, pIter uintptr) { /* sqlit
// More precisely, the "same schema" means the same columns, types,
// collation sequences. For tables that do not have an external PRIMARY
// KEY, it also means the same PRIMARY KEY declaration.
-func rbuCreateImposterTable(tls *libc.TLS, p uintptr, pIter uintptr) { /* sqlite3.c:201090:13: */
+func rbuCreateImposterTable(tls *libc.TLS, p uintptr, pIter uintptr) { /* sqlite3.c:202174:13: */
bp := tls.Alloc(200)
defer tls.Free(200)
if ((*Sqlite3rbu)(unsafe.Pointer(p)).Frc == SQLITE_OK) && ((*RbuObjIter)(unsafe.Pointer(pIter)).FeType != RBU_PK_VTAB) {
var tnum int32 = (*RbuObjIter)(unsafe.Pointer(pIter)).FiTnum
- var zComma uintptr = ts + 703 /* "" */
+ var zComma uintptr = ts + 755 /* "" */
var zSql uintptr = uintptr(0)
var iCol int32
- Xsqlite3_test_control(tls, SQLITE_TESTCTRL_IMPOSTER, libc.VaList(bp, (*Sqlite3rbu)(unsafe.Pointer(p)).FdbMain, ts+5327 /* "main" */, 0, 1))
+ Xsqlite3_test_control(tls, SQLITE_TESTCTRL_IMPOSTER, libc.VaList(bp, (*Sqlite3rbu)(unsafe.Pointer(p)).FdbMain, ts+5458 /* "main" */, 0, 1))
for iCol = 0; ((*Sqlite3rbu)(unsafe.Pointer(p)).Frc == SQLITE_OK) && (iCol < (*RbuObjIter)(unsafe.Pointer(pIter)).FnTblCol); iCol++ {
- var zPk uintptr = ts + 703 /* "" */
+ var zPk uintptr = ts + 755 /* "" */
var zCol uintptr = *(*uintptr)(unsafe.Pointer((*RbuObjIter)(unsafe.Pointer(pIter)).FazTblCol + uintptr(iCol)*8))
*(*uintptr)(unsafe.Pointer(bp + 192 /* zColl */)) = uintptr(0)
(*Sqlite3rbu)(unsafe.Pointer(p)).Frc = Xsqlite3_table_column_metadata(tls,
- (*Sqlite3rbu)(unsafe.Pointer(p)).FdbMain, ts+5327 /* "main" */, (*RbuObjIter)(unsafe.Pointer(pIter)).FzTbl, zCol, uintptr(0), bp+192 /* &zColl */, uintptr(0), uintptr(0), uintptr(0))
+ (*Sqlite3rbu)(unsafe.Pointer(p)).FdbMain, ts+5458 /* "main" */, (*RbuObjIter)(unsafe.Pointer(pIter)).FzTbl, zCol, uintptr(0), bp+192 /* &zColl */, uintptr(0), uintptr(0), uintptr(0))
if ((*RbuObjIter)(unsafe.Pointer(pIter)).FeType == RBU_PK_IPK) && (*(*U8)(unsafe.Pointer((*RbuObjIter)(unsafe.Pointer(pIter)).FabTblPk + uintptr(iCol))) != 0) {
// If the target table column is an "INTEGER PRIMARY KEY", add
// "PRIMARY KEY" to the imposter table column declaration.
- zPk = ts + 27382 /* "PRIMARY KEY " */
+ zPk = ts + 27842 /* "PRIMARY KEY " */
}
- zSql = rbuMPrintf(tls, p, ts+27395, /* "%z%s\"%w\" %s %sCO..." */
+ zSql = rbuMPrintf(tls, p, ts+27855, /* "%z%s\"%w\" %s %sCO..." */
libc.VaList(bp+32, zSql, zComma, zCol, *(*uintptr)(unsafe.Pointer((*RbuObjIter)(unsafe.Pointer(pIter)).FazTblType + uintptr(iCol)*8)), zPk, *(*uintptr)(unsafe.Pointer(bp + 192 /* zColl */)),
func() uintptr {
if *(*U8)(unsafe.Pointer((*RbuObjIter)(unsafe.Pointer(pIter)).FabNotNull + uintptr(iCol))) != 0 {
- return ts + 27422 /* " NOT NULL" */
+ return ts + 27882 /* " NOT NULL" */
}
- return ts + 703 /* "" */
+ return ts + 755 /* "" */
}()))
- zComma = ts + 12871 /* ", " */
+ zComma = ts + 13324 /* ", " */
}
if (*RbuObjIter)(unsafe.Pointer(pIter)).FeType == RBU_PK_WITHOUT_ROWID {
var zPk uintptr = rbuWithoutRowidPK(tls, p, pIter)
if zPk != 0 {
- zSql = rbuMPrintf(tls, p, ts+27432 /* "%z, %z" */, libc.VaList(bp+88, zSql, zPk))
+ zSql = rbuMPrintf(tls, p, ts+27892 /* "%z, %z" */, libc.VaList(bp+88, zSql, zPk))
}
}
- Xsqlite3_test_control(tls, SQLITE_TESTCTRL_IMPOSTER, libc.VaList(bp+104, (*Sqlite3rbu)(unsafe.Pointer(p)).FdbMain, ts+5327 /* "main" */, 1, tnum))
- rbuMPrintfExec(tls, p, (*Sqlite3rbu)(unsafe.Pointer(p)).FdbMain, ts+27439, /* "CREATE TABLE \"rb..." */
+ Xsqlite3_test_control(tls, SQLITE_TESTCTRL_IMPOSTER, libc.VaList(bp+104, (*Sqlite3rbu)(unsafe.Pointer(p)).FdbMain, ts+5458 /* "main" */, 1, tnum))
+ rbuMPrintfExec(tls, p, (*Sqlite3rbu)(unsafe.Pointer(p)).FdbMain, ts+27899, /* "CREATE TABLE \"rb..." */
libc.VaList(bp+136, (*RbuObjIter)(unsafe.Pointer(pIter)).FzTbl, zSql,
func() uintptr {
if (*RbuObjIter)(unsafe.Pointer(pIter)).FeType == RBU_PK_WITHOUT_ROWID {
- return ts + 27471 /* " WITHOUT ROWID" */
+ return ts + 27931 /* " WITHOUT ROWID" */
}
- return ts + 703 /* "" */
+ return ts + 755 /* "" */
}()))
- Xsqlite3_test_control(tls, SQLITE_TESTCTRL_IMPOSTER, libc.VaList(bp+160, (*Sqlite3rbu)(unsafe.Pointer(p)).FdbMain, ts+5327 /* "main" */, 0, 0))
+ Xsqlite3_test_control(tls, SQLITE_TESTCTRL_IMPOSTER, libc.VaList(bp+160, (*Sqlite3rbu)(unsafe.Pointer(p)).FdbMain, ts+5458 /* "main" */, 0, 0))
}
}
@@ -159998,7 +162631,7 @@ func rbuCreateImposterTable(tls *libc.TLS, p uintptr, pIter uintptr) { /* sqlite
// the target table, plus one (for the rbu_control column), plus one more
// (for the rbu_rowid column) if the target table is an implicit IPK or
// virtual table.
-func rbuObjIterPrepareTmpInsert(tls *libc.TLS, p uintptr, pIter uintptr, zCollist uintptr, zRbuRowid uintptr) { /* sqlite3.c:201146:13: */
+func rbuObjIterPrepareTmpInsert(tls *libc.TLS, p uintptr, pIter uintptr, zCollist uintptr, zRbuRowid uintptr) { /* sqlite3.c:202230:13: */
bp := tls.Alloc(40)
defer tls.Free(40)
@@ -160008,12 +162641,12 @@ func rbuObjIterPrepareTmpInsert(tls *libc.TLS, p uintptr, pIter uintptr, zCollis
(*Sqlite3rbu)(unsafe.Pointer(p)).Frc = prepareFreeAndCollectError(tls,
(*Sqlite3rbu)(unsafe.Pointer(p)).FdbRbu, (pIter + 152 /* &.pTmpInsert */), (p + 64 /* &.zErrmsg */), Xsqlite3_mprintf(tls,
- ts+27486, /* "INSERT INTO %s.'..." */
+ ts+27946, /* "INSERT INTO %s.'..." */
libc.VaList(bp, p+48 /* &.zStateDb */, (*RbuObjIter)(unsafe.Pointer(pIter)).FzDataTbl, zCollist, zRbuRowid, zBind)))
}
}
-func rbuTmpInsertFunc(tls *libc.TLS, pCtx uintptr, nVal int32, apVal uintptr) { /* sqlite3.c:201164:13: */
+func rbuTmpInsertFunc(tls *libc.TLS, pCtx uintptr, nVal int32, apVal uintptr) { /* sqlite3.c:202248:13: */
var p uintptr = Xsqlite3_user_data(tls, pCtx)
var rc int32 = SQLITE_OK
var i int32
@@ -160035,7 +162668,7 @@ func rbuTmpInsertFunc(tls *libc.TLS, pCtx uintptr, nVal int32, apVal uintptr) {
}
}
-func rbuObjIterGetIndexWhere(tls *libc.TLS, p uintptr, pIter uintptr) uintptr { /* sqlite3.c:201194:13: */
+func rbuObjIterGetIndexWhere(tls *libc.TLS, p uintptr, pIter uintptr) uintptr { /* sqlite3.c:202278:13: */
bp := tls.Alloc(12)
defer tls.Free(12)
@@ -160045,7 +162678,7 @@ func rbuObjIterGetIndexWhere(tls *libc.TLS, p uintptr, pIter uintptr) uintptr {
if *(*int32)(unsafe.Pointer(bp + 8 /* rc */)) == SQLITE_OK {
*(*int32)(unsafe.Pointer(bp + 8 /* rc */)) = prepareAndCollectError(tls, (*Sqlite3rbu)(unsafe.Pointer(p)).FdbMain, bp /* &pStmt */, (p + 64 /* &.zErrmsg */),
- ts+27543 /* "SELECT trim(sql)..." */)
+ ts+28003 /* "SELECT trim(sql)..." */)
}
if *(*int32)(unsafe.Pointer(bp + 8 /* rc */)) == SQLITE_OK {
var rc2 int32
@@ -160060,8 +162693,8 @@ func rbuObjIterGetIndexWhere(tls *libc.TLS, p uintptr, pIter uintptr) uintptr {
var i int32
var iIdxCol int32 = 0
var nIdxAlloc int32 = 0
- for i = 0; *(*int8)(unsafe.Pointer(zSql + uintptr(i))) != 0; i++ {
- var c int8 = *(*int8)(unsafe.Pointer(zSql + uintptr(i)))
+ for i = 0; *(*uint8)(unsafe.Pointer(zSql + uintptr(i))) != 0; i++ {
+ var c uint8 = *(*uint8)(unsafe.Pointer(zSql + uintptr(i)))
// If necessary, grow the pIter->aIdxCol[] array
if iIdxCol == nIdxAlloc {
@@ -160095,8 +162728,8 @@ func rbuObjIterGetIndexWhere(tls *libc.TLS, p uintptr, pIter uintptr) uintptr {
(*RbuSpan)(unsafe.Pointer((*RbuObjIter)(unsafe.Pointer(pIter)).FaIdxCol + uintptr(iIdxCol)*16)).FzSpan = (zSql + uintptr((i + 1)))
} else if ((int32(c) == '"') || (int32(c) == '\'')) || (int32(c) == '`') {
for i++; 1 != 0; i++ {
- if int32(*(*int8)(unsafe.Pointer(zSql + uintptr(i)))) == int32(c) {
- if int32(*(*int8)(unsafe.Pointer(zSql + uintptr((i + 1))))) != int32(c) {
+ if int32(*(*uint8)(unsafe.Pointer(zSql + uintptr(i)))) == int32(c) {
+ if int32(*(*uint8)(unsafe.Pointer(zSql + uintptr((i + 1))))) != int32(c) {
break
}
i++
@@ -160104,26 +162737,26 @@ func rbuObjIterGetIndexWhere(tls *libc.TLS, p uintptr, pIter uintptr) uintptr {
}
} else if int32(c) == '[' {
for i++; 1 != 0; i++ {
- if int32(*(*int8)(unsafe.Pointer(zSql + uintptr(i)))) == ']' {
+ if int32(*(*uint8)(unsafe.Pointer(zSql + uintptr(i)))) == ']' {
break
}
}
- } else if (int32(c) == '-') && (int32(*(*int8)(unsafe.Pointer(zSql + uintptr((i + 1))))) == '-') {
- for i = (i + 2); (*(*int8)(unsafe.Pointer(zSql + uintptr(i))) != 0) && (int32(*(*int8)(unsafe.Pointer(zSql + uintptr(i)))) != '\n'); i++ {
+ } else if (int32(c) == '-') && (int32(*(*uint8)(unsafe.Pointer(zSql + uintptr((i + 1))))) == '-') {
+ for i = (i + 2); (*(*uint8)(unsafe.Pointer(zSql + uintptr(i))) != 0) && (int32(*(*uint8)(unsafe.Pointer(zSql + uintptr(i)))) != '\n'); i++ {
}
- if int32(*(*int8)(unsafe.Pointer(zSql + uintptr(i)))) == 0 {
+ if int32(*(*uint8)(unsafe.Pointer(zSql + uintptr(i)))) == 0 {
break
}
- } else if (int32(c) == '/') && (int32(*(*int8)(unsafe.Pointer(zSql + uintptr((i + 1))))) == '*') {
- for i = (i + 2); (*(*int8)(unsafe.Pointer(zSql + uintptr(i))) != 0) && ((int32(*(*int8)(unsafe.Pointer(zSql + uintptr(i)))) != '*') || (int32(*(*int8)(unsafe.Pointer(zSql + uintptr((i + 1))))) != '/')); i++ {
+ } else if (int32(c) == '/') && (int32(*(*uint8)(unsafe.Pointer(zSql + uintptr((i + 1))))) == '*') {
+ for i = (i + 2); (*(*uint8)(unsafe.Pointer(zSql + uintptr(i))) != 0) && ((int32(*(*uint8)(unsafe.Pointer(zSql + uintptr(i)))) != '*') || (int32(*(*uint8)(unsafe.Pointer(zSql + uintptr((i + 1))))) != '/')); i++ {
}
- if int32(*(*int8)(unsafe.Pointer(zSql + uintptr(i)))) == 0 {
+ if int32(*(*uint8)(unsafe.Pointer(zSql + uintptr(i)))) == 0 {
break
}
i++
}
}
- if *(*int8)(unsafe.Pointer(zSql + uintptr(i))) != 0 {
+ if *(*uint8)(unsafe.Pointer(zSql + uintptr(i))) != 0 {
zRet = rbuStrndup(tls, (zSql + uintptr(i)), bp+8 /* &rc */)
}
(*RbuObjIter)(unsafe.Pointer(pIter)).FnIdxCol = iIdxCol
@@ -160143,7 +162776,7 @@ func rbuObjIterGetIndexWhere(tls *libc.TLS, p uintptr, pIter uintptr) uintptr {
// Ensure that the SQLite statement handles required to update the
// target database object currently indicated by the iterator passed
// as the second argument are available.
-func rbuObjIterPrepareAll(tls *libc.TLS, p uintptr, pIter uintptr, nOffset int32) int32 { /* sqlite3.c:201294:12: */
+func rbuObjIterPrepareAll(tls *libc.TLS, p uintptr, pIter uintptr, nOffset int32) int32 { /* sqlite3.c:202378:12: */
bp := tls.Alloc(628)
defer tls.Free(628)
@@ -160155,7 +162788,7 @@ func rbuObjIterPrepareAll(tls *libc.TLS, p uintptr, pIter uintptr, nOffset int32
var zLimit uintptr = uintptr(0)
if nOffset != 0 {
- zLimit = Xsqlite3_mprintf(tls, ts+27609 /* " LIMIT -1 OFFSET..." */, libc.VaList(bp, nOffset))
+ zLimit = Xsqlite3_mprintf(tls, ts+28069 /* " LIMIT -1 OFFSET..." */, libc.VaList(bp, nOffset))
if !(zLimit != 0) {
(*Sqlite3rbu)(unsafe.Pointer(p)).Frc = SQLITE_NOMEM
}
@@ -160176,26 +162809,26 @@ func rbuObjIterPrepareAll(tls *libc.TLS, p uintptr, pIter uintptr, nOffset int32
zBind = rbuObjIterGetBindlist(tls, p, *(*int32)(unsafe.Pointer(bp + 624 /* nBind */)))
// Create the imposter table used to write to this index.
- Xsqlite3_test_control(tls, SQLITE_TESTCTRL_IMPOSTER, libc.VaList(bp+8, (*Sqlite3rbu)(unsafe.Pointer(p)).FdbMain, ts+5327 /* "main" */, 0, 1))
- Xsqlite3_test_control(tls, SQLITE_TESTCTRL_IMPOSTER, libc.VaList(bp+40, (*Sqlite3rbu)(unsafe.Pointer(p)).FdbMain, ts+5327 /* "main" */, 1, tnum))
+ Xsqlite3_test_control(tls, SQLITE_TESTCTRL_IMPOSTER, libc.VaList(bp+8, (*Sqlite3rbu)(unsafe.Pointer(p)).FdbMain, ts+5458 /* "main" */, 0, 1))
+ Xsqlite3_test_control(tls, SQLITE_TESTCTRL_IMPOSTER, libc.VaList(bp+40, (*Sqlite3rbu)(unsafe.Pointer(p)).FdbMain, ts+5458 /* "main" */, 1, tnum))
rbuMPrintfExec(tls, p, (*Sqlite3rbu)(unsafe.Pointer(p)).FdbMain,
- ts+27629, /* "CREATE TABLE \"rb..." */
+ ts+28089, /* "CREATE TABLE \"rb..." */
libc.VaList(bp+72, zTbl, *(*uintptr)(unsafe.Pointer(bp + 600 /* zImposterCols */)), *(*uintptr)(unsafe.Pointer(bp + 608 /* zImposterPK */))))
- Xsqlite3_test_control(tls, SQLITE_TESTCTRL_IMPOSTER, libc.VaList(bp+96, (*Sqlite3rbu)(unsafe.Pointer(p)).FdbMain, ts+5327 /* "main" */, 0, 0))
+ Xsqlite3_test_control(tls, SQLITE_TESTCTRL_IMPOSTER, libc.VaList(bp+96, (*Sqlite3rbu)(unsafe.Pointer(p)).FdbMain, ts+5458 /* "main" */, 0, 0))
// Create the statement to insert index entries
(*RbuObjIter)(unsafe.Pointer(pIter)).FnCol = *(*int32)(unsafe.Pointer(bp + 624 /* nBind */))
if (*Sqlite3rbu)(unsafe.Pointer(p)).Frc == SQLITE_OK {
(*Sqlite3rbu)(unsafe.Pointer(p)).Frc = prepareFreeAndCollectError(tls,
(*Sqlite3rbu)(unsafe.Pointer(p)).FdbMain, (pIter + 136 /* &.pInsert */), (p + 64 /* &.zErrmsg */),
- Xsqlite3_mprintf(tls, ts+27694 /* "INSERT INTO \"rbu..." */, libc.VaList(bp+128, zTbl, zBind)))
+ Xsqlite3_mprintf(tls, ts+28154 /* "INSERT INTO \"rbu..." */, libc.VaList(bp+128, zTbl, zBind)))
}
// And to delete index entries
if ((libc.Bool32((*Sqlite3rbu)(unsafe.Pointer((p))).FzTarget == uintptr(0))) == 0) && ((*Sqlite3rbu)(unsafe.Pointer(p)).Frc == SQLITE_OK) {
(*Sqlite3rbu)(unsafe.Pointer(p)).Frc = prepareFreeAndCollectError(tls,
(*Sqlite3rbu)(unsafe.Pointer(p)).FdbMain, (pIter + 144 /* &.pDelete */), (p + 64 /* &.zErrmsg */),
- Xsqlite3_mprintf(tls, ts+27730 /* "DELETE FROM \"rbu..." */, libc.VaList(bp+144, zTbl, *(*uintptr)(unsafe.Pointer(bp + 616 /* zWhere */)))))
+ Xsqlite3_mprintf(tls, ts+28190 /* "DELETE FROM \"rbu..." */, libc.VaList(bp+144, zTbl, *(*uintptr)(unsafe.Pointer(bp + 616 /* zWhere */)))))
}
// Create the SELECT statement to read keys in sorted order
@@ -160212,7 +162845,7 @@ func rbuObjIterPrepareAll(tls *libc.TLS, p uintptr, pIter uintptr, nOffset int32
}
zSql = Xsqlite3_mprintf(tls,
- ts+27764, /* "SELECT %s, 0 AS ..." */
+ ts+28224, /* "SELECT %s, 0 AS ..." */
libc.VaList(bp+160, zCollist,
(*RbuObjIter)(unsafe.Pointer(pIter)).FzDataTbl,
zPart,
@@ -160220,32 +162853,32 @@ func rbuObjIterPrepareAll(tls *libc.TLS, p uintptr, pIter uintptr, nOffset int32
if zStart != 0 {
return func() uintptr {
if zPart != 0 {
- return ts + 27825 /* "AND" */
+ return ts + 28285 /* "AND" */
}
- return ts + 27829 /* "WHERE" */
+ return ts + 28289 /* "WHERE" */
}()
}
- return ts + 703 /* "" */
+ return ts + 755 /* "" */
}(), zStart,
zCollist, zLimit))
Xsqlite3_free(tls, zStart)
} else if ((*RbuObjIter)(unsafe.Pointer(pIter)).FeType == RBU_PK_EXTERNAL) || ((*RbuObjIter)(unsafe.Pointer(pIter)).FeType == RBU_PK_NONE) {
zSql = Xsqlite3_mprintf(tls,
- ts+27835, /* "SELECT %s, rbu_c..." */
+ ts+28295, /* "SELECT %s, rbu_c..." */
libc.VaList(bp+216, zCollist, p+48 /* &.zStateDb */, (*RbuObjIter)(unsafe.Pointer(pIter)).FzDataTbl,
zPart, zCollist, zLimit))
} else {
zSql = Xsqlite3_mprintf(tls,
- ts+27896, /* "SELECT %s, rbu_c..." */
+ ts+28356, /* "SELECT %s, rbu_c..." */
libc.VaList(bp+264, zCollist, p+48 /* &.zStateDb */, (*RbuObjIter)(unsafe.Pointer(pIter)).FzDataTbl, zPart,
zCollist, (*RbuObjIter)(unsafe.Pointer(pIter)).FzDataTbl,
zPart,
func() uintptr {
if zPart != 0 {
- return ts + 27825 /* "AND" */
+ return ts + 28285 /* "AND" */
}
- return ts + 27829 /* "WHERE" */
+ return ts + 28289 /* "WHERE" */
}(),
zCollist, zLimit))
}
@@ -160270,8 +162903,8 @@ func rbuObjIterPrepareAll(tls *libc.TLS, p uintptr, pIter uintptr, nOffset int32
var zBindings uintptr = rbuObjIterGetBindlist(tls, p, ((*RbuObjIter)(unsafe.Pointer(pIter)).FnTblCol + bRbuRowid))
var zWhere uintptr = rbuObjIterGetWhere(tls, p, pIter)
- var zOldlist uintptr = rbuObjIterGetOldlist(tls, p, pIter, ts+5336 /* "old" */)
- var zNewlist uintptr = rbuObjIterGetOldlist(tls, p, pIter, ts+5332 /* "new" */)
+ var zOldlist uintptr = rbuObjIterGetOldlist(tls, p, pIter, ts+5467 /* "old" */)
+ var zNewlist uintptr = rbuObjIterGetOldlist(tls, p, pIter, ts+5463 /* "new" */)
zCollist = rbuObjIterGetCollist(tls, p, pIter)
(*RbuObjIter)(unsafe.Pointer(pIter)).FnCol = (*RbuObjIter)(unsafe.Pointer(pIter)).FnTblCol
@@ -160281,21 +162914,21 @@ func rbuObjIterPrepareAll(tls *libc.TLS, p uintptr, pIter uintptr, nOffset int32
rbuCreateImposterTable2(tls, p, pIter)
zWrite = func() uintptr {
if (*RbuObjIter)(unsafe.Pointer(pIter)).FeType == RBU_PK_VTAB {
- return ts + 703 /* "" */
+ return ts + 755 /* "" */
}
- return ts + 28055 /* "rbu_imp_" */
+ return ts + 28515 /* "rbu_imp_" */
}()
// Create the INSERT statement to write to the target PK b-tree
if (*Sqlite3rbu)(unsafe.Pointer(p)).Frc == SQLITE_OK {
(*Sqlite3rbu)(unsafe.Pointer(p)).Frc = prepareFreeAndCollectError(tls, (*Sqlite3rbu)(unsafe.Pointer(p)).FdbMain, (pIter + 136 /* &.pInsert */), pz,
Xsqlite3_mprintf(tls,
- ts+28064, /* "INSERT INTO \"%s%..." */
+ ts+28524, /* "INSERT INTO \"%s%..." */
libc.VaList(bp+344, zWrite, zTbl, zCollist, func() uintptr {
if bRbuRowid != 0 {
- return ts + 28100 /* ", _rowid_" */
+ return ts + 28560 /* ", _rowid_" */
}
- return ts + 703 /* "" */
+ return ts + 755 /* "" */
}(), zBindings)))
}
@@ -160305,28 +162938,28 @@ func rbuObjIterPrepareAll(tls *libc.TLS, p uintptr, pIter uintptr, nOffset int32
if ((libc.Bool32((*Sqlite3rbu)(unsafe.Pointer((p))).FzTarget == uintptr(0))) == 0) && ((*Sqlite3rbu)(unsafe.Pointer(p)).Frc == SQLITE_OK) {
(*Sqlite3rbu)(unsafe.Pointer(p)).Frc = prepareFreeAndCollectError(tls, (*Sqlite3rbu)(unsafe.Pointer(p)).FdbMain, (pIter + 144 /* &.pDelete */), pz,
Xsqlite3_mprintf(tls,
- ts+28110 /* "DELETE FROM \"%s%..." */, libc.VaList(bp+384, zWrite, zTbl, zWhere)))
+ ts+28570 /* "DELETE FROM \"%s%..." */, libc.VaList(bp+384, zWrite, zTbl, zWhere)))
}
if ((libc.Bool32((*Sqlite3rbu)(unsafe.Pointer((p))).FzTarget == uintptr(0))) == 0) && ((*RbuObjIter)(unsafe.Pointer(pIter)).FabIndexed != 0) {
- var zRbuRowid uintptr = ts + 703 /* "" */
+ var zRbuRowid uintptr = ts + 755 /* "" */
if ((*RbuObjIter)(unsafe.Pointer(pIter)).FeType == RBU_PK_EXTERNAL) || ((*RbuObjIter)(unsafe.Pointer(pIter)).FeType == RBU_PK_NONE) {
- zRbuRowid = ts + 28138 /* ", rbu_rowid" */
+ zRbuRowid = ts + 28598 /* ", rbu_rowid" */
}
// Create the rbu_tmp_xxx table and the triggers to populate it.
rbuMPrintfExec(tls, p, (*Sqlite3rbu)(unsafe.Pointer(p)).FdbRbu,
- ts+28150 /* "CREATE TABLE IF ..." */, libc.VaList(bp+408, p+48 /* &.zStateDb */, (*RbuObjIter)(unsafe.Pointer(pIter)).FzDataTbl, func() uintptr {
+ ts+28610 /* "CREATE TABLE IF ..." */, libc.VaList(bp+408, p+48 /* &.zStateDb */, (*RbuObjIter)(unsafe.Pointer(pIter)).FzDataTbl, func() uintptr {
if (*RbuObjIter)(unsafe.Pointer(pIter)).FeType == RBU_PK_EXTERNAL {
- return ts + 28226 /* ", 0 AS rbu_rowid" */
+ return ts + 28686 /* ", 0 AS rbu_rowid" */
}
- return ts + 703 /* "" */
+ return ts + 755 /* "" */
}(), (*RbuObjIter)(unsafe.Pointer(pIter)).FzDataTbl))
rbuMPrintfExec(tls, p, (*Sqlite3rbu)(unsafe.Pointer(p)).FdbMain,
- ts+28243, /* "CREATE TEMP TRIG..." */
+ ts+28703, /* "CREATE TEMP TRIG..." */
libc.VaList(bp+440, zWrite, zTbl, zOldlist,
zWrite, zTbl, zOldlist,
zWrite, zTbl, zNewlist))
@@ -160334,7 +162967,7 @@ func rbuObjIterPrepareAll(tls *libc.TLS, p uintptr, pIter uintptr, nOffset int32
if ((*RbuObjIter)(unsafe.Pointer(pIter)).FeType == RBU_PK_EXTERNAL) || ((*RbuObjIter)(unsafe.Pointer(pIter)).FeType == RBU_PK_NONE) {
rbuMPrintfExec(tls, p, (*Sqlite3rbu)(unsafe.Pointer(p)).FdbMain,
- ts+28542, /* "CREATE TEMP TRIG..." */
+ ts+29002, /* "CREATE TEMP TRIG..." */
libc.VaList(bp+512, zWrite, zTbl, zNewlist))
}
@@ -160343,14 +162976,14 @@ func rbuObjIterPrepareAll(tls *libc.TLS, p uintptr, pIter uintptr, nOffset int32
// Create the SELECT statement to read keys from data_xxx
if (*Sqlite3rbu)(unsafe.Pointer(p)).Frc == SQLITE_OK {
- var zRbuRowid uintptr = ts + 703 /* "" */
+ var zRbuRowid uintptr = ts + 755 /* "" */
var zStart uintptr = uintptr(0)
var zOrder uintptr = uintptr(0)
if bRbuRowid != 0 {
if (*Sqlite3rbu)(unsafe.Pointer((p))).FzTarget == uintptr(0) {
- zRbuRowid = ts + 28641 /* ",_rowid_ " */
+ zRbuRowid = ts + 29101 /* ",_rowid_ " */
} else {
- zRbuRowid = ts + 28651 /* ",rbu_rowid" */
+ zRbuRowid = ts + 29111 /* ",rbu_rowid" */
}
}
@@ -160363,35 +162996,35 @@ func rbuObjIterPrepareAll(tls *libc.TLS, p uintptr, pIter uintptr, nOffset int32
}
}
if bRbuRowid != 0 {
- zOrder = rbuMPrintf(tls, p, ts+26698 /* "_rowid_" */, 0)
+ zOrder = rbuMPrintf(tls, p, ts+27158 /* "_rowid_" */, 0)
} else {
- zOrder = rbuObjIterGetPkList(tls, p, pIter, ts+703 /* "" */, ts+12871 /* ", " */, ts+703 /* "" */)
+ zOrder = rbuObjIterGetPkList(tls, p, pIter, ts+755 /* "" */, ts+13324 /* ", " */, ts+755 /* "" */)
}
}
if (*Sqlite3rbu)(unsafe.Pointer(p)).Frc == SQLITE_OK {
(*Sqlite3rbu)(unsafe.Pointer(p)).Frc = prepareFreeAndCollectError(tls, (*Sqlite3rbu)(unsafe.Pointer(p)).FdbRbu, (pIter + 128 /* &.pSelect */), pz,
Xsqlite3_mprintf(tls,
- ts+28662, /* "SELECT %s,%s rbu..." */
+ ts+29122, /* "SELECT %s,%s rbu..." */
libc.VaList(bp+536, zCollist,
func() uintptr {
if (*Sqlite3rbu)(unsafe.Pointer((p))).FzTarget == uintptr(0) {
- return ts + 28710 /* "0 AS " */
+ return ts + 29170 /* "0 AS " */
}
- return ts + 703 /* "" */
+ return ts + 755 /* "" */
}(),
zRbuRowid,
(*RbuObjIter)(unsafe.Pointer(pIter)).FzDataTbl, func() uintptr {
if zStart != 0 {
return zStart
}
- return ts + 703 /* "" */
+ return ts + 755 /* "" */
}(),
func() uintptr {
if zOrder != 0 {
- return ts + 17727 /* "ORDER BY" */
+ return ts + 18211 /* "ORDER BY" */
}
- return ts + 703 /* "" */
+ return ts + 755 /* "" */
}(), zOrder,
zLimit)))
}
@@ -160418,7 +163051,7 @@ func rbuObjIterPrepareAll(tls *libc.TLS, p uintptr, pIter uintptr, nOffset int32
//
// If the zMask string does not specify any columns to update, then this
// is not an error. Output variable *ppStmt is set to NULL in this case.
-func rbuGetUpdateStmt(tls *libc.TLS, p uintptr, pIter uintptr, zMask uintptr, ppStmt uintptr) int32 { /* sqlite3.c:201561:12: */
+func rbuGetUpdateStmt(tls *libc.TLS, p uintptr, pIter uintptr, zMask uintptr, ppStmt uintptr) int32 { /* sqlite3.c:202645:12: */
bp := tls.Alloc(32)
defer tls.Free(32)
@@ -160466,12 +163099,12 @@ func rbuGetUpdateStmt(tls *libc.TLS, p uintptr, pIter uintptr, zMask uintptr, pp
(*RbuObjIter)(unsafe.Pointer(pIter)).FpRbuUpdate = pUp
if zSet != 0 {
- var zPrefix uintptr = ts + 703 /* "" */
+ var zPrefix uintptr = ts + 755 /* "" */
if (*RbuObjIter)(unsafe.Pointer(pIter)).FeType != RBU_PK_VTAB {
- zPrefix = ts + 28055 /* "rbu_imp_" */
+ zPrefix = ts + 28515 /* "rbu_imp_" */
}
- zUpdate = Xsqlite3_mprintf(tls, ts+28716, /* "UPDATE \"%s%w\" SE..." */
+ zUpdate = Xsqlite3_mprintf(tls, ts+29176, /* "UPDATE \"%s%w\" SE..." */
libc.VaList(bp, zPrefix, (*RbuObjIter)(unsafe.Pointer(pIter)).FzTbl, zSet, zWhere))
(*Sqlite3rbu)(unsafe.Pointer(p)).Frc = prepareFreeAndCollectError(tls,
(*Sqlite3rbu)(unsafe.Pointer(p)).FdbMain, (pUp + 8 /* &.pUpdate */), (p + 64 /* &.zErrmsg */), zUpdate)
@@ -160484,7 +163117,7 @@ func rbuGetUpdateStmt(tls *libc.TLS, p uintptr, pIter uintptr, zMask uintptr, pp
return (*Sqlite3rbu)(unsafe.Pointer(p)).Frc
}
-func rbuOpenDbhandle(tls *libc.TLS, p uintptr, zName uintptr, bUseVfs int32) uintptr { /* sqlite3.c:201629:16: */
+func rbuOpenDbhandle(tls *libc.TLS, p uintptr, zName uintptr, bUseVfs int32) uintptr { /* sqlite3.c:202713:16: */
bp := tls.Alloc(16)
defer tls.Free(16)
@@ -160498,7 +163131,7 @@ func rbuOpenDbhandle(tls *libc.TLS, p uintptr, zName uintptr, bUseVfs int32) uin
return uintptr(0)
}())
if (*Sqlite3rbu)(unsafe.Pointer(p)).Frc != 0 {
- (*Sqlite3rbu)(unsafe.Pointer(p)).FzErrmsg = Xsqlite3_mprintf(tls, ts+2718 /* "%s" */, libc.VaList(bp, Xsqlite3_errmsg(tls, *(*uintptr)(unsafe.Pointer(bp + 8 /* db */)))))
+ (*Sqlite3rbu)(unsafe.Pointer(p)).FzErrmsg = Xsqlite3_mprintf(tls, ts+2790 /* "%s" */, libc.VaList(bp, Xsqlite3_errmsg(tls, *(*uintptr)(unsafe.Pointer(bp + 8 /* db */)))))
Xsqlite3_close(tls, *(*uintptr)(unsafe.Pointer(bp + 8 /* db */)))
*(*uintptr)(unsafe.Pointer(bp + 8 /* db */)) = uintptr(0)
}
@@ -160507,7 +163140,7 @@ func rbuOpenDbhandle(tls *libc.TLS, p uintptr, zName uintptr, bUseVfs int32) uin
}
// Free an RbuState object allocated by rbuLoadState().
-func rbuFreeState(tls *libc.TLS, p uintptr) { /* sqlite3.c:201650:13: */
+func rbuFreeState(tls *libc.TLS, p uintptr) { /* sqlite3.c:202734:13: */
if p != 0 {
Xsqlite3_free(tls, (*RbuState)(unsafe.Pointer(p)).FzTbl)
Xsqlite3_free(tls, (*RbuState)(unsafe.Pointer(p)).FzDataTbl)
@@ -160523,7 +163156,7 @@ func rbuFreeState(tls *libc.TLS, p uintptr) { /* sqlite3.c:201650:13: */
//
// If an error occurs, leave an error code and message in the rbu handle
// and return NULL.
-func rbuLoadState(tls *libc.TLS, p uintptr) uintptr { /* sqlite3.c:201668:17: */
+func rbuLoadState(tls *libc.TLS, p uintptr) uintptr { /* sqlite3.c:202752:17: */
bp := tls.Alloc(20)
defer tls.Free(20)
@@ -160539,7 +163172,7 @@ func rbuLoadState(tls *libc.TLS, p uintptr) uintptr { /* sqlite3.c:201668:17: */
}
*(*int32)(unsafe.Pointer(bp + 16 /* rc */)) = prepareFreeAndCollectError(tls, (*Sqlite3rbu)(unsafe.Pointer(p)).FdbRbu, bp+8 /* &pStmt */, (p + 64 /* &.zErrmsg */),
- Xsqlite3_mprintf(tls, ts+28746 /* "SELECT k, v FROM..." */, libc.VaList(bp, p+48 /* &.zStateDb */)))
+ Xsqlite3_mprintf(tls, ts+29206 /* "SELECT k, v FROM..." */, libc.VaList(bp, p+48 /* &.zStateDb */)))
for (*(*int32)(unsafe.Pointer(bp + 16 /* rc */)) == SQLITE_OK) && (SQLITE_ROW == Xsqlite3_step(tls, *(*uintptr)(unsafe.Pointer(bp + 8 /* pStmt */)))) {
switch Xsqlite3_column_int(tls, *(*uintptr)(unsafe.Pointer(bp + 8 /* pStmt */)), 0) {
case RBU_STATE_STAGE:
@@ -160603,7 +163236,7 @@ func rbuLoadState(tls *libc.TLS, p uintptr) uintptr { /* sqlite3.c:201668:17: */
// Open the database handle and attach the RBU database as "rbu". If an
// error occurs, leave an error code and message in the RBU handle.
-func rbuOpenDatabase(tls *libc.TLS, p uintptr, pbRetry uintptr) { /* sqlite3.c:201745:13: */
+func rbuOpenDatabase(tls *libc.TLS, p uintptr, pbRetry uintptr) { /* sqlite3.c:202829:13: */
bp := tls.Alloc(56)
defer tls.Free(56)
@@ -160611,31 +163244,31 @@ func rbuOpenDatabase(tls *libc.TLS, p uintptr, pbRetry uintptr) { /* sqlite3.c:2
(*Sqlite3rbu)(unsafe.Pointer(p)).FdbRbu = rbuOpenDbhandle(tls, p, (*Sqlite3rbu)(unsafe.Pointer(p)).FzRbu, 1)
if ((*Sqlite3rbu)(unsafe.Pointer(p)).Frc == SQLITE_OK) && ((*Sqlite3rbu)(unsafe.Pointer((p))).FzTarget == uintptr(0)) {
- Xsqlite3_file_control(tls, (*Sqlite3rbu)(unsafe.Pointer(p)).FdbRbu, ts+5327 /* "main" */, SQLITE_FCNTL_RBUCNT, p)
+ Xsqlite3_file_control(tls, (*Sqlite3rbu)(unsafe.Pointer(p)).FdbRbu, ts+5458 /* "main" */, SQLITE_FCNTL_RBUCNT, p)
if (*Sqlite3rbu)(unsafe.Pointer(p)).FzState == uintptr(0) {
- var zFile uintptr = Xsqlite3_db_filename(tls, (*Sqlite3rbu)(unsafe.Pointer(p)).FdbRbu, ts+5327 /* "main" */)
- (*Sqlite3rbu)(unsafe.Pointer(p)).FzState = rbuMPrintf(tls, p, ts+28776 /* "file://%s-vacuum..." */, libc.VaList(bp, zFile, zFile))
+ var zFile uintptr = Xsqlite3_db_filename(tls, (*Sqlite3rbu)(unsafe.Pointer(p)).FdbRbu, ts+5458 /* "main" */)
+ (*Sqlite3rbu)(unsafe.Pointer(p)).FzState = rbuMPrintf(tls, p, ts+29236 /* "file://%s-vacuum..." */, libc.VaList(bp, zFile, zFile))
}
}
// If using separate RBU and state databases, attach the state database to
// the RBU db handle now.
if (*Sqlite3rbu)(unsafe.Pointer(p)).FzState != 0 {
- rbuMPrintfExec(tls, p, (*Sqlite3rbu)(unsafe.Pointer(p)).FdbRbu, ts+28803 /* "ATTACH %Q AS sta..." */, libc.VaList(bp+16, (*Sqlite3rbu)(unsafe.Pointer(p)).FzState))
- libc.Xmemcpy(tls, p+48 /* &.zStateDb */, ts+2341 /* "stat" */, uint64(4))
+ rbuMPrintfExec(tls, p, (*Sqlite3rbu)(unsafe.Pointer(p)).FdbRbu, ts+29263 /* "ATTACH %Q AS sta..." */, libc.VaList(bp+16, (*Sqlite3rbu)(unsafe.Pointer(p)).FzState))
+ libc.Xmemcpy(tls, p+48 /* &.zStateDb */, ts+2413 /* "stat" */, uint64(4))
} else {
- libc.Xmemcpy(tls, p+48 /* &.zStateDb */, ts+5327 /* "main" */, uint64(4))
+ libc.Xmemcpy(tls, p+48 /* &.zStateDb */, ts+5458 /* "main" */, uint64(4))
}
// If it has not already been created, create the rbu_state table
- rbuMPrintfExec(tls, p, (*Sqlite3rbu)(unsafe.Pointer(p)).FdbRbu, ts+28821 /* "CREATE TABLE IF ..." */, libc.VaList(bp+24, p+48 /* &.zStateDb */))
+ rbuMPrintfExec(tls, p, (*Sqlite3rbu)(unsafe.Pointer(p)).FdbRbu, ts+29281 /* "CREATE TABLE IF ..." */, libc.VaList(bp+24, p+48 /* &.zStateDb */))
if ((*Sqlite3rbu)(unsafe.Pointer(p)).Frc == SQLITE_OK) && ((*Sqlite3rbu)(unsafe.Pointer((p))).FzTarget == uintptr(0)) {
var bOpen int32 = 0
var rc int32
(*Sqlite3rbu)(unsafe.Pointer(p)).FnRbu = 0
(*Sqlite3rbu)(unsafe.Pointer(p)).FpRbuFd = uintptr(0)
- rc = Xsqlite3_file_control(tls, (*Sqlite3rbu)(unsafe.Pointer(p)).FdbRbu, ts+5327 /* "main" */, SQLITE_FCNTL_RBUCNT, p)
+ rc = Xsqlite3_file_control(tls, (*Sqlite3rbu)(unsafe.Pointer(p)).FdbRbu, ts+5458 /* "main" */, SQLITE_FCNTL_RBUCNT, p)
if rc != SQLITE_NOTFOUND {
(*Sqlite3rbu)(unsafe.Pointer(p)).Frc = rc
}
@@ -160668,32 +163301,32 @@ func rbuOpenDatabase(tls *libc.TLS, p uintptr, pbRetry uintptr) { /* sqlite3.c:2
return
}
(*Sqlite3rbu)(unsafe.Pointer(p)).Frc = SQLITE_ERROR
- (*Sqlite3rbu)(unsafe.Pointer(p)).FzErrmsg = Xsqlite3_mprintf(tls, ts+28887 /* "cannot vacuum wa..." */, 0)
+ (*Sqlite3rbu)(unsafe.Pointer(p)).FzErrmsg = Xsqlite3_mprintf(tls, ts+29347 /* "cannot vacuum wa..." */, 0)
} else {
var zTarget uintptr
var zExtra uintptr = uintptr(0)
- if (libc.Xstrlen(tls, (*Sqlite3rbu)(unsafe.Pointer(p)).FzRbu) >= uint64(5)) && (0 == libc.Xmemcmp(tls, ts+22019 /* "file:" */, (*Sqlite3rbu)(unsafe.Pointer(p)).FzRbu, uint64(5))) {
+ if (libc.Xstrlen(tls, (*Sqlite3rbu)(unsafe.Pointer(p)).FzRbu) >= uint64(5)) && (0 == libc.Xmemcmp(tls, ts+22479 /* "file:" */, (*Sqlite3rbu)(unsafe.Pointer(p)).FzRbu, uint64(5))) {
zExtra = ((*Sqlite3rbu)(unsafe.Pointer(p)).FzRbu + 5)
- for *(*int8)(unsafe.Pointer(zExtra)) != 0 {
- if int32(*(*int8)(unsafe.Pointer(libc.PostIncUintptr(&zExtra, 1)))) == '?' {
+ for *(*uint8)(unsafe.Pointer(zExtra)) != 0 {
+ if int32(*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&zExtra, 1)))) == '?' {
break
}
}
- if int32(*(*int8)(unsafe.Pointer(zExtra))) == 0 {
+ if int32(*(*uint8)(unsafe.Pointer(zExtra))) == 0 {
zExtra = uintptr(0)
}
}
- zTarget = Xsqlite3_mprintf(tls, ts+28919, /* "file:%s-vactmp?r..." */
- libc.VaList(bp+32, Xsqlite3_db_filename(tls, (*Sqlite3rbu)(unsafe.Pointer(p)).FdbRbu, ts+5327 /* "main" */),
+ zTarget = Xsqlite3_mprintf(tls, ts+29379, /* "file:%s-vactmp?r..." */
+ libc.VaList(bp+32, Xsqlite3_db_filename(tls, (*Sqlite3rbu)(unsafe.Pointer(p)).FdbRbu, ts+5458 /* "main" */),
func() uintptr {
if zExtra == uintptr(0) {
- return ts + 703 /* "" */
+ return ts + 755 /* "" */
}
- return ts + 28951 /* "&" */
+ return ts + 29411 /* "&" */
}(), func() uintptr {
if zExtra == uintptr(0) {
- return ts + 703 /* "" */
+ return ts + 755 /* "" */
}
return zExtra
}()))
@@ -160709,40 +163342,40 @@ func rbuOpenDatabase(tls *libc.TLS, p uintptr, pbRetry uintptr) { /* sqlite3.c:2
if (*Sqlite3rbu)(unsafe.Pointer(p)).Frc == SQLITE_OK {
(*Sqlite3rbu)(unsafe.Pointer(p)).Frc = Xsqlite3_create_function(tls, (*Sqlite3rbu)(unsafe.Pointer(p)).FdbMain,
- ts+28953 /* "rbu_tmp_insert" */, -1, SQLITE_UTF8, p, *(*uintptr)(unsafe.Pointer(&struct {
+ ts+29413 /* "rbu_tmp_insert" */, -1, SQLITE_UTF8, p, *(*uintptr)(unsafe.Pointer(&struct {
f func(*libc.TLS, uintptr, int32, uintptr)
}{rbuTmpInsertFunc})), uintptr(0), uintptr(0))
}
if (*Sqlite3rbu)(unsafe.Pointer(p)).Frc == SQLITE_OK {
(*Sqlite3rbu)(unsafe.Pointer(p)).Frc = Xsqlite3_create_function(tls, (*Sqlite3rbu)(unsafe.Pointer(p)).FdbMain,
- ts+28968 /* "rbu_fossil_delta" */, 2, SQLITE_UTF8, uintptr(0), *(*uintptr)(unsafe.Pointer(&struct {
+ ts+29428 /* "rbu_fossil_delta" */, 2, SQLITE_UTF8, uintptr(0), *(*uintptr)(unsafe.Pointer(&struct {
f func(*libc.TLS, uintptr, int32, uintptr)
}{rbuFossilDeltaFunc})), uintptr(0), uintptr(0))
}
if (*Sqlite3rbu)(unsafe.Pointer(p)).Frc == SQLITE_OK {
(*Sqlite3rbu)(unsafe.Pointer(p)).Frc = Xsqlite3_create_function(tls, (*Sqlite3rbu)(unsafe.Pointer(p)).FdbRbu,
- ts+28985 /* "rbu_target_name" */, -1, SQLITE_UTF8, p, *(*uintptr)(unsafe.Pointer(&struct {
+ ts+29445 /* "rbu_target_name" */, -1, SQLITE_UTF8, p, *(*uintptr)(unsafe.Pointer(&struct {
f func(*libc.TLS, uintptr, int32, uintptr)
}{rbuTargetNameFunc})), uintptr(0), uintptr(0))
}
if (*Sqlite3rbu)(unsafe.Pointer(p)).Frc == SQLITE_OK {
- (*Sqlite3rbu)(unsafe.Pointer(p)).Frc = Xsqlite3_file_control(tls, (*Sqlite3rbu)(unsafe.Pointer(p)).FdbMain, ts+5327 /* "main" */, SQLITE_FCNTL_RBU, p)
+ (*Sqlite3rbu)(unsafe.Pointer(p)).Frc = Xsqlite3_file_control(tls, (*Sqlite3rbu)(unsafe.Pointer(p)).FdbMain, ts+5458 /* "main" */, SQLITE_FCNTL_RBU, p)
}
- rbuMPrintfExec(tls, p, (*Sqlite3rbu)(unsafe.Pointer(p)).FdbMain, ts+29001 /* "SELECT * FROM sq..." */, 0)
+ rbuMPrintfExec(tls, p, (*Sqlite3rbu)(unsafe.Pointer(p)).FdbMain, ts+29461 /* "SELECT * FROM sq..." */, 0)
// Mark the database file just opened as an RBU target database. If
// this call returns SQLITE_NOTFOUND, then the RBU vfs is not in use.
// This is an error.
if (*Sqlite3rbu)(unsafe.Pointer(p)).Frc == SQLITE_OK {
- (*Sqlite3rbu)(unsafe.Pointer(p)).Frc = Xsqlite3_file_control(tls, (*Sqlite3rbu)(unsafe.Pointer(p)).FdbMain, ts+5327 /* "main" */, SQLITE_FCNTL_RBU, p)
+ (*Sqlite3rbu)(unsafe.Pointer(p)).Frc = Xsqlite3_file_control(tls, (*Sqlite3rbu)(unsafe.Pointer(p)).FdbMain, ts+5458 /* "main" */, SQLITE_FCNTL_RBU, p)
}
if (*Sqlite3rbu)(unsafe.Pointer(p)).Frc == SQLITE_NOTFOUND {
(*Sqlite3rbu)(unsafe.Pointer(p)).Frc = SQLITE_ERROR
- (*Sqlite3rbu)(unsafe.Pointer(p)).FzErrmsg = Xsqlite3_mprintf(tls, ts+29029 /* "rbu vfs not foun..." */, 0)
+ (*Sqlite3rbu)(unsafe.Pointer(p)).FzErrmsg = Xsqlite3_mprintf(tls, ts+29489 /* "rbu vfs not foun..." */, 0)
}
}
@@ -160764,7 +163397,7 @@ func rbuOpenDatabase(tls *libc.TLS, p uintptr, pbRetry uintptr) { /* sqlite3.c:2
// test.db-wal => test.wal
// test.db-shm => test.shm
// test.db-mj7f3319fa => test.9fa
-func rbuFileSuffix3(tls *libc.TLS, zBase uintptr, z uintptr) { /* sqlite3.c:201924:13: */
+func rbuFileSuffix3(tls *libc.TLS, zBase uintptr, z uintptr) { /* sqlite3.c:203008:13: */
}
// Return the current wal-index header checksum for the target database
@@ -160772,7 +163405,7 @@ func rbuFileSuffix3(tls *libc.TLS, zBase uintptr, z uintptr) { /* sqlite3.c:2019
//
// The checksum is store in the first page of xShmMap memory as an 8-byte
// blob starting at byte offset 40.
-func rbuShmChecksum(tls *libc.TLS, p uintptr) I64 { /* sqlite3.c:201945:12: */
+func rbuShmChecksum(tls *libc.TLS, p uintptr) I64 { /* sqlite3.c:203029:12: */
bp := tls.Alloc(8)
defer tls.Free(8)
@@ -160781,9 +163414,11 @@ func rbuShmChecksum(tls *libc.TLS, p uintptr) I64 { /* sqlite3.c:201945:12: */
var pDb uintptr = (*Rbu_file)(unsafe.Pointer((*Sqlite3rbu)(unsafe.Pointer(p)).FpTargetFd)).FpReal
// var ptr uintptr at bp, 8
- (*Sqlite3rbu)(unsafe.Pointer(p)).Frc = (*(*func(*libc.TLS, uintptr, int32, int32, int32, uintptr) int32)(unsafe.Pointer(((*Sqlite3_file)(unsafe.Pointer(pDb)).FpMethods + 104 /* &.xShmMap */))))(tls, pDb, 0, (32 * 1024), 0, bp /* &ptr */)
+ (*Sqlite3rbu)(unsafe.Pointer(p)).Frc = (*struct {
+ f func(*libc.TLS, uintptr, int32, int32, int32, uintptr) int32
+ })(unsafe.Pointer(&struct{ uintptr }{(*sqlite3_io_methods)(unsafe.Pointer((*Sqlite3_file)(unsafe.Pointer(pDb)).FpMethods)).FxShmMap})).f(tls, pDb, 0, (32 * 1024), 0, bp /* &ptr */)
if (*Sqlite3rbu)(unsafe.Pointer(p)).Frc == SQLITE_OK {
- iRet = ((I64(*(*U32)(unsafe.Pointer(libc.AtomicLoadPUintptr(bp /* ptr */) + 10*4))) << 32) + I64(*(*U32)(unsafe.Pointer(libc.AtomicLoadPUintptr(bp /* ptr */) + 11*4))))
+ iRet = ((I64(*(*U32)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp /* ptr */)) + 10*4))) << 32) + I64(*(*U32)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp /* ptr */)) + 11*4))))
}
}
return iRet
@@ -160803,7 +163438,7 @@ func rbuShmChecksum(tls *libc.TLS, p uintptr) I64 { /* sqlite3.c:201945:12: */
// object, then the rbu handle is set to DONE state. This occurs if some
// other client appends a transaction to the wal file in the middle of
// an incremental checkpoint.
-func rbuSetupCheckpoint(tls *libc.TLS, p uintptr, pState uintptr) { /* sqlite3.c:201974:13: */
+func rbuSetupCheckpoint(tls *libc.TLS, p uintptr, pState uintptr) { /* sqlite3.c:203058:13: */
// If pState is NULL, then the wal file may not have been opened and
// recovered. Running a read-statement here to ensure that doing so
@@ -160811,7 +163446,7 @@ func rbuSetupCheckpoint(tls *libc.TLS, p uintptr, pState uintptr) { /* sqlite3.c
if pState == uintptr(0) {
(*Sqlite3rbu)(unsafe.Pointer(p)).FeStage = 0
if (*Sqlite3rbu)(unsafe.Pointer(p)).Frc == SQLITE_OK {
- (*Sqlite3rbu)(unsafe.Pointer(p)).Frc = Xsqlite3_exec(tls, (*Sqlite3rbu)(unsafe.Pointer(p)).FdbMain, ts+29001 /* "SELECT * FROM sq..." */, uintptr(0), uintptr(0), uintptr(0))
+ (*Sqlite3rbu)(unsafe.Pointer(p)).Frc = Xsqlite3_exec(tls, (*Sqlite3rbu)(unsafe.Pointer(p)).FdbMain, ts+29461 /* "SELECT * FROM sq..." */, uintptr(0), uintptr(0), uintptr(0))
}
}
@@ -160845,7 +163480,7 @@ func rbuSetupCheckpoint(tls *libc.TLS, p uintptr, pState uintptr) { /* sqlite3.c
if (*Sqlite3rbu)(unsafe.Pointer(p)).Frc == SQLITE_OK {
var rc2 int32
(*Sqlite3rbu)(unsafe.Pointer(p)).FeStage = RBU_STAGE_CAPTURE
- rc2 = Xsqlite3_exec(tls, (*Sqlite3rbu)(unsafe.Pointer(p)).FdbMain, ts+29047 /* "PRAGMA main.wal_..." */, uintptr(0), uintptr(0), uintptr(0))
+ rc2 = Xsqlite3_exec(tls, (*Sqlite3rbu)(unsafe.Pointer(p)).FdbMain, ts+29507 /* "PRAGMA main.wal_..." */, uintptr(0), uintptr(0), uintptr(0))
if rc2 != SQLITE_INTERNAL {
(*Sqlite3rbu)(unsafe.Pointer(p)).Frc = rc2
}
@@ -160872,7 +163507,9 @@ func rbuSetupCheckpoint(tls *libc.TLS, p uintptr, pState uintptr) { /* sqlite3.c
var pDb uintptr = (*Rbu_file)(unsafe.Pointer((*Sqlite3rbu)(unsafe.Pointer(p)).FpTargetFd)).FpReal
var pWal uintptr = (*Rbu_file)(unsafe.Pointer((*Rbu_file)(unsafe.Pointer((*Sqlite3rbu)(unsafe.Pointer(p)).FpTargetFd)).FpWalFd)).FpReal
- nSectorSize = (*(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(((*Sqlite3_file)(unsafe.Pointer(pDb)).FpMethods + 88 /* &.xSectorSize */))))(tls, pDb)
+ nSectorSize = (*struct {
+ f func(*libc.TLS, uintptr) int32
+ })(unsafe.Pointer(&struct{ uintptr }{(*sqlite3_io_methods)(unsafe.Pointer((*Sqlite3_file)(unsafe.Pointer(pDb)).FpMethods)).FxSectorSize})).f(tls, pDb)
if nSectorSize > (*Sqlite3rbu)(unsafe.Pointer(p)).Fpgsz {
(*Sqlite3rbu)(unsafe.Pointer(p)).FnPagePerSector = (nSectorSize / (*Sqlite3rbu)(unsafe.Pointer(p)).Fpgsz)
} else {
@@ -160883,7 +163520,9 @@ func rbuSetupCheckpoint(tls *libc.TLS, p uintptr, pState uintptr) { /* sqlite3.c
// directory in which the target database and the wal file reside, in
// case it has not been synced since the rename() call in
// rbuMoveOalFile().
- (*Sqlite3rbu)(unsafe.Pointer(p)).Frc = (*(*func(*libc.TLS, uintptr, int32) int32)(unsafe.Pointer(((*Sqlite3_file)(unsafe.Pointer(pWal)).FpMethods + 40 /* &.xSync */))))(tls, pWal, SQLITE_SYNC_NORMAL)
+ (*Sqlite3rbu)(unsafe.Pointer(p)).Frc = (*struct {
+ f func(*libc.TLS, uintptr, int32) int32
+ })(unsafe.Pointer(&struct{ uintptr }{(*sqlite3_io_methods)(unsafe.Pointer((*Sqlite3_file)(unsafe.Pointer(pWal)).FpMethods)).FxSync})).f(tls, pWal, SQLITE_SYNC_NORMAL)
}
}
}
@@ -160891,7 +163530,7 @@ func rbuSetupCheckpoint(tls *libc.TLS, p uintptr, pState uintptr) { /* sqlite3.c
// Called when iAmt bytes are read from offset iOff of the wal file while
// the rbu object is in capture mode. Record the frame number of the frame
// being read in the aFrame[] array.
-func rbuCaptureWalRead(tls *libc.TLS, pRbu uintptr, iOff I64, iAmt int32) int32 { /* sqlite3.c:202058:12: */
+func rbuCaptureWalRead(tls *libc.TLS, pRbu uintptr, iOff I64, iAmt int32) int32 { /* sqlite3.c:203142:12: */
var mReq U32 = (U32(((int32(1) << WAL_LOCK_WRITE) | (int32(1) << WAL_LOCK_CKPT)) | (int32(1) << WAL_LOCK_READ0)))
var iFrame U32
@@ -160930,7 +163569,7 @@ func rbuCaptureWalRead(tls *libc.TLS, pRbu uintptr, iOff I64, iAmt int32) int32
// Called when a page of data is written to offset iOff of the database
// file while the rbu handle is in capture mode. Record the page number
// of the page being written in the aFrame[] array.
-func rbuCaptureDbWrite(tls *libc.TLS, pRbu uintptr, iOff I64) int32 { /* sqlite3.c:202090:12: */
+func rbuCaptureDbWrite(tls *libc.TLS, pRbu uintptr, iOff I64) int32 { /* sqlite3.c:203174:12: */
(*RbuFrame)(unsafe.Pointer((*Sqlite3rbu)(unsafe.Pointer(pRbu)).FaFrame + uintptr(((*Sqlite3rbu)(unsafe.Pointer(pRbu)).FnFrame-1))*8)).FiDbPage = ((U32(iOff / I64((*Sqlite3rbu)(unsafe.Pointer(pRbu)).Fpgsz))) + U32(1))
return SQLITE_OK
}
@@ -160938,28 +163577,36 @@ func rbuCaptureDbWrite(tls *libc.TLS, pRbu uintptr, iOff I64) int32 { /* sqlite3
// This is called as part of an incremental checkpoint operation. Copy
// a single frame of data from the wal file into the database file, as
// indicated by the RbuFrame object.
-func rbuCheckpointFrame(tls *libc.TLS, p uintptr, pFrame uintptr) { /* sqlite3.c:202100:13: */
+func rbuCheckpointFrame(tls *libc.TLS, p uintptr, pFrame uintptr) { /* sqlite3.c:203184:13: */
var pWal uintptr = (*Rbu_file)(unsafe.Pointer((*Rbu_file)(unsafe.Pointer((*Sqlite3rbu)(unsafe.Pointer(p)).FpTargetFd)).FpWalFd)).FpReal
var pDb uintptr = (*Rbu_file)(unsafe.Pointer((*Sqlite3rbu)(unsafe.Pointer(p)).FpTargetFd)).FpReal
var iOff I64
iOff = ((((I64((*RbuFrame)(unsafe.Pointer(pFrame)).FiWalFrame - U32(1))) * (I64((*Sqlite3rbu)(unsafe.Pointer(p)).Fpgsz + 24))) + int64(32)) + int64(24))
- (*Sqlite3rbu)(unsafe.Pointer(p)).Frc = (*(*func(*libc.TLS, uintptr, uintptr, int32, Sqlite3_int64) int32)(unsafe.Pointer(((*Sqlite3_file)(unsafe.Pointer(pWal)).FpMethods + 16 /* &.xRead */))))(tls, pWal, (*Sqlite3rbu)(unsafe.Pointer(p)).FaBuf, (*Sqlite3rbu)(unsafe.Pointer(p)).Fpgsz, iOff)
+ (*Sqlite3rbu)(unsafe.Pointer(p)).Frc = (*struct {
+ f func(*libc.TLS, uintptr, uintptr, int32, Sqlite3_int64) int32
+ })(unsafe.Pointer(&struct{ uintptr }{(*sqlite3_io_methods)(unsafe.Pointer((*Sqlite3_file)(unsafe.Pointer(pWal)).FpMethods)).FxRead})).f(tls, pWal, (*Sqlite3rbu)(unsafe.Pointer(p)).FaBuf, (*Sqlite3rbu)(unsafe.Pointer(p)).Fpgsz, iOff)
if (*Sqlite3rbu)(unsafe.Pointer(p)).Frc != 0 {
return
}
iOff = ((I64((*RbuFrame)(unsafe.Pointer(pFrame)).FiDbPage - U32(1))) * I64((*Sqlite3rbu)(unsafe.Pointer(p)).Fpgsz))
- (*Sqlite3rbu)(unsafe.Pointer(p)).Frc = (*(*func(*libc.TLS, uintptr, uintptr, int32, Sqlite3_int64) int32)(unsafe.Pointer(((*Sqlite3_file)(unsafe.Pointer(pDb)).FpMethods + 24 /* &.xWrite */))))(tls, pDb, (*Sqlite3rbu)(unsafe.Pointer(p)).FaBuf, (*Sqlite3rbu)(unsafe.Pointer(p)).Fpgsz, iOff)
+ (*Sqlite3rbu)(unsafe.Pointer(p)).Frc = (*struct {
+ f func(*libc.TLS, uintptr, uintptr, int32, Sqlite3_int64) int32
+ })(unsafe.Pointer(&struct{ uintptr }{(*sqlite3_io_methods)(unsafe.Pointer((*Sqlite3_file)(unsafe.Pointer(pDb)).FpMethods)).FxWrite})).f(tls, pDb, (*Sqlite3rbu)(unsafe.Pointer(p)).FaBuf, (*Sqlite3rbu)(unsafe.Pointer(p)).Fpgsz, iOff)
}
// Take an EXCLUSIVE lock on the database file.
-func rbuLockDatabase(tls *libc.TLS, p uintptr) { /* sqlite3.c:202118:13: */
+func rbuLockDatabase(tls *libc.TLS, p uintptr) { /* sqlite3.c:203202:13: */
var pReal uintptr = (*Rbu_file)(unsafe.Pointer((*Sqlite3rbu)(unsafe.Pointer(p)).FpTargetFd)).FpReal
- (*Sqlite3rbu)(unsafe.Pointer(p)).Frc = (*(*func(*libc.TLS, uintptr, int32) int32)(unsafe.Pointer(((*Sqlite3_file)(unsafe.Pointer(pReal)).FpMethods + 56 /* &.xLock */))))(tls, pReal, SQLITE_LOCK_SHARED)
+ (*Sqlite3rbu)(unsafe.Pointer(p)).Frc = (*struct {
+ f func(*libc.TLS, uintptr, int32) int32
+ })(unsafe.Pointer(&struct{ uintptr }{(*sqlite3_io_methods)(unsafe.Pointer((*Sqlite3_file)(unsafe.Pointer(pReal)).FpMethods)).FxLock})).f(tls, pReal, SQLITE_LOCK_SHARED)
if (*Sqlite3rbu)(unsafe.Pointer(p)).Frc == SQLITE_OK {
- (*Sqlite3rbu)(unsafe.Pointer(p)).Frc = (*(*func(*libc.TLS, uintptr, int32) int32)(unsafe.Pointer(((*Sqlite3_file)(unsafe.Pointer(pReal)).FpMethods + 56 /* &.xLock */))))(tls, pReal, SQLITE_LOCK_EXCLUSIVE)
+ (*Sqlite3rbu)(unsafe.Pointer(p)).Frc = (*struct {
+ f func(*libc.TLS, uintptr, int32) int32
+ })(unsafe.Pointer(&struct{ uintptr }{(*sqlite3_io_methods)(unsafe.Pointer((*Sqlite3_file)(unsafe.Pointer(pReal)).FpMethods)).FxLock})).f(tls, pReal, SQLITE_LOCK_EXCLUSIVE)
}
}
@@ -160968,20 +163615,20 @@ func rbuLockDatabase(tls *libc.TLS, p uintptr) { /* sqlite3.c:202118:13: */
// then reopens the database file (this time in vanilla, non-oal, WAL mode).
// If an error occurs, leave an error code and error message in the rbu
// handle.
-func rbuMoveOalFile(tls *libc.TLS, p uintptr) { /* sqlite3.c:202158:13: */
+func rbuMoveOalFile(tls *libc.TLS, p uintptr) { /* sqlite3.c:203242:13: */
bp := tls.Alloc(16)
defer tls.Free(16)
- var zBase uintptr = Xsqlite3_db_filename(tls, (*Sqlite3rbu)(unsafe.Pointer(p)).FdbMain, ts+5327 /* "main" */)
+ var zBase uintptr = Xsqlite3_db_filename(tls, (*Sqlite3rbu)(unsafe.Pointer(p)).FdbMain, ts+5458 /* "main" */)
var zMove uintptr = zBase
var zOal uintptr
var zWal uintptr
if (*Sqlite3rbu)(unsafe.Pointer((p))).FzTarget == uintptr(0) {
- zMove = Xsqlite3_db_filename(tls, (*Sqlite3rbu)(unsafe.Pointer(p)).FdbRbu, ts+5327 /* "main" */)
+ zMove = Xsqlite3_db_filename(tls, (*Sqlite3rbu)(unsafe.Pointer(p)).FdbRbu, ts+5458 /* "main" */)
}
- zOal = Xsqlite3_mprintf(tls, ts+29082 /* "%s-oal" */, libc.VaList(bp, zMove))
- zWal = Xsqlite3_mprintf(tls, ts+29089 /* "%s-wal" */, libc.VaList(bp+8, zMove))
+ zOal = Xsqlite3_mprintf(tls, ts+29542 /* "%s-oal" */, libc.VaList(bp, zMove))
+ zWal = Xsqlite3_mprintf(tls, ts+29549 /* "%s-wal" */, libc.VaList(bp+8, zMove))
if (zWal == uintptr(0)) || (zOal == uintptr(0)) {
(*Sqlite3rbu)(unsafe.Pointer(p)).Frc = SQLITE_NOMEM
@@ -161037,7 +163684,7 @@ func rbuMoveOalFile(tls *libc.TLS, p uintptr) { /* sqlite3.c:202158:13: */
//
// If the rbu_control field contains an invalid value, an error code and
// message are left in the RBU handle and zero returned.
-func rbuStepType(tls *libc.TLS, p uintptr, pzMask uintptr) int32 { /* sqlite3.c:202249:12: */
+func rbuStepType(tls *libc.TLS, p uintptr, pzMask uintptr) int32 { /* sqlite3.c:203333:12: */
var iCol int32 = (*Sqlite3rbu)(unsafe.Pointer(p)).Fobjiter.FnCol // Index of rbu_control column
var res int32 = 0 // Return value
@@ -161093,7 +163740,7 @@ func rbuStepType(tls *libc.TLS, p uintptr, pzMask uintptr) int32 { /* sqlite3.c:
// Argument eType must be one of RBU_INSERT, RBU_DELETE, RBU_IDX_INSERT or
// RBU_IDX_DELETE. This function performs the work of a single
// sqlite3rbu_step() call for the type of operation specified by eType.
-func rbuStepOneOp(tls *libc.TLS, p uintptr, eType int32) { /* sqlite3.c:202305:13: */
+func rbuStepOneOp(tls *libc.TLS, p uintptr, eType int32) { /* sqlite3.c:203389:13: */
var pIter uintptr = (p + 80 /* &.objiter */)
var pVal uintptr
var pWriter uintptr
@@ -161121,7 +163768,7 @@ func rbuStepOneOp(tls *libc.TLS, p uintptr, eType int32) { /* sqlite3.c:202305:1
((*RbuObjIter)(unsafe.Pointer(pIter)).FzIdx == uintptr(0))) && ((*RbuObjIter)(unsafe.Pointer(pIter)).FeType == RBU_PK_IPK)) && (*(*U8)(unsafe.Pointer((*RbuObjIter)(unsafe.Pointer(pIter)).FabTblPk + uintptr(i))) != 0)) &&
(Xsqlite3_column_type(tls, (*RbuObjIter)(unsafe.Pointer(pIter)).FpSelect, i) == SQLITE_NULL) {
(*Sqlite3rbu)(unsafe.Pointer(p)).Frc = SQLITE_MISMATCH
- (*Sqlite3rbu)(unsafe.Pointer(p)).FzErrmsg = Xsqlite3_mprintf(tls, ts+21657 /* "datatype mismatc..." */, 0)
+ (*Sqlite3rbu)(unsafe.Pointer(p)).FzErrmsg = Xsqlite3_mprintf(tls, ts+22117 /* "datatype mismatc..." */, 0)
return
}
@@ -161165,7 +163812,7 @@ func rbuStepOneOp(tls *libc.TLS, p uintptr, eType int32) { /* sqlite3.c:202305:1
// If no error occurs, SQLITE_OK is returned. Otherwise, an error code
// and message is left in the RBU handle and a copy of the error code
// returned.
-func rbuStep(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:202388:12: */
+func rbuStep(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:203472:12: */
bp := tls.Alloc(16)
defer tls.Free(16)
@@ -161196,7 +163843,7 @@ func rbuStep(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:202388:12: */
if *(*uintptr)(unsafe.Pointer(bp + 8 /* pUpdate */)) != 0 {
var i int32
for i = 0; ((*Sqlite3rbu)(unsafe.Pointer(p)).Frc == SQLITE_OK) && (i < (*RbuObjIter)(unsafe.Pointer(pIter)).FnCol); i++ {
- var c int8 = *(*int8)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp /* zMask */)) + uintptr(*(*int32)(unsafe.Pointer((*RbuObjIter)(unsafe.Pointer(pIter)).FaiSrcOrder + uintptr(i)*4)))))
+ var c uint8 = *(*uint8)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp /* zMask */)) + uintptr(*(*int32)(unsafe.Pointer((*RbuObjIter)(unsafe.Pointer(pIter)).FaiSrcOrder + uintptr(i)*4)))))
pVal = Xsqlite3_column_value(tls, (*RbuObjIter)(unsafe.Pointer(pIter)).FpSelect, i)
if (*(*U8)(unsafe.Pointer((*RbuObjIter)(unsafe.Pointer(pIter)).FabTblPk + uintptr(i))) != 0) || (int32(c) != '.') {
(*Sqlite3rbu)(unsafe.Pointer(p)).Frc = Xsqlite3_bind_value(tls, *(*uintptr)(unsafe.Pointer(bp + 8 /* pUpdate */)), (i + 1), pVal)
@@ -161224,7 +163871,7 @@ func rbuStep(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:202388:12: */
// Or, if this is an RBU vacuum, set the schema cookie of the main db
// opened by p->dbMain to one more than the schema cookie of the main
// db opened by p->dbRbu.
-func rbuIncrSchemaCookie(tls *libc.TLS, p uintptr) { /* sqlite3.c:202453:13: */
+func rbuIncrSchemaCookie(tls *libc.TLS, p uintptr) { /* sqlite3.c:203537:13: */
bp := tls.Alloc(16)
defer tls.Free(16)
@@ -161239,7 +163886,7 @@ func rbuIncrSchemaCookie(tls *libc.TLS, p uintptr) { /* sqlite3.c:202453:13: */
// var pStmt uintptr at bp+8, 8
(*Sqlite3rbu)(unsafe.Pointer(p)).Frc = prepareAndCollectError(tls, dbread, bp+8 /* &pStmt */, (p + 64 /* &.zErrmsg */),
- ts+29096 /* "PRAGMA schema_ve..." */)
+ ts+29556 /* "PRAGMA schema_ve..." */)
if (*Sqlite3rbu)(unsafe.Pointer(p)).Frc == SQLITE_OK {
// Coverage: it may be that this sqlite3_step() cannot fail. There
// is already a transaction open, so the prepared statement cannot
@@ -161252,7 +163899,7 @@ func rbuIncrSchemaCookie(tls *libc.TLS, p uintptr) { /* sqlite3.c:202453:13: */
rbuFinalize(tls, p, *(*uintptr)(unsafe.Pointer(bp + 8 /* pStmt */)))
}
if (*Sqlite3rbu)(unsafe.Pointer(p)).Frc == SQLITE_OK {
- rbuMPrintfExec(tls, p, (*Sqlite3rbu)(unsafe.Pointer(p)).FdbMain, ts+29118 /* "PRAGMA schema_ve..." */, libc.VaList(bp, (iCookie+1)))
+ rbuMPrintfExec(tls, p, (*Sqlite3rbu)(unsafe.Pointer(p)).FdbMain, ts+29578 /* "PRAGMA schema_ve..." */, libc.VaList(bp, (iCookie+1)))
}
}
}
@@ -161260,7 +163907,7 @@ func rbuIncrSchemaCookie(tls *libc.TLS, p uintptr) { /* sqlite3.c:202453:13: */
// Update the contents of the rbu_state table within the rbu database. The
// value stored in the RBU_STATE_STAGE column is eStage. All other values
// are determined by inspecting the rbu handle passed as the first argument.
-func rbuSaveState(tls *libc.TLS, p uintptr, eStage int32) { /* sqlite3.c:202484:13: */
+func rbuSaveState(tls *libc.TLS, p uintptr, eStage int32) { /* sqlite3.c:203568:13: */
bp := tls.Alloc(176)
defer tls.Free(176)
@@ -161277,7 +163924,7 @@ func rbuSaveState(tls *libc.TLS, p uintptr, eStage int32) { /* sqlite3.c:202484:
rc = prepareFreeAndCollectError(tls, (*Sqlite3rbu)(unsafe.Pointer(p)).FdbRbu, bp+168 /* &pInsert */, (p + 64 /* &.zErrmsg */),
Xsqlite3_mprintf(tls,
- ts+29145, /* "INSERT OR REPLAC..." */
+ ts+29605, /* "INSERT OR REPLAC..." */
libc.VaList(bp, p+48, /* &.zStateDb */
RBU_STATE_STAGE, eStage,
RBU_STATE_TBL, (*Sqlite3rbu)(unsafe.Pointer(p)).Fobjiter.FzTbl,
@@ -161315,16 +163962,16 @@ func rbuSaveState(tls *libc.TLS, p uintptr, eStage int32) { /* sqlite3.c:202484:
//
// In short, it copies the value of the specified PRAGMA setting from
// dbRbu to dbMain.
-func rbuCopyPragma(tls *libc.TLS, p uintptr, zPragma uintptr) { /* sqlite3.c:202545:13: */
+func rbuCopyPragma(tls *libc.TLS, p uintptr, zPragma uintptr) { /* sqlite3.c:203629:13: */
bp := tls.Alloc(32)
defer tls.Free(32)
if (*Sqlite3rbu)(unsafe.Pointer(p)).Frc == SQLITE_OK {
*(*uintptr)(unsafe.Pointer(bp + 24 /* pPragma */)) = uintptr(0)
(*Sqlite3rbu)(unsafe.Pointer(p)).Frc = prepareFreeAndCollectError(tls, (*Sqlite3rbu)(unsafe.Pointer(p)).FdbRbu, bp+24 /* &pPragma */, (p + 64 /* &.zErrmsg */),
- Xsqlite3_mprintf(tls, ts+29303 /* "PRAGMA main.%s" */, libc.VaList(bp, zPragma)))
+ Xsqlite3_mprintf(tls, ts+29763 /* "PRAGMA main.%s" */, libc.VaList(bp, zPragma)))
if ((*Sqlite3rbu)(unsafe.Pointer(p)).Frc == SQLITE_OK) && (SQLITE_ROW == Xsqlite3_step(tls, *(*uintptr)(unsafe.Pointer(bp + 24 /* pPragma */)))) {
- (*Sqlite3rbu)(unsafe.Pointer(p)).Frc = rbuMPrintfExec(tls, p, (*Sqlite3rbu)(unsafe.Pointer(p)).FdbMain, ts+29318, /* "PRAGMA main.%s =..." */
+ (*Sqlite3rbu)(unsafe.Pointer(p)).Frc = rbuMPrintfExec(tls, p, (*Sqlite3rbu)(unsafe.Pointer(p)).FdbMain, ts+29778, /* "PRAGMA main.%s =..." */
libc.VaList(bp+8, zPragma, Xsqlite3_column_int(tls, *(*uintptr)(unsafe.Pointer(bp + 24 /* pPragma */)), 0)))
}
rbuFinalize(tls, p, *(*uintptr)(unsafe.Pointer(bp + 24 /* pPragma */)))
@@ -161334,18 +163981,18 @@ func rbuCopyPragma(tls *libc.TLS, p uintptr, zPragma uintptr) { /* sqlite3.c:202
// The RBU handle passed as the only argument has just been opened and
// the state database is empty. If this RBU handle was opened for an
// RBU vacuum operation, create the schema in the target db.
-func rbuCreateTargetSchema(tls *libc.TLS, p uintptr) { /* sqlite3.c:202565:13: */
+func rbuCreateTargetSchema(tls *libc.TLS, p uintptr) { /* sqlite3.c:203649:13: */
bp := tls.Alloc(16)
defer tls.Free(16)
*(*uintptr)(unsafe.Pointer(bp /* pSql */)) = uintptr(0)
*(*uintptr)(unsafe.Pointer(bp + 8 /* pInsert */)) = uintptr(0)
- (*Sqlite3rbu)(unsafe.Pointer(p)).Frc = Xsqlite3_exec(tls, (*Sqlite3rbu)(unsafe.Pointer(p)).FdbMain, ts+29338 /* "PRAGMA writable_..." */, uintptr(0), uintptr(0), (p + 64 /* &.zErrmsg */))
+ (*Sqlite3rbu)(unsafe.Pointer(p)).Frc = Xsqlite3_exec(tls, (*Sqlite3rbu)(unsafe.Pointer(p)).FdbMain, ts+29798 /* "PRAGMA writable_..." */, uintptr(0), uintptr(0), (p + 64 /* &.zErrmsg */))
if (*Sqlite3rbu)(unsafe.Pointer(p)).Frc == SQLITE_OK {
(*Sqlite3rbu)(unsafe.Pointer(p)).Frc = prepareAndCollectError(tls, (*Sqlite3rbu)(unsafe.Pointer(p)).FdbRbu, bp /* &pSql */, (p + 64 /* &.zErrmsg */),
- ts+29363 /* "SELECT sql FROM ..." */)
+ ts+29823 /* "SELECT sql FROM ..." */)
}
for ((*Sqlite3rbu)(unsafe.Pointer(p)).Frc == SQLITE_OK) && (Xsqlite3_step(tls, *(*uintptr)(unsafe.Pointer(bp /* pSql */))) == SQLITE_ROW) {
@@ -161359,12 +164006,12 @@ func rbuCreateTargetSchema(tls *libc.TLS, p uintptr) { /* sqlite3.c:202565:13: *
if (*Sqlite3rbu)(unsafe.Pointer(p)).Frc == SQLITE_OK {
(*Sqlite3rbu)(unsafe.Pointer(p)).Frc = prepareAndCollectError(tls, (*Sqlite3rbu)(unsafe.Pointer(p)).FdbRbu, bp /* &pSql */, (p + 64 /* &.zErrmsg */),
- ts+29471 /* "SELECT * FROM sq..." */)
+ ts+29931 /* "SELECT * FROM sq..." */)
}
if (*Sqlite3rbu)(unsafe.Pointer(p)).Frc == SQLITE_OK {
(*Sqlite3rbu)(unsafe.Pointer(p)).Frc = prepareAndCollectError(tls, (*Sqlite3rbu)(unsafe.Pointer(p)).FdbMain, bp+8 /* &pInsert */, (p + 64 /* &.zErrmsg */),
- ts+29536 /* "INSERT INTO sqli..." */)
+ ts+29996 /* "INSERT INTO sqli..." */)
}
for ((*Sqlite3rbu)(unsafe.Pointer(p)).Frc == SQLITE_OK) && (Xsqlite3_step(tls, *(*uintptr)(unsafe.Pointer(bp /* pSql */))) == SQLITE_ROW) {
@@ -161376,7 +164023,7 @@ func rbuCreateTargetSchema(tls *libc.TLS, p uintptr) { /* sqlite3.c:202565:13: *
(*Sqlite3rbu)(unsafe.Pointer(p)).Frc = Xsqlite3_reset(tls, *(*uintptr)(unsafe.Pointer(bp + 8 /* pInsert */)))
}
if (*Sqlite3rbu)(unsafe.Pointer(p)).Frc == SQLITE_OK {
- (*Sqlite3rbu)(unsafe.Pointer(p)).Frc = Xsqlite3_exec(tls, (*Sqlite3rbu)(unsafe.Pointer(p)).FdbMain, ts+29580 /* "PRAGMA writable_..." */, uintptr(0), uintptr(0), (p + 64 /* &.zErrmsg */))
+ (*Sqlite3rbu)(unsafe.Pointer(p)).Frc = Xsqlite3_exec(tls, (*Sqlite3rbu)(unsafe.Pointer(p)).FdbMain, ts+30040 /* "PRAGMA writable_..." */, uintptr(0), uintptr(0), (p + 64 /* &.zErrmsg */))
}
rbuFinalize(tls, p, *(*uintptr)(unsafe.Pointer(bp /* pSql */)))
@@ -161384,7 +164031,7 @@ func rbuCreateTargetSchema(tls *libc.TLS, p uintptr) { /* sqlite3.c:202565:13: *
}
// Step the RBU object.
-func Xsqlite3rbu_step(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:202617:16: */
+func Xsqlite3rbu_step(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:203701:16: */
bp := tls.Alloc(24)
defer tls.Free(24)
@@ -161398,8 +164045,8 @@ func Xsqlite3rbu_step(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:202617:16:
// when this handle was opened, create the target database schema.
if (((*Sqlite3rbu)(unsafe.Pointer((p))).FzTarget == uintptr(0)) && ((*Sqlite3rbu)(unsafe.Pointer(p)).FnProgress == 0)) && ((*Sqlite3rbu)(unsafe.Pointer(p)).Frc == SQLITE_OK) {
rbuCreateTargetSchema(tls, p)
- rbuCopyPragma(tls, p, ts+15268 /* "user_version" */)
- rbuCopyPragma(tls, p, ts+14390 /* "application_id" */)
+ rbuCopyPragma(tls, p, ts+15723 /* "user_version" */)
+ rbuCopyPragma(tls, p, ts+14845 /* "application_id" */)
}
for ((*Sqlite3rbu)(unsafe.Pointer(p)).Frc == SQLITE_OK) && ((*RbuObjIter)(unsafe.Pointer(pIter)).FzTbl != 0) {
@@ -161410,7 +164057,7 @@ func Xsqlite3rbu_step(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:202617:16:
// But the contents can be deleted.
if ((libc.Bool32((*Sqlite3rbu)(unsafe.Pointer((p))).FzTarget == uintptr(0))) == 0) && ((*RbuObjIter)(unsafe.Pointer(pIter)).FabIndexed != 0) {
rbuMPrintfExec(tls, p, (*Sqlite3rbu)(unsafe.Pointer(p)).FdbRbu,
- ts+29605 /* "DELETE FROM %s.'..." */, libc.VaList(bp, p+48 /* &.zStateDb */, (*RbuObjIter)(unsafe.Pointer(pIter)).FzDataTbl))
+ ts+30065 /* "DELETE FROM %s.'..." */, libc.VaList(bp, p+48 /* &.zStateDb */, (*RbuObjIter)(unsafe.Pointer(pIter)).FzDataTbl))
}
} else {
rbuObjIterPrepareAll(tls, p, pIter, 0)
@@ -161436,10 +164083,10 @@ func Xsqlite3rbu_step(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:202617:16:
rbuSaveState(tls, p, RBU_STAGE_MOVE)
rbuIncrSchemaCookie(tls, p)
if (*Sqlite3rbu)(unsafe.Pointer(p)).Frc == SQLITE_OK {
- (*Sqlite3rbu)(unsafe.Pointer(p)).Frc = Xsqlite3_exec(tls, (*Sqlite3rbu)(unsafe.Pointer(p)).FdbMain, ts+12775 /* "COMMIT" */, uintptr(0), uintptr(0), (p + 64 /* &.zErrmsg */))
+ (*Sqlite3rbu)(unsafe.Pointer(p)).Frc = Xsqlite3_exec(tls, (*Sqlite3rbu)(unsafe.Pointer(p)).FdbMain, ts+13228 /* "COMMIT" */, uintptr(0), uintptr(0), (p + 64 /* &.zErrmsg */))
}
if (*Sqlite3rbu)(unsafe.Pointer(p)).Frc == SQLITE_OK {
- (*Sqlite3rbu)(unsafe.Pointer(p)).Frc = Xsqlite3_exec(tls, (*Sqlite3rbu)(unsafe.Pointer(p)).FdbRbu, ts+12775 /* "COMMIT" */, uintptr(0), uintptr(0), (p + 64 /* &.zErrmsg */))
+ (*Sqlite3rbu)(unsafe.Pointer(p)).Frc = Xsqlite3_exec(tls, (*Sqlite3rbu)(unsafe.Pointer(p)).FdbRbu, ts+13228 /* "COMMIT" */, uintptr(0), uintptr(0), (p + 64 /* &.zErrmsg */))
}
(*Sqlite3rbu)(unsafe.Pointer(p)).FeStage = RBU_STAGE_MOVE
}
@@ -161466,15 +164113,19 @@ func Xsqlite3rbu_step(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:202617:16:
var pDb uintptr = (*Rbu_file)(unsafe.Pointer((*Sqlite3rbu)(unsafe.Pointer(p)).FpTargetFd)).FpReal
// Sync the db file
- (*Sqlite3rbu)(unsafe.Pointer(p)).Frc = (*(*func(*libc.TLS, uintptr, int32) int32)(unsafe.Pointer(((*Sqlite3_file)(unsafe.Pointer(pDb)).FpMethods + 40 /* &.xSync */))))(tls, pDb, SQLITE_SYNC_NORMAL)
+ (*Sqlite3rbu)(unsafe.Pointer(p)).Frc = (*struct {
+ f func(*libc.TLS, uintptr, int32) int32
+ })(unsafe.Pointer(&struct{ uintptr }{(*sqlite3_io_methods)(unsafe.Pointer((*Sqlite3_file)(unsafe.Pointer(pDb)).FpMethods)).FxSync})).f(tls, pDb, SQLITE_SYNC_NORMAL)
// Update nBackfill
if (*Sqlite3rbu)(unsafe.Pointer(p)).Frc == SQLITE_OK {
// var ptr uintptr at bp+16, 8
- (*Sqlite3rbu)(unsafe.Pointer(p)).Frc = (*(*func(*libc.TLS, uintptr, int32, int32, int32, uintptr) int32)(unsafe.Pointer(((*Sqlite3_file)(unsafe.Pointer(pDb)).FpMethods + 104 /* &.xShmMap */))))(tls, pDb, 0, (32 * 1024), 0, bp+16 /* &ptr */)
+ (*Sqlite3rbu)(unsafe.Pointer(p)).Frc = (*struct {
+ f func(*libc.TLS, uintptr, int32, int32, int32, uintptr) int32
+ })(unsafe.Pointer(&struct{ uintptr }{(*sqlite3_io_methods)(unsafe.Pointer((*Sqlite3_file)(unsafe.Pointer(pDb)).FpMethods)).FxShmMap})).f(tls, pDb, 0, (32 * 1024), 0, bp+16 /* &ptr */)
if (*Sqlite3rbu)(unsafe.Pointer(p)).Frc == SQLITE_OK {
- *(*U32)(unsafe.Pointer((libc.AtomicLoadPUintptr(bp + 16 /* ptr */)) + 24*4)) = (*Sqlite3rbu)(unsafe.Pointer(p)).FiMaxFrame
+ *(*U32)(unsafe.Pointer((*(*uintptr)(unsafe.Pointer(bp + 16 /* ptr */))) + 24*4)) = (*Sqlite3rbu)(unsafe.Pointer(p)).FiMaxFrame
}
}
@@ -161523,7 +164174,7 @@ func Xsqlite3rbu_step(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:202617:16:
// Compare strings z1 and z2, returning 0 if they are identical, or non-zero
// otherwise. Either or both argument may be NULL. Two NULL values are
// considered equal, and NULL is considered distinct from all other values.
-func rbuStrCompare(tls *libc.TLS, z1 uintptr, z2 uintptr) int32 { /* sqlite3.c:202746:12: */
+func rbuStrCompare(tls *libc.TLS, z1 uintptr, z2 uintptr) int32 { /* sqlite3.c:203830:12: */
if (z1 == uintptr(0)) && (z2 == uintptr(0)) {
return 0
}
@@ -161541,7 +164192,7 @@ func rbuStrCompare(tls *libc.TLS, z1 uintptr, z2 uintptr) int32 { /* sqlite3.c:2
//
// If an error occurs, an error code and error message are left in the
// rbu handle passed as the first argument.
-func rbuSetupOal(tls *libc.TLS, p uintptr, pState uintptr) { /* sqlite3.c:202762:13: */
+func rbuSetupOal(tls *libc.TLS, p uintptr, pState uintptr) { /* sqlite3.c:203846:13: */
if (*RbuState)(unsafe.Pointer(pState)).FzTbl != 0 {
var pIter uintptr = (p + 80 /* &.objiter */)
@@ -161556,7 +164207,7 @@ func rbuSetupOal(tls *libc.TLS, p uintptr, pState uintptr) { /* sqlite3.c:202762
if (rc == SQLITE_OK) && !(int32((*RbuObjIter)(unsafe.Pointer(pIter)).FzTbl) != 0) {
rc = SQLITE_ERROR
- (*Sqlite3rbu)(unsafe.Pointer(p)).FzErrmsg = Xsqlite3_mprintf(tls, ts+29633 /* "rbu_state mismat..." */, 0)
+ (*Sqlite3rbu)(unsafe.Pointer(p)).FzErrmsg = Xsqlite3_mprintf(tls, ts+30093 /* "rbu_state mismat..." */, 0)
}
if rc == SQLITE_OK {
@@ -161571,15 +164222,17 @@ func rbuSetupOal(tls *libc.TLS, p uintptr, pState uintptr) { /* sqlite3.c:202762
// If there is a "*-oal" file in the file-system corresponding to the
// target database in the file-system, delete it. If an error occurs,
// leave an error code and error message in the rbu handle.
-func rbuDeleteOalFile(tls *libc.TLS, p uintptr) { /* sqlite3.c:202795:13: */
+func rbuDeleteOalFile(tls *libc.TLS, p uintptr) { /* sqlite3.c:203879:13: */
bp := tls.Alloc(8)
defer tls.Free(8)
- var zOal uintptr = rbuMPrintf(tls, p, ts+29082 /* "%s-oal" */, libc.VaList(bp, (*Sqlite3rbu)(unsafe.Pointer(p)).FzTarget))
+ var zOal uintptr = rbuMPrintf(tls, p, ts+29542 /* "%s-oal" */, libc.VaList(bp, (*Sqlite3rbu)(unsafe.Pointer(p)).FzTarget))
if zOal != 0 {
var pVfs uintptr = Xsqlite3_vfs_find(tls, uintptr(0))
- (*(*func(*libc.TLS, uintptr, uintptr, int32) int32)(unsafe.Pointer((pVfs + 48 /* &.xDelete */))))(tls, pVfs, zOal, 0)
+ (*struct {
+ f func(*libc.TLS, uintptr, uintptr, int32) int32
+ })(unsafe.Pointer(&struct{ uintptr }{(*Sqlite3_vfs)(unsafe.Pointer(pVfs)).FxDelete})).f(tls, pVfs, zOal, 0)
Xsqlite3_free(tls, zOal)
}
}
@@ -161588,16 +164241,16 @@ func rbuDeleteOalFile(tls *libc.TLS, p uintptr) { /* sqlite3.c:202795:13: */
// argument. This VFS will be used unless the call to sqlite3rbu_open()
// specified a URI with a vfs=? option in place of a target database
// file name.
-func rbuCreateVfs(tls *libc.TLS, p uintptr) { /* sqlite3.c:202811:13: */
+func rbuCreateVfs(tls *libc.TLS, p uintptr) { /* sqlite3.c:203895:13: */
bp := tls.Alloc(76)
defer tls.Free(76)
// var rnd int32 at bp+8, 4
- // var zRnd [64]int8 at bp+12, 64
+ // var zRnd [64]uint8 at bp+12, 64
Xsqlite3_randomness(tls, int32(unsafe.Sizeof(int32(0))), bp+8 /* &rnd */)
- Xsqlite3_snprintf(tls, int32(unsafe.Sizeof([64]int8{})), bp+12 /* &zRnd[0] */, ts+29658 /* "rbu_vfs_%d" */, libc.VaList(bp, *(*int32)(unsafe.Pointer(bp + 8 /* rnd */))))
+ Xsqlite3_snprintf(tls, int32(unsafe.Sizeof([64]uint8{})), bp+12 /* &zRnd[0] */, ts+30118 /* "rbu_vfs_%d" */, libc.VaList(bp, *(*int32)(unsafe.Pointer(bp + 8 /* rnd */))))
(*Sqlite3rbu)(unsafe.Pointer(p)).Frc = Xsqlite3rbu_create_vfs(tls, bp+12 /* &zRnd[0] */, uintptr(0))
if (*Sqlite3rbu)(unsafe.Pointer(p)).Frc == SQLITE_OK {
var pVfs uintptr = Xsqlite3_vfs_find(tls, bp+12 /* &zRnd[0] */)
@@ -161609,7 +164262,7 @@ func rbuCreateVfs(tls *libc.TLS, p uintptr) { /* sqlite3.c:202811:13: */
// Destroy the private VFS created for the rbu handle passed as the only
// argument by an earlier call to rbuCreateVfs().
-func rbuDeleteVfs(tls *libc.TLS, p uintptr) { /* sqlite3.c:202831:13: */
+func rbuDeleteVfs(tls *libc.TLS, p uintptr) { /* sqlite3.c:203915:13: */
if (*Sqlite3rbu)(unsafe.Pointer(p)).FzVfsName != 0 {
Xsqlite3rbu_destroy_vfs(tls, (*Sqlite3rbu)(unsafe.Pointer(p)).FzVfsName)
(*Sqlite3rbu)(unsafe.Pointer(p)).FzVfsName = uintptr(0)
@@ -161619,7 +164272,7 @@ func rbuDeleteVfs(tls *libc.TLS, p uintptr) { /* sqlite3.c:202831:13: */
// This user-defined SQL function is invoked with a single argument - the
// name of a table expected to appear in the target database. It returns
// the number of auxilliary indexes on the table.
-func rbuIndexCntFunc(tls *libc.TLS, pCtx uintptr, nVal int32, apVal uintptr) { /* sqlite3.c:202843:13: */
+func rbuIndexCntFunc(tls *libc.TLS, pCtx uintptr, nVal int32, apVal uintptr) { /* sqlite3.c:203927:13: */
bp := tls.Alloc(24)
defer tls.Free(24)
@@ -161636,7 +164289,7 @@ func rbuIndexCntFunc(tls *libc.TLS, pCtx uintptr, nVal int32, apVal uintptr) { /
rc = prepareFreeAndCollectError(tls, db, bp+8 /* &pStmt */, bp+16, /* &zErrmsg */
Xsqlite3_mprintf(tls,
- ts+29669 /* "SELECT count(*) ..." */, libc.VaList(bp, Xsqlite3_value_text(tls, *(*uintptr)(unsafe.Pointer(apVal))))))
+ ts+30129 /* "SELECT count(*) ..." */, libc.VaList(bp, Xsqlite3_value_text(tls, *(*uintptr)(unsafe.Pointer(apVal))))))
if rc != SQLITE_OK {
Xsqlite3_result_error(tls, pCtx, *(*uintptr)(unsafe.Pointer(bp + 16 /* zErrmsg */)), -1)
} else {
@@ -161668,7 +164321,7 @@ func rbuIndexCntFunc(tls *libc.TLS, pCtx uintptr, nVal int32, apVal uintptr) { /
// sqlite3rbu.nPhaseOneStep is initialized to the sum of (1 + nIndex) * cnt
// for all rows in the rbu_count table, where nIndex is the number of
// indexes on the corresponding target database table.
-func rbuInitPhaseOneSteps(tls *libc.TLS, p uintptr) { /* sqlite3.c:202893:13: */
+func rbuInitPhaseOneSteps(tls *libc.TLS, p uintptr) { /* sqlite3.c:203977:13: */
bp := tls.Alloc(8)
defer tls.Free(8)
@@ -161679,7 +164332,7 @@ func rbuInitPhaseOneSteps(tls *libc.TLS, p uintptr) { /* sqlite3.c:202893:13: */
(*Sqlite3rbu)(unsafe.Pointer(p)).FnPhaseOneStep = int64(-1)
(*Sqlite3rbu)(unsafe.Pointer(p)).Frc = Xsqlite3_create_function(tls, (*Sqlite3rbu)(unsafe.Pointer(p)).FdbRbu,
- ts+29741 /* "rbu_index_cnt" */, 1, SQLITE_UTF8, p, *(*uintptr)(unsafe.Pointer(&struct {
+ ts+30201 /* "rbu_index_cnt" */, 1, SQLITE_UTF8, p, *(*uintptr)(unsafe.Pointer(&struct {
f func(*libc.TLS, uintptr, int32, uintptr)
}{rbuIndexCntFunc})), uintptr(0), uintptr(0))
@@ -161687,7 +164340,7 @@ func rbuInitPhaseOneSteps(tls *libc.TLS, p uintptr) { /* sqlite3.c:202893:13: */
// occurs, nPhaseOneStep will be left set to -1.
if (*Sqlite3rbu)(unsafe.Pointer(p)).Frc == SQLITE_OK {
(*Sqlite3rbu)(unsafe.Pointer(p)).Frc = prepareAndCollectError(tls, (*Sqlite3rbu)(unsafe.Pointer(p)).FdbRbu, bp /* &pStmt */, (p + 64 /* &.zErrmsg */),
- ts+29755 /* "SELECT 1 FROM sq..." */)
+ ts+30215 /* "SELECT 1 FROM sq..." */)
}
if (*Sqlite3rbu)(unsafe.Pointer(p)).Frc == SQLITE_OK {
if SQLITE_ROW == Xsqlite3_step(tls, *(*uintptr)(unsafe.Pointer(bp /* pStmt */))) {
@@ -161699,7 +164352,7 @@ func rbuInitPhaseOneSteps(tls *libc.TLS, p uintptr) { /* sqlite3.c:202893:13: */
if ((*Sqlite3rbu)(unsafe.Pointer(p)).Frc == SQLITE_OK) && (bExists != 0) {
(*Sqlite3rbu)(unsafe.Pointer(p)).Frc = prepareAndCollectError(tls, (*Sqlite3rbu)(unsafe.Pointer(p)).FdbRbu, bp /* &pStmt */, (p + 64 /* &.zErrmsg */),
- ts+29812 /* "SELECT sum(cnt *..." */)
+ ts+30272 /* "SELECT sum(cnt *..." */)
if (*Sqlite3rbu)(unsafe.Pointer(p)).Frc == SQLITE_OK {
if SQLITE_ROW == Xsqlite3_step(tls, *(*uintptr)(unsafe.Pointer(bp /* pStmt */))) {
(*Sqlite3rbu)(unsafe.Pointer(p)).FnPhaseOneStep = Xsqlite3_column_int64(tls, *(*uintptr)(unsafe.Pointer(bp /* pStmt */)), 0)
@@ -161710,7 +164363,7 @@ func rbuInitPhaseOneSteps(tls *libc.TLS, p uintptr) { /* sqlite3.c:202893:13: */
}
}
-func openRbuHandle(tls *libc.TLS, zTarget uintptr, zRbu uintptr, zState uintptr) uintptr { /* sqlite3.c:202934:19: */
+func openRbuHandle(tls *libc.TLS, zTarget uintptr, zRbu uintptr, zState uintptr) uintptr { /* sqlite3.c:204018:19: */
bp := tls.Alloc(20)
defer tls.Free(20)
@@ -161745,7 +164398,7 @@ func openRbuHandle(tls *libc.TLS, zTarget uintptr, zRbu uintptr, zState uintptr)
libc.Xmemcpy(tls, (*Sqlite3rbu)(unsafe.Pointer(p)).FzRbu, zRbu, (nRbu + uint64(1)))
pCsr += (uintptr(nRbu + uint64(1)))
if zState != 0 {
- (*Sqlite3rbu)(unsafe.Pointer(p)).FzState = rbuMPrintf(tls, p, ts+2718 /* "%s" */, libc.VaList(bp, zState))
+ (*Sqlite3rbu)(unsafe.Pointer(p)).FzState = rbuMPrintf(tls, p, ts+2790 /* "%s" */, libc.VaList(bp, zState))
}
// If the first attempt to open the database file fails and the bRetry
@@ -161782,7 +164435,7 @@ func openRbuHandle(tls *libc.TLS, zTarget uintptr, zRbu uintptr, zState uintptr)
if ((*Sqlite3rbu)(unsafe.Pointer(p)).Frc == SQLITE_OK) && ((*Rbu_file)(unsafe.Pointer((*Sqlite3rbu)(unsafe.Pointer(p)).FpTargetFd)).FpWalFd != 0) {
if (*Sqlite3rbu)(unsafe.Pointer(p)).FeStage == RBU_STAGE_OAL {
(*Sqlite3rbu)(unsafe.Pointer(p)).Frc = SQLITE_ERROR
- (*Sqlite3rbu)(unsafe.Pointer(p)).FzErrmsg = Xsqlite3_mprintf(tls, ts+29886 /* "cannot update wa..." */, 0)
+ (*Sqlite3rbu)(unsafe.Pointer(p)).FzErrmsg = Xsqlite3_mprintf(tls, ts+30346 /* "cannot update wa..." */, 0)
} else if (*Sqlite3rbu)(unsafe.Pointer(p)).FeStage == RBU_STAGE_MOVE {
(*Sqlite3rbu)(unsafe.Pointer(p)).FeStage = RBU_STAGE_CKPT
(*Sqlite3rbu)(unsafe.Pointer(p)).FnStep = 0
@@ -161804,12 +164457,12 @@ func openRbuHandle(tls *libc.TLS, zTarget uintptr, zRbu uintptr, zState uintptr)
// transaction is committed in rollback mode) currently stored on
// page 1 of the database file.
(*Sqlite3rbu)(unsafe.Pointer(p)).Frc = SQLITE_BUSY
- (*Sqlite3rbu)(unsafe.Pointer(p)).FzErrmsg = Xsqlite3_mprintf(tls, ts+29918, /* "database modifie..." */
+ (*Sqlite3rbu)(unsafe.Pointer(p)).FzErrmsg = Xsqlite3_mprintf(tls, ts+30378, /* "database modifie..." */
libc.VaList(bp+8, func() uintptr {
if (*Sqlite3rbu)(unsafe.Pointer((p))).FzTarget == uintptr(0) {
- return ts + 29950 /* "vacuum" */
+ return ts + 30410 /* "vacuum" */
}
- return ts + 29957 /* "update" */
+ return ts + 30417 /* "update" */
}()))
}
}
@@ -161817,7 +164470,7 @@ func openRbuHandle(tls *libc.TLS, zTarget uintptr, zRbu uintptr, zState uintptr)
if (*Sqlite3rbu)(unsafe.Pointer(p)).Frc == SQLITE_OK {
if (*Sqlite3rbu)(unsafe.Pointer(p)).FeStage == RBU_STAGE_OAL {
var db uintptr = (*Sqlite3rbu)(unsafe.Pointer(p)).FdbMain
- (*Sqlite3rbu)(unsafe.Pointer(p)).Frc = Xsqlite3_exec(tls, (*Sqlite3rbu)(unsafe.Pointer(p)).FdbRbu, ts+12760 /* "BEGIN" */, uintptr(0), uintptr(0), (p + 64 /* &.zErrmsg */))
+ (*Sqlite3rbu)(unsafe.Pointer(p)).Frc = Xsqlite3_exec(tls, (*Sqlite3rbu)(unsafe.Pointer(p)).FdbRbu, ts+13213 /* "BEGIN" */, uintptr(0), uintptr(0), (p + 64 /* &.zErrmsg */))
// Point the object iterator at the first object
if (*Sqlite3rbu)(unsafe.Pointer(p)).Frc == SQLITE_OK {
@@ -161831,24 +164484,24 @@ func openRbuHandle(tls *libc.TLS, zTarget uintptr, zRbu uintptr, zState uintptr)
(*Sqlite3rbu)(unsafe.Pointer(p)).FeStage = RBU_STAGE_DONE
} else {
if (((*Sqlite3rbu)(unsafe.Pointer(p)).Frc == SQLITE_OK) && ((*RbuState)(unsafe.Pointer(pState)).FeStage == 0)) && ((*Sqlite3rbu)(unsafe.Pointer((p))).FzTarget == uintptr(0)) {
- rbuCopyPragma(tls, p, ts+14993 /* "page_size" */)
- rbuCopyPragma(tls, p, ts+14405 /* "auto_vacuum" */)
+ rbuCopyPragma(tls, p, ts+15448 /* "page_size" */)
+ rbuCopyPragma(tls, p, ts+14860 /* "auto_vacuum" */)
}
// Open transactions both databases. The *-oal file is opened or
// created at this point.
if (*Sqlite3rbu)(unsafe.Pointer(p)).Frc == SQLITE_OK {
- (*Sqlite3rbu)(unsafe.Pointer(p)).Frc = Xsqlite3_exec(tls, db, ts+29964 /* "BEGIN IMMEDIATE" */, uintptr(0), uintptr(0), (p + 64 /* &.zErrmsg */))
+ (*Sqlite3rbu)(unsafe.Pointer(p)).Frc = Xsqlite3_exec(tls, db, ts+30424 /* "BEGIN IMMEDIATE" */, uintptr(0), uintptr(0), (p + 64 /* &.zErrmsg */))
}
// Check if the main database is a zipvfs db. If it is, set the upper
// level pager to use "journal_mode=off". This prevents it from
// generating a large journal using a temp file.
if (*Sqlite3rbu)(unsafe.Pointer(p)).Frc == SQLITE_OK {
- var frc int32 = Xsqlite3_file_control(tls, db, ts+5327 /* "main" */, SQLITE_FCNTL_ZIPVFS, uintptr(0))
+ var frc int32 = Xsqlite3_file_control(tls, db, ts+5458 /* "main" */, SQLITE_FCNTL_ZIPVFS, uintptr(0))
if frc == SQLITE_OK {
(*Sqlite3rbu)(unsafe.Pointer(p)).Frc = Xsqlite3_exec(tls,
- db, ts+29980 /* "PRAGMA journal_m..." */, uintptr(0), uintptr(0), (p + 64 /* &.zErrmsg */))
+ db, ts+30440 /* "PRAGMA journal_m..." */, uintptr(0), uintptr(0), (p + 64 /* &.zErrmsg */))
}
}
@@ -161875,7 +164528,7 @@ func openRbuHandle(tls *libc.TLS, zTarget uintptr, zRbu uintptr, zState uintptr)
// Allocate and return an RBU handle with all fields zeroed except for the
// error code, which is set to SQLITE_MISUSE.
-func rbuMisuseError(tls *libc.TLS) uintptr { /* sqlite3.c:203090:19: */
+func rbuMisuseError(tls *libc.TLS) uintptr { /* sqlite3.c:204174:19: */
var pRet uintptr
pRet = Xsqlite3_malloc64(tls, uint64(unsafe.Sizeof(Sqlite3rbu{})))
if pRet != 0 {
@@ -161886,7 +164539,7 @@ func rbuMisuseError(tls *libc.TLS) uintptr { /* sqlite3.c:203090:19: */
}
// Open and return a new RBU handle.
-func Xsqlite3rbu_open(tls *libc.TLS, zTarget uintptr, zRbu uintptr, zState uintptr) uintptr { /* sqlite3.c:203103:23: */
+func Xsqlite3rbu_open(tls *libc.TLS, zTarget uintptr, zRbu uintptr, zState uintptr) uintptr { /* sqlite3.c:204187:23: */
if (zTarget == uintptr(0)) || (zRbu == uintptr(0)) {
return rbuMisuseError(tls)
}
@@ -161895,13 +164548,13 @@ func Xsqlite3rbu_open(tls *libc.TLS, zTarget uintptr, zRbu uintptr, zState uintp
}
// Open a handle to begin or resume an RBU VACUUM operation.
-func Xsqlite3rbu_vacuum(tls *libc.TLS, zTarget uintptr, zState uintptr) uintptr { /* sqlite3.c:203116:23: */
+func Xsqlite3rbu_vacuum(tls *libc.TLS, zTarget uintptr, zState uintptr) uintptr { /* sqlite3.c:204200:23: */
if zTarget == uintptr(0) {
return rbuMisuseError(tls)
}
if zState != 0 {
var n int32 = int32(libc.Xstrlen(tls, zState))
- if (n >= 7) && (0 == libc.Xmemcmp(tls, ts+30004 /* "-vactmp" */, (zState+uintptr((n-7))), uint64(7))) {
+ if (n >= 7) && (0 == libc.Xmemcmp(tls, ts+30464 /* "-vactmp" */, (zState+uintptr((n-7))), uint64(7))) {
return rbuMisuseError(tls)
}
}
@@ -161910,7 +164563,7 @@ func Xsqlite3rbu_vacuum(tls *libc.TLS, zTarget uintptr, zState uintptr) uintptr
}
// Return the database handle used by pRbu.
-func Xsqlite3rbu_db(tls *libc.TLS, pRbu uintptr, bRbu int32) uintptr { /* sqlite3.c:203134:20: */
+func Xsqlite3rbu_db(tls *libc.TLS, pRbu uintptr, bRbu int32) uintptr { /* sqlite3.c:204218:20: */
var db uintptr = uintptr(0)
if pRbu != 0 {
db = func() uintptr {
@@ -161926,14 +164579,14 @@ func Xsqlite3rbu_db(tls *libc.TLS, pRbu uintptr, bRbu int32) uintptr { /* sqlite
// If the error code currently stored in the RBU handle is SQLITE_CONSTRAINT,
// then edit any error message string so as to remove all occurrences of
// the pattern "rbu_imp_[0-9]*".
-func rbuEditErrmsg(tls *libc.TLS, p uintptr) { /* sqlite3.c:203148:13: */
+func rbuEditErrmsg(tls *libc.TLS, p uintptr) { /* sqlite3.c:204232:13: */
if ((*Sqlite3rbu)(unsafe.Pointer(p)).Frc == SQLITE_CONSTRAINT) && ((*Sqlite3rbu)(unsafe.Pointer(p)).FzErrmsg != 0) {
var i uint32
var nErrmsg Size_t = libc.Xstrlen(tls, (*Sqlite3rbu)(unsafe.Pointer(p)).FzErrmsg)
for i = uint32(0); Size_t(i) < (nErrmsg - uint64(8)); i++ {
- if libc.Xmemcmp(tls, ((*Sqlite3rbu)(unsafe.Pointer(p)).FzErrmsg+uintptr(i)), ts+28055 /* "rbu_imp_" */, uint64(8)) == 0 {
+ if libc.Xmemcmp(tls, ((*Sqlite3rbu)(unsafe.Pointer(p)).FzErrmsg+uintptr(i)), ts+28515 /* "rbu_imp_" */, uint64(8)) == 0 {
var nDel int32 = 8
- for (int32(*(*int8)(unsafe.Pointer((*Sqlite3rbu)(unsafe.Pointer(p)).FzErrmsg + uintptr((i + uint32(nDel)))))) >= '0') && (int32(*(*int8)(unsafe.Pointer((*Sqlite3rbu)(unsafe.Pointer(p)).FzErrmsg + uintptr((i + uint32(nDel)))))) <= '9') {
+ for (int32(*(*uint8)(unsafe.Pointer((*Sqlite3rbu)(unsafe.Pointer(p)).FzErrmsg + uintptr((i + uint32(nDel)))))) >= '0') && (int32(*(*uint8)(unsafe.Pointer((*Sqlite3rbu)(unsafe.Pointer(p)).FzErrmsg + uintptr((i + uint32(nDel)))))) <= '9') {
nDel++
}
libc.Xmemmove(tls, ((*Sqlite3rbu)(unsafe.Pointer(p)).FzErrmsg + uintptr(i)), ((*Sqlite3rbu)(unsafe.Pointer(p)).FzErrmsg + uintptr((i + uint32(nDel)))), (((nErrmsg + uint64(1)) - Size_t(i)) - Size_t(nDel)))
@@ -161944,25 +164597,27 @@ func rbuEditErrmsg(tls *libc.TLS, p uintptr) { /* sqlite3.c:203148:13: */
}
// Close the RBU handle.
-func Xsqlite3rbu_close(tls *libc.TLS, p uintptr, pzErrmsg uintptr) int32 { /* sqlite3.c:203166:16: */
+func Xsqlite3rbu_close(tls *libc.TLS, p uintptr, pzErrmsg uintptr) int32 { /* sqlite3.c:204250:16: */
var rc int32
if p != 0 {
// Commit the transaction to the *-oal file.
if ((*Sqlite3rbu)(unsafe.Pointer(p)).Frc == SQLITE_OK) && ((*Sqlite3rbu)(unsafe.Pointer(p)).FeStage == RBU_STAGE_OAL) {
- (*Sqlite3rbu)(unsafe.Pointer(p)).Frc = Xsqlite3_exec(tls, (*Sqlite3rbu)(unsafe.Pointer(p)).FdbMain, ts+12775 /* "COMMIT" */, uintptr(0), uintptr(0), (p + 64 /* &.zErrmsg */))
+ (*Sqlite3rbu)(unsafe.Pointer(p)).Frc = Xsqlite3_exec(tls, (*Sqlite3rbu)(unsafe.Pointer(p)).FdbMain, ts+13228 /* "COMMIT" */, uintptr(0), uintptr(0), (p + 64 /* &.zErrmsg */))
}
// Sync the db file if currently doing an incremental checkpoint
if ((*Sqlite3rbu)(unsafe.Pointer(p)).Frc == SQLITE_OK) && ((*Sqlite3rbu)(unsafe.Pointer(p)).FeStage == RBU_STAGE_CKPT) {
var pDb uintptr = (*Rbu_file)(unsafe.Pointer((*Sqlite3rbu)(unsafe.Pointer(p)).FpTargetFd)).FpReal
- (*Sqlite3rbu)(unsafe.Pointer(p)).Frc = (*(*func(*libc.TLS, uintptr, int32) int32)(unsafe.Pointer(((*Sqlite3_file)(unsafe.Pointer(pDb)).FpMethods + 40 /* &.xSync */))))(tls, pDb, SQLITE_SYNC_NORMAL)
+ (*Sqlite3rbu)(unsafe.Pointer(p)).Frc = (*struct {
+ f func(*libc.TLS, uintptr, int32) int32
+ })(unsafe.Pointer(&struct{ uintptr }{(*sqlite3_io_methods)(unsafe.Pointer((*Sqlite3_file)(unsafe.Pointer(pDb)).FpMethods)).FxSync})).f(tls, pDb, SQLITE_SYNC_NORMAL)
}
rbuSaveState(tls, p, (*Sqlite3rbu)(unsafe.Pointer(p)).FeStage)
if ((*Sqlite3rbu)(unsafe.Pointer(p)).Frc == SQLITE_OK) && ((*Sqlite3rbu)(unsafe.Pointer(p)).FeStage == RBU_STAGE_OAL) {
- (*Sqlite3rbu)(unsafe.Pointer(p)).Frc = Xsqlite3_exec(tls, (*Sqlite3rbu)(unsafe.Pointer(p)).FdbRbu, ts+12775 /* "COMMIT" */, uintptr(0), uintptr(0), (p + 64 /* &.zErrmsg */))
+ (*Sqlite3rbu)(unsafe.Pointer(p)).Frc = Xsqlite3_exec(tls, (*Sqlite3rbu)(unsafe.Pointer(p)).FdbRbu, ts+13228 /* "COMMIT" */, uintptr(0), uintptr(0), (p + 64 /* &.zErrmsg */))
}
// Close any open statement handles.
@@ -161974,7 +164629,7 @@ func Xsqlite3rbu_close(tls *libc.TLS, p uintptr, pzErrmsg uintptr) int32 { /* sq
// specifying the current target and state databases to start a new
// vacuum from scratch.
if (((*Sqlite3rbu)(unsafe.Pointer((p))).FzTarget == uintptr(0)) && ((*Sqlite3rbu)(unsafe.Pointer(p)).Frc != SQLITE_OK)) && ((*Sqlite3rbu)(unsafe.Pointer(p)).FdbRbu != 0) {
- var rc2 int32 = Xsqlite3_exec(tls, (*Sqlite3rbu)(unsafe.Pointer(p)).FdbRbu, ts+30012 /* "DELETE FROM stat..." */, uintptr(0), uintptr(0), uintptr(0))
+ var rc2 int32 = Xsqlite3_exec(tls, (*Sqlite3rbu)(unsafe.Pointer(p)).FdbRbu, ts+30472 /* "DELETE FROM stat..." */, uintptr(0), uintptr(0), uintptr(0))
if ((*Sqlite3rbu)(unsafe.Pointer(p)).Frc == SQLITE_DONE) && (rc2 != SQLITE_OK) {
(*Sqlite3rbu)(unsafe.Pointer(p)).Frc = rc2
}
@@ -162007,13 +164662,13 @@ func Xsqlite3rbu_close(tls *libc.TLS, p uintptr, pzErrmsg uintptr) int32 { /* sq
// Return the total number of key-value operations (inserts, deletes or
// updates) that have been performed on the target database since the
// current RBU update was started.
-func Xsqlite3rbu_progress(tls *libc.TLS, pRbu uintptr) Sqlite3_int64 { /* sqlite3.c:203229:26: */
+func Xsqlite3rbu_progress(tls *libc.TLS, pRbu uintptr) Sqlite3_int64 { /* sqlite3.c:204313:26: */
return Sqlite3_int64((*Sqlite3rbu)(unsafe.Pointer(pRbu)).FnProgress)
}
// Return permyriadage progress indications for the two main stages of
// an RBU update.
-func Xsqlite3rbu_bp_progress(tls *libc.TLS, p uintptr, pnOne uintptr, pnTwo uintptr) { /* sqlite3.c:203237:17: */
+func Xsqlite3rbu_bp_progress(tls *libc.TLS, p uintptr, pnOne uintptr, pnTwo uintptr) { /* sqlite3.c:204321:17: */
var MAX_PROGRESS int32 = 10000
switch (*Sqlite3rbu)(unsafe.Pointer(p)).FeStage {
case RBU_STAGE_OAL:
@@ -162046,7 +164701,7 @@ func Xsqlite3rbu_bp_progress(tls *libc.TLS, p uintptr, pnOne uintptr, pnTwo uint
}
// Return the current state of the RBU vacuum or update operation.
-func Xsqlite3rbu_state(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:203272:16: */
+func Xsqlite3rbu_state(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:204356:16: */
bp := tls.Alloc(24)
defer tls.Free(24)
@@ -162064,7 +164719,7 @@ func Xsqlite3rbu_state(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:203272:16:
return int32(0)
}
-func Xsqlite3rbu_savestate(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:203300:16: */
+func Xsqlite3rbu_savestate(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:204384:16: */
var rc int32 = (*Sqlite3rbu)(unsafe.Pointer(p)).Frc
if rc == SQLITE_DONE {
return SQLITE_OK
@@ -162073,14 +164728,16 @@ func Xsqlite3rbu_savestate(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:203300
if (*Sqlite3rbu)(unsafe.Pointer(p)).FeStage == RBU_STAGE_OAL {
if rc == SQLITE_OK {
- rc = Xsqlite3_exec(tls, (*Sqlite3rbu)(unsafe.Pointer(p)).FdbMain, ts+12775 /* "COMMIT" */, uintptr(0), uintptr(0), uintptr(0))
+ rc = Xsqlite3_exec(tls, (*Sqlite3rbu)(unsafe.Pointer(p)).FdbMain, ts+13228 /* "COMMIT" */, uintptr(0), uintptr(0), uintptr(0))
}
}
// Sync the db file
if (rc == SQLITE_OK) && ((*Sqlite3rbu)(unsafe.Pointer(p)).FeStage == RBU_STAGE_CKPT) {
var pDb uintptr = (*Rbu_file)(unsafe.Pointer((*Sqlite3rbu)(unsafe.Pointer(p)).FpTargetFd)).FpReal
- rc = (*(*func(*libc.TLS, uintptr, int32) int32)(unsafe.Pointer(((*Sqlite3_file)(unsafe.Pointer(pDb)).FpMethods + 40 /* &.xSync */))))(tls, pDb, SQLITE_SYNC_NORMAL)
+ rc = (*struct {
+ f func(*libc.TLS, uintptr, int32) int32
+ })(unsafe.Pointer(&struct{ uintptr }{(*sqlite3_io_methods)(unsafe.Pointer((*Sqlite3_file)(unsafe.Pointer(pDb)).FpMethods)).FxSync})).f(tls, pDb, SQLITE_SYNC_NORMAL)
}
(*Sqlite3rbu)(unsafe.Pointer(p)).Frc = rc
@@ -162090,19 +164747,19 @@ func Xsqlite3rbu_savestate(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:203300
if (*Sqlite3rbu)(unsafe.Pointer(p)).FeStage == RBU_STAGE_OAL {
if rc == SQLITE_OK {
- rc = Xsqlite3_exec(tls, (*Sqlite3rbu)(unsafe.Pointer(p)).FdbRbu, ts+12775 /* "COMMIT" */, uintptr(0), uintptr(0), uintptr(0))
+ rc = Xsqlite3_exec(tls, (*Sqlite3rbu)(unsafe.Pointer(p)).FdbRbu, ts+13228 /* "COMMIT" */, uintptr(0), uintptr(0), uintptr(0))
}
if rc == SQLITE_OK {
var zBegin uintptr
if (*Sqlite3rbu)(unsafe.Pointer((p))).FzTarget == uintptr(0) {
- zBegin = ts + 12760 /* "BEGIN" */
+ zBegin = ts + 13213 /* "BEGIN" */
} else {
- zBegin = ts + 29964 /* "BEGIN IMMEDIATE" */
+ zBegin = ts + 30424 /* "BEGIN IMMEDIATE" */
}
rc = Xsqlite3_exec(tls, (*Sqlite3rbu)(unsafe.Pointer(p)).FdbRbu, zBegin, uintptr(0), uintptr(0), uintptr(0))
}
if rc == SQLITE_OK {
- rc = Xsqlite3_exec(tls, (*Sqlite3rbu)(unsafe.Pointer(p)).FdbMain, ts+29964 /* "BEGIN IMMEDIATE" */, uintptr(0), uintptr(0), uintptr(0))
+ rc = Xsqlite3_exec(tls, (*Sqlite3rbu)(unsafe.Pointer(p)).FdbMain, ts+30424 /* "BEGIN IMMEDIATE" */, uintptr(0), uintptr(0), uintptr(0))
}
}
@@ -162169,14 +164826,16 @@ func Xsqlite3rbu_savestate(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:203300
// relinquished). Finally, calls to xSync() on the target database
// file fail with SQLITE_INTERNAL errors.
-func rbuUnlockShm(tls *libc.TLS, p uintptr) { /* sqlite3.c:203393:13: */
+func rbuUnlockShm(tls *libc.TLS, p uintptr) { /* sqlite3.c:204477:13: */
if (*Rbu_file)(unsafe.Pointer(p)).FpRbu != 0 {
var xShmLock uintptr = (*sqlite3_io_methods)(unsafe.Pointer((*Sqlite3_file)(unsafe.Pointer((*Rbu_file)(unsafe.Pointer(p)).FpReal)).FpMethods)).FxShmLock
var i int32
for i = 0; i < SQLITE_SHM_NLOCK; i++ {
if ((U32(int32(1) << i)) & (*Sqlite3rbu)(unsafe.Pointer((*Rbu_file)(unsafe.Pointer(p)).FpRbu)).FmLock) != 0 {
- (*(*func(*libc.TLS, uintptr, int32, int32, int32) int32)(unsafe.Pointer(&xShmLock)))(tls, (*Rbu_file)(unsafe.Pointer(p)).FpReal, i, 1, (SQLITE_SHM_UNLOCK | SQLITE_SHM_EXCLUSIVE))
+ (*struct {
+ f func(*libc.TLS, uintptr, int32, int32, int32) int32
+ })(unsafe.Pointer(&struct{ uintptr }{xShmLock})).f(tls, (*Rbu_file)(unsafe.Pointer(p)).FpReal, i, 1, (SQLITE_SHM_UNLOCK | SQLITE_SHM_EXCLUSIVE))
}
}
(*Sqlite3rbu)(unsafe.Pointer((*Rbu_file)(unsafe.Pointer(p)).FpRbu)).FmLock = U32(0)
@@ -162184,7 +164843,7 @@ func rbuUnlockShm(tls *libc.TLS, p uintptr) { /* sqlite3.c:203393:13: */
}
//
-func rbuUpdateTempSize(tls *libc.TLS, pFd uintptr, nNew Sqlite3_int64) int32 { /* sqlite3.c:203409:12: */
+func rbuUpdateTempSize(tls *libc.TLS, pFd uintptr, nNew Sqlite3_int64) int32 { /* sqlite3.c:204493:12: */
var pRbu uintptr = (*Rbu_file)(unsafe.Pointer(pFd)).FpRbu
var nDiff I64 = (nNew - (*Rbu_file)(unsafe.Pointer(pFd)).Fsz)
*(*I64)(unsafe.Pointer(pRbu + 360 /* &.szTemp */)) += (nDiff)
@@ -162202,7 +164861,7 @@ func rbuUpdateTempSize(tls *libc.TLS, pFd uintptr, nNew Sqlite3_int64) int32 { /
// for all file descriptors with rbu_file.pDb!=0. If the argument has
// rbu_file.pDb!=0, then it is assumed to already be present on the
// main list and is only added to the pDb!=0 list.
-func rbuMainlistAdd(tls *libc.TLS, p uintptr) { /* sqlite3.c:203427:13: */
+func rbuMainlistAdd(tls *libc.TLS, p uintptr) { /* sqlite3.c:204511:13: */
var pRbuVfs uintptr = (*Rbu_file)(unsafe.Pointer(p)).FpRbuVfs
var pIter uintptr
@@ -162224,7 +164883,7 @@ func rbuMainlistAdd(tls *libc.TLS, p uintptr) { /* sqlite3.c:203427:13: */
}
// Remove an item from the main-db lists.
-func rbuMainlistRemove(tls *libc.TLS, p uintptr) { /* sqlite3.c:203449:13: */
+func rbuMainlistRemove(tls *libc.TLS, p uintptr) { /* sqlite3.c:204533:13: */
var pp uintptr
Xsqlite3_mutex_enter(tls, (*Rbu_vfs)(unsafe.Pointer((*Rbu_file)(unsafe.Pointer(p)).FpRbuVfs)).Fmutex)
for pp = ((*Rbu_file)(unsafe.Pointer(p)).FpRbuVfs + 192 /* &.pMain */); (*(*uintptr)(unsafe.Pointer(pp)) != 0) && (*(*uintptr)(unsafe.Pointer(pp)) != p); pp = (*(*uintptr)(unsafe.Pointer(pp)) + 88 /* &.pMainNext */) {
@@ -162249,7 +164908,7 @@ func rbuMainlistRemove(tls *libc.TLS, p uintptr) { /* sqlite3.c:203449:13: */
//
// If parameter bRbu is true, only search for file-descriptors with
// rbu_file.pDb!=0.
-func rbuFindMaindb(tls *libc.TLS, pRbuVfs uintptr, zWal uintptr, bRbu int32) uintptr { /* sqlite3.c:203470:17: */
+func rbuFindMaindb(tls *libc.TLS, pRbuVfs uintptr, zWal uintptr, bRbu int32) uintptr { /* sqlite3.c:204554:17: */
var pDb uintptr
Xsqlite3_mutex_enter(tls, (*Rbu_vfs)(unsafe.Pointer(pRbuVfs)).Fmutex)
if bRbu != 0 {
@@ -162264,7 +164923,7 @@ func rbuFindMaindb(tls *libc.TLS, pRbuVfs uintptr, zWal uintptr, bRbu int32) uin
}
// Close an rbu file.
-func rbuVfsClose(tls *libc.TLS, pFile uintptr) int32 { /* sqlite3.c:203485:12: */
+func rbuVfsClose(tls *libc.TLS, pFile uintptr) int32 { /* sqlite3.c:204569:12: */
var p uintptr = pFile
var rc int32
var i int32
@@ -162280,19 +164939,23 @@ func rbuVfsClose(tls *libc.TLS, pFile uintptr) int32 { /* sqlite3.c:203485:12: *
if ((*Rbu_file)(unsafe.Pointer(p)).FopenFlags & SQLITE_OPEN_MAIN_DB) != 0 {
rbuMainlistRemove(tls, p)
rbuUnlockShm(tls, p)
- (*(*func(*libc.TLS, uintptr, int32) int32)(unsafe.Pointer(((*Sqlite3_file)(unsafe.Pointer((*Rbu_file)(unsafe.Pointer(p)).FpReal)).FpMethods + 128 /* &.xShmUnmap */))))(tls, (*Rbu_file)(unsafe.Pointer(p)).FpReal, 0)
+ (*struct {
+ f func(*libc.TLS, uintptr, int32) int32
+ })(unsafe.Pointer(&struct{ uintptr }{(*sqlite3_io_methods)(unsafe.Pointer((*Sqlite3_file)(unsafe.Pointer((*Rbu_file)(unsafe.Pointer(p)).FpReal)).FpMethods)).FxShmUnmap})).f(tls, (*Rbu_file)(unsafe.Pointer(p)).FpReal, 0)
} else if (((*Rbu_file)(unsafe.Pointer(p)).FopenFlags & SQLITE_OPEN_DELETEONCLOSE) != 0) && ((*Rbu_file)(unsafe.Pointer(p)).FpRbu != 0) {
rbuUpdateTempSize(tls, p, int64(0))
}
// Close the underlying file handle
- rc = (*(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(((*Sqlite3_file)(unsafe.Pointer((*Rbu_file)(unsafe.Pointer(p)).FpReal)).FpMethods + 8 /* &.xClose */))))(tls, (*Rbu_file)(unsafe.Pointer(p)).FpReal)
+ rc = (*struct {
+ f func(*libc.TLS, uintptr) int32
+ })(unsafe.Pointer(&struct{ uintptr }{(*sqlite3_io_methods)(unsafe.Pointer((*Sqlite3_file)(unsafe.Pointer((*Rbu_file)(unsafe.Pointer(p)).FpReal)).FpMethods)).FxClose})).f(tls, (*Rbu_file)(unsafe.Pointer(p)).FpReal)
return rc
}
// Read and return an unsigned 32-bit big-endian integer from the buffer
// passed as the only argument.
-func rbuGetU32(tls *libc.TLS, aBuf uintptr) U32 { /* sqlite3.c:203518:12: */
+func rbuGetU32(tls *libc.TLS, aBuf uintptr) U32 { /* sqlite3.c:204602:12: */
return ((((U32(*(*U8)(unsafe.Pointer(aBuf))) << 24) +
(U32(*(*U8)(unsafe.Pointer(aBuf + 1))) << 16)) +
(U32(*(*U8)(unsafe.Pointer(aBuf + 2))) << 8)) +
@@ -162301,20 +164964,20 @@ func rbuGetU32(tls *libc.TLS, aBuf uintptr) U32 { /* sqlite3.c:203518:12: */
// Write an unsigned 32-bit value in big-endian format to the supplied
// buffer.
-func rbuPutU32(tls *libc.TLS, aBuf uintptr, iVal U32) { /* sqlite3.c:203529:13: */
+func rbuPutU32(tls *libc.TLS, aBuf uintptr, iVal U32) { /* sqlite3.c:204613:13: */
*(*U8)(unsafe.Pointer(aBuf)) = (U8((iVal >> 24) & U32(0xFF)))
*(*U8)(unsafe.Pointer(aBuf + 1)) = (U8((iVal >> 16) & U32(0xFF)))
*(*U8)(unsafe.Pointer(aBuf + 2)) = (U8((iVal >> 8) & U32(0xFF)))
*(*U8)(unsafe.Pointer(aBuf + 3)) = (U8((iVal >> 0) & U32(0xFF)))
}
-func rbuPutU16(tls *libc.TLS, aBuf uintptr, iVal U16) { /* sqlite3.c:203536:13: */
+func rbuPutU16(tls *libc.TLS, aBuf uintptr, iVal U16) { /* sqlite3.c:204620:13: */
*(*U8)(unsafe.Pointer(aBuf)) = (U8((int32(iVal) >> 8) & 0xFF))
*(*U8)(unsafe.Pointer(aBuf + 1)) = (U8((int32(iVal) >> 0) & 0xFF))
}
// Read data from an rbuVfs-file.
-func rbuVfsRead(tls *libc.TLS, pFile uintptr, zBuf uintptr, iAmt int32, iOfst Sqlite_int64) int32 { /* sqlite3.c:203544:12: */
+func rbuVfsRead(tls *libc.TLS, pFile uintptr, zBuf uintptr, iAmt int32, iOfst Sqlite_int64) int32 { /* sqlite3.c:204628:12: */
var p uintptr = pFile
var pRbu uintptr = (*Rbu_file)(unsafe.Pointer(p)).FpRbu
var rc int32
@@ -162329,7 +164992,9 @@ func rbuVfsRead(tls *libc.TLS, pFile uintptr, zBuf uintptr, iAmt int32, iOfst Sq
rc = SQLITE_OK
libc.Xmemset(tls, zBuf, 0, uint64(iAmt))
} else {
- rc = (*(*func(*libc.TLS, uintptr, uintptr, int32, Sqlite3_int64) int32)(unsafe.Pointer(((*Sqlite3_file)(unsafe.Pointer((*Rbu_file)(unsafe.Pointer(p)).FpReal)).FpMethods + 16 /* &.xRead */))))(tls, (*Rbu_file)(unsafe.Pointer(p)).FpReal, zBuf, iAmt, iOfst)
+ rc = (*struct {
+ f func(*libc.TLS, uintptr, uintptr, int32, Sqlite3_int64) int32
+ })(unsafe.Pointer(&struct{ uintptr }{(*sqlite3_io_methods)(unsafe.Pointer((*Sqlite3_file)(unsafe.Pointer((*Rbu_file)(unsafe.Pointer(p)).FpReal)).FpMethods)).FxRead})).f(tls, (*Rbu_file)(unsafe.Pointer(p)).FpReal, zBuf, iAmt, iOfst)
// If this is being called to read the first page of the target
// database as part of an rbu vacuum operation, synthesize the
// contents of the first page if it does not yet exist. Otherwise,
@@ -162339,7 +165004,9 @@ func rbuVfsRead(tls *libc.TLS, pFile uintptr, zBuf uintptr, iAmt int32, iOfst Sq
(((*Rbu_file)(unsafe.Pointer(p)).FopenFlags & SQLITE_OPEN_MAIN_DB) != 0)) &&
((*Sqlite3rbu)(unsafe.Pointer(pRbu)).Frc == SQLITE_OK) {
var pFd uintptr = (*Sqlite3rbu)(unsafe.Pointer(pRbu)).FpRbuFd
- rc = (*(*func(*libc.TLS, uintptr, uintptr, int32, Sqlite3_int64) int32)(unsafe.Pointer(((*Sqlite3_file)(unsafe.Pointer(pFd)).FpMethods + 16 /* &.xRead */))))(tls, pFd, zBuf, iAmt, iOfst)
+ rc = (*struct {
+ f func(*libc.TLS, uintptr, uintptr, int32, Sqlite3_int64) int32
+ })(unsafe.Pointer(&struct{ uintptr }{(*sqlite3_io_methods)(unsafe.Pointer((*Sqlite3_file)(unsafe.Pointer(pFd)).FpMethods)).FxRead})).f(tls, pFd, zBuf, iAmt, iOfst)
if rc == SQLITE_OK {
var aBuf uintptr = zBuf
var iRoot U32
@@ -162374,7 +165041,7 @@ func rbuVfsRead(tls *libc.TLS, pFile uintptr, zBuf uintptr, iAmt int32, iOfst Sq
}
// Write data to an rbuVfs-file.
-func rbuVfsWrite(tls *libc.TLS, pFile uintptr, zBuf uintptr, iAmt int32, iOfst Sqlite_int64) int32 { /* sqlite3.c:203610:12: */
+func rbuVfsWrite(tls *libc.TLS, pFile uintptr, zBuf uintptr, iAmt int32, iOfst Sqlite_int64) int32 { /* sqlite3.c:204694:12: */
var p uintptr = pFile
var pRbu uintptr = (*Rbu_file)(unsafe.Pointer(p)).FpRbu
var rc int32
@@ -162398,7 +165065,9 @@ func rbuVfsWrite(tls *libc.TLS, pFile uintptr, zBuf uintptr, iAmt int32, iOfst S
}
}
}
- rc = (*(*func(*libc.TLS, uintptr, uintptr, int32, Sqlite3_int64) int32)(unsafe.Pointer(((*Sqlite3_file)(unsafe.Pointer((*Rbu_file)(unsafe.Pointer(p)).FpReal)).FpMethods + 24 /* &.xWrite */))))(tls, (*Rbu_file)(unsafe.Pointer(p)).FpReal, zBuf, iAmt, iOfst)
+ rc = (*struct {
+ f func(*libc.TLS, uintptr, uintptr, int32, Sqlite3_int64) int32
+ })(unsafe.Pointer(&struct{ uintptr }{(*sqlite3_io_methods)(unsafe.Pointer((*Sqlite3_file)(unsafe.Pointer((*Rbu_file)(unsafe.Pointer(p)).FpReal)).FpMethods)).FxWrite})).f(tls, (*Rbu_file)(unsafe.Pointer(p)).FpReal, zBuf, iAmt, iOfst)
if ((rc == SQLITE_OK) && (iOfst == int64(0))) && (((*Rbu_file)(unsafe.Pointer(p)).FopenFlags & SQLITE_OPEN_MAIN_DB) != 0) {
// These look like magic numbers. But they are stable, as they are part
// of the definition of the SQLite file format, which may not change.
@@ -162411,7 +165080,7 @@ func rbuVfsWrite(tls *libc.TLS, pFile uintptr, zBuf uintptr, iAmt int32, iOfst S
}
// Truncate an rbuVfs-file.
-func rbuVfsTruncate(tls *libc.TLS, pFile uintptr, size Sqlite_int64) int32 { /* sqlite3.c:203653:12: */
+func rbuVfsTruncate(tls *libc.TLS, pFile uintptr, size Sqlite_int64) int32 { /* sqlite3.c:204737:12: */
var p uintptr = pFile
if (((*Rbu_file)(unsafe.Pointer(p)).FopenFlags & SQLITE_OPEN_DELETEONCLOSE) != 0) && ((*Rbu_file)(unsafe.Pointer(p)).FpRbu != 0) {
var rc int32 = rbuUpdateTempSize(tls, p, size)
@@ -162419,11 +165088,13 @@ func rbuVfsTruncate(tls *libc.TLS, pFile uintptr, size Sqlite_int64) int32 { /*
return rc
}
}
- return (*(*func(*libc.TLS, uintptr, Sqlite3_int64) int32)(unsafe.Pointer(((*Sqlite3_file)(unsafe.Pointer((*Rbu_file)(unsafe.Pointer(p)).FpReal)).FpMethods + 32 /* &.xTruncate */))))(tls, (*Rbu_file)(unsafe.Pointer(p)).FpReal, size)
+ return (*struct {
+ f func(*libc.TLS, uintptr, Sqlite3_int64) int32
+ })(unsafe.Pointer(&struct{ uintptr }{(*sqlite3_io_methods)(unsafe.Pointer((*Sqlite3_file)(unsafe.Pointer((*Rbu_file)(unsafe.Pointer(p)).FpReal)).FpMethods)).FxTruncate})).f(tls, (*Rbu_file)(unsafe.Pointer(p)).FpReal, size)
}
// Sync an rbuVfs-file.
-func rbuVfsSync(tls *libc.TLS, pFile uintptr, flags int32) int32 { /* sqlite3.c:203665:12: */
+func rbuVfsSync(tls *libc.TLS, pFile uintptr, flags int32) int32 { /* sqlite3.c:204749:12: */
var p uintptr = pFile
if ((*Rbu_file)(unsafe.Pointer(p)).FpRbu != 0) && ((*Sqlite3rbu)(unsafe.Pointer((*Rbu_file)(unsafe.Pointer(p)).FpRbu)).FeStage == RBU_STAGE_CAPTURE) {
if ((*Rbu_file)(unsafe.Pointer(p)).FopenFlags & SQLITE_OPEN_MAIN_DB) != 0 {
@@ -162431,14 +165102,18 @@ func rbuVfsSync(tls *libc.TLS, pFile uintptr, flags int32) int32 { /* sqlite3.c:
}
return SQLITE_OK
}
- return (*(*func(*libc.TLS, uintptr, int32) int32)(unsafe.Pointer(((*Sqlite3_file)(unsafe.Pointer((*Rbu_file)(unsafe.Pointer(p)).FpReal)).FpMethods + 40 /* &.xSync */))))(tls, (*Rbu_file)(unsafe.Pointer(p)).FpReal, flags)
+ return (*struct {
+ f func(*libc.TLS, uintptr, int32) int32
+ })(unsafe.Pointer(&struct{ uintptr }{(*sqlite3_io_methods)(unsafe.Pointer((*Sqlite3_file)(unsafe.Pointer((*Rbu_file)(unsafe.Pointer(p)).FpReal)).FpMethods)).FxSync})).f(tls, (*Rbu_file)(unsafe.Pointer(p)).FpReal, flags)
}
// Return the current file-size of an rbuVfs-file.
-func rbuVfsFileSize(tls *libc.TLS, pFile uintptr, pSize uintptr) int32 { /* sqlite3.c:203679:12: */
+func rbuVfsFileSize(tls *libc.TLS, pFile uintptr, pSize uintptr) int32 { /* sqlite3.c:204763:12: */
var p uintptr = pFile
var rc int32
- rc = (*(*func(*libc.TLS, uintptr, uintptr) int32)(unsafe.Pointer(((*Sqlite3_file)(unsafe.Pointer((*Rbu_file)(unsafe.Pointer(p)).FpReal)).FpMethods + 48 /* &.xFileSize */))))(tls, (*Rbu_file)(unsafe.Pointer(p)).FpReal, pSize)
+ rc = (*struct {
+ f func(*libc.TLS, uintptr, uintptr) int32
+ })(unsafe.Pointer(&struct{ uintptr }{(*sqlite3_io_methods)(unsafe.Pointer((*Sqlite3_file)(unsafe.Pointer((*Rbu_file)(unsafe.Pointer(p)).FpReal)).FpMethods)).FxFileSize})).f(tls, (*Rbu_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
@@ -162453,7 +165128,7 @@ func rbuVfsFileSize(tls *libc.TLS, pFile uintptr, pSize uintptr) int32 { /* sqli
}
// Lock an rbuVfs-file.
-func rbuVfsLock(tls *libc.TLS, pFile uintptr, eLock int32) int32 { /* sqlite3.c:203700:12: */
+func rbuVfsLock(tls *libc.TLS, pFile uintptr, eLock int32) int32 { /* sqlite3.c:204784:12: */
var p uintptr = pFile
var pRbu uintptr = (*Rbu_file)(unsafe.Pointer(p)).FpRbu
var rc int32 = SQLITE_OK
@@ -162464,26 +165139,32 @@ func rbuVfsLock(tls *libc.TLS, pFile uintptr, eLock int32) int32 { /* sqlite3.c:
// prevents it from checkpointing the database from sqlite3_close().
rc = SQLITE_BUSY
} else {
- rc = (*(*func(*libc.TLS, uintptr, int32) int32)(unsafe.Pointer(((*Sqlite3_file)(unsafe.Pointer((*Rbu_file)(unsafe.Pointer(p)).FpReal)).FpMethods + 56 /* &.xLock */))))(tls, (*Rbu_file)(unsafe.Pointer(p)).FpReal, eLock)
+ rc = (*struct {
+ f func(*libc.TLS, uintptr, int32) int32
+ })(unsafe.Pointer(&struct{ uintptr }{(*sqlite3_io_methods)(unsafe.Pointer((*Sqlite3_file)(unsafe.Pointer((*Rbu_file)(unsafe.Pointer(p)).FpReal)).FpMethods)).FxLock})).f(tls, (*Rbu_file)(unsafe.Pointer(p)).FpReal, eLock)
}
return rc
}
// Unlock an rbuVfs-file.
-func rbuVfsUnlock(tls *libc.TLS, pFile uintptr, eLock int32) int32 { /* sqlite3.c:203722:12: */
+func rbuVfsUnlock(tls *libc.TLS, pFile uintptr, eLock int32) int32 { /* sqlite3.c:204806:12: */
var p uintptr = pFile
- return (*(*func(*libc.TLS, uintptr, int32) int32)(unsafe.Pointer(((*Sqlite3_file)(unsafe.Pointer((*Rbu_file)(unsafe.Pointer(p)).FpReal)).FpMethods + 64 /* &.xUnlock */))))(tls, (*Rbu_file)(unsafe.Pointer(p)).FpReal, eLock)
+ return (*struct {
+ f func(*libc.TLS, uintptr, int32) int32
+ })(unsafe.Pointer(&struct{ uintptr }{(*sqlite3_io_methods)(unsafe.Pointer((*Sqlite3_file)(unsafe.Pointer((*Rbu_file)(unsafe.Pointer(p)).FpReal)).FpMethods)).FxUnlock})).f(tls, (*Rbu_file)(unsafe.Pointer(p)).FpReal, eLock)
}
// Check if another file-handle holds a RESERVED lock on an rbuVfs-file.
-func rbuVfsCheckReservedLock(tls *libc.TLS, pFile uintptr, pResOut uintptr) int32 { /* sqlite3.c:203730:12: */
+func rbuVfsCheckReservedLock(tls *libc.TLS, pFile uintptr, pResOut uintptr) int32 { /* sqlite3.c:204814:12: */
var p uintptr = pFile
- return (*(*func(*libc.TLS, uintptr, uintptr) int32)(unsafe.Pointer(((*Sqlite3_file)(unsafe.Pointer((*Rbu_file)(unsafe.Pointer(p)).FpReal)).FpMethods + 72 /* &.xCheckReservedLock */))))(tls, (*Rbu_file)(unsafe.Pointer(p)).FpReal, pResOut)
+ return (*struct {
+ f func(*libc.TLS, uintptr, uintptr) int32
+ })(unsafe.Pointer(&struct{ uintptr }{(*sqlite3_io_methods)(unsafe.Pointer((*Sqlite3_file)(unsafe.Pointer((*Rbu_file)(unsafe.Pointer(p)).FpReal)).FpMethods)).FxCheckReservedLock})).f(tls, (*Rbu_file)(unsafe.Pointer(p)).FpReal, pResOut)
}
// File control method. For custom operations on an rbuVfs-file.
-func rbuVfsFileControl(tls *libc.TLS, pFile uintptr, op int32, pArg uintptr) int32 { /* sqlite3.c:203738:12: */
+func rbuVfsFileControl(tls *libc.TLS, pFile uintptr, op int32, pArg uintptr) int32 { /* sqlite3.c:204822:12: */
bp := tls.Alloc(24)
defer tls.Free(24)
@@ -162497,16 +165178,20 @@ func rbuVfsFileControl(tls *libc.TLS, pFile uintptr, op int32, pArg uintptr) int
// First try to find another RBU vfs lower down in the vfs stack. If
// one is found, this vfs will operate in pass-through mode. The lower
// level vfs will do the special RBU handling.
- rc = (*(*func(*libc.TLS, uintptr, int32, uintptr) int32)(unsafe.Pointer(&xControl)))(tls, (*Rbu_file)(unsafe.Pointer(p)).FpReal, op, pArg)
+ rc = (*struct {
+ f func(*libc.TLS, uintptr, int32, uintptr) int32
+ })(unsafe.Pointer(&struct{ uintptr }{xControl})).f(tls, (*Rbu_file)(unsafe.Pointer(p)).FpReal, op, pArg)
if rc == SQLITE_NOTFOUND {
// Now search for a zipvfs instance lower down in the VFS stack. If
// one is found, this is an error.
*(*uintptr)(unsafe.Pointer(bp + 16 /* dummy */)) = uintptr(0)
- rc = (*(*func(*libc.TLS, uintptr, int32, uintptr) int32)(unsafe.Pointer(&xControl)))(tls, (*Rbu_file)(unsafe.Pointer(p)).FpReal, SQLITE_FCNTL_ZIPVFS, bp+16 /* &dummy */)
+ rc = (*struct {
+ f func(*libc.TLS, uintptr, int32, uintptr) int32
+ })(unsafe.Pointer(&struct{ uintptr }{xControl})).f(tls, (*Rbu_file)(unsafe.Pointer(p)).FpReal, SQLITE_FCNTL_ZIPVFS, bp+16 /* &dummy */)
if rc == SQLITE_OK {
rc = SQLITE_ERROR
- (*Sqlite3rbu)(unsafe.Pointer(pRbu)).FzErrmsg = Xsqlite3_mprintf(tls, ts+30039 /* "rbu/zipvfs setup..." */, 0)
+ (*Sqlite3rbu)(unsafe.Pointer(pRbu)).FzErrmsg = Xsqlite3_mprintf(tls, ts+30499 /* "rbu/zipvfs setup..." */, 0)
} else if rc == SQLITE_NOTFOUND {
(*Sqlite3rbu)(unsafe.Pointer(pRbu)).FpTargetFd = p
(*Rbu_file)(unsafe.Pointer(p)).FpRbu = pRbu
@@ -162525,11 +165210,13 @@ func rbuVfsFileControl(tls *libc.TLS, pFile uintptr, op int32, pArg uintptr) int
(*Rbu_file)(unsafe.Pointer(p)).FbNolock = U8(1)
}
- rc = (*(*func(*libc.TLS, uintptr, int32, uintptr) int32)(unsafe.Pointer(&xControl)))(tls, (*Rbu_file)(unsafe.Pointer(p)).FpReal, op, pArg)
+ rc = (*struct {
+ f func(*libc.TLS, uintptr, int32, uintptr) int32
+ })(unsafe.Pointer(&struct{ uintptr }{xControl})).f(tls, (*Rbu_file)(unsafe.Pointer(p)).FpReal, op, pArg)
if (rc == SQLITE_OK) && (op == SQLITE_FCNTL_VFSNAME) {
var pRbuVfs uintptr = (*Rbu_file)(unsafe.Pointer(p)).FpRbuVfs
var zIn uintptr = *(*uintptr)(unsafe.Pointer(pArg))
- var zOut uintptr = Xsqlite3_mprintf(tls, ts+30062 /* "rbu(%s)/%z" */, libc.VaList(bp, (*Rbu_vfs)(unsafe.Pointer(pRbuVfs)).Fbase.FzName, zIn))
+ var zOut uintptr = Xsqlite3_mprintf(tls, ts+30522 /* "rbu(%s)/%z" */, libc.VaList(bp, (*Rbu_vfs)(unsafe.Pointer(pRbuVfs)).Fbase.FzName, zIn))
*(*uintptr)(unsafe.Pointer(pArg)) = zOut
if zOut == uintptr(0) {
rc = SQLITE_NOMEM
@@ -162540,493 +165227,6242 @@ func rbuVfsFileControl(tls *libc.TLS, pFile uintptr, op int32, pArg uintptr) int
}
// Return the sector-size in bytes for an rbuVfs-file.
-func rbuVfsSectorSize(tls *libc.TLS, pFile uintptr) int32 { /* sqlite3.c:203794:12: */
+func rbuVfsSectorSize(tls *libc.TLS, pFile uintptr) int32 { /* sqlite3.c:204878:12: */
var p uintptr = pFile
- return (*(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(((*Sqlite3_file)(unsafe.Pointer((*Rbu_file)(unsafe.Pointer(p)).FpReal)).FpMethods + 88 /* &.xSectorSize */))))(tls, (*Rbu_file)(unsafe.Pointer(p)).FpReal)
+ return (*struct {
+ f func(*libc.TLS, uintptr) int32
+ })(unsafe.Pointer(&struct{ uintptr }{(*sqlite3_io_methods)(unsafe.Pointer((*Sqlite3_file)(unsafe.Pointer((*Rbu_file)(unsafe.Pointer(p)).FpReal)).FpMethods)).FxSectorSize})).f(tls, (*Rbu_file)(unsafe.Pointer(p)).FpReal)
+}
+
+// Return the device characteristic flags supported by an rbuVfs-file.
+func rbuVfsDeviceCharacteristics(tls *libc.TLS, pFile uintptr) int32 { /* sqlite3.c:204886:12: */
+ var p uintptr = pFile
+ return (*struct {
+ f func(*libc.TLS, uintptr) int32
+ })(unsafe.Pointer(&struct{ uintptr }{(*sqlite3_io_methods)(unsafe.Pointer((*Sqlite3_file)(unsafe.Pointer((*Rbu_file)(unsafe.Pointer(p)).FpReal)).FpMethods)).FxDeviceCharacteristics})).f(tls, (*Rbu_file)(unsafe.Pointer(p)).FpReal)
+}
+
+// Take or release a shared-memory lock.
+func rbuVfsShmLock(tls *libc.TLS, pFile uintptr, ofst int32, n int32, flags int32) int32 { /* sqlite3.c:204894:12: */
+ var p uintptr = pFile
+ var pRbu uintptr = (*Rbu_file)(unsafe.Pointer(p)).FpRbu
+ var rc int32 = SQLITE_OK
+
+ if (pRbu != 0) && ((((*Sqlite3rbu)(unsafe.Pointer(pRbu)).FeStage == RBU_STAGE_OAL) ||
+ ((*Sqlite3rbu)(unsafe.Pointer(pRbu)).FeStage == RBU_STAGE_MOVE)) ||
+ ((*Sqlite3rbu)(unsafe.Pointer(pRbu)).FeStage == RBU_STAGE_DONE)) {
+ // Prevent SQLite from taking a shm-lock on the target file when it
+ // is supplying heap memory to the upper layer in place of *-shm
+ // segments.
+ if (ofst == WAL_LOCK_CKPT) && (n == 1) {
+ rc = SQLITE_BUSY
+ }
+ } else {
+ var bCapture int32 = 0
+ if (pRbu != 0) && ((*Sqlite3rbu)(unsafe.Pointer(pRbu)).FeStage == RBU_STAGE_CAPTURE) {
+ bCapture = 1
+ }
+ if (bCapture == 0) || (0 == (flags & SQLITE_SHM_UNLOCK)) {
+ rc = (*struct {
+ f func(*libc.TLS, uintptr, int32, int32, int32) int32
+ })(unsafe.Pointer(&struct{ uintptr }{(*sqlite3_io_methods)(unsafe.Pointer((*Sqlite3_file)(unsafe.Pointer((*Rbu_file)(unsafe.Pointer(p)).FpReal)).FpMethods)).FxShmLock})).f(tls, (*Rbu_file)(unsafe.Pointer(p)).FpReal, ofst, n, flags)
+ if (bCapture != 0) && (rc == SQLITE_OK) {
+ *(*U32)(unsafe.Pointer(pRbu + 316 /* &.mLock */)) |= (U32(((int32(1) << n) - 1) << ofst))
+ }
+ }
+ }
+
+ return rc
+}
+
+// Obtain a pointer to a mapping of a single 32KiB page of the *-shm file.
+func rbuVfsShmMap(tls *libc.TLS, pFile uintptr, iRegion int32, szRegion int32, isWrite int32, pp uintptr) int32 { /* sqlite3.c:204932:12: */
+ var p uintptr = pFile
+ var rc int32 = SQLITE_OK
+ var eStage int32 = func() int32 {
+ if (*Rbu_file)(unsafe.Pointer(p)).FpRbu != 0 {
+ return (*Sqlite3rbu)(unsafe.Pointer((*Rbu_file)(unsafe.Pointer(p)).FpRbu)).FeStage
+ }
+ return 0
+ }()
+
+ // If not in RBU_STAGE_OAL, allow this call to pass through. Or, if this
+ // rbu is in the RBU_STAGE_OAL state, use heap memory for *-shm space
+ // instead of a file on disk.
+
+ if eStage == RBU_STAGE_OAL {
+ var nByte Sqlite3_int64 = (Sqlite3_int64((uint64(iRegion + 1)) * uint64(unsafe.Sizeof(uintptr(0)))))
+ var apNew uintptr = Xsqlite3_realloc64(tls, (*Rbu_file)(unsafe.Pointer(p)).FapShm, uint64(nByte))
+
+ // This is an RBU connection that uses its own heap memory for the
+ // pages of the *-shm file. Since no other process can have run
+ // recovery, the connection must request *-shm pages in order
+ // from start to finish.
+
+ if apNew == uintptr(0) {
+ rc = SQLITE_NOMEM
+ } else {
+ libc.Xmemset(tls, (apNew + uintptr((*Rbu_file)(unsafe.Pointer(p)).FnShm)*8), 0, (uint64(unsafe.Sizeof(uintptr(0))) * (uint64((1 + iRegion) - (*Rbu_file)(unsafe.Pointer(p)).FnShm))))
+ (*Rbu_file)(unsafe.Pointer(p)).FapShm = apNew
+ (*Rbu_file)(unsafe.Pointer(p)).FnShm = (iRegion + 1)
+ }
+
+ if rc == SQLITE_OK {
+ var pNew uintptr = Xsqlite3_malloc64(tls, uint64(szRegion))
+ if pNew == uintptr(0) {
+ rc = SQLITE_NOMEM
+ } else {
+ libc.Xmemset(tls, pNew, 0, uint64(szRegion))
+ *(*uintptr)(unsafe.Pointer((*Rbu_file)(unsafe.Pointer(p)).FapShm + uintptr(iRegion)*8)) = pNew
+ }
+ }
+
+ if rc == SQLITE_OK {
+ *(*uintptr)(unsafe.Pointer(pp)) = *(*uintptr)(unsafe.Pointer((*Rbu_file)(unsafe.Pointer(p)).FapShm + uintptr(iRegion)*8))
+ } else {
+ *(*uintptr)(unsafe.Pointer(pp)) = uintptr(0)
+ }
+ } else {
+
+ rc = (*struct {
+ f func(*libc.TLS, uintptr, int32, int32, int32, uintptr) int32
+ })(unsafe.Pointer(&struct{ uintptr }{(*sqlite3_io_methods)(unsafe.Pointer((*Sqlite3_file)(unsafe.Pointer((*Rbu_file)(unsafe.Pointer(p)).FpReal)).FpMethods)).FxShmMap})).f(tls, (*Rbu_file)(unsafe.Pointer(p)).FpReal, iRegion, szRegion, isWrite, pp)
+ }
+
+ return rc
+}
+
+// Memory barrier.
+func rbuVfsShmBarrier(tls *libc.TLS, pFile uintptr) { /* sqlite3.c:204990:13: */
+ var p uintptr = pFile
+ (*struct{ f func(*libc.TLS, uintptr) })(unsafe.Pointer(&struct{ uintptr }{(*sqlite3_io_methods)(unsafe.Pointer((*Sqlite3_file)(unsafe.Pointer((*Rbu_file)(unsafe.Pointer(p)).FpReal)).FpMethods)).FxShmBarrier})).f(tls, (*Rbu_file)(unsafe.Pointer(p)).FpReal)
+}
+
+// The xShmUnmap method.
+func rbuVfsShmUnmap(tls *libc.TLS, pFile uintptr, delFlag int32) int32 { /* sqlite3.c:204998:12: */
+ var p uintptr = pFile
+ var rc int32 = SQLITE_OK
+ var eStage int32 = func() int32 {
+ if (*Rbu_file)(unsafe.Pointer(p)).FpRbu != 0 {
+ return (*Sqlite3rbu)(unsafe.Pointer((*Rbu_file)(unsafe.Pointer(p)).FpRbu)).FeStage
+ }
+ return 0
+ }()
+
+ if (eStage == RBU_STAGE_OAL) || (eStage == RBU_STAGE_MOVE) {
+ // no-op
+ } else {
+ // Release the checkpointer and writer locks
+ rbuUnlockShm(tls, p)
+ rc = (*struct {
+ f func(*libc.TLS, uintptr, int32) int32
+ })(unsafe.Pointer(&struct{ uintptr }{(*sqlite3_io_methods)(unsafe.Pointer((*Sqlite3_file)(unsafe.Pointer((*Rbu_file)(unsafe.Pointer(p)).FpReal)).FpMethods)).FxShmUnmap})).f(tls, (*Rbu_file)(unsafe.Pointer(p)).FpReal, delFlag)
+ }
+ return rc
+}
+
+// Open an rbu file handle.
+func rbuVfsOpen(tls *libc.TLS, pVfs uintptr, zName uintptr, pFile uintptr, flags int32, pOutFlags uintptr) int32 { /* sqlite3.c:205017:12: */
+ var pRbuVfs uintptr = pVfs
+ var pRealVfs uintptr = (*Rbu_vfs)(unsafe.Pointer(pRbuVfs)).FpRealVfs
+ var pFd uintptr = pFile
+ var rc int32 = SQLITE_OK
+ var zOpen uintptr = zName
+ var oflags int32 = flags
+
+ libc.Xmemset(tls, pFd, 0, uint64(unsafe.Sizeof(Rbu_file{})))
+ (*Rbu_file)(unsafe.Pointer(pFd)).FpReal = (pFd + 1*104)
+ (*Rbu_file)(unsafe.Pointer(pFd)).FpRbuVfs = pRbuVfs
+ (*Rbu_file)(unsafe.Pointer(pFd)).FopenFlags = flags
+ if zName != 0 {
+ if (flags & SQLITE_OPEN_MAIN_DB) != 0 {
+ // A main database has just been opened. The following block sets
+ // (pFd->zWal) to point to a buffer owned by SQLite that contains
+ // the name of the *-wal file this db connection will use. SQLite
+ // happens to pass a pointer to this buffer when using xAccess()
+ // or xOpen() to operate on the *-wal file.
+ (*Rbu_file)(unsafe.Pointer(pFd)).FzWal = Xsqlite3_filename_wal(tls, zName)
+ } else if (flags & SQLITE_OPEN_WAL) != 0 {
+ var pDb uintptr = rbuFindMaindb(tls, pRbuVfs, zName, 0)
+ if pDb != 0 {
+ if ((*Rbu_file)(unsafe.Pointer(pDb)).FpRbu != 0) && ((*Sqlite3rbu)(unsafe.Pointer((*Rbu_file)(unsafe.Pointer(pDb)).FpRbu)).FeStage == RBU_STAGE_OAL) {
+ // This call is to open a *-wal file. Intead, open the *-oal.
+ var nOpen Size_t
+ if (*Sqlite3rbu)(unsafe.Pointer(((*Rbu_file)(unsafe.Pointer(pDb)).FpRbu))).FzTarget == uintptr(0) {
+ zOpen = Xsqlite3_db_filename(tls, (*Sqlite3rbu)(unsafe.Pointer((*Rbu_file)(unsafe.Pointer(pDb)).FpRbu)).FdbRbu, ts+5458 /* "main" */)
+ zOpen = Xsqlite3_filename_wal(tls, zOpen)
+ }
+ nOpen = libc.Xstrlen(tls, zOpen)
+ *(*uint8)(unsafe.Pointer((zOpen) + uintptr((nOpen - uint64(3))))) = uint8('o')
+ (*Rbu_file)(unsafe.Pointer(pFd)).FpRbu = (*Rbu_file)(unsafe.Pointer(pDb)).FpRbu
+ }
+ (*Rbu_file)(unsafe.Pointer(pDb)).FpWalFd = pFd
+ }
+ }
+ } else {
+ (*Rbu_file)(unsafe.Pointer(pFd)).FpRbu = (*Rbu_vfs)(unsafe.Pointer(pRbuVfs)).FpRbu
+ }
+
+ if ((oflags & SQLITE_OPEN_MAIN_DB) != 0) &&
+ (Xsqlite3_uri_boolean(tls, zName, ts+30533 /* "rbu_memory" */, 0) != 0) {
+
+ oflags = ((((SQLITE_OPEN_TEMP_DB | SQLITE_OPEN_READWRITE) | SQLITE_OPEN_CREATE) | SQLITE_OPEN_EXCLUSIVE) | SQLITE_OPEN_DELETEONCLOSE)
+ zOpen = uintptr(0)
+ }
+
+ if rc == SQLITE_OK {
+ rc = (*struct {
+ f func(*libc.TLS, uintptr, uintptr, uintptr, int32, uintptr) int32
+ })(unsafe.Pointer(&struct{ uintptr }{(*Sqlite3_vfs)(unsafe.Pointer(pRealVfs)).FxOpen})).f(tls, pRealVfs, zOpen, (*Rbu_file)(unsafe.Pointer(pFd)).FpReal, oflags, pOutFlags)
+ }
+ if (*Sqlite3_file)(unsafe.Pointer((*Rbu_file)(unsafe.Pointer(pFd)).FpReal)).FpMethods != 0 {
+ // The xOpen() operation has succeeded. Set the sqlite3_file.pMethods
+ // pointer and, if the file is a main database file, link it into the
+ // mutex protected linked list of all such files.
+ (*Sqlite3_file)(unsafe.Pointer(pFile)).FpMethods = uintptr(unsafe.Pointer(&rbuvfs_io_methods))
+ if (flags & SQLITE_OPEN_MAIN_DB) != 0 {
+ rbuMainlistAdd(tls, pFd)
+ }
+ } else {
+ Xsqlite3_free(tls, (*Rbu_file)(unsafe.Pointer(pFd)).FzDel)
+ }
+
+ return rc
+}
+
+var rbuvfs_io_methods = Sqlite3_io_methods{
+ FiVersion: 2, // iVersion
+ FxClose: 0, // xClose
+ FxRead: 0, // xRead
+ FxWrite: 0, // xWrite
+ FxTruncate: 0, // xTruncate
+ FxSync: 0, // xSync
+ FxFileSize: 0, // xFileSize
+ FxLock: 0, // xLock
+ FxUnlock: 0, // xUnlock
+ FxCheckReservedLock: 0, // xCheckReservedLock
+ FxFileControl: 0, // xFileControl
+ FxSectorSize: 0, // xSectorSize
+ FxDeviceCharacteristics: 0, // xDeviceCharacteristics
+ FxShmMap: 0, // xShmMap
+ FxShmLock: 0, // xShmLock
+ FxShmBarrier: 0, // xShmBarrier
+ FxShmUnmap: 0, // xFetch, xUnfetch
+} /* sqlite3.c:205024:29 */
+
+// Delete the file located at zPath.
+func rbuVfsDelete(tls *libc.TLS, pVfs uintptr, zPath uintptr, dirSync int32) int32 { /* sqlite3.c:205115:12: */
+ var pRealVfs uintptr = (*Rbu_vfs)(unsafe.Pointer(pVfs)).FpRealVfs
+ return (*struct {
+ f func(*libc.TLS, uintptr, uintptr, int32) int32
+ })(unsafe.Pointer(&struct{ uintptr }{(*Sqlite3_vfs)(unsafe.Pointer(pRealVfs)).FxDelete})).f(tls, pRealVfs, zPath, dirSync)
+}
+
+// Test for access permissions. Return true if the requested permission
+// is available, or false otherwise.
+func rbuVfsAccess(tls *libc.TLS, pVfs uintptr, zPath uintptr, flags int32, pResOut uintptr) int32 { /* sqlite3.c:205124:12: */
+ bp := tls.Alloc(8)
+ defer tls.Free(8)
+
+ var pRbuVfs uintptr = pVfs
+ var pRealVfs uintptr = (*Rbu_vfs)(unsafe.Pointer(pRbuVfs)).FpRealVfs
+ var rc int32
+
+ rc = (*struct {
+ f func(*libc.TLS, uintptr, uintptr, int32, uintptr) int32
+ })(unsafe.Pointer(&struct{ uintptr }{(*Sqlite3_vfs)(unsafe.Pointer(pRealVfs)).FxAccess})).f(tls, pRealVfs, zPath, flags, pResOut)
+
+ // If this call is to check if a *-wal file associated with an RBU target
+ // database connection exists, and the RBU update is in RBU_STAGE_OAL,
+ // the following special handling is activated:
+ //
+ // a) if the *-wal file does exist, return SQLITE_CANTOPEN. This
+ // ensures that the RBU extension never tries to update a database
+ // in wal mode, even if the first page of the database file has
+ // been damaged.
+ //
+ // b) if the *-wal file does not exist, claim that it does anyway,
+ // causing SQLite to call xOpen() to open it. This call will also
+ // be intercepted (see the rbuVfsOpen() function) and the *-oal
+ // file opened instead.
+ if (rc == SQLITE_OK) && (flags == SQLITE_ACCESS_EXISTS) {
+ var pDb uintptr = rbuFindMaindb(tls, pRbuVfs, zPath, 1)
+ if (pDb != 0) && ((*Sqlite3rbu)(unsafe.Pointer((*Rbu_file)(unsafe.Pointer(pDb)).FpRbu)).FeStage == RBU_STAGE_OAL) {
+
+ if *(*int32)(unsafe.Pointer(pResOut)) != 0 {
+ rc = SQLITE_CANTOPEN
+ } else {
+ *(*Sqlite3_int64)(unsafe.Pointer(bp /* sz */)) = int64(0)
+ rc = rbuVfsFileSize(tls, (pDb /* &.base */), bp /* &sz */)
+ *(*int32)(unsafe.Pointer(pResOut)) = (libc.Bool32(*(*Sqlite3_int64)(unsafe.Pointer(bp /* sz */)) > int64(0)))
+ }
+ }
+ }
+
+ return rc
+}
+
+// Populate buffer zOut with the full canonical pathname corresponding
+// to the pathname in zPath. zOut is guaranteed to point to a buffer
+// of at least (DEVSYM_MAX_PATHNAME+1) bytes.
+func rbuVfsFullPathname(tls *libc.TLS, pVfs uintptr, zPath uintptr, nOut int32, zOut uintptr) int32 { /* sqlite3.c:205172:12: */
+ var pRealVfs uintptr = (*Rbu_vfs)(unsafe.Pointer(pVfs)).FpRealVfs
+ return (*struct {
+ f func(*libc.TLS, uintptr, uintptr, int32, uintptr) int32
+ })(unsafe.Pointer(&struct{ uintptr }{(*Sqlite3_vfs)(unsafe.Pointer(pRealVfs)).FxFullPathname})).f(tls, pRealVfs, zPath, nOut, zOut)
+}
+
+// Open the dynamic library located at zPath and return a handle.
+func rbuVfsDlOpen(tls *libc.TLS, pVfs uintptr, zPath uintptr) uintptr { /* sqlite3.c:205186:13: */
+ var pRealVfs uintptr = (*Rbu_vfs)(unsafe.Pointer(pVfs)).FpRealVfs
+ return (*struct {
+ f func(*libc.TLS, uintptr, uintptr) uintptr
+ })(unsafe.Pointer(&struct{ uintptr }{(*Sqlite3_vfs)(unsafe.Pointer(pRealVfs)).FxDlOpen})).f(tls, pRealVfs, zPath)
+}
+
+// Populate the buffer zErrMsg (size nByte bytes) with a human readable
+// utf-8 string describing the most recent error encountered associated
+// with dynamic libraries.
+func rbuVfsDlError(tls *libc.TLS, pVfs uintptr, nByte int32, zErrMsg uintptr) { /* sqlite3.c:205196:13: */
+ var pRealVfs uintptr = (*Rbu_vfs)(unsafe.Pointer(pVfs)).FpRealVfs
+ (*struct {
+ f func(*libc.TLS, uintptr, int32, uintptr)
+ })(unsafe.Pointer(&struct{ uintptr }{(*Sqlite3_vfs)(unsafe.Pointer(pRealVfs)).FxDlError})).f(tls, pRealVfs, nByte, zErrMsg)
+}
+
+// Return a pointer to the symbol zSymbol in the dynamic library pHandle.
+func rbuVfsDlSym(tls *libc.TLS, pVfs uintptr, pArg uintptr, zSym uintptr) uintptr { /* sqlite3.c:205204:13: */
+ var pRealVfs uintptr = (*Rbu_vfs)(unsafe.Pointer(pVfs)).FpRealVfs
+ return (*struct {
+ f func(*libc.TLS, uintptr, uintptr, uintptr) uintptr
+ })(unsafe.Pointer(&struct{ uintptr }{(*Sqlite3_vfs)(unsafe.Pointer(pRealVfs)).FxDlSym})).f(tls, pRealVfs, pArg, zSym)
+}
+
+// Close the dynamic library handle pHandle.
+func rbuVfsDlClose(tls *libc.TLS, pVfs uintptr, pHandle uintptr) { /* sqlite3.c:205216:13: */
+ var pRealVfs uintptr = (*Rbu_vfs)(unsafe.Pointer(pVfs)).FpRealVfs
+ (*struct {
+ f func(*libc.TLS, uintptr, uintptr)
+ })(unsafe.Pointer(&struct{ uintptr }{(*Sqlite3_vfs)(unsafe.Pointer(pRealVfs)).FxDlClose})).f(tls, pRealVfs, pHandle)
+}
+
+// Populate the buffer pointed to by zBufOut with nByte bytes of
+// random data.
+func rbuVfsRandomness(tls *libc.TLS, pVfs uintptr, nByte int32, zBufOut uintptr) int32 { /* sqlite3.c:205226:12: */
+ var pRealVfs uintptr = (*Rbu_vfs)(unsafe.Pointer(pVfs)).FpRealVfs
+ return (*struct {
+ f func(*libc.TLS, uintptr, int32, uintptr) int32
+ })(unsafe.Pointer(&struct{ uintptr }{(*Sqlite3_vfs)(unsafe.Pointer(pRealVfs)).FxRandomness})).f(tls, pRealVfs, nByte, zBufOut)
+}
+
+// Sleep for nMicro microseconds. Return the number of microseconds
+// actually slept.
+func rbuVfsSleep(tls *libc.TLS, pVfs uintptr, nMicro int32) int32 { /* sqlite3.c:205235:12: */
+ var pRealVfs uintptr = (*Rbu_vfs)(unsafe.Pointer(pVfs)).FpRealVfs
+ return (*struct {
+ f func(*libc.TLS, uintptr, int32) int32
+ })(unsafe.Pointer(&struct{ uintptr }{(*Sqlite3_vfs)(unsafe.Pointer(pRealVfs)).FxSleep})).f(tls, pRealVfs, nMicro)
+}
+
+// Return the current time as a Julian Day number in *pTimeOut.
+func rbuVfsCurrentTime(tls *libc.TLS, pVfs uintptr, pTimeOut uintptr) int32 { /* sqlite3.c:205243:12: */
+ var pRealVfs uintptr = (*Rbu_vfs)(unsafe.Pointer(pVfs)).FpRealVfs
+ return (*struct {
+ f func(*libc.TLS, uintptr, uintptr) int32
+ })(unsafe.Pointer(&struct{ uintptr }{(*Sqlite3_vfs)(unsafe.Pointer(pRealVfs)).FxCurrentTime})).f(tls, pRealVfs, pTimeOut)
+}
+
+// No-op.
+func rbuVfsGetLastError(tls *libc.TLS, pVfs uintptr, a int32, b uintptr) int32 { /* sqlite3.c:205251:12: */
+ return 0
+}
+
+// Deregister and destroy an RBU vfs created by an earlier call to
+// sqlite3rbu_create_vfs().
+func Xsqlite3rbu_destroy_vfs(tls *libc.TLS, zName uintptr) { /* sqlite3.c:205259:17: */
+ var pVfs uintptr = Xsqlite3_vfs_find(tls, zName)
+ if (pVfs != 0) && ((*Sqlite3_vfs)(unsafe.Pointer(pVfs)).FxOpen == *(*uintptr)(unsafe.Pointer(&struct {
+ f func(*libc.TLS, uintptr, uintptr, uintptr, int32, uintptr) int32
+ }{rbuVfsOpen}))) {
+ Xsqlite3_mutex_free(tls, (*Rbu_vfs)(unsafe.Pointer(pVfs)).Fmutex)
+ Xsqlite3_vfs_unregister(tls, pVfs)
+ Xsqlite3_free(tls, pVfs)
+ }
+}
+
+// Create an RBU VFS named zName that accesses the underlying file-system
+// via existing VFS zParent. The new object is registered as a non-default
+// VFS with SQLite before returning.
+func Xsqlite3rbu_create_vfs(tls *libc.TLS, zName uintptr, zParent uintptr) int32 { /* sqlite3.c:205273:16: */
+
+ var pNew uintptr = uintptr(0) // Newly allocated VFS
+ var rc int32 = SQLITE_OK
+ var nName Size_t
+ var nByte Size_t
+
+ nName = libc.Xstrlen(tls, zName)
+ nByte = ((uint64(unsafe.Sizeof(Rbu_vfs{})) + nName) + uint64(1))
+ pNew = Xsqlite3_malloc64(tls, uint64(nByte))
+ if pNew == uintptr(0) {
+ rc = SQLITE_NOMEM
+ } else {
+ var pParent uintptr // Parent VFS
+ libc.Xmemset(tls, pNew, 0, nByte)
+ pParent = Xsqlite3_vfs_find(tls, zParent)
+ if pParent == uintptr(0) {
+ rc = SQLITE_NOTFOUND
+ } else {
+ var zSpace uintptr
+ libc.Xmemcpy(tls, (pNew /* &.base */), uintptr(unsafe.Pointer(&vfs_template)), uint64(unsafe.Sizeof(Sqlite3_vfs{})))
+ (*Rbu_vfs)(unsafe.Pointer(pNew)).Fbase.FmxPathname = (*Sqlite3_vfs)(unsafe.Pointer(pParent)).FmxPathname
+ (*Rbu_vfs)(unsafe.Pointer(pNew)).Fbase.FszOsFile = (int32(uint64(unsafe.Sizeof(Rbu_file{})) + uint64((*Sqlite3_vfs)(unsafe.Pointer(pParent)).FszOsFile)))
+ (*Rbu_vfs)(unsafe.Pointer(pNew)).FpRealVfs = pParent
+ (*Rbu_vfs)(unsafe.Pointer(pNew)).Fbase.FzName = libc.AssignUintptr(&zSpace, (pNew + 1*208))
+ libc.Xmemcpy(tls, zSpace, zName, nName)
+
+ // Allocate the mutex and register the new VFS (not as the default)
+ (*Rbu_vfs)(unsafe.Pointer(pNew)).Fmutex = Xsqlite3_mutex_alloc(tls, SQLITE_MUTEX_RECURSIVE)
+ if (*Rbu_vfs)(unsafe.Pointer(pNew)).Fmutex == uintptr(0) {
+ rc = SQLITE_NOMEM
+ } else {
+ rc = Xsqlite3_vfs_register(tls, (pNew /* &.base */), 0)
+ }
+ }
+
+ if rc != SQLITE_OK {
+ Xsqlite3_mutex_free(tls, (*Rbu_vfs)(unsafe.Pointer(pNew)).Fmutex)
+ Xsqlite3_free(tls, pNew)
+ }
+ }
+
+ return rc
+}
+
+var vfs_template = Sqlite3_vfs{
+ FiVersion: 1, // pAppData
+ FxOpen: 0, // xOpen
+ FxDelete: 0, // xDelete
+ FxAccess: 0, // xAccess
+ FxFullPathname: 0, // xFullPathname
+
+ FxDlOpen: 0, // xDlOpen
+ FxDlError: 0, // xDlError
+ FxDlSym: 0, // xDlSym
+ FxDlClose: 0, // xDlClose
+
+ FxRandomness: 0, // xRandomness
+ FxSleep: 0, // xSleep
+ FxCurrentTime: 0, // xCurrentTime
+ FxGetLastError: 0, // Unimplemented version 3 methods
+} /* sqlite3.c:205276:22 */
+
+// Configure the aggregate temp file size limit for this RBU handle.
+func Xsqlite3rbu_temp_size_limit(tls *libc.TLS, pRbu uintptr, n Sqlite3_int64) Sqlite3_int64 { /* sqlite3.c:205351:26: */
+ if n >= int64(0) {
+ (*Sqlite3rbu)(unsafe.Pointer(pRbu)).FszTempLimit = n
+ }
+ return (*Sqlite3rbu)(unsafe.Pointer(pRbu)).FszTempLimit
+}
+
+func Xsqlite3rbu_temp_size(tls *libc.TLS, pRbu uintptr) Sqlite3_int64 { /* sqlite3.c:205358:26: */
+ return (*Sqlite3rbu)(unsafe.Pointer(pRbu)).FszTemp
+}
+
+//************************************************************************
+
+//************* End of sqlite3rbu.c *****************************************
+//************* Begin file dbstat.c *****************************************
+// 2010 July 12
+//
+// The author disclaims copyright to this source code. In place of
+// a legal notice, here is a blessing:
+//
+// May you do good and not evil.
+// May you find forgiveness for yourself and forgive others.
+// May you share freely, never taking more than you give.
+//
+//
+//
+// This file contains an implementation of the "dbstat" virtual table.
+//
+// The dbstat virtual table is used to extract low-level storage
+// information from an SQLite database in order to implement the
+// "sqlite3_analyzer" utility. See the ../tool/spaceanal.tcl script
+// for an example implementation.
+//
+// Additional information is available on the "dbstat.html" page of the
+// official SQLite documentation.
+
+// #include "sqliteInt.h" ** Requires access to internal data structures **
+
+//************* End of dbstat.c *********************************************
+//************* Begin file dbpage.c *****************************************
+// 2017-10-11
+//
+// The author disclaims copyright to this source code. In place of
+// a legal notice, here is a blessing:
+//
+// May you do good and not evil.
+// May you find forgiveness for yourself and forgive others.
+// May you share freely, never taking more than you give.
+//
+//
+//
+// This file contains an implementation of the "sqlite_dbpage" virtual table.
+//
+// The sqlite_dbpage virtual table is used to read or write whole raw
+// pages of the database file. The pager interface is used so that
+// uncommitted changes and changes recorded in the WAL file are correctly
+// retrieved.
+//
+// Usage example:
+//
+// SELECT data FROM sqlite_dbpage('aux1') WHERE pgno=123;
+//
+// This is an eponymous virtual table so it does not need to be created before
+// use. The optional argument to the sqlite_dbpage() table name is the
+// schema for the database file that is to be read. The default schema is
+// "main".
+//
+// The data field of sqlite_dbpage table can be updated. The new
+// value must be a BLOB which is the correct page size, otherwise the
+// update fails. Rows may not be deleted or inserted.
+
+// #include "sqliteInt.h" ** Requires access to internal data structures **
+
+//************* End of dbpage.c *********************************************
+//************* Begin file sqlite3session.c *********************************
+
+// #include "sqlite3session.h"
+// #include
+// #include
+
+type SessionTable1 = struct {
+ FpNext uintptr
+ FzName uintptr
+ FnCol int32
+ FbStat1 int32
+ FazCol uintptr
+ FabPK uintptr
+ FnEntry int32
+ FnChange int32
+ FapChange uintptr
+} /* sqlite3.c:11155:9 */
+
+//************************************************************************
+
+//************* End of sqlite3rbu.c *****************************************
+//************* Begin file dbstat.c *****************************************
+// 2010 July 12
+//
+// The author disclaims copyright to this source code. In place of
+// a legal notice, here is a blessing:
+//
+// May you do good and not evil.
+// May you find forgiveness for yourself and forgive others.
+// May you share freely, never taking more than you give.
+//
+//
+//
+// This file contains an implementation of the "dbstat" virtual table.
+//
+// The dbstat virtual table is used to extract low-level storage
+// information from an SQLite database in order to implement the
+// "sqlite3_analyzer" utility. See the ../tool/spaceanal.tcl script
+// for an example implementation.
+//
+// Additional information is available on the "dbstat.html" page of the
+// official SQLite documentation.
+
+// #include "sqliteInt.h" ** Requires access to internal data structures **
+
+//************* End of dbstat.c *********************************************
+//************* Begin file dbpage.c *****************************************
+// 2017-10-11
+//
+// The author disclaims copyright to this source code. In place of
+// a legal notice, here is a blessing:
+//
+// May you do good and not evil.
+// May you find forgiveness for yourself and forgive others.
+// May you share freely, never taking more than you give.
+//
+//
+//
+// This file contains an implementation of the "sqlite_dbpage" virtual table.
+//
+// The sqlite_dbpage virtual table is used to read or write whole raw
+// pages of the database file. The pager interface is used so that
+// uncommitted changes and changes recorded in the WAL file are correctly
+// retrieved.
+//
+// Usage example:
+//
+// SELECT data FROM sqlite_dbpage('aux1') WHERE pgno=123;
+//
+// This is an eponymous virtual table so it does not need to be created before
+// use. The optional argument to the sqlite_dbpage() table name is the
+// schema for the database file that is to be read. The default schema is
+// "main".
+//
+// The data field of sqlite_dbpage table can be updated. The new
+// value must be a BLOB which is the correct page size, otherwise the
+// update fails. Rows may not be deleted or inserted.
+
+// #include "sqliteInt.h" ** Requires access to internal data structures **
+
+//************* End of dbpage.c *********************************************
+//************* Begin file sqlite3session.c *********************************
+
+// #include "sqlite3session.h"
+// #include
+// #include
+
+type SessionTable = SessionTable1 /* sqlite3.c:206655:29 */
+type SessionChange1 = struct {
+ Fop U8
+ FbIndirect U8
+ F__ccgo_pad1 [2]byte
+ FnMaxSize int32
+ FnRecord int32
+ F__ccgo_pad2 [4]byte
+ FaRecord uintptr
+ FpNext uintptr
+} /* sqlite3.c:11155:9 */
+
+type SessionChange = SessionChange1 /* sqlite3.c:206656:30 */
+type SessionBuffer1 = struct {
+ FaBuf uintptr
+ FnBuf int32
+ FnAlloc int32
+} /* sqlite3.c:11163:9 */
+
+type SessionBuffer = SessionBuffer1 /* sqlite3.c:206657:30 */
+type SessionInput1 = struct {
+ FbNoDiscard int32
+ FiCurrent int32
+ FiNext int32
+ F__ccgo_pad1 [4]byte
+ FaData uintptr
+ FnData int32
+ F__ccgo_pad2 [4]byte
+ Fbuf SessionBuffer
+ FxInput uintptr
+ FpIn uintptr
+ FbEof int32
+ F__ccgo_pad3 [4]byte
+} /* sqlite3.c:11163:9 */
+
+type SessionInput = SessionInput1 /* sqlite3.c:206658:29 */
+
+// Minimum chunk size used by streaming versions of functions.
+
+var sessions_strm_chunk_size int32 = SESSIONS_STRM_CHUNK_SIZE /* sqlite3.c:206671:12 */
+
+type SessionHook1 = struct {
+ FpCtx uintptr
+ FxOld uintptr
+ FxNew uintptr
+ FxCount uintptr
+ FxDepth uintptr
+} /* sqlite3.c:11155:9 */
+
+type SessionHook = SessionHook1 /* sqlite3.c:206673:28 */
+
+// Write a varint with value iVal into the buffer at aBuf. Return the
+// number of bytes written.
+func sessionVarintPut(tls *libc.TLS, aBuf uintptr, iVal int32) int32 { /* sqlite3.c:206951:12: */
+ return int32(func() uint8 {
+ if (U32(iVal)) < U32(0x80) {
+ return uint8(func() int32 { *(*U8)(unsafe.Pointer(aBuf)) = uint8(iVal); return 1 }())
+ }
+ return uint8(Xsqlite3PutVarint(tls, aBuf, uint64(iVal)))
+ }())
+}
+
+// Return the number of bytes required to store value iVal as a varint.
+func sessionVarintLen(tls *libc.TLS, iVal int32) int32 { /* sqlite3.c:206958:12: */
+ return Xsqlite3VarintLen(tls, uint64(iVal))
+}
+
+// Read a varint value from aBuf[] into *piVal. Return the number of
+// bytes read.
+func sessionVarintGet(tls *libc.TLS, aBuf uintptr, piVal uintptr) int32 { /* sqlite3.c:206966:12: */
+ return int32(func() uint8 {
+ if int32(*(*U8)(unsafe.Pointer(aBuf))) < int32(U8(0x80)) {
+ return uint8(func() int32 { (*(*int32)(unsafe.Pointer(piVal))) = int32(U32(*(*U8)(unsafe.Pointer(aBuf)))); return 1 }())
+ }
+ return Xsqlite3GetVarint32(tls, aBuf, piVal)
+ }())
+}
+
+// Load an unaligned and unsigned 32-bit integer
+
+// Read a 64-bit big-endian integer value from buffer aRec[]. Return
+// the value read.
+func sessionGetI64(tls *libc.TLS, aRec uintptr) Sqlite3_int64 { /* sqlite3.c:206977:22: */
+ var x U64 = (U64((((U32(*(*U8)(unsafe.Pointer((aRec)))) << 24) | (U32(int32(*(*U8)(unsafe.Pointer((aRec) + 1))) << 16))) | (U32(int32(*(*U8)(unsafe.Pointer((aRec) + 2))) << 8))) | U32(*(*U8)(unsafe.Pointer((aRec) + 3)))))
+ var y U32 = ((((U32(*(*U8)(unsafe.Pointer((aRec + uintptr(4))))) << 24) | (U32(int32(*(*U8)(unsafe.Pointer((aRec + uintptr(4)) + 1))) << 16))) | (U32(int32(*(*U8)(unsafe.Pointer((aRec + uintptr(4)) + 2))) << 8))) | U32(*(*U8)(unsafe.Pointer((aRec + uintptr(4)) + 3))))
+ x = ((x << 32) + U64(y))
+ return Sqlite3_int64(x)
+}
+
+// Write a 64-bit big-endian integer value to the buffer aBuf[].
+func sessionPutI64(tls *libc.TLS, aBuf uintptr, i Sqlite3_int64) { /* sqlite3.c:206987:13: */
+ *(*U8)(unsafe.Pointer(aBuf)) = (U8((i >> 56) & int64(0xFF)))
+ *(*U8)(unsafe.Pointer(aBuf + 1)) = (U8((i >> 48) & int64(0xFF)))
+ *(*U8)(unsafe.Pointer(aBuf + 2)) = (U8((i >> 40) & int64(0xFF)))
+ *(*U8)(unsafe.Pointer(aBuf + 3)) = (U8((i >> 32) & int64(0xFF)))
+ *(*U8)(unsafe.Pointer(aBuf + 4)) = (U8((i >> 24) & int64(0xFF)))
+ *(*U8)(unsafe.Pointer(aBuf + 5)) = (U8((i >> 16) & int64(0xFF)))
+ *(*U8)(unsafe.Pointer(aBuf + 6)) = (U8((i >> 8) & int64(0xFF)))
+ *(*U8)(unsafe.Pointer(aBuf + 7)) = (U8((i >> 0) & int64(0xFF)))
+}
+
+// This function is used to serialize the contents of value pValue (see
+// comment titled "RECORD FORMAT" above).
+//
+// If it is non-NULL, the serialized form of the value is written to
+// buffer aBuf. *pnWrite is set to the number of bytes written before
+// returning. Or, if aBuf is NULL, the only thing this function does is
+// set *pnWrite.
+//
+// If no error occurs, SQLITE_OK is returned. Or, if an OOM error occurs
+// within a call to sqlite3_value_text() (may fail if the db is utf-16))
+// SQLITE_NOMEM is returned.
+func sessionSerializeValue(tls *libc.TLS, aBuf uintptr, pValue uintptr, pnWrite uintptr) int32 { /* sqlite3.c:207011:12: */
+ bp := tls.Alloc(16)
+ defer tls.Free(16)
+
+ var nByte int32 // Size of serialized value in bytes
+
+ if pValue != 0 {
+ var eType int32 // Value type (SQLITE_NULL, TEXT etc.)
+
+ eType = Xsqlite3_value_type(tls, pValue)
+ if aBuf != 0 {
+ *(*U8)(unsafe.Pointer(aBuf)) = U8(eType)
+ }
+
+ switch eType {
+ case SQLITE_NULL:
+ nByte = 1
+ break
+ fallthrough
+
+ case SQLITE_INTEGER:
+ fallthrough
+ case SQLITE_FLOAT:
+ if aBuf != 0 {
+ // TODO: SQLite does something special to deal with mixed-endian
+ // floating point values (e.g. ARM7). This code probably should
+ // too.
+ // var i U64 at bp, 8
+
+ if eType == SQLITE_INTEGER {
+ *(*U64)(unsafe.Pointer(bp /* i */)) = U64(Xsqlite3_value_int64(tls, pValue))
+ } else {
+ // var r float64 at bp+8, 8
+
+ *(*float64)(unsafe.Pointer(bp + 8 /* r */)) = Xsqlite3_value_double(tls, pValue)
+ libc.Xmemcpy(tls, bp /* &i */, bp+8 /* &r */, uint64(8))
+ }
+ sessionPutI64(tls, (aBuf + 1), int64(*(*U64)(unsafe.Pointer(bp /* i */))))
+ }
+ nByte = 9
+ break
+ fallthrough
+
+ default:
+ {
+ var z uintptr
+ var n int32
+ var nVarint int32
+
+ if eType == SQLITE_TEXT {
+ z = Xsqlite3_value_text(tls, pValue)
+ } else {
+ z = Xsqlite3_value_blob(tls, pValue)
+ }
+ n = Xsqlite3_value_bytes(tls, pValue)
+ if (z == uintptr(0)) && ((eType != SQLITE_BLOB) || (n > 0)) {
+ return SQLITE_NOMEM
+ }
+ nVarint = sessionVarintLen(tls, n)
+
+ if aBuf != 0 {
+ sessionVarintPut(tls, (aBuf + 1), n)
+ if n != 0 {
+ libc.Xmemcpy(tls, (aBuf + uintptr((nVarint + 1))), z, uint64(n))
+ }
+ }
+
+ nByte = ((1 + nVarint) + n)
+ break
+
+ }
+ }
+ } else {
+ nByte = 1
+ if aBuf != 0 {
+ *(*U8)(unsafe.Pointer(aBuf)) = U8(0)
+ }
+ }
+
+ if pnWrite != 0 {
+ *(*Sqlite3_int64)(unsafe.Pointer(pnWrite)) += (Sqlite3_int64(nByte))
+ }
+ return SQLITE_OK
+}
+
+// Allocate and return a pointer to a buffer nByte bytes in size. If
+// pSession is not NULL, increase the sqlite3_session.nMalloc variable
+// by the number of bytes allocated.
+func sessionMalloc64(tls *libc.TLS, pSession uintptr, nByte I64) uintptr { /* sqlite3.c:207087:13: */
+ var pRet uintptr = Xsqlite3_malloc64(tls, uint64(nByte))
+ if pSession != 0 {
+ *(*I64)(unsafe.Pointer(pSession + 56 /* &.nMalloc */)) += I64((Xsqlite3_msize(tls, pRet)))
+ }
+ return pRet
+}
+
+// Free buffer pFree, which must have been allocated by an earlier
+// call to sessionMalloc64(). If pSession is not NULL, decrease the
+// sqlite3_session.nMalloc counter by the number of bytes freed.
+func sessionFree(tls *libc.TLS, pSession uintptr, pFree uintptr) { /* sqlite3.c:207098:13: */
+ if pSession != 0 {
+ *(*I64)(unsafe.Pointer(pSession + 56 /* &.nMalloc */)) -= I64((Xsqlite3_msize(tls, pFree)))
+ }
+ Xsqlite3_free(tls, pFree)
+}
+
+// This macro is used to calculate hash key values for data structures. In
+// order to use this macro, the entire data structure must be represented
+// as a series of unsigned integers. In order to calculate a hash-key value
+// for a data structure represented as three such integers, the macro may
+// then be used as follows:
+//
+// int hash_key_value;
+// hash_key_value = HASH_APPEND(0, );
+// hash_key_value = HASH_APPEND(hash_key_value, );
+// hash_key_value = HASH_APPEND(hash_key_value, );
+//
+// In practice, the data structures this macro is used for are the primary
+// key values of modified rows.
+
+// Append the hash of the 64-bit integer passed as the second argument to the
+// hash-key value passed as the first. Return the new hash-key value.
+func sessionHashAppendI64(tls *libc.TLS, h uint32, i I64) uint32 { /* sqlite3.c:207124:21: */
+ h = ((((h) << 3) ^ (h)) ^ (uint32(i & int64(0xFFFFFFFF))))
+ return ((((h) << 3) ^ (h)) ^ (uint32((i >> 32) & int64(0xFFFFFFFF))))
+}
+
+// Append the hash of the blob passed via the second and third arguments to
+// the hash-key value passed as the first. Return the new hash-key value.
+func sessionHashAppendBlob(tls *libc.TLS, h uint32, n int32, z uintptr) uint32 { /* sqlite3.c:207133:21: */
+ var i int32
+ for i = 0; i < n; i++ {
+ h = ((((h) << 3) ^ (h)) ^ (uint32(*(*U8)(unsafe.Pointer(z + uintptr(i))))))
+ }
+ return h
+}
+
+// Append the hash of the data type passed as the second argument to the
+// hash-key value passed as the first. Return the new hash-key value.
+func sessionHashAppendType(tls *libc.TLS, h uint32, eType int32) uint32 { /* sqlite3.c:207143:21: */
+ return ((((h) << 3) ^ (h)) ^ (uint32(eType)))
+}
+
+// This function may only be called from within a pre-update callback.
+// It calculates a hash based on the primary key values of the old.* or
+// new.* row currently available and, assuming no error occurs, writes it to
+// *piHash before returning. If the primary key contains one or more NULL
+// values, *pbNullPK is set to true before returning.
+//
+// If an error occurs, an SQLite error code is returned and the final values
+// of *piHash asn *pbNullPK are undefined. Otherwise, SQLITE_OK is returned
+// and the output variables are set as described above.
+func sessionPreupdateHash(tls *libc.TLS, pSession uintptr, pTab uintptr, bNew int32, piHash uintptr, pbNullPK uintptr) int32 { /* sqlite3.c:207158:12: */
+ bp := tls.Alloc(24)
+ defer tls.Free(24)
+
+ var h uint32 = uint32(0) // Hash value to return
+ var i int32 // Used to iterate through columns
+
+ for i = 0; i < (*SessionTable)(unsafe.Pointer(pTab)).FnCol; i++ {
+ if *(*U8)(unsafe.Pointer((*SessionTable)(unsafe.Pointer(pTab)).FabPK + uintptr(i))) != 0 {
+ var rc int32
+ var eType int32
+ // var pVal uintptr at bp, 8
+
+ if bNew != 0 {
+ rc = (*struct {
+ f func(*libc.TLS, uintptr, int32, uintptr) int32
+ })(unsafe.Pointer(&struct{ uintptr }{(*Sqlite3_session)(unsafe.Pointer(pSession)).Fhook.FxNew})).f(tls, (*Sqlite3_session)(unsafe.Pointer(pSession)).Fhook.FpCtx, i, bp /* &pVal */)
+ } else {
+ rc = (*struct {
+ f func(*libc.TLS, uintptr, int32, uintptr) int32
+ })(unsafe.Pointer(&struct{ uintptr }{(*Sqlite3_session)(unsafe.Pointer(pSession)).Fhook.FxOld})).f(tls, (*Sqlite3_session)(unsafe.Pointer(pSession)).Fhook.FpCtx, i, bp /* &pVal */)
+ }
+ if rc != SQLITE_OK {
+ return rc
+ }
+
+ eType = Xsqlite3_value_type(tls, *(*uintptr)(unsafe.Pointer(bp /* pVal */)))
+ h = sessionHashAppendType(tls, h, eType)
+ if (eType == SQLITE_INTEGER) || (eType == SQLITE_FLOAT) {
+ // var iVal I64 at bp+8, 8
+
+ if eType == SQLITE_INTEGER {
+ *(*I64)(unsafe.Pointer(bp + 8 /* iVal */)) = Xsqlite3_value_int64(tls, *(*uintptr)(unsafe.Pointer(bp /* pVal */)))
+ } else {
+ *(*float64)(unsafe.Pointer(bp + 16 /* rVal */)) = Xsqlite3_value_double(tls, *(*uintptr)(unsafe.Pointer(bp /* pVal */)))
+
+ libc.Xmemcpy(tls, bp+8 /* &iVal */, bp+16 /* &rVal */, uint64(8))
+ }
+ h = sessionHashAppendI64(tls, h, *(*I64)(unsafe.Pointer(bp + 8 /* iVal */)))
+ } else if (eType == SQLITE_TEXT) || (eType == SQLITE_BLOB) {
+ var z uintptr
+ var n int32
+ if eType == SQLITE_TEXT {
+ z = Xsqlite3_value_text(tls, *(*uintptr)(unsafe.Pointer(bp /* pVal */)))
+ } else {
+ z = Xsqlite3_value_blob(tls, *(*uintptr)(unsafe.Pointer(bp /* pVal */)))
+ }
+ n = Xsqlite3_value_bytes(tls, *(*uintptr)(unsafe.Pointer(bp /* pVal */)))
+ if !(z != 0) && ((eType != SQLITE_BLOB) || (n > 0)) {
+ return SQLITE_NOMEM
+ }
+ h = sessionHashAppendBlob(tls, h, n, z)
+ } else {
+
+ *(*int32)(unsafe.Pointer(pbNullPK)) = 1
+ }
+ }
+ }
+
+ *(*int32)(unsafe.Pointer(piHash)) = (int32(h % uint32((*SessionTable)(unsafe.Pointer(pTab)).FnChange)))
+ return SQLITE_OK
+}
+
+// The buffer that the argument points to contains a serialized SQL value.
+// Return the number of bytes of space occupied by the value (including
+// the type byte).
+func sessionSerialLen(tls *libc.TLS, a uintptr) int32 { /* sqlite3.c:207223:12: */
+ bp := tls.Alloc(4)
+ defer tls.Free(4)
+
+ var e int32 = int32(*(*U8)(unsafe.Pointer(a)))
+ // var n int32 at bp, 4
+
+ if (e == 0) || (e == 0xFF) {
+ return 1
+ }
+ if e == SQLITE_NULL {
+ return 1
+ }
+ if (e == SQLITE_INTEGER) || (e == SQLITE_FLOAT) {
+ return 9
+ }
+ return ((sessionVarintGet(tls, (a+1), bp /* &n */) + 1) + *(*int32)(unsafe.Pointer(bp /* n */)))
+}
+
+// Based on the primary key values stored in change aRecord, calculate a
+// hash key. Assume the has table has nBucket buckets. The hash keys
+// calculated by this function are compatible with those calculated by
+// sessionPreupdateHash().
+//
+// The bPkOnly argument is non-zero if the record at aRecord[] is from
+// a patchset DELETE. In this case the non-PK fields are omitted entirely.
+func sessionChangeHash(tls *libc.TLS, pTab uintptr, bPkOnly int32, aRecord uintptr, nBucket int32) uint32 { /* sqlite3.c:207241:21: */
+ bp := tls.Alloc(4)
+ defer tls.Free(4)
+
+ var h uint32 = uint32(0) // Value to return
+ var i int32 // Used to iterate through columns
+ var a uintptr = aRecord // Used to iterate through change record
+
+ for i = 0; i < (*SessionTable)(unsafe.Pointer(pTab)).FnCol; i++ {
+ var eType int32 = int32(*(*U8)(unsafe.Pointer(a)))
+ var isPK int32 = int32(*(*U8)(unsafe.Pointer((*SessionTable)(unsafe.Pointer(pTab)).FabPK + uintptr(i))))
+ if (bPkOnly != 0) && (isPK == 0) {
+ continue
+ }
+
+ // It is not possible for eType to be SQLITE_NULL here. The session
+ // module does not record changes for rows with NULL values stored in
+ // primary key columns.
+
+ if isPK != 0 {
+ a++
+ h = sessionHashAppendType(tls, h, eType)
+ if (eType == SQLITE_INTEGER) || (eType == SQLITE_FLOAT) {
+ h = sessionHashAppendI64(tls, h, sessionGetI64(tls, a))
+ a += uintptr(8)
+ } else {
+ // var n int32 at bp, 4
+
+ a += uintptr(sessionVarintGet(tls, a, bp /* &n */))
+ h = sessionHashAppendBlob(tls, h, *(*int32)(unsafe.Pointer(bp /* n */)), a)
+ a += uintptr(*(*int32)(unsafe.Pointer(bp /* n */)))
+ }
+ } else {
+ a += uintptr(sessionSerialLen(tls, a))
+ }
+ }
+ return (h % uint32(nBucket))
+}
+
+// Arguments aLeft and aRight are pointers to change records for table pTab.
+// This function returns true if the two records apply to the same row (i.e.
+// have the same values stored in the primary key columns), or false
+// otherwise.
+func sessionChangeEqual(tls *libc.TLS, pTab uintptr, bLeftPkOnly int32, aLeft uintptr, bRightPkOnly int32, aRight uintptr) int32 { /* sqlite3.c:207290:12: */
+ var a1 uintptr = aLeft // Cursor to iterate through aLeft
+ var a2 uintptr = aRight // Cursor to iterate through aRight
+ var iCol int32 // Used to iterate through table columns
+
+ for iCol = 0; iCol < (*SessionTable)(unsafe.Pointer(pTab)).FnCol; iCol++ {
+ if *(*U8)(unsafe.Pointer((*SessionTable)(unsafe.Pointer(pTab)).FabPK + uintptr(iCol))) != 0 {
+ var n1 int32 = sessionSerialLen(tls, a1)
+ var n2 int32 = sessionSerialLen(tls, a2)
+
+ if (n1 != n2) || (libc.Xmemcmp(tls, a1, a2, uint64(n1)) != 0) {
+ return 0
+ }
+ a1 += uintptr(n1)
+ a2 += uintptr(n2)
+ } else {
+ if bLeftPkOnly == 0 {
+ a1 += uintptr(sessionSerialLen(tls, a1))
+ }
+ if bRightPkOnly == 0 {
+ a2 += uintptr(sessionSerialLen(tls, a2))
+ }
+ }
+ }
+
+ return 1
+}
+
+// Arguments aLeft and aRight both point to buffers containing change
+// records with nCol columns. This function "merges" the two records into
+// a single records which is written to the buffer at *paOut. *paOut is
+// then set to point to one byte after the last byte written before
+// returning.
+//
+// The merging of records is done as follows: For each column, if the
+// aRight record contains a value for the column, copy the value from
+// their. Otherwise, if aLeft contains a value, copy it. If neither
+// record contains a value for a given column, then neither does the
+// output record.
+func sessionMergeRecord(tls *libc.TLS, paOut uintptr, nCol int32, aLeft uintptr, aRight uintptr) { /* sqlite3.c:207333:13: */
+ var a1 uintptr = aLeft // Cursor used to iterate through aLeft
+ var a2 uintptr = aRight // Cursor used to iterate through aRight
+ var aOut uintptr = *(*uintptr)(unsafe.Pointer(paOut)) // Output cursor
+ var iCol int32 // Used to iterate from 0 to nCol
+
+ for iCol = 0; iCol < nCol; iCol++ {
+ var n1 int32 = sessionSerialLen(tls, a1)
+ var n2 int32 = sessionSerialLen(tls, a2)
+ if *(*U8)(unsafe.Pointer(a2)) != 0 {
+ libc.Xmemcpy(tls, aOut, a2, uint64(n2))
+ aOut += uintptr(n2)
+ } else {
+ libc.Xmemcpy(tls, aOut, a1, uint64(n1))
+ aOut += uintptr(n1)
+ }
+ a1 += uintptr(n1)
+ a2 += uintptr(n2)
+ }
+
+ *(*uintptr)(unsafe.Pointer(paOut)) = aOut
+}
+
+// This is a helper function used by sessionMergeUpdate().
+//
+// When this function is called, both *paOne and *paTwo point to a value
+// within a change record. Before it returns, both have been advanced so
+// as to point to the next value in the record.
+//
+// If, when this function is called, *paTwo points to a valid value (i.e.
+// *paTwo[0] is not 0x00 - the "no value" placeholder), a copy of the *paTwo
+// pointer is returned and *pnVal is set to the number of bytes in the
+// serialized value. Otherwise, a copy of *paOne is returned and *pnVal
+// set to the number of bytes in the value at *paOne. If *paOne points
+// to the "no value" placeholder, *pnVal is set to 1. In other words:
+//
+// if( *paTwo is valid ) return *paTwo;
+// return *paOne;
+//
+func sessionMergeValue(tls *libc.TLS, paOne uintptr, paTwo uintptr, pnVal uintptr) uintptr { /* sqlite3.c:207379:11: */
+ var a1 uintptr = *(*uintptr)(unsafe.Pointer(paOne))
+ var a2 uintptr = *(*uintptr)(unsafe.Pointer(paTwo))
+ var pRet uintptr = uintptr(0)
+ var n1 int32
+
+ if a2 != 0 {
+ var n2 int32 = sessionSerialLen(tls, a2)
+ if *(*U8)(unsafe.Pointer(a2)) != 0 {
+ *(*int32)(unsafe.Pointer(pnVal)) = n2
+ pRet = a2
+ }
+ *(*uintptr)(unsafe.Pointer(paTwo)) = (a2 + uintptr(n2))
+ }
+
+ n1 = sessionSerialLen(tls, a1)
+ if pRet == uintptr(0) {
+ *(*int32)(unsafe.Pointer(pnVal)) = n1
+ pRet = a1
+ }
+ *(*uintptr)(unsafe.Pointer(paOne)) = (a1 + uintptr(n1))
+
+ return pRet
+}
+
+// This function is used by changeset_concat() to merge two UPDATE changes
+// on the same row.
+func sessionMergeUpdate(tls *libc.TLS, paOut uintptr, pTab uintptr, bPatchset int32, aOldRecord1 uintptr, aOldRecord2 uintptr, aNewRecord1 uintptr, aNewRecord2 uintptr) int32 { /* sqlite3.c:207413:12: */
+ bp := tls.Alloc(52)
+ defer tls.Free(52)
+
+ *(*uintptr)(unsafe.Pointer(bp /* aOld1 */)) = aOldRecord1
+ *(*uintptr)(unsafe.Pointer(bp + 8 /* aOld2 */)) = aOldRecord2
+ *(*uintptr)(unsafe.Pointer(bp + 24 /* aNew1 */)) = aNewRecord1
+ *(*uintptr)(unsafe.Pointer(bp + 32 /* aNew2 */)) = aNewRecord2
+
+ var aOut uintptr = *(*uintptr)(unsafe.Pointer(paOut))
+ var i int32
+
+ if bPatchset == 0 {
+ var bRequired int32 = 0
+
+ // Write the old.* vector first.
+ for i = 0; i < (*SessionTable)(unsafe.Pointer(pTab)).FnCol; i++ {
+ // var nOld int32 at bp+16, 4
+
+ var aOld uintptr
+ // var nNew int32 at bp+40, 4
+
+ var aNew uintptr
+
+ aOld = sessionMergeValue(tls, bp /* &aOld1 */, bp+8 /* &aOld2 */, bp+16 /* &nOld */)
+ aNew = sessionMergeValue(tls, bp+24 /* &aNew1 */, bp+32 /* &aNew2 */, bp+40 /* &nNew */)
+ if ((*(*U8)(unsafe.Pointer((*SessionTable)(unsafe.Pointer(pTab)).FabPK + uintptr(i))) != 0) || (*(*int32)(unsafe.Pointer(bp + 16 /* nOld */)) != *(*int32)(unsafe.Pointer(bp + 40 /* nNew */)))) || (libc.Xmemcmp(tls, aOld, aNew, uint64(*(*int32)(unsafe.Pointer(bp + 40 /* nNew */)))) != 0) {
+ if int32(*(*U8)(unsafe.Pointer((*SessionTable)(unsafe.Pointer(pTab)).FabPK + uintptr(i)))) == 0 {
+ bRequired = 1
+ }
+ libc.Xmemcpy(tls, aOut, aOld, uint64(*(*int32)(unsafe.Pointer(bp + 16 /* nOld */))))
+ aOut += uintptr(*(*int32)(unsafe.Pointer(bp + 16 /* nOld */)))
+ } else {
+ *(*U8)(unsafe.Pointer(libc.PostIncUintptr(&aOut, 1))) = U8(0)
+ }
+ }
+
+ if !(bRequired != 0) {
+ return 0
+ }
+ }
+
+ // Write the new.* vector
+ *(*uintptr)(unsafe.Pointer(bp /* aOld1 */)) = aOldRecord1
+ *(*uintptr)(unsafe.Pointer(bp + 8 /* aOld2 */)) = aOldRecord2
+ *(*uintptr)(unsafe.Pointer(bp + 24 /* aNew1 */)) = aNewRecord1
+ *(*uintptr)(unsafe.Pointer(bp + 32 /* aNew2 */)) = aNewRecord2
+ for i = 0; i < (*SessionTable)(unsafe.Pointer(pTab)).FnCol; i++ {
+ // var nOld int32 at bp+44, 4
+
+ var aOld uintptr
+ // var nNew int32 at bp+48, 4
+
+ var aNew uintptr
+
+ aOld = sessionMergeValue(tls, bp /* &aOld1 */, bp+8 /* &aOld2 */, bp+44 /* &nOld */)
+ aNew = sessionMergeValue(tls, bp+24 /* &aNew1 */, bp+32 /* &aNew2 */, bp+48 /* &nNew */)
+ if (bPatchset == 0) &&
+ ((*(*U8)(unsafe.Pointer((*SessionTable)(unsafe.Pointer(pTab)).FabPK + uintptr(i))) != 0) || ((*(*int32)(unsafe.Pointer(bp + 44 /* nOld */)) == *(*int32)(unsafe.Pointer(bp + 48 /* nNew */))) && (0 == libc.Xmemcmp(tls, aOld, aNew, uint64(*(*int32)(unsafe.Pointer(bp + 48 /* nNew */))))))) {
+ *(*U8)(unsafe.Pointer(libc.PostIncUintptr(&aOut, 1))) = U8(0)
+ } else {
+ libc.Xmemcpy(tls, aOut, aNew, uint64(*(*int32)(unsafe.Pointer(bp + 48 /* nNew */))))
+ aOut += uintptr(*(*int32)(unsafe.Pointer(bp + 48 /* nNew */)))
+ }
+ }
+
+ *(*uintptr)(unsafe.Pointer(paOut)) = aOut
+ return 1
+}
+
+// This function is only called from within a pre-update-hook callback.
+// It determines if the current pre-update-hook change affects the same row
+// as the change stored in argument pChange. If so, it returns true. Otherwise
+// if the pre-update-hook does not affect the same row as pChange, it returns
+// false.
+func sessionPreupdateEqual(tls *libc.TLS, pSession uintptr, pTab uintptr, pChange uintptr, op int32) int32 { /* sqlite3.c:207490:12: */
+ bp := tls.Alloc(28)
+ defer tls.Free(28)
+
+ var iCol int32 // Used to iterate through columns
+ var a uintptr = (*SessionChange)(unsafe.Pointer(pChange)).FaRecord // Cursor used to scan change record
+
+ for iCol = 0; iCol < (*SessionTable)(unsafe.Pointer(pTab)).FnCol; iCol++ {
+ if !(int32(*(*U8)(unsafe.Pointer((*SessionTable)(unsafe.Pointer(pTab)).FabPK + uintptr(iCol)))) != 0) {
+ a += uintptr(sessionSerialLen(tls, a))
+ } else {
+ // var pVal uintptr at bp, 8
+ // Value returned by preupdate_new/old
+ var rc int32
+ _ = rc // Error code from preupdate_new/old
+ var eType int32 = int32(*(*U8)(unsafe.Pointer(libc.PostIncUintptr(&a, 1)))) // Type of value from change record
+
+ // The following calls to preupdate_new() and preupdate_old() can not
+ // fail. This is because they cache their return values, and by the
+ // time control flows to here they have already been called once from
+ // within sessionPreupdateHash(). The first two asserts below verify
+ // this (that the method has already been called).
+ if op == SQLITE_INSERT {
+ // assert( db->pPreUpdate->pNewUnpacked || db->pPreUpdate->aNew );
+ rc = (*struct {
+ f func(*libc.TLS, uintptr, int32, uintptr) int32
+ })(unsafe.Pointer(&struct{ uintptr }{(*Sqlite3_session)(unsafe.Pointer(pSession)).Fhook.FxNew})).f(tls, (*Sqlite3_session)(unsafe.Pointer(pSession)).Fhook.FpCtx, iCol, bp /* &pVal */)
+ } else {
+ // assert( db->pPreUpdate->pUnpacked );
+ rc = (*struct {
+ f func(*libc.TLS, uintptr, int32, uintptr) int32
+ })(unsafe.Pointer(&struct{ uintptr }{(*Sqlite3_session)(unsafe.Pointer(pSession)).Fhook.FxOld})).f(tls, (*Sqlite3_session)(unsafe.Pointer(pSession)).Fhook.FpCtx, iCol, bp /* &pVal */)
+ }
+
+ if Xsqlite3_value_type(tls, *(*uintptr)(unsafe.Pointer(bp /* pVal */))) != eType {
+ return 0
+ }
+
+ // A SessionChange object never has a NULL value in a PK column
+
+ if (eType == SQLITE_INTEGER) || (eType == SQLITE_FLOAT) {
+ *(*I64)(unsafe.Pointer(bp + 16 /* iVal */)) = sessionGetI64(tls, a)
+ a += uintptr(8)
+ if eType == SQLITE_INTEGER {
+ if Xsqlite3_value_int64(tls, *(*uintptr)(unsafe.Pointer(bp /* pVal */))) != *(*I64)(unsafe.Pointer(bp + 16 /* iVal */)) {
+ return 0
+ }
+ } else {
+ // var rVal float64 at bp+8, 8
+
+ libc.Xmemcpy(tls, bp+8 /* &rVal */, bp+16 /* &iVal */, uint64(8))
+ if Xsqlite3_value_double(tls, *(*uintptr)(unsafe.Pointer(bp /* pVal */))) != *(*float64)(unsafe.Pointer(bp + 8 /* rVal */)) {
+ return 0
+ }
+ }
+ } else {
+ // var n int32 at bp+24, 4
+
+ var z uintptr
+ a += uintptr(sessionVarintGet(tls, a, bp+24 /* &n */))
+ if Xsqlite3_value_bytes(tls, *(*uintptr)(unsafe.Pointer(bp /* pVal */))) != *(*int32)(unsafe.Pointer(bp + 24 /* n */)) {
+ return 0
+ }
+ if eType == SQLITE_TEXT {
+ z = Xsqlite3_value_text(tls, *(*uintptr)(unsafe.Pointer(bp /* pVal */)))
+ } else {
+ z = Xsqlite3_value_blob(tls, *(*uintptr)(unsafe.Pointer(bp /* pVal */)))
+ }
+ if (*(*int32)(unsafe.Pointer(bp + 24 /* n */)) > 0) && (libc.Xmemcmp(tls, a, z, uint64(*(*int32)(unsafe.Pointer(bp + 24 /* n */)))) != 0) {
+ return 0
+ }
+ a += uintptr(*(*int32)(unsafe.Pointer(bp + 24 /* n */)))
+ }
+ }
+ }
+
+ return 1
+}
+
+// If required, grow the hash table used to store changes on table pTab
+// (part of the session pSession). If a fatal OOM error occurs, set the
+// session object to failed and return SQLITE_ERROR. Otherwise, return
+// SQLITE_OK.
+//
+// It is possible that a non-fatal OOM error occurs in this function. In
+// that case the hash-table does not grow, but SQLITE_OK is returned anyway.
+// Growing the hash table in this case is a performance optimization only,
+// it is not required for correct operation.
+func sessionGrowHash(tls *libc.TLS, pSession uintptr, bPatchset int32, pTab uintptr) int32 { /* sqlite3.c:207569:12: */
+ if ((*SessionTable)(unsafe.Pointer(pTab)).FnChange == 0) || ((*SessionTable)(unsafe.Pointer(pTab)).FnEntry >= ((*SessionTable)(unsafe.Pointer(pTab)).FnChange / 2)) {
+ var i int32
+ var apNew uintptr
+ var nNew Sqlite3_int64 = (int64(2) * (func() int64 {
+ if (*SessionTable)(unsafe.Pointer(pTab)).FnChange != 0 {
+ return int64((*SessionTable)(unsafe.Pointer(pTab)).FnChange)
+ }
+ return int64(128)
+ }()))
+
+ apNew = sessionMalloc64(tls,
+ pSession, (int64(uint64(unsafe.Sizeof(uintptr(0))) * uint64(nNew))))
+ if apNew == uintptr(0) {
+ if (*SessionTable)(unsafe.Pointer(pTab)).FnChange == 0 {
+ return SQLITE_ERROR
+ }
+ return SQLITE_OK
+ }
+ libc.Xmemset(tls, apNew, 0, (uint64(uint64(unsafe.Sizeof(uintptr(0))) * uint64(nNew))))
+
+ for i = 0; i < (*SessionTable)(unsafe.Pointer(pTab)).FnChange; i++ {
+ var p uintptr
+ var pNext uintptr
+ for p = *(*uintptr)(unsafe.Pointer((*SessionTable)(unsafe.Pointer(pTab)).FapChange + uintptr(i)*8)); p != 0; p = pNext {
+ var bPkOnly int32 = (libc.Bool32((int32((*SessionChange)(unsafe.Pointer(p)).Fop) == SQLITE_DELETE) && (bPatchset != 0)))
+ var iHash int32 = int32(sessionChangeHash(tls, pTab, bPkOnly, (*SessionChange)(unsafe.Pointer(p)).FaRecord, int32(nNew)))
+ pNext = (*SessionChange)(unsafe.Pointer(p)).FpNext
+ (*SessionChange)(unsafe.Pointer(p)).FpNext = *(*uintptr)(unsafe.Pointer(apNew + uintptr(iHash)*8))
+ *(*uintptr)(unsafe.Pointer(apNew + uintptr(iHash)*8)) = p
+ }
+ }
+
+ sessionFree(tls, pSession, (*SessionTable)(unsafe.Pointer(pTab)).FapChange)
+ (*SessionTable)(unsafe.Pointer(pTab)).FnChange = int32(nNew)
+ (*SessionTable)(unsafe.Pointer(pTab)).FapChange = apNew
+ }
+
+ return SQLITE_OK
+}
+
+// This function queries the database for the names of the columns of table
+// zThis, in schema zDb.
+//
+// Otherwise, if they are not NULL, variable *pnCol is set to the number
+// of columns in the database table and variable *pzTab is set to point to a
+// nul-terminated copy of the table name. *pazCol (if not NULL) is set to
+// point to an array of pointers to column names. And *pabPK (again, if not
+// NULL) is set to point to an array of booleans - true if the corresponding
+// column is part of the primary key.
+//
+// For example, if the table is declared as:
+//
+// CREATE TABLE tbl1(w, x, y, z, PRIMARY KEY(w, z));
+//
+// Then the four output variables are populated as follows:
+//
+// *pnCol = 4
+// *pzTab = "tbl1"
+// *pazCol = {"w", "x", "y", "z"}
+// *pabPK = {1, 0, 0, 1}
+//
+// All returned buffers are part of the same single allocation, which must
+// be freed using sqlite3_free() by the caller
+func sessionTableInfo(tls *libc.TLS, pSession uintptr, db uintptr, zDb uintptr, zThis uintptr, pnCol uintptr, pzTab uintptr, pazCol uintptr, pabPK uintptr) int32 { /* sqlite3.c:207635:12: */
+ bp := tls.Alloc(24)
+ defer tls.Free(24)
+
+ var zPragma uintptr
+ // var pStmt uintptr at bp+16, 8
+
+ var rc int32
+ var nByte Sqlite3_int64
+ var nDbCol int32 = 0
+ var nThis int32
+ var i int32
+ var pAlloc uintptr = uintptr(0)
+ var azCol uintptr = uintptr(0)
+ var abPK uintptr = uintptr(0)
+
+ nThis = Xsqlite3Strlen30(tls, zThis)
+ if (nThis == 12) && (0 == Xsqlite3_stricmp(tls, ts+10072 /* "sqlite_stat1" */, zThis)) {
+ rc = Xsqlite3_table_column_metadata(tls, db, zDb, zThis, uintptr(0), uintptr(0), uintptr(0), uintptr(0), uintptr(0), uintptr(0))
+ if rc == SQLITE_OK {
+ // For sqlite_stat1, pretend that (tbl,idx) is the PRIMARY KEY.
+ zPragma = Xsqlite3_mprintf(tls,
+
+ ts+30544 /* "SELECT 0, 'tbl',..." */, 0)
+ } else if rc == SQLITE_ERROR {
+ zPragma = Xsqlite3_mprintf(tls, ts+755 /* "" */, 0)
+ } else {
+ return rc
+ }
+ } else {
+ zPragma = Xsqlite3_mprintf(tls, ts+30665 /* "PRAGMA '%q'.tabl..." */, libc.VaList(bp, zDb, zThis))
+ }
+ if !(zPragma != 0) {
+ return SQLITE_NOMEM
+ }
+
+ rc = Xsqlite3_prepare_v2(tls, db, zPragma, -1, bp+16 /* &pStmt */, uintptr(0))
+ Xsqlite3_free(tls, zPragma)
+ if rc != SQLITE_OK {
+ return rc
+ }
+
+ nByte = (Sqlite3_int64(nThis + 1))
+ for SQLITE_ROW == Xsqlite3_step(tls, *(*uintptr)(unsafe.Pointer(bp + 16 /* pStmt */))) {
+ nByte = nByte + (Sqlite3_int64(Xsqlite3_column_bytes(tls, *(*uintptr)(unsafe.Pointer(bp + 16 /* pStmt */)), 1)))
+ nDbCol++
+ }
+ rc = Xsqlite3_reset(tls, *(*uintptr)(unsafe.Pointer(bp + 16 /* pStmt */)))
+
+ if rc == SQLITE_OK {
+ nByte = Sqlite3_int64(uint64(nByte) + (uint64(uint64(nDbCol) * ((uint64(unsafe.Sizeof(uintptr(0))) + uint64(unsafe.Sizeof(U8(0)))) + uint64(1)))))
+ pAlloc = sessionMalloc64(tls, pSession, nByte)
+ if pAlloc == uintptr(0) {
+ rc = SQLITE_NOMEM
+ }
+ }
+ if rc == SQLITE_OK {
+ azCol = pAlloc
+ pAlloc = (azCol + uintptr(nDbCol)*8)
+ abPK = pAlloc
+ pAlloc = (abPK + uintptr(nDbCol))
+ if pzTab != 0 {
+ libc.Xmemcpy(tls, pAlloc, zThis, (uint64(nThis + 1)))
+ *(*uintptr)(unsafe.Pointer(pzTab)) = pAlloc
+ pAlloc += (uintptr(nThis + 1))
+ }
+
+ i = 0
+ for SQLITE_ROW == Xsqlite3_step(tls, *(*uintptr)(unsafe.Pointer(bp + 16 /* pStmt */))) {
+ var nName int32 = Xsqlite3_column_bytes(tls, *(*uintptr)(unsafe.Pointer(bp + 16 /* pStmt */)), 1)
+ var zName uintptr = Xsqlite3_column_text(tls, *(*uintptr)(unsafe.Pointer(bp + 16 /* pStmt */)), 1)
+ if zName == uintptr(0) {
+ break
+ }
+ libc.Xmemcpy(tls, pAlloc, zName, (uint64(nName + 1)))
+ *(*uintptr)(unsafe.Pointer(azCol + uintptr(i)*8)) = pAlloc
+ pAlloc += (uintptr(nName + 1))
+ *(*U8)(unsafe.Pointer(abPK + uintptr(i))) = U8(Xsqlite3_column_int(tls, *(*uintptr)(unsafe.Pointer(bp + 16 /* pStmt */)), 5))
+ i++
+ }
+ rc = Xsqlite3_reset(tls, *(*uintptr)(unsafe.Pointer(bp + 16 /* pStmt */)))
+
+ }
+
+ // If successful, populate the output variables. Otherwise, zero them and
+ // free any allocation made. An error code will be returned in this case.
+ if rc == SQLITE_OK {
+ *(*uintptr)(unsafe.Pointer(pazCol)) = azCol
+ *(*uintptr)(unsafe.Pointer(pabPK)) = abPK
+ *(*int32)(unsafe.Pointer(pnCol)) = nDbCol
+ } else {
+ *(*uintptr)(unsafe.Pointer(pazCol)) = uintptr(0)
+ *(*uintptr)(unsafe.Pointer(pabPK)) = uintptr(0)
+ *(*int32)(unsafe.Pointer(pnCol)) = 0
+ if pzTab != 0 {
+ *(*uintptr)(unsafe.Pointer(pzTab)) = uintptr(0)
+ }
+ sessionFree(tls, pSession, azCol)
+ }
+ Xsqlite3_finalize(tls, *(*uintptr)(unsafe.Pointer(bp + 16 /* pStmt */)))
+ return rc
+}
+
+// This function is only called from within a pre-update handler for a
+// write to table pTab, part of session pSession. If this is the first
+// write to this table, initalize the SessionTable.nCol, azCol[] and
+// abPK[] arrays accordingly.
+//
+// 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
+// key, sqlite3_session.rc is left set to SQLITE_OK and non-zero returned to
+// indicate that updates on this table should be ignored. SessionTable.abPK
+// is set to NULL in this case.
+func sessionInitTable(tls *libc.TLS, pSession uintptr, pTab uintptr) int32 { /* sqlite3.c:207752:12: */
+ bp := tls.Alloc(8)
+ defer tls.Free(8)
+
+ if (*SessionTable)(unsafe.Pointer(pTab)).FnCol == 0 {
+ // var abPK uintptr at bp, 8
+
+ (*Sqlite3_session)(unsafe.Pointer(pSession)).Frc = sessionTableInfo(tls, pSession, (*Sqlite3_session)(unsafe.Pointer(pSession)).Fdb, (*Sqlite3_session)(unsafe.Pointer(pSession)).FzDb,
+ (*SessionTable)(unsafe.Pointer(pTab)).FzName, (pTab + 16 /* &.nCol */), uintptr(0), (pTab + 24 /* &.azCol */), bp /* &abPK */)
+ if (*Sqlite3_session)(unsafe.Pointer(pSession)).Frc == SQLITE_OK {
+ var i int32
+ for i = 0; i < (*SessionTable)(unsafe.Pointer(pTab)).FnCol; i++ {
+ if *(*U8)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp /* abPK */)) + uintptr(i))) != 0 {
+ (*SessionTable)(unsafe.Pointer(pTab)).FabPK = *(*uintptr)(unsafe.Pointer(bp /* abPK */))
+ break
+ }
+ }
+ if 0 == Xsqlite3_stricmp(tls, ts+10072 /* "sqlite_stat1" */, (*SessionTable)(unsafe.Pointer(pTab)).FzName) {
+ (*SessionTable)(unsafe.Pointer(pTab)).FbStat1 = 1
+ }
+
+ if (*Sqlite3_session)(unsafe.Pointer(pSession)).FbEnableSize != 0 {
+ *(*I64)(unsafe.Pointer(pSession + 64 /* &.nMaxChangesetSize */)) += I64((uint64(((Size_t((1 + sessionVarintLen(tls, (*SessionTable)(unsafe.Pointer(pTab)).FnCol)) + (*SessionTable)(unsafe.Pointer(pTab)).FnCol)) + libc.Xstrlen(tls, (*SessionTable)(unsafe.Pointer(pTab)).FzName)) + uint64(1))))
+ }
+ }
+ }
+ return (libc.Bool32(((*Sqlite3_session)(unsafe.Pointer(pSession)).Frc != 0) || ((*SessionTable)(unsafe.Pointer(pTab)).FabPK == uintptr(0))))
+}
+
+// Versions of the four methods in object SessionHook for use with the
+// sqlite_stat1 table. The purpose of this is to substitute a zero-length
+// blob each time a NULL value is read from the "idx" column of the
+// sqlite_stat1 table.
+type SessionStat1Ctx1 = struct {
+ Fhook SessionHook
+ FpSession uintptr
+} /* sqlite3.c:207787:9 */
+
+// Versions of the four methods in object SessionHook for use with the
+// sqlite_stat1 table. The purpose of this is to substitute a zero-length
+// blob each time a NULL value is read from the "idx" column of the
+// sqlite_stat1 table.
+type SessionStat1Ctx = SessionStat1Ctx1 /* sqlite3.c:207787:32 */
+
+func sessionStat1Old(tls *libc.TLS, pCtx uintptr, iCol int32, ppVal uintptr) int32 { /* sqlite3.c:207792:12: */
+ bp := tls.Alloc(8)
+ defer tls.Free(8)
+
+ var p uintptr = pCtx
+ *(*uintptr)(unsafe.Pointer(bp /* pVal */)) = uintptr(0)
+ var rc int32 = (*struct {
+ f func(*libc.TLS, uintptr, int32, uintptr) int32
+ })(unsafe.Pointer(&struct{ uintptr }{(*SessionStat1Ctx)(unsafe.Pointer(p)).Fhook.FxOld})).f(tls, (*SessionStat1Ctx)(unsafe.Pointer(p)).Fhook.FpCtx, iCol, bp /* &pVal */)
+ if ((rc == SQLITE_OK) && (iCol == 1)) && (Xsqlite3_value_type(tls, *(*uintptr)(unsafe.Pointer(bp /* pVal */))) == SQLITE_NULL) {
+ *(*uintptr)(unsafe.Pointer(bp /* pVal */)) = (*Sqlite3_session)(unsafe.Pointer((*SessionStat1Ctx)(unsafe.Pointer(p)).FpSession)).FpZeroBlob
+ }
+ *(*uintptr)(unsafe.Pointer(ppVal)) = *(*uintptr)(unsafe.Pointer(bp /* pVal */))
+ return rc
+}
+
+func sessionStat1New(tls *libc.TLS, pCtx uintptr, iCol int32, ppVal uintptr) int32 { /* sqlite3.c:207802:12: */
+ bp := tls.Alloc(8)
+ defer tls.Free(8)
+
+ var p uintptr = pCtx
+ *(*uintptr)(unsafe.Pointer(bp /* pVal */)) = uintptr(0)
+ var rc int32 = (*struct {
+ f func(*libc.TLS, uintptr, int32, uintptr) int32
+ })(unsafe.Pointer(&struct{ uintptr }{(*SessionStat1Ctx)(unsafe.Pointer(p)).Fhook.FxNew})).f(tls, (*SessionStat1Ctx)(unsafe.Pointer(p)).Fhook.FpCtx, iCol, bp /* &pVal */)
+ if ((rc == SQLITE_OK) && (iCol == 1)) && (Xsqlite3_value_type(tls, *(*uintptr)(unsafe.Pointer(bp /* pVal */))) == SQLITE_NULL) {
+ *(*uintptr)(unsafe.Pointer(bp /* pVal */)) = (*Sqlite3_session)(unsafe.Pointer((*SessionStat1Ctx)(unsafe.Pointer(p)).FpSession)).FpZeroBlob
+ }
+ *(*uintptr)(unsafe.Pointer(ppVal)) = *(*uintptr)(unsafe.Pointer(bp /* pVal */))
+ return rc
+}
+
+func sessionStat1Count(tls *libc.TLS, pCtx uintptr) int32 { /* sqlite3.c:207812:12: */
+ var p uintptr = pCtx
+ return (*struct {
+ f func(*libc.TLS, uintptr) int32
+ })(unsafe.Pointer(&struct{ uintptr }{(*SessionStat1Ctx)(unsafe.Pointer(p)).Fhook.FxCount})).f(tls, (*SessionStat1Ctx)(unsafe.Pointer(p)).Fhook.FpCtx)
+}
+
+func sessionStat1Depth(tls *libc.TLS, pCtx uintptr) int32 { /* sqlite3.c:207816:12: */
+ var p uintptr = pCtx
+ return (*struct {
+ f func(*libc.TLS, uintptr) int32
+ })(unsafe.Pointer(&struct{ uintptr }{(*SessionStat1Ctx)(unsafe.Pointer(p)).Fhook.FxDepth})).f(tls, (*SessionStat1Ctx)(unsafe.Pointer(p)).Fhook.FpCtx)
+}
+
+func sessionUpdateMaxSize(tls *libc.TLS, op int32, pSession uintptr, pTab uintptr, pC uintptr) int32 { /* sqlite3.c:207821:12: */
+ bp := tls.Alloc(44)
+ defer tls.Free(44)
+
+ *(*I64)(unsafe.Pointer(bp + 8 /* nNew */)) = int64(2)
+ if int32((*SessionChange)(unsafe.Pointer(pC)).Fop) == SQLITE_INSERT {
+ if op != SQLITE_DELETE {
+ var ii int32
+ for ii = 0; ii < (*SessionTable)(unsafe.Pointer(pTab)).FnCol; ii++ {
+ *(*uintptr)(unsafe.Pointer(bp /* p */)) = uintptr(0)
+ (*struct {
+ f func(*libc.TLS, uintptr, int32, uintptr) int32
+ })(unsafe.Pointer(&struct{ uintptr }{(*Sqlite3_session)(unsafe.Pointer(pSession)).Fhook.FxNew})).f(tls, (*Sqlite3_session)(unsafe.Pointer(pSession)).Fhook.FpCtx, ii, bp /* &p */)
+ sessionSerializeValue(tls, uintptr(0), *(*uintptr)(unsafe.Pointer(bp /* p */)), bp+8 /* &nNew */)
+ }
+ }
+ } else if op == SQLITE_DELETE {
+ *(*I64)(unsafe.Pointer(bp + 8 /* nNew */)) += I64((*SessionChange)(unsafe.Pointer(pC)).FnRecord)
+ if Xsqlite3_preupdate_blobwrite(tls, (*Sqlite3_session)(unsafe.Pointer(pSession)).Fdb) >= 0 {
+ *(*I64)(unsafe.Pointer(bp + 8 /* nNew */)) += I64((*SessionChange)(unsafe.Pointer(pC)).FnRecord)
+ }
+ } else {
+ var ii int32
+ var pCsr uintptr = (*SessionChange)(unsafe.Pointer(pC)).FaRecord
+ for ii = 0; ii < (*SessionTable)(unsafe.Pointer(pTab)).FnCol; ii++ {
+ var bChanged int32 = 1
+ var nOld int32 = 0
+ var eType int32
+ *(*uintptr)(unsafe.Pointer(bp + 16 /* p */)) = uintptr(0)
+ (*struct {
+ f func(*libc.TLS, uintptr, int32, uintptr) int32
+ })(unsafe.Pointer(&struct{ uintptr }{(*Sqlite3_session)(unsafe.Pointer(pSession)).Fhook.FxNew})).f(tls, (*Sqlite3_session)(unsafe.Pointer(pSession)).Fhook.FpCtx, ii, bp+16 /* &p */)
+ if *(*uintptr)(unsafe.Pointer(bp + 16 /* p */)) == uintptr(0) {
+ return SQLITE_NOMEM
+ }
+
+ eType = int32(*(*U8)(unsafe.Pointer(libc.PostIncUintptr(&pCsr, 1))))
+ switch eType {
+ case SQLITE_NULL:
+ bChanged = (libc.Bool32(Xsqlite3_value_type(tls, *(*uintptr)(unsafe.Pointer(bp + 16 /* p */))) != SQLITE_NULL))
+ break
+ fallthrough
+
+ case SQLITE_FLOAT:
+ fallthrough
+ case SQLITE_INTEGER:
+ {
+ if eType == Xsqlite3_value_type(tls, *(*uintptr)(unsafe.Pointer(bp + 16 /* p */))) {
+ *(*Sqlite3_int64)(unsafe.Pointer(bp + 32 /* iVal */)) = sessionGetI64(tls, pCsr)
+ if eType == SQLITE_INTEGER {
+ bChanged = (libc.Bool32(*(*Sqlite3_int64)(unsafe.Pointer(bp + 32 /* iVal */)) != Xsqlite3_value_int64(tls, *(*uintptr)(unsafe.Pointer(bp + 16 /* p */)))))
+ } else {
+ // var dVal float64 at bp+24, 8
+
+ libc.Xmemcpy(tls, bp+24 /* &dVal */, bp+32 /* &iVal */, uint64(8))
+ bChanged = (libc.Bool32(*(*float64)(unsafe.Pointer(bp + 24 /* dVal */)) != Xsqlite3_value_double(tls, *(*uintptr)(unsafe.Pointer(bp + 16 /* p */)))))
+ }
+ }
+ nOld = 8
+ pCsr += uintptr(8)
+ break
+
+ }
+ fallthrough
+
+ default:
+ {
+ // var nByte int32 at bp+40, 4
+
+ nOld = sessionVarintGet(tls, pCsr, bp+40 /* &nByte */)
+ pCsr += uintptr(nOld)
+ nOld = nOld + (*(*int32)(unsafe.Pointer(bp + 40 /* nByte */)))
+
+ if ((eType == Xsqlite3_value_type(tls, *(*uintptr)(unsafe.Pointer(bp + 16 /* p */)))) &&
+ (*(*int32)(unsafe.Pointer(bp + 40 /* nByte */)) == Xsqlite3_value_bytes(tls, *(*uintptr)(unsafe.Pointer(bp + 16 /* p */))))) &&
+ ((*(*int32)(unsafe.Pointer(bp + 40 /* nByte */)) == 0) || (0 == libc.Xmemcmp(tls, pCsr, Xsqlite3_value_blob(tls, *(*uintptr)(unsafe.Pointer(bp + 16 /* p */))), uint64(*(*int32)(unsafe.Pointer(bp + 40 /* nByte */)))))) {
+ bChanged = 0
+ }
+ pCsr += uintptr(*(*int32)(unsafe.Pointer(bp + 40 /* nByte */)))
+ break
+
+ }
+ }
+
+ if (bChanged != 0) && (*(*U8)(unsafe.Pointer((*SessionTable)(unsafe.Pointer(pTab)).FabPK + uintptr(ii))) != 0) {
+ *(*I64)(unsafe.Pointer(bp + 8 /* nNew */)) = (I64((*SessionChange)(unsafe.Pointer(pC)).FnRecord + 2))
+ break
+ }
+
+ if bChanged != 0 {
+ *(*I64)(unsafe.Pointer(bp + 8 /* nNew */)) += (I64(1 + nOld))
+ sessionSerializeValue(tls, uintptr(0), *(*uintptr)(unsafe.Pointer(bp + 16 /* p */)), bp+8 /* &nNew */)
+ } else if *(*U8)(unsafe.Pointer((*SessionTable)(unsafe.Pointer(pTab)).FabPK + uintptr(ii))) != 0 {
+ *(*I64)(unsafe.Pointer(bp + 8 /* nNew */)) += (I64(2 + nOld))
+ } else {
+ *(*I64)(unsafe.Pointer(bp + 8 /* nNew */)) += int64(2)
+ }
+ }
+ }
+
+ if *(*I64)(unsafe.Pointer(bp + 8 /* nNew */)) > I64((*SessionChange)(unsafe.Pointer(pC)).FnMaxSize) {
+ var nIncr int32 = (int32(*(*I64)(unsafe.Pointer(bp + 8 /* nNew */)) - I64((*SessionChange)(unsafe.Pointer(pC)).FnMaxSize)))
+ (*SessionChange)(unsafe.Pointer(pC)).FnMaxSize = int32(*(*I64)(unsafe.Pointer(bp + 8 /* nNew */)))
+ *(*I64)(unsafe.Pointer(pSession + 64 /* &.nMaxChangesetSize */)) += (I64(nIncr))
+ }
+ return SQLITE_OK
+}
+
+// This function is only called from with a pre-update-hook reporting a
+// change on table pTab (attached to session pSession). The type of change
+// (UPDATE, INSERT, DELETE) is specified by the first argument.
+//
+// Unless one is already present or an error occurs, an entry is added
+// to the changed-rows hash table associated with table pTab.
+func sessionPreupdateOneChange(tls *libc.TLS, op int32, pSession uintptr, pTab uintptr) { /* sqlite3.c:207927:13: */
+ bp := tls.Alloc(80)
+ defer tls.Free(80)
+
+ // var iHash int32 at bp+48, 4
+
+ // var bNull int32 at bp+52, 4
+
+ var rc int32
+ // var stat1 SessionStat1Ctx at bp, 48
+
+ var p uintptr
+ // var p1 uintptr at bp+56, 8
+
+ // var p2 uintptr at bp+72, 8
+
+ // Create a new change object containing all the old values (if
+ // this is an SQLITE_UPDATE or SQLITE_DELETE), or just the PK
+ // values (if this is an INSERT).
+ // var nByte Sqlite3_int64 at bp+64, 8
+ // Number of bytes to allocate
+ var i int32
+ // Search the hash table for an existing record for this row.
+ var pC uintptr
+ *(*int32)(unsafe.Pointer(bp + 52 /* bNull */)) = 0
+ rc = SQLITE_OK
+ *(*SessionStat1Ctx)(unsafe.Pointer(bp /* stat1 */)) = SessionStat1Ctx{}
+
+ if !((*Sqlite3_session)(unsafe.Pointer(pSession)).Frc != 0) {
+ goto __1
+ }
+ return
+__1:
+ ;
+
+ // Load table details if required
+ if !(sessionInitTable(tls, pSession, pTab) != 0) {
+ goto __2
+ }
+ return
+__2:
+ ;
+
+ // Check the number of columns in this xPreUpdate call matches the
+ // number of columns in the table.
+ if !((*SessionTable)(unsafe.Pointer(pTab)).FnCol != (*struct {
+ f func(*libc.TLS, uintptr) int32
+ })(unsafe.Pointer(&struct{ uintptr }{(*Sqlite3_session)(unsafe.Pointer(pSession)).Fhook.FxCount})).f(tls, (*Sqlite3_session)(unsafe.Pointer(pSession)).Fhook.FpCtx)) {
+ goto __3
+ }
+ (*Sqlite3_session)(unsafe.Pointer(pSession)).Frc = SQLITE_SCHEMA
+ return
+__3:
+ ;
+
+ // Grow the hash table if required
+ if !(sessionGrowHash(tls, pSession, 0, pTab) != 0) {
+ goto __4
+ }
+ (*Sqlite3_session)(unsafe.Pointer(pSession)).Frc = SQLITE_NOMEM
+ return
+__4:
+ ;
+
+ if !((*SessionTable)(unsafe.Pointer(pTab)).FbStat1 != 0) {
+ goto __5
+ }
+ (*SessionStat1Ctx)(unsafe.Pointer(bp /* &stat1 */)).Fhook = (*Sqlite3_session)(unsafe.Pointer(pSession)).Fhook
+ (*SessionStat1Ctx)(unsafe.Pointer(bp /* &stat1 */)).FpSession = pSession
+ (*Sqlite3_session)(unsafe.Pointer(pSession)).Fhook.FpCtx = bp /* &stat1 */
+ (*Sqlite3_session)(unsafe.Pointer(pSession)).Fhook.FxNew = *(*uintptr)(unsafe.Pointer(&struct {
+ f func(*libc.TLS, uintptr, int32, uintptr) int32
+ }{sessionStat1New}))
+ (*Sqlite3_session)(unsafe.Pointer(pSession)).Fhook.FxOld = *(*uintptr)(unsafe.Pointer(&struct {
+ f func(*libc.TLS, uintptr, int32, uintptr) int32
+ }{sessionStat1Old}))
+ (*Sqlite3_session)(unsafe.Pointer(pSession)).Fhook.FxCount = *(*uintptr)(unsafe.Pointer(&struct {
+ f func(*libc.TLS, uintptr) int32
+ }{sessionStat1Count}))
+ (*Sqlite3_session)(unsafe.Pointer(pSession)).Fhook.FxDepth = *(*uintptr)(unsafe.Pointer(&struct {
+ f func(*libc.TLS, uintptr) int32
+ }{sessionStat1Depth}))
+ if !((*Sqlite3_session)(unsafe.Pointer(pSession)).FpZeroBlob == uintptr(0)) {
+ goto __6
+ }
+ p = Xsqlite3ValueNew(tls, uintptr(0))
+ if !(p == uintptr(0)) {
+ goto __7
+ }
+ rc = SQLITE_NOMEM
+ goto error_out
+__7:
+ ;
+ Xsqlite3ValueSetStr(tls, p, 0, ts+755 /* "" */, uint8(0), uintptr(0))
+ (*Sqlite3_session)(unsafe.Pointer(pSession)).FpZeroBlob = p
+__6:
+ ;
+__5:
+ ;
+
+ // Calculate the hash-key for this change. If the primary key of the row
+ // includes a NULL value, exit early. Such changes are ignored by the
+ // session module.
+ rc = sessionPreupdateHash(tls, pSession, pTab, (libc.Bool32(op == SQLITE_INSERT)), bp+48 /* &iHash */, bp+52 /* &bNull */)
+ if !(rc != SQLITE_OK) {
+ goto __8
+ }
+ goto error_out
+__8:
+ ;
+
+ if !(*(*int32)(unsafe.Pointer(bp + 52 /* bNull */)) == 0) {
+ goto __9
+ }
+ pC = *(*uintptr)(unsafe.Pointer((*SessionTable)(unsafe.Pointer(pTab)).FapChange + uintptr(*(*int32)(unsafe.Pointer(bp + 48 /* iHash */)))*8))
+__10:
+ if !(pC != 0) {
+ goto __12
+ }
+ if !(sessionPreupdateEqual(tls, pSession, pTab, pC, op) != 0) {
+ goto __13
+ }
+ goto __12
+__13:
+ ;
+ goto __11
+__11:
+ pC = (*SessionChange)(unsafe.Pointer(pC)).FpNext
+ goto __10
+ goto __12
+__12:
+ ;
+
+ if !(pC == uintptr(0)) {
+ goto __14
+ } // Used to iterate through columns
+
+ (*SessionTable)(unsafe.Pointer(pTab)).FnEntry++
+
+ // Figure out how large an allocation is required
+ *(*Sqlite3_int64)(unsafe.Pointer(bp + 64 /* nByte */)) = Sqlite3_int64(unsafe.Sizeof(SessionChange{}))
+ i = 0
+__16:
+ if !(i < (*SessionTable)(unsafe.Pointer(pTab)).FnCol) {
+ goto __18
+ }
+ *(*uintptr)(unsafe.Pointer(bp + 56 /* p1 */)) = uintptr(0)
+ if !(op != SQLITE_INSERT) {
+ goto __19
+ }
+ (*struct {
+ f func(*libc.TLS, uintptr, int32, uintptr) int32
+ })(unsafe.Pointer(&struct{ uintptr }{(*Sqlite3_session)(unsafe.Pointer(pSession)).Fhook.FxOld})).f(tls, (*Sqlite3_session)(unsafe.Pointer(pSession)).Fhook.FpCtx, i, bp+56 /* &p1 */)
+
+ goto __20
+__19:
+ if !(*(*U8)(unsafe.Pointer((*SessionTable)(unsafe.Pointer(pTab)).FabPK + uintptr(i))) != 0) {
+ goto __21
+ }
+ (*struct {
+ f func(*libc.TLS, uintptr, int32, uintptr) int32
+ })(unsafe.Pointer(&struct{ uintptr }{(*Sqlite3_session)(unsafe.Pointer(pSession)).Fhook.FxNew})).f(tls, (*Sqlite3_session)(unsafe.Pointer(pSession)).Fhook.FpCtx, i, bp+56 /* &p1 */)
+
+__21:
+ ;
+__20:
+ ;
+
+ // This may fail if SQLite value p contains a utf-16 string that must
+ // be converted to utf-8 and an OOM error occurs while doing so.
+ rc = sessionSerializeValue(tls, uintptr(0), *(*uintptr)(unsafe.Pointer(bp + 56 /* p1 */)), bp+64 /* &nByte */)
+ if !(rc != SQLITE_OK) {
+ goto __22
+ }
+ goto error_out
+__22:
+ ;
+ goto __17
+__17:
+ i++
+ goto __16
+ goto __18
+__18:
+ ;
+
+ // Allocate the change object
+ pC = sessionMalloc64(tls, pSession, *(*Sqlite3_int64)(unsafe.Pointer(bp + 64 /* nByte */)))
+ if !(!(pC != 0)) {
+ goto __23
+ }
+ rc = SQLITE_NOMEM
+ goto error_out
+ goto __24
+__23:
+ libc.Xmemset(tls, pC, 0, uint64(unsafe.Sizeof(SessionChange{})))
+ (*SessionChange)(unsafe.Pointer(pC)).FaRecord = (pC + 1*32)
+__24:
+ ;
+
+ // Populate the change object. None of the preupdate_old(),
+ // preupdate_new() or SerializeValue() calls below may fail as all
+ // required values and encodings have already been cached in memory.
+ // It is not possible for an OOM to occur in this block.
+ *(*Sqlite3_int64)(unsafe.Pointer(bp + 64 /* nByte */)) = int64(0)
+ i = 0
+__25:
+ if !(i < (*SessionTable)(unsafe.Pointer(pTab)).FnCol) {
+ goto __27
+ }
+ *(*uintptr)(unsafe.Pointer(bp + 72 /* p2 */)) = uintptr(0)
+ if !(op != SQLITE_INSERT) {
+ goto __28
+ }
+ (*struct {
+ f func(*libc.TLS, uintptr, int32, uintptr) int32
+ })(unsafe.Pointer(&struct{ uintptr }{(*Sqlite3_session)(unsafe.Pointer(pSession)).Fhook.FxOld})).f(tls, (*Sqlite3_session)(unsafe.Pointer(pSession)).Fhook.FpCtx, i, bp+72 /* &p2 */)
+ goto __29
+__28:
+ if !(*(*U8)(unsafe.Pointer((*SessionTable)(unsafe.Pointer(pTab)).FabPK + uintptr(i))) != 0) {
+ goto __30
+ }
+ (*struct {
+ f func(*libc.TLS, uintptr, int32, uintptr) int32
+ })(unsafe.Pointer(&struct{ uintptr }{(*Sqlite3_session)(unsafe.Pointer(pSession)).Fhook.FxNew})).f(tls, (*Sqlite3_session)(unsafe.Pointer(pSession)).Fhook.FpCtx, i, bp+72 /* &p2 */)
+__30:
+ ;
+__29:
+ ;
+ sessionSerializeValue(tls, ((*SessionChange)(unsafe.Pointer(pC)).FaRecord + uintptr(*(*Sqlite3_int64)(unsafe.Pointer(bp + 64 /* nByte */)))), *(*uintptr)(unsafe.Pointer(bp + 72 /* p2 */)), bp+64 /* &nByte */)
+ goto __26
+__26:
+ i++
+ goto __25
+ goto __27
+__27:
+ ;
+
+ // Add the change to the hash-table
+ if !(((*Sqlite3_session)(unsafe.Pointer(pSession)).FbIndirect != 0) || ((*struct {
+ f func(*libc.TLS, uintptr) int32
+ })(unsafe.Pointer(&struct{ uintptr }{(*Sqlite3_session)(unsafe.Pointer(pSession)).Fhook.FxDepth})).f(tls, (*Sqlite3_session)(unsafe.Pointer(pSession)).Fhook.FpCtx) != 0)) {
+ goto __31
+ }
+ (*SessionChange)(unsafe.Pointer(pC)).FbIndirect = U8(1)
+__31:
+ ;
+ (*SessionChange)(unsafe.Pointer(pC)).FnRecord = int32(*(*Sqlite3_int64)(unsafe.Pointer(bp + 64 /* nByte */)))
+ (*SessionChange)(unsafe.Pointer(pC)).Fop = U8(op)
+ (*SessionChange)(unsafe.Pointer(pC)).FpNext = *(*uintptr)(unsafe.Pointer((*SessionTable)(unsafe.Pointer(pTab)).FapChange + uintptr(*(*int32)(unsafe.Pointer(bp + 48 /* iHash */)))*8))
+ *(*uintptr)(unsafe.Pointer((*SessionTable)(unsafe.Pointer(pTab)).FapChange + uintptr(*(*int32)(unsafe.Pointer(bp + 48 /* iHash */)))*8)) = pC
+
+ goto __15
+__14:
+ if !((*SessionChange)(unsafe.Pointer(pC)).FbIndirect != 0) {
+ goto __32
+ }
+ // If the existing change is considered "indirect", but this current
+ // change is "direct", mark the change object as direct.
+ if !(((*struct {
+ f func(*libc.TLS, uintptr) int32
+ })(unsafe.Pointer(&struct{ uintptr }{(*Sqlite3_session)(unsafe.Pointer(pSession)).Fhook.FxDepth})).f(tls, (*Sqlite3_session)(unsafe.Pointer(pSession)).Fhook.FpCtx) == 0) &&
+ ((*Sqlite3_session)(unsafe.Pointer(pSession)).FbIndirect == 0)) {
+ goto __33
+ }
+ (*SessionChange)(unsafe.Pointer(pC)).FbIndirect = U8(0)
+__33:
+ ;
+__32:
+ ;
+__15:
+ ;
+
+ if !((*Sqlite3_session)(unsafe.Pointer(pSession)).FbEnableSize != 0) {
+ goto __34
+ }
+ rc = sessionUpdateMaxSize(tls, op, pSession, pTab, pC)
+__34:
+ ;
+__9:
+ ;
+
+ // If an error has occurred, mark the session object as failed.
+error_out:
+ if !((*SessionTable)(unsafe.Pointer(pTab)).FbStat1 != 0) {
+ goto __35
+ }
+ (*Sqlite3_session)(unsafe.Pointer(pSession)).Fhook = (*SessionStat1Ctx)(unsafe.Pointer(bp /* &stat1 */)).Fhook
+__35:
+ ;
+ if !(rc != SQLITE_OK) {
+ goto __36
+ }
+ (*Sqlite3_session)(unsafe.Pointer(pSession)).Frc = rc
+__36:
+}
+
+func sessionFindTable(tls *libc.TLS, pSession uintptr, zName uintptr, ppTab uintptr) int32 { /* sqlite3.c:208076:12: */
+ var rc int32 = SQLITE_OK
+ var nName int32 = Xsqlite3Strlen30(tls, zName)
+ var pRet uintptr
+
+ // Search for an existing table
+ for pRet = (*Sqlite3_session)(unsafe.Pointer(pSession)).FpTable; pRet != 0; pRet = (*SessionTable)(unsafe.Pointer(pRet)).FpNext {
+ if 0 == Xsqlite3_strnicmp(tls, (*SessionTable)(unsafe.Pointer(pRet)).FzName, zName, (nName+1)) {
+ break
+ }
+ }
+
+ if (pRet == uintptr(0)) && ((*Sqlite3_session)(unsafe.Pointer(pSession)).FbAutoAttach != 0) {
+ // If there is a table-filter configured, invoke it. If it returns 0,
+ // do not automatically add the new table.
+ if ((*Sqlite3_session)(unsafe.Pointer(pSession)).FxTableFilter == uintptr(0)) ||
+ ((*struct {
+ f func(*libc.TLS, uintptr, uintptr) int32
+ })(unsafe.Pointer(&struct{ uintptr }{(*Sqlite3_session)(unsafe.Pointer(pSession)).FxTableFilter})).f(tls, (*Sqlite3_session)(unsafe.Pointer(pSession)).FpFilterCtx, zName) != 0) {
+ rc = Xsqlite3session_attach(tls, pSession, zName)
+ if rc == SQLITE_OK {
+ for pRet = (*Sqlite3_session)(unsafe.Pointer(pSession)).FpTable; (*SessionTable)(unsafe.Pointer(pRet)).FpNext != 0; pRet = (*SessionTable)(unsafe.Pointer(pRet)).FpNext {
+ }
+
+ }
+ }
+ }
+
+ *(*uintptr)(unsafe.Pointer(ppTab)) = pRet
+ return rc
+}
+
+// The 'pre-update' hook registered by this module with SQLite databases.
+func xPreUpdate(tls *libc.TLS, pCtx uintptr, db uintptr, op int32, zDb uintptr, zName uintptr, iKey1 Sqlite3_int64, iKey2 Sqlite3_int64) { /* sqlite3.c:208112:13: */
+ bp := tls.Alloc(8)
+ defer tls.Free(8)
+
+ var pSession uintptr
+ var nDb int32 = Xsqlite3Strlen30(tls, zDb)
+
+ for pSession = pCtx; pSession != 0; pSession = (*Sqlite3_session)(unsafe.Pointer(pSession)).FpNext {
+ // var pTab uintptr at bp, 8
+
+ // If this session is attached to a different database ("main", "temp"
+ // etc.), or if it is not currently enabled, there is nothing to do. Skip
+ // to the next session object attached to this database.
+ if (*Sqlite3_session)(unsafe.Pointer(pSession)).FbEnable == 0 {
+ continue
+ }
+ if (*Sqlite3_session)(unsafe.Pointer(pSession)).Frc != 0 {
+ continue
+ }
+ if Xsqlite3_strnicmp(tls, zDb, (*Sqlite3_session)(unsafe.Pointer(pSession)).FzDb, (nDb+1)) != 0 {
+ continue
+ }
+
+ (*Sqlite3_session)(unsafe.Pointer(pSession)).Frc = sessionFindTable(tls, pSession, zName, bp /* &pTab */)
+ if *(*uintptr)(unsafe.Pointer(bp /* pTab */)) != 0 {
+
+ sessionPreupdateOneChange(tls, op, pSession, *(*uintptr)(unsafe.Pointer(bp /* pTab */)))
+ if op == SQLITE_UPDATE {
+ sessionPreupdateOneChange(tls, SQLITE_INSERT, pSession, *(*uintptr)(unsafe.Pointer(bp /* pTab */)))
+ }
+ }
+ }
+}
+
+// The pre-update hook implementations.
+func sessionPreupdateOld(tls *libc.TLS, pCtx uintptr, iVal int32, ppVal uintptr) int32 { /* sqlite3.c:208150:12: */
+ return Xsqlite3_preupdate_old(tls, pCtx, iVal, ppVal)
+}
+
+func sessionPreupdateNew(tls *libc.TLS, pCtx uintptr, iVal int32, ppVal uintptr) int32 { /* sqlite3.c:208153:12: */
+ return Xsqlite3_preupdate_new(tls, pCtx, iVal, ppVal)
+}
+
+func sessionPreupdateCount(tls *libc.TLS, pCtx uintptr) int32 { /* sqlite3.c:208156:12: */
+ return Xsqlite3_preupdate_count(tls, pCtx)
+}
+
+func sessionPreupdateDepth(tls *libc.TLS, pCtx uintptr) int32 { /* sqlite3.c:208159:12: */
+ return Xsqlite3_preupdate_depth(tls, pCtx)
+}
+
+// Install the pre-update hooks on the session object passed as the only
+// argument.
+func sessionPreupdateHooks(tls *libc.TLS, pSession uintptr) { /* sqlite3.c:208167:13: */
+ (*Sqlite3_session)(unsafe.Pointer(pSession)).Fhook.FpCtx = (*Sqlite3_session)(unsafe.Pointer(pSession)).Fdb
+ (*Sqlite3_session)(unsafe.Pointer(pSession)).Fhook.FxOld = *(*uintptr)(unsafe.Pointer(&struct {
+ f func(*libc.TLS, uintptr, int32, uintptr) int32
+ }{sessionPreupdateOld}))
+ (*Sqlite3_session)(unsafe.Pointer(pSession)).Fhook.FxNew = *(*uintptr)(unsafe.Pointer(&struct {
+ f func(*libc.TLS, uintptr, int32, uintptr) int32
+ }{sessionPreupdateNew}))
+ (*Sqlite3_session)(unsafe.Pointer(pSession)).Fhook.FxCount = *(*uintptr)(unsafe.Pointer(&struct {
+ f func(*libc.TLS, uintptr) int32
+ }{sessionPreupdateCount}))
+ (*Sqlite3_session)(unsafe.Pointer(pSession)).Fhook.FxDepth = *(*uintptr)(unsafe.Pointer(&struct {
+ f func(*libc.TLS, uintptr) int32
+ }{sessionPreupdateDepth}))
+}
+
+type SessionDiffCtx1 = struct {
+ FpStmt uintptr
+ FnOldOff int32
+ F__ccgo_pad1 [4]byte
+} /* sqlite3.c:208177:9 */
+
+type SessionDiffCtx = SessionDiffCtx1 /* sqlite3.c:208177:31 */
+
+// The diff hook implementations.
+func sessionDiffOld(tls *libc.TLS, pCtx uintptr, iVal int32, ppVal uintptr) int32 { /* sqlite3.c:208186:12: */
+ var p uintptr = pCtx
+ *(*uintptr)(unsafe.Pointer(ppVal)) = Xsqlite3_column_value(tls, (*SessionDiffCtx)(unsafe.Pointer(p)).FpStmt, (iVal + (*SessionDiffCtx)(unsafe.Pointer(p)).FnOldOff))
+ return SQLITE_OK
+}
+
+func sessionDiffNew(tls *libc.TLS, pCtx uintptr, iVal int32, ppVal uintptr) int32 { /* sqlite3.c:208191:12: */
+ var p uintptr = pCtx
+ *(*uintptr)(unsafe.Pointer(ppVal)) = Xsqlite3_column_value(tls, (*SessionDiffCtx)(unsafe.Pointer(p)).FpStmt, iVal)
+ return SQLITE_OK
+}
+
+func sessionDiffCount(tls *libc.TLS, pCtx uintptr) int32 { /* sqlite3.c:208196:12: */
+ var p uintptr = pCtx
+ if (*SessionDiffCtx)(unsafe.Pointer(p)).FnOldOff != 0 {
+ return (*SessionDiffCtx)(unsafe.Pointer(p)).FnOldOff
+ }
+ return Xsqlite3_column_count(tls, (*SessionDiffCtx)(unsafe.Pointer(p)).FpStmt)
+}
+
+func sessionDiffDepth(tls *libc.TLS, pCtx uintptr) int32 { /* sqlite3.c:208200:12: */
+ return 0
+}
+
+// Install the diff hooks on the session object passed as the only
+// argument.
+func sessionDiffHooks(tls *libc.TLS, pSession uintptr, pDiffCtx uintptr) { /* sqlite3.c:208208:13: */
+ (*Sqlite3_session)(unsafe.Pointer(pSession)).Fhook.FpCtx = pDiffCtx
+ (*Sqlite3_session)(unsafe.Pointer(pSession)).Fhook.FxOld = *(*uintptr)(unsafe.Pointer(&struct {
+ f func(*libc.TLS, uintptr, int32, uintptr) int32
+ }{sessionDiffOld}))
+ (*Sqlite3_session)(unsafe.Pointer(pSession)).Fhook.FxNew = *(*uintptr)(unsafe.Pointer(&struct {
+ f func(*libc.TLS, uintptr, int32, uintptr) int32
+ }{sessionDiffNew}))
+ (*Sqlite3_session)(unsafe.Pointer(pSession)).Fhook.FxCount = *(*uintptr)(unsafe.Pointer(&struct {
+ f func(*libc.TLS, uintptr) int32
+ }{sessionDiffCount}))
+ (*Sqlite3_session)(unsafe.Pointer(pSession)).Fhook.FxDepth = *(*uintptr)(unsafe.Pointer(&struct {
+ f func(*libc.TLS, uintptr) int32
+ }{sessionDiffDepth}))
+}
+
+func sessionExprComparePK(tls *libc.TLS, nCol int32, zDb1 uintptr, zDb2 uintptr, zTab uintptr, azCol uintptr, abPK uintptr) uintptr { /* sqlite3.c:208219:13: */
+ bp := tls.Alloc(64)
+ defer tls.Free(64)
+
+ var i int32
+ var zSep uintptr = ts + 755 /* "" */
+ var zRet uintptr = uintptr(0)
+
+ for i = 0; i < nCol; i++ {
+ if *(*U8)(unsafe.Pointer(abPK + uintptr(i))) != 0 {
+ zRet = Xsqlite3_mprintf(tls, ts+30694, /* "%z%s\"%w\".\"%w\".\"%..." */
+ libc.VaList(bp, zRet, zSep, zDb1, zTab, *(*uintptr)(unsafe.Pointer(azCol + uintptr(i)*8)), zDb2, zTab, *(*uintptr)(unsafe.Pointer(azCol + uintptr(i)*8))))
+ zSep = ts + 19877 /* " AND " */
+ if zRet == uintptr(0) {
+ break
+ }
+ }
+ }
+
+ return zRet
+}
+
+func sessionExprCompareOther(tls *libc.TLS, nCol int32, zDb1 uintptr, zDb2 uintptr, zTab uintptr, azCol uintptr, abPK uintptr) uintptr { /* sqlite3.c:208242:13: */
+ bp := tls.Alloc(64)
+ defer tls.Free(64)
+
+ var i int32
+ var zSep uintptr = ts + 755 /* "" */
+ var zRet uintptr = uintptr(0)
+ var bHave int32 = 0
+
+ for i = 0; i < nCol; i++ {
+ if int32(*(*U8)(unsafe.Pointer(abPK + uintptr(i)))) == 0 {
+ bHave = 1
+ zRet = Xsqlite3_mprintf(tls,
+ ts+30728, /* "%z%s\"%w\".\"%w\".\"%..." */
+ libc.VaList(bp, zRet, zSep, zDb1, zTab, *(*uintptr)(unsafe.Pointer(azCol + uintptr(i)*8)), zDb2, zTab, *(*uintptr)(unsafe.Pointer(azCol + uintptr(i)*8))))
+ zSep = ts + 30769 /* " OR " */
+ if zRet == uintptr(0) {
+ break
+ }
+ }
+ }
+
+ if bHave == 0 {
+
+ zRet = Xsqlite3_mprintf(tls, ts+6506 /* "0" */, 0)
+ }
+
+ return zRet
+}
+
+func sessionSelectFindNew(tls *libc.TLS, nCol int32, zDb1 uintptr, zDb2 uintptr, zTbl uintptr, zExpr uintptr) uintptr { /* sqlite3.c:208273:13: */
+ bp := tls.Alloc(40)
+ defer tls.Free(40)
+
+ var zRet uintptr = Xsqlite3_mprintf(tls,
+
+ ts+30774, /* "SELECT * FROM \"%..." */
+ libc.VaList(bp, zDb1, zTbl, zDb2, zTbl, zExpr))
+ return zRet
+}
+
+func sessionDiffFindNew(tls *libc.TLS, op int32, pSession uintptr, pTab uintptr, zDb1 uintptr, zDb2 uintptr, zExpr uintptr) int32 { /* sqlite3.c:208289:12: */
+ bp := tls.Alloc(8)
+ defer tls.Free(8)
+
+ var rc int32 = SQLITE_OK
+ var zStmt uintptr = sessionSelectFindNew(tls, (*SessionTable)(unsafe.Pointer(pTab)).FnCol, zDb1, zDb2, (*SessionTable)(unsafe.Pointer(pTab)).FzName, zExpr)
+
+ if zStmt == uintptr(0) {
+ rc = SQLITE_NOMEM
+ } else {
+ // var pStmt uintptr at bp, 8
+
+ rc = Xsqlite3_prepare(tls, (*Sqlite3_session)(unsafe.Pointer(pSession)).Fdb, zStmt, -1, bp /* &pStmt */, uintptr(0))
+ if rc == SQLITE_OK {
+ var pDiffCtx uintptr = (*Sqlite3_session)(unsafe.Pointer(pSession)).Fhook.FpCtx
+ (*SessionDiffCtx)(unsafe.Pointer(pDiffCtx)).FpStmt = *(*uintptr)(unsafe.Pointer(bp /* pStmt */))
+ (*SessionDiffCtx)(unsafe.Pointer(pDiffCtx)).FnOldOff = 0
+ for SQLITE_ROW == Xsqlite3_step(tls, *(*uintptr)(unsafe.Pointer(bp /* pStmt */))) {
+ sessionPreupdateOneChange(tls, op, pSession, pTab)
+ }
+ rc = Xsqlite3_finalize(tls, *(*uintptr)(unsafe.Pointer(bp /* pStmt */)))
+ }
+ Xsqlite3_free(tls, zStmt)
+ }
+
+ return rc
+}
+
+func sessionDiffFindModified(tls *libc.TLS, pSession uintptr, pTab uintptr, zFrom uintptr, zExpr uintptr) int32 { /* sqlite3.c:208320:12: */
+ bp := tls.Alloc(56)
+ defer tls.Free(56)
+
+ var rc int32 = SQLITE_OK
+
+ var zExpr2 uintptr = sessionExprCompareOther(tls, (*SessionTable)(unsafe.Pointer(pTab)).FnCol,
+ (*Sqlite3_session)(unsafe.Pointer(pSession)).FzDb, zFrom, (*SessionTable)(unsafe.Pointer(pTab)).FzName, (*SessionTable)(unsafe.Pointer(pTab)).FazCol, (*SessionTable)(unsafe.Pointer(pTab)).FabPK)
+ if zExpr2 == uintptr(0) {
+ rc = SQLITE_NOMEM
+ } else {
+ var zStmt uintptr = Xsqlite3_mprintf(tls,
+ ts+30852, /* "SELECT * FROM \"%..." */
+ libc.VaList(bp, (*Sqlite3_session)(unsafe.Pointer(pSession)).FzDb, (*SessionTable)(unsafe.Pointer(pTab)).FzName, zFrom, (*SessionTable)(unsafe.Pointer(pTab)).FzName, zExpr, zExpr2))
+ if zStmt == uintptr(0) {
+ rc = SQLITE_NOMEM
+ } else {
+ // var pStmt uintptr at bp+48, 8
+
+ rc = Xsqlite3_prepare(tls, (*Sqlite3_session)(unsafe.Pointer(pSession)).Fdb, zStmt, -1, bp+48 /* &pStmt */, uintptr(0))
+
+ if rc == SQLITE_OK {
+ var pDiffCtx uintptr = (*Sqlite3_session)(unsafe.Pointer(pSession)).Fhook.FpCtx
+ (*SessionDiffCtx)(unsafe.Pointer(pDiffCtx)).FpStmt = *(*uintptr)(unsafe.Pointer(bp + 48 /* pStmt */))
+ (*SessionDiffCtx)(unsafe.Pointer(pDiffCtx)).FnOldOff = (*SessionTable)(unsafe.Pointer(pTab)).FnCol
+ for SQLITE_ROW == Xsqlite3_step(tls, *(*uintptr)(unsafe.Pointer(bp + 48 /* pStmt */))) {
+ sessionPreupdateOneChange(tls, SQLITE_UPDATE, pSession, pTab)
+ }
+ rc = Xsqlite3_finalize(tls, *(*uintptr)(unsafe.Pointer(bp + 48 /* pStmt */)))
+ }
+ Xsqlite3_free(tls, zStmt)
+ }
+ }
+
+ return rc
+}
+
+func Xsqlite3session_diff(tls *libc.TLS, pSession uintptr, zFrom uintptr, zTbl uintptr, pzErrMsg uintptr) int32 { /* sqlite3.c:208360:16: */
+ bp := tls.Alloc(48)
+ defer tls.Free(48)
+
+ var zDb uintptr
+ var rc int32
+ // var d SessionDiffCtx at bp, 16
+
+ var i int32
+ var bHasPk int32
+ var bMismatch int32
+ // var nCol int32 at bp+24, 4
+ // Columns in zFrom.zTbl
+ // var abPK uintptr at bp+40, 8
+
+ // var azCol uintptr at bp+32, 8
+
+ var zExpr uintptr
+ var db uintptr
+ // var pTo uintptr at bp+16, 8
+ zDb = (*Sqlite3_session)(unsafe.Pointer(pSession)).FzDb
+ rc = (*Sqlite3_session)(unsafe.Pointer(pSession)).Frc
+
+ libc.Xmemset(tls, bp /* &d */, 0, uint64(unsafe.Sizeof(SessionDiffCtx{})))
+ sessionDiffHooks(tls, pSession, bp /* &d */)
+
+ Xsqlite3_mutex_enter(tls, Xsqlite3_db_mutex(tls, (*Sqlite3_session)(unsafe.Pointer(pSession)).Fdb))
+ if !(pzErrMsg != 0) {
+ goto __1
+ }
+ *(*uintptr)(unsafe.Pointer(pzErrMsg)) = uintptr(0)
+__1:
+ ;
+ if !(rc == SQLITE_OK) {
+ goto __2
+ }
+ zExpr = uintptr(0)
+ db = (*Sqlite3_session)(unsafe.Pointer(pSession)).Fdb // Table zTbl
+
+ // Locate and if necessary initialize the target table object
+ rc = sessionFindTable(tls, pSession, zTbl, bp+16 /* &pTo */)
+ if !(*(*uintptr)(unsafe.Pointer(bp + 16 /* pTo */)) == uintptr(0)) {
+ goto __3
+ }
+ goto diff_out
+__3:
+ ;
+ if !(sessionInitTable(tls, pSession, *(*uintptr)(unsafe.Pointer(bp + 16 /* pTo */))) != 0) {
+ goto __4
+ }
+ rc = (*Sqlite3_session)(unsafe.Pointer(pSession)).Frc
+ goto diff_out
+__4:
+ ;
+
+ // Check the table schemas match
+ if !(rc == SQLITE_OK) {
+ goto __5
+ }
+ bHasPk = 0
+ bMismatch = 0
+ *(*uintptr)(unsafe.Pointer(bp + 32 /* azCol */)) = uintptr(0)
+ rc = sessionTableInfo(tls, uintptr(0), db, zFrom, zTbl, bp+24 /* &nCol */, uintptr(0), bp+32 /* &azCol */, bp+40 /* &abPK */)
+ if !(rc == SQLITE_OK) {
+ goto __6
+ }
+ if !((*SessionTable)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 16 /* pTo */)))).FnCol != *(*int32)(unsafe.Pointer(bp + 24 /* nCol */))) {
+ goto __7
+ }
+ bMismatch = 1
+ goto __8
+__7:
+ i = 0
+__9:
+ if !(i < *(*int32)(unsafe.Pointer(bp + 24 /* nCol */))) {
+ goto __11
+ }
+ if !(int32(*(*U8)(unsafe.Pointer((*SessionTable)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 16 /* pTo */)))).FabPK + uintptr(i)))) != int32(*(*U8)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 40 /* abPK */)) + uintptr(i))))) {
+ goto __12
+ }
+ bMismatch = 1
+__12:
+ ;
+ if !(Xsqlite3_stricmp(tls, *(*uintptr)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 32 /* azCol */)) + uintptr(i)*8)), *(*uintptr)(unsafe.Pointer((*SessionTable)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 16 /* pTo */)))).FazCol + uintptr(i)*8))) != 0) {
+ goto __13
+ }
+ bMismatch = 1
+__13:
+ ;
+ if !(*(*U8)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 40 /* abPK */)) + uintptr(i))) != 0) {
+ goto __14
+ }
+ bHasPk = 1
+__14:
+ ;
+ goto __10
+__10:
+ i++
+ goto __9
+ goto __11
+__11:
+ ;
+__8:
+ ;
+__6:
+ ;
+ Xsqlite3_free(tls, *(*uintptr)(unsafe.Pointer(bp + 32 /* azCol */)))
+ if !(bMismatch != 0) {
+ goto __15
+ }
+ if !(pzErrMsg != 0) {
+ goto __16
+ }
+ *(*uintptr)(unsafe.Pointer(pzErrMsg)) = Xsqlite3_mprintf(tls, ts+30905 /* "table schemas do..." */, 0)
+__16:
+ ;
+ rc = SQLITE_SCHEMA
+__15:
+ ;
+ if !(bHasPk == 0) {
+ goto __17
+ }
+ // Ignore tables with no primary keys
+ goto diff_out
+__17:
+ ;
+__5:
+ ;
+
+ if !(rc == SQLITE_OK) {
+ goto __18
+ }
+ zExpr = sessionExprComparePK(tls, (*SessionTable)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 16 /* pTo */)))).FnCol,
+ zDb, zFrom, (*SessionTable)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 16 /* pTo */)))).FzName, (*SessionTable)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 16 /* pTo */)))).FazCol, (*SessionTable)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 16 /* pTo */)))).FabPK)
+__18:
+ ;
+
+ // Find new rows
+ if !(rc == SQLITE_OK) {
+ goto __19
+ }
+ rc = sessionDiffFindNew(tls, SQLITE_INSERT, pSession, *(*uintptr)(unsafe.Pointer(bp + 16 /* pTo */)), zDb, zFrom, zExpr)
+__19:
+ ;
+
+ // Find old rows
+ if !(rc == SQLITE_OK) {
+ goto __20
+ }
+ rc = sessionDiffFindNew(tls, SQLITE_DELETE, pSession, *(*uintptr)(unsafe.Pointer(bp + 16 /* pTo */)), zFrom, zDb, zExpr)
+__20:
+ ;
+
+ // Find modified rows
+ if !(rc == SQLITE_OK) {
+ goto __21
+ }
+ rc = sessionDiffFindModified(tls, pSession, *(*uintptr)(unsafe.Pointer(bp + 16 /* pTo */)), zFrom, zExpr)
+__21:
+ ;
+
+ Xsqlite3_free(tls, zExpr)
+__2:
+ ;
+
+diff_out:
+ sessionPreupdateHooks(tls, pSession)
+ Xsqlite3_mutex_leave(tls, Xsqlite3_db_mutex(tls, (*Sqlite3_session)(unsafe.Pointer(pSession)).Fdb))
+ return rc
+}
+
+// Create a session object. This session object will record changes to
+// database zDb attached to connection db.
+func Xsqlite3session_create(tls *libc.TLS, db uintptr, zDb uintptr, ppSession uintptr) int32 { /* sqlite3.c:208455:16: */
+ var pNew uintptr // Newly allocated session object
+ var pOld uintptr // Session object already attached to db
+ var nDb int32 = Xsqlite3Strlen30(tls, zDb) // Length of zDb in bytes
+
+ // Zero the output value in case an error occurs.
+ *(*uintptr)(unsafe.Pointer(ppSession)) = uintptr(0)
+
+ // Allocate and populate the new session object.
+ pNew = Xsqlite3_malloc64(tls, (uint64((uint64(unsafe.Sizeof(Sqlite3_session{})) + uint64(nDb)) + uint64(1))))
+ if !(pNew != 0) {
+ return SQLITE_NOMEM
+ }
+ libc.Xmemset(tls, pNew, 0, uint64(unsafe.Sizeof(Sqlite3_session{})))
+ (*Sqlite3_session)(unsafe.Pointer(pNew)).Fdb = db
+ (*Sqlite3_session)(unsafe.Pointer(pNew)).FzDb = (pNew + 1*136)
+ (*Sqlite3_session)(unsafe.Pointer(pNew)).FbEnable = 1
+ libc.Xmemcpy(tls, (*Sqlite3_session)(unsafe.Pointer(pNew)).FzDb, zDb, (uint64(nDb + 1)))
+ sessionPreupdateHooks(tls, pNew)
+
+ // Add the new session object to the linked list of session objects
+ // attached to database handle $db. Do this under the cover of the db
+ // handle mutex.
+ Xsqlite3_mutex_enter(tls, Xsqlite3_db_mutex(tls, db))
+ pOld = Xsqlite3_preupdate_hook(tls, db, *(*uintptr)(unsafe.Pointer(&struct {
+ f func(*libc.TLS, uintptr, uintptr, int32, uintptr, uintptr, Sqlite3_int64, Sqlite3_int64)
+ }{xPreUpdate})), pNew)
+ (*Sqlite3_session)(unsafe.Pointer(pNew)).FpNext = pOld
+ Xsqlite3_mutex_leave(tls, Xsqlite3_db_mutex(tls, db))
+
+ *(*uintptr)(unsafe.Pointer(ppSession)) = pNew
+ return SQLITE_OK
+}
+
+// Free the list of table objects passed as the first argument. The contents
+// of the changed-rows hash tables are also deleted.
+func sessionDeleteTable(tls *libc.TLS, pSession uintptr, pList uintptr) { /* sqlite3.c:208493:13: */
+ var pNext uintptr
+ var pTab uintptr
+
+ for pTab = pList; pTab != 0; pTab = pNext {
+ var i int32
+ pNext = (*SessionTable)(unsafe.Pointer(pTab)).FpNext
+ for i = 0; i < (*SessionTable)(unsafe.Pointer(pTab)).FnChange; i++ {
+ var p uintptr
+ var pNextChange uintptr
+ for p = *(*uintptr)(unsafe.Pointer((*SessionTable)(unsafe.Pointer(pTab)).FapChange + uintptr(i)*8)); p != 0; p = pNextChange {
+ pNextChange = (*SessionChange)(unsafe.Pointer(p)).FpNext
+ sessionFree(tls, pSession, p)
+ }
+ }
+ sessionFree(tls, pSession, (*SessionTable)(unsafe.Pointer(pTab)).FazCol) // cast works around VC++ bug
+ sessionFree(tls, pSession, (*SessionTable)(unsafe.Pointer(pTab)).FapChange)
+ sessionFree(tls, pSession, pTab)
+ }
+}
+
+// Delete a session object previously allocated using sqlite3session_create().
+func Xsqlite3session_delete(tls *libc.TLS, pSession uintptr) { /* sqlite3.c:208517:17: */
+ bp := tls.Alloc(8)
+ defer tls.Free(8)
+
+ var db uintptr = (*Sqlite3_session)(unsafe.Pointer(pSession)).Fdb
+ // var pHead uintptr at bp, 8
+
+ var pp uintptr
+
+ // Unlink the session from the linked list of sessions attached to the
+ // database handle. Hold the db mutex while doing so.
+ Xsqlite3_mutex_enter(tls, Xsqlite3_db_mutex(tls, db))
+ *(*uintptr)(unsafe.Pointer(bp /* pHead */)) = Xsqlite3_preupdate_hook(tls, db, uintptr(0), uintptr(0))
+ for pp = bp; /* &pHead */ (*(*uintptr)(unsafe.Pointer(pp))) != uintptr(0); pp = (*(*uintptr)(unsafe.Pointer(pp)) + 80 /* &.pNext */) {
+ if (*(*uintptr)(unsafe.Pointer(pp))) == pSession {
+ *(*uintptr)(unsafe.Pointer(pp)) = (*Sqlite3_session)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(pp)))).FpNext
+ if *(*uintptr)(unsafe.Pointer(bp /* pHead */)) != 0 {
+ Xsqlite3_preupdate_hook(tls, db, *(*uintptr)(unsafe.Pointer(&struct {
+ f func(*libc.TLS, uintptr, uintptr, int32, uintptr, uintptr, Sqlite3_int64, Sqlite3_int64)
+ }{xPreUpdate})), *(*uintptr)(unsafe.Pointer(bp /* pHead */)))
+ }
+ break
+ }
+ }
+ Xsqlite3_mutex_leave(tls, Xsqlite3_db_mutex(tls, db))
+ Xsqlite3ValueFree(tls, (*Sqlite3_session)(unsafe.Pointer(pSession)).FpZeroBlob)
+
+ // Delete all attached table objects. And the contents of their
+ // associated hash-tables.
+ sessionDeleteTable(tls, pSession, (*Sqlite3_session)(unsafe.Pointer(pSession)).FpTable)
+
+ // Assert that all allocations have been freed and then free the
+ // session object itself.
+
+ Xsqlite3_free(tls, pSession)
+}
+
+// Set a table filter on a Session Object.
+func Xsqlite3session_table_filter(tls *libc.TLS, pSession uintptr, xFilter uintptr, pCtx uintptr) { /* sqlite3.c:208549:17: */
+ (*Sqlite3_session)(unsafe.Pointer(pSession)).FbAutoAttach = 1
+ (*Sqlite3_session)(unsafe.Pointer(pSession)).FpFilterCtx = pCtx
+ (*Sqlite3_session)(unsafe.Pointer(pSession)).FxTableFilter = xFilter
+}
+
+// Attach a table to a session. All subsequent changes made to the table
+// while the session object is enabled will be recorded.
+//
+// Only tables that have a PRIMARY KEY defined may be attached. It does
+// not matter if the PRIMARY KEY is an "INTEGER PRIMARY KEY" (rowid alias)
+// or not.
+func Xsqlite3session_attach(tls *libc.TLS, pSession uintptr, zName uintptr) int32 { /* sqlite3.c:208567:16: */
+ var rc int32 = SQLITE_OK
+ Xsqlite3_mutex_enter(tls, Xsqlite3_db_mutex(tls, (*Sqlite3_session)(unsafe.Pointer(pSession)).Fdb))
+
+ if !(zName != 0) {
+ (*Sqlite3_session)(unsafe.Pointer(pSession)).FbAutoAttach = 1
+ } else {
+ var pTab uintptr // New table object (if required)
+ var nName int32 // Number of bytes in string zName
+
+ // First search for an existing entry. If one is found, this call is
+ // a no-op. Return early.
+ nName = Xsqlite3Strlen30(tls, zName)
+ for pTab = (*Sqlite3_session)(unsafe.Pointer(pSession)).FpTable; pTab != 0; pTab = (*SessionTable)(unsafe.Pointer(pTab)).FpNext {
+ if 0 == Xsqlite3_strnicmp(tls, (*SessionTable)(unsafe.Pointer(pTab)).FzName, zName, (nName+1)) {
+ break
+ }
+ }
+
+ if !(pTab != 0) {
+ // Allocate new SessionTable object.
+ var nByte int32 = (int32((uint64(unsafe.Sizeof(SessionTable{})) + uint64(nName)) + uint64(1)))
+ pTab = sessionMalloc64(tls, pSession, int64(nByte))
+ if !(pTab != 0) {
+ rc = SQLITE_NOMEM
+ } else {
+ // Populate the new SessionTable object and link it into the list.
+ // The new object must be linked onto the end of the list, not
+ // simply added to the start of it in order to ensure that tables
+ // appear in the correct order when a changeset or patchset is
+ // eventually generated.
+ var ppTab uintptr
+ libc.Xmemset(tls, pTab, 0, uint64(unsafe.Sizeof(SessionTable{})))
+ (*SessionTable)(unsafe.Pointer(pTab)).FzName = (pTab + 1*56)
+ libc.Xmemcpy(tls, (*SessionTable)(unsafe.Pointer(pTab)).FzName, zName, (uint64(nName + 1)))
+ for ppTab = (pSession + 88 /* &.pTable */); *(*uintptr)(unsafe.Pointer(ppTab)) != 0; ppTab = (*(*uintptr)(unsafe.Pointer(ppTab)) /* &.pNext */) {
+ }
+ *(*uintptr)(unsafe.Pointer(ppTab)) = pTab
+ }
+ }
+ }
+
+ Xsqlite3_mutex_leave(tls, Xsqlite3_db_mutex(tls, (*Sqlite3_session)(unsafe.Pointer(pSession)).Fdb))
+ return rc
+}
+
+// Ensure that there is room in the buffer to append nByte bytes of data.
+// If not, use sqlite3_realloc() to grow the buffer so that there is.
+//
+// If successful, return zero. Otherwise, if an OOM condition is encountered,
+// set *pRc to SQLITE_NOMEM and return non-zero.
+func sessionBufferGrow(tls *libc.TLS, p uintptr, nByte I64, pRc uintptr) int32 { /* sqlite3.c:208620:12: */
+ var nReq I64 = (I64((*SessionBuffer)(unsafe.Pointer(p)).FnBuf) + nByte)
+ if (*(*int32)(unsafe.Pointer(pRc)) == SQLITE_OK) && (nReq > I64((*SessionBuffer)(unsafe.Pointer(p)).FnAlloc)) {
+ var aNew uintptr
+ var nNew I64
+ if (*SessionBuffer)(unsafe.Pointer(p)).FnAlloc != 0 {
+ nNew = int64((*SessionBuffer)(unsafe.Pointer(p)).FnAlloc)
+ } else {
+ nNew = int64(128)
+ }
+
+ for ok := true; ok; ok = (nNew < nReq) {
+ nNew = (nNew * int64(2))
+ }
+
+ // The value of SESSION_MAX_BUFFER_SZ is copied from the implementation
+ // of sqlite3_realloc64(). Allocations greater than this size in bytes
+ // always fail. It is used here to ensure that this routine can always
+ // allocate up to this limit - instead of up to the largest power of
+ // two smaller than the limit.
+ if nNew > (int64(0x7FFFFF00 - 1)) {
+ nNew = (int64(0x7FFFFF00 - 1))
+ if nNew < nReq {
+ *(*int32)(unsafe.Pointer(pRc)) = SQLITE_NOMEM
+ return 1
+ }
+ }
+
+ aNew = Xsqlite3_realloc64(tls, (*SessionBuffer)(unsafe.Pointer(p)).FaBuf, uint64(nNew))
+ if uintptr(0) == aNew {
+ *(*int32)(unsafe.Pointer(pRc)) = SQLITE_NOMEM
+ } else {
+ (*SessionBuffer)(unsafe.Pointer(p)).FaBuf = aNew
+ (*SessionBuffer)(unsafe.Pointer(p)).FnAlloc = int32(nNew)
+ }
+ }
+ return (libc.Bool32(*(*int32)(unsafe.Pointer(pRc)) != SQLITE_OK))
+}
+
+// Append the value passed as the second argument to the buffer passed
+// as the first.
+//
+// This function is a no-op if *pRc is non-zero when it is called.
+// Otherwise, if an error occurs, *pRc is set to an SQLite error code
+// before returning.
+func sessionAppendValue(tls *libc.TLS, p uintptr, pVal uintptr, pRc uintptr) { /* sqlite3.c:208663:13: */
+ bp := tls.Alloc(12)
+ defer tls.Free(12)
+
+ *(*int32)(unsafe.Pointer(bp + 8 /* rc */)) = *(*int32)(unsafe.Pointer(pRc))
+ if *(*int32)(unsafe.Pointer(bp + 8 /* rc */)) == SQLITE_OK {
+ *(*Sqlite3_int64)(unsafe.Pointer(bp /* nByte */)) = int64(0)
+ *(*int32)(unsafe.Pointer(bp + 8 /* rc */)) = sessionSerializeValue(tls, uintptr(0), pVal, bp /* &nByte */)
+ sessionBufferGrow(tls, p, *(*Sqlite3_int64)(unsafe.Pointer(bp /* nByte */)), bp+8 /* &rc */)
+ if *(*int32)(unsafe.Pointer(bp + 8 /* rc */)) == SQLITE_OK {
+ *(*int32)(unsafe.Pointer(bp + 8 /* rc */)) = sessionSerializeValue(tls, ((*SessionBuffer)(unsafe.Pointer(p)).FaBuf + uintptr((*SessionBuffer)(unsafe.Pointer(p)).FnBuf)), pVal, uintptr(0))
+ *(*int32)(unsafe.Pointer(p + 8 /* &.nBuf */)) += int32((*(*Sqlite3_int64)(unsafe.Pointer(bp /* nByte */))))
+ } else {
+ *(*int32)(unsafe.Pointer(pRc)) = *(*int32)(unsafe.Pointer(bp + 8 /* rc */))
+ }
+ }
+}
+
+// This function is a no-op if *pRc is other than SQLITE_OK when it is
+// called. Otherwise, append a single byte to the buffer.
+//
+// If an OOM condition is encountered, set *pRc to SQLITE_NOMEM before
+// returning.
+func sessionAppendByte(tls *libc.TLS, p uintptr, v U8, pRc uintptr) { /* sqlite3.c:208685:13: */
+ if 0 == sessionBufferGrow(tls, p, int64(1), pRc) {
+ *(*U8)(unsafe.Pointer((*SessionBuffer)(unsafe.Pointer(p)).FaBuf + uintptr(libc.PostIncInt32(&(*SessionBuffer)(unsafe.Pointer(p)).FnBuf, 1)))) = v
+ }
+}
+
+// This function is a no-op if *pRc is other than SQLITE_OK when it is
+// called. Otherwise, append a single varint to the buffer.
+//
+// If an OOM condition is encountered, set *pRc to SQLITE_NOMEM before
+// returning.
+func sessionAppendVarint(tls *libc.TLS, p uintptr, v int32, pRc uintptr) { /* sqlite3.c:208698:13: */
+ if 0 == sessionBufferGrow(tls, p, int64(9), pRc) {
+ *(*int32)(unsafe.Pointer(p + 8 /* &.nBuf */)) += (sessionVarintPut(tls, ((*SessionBuffer)(unsafe.Pointer(p)).FaBuf + uintptr((*SessionBuffer)(unsafe.Pointer(p)).FnBuf)), v))
+ }
+}
+
+// This function is a no-op if *pRc is other than SQLITE_OK when it is
+// called. Otherwise, append a blob of data to the buffer.
+//
+// If an OOM condition is encountered, set *pRc to SQLITE_NOMEM before
+// returning.
+func sessionAppendBlob(tls *libc.TLS, p uintptr, aBlob uintptr, nBlob int32, pRc uintptr) { /* sqlite3.c:208711:13: */
+ if (nBlob > 0) && (0 == sessionBufferGrow(tls, p, int64(nBlob), pRc)) {
+ libc.Xmemcpy(tls, ((*SessionBuffer)(unsafe.Pointer(p)).FaBuf + uintptr((*SessionBuffer)(unsafe.Pointer(p)).FnBuf)), aBlob, uint64(nBlob))
+ *(*int32)(unsafe.Pointer(p + 8 /* &.nBuf */)) += (nBlob)
+ }
+}
+
+// This function is a no-op if *pRc is other than SQLITE_OK when it is
+// called. Otherwise, append a string to the buffer. All bytes in the string
+// up to (but not including) the nul-terminator are written to the buffer.
+//
+// If an OOM condition is encountered, set *pRc to SQLITE_NOMEM before
+// returning.
+func sessionAppendStr(tls *libc.TLS, p uintptr, zStr uintptr, pRc uintptr) { /* sqlite3.c:208731:13: */
+ var nStr int32 = Xsqlite3Strlen30(tls, zStr)
+ if 0 == sessionBufferGrow(tls, p, int64(nStr), pRc) {
+ libc.Xmemcpy(tls, ((*SessionBuffer)(unsafe.Pointer(p)).FaBuf + uintptr((*SessionBuffer)(unsafe.Pointer(p)).FnBuf)), zStr, uint64(nStr))
+ *(*int32)(unsafe.Pointer(p + 8 /* &.nBuf */)) += (nStr)
+ }
+}
+
+// This function is a no-op if *pRc is other than SQLITE_OK when it is
+// called. Otherwise, append the string representation of integer iVal
+// to the buffer. No nul-terminator is written.
+//
+// If an OOM condition is encountered, set *pRc to SQLITE_NOMEM before
+// returning.
+func sessionAppendInteger(tls *libc.TLS, p uintptr, iVal int32, pRc uintptr) { /* sqlite3.c:208751:13: */
+ bp := tls.Alloc(32)
+ defer tls.Free(32)
+
+ // var aBuf [24]uint8 at bp+8, 24
+
+ Xsqlite3_snprintf(tls, (int32(uint64(unsafe.Sizeof([24]uint8{})) - uint64(1))), bp+8 /* &aBuf[0] */, ts+4089 /* "%d" */, libc.VaList(bp, iVal))
+ sessionAppendStr(tls, p, bp+8 /* &aBuf[0] */, pRc)
+}
+
+// This function is a no-op if *pRc is other than SQLITE_OK when it is
+// called. Otherwise, append the string zStr enclosed in quotes (") and
+// with any embedded quote characters escaped to the buffer. No
+// nul-terminator byte is written.
+//
+// If an OOM condition is encountered, set *pRc to SQLITE_NOMEM before
+// returning.
+func sessionAppendIdent(tls *libc.TLS, p uintptr, zStr uintptr, pRc uintptr) { /* sqlite3.c:208770:13: */
+ var nStr int32 = (((Xsqlite3Strlen30(tls, zStr) * 2) + 2) + 1)
+ if 0 == sessionBufferGrow(tls, p, int64(nStr), pRc) {
+ var zOut uintptr = ((*SessionBuffer)(unsafe.Pointer(p)).FaBuf + uintptr((*SessionBuffer)(unsafe.Pointer(p)).FnBuf))
+ var zIn uintptr = zStr
+ *(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&zOut, 1))) = uint8('"')
+ for *(*uint8)(unsafe.Pointer(zIn)) != 0 {
+ if int32(*(*uint8)(unsafe.Pointer(zIn))) == '"' {
+ *(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&zOut, 1))) = uint8('"')
+ }
+ *(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&zOut, 1))) = *(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&zIn, 1)))
+ }
+ *(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&zOut, 1))) = uint8('"')
+ (*SessionBuffer)(unsafe.Pointer(p)).FnBuf = (int32((int64(zOut) - int64((*SessionBuffer)(unsafe.Pointer(p)).FaBuf)) / 1))
+ }
+}
+
+// This function is a no-op if *pRc is other than SQLITE_OK when it is
+// called. Otherwse, it appends the serialized version of the value stored
+// in column iCol of the row that SQL statement pStmt currently points
+// to to the buffer.
+func sessionAppendCol(tls *libc.TLS, p uintptr, pStmt uintptr, iCol int32, pRc uintptr) { /* sqlite3.c:208795:13: */
+ bp := tls.Alloc(24)
+ defer tls.Free(24)
+
+ if *(*int32)(unsafe.Pointer(pRc)) == SQLITE_OK {
+ var eType int32 = Xsqlite3_column_type(tls, pStmt, iCol)
+ sessionAppendByte(tls, p, U8(eType), pRc)
+ if (eType == SQLITE_INTEGER) || (eType == SQLITE_FLOAT) {
+ // var i Sqlite3_int64 at bp, 8
+
+ // var aBuf [8]U8 at bp+16, 8
+
+ if eType == SQLITE_INTEGER {
+ *(*Sqlite3_int64)(unsafe.Pointer(bp /* i */)) = Xsqlite3_column_int64(tls, pStmt, iCol)
+ } else {
+ *(*float64)(unsafe.Pointer(bp + 8 /* r */)) = Xsqlite3_column_double(tls, pStmt, iCol)
+ libc.Xmemcpy(tls, bp /* &i */, bp+8 /* &r */, uint64(8))
+ }
+ sessionPutI64(tls, bp+16 /* &aBuf[0] */, *(*Sqlite3_int64)(unsafe.Pointer(bp /* i */)))
+ sessionAppendBlob(tls, p, bp+16 /* &aBuf[0] */, 8, pRc)
+ }
+ if (eType == SQLITE_BLOB) || (eType == SQLITE_TEXT) {
+ var z uintptr
+ var nByte int32
+ if eType == SQLITE_BLOB {
+ z = Xsqlite3_column_blob(tls, pStmt, iCol)
+ } else {
+ z = Xsqlite3_column_text(tls, pStmt, iCol)
+ }
+ nByte = Xsqlite3_column_bytes(tls, pStmt, iCol)
+ if (z != 0) || ((eType == SQLITE_BLOB) && (nByte == 0)) {
+ sessionAppendVarint(tls, p, nByte, pRc)
+ sessionAppendBlob(tls, p, z, nByte, pRc)
+ } else {
+ *(*int32)(unsafe.Pointer(pRc)) = SQLITE_NOMEM
+ }
+ }
+ }
+}
+
+//
+// This function appends an update change to the buffer (see the comments
+// under "CHANGESET FORMAT" at the top of the file). An update change
+// consists of:
+//
+// 1 byte: SQLITE_UPDATE (0x17)
+// n bytes: old.* record (see RECORD FORMAT)
+// m bytes: new.* record (see RECORD FORMAT)
+//
+// The SessionChange object passed as the third argument contains the
+// values that were stored in the row when the session began (the old.*
+// values). The statement handle passed as the second argument points
+// at the current version of the row (the new.* values).
+//
+// If all of the old.* values are equal to their corresponding new.* value
+// (i.e. nothing has changed), then no data at all is appended to the buffer.
+//
+// Otherwise, the old.* record contains all primary key values and the
+// original values of any fields that have been modified. The new.* record
+// contains the new values of only those fields that have been modified.
+func sessionAppendUpdate(tls *libc.TLS, pBuf uintptr, bPatchset int32, pStmt uintptr, p uintptr, abPK uintptr) int32 { /* sqlite3.c:208857:12: */
+ bp := tls.Alloc(48)
+ defer tls.Free(48)
+
+ *(*int32)(unsafe.Pointer(bp /* rc */)) = SQLITE_OK
+ *(*SessionBuffer)(unsafe.Pointer(bp + 32 /* buf2 */)) = SessionBuffer{} // Buffer to accumulate new.* record in
+ var bNoop int32 = 1 // Set to zero if any values are modified
+ var nRewind int32 = (*SessionBuffer)(unsafe.Pointer(pBuf)).FnBuf // Set to zero if any values are modified
+ var i int32 // Used to iterate through columns
+ var pCsr uintptr = (*SessionChange)(unsafe.Pointer(p)).FaRecord // Used to iterate through old.* values
+
+ sessionAppendByte(tls, pBuf, uint8(SQLITE_UPDATE), bp /* &rc */)
+ sessionAppendByte(tls, pBuf, (*SessionChange)(unsafe.Pointer(p)).FbIndirect, bp /* &rc */)
+ for i = 0; i < Xsqlite3_column_count(tls, pStmt); i++ {
+ var bChanged int32 = 0
+ var nAdvance int32
+ var eType int32 = int32(*(*U8)(unsafe.Pointer(pCsr)))
+ switch eType {
+ case SQLITE_NULL:
+ nAdvance = 1
+ if Xsqlite3_column_type(tls, pStmt, i) != SQLITE_NULL {
+ bChanged = 1
+ }
+ break
+
+ case SQLITE_FLOAT:
+ fallthrough
+ case SQLITE_INTEGER:
+ {
+ nAdvance = 9
+ if eType == Xsqlite3_column_type(tls, pStmt, i) {
+ *(*Sqlite3_int64)(unsafe.Pointer(bp + 16 /* iVal */)) = sessionGetI64(tls, (pCsr + 1))
+ if eType == SQLITE_INTEGER {
+ if *(*Sqlite3_int64)(unsafe.Pointer(bp + 16 /* iVal */)) == Xsqlite3_column_int64(tls, pStmt, i) {
+ break
+ }
+ } else {
+ // var dVal float64 at bp+8, 8
+
+ libc.Xmemcpy(tls, bp+8 /* &dVal */, bp+16 /* &iVal */, uint64(8))
+ if *(*float64)(unsafe.Pointer(bp + 8 /* dVal */)) == Xsqlite3_column_double(tls, pStmt, i) {
+ break
+ }
+ }
+ }
+ bChanged = 1
+ break
+
+ }
+
+ default:
+ {
+ // var n int32 at bp+24, 4
+
+ var nHdr int32 = (1 + sessionVarintGet(tls, (pCsr+1), bp+24 /* &n */))
+
+ nAdvance = (nHdr + *(*int32)(unsafe.Pointer(bp + 24 /* n */)))
+ if ((eType == Xsqlite3_column_type(tls, pStmt, i)) &&
+ (*(*int32)(unsafe.Pointer(bp + 24 /* n */)) == Xsqlite3_column_bytes(tls, pStmt, i))) &&
+ ((*(*int32)(unsafe.Pointer(bp + 24 /* n */)) == 0) || (0 == libc.Xmemcmp(tls, (pCsr+uintptr(nHdr)), Xsqlite3_column_blob(tls, pStmt, i), uint64(*(*int32)(unsafe.Pointer(bp + 24 /* n */)))))) {
+ break
+ }
+ bChanged = 1
+
+ }
+ }
+
+ // If at least one field has been modified, this is not a no-op.
+ if bChanged != 0 {
+ bNoop = 0
+ }
+
+ // Add a field to the old.* record. This is omitted if this modules is
+ // currently generating a patchset.
+ if bPatchset == 0 {
+ if (bChanged != 0) || (*(*U8)(unsafe.Pointer(abPK + uintptr(i))) != 0) {
+ sessionAppendBlob(tls, pBuf, pCsr, nAdvance, bp /* &rc */)
+ } else {
+ sessionAppendByte(tls, pBuf, uint8(0), bp /* &rc */)
+ }
+ }
+
+ // Add a field to the new.* record. Or the only record if currently
+ // generating a patchset.
+ if (bChanged != 0) || ((bPatchset != 0) && (*(*U8)(unsafe.Pointer(abPK + uintptr(i))) != 0)) {
+ sessionAppendCol(tls, bp+32 /* &buf2 */, pStmt, i, bp /* &rc */)
+ } else {
+ sessionAppendByte(tls, bp+32 /* &buf2 */, uint8(0), bp /* &rc */)
+ }
+
+ pCsr += uintptr(nAdvance)
+ }
+
+ if bNoop != 0 {
+ (*SessionBuffer)(unsafe.Pointer(pBuf)).FnBuf = nRewind
+ } else {
+ sessionAppendBlob(tls, pBuf, (*SessionBuffer)(unsafe.Pointer(bp+32 /* &buf2 */)).FaBuf, (*SessionBuffer)(unsafe.Pointer(bp+32 /* &buf2 */)).FnBuf, bp /* &rc */)
+ }
+ Xsqlite3_free(tls, (*SessionBuffer)(unsafe.Pointer(bp+32 /* &buf2 */)).FaBuf)
+
+ return *(*int32)(unsafe.Pointer(bp /* rc */))
+}
+
+// Append a DELETE change to the buffer passed as the first argument. Use
+// the changeset format if argument bPatchset is zero, or the patchset
+// format otherwise.
+func sessionAppendDelete(tls *libc.TLS, pBuf uintptr, bPatchset int32, p uintptr, nCol int32, abPK uintptr) int32 { /* sqlite3.c:208956:12: */
+ bp := tls.Alloc(8)
+ defer tls.Free(8)
+
+ *(*int32)(unsafe.Pointer(bp /* rc */)) = SQLITE_OK
+
+ sessionAppendByte(tls, pBuf, uint8(SQLITE_DELETE), bp /* &rc */)
+ sessionAppendByte(tls, pBuf, (*SessionChange)(unsafe.Pointer(p)).FbIndirect, bp /* &rc */)
+
+ if bPatchset == 0 {
+ sessionAppendBlob(tls, pBuf, (*SessionChange)(unsafe.Pointer(p)).FaRecord, (*SessionChange)(unsafe.Pointer(p)).FnRecord, bp /* &rc */)
+ } else {
+ var i int32
+ var a uintptr = (*SessionChange)(unsafe.Pointer(p)).FaRecord
+ for i = 0; i < nCol; i++ {
+ var pStart uintptr = a
+ var eType int32 = int32(*(*U8)(unsafe.Pointer(libc.PostIncUintptr(&a, 1))))
+
+ switch eType {
+ case 0:
+ fallthrough
+ case SQLITE_NULL:
+
+ break
+ fallthrough
+
+ case SQLITE_FLOAT:
+ fallthrough
+ case SQLITE_INTEGER:
+ a += uintptr(8)
+ break
+ fallthrough
+
+ default:
+ {
+ // var n int32 at bp+4, 4
+
+ a += uintptr(sessionVarintGet(tls, a, bp+4 /* &n */))
+ a += uintptr(*(*int32)(unsafe.Pointer(bp + 4 /* n */)))
+ break
+
+ }
+ }
+ if *(*U8)(unsafe.Pointer(abPK + uintptr(i))) != 0 {
+ sessionAppendBlob(tls, pBuf, pStart, (int32((int64(a) - int64(pStart)) / 1)), bp /* &rc */)
+ }
+ }
+
+ }
+
+ return *(*int32)(unsafe.Pointer(bp /* rc */))
+}
+
+// Formulate and prepare a SELECT statement to retrieve a row from table
+// zTab in database zDb based on its primary key. i.e.
+//
+// SELECT * FROM zDb.zTab WHERE pk1 = ? AND pk2 = ? AND ...
+func sessionSelectStmt(tls *libc.TLS, db uintptr, zDb uintptr, zTab uintptr, nCol int32, azCol uintptr, abPK uintptr, ppStmt uintptr) int32 { /* sqlite3.c:209011:12: */
+ bp := tls.Alloc(28)
+ defer tls.Free(28)
+
+ *(*int32)(unsafe.Pointer(bp + 24 /* rc */)) = SQLITE_OK
+ var zSql uintptr = uintptr(0)
+ var nSql int32 = -1
+
+ if 0 == Xsqlite3_stricmp(tls, ts+10072 /* "sqlite_stat1" */, zTab) {
+ zSql = Xsqlite3_mprintf(tls,
+
+ ts+30932 /* "SELECT tbl, ?2, ..." */, libc.VaList(bp, zDb))
+ if zSql == uintptr(0) {
+ *(*int32)(unsafe.Pointer(bp + 24 /* rc */)) = SQLITE_NOMEM
+ }
+ } else {
+ var i int32
+ var zSep uintptr = ts + 755 /* "" */
+ *(*SessionBuffer)(unsafe.Pointer(bp + 8 /* buf */)) = SessionBuffer{}
+
+ sessionAppendStr(tls, bp+8 /* &buf */, ts+31042 /* "SELECT * FROM " */, bp+24 /* &rc */)
+ sessionAppendIdent(tls, bp+8 /* &buf */, zDb, bp+24 /* &rc */)
+ sessionAppendStr(tls, bp+8 /* &buf */, ts+768 /* "." */, bp+24 /* &rc */)
+ sessionAppendIdent(tls, bp+8 /* &buf */, zTab, bp+24 /* &rc */)
+ sessionAppendStr(tls, bp+8 /* &buf */, ts+31057 /* " WHERE " */, bp+24 /* &rc */)
+ for i = 0; i < nCol; i++ {
+ if *(*U8)(unsafe.Pointer(abPK + uintptr(i))) != 0 {
+ sessionAppendStr(tls, bp+8 /* &buf */, zSep, bp+24 /* &rc */)
+ sessionAppendIdent(tls, bp+8 /* &buf */, *(*uintptr)(unsafe.Pointer(azCol + uintptr(i)*8)), bp+24 /* &rc */)
+ sessionAppendStr(tls, bp+8 /* &buf */, ts+31065 /* " IS ?" */, bp+24 /* &rc */)
+ sessionAppendInteger(tls, bp+8 /* &buf */, (i + 1), bp+24 /* &rc */)
+ zSep = ts + 19877 /* " AND " */
+ }
+ }
+ zSql = (*SessionBuffer)(unsafe.Pointer(bp + 8 /* &buf */)).FaBuf
+ nSql = (*SessionBuffer)(unsafe.Pointer(bp + 8 /* &buf */)).FnBuf
+ }
+
+ if *(*int32)(unsafe.Pointer(bp + 24 /* rc */)) == SQLITE_OK {
+ *(*int32)(unsafe.Pointer(bp + 24 /* rc */)) = Xsqlite3_prepare_v2(tls, db, zSql, nSql, ppStmt, uintptr(0))
+ }
+ Xsqlite3_free(tls, zSql)
+ return *(*int32)(unsafe.Pointer(bp + 24 /* rc */))
+}
+
+// Bind the PRIMARY KEY values from the change passed in argument pChange
+// to the SELECT statement passed as the first argument. The SELECT statement
+// is as prepared by function sessionSelectStmt().
+//
+// Return SQLITE_OK if all PK values are successfully bound, or an SQLite
+// error code (e.g. SQLITE_NOMEM) otherwise.
+func sessionSelectBind(tls *libc.TLS, pSelect uintptr, nCol int32, abPK uintptr, pChange uintptr) int32 { /* sqlite3.c:209068:12: */
+ bp := tls.Alloc(24)
+ defer tls.Free(24)
+
+ var i int32
+ var rc int32 = SQLITE_OK
+ var a uintptr = (*SessionChange)(unsafe.Pointer(pChange)).FaRecord
+
+ for i = 0; (i < nCol) && (rc == SQLITE_OK); i++ {
+ var eType int32 = int32(*(*U8)(unsafe.Pointer(libc.PostIncUintptr(&a, 1))))
+
+ switch eType {
+ case 0:
+ fallthrough
+ case SQLITE_NULL:
+
+ break
+
+ case SQLITE_INTEGER:
+ {
+ if *(*U8)(unsafe.Pointer(abPK + uintptr(i))) != 0 {
+ var iVal I64 = sessionGetI64(tls, a)
+ rc = Xsqlite3_bind_int64(tls, pSelect, (i + 1), iVal)
+ }
+ a += uintptr(8)
+ break
+
+ }
+
+ case SQLITE_FLOAT:
+ {
+ if *(*U8)(unsafe.Pointer(abPK + uintptr(i))) != 0 {
+ // var rVal float64 at bp, 8
+
+ *(*I64)(unsafe.Pointer(bp + 8 /* iVal */)) = sessionGetI64(tls, a)
+ libc.Xmemcpy(tls, bp /* &rVal */, bp+8 /* &iVal */, uint64(8))
+ rc = Xsqlite3_bind_double(tls, pSelect, (i + 1), *(*float64)(unsafe.Pointer(bp /* rVal */)))
+ }
+ a += uintptr(8)
+ break
+
+ }
+
+ case SQLITE_TEXT:
+ {
+ // var n int32 at bp+16, 4
+
+ a += uintptr(sessionVarintGet(tls, a, bp+16 /* &n */))
+ if *(*U8)(unsafe.Pointer(abPK + uintptr(i))) != 0 {
+ rc = Xsqlite3_bind_text(tls, pSelect, (i + 1), a, *(*int32)(unsafe.Pointer(bp + 16 /* n */)), libc.UintptrFromInt32(-1))
+ }
+ a += uintptr(*(*int32)(unsafe.Pointer(bp + 16 /* n */)))
+ break
+
+ }
+
+ default:
+ {
+ // var n int32 at bp+20, 4
+
+ a += uintptr(sessionVarintGet(tls, a, bp+20 /* &n */))
+ if *(*U8)(unsafe.Pointer(abPK + uintptr(i))) != 0 {
+ rc = Xsqlite3_bind_blob(tls, pSelect, (i + 1), a, *(*int32)(unsafe.Pointer(bp + 20 /* n */)), libc.UintptrFromInt32(-1))
+ }
+ a += uintptr(*(*int32)(unsafe.Pointer(bp + 20 /* n */)))
+ break
+
+ }
+ }
+ }
+
+ return rc
+}
+
+// This function is a no-op if *pRc is set to other than SQLITE_OK when it
+// is called. Otherwise, append a serialized table header (part of the binary
+// changeset format) to buffer *pBuf. If an error occurs, set *pRc to an
+// SQLite error code before returning.
+func sessionAppendTableHdr(tls *libc.TLS, pBuf uintptr, bPatchset int32, pTab uintptr, pRc uintptr) { /* sqlite3.c:209139:13: */
+ // Write a table header
+ sessionAppendByte(tls, pBuf, func() uint8 {
+ if bPatchset != 0 {
+ return uint8('P')
+ }
+ return uint8('T')
+ }(), pRc)
+ sessionAppendVarint(tls, pBuf, (*SessionTable)(unsafe.Pointer(pTab)).FnCol, pRc)
+ sessionAppendBlob(tls, pBuf, (*SessionTable)(unsafe.Pointer(pTab)).FabPK, (*SessionTable)(unsafe.Pointer(pTab)).FnCol, pRc)
+ sessionAppendBlob(tls, pBuf, (*SessionTable)(unsafe.Pointer(pTab)).FzName, (int32(libc.Xstrlen(tls, (*SessionTable)(unsafe.Pointer(pTab)).FzName)) + 1), pRc)
+}
+
+// Generate either a changeset (if argument bPatchset is zero) or a patchset
+// (if it is non-zero) based on the current contents of the session object
+// passed as the first argument.
+//
+// If no error occurs, SQLITE_OK is returned and the new changeset/patchset
+// stored in output variables *pnChangeset and *ppChangeset. Or, if an error
+// occurs, an SQLite error code is returned and both output variables set
+// to 0.
+func sessionGenerateChangeset(tls *libc.TLS, pSession uintptr, bPatchset int32, xOutput uintptr, pOut uintptr, pnChangeset uintptr, ppChangeset uintptr) int32 { /* sqlite3.c:209162:12: */
+ bp := tls.Alloc(56)
+ defer tls.Free(56)
+
+ var db uintptr = (*Sqlite3_session)(unsafe.Pointer(pSession)).Fdb // Source database handle
+ var pTab uintptr // Used to iterate through attached tables
+ *(*SessionBuffer)(unsafe.Pointer(bp + 24 /* buf */)) = SessionBuffer{} // Buffer in which to accumlate changeset
+ // var rc int32 at bp+40, 4
+ // Return code
+
+ // Zero the output variables in case an error occurs. If this session
+ // object is already in the error state (sqlite3_session.rc != SQLITE_OK),
+ // this call will be a no-op.
+ if xOutput == uintptr(0) {
+ *(*int32)(unsafe.Pointer(pnChangeset)) = 0
+ *(*uintptr)(unsafe.Pointer(ppChangeset)) = uintptr(0)
+ }
+
+ if (*Sqlite3_session)(unsafe.Pointer(pSession)).Frc != 0 {
+ return (*Sqlite3_session)(unsafe.Pointer(pSession)).Frc
+ }
+ *(*int32)(unsafe.Pointer(bp + 40 /* rc */)) = Xsqlite3_exec(tls, (*Sqlite3_session)(unsafe.Pointer(pSession)).Fdb, ts+31071 /* "SAVEPOINT change..." */, uintptr(0), uintptr(0), uintptr(0))
+ if *(*int32)(unsafe.Pointer(bp + 40 /* rc */)) != SQLITE_OK {
+ return *(*int32)(unsafe.Pointer(bp + 40 /* rc */))
+ }
+
+ Xsqlite3_mutex_enter(tls, Xsqlite3_db_mutex(tls, db))
+
+ for pTab = (*Sqlite3_session)(unsafe.Pointer(pSession)).FpTable; (*(*int32)(unsafe.Pointer(bp + 40 /* rc */)) == SQLITE_OK) && (pTab != 0); pTab = (*SessionTable)(unsafe.Pointer(pTab)).FpNext {
+ if (*SessionTable)(unsafe.Pointer(pTab)).FnEntry != 0 {
+ var zName uintptr = (*SessionTable)(unsafe.Pointer(pTab)).FzName
+ // var nCol int32 at bp, 4
+ // Number of columns in table
+ // var abPK uintptr at bp+16, 8
+ // Primary key array
+ *(*uintptr)(unsafe.Pointer(bp + 8 /* azCol */)) = uintptr(0) // Table columns
+ var i int32 // Used to iterate through hash buckets
+ *(*uintptr)(unsafe.Pointer(bp + 48 /* pSel */)) = uintptr(0) // SELECT statement to query table pTab
+ var nRewind int32 = (*SessionBuffer)(unsafe.Pointer(bp + 24 /* &buf */)).FnBuf // Initial size of write buffer
+ var nNoop int32 // Size of buffer after writing tbl header
+
+ // Check the table schema is still Ok.
+ *(*int32)(unsafe.Pointer(bp + 40 /* rc */)) = sessionTableInfo(tls, uintptr(0), db, (*Sqlite3_session)(unsafe.Pointer(pSession)).FzDb, zName, bp /* &nCol */, uintptr(0), bp+8 /* &azCol */, bp+16 /* &abPK */)
+ if !(*(*int32)(unsafe.Pointer(bp + 40 /* rc */)) != 0) && (((*SessionTable)(unsafe.Pointer(pTab)).FnCol != *(*int32)(unsafe.Pointer(bp /* nCol */))) || (libc.Xmemcmp(tls, *(*uintptr)(unsafe.Pointer(bp + 16 /* abPK */)), (*SessionTable)(unsafe.Pointer(pTab)).FabPK, uint64(*(*int32)(unsafe.Pointer(bp /* nCol */)))) != 0)) {
+ *(*int32)(unsafe.Pointer(bp + 40 /* rc */)) = SQLITE_SCHEMA
+ }
+
+ // Write a table header
+ sessionAppendTableHdr(tls, bp+24 /* &buf */, bPatchset, pTab, bp+40 /* &rc */)
+
+ // Build and compile a statement to execute:
+ if *(*int32)(unsafe.Pointer(bp + 40 /* rc */)) == SQLITE_OK {
+ *(*int32)(unsafe.Pointer(bp + 40 /* rc */)) = sessionSelectStmt(tls,
+ db, (*Sqlite3_session)(unsafe.Pointer(pSession)).FzDb, zName, *(*int32)(unsafe.Pointer(bp /* nCol */)), *(*uintptr)(unsafe.Pointer(bp + 8 /* azCol */)), *(*uintptr)(unsafe.Pointer(bp + 16 /* abPK */)), bp+48 /* &pSel */)
+ }
+
+ nNoop = (*SessionBuffer)(unsafe.Pointer(bp + 24 /* &buf */)).FnBuf
+ for i = 0; (i < (*SessionTable)(unsafe.Pointer(pTab)).FnChange) && (*(*int32)(unsafe.Pointer(bp + 40 /* rc */)) == SQLITE_OK); i++ {
+ var p uintptr // Used to iterate through changes
+
+ for p = *(*uintptr)(unsafe.Pointer((*SessionTable)(unsafe.Pointer(pTab)).FapChange + uintptr(i)*8)); (*(*int32)(unsafe.Pointer(bp + 40 /* rc */)) == SQLITE_OK) && (p != 0); p = (*SessionChange)(unsafe.Pointer(p)).FpNext {
+ *(*int32)(unsafe.Pointer(bp + 40 /* rc */)) = sessionSelectBind(tls, *(*uintptr)(unsafe.Pointer(bp + 48 /* pSel */)), *(*int32)(unsafe.Pointer(bp /* nCol */)), *(*uintptr)(unsafe.Pointer(bp + 16 /* abPK */)), p)
+ if *(*int32)(unsafe.Pointer(bp + 40 /* rc */)) != SQLITE_OK {
+ continue
+ }
+ if Xsqlite3_step(tls, *(*uintptr)(unsafe.Pointer(bp + 48 /* pSel */))) == SQLITE_ROW {
+ if int32((*SessionChange)(unsafe.Pointer(p)).Fop) == SQLITE_INSERT {
+ var iCol int32
+ sessionAppendByte(tls, bp+24 /* &buf */, uint8(SQLITE_INSERT), bp+40 /* &rc */)
+ sessionAppendByte(tls, bp+24 /* &buf */, (*SessionChange)(unsafe.Pointer(p)).FbIndirect, bp+40 /* &rc */)
+ for iCol = 0; iCol < *(*int32)(unsafe.Pointer(bp /* nCol */)); iCol++ {
+ sessionAppendCol(tls, bp+24 /* &buf */, *(*uintptr)(unsafe.Pointer(bp + 48 /* pSel */)), iCol, bp+40 /* &rc */)
+ }
+ } else {
+ *(*int32)(unsafe.Pointer(bp + 40 /* rc */)) = sessionAppendUpdate(tls, bp+24 /* &buf */, bPatchset, *(*uintptr)(unsafe.Pointer(bp + 48 /* pSel */)), p, *(*uintptr)(unsafe.Pointer(bp + 16 /* abPK */)))
+ }
+ } else if int32((*SessionChange)(unsafe.Pointer(p)).Fop) != SQLITE_INSERT {
+ *(*int32)(unsafe.Pointer(bp + 40 /* rc */)) = sessionAppendDelete(tls, bp+24 /* &buf */, bPatchset, p, *(*int32)(unsafe.Pointer(bp /* nCol */)), *(*uintptr)(unsafe.Pointer(bp + 16 /* abPK */)))
+ }
+ if *(*int32)(unsafe.Pointer(bp + 40 /* rc */)) == SQLITE_OK {
+ *(*int32)(unsafe.Pointer(bp + 40 /* rc */)) = Xsqlite3_reset(tls, *(*uintptr)(unsafe.Pointer(bp + 48 /* pSel */)))
+ }
+
+ // If the buffer is now larger than sessions_strm_chunk_size, pass
+ // its contents to the xOutput() callback.
+ if (((xOutput != 0) &&
+ (*(*int32)(unsafe.Pointer(bp + 40 /* rc */)) == SQLITE_OK)) &&
+ ((*SessionBuffer)(unsafe.Pointer(bp+24 /* &buf */)).FnBuf > nNoop)) &&
+ ((*SessionBuffer)(unsafe.Pointer(bp+24 /* &buf */)).FnBuf > sessions_strm_chunk_size) {
+ *(*int32)(unsafe.Pointer(bp + 40 /* rc */)) = (*struct {
+ f func(*libc.TLS, uintptr, uintptr, int32) int32
+ })(unsafe.Pointer(&struct{ uintptr }{xOutput})).f(tls, pOut, (*SessionBuffer)(unsafe.Pointer(bp+24 /* &buf */)).FaBuf, (*SessionBuffer)(unsafe.Pointer(bp+24 /* &buf */)).FnBuf)
+ nNoop = -1
+ (*SessionBuffer)(unsafe.Pointer(bp + 24 /* &buf */)).FnBuf = 0
+ }
+
+ }
+ }
+
+ Xsqlite3_finalize(tls, *(*uintptr)(unsafe.Pointer(bp + 48 /* pSel */)))
+ if (*SessionBuffer)(unsafe.Pointer(bp+24 /* &buf */)).FnBuf == nNoop {
+ (*SessionBuffer)(unsafe.Pointer(bp + 24 /* &buf */)).FnBuf = nRewind
+ }
+ Xsqlite3_free(tls, *(*uintptr)(unsafe.Pointer(bp + 8 /* azCol */))) // cast works around VC++ bug
+ }
+ }
+
+ if *(*int32)(unsafe.Pointer(bp + 40 /* rc */)) == SQLITE_OK {
+ if xOutput == uintptr(0) {
+ *(*int32)(unsafe.Pointer(pnChangeset)) = (*SessionBuffer)(unsafe.Pointer(bp + 24 /* &buf */)).FnBuf
+ *(*uintptr)(unsafe.Pointer(ppChangeset)) = (*SessionBuffer)(unsafe.Pointer(bp + 24 /* &buf */)).FaBuf
+ (*SessionBuffer)(unsafe.Pointer(bp + 24 /* &buf */)).FaBuf = uintptr(0)
+ } else if (*SessionBuffer)(unsafe.Pointer(bp+24 /* &buf */)).FnBuf > 0 {
+ *(*int32)(unsafe.Pointer(bp + 40 /* rc */)) = (*struct {
+ f func(*libc.TLS, uintptr, uintptr, int32) int32
+ })(unsafe.Pointer(&struct{ uintptr }{xOutput})).f(tls, pOut, (*SessionBuffer)(unsafe.Pointer(bp+24 /* &buf */)).FaBuf, (*SessionBuffer)(unsafe.Pointer(bp+24 /* &buf */)).FnBuf)
+ }
+ }
+
+ Xsqlite3_free(tls, (*SessionBuffer)(unsafe.Pointer(bp+24 /* &buf */)).FaBuf)
+ Xsqlite3_exec(tls, db, ts+31091 /* "RELEASE changese..." */, uintptr(0), uintptr(0), uintptr(0))
+ Xsqlite3_mutex_leave(tls, Xsqlite3_db_mutex(tls, db))
+ return *(*int32)(unsafe.Pointer(bp + 40 /* rc */))
+}
+
+// Obtain a changeset object containing all changes recorded by the
+// session object passed as the first argument.
+//
+// It is the responsibility of the caller to eventually free the buffer
+// using sqlite3_free().
+func Xsqlite3session_changeset(tls *libc.TLS, pSession uintptr, pnChangeset uintptr, ppChangeset uintptr) int32 { /* sqlite3.c:209288:16: */
+ var rc int32 = sessionGenerateChangeset(tls, pSession, 0, uintptr(0), uintptr(0), pnChangeset, ppChangeset)
+
+ return rc
+}
+
+// Streaming version of sqlite3session_changeset().
+func Xsqlite3session_changeset_strm(tls *libc.TLS, pSession uintptr, xOutput uintptr, pOut uintptr) int32 { /* sqlite3.c:209303:16: */
+ return sessionGenerateChangeset(tls, pSession, 0, xOutput, pOut, uintptr(0), uintptr(0))
+}
+
+// Streaming version of sqlite3session_patchset().
+func Xsqlite3session_patchset_strm(tls *libc.TLS, pSession uintptr, xOutput uintptr, pOut uintptr) int32 { /* sqlite3.c:209314:16: */
+ return sessionGenerateChangeset(tls, pSession, 1, xOutput, pOut, uintptr(0), uintptr(0))
+}
+
+// Obtain a patchset object containing all changes recorded by the
+// session object passed as the first argument.
+//
+// It is the responsibility of the caller to eventually free the buffer
+// using sqlite3_free().
+func Xsqlite3session_patchset(tls *libc.TLS, pSession uintptr, pnPatchset uintptr, ppPatchset uintptr) int32 { /* sqlite3.c:209329:16: */
+ return sessionGenerateChangeset(tls, pSession, 1, uintptr(0), uintptr(0), pnPatchset, ppPatchset)
+}
+
+// Enable or disable the session object passed as the first argument.
+func Xsqlite3session_enable(tls *libc.TLS, pSession uintptr, bEnable int32) int32 { /* sqlite3.c:209340:16: */
+ var ret int32
+ Xsqlite3_mutex_enter(tls, Xsqlite3_db_mutex(tls, (*Sqlite3_session)(unsafe.Pointer(pSession)).Fdb))
+ if bEnable >= 0 {
+ (*Sqlite3_session)(unsafe.Pointer(pSession)).FbEnable = bEnable
+ }
+ ret = (*Sqlite3_session)(unsafe.Pointer(pSession)).FbEnable
+ Xsqlite3_mutex_leave(tls, Xsqlite3_db_mutex(tls, (*Sqlite3_session)(unsafe.Pointer(pSession)).Fdb))
+ return ret
+}
+
+// Enable or disable the session object passed as the first argument.
+func Xsqlite3session_indirect(tls *libc.TLS, pSession uintptr, bIndirect int32) int32 { /* sqlite3.c:209354:16: */
+ var ret int32
+ Xsqlite3_mutex_enter(tls, Xsqlite3_db_mutex(tls, (*Sqlite3_session)(unsafe.Pointer(pSession)).Fdb))
+ if bIndirect >= 0 {
+ (*Sqlite3_session)(unsafe.Pointer(pSession)).FbIndirect = bIndirect
+ }
+ ret = (*Sqlite3_session)(unsafe.Pointer(pSession)).FbIndirect
+ Xsqlite3_mutex_leave(tls, Xsqlite3_db_mutex(tls, (*Sqlite3_session)(unsafe.Pointer(pSession)).Fdb))
+ return ret
+}
+
+// Return true if there have been no changes to monitored tables recorded
+// by the session object passed as the only argument.
+func Xsqlite3session_isempty(tls *libc.TLS, pSession uintptr) int32 { /* sqlite3.c:209369:16: */
+ var ret int32 = 0
+ var pTab uintptr
+
+ Xsqlite3_mutex_enter(tls, Xsqlite3_db_mutex(tls, (*Sqlite3_session)(unsafe.Pointer(pSession)).Fdb))
+ for pTab = (*Sqlite3_session)(unsafe.Pointer(pSession)).FpTable; (pTab != 0) && (ret == 0); pTab = (*SessionTable)(unsafe.Pointer(pTab)).FpNext {
+ ret = (libc.Bool32((*SessionTable)(unsafe.Pointer(pTab)).FnEntry > 0))
+ }
+ Xsqlite3_mutex_leave(tls, Xsqlite3_db_mutex(tls, (*Sqlite3_session)(unsafe.Pointer(pSession)).Fdb))
+
+ return (libc.Bool32(ret == 0))
+}
+
+// Return the amount of heap memory in use.
+func Xsqlite3session_memory_used(tls *libc.TLS, pSession uintptr) Sqlite3_int64 { /* sqlite3.c:209385:26: */
+ return (*Sqlite3_session)(unsafe.Pointer(pSession)).FnMalloc
+}
+
+// Configure the session object passed as the first argument.
+func Xsqlite3session_object_config(tls *libc.TLS, pSession uintptr, op int32, pArg uintptr) int32 { /* sqlite3.c:209392:16: */
+ var rc int32 = SQLITE_OK
+ switch op {
+ case SQLITE_SESSION_OBJCONFIG_SIZE:
+ {
+ var iArg int32 = *(*int32)(unsafe.Pointer(pArg))
+ if iArg >= 0 {
+ if (*Sqlite3_session)(unsafe.Pointer(pSession)).FpTable != 0 {
+ rc = SQLITE_MISUSE
+ } else {
+ (*Sqlite3_session)(unsafe.Pointer(pSession)).FbEnableSize = (libc.Bool32(iArg != 0))
+ }
+ }
+ *(*int32)(unsafe.Pointer(pArg)) = (*Sqlite3_session)(unsafe.Pointer(pSession)).FbEnableSize
+ break
+
+ }
+
+ default:
+ rc = SQLITE_MISUSE
+ }
+
+ return rc
+}
+
+// Return the maximum size of sqlite3session_changeset() output.
+func Xsqlite3session_changeset_size(tls *libc.TLS, pSession uintptr) Sqlite3_int64 { /* sqlite3.c:209418:26: */
+ return (*Sqlite3_session)(unsafe.Pointer(pSession)).FnMaxChangesetSize
+}
+
+// Do the work for either sqlite3changeset_start() or start_strm().
+func sessionChangesetStart(tls *libc.TLS, pp uintptr, xInput uintptr, pIn uintptr, nChangeset int32, pChangeset uintptr, bInvert int32, bSkipEmpty int32) int32 { /* sqlite3.c:209425:12: */
+ var pRet uintptr // Iterator to return
+ var nByte int32 // Number of bytes to allocate for iterator
+
+ // Zero the output variable in case an error occurs.
+ *(*uintptr)(unsafe.Pointer(pp)) = uintptr(0)
+
+ // Allocate and initialize the iterator structure.
+ nByte = int32(unsafe.Sizeof(Sqlite3_changeset_iter{}))
+ pRet = Xsqlite3_malloc(tls, nByte)
+ if !(pRet != 0) {
+ return SQLITE_NOMEM
+ }
+ libc.Xmemset(tls, pRet, 0, uint64(unsafe.Sizeof(Sqlite3_changeset_iter{})))
+ (*Sqlite3_changeset_iter)(unsafe.Pointer(pRet)).Fin.FaData = pChangeset
+ (*Sqlite3_changeset_iter)(unsafe.Pointer(pRet)).Fin.FnData = nChangeset
+ (*Sqlite3_changeset_iter)(unsafe.Pointer(pRet)).Fin.FxInput = xInput
+ (*Sqlite3_changeset_iter)(unsafe.Pointer(pRet)).Fin.FpIn = pIn
+ (*Sqlite3_changeset_iter)(unsafe.Pointer(pRet)).Fin.FbEof = func() int32 {
+ if xInput != 0 {
+ return 0
+ }
+ return 1
+ }()
+ (*Sqlite3_changeset_iter)(unsafe.Pointer(pRet)).FbInvert = bInvert
+ (*Sqlite3_changeset_iter)(unsafe.Pointer(pRet)).FbSkipEmpty = bSkipEmpty
+
+ // Populate the output variable and return success.
+ *(*uintptr)(unsafe.Pointer(pp)) = pRet
+ return SQLITE_OK
+}
+
+// Create an iterator used to iterate through the contents of a changeset.
+func Xsqlite3changeset_start(tls *libc.TLS, pp uintptr, nChangeset int32, pChangeset uintptr) int32 { /* sqlite3.c:209463:16: */
+ return sessionChangesetStart(tls, pp, uintptr(0), uintptr(0), nChangeset, pChangeset, 0, 0)
+}
+
+func Xsqlite3changeset_start_v2(tls *libc.TLS, pp uintptr, nChangeset int32, pChangeset uintptr, flags int32) int32 { /* sqlite3.c:209470:16: */
+ var bInvert int32 = libc.BoolInt32(!(!((flags & SQLITE_CHANGESETSTART_INVERT) != 0)))
+ return sessionChangesetStart(tls, pp, uintptr(0), uintptr(0), nChangeset, pChangeset, bInvert, 0)
+}
+
+// Streaming version of sqlite3changeset_start().
+func Xsqlite3changeset_start_strm(tls *libc.TLS, pp uintptr, xInput uintptr, pIn uintptr) int32 { /* sqlite3.c:209483:16: */
+ return sessionChangesetStart(tls, pp, xInput, pIn, 0, uintptr(0), 0, 0)
+}
+
+func Xsqlite3changeset_start_v2_strm(tls *libc.TLS, pp uintptr, xInput uintptr, pIn uintptr, flags int32) int32 { /* sqlite3.c:209490:16: */
+ var bInvert int32 = libc.BoolInt32(!(!((flags & SQLITE_CHANGESETSTART_INVERT) != 0)))
+ return sessionChangesetStart(tls, pp, xInput, pIn, 0, uintptr(0), bInvert, 0)
+}
+
+// If the SessionInput object passed as the only argument is a streaming
+// object and the buffer is full, discard some data to free up space.
+func sessionDiscardData(tls *libc.TLS, pIn uintptr) { /* sqlite3.c:209504:13: */
+ if ((*SessionInput)(unsafe.Pointer(pIn)).FxInput != 0) && ((*SessionInput)(unsafe.Pointer(pIn)).FiNext >= sessions_strm_chunk_size) {
+ var nMove int32 = ((*SessionInput)(unsafe.Pointer(pIn)).Fbuf.FnBuf - (*SessionInput)(unsafe.Pointer(pIn)).FiNext)
+
+ if nMove > 0 {
+ libc.Xmemmove(tls, (*SessionInput)(unsafe.Pointer(pIn)).Fbuf.FaBuf, ((*SessionInput)(unsafe.Pointer(pIn)).Fbuf.FaBuf + uintptr((*SessionInput)(unsafe.Pointer(pIn)).FiNext)), uint64(nMove))
+ }
+ *(*int32)(unsafe.Pointer(pIn + 32 /* &.buf */ + 8 /* &.nBuf */)) -= ((*SessionInput)(unsafe.Pointer(pIn)).FiNext)
+ (*SessionInput)(unsafe.Pointer(pIn)).FiNext = 0
+ (*SessionInput)(unsafe.Pointer(pIn)).FnData = (*SessionInput)(unsafe.Pointer(pIn)).Fbuf.FnBuf
+ }
+}
+
+// Ensure that there are at least nByte bytes available in the buffer. Or,
+// if there are not nByte bytes remaining in the input, that all available
+// data is in the buffer.
+//
+// Return an SQLite error code if an error occurs, or SQLITE_OK otherwise.
+func sessionInputBuffer(tls *libc.TLS, pIn uintptr, nByte int32) int32 { /* sqlite3.c:209524:12: */
+ bp := tls.Alloc(8)
+ defer tls.Free(8)
+
+ *(*int32)(unsafe.Pointer(bp /* rc */)) = SQLITE_OK
+ if (*SessionInput)(unsafe.Pointer(pIn)).FxInput != 0 {
+ for (!((*SessionInput)(unsafe.Pointer(pIn)).FbEof != 0) && (((*SessionInput)(unsafe.Pointer(pIn)).FiNext + nByte) >= (*SessionInput)(unsafe.Pointer(pIn)).FnData)) && (*(*int32)(unsafe.Pointer(bp /* rc */)) == SQLITE_OK) {
+ *(*int32)(unsafe.Pointer(bp + 4 /* nNew */)) = sessions_strm_chunk_size
+
+ if (*SessionInput)(unsafe.Pointer(pIn)).FbNoDiscard == 0 {
+ sessionDiscardData(tls, pIn)
+ }
+ if SQLITE_OK == sessionBufferGrow(tls, (pIn+32 /* &.buf */), int64(*(*int32)(unsafe.Pointer(bp + 4 /* nNew */))), bp /* &rc */) {
+ *(*int32)(unsafe.Pointer(bp /* rc */)) = (*struct {
+ f func(*libc.TLS, uintptr, uintptr, uintptr) int32
+ })(unsafe.Pointer(&struct{ uintptr }{(*SessionInput)(unsafe.Pointer(pIn)).FxInput})).f(tls, (*SessionInput)(unsafe.Pointer(pIn)).FpIn, ((*SessionInput)(unsafe.Pointer(pIn)).Fbuf.FaBuf + uintptr((*SessionInput)(unsafe.Pointer(pIn)).Fbuf.FnBuf)), bp+4 /* &nNew */)
+ if *(*int32)(unsafe.Pointer(bp + 4 /* nNew */)) == 0 {
+ (*SessionInput)(unsafe.Pointer(pIn)).FbEof = 1
+ } else {
+ *(*int32)(unsafe.Pointer(pIn + 32 /* &.buf */ + 8 /* &.nBuf */)) += (*(*int32)(unsafe.Pointer(bp + 4 /* nNew */)))
+ }
+ }
+
+ (*SessionInput)(unsafe.Pointer(pIn)).FaData = (*SessionInput)(unsafe.Pointer(pIn)).Fbuf.FaBuf
+ (*SessionInput)(unsafe.Pointer(pIn)).FnData = (*SessionInput)(unsafe.Pointer(pIn)).Fbuf.FnBuf
+ }
+ }
+ return *(*int32)(unsafe.Pointer(bp /* rc */))
+}
+
+// When this function is called, *ppRec points to the start of a record
+// that contains nCol values. This function advances the pointer *ppRec
+// until it points to the byte immediately following that record.
+func sessionSkipRecord(tls *libc.TLS, ppRec uintptr, nCol int32) { /* sqlite3.c:209552:13: */
+ bp := tls.Alloc(4)
+ defer tls.Free(4)
+
+ var aRec uintptr = *(*uintptr)(unsafe.Pointer(ppRec))
+ var i int32
+ for i = 0; i < nCol; i++ {
+ var eType int32 = int32(*(*U8)(unsafe.Pointer(libc.PostIncUintptr(&aRec, 1))))
+ if (eType == SQLITE_TEXT) || (eType == SQLITE_BLOB) {
+ // var nByte int32 at bp, 4
+
+ aRec += uintptr(sessionVarintGet(tls, aRec, bp /* &nByte */))
+ aRec += uintptr(*(*int32)(unsafe.Pointer(bp /* nByte */)))
+ } else if (eType == SQLITE_INTEGER) || (eType == SQLITE_FLOAT) {
+ aRec += uintptr(8)
+ }
+ }
+
+ *(*uintptr)(unsafe.Pointer(ppRec)) = aRec
+}
+
+// This function sets the value of the sqlite3_value object passed as the
+// first argument to a copy of the string or blob held in the aData[]
+// buffer. SQLITE_OK is returned if successful, or SQLITE_NOMEM if an OOM
+// error occurs.
+func sessionValueSetStr(tls *libc.TLS, pVal uintptr, aData uintptr, nData int32, enc U8) int32 { /* sqlite3.c:209578:12: */
+ // In theory this code could just pass SQLITE_TRANSIENT as the final
+ // argument to sqlite3ValueSetStr() and have the copy created
+ // automatically. But doing so makes it difficult to detect any OOM
+ // error. Hence the code to create the copy externally.
+ var aCopy uintptr = Xsqlite3_malloc64(tls, (uint64(Sqlite3_int64(nData) + int64(1))))
+ if aCopy == uintptr(0) {
+ return SQLITE_NOMEM
+ }
+ libc.Xmemcpy(tls, aCopy, aData, uint64(nData))
+ Xsqlite3ValueSetStr(tls, pVal, nData, aCopy, enc, *(*uintptr)(unsafe.Pointer(&struct{ f func(*libc.TLS, uintptr) }{Xsqlite3_free})))
+ return SQLITE_OK
+}
+
+// Deserialize a single record from a buffer in memory. See "RECORD FORMAT"
+// for details.
+//
+// When this function is called, *paChange points to the start of the record
+// to deserialize. Assuming no error occurs, *paChange is set to point to
+// one byte after the end of the same record before this function returns.
+// If the argument abPK is NULL, then the record contains nCol values. Or,
+// if abPK is other than NULL, then the record contains only the PK fields
+// (in other words, it is a patchset DELETE record).
+//
+// If successful, each element of the apOut[] array (allocated by the caller)
+// is set to point to an sqlite3_value object containing the value read
+// from the corresponding position in the record. If that value is not
+// included in the record (i.e. because the record is part of an UPDATE change
+// and the field was not modified), the corresponding element of apOut[] is
+// set to NULL.
+//
+// It is the responsibility of the caller to free all sqlite_value structures
+// using sqlite3_free().
+//
+// If an error occurs, an SQLite error code (e.g. SQLITE_NOMEM) is returned.
+// The apOut[] array may have been partially populated in this case.
+func sessionReadRecord(tls *libc.TLS, pIn uintptr, nCol int32, abPK uintptr, apOut uintptr, pbEmpty uintptr) int32 { /* sqlite3.c:209619:12: */
+ bp := tls.Alloc(24)
+ defer tls.Free(24)
+
+ var i int32 // Used to iterate through columns
+ var rc int32 = SQLITE_OK
+
+ if pbEmpty != 0 {
+ *(*int32)(unsafe.Pointer(pbEmpty)) = 1
+ }
+ for i = 0; (i < nCol) && (rc == SQLITE_OK); i++ {
+ var eType int32 = 0 // Type of value (SQLITE_NULL, TEXT etc.)
+ if (abPK != 0) && (int32(*(*U8)(unsafe.Pointer(abPK + uintptr(i)))) == 0) {
+ continue
+ }
+ rc = sessionInputBuffer(tls, pIn, 9)
+ if rc == SQLITE_OK {
+ if (*SessionInput)(unsafe.Pointer(pIn)).FiNext >= (*SessionInput)(unsafe.Pointer(pIn)).FnData {
+ rc = Xsqlite3CorruptError(tls, 209637)
+ } else {
+ eType = int32(*(*U8)(unsafe.Pointer((*SessionInput)(unsafe.Pointer(pIn)).FaData + uintptr(libc.PostIncInt32(&(*SessionInput)(unsafe.Pointer(pIn)).FiNext, 1)))))
+
+ if eType != 0 {
+ if pbEmpty != 0 {
+ *(*int32)(unsafe.Pointer(pbEmpty)) = 0
+ }
+ *(*uintptr)(unsafe.Pointer(apOut + uintptr(i)*8)) = Xsqlite3ValueNew(tls, uintptr(0))
+ if !(int32(*(*uintptr)(unsafe.Pointer(apOut + uintptr(i)*8))) != 0) {
+ rc = SQLITE_NOMEM
+ }
+ }
+ }
+ }
+
+ if rc == SQLITE_OK {
+ var aVal uintptr = ((*SessionInput)(unsafe.Pointer(pIn)).FaData + uintptr((*SessionInput)(unsafe.Pointer(pIn)).FiNext))
+ if (eType == SQLITE_TEXT) || (eType == SQLITE_BLOB) {
+ // var nByte int32 at bp, 4
+
+ *(*int32)(unsafe.Pointer(pIn + 8 /* &.iNext */)) += (sessionVarintGet(tls, aVal, bp /* &nByte */))
+ rc = sessionInputBuffer(tls, pIn, *(*int32)(unsafe.Pointer(bp /* nByte */)))
+ if rc == SQLITE_OK {
+ if (*(*int32)(unsafe.Pointer(bp /* nByte */)) < 0) || (*(*int32)(unsafe.Pointer(bp /* nByte */)) > ((*SessionInput)(unsafe.Pointer(pIn)).FnData - (*SessionInput)(unsafe.Pointer(pIn)).FiNext)) {
+ rc = Xsqlite3CorruptError(tls, 209657)
+ } else {
+ var enc U8 = func() uint8 {
+ if eType == SQLITE_TEXT {
+ return uint8(SQLITE_UTF8)
+ }
+ return uint8(0)
+ }()
+ rc = sessionValueSetStr(tls, *(*uintptr)(unsafe.Pointer(apOut + uintptr(i)*8)), ((*SessionInput)(unsafe.Pointer(pIn)).FaData + uintptr((*SessionInput)(unsafe.Pointer(pIn)).FiNext)), *(*int32)(unsafe.Pointer(bp /* nByte */)), enc)
+ *(*int32)(unsafe.Pointer(pIn + 8 /* &.iNext */)) += (*(*int32)(unsafe.Pointer(bp /* nByte */)))
+ }
+ }
+ }
+ if (eType == SQLITE_INTEGER) || (eType == SQLITE_FLOAT) {
+ *(*Sqlite3_int64)(unsafe.Pointer(bp + 16 /* v */)) = sessionGetI64(tls, aVal)
+ if eType == SQLITE_INTEGER {
+ Xsqlite3VdbeMemSetInt64(tls, *(*uintptr)(unsafe.Pointer(apOut + uintptr(i)*8)), *(*Sqlite3_int64)(unsafe.Pointer(bp + 16 /* v */)))
+ } else {
+ // var d float64 at bp+8, 8
+
+ libc.Xmemcpy(tls, bp+8 /* &d */, bp+16 /* &v */, uint64(8))
+ Xsqlite3VdbeMemSetDouble(tls, *(*uintptr)(unsafe.Pointer(apOut + uintptr(i)*8)), *(*float64)(unsafe.Pointer(bp + 8 /* d */)))
+ }
+ *(*int32)(unsafe.Pointer(pIn + 8 /* &.iNext */)) += (8)
+ }
+ }
+ }
+
+ return rc
+}
+
+// The input pointer currently points to the second byte of a table-header.
+// Specifically, to the following:
+//
+// + number of columns in table (varint)
+// + array of PK flags (1 byte per column),
+// + table name (nul terminated).
+//
+// This function ensures that all of the above is present in the input
+// buffer (i.e. that it can be accessed without any calls to xInput()).
+// If successful, SQLITE_OK is returned. Otherwise, an SQLite error code.
+// The input pointer is not moved.
+func sessionChangesetBufferTblhdr(tls *libc.TLS, pIn uintptr, pnByte uintptr) int32 { /* sqlite3.c:209695:12: */
+ bp := tls.Alloc(4)
+ defer tls.Free(4)
+
+ var rc int32 = SQLITE_OK
+ *(*int32)(unsafe.Pointer(bp /* nCol */)) = 0
+ var nRead int32 = 0
+
+ rc = sessionInputBuffer(tls, pIn, 9)
+ if rc == SQLITE_OK {
+ nRead = nRead + (sessionVarintGet(tls, ((*SessionInput)(unsafe.Pointer(pIn)).FaData + uintptr(((*SessionInput)(unsafe.Pointer(pIn)).FiNext + nRead))), bp /* &nCol */))
+ // The hard upper limit for the number of columns in an SQLite
+ // database table is, according to sqliteLimit.h, 32676. So
+ // consider any table-header that purports to have more than 65536
+ // columns to be corrupt. This is convenient because otherwise,
+ // if the (nCol>65536) condition below were omitted, a sufficiently
+ // large value for nCol may cause nRead to wrap around and become
+ // negative. Leading to a crash.
+ if (*(*int32)(unsafe.Pointer(bp /* nCol */)) < 0) || (*(*int32)(unsafe.Pointer(bp /* nCol */)) > 65536) {
+ rc = Xsqlite3CorruptError(tls, 209711)
+ } else {
+ rc = sessionInputBuffer(tls, pIn, ((nRead + *(*int32)(unsafe.Pointer(bp /* nCol */))) + 100))
+ nRead = nRead + (*(*int32)(unsafe.Pointer(bp /* nCol */)))
+ }
+ }
+
+ for rc == SQLITE_OK {
+ for (((*SessionInput)(unsafe.Pointer(pIn)).FiNext + nRead) < (*SessionInput)(unsafe.Pointer(pIn)).FnData) && (*(*U8)(unsafe.Pointer((*SessionInput)(unsafe.Pointer(pIn)).FaData + uintptr(((*SessionInput)(unsafe.Pointer(pIn)).FiNext + nRead)))) != 0) {
+ nRead++
+ }
+ if ((*SessionInput)(unsafe.Pointer(pIn)).FiNext + nRead) < (*SessionInput)(unsafe.Pointer(pIn)).FnData {
+ break
+ }
+ rc = sessionInputBuffer(tls, pIn, (nRead + 100))
+ }
+ *(*int32)(unsafe.Pointer(pnByte)) = (nRead + 1)
+ return rc
+}
+
+// The input pointer currently points to the first byte of the first field
+// of a record consisting of nCol columns. This function ensures the entire
+// record is buffered. It does not move the input pointer.
+//
+// If successful, SQLITE_OK is returned and *pnByte is set to the size of
+// the record in bytes. Otherwise, an SQLite error code is returned. The
+// final value of *pnByte is undefined in this case.
+func sessionChangesetBufferRecord(tls *libc.TLS, pIn uintptr, nCol int32, pnByte uintptr) int32 { /* sqlite3.c:209738:12: */
+ bp := tls.Alloc(4)
+ defer tls.Free(4)
+
+ var rc int32 = SQLITE_OK
+ var nByte int32 = 0
+ var i int32
+ for i = 0; (rc == SQLITE_OK) && (i < nCol); i++ {
+ var eType int32
+ rc = sessionInputBuffer(tls, pIn, (nByte + 10))
+ if rc == SQLITE_OK {
+ eType = int32(*(*U8)(unsafe.Pointer((*SessionInput)(unsafe.Pointer(pIn)).FaData + uintptr(((*SessionInput)(unsafe.Pointer(pIn)).FiNext + libc.PostIncInt32(&nByte, 1))))))
+ if (eType == SQLITE_TEXT) || (eType == SQLITE_BLOB) {
+ // var n int32 at bp, 4
+
+ nByte = nByte + (sessionVarintGet(tls, ((*SessionInput)(unsafe.Pointer(pIn)).FaData + uintptr(((*SessionInput)(unsafe.Pointer(pIn)).FiNext + nByte))), bp /* &n */))
+ nByte = nByte + (*(*int32)(unsafe.Pointer(bp /* n */)))
+ rc = sessionInputBuffer(tls, pIn, nByte)
+ } else if (eType == SQLITE_INTEGER) || (eType == SQLITE_FLOAT) {
+ nByte = nByte + (8)
+ }
+ }
+ }
+ *(*int32)(unsafe.Pointer(pnByte)) = nByte
+ return rc
+}
+
+// The input pointer currently points to the second byte of a table-header.
+// Specifically, to the following:
+//
+// + number of columns in table (varint)
+// + array of PK flags (1 byte per column),
+// + table name (nul terminated).
+//
+// This function decodes the table-header and populates the p->nCol,
+// p->zTab and p->abPK[] variables accordingly. The p->apValue[] array is
+// also allocated or resized according to the new value of p->nCol. The
+// input pointer is left pointing to the byte following the table header.
+//
+// If successful, SQLITE_OK is returned. Otherwise, an SQLite error code
+// is returned and the final values of the various fields enumerated above
+// are undefined.
+func sessionChangesetReadTblhdr(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:209782:12: */
+ bp := tls.Alloc(8)
+ defer tls.Free(8)
+
+ // var rc int32 at bp+4, 4
+
+ // var nCopy int32 at bp, 4
+
+ *(*int32)(unsafe.Pointer(bp + 4 /* rc */)) = sessionChangesetBufferTblhdr(tls, (p /* &.in */), bp /* &nCopy */)
+ if *(*int32)(unsafe.Pointer(bp + 4 /* rc */)) == SQLITE_OK {
+ var nByte int32
+ var nVarint int32
+ nVarint = sessionVarintGet(tls, ((*Sqlite3_changeset_iter)(unsafe.Pointer(p)).Fin.FaData + uintptr((*Sqlite3_changeset_iter)(unsafe.Pointer(p)).Fin.FiNext)), (p + 120 /* &.nCol */))
+ if (*Sqlite3_changeset_iter)(unsafe.Pointer(p)).FnCol > 0 {
+ *(*int32)(unsafe.Pointer(bp /* nCopy */)) -= nVarint
+ *(*int32)(unsafe.Pointer(p /* &.in */ + 8 /* &.iNext */)) += (nVarint)
+ nByte = (int32(((uint64((*Sqlite3_changeset_iter)(unsafe.Pointer(p)).FnCol) * uint64(unsafe.Sizeof(uintptr(0)))) * uint64(2)) + uint64(*(*int32)(unsafe.Pointer(bp /* nCopy */)))))
+ (*Sqlite3_changeset_iter)(unsafe.Pointer(p)).Ftblhdr.FnBuf = 0
+ sessionBufferGrow(tls, (p + 72 /* &.tblhdr */), int64(nByte), bp+4 /* &rc */)
+ } else {
+ *(*int32)(unsafe.Pointer(bp + 4 /* rc */)) = Xsqlite3CorruptError(tls, 209799)
+ }
+ }
+
+ if *(*int32)(unsafe.Pointer(bp + 4 /* rc */)) == SQLITE_OK {
+ var iPK Size_t = ((uint64(unsafe.Sizeof(uintptr(0))) * uint64((*Sqlite3_changeset_iter)(unsafe.Pointer(p)).FnCol)) * uint64(2))
+ libc.Xmemset(tls, (*Sqlite3_changeset_iter)(unsafe.Pointer(p)).Ftblhdr.FaBuf, 0, iPK)
+ libc.Xmemcpy(tls, ((*Sqlite3_changeset_iter)(unsafe.Pointer(p)).Ftblhdr.FaBuf + uintptr(iPK)), ((*Sqlite3_changeset_iter)(unsafe.Pointer(p)).Fin.FaData + uintptr((*Sqlite3_changeset_iter)(unsafe.Pointer(p)).Fin.FiNext)), uint64(*(*int32)(unsafe.Pointer(bp /* nCopy */))))
+ *(*int32)(unsafe.Pointer(p /* &.in */ + 8 /* &.iNext */)) += (*(*int32)(unsafe.Pointer(bp /* nCopy */)))
+ }
+
+ (*Sqlite3_changeset_iter)(unsafe.Pointer(p)).FapValue = (*Sqlite3_changeset_iter)(unsafe.Pointer(p)).Ftblhdr.FaBuf
+ if (*Sqlite3_changeset_iter)(unsafe.Pointer(p)).FapValue == uintptr(0) {
+ (*Sqlite3_changeset_iter)(unsafe.Pointer(p)).FabPK = uintptr(0)
+ (*Sqlite3_changeset_iter)(unsafe.Pointer(p)).FzTab = uintptr(0)
+ } else {
+ (*Sqlite3_changeset_iter)(unsafe.Pointer(p)).FabPK = ((*Sqlite3_changeset_iter)(unsafe.Pointer(p)).FapValue + uintptr(((*Sqlite3_changeset_iter)(unsafe.Pointer(p)).FnCol*2))*8)
+ (*Sqlite3_changeset_iter)(unsafe.Pointer(p)).FzTab = func() uintptr {
+ if (*Sqlite3_changeset_iter)(unsafe.Pointer(p)).FabPK != 0 {
+ return ((*Sqlite3_changeset_iter)(unsafe.Pointer(p)).FabPK + uintptr((*Sqlite3_changeset_iter)(unsafe.Pointer(p)).FnCol))
+ }
+ return uintptr(0)
+ }()
+ }
+ return libc.AssignPtrInt32(p+100 /* &.rc */, *(*int32)(unsafe.Pointer(bp + 4 /* rc */)))
+}
+
+// Advance the changeset iterator to the next change. The differences between
+// this function and sessionChangesetNext() are that
+//
+// * If pbEmpty is not NULL and the change is a no-op UPDATE (an UPDATE
+// that modifies no columns), this function sets (*pbEmpty) to 1.
+//
+// * If the iterator is configured to skip no-op UPDATEs,
+// sessionChangesetNext() does that. This function does not.
+func sessionChangesetNextOne(tls *libc.TLS, p uintptr, paRec uintptr, pnRec uintptr, pbNew uintptr, pbEmpty uintptr) int32 { /* sqlite3.c:209831:12: */
+ var i int32
+ var op U8
+
+ // If the iterator is in the error-state, return immediately.
+ if (*Sqlite3_changeset_iter)(unsafe.Pointer(p)).Frc != SQLITE_OK {
+ return (*Sqlite3_changeset_iter)(unsafe.Pointer(p)).Frc
+ }
+
+ // Free the current contents of p->apValue[], if any.
+ if (*Sqlite3_changeset_iter)(unsafe.Pointer(p)).FapValue != 0 {
+ for i = 0; i < ((*Sqlite3_changeset_iter)(unsafe.Pointer(p)).FnCol * 2); i++ {
+ Xsqlite3ValueFree(tls, *(*uintptr)(unsafe.Pointer((*Sqlite3_changeset_iter)(unsafe.Pointer(p)).FapValue + uintptr(i)*8)))
+ }
+ libc.Xmemset(tls, (*Sqlite3_changeset_iter)(unsafe.Pointer(p)).FapValue, 0, ((uint64(unsafe.Sizeof(uintptr(0))) * uint64((*Sqlite3_changeset_iter)(unsafe.Pointer(p)).FnCol)) * uint64(2)))
+ }
+
+ // Make sure the buffer contains at least 10 bytes of input data, or all
+ // remaining data if there are less than 10 bytes available. This is
+ // sufficient either for the 'T' or 'P' byte and the varint that follows
+ // it, or for the two single byte values otherwise.
+ (*Sqlite3_changeset_iter)(unsafe.Pointer(p)).Frc = sessionInputBuffer(tls, (p /* &.in */), 2)
+ if (*Sqlite3_changeset_iter)(unsafe.Pointer(p)).Frc != SQLITE_OK {
+ return (*Sqlite3_changeset_iter)(unsafe.Pointer(p)).Frc
+ }
+
+ // If the iterator is already at the end of the changeset, return DONE.
+ if (*Sqlite3_changeset_iter)(unsafe.Pointer(p)).Fin.FiNext >= (*Sqlite3_changeset_iter)(unsafe.Pointer(p)).Fin.FnData {
+ return SQLITE_DONE
+ }
+
+ sessionDiscardData(tls, (p /* &.in */))
+ (*Sqlite3_changeset_iter)(unsafe.Pointer(p)).Fin.FiCurrent = (*Sqlite3_changeset_iter)(unsafe.Pointer(p)).Fin.FiNext
+
+ op = *(*U8)(unsafe.Pointer((*Sqlite3_changeset_iter)(unsafe.Pointer(p)).Fin.FaData + uintptr(libc.PostIncInt32(&(*Sqlite3_changeset_iter)(unsafe.Pointer(p)).Fin.FiNext, 1))))
+ for (int32(op) == 'T') || (int32(op) == 'P') {
+ if pbNew != 0 {
+ *(*int32)(unsafe.Pointer(pbNew)) = 1
+ }
+ (*Sqlite3_changeset_iter)(unsafe.Pointer(p)).FbPatchset = (libc.Bool32(int32(op) == 'P'))
+ if sessionChangesetReadTblhdr(tls, p) != 0 {
+ return (*Sqlite3_changeset_iter)(unsafe.Pointer(p)).Frc
+ }
+ if libc.AssignPtrInt32(p+100 /* &.rc */, sessionInputBuffer(tls, (p /* &.in */), 2)) != 0 {
+ return (*Sqlite3_changeset_iter)(unsafe.Pointer(p)).Frc
+ }
+ (*Sqlite3_changeset_iter)(unsafe.Pointer(p)).Fin.FiCurrent = (*Sqlite3_changeset_iter)(unsafe.Pointer(p)).Fin.FiNext
+ if (*Sqlite3_changeset_iter)(unsafe.Pointer(p)).Fin.FiNext >= (*Sqlite3_changeset_iter)(unsafe.Pointer(p)).Fin.FnData {
+ return SQLITE_DONE
+ }
+ op = *(*U8)(unsafe.Pointer((*Sqlite3_changeset_iter)(unsafe.Pointer(p)).Fin.FaData + uintptr(libc.PostIncInt32(&(*Sqlite3_changeset_iter)(unsafe.Pointer(p)).Fin.FiNext, 1))))
+ }
+
+ if ((*Sqlite3_changeset_iter)(unsafe.Pointer(p)).FzTab == uintptr(0)) || (((*Sqlite3_changeset_iter)(unsafe.Pointer(p)).FbPatchset != 0) && ((*Sqlite3_changeset_iter)(unsafe.Pointer(p)).FbInvert != 0)) {
+ // The first record in the changeset is not a table header. Must be a
+ // corrupt changeset.
+
+ return libc.AssignPtrInt32(p+100 /* &.rc */, Xsqlite3CorruptError(tls, 209885))
+ }
+
+ (*Sqlite3_changeset_iter)(unsafe.Pointer(p)).Fop = int32(op)
+ (*Sqlite3_changeset_iter)(unsafe.Pointer(p)).FbIndirect = int32(*(*U8)(unsafe.Pointer((*Sqlite3_changeset_iter)(unsafe.Pointer(p)).Fin.FaData + uintptr(libc.PostIncInt32(&(*Sqlite3_changeset_iter)(unsafe.Pointer(p)).Fin.FiNext, 1)))))
+ if (((*Sqlite3_changeset_iter)(unsafe.Pointer(p)).Fop != SQLITE_UPDATE) && ((*Sqlite3_changeset_iter)(unsafe.Pointer(p)).Fop != SQLITE_DELETE)) && ((*Sqlite3_changeset_iter)(unsafe.Pointer(p)).Fop != SQLITE_INSERT) {
+ return libc.AssignPtrInt32(p+100 /* &.rc */, Xsqlite3CorruptError(tls, 209891))
+ }
+
+ if paRec != 0 {
+ var nVal int32 // Number of values to buffer
+ if ((*Sqlite3_changeset_iter)(unsafe.Pointer(p)).FbPatchset == 0) && (int32(op) == SQLITE_UPDATE) {
+ nVal = ((*Sqlite3_changeset_iter)(unsafe.Pointer(p)).FnCol * 2)
+ } else if ((*Sqlite3_changeset_iter)(unsafe.Pointer(p)).FbPatchset != 0) && (int32(op) == SQLITE_DELETE) {
+ nVal = 0
+ for i = 0; i < (*Sqlite3_changeset_iter)(unsafe.Pointer(p)).FnCol; i++ {
+ if *(*U8)(unsafe.Pointer((*Sqlite3_changeset_iter)(unsafe.Pointer(p)).FabPK + uintptr(i))) != 0 {
+ nVal++
+ }
+ }
+ } else {
+ nVal = (*Sqlite3_changeset_iter)(unsafe.Pointer(p)).FnCol
+ }
+ (*Sqlite3_changeset_iter)(unsafe.Pointer(p)).Frc = sessionChangesetBufferRecord(tls, (p /* &.in */), nVal, pnRec)
+ if (*Sqlite3_changeset_iter)(unsafe.Pointer(p)).Frc != SQLITE_OK {
+ return (*Sqlite3_changeset_iter)(unsafe.Pointer(p)).Frc
+ }
+ *(*uintptr)(unsafe.Pointer(paRec)) = ((*Sqlite3_changeset_iter)(unsafe.Pointer(p)).Fin.FaData + uintptr((*Sqlite3_changeset_iter)(unsafe.Pointer(p)).Fin.FiNext))
+ *(*int32)(unsafe.Pointer(p /* &.in */ + 8 /* &.iNext */)) += (*(*int32)(unsafe.Pointer(pnRec)))
+ } else {
+ var apOld uintptr = func() uintptr {
+ if (*Sqlite3_changeset_iter)(unsafe.Pointer(p)).FbInvert != 0 {
+ return ((*Sqlite3_changeset_iter)(unsafe.Pointer(p)).FapValue + uintptr((*Sqlite3_changeset_iter)(unsafe.Pointer(p)).FnCol)*8)
+ }
+ return (*Sqlite3_changeset_iter)(unsafe.Pointer(p)).FapValue
+ }()
+ var apNew uintptr = func() uintptr {
+ if (*Sqlite3_changeset_iter)(unsafe.Pointer(p)).FbInvert != 0 {
+ return (*Sqlite3_changeset_iter)(unsafe.Pointer(p)).FapValue
+ }
+ return ((*Sqlite3_changeset_iter)(unsafe.Pointer(p)).FapValue + uintptr((*Sqlite3_changeset_iter)(unsafe.Pointer(p)).FnCol)*8)
+ }()
+
+ // If this is an UPDATE or DELETE, read the old.* record.
+ if ((*Sqlite3_changeset_iter)(unsafe.Pointer(p)).Fop != SQLITE_INSERT) && (((*Sqlite3_changeset_iter)(unsafe.Pointer(p)).FbPatchset == 0) || ((*Sqlite3_changeset_iter)(unsafe.Pointer(p)).Fop == SQLITE_DELETE)) {
+ var abPK uintptr
+ if (*Sqlite3_changeset_iter)(unsafe.Pointer(p)).FbPatchset != 0 {
+ abPK = (*Sqlite3_changeset_iter)(unsafe.Pointer(p)).FabPK
+ } else {
+ abPK = uintptr(0)
+ }
+ (*Sqlite3_changeset_iter)(unsafe.Pointer(p)).Frc = sessionReadRecord(tls, (p /* &.in */), (*Sqlite3_changeset_iter)(unsafe.Pointer(p)).FnCol, abPK, apOld, uintptr(0))
+ if (*Sqlite3_changeset_iter)(unsafe.Pointer(p)).Frc != SQLITE_OK {
+ return (*Sqlite3_changeset_iter)(unsafe.Pointer(p)).Frc
+ }
+ }
+
+ // If this is an INSERT or UPDATE, read the new.* record.
+ if (*Sqlite3_changeset_iter)(unsafe.Pointer(p)).Fop != SQLITE_DELETE {
+ (*Sqlite3_changeset_iter)(unsafe.Pointer(p)).Frc = sessionReadRecord(tls, (p /* &.in */), (*Sqlite3_changeset_iter)(unsafe.Pointer(p)).FnCol, uintptr(0), apNew, pbEmpty)
+ if (*Sqlite3_changeset_iter)(unsafe.Pointer(p)).Frc != SQLITE_OK {
+ return (*Sqlite3_changeset_iter)(unsafe.Pointer(p)).Frc
+ }
+ }
+
+ if (((*Sqlite3_changeset_iter)(unsafe.Pointer(p)).FbPatchset != 0) || ((*Sqlite3_changeset_iter)(unsafe.Pointer(p)).FbInvert != 0)) && ((*Sqlite3_changeset_iter)(unsafe.Pointer(p)).Fop == SQLITE_UPDATE) {
+ // If this is an UPDATE that is part of a patchset, then all PK and
+ // modified fields are present in the new.* record. The old.* record
+ // is currently completely empty. This block shifts the PK fields from
+ // new.* to old.*, to accommodate the code that reads these arrays.
+ for i = 0; i < (*Sqlite3_changeset_iter)(unsafe.Pointer(p)).FnCol; i++ {
+
+ if *(*U8)(unsafe.Pointer((*Sqlite3_changeset_iter)(unsafe.Pointer(p)).FabPK + uintptr(i))) != 0 {
+
+ *(*uintptr)(unsafe.Pointer((*Sqlite3_changeset_iter)(unsafe.Pointer(p)).FapValue + uintptr(i)*8)) = *(*uintptr)(unsafe.Pointer((*Sqlite3_changeset_iter)(unsafe.Pointer(p)).FapValue + uintptr((i+(*Sqlite3_changeset_iter)(unsafe.Pointer(p)).FnCol))*8))
+ if *(*uintptr)(unsafe.Pointer((*Sqlite3_changeset_iter)(unsafe.Pointer(p)).FapValue + uintptr(i)*8)) == uintptr(0) {
+ return libc.AssignPtrInt32(p+100 /* &.rc */, Xsqlite3CorruptError(tls, 209935))
+ }
+ *(*uintptr)(unsafe.Pointer((*Sqlite3_changeset_iter)(unsafe.Pointer(p)).FapValue + uintptr((i+(*Sqlite3_changeset_iter)(unsafe.Pointer(p)).FnCol))*8)) = uintptr(0)
+ }
+ }
+ } else if (*Sqlite3_changeset_iter)(unsafe.Pointer(p)).FbInvert != 0 {
+ if (*Sqlite3_changeset_iter)(unsafe.Pointer(p)).Fop == SQLITE_INSERT {
+ (*Sqlite3_changeset_iter)(unsafe.Pointer(p)).Fop = SQLITE_DELETE
+ } else if (*Sqlite3_changeset_iter)(unsafe.Pointer(p)).Fop == SQLITE_DELETE {
+ (*Sqlite3_changeset_iter)(unsafe.Pointer(p)).Fop = SQLITE_INSERT
+ }
+ }
+ }
+
+ return SQLITE_ROW
+}
+
+// Advance the changeset iterator to the next change.
+//
+// If both paRec and pnRec are NULL, then this function works like the public
+// API sqlite3changeset_next(). If SQLITE_ROW is returned, then the
+// sqlite3changeset_new() and old() APIs may be used to query for values.
+//
+// Otherwise, if paRec and pnRec are not NULL, then a pointer to the change
+// record is written to *paRec before returning and the number of bytes in
+// the record to *pnRec.
+//
+// Either way, this function returns SQLITE_ROW if the iterator is
+// successfully advanced to the next change in the changeset, an SQLite
+// error code if an error occurs, or SQLITE_DONE if there are no further
+// changes in the changeset.
+func sessionChangesetNext(tls *libc.TLS, p uintptr, paRec uintptr, pnRec uintptr, pbNew uintptr) int32 { /* sqlite3.c:209964:12: */
+ bp := tls.Alloc(4)
+ defer tls.Free(4)
+
+ // var bEmpty int32 at bp, 4
+
+ var rc int32
+ for ok := true; ok; ok = (((rc == SQLITE_ROW) && ((*Sqlite3_changeset_iter)(unsafe.Pointer(p)).FbSkipEmpty != 0)) && (*(*int32)(unsafe.Pointer(bp /* bEmpty */)) != 0)) {
+ *(*int32)(unsafe.Pointer(bp /* bEmpty */)) = 0
+ rc = sessionChangesetNextOne(tls, p, paRec, pnRec, pbNew, bp /* &bEmpty */)
+ }
+ return rc
+}
+
+// Advance an iterator created by sqlite3changeset_start() to the next
+// change in the changeset. This function may return SQLITE_ROW, SQLITE_DONE
+// or SQLITE_CORRUPT.
+//
+// This function may not be called on iterators passed to a conflict handler
+// callback by changeset_apply().
+func Xsqlite3changeset_next(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:209987:16: */
+ return sessionChangesetNext(tls, p, uintptr(0), uintptr(0), uintptr(0))
+}
+
+// The following function extracts information on the current change
+// from a changeset iterator. It may only be called after changeset_next()
+// has returned SQLITE_ROW.
+func Xsqlite3changeset_op(tls *libc.TLS, pIter uintptr, pzTab uintptr, pnCol uintptr, pOp uintptr, pbIndirect uintptr) int32 { /* sqlite3.c:209996:16: */
+ *(*int32)(unsafe.Pointer(pOp)) = (*Sqlite3_changeset_iter)(unsafe.Pointer(pIter)).Fop
+ *(*int32)(unsafe.Pointer(pnCol)) = (*Sqlite3_changeset_iter)(unsafe.Pointer(pIter)).FnCol
+ *(*uintptr)(unsafe.Pointer(pzTab)) = (*Sqlite3_changeset_iter)(unsafe.Pointer(pIter)).FzTab
+ if pbIndirect != 0 {
+ *(*int32)(unsafe.Pointer(pbIndirect)) = (*Sqlite3_changeset_iter)(unsafe.Pointer(pIter)).FbIndirect
+ }
+ return SQLITE_OK
+}
+
+// Return information regarding the PRIMARY KEY and number of columns in
+// the database table affected by the change that pIter currently points
+// to. This function may only be called after changeset_next() returns
+// SQLITE_ROW.
+func Xsqlite3changeset_pk(tls *libc.TLS, pIter uintptr, pabPK uintptr, pnCol uintptr) int32 { /* sqlite3.c:210016:16: */
+ *(*uintptr)(unsafe.Pointer(pabPK)) = (*Sqlite3_changeset_iter)(unsafe.Pointer(pIter)).FabPK
+ if pnCol != 0 {
+ *(*int32)(unsafe.Pointer(pnCol)) = (*Sqlite3_changeset_iter)(unsafe.Pointer(pIter)).FnCol
+ }
+ return SQLITE_OK
+}
+
+// This function may only be called while the iterator is pointing to an
+// SQLITE_UPDATE or SQLITE_DELETE change (see sqlite3changeset_op()).
+// Otherwise, SQLITE_MISUSE is returned.
+//
+// It sets *ppValue to point to an sqlite3_value structure containing the
+// iVal'th value in the old.* record. Or, if that particular value is not
+// included in the record (because the change is an UPDATE and the field
+// was not modified and is not a PK column), set *ppValue to NULL.
+//
+// If value iVal is out-of-range, SQLITE_RANGE is returned and *ppValue is
+// not modified. Otherwise, SQLITE_OK.
+func Xsqlite3changeset_old(tls *libc.TLS, pIter uintptr, iVal int32, ppValue uintptr) int32 { /* sqlite3.c:210039:16: */
+ if ((*Sqlite3_changeset_iter)(unsafe.Pointer(pIter)).Fop != SQLITE_UPDATE) && ((*Sqlite3_changeset_iter)(unsafe.Pointer(pIter)).Fop != SQLITE_DELETE) {
+ return SQLITE_MISUSE
+ }
+ if (iVal < 0) || (iVal >= (*Sqlite3_changeset_iter)(unsafe.Pointer(pIter)).FnCol) {
+ return SQLITE_RANGE
+ }
+ *(*uintptr)(unsafe.Pointer(ppValue)) = *(*uintptr)(unsafe.Pointer((*Sqlite3_changeset_iter)(unsafe.Pointer(pIter)).FapValue + uintptr(iVal)*8))
+ return SQLITE_OK
+}
+
+// This function may only be called while the iterator is pointing to an
+// SQLITE_UPDATE or SQLITE_INSERT change (see sqlite3changeset_op()).
+// Otherwise, SQLITE_MISUSE is returned.
+//
+// It sets *ppValue to point to an sqlite3_value structure containing the
+// iVal'th value in the new.* record. Or, if that particular value is not
+// included in the record (because the change is an UPDATE and the field
+// was not modified), set *ppValue to NULL.
+//
+// If value iVal is out-of-range, SQLITE_RANGE is returned and *ppValue is
+// not modified. Otherwise, SQLITE_OK.
+func Xsqlite3changeset_new(tls *libc.TLS, pIter uintptr, iVal int32, ppValue uintptr) int32 { /* sqlite3.c:210067:16: */
+ if ((*Sqlite3_changeset_iter)(unsafe.Pointer(pIter)).Fop != SQLITE_UPDATE) && ((*Sqlite3_changeset_iter)(unsafe.Pointer(pIter)).Fop != SQLITE_INSERT) {
+ return SQLITE_MISUSE
+ }
+ if (iVal < 0) || (iVal >= (*Sqlite3_changeset_iter)(unsafe.Pointer(pIter)).FnCol) {
+ return SQLITE_RANGE
+ }
+ *(*uintptr)(unsafe.Pointer(ppValue)) = *(*uintptr)(unsafe.Pointer((*Sqlite3_changeset_iter)(unsafe.Pointer(pIter)).FapValue + uintptr(((*Sqlite3_changeset_iter)(unsafe.Pointer(pIter)).FnCol+iVal))*8))
+ return SQLITE_OK
+}
+
+// The following two macros are used internally. They are similar to the
+// sqlite3changeset_new() and sqlite3changeset_old() functions, except that
+// they omit all error checking and return a pointer to the requested value.
+
+// This function may only be called with a changeset iterator that has been
+// passed to an SQLITE_CHANGESET_DATA or SQLITE_CHANGESET_CONFLICT
+// conflict-handler function. Otherwise, SQLITE_MISUSE is returned.
+//
+// If successful, *ppValue is set to point to an sqlite3_value structure
+// containing the iVal'th value of the conflicting record.
+//
+// If value iVal is out-of-range or some other error occurs, an SQLite error
+// code is returned. Otherwise, SQLITE_OK.
+func Xsqlite3changeset_conflict(tls *libc.TLS, pIter uintptr, iVal int32, ppValue uintptr) int32 { /* sqlite3.c:210101:16: */
+ if !(int32((*Sqlite3_changeset_iter)(unsafe.Pointer(pIter)).FpConflict) != 0) {
+ return SQLITE_MISUSE
+ }
+ if (iVal < 0) || (iVal >= (*Sqlite3_changeset_iter)(unsafe.Pointer(pIter)).FnCol) {
+ return SQLITE_RANGE
+ }
+ *(*uintptr)(unsafe.Pointer(ppValue)) = Xsqlite3_column_value(tls, (*Sqlite3_changeset_iter)(unsafe.Pointer(pIter)).FpConflict, iVal)
+ return SQLITE_OK
+}
+
+// This function may only be called with an iterator passed to an
+// SQLITE_CHANGESET_FOREIGN_KEY conflict handler callback. In this case
+// it sets the output variable to the total number of known foreign key
+// violations in the destination database and returns SQLITE_OK.
+//
+// In all other cases this function returns SQLITE_MISUSE.
+func Xsqlite3changeset_fk_conflicts(tls *libc.TLS, pIter uintptr, pnOut uintptr) int32 { /* sqlite3.c:210124:16: */
+ if ((*Sqlite3_changeset_iter)(unsafe.Pointer(pIter)).FpConflict != 0) || ((*Sqlite3_changeset_iter)(unsafe.Pointer(pIter)).FapValue != 0) {
+ return SQLITE_MISUSE
+ }
+ *(*int32)(unsafe.Pointer(pnOut)) = (*Sqlite3_changeset_iter)(unsafe.Pointer(pIter)).FnCol
+ return SQLITE_OK
+}
+
+// Finalize an iterator allocated with sqlite3changeset_start().
+//
+// This function may not be called on iterators passed to a conflict handler
+// callback by changeset_apply().
+func Xsqlite3changeset_finalize(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:210142:16: */
+ var rc int32 = SQLITE_OK
+ if p != 0 {
+ var i int32 // Used to iterate through p->apValue[]
+ rc = (*Sqlite3_changeset_iter)(unsafe.Pointer(p)).Frc
+ if (*Sqlite3_changeset_iter)(unsafe.Pointer(p)).FapValue != 0 {
+ for i = 0; i < ((*Sqlite3_changeset_iter)(unsafe.Pointer(p)).FnCol * 2); i++ {
+ Xsqlite3ValueFree(tls, *(*uintptr)(unsafe.Pointer((*Sqlite3_changeset_iter)(unsafe.Pointer(p)).FapValue + uintptr(i)*8)))
+ }
+ }
+ Xsqlite3_free(tls, (*Sqlite3_changeset_iter)(unsafe.Pointer(p)).Ftblhdr.FaBuf)
+ Xsqlite3_free(tls, (*Sqlite3_changeset_iter)(unsafe.Pointer(p)).Fin.Fbuf.FaBuf)
+ Xsqlite3_free(tls, p)
+ }
+ return rc
+}
+
+func sessionChangesetInvert(tls *libc.TLS, pInput uintptr, xOutput uintptr, pOut uintptr, pnInverted uintptr, ppInverted uintptr) int32 { /* sqlite3.c:210157:12: */
+ bp := tls.Alloc(48)
+ defer tls.Free(48)
+
+ // var rc int32 at bp+40, 4
+ // Return value
+ // var sOut SessionBuffer at bp, 16
+ // Output buffer
+ // var nCol int32 at bp+20, 4
+ // Number of cols in current table
+ var abPK uintptr // PK array for current table
+ var apVal uintptr // Space for values for UPDATE inversion
+ // var sPK SessionBuffer at bp+24, 16
+
+ // A 'table' record consists of:
+ //
+ // * A constant 'T' character,
+ // * Number of columns in said table (a varint),
+ // * An array of nCol bytes (sPK),
+ // * A nul-terminated table name.
+ // var nByte int32 at bp+16, 4
+
+ var nVar int32
+ // var nByte1 int32 at bp+44, 4
+
+ var bIndirect int32
+ var eType2 int32
+ var pVal uintptr
+ var pVal1 uintptr
+ var iCol int32
+ var eType U8
+ *(*int32)(unsafe.Pointer(bp + 40 /* rc */)) = SQLITE_OK
+ *(*int32)(unsafe.Pointer(bp + 20 /* nCol */)) = 0
+ abPK = uintptr(0)
+ apVal = uintptr(0)
+ *(*SessionBuffer)(unsafe.Pointer(bp + 24 /* sPK */)) = SessionBuffer{} // PK array for current table
+
+ // Initialize the output buffer
+ libc.Xmemset(tls, bp /* &sOut */, 0, uint64(unsafe.Sizeof(SessionBuffer{})))
+
+ // Zero the output variables in case an error occurs.
+ if !(ppInverted != 0) {
+ goto __1
+ }
+ *(*uintptr)(unsafe.Pointer(ppInverted)) = uintptr(0)
+ *(*int32)(unsafe.Pointer(pnInverted)) = 0
+__1:
+ ;
+
+__2:
+ if !(1 != 0) {
+ goto __3
+ }
+
+ // Test for EOF.
+ if !(libc.AssignPtrInt32(bp+40 /* rc */, sessionInputBuffer(tls, pInput, 2)) != 0) {
+ goto __4
+ }
+ goto finished_invert
+__4:
+ ;
+ if !((*SessionInput)(unsafe.Pointer(pInput)).FiNext >= (*SessionInput)(unsafe.Pointer(pInput)).FnData) {
+ goto __5
+ }
+ goto __3
+__5:
+ ;
+ eType = *(*U8)(unsafe.Pointer((*SessionInput)(unsafe.Pointer(pInput)).FaData + uintptr((*SessionInput)(unsafe.Pointer(pInput)).FiNext)))
+
+ switch int32(eType) {
+ case 'T':
+ goto __7
+
+ case SQLITE_INSERT:
+ goto __8
+ case SQLITE_DELETE:
+ goto __9
+
+ case SQLITE_UPDATE:
+ goto __10
+
+ default:
+ goto __11
+ }
+ goto __6
+__7:
+ (*SessionInput)(unsafe.Pointer(pInput)).FiNext++
+ if !(libc.AssignPtrInt32(bp+40 /* rc */, sessionChangesetBufferTblhdr(tls, pInput, bp+16 /* &nByte */)) != 0) {
+ goto __12
+ }
+ goto finished_invert
+__12:
+ ;
+ nVar = sessionVarintGet(tls, ((*SessionInput)(unsafe.Pointer(pInput)).FaData + uintptr((*SessionInput)(unsafe.Pointer(pInput)).FiNext)), bp+20 /* &nCol */)
+ (*SessionBuffer)(unsafe.Pointer(bp + 24 /* &sPK */)).FnBuf = 0
+ sessionAppendBlob(tls, bp+24 /* &sPK */, ((*SessionInput)(unsafe.Pointer(pInput)).FaData + uintptr(((*SessionInput)(unsafe.Pointer(pInput)).FiNext + nVar))), *(*int32)(unsafe.Pointer(bp + 20 /* nCol */)), bp+40 /* &rc */)
+ sessionAppendByte(tls, bp /* &sOut */, eType, bp+40 /* &rc */)
+ sessionAppendBlob(tls, bp /* &sOut */, ((*SessionInput)(unsafe.Pointer(pInput)).FaData + uintptr((*SessionInput)(unsafe.Pointer(pInput)).FiNext)), *(*int32)(unsafe.Pointer(bp + 16 /* nByte */)), bp+40 /* &rc */)
+ if !(*(*int32)(unsafe.Pointer(bp + 40 /* rc */)) != 0) {
+ goto __13
+ }
+ goto finished_invert
+__13:
+ ;
+
+ *(*int32)(unsafe.Pointer(pInput + 8 /* &.iNext */)) += (*(*int32)(unsafe.Pointer(bp + 16 /* nByte */)))
+ Xsqlite3_free(tls, apVal)
+ apVal = uintptr(0)
+ abPK = (*SessionBuffer)(unsafe.Pointer(bp + 24 /* &sPK */)).FaBuf
+ goto __6
+
+__8:
+__9:
+ bIndirect = int32(*(*U8)(unsafe.Pointer((*SessionInput)(unsafe.Pointer(pInput)).FaData + uintptr(((*SessionInput)(unsafe.Pointer(pInput)).FiNext + 1)))))
+ eType2 = func() int32 {
+ if int32(eType) == SQLITE_DELETE {
+ return SQLITE_INSERT
+ }
+ return SQLITE_DELETE
+ }()
+ *(*int32)(unsafe.Pointer(pInput + 8 /* &.iNext */)) += (2)
+
+ *(*int32)(unsafe.Pointer(bp + 40 /* rc */)) = sessionChangesetBufferRecord(tls, pInput, *(*int32)(unsafe.Pointer(bp + 20 /* nCol */)), bp+44 /* &nByte1 */)
+ sessionAppendByte(tls, bp /* &sOut */, uint8(eType2), bp+40 /* &rc */)
+ sessionAppendByte(tls, bp /* &sOut */, uint8(bIndirect), bp+40 /* &rc */)
+ sessionAppendBlob(tls, bp /* &sOut */, ((*SessionInput)(unsafe.Pointer(pInput)).FaData + uintptr((*SessionInput)(unsafe.Pointer(pInput)).FiNext)), *(*int32)(unsafe.Pointer(bp + 44 /* nByte1 */)), bp+40 /* &rc */)
+ *(*int32)(unsafe.Pointer(pInput + 8 /* &.iNext */)) += (*(*int32)(unsafe.Pointer(bp + 44 /* nByte1 */)))
+ if !(*(*int32)(unsafe.Pointer(bp + 40 /* rc */)) != 0) {
+ goto __14
+ }
+ goto finished_invert
+__14:
+ ;
+ goto __6
+
+__10:
+
+ if !(uintptr(0) == apVal) {
+ goto __15
+ }
+ apVal = Xsqlite3_malloc64(tls, (uint64((uint64(unsafe.Sizeof(uintptr(0))) * uint64(*(*int32)(unsafe.Pointer(bp + 20 /* nCol */)))) * uint64(2))))
+ if !(uintptr(0) == apVal) {
+ goto __16
+ }
+ *(*int32)(unsafe.Pointer(bp + 40 /* rc */)) = SQLITE_NOMEM
+ goto finished_invert
+__16:
+ ;
+ libc.Xmemset(tls, apVal, 0, ((uint64(unsafe.Sizeof(uintptr(0))) * uint64(*(*int32)(unsafe.Pointer(bp + 20 /* nCol */)))) * uint64(2)))
+__15:
+ ;
+
+ // Write the header for the new UPDATE change. Same as the original.
+ sessionAppendByte(tls, bp /* &sOut */, eType, bp+40 /* &rc */)
+ sessionAppendByte(tls, bp /* &sOut */, *(*U8)(unsafe.Pointer((*SessionInput)(unsafe.Pointer(pInput)).FaData + uintptr(((*SessionInput)(unsafe.Pointer(pInput)).FiNext + 1)))), bp+40 /* &rc */)
+
+ // Read the old.* and new.* records for the update change.
+ *(*int32)(unsafe.Pointer(pInput + 8 /* &.iNext */)) += (2)
+ *(*int32)(unsafe.Pointer(bp + 40 /* rc */)) = sessionReadRecord(tls, pInput, *(*int32)(unsafe.Pointer(bp + 20 /* nCol */)), uintptr(0), (apVal), uintptr(0))
+ if !(*(*int32)(unsafe.Pointer(bp + 40 /* rc */)) == SQLITE_OK) {
+ goto __17
+ }
+ *(*int32)(unsafe.Pointer(bp + 40 /* rc */)) = sessionReadRecord(tls, pInput, *(*int32)(unsafe.Pointer(bp + 20 /* nCol */)), uintptr(0), (apVal + uintptr(*(*int32)(unsafe.Pointer(bp + 20 /* nCol */)))*8), uintptr(0))
+__17:
+ ;
+
+ // Write the new old.* record. Consists of the PK columns from the
+ // original old.* record, and the other values from the original
+ // new.* record.
+ iCol = 0
+__18:
+ if !(iCol < *(*int32)(unsafe.Pointer(bp + 20 /* nCol */))) {
+ goto __20
+ }
+ pVal = *(*uintptr)(unsafe.Pointer(apVal + uintptr((iCol+(func() int32 {
+ if *(*U8)(unsafe.Pointer(abPK + uintptr(iCol))) != 0 {
+ return 0
+ }
+ return *(*int32)(unsafe.Pointer(bp + 20 /* nCol */))
+ }())))*8))
+ sessionAppendValue(tls, bp /* &sOut */, pVal, bp+40 /* &rc */)
+ goto __19
+__19:
+ iCol++
+ goto __18
+ goto __20
+__20:
+ ;
+
+ // Write the new new.* record. Consists of a copy of all values
+ // from the original old.* record, except for the PK columns, which
+ // are set to "undefined".
+ iCol = 0
+__21:
+ if !(iCol < *(*int32)(unsafe.Pointer(bp + 20 /* nCol */))) {
+ goto __23
+ }
+ pVal1 = func() uintptr {
+ if *(*U8)(unsafe.Pointer(abPK + uintptr(iCol))) != 0 {
+ return uintptr(0)
+ }
+ return *(*uintptr)(unsafe.Pointer(apVal + uintptr(iCol)*8))
+ }()
+ sessionAppendValue(tls, bp /* &sOut */, pVal1, bp+40 /* &rc */)
+ goto __22
+__22:
+ iCol++
+ goto __21
+ goto __23
+__23:
+ ;
+
+ iCol = 0
+__24:
+ if !(iCol < (*(*int32)(unsafe.Pointer(bp + 20 /* nCol */)) * 2)) {
+ goto __26
+ }
+ Xsqlite3ValueFree(tls, *(*uintptr)(unsafe.Pointer(apVal + uintptr(iCol)*8)))
+ goto __25
+__25:
+ iCol++
+ goto __24
+ goto __26
+__26:
+ ;
+ libc.Xmemset(tls, apVal, 0, ((uint64(unsafe.Sizeof(uintptr(0))) * uint64(*(*int32)(unsafe.Pointer(bp + 20 /* nCol */)))) * uint64(2)))
+ if !(*(*int32)(unsafe.Pointer(bp + 40 /* rc */)) != SQLITE_OK) {
+ goto __27
+ }
+ goto finished_invert
+__27:
+ ;
+
+ goto __6
+
+__11:
+ *(*int32)(unsafe.Pointer(bp + 40 /* rc */)) = Xsqlite3CorruptError(tls, 210284)
+ goto finished_invert
+__6:
+ ;
+
+ if !((xOutput != 0) && ((*SessionBuffer)(unsafe.Pointer(bp /* &sOut */)).FnBuf >= sessions_strm_chunk_size)) {
+ goto __28
+ }
+ *(*int32)(unsafe.Pointer(bp + 40 /* rc */)) = (*struct {
+ f func(*libc.TLS, uintptr, uintptr, int32) int32
+ })(unsafe.Pointer(&struct{ uintptr }{xOutput})).f(tls, pOut, (*SessionBuffer)(unsafe.Pointer(bp /* &sOut */)).FaBuf, (*SessionBuffer)(unsafe.Pointer(bp /* &sOut */)).FnBuf)
+ (*SessionBuffer)(unsafe.Pointer(bp /* &sOut */)).FnBuf = 0
+ if !(*(*int32)(unsafe.Pointer(bp + 40 /* rc */)) != SQLITE_OK) {
+ goto __29
+ }
+ goto finished_invert
+__29:
+ ;
+__28:
+ ;
+ goto __2
+__3:
+ ;
+
+ if !(pnInverted != 0) {
+ goto __30
+ }
+ *(*int32)(unsafe.Pointer(pnInverted)) = (*SessionBuffer)(unsafe.Pointer(bp /* &sOut */)).FnBuf
+ *(*uintptr)(unsafe.Pointer(ppInverted)) = (*SessionBuffer)(unsafe.Pointer(bp /* &sOut */)).FaBuf
+ (*SessionBuffer)(unsafe.Pointer(bp /* &sOut */)).FaBuf = uintptr(0)
+ goto __31
+__30:
+ if !((*SessionBuffer)(unsafe.Pointer(bp /* &sOut */)).FnBuf > 0) {
+ goto __32
+ }
+ *(*int32)(unsafe.Pointer(bp + 40 /* rc */)) = (*struct {
+ f func(*libc.TLS, uintptr, uintptr, int32) int32
+ })(unsafe.Pointer(&struct{ uintptr }{xOutput})).f(tls, pOut, (*SessionBuffer)(unsafe.Pointer(bp /* &sOut */)).FaBuf, (*SessionBuffer)(unsafe.Pointer(bp /* &sOut */)).FnBuf)
+__32:
+ ;
+__31:
+ ;
+
+finished_invert:
+ Xsqlite3_free(tls, (*SessionBuffer)(unsafe.Pointer(bp /* &sOut */)).FaBuf)
+ Xsqlite3_free(tls, apVal)
+ Xsqlite3_free(tls, (*SessionBuffer)(unsafe.Pointer(bp+24 /* &sPK */)).FaBuf)
+ return *(*int32)(unsafe.Pointer(bp + 40 /* rc */))
+}
+
+// Invert a changeset object.
+func Xsqlite3changeset_invert(tls *libc.TLS, nChangeset int32, pChangeset uintptr, pnInverted uintptr, ppInverted uintptr) int32 { /* sqlite3.c:210316:16: */
+ bp := tls.Alloc(72)
+ defer tls.Free(72)
+
+ // var sInput SessionInput at bp, 72
+
+ // Set up the input stream
+ libc.Xmemset(tls, bp /* &sInput */, 0, uint64(unsafe.Sizeof(SessionInput{})))
+ (*SessionInput)(unsafe.Pointer(bp /* &sInput */)).FnData = nChangeset
+ (*SessionInput)(unsafe.Pointer(bp /* &sInput */)).FaData = pChangeset
+
+ return sessionChangesetInvert(tls, bp /* &sInput */, uintptr(0), uintptr(0), pnInverted, ppInverted)
+}
+
+// Streaming version of sqlite3changeset_invert().
+func Xsqlite3changeset_invert_strm(tls *libc.TLS, xInput uintptr, pIn uintptr, xOutput uintptr, pOut uintptr) int32 { /* sqlite3.c:210335:16: */
+ bp := tls.Alloc(72)
+ defer tls.Free(72)
+
+ // var sInput SessionInput at bp, 72
+
+ var rc int32
+
+ // Set up the input stream
+ libc.Xmemset(tls, bp /* &sInput */, 0, uint64(unsafe.Sizeof(SessionInput{})))
+ (*SessionInput)(unsafe.Pointer(bp /* &sInput */)).FxInput = xInput
+ (*SessionInput)(unsafe.Pointer(bp /* &sInput */)).FpIn = pIn
+
+ rc = sessionChangesetInvert(tls, bp /* &sInput */, xOutput, pOut, uintptr(0), uintptr(0))
+ Xsqlite3_free(tls, (*SessionInput)(unsafe.Pointer(bp /* &sInput */)).Fbuf.FaBuf)
+ return rc
}
-// Return the device characteristic flags supported by an rbuVfs-file.
-func rbuVfsDeviceCharacteristics(tls *libc.TLS, pFile uintptr) int32 { /* sqlite3.c:203802:12: */
- var p uintptr = pFile
- return (*(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(((*Sqlite3_file)(unsafe.Pointer((*Rbu_file)(unsafe.Pointer(p)).FpReal)).FpMethods + 96 /* &.xDeviceCharacteristics */))))(tls, (*Rbu_file)(unsafe.Pointer(p)).FpReal)
-}
+type SessionUpdate1 = struct {
+ FpStmt uintptr
+ FaMask uintptr
+ FpNext uintptr
+} /* sqlite3.c:210355:9 */
+
+type SessionUpdate = SessionUpdate1 /* sqlite3.c:210355:30 */
+
+type SessionApplyCtx1 = struct {
+ Fdb uintptr
+ FpDelete uintptr
+ FpInsert uintptr
+ FpSelect uintptr
+ FnCol int32
+ F__ccgo_pad1 [4]byte
+ FazCol uintptr
+ FabPK uintptr
+ FaUpdateMask uintptr
+ FpUp uintptr
+ FbStat1 int32
+ FbDeferConstraints int32
+ FbInvertConstraints int32
+ F__ccgo_pad2 [4]byte
+ Fconstraints SessionBuffer
+ Frebase SessionBuffer
+ FbRebaseStarted U8
+ FbRebase U8
+ F__ccgo_pad3 [6]byte
+} /* sqlite3.c:210362:9 */
+
+type SessionApplyCtx = SessionApplyCtx1 /* sqlite3.c:210362:32 */
+
+// Number of prepared UPDATE statements to cache.
+
+// Find a prepared UPDATE statement suitable for the UPDATE step currently
+// being visited by the iterator. The UPDATE is of the form:
+//
+// UPDATE tbl SET col = ?, col2 = ? WHERE pk1 IS ? AND pk2 IS ?
+func sessionUpdateFind(tls *libc.TLS, pIter uintptr, p uintptr, bPatchset int32, ppStmt uintptr) int32 { /* sqlite3.c:210391:12: */
+ bp := tls.Alloc(20)
+ defer tls.Free(20)
+
+ *(*int32)(unsafe.Pointer(bp + 16 /* rc */)) = SQLITE_OK
+ var pUp uintptr = uintptr(0)
+ var nCol int32 = (*Sqlite3_changeset_iter)(unsafe.Pointer(pIter)).FnCol
+ var nU32 int32 = (((*Sqlite3_changeset_iter)(unsafe.Pointer(pIter)).FnCol + 33) / 32)
+ var ii int32
+
+ if (*SessionApplyCtx)(unsafe.Pointer(p)).FaUpdateMask == uintptr(0) {
+ (*SessionApplyCtx)(unsafe.Pointer(p)).FaUpdateMask = Xsqlite3_malloc(tls, (int32(uint64(nU32) * uint64(unsafe.Sizeof(U32(0))))))
+ if (*SessionApplyCtx)(unsafe.Pointer(p)).FaUpdateMask == uintptr(0) {
+ *(*int32)(unsafe.Pointer(bp + 16 /* rc */)) = SQLITE_NOMEM
+ }
+ }
-// Take or release a shared-memory lock.
-func rbuVfsShmLock(tls *libc.TLS, pFile uintptr, ofst int32, n int32, flags int32) int32 { /* sqlite3.c:203810:12: */
- var p uintptr = pFile
- var pRbu uintptr = (*Rbu_file)(unsafe.Pointer(p)).FpRbu
- var rc int32 = SQLITE_OK
+ if *(*int32)(unsafe.Pointer(bp + 16 /* rc */)) == SQLITE_OK {
+ libc.Xmemset(tls, (*SessionApplyCtx)(unsafe.Pointer(p)).FaUpdateMask, 0, (uint64(nU32) * uint64(unsafe.Sizeof(U32(0)))))
+ *(*int32)(unsafe.Pointer(bp + 16 /* rc */)) = SQLITE_CORRUPT
+ for ii = 0; ii < (*Sqlite3_changeset_iter)(unsafe.Pointer(pIter)).FnCol; ii++ {
+ if *(*uintptr)(unsafe.Pointer((*Sqlite3_changeset_iter)(unsafe.Pointer((pIter))).FapValue + uintptr(((*Sqlite3_changeset_iter)(unsafe.Pointer((pIter))).FnCol+(ii)))*8)) != 0 {
+ *(*U32)(unsafe.Pointer((*SessionApplyCtx)(unsafe.Pointer(p)).FaUpdateMask + uintptr((ii/32))*4)) |= (U32(int32(1) << (ii % 32)))
+ *(*int32)(unsafe.Pointer(bp + 16 /* rc */)) = SQLITE_OK
+ }
+ }
+ }
- if (pRbu != 0) && ((((*Sqlite3rbu)(unsafe.Pointer(pRbu)).FeStage == RBU_STAGE_OAL) ||
- ((*Sqlite3rbu)(unsafe.Pointer(pRbu)).FeStage == RBU_STAGE_MOVE)) ||
- ((*Sqlite3rbu)(unsafe.Pointer(pRbu)).FeStage == RBU_STAGE_DONE)) {
- // Prevent SQLite from taking a shm-lock on the target file when it
- // is supplying heap memory to the upper layer in place of *-shm
- // segments.
- if (ofst == WAL_LOCK_CKPT) && (n == 1) {
- rc = SQLITE_BUSY
+ if *(*int32)(unsafe.Pointer(bp + 16 /* rc */)) == SQLITE_OK {
+ if bPatchset != 0 {
+ *(*U32)(unsafe.Pointer((*SessionApplyCtx)(unsafe.Pointer(p)).FaUpdateMask + uintptr((nCol/32))*4)) |= (U32(int32(1) << (nCol % 32)))
+ }
+
+ if (*SessionApplyCtx)(unsafe.Pointer(p)).FpUp != 0 {
+ var nUp int32 = 0
+ var pp uintptr = (p + 64 /* &.pUp */)
+ for 1 != 0 {
+ nUp++
+ if 0 == libc.Xmemcmp(tls, (*SessionApplyCtx)(unsafe.Pointer(p)).FaUpdateMask, (*SessionUpdate)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(pp)))).FaMask, (uint64(nU32)*uint64(unsafe.Sizeof(U32(0))))) {
+ pUp = *(*uintptr)(unsafe.Pointer(pp))
+ *(*uintptr)(unsafe.Pointer(pp)) = (*SessionUpdate)(unsafe.Pointer(pUp)).FpNext
+ (*SessionUpdate)(unsafe.Pointer(pUp)).FpNext = (*SessionApplyCtx)(unsafe.Pointer(p)).FpUp
+ (*SessionApplyCtx)(unsafe.Pointer(p)).FpUp = pUp
+ break
+ }
+
+ if (*SessionUpdate)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(pp)))).FpNext != 0 {
+ pp = (*(*uintptr)(unsafe.Pointer(pp)) + 16 /* &.pNext */)
+ } else {
+ if nUp >= SESSION_UPDATE_CACHE_SZ {
+ Xsqlite3_finalize(tls, (*SessionUpdate)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(pp)))).FpStmt)
+ Xsqlite3_free(tls, *(*uintptr)(unsafe.Pointer(pp)))
+ *(*uintptr)(unsafe.Pointer(pp)) = uintptr(0)
+ }
+ break
+ }
+ }
+ }
+
+ if pUp == uintptr(0) {
+ var nByte int32 = (int32((uint64(unsafe.Sizeof(SessionUpdate{})) * uint64(nU32)) * uint64(unsafe.Sizeof(U32(0)))))
+ var bStat1 int32 = (libc.Bool32(Xsqlite3_stricmp(tls, (*Sqlite3_changeset_iter)(unsafe.Pointer(pIter)).FzTab, ts+10072 /* "sqlite_stat1" */) == 0))
+ pUp = Xsqlite3_malloc(tls, nByte)
+ if pUp == uintptr(0) {
+ *(*int32)(unsafe.Pointer(bp + 16 /* rc */)) = SQLITE_NOMEM
+ } else {
+ var zSep uintptr = ts + 755 /* "" */
+ // var buf SessionBuffer at bp, 16
+
+ libc.Xmemset(tls, bp /* &buf */, 0, uint64(unsafe.Sizeof(SessionBuffer{})))
+ (*SessionUpdate)(unsafe.Pointer(pUp)).FaMask = (pUp + 1*24)
+ libc.Xmemcpy(tls, (*SessionUpdate)(unsafe.Pointer(pUp)).FaMask, (*SessionApplyCtx)(unsafe.Pointer(p)).FaUpdateMask, (uint64(nU32) * uint64(unsafe.Sizeof(U32(0)))))
+
+ sessionAppendStr(tls, bp /* &buf */, ts+31109 /* "UPDATE main." */, bp+16 /* &rc */)
+ sessionAppendIdent(tls, bp /* &buf */, (*Sqlite3_changeset_iter)(unsafe.Pointer(pIter)).FzTab, bp+16 /* &rc */)
+ sessionAppendStr(tls, bp /* &buf */, ts+31122 /* " SET " */, bp+16 /* &rc */)
+
+ // Create the assignments part of the UPDATE
+ for ii = 0; ii < (*Sqlite3_changeset_iter)(unsafe.Pointer(pIter)).FnCol; ii++ {
+ if (int32(*(*U8)(unsafe.Pointer((*SessionApplyCtx)(unsafe.Pointer(p)).FabPK + uintptr(ii)))) == 0) && (*(*uintptr)(unsafe.Pointer((*Sqlite3_changeset_iter)(unsafe.Pointer((pIter))).FapValue + uintptr(((*Sqlite3_changeset_iter)(unsafe.Pointer((pIter))).FnCol+(ii)))*8)) != 0) {
+ sessionAppendStr(tls, bp /* &buf */, zSep, bp+16 /* &rc */)
+ sessionAppendIdent(tls, bp /* &buf */, *(*uintptr)(unsafe.Pointer((*SessionApplyCtx)(unsafe.Pointer(p)).FazCol + uintptr(ii)*8)), bp+16 /* &rc */)
+ sessionAppendStr(tls, bp /* &buf */, ts+31128 /* " = ?" */, bp+16 /* &rc */)
+ sessionAppendInteger(tls, bp /* &buf */, ((ii * 2) + 1), bp+16 /* &rc */)
+ zSep = ts + 13324 /* ", " */
+ }
+ }
+
+ // Create the WHERE clause part of the UPDATE
+ zSep = ts + 755 /* "" */
+ sessionAppendStr(tls, bp /* &buf */, ts+31057 /* " WHERE " */, bp+16 /* &rc */)
+ for ii = 0; ii < (*Sqlite3_changeset_iter)(unsafe.Pointer(pIter)).FnCol; ii++ {
+ if (*(*U8)(unsafe.Pointer((*SessionApplyCtx)(unsafe.Pointer(p)).FabPK + uintptr(ii))) != 0) || ((bPatchset == 0) && (*(*uintptr)(unsafe.Pointer((*Sqlite3_changeset_iter)(unsafe.Pointer((pIter))).FapValue + uintptr(ii)*8)) != 0)) {
+ sessionAppendStr(tls, bp /* &buf */, zSep, bp+16 /* &rc */)
+ if (bStat1 != 0) && (ii == 1) {
+
+ sessionAppendStr(tls, bp, /* &buf */
+
+ ts+31133 /* "idx IS CASE WHEN..." */, bp+16 /* &rc */)
+ } else {
+ sessionAppendIdent(tls, bp /* &buf */, *(*uintptr)(unsafe.Pointer((*SessionApplyCtx)(unsafe.Pointer(p)).FazCol + uintptr(ii)*8)), bp+16 /* &rc */)
+ sessionAppendStr(tls, bp /* &buf */, ts+31065 /* " IS ?" */, bp+16 /* &rc */)
+ sessionAppendInteger(tls, bp /* &buf */, ((ii * 2) + 2), bp+16 /* &rc */)
+ }
+ zSep = ts + 19877 /* " AND " */
+ }
+ }
+
+ if *(*int32)(unsafe.Pointer(bp + 16 /* rc */)) == SQLITE_OK {
+ var zSql uintptr = (*SessionBuffer)(unsafe.Pointer(bp /* &buf */)).FaBuf
+ *(*int32)(unsafe.Pointer(bp + 16 /* rc */)) = Xsqlite3_prepare_v2(tls, (*SessionApplyCtx)(unsafe.Pointer(p)).Fdb, zSql, (*SessionBuffer)(unsafe.Pointer(bp /* &buf */)).FnBuf, (pUp /* &.pStmt */), uintptr(0))
+ }
+
+ if *(*int32)(unsafe.Pointer(bp + 16 /* rc */)) != SQLITE_OK {
+ Xsqlite3_free(tls, pUp)
+ pUp = uintptr(0)
+ } else {
+ (*SessionUpdate)(unsafe.Pointer(pUp)).FpNext = (*SessionApplyCtx)(unsafe.Pointer(p)).FpUp
+ (*SessionApplyCtx)(unsafe.Pointer(p)).FpUp = pUp
+ }
+ Xsqlite3_free(tls, (*SessionBuffer)(unsafe.Pointer(bp /* &buf */)).FaBuf)
+ }
}
+ }
+
+ if pUp != 0 {
+ *(*uintptr)(unsafe.Pointer(ppStmt)) = (*SessionUpdate)(unsafe.Pointer(pUp)).FpStmt
} else {
- var bCapture int32 = 0
- if (pRbu != 0) && ((*Sqlite3rbu)(unsafe.Pointer(pRbu)).FeStage == RBU_STAGE_CAPTURE) {
- bCapture = 1
+ *(*uintptr)(unsafe.Pointer(ppStmt)) = uintptr(0)
+ }
+ return *(*int32)(unsafe.Pointer(bp + 16 /* rc */))
+}
+
+// Free all cached UPDATE statements.
+func sessionUpdateFree(tls *libc.TLS, p uintptr) { /* sqlite3.c:210530:13: */
+ var pUp uintptr
+ var pNext uintptr
+ for pUp = (*SessionApplyCtx)(unsafe.Pointer(p)).FpUp; pUp != 0; pUp = pNext {
+ pNext = (*SessionUpdate)(unsafe.Pointer(pUp)).FpNext
+ Xsqlite3_finalize(tls, (*SessionUpdate)(unsafe.Pointer(pUp)).FpStmt)
+ Xsqlite3_free(tls, pUp)
+ }
+ (*SessionApplyCtx)(unsafe.Pointer(p)).FpUp = uintptr(0)
+ Xsqlite3_free(tls, (*SessionApplyCtx)(unsafe.Pointer(p)).FaUpdateMask)
+ (*SessionApplyCtx)(unsafe.Pointer(p)).FaUpdateMask = uintptr(0)
+}
+
+// Formulate a statement to DELETE a row from database db. Assuming a table
+// structure like this:
+//
+// CREATE TABLE x(a, b, c, d, PRIMARY KEY(a, c));
+//
+// The DELETE statement looks like this:
+//
+// DELETE FROM x WHERE a = :1 AND c = :3 AND (:5 OR b IS :2 AND d IS :4)
+//
+// Variable :5 (nCol+1) is a boolean. It should be set to 0 if we require
+// matching b and d values, or 1 otherwise. The second case comes up if the
+// conflict handler is invoked with NOTFOUND and returns CHANGESET_REPLACE.
+//
+// If successful, SQLITE_OK is returned and SessionApplyCtx.pDelete is left
+// pointing to the prepared version of the SQL statement.
+func sessionDeleteRow(tls *libc.TLS, db uintptr, zTab uintptr, p uintptr) int32 { /* sqlite3.c:210560:12: */
+ bp := tls.Alloc(20)
+ defer tls.Free(20)
+
+ var i int32
+ var zSep uintptr = ts + 755 /* "" */
+ *(*int32)(unsafe.Pointer(bp + 16 /* rc */)) = SQLITE_OK
+ *(*SessionBuffer)(unsafe.Pointer(bp /* buf */)) = SessionBuffer{}
+ var nPk int32 = 0
+
+ sessionAppendStr(tls, bp /* &buf */, ts+31208 /* "DELETE FROM main..." */, bp+16 /* &rc */)
+ sessionAppendIdent(tls, bp /* &buf */, zTab, bp+16 /* &rc */)
+ sessionAppendStr(tls, bp /* &buf */, ts+31057 /* " WHERE " */, bp+16 /* &rc */)
+
+ for i = 0; i < (*SessionApplyCtx)(unsafe.Pointer(p)).FnCol; i++ {
+ if *(*U8)(unsafe.Pointer((*SessionApplyCtx)(unsafe.Pointer(p)).FabPK + uintptr(i))) != 0 {
+ nPk++
+ sessionAppendStr(tls, bp /* &buf */, zSep, bp+16 /* &rc */)
+ sessionAppendIdent(tls, bp /* &buf */, *(*uintptr)(unsafe.Pointer((*SessionApplyCtx)(unsafe.Pointer(p)).FazCol + uintptr(i)*8)), bp+16 /* &rc */)
+ sessionAppendStr(tls, bp /* &buf */, ts+31128 /* " = ?" */, bp+16 /* &rc */)
+ sessionAppendInteger(tls, bp /* &buf */, (i + 1), bp+16 /* &rc */)
+ zSep = ts + 19877 /* " AND " */
}
- if (bCapture == 0) || (0 == (flags & SQLITE_SHM_UNLOCK)) {
- rc = (*(*func(*libc.TLS, uintptr, int32, int32, int32) int32)(unsafe.Pointer(((*Sqlite3_file)(unsafe.Pointer((*Rbu_file)(unsafe.Pointer(p)).FpReal)).FpMethods + 112 /* &.xShmLock */))))(tls, (*Rbu_file)(unsafe.Pointer(p)).FpReal, ofst, n, flags)
- if (bCapture != 0) && (rc == SQLITE_OK) {
- *(*U32)(unsafe.Pointer(pRbu + 316 /* &.mLock */)) |= (U32(((int32(1) << n) - 1) << ofst))
+ }
+
+ if nPk < (*SessionApplyCtx)(unsafe.Pointer(p)).FnCol {
+ sessionAppendStr(tls, bp /* &buf */, ts+31226 /* " AND (?" */, bp+16 /* &rc */)
+ sessionAppendInteger(tls, bp /* &buf */, ((*SessionApplyCtx)(unsafe.Pointer(p)).FnCol + 1), bp+16 /* &rc */)
+ sessionAppendStr(tls, bp /* &buf */, ts+30769 /* " OR " */, bp+16 /* &rc */)
+
+ zSep = ts + 755 /* "" */
+ for i = 0; i < (*SessionApplyCtx)(unsafe.Pointer(p)).FnCol; i++ {
+ if !(int32(*(*U8)(unsafe.Pointer((*SessionApplyCtx)(unsafe.Pointer(p)).FabPK + uintptr(i)))) != 0) {
+ sessionAppendStr(tls, bp /* &buf */, zSep, bp+16 /* &rc */)
+ sessionAppendIdent(tls, bp /* &buf */, *(*uintptr)(unsafe.Pointer((*SessionApplyCtx)(unsafe.Pointer(p)).FazCol + uintptr(i)*8)), bp+16 /* &rc */)
+ sessionAppendStr(tls, bp /* &buf */, ts+31065 /* " IS ?" */, bp+16 /* &rc */)
+ sessionAppendInteger(tls, bp /* &buf */, (i + 1), bp+16 /* &rc */)
+ zSep = ts + 31234 /* "AND " */
}
}
+ sessionAppendStr(tls, bp /* &buf */, ts+4066 /* ")" */, bp+16 /* &rc */)
+ }
+
+ if *(*int32)(unsafe.Pointer(bp + 16 /* rc */)) == SQLITE_OK {
+ *(*int32)(unsafe.Pointer(bp + 16 /* rc */)) = Xsqlite3_prepare_v2(tls, db, (*SessionBuffer)(unsafe.Pointer(bp /* &buf */)).FaBuf, (*SessionBuffer)(unsafe.Pointer(bp /* &buf */)).FnBuf, (p + 8 /* &.pDelete */), uintptr(0))
+ }
+ Xsqlite3_free(tls, (*SessionBuffer)(unsafe.Pointer(bp /* &buf */)).FaBuf)
+
+ return *(*int32)(unsafe.Pointer(bp + 16 /* rc */))
+}
+
+// Formulate and prepare an SQL statement to query table zTab by primary
+// key. Assuming the following table structure:
+//
+// CREATE TABLE x(a, b, c, d, PRIMARY KEY(a, c));
+//
+// The SELECT statement looks like this:
+//
+// SELECT * FROM x WHERE a = ?1 AND c = ?3
+//
+// If successful, SQLITE_OK is returned and SessionApplyCtx.pSelect is left
+// pointing to the prepared version of the SQL statement.
+func sessionSelectRow(tls *libc.TLS, db uintptr, zTab uintptr, p uintptr) int32 { /* sqlite3.c:210625:12: */
+ return sessionSelectStmt(tls,
+ db, ts+5458 /* "main" */, zTab, (*SessionApplyCtx)(unsafe.Pointer(p)).FnCol, (*SessionApplyCtx)(unsafe.Pointer(p)).FazCol, (*SessionApplyCtx)(unsafe.Pointer(p)).FabPK, (p + 24 /* &.pSelect */))
+}
+
+// Formulate and prepare an INSERT statement to add a record to table zTab.
+// For example:
+//
+// INSERT INTO main."zTab" VALUES(?1, ?2, ?3 ...);
+//
+// If successful, SQLITE_OK is returned and SessionApplyCtx.pInsert is left
+// pointing to the prepared version of the SQL statement.
+func sessionInsertRow(tls *libc.TLS, db uintptr, zTab uintptr, p uintptr) int32 { /* sqlite3.c:210643:12: */
+ bp := tls.Alloc(20)
+ defer tls.Free(20)
+
+ *(*int32)(unsafe.Pointer(bp + 16 /* rc */)) = SQLITE_OK
+ var i int32
+ *(*SessionBuffer)(unsafe.Pointer(bp /* buf */)) = SessionBuffer{}
+
+ sessionAppendStr(tls, bp /* &buf */, ts+31239 /* "INSERT INTO main..." */, bp+16 /* &rc */)
+ sessionAppendIdent(tls, bp /* &buf */, zTab, bp+16 /* &rc */)
+ sessionAppendStr(tls, bp /* &buf */, ts+19883 /* "(" */, bp+16 /* &rc */)
+ for i = 0; i < (*SessionApplyCtx)(unsafe.Pointer(p)).FnCol; i++ {
+ if i != 0 {
+ sessionAppendStr(tls, bp /* &buf */, ts+13324 /* ", " */, bp+16 /* &rc */)
+ }
+ sessionAppendIdent(tls, bp /* &buf */, *(*uintptr)(unsafe.Pointer((*SessionApplyCtx)(unsafe.Pointer(p)).FazCol + uintptr(i)*8)), bp+16 /* &rc */)
+ }
+
+ sessionAppendStr(tls, bp /* &buf */, ts+31257 /* ") VALUES(?" */, bp+16 /* &rc */)
+ for i = 1; i < (*SessionApplyCtx)(unsafe.Pointer(p)).FnCol; i++ {
+ sessionAppendStr(tls, bp /* &buf */, ts+31268 /* ", ?" */, bp+16 /* &rc */)
+ }
+ sessionAppendStr(tls, bp /* &buf */, ts+4066 /* ")" */, bp+16 /* &rc */)
+
+ if *(*int32)(unsafe.Pointer(bp + 16 /* rc */)) == SQLITE_OK {
+ *(*int32)(unsafe.Pointer(bp + 16 /* rc */)) = Xsqlite3_prepare_v2(tls, db, (*SessionBuffer)(unsafe.Pointer(bp /* &buf */)).FaBuf, (*SessionBuffer)(unsafe.Pointer(bp /* &buf */)).FnBuf, (p + 16 /* &.pInsert */), uintptr(0))
+ }
+ Xsqlite3_free(tls, (*SessionBuffer)(unsafe.Pointer(bp /* &buf */)).FaBuf)
+ return *(*int32)(unsafe.Pointer(bp + 16 /* rc */))
+}
+
+func sessionPrepare(tls *libc.TLS, db uintptr, pp uintptr, zSql uintptr) int32 { /* sqlite3.c:210673:12: */
+ return Xsqlite3_prepare_v2(tls, db, zSql, -1, pp, uintptr(0))
+}
+
+// Prepare statements for applying changes to the sqlite_stat1 table.
+// These are similar to those created by sessionSelectRow(),
+// sessionInsertRow(), sessionUpdateRow() and sessionDeleteRow() for
+// other tables.
+func sessionStat1Sql(tls *libc.TLS, db uintptr, p uintptr) int32 { /* sqlite3.c:210683:12: */
+ var rc int32 = sessionSelectRow(tls, db, ts+10072 /* "sqlite_stat1" */, p)
+ if rc == SQLITE_OK {
+ rc = sessionPrepare(tls, db, (p + 16 /* &.pInsert */),
+
+ ts+31272 /* "INSERT INTO main..." */)
}
+ if rc == SQLITE_OK {
+ rc = sessionPrepare(tls, db, (p + 8 /* &.pDelete */),
+ ts+31385 /* "DELETE FROM main..." */)
+ }
return rc
}
-// Obtain a pointer to a mapping of a single 32KiB page of the *-shm file.
-func rbuVfsShmMap(tls *libc.TLS, pFile uintptr, iRegion int32, szRegion int32, isWrite int32, pp uintptr) int32 { /* sqlite3.c:203848:12: */
- var p uintptr = pFile
+// A wrapper around sqlite3_bind_value() that detects an extra problem.
+// See comments in the body of this function for details.
+func sessionBindValue(tls *libc.TLS, pStmt uintptr, i int32, pVal uintptr) int32 { /* sqlite3.c:210706:12: */
+ var eType int32 = Xsqlite3_value_type(tls, pVal)
+ // COVERAGE: The (pVal->z==0) branch is never true using current versions
+ // of SQLite. If a malloc fails in an sqlite3_value_xxx() function, either
+ // the (pVal->z) variable remains as it was or the type of the value is
+ // set to SQLITE_NULL.
+ if ((eType == SQLITE_TEXT) || (eType == SQLITE_BLOB)) && ((*Sqlite3_value)(unsafe.Pointer(pVal)).Fz == uintptr(0)) {
+ // This condition occurs when an earlier OOM in a call to
+ // sqlite3_value_text() or sqlite3_value_blob() (perhaps from within
+ // a conflict-handler) has zeroed the pVal->z pointer. Return NOMEM.
+ return SQLITE_NOMEM
+ }
+ return Xsqlite3_bind_value(tls, pStmt, i, pVal)
+}
+
+// Iterator pIter must point to an SQLITE_INSERT entry. This function
+// transfers new.* values from the current iterator entry to statement
+// pStmt. The table being inserted into has nCol columns.
+//
+// New.* value $i from the iterator is bound to variable ($i+1) of
+// statement pStmt. If parameter abPK is NULL, all values from 0 to (nCol-1)
+// are transfered to the statement. Otherwise, if abPK is not NULL, it points
+// to an array nCol elements in size. In this case only those values for
+// which abPK[$i] is true are read from the iterator and bound to the
+// statement.
+//
+// An SQLite error code is returned if an error occurs. Otherwise, SQLITE_OK.
+func sessionBindRow(tls *libc.TLS, pIter uintptr, xValue uintptr, nCol int32, abPK uintptr, pStmt uintptr) int32 { /* sqlite3.c:210739:12: */
+ bp := tls.Alloc(8)
+ defer tls.Free(8)
+
+ var i int32
var rc int32 = SQLITE_OK
- var eStage int32 = func() int32 {
- if (*Rbu_file)(unsafe.Pointer(p)).FpRbu != 0 {
- return (*Sqlite3rbu)(unsafe.Pointer((*Rbu_file)(unsafe.Pointer(p)).FpRbu)).FeStage
- }
- return 0
- }()
- // If not in RBU_STAGE_OAL, allow this call to pass through. Or, if this
- // rbu is in the RBU_STAGE_OAL state, use heap memory for *-shm space
- // instead of a file on disk.
+ // Neither sqlite3changeset_old or sqlite3changeset_new can fail if the
+ // argument iterator points to a suitable entry. Make sure that xValue
+ // is one of these to guarantee that it is safe to ignore the return
+ // in the code below.
+
+ for i = 0; (rc == SQLITE_OK) && (i < nCol); i++ {
+ if !(abPK != 0) || (*(*U8)(unsafe.Pointer(abPK + uintptr(i))) != 0) {
+ // var pVal uintptr at bp, 8
+
+ (*struct {
+ f func(*libc.TLS, uintptr, int32, uintptr) int32
+ })(unsafe.Pointer(&struct{ uintptr }{xValue})).f(tls, pIter, i, bp /* &pVal */)
+ if *(*uintptr)(unsafe.Pointer(bp /* pVal */)) == uintptr(0) {
+ // The value in the changeset was "undefined". This indicates a
+ // corrupt changeset blob.
+ rc = Xsqlite3CorruptError(tls, 210762)
+ } else {
+ rc = sessionBindValue(tls, pStmt, (i + 1), *(*uintptr)(unsafe.Pointer(bp /* pVal */)))
+ }
+ }
+ }
+ return rc
+}
- if eStage == RBU_STAGE_OAL {
- var nByte Sqlite3_int64 = (Sqlite3_int64((uint64(iRegion + 1)) * uint64(unsafe.Sizeof(uintptr(0)))))
- var apNew uintptr = Xsqlite3_realloc64(tls, (*Rbu_file)(unsafe.Pointer(p)).FapShm, uint64(nByte))
+// SQL statement pSelect is as generated by the sessionSelectRow() function.
+// This function binds the primary key values from the change that changeset
+// iterator pIter points to to the SELECT and attempts to seek to the table
+// entry. If a row is found, the SELECT statement left pointing at the row
+// and SQLITE_ROW is returned. Otherwise, if no row is found and no error
+// has occured, the statement is reset and SQLITE_OK is returned. If an
+// error occurs, the statement is reset and an SQLite error code is returned.
+//
+// If this function returns SQLITE_ROW, the caller must eventually reset()
+// statement pSelect. If any other value is returned, the statement does
+// not require a reset().
+//
+// If the iterator currently points to an INSERT record, bind values from the
+// new.* record to the SELECT statement. Or, if it points to a DELETE or
+// UPDATE, bind values from the old.* record.
+func sessionSeekToRow(tls *libc.TLS, db uintptr, pIter uintptr, abPK uintptr, pSelect uintptr) int32 { /* sqlite3.c:210788:12: */
+ bp := tls.Alloc(16)
+ defer tls.Free(16)
- // This is an RBU connection that uses its own heap memory for the
- // pages of the *-shm file. Since no other process can have run
- // recovery, the connection must request *-shm pages in order
- // from start to finish.
+ var rc int32 // Return code
+ // var nCol int32 at bp+8, 4
+ // Number of columns in table
+ // var op int32 at bp+12, 4
+ // Changset operation (SQLITE_UPDATE etc.)
+ // var zDummy uintptr at bp, 8
+ // Unused
+
+ Xsqlite3changeset_op(tls, pIter, bp /* &zDummy */, bp+8 /* &nCol */, bp+12 /* &op */, uintptr(0))
+ rc = sessionBindRow(tls, pIter,
+ func() uintptr {
+ if *(*int32)(unsafe.Pointer(bp + 12 /* op */)) == SQLITE_INSERT {
+ return *(*uintptr)(unsafe.Pointer(&struct {
+ f func(*libc.TLS, uintptr, int32, uintptr) int32
+ }{Xsqlite3changeset_new}))
+ }
+ return *(*uintptr)(unsafe.Pointer(&struct {
+ f func(*libc.TLS, uintptr, int32, uintptr) int32
+ }{Xsqlite3changeset_old}))
+ }(),
+ *(*int32)(unsafe.Pointer(bp + 8 /* nCol */)), abPK, pSelect)
- if apNew == uintptr(0) {
- rc = SQLITE_NOMEM
- } else {
- libc.Xmemset(tls, (apNew + uintptr((*Rbu_file)(unsafe.Pointer(p)).FnShm)*8), 0, (uint64(unsafe.Sizeof(uintptr(0))) * (uint64((1 + iRegion) - (*Rbu_file)(unsafe.Pointer(p)).FnShm))))
- (*Rbu_file)(unsafe.Pointer(p)).FapShm = apNew
- (*Rbu_file)(unsafe.Pointer(p)).FnShm = (iRegion + 1)
+ if rc == SQLITE_OK {
+ rc = Xsqlite3_step(tls, pSelect)
+ if rc != SQLITE_ROW {
+ rc = Xsqlite3_reset(tls, pSelect)
}
+ }
- if rc == SQLITE_OK {
- var pNew uintptr = Xsqlite3_malloc64(tls, uint64(szRegion))
- if pNew == uintptr(0) {
- rc = SQLITE_NOMEM
+ return rc
+}
+
+// This function is called from within sqlite3changeset_apply_v2() when
+// a conflict is encountered and resolved using conflict resolution
+// mode eType (either SQLITE_CHANGESET_OMIT or SQLITE_CHANGESET_REPLACE)..
+// It adds a conflict resolution record to the buffer in
+// SessionApplyCtx.rebase, which will eventually be returned to the caller
+// of apply_v2() as the "rebase" buffer.
+//
+// Return SQLITE_OK if successful, or an SQLite error code otherwise.
+func sessionRebaseAdd(tls *libc.TLS, p uintptr, eType int32, pIter uintptr) int32 { /* sqlite3.c:210823:12: */
+ bp := tls.Alloc(16)
+ defer tls.Free(16)
+
+ *(*int32)(unsafe.Pointer(bp /* rc */)) = SQLITE_OK
+ if (*SessionApplyCtx)(unsafe.Pointer(p)).FbRebase != 0 {
+ var i int32
+ var eOp int32 = (*Sqlite3_changeset_iter)(unsafe.Pointer(pIter)).Fop
+ if int32((*SessionApplyCtx)(unsafe.Pointer(p)).FbRebaseStarted) == 0 {
+ // Append a table-header to the rebase buffer
+ var zTab uintptr = (*Sqlite3_changeset_iter)(unsafe.Pointer(pIter)).FzTab
+ sessionAppendByte(tls, (p + 104 /* &.rebase */), uint8('T'), bp /* &rc */)
+ sessionAppendVarint(tls, (p + 104 /* &.rebase */), (*SessionApplyCtx)(unsafe.Pointer(p)).FnCol, bp /* &rc */)
+ sessionAppendBlob(tls, (p + 104 /* &.rebase */), (*SessionApplyCtx)(unsafe.Pointer(p)).FabPK, (*SessionApplyCtx)(unsafe.Pointer(p)).FnCol, bp /* &rc */)
+ sessionAppendBlob(tls, (p + 104 /* &.rebase */), zTab, (int32(libc.Xstrlen(tls, zTab)) + 1), bp /* &rc */)
+ (*SessionApplyCtx)(unsafe.Pointer(p)).FbRebaseStarted = U8(1)
+ }
+
+ sessionAppendByte(tls, (p + 104 /* &.rebase */),
+ func() uint8 {
+ if eOp == SQLITE_DELETE {
+ return uint8(SQLITE_DELETE)
+ }
+ return uint8(SQLITE_INSERT)
+ }(), bp /* &rc */)
+ sessionAppendByte(tls, (p + 104 /* &.rebase */), (uint8(libc.Bool32(eType == SQLITE_CHANGESET_REPLACE))), bp /* &rc */)
+ for i = 0; i < (*SessionApplyCtx)(unsafe.Pointer(p)).FnCol; i++ {
+ *(*uintptr)(unsafe.Pointer(bp + 8 /* pVal */)) = uintptr(0)
+ if (eOp == SQLITE_DELETE) || ((eOp == SQLITE_UPDATE) && (*(*U8)(unsafe.Pointer((*SessionApplyCtx)(unsafe.Pointer(p)).FabPK + uintptr(i))) != 0)) {
+ Xsqlite3changeset_old(tls, pIter, i, bp+8 /* &pVal */)
} else {
- libc.Xmemset(tls, pNew, 0, uint64(szRegion))
- *(*uintptr)(unsafe.Pointer((*Rbu_file)(unsafe.Pointer(p)).FapShm + uintptr(iRegion)*8)) = pNew
+ Xsqlite3changeset_new(tls, pIter, i, bp+8 /* &pVal */)
}
+ sessionAppendValue(tls, (p + 104 /* &.rebase */), *(*uintptr)(unsafe.Pointer(bp + 8 /* pVal */)), bp /* &rc */)
}
+ }
+ return *(*int32)(unsafe.Pointer(bp /* rc */))
+}
- if rc == SQLITE_OK {
- *(*uintptr)(unsafe.Pointer(libc.AtomicLoadUintptr(&pp))) = *(*uintptr)(unsafe.Pointer((*Rbu_file)(unsafe.Pointer(p)).FapShm + uintptr(iRegion)*8))
+// Invoke the conflict handler for the change that the changeset iterator
+// currently points to.
+//
+// Argument eType must be either CHANGESET_DATA or CHANGESET_CONFLICT.
+// If argument pbReplace is NULL, then the type of conflict handler invoked
+// depends solely on eType, as follows:
+//
+// eType value Value passed to xConflict
+// -------------------------------------------------
+// CHANGESET_DATA CHANGESET_NOTFOUND
+// CHANGESET_CONFLICT CHANGESET_CONSTRAINT
+//
+// Or, if pbReplace is not NULL, then an attempt is made to find an existing
+// record with the same primary key as the record about to be deleted, updated
+// or inserted. If such a record can be found, it is available to the conflict
+// handler as the "conflicting" record. In this case the type of conflict
+// handler invoked is as follows:
+//
+// eType value PK Record found? Value passed to xConflict
+// ----------------------------------------------------------------
+// CHANGESET_DATA Yes CHANGESET_DATA
+// CHANGESET_DATA No CHANGESET_NOTFOUND
+// CHANGESET_CONFLICT Yes CHANGESET_CONFLICT
+// CHANGESET_CONFLICT No CHANGESET_CONSTRAINT
+//
+// If pbReplace is not NULL, and a record with a matching PK is found, and
+// the conflict handler function returns SQLITE_CHANGESET_REPLACE, *pbReplace
+// is set to non-zero before returning SQLITE_OK.
+//
+// If the conflict handler returns SQLITE_CHANGESET_ABORT, SQLITE_ABORT is
+// returned. Or, if the conflict handler returns an invalid value,
+// SQLITE_MISUSE. If the conflict handler returns SQLITE_CHANGESET_OMIT,
+// this function returns SQLITE_OK.
+func sessionConflictHandler(tls *libc.TLS, eType int32, p uintptr, pIter uintptr, xConflict uintptr, pCtx uintptr, pbReplace uintptr) int32 { /* sqlite3.c:210897:12: */
+ bp := tls.Alloc(20)
+ defer tls.Free(20)
+
+ var res int32 = 0 // Value returned by conflict handler
+ // var rc int32 at bp+16, 4
+
+ // var nCol int32 at bp+8, 4
+
+ // var op int32 at bp+12, 4
+
+ // var zDummy uintptr at bp, 8
+
+ Xsqlite3changeset_op(tls, pIter, bp /* &zDummy */, bp+8 /* &nCol */, bp+12 /* &op */, uintptr(0))
+
+ // Bind the new.* PRIMARY KEY values to the SELECT statement.
+ if pbReplace != 0 {
+ *(*int32)(unsafe.Pointer(bp + 16 /* rc */)) = sessionSeekToRow(tls, (*SessionApplyCtx)(unsafe.Pointer(p)).Fdb, pIter, (*SessionApplyCtx)(unsafe.Pointer(p)).FabPK, (*SessionApplyCtx)(unsafe.Pointer(p)).FpSelect)
+ } else {
+ *(*int32)(unsafe.Pointer(bp + 16 /* rc */)) = SQLITE_OK
+ }
+
+ if *(*int32)(unsafe.Pointer(bp + 16 /* rc */)) == SQLITE_ROW {
+ // There exists another row with the new.* primary key.
+ (*Sqlite3_changeset_iter)(unsafe.Pointer(pIter)).FpConflict = (*SessionApplyCtx)(unsafe.Pointer(p)).FpSelect
+ res = (*struct {
+ f func(*libc.TLS, uintptr, int32, uintptr) int32
+ })(unsafe.Pointer(&struct{ uintptr }{xConflict})).f(tls, pCtx, eType, pIter)
+ (*Sqlite3_changeset_iter)(unsafe.Pointer(pIter)).FpConflict = uintptr(0)
+ *(*int32)(unsafe.Pointer(bp + 16 /* rc */)) = Xsqlite3_reset(tls, (*SessionApplyCtx)(unsafe.Pointer(p)).FpSelect)
+ } else if *(*int32)(unsafe.Pointer(bp + 16 /* rc */)) == SQLITE_OK {
+ if ((*SessionApplyCtx)(unsafe.Pointer(p)).FbDeferConstraints != 0) && (eType == SQLITE_CHANGESET_CONFLICT) {
+ // Instead of invoking the conflict handler, append the change blob
+ // to the SessionApplyCtx.constraints buffer.
+ var aBlob uintptr = ((*Sqlite3_changeset_iter)(unsafe.Pointer(pIter)).Fin.FaData + uintptr((*Sqlite3_changeset_iter)(unsafe.Pointer(pIter)).Fin.FiCurrent))
+ var nBlob int32 = ((*Sqlite3_changeset_iter)(unsafe.Pointer(pIter)).Fin.FiNext - (*Sqlite3_changeset_iter)(unsafe.Pointer(pIter)).Fin.FiCurrent)
+ sessionAppendBlob(tls, (p + 88 /* &.constraints */), aBlob, nBlob, bp+16 /* &rc */)
+ return SQLITE_OK
} else {
- *(*uintptr)(unsafe.Pointer(libc.AtomicLoadUintptr(&pp))) = uintptr(0)
+ // No other row with the new.* primary key.
+ res = (*struct {
+ f func(*libc.TLS, uintptr, int32, uintptr) int32
+ })(unsafe.Pointer(&struct{ uintptr }{xConflict})).f(tls, pCtx, (eType + 1), pIter)
+ if res == SQLITE_CHANGESET_REPLACE {
+ *(*int32)(unsafe.Pointer(bp + 16 /* rc */)) = SQLITE_MISUSE
+ }
}
- } else {
+ }
+
+ if *(*int32)(unsafe.Pointer(bp + 16 /* rc */)) == SQLITE_OK {
+ switch res {
+ case SQLITE_CHANGESET_REPLACE:
+
+ *(*int32)(unsafe.Pointer(pbReplace)) = 1
+ break
+ fallthrough
+
+ case SQLITE_CHANGESET_OMIT:
+ break
+ fallthrough
+
+ case SQLITE_CHANGESET_ABORT:
+ *(*int32)(unsafe.Pointer(bp + 16 /* rc */)) = SQLITE_ABORT
+ break
+ fallthrough
- rc = (*(*func(*libc.TLS, uintptr, int32, int32, int32, uintptr) int32)(unsafe.Pointer(((*Sqlite3_file)(unsafe.Pointer((*Rbu_file)(unsafe.Pointer(p)).FpReal)).FpMethods + 104 /* &.xShmMap */))))(tls, (*Rbu_file)(unsafe.Pointer(p)).FpReal, iRegion, szRegion, isWrite, libc.AtomicLoadUintptr(&pp))
+ default:
+ *(*int32)(unsafe.Pointer(bp + 16 /* rc */)) = SQLITE_MISUSE
+ break
+ }
+ if *(*int32)(unsafe.Pointer(bp + 16 /* rc */)) == SQLITE_OK {
+ *(*int32)(unsafe.Pointer(bp + 16 /* rc */)) = sessionRebaseAdd(tls, p, res, pIter)
+ }
}
- return rc
+ return *(*int32)(unsafe.Pointer(bp + 16 /* rc */))
}
-// Memory barrier.
-func rbuVfsShmBarrier(tls *libc.TLS, pFile uintptr) { /* sqlite3.c:203906:13: */
- var p uintptr = pFile
- (*(*func(*libc.TLS, uintptr))(unsafe.Pointer(((*Sqlite3_file)(unsafe.Pointer((*Rbu_file)(unsafe.Pointer(p)).FpReal)).FpMethods + 120 /* &.xShmBarrier */))))(tls, (*Rbu_file)(unsafe.Pointer(p)).FpReal)
-}
+// Attempt to apply the change that the iterator passed as the first argument
+// currently points to to the database. If a conflict is encountered, invoke
+// the conflict handler callback.
+//
+// If argument pbRetry is NULL, then ignore any CHANGESET_DATA conflict. If
+// one is encountered, update or delete the row with the matching primary key
+// instead. Or, if pbRetry is not NULL and a CHANGESET_DATA conflict occurs,
+// invoke the conflict handler. If it returns CHANGESET_REPLACE, set *pbRetry
+// to true before returning. In this case the caller will invoke this function
+// again, this time with pbRetry set to NULL.
+//
+// If argument pbReplace is NULL and a CHANGESET_CONFLICT conflict is
+// encountered invoke the conflict handler with CHANGESET_CONSTRAINT instead.
+// Or, if pbReplace is not NULL, invoke it with CHANGESET_CONFLICT. If such
+// an invocation returns SQLITE_CHANGESET_REPLACE, set *pbReplace to true
+// before retrying. In this case the caller attempts to remove the conflicting
+// row before invoking this function again, this time with pbReplace set
+// to NULL.
+//
+// If any conflict handler returns SQLITE_CHANGESET_ABORT, this function
+// returns SQLITE_ABORT. Otherwise, if no error occurs, SQLITE_OK is
+// returned.
+func sessionApplyOneOp(tls *libc.TLS, pIter uintptr, p uintptr, xConflict uintptr, pCtx uintptr, pbReplace uintptr, pbRetry uintptr) int32 { /* sqlite3.c:210995:12: */
+ bp := tls.Alloc(24)
+ defer tls.Free(24)
+
+ // var zDummy uintptr at bp, 8
+
+ // var op int32 at bp+12, 4
+
+ // var nCol int32 at bp+8, 4
-// The xShmUnmap method.
-func rbuVfsShmUnmap(tls *libc.TLS, pFile uintptr, delFlag int32) int32 { /* sqlite3.c:203914:12: */
- var p uintptr = pFile
var rc int32 = SQLITE_OK
- var eStage int32 = func() int32 {
- if (*Rbu_file)(unsafe.Pointer(p)).FpRbu != 0 {
- return (*Sqlite3rbu)(unsafe.Pointer((*Rbu_file)(unsafe.Pointer(p)).FpRbu)).FeStage
+
+ Xsqlite3changeset_op(tls, pIter, bp /* &zDummy */, bp+8 /* &nCol */, bp+12 /* &op */, uintptr(0))
+
+ if *(*int32)(unsafe.Pointer(bp + 12 /* op */)) == SQLITE_DELETE {
+
+ // Bind values to the DELETE statement. If conflict handling is required,
+ // bind values for all columns and set bound variable (nCol+1) to true.
+ // Or, if conflict handling is not required, bind just the PK column
+ // values and, if it exists, set (nCol+1) to false. Conflict handling
+ // is not required if:
+ //
+ // * this is a patchset, or
+ // * (pbRetry==0), or
+ // * all columns of the table are PK columns (in this case there is
+ // no (nCol+1) variable to bind to).
+ var abPK uintptr = func() uintptr {
+ if (*Sqlite3_changeset_iter)(unsafe.Pointer(pIter)).FbPatchset != 0 {
+ return (*SessionApplyCtx)(unsafe.Pointer(p)).FabPK
+ }
+ return uintptr(0)
+ }()
+ rc = sessionBindRow(tls, pIter, *(*uintptr)(unsafe.Pointer(&struct {
+ f func(*libc.TLS, uintptr, int32, uintptr) int32
+ }{Xsqlite3changeset_old})), *(*int32)(unsafe.Pointer(bp + 8 /* nCol */)), abPK, (*SessionApplyCtx)(unsafe.Pointer(p)).FpDelete)
+ if (rc == SQLITE_OK) && (Xsqlite3_bind_parameter_count(tls, (*SessionApplyCtx)(unsafe.Pointer(p)).FpDelete) > *(*int32)(unsafe.Pointer(bp + 8 /* nCol */))) {
+ rc = Xsqlite3_bind_int(tls, (*SessionApplyCtx)(unsafe.Pointer(p)).FpDelete, (*(*int32)(unsafe.Pointer(bp + 8 /* nCol */)) + 1), (libc.Bool32((pbRetry == uintptr(0)) || (abPK != 0))))
+ }
+ if rc != SQLITE_OK {
+ return rc
+ }
+
+ Xsqlite3_step(tls, (*SessionApplyCtx)(unsafe.Pointer(p)).FpDelete)
+ rc = Xsqlite3_reset(tls, (*SessionApplyCtx)(unsafe.Pointer(p)).FpDelete)
+ if (rc == SQLITE_OK) && (Xsqlite3_changes(tls, (*SessionApplyCtx)(unsafe.Pointer(p)).Fdb) == 0) {
+ rc = sessionConflictHandler(tls,
+ SQLITE_CHANGESET_DATA, p, pIter, xConflict, pCtx, pbRetry)
+ } else if (rc & 0xff) == SQLITE_CONSTRAINT {
+ rc = sessionConflictHandler(tls,
+ SQLITE_CHANGESET_CONFLICT, p, pIter, xConflict, pCtx, uintptr(0))
+ }
+
+ } else if *(*int32)(unsafe.Pointer(bp + 12 /* op */)) == SQLITE_UPDATE {
+ var i int32
+ *(*uintptr)(unsafe.Pointer(bp + 16 /* pUp */)) = uintptr(0)
+ var bPatchset int32 = (libc.Bool32((pbRetry == uintptr(0)) || ((*Sqlite3_changeset_iter)(unsafe.Pointer(pIter)).FbPatchset != 0)))
+
+ rc = sessionUpdateFind(tls, pIter, p, bPatchset, bp+16 /* &pUp */)
+
+ // Bind values to the UPDATE statement.
+ for i = 0; (rc == SQLITE_OK) && (i < *(*int32)(unsafe.Pointer(bp + 8 /* nCol */))); i++ {
+ var pOld uintptr = *(*uintptr)(unsafe.Pointer((*Sqlite3_changeset_iter)(unsafe.Pointer((pIter))).FapValue + uintptr(i)*8))
+ var pNew uintptr = *(*uintptr)(unsafe.Pointer((*Sqlite3_changeset_iter)(unsafe.Pointer((pIter))).FapValue + uintptr(((*Sqlite3_changeset_iter)(unsafe.Pointer((pIter))).FnCol+(i)))*8))
+ if (*(*U8)(unsafe.Pointer((*SessionApplyCtx)(unsafe.Pointer(p)).FabPK + uintptr(i))) != 0) || ((bPatchset == 0) && (pOld != 0)) {
+ rc = sessionBindValue(tls, *(*uintptr)(unsafe.Pointer(bp + 16 /* pUp */)), ((i * 2) + 2), pOld)
+ }
+ if (rc == SQLITE_OK) && (pNew != 0) {
+ rc = sessionBindValue(tls, *(*uintptr)(unsafe.Pointer(bp + 16 /* pUp */)), ((i * 2) + 1), pNew)
+ }
+ }
+ if rc != SQLITE_OK {
+ return rc
+ }
+
+ // Attempt the UPDATE. In the case of a NOTFOUND or DATA conflict,
+ // the result will be SQLITE_OK with 0 rows modified.
+ Xsqlite3_step(tls, *(*uintptr)(unsafe.Pointer(bp + 16 /* pUp */)))
+ rc = Xsqlite3_reset(tls, *(*uintptr)(unsafe.Pointer(bp + 16 /* pUp */)))
+
+ if (rc == SQLITE_OK) && (Xsqlite3_changes(tls, (*SessionApplyCtx)(unsafe.Pointer(p)).Fdb) == 0) {
+ // A NOTFOUND or DATA error. Search the table to see if it contains
+ // a row with a matching primary key. If so, this is a DATA conflict.
+ // Otherwise, if there is no primary key match, it is a NOTFOUND.
+
+ rc = sessionConflictHandler(tls,
+ SQLITE_CHANGESET_DATA, p, pIter, xConflict, pCtx, pbRetry)
+
+ } else if (rc & 0xff) == SQLITE_CONSTRAINT {
+ // This is always a CONSTRAINT conflict.
+ rc = sessionConflictHandler(tls,
+ SQLITE_CHANGESET_CONFLICT, p, pIter, xConflict, pCtx, uintptr(0))
}
- return 0
- }()
- if (eStage == RBU_STAGE_OAL) || (eStage == RBU_STAGE_MOVE) {
- // no-op
} else {
- // Release the checkpointer and writer locks
- rbuUnlockShm(tls, p)
- rc = (*(*func(*libc.TLS, uintptr, int32) int32)(unsafe.Pointer(((*Sqlite3_file)(unsafe.Pointer((*Rbu_file)(unsafe.Pointer(p)).FpReal)).FpMethods + 128 /* &.xShmUnmap */))))(tls, (*Rbu_file)(unsafe.Pointer(p)).FpReal, delFlag)
+
+ if (*SessionApplyCtx)(unsafe.Pointer(p)).FbStat1 != 0 {
+ // Check if there is a conflicting row. For sqlite_stat1, this needs
+ // to be done using a SELECT, as there is no PRIMARY KEY in the
+ // database schema to throw an exception if a duplicate is inserted.
+ rc = sessionSeekToRow(tls, (*SessionApplyCtx)(unsafe.Pointer(p)).Fdb, pIter, (*SessionApplyCtx)(unsafe.Pointer(p)).FabPK, (*SessionApplyCtx)(unsafe.Pointer(p)).FpSelect)
+ if rc == SQLITE_ROW {
+ rc = SQLITE_CONSTRAINT
+ Xsqlite3_reset(tls, (*SessionApplyCtx)(unsafe.Pointer(p)).FpSelect)
+ }
+ }
+
+ if rc == SQLITE_OK {
+ rc = sessionBindRow(tls, pIter, *(*uintptr)(unsafe.Pointer(&struct {
+ f func(*libc.TLS, uintptr, int32, uintptr) int32
+ }{Xsqlite3changeset_new})), *(*int32)(unsafe.Pointer(bp + 8 /* nCol */)), uintptr(0), (*SessionApplyCtx)(unsafe.Pointer(p)).FpInsert)
+ if rc != SQLITE_OK {
+ return rc
+ }
+
+ Xsqlite3_step(tls, (*SessionApplyCtx)(unsafe.Pointer(p)).FpInsert)
+ rc = Xsqlite3_reset(tls, (*SessionApplyCtx)(unsafe.Pointer(p)).FpInsert)
+ }
+
+ if (rc & 0xff) == SQLITE_CONSTRAINT {
+ rc = sessionConflictHandler(tls,
+ SQLITE_CHANGESET_CONFLICT, p, pIter, xConflict, pCtx, pbReplace)
+ }
}
+
return rc
}
-// Open an rbu file handle.
-func rbuVfsOpen(tls *libc.TLS, pVfs uintptr, zName uintptr, pFile uintptr, flags int32, pOutFlags uintptr) int32 { /* sqlite3.c:203933:12: */
- var pRbuVfs uintptr = pVfs
- var pRealVfs uintptr = (*Rbu_vfs)(unsafe.Pointer(pRbuVfs)).FpRealVfs
- var pFd uintptr = pFile
- var rc int32 = SQLITE_OK
- var zOpen uintptr = zName
- var oflags int32 = flags
+// Attempt to apply the change that the iterator passed as the first argument
+// currently points to to the database. If a conflict is encountered, invoke
+// the conflict handler callback.
+//
+// The difference between this function and sessionApplyOne() is that this
+// function handles the case where the conflict-handler is invoked and
+// returns SQLITE_CHANGESET_REPLACE - indicating that the change should be
+// retried in some manner.
+func sessionApplyOneWithRetry(tls *libc.TLS, db uintptr, pIter uintptr, pApply uintptr, xConflict uintptr, pCtx uintptr) int32 { /* sqlite3.c:211128:12: */
+ bp := tls.Alloc(8)
+ defer tls.Free(8)
- libc.Xmemset(tls, pFd, 0, uint64(unsafe.Sizeof(Rbu_file{})))
- (*Rbu_file)(unsafe.Pointer(pFd)).FpReal = (pFd + 1*104)
- (*Rbu_file)(unsafe.Pointer(pFd)).FpRbuVfs = pRbuVfs
- (*Rbu_file)(unsafe.Pointer(pFd)).FopenFlags = flags
- if zName != 0 {
- if (flags & SQLITE_OPEN_MAIN_DB) != 0 {
- // A main database has just been opened. The following block sets
- // (pFd->zWal) to point to a buffer owned by SQLite that contains
- // the name of the *-wal file this db connection will use. SQLite
- // happens to pass a pointer to this buffer when using xAccess()
- // or xOpen() to operate on the *-wal file.
- (*Rbu_file)(unsafe.Pointer(pFd)).FzWal = Xsqlite3_filename_wal(tls, zName)
- } else if (flags & SQLITE_OPEN_WAL) != 0 {
- var pDb uintptr = rbuFindMaindb(tls, pRbuVfs, zName, 0)
- if pDb != 0 {
- if ((*Rbu_file)(unsafe.Pointer(pDb)).FpRbu != 0) && ((*Sqlite3rbu)(unsafe.Pointer((*Rbu_file)(unsafe.Pointer(pDb)).FpRbu)).FeStage == RBU_STAGE_OAL) {
- // This call is to open a *-wal file. Intead, open the *-oal. This
- // code ensures that the string passed to xOpen() is terminated by a
- // pair of '\0' bytes in case the VFS attempts to extract a URI
- // parameter from it.
- var zBase uintptr = zName
- var nCopy Size_t
- var zCopy uintptr
- if (*Sqlite3rbu)(unsafe.Pointer(((*Rbu_file)(unsafe.Pointer(pDb)).FpRbu))).FzTarget == uintptr(0) {
- zBase = Xsqlite3_db_filename(tls, (*Sqlite3rbu)(unsafe.Pointer((*Rbu_file)(unsafe.Pointer(pDb)).FpRbu)).FdbRbu, ts+5327 /* "main" */)
- zBase = Xsqlite3_filename_wal(tls, zBase)
+ *(*int32)(unsafe.Pointer(bp /* bReplace */)) = 0
+ *(*int32)(unsafe.Pointer(bp + 4 /* bRetry */)) = 0
+ var rc int32
+
+ rc = sessionApplyOneOp(tls, pIter, pApply, xConflict, pCtx, bp /* &bReplace */, bp+4 /* &bRetry */)
+ if rc == SQLITE_OK {
+ // If the bRetry flag is set, the change has not been applied due to an
+ // SQLITE_CHANGESET_DATA problem (i.e. this is an UPDATE or DELETE and
+ // a row with the correct PK is present in the db, but one or more other
+ // fields do not contain the expected values) and the conflict handler
+ // returned SQLITE_CHANGESET_REPLACE. In this case retry the operation,
+ // but pass NULL as the final argument so that sessionApplyOneOp() ignores
+ // the SQLITE_CHANGESET_DATA problem.
+ if *(*int32)(unsafe.Pointer(bp + 4 /* bRetry */)) != 0 {
+
+ rc = sessionApplyOneOp(tls, pIter, pApply, xConflict, pCtx, uintptr(0), uintptr(0))
+ } else if *(*int32)(unsafe.Pointer(bp /* bReplace */)) != 0 {
+
+ rc = Xsqlite3_exec(tls, db, ts+31529 /* "SAVEPOINT replac..." */, uintptr(0), uintptr(0), uintptr(0))
+ if rc == SQLITE_OK {
+ rc = sessionBindRow(tls, pIter,
+ *(*uintptr)(unsafe.Pointer(&struct {
+ f func(*libc.TLS, uintptr, int32, uintptr) int32
+ }{Xsqlite3changeset_new})), (*SessionApplyCtx)(unsafe.Pointer(pApply)).FnCol, (*SessionApplyCtx)(unsafe.Pointer(pApply)).FabPK, (*SessionApplyCtx)(unsafe.Pointer(pApply)).FpDelete)
+ Xsqlite3_bind_int(tls, (*SessionApplyCtx)(unsafe.Pointer(pApply)).FpDelete, ((*SessionApplyCtx)(unsafe.Pointer(pApply)).FnCol + 1), 1)
+ }
+ if rc == SQLITE_OK {
+ Xsqlite3_step(tls, (*SessionApplyCtx)(unsafe.Pointer(pApply)).FpDelete)
+ rc = Xsqlite3_reset(tls, (*SessionApplyCtx)(unsafe.Pointer(pApply)).FpDelete)
+ }
+ if rc == SQLITE_OK {
+ rc = sessionApplyOneOp(tls, pIter, pApply, xConflict, pCtx, uintptr(0), uintptr(0))
+ }
+ if rc == SQLITE_OK {
+ rc = Xsqlite3_exec(tls, db, ts+31550 /* "RELEASE replace_..." */, uintptr(0), uintptr(0), uintptr(0))
+ }
+ }
+ }
+
+ return rc
+}
+
+// Retry the changes accumulated in the pApply->constraints buffer.
+func sessionRetryConstraints(tls *libc.TLS, db uintptr, bPatchset int32, zTab uintptr, pApply uintptr, xConflict uintptr, pCtx uintptr) int32 { /* sqlite3.c:211185:12: */
+ bp := tls.Alloc(12)
+ defer tls.Free(12)
+
+ *(*int32)(unsafe.Pointer(bp + 8 /* rc */)) = SQLITE_OK
+
+ for (*SessionApplyCtx)(unsafe.Pointer(pApply)).Fconstraints.FnBuf != 0 {
+ *(*uintptr)(unsafe.Pointer(bp /* pIter2 */)) = uintptr(0)
+ var cons = (*SessionApplyCtx)(unsafe.Pointer(pApply)).Fconstraints
+ libc.Xmemset(tls, (pApply + 88 /* &.constraints */), 0, uint64(unsafe.Sizeof(SessionBuffer{})))
+
+ *(*int32)(unsafe.Pointer(bp + 8 /* rc */)) = sessionChangesetStart(tls,
+ bp /* &pIter2 */, uintptr(0), uintptr(0), cons.FnBuf, cons.FaBuf, (*SessionApplyCtx)(unsafe.Pointer(pApply)).FbInvertConstraints, 1)
+ if *(*int32)(unsafe.Pointer(bp + 8 /* rc */)) == SQLITE_OK {
+ var nByte Size_t = ((uint64(2 * (*SessionApplyCtx)(unsafe.Pointer(pApply)).FnCol)) * uint64(unsafe.Sizeof(uintptr(0))))
+ var rc2 int32
+ (*Sqlite3_changeset_iter)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp /* pIter2 */)))).FbPatchset = bPatchset
+ (*Sqlite3_changeset_iter)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp /* pIter2 */)))).FzTab = zTab
+ (*Sqlite3_changeset_iter)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp /* pIter2 */)))).FnCol = (*SessionApplyCtx)(unsafe.Pointer(pApply)).FnCol
+ (*Sqlite3_changeset_iter)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp /* pIter2 */)))).FabPK = (*SessionApplyCtx)(unsafe.Pointer(pApply)).FabPK
+ sessionBufferGrow(tls, (*(*uintptr)(unsafe.Pointer(bp /* pIter2 */)) + 72 /* &.tblhdr */), int64(nByte), bp+8 /* &rc */)
+ (*Sqlite3_changeset_iter)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp /* pIter2 */)))).FapValue = (*Sqlite3_changeset_iter)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp /* pIter2 */)))).Ftblhdr.FaBuf
+ if *(*int32)(unsafe.Pointer(bp + 8 /* rc */)) == SQLITE_OK {
+ libc.Xmemset(tls, (*Sqlite3_changeset_iter)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp /* pIter2 */)))).FapValue, 0, nByte)
+ }
+
+ for (*(*int32)(unsafe.Pointer(bp + 8 /* rc */)) == SQLITE_OK) && (SQLITE_ROW == Xsqlite3changeset_next(tls, *(*uintptr)(unsafe.Pointer(bp /* pIter2 */)))) {
+ *(*int32)(unsafe.Pointer(bp + 8 /* rc */)) = sessionApplyOneWithRetry(tls, db, *(*uintptr)(unsafe.Pointer(bp /* pIter2 */)), pApply, xConflict, pCtx)
+ }
+
+ rc2 = Xsqlite3changeset_finalize(tls, *(*uintptr)(unsafe.Pointer(bp /* pIter2 */)))
+ if *(*int32)(unsafe.Pointer(bp + 8 /* rc */)) == SQLITE_OK {
+ *(*int32)(unsafe.Pointer(bp + 8 /* rc */)) = rc2
+ }
+ }
+
+ Xsqlite3_free(tls, cons.FaBuf)
+ if *(*int32)(unsafe.Pointer(bp + 8 /* rc */)) != SQLITE_OK {
+ break
+ }
+ if (*SessionApplyCtx)(unsafe.Pointer(pApply)).Fconstraints.FnBuf >= cons.FnBuf {
+ // No progress was made on the last round.
+ (*SessionApplyCtx)(unsafe.Pointer(pApply)).FbDeferConstraints = 0
+ }
+ }
+
+ return *(*int32)(unsafe.Pointer(bp + 8 /* rc */))
+}
+
+// Argument pIter is a changeset iterator that has been initialized, but
+// not yet passed to sqlite3changeset_next(). This function applies the
+// changeset to the main database attached to handle "db". The supplied
+// conflict handler callback is invoked to resolve any conflicts encountered
+// while applying the change.
+func sessionChangesetApply(tls *libc.TLS, db uintptr, pIter uintptr, xFilter uintptr, xConflict uintptr, pCtx uintptr, ppRebase uintptr, pnRebase uintptr, flags int32) int32 { /* sqlite3.c:211241:12: */
+ bp := tls.Alloc(368)
+ defer tls.Free(368)
+
+ var schemaMismatch int32 = 0
+ var rc int32 = SQLITE_OK // Return code
+ *(*uintptr)(unsafe.Pointer(bp + 200 /* zTab */)) = uintptr(0) // Name of current table
+ var nTab int32 = 0 // Result of sqlite3Strlen30(zTab)
+ // var sApply SessionApplyCtx at bp+48, 128
+ // changeset_apply() context object
+ var bPatchset int32
+
+ (*Sqlite3_changeset_iter)(unsafe.Pointer(pIter)).Fin.FbNoDiscard = 1
+ libc.Xmemset(tls, bp+48 /* &sApply */, 0, uint64(unsafe.Sizeof(SessionApplyCtx{})))
+ (*SessionApplyCtx)(unsafe.Pointer(bp + 48 /* &sApply */)).FbRebase = (U8(libc.Bool32((ppRebase != 0) && (pnRebase != 0))))
+ (*SessionApplyCtx)(unsafe.Pointer(bp + 48 /* &sApply */)).FbInvertConstraints = libc.BoolInt32(!(!((flags & SQLITE_CHANGESETAPPLY_INVERT) != 0)))
+ Xsqlite3_mutex_enter(tls, Xsqlite3_db_mutex(tls, db))
+ if (flags & SQLITE_CHANGESETAPPLY_NOSAVEPOINT) == 0 {
+ rc = Xsqlite3_exec(tls, db, ts+31569 /* "SAVEPOINT change..." */, uintptr(0), uintptr(0), uintptr(0))
+ }
+ if rc == SQLITE_OK {
+ rc = Xsqlite3_exec(tls, db, ts+31595 /* "PRAGMA defer_for..." */, uintptr(0), uintptr(0), uintptr(0))
+ }
+ for (rc == SQLITE_OK) && (SQLITE_ROW == Xsqlite3changeset_next(tls, pIter)) {
+ // var nCol int32 at bp+184, 4
+
+ // var op int32 at bp+188, 4
+
+ // var zNew uintptr at bp+176, 8
+
+ Xsqlite3changeset_op(tls, pIter, bp+176 /* &zNew */, bp+184 /* &nCol */, bp+188 /* &op */, uintptr(0))
+
+ if (*(*uintptr)(unsafe.Pointer(bp + 200 /* zTab */)) == uintptr(0)) || (Xsqlite3_strnicmp(tls, *(*uintptr)(unsafe.Pointer(bp + 176 /* zNew */)), *(*uintptr)(unsafe.Pointer(bp + 200 /* zTab */)), (nTab+1)) != 0) {
+ // var abPK uintptr at bp+192, 8
+
+ rc = sessionRetryConstraints(tls,
+ db, (*Sqlite3_changeset_iter)(unsafe.Pointer(pIter)).FbPatchset, *(*uintptr)(unsafe.Pointer(bp + 200 /* zTab */)), bp+48 /* &sApply */, xConflict, pCtx)
+ if rc != SQLITE_OK {
+ break
+ }
+
+ sessionUpdateFree(tls, bp+48 /* &sApply */)
+ Xsqlite3_free(tls, (*SessionApplyCtx)(unsafe.Pointer(bp+48 /* &sApply */)).FazCol) // cast works around VC++ bug
+ Xsqlite3_finalize(tls, (*SessionApplyCtx)(unsafe.Pointer(bp+48 /* &sApply */)).FpDelete)
+ Xsqlite3_finalize(tls, (*SessionApplyCtx)(unsafe.Pointer(bp+48 /* &sApply */)).FpInsert)
+ Xsqlite3_finalize(tls, (*SessionApplyCtx)(unsafe.Pointer(bp+48 /* &sApply */)).FpSelect)
+ (*SessionApplyCtx)(unsafe.Pointer(bp + 48 /* &sApply */)).Fdb = db
+ (*SessionApplyCtx)(unsafe.Pointer(bp + 48 /* &sApply */)).FpDelete = uintptr(0)
+ (*SessionApplyCtx)(unsafe.Pointer(bp + 48 /* &sApply */)).FpInsert = uintptr(0)
+ (*SessionApplyCtx)(unsafe.Pointer(bp + 48 /* &sApply */)).FpSelect = uintptr(0)
+ (*SessionApplyCtx)(unsafe.Pointer(bp + 48 /* &sApply */)).FnCol = 0
+ (*SessionApplyCtx)(unsafe.Pointer(bp + 48 /* &sApply */)).FazCol = uintptr(0)
+ (*SessionApplyCtx)(unsafe.Pointer(bp + 48 /* &sApply */)).FabPK = uintptr(0)
+ (*SessionApplyCtx)(unsafe.Pointer(bp + 48 /* &sApply */)).FbStat1 = 0
+ (*SessionApplyCtx)(unsafe.Pointer(bp + 48 /* &sApply */)).FbDeferConstraints = 1
+ (*SessionApplyCtx)(unsafe.Pointer(bp + 48 /* &sApply */)).FbRebaseStarted = U8(0)
+ libc.Xmemset(tls, (bp + 48 /* &sApply */ + 88 /* &.constraints */), 0, uint64(unsafe.Sizeof(SessionBuffer{})))
+
+ // If an xFilter() callback was specified, invoke it now. If the
+ // xFilter callback returns zero, skip this table. If it returns
+ // non-zero, proceed.
+ schemaMismatch = (libc.Bool32((xFilter != 0) && (0 == (*struct {
+ f func(*libc.TLS, uintptr, uintptr) int32
+ })(unsafe.Pointer(&struct{ uintptr }{xFilter})).f(tls, pCtx, *(*uintptr)(unsafe.Pointer(bp + 176 /* zNew */))))))
+ if schemaMismatch != 0 {
+ *(*uintptr)(unsafe.Pointer(bp + 200 /* zTab */)) = Xsqlite3_mprintf(tls, ts+2790 /* "%s" */, libc.VaList(bp, *(*uintptr)(unsafe.Pointer(bp + 176 /* zNew */))))
+ if *(*uintptr)(unsafe.Pointer(bp + 200 /* zTab */)) == uintptr(0) {
+ rc = SQLITE_NOMEM
+ break
+ }
+ nTab = int32(libc.Xstrlen(tls, *(*uintptr)(unsafe.Pointer(bp + 200 /* zTab */))))
+ (*SessionApplyCtx)(unsafe.Pointer(bp + 48 /* &sApply */)).FazCol = *(*uintptr)(unsafe.Pointer(bp + 200 /* zTab */))
+ } else {
+ var nMinCol int32 = 0
+ var i int32
+
+ Xsqlite3changeset_pk(tls, pIter, bp+192 /* &abPK */, uintptr(0))
+ rc = sessionTableInfo(tls, uintptr(0),
+ db, ts+5458 /* "main" */, *(*uintptr)(unsafe.Pointer(bp + 176 /* zNew */)), (bp + 48 /* &sApply */ + 32 /* &.nCol */), bp+200 /* &zTab */, (bp + 48 /* &sApply */ + 40 /* &.azCol */), (bp + 48 /* &sApply */ + 48 /* &.abPK */))
+ if rc != SQLITE_OK {
+ break
+ }
+ for i = 0; i < (*SessionApplyCtx)(unsafe.Pointer(bp+48 /* &sApply */)).FnCol; i++ {
+ if *(*U8)(unsafe.Pointer((*SessionApplyCtx)(unsafe.Pointer(bp+48 /* &sApply */)).FabPK + uintptr(i))) != 0 {
+ nMinCol = (i + 1)
}
- nCopy = libc.Xstrlen(tls, zBase)
- zCopy = Xsqlite3_malloc64(tls, (uint64(nCopy + uint64(2))))
- if zCopy != 0 {
- libc.Xmemcpy(tls, zCopy, zBase, nCopy)
- *(*int8)(unsafe.Pointer(zCopy + uintptr((nCopy - uint64(3))))) = int8('o')
- *(*int8)(unsafe.Pointer(zCopy + uintptr(nCopy))) = int8(0)
- *(*int8)(unsafe.Pointer(zCopy + uintptr((nCopy + uint64(1))))) = int8(0)
- zOpen = libc.AssignPtrUintptr(pFd+64 /* &.zDel */, zCopy)
+ }
+
+ if (*SessionApplyCtx)(unsafe.Pointer(bp+48 /* &sApply */)).FnCol == 0 {
+ schemaMismatch = 1
+ Xsqlite3_log(tls, SQLITE_SCHEMA,
+ ts+31625 /* "sqlite3changeset..." */, libc.VaList(bp+8, *(*uintptr)(unsafe.Pointer(bp + 200 /* zTab */))))
+ } else if (*SessionApplyCtx)(unsafe.Pointer(bp+48 /* &sApply */)).FnCol < *(*int32)(unsafe.Pointer(bp + 184 /* nCol */)) {
+ schemaMismatch = 1
+ Xsqlite3_log(tls, SQLITE_SCHEMA,
+
+ ts+31669, /* "sqlite3changeset..." */
+ libc.VaList(bp+16, *(*uintptr)(unsafe.Pointer(bp + 200 /* zTab */)), (*SessionApplyCtx)(unsafe.Pointer(bp+48 /* &sApply */)).FnCol, *(*int32)(unsafe.Pointer(bp + 184 /* nCol */))))
+ } else if (*(*int32)(unsafe.Pointer(bp + 184 /* nCol */)) < nMinCol) || (libc.Xmemcmp(tls, (*SessionApplyCtx)(unsafe.Pointer(bp+48 /* &sApply */)).FabPK, *(*uintptr)(unsafe.Pointer(bp + 192 /* abPK */)), uint64(*(*int32)(unsafe.Pointer(bp + 184 /* nCol */)))) != 0) {
+ schemaMismatch = 1
+ Xsqlite3_log(tls, SQLITE_SCHEMA,
+ ts+31740 /* "sqlite3changeset..." */, libc.VaList(bp+40, *(*uintptr)(unsafe.Pointer(bp + 200 /* zTab */))))
+ } else {
+ (*SessionApplyCtx)(unsafe.Pointer(bp + 48 /* &sApply */)).FnCol = *(*int32)(unsafe.Pointer(bp + 184 /* nCol */))
+ if 0 == Xsqlite3_stricmp(tls, *(*uintptr)(unsafe.Pointer(bp + 200 /* zTab */)), ts+10072 /* "sqlite_stat1" */) {
+ if libc.AssignInt32(&rc, sessionStat1Sql(tls, db, bp+48 /* &sApply */)) != 0 {
+ break
+ }
+ (*SessionApplyCtx)(unsafe.Pointer(bp + 48 /* &sApply */)).FbStat1 = 1
} else {
- rc = SQLITE_NOMEM
+ if ((libc.AssignInt32(&rc, sessionSelectRow(tls, db, *(*uintptr)(unsafe.Pointer(bp + 200 /* zTab */)), bp+48 /* &sApply */)) != 0) ||
+ (libc.AssignInt32(&rc, sessionDeleteRow(tls, db, *(*uintptr)(unsafe.Pointer(bp + 200 /* zTab */)), bp+48 /* &sApply */)) != 0)) ||
+ (libc.AssignInt32(&rc, sessionInsertRow(tls, db, *(*uintptr)(unsafe.Pointer(bp + 200 /* zTab */)), bp+48 /* &sApply */)) != 0) {
+ break
+ }
+ (*SessionApplyCtx)(unsafe.Pointer(bp + 48 /* &sApply */)).FbStat1 = 0
}
- (*Rbu_file)(unsafe.Pointer(pFd)).FpRbu = (*Rbu_file)(unsafe.Pointer(pDb)).FpRbu
}
- (*Rbu_file)(unsafe.Pointer(pDb)).FpWalFd = pFd
+ nTab = Xsqlite3Strlen30(tls, *(*uintptr)(unsafe.Pointer(bp + 200 /* zTab */)))
}
}
- } else {
- (*Rbu_file)(unsafe.Pointer(pFd)).FpRbu = (*Rbu_vfs)(unsafe.Pointer(pRbuVfs)).FpRbu
+
+ // If there is a schema mismatch on the current table, proceed to the
+ // next change. A log message has already been issued.
+ if schemaMismatch != 0 {
+ continue
+ }
+
+ rc = sessionApplyOneWithRetry(tls, db, pIter, bp+48 /* &sApply */, xConflict, pCtx)
}
- if ((oflags & SQLITE_OPEN_MAIN_DB) != 0) &&
- (Xsqlite3_uri_boolean(tls, zName, ts+30073 /* "rbu_memory" */, 0) != 0) {
+ bPatchset = (*Sqlite3_changeset_iter)(unsafe.Pointer(pIter)).FbPatchset
+ if rc == SQLITE_OK {
+ rc = Xsqlite3changeset_finalize(tls, pIter)
+ } else {
+ Xsqlite3changeset_finalize(tls, pIter)
+ }
- oflags = ((((SQLITE_OPEN_TEMP_DB | SQLITE_OPEN_READWRITE) | SQLITE_OPEN_CREATE) | SQLITE_OPEN_EXCLUSIVE) | SQLITE_OPEN_DELETEONCLOSE)
- zOpen = uintptr(0)
+ if rc == SQLITE_OK {
+ rc = sessionRetryConstraints(tls, db, bPatchset, *(*uintptr)(unsafe.Pointer(bp + 200 /* zTab */)), bp+48 /* &sApply */, xConflict, pCtx)
}
if rc == SQLITE_OK {
- rc = (*(*func(*libc.TLS, uintptr, uintptr, uintptr, int32, uintptr) int32)(unsafe.Pointer((pRealVfs + 40 /* &.xOpen */))))(tls, pRealVfs, zOpen, (*Rbu_file)(unsafe.Pointer(pFd)).FpReal, oflags, pOutFlags)
+ // var nFk int32 at bp+208, 4
+
+ // var notUsed int32 at bp+212, 4
+
+ Xsqlite3_db_status(tls, db, SQLITE_DBSTATUS_DEFERRED_FKS, bp+208 /* &nFk */, bp+212 /* ¬Used */, 0)
+ if *(*int32)(unsafe.Pointer(bp + 208 /* nFk */)) != 0 {
+ var res int32 = SQLITE_CHANGESET_ABORT
+ // var sIter Sqlite3_changeset_iter at bp+216, 152
+
+ libc.Xmemset(tls, bp+216 /* &sIter */, 0, uint64(unsafe.Sizeof(Sqlite3_changeset_iter{})))
+ (*Sqlite3_changeset_iter)(unsafe.Pointer(bp + 216 /* &sIter */)).FnCol = *(*int32)(unsafe.Pointer(bp + 208 /* nFk */))
+ res = (*struct {
+ f func(*libc.TLS, uintptr, int32, uintptr) int32
+ })(unsafe.Pointer(&struct{ uintptr }{xConflict})).f(tls, pCtx, SQLITE_CHANGESET_FOREIGN_KEY, bp+216 /* &sIter */)
+ if res != SQLITE_CHANGESET_OMIT {
+ rc = SQLITE_CONSTRAINT
+ }
+ }
}
- if (*Sqlite3_file)(unsafe.Pointer((*Rbu_file)(unsafe.Pointer(pFd)).FpReal)).FpMethods != 0 {
- // The xOpen() operation has succeeded. Set the sqlite3_file.pMethods
- // pointer and, if the file is a main database file, link it into the
- // mutex protected linked list of all such files.
- (*Sqlite3_file)(unsafe.Pointer(pFile)).FpMethods = uintptr(unsafe.Pointer(&rbuvfs_io_methods))
- if (flags & SQLITE_OPEN_MAIN_DB) != 0 {
- rbuMainlistAdd(tls, pFd)
+ Xsqlite3_exec(tls, db, ts+31800 /* "PRAGMA defer_for..." */, uintptr(0), uintptr(0), uintptr(0))
+
+ if (flags & SQLITE_CHANGESETAPPLY_NOSAVEPOINT) == 0 {
+ if rc == SQLITE_OK {
+ rc = Xsqlite3_exec(tls, db, ts+31830 /* "RELEASE changese..." */, uintptr(0), uintptr(0), uintptr(0))
+ } else {
+ Xsqlite3_exec(tls, db, ts+31854 /* "ROLLBACK TO chan..." */, uintptr(0), uintptr(0), uintptr(0))
+ Xsqlite3_exec(tls, db, ts+31830 /* "RELEASE changese..." */, uintptr(0), uintptr(0), uintptr(0))
}
- } else {
- Xsqlite3_free(tls, (*Rbu_file)(unsafe.Pointer(pFd)).FzDel)
}
+ if ((rc == SQLITE_OK) && (bPatchset == 0)) && ((*SessionApplyCtx)(unsafe.Pointer(bp+48 /* &sApply */)).FbRebase != 0) {
+ *(*uintptr)(unsafe.Pointer(ppRebase)) = (*SessionApplyCtx)(unsafe.Pointer(bp + 48 /* &sApply */)).Frebase.FaBuf
+ *(*int32)(unsafe.Pointer(pnRebase)) = (*SessionApplyCtx)(unsafe.Pointer(bp + 48 /* &sApply */)).Frebase.FnBuf
+ (*SessionApplyCtx)(unsafe.Pointer(bp + 48 /* &sApply */)).Frebase.FaBuf = uintptr(0)
+ }
+ sessionUpdateFree(tls, bp+48 /* &sApply */)
+ Xsqlite3_finalize(tls, (*SessionApplyCtx)(unsafe.Pointer(bp+48 /* &sApply */)).FpInsert)
+ Xsqlite3_finalize(tls, (*SessionApplyCtx)(unsafe.Pointer(bp+48 /* &sApply */)).FpDelete)
+ Xsqlite3_finalize(tls, (*SessionApplyCtx)(unsafe.Pointer(bp+48 /* &sApply */)).FpSelect)
+ Xsqlite3_free(tls, (*SessionApplyCtx)(unsafe.Pointer(bp+48 /* &sApply */)).FazCol) // cast works around VC++ bug
+ Xsqlite3_free(tls, (*SessionApplyCtx)(unsafe.Pointer(bp+48 /* &sApply */)).Fconstraints.FaBuf)
+ Xsqlite3_free(tls, (*SessionApplyCtx)(unsafe.Pointer(bp+48 /* &sApply */)).Frebase.FaBuf)
+ Xsqlite3_mutex_leave(tls, Xsqlite3_db_mutex(tls, db))
return rc
}
-var rbuvfs_io_methods = Sqlite3_io_methods{
- FiVersion: 2, // iVersion
- FxClose: 0, // xClose
- FxRead: 0, // xRead
- FxWrite: 0, // xWrite
- FxTruncate: 0, // xTruncate
- FxSync: 0, // xSync
- FxFileSize: 0, // xFileSize
- FxLock: 0, // xLock
- FxUnlock: 0, // xUnlock
- FxCheckReservedLock: 0, // xCheckReservedLock
- FxFileControl: 0, // xFileControl
- FxSectorSize: 0, // xSectorSize
- FxDeviceCharacteristics: 0, // xDeviceCharacteristics
- FxShmMap: 0, // xShmMap
- FxShmLock: 0, // xShmLock
- FxShmBarrier: 0, // xShmBarrier
- FxShmUnmap: 0, // xFetch, xUnfetch
-} /* sqlite3.c:203940:29 */
+// Apply the changeset passed via pChangeset/nChangeset to the main
+// database attached to handle "db".
+func Xsqlite3changeset_apply_v2(tls *libc.TLS, db uintptr, nChangeset int32, pChangeset uintptr, xFilter uintptr, xConflict uintptr, pCtx uintptr, ppRebase uintptr, pnRebase uintptr, flags int32) int32 { /* sqlite3.c:211439:16: */
+ bp := tls.Alloc(8)
+ defer tls.Free(8)
-// Delete the file located at zPath.
-func rbuVfsDelete(tls *libc.TLS, pVfs uintptr, zPath uintptr, dirSync int32) int32 { /* sqlite3.c:204045:12: */
- var pRealVfs uintptr = (*Rbu_vfs)(unsafe.Pointer(pVfs)).FpRealVfs
- return (*(*func(*libc.TLS, uintptr, uintptr, int32) int32)(unsafe.Pointer((pRealVfs + 48 /* &.xDelete */))))(tls, pRealVfs, zPath, dirSync)
+ // var pIter uintptr at bp, 8
+ // Iterator to skip through changeset
+ var bInv int32 = libc.BoolInt32(!(!((flags & SQLITE_CHANGESETAPPLY_INVERT) != 0)))
+ var rc int32 = sessionChangesetStart(tls, bp /* &pIter */, uintptr(0), uintptr(0), nChangeset, pChangeset, bInv, 1)
+ if rc == SQLITE_OK {
+ rc = sessionChangesetApply(tls,
+ db, *(*uintptr)(unsafe.Pointer(bp /* pIter */)), xFilter, xConflict, pCtx, ppRebase, pnRebase, flags)
+ }
+ return rc
}
-// Test for access permissions. Return true if the requested permission
-// is available, or false otherwise.
-func rbuVfsAccess(tls *libc.TLS, pVfs uintptr, zPath uintptr, flags int32, pResOut uintptr) int32 { /* sqlite3.c:204054:12: */
+// Apply the changeset passed via pChangeset/nChangeset to the main database
+// attached to handle "db". Invoke the supplied conflict handler callback
+// to resolve any conflicts encountered while applying the change.
+func Xsqlite3changeset_apply(tls *libc.TLS, db uintptr, nChangeset int32, pChangeset uintptr, xFilter uintptr, xConflict uintptr, pCtx uintptr) int32 { /* sqlite3.c:211472:16: */
+ return Xsqlite3changeset_apply_v2(tls,
+ db, nChangeset, pChangeset, xFilter, xConflict, pCtx, uintptr(0), uintptr(0), 0)
+}
+
+// Apply the changeset passed via xInput/pIn to the main database
+// attached to handle "db". Invoke the supplied conflict handler callback
+// to resolve any conflicts encountered while applying the change.
+func Xsqlite3changeset_apply_v2_strm(tls *libc.TLS, db uintptr, xInput uintptr, pIn uintptr, xFilter uintptr, xConflict uintptr, pCtx uintptr, ppRebase uintptr, pnRebase uintptr, flags int32) int32 { /* sqlite3.c:211497:16: */
bp := tls.Alloc(8)
defer tls.Free(8)
- var pRbuVfs uintptr = pVfs
- var pRealVfs uintptr = (*Rbu_vfs)(unsafe.Pointer(pRbuVfs)).FpRealVfs
- var rc int32
+ // var pIter uintptr at bp, 8
+ // Iterator to skip through changeset
+ var bInverse int32 = libc.BoolInt32(!(!((flags & SQLITE_CHANGESETAPPLY_INVERT) != 0)))
+ var rc int32 = sessionChangesetStart(tls, bp /* &pIter */, xInput, pIn, 0, uintptr(0), bInverse, 1)
+ if rc == SQLITE_OK {
+ rc = sessionChangesetApply(tls,
+ db, *(*uintptr)(unsafe.Pointer(bp /* pIter */)), xFilter, xConflict, pCtx, ppRebase, pnRebase, flags)
+ }
+ return rc
+}
- rc = (*(*func(*libc.TLS, uintptr, uintptr, int32, uintptr) int32)(unsafe.Pointer((pRealVfs + 56 /* &.xAccess */))))(tls, pRealVfs, zPath, flags, pResOut)
+func Xsqlite3changeset_apply_strm(tls *libc.TLS, db uintptr, xInput uintptr, pIn uintptr, xFilter uintptr, xConflict uintptr, pCtx uintptr) int32 { /* sqlite3.c:211524:16: */
+ return Xsqlite3changeset_apply_v2_strm(tls,
+ db, xInput, pIn, xFilter, xConflict, pCtx, uintptr(0), uintptr(0), 0)
+}
- // If this call is to check if a *-wal file associated with an RBU target
- // database connection exists, and the RBU update is in RBU_STAGE_OAL,
- // the following special handling is activated:
- //
- // a) if the *-wal file does exist, return SQLITE_CANTOPEN. This
- // ensures that the RBU extension never tries to update a database
- // in wal mode, even if the first page of the database file has
- // been damaged.
- //
- // b) if the *-wal file does not exist, claim that it does anyway,
- // causing SQLite to call xOpen() to open it. This call will also
- // be intercepted (see the rbuVfsOpen() function) and the *-oal
- // file opened instead.
- if (rc == SQLITE_OK) && (flags == SQLITE_ACCESS_EXISTS) {
- var pDb uintptr = rbuFindMaindb(tls, pRbuVfs, zPath, 1)
- if (pDb != 0) && ((*Sqlite3rbu)(unsafe.Pointer((*Rbu_file)(unsafe.Pointer(pDb)).FpRbu)).FeStage == RBU_STAGE_OAL) {
+// This function is called to merge two changes to the same row together as
+// part of an sqlite3changeset_concat() operation. A new change object is
+// allocated and a pointer to it stored in *ppNew.
+func sessionChangeMerge(tls *libc.TLS, pTab uintptr, bRebase int32, bPatchset int32, pExist uintptr, op2 int32, bIndirect int32, aRec uintptr, nRec int32, ppNew uintptr) int32 { /* sqlite3.c:211558:12: */
+ bp := tls.Alloc(32)
+ defer tls.Free(32)
- if *(*int32)(unsafe.Pointer(pResOut)) != 0 {
- rc = SQLITE_CANTOPEN
+ var pNew uintptr = uintptr(0)
+ var rc int32 = SQLITE_OK
+
+ if !(pExist != 0) {
+ pNew = Xsqlite3_malloc64(tls, (uint64(uint64(unsafe.Sizeof(SessionChange{})) + uint64(nRec))))
+ if !(pNew != 0) {
+ return SQLITE_NOMEM
+ }
+ libc.Xmemset(tls, pNew, 0, uint64(unsafe.Sizeof(SessionChange{})))
+ (*SessionChange)(unsafe.Pointer(pNew)).Fop = U8(op2)
+ (*SessionChange)(unsafe.Pointer(pNew)).FbIndirect = U8(bIndirect)
+ (*SessionChange)(unsafe.Pointer(pNew)).FaRecord = (pNew + 1*32)
+ if (bIndirect == 0) || (bRebase == 0) {
+ (*SessionChange)(unsafe.Pointer(pNew)).FnRecord = nRec
+ libc.Xmemcpy(tls, (*SessionChange)(unsafe.Pointer(pNew)).FaRecord, aRec, uint64(nRec))
+ } else {
+ var i int32
+ var pIn uintptr = aRec
+ var pOut uintptr = (*SessionChange)(unsafe.Pointer(pNew)).FaRecord
+ for i = 0; i < (*SessionTable)(unsafe.Pointer(pTab)).FnCol; i++ {
+ var nIn int32 = sessionSerialLen(tls, pIn)
+ if int32(*(*U8)(unsafe.Pointer(pIn))) == 0 {
+ *(*U8)(unsafe.Pointer(libc.PostIncUintptr(&pOut, 1))) = U8(0)
+ } else if int32(*(*U8)(unsafe.Pointer((*SessionTable)(unsafe.Pointer(pTab)).FabPK + uintptr(i)))) == 0 {
+ *(*U8)(unsafe.Pointer(libc.PostIncUintptr(&pOut, 1))) = U8(0xFF)
+ } else {
+ libc.Xmemcpy(tls, pOut, pIn, uint64(nIn))
+ pOut += uintptr(nIn)
+ }
+ pIn += uintptr(nIn)
+ }
+ (*SessionChange)(unsafe.Pointer(pNew)).FnRecord = (int32((int64(pOut) - int64((*SessionChange)(unsafe.Pointer(pNew)).FaRecord)) / 1))
+ }
+ } else if bRebase != 0 {
+ if (int32((*SessionChange)(unsafe.Pointer(pExist)).Fop) == SQLITE_DELETE) && ((*SessionChange)(unsafe.Pointer(pExist)).FbIndirect != 0) {
+ *(*uintptr)(unsafe.Pointer(ppNew)) = pExist
+ } else {
+ var nByte Sqlite3_int64 = (Sqlite3_int64((uint64(nRec + (*SessionChange)(unsafe.Pointer(pExist)).FnRecord)) + uint64(unsafe.Sizeof(SessionChange{}))))
+ pNew = Xsqlite3_malloc64(tls, uint64(nByte))
+ if pNew == uintptr(0) {
+ rc = SQLITE_NOMEM
} else {
- *(*Sqlite3_int64)(unsafe.Pointer(bp /* sz */)) = int64(0)
- rc = rbuVfsFileSize(tls, (pDb /* &.base */), bp /* &sz */)
- *(*int32)(unsafe.Pointer(pResOut)) = (libc.Bool32(*(*Sqlite3_int64)(unsafe.Pointer(bp /* sz */)) > int64(0)))
+ var i int32
+ var a1 uintptr = (*SessionChange)(unsafe.Pointer(pExist)).FaRecord
+ var a2 uintptr = aRec
+ var pOut uintptr
+
+ libc.Xmemset(tls, pNew, 0, uint64(nByte))
+ (*SessionChange)(unsafe.Pointer(pNew)).FbIndirect = (U8(libc.Bool32((bIndirect != 0) || ((*SessionChange)(unsafe.Pointer(pExist)).FbIndirect != 0))))
+ (*SessionChange)(unsafe.Pointer(pNew)).Fop = U8(op2)
+ pOut = libc.AssignPtrUintptr(pNew+16 /* &.aRecord */, (pNew + 1*32))
+
+ for i = 0; i < (*SessionTable)(unsafe.Pointer(pTab)).FnCol; i++ {
+ var n1 int32 = sessionSerialLen(tls, a1)
+ var n2 int32 = sessionSerialLen(tls, a2)
+ if (int32(*(*U8)(unsafe.Pointer(a1))) == 0xFF) || ((int32(*(*U8)(unsafe.Pointer((*SessionTable)(unsafe.Pointer(pTab)).FabPK + uintptr(i)))) == 0) && (bIndirect != 0)) {
+ *(*U8)(unsafe.Pointer(libc.PostIncUintptr(&pOut, 1))) = U8(0xFF)
+ } else if int32(*(*U8)(unsafe.Pointer(a2))) == 0 {
+ libc.Xmemcpy(tls, pOut, a1, uint64(n1))
+ pOut += uintptr(n1)
+ } else {
+ libc.Xmemcpy(tls, pOut, a2, uint64(n2))
+ pOut += uintptr(n2)
+ }
+ a1 += uintptr(n1)
+ a2 += uintptr(n2)
+ }
+ (*SessionChange)(unsafe.Pointer(pNew)).FnRecord = (int32((int64(pOut) - int64((*SessionChange)(unsafe.Pointer(pNew)).FaRecord)) / 1))
}
+ Xsqlite3_free(tls, pExist)
+ }
+ } else {
+ var op1 int32 = int32((*SessionChange)(unsafe.Pointer(pExist)).Fop)
+
+ // op1=INSERT, op2=INSERT -> Unsupported. Discard op2.
+ // op1=INSERT, op2=UPDATE -> INSERT.
+ // op1=INSERT, op2=DELETE -> (none)
+ //
+ // op1=UPDATE, op2=INSERT -> Unsupported. Discard op2.
+ // op1=UPDATE, op2=UPDATE -> UPDATE.
+ // op1=UPDATE, op2=DELETE -> DELETE.
+ //
+ // op1=DELETE, op2=INSERT -> UPDATE.
+ // op1=DELETE, op2=UPDATE -> Unsupported. Discard op2.
+ // op1=DELETE, op2=DELETE -> Unsupported. Discard op2.
+ if ((((op1 == SQLITE_INSERT) && (op2 == SQLITE_INSERT)) ||
+ ((op1 == SQLITE_UPDATE) && (op2 == SQLITE_INSERT))) ||
+ ((op1 == SQLITE_DELETE) && (op2 == SQLITE_UPDATE))) ||
+ ((op1 == SQLITE_DELETE) && (op2 == SQLITE_DELETE)) {
+ pNew = pExist
+ } else if (op1 == SQLITE_INSERT) && (op2 == SQLITE_DELETE) {
+ Xsqlite3_free(tls, pExist)
+
+ } else {
+ var aExist uintptr = (*SessionChange)(unsafe.Pointer(pExist)).FaRecord
+ var nByte Sqlite3_int64
+ // var aCsr uintptr at bp+8, 8
+
+ // Allocate a new SessionChange object. Ensure that the aRecord[]
+ // buffer of the new object is large enough to hold any record that
+ // may be generated by combining the input records.
+ nByte = (Sqlite3_int64((uint64(unsafe.Sizeof(SessionChange{})) + uint64((*SessionChange)(unsafe.Pointer(pExist)).FnRecord)) + uint64(nRec)))
+ pNew = Xsqlite3_malloc64(tls, uint64(nByte))
+ if !(pNew != 0) {
+ Xsqlite3_free(tls, pExist)
+ return SQLITE_NOMEM
+ }
+ libc.Xmemset(tls, pNew, 0, uint64(unsafe.Sizeof(SessionChange{})))
+ (*SessionChange)(unsafe.Pointer(pNew)).FbIndirect = (U8(libc.Bool32((bIndirect != 0) && ((*SessionChange)(unsafe.Pointer(pExist)).FbIndirect != 0))))
+ *(*uintptr)(unsafe.Pointer(bp + 8 /* aCsr */)) = libc.AssignPtrUintptr(pNew+16 /* &.aRecord */, (pNew + 1*32))
+
+ if op1 == SQLITE_INSERT { // INSERT + UPDATE
+ *(*uintptr)(unsafe.Pointer(bp /* a1 */)) = aRec
+
+ (*SessionChange)(unsafe.Pointer(pNew)).Fop = U8(SQLITE_INSERT)
+ if bPatchset == 0 {
+ sessionSkipRecord(tls, bp /* &a1 */, (*SessionTable)(unsafe.Pointer(pTab)).FnCol)
+ }
+ sessionMergeRecord(tls, bp+8 /* &aCsr */, (*SessionTable)(unsafe.Pointer(pTab)).FnCol, aExist, *(*uintptr)(unsafe.Pointer(bp /* a1 */)))
+ } else if op1 == SQLITE_DELETE { // DELETE + INSERT
+
+ (*SessionChange)(unsafe.Pointer(pNew)).Fop = U8(SQLITE_UPDATE)
+ if bPatchset != 0 {
+ libc.Xmemcpy(tls, *(*uintptr)(unsafe.Pointer(bp + 8 /* aCsr */)), aRec, uint64(nRec))
+ *(*uintptr)(unsafe.Pointer(bp + 8 /* aCsr */)) += uintptr(nRec)
+ } else {
+ if 0 == sessionMergeUpdate(tls, bp+8 /* &aCsr */, pTab, bPatchset, aExist, uintptr(0), aRec, uintptr(0)) {
+ Xsqlite3_free(tls, pNew)
+ pNew = uintptr(0)
+ }
+ }
+ } else if op2 == SQLITE_UPDATE { // UPDATE + UPDATE
+ *(*uintptr)(unsafe.Pointer(bp + 16 /* a1 */)) = aExist
+ *(*uintptr)(unsafe.Pointer(bp + 24 /* a2 */)) = aRec
+
+ if bPatchset == 0 {
+ sessionSkipRecord(tls, bp+16 /* &a1 */, (*SessionTable)(unsafe.Pointer(pTab)).FnCol)
+ sessionSkipRecord(tls, bp+24 /* &a2 */, (*SessionTable)(unsafe.Pointer(pTab)).FnCol)
+ }
+ (*SessionChange)(unsafe.Pointer(pNew)).Fop = U8(SQLITE_UPDATE)
+ if 0 == sessionMergeUpdate(tls, bp+8 /* &aCsr */, pTab, bPatchset, aRec, aExist, *(*uintptr)(unsafe.Pointer(bp + 16 /* a1 */)), *(*uintptr)(unsafe.Pointer(bp + 24 /* a2 */))) {
+ Xsqlite3_free(tls, pNew)
+ pNew = uintptr(0)
+ }
+ } else { // UPDATE + DELETE
+
+ (*SessionChange)(unsafe.Pointer(pNew)).Fop = U8(SQLITE_DELETE)
+ if bPatchset != 0 {
+ libc.Xmemcpy(tls, *(*uintptr)(unsafe.Pointer(bp + 8 /* aCsr */)), aRec, uint64(nRec))
+ *(*uintptr)(unsafe.Pointer(bp + 8 /* aCsr */)) += uintptr(nRec)
+ } else {
+ sessionMergeRecord(tls, bp+8 /* &aCsr */, (*SessionTable)(unsafe.Pointer(pTab)).FnCol, aRec, aExist)
+ }
+ }
+
+ if pNew != 0 {
+ (*SessionChange)(unsafe.Pointer(pNew)).FnRecord = (int32((int64(*(*uintptr)(unsafe.Pointer(bp + 8 /* aCsr */))) - int64((*SessionChange)(unsafe.Pointer(pNew)).FaRecord)) / 1))
+ }
+ Xsqlite3_free(tls, pExist)
}
}
+ *(*uintptr)(unsafe.Pointer(ppNew)) = pNew
return rc
}
-// Populate buffer zOut with the full canonical pathname corresponding
-// to the pathname in zPath. zOut is guaranteed to point to a buffer
-// of at least (DEVSYM_MAX_PATHNAME+1) bytes.
-func rbuVfsFullPathname(tls *libc.TLS, pVfs uintptr, zPath uintptr, nOut int32, zOut uintptr) int32 { /* sqlite3.c:204102:12: */
- var pRealVfs uintptr = (*Rbu_vfs)(unsafe.Pointer(pVfs)).FpRealVfs
- return (*(*func(*libc.TLS, uintptr, uintptr, int32, uintptr) int32)(unsafe.Pointer((pRealVfs + 64 /* &.xFullPathname */))))(tls, pRealVfs, zPath, nOut, zOut)
+// Add all changes in the changeset traversed by the iterator passed as
+// the first argument to the changegroup hash tables.
+func sessionChangesetToHash(tls *libc.TLS, pIter uintptr, pGrp uintptr, bRebase int32) int32 { /* sqlite3.c:211740:12: */
+ bp := tls.Alloc(56)
+ defer tls.Free(56)
+
+ // var aRec uintptr at bp, 8
+
+ // var nRec int32 at bp+8, 4
+
+ var rc int32 = SQLITE_OK
+ var pTab uintptr = uintptr(0)
+
+ for SQLITE_ROW == sessionChangesetNext(tls, pIter, bp /* &aRec */, bp+8 /* &nRec */, uintptr(0)) {
+ // var zNew uintptr at bp+16, 8
+
+ // var nCol int32 at bp+24, 4
+
+ // var op int32 at bp+28, 4
+
+ var iHash int32
+ // var bIndirect int32 at bp+32, 4
+
+ // var pChange uintptr at bp+48, 8
+
+ var pExist uintptr = uintptr(0)
+ var pp uintptr
+
+ if (*Sqlite3_changegroup)(unsafe.Pointer(pGrp)).FpList == uintptr(0) {
+ (*Sqlite3_changegroup)(unsafe.Pointer(pGrp)).FbPatch = (*Sqlite3_changeset_iter)(unsafe.Pointer(pIter)).FbPatchset
+ } else if (*Sqlite3_changeset_iter)(unsafe.Pointer(pIter)).FbPatchset != (*Sqlite3_changegroup)(unsafe.Pointer(pGrp)).FbPatch {
+ rc = SQLITE_ERROR
+ break
+ }
+
+ Xsqlite3changeset_op(tls, pIter, bp+16 /* &zNew */, bp+24 /* &nCol */, bp+28 /* &op */, bp+32 /* &bIndirect */)
+ if !(pTab != 0) || (Xsqlite3_stricmp(tls, *(*uintptr)(unsafe.Pointer(bp + 16 /* zNew */)), (*SessionTable)(unsafe.Pointer(pTab)).FzName) != 0) {
+ // Search the list for a matching table
+ var nNew int32 = int32(libc.Xstrlen(tls, *(*uintptr)(unsafe.Pointer(bp + 16 /* zNew */))))
+ // var abPK uintptr at bp+40, 8
+
+ Xsqlite3changeset_pk(tls, pIter, bp+40 /* &abPK */, uintptr(0))
+ for pTab = (*Sqlite3_changegroup)(unsafe.Pointer(pGrp)).FpList; pTab != 0; pTab = (*SessionTable)(unsafe.Pointer(pTab)).FpNext {
+ if 0 == Xsqlite3_strnicmp(tls, (*SessionTable)(unsafe.Pointer(pTab)).FzName, *(*uintptr)(unsafe.Pointer(bp + 16 /* zNew */)), (nNew+1)) {
+ break
+ }
+ }
+ if !(pTab != 0) {
+ var ppTab uintptr
+
+ pTab = Xsqlite3_malloc64(tls, (uint64(((uint64(unsafe.Sizeof(SessionTable{})) + uint64(*(*int32)(unsafe.Pointer(bp + 24 /* nCol */)))) + uint64(nNew)) + uint64(1))))
+ if !(pTab != 0) {
+ rc = SQLITE_NOMEM
+ break
+ }
+ libc.Xmemset(tls, pTab, 0, uint64(unsafe.Sizeof(SessionTable{})))
+ (*SessionTable)(unsafe.Pointer(pTab)).FnCol = *(*int32)(unsafe.Pointer(bp + 24 /* nCol */))
+ (*SessionTable)(unsafe.Pointer(pTab)).FabPK = (pTab + 1*56)
+ libc.Xmemcpy(tls, (*SessionTable)(unsafe.Pointer(pTab)).FabPK, *(*uintptr)(unsafe.Pointer(bp + 40 /* abPK */)), uint64(*(*int32)(unsafe.Pointer(bp + 24 /* nCol */))))
+ (*SessionTable)(unsafe.Pointer(pTab)).FzName = ((*SessionTable)(unsafe.Pointer(pTab)).FabPK + uintptr(*(*int32)(unsafe.Pointer(bp + 24 /* nCol */))))
+ libc.Xmemcpy(tls, (*SessionTable)(unsafe.Pointer(pTab)).FzName, *(*uintptr)(unsafe.Pointer(bp + 16 /* zNew */)), (uint64(nNew + 1)))
+
+ // The new object must be linked on to the end of the list, not
+ // simply added to the start of it. This is to ensure that the
+ // tables within the output of sqlite3changegroup_output() are in
+ // the right order.
+ for ppTab = (pGrp + 8 /* &.pList */); *(*uintptr)(unsafe.Pointer(ppTab)) != 0; ppTab = (*(*uintptr)(unsafe.Pointer(ppTab)) /* &.pNext */) {
+ }
+ *(*uintptr)(unsafe.Pointer(ppTab)) = pTab
+ } else if ((*SessionTable)(unsafe.Pointer(pTab)).FnCol != *(*int32)(unsafe.Pointer(bp + 24 /* nCol */))) || (libc.Xmemcmp(tls, (*SessionTable)(unsafe.Pointer(pTab)).FabPK, *(*uintptr)(unsafe.Pointer(bp + 40 /* abPK */)), uint64(*(*int32)(unsafe.Pointer(bp + 24 /* nCol */)))) != 0) {
+ rc = SQLITE_SCHEMA
+ break
+ }
+ }
+
+ if sessionGrowHash(tls, uintptr(0), (*Sqlite3_changeset_iter)(unsafe.Pointer(pIter)).FbPatchset, pTab) != 0 {
+ rc = SQLITE_NOMEM
+ break
+ }
+ iHash = int32(sessionChangeHash(tls,
+ pTab, (libc.Bool32(((*Sqlite3_changeset_iter)(unsafe.Pointer(pIter)).FbPatchset != 0) && (*(*int32)(unsafe.Pointer(bp + 28 /* op */)) == SQLITE_DELETE))), *(*uintptr)(unsafe.Pointer(bp /* aRec */)), (*SessionTable)(unsafe.Pointer(pTab)).FnChange))
+
+ // Search for existing entry. If found, remove it from the hash table.
+ // Code below may link it back in.
+ for pp = ((*SessionTable)(unsafe.Pointer(pTab)).FapChange + uintptr(iHash)*8); *(*uintptr)(unsafe.Pointer(pp)) != 0; pp = (*(*uintptr)(unsafe.Pointer(pp)) + 24 /* &.pNext */) {
+ var bPkOnly1 int32 = 0
+ var bPkOnly2 int32 = 0
+ if (*Sqlite3_changeset_iter)(unsafe.Pointer(pIter)).FbPatchset != 0 {
+ bPkOnly1 = (libc.Bool32(int32((*SessionChange)(unsafe.Pointer((*(*uintptr)(unsafe.Pointer(pp))))).Fop) == SQLITE_DELETE))
+ bPkOnly2 = (libc.Bool32(*(*int32)(unsafe.Pointer(bp + 28 /* op */)) == SQLITE_DELETE))
+ }
+ if sessionChangeEqual(tls, pTab, bPkOnly1, (*SessionChange)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(pp)))).FaRecord, bPkOnly2, *(*uintptr)(unsafe.Pointer(bp /* aRec */))) != 0 {
+ pExist = *(*uintptr)(unsafe.Pointer(pp))
+ *(*uintptr)(unsafe.Pointer(pp)) = (*SessionChange)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(pp)))).FpNext
+ (*SessionTable)(unsafe.Pointer(pTab)).FnEntry--
+ break
+ }
+ }
+
+ rc = sessionChangeMerge(tls, pTab, bRebase,
+ (*Sqlite3_changeset_iter)(unsafe.Pointer(pIter)).FbPatchset, pExist, *(*int32)(unsafe.Pointer(bp + 28 /* op */)), *(*int32)(unsafe.Pointer(bp + 32 /* bIndirect */)), *(*uintptr)(unsafe.Pointer(bp /* aRec */)), *(*int32)(unsafe.Pointer(bp + 8 /* nRec */)), bp+48 /* &pChange */)
+ if rc != 0 {
+ break
+ }
+ if *(*uintptr)(unsafe.Pointer(bp + 48 /* pChange */)) != 0 {
+ (*SessionChange)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 48 /* pChange */)))).FpNext = *(*uintptr)(unsafe.Pointer((*SessionTable)(unsafe.Pointer(pTab)).FapChange + uintptr(iHash)*8))
+ *(*uintptr)(unsafe.Pointer((*SessionTable)(unsafe.Pointer(pTab)).FapChange + uintptr(iHash)*8)) = *(*uintptr)(unsafe.Pointer(bp + 48 /* pChange */))
+ (*SessionTable)(unsafe.Pointer(pTab)).FnEntry++
+ }
+ }
+
+ if rc == SQLITE_OK {
+ rc = (*Sqlite3_changeset_iter)(unsafe.Pointer(pIter)).Frc
+ }
+ return rc
}
-// Open the dynamic library located at zPath and return a handle.
-func rbuVfsDlOpen(tls *libc.TLS, pVfs uintptr, zPath uintptr) uintptr { /* sqlite3.c:204116:13: */
- var pRealVfs uintptr = (*Rbu_vfs)(unsafe.Pointer(pVfs)).FpRealVfs
- return (*(*func(*libc.TLS, uintptr, uintptr) uintptr)(unsafe.Pointer((pRealVfs + 72 /* &.xDlOpen */))))(tls, pRealVfs, zPath)
+// Serialize a changeset (or patchset) based on all changesets (or patchsets)
+// added to the changegroup object passed as the first argument.
+//
+// If xOutput is not NULL, then the changeset/patchset is returned to the
+// user via one or more calls to xOutput, as with the other streaming
+// interfaces.
+//
+// Or, if xOutput is NULL, then (*ppOut) is populated with a pointer to a
+// buffer containing the output changeset before this function returns. In
+// this case (*pnOut) is set to the size of the output buffer in bytes. It
+// is the responsibility of the caller to free the output buffer using
+// sqlite3_free() when it is no longer required.
+//
+// If successful, SQLITE_OK is returned. Or, if an error occurs, an SQLite
+// error code. If an error occurs and xOutput is NULL, (*ppOut) and (*pnOut)
+// are both set to 0 before returning.
+func sessionChangegroupOutput(tls *libc.TLS, pGrp uintptr, xOutput uintptr, pOut uintptr, pnOut uintptr, ppOut uintptr) int32 { /* sqlite3.c:211863:12: */
+ bp := tls.Alloc(20)
+ defer tls.Free(20)
+
+ *(*int32)(unsafe.Pointer(bp + 16 /* rc */)) = SQLITE_OK
+ *(*SessionBuffer)(unsafe.Pointer(bp /* buf */)) = SessionBuffer{}
+ var pTab uintptr
+
+ // Create the serialized output changeset based on the contents of the
+ // hash tables attached to the SessionTable objects in list p->pList.
+ for pTab = (*Sqlite3_changegroup)(unsafe.Pointer(pGrp)).FpList; (*(*int32)(unsafe.Pointer(bp + 16 /* rc */)) == SQLITE_OK) && (pTab != 0); pTab = (*SessionTable)(unsafe.Pointer(pTab)).FpNext {
+ var i int32
+ if (*SessionTable)(unsafe.Pointer(pTab)).FnEntry == 0 {
+ continue
+ }
+
+ sessionAppendTableHdr(tls, bp /* &buf */, (*Sqlite3_changegroup)(unsafe.Pointer(pGrp)).FbPatch, pTab, bp+16 /* &rc */)
+ for i = 0; i < (*SessionTable)(unsafe.Pointer(pTab)).FnChange; i++ {
+ var p uintptr
+ for p = *(*uintptr)(unsafe.Pointer((*SessionTable)(unsafe.Pointer(pTab)).FapChange + uintptr(i)*8)); p != 0; p = (*SessionChange)(unsafe.Pointer(p)).FpNext {
+ sessionAppendByte(tls, bp /* &buf */, (*SessionChange)(unsafe.Pointer(p)).Fop, bp+16 /* &rc */)
+ sessionAppendByte(tls, bp /* &buf */, (*SessionChange)(unsafe.Pointer(p)).FbIndirect, bp+16 /* &rc */)
+ sessionAppendBlob(tls, bp /* &buf */, (*SessionChange)(unsafe.Pointer(p)).FaRecord, (*SessionChange)(unsafe.Pointer(p)).FnRecord, bp+16 /* &rc */)
+ if ((*(*int32)(unsafe.Pointer(bp + 16 /* rc */)) == SQLITE_OK) && (xOutput != 0)) && ((*SessionBuffer)(unsafe.Pointer(bp /* &buf */)).FnBuf >= sessions_strm_chunk_size) {
+ *(*int32)(unsafe.Pointer(bp + 16 /* rc */)) = (*struct {
+ f func(*libc.TLS, uintptr, uintptr, int32) int32
+ })(unsafe.Pointer(&struct{ uintptr }{xOutput})).f(tls, pOut, (*SessionBuffer)(unsafe.Pointer(bp /* &buf */)).FaBuf, (*SessionBuffer)(unsafe.Pointer(bp /* &buf */)).FnBuf)
+ (*SessionBuffer)(unsafe.Pointer(bp /* &buf */)).FnBuf = 0
+ }
+ }
+ }
+ }
+
+ if *(*int32)(unsafe.Pointer(bp + 16 /* rc */)) == SQLITE_OK {
+ if xOutput != 0 {
+ if (*SessionBuffer)(unsafe.Pointer(bp /* &buf */)).FnBuf > 0 {
+ *(*int32)(unsafe.Pointer(bp + 16 /* rc */)) = (*struct {
+ f func(*libc.TLS, uintptr, uintptr, int32) int32
+ })(unsafe.Pointer(&struct{ uintptr }{xOutput})).f(tls, pOut, (*SessionBuffer)(unsafe.Pointer(bp /* &buf */)).FaBuf, (*SessionBuffer)(unsafe.Pointer(bp /* &buf */)).FnBuf)
+ }
+ } else {
+ *(*uintptr)(unsafe.Pointer(ppOut)) = (*SessionBuffer)(unsafe.Pointer(bp /* &buf */)).FaBuf
+ *(*int32)(unsafe.Pointer(pnOut)) = (*SessionBuffer)(unsafe.Pointer(bp /* &buf */)).FnBuf
+ (*SessionBuffer)(unsafe.Pointer(bp /* &buf */)).FaBuf = uintptr(0)
+ }
+ }
+ Xsqlite3_free(tls, (*SessionBuffer)(unsafe.Pointer(bp /* &buf */)).FaBuf)
+
+ return *(*int32)(unsafe.Pointer(bp + 16 /* rc */))
}
-// Populate the buffer zErrMsg (size nByte bytes) with a human readable
-// utf-8 string describing the most recent error encountered associated
-// with dynamic libraries.
-func rbuVfsDlError(tls *libc.TLS, pVfs uintptr, nByte int32, zErrMsg uintptr) { /* sqlite3.c:204126:13: */
- var pRealVfs uintptr = (*Rbu_vfs)(unsafe.Pointer(pVfs)).FpRealVfs
- (*(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer((pRealVfs + 80 /* &.xDlError */))))(tls, pRealVfs, nByte, zErrMsg)
+// Allocate a new, empty, sqlite3_changegroup.
+func Xsqlite3changegroup_new(tls *libc.TLS, pp uintptr) int32 { /* sqlite3.c:211914:16: */
+ var rc int32 = SQLITE_OK // Return code
+ var p uintptr // New object
+ p = Xsqlite3_malloc(tls, int32(unsafe.Sizeof(Sqlite3_changegroup{})))
+ if p == uintptr(0) {
+ rc = SQLITE_NOMEM
+ } else {
+ libc.Xmemset(tls, p, 0, uint64(unsafe.Sizeof(Sqlite3_changegroup{})))
+ }
+ *(*uintptr)(unsafe.Pointer(pp)) = p
+ return rc
}
-// Return a pointer to the symbol zSymbol in the dynamic library pHandle.
-func rbuVfsDlSym(tls *libc.TLS, pVfs uintptr, pArg uintptr, zSym uintptr) uintptr { /* sqlite3.c:204134:13: */
- var pRealVfs uintptr = (*Rbu_vfs)(unsafe.Pointer(pVfs)).FpRealVfs
- return (*(*func(*libc.TLS, uintptr, uintptr, uintptr) uintptr)(unsafe.Pointer((pRealVfs + 88 /* &.xDlSym */))))(tls, pRealVfs, pArg, zSym)
+// Add the changeset currently stored in buffer pData, size nData bytes,
+// to changeset-group p.
+func Xsqlite3changegroup_add(tls *libc.TLS, pGrp uintptr, nData int32, pData uintptr) int32 { /* sqlite3.c:211931:16: */
+ bp := tls.Alloc(8)
+ defer tls.Free(8)
+
+ // var pIter uintptr at bp, 8
+ // Iterator opened on pData/nData
+ var rc int32 // Return code
+
+ rc = Xsqlite3changeset_start(tls, bp /* &pIter */, nData, pData)
+ if rc == SQLITE_OK {
+ rc = sessionChangesetToHash(tls, *(*uintptr)(unsafe.Pointer(bp /* pIter */)), pGrp, 0)
+ }
+ Xsqlite3changeset_finalize(tls, *(*uintptr)(unsafe.Pointer(bp /* pIter */)))
+ return rc
}
-// Close the dynamic library handle pHandle.
-func rbuVfsDlClose(tls *libc.TLS, pVfs uintptr, pHandle uintptr) { /* sqlite3.c:204146:13: */
- var pRealVfs uintptr = (*Rbu_vfs)(unsafe.Pointer(pVfs)).FpRealVfs
- (*(*func(*libc.TLS, uintptr, uintptr))(unsafe.Pointer((pRealVfs + 96 /* &.xDlClose */))))(tls, pRealVfs, pHandle)
+// Obtain a buffer containing a changeset representing the concatenation
+// of all changesets added to the group so far.
+func Xsqlite3changegroup_output(tls *libc.TLS, pGrp uintptr, pnData uintptr, ppData uintptr) int32 { /* sqlite3.c:211947:16: */
+ return sessionChangegroupOutput(tls, pGrp, uintptr(0), uintptr(0), pnData, ppData)
}
-// Populate the buffer pointed to by zBufOut with nByte bytes of
-// random data.
-func rbuVfsRandomness(tls *libc.TLS, pVfs uintptr, nByte int32, zBufOut uintptr) int32 { /* sqlite3.c:204156:12: */
- var pRealVfs uintptr = (*Rbu_vfs)(unsafe.Pointer(pVfs)).FpRealVfs
- return (*(*func(*libc.TLS, uintptr, int32, uintptr) int32)(unsafe.Pointer((pRealVfs + 104 /* &.xRandomness */))))(tls, pRealVfs, nByte, zBufOut)
+// Streaming versions of changegroup_add().
+func Xsqlite3changegroup_add_strm(tls *libc.TLS, pGrp uintptr, xInput uintptr, pIn uintptr) int32 { /* sqlite3.c:211958:16: */
+ bp := tls.Alloc(8)
+ defer tls.Free(8)
+
+ // var pIter uintptr at bp, 8
+ // Iterator opened on pData/nData
+ var rc int32 // Return code
+
+ rc = Xsqlite3changeset_start_strm(tls, bp /* &pIter */, xInput, pIn)
+ if rc == SQLITE_OK {
+ rc = sessionChangesetToHash(tls, *(*uintptr)(unsafe.Pointer(bp /* pIter */)), pGrp, 0)
+ }
+ Xsqlite3changeset_finalize(tls, *(*uintptr)(unsafe.Pointer(bp /* pIter */)))
+ return rc
}
-// Sleep for nMicro microseconds. Return the number of microseconds
-// actually slept.
-func rbuVfsSleep(tls *libc.TLS, pVfs uintptr, nMicro int32) int32 { /* sqlite3.c:204165:12: */
- var pRealVfs uintptr = (*Rbu_vfs)(unsafe.Pointer(pVfs)).FpRealVfs
- return (*(*func(*libc.TLS, uintptr, int32) int32)(unsafe.Pointer((pRealVfs + 112 /* &.xSleep */))))(tls, pRealVfs, nMicro)
+// Streaming versions of changegroup_output().
+func Xsqlite3changegroup_output_strm(tls *libc.TLS, pGrp uintptr, xOutput uintptr, pOut uintptr) int32 { /* sqlite3.c:211977:16: */
+ return sessionChangegroupOutput(tls, pGrp, xOutput, pOut, uintptr(0), uintptr(0))
}
-// Return the current time as a Julian Day number in *pTimeOut.
-func rbuVfsCurrentTime(tls *libc.TLS, pVfs uintptr, pTimeOut uintptr) int32 { /* sqlite3.c:204173:12: */
- var pRealVfs uintptr = (*Rbu_vfs)(unsafe.Pointer(pVfs)).FpRealVfs
- return (*(*func(*libc.TLS, uintptr, uintptr) int32)(unsafe.Pointer((pRealVfs + 120 /* &.xCurrentTime */))))(tls, pRealVfs, pTimeOut)
+// Delete a changegroup object.
+func Xsqlite3changegroup_delete(tls *libc.TLS, pGrp uintptr) { /* sqlite3.c:211988:17: */
+ if pGrp != 0 {
+ sessionDeleteTable(tls, uintptr(0), (*Sqlite3_changegroup)(unsafe.Pointer(pGrp)).FpList)
+ Xsqlite3_free(tls, pGrp)
+ }
}
-// No-op.
-func rbuVfsGetLastError(tls *libc.TLS, pVfs uintptr, a int32, b uintptr) int32 { /* sqlite3.c:204181:12: */
- return 0
+// Combine two changesets together.
+func Xsqlite3changeset_concat(tls *libc.TLS, nLeft int32, pLeft uintptr, nRight int32, pRight uintptr, pnOut uintptr, ppOut uintptr) int32 { /* sqlite3.c:211998:16: */
+ bp := tls.Alloc(8)
+ defer tls.Free(8)
+
+ // var pGrp uintptr at bp, 8
+
+ var rc int32
+
+ rc = Xsqlite3changegroup_new(tls, bp /* &pGrp */)
+ if rc == SQLITE_OK {
+ rc = Xsqlite3changegroup_add(tls, *(*uintptr)(unsafe.Pointer(bp /* pGrp */)), nLeft, pLeft)
+ }
+ if rc == SQLITE_OK {
+ rc = Xsqlite3changegroup_add(tls, *(*uintptr)(unsafe.Pointer(bp /* pGrp */)), nRight, pRight)
+ }
+ if rc == SQLITE_OK {
+ rc = Xsqlite3changegroup_output(tls, *(*uintptr)(unsafe.Pointer(bp /* pGrp */)), pnOut, ppOut)
+ }
+ Xsqlite3changegroup_delete(tls, *(*uintptr)(unsafe.Pointer(bp /* pGrp */)))
+
+ return rc
}
-// Deregister and destroy an RBU vfs created by an earlier call to
-// sqlite3rbu_create_vfs().
-func Xsqlite3rbu_destroy_vfs(tls *libc.TLS, zName uintptr) { /* sqlite3.c:204189:17: */
- var pVfs uintptr = Xsqlite3_vfs_find(tls, zName)
- if (pVfs != 0) && ((*Sqlite3_vfs)(unsafe.Pointer(pVfs)).FxOpen == *(*uintptr)(unsafe.Pointer(&struct {
- f func(*libc.TLS, uintptr, uintptr, uintptr, int32, uintptr) int32
- }{rbuVfsOpen}))) {
- Xsqlite3_mutex_free(tls, (*Rbu_vfs)(unsafe.Pointer(pVfs)).Fmutex)
- Xsqlite3_vfs_unregister(tls, pVfs)
- Xsqlite3_free(tls, pVfs)
+// Streaming version of sqlite3changeset_concat().
+func Xsqlite3changeset_concat_strm(tls *libc.TLS, xInputA uintptr, pInA uintptr, xInputB uintptr, pInB uintptr, xOutput uintptr, pOut uintptr) int32 { /* sqlite3.c:212027:16: */
+ bp := tls.Alloc(8)
+ defer tls.Free(8)
+
+ // var pGrp uintptr at bp, 8
+
+ var rc int32
+
+ rc = Xsqlite3changegroup_new(tls, bp /* &pGrp */)
+ if rc == SQLITE_OK {
+ rc = Xsqlite3changegroup_add_strm(tls, *(*uintptr)(unsafe.Pointer(bp /* pGrp */)), xInputA, pInA)
+ }
+ if rc == SQLITE_OK {
+ rc = Xsqlite3changegroup_add_strm(tls, *(*uintptr)(unsafe.Pointer(bp /* pGrp */)), xInputB, pInB)
+ }
+ if rc == SQLITE_OK {
+ rc = Xsqlite3changegroup_output_strm(tls, *(*uintptr)(unsafe.Pointer(bp /* pGrp */)), xOutput, pOut)
}
+ Xsqlite3changegroup_delete(tls, *(*uintptr)(unsafe.Pointer(bp /* pGrp */)))
+
+ return rc
}
-// Create an RBU VFS named zName that accesses the underlying file-system
-// via existing VFS zParent. The new object is registered as a non-default
-// VFS with SQLite before returning.
-func Xsqlite3rbu_create_vfs(tls *libc.TLS, zName uintptr, zParent uintptr) int32 { /* sqlite3.c:204203:16: */
+// Buffers a1 and a2 must both contain a sessions module record nCol
+// fields in size. This function appends an nCol sessions module
+// record to buffer pBuf that is a copy of a1, except that for
+// each field that is undefined in a1[], swap in the field from a2[].
+func sessionAppendRecordMerge(tls *libc.TLS, pBuf uintptr, nCol int32, a1 uintptr, n1 int32, a2 uintptr, n2 int32, pRc uintptr) { /* sqlite3.c:212066:13: */
+ sessionBufferGrow(tls, pBuf, (int64(n1 + n2)), pRc)
+ if *(*int32)(unsafe.Pointer(pRc)) == SQLITE_OK {
+ var i int32
+ var pOut uintptr = ((*SessionBuffer)(unsafe.Pointer(pBuf)).FaBuf + uintptr((*SessionBuffer)(unsafe.Pointer(pBuf)).FnBuf))
+ for i = 0; i < nCol; i++ {
+ var nn1 int32 = sessionSerialLen(tls, a1)
+ var nn2 int32 = sessionSerialLen(tls, a2)
+ if (int32(*(*U8)(unsafe.Pointer(a1))) == 0) || (int32(*(*U8)(unsafe.Pointer(a1))) == 0xFF) {
+ libc.Xmemcpy(tls, pOut, a2, uint64(nn2))
+ pOut += uintptr(nn2)
+ } else {
+ libc.Xmemcpy(tls, pOut, a1, uint64(nn1))
+ pOut += uintptr(nn1)
+ }
+ a1 += uintptr(nn1)
+ a2 += uintptr(nn2)
+ }
- var pNew uintptr = uintptr(0) // Newly allocated VFS
- var rc int32 = SQLITE_OK
- var nName Size_t
- var nByte Size_t
+ (*SessionBuffer)(unsafe.Pointer(pBuf)).FnBuf = (int32((int64(pOut) - int64((*SessionBuffer)(unsafe.Pointer(pBuf)).FaBuf)) / 1))
- nName = libc.Xstrlen(tls, zName)
- nByte = ((uint64(unsafe.Sizeof(Rbu_vfs{})) + nName) + uint64(1))
- pNew = Xsqlite3_malloc64(tls, uint64(nByte))
- if pNew == uintptr(0) {
- rc = SQLITE_NOMEM
- } else {
- var pParent uintptr // Parent VFS
- libc.Xmemset(tls, pNew, 0, nByte)
- pParent = Xsqlite3_vfs_find(tls, zParent)
- if pParent == uintptr(0) {
- rc = SQLITE_NOTFOUND
- } else {
- var zSpace uintptr
- libc.Xmemcpy(tls, (pNew /* &.base */), uintptr(unsafe.Pointer(&vfs_template)), uint64(unsafe.Sizeof(Sqlite3_vfs{})))
- (*Rbu_vfs)(unsafe.Pointer(pNew)).Fbase.FmxPathname = (*Sqlite3_vfs)(unsafe.Pointer(pParent)).FmxPathname
- (*Rbu_vfs)(unsafe.Pointer(pNew)).Fbase.FszOsFile = (int32(uint64(unsafe.Sizeof(Rbu_file{})) + uint64((*Sqlite3_vfs)(unsafe.Pointer(pParent)).FszOsFile)))
- (*Rbu_vfs)(unsafe.Pointer(pNew)).FpRealVfs = pParent
- (*Rbu_vfs)(unsafe.Pointer(pNew)).Fbase.FzName = libc.AssignUintptr(&zSpace, (pNew + 1*208))
- libc.Xmemcpy(tls, zSpace, zName, nName)
+ }
+}
- // Allocate the mutex and register the new VFS (not as the default)
- (*Rbu_vfs)(unsafe.Pointer(pNew)).Fmutex = Xsqlite3_mutex_alloc(tls, SQLITE_MUTEX_RECURSIVE)
- if (*Rbu_vfs)(unsafe.Pointer(pNew)).Fmutex == uintptr(0) {
- rc = SQLITE_NOMEM
+// This function is called when rebasing a local UPDATE change against one
+// or more remote UPDATE changes. The aRec/nRec buffer contains the current
+// old.* and new.* records for the change. The rebase buffer (a single
+// record) is in aChange/nChange. The rebased change is appended to buffer
+// pBuf.
+//
+// Rebasing the UPDATE involves:
+//
+// * Removing any changes to fields for which the corresponding field
+// in the rebase buffer is set to "replaced" (type 0xFF). If this
+// means the UPDATE change updates no fields, nothing is appended
+// to the output buffer.
+//
+// * For each field modified by the local change for which the
+// corresponding field in the rebase buffer is not "undefined" (0x00)
+// or "replaced" (0xFF), the old.* value is replaced by the value
+// in the rebase buffer.
+func sessionAppendPartialUpdate(tls *libc.TLS, pBuf uintptr, pIter uintptr, aRec uintptr, nRec int32, aChange uintptr, nChange int32, pRc uintptr) { /* sqlite3.c:212115:13: */
+ sessionBufferGrow(tls, pBuf, (int64((2 + nRec) + nChange)), pRc)
+ if *(*int32)(unsafe.Pointer(pRc)) == SQLITE_OK {
+ var bData int32 = 0
+ var pOut uintptr = ((*SessionBuffer)(unsafe.Pointer(pBuf)).FaBuf + uintptr((*SessionBuffer)(unsafe.Pointer(pBuf)).FnBuf))
+ var i int32
+ var a1 uintptr = aRec
+ var a2 uintptr = aChange
+
+ *(*U8)(unsafe.Pointer(libc.PostIncUintptr(&pOut, 1))) = U8(SQLITE_UPDATE)
+ *(*U8)(unsafe.Pointer(libc.PostIncUintptr(&pOut, 1))) = U8((*Sqlite3_changeset_iter)(unsafe.Pointer(pIter)).FbIndirect)
+ for i = 0; i < (*Sqlite3_changeset_iter)(unsafe.Pointer(pIter)).FnCol; i++ {
+ var n1 int32 = sessionSerialLen(tls, a1)
+ var n2 int32 = sessionSerialLen(tls, a2)
+ if (*(*U8)(unsafe.Pointer((*Sqlite3_changeset_iter)(unsafe.Pointer(pIter)).FabPK + uintptr(i))) != 0) || (int32(*(*U8)(unsafe.Pointer(a2))) == 0) {
+ if !(int32(*(*U8)(unsafe.Pointer((*Sqlite3_changeset_iter)(unsafe.Pointer(pIter)).FabPK + uintptr(i)))) != 0) && (*(*U8)(unsafe.Pointer(a1)) != 0) {
+ bData = 1
+ }
+ libc.Xmemcpy(tls, pOut, a1, uint64(n1))
+ pOut += uintptr(n1)
+ } else if int32(*(*U8)(unsafe.Pointer(a2))) != 0xFF {
+ bData = 1
+ libc.Xmemcpy(tls, pOut, a2, uint64(n2))
+ pOut += uintptr(n2)
} else {
- rc = Xsqlite3_vfs_register(tls, (pNew /* &.base */), 0)
+ *(*U8)(unsafe.Pointer(libc.PostIncUintptr(&pOut, 1))) = U8(0)
+ }
+ a1 += uintptr(n1)
+ a2 += uintptr(n2)
+ }
+ if bData != 0 {
+ a2 = aChange
+ for i = 0; i < (*Sqlite3_changeset_iter)(unsafe.Pointer(pIter)).FnCol; i++ {
+ var n1 int32 = sessionSerialLen(tls, a1)
+ var n2 int32 = sessionSerialLen(tls, a2)
+ if (*(*U8)(unsafe.Pointer((*Sqlite3_changeset_iter)(unsafe.Pointer(pIter)).FabPK + uintptr(i))) != 0) || (int32(*(*U8)(unsafe.Pointer(a2))) != 0xFF) {
+ libc.Xmemcpy(tls, pOut, a1, uint64(n1))
+ pOut += uintptr(n1)
+ } else {
+ *(*U8)(unsafe.Pointer(libc.PostIncUintptr(&pOut, 1))) = U8(0)
+ }
+ a1 += uintptr(n1)
+ a2 += uintptr(n2)
}
+ (*SessionBuffer)(unsafe.Pointer(pBuf)).FnBuf = (int32((int64(pOut) - int64((*SessionBuffer)(unsafe.Pointer(pBuf)).FaBuf)) / 1))
}
+ }
+}
- if rc != SQLITE_OK {
- Xsqlite3_mutex_free(tls, (*Rbu_vfs)(unsafe.Pointer(pNew)).Fmutex)
- Xsqlite3_free(tls, pNew)
+// pIter is configured to iterate through a changeset. This function rebases
+// that changeset according to the current configuration of the rebaser
+// object passed as the first argument. If no error occurs and argument xOutput
+// is not NULL, then the changeset is returned to the caller by invoking
+// xOutput zero or more times and SQLITE_OK returned. Or, if xOutput is NULL,
+// then (*ppOut) is set to point to a buffer containing the rebased changeset
+// before this function returns. In this case (*pnOut) is set to the size of
+// the buffer in bytes. It is the responsibility of the caller to eventually
+// free the (*ppOut) buffer using sqlite3_free().
+//
+// If an error occurs, an SQLite error code is returned. If ppOut and
+// pnOut are not NULL, then the two output parameters are set to 0 before
+// returning.
+func sessionRebase(tls *libc.TLS, p uintptr, pIter uintptr, xOutput uintptr, pOut uintptr, pnOut uintptr, ppOut uintptr) int32 { /* sqlite3.c:212183:12: */
+ bp := tls.Alloc(48)
+ defer tls.Free(48)
+
+ *(*int32)(unsafe.Pointer(bp + 32 /* rc */)) = SQLITE_OK
+ *(*uintptr)(unsafe.Pointer(bp /* aRec */)) = uintptr(0)
+ *(*int32)(unsafe.Pointer(bp + 8 /* nRec */)) = 0
+ *(*int32)(unsafe.Pointer(bp + 12 /* bNew */)) = 0
+ var pTab uintptr = uintptr(0)
+ *(*SessionBuffer)(unsafe.Pointer(bp + 16 /* sOut */)) = SessionBuffer{}
+
+ for SQLITE_ROW == sessionChangesetNext(tls, pIter, bp /* &aRec */, bp+8 /* &nRec */, bp+12 /* &bNew */) {
+ var pChange uintptr = uintptr(0)
+ var bDone int32 = 0
+
+ if *(*int32)(unsafe.Pointer(bp + 12 /* bNew */)) != 0 {
+ var zTab uintptr = (*Sqlite3_changeset_iter)(unsafe.Pointer(pIter)).FzTab
+ for pTab = (*Sqlite3_rebaser)(unsafe.Pointer(p)).Fgrp.FpList; pTab != 0; pTab = (*SessionTable)(unsafe.Pointer(pTab)).FpNext {
+ if 0 == Xsqlite3_stricmp(tls, (*SessionTable)(unsafe.Pointer(pTab)).FzName, zTab) {
+ break
+ }
+ }
+ *(*int32)(unsafe.Pointer(bp + 12 /* bNew */)) = 0
+
+ // A patchset may not be rebased
+ if (*Sqlite3_changeset_iter)(unsafe.Pointer(pIter)).FbPatchset != 0 {
+ *(*int32)(unsafe.Pointer(bp + 32 /* rc */)) = SQLITE_ERROR
+ }
+
+ // Append a table header to the output for this new table
+ sessionAppendByte(tls, bp+16 /* &sOut */, func() uint8 {
+ if (*Sqlite3_changeset_iter)(unsafe.Pointer(pIter)).FbPatchset != 0 {
+ return uint8('P')
+ }
+ return uint8('T')
+ }(), bp+32 /* &rc */)
+ sessionAppendVarint(tls, bp+16 /* &sOut */, (*Sqlite3_changeset_iter)(unsafe.Pointer(pIter)).FnCol, bp+32 /* &rc */)
+ sessionAppendBlob(tls, bp+16 /* &sOut */, (*Sqlite3_changeset_iter)(unsafe.Pointer(pIter)).FabPK, (*Sqlite3_changeset_iter)(unsafe.Pointer(pIter)).FnCol, bp+32 /* &rc */)
+ sessionAppendBlob(tls, bp+16 /* &sOut */, (*Sqlite3_changeset_iter)(unsafe.Pointer(pIter)).FzTab, (int32(libc.Xstrlen(tls, (*Sqlite3_changeset_iter)(unsafe.Pointer(pIter)).FzTab)) + 1), bp+32 /* &rc */)
+ }
+
+ if (pTab != 0) && (*(*int32)(unsafe.Pointer(bp + 32 /* rc */)) == SQLITE_OK) {
+ var iHash int32 = int32(sessionChangeHash(tls, pTab, 0, *(*uintptr)(unsafe.Pointer(bp /* aRec */)), (*SessionTable)(unsafe.Pointer(pTab)).FnChange))
+
+ for pChange = *(*uintptr)(unsafe.Pointer((*SessionTable)(unsafe.Pointer(pTab)).FapChange + uintptr(iHash)*8)); pChange != 0; pChange = (*SessionChange)(unsafe.Pointer(pChange)).FpNext {
+ if sessionChangeEqual(tls, pTab, 0, *(*uintptr)(unsafe.Pointer(bp /* aRec */)), 0, (*SessionChange)(unsafe.Pointer(pChange)).FaRecord) != 0 {
+ break
+ }
+ }
+ }
+
+ if pChange != 0 {
+
+ switch (*Sqlite3_changeset_iter)(unsafe.Pointer(pIter)).Fop {
+ case SQLITE_INSERT:
+ if int32((*SessionChange)(unsafe.Pointer(pChange)).Fop) == SQLITE_INSERT {
+ bDone = 1
+ if int32((*SessionChange)(unsafe.Pointer(pChange)).FbIndirect) == 0 {
+ sessionAppendByte(tls, bp+16 /* &sOut */, uint8(SQLITE_UPDATE), bp+32 /* &rc */)
+ sessionAppendByte(tls, bp+16 /* &sOut */, uint8((*Sqlite3_changeset_iter)(unsafe.Pointer(pIter)).FbIndirect), bp+32 /* &rc */)
+ sessionAppendBlob(tls, bp+16 /* &sOut */, (*SessionChange)(unsafe.Pointer(pChange)).FaRecord, (*SessionChange)(unsafe.Pointer(pChange)).FnRecord, bp+32 /* &rc */)
+ sessionAppendBlob(tls, bp+16 /* &sOut */, *(*uintptr)(unsafe.Pointer(bp /* aRec */)), *(*int32)(unsafe.Pointer(bp + 8 /* nRec */)), bp+32 /* &rc */)
+ }
+ }
+ break
+ fallthrough
+
+ case SQLITE_UPDATE:
+ bDone = 1
+ if int32((*SessionChange)(unsafe.Pointer(pChange)).Fop) == SQLITE_DELETE {
+ if int32((*SessionChange)(unsafe.Pointer(pChange)).FbIndirect) == 0 {
+ *(*uintptr)(unsafe.Pointer(bp + 40 /* pCsr */)) = *(*uintptr)(unsafe.Pointer(bp /* aRec */))
+ sessionSkipRecord(tls, bp+40 /* &pCsr */, (*Sqlite3_changeset_iter)(unsafe.Pointer(pIter)).FnCol)
+ sessionAppendByte(tls, bp+16 /* &sOut */, uint8(SQLITE_INSERT), bp+32 /* &rc */)
+ sessionAppendByte(tls, bp+16 /* &sOut */, uint8((*Sqlite3_changeset_iter)(unsafe.Pointer(pIter)).FbIndirect), bp+32 /* &rc */)
+ sessionAppendRecordMerge(tls, bp+16 /* &sOut */, (*Sqlite3_changeset_iter)(unsafe.Pointer(pIter)).FnCol,
+ *(*uintptr)(unsafe.Pointer(bp + 40 /* pCsr */)), (int32(int64(*(*int32)(unsafe.Pointer(bp + 8 /* nRec */))) - ((int64(*(*uintptr)(unsafe.Pointer(bp + 40 /* pCsr */))) - int64(*(*uintptr)(unsafe.Pointer(bp /* aRec */)))) / 1))),
+ (*SessionChange)(unsafe.Pointer(pChange)).FaRecord, (*SessionChange)(unsafe.Pointer(pChange)).FnRecord, bp+32 /* &rc */)
+ }
+ } else {
+ sessionAppendPartialUpdate(tls, bp+16 /* &sOut */, pIter,
+ *(*uintptr)(unsafe.Pointer(bp /* aRec */)), *(*int32)(unsafe.Pointer(bp + 8 /* nRec */)), (*SessionChange)(unsafe.Pointer(pChange)).FaRecord, (*SessionChange)(unsafe.Pointer(pChange)).FnRecord, bp+32 /* &rc */)
+ }
+ break
+ fallthrough
+
+ default:
+
+ bDone = 1
+ if int32((*SessionChange)(unsafe.Pointer(pChange)).Fop) == SQLITE_INSERT {
+ sessionAppendByte(tls, bp+16 /* &sOut */, uint8(SQLITE_DELETE), bp+32 /* &rc */)
+ sessionAppendByte(tls, bp+16 /* &sOut */, uint8((*Sqlite3_changeset_iter)(unsafe.Pointer(pIter)).FbIndirect), bp+32 /* &rc */)
+ sessionAppendRecordMerge(tls, bp+16 /* &sOut */, (*Sqlite3_changeset_iter)(unsafe.Pointer(pIter)).FnCol,
+ (*SessionChange)(unsafe.Pointer(pChange)).FaRecord, (*SessionChange)(unsafe.Pointer(pChange)).FnRecord, *(*uintptr)(unsafe.Pointer(bp /* aRec */)), *(*int32)(unsafe.Pointer(bp + 8 /* nRec */)), bp+32 /* &rc */)
+ }
+ break
+ }
+ }
+
+ if bDone == 0 {
+ sessionAppendByte(tls, bp+16 /* &sOut */, uint8((*Sqlite3_changeset_iter)(unsafe.Pointer(pIter)).Fop), bp+32 /* &rc */)
+ sessionAppendByte(tls, bp+16 /* &sOut */, uint8((*Sqlite3_changeset_iter)(unsafe.Pointer(pIter)).FbIndirect), bp+32 /* &rc */)
+ sessionAppendBlob(tls, bp+16 /* &sOut */, *(*uintptr)(unsafe.Pointer(bp /* aRec */)), *(*int32)(unsafe.Pointer(bp + 8 /* nRec */)), bp+32 /* &rc */)
+ }
+ if ((*(*int32)(unsafe.Pointer(bp + 32 /* rc */)) == SQLITE_OK) && (xOutput != 0)) && ((*SessionBuffer)(unsafe.Pointer(bp+16 /* &sOut */)).FnBuf > sessions_strm_chunk_size) {
+ *(*int32)(unsafe.Pointer(bp + 32 /* rc */)) = (*struct {
+ f func(*libc.TLS, uintptr, uintptr, int32) int32
+ })(unsafe.Pointer(&struct{ uintptr }{xOutput})).f(tls, pOut, (*SessionBuffer)(unsafe.Pointer(bp+16 /* &sOut */)).FaBuf, (*SessionBuffer)(unsafe.Pointer(bp+16 /* &sOut */)).FnBuf)
+ (*SessionBuffer)(unsafe.Pointer(bp + 16 /* &sOut */)).FnBuf = 0
+ }
+ if *(*int32)(unsafe.Pointer(bp + 32 /* rc */)) != 0 {
+ break
}
}
- return rc
+ if *(*int32)(unsafe.Pointer(bp + 32 /* rc */)) != SQLITE_OK {
+ Xsqlite3_free(tls, (*SessionBuffer)(unsafe.Pointer(bp+16 /* &sOut */)).FaBuf)
+ libc.Xmemset(tls, bp+16 /* &sOut */, 0, uint64(unsafe.Sizeof(SessionBuffer{})))
+ }
+
+ if *(*int32)(unsafe.Pointer(bp + 32 /* rc */)) == SQLITE_OK {
+ if xOutput != 0 {
+ if (*SessionBuffer)(unsafe.Pointer(bp+16 /* &sOut */)).FnBuf > 0 {
+ *(*int32)(unsafe.Pointer(bp + 32 /* rc */)) = (*struct {
+ f func(*libc.TLS, uintptr, uintptr, int32) int32
+ })(unsafe.Pointer(&struct{ uintptr }{xOutput})).f(tls, pOut, (*SessionBuffer)(unsafe.Pointer(bp+16 /* &sOut */)).FaBuf, (*SessionBuffer)(unsafe.Pointer(bp+16 /* &sOut */)).FnBuf)
+ }
+ } else {
+ *(*uintptr)(unsafe.Pointer(ppOut)) = (*SessionBuffer)(unsafe.Pointer(bp + 16 /* &sOut */)).FaBuf
+ *(*int32)(unsafe.Pointer(pnOut)) = (*SessionBuffer)(unsafe.Pointer(bp + 16 /* &sOut */)).FnBuf
+ (*SessionBuffer)(unsafe.Pointer(bp + 16 /* &sOut */)).FaBuf = uintptr(0)
+ }
+ }
+ Xsqlite3_free(tls, (*SessionBuffer)(unsafe.Pointer(bp+16 /* &sOut */)).FaBuf)
+ return *(*int32)(unsafe.Pointer(bp + 32 /* rc */))
}
-var vfs_template = Sqlite3_vfs{
- FiVersion: 1, // pAppData
- FxOpen: 0, // xOpen
- FxDelete: 0, // xDelete
- FxAccess: 0, // xAccess
- FxFullPathname: 0, // xFullPathname
+// Create a new rebaser object.
+func Xsqlite3rebaser_create(tls *libc.TLS, ppNew uintptr) int32 { /* sqlite3.c:212315:16: */
+ var rc int32 = SQLITE_OK
+ var pNew uintptr
- FxDlOpen: 0, // xDlOpen
- FxDlError: 0, // xDlError
- FxDlSym: 0, // xDlSym
- FxDlClose: 0, // xDlClose
+ pNew = Xsqlite3_malloc(tls, int32(unsafe.Sizeof(Sqlite3_rebaser{})))
+ if pNew == uintptr(0) {
+ rc = SQLITE_NOMEM
+ } else {
+ libc.Xmemset(tls, pNew, 0, uint64(unsafe.Sizeof(Sqlite3_rebaser{})))
+ }
+ *(*uintptr)(unsafe.Pointer(ppNew)) = pNew
+ return rc
+}
- FxRandomness: 0, // xRandomness
- FxSleep: 0, // xSleep
- FxCurrentTime: 0, // xCurrentTime
- FxGetLastError: 0, // Unimplemented version 3 methods
-} /* sqlite3.c:204206:22 */
+// Call this one or more times to configure a rebaser.
+func Xsqlite3rebaser_configure(tls *libc.TLS, p uintptr, nRebase int32, pRebase uintptr) int32 { /* sqlite3.c:212332:16: */
+ bp := tls.Alloc(8)
+ defer tls.Free(8)
-// Configure the aggregate temp file size limit for this RBU handle.
-func Xsqlite3rbu_temp_size_limit(tls *libc.TLS, pRbu uintptr, n Sqlite3_int64) Sqlite3_int64 { /* sqlite3.c:204281:26: */
- if n >= int64(0) {
- (*Sqlite3rbu)(unsafe.Pointer(pRbu)).FszTempLimit = n
+ *(*uintptr)(unsafe.Pointer(bp /* pIter */)) = uintptr(0) // Iterator opened on pData/nData
+ var rc int32 // Return code
+ rc = Xsqlite3changeset_start(tls, bp /* &pIter */, nRebase, pRebase)
+ if rc == SQLITE_OK {
+ rc = sessionChangesetToHash(tls, *(*uintptr)(unsafe.Pointer(bp /* pIter */)), (p /* &.grp */), 1)
}
- return (*Sqlite3rbu)(unsafe.Pointer(pRbu)).FszTempLimit
+ Xsqlite3changeset_finalize(tls, *(*uintptr)(unsafe.Pointer(bp /* pIter */)))
+ return rc
}
-func Xsqlite3rbu_temp_size(tls *libc.TLS, pRbu uintptr) Sqlite3_int64 { /* sqlite3.c:204288:26: */
- return (*Sqlite3rbu)(unsafe.Pointer(pRbu)).FszTemp
+// Rebase a changeset according to current rebaser configuration
+func Xsqlite3rebaser_rebase(tls *libc.TLS, p uintptr, nIn int32, pIn uintptr, pnOut uintptr, ppOut uintptr) int32 { /* sqlite3.c:212349:16: */
+ bp := tls.Alloc(8)
+ defer tls.Free(8)
+
+ *(*uintptr)(unsafe.Pointer(bp /* pIter */)) = uintptr(0) // Iterator to skip through input
+ var rc int32 = Xsqlite3changeset_start(tls, bp /* &pIter */, nIn, pIn)
+
+ if rc == SQLITE_OK {
+ rc = sessionRebase(tls, p, *(*uintptr)(unsafe.Pointer(bp /* pIter */)), uintptr(0), uintptr(0), pnOut, ppOut)
+ Xsqlite3changeset_finalize(tls, *(*uintptr)(unsafe.Pointer(bp /* pIter */)))
+ }
+
+ return rc
}
-//************************************************************************
+// Rebase a changeset according to current rebaser configuration
+func Xsqlite3rebaser_rebase_strm(tls *libc.TLS, p uintptr, xInput uintptr, pIn uintptr, xOutput uintptr, pOut uintptr) int32 { /* sqlite3.c:212368:16: */
+ bp := tls.Alloc(8)
+ defer tls.Free(8)
-//************* End of sqlite3rbu.c *****************************************
-//************* Begin file dbstat.c *****************************************
-// 2010 July 12
-//
-// The author disclaims copyright to this source code. In place of
-// a legal notice, here is a blessing:
-//
-// May you do good and not evil.
-// May you find forgiveness for yourself and forgive others.
-// May you share freely, never taking more than you give.
-//
-//
-//
-// This file contains an implementation of the "dbstat" virtual table.
-//
-// The dbstat virtual table is used to extract low-level storage
-// information from an SQLite database in order to implement the
-// "sqlite3_analyzer" utility. See the ../tool/spaceanal.tcl script
-// for an example implementation.
-//
-// Additional information is available on the "dbstat.html" page of the
-// official SQLite documentation.
+ *(*uintptr)(unsafe.Pointer(bp /* pIter */)) = uintptr(0) // Iterator to skip through input
+ var rc int32 = Xsqlite3changeset_start_strm(tls, bp /* &pIter */, xInput, pIn)
-// #include "sqliteInt.h" ** Requires access to internal data structures **
+ if rc == SQLITE_OK {
+ rc = sessionRebase(tls, p, *(*uintptr)(unsafe.Pointer(bp /* pIter */)), xOutput, pOut, uintptr(0), uintptr(0))
+ Xsqlite3changeset_finalize(tls, *(*uintptr)(unsafe.Pointer(bp /* pIter */)))
+ }
-//************* End of dbstat.c *********************************************
-//************* Begin file dbpage.c *****************************************
-// 2017-10-11
-//
-// The author disclaims copyright to this source code. In place of
-// a legal notice, here is a blessing:
-//
-// May you do good and not evil.
-// May you find forgiveness for yourself and forgive others.
-// May you share freely, never taking more than you give.
-//
-//
-//
-// This file contains an implementation of the "sqlite_dbpage" virtual table.
-//
-// The sqlite_dbpage virtual table is used to read or write whole raw
-// pages of the database file. The pager interface is used so that
-// uncommitted changes and changes recorded in the WAL file are correctly
-// retrieved.
-//
-// Usage example:
-//
-// SELECT data FROM sqlite_dbpage('aux1') WHERE pgno=123;
-//
-// This is an eponymous virtual table so it does not need to be created before
-// use. The optional argument to the sqlite_dbpage() table name is the
-// schema for the database file that is to be read. The default schema is
-// "main".
-//
-// The data field of sqlite_dbpage table can be updated. The new
-// value must be a BLOB which is the correct page size, otherwise the
-// update fails. Rows may not be deleted or inserted.
+ return rc
+}
-// #include "sqliteInt.h" ** Requires access to internal data structures **
+// Destroy a rebaser object
+func Xsqlite3rebaser_delete(tls *libc.TLS, p uintptr) { /* sqlite3.c:212389:17: */
+ if p != 0 {
+ sessionDeleteTable(tls, uintptr(0), (*Sqlite3_rebaser)(unsafe.Pointer(p)).Fgrp.FpList)
+ Xsqlite3_free(tls, p)
+ }
+}
-//************* End of dbpage.c *********************************************
-//************* Begin file sqlite3session.c *********************************
+// Global configuration
+func Xsqlite3session_config(tls *libc.TLS, op int32, pArg uintptr) int32 { /* sqlite3.c:212399:16: */
+ var rc int32 = SQLITE_OK
+ switch op {
+ case SQLITE_SESSION_CONFIG_STRMSIZE:
+ {
+ var pInt uintptr = pArg
+ if *(*int32)(unsafe.Pointer(pInt)) > 0 {
+ sessions_strm_chunk_size = *(*int32)(unsafe.Pointer(pInt))
+ }
+ *(*int32)(unsafe.Pointer(pInt)) = sessions_strm_chunk_size
+ break
+
+ }
+ default:
+ rc = SQLITE_MISUSE
+ break
+ }
+ return rc
+}
//************* End of sqlite3session.c *************************************
//************* Begin file fts5.c *******************************************
@@ -163096,72 +171532,7 @@ type Fts5Global1 = struct {
FpTok uintptr
FpDfltTok uintptr
FpCsr uintptr
-} /* sqlite3.c:211884:9 */
-
-//************************************************************************
-
-//************* End of sqlite3rbu.c *****************************************
-//************* Begin file dbstat.c *****************************************
-// 2010 July 12
-//
-// The author disclaims copyright to this source code. In place of
-// a legal notice, here is a blessing:
-//
-// May you do good and not evil.
-// May you find forgiveness for yourself and forgive others.
-// May you share freely, never taking more than you give.
-//
-//
-//
-// This file contains an implementation of the "dbstat" virtual table.
-//
-// The dbstat virtual table is used to extract low-level storage
-// information from an SQLite database in order to implement the
-// "sqlite3_analyzer" utility. See the ../tool/spaceanal.tcl script
-// for an example implementation.
-//
-// Additional information is available on the "dbstat.html" page of the
-// official SQLite documentation.
-
-// #include "sqliteInt.h" ** Requires access to internal data structures **
-
-//************* End of dbstat.c *********************************************
-//************* Begin file dbpage.c *****************************************
-// 2017-10-11
-//
-// The author disclaims copyright to this source code. In place of
-// a legal notice, here is a blessing:
-//
-// May you do good and not evil.
-// May you find forgiveness for yourself and forgive others.
-// May you share freely, never taking more than you give.
-//
-//
-//
-// This file contains an implementation of the "sqlite_dbpage" virtual table.
-//
-// The sqlite_dbpage virtual table is used to read or write whole raw
-// pages of the database file. The pager interface is used so that
-// uncommitted changes and changes recorded in the WAL file are correctly
-// retrieved.
-//
-// Usage example:
-//
-// SELECT data FROM sqlite_dbpage('aux1') WHERE pgno=123;
-//
-// This is an eponymous virtual table so it does not need to be created before
-// use. The optional argument to the sqlite_dbpage() table name is the
-// schema for the database file that is to be read. The default schema is
-// "main".
-//
-// The data field of sqlite_dbpage table can be updated. The new
-// value must be a BLOB which is the correct page size, otherwise the
-// update fails. Rows may not be deleted or inserted.
-
-// #include "sqliteInt.h" ** Requires access to internal data structures **
-
-//************* End of dbpage.c *********************************************
-//************* Begin file sqlite3session.c *********************************
+} /* sqlite3.c:213118:9 */
//************* End of sqlite3session.c *************************************
//************* Begin file fts5.c *******************************************
@@ -163223,13 +171594,13 @@ type Fts5Global1 = struct {
// Mark a function parameter as unused, to suppress nuisance compiler
// warnings.
-type Fts5Global = Fts5Global1 /* sqlite3.c:211884:27 */
+type Fts5Global = Fts5Global1 /* sqlite3.c:213118:27 */
type Fts5Colset1 = struct {
FnCol int32
FaiCol [1]int32
-} /* sqlite3.c:211884:9 */
+} /* sqlite3.c:213118:9 */
-type Fts5Colset = Fts5Colset1 /* sqlite3.c:211885:27 */
+type Fts5Colset = Fts5Colset1 /* sqlite3.c:213119:27 */
// *************************************************************************
//
@@ -163241,14 +171612,14 @@ type Fts5Config1 = struct {
FzDb uintptr
FzName uintptr
FnCol int32
- _ [4]byte
+ F__ccgo_pad1 [4]byte
FazCol uintptr
FabUnindexed uintptr
FnPrefix int32
- _ [4]byte
+ F__ccgo_pad2 [4]byte
FaPrefix uintptr
FeContent int32
- _ [4]byte
+ F__ccgo_pad3 [4]byte
FzContent uintptr
FzContentRowid uintptr
FbColumnsize int32
@@ -163267,14 +171638,14 @@ type Fts5Config1 = struct {
FzRank uintptr
FzRankArgs uintptr
FpzErrmsg uintptr
-} /* sqlite3.c:211884:9 */
+} /* sqlite3.c:213118:9 */
// *************************************************************************
//
// Interface to code in fts5_config.c. fts5_config.c contains contains code
// to parse the arguments passed to the CREATE VIRTUAL TABLE statement.
-type Fts5Config = Fts5Config1 /* sqlite3.c:211905:27 */
+type Fts5Config = Fts5Config1 /* sqlite3.c:213139:27 */
//
// End of interface to code in fts5_config.c.
@@ -163289,7 +171660,7 @@ type Fts5Buffer1 = struct {
Fp uintptr
Fn int32
FnSpace int32
-} /* sqlite3.c:211884:9 */
+} /* sqlite3.c:213118:9 */
//
// End of interface to code in fts5_config.c.
@@ -163300,29 +171671,29 @@ type Fts5Buffer1 = struct {
// Interface to code in fts5_buffer.c.
// Buffer object for the incremental building of string data.
-type Fts5Buffer = Fts5Buffer1 /* sqlite3.c:212031:27 */
+type Fts5Buffer = Fts5Buffer1 /* sqlite3.c:213265:27 */
type Fts5PoslistReader1 = struct {
- Fa uintptr
- Fn int32
- Fi int32
- FbFlag U8
- FbEof U8
- _ [6]byte
- FiPos I64
-} /* sqlite3.c:211884:9 */
+ Fa uintptr
+ Fn int32
+ Fi int32
+ FbFlag U8
+ FbEof U8
+ F__ccgo_pad1 [6]byte
+ FiPos I64
+} /* sqlite3.c:213118:9 */
-type Fts5PoslistReader = Fts5PoslistReader1 /* sqlite3.c:212067:34 */
+type Fts5PoslistReader = Fts5PoslistReader1 /* sqlite3.c:213301:34 */
-type Fts5PoslistWriter1 = struct{ FiPrev I64 } /* sqlite3.c:212086:9 */
+type Fts5PoslistWriter1 = struct{ FiPrev I64 } /* sqlite3.c:213320:9 */
-type Fts5PoslistWriter = Fts5PoslistWriter1 /* sqlite3.c:212086:34 */
+type Fts5PoslistWriter = Fts5PoslistWriter1 /* sqlite3.c:213320:34 */
// Bucket of terms object used by the integrity-check in offsets=0 mode.
-type Fts5Termset1 = struct{ FapHash [512]uintptr } /* sqlite3.c:212108:9 */
+type Fts5Termset1 = struct{ FapHash [512]uintptr } /* sqlite3.c:213342:9 */
// Bucket of terms object used by the integrity-check in offsets=0 mode.
-type Fts5Termset = Fts5Termset1 /* sqlite3.c:212108:28 */
+type Fts5Termset = Fts5Termset1 /* sqlite3.c:213342:28 */
//
// End of interface to code in fts5_buffer.c.
@@ -163337,10 +171708,10 @@ type Fts5Index1 = struct {
FpConfig uintptr
FzDataTbl uintptr
FnWorkUnit int32
- _ [4]byte
+ F__ccgo_pad1 [4]byte
FpHash uintptr
FnPendingData int32
- _ [4]byte
+ F__ccgo_pad2 [4]byte
FiWriteRowid I64
FbDelete int32
Frc int32
@@ -163351,11 +171722,11 @@ type Fts5Index1 = struct {
FpIdxDeleter uintptr
FpIdxSelect uintptr
FnRead int32
- _ [4]byte
+ F__ccgo_pad3 [4]byte
FpDataVersion uintptr
FiStructVersion I64
FpStruct uintptr
-} /* sqlite3.c:211884:9 */
+} /* sqlite3.c:213118:9 */
//
// End of interface to code in fts5_buffer.c.
@@ -163366,16 +171737,16 @@ type Fts5Index1 = struct {
// Interface to code in fts5_index.c. fts5_index.c contains contains code
// to access the data stored in the %_data table.
-type Fts5Index = Fts5Index1 /* sqlite3.c:212122:26 */
+type Fts5Index = Fts5Index1 /* sqlite3.c:213356:26 */
type Fts5IndexIter1 = struct {
- FiRowid I64
- FpData uintptr
- FnData int32
- FbEof U8
- _ [3]byte
-} /* sqlite3.c:211884:9 */
+ FiRowid I64
+ FpData uintptr
+ FnData int32
+ FbEof U8
+ F__ccgo_pad1 [3]byte
+} /* sqlite3.c:213118:9 */
-type Fts5IndexIter = Fts5IndexIter1 /* sqlite3.c:212123:30 */
+type Fts5IndexIter = Fts5IndexIter1 /* sqlite3.c:213357:30 */
//
// End of interface to code in fts5_varint.c.
@@ -163390,7 +171761,7 @@ type Fts5Table1 = struct {
Fbase Sqlite3_vtab
FpConfig uintptr
FpIndex uintptr
-} /* sqlite3.c:212322:9 */
+} /* sqlite3.c:213556:9 */
//
// End of interface to code in fts5_varint.c.
@@ -163401,7 +171772,7 @@ type Fts5Table1 = struct {
// Interface to code in fts5_main.c.
// Virtual-table object.
-type Fts5Table = Fts5Table1 /* sqlite3.c:212322:26 */
+type Fts5Table = Fts5Table1 /* sqlite3.c:213556:26 */
//
// End of interface to code in fts5.c.
@@ -163411,14 +171782,14 @@ type Fts5Table = Fts5Table1 /* sqlite3.c:212322:26 */
//
// Interface to code in fts5_hash.c.
type Fts5Hash1 = struct {
- FeDetail int32
- _ [4]byte
- FpnByte uintptr
- FnEntry int32
- FnSlot int32
- FpScan uintptr
- FaSlot uintptr
-} /* sqlite3.c:211884:9 */
+ FeDetail int32
+ F__ccgo_pad1 [4]byte
+ FpnByte uintptr
+ FnEntry int32
+ FnSlot int32
+ FpScan uintptr
+ FaSlot uintptr
+} /* sqlite3.c:213118:9 */
//
// End of interface to code in fts5.c.
@@ -163427,7 +171798,7 @@ type Fts5Hash1 = struct {
// *************************************************************************
//
// Interface to code in fts5_hash.c.
-type Fts5Hash = Fts5Hash1 /* sqlite3.c:212348:25 */
+type Fts5Hash = Fts5Hash1 /* sqlite3.c:213582:25 */
//
// End of interface to code in fts5_hash.c.
@@ -163442,11 +171813,11 @@ type Fts5Storage1 = struct {
FpConfig uintptr
FpIndex uintptr
FbTotalsValid int32
- _ [4]byte
+ F__ccgo_pad1 [4]byte
FnTotalRow I64
FaTotalSize uintptr
FaStmt [11]uintptr
-} /* sqlite3.c:212404:9 */
+} /* sqlite3.c:213638:9 */
//
// End of interface to code in fts5_hash.c.
@@ -163457,7 +171828,7 @@ type Fts5Storage1 = struct {
// Interface to code in fts5_storage.c. fts5_storage.c contains contains
// code to access the data stored in the %_content and %_docsize tables.
-type Fts5Storage = Fts5Storage1 /* sqlite3.c:212404:28 */
+type Fts5Storage = Fts5Storage1 /* sqlite3.c:213638:28 */
//
// End of interface to code in fts5_storage.c.
@@ -163473,7 +171844,7 @@ type Fts5Expr1 = struct {
FbDesc int32
FnPhrase int32
FapExprPhrase uintptr
-} /* sqlite3.c:211884:9 */
+} /* sqlite3.c:213118:9 */
//
// End of interface to code in fts5_storage.c.
@@ -163482,21 +171853,21 @@ type Fts5Expr1 = struct {
// *************************************************************************
//
// Interface to code in fts5_expr.c.
-type Fts5Expr = Fts5Expr1 /* sqlite3.c:212447:25 */
+type Fts5Expr = Fts5Expr1 /* sqlite3.c:213681:25 */
type Fts5ExprNode1 = struct {
- FeType int32
- FbEof int32
- FbNomatch int32
- _ [4]byte
- FxNext uintptr
- FiRowid I64
- FpNear uintptr
- FnChild int32
- _ [4]byte
- FapChild [1]uintptr
-} /* sqlite3.c:211884:9 */
-
-type Fts5ExprNode = Fts5ExprNode1 /* sqlite3.c:212448:29 */
+ FeType int32
+ FbEof int32
+ FbNomatch int32
+ F__ccgo_pad1 [4]byte
+ FxNext uintptr
+ FiRowid I64
+ FpNear uintptr
+ FnChild int32
+ F__ccgo_pad2 [4]byte
+ FapChild [1]uintptr
+} /* sqlite3.c:213118:9 */
+
+type Fts5ExprNode = Fts5ExprNode1 /* sqlite3.c:213682:29 */
type Fts5Parse1 = struct {
FpConfig uintptr
FzErr uintptr
@@ -163505,44 +171876,44 @@ type Fts5Parse1 = struct {
FapPhrase uintptr
FpExpr uintptr
FbPhraseToAnd int32
- _ [4]byte
-} /* sqlite3.c:212449:9 */
+ F__ccgo_pad1 [4]byte
+} /* sqlite3.c:213683:9 */
-type Fts5Parse = Fts5Parse1 /* sqlite3.c:212449:26 */
+type Fts5Parse = Fts5Parse1 /* sqlite3.c:213683:26 */
type Fts5Token1 = struct {
- Fp uintptr
- Fn int32
- _ [4]byte
-} /* sqlite3.c:212450:9 */
+ Fp uintptr
+ Fn int32
+ F__ccgo_pad1 [4]byte
+} /* sqlite3.c:213684:9 */
-type Fts5Token = Fts5Token1 /* sqlite3.c:212450:26 */
+type Fts5Token = Fts5Token1 /* sqlite3.c:213684:26 */
type Fts5ExprPhrase1 = struct {
- FpNode uintptr
- Fposlist Fts5Buffer
- FnTerm int32
- _ [4]byte
- FaTerm [1]Fts5ExprTerm
-} /* sqlite3.c:211884:9 */
-
-type Fts5ExprPhrase = Fts5ExprPhrase1 /* sqlite3.c:212451:31 */
+ FpNode uintptr
+ Fposlist Fts5Buffer
+ FnTerm int32
+ F__ccgo_pad1 [4]byte
+ FaTerm [1]Fts5ExprTerm
+} /* sqlite3.c:213118:9 */
+
+type Fts5ExprPhrase = Fts5ExprPhrase1 /* sqlite3.c:213685:31 */
type Fts5ExprNearset1 = struct {
- FnNear int32
- _ [4]byte
- FpColset uintptr
- FnPhrase int32
- _ [4]byte
- FapPhrase [1]uintptr
-} /* sqlite3.c:211884:9 */
+ FnNear int32
+ F__ccgo_pad1 [4]byte
+ FpColset uintptr
+ FnPhrase int32
+ F__ccgo_pad2 [4]byte
+ FapPhrase [1]uintptr
+} /* sqlite3.c:213118:9 */
-type Fts5ExprNearset = Fts5ExprNearset1 /* sqlite3.c:212452:32 */
+type Fts5ExprNearset = Fts5ExprNearset1 /* sqlite3.c:213686:32 */
type Fts5PoslistPopulator1 = struct {
Fwriter Fts5PoslistWriter
FbOk int32
FbMiss int32
-} /* sqlite3.c:212500:9 */
+} /* sqlite3.c:213734:9 */
-type Fts5PoslistPopulator = Fts5PoslistPopulator1 /* sqlite3.c:212500:37 */
+type Fts5PoslistPopulator = Fts5PoslistPopulator1 /* sqlite3.c:213734:37 */
//
// End of interface to code in fts5_unicode2.c.
//
@@ -163644,10 +172015,10 @@ type Fts5PoslistPopulator = Fts5PoslistPopulator1 /* sqlite3.c:212500:37 */
// fts5YY_MAX_REDUCE Maximum value for reduce actions
//************ Begin control #defines ****************************************
type Fts5YYMINORTYPE = struct {
- _ [0]uint64
- Ffts5yyinit int32
- _ [12]byte
-} /* sqlite3.c:212776:3 */
+ F__ccgo_pad1 [0]uint64
+ Ffts5yyinit int32
+ F__ccgo_pad2 [12]byte
+} /* sqlite3.c:214010:3 */
//************ End control #defines ******************************************
// Define the fts5yytestcase() macro to be a no-op if is not already defined
@@ -163720,7 +172091,7 @@ var fts5yy_action = [105]uint8{
/* 80 */ uint8(5), uint8(3), uint8(63), uint8(5), uint8(3), uint8(62), uint8(12), uint8(2), uint8(86), uint8(13),
/* 90 */ uint8(9), uint8(30), uint8(10), uint8(10), uint8(54), uint8(57), uint8(75), uint8(78), uint8(78), uint8(53),
/* 100 */ uint8(57), uint8(15), uint8(82), uint8(82), uint8(71),
-} /* sqlite3.c:212869:31 */
+} /* sqlite3.c:214103:31 */
var fts5yy_lookahead = [121]uint8{
/* 0 */ uint8(16), uint8(17), uint8(18), uint8(19), uint8(20), uint8(22), uint8(22), uint8(24), uint8(24), uint8(17),
/* 10 */ uint8(18), uint8(19), uint8(20), uint8(7), uint8(22), uint8(9), uint8(24), uint8(17), uint8(18), uint8(19),
@@ -163735,23 +172106,23 @@ var fts5yy_lookahead = [121]uint8{
/* 100 */ uint8(9), uint8(9), uint8(27), uint8(27), uint8(11), uint8(27), uint8(27), uint8(27), uint8(27), uint8(27),
/* 110 */ uint8(27), uint8(27), uint8(27), uint8(27), uint8(27), uint8(27), uint8(27), uint8(27), uint8(27), uint8(27),
/* 120 */ uint8(27),
-} /* sqlite3.c:212882:29 */
+} /* sqlite3.c:214116:29 */
var fts5yy_shift_ofst = [35]uint8{
/* 0 */ uint8(44), uint8(44), uint8(44), uint8(44), uint8(44), uint8(44), uint8(51), uint8(77), uint8(43), uint8(12),
/* 10 */ uint8(14), uint8(83), uint8(82), uint8(14), uint8(23), uint8(23), uint8(31), uint8(31), uint8(71), uint8(74),
/* 20 */ uint8(78), uint8(81), uint8(86), uint8(91), uint8(6), uint8(53), uint8(53), uint8(60), uint8(64), uint8(68),
/* 30 */ uint8(53), uint8(87), uint8(92), uint8(53), uint8(93),
-} /* sqlite3.c:212900:28 */
+} /* sqlite3.c:214134:28 */
var fts5yy_reduce_ofst = [18]int8{
/* 0 */ int8(-16), int8(-8), int8(0), int8(9), int8(17), int8(25), int8(46), int8(-17), int8(-17), int8(37),
/* 10 */ int8(67), int8(4), int8(4), int8(8), int8(4), int8(20), int8(27), int8(38),
-} /* sqlite3.c:212909:26 */
+} /* sqlite3.c:214143:26 */
var fts5yy_default = [35]uint8{
/* 0 */ uint8(80), uint8(80), uint8(80), uint8(80), uint8(80), uint8(80), uint8(95), uint8(80), uint8(80), uint8(105),
/* 10 */ uint8(80), uint8(110), uint8(110), uint8(80), uint8(110), uint8(110), uint8(80), uint8(80), uint8(80), uint8(80),
/* 20 */ uint8(80), uint8(91), uint8(80), uint8(80), uint8(80), uint8(101), uint8(100), uint8(80), uint8(80), uint8(90),
/* 30 */ uint8(103), uint8(80), uint8(80), uint8(104), uint8(80),
-} /* sqlite3.c:212913:31 */
+} /* sqlite3.c:214147:31 */
//********* End of lemon-generated parsing tables ****************************
// The next table maps tokens (terminal symbols) into fallback tokens.
@@ -163784,13 +172155,13 @@ var fts5yy_default = [35]uint8{
// actually contains the reduce action for the second half of the
// SHIFTREDUCE.
type fts5yyStackEntry = struct {
- Fstateno uint8
- Fmajor uint8
- _ [6]byte
- Fminor Fts5YYMINORTYPE
-} /* sqlite3.c:212956:1 */
+ Fstateno uint8
+ Fmajor uint8
+ F__ccgo_pad1 [6]byte
+ Fminor Fts5YYMINORTYPE
+} /* sqlite3.c:214190:1 */
-type Fts5yyStackEntry = fts5yyStackEntry /* sqlite3.c:212963:33 */
+type Fts5yyStackEntry = fts5yyStackEntry /* sqlite3.c:214197:33 */
// The state of the parser is completely contained in an instance of
// the following structure
@@ -163799,9 +172170,9 @@ type fts5yyParser = struct {
FpParse uintptr
Ffts5yystack [100]Fts5yyStackEntry
Ffts5yystackEnd uintptr
-} /* sqlite3.c:212967:1 */
+} /* sqlite3.c:214201:1 */
-type Fts5yyParser = fts5yyParser /* sqlite3.c:212986:29 */
+type Fts5yyParser = fts5yyParser /* sqlite3.c:214220:29 */
// Datatype of the argument to the memory allocated passed as the
// second argument to sqlite3Fts5ParserAlloc() below. This can be changed by
@@ -163809,7 +172180,7 @@ type Fts5yyParser = fts5yyParser /* sqlite3.c:212986:29 */
// grammar.
// Initialize a new parser that has already been allocated.
-func sqlite3Fts5ParserInit(tls *libc.TLS, fts5yypRawParser uintptr) { /* sqlite3.c:213135:13: */
+func sqlite3Fts5ParserInit(tls *libc.TLS, fts5yypRawParser uintptr) { /* sqlite3.c:214369:13: */
var fts5yypParser uintptr = fts5yypRawParser
(*Fts5yyParser)(unsafe.Pointer(fts5yypParser)).Ffts5yytos = fts5yypParser + 16 /* &.fts5yystack */
@@ -163828,9 +172199,9 @@ func sqlite3Fts5ParserInit(tls *libc.TLS, fts5yypRawParser uintptr) { /* sqlite3
// Outputs:
// A pointer to a parser. This pointer is used in subsequent calls
// to sqlite3Fts5Parser and sqlite3Fts5ParserFree.
-func sqlite3Fts5ParserAlloc(tls *libc.TLS, mallocProc uintptr) uintptr { /* sqlite3.c:213174:13: */
+func sqlite3Fts5ParserAlloc(tls *libc.TLS, mallocProc uintptr) uintptr { /* sqlite3.c:214408:13: */
var fts5yypParser uintptr
- fts5yypParser = (*(*func(*libc.TLS, U64) uintptr)(unsafe.Pointer(&mallocProc)))(tls, U64(unsafe.Sizeof(Fts5yyParser{})))
+ fts5yypParser = (*struct{ f func(*libc.TLS, U64) uintptr })(unsafe.Pointer(&struct{ uintptr }{mallocProc})).f(tls, U64(unsafe.Sizeof(Fts5yyParser{})))
if fts5yypParser != 0 {
sqlite3Fts5ParserInit(tls, fts5yypParser)
@@ -163844,7 +172215,7 @@ func sqlite3Fts5ParserAlloc(tls *libc.TLS, mallocProc uintptr) uintptr { /* sqli
// a pointer to the value to be deleted. The code used to do the
// deletions is derived from the %destructor and/or %token_destructor
// directives of the input grammar.
-func fts5yy_destructor(tls *libc.TLS, fts5yypParser uintptr, fts5yymajor uint8, fts5yypminor uintptr) { /* sqlite3.c:213193:13: */
+func fts5yy_destructor(tls *libc.TLS, fts5yypParser uintptr, fts5yymajor uint8, fts5yypminor uintptr) { /* sqlite3.c:214427:13: */
var pParse uintptr = (*Fts5yyParser)(unsafe.Pointer(fts5yypParser)).FpParse
_ = pParse
@@ -163902,7 +172273,7 @@ func fts5yy_destructor(tls *libc.TLS, fts5yypParser uintptr, fts5yymajor uint8,
//
// If there is a destructor routine associated with the token which
// is popped from the stack, then call it.
-func fts5yy_pop_parser_stack(tls *libc.TLS, pParser uintptr) { /* sqlite3.c:213252:13: */
+func fts5yy_pop_parser_stack(tls *libc.TLS, pParser uintptr) { /* sqlite3.c:214486:13: */
var fts5yytos uintptr
fts5yytos = libc.PostDecUintptr(&(*Fts5yyParser)(unsafe.Pointer(pParser)).Ffts5yytos, 24)
@@ -163910,7 +172281,7 @@ func fts5yy_pop_parser_stack(tls *libc.TLS, pParser uintptr) { /* sqlite3.c:2132
}
// Clear all secondary memory allocations from the parser
-func sqlite3Fts5ParserFinalize(tls *libc.TLS, p uintptr) { /* sqlite3.c:213270:13: */
+func sqlite3Fts5ParserFinalize(tls *libc.TLS, p uintptr) { /* sqlite3.c:214504:13: */
var pParser uintptr = p
for (*Fts5yyParser)(unsafe.Pointer(pParser)).Ffts5yytos > pParser+16 /* &.fts5yystack */ {
fts5yy_pop_parser_stack(tls, pParser)
@@ -163923,12 +172294,12 @@ func sqlite3Fts5ParserFinalize(tls *libc.TLS, p uintptr) { /* sqlite3.c:213270:1
// If the fts5YYPARSEFREENEVERNULL macro exists (for example because it
// is defined in a %include section of the input grammar) then it is
// assumed that the input pointer is never NULL.
-func sqlite3Fts5ParserFree(tls *libc.TLS, p uintptr, freeProc uintptr) { /* sqlite3.c:213287:13: */
+func sqlite3Fts5ParserFree(tls *libc.TLS, p uintptr, freeProc uintptr) { /* sqlite3.c:214521:13: */
if p == uintptr(0) {
return
}
sqlite3Fts5ParserFinalize(tls, p)
- (*(*func(*libc.TLS, uintptr))(unsafe.Pointer(&freeProc)))(tls, p)
+ (*struct{ f func(*libc.TLS, uintptr) })(unsafe.Pointer(&struct{ uintptr }{freeProc})).f(tls, p)
}
// Return the peak depth of the stack for a parser.
@@ -163947,7 +172318,7 @@ func sqlite3Fts5ParserFree(tls *libc.TLS, p uintptr, freeProc uintptr) { /* sqli
// Find the appropriate action for a parser given the terminal
// look-ahead token iLookAhead.
-func fts5yy_find_shift_action(tls *libc.TLS, iLookAhead uint8, stateno uint8) uint8 { /* sqlite3.c:213350:25: */
+func fts5yy_find_shift_action(tls *libc.TLS, iLookAhead uint8, stateno uint8) uint8 { /* sqlite3.c:214584:25: */
var i int32
if int32(stateno) > Fts5YY_MAX_SHIFT {
@@ -163971,7 +172342,7 @@ func fts5yy_find_shift_action(tls *libc.TLS, iLookAhead uint8, stateno uint8) ui
// Find the appropriate action for a parser given the non-terminal
// look-ahead token iLookAhead.
-func fts5yy_find_reduce_action(tls *libc.TLS, stateno uint8, iLookAhead uint8) uint8 { /* sqlite3.c:213415:25: */
+func fts5yy_find_reduce_action(tls *libc.TLS, stateno uint8, iLookAhead uint8) uint8 { /* sqlite3.c:214649:25: */
var i int32
i = int32(fts5yy_reduce_ofst[stateno])
@@ -163982,7 +172353,7 @@ func fts5yy_find_reduce_action(tls *libc.TLS, stateno uint8, iLookAhead uint8) u
}
// The following routine is called if the stack overflows.
-func fts5yyStackOverflow(tls *libc.TLS, fts5yypParser uintptr) { /* sqlite3.c:213444:13: */
+func fts5yyStackOverflow(tls *libc.TLS, fts5yypParser uintptr) { /* sqlite3.c:214678:13: */
var pParse uintptr = (*Fts5yyParser)(unsafe.Pointer(fts5yypParser)).FpParse
for (*Fts5yyParser)(unsafe.Pointer(fts5yypParser)).Ffts5yytos > fts5yypParser+16 /* &.fts5yystack */ {
@@ -163992,7 +172363,7 @@ func fts5yyStackOverflow(tls *libc.TLS, fts5yypParser uintptr) { /* sqlite3.c:21
// stack every overflows
//******* Begin %stack_overflow code *****************************************
- sqlite3Fts5ParseError(tls, pParse, ts+30084 /* "fts5: parser sta..." */, 0)
+ sqlite3Fts5ParseError(tls, pParse, ts+31882 /* "fts5: parser sta..." */, 0)
//******* End %stack_overflow code *******************************************
(*Fts5yyParser)(unsafe.Pointer(fts5yypParser)).FpParse = pParse // Suppress warning about unused %extra_argument var
@@ -164001,7 +172372,7 @@ func fts5yyStackOverflow(tls *libc.TLS, fts5yypParser uintptr) { /* sqlite3.c:21
// Print tracing information for a SHIFT action
// Perform a shift action.
-func fts5yy_shift(tls *libc.TLS, fts5yypParser uintptr, fts5yyNewState uint8, fts5yyMajor uint8, fts5yyMinor Fts5Token) { /* sqlite3.c:213487:13: */
+func fts5yy_shift(tls *libc.TLS, fts5yypParser uintptr, fts5yyNewState uint8, fts5yyMajor uint8, fts5yyMinor Fts5Token) { /* sqlite3.c:214721:13: */
var fts5yytos uintptr
(*Fts5yyParser)(unsafe.Pointer(fts5yypParser)).Ffts5yytos += 24
if (*Fts5yyParser)(unsafe.Pointer(fts5yypParser)).Ffts5yytos > (*Fts5yyParser)(unsafe.Pointer(fts5yypParser)).Ffts5yystackEnd {
@@ -164050,7 +172421,7 @@ var fts5yyRuleInfoLhs = [28]uint8{
uint8(24), // (25) phrase ::= STRING star_opt
uint8(26), // (26) star_opt ::= STAR
uint8(26), // (27) star_opt ::=
-} /* sqlite3.c:213528:29 */
+} /* sqlite3.c:214762:29 */
// For rule J, fts5yyRuleInfoNRhs[J] contains the negative of the number
// of symbols on the right-hand side of that rule.
@@ -164083,7 +172454,7 @@ var fts5yyRuleInfoNRhs = [28]int8{
int8(-2), // (25) phrase ::= STRING star_opt
int8(-1), // (26) star_opt ::= STAR
int8(0), // (27) star_opt ::=
-} /* sqlite3.c:213561:26 */
+} /* sqlite3.c:214795:26 */
// Forward Declaration
@@ -164095,7 +172466,7 @@ var fts5yyRuleInfoNRhs = [28]int8{
// if the lookahead token has already been consumed. As this procedure is
// only called from one place, optimizing compilers will in-line it, which
// means that the extra parameters have no performance impact.
-func fts5yy_reduce(tls *libc.TLS, fts5yypParser uintptr, fts5yyruleno uint32, fts5yyLookahead int32, fts5yyLookaheadToken Fts5Token) uint8 { /* sqlite3.c:213604:25: */
+func fts5yy_reduce(tls *libc.TLS, fts5yypParser uintptr, fts5yyruleno uint32, fts5yyLookahead int32, fts5yyLookaheadToken Fts5Token) uint8 { /* sqlite3.c:214838:25: */
bp := tls.Alloc(16)
defer tls.Free(16)
@@ -164305,7 +172676,7 @@ func fts5yy_reduce(tls *libc.TLS, fts5yypParser uintptr, fts5yyruleno uint32, ft
// The following code executes when the parse fails
// The following code executes when a syntax error first occurs.
-func fts5yy_syntax_error(tls *libc.TLS, fts5yypParser uintptr, fts5yymajor int32, fts5yyminor Fts5Token) { /* sqlite3.c:213822:13: */
+func fts5yy_syntax_error(tls *libc.TLS, fts5yypParser uintptr, fts5yymajor int32, fts5yyminor Fts5Token) { /* sqlite3.c:215056:13: */
bp := tls.Alloc(16)
defer tls.Free(16)
@@ -164315,14 +172686,14 @@ func fts5yy_syntax_error(tls *libc.TLS, fts5yypParser uintptr, fts5yymajor int32
_ = fts5yymajor // Silence a compiler warning
sqlite3Fts5ParseError(tls,
- pParse, ts+30112 /* "fts5: syntax err..." */, libc.VaList(bp, fts5yyminor.Fn, fts5yyminor.Fp))
+ pParse, ts+31910 /* "fts5: syntax err..." */, libc.VaList(bp, fts5yyminor.Fn, fts5yyminor.Fp))
//*********** End %syntax_error code *****************************************
(*Fts5yyParser)(unsafe.Pointer(fts5yypParser)).FpParse = pParse // Suppress warning about unused %extra_argument variable
}
// The following is executed when the parser accepts
-func fts5yy_accept(tls *libc.TLS, fts5yypParser uintptr) { /* sqlite3.c:213844:13: */
+func fts5yy_accept(tls *libc.TLS, fts5yypParser uintptr) { /* sqlite3.c:215078:13: */
var pParse uintptr = (*Fts5yyParser)(unsafe.Pointer(fts5yypParser)).FpParse
// Here code is inserted which will be executed whenever the
@@ -164351,7 +172722,7 @@ func fts5yy_accept(tls *libc.TLS, fts5yypParser uintptr) { /* sqlite3.c:213844:1
//
// Outputs:
// None.
-func sqlite3Fts5Parser(tls *libc.TLS, fts5yyp uintptr, fts5yymajor int32, fts5yyminor Fts5Token, pParse uintptr) { /* sqlite3.c:213885:13: */
+func sqlite3Fts5Parser(tls *libc.TLS, fts5yyp uintptr, fts5yymajor int32, fts5yyminor Fts5Token, pParse uintptr) { /* sqlite3.c:215119:13: */
bp := tls.Alloc(16)
defer tls.Free(16)
@@ -164406,7 +172777,7 @@ func sqlite3Fts5Parser(tls *libc.TLS, fts5yyp uintptr, fts5yymajor int32, fts5yy
// Return the fallback token corresponding to canonical token iToken, or
// 0 if iToken has no fallback.
-func sqlite3Fts5ParserFallback(tls *libc.TLS, iToken int32) int32 { /* sqlite3.c:214103:12: */
+func sqlite3Fts5ParserFallback(tls *libc.TLS, iToken int32) int32 { /* sqlite3.c:215337:12: */
_ = iToken
return 0
}
@@ -164424,7 +172795,7 @@ func sqlite3Fts5ParserFallback(tls *libc.TLS, iToken int32) int32 { /* sqlite3.c
// #include "fts5Int.h"
// Declarations for math functions.
-// Copyright (C) 1991-2018 Free Software Foundation, Inc.
+// Copyright (C) 1991-2020 Free Software Foundation, Inc.
// This file is part of the GNU C Library.
//
// The GNU C Library is free software; you can redistribute it and/or
@@ -164439,7 +172810,7 @@ func sqlite3Fts5ParserFallback(tls *libc.TLS, iToken int32) int32 { /* sqlite3.c
//
// You should have received a copy of the GNU Lesser General Public
// License along with the GNU C Library; if not, see
-// .
+// .
// ISO C99 Standard: 7.12 Mathematics
@@ -164461,15 +172832,15 @@ func sqlite3Fts5ParserFallback(tls *libc.TLS, iToken int32) int32 { /* sqlite3.c
// }
//
type CInstIter1 = struct {
- FpApi uintptr
- FpFts uintptr
- FiCol int32
- FiInst int32
- FnInst int32
- FiStart int32
- FiEnd int32
- _ [4]byte
-} /* sqlite3.c:214149:9 */
+ FpApi uintptr
+ FpFts uintptr
+ FiCol int32
+ FiInst int32
+ FnInst int32
+ FiStart int32
+ FiEnd int32
+ F__ccgo_pad1 [4]byte
+} /* sqlite3.c:215383:9 */
// 2014 May 31
//
@@ -164484,7 +172855,7 @@ type CInstIter1 = struct {
// #include "fts5Int.h"
// Declarations for math functions.
-// Copyright (C) 1991-2018 Free Software Foundation, Inc.
+// Copyright (C) 1991-2020 Free Software Foundation, Inc.
// This file is part of the GNU C Library.
//
// The GNU C Library is free software; you can redistribute it and/or
@@ -164499,7 +172870,7 @@ type CInstIter1 = struct {
//
// You should have received a copy of the GNU Lesser General Public
// License along with the GNU C Library; if not, see
-// .
+// .
// ISO C99 Standard: 7.12 Mathematics
@@ -164520,11 +172891,11 @@ type CInstIter1 = struct {
// printf("instance starts at %d, ends at %d\n", iter.iStart, iter.iEnd);
// }
//
-type CInstIter = CInstIter1 /* sqlite3.c:214149:26 */
+type CInstIter = CInstIter1 /* sqlite3.c:215383:26 */
// Advance the iterator to the next coalesced phrase instance. Return
// an SQLite error code if an error occurs, or SQLITE_OK otherwise.
-func fts5CInstIterNext(tls *libc.TLS, pIter uintptr) int32 { /* sqlite3.c:214166:12: */
+func fts5CInstIterNext(tls *libc.TLS, pIter uintptr) int32 { /* sqlite3.c:215400:12: */
bp := tls.Alloc(12)
defer tls.Free(12)
@@ -164539,10 +172910,14 @@ func fts5CInstIterNext(tls *libc.TLS, pIter uintptr) int32 { /* sqlite3.c:214166
// var io int32 at bp+8, 4
- rc = (*(*func(*libc.TLS, uintptr, int32, uintptr, uintptr, uintptr) int32)(unsafe.Pointer(((*CInstIter)(unsafe.Pointer(pIter)).FpApi + 72 /* &.xInst */))))(tls, (*CInstIter)(unsafe.Pointer(pIter)).FpFts, (*CInstIter)(unsafe.Pointer(pIter)).FiInst, bp /* &ip */, bp+4 /* &ic */, bp+8 /* &io */)
+ rc = (*struct {
+ f func(*libc.TLS, uintptr, int32, uintptr, uintptr, uintptr) int32
+ })(unsafe.Pointer(&struct{ uintptr }{(*Fts5ExtensionApi)(unsafe.Pointer((*CInstIter)(unsafe.Pointer(pIter)).FpApi)).FxInst})).f(tls, (*CInstIter)(unsafe.Pointer(pIter)).FpFts, (*CInstIter)(unsafe.Pointer(pIter)).FiInst, bp /* &ip */, bp+4 /* &ic */, bp+8 /* &io */)
if rc == SQLITE_OK {
if *(*int32)(unsafe.Pointer(bp + 4 /* ic */)) == (*CInstIter)(unsafe.Pointer(pIter)).FiCol {
- var iEnd int32 = ((*(*int32)(unsafe.Pointer(bp + 8 /* io */)) - 1) + (*(*func(*libc.TLS, uintptr, int32) int32)(unsafe.Pointer(((*CInstIter)(unsafe.Pointer(pIter)).FpApi + 56 /* &.xPhraseSize */))))(tls, (*CInstIter)(unsafe.Pointer(pIter)).FpFts, *(*int32)(unsafe.Pointer(bp /* ip */))))
+ var iEnd int32 = ((*(*int32)(unsafe.Pointer(bp + 8 /* io */)) - 1) + (*struct {
+ f func(*libc.TLS, uintptr, int32) int32
+ })(unsafe.Pointer(&struct{ uintptr }{(*Fts5ExtensionApi)(unsafe.Pointer((*CInstIter)(unsafe.Pointer(pIter)).FpApi)).FxPhraseSize})).f(tls, (*CInstIter)(unsafe.Pointer(pIter)).FpFts, *(*int32)(unsafe.Pointer(bp /* ip */))))
if (*CInstIter)(unsafe.Pointer(pIter)).FiStart < 0 {
(*CInstIter)(unsafe.Pointer(pIter)).FiStart = *(*int32)(unsafe.Pointer(bp + 8 /* io */))
(*CInstIter)(unsafe.Pointer(pIter)).FiEnd = iEnd
@@ -164563,14 +172938,16 @@ func fts5CInstIterNext(tls *libc.TLS, pIter uintptr) int32 { /* sqlite3.c:214166
// Initialize the iterator object indicated by the final parameter to
// iterate through coalesced phrase instances in column iCol.
-func fts5CInstIterInit(tls *libc.TLS, pApi uintptr, pFts uintptr, iCol int32, pIter uintptr) int32 { /* sqlite3.c:214197:12: */
+func fts5CInstIterInit(tls *libc.TLS, pApi uintptr, pFts uintptr, iCol int32, pIter uintptr) int32 { /* sqlite3.c:215431:12: */
var rc int32
libc.Xmemset(tls, pIter, 0, uint64(unsafe.Sizeof(CInstIter{})))
(*CInstIter)(unsafe.Pointer(pIter)).FpApi = pApi
(*CInstIter)(unsafe.Pointer(pIter)).FpFts = pFts
(*CInstIter)(unsafe.Pointer(pIter)).FiCol = iCol
- rc = (*(*func(*libc.TLS, uintptr, uintptr) int32)(unsafe.Pointer((pApi + 64 /* &.xInstCount */))))(tls, pFts, (pIter + 24 /* &.nInst */))
+ rc = (*struct {
+ f func(*libc.TLS, uintptr, uintptr) int32
+ })(unsafe.Pointer(&struct{ uintptr }{(*Fts5ExtensionApi)(unsafe.Pointer(pApi)).FxInstCount})).f(tls, pFts, (pIter + 24 /* &.nInst */))
if rc == SQLITE_OK {
rc = fts5CInstIterNext(tls, pIter)
@@ -164587,19 +172964,19 @@ type HighlightContext1 = struct {
FiPos int32
FiRangeStart int32
FiRangeEnd int32
- _ [4]byte
+ F__ccgo_pad1 [4]byte
FzOpen uintptr
FzClose uintptr
FzIn uintptr
FnIn int32
FiOff int32
FzOut uintptr
-} /* sqlite3.c:214223:9 */
+} /* sqlite3.c:215457:9 */
// ************************************************************************
//
// Start of highlight() implementation.
-type HighlightContext = HighlightContext1 /* sqlite3.c:214223:33 */
+type HighlightContext = HighlightContext1 /* sqlite3.c:215457:33 */
// Append text to the HighlightContext output string - p->zOut. Argument
// z points to a buffer containing n bytes of text to append. If n is
@@ -164608,7 +172985,7 @@ type HighlightContext = HighlightContext1 /* sqlite3.c:214223:33 */
// If *pRc is set to any value other than SQLITE_OK when this function is
// called, it is a no-op. If an error (i.e. an OOM condition) is encountered,
// *pRc is set to an error code before returning.
-func fts5HighlightAppend(tls *libc.TLS, pRc uintptr, p uintptr, z uintptr, n int32) { /* sqlite3.c:214246:13: */
+func fts5HighlightAppend(tls *libc.TLS, pRc uintptr, p uintptr, z uintptr, n int32) { /* sqlite3.c:215480:13: */
bp := tls.Alloc(24)
defer tls.Free(24)
@@ -164616,7 +172993,7 @@ func fts5HighlightAppend(tls *libc.TLS, pRc uintptr, p uintptr, z uintptr, n int
if n < 0 {
n = int32(libc.Xstrlen(tls, z))
}
- (*HighlightContext)(unsafe.Pointer(p)).FzOut = Xsqlite3_mprintf(tls, ts+30143 /* "%z%.*s" */, libc.VaList(bp, (*HighlightContext)(unsafe.Pointer(p)).FzOut, n, z))
+ (*HighlightContext)(unsafe.Pointer(p)).FzOut = Xsqlite3_mprintf(tls, ts+31941 /* "%z%.*s" */, libc.VaList(bp, (*HighlightContext)(unsafe.Pointer(p)).FzOut, n, z))
if (*HighlightContext)(unsafe.Pointer(p)).FzOut == uintptr(0) {
*(*int32)(unsafe.Pointer(pRc)) = SQLITE_NOMEM
}
@@ -164624,7 +173001,7 @@ func fts5HighlightAppend(tls *libc.TLS, pRc uintptr, p uintptr, z uintptr, n int
}
// Tokenizer callback used by implementation of highlight() function.
-func fts5HighlightCb(tls *libc.TLS, pContext uintptr, tflags int32, pToken uintptr, nToken int32, iStartOff int32, iEndOff int32) int32 { /* sqlite3.c:214261:12: */
+func fts5HighlightCb(tls *libc.TLS, pContext uintptr, tflags int32, pToken uintptr, nToken int32, iStartOff int32, iEndOff int32) int32 { /* sqlite3.c:215495:12: */
bp := tls.Alloc(4)
defer tls.Free(4)
@@ -164679,7 +173056,7 @@ func fts5HighlightCb(tls *libc.TLS, pContext uintptr, tflags int32, pToken uintp
}
// Implementation of highlight() function.
-func fts5HighlightFunction(tls *libc.TLS, pApi uintptr, pFts uintptr, pCtx uintptr, nVal int32, apVal uintptr) { /* sqlite3.c:214315:13: */
+func fts5HighlightFunction(tls *libc.TLS, pApi uintptr, pFts uintptr, pCtx uintptr, nVal int32, apVal uintptr) { /* sqlite3.c:215549:13: */
bp := tls.Alloc(100)
defer tls.Free(100)
@@ -164690,7 +173067,7 @@ func fts5HighlightFunction(tls *libc.TLS, pApi uintptr, pFts uintptr, pCtx uintp
var iCol int32
if nVal != 3 {
- var zErr uintptr = ts + 30150 /* "wrong number of ..." */
+ var zErr uintptr = ts + 31948 /* "wrong number of ..." */
Xsqlite3_result_error(tls, pCtx, zErr, -1)
return
}
@@ -164699,7 +173076,9 @@ func fts5HighlightFunction(tls *libc.TLS, pApi uintptr, pFts uintptr, pCtx uintp
libc.Xmemset(tls, bp /* &ctx */, 0, uint64(unsafe.Sizeof(HighlightContext{})))
(*HighlightContext)(unsafe.Pointer(bp /* &ctx */)).FzOpen = Xsqlite3_value_text(tls, *(*uintptr)(unsafe.Pointer(apVal + 1*8)))
(*HighlightContext)(unsafe.Pointer(bp /* &ctx */)).FzClose = Xsqlite3_value_text(tls, *(*uintptr)(unsafe.Pointer(apVal + 2*8)))
- *(*int32)(unsafe.Pointer(bp + 96 /* rc */)) = (*(*func(*libc.TLS, uintptr, int32, uintptr, uintptr) int32)(unsafe.Pointer((pApi + 88 /* &.xColumnText */))))(tls, pFts, iCol, (bp /* &ctx */ + 72 /* &.zIn */), (bp /* &ctx */ + 80 /* &.nIn */))
+ *(*int32)(unsafe.Pointer(bp + 96 /* rc */)) = (*struct {
+ f func(*libc.TLS, uintptr, int32, uintptr, uintptr) int32
+ })(unsafe.Pointer(&struct{ uintptr }{(*Fts5ExtensionApi)(unsafe.Pointer(pApi)).FxColumnText})).f(tls, pFts, iCol, (bp /* &ctx */ + 72 /* &.zIn */), (bp /* &ctx */ + 80 /* &.nIn */))
if (*HighlightContext)(unsafe.Pointer(bp /* &ctx */)).FzIn != 0 {
if *(*int32)(unsafe.Pointer(bp + 96 /* rc */)) == SQLITE_OK {
@@ -164707,7 +173086,9 @@ func fts5HighlightFunction(tls *libc.TLS, pApi uintptr, pFts uintptr, pCtx uintp
}
if *(*int32)(unsafe.Pointer(bp + 96 /* rc */)) == SQLITE_OK {
- *(*int32)(unsafe.Pointer(bp + 96 /* rc */)) = (*(*func(*libc.TLS, uintptr, uintptr, int32, uintptr, uintptr) int32)(unsafe.Pointer((pApi + 40 /* &.xTokenize */))))(tls, pFts, (*HighlightContext)(unsafe.Pointer(bp /* &ctx */)).FzIn, (*HighlightContext)(unsafe.Pointer(bp /* &ctx */)).FnIn, bp /* &ctx */, *(*uintptr)(unsafe.Pointer(&struct {
+ *(*int32)(unsafe.Pointer(bp + 96 /* rc */)) = (*struct {
+ f func(*libc.TLS, uintptr, uintptr, int32, uintptr, uintptr) int32
+ })(unsafe.Pointer(&struct{ uintptr }{(*Fts5ExtensionApi)(unsafe.Pointer(pApi)).FxTokenize})).f(tls, pFts, (*HighlightContext)(unsafe.Pointer(bp /* &ctx */)).FzIn, (*HighlightContext)(unsafe.Pointer(bp /* &ctx */)).FnIn, bp /* &ctx */, *(*uintptr)(unsafe.Pointer(&struct {
f func(*libc.TLS, uintptr, int32, uintptr, int32, int32, int32) int32
}{fts5HighlightCb})))
}
@@ -164732,22 +173113,22 @@ type Fts5SFinder1 = struct {
FiPos int32
FnFirstAlloc int32
FnFirst int32
- _ [4]byte
+ F__ccgo_pad1 [4]byte
FaFirst uintptr
FzDoc uintptr
-} /* sqlite3.c:214364:9 */
+} /* sqlite3.c:215598:9 */
//
// End of highlight() implementation.
//
// Context object passed to the fts5SentenceFinderCb() function.
-type Fts5SFinder = Fts5SFinder1 /* sqlite3.c:214364:28 */
+type Fts5SFinder = Fts5SFinder1 /* sqlite3.c:215598:28 */
// Add an entry to the Fts5SFinder.aFirst[] array. Grow the array if
// necessary. Return SQLITE_OK if successful, or SQLITE_NOMEM if an
// error occurs.
-func fts5SentenceFinderAdd(tls *libc.TLS, p uintptr, iAdd int32) int32 { /* sqlite3.c:214378:12: */
+func fts5SentenceFinderAdd(tls *libc.TLS, p uintptr, iAdd int32) int32 { /* sqlite3.c:215612:12: */
if (*Fts5SFinder)(unsafe.Pointer(p)).FnFirstAlloc == (*Fts5SFinder)(unsafe.Pointer(p)).FnFirst {
var nNew int32
if (*Fts5SFinder)(unsafe.Pointer(p)).FnFirstAlloc != 0 {
@@ -164771,7 +173152,7 @@ func fts5SentenceFinderAdd(tls *libc.TLS, p uintptr, iAdd int32) int32 { /* sqli
// This function is an xTokenize() callback used by the auxiliary snippet()
// function. Its job is to identify tokens that are the first in a sentence.
// For each such token, an entry is added to the SFinder.aFirst[] array.
-func fts5SentenceFinderCb(tls *libc.TLS, pContext uintptr, tflags int32, pToken uintptr, nToken int32, iStartOff int32, iEndOff int32) int32 { /* sqlite3.c:214397:12: */
+func fts5SentenceFinderCb(tls *libc.TLS, pContext uintptr, tflags int32, pToken uintptr, nToken int32, iStartOff int32, iEndOff int32) int32 { /* sqlite3.c:215631:12: */
var rc int32 = SQLITE_OK
_ = pToken
@@ -164782,9 +173163,9 @@ func fts5SentenceFinderCb(tls *libc.TLS, pContext uintptr, tflags int32, pToken
var p uintptr = pContext
if (*Fts5SFinder)(unsafe.Pointer(p)).FiPos > 0 {
var i int32
- var c int8 = int8(0)
+ var c uint8 = uint8(0)
for i = (iStartOff - 1); i >= 0; i-- {
- c = *(*int8)(unsafe.Pointer((*Fts5SFinder)(unsafe.Pointer(p)).FzDoc + uintptr(i)))
+ c = *(*uint8)(unsafe.Pointer((*Fts5SFinder)(unsafe.Pointer(p)).FzDoc + uintptr(i)))
if (((int32(c) != ' ') && (int32(c) != '\t')) && (int32(c) != '\n')) && (int32(c) != '\r') {
break
}
@@ -164800,7 +173181,7 @@ func fts5SentenceFinderCb(tls *libc.TLS, pContext uintptr, tflags int32, pToken
return rc
}
-func fts5SnippetScore(tls *libc.TLS, pApi uintptr, pFts uintptr, nDocsize int32, aSeen uintptr, iCol int32, iPos int32, nToken int32, pnScore uintptr, piPos uintptr) int32 { /* sqlite3.c:214430:12: */
+func fts5SnippetScore(tls *libc.TLS, pApi uintptr, pFts uintptr, nDocsize int32, aSeen uintptr, iCol int32, iPos int32, nToken int32, pnScore uintptr, piPos uintptr) int32 { /* sqlite3.c:215664:12: */
bp := tls.Alloc(16)
defer tls.Free(16)
@@ -164816,9 +173197,13 @@ func fts5SnippetScore(tls *libc.TLS, pApi uintptr, pFts uintptr, nDocsize int32,
var iLast int32 = 0
var iEnd Sqlite3_int64 = (Sqlite3_int64(iPos) + Sqlite3_int64(nToken))
- rc = (*(*func(*libc.TLS, uintptr, uintptr) int32)(unsafe.Pointer((pApi + 64 /* &.xInstCount */))))(tls, pFts, bp /* &nInst */)
+ rc = (*struct {
+ f func(*libc.TLS, uintptr, uintptr) int32
+ })(unsafe.Pointer(&struct{ uintptr }{(*Fts5ExtensionApi)(unsafe.Pointer(pApi)).FxInstCount})).f(tls, pFts, bp /* &nInst */)
for i = 0; (i < *(*int32)(unsafe.Pointer(bp /* nInst */))) && (rc == SQLITE_OK); i++ {
- rc = (*(*func(*libc.TLS, uintptr, int32, uintptr, uintptr, uintptr) int32)(unsafe.Pointer((pApi + 72 /* &.xInst */))))(tls, pFts, i, bp+4 /* &ip */, bp+8 /* &ic */, bp+12 /* &iOff */)
+ rc = (*struct {
+ f func(*libc.TLS, uintptr, int32, uintptr, uintptr, uintptr) int32
+ })(unsafe.Pointer(&struct{ uintptr }{(*Fts5ExtensionApi)(unsafe.Pointer(pApi)).FxInst})).f(tls, pFts, i, bp+4 /* &ip */, bp+8 /* &ic */, bp+12 /* &iOff */)
if (((rc == SQLITE_OK) && (*(*int32)(unsafe.Pointer(bp + 8 /* ic */)) == iCol)) && (*(*int32)(unsafe.Pointer(bp + 12 /* iOff */)) >= iPos)) && (Sqlite3_int64(*(*int32)(unsafe.Pointer(bp + 12 /* iOff */))) < iEnd) {
nScore = nScore + (func() int32 {
if *(*uint8)(unsafe.Pointer(aSeen + uintptr(*(*int32)(unsafe.Pointer(bp + 4 /* ip */))))) != 0 {
@@ -164830,7 +173215,9 @@ func fts5SnippetScore(tls *libc.TLS, pApi uintptr, pFts uintptr, nDocsize int32,
if iFirst < 0 {
iFirst = *(*int32)(unsafe.Pointer(bp + 12 /* iOff */))
}
- iLast = (*(*int32)(unsafe.Pointer(bp + 12 /* iOff */)) + (*(*func(*libc.TLS, uintptr, int32) int32)(unsafe.Pointer((pApi + 56 /* &.xPhraseSize */))))(tls, pFts, *(*int32)(unsafe.Pointer(bp + 4 /* ip */))))
+ iLast = (*(*int32)(unsafe.Pointer(bp + 12 /* iOff */)) + (*struct {
+ f func(*libc.TLS, uintptr, int32) int32
+ })(unsafe.Pointer(&struct{ uintptr }{(*Fts5ExtensionApi)(unsafe.Pointer(pApi)).FxPhraseSize})).f(tls, pFts, *(*int32)(unsafe.Pointer(bp + 4 /* ip */))))
}
}
@@ -164852,16 +173239,16 @@ func fts5SnippetScore(tls *libc.TLS, pApi uintptr, pFts uintptr, nDocsize int32,
// Return the value in pVal interpreted as utf-8 text. Except, if pVal
// contains a NULL value, return a pointer to a static string zero
// bytes in length instead of a NULL pointer.
-func fts5ValueToText(tls *libc.TLS, pVal uintptr) uintptr { /* sqlite3.c:214479:19: */
+func fts5ValueToText(tls *libc.TLS, pVal uintptr) uintptr { /* sqlite3.c:215713:19: */
var zRet uintptr = Xsqlite3_value_text(tls, pVal)
if zRet != 0 {
return zRet
}
- return ts + 703 /* "" */
+ return ts + 755 /* "" */
}
// Implementation of snippet() function.
-func fts5SnippetFunction(tls *libc.TLS, pApi uintptr, pFts uintptr, pCtx uintptr, nVal int32, apVal uintptr) { /* sqlite3.c:214487:13: */
+func fts5SnippetFunction(tls *libc.TLS, pApi uintptr, pFts uintptr, pCtx uintptr, nVal int32, apVal uintptr) { /* sqlite3.c:215721:13: */
bp := tls.Alloc(172)
defer tls.Free(172)
@@ -164884,12 +173271,14 @@ func fts5SnippetFunction(tls *libc.TLS, pApi uintptr, pFts uintptr, pCtx uintptr
var nCol int32
if nVal != 5 {
- var zErr uintptr = ts + 30200 /* "wrong number of ..." */
+ var zErr uintptr = ts + 31998 /* "wrong number of ..." */
Xsqlite3_result_error(tls, pCtx, zErr, -1)
return
}
- nCol = (*(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer((pApi + 16 /* &.xColumnCount */))))(tls, pFts)
+ nCol = (*struct {
+ f func(*libc.TLS, uintptr) int32
+ })(unsafe.Pointer(&struct{ uintptr }{(*Fts5ExtensionApi)(unsafe.Pointer(pApi)).FxColumnCount})).f(tls, pFts)
libc.Xmemset(tls, bp /* &ctx */, 0, uint64(unsafe.Sizeof(HighlightContext{})))
iCol = Xsqlite3_value_int(tls, *(*uintptr)(unsafe.Pointer(apVal)))
(*HighlightContext)(unsafe.Pointer(bp /* &ctx */)).FzOpen = fts5ValueToText(tls, *(*uintptr)(unsafe.Pointer(apVal + 1*8)))
@@ -164903,13 +173292,17 @@ func fts5SnippetFunction(tls *libc.TLS, pApi uintptr, pFts uintptr, pCtx uintptr
}
return 0
}()
- nPhrase = (*(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer((pApi + 48 /* &.xPhraseCount */))))(tls, pFts)
+ nPhrase = (*struct {
+ f func(*libc.TLS, uintptr) int32
+ })(unsafe.Pointer(&struct{ uintptr }{(*Fts5ExtensionApi)(unsafe.Pointer(pApi)).FxPhraseCount})).f(tls, pFts)
aSeen = Xsqlite3_malloc(tls, nPhrase)
if aSeen == uintptr(0) {
*(*int32)(unsafe.Pointer(bp + 168 /* rc */)) = SQLITE_NOMEM
}
if *(*int32)(unsafe.Pointer(bp + 168 /* rc */)) == SQLITE_OK {
- *(*int32)(unsafe.Pointer(bp + 168 /* rc */)) = (*(*func(*libc.TLS, uintptr, uintptr) int32)(unsafe.Pointer((pApi + 64 /* &.xInstCount */))))(tls, pFts, bp+96 /* &nInst */)
+ *(*int32)(unsafe.Pointer(bp + 168 /* rc */)) = (*struct {
+ f func(*libc.TLS, uintptr, uintptr) int32
+ })(unsafe.Pointer(&struct{ uintptr }{(*Fts5ExtensionApi)(unsafe.Pointer(pApi)).FxInstCount})).f(tls, pFts, bp+96 /* &nInst */)
}
libc.Xmemset(tls, bp+104 /* &sFinder */, 0, uint64(unsafe.Sizeof(Fts5SFinder{})))
@@ -164922,18 +173315,24 @@ func fts5SnippetFunction(tls *libc.TLS, pApi uintptr, pFts uintptr, pCtx uintptr
var ii int32
(*Fts5SFinder)(unsafe.Pointer(bp + 104 /* &sFinder */)).FiPos = 0
(*Fts5SFinder)(unsafe.Pointer(bp + 104 /* &sFinder */)).FnFirst = 0
- *(*int32)(unsafe.Pointer(bp + 168 /* rc */)) = (*(*func(*libc.TLS, uintptr, int32, uintptr, uintptr) int32)(unsafe.Pointer((pApi + 88 /* &.xColumnText */))))(tls, pFts, i, (bp + 104 /* &sFinder */ + 24 /* &.zDoc */), bp+136 /* &nDoc */)
+ *(*int32)(unsafe.Pointer(bp + 168 /* rc */)) = (*struct {
+ f func(*libc.TLS, uintptr, int32, uintptr, uintptr) int32
+ })(unsafe.Pointer(&struct{ uintptr }{(*Fts5ExtensionApi)(unsafe.Pointer(pApi)).FxColumnText})).f(tls, pFts, i, (bp + 104 /* &sFinder */ + 24 /* &.zDoc */), bp+136 /* &nDoc */)
if *(*int32)(unsafe.Pointer(bp + 168 /* rc */)) != SQLITE_OK {
break
}
- *(*int32)(unsafe.Pointer(bp + 168 /* rc */)) = (*(*func(*libc.TLS, uintptr, uintptr, int32, uintptr, uintptr) int32)(unsafe.Pointer((pApi + 40 /* &.xTokenize */))))(tls, pFts,
+ *(*int32)(unsafe.Pointer(bp + 168 /* rc */)) = (*struct {
+ f func(*libc.TLS, uintptr, uintptr, int32, uintptr, uintptr) int32
+ })(unsafe.Pointer(&struct{ uintptr }{(*Fts5ExtensionApi)(unsafe.Pointer(pApi)).FxTokenize})).f(tls, pFts,
(*Fts5SFinder)(unsafe.Pointer(bp+104 /* &sFinder */)).FzDoc, *(*int32)(unsafe.Pointer(bp + 136 /* nDoc */)), bp+104 /* &sFinder */, *(*uintptr)(unsafe.Pointer(&struct {
f func(*libc.TLS, uintptr, int32, uintptr, int32, int32, int32) int32
}{fts5SentenceFinderCb})))
if *(*int32)(unsafe.Pointer(bp + 168 /* rc */)) != SQLITE_OK {
break
}
- *(*int32)(unsafe.Pointer(bp + 168 /* rc */)) = (*(*func(*libc.TLS, uintptr, int32, uintptr) int32)(unsafe.Pointer((pApi + 96 /* &.xColumnSize */))))(tls, pFts, i, bp+140 /* &nDocsize */)
+ *(*int32)(unsafe.Pointer(bp + 168 /* rc */)) = (*struct {
+ f func(*libc.TLS, uintptr, int32, uintptr) int32
+ })(unsafe.Pointer(&struct{ uintptr }{(*Fts5ExtensionApi)(unsafe.Pointer(pApi)).FxColumnSize})).f(tls, pFts, i, bp+140 /* &nDocsize */)
if *(*int32)(unsafe.Pointer(bp + 168 /* rc */)) != SQLITE_OK {
break
}
@@ -164951,7 +173350,9 @@ func fts5SnippetFunction(tls *libc.TLS, pApi uintptr, pFts uintptr, pCtx uintptr
var jj int32
- *(*int32)(unsafe.Pointer(bp + 168 /* rc */)) = (*(*func(*libc.TLS, uintptr, int32, uintptr, uintptr, uintptr) int32)(unsafe.Pointer((pApi + 72 /* &.xInst */))))(tls, pFts, ii, bp+144 /* &ip */, bp+148 /* &ic */, bp+152 /* &io */)
+ *(*int32)(unsafe.Pointer(bp + 168 /* rc */)) = (*struct {
+ f func(*libc.TLS, uintptr, int32, uintptr, uintptr, uintptr) int32
+ })(unsafe.Pointer(&struct{ uintptr }{(*Fts5ExtensionApi)(unsafe.Pointer(pApi)).FxInst})).f(tls, pFts, ii, bp+144 /* &ip */, bp+148 /* &ic */, bp+152 /* &io */)
if *(*int32)(unsafe.Pointer(bp + 148 /* ic */)) != i {
continue
}
@@ -165002,10 +173403,14 @@ func fts5SnippetFunction(tls *libc.TLS, pApi uintptr, pFts uintptr, pCtx uintptr
}
if *(*int32)(unsafe.Pointer(bp + 168 /* rc */)) == SQLITE_OK {
- *(*int32)(unsafe.Pointer(bp + 168 /* rc */)) = (*(*func(*libc.TLS, uintptr, int32, uintptr, uintptr) int32)(unsafe.Pointer((pApi + 88 /* &.xColumnText */))))(tls, pFts, iBestCol, (bp /* &ctx */ + 72 /* &.zIn */), (bp /* &ctx */ + 80 /* &.nIn */))
+ *(*int32)(unsafe.Pointer(bp + 168 /* rc */)) = (*struct {
+ f func(*libc.TLS, uintptr, int32, uintptr, uintptr) int32
+ })(unsafe.Pointer(&struct{ uintptr }{(*Fts5ExtensionApi)(unsafe.Pointer(pApi)).FxColumnText})).f(tls, pFts, iBestCol, (bp /* &ctx */ + 72 /* &.zIn */), (bp /* &ctx */ + 80 /* &.nIn */))
}
if (*(*int32)(unsafe.Pointer(bp + 168 /* rc */)) == SQLITE_OK) && (*(*int32)(unsafe.Pointer(bp + 164 /* nColSize */)) == 0) {
- *(*int32)(unsafe.Pointer(bp + 168 /* rc */)) = (*(*func(*libc.TLS, uintptr, int32, uintptr) int32)(unsafe.Pointer((pApi + 96 /* &.xColumnSize */))))(tls, pFts, iBestCol, bp+164 /* &nColSize */)
+ *(*int32)(unsafe.Pointer(bp + 168 /* rc */)) = (*struct {
+ f func(*libc.TLS, uintptr, int32, uintptr) int32
+ })(unsafe.Pointer(&struct{ uintptr }{(*Fts5ExtensionApi)(unsafe.Pointer(pApi)).FxColumnSize})).f(tls, pFts, iBestCol, bp+164 /* &nColSize */)
}
if (*HighlightContext)(unsafe.Pointer(bp /* &ctx */)).FzIn != 0 {
if *(*int32)(unsafe.Pointer(bp + 168 /* rc */)) == SQLITE_OK {
@@ -165026,7 +173431,9 @@ func fts5SnippetFunction(tls *libc.TLS, pApi uintptr, pFts uintptr, pCtx uintptr
}
if *(*int32)(unsafe.Pointer(bp + 168 /* rc */)) == SQLITE_OK {
- *(*int32)(unsafe.Pointer(bp + 168 /* rc */)) = (*(*func(*libc.TLS, uintptr, uintptr, int32, uintptr, uintptr) int32)(unsafe.Pointer((pApi + 40 /* &.xTokenize */))))(tls, pFts, (*HighlightContext)(unsafe.Pointer(bp /* &ctx */)).FzIn, (*HighlightContext)(unsafe.Pointer(bp /* &ctx */)).FnIn, bp /* &ctx */, *(*uintptr)(unsafe.Pointer(&struct {
+ *(*int32)(unsafe.Pointer(bp + 168 /* rc */)) = (*struct {
+ f func(*libc.TLS, uintptr, uintptr, int32, uintptr, uintptr) int32
+ })(unsafe.Pointer(&struct{ uintptr }{(*Fts5ExtensionApi)(unsafe.Pointer(pApi)).FxTokenize})).f(tls, pFts, (*HighlightContext)(unsafe.Pointer(bp /* &ctx */)).FzIn, (*HighlightContext)(unsafe.Pointer(bp /* &ctx */)).FnIn, bp /* &ctx */, *(*uintptr)(unsafe.Pointer(&struct {
f func(*libc.TLS, uintptr, int32, uintptr, int32, int32, int32) int32
}{fts5HighlightCb})))
}
@@ -165051,22 +173458,22 @@ func fts5SnippetFunction(tls *libc.TLS, pApi uintptr, pFts uintptr, pCtx uintptr
// The first time the bm25() function is called for a query, an instance
// of the following structure is allocated and populated.
type Fts5Bm25Data1 = struct {
- FnPhrase int32
- _ [4]byte
- Favgdl float64
- FaIDF uintptr
- FaFreq uintptr
-} /* sqlite3.c:214645:9 */
+ FnPhrase int32
+ F__ccgo_pad1 [4]byte
+ Favgdl float64
+ FaIDF uintptr
+ FaFreq uintptr
+} /* sqlite3.c:215879:9 */
//**********************************************************************
// The first time the bm25() function is called for a query, an instance
// of the following structure is allocated and populated.
-type Fts5Bm25Data = Fts5Bm25Data1 /* sqlite3.c:214645:29 */
+type Fts5Bm25Data = Fts5Bm25Data1 /* sqlite3.c:215879:29 */
// Callback used by fts5Bm25GetData() to count the number of rows in the
// table matched by each individual phrase within the query.
-func fts5CountCb(tls *libc.TLS, pApi uintptr, pFts uintptr, pUserData uintptr) int32 { /* sqlite3.c:214657:12: */
+func fts5CountCb(tls *libc.TLS, pApi uintptr, pFts uintptr, pUserData uintptr) int32 { /* sqlite3.c:215891:12: */
var pn uintptr = pUserData
_ = pApi
_ = pFts
@@ -165077,14 +173484,16 @@ func fts5CountCb(tls *libc.TLS, pApi uintptr, pFts uintptr, pUserData uintptr) i
// Set *ppData to point to the Fts5Bm25Data object for the current query.
// If the object has not already been allocated, allocate and populate it
// now.
-func fts5Bm25GetData(tls *libc.TLS, pApi uintptr, pFts uintptr, ppData uintptr) int32 { /* sqlite3.c:214673:12: */
+func fts5Bm25GetData(tls *libc.TLS, pApi uintptr, pFts uintptr, ppData uintptr) int32 { /* sqlite3.c:215907:12: */
bp := tls.Alloc(24)
defer tls.Free(24)
var rc int32 = SQLITE_OK // Return code
var p uintptr // Object to return
- p = (*(*func(*libc.TLS, uintptr, int32) uintptr)(unsafe.Pointer((pApi + 120 /* &.xGetAuxdata */))))(tls, pFts, 0)
+ p = (*struct {
+ f func(*libc.TLS, uintptr, int32) uintptr
+ })(unsafe.Pointer(&struct{ uintptr }{(*Fts5ExtensionApi)(unsafe.Pointer(pApi)).FxGetAuxdata})).f(tls, pFts, 0)
if p == uintptr(0) {
var nPhrase int32 // Number of phrases in query
*(*Sqlite3_int64)(unsafe.Pointer(bp /* nRow */)) = int64(0) // Number of rows in table
@@ -165093,7 +173502,9 @@ func fts5Bm25GetData(tls *libc.TLS, pApi uintptr, pFts uintptr, ppData uintptr)
var i int32
// Allocate the Fts5Bm25Data object
- nPhrase = (*(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer((pApi + 48 /* &.xPhraseCount */))))(tls, pFts)
+ nPhrase = (*struct {
+ f func(*libc.TLS, uintptr) int32
+ })(unsafe.Pointer(&struct{ uintptr }{(*Fts5ExtensionApi)(unsafe.Pointer(pApi)).FxPhraseCount})).f(tls, pFts)
nByte = (Sqlite3_int64(uint64(unsafe.Sizeof(Fts5Bm25Data{})) + ((uint64(nPhrase * 2)) * uint64(unsafe.Sizeof(float64(0))))))
p = Xsqlite3_malloc64(tls, uint64(nByte))
if p == uintptr(0) {
@@ -165107,11 +173518,15 @@ func fts5Bm25GetData(tls *libc.TLS, pApi uintptr, pFts uintptr, ppData uintptr)
// Calculate the average document length for this FTS5 table
if rc == SQLITE_OK {
- rc = (*(*func(*libc.TLS, uintptr, uintptr) int32)(unsafe.Pointer((pApi + 24 /* &.xRowCount */))))(tls, pFts, bp /* &nRow */)
+ rc = (*struct {
+ f func(*libc.TLS, uintptr, uintptr) int32
+ })(unsafe.Pointer(&struct{ uintptr }{(*Fts5ExtensionApi)(unsafe.Pointer(pApi)).FxRowCount})).f(tls, pFts, bp /* &nRow */)
}
if rc == SQLITE_OK {
- rc = (*(*func(*libc.TLS, uintptr, int32, uintptr) int32)(unsafe.Pointer((pApi + 32 /* &.xColumnTotalSize */))))(tls, pFts, -1, bp+8 /* &nToken */)
+ rc = (*struct {
+ f func(*libc.TLS, uintptr, int32, uintptr) int32
+ })(unsafe.Pointer(&struct{ uintptr }{(*Fts5ExtensionApi)(unsafe.Pointer(pApi)).FxColumnTotalSize})).f(tls, pFts, -1, bp+8 /* &nToken */)
}
if rc == SQLITE_OK {
(*Fts5Bm25Data)(unsafe.Pointer(p)).Favgdl = (float64(*(*Sqlite3_int64)(unsafe.Pointer(bp + 8 /* nToken */))) / float64(*(*Sqlite3_int64)(unsafe.Pointer(bp /* nRow */))))
@@ -165120,7 +173535,9 @@ func fts5Bm25GetData(tls *libc.TLS, pApi uintptr, pFts uintptr, ppData uintptr)
// Calculate an IDF for each phrase in the query
for i = 0; (rc == SQLITE_OK) && (i < nPhrase); i++ {
*(*Sqlite3_int64)(unsafe.Pointer(bp + 16 /* nHit */)) = int64(0)
- rc = (*(*func(*libc.TLS, uintptr, int32, uintptr, uintptr) int32)(unsafe.Pointer((pApi + 104 /* &.xQueryPhrase */))))(tls, pFts, i, bp+16 /* &nHit */, *(*uintptr)(unsafe.Pointer(&struct {
+ rc = (*struct {
+ f func(*libc.TLS, uintptr, int32, uintptr, uintptr) int32
+ })(unsafe.Pointer(&struct{ uintptr }{(*Fts5ExtensionApi)(unsafe.Pointer(pApi)).FxQueryPhrase})).f(tls, pFts, i, bp+16 /* &nHit */, *(*uintptr)(unsafe.Pointer(&struct {
f func(*libc.TLS, uintptr, uintptr, uintptr) int32
}{fts5CountCb})))
if rc == SQLITE_OK {
@@ -165148,7 +173565,9 @@ func fts5Bm25GetData(tls *libc.TLS, pApi uintptr, pFts uintptr, ppData uintptr)
if rc != SQLITE_OK {
Xsqlite3_free(tls, p)
} else {
- rc = (*(*func(*libc.TLS, uintptr, uintptr, uintptr) int32)(unsafe.Pointer((pApi + 112 /* &.xSetAuxdata */))))(tls, pFts, p, *(*uintptr)(unsafe.Pointer(&struct{ f func(*libc.TLS, uintptr) }{Xsqlite3_free})))
+ rc = (*struct {
+ f func(*libc.TLS, uintptr, uintptr, uintptr) int32
+ })(unsafe.Pointer(&struct{ uintptr }{(*Fts5ExtensionApi)(unsafe.Pointer(pApi)).FxSetAuxdata})).f(tls, pFts, p, *(*uintptr)(unsafe.Pointer(&struct{ f func(*libc.TLS, uintptr) }{Xsqlite3_free})))
}
if rc != SQLITE_OK {
p = uintptr(0)
@@ -165159,7 +173578,7 @@ func fts5Bm25GetData(tls *libc.TLS, pApi uintptr, pFts uintptr, ppData uintptr)
}
// Implementation of bm25() function.
-func fts5Bm25Function(tls *libc.TLS, pApi uintptr, pFts uintptr, pCtx uintptr, nVal int32, apVal uintptr) { /* sqlite3.c:214746:13: */
+func fts5Bm25Function(tls *libc.TLS, pApi uintptr, pFts uintptr, pCtx uintptr, nVal int32, apVal uintptr) { /* sqlite3.c:215980:13: */
bp := tls.Alloc(28)
defer tls.Free(28)
@@ -165180,7 +173599,9 @@ func fts5Bm25Function(tls *libc.TLS, pApi uintptr, pFts uintptr, pCtx uintptr, n
if rc == SQLITE_OK {
aFreq = (*Fts5Bm25Data)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp /* pData */)))).FaFreq
libc.Xmemset(tls, aFreq, 0, (uint64(unsafe.Sizeof(float64(0))) * uint64((*Fts5Bm25Data)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp /* pData */)))).FnPhrase)))
- rc = (*(*func(*libc.TLS, uintptr, uintptr) int32)(unsafe.Pointer((pApi + 64 /* &.xInstCount */))))(tls, pFts, bp+8 /* &nInst */)
+ rc = (*struct {
+ f func(*libc.TLS, uintptr, uintptr) int32
+ })(unsafe.Pointer(&struct{ uintptr }{(*Fts5ExtensionApi)(unsafe.Pointer(pApi)).FxInstCount})).f(tls, pFts, bp+8 /* &nInst */)
}
for i = 0; (rc == SQLITE_OK) && (i < *(*int32)(unsafe.Pointer(bp + 8 /* nInst */))); i++ {
// var ip int32 at bp+12, 4
@@ -165189,7 +173610,9 @@ func fts5Bm25Function(tls *libc.TLS, pApi uintptr, pFts uintptr, pCtx uintptr, n
// var io int32 at bp+20, 4
- rc = (*(*func(*libc.TLS, uintptr, int32, uintptr, uintptr, uintptr) int32)(unsafe.Pointer((pApi + 72 /* &.xInst */))))(tls, pFts, i, bp+12 /* &ip */, bp+16 /* &ic */, bp+20 /* &io */)
+ rc = (*struct {
+ f func(*libc.TLS, uintptr, int32, uintptr, uintptr, uintptr) int32
+ })(unsafe.Pointer(&struct{ uintptr }{(*Fts5ExtensionApi)(unsafe.Pointer(pApi)).FxInst})).f(tls, pFts, i, bp+12 /* &ip */, bp+16 /* &ic */, bp+20 /* &io */)
if rc == SQLITE_OK {
var w float64
if nVal > *(*int32)(unsafe.Pointer(bp + 16 /* ic */)) {
@@ -165205,7 +173628,9 @@ func fts5Bm25Function(tls *libc.TLS, pApi uintptr, pFts uintptr, pCtx uintptr, n
if rc == SQLITE_OK {
// var nTok int32 at bp+24, 4
- rc = (*(*func(*libc.TLS, uintptr, int32, uintptr) int32)(unsafe.Pointer((pApi + 96 /* &.xColumnSize */))))(tls, pFts, -1, bp+24 /* &nTok */)
+ rc = (*struct {
+ f func(*libc.TLS, uintptr, int32, uintptr) int32
+ })(unsafe.Pointer(&struct{ uintptr }{(*Fts5ExtensionApi)(unsafe.Pointer(pApi)).FxColumnSize})).f(tls, pFts, -1, bp+24 /* &nTok */)
D = float64(*(*int32)(unsafe.Pointer(bp + 24 /* nTok */)))
}
@@ -165221,18 +173646,18 @@ func fts5Bm25Function(tls *libc.TLS, pApi uintptr, pFts uintptr, pCtx uintptr, n
}
}
-func sqlite3Fts5AuxInit(tls *libc.TLS, pApi uintptr) int32 { /* sqlite3.c:214802:12: */
+func sqlite3Fts5AuxInit(tls *libc.TLS, pApi uintptr) int32 { /* sqlite3.c:216036:12: */
bp := tls.Alloc(96)
defer tls.Free(96)
*(*[3]Builtin)(unsafe.Pointer(bp /* aBuiltin */)) = [3]Builtin{
- {FzFunc: ts + 30248 /* "snippet" */, FxFunc: *(*uintptr)(unsafe.Pointer(&struct {
+ {FzFunc: ts + 32046 /* "snippet" */, FxFunc: *(*uintptr)(unsafe.Pointer(&struct {
f func(*libc.TLS, uintptr, uintptr, uintptr, int32, uintptr)
}{fts5SnippetFunction}))},
- {FzFunc: ts + 30256 /* "highlight" */, FxFunc: *(*uintptr)(unsafe.Pointer(&struct {
+ {FzFunc: ts + 32054 /* "highlight" */, FxFunc: *(*uintptr)(unsafe.Pointer(&struct {
f func(*libc.TLS, uintptr, uintptr, uintptr, int32, uintptr)
}{fts5HighlightFunction}))},
- {FzFunc: ts + 30266 /* "bm25" */, FxFunc: *(*uintptr)(unsafe.Pointer(&struct {
+ {FzFunc: ts + 32064 /* "bm25" */, FxFunc: *(*uintptr)(unsafe.Pointer(&struct {
f func(*libc.TLS, uintptr, uintptr, uintptr, int32, uintptr)
}{fts5Bm25Function}))},
}
@@ -165240,7 +173665,9 @@ func sqlite3Fts5AuxInit(tls *libc.TLS, pApi uintptr) int32 { /* sqlite3.c:214802
var i int32 // To iterate through builtin functions
for i = 0; (rc == SQLITE_OK) && (i < (int32(uint64(unsafe.Sizeof([3]Builtin{})) / uint64(unsafe.Sizeof(Builtin{}))))); i++ {
- rc = (*(*func(*libc.TLS, uintptr, uintptr, uintptr, Fts5_extension_function, uintptr) int32)(unsafe.Pointer((pApi + 24 /* &.xCreateFunction */))))(tls, pApi,
+ rc = (*struct {
+ f func(*libc.TLS, uintptr, uintptr, uintptr, Fts5_extension_function, uintptr) int32
+ })(unsafe.Pointer(&struct{ uintptr }{(*Fts5_api)(unsafe.Pointer(pApi)).FxCreateFunction})).f(tls, pApi,
(*Builtin)(unsafe.Pointer(bp /* &aBuiltin */ +uintptr(i)*32)).FzFunc,
(*Builtin)(unsafe.Pointer(bp /* &aBuiltin */ +uintptr(i)*32)).FpUserData,
(*Builtin)(unsafe.Pointer(bp /* &aBuiltin */ +uintptr(i)*32)).FxFunc,
@@ -165255,7 +173682,7 @@ type Builtin = struct {
FpUserData uintptr
FxFunc Fts5_extension_function
FxDestroy uintptr
-} /* sqlite3.c:214803:3 */
+} /* sqlite3.c:216037:3 */
// 2014 May 31
//
@@ -165270,7 +173697,7 @@ type Builtin = struct {
// #include "fts5Int.h"
-func sqlite3Fts5BufferSize(tls *libc.TLS, pRc uintptr, pBuf uintptr, nByte U32) int32 { /* sqlite3.c:214845:12: */
+func sqlite3Fts5BufferSize(tls *libc.TLS, pRc uintptr, pBuf uintptr, nByte U32) int32 { /* sqlite3.c:216079:12: */
if U32((*Fts5Buffer)(unsafe.Pointer(pBuf)).FnSpace) < nByte {
var nNew U64
if (*Fts5Buffer)(unsafe.Pointer(pBuf)).FnSpace != 0 {
@@ -165296,7 +173723,7 @@ func sqlite3Fts5BufferSize(tls *libc.TLS, pRc uintptr, pBuf uintptr, nByte U32)
// Encode value iVal as an SQLite varint and append it to the buffer object
// pBuf. If an OOM error occurs, set the error code in p.
-func sqlite3Fts5BufferAppendVarint(tls *libc.TLS, pRc uintptr, pBuf uintptr, iVal I64) { /* sqlite3.c:214869:13: */
+func sqlite3Fts5BufferAppendVarint(tls *libc.TLS, pRc uintptr, pBuf uintptr, iVal I64) { /* sqlite3.c:216103:13: */
if func() int32 {
if ((U32((*Fts5Buffer)(unsafe.Pointer(pBuf)).Fn)) + (U32(9))) <= (U32((*Fts5Buffer)(unsafe.Pointer(pBuf)).FnSpace)) {
return 0
@@ -165308,21 +173735,21 @@ func sqlite3Fts5BufferAppendVarint(tls *libc.TLS, pRc uintptr, pBuf uintptr, iVa
*(*int32)(unsafe.Pointer(pBuf + 8 /* &.n */)) += (sqlite3Fts5PutVarint(tls, ((*Fts5Buffer)(unsafe.Pointer(pBuf)).Fp + uintptr((*Fts5Buffer)(unsafe.Pointer(pBuf)).Fn)), uint64(iVal)))
}
-func sqlite3Fts5Put32(tls *libc.TLS, aBuf uintptr, iVal int32) { /* sqlite3.c:214874:13: */
+func sqlite3Fts5Put32(tls *libc.TLS, aBuf uintptr, iVal int32) { /* sqlite3.c:216108:13: */
*(*U8)(unsafe.Pointer(aBuf)) = (U8((iVal >> 24) & 0x00FF))
*(*U8)(unsafe.Pointer(aBuf + 1)) = (U8((iVal >> 16) & 0x00FF))
*(*U8)(unsafe.Pointer(aBuf + 2)) = (U8((iVal >> 8) & 0x00FF))
*(*U8)(unsafe.Pointer(aBuf + 3)) = (U8((iVal >> 0) & 0x00FF))
}
-func sqlite3Fts5Get32(tls *libc.TLS, aBuf uintptr) int32 { /* sqlite3.c:214881:12: */
+func sqlite3Fts5Get32(tls *libc.TLS, aBuf uintptr) int32 { /* sqlite3.c:216115:12: */
return (int32(((((U32(*(*U8)(unsafe.Pointer(aBuf)))) << 24) + (U32(int32(*(*U8)(unsafe.Pointer(aBuf + 1))) << 16))) + (U32(int32(*(*U8)(unsafe.Pointer(aBuf + 2))) << 8))) + U32(*(*U8)(unsafe.Pointer(aBuf + 3)))))
}
// Append buffer nData/pData to buffer pBuf. If an OOM error occurs, set
// the error code in p. If an error has already occurred when this function
// is called, it is a no-op.
-func sqlite3Fts5BufferAppendBlob(tls *libc.TLS, pRc uintptr, pBuf uintptr, nData U32, pData uintptr) { /* sqlite3.c:214890:13: */
+func sqlite3Fts5BufferAppendBlob(tls *libc.TLS, pRc uintptr, pBuf uintptr, nData U32, pData uintptr) { /* sqlite3.c:216124:13: */
if nData != 0 {
if func() int32 {
@@ -165341,7 +173768,7 @@ func sqlite3Fts5BufferAppendBlob(tls *libc.TLS, pRc uintptr, pBuf uintptr, nData
// Append the nul-terminated string zStr to the buffer pBuf. This function
// ensures that the byte following the buffer data is set to 0x00, even
// though this byte is not included in the pBuf->n count.
-func sqlite3Fts5BufferAppendString(tls *libc.TLS, pRc uintptr, pBuf uintptr, zStr uintptr) { /* sqlite3.c:214909:13: */
+func sqlite3Fts5BufferAppendString(tls *libc.TLS, pRc uintptr, pBuf uintptr, zStr uintptr) { /* sqlite3.c:216143:13: */
var nStr int32 = int32(libc.Xstrlen(tls, zStr))
sqlite3Fts5BufferAppendBlob(tls, pRc, pBuf, (uint32(nStr + 1)), zStr)
(*Fts5Buffer)(unsafe.Pointer(pBuf)).Fn--
@@ -165353,7 +173780,7 @@ func sqlite3Fts5BufferAppendString(tls *libc.TLS, pRc uintptr, pBuf uintptr, zSt
// Like sqlite3Fts5BufferAppendString(), this function ensures that the byte
// following the buffer data is set to 0x00, even though this byte is not
// included in the pBuf->n count.
-func sqlite3Fts5BufferAppendPrintf(tls *libc.TLS, pRc uintptr, pBuf uintptr, zFmt uintptr, va uintptr) { /* sqlite3.c:214927:13: */
+func sqlite3Fts5BufferAppendPrintf(tls *libc.TLS, pRc uintptr, pBuf uintptr, zFmt uintptr, va uintptr) { /* sqlite3.c:216161:13: */
if *(*int32)(unsafe.Pointer(pRc)) == SQLITE_OK {
var zTmp uintptr
var ap Va_list
@@ -165371,7 +173798,7 @@ func sqlite3Fts5BufferAppendPrintf(tls *libc.TLS, pRc uintptr, pBuf uintptr, zFm
}
}
-func sqlite3Fts5Mprintf(tls *libc.TLS, pRc uintptr, zFmt uintptr, va uintptr) uintptr { /* sqlite3.c:214948:13: */
+func sqlite3Fts5Mprintf(tls *libc.TLS, pRc uintptr, zFmt uintptr, va uintptr) uintptr { /* sqlite3.c:216182:13: */
var zRet uintptr = uintptr(0)
if *(*int32)(unsafe.Pointer(pRc)) == SQLITE_OK {
var ap Va_list
@@ -165387,26 +173814,26 @@ func sqlite3Fts5Mprintf(tls *libc.TLS, pRc uintptr, zFmt uintptr, va uintptr) ui
}
// Free any buffer allocated by pBuf. Zero the structure before returning.
-func sqlite3Fts5BufferFree(tls *libc.TLS, pBuf uintptr) { /* sqlite3.c:214966:13: */
+func sqlite3Fts5BufferFree(tls *libc.TLS, pBuf uintptr) { /* sqlite3.c:216200:13: */
Xsqlite3_free(tls, (*Fts5Buffer)(unsafe.Pointer(pBuf)).Fp)
libc.Xmemset(tls, pBuf, 0, uint64(unsafe.Sizeof(Fts5Buffer{})))
}
// Zero the contents of the buffer object. But do not free the associated
// memory allocation.
-func sqlite3Fts5BufferZero(tls *libc.TLS, pBuf uintptr) { /* sqlite3.c:214975:13: */
+func sqlite3Fts5BufferZero(tls *libc.TLS, pBuf uintptr) { /* sqlite3.c:216209:13: */
(*Fts5Buffer)(unsafe.Pointer(pBuf)).Fn = 0
}
// Set the buffer to contain nData/pData. If an OOM error occurs, leave an
// the error code in p. If an error has already occurred when this function
// is called, it is a no-op.
-func sqlite3Fts5BufferSet(tls *libc.TLS, pRc uintptr, pBuf uintptr, nData int32, pData uintptr) { /* sqlite3.c:214984:13: */
+func sqlite3Fts5BufferSet(tls *libc.TLS, pRc uintptr, pBuf uintptr, nData int32, pData uintptr) { /* sqlite3.c:216218:13: */
(*Fts5Buffer)(unsafe.Pointer(pBuf)).Fn = 0
sqlite3Fts5BufferAppendBlob(tls, pRc, pBuf, uint32(nData), pData)
}
-func sqlite3Fts5PoslistNext64(tls *libc.TLS, a uintptr, n int32, pi uintptr, piOff uintptr) int32 { /* sqlite3.c:214994:12: */
+func sqlite3Fts5PoslistNext64(tls *libc.TLS, a uintptr, n int32, pi uintptr, piOff uintptr) int32 { /* sqlite3.c:216228:12: */
bp := tls.Alloc(4)
defer tls.Free(4)
@@ -165454,9 +173881,12 @@ func sqlite3Fts5PoslistNext64(tls *libc.TLS, a uintptr, n int32, pi uintptr, piO
*(*I64)(unsafe.Pointer(piOff)) = int64(-1)
return 1
}
+ *(*I64)(unsafe.Pointer(piOff)) = (iOff + (I64((*(*int32)(unsafe.Pointer(bp /* iVal */)) - 2) & 0x7FFFFFFF)))
+ } else {
+ *(*I64)(unsafe.Pointer(piOff)) = ((iOff & (I64(int64(0x7FFFFFFF)) << 32)) + ((iOff + (I64(*(*int32)(unsafe.Pointer(bp /* iVal */)) - 2))) & int64(0x7FFFFFFF)))
}
- *(*I64)(unsafe.Pointer(piOff)) = (iOff + (I64((*(*int32)(unsafe.Pointer(bp /* iVal */)) - 2) & 0x7FFFFFFF)))
*(*int32)(unsafe.Pointer(pi)) = i
+
return 0
}
return int32(0)
@@ -165464,14 +173894,14 @@ func sqlite3Fts5PoslistNext64(tls *libc.TLS, a uintptr, n int32, pi uintptr, piO
// Advance the iterator object passed as the only argument. Return true
// if the iterator reaches EOF, or false otherwise.
-func sqlite3Fts5PoslistReaderNext(tls *libc.TLS, pIter uintptr) int32 { /* sqlite3.c:215033:12: */
+func sqlite3Fts5PoslistReaderNext(tls *libc.TLS, pIter uintptr) int32 { /* sqlite3.c:216271:12: */
if sqlite3Fts5PoslistNext64(tls, (*Fts5PoslistReader)(unsafe.Pointer(pIter)).Fa, (*Fts5PoslistReader)(unsafe.Pointer(pIter)).Fn, (pIter+12 /* &.i */), (pIter+24 /* &.iPos */)) != 0 {
(*Fts5PoslistReader)(unsafe.Pointer(pIter)).FbEof = U8(1)
}
return int32((*Fts5PoslistReader)(unsafe.Pointer(pIter)).FbEof)
}
-func sqlite3Fts5PoslistReaderInit(tls *libc.TLS, a uintptr, n int32, pIter uintptr) int32 { /* sqlite3.c:215040:12: */
+func sqlite3Fts5PoslistReaderInit(tls *libc.TLS, a uintptr, n int32, pIter uintptr) int32 { /* sqlite3.c:216278:12: */
libc.Xmemset(tls, pIter, 0, uint64(unsafe.Sizeof(Fts5PoslistReader{})))
(*Fts5PoslistReader)(unsafe.Pointer(pIter)).Fa = a
(*Fts5PoslistReader)(unsafe.Pointer(pIter)).Fn = n
@@ -165483,19 +173913,21 @@ func sqlite3Fts5PoslistReaderInit(tls *libc.TLS, a uintptr, n int32, pIter uintp
// pBuf, which must be already be large enough to hold the new data.
// The previous position written to this list is *piPrev. *piPrev is set
// to iPos before returning.
-func sqlite3Fts5PoslistSafeAppend(tls *libc.TLS, pBuf uintptr, piPrev uintptr, iPos I64) { /* sqlite3.c:215057:13: */
- if (iPos & colmask) != (*(*I64)(unsafe.Pointer(piPrev)) & colmask) {
- *(*U8)(unsafe.Pointer((*Fts5Buffer)(unsafe.Pointer(pBuf)).Fp + uintptr(libc.PostIncInt32(&(*Fts5Buffer)(unsafe.Pointer(pBuf)).Fn, 1)))) = U8(1)
- *(*int32)(unsafe.Pointer(pBuf + 8 /* &.n */)) += (sqlite3Fts5PutVarint(tls, ((*Fts5Buffer)(unsafe.Pointer(pBuf)).Fp + uintptr((*Fts5Buffer)(unsafe.Pointer(pBuf)).Fn)), (uint64(iPos >> 32))))
- *(*I64)(unsafe.Pointer(piPrev)) = (iPos & colmask)
+func sqlite3Fts5PoslistSafeAppend(tls *libc.TLS, pBuf uintptr, piPrev uintptr, iPos I64) { /* sqlite3.c:216295:13: */
+ if iPos >= *(*I64)(unsafe.Pointer(piPrev)) {
+ if (iPos & colmask) != (*(*I64)(unsafe.Pointer(piPrev)) & colmask) {
+ *(*U8)(unsafe.Pointer((*Fts5Buffer)(unsafe.Pointer(pBuf)).Fp + uintptr(libc.PostIncInt32(&(*Fts5Buffer)(unsafe.Pointer(pBuf)).Fn, 1)))) = U8(1)
+ *(*int32)(unsafe.Pointer(pBuf + 8 /* &.n */)) += (sqlite3Fts5PutVarint(tls, ((*Fts5Buffer)(unsafe.Pointer(pBuf)).Fp + uintptr((*Fts5Buffer)(unsafe.Pointer(pBuf)).Fn)), (uint64(iPos >> 32))))
+ *(*I64)(unsafe.Pointer(piPrev)) = (iPos & colmask)
+ }
+ *(*int32)(unsafe.Pointer(pBuf + 8 /* &.n */)) += (sqlite3Fts5PutVarint(tls, ((*Fts5Buffer)(unsafe.Pointer(pBuf)).Fp + uintptr((*Fts5Buffer)(unsafe.Pointer(pBuf)).Fn)), (uint64((iPos - *(*I64)(unsafe.Pointer(piPrev))) + int64(2)))))
+ *(*I64)(unsafe.Pointer(piPrev)) = iPos
}
- *(*int32)(unsafe.Pointer(pBuf + 8 /* &.n */)) += (sqlite3Fts5PutVarint(tls, ((*Fts5Buffer)(unsafe.Pointer(pBuf)).Fp + uintptr((*Fts5Buffer)(unsafe.Pointer(pBuf)).Fn)), (uint64((iPos - *(*I64)(unsafe.Pointer(piPrev))) + int64(2)))))
- *(*I64)(unsafe.Pointer(piPrev)) = iPos
}
-var colmask I64 = (I64((int64(0x7FFFFFFF))) << 32) /* sqlite3.c:215062:20 */
+var colmask I64 = (I64((int64(0x7FFFFFFF))) << 32) /* sqlite3.c:216301:22 */
-func sqlite3Fts5PoslistWriterAppend(tls *libc.TLS, pBuf uintptr, pWriter uintptr, iPos I64) int32 { /* sqlite3.c:215072:12: */
+func sqlite3Fts5PoslistWriterAppend(tls *libc.TLS, pBuf uintptr, pWriter uintptr, iPos I64) int32 { /* sqlite3.c:216312:12: */
bp := tls.Alloc(4)
defer tls.Free(4)
@@ -165512,7 +173944,7 @@ func sqlite3Fts5PoslistWriterAppend(tls *libc.TLS, pBuf uintptr, pWriter uintptr
return SQLITE_OK
}
-func sqlite3Fts5MallocZero(tls *libc.TLS, pRc uintptr, nByte Sqlite3_int64) uintptr { /* sqlite3.c:215083:13: */
+func sqlite3Fts5MallocZero(tls *libc.TLS, pRc uintptr, nByte Sqlite3_int64) uintptr { /* sqlite3.c:216323:13: */
var pRet uintptr = uintptr(0)
if *(*int32)(unsafe.Pointer(pRc)) == SQLITE_OK {
pRet = Xsqlite3_malloc64(tls, uint64(nByte))
@@ -165533,7 +173965,7 @@ func sqlite3Fts5MallocZero(tls *libc.TLS, pRc uintptr, nByte Sqlite3_int64) uint
//
// It is the responsibility of the caller to eventually free the returned
// buffer using sqlite3_free(). If an OOM error occurs, NULL is returned.
-func sqlite3Fts5Strndup(tls *libc.TLS, pRc uintptr, pIn uintptr, nIn int32) uintptr { /* sqlite3.c:215104:13: */
+func sqlite3Fts5Strndup(tls *libc.TLS, pRc uintptr, pIn uintptr, nIn int32) uintptr { /* sqlite3.c:216344:13: */
var zRet uintptr = uintptr(0)
if *(*int32)(unsafe.Pointer(pRc)) == SQLITE_OK {
if nIn < 0 {
@@ -165542,7 +173974,7 @@ func sqlite3Fts5Strndup(tls *libc.TLS, pRc uintptr, pIn uintptr, nIn int32) uint
zRet = Xsqlite3_malloc(tls, (nIn + 1))
if zRet != 0 {
libc.Xmemcpy(tls, zRet, pIn, uint64(nIn))
- *(*int8)(unsafe.Pointer(zRet + uintptr(nIn))) = int8(0)
+ *(*uint8)(unsafe.Pointer(zRet + uintptr(nIn))) = uint8(0)
} else {
*(*int32)(unsafe.Pointer(pRc)) = SQLITE_NOMEM
}
@@ -165558,7 +173990,7 @@ func sqlite3Fts5Strndup(tls *libc.TLS, pRc uintptr, pIn uintptr, nIn int32) uint
// * The 10 integer ASCII characters.
// * The underscore character "_" (0x5F).
// * The unicode "subsitute" character (0x1A).
-func sqlite3Fts5IsBareword(tls *libc.TLS, t int8) int32 { /* sqlite3.c:215132:12: */
+func sqlite3Fts5IsBareword(tls *libc.TLS, t uint8) int32 { /* sqlite3.c:216372:12: */
bp := tls.Alloc(128)
defer tls.Free(128)
@@ -165583,13 +174015,13 @@ type Fts5TermsetEntry1 = struct {
FnTerm int32
FiIdx int32
FpNext uintptr
-} /* sqlite3.c:212108:9 */
+} /* sqlite3.c:213342:9 */
// ************************************************************************
//
-type Fts5TermsetEntry = Fts5TermsetEntry1 /* sqlite3.c:215150:33 */
+type Fts5TermsetEntry = Fts5TermsetEntry1 /* sqlite3.c:216390:33 */
-func sqlite3Fts5TermsetNew(tls *libc.TLS, pp uintptr) int32 { /* sqlite3.c:215162:12: */
+func sqlite3Fts5TermsetNew(tls *libc.TLS, pp uintptr) int32 { /* sqlite3.c:216402:12: */
bp := tls.Alloc(4)
defer tls.Free(4)
@@ -165598,7 +174030,7 @@ func sqlite3Fts5TermsetNew(tls *libc.TLS, pp uintptr) int32 { /* sqlite3.c:21516
return *(*int32)(unsafe.Pointer(bp /* rc */))
}
-func sqlite3Fts5TermsetAdd(tls *libc.TLS, p uintptr, iIdx int32, pTerm uintptr, nTerm int32, pbPresent uintptr) int32 { /* sqlite3.c:215168:12: */
+func sqlite3Fts5TermsetAdd(tls *libc.TLS, p uintptr, iIdx int32, pTerm uintptr, nTerm int32, pbPresent uintptr) int32 { /* sqlite3.c:216408:12: */
bp := tls.Alloc(4)
defer tls.Free(4)
@@ -165614,7 +174046,7 @@ func sqlite3Fts5TermsetAdd(tls *libc.TLS, p uintptr, iIdx int32, pTerm uintptr,
// operation of the module, but is necessary to ensure that some tests
// designed to produce hash table collisions really do work.
for i = (nTerm - 1); i >= 0; i-- {
- hash = (((hash << 3) ^ hash) ^ U32(*(*int8)(unsafe.Pointer(pTerm + uintptr(i)))))
+ hash = (((hash << 3) ^ hash) ^ U32(*(*uint8)(unsafe.Pointer(pTerm + uintptr(i)))))
}
hash = (((hash << 3) ^ hash) ^ U32(iIdx))
hash = (hash % (U32((int32(uint64(unsafe.Sizeof([512]uintptr{})) / uint64(unsafe.Sizeof(uintptr(0))))))))
@@ -165644,7 +174076,7 @@ func sqlite3Fts5TermsetAdd(tls *libc.TLS, p uintptr, iIdx int32, pTerm uintptr,
return *(*int32)(unsafe.Pointer(bp /* rc */))
}
-func sqlite3Fts5TermsetFree(tls *libc.TLS, p uintptr) { /* sqlite3.c:215217:13: */
+func sqlite3Fts5TermsetFree(tls *libc.TLS, p uintptr) { /* sqlite3.c:216457:13: */
if p != 0 {
var i U32
for i = U32(0); i < (U32((int32(uint64(unsafe.Sizeof([512]uintptr{})) / uint64(unsafe.Sizeof(uintptr(0))))))); i++ {
@@ -165676,21 +174108,21 @@ func sqlite3Fts5TermsetFree(tls *libc.TLS, p uintptr) { /* sqlite3.c:215217:13:
// Maximum allowed page size
-func fts5_iswhitespace(tls *libc.TLS, x int8) int32 { /* sqlite3.c:215259:12: */
+func fts5_iswhitespace(tls *libc.TLS, x uint8) int32 { /* sqlite3.c:216499:12: */
return (libc.Bool32(int32(x) == ' '))
}
-func fts5_isopenquote(tls *libc.TLS, x int8) int32 { /* sqlite3.c:215263:12: */
+func fts5_isopenquote(tls *libc.TLS, x uint8) int32 { /* sqlite3.c:216503:12: */
return (libc.Bool32((((int32(x) == '"') || (int32(x) == '\'')) || (int32(x) == '[')) || (int32(x) == '`')))
}
// Argument pIn points to a character that is part of a nul-terminated
// string. Return a pointer to the first character following *pIn in
// the string that is not a white-space character.
-func fts5ConfigSkipWhitespace(tls *libc.TLS, pIn uintptr) uintptr { /* sqlite3.c:215272:19: */
+func fts5ConfigSkipWhitespace(tls *libc.TLS, pIn uintptr) uintptr { /* sqlite3.c:216512:19: */
var p uintptr = pIn
if p != 0 {
- for fts5_iswhitespace(tls, *(*int8)(unsafe.Pointer(p))) != 0 {
+ for fts5_iswhitespace(tls, *(*uint8)(unsafe.Pointer(p))) != 0 {
p++
}
}
@@ -165700,9 +174132,9 @@ func fts5ConfigSkipWhitespace(tls *libc.TLS, pIn uintptr) uintptr { /* sqlite3.c
// Argument pIn points to a character that is part of a nul-terminated
// string. Return a pointer to the first character following *pIn in
// the string that is not a "bareword" character.
-func fts5ConfigSkipBareword(tls *libc.TLS, pIn uintptr) uintptr { /* sqlite3.c:215285:19: */
+func fts5ConfigSkipBareword(tls *libc.TLS, pIn uintptr) uintptr { /* sqlite3.c:216525:19: */
var p uintptr = pIn
- for sqlite3Fts5IsBareword(tls, *(*int8)(unsafe.Pointer(p))) != 0 {
+ for sqlite3Fts5IsBareword(tls, *(*uint8)(unsafe.Pointer(p))) != 0 {
p++
}
if p == pIn {
@@ -165711,17 +174143,17 @@ func fts5ConfigSkipBareword(tls *libc.TLS, pIn uintptr) uintptr { /* sqlite3.c:2
return p
}
-func fts5_isdigit(tls *libc.TLS, a int8) int32 { /* sqlite3.c:215292:12: */
+func fts5_isdigit(tls *libc.TLS, a uint8) int32 { /* sqlite3.c:216532:12: */
return (libc.Bool32((int32(a) >= '0') && (int32(a) <= '9')))
}
-func fts5ConfigSkipLiteral(tls *libc.TLS, pIn uintptr) uintptr { /* sqlite3.c:215298:19: */
+func fts5ConfigSkipLiteral(tls *libc.TLS, pIn uintptr) uintptr { /* sqlite3.c:216538:19: */
var p uintptr = pIn
- switch int32(*(*int8)(unsafe.Pointer(p))) {
+ switch int32(*(*uint8)(unsafe.Pointer(p))) {
case 'n':
fallthrough
case 'N':
- if Xsqlite3_strnicmp(tls, ts+5127 /* "null" */, p, 4) == 0 {
+ if Xsqlite3_strnicmp(tls, ts+5258 /* "null" */, p, 4) == 0 {
p = (p + 4)
} else {
p = uintptr(0)
@@ -165732,14 +174164,14 @@ func fts5ConfigSkipLiteral(tls *libc.TLS, pIn uintptr) uintptr { /* sqlite3.c:21
fallthrough
case 'X':
p++
- if int32(*(*int8)(unsafe.Pointer(p))) == '\'' {
+ if int32(*(*uint8)(unsafe.Pointer(p))) == '\'' {
p++
- for (((int32(*(*int8)(unsafe.Pointer(p))) >= 'a') && (int32(*(*int8)(unsafe.Pointer(p))) <= 'f')) ||
- ((int32(*(*int8)(unsafe.Pointer(p))) >= 'A') && (int32(*(*int8)(unsafe.Pointer(p))) <= 'F'))) ||
- ((int32(*(*int8)(unsafe.Pointer(p))) >= '0') && (int32(*(*int8)(unsafe.Pointer(p))) <= '9')) {
+ for (((int32(*(*uint8)(unsafe.Pointer(p))) >= 'a') && (int32(*(*uint8)(unsafe.Pointer(p))) <= 'f')) ||
+ ((int32(*(*uint8)(unsafe.Pointer(p))) >= 'A') && (int32(*(*uint8)(unsafe.Pointer(p))) <= 'F'))) ||
+ ((int32(*(*uint8)(unsafe.Pointer(p))) >= '0') && (int32(*(*uint8)(unsafe.Pointer(p))) <= '9')) {
p++
}
- if (int32(*(*int8)(unsafe.Pointer(p))) == '\'') && (int64(0) == (((int64(p) - int64(pIn)) / 1) % int64(2))) {
+ if (int32(*(*uint8)(unsafe.Pointer(p))) == '\'') && (int64(0) == (((int64(p) - int64(pIn)) / 1) % int64(2))) {
p++
} else {
p = uintptr(0)
@@ -165752,14 +174184,14 @@ func fts5ConfigSkipLiteral(tls *libc.TLS, pIn uintptr) uintptr { /* sqlite3.c:21
case '\'':
p++
for p != 0 {
- if int32(*(*int8)(unsafe.Pointer(p))) == '\'' {
+ if int32(*(*uint8)(unsafe.Pointer(p))) == '\'' {
p++
- if int32(*(*int8)(unsafe.Pointer(p))) != '\'' {
+ if int32(*(*uint8)(unsafe.Pointer(p))) != '\'' {
break
}
}
p++
- if int32(*(*int8)(unsafe.Pointer(p))) == 0 {
+ if int32(*(*uint8)(unsafe.Pointer(p))) == 0 {
p = uintptr(0)
}
}
@@ -165767,19 +174199,19 @@ func fts5ConfigSkipLiteral(tls *libc.TLS, pIn uintptr) uintptr { /* sqlite3.c:21
default:
// maybe a number
- if (int32(*(*int8)(unsafe.Pointer(p))) == '+') || (int32(*(*int8)(unsafe.Pointer(p))) == '-') {
+ if (int32(*(*uint8)(unsafe.Pointer(p))) == '+') || (int32(*(*uint8)(unsafe.Pointer(p))) == '-') {
p++
}
- for fts5_isdigit(tls, *(*int8)(unsafe.Pointer(p))) != 0 {
+ for fts5_isdigit(tls, *(*uint8)(unsafe.Pointer(p))) != 0 {
p++
}
// At this point, if the literal was an integer, the parse is
// finished. Or, if it is a floating point value, it may continue
// with either a decimal point or an 'E' character.
- if (int32(*(*int8)(unsafe.Pointer(p))) == '.') && (fts5_isdigit(tls, *(*int8)(unsafe.Pointer(p + 1))) != 0) {
+ if (int32(*(*uint8)(unsafe.Pointer(p))) == '.') && (fts5_isdigit(tls, *(*uint8)(unsafe.Pointer(p + 1))) != 0) {
p += uintptr(2)
- for fts5_isdigit(tls, *(*int8)(unsafe.Pointer(p))) != 0 {
+ for fts5_isdigit(tls, *(*uint8)(unsafe.Pointer(p))) != 0 {
p++
}
}
@@ -165804,21 +174236,21 @@ func fts5ConfigSkipLiteral(tls *libc.TLS, pIn uintptr) uintptr { /* sqlite3.c:21
// the character immediately following it. Or, if the close-quote is not
// found, -1 is returned. If -1 is returned, the buffer is left in an
// undefined state.
-func fts5Dequote(tls *libc.TLS, z uintptr) int32 { /* sqlite3.c:215374:12: */
- var q int8
+func fts5Dequote(tls *libc.TLS, z uintptr) int32 { /* sqlite3.c:216614:12: */
+ var q uint8
var iIn int32 = 1
var iOut int32 = 0
- q = *(*int8)(unsafe.Pointer(z))
+ q = *(*uint8)(unsafe.Pointer(z))
// Set stack variable q to the close-quote character
if int32(q) == '[' {
- q = int8(']')
+ q = uint8(']')
}
- for *(*int8)(unsafe.Pointer(z + uintptr(iIn))) != 0 {
- if int32(*(*int8)(unsafe.Pointer(z + uintptr(iIn)))) == int32(q) {
- if int32(*(*int8)(unsafe.Pointer(z + uintptr((iIn + 1))))) != int32(q) {
+ for *(*uint8)(unsafe.Pointer(z + uintptr(iIn))) != 0 {
+ if int32(*(*uint8)(unsafe.Pointer(z + uintptr(iIn)))) == int32(q) {
+ if int32(*(*uint8)(unsafe.Pointer(z + uintptr((iIn + 1))))) != int32(q) {
// Character iIn was the close quote.
iIn++
break
@@ -165827,14 +174259,14 @@ func fts5Dequote(tls *libc.TLS, z uintptr) int32 { /* sqlite3.c:215374:12: */
// the input cursor past both and copy a single quote character
// to the output buffer.
iIn = iIn + (2)
- *(*int8)(unsafe.Pointer(z + uintptr(libc.PostIncInt32(&iOut, 1)))) = q
+ *(*uint8)(unsafe.Pointer(z + uintptr(libc.PostIncInt32(&iOut, 1)))) = q
}
} else {
- *(*int8)(unsafe.Pointer(z + uintptr(libc.PostIncInt32(&iOut, 1)))) = *(*int8)(unsafe.Pointer(z + uintptr(libc.PostIncInt32(&iIn, 1))))
+ *(*uint8)(unsafe.Pointer(z + uintptr(libc.PostIncInt32(&iOut, 1)))) = *(*uint8)(unsafe.Pointer(z + uintptr(libc.PostIncInt32(&iIn, 1))))
}
}
- *(*int8)(unsafe.Pointer(z + uintptr(iOut))) = int8(0)
+ *(*uint8)(unsafe.Pointer(z + uintptr(iOut))) = uint8(0)
return iIn
}
@@ -165849,24 +174281,24 @@ func fts5Dequote(tls *libc.TLS, z uintptr) int32 { /* sqlite3.c:215374:12: */
// 'xyz' becomes xyz
// [pqr] becomes pqr
// `mno` becomes mno
-func sqlite3Fts5Dequote(tls *libc.TLS, z uintptr) { /* sqlite3.c:215419:13: */
- var quote int8 // Quote character (if any )
+func sqlite3Fts5Dequote(tls *libc.TLS, z uintptr) { /* sqlite3.c:216659:13: */
+ var quote uint8 // Quote character (if any )
- quote = *(*int8)(unsafe.Pointer(z))
+ quote = *(*uint8)(unsafe.Pointer(z))
if (((int32(quote) == '[') || (int32(quote) == '\'')) || (int32(quote) == '"')) || (int32(quote) == '`') {
fts5Dequote(tls, z)
}
}
type Fts5Enum1 = struct {
- FzName uintptr
- FeVal int32
- _ [4]byte
-} /* sqlite3.c:215430:1 */
+ FzName uintptr
+ FeVal int32
+ F__ccgo_pad1 [4]byte
+} /* sqlite3.c:216670:1 */
-type Fts5Enum = Fts5Enum1 /* sqlite3.c:215434:25 */
+type Fts5Enum = Fts5Enum1 /* sqlite3.c:216674:25 */
-func fts5ConfigSetEnum(tls *libc.TLS, aEnum uintptr, zEnum uintptr, peVal uintptr) int32 { /* sqlite3.c:215436:12: */
+func fts5ConfigSetEnum(tls *libc.TLS, aEnum uintptr, zEnum uintptr, peVal uintptr) int32 { /* sqlite3.c:216676:12: */
var nEnum int32 = int32(libc.Xstrlen(tls, zEnum))
var i int32
var iVal int32 = -1
@@ -165894,13 +174326,13 @@ func fts5ConfigSetEnum(tls *libc.TLS, aEnum uintptr, zEnum uintptr, peVal uintpt
// an error occurs, an SQLite error code is returned and an error message
// may be left in *pzErr. It is the responsibility of the caller to
// eventually free any such error message using sqlite3_free().
-func fts5ConfigParseSpecial(tls *libc.TLS, pGlobal uintptr, pConfig uintptr, zCmd uintptr, zArg uintptr, pzErr uintptr) int32 { /* sqlite3.c:215465:12: */
+func fts5ConfigParseSpecial(tls *libc.TLS, pGlobal uintptr, pConfig uintptr, zCmd uintptr, zArg uintptr, pzErr uintptr) int32 { /* sqlite3.c:216705:12: */
bp := tls.Alloc(112)
defer tls.Free(112)
*(*int32)(unsafe.Pointer(bp + 40 /* rc */)) = SQLITE_OK
var nCmd int32 = int32(libc.Xstrlen(tls, zCmd))
- if Xsqlite3_strnicmp(tls, ts+30271 /* "prefix" */, zCmd, nCmd) == 0 {
+ if Xsqlite3_strnicmp(tls, ts+32069 /* "prefix" */, zCmd, nCmd) == 0 {
var nByte int32 = (int32(uint64(unsafe.Sizeof(int32(0))) * uint64(FTS5_MAX_PREFIX_INDEXES)))
var p uintptr
var bFirst int32 = 1
@@ -165915,37 +174347,37 @@ func fts5ConfigParseSpecial(tls *libc.TLS, pGlobal uintptr, pConfig uintptr, zCm
for 1 != 0 {
var nPre int32 = 0
- for int32(*(*int8)(unsafe.Pointer(p))) == ' ' {
+ for int32(*(*uint8)(unsafe.Pointer(p))) == ' ' {
p++
}
- if (bFirst == 0) && (int32(*(*int8)(unsafe.Pointer(p))) == ',') {
+ if (bFirst == 0) && (int32(*(*uint8)(unsafe.Pointer(p))) == ',') {
p++
- for int32(*(*int8)(unsafe.Pointer(p))) == ' ' {
+ for int32(*(*uint8)(unsafe.Pointer(p))) == ' ' {
p++
}
- } else if int32(*(*int8)(unsafe.Pointer(p))) == 0 {
+ } else if int32(*(*uint8)(unsafe.Pointer(p))) == 0 {
break
}
- if (int32(*(*int8)(unsafe.Pointer(p))) < '0') || (int32(*(*int8)(unsafe.Pointer(p))) > '9') {
- *(*uintptr)(unsafe.Pointer(pzErr)) = Xsqlite3_mprintf(tls, ts+30278 /* "malformed prefix..." */, 0)
+ if (int32(*(*uint8)(unsafe.Pointer(p))) < '0') || (int32(*(*uint8)(unsafe.Pointer(p))) > '9') {
+ *(*uintptr)(unsafe.Pointer(pzErr)) = Xsqlite3_mprintf(tls, ts+32076 /* "malformed prefix..." */, 0)
*(*int32)(unsafe.Pointer(bp + 40 /* rc */)) = SQLITE_ERROR
break
}
if (*Fts5Config)(unsafe.Pointer(pConfig)).FnPrefix == FTS5_MAX_PREFIX_INDEXES {
*(*uintptr)(unsafe.Pointer(pzErr)) = Xsqlite3_mprintf(tls,
- ts+30309 /* "too many prefix ..." */, libc.VaList(bp, FTS5_MAX_PREFIX_INDEXES))
+ ts+32107 /* "too many prefix ..." */, libc.VaList(bp, FTS5_MAX_PREFIX_INDEXES))
*(*int32)(unsafe.Pointer(bp + 40 /* rc */)) = SQLITE_ERROR
break
}
- for ((int32(*(*int8)(unsafe.Pointer(p))) >= '0') && (int32(*(*int8)(unsafe.Pointer(p))) <= '9')) && (nPre < 1000) {
- nPre = ((nPre * 10) + (int32(*(*int8)(unsafe.Pointer(p))) - '0'))
+ for ((int32(*(*uint8)(unsafe.Pointer(p))) >= '0') && (int32(*(*uint8)(unsafe.Pointer(p))) <= '9')) && (nPre < 1000) {
+ nPre = ((nPre * 10) + (int32(*(*uint8)(unsafe.Pointer(p))) - '0'))
p++
}
if (nPre <= 0) || (nPre >= 1000) {
- *(*uintptr)(unsafe.Pointer(pzErr)) = Xsqlite3_mprintf(tls, ts+30342 /* "prefix length ou..." */, 0)
+ *(*uintptr)(unsafe.Pointer(pzErr)) = Xsqlite3_mprintf(tls, ts+32140 /* "prefix length ou..." */, 0)
*(*int32)(unsafe.Pointer(bp + 40 /* rc */)) = SQLITE_ERROR
break
}
@@ -165958,7 +174390,7 @@ func fts5ConfigParseSpecial(tls *libc.TLS, pGlobal uintptr, pConfig uintptr, zCm
return *(*int32)(unsafe.Pointer(bp + 40 /* rc */))
}
- if Xsqlite3_strnicmp(tls, ts+30379 /* "tokenize" */, zCmd, nCmd) == 0 {
+ if Xsqlite3_strnicmp(tls, ts+32177 /* "tokenize" */, zCmd, nCmd) == 0 {
var p uintptr = zArg
var nArg Sqlite3_int64 = (Sqlite3_int64(libc.Xstrlen(tls, zArg) + uint64(1)))
var azArg uintptr = sqlite3Fts5MallocZero(tls, bp+40 /* &rc */, (int64(uint64(unsafe.Sizeof(uintptr(0))) * uint64(nArg))))
@@ -165967,12 +174399,12 @@ func fts5ConfigParseSpecial(tls *libc.TLS, pGlobal uintptr, pConfig uintptr, zCm
if (azArg != 0) && (pSpace != 0) {
if (*Fts5Config)(unsafe.Pointer(pConfig)).FpTok != 0 {
- *(*uintptr)(unsafe.Pointer(pzErr)) = Xsqlite3_mprintf(tls, ts+30388 /* "multiple tokeniz..." */, 0)
+ *(*uintptr)(unsafe.Pointer(pzErr)) = Xsqlite3_mprintf(tls, ts+32186 /* "multiple tokeniz..." */, 0)
*(*int32)(unsafe.Pointer(bp + 40 /* rc */)) = SQLITE_ERROR
} else {
- for nArg = int64(0); (p != 0) && (*(*int8)(unsafe.Pointer(p)) != 0); nArg++ {
+ for nArg = int64(0); (p != 0) && (*(*uint8)(unsafe.Pointer(p)) != 0); nArg++ {
var p2 uintptr = fts5ConfigSkipWhitespace(tls, p)
- if int32(*(*int8)(unsafe.Pointer(p2))) == '\'' {
+ if int32(*(*uint8)(unsafe.Pointer(p2))) == '\'' {
p = fts5ConfigSkipLiteral(tls, p2)
} else {
p = fts5ConfigSkipBareword(tls, p2)
@@ -165986,7 +174418,7 @@ func fts5ConfigParseSpecial(tls *libc.TLS, pGlobal uintptr, pConfig uintptr, zCm
}
}
if p == uintptr(0) {
- *(*uintptr)(unsafe.Pointer(pzErr)) = Xsqlite3_mprintf(tls, ts+30421 /* "parse error in t..." */, 0)
+ *(*uintptr)(unsafe.Pointer(pzErr)) = Xsqlite3_mprintf(tls, ts+32219 /* "parse error in t..." */, 0)
*(*int32)(unsafe.Pointer(bp + 40 /* rc */)) = SQLITE_ERROR
} else {
*(*int32)(unsafe.Pointer(bp + 40 /* rc */)) = sqlite3Fts5GetTokenizer(tls, pGlobal,
@@ -166001,14 +174433,14 @@ func fts5ConfigParseSpecial(tls *libc.TLS, pGlobal uintptr, pConfig uintptr, zCm
return *(*int32)(unsafe.Pointer(bp + 40 /* rc */))
}
- if Xsqlite3_strnicmp(tls, ts+30455 /* "content" */, zCmd, nCmd) == 0 {
+ if Xsqlite3_strnicmp(tls, ts+32253 /* "content" */, zCmd, nCmd) == 0 {
if (*Fts5Config)(unsafe.Pointer(pConfig)).FeContent != FTS5_CONTENT_NORMAL {
- *(*uintptr)(unsafe.Pointer(pzErr)) = Xsqlite3_mprintf(tls, ts+30463 /* "multiple content..." */, 0)
+ *(*uintptr)(unsafe.Pointer(pzErr)) = Xsqlite3_mprintf(tls, ts+32261 /* "multiple content..." */, 0)
*(*int32)(unsafe.Pointer(bp + 40 /* rc */)) = SQLITE_ERROR
} else {
- if *(*int8)(unsafe.Pointer(zArg)) != 0 {
+ if *(*uint8)(unsafe.Pointer(zArg)) != 0 {
(*Fts5Config)(unsafe.Pointer(pConfig)).FeContent = FTS5_CONTENT_EXTERNAL
- (*Fts5Config)(unsafe.Pointer(pConfig)).FzContent = sqlite3Fts5Mprintf(tls, bp+40 /* &rc */, ts+30495 /* "%Q.%Q" */, libc.VaList(bp+8, (*Fts5Config)(unsafe.Pointer(pConfig)).FzDb, zArg))
+ (*Fts5Config)(unsafe.Pointer(pConfig)).FzContent = sqlite3Fts5Mprintf(tls, bp+40 /* &rc */, ts+32293 /* "%Q.%Q" */, libc.VaList(bp+8, (*Fts5Config)(unsafe.Pointer(pConfig)).FzDb, zArg))
} else {
(*Fts5Config)(unsafe.Pointer(pConfig)).FeContent = FTS5_CONTENT_NONE
}
@@ -166016,9 +174448,9 @@ func fts5ConfigParseSpecial(tls *libc.TLS, pGlobal uintptr, pConfig uintptr, zCm
return *(*int32)(unsafe.Pointer(bp + 40 /* rc */))
}
- if Xsqlite3_strnicmp(tls, ts+30501 /* "content_rowid" */, zCmd, nCmd) == 0 {
+ if Xsqlite3_strnicmp(tls, ts+32299 /* "content_rowid" */, zCmd, nCmd) == 0 {
if (*Fts5Config)(unsafe.Pointer(pConfig)).FzContentRowid != 0 {
- *(*uintptr)(unsafe.Pointer(pzErr)) = Xsqlite3_mprintf(tls, ts+30515 /* "multiple content..." */, 0)
+ *(*uintptr)(unsafe.Pointer(pzErr)) = Xsqlite3_mprintf(tls, ts+32313 /* "multiple content..." */, 0)
*(*int32)(unsafe.Pointer(bp + 40 /* rc */)) = SQLITE_ERROR
} else {
(*Fts5Config)(unsafe.Pointer(pConfig)).FzContentRowid = sqlite3Fts5Strndup(tls, bp+40 /* &rc */, zArg, -1)
@@ -166026,38 +174458,38 @@ func fts5ConfigParseSpecial(tls *libc.TLS, pGlobal uintptr, pConfig uintptr, zCm
return *(*int32)(unsafe.Pointer(bp + 40 /* rc */))
}
- if Xsqlite3_strnicmp(tls, ts+30553 /* "columnsize" */, zCmd, nCmd) == 0 {
- if ((int32(*(*int8)(unsafe.Pointer(zArg))) != '0') && (int32(*(*int8)(unsafe.Pointer(zArg))) != '1')) || (int32(*(*int8)(unsafe.Pointer(zArg + 1))) != 0) {
- *(*uintptr)(unsafe.Pointer(pzErr)) = Xsqlite3_mprintf(tls, ts+30564 /* "malformed column..." */, 0)
+ if Xsqlite3_strnicmp(tls, ts+32351 /* "columnsize" */, zCmd, nCmd) == 0 {
+ if ((int32(*(*uint8)(unsafe.Pointer(zArg))) != '0') && (int32(*(*uint8)(unsafe.Pointer(zArg))) != '1')) || (int32(*(*uint8)(unsafe.Pointer(zArg + 1))) != 0) {
+ *(*uintptr)(unsafe.Pointer(pzErr)) = Xsqlite3_mprintf(tls, ts+32362 /* "malformed column..." */, 0)
*(*int32)(unsafe.Pointer(bp + 40 /* rc */)) = SQLITE_ERROR
} else {
- (*Fts5Config)(unsafe.Pointer(pConfig)).FbColumnsize = (libc.Bool32(int32(*(*int8)(unsafe.Pointer(zArg))) == '1'))
+ (*Fts5Config)(unsafe.Pointer(pConfig)).FbColumnsize = (libc.Bool32(int32(*(*uint8)(unsafe.Pointer(zArg))) == '1'))
}
return *(*int32)(unsafe.Pointer(bp + 40 /* rc */))
}
- if Xsqlite3_strnicmp(tls, ts+4058 /* "detail" */, zCmd, nCmd) == 0 {
+ if Xsqlite3_strnicmp(tls, ts+4189 /* "detail" */, zCmd, nCmd) == 0 {
*(*[4]Fts5Enum)(unsafe.Pointer(bp + 48 /* aDetail */)) = [4]Fts5Enum{
- {FzName: ts + 15373 /* "none" */, FeVal: FTS5_DETAIL_NONE},
- {FzName: ts + 15378 /* "full" */},
- {FzName: ts + 30599 /* "columns" */, FeVal: FTS5_DETAIL_COLUMNS},
+ {FzName: ts + 15828 /* "none" */, FeVal: FTS5_DETAIL_NONE},
+ {FzName: ts + 15833 /* "full" */},
+ {FzName: ts + 32397 /* "columns" */, FeVal: FTS5_DETAIL_COLUMNS},
{},
}
if libc.AssignPtrInt32(bp+40 /* rc */, fts5ConfigSetEnum(tls, bp+48 /* &aDetail[0] */, zArg, (pConfig+92 /* &.eDetail */))) != 0 {
- *(*uintptr)(unsafe.Pointer(pzErr)) = Xsqlite3_mprintf(tls, ts+30607 /* "malformed detail..." */, 0)
+ *(*uintptr)(unsafe.Pointer(pzErr)) = Xsqlite3_mprintf(tls, ts+32405 /* "malformed detail..." */, 0)
}
return *(*int32)(unsafe.Pointer(bp + 40 /* rc */))
}
- *(*uintptr)(unsafe.Pointer(pzErr)) = Xsqlite3_mprintf(tls, ts+30638 /* "unrecognized opt..." */, libc.VaList(bp+24, nCmd, zCmd))
+ *(*uintptr)(unsafe.Pointer(pzErr)) = Xsqlite3_mprintf(tls, ts+32436 /* "unrecognized opt..." */, libc.VaList(bp+24, nCmd, zCmd))
return SQLITE_ERROR
}
// Allocate an instance of the default tokenizer ("simple") at
// Fts5Config.pTokenizer. Return SQLITE_OK if successful, or an SQLite error
// code if an error occurs.
-func fts5ConfigDefaultTokenizer(tls *libc.TLS, pGlobal uintptr, pConfig uintptr) int32 { /* sqlite3.c:215629:12: */
+func fts5ConfigDefaultTokenizer(tls *libc.TLS, pGlobal uintptr, pConfig uintptr) int32 { /* sqlite3.c:216869:12: */
return sqlite3Fts5GetTokenizer(tls, pGlobal, uintptr(0), 0, pConfig, uintptr(0))
}
@@ -166075,7 +174507,7 @@ func fts5ConfigDefaultTokenizer(tls *libc.TLS, pGlobal uintptr, pConfig uintptr)
// a no-op (NULL is returned). Otherwise, if an OOM occurs within this
// function, *pRc is set to SQLITE_NOMEM before returning. *pRc is *not*
// set if a parse error (failed to find close quote) occurs.
-func fts5ConfigGobbleWord(tls *libc.TLS, pRc uintptr, zIn uintptr, pzOut uintptr, pbQuoted uintptr) uintptr { /* sqlite3.c:215649:19: */
+func fts5ConfigGobbleWord(tls *libc.TLS, pRc uintptr, zIn uintptr, pzOut uintptr, pbQuoted uintptr) uintptr { /* sqlite3.c:216889:19: */
var zRet uintptr = uintptr(0)
var nIn Sqlite3_int64 = Sqlite3_int64(libc.Xstrlen(tls, zIn))
@@ -166088,14 +174520,14 @@ func fts5ConfigGobbleWord(tls *libc.TLS, pRc uintptr, zIn uintptr, pzOut uintptr
*(*int32)(unsafe.Pointer(pRc)) = SQLITE_NOMEM
} else {
libc.Xmemcpy(tls, zOut, zIn, (Size_t(nIn + int64(1))))
- if fts5_isopenquote(tls, *(*int8)(unsafe.Pointer(zOut))) != 0 {
+ if fts5_isopenquote(tls, *(*uint8)(unsafe.Pointer(zOut))) != 0 {
var ii int32 = fts5Dequote(tls, zOut)
zRet = (zIn + uintptr(ii))
*(*int32)(unsafe.Pointer(pbQuoted)) = 1
} else {
zRet = fts5ConfigSkipBareword(tls, zIn)
if zRet != 0 {
- *(*int8)(unsafe.Pointer(zOut + uintptr(((int64(zRet) - int64(zIn)) / 1)))) = int8(0)
+ *(*uint8)(unsafe.Pointer(zOut + uintptr(((int64(zRet) - int64(zIn)) / 1)))) = uint8(0)
}
}
}
@@ -166109,20 +174541,20 @@ func fts5ConfigGobbleWord(tls *libc.TLS, pRc uintptr, zIn uintptr, pzOut uintptr
return zRet
}
-func fts5ConfigParseColumn(tls *libc.TLS, p uintptr, zCol uintptr, zArg uintptr, pzErr uintptr) int32 { /* sqlite3.c:215689:12: */
+func fts5ConfigParseColumn(tls *libc.TLS, p uintptr, zCol uintptr, zArg uintptr, pzErr uintptr) int32 { /* sqlite3.c:216929:12: */
bp := tls.Alloc(16)
defer tls.Free(16)
var rc int32 = SQLITE_OK
- if (0 == Xsqlite3_stricmp(tls, zCol, ts+20037 /* "rank" */)) ||
- (0 == Xsqlite3_stricmp(tls, zCol, ts+14302 /* "rowid" */)) {
- *(*uintptr)(unsafe.Pointer(pzErr)) = Xsqlite3_mprintf(tls, ts+30666 /* "reserved fts5 co..." */, libc.VaList(bp, zCol))
+ if (0 == Xsqlite3_stricmp(tls, zCol, ts+20497 /* "rank" */)) ||
+ (0 == Xsqlite3_stricmp(tls, zCol, ts+14757 /* "rowid" */)) {
+ *(*uintptr)(unsafe.Pointer(pzErr)) = Xsqlite3_mprintf(tls, ts+32464 /* "reserved fts5 co..." */, libc.VaList(bp, zCol))
rc = SQLITE_ERROR
} else if zArg != 0 {
- if 0 == Xsqlite3_stricmp(tls, zArg, ts+30696 /* "unindexed" */) {
+ if 0 == Xsqlite3_stricmp(tls, zArg, ts+32494 /* "unindexed" */) {
*(*U8)(unsafe.Pointer((*Fts5Config)(unsafe.Pointer(p)).FabUnindexed + uintptr((*Fts5Config)(unsafe.Pointer(p)).FnCol))) = U8(1)
} else {
- *(*uintptr)(unsafe.Pointer(pzErr)) = Xsqlite3_mprintf(tls, ts+30706 /* "unrecognized col..." */, libc.VaList(bp+8, zArg))
+ *(*uintptr)(unsafe.Pointer(pzErr)) = Xsqlite3_mprintf(tls, ts+32504 /* "unrecognized col..." */, libc.VaList(bp+8, zArg))
rc = SQLITE_ERROR
}
}
@@ -166132,7 +174564,7 @@ func fts5ConfigParseColumn(tls *libc.TLS, p uintptr, zCol uintptr, zArg uintptr,
}
// Populate the Fts5Config.zContentExprlist string.
-func fts5ConfigMakeExprlist(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:215717:12: */
+func fts5ConfigMakeExprlist(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:216957:12: */
bp := tls.Alloc(48)
defer tls.Free(48)
@@ -166140,13 +174572,13 @@ func fts5ConfigMakeExprlist(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:21571
*(*int32)(unsafe.Pointer(bp + 24 /* rc */)) = SQLITE_OK
*(*Fts5Buffer)(unsafe.Pointer(bp + 32 /* buf */)) = Fts5Buffer{}
- sqlite3Fts5BufferAppendPrintf(tls, bp+24 /* &rc */, bp+32 /* &buf */, ts+30737 /* "T.%Q" */, libc.VaList(bp, (*Fts5Config)(unsafe.Pointer(p)).FzContentRowid))
+ sqlite3Fts5BufferAppendPrintf(tls, bp+24 /* &rc */, bp+32 /* &buf */, ts+32535 /* "T.%Q" */, libc.VaList(bp, (*Fts5Config)(unsafe.Pointer(p)).FzContentRowid))
if (*Fts5Config)(unsafe.Pointer(p)).FeContent != FTS5_CONTENT_NONE {
for i = 0; i < (*Fts5Config)(unsafe.Pointer(p)).FnCol; i++ {
if (*Fts5Config)(unsafe.Pointer(p)).FeContent == FTS5_CONTENT_EXTERNAL {
- sqlite3Fts5BufferAppendPrintf(tls, bp+24 /* &rc */, bp+32 /* &buf */, ts+30742 /* ", T.%Q" */, libc.VaList(bp+8, *(*uintptr)(unsafe.Pointer((*Fts5Config)(unsafe.Pointer(p)).FazCol + uintptr(i)*8))))
+ sqlite3Fts5BufferAppendPrintf(tls, bp+24 /* &rc */, bp+32 /* &buf */, ts+32540 /* ", T.%Q" */, libc.VaList(bp+8, *(*uintptr)(unsafe.Pointer((*Fts5Config)(unsafe.Pointer(p)).FazCol + uintptr(i)*8))))
} else {
- sqlite3Fts5BufferAppendPrintf(tls, bp+24 /* &rc */, bp+32 /* &buf */, ts+30749 /* ", T.c%d" */, libc.VaList(bp+16, i))
+ sqlite3Fts5BufferAppendPrintf(tls, bp+24 /* &rc */, bp+32 /* &buf */, ts+32547 /* ", T.c%d" */, libc.VaList(bp+16, i))
}
}
}
@@ -166165,7 +174597,7 @@ func fts5ConfigMakeExprlist(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:21571
// returned, *ppOut is set to NULL and an error message may be left in
// *pzErr. It is the responsibility of the caller to eventually free any
// such error message using sqlite3_free().
-func sqlite3Fts5ConfigParse(tls *libc.TLS, pGlobal uintptr, db uintptr, nArg int32, azArg uintptr, ppOut uintptr, pzErr uintptr) int32 { /* sqlite3.c:215750:12: */
+func sqlite3Fts5ConfigParse(tls *libc.TLS, pGlobal uintptr, db uintptr, nArg int32, azArg uintptr, ppOut uintptr, pzErr uintptr) int32 { /* sqlite3.c:216990:12: */
bp := tls.Alloc(76)
defer tls.Free(76)
@@ -166184,13 +174616,18 @@ func sqlite3Fts5ConfigParse(tls *libc.TLS, pGlobal uintptr, db uintptr, nArg int
nByte = (Sqlite3_int64(uint64(nArg) * (uint64(unsafe.Sizeof(uintptr(0))) + uint64(unsafe.Sizeof(U8(0))))))
(*Fts5Config)(unsafe.Pointer(pRet)).FazCol = sqlite3Fts5MallocZero(tls, bp+40 /* &rc */, nByte)
- (*Fts5Config)(unsafe.Pointer(pRet)).FabUnindexed = ((*Fts5Config)(unsafe.Pointer(pRet)).FazCol + uintptr(nArg)*8)
+ (*Fts5Config)(unsafe.Pointer(pRet)).FabUnindexed = func() uintptr {
+ if (*Fts5Config)(unsafe.Pointer(pRet)).FazCol != 0 {
+ return ((*Fts5Config)(unsafe.Pointer(pRet)).FazCol + uintptr(nArg)*8)
+ }
+ return uintptr(0)
+ }()
(*Fts5Config)(unsafe.Pointer(pRet)).FzDb = sqlite3Fts5Strndup(tls, bp+40 /* &rc */, *(*uintptr)(unsafe.Pointer(azArg + 1*8)), -1)
(*Fts5Config)(unsafe.Pointer(pRet)).FzName = sqlite3Fts5Strndup(tls, bp+40 /* &rc */, *(*uintptr)(unsafe.Pointer(azArg + 2*8)), -1)
(*Fts5Config)(unsafe.Pointer(pRet)).FbColumnsize = 1
(*Fts5Config)(unsafe.Pointer(pRet)).FeDetail = FTS5_DETAIL_FULL
- if (*(*int32)(unsafe.Pointer(bp + 40 /* rc */)) == SQLITE_OK) && (Xsqlite3_stricmp(tls, (*Fts5Config)(unsafe.Pointer(pRet)).FzName, ts+20037 /* "rank" */) == 0) {
- *(*uintptr)(unsafe.Pointer(pzErr)) = Xsqlite3_mprintf(tls, ts+30757 /* "reserved fts5 ta..." */, libc.VaList(bp, (*Fts5Config)(unsafe.Pointer(pRet)).FzName))
+ if (*(*int32)(unsafe.Pointer(bp + 40 /* rc */)) == SQLITE_OK) && (Xsqlite3_stricmp(tls, (*Fts5Config)(unsafe.Pointer(pRet)).FzName, ts+20497 /* "rank" */) == 0) {
+ *(*uintptr)(unsafe.Pointer(pzErr)) = Xsqlite3_mprintf(tls, ts+32555 /* "reserved fts5 ta..." */, libc.VaList(bp, (*Fts5Config)(unsafe.Pointer(pRet)).FzName))
*(*int32)(unsafe.Pointer(bp + 40 /* rc */)) = SQLITE_ERROR
}
@@ -166204,7 +174641,7 @@ func sqlite3Fts5ConfigParse(tls *libc.TLS, pGlobal uintptr, db uintptr, nArg int
z = fts5ConfigGobbleWord(tls, bp+40 /* &rc */, zOrig, bp+48 /* &zOne */, bp+56 /* &bMustBeCol */)
z = fts5ConfigSkipWhitespace(tls, z)
- if (z != 0) && (int32(*(*int8)(unsafe.Pointer(z))) == '=') {
+ if (z != 0) && (int32(*(*uint8)(unsafe.Pointer(z))) == '=') {
bOption = 1
z++
if *(*int32)(unsafe.Pointer(bp + 56 /* bMustBeCol */)) != 0 {
@@ -166212,18 +174649,18 @@ func sqlite3Fts5ConfigParse(tls *libc.TLS, pGlobal uintptr, db uintptr, nArg int
}
}
z = fts5ConfigSkipWhitespace(tls, z)
- if (z != 0) && (*(*int8)(unsafe.Pointer(z)) != 0) {
+ if (z != 0) && (*(*uint8)(unsafe.Pointer(z)) != 0) {
// var bDummy int32 at bp+72, 4
z = fts5ConfigGobbleWord(tls, bp+40 /* &rc */, z, bp+64 /* &zTwo */, bp+72 /* &bDummy */)
- if (z != 0) && (*(*int8)(unsafe.Pointer(z)) != 0) {
+ if (z != 0) && (*(*uint8)(unsafe.Pointer(z)) != 0) {
z = uintptr(0)
}
}
if *(*int32)(unsafe.Pointer(bp + 40 /* rc */)) == SQLITE_OK {
if z == uintptr(0) {
- *(*uintptr)(unsafe.Pointer(pzErr)) = Xsqlite3_mprintf(tls, ts+30786 /* "parse error in \"..." */, libc.VaList(bp+8, zOrig))
+ *(*uintptr)(unsafe.Pointer(pzErr)) = Xsqlite3_mprintf(tls, ts+32584 /* "parse error in \"..." */, libc.VaList(bp+8, zOrig))
*(*int32)(unsafe.Pointer(bp + 40 /* rc */)) = SQLITE_ERROR
} else {
if bOption != 0 {
@@ -166231,7 +174668,7 @@ func sqlite3Fts5ConfigParse(tls *libc.TLS, pGlobal uintptr, db uintptr, nArg int
if *(*uintptr)(unsafe.Pointer(bp + 64 /* zTwo */)) != 0 {
return *(*uintptr)(unsafe.Pointer(bp + 64 /* zTwo */))
}
- return ts + 703 /* "" */
+ return ts + 755 /* "" */
}(), pzErr)
} else {
*(*int32)(unsafe.Pointer(bp + 40 /* rc */)) = fts5ConfigParseColumn(tls, pRet, *(*uintptr)(unsafe.Pointer(bp + 48 /* zOne */)), *(*uintptr)(unsafe.Pointer(bp + 64 /* zTwo */)), pzErr)
@@ -166256,19 +174693,19 @@ func sqlite3Fts5ConfigParse(tls *libc.TLS, pGlobal uintptr, db uintptr, nArg int
var zTail uintptr = uintptr(0)
if (*Fts5Config)(unsafe.Pointer(pRet)).FeContent == FTS5_CONTENT_NORMAL {
- zTail = ts + 30455 /* "content" */
+ zTail = ts + 32253 /* "content" */
} else if (*Fts5Config)(unsafe.Pointer(pRet)).FbColumnsize != 0 {
- zTail = ts + 30806 /* "docsize" */
+ zTail = ts + 32604 /* "docsize" */
}
if zTail != 0 {
(*Fts5Config)(unsafe.Pointer(pRet)).FzContent = sqlite3Fts5Mprintf(tls,
- bp+40 /* &rc */, ts+30814 /* "%Q.'%q_%s'" */, libc.VaList(bp+16, (*Fts5Config)(unsafe.Pointer(pRet)).FzDb, (*Fts5Config)(unsafe.Pointer(pRet)).FzName, zTail))
+ bp+40 /* &rc */, ts+32612 /* "%Q.'%q_%s'" */, libc.VaList(bp+16, (*Fts5Config)(unsafe.Pointer(pRet)).FzDb, (*Fts5Config)(unsafe.Pointer(pRet)).FzName, zTail))
}
}
if (*(*int32)(unsafe.Pointer(bp + 40 /* rc */)) == SQLITE_OK) && ((*Fts5Config)(unsafe.Pointer(pRet)).FzContentRowid == uintptr(0)) {
- (*Fts5Config)(unsafe.Pointer(pRet)).FzContentRowid = sqlite3Fts5Strndup(tls, bp+40 /* &rc */, ts+14302 /* "rowid" */, -1)
+ (*Fts5Config)(unsafe.Pointer(pRet)).FzContentRowid = sqlite3Fts5Strndup(tls, bp+40 /* &rc */, ts+14757 /* "rowid" */, -1)
}
// Formulate the zContentExprlist text
@@ -166284,11 +174721,11 @@ func sqlite3Fts5ConfigParse(tls *libc.TLS, pGlobal uintptr, db uintptr, nArg int
}
// Free the configuration object passed as the only argument.
-func sqlite3Fts5ConfigFree(tls *libc.TLS, pConfig uintptr) { /* sqlite3.c:215869:13: */
+func sqlite3Fts5ConfigFree(tls *libc.TLS, pConfig uintptr) { /* sqlite3.c:217109:13: */
if pConfig != 0 {
var i int32
if (*Fts5Config)(unsafe.Pointer(pConfig)).FpTok != 0 {
- (*(*func(*libc.TLS, uintptr))(unsafe.Pointer(((*Fts5Config)(unsafe.Pointer(pConfig)).FpTokApi + 8 /* &.xDelete */))))(tls, (*Fts5Config)(unsafe.Pointer(pConfig)).FpTok)
+ (*struct{ f func(*libc.TLS, uintptr) })(unsafe.Pointer(&struct{ uintptr }{(*Fts5_tokenizer)(unsafe.Pointer((*Fts5Config)(unsafe.Pointer(pConfig)).FpTokApi)).FxDelete})).f(tls, (*Fts5Config)(unsafe.Pointer(pConfig)).FpTok)
}
Xsqlite3_free(tls, (*Fts5Config)(unsafe.Pointer(pConfig)).FzDb)
Xsqlite3_free(tls, (*Fts5Config)(unsafe.Pointer(pConfig)).FzName)
@@ -166309,7 +174746,7 @@ func sqlite3Fts5ConfigFree(tls *libc.TLS, pConfig uintptr) { /* sqlite3.c:215869
// Call sqlite3_declare_vtab() based on the contents of the configuration
// object passed as the only argument. Return SQLITE_OK if successful, or
// an SQLite error code if an error occurs.
-func sqlite3Fts5ConfigDeclareVtab(tls *libc.TLS, pConfig uintptr) int32 { /* sqlite3.c:215896:12: */
+func sqlite3Fts5ConfigDeclareVtab(tls *libc.TLS, pConfig uintptr) int32 { /* sqlite3.c:217136:12: */
bp := tls.Alloc(52)
defer tls.Free(52)
@@ -166317,18 +174754,18 @@ func sqlite3Fts5ConfigDeclareVtab(tls *libc.TLS, pConfig uintptr) int32 { /* sql
*(*int32)(unsafe.Pointer(bp + 48 /* rc */)) = SQLITE_OK
var zSql uintptr
- zSql = sqlite3Fts5Mprintf(tls, bp+48 /* &rc */, ts+30825 /* "CREATE TABLE x(" */, 0)
+ zSql = sqlite3Fts5Mprintf(tls, bp+48 /* &rc */, ts+32623 /* "CREATE TABLE x(" */, 0)
for i = 0; (zSql != 0) && (i < (*Fts5Config)(unsafe.Pointer(pConfig)).FnCol); i++ {
var zSep uintptr = func() uintptr {
if i == 0 {
- return ts + 703 /* "" */
+ return ts + 755 /* "" */
}
- return ts + 12871 /* ", " */
+ return ts + 13324 /* ", " */
}()
- zSql = sqlite3Fts5Mprintf(tls, bp+48 /* &rc */, ts+30841 /* "%z%s%Q" */, libc.VaList(bp, zSql, zSep, *(*uintptr)(unsafe.Pointer((*Fts5Config)(unsafe.Pointer(pConfig)).FazCol + uintptr(i)*8))))
+ zSql = sqlite3Fts5Mprintf(tls, bp+48 /* &rc */, ts+32639 /* "%z%s%Q" */, libc.VaList(bp, zSql, zSep, *(*uintptr)(unsafe.Pointer((*Fts5Config)(unsafe.Pointer(pConfig)).FazCol + uintptr(i)*8))))
}
- zSql = sqlite3Fts5Mprintf(tls, bp+48 /* &rc */, ts+30848, /* "%z, %Q HIDDEN, %..." */
- libc.VaList(bp+24, zSql, (*Fts5Config)(unsafe.Pointer(pConfig)).FzName, ts+20037 /* "rank" */))
+ zSql = sqlite3Fts5Mprintf(tls, bp+48 /* &rc */, ts+32646, /* "%z, %Q HIDDEN, %..." */
+ libc.VaList(bp+24, zSql, (*Fts5Config)(unsafe.Pointer(pConfig)).FzName, ts+20497 /* "rank" */))
if zSql != 0 {
*(*int32)(unsafe.Pointer(bp + 48 /* rc */)) = Xsqlite3_declare_vtab(tls, (*Fts5Config)(unsafe.Pointer(pConfig)).Fdb, zSql)
@@ -166359,11 +174796,13 @@ func sqlite3Fts5ConfigDeclareVtab(tls *libc.TLS, pConfig uintptr) int32 { /* sql
// still returns SQLITE_OK. Or, if the tokenization was abandoned early
// because the callback returned another non-zero value, it is assumed
// to be an SQLite error code and returned to the caller.
-func sqlite3Fts5Tokenize(tls *libc.TLS, pConfig uintptr, flags int32, pText uintptr, nText int32, pCtx uintptr, xToken uintptr) int32 { /* sqlite3.c:215942:12: */
+func sqlite3Fts5Tokenize(tls *libc.TLS, pConfig uintptr, flags int32, pText uintptr, nText int32, pCtx uintptr, xToken uintptr) int32 { /* sqlite3.c:217182:12: */
if pText == uintptr(0) {
return SQLITE_OK
}
- return (*(*func(*libc.TLS, uintptr, uintptr, int32, uintptr, int32, uintptr) int32)(unsafe.Pointer(((*Fts5Config)(unsafe.Pointer(pConfig)).FpTokApi + 16 /* &.xTokenize */))))(tls,
+ return (*struct {
+ f func(*libc.TLS, uintptr, uintptr, int32, uintptr, int32, uintptr) int32
+ })(unsafe.Pointer(&struct{ uintptr }{(*Fts5_tokenizer)(unsafe.Pointer((*Fts5Config)(unsafe.Pointer(pConfig)).FpTokApi)).FxTokenize})).f(tls,
(*Fts5Config)(unsafe.Pointer(pConfig)).FpTok, pCtx, flags, pText, nText, xToken)
}
@@ -166371,17 +174810,17 @@ func sqlite3Fts5Tokenize(tls *libc.TLS, pConfig uintptr, flags int32, pText uint
// a comma-separated list of SQL literals followed by a ')' character.
// If it actually is this, return a pointer to the ')'. Otherwise, return
// NULL to indicate a parse error.
-func fts5ConfigSkipArgs(tls *libc.TLS, pIn uintptr) uintptr { /* sqlite3.c:215961:19: */
+func fts5ConfigSkipArgs(tls *libc.TLS, pIn uintptr) uintptr { /* sqlite3.c:217201:19: */
var p uintptr = pIn
for 1 != 0 {
p = fts5ConfigSkipWhitespace(tls, p)
p = fts5ConfigSkipLiteral(tls, p)
p = fts5ConfigSkipWhitespace(tls, p)
- if (p == uintptr(0)) || (int32(*(*int8)(unsafe.Pointer(p))) == ')') {
+ if (p == uintptr(0)) || (int32(*(*uint8)(unsafe.Pointer(p))) == ')') {
break
}
- if int32(*(*int8)(unsafe.Pointer(p))) != ',' {
+ if int32(*(*uint8)(unsafe.Pointer(p))) != ',' {
p = uintptr(0)
break
}
@@ -166398,7 +174837,7 @@ func fts5ConfigSkipArgs(tls *libc.TLS, pIn uintptr) uintptr { /* sqlite3.c:21596
// + Open parenthesis - "("
// + Zero or more SQL literals in a comma separated list
// + Close parenthesis - ")"
-func sqlite3Fts5ConfigParseRank(tls *libc.TLS, zIn uintptr, pzRank uintptr, pzRankArgs uintptr) int32 { /* sqlite3.c:215988:12: */
+func sqlite3Fts5ConfigParseRank(tls *libc.TLS, zIn uintptr, pzRank uintptr, pzRankArgs uintptr) int32 { /* sqlite3.c:217228:12: */
bp := tls.Alloc(4)
defer tls.Free(4)
@@ -166429,7 +174868,7 @@ func sqlite3Fts5ConfigParseRank(tls *libc.TLS, zIn uintptr, pzRank uintptr, pzRa
if *(*int32)(unsafe.Pointer(bp /* rc */)) == SQLITE_OK {
p = fts5ConfigSkipWhitespace(tls, p)
- if int32(*(*int8)(unsafe.Pointer(p))) != '(' {
+ if int32(*(*uint8)(unsafe.Pointer(p))) != '(' {
*(*int32)(unsafe.Pointer(bp /* rc */)) = SQLITE_ERROR
}
p++
@@ -166438,7 +174877,7 @@ func sqlite3Fts5ConfigParseRank(tls *libc.TLS, zIn uintptr, pzRank uintptr, pzRa
var pArgs uintptr
p = fts5ConfigSkipWhitespace(tls, p)
pArgs = p
- if int32(*(*int8)(unsafe.Pointer(p))) != ')' {
+ if int32(*(*uint8)(unsafe.Pointer(p))) != ')' {
p = fts5ConfigSkipArgs(tls, p)
if p == uintptr(0) {
*(*int32)(unsafe.Pointer(bp /* rc */)) = SQLITE_ERROR
@@ -166462,13 +174901,13 @@ func sqlite3Fts5ConfigParseRank(tls *libc.TLS, zIn uintptr, pzRank uintptr, pzRa
return *(*int32)(unsafe.Pointer(bp /* rc */))
}
-func sqlite3Fts5ConfigSetValue(tls *libc.TLS, pConfig uintptr, zKey uintptr, pVal uintptr, pbBadkey uintptr) int32 { /* sqlite3.c:216047:12: */
+func sqlite3Fts5ConfigSetValue(tls *libc.TLS, pConfig uintptr, zKey uintptr, pVal uintptr, pbBadkey uintptr) int32 { /* sqlite3.c:217287:12: */
bp := tls.Alloc(16)
defer tls.Free(16)
var rc int32 = SQLITE_OK
- if 0 == Xsqlite3_stricmp(tls, zKey, ts+30874 /* "pgsz" */) {
+ if 0 == Xsqlite3_stricmp(tls, zKey, ts+32672 /* "pgsz" */) {
var pgsz int32 = 0
if SQLITE_INTEGER == Xsqlite3_value_numeric_type(tls, pVal) {
pgsz = Xsqlite3_value_int(tls, pVal)
@@ -166478,7 +174917,7 @@ func sqlite3Fts5ConfigSetValue(tls *libc.TLS, pConfig uintptr, zKey uintptr, pVa
} else {
(*Fts5Config)(unsafe.Pointer(pConfig)).Fpgsz = pgsz
}
- } else if 0 == Xsqlite3_stricmp(tls, zKey, ts+30879 /* "hashsize" */) {
+ } else if 0 == Xsqlite3_stricmp(tls, zKey, ts+32677 /* "hashsize" */) {
var nHashSize int32 = -1
if SQLITE_INTEGER == Xsqlite3_value_numeric_type(tls, pVal) {
nHashSize = Xsqlite3_value_int(tls, pVal)
@@ -166488,7 +174927,7 @@ func sqlite3Fts5ConfigSetValue(tls *libc.TLS, pConfig uintptr, zKey uintptr, pVa
} else {
(*Fts5Config)(unsafe.Pointer(pConfig)).FnHashSize = nHashSize
}
- } else if 0 == Xsqlite3_stricmp(tls, zKey, ts+30888 /* "automerge" */) {
+ } else if 0 == Xsqlite3_stricmp(tls, zKey, ts+32686 /* "automerge" */) {
var nAutomerge int32 = -1
if SQLITE_INTEGER == Xsqlite3_value_numeric_type(tls, pVal) {
nAutomerge = Xsqlite3_value_int(tls, pVal)
@@ -166501,7 +174940,7 @@ func sqlite3Fts5ConfigSetValue(tls *libc.TLS, pConfig uintptr, zKey uintptr, pVa
}
(*Fts5Config)(unsafe.Pointer(pConfig)).FnAutomerge = nAutomerge
}
- } else if 0 == Xsqlite3_stricmp(tls, zKey, ts+30898 /* "usermerge" */) {
+ } else if 0 == Xsqlite3_stricmp(tls, zKey, ts+32696 /* "usermerge" */) {
var nUsermerge int32 = -1
if SQLITE_INTEGER == Xsqlite3_value_numeric_type(tls, pVal) {
nUsermerge = Xsqlite3_value_int(tls, pVal)
@@ -166511,7 +174950,7 @@ func sqlite3Fts5ConfigSetValue(tls *libc.TLS, pConfig uintptr, zKey uintptr, pVa
} else {
(*Fts5Config)(unsafe.Pointer(pConfig)).FnUsermerge = nUsermerge
}
- } else if 0 == Xsqlite3_stricmp(tls, zKey, ts+30908 /* "crisismerge" */) {
+ } else if 0 == Xsqlite3_stricmp(tls, zKey, ts+32706 /* "crisismerge" */) {
var nCrisisMerge int32 = -1
if SQLITE_INTEGER == Xsqlite3_value_numeric_type(tls, pVal) {
nCrisisMerge = Xsqlite3_value_int(tls, pVal)
@@ -166527,7 +174966,7 @@ func sqlite3Fts5ConfigSetValue(tls *libc.TLS, pConfig uintptr, zKey uintptr, pVa
}
(*Fts5Config)(unsafe.Pointer(pConfig)).FnCrisisMerge = nCrisisMerge
}
- } else if 0 == Xsqlite3_stricmp(tls, zKey, ts+20037 /* "rank" */) {
+ } else if 0 == Xsqlite3_stricmp(tls, zKey, ts+20497 /* "rank" */) {
var zIn uintptr = Xsqlite3_value_text(tls, pVal)
// var zRank uintptr at bp, 8
@@ -166550,11 +174989,11 @@ func sqlite3Fts5ConfigSetValue(tls *libc.TLS, pConfig uintptr, zKey uintptr, pVa
}
// Load the contents of the %_config table into memory.
-func sqlite3Fts5ConfigLoad(tls *libc.TLS, pConfig uintptr, iCookie int32) int32 { /* sqlite3.c:216141:12: */
+func sqlite3Fts5ConfigLoad(tls *libc.TLS, pConfig uintptr, iCookie int32) int32 { /* sqlite3.c:217381:12: */
bp := tls.Alloc(52)
defer tls.Free(52)
- var zSelect uintptr = ts + 30920 /* "SELECT k, v FROM..." */
+ var zSelect uintptr = ts + 32718 /* "SELECT k, v FROM..." */
var zSql uintptr
*(*uintptr)(unsafe.Pointer(bp + 40 /* p */)) = uintptr(0)
*(*int32)(unsafe.Pointer(bp + 32 /* rc */)) = SQLITE_OK
@@ -166577,7 +175016,7 @@ func sqlite3Fts5ConfigLoad(tls *libc.TLS, pConfig uintptr, iCookie int32) int32
for SQLITE_ROW == Xsqlite3_step(tls, *(*uintptr)(unsafe.Pointer(bp + 40 /* p */))) {
var zK uintptr = Xsqlite3_column_text(tls, *(*uintptr)(unsafe.Pointer(bp + 40 /* p */)), 0)
var pVal uintptr = Xsqlite3_column_value(tls, *(*uintptr)(unsafe.Pointer(bp + 40 /* p */)), 1)
- if 0 == Xsqlite3_stricmp(tls, zK, ts+30952 /* "version" */) {
+ if 0 == Xsqlite3_stricmp(tls, zK, ts+32750 /* "version" */) {
iVersion = Xsqlite3_value_int(tls, pVal)
} else {
*(*int32)(unsafe.Pointer(bp + 48 /* bDummy */)) = 0
@@ -166592,7 +175031,7 @@ func sqlite3Fts5ConfigLoad(tls *libc.TLS, pConfig uintptr, iCookie int32) int32
if (*Fts5Config)(unsafe.Pointer(pConfig)).FpzErrmsg != 0 {
*(*uintptr)(unsafe.Pointer((*Fts5Config)(unsafe.Pointer(pConfig)).FpzErrmsg)) = Xsqlite3_mprintf(tls,
- ts+30960, /* "invalid fts5 fil..." */
+ ts+32758, /* "invalid fts5 fil..." */
libc.VaList(bp+16, iVersion, FTS5_CURRENT_VERSION))
}
}
@@ -166621,13 +175060,13 @@ func sqlite3Fts5ConfigLoad(tls *libc.TLS, pConfig uintptr, iCookie int32) int32
// All token types in the generated fts5parse.h file are greater than 0.
type Fts5ExprTerm1 = struct {
- FbPrefix U8
- FbFirst U8
- _ [6]byte
- FzTerm uintptr
- FpIter uintptr
- FpSynonym uintptr
-} /* sqlite3.c:211884:9 */
+ FbPrefix U8
+ FbFirst U8
+ F__ccgo_pad1 [6]byte
+ FzTerm uintptr
+ FpIter uintptr
+ FpSynonym uintptr
+} /* sqlite3.c:213118:9 */
// 2014 May 31
//
@@ -166646,9 +175085,9 @@ type Fts5ExprTerm1 = struct {
// All token types in the generated fts5parse.h file are greater than 0.
-type Fts5ExprTerm = Fts5ExprTerm1 /* sqlite3.c:216219:29 */
+type Fts5ExprTerm = Fts5ExprTerm1 /* sqlite3.c:217459:29 */
-func sqlite3Fts5ParseError(tls *libc.TLS, pParse uintptr, zFmt uintptr, va uintptr) { /* sqlite3.c:216326:13: */
+func sqlite3Fts5ParseError(tls *libc.TLS, pParse uintptr, zFmt uintptr, va uintptr) { /* sqlite3.c:217566:13: */
var ap Va_list
_ = ap
ap = va
@@ -166659,12 +175098,12 @@ func sqlite3Fts5ParseError(tls *libc.TLS, pParse uintptr, zFmt uintptr, va uintp
_ = ap
}
-func fts5ExprIsspace(tls *libc.TLS, t int8) int32 { /* sqlite3.c:216336:12: */
+func fts5ExprIsspace(tls *libc.TLS, t uint8) int32 { /* sqlite3.c:217576:12: */
return (libc.Bool32((((int32(t) == ' ') || (int32(t) == '\t')) || (int32(t) == '\n')) || (int32(t) == '\r')))
}
// Read the first token from the nul-terminated string at *pz.
-func fts5ExprGetToken(tls *libc.TLS, pParse uintptr, pz uintptr, pToken uintptr) int32 { /* sqlite3.c:216343:12: */
+func fts5ExprGetToken(tls *libc.TLS, pParse uintptr, pz uintptr, pToken uintptr) int32 { /* sqlite3.c:217583:12: */
bp := tls.Alloc(8)
defer tls.Free(8)
@@ -166672,13 +175111,13 @@ func fts5ExprGetToken(tls *libc.TLS, pParse uintptr, pz uintptr, pToken uintptr)
var tok int32
// Skip past any whitespace
- for fts5ExprIsspace(tls, *(*int8)(unsafe.Pointer(z))) != 0 {
+ for fts5ExprIsspace(tls, *(*uint8)(unsafe.Pointer(z))) != 0 {
z++
}
(*Fts5Token)(unsafe.Pointer(pToken)).Fp = z
(*Fts5Token)(unsafe.Pointer(pToken)).Fn = 1
- switch int32(*(*int8)(unsafe.Pointer(z))) {
+ switch int32(*(*uint8)(unsafe.Pointer(z))) {
case '(':
tok = FTS5_LP
break
@@ -166719,14 +175158,14 @@ func fts5ExprGetToken(tls *libc.TLS, pParse uintptr, pz uintptr, pToken uintptr)
tok = FTS5_STRING
for z2 = (z + 1); 1 != 0; z2++ {
- if int32(*(*int8)(unsafe.Pointer(z2))) == '"' {
+ if int32(*(*uint8)(unsafe.Pointer(z2))) == '"' {
z2++
- if int32(*(*int8)(unsafe.Pointer(z2))) != '"' {
+ if int32(*(*uint8)(unsafe.Pointer(z2))) != '"' {
break
}
}
- if int32(*(*int8)(unsafe.Pointer(z2))) == 0 {
- sqlite3Fts5ParseError(tls, pParse, ts+31025 /* "unterminated str..." */, 0)
+ if int32(*(*uint8)(unsafe.Pointer(z2))) == 0 {
+ sqlite3Fts5ParseError(tls, pParse, ts+32823 /* "unterminated str..." */, 0)
return FTS5_EOF
}
}
@@ -166738,21 +175177,21 @@ func fts5ExprGetToken(tls *libc.TLS, pParse uintptr, pz uintptr, pToken uintptr)
default:
{
var z2 uintptr
- if sqlite3Fts5IsBareword(tls, *(*int8)(unsafe.Pointer(z))) == 0 {
- sqlite3Fts5ParseError(tls, pParse, ts+31045 /* "fts5: syntax err..." */, libc.VaList(bp, z))
+ if sqlite3Fts5IsBareword(tls, *(*uint8)(unsafe.Pointer(z))) == 0 {
+ sqlite3Fts5ParseError(tls, pParse, ts+32843 /* "fts5: syntax err..." */, libc.VaList(bp, z))
return FTS5_EOF
}
tok = FTS5_STRING
- for z2 = (z + 1); sqlite3Fts5IsBareword(tls, *(*int8)(unsafe.Pointer(z2))) != 0; z2++ {
+ for z2 = (z + 1); sqlite3Fts5IsBareword(tls, *(*uint8)(unsafe.Pointer(z2))) != 0; z2++ {
}
(*Fts5Token)(unsafe.Pointer(pToken)).Fn = (int32((int64(z2) - int64(z)) / 1))
- if ((*Fts5Token)(unsafe.Pointer(pToken)).Fn == 2) && (libc.Xmemcmp(tls, (*Fts5Token)(unsafe.Pointer(pToken)).Fp, ts+31076 /* "OR" */, uint64(2)) == 0) {
+ if ((*Fts5Token)(unsafe.Pointer(pToken)).Fn == 2) && (libc.Xmemcmp(tls, (*Fts5Token)(unsafe.Pointer(pToken)).Fp, ts+32874 /* "OR" */, uint64(2)) == 0) {
tok = FTS5_OR
}
- if ((*Fts5Token)(unsafe.Pointer(pToken)).Fn == 3) && (libc.Xmemcmp(tls, (*Fts5Token)(unsafe.Pointer(pToken)).Fp, ts+31079 /* "NOT" */, uint64(3)) == 0) {
+ if ((*Fts5Token)(unsafe.Pointer(pToken)).Fn == 3) && (libc.Xmemcmp(tls, (*Fts5Token)(unsafe.Pointer(pToken)).Fp, ts+32877 /* "NOT" */, uint64(3)) == 0) {
tok = FTS5_NOT
}
- if ((*Fts5Token)(unsafe.Pointer(pToken)).Fn == 3) && (libc.Xmemcmp(tls, (*Fts5Token)(unsafe.Pointer(pToken)).Fp, ts+27825 /* "AND" */, uint64(3)) == 0) {
+ if ((*Fts5Token)(unsafe.Pointer(pToken)).Fn == 3) && (libc.Xmemcmp(tls, (*Fts5Token)(unsafe.Pointer(pToken)).Fp, ts+28285 /* "AND" */, uint64(3)) == 0) {
tok = FTS5_AND
}
break
@@ -166764,15 +175203,15 @@ func fts5ExprGetToken(tls *libc.TLS, pParse uintptr, pz uintptr, pToken uintptr)
return tok
}
-func fts5ParseAlloc(tls *libc.TLS, t U64) uintptr { /* sqlite3.c:216407:13: */
+func fts5ParseAlloc(tls *libc.TLS, t U64) uintptr { /* sqlite3.c:217647:13: */
return Xsqlite3_malloc64(tls, uint64(Sqlite3_int64(t)))
}
-func fts5ParseFree(tls *libc.TLS, p uintptr) { /* sqlite3.c:216408:13: */
+func fts5ParseFree(tls *libc.TLS, p uintptr) { /* sqlite3.c:217648:13: */
Xsqlite3_free(tls, p)
}
-func sqlite3Fts5ExprNew(tls *libc.TLS, pConfig uintptr, bPhraseToAnd int32, iCol int32, zExpr uintptr, ppNew uintptr, pzErr uintptr) int32 { /* sqlite3.c:216410:12: */
+func sqlite3Fts5ExprNew(tls *libc.TLS, pConfig uintptr, bPhraseToAnd int32, iCol int32, zExpr uintptr, ppNew uintptr, pzErr uintptr) int32 { /* sqlite3.c:217650:12: */
bp := tls.Alloc(72)
defer tls.Free(72)
@@ -166850,7 +175289,7 @@ func sqlite3Fts5ExprNew(tls *libc.TLS, pConfig uintptr, bPhraseToAnd int32, iCol
// expression that will match a superset of the rows matched by the LIKE or
// GLOB. If successful, SQLITE_OK is returned. Otherwise, an SQLite error
// code.
-func sqlite3Fts5ExprPattern(tls *libc.TLS, pConfig uintptr, bGlob int32, iCol int32, zText uintptr, pp uintptr) int32 { /* sqlite3.c:216491:12: */
+func sqlite3Fts5ExprPattern(tls *libc.TLS, pConfig uintptr, bGlob int32, iCol int32, zText uintptr, pp uintptr) int32 { /* sqlite3.c:217731:12: */
bp := tls.Alloc(3)
defer tls.Free(3)
@@ -166861,43 +175300,43 @@ func sqlite3Fts5ExprPattern(tls *libc.TLS, pConfig uintptr, bGlob int32, iCol in
if zExpr == uintptr(0) {
rc = SQLITE_NOMEM
} else {
- // var aSpec [3]int8 at bp, 3
+ // var aSpec [3]uint8 at bp, 3
var iOut int32 = 0
var i int32 = 0
var iFirst int32 = 0
if bGlob == 0 {
- *(*int8)(unsafe.Pointer(bp /* &aSpec[0] */)) = int8('_')
- *(*int8)(unsafe.Pointer(bp /* &aSpec[0] */ + 1)) = int8('%')
- *(*int8)(unsafe.Pointer(bp /* &aSpec[0] */ + 2)) = int8(0)
+ *(*uint8)(unsafe.Pointer(bp /* &aSpec[0] */)) = uint8('_')
+ *(*uint8)(unsafe.Pointer(bp /* &aSpec[0] */ + 1)) = uint8('%')
+ *(*uint8)(unsafe.Pointer(bp /* &aSpec[0] */ + 2)) = uint8(0)
} else {
- *(*int8)(unsafe.Pointer(bp /* &aSpec[0] */)) = int8('*')
- *(*int8)(unsafe.Pointer(bp /* &aSpec[0] */ + 1)) = int8('?')
- *(*int8)(unsafe.Pointer(bp /* &aSpec[0] */ + 2)) = int8('[')
+ *(*uint8)(unsafe.Pointer(bp /* &aSpec[0] */)) = uint8('*')
+ *(*uint8)(unsafe.Pointer(bp /* &aSpec[0] */ + 1)) = uint8('?')
+ *(*uint8)(unsafe.Pointer(bp /* &aSpec[0] */ + 2)) = uint8('[')
}
for I64(i) <= nText {
if (((I64(i) == nText) ||
- (int32(*(*int8)(unsafe.Pointer(zText + uintptr(i)))) == int32(*(*int8)(unsafe.Pointer(bp /* &aSpec[0] */))))) || (int32(*(*int8)(unsafe.Pointer(zText + uintptr(i)))) == int32(*(*int8)(unsafe.Pointer(bp /* &aSpec[0] */ + 1))))) || (int32(*(*int8)(unsafe.Pointer(zText + uintptr(i)))) == int32(*(*int8)(unsafe.Pointer(bp /* &aSpec[0] */ + 2)))) {
+ (int32(*(*uint8)(unsafe.Pointer(zText + uintptr(i)))) == int32(*(*uint8)(unsafe.Pointer(bp /* &aSpec[0] */))))) || (int32(*(*uint8)(unsafe.Pointer(zText + uintptr(i)))) == int32(*(*uint8)(unsafe.Pointer(bp /* &aSpec[0] */ + 1))))) || (int32(*(*uint8)(unsafe.Pointer(zText + uintptr(i)))) == int32(*(*uint8)(unsafe.Pointer(bp /* &aSpec[0] */ + 2)))) {
if (i - iFirst) >= 3 {
var jj int32
- *(*int8)(unsafe.Pointer(zExpr + uintptr(libc.PostIncInt32(&iOut, 1)))) = int8('"')
+ *(*uint8)(unsafe.Pointer(zExpr + uintptr(libc.PostIncInt32(&iOut, 1)))) = uint8('"')
for jj = iFirst; jj < i; jj++ {
- *(*int8)(unsafe.Pointer(zExpr + uintptr(libc.PostIncInt32(&iOut, 1)))) = *(*int8)(unsafe.Pointer(zText + uintptr(jj)))
- if int32(*(*int8)(unsafe.Pointer(zText + uintptr(jj)))) == '"' {
- *(*int8)(unsafe.Pointer(zExpr + uintptr(libc.PostIncInt32(&iOut, 1)))) = int8('"')
+ *(*uint8)(unsafe.Pointer(zExpr + uintptr(libc.PostIncInt32(&iOut, 1)))) = *(*uint8)(unsafe.Pointer(zText + uintptr(jj)))
+ if int32(*(*uint8)(unsafe.Pointer(zText + uintptr(jj)))) == '"' {
+ *(*uint8)(unsafe.Pointer(zExpr + uintptr(libc.PostIncInt32(&iOut, 1)))) = uint8('"')
}
}
- *(*int8)(unsafe.Pointer(zExpr + uintptr(libc.PostIncInt32(&iOut, 1)))) = int8('"')
- *(*int8)(unsafe.Pointer(zExpr + uintptr(libc.PostIncInt32(&iOut, 1)))) = int8(' ')
+ *(*uint8)(unsafe.Pointer(zExpr + uintptr(libc.PostIncInt32(&iOut, 1)))) = uint8('"')
+ *(*uint8)(unsafe.Pointer(zExpr + uintptr(libc.PostIncInt32(&iOut, 1)))) = uint8(' ')
}
- if int32(*(*int8)(unsafe.Pointer(zText + uintptr(i)))) == int32(*(*int8)(unsafe.Pointer(bp /* &aSpec[0] */ + 2))) {
+ if int32(*(*uint8)(unsafe.Pointer(zText + uintptr(i)))) == int32(*(*uint8)(unsafe.Pointer(bp /* &aSpec[0] */ + 2))) {
i = i + (2)
- if int32(*(*int8)(unsafe.Pointer(zText + uintptr((i - 1))))) == '^' {
+ if int32(*(*uint8)(unsafe.Pointer(zText + uintptr((i - 1))))) == '^' {
i++
}
- for (I64(i) < nText) && (int32(*(*int8)(unsafe.Pointer(zText + uintptr(i)))) != ']') {
+ for (I64(i) < nText) && (int32(*(*uint8)(unsafe.Pointer(zText + uintptr(i)))) != ']') {
i++
}
}
@@ -166913,7 +175352,7 @@ func sqlite3Fts5ExprPattern(tls *libc.TLS, pConfig uintptr, bGlob int32, iCol in
iCol = (*Fts5Config)(unsafe.Pointer(pConfig)).FnCol
}
}
- *(*int8)(unsafe.Pointer(zExpr + uintptr(iOut))) = int8(0)
+ *(*uint8)(unsafe.Pointer(zExpr + uintptr(iOut))) = uint8(0)
rc = sqlite3Fts5ExprNew(tls, pConfig, bAnd, iCol, zExpr, pp, (*Fts5Config)(unsafe.Pointer(pConfig)).FpzErrmsg)
} else {
*(*uintptr)(unsafe.Pointer(pp)) = uintptr(0)
@@ -166925,7 +175364,7 @@ func sqlite3Fts5ExprPattern(tls *libc.TLS, pConfig uintptr, bGlob int32, iCol in
}
// Free the expression node object passed as the only argument.
-func sqlite3Fts5ParseNodeFree(tls *libc.TLS, p uintptr) { /* sqlite3.c:216561:13: */
+func sqlite3Fts5ParseNodeFree(tls *libc.TLS, p uintptr) { /* sqlite3.c:217801:13: */
if p != 0 {
var i int32
for i = 0; i < (*Fts5ExprNode)(unsafe.Pointer(p)).FnChild; i++ {
@@ -166937,7 +175376,7 @@ func sqlite3Fts5ParseNodeFree(tls *libc.TLS, p uintptr) { /* sqlite3.c:216561:13
}
// Free the expression object passed as the only argument.
-func sqlite3Fts5ExprFree(tls *libc.TLS, p uintptr) { /* sqlite3.c:216575:13: */
+func sqlite3Fts5ExprFree(tls *libc.TLS, p uintptr) { /* sqlite3.c:217815:13: */
if p != 0 {
sqlite3Fts5ParseNodeFree(tls, (*Fts5Expr)(unsafe.Pointer(p)).FpRoot)
Xsqlite3_free(tls, (*Fts5Expr)(unsafe.Pointer(p)).FapExprPhrase)
@@ -166945,7 +175384,7 @@ func sqlite3Fts5ExprFree(tls *libc.TLS, p uintptr) { /* sqlite3.c:216575:13: */
}
}
-func sqlite3Fts5ExprAnd(tls *libc.TLS, pp1 uintptr, p2 uintptr) int32 { /* sqlite3.c:216583:12: */
+func sqlite3Fts5ExprAnd(tls *libc.TLS, pp1 uintptr, p2 uintptr) int32 { /* sqlite3.c:217823:12: */
bp := tls.Alloc(48)
defer tls.Free(48)
@@ -166986,7 +175425,7 @@ func sqlite3Fts5ExprAnd(tls *libc.TLS, pp1 uintptr, p2 uintptr) int32 { /* sqlit
// Argument pTerm must be a synonym iterator. Return the current rowid
// that it points to.
-func fts5ExprSynonymRowid(tls *libc.TLS, pTerm uintptr, bDesc int32, pbEof uintptr) I64 { /* sqlite3.c:216623:12: */
+func fts5ExprSynonymRowid(tls *libc.TLS, pTerm uintptr, bDesc int32, pbEof uintptr) I64 { /* sqlite3.c:217863:12: */
var iRet I64 = int64(0)
var bRetValid int32 = 0
var p uintptr
@@ -167008,7 +175447,7 @@ func fts5ExprSynonymRowid(tls *libc.TLS, pTerm uintptr, bDesc int32, pbEof uintp
}
// Argument pTerm must be a synonym iterator.
-func fts5ExprSynonymList(tls *libc.TLS, pTerm uintptr, iRowid I64, pBuf uintptr, pa uintptr, pn uintptr) int32 { /* sqlite3.c:216647:12: */
+func fts5ExprSynonymList(tls *libc.TLS, pTerm uintptr, iRowid I64, pBuf uintptr, pa uintptr, pn uintptr) int32 { /* sqlite3.c:217887:12: */
bp := tls.Alloc(136)
defer tls.Free(136)
@@ -167172,7 +175611,7 @@ __22:
// SQLITE_OK is returned if an error occurs, or an SQLite error code
// otherwise. It is not considered an error code if the current rowid is
// not a match.
-func fts5ExprPhraseIsMatch(tls *libc.TLS, pNode uintptr, pPhrase uintptr, pbMatch uintptr) int32 { /* sqlite3.c:216730:12: */
+func fts5ExprPhraseIsMatch(tls *libc.TLS, pNode uintptr, pPhrase uintptr, pbMatch uintptr) int32 { /* sqlite3.c:217970:12: */
bp := tls.Alloc(168)
defer tls.Free(168)
@@ -167397,11 +175836,11 @@ type Fts5LookaheadReader1 = struct {
Fi int32
FiPos I64
FiLookahead I64
-} /* sqlite3.c:216814:9 */
+} /* sqlite3.c:218054:9 */
-type Fts5LookaheadReader = Fts5LookaheadReader1 /* sqlite3.c:216814:36 */
+type Fts5LookaheadReader = Fts5LookaheadReader1 /* sqlite3.c:218054:36 */
-func fts5LookaheadReaderNext(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:216825:12: */
+func fts5LookaheadReaderNext(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:218065:12: */
(*Fts5LookaheadReader)(unsafe.Pointer(p)).FiPos = (*Fts5LookaheadReader)(unsafe.Pointer(p)).FiLookahead
if sqlite3Fts5PoslistNext64(tls, (*Fts5LookaheadReader)(unsafe.Pointer(p)).Fa, (*Fts5LookaheadReader)(unsafe.Pointer(p)).Fn, (p+12 /* &.i */), (p+24 /* &.iLookahead */)) != 0 {
(*Fts5LookaheadReader)(unsafe.Pointer(p)).FiLookahead = (I64((int64(1))) << 62)
@@ -167409,7 +175848,7 @@ func fts5LookaheadReaderNext(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:2168
return (libc.Bool32((*Fts5LookaheadReader)(unsafe.Pointer(p)).FiPos == (I64((int64(1))) << 62)))
}
-func fts5LookaheadReaderInit(tls *libc.TLS, a uintptr, n int32, p uintptr) int32 { /* sqlite3.c:216833:12: */
+func fts5LookaheadReaderInit(tls *libc.TLS, a uintptr, n int32, p uintptr) int32 { /* sqlite3.c:218073:12: */
libc.Xmemset(tls, p, 0, uint64(unsafe.Sizeof(Fts5LookaheadReader{})))
(*Fts5LookaheadReader)(unsafe.Pointer(p)).Fa = a
(*Fts5LookaheadReader)(unsafe.Pointer(p)).Fn = n
@@ -167421,9 +175860,9 @@ type Fts5NearTrimmer1 = struct {
Freader Fts5LookaheadReader
Fwriter Fts5PoslistWriter
FpOut uintptr
-} /* sqlite3.c:216844:9 */
+} /* sqlite3.c:218084:9 */
-type Fts5NearTrimmer = Fts5NearTrimmer1 /* sqlite3.c:216844:32 */
+type Fts5NearTrimmer = Fts5NearTrimmer1 /* sqlite3.c:218084:32 */
// The near-set object passed as the first argument contains more than
// one phrase. All phrases currently point to the same row. The
@@ -167440,7 +175879,7 @@ type Fts5NearTrimmer = Fts5NearTrimmer1 /* sqlite3.c:216844:32 */
// If no error occurs and non-zero (a match) is returned, the position-list
// of each phrase object is edited to contain only those entries that
// meet the constraint before returning.
-func fts5ExprNearIsMatch(tls *libc.TLS, pRc uintptr, pNear uintptr) int32 { /* sqlite3.c:216868:12: */
+func fts5ExprNearIsMatch(tls *libc.TLS, pRc uintptr, pNear uintptr) int32 { /* sqlite3.c:218108:12: */
bp := tls.Alloc(196)
defer tls.Free(196)
@@ -167642,7 +176081,7 @@ __29:
// If the iterator reaches EOF, set *pbEof to true before returning. If
// an error occurs, set *pRc to an error code. If either *pbEof or *pRc
// are set, return a non-zero value. Otherwise, return zero.
-func fts5ExprAdvanceto(tls *libc.TLS, pIter uintptr, bDesc int32, piLast uintptr, pRc uintptr, pbEof uintptr) int32 { /* sqlite3.c:216967:12: */
+func fts5ExprAdvanceto(tls *libc.TLS, pIter uintptr, bDesc int32, piLast uintptr, pRc uintptr, pbEof uintptr) int32 { /* sqlite3.c:218207:12: */
var iLast I64 = *(*I64)(unsafe.Pointer(piLast))
var iRowid I64
@@ -167662,7 +176101,7 @@ func fts5ExprAdvanceto(tls *libc.TLS, pIter uintptr, bDesc int32, piLast uintptr
return 0
}
-func fts5ExprSynonymAdvanceto(tls *libc.TLS, pTerm uintptr, bDesc int32, piLast uintptr, pRc uintptr) int32 { /* sqlite3.c:216993:12: */
+func fts5ExprSynonymAdvanceto(tls *libc.TLS, pTerm uintptr, bDesc int32, piLast uintptr, pRc uintptr) int32 { /* sqlite3.c:218233:12: */
bp := tls.Alloc(4)
defer tls.Free(4)
@@ -167689,7 +176128,7 @@ func fts5ExprSynonymAdvanceto(tls *libc.TLS, pTerm uintptr, bDesc int32, piLast
return *(*int32)(unsafe.Pointer(bp /* bEof */))
}
-func fts5ExprNearTest(tls *libc.TLS, pRc uintptr, pExpr uintptr, pNode uintptr) int32 { /* sqlite3.c:217023:12: */
+func fts5ExprNearTest(tls *libc.TLS, pRc uintptr, pExpr uintptr, pNode uintptr) int32 { /* sqlite3.c:218263:12: */
bp := tls.Alloc(8)
defer tls.Free(8)
@@ -167746,7 +176185,7 @@ func fts5ExprNearTest(tls *libc.TLS, pRc uintptr, pExpr uintptr, pNode uintptr)
// If an error occurs, return an SQLite error code. Otherwise, return
// SQLITE_OK. It is not considered an error if some term matches zero
// documents.
-func fts5ExprNearInitAll(tls *libc.TLS, pExpr uintptr, pNode uintptr) int32 { /* sqlite3.c:217082:12: */
+func fts5ExprNearInitAll(tls *libc.TLS, pExpr uintptr, pNode uintptr) int32 { /* sqlite3.c:218322:12: */
var pNear uintptr = (*Fts5ExprNode)(unsafe.Pointer(pNode)).FpNear
var i int32
@@ -167812,7 +176251,7 @@ func fts5ExprNearInitAll(tls *libc.TLS, pExpr uintptr, pNode uintptr) int32 { /*
// Otherwise, if this is a DESC iterator, the opposite is returned:
//
// (iRhs - iLhs)
-func fts5RowidCmp(tls *libc.TLS, pExpr uintptr, iLhs I64, iRhs I64) int32 { /* sqlite3.c:217144:12: */
+func fts5RowidCmp(tls *libc.TLS, pExpr uintptr, iLhs I64, iRhs I64) int32 { /* sqlite3.c:218384:12: */
if (*Fts5Expr)(unsafe.Pointer(pExpr)).FbDesc == 0 {
if iLhs < iRhs {
@@ -167828,7 +176267,7 @@ func fts5RowidCmp(tls *libc.TLS, pExpr uintptr, iLhs I64, iRhs I64) int32 { /* s
return int32(0)
}
-func fts5ExprSetEof(tls *libc.TLS, pNode uintptr) { /* sqlite3.c:217159:13: */
+func fts5ExprSetEof(tls *libc.TLS, pNode uintptr) { /* sqlite3.c:218399:13: */
var i int32
(*Fts5ExprNode)(unsafe.Pointer(pNode)).FbEof = 1
(*Fts5ExprNode)(unsafe.Pointer(pNode)).FbNomatch = 0
@@ -167837,7 +176276,7 @@ func fts5ExprSetEof(tls *libc.TLS, pNode uintptr) { /* sqlite3.c:217159:13: */
}
}
-func fts5ExprNodeZeroPoslist(tls *libc.TLS, pNode uintptr) { /* sqlite3.c:217168:13: */
+func fts5ExprNodeZeroPoslist(tls *libc.TLS, pNode uintptr) { /* sqlite3.c:218408:13: */
if ((*Fts5ExprNode)(unsafe.Pointer(pNode)).FeType == FTS5_STRING) || ((*Fts5ExprNode)(unsafe.Pointer(pNode)).FeType == FTS5_TERM) {
var pNear uintptr = (*Fts5ExprNode)(unsafe.Pointer(pNode)).FpNear
var i int32
@@ -167863,7 +176302,7 @@ func fts5ExprNodeZeroPoslist(tls *libc.TLS, pNode uintptr) { /* sqlite3.c:217168
// This means that if the iteration order is ASC, then numerically larger
// rowids are considered larger. Or if it is the default DESC, numerically
// smaller rowids are larger.
-func fts5NodeCompare(tls *libc.TLS, pExpr uintptr, p1 uintptr, p2 uintptr) int32 { /* sqlite3.c:217198:12: */
+func fts5NodeCompare(tls *libc.TLS, pExpr uintptr, p1 uintptr, p2 uintptr) int32 { /* sqlite3.c:218438:12: */
if (*Fts5ExprNode)(unsafe.Pointer(p2)).FbEof != 0 {
return -1
}
@@ -167882,7 +176321,7 @@ func fts5NodeCompare(tls *libc.TLS, pExpr uintptr, p1 uintptr, p2 uintptr) int32
// SQLITE_OK is returned if an error occurs, or an SQLite error code
// otherwise. It is not considered an error code if an iterator reaches
// EOF.
-func fts5ExprNodeTest_STRING(tls *libc.TLS, pExpr uintptr, pNode uintptr) int32 { /* sqlite3.c:217219:12: */
+func fts5ExprNodeTest_STRING(tls *libc.TLS, pExpr uintptr, pNode uintptr) int32 { /* sqlite3.c:218459:12: */
bp := tls.Alloc(12)
defer tls.Free(12)
@@ -167950,7 +176389,7 @@ func fts5ExprNodeTest_STRING(tls *libc.TLS, pExpr uintptr, pNode uintptr) int32
//
// Return SQLITE_OK if successful, or an SQLite error code if an error
// occurs.
-func fts5ExprNodeNext_STRING(tls *libc.TLS, pExpr uintptr, pNode uintptr, bFromValid int32, iFrom I64) int32 { /* sqlite3.c:217289:12: */
+func fts5ExprNodeNext_STRING(tls *libc.TLS, pExpr uintptr, pNode uintptr, bFromValid int32, iFrom I64) int32 { /* sqlite3.c:218529:12: */
var pTerm uintptr = (*(*uintptr)(unsafe.Pointer(((*Fts5ExprNode)(unsafe.Pointer(pNode)).FpNear + 24 /* &.apPhrase */))) + 32 /* &.aTerm */)
var rc int32 = SQLITE_OK
@@ -168009,7 +176448,7 @@ func fts5ExprNodeNext_STRING(tls *libc.TLS, pExpr uintptr, pNode uintptr, bFromV
return rc
}
-func fts5ExprNodeTest_TERM(tls *libc.TLS, pExpr uintptr, pNode uintptr) int32 { /* sqlite3.c:217354:12: */
+func fts5ExprNodeTest_TERM(tls *libc.TLS, pExpr uintptr, pNode uintptr) int32 { /* sqlite3.c:218594:12: */
// As this "NEAR" object is actually a single phrase that consists
// of a single term only, grab pointers into the poslist managed by the
// fts5_index.c iterator object. This is much faster than synthesizing
@@ -168028,7 +176467,7 @@ func fts5ExprNodeTest_TERM(tls *libc.TLS, pExpr uintptr, pNode uintptr) int32 {
}
// xNext() method for a node of type FTS5_TERM.
-func fts5ExprNodeNext_TERM(tls *libc.TLS, pExpr uintptr, pNode uintptr, bFromValid int32, iFrom I64) int32 { /* sqlite3.c:217382:12: */
+func fts5ExprNodeNext_TERM(tls *libc.TLS, pExpr uintptr, pNode uintptr, bFromValid int32, iFrom I64) int32 { /* sqlite3.c:218622:12: */
var rc int32
var pIter uintptr = (*Fts5ExprTerm)(unsafe.Pointer((*(*uintptr)(unsafe.Pointer(((*Fts5ExprNode)(unsafe.Pointer(pNode)).FpNear + 24 /* &.apPhrase */))) + 32 /* &.aTerm */))).FpIter
@@ -168046,7 +176485,7 @@ func fts5ExprNodeNext_TERM(tls *libc.TLS, pExpr uintptr, pNode uintptr, bFromVal
return rc
}
-func fts5ExprNodeTest_OR(tls *libc.TLS, pExpr uintptr, pNode uintptr) { /* sqlite3.c:217406:13: */
+func fts5ExprNodeTest_OR(tls *libc.TLS, pExpr uintptr, pNode uintptr) { /* sqlite3.c:218646:13: */
var pNext uintptr = *(*uintptr)(unsafe.Pointer((pNode + 48 /* &.apChild */)))
var i int32
@@ -168062,7 +176501,7 @@ func fts5ExprNodeTest_OR(tls *libc.TLS, pExpr uintptr, pNode uintptr) { /* sqlit
(*Fts5ExprNode)(unsafe.Pointer(pNode)).FbNomatch = (*Fts5ExprNode)(unsafe.Pointer(pNext)).FbNomatch
}
-func fts5ExprNodeNext_OR(tls *libc.TLS, pExpr uintptr, pNode uintptr, bFromValid int32, iFrom I64) int32 { /* sqlite3.c:217425:12: */
+func fts5ExprNodeNext_OR(tls *libc.TLS, pExpr uintptr, pNode uintptr, bFromValid int32, iFrom I64) int32 { /* sqlite3.c:218665:12: */
var i int32
var iLast I64 = (*Fts5ExprNode)(unsafe.Pointer(pNode)).FiRowid
@@ -168072,7 +176511,9 @@ func fts5ExprNodeNext_OR(tls *libc.TLS, pExpr uintptr, pNode uintptr, bFromValid
if (*Fts5ExprNode)(unsafe.Pointer(p1)).FbEof == 0 {
if ((*Fts5ExprNode)(unsafe.Pointer(p1)).FiRowid == iLast) ||
((bFromValid != 0) && (fts5RowidCmp(tls, pExpr, (*Fts5ExprNode)(unsafe.Pointer(p1)).FiRowid, iFrom) < 0)) {
- var rc int32 = (*(*func(*libc.TLS, uintptr, uintptr, int32, I64) int32)(unsafe.Pointer((p1 + 16 /* &.xNext */))))(tls, pExpr, p1, bFromValid, iFrom)
+ var rc int32 = (*struct {
+ f func(*libc.TLS, uintptr, uintptr, int32, I64) int32
+ })(unsafe.Pointer(&struct{ uintptr }{(*Fts5ExprNode)(unsafe.Pointer((p1))).FxNext})).f(tls, pExpr, p1, bFromValid, iFrom)
if rc != SQLITE_OK {
(*Fts5ExprNode)(unsafe.Pointer(pNode)).FbNomatch = 0
return rc
@@ -168086,7 +176527,7 @@ func fts5ExprNodeNext_OR(tls *libc.TLS, pExpr uintptr, pNode uintptr, bFromValid
}
// Argument pNode is an FTS5_AND node.
-func fts5ExprNodeTest_AND(tls *libc.TLS, pExpr uintptr, pAnd uintptr) int32 { /* sqlite3.c:217457:12: */
+func fts5ExprNodeTest_AND(tls *libc.TLS, pExpr uintptr, pAnd uintptr) int32 { /* sqlite3.c:218697:12: */
var iChild int32
var iLast I64 = (*Fts5ExprNode)(unsafe.Pointer(pAnd)).FiRowid
var rc int32 = SQLITE_OK
@@ -168100,7 +176541,9 @@ func fts5ExprNodeTest_AND(tls *libc.TLS, pExpr uintptr, pAnd uintptr) int32 { /*
var cmp int32 = fts5RowidCmp(tls, pExpr, iLast, (*Fts5ExprNode)(unsafe.Pointer(pChild)).FiRowid)
if cmp > 0 {
// Advance pChild until it points to iLast or laster
- rc = (*(*func(*libc.TLS, uintptr, uintptr, int32, I64) int32)(unsafe.Pointer((pChild + 16 /* &.xNext */))))(tls, pExpr, pChild, 1, iLast)
+ rc = (*struct {
+ f func(*libc.TLS, uintptr, uintptr, int32, I64) int32
+ })(unsafe.Pointer(&struct{ uintptr }{(*Fts5ExprNode)(unsafe.Pointer((pChild))).FxNext})).f(tls, pExpr, pChild, 1, iLast)
if rc != SQLITE_OK {
(*Fts5ExprNode)(unsafe.Pointer(pAnd)).FbNomatch = 0
return rc
@@ -168134,8 +176577,10 @@ func fts5ExprNodeTest_AND(tls *libc.TLS, pExpr uintptr, pAnd uintptr) int32 { /*
return SQLITE_OK
}
-func fts5ExprNodeNext_AND(tls *libc.TLS, pExpr uintptr, pNode uintptr, bFromValid int32, iFrom I64) int32 { /* sqlite3.c:217509:12: */
- var rc int32 = (*(*func(*libc.TLS, uintptr, uintptr, int32, I64) int32)(unsafe.Pointer((*(*uintptr)(unsafe.Pointer((pNode + 48 /* &.apChild */))) + 16 /* &.xNext */))))(tls, pExpr, *(*uintptr)(unsafe.Pointer((pNode + 48 /* &.apChild */))), bFromValid, iFrom)
+func fts5ExprNodeNext_AND(tls *libc.TLS, pExpr uintptr, pNode uintptr, bFromValid int32, iFrom I64) int32 { /* sqlite3.c:218749:12: */
+ var rc int32 = (*struct {
+ f func(*libc.TLS, uintptr, uintptr, int32, I64) int32
+ })(unsafe.Pointer(&struct{ uintptr }{(*Fts5ExprNode)(unsafe.Pointer((*(*uintptr)(unsafe.Pointer((pNode + 48 /* &.apChild */)))))).FxNext})).f(tls, pExpr, *(*uintptr)(unsafe.Pointer((pNode + 48 /* &.apChild */))), bFromValid, iFrom)
if rc == SQLITE_OK {
rc = fts5ExprNodeTest_AND(tls, pExpr, pNode)
} else {
@@ -168144,7 +176589,7 @@ func fts5ExprNodeNext_AND(tls *libc.TLS, pExpr uintptr, pNode uintptr, bFromVali
return rc
}
-func fts5ExprNodeTest_NOT(tls *libc.TLS, pExpr uintptr, pNode uintptr) int32 { /* sqlite3.c:217524:12: */
+func fts5ExprNodeTest_NOT(tls *libc.TLS, pExpr uintptr, pNode uintptr) int32 { /* sqlite3.c:218764:12: */
var rc int32 = SQLITE_OK
var p1 uintptr = *(*uintptr)(unsafe.Pointer((pNode + 48 /* &.apChild */)))
var p2 uintptr = *(*uintptr)(unsafe.Pointer((pNode + 48 /* &.apChild */) + 1*8))
@@ -168152,14 +176597,18 @@ func fts5ExprNodeTest_NOT(tls *libc.TLS, pExpr uintptr, pNode uintptr) int32 { /
for (rc == SQLITE_OK) && ((*Fts5ExprNode)(unsafe.Pointer(p1)).FbEof == 0) {
var cmp int32 = fts5NodeCompare(tls, pExpr, p1, p2)
if cmp > 0 {
- rc = (*(*func(*libc.TLS, uintptr, uintptr, int32, I64) int32)(unsafe.Pointer((p2 + 16 /* &.xNext */))))(tls, pExpr, p2, 1, (*Fts5ExprNode)(unsafe.Pointer(p1)).FiRowid)
+ rc = (*struct {
+ f func(*libc.TLS, uintptr, uintptr, int32, I64) int32
+ })(unsafe.Pointer(&struct{ uintptr }{(*Fts5ExprNode)(unsafe.Pointer((p2))).FxNext})).f(tls, pExpr, p2, 1, (*Fts5ExprNode)(unsafe.Pointer(p1)).FiRowid)
cmp = fts5NodeCompare(tls, pExpr, p1, p2)
}
if (cmp != 0) || ((*Fts5ExprNode)(unsafe.Pointer(p2)).FbNomatch != 0) {
break
}
- rc = (*(*func(*libc.TLS, uintptr, uintptr, int32, I64) int32)(unsafe.Pointer((p1 + 16 /* &.xNext */))))(tls, pExpr, p1, 0, int64(0))
+ rc = (*struct {
+ f func(*libc.TLS, uintptr, uintptr, int32, I64) int32
+ })(unsafe.Pointer(&struct{ uintptr }{(*Fts5ExprNode)(unsafe.Pointer((p1))).FxNext})).f(tls, pExpr, p1, 0, int64(0))
}
(*Fts5ExprNode)(unsafe.Pointer(pNode)).FbEof = (*Fts5ExprNode)(unsafe.Pointer(p1)).FbEof
(*Fts5ExprNode)(unsafe.Pointer(pNode)).FbNomatch = (*Fts5ExprNode)(unsafe.Pointer(p1)).FbNomatch
@@ -168170,8 +176619,10 @@ func fts5ExprNodeTest_NOT(tls *libc.TLS, pExpr uintptr, pNode uintptr) int32 { /
return rc
}
-func fts5ExprNodeNext_NOT(tls *libc.TLS, pExpr uintptr, pNode uintptr, bFromValid int32, iFrom I64) int32 { /* sqlite3.c:217552:12: */
- var rc int32 = (*(*func(*libc.TLS, uintptr, uintptr, int32, I64) int32)(unsafe.Pointer((*(*uintptr)(unsafe.Pointer((pNode + 48 /* &.apChild */))) + 16 /* &.xNext */))))(tls, pExpr, *(*uintptr)(unsafe.Pointer((pNode + 48 /* &.apChild */))), bFromValid, iFrom)
+func fts5ExprNodeNext_NOT(tls *libc.TLS, pExpr uintptr, pNode uintptr, bFromValid int32, iFrom I64) int32 { /* sqlite3.c:218792:12: */
+ var rc int32 = (*struct {
+ f func(*libc.TLS, uintptr, uintptr, int32, I64) int32
+ })(unsafe.Pointer(&struct{ uintptr }{(*Fts5ExprNode)(unsafe.Pointer((*(*uintptr)(unsafe.Pointer((pNode + 48 /* &.apChild */)))))).FxNext})).f(tls, pExpr, *(*uintptr)(unsafe.Pointer((pNode + 48 /* &.apChild */))), bFromValid, iFrom)
if rc == SQLITE_OK {
rc = fts5ExprNodeTest_NOT(tls, pExpr, pNode)
}
@@ -168184,7 +176635,7 @@ func fts5ExprNodeNext_NOT(tls *libc.TLS, pExpr uintptr, pNode uintptr, bFromVali
// If pNode currently points to a match, this function returns SQLITE_OK
// without modifying it. Otherwise, pNode is advanced until it does point
// to a match or EOF is reached.
-func fts5ExprNodeTest(tls *libc.TLS, pExpr uintptr, pNode uintptr) int32 { /* sqlite3.c:217573:12: */
+func fts5ExprNodeTest(tls *libc.TLS, pExpr uintptr, pNode uintptr) int32 { /* sqlite3.c:218813:12: */
var rc int32 = SQLITE_OK
if (*Fts5ExprNode)(unsafe.Pointer(pNode)).FbEof == 0 {
switch (*Fts5ExprNode)(unsafe.Pointer(pNode)).FeType {
@@ -168237,7 +176688,7 @@ func fts5ExprNodeTest(tls *libc.TLS, pExpr uintptr, pNode uintptr) int32 { /* sq
//
// Return an SQLite error code if an error occurs, or SQLITE_OK otherwise.
// It is not an error if there are no matches.
-func fts5ExprNodeFirst(tls *libc.TLS, pExpr uintptr, pNode uintptr) int32 { /* sqlite3.c:217618:12: */
+func fts5ExprNodeFirst(tls *libc.TLS, pExpr uintptr, pNode uintptr) int32 { /* sqlite3.c:218858:12: */
var rc int32 = SQLITE_OK
(*Fts5ExprNode)(unsafe.Pointer(pNode)).FbEof = 0
(*Fts5ExprNode)(unsafe.Pointer(pNode)).FbNomatch = 0
@@ -168299,7 +176750,7 @@ func fts5ExprNodeFirst(tls *libc.TLS, pExpr uintptr, pNode uintptr) int32 { /* s
//
// Return SQLITE_OK if successful, or an SQLite error code otherwise. It
// is not considered an error if the query does not match any documents.
-func sqlite3Fts5ExprFirst(tls *libc.TLS, p uintptr, pIdx uintptr, iFirst I64, bDesc int32) int32 { /* sqlite3.c:217677:12: */
+func sqlite3Fts5ExprFirst(tls *libc.TLS, p uintptr, pIdx uintptr, iFirst I64, bDesc int32) int32 { /* sqlite3.c:218917:12: */
var pRoot uintptr = (*Fts5Expr)(unsafe.Pointer(p)).FpRoot
var rc int32 // Return code
@@ -168312,13 +176763,17 @@ func sqlite3Fts5ExprFirst(tls *libc.TLS, p uintptr, pIdx uintptr, iFirst I64, bD
if ((rc == SQLITE_OK) &&
(0 == (*Fts5ExprNode)(unsafe.Pointer(pRoot)).FbEof)) &&
(fts5RowidCmp(tls, p, (*Fts5ExprNode)(unsafe.Pointer(pRoot)).FiRowid, iFirst) < 0) {
- rc = (*(*func(*libc.TLS, uintptr, uintptr, int32, I64) int32)(unsafe.Pointer((pRoot + 16 /* &.xNext */))))(tls, p, pRoot, 1, iFirst)
+ rc = (*struct {
+ f func(*libc.TLS, uintptr, uintptr, int32, I64) int32
+ })(unsafe.Pointer(&struct{ uintptr }{(*Fts5ExprNode)(unsafe.Pointer((pRoot))).FxNext})).f(tls, p, pRoot, 1, iFirst)
}
// If the iterator is not at a real match, skip forward until it is.
for ((*Fts5ExprNode)(unsafe.Pointer(pRoot)).FbNomatch != 0) && (rc == SQLITE_OK) {
- rc = (*(*func(*libc.TLS, uintptr, uintptr, int32, I64) int32)(unsafe.Pointer((pRoot + 16 /* &.xNext */))))(tls, p, pRoot, 0, int64(0))
+ rc = (*struct {
+ f func(*libc.TLS, uintptr, uintptr, int32, I64) int32
+ })(unsafe.Pointer(&struct{ uintptr }{(*Fts5ExprNode)(unsafe.Pointer((pRoot))).FxNext})).f(tls, p, pRoot, 0, int64(0))
}
return rc
}
@@ -168327,12 +176782,14 @@ func sqlite3Fts5ExprFirst(tls *libc.TLS, p uintptr, pIdx uintptr, iFirst I64, bD
//
// Return SQLITE_OK if successful, or an SQLite error code otherwise. It
// is not considered an error if the query does not match any documents.
-func sqlite3Fts5ExprNext(tls *libc.TLS, p uintptr, iLast I64) int32 { /* sqlite3.c:217708:12: */
+func sqlite3Fts5ExprNext(tls *libc.TLS, p uintptr, iLast I64) int32 { /* sqlite3.c:218948:12: */
var rc int32
var pRoot uintptr = (*Fts5Expr)(unsafe.Pointer(p)).FpRoot
for ok := true; ok; ok = (*Fts5ExprNode)(unsafe.Pointer(pRoot)).FbNomatch != 0 {
- rc = (*(*func(*libc.TLS, uintptr, uintptr, int32, I64) int32)(unsafe.Pointer((pRoot + 16 /* &.xNext */))))(tls, p, pRoot, 0, int64(0))
+ rc = (*struct {
+ f func(*libc.TLS, uintptr, uintptr, int32, I64) int32
+ })(unsafe.Pointer(&struct{ uintptr }{(*Fts5ExprNode)(unsafe.Pointer((pRoot))).FxNext})).f(tls, p, pRoot, 0, int64(0))
}
if fts5RowidCmp(tls, p, (*Fts5ExprNode)(unsafe.Pointer(pRoot)).FiRowid, iLast) > 0 {
@@ -168341,15 +176798,15 @@ func sqlite3Fts5ExprNext(tls *libc.TLS, p uintptr, iLast I64) int32 { /* sqlite3
return rc
}
-func sqlite3Fts5ExprEof(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:217722:12: */
+func sqlite3Fts5ExprEof(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:218962:12: */
return (*Fts5ExprNode)(unsafe.Pointer((*Fts5Expr)(unsafe.Pointer(p)).FpRoot)).FbEof
}
-func sqlite3Fts5ExprRowid(tls *libc.TLS, p uintptr) I64 { /* sqlite3.c:217726:12: */
+func sqlite3Fts5ExprRowid(tls *libc.TLS, p uintptr) I64 { /* sqlite3.c:218966:12: */
return (*Fts5ExprNode)(unsafe.Pointer((*Fts5Expr)(unsafe.Pointer(p)).FpRoot)).FiRowid
}
-func fts5ParseStringFromToken(tls *libc.TLS, pToken uintptr, pz uintptr) int32 { /* sqlite3.c:217730:12: */
+func fts5ParseStringFromToken(tls *libc.TLS, pToken uintptr, pz uintptr) int32 { /* sqlite3.c:218970:12: */
bp := tls.Alloc(4)
defer tls.Free(4)
@@ -168359,7 +176816,7 @@ func fts5ParseStringFromToken(tls *libc.TLS, pToken uintptr, pz uintptr) int32 {
}
// Free the phrase object passed as the only argument.
-func fts5ExprPhraseFree(tls *libc.TLS, pPhrase uintptr) { /* sqlite3.c:217739:13: */
+func fts5ExprPhraseFree(tls *libc.TLS, pPhrase uintptr) { /* sqlite3.c:218979:13: */
if pPhrase != 0 {
var i int32
for i = 0; i < (*Fts5ExprPhrase)(unsafe.Pointer(pPhrase)).FnTerm; i++ {
@@ -168384,7 +176841,7 @@ func fts5ExprPhraseFree(tls *libc.TLS, pPhrase uintptr) { /* sqlite3.c:217739:13
// Set the "bFirst" flag on the first token of the phrase passed as the
// only argument.
-func sqlite3Fts5ParseSetCaret(tls *libc.TLS, pPhrase uintptr) { /* sqlite3.c:217764:13: */
+func sqlite3Fts5ParseSetCaret(tls *libc.TLS, pPhrase uintptr) { /* sqlite3.c:219004:13: */
if (pPhrase != 0) && ((*Fts5ExprPhrase)(unsafe.Pointer(pPhrase)).FnTerm != 0) {
(*Fts5ExprTerm)(unsafe.Pointer((pPhrase + 32 /* &.aTerm */))).FbFirst = U8(1)
}
@@ -168396,7 +176853,7 @@ func sqlite3Fts5ParseSetCaret(tls *libc.TLS, pPhrase uintptr) { /* sqlite3.c:217
//
// If an OOM error occurs, both the pNear and pPhrase objects are freed and
// NULL returned.
-func sqlite3Fts5ParseNearset(tls *libc.TLS, pParse uintptr, pNear uintptr, pPhrase uintptr) uintptr { /* sqlite3.c:217778:24: */
+func sqlite3Fts5ParseNearset(tls *libc.TLS, pParse uintptr, pNear uintptr, pPhrase uintptr) uintptr { /* sqlite3.c:219018:24: */
var SZALLOC int32 = 8
var pRet uintptr = uintptr(0)
@@ -168453,15 +176910,15 @@ func sqlite3Fts5ParseNearset(tls *libc.TLS, pParse uintptr, pNear uintptr, pPhra
}
type TokenCtx1 = struct {
- FpPhrase uintptr
- Frc int32
- _ [4]byte
-} /* sqlite3.c:217838:9 */
+ FpPhrase uintptr
+ Frc int32
+ F__ccgo_pad1 [4]byte
+} /* sqlite3.c:219078:9 */
-type TokenCtx = TokenCtx1 /* sqlite3.c:217838:25 */
+type TokenCtx = TokenCtx1 /* sqlite3.c:219078:25 */
// Callback for tokenizing terms used by ParseTerm().
-func fts5ParseTokenize(tls *libc.TLS, pContext uintptr, tflags int32, pToken uintptr, nToken int32, iUnused1 int32, iUnused2 int32) int32 { /* sqlite3.c:217847:12: */
+func fts5ParseTokenize(tls *libc.TLS, pContext uintptr, tflags int32, pToken uintptr, nToken int32, iUnused1 int32, iUnused2 int32) int32 { /* sqlite3.c:219087:12: */
bp := tls.Alloc(4)
defer tls.Free(4)
@@ -168530,12 +176987,12 @@ func fts5ParseTokenize(tls *libc.TLS, pContext uintptr, tflags int32, pToken uin
}
// Free the phrase object passed as the only argument.
-func sqlite3Fts5ParsePhraseFree(tls *libc.TLS, pPhrase uintptr) { /* sqlite3.c:217912:13: */
+func sqlite3Fts5ParsePhraseFree(tls *libc.TLS, pPhrase uintptr) { /* sqlite3.c:219152:13: */
fts5ExprPhraseFree(tls, pPhrase)
}
// Free the phrase object passed as the second argument.
-func sqlite3Fts5ParseNearsetFree(tls *libc.TLS, pNear uintptr) { /* sqlite3.c:217919:13: */
+func sqlite3Fts5ParseNearsetFree(tls *libc.TLS, pNear uintptr) { /* sqlite3.c:219159:13: */
if pNear != 0 {
var i int32
for i = 0; i < (*Fts5ExprNearset)(unsafe.Pointer(pNear)).FnPhrase; i++ {
@@ -168546,12 +177003,12 @@ func sqlite3Fts5ParseNearsetFree(tls *libc.TLS, pNear uintptr) { /* sqlite3.c:21
}
}
-func sqlite3Fts5ParseFinished(tls *libc.TLS, pParse uintptr, p uintptr) { /* sqlite3.c:217930:13: */
+func sqlite3Fts5ParseFinished(tls *libc.TLS, pParse uintptr, p uintptr) { /* sqlite3.c:219170:13: */
(*Fts5Parse)(unsafe.Pointer(pParse)).FpExpr = p
}
-func parseGrowPhraseArray(tls *libc.TLS, pParse uintptr) int32 { /* sqlite3.c:217935:12: */
+func parseGrowPhraseArray(tls *libc.TLS, pParse uintptr) int32 { /* sqlite3.c:219175:12: */
if ((*Fts5Parse)(unsafe.Pointer(pParse)).FnPhrase % 8) == 0 {
var nByte Sqlite3_int64 = (Sqlite3_int64(uint64(unsafe.Sizeof(uintptr(0))) * (uint64((*Fts5Parse)(unsafe.Pointer(pParse)).FnPhrase + 8))))
var apNew uintptr
@@ -168568,7 +177025,7 @@ func parseGrowPhraseArray(tls *libc.TLS, pParse uintptr) int32 { /* sqlite3.c:21
// This function is called by the parser to process a string token. The
// string may or may not be quoted. In any case it is tokenized and a
// phrase object consisting of all tokens returned.
-func sqlite3Fts5ParseTerm(tls *libc.TLS, pParse uintptr, pAppend uintptr, pToken uintptr, bPrefix int32) uintptr { /* sqlite3.c:217954:23: */
+func sqlite3Fts5ParseTerm(tls *libc.TLS, pParse uintptr, pAppend uintptr, pToken uintptr, bPrefix int32) uintptr { /* sqlite3.c:219194:23: */
bp := tls.Alloc(24)
defer tls.Free(24)
@@ -168626,7 +177083,7 @@ func sqlite3Fts5ParseTerm(tls *libc.TLS, pParse uintptr, pAppend uintptr, pToken
// Create a new FTS5 expression by cloning phrase iPhrase of the
// expression passed as the second argument.
-func sqlite3Fts5ExprClonePhrase(tls *libc.TLS, pExpr uintptr, iPhrase int32, ppNew uintptr) int32 { /* sqlite3.c:218008:12: */
+func sqlite3Fts5ExprClonePhrase(tls *libc.TLS, pExpr uintptr, iPhrase int32, ppNew uintptr) int32 { /* sqlite3.c:219248:12: */
bp := tls.Alloc(24)
defer tls.Free(24)
@@ -168721,17 +177178,17 @@ func sqlite3Fts5ExprClonePhrase(tls *libc.TLS, pExpr uintptr, iPhrase int32, ppN
// Token pTok has appeared in a MATCH expression where the NEAR operator
// is expected. If token pTok does not contain "NEAR", store an error
// in the pParse object.
-func sqlite3Fts5ParseNear(tls *libc.TLS, pParse uintptr, pTok uintptr) { /* sqlite3.c:218104:13: */
+func sqlite3Fts5ParseNear(tls *libc.TLS, pParse uintptr, pTok uintptr) { /* sqlite3.c:219344:13: */
bp := tls.Alloc(16)
defer tls.Free(16)
- if ((*Fts5Token)(unsafe.Pointer(pTok)).Fn != 4) || (libc.Xmemcmp(tls, ts+31083 /* "NEAR" */, (*Fts5Token)(unsafe.Pointer(pTok)).Fp, uint64(4)) != 0) {
+ if ((*Fts5Token)(unsafe.Pointer(pTok)).Fn != 4) || (libc.Xmemcmp(tls, ts+32881 /* "NEAR" */, (*Fts5Token)(unsafe.Pointer(pTok)).Fp, uint64(4)) != 0) {
sqlite3Fts5ParseError(tls,
- pParse, ts+30112 /* "fts5: syntax err..." */, libc.VaList(bp, (*Fts5Token)(unsafe.Pointer(pTok)).Fn, (*Fts5Token)(unsafe.Pointer(pTok)).Fp))
+ pParse, ts+31910 /* "fts5: syntax err..." */, libc.VaList(bp, (*Fts5Token)(unsafe.Pointer(pTok)).Fn, (*Fts5Token)(unsafe.Pointer(pTok)).Fp))
}
}
-func sqlite3Fts5ParseSetDistance(tls *libc.TLS, pParse uintptr, pNear uintptr, p uintptr) { /* sqlite3.c:218112:13: */
+func sqlite3Fts5ParseSetDistance(tls *libc.TLS, pParse uintptr, pNear uintptr, p uintptr) { /* sqlite3.c:219352:13: */
bp := tls.Alloc(16)
defer tls.Free(16)
@@ -168740,13 +177197,13 @@ func sqlite3Fts5ParseSetDistance(tls *libc.TLS, pParse uintptr, pNear uintptr, p
var i int32
if (*Fts5Token)(unsafe.Pointer(p)).Fn != 0 {
for i = 0; i < (*Fts5Token)(unsafe.Pointer(p)).Fn; i++ {
- var c int8 = *(*int8)(unsafe.Pointer((*Fts5Token)(unsafe.Pointer(p)).Fp + uintptr(i)))
+ var c uint8 = *(*uint8)(unsafe.Pointer((*Fts5Token)(unsafe.Pointer(p)).Fp + uintptr(i)))
if (int32(c) < '0') || (int32(c) > '9') {
sqlite3Fts5ParseError(tls,
- pParse, ts+31088 /* "expected integer..." */, libc.VaList(bp, (*Fts5Token)(unsafe.Pointer(p)).Fn, (*Fts5Token)(unsafe.Pointer(p)).Fp))
+ pParse, ts+32886 /* "expected integer..." */, libc.VaList(bp, (*Fts5Token)(unsafe.Pointer(p)).Fn, (*Fts5Token)(unsafe.Pointer(p)).Fp))
return
}
- nNear = ((nNear * 10) + (int32(*(*int8)(unsafe.Pointer((*Fts5Token)(unsafe.Pointer(p)).Fp + uintptr(i)))) - '0'))
+ nNear = ((nNear * 10) + (int32(*(*uint8)(unsafe.Pointer((*Fts5Token)(unsafe.Pointer(p)).Fp + uintptr(i)))) - '0'))
}
} else {
nNear = FTS5_DEFAULT_NEARDIST
@@ -168762,7 +177219,7 @@ func sqlite3Fts5ParseSetDistance(tls *libc.TLS, pParse uintptr, pNear uintptr, p
//
// If an OOM error occurs, store an error code in pParse and return NULL.
// The old colset object (if any) is not freed in this case.
-func fts5ParseColset(tls *libc.TLS, pParse uintptr, p uintptr, iCol int32) uintptr { /* sqlite3.c:218147:19: */
+func fts5ParseColset(tls *libc.TLS, pParse uintptr, p uintptr, iCol int32) uintptr { /* sqlite3.c:219387:19: */
var nCol int32
if p != 0 {
nCol = (*Fts5Colset)(unsafe.Pointer(p)).FnCol
@@ -168800,7 +177257,7 @@ func fts5ParseColset(tls *libc.TLS, pParse uintptr, p uintptr, iCol int32) uintp
// Allocate and return an Fts5Colset object specifying the inverse of
// the colset passed as the second argument. Free the colset passed
// as the second argument before returning.
-func sqlite3Fts5ParseColsetInvert(tls *libc.TLS, pParse uintptr, p uintptr) uintptr { /* sqlite3.c:218188:19: */
+func sqlite3Fts5ParseColsetInvert(tls *libc.TLS, pParse uintptr, p uintptr) uintptr { /* sqlite3.c:219428:19: */
var pRet uintptr
var nCol int32 = (*Fts5Config)(unsafe.Pointer((*Fts5Parse)(unsafe.Pointer(pParse)).FpConfig)).FnCol
@@ -168822,7 +177279,7 @@ func sqlite3Fts5ParseColsetInvert(tls *libc.TLS, pParse uintptr, p uintptr) uint
return pRet
}
-func sqlite3Fts5ParseColset(tls *libc.TLS, pParse uintptr, pColset uintptr, p uintptr) uintptr { /* sqlite3.c:218211:19: */
+func sqlite3Fts5ParseColset(tls *libc.TLS, pParse uintptr, pColset uintptr, p uintptr) uintptr { /* sqlite3.c:219451:19: */
bp := tls.Alloc(8)
defer tls.Free(8)
@@ -168840,7 +177297,7 @@ func sqlite3Fts5ParseColset(tls *libc.TLS, pParse uintptr, pColset uintptr, p ui
}
}
if iCol == (*Fts5Config)(unsafe.Pointer(pConfig)).FnCol {
- sqlite3Fts5ParseError(tls, pParse, ts+18396 /* "no such column: ..." */, libc.VaList(bp, z))
+ sqlite3Fts5ParseError(tls, pParse, ts+18880 /* "no such column: ..." */, libc.VaList(bp, z))
} else {
pRet = fts5ParseColset(tls, pParse, pColset, iCol)
}
@@ -168861,7 +177318,7 @@ func sqlite3Fts5ParseColset(tls *libc.TLS, pParse uintptr, pColset uintptr, p ui
// Otherwise, a copy of (*pOrig) is made into memory obtained from
// sqlite3Fts5MallocZero() and a pointer to it returned. If the allocation
// fails, (*pRc) is set to SQLITE_NOMEM and NULL is returned.
-func fts5CloneColset(tls *libc.TLS, pRc uintptr, pOrig uintptr) uintptr { /* sqlite3.c:218251:19: */
+func fts5CloneColset(tls *libc.TLS, pRc uintptr, pOrig uintptr) uintptr { /* sqlite3.c:219491:19: */
var pRet uintptr
if pOrig != 0 {
var nByte Sqlite3_int64 = (Sqlite3_int64(uint64(unsafe.Sizeof(Fts5Colset{})) + ((uint64((*Fts5Colset)(unsafe.Pointer(pOrig)).FnCol - 1)) * uint64(unsafe.Sizeof(int32(0))))))
@@ -168876,7 +177333,7 @@ func fts5CloneColset(tls *libc.TLS, pRc uintptr, pOrig uintptr) uintptr { /* sql
}
// Remove from colset pColset any columns that are not also in colset pMerge.
-func fts5MergeColset(tls *libc.TLS, pColset uintptr, pMerge uintptr) { /* sqlite3.c:218268:13: */
+func fts5MergeColset(tls *libc.TLS, pColset uintptr, pMerge uintptr) { /* sqlite3.c:219508:13: */
var iIn int32 = 0 // Next input in pColset
var iMerge int32 = 0 // Next input in pMerge
var iOut int32 = 0 // Next output slot in pColset
@@ -168900,7 +177357,7 @@ func fts5MergeColset(tls *libc.TLS, pColset uintptr, pMerge uintptr) { /* sqlite
// its decendents. If (*ppFree) is not NULL, it contains a spare copy
// of pColset. This function may use the spare copy and set (*ppFree) to
// zero, or it may create copies of pColset using fts5CloneColset().
-func fts5ParseSetColset(tls *libc.TLS, pParse uintptr, pNode uintptr, pColset uintptr, ppFree uintptr) { /* sqlite3.c:218294:13: */
+func fts5ParseSetColset(tls *libc.TLS, pParse uintptr, pNode uintptr, pColset uintptr, ppFree uintptr) { /* sqlite3.c:219534:13: */
if (*Fts5Parse)(unsafe.Pointer(pParse)).Frc == SQLITE_OK {
if ((*Fts5ExprNode)(unsafe.Pointer(pNode)).FeType == FTS5_STRING) || ((*Fts5ExprNode)(unsafe.Pointer(pNode)).FeType == FTS5_TERM) {
@@ -168928,7 +177385,7 @@ func fts5ParseSetColset(tls *libc.TLS, pParse uintptr, pNode uintptr, pColset ui
}
// Apply colset pColset to expression node pExpr and all of its descendents.
-func sqlite3Fts5ParseSetColset(tls *libc.TLS, pParse uintptr, pExpr uintptr, pColset uintptr) { /* sqlite3.c:218332:13: */
+func sqlite3Fts5ParseSetColset(tls *libc.TLS, pParse uintptr, pExpr uintptr, pColset uintptr) { /* sqlite3.c:219572:13: */
bp := tls.Alloc(8)
defer tls.Free(8)
@@ -168936,14 +177393,14 @@ func sqlite3Fts5ParseSetColset(tls *libc.TLS, pParse uintptr, pExpr uintptr, pCo
if (*Fts5Config)(unsafe.Pointer((*Fts5Parse)(unsafe.Pointer(pParse)).FpConfig)).FeDetail == FTS5_DETAIL_NONE {
(*Fts5Parse)(unsafe.Pointer(pParse)).Frc = SQLITE_ERROR
(*Fts5Parse)(unsafe.Pointer(pParse)).FzErr = Xsqlite3_mprintf(tls,
- ts+31117 /* "fts5: column que..." */, 0)
+ ts+32915 /* "fts5: column que..." */, 0)
} else {
fts5ParseSetColset(tls, pParse, pExpr, pColset, bp /* &pFree */)
}
Xsqlite3_free(tls, *(*uintptr)(unsafe.Pointer(bp /* pFree */)))
}
-func fts5ExprAssignXNext(tls *libc.TLS, pNode uintptr) { /* sqlite3.c:218349:13: */
+func fts5ExprAssignXNext(tls *libc.TLS, pNode uintptr) { /* sqlite3.c:219589:13: */
switch (*Fts5ExprNode)(unsafe.Pointer(pNode)).FeType {
case FTS5_STRING:
{
@@ -168994,7 +177451,7 @@ func fts5ExprAssignXNext(tls *libc.TLS, pNode uintptr) { /* sqlite3.c:218349:13:
}
}
-func fts5ExprAddChildren(tls *libc.TLS, p uintptr, pSub uintptr) { /* sqlite3.c:218382:13: */
+func fts5ExprAddChildren(tls *libc.TLS, p uintptr, pSub uintptr) { /* sqlite3.c:219622:13: */
if ((*Fts5ExprNode)(unsafe.Pointer(p)).FeType != FTS5_NOT) && ((*Fts5ExprNode)(unsafe.Pointer(pSub)).FeType == (*Fts5ExprNode)(unsafe.Pointer(p)).FeType) {
var nByte int32 = (int32(uint64(unsafe.Sizeof(uintptr(0))) * uint64((*Fts5ExprNode)(unsafe.Pointer(pSub)).FnChild)))
libc.Xmemcpy(tls, ((p + 48 /* &.apChild */) + uintptr((*Fts5ExprNode)(unsafe.Pointer(p)).FnChild)*8), pSub+48 /* &.apChild */, uint64(nByte))
@@ -169014,7 +177471,7 @@ func fts5ExprAddChildren(tls *libc.TLS, p uintptr, pSub uintptr) { /* sqlite3.c:
// into an AND tree:
//
// abc AND def AND ghi
-func fts5ParsePhraseToAnd(tls *libc.TLS, pParse uintptr, pNear uintptr) uintptr { /* sqlite3.c:218404:21: */
+func fts5ParsePhraseToAnd(tls *libc.TLS, pParse uintptr, pNear uintptr) uintptr { /* sqlite3.c:219644:21: */
var nTerm int32 = (*Fts5ExprPhrase)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer((pNear + 24 /* &.apPhrase */))))).FnTerm
var ii int32
var nByte int32
@@ -169057,7 +177514,7 @@ func fts5ParsePhraseToAnd(tls *libc.TLS, pParse uintptr, pNear uintptr) uintptr
// Allocate and return a new expression object. If anything goes wrong (i.e.
// OOM error), leave an error code in pParse and return NULL.
-func sqlite3Fts5ParseNode(tls *libc.TLS, pParse uintptr, eType int32, pLeft uintptr, pRight uintptr, pNear uintptr) uintptr { /* sqlite3.c:218458:21: */
+func sqlite3Fts5ParseNode(tls *libc.TLS, pParse uintptr, eType int32, pLeft uintptr, pRight uintptr, pNear uintptr) uintptr { /* sqlite3.c:219698:21: */
bp := tls.Alloc(8)
defer tls.Free(8)
@@ -169120,12 +177577,12 @@ func sqlite3Fts5ParseNode(tls *libc.TLS, pParse uintptr, eType int32, pLeft uint
(*Fts5Parse)(unsafe.Pointer(pParse)).Frc = SQLITE_ERROR
(*Fts5Parse)(unsafe.Pointer(pParse)).FzErr = Xsqlite3_mprintf(tls,
- ts+31170, /* "fts5: %s queries..." */
+ ts+32968, /* "fts5: %s queries..." */
libc.VaList(bp, func() uintptr {
if (*Fts5ExprNearset)(unsafe.Pointer(pNear)).FnPhrase == 1 {
- return ts + 31220 /* "phrase" */
+ return ts + 33018 /* "phrase" */
}
- return ts + 31083 /* "NEAR" */
+ return ts + 32881 /* "NEAR" */
}()))
Xsqlite3_free(tls, pRet)
pRet = uintptr(0)
@@ -169148,7 +177605,7 @@ func sqlite3Fts5ParseNode(tls *libc.TLS, pParse uintptr, eType int32, pLeft uint
return pRet
}
-func sqlite3Fts5ParseImplicitAnd(tls *libc.TLS, pParse uintptr, pLeft uintptr, pRight uintptr) uintptr { /* sqlite3.c:218543:21: */
+func sqlite3Fts5ParseImplicitAnd(tls *libc.TLS, pParse uintptr, pLeft uintptr, pRight uintptr) uintptr { /* sqlite3.c:219783:21: */
var pRet uintptr = uintptr(0)
var pPrev uintptr
@@ -169192,470 +177649,12 @@ func sqlite3Fts5ParseImplicitAnd(tls *libc.TLS, pParse uintptr, pLeft uintptr, p
return pRet
}
-func fts5ExprTermPrint(tls *libc.TLS, pTerm uintptr) uintptr { /* sqlite3.c:218607:13: */
- var nByte Sqlite3_int64 = int64(0)
- var p uintptr
- var zQuoted uintptr
-
- // Determine the maximum amount of space required.
- for p = pTerm; p != 0; p = (*Fts5ExprTerm)(unsafe.Pointer(p)).FpSynonym {
- nByte = nByte + (Sqlite3_int64(((int32(libc.Xstrlen(tls, (*Fts5ExprTerm)(unsafe.Pointer(pTerm)).FzTerm)) * 2) + 3) + 2))
- }
- zQuoted = Xsqlite3_malloc64(tls, uint64(nByte))
-
- if zQuoted != 0 {
- var i int32 = 0
- for p = pTerm; p != 0; p = (*Fts5ExprTerm)(unsafe.Pointer(p)).FpSynonym {
- var zIn uintptr = (*Fts5ExprTerm)(unsafe.Pointer(p)).FzTerm
- *(*int8)(unsafe.Pointer(zQuoted + uintptr(libc.PostIncInt32(&i, 1)))) = int8('"')
- for *(*int8)(unsafe.Pointer(zIn)) != 0 {
- if int32(*(*int8)(unsafe.Pointer(zIn))) == '"' {
- *(*int8)(unsafe.Pointer(zQuoted + uintptr(libc.PostIncInt32(&i, 1)))) = int8('"')
- }
- *(*int8)(unsafe.Pointer(zQuoted + uintptr(libc.PostIncInt32(&i, 1)))) = *(*int8)(unsafe.Pointer(libc.PostIncUintptr(&zIn, 1)))
- }
- *(*int8)(unsafe.Pointer(zQuoted + uintptr(libc.PostIncInt32(&i, 1)))) = int8('"')
- if (*Fts5ExprTerm)(unsafe.Pointer(p)).FpSynonym != 0 {
- *(*int8)(unsafe.Pointer(zQuoted + uintptr(libc.PostIncInt32(&i, 1)))) = int8('|')
- }
- }
- if (*Fts5ExprTerm)(unsafe.Pointer(pTerm)).FbPrefix != 0 {
- *(*int8)(unsafe.Pointer(zQuoted + uintptr(libc.PostIncInt32(&i, 1)))) = int8(' ')
- *(*int8)(unsafe.Pointer(zQuoted + uintptr(libc.PostIncInt32(&i, 1)))) = int8('*')
- }
- *(*int8)(unsafe.Pointer(zQuoted + uintptr(libc.PostIncInt32(&i, 1)))) = int8(0)
- }
- return zQuoted
-}
-
-func fts5PrintfAppend(tls *libc.TLS, zApp uintptr, zFmt uintptr, va uintptr) uintptr { /* sqlite3.c:218639:13: */
- bp := tls.Alloc(16)
- defer tls.Free(16)
-
- var zNew uintptr
- var ap Va_list
- _ = ap
- ap = va
- zNew = Xsqlite3_vmprintf(tls, zFmt, ap)
- _ = ap
- if (zApp != 0) && (zNew != 0) {
- var zNew2 uintptr = Xsqlite3_mprintf(tls, ts+3912 /* "%s%s" */, libc.VaList(bp, zApp, zNew))
- Xsqlite3_free(tls, zNew)
- zNew = zNew2
- }
- Xsqlite3_free(tls, zApp)
- return zNew
-}
-
-// Compose a tcl-readable representation of expression pExpr. Return a
-// pointer to a buffer containing that representation. It is the
-// responsibility of the caller to at some point free the buffer using
-// sqlite3_free().
-func fts5ExprPrintTcl(tls *libc.TLS, pConfig uintptr, zNearsetCmd uintptr, pExpr uintptr) uintptr { /* sqlite3.c:218660:13: */
- bp := tls.Alloc(72)
- defer tls.Free(72)
-
- var zRet uintptr = uintptr(0)
- if ((*Fts5ExprNode)(unsafe.Pointer(pExpr)).FeType == FTS5_STRING) || ((*Fts5ExprNode)(unsafe.Pointer(pExpr)).FeType == FTS5_TERM) {
- var pNear uintptr = (*Fts5ExprNode)(unsafe.Pointer(pExpr)).FpNear
- var i int32
- var iTerm int32
-
- zRet = fts5PrintfAppend(tls, zRet, ts+31227 /* "%s " */, libc.VaList(bp, zNearsetCmd))
- if zRet == uintptr(0) {
- return uintptr(0)
- }
- if (*Fts5ExprNearset)(unsafe.Pointer(pNear)).FpColset != 0 {
- var aiCol uintptr = (*Fts5ExprNearset)(unsafe.Pointer(pNear)).FpColset + 4 /* &.aiCol */
- var nCol int32 = (*Fts5Colset)(unsafe.Pointer((*Fts5ExprNearset)(unsafe.Pointer(pNear)).FpColset)).FnCol
- if nCol == 1 {
- zRet = fts5PrintfAppend(tls, zRet, ts+31231 /* "-col %d " */, libc.VaList(bp+8, *(*int32)(unsafe.Pointer(aiCol))))
- } else {
- zRet = fts5PrintfAppend(tls, zRet, ts+31240 /* "-col {%d" */, libc.VaList(bp+16, *(*int32)(unsafe.Pointer(aiCol))))
- for i = 1; i < (*Fts5Colset)(unsafe.Pointer((*Fts5ExprNearset)(unsafe.Pointer(pNear)).FpColset)).FnCol; i++ {
- zRet = fts5PrintfAppend(tls, zRet, ts+31249 /* " %d" */, libc.VaList(bp+24, *(*int32)(unsafe.Pointer(aiCol + uintptr(i)*4))))
- }
- zRet = fts5PrintfAppend(tls, zRet, ts+31253 /* "} " */, 0)
- }
- if zRet == uintptr(0) {
- return uintptr(0)
- }
- }
-
- if (*Fts5ExprNearset)(unsafe.Pointer(pNear)).FnPhrase > 1 {
- zRet = fts5PrintfAppend(tls, zRet, ts+31256 /* "-near %d " */, libc.VaList(bp+32, (*Fts5ExprNearset)(unsafe.Pointer(pNear)).FnNear))
- if zRet == uintptr(0) {
- return uintptr(0)
- }
- }
-
- zRet = fts5PrintfAppend(tls, zRet, ts+31266 /* "--" */, 0)
- if zRet == uintptr(0) {
- return uintptr(0)
- }
-
- for i = 0; i < (*Fts5ExprNearset)(unsafe.Pointer(pNear)).FnPhrase; i++ {
- var pPhrase uintptr = *(*uintptr)(unsafe.Pointer((pNear + 24 /* &.apPhrase */) + uintptr(i)*8))
-
- zRet = fts5PrintfAppend(tls, zRet, ts+31269 /* " {" */, 0)
- for iTerm = 0; (zRet != 0) && (iTerm < (*Fts5ExprPhrase)(unsafe.Pointer(pPhrase)).FnTerm); iTerm++ {
- var zTerm uintptr = (*Fts5ExprTerm)(unsafe.Pointer((pPhrase + 32 /* &.aTerm */) + uintptr(iTerm)*32)).FzTerm
- zRet = fts5PrintfAppend(tls, zRet, ts+3912 /* "%s%s" */, libc.VaList(bp+40, func() uintptr {
- if iTerm == 0 {
- return ts + 703 /* "" */
- }
- return ts + 9222 /* " " */
- }(), zTerm))
- if (*Fts5ExprTerm)(unsafe.Pointer((pPhrase+32 /* &.aTerm */)+uintptr(iTerm)*32)).FbPrefix != 0 {
- zRet = fts5PrintfAppend(tls, zRet, ts+17391 /* "*" */, 0)
- }
- }
-
- if zRet != 0 {
- zRet = fts5PrintfAppend(tls, zRet, ts+24464 /* "}" */, 0)
- }
- if zRet == uintptr(0) {
- return uintptr(0)
- }
- }
-
- } else {
- var zOp uintptr = uintptr(0)
- var i int32
- switch (*Fts5ExprNode)(unsafe.Pointer(pExpr)).FeType {
- case FTS5_AND:
- zOp = ts + 27825 /* "AND" */
- break
- fallthrough
- case FTS5_NOT:
- zOp = ts + 31079 /* "NOT" */
- break
- fallthrough
- default:
-
- zOp = ts + 31076 /* "OR" */
- break
- }
-
- zRet = Xsqlite3_mprintf(tls, ts+2718 /* "%s" */, libc.VaList(bp+56, zOp))
- for i = 0; (zRet != 0) && (i < (*Fts5ExprNode)(unsafe.Pointer(pExpr)).FnChild); i++ {
- var z uintptr = fts5ExprPrintTcl(tls, pConfig, zNearsetCmd, *(*uintptr)(unsafe.Pointer((pExpr + 48 /* &.apChild */) + uintptr(i)*8)))
- if !(z != 0) {
- Xsqlite3_free(tls, zRet)
- zRet = uintptr(0)
- } else {
- zRet = fts5PrintfAppend(tls, zRet, ts+31272 /* " [%z]" */, libc.VaList(bp+64, z))
- }
- }
- }
-
- return zRet
-}
-
-func fts5ExprPrint(tls *libc.TLS, pConfig uintptr, pExpr uintptr) uintptr { /* sqlite3.c:218739:13: */
- bp := tls.Alloc(80)
- defer tls.Free(80)
-
- var zRet uintptr = uintptr(0)
- if (*Fts5ExprNode)(unsafe.Pointer(pExpr)).FeType == 0 {
- return Xsqlite3_mprintf(tls, ts+31278 /* "\"\"" */, 0)
- } else if ((*Fts5ExprNode)(unsafe.Pointer(pExpr)).FeType == FTS5_STRING) || ((*Fts5ExprNode)(unsafe.Pointer(pExpr)).FeType == FTS5_TERM) {
- var pNear uintptr = (*Fts5ExprNode)(unsafe.Pointer(pExpr)).FpNear
- var i int32
- var iTerm int32
-
- if (*Fts5ExprNearset)(unsafe.Pointer(pNear)).FpColset != 0 {
- var ii int32
- var pColset uintptr = (*Fts5ExprNearset)(unsafe.Pointer(pNear)).FpColset
- if (*Fts5Colset)(unsafe.Pointer(pColset)).FnCol > 1 {
- zRet = fts5PrintfAppend(tls, zRet, ts+31281 /* "{" */, 0)
- }
- for ii = 0; ii < (*Fts5Colset)(unsafe.Pointer(pColset)).FnCol; ii++ {
- zRet = fts5PrintfAppend(tls, zRet, ts+3912, /* "%s%s" */
- libc.VaList(bp, *(*uintptr)(unsafe.Pointer((*Fts5Config)(unsafe.Pointer(pConfig)).FazCol + uintptr(*(*int32)(unsafe.Pointer((pColset + 4 /* &.aiCol */) + uintptr(ii)*4)))*8)), func() uintptr {
- if ii == ((*Fts5Colset)(unsafe.Pointer(pColset)).FnCol - 1) {
- return ts + 703 /* "" */
- }
- return ts + 9222 /* " " */
- }()))
- }
- if zRet != 0 {
- zRet = fts5PrintfAppend(tls, zRet, ts+31283 /* "%s : " */, libc.VaList(bp+16, func() uintptr {
- if (*Fts5Colset)(unsafe.Pointer(pColset)).FnCol > 1 {
- return ts + 24464 /* "}" */
- }
- return ts + 703 /* "" */
- }()))
- }
- if zRet == uintptr(0) {
- return uintptr(0)
- }
- }
-
- if (*Fts5ExprNearset)(unsafe.Pointer(pNear)).FnPhrase > 1 {
- zRet = fts5PrintfAppend(tls, zRet, ts+31289 /* "NEAR(" */, 0)
- if zRet == uintptr(0) {
- return uintptr(0)
- }
- }
-
- for i = 0; i < (*Fts5ExprNearset)(unsafe.Pointer(pNear)).FnPhrase; i++ {
- var pPhrase uintptr = *(*uintptr)(unsafe.Pointer((pNear + 24 /* &.apPhrase */) + uintptr(i)*8))
- if i != 0 {
- zRet = fts5PrintfAppend(tls, zRet, ts+9222 /* " " */, 0)
- if zRet == uintptr(0) {
- return uintptr(0)
- }
- }
- for iTerm = 0; iTerm < (*Fts5ExprPhrase)(unsafe.Pointer(pPhrase)).FnTerm; iTerm++ {
- var zTerm uintptr = fts5ExprTermPrint(tls, ((pPhrase + 32 /* &.aTerm */) + uintptr(iTerm)*32))
- if zTerm != 0 {
- zRet = fts5PrintfAppend(tls, zRet, ts+3912 /* "%s%s" */, libc.VaList(bp+24, func() uintptr {
- if iTerm == 0 {
- return ts + 703 /* "" */
- }
- return ts + 31295 /* " + " */
- }(), zTerm))
- Xsqlite3_free(tls, zTerm)
- }
- if (zTerm == uintptr(0)) || (zRet == uintptr(0)) {
- Xsqlite3_free(tls, zRet)
- return uintptr(0)
- }
- }
- }
-
- if (*Fts5ExprNearset)(unsafe.Pointer(pNear)).FnPhrase > 1 {
- zRet = fts5PrintfAppend(tls, zRet, ts+31299 /* ", %d)" */, libc.VaList(bp+40, (*Fts5ExprNearset)(unsafe.Pointer(pNear)).FnNear))
- if zRet == uintptr(0) {
- return uintptr(0)
- }
- }
-
- } else {
- var zOp uintptr = uintptr(0)
- var i int32
-
- switch (*Fts5ExprNode)(unsafe.Pointer(pExpr)).FeType {
- case FTS5_AND:
- zOp = ts + 19393 /* " AND " */
- break
- fallthrough
- case FTS5_NOT:
- zOp = ts + 31305 /* " NOT " */
- break
- fallthrough
- default:
-
- zOp = ts + 31311 /* " OR " */
- break
- }
-
- for i = 0; i < (*Fts5ExprNode)(unsafe.Pointer(pExpr)).FnChild; i++ {
- var z uintptr = fts5ExprPrint(tls, pConfig, *(*uintptr)(unsafe.Pointer((pExpr + 48 /* &.apChild */) + uintptr(i)*8)))
- if z == uintptr(0) {
- Xsqlite3_free(tls, zRet)
- zRet = uintptr(0)
- } else {
- var e int32 = (*Fts5ExprNode)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer((pExpr + 48 /* &.apChild */) + uintptr(i)*8)))).FeType
- var b int32 = (libc.Bool32(((e != FTS5_STRING) && (e != FTS5_TERM)) && (e != FTS5_EOF)))
- zRet = fts5PrintfAppend(tls, zRet, ts+31316, /* "%s%s%z%s" */
- libc.VaList(bp+48, func() uintptr {
- if i == 0 {
- return ts + 703 /* "" */
- }
- return zOp
- }(),
- func() uintptr {
- if b != 0 {
- return ts + 19399 /* "(" */
- }
- return ts + 703 /* "" */
- }(), z, func() uintptr {
- if b != 0 {
- return ts + 3935 /* ")" */
- }
- return ts + 703 /* "" */
- }()))
- }
- if zRet == uintptr(0) {
- break
- }
- }
- }
-
- return zRet
-}
-
-// The implementation of user-defined scalar functions fts5_expr() (bTcl==0)
-// and fts5_expr_tcl() (bTcl!=0).
-func fts5ExprFunction(tls *libc.TLS, pCtx uintptr, nArg int32, apVal uintptr, bTcl int32) { /* sqlite3.c:218830:13: */
- bp := tls.Alloc(32)
- defer tls.Free(32)
-
- var pGlobal uintptr = Xsqlite3_user_data(tls, pCtx)
- var db uintptr = Xsqlite3_context_db_handle(tls, pCtx)
- var zExpr uintptr = uintptr(0)
- *(*uintptr)(unsafe.Pointer(bp + 16 /* zErr */)) = uintptr(0)
- *(*uintptr)(unsafe.Pointer(bp + 24 /* pExpr */)) = uintptr(0)
- var rc int32
- var i int32
- var azConfig uintptr // Array of arguments for Fts5Config
- var zNearsetCmd uintptr = ts + 31325 /* "nearset" */
- var nConfig int32 // Size of azConfig[]
- *(*uintptr)(unsafe.Pointer(bp + 8 /* pConfig */)) = uintptr(0)
- var iArg int32 = 1
-
- if nArg < 1 {
- *(*uintptr)(unsafe.Pointer(bp + 16 /* zErr */)) = Xsqlite3_mprintf(tls, ts+31333, /* "wrong number of ..." */
- libc.VaList(bp, func() uintptr {
- if bTcl != 0 {
- return ts + 31374 /* "fts5_expr_tcl" */
- }
- return ts + 31388 /* "fts5_expr" */
- }()))
- Xsqlite3_result_error(tls, pCtx, *(*uintptr)(unsafe.Pointer(bp + 16 /* zErr */)), -1)
- Xsqlite3_free(tls, *(*uintptr)(unsafe.Pointer(bp + 16 /* zErr */)))
- return
- }
-
- if (bTcl != 0) && (nArg > 1) {
- zNearsetCmd = Xsqlite3_value_text(tls, *(*uintptr)(unsafe.Pointer(apVal + 1*8)))
- iArg = 2
- }
-
- nConfig = (3 + (nArg - iArg))
- azConfig = Xsqlite3_malloc64(tls, (uint64(uint64(unsafe.Sizeof(uintptr(0))) * uint64(nConfig))))
- if azConfig == uintptr(0) {
- Xsqlite3_result_error_nomem(tls, pCtx)
- return
- }
- *(*uintptr)(unsafe.Pointer(azConfig)) = uintptr(0)
- *(*uintptr)(unsafe.Pointer(azConfig + 1*8)) = ts + 5327 /* "main" */
- *(*uintptr)(unsafe.Pointer(azConfig + 2*8)) = ts + 9757 /* "tbl" */
- for i = 3; iArg < nArg; iArg++ {
- var z uintptr = Xsqlite3_value_text(tls, *(*uintptr)(unsafe.Pointer(apVal + uintptr(iArg)*8)))
- *(*uintptr)(unsafe.Pointer(azConfig + uintptr(libc.PostIncInt32(&i, 1))*8)) = func() uintptr {
- if z != 0 {
- return z
- }
- return ts + 703 /* "" */
- }()
- }
-
- zExpr = Xsqlite3_value_text(tls, *(*uintptr)(unsafe.Pointer(apVal)))
- if zExpr == uintptr(0) {
- zExpr = ts + 703 /* "" */
- }
-
- rc = sqlite3Fts5ConfigParse(tls, pGlobal, db, nConfig, azConfig, bp+8 /* &pConfig */, bp+16 /* &zErr */)
- if rc == SQLITE_OK {
- rc = sqlite3Fts5ExprNew(tls, *(*uintptr)(unsafe.Pointer(bp + 8 /* pConfig */)), 0, (*Fts5Config)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 8 /* pConfig */)))).FnCol, zExpr, bp+24 /* &pExpr */, bp+16 /* &zErr */)
- }
- if rc == SQLITE_OK {
- var zText uintptr
- if (*Fts5ExprNode)(unsafe.Pointer((*Fts5Expr)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 24 /* pExpr */)))).FpRoot)).FxNext == uintptr(0) {
- zText = Xsqlite3_mprintf(tls, ts+703 /* "" */, 0)
- } else if bTcl != 0 {
- zText = fts5ExprPrintTcl(tls, *(*uintptr)(unsafe.Pointer(bp + 8 /* pConfig */)), zNearsetCmd, (*Fts5Expr)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 24 /* pExpr */)))).FpRoot)
- } else {
- zText = fts5ExprPrint(tls, *(*uintptr)(unsafe.Pointer(bp + 8 /* pConfig */)), (*Fts5Expr)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 24 /* pExpr */)))).FpRoot)
- }
- if zText == uintptr(0) {
- rc = SQLITE_NOMEM
- } else {
- Xsqlite3_result_text(tls, pCtx, zText, -1, libc.UintptrFromInt32(-1))
- Xsqlite3_free(tls, zText)
- }
- }
-
- if rc != SQLITE_OK {
- if *(*uintptr)(unsafe.Pointer(bp + 16 /* zErr */)) != 0 {
- Xsqlite3_result_error(tls, pCtx, *(*uintptr)(unsafe.Pointer(bp + 16 /* zErr */)), -1)
- Xsqlite3_free(tls, *(*uintptr)(unsafe.Pointer(bp + 16 /* zErr */)))
- } else {
- Xsqlite3_result_error_code(tls, pCtx, rc)
- }
- }
- Xsqlite3_free(tls, azConfig)
- sqlite3Fts5ConfigFree(tls, *(*uintptr)(unsafe.Pointer(bp + 8 /* pConfig */)))
- sqlite3Fts5ExprFree(tls, *(*uintptr)(unsafe.Pointer(bp + 24 /* pExpr */)))
-}
-
-func fts5ExprFunctionHr(tls *libc.TLS, pCtx uintptr, nArg int32, apVal uintptr) { /* sqlite3.c:218915:13: */
- fts5ExprFunction(tls, pCtx, nArg, apVal, 0)
-}
-
-func fts5ExprFunctionTcl(tls *libc.TLS, pCtx uintptr, nArg int32, apVal uintptr) { /* sqlite3.c:218922:13: */
- fts5ExprFunction(tls, pCtx, nArg, apVal, 1)
-}
-
-// The implementation of an SQLite user-defined-function that accepts a
-// single integer as an argument. If the integer is an alpha-numeric
-// unicode code point, 1 is returned. Otherwise 0.
-func fts5ExprIsAlnum(tls *libc.TLS, pCtx uintptr, nArg int32, apVal uintptr) { /* sqlite3.c:218935:13: */
- bp := tls.Alloc(32)
- defer tls.Free(32)
-
- var iCode int32
- // var aArr [32]U8 at bp, 32
-
- if nArg != 1 {
- Xsqlite3_result_error(tls, pCtx,
- ts+31398 /* "wrong number of ..." */, -1)
- return
- }
- libc.Xmemset(tls, bp /* &aArr[0] */, 0, uint64(unsafe.Sizeof([32]U8{})))
- sqlite3Fts5UnicodeCatParse(tls, ts+31449 /* "L*" */, bp /* &aArr[0] */)
- sqlite3Fts5UnicodeCatParse(tls, ts+31452 /* "N*" */, bp /* &aArr[0] */)
- sqlite3Fts5UnicodeCatParse(tls, ts+31455 /* "Co" */, bp /* &aArr[0] */)
- iCode = Xsqlite3_value_int(tls, *(*uintptr)(unsafe.Pointer(apVal)))
- Xsqlite3_result_int(tls, pCtx, int32(*(*U8)(unsafe.Pointer(bp /* &aArr[0] */ + uintptr(sqlite3Fts5UnicodeCategory(tls, U32(iCode)))))))
-}
-
-func fts5ExprFold(tls *libc.TLS, pCtx uintptr, nArg int32, apVal uintptr) { /* sqlite3.c:218956:13: */
- if (nArg != 1) && (nArg != 2) {
- Xsqlite3_result_error(tls, pCtx,
- ts+31458 /* "wrong number of ..." */, -1)
- } else {
- var iCode int32
- var bRemoveDiacritics int32 = 0
- iCode = Xsqlite3_value_int(tls, *(*uintptr)(unsafe.Pointer(apVal)))
- if nArg == 2 {
- bRemoveDiacritics = Xsqlite3_value_int(tls, *(*uintptr)(unsafe.Pointer(apVal + 1*8)))
- }
- Xsqlite3_result_int(tls, pCtx, sqlite3Fts5UnicodeFold(tls, iCode, bRemoveDiacritics))
- }
-}
-
// This is called during initialization to register the fts5_expr() scalar
// UDF with the SQLite handle passed as the only argument.
-func sqlite3Fts5ExprInit(tls *libc.TLS, pGlobal uintptr, db uintptr) int32 { /* sqlite3.c:218978:12: */
- bp := tls.Alloc(64)
- defer tls.Free(64)
-
- *(*[4]Fts5ExprFunc)(unsafe.Pointer(bp /* aFunc */)) = [4]Fts5ExprFunc{
- {Fz: ts + 31388 /* "fts5_expr" */, Fx: *(*uintptr)(unsafe.Pointer(&struct {
- f func(*libc.TLS, uintptr, int32, uintptr)
- }{fts5ExprFunctionHr}))},
- {Fz: ts + 31374 /* "fts5_expr_tcl" */, Fx: *(*uintptr)(unsafe.Pointer(&struct {
- f func(*libc.TLS, uintptr, int32, uintptr)
- }{fts5ExprFunctionTcl}))},
- {Fz: ts + 31506 /* "fts5_isalnum" */, Fx: *(*uintptr)(unsafe.Pointer(&struct {
- f func(*libc.TLS, uintptr, int32, uintptr)
- }{fts5ExprIsAlnum}))},
- {Fz: ts + 31519 /* "fts5_fold" */, Fx: *(*uintptr)(unsafe.Pointer(&struct {
- f func(*libc.TLS, uintptr, int32, uintptr)
- }{fts5ExprFold}))},
- }
- var i int32
+func sqlite3Fts5ExprInit(tls *libc.TLS, pGlobal uintptr, db uintptr) int32 { /* sqlite3.c:220220:12: */
var rc int32 = SQLITE_OK
- var pCtx uintptr = pGlobal
-
- for i = 0; (rc == SQLITE_OK) && (i < (int32(uint64(unsafe.Sizeof([4]Fts5ExprFunc{})) / uint64(unsafe.Sizeof(Fts5ExprFunc{}))))); i++ {
- var p uintptr = (bp /* &aFunc */ + uintptr(i)*16)
- rc = Xsqlite3_create_function(tls, db, (*Fts5ExprFunc)(unsafe.Pointer(p)).Fz, -1, SQLITE_UTF8, pCtx, (*Fts5ExprFunc)(unsafe.Pointer(p)).Fx, uintptr(0), uintptr(0))
- }
+ _ = pGlobal
+ _ = db
// Avoid warnings indicating that sqlite3Fts5ParserTrace() and
// sqlite3Fts5ParserFallback() are unused
@@ -169664,13 +177663,8 @@ func sqlite3Fts5ExprInit(tls *libc.TLS, pGlobal uintptr, db uintptr) int32 { /*
return rc
}
-type Fts5ExprFunc = struct {
- Fz uintptr
- Fx uintptr
-} /* sqlite3.c:218979:3 */
-
// Return the number of phrases in expression pExpr.
-func sqlite3Fts5ExprPhraseCount(tls *libc.TLS, pExpr uintptr) int32 { /* sqlite3.c:219010:12: */
+func sqlite3Fts5ExprPhraseCount(tls *libc.TLS, pExpr uintptr) int32 { /* sqlite3.c:220257:12: */
return func() int32 {
if pExpr != 0 {
return (*Fts5Expr)(unsafe.Pointer(pExpr)).FnPhrase
@@ -169680,7 +177674,7 @@ func sqlite3Fts5ExprPhraseCount(tls *libc.TLS, pExpr uintptr) int32 { /* sqlite3
}
// Return the number of terms in the iPhrase'th phrase in pExpr.
-func sqlite3Fts5ExprPhraseSize(tls *libc.TLS, pExpr uintptr, iPhrase int32) int32 { /* sqlite3.c:219017:12: */
+func sqlite3Fts5ExprPhraseSize(tls *libc.TLS, pExpr uintptr, iPhrase int32) int32 { /* sqlite3.c:220264:12: */
if (iPhrase < 0) || (iPhrase >= (*Fts5Expr)(unsafe.Pointer(pExpr)).FnPhrase) {
return 0
}
@@ -169689,7 +177683,7 @@ func sqlite3Fts5ExprPhraseSize(tls *libc.TLS, pExpr uintptr, iPhrase int32) int3
// This function is used to access the current position list for phrase
// iPhrase.
-func sqlite3Fts5ExprPoslist(tls *libc.TLS, pExpr uintptr, iPhrase int32, pa uintptr) int32 { /* sqlite3.c:219026:12: */
+func sqlite3Fts5ExprPoslist(tls *libc.TLS, pExpr uintptr, iPhrase int32, pa uintptr) int32 { /* sqlite3.c:220273:12: */
var nRet int32
var pPhrase uintptr = *(*uintptr)(unsafe.Pointer((*Fts5Expr)(unsafe.Pointer(pExpr)).FapExprPhrase + uintptr(iPhrase)*8))
var pNode uintptr = (*Fts5ExprPhrase)(unsafe.Pointer(pPhrase)).FpNode
@@ -169703,7 +177697,7 @@ func sqlite3Fts5ExprPoslist(tls *libc.TLS, pExpr uintptr, iPhrase int32, pa uint
return nRet
}
-func sqlite3Fts5ExprClearPoslists(tls *libc.TLS, pExpr uintptr, bLive int32) uintptr { /* sqlite3.c:219046:29: */
+func sqlite3Fts5ExprClearPoslists(tls *libc.TLS, pExpr uintptr, bLive int32) uintptr { /* sqlite3.c:220293:29: */
var pRet uintptr
pRet = Xsqlite3_malloc64(tls, (uint64(uint64(unsafe.Sizeof(Fts5PoslistPopulator{})) * uint64((*Fts5Expr)(unsafe.Pointer(pExpr)).FnPhrase))))
if pRet != 0 {
@@ -169727,12 +177721,12 @@ type Fts5ExprCtx1 = struct {
FpExpr uintptr
FaPopulator uintptr
FiOff I64
-} /* sqlite3.c:219068:1 */
+} /* sqlite3.c:220315:1 */
-type Fts5ExprCtx = Fts5ExprCtx1 /* sqlite3.c:219073:28 */
+type Fts5ExprCtx = Fts5ExprCtx1 /* sqlite3.c:220320:28 */
// TODO: Make this more efficient!
-func fts5ExprColsetTest(tls *libc.TLS, pColset uintptr, iCol int32) int32 { /* sqlite3.c:219078:12: */
+func fts5ExprColsetTest(tls *libc.TLS, pColset uintptr, iCol int32) int32 { /* sqlite3.c:220325:12: */
var i int32
for i = 0; i < (*Fts5Colset)(unsafe.Pointer(pColset)).FnCol; i++ {
if *(*int32)(unsafe.Pointer((pColset + 4 /* &.aiCol */) + uintptr(i)*4)) == iCol {
@@ -169742,7 +177736,7 @@ func fts5ExprColsetTest(tls *libc.TLS, pColset uintptr, iCol int32) int32 { /* s
return 0
}
-func fts5ExprPopulatePoslistsCb(tls *libc.TLS, pCtx uintptr, tflags int32, pToken uintptr, nToken int32, iUnused1 int32, iUnused2 int32) int32 { /* sqlite3.c:219086:12: */
+func fts5ExprPopulatePoslistsCb(tls *libc.TLS, pCtx uintptr, tflags int32, pToken uintptr, nToken int32, iUnused1 int32, iUnused2 int32) int32 { /* sqlite3.c:220333:12: */
var p uintptr = pCtx
var pExpr uintptr = (*Fts5ExprCtx)(unsafe.Pointer(p)).FpExpr
var i int32
@@ -169777,7 +177771,7 @@ func fts5ExprPopulatePoslistsCb(tls *libc.TLS, pCtx uintptr, tflags int32, pToke
return SQLITE_OK
}
-func sqlite3Fts5ExprPopulatePoslists(tls *libc.TLS, pConfig uintptr, pExpr uintptr, aPopulator uintptr, iCol int32, z uintptr, n int32) int32 { /* sqlite3.c:219121:12: */
+func sqlite3Fts5ExprPopulatePoslists(tls *libc.TLS, pConfig uintptr, pExpr uintptr, aPopulator uintptr, iCol int32, z uintptr, n int32) int32 { /* sqlite3.c:220368:12: */
bp := tls.Alloc(24)
defer tls.Free(24)
@@ -169805,7 +177799,7 @@ func sqlite3Fts5ExprPopulatePoslists(tls *libc.TLS, pConfig uintptr, pExpr uintp
}{fts5ExprPopulatePoslistsCb})))
}
-func fts5ExprClearPoslists(tls *libc.TLS, pNode uintptr) { /* sqlite3.c:219151:13: */
+func fts5ExprClearPoslists(tls *libc.TLS, pNode uintptr) { /* sqlite3.c:220398:13: */
if ((*Fts5ExprNode)(unsafe.Pointer(pNode)).FeType == FTS5_TERM) || ((*Fts5ExprNode)(unsafe.Pointer(pNode)).FeType == FTS5_STRING) {
(*Fts5ExprPhrase)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(((*Fts5ExprNode)(unsafe.Pointer(pNode)).FpNear + 24 /* &.apPhrase */))))).Fposlist.Fn = 0
} else {
@@ -169816,7 +177810,7 @@ func fts5ExprClearPoslists(tls *libc.TLS, pNode uintptr) { /* sqlite3.c:219151:1
}
}
-func fts5ExprCheckPoslists(tls *libc.TLS, pNode uintptr, iRowid I64) int32 { /* sqlite3.c:219162:12: */
+func fts5ExprCheckPoslists(tls *libc.TLS, pNode uintptr, iRowid I64) int32 { /* sqlite3.c:220409:12: */
(*Fts5ExprNode)(unsafe.Pointer(pNode)).FiRowid = iRowid
(*Fts5ExprNode)(unsafe.Pointer(pNode)).FbEof = 0
switch (*Fts5ExprNode)(unsafe.Pointer(pNode)).FeType {
@@ -169866,12 +177860,12 @@ func fts5ExprCheckPoslists(tls *libc.TLS, pNode uintptr, iRowid I64) int32 { /*
return 1
}
-func sqlite3Fts5ExprCheckPoslists(tls *libc.TLS, pExpr uintptr, iRowid I64) { /* sqlite3.c:219206:13: */
+func sqlite3Fts5ExprCheckPoslists(tls *libc.TLS, pExpr uintptr, iRowid I64) { /* sqlite3.c:220453:13: */
fts5ExprCheckPoslists(tls, (*Fts5Expr)(unsafe.Pointer(pExpr)).FpRoot, iRowid)
}
// This function is only called for detail=columns tables.
-func sqlite3Fts5ExprPhraseCollist(tls *libc.TLS, pExpr uintptr, iPhrase int32, ppCollist uintptr, pnCollist uintptr) int32 { /* sqlite3.c:219213:12: */
+func sqlite3Fts5ExprPhraseCollist(tls *libc.TLS, pExpr uintptr, iPhrase int32, ppCollist uintptr, pnCollist uintptr) int32 { /* sqlite3.c:220460:12: */
var pPhrase uintptr = *(*uintptr)(unsafe.Pointer((*Fts5Expr)(unsafe.Pointer(pExpr)).FapExprPhrase + uintptr(iPhrase)*8))
var pNode uintptr = (*Fts5ExprPhrase)(unsafe.Pointer(pPhrase)).FpNode
var rc int32 = SQLITE_OK
@@ -169922,7 +177916,7 @@ type Fts5HashEntry1 = struct {
FiCol I16
FiPos int32
FiRowid I64
-} /* sqlite3.c:211884:9 */
+} /* sqlite3.c:213118:9 */
// 2014 August 11
//
@@ -169938,14 +177932,14 @@ type Fts5HashEntry1 = struct {
// #include "fts5Int.h"
-type Fts5HashEntry = Fts5HashEntry1 /* sqlite3.c:219266:30 */
+type Fts5HashEntry = Fts5HashEntry1 /* sqlite3.c:220513:30 */
// Eqivalent to:
//
// char *fts5EntryKey(Fts5HashEntry *pEntry){ return zKey; }
// Allocate a new hash table.
-func sqlite3Fts5HashNew(tls *libc.TLS, pConfig uintptr, ppNew uintptr, pnByte uintptr) int32 { /* sqlite3.c:219332:12: */
+func sqlite3Fts5HashNew(tls *libc.TLS, pConfig uintptr, ppNew uintptr, pnByte uintptr) int32 { /* sqlite3.c:220579:12: */
var rc int32 = SQLITE_OK
var pNew uintptr
@@ -169973,7 +177967,7 @@ func sqlite3Fts5HashNew(tls *libc.TLS, pConfig uintptr, ppNew uintptr, pnByte ui
}
// Free a hash table object.
-func sqlite3Fts5HashFree(tls *libc.TLS, pHash uintptr) { /* sqlite3.c:219362:13: */
+func sqlite3Fts5HashFree(tls *libc.TLS, pHash uintptr) { /* sqlite3.c:220609:13: */
if pHash != 0 {
sqlite3Fts5HashClear(tls, pHash)
Xsqlite3_free(tls, (*Fts5Hash)(unsafe.Pointer(pHash)).FaSlot)
@@ -169982,7 +177976,7 @@ func sqlite3Fts5HashFree(tls *libc.TLS, pHash uintptr) { /* sqlite3.c:219362:13:
}
// Empty (but do not delete) a hash table.
-func sqlite3Fts5HashClear(tls *libc.TLS, pHash uintptr) { /* sqlite3.c:219373:13: */
+func sqlite3Fts5HashClear(tls *libc.TLS, pHash uintptr) { /* sqlite3.c:220620:13: */
var i int32
for i = 0; i < (*Fts5Hash)(unsafe.Pointer(pHash)).FnSlot; i++ {
var pNext uintptr
@@ -169996,7 +177990,7 @@ func sqlite3Fts5HashClear(tls *libc.TLS, pHash uintptr) { /* sqlite3.c:219373:13
(*Fts5Hash)(unsafe.Pointer(pHash)).FnEntry = 0
}
-func fts5HashKey(tls *libc.TLS, nSlot int32, p uintptr, n int32) uint32 { /* sqlite3.c:219387:21: */
+func fts5HashKey(tls *libc.TLS, nSlot int32, p uintptr, n int32) uint32 { /* sqlite3.c:220634:21: */
var i int32
var h uint32 = uint32(13)
for i = (n - 1); i >= 0; i-- {
@@ -170005,7 +177999,7 @@ func fts5HashKey(tls *libc.TLS, nSlot int32, p uintptr, n int32) uint32 { /* sql
return (h % uint32(nSlot))
}
-func fts5HashKey2(tls *libc.TLS, nSlot int32, b U8, p uintptr, n int32) uint32 { /* sqlite3.c:219396:21: */
+func fts5HashKey2(tls *libc.TLS, nSlot int32, b U8, p uintptr, n int32) uint32 { /* sqlite3.c:220643:21: */
var i int32
var h uint32 = uint32(13)
for i = (n - 1); i >= 0; i-- {
@@ -170016,7 +178010,7 @@ func fts5HashKey2(tls *libc.TLS, nSlot int32, b U8, p uintptr, n int32) uint32 {
}
// Resize the hash table by doubling the number of slots.
-func fts5HashResize(tls *libc.TLS, pHash uintptr) int32 { /* sqlite3.c:219409:12: */
+func fts5HashResize(tls *libc.TLS, pHash uintptr) int32 { /* sqlite3.c:220656:12: */
var nNew int32 = ((*Fts5Hash)(unsafe.Pointer(pHash)).FnSlot * 2)
var i int32
var apNew uintptr
@@ -170046,7 +178040,7 @@ func fts5HashResize(tls *libc.TLS, pHash uintptr) int32 { /* sqlite3.c:219409:12
return SQLITE_OK
}
-func fts5HashAddPoslistSize(tls *libc.TLS, pHash uintptr, p uintptr, p2 uintptr) int32 { /* sqlite3.c:219437:12: */
+func fts5HashAddPoslistSize(tls *libc.TLS, pHash uintptr, p uintptr, p2 uintptr) int32 { /* sqlite3.c:220684:12: */
var nRet int32 = 0
if (*Fts5HashEntry)(unsafe.Pointer(p)).FiSzPoslist != 0 {
var pPtr uintptr
@@ -170095,7 +178089,7 @@ func fts5HashAddPoslistSize(tls *libc.TLS, pHash uintptr, p uintptr, p2 uintptr)
// (bByte || pToken) -> (iRowid,iCol,iPos)
//
// Or, if iCol is negative, then the value is a delete marker.
-func sqlite3Fts5HashWrite(tls *libc.TLS, pHash uintptr, iRowid I64, iCol int32, iPos int32, bByte int8, pToken uintptr, nToken int32) int32 { /* sqlite3.c:219488:12: */
+func sqlite3Fts5HashWrite(tls *libc.TLS, pHash uintptr, iRowid I64, iCol int32, iPos int32, bByte uint8, pToken uintptr, nToken int32) int32 { /* sqlite3.c:220735:12: */
var iHash uint32
var p uintptr
var pPtr uintptr
@@ -170108,7 +178102,7 @@ func sqlite3Fts5HashWrite(tls *libc.TLS, pHash uintptr, iRowid I64, iCol int32,
iHash = fts5HashKey2(tls, (*Fts5Hash)(unsafe.Pointer(pHash)).FnSlot, U8(bByte), pToken, nToken)
for p = *(*uintptr)(unsafe.Pointer((*Fts5Hash)(unsafe.Pointer(pHash)).FaSlot + uintptr(iHash)*8)); p != 0; p = (*Fts5HashEntry)(unsafe.Pointer(p)).FpHashNext {
var zKey uintptr = ((p) + 1*48)
- if ((int32(*(*int8)(unsafe.Pointer(zKey))) == int32(bByte)) &&
+ if ((int32(*(*uint8)(unsafe.Pointer(zKey))) == int32(bByte)) &&
((*Fts5HashEntry)(unsafe.Pointer(p)).FnKey == nToken)) &&
(libc.Xmemcmp(tls, (zKey+1), pToken, uint64(nToken)) == 0) {
break
@@ -170141,11 +178135,11 @@ func sqlite3Fts5HashWrite(tls *libc.TLS, pHash uintptr, iRowid I64, iCol int32,
libc.Xmemset(tls, p, 0, uint64(unsafe.Sizeof(Fts5HashEntry{})))
(*Fts5HashEntry)(unsafe.Pointer(p)).FnAlloc = int32(nByte)
zKey = ((p) + 1*48)
- *(*int8)(unsafe.Pointer(zKey)) = bByte
+ *(*uint8)(unsafe.Pointer(zKey)) = bByte
libc.Xmemcpy(tls, (zKey + 1), pToken, uint64(nToken))
(*Fts5HashEntry)(unsafe.Pointer(p)).FnKey = nToken
- *(*int8)(unsafe.Pointer(zKey + uintptr((nToken + 1)))) = int8(0)
+ *(*uint8)(unsafe.Pointer(zKey + uintptr((nToken + 1)))) = uint8(0)
(*Fts5HashEntry)(unsafe.Pointer(p)).FnData = (int32((uint64((nToken + 1) + 1)) + uint64(unsafe.Sizeof(Fts5HashEntry{}))))
(*Fts5HashEntry)(unsafe.Pointer(p)).FpHashNext = *(*uintptr)(unsafe.Pointer((*Fts5Hash)(unsafe.Pointer(pHash)).FaSlot + uintptr(iHash)*8))
*(*uintptr)(unsafe.Pointer((*Fts5Hash)(unsafe.Pointer(pHash)).FaSlot + uintptr(iHash)*8)) = p
@@ -170254,7 +178248,7 @@ func sqlite3Fts5HashWrite(tls *libc.TLS, pHash uintptr, iRowid I64, iCol int32,
// Arguments pLeft and pRight point to linked-lists of hash-entry objects,
// each sorted in key order. This function merges the two lists into a
// single list and returns a pointer to its first element.
-func fts5HashEntryMerge(tls *libc.TLS, pLeft uintptr, pRight uintptr) uintptr { /* sqlite3.c:219641:22: */
+func fts5HashEntryMerge(tls *libc.TLS, pLeft uintptr, pRight uintptr) uintptr { /* sqlite3.c:220888:22: */
bp := tls.Alloc(8)
defer tls.Free(8)
@@ -170274,11 +178268,11 @@ func fts5HashEntryMerge(tls *libc.TLS, pLeft uintptr, pRight uintptr) uintptr {
var i int32 = 0
var zKey1 uintptr = ((p1) + 1*48)
var zKey2 uintptr = ((p2) + 1*48)
- for int32(*(*int8)(unsafe.Pointer(zKey1 + uintptr(i)))) == int32(*(*int8)(unsafe.Pointer(zKey2 + uintptr(i)))) {
+ for int32(*(*uint8)(unsafe.Pointer(zKey1 + uintptr(i)))) == int32(*(*uint8)(unsafe.Pointer(zKey2 + uintptr(i)))) {
i++
}
- if (int32(U8(*(*int8)(unsafe.Pointer(zKey1 + uintptr(i)))))) > (int32(U8(*(*int8)(unsafe.Pointer(zKey2 + uintptr(i)))))) {
+ if (int32(U8(*(*uint8)(unsafe.Pointer(zKey1 + uintptr(i)))))) > (int32(U8(*(*uint8)(unsafe.Pointer(zKey2 + uintptr(i)))))) {
// p2 is smaller
*(*uintptr)(unsafe.Pointer(ppOut)) = p2
ppOut = (p2 + 8 /* &.pScanNext */)
@@ -170300,7 +178294,7 @@ func fts5HashEntryMerge(tls *libc.TLS, pLeft uintptr, pRight uintptr) uintptr {
// in sorted order. The hash table is cleared before returning. It is
// the responsibility of the caller to free the elements of the returned
// list.
-func fts5HashEntrySort(tls *libc.TLS, pHash uintptr, pTerm uintptr, nTerm int32, ppSorted uintptr) int32 { /* sqlite3.c:219687:12: */
+func fts5HashEntrySort(tls *libc.TLS, pHash uintptr, pTerm uintptr, nTerm int32, ppSorted uintptr) int32 { /* sqlite3.c:220934:12: */
var nMergeSlot int32 = 32
var ap uintptr
var pList uintptr
@@ -170342,7 +178336,7 @@ func fts5HashEntrySort(tls *libc.TLS, pHash uintptr, pTerm uintptr, nTerm int32,
}
// Query the hash table for a doclist associated with term pTerm/nTerm.
-func sqlite3Fts5HashQuery(tls *libc.TLS, pHash uintptr, nPre int32, pTerm uintptr, nTerm int32, ppOut uintptr, pnDoclist uintptr) int32 { /* sqlite3.c:219734:12: */
+func sqlite3Fts5HashQuery(tls *libc.TLS, pHash uintptr, nPre int32, pTerm uintptr, nTerm int32, ppOut uintptr, pnDoclist uintptr) int32 { /* sqlite3.c:220981:12: */
var iHash uint32 = fts5HashKey(tls, (*Fts5Hash)(unsafe.Pointer(pHash)).FnSlot, pTerm, nTerm)
var zKey uintptr = uintptr(0)
var p uintptr
@@ -170376,20 +178370,20 @@ func sqlite3Fts5HashQuery(tls *libc.TLS, pHash uintptr, nPre int32, pTerm uintpt
return SQLITE_OK
}
-func sqlite3Fts5HashScanInit(tls *libc.TLS, p uintptr, pTerm uintptr, nTerm int32) int32 { /* sqlite3.c:219772:12: */
+func sqlite3Fts5HashScanInit(tls *libc.TLS, p uintptr, pTerm uintptr, nTerm int32) int32 { /* sqlite3.c:221019:12: */
return fts5HashEntrySort(tls, p, pTerm, nTerm, (p + 24 /* &.pScan */))
}
-func sqlite3Fts5HashScanNext(tls *libc.TLS, p uintptr) { /* sqlite3.c:219779:13: */
+func sqlite3Fts5HashScanNext(tls *libc.TLS, p uintptr) { /* sqlite3.c:221026:13: */
(*Fts5Hash)(unsafe.Pointer(p)).FpScan = (*Fts5HashEntry)(unsafe.Pointer((*Fts5Hash)(unsafe.Pointer(p)).FpScan)).FpScanNext
}
-func sqlite3Fts5HashScanEof(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:219784:12: */
+func sqlite3Fts5HashScanEof(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:221031:12: */
return (libc.Bool32((*Fts5Hash)(unsafe.Pointer(p)).FpScan == uintptr(0)))
}
-func sqlite3Fts5HashScanEntry(tls *libc.TLS, pHash uintptr, pzTerm uintptr, ppDoclist uintptr, pnDoclist uintptr) { /* sqlite3.c:219788:13: */
+func sqlite3Fts5HashScanEntry(tls *libc.TLS, pHash uintptr, pzTerm uintptr, ppDoclist uintptr, pnDoclist uintptr) { /* sqlite3.c:221035:13: */
var p uintptr
if libc.AssignUintptr(&p, (*Fts5Hash)(unsafe.Pointer(pHash)).FpScan) != 0 {
var zKey uintptr = ((p) + 1*48)
@@ -170615,7 +178609,7 @@ type Fts5Data1 = struct {
Fp uintptr
Fnn int32
FszLeaf int32
-} /* sqlite3.c:220063:9 */
+} /* sqlite3.c:221310:9 */
// 2014 May 31
//
@@ -170823,14 +178817,14 @@ type Fts5Data1 = struct {
// many zero bytes. This makes it easier to decode the various record formats
// without overreading if the records are corrupt.
-type Fts5Data = Fts5Data1 /* sqlite3.c:220063:25 */
+type Fts5Data = Fts5Data1 /* sqlite3.c:221310:25 */
type Fts5DlidxIter1 = struct {
FnLvl int32
FiSegid int32
FaLvl [1]Fts5DlidxLvl
-} /* sqlite3.c:220064:9 */
+} /* sqlite3.c:221311:9 */
-type Fts5DlidxIter = Fts5DlidxIter1 /* sqlite3.c:220064:30 */
+type Fts5DlidxIter = Fts5DlidxIter1 /* sqlite3.c:221311:30 */
type Fts5DlidxLvl1 = struct {
FpData uintptr
FiOff int32
@@ -170838,17 +178832,17 @@ type Fts5DlidxLvl1 = struct {
FiFirstOff int32
FiLeafPgno int32
FiRowid I64
-} /* sqlite3.c:220064:9 */
+} /* sqlite3.c:221311:9 */
-type Fts5DlidxLvl = Fts5DlidxLvl1 /* sqlite3.c:220065:29 */
+type Fts5DlidxLvl = Fts5DlidxLvl1 /* sqlite3.c:221312:29 */
type Fts5DlidxWriter1 = struct {
Fpgno int32
FbPrevValid int32
FiPrev I64
Fbuf Fts5Buffer
-} /* sqlite3.c:220066:9 */
+} /* sqlite3.c:221313:9 */
-type Fts5DlidxWriter = Fts5DlidxWriter1 /* sqlite3.c:220066:32 */
+type Fts5DlidxWriter = Fts5DlidxWriter1 /* sqlite3.c:221313:32 */
type Fts5Iter1 = struct {
Fbase Fts5IndexIter
FpIndex uintptr
@@ -170858,30 +178852,29 @@ type Fts5Iter1 = struct {
FnSeg int32
FbRev int32
FbSkipEmpty U8
- _ [7]byte
+ F__ccgo_pad1 [7]byte
FiSwitchRowid I64
FaFirst uintptr
FaSeg [1]Fts5SegIter
-} /* sqlite3.c:220067:9 */
+} /* sqlite3.c:221314:9 */
-type Fts5Iter = Fts5Iter1 /* sqlite3.c:220067:25 */
+type Fts5Iter = Fts5Iter1 /* sqlite3.c:221314:25 */
type Fts5PageWriter1 = struct {
Fpgno int32
FiPrevPgidx int32
Fbuf Fts5Buffer
Fpgidx Fts5Buffer
Fterm Fts5Buffer
-} /* sqlite3.c:220068:9 */
+} /* sqlite3.c:221315:9 */
-type Fts5PageWriter = Fts5PageWriter1 /* sqlite3.c:220068:31 */
+type Fts5PageWriter = Fts5PageWriter1 /* sqlite3.c:221315:31 */
type Fts5SegIter1 = struct {
FpSeg uintptr
Fflags int32
FiLeafPgno int32
FpLeaf uintptr
FpNextLeaf uintptr
- FiLeafOffset int32
- _ [4]byte
+ FiLeafOffset I64
FxNext uintptr
FiTermLeafPgno int32
FiTermLeafOffset int32
@@ -170895,77 +178888,77 @@ type Fts5SegIter1 = struct {
FiRowid I64
FnPos int32
FbDel U8
- _ [3]byte
-} /* sqlite3.c:220067:9 */
+ F__ccgo_pad1 [3]byte
+} /* sqlite3.c:221314:9 */
-type Fts5SegIter = Fts5SegIter1 /* sqlite3.c:220069:28 */
+type Fts5SegIter = Fts5SegIter1 /* sqlite3.c:221316:28 */
type Fts5DoclistIter1 = struct {
FaEof uintptr
FiRowid I64
FaPoslist uintptr
FnPoslist int32
FnSize int32
-} /* sqlite3.c:220070:9 */
+} /* sqlite3.c:221317:9 */
-type Fts5DoclistIter = Fts5DoclistIter1 /* sqlite3.c:220070:32 */
+type Fts5DoclistIter = Fts5DoclistIter1 /* sqlite3.c:221317:32 */
type Fts5SegWriter1 = struct {
FiSegid int32
- _ [4]byte
+ F__ccgo_pad1 [4]byte
Fwriter Fts5PageWriter
FiPrevRowid I64
FbFirstRowidInDoclist U8
FbFirstRowidInPage U8
FbFirstTermInPage U8
- _ [1]byte
+ F__ccgo_pad2 [1]byte
FnLeafWritten int32
FnEmpty int32
FnDlidx int32
FaDlidx uintptr
Fbtterm Fts5Buffer
FiBtPage int32
- _ [4]byte
-} /* sqlite3.c:220071:9 */
+ F__ccgo_pad3 [4]byte
+} /* sqlite3.c:221318:9 */
-type Fts5SegWriter = Fts5SegWriter1 /* sqlite3.c:220071:30 */
+type Fts5SegWriter = Fts5SegWriter1 /* sqlite3.c:221318:30 */
type Fts5Structure1 = struct {
FnRef int32
- _ [4]byte
+ F__ccgo_pad1 [4]byte
FnWriteCounter U64
FnSegment int32
FnLevel int32
FaLevel [1]Fts5StructureLevel
-} /* sqlite3.c:211884:9 */
+} /* sqlite3.c:213118:9 */
-type Fts5Structure = Fts5Structure1 /* sqlite3.c:220072:30 */
+type Fts5Structure = Fts5Structure1 /* sqlite3.c:221319:30 */
type Fts5StructureLevel1 = struct {
FnMerge int32
FnSeg int32
FaSeg uintptr
-} /* sqlite3.c:211884:9 */
+} /* sqlite3.c:213118:9 */
-type Fts5StructureLevel = Fts5StructureLevel1 /* sqlite3.c:220073:35 */
+type Fts5StructureLevel = Fts5StructureLevel1 /* sqlite3.c:221320:35 */
type Fts5StructureSegment1 = struct {
FiSegid int32
FpgnoFirst int32
FpgnoLast int32
-} /* sqlite3.c:211884:9 */
+} /* sqlite3.c:213118:9 */
-type Fts5StructureSegment = Fts5StructureSegment1 /* sqlite3.c:220074:37 */
+type Fts5StructureSegment = Fts5StructureSegment1 /* sqlite3.c:221321:37 */
type Fts5CResult1 = struct {
- FiFirst U16
- FbTermEq U8
- _ [1]byte
-} /* sqlite3.c:220067:9 */
+ FiFirst U16
+ FbTermEq U8
+ F__ccgo_pad1 [1]byte
+} /* sqlite3.c:221314:9 */
-type Fts5CResult = Fts5CResult1 /* sqlite3.c:220184:28 */
+type Fts5CResult = Fts5CResult1 /* sqlite3.c:221431:28 */
-func fts5PutU16(tls *libc.TLS, aOut uintptr, iVal U16) { /* sqlite3.c:220363:13: */
+func fts5PutU16(tls *libc.TLS, aOut uintptr, iVal U16) { /* sqlite3.c:221610:13: */
*(*U8)(unsafe.Pointer(aOut)) = (U8(int32(iVal) >> 8))
*(*U8)(unsafe.Pointer(aOut + 1)) = (U8(int32(iVal) & 0xFF))
}
-func fts5GetU16(tls *libc.TLS, aIn uintptr) U16 { /* sqlite3.c:220368:12: */
+func fts5GetU16(tls *libc.TLS, aIn uintptr) U16 { /* sqlite3.c:221615:12: */
return (U16((int32(U16(*(*U8)(unsafe.Pointer(aIn)))) << 8) + int32(*(*U8)(unsafe.Pointer(aIn + 1)))))
}
@@ -170973,7 +178966,7 @@ func fts5GetU16(tls *libc.TLS, aIn uintptr) U16 { /* sqlite3.c:220368:12: */
//
// If an OOM error is encountered, return NULL and set the error code in
// the Fts5Index handle passed as the first argument.
-func fts5IdxMalloc(tls *libc.TLS, p uintptr, nByte Sqlite3_int64) uintptr { /* sqlite3.c:220378:13: */
+func fts5IdxMalloc(tls *libc.TLS, p uintptr, nByte Sqlite3_int64) uintptr { /* sqlite3.c:221625:13: */
return sqlite3Fts5MallocZero(tls, (p + 52 /* &.rc */), nByte)
}
@@ -170991,7 +178984,7 @@ func fts5IdxMalloc(tls *libc.TLS, p uintptr, nByte Sqlite3_int64) uintptr { /* s
// +ve if pRight is smaller than pLeft. In other words:
//
// res = *pLeft - *pRight
-func fts5BufferCompare(tls *libc.TLS, pLeft uintptr, pRight uintptr) int32 { /* sqlite3.c:220410:12: */
+func fts5BufferCompare(tls *libc.TLS, pLeft uintptr, pRight uintptr) int32 { /* sqlite3.c:221657:12: */
var nCmp int32 = func() int32 {
if ((*Fts5Buffer)(unsafe.Pointer(pLeft)).Fn) < ((*Fts5Buffer)(unsafe.Pointer(pRight)).Fn) {
return (*Fts5Buffer)(unsafe.Pointer(pLeft)).Fn
@@ -171012,7 +179005,7 @@ func fts5BufferCompare(tls *libc.TLS, pLeft uintptr, pRight uintptr) int32 { /*
}()
}
-func fts5LeafFirstTermOff(tls *libc.TLS, pLeaf uintptr) int32 { /* sqlite3.c:220416:12: */
+func fts5LeafFirstTermOff(tls *libc.TLS, pLeaf uintptr) int32 { /* sqlite3.c:221663:12: */
bp := tls.Alloc(4)
defer tls.Free(4)
@@ -171023,7 +179016,7 @@ func fts5LeafFirstTermOff(tls *libc.TLS, pLeaf uintptr) int32 { /* sqlite3.c:220
}
// Close the read-only blob handle, if it is open.
-func sqlite3Fts5IndexCloseReader(tls *libc.TLS, p uintptr) { /* sqlite3.c:220425:13: */
+func sqlite3Fts5IndexCloseReader(tls *libc.TLS, p uintptr) { /* sqlite3.c:221672:13: */
if (*Fts5Index)(unsafe.Pointer(p)).FpReader != 0 {
var pReader uintptr = (*Fts5Index)(unsafe.Pointer(p)).FpReader
(*Fts5Index)(unsafe.Pointer(p)).FpReader = uintptr(0)
@@ -171035,7 +179028,7 @@ func sqlite3Fts5IndexCloseReader(tls *libc.TLS, p uintptr) { /* sqlite3.c:220425
//
// If an error occurs, NULL is returned and an error left in the
// Fts5Index object.
-func fts5DataRead(tls *libc.TLS, p uintptr, iRowid I64) uintptr { /* sqlite3.c:220439:17: */
+func fts5DataRead(tls *libc.TLS, p uintptr, iRowid I64) uintptr { /* sqlite3.c:221686:17: */
var pRet uintptr = uintptr(0)
if (*Fts5Index)(unsafe.Pointer(p)).Frc == SQLITE_OK {
var rc int32 = SQLITE_OK
@@ -171062,7 +179055,7 @@ func fts5DataRead(tls *libc.TLS, p uintptr, iRowid I64) uintptr { /* sqlite3.c:2
if ((*Fts5Index)(unsafe.Pointer(p)).FpReader == uintptr(0)) && (rc == SQLITE_OK) {
var pConfig uintptr = (*Fts5Index)(unsafe.Pointer(p)).FpConfig
rc = Xsqlite3_blob_open(tls, (*Fts5Config)(unsafe.Pointer(pConfig)).Fdb,
- (*Fts5Config)(unsafe.Pointer(pConfig)).FzDb, (*Fts5Index)(unsafe.Pointer(p)).FzDataTbl, ts+31529 /* "block" */, iRowid, 0, (p + 56 /* &.pReader */))
+ (*Fts5Config)(unsafe.Pointer(pConfig)).FzDb, (*Fts5Index)(unsafe.Pointer(p)).FzDataTbl, ts+33025 /* "block" */, iRowid, 0, (p + 56 /* &.pReader */))
}
// If either of the sqlite3_blob_open() or sqlite3_blob_reopen() calls
@@ -171108,11 +179101,11 @@ func fts5DataRead(tls *libc.TLS, p uintptr, iRowid I64) uintptr { /* sqlite3.c:2
// Release a reference to data record returned by an earlier call to
// fts5DataRead().
-func fts5DataRelease(tls *libc.TLS, pData uintptr) { /* sqlite3.c:220512:13: */
+func fts5DataRelease(tls *libc.TLS, pData uintptr) { /* sqlite3.c:221759:13: */
Xsqlite3_free(tls, pData)
}
-func fts5LeafRead(tls *libc.TLS, p uintptr, iRowid I64) uintptr { /* sqlite3.c:220516:17: */
+func fts5LeafRead(tls *libc.TLS, p uintptr, iRowid I64) uintptr { /* sqlite3.c:221763:17: */
var pRet uintptr = fts5DataRead(tls, p, iRowid)
if pRet != 0 {
if ((*Fts5Data)(unsafe.Pointer(pRet)).Fnn < 4) || ((*Fts5Data)(unsafe.Pointer(pRet)).FszLeaf > (*Fts5Data)(unsafe.Pointer(pRet)).Fnn) {
@@ -171124,7 +179117,7 @@ func fts5LeafRead(tls *libc.TLS, p uintptr, iRowid I64) uintptr { /* sqlite3.c:2
return pRet
}
-func fts5IndexPrepareStmt(tls *libc.TLS, p uintptr, ppStmt uintptr, zSql uintptr) int32 { /* sqlite3.c:220528:12: */
+func fts5IndexPrepareStmt(tls *libc.TLS, p uintptr, ppStmt uintptr, zSql uintptr) int32 { /* sqlite3.c:221775:12: */
if (*Fts5Index)(unsafe.Pointer(p)).Frc == SQLITE_OK {
if zSql != 0 {
(*Fts5Index)(unsafe.Pointer(p)).Frc = Xsqlite3_prepare_v3(tls, (*Fts5Config)(unsafe.Pointer((*Fts5Index)(unsafe.Pointer(p)).FpConfig)).Fdb, zSql, -1,
@@ -171139,7 +179132,7 @@ func fts5IndexPrepareStmt(tls *libc.TLS, p uintptr, ppStmt uintptr, zSql uintptr
}
// INSERT OR REPLACE a record into the %_data table.
-func fts5DataWrite(tls *libc.TLS, p uintptr, iRowid I64, pData uintptr, nData int32) { /* sqlite3.c:220550:13: */
+func fts5DataWrite(tls *libc.TLS, p uintptr, iRowid I64, pData uintptr, nData int32) { /* sqlite3.c:221797:13: */
bp := tls.Alloc(16)
defer tls.Free(16)
@@ -171150,7 +179143,7 @@ func fts5DataWrite(tls *libc.TLS, p uintptr, iRowid I64, pData uintptr, nData in
if (*Fts5Index)(unsafe.Pointer(p)).FpWriter == uintptr(0) {
var pConfig uintptr = (*Fts5Index)(unsafe.Pointer(p)).FpConfig
fts5IndexPrepareStmt(tls, p, (p + 64 /* &.pWriter */), Xsqlite3_mprintf(tls,
- ts+31535, /* "REPLACE INTO '%q..." */
+ ts+33031, /* "REPLACE INTO '%q..." */
libc.VaList(bp, (*Fts5Config)(unsafe.Pointer(pConfig)).FzDb, (*Fts5Config)(unsafe.Pointer(pConfig)).FzName)))
if (*Fts5Index)(unsafe.Pointer(p)).Frc != 0 {
return
@@ -171167,7 +179160,7 @@ func fts5DataWrite(tls *libc.TLS, p uintptr, iRowid I64, pData uintptr, nData in
// Execute the following SQL:
//
// DELETE FROM %_data WHERE id BETWEEN $iFirst AND $iLast
-func fts5DataDelete(tls *libc.TLS, p uintptr, iFirst I64, iLast I64) { /* sqlite3.c:220574:13: */
+func fts5DataDelete(tls *libc.TLS, p uintptr, iFirst I64, iLast I64) { /* sqlite3.c:221821:13: */
bp := tls.Alloc(16)
defer tls.Free(16)
@@ -171178,7 +179171,7 @@ func fts5DataDelete(tls *libc.TLS, p uintptr, iFirst I64, iLast I64) { /* sqlite
if (*Fts5Index)(unsafe.Pointer(p)).FpDeleter == uintptr(0) {
var pConfig uintptr = (*Fts5Index)(unsafe.Pointer(p)).FpConfig
var zSql uintptr = Xsqlite3_mprintf(tls,
- ts+31586, /* "DELETE FROM '%q'..." */
+ ts+33082, /* "DELETE FROM '%q'..." */
libc.VaList(bp, (*Fts5Config)(unsafe.Pointer(pConfig)).FzDb, (*Fts5Config)(unsafe.Pointer(pConfig)).FzName))
if fts5IndexPrepareStmt(tls, p, (p+72 /* &.pDeleter */), zSql) != 0 {
return
@@ -171192,7 +179185,7 @@ func fts5DataDelete(tls *libc.TLS, p uintptr, iFirst I64, iLast I64) { /* sqlite
}
// Remove all records associated with segment iSegid.
-func fts5DataRemoveSegment(tls *libc.TLS, p uintptr, iSegid int32) { /* sqlite3.c:220595:13: */
+func fts5DataRemoveSegment(tls *libc.TLS, p uintptr, iSegid int32) { /* sqlite3.c:221842:13: */
bp := tls.Alloc(16)
defer tls.Free(16)
@@ -171202,7 +179195,7 @@ func fts5DataRemoveSegment(tls *libc.TLS, p uintptr, iSegid int32) { /* sqlite3.
if (*Fts5Index)(unsafe.Pointer(p)).FpIdxDeleter == uintptr(0) {
var pConfig uintptr = (*Fts5Index)(unsafe.Pointer(p)).FpConfig
fts5IndexPrepareStmt(tls, p, (p + 88 /* &.pIdxDeleter */), Xsqlite3_mprintf(tls,
- ts+31635, /* "DELETE FROM '%q'..." */
+ ts+33131, /* "DELETE FROM '%q'..." */
libc.VaList(bp, (*Fts5Config)(unsafe.Pointer(pConfig)).FzDb, (*Fts5Config)(unsafe.Pointer(pConfig)).FzName)))
}
if (*Fts5Index)(unsafe.Pointer(p)).Frc == SQLITE_OK {
@@ -171214,7 +179207,7 @@ func fts5DataRemoveSegment(tls *libc.TLS, p uintptr, iSegid int32) { /* sqlite3.
// Release a reference to an Fts5Structure object returned by an earlier
// call to fts5StructureRead() or fts5StructureDecode().
-func fts5StructureRelease(tls *libc.TLS, pStruct uintptr) { /* sqlite3.c:220617:13: */
+func fts5StructureRelease(tls *libc.TLS, pStruct uintptr) { /* sqlite3.c:221864:13: */
if (pStruct != 0) && (0 >= (libc.PreDecInt32(&(*Fts5Structure)(unsafe.Pointer(pStruct)).FnRef, 1))) {
var i int32
@@ -171225,7 +179218,7 @@ func fts5StructureRelease(tls *libc.TLS, pStruct uintptr) { /* sqlite3.c:220617:
}
}
-func fts5StructureRef(tls *libc.TLS, pStruct uintptr) { /* sqlite3.c:220628:13: */
+func fts5StructureRef(tls *libc.TLS, pStruct uintptr) { /* sqlite3.c:221875:13: */
(*Fts5Structure)(unsafe.Pointer(pStruct)).FnRef++
}
@@ -171239,7 +179232,7 @@ func fts5StructureRef(tls *libc.TLS, pStruct uintptr) { /* sqlite3.c:220628:13:
// If an error occurs, *ppOut is set to NULL and an SQLite error code
// returned. Otherwise, *ppOut is set to point to the new object and
// SQLITE_OK returned.
-func fts5StructureDecode(tls *libc.TLS, pData uintptr, nData int32, piCookie uintptr, ppOut uintptr) int32 { /* sqlite3.c:220644:12: */
+func fts5StructureDecode(tls *libc.TLS, pData uintptr, nData int32, piCookie uintptr, ppOut uintptr) int32 { /* sqlite3.c:221891:12: */
bp := tls.Alloc(16)
defer tls.Free(16)
@@ -171331,7 +179324,7 @@ func fts5StructureDecode(tls *libc.TLS, pData uintptr, nData int32, piCookie uin
}
//
-func fts5StructureAddLevel(tls *libc.TLS, pRc uintptr, ppStruct uintptr) { /* sqlite3.c:220735:13: */
+func fts5StructureAddLevel(tls *libc.TLS, pRc uintptr, ppStruct uintptr) { /* sqlite3.c:221982:13: */
if *(*int32)(unsafe.Pointer(pRc)) == SQLITE_OK {
var pStruct uintptr = *(*uintptr)(unsafe.Pointer(ppStruct))
var nLevel int32 = (*Fts5Structure)(unsafe.Pointer(pStruct)).FnLevel
@@ -171350,7 +179343,7 @@ func fts5StructureAddLevel(tls *libc.TLS, pRc uintptr, ppStruct uintptr) { /* sq
// Extend level iLvl so that there is room for at least nExtra more
// segments.
-func fts5StructureExtendLevel(tls *libc.TLS, pRc uintptr, pStruct uintptr, iLvl int32, nExtra int32, bInsert int32) { /* sqlite3.c:220759:13: */
+func fts5StructureExtendLevel(tls *libc.TLS, pRc uintptr, pStruct uintptr, iLvl int32, nExtra int32, bInsert int32) { /* sqlite3.c:222006:13: */
if *(*int32)(unsafe.Pointer(pRc)) == SQLITE_OK {
var pLvl uintptr = ((pStruct + 24 /* &.aLevel */) + uintptr(iLvl)*16)
var aNew uintptr
@@ -171373,7 +179366,7 @@ func fts5StructureExtendLevel(tls *libc.TLS, pRc uintptr, pStruct uintptr, iLvl
}
}
-func fts5StructureReadUncached(tls *libc.TLS, p uintptr) uintptr { /* sqlite3.c:220788:22: */
+func fts5StructureReadUncached(tls *libc.TLS, p uintptr) uintptr { /* sqlite3.c:222035:22: */
bp := tls.Alloc(16)
defer tls.Free(16)
@@ -171401,7 +179394,7 @@ func fts5StructureReadUncached(tls *libc.TLS, p uintptr) uintptr { /* sqlite3.c:
return *(*uintptr)(unsafe.Pointer(bp + 8 /* pRet */))
}
-func fts5IndexDataVersion(tls *libc.TLS, p uintptr) I64 { /* sqlite3.c:220812:12: */
+func fts5IndexDataVersion(tls *libc.TLS, p uintptr) I64 { /* sqlite3.c:222059:12: */
bp := tls.Alloc(8)
defer tls.Free(8)
@@ -171410,7 +179403,7 @@ func fts5IndexDataVersion(tls *libc.TLS, p uintptr) I64 { /* sqlite3.c:220812:12
if (*Fts5Index)(unsafe.Pointer(p)).Frc == SQLITE_OK {
if (*Fts5Index)(unsafe.Pointer(p)).FpDataVersion == uintptr(0) {
(*Fts5Index)(unsafe.Pointer(p)).Frc = fts5IndexPrepareStmt(tls, p, (p + 112 /* &.pDataVersion */),
- Xsqlite3_mprintf(tls, ts+31675 /* "PRAGMA %Q.data_v..." */, libc.VaList(bp, (*Fts5Config)(unsafe.Pointer((*Fts5Index)(unsafe.Pointer(p)).FpConfig)).FzDb)))
+ Xsqlite3_mprintf(tls, ts+33171 /* "PRAGMA %Q.data_v..." */, libc.VaList(bp, (*Fts5Config)(unsafe.Pointer((*Fts5Index)(unsafe.Pointer(p)).FpConfig)).FzDb)))
if (*Fts5Index)(unsafe.Pointer(p)).Frc != 0 {
return int64(0)
}
@@ -171434,7 +179427,7 @@ func fts5IndexDataVersion(tls *libc.TLS, p uintptr) I64 { /* sqlite3.c:220812:12
// If an error occurs, NULL is returned and an error code left in the
// Fts5Index handle. If an error has already occurred when this function
// is called, it is a no-op.
-func fts5StructureRead(tls *libc.TLS, p uintptr) uintptr { /* sqlite3.c:220843:22: */
+func fts5StructureRead(tls *libc.TLS, p uintptr) uintptr { /* sqlite3.c:222090:22: */
if (*Fts5Index)(unsafe.Pointer(p)).FpStruct == uintptr(0) {
(*Fts5Index)(unsafe.Pointer(p)).FiStructVersion = fts5IndexDataVersion(tls, p)
@@ -171451,7 +179444,7 @@ func fts5StructureRead(tls *libc.TLS, p uintptr) uintptr { /* sqlite3.c:220843:2
return (*Fts5Index)(unsafe.Pointer(p)).FpStruct
}
-func fts5StructureInvalidate(tls *libc.TLS, p uintptr) { /* sqlite3.c:220882:13: */
+func fts5StructureInvalidate(tls *libc.TLS, p uintptr) { /* sqlite3.c:222129:13: */
if (*Fts5Index)(unsafe.Pointer(p)).FpStruct != 0 {
fts5StructureRelease(tls, (*Fts5Index)(unsafe.Pointer(p)).FpStruct)
(*Fts5Index)(unsafe.Pointer(p)).FpStruct = uintptr(0)
@@ -171465,7 +179458,7 @@ func fts5StructureInvalidate(tls *libc.TLS, p uintptr) { /* sqlite3.c:220882:13:
//
// If an error occurs, leave an error code in the Fts5Index object. If an
// error has already occurred, this function is a no-op.
-func fts5StructureWrite(tls *libc.TLS, p uintptr, pStruct uintptr) { /* sqlite3.c:220925:13: */
+func fts5StructureWrite(tls *libc.TLS, p uintptr, pStruct uintptr) { /* sqlite3.c:222172:13: */
bp := tls.Alloc(16)
defer tls.Free(16)
@@ -171518,14 +179511,14 @@ func fts5StructureWrite(tls *libc.TLS, p uintptr, pStruct uintptr) { /* sqlite3.
}
}
-func fts5SegmentSize(tls *libc.TLS, pSeg uintptr) int32 { /* sqlite3.c:220980:12: */
+func fts5SegmentSize(tls *libc.TLS, pSeg uintptr) int32 { /* sqlite3.c:222227:12: */
return ((1 + (*Fts5StructureSegment)(unsafe.Pointer(pSeg)).FpgnoLast) - (*Fts5StructureSegment)(unsafe.Pointer(pSeg)).FpgnoFirst)
}
// Return a copy of index structure pStruct. Except, promote as many
// segments as possible to level iPromote. If an OOM occurs, NULL is
// returned.
-func fts5StructurePromoteTo(tls *libc.TLS, p uintptr, iPromote int32, szPromote int32, pStruct uintptr) { /* sqlite3.c:220989:13: */
+func fts5StructurePromoteTo(tls *libc.TLS, p uintptr, iPromote int32, szPromote int32, pStruct uintptr) { /* sqlite3.c:222236:13: */
var il int32
var is int32
var pOut uintptr = ((pStruct + 24 /* &.aLevel */) + uintptr(iPromote)*16)
@@ -171568,7 +179561,7 @@ func fts5StructurePromoteTo(tls *libc.TLS, p uintptr, iPromote int32, szPromote
//
// If one or more segments are promoted, the structure object is updated
// to reflect this.
-func fts5StructurePromote(tls *libc.TLS, p uintptr, iLvl int32, pStruct uintptr) { /* sqlite3.c:221032:13: */
+func fts5StructurePromote(tls *libc.TLS, p uintptr, iLvl int32, pStruct uintptr) { /* sqlite3.c:222279:13: */
if (*Fts5Index)(unsafe.Pointer(p)).Frc == SQLITE_OK {
var iTst int32
var iPromote int32 = -1
@@ -171617,7 +179610,7 @@ func fts5StructurePromote(tls *libc.TLS, p uintptr, iLvl int32, pStruct uintptr)
// Advance the iterator passed as the only argument. If the end of the
// doclist-index page is reached, return non-zero.
-func fts5DlidxLvlNext(tls *libc.TLS, pLvl uintptr) int32 { /* sqlite3.c:221083:12: */
+func fts5DlidxLvlNext(tls *libc.TLS, pLvl uintptr) int32 { /* sqlite3.c:222330:12: */
bp := tls.Alloc(8)
defer tls.Free(8)
@@ -171653,7 +179646,7 @@ func fts5DlidxLvlNext(tls *libc.TLS, pLvl uintptr) int32 { /* sqlite3.c:221083:1
}
// Advance the iterator passed as the only argument.
-func fts5DlidxIterNextR(tls *libc.TLS, p uintptr, pIter uintptr, iLvl int32) int32 { /* sqlite3.c:221115:12: */
+func fts5DlidxIterNextR(tls *libc.TLS, p uintptr, pIter uintptr, iLvl int32) int32 { /* sqlite3.c:222362:12: */
var pLvl uintptr = ((pIter + 8 /* &.aLvl */) + uintptr(iLvl)*32)
if fts5DlidxLvlNext(tls, pLvl) != 0 {
@@ -171674,7 +179667,7 @@ func fts5DlidxIterNextR(tls *libc.TLS, p uintptr, pIter uintptr, iLvl int32) int
return (*Fts5DlidxLvl)(unsafe.Pointer((pIter + 8 /* &.aLvl */))).FbEof
}
-func fts5DlidxIterNext(tls *libc.TLS, p uintptr, pIter uintptr) int32 { /* sqlite3.c:221135:12: */
+func fts5DlidxIterNext(tls *libc.TLS, p uintptr, pIter uintptr) int32 { /* sqlite3.c:222382:12: */
return fts5DlidxIterNextR(tls, p, pIter, 0)
}
@@ -171687,7 +179680,7 @@ func fts5DlidxIterNext(tls *libc.TLS, p uintptr, pIter uintptr) int32 { /* sqlit
//
// When this function is called pIter->iLeafPgno is the page number the
// doclist is associated with (the one featuring the term).
-func fts5DlidxIterFirst(tls *libc.TLS, pIter uintptr) int32 { /* sqlite3.c:221150:12: */
+func fts5DlidxIterFirst(tls *libc.TLS, pIter uintptr) int32 { /* sqlite3.c:222397:12: */
var i int32
for i = 0; i < (*Fts5DlidxIter)(unsafe.Pointer(pIter)).FnLvl; i++ {
fts5DlidxLvlNext(tls, ((pIter + 8 /* &.aLvl */) + uintptr(i)*32))
@@ -171695,11 +179688,11 @@ func fts5DlidxIterFirst(tls *libc.TLS, pIter uintptr) int32 { /* sqlite3.c:22115
return (*Fts5DlidxLvl)(unsafe.Pointer((pIter + 8 /* &.aLvl */))).FbEof
}
-func fts5DlidxIterEof(tls *libc.TLS, p uintptr, pIter uintptr) int32 { /* sqlite3.c:221159:12: */
+func fts5DlidxIterEof(tls *libc.TLS, p uintptr, pIter uintptr) int32 { /* sqlite3.c:222406:12: */
return (libc.Bool32(((*Fts5Index)(unsafe.Pointer(p)).Frc != SQLITE_OK) || ((*Fts5DlidxLvl)(unsafe.Pointer((pIter + 8 /* &.aLvl */))).FbEof != 0)))
}
-func fts5DlidxIterLast(tls *libc.TLS, p uintptr, pIter uintptr) { /* sqlite3.c:221163:13: */
+func fts5DlidxIterLast(tls *libc.TLS, p uintptr, pIter uintptr) { /* sqlite3.c:222410:13: */
var i int32
// Advance each level to the last entry on the last page
@@ -171720,7 +179713,7 @@ func fts5DlidxIterLast(tls *libc.TLS, p uintptr, pIter uintptr) { /* sqlite3.c:2
}
// Move the iterator passed as the only argument to the previous entry.
-func fts5DlidxLvlPrev(tls *libc.TLS, pLvl uintptr) int32 { /* sqlite3.c:221186:12: */
+func fts5DlidxLvlPrev(tls *libc.TLS, pLvl uintptr) int32 { /* sqlite3.c:222433:12: */
bp := tls.Alloc(8)
defer tls.Free(8)
@@ -171782,7 +179775,7 @@ func fts5DlidxLvlPrev(tls *libc.TLS, pLvl uintptr) int32 { /* sqlite3.c:221186:1
return (*Fts5DlidxLvl)(unsafe.Pointer(pLvl)).FbEof
}
-func fts5DlidxIterPrevR(tls *libc.TLS, p uintptr, pIter uintptr, iLvl int32) int32 { /* sqlite3.c:221235:12: */
+func fts5DlidxIterPrevR(tls *libc.TLS, p uintptr, pIter uintptr, iLvl int32) int32 { /* sqlite3.c:222482:12: */
var pLvl uintptr = ((pIter + 8 /* &.aLvl */) + uintptr(iLvl)*32)
if fts5DlidxLvlPrev(tls, pLvl) != 0 {
@@ -171805,12 +179798,12 @@ func fts5DlidxIterPrevR(tls *libc.TLS, p uintptr, pIter uintptr, iLvl int32) int
return (*Fts5DlidxLvl)(unsafe.Pointer((pIter + 8 /* &.aLvl */))).FbEof
}
-func fts5DlidxIterPrev(tls *libc.TLS, p uintptr, pIter uintptr) int32 { /* sqlite3.c:221258:12: */
+func fts5DlidxIterPrev(tls *libc.TLS, p uintptr, pIter uintptr) int32 { /* sqlite3.c:222505:12: */
return fts5DlidxIterPrevR(tls, p, pIter, 0)
}
// Free a doclist-index iterator object allocated by fts5DlidxIterInit().
-func fts5DlidxIterFree(tls *libc.TLS, pIter uintptr) { /* sqlite3.c:221265:13: */
+func fts5DlidxIterFree(tls *libc.TLS, pIter uintptr) { /* sqlite3.c:222512:13: */
if pIter != 0 {
var i int32
for i = 0; i < (*Fts5DlidxIter)(unsafe.Pointer(pIter)).FnLvl; i++ {
@@ -171820,7 +179813,7 @@ func fts5DlidxIterFree(tls *libc.TLS, pIter uintptr) { /* sqlite3.c:221265:13: *
}
}
-func fts5DlidxIterInit(tls *libc.TLS, p uintptr, bRev int32, iSegid int32, iLeafPg int32) uintptr { /* sqlite3.c:221275:22: */
+func fts5DlidxIterInit(tls *libc.TLS, p uintptr, bRev int32, iSegid int32, iLeafPg int32) uintptr { /* sqlite3.c:222522:22: */
var pIter uintptr = uintptr(0)
var i int32
var bDone int32 = 0
@@ -171862,16 +179855,16 @@ func fts5DlidxIterInit(tls *libc.TLS, p uintptr, bRev int32, iSegid int32, iLeaf
return pIter
}
-func fts5DlidxIterRowid(tls *libc.TLS, pIter uintptr) I64 { /* sqlite3.c:221322:12: */
+func fts5DlidxIterRowid(tls *libc.TLS, pIter uintptr) I64 { /* sqlite3.c:222569:12: */
return (*Fts5DlidxLvl)(unsafe.Pointer((pIter + 8 /* &.aLvl */))).FiRowid
}
-func fts5DlidxIterPgno(tls *libc.TLS, pIter uintptr) int32 { /* sqlite3.c:221325:12: */
+func fts5DlidxIterPgno(tls *libc.TLS, pIter uintptr) int32 { /* sqlite3.c:222572:12: */
return (*Fts5DlidxLvl)(unsafe.Pointer((pIter + 8 /* &.aLvl */))).FiLeafPgno
}
// Load the next leaf page into the segment iterator.
-func fts5SegIterNextPage(tls *libc.TLS, p uintptr, pIter uintptr) { /* sqlite3.c:221332:13: */
+func fts5SegIterNextPage(tls *libc.TLS, p uintptr, pIter uintptr) { /* sqlite3.c:222579:13: */
var pLeaf uintptr
var pSeg uintptr = (*Fts5SegIter)(unsafe.Pointer(pIter)).FpSeg
fts5DataRelease(tls, (*Fts5SegIter)(unsafe.Pointer(pIter)).FpLeaf)
@@ -171901,7 +179894,7 @@ func fts5SegIterNextPage(tls *libc.TLS, p uintptr, pIter uintptr) { /* sqlite3.c
// position list size field. Read the varint and return the number of bytes
// read. Before returning, set *pnSz to the number of bytes in the position
// list, and *pbDel to true if the delete flag is set, or false otherwise.
-func fts5GetPoslistSize(tls *libc.TLS, p uintptr, pnSz uintptr, pbDel uintptr) int32 { /* sqlite3.c:221370:12: */
+func fts5GetPoslistSize(tls *libc.TLS, p uintptr, pnSz uintptr, pbDel uintptr) int32 { /* sqlite3.c:222617:12: */
bp := tls.Alloc(4)
defer tls.Free(4)
@@ -171930,12 +179923,12 @@ func fts5GetPoslistSize(tls *libc.TLS, p uintptr, pnSz uintptr, pbDel uintptr) i
//
// Leave Fts5SegIter.iLeafOffset pointing to the first byte of the
// position list content (if any).
-func fts5SegIterLoadNPos(tls *libc.TLS, p uintptr, pIter uintptr) { /* sqlite3.c:221391:13: */
+func fts5SegIterLoadNPos(tls *libc.TLS, p uintptr, pIter uintptr) { /* sqlite3.c:222638:13: */
bp := tls.Alloc(4)
defer tls.Free(4)
if (*Fts5Index)(unsafe.Pointer(p)).Frc == SQLITE_OK {
- var iOff int32 = (*Fts5SegIter)(unsafe.Pointer(pIter)).FiLeafOffset // Offset to read at
+ var iOff int32 = int32((*Fts5SegIter)(unsafe.Pointer(pIter)).FiLeafOffset) // Offset to read at
if (*Fts5Config)(unsafe.Pointer((*Fts5Index)(unsafe.Pointer(p)).FpConfig)).FeDetail == FTS5_DETAIL_NONE {
var iEod int32 = func() int32 {
@@ -171971,15 +179964,15 @@ func fts5SegIterLoadNPos(tls *libc.TLS, p uintptr, pIter uintptr) { /* sqlite3.c
(*Fts5SegIter)(unsafe.Pointer(pIter)).FnPos = (*(*int32)(unsafe.Pointer(bp /* nSz */)) >> 1)
}
- (*Fts5SegIter)(unsafe.Pointer(pIter)).FiLeafOffset = iOff
+ (*Fts5SegIter)(unsafe.Pointer(pIter)).FiLeafOffset = I64(iOff)
}
}
-func fts5SegIterLoadRowid(tls *libc.TLS, p uintptr, pIter uintptr) { /* sqlite3.c:221420:13: */
+func fts5SegIterLoadRowid(tls *libc.TLS, p uintptr, pIter uintptr) { /* sqlite3.c:222667:13: */
var a uintptr = (*Fts5Data)(unsafe.Pointer((*Fts5SegIter)(unsafe.Pointer(pIter)).FpLeaf)).Fp // Buffer to read data from
- var iOff int32 = (*Fts5SegIter)(unsafe.Pointer(pIter)).FiLeafOffset
+ var iOff I64 = (*Fts5SegIter)(unsafe.Pointer(pIter)).FiLeafOffset
- if iOff >= (*Fts5Data)(unsafe.Pointer((*Fts5SegIter)(unsafe.Pointer(pIter)).FpLeaf)).FszLeaf {
+ if iOff >= I64((*Fts5Data)(unsafe.Pointer((*Fts5SegIter)(unsafe.Pointer(pIter)).FpLeaf)).FszLeaf) {
fts5SegIterNextPage(tls, p, pIter)
if (*Fts5SegIter)(unsafe.Pointer(pIter)).FpLeaf == uintptr(0) {
if (*Fts5Index)(unsafe.Pointer(p)).Frc == SQLITE_OK {
@@ -171987,10 +179980,10 @@ func fts5SegIterLoadRowid(tls *libc.TLS, p uintptr, pIter uintptr) { /* sqlite3.
}
return
}
- iOff = 4
+ iOff = int64(4)
a = (*Fts5Data)(unsafe.Pointer((*Fts5SegIter)(unsafe.Pointer(pIter)).FpLeaf)).Fp
}
- iOff = iOff + (int32(sqlite3Fts5GetVarint(tls, (a + uintptr(iOff)), (pIter + 104 /* &.iRowid */))))
+ iOff = iOff + (I64(sqlite3Fts5GetVarint(tls, (a + uintptr(iOff)), (pIter + 104 /* &.iRowid */))))
(*Fts5SegIter)(unsafe.Pointer(pIter)).FiLeafOffset = iOff
}
@@ -172007,25 +180000,25 @@ func fts5SegIterLoadRowid(tls *libc.TLS, p uintptr, pIter uintptr) { /* sqlite3.
// accordingly and leaves (Fts5SegIter.iLeafOffset) set to the content of
// the first position list. The position list belonging to document
// (Fts5SegIter.iRowid).
-func fts5SegIterLoadTerm(tls *libc.TLS, p uintptr, pIter uintptr, nKeep int32) { /* sqlite3.c:221453:13: */
+func fts5SegIterLoadTerm(tls *libc.TLS, p uintptr, pIter uintptr, nKeep int32) { /* sqlite3.c:222700:13: */
bp := tls.Alloc(8)
defer tls.Free(8)
var a uintptr = (*Fts5Data)(unsafe.Pointer((*Fts5SegIter)(unsafe.Pointer(pIter)).FpLeaf)).Fp // Buffer to read data from
- var iOff int32 = (*Fts5SegIter)(unsafe.Pointer(pIter)).FiLeafOffset // Offset to read at
+ var iOff I64 = (*Fts5SegIter)(unsafe.Pointer(pIter)).FiLeafOffset // Offset to read at
// var nNew int32 at bp, 4
// Bytes of new data
- iOff = iOff + (sqlite3Fts5GetVarint32(tls, (a + uintptr(iOff)), bp /* &nNew */))
- if (((iOff + *(*int32)(unsafe.Pointer(bp /* nNew */))) > (*Fts5Data)(unsafe.Pointer((*Fts5SegIter)(unsafe.Pointer(pIter)).FpLeaf)).FszLeaf) || (nKeep > (*Fts5SegIter)(unsafe.Pointer(pIter)).Fterm.Fn)) || (*(*int32)(unsafe.Pointer(bp /* nNew */)) == 0) {
+ iOff = iOff + (I64(sqlite3Fts5GetVarint32(tls, (a + uintptr(iOff)), bp /* &nNew */)))
+ if (((iOff + I64(*(*int32)(unsafe.Pointer(bp /* nNew */)))) > I64((*Fts5Data)(unsafe.Pointer((*Fts5SegIter)(unsafe.Pointer(pIter)).FpLeaf)).FszLeaf)) || (nKeep > (*Fts5SegIter)(unsafe.Pointer(pIter)).Fterm.Fn)) || (*(*int32)(unsafe.Pointer(bp /* nNew */)) == 0) {
(*Fts5Index)(unsafe.Pointer(p)).Frc = (SQLITE_CORRUPT | (int32(1) << 8))
return
}
(*Fts5SegIter)(unsafe.Pointer(pIter)).Fterm.Fn = nKeep
sqlite3Fts5BufferAppendBlob(tls, (p + 52 /* &.rc */), (pIter + 88 /* &.term */), uint32(*(*int32)(unsafe.Pointer(bp /* nNew */))), (a + uintptr(iOff)))
- iOff = iOff + (*(*int32)(unsafe.Pointer(bp /* nNew */)))
- (*Fts5SegIter)(unsafe.Pointer(pIter)).FiTermLeafOffset = iOff
+ iOff = iOff + (I64(*(*int32)(unsafe.Pointer(bp /* nNew */))))
+ (*Fts5SegIter)(unsafe.Pointer(pIter)).FiTermLeafOffset = int32(iOff)
(*Fts5SegIter)(unsafe.Pointer(pIter)).FiTermLeafPgno = (*Fts5SegIter)(unsafe.Pointer(pIter)).FiLeafPgno
(*Fts5SegIter)(unsafe.Pointer(pIter)).FiLeafOffset = iOff
@@ -172041,7 +180034,7 @@ func fts5SegIterLoadTerm(tls *libc.TLS, p uintptr, pIter uintptr, nKeep int32) {
fts5SegIterLoadRowid(tls, p, pIter)
}
-func fts5SegIterSetNext(tls *libc.TLS, p uintptr, pIter uintptr) { /* sqlite3.c:221486:13: */
+func fts5SegIterSetNext(tls *libc.TLS, p uintptr, pIter uintptr) { /* sqlite3.c:222733:13: */
if ((*Fts5SegIter)(unsafe.Pointer(pIter)).Fflags & FTS5_SEGITER_REVERSE) != 0 {
(*Fts5SegIter)(unsafe.Pointer(pIter)).FxNext = *(*uintptr)(unsafe.Pointer(&struct {
f func(*libc.TLS, uintptr, uintptr, uintptr)
@@ -172063,7 +180056,7 @@ func fts5SegIterSetNext(tls *libc.TLS, p uintptr, pIter uintptr) { /* sqlite3.c:
//
// If an error occurs, Fts5Index.rc is set to an appropriate error code. If
// an error has already occurred when this function is called, it is a no-op.
-func fts5SegIterInit(tls *libc.TLS, p uintptr, pSeg uintptr, pIter uintptr) { /* sqlite3.c:221504:13: */
+func fts5SegIterInit(tls *libc.TLS, p uintptr, pSeg uintptr, pIter uintptr) { /* sqlite3.c:222751:13: */
if (*Fts5StructureSegment)(unsafe.Pointer(pSeg)).FpgnoFirst == 0 {
// This happens if the segment is being used as an input to an incremental
// merge and all data has already been "trimmed". See function
@@ -172083,7 +180076,7 @@ func fts5SegIterInit(tls *libc.TLS, p uintptr, pSeg uintptr, pIter uintptr) { /*
}
if (*Fts5Index)(unsafe.Pointer(p)).Frc == SQLITE_OK {
- (*Fts5SegIter)(unsafe.Pointer(pIter)).FiLeafOffset = 4
+ (*Fts5SegIter)(unsafe.Pointer(pIter)).FiLeafOffset = int64(4)
(*Fts5SegIter)(unsafe.Pointer(pIter)).FiPgidxOff = ((*Fts5Data)(unsafe.Pointer((*Fts5SegIter)(unsafe.Pointer(pIter)).FpLeaf)).FszLeaf + 1)
fts5SegIterLoadTerm(tls, p, pIter, 0)
@@ -172104,13 +180097,13 @@ func fts5SegIterInit(tls *libc.TLS, p uintptr, pSeg uintptr, pIter uintptr) { /*
// aRowidOffset[] and iRowidOffset variables. At this point the iterator
// is in its regular state - Fts5SegIter.iLeafOffset points to the first
// byte of the position list content associated with said rowid.
-func fts5SegIterReverseInitPage(tls *libc.TLS, p uintptr, pIter uintptr) { /* sqlite3.c:221552:13: */
+func fts5SegIterReverseInitPage(tls *libc.TLS, p uintptr, pIter uintptr) { /* sqlite3.c:222799:13: */
bp := tls.Alloc(16)
defer tls.Free(16)
var eDetail int32 = (*Fts5Config)(unsafe.Pointer((*Fts5Index)(unsafe.Pointer(p)).FpConfig)).FeDetail
var n int32 = (*Fts5Data)(unsafe.Pointer((*Fts5SegIter)(unsafe.Pointer(pIter)).FpLeaf)).FszLeaf
- var i int32 = (*Fts5SegIter)(unsafe.Pointer(pIter)).FiLeafOffset
+ var i int32 = int32((*Fts5SegIter)(unsafe.Pointer(pIter)).FiLeafOffset)
var a uintptr = (*Fts5Data)(unsafe.Pointer((*Fts5SegIter)(unsafe.Pointer(pIter)).FpLeaf)).Fp
var iRowidOffset int32 = 0
@@ -172155,15 +180148,15 @@ func fts5SegIterReverseInitPage(tls *libc.TLS, p uintptr, pIter uintptr) { /* sq
(*Fts5SegIter)(unsafe.Pointer(pIter)).FnRowidOffset = nNew
}
- *(*int32)(unsafe.Pointer((*Fts5SegIter)(unsafe.Pointer(pIter)).FaRowidOffset + uintptr(libc.PostIncInt32(&iRowidOffset, 1))*4)) = (*Fts5SegIter)(unsafe.Pointer(pIter)).FiLeafOffset
- (*Fts5SegIter)(unsafe.Pointer(pIter)).FiLeafOffset = i
+ *(*int32)(unsafe.Pointer((*Fts5SegIter)(unsafe.Pointer(pIter)).FaRowidOffset + uintptr(libc.PostIncInt32(&iRowidOffset, 1))*4)) = int32((*Fts5SegIter)(unsafe.Pointer(pIter)).FiLeafOffset)
+ (*Fts5SegIter)(unsafe.Pointer(pIter)).FiLeafOffset = I64(i)
}
(*Fts5SegIter)(unsafe.Pointer(pIter)).FiRowidOffset = iRowidOffset
fts5SegIterLoadNPos(tls, p, pIter)
}
//
-func fts5SegIterReverseNewPage(tls *libc.TLS, p uintptr, pIter uintptr) { /* sqlite3.c:221605:13: */
+func fts5SegIterReverseNewPage(tls *libc.TLS, p uintptr, pIter uintptr) { /* sqlite3.c:222852:13: */
fts5DataRelease(tls, (*Fts5SegIter)(unsafe.Pointer(pIter)).FpLeaf)
(*Fts5SegIter)(unsafe.Pointer(pIter)).FpLeaf = uintptr(0)
@@ -172179,20 +180172,20 @@ func fts5SegIterReverseNewPage(tls *libc.TLS, p uintptr, pIter uintptr) { /* sql
if (*Fts5SegIter)(unsafe.Pointer(pIter)).FiTermLeafOffset < (*Fts5Data)(unsafe.Pointer(pNew)).FszLeaf {
(*Fts5SegIter)(unsafe.Pointer(pIter)).FpLeaf = pNew
- (*Fts5SegIter)(unsafe.Pointer(pIter)).FiLeafOffset = (*Fts5SegIter)(unsafe.Pointer(pIter)).FiTermLeafOffset
+ (*Fts5SegIter)(unsafe.Pointer(pIter)).FiLeafOffset = I64((*Fts5SegIter)(unsafe.Pointer(pIter)).FiTermLeafOffset)
}
} else {
var iRowidOff int32
iRowidOff = int32(fts5GetU16(tls, (*Fts5Data)(unsafe.Pointer(pNew)).Fp))
if iRowidOff != 0 {
(*Fts5SegIter)(unsafe.Pointer(pIter)).FpLeaf = pNew
- (*Fts5SegIter)(unsafe.Pointer(pIter)).FiLeafOffset = iRowidOff
+ (*Fts5SegIter)(unsafe.Pointer(pIter)).FiLeafOffset = I64(iRowidOff)
}
}
if (*Fts5SegIter)(unsafe.Pointer(pIter)).FpLeaf != 0 {
var a uintptr = ((*Fts5Data)(unsafe.Pointer((*Fts5SegIter)(unsafe.Pointer(pIter)).FpLeaf)).Fp + uintptr((*Fts5SegIter)(unsafe.Pointer(pIter)).FiLeafOffset))
- *(*int32)(unsafe.Pointer(pIter + 32 /* &.iLeafOffset */)) += (int32(sqlite3Fts5GetVarint(tls, a, (pIter + 104 /* &.iRowid */))))
+ *(*I64)(unsafe.Pointer(pIter + 32 /* &.iLeafOffset */)) += (I64(sqlite3Fts5GetVarint(tls, a, (pIter + 104 /* &.iRowid */))))
break
} else {
fts5DataRelease(tls, pNew)
@@ -172209,7 +180202,7 @@ func fts5SegIterReverseNewPage(tls *libc.TLS, p uintptr, pIter uintptr) { /* sql
// Return true if the iterator passed as the second argument currently
// points to a delete marker. A delete marker is an entry with a 0 byte
// position-list.
-func fts5MultiIterIsEmpty(tls *libc.TLS, p uintptr, pIter uintptr) int32 { /* sqlite3.c:221657:12: */
+func fts5MultiIterIsEmpty(tls *libc.TLS, p uintptr, pIter uintptr) int32 { /* sqlite3.c:222904:12: */
var pSeg uintptr = ((pIter + 96 /* &.aSeg */) + uintptr((*Fts5CResult)(unsafe.Pointer((*Fts5Iter)(unsafe.Pointer(pIter)).FaFirst+1*4)).FiFirst)*120)
return (libc.Bool32((((*Fts5Index)(unsafe.Pointer(p)).Frc == SQLITE_OK) && ((*Fts5SegIter)(unsafe.Pointer(pSeg)).FpLeaf != 0)) && ((*Fts5SegIter)(unsafe.Pointer(pSeg)).FnPos == 0)))
}
@@ -172217,7 +180210,7 @@ func fts5MultiIterIsEmpty(tls *libc.TLS, p uintptr, pIter uintptr) int32 { /* sq
// Advance iterator pIter to the next entry.
//
// This version of fts5SegIterNext() is only used by reverse iterators.
-func fts5SegIterNext_Reverse(tls *libc.TLS, p uintptr, pIter uintptr, pbUnused uintptr) { /* sqlite3.c:221667:13: */
+func fts5SegIterNext_Reverse(tls *libc.TLS, p uintptr, pIter uintptr, pbUnused uintptr) { /* sqlite3.c:222914:13: */
bp := tls.Alloc(8)
defer tls.Free(8)
@@ -172229,9 +180222,9 @@ func fts5SegIterNext_Reverse(tls *libc.TLS, p uintptr, pIter uintptr, pbUnused u
// var iDelta U64 at bp, 8
(*Fts5SegIter)(unsafe.Pointer(pIter)).FiRowidOffset--
- (*Fts5SegIter)(unsafe.Pointer(pIter)).FiLeafOffset = *(*int32)(unsafe.Pointer((*Fts5SegIter)(unsafe.Pointer(pIter)).FaRowidOffset + uintptr((*Fts5SegIter)(unsafe.Pointer(pIter)).FiRowidOffset)*4))
+ (*Fts5SegIter)(unsafe.Pointer(pIter)).FiLeafOffset = I64(*(*int32)(unsafe.Pointer((*Fts5SegIter)(unsafe.Pointer(pIter)).FaRowidOffset + uintptr((*Fts5SegIter)(unsafe.Pointer(pIter)).FiRowidOffset)*4)))
fts5SegIterLoadNPos(tls, p, pIter)
- iOff = (*Fts5SegIter)(unsafe.Pointer(pIter)).FiLeafOffset
+ iOff = int32((*Fts5SegIter)(unsafe.Pointer(pIter)).FiLeafOffset)
if (*Fts5Config)(unsafe.Pointer((*Fts5Index)(unsafe.Pointer(p)).FpConfig)).FeDetail != FTS5_DETAIL_NONE {
iOff = iOff + ((*Fts5SegIter)(unsafe.Pointer(pIter)).FnPos)
}
@@ -172246,7 +180239,7 @@ func fts5SegIterNext_Reverse(tls *libc.TLS, p uintptr, pIter uintptr, pbUnused u
//
// This version of fts5SegIterNext() is only used if detail=none and the
// iterator is not a reverse direction iterator.
-func fts5SegIterNext_None(tls *libc.TLS, p uintptr, pIter uintptr, pbNewTerm uintptr) { /* sqlite3.c:221701:13: */
+func fts5SegIterNext_None(tls *libc.TLS, p uintptr, pIter uintptr, pbNewTerm uintptr) { /* sqlite3.c:222948:13: */
bp := tls.Alloc(36)
defer tls.Free(36)
@@ -172262,7 +180255,7 @@ func fts5SegIterNext_None(tls *libc.TLS, p uintptr, pIter uintptr, pbNewTerm uin
// var nList int32 at bp+32, 4
- iOff = (*Fts5SegIter)(unsafe.Pointer(pIter)).FiLeafOffset
+ iOff = int32((*Fts5SegIter)(unsafe.Pointer(pIter)).FiLeafOffset)
// Next entry is on the next page
if !(((*Fts5SegIter)(unsafe.Pointer(pIter)).FpSeg != 0) && (iOff >= (*Fts5Data)(unsafe.Pointer((*Fts5SegIter)(unsafe.Pointer(pIter)).FpLeaf)).FszLeaf)) {
@@ -172284,7 +180277,7 @@ __1:
goto __3
}
iOff = iOff + (int32(sqlite3Fts5GetVarint(tls, ((*Fts5Data)(unsafe.Pointer((*Fts5SegIter)(unsafe.Pointer(pIter)).FpLeaf)).Fp + uintptr(iOff)), bp /* &iDelta */)))
- (*Fts5SegIter)(unsafe.Pointer(pIter)).FiLeafOffset = iOff
+ (*Fts5SegIter)(unsafe.Pointer(pIter)).FiLeafOffset = I64(iOff)
*(*I64)(unsafe.Pointer(pIter + 104 /* &.iRowid */)) += (*(*I64)(unsafe.Pointer(bp /* iDelta */)))
goto __4
__3:
@@ -172301,7 +180294,7 @@ __3:
iOff = iOff + (sqlite3Fts5GetVarint32(tls, ((*Fts5Data)(unsafe.Pointer((*Fts5SegIter)(unsafe.Pointer(pIter)).FpLeaf)).Fp + uintptr(iOff)), bp+8 /* &nKeep */))
__9:
;
- (*Fts5SegIter)(unsafe.Pointer(pIter)).FiLeafOffset = iOff
+ (*Fts5SegIter)(unsafe.Pointer(pIter)).FiLeafOffset = I64(iOff)
fts5SegIterLoadTerm(tls, p, pIter, *(*int32)(unsafe.Pointer(bp + 8 /* nKeep */)))
goto __8
__7:
@@ -172320,7 +180313,7 @@ __10:
(*Fts5Data)(unsafe.Pointer((*Fts5SegIter)(unsafe.Pointer(pIter)).FpLeaf)).FszLeaf = *(*int32)(unsafe.Pointer(bp + 32 /* nList */))
(*Fts5SegIter)(unsafe.Pointer(pIter)).FiEndofDoclist = *(*int32)(unsafe.Pointer(bp + 32 /* nList */))
sqlite3Fts5BufferSet(tls, (p + 52 /* &.rc */), (pIter + 88 /* &.term */), int32(libc.Xstrlen(tls, *(*uintptr)(unsafe.Pointer(bp + 16 /* zTerm */)))), *(*uintptr)(unsafe.Pointer(bp + 16 /* zTerm */)))
- (*Fts5SegIter)(unsafe.Pointer(pIter)).FiLeafOffset = int32(sqlite3Fts5GetVarint(tls, *(*uintptr)(unsafe.Pointer(bp + 24 /* pList */)), (pIter + 104 /* &.iRowid */)))
+ (*Fts5SegIter)(unsafe.Pointer(pIter)).FiLeafOffset = I64(sqlite3Fts5GetVarint(tls, *(*uintptr)(unsafe.Pointer(bp + 24 /* pList */)), (pIter + 104 /* &.iRowid */)))
__8:
;
@@ -172351,7 +180344,7 @@ next_none_eof:
// If an error occurs, Fts5Index.rc is set to an appropriate error code. It
// is not considered an error if the iterator reaches EOF. If an error has
// already occurred when this function is called, it is a no-op.
-func fts5SegIterNext(tls *libc.TLS, p uintptr, pIter uintptr, pbNewTerm uintptr) { /* sqlite3.c:221773:13: */
+func fts5SegIterNext(tls *libc.TLS, p uintptr, pIter uintptr, pbNewTerm uintptr) { /* sqlite3.c:223020:13: */
bp := tls.Alloc(44)
defer tls.Free(44)
@@ -172367,7 +180360,7 @@ func fts5SegIterNext(tls *libc.TLS, p uintptr, pIter uintptr, pbNewTerm uintptr)
a = (*Fts5Data)(unsafe.Pointer(pLeaf)).Fp
n = (*Fts5Data)(unsafe.Pointer(pLeaf)).FszLeaf
- *(*int32)(unsafe.Pointer(bp + 36 /* iOff */)) = ((*Fts5SegIter)(unsafe.Pointer(pIter)).FiLeafOffset + (*Fts5SegIter)(unsafe.Pointer(pIter)).FnPos)
+ *(*int32)(unsafe.Pointer(bp + 36 /* iOff */)) = (int32((*Fts5SegIter)(unsafe.Pointer(pIter)).FiLeafOffset + I64((*Fts5SegIter)(unsafe.Pointer(pIter)).FnPos)))
if *(*int32)(unsafe.Pointer(bp + 36 /* iOff */)) < n {
// The next entry is on the current page.
@@ -172384,7 +180377,7 @@ func fts5SegIterNext(tls *libc.TLS, p uintptr, pIter uintptr, pbNewTerm uintptr)
*(*I64)(unsafe.Pointer(pIter + 104 /* &.iRowid */)) += I64((*(*U64)(unsafe.Pointer(bp + 8 /* iDelta */))))
}
- (*Fts5SegIter)(unsafe.Pointer(pIter)).FiLeafOffset = *(*int32)(unsafe.Pointer(bp + 36 /* iOff */))
+ (*Fts5SegIter)(unsafe.Pointer(pIter)).FiLeafOffset = I64(*(*int32)(unsafe.Pointer(bp + 36 /* iOff */)))
} else if (*Fts5SegIter)(unsafe.Pointer(pIter)).FpSeg == uintptr(0) {
*(*uintptr)(unsafe.Pointer(bp + 24 /* pList */)) = uintptr(0)
@@ -172405,7 +180398,7 @@ func fts5SegIterNext(tls *libc.TLS, p uintptr, pIter uintptr, pbNewTerm uintptr)
(*Fts5SegIter)(unsafe.Pointer(pIter)).FiEndofDoclist = (*(*int32)(unsafe.Pointer(bp + 32 /* nList */)) + 1)
sqlite3Fts5BufferSet(tls, (p + 52 /* &.rc */), (pIter + 88 /* &.term */), int32(libc.Xstrlen(tls, *(*uintptr)(unsafe.Pointer(bp + 16 /* zTerm */)))),
*(*uintptr)(unsafe.Pointer(bp + 16 /* zTerm */)))
- (*Fts5SegIter)(unsafe.Pointer(pIter)).FiLeafOffset = int32(sqlite3Fts5GetVarint(tls, *(*uintptr)(unsafe.Pointer(bp + 24 /* pList */)), (pIter + 104 /* &.iRowid */)))
+ (*Fts5SegIter)(unsafe.Pointer(pIter)).FiLeafOffset = I64(sqlite3Fts5GetVarint(tls, *(*uintptr)(unsafe.Pointer(bp + 24 /* pList */)), (pIter + 104 /* &.iRowid */)))
*(*int32)(unsafe.Pointer(pbNewTerm)) = 1
}
} else {
@@ -172420,14 +180413,14 @@ func fts5SegIterNext(tls *libc.TLS, p uintptr, pIter uintptr, pbNewTerm uintptr)
if (libc.AssignPtrInt32(bp+36 /* iOff */, int32(fts5GetU16(tls, (*Fts5Data)(unsafe.Pointer(pLeaf)).Fp))) != 0) && (*(*int32)(unsafe.Pointer(bp + 36 /* iOff */)) < (*Fts5Data)(unsafe.Pointer(pLeaf)).FszLeaf) {
*(*int32)(unsafe.Pointer(bp + 36 /* iOff */)) += int32(sqlite3Fts5GetVarint(tls, ((*Fts5Data)(unsafe.Pointer(pLeaf)).Fp + uintptr(*(*int32)(unsafe.Pointer(bp + 36 /* iOff */)))), (pIter + 104 /* &.iRowid */)))
- (*Fts5SegIter)(unsafe.Pointer(pIter)).FiLeafOffset = *(*int32)(unsafe.Pointer(bp + 36 /* iOff */))
+ (*Fts5SegIter)(unsafe.Pointer(pIter)).FiLeafOffset = I64(*(*int32)(unsafe.Pointer(bp + 36 /* iOff */)))
if (*Fts5Data)(unsafe.Pointer(pLeaf)).Fnn > (*Fts5Data)(unsafe.Pointer(pLeaf)).FszLeaf {
(*Fts5SegIter)(unsafe.Pointer(pIter)).FiPgidxOff = ((*Fts5Data)(unsafe.Pointer(pLeaf)).FszLeaf + sqlite3Fts5GetVarint32(tls, ((*Fts5Data)(unsafe.Pointer(pLeaf)).Fp+uintptr((*Fts5Data)(unsafe.Pointer(pLeaf)).FszLeaf)), (pIter+60 /* &.iEndofDoclist */)))
}
} else if (*Fts5Data)(unsafe.Pointer(pLeaf)).Fnn > (*Fts5Data)(unsafe.Pointer(pLeaf)).FszLeaf {
(*Fts5SegIter)(unsafe.Pointer(pIter)).FiPgidxOff = ((*Fts5Data)(unsafe.Pointer(pLeaf)).FszLeaf + sqlite3Fts5GetVarint32(tls, ((*Fts5Data)(unsafe.Pointer(pLeaf)).Fp+uintptr((*Fts5Data)(unsafe.Pointer(pLeaf)).FszLeaf)), bp+36 /* &iOff */))
- (*Fts5SegIter)(unsafe.Pointer(pIter)).FiLeafOffset = *(*int32)(unsafe.Pointer(bp + 36 /* iOff */))
+ (*Fts5SegIter)(unsafe.Pointer(pIter)).FiLeafOffset = I64(*(*int32)(unsafe.Pointer(bp + 36 /* iOff */)))
(*Fts5SegIter)(unsafe.Pointer(pIter)).FiEndofDoclist = *(*int32)(unsafe.Pointer(bp + 36 /* iOff */))
bNewTerm = 1
}
@@ -172459,10 +180452,10 @@ func fts5SegIterNext(tls *libc.TLS, p uintptr, pIter uintptr, pbNewTerm uintptr)
// var nSz int32 at bp+40, 4
{
- *(*int32)(unsafe.Pointer(bp + 40 /* nSz */)) = int32(*(*U8)(unsafe.Pointer(((*Fts5Data)(unsafe.Pointer((*Fts5SegIter)(unsafe.Pointer(pIter)).FpLeaf)).Fp) + uintptr(libc.PostIncInt32(&(*Fts5SegIter)(unsafe.Pointer(pIter)).FiLeafOffset, 1)))))
+ *(*int32)(unsafe.Pointer(bp + 40 /* nSz */)) = int32(*(*U8)(unsafe.Pointer(((*Fts5Data)(unsafe.Pointer((*Fts5SegIter)(unsafe.Pointer(pIter)).FpLeaf)).Fp) + uintptr(libc.PostIncInt64(&(*Fts5SegIter)(unsafe.Pointer(pIter)).FiLeafOffset, 1)))))
if (*(*int32)(unsafe.Pointer(bp + 40 /* nSz */)) & 0x80) != 0 {
(*Fts5SegIter)(unsafe.Pointer(pIter)).FiLeafOffset--
- *(*int32)(unsafe.Pointer(pIter + 32 /* &.iLeafOffset */)) += (sqlite3Fts5GetVarint32(tls, (((*Fts5Data)(unsafe.Pointer((*Fts5SegIter)(unsafe.Pointer(pIter)).FpLeaf)).Fp) + uintptr((*Fts5SegIter)(unsafe.Pointer(pIter)).FiLeafOffset)), bp+40 /* &nSz */))
+ *(*I64)(unsafe.Pointer(pIter + 32 /* &.iLeafOffset */)) += (I64(sqlite3Fts5GetVarint32(tls, (((*Fts5Data)(unsafe.Pointer((*Fts5SegIter)(unsafe.Pointer(pIter)).FpLeaf)).Fp) + uintptr((*Fts5SegIter)(unsafe.Pointer(pIter)).FiLeafOffset)), bp+40 /* &nSz */)))
}
}
@@ -172476,7 +180469,7 @@ func fts5SegIterNext(tls *libc.TLS, p uintptr, pIter uintptr, pbNewTerm uintptr)
// Iterator pIter currently points to the first rowid in a doclist. This
// function sets the iterator up so that iterates in reverse order through
// the doclist.
-func fts5SegIterReverse(tls *libc.TLS, p uintptr, pIter uintptr) { /* sqlite3.c:221905:13: */
+func fts5SegIterReverse(tls *libc.TLS, p uintptr, pIter uintptr) { /* sqlite3.c:223151:13: */
var pDlidx uintptr = (*Fts5SegIter)(unsafe.Pointer(pIter)).FpDlidx
var pLast uintptr = uintptr(0)
var pgnoLast int32 = 0
@@ -172503,7 +180496,7 @@ func fts5SegIterReverse(tls *libc.TLS, p uintptr, pIter uintptr) { /* sqlite3.c:
}
}
- (*Fts5SegIter)(unsafe.Pointer(pIter)).FiLeafOffset = iPoslist
+ (*Fts5SegIter)(unsafe.Pointer(pIter)).FiLeafOffset = I64(iPoslist)
// If this condition is true then the largest rowid for the current
// term may not be stored on the current page. So search forward to
@@ -172556,7 +180549,7 @@ func fts5SegIterReverse(tls *libc.TLS, p uintptr, pIter uintptr) { /* sqlite3.c:
(*Fts5SegIter)(unsafe.Pointer(pIter)).FiLeafPgno = pgnoLast
iOff = int32(fts5GetU16(tls, (*Fts5Data)(unsafe.Pointer(pLast)).Fp))
iOff = iOff + (int32(sqlite3Fts5GetVarint(tls, ((*Fts5Data)(unsafe.Pointer(pLast)).Fp + uintptr(iOff)), (pIter + 104 /* &.iRowid */))))
- (*Fts5SegIter)(unsafe.Pointer(pIter)).FiLeafOffset = iOff
+ (*Fts5SegIter)(unsafe.Pointer(pIter)).FiLeafOffset = I64(iOff)
if (*Fts5Data)(unsafe.Pointer((pLast))).FszLeaf >= (*Fts5Data)(unsafe.Pointer((pLast))).Fnn {
(*Fts5SegIter)(unsafe.Pointer(pIter)).FiEndofDoclist = ((*Fts5Data)(unsafe.Pointer(pLast)).Fnn + 1)
@@ -172573,7 +180566,7 @@ func fts5SegIterReverse(tls *libc.TLS, p uintptr, pIter uintptr) { /* sqlite3.c:
// There is a doclist-index associated with the final term on the current
// page. If the current term is the last term on the page, load the
// doclist-index from disk and initialize an iterator at (pIter->pDlidx).
-func fts5SegIterLoadDlidx(tls *libc.TLS, p uintptr, pIter uintptr) { /* sqlite3.c:221991:13: */
+func fts5SegIterLoadDlidx(tls *libc.TLS, p uintptr, pIter uintptr) { /* sqlite3.c:223237:13: */
var iSeg int32 = (*Fts5StructureSegment)(unsafe.Pointer((*Fts5SegIter)(unsafe.Pointer(pIter)).FpSeg)).FiSegid
var bRev int32 = ((*Fts5SegIter)(unsafe.Pointer(pIter)).Fflags & FTS5_SEGITER_REVERSE)
var pLeaf uintptr = (*Fts5SegIter)(unsafe.Pointer(pIter)).FpLeaf // Current leaf data
@@ -172601,7 +180594,7 @@ func fts5SegIterLoadDlidx(tls *libc.TLS, p uintptr, pIter uintptr) { /* sqlite3.
// iterator is left pointing to the smallest term in the segment that
// is larger than the specified term, even if this term is not on the
// current page.
-func fts5LeafSeek(tls *libc.TLS, p uintptr, bGe int32, pIter uintptr, pTerm uintptr, nTerm int32) { /* sqlite3.c:222025:13: */
+func fts5LeafSeek(tls *libc.TLS, p uintptr, bGe int32, pIter uintptr, pTerm uintptr, nTerm int32) { /* sqlite3.c:223271:13: */
bp := tls.Alloc(20)
defer tls.Free(20)
@@ -172814,8 +180807,8 @@ search_success:
return
__29:
;
- (*Fts5SegIter)(unsafe.Pointer(pIter)).FiLeafOffset = (int32(U32(*(*int32)(unsafe.Pointer(bp + 12 /* iOff */))) + *(*U32)(unsafe.Pointer(bp + 4 /* nNew */))))
- (*Fts5SegIter)(unsafe.Pointer(pIter)).FiTermLeafOffset = (*Fts5SegIter)(unsafe.Pointer(pIter)).FiLeafOffset
+ (*Fts5SegIter)(unsafe.Pointer(pIter)).FiLeafOffset = (I64(U32(*(*int32)(unsafe.Pointer(bp + 12 /* iOff */))) + *(*U32)(unsafe.Pointer(bp + 4 /* nNew */))))
+ (*Fts5SegIter)(unsafe.Pointer(pIter)).FiTermLeafOffset = int32((*Fts5SegIter)(unsafe.Pointer(pIter)).FiLeafOffset)
(*Fts5SegIter)(unsafe.Pointer(pIter)).FiTermLeafPgno = (*Fts5SegIter)(unsafe.Pointer(pIter)).FiLeafPgno
sqlite3Fts5BufferSet(tls, (p + 52 /* &.rc */), (pIter + 88 /* &.term */), int32(*(*U32)(unsafe.Pointer(bp + 8 /* nKeep */))), pTerm)
@@ -172837,7 +180830,7 @@ __31:
fts5SegIterLoadNPos(tls, p, pIter)
}
-func fts5IdxSelectStmt(tls *libc.TLS, p uintptr) uintptr { /* sqlite3.c:222152:21: */
+func fts5IdxSelectStmt(tls *libc.TLS, p uintptr) uintptr { /* sqlite3.c:223398:21: */
bp := tls.Alloc(16)
defer tls.Free(16)
@@ -172845,7 +180838,7 @@ func fts5IdxSelectStmt(tls *libc.TLS, p uintptr) uintptr { /* sqlite3.c:222152:2
var pConfig uintptr = (*Fts5Index)(unsafe.Pointer(p)).FpConfig
fts5IndexPrepareStmt(tls, p, (p + 96 /* &.pIdxSelect */), Xsqlite3_mprintf(tls,
- ts+31698, /* "SELECT pgno FROM..." */
+ ts+33194, /* "SELECT pgno FROM..." */
libc.VaList(bp, (*Fts5Config)(unsafe.Pointer(pConfig)).FzDb, (*Fts5Config)(unsafe.Pointer(pConfig)).FzName)))
}
return (*Fts5Index)(unsafe.Pointer(p)).FpIdxSelect
@@ -172856,7 +180849,7 @@ func fts5IdxSelectStmt(tls *libc.TLS, p uintptr) uintptr { /* sqlite3.c:222152:2
//
// If an error occurs, Fts5Index.rc is set to an appropriate error code. If
// an error has already occurred when this function is called, it is a no-op.
-func fts5SegIterSeekInit(tls *libc.TLS, p uintptr, pTerm uintptr, nTerm int32, flags int32, pSeg uintptr, pIter uintptr) { /* sqlite3.c:222171:13: */
+func fts5SegIterSeekInit(tls *libc.TLS, p uintptr, pTerm uintptr, nTerm int32, flags int32, pSeg uintptr, pIter uintptr) { /* sqlite3.c:223417:13: */
var iPg int32 = 1
var bGe int32 = (flags & FTS5INDEX_QUERY_SCAN)
var bDlidx int32 = 0 // True if there is a doclist-index
@@ -172926,7 +180919,7 @@ func fts5SegIterSeekInit(tls *libc.TLS, p uintptr, pTerm uintptr, nTerm int32, f
//
// If an error occurs, Fts5Index.rc is set to an appropriate error code. If
// an error has already occurred when this function is called, it is a no-op.
-func fts5SegIterHashInit(tls *libc.TLS, p uintptr, pTerm uintptr, nTerm int32, flags int32, pIter uintptr) { /* sqlite3.c:222254:13: */
+func fts5SegIterHashInit(tls *libc.TLS, p uintptr, pTerm uintptr, nTerm int32, flags int32, pIter uintptr) { /* sqlite3.c:223500:13: */
bp := tls.Alloc(32)
defer tls.Free(32)
@@ -172967,7 +180960,7 @@ func fts5SegIterHashInit(tls *libc.TLS, p uintptr, pTerm uintptr, nTerm int32, f
sqlite3Fts5BufferSet(tls, (p + 52 /* &.rc */), (pIter + 88 /* &.term */), n, *(*uintptr)(unsafe.Pointer(bp /* z */)))
(*Fts5Data)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 24 /* pLeaf */)))).Fnn = libc.AssignPtrInt32(*(*uintptr)(unsafe.Pointer(bp + 24 /* pLeaf */))+12 /* &.szLeaf */, *(*int32)(unsafe.Pointer(bp + 16 /* nList */)))
(*Fts5SegIter)(unsafe.Pointer(pIter)).FpLeaf = *(*uintptr)(unsafe.Pointer(bp + 24 /* pLeaf */))
- (*Fts5SegIter)(unsafe.Pointer(pIter)).FiLeafOffset = int32(sqlite3Fts5GetVarint(tls, (*Fts5Data)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 24 /* pLeaf */)))).Fp, (pIter + 104 /* &.iRowid */)))
+ (*Fts5SegIter)(unsafe.Pointer(pIter)).FiLeafOffset = I64(sqlite3Fts5GetVarint(tls, (*Fts5Data)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 24 /* pLeaf */)))).Fp, (pIter + 104 /* &.iRowid */)))
(*Fts5SegIter)(unsafe.Pointer(pIter)).FiEndofDoclist = (*Fts5Data)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 24 /* pLeaf */)))).Fnn
if (flags & FTS5INDEX_QUERY_DESC) != 0 {
@@ -172982,7 +180975,7 @@ func fts5SegIterHashInit(tls *libc.TLS, p uintptr, pTerm uintptr, nTerm int32, f
}
// Zero the iterator passed as the only argument.
-func fts5SegIterClear(tls *libc.TLS, pIter uintptr) { /* sqlite3.c:222313:13: */
+func fts5SegIterClear(tls *libc.TLS, pIter uintptr) { /* sqlite3.c:223559:13: */
sqlite3Fts5BufferFree(tls, (pIter + 88 /* &.term */))
fts5DataRelease(tls, (*Fts5SegIter)(unsafe.Pointer(pIter)).FpLeaf)
fts5DataRelease(tls, (*Fts5SegIter)(unsafe.Pointer(pIter)).FpNextLeaf)
@@ -172997,7 +180990,7 @@ func fts5SegIterClear(tls *libc.TLS, pIter uintptr) { /* sqlite3.c:222313:13: */
// in the pIter->aSeg[] array that is (a) not at EOF, and (b) pointing
// to a key that is a duplicate of another, higher priority,
// segment-iterator in the pSeg->aSeg[] array.
-func fts5MultiIterDoCompare(tls *libc.TLS, pIter uintptr, iOut int32) int32 { /* sqlite3.c:222417:12: */
+func fts5MultiIterDoCompare(tls *libc.TLS, pIter uintptr, iOut int32) int32 { /* sqlite3.c:223663:12: */
var i1 int32 // Index of left-hand Fts5SegIter
var i2 int32 // Index of right-hand Fts5SegIter
var iRes int32
@@ -173049,7 +181042,7 @@ func fts5MultiIterDoCompare(tls *libc.TLS, pIter uintptr, iOut int32) int32 { /*
// Move the seg-iter so that it points to the first rowid on page iLeafPgno.
// It is an error if leaf iLeafPgno does not exist or contains no rowids.
-func fts5SegIterGotoPage(tls *libc.TLS, p uintptr, pIter uintptr, iLeafPgno int32) { /* sqlite3.c:222471:13: */
+func fts5SegIterGotoPage(tls *libc.TLS, p uintptr, pIter uintptr, iLeafPgno int32) { /* sqlite3.c:223717:13: */
if iLeafPgno > (*Fts5StructureSegment)(unsafe.Pointer((*Fts5SegIter)(unsafe.Pointer(pIter)).FpSeg)).FpgnoLast {
(*Fts5Index)(unsafe.Pointer(p)).Frc = (SQLITE_CORRUPT | (int32(1) << 8))
@@ -173069,7 +181062,7 @@ func fts5SegIterGotoPage(tls *libc.TLS, p uintptr, pIter uintptr, iLeafPgno int3
(*Fts5Index)(unsafe.Pointer(p)).Frc = (SQLITE_CORRUPT | (int32(1) << 8))
} else {
iOff = iOff + (int32(sqlite3Fts5GetVarint(tls, (a + uintptr(iOff)), (pIter + 104 /* &.iRowid */))))
- (*Fts5SegIter)(unsafe.Pointer(pIter)).FiLeafOffset = iOff
+ (*Fts5SegIter)(unsafe.Pointer(pIter)).FiLeafOffset = I64(iOff)
fts5SegIterLoadNPos(tls, p, pIter)
}
}
@@ -173079,7 +181072,7 @@ func fts5SegIterGotoPage(tls *libc.TLS, p uintptr, pIter uintptr, iLeafPgno int3
// Advance the iterator passed as the second argument until it is at or
// past rowid iFrom. Regardless of the value of iFrom, the iterator is
// always advanced at least once.
-func fts5SegIterNextFrom(tls *libc.TLS, p uintptr, pIter uintptr, iMatch I64) { /* sqlite3.c:222509:13: */
+func fts5SegIterNextFrom(tls *libc.TLS, p uintptr, pIter uintptr, iMatch I64) { /* sqlite3.c:223755:13: */
var bRev int32 = ((*Fts5SegIter)(unsafe.Pointer(pIter)).Fflags & FTS5_SEGITER_REVERSE)
var pDlidx uintptr = (*Fts5SegIter)(unsafe.Pointer(pIter)).FpDlidx
var iLeafPgno int32 = (*Fts5SegIter)(unsafe.Pointer(pIter)).FiLeafPgno
@@ -173111,7 +181104,9 @@ func fts5SegIterNextFrom(tls *libc.TLS, p uintptr, pIter uintptr, iMatch I64) {
for ok := true; ok; ok = ((*Fts5Index)(unsafe.Pointer(p)).Frc == SQLITE_OK) {
if (bMove != 0) && ((*Fts5Index)(unsafe.Pointer(p)).Frc == SQLITE_OK) {
- (*(*func(*libc.TLS, uintptr, uintptr, uintptr))(unsafe.Pointer((pIter + 40 /* &.xNext */))))(tls, p, pIter, uintptr(0))
+ (*struct {
+ f func(*libc.TLS, uintptr, uintptr, uintptr)
+ })(unsafe.Pointer(&struct{ uintptr }{(*Fts5SegIter)(unsafe.Pointer(pIter)).FxNext})).f(tls, p, pIter, uintptr(0))
}
if (*Fts5SegIter)(unsafe.Pointer(pIter)).FpLeaf == uintptr(0) {
break
@@ -173127,7 +181122,7 @@ func fts5SegIterNextFrom(tls *libc.TLS, p uintptr, pIter uintptr, iMatch I64) {
}
// Free the iterator object passed as the second argument.
-func fts5MultiIterFree(tls *libc.TLS, pIter uintptr) { /* sqlite3.c:222563:13: */
+func fts5MultiIterFree(tls *libc.TLS, pIter uintptr) { /* sqlite3.c:223809:13: */
if pIter != 0 {
var i int32
for i = 0; i < (*Fts5Iter)(unsafe.Pointer(pIter)).FnSeg; i++ {
@@ -173138,14 +181133,16 @@ func fts5MultiIterFree(tls *libc.TLS, pIter uintptr) { /* sqlite3.c:222563:13: *
}
}
-func fts5MultiIterAdvanced(tls *libc.TLS, p uintptr, pIter uintptr, iChanged int32, iMinset int32) { /* sqlite3.c:222574:13: */
+func fts5MultiIterAdvanced(tls *libc.TLS, p uintptr, pIter uintptr, iChanged int32, iMinset int32) { /* sqlite3.c:223820:13: */
var i int32
for i = (((*Fts5Iter)(unsafe.Pointer(pIter)).FnSeg + iChanged) / 2); (i >= iMinset) && ((*Fts5Index)(unsafe.Pointer(p)).Frc == SQLITE_OK); i = (i / 2) {
var iEq int32
if libc.AssignInt32(&iEq, fts5MultiIterDoCompare(tls, pIter, i)) != 0 {
var pSeg uintptr = ((pIter + 96 /* &.aSeg */) + uintptr(iEq)*120)
- (*(*func(*libc.TLS, uintptr, uintptr, uintptr))(unsafe.Pointer((pSeg + 40 /* &.xNext */))))(tls, p, pSeg, uintptr(0))
+ (*struct {
+ f func(*libc.TLS, uintptr, uintptr, uintptr)
+ })(unsafe.Pointer(&struct{ uintptr }{(*Fts5SegIter)(unsafe.Pointer(pSeg)).FxNext})).f(tls, p, pSeg, uintptr(0))
i = ((*Fts5Iter)(unsafe.Pointer(pIter)).FnSeg + iEq)
}
}
@@ -173159,7 +181156,7 @@ func fts5MultiIterAdvanced(tls *libc.TLS, p uintptr, pIter uintptr, iChanged int
// If non-zero is returned, the caller should call fts5MultiIterAdvanced()
// on the iterator instead. That function does the same as this one, except
// that it deals with more complicated cases as well.
-func fts5MultiIterAdvanceRowid(tls *libc.TLS, pIter uintptr, iChanged int32, ppFirst uintptr) int32 { /* sqlite3.c:222602:12: */
+func fts5MultiIterAdvanceRowid(tls *libc.TLS, pIter uintptr, iChanged int32, ppFirst uintptr) int32 { /* sqlite3.c:223848:12: */
var pNew uintptr = ((pIter + 96 /* &.aSeg */) + uintptr(iChanged)*120)
if ((*Fts5SegIter)(unsafe.Pointer(pNew)).FiRowid == (*Fts5Iter)(unsafe.Pointer(pIter)).FiSwitchRowid) ||
@@ -173199,7 +181196,7 @@ func fts5MultiIterAdvanceRowid(tls *libc.TLS, pIter uintptr, iChanged int32, ppF
}
// Set the pIter->bEof variable based on the state of the sub-iterators.
-func fts5MultiIterSetEof(tls *libc.TLS, pIter uintptr) { /* sqlite3.c:222645:13: */
+func fts5MultiIterSetEof(tls *libc.TLS, pIter uintptr) { /* sqlite3.c:223891:13: */
var pSeg uintptr = ((pIter + 96 /* &.aSeg */) + uintptr((*Fts5CResult)(unsafe.Pointer((*Fts5Iter)(unsafe.Pointer(pIter)).FaFirst+1*4)).FiFirst)*120)
(*Fts5Iter)(unsafe.Pointer(pIter)).Fbase.FbEof = (U8(libc.Bool32((*Fts5SegIter)(unsafe.Pointer(pSeg)).FpLeaf == uintptr(0))))
(*Fts5Iter)(unsafe.Pointer(pIter)).FiSwitchRowid = (*Fts5SegIter)(unsafe.Pointer(pSeg)).FiRowid
@@ -173210,7 +181207,7 @@ func fts5MultiIterSetEof(tls *libc.TLS, pIter uintptr) { /* sqlite3.c:222645:13:
// If an error occurs, an error code is left in Fts5Index.rc. It is not
// considered an error if the iterator reaches EOF, or if it is already at
// EOF when this function is called.
-func fts5MultiIterNext(tls *libc.TLS, p uintptr, pIter uintptr, bFrom int32, iFrom I64) { /* sqlite3.c:222658:13: */
+func fts5MultiIterNext(tls *libc.TLS, p uintptr, pIter uintptr, bFrom int32, iFrom I64) { /* sqlite3.c:223904:13: */
bp := tls.Alloc(16)
defer tls.Free(16)
@@ -173224,7 +181221,9 @@ func fts5MultiIterNext(tls *libc.TLS, p uintptr, pIter uintptr, bFrom int32, iFr
if (bUseFrom != 0) && ((*Fts5SegIter)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 8 /* pSeg */)))).FpDlidx != 0) {
fts5SegIterNextFrom(tls, p, *(*uintptr)(unsafe.Pointer(bp + 8 /* pSeg */)), iFrom)
} else {
- (*(*func(*libc.TLS, uintptr, uintptr, uintptr))(unsafe.Pointer((*(*uintptr)(unsafe.Pointer(bp + 8 /* pSeg */)) + 40 /* &.xNext */))))(tls, p, *(*uintptr)(unsafe.Pointer(bp + 8 /* pSeg */)), bp /* &bNewTerm */)
+ (*struct {
+ f func(*libc.TLS, uintptr, uintptr, uintptr)
+ })(unsafe.Pointer(&struct{ uintptr }{(*Fts5SegIter)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 8 /* pSeg */)))).FxNext})).f(tls, p, *(*uintptr)(unsafe.Pointer(bp + 8 /* pSeg */)), bp /* &bNewTerm */)
}
if (((*Fts5SegIter)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 8 /* pSeg */)))).FpLeaf == uintptr(0)) || (*(*int32)(unsafe.Pointer(bp /* bNewTerm */)) != 0)) ||
@@ -173238,14 +181237,16 @@ func fts5MultiIterNext(tls *libc.TLS, p uintptr, pIter uintptr, bFrom int32, iFr
}
if (int32((*Fts5Iter)(unsafe.Pointer(pIter)).FbSkipEmpty) == 0) || ((*Fts5SegIter)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 8 /* pSeg */)))).FnPos != 0) {
- (*(*func(*libc.TLS, uintptr, uintptr))(unsafe.Pointer((pIter + 56 /* &.xSetOutputs */))))(tls, pIter, *(*uintptr)(unsafe.Pointer(bp + 8 /* pSeg */)))
+ (*struct {
+ f func(*libc.TLS, uintptr, uintptr)
+ })(unsafe.Pointer(&struct{ uintptr }{(*Fts5Iter)(unsafe.Pointer(pIter)).FxSetOutputs})).f(tls, pIter, *(*uintptr)(unsafe.Pointer(bp + 8 /* pSeg */)))
return
}
bUseFrom = 0
}
}
-func fts5MultiIterNext2(tls *libc.TLS, p uintptr, pIter uintptr, pbNewTerm uintptr) { /* sqlite3.c:222696:13: */
+func fts5MultiIterNext2(tls *libc.TLS, p uintptr, pIter uintptr, pbNewTerm uintptr) { /* sqlite3.c:223942:13: */
bp := tls.Alloc(16)
defer tls.Free(16)
@@ -173256,7 +181257,9 @@ func fts5MultiIterNext2(tls *libc.TLS, p uintptr, pIter uintptr, pbNewTerm uintp
*(*uintptr)(unsafe.Pointer(bp + 8 /* pSeg */)) = ((pIter + 96 /* &.aSeg */) + uintptr(iFirst)*120)
*(*int32)(unsafe.Pointer(bp /* bNewTerm */)) = 0
- (*(*func(*libc.TLS, uintptr, uintptr, uintptr))(unsafe.Pointer((*(*uintptr)(unsafe.Pointer(bp + 8 /* pSeg */)) + 40 /* &.xNext */))))(tls, p, *(*uintptr)(unsafe.Pointer(bp + 8 /* pSeg */)), bp /* &bNewTerm */)
+ (*struct {
+ f func(*libc.TLS, uintptr, uintptr, uintptr)
+ })(unsafe.Pointer(&struct{ uintptr }{(*Fts5SegIter)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 8 /* pSeg */)))).FxNext})).f(tls, p, *(*uintptr)(unsafe.Pointer(bp + 8 /* pSeg */)), bp /* &bNewTerm */)
if (((*Fts5SegIter)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 8 /* pSeg */)))).FpLeaf == uintptr(0)) || (*(*int32)(unsafe.Pointer(bp /* bNewTerm */)) != 0)) ||
(fts5MultiIterAdvanceRowid(tls, pIter, iFirst, bp+8 /* &pSeg */) != 0) {
fts5MultiIterAdvanced(tls, p, pIter, iFirst, 1)
@@ -173268,12 +181271,12 @@ func fts5MultiIterNext2(tls *libc.TLS, p uintptr, pIter uintptr, pbNewTerm uintp
}
}
-func fts5IterSetOutputs_Noop(tls *libc.TLS, pUnused1 uintptr, pUnused2 uintptr) { /* sqlite3.c:222724:13: */
+func fts5IterSetOutputs_Noop(tls *libc.TLS, pUnused1 uintptr, pUnused2 uintptr) { /* sqlite3.c:223970:13: */
_ = pUnused1
_ = pUnused2
}
-func fts5MultiIterAlloc(tls *libc.TLS, p uintptr, nSeg int32) uintptr { /* sqlite3.c:222728:17: */
+func fts5MultiIterAlloc(tls *libc.TLS, p uintptr, nSeg int32) uintptr { /* sqlite3.c:223974:17: */
var pNew uintptr
var nSlot int32 // Power of two >= nSeg
@@ -173292,7 +181295,7 @@ func fts5MultiIterAlloc(tls *libc.TLS, p uintptr, nSeg int32) uintptr { /* sqlit
return pNew
}
-func fts5PoslistCallback(tls *libc.TLS, pUnused uintptr, pContext uintptr, pChunk uintptr, nChunk int32) { /* sqlite3.c:222750:13: */
+func fts5PoslistCallback(tls *libc.TLS, pUnused uintptr, pContext uintptr, pChunk uintptr, nChunk int32) { /* sqlite3.c:223996:13: */
_ = pUnused
if nChunk > 0 {
@@ -173305,25 +181308,25 @@ func fts5PoslistCallback(tls *libc.TLS, pUnused uintptr, pContext uintptr, pChun
}
type PoslistCallbackCtx1 = struct {
- FpBuf uintptr
- FpColset uintptr
- FeState int32
- _ [4]byte
-} /* sqlite3.c:222762:9 */
+ FpBuf uintptr
+ FpColset uintptr
+ FeState int32
+ F__ccgo_pad1 [4]byte
+} /* sqlite3.c:224008:9 */
-type PoslistCallbackCtx = PoslistCallbackCtx1 /* sqlite3.c:222762:35 */
+type PoslistCallbackCtx = PoslistCallbackCtx1 /* sqlite3.c:224008:35 */
type PoslistOffsetsCtx1 = struct {
FpBuf uintptr
FpColset uintptr
FiRead int32
FiWrite int32
-} /* sqlite3.c:222769:9 */
+} /* sqlite3.c:224015:9 */
-type PoslistOffsetsCtx = PoslistOffsetsCtx1 /* sqlite3.c:222769:34 */
+type PoslistOffsetsCtx = PoslistOffsetsCtx1 /* sqlite3.c:224015:34 */
// TODO: Make this more efficient!
-func fts5IndexColsetTest(tls *libc.TLS, pColset uintptr, iCol int32) int32 { /* sqlite3.c:222780:12: */
+func fts5IndexColsetTest(tls *libc.TLS, pColset uintptr, iCol int32) int32 { /* sqlite3.c:224026:12: */
var i int32
for i = 0; i < (*Fts5Colset)(unsafe.Pointer(pColset)).FnCol; i++ {
if *(*int32)(unsafe.Pointer((pColset + 4 /* &.aiCol */) + uintptr(i)*4)) == iCol {
@@ -173333,7 +181336,7 @@ func fts5IndexColsetTest(tls *libc.TLS, pColset uintptr, iCol int32) int32 { /*
return 0
}
-func fts5PoslistOffsetsCallback(tls *libc.TLS, pUnused uintptr, pContext uintptr, pChunk uintptr, nChunk int32) { /* sqlite3.c:222788:13: */
+func fts5PoslistOffsetsCallback(tls *libc.TLS, pUnused uintptr, pContext uintptr, pChunk uintptr, nChunk int32) { /* sqlite3.c:224034:13: */
bp := tls.Alloc(4)
defer tls.Free(4)
@@ -173359,7 +181362,7 @@ func fts5PoslistOffsetsCallback(tls *libc.TLS, pUnused uintptr, pContext uintptr
}
}
-func fts5PoslistFilterCallback(tls *libc.TLS, pUnused uintptr, pContext uintptr, pChunk uintptr, nChunk int32) { /* sqlite3.c:222811:13: */
+func fts5PoslistFilterCallback(tls *libc.TLS, pUnused uintptr, pContext uintptr, pChunk uintptr, nChunk int32) { /* sqlite3.c:224057:13: */
bp := tls.Alloc(8)
defer tls.Free(8)
@@ -173439,15 +181442,15 @@ func fts5PoslistFilterCallback(tls *libc.TLS, pUnused uintptr, pContext uintptr,
}
}
-func fts5ChunkIterate(tls *libc.TLS, p uintptr, pSeg uintptr, pCtx uintptr, xChunk uintptr) { /* sqlite3.c:222863:13: */
+func fts5ChunkIterate(tls *libc.TLS, p uintptr, pSeg uintptr, pCtx uintptr, xChunk uintptr) { /* sqlite3.c:224109:13: */
var nRem int32 = (*Fts5SegIter)(unsafe.Pointer(pSeg)).FnPos // Number of bytes still to come
var pData uintptr = uintptr(0)
var pChunk uintptr = ((*Fts5Data)(unsafe.Pointer((*Fts5SegIter)(unsafe.Pointer(pSeg)).FpLeaf)).Fp + uintptr((*Fts5SegIter)(unsafe.Pointer(pSeg)).FiLeafOffset))
var nChunk int32 = func() int32 {
- if (nRem) < ((*Fts5Data)(unsafe.Pointer((*Fts5SegIter)(unsafe.Pointer(pSeg)).FpLeaf)).FszLeaf - (*Fts5SegIter)(unsafe.Pointer(pSeg)).FiLeafOffset) {
+ if (I64(nRem)) < (I64((*Fts5Data)(unsafe.Pointer((*Fts5SegIter)(unsafe.Pointer(pSeg)).FpLeaf)).FszLeaf) - (*Fts5SegIter)(unsafe.Pointer(pSeg)).FiLeafOffset) {
return nRem
}
- return ((*Fts5Data)(unsafe.Pointer((*Fts5SegIter)(unsafe.Pointer(pSeg)).FpLeaf)).FszLeaf - (*Fts5SegIter)(unsafe.Pointer(pSeg)).FiLeafOffset)
+ return (int32(I64((*Fts5Data)(unsafe.Pointer((*Fts5SegIter)(unsafe.Pointer(pSeg)).FpLeaf)).FszLeaf) - (*Fts5SegIter)(unsafe.Pointer(pSeg)).FiLeafOffset))
}()
var pgno int32 = (*Fts5SegIter)(unsafe.Pointer(pSeg)).FiLeafPgno
var pgnoSave int32 = 0
@@ -173459,7 +181462,9 @@ func fts5ChunkIterate(tls *libc.TLS, p uintptr, pSeg uintptr, pCtx uintptr, xChu
}
for 1 != 0 {
- (*(*func(*libc.TLS, uintptr, uintptr, uintptr, int32))(unsafe.Pointer(&xChunk)))(tls, p, pCtx, pChunk, nChunk)
+ (*struct {
+ f func(*libc.TLS, uintptr, uintptr, uintptr, int32)
+ })(unsafe.Pointer(&struct{ uintptr }{xChunk})).f(tls, p, pCtx, pChunk, nChunk)
nRem = nRem - (nChunk)
fts5DataRelease(tls, pData)
if nRem <= 0 {
@@ -173493,7 +181498,7 @@ func fts5ChunkIterate(tls *libc.TLS, p uintptr, pSeg uintptr, pCtx uintptr, xChu
// function appends the position list data for the current entry to
// buffer pBuf. It does not make a copy of the position-list size
// field.
-func fts5SegiterPoslist(tls *libc.TLS, p uintptr, pSeg uintptr, pColset uintptr, pBuf uintptr) { /* sqlite3.c:222913:13: */
+func fts5SegiterPoslist(tls *libc.TLS, p uintptr, pSeg uintptr, pColset uintptr, pBuf uintptr) { /* sqlite3.c:224159:13: */
bp := tls.Alloc(48)
defer tls.Free(48)
@@ -173543,7 +181548,7 @@ func fts5SegiterPoslist(tls *libc.TLS, p uintptr, pSeg uintptr, pColset uintptr,
// This function is a no-op if *pRc is other than SQLITE_OK when it is
// called. If an OOM error is encountered, *pRc is set to SQLITE_NOMEM
// before returning.
-func fts5IndexExtractColset(tls *libc.TLS, pRc uintptr, pColset uintptr, pPos uintptr, nPos int32, pIter uintptr) { /* sqlite3.c:222954:13: */
+func fts5IndexExtractColset(tls *libc.TLS, pRc uintptr, pColset uintptr, pPos uintptr, nPos int32, pIter uintptr) { /* sqlite3.c:224200:13: */
bp := tls.Alloc(4)
defer tls.Free(4)
@@ -173587,7 +181592,7 @@ func fts5IndexExtractColset(tls *libc.TLS, pRc uintptr, pColset uintptr, pPos ui
}
}
- if p == pEnd {
+ if p >= pEnd {
(*Fts5Iter)(unsafe.Pointer(pIter)).Fbase.FpData = (*Fts5Iter)(unsafe.Pointer(pIter)).Fposlist.Fp
(*Fts5Iter)(unsafe.Pointer(pIter)).Fbase.FnData = (*Fts5Iter)(unsafe.Pointer(pIter)).Fposlist.Fn
return
@@ -173604,7 +181609,7 @@ func fts5IndexExtractColset(tls *libc.TLS, pRc uintptr, pColset uintptr, pPos ui
}
// xSetOutputs callback used by detail=none tables.
-func fts5IterSetOutputs_None(tls *libc.TLS, pIter uintptr, pSeg uintptr) { /* sqlite3.c:223014:13: */
+func fts5IterSetOutputs_None(tls *libc.TLS, pIter uintptr, pSeg uintptr) { /* sqlite3.c:224260:13: */
(*Fts5Iter)(unsafe.Pointer(pIter)).Fbase.FiRowid = (*Fts5SegIter)(unsafe.Pointer(pSeg)).FiRowid
(*Fts5Iter)(unsafe.Pointer(pIter)).Fbase.FnData = (*Fts5SegIter)(unsafe.Pointer(pSeg)).FnPos
@@ -173612,11 +181617,11 @@ func fts5IterSetOutputs_None(tls *libc.TLS, pIter uintptr, pSeg uintptr) { /* sq
// xSetOutputs callback used by detail=full and detail=col tables when no
// column filters are specified.
-func fts5IterSetOutputs_Nocolset(tls *libc.TLS, pIter uintptr, pSeg uintptr) { /* sqlite3.c:223024:13: */
+func fts5IterSetOutputs_Nocolset(tls *libc.TLS, pIter uintptr, pSeg uintptr) { /* sqlite3.c:224270:13: */
(*Fts5Iter)(unsafe.Pointer(pIter)).Fbase.FiRowid = (*Fts5SegIter)(unsafe.Pointer(pSeg)).FiRowid
(*Fts5Iter)(unsafe.Pointer(pIter)).Fbase.FnData = (*Fts5SegIter)(unsafe.Pointer(pSeg)).FnPos
- if ((*Fts5SegIter)(unsafe.Pointer(pSeg)).FiLeafOffset + (*Fts5SegIter)(unsafe.Pointer(pSeg)).FnPos) <= (*Fts5Data)(unsafe.Pointer((*Fts5SegIter)(unsafe.Pointer(pSeg)).FpLeaf)).FszLeaf {
+ if ((*Fts5SegIter)(unsafe.Pointer(pSeg)).FiLeafOffset + I64((*Fts5SegIter)(unsafe.Pointer(pSeg)).FnPos)) <= I64((*Fts5Data)(unsafe.Pointer((*Fts5SegIter)(unsafe.Pointer(pSeg)).FpLeaf)).FszLeaf) {
// All data is stored on the current page. Populate the output
// variables to point into the body of the page object.
(*Fts5Iter)(unsafe.Pointer(pIter)).Fbase.FpData = ((*Fts5Data)(unsafe.Pointer((*Fts5SegIter)(unsafe.Pointer(pSeg)).FpLeaf)).Fp + uintptr((*Fts5SegIter)(unsafe.Pointer(pSeg)).FiLeafOffset))
@@ -173632,7 +181637,7 @@ func fts5IterSetOutputs_Nocolset(tls *libc.TLS, pIter uintptr, pSeg uintptr) { /
// xSetOutputs callback used when the Fts5Colset object has nCol==0 (match
// against no columns at all).
-func fts5IterSetOutputs_ZeroColset(tls *libc.TLS, pIter uintptr, pSeg uintptr) { /* sqlite3.c:223049:13: */
+func fts5IterSetOutputs_ZeroColset(tls *libc.TLS, pIter uintptr, pSeg uintptr) { /* sqlite3.c:224295:13: */
_ = pSeg
(*Fts5Iter)(unsafe.Pointer(pIter)).Fbase.FnData = 0
}
@@ -173640,7 +181645,7 @@ func fts5IterSetOutputs_ZeroColset(tls *libc.TLS, pIter uintptr, pSeg uintptr) {
// xSetOutputs callback used by detail=col when there is a column filter
// and there are 100 or more columns. Also called as a fallback from
// fts5IterSetOutputs_Col100 if the column-list spans more than one page.
-func fts5IterSetOutputs_Col(tls *libc.TLS, pIter uintptr, pSeg uintptr) { /* sqlite3.c:223059:13: */
+func fts5IterSetOutputs_Col(tls *libc.TLS, pIter uintptr, pSeg uintptr) { /* sqlite3.c:224305:13: */
sqlite3Fts5BufferZero(tls, (pIter + 32 /* &.poslist */))
fts5SegiterPoslist(tls, (*Fts5Iter)(unsafe.Pointer(pIter)).FpIndex, pSeg, (*Fts5Iter)(unsafe.Pointer(pIter)).FpColset, (pIter + 32 /* &.poslist */))
(*Fts5Iter)(unsafe.Pointer(pIter)).Fbase.FiRowid = (*Fts5SegIter)(unsafe.Pointer(pSeg)).FiRowid
@@ -173656,7 +181661,7 @@ func fts5IterSetOutputs_Col(tls *libc.TLS, pIter uintptr, pSeg uintptr) { /* sql
//
// The last point is to ensure all column numbers are stored as
// single-byte varints.
-func fts5IterSetOutputs_Col100(tls *libc.TLS, pIter uintptr, pSeg uintptr) { /* sqlite3.c:223077:13: */
+func fts5IterSetOutputs_Col100(tls *libc.TLS, pIter uintptr, pSeg uintptr) { /* sqlite3.c:224323:13: */
var a uintptr
var pEnd uintptr
var iPrev int32
@@ -173665,7 +181670,7 @@ func fts5IterSetOutputs_Col100(tls *libc.TLS, pIter uintptr, pSeg uintptr) { /*
var aOut uintptr
var iPrevOut int32
- if !(((*Fts5SegIter)(unsafe.Pointer(pSeg)).FiLeafOffset + (*Fts5SegIter)(unsafe.Pointer(pSeg)).FnPos) > (*Fts5Data)(unsafe.Pointer((*Fts5SegIter)(unsafe.Pointer(pSeg)).FpLeaf)).FszLeaf) {
+ if !(((*Fts5SegIter)(unsafe.Pointer(pSeg)).FiLeafOffset + I64((*Fts5SegIter)(unsafe.Pointer(pSeg)).FnPos)) > I64((*Fts5Data)(unsafe.Pointer((*Fts5SegIter)(unsafe.Pointer(pSeg)).FpLeaf)).FszLeaf)) {
goto __1
}
fts5IterSetOutputs_Col(tls, pIter, pSeg)
@@ -173718,11 +181723,11 @@ __2:
}
// xSetOutputs callback used by detail=full when there is a column filter.
-func fts5IterSetOutputs_Full(tls *libc.TLS, pIter uintptr, pSeg uintptr) { /* sqlite3.c:223117:13: */
+func fts5IterSetOutputs_Full(tls *libc.TLS, pIter uintptr, pSeg uintptr) { /* sqlite3.c:224363:13: */
var pColset uintptr = (*Fts5Iter)(unsafe.Pointer(pIter)).FpColset
(*Fts5Iter)(unsafe.Pointer(pIter)).Fbase.FiRowid = (*Fts5SegIter)(unsafe.Pointer(pSeg)).FiRowid
- if ((*Fts5SegIter)(unsafe.Pointer(pSeg)).FiLeafOffset + (*Fts5SegIter)(unsafe.Pointer(pSeg)).FnPos) <= (*Fts5Data)(unsafe.Pointer((*Fts5SegIter)(unsafe.Pointer(pSeg)).FpLeaf)).FszLeaf {
+ if ((*Fts5SegIter)(unsafe.Pointer(pSeg)).FiLeafOffset + I64((*Fts5SegIter)(unsafe.Pointer(pSeg)).FnPos)) <= I64((*Fts5Data)(unsafe.Pointer((*Fts5SegIter)(unsafe.Pointer(pSeg)).FpLeaf)).FszLeaf) {
// All data is stored on the current page. Populate the output
// variables to point into the body of the page object.
var a uintptr = ((*Fts5Data)(unsafe.Pointer((*Fts5SegIter)(unsafe.Pointer(pSeg)).FpLeaf)).Fp + uintptr((*Fts5SegIter)(unsafe.Pointer(pSeg)).FiLeafOffset))
@@ -173740,7 +181745,7 @@ func fts5IterSetOutputs_Full(tls *libc.TLS, pIter uintptr, pSeg uintptr) { /* sq
}
}
-func fts5IterSetOutputCb(tls *libc.TLS, pRc uintptr, pIter uintptr) { /* sqlite3.c:223142:13: */
+func fts5IterSetOutputCb(tls *libc.TLS, pRc uintptr, pIter uintptr) { /* sqlite3.c:224388:13: */
if *(*int32)(unsafe.Pointer(pRc)) == SQLITE_OK {
var pConfig uintptr = (*Fts5Index)(unsafe.Pointer((*Fts5Iter)(unsafe.Pointer(pIter)).FpIndex)).FpConfig
if (*Fts5Config)(unsafe.Pointer(pConfig)).FeDetail == FTS5_DETAIL_NONE {
@@ -173784,7 +181789,7 @@ func fts5IterSetOutputCb(tls *libc.TLS, pRc uintptr, pIter uintptr) { /* sqlite3
//
// The iterator initially points to the first term/rowid entry in the
// iterated data.
-func fts5MultiIterNew(tls *libc.TLS, p uintptr, pStruct uintptr, flags int32, pColset uintptr, pTerm uintptr, nTerm int32, iLevel int32, nSegment int32, ppOut uintptr) { /* sqlite3.c:223185:13: */
+func fts5MultiIterNew(tls *libc.TLS, p uintptr, pStruct uintptr, flags int32, pColset uintptr, pTerm uintptr, nTerm int32, iLevel int32, nSegment int32, ppOut uintptr) { /* sqlite3.c:224431:13: */
var nSeg int32 = 0 // Number of segment-iters in use
var iIter int32 = 0 //
var iSeg int32 // Used to iterate through segments
@@ -173861,7 +181866,9 @@ func fts5MultiIterNew(tls *libc.TLS, p uintptr, pStruct uintptr, flags int32, pC
if libc.AssignInt32(&iEq, fts5MultiIterDoCompare(tls, pNew, iIter)) != 0 {
var pSeg uintptr = ((pNew + 96 /* &.aSeg */) + uintptr(iEq)*120)
if (*Fts5Index)(unsafe.Pointer(p)).Frc == SQLITE_OK {
- (*(*func(*libc.TLS, uintptr, uintptr, uintptr))(unsafe.Pointer((pSeg + 40 /* &.xNext */))))(tls, p, pSeg, uintptr(0))
+ (*struct {
+ f func(*libc.TLS, uintptr, uintptr, uintptr)
+ })(unsafe.Pointer(&struct{ uintptr }{(*Fts5SegIter)(unsafe.Pointer(pSeg)).FxNext})).f(tls, p, pSeg, uintptr(0))
}
fts5MultiIterAdvanced(tls, p, pNew, iEq, iIter)
}
@@ -173872,7 +181879,9 @@ func fts5MultiIterNew(tls *libc.TLS, p uintptr, pStruct uintptr, flags int32, pC
fts5MultiIterNext(tls, p, pNew, 0, int64(0))
} else if int32((*Fts5Iter)(unsafe.Pointer(pNew)).Fbase.FbEof) == 0 {
var pSeg uintptr = ((pNew + 96 /* &.aSeg */) + uintptr((*Fts5CResult)(unsafe.Pointer((*Fts5Iter)(unsafe.Pointer(pNew)).FaFirst+1*4)).FiFirst)*120)
- (*(*func(*libc.TLS, uintptr, uintptr))(unsafe.Pointer((pNew + 56 /* &.xSetOutputs */))))(tls, pNew, pSeg)
+ (*struct {
+ f func(*libc.TLS, uintptr, uintptr)
+ })(unsafe.Pointer(&struct{ uintptr }{(*Fts5Iter)(unsafe.Pointer(pNew)).FxSetOutputs})).f(tls, pNew, pSeg)
}
} else {
@@ -173883,7 +181892,7 @@ func fts5MultiIterNew(tls *libc.TLS, p uintptr, pStruct uintptr, flags int32, pC
// Create an Fts5Iter that iterates through the doclist provided
// as the second argument.
-func fts5MultiIterNew2(tls *libc.TLS, p uintptr, pData uintptr, bDesc int32, ppOut uintptr) { /* sqlite3.c:223284:13: */
+func fts5MultiIterNew2(tls *libc.TLS, p uintptr, pData uintptr, bDesc int32, ppOut uintptr) { /* sqlite3.c:224530:13: */
var pNew uintptr
pNew = fts5MultiIterAlloc(tls, p, 2)
if pNew != 0 {
@@ -173892,7 +181901,7 @@ func fts5MultiIterNew2(tls *libc.TLS, p uintptr, pData uintptr, bDesc int32, ppO
(*Fts5SegIter)(unsafe.Pointer(pIter)).Fflags = FTS5_SEGITER_ONETERM
if (*Fts5Data)(unsafe.Pointer(pData)).FszLeaf > 0 {
(*Fts5SegIter)(unsafe.Pointer(pIter)).FpLeaf = pData
- (*Fts5SegIter)(unsafe.Pointer(pIter)).FiLeafOffset = int32(sqlite3Fts5GetVarint(tls, (*Fts5Data)(unsafe.Pointer(pData)).Fp, (pIter + 104 /* &.iRowid */)))
+ (*Fts5SegIter)(unsafe.Pointer(pIter)).FiLeafOffset = I64(sqlite3Fts5GetVarint(tls, (*Fts5Data)(unsafe.Pointer(pData)).Fp, (pIter + 104 /* &.iRowid */)))
(*Fts5SegIter)(unsafe.Pointer(pIter)).FiEndofDoclist = (*Fts5Data)(unsafe.Pointer(pData)).Fnn
(*Fts5CResult)(unsafe.Pointer((*Fts5Iter)(unsafe.Pointer(pNew)).FaFirst + 1*4)).FiFirst = U16(1)
if bDesc != 0 {
@@ -173916,7 +181925,7 @@ func fts5MultiIterNew2(tls *libc.TLS, p uintptr, pData uintptr, bDesc int32, ppO
// Return true if the iterator is at EOF or if an error has occurred.
// False otherwise.
-func fts5MultiIterEof(tls *libc.TLS, p uintptr, pIter uintptr) int32 { /* sqlite3.c:223324:12: */
+func fts5MultiIterEof(tls *libc.TLS, p uintptr, pIter uintptr) int32 { /* sqlite3.c:224570:12: */
return (libc.Bool32(((*Fts5Index)(unsafe.Pointer(p)).Frc != 0) || ((*Fts5Iter)(unsafe.Pointer(pIter)).Fbase.FbEof != 0)))
}
@@ -173924,13 +181933,13 @@ func fts5MultiIterEof(tls *libc.TLS, p uintptr, pIter uintptr) int32 { /* sqlite
// Return the rowid of the entry that the iterator currently points
// to. If the iterator points to EOF when this function is called the
// results are undefined.
-func fts5MultiIterRowid(tls *libc.TLS, pIter uintptr) I64 { /* sqlite3.c:223336:12: */
+func fts5MultiIterRowid(tls *libc.TLS, pIter uintptr) I64 { /* sqlite3.c:224582:12: */
return (*Fts5SegIter)(unsafe.Pointer((pIter + 96 /* &.aSeg */) + uintptr((*Fts5CResult)(unsafe.Pointer((*Fts5Iter)(unsafe.Pointer(pIter)).FaFirst+1*4)).FiFirst)*120)).FiRowid
}
// Move the iterator to the next entry at or following iMatch.
-func fts5MultiIterNextFrom(tls *libc.TLS, p uintptr, pIter uintptr, iMatch I64) { /* sqlite3.c:223344:13: */
+func fts5MultiIterNextFrom(tls *libc.TLS, p uintptr, pIter uintptr, iMatch I64) { /* sqlite3.c:224590:13: */
for 1 != 0 {
var iRowid I64
fts5MultiIterNext(tls, p, pIter, 1, iMatch)
@@ -173949,7 +181958,7 @@ func fts5MultiIterNextFrom(tls *libc.TLS, p uintptr, pIter uintptr, iMatch I64)
// Return a pointer to a buffer containing the term associated with the
// entry that the iterator currently points to.
-func fts5MultiIterTerm(tls *libc.TLS, pIter uintptr, pn uintptr) uintptr { /* sqlite3.c:223363:17: */
+func fts5MultiIterTerm(tls *libc.TLS, pIter uintptr, pn uintptr) uintptr { /* sqlite3.c:224609:17: */
var p uintptr = ((pIter + 96 /* &.aSeg */) + uintptr((*Fts5CResult)(unsafe.Pointer((*Fts5Iter)(unsafe.Pointer(pIter)).FaFirst+1*4)).FiFirst)*120)
*(*int32)(unsafe.Pointer(pn)) = (*Fts5SegIter)(unsafe.Pointer(p)).Fterm.Fn
return (*Fts5SegIter)(unsafe.Pointer(p)).Fterm.Fp
@@ -173962,7 +181971,7 @@ func fts5MultiIterTerm(tls *libc.TLS, pIter uintptr, pn uintptr) uintptr { /* sq
//
// If an error has already occurred, this function is a no-op. 0 is
// returned in this case.
-func fts5AllocateSegid(tls *libc.TLS, p uintptr, pStruct uintptr) int32 { /* sqlite3.c:223378:12: */
+func fts5AllocateSegid(tls *libc.TLS, p uintptr, pStruct uintptr) int32 { /* sqlite3.c:224624:12: */
bp := tls.Alloc(252)
defer tls.Free(252)
@@ -174004,7 +182013,7 @@ func fts5AllocateSegid(tls *libc.TLS, p uintptr, pStruct uintptr) int32 { /* sql
}
// Discard all data currently cached in the hash-tables.
-func fts5IndexDiscardData(tls *libc.TLS, p uintptr) { /* sqlite3.c:223435:13: */
+func fts5IndexDiscardData(tls *libc.TLS, p uintptr) { /* sqlite3.c:224681:13: */
if (*Fts5Index)(unsafe.Pointer(p)).FpHash != 0 {
sqlite3Fts5HashClear(tls, (*Fts5Index)(unsafe.Pointer(p)).FpHash)
@@ -174017,7 +182026,7 @@ func fts5IndexDiscardData(tls *libc.TLS, p uintptr) { /* sqlite3.c:223435:13: */
//
// Buffer (pNew/) is guaranteed to be greater
// than buffer (pOld/nOld).
-func fts5PrefixCompress(tls *libc.TLS, nOld int32, pOld uintptr, pNew uintptr) int32 { /* sqlite3.c:223450:12: */
+func fts5PrefixCompress(tls *libc.TLS, nOld int32, pOld uintptr, pNew uintptr) int32 { /* sqlite3.c:224696:12: */
var i int32
for i = 0; i < nOld; i++ {
if int32(*(*U8)(unsafe.Pointer(pOld + uintptr(i)))) != int32(*(*U8)(unsafe.Pointer(pNew + uintptr(i)))) {
@@ -174027,7 +182036,7 @@ func fts5PrefixCompress(tls *libc.TLS, nOld int32, pOld uintptr, pNew uintptr) i
return i
}
-func fts5WriteDlidxClear(tls *libc.TLS, p uintptr, pWriter uintptr, bFlush int32) { /* sqlite3.c:223458:13: */
+func fts5WriteDlidxClear(tls *libc.TLS, p uintptr, pWriter uintptr, bFlush int32) { /* sqlite3.c:224704:13: */
var i int32
for i = 0; i < (*Fts5SegWriter)(unsafe.Pointer(pWriter)).FnDlidx; i++ {
@@ -174048,7 +182057,7 @@ func fts5WriteDlidxClear(tls *libc.TLS, p uintptr, pWriter uintptr, bFlush int32
// Grow the pWriter->aDlidx[] array to at least nLvl elements in size.
// Any new array elements are zeroed before returning.
-func fts5WriteDlidxGrow(tls *libc.TLS, p uintptr, pWriter uintptr, nLvl int32) int32 { /* sqlite3.c:223484:12: */
+func fts5WriteDlidxGrow(tls *libc.TLS, p uintptr, pWriter uintptr, nLvl int32) int32 { /* sqlite3.c:224730:12: */
if ((*Fts5Index)(unsafe.Pointer(p)).Frc == SQLITE_OK) && (nLvl >= (*Fts5SegWriter)(unsafe.Pointer(pWriter)).FnDlidx) {
var aDlidx uintptr = Xsqlite3_realloc64(tls,
(*Fts5SegWriter)(unsafe.Pointer(pWriter)).FaDlidx, (uint64(uint64(unsafe.Sizeof(Fts5DlidxWriter{})) * uint64(nLvl))))
@@ -174067,7 +182076,7 @@ func fts5WriteDlidxGrow(tls *libc.TLS, p uintptr, pWriter uintptr, nLvl int32) i
// If the current doclist-index accumulating in pWriter->aDlidx[] is large
// enough, flush it to disk and return 1. Otherwise discard it and return
// zero.
-func fts5WriteFlushDlidx(tls *libc.TLS, p uintptr, pWriter uintptr) int32 { /* sqlite3.c:223510:12: */
+func fts5WriteFlushDlidx(tls *libc.TLS, p uintptr, pWriter uintptr) int32 { /* sqlite3.c:224756:12: */
var bFlag int32 = 0
// If there were FTS5_MIN_DLIDX_SIZE or more empty leaf pages written
@@ -174089,7 +182098,7 @@ func fts5WriteFlushDlidx(tls *libc.TLS, p uintptr, pWriter uintptr) int32 { /* s
// it.
//
// Fts5SegWriter.btterm currently contains the first term on page iBtPage.
-func fts5WriteFlushBtree(tls *libc.TLS, p uintptr, pWriter uintptr) { /* sqlite3.c:223534:13: */
+func fts5WriteFlushBtree(tls *libc.TLS, p uintptr, pWriter uintptr) { /* sqlite3.c:224780:13: */
var bFlag int32
if (*Fts5SegWriter)(unsafe.Pointer(pWriter)).FiBtPage == 0 {
@@ -174102,7 +182111,7 @@ func fts5WriteFlushBtree(tls *libc.TLS, p uintptr, pWriter uintptr) { /* sqlite3
if (*Fts5SegWriter)(unsafe.Pointer(pWriter)).Fbtterm.Fn > 0 {
return (*Fts5SegWriter)(unsafe.Pointer(pWriter)).Fbtterm.Fp
}
- return ts + 703 /* "" */
+ return ts + 755 /* "" */
}()
// The following was already done in fts5WriteInit():
// sqlite3_bind_int(p->pIdxWriter, 1, pWriter->iSegid);
@@ -174122,7 +182131,7 @@ func fts5WriteFlushBtree(tls *libc.TLS, p uintptr, pWriter uintptr) { /* sqlite3
//
// If an error occurs, an error code is left in Fts5Index.rc. If an error
// has already occurred when this function is called, it is a no-op.
-func fts5WriteBtreeTerm(tls *libc.TLS, p uintptr, pWriter uintptr, nTerm int32, pTerm uintptr) { /* sqlite3.c:223563:13: */
+func fts5WriteBtreeTerm(tls *libc.TLS, p uintptr, pWriter uintptr, nTerm int32, pTerm uintptr) { /* sqlite3.c:224809:13: */
fts5WriteFlushBtree(tls, p, pWriter)
if (*Fts5Index)(unsafe.Pointer(p)).Frc == SQLITE_OK {
sqlite3Fts5BufferSet(tls, (p + 52 /* &.rc */), (pWriter + 96 /* &.btterm */), nTerm, pTerm)
@@ -174132,7 +182141,7 @@ func fts5WriteBtreeTerm(tls *libc.TLS, p uintptr, pWriter uintptr, nTerm int32,
// This function is called when flushing a leaf page that contains no
// terms at all to disk.
-func fts5WriteBtreeNoTerm(tls *libc.TLS, p uintptr, pWriter uintptr) { /* sqlite3.c:223579:13: */
+func fts5WriteBtreeNoTerm(tls *libc.TLS, p uintptr, pWriter uintptr) { /* sqlite3.c:224825:13: */
// If there were no rowids on the leaf page either and the doclist-index
// has already been started, append an 0x00 byte to it.
if ((*Fts5SegWriter)(unsafe.Pointer(pWriter)).FbFirstRowidInPage != 0) && ((*Fts5DlidxWriter)(unsafe.Pointer((*Fts5SegWriter)(unsafe.Pointer(pWriter)).FaDlidx)).Fbuf.Fn > 0) {
@@ -174145,7 +182154,7 @@ func fts5WriteBtreeNoTerm(tls *libc.TLS, p uintptr, pWriter uintptr) { /* sqlite
(*Fts5SegWriter)(unsafe.Pointer(pWriter)).FnEmpty++
}
-func fts5DlidxExtractFirstRowid(tls *libc.TLS, pBuf uintptr) I64 { /* sqlite3.c:223595:12: */
+func fts5DlidxExtractFirstRowid(tls *libc.TLS, pBuf uintptr) I64 { /* sqlite3.c:224841:12: */
bp := tls.Alloc(8)
defer tls.Free(8)
@@ -174161,7 +182170,7 @@ func fts5DlidxExtractFirstRowid(tls *libc.TLS, pBuf uintptr) I64 { /* sqlite3.c:
// Rowid iRowid has just been appended to the current leaf page. It is the
// first on the page. This function appends an appropriate entry to the current
// doclist-index.
-func fts5WriteDlidxAppend(tls *libc.TLS, p uintptr, pWriter uintptr, iRowid I64) { /* sqlite3.c:223609:13: */
+func fts5WriteDlidxAppend(tls *libc.TLS, p uintptr, pWriter uintptr, iRowid I64) { /* sqlite3.c:224855:13: */
var i int32
var bDone int32 = 0
@@ -174221,7 +182230,7 @@ func fts5WriteDlidxAppend(tls *libc.TLS, p uintptr, pWriter uintptr, iRowid I64)
}
}
-func fts5WriteFlushLeaf(tls *libc.TLS, p uintptr, pWriter uintptr) { /* sqlite3.c:223669:13: */
+func fts5WriteFlushLeaf(tls *libc.TLS, p uintptr, pWriter uintptr) { /* sqlite3.c:224915:13: */
var pPage uintptr = (pWriter + 8 /* &.writer */)
var iRowid I64
@@ -174257,14 +182266,14 @@ func fts5WriteFlushLeaf(tls *libc.TLS, p uintptr, pWriter uintptr) { /* sqlite3.
(*Fts5SegWriter)(unsafe.Pointer(pWriter)).FbFirstRowidInPage = U8(1)
}
-var zero = [4]U8{U8(0x00), U8(0x00), U8(0x00), U8(0x00)} /* sqlite3.c:223670:19 */
+var zero = [4]U8{U8(0x00), U8(0x00), U8(0x00), U8(0x00)} /* sqlite3.c:224916:19 */
// Append term pTerm/nTerm to the segment being written by the writer passed
// as the second argument.
//
// If an error occurs, set the Fts5Index.rc error code. If an error has
// already occurred, this function is a no-op.
-func fts5WriteAppendTerm(tls *libc.TLS, p uintptr, pWriter uintptr, nTerm int32, pTerm uintptr) { /* sqlite3.c:223715:13: */
+func fts5WriteAppendTerm(tls *libc.TLS, p uintptr, pWriter uintptr, nTerm int32, pTerm uintptr) { /* sqlite3.c:224961:13: */
var nPrefix int32 // Bytes of prefix compression for term
var pPage uintptr = (pWriter + 8 /* &.writer */)
var pPgidx uintptr = (pWriter + 8 /* &.writer */ + 24 /* &.pgidx */)
@@ -174340,7 +182349,7 @@ func fts5WriteAppendTerm(tls *libc.TLS, p uintptr, pWriter uintptr, nTerm int32,
}
// Append a rowid and position-list size field to the writers output.
-func fts5WriteAppendRowid(tls *libc.TLS, p uintptr, pWriter uintptr, iRowid I64) { /* sqlite3.c:223796:13: */
+func fts5WriteAppendRowid(tls *libc.TLS, p uintptr, pWriter uintptr, iRowid I64) { /* sqlite3.c:225042:13: */
if (*Fts5Index)(unsafe.Pointer(p)).Frc == SQLITE_OK {
var pPage uintptr = (pWriter + 8 /* &.writer */)
@@ -174369,7 +182378,7 @@ func fts5WriteAppendRowid(tls *libc.TLS, p uintptr, pWriter uintptr, iRowid I64)
}
}
-func fts5WriteAppendPoslistData(tls *libc.TLS, p uintptr, pWriter uintptr, aData uintptr, nData int32) { /* sqlite3.c:223829:13: */
+func fts5WriteAppendPoslistData(tls *libc.TLS, p uintptr, pWriter uintptr, aData uintptr, nData int32) { /* sqlite3.c:225075:13: */
bp := tls.Alloc(8)
defer tls.Free(8)
@@ -174398,7 +182407,7 @@ func fts5WriteAppendPoslistData(tls *libc.TLS, p uintptr, pWriter uintptr, aData
// Flush any data cached by the writer object to the database. Free any
// allocations associated with the writer.
-func fts5WriteFinish(tls *libc.TLS, p uintptr, pWriter uintptr, pnLeaf uintptr) { /* sqlite3.c:223863:13: */
+func fts5WriteFinish(tls *libc.TLS, p uintptr, pWriter uintptr, pnLeaf uintptr) { /* sqlite3.c:225109:13: */
var i int32
var pLeaf uintptr = (pWriter + 8 /* &.writer */)
if (*Fts5Index)(unsafe.Pointer(p)).Frc == SQLITE_OK {
@@ -174422,7 +182431,7 @@ func fts5WriteFinish(tls *libc.TLS, p uintptr, pWriter uintptr, pnLeaf uintptr)
Xsqlite3_free(tls, (*Fts5SegWriter)(unsafe.Pointer(pWriter)).FaDlidx)
}
-func fts5WriteInit(tls *libc.TLS, p uintptr, pWriter uintptr, iSegid int32) { /* sqlite3.c:223891:13: */
+func fts5WriteInit(tls *libc.TLS, p uintptr, pWriter uintptr, iSegid int32) { /* sqlite3.c:225137:13: */
bp := tls.Alloc(16)
defer tls.Free(16)
@@ -174443,7 +182452,7 @@ func fts5WriteInit(tls *libc.TLS, p uintptr, pWriter uintptr, iSegid int32) { /*
if (*Fts5Index)(unsafe.Pointer(p)).FpIdxWriter == uintptr(0) {
var pConfig uintptr = (*Fts5Index)(unsafe.Pointer(p)).FpConfig
fts5IndexPrepareStmt(tls, p, (p + 80 /* &.pIdxWriter */), Xsqlite3_mprintf(tls,
- ts+31782, /* "INSERT INTO '%q'..." */
+ ts+33278, /* "INSERT INTO '%q'..." */
libc.VaList(bp, (*Fts5Config)(unsafe.Pointer(pConfig)).FzDb, (*Fts5Config)(unsafe.Pointer(pConfig)).FzName)))
}
@@ -174462,7 +182471,7 @@ func fts5WriteInit(tls *libc.TLS, p uintptr, pWriter uintptr, iSegid int32) { /*
// Iterator pIter was used to iterate through the input segments of on an
// incremental merge operation. This function is called if the incremental
// merge step has finished but the input has not been completely exhausted.
-func fts5TrimSegments(tls *libc.TLS, p uintptr, pIter uintptr) { /* sqlite3.c:223938:13: */
+func fts5TrimSegments(tls *libc.TLS, p uintptr, pIter uintptr) { /* sqlite3.c:225184:13: */
bp := tls.Alloc(20)
defer tls.Free(20)
@@ -174531,13 +182540,13 @@ func fts5TrimSegments(tls *libc.TLS, p uintptr, pIter uintptr) { /* sqlite3.c:22
sqlite3Fts5BufferFree(tls, bp /* &buf */)
}
-func fts5MergeChunkCallback(tls *libc.TLS, p uintptr, pCtx uintptr, pChunk uintptr, nChunk int32) { /* sqlite3.c:224004:13: */
+func fts5MergeChunkCallback(tls *libc.TLS, p uintptr, pCtx uintptr, pChunk uintptr, nChunk int32) { /* sqlite3.c:225250:13: */
var pWriter uintptr = pCtx
fts5WriteAppendPoslistData(tls, p, pWriter, pChunk, nChunk)
}
//
-func fts5IndexMergeLevel(tls *libc.TLS, p uintptr, ppStruct uintptr, iLvl int32, pnRem uintptr) { /* sqlite3.c:224016:13: */
+func fts5IndexMergeLevel(tls *libc.TLS, p uintptr, ppStruct uintptr, iLvl int32, pnRem uintptr) { /* sqlite3.c:225262:13: */
bp := tls.Alloc(148)
defer tls.Free(148)
@@ -174696,7 +182705,7 @@ func fts5IndexMergeLevel(tls *libc.TLS, p uintptr, ppStruct uintptr, iLvl int32,
// Do up to nPg pages of automerge work on the index.
//
// Return true if any changes were actually made, or false otherwise.
-func fts5IndexMerge(tls *libc.TLS, p uintptr, ppStruct uintptr, nPg int32, nMin int32) int32 { /* sqlite3.c:224165:12: */
+func fts5IndexMerge(tls *libc.TLS, p uintptr, ppStruct uintptr, nPg int32, nMin int32) int32 { /* sqlite3.c:225411:12: */
bp := tls.Alloc(12)
defer tls.Free(12)
@@ -174746,7 +182755,7 @@ func fts5IndexMerge(tls *libc.TLS, p uintptr, ppStruct uintptr, nPg int32, nMin
//
// If an error occurs, set the Fts5Index.rc error code. If an error has
// already occurred, this function is a no-op.
-func fts5IndexAutomerge(tls *libc.TLS, p uintptr, ppStruct uintptr, nLeaf int32) { /* sqlite3.c:224224:13: */
+func fts5IndexAutomerge(tls *libc.TLS, p uintptr, ppStruct uintptr, nLeaf int32) { /* sqlite3.c:225470:13: */
if ((*Fts5Index)(unsafe.Pointer(p)).Frc == SQLITE_OK) && ((*Fts5Config)(unsafe.Pointer((*Fts5Index)(unsafe.Pointer(p)).FpConfig)).FnAutomerge > 0) {
var pStruct uintptr = *(*uintptr)(unsafe.Pointer(ppStruct))
var nWrite U64 // Initial value of write-counter
@@ -174763,7 +182772,7 @@ func fts5IndexAutomerge(tls *libc.TLS, p uintptr, ppStruct uintptr, nLeaf int32)
}
}
-func fts5IndexCrisismerge(tls *libc.TLS, p uintptr, ppStruct uintptr) { /* sqlite3.c:224245:13: */
+func fts5IndexCrisismerge(tls *libc.TLS, p uintptr, ppStruct uintptr) { /* sqlite3.c:225491:13: */
bp := tls.Alloc(8)
defer tls.Free(8)
@@ -174780,7 +182789,7 @@ func fts5IndexCrisismerge(tls *libc.TLS, p uintptr, ppStruct uintptr) { /* sqlit
*(*uintptr)(unsafe.Pointer(ppStruct)) = *(*uintptr)(unsafe.Pointer(bp /* pStruct */))
}
-func fts5IndexReturn(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:224263:12: */
+func fts5IndexReturn(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:225509:12: */
var rc int32 = (*Fts5Index)(unsafe.Pointer(p)).Frc
(*Fts5Index)(unsafe.Pointer(p)).Frc = SQLITE_OK
return rc
@@ -174789,14 +182798,14 @@ func fts5IndexReturn(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:224263:12: *
type Fts5FlushCtx1 = struct {
FpIdx uintptr
Fwriter Fts5SegWriter
-} /* sqlite3.c:224269:9 */
+} /* sqlite3.c:225515:9 */
-type Fts5FlushCtx = Fts5FlushCtx1 /* sqlite3.c:224269:29 */
+type Fts5FlushCtx = Fts5FlushCtx1 /* sqlite3.c:225515:29 */
// Buffer aBuf[] contains a list of varints, all small enough to fit
// in a 32-bit integer. Return the size of the largest prefix of this
// list nMax bytes or less in size.
-func fts5PoslistPrefix(tls *libc.TLS, aBuf uintptr, nMax int32) int32 { /* sqlite3.c:224280:12: */
+func fts5PoslistPrefix(tls *libc.TLS, aBuf uintptr, nMax int32) int32 { /* sqlite3.c:225526:12: */
bp := tls.Alloc(4)
defer tls.Free(4)
@@ -174821,7 +182830,7 @@ func fts5PoslistPrefix(tls *libc.TLS, aBuf uintptr, nMax int32) int32 { /* sqlit
//
// If an error occurs, set the Fts5Index.rc error code. If an error has
// already occurred, this function is a no-op.
-func fts5FlushOneHash(tls *libc.TLS, p uintptr) { /* sqlite3.c:224301:13: */
+func fts5FlushOneHash(tls *libc.TLS, p uintptr) { /* sqlite3.c:225547:13: */
bp := tls.Alloc(176)
defer tls.Free(176)
@@ -174883,7 +182892,7 @@ func fts5FlushOneHash(tls *libc.TLS, p uintptr) { /* sqlite3.c:224301:13: */
} else {
var iRowid I64 = int64(0)
- *(*I64)(unsafe.Pointer(bp + 144 /* iDelta */)) = int64(0)
+ *(*U64)(unsafe.Pointer(bp + 144 /* iDelta */)) = uint64(0)
var iOff int32 = 0
// The entire doclist will not fit on this leaf. The following
@@ -174891,7 +182900,7 @@ func fts5FlushOneHash(tls *libc.TLS, p uintptr) { /* sqlite3.c:224301:13: */
// doclist.
for ((*Fts5Index)(unsafe.Pointer(p)).Frc == SQLITE_OK) && (iOff < *(*int32)(unsafe.Pointer(bp + 136 /* nDoclist */))) {
iOff = iOff + (int32(sqlite3Fts5GetVarint(tls, (*(*uintptr)(unsafe.Pointer(bp + 128 /* pDoclist */)) + uintptr(iOff)), bp+144 /* &iDelta */)))
- iRowid = iRowid + (*(*I64)(unsafe.Pointer(bp + 144 /* iDelta */)))
+ iRowid = I64(U64(iRowid) + (*(*U64)(unsafe.Pointer(bp + 144 /* iDelta */))))
if (*Fts5SegWriter)(unsafe.Pointer(bp /* &writer */)).FbFirstRowidInPage != 0 {
fts5PutU16(tls, ((*Fts5Buffer)(unsafe.Pointer(pBuf)).Fp), U16((*Fts5Buffer)(unsafe.Pointer(pBuf)).Fn)) // first rowid on page
@@ -174902,7 +182911,7 @@ func fts5FlushOneHash(tls *libc.TLS, p uintptr) { /* sqlite3.c:224301:13: */
break
}
} else {
- *(*int32)(unsafe.Pointer(pBuf + 8 /* &.n */)) += (sqlite3Fts5PutVarint(tls, ((*Fts5Buffer)(unsafe.Pointer(pBuf)).Fp + uintptr((*Fts5Buffer)(unsafe.Pointer(pBuf)).Fn)), uint64(*(*I64)(unsafe.Pointer(bp + 144 /* iDelta */)))))
+ *(*int32)(unsafe.Pointer(pBuf + 8 /* &.n */)) += (sqlite3Fts5PutVarint(tls, ((*Fts5Buffer)(unsafe.Pointer(pBuf)).Fp + uintptr((*Fts5Buffer)(unsafe.Pointer(pBuf)).Fn)), *(*U64)(unsafe.Pointer(bp + 144 /* iDelta */))))
}
if eDetail == FTS5_DETAIL_NONE {
@@ -174999,7 +183008,7 @@ func fts5FlushOneHash(tls *libc.TLS, p uintptr) { /* sqlite3.c:224301:13: */
}
// Flush any data stored in the in-memory hash tables to the database.
-func fts5IndexFlush(tls *libc.TLS, p uintptr) { /* sqlite3.c:224455:13: */
+func fts5IndexFlush(tls *libc.TLS, p uintptr) { /* sqlite3.c:225701:13: */
// Unless it is empty, flush the hash table to disk
if (*Fts5Index)(unsafe.Pointer(p)).FnPendingData != 0 {
@@ -175008,7 +183017,7 @@ func fts5IndexFlush(tls *libc.TLS, p uintptr) { /* sqlite3.c:224455:13: */
}
}
-func fts5IndexOptimizeStruct(tls *libc.TLS, p uintptr, pStruct uintptr) uintptr { /* sqlite3.c:224464:22: */
+func fts5IndexOptimizeStruct(tls *libc.TLS, p uintptr, pStruct uintptr) uintptr { /* sqlite3.c:225710:22: */
var pNew uintptr = uintptr(0)
var nByte Sqlite3_int64 = Sqlite3_int64(unsafe.Sizeof(Fts5Structure{}))
var nSeg int32 = (*Fts5Structure)(unsafe.Pointer(pStruct)).FnSegment
@@ -175069,7 +183078,7 @@ func fts5IndexOptimizeStruct(tls *libc.TLS, p uintptr, pStruct uintptr) uintptr
return pNew
}
-func sqlite3Fts5IndexOptimize(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:224526:12: */
+func sqlite3Fts5IndexOptimize(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:225772:12: */
bp := tls.Alloc(12)
defer tls.Free(12)
@@ -175103,7 +183112,7 @@ func sqlite3Fts5IndexOptimize(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:224
// This is called to implement the special "VALUES('merge', $nMerge)"
// INSERT command.
-func sqlite3Fts5IndexMerge(tls *libc.TLS, p uintptr, nMerge int32) int32 { /* sqlite3.c:224560:12: */
+func sqlite3Fts5IndexMerge(tls *libc.TLS, p uintptr, nMerge int32) int32 { /* sqlite3.c:225806:12: */
bp := tls.Alloc(8)
defer tls.Free(8)
@@ -175128,12 +183137,12 @@ func sqlite3Fts5IndexMerge(tls *libc.TLS, p uintptr, nMerge int32) int32 { /* sq
return fts5IndexReturn(tls, p)
}
-func fts5AppendRowid(tls *libc.TLS, p uintptr, iDelta I64, pUnused uintptr, pBuf uintptr) { /* sqlite3.c:224582:13: */
+func fts5AppendRowid(tls *libc.TLS, p uintptr, iDelta I64, pUnused uintptr, pBuf uintptr) { /* sqlite3.c:225828:13: */
_ = pUnused
sqlite3Fts5BufferAppendVarint(tls, (p + 52 /* &.rc */), pBuf, iDelta)
}
-func fts5AppendPoslist(tls *libc.TLS, p uintptr, iDelta I64, pMulti uintptr, pBuf uintptr) { /* sqlite3.c:224592:13: */
+func fts5AppendPoslist(tls *libc.TLS, p uintptr, iDelta I64, pMulti uintptr, pBuf uintptr) { /* sqlite3.c:225838:13: */
var nData int32 = (*Fts5Iter)(unsafe.Pointer(pMulti)).Fbase.FnData
var nByte int32 = (((nData + 9) + 9) + FTS5_DATA_ZERO_PADDING)
@@ -175160,7 +183169,7 @@ func fts5AppendPoslist(tls *libc.TLS, p uintptr, iDelta I64, pMulti uintptr, pBu
}
}
-func fts5DoclistIterNext(tls *libc.TLS, pIter uintptr) { /* sqlite3.c:224610:13: */
+func fts5DoclistIterNext(tls *libc.TLS, pIter uintptr) { /* sqlite3.c:225856:13: */
bp := tls.Alloc(12)
defer tls.Free(12)
@@ -175192,7 +183201,7 @@ func fts5DoclistIterNext(tls *libc.TLS, pIter uintptr) { /* sqlite3.c:224610:13:
}
}
-func fts5DoclistIterInit(tls *libc.TLS, pBuf uintptr, pIter uintptr) { /* sqlite3.c:224639:13: */
+func fts5DoclistIterInit(tls *libc.TLS, pBuf uintptr, pIter uintptr) { /* sqlite3.c:225885:13: */
libc.Xmemset(tls, pIter, 0, uint64(unsafe.Sizeof(Fts5DoclistIter{})))
if (*Fts5Buffer)(unsafe.Pointer(pBuf)).Fn > 0 {
(*Fts5DoclistIter)(unsafe.Pointer(pIter)).FaPoslist = (*Fts5Buffer)(unsafe.Pointer(pBuf)).Fp
@@ -175202,13 +183211,13 @@ func fts5DoclistIterInit(tls *libc.TLS, pBuf uintptr, pIter uintptr) { /* sqlite
}
// Swap the contents of buffer *p1 with that of *p2.
-func fts5BufferSwap(tls *libc.TLS, p1 uintptr, p2 uintptr) { /* sqlite3.c:224678:13: */
+func fts5BufferSwap(tls *libc.TLS, p1 uintptr, p2 uintptr) { /* sqlite3.c:225924:13: */
var tmp = *(*Fts5Buffer)(unsafe.Pointer(p1))
*(*Fts5Buffer)(unsafe.Pointer(p1)) = *(*Fts5Buffer)(unsafe.Pointer(p2))
*(*Fts5Buffer)(unsafe.Pointer(p2)) = tmp
}
-func fts5NextRowid(tls *libc.TLS, pBuf uintptr, piOff uintptr, piRowid uintptr) { /* sqlite3.c:224684:13: */
+func fts5NextRowid(tls *libc.TLS, pBuf uintptr, piOff uintptr, piRowid uintptr) { /* sqlite3.c:225930:13: */
bp := tls.Alloc(8)
defer tls.Free(8)
@@ -175225,7 +183234,7 @@ func fts5NextRowid(tls *libc.TLS, pBuf uintptr, piOff uintptr, piRowid uintptr)
// This is the equivalent of fts5MergePrefixLists() for detail=none mode.
// In this case the buffers consist of a delta-encoded list of rowids only.
-func fts5MergeRowidLists(tls *libc.TLS, p uintptr, p1 uintptr, nBuf int32, aBuf uintptr) { /* sqlite3.c:224699:13: */
+func fts5MergeRowidLists(tls *libc.TLS, p uintptr, p1 uintptr, nBuf int32, aBuf uintptr) { /* sqlite3.c:225945:13: */
bp := tls.Alloc(48)
defer tls.Free(48)
@@ -175275,17 +183284,17 @@ func fts5MergeRowidLists(tls *libc.TLS, p uintptr, p1 uintptr, nBuf int32, aBuf
}
type PrefixMerger1 = struct {
- Fiter Fts5DoclistIter
- FiPos I64
- FiOff int32
- _ [4]byte
- FaPos uintptr
- FpNext uintptr
-} /* sqlite3.c:224742:9 */
+ Fiter Fts5DoclistIter
+ FiPos I64
+ FiOff int32
+ F__ccgo_pad1 [4]byte
+ FaPos uintptr
+ FpNext uintptr
+} /* sqlite3.c:225988:9 */
-type PrefixMerger = PrefixMerger1 /* sqlite3.c:224742:29 */
+type PrefixMerger = PrefixMerger1 /* sqlite3.c:225988:29 */
-func fts5PrefixMergerInsertByRowid(tls *libc.TLS, ppHead uintptr, p uintptr) { /* sqlite3.c:224751:13: */
+func fts5PrefixMergerInsertByRowid(tls *libc.TLS, ppHead uintptr, p uintptr) { /* sqlite3.c:225997:13: */
if (*PrefixMerger)(unsafe.Pointer(p)).Fiter.FaPoslist != 0 {
var pp uintptr = ppHead
for (*(*uintptr)(unsafe.Pointer(pp)) != 0) && ((*PrefixMerger)(unsafe.Pointer(p)).Fiter.FiRowid > (*PrefixMerger)(unsafe.Pointer((*(*uintptr)(unsafe.Pointer(pp))))).Fiter.FiRowid) {
@@ -175296,7 +183305,7 @@ func fts5PrefixMergerInsertByRowid(tls *libc.TLS, ppHead uintptr, p uintptr) { /
}
}
-func fts5PrefixMergerInsertByPosition(tls *libc.TLS, ppHead uintptr, p uintptr) { /* sqlite3.c:224765:13: */
+func fts5PrefixMergerInsertByPosition(tls *libc.TLS, ppHead uintptr, p uintptr) { /* sqlite3.c:226011:13: */
if (*PrefixMerger)(unsafe.Pointer(p)).FiPos >= int64(0) {
var pp uintptr = ppHead
for (*(*uintptr)(unsafe.Pointer(pp)) != 0) && ((*PrefixMerger)(unsafe.Pointer(p)).FiPos > (*PrefixMerger)(unsafe.Pointer((*(*uintptr)(unsafe.Pointer(pp))))).FiPos) {
@@ -175309,7 +183318,7 @@ func fts5PrefixMergerInsertByPosition(tls *libc.TLS, ppHead uintptr, p uintptr)
// Array aBuf[] contains nBuf doclists. These are all merged in with the
// doclist in buffer p1.
-func fts5MergePrefixLists(tls *libc.TLS, p uintptr, p1 uintptr, nBuf int32, aBuf uintptr) { /* sqlite3.c:224784:13: */
+func fts5MergePrefixLists(tls *libc.TLS, p uintptr, p1 uintptr, nBuf int32, aBuf uintptr) { /* sqlite3.c:226030:13: */
bp := tls.Alloc(1072)
defer tls.Free(1072)
@@ -175379,7 +183388,6 @@ func fts5MergePrefixLists(tls *libc.TLS, p uintptr, p1 uintptr, nBuf int32, aBuf
(*PrefixMerger)(unsafe.Pointer(pSave)).FiPos = int64(0)
(*PrefixMerger)(unsafe.Pointer(pSave)).FaPos = ((*PrefixMerger)(unsafe.Pointer(pSave)).Fiter.FaPoslist + uintptr((*PrefixMerger)(unsafe.Pointer(pSave)).Fiter.FnSize))
sqlite3Fts5PoslistNext64(tls, (*PrefixMerger)(unsafe.Pointer(pSave)).FaPos, (*PrefixMerger)(unsafe.Pointer((pSave))).Fiter.FnPoslist, (pSave + 40 /* &.iOff */), (pSave + 32 /* &.iPos */))
-
nTmp = nTmp + ((*PrefixMerger)(unsafe.Pointer(pSave)).Fiter.FnPoslist + 10)
nMerge++
fts5PrefixMergerInsertByPosition(tls, bp+1024 /* &pHead */, pSave)
@@ -175403,7 +183411,6 @@ func fts5MergePrefixLists(tls *libc.TLS, p uintptr, p1 uintptr, nBuf int32, aBuf
*(*uintptr)(unsafe.Pointer(bp + 1024 /* pHead */)) = (*PrefixMerger)(unsafe.Pointer(pThis)).FpNext
sqlite3Fts5PoslistSafeAppend(tls, bp+1048 /* &tmp */, bp+1064 /* &iPrev */, (*PrefixMerger)(unsafe.Pointer(pThis)).FiPos)
sqlite3Fts5PoslistNext64(tls, (*PrefixMerger)(unsafe.Pointer(pThis)).FaPos, (*PrefixMerger)(unsafe.Pointer((pThis))).Fiter.FnPoslist, (pThis + 40 /* &.iOff */), (pThis + 32 /* &.iPos */))
-
fts5PrefixMergerInsertByPosition(tls, bp+1024 /* &pHead */, pThis)
for (*PrefixMerger)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 1024 /* pHead */)))).FpNext != 0 {
@@ -175412,7 +183419,6 @@ func fts5MergePrefixLists(tls *libc.TLS, p uintptr, p1 uintptr, nBuf int32, aBuf
sqlite3Fts5PoslistSafeAppend(tls, bp+1048 /* &tmp */, bp+1064 /* &iPrev */, (*PrefixMerger)(unsafe.Pointer(pThis)).FiPos)
}
sqlite3Fts5PoslistNext64(tls, (*PrefixMerger)(unsafe.Pointer(pThis)).FaPos, (*PrefixMerger)(unsafe.Pointer((pThis))).Fiter.FnPoslist, (pThis + 40 /* &.iOff */), (pThis + 32 /* &.iPos */))
-
*(*uintptr)(unsafe.Pointer(bp + 1024 /* pHead */)) = (*PrefixMerger)(unsafe.Pointer(pThis)).FpNext
fts5PrefixMergerInsertByPosition(tls, bp+1024 /* &pHead */, pThis)
}
@@ -175477,7 +183483,7 @@ func fts5MergePrefixLists(tls *libc.TLS, p uintptr, p1 uintptr, nBuf int32, aBuf
*(*Fts5Buffer)(unsafe.Pointer(p1)) = *(*Fts5Buffer)(unsafe.Pointer(bp + 1032 /* out */))
}
-func fts5SetupPrefixIter(tls *libc.TLS, p uintptr, bDesc int32, iIdx int32, pToken uintptr, nToken int32, pColset uintptr, ppIter uintptr) { /* sqlite3.c:224927:13: */
+func fts5SetupPrefixIter(tls *libc.TLS, p uintptr, bDesc int32, iIdx int32, pToken uintptr, nToken int32, pColset uintptr, ppIter uintptr) { /* sqlite3.c:226174:13: */
bp := tls.Alloc(32)
defer tls.Free(32)
@@ -175529,9 +183535,13 @@ func fts5SetupPrefixIter(tls *libc.TLS, p uintptr, bDesc int32, iIdx int32, pTok
fts5IterSetOutputCb(tls, (p + 52 /* &.rc */), *(*uintptr)(unsafe.Pointer(bp + 16 /* p1 */)))
for ; fts5MultiIterEof(tls, p, *(*uintptr)(unsafe.Pointer(bp + 16 /* p1 */))) == 0; fts5MultiIterNext2(tls, p, *(*uintptr)(unsafe.Pointer(bp + 16 /* p1 */)), bp+24 /* &dummy */) {
var pSeg uintptr = ((*(*uintptr)(unsafe.Pointer(bp + 16 /* p1 */)) + 96 /* &.aSeg */) + uintptr((*Fts5CResult)(unsafe.Pointer((*Fts5Iter)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 16 /* p1 */)))).FaFirst+1*4)).FiFirst)*120)
- (*(*func(*libc.TLS, uintptr, uintptr))(unsafe.Pointer((*(*uintptr)(unsafe.Pointer(bp + 16 /* p1 */)) + 56 /* &.xSetOutputs */))))(tls, *(*uintptr)(unsafe.Pointer(bp + 16 /* p1 */)), pSeg)
+ (*struct {
+ f func(*libc.TLS, uintptr, uintptr)
+ })(unsafe.Pointer(&struct{ uintptr }{(*Fts5Iter)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 16 /* p1 */)))).FxSetOutputs})).f(tls, *(*uintptr)(unsafe.Pointer(bp + 16 /* p1 */)), pSeg)
if (*Fts5Iter)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 16 /* p1 */)))).Fbase.FnData != 0 {
- (*(*func(*libc.TLS, uintptr, I64, uintptr, uintptr))(unsafe.Pointer(&xAppend)))(tls, p, ((*Fts5Iter)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 16 /* p1 */)))).Fbase.FiRowid - iLastRowid), *(*uintptr)(unsafe.Pointer(bp + 16 /* p1 */)), bp /* &doclist */)
+ (*struct {
+ f func(*libc.TLS, uintptr, I64, uintptr, uintptr)
+ })(unsafe.Pointer(&struct{ uintptr }{xAppend})).f(tls, p, ((*Fts5Iter)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 16 /* p1 */)))).Fbase.FiRowid - iLastRowid), *(*uintptr)(unsafe.Pointer(bp + 16 /* p1 */)), bp /* &doclist */)
iLastRowid = (*Fts5Iter)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 16 /* p1 */)))).Fbase.FiRowid
}
}
@@ -175545,7 +183555,9 @@ func fts5SetupPrefixIter(tls *libc.TLS, p uintptr, bDesc int32, iIdx int32, pTok
var pSeg uintptr = ((*(*uintptr)(unsafe.Pointer(bp + 16 /* p1 */)) + 96 /* &.aSeg */) + uintptr((*Fts5CResult)(unsafe.Pointer((*Fts5Iter)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 16 /* p1 */)))).FaFirst+1*4)).FiFirst)*120)
var nTerm int32 = (*Fts5SegIter)(unsafe.Pointer(pSeg)).Fterm.Fn
var pTerm uintptr = (*Fts5SegIter)(unsafe.Pointer(pSeg)).Fterm.Fp
- (*(*func(*libc.TLS, uintptr, uintptr))(unsafe.Pointer((*(*uintptr)(unsafe.Pointer(bp + 16 /* p1 */)) + 56 /* &.xSetOutputs */))))(tls, *(*uintptr)(unsafe.Pointer(bp + 16 /* p1 */)), pSeg)
+ (*struct {
+ f func(*libc.TLS, uintptr, uintptr)
+ })(unsafe.Pointer(&struct{ uintptr }{(*Fts5Iter)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 16 /* p1 */)))).FxSetOutputs})).f(tls, *(*uintptr)(unsafe.Pointer(bp + 16 /* p1 */)), pSeg)
if *(*int32)(unsafe.Pointer(bp + 28 /* bNewTerm */)) != 0 {
if (nTerm < nToken) || (libc.Xmemcmp(tls, pToken, pTerm, uint64(nToken)) != 0) {
@@ -175570,7 +183582,9 @@ func fts5SetupPrefixIter(tls *libc.TLS, p uintptr, bDesc int32, iIdx int32, pTok
}
}
if iStore == (i1 + nMerge) {
- (*(*func(*libc.TLS, uintptr, uintptr, int32, uintptr))(unsafe.Pointer(&xMerge)))(tls, p, bp /* &doclist */, nMerge, (aBuf + uintptr(i1)*16))
+ (*struct {
+ f func(*libc.TLS, uintptr, uintptr, int32, uintptr)
+ })(unsafe.Pointer(&struct{ uintptr }{xMerge})).f(tls, p, bp /* &doclist */, nMerge, (aBuf + uintptr(i1)*16))
for iStore = i1; iStore < (i1 + nMerge); iStore++ {
sqlite3Fts5BufferZero(tls, (aBuf + uintptr(iStore)*16))
}
@@ -175579,14 +183593,18 @@ func fts5SetupPrefixIter(tls *libc.TLS, p uintptr, bDesc int32, iIdx int32, pTok
iLastRowid = int64(0)
}
- (*(*func(*libc.TLS, uintptr, I64, uintptr, uintptr))(unsafe.Pointer(&xAppend)))(tls, p, ((*Fts5Iter)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 16 /* p1 */)))).Fbase.FiRowid - iLastRowid), *(*uintptr)(unsafe.Pointer(bp + 16 /* p1 */)), bp /* &doclist */)
+ (*struct {
+ f func(*libc.TLS, uintptr, I64, uintptr, uintptr)
+ })(unsafe.Pointer(&struct{ uintptr }{xAppend})).f(tls, p, ((*Fts5Iter)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 16 /* p1 */)))).Fbase.FiRowid - iLastRowid), *(*uintptr)(unsafe.Pointer(bp + 16 /* p1 */)), bp /* &doclist */)
iLastRowid = (*Fts5Iter)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 16 /* p1 */)))).Fbase.FiRowid
}
for i = 0; i < nBuf; i = i + (nMerge) {
var iFree int32
if (*Fts5Index)(unsafe.Pointer(p)).Frc == SQLITE_OK {
- (*(*func(*libc.TLS, uintptr, uintptr, int32, uintptr))(unsafe.Pointer(&xMerge)))(tls, p, bp /* &doclist */, nMerge, (aBuf + uintptr(i)*16))
+ (*struct {
+ f func(*libc.TLS, uintptr, uintptr, int32, uintptr)
+ })(unsafe.Pointer(&struct{ uintptr }{xMerge})).f(tls, p, bp /* &doclist */, nMerge, (aBuf + uintptr(i)*16))
}
for iFree = i; iFree < (i + nMerge); iFree++ {
sqlite3Fts5BufferFree(tls, (aBuf + uintptr(iFree)*16))
@@ -175612,7 +183630,7 @@ func fts5SetupPrefixIter(tls *libc.TLS, p uintptr, bDesc int32, iIdx int32, pTok
// Indicate that all subsequent calls to sqlite3Fts5IndexWrite() pertain
// to the document with rowid iRowid.
-func sqlite3Fts5IndexBeginWrite(tls *libc.TLS, p uintptr, bDelete int32, iRowid I64) int32 { /* sqlite3.c:225064:12: */
+func sqlite3Fts5IndexBeginWrite(tls *libc.TLS, p uintptr, bDelete int32, iRowid I64) int32 { /* sqlite3.c:226311:12: */
// Allocate the hash table if it has not already been allocated
if (*Fts5Index)(unsafe.Pointer(p)).FpHash == uintptr(0) {
@@ -175632,7 +183650,7 @@ func sqlite3Fts5IndexBeginWrite(tls *libc.TLS, p uintptr, bDelete int32, iRowid
}
// Commit data to disk.
-func sqlite3Fts5IndexSync(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:225088:12: */
+func sqlite3Fts5IndexSync(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:226335:12: */
fts5IndexFlush(tls, p)
sqlite3Fts5IndexCloseReader(tls, p)
@@ -175643,7 +183661,7 @@ func sqlite3Fts5IndexSync(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:225088:
// to the database. Additionally, assume that the contents of the %_data
// table may have changed on disk. So any in-memory caches of %_data
// records must be invalidated.
-func sqlite3Fts5IndexRollback(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:225101:12: */
+func sqlite3Fts5IndexRollback(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:226348:12: */
sqlite3Fts5IndexCloseReader(tls, p)
fts5IndexDiscardData(tls, p)
fts5StructureInvalidate(tls, p)
@@ -175654,7 +183672,7 @@ func sqlite3Fts5IndexRollback(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:225
// The %_data table is completely empty when this function is called. This
// function populates it with the initial structure objects for each index,
// and the initial version of the "averages" record (a zero-byte blob).
-func sqlite3Fts5IndexReinit(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:225114:12: */
+func sqlite3Fts5IndexReinit(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:226361:12: */
bp := tls.Alloc(40)
defer tls.Free(40)
@@ -175663,7 +183681,7 @@ func sqlite3Fts5IndexReinit(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:22511
fts5StructureInvalidate(tls, p)
fts5IndexDiscardData(tls, p)
libc.Xmemset(tls, bp /* &s */, 0, uint64(unsafe.Sizeof(Fts5Structure{})))
- fts5DataWrite(tls, p, int64(FTS5_AVERAGES_ROWID), ts+703 /* "" */, 0)
+ fts5DataWrite(tls, p, int64(FTS5_AVERAGES_ROWID), ts+755 /* "" */, 0)
fts5StructureWrite(tls, p, bp /* &s */)
return fts5IndexReturn(tls, p)
}
@@ -175673,7 +183691,7 @@ func sqlite3Fts5IndexReinit(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:22511
//
// If successful, set *pp to point to the new object and return SQLITE_OK.
// Otherwise, set *pp to NULL and return an SQLite error code.
-func sqlite3Fts5IndexOpen(tls *libc.TLS, pConfig uintptr, bCreate int32, pp uintptr, pzErr uintptr) int32 { /* sqlite3.c:225131:12: */
+func sqlite3Fts5IndexOpen(tls *libc.TLS, pConfig uintptr, bCreate int32, pp uintptr, pzErr uintptr) int32 { /* sqlite3.c:226378:12: */
bp := tls.Alloc(12)
defer tls.Free(12)
@@ -175684,13 +183702,13 @@ func sqlite3Fts5IndexOpen(tls *libc.TLS, pConfig uintptr, bCreate int32, pp uint
if *(*int32)(unsafe.Pointer(bp + 8 /* rc */)) == SQLITE_OK {
(*Fts5Index)(unsafe.Pointer(p)).FpConfig = pConfig
(*Fts5Index)(unsafe.Pointer(p)).FnWorkUnit = FTS5_WORK_UNIT
- (*Fts5Index)(unsafe.Pointer(p)).FzDataTbl = sqlite3Fts5Mprintf(tls, bp+8 /* &rc */, ts+31839 /* "%s_data" */, libc.VaList(bp, (*Fts5Config)(unsafe.Pointer(pConfig)).FzName))
+ (*Fts5Index)(unsafe.Pointer(p)).FzDataTbl = sqlite3Fts5Mprintf(tls, bp+8 /* &rc */, ts+33335 /* "%s_data" */, libc.VaList(bp, (*Fts5Config)(unsafe.Pointer(pConfig)).FzName))
if ((*Fts5Index)(unsafe.Pointer(p)).FzDataTbl != 0) && (bCreate != 0) {
*(*int32)(unsafe.Pointer(bp + 8 /* rc */)) = sqlite3Fts5CreateTable(tls,
- pConfig, ts+22856 /* "data" */, ts+31847 /* "id INTEGER PRIMA..." */, 0, pzErr)
+ pConfig, ts+23316 /* "data" */, ts+33343 /* "id INTEGER PRIMA..." */, 0, pzErr)
if *(*int32)(unsafe.Pointer(bp + 8 /* rc */)) == SQLITE_OK {
- *(*int32)(unsafe.Pointer(bp + 8 /* rc */)) = sqlite3Fts5CreateTable(tls, pConfig, ts+9753, /* "idx" */
- ts+31882, /* "segid, term, pgn..." */
+ *(*int32)(unsafe.Pointer(bp + 8 /* rc */)) = sqlite3Fts5CreateTable(tls, pConfig, ts+10212, /* "idx" */
+ ts+33378, /* "segid, term, pgn..." */
1, pzErr)
}
if *(*int32)(unsafe.Pointer(bp + 8 /* rc */)) == SQLITE_OK {
@@ -175707,7 +183725,7 @@ func sqlite3Fts5IndexOpen(tls *libc.TLS, pConfig uintptr, bCreate int32, pp uint
}
// Close a handle opened by an earlier call to sqlite3Fts5IndexOpen().
-func sqlite3Fts5IndexClose(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:225172:12: */
+func sqlite3Fts5IndexClose(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:226419:12: */
var rc int32 = SQLITE_OK
if p != 0 {
@@ -175728,18 +183746,18 @@ func sqlite3Fts5IndexClose(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:225172
// Argument p points to a buffer containing utf-8 text that is n bytes in
// size. Return the number of bytes in the nChar character prefix of the
// buffer, or 0 if there are less than nChar characters in total.
-func sqlite3Fts5IndexCharlenToBytelen(tls *libc.TLS, p uintptr, nByte int32, nChar int32) int32 { /* sqlite3.c:225195:12: */
+func sqlite3Fts5IndexCharlenToBytelen(tls *libc.TLS, p uintptr, nByte int32, nChar int32) int32 { /* sqlite3.c:226442:12: */
var n int32 = 0
var i int32
for i = 0; i < nChar; i++ {
if n >= nByte {
return 0
} // Input contains fewer than nChar chars
- if int32(uint8(*(*int8)(unsafe.Pointer(p + uintptr(libc.PostIncInt32(&n, 1)))))) >= 0xc0 {
+ if int32(uint8(*(*uint8)(unsafe.Pointer(p + uintptr(libc.PostIncInt32(&n, 1)))))) >= 0xc0 {
if n >= nByte {
return 0
}
- for (int32(*(*int8)(unsafe.Pointer(p + uintptr(n)))) & 0xc0) == 0x80 {
+ for (int32(*(*uint8)(unsafe.Pointer(p + uintptr(n)))) & 0xc0) == 0x80 {
n++
if n >= nByte {
if (i + 1) == nChar {
@@ -175755,12 +183773,12 @@ func sqlite3Fts5IndexCharlenToBytelen(tls *libc.TLS, p uintptr, nByte int32, nCh
// pIn is a UTF-8 encoded string, nIn bytes in size. Return the number of
// unicode characters in the string.
-func fts5IndexCharlen(tls *libc.TLS, pIn uintptr, nIn int32) int32 { /* sqlite3.c:225222:12: */
+func fts5IndexCharlen(tls *libc.TLS, pIn uintptr, nIn int32) int32 { /* sqlite3.c:226469:12: */
var nChar int32 = 0
var i int32 = 0
for i < nIn {
- if int32(uint8(*(*int8)(unsafe.Pointer(pIn + uintptr(libc.PostIncInt32(&i, 1)))))) >= 0xc0 {
- for (i < nIn) && ((int32(*(*int8)(unsafe.Pointer(pIn + uintptr(i)))) & 0xc0) == 0x80) {
+ if int32(uint8(*(*uint8)(unsafe.Pointer(pIn + uintptr(libc.PostIncInt32(&i, 1)))))) >= 0xc0 {
+ for (i < nIn) && ((int32(*(*uint8)(unsafe.Pointer(pIn + uintptr(i)))) & 0xc0) == 0x80) {
i++
}
}
@@ -175777,21 +183795,21 @@ func fts5IndexCharlen(tls *libc.TLS, pIn uintptr, nIn int32) int32 { /* sqlite3.
// If the operation is a delete, it must be called (at least) once for each
// unique token in the document with an iCol value less than zero. The iPos
// argument is ignored for a delete.
-func sqlite3Fts5IndexWrite(tls *libc.TLS, p uintptr, iCol int32, iPos int32, pToken uintptr, nToken int32) int32 { /* sqlite3.c:225244:12: */
+func sqlite3Fts5IndexWrite(tls *libc.TLS, p uintptr, iCol int32, iPos int32, pToken uintptr, nToken int32) int32 { /* sqlite3.c:226491:12: */
var i int32 // Used to iterate through indexes
var rc int32 = SQLITE_OK // Return code
var pConfig uintptr = (*Fts5Index)(unsafe.Pointer(p)).FpConfig
// Add the entry to the main terms index.
rc = sqlite3Fts5HashWrite(tls,
- (*Fts5Index)(unsafe.Pointer(p)).FpHash, (*Fts5Index)(unsafe.Pointer(p)).FiWriteRowid, iCol, iPos, int8('0'), pToken, nToken)
+ (*Fts5Index)(unsafe.Pointer(p)).FpHash, (*Fts5Index)(unsafe.Pointer(p)).FiWriteRowid, iCol, iPos, uint8('0'), pToken, nToken)
for i = 0; (i < (*Fts5Config)(unsafe.Pointer(pConfig)).FnPrefix) && (rc == SQLITE_OK); i++ {
var nChar int32 = *(*int32)(unsafe.Pointer((*Fts5Config)(unsafe.Pointer(pConfig)).FaPrefix + uintptr(i)*4))
var nByte int32 = sqlite3Fts5IndexCharlenToBytelen(tls, pToken, nToken, nChar)
if nByte != 0 {
rc = sqlite3Fts5HashWrite(tls, (*Fts5Index)(unsafe.Pointer(p)).FpHash,
- (*Fts5Index)(unsafe.Pointer(p)).FiWriteRowid, iCol, iPos, (int8(('0' + i) + 1)), pToken,
+ (*Fts5Index)(unsafe.Pointer(p)).FiWriteRowid, iCol, iPos, (uint8(('0' + i) + 1)), pToken,
nByte)
}
}
@@ -175801,7 +183819,7 @@ func sqlite3Fts5IndexWrite(tls *libc.TLS, p uintptr, iCol int32, iPos int32, pTo
// Open a new iterator to iterate though all rowid that match the
// specified token or token prefix.
-func sqlite3Fts5IndexQuery(tls *libc.TLS, p uintptr, pToken uintptr, nToken int32, flags int32, pColset uintptr, ppIter uintptr) int32 { /* sqlite3.c:225280:12: */
+func sqlite3Fts5IndexQuery(tls *libc.TLS, p uintptr, pToken uintptr, nToken int32, flags int32, pColset uintptr, ppIter uintptr) int32 { /* sqlite3.c:226527:12: */
bp := tls.Alloc(24)
defer tls.Free(24)
@@ -175859,7 +183877,9 @@ func sqlite3Fts5IndexQuery(tls *libc.TLS, p uintptr, pToken uintptr, nToken int3
if (*Fts5Index)(unsafe.Pointer(p)).Frc == SQLITE_OK {
var pSeg uintptr = ((*(*uintptr)(unsafe.Pointer(bp + 16 /* pRet */)) + 96 /* &.aSeg */) + uintptr((*Fts5CResult)(unsafe.Pointer((*Fts5Iter)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 16 /* pRet */)))).FaFirst+1*4)).FiFirst)*120)
if (*Fts5SegIter)(unsafe.Pointer(pSeg)).FpLeaf != 0 {
- (*(*func(*libc.TLS, uintptr, uintptr))(unsafe.Pointer((*(*uintptr)(unsafe.Pointer(bp + 16 /* pRet */)) + 56 /* &.xSetOutputs */))))(tls, *(*uintptr)(unsafe.Pointer(bp + 16 /* pRet */)), pSeg)
+ (*struct {
+ f func(*libc.TLS, uintptr, uintptr)
+ })(unsafe.Pointer(&struct{ uintptr }{(*Fts5Iter)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 16 /* pRet */)))).FxSetOutputs})).f(tls, *(*uintptr)(unsafe.Pointer(bp + 16 /* pRet */)), pSeg)
}
}
}
@@ -175878,7 +183898,7 @@ func sqlite3Fts5IndexQuery(tls *libc.TLS, p uintptr, pToken uintptr, nToken int3
// Return true if the iterator passed as the only argument is at EOF.
// Move to the next matching rowid.
-func sqlite3Fts5IterNext(tls *libc.TLS, pIndexIter uintptr) int32 { /* sqlite3.c:225364:12: */
+func sqlite3Fts5IterNext(tls *libc.TLS, pIndexIter uintptr) int32 { /* sqlite3.c:226611:12: */
var pIter uintptr = pIndexIter
fts5MultiIterNext(tls, (*Fts5Iter)(unsafe.Pointer(pIter)).FpIndex, pIter, 0, int64(0))
@@ -175886,7 +183906,7 @@ func sqlite3Fts5IterNext(tls *libc.TLS, pIndexIter uintptr) int32 { /* sqlite3.c
}
// Move to the next matching term/rowid. Used by the fts5vocab module.
-func sqlite3Fts5IterNextScan(tls *libc.TLS, pIndexIter uintptr) int32 { /* sqlite3.c:225374:12: */
+func sqlite3Fts5IterNextScan(tls *libc.TLS, pIndexIter uintptr) int32 { /* sqlite3.c:226621:12: */
var pIter uintptr = pIndexIter
var p uintptr = (*Fts5Iter)(unsafe.Pointer(pIter)).FpIndex
@@ -175906,14 +183926,14 @@ func sqlite3Fts5IterNextScan(tls *libc.TLS, pIndexIter uintptr) int32 { /* sqlit
// Move to the next matching rowid that occurs at or after iMatch. The
// definition of "at or after" depends on whether this iterator iterates
// in ascending or descending rowid order.
-func sqlite3Fts5IterNextFrom(tls *libc.TLS, pIndexIter uintptr, iMatch I64) int32 { /* sqlite3.c:225398:12: */
+func sqlite3Fts5IterNextFrom(tls *libc.TLS, pIndexIter uintptr, iMatch I64) int32 { /* sqlite3.c:226645:12: */
var pIter uintptr = pIndexIter
fts5MultiIterNextFrom(tls, (*Fts5Iter)(unsafe.Pointer(pIter)).FpIndex, pIter, iMatch)
return fts5IndexReturn(tls, (*Fts5Iter)(unsafe.Pointer(pIter)).FpIndex)
}
// Return the current term.
-func sqlite3Fts5IterTerm(tls *libc.TLS, pIndexIter uintptr, pn uintptr) uintptr { /* sqlite3.c:225407:19: */
+func sqlite3Fts5IterTerm(tls *libc.TLS, pIndexIter uintptr, pn uintptr) uintptr { /* sqlite3.c:226654:19: */
bp := tls.Alloc(4)
defer tls.Free(4)
@@ -175931,7 +183951,7 @@ func sqlite3Fts5IterTerm(tls *libc.TLS, pIndexIter uintptr, pn uintptr) uintptr
}
// Close an iterator opened by an earlier call to sqlite3Fts5IndexQuery().
-func sqlite3Fts5IterClose(tls *libc.TLS, pIndexIter uintptr) { /* sqlite3.c:225418:13: */
+func sqlite3Fts5IterClose(tls *libc.TLS, pIndexIter uintptr) { /* sqlite3.c:226665:13: */
if pIndexIter != 0 {
var pIter uintptr = pIndexIter
var pIndex uintptr = (*Fts5Iter)(unsafe.Pointer(pIter)).FpIndex
@@ -175944,7 +183964,7 @@ func sqlite3Fts5IterClose(tls *libc.TLS, pIndexIter uintptr) { /* sqlite3.c:2254
//
// Parameter anSize must point to an array of size nCol, where nCol is
// the number of user defined columns in the FTS table.
-func sqlite3Fts5IndexGetAverages(tls *libc.TLS, p uintptr, pnRow uintptr, anSize uintptr) int32 { /* sqlite3.c:225433:12: */
+func sqlite3Fts5IndexGetAverages(tls *libc.TLS, p uintptr, pnRow uintptr, anSize uintptr) int32 { /* sqlite3.c:226680:12: */
var nCol int32 = (*Fts5Config)(unsafe.Pointer((*Fts5Index)(unsafe.Pointer(p)).FpConfig)).FnCol
var pData uintptr
@@ -175966,7 +183986,7 @@ func sqlite3Fts5IndexGetAverages(tls *libc.TLS, p uintptr, pnRow uintptr, anSize
// Replace the current "averages" record with the contents of the buffer
// supplied as the second argument.
-func sqlite3Fts5IndexSetAverages(tls *libc.TLS, p uintptr, pData uintptr, nData int32) int32 { /* sqlite3.c:225457:12: */
+func sqlite3Fts5IndexSetAverages(tls *libc.TLS, p uintptr, pData uintptr, nData int32) int32 { /* sqlite3.c:226704:12: */
fts5DataWrite(tls, p, int64(FTS5_AVERAGES_ROWID), pData, nData)
return fts5IndexReturn(tls, p)
@@ -175974,7 +183994,7 @@ func sqlite3Fts5IndexSetAverages(tls *libc.TLS, p uintptr, pData uintptr, nData
// Return the total number of blocks this module has read from the %_data
// table since it was created.
-func sqlite3Fts5IndexReads(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:225467:12: */
+func sqlite3Fts5IndexReads(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:226714:12: */
return (*Fts5Index)(unsafe.Pointer(p)).FnRead
}
@@ -175983,7 +184003,7 @@ func sqlite3Fts5IndexReads(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:225467
//
// Return SQLITE_OK if successful, or an SQLite error code if an error
// occurs.
-func sqlite3Fts5IndexSetCookie(tls *libc.TLS, p uintptr, iNew int32) int32 { /* sqlite3.c:225478:12: */
+func sqlite3Fts5IndexSetCookie(tls *libc.TLS, p uintptr, iNew int32) int32 { /* sqlite3.c:226725:12: */
bp := tls.Alloc(16)
defer tls.Free(16)
@@ -175996,7 +184016,7 @@ func sqlite3Fts5IndexSetCookie(tls *libc.TLS, p uintptr, iNew int32) int32 { /*
sqlite3Fts5Put32(tls, bp /* &aCookie[0] */, iNew)
rc = Xsqlite3_blob_open(tls, (*Fts5Config)(unsafe.Pointer(pConfig)).Fdb, (*Fts5Config)(unsafe.Pointer(pConfig)).FzDb, (*Fts5Index)(unsafe.Pointer(p)).FzDataTbl,
- ts+31529 /* "block" */, int64(FTS5_STRUCTURE_ROWID), 1, bp+8 /* &pBlob */)
+ ts+33025 /* "block" */, int64(FTS5_STRUCTURE_ROWID), 1, bp+8 /* &pBlob */)
if rc == SQLITE_OK {
Xsqlite3_blob_write(tls, *(*uintptr)(unsafe.Pointer(bp + 8 /* pBlob */)), bp /* &aCookie[0] */, 4, 0)
rc = Xsqlite3_blob_close(tls, *(*uintptr)(unsafe.Pointer(bp + 8 /* pBlob */)))
@@ -176005,7 +184025,7 @@ func sqlite3Fts5IndexSetCookie(tls *libc.TLS, p uintptr, iNew int32) int32 { /*
return rc
}
-func sqlite3Fts5IndexLoadConfig(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:225498:12: */
+func sqlite3Fts5IndexLoadConfig(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:226745:12: */
var pStruct uintptr
pStruct = fts5StructureRead(tls, p)
fts5StructureRelease(tls, pStruct)
@@ -176019,7 +184039,7 @@ func sqlite3Fts5IndexLoadConfig(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:2
// functionality.
// Return a simple checksum value based on the arguments.
-func sqlite3Fts5IndexEntryCksum(tls *libc.TLS, iRowid I64, iCol int32, iPos int32, iIdx int32, pTerm uintptr, nTerm int32) U64 { /* sqlite3.c:225515:12: */
+func sqlite3Fts5IndexEntryCksum(tls *libc.TLS, iRowid I64, iCol int32, iPos int32, iIdx int32, pTerm uintptr, nTerm int32) U64 { /* sqlite3.c:226762:12: */
var i int32
var ret U64 = U64(iRowid)
ret = ret + ((ret << 3) + U64(iCol))
@@ -176028,7 +184048,7 @@ func sqlite3Fts5IndexEntryCksum(tls *libc.TLS, iRowid I64, iCol int32, iPos int3
ret = ret + ((ret << 3) + (U64('0' + iIdx)))
}
for i = 0; i < nTerm; i++ {
- ret = ret + ((ret << 3) + U64(*(*int8)(unsafe.Pointer(pTerm + uintptr(i)))))
+ ret = ret + ((ret << 3) + U64(*(*uint8)(unsafe.Pointer(pTerm + uintptr(i)))))
}
return ret
}
@@ -176039,7 +184059,7 @@ func sqlite3Fts5IndexEntryCksum(tls *libc.TLS, iRowid I64, iCol int32, iPos int3
// contain zero terms.
// 2) All leaves of pSeg between iNoRowid and iLast (inclusive) exist and
// contain zero rowids.
-func fts5IndexIntegrityCheckEmpty(tls *libc.TLS, p uintptr, pSeg uintptr, iFirst int32, iNoRowid int32, iLast int32) { /* sqlite3.c:225733:13: */
+func fts5IndexIntegrityCheckEmpty(tls *libc.TLS, p uintptr, pSeg uintptr, iFirst int32, iNoRowid int32, iLast int32) { /* sqlite3.c:226980:13: */
var i int32
// Now check that the iter.nEmpty leaves following the current leaf
@@ -176058,7 +184078,7 @@ func fts5IndexIntegrityCheckEmpty(tls *libc.TLS, p uintptr, pSeg uintptr, iFirst
}
}
-func fts5IntegrityCheckPgidx(tls *libc.TLS, p uintptr, pLeaf uintptr) { /* sqlite3.c:225754:13: */
+func fts5IntegrityCheckPgidx(tls *libc.TLS, p uintptr, pLeaf uintptr) { /* sqlite3.c:227001:13: */
bp := tls.Alloc(48)
defer tls.Free(48)
@@ -176117,7 +184137,7 @@ func fts5IntegrityCheckPgidx(tls *libc.TLS, p uintptr, pLeaf uintptr) { /* sqlit
sqlite3Fts5BufferFree(tls, bp+32 /* &buf2 */)
}
-func fts5IndexIntegrityCheckSegment(tls *libc.TLS, p uintptr, pSeg uintptr) { /* sqlite3.c:225804:13: */
+func fts5IndexIntegrityCheckSegment(tls *libc.TLS, p uintptr, pSeg uintptr) { /* sqlite3.c:227051:13: */
bp := tls.Alloc(48)
defer tls.Free(48)
@@ -176133,7 +184153,7 @@ func fts5IndexIntegrityCheckSegment(tls *libc.TLS, p uintptr, pSeg uintptr) { /*
fts5IndexPrepareStmt(tls, p, bp+24 /* &pStmt */, Xsqlite3_mprintf(tls,
- ts+31926, /* "SELECT segid, te..." */
+ ts+33422, /* "SELECT segid, te..." */
libc.VaList(bp, (*Fts5Config)(unsafe.Pointer(pConfig)).FzDb, (*Fts5Config)(unsafe.Pointer(pConfig)).FzName, (*Fts5StructureSegment)(unsafe.Pointer(pSeg)).FiSegid)))
// Iterate through the b-tree hierarchy.
@@ -176286,7 +184306,7 @@ func fts5IndexIntegrityCheckSegment(tls *libc.TLS, p uintptr, pSeg uintptr) { /*
// checksum does not match. Return SQLITE_OK if all checks pass without
// error, or some other SQLite error code if another error (e.g. OOM)
// occurs.
-func sqlite3Fts5IndexIntegrityCheck(tls *libc.TLS, p uintptr, cksum U64, bUseCksum int32) int32 { /* sqlite3.c:225949:12: */
+func sqlite3Fts5IndexIntegrityCheck(tls *libc.TLS, p uintptr, cksum U64, bUseCksum int32) int32 { /* sqlite3.c:227196:12: */
bp := tls.Alloc(48)
defer tls.Free(48)
@@ -176343,7 +184363,7 @@ func sqlite3Fts5IndexIntegrityCheck(tls *libc.TLS, p uintptr, cksum U64, bUseCks
} else {
(*Fts5Buffer)(unsafe.Pointer(bp + 16 /* &poslist */)).Fn = 0
fts5SegiterPoslist(tls, p, ((*(*uintptr)(unsafe.Pointer(bp /* pIter */)) + 96 /* &.aSeg */) + uintptr((*Fts5CResult)(unsafe.Pointer((*Fts5Iter)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp /* pIter */)))).FaFirst+1*4)).FiFirst)*120), uintptr(0), bp+16 /* &poslist */)
- sqlite3Fts5BufferAppendBlob(tls, (p + 52 /* &.rc */), bp+16 /* &poslist */, uint32(4), ts+32012 /* "\x00\x00\x00\x00" */)
+ sqlite3Fts5BufferAppendBlob(tls, (p + 52 /* &.rc */), bp+16 /* &poslist */, uint32(4), ts+33508 /* "\x00\x00\x00\x00" */)
for 0 == sqlite3Fts5PoslistNext64(tls, (*Fts5Buffer)(unsafe.Pointer(bp+16 /* &poslist */)).Fp, (*Fts5Buffer)(unsafe.Pointer(bp+16 /* &poslist */)).Fn, bp+32 /* &iOff */, bp+40 /* &iPos */) {
var iCol int32 = (int32(*(*I64)(unsafe.Pointer(bp + 40 /* iPos */)) >> 32))
var iTokOff int32 = (int32(*(*I64)(unsafe.Pointer(bp + 40 /* iPos */)) & int64(0x7FFFFFFF)))
@@ -176368,624 +184388,19 @@ func sqlite3Fts5IndexIntegrityCheck(tls *libc.TLS, p uintptr, cksum U64, bUseCks
// Below this point is the implementation of the fts5_decode() scalar
// function only.
-// Decode a segment-data rowid from the %_data table. This function is
-// the opposite of macro FTS5_SEGMENT_ROWID().
-func fts5DecodeRowid(tls *libc.TLS, iRowid I64, piSegid uintptr, pbDlidx uintptr, piHeight uintptr, piPgno uintptr) { /* sqlite3.c:226041:13: */
- *(*int32)(unsafe.Pointer(piPgno)) = (int32(iRowid & ((I64(int64(1)) << FTS5_DATA_PAGE_B) - int64(1))))
- iRowid >>= FTS5_DATA_PAGE_B
-
- *(*int32)(unsafe.Pointer(piHeight)) = (int32(iRowid & ((I64(int64(1)) << FTS5_DATA_HEIGHT_B) - int64(1))))
- iRowid >>= FTS5_DATA_HEIGHT_B
-
- *(*int32)(unsafe.Pointer(pbDlidx)) = (int32(iRowid & int64(0x0001)))
- iRowid >>= FTS5_DATA_DLI_B
-
- *(*int32)(unsafe.Pointer(piSegid)) = (int32(iRowid & ((I64(int64(1)) << FTS5_DATA_ID_B) - int64(1))))
-}
-
-func fts5DebugRowid(tls *libc.TLS, pRc uintptr, pBuf uintptr, iKey I64) { /* sqlite3.c:226060:13: */
- bp := tls.Alloc(48)
- defer tls.Free(48)
-
- // var iSegid int32 at bp+32, 4
-
- // var iHeight int32 at bp+40, 4
-
- // var iPgno int32 at bp+44, 4
-
- // var bDlidx int32 at bp+36, 4
- // Rowid compenents
- fts5DecodeRowid(tls, iKey, bp+32 /* &iSegid */, bp+36 /* &bDlidx */, bp+40 /* &iHeight */, bp+44 /* &iPgno */)
-
- if *(*int32)(unsafe.Pointer(bp + 32 /* iSegid */)) == 0 {
- if iKey == int64(FTS5_AVERAGES_ROWID) {
- sqlite3Fts5BufferAppendPrintf(tls, pRc, pBuf, ts+32017 /* "{averages} " */, 0)
- } else {
- sqlite3Fts5BufferAppendPrintf(tls, pRc, pBuf, ts+32029 /* "{structure}" */, 0)
- }
- } else {
- sqlite3Fts5BufferAppendPrintf(tls, pRc, pBuf, ts+32041, /* "{%ssegid=%d h=%d..." */
- libc.VaList(bp, func() uintptr {
- if *(*int32)(unsafe.Pointer(bp + 36 /* bDlidx */)) != 0 {
- return ts + 32067 /* "dlidx " */
- }
- return ts + 703 /* "" */
- }(), *(*int32)(unsafe.Pointer(bp + 32 /* iSegid */)), *(*int32)(unsafe.Pointer(bp + 40 /* iHeight */)), *(*int32)(unsafe.Pointer(bp + 44 /* iPgno */))))
- }
-}
-
-func fts5DebugStructure(tls *libc.TLS, pRc uintptr, pBuf uintptr, p uintptr) { /* sqlite3.c:226078:13: */
- bp := tls.Alloc(48)
- defer tls.Free(48)
-
- var iLvl int32
- var iSeg int32 // Iterate through levels, segments
-
- for iLvl = 0; iLvl < (*Fts5Structure)(unsafe.Pointer(p)).FnLevel; iLvl++ {
- var pLvl uintptr = ((p + 24 /* &.aLevel */) + uintptr(iLvl)*16)
- sqlite3Fts5BufferAppendPrintf(tls, pRc, pBuf,
- ts+32074 /* " {lvl=%d nMerge=..." */, libc.VaList(bp, iLvl, (*Fts5StructureLevel)(unsafe.Pointer(pLvl)).FnMerge, (*Fts5StructureLevel)(unsafe.Pointer(pLvl)).FnSeg))
- for iSeg = 0; iSeg < (*Fts5StructureLevel)(unsafe.Pointer(pLvl)).FnSeg; iSeg++ {
- var pSeg uintptr = ((*Fts5StructureLevel)(unsafe.Pointer(pLvl)).FaSeg + uintptr(iSeg)*12)
- sqlite3Fts5BufferAppendPrintf(tls, pRc, pBuf, ts+32101, /* " {id=%d leaves=%..." */
- libc.VaList(bp+24, (*Fts5StructureSegment)(unsafe.Pointer(pSeg)).FiSegid, (*Fts5StructureSegment)(unsafe.Pointer(pSeg)).FpgnoFirst, (*Fts5StructureSegment)(unsafe.Pointer(pSeg)).FpgnoLast))
- }
- sqlite3Fts5BufferAppendPrintf(tls, pRc, pBuf, ts+24464 /* "}" */, 0)
- }
-}
-
-// This is part of the fts5_decode() debugging aid.
-//
-// Arguments pBlob/nBlob contain a serialized Fts5Structure object. This
-// function appends a human-readable representation of the same object
-// to the buffer passed as the second argument.
-func fts5DecodeStructure(tls *libc.TLS, pRc uintptr, pBuf uintptr, pBlob uintptr, nBlob int32) { /* sqlite3.c:226107:13: */
- bp := tls.Alloc(8)
- defer tls.Free(8)
-
- var rc int32 // Return code
- *(*uintptr)(unsafe.Pointer(bp /* p */)) = uintptr(0) // Decoded structure object
-
- rc = fts5StructureDecode(tls, pBlob, nBlob, uintptr(0), bp /* &p */)
- if rc != SQLITE_OK {
- *(*int32)(unsafe.Pointer(pRc)) = rc
- return
- }
-
- fts5DebugStructure(tls, pRc, pBuf, *(*uintptr)(unsafe.Pointer(bp /* p */)))
- fts5StructureRelease(tls, *(*uintptr)(unsafe.Pointer(bp /* p */)))
-}
-
-// This is part of the fts5_decode() debugging aid.
-//
-// Arguments pBlob/nBlob contain an "averages" record. This function
-// appends a human-readable representation of record to the buffer passed
-// as the second argument.
-func fts5DecodeAverages(tls *libc.TLS, pRc uintptr, pBuf uintptr, pBlob uintptr, nBlob int32) { /* sqlite3.c:226132:13: */
- bp := tls.Alloc(24)
- defer tls.Free(24)
-
- var i int32 = 0
- var zSpace uintptr = ts + 703 /* "" */
-
- for i < nBlob {
- // var iVal U64 at bp+16, 8
-
- i = i + (int32(sqlite3Fts5GetVarint(tls, (pBlob + uintptr(i)), bp+16 /* &iVal */)))
- sqlite3Fts5BufferAppendPrintf(tls, pRc, pBuf, ts+32124 /* "%s%d" */, libc.VaList(bp, zSpace, int32(*(*U64)(unsafe.Pointer(bp + 16 /* iVal */)))))
- zSpace = ts + 9222 /* " " */
- }
-}
-
-// Buffer (a/n) is assumed to contain a list of serialized varints. Read
-// each varint and append its string representation to buffer pBuf. Return
-// after either the input buffer is exhausted or a 0 value is read.
-//
-// The return value is the number of bytes read from the input buffer.
-func fts5DecodePoslist(tls *libc.TLS, pRc uintptr, pBuf uintptr, a uintptr, n int32) int32 { /* sqlite3.c:226155:12: */
- bp := tls.Alloc(12)
- defer tls.Free(12)
-
- var iOff int32 = 0
- for iOff < n {
- // var iVal int32 at bp+8, 4
-
- iOff = iOff + (sqlite3Fts5GetVarint32(tls, (a + uintptr(iOff)), bp+8 /* &iVal */))
- sqlite3Fts5BufferAppendPrintf(tls, pRc, pBuf, ts+31249 /* " %d" */, libc.VaList(bp, *(*int32)(unsafe.Pointer(bp + 8 /* iVal */))))
- }
- return iOff
-}
-
-// The start of buffer (a/n) contains the start of a doclist. The doclist
-// may or may not finish within the buffer. This function appends a text
-// representation of the part of the doclist that is present to buffer
-// pBuf.
-//
-// The return value is the number of bytes read from the input buffer.
-func fts5DecodeDoclist(tls *libc.TLS, pRc uintptr, pBuf uintptr, a uintptr, n int32) int32 { /* sqlite3.c:226173:12: */
- bp := tls.Alloc(56)
- defer tls.Free(56)
-
- *(*I64)(unsafe.Pointer(bp + 32 /* iDocid */)) = int64(0)
- var iOff int32 = 0
-
- if n > 0 {
- iOff = int32(sqlite3Fts5GetVarint(tls, a, bp+32 /* &iDocid */))
- sqlite3Fts5BufferAppendPrintf(tls, pRc, pBuf, ts+32129 /* " id=%lld" */, libc.VaList(bp, *(*I64)(unsafe.Pointer(bp + 32 /* iDocid */))))
- }
- for iOff < n {
- // var nPos int32 at bp+40, 4
-
- // var bDel int32 at bp+44, 4
-
- iOff = iOff + (fts5GetPoslistSize(tls, (a + uintptr(iOff)), bp+40 /* &nPos */, bp+44 /* &bDel */))
- sqlite3Fts5BufferAppendPrintf(tls, pRc, pBuf, ts+32138 /* " nPos=%d%s" */, libc.VaList(bp+8, *(*int32)(unsafe.Pointer(bp + 40 /* nPos */)), func() uintptr {
- if *(*int32)(unsafe.Pointer(bp + 44 /* bDel */)) != 0 {
- return ts + 17391 /* "*" */
- }
- return ts + 703 /* "" */
- }()))
- iOff = iOff + (fts5DecodePoslist(tls, pRc, pBuf, (a + uintptr(iOff)), func() int32 {
- if (n - iOff) < (*(*int32)(unsafe.Pointer(bp + 40 /* nPos */))) {
- return (n - iOff)
- }
- return *(*int32)(unsafe.Pointer(bp + 40 /* nPos */))
- }()))
- if iOff < n {
- // var iDelta I64 at bp+48, 8
-
- iOff = iOff + (int32(sqlite3Fts5GetVarint(tls, (a + uintptr(iOff)), bp+48 /* &iDelta */)))
- *(*I64)(unsafe.Pointer(bp + 32 /* iDocid */)) += *(*I64)(unsafe.Pointer(bp + 48 /* iDelta */))
- sqlite3Fts5BufferAppendPrintf(tls, pRc, pBuf, ts+32129 /* " id=%lld" */, libc.VaList(bp+24, *(*I64)(unsafe.Pointer(bp + 32 /* iDocid */))))
- }
- }
-
- return iOff
-}
-
-// This function is part of the fts5_decode() debugging function. It is
-// only ever used with detail=none tables.
-//
-// Buffer (pData/nData) contains a doclist in the format used by detail=none
-// tables. This function appends a human-readable version of that list to
-// buffer pBuf.
-//
-// If *pRc is other than SQLITE_OK when this function is called, it is a
-// no-op. If an OOM or other error occurs within this function, *pRc is
-// set to an SQLite error code before returning. The final state of buffer
-// pBuf is undefined in this case.
-func fts5DecodeRowidList(tls *libc.TLS, pRc uintptr, pBuf uintptr, pData uintptr, nData int32) { /* sqlite3.c:226211:13: */
- bp := tls.Alloc(24)
- defer tls.Free(24)
-
- var i int32 = 0
- var iRowid I64 = int64(0)
-
- for i < nData {
- var zApp uintptr = ts + 703 /* "" */
- // var iVal U64 at bp+16, 8
-
- i = i + (int32(sqlite3Fts5GetVarint(tls, (pData + uintptr(i)), bp+16 /* &iVal */)))
- iRowid = I64(U64(iRowid) + (*(*U64)(unsafe.Pointer(bp + 16 /* iVal */))))
-
- if (i < nData) && (int32(*(*U8)(unsafe.Pointer(pData + uintptr(i)))) == 0x00) {
- i++
- if (i < nData) && (int32(*(*U8)(unsafe.Pointer(pData + uintptr(i)))) == 0x00) {
- i++
- zApp = ts + 32149 /* "+" */
- } else {
- zApp = ts + 17391 /* "*" */
- }
- }
-
- sqlite3Fts5BufferAppendPrintf(tls, pRc, pBuf, ts+32151 /* " %lld%s" */, libc.VaList(bp, iRowid, zApp))
- }
-}
-
-// The implementation of user-defined scalar function fts5_decode().
-func fts5DecodeFunction(tls *libc.TLS, pCtx uintptr, nArg int32, apVal uintptr) { /* sqlite3.c:226242:13: */
- bp := tls.Alloc(192)
- defer tls.Free(192)
-
- var iRowid I64 // Rowid for record being decoded
- // var iSegid int32 at bp+68, 4
-
- // var iHeight int32 at bp+76, 4
-
- // var iPgno int32 at bp+80, 4
-
- // var bDlidx int32 at bp+72, 4
- // Rowid components
- var aBlob uintptr
- var n int32 // Record to decode
- var a uintptr
- // var s Fts5Buffer at bp+48, 16
- // Build up text to return here
- // var rc int32 at bp+64, 4
- // Return code
- var nSpace Sqlite3_int64
- var eDetailNone int32
- // var dlidx Fts5Data at bp+120, 16
-
- // var lvl Fts5DlidxLvl at bp+88, 32
-
- // var nIncr int32 at bp+160, 4
-
- // var nAppend int32 at bp+156, 4
-
- // var term Fts5Buffer at bp+136, 16
- // Current term read from page
- var szLeaf int32
- var iPgidxOff int32
- // var iTermOff int32 at bp+152, 4
-
- // var nKeep int32 at bp+164, 4
-
- var iOff int32
- var bFirst int32 // True for first term on page
- // var nByte int32 at bp+188, 4
- // Bytes of data
- var iEnd int32
- // var term1 Fts5Buffer at bp+168, 16
- // Current term read from page
- var szLeaf1 int32 // Offset of pgidx in a[]
- var iPgidxOff1 int32
- var iPgidxPrev int32 // Previous value read from pgidx
- // var iTermOff1 int32 at bp+184, 4
-
- var iRowidOff int32
- var iOff1 int32
- var nDoclist int32
- a = uintptr(0)
- *(*int32)(unsafe.Pointer(bp + 64 /* rc */)) = SQLITE_OK
- nSpace = int64(0)
- eDetailNone = (libc.Bool32(Xsqlite3_user_data(tls, pCtx) != uintptr(0)))
-
- _ = nArg
- libc.Xmemset(tls, bp+48 /* &s */, 0, uint64(unsafe.Sizeof(Fts5Buffer{})))
- iRowid = Xsqlite3_value_int64(tls, *(*uintptr)(unsafe.Pointer(apVal)))
-
- // Make a copy of the second argument (a blob) in aBlob[]. The aBlob[]
- // copy is followed by FTS5_DATA_ZERO_PADDING 0x00 bytes, which prevents
- // buffer overreads even if the record is corrupt.
- n = Xsqlite3_value_bytes(tls, *(*uintptr)(unsafe.Pointer(apVal + 1*8)))
- aBlob = Xsqlite3_value_blob(tls, *(*uintptr)(unsafe.Pointer(apVal + 1*8)))
- nSpace = (Sqlite3_int64(n + FTS5_DATA_ZERO_PADDING))
- a = sqlite3Fts5MallocZero(tls, bp+64 /* &rc */, nSpace)
- if !(a == uintptr(0)) {
- goto __1
- }
- goto decode_out
-__1:
- ;
- if !(n > 0) {
- goto __2
- }
- libc.Xmemcpy(tls, a, aBlob, uint64(n))
-__2:
- ;
-
- fts5DecodeRowid(tls, iRowid, bp+68 /* &iSegid */, bp+72 /* &bDlidx */, bp+76 /* &iHeight */, bp+80 /* &iPgno */)
-
- fts5DebugRowid(tls, bp+64 /* &rc */, bp+48 /* &s */, iRowid)
- if !(*(*int32)(unsafe.Pointer(bp + 72 /* bDlidx */)) != 0) {
- goto __3
- }
-
- (*Fts5Data)(unsafe.Pointer(bp + 120 /* &dlidx */)).Fp = a
- (*Fts5Data)(unsafe.Pointer(bp + 120 /* &dlidx */)).Fnn = n
-
- libc.Xmemset(tls, bp+88 /* &lvl */, 0, uint64(unsafe.Sizeof(Fts5DlidxLvl{})))
- (*Fts5DlidxLvl)(unsafe.Pointer(bp + 88 /* &lvl */)).FpData = bp + 120 /* &dlidx */
- (*Fts5DlidxLvl)(unsafe.Pointer(bp + 88 /* &lvl */)).FiLeafPgno = *(*int32)(unsafe.Pointer(bp + 80 /* iPgno */))
-
- fts5DlidxLvlNext(tls, bp+88 /* &lvl */)
-__5:
- if !((*Fts5DlidxLvl)(unsafe.Pointer(bp+88 /* &lvl */)).FbEof == 0) {
- goto __7
- }
- sqlite3Fts5BufferAppendPrintf(tls, bp+64 /* &rc */, bp+48, /* &s */
- ts+32159 /* " %d(%lld)" */, libc.VaList(bp, (*Fts5DlidxLvl)(unsafe.Pointer(bp+88 /* &lvl */)).FiLeafPgno, (*Fts5DlidxLvl)(unsafe.Pointer(bp+88 /* &lvl */)).FiRowid))
- goto __6
-__6:
- fts5DlidxLvlNext(tls, bp+88 /* &lvl */)
- goto __5
- goto __7
-__7:
- ;
- goto __4
-__3:
- if !(*(*int32)(unsafe.Pointer(bp + 68 /* iSegid */)) == 0) {
- goto __8
- }
- if !(iRowid == int64(FTS5_AVERAGES_ROWID)) {
- goto __10
- }
- fts5DecodeAverages(tls, bp+64 /* &rc */, bp+48 /* &s */, a, n)
- goto __11
-__10:
- fts5DecodeStructure(tls, bp+64 /* &rc */, bp+48 /* &s */, a, n)
-__11:
- ;
- goto __9
-__8:
- if !(eDetailNone != 0) {
- goto __12
- }
- iPgidxOff = libc.AssignInt32(&szLeaf, int32(fts5GetU16(tls, (a+2))))
- *(*int32)(unsafe.Pointer(bp + 164 /* nKeep */)) = 0
-
- libc.Xmemset(tls, bp+136 /* &term */, 0, uint64(unsafe.Sizeof(Fts5Buffer{})))
-
- // Decode any entries that occur before the first term.
- if !(szLeaf < n) {
- goto __14
- }
- iPgidxOff = iPgidxOff + (sqlite3Fts5GetVarint32(tls, (a + uintptr(iPgidxOff)), bp+152 /* &iTermOff */))
- goto __15
-__14:
- *(*int32)(unsafe.Pointer(bp + 152 /* iTermOff */)) = szLeaf
-__15:
- ;
- fts5DecodeRowidList(tls, bp+64 /* &rc */, bp+48 /* &s */, (a + 4), (*(*int32)(unsafe.Pointer(bp + 152 /* iTermOff */)) - 4))
-
- iOff = *(*int32)(unsafe.Pointer(bp + 152 /* iTermOff */))
-__16:
- if !(iOff < szLeaf) {
- goto __17
- }
-
- // Read the term data for the next term
- iOff = iOff + (sqlite3Fts5GetVarint32(tls, (a + uintptr(iOff)), bp+156 /* &nAppend */))
- (*Fts5Buffer)(unsafe.Pointer(bp + 136 /* &term */)).Fn = *(*int32)(unsafe.Pointer(bp + 164 /* nKeep */))
- sqlite3Fts5BufferAppendBlob(tls, bp+64 /* &rc */, bp+136 /* &term */, uint32(*(*int32)(unsafe.Pointer(bp + 156 /* nAppend */))), (a + uintptr(iOff)))
- sqlite3Fts5BufferAppendPrintf(tls,
- bp+64 /* &rc */, bp+48 /* &s */, ts+32169 /* " term=%.*s" */, libc.VaList(bp+16, (*Fts5Buffer)(unsafe.Pointer(bp+136 /* &term */)).Fn, (*Fts5Buffer)(unsafe.Pointer(bp+136 /* &term */)).Fp))
- iOff = iOff + (*(*int32)(unsafe.Pointer(bp + 156 /* nAppend */)))
-
- // Figure out where the doclist for this term ends
- if !(iPgidxOff < n) {
- goto __18
- }
- iPgidxOff = iPgidxOff + (sqlite3Fts5GetVarint32(tls, (a + uintptr(iPgidxOff)), bp+160 /* &nIncr */))
- *(*int32)(unsafe.Pointer(bp + 152 /* iTermOff */)) += *(*int32)(unsafe.Pointer(bp + 160 /* nIncr */))
- goto __19
-__18:
- *(*int32)(unsafe.Pointer(bp + 152 /* iTermOff */)) = szLeaf
-__19:
- ;
-
- fts5DecodeRowidList(tls, bp+64 /* &rc */, bp+48 /* &s */, (a + uintptr(iOff)), (*(*int32)(unsafe.Pointer(bp + 152 /* iTermOff */)) - iOff))
- iOff = *(*int32)(unsafe.Pointer(bp + 152 /* iTermOff */))
- if !(iOff < szLeaf) {
- goto __20
- }
- iOff = iOff + (sqlite3Fts5GetVarint32(tls, (a + uintptr(iOff)), bp+164 /* &nKeep */))
-__20:
- ;
- goto __16
-__17:
- ;
-
- sqlite3Fts5BufferFree(tls, bp+136 /* &term */)
- goto __13
-__12:
- iPgidxPrev = 0 // Previous value read from pgidx
- *(*int32)(unsafe.Pointer(bp + 184 /* iTermOff1 */)) = 0
- iRowidOff = 0
-
- libc.Xmemset(tls, bp+168 /* &term1 */, 0, uint64(unsafe.Sizeof(Fts5Buffer{})))
-
- if !(n < 4) {
- goto __21
- }
- sqlite3Fts5BufferSet(tls, bp+64 /* &rc */, bp+48 /* &s */, 7, ts+32180 /* "corrupt" */)
- goto decode_out
- goto __22
-__21:
- iRowidOff = int32(fts5GetU16(tls, (a)))
- iPgidxOff1 = libc.AssignInt32(&szLeaf1, int32(fts5GetU16(tls, (a+2))))
- if !(iPgidxOff1 < n) {
- goto __23
- }
- sqlite3Fts5GetVarint32(tls, (a + uintptr(iPgidxOff1)), bp+184 /* &iTermOff1 */)
- goto __24
-__23:
- if !(iPgidxOff1 > n) {
- goto __25
- }
- *(*int32)(unsafe.Pointer(bp + 64 /* rc */)) = (SQLITE_CORRUPT | (int32(1) << 8))
- goto decode_out
-__25:
- ;
-__24:
- ;
-__22:
- ;
-
- // Decode the position list tail at the start of the page
- if !(iRowidOff != 0) {
- goto __26
- }
- iOff1 = iRowidOff
- goto __27
-__26:
- if !(*(*int32)(unsafe.Pointer(bp + 184 /* iTermOff1 */)) != 0) {
- goto __28
- }
- iOff1 = *(*int32)(unsafe.Pointer(bp + 184 /* iTermOff1 */))
- goto __29
-__28:
- iOff1 = szLeaf1
-__29:
- ;
-__27:
- ;
- if !(iOff1 > n) {
- goto __30
- }
- *(*int32)(unsafe.Pointer(bp + 64 /* rc */)) = (SQLITE_CORRUPT | (int32(1) << 8))
- goto decode_out
-__30:
- ;
- fts5DecodePoslist(tls, bp+64 /* &rc */, bp+48 /* &s */, (a + 4), (iOff1 - 4))
-
- // Decode any more doclist data that appears on the page before the
- // first term.
- nDoclist = ((func() int32 {
- if *(*int32)(unsafe.Pointer(bp + 184 /* iTermOff1 */)) != 0 {
- return *(*int32)(unsafe.Pointer(bp + 184 /* iTermOff1 */))
- }
- return szLeaf1
- }()) - iOff1)
- if !((nDoclist + iOff1) > n) {
- goto __31
- }
- *(*int32)(unsafe.Pointer(bp + 64 /* rc */)) = (SQLITE_CORRUPT | (int32(1) << 8))
- goto decode_out
-__31:
- ;
- fts5DecodeDoclist(tls, bp+64 /* &rc */, bp+48 /* &s */, (a + uintptr(iOff1)), nDoclist)
-
-__32:
- if !((iPgidxOff1 < n) && (*(*int32)(unsafe.Pointer(bp + 64 /* rc */)) == SQLITE_OK)) {
- goto __33
- }
- bFirst = (libc.Bool32(iPgidxOff1 == szLeaf1))
-
- iPgidxOff1 = iPgidxOff1 + (sqlite3Fts5GetVarint32(tls, (a + uintptr(iPgidxOff1)), bp+188 /* &nByte */))
- iPgidxPrev = iPgidxPrev + (*(*int32)(unsafe.Pointer(bp + 188 /* nByte */)))
- iOff1 = iPgidxPrev
-
- if !(iPgidxOff1 < n) {
- goto __34
- }
- sqlite3Fts5GetVarint32(tls, (a + uintptr(iPgidxOff1)), bp+188 /* &nByte */)
- iEnd = (iPgidxPrev + *(*int32)(unsafe.Pointer(bp + 188 /* nByte */)))
- goto __35
-__34:
- iEnd = szLeaf1
-__35:
- ;
- if !(iEnd > szLeaf1) {
- goto __36
- }
- *(*int32)(unsafe.Pointer(bp + 64 /* rc */)) = (SQLITE_CORRUPT | (int32(1) << 8))
- goto __33
-__36:
- ;
-
- if !(bFirst == 0) {
- goto __37
- }
- iOff1 = iOff1 + (sqlite3Fts5GetVarint32(tls, (a + uintptr(iOff1)), bp+188 /* &nByte */))
- if !(*(*int32)(unsafe.Pointer(bp + 188 /* nByte */)) > (*Fts5Buffer)(unsafe.Pointer(bp+168 /* &term1 */)).Fn) {
- goto __38
- }
- *(*int32)(unsafe.Pointer(bp + 64 /* rc */)) = (SQLITE_CORRUPT | (int32(1) << 8))
- goto __33
-__38:
- ;
- (*Fts5Buffer)(unsafe.Pointer(bp + 168 /* &term1 */)).Fn = *(*int32)(unsafe.Pointer(bp + 188 /* nByte */))
-__37:
- ;
- iOff1 = iOff1 + (sqlite3Fts5GetVarint32(tls, (a + uintptr(iOff1)), bp+188 /* &nByte */))
- if !((iOff1 + *(*int32)(unsafe.Pointer(bp + 188 /* nByte */))) > n) {
- goto __39
- }
- *(*int32)(unsafe.Pointer(bp + 64 /* rc */)) = (SQLITE_CORRUPT | (int32(1) << 8))
- goto __33
-__39:
- ;
- sqlite3Fts5BufferAppendBlob(tls, bp+64 /* &rc */, bp+168 /* &term1 */, uint32(*(*int32)(unsafe.Pointer(bp + 188 /* nByte */))), (a + uintptr(iOff1)))
- iOff1 = iOff1 + (*(*int32)(unsafe.Pointer(bp + 188 /* nByte */)))
-
- sqlite3Fts5BufferAppendPrintf(tls,
- bp+64 /* &rc */, bp+48 /* &s */, ts+32169 /* " term=%.*s" */, libc.VaList(bp+32, (*Fts5Buffer)(unsafe.Pointer(bp+168 /* &term1 */)).Fn, (*Fts5Buffer)(unsafe.Pointer(bp+168 /* &term1 */)).Fp))
- iOff1 = iOff1 + (fts5DecodeDoclist(tls, bp+64 /* &rc */, bp+48 /* &s */, (a + uintptr(iOff1)), (iEnd - iOff1)))
- goto __32
-__33:
- ;
-
- sqlite3Fts5BufferFree(tls, bp+168 /* &term1 */)
-__13:
- ;
-__9:
- ;
-__4:
- ;
-
-decode_out:
- Xsqlite3_free(tls, a)
- if !(*(*int32)(unsafe.Pointer(bp + 64 /* rc */)) == SQLITE_OK) {
- goto __40
- }
- Xsqlite3_result_text(tls, pCtx, (*Fts5Buffer)(unsafe.Pointer(bp+48 /* &s */)).Fp, (*Fts5Buffer)(unsafe.Pointer(bp+48 /* &s */)).Fn, libc.UintptrFromInt32(-1))
- goto __41
-__40:
- Xsqlite3_result_error_code(tls, pCtx, *(*int32)(unsafe.Pointer(bp + 64 /* rc */)))
-__41:
- ;
- sqlite3Fts5BufferFree(tls, bp+48 /* &s */)
-}
-
-// The implementation of user-defined scalar function fts5_rowid().
-func fts5RowidFunction(tls *libc.TLS, pCtx uintptr, nArg int32, apVal uintptr) { /* sqlite3.c:226451:13: */
- var zArg uintptr
- if nArg == 0 {
- Xsqlite3_result_error(tls, pCtx, ts+32188 /* "should be: fts5_..." */, -1)
- } else {
- zArg = Xsqlite3_value_text(tls, *(*uintptr)(unsafe.Pointer(apVal)))
- if 0 == Xsqlite3_stricmp(tls, zArg, ts+32225 /* "segment" */) {
- var iRowid I64
- var segid int32
- var pgno int32
- if nArg != 3 {
- Xsqlite3_result_error(tls, pCtx,
- ts+32233 /* "should be: fts5_..." */, -1)
- } else {
- segid = Xsqlite3_value_int(tls, *(*uintptr)(unsafe.Pointer(apVal + 1*8)))
- pgno = Xsqlite3_value_int(tls, *(*uintptr)(unsafe.Pointer(apVal + 2*8)))
- iRowid = (((((I64(segid)) << ((FTS5_DATA_PAGE_B + FTS5_DATA_HEIGHT_B) + FTS5_DATA_DLI_B)) + (I64((int64(0))) << (FTS5_DATA_PAGE_B + FTS5_DATA_HEIGHT_B))) + (I64((int64(0))) << (FTS5_DATA_PAGE_B))) + (I64(pgno)))
- Xsqlite3_result_int64(tls, pCtx, iRowid)
- }
- } else {
- Xsqlite3_result_error(tls, pCtx,
- ts+32280 /* "first arg to fts..." */, -1)
- }
- }
-}
-
// This is called as part of registering the FTS5 module with database
// connection db. It registers several user-defined scalar functions useful
// with FTS5.
//
// If successful, SQLITE_OK is returned. If an error occurs, some other
// SQLite error code is returned instead.
-func sqlite3Fts5IndexInit(tls *libc.TLS, db uintptr) int32 { /* sqlite3.c:226490:12: */
- var rc int32 = Xsqlite3_create_function(tls,
- db, ts+32324 /* "fts5_decode" */, 2, SQLITE_UTF8, uintptr(0), *(*uintptr)(unsafe.Pointer(&struct {
- f func(*libc.TLS, uintptr, int32, uintptr)
- }{fts5DecodeFunction})), uintptr(0), uintptr(0))
-
- if rc == SQLITE_OK {
- rc = Xsqlite3_create_function(tls,
- db, ts+32336 /* "fts5_decode_none" */, 2,
- SQLITE_UTF8, db, *(*uintptr)(unsafe.Pointer(&struct {
- f func(*libc.TLS, uintptr, int32, uintptr)
- }{fts5DecodeFunction})), uintptr(0), uintptr(0))
- }
-
- if rc == SQLITE_OK {
- rc = Xsqlite3_create_function(tls,
- db, ts+32353 /* "fts5_rowid" */, -1, SQLITE_UTF8, uintptr(0), *(*uintptr)(unsafe.Pointer(&struct {
- f func(*libc.TLS, uintptr, int32, uintptr)
- }{fts5RowidFunction})), uintptr(0), uintptr(0))
- }
- return rc
+func sqlite3Fts5IndexInit(tls *libc.TLS, db uintptr) int32 { /* sqlite3.c:227757:12: */
+ return SQLITE_OK
+ _ = db
+ return int32(0)
}
-func sqlite3Fts5IndexReset(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:226511:12: */
+func sqlite3Fts5IndexReset(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:227783:12: */
if fts5IndexDataVersion(tls, p) != (*Fts5Index)(unsafe.Pointer(p)).FiStructVersion {
fts5StructureInvalidate(tls, p)
@@ -177012,16 +184427,35 @@ func sqlite3Fts5IndexReset(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:226511
// structures should not be corrupt. Otherwise, true. If it is false, extra
// assert() conditions in the fts5 code are activated - conditions that are
// only true if it is guaranteed that the fts5 database is not corrupt.
-var Xsqlite3_fts5_may_be_corrupt int32 = 1 /* sqlite3.c:226543:16 */
type Fts5Auxdata1 = struct {
FpAux uintptr
FpPtr uintptr
FxDelete uintptr
FpNext uintptr
-} /* sqlite3.c:211884:9 */
+} /* sqlite3.c:213118:9 */
+
+// 2014 Jun 09
+//
+// The author disclaims copyright to this source code. In place of
+// a legal notice, here is a blessing:
+//
+// May you do good and not evil.
+// May you find forgiveness for yourself and forgive others.
+// May you share freely, never taking more than you give.
+//
+//
+//
+// This is an SQLite module implementing full-text search.
+
+// #include "fts5Int.h"
+
+// This variable is set to false when running tests for which the on disk
+// structures should not be corrupt. Otherwise, true. If it is false, extra
+// assert() conditions in the fts5 code are activated - conditions that are
+// only true if it is guaranteed that the fts5 database is not corrupt.
-type Fts5Auxdata = Fts5Auxdata1 /* sqlite3.c:226546:28 */
+type Fts5Auxdata = Fts5Auxdata1 /* sqlite3.c:227820:28 */
type Fts5Auxiliary1 = struct {
FpGlobal uintptr
FzFunc uintptr
@@ -177029,9 +184463,9 @@ type Fts5Auxiliary1 = struct {
FxFunc Fts5_extension_function
FxDestroy uintptr
FpNext uintptr
-} /* sqlite3.c:211884:9 */
+} /* sqlite3.c:213118:9 */
-type Fts5Auxiliary = Fts5Auxiliary1 /* sqlite3.c:226547:30 */
+type Fts5Auxiliary = Fts5Auxiliary1 /* sqlite3.c:227821:30 */
type Fts5Cursor1 = struct {
Fbase Sqlite3_vtab_cursor
FpNext uintptr
@@ -177045,13 +184479,13 @@ type Fts5Cursor1 = struct {
FpExpr uintptr
FpSorter uintptr
Fcsrflags int32
- _ [4]byte
+ F__ccgo_pad1 [4]byte
FiSpecial I64
FzRank uintptr
FzRankArgs uintptr
FpRank uintptr
FnRankArg int32
- _ [4]byte
+ F__ccgo_pad2 [4]byte
FapRankArg uintptr
FpRankArgStmt uintptr
FpAux uintptr
@@ -177060,35 +184494,35 @@ type Fts5Cursor1 = struct {
FnInstAlloc int32
FnInstCount int32
FaInst uintptr
-} /* sqlite3.c:211884:9 */
+} /* sqlite3.c:213118:9 */
-type Fts5Cursor = Fts5Cursor1 /* sqlite3.c:226548:27 */
+type Fts5Cursor = Fts5Cursor1 /* sqlite3.c:227822:27 */
type Fts5FullTable1 = struct {
Fp Fts5Table
FpStorage uintptr
FpGlobal uintptr
FpSortCsr uintptr
-} /* sqlite3.c:226549:9 */
+} /* sqlite3.c:227823:9 */
-type Fts5FullTable = Fts5FullTable1 /* sqlite3.c:226549:30 */
+type Fts5FullTable = Fts5FullTable1 /* sqlite3.c:227823:30 */
type Fts5Sorter1 = struct {
FpStmt uintptr
FiRowid I64
FaPoslist uintptr
FnIdx int32
FaIdx [1]int32
-} /* sqlite3.c:211884:9 */
+} /* sqlite3.c:213118:9 */
-type Fts5Sorter = Fts5Sorter1 /* sqlite3.c:226550:27 */
+type Fts5Sorter = Fts5Sorter1 /* sqlite3.c:227824:27 */
type Fts5TokenizerModule1 = struct {
FzName uintptr
FpUserData uintptr
Fx Fts5_tokenizer
FxDestroy uintptr
FpNext uintptr
-} /* sqlite3.c:211884:9 */
+} /* sqlite3.c:213118:9 */
-type Fts5TokenizerModule = Fts5TokenizerModule1 /* sqlite3.c:226551:36 */
+type Fts5TokenizerModule = Fts5TokenizerModule1 /* sqlite3.c:227825:36 */
// NOTES ON TRANSACTIONS:
//
@@ -177122,21 +184556,21 @@ type Fts5TokenizerModule = Fts5TokenizerModule1 /* sqlite3.c:226551:36 */
type Fts5TransactionState = struct {
FeState int32
FiSavepoint int32
-} /* sqlite3.c:226584:1 */
+} /* sqlite3.c:227858:1 */
type Fts5MatchPhrase = struct {
- FpPoslist uintptr
- FnTerm int32
- _ [4]byte
-} /* sqlite3.c:226641:1 */
+ FpPoslist uintptr
+ FnTerm int32
+ F__ccgo_pad1 [4]byte
+} /* sqlite3.c:227915:1 */
// Return true if pTab is a contentless table.
-func fts5IsContentless(tls *libc.TLS, pTab uintptr) int32 { /* sqlite3.c:226825:12: */
+func fts5IsContentless(tls *libc.TLS, pTab uintptr) int32 { /* sqlite3.c:228099:12: */
return (libc.Bool32((*Fts5Config)(unsafe.Pointer((*Fts5FullTable)(unsafe.Pointer(pTab)).Fp.FpConfig)).FeContent == FTS5_CONTENT_NONE))
}
// Delete a virtual table handle allocated by fts5InitVtab().
-func fts5FreeVtab(tls *libc.TLS, pTab uintptr) { /* sqlite3.c:226832:13: */
+func fts5FreeVtab(tls *libc.TLS, pTab uintptr) { /* sqlite3.c:228106:13: */
if pTab != 0 {
sqlite3Fts5IndexClose(tls, (*Fts5FullTable)(unsafe.Pointer(pTab)).Fp.FpIndex)
sqlite3Fts5StorageClose(tls, (*Fts5FullTable)(unsafe.Pointer(pTab)).FpStorage)
@@ -177146,13 +184580,13 @@ func fts5FreeVtab(tls *libc.TLS, pTab uintptr) { /* sqlite3.c:226832:13: */
}
// The xDisconnect() virtual table method.
-func fts5DisconnectMethod(tls *libc.TLS, pVtab uintptr) int32 { /* sqlite3.c:226844:12: */
+func fts5DisconnectMethod(tls *libc.TLS, pVtab uintptr) int32 { /* sqlite3.c:228118:12: */
fts5FreeVtab(tls, pVtab)
return SQLITE_OK
}
// The xDestroy() virtual table method.
-func fts5DestroyMethod(tls *libc.TLS, pVtab uintptr) int32 { /* sqlite3.c:226852:12: */
+func fts5DestroyMethod(tls *libc.TLS, pVtab uintptr) int32 { /* sqlite3.c:228126:12: */
var pTab uintptr = pVtab
var rc int32 = sqlite3Fts5DropAll(tls, (*Fts5Table)(unsafe.Pointer(pTab)).FpConfig)
if rc == SQLITE_OK {
@@ -177170,7 +184604,7 @@ func fts5DestroyMethod(tls *libc.TLS, pVtab uintptr) int32 { /* sqlite3.c:226852
// argv[1] -> database name
// argv[2] -> table name
// argv[...] -> "column name" and other module argument fields.
-func fts5InitVtab(tls *libc.TLS, bCreate int32, db uintptr, pAux uintptr, argc int32, argv uintptr, ppVTab uintptr, pzErr uintptr) int32 { /* sqlite3.c:226872:12: */
+func fts5InitVtab(tls *libc.TLS, bCreate int32, db uintptr, pAux uintptr, argc int32, argv uintptr, ppVTab uintptr, pzErr uintptr) int32 { /* sqlite3.c:228146:12: */
bp := tls.Alloc(16)
defer tls.Free(16)
@@ -177228,11 +184662,11 @@ func fts5InitVtab(tls *libc.TLS, bCreate int32, db uintptr, pAux uintptr, argc i
// The xConnect() and xCreate() methods for the virtual table. All the
// work is done in function fts5InitVtab().
-func fts5ConnectMethod(tls *libc.TLS, db uintptr, pAux uintptr, argc int32, argv uintptr, ppVtab uintptr, pzErr uintptr) int32 { /* sqlite3.c:226938:12: */
+func fts5ConnectMethod(tls *libc.TLS, db uintptr, pAux uintptr, argc int32, argv uintptr, ppVtab uintptr, pzErr uintptr) int32 { /* sqlite3.c:228212:12: */
return fts5InitVtab(tls, 0, db, pAux, argc, argv, ppVtab, pzErr)
}
-func fts5CreateMethod(tls *libc.TLS, db uintptr, pAux uintptr, argc int32, argv uintptr, ppVtab uintptr, pzErr uintptr) int32 { /* sqlite3.c:226948:12: */
+func fts5CreateMethod(tls *libc.TLS, db uintptr, pAux uintptr, argc int32, argv uintptr, ppVtab uintptr, pzErr uintptr) int32 { /* sqlite3.c:228222:12: */
return fts5InitVtab(tls, 1, db, pAux, argc, argv, ppVtab, pzErr)
}
@@ -177241,14 +184675,14 @@ func fts5CreateMethod(tls *libc.TLS, db uintptr, pAux uintptr, argc int32, argv
// Set the SQLITE_INDEX_SCAN_UNIQUE flag in pIdxInfo->flags. Unless this
// extension is currently being used by a version of SQLite too old to
// support index-info flags. In that case this function is a no-op.
-func fts5SetUniqueFlag(tls *libc.TLS, pIdxInfo uintptr) { /* sqlite3.c:226974:13: */
+func fts5SetUniqueFlag(tls *libc.TLS, pIdxInfo uintptr) { /* sqlite3.c:228248:13: */
{
*(*int32)(unsafe.Pointer(pIdxInfo + 80 /* &.idxFlags */)) |= (SQLITE_INDEX_SCAN_UNIQUE)
}
}
-func fts5UsePatternMatch(tls *libc.TLS, pConfig uintptr, p uintptr) int32 { /* sqlite3.c:226985:12: */
+func fts5UsePatternMatch(tls *libc.TLS, pConfig uintptr, p uintptr) int32 { /* sqlite3.c:228259:12: */
if ((*Fts5Config)(unsafe.Pointer(pConfig)).FePattern == FTS5_PATTERN_GLOB) && (int32((*sqlite3_index_constraint)(unsafe.Pointer(p)).Fop) == FTS5_PATTERN_GLOB) {
return 1
@@ -177319,7 +184753,7 @@ func fts5UsePatternMatch(tls *libc.TLS, pConfig uintptr, p uintptr) int32 { /* s
// * An == rowid constraint: cost=10.0
//
// Costs are not modified by the ORDER BY clause.
-func fts5BestIndexMethod(tls *libc.TLS, pVTab uintptr, pInfo uintptr) int32 { /* sqlite3.c:227063:12: */
+func fts5BestIndexMethod(tls *libc.TLS, pVTab uintptr, pInfo uintptr) int32 { /* sqlite3.c:228337:12: */
bp := tls.Alloc(16)
defer tls.Free(16)
@@ -177340,7 +184774,7 @@ func fts5BestIndexMethod(tls *libc.TLS, pVTab uintptr, pInfo uintptr) int32 { /*
if (*Fts5Config)(unsafe.Pointer(pConfig)).FbLock != 0 {
(*Fts5Table)(unsafe.Pointer(pTab)).Fbase.FzErrMsg = Xsqlite3_mprintf(tls,
- ts+32364 /* "recursively defi..." */, 0)
+ ts+33513 /* "recursively defi..." */, 0)
return SQLITE_ERROR
}
@@ -177362,19 +184796,19 @@ func fts5BestIndexMethod(tls *libc.TLS, pVTab uintptr, pInfo uintptr) int32 { /*
// unusable plan. Set a prohibitively high cost.
(*Sqlite3_index_info)(unsafe.Pointer(pInfo)).FestimatedCost = 1e50
- *(*int8)(unsafe.Pointer(idxStr + uintptr(iIdxStr))) = int8(0)
+ *(*uint8)(unsafe.Pointer(idxStr + uintptr(iIdxStr))) = uint8(0)
return SQLITE_OK
} else {
if iCol == (nCol + 1) {
if bSeenRank != 0 {
continue
}
- *(*int8)(unsafe.Pointer(idxStr + uintptr(libc.PostIncInt32(&iIdxStr, 1)))) = int8('r')
+ *(*uint8)(unsafe.Pointer(idxStr + uintptr(libc.PostIncInt32(&iIdxStr, 1)))) = uint8('r')
bSeenRank = 1
} else if iCol >= 0 {
bSeenMatch = 1
- *(*int8)(unsafe.Pointer(idxStr + uintptr(libc.PostIncInt32(&iIdxStr, 1)))) = int8('M')
- Xsqlite3_snprintf(tls, 6, (idxStr + uintptr(iIdxStr)), ts+3958 /* "%d" */, libc.VaList(bp, iCol))
+ *(*uint8)(unsafe.Pointer(idxStr + uintptr(libc.PostIncInt32(&iIdxStr, 1)))) = uint8('M')
+ Xsqlite3_snprintf(tls, 6, (idxStr + uintptr(iIdxStr)), ts+4089 /* "%d" */, libc.VaList(bp, iCol))
idxStr += uintptr(libc.Xstrlen(tls, (idxStr + uintptr(iIdxStr))))
}
@@ -177384,18 +184818,18 @@ func fts5BestIndexMethod(tls *libc.TLS, pVTab uintptr, pInfo uintptr) int32 { /*
} else if (*sqlite3_index_constraint)(unsafe.Pointer(p)).Fusable != 0 {
if ((iCol >= 0) && (iCol < nCol)) && (fts5UsePatternMatch(tls, pConfig, p) != 0) {
- *(*int8)(unsafe.Pointer(idxStr + uintptr(libc.PostIncInt32(&iIdxStr, 1)))) = func() int8 {
+ *(*uint8)(unsafe.Pointer(idxStr + uintptr(libc.PostIncInt32(&iIdxStr, 1)))) = func() uint8 {
if int32((*sqlite3_index_constraint)(unsafe.Pointer(p)).Fop) == FTS5_PATTERN_LIKE {
- return int8('L')
+ return uint8('L')
}
- return int8('G')
+ return uint8('G')
}()
- Xsqlite3_snprintf(tls, 6, (idxStr + uintptr(iIdxStr)), ts+3958 /* "%d" */, libc.VaList(bp+8, iCol))
+ Xsqlite3_snprintf(tls, 6, (idxStr + uintptr(iIdxStr)), ts+4089 /* "%d" */, libc.VaList(bp+8, iCol))
idxStr += uintptr(libc.Xstrlen(tls, (idxStr + uintptr(iIdxStr))))
(*sqlite3_index_constraint_usage)(unsafe.Pointer((*Sqlite3_index_info)(unsafe.Pointer(pInfo)).FaConstraintUsage + uintptr(i)*8)).FargvIndex = libc.PreIncInt32(&iCons, 1)
} else if ((bSeenEq == 0) && (int32((*sqlite3_index_constraint)(unsafe.Pointer(p)).Fop) == SQLITE_INDEX_CONSTRAINT_EQ)) && (iCol < 0) {
- *(*int8)(unsafe.Pointer(idxStr + uintptr(libc.PostIncInt32(&iIdxStr, 1)))) = int8('=')
+ *(*uint8)(unsafe.Pointer(idxStr + uintptr(libc.PostIncInt32(&iIdxStr, 1)))) = uint8('=')
bSeenEq = 1
(*sqlite3_index_constraint_usage)(unsafe.Pointer((*Sqlite3_index_info)(unsafe.Pointer(pInfo)).FaConstraintUsage + uintptr(i)*8)).FargvIndex = libc.PreIncInt32(&iCons, 1)
}
@@ -177411,21 +184845,21 @@ func fts5BestIndexMethod(tls *libc.TLS, pVTab uintptr, pInfo uintptr) int32 { /*
if bSeenLt != 0 {
continue
}
- *(*int8)(unsafe.Pointer(idxStr + uintptr(libc.PostIncInt32(&iIdxStr, 1)))) = int8('<')
+ *(*uint8)(unsafe.Pointer(idxStr + uintptr(libc.PostIncInt32(&iIdxStr, 1)))) = uint8('<')
(*sqlite3_index_constraint_usage)(unsafe.Pointer((*Sqlite3_index_info)(unsafe.Pointer(pInfo)).FaConstraintUsage + uintptr(i)*8)).FargvIndex = libc.PreIncInt32(&iCons, 1)
bSeenLt = 1
} else if (op == SQLITE_INDEX_CONSTRAINT_GT) || (op == SQLITE_INDEX_CONSTRAINT_GE) {
if bSeenGt != 0 {
continue
}
- *(*int8)(unsafe.Pointer(idxStr + uintptr(libc.PostIncInt32(&iIdxStr, 1)))) = int8('>')
+ *(*uint8)(unsafe.Pointer(idxStr + uintptr(libc.PostIncInt32(&iIdxStr, 1)))) = uint8('>')
(*sqlite3_index_constraint_usage)(unsafe.Pointer((*Sqlite3_index_info)(unsafe.Pointer(pInfo)).FaConstraintUsage + uintptr(i)*8)).FargvIndex = libc.PreIncInt32(&iCons, 1)
bSeenGt = 1
}
}
}
}
- *(*int8)(unsafe.Pointer(idxStr + uintptr(iIdxStr))) = int8(0)
+ *(*uint8)(unsafe.Pointer(idxStr + uintptr(iIdxStr))) = uint8(0)
// Set idxFlags flags for the ORDER BY clause
if (*Sqlite3_index_info)(unsafe.Pointer(pInfo)).FnOrderBy == 1 {
@@ -177481,7 +184915,7 @@ func fts5BestIndexMethod(tls *libc.TLS, pVTab uintptr, pInfo uintptr) int32 { /*
return SQLITE_OK
}
-func fts5NewTransaction(tls *libc.TLS, pTab uintptr) int32 { /* sqlite3.c:227198:12: */
+func fts5NewTransaction(tls *libc.TLS, pTab uintptr) int32 { /* sqlite3.c:228472:12: */
var pCsr uintptr
for pCsr = (*Fts5Global)(unsafe.Pointer((*Fts5FullTable)(unsafe.Pointer(pTab)).FpGlobal)).FpCsr; pCsr != 0; pCsr = (*Fts5Cursor)(unsafe.Pointer(pCsr)).FpNext {
if (*Fts5Cursor)(unsafe.Pointer(pCsr)).Fbase.FpVtab == pTab {
@@ -177492,7 +184926,7 @@ func fts5NewTransaction(tls *libc.TLS, pTab uintptr) int32 { /* sqlite3.c:227198
}
// Implementation of xOpen method.
-func fts5OpenMethod(tls *libc.TLS, pVTab uintptr, ppCsr uintptr) int32 { /* sqlite3.c:227209:12: */
+func fts5OpenMethod(tls *libc.TLS, pVTab uintptr, ppCsr uintptr) int32 { /* sqlite3.c:228483:12: */
var pTab uintptr = pVTab
var pConfig uintptr = (*Fts5FullTable)(unsafe.Pointer(pTab)).Fp.FpConfig
var pCsr uintptr = uintptr(0) // New cursor object
@@ -177518,7 +184952,7 @@ func fts5OpenMethod(tls *libc.TLS, pVTab uintptr, ppCsr uintptr) int32 { /* sqli
return rc
}
-func fts5StmtType(tls *libc.TLS, pCsr uintptr) int32 { /* sqlite3.c:227235:12: */
+func fts5StmtType(tls *libc.TLS, pCsr uintptr) int32 { /* sqlite3.c:228509:12: */
if (*Fts5Cursor)(unsafe.Pointer(pCsr)).FePlan == FTS5_PLAN_SCAN {
if (*Fts5Cursor)(unsafe.Pointer(pCsr)).FbDesc != 0 {
return FTS5_STMT_SCAN_DESC
@@ -177531,11 +184965,11 @@ func fts5StmtType(tls *libc.TLS, pCsr uintptr) int32 { /* sqlite3.c:227235:12: *
// This function is called after the cursor passed as the only argument
// is moved to point at a different row. It clears all cached data
// specific to the previous row stored by the cursor object.
-func fts5CsrNewrow(tls *libc.TLS, pCsr uintptr) { /* sqlite3.c:227247:13: */
+func fts5CsrNewrow(tls *libc.TLS, pCsr uintptr) { /* sqlite3.c:228521:13: */
*(*int32)(unsafe.Pointer(pCsr + 80 /* &.csrflags */)) |= (((FTS5CSR_REQUIRE_CONTENT | FTS5CSR_REQUIRE_DOCSIZE) | FTS5CSR_REQUIRE_INST) | FTS5CSR_REQUIRE_POSLIST)
}
-func fts5FreeCursorComponents(tls *libc.TLS, pCsr uintptr) { /* sqlite3.c:227256:13: */
+func fts5FreeCursorComponents(tls *libc.TLS, pCsr uintptr) { /* sqlite3.c:228530:13: */
var pTab uintptr = (*Fts5Cursor)(unsafe.Pointer(pCsr)).Fbase.FpVtab
var pData uintptr
var pNext uintptr
@@ -177559,7 +184993,7 @@ func fts5FreeCursorComponents(tls *libc.TLS, pCsr uintptr) { /* sqlite3.c:227256
for pData = (*Fts5Cursor)(unsafe.Pointer(pCsr)).FpAuxdata; pData != 0; pData = pNext {
pNext = (*Fts5Auxdata)(unsafe.Pointer(pData)).FpNext
if (*Fts5Auxdata)(unsafe.Pointer(pData)).FxDelete != 0 {
- (*(*func(*libc.TLS, uintptr))(unsafe.Pointer((pData + 16 /* &.xDelete */))))(tls, (*Fts5Auxdata)(unsafe.Pointer(pData)).FpPtr)
+ (*struct{ f func(*libc.TLS, uintptr) })(unsafe.Pointer(&struct{ uintptr }{(*Fts5Auxdata)(unsafe.Pointer(pData)).FxDelete})).f(tls, (*Fts5Auxdata)(unsafe.Pointer(pData)).FpPtr)
}
Xsqlite3_free(tls, pData)
}
@@ -177578,7 +185012,7 @@ func fts5FreeCursorComponents(tls *libc.TLS, pCsr uintptr) { /* sqlite3.c:227256
// Close the cursor. For additional information see the documentation
// on the xClose method of the virtual table interface.
-func fts5CloseMethod(tls *libc.TLS, pCursor uintptr) int32 { /* sqlite3.c:227300:12: */
+func fts5CloseMethod(tls *libc.TLS, pCursor uintptr) int32 { /* sqlite3.c:228574:12: */
if pCursor != 0 {
var pTab uintptr = (*Sqlite3_vtab_cursor)(unsafe.Pointer(pCursor)).FpVtab
var pCsr uintptr = pCursor
@@ -177595,7 +185029,7 @@ func fts5CloseMethod(tls *libc.TLS, pCursor uintptr) int32 { /* sqlite3.c:227300
return SQLITE_OK
}
-func fts5SorterNext(tls *libc.TLS, pCsr uintptr) int32 { /* sqlite3.c:227316:12: */
+func fts5SorterNext(tls *libc.TLS, pCsr uintptr) int32 { /* sqlite3.c:228590:12: */
bp := tls.Alloc(4)
defer tls.Free(4)
@@ -177639,7 +185073,7 @@ func fts5SorterNext(tls *libc.TLS, pCsr uintptr) int32 { /* sqlite3.c:227316:12:
// Set the FTS5CSR_REQUIRE_RESEEK flag on all FTS5_PLAN_MATCH cursors
// open on table pTab.
-func fts5TripCursors(tls *libc.TLS, pTab uintptr) { /* sqlite3.c:227359:13: */
+func fts5TripCursors(tls *libc.TLS, pTab uintptr) { /* sqlite3.c:228633:13: */
var pCsr uintptr
for pCsr = (*Fts5Global)(unsafe.Pointer((*Fts5FullTable)(unsafe.Pointer(pTab)).FpGlobal)).FpCsr; pCsr != 0; pCsr = (*Fts5Cursor)(unsafe.Pointer(pCsr)).FpNext {
if ((*Fts5Cursor)(unsafe.Pointer(pCsr)).FePlan == FTS5_PLAN_MATCH) &&
@@ -177659,7 +185093,7 @@ func fts5TripCursors(tls *libc.TLS, pTab uintptr) { /* sqlite3.c:227359:13: */
//
// Return SQLITE_OK if successful or if no reseek was required, or an
// error code if an error occurred.
-func fts5CursorReseek(tls *libc.TLS, pCsr uintptr, pbSkip uintptr) int32 { /* sqlite3.c:227382:12: */
+func fts5CursorReseek(tls *libc.TLS, pCsr uintptr, pbSkip uintptr) int32 { /* sqlite3.c:228656:12: */
var rc int32 = SQLITE_OK
if ((*Fts5Cursor)(unsafe.Pointer((pCsr))).Fcsrflags & (FTS5CSR_REQUIRE_RESEEK)) != 0 {
@@ -177688,7 +185122,7 @@ func fts5CursorReseek(tls *libc.TLS, pCsr uintptr, pbSkip uintptr) int32 { /* sq
// Return SQLITE_OK if nothing goes wrong. SQLITE_OK is returned
// even if we reach end-of-file. The fts5EofMethod() will be called
// subsequently to determine whether or not an EOF was hit.
-func fts5NextMethod(tls *libc.TLS, pCursor uintptr) int32 { /* sqlite3.c:227414:12: */
+func fts5NextMethod(tls *libc.TLS, pCursor uintptr) int32 { /* sqlite3.c:228688:12: */
bp := tls.Alloc(12)
defer tls.Free(12)
@@ -177733,7 +185167,7 @@ func fts5NextMethod(tls *libc.TLS, pCursor uintptr) int32 { /* sqlite3.c:227414:
rc = Xsqlite3_reset(tls, (*Fts5Cursor)(unsafe.Pointer(pCsr)).FpStmt)
if rc != SQLITE_OK {
(*Sqlite3_vtab)(unsafe.Pointer((*Sqlite3_vtab_cursor)(unsafe.Pointer(pCursor)).FpVtab)).FzErrMsg = Xsqlite3_mprintf(tls,
- ts+2718 /* "%s" */, libc.VaList(bp, Xsqlite3_errmsg(tls, (*Fts5Config)(unsafe.Pointer(pConfig)).Fdb)))
+ ts+2790 /* "%s" */, libc.VaList(bp, Xsqlite3_errmsg(tls, (*Fts5Config)(unsafe.Pointer(pConfig)).Fdb)))
}
} else {
rc = SQLITE_OK
@@ -177747,7 +185181,7 @@ func fts5NextMethod(tls *libc.TLS, pCursor uintptr) int32 { /* sqlite3.c:227414:
return rc
}
-func fts5PrepareStatement(tls *libc.TLS, ppStmt uintptr, pConfig uintptr, zFmt uintptr, va uintptr) int32 { /* sqlite3.c:227467:12: */
+func fts5PrepareStatement(tls *libc.TLS, ppStmt uintptr, pConfig uintptr, zFmt uintptr, va uintptr) int32 { /* sqlite3.c:228741:12: */
bp := tls.Alloc(16)
defer tls.Free(16)
@@ -177765,7 +185199,7 @@ func fts5PrepareStatement(tls *libc.TLS, ppStmt uintptr, pConfig uintptr, zFmt u
rc = Xsqlite3_prepare_v3(tls, (*Fts5Config)(unsafe.Pointer(pConfig)).Fdb, zSql, -1,
uint32(SQLITE_PREPARE_PERSISTENT), bp+8 /* &pRet */, uintptr(0))
if rc != SQLITE_OK {
- *(*uintptr)(unsafe.Pointer((*Fts5Config)(unsafe.Pointer(pConfig)).FpzErrmsg)) = Xsqlite3_mprintf(tls, ts+2718 /* "%s" */, libc.VaList(bp, Xsqlite3_errmsg(tls, (*Fts5Config)(unsafe.Pointer(pConfig)).Fdb)))
+ *(*uintptr)(unsafe.Pointer((*Fts5Config)(unsafe.Pointer(pConfig)).FpzErrmsg)) = Xsqlite3_mprintf(tls, ts+2790 /* "%s" */, libc.VaList(bp, Xsqlite3_errmsg(tls, (*Fts5Config)(unsafe.Pointer(pConfig)).Fdb)))
}
Xsqlite3_free(tls, zSql)
}
@@ -177775,7 +185209,7 @@ func fts5PrepareStatement(tls *libc.TLS, ppStmt uintptr, pConfig uintptr, zFmt u
return rc
}
-func fts5CursorFirstSorted(tls *libc.TLS, pTab uintptr, pCsr uintptr, bDesc int32) int32 { /* sqlite3.c:227496:12: */
+func fts5CursorFirstSorted(tls *libc.TLS, pTab uintptr, pCsr uintptr, bDesc int32) int32 { /* sqlite3.c:228770:12: */
bp := tls.Alloc(56)
defer tls.Free(56)
@@ -177804,25 +185238,25 @@ func fts5CursorFirstSorted(tls *libc.TLS, pTab uintptr, pCsr uintptr, bDesc int3
//
// If SQLite a built-in statement cache, this wouldn't be a problem.
rc = fts5PrepareStatement(tls, (pSorter /* &.pStmt */), pConfig,
- ts+32403, /* "SELECT rowid, ra..." */
+ ts+33552, /* "SELECT rowid, ra..." */
libc.VaList(bp, (*Fts5Config)(unsafe.Pointer(pConfig)).FzDb, (*Fts5Config)(unsafe.Pointer(pConfig)).FzName, zRank, (*Fts5Config)(unsafe.Pointer(pConfig)).FzName,
func() uintptr {
if zRankArgs != 0 {
- return ts + 12871 /* ", " */
+ return ts + 13324 /* ", " */
}
- return ts + 703 /* "" */
+ return ts + 755 /* "" */
}(),
func() uintptr {
if zRankArgs != 0 {
return zRankArgs
}
- return ts + 703 /* "" */
+ return ts + 755 /* "" */
}(),
func() uintptr {
if bDesc != 0 {
- return ts + 32458 /* "DESC" */
+ return ts + 33607 /* "DESC" */
}
- return ts + 32463 /* "ASC" */
+ return ts + 33612 /* "ASC" */
}()))
(*Fts5Cursor)(unsafe.Pointer(pCsr)).FpSorter = pSorter
@@ -177842,7 +185276,7 @@ func fts5CursorFirstSorted(tls *libc.TLS, pTab uintptr, pCsr uintptr, bDesc int3
return rc
}
-func fts5CursorFirst(tls *libc.TLS, pTab uintptr, pCsr uintptr, bDesc int32) int32 { /* sqlite3.c:227548:12: */
+func fts5CursorFirst(tls *libc.TLS, pTab uintptr, pCsr uintptr, bDesc int32) int32 { /* sqlite3.c:228822:12: */
var rc int32
var pExpr uintptr = (*Fts5Cursor)(unsafe.Pointer(pCsr)).FpExpr
rc = sqlite3Fts5ExprFirst(tls, pExpr, (*Fts5FullTable)(unsafe.Pointer(pTab)).Fp.FpIndex, (*Fts5Cursor)(unsafe.Pointer(pCsr)).FiFirstRowid, bDesc)
@@ -177857,7 +185291,7 @@ func fts5CursorFirst(tls *libc.TLS, pTab uintptr, pCsr uintptr, bDesc int32) int
// MATCH expression that begins with a '*' character. The remainder of
// the text passed to the MATCH operator are used as the special query
// parameters.
-func fts5SpecialMatch(tls *libc.TLS, pTab uintptr, pCsr uintptr, zQuery uintptr) int32 { /* sqlite3.c:227565:12: */
+func fts5SpecialMatch(tls *libc.TLS, pTab uintptr, pCsr uintptr, zQuery uintptr) int32 { /* sqlite3.c:228839:12: */
bp := tls.Alloc(16)
defer tls.Free(16)
@@ -177865,21 +185299,21 @@ func fts5SpecialMatch(tls *libc.TLS, pTab uintptr, pCsr uintptr, zQuery uintptr)
var z uintptr = zQuery // Special query text
var n int32 // Number of bytes in text at z
- for int32(*(*int8)(unsafe.Pointer(z))) == ' ' {
+ for int32(*(*uint8)(unsafe.Pointer(z))) == ' ' {
z++
}
- for n = 0; (*(*int8)(unsafe.Pointer(z + uintptr(n))) != 0) && (int32(*(*int8)(unsafe.Pointer(z + uintptr(n)))) != ' '); n++ {
+ for n = 0; (*(*uint8)(unsafe.Pointer(z + uintptr(n))) != 0) && (int32(*(*uint8)(unsafe.Pointer(z + uintptr(n)))) != ' '); n++ {
}
(*Fts5Cursor)(unsafe.Pointer(pCsr)).FePlan = FTS5_PLAN_SPECIAL
- if (n == 5) && (0 == Xsqlite3_strnicmp(tls, ts+32467 /* "reads" */, z, n)) {
+ if (n == 5) && (0 == Xsqlite3_strnicmp(tls, ts+33616 /* "reads" */, z, n)) {
(*Fts5Cursor)(unsafe.Pointer(pCsr)).FiSpecial = I64(sqlite3Fts5IndexReads(tls, (*Fts5FullTable)(unsafe.Pointer(pTab)).Fp.FpIndex))
- } else if (n == 2) && (0 == Xsqlite3_strnicmp(tls, ts+4040 /* "id" */, z, n)) {
+ } else if (n == 2) && (0 == Xsqlite3_strnicmp(tls, ts+4171 /* "id" */, z, n)) {
(*Fts5Cursor)(unsafe.Pointer(pCsr)).FiSpecial = (*Fts5Cursor)(unsafe.Pointer(pCsr)).FiCsrId
} else {
// An unrecognized directive. Return an error message.
- (*Fts5FullTable)(unsafe.Pointer(pTab)).Fp.Fbase.FzErrMsg = Xsqlite3_mprintf(tls, ts+32473 /* "unknown special ..." */, libc.VaList(bp, n, z))
+ (*Fts5FullTable)(unsafe.Pointer(pTab)).Fp.Fbase.FzErrMsg = Xsqlite3_mprintf(tls, ts+33622 /* "unknown special ..." */, libc.VaList(bp, n, z))
rc = SQLITE_ERROR
}
@@ -177889,7 +185323,7 @@ func fts5SpecialMatch(tls *libc.TLS, pTab uintptr, pCsr uintptr, zQuery uintptr)
// Search for an auxiliary function named zName that can be used with table
// pTab. If one is found, return a pointer to the corresponding Fts5Auxiliary
// structure. Otherwise, if no such function exists, return NULL.
-func fts5FindAuxiliary(tls *libc.TLS, pTab uintptr, zName uintptr) uintptr { /* sqlite3.c:227600:22: */
+func fts5FindAuxiliary(tls *libc.TLS, pTab uintptr, zName uintptr) uintptr { /* sqlite3.c:228874:22: */
var pAux uintptr
for pAux = (*Fts5Global)(unsafe.Pointer((*Fts5FullTable)(unsafe.Pointer(pTab)).FpGlobal)).FpAux; pAux != 0; pAux = (*Fts5Auxiliary)(unsafe.Pointer(pAux)).FpNext {
@@ -177902,7 +185336,7 @@ func fts5FindAuxiliary(tls *libc.TLS, pTab uintptr, zName uintptr) uintptr { /*
return uintptr(0)
}
-func fts5FindRankFunction(tls *libc.TLS, pCsr uintptr) int32 { /* sqlite3.c:227612:12: */
+func fts5FindRankFunction(tls *libc.TLS, pCsr uintptr) int32 { /* sqlite3.c:228886:12: */
bp := tls.Alloc(32)
defer tls.Free(32)
@@ -177914,7 +185348,7 @@ func fts5FindRankFunction(tls *libc.TLS, pCsr uintptr) int32 { /* sqlite3.c:2276
var zRankArgs uintptr = (*Fts5Cursor)(unsafe.Pointer(pCsr)).FzRankArgs
if zRankArgs != 0 {
- var zSql uintptr = sqlite3Fts5Mprintf(tls, bp+16 /* &rc */, ts+32501 /* "SELECT %s" */, libc.VaList(bp, zRankArgs))
+ var zSql uintptr = sqlite3Fts5Mprintf(tls, bp+16 /* &rc */, ts+33650 /* "SELECT %s" */, libc.VaList(bp, zRankArgs))
if zSql != 0 {
*(*uintptr)(unsafe.Pointer(bp + 24 /* pStmt */)) = uintptr(0)
*(*int32)(unsafe.Pointer(bp + 16 /* rc */)) = Xsqlite3_prepare_v3(tls, (*Fts5Config)(unsafe.Pointer(pConfig)).Fdb, zSql, -1,
@@ -177946,7 +185380,7 @@ func fts5FindRankFunction(tls *libc.TLS, pCsr uintptr) int32 { /* sqlite3.c:2276
pAux = fts5FindAuxiliary(tls, pTab, zRank)
if pAux == uintptr(0) {
- (*Fts5FullTable)(unsafe.Pointer(pTab)).Fp.Fbase.FzErrMsg = Xsqlite3_mprintf(tls, ts+32511 /* "no such function..." */, libc.VaList(bp+8, zRank))
+ (*Fts5FullTable)(unsafe.Pointer(pTab)).Fp.Fbase.FzErrMsg = Xsqlite3_mprintf(tls, ts+33660 /* "no such function..." */, libc.VaList(bp+8, zRank))
*(*int32)(unsafe.Pointer(bp + 16 /* rc */)) = SQLITE_ERROR
}
}
@@ -177955,7 +185389,7 @@ func fts5FindRankFunction(tls *libc.TLS, pCsr uintptr) int32 { /* sqlite3.c:2276
return *(*int32)(unsafe.Pointer(bp + 16 /* rc */))
}
-func fts5CursorParseRank(tls *libc.TLS, pConfig uintptr, pCsr uintptr, pRank uintptr) int32 { /* sqlite3.c:227663:12: */
+func fts5CursorParseRank(tls *libc.TLS, pConfig uintptr, pCsr uintptr, pRank uintptr) int32 { /* sqlite3.c:228937:12: */
bp := tls.Alloc(24)
defer tls.Free(24)
@@ -177978,21 +185412,21 @@ func fts5CursorParseRank(tls *libc.TLS, pConfig uintptr, pCsr uintptr, pRank uin
*(*int32)(unsafe.Pointer(pCsr + 80 /* &.csrflags */)) |= (FTS5CSR_FREE_ZRANK)
} else if rc == SQLITE_ERROR {
(*Sqlite3_vtab)(unsafe.Pointer((*Fts5Cursor)(unsafe.Pointer(pCsr)).Fbase.FpVtab)).FzErrMsg = Xsqlite3_mprintf(tls,
- ts+32532 /* "parse error in r..." */, libc.VaList(bp, z))
+ ts+33681 /* "parse error in r..." */, libc.VaList(bp, z))
}
} else {
if (*Fts5Config)(unsafe.Pointer(pConfig)).FzRank != 0 {
(*Fts5Cursor)(unsafe.Pointer(pCsr)).FzRank = (*Fts5Config)(unsafe.Pointer(pConfig)).FzRank
(*Fts5Cursor)(unsafe.Pointer(pCsr)).FzRankArgs = (*Fts5Config)(unsafe.Pointer(pConfig)).FzRankArgs
} else {
- (*Fts5Cursor)(unsafe.Pointer(pCsr)).FzRank = ts + 30266 /* "bm25" */
+ (*Fts5Cursor)(unsafe.Pointer(pCsr)).FzRank = ts + 32064 /* "bm25" */
(*Fts5Cursor)(unsafe.Pointer(pCsr)).FzRankArgs = uintptr(0)
}
}
return rc
}
-func fts5GetRowidLimit(tls *libc.TLS, pVal uintptr, iDefault I64) I64 { /* sqlite3.c:227700:12: */
+func fts5GetRowidLimit(tls *libc.TLS, pVal uintptr, iDefault I64) I64 { /* sqlite3.c:228974:12: */
if pVal != 0 {
var eType int32 = Xsqlite3_value_numeric_type(tls, pVal)
if eType == SQLITE_INTEGER {
@@ -178011,7 +185445,7 @@ func fts5GetRowidLimit(tls *libc.TLS, pVal uintptr, iDefault I64) I64 { /* sqlit
// 1. Full-text search using a MATCH operator.
// 2. A by-rowid lookup.
// 3. A full-table scan.
-func fts5FilterMethod(tls *libc.TLS, pCursor uintptr, idxNum int32, idxStr uintptr, nVal int32, apVal uintptr) int32 { /* sqlite3.c:227721:12: */
+func fts5FilterMethod(tls *libc.TLS, pCursor uintptr, idxNum int32, idxStr uintptr, nVal int32, apVal uintptr) int32 { /* sqlite3.c:228995:12: */
bp := tls.Alloc(16)
defer tls.Free(16)
@@ -178051,7 +185485,7 @@ func fts5FilterMethod(tls *libc.TLS, pCursor uintptr, idxNum int32, idxStr uintp
goto __1
}
(*Fts5FullTable)(unsafe.Pointer(pTab)).Fp.Fbase.FzErrMsg = Xsqlite3_mprintf(tls,
- ts+32364 /* "recursively defi..." */, 0)
+ ts+33513 /* "recursively defi..." */, 0)
return SQLITE_ERROR
__1:
;
@@ -178072,7 +185506,7 @@ __3:
if !(i < nVal) {
goto __5
}
- switch int32(*(*int8)(unsafe.Pointer(idxStr + uintptr(libc.PostIncInt32(&iIdxStr, 1))))) {
+ switch int32(*(*uint8)(unsafe.Pointer(idxStr + uintptr(libc.PostIncInt32(&iIdxStr, 1))))) {
case 'r':
goto __7
case 'M':
@@ -178097,23 +185531,23 @@ __8:
if !(zText == uintptr(0)) {
goto __14
}
- zText = ts + 703 /* "" */
+ zText = ts + 755 /* "" */
__14:
;
iCol = 0
__15:
- iCol = ((iCol * 10) + (int32(*(*int8)(unsafe.Pointer(idxStr + uintptr(iIdxStr)))) - '0'))
+ iCol = ((iCol * 10) + (int32(*(*uint8)(unsafe.Pointer(idxStr + uintptr(iIdxStr)))) - '0'))
iIdxStr++
goto __16
__16:
- if (int32(*(*int8)(unsafe.Pointer(idxStr + uintptr(iIdxStr)))) >= '0') && (int32(*(*int8)(unsafe.Pointer(idxStr + uintptr(iIdxStr)))) <= '9') {
+ if (int32(*(*uint8)(unsafe.Pointer(idxStr + uintptr(iIdxStr)))) >= '0') && (int32(*(*uint8)(unsafe.Pointer(idxStr + uintptr(iIdxStr)))) <= '9') {
goto __15
}
goto __17
__17:
;
- if !(int32(*(*int8)(unsafe.Pointer(zText))) == '*') {
+ if !(int32(*(*uint8)(unsafe.Pointer(zText))) == '*') {
goto __18
}
// The user has issued a query of the form "MATCH '*...'". This
@@ -178145,15 +185579,15 @@ __19:
__9:
__10:
- bGlob = (libc.Bool32(int32(*(*int8)(unsafe.Pointer(idxStr + uintptr((iIdxStr - 1))))) == 'G'))
+ bGlob = (libc.Bool32(int32(*(*uint8)(unsafe.Pointer(idxStr + uintptr((iIdxStr - 1))))) == 'G'))
zText1 = Xsqlite3_value_text(tls, *(*uintptr)(unsafe.Pointer(apVal + uintptr(i)*8)))
iCol = 0
__22:
- iCol = ((iCol * 10) + (int32(*(*int8)(unsafe.Pointer(idxStr + uintptr(iIdxStr)))) - '0'))
+ iCol = ((iCol * 10) + (int32(*(*uint8)(unsafe.Pointer(idxStr + uintptr(iIdxStr)))) - '0'))
iIdxStr++
goto __23
__23:
- if (int32(*(*int8)(unsafe.Pointer(idxStr + uintptr(iIdxStr)))) >= '0') && (int32(*(*int8)(unsafe.Pointer(idxStr + uintptr(iIdxStr)))) <= '9') {
+ if (int32(*(*uint8)(unsafe.Pointer(idxStr + uintptr(iIdxStr)))) >= '0') && (int32(*(*uint8)(unsafe.Pointer(idxStr + uintptr(iIdxStr)))) <= '9') {
goto __22
}
goto __24
@@ -178286,7 +185720,7 @@ __35:
goto __40
}
*(*uintptr)(unsafe.Pointer((*Fts5Config)(unsafe.Pointer(pConfig)).FpzErrmsg)) = Xsqlite3_mprintf(tls,
- ts+32565 /* "%s: table does n..." */, libc.VaList(bp, (*Fts5Config)(unsafe.Pointer(pConfig)).FzName))
+ ts+33714 /* "%s: table does n..." */, libc.VaList(bp, (*Fts5Config)(unsafe.Pointer(pConfig)).FzName))
rc = SQLITE_ERROR
goto __41
__40:
@@ -178331,7 +185765,7 @@ filter_out:
// This is the xEof method of the virtual table. SQLite calls this
// routine to find out if it has reached the end of a result set.
-func fts5EofMethod(tls *libc.TLS, pCursor uintptr) int32 { /* sqlite3.c:227913:12: */
+func fts5EofMethod(tls *libc.TLS, pCursor uintptr) int32 { /* sqlite3.c:229187:12: */
var pCsr uintptr = pCursor
return func() int32 {
if ((*Fts5Cursor)(unsafe.Pointer((pCsr))).Fcsrflags & (FTS5CSR_EOF)) != 0 {
@@ -178342,7 +185776,7 @@ func fts5EofMethod(tls *libc.TLS, pCursor uintptr) int32 { /* sqlite3.c:227913:1
}
// Return the rowid that the cursor currently points to.
-func fts5CursorRowid(tls *libc.TLS, pCsr uintptr) I64 { /* sqlite3.c:227921:12: */
+func fts5CursorRowid(tls *libc.TLS, pCsr uintptr) I64 { /* sqlite3.c:229195:12: */
if (*Fts5Cursor)(unsafe.Pointer(pCsr)).FpSorter != 0 {
return (*Fts5Sorter)(unsafe.Pointer((*Fts5Cursor)(unsafe.Pointer(pCsr)).FpSorter)).FiRowid
@@ -178356,7 +185790,7 @@ func fts5CursorRowid(tls *libc.TLS, pCsr uintptr) I64 { /* sqlite3.c:227921:12:
// retrieve the rowid for the current row of the result set. fts5
// exposes %_content.rowid as the rowid for the virtual table. The
// rowid should be written to *pRowid.
-func fts5RowidMethod(tls *libc.TLS, pCursor uintptr, pRowid uintptr) int32 { /* sqlite3.c:227939:12: */
+func fts5RowidMethod(tls *libc.TLS, pCursor uintptr, pRowid uintptr) int32 { /* sqlite3.c:229213:12: */
var pCsr uintptr = pCursor
var ePlan int32 = (*Fts5Cursor)(unsafe.Pointer(pCsr)).FePlan
@@ -178386,7 +185820,7 @@ func fts5RowidMethod(tls *libc.TLS, pCursor uintptr, pRowid uintptr) int32 { /*
//
// If argument bErrormsg is true and an error occurs, an error message may
// be left in sqlite3_vtab.zErrMsg.
-func fts5SeekCursor(tls *libc.TLS, pCsr uintptr, bErrormsg int32) int32 { /* sqlite3.c:227970:12: */
+func fts5SeekCursor(tls *libc.TLS, pCsr uintptr, bErrormsg int32) int32 { /* sqlite3.c:229244:12: */
bp := tls.Alloc(8)
defer tls.Free(8)
@@ -178423,14 +185857,14 @@ func fts5SeekCursor(tls *libc.TLS, pCsr uintptr, bErrormsg int32) int32 { /* sql
rc = (SQLITE_CORRUPT | (int32(1) << 8))
} else if (*Fts5Config)(unsafe.Pointer((*Fts5Table)(unsafe.Pointer(pTab)).FpConfig)).FpzErrmsg != 0 {
*(*uintptr)(unsafe.Pointer((*Fts5Config)(unsafe.Pointer((*Fts5Table)(unsafe.Pointer(pTab)).FpConfig)).FpzErrmsg)) = Xsqlite3_mprintf(tls,
- ts+2718 /* "%s" */, libc.VaList(bp, Xsqlite3_errmsg(tls, (*Fts5Config)(unsafe.Pointer((*Fts5Table)(unsafe.Pointer(pTab)).FpConfig)).Fdb)))
+ ts+2790 /* "%s" */, libc.VaList(bp, Xsqlite3_errmsg(tls, (*Fts5Config)(unsafe.Pointer((*Fts5Table)(unsafe.Pointer(pTab)).FpConfig)).Fdb)))
}
}
}
return rc
}
-func fts5SetVtabError(tls *libc.TLS, p uintptr, zFormat uintptr, va uintptr) { /* sqlite3.c:228009:13: */
+func fts5SetVtabError(tls *libc.TLS, p uintptr, zFormat uintptr, va uintptr) { /* sqlite3.c:229283:13: */
var ap Va_list
_ = ap // ... printf arguments
ap = va
@@ -178452,7 +185886,7 @@ func fts5SetVtabError(tls *libc.TLS, p uintptr, zFormat uintptr, va uintptr) { /
// The commands implemented by this function are documented in the "Special
// INSERT Directives" section of the documentation. It should be updated if
// more commands are added to this function.
-func fts5SpecialInsert(tls *libc.TLS, pTab uintptr, zCmd uintptr, pVal uintptr) int32 { /* sqlite3.c:228032:12: */
+func fts5SpecialInsert(tls *libc.TLS, pTab uintptr, zCmd uintptr, pVal uintptr) int32 { /* sqlite3.c:229306:12: */
bp := tls.Alloc(4)
defer tls.Free(4)
@@ -178460,29 +185894,29 @@ func fts5SpecialInsert(tls *libc.TLS, pTab uintptr, zCmd uintptr, pVal uintptr)
var rc int32 = SQLITE_OK
*(*int32)(unsafe.Pointer(bp /* bError */)) = 0
- if 0 == Xsqlite3_stricmp(tls, ts+32601 /* "delete-all" */, zCmd) {
+ if 0 == Xsqlite3_stricmp(tls, ts+33750 /* "delete-all" */, zCmd) {
if (*Fts5Config)(unsafe.Pointer(pConfig)).FeContent == FTS5_CONTENT_NORMAL {
fts5SetVtabError(tls, pTab,
- ts+32612 /* "'delete-all' may..." */, 0)
+ ts+33761 /* "'delete-all' may..." */, 0)
rc = SQLITE_ERROR
} else {
rc = sqlite3Fts5StorageDeleteAll(tls, (*Fts5FullTable)(unsafe.Pointer(pTab)).FpStorage)
}
- } else if 0 == Xsqlite3_stricmp(tls, ts+32692 /* "rebuild" */, zCmd) {
+ } else if 0 == Xsqlite3_stricmp(tls, ts+33841 /* "rebuild" */, zCmd) {
if (*Fts5Config)(unsafe.Pointer(pConfig)).FeContent == FTS5_CONTENT_NONE {
fts5SetVtabError(tls, pTab,
- ts+32700 /* "'rebuild' may no..." */, 0)
+ ts+33849 /* "'rebuild' may no..." */, 0)
rc = SQLITE_ERROR
} else {
rc = sqlite3Fts5StorageRebuild(tls, (*Fts5FullTable)(unsafe.Pointer(pTab)).FpStorage)
}
- } else if 0 == Xsqlite3_stricmp(tls, ts+14973 /* "optimize" */, zCmd) {
+ } else if 0 == Xsqlite3_stricmp(tls, ts+15428 /* "optimize" */, zCmd) {
rc = sqlite3Fts5StorageOptimize(tls, (*Fts5FullTable)(unsafe.Pointer(pTab)).FpStorage)
- } else if 0 == Xsqlite3_stricmp(tls, ts+32756 /* "merge" */, zCmd) {
+ } else if 0 == Xsqlite3_stricmp(tls, ts+33905 /* "merge" */, zCmd) {
var nMerge int32 = Xsqlite3_value_int(tls, pVal)
rc = sqlite3Fts5StorageMerge(tls, (*Fts5FullTable)(unsafe.Pointer(pTab)).FpStorage, nMerge)
- } else if 0 == Xsqlite3_stricmp(tls, ts+32762 /* "integrity-check" */, zCmd) {
+ } else if 0 == Xsqlite3_stricmp(tls, ts+33911 /* "integrity-check" */, zCmd) {
var iArg int32 = Xsqlite3_value_int(tls, pVal)
rc = sqlite3Fts5StorageIntegrity(tls, (*Fts5FullTable)(unsafe.Pointer(pTab)).FpStorage, iArg)
} else {
@@ -178501,7 +185935,7 @@ func fts5SpecialInsert(tls *libc.TLS, pTab uintptr, zCmd uintptr, pVal uintptr)
return rc
}
-func fts5SpecialDelete(tls *libc.TLS, pTab uintptr, apVal uintptr) int32 { /* sqlite3.c:228088:12: */
+func fts5SpecialDelete(tls *libc.TLS, pTab uintptr, apVal uintptr) int32 { /* sqlite3.c:229362:12: */
var rc int32 = SQLITE_OK
var eType1 int32 = Xsqlite3_value_type(tls, *(*uintptr)(unsafe.Pointer(apVal + 1*8)))
if eType1 == SQLITE_INTEGER {
@@ -178511,7 +185945,7 @@ func fts5SpecialDelete(tls *libc.TLS, pTab uintptr, apVal uintptr) int32 { /* sq
return rc
}
-func fts5StorageInsert(tls *libc.TLS, pRc uintptr, pTab uintptr, apVal uintptr, piRowid uintptr) { /* sqlite3.c:228101:13: */
+func fts5StorageInsert(tls *libc.TLS, pRc uintptr, pTab uintptr, apVal uintptr, piRowid uintptr) { /* sqlite3.c:229375:13: */
var rc int32 = *(*int32)(unsafe.Pointer(pRc))
if rc == SQLITE_OK {
rc = sqlite3Fts5StorageContentInsert(tls, (*Fts5FullTable)(unsafe.Pointer(pTab)).FpStorage, apVal, piRowid)
@@ -178534,7 +185968,7 @@ func fts5StorageInsert(tls *libc.TLS, pRc uintptr, pTab uintptr, apVal uintptr,
// 2. The "new" rowid.
// 3. Values for each of the nCol matchable columns.
// 4. Values for the two hidden columns ( and "rank").
-func fts5UpdateMethod(tls *libc.TLS, pVtab uintptr, nArg int32, apVal uintptr, pRowid uintptr) int32 { /* sqlite3.c:228131:12: */
+func fts5UpdateMethod(tls *libc.TLS, pVtab uintptr, nArg int32, apVal uintptr, pRowid uintptr) int32 { /* sqlite3.c:229405:12: */
bp := tls.Alloc(20)
defer tls.Free(20)
@@ -178556,7 +185990,7 @@ func fts5UpdateMethod(tls *libc.TLS, pVtab uintptr, nArg int32, apVal uintptr, p
// A "special" INSERT op. These are handled separately.
var z uintptr = Xsqlite3_value_text(tls, *(*uintptr)(unsafe.Pointer(apVal + uintptr((2+(*Fts5Config)(unsafe.Pointer(pConfig)).FnCol))*8)))
if ((*Fts5Config)(unsafe.Pointer(pConfig)).FeContent != FTS5_CONTENT_NORMAL) &&
- (0 == Xsqlite3_stricmp(tls, ts+15512 /* "delete" */, z)) {
+ (0 == Xsqlite3_stricmp(tls, ts+15967 /* "delete" */, z)) {
*(*int32)(unsafe.Pointer(bp + 16 /* rc */)) = fts5SpecialDelete(tls, pTab, apVal)
} else {
*(*int32)(unsafe.Pointer(bp + 16 /* rc */)) = fts5SpecialInsert(tls, pTab, z, *(*uintptr)(unsafe.Pointer(apVal + uintptr(((2+(*Fts5Config)(unsafe.Pointer(pConfig)).FnCol)+1))*8)))
@@ -178581,12 +186015,12 @@ func fts5UpdateMethod(tls *libc.TLS, pVtab uintptr, nArg int32, apVal uintptr, p
// This is not suported.
if (eType0 == SQLITE_INTEGER) && (fts5IsContentless(tls, pTab) != 0) {
(*Fts5FullTable)(unsafe.Pointer(pTab)).Fp.Fbase.FzErrMsg = Xsqlite3_mprintf(tls,
- ts+32778, /* "cannot %s conten..." */
+ ts+33927, /* "cannot %s conten..." */
libc.VaList(bp, func() uintptr {
if nArg > 1 {
- return ts + 18297 /* "UPDATE" */
+ return ts + 18781 /* "UPDATE" */
}
- return ts + 32815 /* "DELETE from" */
+ return ts + 33964 /* "DELETE from" */
}(), (*Fts5Config)(unsafe.Pointer(pConfig)).FzName))
*(*int32)(unsafe.Pointer(bp + 16 /* rc */)) = SQLITE_ERROR
} else if nArg == 1 {
@@ -178636,7 +186070,7 @@ func fts5UpdateMethod(tls *libc.TLS, pVtab uintptr, nArg int32, apVal uintptr, p
}
// Implementation of xSync() method.
-func fts5SyncMethod(tls *libc.TLS, pVtab uintptr) int32 { /* sqlite3.c:228257:12: */
+func fts5SyncMethod(tls *libc.TLS, pVtab uintptr) int32 { /* sqlite3.c:229531:12: */
var rc int32
var pTab uintptr = pVtab
@@ -178648,7 +186082,7 @@ func fts5SyncMethod(tls *libc.TLS, pVtab uintptr) int32 { /* sqlite3.c:228257:12
}
// Implementation of xBegin() method.
-func fts5BeginMethod(tls *libc.TLS, pVtab uintptr) int32 { /* sqlite3.c:228271:12: */
+func fts5BeginMethod(tls *libc.TLS, pVtab uintptr) int32 { /* sqlite3.c:229545:12: */
fts5NewTransaction(tls, pVtab)
return SQLITE_OK
@@ -178657,7 +186091,7 @@ func fts5BeginMethod(tls *libc.TLS, pVtab uintptr) int32 { /* sqlite3.c:228271:1
// Implementation of xCommit() method. This is a no-op. The contents of
// the pending-terms hash-table have already been flushed into the database
// by fts5SyncMethod().
-func fts5CommitMethod(tls *libc.TLS, pVtab uintptr) int32 { /* sqlite3.c:228282:12: */
+func fts5CommitMethod(tls *libc.TLS, pVtab uintptr) int32 { /* sqlite3.c:229556:12: */
_ = pVtab // Call below is a no-op for NDEBUG builds
return SQLITE_OK
@@ -178665,7 +186099,7 @@ func fts5CommitMethod(tls *libc.TLS, pVtab uintptr) int32 { /* sqlite3.c:228282:
// Implementation of xRollback(). Discard the contents of the pending-terms
// hash-table. Any changes made to the database are reverted by SQLite.
-func fts5RollbackMethod(tls *libc.TLS, pVtab uintptr) int32 { /* sqlite3.c:228292:12: */
+func fts5RollbackMethod(tls *libc.TLS, pVtab uintptr) int32 { /* sqlite3.c:229566:12: */
var rc int32
var pTab uintptr = pVtab
@@ -178673,46 +186107,46 @@ func fts5RollbackMethod(tls *libc.TLS, pVtab uintptr) int32 { /* sqlite3.c:22829
return rc
}
-func fts5ApiUserData(tls *libc.TLS, pCtx uintptr) uintptr { /* sqlite3.c:228302:13: */
+func fts5ApiUserData(tls *libc.TLS, pCtx uintptr) uintptr { /* sqlite3.c:229576:13: */
var pCsr uintptr = pCtx
return (*Fts5Auxiliary)(unsafe.Pointer((*Fts5Cursor)(unsafe.Pointer(pCsr)).FpAux)).FpUserData
}
-func fts5ApiColumnCount(tls *libc.TLS, pCtx uintptr) int32 { /* sqlite3.c:228307:12: */
+func fts5ApiColumnCount(tls *libc.TLS, pCtx uintptr) int32 { /* sqlite3.c:229581:12: */
var pCsr uintptr = pCtx
return (*Fts5Config)(unsafe.Pointer((*Fts5Table)(unsafe.Pointer((*Fts5Cursor)(unsafe.Pointer(pCsr)).Fbase.FpVtab)).FpConfig)).FnCol
}
-func fts5ApiColumnTotalSize(tls *libc.TLS, pCtx uintptr, iCol int32, pnToken uintptr) int32 { /* sqlite3.c:228312:12: */
+func fts5ApiColumnTotalSize(tls *libc.TLS, pCtx uintptr, iCol int32, pnToken uintptr) int32 { /* sqlite3.c:229586:12: */
var pCsr uintptr = pCtx
var pTab uintptr = (*Fts5Cursor)(unsafe.Pointer(pCsr)).Fbase.FpVtab
return sqlite3Fts5StorageSize(tls, (*Fts5FullTable)(unsafe.Pointer(pTab)).FpStorage, iCol, pnToken)
}
-func fts5ApiRowCount(tls *libc.TLS, pCtx uintptr, pnRow uintptr) int32 { /* sqlite3.c:228322:12: */
+func fts5ApiRowCount(tls *libc.TLS, pCtx uintptr, pnRow uintptr) int32 { /* sqlite3.c:229596:12: */
var pCsr uintptr = pCtx
var pTab uintptr = (*Fts5Cursor)(unsafe.Pointer(pCsr)).Fbase.FpVtab
return sqlite3Fts5StorageRowCount(tls, (*Fts5FullTable)(unsafe.Pointer(pTab)).FpStorage, pnRow)
}
-func fts5ApiTokenize(tls *libc.TLS, pCtx uintptr, pText uintptr, nText int32, pUserData uintptr, xToken uintptr) int32 { /* sqlite3.c:228328:12: */
+func fts5ApiTokenize(tls *libc.TLS, pCtx uintptr, pText uintptr, nText int32, pUserData uintptr, xToken uintptr) int32 { /* sqlite3.c:229602:12: */
var pCsr uintptr = pCtx
var pTab uintptr = (*Fts5Cursor)(unsafe.Pointer(pCsr)).Fbase.FpVtab
return sqlite3Fts5Tokenize(tls,
(*Fts5Table)(unsafe.Pointer(pTab)).FpConfig, FTS5_TOKENIZE_AUX, pText, nText, pUserData, xToken)
}
-func fts5ApiPhraseCount(tls *libc.TLS, pCtx uintptr) int32 { /* sqlite3.c:228341:12: */
+func fts5ApiPhraseCount(tls *libc.TLS, pCtx uintptr) int32 { /* sqlite3.c:229615:12: */
var pCsr uintptr = pCtx
return sqlite3Fts5ExprPhraseCount(tls, (*Fts5Cursor)(unsafe.Pointer(pCsr)).FpExpr)
}
-func fts5ApiPhraseSize(tls *libc.TLS, pCtx uintptr, iPhrase int32) int32 { /* sqlite3.c:228346:12: */
+func fts5ApiPhraseSize(tls *libc.TLS, pCtx uintptr, iPhrase int32) int32 { /* sqlite3.c:229620:12: */
var pCsr uintptr = pCtx
return sqlite3Fts5ExprPhraseSize(tls, (*Fts5Cursor)(unsafe.Pointer(pCsr)).FpExpr, iPhrase)
}
-func fts5ApiColumnText(tls *libc.TLS, pCtx uintptr, iCol int32, pz uintptr, pn uintptr) int32 { /* sqlite3.c:228351:12: */
+func fts5ApiColumnText(tls *libc.TLS, pCtx uintptr, iCol int32, pz uintptr, pn uintptr) int32 { /* sqlite3.c:229625:12: */
var rc int32 = SQLITE_OK
var pCsr uintptr = pCtx
if (fts5IsContentless(tls, (*Fts5Cursor)(unsafe.Pointer(pCsr)).Fbase.FpVtab) != 0) ||
@@ -178729,7 +186163,7 @@ func fts5ApiColumnText(tls *libc.TLS, pCtx uintptr, iCol int32, pz uintptr, pn u
return rc
}
-func fts5CsrPoslist(tls *libc.TLS, pCsr uintptr, iPhrase int32, pa uintptr, pn uintptr) int32 { /* sqlite3.c:228374:12: */
+func fts5CsrPoslist(tls *libc.TLS, pCsr uintptr, iPhrase int32, pa uintptr, pn uintptr) int32 { /* sqlite3.c:229648:12: */
bp := tls.Alloc(12)
defer tls.Free(12)
@@ -178786,7 +186220,7 @@ func fts5CsrPoslist(tls *libc.TLS, pCsr uintptr, iPhrase int32, pa uintptr, pn u
// Ensure that the Fts5Cursor.nInstCount and aInst[] variables are populated
// correctly for the current view. Return SQLITE_OK if successful, or an
// SQLite error code otherwise.
-func fts5CacheInstArray(tls *libc.TLS, pCsr uintptr) int32 { /* sqlite3.c:228426:12: */
+func fts5CacheInstArray(tls *libc.TLS, pCsr uintptr) int32 { /* sqlite3.c:229700:12: */
bp := tls.Alloc(20)
defer tls.Free(20)
@@ -178834,17 +186268,19 @@ func fts5CacheInstArray(tls *libc.TLS, pCsr uintptr) int32 { /* sqlite3.c:228426
nInst++
if nInst >= (*Fts5Cursor)(unsafe.Pointer(pCsr)).FnInstAlloc {
- (*Fts5Cursor)(unsafe.Pointer(pCsr)).FnInstAlloc = func() int32 {
- if (*Fts5Cursor)(unsafe.Pointer(pCsr)).FnInstAlloc != 0 {
- return ((*Fts5Cursor)(unsafe.Pointer(pCsr)).FnInstAlloc * 2)
- }
- return 32
- }()
+ var nNewSize int32
+ if (*Fts5Cursor)(unsafe.Pointer(pCsr)).FnInstAlloc != 0 {
+ nNewSize = ((*Fts5Cursor)(unsafe.Pointer(pCsr)).FnInstAlloc * 2)
+ } else {
+ nNewSize = 32
+ }
aInst = Xsqlite3_realloc64(tls,
- (*Fts5Cursor)(unsafe.Pointer(pCsr)).FaInst, (uint64((uint64((*Fts5Cursor)(unsafe.Pointer(pCsr)).FnInstAlloc) * uint64(unsafe.Sizeof(int32(0)))) * uint64(3))))
+ (*Fts5Cursor)(unsafe.Pointer(pCsr)).FaInst, (uint64((uint64(nNewSize) * uint64(unsafe.Sizeof(int32(0)))) * uint64(3))))
if aInst != 0 {
(*Fts5Cursor)(unsafe.Pointer(pCsr)).FaInst = aInst
+ (*Fts5Cursor)(unsafe.Pointer(pCsr)).FnInstAlloc = nNewSize
} else {
+ nInst--
*(*int32)(unsafe.Pointer(bp /* rc */)) = SQLITE_NOMEM
break
}
@@ -178868,7 +186304,7 @@ func fts5CacheInstArray(tls *libc.TLS, pCsr uintptr) int32 { /* sqlite3.c:228426
return *(*int32)(unsafe.Pointer(bp /* rc */))
}
-func fts5ApiInstCount(tls *libc.TLS, pCtx uintptr, pnInst uintptr) int32 { /* sqlite3.c:228498:12: */
+func fts5ApiInstCount(tls *libc.TLS, pCtx uintptr, pnInst uintptr) int32 { /* sqlite3.c:229774:12: */
var pCsr uintptr = pCtx
var rc int32 = SQLITE_OK
if (((*Fts5Cursor)(unsafe.Pointer((pCsr))).Fcsrflags & (FTS5CSR_REQUIRE_INST)) == 0) ||
@@ -178878,7 +186314,7 @@ func fts5ApiInstCount(tls *libc.TLS, pCtx uintptr, pnInst uintptr) int32 { /* sq
return rc
}
-func fts5ApiInst(tls *libc.TLS, pCtx uintptr, iIdx int32, piPhrase uintptr, piCol uintptr, piOff uintptr) int32 { /* sqlite3.c:228508:12: */
+func fts5ApiInst(tls *libc.TLS, pCtx uintptr, iIdx int32, piPhrase uintptr, piCol uintptr, piOff uintptr) int32 { /* sqlite3.c:229784:12: */
var pCsr uintptr = pCtx
var rc int32 = SQLITE_OK
if (((*Fts5Cursor)(unsafe.Pointer((pCsr))).Fcsrflags & (FTS5CSR_REQUIRE_INST)) == 0) ||
@@ -178894,11 +186330,11 @@ func fts5ApiInst(tls *libc.TLS, pCtx uintptr, iIdx int32, piPhrase uintptr, piCo
return rc
}
-func fts5ApiRowid(tls *libc.TLS, pCtx uintptr) Sqlite3_int64 { /* sqlite3.c:228537:22: */
+func fts5ApiRowid(tls *libc.TLS, pCtx uintptr) Sqlite3_int64 { /* sqlite3.c:229813:22: */
return fts5CursorRowid(tls, pCtx)
}
-func fts5ColumnSizeCb(tls *libc.TLS, pContext uintptr, tflags int32, pUnused uintptr, nUnused int32, iUnused1 int32, iUnused2 int32) int32 { /* sqlite3.c:228541:12: */
+func fts5ColumnSizeCb(tls *libc.TLS, pContext uintptr, tflags int32, pUnused uintptr, nUnused int32, iUnused1 int32, iUnused2 int32) int32 { /* sqlite3.c:229817:12: */
var pCnt uintptr = pContext
_ = pUnused
_ = nUnused
@@ -178910,7 +186346,7 @@ func fts5ColumnSizeCb(tls *libc.TLS, pContext uintptr, tflags int32, pUnused uin
return SQLITE_OK
}
-func fts5ApiColumnSize(tls *libc.TLS, pCtx uintptr, iCol int32, pnToken uintptr) int32 { /* sqlite3.c:228558:12: */
+func fts5ApiColumnSize(tls *libc.TLS, pCtx uintptr, iCol int32, pnToken uintptr) int32 { /* sqlite3.c:229834:12: */
bp := tls.Alloc(12)
defer tls.Free(12)
@@ -178968,7 +186404,7 @@ func fts5ApiColumnSize(tls *libc.TLS, pCtx uintptr, iCol int32, pnToken uintptr)
}
// Implementation of the xSetAuxdata() method.
-func fts5ApiSetAuxdata(tls *libc.TLS, pCtx uintptr, pPtr uintptr, xDelete uintptr) int32 { /* sqlite3.c:228611:12: */
+func fts5ApiSetAuxdata(tls *libc.TLS, pCtx uintptr, pPtr uintptr, xDelete uintptr) int32 { /* sqlite3.c:229887:12: */
bp := tls.Alloc(4)
defer tls.Free(4)
@@ -178985,14 +186421,14 @@ func fts5ApiSetAuxdata(tls *libc.TLS, pCtx uintptr, pPtr uintptr, xDelete uintpt
if pData != 0 {
if (*Fts5Auxdata)(unsafe.Pointer(pData)).FxDelete != 0 {
- (*(*func(*libc.TLS, uintptr))(unsafe.Pointer((pData + 16 /* &.xDelete */))))(tls, (*Fts5Auxdata)(unsafe.Pointer(pData)).FpPtr)
+ (*struct{ f func(*libc.TLS, uintptr) })(unsafe.Pointer(&struct{ uintptr }{(*Fts5Auxdata)(unsafe.Pointer(pData)).FxDelete})).f(tls, (*Fts5Auxdata)(unsafe.Pointer(pData)).FpPtr)
}
} else {
*(*int32)(unsafe.Pointer(bp /* rc */)) = SQLITE_OK
pData = sqlite3Fts5MallocZero(tls, bp /* &rc */, int64(unsafe.Sizeof(Fts5Auxdata{})))
if pData == uintptr(0) {
if xDelete != 0 {
- (*(*func(*libc.TLS, uintptr))(unsafe.Pointer(&xDelete)))(tls, pPtr)
+ (*struct{ f func(*libc.TLS, uintptr) })(unsafe.Pointer(&struct{ uintptr }{xDelete})).f(tls, pPtr)
}
return *(*int32)(unsafe.Pointer(bp /* rc */))
}
@@ -179006,7 +186442,7 @@ func fts5ApiSetAuxdata(tls *libc.TLS, pCtx uintptr, pPtr uintptr, xDelete uintpt
return SQLITE_OK
}
-func fts5ApiGetAuxdata(tls *libc.TLS, pCtx uintptr, bClear int32) uintptr { /* sqlite3.c:228646:13: */
+func fts5ApiGetAuxdata(tls *libc.TLS, pCtx uintptr, bClear int32) uintptr { /* sqlite3.c:229922:13: */
var pCsr uintptr = pCtx
var pData uintptr
var pRet uintptr = uintptr(0)
@@ -179028,7 +186464,7 @@ func fts5ApiGetAuxdata(tls *libc.TLS, pCtx uintptr, bClear int32) uintptr { /* s
return pRet
}
-func fts5ApiPhraseNext(tls *libc.TLS, pUnused uintptr, pIter uintptr, piCol uintptr, piOff uintptr) { /* sqlite3.c:228666:13: */
+func fts5ApiPhraseNext(tls *libc.TLS, pUnused uintptr, pIter uintptr, piCol uintptr, piOff uintptr) { /* sqlite3.c:229942:13: */
bp := tls.Alloc(4)
defer tls.Free(4)
@@ -179050,7 +186486,7 @@ func fts5ApiPhraseNext(tls *libc.TLS, pUnused uintptr, pIter uintptr, piCol uint
}
}
-func fts5ApiPhraseFirst(tls *libc.TLS, pCtx uintptr, iPhrase int32, pIter uintptr, piCol uintptr, piOff uintptr) int32 { /* sqlite3.c:228688:12: */
+func fts5ApiPhraseFirst(tls *libc.TLS, pCtx uintptr, iPhrase int32, pIter uintptr, piCol uintptr, piOff uintptr) int32 { /* sqlite3.c:229964:12: */
bp := tls.Alloc(4)
defer tls.Free(4)
@@ -179073,7 +186509,7 @@ func fts5ApiPhraseFirst(tls *libc.TLS, pCtx uintptr, iPhrase int32, pIter uintpt
return rc
}
-func fts5ApiPhraseNextColumn(tls *libc.TLS, pCtx uintptr, pIter uintptr, piCol uintptr) { /* sqlite3.c:228707:13: */
+func fts5ApiPhraseNextColumn(tls *libc.TLS, pCtx uintptr, pIter uintptr, piCol uintptr) { /* sqlite3.c:229983:13: */
bp := tls.Alloc(8)
defer tls.Free(8)
@@ -179106,7 +186542,7 @@ func fts5ApiPhraseNextColumn(tls *libc.TLS, pCtx uintptr, pIter uintptr, piCol u
}
}
-func fts5ApiPhraseFirstColumn(tls *libc.TLS, pCtx uintptr, iPhrase int32, pIter uintptr, piCol uintptr) int32 { /* sqlite3.c:228737:12: */
+func fts5ApiPhraseFirstColumn(tls *libc.TLS, pCtx uintptr, iPhrase int32, pIter uintptr, piCol uintptr) int32 { /* sqlite3.c:230013:12: */
bp := tls.Alloc(8)
defer tls.Free(8)
@@ -179187,10 +186623,10 @@ var sFts5Api = Fts5ExtensionApi{
FxPhraseNext: 0,
FxPhraseFirstColumn: 0,
FxPhraseNextColumn: 0,
-} /* sqlite3.c:228787:31 */
+} /* sqlite3.c:230063:31 */
// Implementation of API function xQueryPhrase().
-func fts5ApiQueryPhrase(tls *libc.TLS, pCtx uintptr, iPhrase int32, pUserData uintptr, xCallback uintptr) int32 { /* sqlite3.c:228813:12: */
+func fts5ApiQueryPhrase(tls *libc.TLS, pCtx uintptr, iPhrase int32, pUserData uintptr, xCallback uintptr) int32 { /* sqlite3.c:230089:12: */
bp := tls.Alloc(8)
defer tls.Free(8)
@@ -179210,7 +186646,9 @@ func fts5ApiQueryPhrase(tls *libc.TLS, pCtx uintptr, iPhrase int32, pUserData ui
if rc == SQLITE_OK {
for rc = fts5CursorFirst(tls, pTab, *(*uintptr)(unsafe.Pointer(bp /* pNew */)), 0); (rc == SQLITE_OK) && (((*Fts5Cursor)(unsafe.Pointer((*(*uintptr)(unsafe.Pointer(bp /* pNew */))))).Fcsrflags & (FTS5CSR_EOF)) == 0); rc = fts5NextMethod(tls, *(*uintptr)(unsafe.Pointer(bp /* pNew */))) {
- rc = (*(*func(*libc.TLS, uintptr, uintptr, uintptr) int32)(unsafe.Pointer(&xCallback)))(tls, uintptr(unsafe.Pointer(&sFts5Api)), *(*uintptr)(unsafe.Pointer(bp /* pNew */)), pUserData)
+ rc = (*struct {
+ f func(*libc.TLS, uintptr, uintptr, uintptr) int32
+ })(unsafe.Pointer(&struct{ uintptr }{xCallback})).f(tls, uintptr(unsafe.Pointer(&sFts5Api)), *(*uintptr)(unsafe.Pointer(bp /* pNew */)), pUserData)
if rc != SQLITE_OK {
if rc == SQLITE_DONE {
rc = SQLITE_OK
@@ -179224,14 +186662,16 @@ func fts5ApiQueryPhrase(tls *libc.TLS, pCtx uintptr, iPhrase int32, pUserData ui
return rc
}
-func fts5ApiInvoke(tls *libc.TLS, pAux uintptr, pCsr uintptr, context uintptr, argc int32, argv uintptr) { /* sqlite3.c:228850:13: */
+func fts5ApiInvoke(tls *libc.TLS, pAux uintptr, pCsr uintptr, context uintptr, argc int32, argv uintptr) { /* sqlite3.c:230126:13: */
(*Fts5Cursor)(unsafe.Pointer(pCsr)).FpAux = pAux
- (*(*func(*libc.TLS, uintptr, uintptr, uintptr, int32, uintptr))(unsafe.Pointer((pAux + 24 /* &.xFunc */))))(tls, uintptr(unsafe.Pointer(&sFts5Api)), pCsr, context, argc, argv)
+ (*struct {
+ f func(*libc.TLS, uintptr, uintptr, uintptr, int32, uintptr)
+ })(unsafe.Pointer(&struct{ uintptr }{(*Fts5Auxiliary)(unsafe.Pointer(pAux)).FxFunc})).f(tls, uintptr(unsafe.Pointer(&sFts5Api)), pCsr, context, argc, argv)
(*Fts5Cursor)(unsafe.Pointer(pCsr)).FpAux = uintptr(0)
}
-func fts5CursorFromCsrid(tls *libc.TLS, pGlobal uintptr, iCsrId I64) uintptr { /* sqlite3.c:228863:19: */
+func fts5CursorFromCsrid(tls *libc.TLS, pGlobal uintptr, iCsrId I64) uintptr { /* sqlite3.c:230139:19: */
var pCsr uintptr
for pCsr = (*Fts5Global)(unsafe.Pointer(pGlobal)).FpCsr; pCsr != 0; pCsr = (*Fts5Cursor)(unsafe.Pointer(pCsr)).FpNext {
if (*Fts5Cursor)(unsafe.Pointer(pCsr)).FiCsrId == iCsrId {
@@ -179241,7 +186681,7 @@ func fts5CursorFromCsrid(tls *libc.TLS, pGlobal uintptr, iCsrId I64) uintptr { /
return pCsr
}
-func fts5ApiCallback(tls *libc.TLS, context uintptr, argc int32, argv uintptr) { /* sqlite3.c:228871:13: */
+func fts5ApiCallback(tls *libc.TLS, context uintptr, argc int32, argv uintptr) { /* sqlite3.c:230147:13: */
bp := tls.Alloc(8)
defer tls.Free(8)
@@ -179254,7 +186694,7 @@ func fts5ApiCallback(tls *libc.TLS, context uintptr, argc int32, argv uintptr) {
pCsr = fts5CursorFromCsrid(tls, (*Fts5Auxiliary)(unsafe.Pointer(pAux)).FpGlobal, iCsrId)
if (pCsr == uintptr(0)) || ((*Fts5Cursor)(unsafe.Pointer(pCsr)).FePlan == 0) {
- var zErr uintptr = Xsqlite3_mprintf(tls, ts+32827 /* "no such cursor: ..." */, libc.VaList(bp, iCsrId))
+ var zErr uintptr = Xsqlite3_mprintf(tls, ts+33976 /* "no such cursor: ..." */, libc.VaList(bp, iCsrId))
Xsqlite3_result_error(tls, context, zErr, -1)
Xsqlite3_free(tls, zErr)
} else {
@@ -179264,7 +186704,7 @@ func fts5ApiCallback(tls *libc.TLS, context uintptr, argc int32, argv uintptr) {
// Given cursor id iId, return a pointer to the corresponding Fts5Table
// object. Or NULL If the cursor id does not exist.
-func sqlite3Fts5TableFromCsrid(tls *libc.TLS, pGlobal uintptr, iCsrId I64) uintptr { /* sqlite3.c:228900:18: */
+func sqlite3Fts5TableFromCsrid(tls *libc.TLS, pGlobal uintptr, iCsrId I64) uintptr { /* sqlite3.c:230176:18: */
var pCsr uintptr
pCsr = fts5CursorFromCsrid(tls, pGlobal, iCsrId)
if pCsr != 0 {
@@ -179286,7 +186726,7 @@ func sqlite3Fts5TableFromCsrid(tls *libc.TLS, pGlobal uintptr, iCsrId I64) uintp
// for phrase 0. The second (same disclaimer) contains the size of position
// list 1. And so on. There is no size field for the final position list,
// as it can be derived from the total size of the blob.
-func fts5PoslistBlob(tls *libc.TLS, pCtx uintptr, pCsr uintptr) int32 { /* sqlite3.c:228927:12: */
+func fts5PoslistBlob(tls *libc.TLS, pCtx uintptr, pCsr uintptr) int32 { /* sqlite3.c:230203:12: */
bp := tls.Alloc(68)
defer tls.Free(68)
@@ -179350,7 +186790,7 @@ func fts5PoslistBlob(tls *libc.TLS, pCtx uintptr, pCsr uintptr) int32 { /* sqlit
// This is the xColumn method, called by SQLite to request a value from
// the row that the supplied cursor currently points to.
-func fts5ColumnMethod(tls *libc.TLS, pCursor uintptr, pCtx uintptr, iCol int32) int32 { /* sqlite3.c:228984:12: */
+func fts5ColumnMethod(tls *libc.TLS, pCursor uintptr, pCtx uintptr, iCol int32) int32 { /* sqlite3.c:230260:12: */
var pTab uintptr = (*Sqlite3_vtab_cursor)(unsafe.Pointer(pCursor)).FpVtab
var pConfig uintptr = (*Fts5FullTable)(unsafe.Pointer(pTab)).Fp.FpConfig
var pCsr uintptr = pCursor
@@ -179390,7 +186830,7 @@ func fts5ColumnMethod(tls *libc.TLS, pCursor uintptr, pCtx uintptr, iCol int32)
// This routine implements the xFindFunction method for the FTS3
// virtual table.
-func fts5FindFunctionMethod(tls *libc.TLS, pVtab uintptr, nUnused int32, zName uintptr, pxFunc uintptr, ppArg uintptr) int32 { /* sqlite3.c:229037:12: */
+func fts5FindFunctionMethod(tls *libc.TLS, pVtab uintptr, nUnused int32, zName uintptr, pxFunc uintptr, ppArg uintptr) int32 { /* sqlite3.c:230313:12: */
var pTab uintptr = pVtab
var pAux uintptr
@@ -179409,12 +186849,12 @@ func fts5FindFunctionMethod(tls *libc.TLS, pVtab uintptr, nUnused int32, zName u
}
// Implementation of FTS5 xRename method. Rename an fts5 table.
-func fts5RenameMethod(tls *libc.TLS, pVtab uintptr, zName uintptr) int32 { /* sqlite3.c:229062:12: */
+func fts5RenameMethod(tls *libc.TLS, pVtab uintptr, zName uintptr) int32 { /* sqlite3.c:230338:12: */
var pTab uintptr = pVtab
return sqlite3Fts5StorageRename(tls, (*Fts5FullTable)(unsafe.Pointer(pTab)).FpStorage, zName)
}
-func sqlite3Fts5FlushToDisk(tls *libc.TLS, pTab uintptr) int32 { /* sqlite3.c:229070:12: */
+func sqlite3Fts5FlushToDisk(tls *libc.TLS, pTab uintptr) int32 { /* sqlite3.c:230346:12: */
fts5TripCursors(tls, pTab)
return sqlite3Fts5StorageSync(tls, (*Fts5FullTable)(unsafe.Pointer(pTab)).FpStorage)
}
@@ -179422,7 +186862,7 @@ func sqlite3Fts5FlushToDisk(tls *libc.TLS, pTab uintptr) int32 { /* sqlite3.c:22
// The xSavepoint() method.
//
// Flush the contents of the pending-terms table to disk.
-func fts5SavepointMethod(tls *libc.TLS, pVtab uintptr, iSavepoint int32) int32 { /* sqlite3.c:229080:12: */
+func fts5SavepointMethod(tls *libc.TLS, pVtab uintptr, iSavepoint int32) int32 { /* sqlite3.c:230356:12: */
_ = iSavepoint // Call below is a no-op for NDEBUG builds
return sqlite3Fts5FlushToDisk(tls, pVtab)
@@ -179431,7 +186871,7 @@ func fts5SavepointMethod(tls *libc.TLS, pVtab uintptr, iSavepoint int32) int32 {
// The xRelease() method.
//
// This is a no-op.
-func fts5ReleaseMethod(tls *libc.TLS, pVtab uintptr, iSavepoint int32) int32 { /* sqlite3.c:229091:12: */
+func fts5ReleaseMethod(tls *libc.TLS, pVtab uintptr, iSavepoint int32) int32 { /* sqlite3.c:230367:12: */
_ = iSavepoint // Call below is a no-op for NDEBUG builds
return sqlite3Fts5FlushToDisk(tls, pVtab)
@@ -179440,7 +186880,7 @@ func fts5ReleaseMethod(tls *libc.TLS, pVtab uintptr, iSavepoint int32) int32 { /
// The xRollbackTo() method.
//
// Discard the contents of the pending terms table.
-func fts5RollbackToMethod(tls *libc.TLS, pVtab uintptr, iSavepoint int32) int32 { /* sqlite3.c:229102:12: */
+func fts5RollbackToMethod(tls *libc.TLS, pVtab uintptr, iSavepoint int32) int32 { /* sqlite3.c:230378:12: */
var pTab uintptr = pVtab
_ = iSavepoint // Call below is a no-op for NDEBUG builds
@@ -179449,7 +186889,7 @@ func fts5RollbackToMethod(tls *libc.TLS, pVtab uintptr, iSavepoint int32) int32
}
// Register a new auxiliary function with global context pGlobal.
-func fts5CreateAux(tls *libc.TLS, pApi uintptr, zName uintptr, pUserData uintptr, xFunc Fts5_extension_function, xDestroy uintptr) int32 { /* sqlite3.c:229113:12: */
+func fts5CreateAux(tls *libc.TLS, pApi uintptr, zName uintptr, pUserData uintptr, xFunc Fts5_extension_function, xDestroy uintptr) int32 { /* sqlite3.c:230389:12: */
var pGlobal uintptr = pApi
var rc int32 = Xsqlite3_overload_function(tls, (*Fts5Global)(unsafe.Pointer(pGlobal)).Fdb, zName, -1)
if rc == SQLITE_OK {
@@ -179480,7 +186920,7 @@ func fts5CreateAux(tls *libc.TLS, pApi uintptr, zName uintptr, pUserData uintptr
// Register a new tokenizer. This is the implementation of the
// fts5_api.xCreateTokenizer() method.
-func fts5CreateTokenizer(tls *libc.TLS, pApi uintptr, zName uintptr, pUserData uintptr, pTokenizer uintptr, xDestroy uintptr) int32 { /* sqlite3.c:229152:12: */
+func fts5CreateTokenizer(tls *libc.TLS, pApi uintptr, zName uintptr, pUserData uintptr, pTokenizer uintptr, xDestroy uintptr) int32 { /* sqlite3.c:230428:12: */
var pGlobal uintptr = pApi
var pNew uintptr
var nName Sqlite3_int64 // Size of zName and its \0 terminator
@@ -179509,7 +186949,7 @@ func fts5CreateTokenizer(tls *libc.TLS, pApi uintptr, zName uintptr, pUserData u
return rc
}
-func fts5LocateTokenizer(tls *libc.TLS, pGlobal uintptr, zName uintptr) uintptr { /* sqlite3.c:229187:28: */
+func fts5LocateTokenizer(tls *libc.TLS, pGlobal uintptr, zName uintptr) uintptr { /* sqlite3.c:230463:28: */
var pMod uintptr = uintptr(0)
if zName == uintptr(0) {
@@ -179527,7 +186967,7 @@ func fts5LocateTokenizer(tls *libc.TLS, pGlobal uintptr, zName uintptr) uintptr
// Find a tokenizer. This is the implementation of the
// fts5_api.xFindTokenizer() method.
-func fts5FindTokenizer(tls *libc.TLS, pApi uintptr, zName uintptr, ppUserData uintptr, pTokenizer uintptr) int32 { /* sqlite3.c:229208:12: */
+func fts5FindTokenizer(tls *libc.TLS, pApi uintptr, zName uintptr, ppUserData uintptr, pTokenizer uintptr) int32 { /* sqlite3.c:230484:12: */
var rc int32 = SQLITE_OK
var pMod uintptr
@@ -179543,7 +186983,7 @@ func fts5FindTokenizer(tls *libc.TLS, pApi uintptr, zName uintptr, ppUserData ui
return rc
}
-func sqlite3Fts5GetTokenizer(tls *libc.TLS, pGlobal uintptr, azArg uintptr, nArg int32, pConfig uintptr, pzErr uintptr) int32 { /* sqlite3.c:229229:12: */
+func sqlite3Fts5GetTokenizer(tls *libc.TLS, pGlobal uintptr, azArg uintptr, nArg int32, pConfig uintptr, pzErr uintptr) int32 { /* sqlite3.c:230505:12: */
bp := tls.Alloc(8)
defer tls.Free(8)
@@ -179559,9 +186999,11 @@ func sqlite3Fts5GetTokenizer(tls *libc.TLS, pGlobal uintptr, azArg uintptr, nArg
if pMod == uintptr(0) {
rc = SQLITE_ERROR
- *(*uintptr)(unsafe.Pointer(pzErr)) = Xsqlite3_mprintf(tls, ts+32848 /* "no such tokenize..." */, libc.VaList(bp, *(*uintptr)(unsafe.Pointer(azArg))))
+ *(*uintptr)(unsafe.Pointer(pzErr)) = Xsqlite3_mprintf(tls, ts+33997 /* "no such tokenize..." */, libc.VaList(bp, *(*uintptr)(unsafe.Pointer(azArg))))
} else {
- rc = (*(*func(*libc.TLS, uintptr, uintptr, int32, uintptr) int32)(unsafe.Pointer((pMod + 16 /* &.x */ /* &.xCreate */))))(tls,
+ rc = (*struct {
+ f func(*libc.TLS, uintptr, uintptr, int32, uintptr) int32
+ })(unsafe.Pointer(&struct{ uintptr }{(*Fts5TokenizerModule)(unsafe.Pointer(pMod)).Fx.FxCreate})).f(tls,
(*Fts5TokenizerModule)(unsafe.Pointer(pMod)).FpUserData, func() uintptr {
if azArg != 0 {
return (azArg + 1*8)
@@ -179576,7 +187018,7 @@ func sqlite3Fts5GetTokenizer(tls *libc.TLS, pGlobal uintptr, azArg uintptr, nArg
(*Fts5Config)(unsafe.Pointer(pConfig)).FpTokApi = (pMod + 16 /* &.x */)
if rc != SQLITE_OK {
if pzErr != 0 {
- *(*uintptr)(unsafe.Pointer(pzErr)) = Xsqlite3_mprintf(tls, ts+32870 /* "error in tokeniz..." */, 0)
+ *(*uintptr)(unsafe.Pointer(pzErr)) = Xsqlite3_mprintf(tls, ts+34019 /* "error in tokeniz..." */, 0)
}
} else {
(*Fts5Config)(unsafe.Pointer(pConfig)).FePattern = sqlite3Fts5TokenizerPattern(tls,
@@ -179592,7 +187034,7 @@ func sqlite3Fts5GetTokenizer(tls *libc.TLS, pGlobal uintptr, azArg uintptr, nArg
return rc
}
-func fts5ModuleDestroy(tls *libc.TLS, pCtx uintptr) { /* sqlite3.c:229266:13: */
+func fts5ModuleDestroy(tls *libc.TLS, pCtx uintptr) { /* sqlite3.c:230542:13: */
var pTok uintptr
var pNextTok uintptr
var pAux uintptr
@@ -179602,7 +187044,7 @@ func fts5ModuleDestroy(tls *libc.TLS, pCtx uintptr) { /* sqlite3.c:229266:13: */
for pAux = (*Fts5Global)(unsafe.Pointer(pGlobal)).FpAux; pAux != 0; pAux = pNextAux {
pNextAux = (*Fts5Auxiliary)(unsafe.Pointer(pAux)).FpNext
if (*Fts5Auxiliary)(unsafe.Pointer(pAux)).FxDestroy != 0 {
- (*(*func(*libc.TLS, uintptr))(unsafe.Pointer((pAux + 32 /* &.xDestroy */))))(tls, (*Fts5Auxiliary)(unsafe.Pointer(pAux)).FpUserData)
+ (*struct{ f func(*libc.TLS, uintptr) })(unsafe.Pointer(&struct{ uintptr }{(*Fts5Auxiliary)(unsafe.Pointer(pAux)).FxDestroy})).f(tls, (*Fts5Auxiliary)(unsafe.Pointer(pAux)).FpUserData)
}
Xsqlite3_free(tls, pAux)
}
@@ -179610,7 +187052,7 @@ func fts5ModuleDestroy(tls *libc.TLS, pCtx uintptr) { /* sqlite3.c:229266:13: */
for pTok = (*Fts5Global)(unsafe.Pointer(pGlobal)).FpTok; pTok != 0; pTok = pNextTok {
pNextTok = (*Fts5TokenizerModule)(unsafe.Pointer(pTok)).FpNext
if (*Fts5TokenizerModule)(unsafe.Pointer(pTok)).FxDestroy != 0 {
- (*(*func(*libc.TLS, uintptr))(unsafe.Pointer((pTok + 40 /* &.xDestroy */))))(tls, (*Fts5TokenizerModule)(unsafe.Pointer(pTok)).FpUserData)
+ (*struct{ f func(*libc.TLS, uintptr) })(unsafe.Pointer(&struct{ uintptr }{(*Fts5TokenizerModule)(unsafe.Pointer(pTok)).FxDestroy})).f(tls, (*Fts5TokenizerModule)(unsafe.Pointer(pTok)).FpUserData)
}
Xsqlite3_free(tls, pTok)
}
@@ -179618,28 +187060,28 @@ func fts5ModuleDestroy(tls *libc.TLS, pCtx uintptr) { /* sqlite3.c:229266:13: */
Xsqlite3_free(tls, pGlobal)
}
-func fts5Fts5Func(tls *libc.TLS, pCtx uintptr, nArg int32, apArg uintptr) { /* sqlite3.c:229286:13: */
+func fts5Fts5Func(tls *libc.TLS, pCtx uintptr, nArg int32, apArg uintptr) { /* sqlite3.c:230562:13: */
var pGlobal uintptr = Xsqlite3_user_data(tls, pCtx)
var ppApi uintptr
_ = nArg
- ppApi = Xsqlite3_value_pointer(tls, *(*uintptr)(unsafe.Pointer(apArg)), ts+32901 /* "fts5_api_ptr" */)
+ ppApi = Xsqlite3_value_pointer(tls, *(*uintptr)(unsafe.Pointer(apArg)), ts+34050 /* "fts5_api_ptr" */)
if ppApi != 0 {
*(*uintptr)(unsafe.Pointer(ppApi)) = (pGlobal /* &.api */)
}
}
// Implementation of fts5_source_id() function.
-func fts5SourceIdFunc(tls *libc.TLS, pCtx uintptr, nArg int32, apUnused uintptr) { /* sqlite3.c:229302:13: */
+func fts5SourceIdFunc(tls *libc.TLS, pCtx uintptr, nArg int32, apUnused uintptr) { /* sqlite3.c:230578:13: */
_ = nArg
_ = apUnused
- Xsqlite3_result_text(tls, pCtx, ts+32914 /* "fts5: 2021-04-19..." */, -1, libc.UintptrFromInt32(-1))
+ Xsqlite3_result_text(tls, pCtx, ts+34063 /* "fts5: 2021-06-18..." */, -1, libc.UintptrFromInt32(-1))
}
// Return true if zName is the extension on one of the shadow tables used
// by this module.
-func fts5ShadowName(tls *libc.TLS, zName uintptr) int32 { /* sqlite3.c:229316:12: */
+func fts5ShadowName(tls *libc.TLS, zName uintptr) int32 { /* sqlite3.c:230592:12: */
var i uint32
for i = uint32(0); uint64(i) < (uint64(unsafe.Sizeof(azName2)) / uint64(unsafe.Sizeof(uintptr(0)))); i++ {
if Xsqlite3_stricmp(tls, zName, azName2[i]) == 0 {
@@ -179650,10 +187092,10 @@ func fts5ShadowName(tls *libc.TLS, zName uintptr) int32 { /* sqlite3.c:229316:12
}
var azName2 = [5]uintptr{
- ts + 33005 /* "config" */, ts + 30455 /* "content" */, ts + 22856 /* "data" */, ts + 30806 /* "docsize" */, ts + 9753, /* "idx" */
-} /* sqlite3.c:229317:21 */
+ ts + 34154 /* "config" */, ts + 32253 /* "content" */, ts + 23316 /* "data" */, ts + 32604 /* "docsize" */, ts + 10212, /* "idx" */
+} /* sqlite3.c:230593:21 */
-func fts5Init(tls *libc.TLS, db uintptr) int32 { /* sqlite3.c:229327:12: */
+func fts5Init(tls *libc.TLS, db uintptr) int32 { /* sqlite3.c:230603:12: */
var rc int32
var pGlobal uintptr = uintptr(0)
@@ -179674,7 +187116,7 @@ func fts5Init(tls *libc.TLS, db uintptr) int32 { /* sqlite3.c:229327:12: */
(*Fts5Global)(unsafe.Pointer(pGlobal)).Fapi.FxFindTokenizer = *(*uintptr)(unsafe.Pointer(&struct {
f func(*libc.TLS, uintptr, uintptr, uintptr, uintptr) int32
}{fts5FindTokenizer}))
- rc = Xsqlite3_create_module_v2(tls, db, ts+33012 /* "fts5" */, uintptr(unsafe.Pointer(&fts5Mod)), p, *(*uintptr)(unsafe.Pointer(&struct{ f func(*libc.TLS, uintptr) }{fts5ModuleDestroy})))
+ rc = Xsqlite3_create_module_v2(tls, db, ts+34161 /* "fts5" */, uintptr(unsafe.Pointer(&fts5Mod)), p, *(*uintptr)(unsafe.Pointer(&struct{ f func(*libc.TLS, uintptr) }{fts5ModuleDestroy})))
if rc == SQLITE_OK {
rc = sqlite3Fts5IndexInit(tls, db)
}
@@ -179692,13 +187134,13 @@ func fts5Init(tls *libc.TLS, db uintptr) int32 { /* sqlite3.c:229327:12: */
}
if rc == SQLITE_OK {
rc = Xsqlite3_create_function(tls,
- db, ts+33012 /* "fts5" */, 1, SQLITE_UTF8, p, *(*uintptr)(unsafe.Pointer(&struct {
+ db, ts+34161 /* "fts5" */, 1, SQLITE_UTF8, p, *(*uintptr)(unsafe.Pointer(&struct {
f func(*libc.TLS, uintptr, int32, uintptr)
}{fts5Fts5Func})), uintptr(0), uintptr(0))
}
if rc == SQLITE_OK {
rc = Xsqlite3_create_function(tls,
- db, ts+33017 /* "fts5_source_id" */, 0, SQLITE_UTF8, p, *(*uintptr)(unsafe.Pointer(&struct {
+ db, ts+34166 /* "fts5_source_id" */, 0, SQLITE_UTF8, p, *(*uintptr)(unsafe.Pointer(&struct {
f func(*libc.TLS, uintptr, int32, uintptr)
}{fts5SourceIdFunc})), uintptr(0), uintptr(0))
}
@@ -179736,7 +187178,7 @@ var fts5Mod = Sqlite3_module{
/* xRelease */ FxRelease: 0,
/* xRollbackTo */ FxRollbackTo: 0,
/* xShadowName */ FxShadowName: 0,
-} /* sqlite3.c:229328:31 */
+} /* sqlite3.c:230604:31 */
// The following functions are used to register the module with SQLite. If
// this module is being built as part of the SQLite core (SQLITE_CORE is
@@ -179745,7 +187187,7 @@ var fts5Mod = Sqlite3_module{
// Or, if this module is being built as a loadable extension,
// sqlite3Fts5Init() is omitted and the two standard entry points
// sqlite3_fts_init() and sqlite3_fts5_init() defined instead.
-func Xsqlite3Fts5Init(tls *libc.TLS, db uintptr) int32 { /* sqlite3.c:229436:20: */
+func Xsqlite3Fts5Init(tls *libc.TLS, db uintptr) int32 { /* sqlite3.c:230712:20: */
return fts5Init(tls, db)
}
@@ -179753,7 +187195,7 @@ func Xsqlite3Fts5Init(tls *libc.TLS, db uintptr) int32 { /* sqlite3.c:229436:20:
// Fts5Storage.pInsertDocsize - if they have not already been prepared.
// Return SQLITE_OK if successful, or an SQLite error code if an error
// occurs.
-func fts5StorageGetStmt(tls *libc.TLS, p uintptr, eStmt int32, ppStmt uintptr, pzErrMsg uintptr) int32 { /* sqlite3.c:229494:12: */
+func fts5StorageGetStmt(tls *libc.TLS, p uintptr, eStmt int32, ppStmt uintptr, pzErrMsg uintptr) int32 { /* sqlite3.c:230770:12: */
bp := tls.Alloc(216)
defer tls.Free(216)
@@ -179764,20 +187206,20 @@ func fts5StorageGetStmt(tls *libc.TLS, p uintptr, eStmt int32, ppStmt uintptr, p
if *(*uintptr)(unsafe.Pointer((p + 40 /* &.aStmt */) + uintptr(eStmt)*8)) == uintptr(0) {
*(*[11]uintptr)(unsafe.Pointer(bp + 128 /* azStmt */)) = [11]uintptr{
- ts + 33032, /* "SELECT %s FROM %..." */
- ts + 33100, /* "SELECT %s FROM %..." */
- ts + 33169, /* "SELECT %s FROM %..." */ // LOOKUP
+ ts + 34181, /* "SELECT %s FROM %..." */
+ ts + 34249, /* "SELECT %s FROM %..." */
+ ts + 34318, /* "SELECT %s FROM %..." */ // LOOKUP
- ts + 33202, /* "INSERT INTO %Q.'..." */ // INSERT_CONTENT
- ts + 33241, /* "REPLACE INTO %Q...." */ // REPLACE_CONTENT
- ts + 33281, /* "DELETE FROM %Q.'..." */ // DELETE_CONTENT
- ts + 33320, /* "REPLACE INTO %Q...." */ // REPLACE_DOCSIZE
- ts + 33361, /* "DELETE FROM %Q.'..." */ // DELETE_DOCSIZE
+ ts + 34351, /* "INSERT INTO %Q.'..." */ // INSERT_CONTENT
+ ts + 34390, /* "REPLACE INTO %Q...." */ // REPLACE_CONTENT
+ ts + 34430, /* "DELETE FROM %Q.'..." */ // DELETE_CONTENT
+ ts + 34469, /* "REPLACE INTO %Q...." */ // REPLACE_DOCSIZE
+ ts + 34510, /* "DELETE FROM %Q.'..." */ // DELETE_DOCSIZE
- ts + 33400, /* "SELECT sz FROM %..." */ // LOOKUP_DOCSIZE
+ ts + 34549, /* "SELECT sz FROM %..." */ // LOOKUP_DOCSIZE
- ts + 33442, /* "REPLACE INTO %Q...." */ // REPLACE_CONFIG
- ts + 33482, /* "SELECT %s FROM %..." */ // SCAN
+ ts + 34591, /* "REPLACE INTO %Q...." */ // REPLACE_CONFIG
+ ts + 34631, /* "SELECT %s FROM %..." */ // SCAN
}
var pC uintptr = (*Fts5Storage)(unsafe.Pointer(p)).FpConfig
var zSql uintptr = uintptr(0)
@@ -179815,10 +187257,10 @@ func fts5StorageGetStmt(tls *libc.TLS, p uintptr, eStmt int32, ppStmt uintptr, p
zBind = Xsqlite3_malloc64(tls, (uint64(1 + (nCol * 2))))
if zBind != 0 {
for i = 0; i < nCol; i++ {
- *(*int8)(unsafe.Pointer(zBind + uintptr((i * 2)))) = int8('?')
- *(*int8)(unsafe.Pointer(zBind + uintptr(((i * 2) + 1)))) = int8(',')
+ *(*uint8)(unsafe.Pointer(zBind + uintptr((i * 2)))) = uint8('?')
+ *(*uint8)(unsafe.Pointer(zBind + uintptr(((i * 2) + 1)))) = uint8(',')
}
- *(*int8)(unsafe.Pointer(zBind + uintptr(((i * 2) - 1)))) = int8(0)
+ *(*uint8)(unsafe.Pointer(zBind + uintptr(((i * 2) - 1)))) = uint8(0)
zSql = Xsqlite3_mprintf(tls, *(*uintptr)(unsafe.Pointer(bp + 128 /* &azStmt[0] */ + uintptr(eStmt)*8)), libc.VaList(bp+80, (*Fts5Config)(unsafe.Pointer(pC)).FzDb, (*Fts5Config)(unsafe.Pointer(pC)).FzName, zBind))
Xsqlite3_free(tls, zBind)
}
@@ -179844,7 +187286,7 @@ func fts5StorageGetStmt(tls *libc.TLS, p uintptr, eStmt int32, ppStmt uintptr, p
(*Fts5Config)(unsafe.Pointer((*Fts5Storage)(unsafe.Pointer(p)).FpConfig)).FbLock--
Xsqlite3_free(tls, zSql)
if (rc != SQLITE_OK) && (pzErrMsg != 0) {
- *(*uintptr)(unsafe.Pointer(pzErrMsg)) = Xsqlite3_mprintf(tls, ts+2718 /* "%s" */, libc.VaList(bp+120, Xsqlite3_errmsg(tls, (*Fts5Config)(unsafe.Pointer(pC)).Fdb)))
+ *(*uintptr)(unsafe.Pointer(pzErrMsg)) = Xsqlite3_mprintf(tls, ts+2790 /* "%s" */, libc.VaList(bp+120, Xsqlite3_errmsg(tls, (*Fts5Config)(unsafe.Pointer(pC)).Fdb)))
}
}
}
@@ -179854,7 +187296,7 @@ func fts5StorageGetStmt(tls *libc.TLS, p uintptr, eStmt int32, ppStmt uintptr, p
return rc
}
-func fts5ExecPrintf(tls *libc.TLS, db uintptr, pzErr uintptr, zFormat uintptr, va uintptr) int32 { /* sqlite3.c:229597:12: */
+func fts5ExecPrintf(tls *libc.TLS, db uintptr, pzErr uintptr, zFormat uintptr, va uintptr) int32 { /* sqlite3.c:230873:12: */
var rc int32
var ap Va_list
_ = ap // ... printf arguments
@@ -179876,79 +187318,79 @@ func fts5ExecPrintf(tls *libc.TLS, db uintptr, pzErr uintptr, zFormat uintptr, v
// Drop all shadow tables. Return SQLITE_OK if successful or an SQLite error
// code otherwise.
-func sqlite3Fts5DropAll(tls *libc.TLS, pConfig uintptr) int32 { /* sqlite3.c:229625:12: */
+func sqlite3Fts5DropAll(tls *libc.TLS, pConfig uintptr) int32 { /* sqlite3.c:230901:12: */
bp := tls.Alloc(80)
defer tls.Free(80)
var rc int32 = fts5ExecPrintf(tls, (*Fts5Config)(unsafe.Pointer(pConfig)).Fdb, uintptr(0),
- ts+33505, /* "DROP TABLE IF EX..." */
+ ts+34654, /* "DROP TABLE IF EX..." */
libc.VaList(bp, (*Fts5Config)(unsafe.Pointer(pConfig)).FzDb, (*Fts5Config)(unsafe.Pointer(pConfig)).FzName,
(*Fts5Config)(unsafe.Pointer(pConfig)).FzDb, (*Fts5Config)(unsafe.Pointer(pConfig)).FzName,
(*Fts5Config)(unsafe.Pointer(pConfig)).FzDb, (*Fts5Config)(unsafe.Pointer(pConfig)).FzName))
if (rc == SQLITE_OK) && ((*Fts5Config)(unsafe.Pointer(pConfig)).FbColumnsize != 0) {
rc = fts5ExecPrintf(tls, (*Fts5Config)(unsafe.Pointer(pConfig)).Fdb, uintptr(0),
- ts+33609, /* "DROP TABLE IF EX..." */
+ ts+34758, /* "DROP TABLE IF EX..." */
libc.VaList(bp+48, (*Fts5Config)(unsafe.Pointer(pConfig)).FzDb, (*Fts5Config)(unsafe.Pointer(pConfig)).FzName))
}
if (rc == SQLITE_OK) && ((*Fts5Config)(unsafe.Pointer(pConfig)).FeContent == FTS5_CONTENT_NORMAL) {
rc = fts5ExecPrintf(tls, (*Fts5Config)(unsafe.Pointer(pConfig)).Fdb, uintptr(0),
- ts+33647, /* "DROP TABLE IF EX..." */
+ ts+34796, /* "DROP TABLE IF EX..." */
libc.VaList(bp+64, (*Fts5Config)(unsafe.Pointer(pConfig)).FzDb, (*Fts5Config)(unsafe.Pointer(pConfig)).FzName))
}
return rc
}
-func fts5StorageRenameOne(tls *libc.TLS, pConfig uintptr, pRc uintptr, zTail uintptr, zName uintptr) { /* sqlite3.c:229649:13: */
+func fts5StorageRenameOne(tls *libc.TLS, pConfig uintptr, pRc uintptr, zTail uintptr, zName uintptr) { /* sqlite3.c:230925:13: */
bp := tls.Alloc(40)
defer tls.Free(40)
if *(*int32)(unsafe.Pointer(pRc)) == SQLITE_OK {
*(*int32)(unsafe.Pointer(pRc)) = fts5ExecPrintf(tls, (*Fts5Config)(unsafe.Pointer(pConfig)).Fdb, uintptr(0),
- ts+33685, /* "ALTER TABLE %Q.'..." */
+ ts+34834, /* "ALTER TABLE %Q.'..." */
libc.VaList(bp, (*Fts5Config)(unsafe.Pointer(pConfig)).FzDb, (*Fts5Config)(unsafe.Pointer(pConfig)).FzName, zTail, zName, zTail))
}
}
-func sqlite3Fts5StorageRename(tls *libc.TLS, pStorage uintptr, zName uintptr) int32 { /* sqlite3.c:229663:12: */
+func sqlite3Fts5StorageRename(tls *libc.TLS, pStorage uintptr, zName uintptr) int32 { /* sqlite3.c:230939:12: */
bp := tls.Alloc(4)
defer tls.Free(4)
var pConfig uintptr = (*Fts5Storage)(unsafe.Pointer(pStorage)).FpConfig
*(*int32)(unsafe.Pointer(bp /* rc */)) = sqlite3Fts5StorageSync(tls, pStorage)
- fts5StorageRenameOne(tls, pConfig, bp /* &rc */, ts+22856 /* "data" */, zName)
- fts5StorageRenameOne(tls, pConfig, bp /* &rc */, ts+9753 /* "idx" */, zName)
- fts5StorageRenameOne(tls, pConfig, bp /* &rc */, ts+33005 /* "config" */, zName)
+ fts5StorageRenameOne(tls, pConfig, bp /* &rc */, ts+23316 /* "data" */, zName)
+ fts5StorageRenameOne(tls, pConfig, bp /* &rc */, ts+10212 /* "idx" */, zName)
+ fts5StorageRenameOne(tls, pConfig, bp /* &rc */, ts+34154 /* "config" */, zName)
if (*Fts5Config)(unsafe.Pointer(pConfig)).FbColumnsize != 0 {
- fts5StorageRenameOne(tls, pConfig, bp /* &rc */, ts+30806 /* "docsize" */, zName)
+ fts5StorageRenameOne(tls, pConfig, bp /* &rc */, ts+32604 /* "docsize" */, zName)
}
if (*Fts5Config)(unsafe.Pointer(pConfig)).FeContent == FTS5_CONTENT_NORMAL {
- fts5StorageRenameOne(tls, pConfig, bp /* &rc */, ts+30455 /* "content" */, zName)
+ fts5StorageRenameOne(tls, pConfig, bp /* &rc */, ts+32253 /* "content" */, zName)
}
return *(*int32)(unsafe.Pointer(bp /* rc */))
}
// Create the shadow table named zPost, with definition zDefn. Return
// SQLITE_OK if successful, or an SQLite error code otherwise.
-func sqlite3Fts5CreateTable(tls *libc.TLS, pConfig uintptr, zPost uintptr, zDefn uintptr, bWithout int32, pzErr uintptr) int32 { /* sqlite3.c:229683:12: */
+func sqlite3Fts5CreateTable(tls *libc.TLS, pConfig uintptr, zPost uintptr, zDefn uintptr, bWithout int32, pzErr uintptr) int32 { /* sqlite3.c:230959:12: */
bp := tls.Alloc(72)
defer tls.Free(72)
var rc int32
*(*uintptr)(unsafe.Pointer(bp + 64 /* zErr */)) = uintptr(0)
- rc = fts5ExecPrintf(tls, (*Fts5Config)(unsafe.Pointer(pConfig)).Fdb, bp+64 /* &zErr */, ts+33727, /* "CREATE TABLE %Q...." */
+ rc = fts5ExecPrintf(tls, (*Fts5Config)(unsafe.Pointer(pConfig)).Fdb, bp+64 /* &zErr */, ts+34876, /* "CREATE TABLE %Q...." */
libc.VaList(bp, (*Fts5Config)(unsafe.Pointer(pConfig)).FzDb, (*Fts5Config)(unsafe.Pointer(pConfig)).FzName, zPost, zDefn,
func() uintptr {
if bWithout != 0 {
- return ts + 27471 /* " WITHOUT ROWID" */
+ return ts + 27931 /* " WITHOUT ROWID" */
}
- return ts + 703 /* "" */
+ return ts + 755 /* "" */
}()))
if *(*uintptr)(unsafe.Pointer(bp + 64 /* zErr */)) != 0 {
*(*uintptr)(unsafe.Pointer(pzErr)) = Xsqlite3_mprintf(tls,
- ts+33757, /* "fts5: error crea..." */
+ ts+34906, /* "fts5: error crea..." */
libc.VaList(bp+40, (*Fts5Config)(unsafe.Pointer(pConfig)).FzName, zPost, *(*uintptr)(unsafe.Pointer(bp + 64 /* zErr */))))
Xsqlite3_free(tls, *(*uintptr)(unsafe.Pointer(bp + 64 /* zErr */)))
}
@@ -179961,7 +187403,7 @@ func sqlite3Fts5CreateTable(tls *libc.TLS, pConfig uintptr, zPost uintptr, zDefn
//
// If successful, set *pp to point to the new object and return SQLITE_OK.
// Otherwise, set *pp to NULL and return an SQLite error code.
-func sqlite3Fts5StorageOpen(tls *libc.TLS, pConfig uintptr, pIndex uintptr, bCreate int32, pp uintptr, pzErr uintptr) int32 { /* sqlite3.c:229718:12: */
+func sqlite3Fts5StorageOpen(tls *libc.TLS, pConfig uintptr, pIndex uintptr, bCreate int32, pp uintptr, pzErr uintptr) int32 { /* sqlite3.c:230994:12: */
bp := tls.Alloc(8)
defer tls.Free(8)
@@ -179990,27 +187432,27 @@ func sqlite3Fts5StorageOpen(tls *libc.TLS, pConfig uintptr, pIndex uintptr, bCre
} else {
var i int32
var iOff int32
- Xsqlite3_snprintf(tls, nDefn, zDefn, ts+33801 /* "id INTEGER PRIMA..." */, 0)
+ Xsqlite3_snprintf(tls, nDefn, zDefn, ts+34950 /* "id INTEGER PRIMA..." */, 0)
iOff = int32(libc.Xstrlen(tls, zDefn))
for i = 0; i < (*Fts5Config)(unsafe.Pointer(pConfig)).FnCol; i++ {
- Xsqlite3_snprintf(tls, (nDefn - iOff), (zDefn + uintptr(iOff)), ts+33824 /* ", c%d" */, libc.VaList(bp, i))
+ Xsqlite3_snprintf(tls, (nDefn - iOff), (zDefn + uintptr(iOff)), ts+34973 /* ", c%d" */, libc.VaList(bp, i))
iOff = iOff + (int32(libc.Xstrlen(tls, (zDefn + uintptr(iOff)))))
}
- rc = sqlite3Fts5CreateTable(tls, pConfig, ts+30455 /* "content" */, zDefn, 0, pzErr)
+ rc = sqlite3Fts5CreateTable(tls, pConfig, ts+32253 /* "content" */, zDefn, 0, pzErr)
}
Xsqlite3_free(tls, zDefn)
}
if (rc == SQLITE_OK) && ((*Fts5Config)(unsafe.Pointer(pConfig)).FbColumnsize != 0) {
rc = sqlite3Fts5CreateTable(tls,
- pConfig, ts+30806 /* "docsize" */, ts+33830 /* "id INTEGER PRIMA..." */, 0, pzErr)
+ pConfig, ts+32604 /* "docsize" */, ts+34979 /* "id INTEGER PRIMA..." */, 0, pzErr)
}
if rc == SQLITE_OK {
rc = sqlite3Fts5CreateTable(tls,
- pConfig, ts+33005 /* "config" */, ts+33862 /* "k PRIMARY KEY, v" */, 1, pzErr)
+ pConfig, ts+34154 /* "config" */, ts+35011 /* "k PRIMARY KEY, v" */, 1, pzErr)
}
if rc == SQLITE_OK {
- rc = sqlite3Fts5StorageConfigValue(tls, p, ts+30952 /* "version" */, uintptr(0), FTS5_CURRENT_VERSION)
+ rc = sqlite3Fts5StorageConfigValue(tls, p, ts+32750 /* "version" */, uintptr(0), FTS5_CURRENT_VERSION)
}
}
@@ -180022,7 +187464,7 @@ func sqlite3Fts5StorageOpen(tls *libc.TLS, pConfig uintptr, pIndex uintptr, bCre
}
// Close a handle opened by an earlier call to sqlite3Fts5StorageOpen().
-func sqlite3Fts5StorageClose(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:229784:12: */
+func sqlite3Fts5StorageClose(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:231060:12: */
var rc int32 = SQLITE_OK
if p != 0 {
var i int32
@@ -180041,12 +187483,12 @@ type Fts5InsertCtx1 = struct {
FpStorage uintptr
FiCol int32
FszCol int32
-} /* sqlite3.c:229799:9 */
+} /* sqlite3.c:231075:9 */
-type Fts5InsertCtx = Fts5InsertCtx1 /* sqlite3.c:229799:30 */
+type Fts5InsertCtx = Fts5InsertCtx1 /* sqlite3.c:231075:30 */
// Tokenization callback used when inserting tokens into the FTS index.
-func fts5StorageInsertCallback(tls *libc.TLS, pContext uintptr, tflags int32, pToken uintptr, nToken int32, iUnused1 int32, iUnused2 int32) int32 { /* sqlite3.c:229809:12: */
+func fts5StorageInsertCallback(tls *libc.TLS, pContext uintptr, tflags int32, pToken uintptr, nToken int32, iUnused1 int32, iUnused2 int32) int32 { /* sqlite3.c:231085:12: */
var pCtx uintptr = pContext
var pIdx uintptr = (*Fts5Storage)(unsafe.Pointer((*Fts5InsertCtx)(unsafe.Pointer(pCtx)).FpStorage)).FpIndex
_ = iUnused1
@@ -180063,7 +187505,7 @@ func fts5StorageInsertCallback(tls *libc.TLS, pContext uintptr, tflags int32, pT
// If a row with rowid iDel is present in the %_content table, add the
// delete-markers to the FTS index necessary to delete it. Do not actually
// remove the %_content row at this time though.
-func fts5StorageDeleteFromIndex(tls *libc.TLS, p uintptr, iDel I64, apVal uintptr) int32 { /* sqlite3.c:229832:12: */
+func fts5StorageDeleteFromIndex(tls *libc.TLS, p uintptr, iDel I64, apVal uintptr) int32 { /* sqlite3.c:231108:12: */
bp := tls.Alloc(24)
defer tls.Free(24)
@@ -180129,7 +187571,7 @@ func fts5StorageDeleteFromIndex(tls *libc.TLS, p uintptr, iDel I64, apVal uintpt
//
// If there is no %_docsize table (as happens if the columnsize=0 option
// is specified when the FTS5 table is created), this function is a no-op.
-func fts5StorageInsertDocsize(tls *libc.TLS, p uintptr, iRowid I64, pBuf uintptr) int32 { /* sqlite3.c:229897:12: */
+func fts5StorageInsertDocsize(tls *libc.TLS, p uintptr, iRowid I64, pBuf uintptr) int32 { /* sqlite3.c:231173:12: */
bp := tls.Alloc(8)
defer tls.Free(8)
@@ -180156,7 +187598,7 @@ func fts5StorageInsertDocsize(tls *libc.TLS, p uintptr, iRowid I64, pBuf uintptr
//
// Return SQLITE_OK if successful, or an SQLite error code if an error
// occurs.
-func fts5StorageLoadTotals(tls *libc.TLS, p uintptr, bCache int32) int32 { /* sqlite3.c:229927:12: */
+func fts5StorageLoadTotals(tls *libc.TLS, p uintptr, bCache int32) int32 { /* sqlite3.c:231203:12: */
var rc int32 = SQLITE_OK
if (*Fts5Storage)(unsafe.Pointer(p)).FbTotalsValid == 0 {
rc = sqlite3Fts5IndexGetAverages(tls, (*Fts5Storage)(unsafe.Pointer(p)).FpIndex, (p + 24 /* &.nTotalRow */), (*Fts5Storage)(unsafe.Pointer(p)).FaTotalSize)
@@ -180170,7 +187612,7 @@ func fts5StorageLoadTotals(tls *libc.TLS, p uintptr, bCache int32) int32 { /* sq
//
// Return SQLITE_OK if successful, or an SQLite error code if an error
// occurs.
-func fts5StorageSaveTotals(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:229943:12: */
+func fts5StorageSaveTotals(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:231219:12: */
bp := tls.Alloc(20)
defer tls.Free(20)
@@ -180194,7 +187636,7 @@ func fts5StorageSaveTotals(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:229943
}
// Remove a row from the FTS table.
-func sqlite3Fts5StorageDelete(tls *libc.TLS, p uintptr, iDel I64, apVal uintptr) int32 { /* sqlite3.c:229965:12: */
+func sqlite3Fts5StorageDelete(tls *libc.TLS, p uintptr, iDel I64, apVal uintptr) int32 { /* sqlite3.c:231241:12: */
bp := tls.Alloc(8)
defer tls.Free(8)
@@ -180235,7 +187677,7 @@ func sqlite3Fts5StorageDelete(tls *libc.TLS, p uintptr, iDel I64, apVal uintptr)
}
// Delete all entries in the FTS5 index.
-func sqlite3Fts5StorageDeleteAll(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:230006:12: */
+func sqlite3Fts5StorageDeleteAll(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:231282:12: */
bp := tls.Alloc(48)
defer tls.Free(48)
@@ -180247,12 +187689,12 @@ func sqlite3Fts5StorageDeleteAll(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:
// Delete the contents of the %_data and %_docsize tables.
rc = fts5ExecPrintf(tls, (*Fts5Config)(unsafe.Pointer(pConfig)).Fdb, uintptr(0),
- ts+33879, /* "DELETE FROM %Q.'..." */
+ ts+35028, /* "DELETE FROM %Q.'..." */
libc.VaList(bp, (*Fts5Config)(unsafe.Pointer(pConfig)).FzDb, (*Fts5Config)(unsafe.Pointer(pConfig)).FzName,
(*Fts5Config)(unsafe.Pointer(pConfig)).FzDb, (*Fts5Config)(unsafe.Pointer(pConfig)).FzName))
if (rc == SQLITE_OK) && ((*Fts5Config)(unsafe.Pointer(pConfig)).FbColumnsize != 0) {
rc = fts5ExecPrintf(tls, (*Fts5Config)(unsafe.Pointer(pConfig)).Fdb, uintptr(0),
- ts+33929, /* "DELETE FROM %Q.'..." */
+ ts+35078, /* "DELETE FROM %Q.'..." */
libc.VaList(bp+32, (*Fts5Config)(unsafe.Pointer(pConfig)).FzDb, (*Fts5Config)(unsafe.Pointer(pConfig)).FzName))
}
@@ -180262,12 +187704,12 @@ func sqlite3Fts5StorageDeleteAll(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:
rc = sqlite3Fts5IndexReinit(tls, (*Fts5Storage)(unsafe.Pointer(p)).FpIndex)
}
if rc == SQLITE_OK {
- rc = sqlite3Fts5StorageConfigValue(tls, p, ts+30952 /* "version" */, uintptr(0), FTS5_CURRENT_VERSION)
+ rc = sqlite3Fts5StorageConfigValue(tls, p, ts+32750 /* "version" */, uintptr(0), FTS5_CURRENT_VERSION)
}
return rc
}
-func sqlite3Fts5StorageRebuild(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:230037:12: */
+func sqlite3Fts5StorageRebuild(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:231313:12: */
bp := tls.Alloc(44)
defer tls.Free(44)
@@ -180331,15 +187773,15 @@ func sqlite3Fts5StorageRebuild(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:23
return *(*int32)(unsafe.Pointer(bp + 40 /* rc */))
}
-func sqlite3Fts5StorageOptimize(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:230092:12: */
+func sqlite3Fts5StorageOptimize(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:231368:12: */
return sqlite3Fts5IndexOptimize(tls, (*Fts5Storage)(unsafe.Pointer(p)).FpIndex)
}
-func sqlite3Fts5StorageMerge(tls *libc.TLS, p uintptr, nMerge int32) int32 { /* sqlite3.c:230096:12: */
+func sqlite3Fts5StorageMerge(tls *libc.TLS, p uintptr, nMerge int32) int32 { /* sqlite3.c:231372:12: */
return sqlite3Fts5IndexMerge(tls, (*Fts5Storage)(unsafe.Pointer(p)).FpIndex, nMerge)
}
-func sqlite3Fts5StorageReset(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:230100:12: */
+func sqlite3Fts5StorageReset(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:231376:12: */
return sqlite3Fts5IndexReset(tls, (*Fts5Storage)(unsafe.Pointer(p)).FpIndex)
}
@@ -180350,7 +187792,7 @@ func sqlite3Fts5StorageReset(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:2301
//
// If the %_docsize table does not exist, SQLITE_MISMATCH is returned. In
// this case the user is required to provide a rowid explicitly.
-func fts5StorageNewRowid(tls *libc.TLS, p uintptr, piRowid uintptr) int32 { /* sqlite3.c:230113:12: */
+func fts5StorageNewRowid(tls *libc.TLS, p uintptr, piRowid uintptr) int32 { /* sqlite3.c:231389:12: */
bp := tls.Alloc(8)
defer tls.Free(8)
@@ -180372,7 +187814,7 @@ func fts5StorageNewRowid(tls *libc.TLS, p uintptr, piRowid uintptr) int32 { /* s
}
// Insert a new row into the FTS content table.
-func sqlite3Fts5StorageContentInsert(tls *libc.TLS, p uintptr, apVal uintptr, piRowid uintptr) int32 { /* sqlite3.c:230134:12: */
+func sqlite3Fts5StorageContentInsert(tls *libc.TLS, p uintptr, apVal uintptr, piRowid uintptr) int32 { /* sqlite3.c:231410:12: */
bp := tls.Alloc(8)
defer tls.Free(8)
@@ -180404,7 +187846,7 @@ func sqlite3Fts5StorageContentInsert(tls *libc.TLS, p uintptr, apVal uintptr, pi
}
// Insert new entries into the FTS index and %_docsize table.
-func sqlite3Fts5StorageIndexInsert(tls *libc.TLS, p uintptr, apVal uintptr, iRowid I64) int32 { /* sqlite3.c:230169:12: */
+func sqlite3Fts5StorageIndexInsert(tls *libc.TLS, p uintptr, apVal uintptr, iRowid I64) int32 { /* sqlite3.c:231445:12: */
bp := tls.Alloc(36)
defer tls.Free(36)
@@ -180449,7 +187891,7 @@ func sqlite3Fts5StorageIndexInsert(tls *libc.TLS, p uintptr, apVal uintptr, iRow
return *(*int32)(unsafe.Pointer(bp + 32 /* rc */))
}
-func fts5StorageCount(tls *libc.TLS, p uintptr, zSuffix uintptr, pnRow uintptr) int32 { /* sqlite3.c:230212:12: */
+func fts5StorageCount(tls *libc.TLS, p uintptr, zSuffix uintptr, pnRow uintptr) int32 { /* sqlite3.c:231488:12: */
bp := tls.Alloc(32)
defer tls.Free(32)
@@ -180457,7 +187899,7 @@ func fts5StorageCount(tls *libc.TLS, p uintptr, zSuffix uintptr, pnRow uintptr)
var zSql uintptr
var rc int32
- zSql = Xsqlite3_mprintf(tls, ts+33958, /* "SELECT count(*) ..." */
+ zSql = Xsqlite3_mprintf(tls, ts+35107, /* "SELECT count(*) ..." */
libc.VaList(bp, (*Fts5Config)(unsafe.Pointer(pConfig)).FzDb, (*Fts5Config)(unsafe.Pointer(pConfig)).FzName, zSuffix))
if zSql == uintptr(0) {
rc = SQLITE_NOMEM
@@ -180484,13 +187926,13 @@ type Fts5IntegrityCtx1 = struct {
Fcksum U64
FpTermset uintptr
FpConfig uintptr
-} /* sqlite3.c:230240:9 */
+} /* sqlite3.c:231516:9 */
// Context object used by sqlite3Fts5StorageIntegrity().
-type Fts5IntegrityCtx = Fts5IntegrityCtx1 /* sqlite3.c:230240:33 */
+type Fts5IntegrityCtx = Fts5IntegrityCtx1 /* sqlite3.c:231516:33 */
// Tokenization callback used by integrity check.
-func fts5StorageIntegrityCallback(tls *libc.TLS, pContext uintptr, tflags int32, pToken uintptr, nToken int32, iUnused1 int32, iUnused2 int32) int32 { /* sqlite3.c:230254:12: */
+func fts5StorageIntegrityCallback(tls *libc.TLS, pContext uintptr, tflags int32, pToken uintptr, nToken int32, iUnused1 int32, iUnused2 int32) int32 { /* sqlite3.c:231530:12: */
bp := tls.Alloc(4)
defer tls.Free(4)
@@ -180556,7 +187998,7 @@ func fts5StorageIntegrityCallback(tls *libc.TLS, pContext uintptr, tflags int32,
// table. Return SQLITE_OK if they do, or SQLITE_CORRUPT if not. Return
// some other SQLite error code if an error occurs while attempting to
// determine this.
-func sqlite3Fts5StorageIntegrity(tls *libc.TLS, p uintptr, iArg int32) int32 { /* sqlite3.c:230324:12: */
+func sqlite3Fts5StorageIntegrity(tls *libc.TLS, p uintptr, iArg int32) int32 { /* sqlite3.c:231600:12: */
bp := tls.Alloc(64)
defer tls.Free(64)
@@ -180654,14 +188096,14 @@ func sqlite3Fts5StorageIntegrity(tls *libc.TLS, p uintptr, iArg int32) int32 { /
// number of rows.
if (rc == SQLITE_OK) && ((*Fts5Config)(unsafe.Pointer(pConfig)).FeContent == FTS5_CONTENT_NORMAL) {
*(*I64)(unsafe.Pointer(bp + 48 /* nRow */)) = int64(0)
- rc = fts5StorageCount(tls, p, ts+30455 /* "content" */, bp+48 /* &nRow */)
+ rc = fts5StorageCount(tls, p, ts+32253 /* "content" */, bp+48 /* &nRow */)
if (rc == SQLITE_OK) && (*(*I64)(unsafe.Pointer(bp + 48 /* nRow */)) != (*Fts5Storage)(unsafe.Pointer(p)).FnTotalRow) {
rc = (SQLITE_CORRUPT | (int32(1) << 8))
}
}
if (rc == SQLITE_OK) && ((*Fts5Config)(unsafe.Pointer(pConfig)).FbColumnsize != 0) {
*(*I64)(unsafe.Pointer(bp + 56 /* nRow */)) = int64(0)
- rc = fts5StorageCount(tls, p, ts+30806 /* "docsize" */, bp+56 /* &nRow */)
+ rc = fts5StorageCount(tls, p, ts+32604 /* "docsize" */, bp+56 /* &nRow */)
if (rc == SQLITE_OK) && (*(*I64)(unsafe.Pointer(bp + 56 /* nRow */)) != (*Fts5Storage)(unsafe.Pointer(p)).FnTotalRow) {
rc = (SQLITE_CORRUPT | (int32(1) << 8))
}
@@ -180681,7 +188123,7 @@ func sqlite3Fts5StorageIntegrity(tls *libc.TLS, p uintptr, iArg int32) int32 { /
// Obtain an SQLite statement handle that may be used to read data from the
// %_content table.
-func sqlite3Fts5StorageStmt(tls *libc.TLS, p uintptr, eStmt int32, pp uintptr, pzErrMsg uintptr) int32 { /* sqlite3.c:230432:12: */
+func sqlite3Fts5StorageStmt(tls *libc.TLS, p uintptr, eStmt int32, pp uintptr, pzErrMsg uintptr) int32 { /* sqlite3.c:231708:12: */
var rc int32
rc = fts5StorageGetStmt(tls, p, eStmt, pp, pzErrMsg)
@@ -180695,7 +188137,7 @@ func sqlite3Fts5StorageStmt(tls *libc.TLS, p uintptr, eStmt int32, pp uintptr, p
// Release an SQLite statement handle obtained via an earlier call to
// sqlite3Fts5StorageStmt(). The eStmt parameter passed to this function
// must match that passed to the sqlite3Fts5StorageStmt() call.
-func sqlite3Fts5StorageStmtRelease(tls *libc.TLS, p uintptr, eStmt int32, pStmt uintptr) { /* sqlite3.c:230456:13: */
+func sqlite3Fts5StorageStmtRelease(tls *libc.TLS, p uintptr, eStmt int32, pStmt uintptr) { /* sqlite3.c:231732:13: */
if *(*uintptr)(unsafe.Pointer((p + 40 /* &.aStmt */) + uintptr(eStmt)*8)) == uintptr(0) {
Xsqlite3_reset(tls, pStmt)
@@ -180705,7 +188147,7 @@ func sqlite3Fts5StorageStmtRelease(tls *libc.TLS, p uintptr, eStmt int32, pStmt
}
}
-func fts5StorageDecodeSizeArray(tls *libc.TLS, aCol uintptr, nCol int32, aBlob uintptr, nBlob int32) int32 { /* sqlite3.c:230473:12: */
+func fts5StorageDecodeSizeArray(tls *libc.TLS, aCol uintptr, nCol int32, aBlob uintptr, nBlob int32) int32 { /* sqlite3.c:231749:12: */
var i int32
var iOff int32 = 0
for i = 0; i < nCol; i++ {
@@ -180723,7 +188165,7 @@ func fts5StorageDecodeSizeArray(tls *libc.TLS, aCol uintptr, nCol int32, aBlob u
//
// An SQLite error code is returned if an error occurs, or SQLITE_OK
// otherwise.
-func sqlite3Fts5StorageDocsize(tls *libc.TLS, p uintptr, iRowid I64, aCol uintptr) int32 { /* sqlite3.c:230494:12: */
+func sqlite3Fts5StorageDocsize(tls *libc.TLS, p uintptr, iRowid I64, aCol uintptr) int32 { /* sqlite3.c:231770:12: */
bp := tls.Alloc(8)
defer tls.Free(8)
@@ -180751,7 +188193,7 @@ func sqlite3Fts5StorageDocsize(tls *libc.TLS, p uintptr, iRowid I64, aCol uintpt
return rc
}
-func sqlite3Fts5StorageSize(tls *libc.TLS, p uintptr, iCol int32, pnToken uintptr) int32 { /* sqlite3.c:230520:12: */
+func sqlite3Fts5StorageSize(tls *libc.TLS, p uintptr, iCol int32, pnToken uintptr) int32 { /* sqlite3.c:231796:12: */
var rc int32 = fts5StorageLoadTotals(tls, p, 0)
if rc == SQLITE_OK {
*(*I64)(unsafe.Pointer(pnToken)) = int64(0)
@@ -180769,7 +188211,7 @@ func sqlite3Fts5StorageSize(tls *libc.TLS, p uintptr, iCol int32, pnToken uintpt
return rc
}
-func sqlite3Fts5StorageRowCount(tls *libc.TLS, p uintptr, pnRow uintptr) int32 { /* sqlite3.c:230538:12: */
+func sqlite3Fts5StorageRowCount(tls *libc.TLS, p uintptr, pnRow uintptr) int32 { /* sqlite3.c:231814:12: */
var rc int32 = fts5StorageLoadTotals(tls, p, 0)
if rc == SQLITE_OK {
// nTotalRow being zero does not necessarily indicate a corrupt
@@ -180786,7 +188228,7 @@ func sqlite3Fts5StorageRowCount(tls *libc.TLS, p uintptr, pnRow uintptr) int32 {
}
// Flush any data currently held in-memory to disk.
-func sqlite3Fts5StorageSync(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:230555:12: */
+func sqlite3Fts5StorageSync(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:231831:12: */
var rc int32 = SQLITE_OK
var iLastRowid I64 = Xsqlite3_last_insert_rowid(tls, (*Fts5Config)(unsafe.Pointer((*Fts5Storage)(unsafe.Pointer(p)).FpConfig)).Fdb)
if (*Fts5Storage)(unsafe.Pointer(p)).FbTotalsValid != 0 {
@@ -180800,12 +188242,12 @@ func sqlite3Fts5StorageSync(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:23055
return rc
}
-func sqlite3Fts5StorageRollback(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:230569:12: */
+func sqlite3Fts5StorageRollback(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:231845:12: */
(*Fts5Storage)(unsafe.Pointer(p)).FbTotalsValid = 0
return sqlite3Fts5IndexRollback(tls, (*Fts5Storage)(unsafe.Pointer(p)).FpIndex)
}
-func sqlite3Fts5StorageConfigValue(tls *libc.TLS, p uintptr, z uintptr, pVal uintptr, iVal int32) int32 { /* sqlite3.c:230574:12: */
+func sqlite3Fts5StorageConfigValue(tls *libc.TLS, p uintptr, z uintptr, pVal uintptr, iVal int32) int32 { /* sqlite3.c:231850:12: */
bp := tls.Alloc(8)
defer tls.Free(8)
@@ -180860,28 +188302,28 @@ var aAsciiTokenChar = [128]uint8{
uint8(1), uint8(1), uint8(1), uint8(1), uint8(1), uint8(1), uint8(1), uint8(1), uint8(1), uint8(1), uint8(1), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), // 0x50..0x5F
uint8(0), uint8(1), uint8(1), uint8(1), uint8(1), uint8(1), uint8(1), uint8(1), uint8(1), uint8(1), uint8(1), uint8(1), uint8(1), uint8(1), uint8(1), uint8(1), // 0x60..0x6F
uint8(1), uint8(1), uint8(1), uint8(1), uint8(1), uint8(1), uint8(1), uint8(1), uint8(1), uint8(1), uint8(1), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), // 0x70..0x7F
-} /* sqlite3.c:230627:22 */
+} /* sqlite3.c:231903:22 */
-type AsciiTokenizer1 = struct{ FaTokenChar [128]uint8 } /* sqlite3.c:230638:9 */
+type AsciiTokenizer1 = struct{ FaTokenChar [128]uint8 } /* sqlite3.c:231914:9 */
-type AsciiTokenizer = AsciiTokenizer1 /* sqlite3.c:230638:31 */
+type AsciiTokenizer = AsciiTokenizer1 /* sqlite3.c:231914:31 */
-func fts5AsciiAddExceptions(tls *libc.TLS, p uintptr, zArg uintptr, bTokenChars int32) { /* sqlite3.c:230643:13: */
+func fts5AsciiAddExceptions(tls *libc.TLS, p uintptr, zArg uintptr, bTokenChars int32) { /* sqlite3.c:231919:13: */
var i int32
- for i = 0; *(*int8)(unsafe.Pointer(zArg + uintptr(i))) != 0; i++ {
- if (int32(*(*int8)(unsafe.Pointer(zArg + uintptr(i)))) & 0x80) == 0 {
- *(*uint8)(unsafe.Pointer((p /* &.aTokenChar */) + uintptr(int32(*(*int8)(unsafe.Pointer(zArg + uintptr(i))))))) = uint8(bTokenChars)
+ for i = 0; *(*uint8)(unsafe.Pointer(zArg + uintptr(i))) != 0; i++ {
+ if (int32(*(*uint8)(unsafe.Pointer(zArg + uintptr(i)))) & 0x80) == 0 {
+ *(*uint8)(unsafe.Pointer((p /* &.aTokenChar */) + uintptr(int32(*(*uint8)(unsafe.Pointer(zArg + uintptr(i))))))) = uint8(bTokenChars)
}
}
}
// Delete a "ascii" tokenizer.
-func fts5AsciiDelete(tls *libc.TLS, p uintptr) { /* sqlite3.c:230659:13: */
+func fts5AsciiDelete(tls *libc.TLS, p uintptr) { /* sqlite3.c:231935:13: */
Xsqlite3_free(tls, p)
}
// Create an "ascii" tokenizer.
-func fts5AsciiCreate(tls *libc.TLS, pUnused uintptr, azArg uintptr, nArg int32, ppOut uintptr) int32 { /* sqlite3.c:230666:12: */
+func fts5AsciiCreate(tls *libc.TLS, pUnused uintptr, azArg uintptr, nArg int32, ppOut uintptr) int32 { /* sqlite3.c:231942:12: */
var rc int32 = SQLITE_OK
var p uintptr = uintptr(0)
_ = pUnused
@@ -180897,9 +188339,9 @@ func fts5AsciiCreate(tls *libc.TLS, pUnused uintptr, azArg uintptr, nArg int32,
libc.Xmemcpy(tls, p /* &.aTokenChar */, uintptr(unsafe.Pointer(&aAsciiTokenChar)), uint64(unsafe.Sizeof(aAsciiTokenChar)))
for i = 0; (rc == SQLITE_OK) && (i < nArg); i = i + (2) {
var zArg uintptr = *(*uintptr)(unsafe.Pointer(azArg + uintptr((i+1))*8))
- if 0 == Xsqlite3_stricmp(tls, *(*uintptr)(unsafe.Pointer(azArg + uintptr(i)*8)), ts+33990 /* "tokenchars" */) {
+ if 0 == Xsqlite3_stricmp(tls, *(*uintptr)(unsafe.Pointer(azArg + uintptr(i)*8)), ts+35139 /* "tokenchars" */) {
fts5AsciiAddExceptions(tls, p, zArg, 1)
- } else if 0 == Xsqlite3_stricmp(tls, *(*uintptr)(unsafe.Pointer(azArg + uintptr(i)*8)), ts+34001 /* "separators" */) {
+ } else if 0 == Xsqlite3_stricmp(tls, *(*uintptr)(unsafe.Pointer(azArg + uintptr(i)*8)), ts+35150 /* "separators" */) {
fts5AsciiAddExceptions(tls, p, zArg, 0)
} else {
rc = SQLITE_ERROR
@@ -180916,19 +188358,19 @@ func fts5AsciiCreate(tls *libc.TLS, pUnused uintptr, azArg uintptr, nArg int32,
return rc
}
-func asciiFold(tls *libc.TLS, aOut uintptr, aIn uintptr, nByte int32) { /* sqlite3.c:230707:13: */
+func asciiFold(tls *libc.TLS, aOut uintptr, aIn uintptr, nByte int32) { /* sqlite3.c:231983:13: */
var i int32
for i = 0; i < nByte; i++ {
- var c int8 = *(*int8)(unsafe.Pointer(aIn + uintptr(i)))
+ var c uint8 = *(*uint8)(unsafe.Pointer(aIn + uintptr(i)))
if (int32(c) >= 'A') && (int32(c) <= 'Z') {
- c = int8(int32(c) + (32))
+ c = uint8(int32(c) + (32))
}
- *(*int8)(unsafe.Pointer(aOut + uintptr(i))) = c
+ *(*uint8)(unsafe.Pointer(aOut + uintptr(i))) = c
}
}
// Tokenize some text using the ascii tokenizer.
-func fts5AsciiTokenize(tls *libc.TLS, pTokenizer uintptr, pCtx uintptr, iUnused int32, pText uintptr, nText int32, xToken uintptr) int32 { /* sqlite3.c:230719:12: */
+func fts5AsciiTokenize(tls *libc.TLS, pTokenizer uintptr, pCtx uintptr, iUnused int32, pText uintptr, nText int32, xToken uintptr) int32 { /* sqlite3.c:231995:12: */
bp := tls.Alloc(64)
defer tls.Free(64)
@@ -180936,9 +188378,9 @@ func fts5AsciiTokenize(tls *libc.TLS, pTokenizer uintptr, pCtx uintptr, iUnused
var rc int32 = SQLITE_OK
var ie int32
var is int32 = 0
- // var aFold [64]int8 at bp, 64
+ // var aFold [64]uint8 at bp, 64
- var nFold int32 = int32(unsafe.Sizeof([64]int8{}))
+ var nFold int32 = int32(unsafe.Sizeof([64]uint8{}))
var pFold uintptr = bp /* aFold */
var a uintptr = p /* &.aTokenChar */
@@ -180948,7 +188390,7 @@ func fts5AsciiTokenize(tls *libc.TLS, pTokenizer uintptr, pCtx uintptr, iUnused
var nByte int32
// Skip any leading divider characters.
- for (is < nText) && (((int32(*(*int8)(unsafe.Pointer(pText + uintptr(is)))) & 0x80) == 0) && (int32(*(*uint8)(unsafe.Pointer(a + uintptr(int32(*(*int8)(unsafe.Pointer(pText + uintptr(is)))))))) == 0)) {
+ for (is < nText) && (((int32(*(*uint8)(unsafe.Pointer(pText + uintptr(is)))) & 0x80) == 0) && (int32(*(*uint8)(unsafe.Pointer(a + uintptr(int32(*(*uint8)(unsafe.Pointer(pText + uintptr(is)))))))) == 0)) {
is++
}
if is == nText {
@@ -180957,7 +188399,7 @@ func fts5AsciiTokenize(tls *libc.TLS, pTokenizer uintptr, pCtx uintptr, iUnused
// Count the token characters
ie = (is + 1)
- for (ie < nText) && (((int32(*(*int8)(unsafe.Pointer(pText + uintptr(ie)))) & 0x80) != 0) || (*(*uint8)(unsafe.Pointer(a + uintptr(int32(*(*int8)(unsafe.Pointer(pText + uintptr(ie))))))) != 0)) {
+ for (ie < nText) && (((int32(*(*uint8)(unsafe.Pointer(pText + uintptr(ie)))) & 0x80) != 0) || (*(*uint8)(unsafe.Pointer(a + uintptr(int32(*(*uint8)(unsafe.Pointer(pText + uintptr(ie))))))) != 0)) {
ie++
}
@@ -180977,7 +188419,9 @@ func fts5AsciiTokenize(tls *libc.TLS, pTokenizer uintptr, pCtx uintptr, iUnused
asciiFold(tls, pFold, (pText + uintptr(is)), nByte)
// Invoke the token callback
- rc = (*(*func(*libc.TLS, uintptr, int32, uintptr, int32, int32, int32) int32)(unsafe.Pointer(&xToken)))(tls, pCtx, 0, pFold, nByte, is, ie)
+ rc = (*struct {
+ f func(*libc.TLS, uintptr, int32, uintptr, int32, int32, int32) int32
+ })(unsafe.Pointer(&struct{ uintptr }{xToken})).f(tls, pCtx, 0, pFold, nByte, is, ie)
is = (ie + 1)
}
@@ -181004,10 +188448,10 @@ type Unicode61Tokenizer1 = struct {
FnFold int32
FeRemoveDiacritic int32
FnException int32
- _ [4]byte
+ F__ccgo_pad1 [4]byte
FaiException uintptr
FaCategory [32]uint8
-} /* sqlite3.c:230834:9 */
+} /* sqlite3.c:232110:9 */
// *************************************************************************
//
@@ -181017,11 +188461,11 @@ type Unicode61Tokenizer1 = struct {
// from the sqlite3 source file utf.c. If this file is compiled as part
// of the amalgamation, they are not required.
-type Unicode61Tokenizer = Unicode61Tokenizer1 /* sqlite3.c:230834:35 */
+type Unicode61Tokenizer = Unicode61Tokenizer1 /* sqlite3.c:232110:35 */
// Values for eRemoveDiacritic (must match internals of fts5_unicode2.c)
-func fts5UnicodeAddExceptions(tls *libc.TLS, p uintptr, z uintptr, bTokenChars int32) int32 { /* sqlite3.c:230851:12: */
+func fts5UnicodeAddExceptions(tls *libc.TLS, p uintptr, z uintptr, bTokenChars int32) int32 { /* sqlite3.c:232127:12: */
var rc int32 = SQLITE_OK
var n int32 = int32(libc.Xstrlen(tls, z))
var aNew uintptr
@@ -181076,7 +188520,7 @@ func fts5UnicodeAddExceptions(tls *libc.TLS, p uintptr, z uintptr, bTokenChars i
}
// Return true if the p->aiException[] array contains the value iCode.
-func fts5UnicodeIsException(tls *libc.TLS, p uintptr, iCode int32) int32 { /* sqlite3.c:230901:12: */
+func fts5UnicodeIsException(tls *libc.TLS, p uintptr, iCode int32) int32 { /* sqlite3.c:232177:12: */
if (*Unicode61Tokenizer)(unsafe.Pointer(p)).FnException > 0 {
var a uintptr = (*Unicode61Tokenizer)(unsafe.Pointer(p)).FaiException
var iLo int32 = 0
@@ -181098,7 +188542,7 @@ func fts5UnicodeIsException(tls *libc.TLS, p uintptr, iCode int32) int32 { /* sq
}
// Delete a "unicode61" tokenizer.
-func fts5UnicodeDelete(tls *libc.TLS, pTok uintptr) { /* sqlite3.c:230925:13: */
+func fts5UnicodeDelete(tls *libc.TLS, pTok uintptr) { /* sqlite3.c:232201:13: */
if pTok != 0 {
var p uintptr = pTok
Xsqlite3_free(tls, (*Unicode61Tokenizer)(unsafe.Pointer(p)).FaiException)
@@ -181108,17 +188552,17 @@ func fts5UnicodeDelete(tls *libc.TLS, pTok uintptr) { /* sqlite3.c:230925:13: */
return
}
-func unicodeSetCategories(tls *libc.TLS, p uintptr, zCat uintptr) int32 { /* sqlite3.c:230935:12: */
+func unicodeSetCategories(tls *libc.TLS, p uintptr, zCat uintptr) int32 { /* sqlite3.c:232211:12: */
var z uintptr = zCat
- for *(*int8)(unsafe.Pointer(z)) != 0 {
- for (int32(*(*int8)(unsafe.Pointer(z))) == ' ') || (int32(*(*int8)(unsafe.Pointer(z))) == '\t') {
+ for *(*uint8)(unsafe.Pointer(z)) != 0 {
+ for (int32(*(*uint8)(unsafe.Pointer(z))) == ' ') || (int32(*(*uint8)(unsafe.Pointer(z))) == '\t') {
z++
}
- if (*(*int8)(unsafe.Pointer(z)) != 0) && (sqlite3Fts5UnicodeCatParse(tls, z, p+160 /* &.aCategory */) != 0) {
+ if (*(*uint8)(unsafe.Pointer(z)) != 0) && (sqlite3Fts5UnicodeCatParse(tls, z, p+160 /* &.aCategory */) != 0) {
return SQLITE_ERROR
}
- for ((int32(*(*int8)(unsafe.Pointer(z))) != ' ') && (int32(*(*int8)(unsafe.Pointer(z))) != '\t')) && (int32(*(*int8)(unsafe.Pointer(z))) != 0) {
+ for ((int32(*(*uint8)(unsafe.Pointer(z))) != ' ') && (int32(*(*uint8)(unsafe.Pointer(z))) != '\t')) && (int32(*(*uint8)(unsafe.Pointer(z))) != 0) {
z++
}
}
@@ -181128,7 +188572,7 @@ func unicodeSetCategories(tls *libc.TLS, p uintptr, zCat uintptr) int32 { /* sql
}
// Create a "unicode61" tokenizer.
-func fts5UnicodeCreate(tls *libc.TLS, pUnused uintptr, azArg uintptr, nArg int32, ppOut uintptr) int32 { /* sqlite3.c:230953:12: */
+func fts5UnicodeCreate(tls *libc.TLS, pUnused uintptr, azArg uintptr, nArg int32, ppOut uintptr) int32 { /* sqlite3.c:232229:12: */
var rc int32 = SQLITE_OK // Return code
var p uintptr = uintptr(0) // New tokenizer object
@@ -181139,20 +188583,20 @@ func fts5UnicodeCreate(tls *libc.TLS, pUnused uintptr, azArg uintptr, nArg int32
} else {
p = Xsqlite3_malloc(tls, int32(unsafe.Sizeof(Unicode61Tokenizer{})))
if p != 0 {
- var zCat uintptr = ts + 34012 /* "L* N* Co" */
+ var zCat uintptr = ts + 35161 /* "L* N* Co" */
var i int32
libc.Xmemset(tls, p, 0, uint64(unsafe.Sizeof(Unicode61Tokenizer{})))
(*Unicode61Tokenizer)(unsafe.Pointer(p)).FeRemoveDiacritic = FTS5_REMOVE_DIACRITICS_SIMPLE
(*Unicode61Tokenizer)(unsafe.Pointer(p)).FnFold = 64
- (*Unicode61Tokenizer)(unsafe.Pointer(p)).FaFold = Xsqlite3_malloc64(tls, (uint64(uint64((*Unicode61Tokenizer)(unsafe.Pointer(p)).FnFold) * uint64(unsafe.Sizeof(int8(0))))))
+ (*Unicode61Tokenizer)(unsafe.Pointer(p)).FaFold = Xsqlite3_malloc64(tls, (uint64(uint64((*Unicode61Tokenizer)(unsafe.Pointer(p)).FnFold) * uint64(unsafe.Sizeof(uint8(0))))))
if (*Unicode61Tokenizer)(unsafe.Pointer(p)).FaFold == uintptr(0) {
rc = SQLITE_NOMEM
}
// Search for a "categories" argument
for i = 0; (rc == SQLITE_OK) && (i < nArg); i = i + (2) {
- if 0 == Xsqlite3_stricmp(tls, *(*uintptr)(unsafe.Pointer(azArg + uintptr(i)*8)), ts+34021 /* "categories" */) {
+ if 0 == Xsqlite3_stricmp(tls, *(*uintptr)(unsafe.Pointer(azArg + uintptr(i)*8)), ts+35170 /* "categories" */) {
zCat = *(*uintptr)(unsafe.Pointer(azArg + uintptr((i+1))*8))
}
}
@@ -181163,18 +188607,18 @@ func fts5UnicodeCreate(tls *libc.TLS, pUnused uintptr, azArg uintptr, nArg int32
for i = 0; (rc == SQLITE_OK) && (i < nArg); i = i + (2) {
var zArg uintptr = *(*uintptr)(unsafe.Pointer(azArg + uintptr((i+1))*8))
- if 0 == Xsqlite3_stricmp(tls, *(*uintptr)(unsafe.Pointer(azArg + uintptr(i)*8)), ts+34032 /* "remove_diacritic..." */) {
- if (((int32(*(*int8)(unsafe.Pointer(zArg))) != '0') && (int32(*(*int8)(unsafe.Pointer(zArg))) != '1')) && (int32(*(*int8)(unsafe.Pointer(zArg))) != '2')) || (*(*int8)(unsafe.Pointer(zArg + 1)) != 0) {
+ if 0 == Xsqlite3_stricmp(tls, *(*uintptr)(unsafe.Pointer(azArg + uintptr(i)*8)), ts+35181 /* "remove_diacritic..." */) {
+ if (((int32(*(*uint8)(unsafe.Pointer(zArg))) != '0') && (int32(*(*uint8)(unsafe.Pointer(zArg))) != '1')) && (int32(*(*uint8)(unsafe.Pointer(zArg))) != '2')) || (*(*uint8)(unsafe.Pointer(zArg + 1)) != 0) {
rc = SQLITE_ERROR
} else {
- (*Unicode61Tokenizer)(unsafe.Pointer(p)).FeRemoveDiacritic = (int32(*(*int8)(unsafe.Pointer(zArg))) - '0')
+ (*Unicode61Tokenizer)(unsafe.Pointer(p)).FeRemoveDiacritic = (int32(*(*uint8)(unsafe.Pointer(zArg))) - '0')
}
- } else if 0 == Xsqlite3_stricmp(tls, *(*uintptr)(unsafe.Pointer(azArg + uintptr(i)*8)), ts+33990 /* "tokenchars" */) {
+ } else if 0 == Xsqlite3_stricmp(tls, *(*uintptr)(unsafe.Pointer(azArg + uintptr(i)*8)), ts+35139 /* "tokenchars" */) {
rc = fts5UnicodeAddExceptions(tls, p, zArg, 1)
- } else if 0 == Xsqlite3_stricmp(tls, *(*uintptr)(unsafe.Pointer(azArg + uintptr(i)*8)), ts+34001 /* "separators" */) {
+ } else if 0 == Xsqlite3_stricmp(tls, *(*uintptr)(unsafe.Pointer(azArg + uintptr(i)*8)), ts+35150 /* "separators" */) {
rc = fts5UnicodeAddExceptions(tls, p, zArg, 0)
- } else if 0 == Xsqlite3_stricmp(tls, *(*uintptr)(unsafe.Pointer(azArg + uintptr(i)*8)), ts+34021 /* "categories" */) {
+ } else if 0 == Xsqlite3_stricmp(tls, *(*uintptr)(unsafe.Pointer(azArg + uintptr(i)*8)), ts+35170 /* "categories" */) {
// no-op
} else {
rc = SQLITE_ERROR
@@ -181196,12 +188640,12 @@ func fts5UnicodeCreate(tls *libc.TLS, pUnused uintptr, azArg uintptr, nArg int32
// Return true if, for the purposes of tokenizing with the tokenizer
// passed as the first argument, codepoint iCode is considered a token
// character (not a separator).
-func fts5UnicodeIsAlnum(tls *libc.TLS, p uintptr, iCode int32) int32 { /* sqlite3.c:231033:12: */
+func fts5UnicodeIsAlnum(tls *libc.TLS, p uintptr, iCode int32) int32 { /* sqlite3.c:232309:12: */
return (int32(*(*uint8)(unsafe.Pointer((p + 160 /* &.aCategory */) + uintptr(sqlite3Fts5UnicodeCategory(tls, U32(iCode)))))) ^
fts5UnicodeIsException(tls, p, iCode))
}
-func fts5UnicodeTokenize(tls *libc.TLS, pTokenizer uintptr, pCtx uintptr, iUnused int32, pText uintptr, nText int32, xToken uintptr) int32 { /* sqlite3.c:231040:12: */
+func fts5UnicodeTokenize(tls *libc.TLS, pTokenizer uintptr, pCtx uintptr, iUnused int32, pText uintptr, nText int32, xToken uintptr) int32 { /* sqlite3.c:232316:12: */
var p uintptr
var rc int32
var a uintptr
@@ -181363,28 +188807,28 @@ non_ascii_tokenchar:
if !(iCode < U32(0x00080)) {
goto __27
}
- *(*int8)(unsafe.Pointer(libc.PostIncUintptr(&zOut, 1))) = int8((U8(iCode & U32(0xFF))))
+ *(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&zOut, 1))) = uint8((U8(iCode & U32(0xFF))))
goto __28
__27:
if !(iCode < U32(0x00800)) {
goto __29
}
- *(*int8)(unsafe.Pointer(libc.PostIncUintptr(&zOut, 1))) = (int8(0xC0 + int32((U8((iCode >> 6) & U32(0x1F))))))
- *(*int8)(unsafe.Pointer(libc.PostIncUintptr(&zOut, 1))) = (int8(0x80 + int32((U8(iCode & U32(0x3F))))))
+ *(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&zOut, 1))) = (uint8(0xC0 + int32((U8((iCode >> 6) & U32(0x1F))))))
+ *(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&zOut, 1))) = (uint8(0x80 + int32((U8(iCode & U32(0x3F))))))
goto __30
__29:
if !(iCode < U32(0x10000)) {
goto __31
}
- *(*int8)(unsafe.Pointer(libc.PostIncUintptr(&zOut, 1))) = (int8(0xE0 + int32((U8((iCode >> 12) & U32(0x0F))))))
- *(*int8)(unsafe.Pointer(libc.PostIncUintptr(&zOut, 1))) = (int8(0x80 + int32((U8((iCode >> 6) & U32(0x3F))))))
- *(*int8)(unsafe.Pointer(libc.PostIncUintptr(&zOut, 1))) = (int8(0x80 + int32((U8(iCode & U32(0x3F))))))
+ *(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&zOut, 1))) = (uint8(0xE0 + int32((U8((iCode >> 12) & U32(0x0F))))))
+ *(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&zOut, 1))) = (uint8(0x80 + int32((U8((iCode >> 6) & U32(0x3F))))))
+ *(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&zOut, 1))) = (uint8(0x80 + int32((U8(iCode & U32(0x3F))))))
goto __32
__31:
- *(*int8)(unsafe.Pointer(libc.PostIncUintptr(&zOut, 1))) = (int8(0xF0 + int32((U8((iCode >> 18) & U32(0x07))))))
- *(*int8)(unsafe.Pointer(libc.PostIncUintptr(&zOut, 1))) = (int8(0x80 + int32((U8((iCode >> 12) & U32(0x3F))))))
- *(*int8)(unsafe.Pointer(libc.PostIncUintptr(&zOut, 1))) = (int8(0x80 + int32((U8((iCode >> 6) & U32(0x3F))))))
- *(*int8)(unsafe.Pointer(libc.PostIncUintptr(&zOut, 1))) = (int8(0x80 + int32((U8(iCode & U32(0x3F))))))
+ *(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&zOut, 1))) = (uint8(0xF0 + int32((U8((iCode >> 18) & U32(0x07))))))
+ *(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&zOut, 1))) = (uint8(0x80 + int32((U8((iCode >> 12) & U32(0x3F))))))
+ *(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&zOut, 1))) = (uint8(0x80 + int32((U8((iCode >> 6) & U32(0x3F))))))
+ *(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&zOut, 1))) = (uint8(0x80 + int32((U8(iCode & U32(0x3F))))))
__32:
;
__30:
@@ -181412,10 +188856,10 @@ ascii_tokenchar:
if !((int32(*(*uint8)(unsafe.Pointer(zCsr))) >= 'A') && (int32(*(*uint8)(unsafe.Pointer(zCsr))) <= 'Z')) {
goto __35
}
- *(*int8)(unsafe.Pointer(libc.PostIncUintptr(&zOut, 1))) = (int8(int32(*(*uint8)(unsafe.Pointer(zCsr))) + 32))
+ *(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&zOut, 1))) = (uint8(int32(*(*uint8)(unsafe.Pointer(zCsr))) + 32))
goto __36
__35:
- *(*int8)(unsafe.Pointer(libc.PostIncUintptr(&zOut, 1))) = int8(*(*uint8)(unsafe.Pointer(zCsr)))
+ *(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&zOut, 1))) = uint8(*(*uint8)(unsafe.Pointer(zCsr)))
__36:
;
zCsr++
@@ -181429,7 +188873,9 @@ __15:
;
// Invoke the token callback
- rc = (*(*func(*libc.TLS, uintptr, int32, uintptr, int32, int32, int32) int32)(unsafe.Pointer(&xToken)))(tls, pCtx, 0, aFold, (int32((int64(zOut) - int64(aFold)) / 1)), is, ie)
+ rc = (*struct {
+ f func(*libc.TLS, uintptr, int32, uintptr, int32, int32, int32) int32
+ })(unsafe.Pointer(&struct{ uintptr }{xToken})).f(tls, pCtx, 0, aFold, (int32((int64(zOut) - int64(aFold)) / 1)), is, ie)
goto __1
__2:
;
@@ -181454,8 +188900,8 @@ __37:
type PorterTokenizer1 = struct {
Ftokenizer Fts5_tokenizer
FpTokenizer uintptr
- FaBuf [128]int8
-} /* sqlite3.c:231152:9 */
+ FaBuf [128]uint8
+} /* sqlite3.c:232428:9 */
// *************************************************************************
//
@@ -181464,21 +188910,21 @@ type PorterTokenizer1 = struct {
// Any tokens larger than this (in bytes) are passed through without
// stemming.
-type PorterTokenizer = PorterTokenizer1 /* sqlite3.c:231152:32 */
+type PorterTokenizer = PorterTokenizer1 /* sqlite3.c:232428:32 */
// Delete a "porter" tokenizer.
-func fts5PorterDelete(tls *libc.TLS, pTok uintptr) { /* sqlite3.c:231162:13: */
+func fts5PorterDelete(tls *libc.TLS, pTok uintptr) { /* sqlite3.c:232438:13: */
if pTok != 0 {
var p uintptr = pTok
if (*PorterTokenizer)(unsafe.Pointer(p)).FpTokenizer != 0 {
- (*(*func(*libc.TLS, uintptr))(unsafe.Pointer((p /* &.tokenizer */ + 8 /* &.xDelete */))))(tls, (*PorterTokenizer)(unsafe.Pointer(p)).FpTokenizer)
+ (*struct{ f func(*libc.TLS, uintptr) })(unsafe.Pointer(&struct{ uintptr }{(*PorterTokenizer)(unsafe.Pointer(p)).Ftokenizer.FxDelete})).f(tls, (*PorterTokenizer)(unsafe.Pointer(p)).FpTokenizer)
}
Xsqlite3_free(tls, p)
}
}
// Create a "porter" tokenizer.
-func fts5PorterCreate(tls *libc.TLS, pCtx uintptr, azArg uintptr, nArg int32, ppOut uintptr) int32 { /* sqlite3.c:231175:12: */
+func fts5PorterCreate(tls *libc.TLS, pCtx uintptr, azArg uintptr, nArg int32, ppOut uintptr) int32 { /* sqlite3.c:232451:12: */
bp := tls.Alloc(8)
defer tls.Free(8)
@@ -181486,7 +188932,7 @@ func fts5PorterCreate(tls *libc.TLS, pCtx uintptr, azArg uintptr, nArg int32, pp
var rc int32 = SQLITE_OK
var pRet uintptr
*(*uintptr)(unsafe.Pointer(bp /* pUserdata */)) = uintptr(0)
- var zBase uintptr = ts + 34050 /* "unicode61" */
+ var zBase uintptr = ts + 35199 /* "unicode61" */
if nArg > 0 {
zBase = *(*uintptr)(unsafe.Pointer(azArg))
@@ -181495,7 +188941,9 @@ func fts5PorterCreate(tls *libc.TLS, pCtx uintptr, azArg uintptr, nArg int32, pp
pRet = Xsqlite3_malloc(tls, int32(unsafe.Sizeof(PorterTokenizer{})))
if pRet != 0 {
libc.Xmemset(tls, pRet, 0, uint64(unsafe.Sizeof(PorterTokenizer{})))
- rc = (*(*func(*libc.TLS, uintptr, uintptr, uintptr, uintptr) int32)(unsafe.Pointer((pApi + 16 /* &.xFindTokenizer */))))(tls, pApi, zBase, bp /* &pUserdata */, (pRet /* &.tokenizer */))
+ rc = (*struct {
+ f func(*libc.TLS, uintptr, uintptr, uintptr, uintptr) int32
+ })(unsafe.Pointer(&struct{ uintptr }{(*Fts5_api)(unsafe.Pointer(pApi)).FxFindTokenizer})).f(tls, pApi, zBase, bp /* &pUserdata */, (pRet /* &.tokenizer */))
} else {
rc = SQLITE_NOMEM
}
@@ -181512,7 +188960,9 @@ func fts5PorterCreate(tls *libc.TLS, pCtx uintptr, azArg uintptr, nArg int32, pp
}
return uintptr(0)
}()
- rc = (*(*func(*libc.TLS, uintptr, uintptr, int32, uintptr) int32)(unsafe.Pointer((pRet /* &.tokenizer */ /* &.xCreate */))))(tls, *(*uintptr)(unsafe.Pointer(bp /* pUserdata */)), azArg2, nArg2, (pRet + 24 /* &.pTokenizer */))
+ rc = (*struct {
+ f func(*libc.TLS, uintptr, uintptr, int32, uintptr) int32
+ })(unsafe.Pointer(&struct{ uintptr }{(*PorterTokenizer)(unsafe.Pointer(pRet)).Ftokenizer.FxCreate})).f(tls, *(*uintptr)(unsafe.Pointer(bp /* pUserdata */)), azArg2, nArg2, (pRet + 24 /* &.pTokenizer */))
}
if rc != SQLITE_OK {
@@ -181527,40 +188977,40 @@ type PorterContext1 = struct {
FpCtx uintptr
FxToken uintptr
FaBuf uintptr
-} /* sqlite3.c:231211:9 */
+} /* sqlite3.c:232487:9 */
-type PorterContext = PorterContext1 /* sqlite3.c:231211:30 */
+type PorterContext = PorterContext1 /* sqlite3.c:232487:30 */
type PorterRule1 = struct {
- FzSuffix uintptr
- FnSuffix int32
- _ [4]byte
- FxCond uintptr
- FzOutput uintptr
- FnOutput int32
- _ [4]byte
-} /* sqlite3.c:231218:9 */
-
-type PorterRule = PorterRule1 /* sqlite3.c:231218:27 */
-
-func fts5PorterIsVowel(tls *libc.TLS, c int8, bYIsVowel int32) int32 { /* sqlite3.c:231253:12: */
+ FzSuffix uintptr
+ FnSuffix int32
+ F__ccgo_pad1 [4]byte
+ FxCond uintptr
+ FzOutput uintptr
+ FnOutput int32
+ F__ccgo_pad2 [4]byte
+} /* sqlite3.c:232494:9 */
+
+type PorterRule = PorterRule1 /* sqlite3.c:232494:27 */
+
+func fts5PorterIsVowel(tls *libc.TLS, c uint8, bYIsVowel int32) int32 { /* sqlite3.c:232529:12: */
return (libc.Bool32((((((int32(c) == 'a') || (int32(c) == 'e')) || (int32(c) == 'i')) || (int32(c) == 'o')) || (int32(c) == 'u')) || ((bYIsVowel != 0) && (int32(c) == 'y'))))
}
-func fts5PorterGobbleVC(tls *libc.TLS, zStem uintptr, nStem int32, bPrevCons int32) int32 { /* sqlite3.c:231259:12: */
+func fts5PorterGobbleVC(tls *libc.TLS, zStem uintptr, nStem int32, bPrevCons int32) int32 { /* sqlite3.c:232535:12: */
var i int32
var bCons int32 = bPrevCons
// Scan for a vowel
for i = 0; i < nStem; i++ {
- if 0 == (libc.AssignInt32(&bCons, libc.BoolInt32(!(fts5PorterIsVowel(tls, *(*int8)(unsafe.Pointer(zStem + uintptr(i))), bCons) != 0)))) {
+ if 0 == (libc.AssignInt32(&bCons, libc.BoolInt32(!(fts5PorterIsVowel(tls, *(*uint8)(unsafe.Pointer(zStem + uintptr(i))), bCons) != 0)))) {
break
}
}
// Scan for a consonent
for i++; i < nStem; i++ {
- if libc.AssignInt32(&bCons, libc.BoolInt32(!(fts5PorterIsVowel(tls, *(*int8)(unsafe.Pointer(zStem + uintptr(i))), bCons) != 0))) != 0 {
+ if libc.AssignInt32(&bCons, libc.BoolInt32(!(fts5PorterIsVowel(tls, *(*uint8)(unsafe.Pointer(zStem + uintptr(i))), bCons) != 0))) != 0 {
return (i + 1)
}
}
@@ -181568,12 +189018,12 @@ func fts5PorterGobbleVC(tls *libc.TLS, zStem uintptr, nStem int32, bPrevCons int
}
// porter rule condition: (m > 0)
-func fts5Porter_MGt0(tls *libc.TLS, zStem uintptr, nStem int32) int32 { /* sqlite3.c:231276:12: */
+func fts5Porter_MGt0(tls *libc.TLS, zStem uintptr, nStem int32) int32 { /* sqlite3.c:232552:12: */
return libc.BoolInt32(!(!(fts5PorterGobbleVC(tls, zStem, nStem, 0) != 0)))
}
// porter rule condition: (m > 1)
-func fts5Porter_MGt1(tls *libc.TLS, zStem uintptr, nStem int32) int32 { /* sqlite3.c:231281:12: */
+func fts5Porter_MGt1(tls *libc.TLS, zStem uintptr, nStem int32) int32 { /* sqlite3.c:232557:12: */
var n int32
n = fts5PorterGobbleVC(tls, zStem, nStem, 0)
if (n != 0) && (fts5PorterGobbleVC(tls, (zStem+uintptr(n)), (nStem-n), 1) != 0) {
@@ -181583,7 +189033,7 @@ func fts5Porter_MGt1(tls *libc.TLS, zStem uintptr, nStem int32) int32 { /* sqlit
}
// porter rule condition: (m = 1)
-func fts5Porter_MEq1(tls *libc.TLS, zStem uintptr, nStem int32) int32 { /* sqlite3.c:231291:12: */
+func fts5Porter_MEq1(tls *libc.TLS, zStem uintptr, nStem int32) int32 { /* sqlite3.c:232567:12: */
var n int32
n = fts5PorterGobbleVC(tls, zStem, nStem, 0)
if (n != 0) && (0 == fts5PorterGobbleVC(tls, (zStem+uintptr(n)), (nStem-n), 1)) {
@@ -181593,15 +189043,15 @@ func fts5Porter_MEq1(tls *libc.TLS, zStem uintptr, nStem int32) int32 { /* sqlit
}
// porter rule condition: (*o)
-func fts5Porter_Ostar(tls *libc.TLS, zStem uintptr, nStem int32) int32 { /* sqlite3.c:231301:12: */
- if ((int32(*(*int8)(unsafe.Pointer(zStem + uintptr((nStem - 1))))) == 'w') || (int32(*(*int8)(unsafe.Pointer(zStem + uintptr((nStem - 1))))) == 'x')) || (int32(*(*int8)(unsafe.Pointer(zStem + uintptr((nStem - 1))))) == 'y') {
+func fts5Porter_Ostar(tls *libc.TLS, zStem uintptr, nStem int32) int32 { /* sqlite3.c:232577:12: */
+ if ((int32(*(*uint8)(unsafe.Pointer(zStem + uintptr((nStem - 1))))) == 'w') || (int32(*(*uint8)(unsafe.Pointer(zStem + uintptr((nStem - 1))))) == 'x')) || (int32(*(*uint8)(unsafe.Pointer(zStem + uintptr((nStem - 1))))) == 'y') {
return 0
} else {
var i int32
var mask int32 = 0
var bCons int32 = 0
for i = 0; i < nStem; i++ {
- bCons = libc.BoolInt32(!(fts5PorterIsVowel(tls, *(*int8)(unsafe.Pointer(zStem + uintptr(i))), bCons) != 0))
+ bCons = libc.BoolInt32(!(fts5PorterIsVowel(tls, *(*uint8)(unsafe.Pointer(zStem + uintptr(i))), bCons) != 0))
mask = ((mask << 1) + bCons)
}
@@ -181611,17 +189061,17 @@ func fts5Porter_Ostar(tls *libc.TLS, zStem uintptr, nStem int32) int32 { /* sqli
}
// porter rule condition: (m > 1 and (*S or *T))
-func fts5Porter_MGt1_and_S_or_T(tls *libc.TLS, zStem uintptr, nStem int32) int32 { /* sqlite3.c:231318:12: */
+func fts5Porter_MGt1_and_S_or_T(tls *libc.TLS, zStem uintptr, nStem int32) int32 { /* sqlite3.c:232594:12: */
- return (libc.Bool32(((int32(*(*int8)(unsafe.Pointer(zStem + uintptr((nStem - 1))))) == 's') || (int32(*(*int8)(unsafe.Pointer(zStem + uintptr((nStem - 1))))) == 't')) &&
+ return (libc.Bool32(((int32(*(*uint8)(unsafe.Pointer(zStem + uintptr((nStem - 1))))) == 's') || (int32(*(*uint8)(unsafe.Pointer(zStem + uintptr((nStem - 1))))) == 't')) &&
(fts5Porter_MGt1(tls, zStem, nStem) != 0)))
}
// porter rule condition: (*v*)
-func fts5Porter_Vowel(tls *libc.TLS, zStem uintptr, nStem int32) int32 { /* sqlite3.c:231325:12: */
+func fts5Porter_Vowel(tls *libc.TLS, zStem uintptr, nStem int32) int32 { /* sqlite3.c:232601:12: */
var i int32
for i = 0; i < nStem; i++ {
- if fts5PorterIsVowel(tls, *(*int8)(unsafe.Pointer(zStem + uintptr(i))), (libc.Bool32(i > 0))) != 0 {
+ if fts5PorterIsVowel(tls, *(*uint8)(unsafe.Pointer(zStem + uintptr(i))), (libc.Bool32(i > 0))) != 0 {
return 1
}
}
@@ -181633,13 +189083,13 @@ func fts5Porter_Vowel(tls *libc.TLS, zStem uintptr, nStem int32) int32 { /* sqli
//
// GENERATED CODE STARTS HERE (mkportersteps.tcl)
-func fts5PorterStep4(tls *libc.TLS, aBuf uintptr, pnBuf uintptr) int32 { /* sqlite3.c:231341:12: */
+func fts5PorterStep4(tls *libc.TLS, aBuf uintptr, pnBuf uintptr) int32 { /* sqlite3.c:232617:12: */
var ret int32 = 0
var nBuf int32 = *(*int32)(unsafe.Pointer(pnBuf))
- switch int32(*(*int8)(unsafe.Pointer(aBuf + uintptr((nBuf - 2))))) {
+ switch int32(*(*uint8)(unsafe.Pointer(aBuf + uintptr((nBuf - 2))))) {
case 'a':
- if (nBuf > 2) && (0 == libc.Xmemcmp(tls, ts+34060 /* "al" */, (aBuf+uintptr((nBuf-2))), uint64(2))) {
+ if (nBuf > 2) && (0 == libc.Xmemcmp(tls, ts+35209 /* "al" */, (aBuf+uintptr((nBuf-2))), uint64(2))) {
if fts5Porter_MGt1(tls, aBuf, (nBuf-2)) != 0 {
*(*int32)(unsafe.Pointer(pnBuf)) = (nBuf - 2)
}
@@ -181647,11 +189097,11 @@ func fts5PorterStep4(tls *libc.TLS, aBuf uintptr, pnBuf uintptr) int32 { /* sqli
break
case 'c':
- if (nBuf > 4) && (0 == libc.Xmemcmp(tls, ts+34063 /* "ance" */, (aBuf+uintptr((nBuf-4))), uint64(4))) {
+ if (nBuf > 4) && (0 == libc.Xmemcmp(tls, ts+35212 /* "ance" */, (aBuf+uintptr((nBuf-4))), uint64(4))) {
if fts5Porter_MGt1(tls, aBuf, (nBuf-4)) != 0 {
*(*int32)(unsafe.Pointer(pnBuf)) = (nBuf - 4)
}
- } else if (nBuf > 4) && (0 == libc.Xmemcmp(tls, ts+34068 /* "ence" */, (aBuf+uintptr((nBuf-4))), uint64(4))) {
+ } else if (nBuf > 4) && (0 == libc.Xmemcmp(tls, ts+35217 /* "ence" */, (aBuf+uintptr((nBuf-4))), uint64(4))) {
if fts5Porter_MGt1(tls, aBuf, (nBuf-4)) != 0 {
*(*int32)(unsafe.Pointer(pnBuf)) = (nBuf - 4)
}
@@ -181659,7 +189109,7 @@ func fts5PorterStep4(tls *libc.TLS, aBuf uintptr, pnBuf uintptr) int32 { /* sqli
break
case 'e':
- if (nBuf > 2) && (0 == libc.Xmemcmp(tls, ts+34073 /* "er" */, (aBuf+uintptr((nBuf-2))), uint64(2))) {
+ if (nBuf > 2) && (0 == libc.Xmemcmp(tls, ts+35222 /* "er" */, (aBuf+uintptr((nBuf-2))), uint64(2))) {
if fts5Porter_MGt1(tls, aBuf, (nBuf-2)) != 0 {
*(*int32)(unsafe.Pointer(pnBuf)) = (nBuf - 2)
}
@@ -181667,7 +189117,7 @@ func fts5PorterStep4(tls *libc.TLS, aBuf uintptr, pnBuf uintptr) int32 { /* sqli
break
case 'i':
- if (nBuf > 2) && (0 == libc.Xmemcmp(tls, ts+34076 /* "ic" */, (aBuf+uintptr((nBuf-2))), uint64(2))) {
+ if (nBuf > 2) && (0 == libc.Xmemcmp(tls, ts+35225 /* "ic" */, (aBuf+uintptr((nBuf-2))), uint64(2))) {
if fts5Porter_MGt1(tls, aBuf, (nBuf-2)) != 0 {
*(*int32)(unsafe.Pointer(pnBuf)) = (nBuf - 2)
}
@@ -181675,11 +189125,11 @@ func fts5PorterStep4(tls *libc.TLS, aBuf uintptr, pnBuf uintptr) int32 { /* sqli
break
case 'l':
- if (nBuf > 4) && (0 == libc.Xmemcmp(tls, ts+34079 /* "able" */, (aBuf+uintptr((nBuf-4))), uint64(4))) {
+ if (nBuf > 4) && (0 == libc.Xmemcmp(tls, ts+35228 /* "able" */, (aBuf+uintptr((nBuf-4))), uint64(4))) {
if fts5Porter_MGt1(tls, aBuf, (nBuf-4)) != 0 {
*(*int32)(unsafe.Pointer(pnBuf)) = (nBuf - 4)
}
- } else if (nBuf > 4) && (0 == libc.Xmemcmp(tls, ts+34084 /* "ible" */, (aBuf+uintptr((nBuf-4))), uint64(4))) {
+ } else if (nBuf > 4) && (0 == libc.Xmemcmp(tls, ts+35233 /* "ible" */, (aBuf+uintptr((nBuf-4))), uint64(4))) {
if fts5Porter_MGt1(tls, aBuf, (nBuf-4)) != 0 {
*(*int32)(unsafe.Pointer(pnBuf)) = (nBuf - 4)
}
@@ -181687,19 +189137,19 @@ func fts5PorterStep4(tls *libc.TLS, aBuf uintptr, pnBuf uintptr) int32 { /* sqli
break
case 'n':
- if (nBuf > 3) && (0 == libc.Xmemcmp(tls, ts+34089 /* "ant" */, (aBuf+uintptr((nBuf-3))), uint64(3))) {
+ if (nBuf > 3) && (0 == libc.Xmemcmp(tls, ts+35238 /* "ant" */, (aBuf+uintptr((nBuf-3))), uint64(3))) {
if fts5Porter_MGt1(tls, aBuf, (nBuf-3)) != 0 {
*(*int32)(unsafe.Pointer(pnBuf)) = (nBuf - 3)
}
- } else if (nBuf > 5) && (0 == libc.Xmemcmp(tls, ts+34093 /* "ement" */, (aBuf+uintptr((nBuf-5))), uint64(5))) {
+ } else if (nBuf > 5) && (0 == libc.Xmemcmp(tls, ts+35242 /* "ement" */, (aBuf+uintptr((nBuf-5))), uint64(5))) {
if fts5Porter_MGt1(tls, aBuf, (nBuf-5)) != 0 {
*(*int32)(unsafe.Pointer(pnBuf)) = (nBuf - 5)
}
- } else if (nBuf > 4) && (0 == libc.Xmemcmp(tls, ts+34099 /* "ment" */, (aBuf+uintptr((nBuf-4))), uint64(4))) {
+ } else if (nBuf > 4) && (0 == libc.Xmemcmp(tls, ts+35248 /* "ment" */, (aBuf+uintptr((nBuf-4))), uint64(4))) {
if fts5Porter_MGt1(tls, aBuf, (nBuf-4)) != 0 {
*(*int32)(unsafe.Pointer(pnBuf)) = (nBuf - 4)
}
- } else if (nBuf > 3) && (0 == libc.Xmemcmp(tls, ts+34104 /* "ent" */, (aBuf+uintptr((nBuf-3))), uint64(3))) {
+ } else if (nBuf > 3) && (0 == libc.Xmemcmp(tls, ts+35253 /* "ent" */, (aBuf+uintptr((nBuf-3))), uint64(3))) {
if fts5Porter_MGt1(tls, aBuf, (nBuf-3)) != 0 {
*(*int32)(unsafe.Pointer(pnBuf)) = (nBuf - 3)
}
@@ -181707,11 +189157,11 @@ func fts5PorterStep4(tls *libc.TLS, aBuf uintptr, pnBuf uintptr) int32 { /* sqli
break
case 'o':
- if (nBuf > 3) && (0 == libc.Xmemcmp(tls, ts+34108 /* "ion" */, (aBuf+uintptr((nBuf-3))), uint64(3))) {
+ if (nBuf > 3) && (0 == libc.Xmemcmp(tls, ts+35257 /* "ion" */, (aBuf+uintptr((nBuf-3))), uint64(3))) {
if fts5Porter_MGt1_and_S_or_T(tls, aBuf, (nBuf-3)) != 0 {
*(*int32)(unsafe.Pointer(pnBuf)) = (nBuf - 3)
}
- } else if (nBuf > 2) && (0 == libc.Xmemcmp(tls, ts+34112 /* "ou" */, (aBuf+uintptr((nBuf-2))), uint64(2))) {
+ } else if (nBuf > 2) && (0 == libc.Xmemcmp(tls, ts+35261 /* "ou" */, (aBuf+uintptr((nBuf-2))), uint64(2))) {
if fts5Porter_MGt1(tls, aBuf, (nBuf-2)) != 0 {
*(*int32)(unsafe.Pointer(pnBuf)) = (nBuf - 2)
}
@@ -181719,7 +189169,7 @@ func fts5PorterStep4(tls *libc.TLS, aBuf uintptr, pnBuf uintptr) int32 { /* sqli
break
case 's':
- if (nBuf > 3) && (0 == libc.Xmemcmp(tls, ts+34115 /* "ism" */, (aBuf+uintptr((nBuf-3))), uint64(3))) {
+ if (nBuf > 3) && (0 == libc.Xmemcmp(tls, ts+35264 /* "ism" */, (aBuf+uintptr((nBuf-3))), uint64(3))) {
if fts5Porter_MGt1(tls, aBuf, (nBuf-3)) != 0 {
*(*int32)(unsafe.Pointer(pnBuf)) = (nBuf - 3)
}
@@ -181727,11 +189177,11 @@ func fts5PorterStep4(tls *libc.TLS, aBuf uintptr, pnBuf uintptr) int32 { /* sqli
break
case 't':
- if (nBuf > 3) && (0 == libc.Xmemcmp(tls, ts+34119 /* "ate" */, (aBuf+uintptr((nBuf-3))), uint64(3))) {
+ if (nBuf > 3) && (0 == libc.Xmemcmp(tls, ts+35268 /* "ate" */, (aBuf+uintptr((nBuf-3))), uint64(3))) {
if fts5Porter_MGt1(tls, aBuf, (nBuf-3)) != 0 {
*(*int32)(unsafe.Pointer(pnBuf)) = (nBuf - 3)
}
- } else if (nBuf > 3) && (0 == libc.Xmemcmp(tls, ts+34123 /* "iti" */, (aBuf+uintptr((nBuf-3))), uint64(3))) {
+ } else if (nBuf > 3) && (0 == libc.Xmemcmp(tls, ts+35272 /* "iti" */, (aBuf+uintptr((nBuf-3))), uint64(3))) {
if fts5Porter_MGt1(tls, aBuf, (nBuf-3)) != 0 {
*(*int32)(unsafe.Pointer(pnBuf)) = (nBuf - 3)
}
@@ -181739,7 +189189,7 @@ func fts5PorterStep4(tls *libc.TLS, aBuf uintptr, pnBuf uintptr) int32 { /* sqli
break
case 'u':
- if (nBuf > 3) && (0 == libc.Xmemcmp(tls, ts+34127 /* "ous" */, (aBuf+uintptr((nBuf-3))), uint64(3))) {
+ if (nBuf > 3) && (0 == libc.Xmemcmp(tls, ts+35276 /* "ous" */, (aBuf+uintptr((nBuf-3))), uint64(3))) {
if fts5Porter_MGt1(tls, aBuf, (nBuf-3)) != 0 {
*(*int32)(unsafe.Pointer(pnBuf)) = (nBuf - 3)
}
@@ -181747,7 +189197,7 @@ func fts5PorterStep4(tls *libc.TLS, aBuf uintptr, pnBuf uintptr) int32 { /* sqli
break
case 'v':
- if (nBuf > 3) && (0 == libc.Xmemcmp(tls, ts+34131 /* "ive" */, (aBuf+uintptr((nBuf-3))), uint64(3))) {
+ if (nBuf > 3) && (0 == libc.Xmemcmp(tls, ts+35280 /* "ive" */, (aBuf+uintptr((nBuf-3))), uint64(3))) {
if fts5Porter_MGt1(tls, aBuf, (nBuf-3)) != 0 {
*(*int32)(unsafe.Pointer(pnBuf)) = (nBuf - 3)
}
@@ -181755,7 +189205,7 @@ func fts5PorterStep4(tls *libc.TLS, aBuf uintptr, pnBuf uintptr) int32 { /* sqli
break
case 'z':
- if (nBuf > 3) && (0 == libc.Xmemcmp(tls, ts+34135 /* "ize" */, (aBuf+uintptr((nBuf-3))), uint64(3))) {
+ if (nBuf > 3) && (0 == libc.Xmemcmp(tls, ts+35284 /* "ize" */, (aBuf+uintptr((nBuf-3))), uint64(3))) {
if fts5Porter_MGt1(tls, aBuf, (nBuf-3)) != 0 {
*(*int32)(unsafe.Pointer(pnBuf)) = (nBuf - 3)
}
@@ -181766,30 +189216,30 @@ func fts5PorterStep4(tls *libc.TLS, aBuf uintptr, pnBuf uintptr) int32 { /* sqli
return ret
}
-func fts5PorterStep1B2(tls *libc.TLS, aBuf uintptr, pnBuf uintptr) int32 { /* sqlite3.c:231475:12: */
+func fts5PorterStep1B2(tls *libc.TLS, aBuf uintptr, pnBuf uintptr) int32 { /* sqlite3.c:232751:12: */
var ret int32 = 0
var nBuf int32 = *(*int32)(unsafe.Pointer(pnBuf))
- switch int32(*(*int8)(unsafe.Pointer(aBuf + uintptr((nBuf - 2))))) {
+ switch int32(*(*uint8)(unsafe.Pointer(aBuf + uintptr((nBuf - 2))))) {
case 'a':
- if (nBuf > 2) && (0 == libc.Xmemcmp(tls, ts+34139 /* "at" */, (aBuf+uintptr((nBuf-2))), uint64(2))) {
- libc.Xmemcpy(tls, (aBuf + uintptr((nBuf - 2))), ts+34119 /* "ate" */, uint64(3))
+ if (nBuf > 2) && (0 == libc.Xmemcmp(tls, ts+35288 /* "at" */, (aBuf+uintptr((nBuf-2))), uint64(2))) {
+ libc.Xmemcpy(tls, (aBuf + uintptr((nBuf - 2))), ts+35268 /* "ate" */, uint64(3))
*(*int32)(unsafe.Pointer(pnBuf)) = ((nBuf - 2) + 3)
ret = 1
}
break
case 'b':
- if (nBuf > 2) && (0 == libc.Xmemcmp(tls, ts+34142 /* "bl" */, (aBuf+uintptr((nBuf-2))), uint64(2))) {
- libc.Xmemcpy(tls, (aBuf + uintptr((nBuf - 2))), ts+34145 /* "ble" */, uint64(3))
+ if (nBuf > 2) && (0 == libc.Xmemcmp(tls, ts+35291 /* "bl" */, (aBuf+uintptr((nBuf-2))), uint64(2))) {
+ libc.Xmemcpy(tls, (aBuf + uintptr((nBuf - 2))), ts+35294 /* "ble" */, uint64(3))
*(*int32)(unsafe.Pointer(pnBuf)) = ((nBuf - 2) + 3)
ret = 1
}
break
case 'i':
- if (nBuf > 2) && (0 == libc.Xmemcmp(tls, ts+34149 /* "iz" */, (aBuf+uintptr((nBuf-2))), uint64(2))) {
- libc.Xmemcpy(tls, (aBuf + uintptr((nBuf - 2))), ts+34135 /* "ize" */, uint64(3))
+ if (nBuf > 2) && (0 == libc.Xmemcmp(tls, ts+35298 /* "iz" */, (aBuf+uintptr((nBuf-2))), uint64(2))) {
+ libc.Xmemcpy(tls, (aBuf + uintptr((nBuf - 2))), ts+35284 /* "ize" */, uint64(3))
*(*int32)(unsafe.Pointer(pnBuf)) = ((nBuf - 2) + 3)
ret = 1
}
@@ -181799,143 +189249,143 @@ func fts5PorterStep1B2(tls *libc.TLS, aBuf uintptr, pnBuf uintptr) int32 { /* sq
return ret
}
-func fts5PorterStep2(tls *libc.TLS, aBuf uintptr, pnBuf uintptr) int32 { /* sqlite3.c:231509:12: */
+func fts5PorterStep2(tls *libc.TLS, aBuf uintptr, pnBuf uintptr) int32 { /* sqlite3.c:232785:12: */
var ret int32 = 0
var nBuf int32 = *(*int32)(unsafe.Pointer(pnBuf))
- switch int32(*(*int8)(unsafe.Pointer(aBuf + uintptr((nBuf - 2))))) {
+ switch int32(*(*uint8)(unsafe.Pointer(aBuf + uintptr((nBuf - 2))))) {
case 'a':
- if (nBuf > 7) && (0 == libc.Xmemcmp(tls, ts+34152 /* "ational" */, (aBuf+uintptr((nBuf-7))), uint64(7))) {
+ if (nBuf > 7) && (0 == libc.Xmemcmp(tls, ts+35301 /* "ational" */, (aBuf+uintptr((nBuf-7))), uint64(7))) {
if fts5Porter_MGt0(tls, aBuf, (nBuf-7)) != 0 {
- libc.Xmemcpy(tls, (aBuf + uintptr((nBuf - 7))), ts+34119 /* "ate" */, uint64(3))
+ libc.Xmemcpy(tls, (aBuf + uintptr((nBuf - 7))), ts+35268 /* "ate" */, uint64(3))
*(*int32)(unsafe.Pointer(pnBuf)) = ((nBuf - 7) + 3)
}
- } else if (nBuf > 6) && (0 == libc.Xmemcmp(tls, ts+34160 /* "tional" */, (aBuf+uintptr((nBuf-6))), uint64(6))) {
+ } else if (nBuf > 6) && (0 == libc.Xmemcmp(tls, ts+35309 /* "tional" */, (aBuf+uintptr((nBuf-6))), uint64(6))) {
if fts5Porter_MGt0(tls, aBuf, (nBuf-6)) != 0 {
- libc.Xmemcpy(tls, (aBuf + uintptr((nBuf - 6))), ts+34167 /* "tion" */, uint64(4))
+ libc.Xmemcpy(tls, (aBuf + uintptr((nBuf - 6))), ts+35316 /* "tion" */, uint64(4))
*(*int32)(unsafe.Pointer(pnBuf)) = ((nBuf - 6) + 4)
}
}
break
case 'c':
- if (nBuf > 4) && (0 == libc.Xmemcmp(tls, ts+34172 /* "enci" */, (aBuf+uintptr((nBuf-4))), uint64(4))) {
+ if (nBuf > 4) && (0 == libc.Xmemcmp(tls, ts+35321 /* "enci" */, (aBuf+uintptr((nBuf-4))), uint64(4))) {
if fts5Porter_MGt0(tls, aBuf, (nBuf-4)) != 0 {
- libc.Xmemcpy(tls, (aBuf + uintptr((nBuf - 4))), ts+34068 /* "ence" */, uint64(4))
+ libc.Xmemcpy(tls, (aBuf + uintptr((nBuf - 4))), ts+35217 /* "ence" */, uint64(4))
*(*int32)(unsafe.Pointer(pnBuf)) = ((nBuf - 4) + 4)
}
- } else if (nBuf > 4) && (0 == libc.Xmemcmp(tls, ts+34177 /* "anci" */, (aBuf+uintptr((nBuf-4))), uint64(4))) {
+ } else if (nBuf > 4) && (0 == libc.Xmemcmp(tls, ts+35326 /* "anci" */, (aBuf+uintptr((nBuf-4))), uint64(4))) {
if fts5Porter_MGt0(tls, aBuf, (nBuf-4)) != 0 {
- libc.Xmemcpy(tls, (aBuf + uintptr((nBuf - 4))), ts+34063 /* "ance" */, uint64(4))
+ libc.Xmemcpy(tls, (aBuf + uintptr((nBuf - 4))), ts+35212 /* "ance" */, uint64(4))
*(*int32)(unsafe.Pointer(pnBuf)) = ((nBuf - 4) + 4)
}
}
break
case 'e':
- if (nBuf > 4) && (0 == libc.Xmemcmp(tls, ts+34182 /* "izer" */, (aBuf+uintptr((nBuf-4))), uint64(4))) {
+ if (nBuf > 4) && (0 == libc.Xmemcmp(tls, ts+35331 /* "izer" */, (aBuf+uintptr((nBuf-4))), uint64(4))) {
if fts5Porter_MGt0(tls, aBuf, (nBuf-4)) != 0 {
- libc.Xmemcpy(tls, (aBuf + uintptr((nBuf - 4))), ts+34135 /* "ize" */, uint64(3))
+ libc.Xmemcpy(tls, (aBuf + uintptr((nBuf - 4))), ts+35284 /* "ize" */, uint64(3))
*(*int32)(unsafe.Pointer(pnBuf)) = ((nBuf - 4) + 3)
}
}
break
case 'g':
- if (nBuf > 4) && (0 == libc.Xmemcmp(tls, ts+34187 /* "logi" */, (aBuf+uintptr((nBuf-4))), uint64(4))) {
+ if (nBuf > 4) && (0 == libc.Xmemcmp(tls, ts+35336 /* "logi" */, (aBuf+uintptr((nBuf-4))), uint64(4))) {
if fts5Porter_MGt0(tls, aBuf, (nBuf-4)) != 0 {
- libc.Xmemcpy(tls, (aBuf + uintptr((nBuf - 4))), ts+14323 /* "log" */, uint64(3))
+ libc.Xmemcpy(tls, (aBuf + uintptr((nBuf - 4))), ts+14778 /* "log" */, uint64(3))
*(*int32)(unsafe.Pointer(pnBuf)) = ((nBuf - 4) + 3)
}
}
break
case 'l':
- if (nBuf > 3) && (0 == libc.Xmemcmp(tls, ts+34192 /* "bli" */, (aBuf+uintptr((nBuf-3))), uint64(3))) {
+ if (nBuf > 3) && (0 == libc.Xmemcmp(tls, ts+35341 /* "bli" */, (aBuf+uintptr((nBuf-3))), uint64(3))) {
if fts5Porter_MGt0(tls, aBuf, (nBuf-3)) != 0 {
- libc.Xmemcpy(tls, (aBuf + uintptr((nBuf - 3))), ts+34145 /* "ble" */, uint64(3))
+ libc.Xmemcpy(tls, (aBuf + uintptr((nBuf - 3))), ts+35294 /* "ble" */, uint64(3))
*(*int32)(unsafe.Pointer(pnBuf)) = ((nBuf - 3) + 3)
}
- } else if (nBuf > 4) && (0 == libc.Xmemcmp(tls, ts+34196 /* "alli" */, (aBuf+uintptr((nBuf-4))), uint64(4))) {
+ } else if (nBuf > 4) && (0 == libc.Xmemcmp(tls, ts+35345 /* "alli" */, (aBuf+uintptr((nBuf-4))), uint64(4))) {
if fts5Porter_MGt0(tls, aBuf, (nBuf-4)) != 0 {
- libc.Xmemcpy(tls, (aBuf + uintptr((nBuf - 4))), ts+34060 /* "al" */, uint64(2))
+ libc.Xmemcpy(tls, (aBuf + uintptr((nBuf - 4))), ts+35209 /* "al" */, uint64(2))
*(*int32)(unsafe.Pointer(pnBuf)) = ((nBuf - 4) + 2)
}
- } else if (nBuf > 5) && (0 == libc.Xmemcmp(tls, ts+34201 /* "entli" */, (aBuf+uintptr((nBuf-5))), uint64(5))) {
+ } else if (nBuf > 5) && (0 == libc.Xmemcmp(tls, ts+35350 /* "entli" */, (aBuf+uintptr((nBuf-5))), uint64(5))) {
if fts5Porter_MGt0(tls, aBuf, (nBuf-5)) != 0 {
- libc.Xmemcpy(tls, (aBuf + uintptr((nBuf - 5))), ts+34104 /* "ent" */, uint64(3))
+ libc.Xmemcpy(tls, (aBuf + uintptr((nBuf - 5))), ts+35253 /* "ent" */, uint64(3))
*(*int32)(unsafe.Pointer(pnBuf)) = ((nBuf - 5) + 3)
}
- } else if (nBuf > 3) && (0 == libc.Xmemcmp(tls, ts+34207 /* "eli" */, (aBuf+uintptr((nBuf-3))), uint64(3))) {
+ } else if (nBuf > 3) && (0 == libc.Xmemcmp(tls, ts+35356 /* "eli" */, (aBuf+uintptr((nBuf-3))), uint64(3))) {
if fts5Porter_MGt0(tls, aBuf, (nBuf-3)) != 0 {
- libc.Xmemcpy(tls, (aBuf + uintptr((nBuf - 3))), ts+34211 /* "e" */, uint64(1))
+ libc.Xmemcpy(tls, (aBuf + uintptr((nBuf - 3))), ts+35360 /* "e" */, uint64(1))
*(*int32)(unsafe.Pointer(pnBuf)) = ((nBuf - 3) + 1)
}
- } else if (nBuf > 5) && (0 == libc.Xmemcmp(tls, ts+34213 /* "ousli" */, (aBuf+uintptr((nBuf-5))), uint64(5))) {
+ } else if (nBuf > 5) && (0 == libc.Xmemcmp(tls, ts+35362 /* "ousli" */, (aBuf+uintptr((nBuf-5))), uint64(5))) {
if fts5Porter_MGt0(tls, aBuf, (nBuf-5)) != 0 {
- libc.Xmemcpy(tls, (aBuf + uintptr((nBuf - 5))), ts+34127 /* "ous" */, uint64(3))
+ libc.Xmemcpy(tls, (aBuf + uintptr((nBuf - 5))), ts+35276 /* "ous" */, uint64(3))
*(*int32)(unsafe.Pointer(pnBuf)) = ((nBuf - 5) + 3)
}
}
break
case 'o':
- if (nBuf > 7) && (0 == libc.Xmemcmp(tls, ts+34219 /* "ization" */, (aBuf+uintptr((nBuf-7))), uint64(7))) {
+ if (nBuf > 7) && (0 == libc.Xmemcmp(tls, ts+35368 /* "ization" */, (aBuf+uintptr((nBuf-7))), uint64(7))) {
if fts5Porter_MGt0(tls, aBuf, (nBuf-7)) != 0 {
- libc.Xmemcpy(tls, (aBuf + uintptr((nBuf - 7))), ts+34135 /* "ize" */, uint64(3))
+ libc.Xmemcpy(tls, (aBuf + uintptr((nBuf - 7))), ts+35284 /* "ize" */, uint64(3))
*(*int32)(unsafe.Pointer(pnBuf)) = ((nBuf - 7) + 3)
}
- } else if (nBuf > 5) && (0 == libc.Xmemcmp(tls, ts+34227 /* "ation" */, (aBuf+uintptr((nBuf-5))), uint64(5))) {
+ } else if (nBuf > 5) && (0 == libc.Xmemcmp(tls, ts+35376 /* "ation" */, (aBuf+uintptr((nBuf-5))), uint64(5))) {
if fts5Porter_MGt0(tls, aBuf, (nBuf-5)) != 0 {
- libc.Xmemcpy(tls, (aBuf + uintptr((nBuf - 5))), ts+34119 /* "ate" */, uint64(3))
+ libc.Xmemcpy(tls, (aBuf + uintptr((nBuf - 5))), ts+35268 /* "ate" */, uint64(3))
*(*int32)(unsafe.Pointer(pnBuf)) = ((nBuf - 5) + 3)
}
- } else if (nBuf > 4) && (0 == libc.Xmemcmp(tls, ts+34233 /* "ator" */, (aBuf+uintptr((nBuf-4))), uint64(4))) {
+ } else if (nBuf > 4) && (0 == libc.Xmemcmp(tls, ts+35382 /* "ator" */, (aBuf+uintptr((nBuf-4))), uint64(4))) {
if fts5Porter_MGt0(tls, aBuf, (nBuf-4)) != 0 {
- libc.Xmemcpy(tls, (aBuf + uintptr((nBuf - 4))), ts+34119 /* "ate" */, uint64(3))
+ libc.Xmemcpy(tls, (aBuf + uintptr((nBuf - 4))), ts+35268 /* "ate" */, uint64(3))
*(*int32)(unsafe.Pointer(pnBuf)) = ((nBuf - 4) + 3)
}
}
break
case 's':
- if (nBuf > 5) && (0 == libc.Xmemcmp(tls, ts+34238 /* "alism" */, (aBuf+uintptr((nBuf-5))), uint64(5))) {
+ if (nBuf > 5) && (0 == libc.Xmemcmp(tls, ts+35387 /* "alism" */, (aBuf+uintptr((nBuf-5))), uint64(5))) {
if fts5Porter_MGt0(tls, aBuf, (nBuf-5)) != 0 {
- libc.Xmemcpy(tls, (aBuf + uintptr((nBuf - 5))), ts+34060 /* "al" */, uint64(2))
+ libc.Xmemcpy(tls, (aBuf + uintptr((nBuf - 5))), ts+35209 /* "al" */, uint64(2))
*(*int32)(unsafe.Pointer(pnBuf)) = ((nBuf - 5) + 2)
}
- } else if (nBuf > 7) && (0 == libc.Xmemcmp(tls, ts+34244 /* "iveness" */, (aBuf+uintptr((nBuf-7))), uint64(7))) {
+ } else if (nBuf > 7) && (0 == libc.Xmemcmp(tls, ts+35393 /* "iveness" */, (aBuf+uintptr((nBuf-7))), uint64(7))) {
if fts5Porter_MGt0(tls, aBuf, (nBuf-7)) != 0 {
- libc.Xmemcpy(tls, (aBuf + uintptr((nBuf - 7))), ts+34131 /* "ive" */, uint64(3))
+ libc.Xmemcpy(tls, (aBuf + uintptr((nBuf - 7))), ts+35280 /* "ive" */, uint64(3))
*(*int32)(unsafe.Pointer(pnBuf)) = ((nBuf - 7) + 3)
}
- } else if (nBuf > 7) && (0 == libc.Xmemcmp(tls, ts+34252 /* "fulness" */, (aBuf+uintptr((nBuf-7))), uint64(7))) {
+ } else if (nBuf > 7) && (0 == libc.Xmemcmp(tls, ts+35401 /* "fulness" */, (aBuf+uintptr((nBuf-7))), uint64(7))) {
if fts5Porter_MGt0(tls, aBuf, (nBuf-7)) != 0 {
- libc.Xmemcpy(tls, (aBuf + uintptr((nBuf - 7))), ts+34260 /* "ful" */, uint64(3))
+ libc.Xmemcpy(tls, (aBuf + uintptr((nBuf - 7))), ts+35409 /* "ful" */, uint64(3))
*(*int32)(unsafe.Pointer(pnBuf)) = ((nBuf - 7) + 3)
}
- } else if (nBuf > 7) && (0 == libc.Xmemcmp(tls, ts+34264 /* "ousness" */, (aBuf+uintptr((nBuf-7))), uint64(7))) {
+ } else if (nBuf > 7) && (0 == libc.Xmemcmp(tls, ts+35413 /* "ousness" */, (aBuf+uintptr((nBuf-7))), uint64(7))) {
if fts5Porter_MGt0(tls, aBuf, (nBuf-7)) != 0 {
- libc.Xmemcpy(tls, (aBuf + uintptr((nBuf - 7))), ts+34127 /* "ous" */, uint64(3))
+ libc.Xmemcpy(tls, (aBuf + uintptr((nBuf - 7))), ts+35276 /* "ous" */, uint64(3))
*(*int32)(unsafe.Pointer(pnBuf)) = ((nBuf - 7) + 3)
}
}
break
case 't':
- if (nBuf > 5) && (0 == libc.Xmemcmp(tls, ts+34272 /* "aliti" */, (aBuf+uintptr((nBuf-5))), uint64(5))) {
+ if (nBuf > 5) && (0 == libc.Xmemcmp(tls, ts+35421 /* "aliti" */, (aBuf+uintptr((nBuf-5))), uint64(5))) {
if fts5Porter_MGt0(tls, aBuf, (nBuf-5)) != 0 {
- libc.Xmemcpy(tls, (aBuf + uintptr((nBuf - 5))), ts+34060 /* "al" */, uint64(2))
+ libc.Xmemcpy(tls, (aBuf + uintptr((nBuf - 5))), ts+35209 /* "al" */, uint64(2))
*(*int32)(unsafe.Pointer(pnBuf)) = ((nBuf - 5) + 2)
}
- } else if (nBuf > 5) && (0 == libc.Xmemcmp(tls, ts+34278 /* "iviti" */, (aBuf+uintptr((nBuf-5))), uint64(5))) {
+ } else if (nBuf > 5) && (0 == libc.Xmemcmp(tls, ts+35427 /* "iviti" */, (aBuf+uintptr((nBuf-5))), uint64(5))) {
if fts5Porter_MGt0(tls, aBuf, (nBuf-5)) != 0 {
- libc.Xmemcpy(tls, (aBuf + uintptr((nBuf - 5))), ts+34131 /* "ive" */, uint64(3))
+ libc.Xmemcpy(tls, (aBuf + uintptr((nBuf - 5))), ts+35280 /* "ive" */, uint64(3))
*(*int32)(unsafe.Pointer(pnBuf)) = ((nBuf - 5) + 3)
}
- } else if (nBuf > 6) && (0 == libc.Xmemcmp(tls, ts+34284 /* "biliti" */, (aBuf+uintptr((nBuf-6))), uint64(6))) {
+ } else if (nBuf > 6) && (0 == libc.Xmemcmp(tls, ts+35433 /* "biliti" */, (aBuf+uintptr((nBuf-6))), uint64(6))) {
if fts5Porter_MGt0(tls, aBuf, (nBuf-6)) != 0 {
- libc.Xmemcpy(tls, (aBuf + uintptr((nBuf - 6))), ts+34145 /* "ble" */, uint64(3))
+ libc.Xmemcpy(tls, (aBuf + uintptr((nBuf - 6))), ts+35294 /* "ble" */, uint64(3))
*(*int32)(unsafe.Pointer(pnBuf)) = ((nBuf - 6) + 3)
}
}
@@ -181945,22 +189395,22 @@ func fts5PorterStep2(tls *libc.TLS, aBuf uintptr, pnBuf uintptr) int32 { /* sqli
return ret
}
-func fts5PorterStep3(tls *libc.TLS, aBuf uintptr, pnBuf uintptr) int32 { /* sqlite3.c:231656:12: */
+func fts5PorterStep3(tls *libc.TLS, aBuf uintptr, pnBuf uintptr) int32 { /* sqlite3.c:232932:12: */
var ret int32 = 0
var nBuf int32 = *(*int32)(unsafe.Pointer(pnBuf))
- switch int32(*(*int8)(unsafe.Pointer(aBuf + uintptr((nBuf - 2))))) {
+ switch int32(*(*uint8)(unsafe.Pointer(aBuf + uintptr((nBuf - 2))))) {
case 'a':
- if (nBuf > 4) && (0 == libc.Xmemcmp(tls, ts+34291 /* "ical" */, (aBuf+uintptr((nBuf-4))), uint64(4))) {
+ if (nBuf > 4) && (0 == libc.Xmemcmp(tls, ts+35440 /* "ical" */, (aBuf+uintptr((nBuf-4))), uint64(4))) {
if fts5Porter_MGt0(tls, aBuf, (nBuf-4)) != 0 {
- libc.Xmemcpy(tls, (aBuf + uintptr((nBuf - 4))), ts+34076 /* "ic" */, uint64(2))
+ libc.Xmemcpy(tls, (aBuf + uintptr((nBuf - 4))), ts+35225 /* "ic" */, uint64(2))
*(*int32)(unsafe.Pointer(pnBuf)) = ((nBuf - 4) + 2)
}
}
break
case 's':
- if (nBuf > 4) && (0 == libc.Xmemcmp(tls, ts+34296 /* "ness" */, (aBuf+uintptr((nBuf-4))), uint64(4))) {
+ if (nBuf > 4) && (0 == libc.Xmemcmp(tls, ts+35445 /* "ness" */, (aBuf+uintptr((nBuf-4))), uint64(4))) {
if fts5Porter_MGt0(tls, aBuf, (nBuf-4)) != 0 {
*(*int32)(unsafe.Pointer(pnBuf)) = (nBuf - 4)
}
@@ -181968,21 +189418,21 @@ func fts5PorterStep3(tls *libc.TLS, aBuf uintptr, pnBuf uintptr) int32 { /* sqli
break
case 't':
- if (nBuf > 5) && (0 == libc.Xmemcmp(tls, ts+34301 /* "icate" */, (aBuf+uintptr((nBuf-5))), uint64(5))) {
+ if (nBuf > 5) && (0 == libc.Xmemcmp(tls, ts+35450 /* "icate" */, (aBuf+uintptr((nBuf-5))), uint64(5))) {
if fts5Porter_MGt0(tls, aBuf, (nBuf-5)) != 0 {
- libc.Xmemcpy(tls, (aBuf + uintptr((nBuf - 5))), ts+34076 /* "ic" */, uint64(2))
+ libc.Xmemcpy(tls, (aBuf + uintptr((nBuf - 5))), ts+35225 /* "ic" */, uint64(2))
*(*int32)(unsafe.Pointer(pnBuf)) = ((nBuf - 5) + 2)
}
- } else if (nBuf > 5) && (0 == libc.Xmemcmp(tls, ts+34307 /* "iciti" */, (aBuf+uintptr((nBuf-5))), uint64(5))) {
+ } else if (nBuf > 5) && (0 == libc.Xmemcmp(tls, ts+35456 /* "iciti" */, (aBuf+uintptr((nBuf-5))), uint64(5))) {
if fts5Porter_MGt0(tls, aBuf, (nBuf-5)) != 0 {
- libc.Xmemcpy(tls, (aBuf + uintptr((nBuf - 5))), ts+34076 /* "ic" */, uint64(2))
+ libc.Xmemcpy(tls, (aBuf + uintptr((nBuf - 5))), ts+35225 /* "ic" */, uint64(2))
*(*int32)(unsafe.Pointer(pnBuf)) = ((nBuf - 5) + 2)
}
}
break
case 'u':
- if (nBuf > 3) && (0 == libc.Xmemcmp(tls, ts+34260 /* "ful" */, (aBuf+uintptr((nBuf-3))), uint64(3))) {
+ if (nBuf > 3) && (0 == libc.Xmemcmp(tls, ts+35409 /* "ful" */, (aBuf+uintptr((nBuf-3))), uint64(3))) {
if fts5Porter_MGt0(tls, aBuf, (nBuf-3)) != 0 {
*(*int32)(unsafe.Pointer(pnBuf)) = (nBuf - 3)
}
@@ -181990,7 +189440,7 @@ func fts5PorterStep3(tls *libc.TLS, aBuf uintptr, pnBuf uintptr) int32 { /* sqli
break
case 'v':
- if (nBuf > 5) && (0 == libc.Xmemcmp(tls, ts+34313 /* "ative" */, (aBuf+uintptr((nBuf-5))), uint64(5))) {
+ if (nBuf > 5) && (0 == libc.Xmemcmp(tls, ts+35462 /* "ative" */, (aBuf+uintptr((nBuf-5))), uint64(5))) {
if fts5Porter_MGt0(tls, aBuf, (nBuf-5)) != 0 {
*(*int32)(unsafe.Pointer(pnBuf)) = (nBuf - 5)
}
@@ -181998,9 +189448,9 @@ func fts5PorterStep3(tls *libc.TLS, aBuf uintptr, pnBuf uintptr) int32 { /* sqli
break
case 'z':
- if (nBuf > 5) && (0 == libc.Xmemcmp(tls, ts+34319 /* "alize" */, (aBuf+uintptr((nBuf-5))), uint64(5))) {
+ if (nBuf > 5) && (0 == libc.Xmemcmp(tls, ts+35468 /* "alize" */, (aBuf+uintptr((nBuf-5))), uint64(5))) {
if fts5Porter_MGt0(tls, aBuf, (nBuf-5)) != 0 {
- libc.Xmemcpy(tls, (aBuf + uintptr((nBuf - 5))), ts+34060 /* "al" */, uint64(2))
+ libc.Xmemcpy(tls, (aBuf + uintptr((nBuf - 5))), ts+35209 /* "al" */, uint64(2))
*(*int32)(unsafe.Pointer(pnBuf)) = ((nBuf - 5) + 2)
}
}
@@ -182010,18 +189460,18 @@ func fts5PorterStep3(tls *libc.TLS, aBuf uintptr, pnBuf uintptr) int32 { /* sqli
return ret
}
-func fts5PorterStep1B(tls *libc.TLS, aBuf uintptr, pnBuf uintptr) int32 { /* sqlite3.c:231722:12: */
+func fts5PorterStep1B(tls *libc.TLS, aBuf uintptr, pnBuf uintptr) int32 { /* sqlite3.c:232998:12: */
var ret int32 = 0
var nBuf int32 = *(*int32)(unsafe.Pointer(pnBuf))
- switch int32(*(*int8)(unsafe.Pointer(aBuf + uintptr((nBuf - 2))))) {
+ switch int32(*(*uint8)(unsafe.Pointer(aBuf + uintptr((nBuf - 2))))) {
case 'e':
- if (nBuf > 3) && (0 == libc.Xmemcmp(tls, ts+34325 /* "eed" */, (aBuf+uintptr((nBuf-3))), uint64(3))) {
+ if (nBuf > 3) && (0 == libc.Xmemcmp(tls, ts+35474 /* "eed" */, (aBuf+uintptr((nBuf-3))), uint64(3))) {
if fts5Porter_MGt0(tls, aBuf, (nBuf-3)) != 0 {
- libc.Xmemcpy(tls, (aBuf + uintptr((nBuf - 3))), ts+34329 /* "ee" */, uint64(2))
+ libc.Xmemcpy(tls, (aBuf + uintptr((nBuf - 3))), ts+35478 /* "ee" */, uint64(2))
*(*int32)(unsafe.Pointer(pnBuf)) = ((nBuf - 3) + 2)
}
- } else if (nBuf > 2) && (0 == libc.Xmemcmp(tls, ts+34332 /* "ed" */, (aBuf+uintptr((nBuf-2))), uint64(2))) {
+ } else if (nBuf > 2) && (0 == libc.Xmemcmp(tls, ts+35481 /* "ed" */, (aBuf+uintptr((nBuf-2))), uint64(2))) {
if fts5Porter_Vowel(tls, aBuf, (nBuf-2)) != 0 {
*(*int32)(unsafe.Pointer(pnBuf)) = (nBuf - 2)
ret = 1
@@ -182030,7 +189480,7 @@ func fts5PorterStep1B(tls *libc.TLS, aBuf uintptr, pnBuf uintptr) int32 { /* sql
break
case 'n':
- if (nBuf > 3) && (0 == libc.Xmemcmp(tls, ts+34335 /* "ing" */, (aBuf+uintptr((nBuf-3))), uint64(3))) {
+ if (nBuf > 3) && (0 == libc.Xmemcmp(tls, ts+35484 /* "ing" */, (aBuf+uintptr((nBuf-3))), uint64(3))) {
if fts5Porter_Vowel(tls, aBuf, (nBuf-3)) != 0 {
*(*int32)(unsafe.Pointer(pnBuf)) = (nBuf - 3)
ret = 1
@@ -182047,23 +189497,23 @@ func fts5PorterStep1B(tls *libc.TLS, aBuf uintptr, pnBuf uintptr) int32 { /* sql
//
//
-func fts5PorterStep1A(tls *libc.TLS, aBuf uintptr, pnBuf uintptr) { /* sqlite3.c:231759:13: */
+func fts5PorterStep1A(tls *libc.TLS, aBuf uintptr, pnBuf uintptr) { /* sqlite3.c:233035:13: */
var nBuf int32 = *(*int32)(unsafe.Pointer(pnBuf))
- if int32(*(*int8)(unsafe.Pointer(aBuf + uintptr((nBuf - 1))))) == 's' {
- if int32(*(*int8)(unsafe.Pointer(aBuf + uintptr((nBuf - 2))))) == 'e' {
- if (((nBuf > 4) && (int32(*(*int8)(unsafe.Pointer(aBuf + uintptr((nBuf - 4))))) == 's')) && (int32(*(*int8)(unsafe.Pointer(aBuf + uintptr((nBuf - 3))))) == 's')) ||
- ((nBuf > 3) && (int32(*(*int8)(unsafe.Pointer(aBuf + uintptr((nBuf - 3))))) == 'i')) {
+ if int32(*(*uint8)(unsafe.Pointer(aBuf + uintptr((nBuf - 1))))) == 's' {
+ if int32(*(*uint8)(unsafe.Pointer(aBuf + uintptr((nBuf - 2))))) == 'e' {
+ if (((nBuf > 4) && (int32(*(*uint8)(unsafe.Pointer(aBuf + uintptr((nBuf - 4))))) == 's')) && (int32(*(*uint8)(unsafe.Pointer(aBuf + uintptr((nBuf - 3))))) == 's')) ||
+ ((nBuf > 3) && (int32(*(*uint8)(unsafe.Pointer(aBuf + uintptr((nBuf - 3))))) == 'i')) {
*(*int32)(unsafe.Pointer(pnBuf)) = (nBuf - 2)
} else {
*(*int32)(unsafe.Pointer(pnBuf)) = (nBuf - 1)
}
- } else if int32(*(*int8)(unsafe.Pointer(aBuf + uintptr((nBuf - 2))))) != 's' {
+ } else if int32(*(*uint8)(unsafe.Pointer(aBuf + uintptr((nBuf - 2))))) != 's' {
*(*int32)(unsafe.Pointer(pnBuf)) = (nBuf - 1)
}
}
}
-func fts5PorterCb(tls *libc.TLS, pCtx uintptr, tflags int32, pToken uintptr, nToken int32, iStart int32, iEnd int32) int32 { /* sqlite3.c:231777:12: */
+func fts5PorterCb(tls *libc.TLS, pCtx uintptr, tflags int32, pToken uintptr, nToken int32, iStart int32, iEnd int32) int32 { /* sqlite3.c:233053:12: */
bp := tls.Alloc(4)
defer tls.Free(4)
@@ -182071,7 +189521,7 @@ func fts5PorterCb(tls *libc.TLS, pCtx uintptr, tflags int32, pToken uintptr, nTo
var aBuf uintptr
// var nBuf int32 at bp, 4
- var c int8
+ var c uint8
p = pCtx
if !((nToken > FTS5_PORTER_MAX_TOKEN) || (nToken < 3)) {
@@ -182092,9 +189542,9 @@ __1:
if !(fts5PorterStep1B2(tls, aBuf, bp /* &nBuf */) == 0) {
goto __3
}
- c = *(*int8)(unsafe.Pointer(aBuf + uintptr((*(*int32)(unsafe.Pointer(bp /* nBuf */)) - 1))))
+ c = *(*uint8)(unsafe.Pointer(aBuf + uintptr((*(*int32)(unsafe.Pointer(bp /* nBuf */)) - 1))))
if !(((((fts5PorterIsVowel(tls, c, 0) == 0) &&
- (int32(c) != 'l')) && (int32(c) != 's')) && (int32(c) != 'z')) && (int32(c) == int32(*(*int8)(unsafe.Pointer(aBuf + uintptr((*(*int32)(unsafe.Pointer(bp /* nBuf */)) - 2))))))) {
+ (int32(c) != 'l')) && (int32(c) != 's')) && (int32(c) != 'z')) && (int32(c) == int32(*(*uint8)(unsafe.Pointer(aBuf + uintptr((*(*int32)(unsafe.Pointer(bp /* nBuf */)) - 2))))))) {
goto __4
}
*(*int32)(unsafe.Pointer(bp /* nBuf */))--
@@ -182103,7 +189553,7 @@ __4:
if !((fts5Porter_MEq1(tls, aBuf, *(*int32)(unsafe.Pointer(bp /* nBuf */))) != 0) && (fts5Porter_Ostar(tls, aBuf, *(*int32)(unsafe.Pointer(bp /* nBuf */))) != 0)) {
goto __6
}
- *(*int8)(unsafe.Pointer(aBuf + uintptr(libc.PostIncInt32(&*(*int32)(unsafe.Pointer(bp /* nBuf */)), 1)))) = int8('e')
+ *(*uint8)(unsafe.Pointer(aBuf + uintptr(libc.PostIncInt32(&*(*int32)(unsafe.Pointer(bp /* nBuf */)), 1)))) = uint8('e')
__6:
;
__5:
@@ -182114,10 +189564,10 @@ __2:
;
// Step 1C.
- if !((int32(*(*int8)(unsafe.Pointer(aBuf + uintptr((*(*int32)(unsafe.Pointer(bp /* nBuf */)) - 1))))) == 'y') && (fts5Porter_Vowel(tls, aBuf, (*(*int32)(unsafe.Pointer(bp /* nBuf */))-1)) != 0)) {
+ if !((int32(*(*uint8)(unsafe.Pointer(aBuf + uintptr((*(*int32)(unsafe.Pointer(bp /* nBuf */)) - 1))))) == 'y') && (fts5Porter_Vowel(tls, aBuf, (*(*int32)(unsafe.Pointer(bp /* nBuf */))-1)) != 0)) {
goto __7
}
- *(*int8)(unsafe.Pointer(aBuf + uintptr((*(*int32)(unsafe.Pointer(bp /* nBuf */)) - 1)))) = int8('i')
+ *(*uint8)(unsafe.Pointer(aBuf + uintptr((*(*int32)(unsafe.Pointer(bp /* nBuf */)) - 1)))) = uint8('i')
__7:
;
@@ -182128,7 +189578,7 @@ __7:
// Step 5a.
- if !(int32(*(*int8)(unsafe.Pointer(aBuf + uintptr((*(*int32)(unsafe.Pointer(bp /* nBuf */)) - 1))))) == 'e') {
+ if !(int32(*(*uint8)(unsafe.Pointer(aBuf + uintptr((*(*int32)(unsafe.Pointer(bp /* nBuf */)) - 1))))) == 'e') {
goto __8
}
if !((fts5Porter_MGt1(tls, aBuf, (*(*int32)(unsafe.Pointer(bp /* nBuf */))-1)) != 0) ||
@@ -182142,22 +189592,26 @@ __8:
;
// Step 5b.
- if !((((*(*int32)(unsafe.Pointer(bp /* nBuf */)) > 1) && (int32(*(*int8)(unsafe.Pointer(aBuf + uintptr((*(*int32)(unsafe.Pointer(bp /* nBuf */)) - 1))))) == 'l')) &&
- (int32(*(*int8)(unsafe.Pointer(aBuf + uintptr((*(*int32)(unsafe.Pointer(bp /* nBuf */)) - 2))))) == 'l')) && (fts5Porter_MGt1(tls, aBuf, (*(*int32)(unsafe.Pointer(bp /* nBuf */))-1)) != 0)) {
+ if !((((*(*int32)(unsafe.Pointer(bp /* nBuf */)) > 1) && (int32(*(*uint8)(unsafe.Pointer(aBuf + uintptr((*(*int32)(unsafe.Pointer(bp /* nBuf */)) - 1))))) == 'l')) &&
+ (int32(*(*uint8)(unsafe.Pointer(aBuf + uintptr((*(*int32)(unsafe.Pointer(bp /* nBuf */)) - 2))))) == 'l')) && (fts5Porter_MGt1(tls, aBuf, (*(*int32)(unsafe.Pointer(bp /* nBuf */))-1)) != 0)) {
goto __10
}
*(*int32)(unsafe.Pointer(bp /* nBuf */))--
__10:
;
- return (*(*func(*libc.TLS, uintptr, int32, uintptr, int32, int32, int32) int32)(unsafe.Pointer((p + 8 /* &.xToken */))))(tls, (*PorterContext)(unsafe.Pointer(p)).FpCtx, tflags, aBuf, *(*int32)(unsafe.Pointer(bp /* nBuf */)), iStart, iEnd)
+ return (*struct {
+ f func(*libc.TLS, uintptr, int32, uintptr, int32, int32, int32) int32
+ })(unsafe.Pointer(&struct{ uintptr }{(*PorterContext)(unsafe.Pointer(p)).FxToken})).f(tls, (*PorterContext)(unsafe.Pointer(p)).FpCtx, tflags, aBuf, *(*int32)(unsafe.Pointer(bp /* nBuf */)), iStart, iEnd)
pass_through:
- return (*(*func(*libc.TLS, uintptr, int32, uintptr, int32, int32, int32) int32)(unsafe.Pointer((p + 8 /* &.xToken */))))(tls, (*PorterContext)(unsafe.Pointer(p)).FpCtx, tflags, pToken, nToken, iStart, iEnd)
+ return (*struct {
+ f func(*libc.TLS, uintptr, int32, uintptr, int32, int32, int32) int32
+ })(unsafe.Pointer(&struct{ uintptr }{(*PorterContext)(unsafe.Pointer(p)).FxToken})).f(tls, (*PorterContext)(unsafe.Pointer(p)).FpCtx, tflags, pToken, nToken, iStart, iEnd)
}
// Tokenize using the porter tokenizer.
-func fts5PorterTokenize(tls *libc.TLS, pTokenizer uintptr, pCtx uintptr, flags int32, pText uintptr, nText int32, xToken uintptr) int32 { /* sqlite3.c:231846:12: */
+func fts5PorterTokenize(tls *libc.TLS, pTokenizer uintptr, pCtx uintptr, flags int32, pText uintptr, nText int32, xToken uintptr) int32 { /* sqlite3.c:233122:12: */
bp := tls.Alloc(24)
defer tls.Free(24)
@@ -182167,7 +189621,9 @@ func fts5PorterTokenize(tls *libc.TLS, pTokenizer uintptr, pCtx uintptr, flags i
(*PorterContext)(unsafe.Pointer(bp /* &sCtx */)).FxToken = xToken
(*PorterContext)(unsafe.Pointer(bp /* &sCtx */)).FpCtx = pCtx
(*PorterContext)(unsafe.Pointer(bp /* &sCtx */)).FaBuf = p + 32 /* &.aBuf */
- return (*(*func(*libc.TLS, uintptr, uintptr, int32, uintptr, int32, uintptr) int32)(unsafe.Pointer((p /* &.tokenizer */ + 16 /* &.xTokenize */))))(tls,
+ return (*struct {
+ f func(*libc.TLS, uintptr, uintptr, int32, uintptr, int32, uintptr) int32
+ })(unsafe.Pointer(&struct{ uintptr }{(*PorterTokenizer)(unsafe.Pointer(p)).Ftokenizer.FxTokenize})).f(tls,
(*PorterTokenizer)(unsafe.Pointer(p)).FpTokenizer, bp /* &sCtx */, flags, pText, nText, *(*uintptr)(unsafe.Pointer(&struct {
f func(*libc.TLS, uintptr, int32, uintptr, int32, int32, int32) int32
}{fts5PorterCb})))
@@ -182176,20 +189632,20 @@ func fts5PorterTokenize(tls *libc.TLS, pTokenizer uintptr, pCtx uintptr, flags i
// *************************************************************************
//
// Start of trigram implementation.
-type TrigramTokenizer1 = struct{ FbFold int32 } /* sqlite3.c:231866:9 */
+type TrigramTokenizer1 = struct{ FbFold int32 } /* sqlite3.c:233142:9 */
// *************************************************************************
//
// Start of trigram implementation.
-type TrigramTokenizer = TrigramTokenizer1 /* sqlite3.c:231866:33 */
+type TrigramTokenizer = TrigramTokenizer1 /* sqlite3.c:233142:33 */
// Free a trigram tokenizer.
-func fts5TriDelete(tls *libc.TLS, p uintptr) { /* sqlite3.c:231874:13: */
+func fts5TriDelete(tls *libc.TLS, p uintptr) { /* sqlite3.c:233150:13: */
Xsqlite3_free(tls, p)
}
// Allocate a trigram tokenizer.
-func fts5TriCreate(tls *libc.TLS, pUnused uintptr, azArg uintptr, nArg int32, ppOut uintptr) int32 { /* sqlite3.c:231881:12: */
+func fts5TriCreate(tls *libc.TLS, pUnused uintptr, azArg uintptr, nArg int32, ppOut uintptr) int32 { /* sqlite3.c:233157:12: */
var rc int32 = SQLITE_OK
var pNew uintptr = Xsqlite3_malloc(tls, int32(unsafe.Sizeof(TrigramTokenizer{})))
_ = pUnused
@@ -182200,11 +189656,11 @@ func fts5TriCreate(tls *libc.TLS, pUnused uintptr, azArg uintptr, nArg int32, pp
(*TrigramTokenizer)(unsafe.Pointer(pNew)).FbFold = 1
for i = 0; (rc == SQLITE_OK) && (i < nArg); i = i + (2) {
var zArg uintptr = *(*uintptr)(unsafe.Pointer(azArg + uintptr((i+1))*8))
- if 0 == Xsqlite3_stricmp(tls, *(*uintptr)(unsafe.Pointer(azArg + uintptr(i)*8)), ts+34339 /* "case_sensitive" */) {
- if ((int32(*(*int8)(unsafe.Pointer(zArg))) != '0') && (int32(*(*int8)(unsafe.Pointer(zArg))) != '1')) || (*(*int8)(unsafe.Pointer(zArg + 1)) != 0) {
+ if 0 == Xsqlite3_stricmp(tls, *(*uintptr)(unsafe.Pointer(azArg + uintptr(i)*8)), ts+35488 /* "case_sensitive" */) {
+ if ((int32(*(*uint8)(unsafe.Pointer(zArg))) != '0') && (int32(*(*uint8)(unsafe.Pointer(zArg))) != '1')) || (*(*uint8)(unsafe.Pointer(zArg + 1)) != 0) {
rc = SQLITE_ERROR
} else {
- (*TrigramTokenizer)(unsafe.Pointer(pNew)).FbFold = (libc.Bool32(int32(*(*int8)(unsafe.Pointer(zArg))) == '0'))
+ (*TrigramTokenizer)(unsafe.Pointer(pNew)).FbFold = (libc.Bool32(int32(*(*uint8)(unsafe.Pointer(zArg))) == '0'))
}
} else {
rc = SQLITE_ERROR
@@ -182220,13 +189676,13 @@ func fts5TriCreate(tls *libc.TLS, pUnused uintptr, azArg uintptr, nArg int32, pp
}
// Trigram tokenizer tokenize routine.
-func fts5TriTokenize(tls *libc.TLS, pTok uintptr, pCtx uintptr, unusedFlags int32, pText uintptr, nText int32, xToken uintptr) int32 { /* sqlite3.c:231919:12: */
+func fts5TriTokenize(tls *libc.TLS, pTok uintptr, pCtx uintptr, unusedFlags int32, pText uintptr, nText int32, xToken uintptr) int32 { /* sqlite3.c:233195:12: */
bp := tls.Alloc(32)
defer tls.Free(32)
var p uintptr = pTok
var rc int32 = SQLITE_OK
- // var aBuf [32]int8 at bp, 32
+ // var aBuf [32]uint8 at bp, 32
var zIn uintptr = pText
var zEof uintptr = (zIn + uintptr(nText))
@@ -182259,19 +189715,19 @@ func fts5TriTokenize(tls *libc.TLS, pTok uintptr, pCtx uintptr, unusedFlags int3
}
{
if iCode < U32(0x00080) {
- *(*int8)(unsafe.Pointer(libc.PostIncUintptr(&zOut, 1))) = int8((U8(iCode & U32(0xFF))))
+ *(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&zOut, 1))) = uint8((U8(iCode & U32(0xFF))))
} else if iCode < U32(0x00800) {
- *(*int8)(unsafe.Pointer(libc.PostIncUintptr(&zOut, 1))) = (int8(0xC0 + int32((U8((iCode >> 6) & U32(0x1F))))))
- *(*int8)(unsafe.Pointer(libc.PostIncUintptr(&zOut, 1))) = (int8(0x80 + int32((U8(iCode & U32(0x3F))))))
+ *(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&zOut, 1))) = (uint8(0xC0 + int32((U8((iCode >> 6) & U32(0x1F))))))
+ *(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&zOut, 1))) = (uint8(0x80 + int32((U8(iCode & U32(0x3F))))))
} else if iCode < U32(0x10000) {
- *(*int8)(unsafe.Pointer(libc.PostIncUintptr(&zOut, 1))) = (int8(0xE0 + int32((U8((iCode >> 12) & U32(0x0F))))))
- *(*int8)(unsafe.Pointer(libc.PostIncUintptr(&zOut, 1))) = (int8(0x80 + int32((U8((iCode >> 6) & U32(0x3F))))))
- *(*int8)(unsafe.Pointer(libc.PostIncUintptr(&zOut, 1))) = (int8(0x80 + int32((U8(iCode & U32(0x3F))))))
+ *(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&zOut, 1))) = (uint8(0xE0 + int32((U8((iCode >> 12) & U32(0x0F))))))
+ *(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&zOut, 1))) = (uint8(0x80 + int32((U8((iCode >> 6) & U32(0x3F))))))
+ *(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&zOut, 1))) = (uint8(0x80 + int32((U8(iCode & U32(0x3F))))))
} else {
- *(*int8)(unsafe.Pointer(libc.PostIncUintptr(&zOut, 1))) = (int8(0xF0 + int32((U8((iCode >> 18) & U32(0x07))))))
- *(*int8)(unsafe.Pointer(libc.PostIncUintptr(&zOut, 1))) = (int8(0x80 + int32((U8((iCode >> 12) & U32(0x3F))))))
- *(*int8)(unsafe.Pointer(libc.PostIncUintptr(&zOut, 1))) = (int8(0x80 + int32((U8((iCode >> 6) & U32(0x3F))))))
- *(*int8)(unsafe.Pointer(libc.PostIncUintptr(&zOut, 1))) = (int8(0x80 + int32((U8(iCode & U32(0x3F))))))
+ *(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&zOut, 1))) = (uint8(0xF0 + int32((U8((iCode >> 18) & U32(0x07))))))
+ *(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&zOut, 1))) = (uint8(0x80 + int32((U8((iCode >> 12) & U32(0x3F))))))
+ *(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&zOut, 1))) = (uint8(0x80 + int32((U8((iCode >> 6) & U32(0x3F))))))
+ *(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&zOut, 1))) = (uint8(0x80 + int32((U8(iCode & U32(0x3F))))))
}
}
@@ -182298,19 +189754,19 @@ func fts5TriTokenize(tls *libc.TLS, pTok uintptr, pCtx uintptr, unusedFlags int3
}
{
if iCode < U32(0x00080) {
- *(*int8)(unsafe.Pointer(libc.PostIncUintptr(&zOut, 1))) = int8((U8(iCode & U32(0xFF))))
+ *(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&zOut, 1))) = uint8((U8(iCode & U32(0xFF))))
} else if iCode < U32(0x00800) {
- *(*int8)(unsafe.Pointer(libc.PostIncUintptr(&zOut, 1))) = (int8(0xC0 + int32((U8((iCode >> 6) & U32(0x1F))))))
- *(*int8)(unsafe.Pointer(libc.PostIncUintptr(&zOut, 1))) = (int8(0x80 + int32((U8(iCode & U32(0x3F))))))
+ *(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&zOut, 1))) = (uint8(0xC0 + int32((U8((iCode >> 6) & U32(0x1F))))))
+ *(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&zOut, 1))) = (uint8(0x80 + int32((U8(iCode & U32(0x3F))))))
} else if iCode < U32(0x10000) {
- *(*int8)(unsafe.Pointer(libc.PostIncUintptr(&zOut, 1))) = (int8(0xE0 + int32((U8((iCode >> 12) & U32(0x0F))))))
- *(*int8)(unsafe.Pointer(libc.PostIncUintptr(&zOut, 1))) = (int8(0x80 + int32((U8((iCode >> 6) & U32(0x3F))))))
- *(*int8)(unsafe.Pointer(libc.PostIncUintptr(&zOut, 1))) = (int8(0x80 + int32((U8(iCode & U32(0x3F))))))
+ *(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&zOut, 1))) = (uint8(0xE0 + int32((U8((iCode >> 12) & U32(0x0F))))))
+ *(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&zOut, 1))) = (uint8(0x80 + int32((U8((iCode >> 6) & U32(0x3F))))))
+ *(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&zOut, 1))) = (uint8(0x80 + int32((U8(iCode & U32(0x3F))))))
} else {
- *(*int8)(unsafe.Pointer(libc.PostIncUintptr(&zOut, 1))) = (int8(0xF0 + int32((U8((iCode >> 18) & U32(0x07))))))
- *(*int8)(unsafe.Pointer(libc.PostIncUintptr(&zOut, 1))) = (int8(0x80 + int32((U8((iCode >> 12) & U32(0x3F))))))
- *(*int8)(unsafe.Pointer(libc.PostIncUintptr(&zOut, 1))) = (int8(0x80 + int32((U8((iCode >> 6) & U32(0x3F))))))
- *(*int8)(unsafe.Pointer(libc.PostIncUintptr(&zOut, 1))) = (int8(0x80 + int32((U8(iCode & U32(0x3F))))))
+ *(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&zOut, 1))) = (uint8(0xF0 + int32((U8((iCode >> 18) & U32(0x07))))))
+ *(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&zOut, 1))) = (uint8(0x80 + int32((U8((iCode >> 12) & U32(0x3F))))))
+ *(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&zOut, 1))) = (uint8(0x80 + int32((U8((iCode >> 6) & U32(0x3F))))))
+ *(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&zOut, 1))) = (uint8(0x80 + int32((U8(iCode & U32(0x3F))))))
}
}
@@ -182333,26 +189789,28 @@ func fts5TriTokenize(tls *libc.TLS, pTok uintptr, pCtx uintptr, unusedFlags int3
}
{
if iCode < U32(0x00080) {
- *(*int8)(unsafe.Pointer(libc.PostIncUintptr(&zOut, 1))) = int8((U8(iCode & U32(0xFF))))
+ *(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&zOut, 1))) = uint8((U8(iCode & U32(0xFF))))
} else if iCode < U32(0x00800) {
- *(*int8)(unsafe.Pointer(libc.PostIncUintptr(&zOut, 1))) = (int8(0xC0 + int32((U8((iCode >> 6) & U32(0x1F))))))
- *(*int8)(unsafe.Pointer(libc.PostIncUintptr(&zOut, 1))) = (int8(0x80 + int32((U8(iCode & U32(0x3F))))))
+ *(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&zOut, 1))) = (uint8(0xC0 + int32((U8((iCode >> 6) & U32(0x1F))))))
+ *(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&zOut, 1))) = (uint8(0x80 + int32((U8(iCode & U32(0x3F))))))
} else if iCode < U32(0x10000) {
- *(*int8)(unsafe.Pointer(libc.PostIncUintptr(&zOut, 1))) = (int8(0xE0 + int32((U8((iCode >> 12) & U32(0x0F))))))
- *(*int8)(unsafe.Pointer(libc.PostIncUintptr(&zOut, 1))) = (int8(0x80 + int32((U8((iCode >> 6) & U32(0x3F))))))
- *(*int8)(unsafe.Pointer(libc.PostIncUintptr(&zOut, 1))) = (int8(0x80 + int32((U8(iCode & U32(0x3F))))))
+ *(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&zOut, 1))) = (uint8(0xE0 + int32((U8((iCode >> 12) & U32(0x0F))))))
+ *(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&zOut, 1))) = (uint8(0x80 + int32((U8((iCode >> 6) & U32(0x3F))))))
+ *(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&zOut, 1))) = (uint8(0x80 + int32((U8(iCode & U32(0x3F))))))
} else {
- *(*int8)(unsafe.Pointer(libc.PostIncUintptr(&zOut, 1))) = (int8(0xF0 + int32((U8((iCode >> 18) & U32(0x07))))))
- *(*int8)(unsafe.Pointer(libc.PostIncUintptr(&zOut, 1))) = (int8(0x80 + int32((U8((iCode >> 12) & U32(0x3F))))))
- *(*int8)(unsafe.Pointer(libc.PostIncUintptr(&zOut, 1))) = (int8(0x80 + int32((U8((iCode >> 6) & U32(0x3F))))))
- *(*int8)(unsafe.Pointer(libc.PostIncUintptr(&zOut, 1))) = (int8(0x80 + int32((U8(iCode & U32(0x3F))))))
+ *(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&zOut, 1))) = (uint8(0xF0 + int32((U8((iCode >> 18) & U32(0x07))))))
+ *(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&zOut, 1))) = (uint8(0x80 + int32((U8((iCode >> 12) & U32(0x3F))))))
+ *(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&zOut, 1))) = (uint8(0x80 + int32((U8((iCode >> 6) & U32(0x3F))))))
+ *(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&zOut, 1))) = (uint8(0x80 + int32((U8(iCode & U32(0x3F))))))
}
}
} else {
break
}
- rc = (*(*func(*libc.TLS, uintptr, int32, uintptr, int32, int32, int32) int32)(unsafe.Pointer(&xToken)))(tls, pCtx, 0, bp /* &aBuf[0] */, (int32(int64((zOut - bp /* &aBuf[0] */) / 1))), iStart, (int32(int64(((uintptr(iStart) + zOut) - bp /* &aBuf[0] */) / 1))))
+ rc = (*struct {
+ f func(*libc.TLS, uintptr, int32, uintptr, int32, int32, int32) int32
+ })(unsafe.Pointer(&struct{ uintptr }{xToken})).f(tls, pCtx, 0, bp /* &aBuf[0] */, (int32(int64((zOut - bp /* &aBuf[0] */) / 1))), iStart, (int32(int64(((uintptr(iStart) + zOut) - bp /* &aBuf[0] */) / 1))))
if rc != SQLITE_OK {
break
}
@@ -182371,7 +189829,7 @@ func fts5TriTokenize(tls *libc.TLS, pTok uintptr, pCtx uintptr, unusedFlags int3
// "trigram" tokenizer, case_sensitive=1 - FTS5_PATTERN_GLOB
// "trigram" tokenizer, case_sensitive=0 (the default) - FTS5_PATTERN_LIKE
// all other tokenizers - FTS5_PATTERN_NONE
-func sqlite3Fts5TokenizerPattern(tls *libc.TLS, xCreate uintptr, pTok uintptr) int32 { /* sqlite3.c:231979:12: */
+func sqlite3Fts5TokenizerPattern(tls *libc.TLS, xCreate uintptr, pTok uintptr) int32 { /* sqlite3.c:233255:12: */
if xCreate == *(*uintptr)(unsafe.Pointer(&struct {
f func(*libc.TLS, uintptr, uintptr, int32, uintptr) int32
}{fts5TriCreate})) {
@@ -182385,27 +189843,27 @@ func sqlite3Fts5TokenizerPattern(tls *libc.TLS, xCreate uintptr, pTok uintptr) i
}
// Register all built-in tokenizers with FTS5.
-func sqlite3Fts5TokenizerInit(tls *libc.TLS, pApi uintptr) int32 { /* sqlite3.c:231993:12: */
+func sqlite3Fts5TokenizerInit(tls *libc.TLS, pApi uintptr) int32 { /* sqlite3.c:233269:12: */
bp := tls.Alloc(128)
defer tls.Free(128)
*(*[4]BuiltinTokenizer)(unsafe.Pointer(bp /* aBuiltin */)) = [4]BuiltinTokenizer{
- {FzName: ts + 34050 /* "unicode61" */, Fx: Fts5_tokenizer{FxCreate: *(*uintptr)(unsafe.Pointer(&struct {
+ {FzName: ts + 35199 /* "unicode61" */, Fx: Fts5_tokenizer{FxCreate: *(*uintptr)(unsafe.Pointer(&struct {
f func(*libc.TLS, uintptr, uintptr, int32, uintptr) int32
}{fts5UnicodeCreate})), FxDelete: *(*uintptr)(unsafe.Pointer(&struct{ f func(*libc.TLS, uintptr) }{fts5UnicodeDelete})), FxTokenize: *(*uintptr)(unsafe.Pointer(&struct {
f func(*libc.TLS, uintptr, uintptr, int32, uintptr, int32, uintptr) int32
}{fts5UnicodeTokenize}))}},
- {FzName: ts + 34354 /* "ascii" */, Fx: Fts5_tokenizer{FxCreate: *(*uintptr)(unsafe.Pointer(&struct {
+ {FzName: ts + 35503 /* "ascii" */, Fx: Fts5_tokenizer{FxCreate: *(*uintptr)(unsafe.Pointer(&struct {
f func(*libc.TLS, uintptr, uintptr, int32, uintptr) int32
}{fts5AsciiCreate})), FxDelete: *(*uintptr)(unsafe.Pointer(&struct{ f func(*libc.TLS, uintptr) }{fts5AsciiDelete})), FxTokenize: *(*uintptr)(unsafe.Pointer(&struct {
f func(*libc.TLS, uintptr, uintptr, int32, uintptr, int32, uintptr) int32
}{fts5AsciiTokenize}))}},
- {FzName: ts + 34360 /* "porter" */, Fx: Fts5_tokenizer{FxCreate: *(*uintptr)(unsafe.Pointer(&struct {
+ {FzName: ts + 35509 /* "porter" */, Fx: Fts5_tokenizer{FxCreate: *(*uintptr)(unsafe.Pointer(&struct {
f func(*libc.TLS, uintptr, uintptr, int32, uintptr) int32
}{fts5PorterCreate})), FxDelete: *(*uintptr)(unsafe.Pointer(&struct{ f func(*libc.TLS, uintptr) }{fts5PorterDelete})), FxTokenize: *(*uintptr)(unsafe.Pointer(&struct {
f func(*libc.TLS, uintptr, uintptr, int32, uintptr, int32, uintptr) int32
}{fts5PorterTokenize}))}},
- {FzName: ts + 34367 /* "trigram" */, Fx: Fts5_tokenizer{FxCreate: *(*uintptr)(unsafe.Pointer(&struct {
+ {FzName: ts + 35516 /* "trigram" */, Fx: Fts5_tokenizer{FxCreate: *(*uintptr)(unsafe.Pointer(&struct {
f func(*libc.TLS, uintptr, uintptr, int32, uintptr) int32
}{fts5TriCreate})), FxDelete: *(*uintptr)(unsafe.Pointer(&struct{ f func(*libc.TLS, uintptr) }{fts5TriDelete})), FxTokenize: *(*uintptr)(unsafe.Pointer(&struct {
f func(*libc.TLS, uintptr, uintptr, int32, uintptr, int32, uintptr) int32
@@ -182416,7 +189874,9 @@ func sqlite3Fts5TokenizerInit(tls *libc.TLS, pApi uintptr) int32 { /* sqlite3.c:
var i int32 // To iterate through builtin functions
for i = 0; (rc == SQLITE_OK) && (i < (int32(uint64(unsafe.Sizeof([4]BuiltinTokenizer{})) / uint64(unsafe.Sizeof(BuiltinTokenizer{}))))); i++ {
- rc = (*(*func(*libc.TLS, uintptr, uintptr, uintptr, uintptr, uintptr) int32)(unsafe.Pointer((pApi + 8 /* &.xCreateTokenizer */))))(tls, pApi,
+ rc = (*struct {
+ f func(*libc.TLS, uintptr, uintptr, uintptr, uintptr, uintptr) int32
+ })(unsafe.Pointer(&struct{ uintptr }{(*Fts5_api)(unsafe.Pointer(pApi)).FxCreateTokenizer})).f(tls, pApi,
(*BuiltinTokenizer)(unsafe.Pointer(bp /* &aBuiltin */ +uintptr(i)*32)).FzName,
pApi,
(bp /* &aBuiltin */ + uintptr(i)*32 + 8 /* &.x */),
@@ -182429,7 +189889,7 @@ func sqlite3Fts5TokenizerInit(tls *libc.TLS, pApi uintptr) int32 { /* sqlite3.c:
type BuiltinTokenizer = struct {
FzName uintptr
Fx Fts5_tokenizer
-} /* sqlite3.c:231994:3 */
+} /* sqlite3.c:233270:3 */
// 2012-05-25
//
@@ -182452,7 +189912,7 @@ type BuiltinTokenizer = struct {
// SMALL LETTER E WITH DIAERESIS" - return 65 ("LATIN SMALL LETTER
// E"). The resuls of passing a codepoint that corresponds to an
// uppercase letter are undefined.
-func fts5_remove_diacritic(tls *libc.TLS, c int32, bComplex int32) int32 { /* sqlite3.c:232049:12: */
+func fts5_remove_diacritic(tls *libc.TLS, c int32, bComplex int32) int32 { /* sqlite3.c:233325:12: */
bp := tls.Alloc(378)
defer tls.Free(378)
@@ -182523,7 +189983,7 @@ func fts5_remove_diacritic(tls *libc.TLS, c int32, bComplex int32) int32 { /* sq
// Return true if the argument interpreted as a unicode codepoint
// is a diacritical modifier character.
-func sqlite3Fts5UnicodeIsdiacritic(tls *libc.TLS, c int32) int32 { /* sqlite3.c:232116:12: */
+func sqlite3Fts5UnicodeIsdiacritic(tls *libc.TLS, c int32) int32 { /* sqlite3.c:233392:12: */
var mask0 uint32 = uint32(0x08029FDF)
var mask1 uint32 = uint32(0x000361F8)
if (c < 768) || (c > 817) {
@@ -182542,7 +190002,7 @@ func sqlite3Fts5UnicodeIsdiacritic(tls *libc.TLS, c int32) int32 { /* sqlite3.c:
//
// The results are undefined if the value passed to this function
// is less than zero.
-func sqlite3Fts5UnicodeFold(tls *libc.TLS, c int32, eRemoveDiacritic int32) int32 { /* sqlite3.c:232135:12: */
+func sqlite3Fts5UnicodeFold(tls *libc.TLS, c int32, eRemoveDiacritic int32) int32 { /* sqlite3.c:233411:12: */
var ret int32 = c
@@ -182603,7 +190063,7 @@ type TableEntry = struct {
FiCode uint16
Fflags uint8
FnRange uint8
-} /* sqlite3.c:232153:16 */
+} /* sqlite3.c:233429:16 */
var aEntry = [163]TableEntry{
{FiCode: uint16(65), Fflags: uint8(14), FnRange: uint8(26)}, {FiCode: uint16(181), Fflags: uint8(64), FnRange: uint8(1)}, {FiCode: uint16(192), Fflags: uint8(14), FnRange: uint8(23)},
@@ -182661,7 +190121,7 @@ var aEntry = [163]TableEntry{
{FiCode: uint16(42878), Fflags: uint8(1), FnRange: uint8(10)}, {FiCode: uint16(42891), FnRange: uint8(1)}, {FiCode: uint16(42893), Fflags: uint8(74), FnRange: uint8(1)},
{FiCode: uint16(42896), Fflags: uint8(1), FnRange: uint8(4)}, {FiCode: uint16(42912), Fflags: uint8(1), FnRange: uint8(10)}, {FiCode: uint16(42922), Fflags: uint8(72), FnRange: uint8(1)},
{FiCode: uint16(65313), Fflags: uint8(14), FnRange: uint8(26)},
-} /* sqlite3.c:232157:5 */
+} /* sqlite3.c:233433:5 */
var aiOff = [77]uint16{
uint16(1), uint16(2), uint16(8), uint16(15), uint16(16), uint16(26), uint16(28), uint16(32),
uint16(37), uint16(38), uint16(40), uint16(48), uint16(63), uint16(64), uint16(69), uint16(71),
@@ -182673,13 +190133,13 @@ var aiOff = [77]uint16{
uint16(65408), uint16(65410), uint16(65415), uint16(65424), uint16(65436), uint16(65439), uint16(65450), uint16(65462),
uint16(65472), uint16(65476), uint16(65478), uint16(65480), uint16(65482), uint16(65488), uint16(65506), uint16(65511),
uint16(65514), uint16(65521), uint16(65527), uint16(65528), uint16(65529),
-} /* sqlite3.c:232214:31 */
+} /* sqlite3.c:233490:31 */
-func sqlite3Fts5UnicodeCatParse(tls *libc.TLS, zCat uintptr, aArray uintptr) int32 { /* sqlite3.c:232271:12: */
+func sqlite3Fts5UnicodeCatParse(tls *libc.TLS, zCat uintptr, aArray uintptr) int32 { /* sqlite3.c:233547:12: */
*(*U8)(unsafe.Pointer(aArray)) = U8(1)
- switch int32(*(*int8)(unsafe.Pointer(zCat))) {
+ switch int32(*(*uint8)(unsafe.Pointer(zCat))) {
case 'C':
- switch int32(*(*int8)(unsafe.Pointer(zCat + 1))) {
+ switch int32(*(*uint8)(unsafe.Pointer(zCat + 1))) {
case 'c':
*(*U8)(unsafe.Pointer(aArray + 1)) = U8(1)
break
@@ -182708,7 +190168,7 @@ func sqlite3Fts5UnicodeCatParse(tls *libc.TLS, zCat uintptr, aArray uintptr) int
break
case 'L':
- switch int32(*(*int8)(unsafe.Pointer(zCat + 1))) {
+ switch int32(*(*uint8)(unsafe.Pointer(zCat + 1))) {
case 'l':
*(*U8)(unsafe.Pointer(aArray + 5)) = U8(1)
break
@@ -182741,7 +190201,7 @@ func sqlite3Fts5UnicodeCatParse(tls *libc.TLS, zCat uintptr, aArray uintptr) int
break
case 'M':
- switch int32(*(*int8)(unsafe.Pointer(zCat + 1))) {
+ switch int32(*(*uint8)(unsafe.Pointer(zCat + 1))) {
case 'c':
*(*U8)(unsafe.Pointer(aArray + 10)) = U8(1)
break
@@ -182762,7 +190222,7 @@ func sqlite3Fts5UnicodeCatParse(tls *libc.TLS, zCat uintptr, aArray uintptr) int
break
case 'N':
- switch int32(*(*int8)(unsafe.Pointer(zCat + 1))) {
+ switch int32(*(*uint8)(unsafe.Pointer(zCat + 1))) {
case 'd':
*(*U8)(unsafe.Pointer(aArray + 13)) = U8(1)
break
@@ -182783,7 +190243,7 @@ func sqlite3Fts5UnicodeCatParse(tls *libc.TLS, zCat uintptr, aArray uintptr) int
break
case 'P':
- switch int32(*(*int8)(unsafe.Pointer(zCat + 1))) {
+ switch int32(*(*uint8)(unsafe.Pointer(zCat + 1))) {
case 'c':
*(*U8)(unsafe.Pointer(aArray + 16)) = U8(1)
break
@@ -182820,7 +190280,7 @@ func sqlite3Fts5UnicodeCatParse(tls *libc.TLS, zCat uintptr, aArray uintptr) int
break
case 'S':
- switch int32(*(*int8)(unsafe.Pointer(zCat + 1))) {
+ switch int32(*(*uint8)(unsafe.Pointer(zCat + 1))) {
case 'c':
*(*U8)(unsafe.Pointer(aArray + 23)) = U8(1)
break
@@ -182845,7 +190305,7 @@ func sqlite3Fts5UnicodeCatParse(tls *libc.TLS, zCat uintptr, aArray uintptr) int
break
case 'Z':
- switch int32(*(*int8)(unsafe.Pointer(zCat + 1))) {
+ switch int32(*(*uint8)(unsafe.Pointer(zCat + 1))) {
case 'l':
*(*U8)(unsafe.Pointer(aArray + 27)) = U8(1)
break
@@ -182872,7 +190332,7 @@ func sqlite3Fts5UnicodeCatParse(tls *libc.TLS, zCat uintptr, aArray uintptr) int
var aFts5UnicodeBlock = [17]U16{
U16(0), U16(1471), U16(1753), U16(1760), U16(1760), U16(1760), U16(1760), U16(1760), U16(1760), U16(1760),
U16(1760), U16(1760), U16(1760), U16(1760), U16(1760), U16(1763), U16(1765),
-} /* sqlite3.c:232389:12 */
+} /* sqlite3.c:233665:12 */
var aFts5UnicodeMap = [1765]U16{
U16(0), U16(32), U16(33), U16(36), U16(37), U16(40), U16(41), U16(42), U16(43), U16(44),
U16(45), U16(46), U16(48), U16(58), U16(60), U16(63), U16(65), U16(91), U16(92), U16(93),
@@ -183051,7 +190511,7 @@ var aFts5UnicodeMap = [1765]U16{
U16(62406), U16(62432), U16(62464), U16(62528), U16(62530), U16(62713), U16(62720), U16(62784), U16(62800), U16(62971),
U16(63045), U16(63104), U16(63232), U16(0), U16(42710), U16(42752), U16(46900), U16(46912), U16(47133), U16(63488),
U16(1), U16(32), U16(256), U16(0), U16(65533),
-} /* sqlite3.c:232393:12 */
+} /* sqlite3.c:233669:12 */
var aFts5UnicodeData = [1765]U16{
U16(1025), U16(61), U16(117), U16(55), U16(117), U16(54), U16(50), U16(53), U16(57), U16(53),
U16(49), U16(85), U16(333), U16(85), U16(121), U16(85), U16(841), U16(54), U16(53), U16(50),
@@ -183230,9 +190690,9 @@ var aFts5UnicodeData = [1765]U16{
U16(186), U16(570), U16(2042), U16(58), U16(5850), U16(154), U16(2010), U16(154), U16(794), U16(2266),
U16(378), U16(2266), U16(3738), U16(39), U16(39), U16(39), U16(39), U16(39), U16(39), U16(17351),
U16(34), U16(3074), U16(7692), U16(63), U16(63),
-} /* sqlite3.c:232572:12 */
+} /* sqlite3.c:233848:12 */
-func sqlite3Fts5UnicodeCategory(tls *libc.TLS, iCode U32) int32 { /* sqlite3.c:232752:12: */
+func sqlite3Fts5UnicodeCategory(tls *libc.TLS, iCode U32) int32 { /* sqlite3.c:234028:12: */
var iRes int32 = -1
var iHi int32
var iLo int32
@@ -183272,7 +190732,7 @@ func sqlite3Fts5UnicodeCategory(tls *libc.TLS, iCode U32) int32 { /* sqlite3.c:2
return 9
}
-func sqlite3Fts5UnicodeAscii(tls *libc.TLS, aArray uintptr, aAscii uintptr) { /* sqlite3.c:232783:13: */
+func sqlite3Fts5UnicodeAscii(tls *libc.TLS, aArray uintptr, aAscii uintptr) { /* sqlite3.c:234059:13: */
var i int32 = 0
var iTbl int32 = 0
for i < 128 {
@@ -183304,7 +190764,7 @@ func sqlite3Fts5UnicodeAscii(tls *libc.TLS, aArray uintptr, aAscii uintptr) { /*
// This is a copy of the sqlite3GetVarint32() routine from the SQLite core.
// Except, this version does handle the single byte case that the core
// version depends on being handled before its function is called.
-func sqlite3Fts5GetVarint32(tls *libc.TLS, p uintptr, v uintptr) int32 { /* sqlite3.c:232821:12: */
+func sqlite3Fts5GetVarint32(tls *libc.TLS, p uintptr, v uintptr) int32 { /* sqlite3.c:234097:12: */
bp := tls.Alloc(8)
defer tls.Free(8)
@@ -183379,7 +190839,7 @@ func sqlite3Fts5GetVarint32(tls *libc.TLS, p uintptr, v uintptr) int32 { /* sqli
// Read a 64-bit variable-length integer from memory starting at p[0].
// Return the number of bytes read. The value is stored in *v.
-func sqlite3Fts5GetVarint(tls *libc.TLS, p uintptr, v uintptr) U8 { /* sqlite3.c:232899:11: */
+func sqlite3Fts5GetVarint(tls *libc.TLS, p uintptr, v uintptr) U8 { /* sqlite3.c:234175:11: */
var a U32
var b U32
var s U32
@@ -183555,7 +191015,7 @@ func sqlite3Fts5GetVarint(tls *libc.TLS, p uintptr, v uintptr) U8 { /* sqlite3.c
// for all bytes that have the 8th bit set and one byte with the 8th
// bit clear. Except, if we get to the 9th byte, it stores the full
// 8 bits and is the last byte.
-func fts5PutVarint64(tls *libc.TLS, p uintptr, v U64) int32 { /* sqlite3.c:233093:26: */
+func fts5PutVarint64(tls *libc.TLS, p uintptr, v U64) int32 { /* sqlite3.c:234369:26: */
bp := tls.Alloc(10)
defer tls.Free(10)
@@ -183601,7 +191061,7 @@ __3:
return n
}
-func sqlite3Fts5PutVarint(tls *libc.TLS, p uintptr, v U64) int32 { /* sqlite3.c:233118:12: */
+func sqlite3Fts5PutVarint(tls *libc.TLS, p uintptr, v U64) int32 { /* sqlite3.c:234394:12: */
if v <= uint64(0x7f) {
*(*uint8)(unsafe.Pointer(p)) = (uint8(v & uint64(0x7f)))
return 1
@@ -183614,7 +191074,7 @@ func sqlite3Fts5PutVarint(tls *libc.TLS, p uintptr, v U64) int32 { /* sqlite3.c:
return fts5PutVarint64(tls, p, v)
}
-func sqlite3Fts5GetVarintLen(tls *libc.TLS, iVal U32) int32 { /* sqlite3.c:233132:12: */
+func sqlite3Fts5GetVarintLen(tls *libc.TLS, iVal U32) int32 { /* sqlite3.c:234408:12: */
if iVal < (U32(int32(1) << 14)) {
return 2
@@ -183674,7 +191134,7 @@ type Fts5VocabTable1 = struct {
FpGlobal uintptr
FeType int32
FbBusy uint32
-} /* sqlite3.c:233185:9 */
+} /* sqlite3.c:234461:9 */
// 2015 May 08
//
@@ -183714,29 +191174,29 @@ type Fts5VocabTable1 = struct {
// #include "fts5Int.h"
-type Fts5VocabTable = Fts5VocabTable1 /* sqlite3.c:233185:31 */
+type Fts5VocabTable = Fts5VocabTable1 /* sqlite3.c:234461:31 */
type Fts5VocabCursor1 = struct {
- Fbase Sqlite3_vtab_cursor
- FpStmt uintptr
- FpFts5 uintptr
- FbEof int32
- _ [4]byte
- FpIter uintptr
- FnLeTerm int32
- _ [4]byte
- FzLeTerm uintptr
- FiCol int32
- _ [4]byte
- FaCnt uintptr
- FaDoc uintptr
- Frowid I64
- Fterm Fts5Buffer
- FiInstPos I64
- FiInstOff int32
- _ [4]byte
-} /* sqlite3.c:233186:9 */
-
-type Fts5VocabCursor = Fts5VocabCursor1 /* sqlite3.c:233186:32 */
+ Fbase Sqlite3_vtab_cursor
+ FpStmt uintptr
+ FpFts5 uintptr
+ FbEof int32
+ F__ccgo_pad1 [4]byte
+ FpIter uintptr
+ FnLeTerm int32
+ F__ccgo_pad2 [4]byte
+ FzLeTerm uintptr
+ FiCol int32
+ F__ccgo_pad3 [4]byte
+ FaCnt uintptr
+ FaDoc uintptr
+ Frowid I64
+ Fterm Fts5Buffer
+ FiInstPos I64
+ FiInstOff int32
+ F__ccgo_pad4 [4]byte
+} /* sqlite3.c:234462:9 */
+
+type Fts5VocabCursor = Fts5VocabCursor1 /* sqlite3.c:234462:32 */
// Bits for the mask used as the idxNum value by xBestIndex/xFilter.
@@ -183744,7 +191204,7 @@ type Fts5VocabCursor = Fts5VocabCursor1 /* sqlite3.c:233186:32 */
// FTS5_VOCAB_XXX constant. If successful, set *peType to the output
// value and return SQLITE_OK. Otherwise, set *pzErr to an error message
// and return SQLITE_ERROR.
-func fts5VocabTableType(tls *libc.TLS, zType uintptr, pzErr uintptr, peType uintptr) int32 { /* sqlite3.c:233245:12: */
+func fts5VocabTableType(tls *libc.TLS, zType uintptr, pzErr uintptr, peType uintptr) int32 { /* sqlite3.c:234521:12: */
bp := tls.Alloc(12)
defer tls.Free(12)
@@ -183752,14 +191212,14 @@ func fts5VocabTableType(tls *libc.TLS, zType uintptr, pzErr uintptr, peType uint
var zCopy uintptr = sqlite3Fts5Strndup(tls, bp+8 /* &rc */, zType, -1)
if *(*int32)(unsafe.Pointer(bp + 8 /* rc */)) == SQLITE_OK {
sqlite3Fts5Dequote(tls, zCopy)
- if Xsqlite3_stricmp(tls, zCopy, ts+34375 /* "col" */) == 0 {
+ if Xsqlite3_stricmp(tls, zCopy, ts+35524 /* "col" */) == 0 {
*(*int32)(unsafe.Pointer(peType)) = FTS5_VOCAB_COL
- } else if Xsqlite3_stricmp(tls, zCopy, ts+34379 /* "row" */) == 0 {
+ } else if Xsqlite3_stricmp(tls, zCopy, ts+35528 /* "row" */) == 0 {
*(*int32)(unsafe.Pointer(peType)) = FTS5_VOCAB_ROW
- } else if Xsqlite3_stricmp(tls, zCopy, ts+34383 /* "instance" */) == 0 {
+ } else if Xsqlite3_stricmp(tls, zCopy, ts+35532 /* "instance" */) == 0 {
*(*int32)(unsafe.Pointer(peType)) = FTS5_VOCAB_INSTANCE
} else {
- *(*uintptr)(unsafe.Pointer(pzErr)) = Xsqlite3_mprintf(tls, ts+34392 /* "fts5vocab: unkno..." */, libc.VaList(bp, zCopy))
+ *(*uintptr)(unsafe.Pointer(pzErr)) = Xsqlite3_mprintf(tls, ts+35541 /* "fts5vocab: unkno..." */, libc.VaList(bp, zCopy))
*(*int32)(unsafe.Pointer(bp + 8 /* rc */)) = SQLITE_ERROR
}
Xsqlite3_free(tls, zCopy)
@@ -183769,14 +191229,14 @@ func fts5VocabTableType(tls *libc.TLS, zType uintptr, pzErr uintptr, peType uint
}
// The xDisconnect() virtual table method.
-func fts5VocabDisconnectMethod(tls *libc.TLS, pVtab uintptr) int32 { /* sqlite3.c:233274:12: */
+func fts5VocabDisconnectMethod(tls *libc.TLS, pVtab uintptr) int32 { /* sqlite3.c:234550:12: */
var pTab uintptr = pVtab
Xsqlite3_free(tls, pTab)
return SQLITE_OK
}
// The xDestroy() virtual table method.
-func fts5VocabDestroyMethod(tls *libc.TLS, pVtab uintptr) int32 { /* sqlite3.c:233283:12: */
+func fts5VocabDestroyMethod(tls *libc.TLS, pVtab uintptr) int32 { /* sqlite3.c:234559:12: */
var pTab uintptr = pVtab
Xsqlite3_free(tls, pTab)
return SQLITE_OK
@@ -183801,24 +191261,24 @@ func fts5VocabDestroyMethod(tls *libc.TLS, pVtab uintptr) int32 { /* sqlite3.c:2
// argv[3] -> name of fts5 tables database
// argv[4] -> name of fts5 table
// argv[5] -> type of fts5vocab table
-func fts5VocabInitVtab(tls *libc.TLS, db uintptr, pAux uintptr, argc int32, argv uintptr, ppVTab uintptr, pzErr uintptr) int32 { /* sqlite3.c:233310:12: */
+func fts5VocabInitVtab(tls *libc.TLS, db uintptr, pAux uintptr, argc int32, argv uintptr, ppVTab uintptr, pzErr uintptr) int32 { /* sqlite3.c:234586:12: */
bp := tls.Alloc(36)
defer tls.Free(36)
*(*[3]uintptr)(unsafe.Pointer(bp + 8 /* azSchema */)) = [3]uintptr{
- ts + 34426, /* "CREATE TABlE voc..." */
- ts + 34466, /* "CREATE TABlE voc..." */
- ts + 34501, /* "CREATE TABlE voc..." */
+ ts + 35575, /* "CREATE TABlE voc..." */
+ ts + 35615, /* "CREATE TABlE voc..." */
+ ts + 35650, /* "CREATE TABlE voc..." */
}
var pRet uintptr = uintptr(0)
*(*int32)(unsafe.Pointer(bp + 32 /* rc */)) = SQLITE_OK // Return code
var bDb int32
- bDb = (libc.Bool32(((argc == 6) && (libc.Xstrlen(tls, *(*uintptr)(unsafe.Pointer(argv + 1*8))) == uint64(4))) && (libc.Xmemcmp(tls, ts+21165 /* "temp" */, *(*uintptr)(unsafe.Pointer(argv + 1*8)), uint64(4)) == 0)))
+ bDb = (libc.Bool32(((argc == 6) && (libc.Xstrlen(tls, *(*uintptr)(unsafe.Pointer(argv + 1*8))) == uint64(4))) && (libc.Xmemcmp(tls, ts+21625 /* "temp" */, *(*uintptr)(unsafe.Pointer(argv + 1*8)), uint64(4)) == 0)))
if (argc != 5) && (bDb == 0) {
- *(*uintptr)(unsafe.Pointer(pzErr)) = Xsqlite3_mprintf(tls, ts+34544 /* "wrong number of ..." */, 0)
+ *(*uintptr)(unsafe.Pointer(pzErr)) = Xsqlite3_mprintf(tls, ts+35693 /* "wrong number of ..." */, 0)
*(*int32)(unsafe.Pointer(bp + 32 /* rc */)) = SQLITE_ERROR
} else {
var nByte int32 // Bytes of space to allocate
@@ -183871,11 +191331,11 @@ func fts5VocabInitVtab(tls *libc.TLS, db uintptr, pAux uintptr, argc int32, argv
// The xConnect() and xCreate() methods for the virtual table. All the
// work is done in function fts5VocabInitVtab().
-func fts5VocabConnectMethod(tls *libc.TLS, db uintptr, pAux uintptr, argc int32, argv uintptr, ppVtab uintptr, pzErr uintptr) int32 { /* sqlite3.c:233372:12: */
+func fts5VocabConnectMethod(tls *libc.TLS, db uintptr, pAux uintptr, argc int32, argv uintptr, ppVtab uintptr, pzErr uintptr) int32 { /* sqlite3.c:234648:12: */
return fts5VocabInitVtab(tls, db, pAux, argc, argv, ppVtab, pzErr)
}
-func fts5VocabCreateMethod(tls *libc.TLS, db uintptr, pAux uintptr, argc int32, argv uintptr, ppVtab uintptr, pzErr uintptr) int32 { /* sqlite3.c:233382:12: */
+func fts5VocabCreateMethod(tls *libc.TLS, db uintptr, pAux uintptr, argc int32, argv uintptr, ppVtab uintptr, pzErr uintptr) int32 { /* sqlite3.c:234658:12: */
return fts5VocabInitVtab(tls, db, pAux, argc, argv, ppVtab, pzErr)
}
@@ -183889,7 +191349,7 @@ func fts5VocabCreateMethod(tls *libc.TLS, db uintptr, pAux uintptr, argc int32,
//
// are interpreted. Less-than and less-than-or-equal are treated
// identically, as are greater-than and greater-than-or-equal.
-func fts5VocabBestIndexMethod(tls *libc.TLS, pUnused uintptr, pInfo uintptr) int32 { /* sqlite3.c:233405:12: */
+func fts5VocabBestIndexMethod(tls *libc.TLS, pUnused uintptr, pInfo uintptr) int32 { /* sqlite3.c:234681:12: */
var i int32
var iTermEq int32 = -1
var iTermGe int32 = -1
@@ -183957,7 +191417,7 @@ func fts5VocabBestIndexMethod(tls *libc.TLS, pUnused uintptr, pInfo uintptr) int
}
// Implementation of xOpen method.
-func fts5VocabOpenMethod(tls *libc.TLS, pVTab uintptr, ppCsr uintptr) int32 { /* sqlite3.c:233467:12: */
+func fts5VocabOpenMethod(tls *libc.TLS, pVTab uintptr, ppCsr uintptr) int32 { /* sqlite3.c:234743:12: */
bp := tls.Alloc(80)
defer tls.Free(80)
@@ -183970,11 +191430,11 @@ func fts5VocabOpenMethod(tls *libc.TLS, pVTab uintptr, ppCsr uintptr) int32 { /*
if (*Fts5VocabTable)(unsafe.Pointer(pTab)).FbBusy != 0 {
(*Sqlite3_vtab)(unsafe.Pointer(pVTab)).FzErrMsg = Xsqlite3_mprintf(tls,
- ts+34577 /* "recursive defini..." */, libc.VaList(bp, (*Fts5VocabTable)(unsafe.Pointer(pTab)).FzFts5Db, (*Fts5VocabTable)(unsafe.Pointer(pTab)).FzFts5Tbl))
+ ts+35726 /* "recursive defini..." */, libc.VaList(bp, (*Fts5VocabTable)(unsafe.Pointer(pTab)).FzFts5Db, (*Fts5VocabTable)(unsafe.Pointer(pTab)).FzFts5Tbl))
return SQLITE_ERROR
}
zSql = sqlite3Fts5Mprintf(tls, bp+64, /* &rc */
- ts+34608, /* "SELECT t.%Q FROM..." */
+ ts+35757, /* "SELECT t.%Q FROM..." */
libc.VaList(bp+16, (*Fts5VocabTable)(unsafe.Pointer(pTab)).FzFts5Tbl, (*Fts5VocabTable)(unsafe.Pointer(pTab)).FzFts5Db, (*Fts5VocabTable)(unsafe.Pointer(pTab)).FzFts5Tbl, (*Fts5VocabTable)(unsafe.Pointer(pTab)).FzFts5Tbl))
if zSql != 0 {
*(*int32)(unsafe.Pointer(bp + 64 /* rc */)) = Xsqlite3_prepare_v2(tls, (*Fts5VocabTable)(unsafe.Pointer(pTab)).Fdb, zSql, -1, bp+72 /* &pStmt */, uintptr(0))
@@ -183998,7 +191458,7 @@ func fts5VocabOpenMethod(tls *libc.TLS, pVTab uintptr, ppCsr uintptr) int32 { /*
*(*uintptr)(unsafe.Pointer(bp + 72 /* pStmt */)) = uintptr(0)
if *(*int32)(unsafe.Pointer(bp + 64 /* rc */)) == SQLITE_OK {
(*Sqlite3_vtab)(unsafe.Pointer(pVTab)).FzErrMsg = Xsqlite3_mprintf(tls,
- ts+34659 /* "no such fts5 tab..." */, libc.VaList(bp+48, (*Fts5VocabTable)(unsafe.Pointer(pTab)).FzFts5Db, (*Fts5VocabTable)(unsafe.Pointer(pTab)).FzFts5Tbl))
+ ts+35808 /* "no such fts5 tab..." */, libc.VaList(bp+48, (*Fts5VocabTable)(unsafe.Pointer(pTab)).FzFts5Db, (*Fts5VocabTable)(unsafe.Pointer(pTab)).FzFts5Tbl))
*(*int32)(unsafe.Pointer(bp + 64 /* rc */)) = SQLITE_ERROR
}
} else {
@@ -184024,7 +191484,7 @@ func fts5VocabOpenMethod(tls *libc.TLS, pVTab uintptr, ppCsr uintptr) int32 { /*
return *(*int32)(unsafe.Pointer(bp + 64 /* rc */))
}
-func fts5VocabResetCursor(tls *libc.TLS, pCsr uintptr) { /* sqlite3.c:233535:13: */
+func fts5VocabResetCursor(tls *libc.TLS, pCsr uintptr) { /* sqlite3.c:234811:13: */
(*Fts5VocabCursor)(unsafe.Pointer(pCsr)).Frowid = int64(0)
sqlite3Fts5IterClose(tls, (*Fts5VocabCursor)(unsafe.Pointer(pCsr)).FpIter)
(*Fts5VocabCursor)(unsafe.Pointer(pCsr)).FpIter = uintptr(0)
@@ -184036,7 +191496,7 @@ func fts5VocabResetCursor(tls *libc.TLS, pCsr uintptr) { /* sqlite3.c:233535:13:
// Close the cursor. For additional information see the documentation
// on the xClose method of the virtual table interface.
-func fts5VocabCloseMethod(tls *libc.TLS, pCursor uintptr) int32 { /* sqlite3.c:233549:12: */
+func fts5VocabCloseMethod(tls *libc.TLS, pCursor uintptr) int32 { /* sqlite3.c:234825:12: */
var pCsr uintptr = pCursor
fts5VocabResetCursor(tls, pCsr)
sqlite3Fts5BufferFree(tls, (pCsr + 88 /* &.term */))
@@ -184045,7 +191505,7 @@ func fts5VocabCloseMethod(tls *libc.TLS, pCursor uintptr) int32 { /* sqlite3.c:2
return SQLITE_OK
}
-func fts5VocabInstanceNewTerm(tls *libc.TLS, pCsr uintptr) int32 { /* sqlite3.c:233558:12: */
+func fts5VocabInstanceNewTerm(tls *libc.TLS, pCsr uintptr) int32 { /* sqlite3.c:234834:12: */
bp := tls.Alloc(8)
defer tls.Free(8)
@@ -184076,7 +191536,7 @@ func fts5VocabInstanceNewTerm(tls *libc.TLS, pCsr uintptr) int32 { /* sqlite3.c:
return *(*int32)(unsafe.Pointer(bp + 4 /* rc */))
}
-func fts5VocabInstanceNext(tls *libc.TLS, pCsr uintptr) int32 { /* sqlite3.c:233580:12: */
+func fts5VocabInstanceNext(tls *libc.TLS, pCsr uintptr) int32 { /* sqlite3.c:234856:12: */
var eDetail int32 = (*Fts5Config)(unsafe.Pointer((*Fts5Table)(unsafe.Pointer((*Fts5VocabCursor)(unsafe.Pointer(pCsr)).FpFts5)).FpConfig)).FeDetail
var rc int32 = SQLITE_OK
var pIter uintptr = (*Fts5VocabCursor)(unsafe.Pointer(pCsr)).FpIter
@@ -184105,7 +191565,7 @@ func fts5VocabInstanceNext(tls *libc.TLS, pCsr uintptr) int32 { /* sqlite3.c:233
}
// Advance the cursor to the next row in the table.
-func fts5VocabNextMethod(tls *libc.TLS, pCursor uintptr) int32 { /* sqlite3.c:233612:12: */
+func fts5VocabNextMethod(tls *libc.TLS, pCursor uintptr) int32 { /* sqlite3.c:234888:12: */
bp := tls.Alloc(24)
defer tls.Free(24)
@@ -184245,7 +191705,7 @@ func fts5VocabNextMethod(tls *libc.TLS, pCursor uintptr) int32 { /* sqlite3.c:23
}
// This is the xFilter implementation for the virtual table.
-func fts5VocabFilterMethod(tls *libc.TLS, pCursor uintptr, idxNum int32, zUnused uintptr, nUnused int32, apVal uintptr) int32 { /* sqlite3.c:233738:12: */
+func fts5VocabFilterMethod(tls *libc.TLS, pCursor uintptr, idxNum int32, zUnused uintptr, nUnused int32, apVal uintptr) int32 { /* sqlite3.c:235014:12: */
var pTab uintptr = (*Sqlite3_vtab_cursor)(unsafe.Pointer(pCursor)).FpVtab
var pCsr uintptr = pCursor
var eType int32 = (*Fts5VocabTable)(unsafe.Pointer(pTab)).FeType
@@ -184286,7 +191746,7 @@ func fts5VocabFilterMethod(tls *libc.TLS, pCursor uintptr, idxNum int32, zUnused
if pLe != 0 {
var zCopy uintptr = Xsqlite3_value_text(tls, pLe)
if zCopy == uintptr(0) {
- zCopy = ts + 703 /* "" */
+ zCopy = ts + 755 /* "" */
}
(*Fts5VocabCursor)(unsafe.Pointer(pCsr)).FnLeTerm = Xsqlite3_value_bytes(tls, pLe)
(*Fts5VocabCursor)(unsafe.Pointer(pCsr)).FzLeTerm = Xsqlite3_malloc(tls, ((*Fts5VocabCursor)(unsafe.Pointer(pCsr)).FnLeTerm + 1))
@@ -184316,12 +191776,12 @@ func fts5VocabFilterMethod(tls *libc.TLS, pCursor uintptr, idxNum int32, zUnused
// This is the xEof method of the virtual table. SQLite calls this
// routine to find out if it has reached the end of a result set.
-func fts5VocabEofMethod(tls *libc.TLS, pCursor uintptr) int32 { /* sqlite3.c:233809:12: */
+func fts5VocabEofMethod(tls *libc.TLS, pCursor uintptr) int32 { /* sqlite3.c:235085:12: */
var pCsr uintptr = pCursor
return (*Fts5VocabCursor)(unsafe.Pointer(pCsr)).FbEof
}
-func fts5VocabColumnMethod(tls *libc.TLS, pCursor uintptr, pCtx uintptr, iCol int32) int32 { /* sqlite3.c:233814:12: */
+func fts5VocabColumnMethod(tls *libc.TLS, pCursor uintptr, pCtx uintptr, iCol int32) int32 { /* sqlite3.c:235090:12: */
var pCsr uintptr = pCursor
var eDetail int32 = (*Fts5Config)(unsafe.Pointer((*Fts5Table)(unsafe.Pointer((*Fts5VocabCursor)(unsafe.Pointer(pCsr)).FpFts5)).FpConfig)).FeDetail
var eType int32 = (*Fts5VocabTable)(unsafe.Pointer((*Sqlite3_vtab_cursor)(unsafe.Pointer(pCursor)).FpVtab)).FeType
@@ -184394,16 +191854,16 @@ func fts5VocabColumnMethod(tls *libc.TLS, pCursor uintptr, pCtx uintptr, iCol in
// This is the xRowid method. The SQLite core calls this routine to
// retrieve the rowid for the current row of the result set. The
// rowid should be written to *pRowid.
-func fts5VocabRowidMethod(tls *libc.TLS, pCursor uintptr, pRowid uintptr) int32 { /* sqlite3.c:233886:12: */
+func fts5VocabRowidMethod(tls *libc.TLS, pCursor uintptr, pRowid uintptr) int32 { /* sqlite3.c:235162:12: */
var pCsr uintptr = pCursor
*(*Sqlite_int64)(unsafe.Pointer(pRowid)) = (*Fts5VocabCursor)(unsafe.Pointer(pCsr)).Frowid
return SQLITE_OK
}
-func sqlite3Fts5VocabInit(tls *libc.TLS, pGlobal uintptr, db uintptr) int32 { /* sqlite3.c:233895:12: */
+func sqlite3Fts5VocabInit(tls *libc.TLS, pGlobal uintptr, db uintptr) int32 { /* sqlite3.c:235171:12: */
var p uintptr = pGlobal
- return Xsqlite3_create_module_v2(tls, db, ts+34685 /* "fts5vocab" */, uintptr(unsafe.Pointer(&fts5Vocab)), p, uintptr(0))
+ return Xsqlite3_create_module_v2(tls, db, ts+35834 /* "fts5vocab" */, uintptr(unsafe.Pointer(&fts5Vocab)), p, uintptr(0))
}
var fts5Vocab = Sqlite3_module{
@@ -184420,7 +191880,7 @@ var fts5Vocab = Sqlite3_module{
/* xEof */ FxEof: 0,
/* xColumn */ FxColumn: 0,
/* xRowid */ FxRowid: 0,
-} /* sqlite3.c:233896:31 */
+} /* sqlite3.c:235172:31 */
//************* End of fts5.c ***********************************************
//************* Begin file stmt.c *******************************************
@@ -184447,867 +191907,894 @@ var fts5Vocab = Sqlite3_module{
//************* End of stmt.c ***********************************************
// Return the source-id for this library
-func Xsqlite3_sourceid(tls *libc.TLS) uintptr { /* sqlite3.c:234240:23: */
- return ts + 34695 /* "2021-04-19 18:32..." */
+func Xsqlite3_sourceid(tls *libc.TLS) uintptr { /* sqlite3.c:235516:23: */
+ return ts + 35844 /* "2021-06-18 18:36..." */
}
//************************* End of sqlite3.c *****************************
func init() {
- *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aAgg)) + 16 /* .xStep */)) = jsonArrayStep // sqlite3.c:191140:7:
- *(*func(*libc.TLS, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aAgg)) + 24 /* .xFinal */)) = jsonArrayFinal // sqlite3.c:191140:24:
- *(*func(*libc.TLS, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aAgg)) + 32 /* .xValue */)) = jsonArrayValue // sqlite3.c:191140:41:
- *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aAgg)) + 56 /* .xStep */)) = jsonObjectStep // sqlite3.c:191142:7:
- *(*func(*libc.TLS, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aAgg)) + 64 /* .xFinal */)) = jsonObjectFinal // sqlite3.c:191142:24:
- *(*func(*libc.TLS, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aAgg)) + 72 /* .xValue */)) = jsonObjectValue // sqlite3.c:191142:41:
- *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aAgg1)) + 0 /* .xStep */)) = geopolyBBoxStep // sqlite3.c:197353:8:
- *(*func(*libc.TLS, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aAgg1)) + 8 /* .xFinal */)) = geopolyBBoxFinal // sqlite3.c:197353:25:
- *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aAlterTableFuncs)) + 24 /* .xSFunc */)) = renameColumnFunc // sqlite3.c:108757:5:
- *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aAlterTableFuncs)) + 96 /* .xSFunc */)) = renameTableFunc // sqlite3.c:108758:5:
- *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aAlterTableFuncs)) + 168 /* .xSFunc */)) = renameTableTest // sqlite3.c:108759:5:
- *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aAlterTableFuncs)) + 240 /* .xSFunc */)) = dropColumnFunc // sqlite3.c:108760:5:
- *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 24 /* .xSFunc */)) = versionFunc // sqlite3.c:120550:5:
- *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 96 /* .xSFunc */)) = versionFunc // sqlite3.c:120551:5:
- *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 168 /* .xSFunc */)) = versionFunc // sqlite3.c:120552:5:
- *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 240 /* .xSFunc */)) = soundexFunc // sqlite3.c:120558:5:
- *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 312 /* .xSFunc */)) = loadExt // sqlite3.c:120561:5:
- *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 384 /* .xSFunc */)) = loadExt // sqlite3.c:120562:5:
- *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 456 /* .xSFunc */)) = compileoptionusedFunc // sqlite3.c:120568:5:
- *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 528 /* .xSFunc */)) = compileoptiongetFunc // sqlite3.c:120569:5:
- *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 600 /* .xSFunc */)) = versionFunc // sqlite3.c:120571:5:
- *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 672 /* .xSFunc */)) = versionFunc // sqlite3.c:120572:5:
- *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 744 /* .xSFunc */)) = versionFunc // sqlite3.c:120573:5:
- *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 816 /* .xSFunc */)) = versionFunc // sqlite3.c:120575:5:
- *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 888 /* .xSFunc */)) = trimFunc // sqlite3.c:120578:5:
- *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 960 /* .xSFunc */)) = trimFunc // sqlite3.c:120579:5:
- *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 1032 /* .xSFunc */)) = trimFunc // sqlite3.c:120580:5:
- *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 1104 /* .xSFunc */)) = trimFunc // sqlite3.c:120581:5:
- *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 1176 /* .xSFunc */)) = trimFunc // sqlite3.c:120582:5:
- *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 1248 /* .xSFunc */)) = trimFunc // sqlite3.c:120583:5:
- *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 1320 /* .xSFunc */)) = minmaxFunc // sqlite3.c:120584:5:
- *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 1464 /* .xSFunc */)) = minmaxStep // sqlite3.c:120586:5:
- *(*func(*libc.TLS, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 1472 /* .xFinalize */)) = minMaxFinalize // sqlite3.c:120586:5:
- *(*func(*libc.TLS, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 1480 /* .xValue */)) = minMaxValue // sqlite3.c:120586:5:
- *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 1536 /* .xSFunc */)) = minmaxFunc // sqlite3.c:120588:5:
- *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 1680 /* .xSFunc */)) = minmaxStep // sqlite3.c:120590:5:
- *(*func(*libc.TLS, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 1688 /* .xFinalize */)) = minMaxFinalize // sqlite3.c:120590:5:
- *(*func(*libc.TLS, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 1696 /* .xValue */)) = minMaxValue // sqlite3.c:120590:5:
- *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 1752 /* .xSFunc */)) = typeofFunc // sqlite3.c:120592:5:
- *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 1824 /* .xSFunc */)) = lengthFunc // sqlite3.c:120593:5:
- *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 1896 /* .xSFunc */)) = instrFunc // sqlite3.c:120594:5:
- *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 1968 /* .xSFunc */)) = printfFunc // sqlite3.c:120595:5:
- *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 2040 /* .xSFunc */)) = unicodeFunc // sqlite3.c:120596:5:
- *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 2112 /* .xSFunc */)) = charFunc // sqlite3.c:120597:5:
- *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 2184 /* .xSFunc */)) = absFunc // sqlite3.c:120598:5:
- *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 2256 /* .xSFunc */)) = roundFunc // sqlite3.c:120600:5:
- *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 2328 /* .xSFunc */)) = roundFunc // sqlite3.c:120601:5:
- *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 2400 /* .xSFunc */)) = upperFunc // sqlite3.c:120603:5:
- *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 2472 /* .xSFunc */)) = lowerFunc // sqlite3.c:120604:5:
- *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 2544 /* .xSFunc */)) = hexFunc // sqlite3.c:120605:5:
- *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 2616 /* .xSFunc */)) = versionFunc // sqlite3.c:120606:5:
- *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 2688 /* .xSFunc */)) = randomFunc // sqlite3.c:120607:5:
- *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 2760 /* .xSFunc */)) = randomBlob // sqlite3.c:120608:5:
- *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 2832 /* .xSFunc */)) = nullifFunc // sqlite3.c:120609:5:
- *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 2904 /* .xSFunc */)) = versionFunc // sqlite3.c:120610:5:
- *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 2976 /* .xSFunc */)) = sourceidFunc // sqlite3.c:120611:5:
- *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 3048 /* .xSFunc */)) = errlogFunc // sqlite3.c:120612:5:
- *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 3120 /* .xSFunc */)) = quoteFunc // sqlite3.c:120613:5:
- *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 3192 /* .xSFunc */)) = last_insert_rowid // sqlite3.c:120614:5:
- *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 3264 /* .xSFunc */)) = changes // sqlite3.c:120615:5:
- *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 3336 /* .xSFunc */)) = total_changes // sqlite3.c:120616:5:
- *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 3408 /* .xSFunc */)) = replaceFunc // sqlite3.c:120617:5:
- *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 3480 /* .xSFunc */)) = zeroblobFunc // sqlite3.c:120618:5:
- *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 3552 /* .xSFunc */)) = substrFunc // sqlite3.c:120619:5:
- *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 3624 /* .xSFunc */)) = substrFunc // sqlite3.c:120620:5:
- *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 3696 /* .xSFunc */)) = substrFunc // sqlite3.c:120621:5:
- *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 3768 /* .xSFunc */)) = substrFunc // sqlite3.c:120622:5:
- *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 3840 /* .xSFunc */)) = sumStep // sqlite3.c:120623:5:
- *(*func(*libc.TLS, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 3848 /* .xFinalize */)) = sumFinalize // sqlite3.c:120623:5:
- *(*func(*libc.TLS, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 3856 /* .xValue */)) = sumFinalize // sqlite3.c:120623:5:
- *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 3864 /* .xInverse */)) = sumInverse // sqlite3.c:120623:5:
- *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 3912 /* .xSFunc */)) = sumStep // sqlite3.c:120624:5:
- *(*func(*libc.TLS, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 3920 /* .xFinalize */)) = totalFinalize // sqlite3.c:120624:5:
- *(*func(*libc.TLS, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 3928 /* .xValue */)) = totalFinalize // sqlite3.c:120624:5:
- *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 3936 /* .xInverse */)) = sumInverse // sqlite3.c:120624:5:
- *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 3984 /* .xSFunc */)) = sumStep // sqlite3.c:120625:5:
- *(*func(*libc.TLS, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 3992 /* .xFinalize */)) = avgFinalize // sqlite3.c:120625:5:
- *(*func(*libc.TLS, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 4000 /* .xValue */)) = avgFinalize // sqlite3.c:120625:5:
- *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 4008 /* .xInverse */)) = sumInverse // sqlite3.c:120625:5:
- *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 4056 /* .xSFunc */)) = countStep // sqlite3.c:120626:5:
- *(*func(*libc.TLS, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 4064 /* .xFinalize */)) = countFinalize // sqlite3.c:120626:5:
- *(*func(*libc.TLS, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 4072 /* .xValue */)) = countFinalize // sqlite3.c:120626:5:
- *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 4080 /* .xInverse */)) = countInverse // sqlite3.c:120626:5:
- *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 4128 /* .xSFunc */)) = countStep // sqlite3.c:120628:5:
- *(*func(*libc.TLS, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 4136 /* .xFinalize */)) = countFinalize // sqlite3.c:120628:5:
- *(*func(*libc.TLS, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 4144 /* .xValue */)) = countFinalize // sqlite3.c:120628:5:
- *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 4152 /* .xInverse */)) = countInverse // sqlite3.c:120628:5:
- *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 4200 /* .xSFunc */)) = groupConcatStep // sqlite3.c:120630:5:
- *(*func(*libc.TLS, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 4208 /* .xFinalize */)) = groupConcatFinalize // sqlite3.c:120630:5:
- *(*func(*libc.TLS, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 4216 /* .xValue */)) = groupConcatValue // sqlite3.c:120630:5:
- *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 4224 /* .xInverse */)) = groupConcatInverse // sqlite3.c:120630:5:
- *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 4272 /* .xSFunc */)) = groupConcatStep // sqlite3.c:120632:5:
- *(*func(*libc.TLS, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 4280 /* .xFinalize */)) = groupConcatFinalize // sqlite3.c:120632:5:
- *(*func(*libc.TLS, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 4288 /* .xValue */)) = groupConcatValue // sqlite3.c:120632:5:
- *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 4296 /* .xInverse */)) = groupConcatInverse // sqlite3.c:120632:5:
- *(*uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 4328 /* .pUserData */)) = uintptr(unsafe.Pointer(&globInfo)) // sqlite3.c:120635:5:
- *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 4344 /* .xSFunc */)) = likeFunc // sqlite3.c:120635:5:
- *(*uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 4400 /* .pUserData */)) = uintptr(unsafe.Pointer(&likeInfoNorm)) // sqlite3.c:120640:5:
- *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 4416 /* .xSFunc */)) = likeFunc // sqlite3.c:120640:5:
- *(*uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 4472 /* .pUserData */)) = uintptr(unsafe.Pointer(&likeInfoNorm)) // sqlite3.c:120641:5:
- *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 4488 /* .xSFunc */)) = likeFunc // sqlite3.c:120641:5:
- *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 4704 /* .xSFunc */)) = signFunc // sqlite3.c:120684:5:
- *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 4776 /* .xSFunc */)) = versionFunc // sqlite3.c:120685:5:
- *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 4848 /* .xSFunc */)) = versionFunc // sqlite3.c:120686:5:
- *(*uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&aDateTimeFuncs)) + 8 /* .pUserData */)) = uintptr(unsafe.Pointer(&Xsqlite3Config)) // sqlite3.c:23227:5:
- *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aDateTimeFuncs)) + 24 /* .xSFunc */)) = juliandayFunc // sqlite3.c:23227:5:
- *(*uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&aDateTimeFuncs)) + 80 /* .pUserData */)) = uintptr(unsafe.Pointer(&Xsqlite3Config)) // sqlite3.c:23228:5:
- *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aDateTimeFuncs)) + 96 /* .xSFunc */)) = dateFunc // sqlite3.c:23228:5:
- *(*uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&aDateTimeFuncs)) + 152 /* .pUserData */)) = uintptr(unsafe.Pointer(&Xsqlite3Config)) // sqlite3.c:23229:5:
- *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aDateTimeFuncs)) + 168 /* .xSFunc */)) = timeFunc // sqlite3.c:23229:5:
- *(*uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&aDateTimeFuncs)) + 224 /* .pUserData */)) = uintptr(unsafe.Pointer(&Xsqlite3Config)) // sqlite3.c:23230:5:
- *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aDateTimeFuncs)) + 240 /* .xSFunc */)) = datetimeFunc // sqlite3.c:23230:5:
- *(*uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&aDateTimeFuncs)) + 296 /* .pUserData */)) = uintptr(unsafe.Pointer(&Xsqlite3Config)) // sqlite3.c:23231:5:
- *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aDateTimeFuncs)) + 312 /* .xSFunc */)) = strftimeFunc // sqlite3.c:23231:5:
- *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aDateTimeFuncs)) + 384 /* .xSFunc */)) = ctimeFunc // sqlite3.c:23232:5:
- *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aDateTimeFuncs)) + 456 /* .xSFunc */)) = ctimestampFunc // sqlite3.c:23233:5:
- *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aDateTimeFuncs)) + 528 /* .xSFunc */)) = cdateFunc // sqlite3.c:23234:5:
- *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aFunc)) + 16 /* .xFunc */)) = jsonRemoveFunc // sqlite3.c:191110:39:
- *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aFunc)) + 40 /* .xFunc */)) = jsonArrayFunc // sqlite3.c:191111:39:
- *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aFunc)) + 64 /* .xFunc */)) = jsonArrayLengthFunc // sqlite3.c:191112:39:
- *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aFunc)) + 88 /* .xFunc */)) = jsonArrayLengthFunc // sqlite3.c:191113:39:
- *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aFunc)) + 112 /* .xFunc */)) = jsonExtractFunc // sqlite3.c:191114:39:
- *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aFunc)) + 136 /* .xFunc */)) = jsonSetFunc // sqlite3.c:191115:39:
- *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aFunc)) + 160 /* .xFunc */)) = jsonObjectFunc // sqlite3.c:191116:39:
- *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aFunc)) + 184 /* .xFunc */)) = jsonPatchFunc // sqlite3.c:191117:39:
- *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aFunc)) + 208 /* .xFunc */)) = jsonQuoteFunc // sqlite3.c:191118:39:
- *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aFunc)) + 232 /* .xFunc */)) = jsonRemoveFunc // sqlite3.c:191119:39:
- *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aFunc)) + 256 /* .xFunc */)) = jsonReplaceFunc // sqlite3.c:191120:39:
- *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aFunc)) + 280 /* .xFunc */)) = jsonSetFunc // sqlite3.c:191121:39:
- *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aFunc)) + 304 /* .xFunc */)) = jsonTypeFunc // sqlite3.c:191122:39:
- *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aFunc)) + 328 /* .xFunc */)) = jsonTypeFunc // sqlite3.c:191123:39:
- *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aFunc)) + 352 /* .xFunc */)) = jsonValidFunc // sqlite3.c:191124:39:
- *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aFunc1)) + 0 /* .xFunc */)) = geopolyAreaFunc // sqlite3.c:197335:8:
- *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aFunc1)) + 24 /* .xFunc */)) = geopolyBlobFunc // sqlite3.c:197336:8:
- *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aFunc1)) + 48 /* .xFunc */)) = geopolyJsonFunc // sqlite3.c:197337:8:
- *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aFunc1)) + 72 /* .xFunc */)) = geopolySvgFunc // sqlite3.c:197338:8:
- *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aFunc1)) + 96 /* .xFunc */)) = geopolyWithinFunc // sqlite3.c:197339:8:
- *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aFunc1)) + 120 /* .xFunc */)) = geopolyContainsPointFunc // sqlite3.c:197340:8:
- *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aFunc1)) + 144 /* .xFunc */)) = geopolyOverlapFunc // sqlite3.c:197341:8:
- *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aFunc1)) + 168 /* .xFunc */)) = geopolyDebugFunc // sqlite3.c:197342:8:
- *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aFunc1)) + 192 /* .xFunc */)) = geopolyBBoxFunc // sqlite3.c:197343:8:
- *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aFunc1)) + 216 /* .xFunc */)) = geopolyXformFunc // sqlite3.c:197344:8:
- *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aFunc1)) + 240 /* .xFunc */)) = geopolyRegularFunc // sqlite3.c:197345:8:
- *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aFunc1)) + 264 /* .xFunc */)) = geopolyCcwFunc // sqlite3.c:197346:8:
- *(*uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&aMod)) + 8 /* .pModule */)) = uintptr(unsafe.Pointer(&jsonEachModule)) // sqlite3.c:191149:31:
- *(*uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&aMod)) + 24 /* .pModule */)) = uintptr(unsafe.Pointer(&jsonTreeModule)) // sqlite3.c:191150:31:
+ *(*uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&Xsqlite3aEQb)) + 0)) = (uintptr(unsafe.Pointer(&Xsqlite3UpperToLower)) + 210) // sqlite3.c:20881:51:
+ *(*uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&Xsqlite3aGTb)) + 0)) = (uintptr(unsafe.Pointer(&Xsqlite3UpperToLower)) + 216) // sqlite3.c:20882:51:
+ *(*uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&Xsqlite3aLTb)) + 0)) = (uintptr(unsafe.Pointer(&Xsqlite3UpperToLower)) + 204) // sqlite3.c:20880:51:
+ *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aAgg)) + 16 /* .xStep */)) = jsonArrayStep // sqlite3.c:192213:7:
+ *(*func(*libc.TLS, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aAgg)) + 24 /* .xFinal */)) = jsonArrayFinal // sqlite3.c:192213:24:
+ *(*func(*libc.TLS, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aAgg)) + 32 /* .xValue */)) = jsonArrayValue // sqlite3.c:192213:41:
+ *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aAgg)) + 56 /* .xStep */)) = jsonObjectStep // sqlite3.c:192215:7:
+ *(*func(*libc.TLS, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aAgg)) + 64 /* .xFinal */)) = jsonObjectFinal // sqlite3.c:192215:24:
+ *(*func(*libc.TLS, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aAgg)) + 72 /* .xValue */)) = jsonObjectValue // sqlite3.c:192215:41:
+ *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aAgg1)) + 0 /* .xStep */)) = geopolyBBoxStep // sqlite3.c:198435:8:
+ *(*func(*libc.TLS, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aAgg1)) + 8 /* .xFinal */)) = geopolyBBoxFinal // sqlite3.c:198435:25:
+ *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aAlterTableFuncs)) + 24 /* .xSFunc */)) = renameColumnFunc // sqlite3.c:109586:5:
+ *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aAlterTableFuncs)) + 96 /* .xSFunc */)) = renameTableFunc // sqlite3.c:109587:5:
+ *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aAlterTableFuncs)) + 168 /* .xSFunc */)) = renameTableTest // sqlite3.c:109588:5:
+ *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aAlterTableFuncs)) + 240 /* .xSFunc */)) = dropColumnFunc // sqlite3.c:109589:5:
+ *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aAlterTableFuncs)) + 312 /* .xSFunc */)) = renameQuotefixFunc // sqlite3.c:109590:5:
+ *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 24 /* .xSFunc */)) = versionFunc // sqlite3.c:121440:5:
+ *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 96 /* .xSFunc */)) = versionFunc // sqlite3.c:121441:5:
+ *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 168 /* .xSFunc */)) = versionFunc // sqlite3.c:121442:5:
+ *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 240 /* .xSFunc */)) = soundexFunc // sqlite3.c:121448:5:
+ *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 312 /* .xSFunc */)) = loadExt // sqlite3.c:121451:5:
+ *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 384 /* .xSFunc */)) = loadExt // sqlite3.c:121452:5:
+ *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 456 /* .xSFunc */)) = compileoptionusedFunc // sqlite3.c:121458:5:
+ *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 528 /* .xSFunc */)) = compileoptiongetFunc // sqlite3.c:121459:5:
+ *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 600 /* .xSFunc */)) = versionFunc // sqlite3.c:121461:5:
+ *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 672 /* .xSFunc */)) = versionFunc // sqlite3.c:121462:5:
+ *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 744 /* .xSFunc */)) = versionFunc // sqlite3.c:121463:5:
+ *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 816 /* .xSFunc */)) = versionFunc // sqlite3.c:121465:5:
+ *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 888 /* .xSFunc */)) = trimFunc // sqlite3.c:121468:5:
+ *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 960 /* .xSFunc */)) = trimFunc // sqlite3.c:121469:5:
+ *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 1032 /* .xSFunc */)) = trimFunc // sqlite3.c:121470:5:
+ *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 1104 /* .xSFunc */)) = trimFunc // sqlite3.c:121471:5:
+ *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 1176 /* .xSFunc */)) = trimFunc // sqlite3.c:121472:5:
+ *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 1248 /* .xSFunc */)) = trimFunc // sqlite3.c:121473:5:
+ *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 1320 /* .xSFunc */)) = minmaxFunc // sqlite3.c:121474:5:
+ *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 1464 /* .xSFunc */)) = minmaxStep // sqlite3.c:121476:5:
+ *(*func(*libc.TLS, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 1472 /* .xFinalize */)) = minMaxFinalize // sqlite3.c:121476:5:
+ *(*func(*libc.TLS, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 1480 /* .xValue */)) = minMaxValue // sqlite3.c:121476:5:
+ *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 1536 /* .xSFunc */)) = minmaxFunc // sqlite3.c:121478:5:
+ *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 1680 /* .xSFunc */)) = minmaxStep // sqlite3.c:121480:5:
+ *(*func(*libc.TLS, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 1688 /* .xFinalize */)) = minMaxFinalize // sqlite3.c:121480:5:
+ *(*func(*libc.TLS, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 1696 /* .xValue */)) = minMaxValue // sqlite3.c:121480:5:
+ *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 1752 /* .xSFunc */)) = typeofFunc // sqlite3.c:121482:5:
+ *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 1824 /* .xSFunc */)) = lengthFunc // sqlite3.c:121483:5:
+ *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 1896 /* .xSFunc */)) = instrFunc // sqlite3.c:121484:5:
+ *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 1968 /* .xSFunc */)) = printfFunc // sqlite3.c:121485:5:
+ *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 2040 /* .xSFunc */)) = unicodeFunc // sqlite3.c:121486:5:
+ *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 2112 /* .xSFunc */)) = charFunc // sqlite3.c:121487:5:
+ *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 2184 /* .xSFunc */)) = absFunc // sqlite3.c:121488:5:
+ *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 2256 /* .xSFunc */)) = roundFunc // sqlite3.c:121490:5:
+ *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 2328 /* .xSFunc */)) = roundFunc // sqlite3.c:121491:5:
+ *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 2400 /* .xSFunc */)) = upperFunc // sqlite3.c:121493:5:
+ *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 2472 /* .xSFunc */)) = lowerFunc // sqlite3.c:121494:5:
+ *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 2544 /* .xSFunc */)) = hexFunc // sqlite3.c:121495:5:
+ *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 2616 /* .xSFunc */)) = versionFunc // sqlite3.c:121496:5:
+ *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 2688 /* .xSFunc */)) = randomFunc // sqlite3.c:121497:5:
+ *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 2760 /* .xSFunc */)) = randomBlob // sqlite3.c:121498:5:
+ *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 2832 /* .xSFunc */)) = nullifFunc // sqlite3.c:121499:5:
+ *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 2904 /* .xSFunc */)) = versionFunc // sqlite3.c:121500:5:
+ *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 2976 /* .xSFunc */)) = sourceidFunc // sqlite3.c:121501:5:
+ *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 3048 /* .xSFunc */)) = errlogFunc // sqlite3.c:121502:5:
+ *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 3120 /* .xSFunc */)) = quoteFunc // sqlite3.c:121503:5:
+ *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 3192 /* .xSFunc */)) = last_insert_rowid // sqlite3.c:121504:5:
+ *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 3264 /* .xSFunc */)) = changes // sqlite3.c:121505:5:
+ *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 3336 /* .xSFunc */)) = total_changes // sqlite3.c:121506:5:
+ *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 3408 /* .xSFunc */)) = replaceFunc // sqlite3.c:121507:5:
+ *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 3480 /* .xSFunc */)) = zeroblobFunc // sqlite3.c:121508:5:
+ *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 3552 /* .xSFunc */)) = substrFunc // sqlite3.c:121509:5:
+ *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 3624 /* .xSFunc */)) = substrFunc // sqlite3.c:121510:5:
+ *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 3696 /* .xSFunc */)) = substrFunc // sqlite3.c:121511:5:
+ *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 3768 /* .xSFunc */)) = substrFunc // sqlite3.c:121512:5:
+ *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 3840 /* .xSFunc */)) = sumStep // sqlite3.c:121513:5:
+ *(*func(*libc.TLS, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 3848 /* .xFinalize */)) = sumFinalize // sqlite3.c:121513:5:
+ *(*func(*libc.TLS, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 3856 /* .xValue */)) = sumFinalize // sqlite3.c:121513:5:
+ *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 3864 /* .xInverse */)) = sumInverse // sqlite3.c:121513:5:
+ *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 3912 /* .xSFunc */)) = sumStep // sqlite3.c:121514:5:
+ *(*func(*libc.TLS, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 3920 /* .xFinalize */)) = totalFinalize // sqlite3.c:121514:5:
+ *(*func(*libc.TLS, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 3928 /* .xValue */)) = totalFinalize // sqlite3.c:121514:5:
+ *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 3936 /* .xInverse */)) = sumInverse // sqlite3.c:121514:5:
+ *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 3984 /* .xSFunc */)) = sumStep // sqlite3.c:121515:5:
+ *(*func(*libc.TLS, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 3992 /* .xFinalize */)) = avgFinalize // sqlite3.c:121515:5:
+ *(*func(*libc.TLS, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 4000 /* .xValue */)) = avgFinalize // sqlite3.c:121515:5:
+ *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 4008 /* .xInverse */)) = sumInverse // sqlite3.c:121515:5:
+ *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 4056 /* .xSFunc */)) = countStep // sqlite3.c:121516:5:
+ *(*func(*libc.TLS, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 4064 /* .xFinalize */)) = countFinalize // sqlite3.c:121516:5:
+ *(*func(*libc.TLS, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 4072 /* .xValue */)) = countFinalize // sqlite3.c:121516:5:
+ *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 4080 /* .xInverse */)) = countInverse // sqlite3.c:121516:5:
+ *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 4128 /* .xSFunc */)) = countStep // sqlite3.c:121518:5:
+ *(*func(*libc.TLS, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 4136 /* .xFinalize */)) = countFinalize // sqlite3.c:121518:5:
+ *(*func(*libc.TLS, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 4144 /* .xValue */)) = countFinalize // sqlite3.c:121518:5:
+ *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 4152 /* .xInverse */)) = countInverse // sqlite3.c:121518:5:
+ *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 4200 /* .xSFunc */)) = groupConcatStep // sqlite3.c:121520:5:
+ *(*func(*libc.TLS, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 4208 /* .xFinalize */)) = groupConcatFinalize // sqlite3.c:121520:5:
+ *(*func(*libc.TLS, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 4216 /* .xValue */)) = groupConcatValue // sqlite3.c:121520:5:
+ *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 4224 /* .xInverse */)) = groupConcatInverse // sqlite3.c:121520:5:
+ *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 4272 /* .xSFunc */)) = groupConcatStep // sqlite3.c:121522:5:
+ *(*func(*libc.TLS, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 4280 /* .xFinalize */)) = groupConcatFinalize // sqlite3.c:121522:5:
+ *(*func(*libc.TLS, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 4288 /* .xValue */)) = groupConcatValue // sqlite3.c:121522:5:
+ *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 4296 /* .xInverse */)) = groupConcatInverse // sqlite3.c:121522:5:
+ *(*uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 4328 /* .pUserData */)) = uintptr(unsafe.Pointer(&globInfo)) // sqlite3.c:121525:5:
+ *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 4344 /* .xSFunc */)) = likeFunc // sqlite3.c:121525:5:
+ *(*uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 4400 /* .pUserData */)) = uintptr(unsafe.Pointer(&likeInfoNorm)) // sqlite3.c:121530:5:
+ *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 4416 /* .xSFunc */)) = likeFunc // sqlite3.c:121530:5:
+ *(*uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 4472 /* .pUserData */)) = uintptr(unsafe.Pointer(&likeInfoNorm)) // sqlite3.c:121531:5:
+ *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 4488 /* .xSFunc */)) = likeFunc // sqlite3.c:121531:5:
+ *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 4704 /* .xSFunc */)) = signFunc // sqlite3.c:121574:5:
+ *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 4776 /* .xSFunc */)) = versionFunc // sqlite3.c:121575:5:
+ *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 4848 /* .xSFunc */)) = versionFunc // sqlite3.c:121576:5:
+ *(*uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&aDateTimeFuncs)) + 8 /* .pUserData */)) = uintptr(unsafe.Pointer(&Xsqlite3Config)) // sqlite3.c:23407:5:
+ *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aDateTimeFuncs)) + 24 /* .xSFunc */)) = juliandayFunc // sqlite3.c:23407:5:
+ *(*uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&aDateTimeFuncs)) + 80 /* .pUserData */)) = uintptr(unsafe.Pointer(&Xsqlite3Config)) // sqlite3.c:23408:5:
+ *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aDateTimeFuncs)) + 96 /* .xSFunc */)) = dateFunc // sqlite3.c:23408:5:
+ *(*uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&aDateTimeFuncs)) + 152 /* .pUserData */)) = uintptr(unsafe.Pointer(&Xsqlite3Config)) // sqlite3.c:23409:5:
+ *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aDateTimeFuncs)) + 168 /* .xSFunc */)) = timeFunc // sqlite3.c:23409:5:
+ *(*uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&aDateTimeFuncs)) + 224 /* .pUserData */)) = uintptr(unsafe.Pointer(&Xsqlite3Config)) // sqlite3.c:23410:5:
+ *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aDateTimeFuncs)) + 240 /* .xSFunc */)) = datetimeFunc // sqlite3.c:23410:5:
+ *(*uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&aDateTimeFuncs)) + 296 /* .pUserData */)) = uintptr(unsafe.Pointer(&Xsqlite3Config)) // sqlite3.c:23411:5:
+ *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aDateTimeFuncs)) + 312 /* .xSFunc */)) = strftimeFunc // sqlite3.c:23411:5:
+ *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aDateTimeFuncs)) + 384 /* .xSFunc */)) = ctimeFunc // sqlite3.c:23412:5:
+ *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aDateTimeFuncs)) + 456 /* .xSFunc */)) = ctimestampFunc // sqlite3.c:23413:5:
+ *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aDateTimeFuncs)) + 528 /* .xSFunc */)) = cdateFunc // sqlite3.c:23414:5:
+ *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aFunc)) + 16 /* .xFunc */)) = jsonRemoveFunc // sqlite3.c:192183:39:
+ *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aFunc)) + 40 /* .xFunc */)) = jsonArrayFunc // sqlite3.c:192184:39:
+ *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aFunc)) + 64 /* .xFunc */)) = jsonArrayLengthFunc // sqlite3.c:192185:39:
+ *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aFunc)) + 88 /* .xFunc */)) = jsonArrayLengthFunc // sqlite3.c:192186:39:
+ *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aFunc)) + 112 /* .xFunc */)) = jsonExtractFunc // sqlite3.c:192187:39:
+ *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aFunc)) + 136 /* .xFunc */)) = jsonSetFunc // sqlite3.c:192188:39:
+ *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aFunc)) + 160 /* .xFunc */)) = jsonObjectFunc // sqlite3.c:192189:39:
+ *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aFunc)) + 184 /* .xFunc */)) = jsonPatchFunc // sqlite3.c:192190:39:
+ *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aFunc)) + 208 /* .xFunc */)) = jsonQuoteFunc // sqlite3.c:192191:39:
+ *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aFunc)) + 232 /* .xFunc */)) = jsonRemoveFunc // sqlite3.c:192192:39:
+ *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aFunc)) + 256 /* .xFunc */)) = jsonReplaceFunc // sqlite3.c:192193:39:
+ *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aFunc)) + 280 /* .xFunc */)) = jsonSetFunc // sqlite3.c:192194:39:
+ *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aFunc)) + 304 /* .xFunc */)) = jsonTypeFunc // sqlite3.c:192195:39:
+ *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aFunc)) + 328 /* .xFunc */)) = jsonTypeFunc // sqlite3.c:192196:39:
+ *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aFunc)) + 352 /* .xFunc */)) = jsonValidFunc // sqlite3.c:192197:39:
+ *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aFunc1)) + 0 /* .xFunc */)) = geopolyAreaFunc // sqlite3.c:198417:8:
+ *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aFunc1)) + 24 /* .xFunc */)) = geopolyBlobFunc // sqlite3.c:198418:8:
+ *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aFunc1)) + 48 /* .xFunc */)) = geopolyJsonFunc // sqlite3.c:198419:8:
+ *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aFunc1)) + 72 /* .xFunc */)) = geopolySvgFunc // sqlite3.c:198420:8:
+ *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aFunc1)) + 96 /* .xFunc */)) = geopolyWithinFunc // sqlite3.c:198421:8:
+ *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aFunc1)) + 120 /* .xFunc */)) = geopolyContainsPointFunc // sqlite3.c:198422:8:
+ *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aFunc1)) + 144 /* .xFunc */)) = geopolyOverlapFunc // sqlite3.c:198423:8:
+ *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aFunc1)) + 168 /* .xFunc */)) = geopolyDebugFunc // sqlite3.c:198424:8:
+ *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aFunc1)) + 192 /* .xFunc */)) = geopolyBBoxFunc // sqlite3.c:198425:8:
+ *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aFunc1)) + 216 /* .xFunc */)) = geopolyXformFunc // sqlite3.c:198426:8:
+ *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aFunc1)) + 240 /* .xFunc */)) = geopolyRegularFunc // sqlite3.c:198427:8:
+ *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aFunc1)) + 264 /* .xFunc */)) = geopolyCcwFunc // sqlite3.c:198428:8:
+ *(*uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&aMod)) + 8 /* .pModule */)) = uintptr(unsafe.Pointer(&jsonEachModule)) // sqlite3.c:192222:31:
+ *(*uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&aMod)) + 24 /* .pModule */)) = uintptr(unsafe.Pointer(&jsonTreeModule)) // sqlite3.c:192223:31:
*(*Sqlite3_syscall_ptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&aSyscall)) + 8 /* .pCurrent */)) = *(*uintptr)(unsafe.Pointer(&struct {
f func(*libc.TLS, uintptr, int32, int32) int32
- }{posixOpen})) // sqlite3.c:34250:21:
- *(*Sqlite3_syscall_ptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&aSyscall)) + 32 /* .pCurrent */)) = *(*uintptr)(unsafe.Pointer(&struct{ f func(*libc.TLS, int32) int32 }{libc.Xclose})) // sqlite3.c:34253:21:
+ }{posixOpen})) // sqlite3.c:34447:21:
+ *(*Sqlite3_syscall_ptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&aSyscall)) + 32 /* .pCurrent */)) = *(*uintptr)(unsafe.Pointer(&struct{ f func(*libc.TLS, int32) int32 }{libc.Xclose})) // sqlite3.c:34450:21:
*(*Sqlite3_syscall_ptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&aSyscall)) + 56 /* .pCurrent */)) = *(*uintptr)(unsafe.Pointer(&struct {
f func(*libc.TLS, uintptr, int32) int32
- }{libc.Xaccess})) // sqlite3.c:34256:21:
+ }{libc.Xaccess})) // sqlite3.c:34453:21:
*(*Sqlite3_syscall_ptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&aSyscall)) + 80 /* .pCurrent */)) = *(*uintptr)(unsafe.Pointer(&struct {
f func(*libc.TLS, uintptr, Size_t) uintptr
- }{libc.Xgetcwd})) // sqlite3.c:34259:21:
+ }{libc.Xgetcwd})) // sqlite3.c:34456:21:
*(*Sqlite3_syscall_ptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&aSyscall)) + 104 /* .pCurrent */)) = *(*uintptr)(unsafe.Pointer(&struct {
f func(*libc.TLS, uintptr, uintptr) int32
- }{libc.Xstat})) // sqlite3.c:34262:21:
+ }{libc.Xstat})) // sqlite3.c:34459:21:
*(*Sqlite3_syscall_ptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&aSyscall)) + 128 /* .pCurrent */)) = *(*uintptr)(unsafe.Pointer(&struct {
f func(*libc.TLS, int32, uintptr) int32
- }{libc.Xfstat})) // sqlite3.c:34275:21:
+ }{libc.Xfstat})) // sqlite3.c:34472:21:
*(*Sqlite3_syscall_ptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&aSyscall)) + 152 /* .pCurrent */)) = *(*uintptr)(unsafe.Pointer(&struct {
f func(*libc.TLS, int32, X__off64_t) int32
- }{libc.Xftruncate})) // sqlite3.c:34279:21:
+ }{libc.Xftruncate})) // sqlite3.c:34476:21:
*(*Sqlite3_syscall_ptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&aSyscall)) + 176 /* .pCurrent */)) = *(*uintptr)(unsafe.Pointer(&struct {
f func(*libc.TLS, int32, int32, uintptr) int32
- }{libc.Xfcntl})) // sqlite3.c:34282:21:
+ }{libc.Xfcntl})) // sqlite3.c:34479:21:
*(*Sqlite3_syscall_ptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&aSyscall)) + 200 /* .pCurrent */)) = *(*uintptr)(unsafe.Pointer(&struct {
f func(*libc.TLS, int32, uintptr, Size_t) Ssize_t
- }{libc.Xread})) // sqlite3.c:34285:21:
+ }{libc.Xread})) // sqlite3.c:34482:21:
*(*Sqlite3_syscall_ptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&aSyscall)) + 272 /* .pCurrent */)) = *(*uintptr)(unsafe.Pointer(&struct {
f func(*libc.TLS, int32, uintptr, Size_t) Ssize_t
- }{libc.Xwrite})) // sqlite3.c:34302:21:
+ }{libc.Xwrite})) // sqlite3.c:34499:21:
*(*Sqlite3_syscall_ptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&aSyscall)) + 344 /* .pCurrent */)) = *(*uintptr)(unsafe.Pointer(&struct {
f func(*libc.TLS, int32, X__mode_t) int32
- }{libc.Xfchmod})) // sqlite3.c:34321:21:
+ }{libc.Xfchmod})) // sqlite3.c:34518:21:
*(*Sqlite3_syscall_ptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&aSyscall)) + 392 /* .pCurrent */)) = *(*uintptr)(unsafe.Pointer(&struct {
f func(*libc.TLS, uintptr) int32
- }{libc.Xunlink})) // sqlite3.c:34331:21:
+ }{libc.Xunlink})) // sqlite3.c:34528:21:
*(*Sqlite3_syscall_ptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&aSyscall)) + 416 /* .pCurrent */)) = *(*uintptr)(unsafe.Pointer(&struct {
f func(*libc.TLS, uintptr, uintptr) int32
- }{openDirectory})) // sqlite3.c:34334:25:
+ }{openDirectory})) // sqlite3.c:34531:25:
*(*Sqlite3_syscall_ptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&aSyscall)) + 440 /* .pCurrent */)) = *(*uintptr)(unsafe.Pointer(&struct {
f func(*libc.TLS, uintptr, X__mode_t) int32
- }{libc.Xmkdir})) // sqlite3.c:34337:21:
+ }{libc.Xmkdir})) // sqlite3.c:34534:21:
*(*Sqlite3_syscall_ptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&aSyscall)) + 464 /* .pCurrent */)) = *(*uintptr)(unsafe.Pointer(&struct {
f func(*libc.TLS, uintptr) int32
- }{libc.Xrmdir})) // sqlite3.c:34340:21:
+ }{libc.Xrmdir})) // sqlite3.c:34537:21:
*(*Sqlite3_syscall_ptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&aSyscall)) + 488 /* .pCurrent */)) = *(*uintptr)(unsafe.Pointer(&struct {
f func(*libc.TLS, int32, X__uid_t, X__gid_t) int32
- }{libc.Xfchown})) // sqlite3.c:34344:21:
- *(*Sqlite3_syscall_ptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&aSyscall)) + 512 /* .pCurrent */)) = *(*uintptr)(unsafe.Pointer(&struct{ f func(*libc.TLS) X__uid_t }{libc.Xgeteuid})) // sqlite3.c:34351:21:
+ }{libc.Xfchown})) // sqlite3.c:34541:21:
+ *(*Sqlite3_syscall_ptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&aSyscall)) + 512 /* .pCurrent */)) = *(*uintptr)(unsafe.Pointer(&struct{ f func(*libc.TLS) X__uid_t }{libc.Xgeteuid})) // sqlite3.c:34548:21:
*(*Sqlite3_syscall_ptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&aSyscall)) + 536 /* .pCurrent */)) = *(*uintptr)(unsafe.Pointer(&struct {
f func(*libc.TLS, uintptr, Size_t, int32, int32, int32, X__off64_t) uintptr
- }{libc.Xmmap})) // sqlite3.c:34358:21:
+ }{libc.Xmmap})) // sqlite3.c:34555:21:
*(*Sqlite3_syscall_ptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&aSyscall)) + 560 /* .pCurrent */)) = *(*uintptr)(unsafe.Pointer(&struct {
f func(*libc.TLS, uintptr, Size_t) int32
- }{libc.Xmunmap})) // sqlite3.c:34365:21:
+ }{libc.Xmunmap})) // sqlite3.c:34562:21:
*(*Sqlite3_syscall_ptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&aSyscall)) + 584 /* .pCurrent */)) = *(*uintptr)(unsafe.Pointer(&struct {
f func(*libc.TLS, uintptr, Size_t, Size_t, int32, uintptr) uintptr
- }{libc.Xmremap})) // sqlite3.c:34372:21:
- *(*Sqlite3_syscall_ptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&aSyscall)) + 608 /* .pCurrent */)) = *(*uintptr)(unsafe.Pointer(&struct{ f func(*libc.TLS) int32 }{unixGetpagesize})) // sqlite3.c:34379:21:
+ }{libc.Xmremap})) // sqlite3.c:34569:21:
+ *(*Sqlite3_syscall_ptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&aSyscall)) + 608 /* .pCurrent */)) = *(*uintptr)(unsafe.Pointer(&struct{ f func(*libc.TLS) int32 }{unixGetpagesize})) // sqlite3.c:34576:21:
*(*Sqlite3_syscall_ptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&aSyscall)) + 632 /* .pCurrent */)) = *(*uintptr)(unsafe.Pointer(&struct {
f func(*libc.TLS, uintptr, uintptr, Size_t) Ssize_t
- }{libc.Xreadlink})) // sqlite3.c:34386:21:
+ }{libc.Xreadlink})) // sqlite3.c:34583:21:
*(*Sqlite3_syscall_ptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&aSyscall)) + 656 /* .pCurrent */)) = *(*uintptr)(unsafe.Pointer(&struct {
f func(*libc.TLS, uintptr, uintptr) int32
- }{libc.Xlstat})) // sqlite3.c:34393:22:
- *(*uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&aVfs)) + 32 /* .pAppData */)) = uintptr(unsafe.Pointer(&posixIoFinder)) // sqlite3.c:41861:5:
- *(*func(*libc.TLS, uintptr, uintptr, uintptr, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&aVfs)) + 40 /* .xOpen */)) = unixOpen // sqlite3.c:41861:5:
- *(*func(*libc.TLS, uintptr, uintptr, int32) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&aVfs)) + 48 /* .xDelete */)) = unixDelete // sqlite3.c:41861:5:
- *(*func(*libc.TLS, uintptr, uintptr, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&aVfs)) + 56 /* .xAccess */)) = unixAccess // sqlite3.c:41861:5:
- *(*func(*libc.TLS, uintptr, uintptr, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&aVfs)) + 64 /* .xFullPathname */)) = unixFullPathname // sqlite3.c:41861:5:
- *(*func(*libc.TLS, uintptr, uintptr) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&aVfs)) + 72 /* .xDlOpen */)) = unixDlOpen // sqlite3.c:41861:5:
- *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aVfs)) + 80 /* .xDlError */)) = unixDlError // sqlite3.c:41861:5:
- *(*func(*libc.TLS, uintptr, uintptr, uintptr) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&aVfs)) + 88 /* .xDlSym */)) = unixDlSym // sqlite3.c:41861:5:
- *(*func(*libc.TLS, uintptr, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aVfs)) + 96 /* .xDlClose */)) = unixDlClose // sqlite3.c:41861:5:
- *(*func(*libc.TLS, uintptr, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&aVfs)) + 104 /* .xRandomness */)) = unixRandomness // sqlite3.c:41861:5:
- *(*func(*libc.TLS, uintptr, int32) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&aVfs)) + 112 /* .xSleep */)) = unixSleep // sqlite3.c:41861:5:
- *(*func(*libc.TLS, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&aVfs)) + 120 /* .xCurrentTime */)) = unixCurrentTime // sqlite3.c:41861:5:
- *(*func(*libc.TLS, uintptr, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&aVfs)) + 128 /* .xGetLastError */)) = unixGetLastError // sqlite3.c:41861:5:
- *(*func(*libc.TLS, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&aVfs)) + 136 /* .xCurrentTimeInt64 */)) = unixCurrentTimeInt64 // sqlite3.c:41861:5:
- *(*func(*libc.TLS, uintptr, uintptr, Sqlite3_syscall_ptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&aVfs)) + 144 /* .xSetSystemCall */)) = unixSetSystemCall // sqlite3.c:41861:5:
- *(*func(*libc.TLS, uintptr, uintptr) Sqlite3_syscall_ptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&aVfs)) + 152 /* .xGetSystemCall */)) = unixGetSystemCall // sqlite3.c:41861:5:
- *(*func(*libc.TLS, uintptr, uintptr) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&aVfs)) + 160 /* .xNextSystemCall */)) = unixNextSystemCall // sqlite3.c:41861:5:
- *(*uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&aVfs)) + 200 /* .pAppData */)) = uintptr(unsafe.Pointer(&nolockIoFinder)) // sqlite3.c:41863:5:
- *(*func(*libc.TLS, uintptr, uintptr, uintptr, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&aVfs)) + 208 /* .xOpen */)) = unixOpen // sqlite3.c:41863:5:
- *(*func(*libc.TLS, uintptr, uintptr, int32) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&aVfs)) + 216 /* .xDelete */)) = unixDelete // sqlite3.c:41863:5:
- *(*func(*libc.TLS, uintptr, uintptr, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&aVfs)) + 224 /* .xAccess */)) = unixAccess // sqlite3.c:41863:5:
- *(*func(*libc.TLS, uintptr, uintptr, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&aVfs)) + 232 /* .xFullPathname */)) = unixFullPathname // sqlite3.c:41863:5:
- *(*func(*libc.TLS, uintptr, uintptr) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&aVfs)) + 240 /* .xDlOpen */)) = unixDlOpen // sqlite3.c:41863:5:
- *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aVfs)) + 248 /* .xDlError */)) = unixDlError // sqlite3.c:41863:5:
- *(*func(*libc.TLS, uintptr, uintptr, uintptr) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&aVfs)) + 256 /* .xDlSym */)) = unixDlSym // sqlite3.c:41863:5:
- *(*func(*libc.TLS, uintptr, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aVfs)) + 264 /* .xDlClose */)) = unixDlClose // sqlite3.c:41863:5:
- *(*func(*libc.TLS, uintptr, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&aVfs)) + 272 /* .xRandomness */)) = unixRandomness // sqlite3.c:41863:5:
- *(*func(*libc.TLS, uintptr, int32) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&aVfs)) + 280 /* .xSleep */)) = unixSleep // sqlite3.c:41863:5:
- *(*func(*libc.TLS, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&aVfs)) + 288 /* .xCurrentTime */)) = unixCurrentTime // sqlite3.c:41863:5:
- *(*func(*libc.TLS, uintptr, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&aVfs)) + 296 /* .xGetLastError */)) = unixGetLastError // sqlite3.c:41863:5:
- *(*func(*libc.TLS, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&aVfs)) + 304 /* .xCurrentTimeInt64 */)) = unixCurrentTimeInt64 // sqlite3.c:41863:5:
- *(*func(*libc.TLS, uintptr, uintptr, Sqlite3_syscall_ptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&aVfs)) + 312 /* .xSetSystemCall */)) = unixSetSystemCall // sqlite3.c:41863:5:
- *(*func(*libc.TLS, uintptr, uintptr) Sqlite3_syscall_ptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&aVfs)) + 320 /* .xGetSystemCall */)) = unixGetSystemCall // sqlite3.c:41863:5:
- *(*func(*libc.TLS, uintptr, uintptr) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&aVfs)) + 328 /* .xNextSystemCall */)) = unixNextSystemCall // sqlite3.c:41863:5:
- *(*uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&aVfs)) + 368 /* .pAppData */)) = uintptr(unsafe.Pointer(&dotlockIoFinder)) // sqlite3.c:41864:5:
- *(*func(*libc.TLS, uintptr, uintptr, uintptr, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&aVfs)) + 376 /* .xOpen */)) = unixOpen // sqlite3.c:41864:5:
- *(*func(*libc.TLS, uintptr, uintptr, int32) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&aVfs)) + 384 /* .xDelete */)) = unixDelete // sqlite3.c:41864:5:
- *(*func(*libc.TLS, uintptr, uintptr, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&aVfs)) + 392 /* .xAccess */)) = unixAccess // sqlite3.c:41864:5:
- *(*func(*libc.TLS, uintptr, uintptr, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&aVfs)) + 400 /* .xFullPathname */)) = unixFullPathname // sqlite3.c:41864:5:
- *(*func(*libc.TLS, uintptr, uintptr) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&aVfs)) + 408 /* .xDlOpen */)) = unixDlOpen // sqlite3.c:41864:5:
- *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aVfs)) + 416 /* .xDlError */)) = unixDlError // sqlite3.c:41864:5:
- *(*func(*libc.TLS, uintptr, uintptr, uintptr) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&aVfs)) + 424 /* .xDlSym */)) = unixDlSym // sqlite3.c:41864:5:
- *(*func(*libc.TLS, uintptr, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aVfs)) + 432 /* .xDlClose */)) = unixDlClose // sqlite3.c:41864:5:
- *(*func(*libc.TLS, uintptr, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&aVfs)) + 440 /* .xRandomness */)) = unixRandomness // sqlite3.c:41864:5:
- *(*func(*libc.TLS, uintptr, int32) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&aVfs)) + 448 /* .xSleep */)) = unixSleep // sqlite3.c:41864:5:
- *(*func(*libc.TLS, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&aVfs)) + 456 /* .xCurrentTime */)) = unixCurrentTime // sqlite3.c:41864:5:
- *(*func(*libc.TLS, uintptr, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&aVfs)) + 464 /* .xGetLastError */)) = unixGetLastError // sqlite3.c:41864:5:
- *(*func(*libc.TLS, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&aVfs)) + 472 /* .xCurrentTimeInt64 */)) = unixCurrentTimeInt64 // sqlite3.c:41864:5:
- *(*func(*libc.TLS, uintptr, uintptr, Sqlite3_syscall_ptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&aVfs)) + 480 /* .xSetSystemCall */)) = unixSetSystemCall // sqlite3.c:41864:5:
- *(*func(*libc.TLS, uintptr, uintptr) Sqlite3_syscall_ptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&aVfs)) + 488 /* .xGetSystemCall */)) = unixGetSystemCall // sqlite3.c:41864:5:
- *(*func(*libc.TLS, uintptr, uintptr) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&aVfs)) + 496 /* .xNextSystemCall */)) = unixNextSystemCall // sqlite3.c:41864:5:
- *(*uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&aVfs)) + 536 /* .pAppData */)) = uintptr(unsafe.Pointer(&posixIoFinder)) // sqlite3.c:41865:5:
- *(*func(*libc.TLS, uintptr, uintptr, uintptr, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&aVfs)) + 544 /* .xOpen */)) = unixOpen // sqlite3.c:41865:5:
- *(*func(*libc.TLS, uintptr, uintptr, int32) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&aVfs)) + 552 /* .xDelete */)) = unixDelete // sqlite3.c:41865:5:
- *(*func(*libc.TLS, uintptr, uintptr, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&aVfs)) + 560 /* .xAccess */)) = unixAccess // sqlite3.c:41865:5:
- *(*func(*libc.TLS, uintptr, uintptr, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&aVfs)) + 568 /* .xFullPathname */)) = unixFullPathname // sqlite3.c:41865:5:
- *(*func(*libc.TLS, uintptr, uintptr) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&aVfs)) + 576 /* .xDlOpen */)) = unixDlOpen // sqlite3.c:41865:5:
- *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aVfs)) + 584 /* .xDlError */)) = unixDlError // sqlite3.c:41865:5:
- *(*func(*libc.TLS, uintptr, uintptr, uintptr) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&aVfs)) + 592 /* .xDlSym */)) = unixDlSym // sqlite3.c:41865:5:
- *(*func(*libc.TLS, uintptr, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aVfs)) + 600 /* .xDlClose */)) = unixDlClose // sqlite3.c:41865:5:
- *(*func(*libc.TLS, uintptr, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&aVfs)) + 608 /* .xRandomness */)) = unixRandomness // sqlite3.c:41865:5:
- *(*func(*libc.TLS, uintptr, int32) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&aVfs)) + 616 /* .xSleep */)) = unixSleep // sqlite3.c:41865:5:
- *(*func(*libc.TLS, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&aVfs)) + 624 /* .xCurrentTime */)) = unixCurrentTime // sqlite3.c:41865:5:
- *(*func(*libc.TLS, uintptr, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&aVfs)) + 632 /* .xGetLastError */)) = unixGetLastError // sqlite3.c:41865:5:
- *(*func(*libc.TLS, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&aVfs)) + 640 /* .xCurrentTimeInt64 */)) = unixCurrentTimeInt64 // sqlite3.c:41865:5:
- *(*func(*libc.TLS, uintptr, uintptr, Sqlite3_syscall_ptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&aVfs)) + 648 /* .xSetSystemCall */)) = unixSetSystemCall // sqlite3.c:41865:5:
- *(*func(*libc.TLS, uintptr, uintptr) Sqlite3_syscall_ptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&aVfs)) + 656 /* .xGetSystemCall */)) = unixGetSystemCall // sqlite3.c:41865:5:
- *(*func(*libc.TLS, uintptr, uintptr) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&aVfs)) + 664 /* .xNextSystemCall */)) = unixNextSystemCall // sqlite3.c:41865:5:
- *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aWindowFuncs)) + 24 /* .xSFunc */)) = row_numberStepFunc // sqlite3.c:154549:5:
- *(*func(*libc.TLS, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aWindowFuncs)) + 32 /* .xFinalize */)) = row_numberValueFunc // sqlite3.c:154549:5:
- *(*func(*libc.TLS, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aWindowFuncs)) + 40 /* .xValue */)) = row_numberValueFunc // sqlite3.c:154549:5:
- *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aWindowFuncs)) + 48 /* .xInverse */)) = noopStepFunc // sqlite3.c:154549:5:
- *(*uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&aWindowFuncs)) + 56 /* .zName */)) = uintptr(unsafe.Pointer(&row_numberName)) // sqlite3.c:154549:5:
- *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aWindowFuncs)) + 96 /* .xSFunc */)) = dense_rankStepFunc // sqlite3.c:154550:5:
- *(*func(*libc.TLS, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aWindowFuncs)) + 104 /* .xFinalize */)) = dense_rankValueFunc // sqlite3.c:154550:5:
- *(*func(*libc.TLS, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aWindowFuncs)) + 112 /* .xValue */)) = dense_rankValueFunc // sqlite3.c:154550:5:
- *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aWindowFuncs)) + 120 /* .xInverse */)) = noopStepFunc // sqlite3.c:154550:5:
- *(*uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&aWindowFuncs)) + 128 /* .zName */)) = uintptr(unsafe.Pointer(&dense_rankName)) // sqlite3.c:154550:5:
- *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aWindowFuncs)) + 168 /* .xSFunc */)) = rankStepFunc // sqlite3.c:154551:5:
- *(*func(*libc.TLS, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aWindowFuncs)) + 176 /* .xFinalize */)) = rankValueFunc // sqlite3.c:154551:5:
- *(*func(*libc.TLS, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aWindowFuncs)) + 184 /* .xValue */)) = rankValueFunc // sqlite3.c:154551:5:
- *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aWindowFuncs)) + 192 /* .xInverse */)) = noopStepFunc // sqlite3.c:154551:5:
- *(*uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&aWindowFuncs)) + 200 /* .zName */)) = uintptr(unsafe.Pointer(&rankName)) // sqlite3.c:154551:5:
- *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aWindowFuncs)) + 240 /* .xSFunc */)) = percent_rankStepFunc // sqlite3.c:154552:5:
- *(*func(*libc.TLS, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aWindowFuncs)) + 248 /* .xFinalize */)) = percent_rankValueFunc // sqlite3.c:154552:5:
- *(*func(*libc.TLS, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aWindowFuncs)) + 256 /* .xValue */)) = percent_rankValueFunc // sqlite3.c:154552:5:
- *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aWindowFuncs)) + 264 /* .xInverse */)) = percent_rankInvFunc // sqlite3.c:154552:5:
- *(*uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&aWindowFuncs)) + 272 /* .zName */)) = uintptr(unsafe.Pointer(&percent_rankName)) // sqlite3.c:154552:5:
- *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aWindowFuncs)) + 312 /* .xSFunc */)) = cume_distStepFunc // sqlite3.c:154553:5:
- *(*func(*libc.TLS, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aWindowFuncs)) + 320 /* .xFinalize */)) = cume_distValueFunc // sqlite3.c:154553:5:
- *(*func(*libc.TLS, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aWindowFuncs)) + 328 /* .xValue */)) = cume_distValueFunc // sqlite3.c:154553:5:
- *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aWindowFuncs)) + 336 /* .xInverse */)) = cume_distInvFunc // sqlite3.c:154553:5:
- *(*uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&aWindowFuncs)) + 344 /* .zName */)) = uintptr(unsafe.Pointer(&cume_distName)) // sqlite3.c:154553:5:
- *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aWindowFuncs)) + 384 /* .xSFunc */)) = ntileStepFunc // sqlite3.c:154554:5:
- *(*func(*libc.TLS, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aWindowFuncs)) + 392 /* .xFinalize */)) = ntileValueFunc // sqlite3.c:154554:5:
- *(*func(*libc.TLS, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aWindowFuncs)) + 400 /* .xValue */)) = ntileValueFunc // sqlite3.c:154554:5:
- *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aWindowFuncs)) + 408 /* .xInverse */)) = ntileInvFunc // sqlite3.c:154554:5:
- *(*uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&aWindowFuncs)) + 416 /* .zName */)) = uintptr(unsafe.Pointer(&ntileName)) // sqlite3.c:154554:5:
- *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aWindowFuncs)) + 456 /* .xSFunc */)) = last_valueStepFunc // sqlite3.c:154555:5:
- *(*func(*libc.TLS, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aWindowFuncs)) + 464 /* .xFinalize */)) = last_valueFinalizeFunc // sqlite3.c:154555:5:
- *(*func(*libc.TLS, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aWindowFuncs)) + 472 /* .xValue */)) = last_valueValueFunc // sqlite3.c:154555:5:
- *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aWindowFuncs)) + 480 /* .xInverse */)) = last_valueInvFunc // sqlite3.c:154555:5:
- *(*uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&aWindowFuncs)) + 488 /* .zName */)) = uintptr(unsafe.Pointer(&last_valueName)) // sqlite3.c:154555:5:
- *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aWindowFuncs)) + 528 /* .xSFunc */)) = nth_valueStepFunc // sqlite3.c:154556:5:
- *(*func(*libc.TLS, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aWindowFuncs)) + 536 /* .xFinalize */)) = nth_valueFinalizeFunc // sqlite3.c:154556:5:
- *(*func(*libc.TLS, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aWindowFuncs)) + 544 /* .xValue */)) = noopValueFunc // sqlite3.c:154556:5:
- *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aWindowFuncs)) + 552 /* .xInverse */)) = noopStepFunc // sqlite3.c:154556:5:
- *(*uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&aWindowFuncs)) + 560 /* .zName */)) = uintptr(unsafe.Pointer(&nth_valueName)) // sqlite3.c:154556:5:
- *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aWindowFuncs)) + 600 /* .xSFunc */)) = first_valueStepFunc // sqlite3.c:154557:5:
- *(*func(*libc.TLS, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aWindowFuncs)) + 608 /* .xFinalize */)) = first_valueFinalizeFunc // sqlite3.c:154557:5:
- *(*func(*libc.TLS, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aWindowFuncs)) + 616 /* .xValue */)) = noopValueFunc // sqlite3.c:154557:5:
- *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aWindowFuncs)) + 624 /* .xInverse */)) = noopStepFunc // sqlite3.c:154557:5:
- *(*uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&aWindowFuncs)) + 632 /* .zName */)) = uintptr(unsafe.Pointer(&first_valueName)) // sqlite3.c:154557:5:
- *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aWindowFuncs)) + 672 /* .xSFunc */)) = noopStepFunc // sqlite3.c:154558:5:
- *(*func(*libc.TLS, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aWindowFuncs)) + 680 /* .xFinalize */)) = noopValueFunc // sqlite3.c:154558:5:
- *(*func(*libc.TLS, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aWindowFuncs)) + 688 /* .xValue */)) = noopValueFunc // sqlite3.c:154558:5:
- *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aWindowFuncs)) + 696 /* .xInverse */)) = noopStepFunc // sqlite3.c:154558:5:
- *(*uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&aWindowFuncs)) + 704 /* .zName */)) = uintptr(unsafe.Pointer(&leadName)) // sqlite3.c:154558:5:
- *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aWindowFuncs)) + 744 /* .xSFunc */)) = noopStepFunc // sqlite3.c:154559:5:
- *(*func(*libc.TLS, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aWindowFuncs)) + 752 /* .xFinalize */)) = noopValueFunc // sqlite3.c:154559:5:
- *(*func(*libc.TLS, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aWindowFuncs)) + 760 /* .xValue */)) = noopValueFunc // sqlite3.c:154559:5:
- *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aWindowFuncs)) + 768 /* .xInverse */)) = noopStepFunc // sqlite3.c:154559:5:
- *(*uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&aWindowFuncs)) + 776 /* .zName */)) = uintptr(unsafe.Pointer(&leadName)) // sqlite3.c:154559:5:
- *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aWindowFuncs)) + 816 /* .xSFunc */)) = noopStepFunc // sqlite3.c:154560:5:
- *(*func(*libc.TLS, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aWindowFuncs)) + 824 /* .xFinalize */)) = noopValueFunc // sqlite3.c:154560:5:
- *(*func(*libc.TLS, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aWindowFuncs)) + 832 /* .xValue */)) = noopValueFunc // sqlite3.c:154560:5:
- *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aWindowFuncs)) + 840 /* .xInverse */)) = noopStepFunc // sqlite3.c:154560:5:
- *(*uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&aWindowFuncs)) + 848 /* .zName */)) = uintptr(unsafe.Pointer(&leadName)) // sqlite3.c:154560:5:
- *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aWindowFuncs)) + 888 /* .xSFunc */)) = noopStepFunc // sqlite3.c:154561:5:
- *(*func(*libc.TLS, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aWindowFuncs)) + 896 /* .xFinalize */)) = noopValueFunc // sqlite3.c:154561:5:
- *(*func(*libc.TLS, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aWindowFuncs)) + 904 /* .xValue */)) = noopValueFunc // sqlite3.c:154561:5:
- *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aWindowFuncs)) + 912 /* .xInverse */)) = noopStepFunc // sqlite3.c:154561:5:
- *(*uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&aWindowFuncs)) + 920 /* .zName */)) = uintptr(unsafe.Pointer(&lagName)) // sqlite3.c:154561:5:
- *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aWindowFuncs)) + 960 /* .xSFunc */)) = noopStepFunc // sqlite3.c:154562:5:
- *(*func(*libc.TLS, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aWindowFuncs)) + 968 /* .xFinalize */)) = noopValueFunc // sqlite3.c:154562:5:
- *(*func(*libc.TLS, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aWindowFuncs)) + 976 /* .xValue */)) = noopValueFunc // sqlite3.c:154562:5:
- *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aWindowFuncs)) + 984 /* .xInverse */)) = noopStepFunc // sqlite3.c:154562:5:
- *(*uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&aWindowFuncs)) + 992 /* .zName */)) = uintptr(unsafe.Pointer(&lagName)) // sqlite3.c:154562:5:
- *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aWindowFuncs)) + 1032 /* .xSFunc */)) = noopStepFunc // sqlite3.c:154563:5:
- *(*func(*libc.TLS, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aWindowFuncs)) + 1040 /* .xFinalize */)) = noopValueFunc // sqlite3.c:154563:5:
- *(*func(*libc.TLS, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aWindowFuncs)) + 1048 /* .xValue */)) = noopValueFunc // sqlite3.c:154563:5:
- *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aWindowFuncs)) + 1056 /* .xInverse */)) = noopStepFunc // sqlite3.c:154563:5:
- *(*uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&aWindowFuncs)) + 1064 /* .zName */)) = uintptr(unsafe.Pointer(&lagName)) // sqlite3.c:154563:5:
- *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&attach_func)) + 24 /* .xSFunc */)) = attachFunc // sqlite3.c:111139:5:
- *(*func(*libc.TLS, int32) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&defaultMethods)) + 0 /* .xMalloc */)) = sqlite3MemMalloc // sqlite3.c:24117:6:
- *(*func(*libc.TLS, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&defaultMethods)) + 8 /* .xFree */)) = sqlite3MemFree // sqlite3.c:24118:6:
- *(*func(*libc.TLS, uintptr, int32) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&defaultMethods)) + 16 /* .xRealloc */)) = sqlite3MemRealloc // sqlite3.c:24119:6:
- *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&defaultMethods)) + 24 /* .xSize */)) = sqlite3MemSize // sqlite3.c:24120:6:
- *(*func(*libc.TLS, int32) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&defaultMethods)) + 32 /* .xRoundup */)) = sqlite3MemRoundup // sqlite3.c:24121:6:
- *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&defaultMethods)) + 40 /* .xInit */)) = sqlite3MemInit // sqlite3.c:24122:6:
- *(*func(*libc.TLS, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&defaultMethods)) + 48 /* .xShutdown */)) = sqlite3MemShutdown // sqlite3.c:24123:6:
- *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&defaultMethods1)) + 16 /* .xInit */)) = pcache1Init // sqlite3.c:51395:5:
- *(*func(*libc.TLS, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&defaultMethods1)) + 24 /* .xShutdown */)) = pcache1Shutdown // sqlite3.c:51396:5:
- *(*func(*libc.TLS, int32, int32, int32) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&defaultMethods1)) + 32 /* .xCreate */)) = pcache1Create // sqlite3.c:51397:5:
- *(*func(*libc.TLS, uintptr, int32))(unsafe.Pointer(uintptr(unsafe.Pointer(&defaultMethods1)) + 40 /* .xCachesize */)) = pcache1Cachesize // sqlite3.c:51398:5:
- *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&defaultMethods1)) + 48 /* .xPagecount */)) = pcache1Pagecount // sqlite3.c:51399:5:
- *(*func(*libc.TLS, uintptr, uint32, int32) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&defaultMethods1)) + 56 /* .xFetch */)) = pcache1Fetch // sqlite3.c:51400:5:
- *(*func(*libc.TLS, uintptr, uintptr, int32))(unsafe.Pointer(uintptr(unsafe.Pointer(&defaultMethods1)) + 64 /* .xUnpin */)) = pcache1Unpin // sqlite3.c:51401:5:
- *(*func(*libc.TLS, uintptr, uintptr, uint32, uint32))(unsafe.Pointer(uintptr(unsafe.Pointer(&defaultMethods1)) + 72 /* .xRekey */)) = pcache1Rekey // sqlite3.c:51402:5:
- *(*func(*libc.TLS, uintptr, uint32))(unsafe.Pointer(uintptr(unsafe.Pointer(&defaultMethods1)) + 80 /* .xTruncate */)) = pcache1Truncate // sqlite3.c:51403:5:
- *(*func(*libc.TLS, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&defaultMethods1)) + 88 /* .xDestroy */)) = pcache1Destroy // sqlite3.c:51404:5:
- *(*func(*libc.TLS, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&defaultMethods1)) + 96 /* .xShrink */)) = pcache1Shrink // sqlite3.c:51405:5:
- *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&detach_func)) + 24 /* .xSFunc */)) = detachFunc // sqlite3.c:111119:5:
- *(*func(*libc.TLS, uintptr, uintptr) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&dotlockIoFinder)) + 0)) = dotlockIoFinderImpl // sqlite3.c:39236:1:
- *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&dotlockIoMethods)) + 8 /* .xClose */)) = dotlockClose // sqlite3.c:39236:1:
- *(*func(*libc.TLS, uintptr, uintptr, int32, Sqlite3_int64) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&dotlockIoMethods)) + 16 /* .xRead */)) = unixRead // sqlite3.c:39236:1:
- *(*func(*libc.TLS, uintptr, uintptr, int32, Sqlite3_int64) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&dotlockIoMethods)) + 24 /* .xWrite */)) = unixWrite // sqlite3.c:39236:1:
- *(*func(*libc.TLS, uintptr, I64) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&dotlockIoMethods)) + 32 /* .xTruncate */)) = unixTruncate // sqlite3.c:39236:1:
- *(*func(*libc.TLS, uintptr, int32) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&dotlockIoMethods)) + 40 /* .xSync */)) = unixSync // sqlite3.c:39236:1:
- *(*func(*libc.TLS, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&dotlockIoMethods)) + 48 /* .xFileSize */)) = unixFileSize // sqlite3.c:39236:1:
- *(*func(*libc.TLS, uintptr, int32) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&dotlockIoMethods)) + 56 /* .xLock */)) = dotlockLock // sqlite3.c:39236:1:
- *(*func(*libc.TLS, uintptr, int32) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&dotlockIoMethods)) + 64 /* .xUnlock */)) = dotlockUnlock // sqlite3.c:39236:1:
- *(*func(*libc.TLS, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&dotlockIoMethods)) + 72 /* .xCheckReservedLock */)) = dotlockCheckReservedLock // sqlite3.c:39236:1:
- *(*func(*libc.TLS, uintptr, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&dotlockIoMethods)) + 80 /* .xFileControl */)) = unixFileControl // sqlite3.c:39236:1:
- *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&dotlockIoMethods)) + 88 /* .xSectorSize */)) = unixSectorSize // sqlite3.c:39236:1:
- *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&dotlockIoMethods)) + 96 /* .xDeviceCharacteristics */)) = unixDeviceCharacteristics // sqlite3.c:39236:1:
- *(*func(*libc.TLS, uintptr, int32, int32, int32) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&dotlockIoMethods)) + 112 /* .xShmLock */)) = unixShmLock // sqlite3.c:39236:1:
- *(*func(*libc.TLS, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&dotlockIoMethods)) + 120 /* .xShmBarrier */)) = unixShmBarrier // sqlite3.c:39236:1:
- *(*func(*libc.TLS, uintptr, int32) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&dotlockIoMethods)) + 128 /* .xShmUnmap */)) = unixShmUnmap // sqlite3.c:39236:1:
- *(*func(*libc.TLS, uintptr, I64, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&dotlockIoMethods)) + 136 /* .xFetch */)) = unixFetch // sqlite3.c:39236:1:
- *(*func(*libc.TLS, uintptr, I64, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&dotlockIoMethods)) + 144 /* .xUnfetch */)) = unixUnfetch // sqlite3.c:39236:1:
- *(*func(*libc.TLS, uintptr, uintptr, int32, uintptr, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&fts5Mod)) + 8 /* .xCreate */)) = fts5CreateMethod // sqlite3.c:229330:25:
- *(*func(*libc.TLS, uintptr, uintptr, int32, uintptr, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&fts5Mod)) + 16 /* .xConnect */)) = fts5ConnectMethod // sqlite3.c:229331:25:
- *(*func(*libc.TLS, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&fts5Mod)) + 24 /* .xBestIndex */)) = fts5BestIndexMethod // sqlite3.c:229332:25:
- *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&fts5Mod)) + 32 /* .xDisconnect */)) = fts5DisconnectMethod // sqlite3.c:229333:25:
- *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&fts5Mod)) + 40 /* .xDestroy */)) = fts5DestroyMethod // sqlite3.c:229334:25:
- *(*func(*libc.TLS, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&fts5Mod)) + 48 /* .xOpen */)) = fts5OpenMethod // sqlite3.c:229335:25:
- *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&fts5Mod)) + 56 /* .xClose */)) = fts5CloseMethod // sqlite3.c:229336:25:
- *(*func(*libc.TLS, uintptr, int32, uintptr, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&fts5Mod)) + 64 /* .xFilter */)) = fts5FilterMethod // sqlite3.c:229337:25:
- *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&fts5Mod)) + 72 /* .xNext */)) = fts5NextMethod // sqlite3.c:229338:25:
- *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&fts5Mod)) + 80 /* .xEof */)) = fts5EofMethod // sqlite3.c:229339:25:
- *(*func(*libc.TLS, uintptr, uintptr, int32) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&fts5Mod)) + 88 /* .xColumn */)) = fts5ColumnMethod // sqlite3.c:229340:25:
- *(*func(*libc.TLS, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&fts5Mod)) + 96 /* .xRowid */)) = fts5RowidMethod // sqlite3.c:229341:25:
- *(*func(*libc.TLS, uintptr, int32, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&fts5Mod)) + 104 /* .xUpdate */)) = fts5UpdateMethod // sqlite3.c:229342:25:
- *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&fts5Mod)) + 112 /* .xBegin */)) = fts5BeginMethod // sqlite3.c:229343:25:
- *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&fts5Mod)) + 120 /* .xSync */)) = fts5SyncMethod // sqlite3.c:229344:25:
- *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&fts5Mod)) + 128 /* .xCommit */)) = fts5CommitMethod // sqlite3.c:229345:25:
- *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&fts5Mod)) + 136 /* .xRollback */)) = fts5RollbackMethod // sqlite3.c:229346:25:
- *(*func(*libc.TLS, uintptr, int32, uintptr, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&fts5Mod)) + 144 /* .xFindFunction */)) = fts5FindFunctionMethod // sqlite3.c:229347:25:
- *(*func(*libc.TLS, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&fts5Mod)) + 152 /* .xRename */)) = fts5RenameMethod // sqlite3.c:229348:25:
- *(*func(*libc.TLS, uintptr, int32) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&fts5Mod)) + 160 /* .xSavepoint */)) = fts5SavepointMethod // sqlite3.c:229349:25:
- *(*func(*libc.TLS, uintptr, int32) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&fts5Mod)) + 168 /* .xRelease */)) = fts5ReleaseMethod // sqlite3.c:229350:25:
- *(*func(*libc.TLS, uintptr, int32) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&fts5Mod)) + 176 /* .xRollbackTo */)) = fts5RollbackToMethod // sqlite3.c:229351:25:
- *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&fts5Mod)) + 184 /* .xShadowName */)) = fts5ShadowName // sqlite3.c:229352:25:
- *(*func(*libc.TLS, uintptr, uintptr, int32, uintptr, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&fts5Vocab)) + 8 /* .xCreate */)) = fts5VocabCreateMethod // sqlite3.c:233898:25:
- *(*func(*libc.TLS, uintptr, uintptr, int32, uintptr, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&fts5Vocab)) + 16 /* .xConnect */)) = fts5VocabConnectMethod // sqlite3.c:233899:25:
- *(*func(*libc.TLS, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&fts5Vocab)) + 24 /* .xBestIndex */)) = fts5VocabBestIndexMethod // sqlite3.c:233900:25:
- *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&fts5Vocab)) + 32 /* .xDisconnect */)) = fts5VocabDisconnectMethod // sqlite3.c:233901:25:
- *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&fts5Vocab)) + 40 /* .xDestroy */)) = fts5VocabDestroyMethod // sqlite3.c:233902:25:
- *(*func(*libc.TLS, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&fts5Vocab)) + 48 /* .xOpen */)) = fts5VocabOpenMethod // sqlite3.c:233903:25:
- *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&fts5Vocab)) + 56 /* .xClose */)) = fts5VocabCloseMethod // sqlite3.c:233904:25:
- *(*func(*libc.TLS, uintptr, int32, uintptr, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&fts5Vocab)) + 64 /* .xFilter */)) = fts5VocabFilterMethod // sqlite3.c:233905:25:
- *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&fts5Vocab)) + 72 /* .xNext */)) = fts5VocabNextMethod // sqlite3.c:233906:25:
- *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&fts5Vocab)) + 80 /* .xEof */)) = fts5VocabEofMethod // sqlite3.c:233907:25:
- *(*func(*libc.TLS, uintptr, uintptr, int32) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&fts5Vocab)) + 88 /* .xColumn */)) = fts5VocabColumnMethod // sqlite3.c:233908:25:
- *(*func(*libc.TLS, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&fts5Vocab)) + 96 /* .xRowid */)) = fts5VocabRowidMethod // sqlite3.c:233909:25:
- *(*func(*libc.TLS, uintptr, uintptr, int32, uintptr, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&geopolyModule)) + 8 /* .xCreate */)) = geopolyCreate // sqlite3.c:197302:3:
- *(*func(*libc.TLS, uintptr, uintptr, int32, uintptr, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&geopolyModule)) + 16 /* .xConnect */)) = geopolyConnect // sqlite3.c:197303:3:
- *(*func(*libc.TLS, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&geopolyModule)) + 24 /* .xBestIndex */)) = geopolyBestIndex // sqlite3.c:197304:3:
- *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&geopolyModule)) + 32 /* .xDisconnect */)) = rtreeDisconnect // sqlite3.c:197305:3:
- *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&geopolyModule)) + 40 /* .xDestroy */)) = rtreeDestroy // sqlite3.c:197306:3:
- *(*func(*libc.TLS, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&geopolyModule)) + 48 /* .xOpen */)) = rtreeOpen // sqlite3.c:197307:3:
- *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&geopolyModule)) + 56 /* .xClose */)) = rtreeClose // sqlite3.c:197308:3:
- *(*func(*libc.TLS, uintptr, int32, uintptr, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&geopolyModule)) + 64 /* .xFilter */)) = geopolyFilter // sqlite3.c:197309:3:
- *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&geopolyModule)) + 72 /* .xNext */)) = rtreeNext // sqlite3.c:197310:3:
- *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&geopolyModule)) + 80 /* .xEof */)) = rtreeEof // sqlite3.c:197311:3:
- *(*func(*libc.TLS, uintptr, uintptr, int32) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&geopolyModule)) + 88 /* .xColumn */)) = geopolyColumn // sqlite3.c:197312:3:
- *(*func(*libc.TLS, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&geopolyModule)) + 96 /* .xRowid */)) = rtreeRowid // sqlite3.c:197313:3:
- *(*func(*libc.TLS, uintptr, int32, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&geopolyModule)) + 104 /* .xUpdate */)) = geopolyUpdate // sqlite3.c:197314:3:
- *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&geopolyModule)) + 112 /* .xBegin */)) = rtreeBeginTransaction // sqlite3.c:197315:3:
- *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&geopolyModule)) + 120 /* .xSync */)) = rtreeEndTransaction // sqlite3.c:197316:3:
- *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&geopolyModule)) + 128 /* .xCommit */)) = rtreeEndTransaction // sqlite3.c:197317:3:
- *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&geopolyModule)) + 136 /* .xRollback */)) = rtreeEndTransaction // sqlite3.c:197318:3:
- *(*func(*libc.TLS, uintptr, int32, uintptr, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&geopolyModule)) + 144 /* .xFindFunction */)) = geopolyFindFunction // sqlite3.c:197319:3:
- *(*func(*libc.TLS, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&geopolyModule)) + 152 /* .xRename */)) = rtreeRename // sqlite3.c:197320:3:
- *(*func(*libc.TLS, uintptr, int32) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&geopolyModule)) + 160 /* .xSavepoint */)) = rtreeSavepoint // sqlite3.c:197321:3:
- *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&geopolyModule)) + 184 /* .xShadowName */)) = rtreeShadowName // sqlite3.c:197324:3:
- *(*func(*libc.TLS, uintptr, uintptr, int32, uintptr, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&jsonEachModule)) + 16 /* .xConnect */)) = jsonEachConnect // sqlite3.c:191042:3:
- *(*func(*libc.TLS, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&jsonEachModule)) + 24 /* .xBestIndex */)) = jsonEachBestIndex // sqlite3.c:191043:3:
- *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&jsonEachModule)) + 32 /* .xDisconnect */)) = jsonEachDisconnect // sqlite3.c:191044:3:
- *(*func(*libc.TLS, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&jsonEachModule)) + 48 /* .xOpen */)) = jsonEachOpenEach // sqlite3.c:191046:3:
- *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&jsonEachModule)) + 56 /* .xClose */)) = jsonEachClose // sqlite3.c:191047:3:
- *(*func(*libc.TLS, uintptr, int32, uintptr, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&jsonEachModule)) + 64 /* .xFilter */)) = jsonEachFilter // sqlite3.c:191048:3:
- *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&jsonEachModule)) + 72 /* .xNext */)) = jsonEachNext // sqlite3.c:191049:3:
- *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&jsonEachModule)) + 80 /* .xEof */)) = jsonEachEof // sqlite3.c:191050:3:
- *(*func(*libc.TLS, uintptr, uintptr, int32) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&jsonEachModule)) + 88 /* .xColumn */)) = jsonEachColumn // sqlite3.c:191051:3:
- *(*func(*libc.TLS, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&jsonEachModule)) + 96 /* .xRowid */)) = jsonEachRowid // sqlite3.c:191052:3:
- *(*func(*libc.TLS, uintptr, uintptr, int32, uintptr, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&jsonTreeModule)) + 16 /* .xConnect */)) = jsonEachConnect // sqlite3.c:191070:3:
- *(*func(*libc.TLS, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&jsonTreeModule)) + 24 /* .xBestIndex */)) = jsonEachBestIndex // sqlite3.c:191071:3:
- *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&jsonTreeModule)) + 32 /* .xDisconnect */)) = jsonEachDisconnect // sqlite3.c:191072:3:
- *(*func(*libc.TLS, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&jsonTreeModule)) + 48 /* .xOpen */)) = jsonEachOpenTree // sqlite3.c:191074:3:
- *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&jsonTreeModule)) + 56 /* .xClose */)) = jsonEachClose // sqlite3.c:191075:3:
- *(*func(*libc.TLS, uintptr, int32, uintptr, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&jsonTreeModule)) + 64 /* .xFilter */)) = jsonEachFilter // sqlite3.c:191076:3:
- *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&jsonTreeModule)) + 72 /* .xNext */)) = jsonEachNext // sqlite3.c:191077:3:
- *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&jsonTreeModule)) + 80 /* .xEof */)) = jsonEachEof // sqlite3.c:191078:3:
- *(*func(*libc.TLS, uintptr, uintptr, int32) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&jsonTreeModule)) + 88 /* .xColumn */)) = jsonEachColumn // sqlite3.c:191079:3:
- *(*func(*libc.TLS, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&jsonTreeModule)) + 96 /* .xRowid */)) = jsonEachRowid // sqlite3.c:191080:3:
- *(*func(*libc.TLS, uintptr, uintptr) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&nolockIoFinder)) + 0)) = nolockIoFinderImpl // sqlite3.c:39226:1:
- *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&nolockIoMethods)) + 8 /* .xClose */)) = nolockClose // sqlite3.c:39226:1:
- *(*func(*libc.TLS, uintptr, uintptr, int32, Sqlite3_int64) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&nolockIoMethods)) + 16 /* .xRead */)) = unixRead // sqlite3.c:39226:1:
- *(*func(*libc.TLS, uintptr, uintptr, int32, Sqlite3_int64) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&nolockIoMethods)) + 24 /* .xWrite */)) = unixWrite // sqlite3.c:39226:1:
- *(*func(*libc.TLS, uintptr, I64) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&nolockIoMethods)) + 32 /* .xTruncate */)) = unixTruncate // sqlite3.c:39226:1:
- *(*func(*libc.TLS, uintptr, int32) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&nolockIoMethods)) + 40 /* .xSync */)) = unixSync // sqlite3.c:39226:1:
- *(*func(*libc.TLS, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&nolockIoMethods)) + 48 /* .xFileSize */)) = unixFileSize // sqlite3.c:39226:1:
- *(*func(*libc.TLS, uintptr, int32) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&nolockIoMethods)) + 56 /* .xLock */)) = nolockLock // sqlite3.c:39226:1:
- *(*func(*libc.TLS, uintptr, int32) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&nolockIoMethods)) + 64 /* .xUnlock */)) = nolockUnlock // sqlite3.c:39226:1:
- *(*func(*libc.TLS, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&nolockIoMethods)) + 72 /* .xCheckReservedLock */)) = nolockCheckReservedLock // sqlite3.c:39226:1:
- *(*func(*libc.TLS, uintptr, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&nolockIoMethods)) + 80 /* .xFileControl */)) = unixFileControl // sqlite3.c:39226:1:
- *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&nolockIoMethods)) + 88 /* .xSectorSize */)) = unixSectorSize // sqlite3.c:39226:1:
- *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&nolockIoMethods)) + 96 /* .xDeviceCharacteristics */)) = unixDeviceCharacteristics // sqlite3.c:39226:1:
- *(*func(*libc.TLS, uintptr, int32, int32, int32) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&nolockIoMethods)) + 112 /* .xShmLock */)) = unixShmLock // sqlite3.c:39226:1:
- *(*func(*libc.TLS, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&nolockIoMethods)) + 120 /* .xShmBarrier */)) = unixShmBarrier // sqlite3.c:39226:1:
- *(*func(*libc.TLS, uintptr, int32) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&nolockIoMethods)) + 128 /* .xShmUnmap */)) = unixShmUnmap // sqlite3.c:39226:1:
- *(*func(*libc.TLS, uintptr, I64, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&nolockIoMethods)) + 136 /* .xFetch */)) = unixFetch // sqlite3.c:39226:1:
- *(*func(*libc.TLS, uintptr, I64, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&nolockIoMethods)) + 144 /* .xUnfetch */)) = unixUnfetch // sqlite3.c:39226:1:
- *(*func(*libc.TLS, uintptr, uintptr) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&posixIoFinder)) + 0)) = posixIoFinderImpl // sqlite3.c:39216:1:
- *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&posixIoMethods)) + 8 /* .xClose */)) = unixClose // sqlite3.c:39216:1:
- *(*func(*libc.TLS, uintptr, uintptr, int32, Sqlite3_int64) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&posixIoMethods)) + 16 /* .xRead */)) = unixRead // sqlite3.c:39216:1:
- *(*func(*libc.TLS, uintptr, uintptr, int32, Sqlite3_int64) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&posixIoMethods)) + 24 /* .xWrite */)) = unixWrite // sqlite3.c:39216:1:
- *(*func(*libc.TLS, uintptr, I64) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&posixIoMethods)) + 32 /* .xTruncate */)) = unixTruncate // sqlite3.c:39216:1:
- *(*func(*libc.TLS, uintptr, int32) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&posixIoMethods)) + 40 /* .xSync */)) = unixSync // sqlite3.c:39216:1:
- *(*func(*libc.TLS, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&posixIoMethods)) + 48 /* .xFileSize */)) = unixFileSize // sqlite3.c:39216:1:
- *(*func(*libc.TLS, uintptr, int32) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&posixIoMethods)) + 56 /* .xLock */)) = unixLock // sqlite3.c:39216:1:
- *(*func(*libc.TLS, uintptr, int32) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&posixIoMethods)) + 64 /* .xUnlock */)) = unixUnlock // sqlite3.c:39216:1:
- *(*func(*libc.TLS, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&posixIoMethods)) + 72 /* .xCheckReservedLock */)) = unixCheckReservedLock // sqlite3.c:39216:1:
- *(*func(*libc.TLS, uintptr, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&posixIoMethods)) + 80 /* .xFileControl */)) = unixFileControl // sqlite3.c:39216:1:
- *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&posixIoMethods)) + 88 /* .xSectorSize */)) = unixSectorSize // sqlite3.c:39216:1:
- *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&posixIoMethods)) + 96 /* .xDeviceCharacteristics */)) = unixDeviceCharacteristics // sqlite3.c:39216:1:
- *(*func(*libc.TLS, uintptr, int32, int32, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&posixIoMethods)) + 104 /* .xShmMap */)) = unixShmMap // sqlite3.c:39216:1:
- *(*func(*libc.TLS, uintptr, int32, int32, int32) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&posixIoMethods)) + 112 /* .xShmLock */)) = unixShmLock // sqlite3.c:39216:1:
- *(*func(*libc.TLS, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&posixIoMethods)) + 120 /* .xShmBarrier */)) = unixShmBarrier // sqlite3.c:39216:1:
- *(*func(*libc.TLS, uintptr, int32) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&posixIoMethods)) + 128 /* .xShmUnmap */)) = unixShmUnmap // sqlite3.c:39216:1:
- *(*func(*libc.TLS, uintptr, I64, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&posixIoMethods)) + 136 /* .xFetch */)) = unixFetch // sqlite3.c:39216:1:
- *(*func(*libc.TLS, uintptr, I64, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&posixIoMethods)) + 144 /* .xUnfetch */)) = unixUnfetch // sqlite3.c:39216:1:
- *(*func(*libc.TLS, uintptr, uintptr, int32, uintptr, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&pragmaVtabModule)) + 16 /* .xConnect */)) = pragmaVtabConnect // sqlite3.c:130098:3:
- *(*func(*libc.TLS, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&pragmaVtabModule)) + 24 /* .xBestIndex */)) = pragmaVtabBestIndex // sqlite3.c:130099:3:
- *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&pragmaVtabModule)) + 32 /* .xDisconnect */)) = pragmaVtabDisconnect // sqlite3.c:130100:3:
- *(*func(*libc.TLS, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&pragmaVtabModule)) + 48 /* .xOpen */)) = pragmaVtabOpen // sqlite3.c:130102:3:
- *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&pragmaVtabModule)) + 56 /* .xClose */)) = pragmaVtabClose // sqlite3.c:130103:3:
- *(*func(*libc.TLS, uintptr, int32, uintptr, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&pragmaVtabModule)) + 64 /* .xFilter */)) = pragmaVtabFilter // sqlite3.c:130104:3:
- *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&pragmaVtabModule)) + 72 /* .xNext */)) = pragmaVtabNext // sqlite3.c:130105:3:
- *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&pragmaVtabModule)) + 80 /* .xEof */)) = pragmaVtabEof // sqlite3.c:130106:3:
- *(*func(*libc.TLS, uintptr, uintptr, int32) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&pragmaVtabModule)) + 88 /* .xColumn */)) = pragmaVtabColumn // sqlite3.c:130107:3:
- *(*func(*libc.TLS, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&pragmaVtabModule)) + 96 /* .xRowid */)) = pragmaVtabRowid // sqlite3.c:130108:3:
- *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&rbuvfs_io_methods)) + 8 /* .xClose */)) = rbuVfsClose // sqlite3.c:203942:5:
- *(*func(*libc.TLS, uintptr, uintptr, int32, Sqlite_int64) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&rbuvfs_io_methods)) + 16 /* .xRead */)) = rbuVfsRead // sqlite3.c:203943:5:
- *(*func(*libc.TLS, uintptr, uintptr, int32, Sqlite_int64) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&rbuvfs_io_methods)) + 24 /* .xWrite */)) = rbuVfsWrite // sqlite3.c:203944:5:
- *(*func(*libc.TLS, uintptr, Sqlite_int64) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&rbuvfs_io_methods)) + 32 /* .xTruncate */)) = rbuVfsTruncate // sqlite3.c:203945:5:
- *(*func(*libc.TLS, uintptr, int32) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&rbuvfs_io_methods)) + 40 /* .xSync */)) = rbuVfsSync // sqlite3.c:203946:5:
- *(*func(*libc.TLS, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&rbuvfs_io_methods)) + 48 /* .xFileSize */)) = rbuVfsFileSize // sqlite3.c:203947:5:
- *(*func(*libc.TLS, uintptr, int32) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&rbuvfs_io_methods)) + 56 /* .xLock */)) = rbuVfsLock // sqlite3.c:203948:5:
- *(*func(*libc.TLS, uintptr, int32) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&rbuvfs_io_methods)) + 64 /* .xUnlock */)) = rbuVfsUnlock // sqlite3.c:203949:5:
- *(*func(*libc.TLS, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&rbuvfs_io_methods)) + 72 /* .xCheckReservedLock */)) = rbuVfsCheckReservedLock // sqlite3.c:203950:5:
- *(*func(*libc.TLS, uintptr, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&rbuvfs_io_methods)) + 80 /* .xFileControl */)) = rbuVfsFileControl // sqlite3.c:203951:5:
- *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&rbuvfs_io_methods)) + 88 /* .xSectorSize */)) = rbuVfsSectorSize // sqlite3.c:203952:5:
- *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&rbuvfs_io_methods)) + 96 /* .xDeviceCharacteristics */)) = rbuVfsDeviceCharacteristics // sqlite3.c:203953:5:
- *(*func(*libc.TLS, uintptr, int32, int32, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&rbuvfs_io_methods)) + 104 /* .xShmMap */)) = rbuVfsShmMap // sqlite3.c:203954:5:
- *(*func(*libc.TLS, uintptr, int32, int32, int32) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&rbuvfs_io_methods)) + 112 /* .xShmLock */)) = rbuVfsShmLock // sqlite3.c:203955:5:
- *(*func(*libc.TLS, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&rbuvfs_io_methods)) + 120 /* .xShmBarrier */)) = rbuVfsShmBarrier // sqlite3.c:203956:5:
- *(*func(*libc.TLS, uintptr, int32) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&rbuvfs_io_methods)) + 128 /* .xShmUnmap */)) = rbuVfsShmUnmap // sqlite3.c:203957:5:
- *(*func(*libc.TLS, uintptr, uintptr, int32, uintptr, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&rtreeModule)) + 8 /* .xCreate */)) = rtreeCreate // sqlite3.c:194655:3:
- *(*func(*libc.TLS, uintptr, uintptr, int32, uintptr, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&rtreeModule)) + 16 /* .xConnect */)) = rtreeConnect // sqlite3.c:194656:3:
- *(*func(*libc.TLS, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&rtreeModule)) + 24 /* .xBestIndex */)) = rtreeBestIndex // sqlite3.c:194657:3:
- *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&rtreeModule)) + 32 /* .xDisconnect */)) = rtreeDisconnect // sqlite3.c:194658:3:
- *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&rtreeModule)) + 40 /* .xDestroy */)) = rtreeDestroy // sqlite3.c:194659:3:
- *(*func(*libc.TLS, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&rtreeModule)) + 48 /* .xOpen */)) = rtreeOpen // sqlite3.c:194660:3:
- *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&rtreeModule)) + 56 /* .xClose */)) = rtreeClose // sqlite3.c:194661:3:
- *(*func(*libc.TLS, uintptr, int32, uintptr, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&rtreeModule)) + 64 /* .xFilter */)) = rtreeFilter // sqlite3.c:194662:3:
- *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&rtreeModule)) + 72 /* .xNext */)) = rtreeNext // sqlite3.c:194663:3:
- *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&rtreeModule)) + 80 /* .xEof */)) = rtreeEof // sqlite3.c:194664:3:
- *(*func(*libc.TLS, uintptr, uintptr, int32) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&rtreeModule)) + 88 /* .xColumn */)) = rtreeColumn // sqlite3.c:194665:3:
- *(*func(*libc.TLS, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&rtreeModule)) + 96 /* .xRowid */)) = rtreeRowid // sqlite3.c:194666:3:
- *(*func(*libc.TLS, uintptr, int32, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&rtreeModule)) + 104 /* .xUpdate */)) = rtreeUpdate // sqlite3.c:194667:3:
- *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&rtreeModule)) + 112 /* .xBegin */)) = rtreeBeginTransaction // sqlite3.c:194668:3:
- *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&rtreeModule)) + 120 /* .xSync */)) = rtreeEndTransaction // sqlite3.c:194669:3:
- *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&rtreeModule)) + 128 /* .xCommit */)) = rtreeEndTransaction // sqlite3.c:194670:3:
- *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&rtreeModule)) + 136 /* .xRollback */)) = rtreeEndTransaction // sqlite3.c:194671:3:
- *(*func(*libc.TLS, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&rtreeModule)) + 152 /* .xRename */)) = rtreeRename // sqlite3.c:194673:3:
- *(*func(*libc.TLS, uintptr, int32) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&rtreeModule)) + 160 /* .xSavepoint */)) = rtreeSavepoint // sqlite3.c:194674:3:
- *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&rtreeModule)) + 184 /* .xShadowName */)) = rtreeShadowName // sqlite3.c:194677:3:
- *(*func(*libc.TLS, uintptr) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&sFts5Api)) + 8 /* .xUserData */)) = fts5ApiUserData // sqlite3.c:228789:3:
- *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sFts5Api)) + 16 /* .xColumnCount */)) = fts5ApiColumnCount // sqlite3.c:228790:3:
- *(*func(*libc.TLS, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sFts5Api)) + 24 /* .xRowCount */)) = fts5ApiRowCount // sqlite3.c:228791:3:
- *(*func(*libc.TLS, uintptr, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sFts5Api)) + 32 /* .xColumnTotalSize */)) = fts5ApiColumnTotalSize // sqlite3.c:228792:3:
- *(*func(*libc.TLS, uintptr, uintptr, int32, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sFts5Api)) + 40 /* .xTokenize */)) = fts5ApiTokenize // sqlite3.c:228793:3:
- *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sFts5Api)) + 48 /* .xPhraseCount */)) = fts5ApiPhraseCount // sqlite3.c:228794:3:
- *(*func(*libc.TLS, uintptr, int32) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sFts5Api)) + 56 /* .xPhraseSize */)) = fts5ApiPhraseSize // sqlite3.c:228795:3:
- *(*func(*libc.TLS, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sFts5Api)) + 64 /* .xInstCount */)) = fts5ApiInstCount // sqlite3.c:228796:3:
- *(*func(*libc.TLS, uintptr, int32, uintptr, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sFts5Api)) + 72 /* .xInst */)) = fts5ApiInst // sqlite3.c:228797:3:
- *(*func(*libc.TLS, uintptr) Sqlite3_int64)(unsafe.Pointer(uintptr(unsafe.Pointer(&sFts5Api)) + 80 /* .xRowid */)) = fts5ApiRowid // sqlite3.c:228798:3:
- *(*func(*libc.TLS, uintptr, int32, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sFts5Api)) + 88 /* .xColumnText */)) = fts5ApiColumnText // sqlite3.c:228799:3:
- *(*func(*libc.TLS, uintptr, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sFts5Api)) + 96 /* .xColumnSize */)) = fts5ApiColumnSize // sqlite3.c:228800:3:
- *(*func(*libc.TLS, uintptr, int32, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sFts5Api)) + 104 /* .xQueryPhrase */)) = fts5ApiQueryPhrase // sqlite3.c:228801:3:
- *(*func(*libc.TLS, uintptr, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sFts5Api)) + 112 /* .xSetAuxdata */)) = fts5ApiSetAuxdata // sqlite3.c:228802:3:
- *(*func(*libc.TLS, uintptr, int32) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&sFts5Api)) + 120 /* .xGetAuxdata */)) = fts5ApiGetAuxdata // sqlite3.c:228803:3:
- *(*func(*libc.TLS, uintptr, int32, uintptr, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sFts5Api)) + 128 /* .xPhraseFirst */)) = fts5ApiPhraseFirst // sqlite3.c:228804:3:
- *(*func(*libc.TLS, uintptr, uintptr, uintptr, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&sFts5Api)) + 136 /* .xPhraseNext */)) = fts5ApiPhraseNext // sqlite3.c:228805:3:
- *(*func(*libc.TLS, uintptr, int32, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sFts5Api)) + 144 /* .xPhraseFirstColumn */)) = fts5ApiPhraseFirstColumn // sqlite3.c:228806:3:
- *(*func(*libc.TLS, uintptr, uintptr, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&sFts5Api)) + 152 /* .xPhraseNextColumn */)) = fts5ApiPhraseNextColumn // sqlite3.c:228807:3:
- *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sMemJournalMethods)) + 8 /* .xClose */)) = memjrnlClose // sqlite3.c:98257:3:
- *(*func(*libc.TLS, uintptr, uintptr, int32, Sqlite_int64) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sMemJournalMethods)) + 16 /* .xRead */)) = memjrnlRead // sqlite3.c:98258:3:
- *(*func(*libc.TLS, uintptr, uintptr, int32, Sqlite_int64) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sMemJournalMethods)) + 24 /* .xWrite */)) = memjrnlWrite // sqlite3.c:98259:3:
- *(*func(*libc.TLS, uintptr, Sqlite_int64) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sMemJournalMethods)) + 32 /* .xTruncate */)) = memjrnlTruncate // sqlite3.c:98260:3:
- *(*func(*libc.TLS, uintptr, int32) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sMemJournalMethods)) + 40 /* .xSync */)) = memjrnlSync // sqlite3.c:98261:3:
- *(*func(*libc.TLS, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sMemJournalMethods)) + 48 /* .xFileSize */)) = memjrnlFileSize // sqlite3.c:98262:3:
- *(*func(*libc.TLS) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sMutex)) + 0 /* .xMutexInit */)) = noopMutexInit // sqlite3.c:26350:5:
- *(*func(*libc.TLS) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sMutex)) + 8 /* .xMutexEnd */)) = noopMutexEnd // sqlite3.c:26351:5:
- *(*func(*libc.TLS, int32) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&sMutex)) + 16 /* .xMutexAlloc */)) = noopMutexAlloc // sqlite3.c:26352:5:
- *(*func(*libc.TLS, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&sMutex)) + 24 /* .xMutexFree */)) = noopMutexFree // sqlite3.c:26353:5:
- *(*func(*libc.TLS, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&sMutex)) + 32 /* .xMutexEnter */)) = noopMutexEnter // sqlite3.c:26354:5:
- *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sMutex)) + 40 /* .xMutexTry */)) = noopMutexTry // sqlite3.c:26355:5:
- *(*func(*libc.TLS, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&sMutex)) + 48 /* .xMutexLeave */)) = noopMutexLeave // sqlite3.c:26356:5:
- *(*func(*libc.TLS, uintptr, int32) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 0 /* .aggregate_context */)) = Xsqlite3_aggregate_context // sqlite3.c:126171:3:
- *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 8 /* .aggregate_count */)) = Xsqlite3_aggregate_count // sqlite3.c:126173:3:
- *(*func(*libc.TLS, uintptr, int32, uintptr, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 16 /* .bind_blob */)) = Xsqlite3_bind_blob // sqlite3.c:126177:3:
- *(*func(*libc.TLS, uintptr, int32, float64) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 24 /* .bind_double */)) = Xsqlite3_bind_double // sqlite3.c:126178:3:
- *(*func(*libc.TLS, uintptr, int32, int32) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 32 /* .bind_int */)) = Xsqlite3_bind_int // sqlite3.c:126179:3:
- *(*func(*libc.TLS, uintptr, int32, Sqlite_int64) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 40 /* .bind_int64 */)) = Xsqlite3_bind_int64 // sqlite3.c:126180:3:
- *(*func(*libc.TLS, uintptr, int32) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 48 /* .bind_null */)) = Xsqlite3_bind_null // sqlite3.c:126181:3:
- *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 56 /* .bind_parameter_count */)) = Xsqlite3_bind_parameter_count // sqlite3.c:126182:3:
- *(*func(*libc.TLS, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 64 /* .bind_parameter_index */)) = Xsqlite3_bind_parameter_index // sqlite3.c:126183:3:
- *(*func(*libc.TLS, uintptr, int32) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 72 /* .bind_parameter_name */)) = Xsqlite3_bind_parameter_name // sqlite3.c:126184:3:
- *(*func(*libc.TLS, uintptr, int32, uintptr, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 80 /* .bind_text */)) = Xsqlite3_bind_text // sqlite3.c:126185:3:
- *(*func(*libc.TLS, uintptr, int32, uintptr, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 88 /* .bind_text16 */)) = Xsqlite3_bind_text16 // sqlite3.c:126186:3:
- *(*func(*libc.TLS, uintptr, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 96 /* .bind_value */)) = Xsqlite3_bind_value // sqlite3.c:126187:3:
- *(*func(*libc.TLS, uintptr, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 104 /* .busy_handler */)) = Xsqlite3_busy_handler // sqlite3.c:126188:3:
- *(*func(*libc.TLS, uintptr, int32) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 112 /* .busy_timeout */)) = Xsqlite3_busy_timeout // sqlite3.c:126189:3:
- *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 120 /* .changes */)) = Xsqlite3_changes // sqlite3.c:126190:3:
- *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 128 /* .close */)) = Xsqlite3_close // sqlite3.c:126191:3:
- *(*func(*libc.TLS, uintptr, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 136 /* .collation_needed */)) = Xsqlite3_collation_needed // sqlite3.c:126192:3:
- *(*func(*libc.TLS, uintptr, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 144 /* .collation_needed16 */)) = Xsqlite3_collation_needed16 // sqlite3.c:126193:3:
- *(*func(*libc.TLS, uintptr, int32) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 152 /* .column_blob */)) = Xsqlite3_column_blob // sqlite3.c:126194:3:
- *(*func(*libc.TLS, uintptr, int32) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 160 /* .column_bytes */)) = Xsqlite3_column_bytes // sqlite3.c:126195:3:
- *(*func(*libc.TLS, uintptr, int32) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 168 /* .column_bytes16 */)) = Xsqlite3_column_bytes16 // sqlite3.c:126196:3:
- *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 176 /* .column_count */)) = Xsqlite3_column_count // sqlite3.c:126197:3:
- *(*func(*libc.TLS, uintptr, int32) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 184 /* .column_database_name */)) = Xsqlite3_column_database_name // sqlite3.c:126198:3:
- *(*func(*libc.TLS, uintptr, int32) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 192 /* .column_database_name16 */)) = Xsqlite3_column_database_name16 // sqlite3.c:126199:3:
- *(*func(*libc.TLS, uintptr, int32) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 200 /* .column_decltype */)) = Xsqlite3_column_decltype // sqlite3.c:126200:3:
- *(*func(*libc.TLS, uintptr, int32) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 208 /* .column_decltype16 */)) = Xsqlite3_column_decltype16 // sqlite3.c:126201:3:
- *(*func(*libc.TLS, uintptr, int32) float64)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 216 /* .column_double */)) = Xsqlite3_column_double // sqlite3.c:126202:3:
- *(*func(*libc.TLS, uintptr, int32) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 224 /* .column_int */)) = Xsqlite3_column_int // sqlite3.c:126203:3:
- *(*func(*libc.TLS, uintptr, int32) Sqlite_int64)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 232 /* .column_int64 */)) = Xsqlite3_column_int64 // sqlite3.c:126204:3:
- *(*func(*libc.TLS, uintptr, int32) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 240 /* .column_name */)) = Xsqlite3_column_name // sqlite3.c:126205:3:
- *(*func(*libc.TLS, uintptr, int32) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 248 /* .column_name16 */)) = Xsqlite3_column_name16 // sqlite3.c:126206:3:
- *(*func(*libc.TLS, uintptr, int32) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 256 /* .column_origin_name */)) = Xsqlite3_column_origin_name // sqlite3.c:126207:3:
- *(*func(*libc.TLS, uintptr, int32) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 264 /* .column_origin_name16 */)) = Xsqlite3_column_origin_name16 // sqlite3.c:126208:3:
- *(*func(*libc.TLS, uintptr, int32) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 272 /* .column_table_name */)) = Xsqlite3_column_table_name // sqlite3.c:126209:3:
- *(*func(*libc.TLS, uintptr, int32) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 280 /* .column_table_name16 */)) = Xsqlite3_column_table_name16 // sqlite3.c:126210:3:
- *(*func(*libc.TLS, uintptr, int32) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 288 /* .column_text */)) = Xsqlite3_column_text // sqlite3.c:126211:3:
- *(*func(*libc.TLS, uintptr, int32) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 296 /* .column_text16 */)) = Xsqlite3_column_text16 // sqlite3.c:126212:3:
- *(*func(*libc.TLS, uintptr, int32) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 304 /* .column_type */)) = Xsqlite3_column_type // sqlite3.c:126213:3:
- *(*func(*libc.TLS, uintptr, int32) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 312 /* .column_value */)) = Xsqlite3_column_value // sqlite3.c:126214:3:
- *(*func(*libc.TLS, uintptr, uintptr, uintptr) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 320 /* .commit_hook */)) = Xsqlite3_commit_hook // sqlite3.c:126215:3:
- *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 328 /* .complete */)) = Xsqlite3_complete // sqlite3.c:126216:3:
- *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 336 /* .complete16 */)) = Xsqlite3_complete16 // sqlite3.c:126217:3:
- *(*func(*libc.TLS, uintptr, uintptr, int32, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 344 /* .create_collation */)) = Xsqlite3_create_collation // sqlite3.c:126218:3:
- *(*func(*libc.TLS, uintptr, uintptr, int32, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 352 /* .create_collation16 */)) = Xsqlite3_create_collation16 // sqlite3.c:126219:3:
- *(*func(*libc.TLS, uintptr, uintptr, int32, int32, uintptr, uintptr, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 360 /* .create_function */)) = Xsqlite3_create_function // sqlite3.c:126220:3:
- *(*func(*libc.TLS, uintptr, uintptr, int32, int32, uintptr, uintptr, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 368 /* .create_function16 */)) = Xsqlite3_create_function16 // sqlite3.c:126221:3:
- *(*func(*libc.TLS, uintptr, uintptr, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 376 /* .create_module */)) = Xsqlite3_create_module // sqlite3.c:126222:3:
- *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 384 /* .data_count */)) = Xsqlite3_data_count // sqlite3.c:126223:3:
- *(*func(*libc.TLS, uintptr) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 392 /* .db_handle */)) = Xsqlite3_db_handle // sqlite3.c:126224:3:
- *(*func(*libc.TLS, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 400 /* .declare_vtab */)) = Xsqlite3_declare_vtab // sqlite3.c:126225:3:
- *(*func(*libc.TLS, int32) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 408 /* .enable_shared_cache */)) = Xsqlite3_enable_shared_cache // sqlite3.c:126226:3:
- *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 416 /* .errcode */)) = Xsqlite3_errcode // sqlite3.c:126227:3:
- *(*func(*libc.TLS, uintptr) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 424 /* .errmsg */)) = Xsqlite3_errmsg // sqlite3.c:126228:3:
- *(*func(*libc.TLS, uintptr) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 432 /* .errmsg16 */)) = Xsqlite3_errmsg16 // sqlite3.c:126229:3:
- *(*func(*libc.TLS, uintptr, uintptr, Sqlite3_callback, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 440 /* .exec */)) = Xsqlite3_exec // sqlite3.c:126230:3:
- *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 448 /* .expired */)) = Xsqlite3_expired // sqlite3.c:126232:3:
- *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 456 /* .finalize */)) = Xsqlite3_finalize // sqlite3.c:126236:3:
- *(*func(*libc.TLS, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 464 /* .free */)) = Xsqlite3_free // sqlite3.c:126237:3:
- *(*func(*libc.TLS, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 472 /* .free_table */)) = Xsqlite3_free_table // sqlite3.c:126238:3:
- *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 480 /* .get_autocommit */)) = Xsqlite3_get_autocommit // sqlite3.c:126239:3:
- *(*func(*libc.TLS, uintptr, int32) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 488 /* .get_auxdata */)) = Xsqlite3_get_auxdata // sqlite3.c:126240:3:
- *(*func(*libc.TLS, uintptr, uintptr, uintptr, uintptr, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 496 /* .get_table */)) = Xsqlite3_get_table // sqlite3.c:126241:3:
- *(*func(*libc.TLS, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 512 /* .interruptx */)) = Xsqlite3_interrupt // sqlite3.c:126243:3:
- *(*func(*libc.TLS, uintptr) Sqlite3_int64)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 520 /* .last_insert_rowid */)) = Xsqlite3_last_insert_rowid // sqlite3.c:126244:3:
- *(*func(*libc.TLS) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 528 /* .libversion */)) = Xsqlite3_libversion // sqlite3.c:126245:3:
- *(*func(*libc.TLS) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 536 /* .libversion_number */)) = Xsqlite3_libversion_number // sqlite3.c:126246:3:
- *(*func(*libc.TLS, int32) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 544 /* .malloc */)) = Xsqlite3_malloc // sqlite3.c:126247:3:
- *(*func(*libc.TLS, uintptr, uintptr) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 552 /* .mprintf */)) = Xsqlite3_mprintf // sqlite3.c:126248:3:
- *(*func(*libc.TLS, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 560 /* .open */)) = Xsqlite3_open // sqlite3.c:126249:3:
- *(*func(*libc.TLS, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 568 /* .open16 */)) = Xsqlite3_open16 // sqlite3.c:126250:3:
- *(*func(*libc.TLS, uintptr, uintptr, int32, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 576 /* .prepare */)) = Xsqlite3_prepare // sqlite3.c:126251:3:
- *(*func(*libc.TLS, uintptr, uintptr, int32, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 584 /* .prepare16 */)) = Xsqlite3_prepare16 // sqlite3.c:126252:3:
- *(*func(*libc.TLS, uintptr, uintptr, uintptr) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 592 /* .profile */)) = Xsqlite3_profile // sqlite3.c:126253:3:
- *(*func(*libc.TLS, uintptr, int32, uintptr, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 600 /* .progress_handler */)) = Xsqlite3_progress_handler // sqlite3.c:126254:3:
- *(*func(*libc.TLS, uintptr, int32) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 608 /* .realloc */)) = Xsqlite3_realloc // sqlite3.c:126255:3:
- *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 616 /* .reset */)) = Xsqlite3_reset // sqlite3.c:126256:3:
- *(*func(*libc.TLS, uintptr, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 624 /* .result_blob */)) = Xsqlite3_result_blob // sqlite3.c:126257:3:
- *(*func(*libc.TLS, uintptr, float64))(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 632 /* .result_double */)) = Xsqlite3_result_double // sqlite3.c:126258:3:
- *(*func(*libc.TLS, uintptr, uintptr, int32))(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 640 /* .result_error */)) = Xsqlite3_result_error // sqlite3.c:126259:3:
- *(*func(*libc.TLS, uintptr, uintptr, int32))(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 648 /* .result_error16 */)) = Xsqlite3_result_error16 // sqlite3.c:126260:3:
- *(*func(*libc.TLS, uintptr, int32))(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 656 /* .result_int */)) = Xsqlite3_result_int // sqlite3.c:126261:3:
- *(*func(*libc.TLS, uintptr, I64))(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 664 /* .result_int64 */)) = Xsqlite3_result_int64 // sqlite3.c:126262:3:
- *(*func(*libc.TLS, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 672 /* .result_null */)) = Xsqlite3_result_null // sqlite3.c:126263:3:
- *(*func(*libc.TLS, uintptr, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 680 /* .result_text */)) = Xsqlite3_result_text // sqlite3.c:126264:3:
- *(*func(*libc.TLS, uintptr, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 688 /* .result_text16 */)) = Xsqlite3_result_text16 // sqlite3.c:126265:3:
- *(*func(*libc.TLS, uintptr, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 696 /* .result_text16be */)) = Xsqlite3_result_text16be // sqlite3.c:126266:3:
- *(*func(*libc.TLS, uintptr, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 704 /* .result_text16le */)) = Xsqlite3_result_text16le // sqlite3.c:126267:3:
- *(*func(*libc.TLS, uintptr, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 712 /* .result_value */)) = Xsqlite3_result_value // sqlite3.c:126268:3:
- *(*func(*libc.TLS, uintptr, uintptr, uintptr) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 720 /* .rollback_hook */)) = Xsqlite3_rollback_hook // sqlite3.c:126269:3:
- *(*func(*libc.TLS, uintptr, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 728 /* .set_authorizer */)) = Xsqlite3_set_authorizer // sqlite3.c:126270:3:
- *(*func(*libc.TLS, uintptr, int32, uintptr, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 736 /* .set_auxdata */)) = Xsqlite3_set_auxdata // sqlite3.c:126271:3:
- *(*func(*libc.TLS, int32, uintptr, uintptr, uintptr) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 744 /* .xsnprintf */)) = Xsqlite3_snprintf // sqlite3.c:126272:3:
- *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 752 /* .step */)) = Xsqlite3_step // sqlite3.c:126273:3:
- *(*func(*libc.TLS, uintptr, uintptr, uintptr, uintptr, uintptr, uintptr, uintptr, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 760 /* .table_column_metadata */)) = Xsqlite3_table_column_metadata // sqlite3.c:126274:3:
- *(*func(*libc.TLS))(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 768 /* .thread_cleanup */)) = Xsqlite3_thread_cleanup // sqlite3.c:126276:3:
- *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 776 /* .total_changes */)) = Xsqlite3_total_changes // sqlite3.c:126280:3:
- *(*func(*libc.TLS, uintptr, uintptr, uintptr) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 784 /* .trace */)) = Xsqlite3_trace // sqlite3.c:126281:3:
- *(*func(*libc.TLS, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 792 /* .transfer_bindings */)) = Xsqlite3_transfer_bindings // sqlite3.c:126283:3:
- *(*func(*libc.TLS, uintptr, uintptr, uintptr) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 800 /* .update_hook */)) = Xsqlite3_update_hook // sqlite3.c:126287:3:
- *(*func(*libc.TLS, uintptr) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 808 /* .user_data */)) = Xsqlite3_user_data // sqlite3.c:126288:3:
- *(*func(*libc.TLS, uintptr) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 816 /* .value_blob */)) = Xsqlite3_value_blob // sqlite3.c:126289:3:
- *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 824 /* .value_bytes */)) = Xsqlite3_value_bytes // sqlite3.c:126290:3:
- *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 832 /* .value_bytes16 */)) = Xsqlite3_value_bytes16 // sqlite3.c:126291:3:
- *(*func(*libc.TLS, uintptr) float64)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 840 /* .value_double */)) = Xsqlite3_value_double // sqlite3.c:126292:3:
- *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 848 /* .value_int */)) = Xsqlite3_value_int // sqlite3.c:126293:3:
- *(*func(*libc.TLS, uintptr) Sqlite_int64)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 856 /* .value_int64 */)) = Xsqlite3_value_int64 // sqlite3.c:126294:3:
- *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 864 /* .value_numeric_type */)) = Xsqlite3_value_numeric_type // sqlite3.c:126295:3:
- *(*func(*libc.TLS, uintptr) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 872 /* .value_text */)) = Xsqlite3_value_text // sqlite3.c:126296:3:
- *(*func(*libc.TLS, uintptr) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 880 /* .value_text16 */)) = Xsqlite3_value_text16 // sqlite3.c:126297:3:
- *(*func(*libc.TLS, uintptr) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 888 /* .value_text16be */)) = Xsqlite3_value_text16be // sqlite3.c:126298:3:
- *(*func(*libc.TLS, uintptr) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 896 /* .value_text16le */)) = Xsqlite3_value_text16le // sqlite3.c:126299:3:
- *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 904 /* .value_type */)) = Xsqlite3_value_type // sqlite3.c:126300:3:
- *(*func(*libc.TLS, uintptr, Va_list) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 912 /* .vmprintf */)) = Xsqlite3_vmprintf // sqlite3.c:126301:3:
- *(*func(*libc.TLS, uintptr, uintptr, int32) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 920 /* .overload_function */)) = Xsqlite3_overload_function // sqlite3.c:126310:3:
- *(*func(*libc.TLS, uintptr, uintptr, int32, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 928 /* .prepare_v2 */)) = Xsqlite3_prepare_v2 // sqlite3.c:126315:3:
- *(*func(*libc.TLS, uintptr, uintptr, int32, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 936 /* .prepare16_v2 */)) = Xsqlite3_prepare16_v2 // sqlite3.c:126316:3:
- *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 944 /* .clear_bindings */)) = Xsqlite3_clear_bindings // sqlite3.c:126317:3:
- *(*func(*libc.TLS, uintptr, uintptr, uintptr, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 952 /* .create_module_v2 */)) = Xsqlite3_create_module_v2 // sqlite3.c:126322:3:
- *(*func(*libc.TLS, uintptr, int32, int32) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 960 /* .bind_zeroblob */)) = Xsqlite3_bind_zeroblob // sqlite3.c:126327:3:
- *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 968 /* .blob_bytes */)) = Xsqlite3_blob_bytes // sqlite3.c:126328:3:
- *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 976 /* .blob_close */)) = Xsqlite3_blob_close // sqlite3.c:126329:3:
- *(*func(*libc.TLS, uintptr, uintptr, uintptr, uintptr, Sqlite_int64, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 984 /* .blob_open */)) = Xsqlite3_blob_open // sqlite3.c:126330:3:
- *(*func(*libc.TLS, uintptr, uintptr, int32, int32) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 992 /* .blob_read */)) = Xsqlite3_blob_read // sqlite3.c:126331:3:
- *(*func(*libc.TLS, uintptr, uintptr, int32, int32) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 1000 /* .blob_write */)) = Xsqlite3_blob_write // sqlite3.c:126332:3:
- *(*func(*libc.TLS, uintptr, uintptr, int32, uintptr, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 1008 /* .create_collation_v2 */)) = Xsqlite3_create_collation_v2 // sqlite3.c:126333:3:
- *(*func(*libc.TLS, uintptr, uintptr, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 1016 /* .file_control */)) = Xsqlite3_file_control // sqlite3.c:126334:3:
- *(*func(*libc.TLS, int32) Sqlite3_int64)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 1024 /* .memory_highwater */)) = Xsqlite3_memory_highwater // sqlite3.c:126335:3:
- *(*func(*libc.TLS) Sqlite3_int64)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 1032 /* .memory_used */)) = Xsqlite3_memory_used // sqlite3.c:126336:3:
- *(*func(*libc.TLS, int32) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 1040 /* .mutex_alloc */)) = Xsqlite3_mutex_alloc // sqlite3.c:126344:3:
- *(*func(*libc.TLS, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 1048 /* .mutex_enter */)) = Xsqlite3_mutex_enter // sqlite3.c:126345:3:
- *(*func(*libc.TLS, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 1056 /* .mutex_free */)) = Xsqlite3_mutex_free // sqlite3.c:126346:3:
- *(*func(*libc.TLS, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 1064 /* .mutex_leave */)) = Xsqlite3_mutex_leave // sqlite3.c:126347:3:
- *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 1072 /* .mutex_try */)) = Xsqlite3_mutex_try // sqlite3.c:126348:3:
- *(*func(*libc.TLS, uintptr, uintptr, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 1080 /* .open_v2 */)) = Xsqlite3_open_v2 // sqlite3.c:126350:3:
- *(*func(*libc.TLS, int32) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 1088 /* .release_memory */)) = Xsqlite3_release_memory // sqlite3.c:126351:3:
- *(*func(*libc.TLS, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 1096 /* .result_error_nomem */)) = Xsqlite3_result_error_nomem // sqlite3.c:126352:3:
- *(*func(*libc.TLS, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 1104 /* .result_error_toobig */)) = Xsqlite3_result_error_toobig // sqlite3.c:126353:3:
- *(*func(*libc.TLS, int32) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 1112 /* .sleep */)) = Xsqlite3_sleep // sqlite3.c:126354:3:
- *(*func(*libc.TLS, int32))(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 1120 /* .soft_heap_limit */)) = Xsqlite3_soft_heap_limit // sqlite3.c:126355:3:
- *(*func(*libc.TLS, uintptr) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 1128 /* .vfs_find */)) = Xsqlite3_vfs_find // sqlite3.c:126356:3:
- *(*func(*libc.TLS, uintptr, int32) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 1136 /* .vfs_register */)) = Xsqlite3_vfs_register // sqlite3.c:126357:3:
- *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 1144 /* .vfs_unregister */)) = Xsqlite3_vfs_unregister // sqlite3.c:126358:3:
- *(*func(*libc.TLS) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 1152 /* .xthreadsafe */)) = Xsqlite3_threadsafe // sqlite3.c:126363:3:
- *(*func(*libc.TLS, uintptr, int32))(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 1160 /* .result_zeroblob */)) = Xsqlite3_result_zeroblob // sqlite3.c:126364:3:
- *(*func(*libc.TLS, uintptr, int32))(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 1168 /* .result_error_code */)) = Xsqlite3_result_error_code // sqlite3.c:126365:3:
- *(*func(*libc.TLS, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 1176 /* .test_control */)) = Xsqlite3_test_control // sqlite3.c:126366:3:
- *(*func(*libc.TLS, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 1184 /* .randomness */)) = Xsqlite3_randomness // sqlite3.c:126367:3:
- *(*func(*libc.TLS, uintptr) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 1192 /* .context_db_handle */)) = Xsqlite3_context_db_handle // sqlite3.c:126368:3:
- *(*func(*libc.TLS, uintptr, int32) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 1200 /* .extended_result_codes */)) = Xsqlite3_extended_result_codes // sqlite3.c:126373:3:
- *(*func(*libc.TLS, uintptr, int32, int32) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 1208 /* .limit */)) = Xsqlite3_limit // sqlite3.c:126374:3:
- *(*func(*libc.TLS, uintptr, uintptr) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 1216 /* .next_stmt */)) = Xsqlite3_next_stmt // sqlite3.c:126375:3:
- *(*func(*libc.TLS, uintptr) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 1224 /* .sql */)) = Xsqlite3_sql // sqlite3.c:126376:3:
- *(*func(*libc.TLS, int32, uintptr, uintptr, int32) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 1232 /* .status */)) = Xsqlite3_status // sqlite3.c:126377:3:
- *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 1240 /* .backup_finish */)) = Xsqlite3_backup_finish // sqlite3.c:126382:3:
- *(*func(*libc.TLS, uintptr, uintptr, uintptr, uintptr) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 1248 /* .backup_init */)) = Xsqlite3_backup_init // sqlite3.c:126383:3:
- *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 1256 /* .backup_pagecount */)) = Xsqlite3_backup_pagecount // sqlite3.c:126384:3:
- *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 1264 /* .backup_remaining */)) = Xsqlite3_backup_remaining // sqlite3.c:126385:3:
- *(*func(*libc.TLS, uintptr, int32) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 1272 /* .backup_step */)) = Xsqlite3_backup_step // sqlite3.c:126386:3:
- *(*func(*libc.TLS, int32) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 1280 /* .compileoption_get */)) = Xsqlite3_compileoption_get // sqlite3.c:126388:3:
- *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 1288 /* .compileoption_used */)) = Xsqlite3_compileoption_used // sqlite3.c:126389:3:
- *(*func(*libc.TLS, uintptr, uintptr, int32, int32, uintptr, uintptr, uintptr, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 1296 /* .create_function_v2 */)) = Xsqlite3_create_function_v2 // sqlite3.c:126394:3:
- *(*func(*libc.TLS, uintptr, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 1304 /* .db_config */)) = Xsqlite3_db_config // sqlite3.c:126395:3:
- *(*func(*libc.TLS, uintptr) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 1312 /* .db_mutex */)) = Xsqlite3_db_mutex // sqlite3.c:126396:3:
- *(*func(*libc.TLS, uintptr, int32, uintptr, uintptr, int32) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 1320 /* .db_status */)) = Xsqlite3_db_status // sqlite3.c:126397:3:
- *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 1328 /* .extended_errcode */)) = Xsqlite3_extended_errcode // sqlite3.c:126398:3:
- *(*func(*libc.TLS, int32, uintptr, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 1336 /* .log */)) = Xsqlite3_log // sqlite3.c:126399:3:
- *(*func(*libc.TLS, Sqlite3_int64) Sqlite3_int64)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 1344 /* .soft_heap_limit64 */)) = Xsqlite3_soft_heap_limit64 // sqlite3.c:126400:3:
- *(*func(*libc.TLS) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 1352 /* .sourceid */)) = Xsqlite3_sourceid // sqlite3.c:126401:3:
- *(*func(*libc.TLS, uintptr, int32, int32) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 1360 /* .stmt_status */)) = Xsqlite3_stmt_status // sqlite3.c:126402:3:
- *(*func(*libc.TLS, uintptr, uintptr, int32) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 1368 /* .strnicmp */)) = Xsqlite3_strnicmp // sqlite3.c:126403:3:
- *(*func(*libc.TLS, uintptr, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 1376 /* .unlock_notify */)) = Xsqlite3_unlock_notify // sqlite3.c:126405:3:
- *(*func(*libc.TLS, uintptr, int32) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 1384 /* .wal_autocheckpoint */)) = Xsqlite3_wal_autocheckpoint // sqlite3.c:126410:3:
- *(*func(*libc.TLS, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 1392 /* .wal_checkpoint */)) = Xsqlite3_wal_checkpoint // sqlite3.c:126411:3:
- *(*func(*libc.TLS, uintptr, uintptr, uintptr) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 1400 /* .wal_hook */)) = Xsqlite3_wal_hook // sqlite3.c:126412:3:
- *(*func(*libc.TLS, uintptr, Sqlite3_int64) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 1408 /* .blob_reopen */)) = Xsqlite3_blob_reopen // sqlite3.c:126418:3:
- *(*func(*libc.TLS, uintptr, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 1416 /* .vtab_config */)) = Xsqlite3_vtab_config // sqlite3.c:126419:3:
- *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 1424 /* .vtab_on_conflict */)) = Xsqlite3_vtab_on_conflict // sqlite3.c:126420:3:
- *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 1432 /* .close_v2 */)) = Xsqlite3_close_v2 // sqlite3.c:126421:3:
- *(*func(*libc.TLS, uintptr, uintptr) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 1440 /* .db_filename */)) = Xsqlite3_db_filename // sqlite3.c:126422:3:
- *(*func(*libc.TLS, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 1448 /* .db_readonly */)) = Xsqlite3_db_readonly // sqlite3.c:126423:3:
- *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 1456 /* .db_release_memory */)) = Xsqlite3_db_release_memory // sqlite3.c:126424:3:
- *(*func(*libc.TLS, int32) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 1464 /* .errstr */)) = Xsqlite3_errstr // sqlite3.c:126425:3:
- *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 1472 /* .stmt_busy */)) = Xsqlite3_stmt_busy // sqlite3.c:126426:3:
- *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 1480 /* .stmt_readonly */)) = Xsqlite3_stmt_readonly // sqlite3.c:126427:3:
- *(*func(*libc.TLS, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 1488 /* .stricmp */)) = Xsqlite3_stricmp // sqlite3.c:126428:3:
- *(*func(*libc.TLS, uintptr, uintptr, int32) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 1496 /* .uri_boolean */)) = Xsqlite3_uri_boolean // sqlite3.c:126429:3:
- *(*func(*libc.TLS, uintptr, uintptr, Sqlite3_int64) Sqlite3_int64)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 1504 /* .uri_int64 */)) = Xsqlite3_uri_int64 // sqlite3.c:126430:3:
- *(*func(*libc.TLS, uintptr, uintptr) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 1512 /* .uri_parameter */)) = Xsqlite3_uri_parameter // sqlite3.c:126431:3:
- *(*func(*libc.TLS, int32, uintptr, uintptr, Va_list) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 1520 /* .xvsnprintf */)) = Xsqlite3_vsnprintf // sqlite3.c:126432:3:
- *(*func(*libc.TLS, uintptr, uintptr, int32, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 1528 /* .wal_checkpoint_v2 */)) = Xsqlite3_wal_checkpoint_v2 // sqlite3.c:126433:3:
- *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 1536 /* .auto_extension */)) = Xsqlite3_auto_extension // sqlite3.c:126435:3:
- *(*func(*libc.TLS, uintptr, int32, uintptr, Sqlite3_uint64, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 1544 /* .bind_blob64 */)) = Xsqlite3_bind_blob64 // sqlite3.c:126436:3:
- *(*func(*libc.TLS, uintptr, int32, uintptr, Sqlite3_uint64, uintptr, uint8) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 1552 /* .bind_text64 */)) = Xsqlite3_bind_text64 // sqlite3.c:126437:3:
- *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 1560 /* .cancel_auto_extension */)) = Xsqlite3_cancel_auto_extension // sqlite3.c:126438:3:
- *(*func(*libc.TLS, uintptr, uintptr, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 1568 /* .load_extension */)) = Xsqlite3_load_extension // sqlite3.c:126439:3:
- *(*func(*libc.TLS, Sqlite3_uint64) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 1576 /* .malloc64 */)) = Xsqlite3_malloc64 // sqlite3.c:126440:3:
- *(*func(*libc.TLS, uintptr) Sqlite3_uint64)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 1584 /* .msize */)) = Xsqlite3_msize // sqlite3.c:126441:3:
- *(*func(*libc.TLS, uintptr, Sqlite3_uint64) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 1592 /* .realloc64 */)) = Xsqlite3_realloc64 // sqlite3.c:126442:3:
- *(*func(*libc.TLS))(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 1600 /* .reset_auto_extension */)) = Xsqlite3_reset_auto_extension // sqlite3.c:126443:3:
- *(*func(*libc.TLS, uintptr, uintptr, Sqlite3_uint64, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 1608 /* .result_blob64 */)) = Xsqlite3_result_blob64 // sqlite3.c:126444:3:
- *(*func(*libc.TLS, uintptr, uintptr, Sqlite3_uint64, uintptr, uint8))(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 1616 /* .result_text64 */)) = Xsqlite3_result_text64 // sqlite3.c:126445:3:
- *(*func(*libc.TLS, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 1624 /* .strglob */)) = Xsqlite3_strglob // sqlite3.c:126446:3:
+ }{libc.Xlstat})) // sqlite3.c:34590:22:
+ *(*uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&aVfs)) + 32 /* .pAppData */)) = uintptr(unsafe.Pointer(&posixIoFinder)) // sqlite3.c:42097:5:
+ *(*func(*libc.TLS, uintptr, uintptr, uintptr, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&aVfs)) + 40 /* .xOpen */)) = unixOpen // sqlite3.c:42097:5:
+ *(*func(*libc.TLS, uintptr, uintptr, int32) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&aVfs)) + 48 /* .xDelete */)) = unixDelete // sqlite3.c:42097:5:
+ *(*func(*libc.TLS, uintptr, uintptr, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&aVfs)) + 56 /* .xAccess */)) = unixAccess // sqlite3.c:42097:5:
+ *(*func(*libc.TLS, uintptr, uintptr, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&aVfs)) + 64 /* .xFullPathname */)) = unixFullPathname // sqlite3.c:42097:5:
+ *(*func(*libc.TLS, uintptr, uintptr) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&aVfs)) + 72 /* .xDlOpen */)) = unixDlOpen // sqlite3.c:42097:5:
+ *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aVfs)) + 80 /* .xDlError */)) = unixDlError // sqlite3.c:42097:5:
+ *(*func(*libc.TLS, uintptr, uintptr, uintptr) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&aVfs)) + 88 /* .xDlSym */)) = unixDlSym // sqlite3.c:42097:5:
+ *(*func(*libc.TLS, uintptr, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aVfs)) + 96 /* .xDlClose */)) = unixDlClose // sqlite3.c:42097:5:
+ *(*func(*libc.TLS, uintptr, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&aVfs)) + 104 /* .xRandomness */)) = unixRandomness // sqlite3.c:42097:5:
+ *(*func(*libc.TLS, uintptr, int32) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&aVfs)) + 112 /* .xSleep */)) = unixSleep // sqlite3.c:42097:5:
+ *(*func(*libc.TLS, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&aVfs)) + 120 /* .xCurrentTime */)) = unixCurrentTime // sqlite3.c:42097:5:
+ *(*func(*libc.TLS, uintptr, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&aVfs)) + 128 /* .xGetLastError */)) = unixGetLastError // sqlite3.c:42097:5:
+ *(*func(*libc.TLS, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&aVfs)) + 136 /* .xCurrentTimeInt64 */)) = unixCurrentTimeInt64 // sqlite3.c:42097:5:
+ *(*func(*libc.TLS, uintptr, uintptr, Sqlite3_syscall_ptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&aVfs)) + 144 /* .xSetSystemCall */)) = unixSetSystemCall // sqlite3.c:42097:5:
+ *(*func(*libc.TLS, uintptr, uintptr) Sqlite3_syscall_ptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&aVfs)) + 152 /* .xGetSystemCall */)) = unixGetSystemCall // sqlite3.c:42097:5:
+ *(*func(*libc.TLS, uintptr, uintptr) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&aVfs)) + 160 /* .xNextSystemCall */)) = unixNextSystemCall // sqlite3.c:42097:5:
+ *(*uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&aVfs)) + 200 /* .pAppData */)) = uintptr(unsafe.Pointer(&nolockIoFinder)) // sqlite3.c:42099:5:
+ *(*func(*libc.TLS, uintptr, uintptr, uintptr, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&aVfs)) + 208 /* .xOpen */)) = unixOpen // sqlite3.c:42099:5:
+ *(*func(*libc.TLS, uintptr, uintptr, int32) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&aVfs)) + 216 /* .xDelete */)) = unixDelete // sqlite3.c:42099:5:
+ *(*func(*libc.TLS, uintptr, uintptr, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&aVfs)) + 224 /* .xAccess */)) = unixAccess // sqlite3.c:42099:5:
+ *(*func(*libc.TLS, uintptr, uintptr, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&aVfs)) + 232 /* .xFullPathname */)) = unixFullPathname // sqlite3.c:42099:5:
+ *(*func(*libc.TLS, uintptr, uintptr) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&aVfs)) + 240 /* .xDlOpen */)) = unixDlOpen // sqlite3.c:42099:5:
+ *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aVfs)) + 248 /* .xDlError */)) = unixDlError // sqlite3.c:42099:5:
+ *(*func(*libc.TLS, uintptr, uintptr, uintptr) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&aVfs)) + 256 /* .xDlSym */)) = unixDlSym // sqlite3.c:42099:5:
+ *(*func(*libc.TLS, uintptr, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aVfs)) + 264 /* .xDlClose */)) = unixDlClose // sqlite3.c:42099:5:
+ *(*func(*libc.TLS, uintptr, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&aVfs)) + 272 /* .xRandomness */)) = unixRandomness // sqlite3.c:42099:5:
+ *(*func(*libc.TLS, uintptr, int32) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&aVfs)) + 280 /* .xSleep */)) = unixSleep // sqlite3.c:42099:5:
+ *(*func(*libc.TLS, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&aVfs)) + 288 /* .xCurrentTime */)) = unixCurrentTime // sqlite3.c:42099:5:
+ *(*func(*libc.TLS, uintptr, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&aVfs)) + 296 /* .xGetLastError */)) = unixGetLastError // sqlite3.c:42099:5:
+ *(*func(*libc.TLS, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&aVfs)) + 304 /* .xCurrentTimeInt64 */)) = unixCurrentTimeInt64 // sqlite3.c:42099:5:
+ *(*func(*libc.TLS, uintptr, uintptr, Sqlite3_syscall_ptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&aVfs)) + 312 /* .xSetSystemCall */)) = unixSetSystemCall // sqlite3.c:42099:5:
+ *(*func(*libc.TLS, uintptr, uintptr) Sqlite3_syscall_ptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&aVfs)) + 320 /* .xGetSystemCall */)) = unixGetSystemCall // sqlite3.c:42099:5:
+ *(*func(*libc.TLS, uintptr, uintptr) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&aVfs)) + 328 /* .xNextSystemCall */)) = unixNextSystemCall // sqlite3.c:42099:5:
+ *(*uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&aVfs)) + 368 /* .pAppData */)) = uintptr(unsafe.Pointer(&dotlockIoFinder)) // sqlite3.c:42100:5:
+ *(*func(*libc.TLS, uintptr, uintptr, uintptr, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&aVfs)) + 376 /* .xOpen */)) = unixOpen // sqlite3.c:42100:5:
+ *(*func(*libc.TLS, uintptr, uintptr, int32) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&aVfs)) + 384 /* .xDelete */)) = unixDelete // sqlite3.c:42100:5:
+ *(*func(*libc.TLS, uintptr, uintptr, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&aVfs)) + 392 /* .xAccess */)) = unixAccess // sqlite3.c:42100:5:
+ *(*func(*libc.TLS, uintptr, uintptr, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&aVfs)) + 400 /* .xFullPathname */)) = unixFullPathname // sqlite3.c:42100:5:
+ *(*func(*libc.TLS, uintptr, uintptr) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&aVfs)) + 408 /* .xDlOpen */)) = unixDlOpen // sqlite3.c:42100:5:
+ *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aVfs)) + 416 /* .xDlError */)) = unixDlError // sqlite3.c:42100:5:
+ *(*func(*libc.TLS, uintptr, uintptr, uintptr) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&aVfs)) + 424 /* .xDlSym */)) = unixDlSym // sqlite3.c:42100:5:
+ *(*func(*libc.TLS, uintptr, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aVfs)) + 432 /* .xDlClose */)) = unixDlClose // sqlite3.c:42100:5:
+ *(*func(*libc.TLS, uintptr, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&aVfs)) + 440 /* .xRandomness */)) = unixRandomness // sqlite3.c:42100:5:
+ *(*func(*libc.TLS, uintptr, int32) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&aVfs)) + 448 /* .xSleep */)) = unixSleep // sqlite3.c:42100:5:
+ *(*func(*libc.TLS, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&aVfs)) + 456 /* .xCurrentTime */)) = unixCurrentTime // sqlite3.c:42100:5:
+ *(*func(*libc.TLS, uintptr, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&aVfs)) + 464 /* .xGetLastError */)) = unixGetLastError // sqlite3.c:42100:5:
+ *(*func(*libc.TLS, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&aVfs)) + 472 /* .xCurrentTimeInt64 */)) = unixCurrentTimeInt64 // sqlite3.c:42100:5:
+ *(*func(*libc.TLS, uintptr, uintptr, Sqlite3_syscall_ptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&aVfs)) + 480 /* .xSetSystemCall */)) = unixSetSystemCall // sqlite3.c:42100:5:
+ *(*func(*libc.TLS, uintptr, uintptr) Sqlite3_syscall_ptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&aVfs)) + 488 /* .xGetSystemCall */)) = unixGetSystemCall // sqlite3.c:42100:5:
+ *(*func(*libc.TLS, uintptr, uintptr) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&aVfs)) + 496 /* .xNextSystemCall */)) = unixNextSystemCall // sqlite3.c:42100:5:
+ *(*uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&aVfs)) + 536 /* .pAppData */)) = uintptr(unsafe.Pointer(&posixIoFinder)) // sqlite3.c:42101:5:
+ *(*func(*libc.TLS, uintptr, uintptr, uintptr, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&aVfs)) + 544 /* .xOpen */)) = unixOpen // sqlite3.c:42101:5:
+ *(*func(*libc.TLS, uintptr, uintptr, int32) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&aVfs)) + 552 /* .xDelete */)) = unixDelete // sqlite3.c:42101:5:
+ *(*func(*libc.TLS, uintptr, uintptr, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&aVfs)) + 560 /* .xAccess */)) = unixAccess // sqlite3.c:42101:5:
+ *(*func(*libc.TLS, uintptr, uintptr, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&aVfs)) + 568 /* .xFullPathname */)) = unixFullPathname // sqlite3.c:42101:5:
+ *(*func(*libc.TLS, uintptr, uintptr) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&aVfs)) + 576 /* .xDlOpen */)) = unixDlOpen // sqlite3.c:42101:5:
+ *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aVfs)) + 584 /* .xDlError */)) = unixDlError // sqlite3.c:42101:5:
+ *(*func(*libc.TLS, uintptr, uintptr, uintptr) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&aVfs)) + 592 /* .xDlSym */)) = unixDlSym // sqlite3.c:42101:5:
+ *(*func(*libc.TLS, uintptr, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aVfs)) + 600 /* .xDlClose */)) = unixDlClose // sqlite3.c:42101:5:
+ *(*func(*libc.TLS, uintptr, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&aVfs)) + 608 /* .xRandomness */)) = unixRandomness // sqlite3.c:42101:5:
+ *(*func(*libc.TLS, uintptr, int32) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&aVfs)) + 616 /* .xSleep */)) = unixSleep // sqlite3.c:42101:5:
+ *(*func(*libc.TLS, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&aVfs)) + 624 /* .xCurrentTime */)) = unixCurrentTime // sqlite3.c:42101:5:
+ *(*func(*libc.TLS, uintptr, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&aVfs)) + 632 /* .xGetLastError */)) = unixGetLastError // sqlite3.c:42101:5:
+ *(*func(*libc.TLS, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&aVfs)) + 640 /* .xCurrentTimeInt64 */)) = unixCurrentTimeInt64 // sqlite3.c:42101:5:
+ *(*func(*libc.TLS, uintptr, uintptr, Sqlite3_syscall_ptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&aVfs)) + 648 /* .xSetSystemCall */)) = unixSetSystemCall // sqlite3.c:42101:5:
+ *(*func(*libc.TLS, uintptr, uintptr) Sqlite3_syscall_ptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&aVfs)) + 656 /* .xGetSystemCall */)) = unixGetSystemCall // sqlite3.c:42101:5:
+ *(*func(*libc.TLS, uintptr, uintptr) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&aVfs)) + 664 /* .xNextSystemCall */)) = unixNextSystemCall // sqlite3.c:42101:5:
+ *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aWindowFuncs)) + 24 /* .xSFunc */)) = row_numberStepFunc // sqlite3.c:155523:5:
+ *(*func(*libc.TLS, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aWindowFuncs)) + 32 /* .xFinalize */)) = row_numberValueFunc // sqlite3.c:155523:5:
+ *(*func(*libc.TLS, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aWindowFuncs)) + 40 /* .xValue */)) = row_numberValueFunc // sqlite3.c:155523:5:
+ *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aWindowFuncs)) + 48 /* .xInverse */)) = noopStepFunc // sqlite3.c:155523:5:
+ *(*uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&aWindowFuncs)) + 56 /* .zName */)) = uintptr(unsafe.Pointer(&row_numberName)) // sqlite3.c:155523:5:
+ *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aWindowFuncs)) + 96 /* .xSFunc */)) = dense_rankStepFunc // sqlite3.c:155524:5:
+ *(*func(*libc.TLS, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aWindowFuncs)) + 104 /* .xFinalize */)) = dense_rankValueFunc // sqlite3.c:155524:5:
+ *(*func(*libc.TLS, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aWindowFuncs)) + 112 /* .xValue */)) = dense_rankValueFunc // sqlite3.c:155524:5:
+ *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aWindowFuncs)) + 120 /* .xInverse */)) = noopStepFunc // sqlite3.c:155524:5:
+ *(*uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&aWindowFuncs)) + 128 /* .zName */)) = uintptr(unsafe.Pointer(&dense_rankName)) // sqlite3.c:155524:5:
+ *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aWindowFuncs)) + 168 /* .xSFunc */)) = rankStepFunc // sqlite3.c:155525:5:
+ *(*func(*libc.TLS, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aWindowFuncs)) + 176 /* .xFinalize */)) = rankValueFunc // sqlite3.c:155525:5:
+ *(*func(*libc.TLS, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aWindowFuncs)) + 184 /* .xValue */)) = rankValueFunc // sqlite3.c:155525:5:
+ *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aWindowFuncs)) + 192 /* .xInverse */)) = noopStepFunc // sqlite3.c:155525:5:
+ *(*uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&aWindowFuncs)) + 200 /* .zName */)) = uintptr(unsafe.Pointer(&rankName)) // sqlite3.c:155525:5:
+ *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aWindowFuncs)) + 240 /* .xSFunc */)) = percent_rankStepFunc // sqlite3.c:155526:5:
+ *(*func(*libc.TLS, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aWindowFuncs)) + 248 /* .xFinalize */)) = percent_rankValueFunc // sqlite3.c:155526:5:
+ *(*func(*libc.TLS, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aWindowFuncs)) + 256 /* .xValue */)) = percent_rankValueFunc // sqlite3.c:155526:5:
+ *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aWindowFuncs)) + 264 /* .xInverse */)) = percent_rankInvFunc // sqlite3.c:155526:5:
+ *(*uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&aWindowFuncs)) + 272 /* .zName */)) = uintptr(unsafe.Pointer(&percent_rankName)) // sqlite3.c:155526:5:
+ *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aWindowFuncs)) + 312 /* .xSFunc */)) = cume_distStepFunc // sqlite3.c:155527:5:
+ *(*func(*libc.TLS, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aWindowFuncs)) + 320 /* .xFinalize */)) = cume_distValueFunc // sqlite3.c:155527:5:
+ *(*func(*libc.TLS, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aWindowFuncs)) + 328 /* .xValue */)) = cume_distValueFunc // sqlite3.c:155527:5:
+ *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aWindowFuncs)) + 336 /* .xInverse */)) = cume_distInvFunc // sqlite3.c:155527:5:
+ *(*uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&aWindowFuncs)) + 344 /* .zName */)) = uintptr(unsafe.Pointer(&cume_distName)) // sqlite3.c:155527:5:
+ *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aWindowFuncs)) + 384 /* .xSFunc */)) = ntileStepFunc // sqlite3.c:155528:5:
+ *(*func(*libc.TLS, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aWindowFuncs)) + 392 /* .xFinalize */)) = ntileValueFunc // sqlite3.c:155528:5:
+ *(*func(*libc.TLS, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aWindowFuncs)) + 400 /* .xValue */)) = ntileValueFunc // sqlite3.c:155528:5:
+ *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aWindowFuncs)) + 408 /* .xInverse */)) = ntileInvFunc // sqlite3.c:155528:5:
+ *(*uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&aWindowFuncs)) + 416 /* .zName */)) = uintptr(unsafe.Pointer(&ntileName)) // sqlite3.c:155528:5:
+ *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aWindowFuncs)) + 456 /* .xSFunc */)) = last_valueStepFunc // sqlite3.c:155529:5:
+ *(*func(*libc.TLS, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aWindowFuncs)) + 464 /* .xFinalize */)) = last_valueFinalizeFunc // sqlite3.c:155529:5:
+ *(*func(*libc.TLS, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aWindowFuncs)) + 472 /* .xValue */)) = last_valueValueFunc // sqlite3.c:155529:5:
+ *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aWindowFuncs)) + 480 /* .xInverse */)) = last_valueInvFunc // sqlite3.c:155529:5:
+ *(*uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&aWindowFuncs)) + 488 /* .zName */)) = uintptr(unsafe.Pointer(&last_valueName)) // sqlite3.c:155529:5:
+ *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aWindowFuncs)) + 528 /* .xSFunc */)) = nth_valueStepFunc // sqlite3.c:155530:5:
+ *(*func(*libc.TLS, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aWindowFuncs)) + 536 /* .xFinalize */)) = nth_valueFinalizeFunc // sqlite3.c:155530:5:
+ *(*func(*libc.TLS, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aWindowFuncs)) + 544 /* .xValue */)) = noopValueFunc // sqlite3.c:155530:5:
+ *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aWindowFuncs)) + 552 /* .xInverse */)) = noopStepFunc // sqlite3.c:155530:5:
+ *(*uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&aWindowFuncs)) + 560 /* .zName */)) = uintptr(unsafe.Pointer(&nth_valueName)) // sqlite3.c:155530:5:
+ *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aWindowFuncs)) + 600 /* .xSFunc */)) = first_valueStepFunc // sqlite3.c:155531:5:
+ *(*func(*libc.TLS, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aWindowFuncs)) + 608 /* .xFinalize */)) = first_valueFinalizeFunc // sqlite3.c:155531:5:
+ *(*func(*libc.TLS, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aWindowFuncs)) + 616 /* .xValue */)) = noopValueFunc // sqlite3.c:155531:5:
+ *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aWindowFuncs)) + 624 /* .xInverse */)) = noopStepFunc // sqlite3.c:155531:5:
+ *(*uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&aWindowFuncs)) + 632 /* .zName */)) = uintptr(unsafe.Pointer(&first_valueName)) // sqlite3.c:155531:5:
+ *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aWindowFuncs)) + 672 /* .xSFunc */)) = noopStepFunc // sqlite3.c:155532:5:
+ *(*func(*libc.TLS, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aWindowFuncs)) + 680 /* .xFinalize */)) = noopValueFunc // sqlite3.c:155532:5:
+ *(*func(*libc.TLS, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aWindowFuncs)) + 688 /* .xValue */)) = noopValueFunc // sqlite3.c:155532:5:
+ *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aWindowFuncs)) + 696 /* .xInverse */)) = noopStepFunc // sqlite3.c:155532:5:
+ *(*uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&aWindowFuncs)) + 704 /* .zName */)) = uintptr(unsafe.Pointer(&leadName)) // sqlite3.c:155532:5:
+ *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aWindowFuncs)) + 744 /* .xSFunc */)) = noopStepFunc // sqlite3.c:155533:5:
+ *(*func(*libc.TLS, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aWindowFuncs)) + 752 /* .xFinalize */)) = noopValueFunc // sqlite3.c:155533:5:
+ *(*func(*libc.TLS, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aWindowFuncs)) + 760 /* .xValue */)) = noopValueFunc // sqlite3.c:155533:5:
+ *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aWindowFuncs)) + 768 /* .xInverse */)) = noopStepFunc // sqlite3.c:155533:5:
+ *(*uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&aWindowFuncs)) + 776 /* .zName */)) = uintptr(unsafe.Pointer(&leadName)) // sqlite3.c:155533:5:
+ *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aWindowFuncs)) + 816 /* .xSFunc */)) = noopStepFunc // sqlite3.c:155534:5:
+ *(*func(*libc.TLS, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aWindowFuncs)) + 824 /* .xFinalize */)) = noopValueFunc // sqlite3.c:155534:5:
+ *(*func(*libc.TLS, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aWindowFuncs)) + 832 /* .xValue */)) = noopValueFunc // sqlite3.c:155534:5:
+ *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aWindowFuncs)) + 840 /* .xInverse */)) = noopStepFunc // sqlite3.c:155534:5:
+ *(*uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&aWindowFuncs)) + 848 /* .zName */)) = uintptr(unsafe.Pointer(&leadName)) // sqlite3.c:155534:5:
+ *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aWindowFuncs)) + 888 /* .xSFunc */)) = noopStepFunc // sqlite3.c:155535:5:
+ *(*func(*libc.TLS, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aWindowFuncs)) + 896 /* .xFinalize */)) = noopValueFunc // sqlite3.c:155535:5:
+ *(*func(*libc.TLS, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aWindowFuncs)) + 904 /* .xValue */)) = noopValueFunc // sqlite3.c:155535:5:
+ *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aWindowFuncs)) + 912 /* .xInverse */)) = noopStepFunc // sqlite3.c:155535:5:
+ *(*uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&aWindowFuncs)) + 920 /* .zName */)) = uintptr(unsafe.Pointer(&lagName)) // sqlite3.c:155535:5:
+ *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aWindowFuncs)) + 960 /* .xSFunc */)) = noopStepFunc // sqlite3.c:155536:5:
+ *(*func(*libc.TLS, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aWindowFuncs)) + 968 /* .xFinalize */)) = noopValueFunc // sqlite3.c:155536:5:
+ *(*func(*libc.TLS, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aWindowFuncs)) + 976 /* .xValue */)) = noopValueFunc // sqlite3.c:155536:5:
+ *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aWindowFuncs)) + 984 /* .xInverse */)) = noopStepFunc // sqlite3.c:155536:5:
+ *(*uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&aWindowFuncs)) + 992 /* .zName */)) = uintptr(unsafe.Pointer(&lagName)) // sqlite3.c:155536:5:
+ *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aWindowFuncs)) + 1032 /* .xSFunc */)) = noopStepFunc // sqlite3.c:155537:5:
+ *(*func(*libc.TLS, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aWindowFuncs)) + 1040 /* .xFinalize */)) = noopValueFunc // sqlite3.c:155537:5:
+ *(*func(*libc.TLS, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aWindowFuncs)) + 1048 /* .xValue */)) = noopValueFunc // sqlite3.c:155537:5:
+ *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aWindowFuncs)) + 1056 /* .xInverse */)) = noopStepFunc // sqlite3.c:155537:5:
+ *(*uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&aWindowFuncs)) + 1064 /* .zName */)) = uintptr(unsafe.Pointer(&lagName)) // sqlite3.c:155537:5:
+ *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&attach_func)) + 24 /* .xSFunc */)) = attachFunc // sqlite3.c:111969:5:
+ *(*func(*libc.TLS, int32) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&defaultMethods)) + 0 /* .xMalloc */)) = sqlite3MemMalloc // sqlite3.c:24299:6:
+ *(*func(*libc.TLS, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&defaultMethods)) + 8 /* .xFree */)) = sqlite3MemFree // sqlite3.c:24300:6:
+ *(*func(*libc.TLS, uintptr, int32) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&defaultMethods)) + 16 /* .xRealloc */)) = sqlite3MemRealloc // sqlite3.c:24301:6:
+ *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&defaultMethods)) + 24 /* .xSize */)) = sqlite3MemSize // sqlite3.c:24302:6:
+ *(*func(*libc.TLS, int32) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&defaultMethods)) + 32 /* .xRoundup */)) = sqlite3MemRoundup // sqlite3.c:24303:6:
+ *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&defaultMethods)) + 40 /* .xInit */)) = sqlite3MemInit // sqlite3.c:24304:6:
+ *(*func(*libc.TLS, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&defaultMethods)) + 48 /* .xShutdown */)) = sqlite3MemShutdown // sqlite3.c:24305:6:
+ *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&defaultMethods1)) + 16 /* .xInit */)) = pcache1Init // sqlite3.c:51891:5:
+ *(*func(*libc.TLS, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&defaultMethods1)) + 24 /* .xShutdown */)) = pcache1Shutdown // sqlite3.c:51892:5:
+ *(*func(*libc.TLS, int32, int32, int32) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&defaultMethods1)) + 32 /* .xCreate */)) = pcache1Create // sqlite3.c:51893:5:
+ *(*func(*libc.TLS, uintptr, int32))(unsafe.Pointer(uintptr(unsafe.Pointer(&defaultMethods1)) + 40 /* .xCachesize */)) = pcache1Cachesize // sqlite3.c:51894:5:
+ *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&defaultMethods1)) + 48 /* .xPagecount */)) = pcache1Pagecount // sqlite3.c:51895:5:
+ *(*func(*libc.TLS, uintptr, uint32, int32) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&defaultMethods1)) + 56 /* .xFetch */)) = pcache1Fetch // sqlite3.c:51896:5:
+ *(*func(*libc.TLS, uintptr, uintptr, int32))(unsafe.Pointer(uintptr(unsafe.Pointer(&defaultMethods1)) + 64 /* .xUnpin */)) = pcache1Unpin // sqlite3.c:51897:5:
+ *(*func(*libc.TLS, uintptr, uintptr, uint32, uint32))(unsafe.Pointer(uintptr(unsafe.Pointer(&defaultMethods1)) + 72 /* .xRekey */)) = pcache1Rekey // sqlite3.c:51898:5:
+ *(*func(*libc.TLS, uintptr, uint32))(unsafe.Pointer(uintptr(unsafe.Pointer(&defaultMethods1)) + 80 /* .xTruncate */)) = pcache1Truncate // sqlite3.c:51899:5:
+ *(*func(*libc.TLS, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&defaultMethods1)) + 88 /* .xDestroy */)) = pcache1Destroy // sqlite3.c:51900:5:
+ *(*func(*libc.TLS, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&defaultMethods1)) + 96 /* .xShrink */)) = pcache1Shrink // sqlite3.c:51901:5:
+ *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&detach_func)) + 24 /* .xSFunc */)) = detachFunc // sqlite3.c:111949:5:
+ *(*func(*libc.TLS, uintptr, uintptr) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&dotlockIoFinder)) + 0)) = dotlockIoFinderImpl // sqlite3.c:39472:1:
+ *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&dotlockIoMethods)) + 8 /* .xClose */)) = dotlockClose // sqlite3.c:39472:1:
+ *(*func(*libc.TLS, uintptr, uintptr, int32, Sqlite3_int64) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&dotlockIoMethods)) + 16 /* .xRead */)) = unixRead // sqlite3.c:39472:1:
+ *(*func(*libc.TLS, uintptr, uintptr, int32, Sqlite3_int64) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&dotlockIoMethods)) + 24 /* .xWrite */)) = unixWrite // sqlite3.c:39472:1:
+ *(*func(*libc.TLS, uintptr, I64) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&dotlockIoMethods)) + 32 /* .xTruncate */)) = unixTruncate // sqlite3.c:39472:1:
+ *(*func(*libc.TLS, uintptr, int32) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&dotlockIoMethods)) + 40 /* .xSync */)) = unixSync // sqlite3.c:39472:1:
+ *(*func(*libc.TLS, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&dotlockIoMethods)) + 48 /* .xFileSize */)) = unixFileSize // sqlite3.c:39472:1:
+ *(*func(*libc.TLS, uintptr, int32) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&dotlockIoMethods)) + 56 /* .xLock */)) = dotlockLock // sqlite3.c:39472:1:
+ *(*func(*libc.TLS, uintptr, int32) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&dotlockIoMethods)) + 64 /* .xUnlock */)) = dotlockUnlock // sqlite3.c:39472:1:
+ *(*func(*libc.TLS, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&dotlockIoMethods)) + 72 /* .xCheckReservedLock */)) = dotlockCheckReservedLock // sqlite3.c:39472:1:
+ *(*func(*libc.TLS, uintptr, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&dotlockIoMethods)) + 80 /* .xFileControl */)) = unixFileControl // sqlite3.c:39472:1:
+ *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&dotlockIoMethods)) + 88 /* .xSectorSize */)) = unixSectorSize // sqlite3.c:39472:1:
+ *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&dotlockIoMethods)) + 96 /* .xDeviceCharacteristics */)) = unixDeviceCharacteristics // sqlite3.c:39472:1:
+ *(*func(*libc.TLS, uintptr, int32, int32, int32) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&dotlockIoMethods)) + 112 /* .xShmLock */)) = unixShmLock // sqlite3.c:39472:1:
+ *(*func(*libc.TLS, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&dotlockIoMethods)) + 120 /* .xShmBarrier */)) = unixShmBarrier // sqlite3.c:39472:1:
+ *(*func(*libc.TLS, uintptr, int32) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&dotlockIoMethods)) + 128 /* .xShmUnmap */)) = unixShmUnmap // sqlite3.c:39472:1:
+ *(*func(*libc.TLS, uintptr, I64, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&dotlockIoMethods)) + 136 /* .xFetch */)) = unixFetch // sqlite3.c:39472:1:
+ *(*func(*libc.TLS, uintptr, I64, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&dotlockIoMethods)) + 144 /* .xUnfetch */)) = unixUnfetch // sqlite3.c:39472:1:
+ *(*func(*libc.TLS, uintptr, uintptr, int32, uintptr, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&fts5Mod)) + 8 /* .xCreate */)) = fts5CreateMethod // sqlite3.c:230606:25:
+ *(*func(*libc.TLS, uintptr, uintptr, int32, uintptr, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&fts5Mod)) + 16 /* .xConnect */)) = fts5ConnectMethod // sqlite3.c:230607:25:
+ *(*func(*libc.TLS, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&fts5Mod)) + 24 /* .xBestIndex */)) = fts5BestIndexMethod // sqlite3.c:230608:25:
+ *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&fts5Mod)) + 32 /* .xDisconnect */)) = fts5DisconnectMethod // sqlite3.c:230609:25:
+ *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&fts5Mod)) + 40 /* .xDestroy */)) = fts5DestroyMethod // sqlite3.c:230610:25:
+ *(*func(*libc.TLS, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&fts5Mod)) + 48 /* .xOpen */)) = fts5OpenMethod // sqlite3.c:230611:25:
+ *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&fts5Mod)) + 56 /* .xClose */)) = fts5CloseMethod // sqlite3.c:230612:25:
+ *(*func(*libc.TLS, uintptr, int32, uintptr, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&fts5Mod)) + 64 /* .xFilter */)) = fts5FilterMethod // sqlite3.c:230613:25:
+ *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&fts5Mod)) + 72 /* .xNext */)) = fts5NextMethod // sqlite3.c:230614:25:
+ *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&fts5Mod)) + 80 /* .xEof */)) = fts5EofMethod // sqlite3.c:230615:25:
+ *(*func(*libc.TLS, uintptr, uintptr, int32) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&fts5Mod)) + 88 /* .xColumn */)) = fts5ColumnMethod // sqlite3.c:230616:25:
+ *(*func(*libc.TLS, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&fts5Mod)) + 96 /* .xRowid */)) = fts5RowidMethod // sqlite3.c:230617:25:
+ *(*func(*libc.TLS, uintptr, int32, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&fts5Mod)) + 104 /* .xUpdate */)) = fts5UpdateMethod // sqlite3.c:230618:25:
+ *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&fts5Mod)) + 112 /* .xBegin */)) = fts5BeginMethod // sqlite3.c:230619:25:
+ *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&fts5Mod)) + 120 /* .xSync */)) = fts5SyncMethod // sqlite3.c:230620:25:
+ *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&fts5Mod)) + 128 /* .xCommit */)) = fts5CommitMethod // sqlite3.c:230621:25:
+ *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&fts5Mod)) + 136 /* .xRollback */)) = fts5RollbackMethod // sqlite3.c:230622:25:
+ *(*func(*libc.TLS, uintptr, int32, uintptr, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&fts5Mod)) + 144 /* .xFindFunction */)) = fts5FindFunctionMethod // sqlite3.c:230623:25:
+ *(*func(*libc.TLS, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&fts5Mod)) + 152 /* .xRename */)) = fts5RenameMethod // sqlite3.c:230624:25:
+ *(*func(*libc.TLS, uintptr, int32) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&fts5Mod)) + 160 /* .xSavepoint */)) = fts5SavepointMethod // sqlite3.c:230625:25:
+ *(*func(*libc.TLS, uintptr, int32) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&fts5Mod)) + 168 /* .xRelease */)) = fts5ReleaseMethod // sqlite3.c:230626:25:
+ *(*func(*libc.TLS, uintptr, int32) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&fts5Mod)) + 176 /* .xRollbackTo */)) = fts5RollbackToMethod // sqlite3.c:230627:25:
+ *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&fts5Mod)) + 184 /* .xShadowName */)) = fts5ShadowName // sqlite3.c:230628:25:
+ *(*func(*libc.TLS, uintptr, uintptr, int32, uintptr, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&fts5Vocab)) + 8 /* .xCreate */)) = fts5VocabCreateMethod // sqlite3.c:235174:25:
+ *(*func(*libc.TLS, uintptr, uintptr, int32, uintptr, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&fts5Vocab)) + 16 /* .xConnect */)) = fts5VocabConnectMethod // sqlite3.c:235175:25:
+ *(*func(*libc.TLS, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&fts5Vocab)) + 24 /* .xBestIndex */)) = fts5VocabBestIndexMethod // sqlite3.c:235176:25:
+ *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&fts5Vocab)) + 32 /* .xDisconnect */)) = fts5VocabDisconnectMethod // sqlite3.c:235177:25:
+ *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&fts5Vocab)) + 40 /* .xDestroy */)) = fts5VocabDestroyMethod // sqlite3.c:235178:25:
+ *(*func(*libc.TLS, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&fts5Vocab)) + 48 /* .xOpen */)) = fts5VocabOpenMethod // sqlite3.c:235179:25:
+ *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&fts5Vocab)) + 56 /* .xClose */)) = fts5VocabCloseMethod // sqlite3.c:235180:25:
+ *(*func(*libc.TLS, uintptr, int32, uintptr, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&fts5Vocab)) + 64 /* .xFilter */)) = fts5VocabFilterMethod // sqlite3.c:235181:25:
+ *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&fts5Vocab)) + 72 /* .xNext */)) = fts5VocabNextMethod // sqlite3.c:235182:25:
+ *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&fts5Vocab)) + 80 /* .xEof */)) = fts5VocabEofMethod // sqlite3.c:235183:25:
+ *(*func(*libc.TLS, uintptr, uintptr, int32) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&fts5Vocab)) + 88 /* .xColumn */)) = fts5VocabColumnMethod // sqlite3.c:235184:25:
+ *(*func(*libc.TLS, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&fts5Vocab)) + 96 /* .xRowid */)) = fts5VocabRowidMethod // sqlite3.c:235185:25:
+ *(*func(*libc.TLS, uintptr, uintptr, int32, uintptr, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&geopolyModule)) + 8 /* .xCreate */)) = geopolyCreate // sqlite3.c:198384:3:
+ *(*func(*libc.TLS, uintptr, uintptr, int32, uintptr, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&geopolyModule)) + 16 /* .xConnect */)) = geopolyConnect // sqlite3.c:198385:3:
+ *(*func(*libc.TLS, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&geopolyModule)) + 24 /* .xBestIndex */)) = geopolyBestIndex // sqlite3.c:198386:3:
+ *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&geopolyModule)) + 32 /* .xDisconnect */)) = rtreeDisconnect // sqlite3.c:198387:3:
+ *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&geopolyModule)) + 40 /* .xDestroy */)) = rtreeDestroy // sqlite3.c:198388:3:
+ *(*func(*libc.TLS, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&geopolyModule)) + 48 /* .xOpen */)) = rtreeOpen // sqlite3.c:198389:3:
+ *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&geopolyModule)) + 56 /* .xClose */)) = rtreeClose // sqlite3.c:198390:3:
+ *(*func(*libc.TLS, uintptr, int32, uintptr, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&geopolyModule)) + 64 /* .xFilter */)) = geopolyFilter // sqlite3.c:198391:3:
+ *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&geopolyModule)) + 72 /* .xNext */)) = rtreeNext // sqlite3.c:198392:3:
+ *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&geopolyModule)) + 80 /* .xEof */)) = rtreeEof // sqlite3.c:198393:3:
+ *(*func(*libc.TLS, uintptr, uintptr, int32) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&geopolyModule)) + 88 /* .xColumn */)) = geopolyColumn // sqlite3.c:198394:3:
+ *(*func(*libc.TLS, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&geopolyModule)) + 96 /* .xRowid */)) = rtreeRowid // sqlite3.c:198395:3:
+ *(*func(*libc.TLS, uintptr, int32, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&geopolyModule)) + 104 /* .xUpdate */)) = geopolyUpdate // sqlite3.c:198396:3:
+ *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&geopolyModule)) + 112 /* .xBegin */)) = rtreeBeginTransaction // sqlite3.c:198397:3:
+ *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&geopolyModule)) + 120 /* .xSync */)) = rtreeEndTransaction // sqlite3.c:198398:3:
+ *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&geopolyModule)) + 128 /* .xCommit */)) = rtreeEndTransaction // sqlite3.c:198399:3:
+ *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&geopolyModule)) + 136 /* .xRollback */)) = rtreeEndTransaction // sqlite3.c:198400:3:
+ *(*func(*libc.TLS, uintptr, int32, uintptr, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&geopolyModule)) + 144 /* .xFindFunction */)) = geopolyFindFunction // sqlite3.c:198401:3:
+ *(*func(*libc.TLS, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&geopolyModule)) + 152 /* .xRename */)) = rtreeRename // sqlite3.c:198402:3:
+ *(*func(*libc.TLS, uintptr, int32) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&geopolyModule)) + 160 /* .xSavepoint */)) = rtreeSavepoint // sqlite3.c:198403:3:
+ *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&geopolyModule)) + 184 /* .xShadowName */)) = rtreeShadowName // sqlite3.c:198406:3:
+ *(*func(*libc.TLS, uintptr, uintptr, int32, uintptr, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&jsonEachModule)) + 16 /* .xConnect */)) = jsonEachConnect // sqlite3.c:192115:3:
+ *(*func(*libc.TLS, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&jsonEachModule)) + 24 /* .xBestIndex */)) = jsonEachBestIndex // sqlite3.c:192116:3:
+ *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&jsonEachModule)) + 32 /* .xDisconnect */)) = jsonEachDisconnect // sqlite3.c:192117:3:
+ *(*func(*libc.TLS, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&jsonEachModule)) + 48 /* .xOpen */)) = jsonEachOpenEach // sqlite3.c:192119:3:
+ *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&jsonEachModule)) + 56 /* .xClose */)) = jsonEachClose // sqlite3.c:192120:3:
+ *(*func(*libc.TLS, uintptr, int32, uintptr, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&jsonEachModule)) + 64 /* .xFilter */)) = jsonEachFilter // sqlite3.c:192121:3:
+ *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&jsonEachModule)) + 72 /* .xNext */)) = jsonEachNext // sqlite3.c:192122:3:
+ *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&jsonEachModule)) + 80 /* .xEof */)) = jsonEachEof // sqlite3.c:192123:3:
+ *(*func(*libc.TLS, uintptr, uintptr, int32) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&jsonEachModule)) + 88 /* .xColumn */)) = jsonEachColumn // sqlite3.c:192124:3:
+ *(*func(*libc.TLS, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&jsonEachModule)) + 96 /* .xRowid */)) = jsonEachRowid // sqlite3.c:192125:3:
+ *(*func(*libc.TLS, uintptr, uintptr, int32, uintptr, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&jsonTreeModule)) + 16 /* .xConnect */)) = jsonEachConnect // sqlite3.c:192143:3:
+ *(*func(*libc.TLS, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&jsonTreeModule)) + 24 /* .xBestIndex */)) = jsonEachBestIndex // sqlite3.c:192144:3:
+ *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&jsonTreeModule)) + 32 /* .xDisconnect */)) = jsonEachDisconnect // sqlite3.c:192145:3:
+ *(*func(*libc.TLS, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&jsonTreeModule)) + 48 /* .xOpen */)) = jsonEachOpenTree // sqlite3.c:192147:3:
+ *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&jsonTreeModule)) + 56 /* .xClose */)) = jsonEachClose // sqlite3.c:192148:3:
+ *(*func(*libc.TLS, uintptr, int32, uintptr, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&jsonTreeModule)) + 64 /* .xFilter */)) = jsonEachFilter // sqlite3.c:192149:3:
+ *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&jsonTreeModule)) + 72 /* .xNext */)) = jsonEachNext // sqlite3.c:192150:3:
+ *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&jsonTreeModule)) + 80 /* .xEof */)) = jsonEachEof // sqlite3.c:192151:3:
+ *(*func(*libc.TLS, uintptr, uintptr, int32) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&jsonTreeModule)) + 88 /* .xColumn */)) = jsonEachColumn // sqlite3.c:192152:3:
+ *(*func(*libc.TLS, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&jsonTreeModule)) + 96 /* .xRowid */)) = jsonEachRowid // sqlite3.c:192153:3:
+ *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&memdb_io_methods)) + 8 /* .xClose */)) = memdbClose // sqlite3.c:48683:3:
+ *(*func(*libc.TLS, uintptr, uintptr, int32, Sqlite3_int64) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&memdb_io_methods)) + 16 /* .xRead */)) = memdbRead // sqlite3.c:48684:3:
+ *(*func(*libc.TLS, uintptr, uintptr, int32, Sqlite3_int64) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&memdb_io_methods)) + 24 /* .xWrite */)) = memdbWrite // sqlite3.c:48685:3:
+ *(*func(*libc.TLS, uintptr, Sqlite3_int64) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&memdb_io_methods)) + 32 /* .xTruncate */)) = memdbTruncate // sqlite3.c:48686:3:
+ *(*func(*libc.TLS, uintptr, int32) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&memdb_io_methods)) + 40 /* .xSync */)) = memdbSync // sqlite3.c:48687:3:
+ *(*func(*libc.TLS, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&memdb_io_methods)) + 48 /* .xFileSize */)) = memdbFileSize // sqlite3.c:48688:3:
+ *(*func(*libc.TLS, uintptr, int32) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&memdb_io_methods)) + 56 /* .xLock */)) = memdbLock // sqlite3.c:48689:3:
+ *(*func(*libc.TLS, uintptr, int32) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&memdb_io_methods)) + 64 /* .xUnlock */)) = memdbLock // sqlite3.c:48690:3:
+ *(*func(*libc.TLS, uintptr, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&memdb_io_methods)) + 80 /* .xFileControl */)) = memdbFileControl // sqlite3.c:48692:3:
+ *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&memdb_io_methods)) + 96 /* .xDeviceCharacteristics */)) = memdbDeviceCharacteristics // sqlite3.c:48694:3:
+ *(*func(*libc.TLS, uintptr, Sqlite3_int64, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&memdb_io_methods)) + 136 /* .xFetch */)) = memdbFetch // sqlite3.c:48699:3:
+ *(*func(*libc.TLS, uintptr, Sqlite3_int64, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&memdb_io_methods)) + 144 /* .xUnfetch */)) = memdbUnfetch // sqlite3.c:48700:3:
+ *(*func(*libc.TLS, uintptr, uintptr, uintptr, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&memdb_vfs)) + 40 /* .xOpen */)) = memdbOpen // sqlite3.c:48663:3:
+ *(*func(*libc.TLS, uintptr, uintptr, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&memdb_vfs)) + 56 /* .xAccess */)) = memdbAccess // sqlite3.c:48665:3:
+ *(*func(*libc.TLS, uintptr, uintptr, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&memdb_vfs)) + 64 /* .xFullPathname */)) = memdbFullPathname // sqlite3.c:48666:3:
+ *(*func(*libc.TLS, uintptr, uintptr) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&memdb_vfs)) + 72 /* .xDlOpen */)) = memdbDlOpen // sqlite3.c:48667:3:
+ *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&memdb_vfs)) + 80 /* .xDlError */)) = memdbDlError // sqlite3.c:48668:3:
+ *(*func(*libc.TLS, uintptr, uintptr, uintptr) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&memdb_vfs)) + 88 /* .xDlSym */)) = memdbDlSym // sqlite3.c:48669:3:
+ *(*func(*libc.TLS, uintptr, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&memdb_vfs)) + 96 /* .xDlClose */)) = memdbDlClose // sqlite3.c:48670:3:
+ *(*func(*libc.TLS, uintptr, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&memdb_vfs)) + 104 /* .xRandomness */)) = memdbRandomness // sqlite3.c:48671:3:
+ *(*func(*libc.TLS, uintptr, int32) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&memdb_vfs)) + 112 /* .xSleep */)) = memdbSleep // sqlite3.c:48672:3:
+ *(*func(*libc.TLS, uintptr, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&memdb_vfs)) + 128 /* .xGetLastError */)) = memdbGetLastError // sqlite3.c:48674:3:
+ *(*func(*libc.TLS, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&memdb_vfs)) + 136 /* .xCurrentTimeInt64 */)) = memdbCurrentTimeInt64 // sqlite3.c:48675:3:
+ *(*func(*libc.TLS, uintptr, uintptr) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&nolockIoFinder)) + 0)) = nolockIoFinderImpl // sqlite3.c:39462:1:
+ *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&nolockIoMethods)) + 8 /* .xClose */)) = nolockClose // sqlite3.c:39462:1:
+ *(*func(*libc.TLS, uintptr, uintptr, int32, Sqlite3_int64) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&nolockIoMethods)) + 16 /* .xRead */)) = unixRead // sqlite3.c:39462:1:
+ *(*func(*libc.TLS, uintptr, uintptr, int32, Sqlite3_int64) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&nolockIoMethods)) + 24 /* .xWrite */)) = unixWrite // sqlite3.c:39462:1:
+ *(*func(*libc.TLS, uintptr, I64) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&nolockIoMethods)) + 32 /* .xTruncate */)) = unixTruncate // sqlite3.c:39462:1:
+ *(*func(*libc.TLS, uintptr, int32) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&nolockIoMethods)) + 40 /* .xSync */)) = unixSync // sqlite3.c:39462:1:
+ *(*func(*libc.TLS, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&nolockIoMethods)) + 48 /* .xFileSize */)) = unixFileSize // sqlite3.c:39462:1:
+ *(*func(*libc.TLS, uintptr, int32) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&nolockIoMethods)) + 56 /* .xLock */)) = nolockLock // sqlite3.c:39462:1:
+ *(*func(*libc.TLS, uintptr, int32) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&nolockIoMethods)) + 64 /* .xUnlock */)) = nolockUnlock // sqlite3.c:39462:1:
+ *(*func(*libc.TLS, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&nolockIoMethods)) + 72 /* .xCheckReservedLock */)) = nolockCheckReservedLock // sqlite3.c:39462:1:
+ *(*func(*libc.TLS, uintptr, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&nolockIoMethods)) + 80 /* .xFileControl */)) = unixFileControl // sqlite3.c:39462:1:
+ *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&nolockIoMethods)) + 88 /* .xSectorSize */)) = unixSectorSize // sqlite3.c:39462:1:
+ *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&nolockIoMethods)) + 96 /* .xDeviceCharacteristics */)) = unixDeviceCharacteristics // sqlite3.c:39462:1:
+ *(*func(*libc.TLS, uintptr, int32, int32, int32) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&nolockIoMethods)) + 112 /* .xShmLock */)) = unixShmLock // sqlite3.c:39462:1:
+ *(*func(*libc.TLS, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&nolockIoMethods)) + 120 /* .xShmBarrier */)) = unixShmBarrier // sqlite3.c:39462:1:
+ *(*func(*libc.TLS, uintptr, int32) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&nolockIoMethods)) + 128 /* .xShmUnmap */)) = unixShmUnmap // sqlite3.c:39462:1:
+ *(*func(*libc.TLS, uintptr, I64, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&nolockIoMethods)) + 136 /* .xFetch */)) = unixFetch // sqlite3.c:39462:1:
+ *(*func(*libc.TLS, uintptr, I64, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&nolockIoMethods)) + 144 /* .xUnfetch */)) = unixUnfetch // sqlite3.c:39462:1:
+ *(*func(*libc.TLS, uintptr, uintptr) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&posixIoFinder)) + 0)) = posixIoFinderImpl // sqlite3.c:39452:1:
+ *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&posixIoMethods)) + 8 /* .xClose */)) = unixClose // sqlite3.c:39452:1:
+ *(*func(*libc.TLS, uintptr, uintptr, int32, Sqlite3_int64) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&posixIoMethods)) + 16 /* .xRead */)) = unixRead // sqlite3.c:39452:1:
+ *(*func(*libc.TLS, uintptr, uintptr, int32, Sqlite3_int64) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&posixIoMethods)) + 24 /* .xWrite */)) = unixWrite // sqlite3.c:39452:1:
+ *(*func(*libc.TLS, uintptr, I64) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&posixIoMethods)) + 32 /* .xTruncate */)) = unixTruncate // sqlite3.c:39452:1:
+ *(*func(*libc.TLS, uintptr, int32) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&posixIoMethods)) + 40 /* .xSync */)) = unixSync // sqlite3.c:39452:1:
+ *(*func(*libc.TLS, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&posixIoMethods)) + 48 /* .xFileSize */)) = unixFileSize // sqlite3.c:39452:1:
+ *(*func(*libc.TLS, uintptr, int32) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&posixIoMethods)) + 56 /* .xLock */)) = unixLock // sqlite3.c:39452:1:
+ *(*func(*libc.TLS, uintptr, int32) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&posixIoMethods)) + 64 /* .xUnlock */)) = unixUnlock // sqlite3.c:39452:1:
+ *(*func(*libc.TLS, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&posixIoMethods)) + 72 /* .xCheckReservedLock */)) = unixCheckReservedLock // sqlite3.c:39452:1:
+ *(*func(*libc.TLS, uintptr, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&posixIoMethods)) + 80 /* .xFileControl */)) = unixFileControl // sqlite3.c:39452:1:
+ *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&posixIoMethods)) + 88 /* .xSectorSize */)) = unixSectorSize // sqlite3.c:39452:1:
+ *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&posixIoMethods)) + 96 /* .xDeviceCharacteristics */)) = unixDeviceCharacteristics // sqlite3.c:39452:1:
+ *(*func(*libc.TLS, uintptr, int32, int32, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&posixIoMethods)) + 104 /* .xShmMap */)) = unixShmMap // sqlite3.c:39452:1:
+ *(*func(*libc.TLS, uintptr, int32, int32, int32) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&posixIoMethods)) + 112 /* .xShmLock */)) = unixShmLock // sqlite3.c:39452:1:
+ *(*func(*libc.TLS, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&posixIoMethods)) + 120 /* .xShmBarrier */)) = unixShmBarrier // sqlite3.c:39452:1:
+ *(*func(*libc.TLS, uintptr, int32) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&posixIoMethods)) + 128 /* .xShmUnmap */)) = unixShmUnmap // sqlite3.c:39452:1:
+ *(*func(*libc.TLS, uintptr, I64, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&posixIoMethods)) + 136 /* .xFetch */)) = unixFetch // sqlite3.c:39452:1:
+ *(*func(*libc.TLS, uintptr, I64, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&posixIoMethods)) + 144 /* .xUnfetch */)) = unixUnfetch // sqlite3.c:39452:1:
+ *(*func(*libc.TLS, uintptr, uintptr, int32, uintptr, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&pragmaVtabModule)) + 16 /* .xConnect */)) = pragmaVtabConnect // sqlite3.c:131005:3:
+ *(*func(*libc.TLS, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&pragmaVtabModule)) + 24 /* .xBestIndex */)) = pragmaVtabBestIndex // sqlite3.c:131006:3:
+ *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&pragmaVtabModule)) + 32 /* .xDisconnect */)) = pragmaVtabDisconnect // sqlite3.c:131007:3:
+ *(*func(*libc.TLS, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&pragmaVtabModule)) + 48 /* .xOpen */)) = pragmaVtabOpen // sqlite3.c:131009:3:
+ *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&pragmaVtabModule)) + 56 /* .xClose */)) = pragmaVtabClose // sqlite3.c:131010:3:
+ *(*func(*libc.TLS, uintptr, int32, uintptr, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&pragmaVtabModule)) + 64 /* .xFilter */)) = pragmaVtabFilter // sqlite3.c:131011:3:
+ *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&pragmaVtabModule)) + 72 /* .xNext */)) = pragmaVtabNext // sqlite3.c:131012:3:
+ *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&pragmaVtabModule)) + 80 /* .xEof */)) = pragmaVtabEof // sqlite3.c:131013:3:
+ *(*func(*libc.TLS, uintptr, uintptr, int32) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&pragmaVtabModule)) + 88 /* .xColumn */)) = pragmaVtabColumn // sqlite3.c:131014:3:
+ *(*func(*libc.TLS, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&pragmaVtabModule)) + 96 /* .xRowid */)) = pragmaVtabRowid // sqlite3.c:131015:3:
+ *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&rbuvfs_io_methods)) + 8 /* .xClose */)) = rbuVfsClose // sqlite3.c:205026:5:
+ *(*func(*libc.TLS, uintptr, uintptr, int32, Sqlite_int64) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&rbuvfs_io_methods)) + 16 /* .xRead */)) = rbuVfsRead // sqlite3.c:205027:5:
+ *(*func(*libc.TLS, uintptr, uintptr, int32, Sqlite_int64) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&rbuvfs_io_methods)) + 24 /* .xWrite */)) = rbuVfsWrite // sqlite3.c:205028:5:
+ *(*func(*libc.TLS, uintptr, Sqlite_int64) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&rbuvfs_io_methods)) + 32 /* .xTruncate */)) = rbuVfsTruncate // sqlite3.c:205029:5:
+ *(*func(*libc.TLS, uintptr, int32) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&rbuvfs_io_methods)) + 40 /* .xSync */)) = rbuVfsSync // sqlite3.c:205030:5:
+ *(*func(*libc.TLS, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&rbuvfs_io_methods)) + 48 /* .xFileSize */)) = rbuVfsFileSize // sqlite3.c:205031:5:
+ *(*func(*libc.TLS, uintptr, int32) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&rbuvfs_io_methods)) + 56 /* .xLock */)) = rbuVfsLock // sqlite3.c:205032:5:
+ *(*func(*libc.TLS, uintptr, int32) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&rbuvfs_io_methods)) + 64 /* .xUnlock */)) = rbuVfsUnlock // sqlite3.c:205033:5:
+ *(*func(*libc.TLS, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&rbuvfs_io_methods)) + 72 /* .xCheckReservedLock */)) = rbuVfsCheckReservedLock // sqlite3.c:205034:5:
+ *(*func(*libc.TLS, uintptr, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&rbuvfs_io_methods)) + 80 /* .xFileControl */)) = rbuVfsFileControl // sqlite3.c:205035:5:
+ *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&rbuvfs_io_methods)) + 88 /* .xSectorSize */)) = rbuVfsSectorSize // sqlite3.c:205036:5:
+ *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&rbuvfs_io_methods)) + 96 /* .xDeviceCharacteristics */)) = rbuVfsDeviceCharacteristics // sqlite3.c:205037:5:
+ *(*func(*libc.TLS, uintptr, int32, int32, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&rbuvfs_io_methods)) + 104 /* .xShmMap */)) = rbuVfsShmMap // sqlite3.c:205038:5:
+ *(*func(*libc.TLS, uintptr, int32, int32, int32) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&rbuvfs_io_methods)) + 112 /* .xShmLock */)) = rbuVfsShmLock // sqlite3.c:205039:5:
+ *(*func(*libc.TLS, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&rbuvfs_io_methods)) + 120 /* .xShmBarrier */)) = rbuVfsShmBarrier // sqlite3.c:205040:5:
+ *(*func(*libc.TLS, uintptr, int32) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&rbuvfs_io_methods)) + 128 /* .xShmUnmap */)) = rbuVfsShmUnmap // sqlite3.c:205041:5:
+ *(*func(*libc.TLS, uintptr, uintptr, int32, uintptr, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&rtreeModule)) + 8 /* .xCreate */)) = rtreeCreate // sqlite3.c:195728:3:
+ *(*func(*libc.TLS, uintptr, uintptr, int32, uintptr, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&rtreeModule)) + 16 /* .xConnect */)) = rtreeConnect // sqlite3.c:195729:3:
+ *(*func(*libc.TLS, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&rtreeModule)) + 24 /* .xBestIndex */)) = rtreeBestIndex // sqlite3.c:195730:3:
+ *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&rtreeModule)) + 32 /* .xDisconnect */)) = rtreeDisconnect // sqlite3.c:195731:3:
+ *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&rtreeModule)) + 40 /* .xDestroy */)) = rtreeDestroy // sqlite3.c:195732:3:
+ *(*func(*libc.TLS, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&rtreeModule)) + 48 /* .xOpen */)) = rtreeOpen // sqlite3.c:195733:3:
+ *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&rtreeModule)) + 56 /* .xClose */)) = rtreeClose // sqlite3.c:195734:3:
+ *(*func(*libc.TLS, uintptr, int32, uintptr, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&rtreeModule)) + 64 /* .xFilter */)) = rtreeFilter // sqlite3.c:195735:3:
+ *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&rtreeModule)) + 72 /* .xNext */)) = rtreeNext // sqlite3.c:195736:3:
+ *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&rtreeModule)) + 80 /* .xEof */)) = rtreeEof // sqlite3.c:195737:3:
+ *(*func(*libc.TLS, uintptr, uintptr, int32) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&rtreeModule)) + 88 /* .xColumn */)) = rtreeColumn // sqlite3.c:195738:3:
+ *(*func(*libc.TLS, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&rtreeModule)) + 96 /* .xRowid */)) = rtreeRowid // sqlite3.c:195739:3:
+ *(*func(*libc.TLS, uintptr, int32, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&rtreeModule)) + 104 /* .xUpdate */)) = rtreeUpdate // sqlite3.c:195740:3:
+ *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&rtreeModule)) + 112 /* .xBegin */)) = rtreeBeginTransaction // sqlite3.c:195741:3:
+ *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&rtreeModule)) + 120 /* .xSync */)) = rtreeEndTransaction // sqlite3.c:195742:3:
+ *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&rtreeModule)) + 128 /* .xCommit */)) = rtreeEndTransaction // sqlite3.c:195743:3:
+ *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&rtreeModule)) + 136 /* .xRollback */)) = rtreeEndTransaction // sqlite3.c:195744:3:
+ *(*func(*libc.TLS, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&rtreeModule)) + 152 /* .xRename */)) = rtreeRename // sqlite3.c:195746:3:
+ *(*func(*libc.TLS, uintptr, int32) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&rtreeModule)) + 160 /* .xSavepoint */)) = rtreeSavepoint // sqlite3.c:195747:3:
+ *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&rtreeModule)) + 184 /* .xShadowName */)) = rtreeShadowName // sqlite3.c:195750:3:
+ *(*func(*libc.TLS, uintptr) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&sFts5Api)) + 8 /* .xUserData */)) = fts5ApiUserData // sqlite3.c:230065:3:
+ *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sFts5Api)) + 16 /* .xColumnCount */)) = fts5ApiColumnCount // sqlite3.c:230066:3:
+ *(*func(*libc.TLS, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sFts5Api)) + 24 /* .xRowCount */)) = fts5ApiRowCount // sqlite3.c:230067:3:
+ *(*func(*libc.TLS, uintptr, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sFts5Api)) + 32 /* .xColumnTotalSize */)) = fts5ApiColumnTotalSize // sqlite3.c:230068:3:
+ *(*func(*libc.TLS, uintptr, uintptr, int32, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sFts5Api)) + 40 /* .xTokenize */)) = fts5ApiTokenize // sqlite3.c:230069:3:
+ *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sFts5Api)) + 48 /* .xPhraseCount */)) = fts5ApiPhraseCount // sqlite3.c:230070:3:
+ *(*func(*libc.TLS, uintptr, int32) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sFts5Api)) + 56 /* .xPhraseSize */)) = fts5ApiPhraseSize // sqlite3.c:230071:3:
+ *(*func(*libc.TLS, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sFts5Api)) + 64 /* .xInstCount */)) = fts5ApiInstCount // sqlite3.c:230072:3:
+ *(*func(*libc.TLS, uintptr, int32, uintptr, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sFts5Api)) + 72 /* .xInst */)) = fts5ApiInst // sqlite3.c:230073:3:
+ *(*func(*libc.TLS, uintptr) Sqlite3_int64)(unsafe.Pointer(uintptr(unsafe.Pointer(&sFts5Api)) + 80 /* .xRowid */)) = fts5ApiRowid // sqlite3.c:230074:3:
+ *(*func(*libc.TLS, uintptr, int32, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sFts5Api)) + 88 /* .xColumnText */)) = fts5ApiColumnText // sqlite3.c:230075:3:
+ *(*func(*libc.TLS, uintptr, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sFts5Api)) + 96 /* .xColumnSize */)) = fts5ApiColumnSize // sqlite3.c:230076:3:
+ *(*func(*libc.TLS, uintptr, int32, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sFts5Api)) + 104 /* .xQueryPhrase */)) = fts5ApiQueryPhrase // sqlite3.c:230077:3:
+ *(*func(*libc.TLS, uintptr, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sFts5Api)) + 112 /* .xSetAuxdata */)) = fts5ApiSetAuxdata // sqlite3.c:230078:3:
+ *(*func(*libc.TLS, uintptr, int32) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&sFts5Api)) + 120 /* .xGetAuxdata */)) = fts5ApiGetAuxdata // sqlite3.c:230079:3:
+ *(*func(*libc.TLS, uintptr, int32, uintptr, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sFts5Api)) + 128 /* .xPhraseFirst */)) = fts5ApiPhraseFirst // sqlite3.c:230080:3:
+ *(*func(*libc.TLS, uintptr, uintptr, uintptr, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&sFts5Api)) + 136 /* .xPhraseNext */)) = fts5ApiPhraseNext // sqlite3.c:230081:3:
+ *(*func(*libc.TLS, uintptr, int32, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sFts5Api)) + 144 /* .xPhraseFirstColumn */)) = fts5ApiPhraseFirstColumn // sqlite3.c:230082:3:
+ *(*func(*libc.TLS, uintptr, uintptr, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&sFts5Api)) + 152 /* .xPhraseNextColumn */)) = fts5ApiPhraseNextColumn // sqlite3.c:230083:3:
+ *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sMemJournalMethods)) + 8 /* .xClose */)) = memjrnlClose // sqlite3.c:98830:3:
+ *(*func(*libc.TLS, uintptr, uintptr, int32, Sqlite_int64) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sMemJournalMethods)) + 16 /* .xRead */)) = memjrnlRead // sqlite3.c:98831:3:
+ *(*func(*libc.TLS, uintptr, uintptr, int32, Sqlite_int64) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sMemJournalMethods)) + 24 /* .xWrite */)) = memjrnlWrite // sqlite3.c:98832:3:
+ *(*func(*libc.TLS, uintptr, Sqlite_int64) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sMemJournalMethods)) + 32 /* .xTruncate */)) = memjrnlTruncate // sqlite3.c:98833:3:
+ *(*func(*libc.TLS, uintptr, int32) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sMemJournalMethods)) + 40 /* .xSync */)) = memjrnlSync // sqlite3.c:98834:3:
+ *(*func(*libc.TLS, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sMemJournalMethods)) + 48 /* .xFileSize */)) = memjrnlFileSize // sqlite3.c:98835:3:
+ *(*func(*libc.TLS) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sMutex)) + 0 /* .xMutexInit */)) = noopMutexInit // sqlite3.c:26532:5:
+ *(*func(*libc.TLS) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sMutex)) + 8 /* .xMutexEnd */)) = noopMutexEnd // sqlite3.c:26533:5:
+ *(*func(*libc.TLS, int32) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&sMutex)) + 16 /* .xMutexAlloc */)) = noopMutexAlloc // sqlite3.c:26534:5:
+ *(*func(*libc.TLS, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&sMutex)) + 24 /* .xMutexFree */)) = noopMutexFree // sqlite3.c:26535:5:
+ *(*func(*libc.TLS, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&sMutex)) + 32 /* .xMutexEnter */)) = noopMutexEnter // sqlite3.c:26536:5:
+ *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sMutex)) + 40 /* .xMutexTry */)) = noopMutexTry // sqlite3.c:26537:5:
+ *(*func(*libc.TLS, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&sMutex)) + 48 /* .xMutexLeave */)) = noopMutexLeave // sqlite3.c:26538:5:
+ *(*func(*libc.TLS, uintptr, int32) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 0 /* .aggregate_context */)) = Xsqlite3_aggregate_context // sqlite3.c:127068:3:
+ *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 8 /* .aggregate_count */)) = Xsqlite3_aggregate_count // sqlite3.c:127070:3:
+ *(*func(*libc.TLS, uintptr, int32, uintptr, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 16 /* .bind_blob */)) = Xsqlite3_bind_blob // sqlite3.c:127074:3:
+ *(*func(*libc.TLS, uintptr, int32, float64) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 24 /* .bind_double */)) = Xsqlite3_bind_double // sqlite3.c:127075:3:
+ *(*func(*libc.TLS, uintptr, int32, int32) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 32 /* .bind_int */)) = Xsqlite3_bind_int // sqlite3.c:127076:3:
+ *(*func(*libc.TLS, uintptr, int32, Sqlite_int64) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 40 /* .bind_int64 */)) = Xsqlite3_bind_int64 // sqlite3.c:127077:3:
+ *(*func(*libc.TLS, uintptr, int32) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 48 /* .bind_null */)) = Xsqlite3_bind_null // sqlite3.c:127078:3:
+ *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 56 /* .bind_parameter_count */)) = Xsqlite3_bind_parameter_count // sqlite3.c:127079:3:
+ *(*func(*libc.TLS, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 64 /* .bind_parameter_index */)) = Xsqlite3_bind_parameter_index // sqlite3.c:127080:3:
+ *(*func(*libc.TLS, uintptr, int32) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 72 /* .bind_parameter_name */)) = Xsqlite3_bind_parameter_name // sqlite3.c:127081:3:
+ *(*func(*libc.TLS, uintptr, int32, uintptr, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 80 /* .bind_text */)) = Xsqlite3_bind_text // sqlite3.c:127082:3:
+ *(*func(*libc.TLS, uintptr, int32, uintptr, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 88 /* .bind_text16 */)) = Xsqlite3_bind_text16 // sqlite3.c:127083:3:
+ *(*func(*libc.TLS, uintptr, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 96 /* .bind_value */)) = Xsqlite3_bind_value // sqlite3.c:127084:3:
+ *(*func(*libc.TLS, uintptr, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 104 /* .busy_handler */)) = Xsqlite3_busy_handler // sqlite3.c:127085:3:
+ *(*func(*libc.TLS, uintptr, int32) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 112 /* .busy_timeout */)) = Xsqlite3_busy_timeout // sqlite3.c:127086:3:
+ *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 120 /* .changes */)) = Xsqlite3_changes // sqlite3.c:127087:3:
+ *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 128 /* .close */)) = Xsqlite3_close // sqlite3.c:127088:3:
+ *(*func(*libc.TLS, uintptr, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 136 /* .collation_needed */)) = Xsqlite3_collation_needed // sqlite3.c:127089:3:
+ *(*func(*libc.TLS, uintptr, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 144 /* .collation_needed16 */)) = Xsqlite3_collation_needed16 // sqlite3.c:127090:3:
+ *(*func(*libc.TLS, uintptr, int32) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 152 /* .column_blob */)) = Xsqlite3_column_blob // sqlite3.c:127091:3:
+ *(*func(*libc.TLS, uintptr, int32) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 160 /* .column_bytes */)) = Xsqlite3_column_bytes // sqlite3.c:127092:3:
+ *(*func(*libc.TLS, uintptr, int32) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 168 /* .column_bytes16 */)) = Xsqlite3_column_bytes16 // sqlite3.c:127093:3:
+ *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 176 /* .column_count */)) = Xsqlite3_column_count // sqlite3.c:127094:3:
+ *(*func(*libc.TLS, uintptr, int32) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 184 /* .column_database_name */)) = Xsqlite3_column_database_name // sqlite3.c:127095:3:
+ *(*func(*libc.TLS, uintptr, int32) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 192 /* .column_database_name16 */)) = Xsqlite3_column_database_name16 // sqlite3.c:127096:3:
+ *(*func(*libc.TLS, uintptr, int32) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 200 /* .column_decltype */)) = Xsqlite3_column_decltype // sqlite3.c:127097:3:
+ *(*func(*libc.TLS, uintptr, int32) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 208 /* .column_decltype16 */)) = Xsqlite3_column_decltype16 // sqlite3.c:127098:3:
+ *(*func(*libc.TLS, uintptr, int32) float64)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 216 /* .column_double */)) = Xsqlite3_column_double // sqlite3.c:127099:3:
+ *(*func(*libc.TLS, uintptr, int32) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 224 /* .column_int */)) = Xsqlite3_column_int // sqlite3.c:127100:3:
+ *(*func(*libc.TLS, uintptr, int32) Sqlite_int64)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 232 /* .column_int64 */)) = Xsqlite3_column_int64 // sqlite3.c:127101:3:
+ *(*func(*libc.TLS, uintptr, int32) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 240 /* .column_name */)) = Xsqlite3_column_name // sqlite3.c:127102:3:
+ *(*func(*libc.TLS, uintptr, int32) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 248 /* .column_name16 */)) = Xsqlite3_column_name16 // sqlite3.c:127103:3:
+ *(*func(*libc.TLS, uintptr, int32) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 256 /* .column_origin_name */)) = Xsqlite3_column_origin_name // sqlite3.c:127104:3:
+ *(*func(*libc.TLS, uintptr, int32) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 264 /* .column_origin_name16 */)) = Xsqlite3_column_origin_name16 // sqlite3.c:127105:3:
+ *(*func(*libc.TLS, uintptr, int32) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 272 /* .column_table_name */)) = Xsqlite3_column_table_name // sqlite3.c:127106:3:
+ *(*func(*libc.TLS, uintptr, int32) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 280 /* .column_table_name16 */)) = Xsqlite3_column_table_name16 // sqlite3.c:127107:3:
+ *(*func(*libc.TLS, uintptr, int32) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 288 /* .column_text */)) = Xsqlite3_column_text // sqlite3.c:127108:3:
+ *(*func(*libc.TLS, uintptr, int32) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 296 /* .column_text16 */)) = Xsqlite3_column_text16 // sqlite3.c:127109:3:
+ *(*func(*libc.TLS, uintptr, int32) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 304 /* .column_type */)) = Xsqlite3_column_type // sqlite3.c:127110:3:
+ *(*func(*libc.TLS, uintptr, int32) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 312 /* .column_value */)) = Xsqlite3_column_value // sqlite3.c:127111:3:
+ *(*func(*libc.TLS, uintptr, uintptr, uintptr) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 320 /* .commit_hook */)) = Xsqlite3_commit_hook // sqlite3.c:127112:3:
+ *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 328 /* .complete */)) = Xsqlite3_complete // sqlite3.c:127113:3:
+ *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 336 /* .complete16 */)) = Xsqlite3_complete16 // sqlite3.c:127114:3:
+ *(*func(*libc.TLS, uintptr, uintptr, int32, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 344 /* .create_collation */)) = Xsqlite3_create_collation // sqlite3.c:127115:3:
+ *(*func(*libc.TLS, uintptr, uintptr, int32, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 352 /* .create_collation16 */)) = Xsqlite3_create_collation16 // sqlite3.c:127116:3:
+ *(*func(*libc.TLS, uintptr, uintptr, int32, int32, uintptr, uintptr, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 360 /* .create_function */)) = Xsqlite3_create_function // sqlite3.c:127117:3:
+ *(*func(*libc.TLS, uintptr, uintptr, int32, int32, uintptr, uintptr, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 368 /* .create_function16 */)) = Xsqlite3_create_function16 // sqlite3.c:127118:3:
+ *(*func(*libc.TLS, uintptr, uintptr, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 376 /* .create_module */)) = Xsqlite3_create_module // sqlite3.c:127119:3:
+ *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 384 /* .data_count */)) = Xsqlite3_data_count // sqlite3.c:127120:3:
+ *(*func(*libc.TLS, uintptr) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 392 /* .db_handle */)) = Xsqlite3_db_handle // sqlite3.c:127121:3:
+ *(*func(*libc.TLS, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 400 /* .declare_vtab */)) = Xsqlite3_declare_vtab // sqlite3.c:127122:3:
+ *(*func(*libc.TLS, int32) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 408 /* .enable_shared_cache */)) = Xsqlite3_enable_shared_cache // sqlite3.c:127123:3:
+ *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 416 /* .errcode */)) = Xsqlite3_errcode // sqlite3.c:127124:3:
+ *(*func(*libc.TLS, uintptr) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 424 /* .errmsg */)) = Xsqlite3_errmsg // sqlite3.c:127125:3:
+ *(*func(*libc.TLS, uintptr) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 432 /* .errmsg16 */)) = Xsqlite3_errmsg16 // sqlite3.c:127126:3:
+ *(*func(*libc.TLS, uintptr, uintptr, Sqlite3_callback, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 440 /* .exec */)) = Xsqlite3_exec // sqlite3.c:127127:3:
+ *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 448 /* .expired */)) = Xsqlite3_expired // sqlite3.c:127129:3:
+ *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 456 /* .finalize */)) = Xsqlite3_finalize // sqlite3.c:127133:3:
+ *(*func(*libc.TLS, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 464 /* .free */)) = Xsqlite3_free // sqlite3.c:127134:3:
+ *(*func(*libc.TLS, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 472 /* .free_table */)) = Xsqlite3_free_table // sqlite3.c:127135:3:
+ *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 480 /* .get_autocommit */)) = Xsqlite3_get_autocommit // sqlite3.c:127136:3:
+ *(*func(*libc.TLS, uintptr, int32) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 488 /* .get_auxdata */)) = Xsqlite3_get_auxdata // sqlite3.c:127137:3:
+ *(*func(*libc.TLS, uintptr, uintptr, uintptr, uintptr, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 496 /* .get_table */)) = Xsqlite3_get_table // sqlite3.c:127138:3:
+ *(*func(*libc.TLS, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 512 /* .interruptx */)) = Xsqlite3_interrupt // sqlite3.c:127140:3:
+ *(*func(*libc.TLS, uintptr) Sqlite3_int64)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 520 /* .last_insert_rowid */)) = Xsqlite3_last_insert_rowid // sqlite3.c:127141:3:
+ *(*func(*libc.TLS) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 528 /* .libversion */)) = Xsqlite3_libversion // sqlite3.c:127142:3:
+ *(*func(*libc.TLS) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 536 /* .libversion_number */)) = Xsqlite3_libversion_number // sqlite3.c:127143:3:
+ *(*func(*libc.TLS, int32) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 544 /* .malloc */)) = Xsqlite3_malloc // sqlite3.c:127144:3:
+ *(*func(*libc.TLS, uintptr, uintptr) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 552 /* .mprintf */)) = Xsqlite3_mprintf // sqlite3.c:127145:3:
+ *(*func(*libc.TLS, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 560 /* .open */)) = Xsqlite3_open // sqlite3.c:127146:3:
+ *(*func(*libc.TLS, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 568 /* .open16 */)) = Xsqlite3_open16 // sqlite3.c:127147:3:
+ *(*func(*libc.TLS, uintptr, uintptr, int32, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 576 /* .prepare */)) = Xsqlite3_prepare // sqlite3.c:127148:3:
+ *(*func(*libc.TLS, uintptr, uintptr, int32, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 584 /* .prepare16 */)) = Xsqlite3_prepare16 // sqlite3.c:127149:3:
+ *(*func(*libc.TLS, uintptr, uintptr, uintptr) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 592 /* .profile */)) = Xsqlite3_profile // sqlite3.c:127150:3:
+ *(*func(*libc.TLS, uintptr, int32, uintptr, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 600 /* .progress_handler */)) = Xsqlite3_progress_handler // sqlite3.c:127151:3:
+ *(*func(*libc.TLS, uintptr, int32) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 608 /* .realloc */)) = Xsqlite3_realloc // sqlite3.c:127152:3:
+ *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 616 /* .reset */)) = Xsqlite3_reset // sqlite3.c:127153:3:
+ *(*func(*libc.TLS, uintptr, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 624 /* .result_blob */)) = Xsqlite3_result_blob // sqlite3.c:127154:3:
+ *(*func(*libc.TLS, uintptr, float64))(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 632 /* .result_double */)) = Xsqlite3_result_double // sqlite3.c:127155:3:
+ *(*func(*libc.TLS, uintptr, uintptr, int32))(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 640 /* .result_error */)) = Xsqlite3_result_error // sqlite3.c:127156:3:
+ *(*func(*libc.TLS, uintptr, uintptr, int32))(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 648 /* .result_error16 */)) = Xsqlite3_result_error16 // sqlite3.c:127157:3:
+ *(*func(*libc.TLS, uintptr, int32))(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 656 /* .result_int */)) = Xsqlite3_result_int // sqlite3.c:127158:3:
+ *(*func(*libc.TLS, uintptr, I64))(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 664 /* .result_int64 */)) = Xsqlite3_result_int64 // sqlite3.c:127159:3:
+ *(*func(*libc.TLS, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 672 /* .result_null */)) = Xsqlite3_result_null // sqlite3.c:127160:3:
+ *(*func(*libc.TLS, uintptr, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 680 /* .result_text */)) = Xsqlite3_result_text // sqlite3.c:127161:3:
+ *(*func(*libc.TLS, uintptr, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 688 /* .result_text16 */)) = Xsqlite3_result_text16 // sqlite3.c:127162:3:
+ *(*func(*libc.TLS, uintptr, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 696 /* .result_text16be */)) = Xsqlite3_result_text16be // sqlite3.c:127163:3:
+ *(*func(*libc.TLS, uintptr, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 704 /* .result_text16le */)) = Xsqlite3_result_text16le // sqlite3.c:127164:3:
+ *(*func(*libc.TLS, uintptr, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 712 /* .result_value */)) = Xsqlite3_result_value // sqlite3.c:127165:3:
+ *(*func(*libc.TLS, uintptr, uintptr, uintptr) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 720 /* .rollback_hook */)) = Xsqlite3_rollback_hook // sqlite3.c:127166:3:
+ *(*func(*libc.TLS, uintptr, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 728 /* .set_authorizer */)) = Xsqlite3_set_authorizer // sqlite3.c:127167:3:
+ *(*func(*libc.TLS, uintptr, int32, uintptr, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 736 /* .set_auxdata */)) = Xsqlite3_set_auxdata // sqlite3.c:127168:3:
+ *(*func(*libc.TLS, int32, uintptr, uintptr, uintptr) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 744 /* .xsnprintf */)) = Xsqlite3_snprintf // sqlite3.c:127169:3:
+ *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 752 /* .step */)) = Xsqlite3_step // sqlite3.c:127170:3:
+ *(*func(*libc.TLS, uintptr, uintptr, uintptr, uintptr, uintptr, uintptr, uintptr, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 760 /* .table_column_metadata */)) = Xsqlite3_table_column_metadata // sqlite3.c:127171:3:
+ *(*func(*libc.TLS))(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 768 /* .thread_cleanup */)) = Xsqlite3_thread_cleanup // sqlite3.c:127173:3:
+ *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 776 /* .total_changes */)) = Xsqlite3_total_changes // sqlite3.c:127177:3:
+ *(*func(*libc.TLS, uintptr, uintptr, uintptr) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 784 /* .trace */)) = Xsqlite3_trace // sqlite3.c:127178:3:
+ *(*func(*libc.TLS, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 792 /* .transfer_bindings */)) = Xsqlite3_transfer_bindings // sqlite3.c:127180:3:
+ *(*func(*libc.TLS, uintptr, uintptr, uintptr) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 800 /* .update_hook */)) = Xsqlite3_update_hook // sqlite3.c:127184:3:
+ *(*func(*libc.TLS, uintptr) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 808 /* .user_data */)) = Xsqlite3_user_data // sqlite3.c:127185:3:
+ *(*func(*libc.TLS, uintptr) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 816 /* .value_blob */)) = Xsqlite3_value_blob // sqlite3.c:127186:3:
+ *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 824 /* .value_bytes */)) = Xsqlite3_value_bytes // sqlite3.c:127187:3:
+ *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 832 /* .value_bytes16 */)) = Xsqlite3_value_bytes16 // sqlite3.c:127188:3:
+ *(*func(*libc.TLS, uintptr) float64)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 840 /* .value_double */)) = Xsqlite3_value_double // sqlite3.c:127189:3:
+ *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 848 /* .value_int */)) = Xsqlite3_value_int // sqlite3.c:127190:3:
+ *(*func(*libc.TLS, uintptr) Sqlite_int64)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 856 /* .value_int64 */)) = Xsqlite3_value_int64 // sqlite3.c:127191:3:
+ *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 864 /* .value_numeric_type */)) = Xsqlite3_value_numeric_type // sqlite3.c:127192:3:
+ *(*func(*libc.TLS, uintptr) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 872 /* .value_text */)) = Xsqlite3_value_text // sqlite3.c:127193:3:
+ *(*func(*libc.TLS, uintptr) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 880 /* .value_text16 */)) = Xsqlite3_value_text16 // sqlite3.c:127194:3:
+ *(*func(*libc.TLS, uintptr) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 888 /* .value_text16be */)) = Xsqlite3_value_text16be // sqlite3.c:127195:3:
+ *(*func(*libc.TLS, uintptr) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 896 /* .value_text16le */)) = Xsqlite3_value_text16le // sqlite3.c:127196:3:
+ *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 904 /* .value_type */)) = Xsqlite3_value_type // sqlite3.c:127197:3:
+ *(*func(*libc.TLS, uintptr, Va_list) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 912 /* .vmprintf */)) = Xsqlite3_vmprintf // sqlite3.c:127198:3:
+ *(*func(*libc.TLS, uintptr, uintptr, int32) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 920 /* .overload_function */)) = Xsqlite3_overload_function // sqlite3.c:127207:3:
+ *(*func(*libc.TLS, uintptr, uintptr, int32, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 928 /* .prepare_v2 */)) = Xsqlite3_prepare_v2 // sqlite3.c:127212:3:
+ *(*func(*libc.TLS, uintptr, uintptr, int32, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 936 /* .prepare16_v2 */)) = Xsqlite3_prepare16_v2 // sqlite3.c:127213:3:
+ *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 944 /* .clear_bindings */)) = Xsqlite3_clear_bindings // sqlite3.c:127214:3:
+ *(*func(*libc.TLS, uintptr, uintptr, uintptr, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 952 /* .create_module_v2 */)) = Xsqlite3_create_module_v2 // sqlite3.c:127219:3:
+ *(*func(*libc.TLS, uintptr, int32, int32) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 960 /* .bind_zeroblob */)) = Xsqlite3_bind_zeroblob // sqlite3.c:127224:3:
+ *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 968 /* .blob_bytes */)) = Xsqlite3_blob_bytes // sqlite3.c:127225:3:
+ *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 976 /* .blob_close */)) = Xsqlite3_blob_close // sqlite3.c:127226:3:
+ *(*func(*libc.TLS, uintptr, uintptr, uintptr, uintptr, Sqlite_int64, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 984 /* .blob_open */)) = Xsqlite3_blob_open // sqlite3.c:127227:3:
+ *(*func(*libc.TLS, uintptr, uintptr, int32, int32) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 992 /* .blob_read */)) = Xsqlite3_blob_read // sqlite3.c:127228:3:
+ *(*func(*libc.TLS, uintptr, uintptr, int32, int32) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 1000 /* .blob_write */)) = Xsqlite3_blob_write // sqlite3.c:127229:3:
+ *(*func(*libc.TLS, uintptr, uintptr, int32, uintptr, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 1008 /* .create_collation_v2 */)) = Xsqlite3_create_collation_v2 // sqlite3.c:127230:3:
+ *(*func(*libc.TLS, uintptr, uintptr, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 1016 /* .file_control */)) = Xsqlite3_file_control // sqlite3.c:127231:3:
+ *(*func(*libc.TLS, int32) Sqlite3_int64)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 1024 /* .memory_highwater */)) = Xsqlite3_memory_highwater // sqlite3.c:127232:3:
+ *(*func(*libc.TLS) Sqlite3_int64)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 1032 /* .memory_used */)) = Xsqlite3_memory_used // sqlite3.c:127233:3:
+ *(*func(*libc.TLS, int32) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 1040 /* .mutex_alloc */)) = Xsqlite3_mutex_alloc // sqlite3.c:127241:3:
+ *(*func(*libc.TLS, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 1048 /* .mutex_enter */)) = Xsqlite3_mutex_enter // sqlite3.c:127242:3:
+ *(*func(*libc.TLS, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 1056 /* .mutex_free */)) = Xsqlite3_mutex_free // sqlite3.c:127243:3:
+ *(*func(*libc.TLS, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 1064 /* .mutex_leave */)) = Xsqlite3_mutex_leave // sqlite3.c:127244:3:
+ *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 1072 /* .mutex_try */)) = Xsqlite3_mutex_try // sqlite3.c:127245:3:
+ *(*func(*libc.TLS, uintptr, uintptr, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 1080 /* .open_v2 */)) = Xsqlite3_open_v2 // sqlite3.c:127247:3:
+ *(*func(*libc.TLS, int32) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 1088 /* .release_memory */)) = Xsqlite3_release_memory // sqlite3.c:127248:3:
+ *(*func(*libc.TLS, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 1096 /* .result_error_nomem */)) = Xsqlite3_result_error_nomem // sqlite3.c:127249:3:
+ *(*func(*libc.TLS, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 1104 /* .result_error_toobig */)) = Xsqlite3_result_error_toobig // sqlite3.c:127250:3:
+ *(*func(*libc.TLS, int32) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 1112 /* .sleep */)) = Xsqlite3_sleep // sqlite3.c:127251:3:
+ *(*func(*libc.TLS, int32))(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 1120 /* .soft_heap_limit */)) = Xsqlite3_soft_heap_limit // sqlite3.c:127252:3:
+ *(*func(*libc.TLS, uintptr) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 1128 /* .vfs_find */)) = Xsqlite3_vfs_find // sqlite3.c:127253:3:
+ *(*func(*libc.TLS, uintptr, int32) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 1136 /* .vfs_register */)) = Xsqlite3_vfs_register // sqlite3.c:127254:3:
+ *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 1144 /* .vfs_unregister */)) = Xsqlite3_vfs_unregister // sqlite3.c:127255:3:
+ *(*func(*libc.TLS) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 1152 /* .xthreadsafe */)) = Xsqlite3_threadsafe // sqlite3.c:127260:3:
+ *(*func(*libc.TLS, uintptr, int32))(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 1160 /* .result_zeroblob */)) = Xsqlite3_result_zeroblob // sqlite3.c:127261:3:
+ *(*func(*libc.TLS, uintptr, int32))(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 1168 /* .result_error_code */)) = Xsqlite3_result_error_code // sqlite3.c:127262:3:
+ *(*func(*libc.TLS, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 1176 /* .test_control */)) = Xsqlite3_test_control // sqlite3.c:127263:3:
+ *(*func(*libc.TLS, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 1184 /* .randomness */)) = Xsqlite3_randomness // sqlite3.c:127264:3:
+ *(*func(*libc.TLS, uintptr) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 1192 /* .context_db_handle */)) = Xsqlite3_context_db_handle // sqlite3.c:127265:3:
+ *(*func(*libc.TLS, uintptr, int32) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 1200 /* .extended_result_codes */)) = Xsqlite3_extended_result_codes // sqlite3.c:127270:3:
+ *(*func(*libc.TLS, uintptr, int32, int32) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 1208 /* .limit */)) = Xsqlite3_limit // sqlite3.c:127271:3:
+ *(*func(*libc.TLS, uintptr, uintptr) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 1216 /* .next_stmt */)) = Xsqlite3_next_stmt // sqlite3.c:127272:3:
+ *(*func(*libc.TLS, uintptr) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 1224 /* .sql */)) = Xsqlite3_sql // sqlite3.c:127273:3:
+ *(*func(*libc.TLS, int32, uintptr, uintptr, int32) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 1232 /* .status */)) = Xsqlite3_status // sqlite3.c:127274:3:
+ *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 1240 /* .backup_finish */)) = Xsqlite3_backup_finish // sqlite3.c:127279:3:
+ *(*func(*libc.TLS, uintptr, uintptr, uintptr, uintptr) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 1248 /* .backup_init */)) = Xsqlite3_backup_init // sqlite3.c:127280:3:
+ *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 1256 /* .backup_pagecount */)) = Xsqlite3_backup_pagecount // sqlite3.c:127281:3:
+ *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 1264 /* .backup_remaining */)) = Xsqlite3_backup_remaining // sqlite3.c:127282:3:
+ *(*func(*libc.TLS, uintptr, int32) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 1272 /* .backup_step */)) = Xsqlite3_backup_step // sqlite3.c:127283:3:
+ *(*func(*libc.TLS, int32) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 1280 /* .compileoption_get */)) = Xsqlite3_compileoption_get // sqlite3.c:127285:3:
+ *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 1288 /* .compileoption_used */)) = Xsqlite3_compileoption_used // sqlite3.c:127286:3:
+ *(*func(*libc.TLS, uintptr, uintptr, int32, int32, uintptr, uintptr, uintptr, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 1296 /* .create_function_v2 */)) = Xsqlite3_create_function_v2 // sqlite3.c:127291:3:
+ *(*func(*libc.TLS, uintptr, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 1304 /* .db_config */)) = Xsqlite3_db_config // sqlite3.c:127292:3:
+ *(*func(*libc.TLS, uintptr) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 1312 /* .db_mutex */)) = Xsqlite3_db_mutex // sqlite3.c:127293:3:
+ *(*func(*libc.TLS, uintptr, int32, uintptr, uintptr, int32) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 1320 /* .db_status */)) = Xsqlite3_db_status // sqlite3.c:127294:3:
+ *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 1328 /* .extended_errcode */)) = Xsqlite3_extended_errcode // sqlite3.c:127295:3:
+ *(*func(*libc.TLS, int32, uintptr, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 1336 /* .log */)) = Xsqlite3_log // sqlite3.c:127296:3:
+ *(*func(*libc.TLS, Sqlite3_int64) Sqlite3_int64)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 1344 /* .soft_heap_limit64 */)) = Xsqlite3_soft_heap_limit64 // sqlite3.c:127297:3:
+ *(*func(*libc.TLS) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 1352 /* .sourceid */)) = Xsqlite3_sourceid // sqlite3.c:127298:3:
+ *(*func(*libc.TLS, uintptr, int32, int32) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 1360 /* .stmt_status */)) = Xsqlite3_stmt_status // sqlite3.c:127299:3:
+ *(*func(*libc.TLS, uintptr, uintptr, int32) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 1368 /* .strnicmp */)) = Xsqlite3_strnicmp // sqlite3.c:127300:3:
+ *(*func(*libc.TLS, uintptr, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 1376 /* .unlock_notify */)) = Xsqlite3_unlock_notify // sqlite3.c:127302:3:
+ *(*func(*libc.TLS, uintptr, int32) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 1384 /* .wal_autocheckpoint */)) = Xsqlite3_wal_autocheckpoint // sqlite3.c:127307:3:
+ *(*func(*libc.TLS, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 1392 /* .wal_checkpoint */)) = Xsqlite3_wal_checkpoint // sqlite3.c:127308:3:
+ *(*func(*libc.TLS, uintptr, uintptr, uintptr) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 1400 /* .wal_hook */)) = Xsqlite3_wal_hook // sqlite3.c:127309:3:
+ *(*func(*libc.TLS, uintptr, Sqlite3_int64) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 1408 /* .blob_reopen */)) = Xsqlite3_blob_reopen // sqlite3.c:127315:3:
+ *(*func(*libc.TLS, uintptr, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 1416 /* .vtab_config */)) = Xsqlite3_vtab_config // sqlite3.c:127316:3:
+ *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 1424 /* .vtab_on_conflict */)) = Xsqlite3_vtab_on_conflict // sqlite3.c:127317:3:
+ *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 1432 /* .close_v2 */)) = Xsqlite3_close_v2 // sqlite3.c:127318:3:
+ *(*func(*libc.TLS, uintptr, uintptr) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 1440 /* .db_filename */)) = Xsqlite3_db_filename // sqlite3.c:127319:3:
+ *(*func(*libc.TLS, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 1448 /* .db_readonly */)) = Xsqlite3_db_readonly // sqlite3.c:127320:3:
+ *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 1456 /* .db_release_memory */)) = Xsqlite3_db_release_memory // sqlite3.c:127321:3:
+ *(*func(*libc.TLS, int32) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 1464 /* .errstr */)) = Xsqlite3_errstr // sqlite3.c:127322:3:
+ *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 1472 /* .stmt_busy */)) = Xsqlite3_stmt_busy // sqlite3.c:127323:3:
+ *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 1480 /* .stmt_readonly */)) = Xsqlite3_stmt_readonly // sqlite3.c:127324:3:
+ *(*func(*libc.TLS, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 1488 /* .stricmp */)) = Xsqlite3_stricmp // sqlite3.c:127325:3:
+ *(*func(*libc.TLS, uintptr, uintptr, int32) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 1496 /* .uri_boolean */)) = Xsqlite3_uri_boolean // sqlite3.c:127326:3:
+ *(*func(*libc.TLS, uintptr, uintptr, Sqlite3_int64) Sqlite3_int64)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 1504 /* .uri_int64 */)) = Xsqlite3_uri_int64 // sqlite3.c:127327:3:
+ *(*func(*libc.TLS, uintptr, uintptr) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 1512 /* .uri_parameter */)) = Xsqlite3_uri_parameter // sqlite3.c:127328:3:
+ *(*func(*libc.TLS, int32, uintptr, uintptr, Va_list) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 1520 /* .xvsnprintf */)) = Xsqlite3_vsnprintf // sqlite3.c:127329:3:
+ *(*func(*libc.TLS, uintptr, uintptr, int32, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 1528 /* .wal_checkpoint_v2 */)) = Xsqlite3_wal_checkpoint_v2 // sqlite3.c:127330:3:
+ *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 1536 /* .auto_extension */)) = Xsqlite3_auto_extension // sqlite3.c:127332:3:
+ *(*func(*libc.TLS, uintptr, int32, uintptr, Sqlite3_uint64, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 1544 /* .bind_blob64 */)) = Xsqlite3_bind_blob64 // sqlite3.c:127333:3:
+ *(*func(*libc.TLS, uintptr, int32, uintptr, Sqlite3_uint64, uintptr, uint8) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 1552 /* .bind_text64 */)) = Xsqlite3_bind_text64 // sqlite3.c:127334:3:
+ *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 1560 /* .cancel_auto_extension */)) = Xsqlite3_cancel_auto_extension // sqlite3.c:127335:3:
+ *(*func(*libc.TLS, uintptr, uintptr, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 1568 /* .load_extension */)) = Xsqlite3_load_extension // sqlite3.c:127336:3:
+ *(*func(*libc.TLS, Sqlite3_uint64) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 1576 /* .malloc64 */)) = Xsqlite3_malloc64 // sqlite3.c:127337:3:
+ *(*func(*libc.TLS, uintptr) Sqlite3_uint64)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 1584 /* .msize */)) = Xsqlite3_msize // sqlite3.c:127338:3:
+ *(*func(*libc.TLS, uintptr, Sqlite3_uint64) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 1592 /* .realloc64 */)) = Xsqlite3_realloc64 // sqlite3.c:127339:3:
+ *(*func(*libc.TLS))(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 1600 /* .reset_auto_extension */)) = Xsqlite3_reset_auto_extension // sqlite3.c:127340:3:
+ *(*func(*libc.TLS, uintptr, uintptr, Sqlite3_uint64, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 1608 /* .result_blob64 */)) = Xsqlite3_result_blob64 // sqlite3.c:127341:3:
+ *(*func(*libc.TLS, uintptr, uintptr, Sqlite3_uint64, uintptr, uint8))(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 1616 /* .result_text64 */)) = Xsqlite3_result_text64 // sqlite3.c:127342:3:
+ *(*func(*libc.TLS, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 1624 /* .strglob */)) = Xsqlite3_strglob // sqlite3.c:127343:3:
*(*uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 1632 /* .value_dup */)) = *(*uintptr)(unsafe.Pointer(&struct {
f func(*libc.TLS, uintptr) uintptr
- }{Xsqlite3_value_dup})) // sqlite3.c:126448:3:
- *(*func(*libc.TLS, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 1640 /* .value_free */)) = Xsqlite3_value_free // sqlite3.c:126449:3:
- *(*func(*libc.TLS, uintptr, U64) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 1648 /* .result_zeroblob64 */)) = Xsqlite3_result_zeroblob64 // sqlite3.c:126450:3:
- *(*func(*libc.TLS, uintptr, int32, Sqlite3_uint64) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 1656 /* .bind_zeroblob64 */)) = Xsqlite3_bind_zeroblob64 // sqlite3.c:126451:3:
- *(*func(*libc.TLS, uintptr) uint32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 1664 /* .value_subtype */)) = Xsqlite3_value_subtype // sqlite3.c:126453:3:
- *(*func(*libc.TLS, uintptr, uint32))(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 1672 /* .result_subtype */)) = Xsqlite3_result_subtype // sqlite3.c:126454:3:
- *(*func(*libc.TLS, int32, uintptr, uintptr, int32) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 1680 /* .status64 */)) = Xsqlite3_status64 // sqlite3.c:126456:3:
- *(*func(*libc.TLS, uintptr, uintptr, uint32) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 1688 /* .strlike */)) = Xsqlite3_strlike // sqlite3.c:126457:3:
- *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 1696 /* .db_cacheflush */)) = Xsqlite3_db_cacheflush // sqlite3.c:126458:3:
- *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 1704 /* .system_errno */)) = Xsqlite3_system_errno // sqlite3.c:126460:3:
- *(*func(*libc.TLS, uintptr, uint32, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 1712 /* .trace_v2 */)) = Xsqlite3_trace_v2 // sqlite3.c:126462:3:
- *(*func(*libc.TLS, uintptr) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 1720 /* .expanded_sql */)) = Xsqlite3_expanded_sql // sqlite3.c:126463:3:
- *(*func(*libc.TLS, uintptr, Sqlite3_int64))(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 1728 /* .set_last_insert_rowid */)) = Xsqlite3_set_last_insert_rowid // sqlite3.c:126465:3:
- *(*func(*libc.TLS, uintptr, uintptr, int32, uint32, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 1736 /* .prepare_v3 */)) = Xsqlite3_prepare_v3 // sqlite3.c:126467:3:
- *(*func(*libc.TLS, uintptr, uintptr, int32, uint32, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 1744 /* .prepare16_v3 */)) = Xsqlite3_prepare16_v3 // sqlite3.c:126468:3:
- *(*func(*libc.TLS, uintptr, int32, uintptr, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 1752 /* .bind_pointer */)) = Xsqlite3_bind_pointer // sqlite3.c:126469:3:
- *(*func(*libc.TLS, uintptr, uintptr, uintptr, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 1760 /* .result_pointer */)) = Xsqlite3_result_pointer // sqlite3.c:126470:3:
- *(*func(*libc.TLS, uintptr, uintptr) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 1768 /* .value_pointer */)) = Xsqlite3_value_pointer // sqlite3.c:126471:3:
- *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 1776 /* .vtab_nochange */)) = Xsqlite3_vtab_nochange // sqlite3.c:126473:3:
- *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 1784 /* .value_nochange */)) = Xsqlite3_value_nochange // sqlite3.c:126474:3:
- *(*func(*libc.TLS, uintptr, int32) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 1792 /* .vtab_collation */)) = Xsqlite3_vtab_collation // sqlite3.c:126475:3:
- *(*func(*libc.TLS) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 1800 /* .keyword_count */)) = Xsqlite3_keyword_count // sqlite3.c:126477:3:
- *(*func(*libc.TLS, int32, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 1808 /* .keyword_name */)) = Xsqlite3_keyword_name // sqlite3.c:126478:3:
- *(*func(*libc.TLS, uintptr, int32) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 1816 /* .keyword_check */)) = Xsqlite3_keyword_check // sqlite3.c:126479:3:
- *(*func(*libc.TLS, uintptr) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 1824 /* .str_new */)) = Xsqlite3_str_new // sqlite3.c:126480:3:
- *(*func(*libc.TLS, uintptr) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 1832 /* .str_finish */)) = Xsqlite3_str_finish // sqlite3.c:126481:3:
- *(*func(*libc.TLS, uintptr, uintptr, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 1840 /* .str_appendf */)) = Xsqlite3_str_appendf // sqlite3.c:126482:3:
- *(*func(*libc.TLS, uintptr, uintptr, Va_list))(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 1848 /* .str_vappendf */)) = Xsqlite3_str_vappendf // sqlite3.c:126483:3:
- *(*func(*libc.TLS, uintptr, uintptr, int32))(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 1856 /* .str_append */)) = Xsqlite3_str_append // sqlite3.c:126484:3:
- *(*func(*libc.TLS, uintptr, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 1864 /* .str_appendall */)) = Xsqlite3_str_appendall // sqlite3.c:126485:3:
- *(*func(*libc.TLS, uintptr, int32, int8))(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 1872 /* .str_appendchar */)) = Xsqlite3_str_appendchar // sqlite3.c:126486:3:
- *(*func(*libc.TLS, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 1880 /* .str_reset */)) = Xsqlite3_str_reset // sqlite3.c:126487:3:
- *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 1888 /* .str_errcode */)) = Xsqlite3_str_errcode // sqlite3.c:126488:3:
- *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 1896 /* .str_length */)) = Xsqlite3_str_length // sqlite3.c:126489:3:
- *(*func(*libc.TLS, uintptr) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 1904 /* .str_value */)) = Xsqlite3_str_value // sqlite3.c:126490:3:
- *(*func(*libc.TLS, uintptr, uintptr, int32, int32, uintptr, uintptr, uintptr, uintptr, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 1912 /* .create_window_function */)) = Xsqlite3_create_window_function // sqlite3.c:126492:3:
- *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 1928 /* .stmt_isexplain */)) = Xsqlite3_stmt_isexplain // sqlite3.c:126500:3:
- *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 1936 /* .value_frombind */)) = Xsqlite3_value_frombind // sqlite3.c:126501:3:
- *(*func(*libc.TLS, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 1944 /* .drop_modules */)) = Xsqlite3_drop_modules // sqlite3.c:126504:3:
- *(*func(*libc.TLS, Sqlite3_int64) Sqlite3_int64)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 1952 /* .hard_heap_limit64 */)) = Xsqlite3_hard_heap_limit64 // sqlite3.c:126509:3:
- *(*func(*libc.TLS, uintptr, int32) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 1960 /* .uri_key */)) = Xsqlite3_uri_key // sqlite3.c:126510:3:
- *(*func(*libc.TLS, uintptr) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 1968 /* .filename_database */)) = Xsqlite3_filename_database // sqlite3.c:126511:3:
- *(*func(*libc.TLS, uintptr) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 1976 /* .filename_journal */)) = Xsqlite3_filename_journal // sqlite3.c:126512:3:
- *(*func(*libc.TLS, uintptr) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 1984 /* .filename_wal */)) = Xsqlite3_filename_wal // sqlite3.c:126513:3:
- *(*func(*libc.TLS, uintptr, uintptr, uintptr, int32, uintptr) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 1992 /* .create_filename */)) = Xsqlite3_create_filename // sqlite3.c:126515:3:
- *(*func(*libc.TLS, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 2000 /* .free_filename */)) = Xsqlite3_free_filename // sqlite3.c:126516:3:
- *(*func(*libc.TLS, uintptr) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 2008 /* .database_file_object */)) = Xsqlite3_database_file_object // sqlite3.c:126517:3:
- *(*func(*libc.TLS, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 2016 /* .txn_state */)) = Xsqlite3_txn_state // sqlite3.c:126519:3:
- *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3BuiltinExtensions)) + 0)) = Xsqlite3Fts5Init // sqlite3.c:164128:3:
- *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3BuiltinExtensions)) + 8)) = Xsqlite3RtreeInit // sqlite3.c:164134:3:
- *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3BuiltinExtensions)) + 16)) = sqlite3TestExtInit // sqlite3.c:164142:3:
- *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3BuiltinExtensions)) + 24)) = Xsqlite3Json1Init // sqlite3.c:164144:3:
- *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&statGetFuncdef)) + 24 /* .xSFunc */)) = statGet // sqlite3.c:109701:3:
- *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&statInitFuncdef)) + 24 /* .xSFunc */)) = statInit // sqlite3.c:109259:3:
- *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&statPushFuncdef)) + 24 /* .xSFunc */)) = statPush // sqlite3.c:109549:3:
- *(*func(*libc.TLS, uintptr, uintptr, uintptr, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&vfs_template)) + 40 /* .xOpen */)) = rbuVfsOpen // sqlite3.c:204213:5:
- *(*func(*libc.TLS, uintptr, uintptr, int32) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&vfs_template)) + 48 /* .xDelete */)) = rbuVfsDelete // sqlite3.c:204214:5:
- *(*func(*libc.TLS, uintptr, uintptr, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&vfs_template)) + 56 /* .xAccess */)) = rbuVfsAccess // sqlite3.c:204215:5:
- *(*func(*libc.TLS, uintptr, uintptr, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&vfs_template)) + 64 /* .xFullPathname */)) = rbuVfsFullPathname // sqlite3.c:204216:5:
- *(*func(*libc.TLS, uintptr, uintptr) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&vfs_template)) + 72 /* .xDlOpen */)) = rbuVfsDlOpen // sqlite3.c:204219:5:
- *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&vfs_template)) + 80 /* .xDlError */)) = rbuVfsDlError // sqlite3.c:204220:5:
- *(*func(*libc.TLS, uintptr, uintptr, uintptr) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&vfs_template)) + 88 /* .xDlSym */)) = rbuVfsDlSym // sqlite3.c:204221:5:
- *(*func(*libc.TLS, uintptr, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&vfs_template)) + 96 /* .xDlClose */)) = rbuVfsDlClose // sqlite3.c:204222:5:
- *(*func(*libc.TLS, uintptr, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&vfs_template)) + 104 /* .xRandomness */)) = rbuVfsRandomness // sqlite3.c:204227:5:
- *(*func(*libc.TLS, uintptr, int32) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&vfs_template)) + 112 /* .xSleep */)) = rbuVfsSleep // sqlite3.c:204228:5:
- *(*func(*libc.TLS, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&vfs_template)) + 120 /* .xCurrentTime */)) = rbuVfsCurrentTime // sqlite3.c:204229:5:
- *(*func(*libc.TLS, uintptr, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&vfs_template)) + 128 /* .xGetLastError */)) = rbuVfsGetLastError // sqlite3.c:204230:5:
-}
-
-var ts1 = "COMPILER=gcc-8.3.0\x00ENABLE_COLUMN_METADATA\x00ENABLE_FTS5\x00ENABLE_GEOPOLY\x00ENABLE_JSON1\x00ENABLE_MEMORY_MANAGEMENT\x00ENABLE_PREUPDATE_HOOK\x00ENABLE_RBU\x00ENABLE_RTREE\x00ENABLE_SNAPSHOT\x00ENABLE_STAT4\x00ENABLE_UNLOCK_NOTIFY\x00LIKE_DOESNT_MATCH_BLOBS\x00MUTEX_NOOP\x00SOUNDEX\x00THREADSAFE=1\x003.35.5\x00BINARY\x0020b:20e\x0020c:20e\x0020e\x0040f-21a-21d\x00now\x00local time unavailable\x00second\x00minute\x00hour\x00day\x00month\x00year\x00localtime\x00unixepoch\x00utc\x00weekday \x00start of \x00%04d-%02d-%02d %02d:%02d:%02d\x00%02d:%02d:%02d\x00%04d-%02d-%02d\x00%02d\x00%06.3f\x00%03d\x00%.16g\x00%04d\x00julianday\x00date\x00time\x00datetime\x00strftime\x00current_time\x00current_timestamp\x00current_date\x00failed to allocate %u bytes of memory\x00failed memory resize %u to %u bytes\x000123456789ABCDEF0123456789abcdef\x00-x0\x00X0\x00%\x00NaN\x00Inf\x00\x00NULL\x00(NULL)\x00.\x00thstndrd\x00922337203685477580\x00API call with %s database connection pointer\x00unopened\x00invalid\x00Savepoint\x00AutoCommit\x00Transaction\x00SorterNext\x00Prev\x00Next\x00Checkpoint\x00JournalMode\x00Vacuum\x00VFilter\x00VUpdate\x00Goto\x00Gosub\x00InitCoroutine\x00Yield\x00MustBeInt\x00Jump\x00Once\x00If\x00Not\x00IfNot\x00IfNullRow\x00SeekLT\x00SeekLE\x00SeekGE\x00SeekGT\x00IfNotOpen\x00IfNoHope\x00NoConflict\x00NotFound\x00Found\x00SeekRowid\x00NotExists\x00Last\x00IfSmaller\x00SorterSort\x00Sort\x00Rewind\x00IdxLE\x00IdxGT\x00IdxLT\x00IdxGE\x00RowSetRead\x00Or\x00And\x00RowSetTest\x00Program\x00FkIfZero\x00IfPos\x00IfNotZero\x00IsNull\x00NotNull\x00Ne\x00Eq\x00Gt\x00Le\x00Lt\x00Ge\x00ElseNotEq\x00DecrJumpZero\x00IncrVacuum\x00VNext\x00Init\x00PureFunc\x00Function\x00Return\x00EndCoroutine\x00HaltIfNull\x00Halt\x00Integer\x00Int64\x00String\x00Null\x00SoftNull\x00Blob\x00Variable\x00Move\x00Copy\x00SCopy\x00IntCopy\x00ChngCntRow\x00ResultRow\x00CollSeq\x00AddImm\x00RealAffinity\x00Cast\x00Permutation\x00Compare\x00IsTrue\x00Offset\x00Column\x00Affinity\x00MakeRecord\x00Count\x00ReadCookie\x00SetCookie\x00ReopenIdx\x00OpenRead\x00OpenWrite\x00OpenDup\x00OpenAutoindex\x00OpenEphemeral\x00BitAnd\x00BitOr\x00ShiftLeft\x00ShiftRight\x00Add\x00Subtract\x00Multiply\x00Divide\x00Remainder\x00Concat\x00SorterOpen\x00BitNot\x00SequenceTest\x00OpenPseudo\x00String8\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\x00IntegrityCk\x00RowSetAdd\x00Param\x00Real\x00FkCounter\x00MemMax\x00OffsetLimit\x00AggInverse\x00AggStep\x00AggStep1\x00AggValue\x00AggFinal\x00Expire\x00CursorLock\x00CursorUnlock\x00TableLock\x00VBegin\x00VCreate\x00VDestroy\x00VOpen\x00VColumn\x00VRename\x00Pagecount\x00MaxPgcnt\x00Trace\x00CursorHint\x00ReleaseReg\x00Noop\x00Explain\x00Abortable\x00open\x00close\x00access\x00getcwd\x00stat\x00fstat\x00ftruncate\x00fcntl\x00read\x00pread\x00pread64\x00write\x00pwrite\x00pwrite64\x00fchmod\x00fallocate\x00unlink\x00openDirectory\x00mkdir\x00rmdir\x00fchown\x00geteuid\x00mmap\x00munmap\x00mremap\x00getpagesize\x00readlink\x00lstat\x00ioctl\x00attempt to open \"%s\" as file descriptor %d\x00/dev/null\x00os_unix.c:%d: (%d) %s(%s) - %s\x00cannot fstat db file %s\x00file unlinked while open: %s\x00multiple links to file: %s\x00file renamed while open: %s\x00%s\x00full_fsync\x00%s-shm\x00readonly_shm\x00psow\x00unix-excl\x00%s.lock\x00SQLITE_TMPDIR\x00TMPDIR\x00/var/tmp\x00/usr/tmp\x00/tmp\x00%s/etilqs_%llx%c\x00modeof\x00fsync\x00/dev/urandom\x00unix\x00unix-none\x00unix-dotfile\x00recovered %d pages from %s\x00-journal\x00-wal\x00nolock\x00immutable\x00recovered %d frames from WAL file %s\x00cannot limit WAL size: %s\x00SQLite format 3\x00:memory:\x00@ \x00\n\x00invalid page number %d\x002nd reference to page %d\x00Failed to read ptrmap key=%d\x00Bad ptr map entry key=%d expected=(%d,%d) got=(%d,%d)\x00failed to get page %d\x00freelist leaf count too big on page %d\x00%s is %d but should be %d\x00size\x00overflow list length\x00Page %u: \x00unable to get the page. error code=%d\x00btreeInitPage() returns error code %d\x00free space corruption\x00On tree page %u cell %d: \x00On page %u at right child: \x00Offset %d out of range %d..%d\x00Extends off end of page\x00Rowid %lld out of order\x00Child page depth differs\x00Multiple uses for byte %u of page %u\x00Fragmentation of %d bytes reported as %d on page %u\x00Main freelist: \x00max rootpage (%d) disagrees with header (%d)\x00incremental_vacuum enabled with a max rootpage of zero\x00Page %d is never used\x00Pointer map page %d is referenced\x00unknown database %s\x00destination database is in use\x00source and destination must be distinct\x00%!.15g\x00-\x00%s%s\x00k(%d\x00B\x00,%s%s%s\x00N.\x00)\x00%.18s-%s\x00%s(%d)\x00%lld\x00%d\x00(blob)\x00vtab:%p\x00%c%u\x00]\x00program\x00?\x008\x0016LE\x0016BE\x00addr\x00opcode\x00p1\x00p2\x00p3\x00p4\x00p5\x00comment\x00id\x00parent\x00notused\x00detail\x00%.4c%s%.16c\x00MJ delete: %s\x00MJ collide: %s\x00-mj%06X9%02X\x00FOREIGN KEY constraint failed\x00a CHECK constraint\x00a generated column\x00an index\x00non-deterministic use of %s() in %s\x00API called with finalized prepared statement\x00API called with NULL prepared statement\x00string or blob too big\x00bind on a busy prepared statement: [%s]\x00-- \x00'%.*q'\x00zeroblob(%d)\x00x'\x00%02x\x00'\x00%s constraint failed\x00%z: %s\x00abort at %d in [%s]: %s\x00cannot open savepoint - SQL statements in progress\x00no such savepoint: %s\x00cannot release savepoint - SQL statements in progress\x00cannot commit transaction - SQL statements in progress\x00cannot start a transaction within a transaction\x00cannot rollback - no transaction is active\x00cannot commit - no transaction is active\x00database schema has changed\x00index corruption\x00sqlite_master\x00SELECT*FROM\"%w\".%s WHERE %s ORDER BY rowid\x00too many levels of trigger recursion\x00cannot change %s wal mode from within a transaction\x00into\x00out of\x00database table is locked: %s\x00-- %s\x00statement aborts at %d: [%s] %s\x00out of memory\x00NOT NULL\x00UNIQUE\x00CHECK\x00FOREIGN KEY\x00cannot open value of type %s\x00null\x00real\x00integer\x00no such rowid: %lld\x00cannot open virtual table: %s\x00cannot open table without rowid: %s\x00cannot open view: %s\x00no such column: \"%s\"\x00foreign key\x00indexed\x00cannot open %s column for writing\x00main\x00new\x00old\x00excluded\x00misuse of aliased aggregate %s\x00misuse of aliased window function %s\x00row value misused\x00double-quoted string literal: \"%w\"\x00no such column\x00ambiguous column name\x00%s: %s.%s.%s\x00%s: %s.%s\x00%s: %s\x00partial index WHERE clauses\x00index expressions\x00CHECK constraints\x00generated columns\x00%s prohibited in %s\x00true\x00false\x00the \".\" operator\x00second argument to likelihood() must be a constant between 0.0 and 1.0\x00not authorized to use function: %s\x00non-deterministic functions\x00%.*s() may not be used as a window function\x00window\x00aggregate\x00misuse of %s function %.*s()\x00no such function: %.*s\x00wrong number of arguments to function %.*s()\x00FILTER may not be used with non-aggregate %.*s()\x00subqueries\x00parameters\x00%r %s BY term out of range - should be between 1 and %d\x00too many terms in ORDER BY clause\x00ORDER\x00%r ORDER BY term does not match any column in the result set\x00too many terms in %s BY clause\x00a GROUP BY clause is required before HAVING\x00GROUP\x00aggregate functions are not allowed in the GROUP BY clause\x00Expression tree is too large (maximum depth %d)\x000\x00too many arguments on function %T\x00unsafe use of %s()\x00variable number must be between ?1 and ?%d\x00too many SQL variables\x00%d columns assigned %d values\x00too many columns in %s\x00_ROWID_\x00ROWID\x00OID\x00USING ROWID SEARCH ON TABLE %s FOR IN-OPERATOR\x00USING INDEX %s FOR IN-OPERATOR\x00sub-select returns %d columns - expected %d\x00REUSE LIST SUBQUERY %d\x00%sLIST SUBQUERY %d\x00CORRELATED \x00REUSE SUBQUERY %d\x00%sSCALAR SUBQUERY %d\x001\x000x\x00hex literal too big: %s%s\x00generated column loop on \"%s\"\x00misuse of aggregate: %s()\x00unknown function: %s()\x00RAISE() may only be used within a trigger-program\x00B\x00C\x00D\x00E\x00sqlite_\x00table %s may not be altered\x00SELECT 1 FROM \"%w\".sqlite_master WHERE name NOT LIKE 'sqliteX_%%' ESCAPE 'X' AND sql NOT LIKE 'create virtual%%' AND sqlite_rename_test(%Q, sql, type, name, %d, %Q, %Q)=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, %Q)=NULL \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\x00virtual tables may not be altered\x00Cannot add a column to a view\x00sqlite_altertab_%s\x00view\x00virtual table\x00cannot %s %s \"%s\"\x00drop column from\x00rename columns of\x00UPDATE \"%w\".sqlite_master SET sql = sqlite_rename_column(sql, type, name, %Q, %Q, %d, %Q, %d, %d) WHERE name NOT LIKE 'sqliteX_%%' ESCAPE 'X' AND (type != 'index' OR tbl_name = %Q) AND sql NOT LIKE 'create virtual%%'\x00UPDATE temp.sqlite_master SET sql = sqlite_rename_column(sql, type, name, %Q, %Q, %d, %Q, %d, 1) WHERE type IN ('trigger', 'view')\x00error in %s %s%s%s: %s\x00 \x00\"%w\"\x00%.*s%s\x00cannot drop %s column: \"%s\"\x00PRIMARY KEY\x00cannot drop column \"%s\": no other columns exist\x00UPDATE \"%w\".sqlite_master SET sql = sqlite_drop_column(%d, sql, %d) WHERE (type=='table' AND tbl_name=%Q COLLATE nocase)\x00after drop column\x00sqlite_rename_column\x00sqlite_rename_table\x00sqlite_rename_test\x00sqlite_drop_column\x00CREATE TABLE %Q.%s(%s)\x00DELETE FROM %Q.%s WHERE %s=%Q\x00DELETE FROM %Q.%s\x00sqlite_stat1\x00tbl,idx,stat\x00sqlite_stat4\x00tbl,idx,neq,nlt,ndlt,sample\x00sqlite_stat3\x00stat_init\x00stat_push\x00%llu\x00 %llu\x00%llu \x00stat_get\x00sqlite\\_%\x00BBB\x00idx\x00tbl\x00unordered*\x00sz=[0-9]*\x00noskipscan*\x00SELECT idx,count(*) FROM %Q.sqlite_stat4 GROUP BY idx\x00SELECT idx,neq,nlt,ndlt,sample FROM %Q.sqlite_stat4\x00SELECT tbl,idx,stat FROM %Q.sqlite_stat1\x00memdb\x00x\x00\x00too many attached databases - max %d\x00database %s is already in use\x00database is already attached\x00attached databases must use the same text encoding as main database\x00unable to open database: %s\x00no such database: %s\x00cannot detach database %s\x00database %s is locked\x00sqlite_detach\x00sqlite_attach\x00%s cannot use variables\x00%s %T cannot reference objects in database %s\x00authorizer malfunction\x00%s.%s\x00%s.%z\x00access to %z is prohibited\x00not authorized\x00sqlite_temp_schema\x00sqlite_schema\x00sqlite_temp_master\x00pragma_\x00no such view\x00no such table\x00corrupt database\x00unknown database %T\x00object name reserved for internal use: %s\x00temporary table name must be unqualified\x00table %T already exists\x00there is already an index named %s\x00sqlite_returning\x00cannot use RETURNING in a trigger\x00too many columns on %s\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\x00INTEGER\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\x00AUTOINCREMENT not allowed on WITHOUT ROWID tables\x00PRIMARY KEY missing on table %s\x00must have at least one non-generated column\x00TABLE\x00VIEW\x00CREATE %s %.*s\x00UPDATE %Q.sqlite_master SET type='%s', name=%Q, tbl_name=%Q, rootpage=#%d, sql=%Q WHERE rowid=#%d\x00CREATE TABLE %Q.sqlite_sequence(name,seq)\x00tbl_name='%q' AND type!='trigger'\x00parameters are not allowed in views\x00view %s is circularly defined\x00corrupt schema\x00UPDATE %Q.sqlite_master SET rootpage=%d WHERE #%d AND rootpage=#%d\x00sqlite_stat%d\x00DELETE FROM %Q.sqlite_sequence WHERE name=%Q\x00DELETE FROM %Q.sqlite_master WHERE tbl_name=%Q and type!='trigger'\x00table %s may not be dropped\x00use DROP TABLE to delete table %s\x00use DROP VIEW to delete view %s\x00foreign key on %s should reference only one column of table %T\x00number of columns in foreign key does not match the number of columns in the referenced table\x00unknown column \"%s\" in foreign key definition\x00unsupported use of NULLS %s\x00FIRST\x00LAST\x00index\x00cannot create a TEMP index on non-TEMP table \"%s\"\x00table %s may not be indexed\x00views may not be indexed\x00virtual tables may not be indexed\x00there is already a table named %s\x00index %s already exists\x00sqlite_autoindex_%s_%d\x00expressions prohibited in PRIMARY KEY and UNIQUE constraints\x00conflicting ON CONFLICT clauses specified\x00invalid rootpage\x00CREATE%s INDEX %.*s\x00 UNIQUE\x00INSERT INTO %Q.sqlite_master VALUES('index',%Q,%Q,#%d,%Q);\x00name='%q' AND type='index'\x00no such index: %S\x00index associated with UNIQUE or PRIMARY KEY constraint cannot be dropped\x00DELETE FROM %Q.sqlite_master WHERE name=%Q AND type='index'\x00too many FROM clause terms, max: %d\x00a JOIN clause is required before %s\x00ON\x00USING\x00BEGIN\x00ROLLBACK\x00COMMIT\x00RELEASE\x00unable to open a temporary database file for storing temporary tables\x00index '%q'\x00, \x00%s.rowid\x00unable to identify the object to be reindexed\x00duplicate WITH table name: %s\x00no such collation sequence: %s\x00table %s may not be modified\x00cannot modify %s because it is a view\x00rows deleted\x00text\x00blob\x00integer overflow\x00%.*f\x00LIKE or GLOB pattern too complex\x00ESCAPE expression must be a single character\x00%!.20e\x00?000\x00MATCH\x00like\x00implies_nonnull_row\x00expr_compare\x00expr_implies_expr\x00soundex\x00load_extension\x00sqlite_compileoption_used\x00sqlite_compileoption_get\x00unlikely\x00likelihood\x00likely\x00sqlite_offset\x00ltrim\x00rtrim\x00trim\x00min\x00max\x00typeof\x00length\x00instr\x00printf\x00unicode\x00char\x00abs\x00round\x00upper\x00lower\x00hex\x00ifnull\x00random\x00randomblob\x00nullif\x00sqlite_version\x00sqlite_source_id\x00sqlite_log\x00quote\x00last_insert_rowid\x00changes\x00total_changes\x00replace\x00zeroblob\x00substr\x00substring\x00sum\x00total\x00avg\x00count\x00group_concat\x00glob\x00coalesce\x00sign\x00iif\x00foreign key mismatch - \"%w\" referencing \"%w\"\x00cannot INSERT into generated column \"%s\"\x00table %S has no column named %s\x00table %S has %d columns but %d values were supplied\x00%d values for %d columns\x00UPSERT not implemented for virtual table \"%s\"\x00cannot UPSERT a view\x00rows inserted\x00sqlite3_extension_init\x00unable to open shared library [%s]\x00sqlite3_\x00lib\x00_init\x00no entry point [%s] in shared library [%s]\x00error during initialization: %s\x00so\x00automatic extension loading failed: %s\x00seq\x00from\x00to\x00on_update\x00on_delete\x00match\x00cid\x00name\x00type\x00notnull\x00dflt_value\x00pk\x00hidden\x00seqno\x00desc\x00coll\x00key\x00builtin\x00enc\x00narg\x00flags\x00wdth\x00hght\x00flgs\x00unique\x00origin\x00partial\x00rowid\x00fkid\x00file\x00busy\x00log\x00checkpointed\x00database\x00status\x00cache_size\x00timeout\x00analysis_limit\x00application_id\x00auto_vacuum\x00automatic_index\x00busy_timeout\x00cache_spill\x00case_sensitive_like\x00cell_size_check\x00checkpoint_fullfsync\x00collation_list\x00compile_options\x00count_changes\x00data_version\x00database_list\x00default_cache_size\x00defer_foreign_keys\x00empty_result_callbacks\x00encoding\x00foreign_key_check\x00foreign_key_list\x00foreign_keys\x00freelist_count\x00full_column_names\x00fullfsync\x00function_list\x00hard_heap_limit\x00ignore_check_constraints\x00incremental_vacuum\x00index_info\x00index_list\x00index_xinfo\x00integrity_check\x00journal_mode\x00journal_size_limit\x00legacy_alter_table\x00locking_mode\x00max_page_count\x00mmap_size\x00module_list\x00optimize\x00page_count\x00page_size\x00pragma_list\x00query_only\x00quick_check\x00read_uncommitted\x00recursive_triggers\x00reverse_unordered_selects\x00schema_version\x00secure_delete\x00short_column_names\x00shrink_memory\x00soft_heap_limit\x00synchronous\x00table_info\x00table_xinfo\x00temp_store\x00temp_store_directory\x00threads\x00trusted_schema\x00user_version\x00wal_autocheckpoint\x00wal_checkpoint\x00writable_schema\x00onoffalseyestruextrafull\x00exclusive\x00normal\x00none\x00full\x00incremental\x00memory\x00temporary storage cannot be changed from within a transaction\x00SET NULL\x00SET DEFAULT\x00CASCADE\x00RESTRICT\x00NO ACTION\x00delete\x00persist\x00off\x00truncate\x00wal\x00w\x00a\x00s\x00sissii\x00utf8\x00utf16le\x00utf16be\x00-%T\x00fast\x00not a writable directory\x00Safety level may not be changed inside a transaction\x00issisii\x00issisi\x00iisX\x00isiX\x00c\x00u\x00isisi\x00iss\x00is\x00iissssss\x00NONE\x00siX\x00*** in database %s ***\n\x00NULL value in %s.%s\x00CHECK constraint failed in %s\x00row \x00 missing from index \x00non-unique entry in index \x00wrong # of entries in index \x00ok\x00unsupported encoding: %s\x00restart\x00ANALYZE \"%w\".\"%w\"\x00UTF8\x00UTF-8\x00UTF-16le\x00UTF-16be\x00UTF16le\x00UTF16be\x00UTF-16\x00UTF16\x00CREATE TABLE x\x00%c\"%s\"\x00(\"%s\"\x00,arg HIDDEN\x00,schema HIDDEN\x00PRAGMA \x00%Q.\x00=%Q\x00error in %s %s after %s: %s\x00rename\x00drop column\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 or unsupported join type: %T %T%s%T\x00RIGHT and FULL OUTER JOINs are not currently supported\x00naturaleftouterightfullinnercross\x00a NATURAL join may not have an ON or USING clause\x00cannot have both ON and USING clauses in the same join\x00cannot join using column %s - column not present in both tables\x00UNION ALL\x00INTERSECT\x00EXCEPT\x00UNION\x00USE TEMP B-TREE FOR %s\x00column%d\x00%.*z:%u\x00cannot use window functions in recursive queries\x00recursive aggregate queries not supported\x00SETUP\x00RECURSIVE STEP\x00SCAN %d CONSTANT ROW%s\x00S\x00COMPOUND QUERY\x00LEFT-MOST SUBQUERY\x00%s USING TEMP B-TREE\x00all VALUES must have the same number of terms\x00SELECTs to the left and right of %s do not have the same number of result columns\x00MERGE (%s)\x00LEFT\x00RIGHT\x00no such index: %s\x00'%s' is not a function\x00multiple references to recursive table: %s\x00circular reference: %s\x00table %s has %d values for %d columns\x00multiple recursive references: %s\x00recursive reference in a subquery: %s\x00subquery_%u\x00too many references to \"%s\": max 65535\x00access to view \"%s\" prohibited\x00unsafe use of virtual table \"%s\"\x00*\x00%s.%s.%s\x00no such table: %s\x00no tables specified\x00too many columns in result set\x00DISTINCT aggregates must have exactly one argument\x00SCAN TABLE %s%s%s\x00 USING COVERING INDEX \x00target object/alias may not appear in FROM clause: %s\x00expected %d columns for '%s' but got %d\x00CO-ROUTINE %u\x00MATERIALIZE %u\x00DISTINCT\x00GROUP BY\x00RIGHT PART OF ORDER BY\x00ORDER BY\x00sqlite3_get_table() called with two or more incompatible queries\x00temporary trigger may not have qualified name\x00trigger\x00cannot create triggers on virtual tables\x00trigger %T already exists\x00cannot create trigger on system table\x00cannot create %s trigger on view: %S\x00BEFORE\x00AFTER\x00cannot create INSTEAD OF trigger on table: %S\x00INSERT INTO %Q.sqlite_master VALUES('trigger',%Q,%Q,0,'CREATE TRIGGER %q')\x00type='trigger' AND name='%q'\x00no such trigger: %S\x00DELETE FROM %Q.sqlite_master WHERE name=%Q AND type='trigger'\x00%s RETURNING is not available on virtual tables\x00DELETE\x00UPDATE\x00RETURNING may not use \"TABLE.*\" wildcards\x00-- TRIGGER %s\x00cannot UPDATE generated column \"%s\"\x00no such column: %s\x00rows updated\x00%r \x00%sON CONFLICT clause does not match any PRIMARY KEY or UNIQUE constraint\x00CRE\x00INS\x00cannot VACUUM from within a transaction\x00cannot VACUUM - SQL statements in progress\x00non-text filename\x00ATTACH %Q AS vacuum_db\x00output file already exists\x00SELECT sql FROM \"%w\".sqlite_schema WHERE type='table'AND name<>'sqlite_sequence' AND coalesce(rootpage,1)>0\x00SELECT sql FROM \"%w\".sqlite_schema WHERE type='index'\x00SELECT'INSERT INTO vacuum_db.'||quote(name)||' SELECT*FROM\"%w\".'||quote(name)FROM vacuum_db.sqlite_schema WHERE type='table'AND coalesce(rootpage,1)>0\x00INSERT INTO vacuum_db.sqlite_schema SELECT*FROM \"%w\".sqlite_schema WHERE type IN('view','trigger') OR(type='table'AND rootpage=0)\x00CREATE VIRTUAL TABLE %T\x00UPDATE %Q.sqlite_master SET type='table', name=%Q, tbl_name=%Q, rootpage=0, sql=%Q WHERE rowid=#%d\x00name=%Q AND sql=%Q\x00vtable constructor called recursively: %s\x00vtable constructor failed: %s\x00vtable constructor did not declare schema: %s\x00no such module: %s\x00\x00 AND \x00(\x00 (\x00%s=?\x00ANY(%s)\x00>\x00<\x00SEARCH\x00SCAN\x00 SUBQUERY %u\x00 TABLE %s\x00 AS %s\x00AUTOMATIC PARTIAL COVERING INDEX\x00AUTOMATIC COVERING INDEX\x00COVERING INDEX %s\x00INDEX %s\x00 USING \x00=\x00>? AND rowid<\x00 USING INTEGER PRIMARY KEY (rowid%s?)\x00 VIRTUAL TABLE INDEX %d:%s\x00MULTI-INDEX OR\x00INDEX %d\x00regexp\x00ON clause references tables to its right\x00NOCASE\x00too many arguments on %s() - max %d\x00automatic index on %s(%s)\x00auto-index\x00%s.xBestIndex malfunction\x00abbreviated query algorithm search\x00no query solution\x00at most %d tables in a join\x00SCAN CONSTANT ROW\x00second argument to nth_value must be a positive integer\x00argument of ntile must be a positive integer\x00row_number\x00dense_rank\x00rank\x00percent_rank\x00cume_dist\x00ntile\x00last_value\x00nth_value\x00first_value\x00lead\x00lag\x00no such window: %s\x00RANGE with offset PRECEDING/FOLLOWING requires one ORDER BY expression\x00FILTER clause may only be used with aggregate window functions\x00unsupported frame specification\x00PARTITION clause\x00ORDER BY clause\x00frame specification\x00cannot override %s of window: %s\x00DISTINCT is not supported for window functions\x00frame starting offset must be a non-negative integer\x00frame ending offset must be a non-negative integer\x00frame starting offset must be a non-negative number\x00frame ending offset must be a non-negative number\x00%s clause should come after %s not before\x00LIMIT\x00too many terms in compound SELECT\x00syntax error after column name \"%.*s\"\x00parser stack overflow\x00unknown table option: %.*s\x00set list\x00near \"%T\": syntax error\x00qualified table names are not allowed on INSERT, UPDATE, and DELETE statements within triggers\x00the INDEXED BY clause is not allowed on UPDATE or DELETE statements within triggers\x00the NOT INDEXED clause is not allowed on UPDATE or DELETE statements within triggers\x00incomplete input\x00unrecognized token: \"%.*s\"\x00%s in \"%s\"\x00create\x00temp\x00temporary\x00end\x00explain\x00unable to close due to unfinalized statements or unfinished backups\x00unknown error\x00abort due to ROLLBACK\x00another row available\x00no more rows available\x00not an error\x00SQL logic error\x00access permission denied\x00query aborted\x00database is locked\x00database table is locked\x00attempt to write a readonly database\x00interrupted\x00disk I/O error\x00database disk image is malformed\x00unknown operation\x00database or disk is full\x00unable to open database file\x00locking protocol\x00constraint failed\x00datatype mismatch\x00bad parameter or other API misuse\x00authorization denied\x00column index out of range\x00file is not a database\x00notification message\x00warning message\x00unable to delete/modify user-function due to active statements\x00unable to use function %s in the requested context\x00unknown database: %s\x00unable to delete/modify collation sequence due to active statements\x00file:\x00localhost\x00invalid uri authority: %.*s\x00vfs\x00cache\x00mode\x00no such %s mode: %s\x00%s mode not allowed: %s\x00no such vfs: %s\x00shared\x00private\x00ro\x00rw\x00rwc\x00RTRIM\x00\x00\x00\x00%s at line %d of [%.10s]\x00database corruption\x00misuse\x00cannot open file\x00no such table column: %s.%s\x00SQLITE_\x00database is deadlocked\x00array\x00object\x000123456789abcdef\x00JSON cannot hold BLOB values\x00malformed JSON\x00[0]\x00JSON path error near '%q'\x00json_%s() needs an odd number of arguments\x00json_object() requires an even number of arguments\x00json_object() labels must be TEXT\x00set\x00insert\x00[]\x00{}\x00CREATE TABLE x(key,value,type,atom,id,parent,fullkey,path,json HIDDEN,root HIDDEN)\x00[%d]\x00.%.*s\x00$\x00json\x00json_array\x00json_array_length\x00json_extract\x00json_insert\x00json_object\x00json_patch\x00json_quote\x00json_remove\x00json_replace\x00json_set\x00json_type\x00json_valid\x00json_group_array\x00json_group_object\x00json_each\x00json_tree\x00%s_node\x00data\x00DROP TABLE '%q'.'%q_node';DROP TABLE '%q'.'%q_rowid';DROP TABLE '%q'.'%q_parent';\x00RtreeMatchArg\x00SELECT * FROM %Q.%Q\x00UNIQUE constraint failed: %s.%s\x00rtree constraint failed: %s.(%s<=%s)\x00ALTER TABLE %Q.'%q_node' RENAME TO \"%w_node\";ALTER TABLE %Q.'%q_parent' RENAME TO \"%w_parent\";ALTER TABLE %Q.'%q_rowid' RENAME TO \"%w_rowid\";\x00SELECT stat FROM %Q.sqlite_stat1 WHERE tbl = '%q_rowid'\x00node\x00CREATE TABLE \"%w\".\"%w_rowid\"(rowid INTEGER PRIMARY KEY,nodeno\x00,a%d\x00);CREATE TABLE \"%w\".\"%w_node\"(nodeno INTEGER PRIMARY KEY,data);\x00CREATE TABLE \"%w\".\"%w_parent\"(nodeno INTEGER PRIMARY KEY,parentnode);\x00INSERT INTO \"%w\".\"%w_node\"VALUES(1,zeroblob(%d))\x00INSERT INTO\"%w\".\"%w_rowid\"(rowid,nodeno)VALUES(?1,?2)ON CONFLICT(rowid)DO UPDATE SET nodeno=excluded.nodeno\x00SELECT * FROM \"%w\".\"%w_rowid\" WHERE rowid=?1\x00UPDATE \"%w\".\"%w_rowid\"SET \x00a%d=coalesce(?%d,a%d)\x00a%d=?%d\x00 WHERE rowid=?1\x00INSERT OR REPLACE INTO '%q'.'%q_node' VALUES(?1, ?2)\x00DELETE FROM '%q'.'%q_node' WHERE nodeno = ?1\x00SELECT nodeno FROM '%q'.'%q_rowid' WHERE rowid = ?1\x00INSERT OR REPLACE INTO '%q'.'%q_rowid' VALUES(?1, ?2)\x00DELETE FROM '%q'.'%q_rowid' WHERE rowid = ?1\x00SELECT parentnode FROM '%q'.'%q_parent' WHERE nodeno = ?1\x00INSERT OR REPLACE INTO '%q'.'%q_parent' VALUES(?1, ?2)\x00DELETE FROM '%q'.'%q_parent' WHERE nodeno = ?1\x00PRAGMA %Q.page_size\x00SELECT length(data) FROM '%q'.'%q_node' WHERE nodeno = 1\x00undersize RTree blobs in \"%q_node\"\x00Wrong number of columns for an rtree table\x00Too few columns for an rtree table\x00Too many columns for an rtree table\x00Auxiliary rtree columns must be last\x00CREATE TABLE x(%.*s INT\x00,%.*s\x00);\x00,%.*s REAL\x00,%.*s INT\x00{%lld\x00 %g\x00}\x00Invalid argument to rtreedepth()\x00%z%s%z\x00SELECT data FROM %Q.'%q_node' WHERE nodeno=?\x00Node %lld missing from database\x00SELECT parentnode FROM %Q.'%q_parent' WHERE nodeno=?1\x00SELECT nodeno FROM %Q.'%q_rowid' WHERE rowid=?1\x00Mapping (%lld -> %lld) missing from %s table\x00%_rowid\x00%_parent\x00Found (%lld -> %lld) in %s table, expected (%lld -> %lld)\x00Dimension %d of cell %d on node %lld is corrupt\x00Dimension %d of cell %d on node %lld is corrupt relative to parent\x00Node %lld is too small (%d bytes)\x00Rtree depth out of range (%d)\x00Node %lld is too small for cell count of %d (%d bytes)\x00SELECT count(*) FROM %Q.'%q%s'\x00Wrong number of entries in %%%s table - expected %lld, actual %lld\x00SELECT * FROM %Q.'%q_rowid'\x00Schema corrupt or not an rtree\x00_rowid\x00_parent\x00END\x00wrong number of arguments to function rtreecheck()\x00[\x00[%!g,%!g],\x00[%!g,%!g]]\x00\x00CREATE TABLE x(_shape\x00,%s\x00rtree\x00fullscan\x00_shape does not contain a valid polygon\x00geopoly_overlap\x00geopoly_within\x00geopoly\x00geopoly_area\x00geopoly_blob\x00geopoly_json\x00geopoly_svg\x00geopoly_contains_point\x00geopoly_debug\x00geopoly_bbox\x00geopoly_xform\x00geopoly_regular\x00geopoly_ccw\x00geopoly_group_bbox\x00rtreenode\x00rtreedepth\x00rtreecheck\x00rtree_i32\x00corrupt fossil delta\x00DROP TRIGGER IF EXISTS temp.rbu_insert_tr;DROP TRIGGER IF EXISTS temp.rbu_update1_tr;DROP TRIGGER IF EXISTS temp.rbu_update2_tr;DROP TRIGGER IF EXISTS temp.rbu_delete_tr;\x00SELECT rbu_target_name(name, type='view') AS target, name FROM sqlite_schema WHERE type IN ('table', 'view') AND target IS NOT NULL %s ORDER BY name\x00AND rootpage!=0 AND rootpage IS NOT NULL\x00SELECT name, rootpage, sql IS NULL OR substr(8, 6)=='UNIQUE' FROM main.sqlite_schema WHERE type='index' AND tbl_name = ?\x00SELECT (sql LIKE 'create virtual%%'), rootpage FROM sqlite_schema WHERE name=%Q\x00PRAGMA index_list=%Q\x00SELECT rootpage FROM sqlite_schema WHERE name = %Q\x00PRAGMA table_info=%Q\x00PRAGMA main.index_list = %Q\x00PRAGMA main.index_xinfo = %Q\x00SELECT * FROM '%q'\x00rbu_\x00rbu_rowid\x00table %q %s rbu_rowid column\x00may not have\x00requires\x00PRAGMA table_info(%Q)\x00column missing from %q: %s\x00%z%s\"%w\"\x00%z%s%s\"%w\"%s\x00SELECT max(_rowid_) FROM \"%s%w\"\x00 WHERE _rowid_ > %lld \x00 DESC\x00quote(\x00||','||\x00SELECT %s FROM \"%s%w\" ORDER BY %s LIMIT 1\x00 WHERE (%s) > (%s) \x00_rowid_\x00%z%s \"%w\" COLLATE %Q\x00%z%s \"rbu_imp_%d%w\" COLLATE %Q DESC\x00%z%s quote(\"rbu_imp_%d%w\")\x00SELECT %s FROM \"rbu_imp_%w\" ORDER BY %s LIMIT 1\x00%z%s%s\x00(%s) > (%s)\x00%z%s(%.*s) COLLATE %Q\x00%z%s\"%w\" COLLATE %Q\x00%z%s\"rbu_imp_%d%w\"%s\x00%z%s\"rbu_imp_%d%w\" %s COLLATE %Q\x00%z%s\"rbu_imp_%d%w\" IS ?\x00%z%s%s.\"%w\"\x00%z%sNULL\x00%z, %s._rowid_\x00_rowid_ = ?%d\x00%z%sc%d=?%d\x00_rowid_ = (SELECT id FROM rbu_imposter2 WHERE %z)\x00%z%s\"%w\"=?%d\x00invalid rbu_control value\x00%z%s\"%w\"=rbu_delta(\"%w\", ?%d)\x00%z%s\"%w\"=rbu_fossil_delta(\"%w\", ?%d)\x00PRIMARY KEY(\x00%z%s\"%w\"%s\x00%z)\x00SELECT name FROM sqlite_schema WHERE rootpage = ?\x00%z%sc%d %s COLLATE %Q\x00%z%sc%d%s\x00%z, id INTEGER\x00CREATE TABLE rbu_imposter2(%z, PRIMARY KEY(%z)) WITHOUT ROWID\x00PRIMARY KEY \x00%z%s\"%w\" %s %sCOLLATE %Q%s\x00 NOT NULL\x00%z, %z\x00CREATE TABLE \"rbu_imp_%w\"(%z)%s\x00 WITHOUT ROWID\x00INSERT INTO %s.'rbu_tmp_%q'(rbu_control,%s%s) VALUES(%z)\x00SELECT trim(sql) FROM sqlite_schema WHERE type='index' AND name=?\x00 LIMIT -1 OFFSET %d\x00CREATE TABLE \"rbu_imp_%w\"( %s, PRIMARY KEY( %s ) ) WITHOUT ROWID\x00INSERT INTO \"rbu_imp_%w\" VALUES(%s)\x00DELETE FROM \"rbu_imp_%w\" WHERE %s\x00SELECT %s, 0 AS rbu_control FROM '%q' %s %s %s ORDER BY %s%s\x00AND\x00WHERE\x00SELECT %s, rbu_control FROM %s.'rbu_tmp_%q' %s ORDER BY %s%s\x00SELECT %s, rbu_control FROM %s.'rbu_tmp_%q' %s UNION ALL SELECT %s, rbu_control FROM '%q' %s %s typeof(rbu_control)='integer' AND rbu_control!=1 ORDER BY %s%s\x00rbu_imp_\x00INSERT INTO \"%s%w\"(%s%s) VALUES(%s)\x00, _rowid_\x00DELETE FROM \"%s%w\" WHERE %s\x00, rbu_rowid\x00CREATE TABLE IF NOT EXISTS %s.'rbu_tmp_%q' AS SELECT *%s FROM '%q' WHERE 0;\x00, 0 AS rbu_rowid\x00CREATE TEMP TRIGGER rbu_delete_tr BEFORE DELETE ON \"%s%w\" BEGIN SELECT rbu_tmp_insert(3, %s);END;CREATE TEMP TRIGGER rbu_update1_tr BEFORE UPDATE ON \"%s%w\" BEGIN SELECT rbu_tmp_insert(3, %s);END;CREATE TEMP TRIGGER rbu_update2_tr AFTER UPDATE ON \"%s%w\" BEGIN SELECT rbu_tmp_insert(4, %s);END;\x00CREATE TEMP TRIGGER rbu_insert_tr AFTER INSERT ON \"%s%w\" BEGIN SELECT rbu_tmp_insert(0, %s);END;\x00,_rowid_ \x00,rbu_rowid\x00SELECT %s,%s rbu_control%s FROM '%q'%s %s %s %s\x000 AS \x00UPDATE \"%s%w\" SET %s WHERE %s\x00SELECT k, v FROM %s.rbu_state\x00file://%s-vacuum?modeof=%s\x00ATTACH %Q AS stat\x00CREATE TABLE IF NOT EXISTS %s.rbu_state(k INTEGER PRIMARY KEY, v)\x00cannot vacuum wal mode database\x00file:%s-vactmp?rbu_memory=1%s%s\x00&\x00rbu_tmp_insert\x00rbu_fossil_delta\x00rbu_target_name\x00SELECT * FROM sqlite_schema\x00rbu vfs not found\x00PRAGMA main.wal_checkpoint=restart\x00%s-oal\x00%s-wal\x00PRAGMA schema_version\x00PRAGMA schema_version = %d\x00INSERT OR REPLACE INTO %s.rbu_state(k, v) VALUES (%d, %d), (%d, %Q), (%d, %Q), (%d, %d), (%d, %d), (%d, %lld), (%d, %lld), (%d, %lld), (%d, %lld), (%d, %Q) \x00PRAGMA main.%s\x00PRAGMA main.%s = %d\x00PRAGMA writable_schema=1\x00SELECT sql FROM sqlite_schema WHERE sql!='' AND rootpage!=0 AND name!='sqlite_sequence' ORDER BY type DESC\x00SELECT * FROM sqlite_schema WHERE rootpage=0 OR rootpage IS NULL\x00INSERT INTO sqlite_schema VALUES(?,?,?,?,?)\x00PRAGMA writable_schema=0\x00DELETE FROM %s.'rbu_tmp_%q'\x00rbu_state mismatch error\x00rbu_vfs_%d\x00SELECT count(*) FROM sqlite_schema WHERE type='index' AND tbl_name = %Q\x00rbu_index_cnt\x00SELECT 1 FROM sqlite_schema WHERE tbl_name = 'rbu_count'\x00SELECT sum(cnt * (1 + rbu_index_cnt(rbu_target_name(tbl))))FROM rbu_count\x00cannot update wal mode database\x00database modified during rbu %s\x00vacuum\x00update\x00BEGIN IMMEDIATE\x00PRAGMA journal_mode=off\x00-vactmp\x00DELETE FROM stat.rbu_state\x00rbu/zipvfs setup error\x00rbu(%s)/%z\x00rbu_memory\x00fts5: parser stack overflow\x00fts5: syntax error near \"%.*s\"\x00%z%.*s\x00wrong number of arguments to function highlight()\x00wrong number of arguments to function snippet()\x00snippet\x00highlight\x00bm25\x00prefix\x00malformed prefix=... directive\x00too many prefix indexes (max %d)\x00prefix length out of range (max 999)\x00tokenize\x00multiple tokenize=... directives\x00parse error in tokenize directive\x00content\x00multiple content=... directives\x00%Q.%Q\x00content_rowid\x00multiple content_rowid=... directives\x00columnsize\x00malformed columnsize=... directive\x00columns\x00malformed detail=... directive\x00unrecognized option: \"%.*s\"\x00reserved fts5 column name: %s\x00unindexed\x00unrecognized column option: %s\x00T.%Q\x00, T.%Q\x00, T.c%d\x00reserved fts5 table name: %s\x00parse error in \"%s\"\x00docsize\x00%Q.'%q_%s'\x00CREATE TABLE x(\x00%z%s%Q\x00%z, %Q HIDDEN, %s HIDDEN)\x00pgsz\x00hashsize\x00automerge\x00usermerge\x00crisismerge\x00SELECT k, v FROM %Q.'%q_config'\x00version\x00invalid fts5 file format (found %d, expected %d) - run 'rebuild'\x00unterminated string\x00fts5: syntax error near \"%.1s\"\x00OR\x00NOT\x00NEAR\x00expected integer, got \"%.*s\"\x00fts5: column queries are not supported (detail=none)\x00fts5: %s queries are not supported (detail!=full)\x00phrase\x00%s \x00-col %d \x00-col {%d\x00 %d\x00} \x00-near %d \x00--\x00 {\x00 [%z]\x00\"\"\x00{\x00%s : \x00NEAR(\x00 + \x00, %d)\x00 NOT \x00 OR \x00%s%s%z%s\x00nearset\x00wrong number of arguments to function %s\x00fts5_expr_tcl\x00fts5_expr\x00wrong number of arguments to function fts5_isalnum\x00L*\x00N*\x00Co\x00wrong number of arguments to function fts5_fold\x00fts5_isalnum\x00fts5_fold\x00block\x00REPLACE INTO '%q'.'%q_data'(id, block) VALUES(?,?)\x00DELETE FROM '%q'.'%q_data' WHERE id>=? AND id<=?\x00DELETE FROM '%q'.'%q_idx' WHERE segid=?\x00PRAGMA %Q.data_version\x00SELECT pgno FROM '%q'.'%q_idx' WHERE segid=? AND term<=? ORDER BY term DESC LIMIT 1\x00INSERT INTO '%q'.'%q_idx'(segid,term,pgno) VALUES(?,?,?)\x00%s_data\x00id INTEGER PRIMARY KEY, block BLOB\x00segid, term, pgno, PRIMARY KEY(segid, term)\x00SELECT segid, term, (pgno>>1), (pgno&1) FROM %Q.'%q_idx' WHERE segid=%d ORDER BY 1, 2\x00\x00\x00\x00\x00\x00{averages} \x00{structure}\x00{%ssegid=%d h=%d pgno=%d}\x00dlidx \x00 {lvl=%d nMerge=%d nSeg=%d\x00 {id=%d leaves=%d..%d}\x00%s%d\x00 id=%lld\x00 nPos=%d%s\x00+\x00 %lld%s\x00 %d(%lld)\x00 term=%.*s\x00corrupt\x00should be: fts5_rowid(subject, ....)\x00segment\x00should be: fts5_rowid('segment', segid, pgno))\x00first arg to fts5_rowid() must be 'segment'\x00fts5_decode\x00fts5_decode_none\x00fts5_rowid\x00recursively defined fts5 content table\x00SELECT rowid, rank FROM %Q.%Q ORDER BY %s(\"%w\"%s%s) %s\x00DESC\x00ASC\x00reads\x00unknown special query: %.*s\x00SELECT %s\x00no such function: %s\x00parse error in rank function: %s\x00%s: table does not support scanning\x00delete-all\x00'delete-all' may only be used with a contentless or external content fts5 table\x00rebuild\x00'rebuild' may not be used with a contentless fts5 table\x00merge\x00integrity-check\x00cannot %s contentless fts5 table: %s\x00DELETE from\x00no such cursor: %lld\x00no such tokenizer: %s\x00error in tokenizer constructor\x00fts5_api_ptr\x00fts5: 2021-04-19 18:32:05 1b256d97b553a9611efca188a3d995a2fff712759044ba480f9a0c9e98fae886\x00config\x00fts5\x00fts5_source_id\x00SELECT %s FROM %s T WHERE T.%Q >= ? AND T.%Q <= ? ORDER BY T.%Q ASC\x00SELECT %s FROM %s T WHERE T.%Q <= ? AND T.%Q >= ? ORDER BY T.%Q DESC\x00SELECT %s FROM %s T WHERE T.%Q=?\x00INSERT INTO %Q.'%q_content' VALUES(%s)\x00REPLACE INTO %Q.'%q_content' VALUES(%s)\x00DELETE FROM %Q.'%q_content' WHERE id=?\x00REPLACE INTO %Q.'%q_docsize' VALUES(?,?)\x00DELETE FROM %Q.'%q_docsize' WHERE id=?\x00SELECT sz FROM %Q.'%q_docsize' WHERE id=?\x00REPLACE INTO %Q.'%q_config' VALUES(?,?)\x00SELECT %s FROM %s AS T\x00DROP TABLE IF EXISTS %Q.'%q_data';DROP TABLE IF EXISTS %Q.'%q_idx';DROP TABLE IF EXISTS %Q.'%q_config';\x00DROP TABLE IF EXISTS %Q.'%q_docsize';\x00DROP TABLE IF EXISTS %Q.'%q_content';\x00ALTER TABLE %Q.'%q_%s' RENAME TO '%q_%s';\x00CREATE TABLE %Q.'%q_%q'(%s)%s\x00fts5: error creating shadow table %q_%s: %s\x00id INTEGER PRIMARY KEY\x00, c%d\x00id INTEGER PRIMARY KEY, sz BLOB\x00k PRIMARY KEY, v\x00DELETE FROM %Q.'%q_data';DELETE FROM %Q.'%q_idx';\x00DELETE FROM %Q.'%q_docsize';\x00SELECT count(*) FROM %Q.'%q_%s'\x00tokenchars\x00separators\x00L* N* Co\x00categories\x00remove_diacritics\x00unicode61\x00al\x00ance\x00ence\x00er\x00ic\x00able\x00ible\x00ant\x00ement\x00ment\x00ent\x00ion\x00ou\x00ism\x00ate\x00iti\x00ous\x00ive\x00ize\x00at\x00bl\x00ble\x00iz\x00ational\x00tional\x00tion\x00enci\x00anci\x00izer\x00logi\x00bli\x00alli\x00entli\x00eli\x00e\x00ousli\x00ization\x00ation\x00ator\x00alism\x00iveness\x00fulness\x00ful\x00ousness\x00aliti\x00iviti\x00biliti\x00ical\x00ness\x00icate\x00iciti\x00ative\x00alize\x00eed\x00ee\x00ed\x00ing\x00case_sensitive\x00ascii\x00porter\x00trigram\x00col\x00row\x00instance\x00fts5vocab: unknown table type: %Q\x00CREATE TABlE vocab(term, col, doc, cnt)\x00CREATE TABlE vocab(term, doc, cnt)\x00CREATE TABlE vocab(term, doc, col, offset)\x00wrong number of vtable arguments\x00recursive definition for %s.%s\x00SELECT t.%Q FROM %Q.%Q AS t WHERE t.%Q MATCH '*id'\x00no such fts5 table: %s.%s\x00fts5vocab\x002021-04-19 18:32:05 1b256d97b553a9611efca188a3d995a2fff712759044ba480f9a0c9e98fae886\x00"
+ }{Xsqlite3_value_dup})) // sqlite3.c:127345:3:
+ *(*func(*libc.TLS, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 1640 /* .value_free */)) = Xsqlite3_value_free // sqlite3.c:127346:3:
+ *(*func(*libc.TLS, uintptr, U64) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 1648 /* .result_zeroblob64 */)) = Xsqlite3_result_zeroblob64 // sqlite3.c:127347:3:
+ *(*func(*libc.TLS, uintptr, int32, Sqlite3_uint64) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 1656 /* .bind_zeroblob64 */)) = Xsqlite3_bind_zeroblob64 // sqlite3.c:127348:3:
+ *(*func(*libc.TLS, uintptr) uint32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 1664 /* .value_subtype */)) = Xsqlite3_value_subtype // sqlite3.c:127350:3:
+ *(*func(*libc.TLS, uintptr, uint32))(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 1672 /* .result_subtype */)) = Xsqlite3_result_subtype // sqlite3.c:127351:3:
+ *(*func(*libc.TLS, int32, uintptr, uintptr, int32) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 1680 /* .status64 */)) = Xsqlite3_status64 // sqlite3.c:127353:3:
+ *(*func(*libc.TLS, uintptr, uintptr, uint32) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 1688 /* .strlike */)) = Xsqlite3_strlike // sqlite3.c:127354:3:
+ *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 1696 /* .db_cacheflush */)) = Xsqlite3_db_cacheflush // sqlite3.c:127355:3:
+ *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 1704 /* .system_errno */)) = Xsqlite3_system_errno // sqlite3.c:127357:3:
+ *(*func(*libc.TLS, uintptr, uint32, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 1712 /* .trace_v2 */)) = Xsqlite3_trace_v2 // sqlite3.c:127359:3:
+ *(*func(*libc.TLS, uintptr) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 1720 /* .expanded_sql */)) = Xsqlite3_expanded_sql // sqlite3.c:127360:3:
+ *(*func(*libc.TLS, uintptr, Sqlite3_int64))(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 1728 /* .set_last_insert_rowid */)) = Xsqlite3_set_last_insert_rowid // sqlite3.c:127362:3:
+ *(*func(*libc.TLS, uintptr, uintptr, int32, uint32, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 1736 /* .prepare_v3 */)) = Xsqlite3_prepare_v3 // sqlite3.c:127364:3:
+ *(*func(*libc.TLS, uintptr, uintptr, int32, uint32, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 1744 /* .prepare16_v3 */)) = Xsqlite3_prepare16_v3 // sqlite3.c:127365:3:
+ *(*func(*libc.TLS, uintptr, int32, uintptr, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 1752 /* .bind_pointer */)) = Xsqlite3_bind_pointer // sqlite3.c:127366:3:
+ *(*func(*libc.TLS, uintptr, uintptr, uintptr, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 1760 /* .result_pointer */)) = Xsqlite3_result_pointer // sqlite3.c:127367:3:
+ *(*func(*libc.TLS, uintptr, uintptr) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 1768 /* .value_pointer */)) = Xsqlite3_value_pointer // sqlite3.c:127368:3:
+ *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 1776 /* .vtab_nochange */)) = Xsqlite3_vtab_nochange // sqlite3.c:127370:3:
+ *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 1784 /* .value_nochange */)) = Xsqlite3_value_nochange // sqlite3.c:127371:3:
+ *(*func(*libc.TLS, uintptr, int32) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 1792 /* .vtab_collation */)) = Xsqlite3_vtab_collation // sqlite3.c:127372:3:
+ *(*func(*libc.TLS) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 1800 /* .keyword_count */)) = Xsqlite3_keyword_count // sqlite3.c:127374:3:
+ *(*func(*libc.TLS, int32, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 1808 /* .keyword_name */)) = Xsqlite3_keyword_name // sqlite3.c:127375:3:
+ *(*func(*libc.TLS, uintptr, int32) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 1816 /* .keyword_check */)) = Xsqlite3_keyword_check // sqlite3.c:127376:3:
+ *(*func(*libc.TLS, uintptr) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 1824 /* .str_new */)) = Xsqlite3_str_new // sqlite3.c:127377:3:
+ *(*func(*libc.TLS, uintptr) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 1832 /* .str_finish */)) = Xsqlite3_str_finish // sqlite3.c:127378:3:
+ *(*func(*libc.TLS, uintptr, uintptr, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 1840 /* .str_appendf */)) = Xsqlite3_str_appendf // sqlite3.c:127379:3:
+ *(*func(*libc.TLS, uintptr, uintptr, Va_list))(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 1848 /* .str_vappendf */)) = Xsqlite3_str_vappendf // sqlite3.c:127380:3:
+ *(*func(*libc.TLS, uintptr, uintptr, int32))(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 1856 /* .str_append */)) = Xsqlite3_str_append // sqlite3.c:127381:3:
+ *(*func(*libc.TLS, uintptr, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 1864 /* .str_appendall */)) = Xsqlite3_str_appendall // sqlite3.c:127382:3:
+ *(*func(*libc.TLS, uintptr, int32, uint8))(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 1872 /* .str_appendchar */)) = Xsqlite3_str_appendchar // sqlite3.c:127383:3:
+ *(*func(*libc.TLS, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 1880 /* .str_reset */)) = Xsqlite3_str_reset // sqlite3.c:127384:3:
+ *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 1888 /* .str_errcode */)) = Xsqlite3_str_errcode // sqlite3.c:127385:3:
+ *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 1896 /* .str_length */)) = Xsqlite3_str_length // sqlite3.c:127386:3:
+ *(*func(*libc.TLS, uintptr) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 1904 /* .str_value */)) = Xsqlite3_str_value // sqlite3.c:127387:3:
+ *(*func(*libc.TLS, uintptr, uintptr, int32, int32, uintptr, uintptr, uintptr, uintptr, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 1912 /* .create_window_function */)) = Xsqlite3_create_window_function // sqlite3.c:127389:3:
+ *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 1928 /* .stmt_isexplain */)) = Xsqlite3_stmt_isexplain // sqlite3.c:127397:3:
+ *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 1936 /* .value_frombind */)) = Xsqlite3_value_frombind // sqlite3.c:127398:3:
+ *(*func(*libc.TLS, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 1944 /* .drop_modules */)) = Xsqlite3_drop_modules // sqlite3.c:127401:3:
+ *(*func(*libc.TLS, Sqlite3_int64) Sqlite3_int64)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 1952 /* .hard_heap_limit64 */)) = Xsqlite3_hard_heap_limit64 // sqlite3.c:127406:3:
+ *(*func(*libc.TLS, uintptr, int32) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 1960 /* .uri_key */)) = Xsqlite3_uri_key // sqlite3.c:127407:3:
+ *(*func(*libc.TLS, uintptr) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 1968 /* .filename_database */)) = Xsqlite3_filename_database // sqlite3.c:127408:3:
+ *(*func(*libc.TLS, uintptr) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 1976 /* .filename_journal */)) = Xsqlite3_filename_journal // sqlite3.c:127409:3:
+ *(*func(*libc.TLS, uintptr) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 1984 /* .filename_wal */)) = Xsqlite3_filename_wal // sqlite3.c:127410:3:
+ *(*func(*libc.TLS, uintptr, uintptr, uintptr, int32, uintptr) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 1992 /* .create_filename */)) = Xsqlite3_create_filename // sqlite3.c:127412:3:
+ *(*func(*libc.TLS, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 2000 /* .free_filename */)) = Xsqlite3_free_filename // sqlite3.c:127413:3:
+ *(*func(*libc.TLS, uintptr) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 2008 /* .database_file_object */)) = Xsqlite3_database_file_object // sqlite3.c:127414:3:
+ *(*func(*libc.TLS, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 2016 /* .txn_state */)) = Xsqlite3_txn_state // sqlite3.c:127416:3:
+ *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3BuiltinExtensions)) + 0)) = Xsqlite3Fts5Init // sqlite3.c:165154:3:
+ *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3BuiltinExtensions)) + 8)) = Xsqlite3RtreeInit // sqlite3.c:165160:3:
+ *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3BuiltinExtensions)) + 16)) = sqlite3TestExtInit // sqlite3.c:165168:3:
+ *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3BuiltinExtensions)) + 24)) = Xsqlite3Json1Init // sqlite3.c:165170:3:
+ *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&statGetFuncdef)) + 24 /* .xSFunc */)) = statGet // sqlite3.c:110531:3:
+ *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&statInitFuncdef)) + 24 /* .xSFunc */)) = statInit // sqlite3.c:110089:3:
+ *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&statPushFuncdef)) + 24 /* .xSFunc */)) = statPush // sqlite3.c:110379:3:
+ *(*func(*libc.TLS, uintptr, uintptr, uintptr, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&vfs_template)) + 40 /* .xOpen */)) = rbuVfsOpen // sqlite3.c:205283:5:
+ *(*func(*libc.TLS, uintptr, uintptr, int32) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&vfs_template)) + 48 /* .xDelete */)) = rbuVfsDelete // sqlite3.c:205284:5:
+ *(*func(*libc.TLS, uintptr, uintptr, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&vfs_template)) + 56 /* .xAccess */)) = rbuVfsAccess // sqlite3.c:205285:5:
+ *(*func(*libc.TLS, uintptr, uintptr, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&vfs_template)) + 64 /* .xFullPathname */)) = rbuVfsFullPathname // sqlite3.c:205286:5:
+ *(*func(*libc.TLS, uintptr, uintptr) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&vfs_template)) + 72 /* .xDlOpen */)) = rbuVfsDlOpen // sqlite3.c:205289:5:
+ *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&vfs_template)) + 80 /* .xDlError */)) = rbuVfsDlError // sqlite3.c:205290:5:
+ *(*func(*libc.TLS, uintptr, uintptr, uintptr) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&vfs_template)) + 88 /* .xDlSym */)) = rbuVfsDlSym // sqlite3.c:205291:5:
+ *(*func(*libc.TLS, uintptr, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&vfs_template)) + 96 /* .xDlClose */)) = rbuVfsDlClose // sqlite3.c:205292:5:
+ *(*func(*libc.TLS, uintptr, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&vfs_template)) + 104 /* .xRandomness */)) = rbuVfsRandomness // sqlite3.c:205297:5:
+ *(*func(*libc.TLS, uintptr, int32) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&vfs_template)) + 112 /* .xSleep */)) = rbuVfsSleep // sqlite3.c:205298:5:
+ *(*func(*libc.TLS, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&vfs_template)) + 120 /* .xCurrentTime */)) = rbuVfsCurrentTime // sqlite3.c:205299:5:
+ *(*func(*libc.TLS, uintptr, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&vfs_template)) + 128 /* .xGetLastError */)) = rbuVfsGetLastError // sqlite3.c:205300:5:
+}
+
+var ts1 = "COMPILER=gcc-9.3.0\x00ENABLE_COLUMN_METADATA\x00ENABLE_FTS5\x00ENABLE_GEOPOLY\x00ENABLE_JSON1\x00ENABLE_MEMORY_MANAGEMENT\x00ENABLE_OFFSET_SQL_FUNC\x00ENABLE_PREUPDATE_HOOK\x00ENABLE_RBU\x00ENABLE_RTREE\x00ENABLE_SESSION\x00ENABLE_SNAPSHOT\x00ENABLE_STAT4\x00ENABLE_UNLOCK_NOTIFY\x00LIKE_DOESNT_MATCH_BLOBS\x00MUTEX_NOOP\x00SOUNDEX\x00SYSTEM_MALLOC\x00THREADSAFE=1\x003.36.0\x00BINARY\x0020b:20e\x0020c:20e\x0020e\x0040f-21a-21d\x00now\x00local time unavailable\x00second\x00minute\x00hour\x00day\x00month\x00year\x00localtime\x00unixepoch\x00utc\x00weekday \x00start of \x00%04d-%02d-%02d %02d:%02d:%02d\x00%02d:%02d:%02d\x00%04d-%02d-%02d\x00%02d\x00%06.3f\x00%03d\x00%.16g\x00%04d\x00julianday\x00date\x00time\x00datetime\x00strftime\x00current_time\x00current_timestamp\x00current_date\x00failed to allocate %u bytes of memory\x00failed memory resize %u to %u bytes\x000123456789ABCDEF0123456789abcdef\x00-x0\x00X0\x00%\x00NaN\x00Inf\x00\x00NULL\x00(NULL)\x00.\x00SUBQUERY %u\x00thstndrd\x00922337203685477580\x00API call with %s database connection pointer\x00unopened\x00invalid\x00Savepoint\x00AutoCommit\x00Transaction\x00SorterNext\x00Prev\x00Next\x00Checkpoint\x00JournalMode\x00Vacuum\x00VFilter\x00VUpdate\x00Goto\x00Gosub\x00InitCoroutine\x00Yield\x00MustBeInt\x00Jump\x00Once\x00If\x00Not\x00IfNot\x00IfNullRow\x00SeekLT\x00SeekLE\x00SeekGE\x00SeekGT\x00IfNotOpen\x00IfNoHope\x00NoConflict\x00NotFound\x00Found\x00SeekRowid\x00NotExists\x00Last\x00IfSmaller\x00SorterSort\x00Sort\x00Rewind\x00IdxLE\x00IdxGT\x00IdxLT\x00IdxGE\x00RowSetRead\x00Or\x00And\x00RowSetTest\x00Program\x00FkIfZero\x00IfPos\x00IfNotZero\x00IsNull\x00NotNull\x00Ne\x00Eq\x00Gt\x00Le\x00Lt\x00Ge\x00ElseEq\x00DecrJumpZero\x00IncrVacuum\x00VNext\x00Init\x00PureFunc\x00Function\x00Return\x00EndCoroutine\x00HaltIfNull\x00Halt\x00Integer\x00Int64\x00String\x00Null\x00SoftNull\x00Blob\x00Variable\x00Move\x00Copy\x00SCopy\x00IntCopy\x00ChngCntRow\x00ResultRow\x00CollSeq\x00AddImm\x00RealAffinity\x00Cast\x00Permutation\x00Compare\x00IsTrue\x00ZeroOrNull\x00Offset\x00Column\x00Affinity\x00MakeRecord\x00Count\x00ReadCookie\x00SetCookie\x00ReopenIdx\x00OpenRead\x00OpenWrite\x00OpenDup\x00OpenAutoindex\x00BitAnd\x00BitOr\x00ShiftLeft\x00ShiftRight\x00Add\x00Subtract\x00Multiply\x00Divide\x00Remainder\x00Concat\x00OpenEphemeral\x00BitNot\x00SorterOpen\x00SequenceTest\x00String8\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\x00IntegrityCk\x00RowSetAdd\x00Real\x00Param\x00FkCounter\x00MemMax\x00OffsetLimit\x00AggInverse\x00AggStep\x00AggStep1\x00AggValue\x00AggFinal\x00Expire\x00CursorLock\x00CursorUnlock\x00TableLock\x00VBegin\x00VCreate\x00VDestroy\x00VOpen\x00VColumn\x00VRename\x00Pagecount\x00MaxPgcnt\x00Trace\x00CursorHint\x00ReleaseReg\x00Noop\x00Explain\x00Abortable\x00open\x00close\x00access\x00getcwd\x00stat\x00fstat\x00ftruncate\x00fcntl\x00read\x00pread\x00pread64\x00write\x00pwrite\x00pwrite64\x00fchmod\x00fallocate\x00unlink\x00openDirectory\x00mkdir\x00rmdir\x00fchown\x00geteuid\x00mmap\x00munmap\x00mremap\x00getpagesize\x00readlink\x00lstat\x00ioctl\x00attempt to open \"%s\" as file descriptor %d\x00/dev/null\x00os_unix.c:%d: (%d) %s(%s) - %s\x00cannot fstat db file %s\x00file unlinked while open: %s\x00multiple links to file: %s\x00file renamed while open: %s\x00%s\x00full_fsync\x00%s-shm\x00readonly_shm\x00psow\x00unix-excl\x00%s.lock\x00SQLITE_TMPDIR\x00TMPDIR\x00/var/tmp\x00/usr/tmp\x00/tmp\x00%s/etilqs_%llx%c\x00modeof\x00fsync\x00/dev/urandom\x00unix\x00unix-none\x00unix-dotfile\x00memdb\x00memdb(%p,%lld)\x00PRAGMA \"%w\".page_count\x00ATTACH x AS %Q\x00recovered %d pages from %s\x00-journal\x00-wal\x00nolock\x00immutable\x00recovered %d frames from WAL file %s\x00cannot limit WAL size: %s\x00SQLite format 3\x00:memory:\x00@ \x00\n\x00invalid page number %d\x002nd reference to page %d\x00Failed to read ptrmap key=%d\x00Bad ptr map entry key=%d expected=(%d,%d) got=(%d,%d)\x00failed to get page %d\x00freelist leaf count too big on page %d\x00%s is %d but should be %d\x00size\x00overflow list length\x00Page %u: \x00unable to get the page. error code=%d\x00btreeInitPage() returns error code %d\x00free space corruption\x00On tree page %u cell %d: \x00On page %u at right child: \x00Offset %d out of range %d..%d\x00Extends off end of page\x00Rowid %lld out of order\x00Child page depth differs\x00Multiple uses for byte %u of page %u\x00Fragmentation of %d bytes reported as %d on page %u\x00Main freelist: \x00max rootpage (%d) disagrees with header (%d)\x00incremental_vacuum enabled with a max rootpage of zero\x00Page %d is never used\x00Pointer map page %d is referenced\x00unknown database %s\x00destination database is in use\x00source and destination must be distinct\x00%!.15g\x00-\x00%s%s\x00k(%d\x00B\x00,%s%s%s\x00N.\x00)\x00%.18s-%s\x00%s(%d)\x00%lld\x00%d\x00(blob)\x00vtab:%p\x00%c%u\x00]\x00program\x00?\x008\x0016LE\x0016BE\x00addr\x00opcode\x00p1\x00p2\x00p3\x00p4\x00p5\x00comment\x00id\x00parent\x00notused\x00detail\x00%.4c%s%.16c\x00MJ delete: %s\x00MJ collide: %s\x00-mj%06X9%02X\x00FOREIGN KEY constraint failed\x00a CHECK constraint\x00a generated column\x00an index\x00non-deterministic use of %s() in %s\x00API called with finalized prepared statement\x00API called with NULL prepared statement\x00string or blob too big\x00bind on a busy prepared statement: [%s]\x00-- \x00'%.*q'\x00zeroblob(%d)\x00x'\x00%02x\x00'\x00%s constraint failed\x00%z: %s\x00abort at %d in [%s]: %s\x00cannot open savepoint - SQL statements in progress\x00no such savepoint: %s\x00cannot release savepoint - SQL statements in progress\x00cannot commit transaction - SQL statements in progress\x00cannot start a transaction within a transaction\x00cannot rollback - no transaction is active\x00cannot commit - no transaction is active\x00database schema has changed\x00index corruption\x00sqlite_master\x00SELECT*FROM\"%w\".%s WHERE %s ORDER BY rowid\x00too many levels of trigger recursion\x00cannot change %s wal mode from within a transaction\x00into\x00out of\x00database table is locked: %s\x00-- %s\x00statement aborts at %d: [%s] %s\x00out of memory\x00NOT NULL\x00UNIQUE\x00CHECK\x00FOREIGN KEY\x00cannot open value of type %s\x00null\x00real\x00integer\x00no such rowid: %lld\x00cannot open virtual table: %s\x00cannot open table without rowid: %s\x00cannot open view: %s\x00no such column: \"%s\"\x00foreign key\x00indexed\x00cannot open %s column for writing\x00main\x00new\x00old\x00excluded\x00misuse of aliased aggregate %s\x00misuse of aliased window function %s\x00row value misused\x00double-quoted string literal: \"%w\"\x00no such column\x00ambiguous column name\x00%s: %s.%s.%s\x00%s: %s.%s\x00%s: %s\x00partial index WHERE clauses\x00index expressions\x00CHECK constraints\x00generated columns\x00%s prohibited in %s\x00true\x00false\x00the \".\" operator\x00second argument to likelihood() must be a constant between 0.0 and 1.0\x00not authorized to use function: %s\x00non-deterministic functions\x00%.*s() may not be used as a window function\x00window\x00aggregate\x00misuse of %s function %.*s()\x00no such function: %.*s\x00wrong number of arguments to function %.*s()\x00FILTER may not be used with non-aggregate %.*s()\x00subqueries\x00parameters\x00%r %s BY term out of range - should be between 1 and %d\x00too many terms in ORDER BY clause\x00ORDER\x00%r ORDER BY term does not match any column in the result set\x00too many terms in %s BY clause\x00a GROUP BY clause is required before HAVING\x00GROUP\x00aggregate functions are not allowed in the GROUP BY clause\x00Expression tree is too large (maximum depth %d)\x000\x00too many arguments on function %T\x00unsafe use of %s()\x00variable number must be between ?1 and ?%d\x00too many SQL variables\x00%d columns assigned %d values\x00too many columns in %s\x00_ROWID_\x00ROWID\x00OID\x00USING ROWID SEARCH ON TABLE %s FOR IN-OPERATOR\x00USING INDEX %s FOR IN-OPERATOR\x00sub-select returns %d columns - expected %d\x00REUSE LIST SUBQUERY %d\x00%sLIST SUBQUERY %d\x00CORRELATED \x00REUSE SUBQUERY %d\x00%sSCALAR SUBQUERY %d\x001\x000x\x00hex literal too big: %s%s\x00generated column loop on \"%s\"\x00misuse of aggregate: %s()\x00unknown function: %s()\x00RAISE() may only be used within a trigger-program\x00B\x00C\x00D\x00E\x00sqlite_\x00table %s may not be altered\x00SELECT 1 FROM \"%w\".sqlite_master WHERE name NOT LIKE 'sqliteX_%%' ESCAPE 'X' AND sql NOT LIKE 'create virtual%%' AND sqlite_rename_test(%Q, sql, type, name, %d, %Q, %d)=NULL \x00SELECT 1 FROM temp.sqlite_master WHERE name NOT LIKE 'sqliteX_%%' ESCAPE 'X' AND sql NOT LIKE 'create virtual%%' AND sqlite_rename_test(%Q, sql, type, name, 1, %Q, %d)=NULL \x00UPDATE \"%w\".sqlite_master SET sql = sqlite_rename_quotefix(%Q, sql)WHERE name NOT LIKE 'sqliteX_%%' ESCAPE 'X' AND sql NOT LIKE 'create virtual%%'\x00UPDATE temp.sqlite_master SET sql = sqlite_rename_quotefix('temp', sql)WHERE name NOT LIKE 'sqliteX_%%' ESCAPE 'X' AND sql NOT LIKE 'create virtual%%'\x00there is already another table or index with this name: %s\x00table\x00view %s may not be altered\x00UPDATE \"%w\".sqlite_master SET sql = sqlite_rename_table(%Q, type, name, sql, %Q, %Q, %d) WHERE (type!='index' OR tbl_name=%Q COLLATE nocase)AND name NOT LIKE 'sqliteX_%%' ESCAPE 'X'\x00UPDATE %Q.sqlite_master SET tbl_name = %Q, name = CASE WHEN type='table' THEN %Q WHEN name LIKE 'sqliteX_autoindex%%' ESCAPE 'X' AND type='index' THEN 'sqlite_autoindex_' || %Q || substr(name,%d+18) ELSE name END WHERE tbl_name=%Q COLLATE nocase AND (type='table' OR type='index' OR type='trigger');\x00sqlite_sequence\x00UPDATE \"%w\".sqlite_sequence set name = %Q WHERE name = %Q\x00UPDATE sqlite_temp_schema SET sql = sqlite_rename_table(%Q, type, name, sql, %Q, %Q, 1), tbl_name = CASE WHEN tbl_name=%Q COLLATE nocase AND sqlite_rename_test(%Q, sql, type, name, 1, 'after rename', 0) THEN %Q ELSE tbl_name END WHERE type IN ('view', 'trigger')\x00after rename\x00SELECT raise(ABORT,%Q) FROM \"%w\".\"%w\"\x00Cannot add a PRIMARY KEY column\x00Cannot add a UNIQUE column\x00Cannot add a REFERENCES column with non-NULL default value\x00Cannot add a NOT NULL column with default value NULL\x00Cannot add a column with non-constant default\x00cannot add a STORED column\x00UPDATE \"%w\".sqlite_master SET sql = printf('%%.%ds, ',sql) || %Q || substr(sql,1+length(printf('%%.%ds',sql))) WHERE type = 'table' AND name = %Q\x00virtual tables may not be altered\x00Cannot add a column to a view\x00sqlite_altertab_%s\x00view\x00virtual table\x00cannot %s %s \"%s\"\x00drop column from\x00rename columns of\x00UPDATE \"%w\".sqlite_master SET sql = sqlite_rename_column(sql, type, name, %Q, %Q, %d, %Q, %d, %d) WHERE name NOT LIKE 'sqliteX_%%' ESCAPE 'X' AND (type != 'index' OR tbl_name = %Q) AND sql NOT LIKE 'create virtual%%'\x00UPDATE temp.sqlite_master SET sql = sqlite_rename_column(sql, type, name, %Q, %Q, %d, %Q, %d, 1) WHERE type IN ('trigger', 'view')\x00error in %s %s%s%s: %s\x00 \x00\"%w\" \x00%Q%s\x00%.*s%s\x00cannot drop %s column: \"%s\"\x00PRIMARY KEY\x00cannot drop column \"%s\": no other columns exist\x00UPDATE \"%w\".sqlite_master SET sql = sqlite_drop_column(%d, sql, %d) WHERE (type=='table' AND tbl_name=%Q COLLATE nocase)\x00after drop column\x00sqlite_rename_column\x00sqlite_rename_table\x00sqlite_rename_test\x00sqlite_drop_column\x00sqlite_rename_quotefix\x00CREATE TABLE %Q.%s(%s)\x00DELETE FROM %Q.%s WHERE %s=%Q\x00DELETE FROM %Q.%s\x00sqlite_stat1\x00tbl,idx,stat\x00sqlite_stat4\x00tbl,idx,neq,nlt,ndlt,sample\x00sqlite_stat3\x00stat_init\x00stat_push\x00%llu\x00 %llu\x00%llu \x00stat_get\x00sqlite\\_%\x00BBB\x00idx\x00tbl\x00unordered*\x00sz=[0-9]*\x00noskipscan*\x00SELECT idx,count(*) FROM %Q.sqlite_stat4 GROUP BY idx\x00SELECT idx,neq,nlt,ndlt,sample FROM %Q.sqlite_stat4\x00SELECT tbl,idx,stat FROM %Q.sqlite_stat1\x00x\x00\x00too many attached databases - max %d\x00database %s is already in use\x00database is already attached\x00attached databases must use the same text encoding as main database\x00unable to open database: %s\x00no such database: %s\x00cannot detach database %s\x00database %s is locked\x00sqlite_detach\x00sqlite_attach\x00%s cannot use variables\x00%s %T cannot reference objects in database %s\x00authorizer malfunction\x00%s.%s\x00%s.%z\x00access to %z is prohibited\x00not authorized\x00sqlite_temp_schema\x00sqlite_schema\x00sqlite_temp_master\x00pragma_\x00no such view\x00no such table\x00corrupt database\x00unknown database %T\x00object name reserved for internal use: %s\x00temporary table name must be unqualified\x00table %T already exists\x00there is already an index named %s\x00sqlite_returning\x00cannot use RETURNING in a trigger\x00too many columns on %s\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\x00INTEGER\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\x00AUTOINCREMENT not allowed on WITHOUT ROWID tables\x00PRIMARY KEY missing on table %s\x00must have at least one non-generated column\x00TABLE\x00VIEW\x00CREATE %s %.*s\x00UPDATE %Q.sqlite_master SET type='%s', name=%Q, tbl_name=%Q, rootpage=#%d, sql=%Q WHERE rowid=#%d\x00CREATE TABLE %Q.sqlite_sequence(name,seq)\x00tbl_name='%q' AND type!='trigger'\x00parameters are not allowed in views\x00view %s is circularly defined\x00corrupt schema\x00UPDATE %Q.sqlite_master SET rootpage=%d WHERE #%d AND rootpage=#%d\x00sqlite_stat%d\x00DELETE FROM %Q.sqlite_sequence WHERE name=%Q\x00DELETE FROM %Q.sqlite_master WHERE tbl_name=%Q and type!='trigger'\x00table %s may not be dropped\x00use DROP TABLE to delete table %s\x00use DROP VIEW to delete view %s\x00foreign key on %s should reference only one column of table %T\x00number of columns in foreign key does not match the number of columns in the referenced table\x00unknown column \"%s\" in foreign key definition\x00unsupported use of NULLS %s\x00FIRST\x00LAST\x00index\x00cannot create a TEMP index on non-TEMP table \"%s\"\x00table %s may not be indexed\x00views may not be indexed\x00virtual tables may not be indexed\x00there is already a table named %s\x00index %s already exists\x00sqlite_autoindex_%s_%d\x00expressions prohibited in PRIMARY KEY and UNIQUE constraints\x00conflicting ON CONFLICT clauses specified\x00invalid rootpage\x00CREATE%s INDEX %.*s\x00 UNIQUE\x00INSERT INTO %Q.sqlite_master VALUES('index',%Q,%Q,#%d,%Q);\x00name='%q' AND type='index'\x00no such index: %S\x00index associated with UNIQUE or PRIMARY KEY constraint cannot be dropped\x00DELETE FROM %Q.sqlite_master WHERE name=%Q AND type='index'\x00too many FROM clause terms, max: %d\x00a JOIN clause is required before %s\x00ON\x00USING\x00BEGIN\x00ROLLBACK\x00COMMIT\x00RELEASE\x00unable to open a temporary database file for storing temporary tables\x00index '%q'\x00, \x00%s.rowid\x00unable to identify the object to be reindexed\x00duplicate WITH table name: %s\x00no such collation sequence: %s\x00table %s may not be modified\x00cannot modify %s because it is a view\x00rows deleted\x00text\x00blob\x00integer overflow\x00%.*f\x00LIKE or GLOB pattern too complex\x00ESCAPE expression must be a single character\x00%!.20e\x00?000\x00MATCH\x00like\x00implies_nonnull_row\x00expr_compare\x00expr_implies_expr\x00soundex\x00load_extension\x00sqlite_compileoption_used\x00sqlite_compileoption_get\x00unlikely\x00likelihood\x00likely\x00sqlite_offset\x00ltrim\x00rtrim\x00trim\x00min\x00max\x00typeof\x00length\x00instr\x00printf\x00unicode\x00char\x00abs\x00round\x00upper\x00lower\x00hex\x00ifnull\x00random\x00randomblob\x00nullif\x00sqlite_version\x00sqlite_source_id\x00sqlite_log\x00quote\x00last_insert_rowid\x00changes\x00total_changes\x00replace\x00zeroblob\x00substr\x00substring\x00sum\x00total\x00avg\x00count\x00group_concat\x00glob\x00coalesce\x00sign\x00iif\x00foreign key mismatch - \"%w\" referencing \"%w\"\x00cannot INSERT into generated column \"%s\"\x00table %S has no column named %s\x00table %S has %d columns but %d values were supplied\x00%d values for %d columns\x00UPSERT not implemented for virtual table \"%s\"\x00cannot UPSERT a view\x00rows inserted\x00sqlite3_extension_init\x00sqlite3_\x00lib\x00_init\x00no entry point [%s] in shared library [%s]\x00error during initialization: %s\x00unable to open shared library [%.*s]\x00so\x00automatic extension loading failed: %s\x00seq\x00from\x00to\x00on_update\x00on_delete\x00match\x00cid\x00name\x00type\x00notnull\x00dflt_value\x00pk\x00hidden\x00seqno\x00desc\x00coll\x00key\x00builtin\x00enc\x00narg\x00flags\x00wdth\x00hght\x00flgs\x00unique\x00origin\x00partial\x00rowid\x00fkid\x00file\x00busy\x00log\x00checkpointed\x00database\x00status\x00cache_size\x00timeout\x00analysis_limit\x00application_id\x00auto_vacuum\x00automatic_index\x00busy_timeout\x00cache_spill\x00case_sensitive_like\x00cell_size_check\x00checkpoint_fullfsync\x00collation_list\x00compile_options\x00count_changes\x00data_version\x00database_list\x00default_cache_size\x00defer_foreign_keys\x00empty_result_callbacks\x00encoding\x00foreign_key_check\x00foreign_key_list\x00foreign_keys\x00freelist_count\x00full_column_names\x00fullfsync\x00function_list\x00hard_heap_limit\x00ignore_check_constraints\x00incremental_vacuum\x00index_info\x00index_list\x00index_xinfo\x00integrity_check\x00journal_mode\x00journal_size_limit\x00legacy_alter_table\x00locking_mode\x00max_page_count\x00mmap_size\x00module_list\x00optimize\x00page_count\x00page_size\x00pragma_list\x00query_only\x00quick_check\x00read_uncommitted\x00recursive_triggers\x00reverse_unordered_selects\x00schema_version\x00secure_delete\x00short_column_names\x00shrink_memory\x00soft_heap_limit\x00synchronous\x00table_info\x00table_xinfo\x00temp_store\x00temp_store_directory\x00threads\x00trusted_schema\x00user_version\x00wal_autocheckpoint\x00wal_checkpoint\x00writable_schema\x00onoffalseyestruextrafull\x00exclusive\x00normal\x00none\x00full\x00incremental\x00memory\x00temporary storage cannot be changed from within a transaction\x00SET NULL\x00SET DEFAULT\x00CASCADE\x00RESTRICT\x00NO ACTION\x00delete\x00persist\x00off\x00truncate\x00wal\x00w\x00a\x00s\x00sissii\x00utf8\x00utf16le\x00utf16be\x00-%T\x00fast\x00not a writable directory\x00Safety level may not be changed inside a transaction\x00issisii\x00issisi\x00iisX\x00isiX\x00c\x00u\x00isisi\x00iss\x00is\x00iissssss\x00NONE\x00siX\x00*** in database %s ***\n\x00NULL value in %s.%s\x00CHECK constraint failed in %s\x00row \x00 missing from index \x00non-unique entry in index \x00wrong # of entries in index \x00ok\x00unsupported encoding: %s\x00restart\x00ANALYZE \"%w\".\"%w\"\x00UTF8\x00UTF-8\x00UTF-16le\x00UTF-16be\x00UTF16le\x00UTF16be\x00UTF-16\x00UTF16\x00CREATE TABLE x\x00%c\"%s\"\x00(\"%s\"\x00,arg HIDDEN\x00,schema HIDDEN\x00PRAGMA \x00%Q.\x00=%Q\x00error in %s %s after %s: %s\x00rename\x00drop column\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 or unsupported join type: %T %T%s%T\x00RIGHT and FULL OUTER JOINs are not currently supported\x00naturaleftouterightfullinnercross\x00a NATURAL join may not have an ON or USING clause\x00cannot have both ON and USING clauses in the same join\x00cannot join using column %s - column not present in both tables\x00UNION ALL\x00INTERSECT\x00EXCEPT\x00UNION\x00USE TEMP B-TREE FOR %s\x00column%d\x00%.*z:%u\x00cannot use window functions in recursive queries\x00recursive aggregate queries not supported\x00SETUP\x00RECURSIVE STEP\x00SCAN %d CONSTANT ROW%s\x00S\x00COMPOUND QUERY\x00LEFT-MOST SUBQUERY\x00%s USING TEMP B-TREE\x00all VALUES must have the same number of terms\x00SELECTs to the left and right of %s do not have the same number of result columns\x00MERGE (%s)\x00LEFT\x00RIGHT\x00no such index: %s\x00'%s' is not a function\x00multiple references to recursive table: %s\x00circular reference: %s\x00table %s has %d values for %d columns\x00multiple recursive references: %s\x00recursive reference in a subquery: %s\x00subquery_%u\x00too many references to \"%s\": max 65535\x00access to view \"%s\" prohibited\x00unsafe use of virtual table \"%s\"\x00*\x00%s.%s.%s\x00no such table: %s\x00no tables specified\x00too many columns in result set\x00DISTINCT aggregates must have exactly one argument\x00USE TEMP B-TREE FOR %s(DISTINCT)\x00SCAN %s%s%s\x00 USING COVERING INDEX \x00target object/alias may not appear in FROM clause: %s\x00expected %d columns for '%s' but got %d\x00CO-ROUTINE %!S\x00MATERIALIZE %!S\x00DISTINCT\x00GROUP BY\x00RIGHT PART OF ORDER BY\x00ORDER BY\x00sqlite3_get_table() called with two or more incompatible queries\x00temporary trigger may not have qualified name\x00trigger\x00cannot create triggers on virtual tables\x00trigger %T already exists\x00cannot create trigger on system table\x00cannot create %s trigger on view: %S\x00BEFORE\x00AFTER\x00cannot create INSTEAD OF trigger on table: %S\x00INSERT INTO %Q.sqlite_master VALUES('trigger',%Q,%Q,0,'CREATE TRIGGER %q')\x00type='trigger' AND name='%q'\x00no such trigger: %S\x00DELETE FROM %Q.sqlite_master WHERE name=%Q AND type='trigger'\x00%s RETURNING is not available on virtual tables\x00DELETE\x00UPDATE\x00RETURNING may not use \"TABLE.*\" wildcards\x00-- TRIGGER %s\x00cannot UPDATE generated column \"%s\"\x00no such column: %s\x00rows updated\x00%r \x00%sON CONFLICT clause does not match any PRIMARY KEY or UNIQUE constraint\x00CRE\x00INS\x00cannot VACUUM from within a transaction\x00cannot VACUUM - SQL statements in progress\x00non-text filename\x00ATTACH %Q AS vacuum_db\x00output file already exists\x00SELECT sql FROM \"%w\".sqlite_schema WHERE type='table'AND name<>'sqlite_sequence' AND coalesce(rootpage,1)>0\x00SELECT sql FROM \"%w\".sqlite_schema WHERE type='index'\x00SELECT'INSERT INTO vacuum_db.'||quote(name)||' SELECT*FROM\"%w\".'||quote(name)FROM vacuum_db.sqlite_schema WHERE type='table'AND coalesce(rootpage,1)>0\x00INSERT INTO vacuum_db.sqlite_schema SELECT*FROM \"%w\".sqlite_schema WHERE type IN('view','trigger') OR(type='table'AND rootpage=0)\x00CREATE VIRTUAL TABLE %T\x00UPDATE %Q.sqlite_master SET type='table', name=%Q, tbl_name=%Q, rootpage=0, sql=%Q WHERE rowid=#%d\x00name=%Q AND sql=%Q\x00vtable constructor called recursively: %s\x00vtable constructor failed: %s\x00vtable constructor did not declare schema: %s\x00no such module: %s\x00\x00 AND \x00(\x00 (\x00%s=?\x00ANY(%s)\x00>\x00<\x00%s %S\x00SEARCH\x00SCAN\x00AUTOMATIC PARTIAL COVERING INDEX\x00AUTOMATIC COVERING INDEX\x00COVERING INDEX %s\x00INDEX %s\x00 USING \x00=\x00>? AND rowid<\x00 USING INTEGER PRIMARY KEY (rowid%s?)\x00 VIRTUAL TABLE INDEX %d:%s\x00MULTI-INDEX OR\x00INDEX %d\x00regexp\x00ON clause references tables to its right\x00NOCASE\x00too many arguments on %s() - max %d\x00automatic index on %s(%s)\x00auto-index\x00%s.xBestIndex malfunction\x00abbreviated query algorithm search\x00no query solution\x00at most %d tables in a join\x00SCAN CONSTANT ROW\x00second argument to nth_value must be a positive integer\x00argument of ntile must be a positive integer\x00row_number\x00dense_rank\x00rank\x00percent_rank\x00cume_dist\x00ntile\x00last_value\x00nth_value\x00first_value\x00lead\x00lag\x00no such window: %s\x00RANGE with offset PRECEDING/FOLLOWING requires one ORDER BY expression\x00FILTER clause may only be used with aggregate window functions\x00unsupported frame specification\x00PARTITION clause\x00ORDER BY clause\x00frame specification\x00cannot override %s of window: %s\x00DISTINCT is not supported for window functions\x00frame starting offset must be a non-negative integer\x00frame ending offset must be a non-negative integer\x00frame starting offset must be a non-negative number\x00frame ending offset must be a non-negative number\x00%s clause should come after %s not before\x00LIMIT\x00too many terms in compound SELECT\x00syntax error after column name \"%.*s\"\x00parser stack overflow\x00unknown table option: %.*s\x00set list\x00near \"%T\": syntax error\x00qualified table names are not allowed on INSERT, UPDATE, and DELETE statements within triggers\x00the INDEXED BY clause is not allowed on UPDATE or DELETE statements within triggers\x00the NOT INDEXED clause is not allowed on UPDATE or DELETE statements within triggers\x00incomplete input\x00unrecognized token: \"%.*s\"\x00%s in \"%s\"\x00create\x00temp\x00temporary\x00end\x00explain\x00unable to close due to unfinalized statements or unfinished backups\x00unknown error\x00abort due to ROLLBACK\x00another row available\x00no more rows available\x00not an error\x00SQL logic error\x00access permission denied\x00query aborted\x00database is locked\x00database table is locked\x00attempt to write a readonly database\x00interrupted\x00disk I/O error\x00database disk image is malformed\x00unknown operation\x00database or disk is full\x00unable to open database file\x00locking protocol\x00constraint failed\x00datatype mismatch\x00bad parameter or other API misuse\x00authorization denied\x00column index out of range\x00file is not a database\x00notification message\x00warning message\x00unable to delete/modify user-function due to active statements\x00unable to use function %s in the requested context\x00unknown database: %s\x00unable to delete/modify collation sequence due to active statements\x00file:\x00localhost\x00invalid uri authority: %.*s\x00vfs\x00cache\x00mode\x00no such %s mode: %s\x00%s mode not allowed: %s\x00no such vfs: %s\x00shared\x00private\x00ro\x00rw\x00rwc\x00RTRIM\x00\x00\x00\x00%s at line %d of [%.10s]\x00database corruption\x00misuse\x00cannot open file\x00no such table column: %s.%s\x00SQLITE_\x00database is deadlocked\x00array\x00object\x000123456789abcdef\x00JSON cannot hold BLOB values\x00malformed JSON\x00[0]\x00JSON path error near '%q'\x00json_%s() needs an odd number of arguments\x00json_object() requires an even number of arguments\x00json_object() labels must be TEXT\x00set\x00insert\x00[]\x00{}\x00CREATE TABLE x(key,value,type,atom,id,parent,fullkey,path,json HIDDEN,root HIDDEN)\x00[%d]\x00.%.*s\x00$\x00json\x00json_array\x00json_array_length\x00json_extract\x00json_insert\x00json_object\x00json_patch\x00json_quote\x00json_remove\x00json_replace\x00json_set\x00json_type\x00json_valid\x00json_group_array\x00json_group_object\x00json_each\x00json_tree\x00%s_node\x00data\x00DROP TABLE '%q'.'%q_node';DROP TABLE '%q'.'%q_rowid';DROP TABLE '%q'.'%q_parent';\x00RtreeMatchArg\x00SELECT * FROM %Q.%Q\x00UNIQUE constraint failed: %s.%s\x00rtree constraint failed: %s.(%s<=%s)\x00ALTER TABLE %Q.'%q_node' RENAME TO \"%w_node\";ALTER TABLE %Q.'%q_parent' RENAME TO \"%w_parent\";ALTER TABLE %Q.'%q_rowid' RENAME TO \"%w_rowid\";\x00SELECT stat FROM %Q.sqlite_stat1 WHERE tbl = '%q_rowid'\x00node\x00CREATE TABLE \"%w\".\"%w_rowid\"(rowid INTEGER PRIMARY KEY,nodeno\x00,a%d\x00);CREATE TABLE \"%w\".\"%w_node\"(nodeno INTEGER PRIMARY KEY,data);\x00CREATE TABLE \"%w\".\"%w_parent\"(nodeno INTEGER PRIMARY KEY,parentnode);\x00INSERT INTO \"%w\".\"%w_node\"VALUES(1,zeroblob(%d))\x00INSERT INTO\"%w\".\"%w_rowid\"(rowid,nodeno)VALUES(?1,?2)ON CONFLICT(rowid)DO UPDATE SET nodeno=excluded.nodeno\x00SELECT * FROM \"%w\".\"%w_rowid\" WHERE rowid=?1\x00UPDATE \"%w\".\"%w_rowid\"SET \x00a%d=coalesce(?%d,a%d)\x00a%d=?%d\x00 WHERE rowid=?1\x00INSERT OR REPLACE INTO '%q'.'%q_node' VALUES(?1, ?2)\x00DELETE FROM '%q'.'%q_node' WHERE nodeno = ?1\x00SELECT nodeno FROM '%q'.'%q_rowid' WHERE rowid = ?1\x00INSERT OR REPLACE INTO '%q'.'%q_rowid' VALUES(?1, ?2)\x00DELETE FROM '%q'.'%q_rowid' WHERE rowid = ?1\x00SELECT parentnode FROM '%q'.'%q_parent' WHERE nodeno = ?1\x00INSERT OR REPLACE INTO '%q'.'%q_parent' VALUES(?1, ?2)\x00DELETE FROM '%q'.'%q_parent' WHERE nodeno = ?1\x00PRAGMA %Q.page_size\x00SELECT length(data) FROM '%q'.'%q_node' WHERE nodeno = 1\x00undersize RTree blobs in \"%q_node\"\x00Wrong number of columns for an rtree table\x00Too few columns for an rtree table\x00Too many columns for an rtree table\x00Auxiliary rtree columns must be last\x00CREATE TABLE x(%.*s INT\x00,%.*s\x00);\x00,%.*s REAL\x00,%.*s INT\x00{%lld\x00 %g\x00}\x00Invalid argument to rtreedepth()\x00%z%s%z\x00SELECT data FROM %Q.'%q_node' WHERE nodeno=?\x00Node %lld missing from database\x00SELECT parentnode FROM %Q.'%q_parent' WHERE nodeno=?1\x00SELECT nodeno FROM %Q.'%q_rowid' WHERE rowid=?1\x00Mapping (%lld -> %lld) missing from %s table\x00%_rowid\x00%_parent\x00Found (%lld -> %lld) in %s table, expected (%lld -> %lld)\x00Dimension %d of cell %d on node %lld is corrupt\x00Dimension %d of cell %d on node %lld is corrupt relative to parent\x00Node %lld is too small (%d bytes)\x00Rtree depth out of range (%d)\x00Node %lld is too small for cell count of %d (%d bytes)\x00SELECT count(*) FROM %Q.'%q%s'\x00Wrong number of entries in %%%s table - expected %lld, actual %lld\x00SELECT * FROM %Q.'%q_rowid'\x00Schema corrupt or not an rtree\x00_rowid\x00_parent\x00END\x00wrong number of arguments to function rtreecheck()\x00[\x00[%!g,%!g],\x00[%!g,%!g]]\x00\x00CREATE TABLE x(_shape\x00,%s\x00rtree\x00fullscan\x00_shape does not contain a valid polygon\x00geopoly_overlap\x00geopoly_within\x00geopoly\x00geopoly_area\x00geopoly_blob\x00geopoly_json\x00geopoly_svg\x00geopoly_contains_point\x00geopoly_debug\x00geopoly_bbox\x00geopoly_xform\x00geopoly_regular\x00geopoly_ccw\x00geopoly_group_bbox\x00rtreenode\x00rtreedepth\x00rtreecheck\x00rtree_i32\x00corrupt fossil delta\x00DROP TRIGGER IF EXISTS temp.rbu_insert_tr;DROP TRIGGER IF EXISTS temp.rbu_update1_tr;DROP TRIGGER IF EXISTS temp.rbu_update2_tr;DROP TRIGGER IF EXISTS temp.rbu_delete_tr;\x00SELECT rbu_target_name(name, type='view') AS target, name FROM sqlite_schema WHERE type IN ('table', 'view') AND target IS NOT NULL %s ORDER BY name\x00AND rootpage!=0 AND rootpage IS NOT NULL\x00SELECT name, rootpage, sql IS NULL OR substr(8, 6)=='UNIQUE' FROM main.sqlite_schema WHERE type='index' AND tbl_name = ?\x00SELECT (sql LIKE 'create virtual%%'), rootpage FROM sqlite_schema WHERE name=%Q\x00PRAGMA index_list=%Q\x00SELECT rootpage FROM sqlite_schema WHERE name = %Q\x00PRAGMA table_info=%Q\x00PRAGMA main.index_list = %Q\x00PRAGMA main.index_xinfo = %Q\x00SELECT * FROM '%q'\x00rbu_\x00rbu_rowid\x00table %q %s rbu_rowid column\x00may not have\x00requires\x00PRAGMA table_info(%Q)\x00column missing from %q: %s\x00%z%s\"%w\"\x00%z%s%s\"%w\"%s\x00SELECT max(_rowid_) FROM \"%s%w\"\x00 WHERE _rowid_ > %lld \x00 DESC\x00quote(\x00||','||\x00SELECT %s FROM \"%s%w\" ORDER BY %s LIMIT 1\x00 WHERE (%s) > (%s) \x00_rowid_\x00%z%s \"%w\" COLLATE %Q\x00%z%s \"rbu_imp_%d%w\" COLLATE %Q DESC\x00%z%s quote(\"rbu_imp_%d%w\")\x00SELECT %s FROM \"rbu_imp_%w\" ORDER BY %s LIMIT 1\x00%z%s%s\x00(%s) > (%s)\x00%z%s(%.*s) COLLATE %Q\x00%z%s\"%w\" COLLATE %Q\x00%z%s\"rbu_imp_%d%w\"%s\x00%z%s\"rbu_imp_%d%w\" %s COLLATE %Q\x00%z%s\"rbu_imp_%d%w\" IS ?\x00%z%s%s.\"%w\"\x00%z%sNULL\x00%z, %s._rowid_\x00_rowid_ = ?%d\x00%z%sc%d=?%d\x00_rowid_ = (SELECT id FROM rbu_imposter2 WHERE %z)\x00%z%s\"%w\"=?%d\x00invalid rbu_control value\x00%z%s\"%w\"=rbu_delta(\"%w\", ?%d)\x00%z%s\"%w\"=rbu_fossil_delta(\"%w\", ?%d)\x00PRIMARY KEY(\x00%z%s\"%w\"%s\x00%z)\x00SELECT name FROM sqlite_schema WHERE rootpage = ?\x00%z%sc%d %s COLLATE %Q\x00%z%sc%d%s\x00%z, id INTEGER\x00CREATE TABLE rbu_imposter2(%z, PRIMARY KEY(%z)) WITHOUT ROWID\x00PRIMARY KEY \x00%z%s\"%w\" %s %sCOLLATE %Q%s\x00 NOT NULL\x00%z, %z\x00CREATE TABLE \"rbu_imp_%w\"(%z)%s\x00 WITHOUT ROWID\x00INSERT INTO %s.'rbu_tmp_%q'(rbu_control,%s%s) VALUES(%z)\x00SELECT trim(sql) FROM sqlite_schema WHERE type='index' AND name=?\x00 LIMIT -1 OFFSET %d\x00CREATE TABLE \"rbu_imp_%w\"( %s, PRIMARY KEY( %s ) ) WITHOUT ROWID\x00INSERT INTO \"rbu_imp_%w\" VALUES(%s)\x00DELETE FROM \"rbu_imp_%w\" WHERE %s\x00SELECT %s, 0 AS rbu_control FROM '%q' %s %s %s ORDER BY %s%s\x00AND\x00WHERE\x00SELECT %s, rbu_control FROM %s.'rbu_tmp_%q' %s ORDER BY %s%s\x00SELECT %s, rbu_control FROM %s.'rbu_tmp_%q' %s UNION ALL SELECT %s, rbu_control FROM '%q' %s %s typeof(rbu_control)='integer' AND rbu_control!=1 ORDER BY %s%s\x00rbu_imp_\x00INSERT INTO \"%s%w\"(%s%s) VALUES(%s)\x00, _rowid_\x00DELETE FROM \"%s%w\" WHERE %s\x00, rbu_rowid\x00CREATE TABLE IF NOT EXISTS %s.'rbu_tmp_%q' AS SELECT *%s FROM '%q' WHERE 0;\x00, 0 AS rbu_rowid\x00CREATE TEMP TRIGGER rbu_delete_tr BEFORE DELETE ON \"%s%w\" BEGIN SELECT rbu_tmp_insert(3, %s);END;CREATE TEMP TRIGGER rbu_update1_tr BEFORE UPDATE ON \"%s%w\" BEGIN SELECT rbu_tmp_insert(3, %s);END;CREATE TEMP TRIGGER rbu_update2_tr AFTER UPDATE ON \"%s%w\" BEGIN SELECT rbu_tmp_insert(4, %s);END;\x00CREATE TEMP TRIGGER rbu_insert_tr AFTER INSERT ON \"%s%w\" BEGIN SELECT rbu_tmp_insert(0, %s);END;\x00,_rowid_ \x00,rbu_rowid\x00SELECT %s,%s rbu_control%s FROM '%q'%s %s %s %s\x000 AS \x00UPDATE \"%s%w\" SET %s WHERE %s\x00SELECT k, v FROM %s.rbu_state\x00file://%s-vacuum?modeof=%s\x00ATTACH %Q AS stat\x00CREATE TABLE IF NOT EXISTS %s.rbu_state(k INTEGER PRIMARY KEY, v)\x00cannot vacuum wal mode database\x00file:%s-vactmp?rbu_memory=1%s%s\x00&\x00rbu_tmp_insert\x00rbu_fossil_delta\x00rbu_target_name\x00SELECT * FROM sqlite_schema\x00rbu vfs not found\x00PRAGMA main.wal_checkpoint=restart\x00%s-oal\x00%s-wal\x00PRAGMA schema_version\x00PRAGMA schema_version = %d\x00INSERT OR REPLACE INTO %s.rbu_state(k, v) VALUES (%d, %d), (%d, %Q), (%d, %Q), (%d, %d), (%d, %d), (%d, %lld), (%d, %lld), (%d, %lld), (%d, %lld), (%d, %Q) \x00PRAGMA main.%s\x00PRAGMA main.%s = %d\x00PRAGMA writable_schema=1\x00SELECT sql FROM sqlite_schema WHERE sql!='' AND rootpage!=0 AND name!='sqlite_sequence' ORDER BY type DESC\x00SELECT * FROM sqlite_schema WHERE rootpage=0 OR rootpage IS NULL\x00INSERT INTO sqlite_schema VALUES(?,?,?,?,?)\x00PRAGMA writable_schema=0\x00DELETE FROM %s.'rbu_tmp_%q'\x00rbu_state mismatch error\x00rbu_vfs_%d\x00SELECT count(*) FROM sqlite_schema WHERE type='index' AND tbl_name = %Q\x00rbu_index_cnt\x00SELECT 1 FROM sqlite_schema WHERE tbl_name = 'rbu_count'\x00SELECT sum(cnt * (1 + rbu_index_cnt(rbu_target_name(tbl))))FROM rbu_count\x00cannot update wal mode database\x00database modified during rbu %s\x00vacuum\x00update\x00BEGIN IMMEDIATE\x00PRAGMA journal_mode=off\x00-vactmp\x00DELETE FROM stat.rbu_state\x00rbu/zipvfs setup error\x00rbu(%s)/%z\x00rbu_memory\x00SELECT 0, 'tbl', '', 0, '', 1 UNION ALL SELECT 1, 'idx', '', 0, '', 2 UNION ALL SELECT 2, 'stat', '', 0, '', 0\x00PRAGMA '%q'.table_info('%q')\x00%z%s\"%w\".\"%w\".\"%w\"=\"%w\".\"%w\".\"%w\"\x00%z%s\"%w\".\"%w\".\"%w\" IS NOT \"%w\".\"%w\".\"%w\"\x00 OR \x00SELECT * FROM \"%w\".\"%w\" WHERE NOT EXISTS ( SELECT 1 FROM \"%w\".\"%w\" WHERE %s)\x00SELECT * FROM \"%w\".\"%w\", \"%w\".\"%w\" WHERE %s AND (%z)\x00table schemas do not match\x00SELECT tbl, ?2, stat FROM %Q.sqlite_stat1 WHERE tbl IS ?1 AND idx IS (CASE WHEN ?2=X'' THEN NULL ELSE ?2 END)\x00SELECT * FROM \x00 WHERE \x00 IS ?\x00SAVEPOINT changeset\x00RELEASE changeset\x00UPDATE main.\x00 SET \x00 = ?\x00idx IS CASE WHEN length(?4)=0 AND typeof(?4)='blob' THEN NULL ELSE ?4 END \x00DELETE FROM main.\x00 AND (?\x00AND \x00INSERT INTO main.\x00) VALUES(?\x00, ?\x00INSERT INTO main.sqlite_stat1 VALUES(?1, CASE WHEN length(?2)=0 AND typeof(?2)='blob' THEN NULL ELSE ?2 END, ?3)\x00DELETE FROM main.sqlite_stat1 WHERE tbl=?1 AND idx IS CASE WHEN length(?2)=0 AND typeof(?2)='blob' THEN NULL ELSE ?2 END AND (?4 OR stat IS ?3)\x00SAVEPOINT replace_op\x00RELEASE replace_op\x00SAVEPOINT changeset_apply\x00PRAGMA defer_foreign_keys = 1\x00sqlite3changeset_apply(): no such table: %s\x00sqlite3changeset_apply(): table %s has %d columns, expected %d or more\x00sqlite3changeset_apply(): primary key mismatch for table %s\x00PRAGMA defer_foreign_keys = 0\x00RELEASE changeset_apply\x00ROLLBACK TO changeset_apply\x00fts5: parser stack overflow\x00fts5: syntax error near \"%.*s\"\x00%z%.*s\x00wrong number of arguments to function highlight()\x00wrong number of arguments to function snippet()\x00snippet\x00highlight\x00bm25\x00prefix\x00malformed prefix=... directive\x00too many prefix indexes (max %d)\x00prefix length out of range (max 999)\x00tokenize\x00multiple tokenize=... directives\x00parse error in tokenize directive\x00content\x00multiple content=... directives\x00%Q.%Q\x00content_rowid\x00multiple content_rowid=... directives\x00columnsize\x00malformed columnsize=... directive\x00columns\x00malformed detail=... directive\x00unrecognized option: \"%.*s\"\x00reserved fts5 column name: %s\x00unindexed\x00unrecognized column option: %s\x00T.%Q\x00, T.%Q\x00, T.c%d\x00reserved fts5 table name: %s\x00parse error in \"%s\"\x00docsize\x00%Q.'%q_%s'\x00CREATE TABLE x(\x00%z%s%Q\x00%z, %Q HIDDEN, %s HIDDEN)\x00pgsz\x00hashsize\x00automerge\x00usermerge\x00crisismerge\x00SELECT k, v FROM %Q.'%q_config'\x00version\x00invalid fts5 file format (found %d, expected %d) - run 'rebuild'\x00unterminated string\x00fts5: syntax error near \"%.1s\"\x00OR\x00NOT\x00NEAR\x00expected integer, got \"%.*s\"\x00fts5: column queries are not supported (detail=none)\x00fts5: %s queries are not supported (detail!=full)\x00phrase\x00block\x00REPLACE INTO '%q'.'%q_data'(id, block) VALUES(?,?)\x00DELETE FROM '%q'.'%q_data' WHERE id>=? AND id<=?\x00DELETE FROM '%q'.'%q_idx' WHERE segid=?\x00PRAGMA %Q.data_version\x00SELECT pgno FROM '%q'.'%q_idx' WHERE segid=? AND term<=? ORDER BY term DESC LIMIT 1\x00INSERT INTO '%q'.'%q_idx'(segid,term,pgno) VALUES(?,?,?)\x00%s_data\x00id INTEGER PRIMARY KEY, block BLOB\x00segid, term, pgno, PRIMARY KEY(segid, term)\x00SELECT segid, term, (pgno>>1), (pgno&1) FROM %Q.'%q_idx' WHERE segid=%d ORDER BY 1, 2\x00\x00\x00\x00\x00\x00recursively defined fts5 content table\x00SELECT rowid, rank FROM %Q.%Q ORDER BY %s(\"%w\"%s%s) %s\x00DESC\x00ASC\x00reads\x00unknown special query: %.*s\x00SELECT %s\x00no such function: %s\x00parse error in rank function: %s\x00%s: table does not support scanning\x00delete-all\x00'delete-all' may only be used with a contentless or external content fts5 table\x00rebuild\x00'rebuild' may not be used with a contentless fts5 table\x00merge\x00integrity-check\x00cannot %s contentless fts5 table: %s\x00DELETE from\x00no such cursor: %lld\x00no such tokenizer: %s\x00error in tokenizer constructor\x00fts5_api_ptr\x00fts5: 2021-06-18 18:36:39 5c9a6c06871cb9fe42814af9c039eb6da5427a6ec28f187af7ebfb62eafa66e5\x00config\x00fts5\x00fts5_source_id\x00SELECT %s FROM %s T WHERE T.%Q >= ? AND T.%Q <= ? ORDER BY T.%Q ASC\x00SELECT %s FROM %s T WHERE T.%Q <= ? AND T.%Q >= ? ORDER BY T.%Q DESC\x00SELECT %s FROM %s T WHERE T.%Q=?\x00INSERT INTO %Q.'%q_content' VALUES(%s)\x00REPLACE INTO %Q.'%q_content' VALUES(%s)\x00DELETE FROM %Q.'%q_content' WHERE id=?\x00REPLACE INTO %Q.'%q_docsize' VALUES(?,?)\x00DELETE FROM %Q.'%q_docsize' WHERE id=?\x00SELECT sz FROM %Q.'%q_docsize' WHERE id=?\x00REPLACE INTO %Q.'%q_config' VALUES(?,?)\x00SELECT %s FROM %s AS T\x00DROP TABLE IF EXISTS %Q.'%q_data';DROP TABLE IF EXISTS %Q.'%q_idx';DROP TABLE IF EXISTS %Q.'%q_config';\x00DROP TABLE IF EXISTS %Q.'%q_docsize';\x00DROP TABLE IF EXISTS %Q.'%q_content';\x00ALTER TABLE %Q.'%q_%s' RENAME TO '%q_%s';\x00CREATE TABLE %Q.'%q_%q'(%s)%s\x00fts5: error creating shadow table %q_%s: %s\x00id INTEGER PRIMARY KEY\x00, c%d\x00id INTEGER PRIMARY KEY, sz BLOB\x00k PRIMARY KEY, v\x00DELETE FROM %Q.'%q_data';DELETE FROM %Q.'%q_idx';\x00DELETE FROM %Q.'%q_docsize';\x00SELECT count(*) FROM %Q.'%q_%s'\x00tokenchars\x00separators\x00L* N* Co\x00categories\x00remove_diacritics\x00unicode61\x00al\x00ance\x00ence\x00er\x00ic\x00able\x00ible\x00ant\x00ement\x00ment\x00ent\x00ion\x00ou\x00ism\x00ate\x00iti\x00ous\x00ive\x00ize\x00at\x00bl\x00ble\x00iz\x00ational\x00tional\x00tion\x00enci\x00anci\x00izer\x00logi\x00bli\x00alli\x00entli\x00eli\x00e\x00ousli\x00ization\x00ation\x00ator\x00alism\x00iveness\x00fulness\x00ful\x00ousness\x00aliti\x00iviti\x00biliti\x00ical\x00ness\x00icate\x00iciti\x00ative\x00alize\x00eed\x00ee\x00ed\x00ing\x00case_sensitive\x00ascii\x00porter\x00trigram\x00col\x00row\x00instance\x00fts5vocab: unknown table type: %Q\x00CREATE TABlE vocab(term, col, doc, cnt)\x00CREATE TABlE vocab(term, doc, cnt)\x00CREATE TABlE vocab(term, doc, col, offset)\x00wrong number of vtable arguments\x00recursive definition for %s.%s\x00SELECT t.%Q FROM %Q.%Q AS t WHERE t.%Q MATCH '*id'\x00no such fts5 table: %s.%s\x00fts5vocab\x002021-06-18 18:36:39 5c9a6c06871cb9fe42814af9c039eb6da5427a6ec28f187af7ebfb62eafa66e5\x00"
var ts = (*reflect.StringHeader)(unsafe.Pointer(&ts1)).Data
--
cgit v1.2.3