Skip to content

Backport: Fix table name parsing for INSERT INTO <table> WITH (<hints>) - #1425

Merged
aidanharan merged 1 commit into
rails-sqlserver:8-1-stablefrom
justindell:backport-1424-to-8-1-stable
Oct 27, 2026
Merged

aidanharan merged 1 commit into
rails-sqlserver:8-1-stablefrom
justindell:backport-1424-to-8-1-stable

Conversation

@justindell

Copy link
Copy Markdown
Contributor

Backport of #1424 to 8-1-stable, as requested.

INSERT INTO books WITH (TABLOCK) (title) ... fails with Table 'books WITH' doesn't exist because the table hint ends up in the parsed table name. This strips the hint when parsing the name and when looking for the identity column.

Cherry-picked cleanly. The CHANGELOG entry sits above v8.1.4 for the next release. Tests pass against Rails 8.1, and the new test fails on 8-1-stable without the fix.

@aidanharan
aidanharan merged commit ad597d5 into rails-sqlserver:8-1-stable Oct 27, 2026
5 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants