Bug #122079 Row editor does not escape apostrophes
Description:
I'm new to MySQL Workbench so forgive me if I'm misunderstanding something, but: if I make any changes to a cell, and that cell contains an apostrophe anywhere in it, clicking "Apply Changes" just brings up a message complaining of an error in my SQL syntax, below an SQL preview that contains the cell's text with all of its apostrophes unescaped! To be clear, this happens even if I'm just adding alphanumeric characters elsewhere in the text, without adding *any* new apostrophes to it; so even if the response is "you're expected to escape all your apostrophes manually even in the GUI", why wouldn't it display existing text with apostrophes already escaped? Currently the only working process is "double-click a cell, type your changes, then copy & paste the whole thing into a text editor, find & replace all the apostrophes with escaped apostrophes, paste it back into MySQL Workbench, then click Apply Changes", which seems like it must be a bug.
How to repeat:
1. Connect to a database
2. Click a schema's disclosure triangle in the left column
3. Click the disclosure triangle for "Tables"
4. Right-click a table and choose "Select Rows"
5. Double-click a cell that has an apostrophe in it
6. Add or delete some letters (leaving the apostrophe unchanged)
7. Click the checkmark (whose tooltip says "Apply Changes")
Suggested fix:
Escape apostrophes when building the SQL command that updates the cell to its new value. Or if that's by design, then escape apostrophes when presenting the cell's current contents to the user for editing.
Portions of this website are copyright © 2001, 2002 The PHP Group
Page generated in 0.049 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.