Details
-
Bug
-
Status: Confirmed (View Workflow)
-
Major
-
Resolution: Unresolved
-
10.2.10, 10.2(EOL), 10.3(EOL), 10.4(EOL), 10.5, 10.6, 10.9(EOL), 10.10(EOL), 10.11, 11.0(EOL), 11.1(EOL), 11.2(EOL)
-
None
-
Ubuntu 14.04
Description
Test case:
DROP PROCEDURE IF EXISTS test;
|
|
DELIMITER ;;
|
|
CREATE PROCEDURE test()
|
BEGIN
|
DECLARE i INT UNSIGNED DEFAULT 10;
|
DECLARE d DECIMAL(2,1) UNSIGNED DEFAULT 1.5;
|
|
SELECT JSON_OBJECT('int_variable', i, 'int_literal', 20, 'decimal_variable', d, 'decimal_literal', 2.6 );
|
|
END;;
|
|
DELIMITER ;
|
CALL test;
|
Returns:
+---------------------------------------------------------------------------------------------------+
|
| JSON_OBJECT('int_variable', i, 'int_literal', 20, 'decimal_variable', d, 'decimal_literal', 2.6 ) |
|
+---------------------------------------------------------------------------------------------------+
|
| {"int_variable": "10", "int_literal": 20, "decimal_variable": "1.5", "decimal_literal": 2.6} |
|
+---------------------------------------------------------------------------------------------------+
|