Skip to content

Remove CheckComposableSql() override#2035

Open
yykkibbb wants to merge 1 commit intoPomeloFoundation:mainfrom
yykkibbb:fix/issue-1543-remove-check-composable-sql
Open

Remove CheckComposableSql() override#2035
yykkibbb wants to merge 1 commit intoPomeloFoundation:mainfrom
yykkibbb:fix/issue-1543-remove-check-composable-sql

Conversation

@yykkibbb
Copy link

@yykkibbb yykkibbb commented Feb 18, 2026

Summary

  • Remove the empty CheckComposableSql() override in MySqlQuerySqlGenerator.cs, which was introduced to support CTE (WITH) expressions in raw SQL
  • The upstream issue (Identify common table expressions (WITH) as composable for raw SQL dotnet/efcore#26471) was resolved in EF Core 7.0.0, and the base QuerySqlGenerator.CheckComposableSqlTrimmed now natively recognizes both SELECT and WITH as composable SQL
  • Remove the stored procedure test method overrides in FromSqlSprocQueryMySqlTest.cs that expected MySqlException. The base class tests already expect InvalidOperationException, which is now the correct behavior since non-composable SQL (e.g., CALL) is rejected by the base class before reaching the database

Fixes #1543

Test plan

  • FromSqlSprocQueryMySqlTest — 327 tests passed (base class tests now correctly expect InvalidOperationException)
  • FromSqlQueryMySqlTest — CTE composition tests continue to pass
  • SqlQueryMySqlTest — CTE composition tests continue to pass

The upstream issue (dotnet/efcore#26471) was resolved in EF Core 7.0.0.
The base QuerySqlGenerator.CheckComposableSqlTrimmed now recognizes
both SELECT and WITH as composable SQL, so the Pomelo override is no
longer needed.

Also remove the stored procedure test method overrides in
FromSqlSprocQueryMySqlTest that expected MySqlException, since the
base class tests already expect InvalidOperationException.
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.

Remove SQL composability check override

1 participant