fix(introspect): Harden live database connections and warn on malformed MySQL enum definitions#45
Merged
Merged
Conversation
Remote PostgreSQL and MySQL/MariaDB introspection now upgrades weak TLS settings to encrypted connections by default, while loopback and socket connections keep their local transport behavior. PostgreSQL adds a default statement timeout, MySQL/MariaDB configures a per-session execution deadline, pool draining now runs on every return path, and shared catalog fetch scaffolding removes duplicated dialect boilerplate.
MySQL enum and set parsing now distinguishes unsupported types from malformed definitions instead of collapsing through chains. Malformed enum/set column types emit warning diagnostics during schema inference, and dedicated regression tests cover incomplete escape sequences so broken input no longer disappears silently.
Code Metrics Report
Details | | main (5dfe5d4) | #45 (730f4fb) | +/- |
|---------------------|----------------|---------------|-------|
+ | Coverage | 94.0% | 94.1% | +0.1% |
| Files | 71 | 73 | +2 |
| Lines | 29573 | 29749 | +176 |
+ | Covered | 27805 | 28004 | +199 |
- | Test Execution Time | 1m39s | 1m41s | +2s |Code coverage of files in pull request scope (88.0% → 89.3%)
Reported by octocov |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
MySQL, and MariaDB introspection, while preserving local/loopback behavior untouched
ParallelCatalogReadertrait and connection helpers to eliminate duplicatedcatalog assembly and pool cleanup across PostgreSQL, MySQL, and SQLite adapters
ENUM/SETdefinitions with structured parseerrors and emit diagnostics instead of silently ignoring bad input
ARCHITECTURE.md,docs/cli-reference.md, anddocs/getting-started.mdto documentthe new security defaults
Changes
statement_timeoutand MySQL/MariaDBmax_execution_time/max_statement_timeParallelCatalogReadertrait andclose_pool_when_donehelper to unify parallel catalog fetching and guaranteed pool draining across all three adaptersNonereturns in MySQLENUM/SETparsing with structuredMySqlEnumLikeParseErrorvariants covering incomplete escapes, unterminated quotes, missing parentheses, and unexpected separators