error with debugging BLOB variables

Discussion of open issues, suggestions and bugs regarding database management and administration tools for MySQL
Post Reply
SeM
Posts: 2
Joined: Thu 06 Sep 2007 12:46

error with debugging BLOB variables

Post by SeM » Thu 06 Sep 2007 14:39

I have stored procedure with variable contaiting BLOB with size about 1MB.
When debugging I get error in "update_watch" procedure, that uses varchar(2000) input parameter. Is it possible to use and debug variables with size >2000 bytes?

Duke
Devart Team
Posts: 476
Joined: Fri 29 Oct 2004 09:25

Post by Duke » Fri 07 Sep 2007 11:59

Indeed, we limited the watch size to 2000 characters for performance gain. But described problem should not appear. Debugger must show truncated value.

Could you perform some tests for us?

Please create the sample stored procedure written below, and execute it in the application. You must see the error message saying:

"Failed to execute test.sp
Data too long for column 'a' at row 1"

Then compile stored procedure without debug information. Execute it once again. Do you see the error message box?

Also we need 'sql_mode' variable value from you. You can get it by executing following statement.
SELECT @@sql_mode statement

CREATE PROCEDURE test.sp()
BEGIN
declare a varchar (2) default 'qwerty';
END

SeM
Posts: 2
Joined: Thu 06 Sep 2007 12:46

Post by SeM » Sun 09 Sep 2007 23:35

In example procedure I get error anyway with dubug info and without.

My stored procedure work fine when compiled without debugging info, but with debugging i get the same error like in this example procedure:
"Data too long for column 'in_watch_value' at row 62"
When I debug this procedure error appears on query like this:
"select blob1,blob2 into varBlob1,varBlob2 from table1 where id=varID;"
where fields and variables type is longblob.

sql_mode : STRICT_TRANS_TABLES,NO_AUTO_CREATE_USER,NO_ENGINE_SUBSTITUTION

Elias
Devart Team
Posts: 73
Joined: Tue 29 May 2007 14:02

Post by Elias » Tue 11 Sep 2007 11:42

We cannot reproduce the problem using our MySql servers. Please tell us the version of your server. Also execute the example written below. Does the error happen again?

SET SESSION sql_mode = 'NO_AUTO_CREATE_USER,NO_ENGINE_SUBSTITUTION';

DROP PROCEDURE IF EXISTS test.sp;

CREATE PROCEDURE test.sp()
BEGIN
DECLARE a VARCHAR (2) DEFAULT 'qwerty';
END;

SET SESSION sql_mode = 'STRICT_TRANS_TABLES,NO_AUTO_CREATE_USER,NO_ENGINE_SUBSTITUTION';

CALL test.sp();

Post Reply