-
-
Notifications
You must be signed in to change notification settings - Fork 539
Closed
Labels
bugDefective behaviour in HeidiSQLDefective behaviour in HeidiSQLnettype-mysqlMySQL and/or MariaDB specific issueMySQL and/or MariaDB specific issue
Milestone
Description
Steps to reproduce this issue
- Create a new function. Modifiers and properties do not matter.
- Set its return value to an ENUM or a SET with values containing whitespace. Whitespace-containing string literals should be allowed as per the MySQL standard, though it is not explicitly stated.
- Refresh Heidi's view of the function. I have switched to a table definition, and then back to the function.
Reference code:
CREATE DEFINER=`root`@`localhost` FUNCTION `test_function`()
RETURNS ENUM('unknown', 'not known', 'not_known')
LANGUAGE SQL
DETERMINISTIC
NO SQL
SQL SECURITY DEFINER
COMMENT ''
BEGIN
RETURN 'unknown';
ENDOther notes:
- single or double quotes do not change the behaviour
- whitespace-containing enums/sets in the parameter list seem to be working properly
SHOW CREATE FUNCTION test_functionreturns good SQL, and the function executes properly
Current behavior
The "Option" tab loses all properties defined after the return type (in SQL code), and the return type is incorrect (see screenshot below). The "Routine body" area displays invalid SQL.

The "CREATE code" tab mangles the SQL code after the first whitespace:
CREATE DEFINER=`root`@`localhost` FUNCTION `test_function`()
RETURNS enum('unknown','not
LANGUAGE SQL
NOT DETERMINISTIC
CONTAINS SQL
SQL SECURITY DEFINER
COMMENT ''
known','not_known') CHARSET latin1
NO SQL
DETERMINISTIC
BEGIN
RETURN 'unknown';ENDExpected behavior
Correct values should be displayed in the "Options" tab.
Correct SQL code should be displayed in the "CREATE code" tab.
Possible solution
Return type string literals in ENUM/SET should be treated as any other string literal.
Environment
I believe this issue is environment-agnostic, but have not tested more.
- HeidiSQL version: 10.2.0.5712
- Database system and version: MariaDB 10.4.8
- Operating system: Windows 10 x64
Metadata
Metadata
Assignees
Labels
bugDefective behaviour in HeidiSQLDefective behaviour in HeidiSQLnettype-mysqlMySQL and/or MariaDB specific issueMySQL and/or MariaDB specific issue