Creating Stored Procedure/Funtion with Double Parameter

[expired user #8405]'s profile image [expired user #8405] posted 9 years ago in General Permalink
Hello,

there is a problem with a stored procedure/function if the paramter is from type double and both values are specified.

I can create the following example with the ide:

--- snip ---
CREATE DEFINER=`root`@`localhost` PROCEDURE `test`(OUT `test` DOUBLE (10,6))
BEGIN
SET test = 0.5;
END
--- snip ---

But when i recall this procedure, the parameter are:

--- snip ---
name type context
test DOUBLE (10 out
--- snip ---

and the create code is:

--- snip ---
CREATE DEFINER=`root`@`localhost` PROCEDURE `test`(OUT `test` DOUBLE (10)
LANGUAGE SQL
NOT DETERMINISTIC
CONTAINS SQL
SQL SECURITY DEFINER
COMMENT ''
BEGIN
SET test = 0.5;
END
--- snip ---

So if i apply any changes an error 1064 (You have an error in your SQL syntax) occured.

It seems the parameter parser can't handling the colon correctly.

I use the HeidiSQL build 4961 with a german Windows, so the national settings for the decimalpoint is a colon! I don't have tried to change these settings.

Martin
[expired user #8405]'s profile image [expired user #8405] posted 9 years ago Permalink
Hello,

this problem only occoured if there is a space between the 'DOUBLE' and the '(10,6)'. Without any spaces all works okay. So the parser must ignore or delete spaces!

Martin

Please login to leave a reply, or register at first.