Bug #84530 Beautify removes double backslashes and replaces with single-quoted string
Submitted: 17 Jan 2017 12:23 Modified: 17 Jan 2017 12:56
Reporter: Henk van den Toorn Email Updates:
Status: Verified Impact on me:
Category:MySQL Workbench: SQL Editor Severity:S3 (Non-critical)
Version:, 6.3.8, 8.0.22 OS:Windows (7)
Assigned to: CPU Architecture:Any
Tags: beautify

[17 Jan 2017 12:23] Henk van den Toorn
When using "beautify" to re-format a query containing double backslashes, the editor replaces the double backslashes with single backslashes and places the string in a single quoted string.
Unfortunately this does not work for SQL and needs to be manually edited to reintroduce the double backslashes.

How to repeat:
See description

Suggested fix:
Don't reformat double backslashes for single ones.
[17 Jan 2017 12:56] MySQL Verification Team
Hello Henk,

Thank you for the report.

[11 Jan 2018 22:59] Tom Kaminski
I was just affected by this bug.  Here is an example:

SELECT 'hello\\world';
Run Edit->Format->Beautify Query
Changes the query to:
SELECT 'hello\world';
[9 Feb 2021 7:25] MySQL Verification Team
Bug #102354 marked as duplicate of this one.