Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

(fix issue #397) incorrect table name reported #399

Merged
merged 1 commit into from
Oct 20, 2021
Merged

(fix issue #397) incorrect table name reported #399

merged 1 commit into from
Oct 20, 2021

Conversation

nr-swilloughby
Copy link
Contributor

Links

Issue 397

Details

Changes the regular expression used to recognize table name when doing simple SQL command parsing. Previously it looked for the first FROM but this was confused by subexpressions such as SUBSTRING('foo' FROM x TO y). This changes the code to look for the last FROM instead.

@nr-swilloughby nr-swilloughby self-assigned this Oct 19, 2021
@nr-swilloughby nr-swilloughby added this to Awaiting User Input in Go Engineering Board via automation Oct 19, 2021
Copy link
Contributor

@RichVanderwal RichVanderwal left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good. The tests we have should protect us from most changes in behavior that our customers might see from this change. Still, it's not extremely low risk, so we should be ready to patch this back the way it was if it starts to cause problems.

@nr-swilloughby nr-swilloughby merged commit 1483137 into newrelic:develop Oct 20, 2021
Go Engineering Board automation moved this from Awaiting User Input to Done Oct 20, 2021
@nr-swilloughby nr-swilloughby deleted the dbnameparse branch October 20, 2021 21:44
@nr-swilloughby nr-swilloughby added this to the October release milestone Oct 26, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

Incorrect table name being parsed from query when using nrpq package
2 participants