Description:
The sql docs provide an example of how to perform bit operations using hex literals: SELECT X'7F' | X'80', X'80' << 2, BIT_COUNT(X'0F'). Pasting that code into a workbench sql tab puts a red wavy line under the '|' operator and a big red x next to the line, but it does run.
However attempt to put that same line into a stored procedure, and the procedure refuses to save: "The object's DDL statement contains syntax errors."
Creating the procedure "manually" via the mysql executable works correctly, but is awkward. Note that attempting to edit the manually created procedures back in workbench doesn't work right either: "Error Parsing DDL for showbug"
In case it matters, that sample SELECT was from https://dev.mysql.com/doc/refman/8.0/en/bit-functions.html
How to repeat:
From within a workbench "create stored procedure" window:
CREATE PROCEDURE `showbug` ()
BEGIN
SELECT X'7F' | X'80', X'80' << 2, BIT_COUNT(X'0F');
END
Suggested fix:
Apparently workbench does some additional parsing/verification before sending the command the the server, and it wasn't updated to support 8.0's enhancement to this feature.