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

Regexp-escape table name for MS SQL #38338

Merged
merged 1 commit into from Jan 28, 2020

Conversation

lcreid
Copy link
Contributor

@lcreid lcreid commented Jan 28, 2020

Summary

This is a fix for #38337. It adds Regexp.escape to one method in ActiveRecord, so that table names with regular expression characters in them work as expected. Since MS SQL Server uses "[" and "]" to quote table and column names, and those characters are regular expression characters, methods like pluck and select fail in certain cases when used with the MS SQL Server adapter.

Other Information

Fixes #38337

@kamipo
Copy link
Member

kamipo commented Jan 28, 2020

Backported 92a185d.

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.

Table names that contain regular expression characters cause select and pluck to fail
2 participants