Bug #95663 Does not accept JSON type function or procedure definitions
Submitted: 5 Jun 2019 15:33 Modified: 7 Jun 2019 15:35
Reporter: Mark Garber Email Updates:
Status: Closed Impact on me:
None 
Category:MySQL Workbench: Modeling Severity:S3 (Non-critical)
Version:8.0.16 OS:Linux (Ubuntu 18.04 x86_64)
Assigned to: CPU Architecture:x86
Tags: WBBugReporter

[5 Jun 2019 15:33] Mark Garber
Description:
----[For better reports, please attach the log file after submitting. You can find it in /home/mgarber/.mysql/workbench/log/wb.log]

How to repeat:
From home.
1. Click "Physical Schemas".
2. Under "Physical Schemas" click on tab for previously defined schema
3. Click on "Add Routines"
4. Define the following stored procedure:
CREATE PROCEDURE `proc_with_json_parameter` (_param JSON)
BEGIN
  RETURN _param;
END

The above is flagged with a syntax error only in the modeling section of workbench. It works OK when done in the mysql client.  

I am using MySQL Workbench 8.0 Version 8.0.16 build 14498383 CE (64 bits) Community.

Suggested fix:
Parser in the modeling utility needs to accept the JSON type. You might also check the other JSON functions.
[5 Jun 2019 15:54] MySQL Verification Team
Thank you for the bug report.
[6 Jun 2019 7:07] Mike Lischke
Mark, what MySQL version does your model use? The JSON datatype is available not before MySQL 5.7.8. See menu Model -> Model Options -> MySQL -> Target MySQL Version.
[6 Jun 2019 13:52] Mark Garber
In response Mike's request for more info I executed the following at the command line

~$ mysql --version
mysql  Ver 8.0.16 for Linux on x86_64 (MySQL Community Server - GPL)

~$ mysql-workbench --version
Workbench can't find libproj.so, some options may be unavailable.
MySQL Workbench CE (GPL) 8.0.16 CE build 14498383

Do I need to uninstall and re-install workbench?  When I click on "Help/Check for Updates" the response is "MySQL Workbench is Up to Date"
[7 Jun 2019 7:33] Mike Lischke
Mark, you didn't do what I asked you to do :-)

The installed server doesn't play any role here. You could even have no server installed at all. What's the critical point here is the version used for your model. This can either be set for all models in the preferences or individually for each model in the model preferences.
[7 Jun 2019 15:35] Mark Garber
I understand now.  I located Model/Model Options and changed to the MySQL version to 8.0.

My apologies.