Bug when using CAST or CONVERT in stored procedure
Posted: Mon 07 Dec 2015 12:42
I am writing a stored procedure that needs to select columns and cast them using a reasonably complicated cast.
dbForge complains that the type specifier is unexpected and refuses to compile the procedure.
If I then copy the body of the procedure into HeidiSQL (I am running against MariaDB 10.0.2) it accepts the code and the procedure functions as expected. But in dbForge I cannot save the procedure.
Simplified extract of procedure:
PROCEDURE proc_prf()
BEGIN
SELECT
ltim,
CONVERT(((ltim-186857010)/4188), INT) as sample_bin
where <...>
END
dbForge complains about the ", INT" part of the CONVERT function parameters and refuses to update the procedure.
dbForge complains that the type specifier is unexpected and refuses to compile the procedure.
If I then copy the body of the procedure into HeidiSQL (I am running against MariaDB 10.0.2) it accepts the code and the procedure functions as expected. But in dbForge I cannot save the procedure.
Simplified extract of procedure:
PROCEDURE proc_prf()
BEGIN
SELECT
ltim,
CONVERT(((ltim-186857010)/4188), INT) as sample_bin
where <...>
END
dbForge complains about the ", INT" part of the CONVERT function parameters and refuses to update the procedure.