You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Software versions
MySqlConnector version: 2.1.7
Server type (MySQL, MariaDB, Aurora, etc.) and version: MariaDB 10.6.7 (also 10.6.3)
.NET version: 6
Describe the bug
I have a .NET DataTable that holds a TimeOnly Column. When I try to bulk load it into a MariaDB table, where the TimeOnly column maps to a MariaDB 'TIME' column, it is always inserted as '00:00:00'.
Exception
BulkCopyResult indicates a truncation warning, no exception is thrown
Though the warning in MySqlBulkCopyResult still remains.
I have also tested this using the DateOnly struct. This always inserts '0000-00-00' in a MariaDB DATE column, regardless of the value I use in the DataTable object.
The workaround here is to convert the DateOnly struct to a DateTime struct, and it starts working.
The text was updated successfully, but these errors were encountered:
Software versions
MySqlConnector version: 2.1.7
Server type (MySQL, MariaDB, Aurora, etc.) and version: MariaDB 10.6.7 (also 10.6.3)
.NET version: 6
Describe the bug
I have a .NET DataTable that holds a TimeOnly Column. When I try to bulk load it into a MariaDB table, where the TimeOnly column maps to a MariaDB 'TIME' column, it is always inserted as '00:00:00'.
Exception
BulkCopyResult indicates a truncation warning, no exception is thrown
Code sample
The MySqlBulkCopyResult now holds the message: "Data truncated for column 'A' at row 1".
Expected behavior
When the code above is executed: 1 row in the 'tbl' table, containing '11:05:01'.
Additional context
Converting the TimeOnly to a TimeSpan seems to work. i.e.
Though the warning in MySqlBulkCopyResult still remains.
I have also tested this using the DateOnly struct. This always inserts '0000-00-00' in a MariaDB DATE column, regardless of the value I use in the DataTable object.
The workaround here is to convert the DateOnly struct to a DateTime struct, and it starts working.
The text was updated successfully, but these errors were encountered: