Bug #70159 Debug Routine throw data too long for column 'pvarname' at row 1 error
Submitted: 27 Aug 2013 7:59 Modified: 4 Mar 2014 16:11
Reporter: Chit Siang Chew Email Updates:
Status: Closed Impact on me:
None 
Category:Connector / NET Severity:S1 (Critical)
Version:6.6.5 OS:Windows
Assigned to: Fernando Gonzalez.Sanchez CPU Architecture:Any

[27 Aug 2013 7:59] Chit Siang Chew
Description:
If I try to debug a stored procedure via VisualStudio following the guide at http://dev.mysql.com/doc/refman/5.5/en/connector-net-visual-studio-debugger.html I get the Debugger Error message "data too long for column 'pvarname' at row 1

How to repeat:
Debug a complex stored procedure will get the same error

Suggested fix:
Increase the column length for tables inside 'serversidedebugger' database
[28 Aug 2013 22:54] Fernando Gonzalez.Sanchez
Can you provide a sample stored routine that reproduces the error?
[29 Sep 2013 1:00] Bugs System
No feedback was provided for this bug for over a month, so it is
being suspended automatically. If you are able to provide the
information that was originally requested, please do so and change
the status of the bug back to "Open".
[30 Sep 2013 17:30] Fernando Gonzalez.Sanchez
Verified, happens when debugging a routine like this:

CREATE DEFINER=`root`@`localhost` PROCEDURE `A_big_name_for_stored_procedure_if_you_ask_me_must_smaller_end1`()
begin    
    declare n_012345678901234567890123456789012345678901234567890123456789001234567890123456789012345678901234567890 int;
    set n_012345678901234567890123456789012345678901234567890123456789001234567890123456789012345678901234567890 = 1;
    while n_012345678901234567890123456789012345678901234567890123456789001234567890123456789012345678901234567890 < 5 do
    begin
    
        set n_012345678901234567890123456789012345678901234567890123456789001234567890123456789012345678901234567890 = 
          n_012345678901234567890123456789012345678901234567890123456789001234567890123456789012345678901234567890 + 1;
    
    end;
    end while;

end;

Debugger is not supporting on identifiers the same length than MySql Server.
[1 Oct 2013 7:35] Chit Siang Chew
But in fact I actually can overcome this by edit the Resources inside the DLLs to make the columns of tables in database created to support more characters for the name.

I modified every column with varchar data type to 255 length. It works to my case :)
[15 Oct 2013 17:19] Fernando Gonzalez.Sanchez
Posted by developer:
 
This fix is targetted for Connector/NET 6.6.7 & MySql For Visual Studio 1.0.3 & 1.1.1.

With the fix, there is no longer an error when debugging stored routines with big names for local variables (and the routine can be debugged correctly).
[4 Mar 2014 16:11] Daniel So
Added the following entry into the Connector/Net 6.6.7, and MySQL for Visual Studio 1.0.3, 1.1.4 changelogs:

'When debugging a stored routine in Visual Studio with the debugger, long identifiers caused the error "data too long for column 'pvarname'" to be thrown. That was because the SQL script of the debugger did not support the same lengths for identifier names as the MySQL server does. This fix matches the debugger with the MySQL server on the maximum lengths supported for identifier names.'