-
-
Notifications
You must be signed in to change notification settings - Fork 525
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Issue with datetime(6) column using timestamp(6) range #8236
Comments
Thanks for taking the time to report this issue @dtminnaar 🙏 Sorry we didn't notice it for a few days. We monitor the dolthub/dolt issue queue daily, so feel free to report issues there and we'll see them faster. Thank you for the easy repro instructions. Thanks to those, I was able to quickly identify the query that Entity Framework is running against Dolt: INSERT INTO `Movie` (`Id`, `Genre`, `Price`, `ReleaseDate`, `Title`) VALUES ('3f1a1895-06d8-4d29-a8aa-dab630d81ec0', 'test', 1, timestamp('1000-01-01 00:00:00.000000'), 'test'); Note the use of the Here's a quick test I did with MySQL 8.3.0 to confirm that: mysql -uroot --protocol TCP -e "select timestamp('1000-01-01 00:00:00');" --column-type-info
Field 1: `timestamp('1000-01-01 00:00:00')`
Catalog: `def`
Database: ``
Table: ``
Org_table: ``
Type: DATETIME
Collation: binary (63)
Length: 19
Max_length: 19
Decimals: 0
Flags: BINARY
+----------------------------------+
| timestamp('1000-01-01 00:00:00') |
+----------------------------------+
| 1000-01-01 00:00:00 |
+----------------------------------+ Once we fix Dolt's |
I'm going to move this to the Dolt queue for visibility. |
I fixed the issue in the I'll kick off a release once that build is finished so you can pick up the fix at your convenience. Thanks again for helping us find this one! This was a good one to fix! |
@dtminnaar – Dolt 1.42.10 contains the fix for this one. Let us know if we can do anything else to help you build with Dolt! |
When storing a record with the datetime value of 1000-01-01 00:00:00 I get the following error:
MySqlConnector.MySqlException (0x80004005): value "1000-01-01 00:00:00" is outside of timestamp(6) range
The column in the database is datetime(6), not timestamp(6).
Manually changing the value in the database works.
You can recreate this error by adding the following lines to Program.cs in this sample:
Updated sample to .net core 8.0.7
Updated Pomelo.EntityFrameworkCore.MySql to 8.0.2
Using docker image dolt-sql-server version 1.42.7
Best regards.
The text was updated successfully, but these errors were encountered: