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

Handle blank SQL when parsing table name #1210

Merged
merged 3 commits into from
Aug 1, 2024

Conversation

aidanharan
Copy link
Contributor

@aidanharan aidanharan commented Aug 1, 2024

When parsing the table name from raw SQL, return nil if the raw SQL is blank. This fixes a issue caused by #1206

The actual bug is described in a #1209. The testing setup required to recreate the actual bug is complicated as you would need to create another database user who doesn't have the permissions to run EXEC sp_help on the affected view and you would need to create the ActiveRecord connection with that database user. Instead of recreating the actual bug, I just added check that the updated get_raw_table_name method checks for nil.

@aidanharan aidanharan changed the title Fix parsing table name nil Handle blank SQL when parsing table name Aug 1, 2024
@aidanharan aidanharan marked this pull request as ready for review August 1, 2024 15:09
@aidanharan aidanharan merged commit 6fddb9a into 7-1-stable Aug 1, 2024
6 of 8 checks passed
@aidanharan aidanharan deleted the fix-parsing-table-name-nil branch August 1, 2024 15:23
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant