Skip to content

Update dotnet.yml#104

Merged
NorthernLight1 merged 7 commits intomainfrom
develop
Apr 29, 2026
Merged

Update dotnet.yml#104
NorthernLight1 merged 7 commits intomainfrom
develop

Conversation

@NorthernLight1
Copy link
Copy Markdown
Owner

No description provided.

NorthernLight1 and others added 7 commits April 27, 2026 22:43
- Add N.EntityFramework.Extensions.MySql targeting net9.0 with Pomelo.EntityFrameworkCore.MySql 9.0.0
- Add N.EntityFramework.Extensions.MySql.Test with Testcontainers.MySql 4.11.0
- Add N.EntityFramework.Extensions.MySql.runsettings
- Update solution file with both new MySQL projects

MySQL-specific implementation details:
- MySqlBulkCopy for bulk insert via MySqlConnector (transitive via Pomelo)
- JOIN-based UPDATE/DELETE syntax for MERGE operations
- information_schema queries using DATABASE() for table/column checks
- CREATE TABLE ... AS SELECT ... WHERE 1=0 for CloneTable
- AUTO_INCREMENT reset via ALTER TABLE ... AUTO_INCREMENT = 1
- No schema concept (GetDefaultSchema returns null)
- Uses EF Core 9 SetPropertyCalls<T> API for UpdateFromQuery

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Use MySqlBuilder(image) constructor to avoid obsolete API warning.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
- Reorder operations to UPDATE -> DELETE -> INSERT (was UPDATE -> INSERT ->
  DELETE) so newly inserted rows are not immediately deleted by the
  subsequent DELETE when MergeOnCondition uses nullable columns
- Fix deleteJoinCondition to use matchJoinCondition when mergeOnCondition
  is not null (was incorrectly guarded by preallocatedIds flag)
- Use SELECT COUNT(*) before UPDATE to get matched-row count, since MySQL
  ExecuteNonQuery returns rows-changed not rows-matched by default
- Add staging table index (ALTER TABLE staging ADD INDEX idx_pk) after
  CloneTable when keepIdentity=true to prevent async timeout on large datasets
- Fix TPT RowsInserted aggregation: use FirstOrDefault() instead of Sum()
  since each TPT table independently inserts the same N rows (Sum doubled
  the count for 2-table TPT hierarchies)
- Add UseAffectedRows=false to MySQL connection string (belt-and-suspenders)

All 12 BulkSync tests now pass (was 8 failing). The 6 With_Transaction
failures and 2 With_Transaction skips are pre-existing MySQL limitations:
CREATE TEMPORARY TABLE causes an implicit DDL commit, so bulk operations
inside an explicit transaction cannot be rolled back.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
@NorthernLight1 NorthernLight1 merged commit db217bc into main Apr 29, 2026
9 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.

1 participant