SQLite

Timeline
Login

Many hyperlinks are disabled.
Use anonymous login to enable hyperlinks.

79 check-ins using file src/os_unix.c version 0a33005e64

2023-11-20
00:20
Cherrypick shell1.test fix. (check-in: 39e30c5f9c user: larrybr tags: console-io-lib)
2023-11-16
18:31
Simplify and make more rational how console I/O package features are selected. (Motivated by Fiddle and other command-line utilities to soon use the package.) No substantive code-execution changes. (check-in: 1cde05877b user: larrybr tags: console-io-lib)
2023-11-15
20:32
Both json_remove() jsonb_remove() work on pure JSONB as long as the input is JSONB. (check-in: 68d551730b user: drh tags: jsonb)
19:21
Some simple test cases for JSONB direct remove. (check-in: 8cb4d2cbfc user: drh tags: jsonb)
18:55
jsonb_remove() now works without having to use a JsonNode parse, assuming that the input is JSONB. (check-in: 5207679e92 user: drh tags: jsonb)
18:47
The jsonb_remove() routine now appears to be working. (Closed-Leaf check-in: e76d48137e user: drh tags: jsonb-remove)
16:10
Work toward getting jsonb_remove() to work directly on JSONB blobs. (check-in: a79ff8e58f user: drh tags: jsonb-remove)
14:09
Improvements to the description of sqlite3_errmsg() and sqlite3_errstr(). (check-in: fe5cc4169c user: drh tags: trunk)
13:23
Merge all the latest enhancements and fixes from trunk into the jsonb branch. (check-in: ba91408f4c user: drh tags: jsonb)
11:31
Fix an exception misuse in test-opfs-vfs.js. (check-in: 9264955e6e user: stephan tags: trunk)
08:59
JNI: add more wrapper1 Sqlite.Blob tests. (check-in: d63f6e1ffd user: stephan tags: trunk)
08:29
JNI: clear out the sqlite3_context native pointer after calling UDF callbacks which do not have an argv (as was already done for those which have an argv). Add related tests and code commentary. (check-in: 138f40543b user: stephan tags: trunk)
06:28
JNI doc updates. (check-in: 1b1f36a206 user: stephan tags: trunk)
06:10
JNI: add the @Experimental annotation and mark all java.nio.ByteBuffer-related methods with it. (check-in: 0f4b223102 user: stephan tags: trunk)
05:08
JNI test code cleanups. (check-in: 09142ac143 user: stephan tags: trunk)
04:55
JNI: add CONFIG_LOG and CONFIG_SQLLOG support to wrapper1. Code-adjacent cleanups. (check-in: 83c49b9e71 user: stephan tags: trunk)
03:02
JNI: apply an internal level of API indirection to avoid having to work with massively-mangled names for the various sqlite3_config() overloads. (check-in: 24f20663b1 user: stephan tags: trunk)
2023-11-14
16:53
Add NEVER() to a branch made unreachable by [6f9eed826f5b3d1c]. (check-in: 26dcaa34e3 user: drh tags: trunk)
14:59
JNI: reimplement Tester2.execSql() using the high-level API. (check-in: 3a69679e41 user: stephan tags: trunk)
14:50
Fix another obscure problem with nested aggregates. dbsqlfuzz 04408efc51. This might be a better fix than the one at [4a587c3492faa994]. (check-in: 6f9eed826f user: dan tags: trunk)
14:38
JNI: add Sqlite.Stmt.step(boolean) overload which returns the result code of sqlite3_step() unless passed true, in which case it throws for any result other than ROW or DONE. The intent is to simplify handling of LOCKED and BUSY errors. (check-in: f4f1cc201a user: stephan tags: trunk)
13:51
Extra PRAGMA vdbe_addoptrace output showing when OP_Column gets translated into OP_Copy due to using a coroutine instead of a cursor. (check-in: eba180e779 user: drh tags: trunk)
05:33
JNI: use ByteBuffer.limit() instead of ByteBuffer.capacity() when figuring out where the logical end of a ByteBuffer is, for reasons explained at length in new code comments. This is unfortunately slower but is the correct way to do it. (check-in: 51539419ed user: stephan tags: trunk)
04:59
JNI: add sqlite3_blob_read_nio_buffer() and iron out the blob/ByteBuffer interface somewhat. (check-in: 7df317b448 user: stephan tags: trunk)
03:24
Add a few asserts into *Put*() functions to catch calls that might cause an address fault. (check-in: 2341f9b6a4 user: larrybr tags: console-io-lib)
02:43
JNI: change sqlite3_prepare_multi()'s exception-handling semantics to be more C-like and, to support that, add the package-private sqlite3_jni_db_error() method to set the db error state from package-level Java code. (check-in: 46656b3543 user: stephan tags: trunk)
01:33
JNI: add sqlite3_blob_write() overload which accepts a java.nio.ByteBuffer. Cleanups in adjacent code. (check-in: ca32af8542 user: stephan tags: trunk)
2023-11-13
23:11
JNI: add sqlite3_column_nio_buffer() and sqlite3_value_nio_buffer() using an only-slightly roundabout approach to creating properly-sized ByteBuffer objects. (check-in: efbc82b218 user: stephan tags: trunk)
18:35
JNI: add sqlite3_result_nio_buffer() and tests. Discover that we cannot create sensible sqlite3_column_nio_buffer() or sqlite3_value_nio_buffer() counterparts because of ByteBuffer interface limitations. (check-in: 44b4df01ff user: stephan tags: trunk)
15:59
Cure many warnings from gcc, clang and CL.exe. (check-in: 29ea2a3aad user: larrybr tags: console-io-lib)
14:58
JNI: add sqlite3_bind_nio_buffer() and initial tests for binding ByteBuffer objects as blobs on JVMs which have JNI support for nio buffers. (check-in: b10ce1ef82 user: stephan tags: trunk)
13:01
Fix var-intro after executable code departure from old C. (check-in: 08996f4fd5 user: larrybr tags: console-io-lib)
12:53
Slight cleanup of length-limited strpbrk() replacement, and eliminate strpbrk() call. (check-in: 97e2c9621e user: larrybr tags: console-io-lib)
05:24
Enhance console_io to permit emits limited in various ways, such as valid UTF-8, upto control chars, or with counted limits, all getting away from 0-termination as the sole limit. In CLI, use this capability to avoid certain emit-chars-singly procedures that were breaking up UTF-8 characters. This fixes broken json mode output (on Windows) and (maybe) C-literal-like emits. (check-in: 906c5c4082 user: larrybr tags: console-io-lib)
2023-11-12
19:57
Add sqlite3_x86.exe unversioned binary. (check-in: a731cdddbb user: larrybr tags: console-io-lib)
03:58
Use setOutputStream() to designate implicit output for oput{z,f}() emit functions, and use them extensively. (check-in: 7850fb98a1 user: larrybr tags: console-io-lib)
00:43
Write BOM without fwrite(), using sputz() so that if it goes to the console, it is translated "properly". (check-in: 06ef96a823 user: larrybr tags: console-io-lib)
2023-11-11
22:53
Remove SHELL_LEGACY_CONSOLE_IO PP symbol and code it made active. (It is in the repo if ever needed/wanted, but it is just inferior or dead code now.) (check-in: 27c5bf6563 user: larrybr tags: console-io-lib)
20:46
Complete shell transition to using {f,o,e}put{f,z}() emit functions. (check-in: 923c6b8b3a user: larrybr tags: console-io-lib)
14:50
JNI wrapper1: when checking for an out-of-bounds statement column index, perform the is-statement-finalized check before the range check so that the former exception trumps the latter. (check-in: 0832f9a8e9 user: stephan tags: trunk)
14:43
Do not cache a statement's column count in the JNI wrapper1 API because an ALTER TABLE via another statement may invalidate it, as reported in forum post 6d80efd58d4591c7. (check-in: a6ab88e9a6 user: stephan tags: trunk)
13:09
Fix malf with redirected input due to bad assumption that stdin is a console in the fgets() replacement. (check-in: 79d1f2c101 user: larrybr tags: console-io-lib)
06:20
Pervasive changes to console_io.{c,h} in support of simplifying ubiquitous emit ops in shell, and to get better control of console streams that might be opened only via .read or .output commands. Changes to shell to use {s,o,e}put{f,z}(...) calls for initial testing, but this check-in has few such conversions so that most will be in a separate check-in. Many renames to better follow recent coding convention. This code seems to be working, but has not been tested on difficult platforms or with multiple console hosts yet. So it is a WIP. (check-in: 14762a004c user: larrybr tags: console-io-lib)
2023-11-10
20:55
Fix another problem with mixed join types and the RIGHT JOIN strength-reduction optimization. Forum post befdab472d. (check-in: f1eae19231 user: dan tags: trunk)
20:46
Additional debugging information on the tree-dump of the BETWEEN operator. (check-in: aca31e49d1 user: drh tags: trunk)
20:35
Remove an incorrect ALWAYS() that was inserted yesterday [1e039b6eb59c0001]. (check-in: 12885e298b user: drh tags: trunk)
18:59
Merge recent trunk enhancements and fixes into the jsonb branch. (check-in: 091a5f058d user: drh tags: jsonb)
17:49
Ensure 8-byte alignment of data structues in sqlite3_database_file_object(). This should have appeared on trunk originally and then be cherry-picked onto the branch. Oh well.... (check-in: ac39800bb2 user: drh tags: trunk)
16:29
Remove a NEVER() from whereAddIndexedExpr() that is reachable if there is an unknown indexed function in the schema. (check-in: a976b7208f user: drh tags: trunk)
15:03
Fix an obscure problem with the join-strength-reduction optimization that could occur when mixing LEFT and RIGHT joins in the same query. Forum post 7f74ce0bee and separately post d64f0abe723ac98e. The problem was introduced by check-in [d747afda5683ca5f]. (check-in: 530d10e93a user: dan tags: trunk)
15:00
Expose the missing SQLITE_SUBTYPE to wasm. (check-in: ac9534b2ce user: stephan tags: trunk)
15:00
Expose the missing SQLITE_SUBTYPE to JNI. (check-in: 0f92f4c90e user: stephan tags: trunk)
14:15
Expose SQLITE_RESULT_SUBTYPE to JNI. (check-in: 3bf75875b8 user: stephan tags: trunk)
2023-11-09
17:53
Expose SQLITE_RESULT_SUBTYPE to wasm. (check-in: 6d2fe9848b user: stephan tags: trunk)
17:36
Add the SQLITE_RESULT_SUBTYPE flag for application-defined functions. Add the -DSQLITE_STRICT_SUBTYPE=1 compile-time option that raises an error if any function invokes sqlite3_result_subtype() without the SQLITE_RESULT_SUBTYPE flag. SQLITE_RESULT_SUBTYPE prevents an indexed value of that function from being used to replace an equivalent expression, since the indexed expression does not carry the subtype. Fix for the problem described at forum post 68d284c86b082c3e. (check-in: ba789a7804 user: drh tags: trunk)
17:28
Fix compilation issue seen with MSVC. (check-in: 0dfe790d81 user: mistachkin tags: trunk)
17:26
Put an ALWAYS on an true branch. (Closed-Leaf check-in: 1e039b6eb5 user: drh tags: func-rw-subtype)
16:52
Futher documentation refinements. (check-in: 311c2eba93 user: drh tags: func-rw-subtype)
15:01
Fixes: (1) In the ->> function, instead of setting a subtype and clearing it, do not set it in the first place, as doing the set would trigger an error under SQLITE_STRICT_SUBTYPE. (2) Allow the SQLITE_STRICT_SUBTYPE through the property filter on sqlite3_create_function(). (check-in: 6195468b14 user: drh tags: func-rw-subtype)
13:00
A .class file build dependencies fix in the JNI build. (check-in: 8cc3291516 user: stephan tags: trunk)
12:58
Add the SQLITE_STRICT_SUBTYPE compile-time option. This change reveals that the current SQLITE_RESULT_SUBTYPE design does not work unless we tag the ->> operator with SQLITE_RESULT_SUBTYPE. But that will disable an important optimization. (check-in: e98a9a65dd user: drh tags: func-rw-subtype)
12:48
Add some notes about the JNI pointer-passing approach and convert a couple of potential NullPointerExceptions into appropriate C result codes. Clarify that invocation of undefined behaviour from the Java API does not (due to the addition of defensive code) mean the same thing as it does in C (e.g. no NULL pointer dereferences). (check-in: 19c4778f45 user: stephan tags: trunk)
12:17
Do not replace expressions that return subtypes with values taken from an index. (check-in: a35d13db09 user: drh tags: func-rw-subtype)
12:08
Omit the new SQLITE_VALUE_SUBTYPE name. Stay with legacy SQLTIE_SUBTYPE. Add extra documentation to sqlite3_value_subtype() and sqlite3_result_subtype() indicating that the SQLITE_SUBTYPE and SQLITE_RESULT_SUBTYPE properties are required on functions that use those interfaces. (check-in: 563ad3be60 user: drh tags: func-rw-subtype)
12:01
Two more JNI build fixes for Windows/MinGW, reported in forum post 4f949edc312d2a75. (check-in: a3f9c39086 user: stephan tags: trunk)
01:54
JSON5 bug fix: Escape double-quotes that occur inside of single-quoted strings. Forum post ddcad3e884. (check-in: 1c98d46d60 user: drh tags: trunk)
2023-11-08
21:38
Make a distinction between functions that consume subtypes and functions that generate subtypes. (check-in: 48a92e3ad8 user: drh tags: func-rw-subtype)
18:08
Do not cover expressions using an indexed expression if the indexed expression is a function that might set a subtype. (Closed-Leaf check-in: e908b26a99 user: drh tags: idx-expr-fix)
17:11
Merge recent trunk enhancements into the jsonb branch, and especially the finer-grain characterization of JSON function properties. (check-in: 72393b003f user: drh tags: jsonb)
16:37
More precise characterization of JSON functions. Indicate when functions might return JSON (subtype 'J') and when they make use of the function argument cache. (check-in: b2b62546c4 user: drh tags: trunk)
15:56
Have the shell tool emit a warning if the user attempts to use ".scanstats vm" in a non-SQLITE_ENABLE_BYTECODE_VTAB build. (check-in: 3978c084a5 user: dan tags: trunk)
15:51
Remove old files related to wapptest.tcl from test/ directory. (check-in: dd3e7b5bca user: dan tags: trunk)
15:49
Avoid blocking as part of passive checkpoint operations, even if SQLITE_ENABLE_SETLK_TIMEOUT is defined. (check-in: e5ecc404ca user: dan tags: trunk)
15:34
Remove an unused/invalid test from the wasm suite. (check-in: 916ae89874 user: stephan tags: trunk)
12:56
JNI build fixes for platforms where the jint type is not the same as int, as reported in forum post 9089d2049a. (check-in: b32b087327 user: stephan tags: trunk)
00:45
Suppress harmless UBSAN warnings about memory overflow in OP_AddImm. The exact same machine code is generated by GCC. (check-in: b0594383b9 user: drh tags: trunk)
00:12
Changes a no-op call to freeP4() into an assert(). (check-in: 32a7b1bd4d user: drh tags: trunk)
2023-11-07
20:56
Add -DSQLITE_ENABLE_SETLK_TIMEOUT=1 to a release-test configuration. (check-in: cd3e38fb0f user: dan tags: trunk)
20:11
Fix an assert() that could fail within calls to sqlite3_snapshot_open() in SQLITE_ENABLE_SETLK_TIMEOUT builds. (check-in: 84634bc268 user: dan tags: trunk)