Bug #102827 | beautifying SQL script | ||
---|---|---|---|
Submitted: | 5 Mar 2021 13:57 | Modified: | 9 Mar 2021 13:29 |
Reporter: | Claude Renglet | Email Updates: | |
Status: | Verified | Impact on me: | |
Category: | MySQL Workbench: SQL Editor | Severity: | S1 (Critical) |
Version: | 8.0.23 | OS: | Windows (Microsoft Windows 10 Enterprise) |
Assigned to: | CPU Architecture: | Any | |
Tags: | WBBugReporter |
[5 Mar 2021 13:57]
Claude Renglet
[5 Mar 2021 14:17]
Claude Renglet
this behaviour/bug because a character '²' (subscript 2, U+00B2, Alt 0178) is present in a column alias. Removing this character from the sql script, the beautify function is working fine.
[5 Mar 2021 20:32]
MySQL Verification Team
Thank you for the bug report. I couldn't repeat on my own. Please provide the script to test, the wb.og file and the server version you are connecting to. Thanks.
[8 Mar 2021 18:32]
Claude Renglet
Server version : 8.0.18 and 5.7.27 in a new database, create table and view in mysql server 5.7.27, default charset is set to "latin1" in mysql server 8.0.18, default charset is set to "utf8" CREATE TABLE `new_table` ( `idnew_table` int(11) NOT NULL, `volume` float DEFAULT NULL, `weigth` float DEFAULT NULL, `surface` float DEFAULT NULL, PRIMARY KEY (`idnew_table`) ) ENGINE=InnoDB DEFAULT CHARSET=latin1; CREATE ALGORITHM=UNDEFINED DEFINER=`nirond`@`%` SQL SECURITY DEFINER VIEW `BugWorkBench`.`new_view` AS select `BugWorkBench`.`new_table`.`volume` AS `Volume(m³)`,`BugWorkBench`.`new_table`.`weigth` AS `Weigth(kg)`,`BugWorkBench`.`new_table`.`surface` AS `Surface(m²)` from `BugWorkBench`.`new_table`; Refresl All right-click on the view, select Sent to SQL Editor - Create Statement, then Beautfify/reformat the SQL String or right-click on the view, select Alter View => Error message : Error parsing DDL for `dbname`.`new_view` wb.log : 19:08:09 [ERR][ sqlide-history]: Can't parse <ENTRY timestamp='19:01:14'>CREATE ALGORITHM=UNDEFINED DEFINER=`xxxxxxxx`@`%` SQL SECURITY DEFINER VIEW `BugWorkBench`.`new_view` AS select `BugWorkBench`.`new_table`.`volume` AS `Volume(m³)`,`BugWorkBench`.`new_table`.`weigth` AS `Weigth(kg)`, `BugWorkBench`.`new_table`.`Surface` As `Surface(m²)` from `BugWorkBench`.`new_table`</ENTRY>, of file: C:\Users\cr\AppData\Roaming\MySQL\Workbench\sql_history\2019-02-04 19:08:09 [ERR][ XML Functions]: LibXml: Entity: line 1: 19:08:09 [ERR][ XML Functions]: LibXml: parser 19:08:09 [ERR][ XML Functions]: LibXml: error : 19:08:09 [ERR][ XML Functions]: LibXml: Entity 'sup3' not defined 19:08:09 [ERR][ XML Functions]: LibXml: nch`.`new_view` AS select `BugWorkBench`.`new_table`.`volume` AS `Volume(m³ 19:08:09 [ERR][ XML Functions]: LibXml: ^ 19:08:09 [ERR][ XML Functions]: LibXml: Entity: line 1: 19:08:09 [ERR][ XML Functions]: LibXml: parser 19:08:09 [ERR][ XML Functions]: LibXml: error : 19:08:09 [ERR][ XML Functions]: LibXml: Entity 'sup2' not defined 19:08:09 [ERR][ XML Functions]: LibXml: eigth` AS `Weigth(kg)`, `BugWorkBench`.`new_table`.`Surface` As `Surface(m² 19:08:09 [ERR][ XML Functions]: LibXml: ^ 19:12:05 [WRN][SqlEditorSchemaTree]: Error parsing DDL for bugworkbench.new_view: CREATE ALGORITHM = UNDEFINED DEFINER = `xxxxxx`@`aaa.bbb.ccc.ddd` SQL SECURITY DEFINER VIEW `new_view` AS SELECT `new_table`.`volume` AS Volume(m³), new_table.weigth AS Weigth(kg), new_table.surface AS Surface(m²) FROM new_table 19:12:21 [ERR][SQL Editor Form]: Unable to create db_mgmt_SSHConnectionRef object 19:12:21 [ERR][SQL Editor Form]: Unable to create db_mgmt_SSHConnectionRef object 19:12:22 [WRN][ mforms]: Resource file not found: mysql-logo-80.png 19:12:23 [WRN][ mforms]: Resource file not found: mysql-logo-80.png 19:12:38 [ERR][SQL Editor Form]: Unable to create db_mgmt_SSHConnectionRef object 19:12:38 [ERR][SQL Editor Form]: Unable to create db_mgmt_SSHConnectionRef object 19:17:51 [WRN][SQL Editor Form]: 0 row(s) affected, 1 warning(s): 1681 Integer display width is deprecated and will be removed in a future release. 19:19:00 [WRN][SqlEditorSchemaTree]: Error parsing DDL for bugworkbench.new_view: CREATE ALGORITHM = UNDEFINED DEFINER = `xxxxxx`@`aaa.bbb.ccc.ddd` SQL SECURITY DEFINER VIEW `new_view` AS SELECT `new_table`.`volume` AS Volume(m³), new_table.weigth AS Weigth(kg), new_table.surface AS Surface(m²) FROM new_table 19:22:08 [WRN][SqlEditorSchemaTree]: Error parsing DDL for bugworkbench.new_view: CREATE ALGORITHM = UNDEFINED DEFINER = `xxxxxx`@`aaa.bbb.ccc.ddd` SQL SECURITY DEFINER VIEW `new_view` AS SELECT `new_table`.`volume` AS Volume(m³), new_table.weigth AS Weigth(kg), new_table.surface AS Surface(m²) FROM new_table
[9 Mar 2021 13:29]
MySQL Verification Team
Hello Claude Renglet, Thank you for the bug report. Verified as described. Regards, Ashwini Patil