| Bug #117084 | Add an server option to return found rows always | ||
|---|---|---|---|
| Submitted: | 31 Dec 2024 6:54 | Modified: | 31 Dec 2024 8:34 |
| Reporter: | Fangxin Flou (OCA) | Email Updates: | |
| Status: | Verified | Impact on me: | |
| Category: | MySQL Server: Options | Severity: | S4 (Feature request) |
| Version: | 8.0 and above | OS: | Any |
| Assigned to: | CPU Architecture: | Any | |
[31 Dec 2024 6:55]
Fangxin Flou
By the way, only MySQL return two values, no other database does so, so ORM framwork does not provide api interface to retrive the two values.
[31 Dec 2024 8:34]
MySQL Verification Team
Hello Fangxin Flou, Thank you for the feature request. regards, Umesh

Description: We are using optimistic locks for better concurrency as following. select * from table where pk = ... (without for update) insert .... n, _err = (update table set ... where pk = ...) if _err != nil or n != 1 { err = user defined error } return err If no columns changed it will return 0 or 1 (depend on the client setting), but we do not have good control of the clients' setting, so a server option to return found rows as affected rows is expected here. By the way, only MySQL return two values, no other database does so, so ORM framwork does provide api interface to retrive the two values. How to repeat: n/a