MySQL Forums
Forum List  »  MySQL Workbench

BLOB editor converts \func to NULL on forward engineering
Posted by: Michael Hoffmann
Date: January 27, 2021 12:41PM

On a table with a primary key field id (binary(16)) the insert tab for a model shows the field correctly to be a "BLOB".

Opening the blob editor and adding "\func UUID()" this statement will not be treated as a function when doing forward engineering.

Step 1: Open model and add a table

Create table with one field named "testId" of type "BINARY(16)".

Step 2: Add data to table via 'Inserts' tab

Apply "Mark this field as function/literal" and open blob editor to set this field value to

\func UUID();

Step 3: Forward engineer model

Generated CREATE TABLE statement looks good:

`testId` BINARY(16) NULL)

Now there the trouble starts: The generated data insert statement does show "NULL" instead of the function added in the blob editor:

INSERT INTO `test` (`testId`) VALUES (NULL);

Any idea why this is going wrong? Looks like a bug in the blob editor.

The intention of doing this in the insert tab is to use "\func UUID_TO_BIN('my UUID goes here',1) to manually insert UUIDs via inserts tab. But if even generating UUID() fails...

Cheers, Michael

MySQL Workbench Version 8.0.22

Options: ReplyQuote

Written By
BLOB editor converts \func to NULL on forward engineering
January 27, 2021 12:41PM

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.