[7.4/8.0.40] Error executing function with JSON return type!
Posted: Wed 18 Jul 2018 14:49
I noticed an error that occurs only on the following specific conditions.
When a function is created and set to return a JSON data type (which is not available in the Result type dropdown - JSON must be manually typed in), the function is allowed to save and functions 100% properly when called via valid SQL statements.
The error occurs when executing the function (for testing/debugging) from within dbForge. The error is 'Cannot execute procedure because of an internal server error'. To be able to successfully test the function without getting this error, the return type must be changed to TEXT. This works fine for debugging but DOES NOT return expected results when the function is called via SQL. It must be saved again with the JSON data type and works fine again as long as it is NOT executed via the Execute button.
Can this issue be corrected so that we don't have to switch back and forth while debugging/testing a function? I think the same issue occurs when writing a stored procedure that returns JSON data type. Thank you.
When a function is created and set to return a JSON data type (which is not available in the Result type dropdown - JSON must be manually typed in), the function is allowed to save and functions 100% properly when called via valid SQL statements.
The error occurs when executing the function (for testing/debugging) from within dbForge. The error is 'Cannot execute procedure because of an internal server error'. To be able to successfully test the function without getting this error, the return type must be changed to TEXT. This works fine for debugging but DOES NOT return expected results when the function is called via SQL. It must be saved again with the JSON data type and works fine again as long as it is NOT executed via the Execute button.
Can this issue be corrected so that we don't have to switch back and forth while debugging/testing a function? I think the same issue occurs when writing a stored procedure that returns JSON data type. Thank you.