Bug #81023 JSON datatype for variables
Submitted: 9 Apr 2016 15:22 Modified: 13 May 2016 20:55
Reporter: Denis Ivanov Email Updates:
Status: Closed Impact on me:
None 
Category:MySQL Workbench: Modeling Severity:S3 (Non-critical)
Version:6.3.6 OS:Windows (Microsoft Windows 7 Professional)
Assigned to: CPU Architecture:Any
Tags: WBBugReporter

[9 Apr 2016 15:22] Denis Ivanov
Description:
Impossible to use json data type for variables inside stored procedure editor (model routine editor).
Syntax Error: "'json' (identifier ) is not valid input at this position".
When I modify an existing procedure from schema on my server I don't have such problems.

How to repeat:
Try to add this:
create procedure `testJSON` ()
begin
   declare v_js json;
end

in list of your model routines.
[11 Apr 2016 6:06] MySQL Verification Team
Hello Denis,

Thank you for the report.
Observed this issue with WB 6.3.6 on Win7.

Thanks,
Umesh
[11 Apr 2016 6:10] MySQL Verification Team
Issue observed when defining Routine with the Routine Group Editor(SQL Editor seems to have no issues) - joining the screenshots shortly
[11 Apr 2016 6:10] MySQL Verification Team
Screenshot..

Attachment: 81023_modeling.png (image/png, text), 41.50 KiB.

[11 Apr 2016 6:10] MySQL Verification Team
Screenshot..

Attachment: 81023_SQLEditor.png (image/png, text), 39.66 KiB.

[11 Apr 2016 8:23] Mike Lischke
Denis, Umesh, did you check that the correct server version is set? In modeling you have to set this via the model itself (or a default version in the general settings). In the SQL IDE it is necessary to be connected to a server 5.7.8 or newer.
[11 Apr 2016 8:47] MySQL Verification Team
In the WB, Edit->Preferences->Modeling->MySQL-> Model has "Default target MySQL version" is 5.7
[11 Apr 2016 8:47] Denis Ivanov
MySQL Version

Attachment: versions.png (image/png, text), 34.92 KiB.

[13 Apr 2016 9:07] Mike Lischke
5.7 is not enough, it must be 5.7.8 or later (5.7 is interpreted as 5.7.0)
[13 Apr 2016 12:48] MySQL Verification Team
Drop down doesn't have option to type 5.7.8 etc.. only 5.7 can be selected

Attachment: 81023_dropdown.png (image/png, text), 45.78 KiB.

[13 Apr 2016 14:16] Mike Lischke
Oh, gosh, that should be a free text field. Still want to have feedback from OP.
[13 May 2016 20:55] Philip Olson
Posted by developer:
 
Fixed as of the upcoming MySQL Workbench 6.3.7 release, and here are the associated changelog entries:

Selecting "5.7" from Default target MySQL version did not take into
account changes to newer versions, as 5.7 behaved like 5.7.0 instead of a
newer version. For example, it was not possible to use the JSON data type
for variables inside the stored procedure editor as JSON was added in
MySQL 5.7.7.

...

The Default target MySQL version model preference is now an open text
field instead of a dropdown select box. For example, rather than choosing
a version such as "5.7", you can now enter a specific version such as
5.7.12.

Thank you for the bug report.