Bug #55351 | ADO Entity Framework does not handle StoreGeneratedPattern for TimeStamp | ||
---|---|---|---|
Submitted: | 18 Jul 2010 19:58 | Modified: | 23 Jun 2011 14:23 |
Reporter: | Daniel Ulfe | Email Updates: | |
Status: | Closed | Impact on me: | |
Category: | Connector / NET | Severity: | S2 (Serious) |
Version: | 6.3.6 | OS: | Windows (W7 x64 - VS 2010 Pro) |
Assigned to: | Julio Casal | CPU Architecture: | Any |
[18 Jul 2010 19:58]
Daniel Ulfe
[20 Jul 2010 22:16]
Kai Wolf
the problem seems even deeper. When trying to update with the the entity framework it generates a completely wrong SQL statement. In my case (simplified - CreateDate and CreateUserID are set by a trigger on the server): UPDATE `Order` SET `SomeField`='abc' WHERE `OrderID` = 2; SELECT `CreateDate`, `CreateUserID` FROM `Order` WHERE row_count() > 0 AND `OrderID`=last_insert_id() obviously in an update statement the correct select statement should have ended in WHERE row_count() > 0 AND `OrderID`= 2 the last_insert_id() only makes sense after an insert statement.
[1 Jun 2011 15:38]
Julio Casal
I can't reproduce this issue. Please use the latest Connector/Net version, where I have verified that Computed columns work as expected.
[13 Jun 2011 1:35]
Daniel Ulfe
Test case showing the error.
Attachment: TestMySQL01.zip (application/zip, text), 148.91 KiB.
[13 Jun 2011 1:36]
Daniel Ulfe
I checked the new build and the error persist. It works fine with "default values" and "triggers"... but if you add a TIMESTAMP value... it fails. Error: A store-generated value of type 'System.DateTime' could not be converted to a value of type 'System.DateTimeOffset' required for member 'a_timestamp_field' of type 'Example.TestData.tablewithtimestamp'
[23 Jun 2011 14:23]
Julio Casal
Thank you for your bug report. This issue has been committed to our source repository of that product and will be incorporated into the next release. Fixed in 6.1.6, 6.2.5, 6.3.8 and 6.4.1+. If necessary, you can access the source repository and build the latest available version, including the bug fix. More information about accessing the source trees is available at http://dev.mysql.com/doc/en/installing-source.html