Repository navigation
Use dbprecision in the RECORDSET descriptor of a named column to close #3195 - #3205
Open
suraj2kumar22020-png wants to merge 1 commit into
Open
suraj2kumar22020-png wants to merge 1 commit into
suraj2kumar22020-png wants to merge 1 commit into
Conversation
…AlaSQL#3195 The named-column path in src/select/columns.js built the RECORDSET column descriptor with the misspelled key `dbpecision`, while the star path used `dbprecision`, so `SELECT RECORDSET a FROM A` and `SELECT RECORDSET * FROM A` returned descriptors with different keys. Adds test/test3195.js asserting both forms return identical descriptors with the `dbprecision` key.
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.
Fixes #3195
The bug
The two
RECORDSETforms returned column descriptors with different keys:The named-column path in
src/select/columns.jsbuilt the descriptor with the misspelled keydbpecision, while the star path useddbprecision.The fix
One-word change in
src/select/columns.js: the named-column RECORDSET descriptor now setsdbprecision: tcol.dbprecision, so both forms return identical descriptor keys. (The remainingdbpecisionstrings in that file are inside commented-out lines and were left untouched.)Test
Added
test/test3195.js(named after the issue, per CONTRIBUTING), asserting that:SELECT RECORDSET a FROM oneandSELECT RECORDSET * FROM onereturn identical column descriptorscolumnid, dbtypeid, dbsize, dbprecision, dbenumResults
dbpecisionvsdbprecision); after the fix: 2 pass / 0 failbun testovertest/test[0-9]*.jsandtest/test-*.js): 3064 pass, 211 skip, 0 fail across 726 filestest-parserpasses, and the changed files are prettier-clean