Repository navigation
Closed
Labels
Description
Problem
A column type a driver has never seen can crash it or show the wrong value. It has happened: browsing an SDO_GEOMETRY table crashed the Oracle driver (#3241), Snowflake DATE columns showed epoch-day numbers (#2454), and DuckDB TIMESTAMP_MS columns showed 1970-01-01 00:00:00 (#2130).
What exists today on macOS:
- Decoding unit tests with captured values, per driver:
MySQLColumnDecodingTests.swift,LibPQCellDecodingTests.swift,RedisBinaryValueTests.swiftand others underapple/Plugins/*DriverTests. Only MySQL, PostgreSQL, SQLite, ClickHouse and Redis have a test target. - Probes against a live server for single questions: Oracle type spelling and value read-back (
apple/scripts/probes/check-oracle-type-roundtrip.sh), DuckDB renderable types (check-duckdb-value-api.sh), PostgreSQL array delimiters (check-postgres-array-delimiters.sh), MySQL character sets (check-mysql-charset-decoding.sh). - Nothing creates a table with every type an engine supports and takes it through the whole path a user takes: open the table, edit a cell of each type, save, read it back, and export it.
The Linux app already keeps a value corpus per engine, read back through a table tab, Export All and an editor run (linux/ROADMAP.md, release criterion 3).
Proposed solution
- A corpus file per engine under
apple/scripts/probes/: one column per type the driver lists, each with edge values (NULL, empty, minimum, maximum, Unicode, binary, nested and spatial values where the engine has them). - A probe per engine that loads the corpus into a container, then for every column: browses it, checks the grid text, edits one cell through the grid's save path, reads it back, and exports the table to CSV, JSON and SQL. Any crash, wrong text, refused edit the driver should allow, or export mismatch fails the probe.
- SQLite runs the same corpus as a hosted unit test, since it needs no server.
- Start with PostgreSQL, MySQL and MariaDB, ClickHouse (
Map,Nested,Enum8,Tuple,LowCardinality, arrays), DuckDB (STRUCT,MAP,UNION, nested lists), SQL Server and Oracle (extending the existing probe).
Done when each of those engines has a corpus and a passing probe, and a new type a driver starts listing without a corpus entry is caught.
Alternatives considered
Fix each type when a user reports it, as with #3241 and #2454.
Platform
macOS
Related database type
N/A / General
Activity