fix: Oracle view crash caused by LONG column type in OracleNIO decoder#566
Closed
fix: Oracle view crash caused by LONG column type in OracleNIO decoder#566
Conversation
…hs, PK-first cards, swipe rows
…loss during navigation
…k gesture and list scroll
…rage, build script cleanup
…es, compile all source files
…nnel, SSH form UI
…ange/active, debounced push
…macOS sync compatibility
…ding, matching auth method names
…ration to DatabaseType.normalized
…sthrough for macOS-only fields
…t via libssh2_frommemory
… injection), resource leaks, architecture
…shpassword/keypassphrase prefix
… push, SSH cleanup, color deletion
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
Fixes #564 — clicking an Oracle view crashes TablePro with
EXC_BREAKPOINT (SIGTRAP)in OracleNIO'sOracleBackendMessageDecoder.decode.Root cause: Oracle's data dictionary uses
LONGdata type columns. OracleNIO 1.0.0-rc.4 crashes with a fatal error (force unwrap/precondition failure) when decoding non-NULLLONGvalues. WhenfetchColumnsqueriesALL_TAB_COLUMNS.DATA_DEFAULT(LONG type), views have non-NULL values (column expressions) that trigger the crash. Tables usually have NULL defaults, so the decoder is never triggered — which is why only views crash.Three fixes in
OraclePlugin.swift:fetchColumns: Removedc.DATA_DEFAULT(LONG type) from the query to avoid triggering OracleNIO's broken LONG decoder. Default values show as nil.fetchViewDefinition: ReplacedSELECT TEXT FROM ALL_VIEWS(TEXT is also LONG) withDBMS_METADATA.GET_DDL('VIEW', ...)which returns CLOB (safe).fetchTableMetadata: Added fallback query viaALL_TAB_COMMENTSwhenALL_TABLESreturns no rows (views are not inALL_TABLES).Test plan
gvenzl/oracle-freecontainer)