Bug #103689 MySQL Workbench incorrectly registering syntax error for json_value returning
Submitted: 13 May 2021 23:15 Modified: 14 May 2021 6:26
Reporter: Justin Levene Email Updates:
Status: Won't Fix Impact on me:
None 
Category:MySQL Workbench: SQL Editor Severity:S2 (Serious)
Version:8.0.23, 8.0.25, 8.0.26 OS:Windows (10)
Assigned to: CPU Architecture:x86

[13 May 2021 23:15] Justin Levene
Description:
MySQL Workbench is incorrectly marking a syntax error when using "returning" in "json_value"

How to repeat:
Type in the following in an SQL window:

select json_value('{"a":1, "b":2, "c":3}', "$.b" RETURNING UNSIGNED);

MySQL classes this as a syntax error and thus won't compile a function or procedure that has this in it.

In the sql window you can obviously execute the command even though MYSQL marks it as an error, however it prevents you using it in a procedure or function

Suggested fix:
To class this type of expression as acceptable
[14 May 2021 6:26] MySQL Verification Team
Hello Justin Levene,

Thank you for the report and feedback.

regards,
Umesh
[8 Dec 2021 13:31] MySQL Verification Team
Bug #105737 marked as duplicate of this one.
[14 Sep 18:06] Omer Barnir
Posted by developer:

This issue applies to the legacy MySQL Workbench 8.x implementation that is no longer supported or maintained.
MySQL Workbench 26.7 is a complete rewrite using a new technology stack and does not use the affected legacy implementation.
Therefore, this issue is not applicable to the current MySQL Workbench product and as such is closed.