CodeLogic.Data.MySql
5.0.119-preview
dotnet add package CodeLogic.Data.MySql --version 5.0.119-preview
NuGet\Install-Package CodeLogic.Data.MySql -Version 5.0.119-preview
<PackageReference Include="CodeLogic.Data.MySql" Version="5.0.119-preview" />
<PackageVersion Include="CodeLogic.Data.MySql" Version="5.0.119-preview" />
<PackageReference Include="CodeLogic.Data.MySql" />
paket add CodeLogic.Data.MySql --version 5.0.119-preview
#r "nuget: CodeLogic.Data.MySql, 5.0.119-preview"
#:package CodeLogic.Data.MySql@5.0.119-preview
#addin nuget:?package=CodeLogic.Data.MySql&version=5.0.119-preview&prerelease
#tool nuget:?package=CodeLogic.Data.MySql&version=5.0.119-preview&prerelease
CodeLogic.Data.MySql
Status: 5.0 preview.
The MySQL and MariaDB provider for CodeLogic.Data, built on MySqlConnector.
dotnet add package CodeLogic.Data.MySql
- With the CodeLogic runtime: load
MySqlDataLibrarynext toDataLibrary, and set"provider": "mysql"on a connection inconfig.data.json. - Without it: pass
MySqlDataProvider.InstancetoDatabase.Create.
Bulk copy uses MySqlBulkCopy (set mySql.allowLoadLocalInfile and the server's local_infile); slow-query plans use EXPLAIN FORMAT=TREE; replica lag comes from SHOW REPLICA STATUS; failoverHosts enables driver failover. Extras: db.MySql.OptimizeTableAsync<T>(), AnalyzeTableAsync<T>().
Pooled connections skip MySqlConnector's reset on every open (one round trip per command). CL.Data resets a connection
before it goes back to the pool only when it may carry session state: raw SET/CALL/transaction control/user
variables/locks/temporary tables, WithConnectionAsync, interrupted commands. mySql.connectionReset (WhenDirty,
Always, Never) chooses; keep mySql.connectionIdleTimeoutSeconds below any proxy's idle timeout.
Documentation: Providers.
| Product | Versions Compatible and additional computed target framework versions. |
|---|---|
| .NET | net11.0 is compatible. |
-
net11.0
- CodeLogic (>= 5.0.35-preview && < 6.0.0)
- CodeLogic.Data (>= 5.0.119-preview && < 6.0.0)
- MySqlConnector (>= 2.6.2)
NuGet packages
This package is not used by any NuGet packages.
GitHub repositories
This package is not used by any popular GitHub repositories.
| Version | Downloads | Last Updated |
|---|---|---|
| 5.0.119-preview | 0 | 11/8/2026 |
| 5.0.118-preview | 0 | 11/8/2026 |
| 5.0.117-preview | 49 | 11/7/2026 |
| 5.0.116-preview | 50 | 11/1/2026 |
| 5.0.115-preview | 104 | 11/1/2026 |
| 5.0.114-preview | 37 | 10/31/2026 |
| 5.0.113-preview | 38 | 10/31/2026 |
# Changelog
## 5.0 (unreleased)
### Breaking
- `MySqlOptions.ConnectionReset` is a `ConnectionResetMode` (was `MySqlConnectionReset`); configuration values are unchanged.
### Changed
- **No reset round trip on every open (behaviour change):** the pool runs with MySqlConnector's `ConnectionReset=false`, and CL.Data resets a connection (`COM_RESET_CONNECTION`, then `SET NAMES utf8mb4` and the database restored) before it returns to the pool only when it may carry session state. Generated queries and writes skip the reset, which halves point-lookup latency against a remote server (get by key against MySQL in Docker Desktop: 1,166 µs → 622 µs, and about 2 KB less allocated per call). Statements that user code prepared through `WithConnectionAsync` keep working: the driver then runs its full reset at the next open.
### Added
- `MySqlOptions.ConnectionReset` (`WhenDirty` default, `Always`, `Never`; overrides a `ConnectionReset` key in the connection string) and `MySqlOptions.ConnectionIdleTimeoutSeconds` (default 180).
- `MySqlDataProvider.MayChangeSession`: the raw-SQL rules (neutral: one `SELECT`/`WITH`/`VALUES`/`TABLE`/`SHOW`/`EXPLAIN`/`DESCRIBE`/`INSERT`/`REPLACE`/`UPDATE`/`DELETE` or DDL statement without user variables, `GET_LOCK`, `TEMPORARY`, `LAST_INSERT_ID`, `SQL_LOG_BIN` or executable comments).
- New package: the MySQL and MariaDB provider for CodeLogic.Data (CL.Data), built on MySqlConnector. Part of the CL.Data
database framework that replaces CL.MySQL2 in the CodeLogic 5 line. Targets .NET 11 and CodeLogic 5.
- `MySqlDatabaseAdmin` (information_schema.SCHEMATA; CREATE DATABASE with the connection charset/collation); batched deletes with DELETE ... LIMIT.
### Fixed
- The package depends on CodeLogic `[5.0.35-preview, 6.0.0)`; the old `[5.0.0-preview, 6.0.0)` floor let NuGet pick the unsigned 5.0.28-preview (CS0012).
- `OptimizeTableAsync` and `AnalyzeTableAsync` run on the primary as a side effect (`SqlIntent.SideEffect`). Before, they went through the read path and could be sent to a replica or retried.
- The schema introspector always reads the primary.