Skip to content

TideSQL 5 MINOR (v5.1.0) - #160

Merged
guycipher merged 3 commits into
masterfrom
5.1.0
Oct 1, 2026
Merged

guycipher merged 3 commits into
masterfrom
5.1.0

Conversation

@guycipher

Copy link
Copy Markdown
Member

…and scan bugs

pin the fallback library build, the installer fallback and the ci matrix to the v10.1.0 tag. 5.1.0 relies on 10.1.0 detaching iterators when a transaction is reset or freed, and still writes format 10, so databases move freely between 5.0.0 and 5.1.0.

cmake changes for the mariadb foundry. the plugin now includes cpack itself when built outside the server source tree, as mariadb asked, since mariadb_add_plugin no longer does it for projects that add several plugins, while inside the server tree it leaves cpack to the server. the fallback library build enables each compression backend only when its library and header are present, so a builder without zstd, lz4 or snappy gets an uncompressed engine instead of a failed build.

max over a primary key behind an equality prefix returned null because the backward seek started from the bare prefix and stopped one entry early. the pk part is now padded to its full length first. adds tidesdb_minmax_prefix.

bulk statements no longer reset the connection transaction mid statement, which under 10.1.0 ended the source scan of an insert into select or an alter copy early and committed it short with no error. each batch now continues in a fresh transaction and the committed ones are freed when the transaction ends. a clean transaction whose statement will reach the batch threshold moves to read committed up front, so concurrent bulk loaders no longer conflict.

the scan iterator is freed at the end of every statement. keeping it let another connection that picked up the handler from the table cache free it while the owner was committing, which crashed the server under concurrent load.

unique secondary indexes now hold across concurrent snapshot transactions. each unique value also writes a sentinel keyed by table, index and value into the reserved __tidesdb_uniq column family, so two writers of one value conflict at commit. adds tidesdb_unique_concurrent.

a row that fails to decrypt now fails the statement instead of reading back as zeroed columns, and an in place index build meeting one stops. adds tidesdb_encryption_bad_key.

the equality ranges of an in list reuse one iterator per statement instead of opening a bounded one per value. adds tidesdb_eq_range_reuse.

transient locked results from the library are retried briefly in the wrappers instead of reaching the client as lock wait timeouts. tidesdb_max_open_sstables defaults to 0, which uses the library default of 1024. new status counters, tidesdb_commit_conflicts and the tidesdb_stmt counters by cause.

the galera suite config regains the line disabling ssl for state transfers, and the manual was checked against the code throughout and corrected where it was wrong.

…and scan bugs

pin the fallback library build, the installer fallback and the ci matrix to the
v10.1.0 tag. 5.1.0 relies on 10.1.0 detaching iterators when a transaction is
reset or freed, and still writes format 10, so databases move freely between
5.0.0 and 5.1.0.

cmake changes for the mariadb foundry. the plugin now includes cpack itself when
built outside the server source tree, as mariadb asked, since mariadb_add_plugin
no longer does it for projects that add several plugins, while inside the server
tree it leaves cpack to the server. the fallback library build enables each
compression backend only when its library and header are present, so a builder
without zstd, lz4 or snappy gets an uncompressed engine instead of a failed
build.

max over a primary key behind an equality prefix returned null because the
backward seek started from the bare prefix and stopped one entry early. the pk
part is now padded to its full length first. adds tidesdb_minmax_prefix.

bulk statements no longer reset the connection transaction mid statement, which
under 10.1.0 ended the source scan of an insert into select or an alter copy
early and committed it short with no error. each batch now continues in a fresh
transaction and the committed ones are freed when the transaction ends. a clean
transaction whose statement will reach the batch threshold moves to read
committed up front, so concurrent bulk loaders no longer conflict.

the scan iterator is freed at the end of every statement. keeping it let another
connection that picked up the handler from the table cache free it while the
owner was committing, which crashed the server under concurrent load.

unique secondary indexes now hold across concurrent snapshot transactions. each
unique value also writes a sentinel keyed by table, index and value into the
reserved __tidesdb_uniq column family, so two writers of one value conflict at
commit. adds tidesdb_unique_concurrent.

a row that fails to decrypt now fails the statement instead of reading back as
zeroed columns, and an in place index build meeting one stops. adds
tidesdb_encryption_bad_key.

the equality ranges of an in list reuse one iterator per statement instead of
opening a bounded one per value. adds tidesdb_eq_range_reuse.

transient locked results from the library are retried briefly in the wrappers
instead of reaching the client as lock wait timeouts. tidesdb_max_open_sstables
defaults to 0, which uses the library default of 1024. new status counters,
tidesdb_commit_conflicts and the tidesdb_stmt counters by cause.

the galera suite config regains the line disabling ssl for state transfers, and
the manual was checked against the code throughout and corrected where it was
wrong.
@guycipher guycipher self-assigned this Sep 30, 2026
…rimary key

lookup with no row at or below its target landed on a table meta key and was
stepped forward to the table's first row, which mariadb 11.4 discarded by
checking the prefix itself but 13 returns as the answer. a backward lookup that
does not land on a data key now finds no row, and a prefix last read verifies
the prefix on both the primary key and secondary index paths.

tidesdb_encryption_bad_key reads every row by key instead of one, since the row
envelope carries no integrity check and a wrong key can decrypt a single row to
garbage that passes the cipher's padding check about one time in 256.
…g columns of a composite primary key seeked to the first key at

or after the prefix and returned it without checking it carried the prefix, so a prefix with no rows read back the first row of
the next one. this gave a wrong count or max on any server and failed ci on mariadb 13, which plans that max as a primary key
lookup. the read now reports not found when the row does not match, and tidesdb_minmax_prefix adds lookups of missing prefixes.
@guycipher
guycipher merged commit d5bcc22 into master Oct 1, 2026
4 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant