cline 1.0.0 → 1.0.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (299) hide show
  1. package/bin/cline +0 -0
  2. package/bin/cline-darwin-amd64 +0 -0
  3. package/bin/cline-darwin-arm64 +0 -0
  4. package/bin/cline-host +0 -0
  5. package/bin/cline-host-darwin-amd64 +0 -0
  6. package/bin/cline-host-darwin-arm64 +0 -0
  7. package/bin/cline-host-linux-amd64 +0 -0
  8. package/bin/cline-host-linux-arm64 +0 -0
  9. package/bin/cline-linux-amd64 +0 -0
  10. package/bin/cline-linux-arm64 +0 -0
  11. package/cline-core.js +24841 -16621
  12. package/extension/package.json +12 -4
  13. package/node_modules/b4a/LICENSE +201 -0
  14. package/node_modules/b4a/README.md +153 -0
  15. package/node_modules/b4a/browser.js +563 -0
  16. package/node_modules/b4a/index.js +188 -0
  17. package/node_modules/b4a/lib/ascii.js +31 -0
  18. package/node_modules/b4a/lib/base64.js +65 -0
  19. package/node_modules/b4a/lib/hex.js +51 -0
  20. package/node_modules/b4a/lib/utf16le.js +40 -0
  21. package/node_modules/b4a/lib/utf8.js +141 -0
  22. package/node_modules/b4a/package.json +49 -0
  23. package/node_modules/b4a/react-native.js +5 -0
  24. package/node_modules/bare-events/LICENSE +201 -0
  25. package/node_modules/bare-events/README.md +25 -0
  26. package/node_modules/bare-events/global.d.ts +15 -0
  27. package/node_modules/bare-events/global.js +5 -0
  28. package/node_modules/bare-events/index.d.ts +94 -0
  29. package/node_modules/bare-events/index.js +355 -0
  30. package/node_modules/bare-events/lib/errors.js +32 -0
  31. package/node_modules/bare-events/package.json +61 -0
  32. package/node_modules/bare-events/web.d.ts +79 -0
  33. package/node_modules/bare-events/web.js +347 -0
  34. package/node_modules/bare-fs/CMakeLists.txt +13 -0
  35. package/node_modules/bare-fs/LICENSE +201 -0
  36. package/node_modules/bare-fs/README.md +29 -0
  37. package/node_modules/bare-fs/binding.c +2238 -0
  38. package/node_modules/bare-fs/binding.js +1 -0
  39. package/node_modules/bare-fs/index.d.ts +1115 -0
  40. package/node_modules/bare-fs/index.js +2330 -0
  41. package/node_modules/bare-fs/lib/constants.d.ts +49 -0
  42. package/node_modules/bare-fs/lib/constants.js +49 -0
  43. package/node_modules/bare-fs/lib/errors.d.ts +11 -0
  44. package/node_modules/bare-fs/lib/errors.js +55 -0
  45. package/node_modules/bare-fs/package.json +71 -0
  46. package/node_modules/bare-fs/prebuilds/android-arm/bare-fs.bare +0 -0
  47. package/node_modules/bare-fs/prebuilds/android-arm64/bare-fs.bare +0 -0
  48. package/node_modules/bare-fs/prebuilds/android-ia32/bare-fs.bare +0 -0
  49. package/node_modules/bare-fs/prebuilds/android-x64/bare-fs.bare +0 -0
  50. package/node_modules/bare-fs/prebuilds/darwin-arm64/bare-fs.bare +0 -0
  51. package/node_modules/bare-fs/prebuilds/darwin-x64/bare-fs.bare +0 -0
  52. package/node_modules/bare-fs/prebuilds/ios-arm64/bare-fs.bare +0 -0
  53. package/node_modules/bare-fs/prebuilds/ios-arm64-simulator/bare-fs.bare +0 -0
  54. package/node_modules/bare-fs/prebuilds/ios-x64-simulator/bare-fs.bare +0 -0
  55. package/node_modules/bare-fs/prebuilds/linux-arm64/bare-fs.bare +0 -0
  56. package/node_modules/bare-fs/prebuilds/linux-x64/bare-fs.bare +0 -0
  57. package/node_modules/bare-fs/prebuilds/win32-arm64/bare-fs.bare +0 -0
  58. package/node_modules/bare-fs/prebuilds/win32-x64/bare-fs.bare +0 -0
  59. package/node_modules/bare-fs/promises.d.ts +282 -0
  60. package/node_modules/bare-fs/promises.js +90 -0
  61. package/node_modules/bare-os/CMakeLists.txt +13 -0
  62. package/node_modules/bare-os/LICENSE +201 -0
  63. package/node_modules/bare-os/README.md +11 -0
  64. package/node_modules/bare-os/binding.c +1119 -0
  65. package/node_modules/bare-os/binding.js +1 -0
  66. package/node_modules/bare-os/index.d.ts +109 -0
  67. package/node_modules/bare-os/index.js +99 -0
  68. package/node_modules/bare-os/lib/constants.js +6 -0
  69. package/node_modules/bare-os/lib/errors.js +22 -0
  70. package/node_modules/bare-os/package.json +46 -0
  71. package/node_modules/bare-os/prebuilds/android-arm/bare-os.bare +0 -0
  72. package/node_modules/bare-os/prebuilds/android-arm64/bare-os.bare +0 -0
  73. package/node_modules/bare-os/prebuilds/android-ia32/bare-os.bare +0 -0
  74. package/node_modules/bare-os/prebuilds/android-x64/bare-os.bare +0 -0
  75. package/node_modules/bare-os/prebuilds/darwin-arm64/bare-os.bare +0 -0
  76. package/node_modules/bare-os/prebuilds/darwin-x64/bare-os.bare +0 -0
  77. package/node_modules/bare-os/prebuilds/ios-arm64/bare-os.bare +0 -0
  78. package/node_modules/bare-os/prebuilds/ios-arm64-simulator/bare-os.bare +0 -0
  79. package/node_modules/bare-os/prebuilds/ios-x64-simulator/bare-os.bare +0 -0
  80. package/node_modules/bare-os/prebuilds/linux-arm64/bare-os.bare +0 -0
  81. package/node_modules/bare-os/prebuilds/linux-x64/bare-os.bare +0 -0
  82. package/node_modules/bare-os/prebuilds/win32-arm64/bare-os.bare +0 -0
  83. package/node_modules/bare-os/prebuilds/win32-x64/bare-os.bare +0 -0
  84. package/node_modules/bare-path/LICENSE +201 -0
  85. package/node_modules/bare-path/NOTICE +28 -0
  86. package/node_modules/bare-path/README.md +19 -0
  87. package/node_modules/bare-path/index.js +11 -0
  88. package/node_modules/bare-path/lib/constants.js +11 -0
  89. package/node_modules/bare-path/lib/posix.js +242 -0
  90. package/node_modules/bare-path/lib/shared.js +67 -0
  91. package/node_modules/bare-path/lib/win32.js +513 -0
  92. package/node_modules/bare-path/package.json +36 -0
  93. package/node_modules/bare-stream/LICENSE +201 -0
  94. package/node_modules/bare-stream/README.md +15 -0
  95. package/node_modules/bare-stream/global.js +8 -0
  96. package/node_modules/bare-stream/index.d.ts +237 -0
  97. package/node_modules/bare-stream/index.js +355 -0
  98. package/node_modules/bare-stream/package.json +61 -0
  99. package/node_modules/bare-stream/promises.js +3 -0
  100. package/node_modules/bare-stream/web.d.ts +73 -0
  101. package/node_modules/bare-stream/web.js +229 -0
  102. package/node_modules/bare-url/CMakeLists.txt +27 -0
  103. package/node_modules/bare-url/LICENSE +201 -0
  104. package/node_modules/bare-url/README.md +19 -0
  105. package/node_modules/bare-url/binding.c +188 -0
  106. package/node_modules/bare-url/binding.js +1 -0
  107. package/node_modules/bare-url/global.d.ts +12 -0
  108. package/node_modules/bare-url/global.js +2 -0
  109. package/node_modules/bare-url/index.d.ts +39 -0
  110. package/node_modules/bare-url/index.js +450 -0
  111. package/node_modules/bare-url/lib/errors.d.ts +8 -0
  112. package/node_modules/bare-url/lib/errors.js +38 -0
  113. package/node_modules/bare-url/lib/url-search-params.d.ts +21 -0
  114. package/node_modules/bare-url/lib/url-search-params.js +176 -0
  115. package/node_modules/bare-url/package.json +51 -0
  116. package/node_modules/bare-url/prebuilds/android-arm/bare-url.bare +0 -0
  117. package/node_modules/bare-url/prebuilds/android-arm64/bare-url.bare +0 -0
  118. package/node_modules/bare-url/prebuilds/android-ia32/bare-url.bare +0 -0
  119. package/node_modules/bare-url/prebuilds/android-x64/bare-url.bare +0 -0
  120. package/node_modules/bare-url/prebuilds/darwin-arm64/bare-url.bare +0 -0
  121. package/node_modules/bare-url/prebuilds/darwin-x64/bare-url.bare +0 -0
  122. package/node_modules/bare-url/prebuilds/ios-arm64/bare-url.bare +0 -0
  123. package/node_modules/bare-url/prebuilds/ios-arm64-simulator/bare-url.bare +0 -0
  124. package/node_modules/bare-url/prebuilds/ios-x64-simulator/bare-url.bare +0 -0
  125. package/node_modules/bare-url/prebuilds/linux-arm64/bare-url.bare +0 -0
  126. package/node_modules/bare-url/prebuilds/linux-x64/bare-url.bare +0 -0
  127. package/node_modules/bare-url/prebuilds/win32-arm64/bare-url.bare +0 -0
  128. package/node_modules/bare-url/prebuilds/win32-x64/bare-url.bare +0 -0
  129. package/node_modules/better-sqlite3/deps/download.sh +1 -1
  130. package/node_modules/better-sqlite3/deps/sqlite3/sqlite3.c +122 -81
  131. package/node_modules/better-sqlite3/deps/sqlite3/sqlite3.h +45 -45
  132. package/node_modules/better-sqlite3/lib/database.js +1 -1
  133. package/node_modules/better-sqlite3/package.json +4 -7
  134. package/node_modules/better-sqlite3/src/addon.cpp +47 -0
  135. package/node_modules/better-sqlite3/src/better_sqlite3.cpp +44 -2164
  136. package/node_modules/better-sqlite3/src/objects/backup.cpp +120 -0
  137. package/node_modules/better-sqlite3/src/objects/backup.hpp +36 -0
  138. package/node_modules/better-sqlite3/src/objects/database.cpp +417 -0
  139. package/node_modules/better-sqlite3/src/objects/database.hpp +103 -0
  140. package/node_modules/better-sqlite3/src/objects/statement-iterator.cpp +113 -0
  141. package/node_modules/better-sqlite3/src/objects/statement-iterator.hpp +50 -0
  142. package/node_modules/better-sqlite3/src/objects/statement.cpp +383 -0
  143. package/node_modules/better-sqlite3/src/objects/statement.hpp +58 -0
  144. package/node_modules/better-sqlite3/src/util/bind-map.cpp +73 -0
  145. package/node_modules/better-sqlite3/src/util/binder.cpp +193 -0
  146. package/node_modules/better-sqlite3/src/util/constants.cpp +172 -0
  147. package/node_modules/better-sqlite3/src/util/custom-aggregate.cpp +121 -0
  148. package/node_modules/better-sqlite3/src/util/custom-function.cpp +59 -0
  149. package/node_modules/better-sqlite3/src/util/custom-table.cpp +409 -0
  150. package/node_modules/better-sqlite3/src/util/data-converter.cpp +17 -0
  151. package/node_modules/better-sqlite3/src/util/data.cpp +194 -0
  152. package/node_modules/better-sqlite3/src/util/helpers.cpp +109 -0
  153. package/node_modules/better-sqlite3/src/util/macros.cpp +63 -0
  154. package/node_modules/better-sqlite3/src/util/query-macros.cpp +71 -0
  155. package/node_modules/better-sqlite3/src/util/row-builder.cpp +49 -0
  156. package/node_modules/events-universal/LICENSE +201 -0
  157. package/node_modules/events-universal/README.md +17 -0
  158. package/node_modules/events-universal/bare.js +1 -0
  159. package/node_modules/events-universal/default.js +1 -0
  160. package/node_modules/events-universal/index.js +1 -0
  161. package/node_modules/events-universal/package.json +39 -0
  162. package/node_modules/events-universal/react-native.js +1 -0
  163. package/node_modules/{fs-constants → fast-fifo}/LICENSE +1 -1
  164. package/node_modules/fast-fifo/README.md +78 -0
  165. package/node_modules/fast-fifo/fixed-size.js +39 -0
  166. package/node_modules/fast-fifo/index.js +48 -0
  167. package/node_modules/fast-fifo/package.json +28 -0
  168. package/node_modules/{base64-js → streamx}/LICENSE +1 -1
  169. package/node_modules/streamx/README.md +489 -0
  170. package/node_modules/streamx/index.js +1184 -0
  171. package/node_modules/streamx/package.json +34 -0
  172. package/node_modules/tar-fs/README.md +23 -34
  173. package/node_modules/tar-fs/index.js +211 -184
  174. package/node_modules/tar-fs/package.json +27 -7
  175. package/node_modules/tar-stream/README.md +34 -19
  176. package/node_modules/tar-stream/constants.js +14 -0
  177. package/node_modules/tar-stream/extract.js +341 -192
  178. package/node_modules/tar-stream/headers.js +201 -175
  179. package/node_modules/tar-stream/pack.js +226 -194
  180. package/node_modules/tar-stream/package.json +23 -46
  181. package/node_modules/text-decoder/LICENSE +201 -0
  182. package/node_modules/text-decoder/README.md +36 -0
  183. package/node_modules/text-decoder/index.js +64 -0
  184. package/node_modules/text-decoder/lib/browser-decoder.js +17 -0
  185. package/node_modules/text-decoder/lib/pass-through-decoder.js +19 -0
  186. package/node_modules/text-decoder/lib/utf8-decoder.js +104 -0
  187. package/node_modules/text-decoder/package.json +38 -0
  188. package/package.json +2 -2
  189. package/proto/cline/account.proto +10 -8
  190. package/proto/cline/browser.proto +3 -1
  191. package/proto/cline/checkpoints.proto +5 -3
  192. package/proto/cline/commands.proto +4 -2
  193. package/proto/cline/common.proto +5 -7
  194. package/proto/cline/dictation.proto +3 -1
  195. package/proto/cline/file.proto +36 -34
  196. package/proto/cline/hooks.proto +3 -2
  197. package/proto/cline/mcp.proto +6 -4
  198. package/proto/cline/models.proto +189 -19
  199. package/proto/cline/oca_account.proto +6 -7
  200. package/proto/cline/slash.proto +3 -1
  201. package/proto/cline/state.proto +147 -292
  202. package/proto/cline/task.proto +4 -2
  203. package/proto/cline/ui.proto +25 -24
  204. package/proto/cline/web.proto +3 -1
  205. package/proto/descriptor_set.pb +0 -0
  206. package/proto/host/diff.proto +5 -4
  207. package/proto/host/env.proto +8 -7
  208. package/proto/host/testing.proto +3 -3
  209. package/proto/host/window.proto +2 -2
  210. package/proto/host/workspace.proto +24 -11
  211. package/node_modules/base64-js/README.md +0 -34
  212. package/node_modules/base64-js/base64js.min.js +0 -1
  213. package/node_modules/base64-js/index.d.ts +0 -3
  214. package/node_modules/base64-js/index.js +0 -150
  215. package/node_modules/base64-js/package.json +0 -47
  216. package/node_modules/better-sqlite3/src/better_sqlite3.hpp +0 -1036
  217. package/node_modules/bl/.travis.yml +0 -17
  218. package/node_modules/bl/BufferList.js +0 -396
  219. package/node_modules/bl/LICENSE.md +0 -13
  220. package/node_modules/bl/README.md +0 -247
  221. package/node_modules/bl/bl.js +0 -84
  222. package/node_modules/bl/package.json +0 -37
  223. package/node_modules/bl/test/convert.js +0 -21
  224. package/node_modules/bl/test/indexOf.js +0 -492
  225. package/node_modules/bl/test/isBufferList.js +0 -32
  226. package/node_modules/bl/test/test.js +0 -869
  227. package/node_modules/buffer/AUTHORS.md +0 -70
  228. package/node_modules/buffer/LICENSE +0 -21
  229. package/node_modules/buffer/README.md +0 -410
  230. package/node_modules/buffer/index.d.ts +0 -186
  231. package/node_modules/buffer/index.js +0 -1817
  232. package/node_modules/buffer/package.json +0 -96
  233. package/node_modules/chownr/LICENSE +0 -15
  234. package/node_modules/chownr/README.md +0 -3
  235. package/node_modules/chownr/chownr.js +0 -167
  236. package/node_modules/chownr/package.json +0 -29
  237. package/node_modules/fs-constants/README.md +0 -26
  238. package/node_modules/fs-constants/browser.js +0 -1
  239. package/node_modules/fs-constants/index.js +0 -1
  240. package/node_modules/fs-constants/package.json +0 -19
  241. package/node_modules/ieee754/LICENSE +0 -11
  242. package/node_modules/ieee754/README.md +0 -51
  243. package/node_modules/ieee754/index.d.ts +0 -10
  244. package/node_modules/ieee754/index.js +0 -85
  245. package/node_modules/ieee754/package.json +0 -52
  246. package/node_modules/inherits/LICENSE +0 -16
  247. package/node_modules/inherits/README.md +0 -42
  248. package/node_modules/inherits/inherits.js +0 -9
  249. package/node_modules/inherits/inherits_browser.js +0 -27
  250. package/node_modules/inherits/package.json +0 -29
  251. package/node_modules/readable-stream/CONTRIBUTING.md +0 -38
  252. package/node_modules/readable-stream/GOVERNANCE.md +0 -136
  253. package/node_modules/readable-stream/LICENSE +0 -47
  254. package/node_modules/readable-stream/README.md +0 -106
  255. package/node_modules/readable-stream/errors-browser.js +0 -127
  256. package/node_modules/readable-stream/errors.js +0 -116
  257. package/node_modules/readable-stream/experimentalWarning.js +0 -17
  258. package/node_modules/readable-stream/lib/_stream_duplex.js +0 -126
  259. package/node_modules/readable-stream/lib/_stream_passthrough.js +0 -37
  260. package/node_modules/readable-stream/lib/_stream_readable.js +0 -1027
  261. package/node_modules/readable-stream/lib/_stream_transform.js +0 -190
  262. package/node_modules/readable-stream/lib/_stream_writable.js +0 -641
  263. package/node_modules/readable-stream/lib/internal/streams/async_iterator.js +0 -180
  264. package/node_modules/readable-stream/lib/internal/streams/buffer_list.js +0 -183
  265. package/node_modules/readable-stream/lib/internal/streams/destroy.js +0 -96
  266. package/node_modules/readable-stream/lib/internal/streams/end-of-stream.js +0 -86
  267. package/node_modules/readable-stream/lib/internal/streams/from-browser.js +0 -3
  268. package/node_modules/readable-stream/lib/internal/streams/from.js +0 -52
  269. package/node_modules/readable-stream/lib/internal/streams/pipeline.js +0 -86
  270. package/node_modules/readable-stream/lib/internal/streams/state.js +0 -22
  271. package/node_modules/readable-stream/lib/internal/streams/stream-browser.js +0 -1
  272. package/node_modules/readable-stream/lib/internal/streams/stream.js +0 -1
  273. package/node_modules/readable-stream/package.json +0 -68
  274. package/node_modules/readable-stream/readable-browser.js +0 -9
  275. package/node_modules/readable-stream/readable.js +0 -16
  276. package/node_modules/string_decoder/LICENSE +0 -48
  277. package/node_modules/string_decoder/README.md +0 -47
  278. package/node_modules/string_decoder/lib/string_decoder.js +0 -296
  279. package/node_modules/string_decoder/package.json +0 -34
  280. package/node_modules/tar-fs/.travis.yml +0 -6
  281. package/node_modules/tar-fs/test/fixtures/a/hello.txt +0 -1
  282. package/node_modules/tar-fs/test/fixtures/b/a/test.txt +0 -1
  283. package/node_modules/tar-fs/test/fixtures/d/file1 +0 -0
  284. package/node_modules/tar-fs/test/fixtures/d/file2 +0 -0
  285. package/node_modules/tar-fs/test/fixtures/d/sub-dir/file5 +0 -0
  286. package/node_modules/tar-fs/test/fixtures/d/sub-files/file3 +0 -0
  287. package/node_modules/tar-fs/test/fixtures/d/sub-files/file4 +0 -0
  288. package/node_modules/tar-fs/test/fixtures/e/directory/.ignore +0 -0
  289. package/node_modules/tar-fs/test/fixtures/e/file +0 -0
  290. package/node_modules/tar-fs/test/fixtures/invalid.tar +0 -0
  291. package/node_modules/tar-fs/test/index.js +0 -346
  292. package/node_modules/tar-stream/sandbox.js +0 -11
  293. package/node_modules/util-deprecate/History.md +0 -16
  294. package/node_modules/util-deprecate/LICENSE +0 -24
  295. package/node_modules/util-deprecate/README.md +0 -53
  296. package/node_modules/util-deprecate/browser.js +0 -67
  297. package/node_modules/util-deprecate/node.js +0 -6
  298. package/node_modules/util-deprecate/package.json +0 -27
  299. package/test-startup.sh +0 -14
@@ -1,6 +1,6 @@
1
1
  /******************************************************************************
2
2
  ** This file is an amalgamation of many separate C source files from SQLite
3
- ** version 3.50.2. By combining all the individual C code files into this
3
+ ** version 3.50.4. By combining all the individual C code files into this
4
4
  ** single large file, the entire code can be compiled as a single translation
5
5
  ** unit. This allows many compilers to do optimizations that would not be
6
6
  ** possible if the files were compiled separately. Performance improvements
@@ -18,7 +18,7 @@
18
18
  ** separate file. This file contains only code for the core SQLite library.
19
19
  **
20
20
  ** The content in this amalgamation comes from Fossil check-in
21
- ** 2af157d77fb1304a74176eaee7fbc7c7e932 with changes in files:
21
+ ** 4d8adfb30e03f9cf27f800a2c1ba3c48fb4c with changes in files:
22
22
  **
23
23
  **
24
24
  */
@@ -466,9 +466,9 @@ extern "C" {
466
466
  ** [sqlite3_libversion_number()], [sqlite3_sourceid()],
467
467
  ** [sqlite_version()] and [sqlite_source_id()].
468
468
  */
469
- #define SQLITE_VERSION "3.50.2"
470
- #define SQLITE_VERSION_NUMBER 3050002
471
- #define SQLITE_SOURCE_ID "2025-06-28 14:00:48 2af157d77fb1304a74176eaee7fbc7c7e932d946bf25325e9c26c91db19e3079"
469
+ #define SQLITE_VERSION "3.50.4"
470
+ #define SQLITE_VERSION_NUMBER 3050004
471
+ #define SQLITE_SOURCE_ID "2025-07-30 19:33:53 4d8adfb30e03f9cf27f800a2c1ba3c48fb4ca1b08b0f5ed59a4d5ecbf45e20a3"
472
472
 
473
473
  /*
474
474
  ** CAPI3REF: Run-Time Library Version Numbers
@@ -9378,13 +9378,13 @@ SQLITE_API int sqlite3_stmt_status(sqlite3_stmt*, int op,int resetFlg);
9378
9378
  ** [[SQLITE_STMTSTATUS_SORT]] <dt>SQLITE_STMTSTATUS_SORT</dt>
9379
9379
  ** <dd>^This is the number of sort operations that have occurred.
9380
9380
  ** A non-zero value in this counter may indicate an opportunity to
9381
- ** improvement performance through careful use of indices.</dd>
9381
+ ** improve performance through careful use of indices.</dd>
9382
9382
  **
9383
9383
  ** [[SQLITE_STMTSTATUS_AUTOINDEX]] <dt>SQLITE_STMTSTATUS_AUTOINDEX</dt>
9384
9384
  ** <dd>^This is the number of rows inserted into transient indices that
9385
9385
  ** were created automatically in order to help joins run faster.
9386
9386
  ** A non-zero value in this counter may indicate an opportunity to
9387
- ** improvement performance by adding permanent indices that do not
9387
+ ** improve performance by adding permanent indices that do not
9388
9388
  ** need to be reinitialized each time the statement is run.</dd>
9389
9389
  **
9390
9390
  ** [[SQLITE_STMTSTATUS_VM_STEP]] <dt>SQLITE_STMTSTATUS_VM_STEP</dt>
@@ -9393,19 +9393,19 @@ SQLITE_API int sqlite3_stmt_status(sqlite3_stmt*, int op,int resetFlg);
9393
9393
  ** to 2147483647. The number of virtual machine operations can be
9394
9394
  ** used as a proxy for the total work done by the prepared statement.
9395
9395
  ** If the number of virtual machine operations exceeds 2147483647
9396
- ** then the value returned by this statement status code is undefined.
9396
+ ** then the value returned by this statement status code is undefined.</dd>
9397
9397
  **
9398
9398
  ** [[SQLITE_STMTSTATUS_REPREPARE]] <dt>SQLITE_STMTSTATUS_REPREPARE</dt>
9399
9399
  ** <dd>^This is the number of times that the prepare statement has been
9400
9400
  ** automatically regenerated due to schema changes or changes to
9401
- ** [bound parameters] that might affect the query plan.
9401
+ ** [bound parameters] that might affect the query plan.</dd>
9402
9402
  **
9403
9403
  ** [[SQLITE_STMTSTATUS_RUN]] <dt>SQLITE_STMTSTATUS_RUN</dt>
9404
9404
  ** <dd>^This is the number of times that the prepared statement has
9405
9405
  ** been run. A single "run" for the purposes of this counter is one
9406
9406
  ** or more calls to [sqlite3_step()] followed by a call to [sqlite3_reset()].
9407
9407
  ** The counter is incremented on the first [sqlite3_step()] call of each
9408
- ** cycle.
9408
+ ** cycle.</dd>
9409
9409
  **
9410
9410
  ** [[SQLITE_STMTSTATUS_FILTER_MISS]]
9411
9411
  ** [[SQLITE_STMTSTATUS_FILTER HIT]]
@@ -9415,7 +9415,7 @@ SQLITE_API int sqlite3_stmt_status(sqlite3_stmt*, int op,int resetFlg);
9415
9415
  ** step was bypassed because a Bloom filter returned not-found. The
9416
9416
  ** corresponding SQLITE_STMTSTATUS_FILTER_MISS value is the number of
9417
9417
  ** times that the Bloom filter returned a find, and thus the join step
9418
- ** had to be processed as normal.
9418
+ ** had to be processed as normal.</dd>
9419
9419
  **
9420
9420
  ** [[SQLITE_STMTSTATUS_MEMUSED]] <dt>SQLITE_STMTSTATUS_MEMUSED</dt>
9421
9421
  ** <dd>^This is the approximate number of bytes of heap memory
@@ -9520,9 +9520,9 @@ struct sqlite3_pcache_page {
9520
9520
  ** SQLite will typically create one cache instance for each open database file,
9521
9521
  ** though this is not guaranteed. ^The
9522
9522
  ** first parameter, szPage, is the size in bytes of the pages that must
9523
- ** be allocated by the cache. ^szPage will always a power of two. ^The
9523
+ ** be allocated by the cache. ^szPage will always be a power of two. ^The
9524
9524
  ** second parameter szExtra is a number of bytes of extra storage
9525
- ** associated with each page cache entry. ^The szExtra parameter will
9525
+ ** associated with each page cache entry. ^The szExtra parameter will be
9526
9526
  ** a number less than 250. SQLite will use the
9527
9527
  ** extra szExtra bytes on each page to store metadata about the underlying
9528
9528
  ** database page on disk. The value passed into szExtra depends
@@ -9530,17 +9530,17 @@ struct sqlite3_pcache_page {
9530
9530
  ** ^The third argument to xCreate(), bPurgeable, is true if the cache being
9531
9531
  ** created will be used to cache database pages of a file stored on disk, or
9532
9532
  ** false if it is used for an in-memory database. The cache implementation
9533
- ** does not have to do anything special based with the value of bPurgeable;
9533
+ ** does not have to do anything special based upon the value of bPurgeable;
9534
9534
  ** it is purely advisory. ^On a cache where bPurgeable is false, SQLite will
9535
9535
  ** never invoke xUnpin() except to deliberately delete a page.
9536
9536
  ** ^In other words, calls to xUnpin() on a cache with bPurgeable set to
9537
9537
  ** false will always have the "discard" flag set to true.
9538
- ** ^Hence, a cache created with bPurgeable false will
9538
+ ** ^Hence, a cache created with bPurgeable set to false will
9539
9539
  ** never contain any unpinned pages.
9540
9540
  **
9541
9541
  ** [[the xCachesize() page cache method]]
9542
9542
  ** ^(The xCachesize() method may be called at any time by SQLite to set the
9543
- ** suggested maximum cache-size (number of pages stored by) the cache
9543
+ ** suggested maximum cache-size (number of pages stored) for the cache
9544
9544
  ** instance passed as the first argument. This is the value configured using
9545
9545
  ** the SQLite "[PRAGMA cache_size]" command.)^ As with the bPurgeable
9546
9546
  ** parameter, the implementation is not required to do anything with this
@@ -9567,12 +9567,12 @@ struct sqlite3_pcache_page {
9567
9567
  ** implementation must return a pointer to the page buffer with its content
9568
9568
  ** intact. If the requested page is not already in the cache, then the
9569
9569
  ** cache implementation should use the value of the createFlag
9570
- ** parameter to help it determined what action to take:
9570
+ ** parameter to help it determine what action to take:
9571
9571
  **
9572
9572
  ** <table border=1 width=85% align=center>
9573
9573
  ** <tr><th> createFlag <th> Behavior when page is not already in cache
9574
9574
  ** <tr><td> 0 <td> Do not allocate a new page. Return NULL.
9575
- ** <tr><td> 1 <td> Allocate a new page if it easy and convenient to do so.
9575
+ ** <tr><td> 1 <td> Allocate a new page if it is easy and convenient to do so.
9576
9576
  ** Otherwise return NULL.
9577
9577
  ** <tr><td> 2 <td> Make every effort to allocate a new page. Only return
9578
9578
  ** NULL if allocating a new page is effectively impossible.
@@ -9589,7 +9589,7 @@ struct sqlite3_pcache_page {
9589
9589
  ** as its second argument. If the third parameter, discard, is non-zero,
9590
9590
  ** then the page must be evicted from the cache.
9591
9591
  ** ^If the discard parameter is
9592
- ** zero, then the page may be discarded or retained at the discretion of
9592
+ ** zero, then the page may be discarded or retained at the discretion of the
9593
9593
  ** page cache implementation. ^The page cache implementation
9594
9594
  ** may choose to evict unpinned pages at any time.
9595
9595
  **
@@ -9607,7 +9607,7 @@ struct sqlite3_pcache_page {
9607
9607
  ** When SQLite calls the xTruncate() method, the cache must discard all
9608
9608
  ** existing cache entries with page numbers (keys) greater than or equal
9609
9609
  ** to the value of the iLimit parameter passed to xTruncate(). If any
9610
- ** of these pages are pinned, they are implicitly unpinned, meaning that
9610
+ ** of these pages are pinned, they become implicitly unpinned, meaning that
9611
9611
  ** they can be safely discarded.
9612
9612
  **
9613
9613
  ** [[the xDestroy() page cache method]]
@@ -9906,7 +9906,7 @@ SQLITE_API int sqlite3_backup_pagecount(sqlite3_backup *p);
9906
9906
  ** application receives an SQLITE_LOCKED error, it may call the
9907
9907
  ** sqlite3_unlock_notify() method with the blocked connection handle as
9908
9908
  ** the first argument to register for a callback that will be invoked
9909
- ** when the blocking connections current transaction is concluded. ^The
9909
+ ** when the blocking connection's current transaction is concluded. ^The
9910
9910
  ** callback is invoked from within the [sqlite3_step] or [sqlite3_close]
9911
9911
  ** call that concludes the blocking connection's transaction.
9912
9912
  **
@@ -9926,7 +9926,7 @@ SQLITE_API int sqlite3_backup_pagecount(sqlite3_backup *p);
9926
9926
  ** blocked connection already has a registered unlock-notify callback,
9927
9927
  ** then the new callback replaces the old.)^ ^If sqlite3_unlock_notify() is
9928
9928
  ** called with a NULL pointer as its second argument, then any existing
9929
- ** unlock-notify callback is canceled. ^The blocked connections
9929
+ ** unlock-notify callback is canceled. ^The blocked connection's
9930
9930
  ** unlock-notify callback may also be canceled by closing the blocked
9931
9931
  ** connection using [sqlite3_close()].
9932
9932
  **
@@ -10324,7 +10324,7 @@ SQLITE_API int sqlite3_vtab_config(sqlite3*, int op, ...);
10324
10324
  ** support constraints. In this configuration (which is the default) if
10325
10325
  ** a call to the [xUpdate] method returns [SQLITE_CONSTRAINT], then the entire
10326
10326
  ** statement is rolled back as if [ON CONFLICT | OR ABORT] had been
10327
- ** specified as part of the users SQL statement, regardless of the actual
10327
+ ** specified as part of the user's SQL statement, regardless of the actual
10328
10328
  ** ON CONFLICT mode specified.
10329
10329
  **
10330
10330
  ** If X is non-zero, then the virtual table implementation guarantees
@@ -10358,7 +10358,7 @@ SQLITE_API int sqlite3_vtab_config(sqlite3*, int op, ...);
10358
10358
  ** [[SQLITE_VTAB_INNOCUOUS]]<dt>SQLITE_VTAB_INNOCUOUS</dt>
10359
10359
  ** <dd>Calls of the form
10360
10360
  ** [sqlite3_vtab_config](db,SQLITE_VTAB_INNOCUOUS) from within the
10361
- ** the [xConnect] or [xCreate] methods of a [virtual table] implementation
10361
+ ** [xConnect] or [xCreate] methods of a [virtual table] implementation
10362
10362
  ** identify that virtual table as being safe to use from within triggers
10363
10363
  ** and views. Conceptually, the SQLITE_VTAB_INNOCUOUS tag means that the
10364
10364
  ** virtual table can do no serious harm even if it is controlled by a
@@ -10526,7 +10526,7 @@ SQLITE_API const char *sqlite3_vtab_collation(sqlite3_index_info*,int);
10526
10526
  ** </table>
10527
10527
  **
10528
10528
  ** ^For the purposes of comparing virtual table output values to see if the
10529
- ** values are same value for sorting purposes, two NULL values are considered
10529
+ ** values are the same value for sorting purposes, two NULL values are considered
10530
10530
  ** to be the same. In other words, the comparison operator is "IS"
10531
10531
  ** (or "IS NOT DISTINCT FROM") and not "==".
10532
10532
  **
@@ -10536,7 +10536,7 @@ SQLITE_API const char *sqlite3_vtab_collation(sqlite3_index_info*,int);
10536
10536
  **
10537
10537
  ** ^A virtual table implementation is always free to return rows in any order
10538
10538
  ** it wants, as long as the "orderByConsumed" flag is not set. ^When the
10539
- ** the "orderByConsumed" flag is unset, the query planner will add extra
10539
+ ** "orderByConsumed" flag is unset, the query planner will add extra
10540
10540
  ** [bytecode] to ensure that the final results returned by the SQL query are
10541
10541
  ** ordered correctly. The use of the "orderByConsumed" flag and the
10542
10542
  ** sqlite3_vtab_distinct() interface is merely an optimization. ^Careful
@@ -10633,7 +10633,7 @@ SQLITE_API int sqlite3_vtab_in(sqlite3_index_info*, int iCons, int bHandle);
10633
10633
  ** sqlite3_vtab_in_next(X,P) should be one of the parameters to the
10634
10634
  ** xFilter method which invokes these routines, and specifically
10635
10635
  ** a parameter that was previously selected for all-at-once IN constraint
10636
- ** processing use the [sqlite3_vtab_in()] interface in the
10636
+ ** processing using the [sqlite3_vtab_in()] interface in the
10637
10637
  ** [xBestIndex|xBestIndex method]. ^(If the X parameter is not
10638
10638
  ** an xFilter argument that was selected for all-at-once IN constraint
10639
10639
  ** processing, then these routines return [SQLITE_ERROR].)^
@@ -10688,7 +10688,7 @@ SQLITE_API int sqlite3_vtab_in_next(sqlite3_value *pVal, sqlite3_value **ppOut);
10688
10688
  ** and only if *V is set to a value. ^The sqlite3_vtab_rhs_value(P,J,V)
10689
10689
  ** inteface returns SQLITE_NOTFOUND if the right-hand side of the J-th
10690
10690
  ** constraint is not available. ^The sqlite3_vtab_rhs_value() interface
10691
- ** can return an result code other than SQLITE_OK or SQLITE_NOTFOUND if
10691
+ ** can return a result code other than SQLITE_OK or SQLITE_NOTFOUND if
10692
10692
  ** something goes wrong.
10693
10693
  **
10694
10694
  ** The sqlite3_vtab_rhs_value() interface is usually only successful if
@@ -10716,8 +10716,8 @@ SQLITE_API int sqlite3_vtab_rhs_value(sqlite3_index_info*, int, sqlite3_value **
10716
10716
  ** KEYWORDS: {conflict resolution mode}
10717
10717
  **
10718
10718
  ** These constants are returned by [sqlite3_vtab_on_conflict()] to
10719
- ** inform a [virtual table] implementation what the [ON CONFLICT] mode
10720
- ** is for the SQL statement being evaluated.
10719
+ ** inform a [virtual table] implementation of the [ON CONFLICT] mode
10720
+ ** for the SQL statement being evaluated.
10721
10721
  **
10722
10722
  ** Note that the [SQLITE_IGNORE] constant is also used as a potential
10723
10723
  ** return value from the [sqlite3_set_authorizer()] callback and that
@@ -10757,39 +10757,39 @@ SQLITE_API int sqlite3_vtab_rhs_value(sqlite3_index_info*, int, sqlite3_value **
10757
10757
  ** [[SQLITE_SCANSTAT_EST]] <dt>SQLITE_SCANSTAT_EST</dt>
10758
10758
  ** <dd>^The "double" variable pointed to by the V parameter will be set to the
10759
10759
  ** query planner's estimate for the average number of rows output from each
10760
- ** iteration of the X-th loop. If the query planner's estimates was accurate,
10760
+ ** iteration of the X-th loop. If the query planner's estimate was accurate,
10761
10761
  ** then this value will approximate the quotient NVISIT/NLOOP and the
10762
10762
  ** product of this value for all prior loops with the same SELECTID will
10763
- ** be the NLOOP value for the current loop.
10763
+ ** be the NLOOP value for the current loop.</dd>
10764
10764
  **
10765
10765
  ** [[SQLITE_SCANSTAT_NAME]] <dt>SQLITE_SCANSTAT_NAME</dt>
10766
10766
  ** <dd>^The "const char *" variable pointed to by the V parameter will be set
10767
10767
  ** to a zero-terminated UTF-8 string containing the name of the index or table
10768
- ** used for the X-th loop.
10768
+ ** used for the X-th loop.</dd>
10769
10769
  **
10770
10770
  ** [[SQLITE_SCANSTAT_EXPLAIN]] <dt>SQLITE_SCANSTAT_EXPLAIN</dt>
10771
10771
  ** <dd>^The "const char *" variable pointed to by the V parameter will be set
10772
10772
  ** to a zero-terminated UTF-8 string containing the [EXPLAIN QUERY PLAN]
10773
- ** description for the X-th loop.
10773
+ ** description for the X-th loop.</dd>
10774
10774
  **
10775
10775
  ** [[SQLITE_SCANSTAT_SELECTID]] <dt>SQLITE_SCANSTAT_SELECTID</dt>
10776
10776
  ** <dd>^The "int" variable pointed to by the V parameter will be set to the
10777
10777
  ** id for the X-th query plan element. The id value is unique within the
10778
10778
  ** statement. The select-id is the same value as is output in the first
10779
- ** column of an [EXPLAIN QUERY PLAN] query.
10779
+ ** column of an [EXPLAIN QUERY PLAN] query.</dd>
10780
10780
  **
10781
10781
  ** [[SQLITE_SCANSTAT_PARENTID]] <dt>SQLITE_SCANSTAT_PARENTID</dt>
10782
10782
  ** <dd>The "int" variable pointed to by the V parameter will be set to the
10783
- ** the id of the parent of the current query element, if applicable, or
10783
+ ** id of the parent of the current query element, if applicable, or
10784
10784
  ** to zero if the query element has no parent. This is the same value as
10785
- ** returned in the second column of an [EXPLAIN QUERY PLAN] query.
10785
+ ** returned in the second column of an [EXPLAIN QUERY PLAN] query.</dd>
10786
10786
  **
10787
10787
  ** [[SQLITE_SCANSTAT_NCYCLE]] <dt>SQLITE_SCANSTAT_NCYCLE</dt>
10788
10788
  ** <dd>The sqlite3_int64 output value is set to the number of cycles,
10789
10789
  ** according to the processor time-stamp counter, that elapsed while the
10790
10790
  ** query element was being processed. This value is not available for
10791
10791
  ** all query elements - if it is unavailable the output variable is
10792
- ** set to -1.
10792
+ ** set to -1.</dd>
10793
10793
  ** </dl>
10794
10794
  */
10795
10795
  #define SQLITE_SCANSTAT_NLOOP 0
@@ -10830,8 +10830,8 @@ SQLITE_API int sqlite3_vtab_rhs_value(sqlite3_index_info*, int, sqlite3_value **
10830
10830
  ** sqlite3_stmt_scanstatus_v2() with a zeroed flags parameter.
10831
10831
  **
10832
10832
  ** Parameter "idx" identifies the specific query element to retrieve statistics
10833
- ** for. Query elements are numbered starting from zero. A value of -1 may be
10834
- ** to query for statistics regarding the entire query. ^If idx is out of range
10833
+ ** for. Query elements are numbered starting from zero. A value of -1 may
10834
+ ** retrieve statistics for the entire query. ^If idx is out of range
10835
10835
  ** - less than -1 or greater than or equal to the total number of query
10836
10836
  ** elements used to implement the statement - a non-zero value is returned and
10837
10837
  ** the variable that pOut points to is unchanged.
@@ -10988,8 +10988,8 @@ SQLITE_API int sqlite3_db_cacheflush(sqlite3*);
10988
10988
  ** triggers; and so forth.
10989
10989
  **
10990
10990
  ** When the [sqlite3_blob_write()] API is used to update a blob column,
10991
- ** the pre-update hook is invoked with SQLITE_DELETE. This is because the
10992
- ** in this case the new values are not available. In this case, when a
10991
+ ** the pre-update hook is invoked with SQLITE_DELETE, because
10992
+ ** the new values are not yet available. In this case, when a
10993
10993
  ** callback made with op==SQLITE_DELETE is actually a write using the
10994
10994
  ** sqlite3_blob_write() API, the [sqlite3_preupdate_blobwrite()] returns
10995
10995
  ** the index of the column being written. In other cases, where the
@@ -11242,7 +11242,7 @@ SQLITE_API SQLITE_EXPERIMENTAL int sqlite3_snapshot_recover(sqlite3 *db, const c
11242
11242
  ** For an ordinary on-disk database file, the serialization is just a
11243
11243
  ** copy of the disk file. For an in-memory database or a "TEMP" database,
11244
11244
  ** the serialization is the same sequence of bytes which would be written
11245
- ** to disk if that database where backed up to disk.
11245
+ ** to disk if that database were backed up to disk.
11246
11246
  **
11247
11247
  ** The usual case is that sqlite3_serialize() copies the serialization of
11248
11248
  ** the database into memory obtained from [sqlite3_malloc64()] and returns
@@ -11251,7 +11251,7 @@ SQLITE_API SQLITE_EXPERIMENTAL int sqlite3_snapshot_recover(sqlite3 *db, const c
11251
11251
  ** contains the SQLITE_SERIALIZE_NOCOPY bit, then no memory allocations
11252
11252
  ** are made, and the sqlite3_serialize() function will return a pointer
11253
11253
  ** to the contiguous memory representation of the database that SQLite
11254
- ** is currently using for that database, or NULL if the no such contiguous
11254
+ ** is currently using for that database, or NULL if no such contiguous
11255
11255
  ** memory representation of the database exists. A contiguous memory
11256
11256
  ** representation of the database will usually only exist if there has
11257
11257
  ** been a prior call to [sqlite3_deserialize(D,S,...)] with the same
@@ -11322,7 +11322,7 @@ SQLITE_API unsigned char *sqlite3_serialize(
11322
11322
  ** database is currently in a read transaction or is involved in a backup
11323
11323
  ** operation.
11324
11324
  **
11325
- ** It is not possible to deserialized into the TEMP database. If the
11325
+ ** It is not possible to deserialize into the TEMP database. If the
11326
11326
  ** S argument to sqlite3_deserialize(D,S,P,N,M,F) is "temp" then the
11327
11327
  ** function returns SQLITE_ERROR.
11328
11328
  **
@@ -11344,7 +11344,7 @@ SQLITE_API int sqlite3_deserialize(
11344
11344
  sqlite3 *db, /* The database connection */
11345
11345
  const char *zSchema, /* Which DB to reopen with the deserialization */
11346
11346
  unsigned char *pData, /* The serialized database content */
11347
- sqlite3_int64 szDb, /* Number bytes in the deserialization */
11347
+ sqlite3_int64 szDb, /* Number of bytes in the deserialization */
11348
11348
  sqlite3_int64 szBuf, /* Total size of buffer pData[] */
11349
11349
  unsigned mFlags /* Zero or more SQLITE_DESERIALIZE_* flags */
11350
11350
  );
@@ -11352,7 +11352,7 @@ SQLITE_API int sqlite3_deserialize(
11352
11352
  /*
11353
11353
  ** CAPI3REF: Flags for sqlite3_deserialize()
11354
11354
  **
11355
- ** The following are allowed values for 6th argument (the F argument) to
11355
+ ** The following are allowed values for the 6th argument (the F argument) to
11356
11356
  ** the [sqlite3_deserialize(D,S,P,N,M,F)] interface.
11357
11357
  **
11358
11358
  ** The SQLITE_DESERIALIZE_FREEONCLOSE means that the database serialization
@@ -19169,7 +19169,6 @@ struct Index {
19169
19169
  unsigned hasStat1:1; /* aiRowLogEst values come from sqlite_stat1 */
19170
19170
  unsigned bNoQuery:1; /* Do not use this index to optimize queries */
19171
19171
  unsigned bAscKeyBug:1; /* True if the bba7b69f9849b5bf bug applies */
19172
- unsigned bIdxRowid:1; /* One or more of the index keys is the ROWID */
19173
19172
  unsigned bHasVCol:1; /* Index references one or more VIRTUAL columns */
19174
19173
  unsigned bHasExpr:1; /* Index contains an expression, either a literal
19175
19174
  ** expression, or a reference to a VIRTUAL column */
@@ -19442,6 +19441,7 @@ struct Expr {
19442
19441
  Table *pTab; /* TK_COLUMN: Table containing column. Can be NULL
19443
19442
  ** for a column of an index on an expression */
19444
19443
  Window *pWin; /* EP_WinFunc: Window/Filter defn for a function */
19444
+ int nReg; /* TK_NULLS: Number of registers to NULL out */
19445
19445
  struct { /* TK_IN, TK_SELECT, and TK_EXISTS */
19446
19446
  int iAddr; /* Subroutine entry address */
19447
19447
  int regReturn; /* Register used to hold return address */
@@ -21476,6 +21476,7 @@ SQLITE_PRIVATE void sqlite3ExprCodeGeneratedColumn(Parse*, Table*, Column*, int)
21476
21476
  SQLITE_PRIVATE void sqlite3ExprCodeCopy(Parse*, Expr*, int);
21477
21477
  SQLITE_PRIVATE void sqlite3ExprCodeFactorable(Parse*, Expr*, int);
21478
21478
  SQLITE_PRIVATE int sqlite3ExprCodeRunJustOnce(Parse*, Expr*, int);
21479
+ SQLITE_PRIVATE void sqlite3ExprNullRegisterRange(Parse*, int, int);
21479
21480
  SQLITE_PRIVATE int sqlite3ExprCodeTemp(Parse*, Expr*, int*);
21480
21481
  SQLITE_PRIVATE int sqlite3ExprCodeTarget(Parse*, Expr*, int);
21481
21482
  SQLITE_PRIVATE int sqlite3ExprCodeExprList(Parse*, ExprList*, int, int, u8);
@@ -111489,7 +111490,7 @@ SQLITE_PRIVATE Expr *sqlite3ExprAnd(Parse *pParse, Expr *pLeft, Expr *pRight){
111489
111490
  return pLeft;
111490
111491
  }else{
111491
111492
  u32 f = pLeft->flags | pRight->flags;
111492
- if( (f&(EP_OuterON|EP_InnerON|EP_IsFalse))==EP_IsFalse
111493
+ if( (f&(EP_OuterON|EP_InnerON|EP_IsFalse|EP_HasFunc))==EP_IsFalse
111493
111494
  && !IN_RENAME_OBJECT
111494
111495
  ){
111495
111496
  sqlite3ExprDeferredDelete(pParse, pLeft);
@@ -115243,6 +115244,12 @@ expr_code_doover:
115243
115244
  sqlite3VdbeLoadString(v, target, pExpr->u.zToken);
115244
115245
  return target;
115245
115246
  }
115247
+ case TK_NULLS: {
115248
+ /* Set a range of registers to NULL. pExpr->y.nReg registers starting
115249
+ ** with target */
115250
+ sqlite3VdbeAddOp3(v, OP_Null, 0, target, target + pExpr->y.nReg - 1);
115251
+ return target;
115252
+ }
115246
115253
  default: {
115247
115254
  /* Make NULL the default case so that if a bug causes an illegal
115248
115255
  ** Expr node to be passed into this function, it will be handled
@@ -115927,6 +115934,25 @@ SQLITE_PRIVATE int sqlite3ExprCodeRunJustOnce(
115927
115934
  return regDest;
115928
115935
  }
115929
115936
 
115937
+ /*
115938
+ ** Make arrangements to invoke OP_Null on a range of registers
115939
+ ** during initialization.
115940
+ */
115941
+ SQLITE_PRIVATE SQLITE_NOINLINE void sqlite3ExprNullRegisterRange(
115942
+ Parse *pParse, /* Parsing context */
115943
+ int iReg, /* First register to set to NULL */
115944
+ int nReg /* Number of sequential registers to NULL out */
115945
+ ){
115946
+ u8 okConstFactor = pParse->okConstFactor;
115947
+ Expr t;
115948
+ memset(&t, 0, sizeof(t));
115949
+ t.op = TK_NULLS;
115950
+ t.y.nReg = nReg;
115951
+ pParse->okConstFactor = 1;
115952
+ sqlite3ExprCodeRunJustOnce(pParse, &t, iReg);
115953
+ pParse->okConstFactor = okConstFactor;
115954
+ }
115955
+
115930
115956
  /*
115931
115957
  ** Generate code to evaluate an expression and store the results
115932
115958
  ** into a register. Return the register number where the results
@@ -127197,7 +127223,6 @@ SQLITE_PRIVATE void sqlite3CreateIndex(
127197
127223
  assert( j<=0x7fff );
127198
127224
  if( j<0 ){
127199
127225
  j = pTab->iPKey;
127200
- pIndex->bIdxRowid = 1;
127201
127226
  }else{
127202
127227
  if( pTab->aCol[j].notNull==0 ){
127203
127228
  pIndex->uniqNotNull = 0;
@@ -153178,6 +153203,7 @@ SQLITE_PRIVATE int sqlite3Select(
153178
153203
  sqlite3VdbeAddOp2(v, OP_Integer, 0, iAbortFlag);
153179
153204
  VdbeComment((v, "clear abort flag"));
153180
153205
  sqlite3VdbeAddOp3(v, OP_Null, 0, iAMem, iAMem+pGroupBy->nExpr-1);
153206
+ sqlite3ExprNullRegisterRange(pParse, iAMem, pGroupBy->nExpr);
153181
153207
 
153182
153208
  /* Begin a loop that will extract all source rows in GROUP BY order.
153183
153209
  ** This might involve two separate loops with an OP_Sort in between, or
@@ -160174,7 +160200,9 @@ static Expr *removeUnindexableInClauseTerms(
160174
160200
  int iField;
160175
160201
  assert( (pLoop->aLTerm[i]->eOperator & (WO_OR|WO_AND))==0 );
160176
160202
  iField = pLoop->aLTerm[i]->u.x.iField - 1;
160177
- if( pOrigRhs->a[iField].pExpr==0 ) continue; /* Duplicate PK column */
160203
+ if( NEVER(pOrigRhs->a[iField].pExpr==0) ){
160204
+ continue; /* Duplicate PK column */
160205
+ }
160178
160206
  pRhs = sqlite3ExprListAppend(pParse, pRhs, pOrigRhs->a[iField].pExpr);
160179
160207
  pOrigRhs->a[iField].pExpr = 0;
160180
160208
  if( pRhs ) pRhs->a[pRhs->nExpr-1].u.x.iOrderByCol = iField+1;
@@ -160271,7 +160299,7 @@ static SQLITE_NOINLINE void codeINTerm(
160271
160299
  return;
160272
160300
  }
160273
160301
  }
160274
- for(i=iEq;i<pLoop->nLTerm; i++){
160302
+ for(i=iEq; i<pLoop->nLTerm; i++){
160275
160303
  assert( pLoop->aLTerm[i]!=0 );
160276
160304
  if( pLoop->aLTerm[i]->pExpr==pX ) nEq++;
160277
160305
  }
@@ -160280,22 +160308,13 @@ static SQLITE_NOINLINE void codeINTerm(
160280
160308
  if( !ExprUseXSelect(pX) || pX->x.pSelect->pEList->nExpr==1 ){
160281
160309
  eType = sqlite3FindInIndex(pParse, pX, IN_INDEX_LOOP, 0, 0, &iTab);
160282
160310
  }else{
160283
- Expr *pExpr = pTerm->pExpr;
160284
- if( pExpr->iTable==0 || !ExprHasProperty(pExpr, EP_Subrtn) ){
160285
- sqlite3 *db = pParse->db;
160286
- pX = removeUnindexableInClauseTerms(pParse, iEq, pLoop, pX);
160287
- if( !db->mallocFailed ){
160288
- aiMap = (int*)sqlite3DbMallocZero(pParse->db, sizeof(int)*nEq);
160289
- eType = sqlite3FindInIndex(pParse, pX, IN_INDEX_LOOP, 0, aiMap,&iTab);
160290
- pExpr->iTable = iTab;
160291
- }
160292
- sqlite3ExprDelete(db, pX);
160293
- }else{
160294
- int n = sqlite3ExprVectorSize(pX->pLeft);
160295
- aiMap = (int*)sqlite3DbMallocZero(pParse->db, sizeof(int)*MAX(nEq,n));
160296
- eType = sqlite3FindInIndex(pParse, pX, IN_INDEX_LOOP, 0, aiMap, &iTab);
160311
+ sqlite3 *db = pParse->db;
160312
+ Expr *pXMod = removeUnindexableInClauseTerms(pParse, iEq, pLoop, pX);
160313
+ if( !db->mallocFailed ){
160314
+ aiMap = (int*)sqlite3DbMallocZero(db, sizeof(int)*nEq);
160315
+ eType = sqlite3FindInIndex(pParse, pXMod, IN_INDEX_LOOP, 0, aiMap, &iTab);
160297
160316
  }
160298
- pX = pExpr;
160317
+ sqlite3ExprDelete(db, pXMod);
160299
160318
  }
160300
160319
 
160301
160320
  if( eType==IN_INDEX_INDEX_DESC ){
@@ -160325,7 +160344,7 @@ static SQLITE_NOINLINE void codeINTerm(
160325
160344
  if( pIn ){
160326
160345
  int iMap = 0; /* Index in aiMap[] */
160327
160346
  pIn += i;
160328
- for(i=iEq;i<pLoop->nLTerm; i++){
160347
+ for(i=iEq; i<pLoop->nLTerm; i++){
160329
160348
  if( pLoop->aLTerm[i]->pExpr==pX ){
160330
160349
  int iOut = iTarget + i - iEq;
160331
160350
  if( eType==IN_INDEX_ROWID ){
@@ -167683,6 +167702,7 @@ static int whereLoopAddBtreeIndex(
167683
167702
  if( ExprUseXSelect(pExpr) ){
167684
167703
  /* "x IN (SELECT ...)": TUNING: the SELECT returns 25 rows */
167685
167704
  int i;
167705
+ int bRedundant = 0;
167686
167706
  nIn = 46; assert( 46==sqlite3LogEst(25) );
167687
167707
 
167688
167708
  /* The expression may actually be of the form (x, y) IN (SELECT...).
@@ -167691,7 +167711,20 @@ static int whereLoopAddBtreeIndex(
167691
167711
  ** for each such term. The following loop checks that pTerm is the
167692
167712
  ** first such term in use, and sets nIn back to 0 if it is not. */
167693
167713
  for(i=0; i<pNew->nLTerm-1; i++){
167694
- if( pNew->aLTerm[i] && pNew->aLTerm[i]->pExpr==pExpr ) nIn = 0;
167714
+ if( pNew->aLTerm[i] && pNew->aLTerm[i]->pExpr==pExpr ){
167715
+ nIn = 0;
167716
+ if( pNew->aLTerm[i]->u.x.iField == pTerm->u.x.iField ){
167717
+ /* Detect when two or more columns of an index match the same
167718
+ ** column of a vector IN operater, and avoid adding the column
167719
+ ** to the WhereLoop more than once. See tag-20250707-01
167720
+ ** in test/rowvalue.test */
167721
+ bRedundant = 1;
167722
+ }
167723
+ }
167724
+ }
167725
+ if( bRedundant ){
167726
+ pNew->nLTerm--;
167727
+ continue;
167695
167728
  }
167696
167729
  }else if( ALWAYS(pExpr->x.pList && pExpr->x.pList->nExpr) ){
167697
167730
  /* "x IN (value, value, ...)" */
@@ -167923,7 +167956,7 @@ static int whereLoopAddBtreeIndex(
167923
167956
  if( (pNew->wsFlags & WHERE_TOP_LIMIT)==0
167924
167957
  && pNew->u.btree.nEq<pProbe->nColumn
167925
167958
  && (pNew->u.btree.nEq<pProbe->nKeyCol ||
167926
- (pProbe->idxType!=SQLITE_IDXTYPE_PRIMARYKEY && !pProbe->bIdxRowid))
167959
+ pProbe->idxType!=SQLITE_IDXTYPE_PRIMARYKEY)
167927
167960
  ){
167928
167961
  if( pNew->u.btree.nEq>3 ){
167929
167962
  sqlite3ProgressCheck(pParse);
@@ -168466,6 +168499,7 @@ static int whereLoopAddBtree(
168466
168499
  pNew->u.btree.nEq = 0;
168467
168500
  pNew->u.btree.nBtm = 0;
168468
168501
  pNew->u.btree.nTop = 0;
168502
+ pNew->u.btree.nDistinctCol = 0;
168469
168503
  pNew->nSkip = 0;
168470
168504
  pNew->nLTerm = 0;
168471
168505
  pNew->iSortIdx = 0;
@@ -169534,8 +169568,6 @@ static i8 wherePathSatisfiesOrderBy(
169534
169568
  obSat = obDone;
169535
169569
  }
169536
169570
  break;
169537
- }else if( wctrlFlags & WHERE_DISTINCTBY ){
169538
- pLoop->u.btree.nDistinctCol = 0;
169539
169571
  }
169540
169572
  iCur = pWInfo->pTabList->a[pLoop->iTab].iCursor;
169541
169573
 
@@ -179914,12 +179946,21 @@ static YYACTIONTYPE yy_reduce(
179914
179946
  ** expr1 IN ()
179915
179947
  ** expr1 NOT IN ()
179916
179948
  **
179917
- ** simplify to constants 0 (false) and 1 (true), respectively,
179918
- ** regardless of the value of expr1.
179949
+ ** simplify to constants 0 (false) and 1 (true), respectively.
179950
+ **
179951
+ ** Except, do not apply this optimization if expr1 contains a function
179952
+ ** because that function might be an aggregate (we don't know yet whether
179953
+ ** it is or not) and if it is an aggregate, that could change the meaning
179954
+ ** of the whole query.
179919
179955
  */
179920
- sqlite3ExprUnmapAndDelete(pParse, yymsp[-4].minor.yy590);
179921
- yymsp[-4].minor.yy590 = sqlite3Expr(pParse->db, TK_STRING, yymsp[-3].minor.yy502 ? "true" : "false");
179922
- if( yymsp[-4].minor.yy590 ) sqlite3ExprIdToTrueFalse(yymsp[-4].minor.yy590);
179956
+ Expr *pB = sqlite3Expr(pParse->db, TK_STRING, yymsp[-3].minor.yy502 ? "true" : "false");
179957
+ if( pB ) sqlite3ExprIdToTrueFalse(pB);
179958
+ if( !ExprHasProperty(yymsp[-4].minor.yy590, EP_HasFunc) ){
179959
+ sqlite3ExprUnmapAndDelete(pParse, yymsp[-4].minor.yy590);
179960
+ yymsp[-4].minor.yy590 = pB;
179961
+ }else{
179962
+ yymsp[-4].minor.yy590 = sqlite3PExpr(pParse, yymsp[-3].minor.yy502 ? TK_OR : TK_AND, pB, yymsp[-4].minor.yy590);
179963
+ }
179923
179964
  }else{
179924
179965
  Expr *pRHS = yymsp[-1].minor.yy402->a[0].pExpr;
179925
179966
  if( yymsp[-1].minor.yy402->nExpr==1 && sqlite3ExprIsConstant(pParse,pRHS) && yymsp[-4].minor.yy590->op!=TK_VECTOR ){
@@ -181525,7 +181566,7 @@ static int getToken(const unsigned char **pz){
181525
181566
  int t; /* Token type to return */
181526
181567
  do {
181527
181568
  z += sqlite3GetToken(z, &t);
181528
- }while( t==TK_SPACE );
181569
+ }while( t==TK_SPACE || t==TK_COMMENT );
181529
181570
  if( t==TK_ID
181530
181571
  || t==TK_STRING
181531
181572
  || t==TK_JOIN_KW
@@ -246180,9 +246221,9 @@ static void fts5SegIterSetNext(Fts5Index *p, Fts5SegIter *pIter){
246180
246221
  ** leave an error in the Fts5Index object.
246181
246222
  */
246182
246223
  static void fts5SegIterAllocTombstone(Fts5Index *p, Fts5SegIter *pIter){
246183
- const int nTomb = pIter->pSeg->nPgTombstone;
246224
+ const i64 nTomb = (i64)pIter->pSeg->nPgTombstone;
246184
246225
  if( nTomb>0 ){
246185
- int nByte = SZ_FTS5TOMBSTONEARRAY(nTomb+1);
246226
+ i64 nByte = SZ_FTS5TOMBSTONEARRAY(nTomb+1);
246186
246227
  Fts5TombstoneArray *pNew;
246187
246228
  pNew = (Fts5TombstoneArray*)sqlite3Fts5MallocZero(&p->rc, nByte);
246188
246229
  if( pNew ){
@@ -257283,7 +257324,7 @@ static void fts5SourceIdFunc(
257283
257324
  ){
257284
257325
  assert( nArg==0 );
257285
257326
  UNUSED_PARAM2(nArg, apUnused);
257286
- sqlite3_result_text(pCtx, "fts5: 2025-06-28 14:00:48 2af157d77fb1304a74176eaee7fbc7c7e932d946bf25325e9c26c91db19e3079", -1, SQLITE_TRANSIENT);
257327
+ sqlite3_result_text(pCtx, "fts5: 2025-07-30 19:33:53 4d8adfb30e03f9cf27f800a2c1ba3c48fb4ca1b08b0f5ed59a4d5ecbf45e20a3", -1, SQLITE_TRANSIENT);
257287
257328
  }
257288
257329
 
257289
257330
  /*