Skip to content

fix(drivers): match SQL Server keys exactly and close Linux read gaps - #4039

Merged
datlechin merged 11 commits into
mainfrom
fix/sql-review-followups
Nov 4, 2026
Merged

datlechin merged 11 commits into
mainfrom
fix/sql-review-followups

Conversation

@datlechin

@datlechin datlechin commented Nov 4, 2026 •

Copy link
Copy Markdown
Member

Summary

  • SQL Server, Mac and iOS: row edits, deletes and reads by a row's own text key also compare the stored text by code point. Under a SQL collation Wessels and Weßels are two varchar keys, yet both matched the Unicode value, so editing one changed both rows. Foreign key previews keep matching by the column's collation, so abc still finds ABC.
  • Case-insensitive filters fold a value that starts with a combining mark again.
  • PostgreSQL, Linux: reading a table's columns, indexes, keys or definition failed with relation "16385" does not exist. The catalog reads now use the table's resolved OID as an OID.
  • PostgreSQL, Linux: a save cast to a lookalike type in public when the login's search_path lists public ahead of pg_catalog. A built-in column type's cast now names pg_catalog.
  • SQLite, Linux: Read-Only mode refused reads that mention pragma_optimize only as a value, a column or an alias.
  • MySQL, Linux: history kept a password assigned to a user variable named with a number, . or $, such as @1.
  • ClickHouse, Linux: the login reply is read through a 64 KiB limit instead of being buffered whole, with the readonly level sent as text.

Not fixed here

  • iOS foreign key previews on a SQL Server char or varchar key compare as Unicode, so under a SQL collation a child Weßels can show a Wessels parent. Matching by the column's own rules needs its collation, which the app does not read yet.
  • The clickhouse crate, 0.15.3 included, reads an HTTP error body whole on every request. Bounding it needs an upstream fix or an HTTP layer of our own.

Test plan

  • MSSQLRowMatchTests, iOS SQLBuilderSingleRowLookupTests and FilterSQLGeneratorTests cover the SQL Server key match, the foreign key lookup and the combining mark.
  • apple/scripts/probes/check-mssql-string-literals.sh against SQL Server 2022: an update and a delete on a varchar key, with and without a primary key and read through a cast to nvarchar, leave the other row alone.
  • PostgreSQL Docker suite: the 54 cases that read table metadata pass again, and a_save_casts_to_the_built_in_type_a_lookalike_shares_a_name_with saves an inet column past a trapping public.inet domain.
  • a_pragma_name_as_a_value_column_or_alias_reads_on_sqlite, the @1, @.s and @$s history cases, and two ClickHouse login reply tests.

@datlechin
datlechin enabled auto-merge (squash) November 4, 2026 11:44
@datlechin
datlechin merged commit 993dbea into main Nov 4, 2026
25 of 48 checks passed
@datlechin
datlechin deleted the fix/sql-review-followups branch November 5, 2026 02:37
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