MySQL Forums
Forum List  »  MySQL Workbench

Workbench Issue with Generated Columns
Posted by: Ron Mittelman
Date: August 17, 2020 12:40PM

Using MySQL 8.0, I am modifying a column to be generated. So I drop the column, then re-add it as generated, with a fairly complex formula. Basically, creating a Heading column based on columns FirstName, LastName, SpouseName and SpouseLastName. The formula works, and when I query the table, the new generated column displays properly.

However, when I try to view the table definition in Workbench, I get an error saying "Error parsing DDL for <TableName>". It lets me view the DDL, and I do see errors there, mostly related to empty column values such as the following:

`Heading` varchar(509) CHARACTER SET utf8 COLLATE utf8_general_ci GENERATED ALWAYS AS (concat(if(((`UseTitle` = 0) or (`Title` is null)),_utf8mb3'',concat(`Title`,_utf8mb3' ')), `DonorFirstName`,_utf8mb3' ',`DonorLastName`)) VIRTUAL,

The error shows where it says " _utf8mb3'' ". I put in the empty value, but I did not put in the _utf8mb3. That got put in automatically. When it says " _utf8mb3' ' " (with a space), it does not cause the error. Only empty string causes the error.

Since the changes work, and the generated column works properly, is the issue with Workbench itself?

Thanks...

Options: ReplyQuote


Subject
Views
Written By
Posted
Workbench Issue with Generated Columns
976
August 17, 2020 12:40PM


Sorry, you can't reply to this topic. It has been closed.

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.