Bug #113443 SQL Keyword "RETURNING" not handled properly when updating data
| Submitted: | 15 Dec 2023 19:42 | Modified: | 21 May 2024 22:03 |
|---|---|---|---|
| Reporter: | Shiyao Wang (OCA) | Email Updates: | |
| Status: | Closed | Impact on me: | |
| Category: | Connector / NET | Severity: | S1 (Critical) |
| Version: | 7.0.10+MySQL8.2.0 | OS: | Any |
| Assigned to: | CPU Architecture: | Any | |
| Tags: | EFCore | ||
[15 Dec 2023 19:42]
Shiyao Wang
[15 Dec 2023 19:43]
Shiyao Wang
Source file of a C# project that can repro this bug.
Attachment: WSY.MySQL.BugRepro.souce.zip (application/x-zip-compressed, text), 4.82 KiB.
[15 Dec 2023 19:43]
Shiyao Wang
A screenshot of the exception message of this bug
Attachment: MySQL-BugRepro.png (image/png, text), 265.27 KiB.
[15 Dec 2023 19:44]
Shiyao Wang
The sql generated by EFCore when the bug is triggered.
Attachment: SqlUpdateStatementGeneratedByEFCore.sql (application/octet-stream, text), 98 bytes.
[17 Dec 2023 12:45]
MySQL Verification Team
Hello Wang Shiyao, Thank you for the report and test case. Verified as described. regards, Umesh
[22 Dec 2023 17:35]
OCA Admin
Contribution submitted via Github - Fixed bug with "RETURNING" clause of EFCore (Oracle Bug #113443) (*) Contribution by Wang Shiyao (Github wsy, mysql-connector-net/pull/59#issuecomment-1858409388): "I confirm the code being submitted is offered under the terms of the OCA, and that I am authorized to contribute it."
Contribution: git_patch_1646528056.txt (text/plain), 1.21 KiB.
[2 Feb 2024 18:38]
Quentin Snow
Also affecting me on 8.0.0+MySQL8.0.32
[21 May 2024 22:03]
Philip Olson
Posted by developer: Fixed as of the upcoming MySQL Connector/NET 9.0.0 release, and here's the proposed changelog entry from the documentation team: The AppendReturningClause method is now overridden to prevent an DatabaseGeneratedOption.Computed attribute annotation from adding an unsupported RETURNING clause to the generated SQL. Our thanks to Wang Shiyao for the contribution. Thank you for the bug report.
Portions of this website are copyright © 2001, 2002 The PHP Group
Page generated in 0.043 sec. using MySQL 8.4.7-u6-cloud
Timestamp references displayed by the system are UTC.
Content reproduced on this site is the property of the
respective copyright holders.
It is not reviewed in advance
by Oracle and does not necessarily represent the opinion of
Oracle or any other party.