Bug #106782 | Sql_Safe_Updates errors if target table is empty with update join | ||
---|---|---|---|
Submitted: | 18 Mar 2022 16:47 | Modified: | 25 Mar 2022 8:19 |
Reporter: | Andy Cadley | Email Updates: | |
Status: | Verified | Impact on me: | |
Category: | MySQL Workbench: SQL Editor | Severity: | S3 (Non-critical) |
Version: | 8.0.28 | OS: | Any |
Assigned to: | CPU Architecture: | Any |
[18 Mar 2022 16:47]
Andy Cadley
[18 Mar 2022 17:27]
MySQL Verification Team
Hi Mr. Cadley, Thank you for your bug report. Are you sure that you get error 1175 ???? If you use our client, you should get full textual error message. Please, confirm.
[23 Mar 2022 10:43]
Andy Cadley
The full text of the error in MySQL workbench is: Error Code: 1175. You are using safe update mode and you tried to update a table without a WHERE that uses a KEY column. To disable safe mode, toggle the option in Preferences -> SQL Editor and reconnect. But obviously this doesn't really make much sense when the exact same query works fine if the table is not empty. Turning Safe SQL Updates off will make the problem go away, but that effectively means you always have to have it disabled if there is the possibility of an empty target table, which makes the feature fairly pointless.
[25 Mar 2022 8:19]
MySQL Verification Team
Thank you for the feedback.