Skip to content

.Net 10 changes for reference#2026

Open
renemadsen wants to merge 1354 commits intoPomeloFoundation:mainfrom
microting:master
Open

.Net 10 changes for reference#2026
renemadsen wants to merge 1354 commits intoPomeloFoundation:mainfrom
microting:master

Conversation

@renemadsen
Copy link
Copy Markdown
Contributor

@lauxjpn Use for refference as you wish.

Let me know in what slices you want the changes to be put into different smaller PR's for you to better use the changes.
I've kept all the existing db versions and added new versions to demonstrate that no regressions are there.

To my best of knowledge and testing, all changes are working.
Also implemented ToJson() instead of the custom json implementation, since I personally don't like custom out of scope changes => more custom code to maintain, than following the mainline => easier to maintain.

Copilot AI and others added 30 commits December 22, 2025 19:52
Co-authored-by: renemadsen <76994+renemadsen@users.noreply.github.com>
Co-authored-by: renemadsen <76994+renemadsen@users.noreply.github.com>
The tests incorrectly expected MySQL to throw error 1093 for DELETE queries with derived tables.
The SQL pattern generated by EF Core uses derived tables (AS `o1`) within EXISTS clauses, which
materializes the intermediate result and avoids MySQL's error 1093 "You can't specify target table
for update in FROM clause". This pattern works on both MySQL and MariaDB.

Fixed tests:
- Delete_Where_Take
- Delete_Where_Skip
- Delete_Where_Skip_Take
- Delete_Where_OrderBy_Skip
- Delete_Where_OrderBy_Take
- Delete_Where_OrderBy_Skip_Take
- Delete_Where_Skip_Take_Skip_Take_causing_subquery

Tests now pass on both MySQL 8.0.40 and MariaDB 11.6.2.

Co-authored-by: renemadsen <76994+renemadsen@users.noreply.github.com>
Co-authored-by: renemadsen <76994+renemadsen@users.noreply.github.com>
…rtions

- Enable MySqlBugLimit0Offset0ExistsWorkaround for MariaDB < 11.6.2 (fixes MariaDB 11.3.2 and 10.5.27)
- Keep MySQL workaround disabled to match test baseline
- Add conditional test assertions in Skip_0_Take_0_works_when_constant to handle both workaround enabled and disabled cases

Co-authored-by: renemadsen <76994+renemadsen@users.noreply.github.com>
Add null check for typeMapping before accessing ClrType property to prevent NullReferenceException when FindMapping returns null.

Co-authored-by: renemadsen <76994+renemadsen@users.noreply.github.com>
MySQL and older MariaDB versions don't support DELETE with self-referencing subqueries (Error 1093). Added conditional logic to handle this limitation, following the pattern used in other similar tests.

Co-authored-by: renemadsen <76994+renemadsen@users.noreply.github.com>
Instead of skipping the JSON conversion when FindMapping returns null, use the parameter's existing TypeMapping as a fallback. This prevents NullReferenceException while maintaining correct query behavior.

Co-authored-by: renemadsen <76994+renemadsen@users.noreply.github.com>
Changed --verbosity detailed to --verbosity normal for Functional Tests to prevent GitHub Actions log truncation (~10MB limit). This will reduce log output while still providing useful failure information.

Co-authored-by: renemadsen <76994+renemadsen@users.noreply.github.com>
MariaDB < 11.6.2 has the workaround enabled which collapses LIMIT 0 OFFSET 0 to WHERE FALSE for all queries (not just EXISTS subqueries). Added conditional test assertions to handle both cases.

Co-authored-by: renemadsen <76994+renemadsen@users.noreply.github.com>
…pectations

The SkipTakeCollapsingExpressionVisitor removes ORDER BY clause when collapsing LIMIT 0 OFFSET 0. Updated test expectations to match actual behavior - no ORDER BY when workaround is enabled.

Co-authored-by: renemadsen <76994+renemadsen@users.noreply.github.com>
…er workaround branch

The test executes two queries - first with p=0, then with p=1. Both need the parameter declaration. Fixed to match actual SQL generation.

Co-authored-by: renemadsen <76994+renemadsen@users.noreply.github.com>
…around expectations

When SkipTakeCollapsingExpressionVisitor collapses LIMIT @p OFFSET @p to WHERE FALSE, the @p parameter is no longer used and gets removed from the SQL. Updated expectations to match actual behavior.

Co-authored-by: renemadsen <76994+renemadsen@users.noreply.github.com>
The workaround only collapses LIMIT 0 OFFSET 0 to WHERE FALSE. The second query uses p=1 (LIMIT 1 OFFSET 1) which should NOT be collapsed, so it keeps the @p='1' parameter and LIMIT/OFFSET clause.

Co-authored-by: renemadsen <76994+renemadsen@users.noreply.github.com>
MySQL 8.0.40+ now generates SQL for queries that previously were
client-evaluated. Updated three test methods with correct SQL baselines:
- SelectMany_correlated_subquery_hard
- Select_subquery_recursive_trivial
- Select_correlated_subquery_ordered

Co-authored-by: renemadsen <76994+renemadsen@users.noreply.github.com>
Fixed additional tests that now generate SQL in MySQL 8.0.40+:
- DefaultIfEmpty_in_subquery_nested_filter_order_comparison
- SelectMany_correlated_with_Select_value_type_and_DefaultIfEmpty_in_selector

All 934 NorthwindMiscellaneousQueryMySqlTest tests now pass.

Co-authored-by: renemadsen <76994+renemadsen@users.noreply.github.com>
…_to_apply for MySQL 8.0.40+

In MySQL 8.0.40+, the query now executes correctly (no exception thrown) and uses a different SQL structure with JOIN LATERAL at the top level and additional nested subqueries for DefaultIfEmpty handling.

Updated SQL baseline to match the new query structure.

Co-authored-by: renemadsen <76994+renemadsen@users.noreply.github.com>
Co-authored-by: renemadsen <76994+renemadsen@users.noreply.github.com>
…translated

This fixes the issue where tests expected MySqlException but got InvalidOperationException on older MariaDB versions.

Co-authored-by: renemadsen <76994+renemadsen@users.noreply.github.com>
… method

Co-authored-by: renemadsen <76994+renemadsen@users.noreply.github.com>
Only bypass CrossApply/OuterApply checks when inside DELETE/UPDATE AND DeleteWithSelfReferencingSubquery is not supported. This ensures older databases (MariaDB < 11) throw MySqlException as expected.

Co-authored-by: renemadsen <76994+renemadsen@users.noreply.github.com>
dependabot Bot and others added 4 commits April 2, 2026 05:53
---
updated-dependencies:
- dependency-name: GitHubActionsTestLogger
  dependency-version: 3.0.3
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
---
updated-dependencies:
- dependency-name: Microsoft.NET.Test.Sdk
  dependency-version: 18.4.0
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
Copilot AI and others added 25 commits April 8, 2026 04:16
…ing.EntityFrameworkCore.MySql

Changes:
- Updated AssemblyName in 4 src .csproj files
- Updated assembly name references in 9 .targets files (kept namespace-qualified type names unchanged)
- Updated debug info keys in MySqlOptionsExtension.cs
- Updated test assertions and references in 3 test files
- Added breaking change notice to README.md
- Updated README.md references to use the new assembly name

Agent-Logs-Url: https://github.com/microting/Pomelo.EntityFrameworkCore.MySql/sessions/ac058a11-4867-4d19-b31a-8874efad5daa

Co-authored-by: renemadsen <76994+renemadsen@users.noreply.github.com>
- Renamed all C# namespaces from Pomelo.EntityFrameworkCore.MySql to Microting.EntityFrameworkCore.MySql
- Updated RootNamespace in all .csproj files
- Updated PomeloTargetFramework -> MicrotingTargetFramework build property
- Updated Directory.Build.props (Company, Copyright, Product, StrongNameKeyId, PackageTags)
- Updated .targets files type-qualified names
- Updated copyright headers and doc comments
- Updated all docs/, samples/, benchmark/ references
- Updated NuGet.config (removed old Pomelo AZDO/MyGet feeds)
- Updated LICENSE copyright
- Updated scaffold.ps1 and legacy migration backups
- Updated stylecop.json companyName
- Updated README.md breaking change notice for full rename

Agent-Logs-Url: https://github.com/microting/Pomelo.EntityFrameworkCore.MySql/sessions/e67cb5d3-ed73-4e71-9761-6c6d2bb856be

Co-authored-by: renemadsen <76994+renemadsen@users.noreply.github.com>
… rename

The namespace rename from Pomelo to Microting changed the alphabetical
sort order of using statements: Microting (M) now sorts before
NetTopologySuite (N), whereas Pomelo (P) sorted after it. Updated 4
baseline files in BigModel and BigModel_with_JSON_columns to match the
code generator output.

Agent-Logs-Url: https://github.com/microting/Pomelo.EntityFrameworkCore.MySql/sessions/02852c37-2af9-4f3f-819c-6039c7680517

Co-authored-by: renemadsen <76994+renemadsen@users.noreply.github.com>
…TestLogger-3.0.3

Bump GitHubActionsTestLogger from 3.0.2 to 3.0.3
….Test.Sdk-18.4.0

Bump Microsoft.NET.Test.Sdk from 18.3.0 to 18.4.0
…-intended

Fully rename all Pomelo references to Microting across entire codebase
…error

Override AppendUpdateColumnValue() to generate JSON_SET() SQL when EF Core
sends partial JSON column updates. This works around EF Core 10 bug #37411
where only the modified property value is sent instead of the complete JSON
object.

The fix:
- Detects partial JSON updates via columnModification.JsonPath
- Generates: JSON_SET(column, '$.path', @param) instead of column = @param
- Checks server version support (MySQL 5.7.8+, MariaDB 10.2.3+)
- Handles null values via reflection (same approach as Npgsql)
- Falls back to standard behavior for non-JSON columns

Also cleans up debug comments from earlier investigation commits.

Agent-Logs-Url: https://github.com/microting/Pomelo.EntityFrameworkCore.MySql/sessions/89c91c07-7461-4a26-9939-972e68c06152

Co-authored-by: renemadsen <76994+renemadsen@users.noreply.github.com>
Implement JSON_SET() for partial JSON updates, fixing passkey rename error
…UpdateSql for projection tests

Agent-Logs-Url: https://github.com/microting/Pomelo.EntityFrameworkCore.MySql/sessions/2bc6c21e-27f8-4b29-a00d-2887f40f4ab7

Co-authored-by: renemadsen <76994+renemadsen@users.noreply.github.com>
Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
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.

3 participants