dbForge compilation issue with enum?
Posted: Mon 07 Oct 2013 00:43
I just started using the product, love it.
dbForge Professional Version: 6.0.493 running against mySql
I ran in to a curious issue with enum and compilation for debug (Ctrl-Alt-F7)
which generates a error, however the stored proc compiles (Ctrl-F7) fine.
it also runs fine. the error generated seems to be related to enum fields.
below is a minimum sniplet which you can run to reproduce
USE database1;
CREATE TABLE database1.table1 (
name varchar(50) DEFAULT NULL,
flag enum ('T', 'F') NOT NULL
)
ENGINE = INNODB
-----
CREATE PROCEDURE database1.testCompile()
BEGIN
DECLARE __name varchar(255);
DECLARE __flag enum('T','F') DEFAULT 'F';
DECLARE __x int;
DECLARE CONTINUE HANDLER FOR SQLSTATE '22007' SET __x = 0;
SELECT
table1.name,
table1.flag
INTO
__name, __flag
FROM
table1 ;
END
-
------ Compilation Procedure 'testCompile' started ------
Procedure:database1.testCompile(localhost): Error (1,1): You have an error ... for the right syntax to use near 'T','F')', cr_stack_depth)/*[cr_debug.2]*/;
CALL cr_debug.UPDATE_WATCH3('__x', _' at line 13
------ Compilation done ------
I must be doing something painfully obviously wrong so feel free to point out my inadequacies ?
thanks
dbForge Professional Version: 6.0.493 running against mySql
I ran in to a curious issue with enum and compilation for debug (Ctrl-Alt-F7)
which generates a error, however the stored proc compiles (Ctrl-F7) fine.
it also runs fine. the error generated seems to be related to enum fields.
below is a minimum sniplet which you can run to reproduce
USE database1;
CREATE TABLE database1.table1 (
name varchar(50) DEFAULT NULL,
flag enum ('T', 'F') NOT NULL
)
ENGINE = INNODB
-----
CREATE PROCEDURE database1.testCompile()
BEGIN
DECLARE __name varchar(255);
DECLARE __flag enum('T','F') DEFAULT 'F';
DECLARE __x int;
DECLARE CONTINUE HANDLER FOR SQLSTATE '22007' SET __x = 0;
SELECT
table1.name,
table1.flag
INTO
__name, __flag
FROM
table1 ;
END
-
------ Compilation Procedure 'testCompile' started ------
Procedure:database1.testCompile(localhost): Error (1,1): You have an error ... for the right syntax to use near 'T','F')', cr_stack_depth)/*[cr_debug.2]*/;
CALL cr_debug.UPDATE_WATCH3('__x', _' at line 13
------ Compilation done ------
I must be doing something painfully obviously wrong so feel free to point out my inadequacies ?
thanks