Repository navigation
Handle Db2 LUW string literals correctly - #115
Merged
Merged
Conversation
ethanperez
approved these changes
Oct 5, 2026
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.
Db2 LUW treats backslashes as literal characters inside ordinary strings. With
dbms: "ibm_db2", the lexer currently falls through to backslash-escape behavior:VALUES 'path\', 'probe_alpha'becomesVALUES ? probe_alpha ?, exposing the second literal.Add explicit
ibm_db2dialect support and select the existing behavior that disables backslash escaping. The value matches the Agent integration's existing options; no collector configuration change is needed. Reuse the doubled-single-quote handling already present on main, and document the dialect in the README and CLI help.Regression tests cover string token boundaries, literal removal, and identical normalized output when literal contents change, including doubled single quotes, backslashes, Unicode, empty strings, and truncated strings.
Validation:
{"obfuscation_mode":"obfuscate_and_normalize","dbms":"ibm_db2"}options.A lexer release and Agent dependency update are still required, followed by validation through the Python/native helper in the rebuilt Agent image. This PR does not update the Agent dependency or integration PR stack.