0
0
mirror of https://github.com/tursodatabase/libsql.git synced 2025-05-20 18:28:16 +00:00

Commit Graph

  • ee79eeed79 add shell command .bail; fix command .echo test 2023-11-14 18:08:27 +08:00
  • 4ce5bc2836 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. stephan 2023-11-14 05:33:44 +00:00
  • bdfc51dfef JNI: add sqlite3_blob_read_nio_buffer() and iron out the blob/ByteBuffer interface somewhat. stephan 2023-11-14 04:59:57 +00:00
  • 7ed3798a23 use Result over unwrap; use insert and remove over bit operations test 2023-11-14 12:52:23 +08:00
  • ad0cbb89ec add shell command .open test 2023-11-14 12:06:32 +08:00
  • 70b203977f format the output of command .show and .info to be same as sqlite3 test 2023-11-14 12:05:55 +08:00
  • f695620e46 Add a few asserts into *Put*() functions to catch calls that might cause an address fault. larrybr 2023-11-14 03:24:43 +00:00
  • adcd13d243 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. stephan 2023-11-14 02:43:30 +00:00
  • b481413d95 JNI: add sqlite3_blob_write() overload which accepts a java.nio.ByteBuffer. Cleanups in adjacent code. stephan 2023-11-14 01:33:15 +00:00
  • ce2edab088 JNI: add sqlite3_column_nio_buffer() and sqlite3_value_nio_buffer() using an only-slightly roundabout approach to creating properly-sized ByteBuffer objects. stephan 2023-11-13 23:11:10 +00:00
  • a30080fee9 Merge pull request #607 from Horusiath/libsql-execute-batch Lucio Franco 2023-11-13 20:18:21 +00:00
  • c3372a8ae7 Merge pull request #612 from tursodatabase/embedded-replica-reset Lucio Franco 2023-11-13 20:09:15 +00:00
  • f75bab179d Merge branch 'main' into embedded-replica-reset Lucio Franco 2023-11-13 14:29:04 -05:00
  • bcc215ab67 Update libsql/src/local/database.rs Lucio Franco 2023-11-13 14:28:53 -05:00
  • 87c407da18 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. stephan 2023-11-13 18:35:37 +00:00
  • 18e678bdb0 run cargo fmt ad hoc 2023-11-13 19:32:11 +01:00
  • 9aad7c025d test embedded replica reset. ad hoc 2023-11-13 19:31:40 +01:00
  • 3b7798019b reset embedded replica on incompatible log. ad hoc 2023-11-13 18:43:36 +01:00
  • b63221dc27 Merge pull request #611 from tursodatabase/lucio/prepare-0.22.1 libsql-server-v0.22.1 Lucio Franco 2023-11-13 17:36:56 +00:00
  • 01862c2cca server: prepare v0.22.1 release Lucio Franco 2023-11-13 12:27:26 -05:00
  • a531d92439 Merge pull request #609 from tursodatabase/replica-restart Lucio Franco 2023-11-13 17:07:16 +00:00
  • 5ed4ba0f7d Cure many warnings from gcc, clang and CL.exe. larrybr 2023-11-13 15:59:27 +00:00
  • 675f4d99b8 test replica restart ad hoc 2023-11-13 16:07:04 +01:00
  • 7f7d7bea01 JNI: add sqlite3_bind_nio_buffer() and initial tests for binding ByteBuffer objects as blobs on JVMs which have JNI support for nio buffers. stephan 2023-11-13 14:58:37 +00:00
  • b9b47ee16c fix namespace reset on imcompatible log ad hoc 2023-11-13 10:47:56 +01:00
  • 912ac4e362 Gracefully shutdown http services http-graceful-shutdown ad hoc 2023-11-13 15:43:32 +01:00
  • e108029332 Add new fts5 API xQueryToken(). dan 2023-11-13 14:29:12 +00:00
  • 41d4b7bdee Fix var-intro after executable code departure from old C. larrybr 2023-11-13 13:01:01 +00:00
  • c270dad95d Slight cleanup of length-limited strpbrk() replacement, and eliminate strpbrk() call. larrybr 2023-11-13 12:53:47 +00:00
  • 14a08730de 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. larrybr 2023-11-13 05:24:00 +00:00
  • e74b4bbba0 impl column_type Bartosz Sypytkowski 2023-11-13 10:13:50 +09:00
  • 5f9b4dd0f7 extract sqlite3-parser to its own feature referenced by replication/hrana Bartosz Sypytkowski 2023-11-13 09:36:24 +09:00
  • 7d1d2d54ab added database connection execute batch support Bartosz Sypytkowski 2023-11-13 05:53:45 +09:00
  • 19d0f194b0 moved sqlite parser to libsql main module Bartosz Sypytkowski 2023-11-08 20:15:52 +09:00
  • bae33797b5 initialized hrana-over-http messages Bartosz Sypytkowski 2023-11-08 20:06:51 +09:00
  • fdbd9119d4 Add sqlite3_x86.exe unversioned binary. larrybr 2023-11-12 19:57:23 +00:00
  • 782c9f2e9e Use setOutputStream() to designate implicit output for oput{z,f}() emit functions, and use them extensively. larrybr 2023-11-12 03:58:15 +00:00
  • cc2b3c2051 Write BOM without fwrite(), using sputz() so that if it goes to the console, it is translated "properly". larrybr 2023-11-12 00:43:36 +00:00
  • ea80462c10 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.) larrybr 2023-11-11 22:53:55 +00:00
  • 1bcb7c4902 Complete shell transition to using {f,o,e}put{f,z}() emit functions. This fails test 13.1 in json501.test, but so does trunk in the same way. larrybr 2023-11-11 20:46:12 +00:00
  • 9d562f5f88 add command read test 2023-11-12 00:33:26 +08:00
  • 56e1610f7a 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. stephan 2023-11-11 14:50:01 +00:00
  • 307f95c1e4 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:6d80efd58d4591c7|forum post 6d80efd58d4591c7]. stephan 2023-11-11 14:43:50 +00:00
  • d2c8658024 Fix malf with redirected input due to bad assumption that stdin is a console in the fgets() replacement. larrybr 2023-11-11 13:09:09 +00:00
  • 1229f8e6bd 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. larrybr 2023-11-11 06:20:38 +00:00
  • fb28a93f75 Fix another problem with mixed join types and the RIGHT JOIN strength-reduction optimization. [forum:/forumpost/befdab472d | Forum post befdab472d]. dan 2023-11-10 20:55:20 +00:00
  • 88dcfe56da Additional debugging information on the tree-dump of the BETWEEN operator. drh 2023-11-10 20:46:58 +00:00
  • 10c815a55d Remove an incorrect ALWAYS() that was inserted yesterday [1e039b6eb59c0001]. drh 2023-11-10 20:35:59 +00:00
  • e8d4fd59e4 Merge recent trunk enhancements and fixes into the jsonb branch. drh 2023-11-10 18:59:23 +00:00
  • 5a81e6e5ce 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.... drh 2023-11-10 17:49:26 +00:00
  • 53381132be Remove a NEVER() from whereAddIndexedExpr() that is reachable if there is an unknown indexed function in the schema. drh 2023-11-10 16:29:02 +00:00
  • 0eed27d38b Fix an obscure problem with the join-strength-reduction optimization that could occur when mixing LEFT and RIGHT joins in the same query. [forum:/forumpost/7f74ce0bee|Forum post 7f74ce0bee]. dan 2023-11-10 15:03:18 +00:00
  • 9d60c3c256 Expose the missing SQLITE_SUBTYPE to wasm. stephan 2023-11-10 15:00:26 +00:00
  • 828a00c287 Expose the missing SQLITE_SUBTYPE to JNI. stephan 2023-11-10 15:00:11 +00:00
  • af65e7d21f Expose SQLITE_RESULT_SUBTYPE to JNI. stephan 2023-11-10 14:15:07 +00:00
  • acf5f4f00c Merge pull request #594 from pjhades/fix-c-binding-example Lucio Franco 2023-11-09 21:46:26 +00:00
  • 63b0f8079c sql-experimental: add CI workflow Jing Peng 2023-11-09 15:38:41 -05:00
  • 5dbf5ae8b3 sql-experimental: update example.c to match rust Jing Peng 2023-11-08 15:56:40 -05:00
  • 5a828be1e7 Merge pull request #604 from tursodatabase/lucio/fix-main-tags Lucio Franco 2023-11-09 18:36:46 +00:00
  • d5ee854a40 fix main tagged images Lucio Franco 2023-11-09 13:21:45 -05:00
  • 6db0b11e07 Expose SQLITE_RESULT_SUBTYPE to wasm. stephan 2023-11-09 17:53:44 +00:00
  • 3839dcf973 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:/forumpost/68d284c86b082c3e|forum post 68d284c86b082c3e]. drh 2023-11-09 17:36:37 +00:00
  • 2009a5acba Fix compilation issue seen with MSVC. mistachkin 2023-11-09 17:28:31 +00:00
  • beb06e6b0a Put an ALWAYS on an true branch. drh 2023-11-09 17:26:39 +00:00
  • cb1f190ed2 Futher documentation refinements. drh 2023-11-09 16:52:44 +00:00
  • 3790007d63 Merge pull request #603 from tursodatabase/replication-savepoint ad hoc 2023-11-09 16:42:27 +00:00
  • 9d7bf27936 Merge pull request #564 from tursodatabase/heartbeat ad hoc 2023-11-09 16:32:26 +00:00
  • b2d2250aa1 add test for savepoint with replication ad hoc 2023-11-09 17:20:52 +01:00
  • 6ba1ee2f9a Merge pull request #600 from tursodatabase/limit-stored-statement-size ad hoc 2023-11-09 16:26:51 +00:00
  • 12d8142179 Merge pull request #602 from tursodatabase/lucio/update-client-version Lucio Franco 2023-11-09 16:10:30 +00:00
  • 83e5af2813 add xtask test, fix metrics tests Lucio Franco 2023-11-09 10:54:00 -05:00
  • 8f391f203a fix client version names Lucio Franco 2023-11-09 10:25:16 -05:00
  • 384ee8417a Merge pull request #601 from tursodatabase/lucio/fix-ci Lucio Franco 2023-11-09 15:44:02 +00:00
  • 2a7b61dc81 limit stored statement size ad hoc 2023-11-09 16:00:47 +01:00
  • 8408f10419 remove need to build sqlite3 go tests Lucio Franco 2023-11-09 10:17:06 -05:00
  • fc93a8892b make CI faster, more timeouts sooner Lucio Franco 2023-11-09 10:11:12 -05:00
  • b10c3d32e0 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(). drh 2023-11-09 15:01:56 +00:00
  • 508ee17800 Merge pull request #597 from psarna/boclilo Piotr Sarna 2023-11-09 14:49:30 +01:00
  • 752722e8d1 A .class file build dependencies fix in the JNI build. stephan 2023-11-09 13:00:33 +00:00
  • 6eb381ff4a 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. drh 2023-11-09 12:58:03 +00:00
  • b9050dcec7 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). stephan 2023-11-09 12:48:54 +00:00
  • b18bb822dc Do not replace expressions that return subtypes with values taken from an index. drh 2023-11-09 12:17:57 +00:00
  • 194b8d514b 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. drh 2023-11-09 12:08:16 +00:00
  • ec427813ac Two more JNI build fixes for Windows/MinGW, reported in [forum:4f949edc312d2a75|forum post 4f949edc312d2a75]. stephan 2023-11-09 12:01:02 +00:00
  • 4a71b2072a bottomless-cli: add restoring from a directory Piotr Sarna 2023-11-09 11:45:31 +01:00
  • 34bf5c6b51 Clone db config for forked dbs Piotr Jastrzebski 2023-11-03 19:23:27 +01:00
  • 9d2f7cd3d9 Add heartbeat_url to namespace config and use it in send_stats Piotr Jastrzebski 2023-11-03 17:22:14 +01:00
  • 1877572511 Pass namespaces to send_stats Piotr Jastrzebski 2023-11-03 16:09:54 +01:00
  • fd65d6eda6 Make heartbeat_url optional Piotr Jastrzebski 2023-11-03 11:47:58 +01:00
  • c060b5f3a8 JSON5 bug fix: Escape double-quotes that occur inside of single-quoted strings. [forum:/forumpost/ddcad3e884|Forum post ddcad3e884]. drh 2023-11-09 01:54:26 +00:00
  • 243f2ec6a1 Make a distinction between functions that consume subtypes and functions that generate subtypes. drh 2023-11-08 21:38:30 +00:00
  • de02b00a7e Fix image name for publish-server.yml libsql-server-v0.22.0 Lucio Franco 2023-11-08 14:07:41 -05:00
  • e5536165ae Merge pull request #591 from tursodatabase/LucioFranco-patch-1 Lucio Franco 2023-11-08 18:33:49 +00:00
  • c744fac0f8 revert image name back to libsql-server Lucio Franco 2023-11-08 18:09:41 +00:00
  • cd0fe6539b rename tag Lucio Franco 2023-11-08 18:09:06 +00:00
  • 2cbe14098b Do not cover expressions using an indexed expression if the indexed expression is a function that might set a subtype. drh 2023-11-08 18:08:07 +00:00
  • b13a7edba2 Rename docker image to sqld Lucio Franco 2023-11-08 12:54:27 -05:00
  • a4cf38ca9b Merge recent trunk enhancements into the jsonb branch, and especially the finer-grain characterization of JSON function properties. drh 2023-11-08 17:11:13 +00:00
  • b494366370 More precise characterization of JSON functions. Indicate when functions might return JSON (subtype 'J') and when they make use of the function argument cache. drh 2023-11-08 16:37:12 +00:00
  • 3ce67307fa Merge pull request #589 from tursodatabase/bump-libsql-server-0.22.0 Lucio Franco 2023-11-08 16:19:07 +00:00