Bug #55170 Visual Studio Plug in fails to alter routines using MySQL Server 5.0.45
Submitted: 12 Jul 2010 1:16 Modified: 29 Jul 2010 15:20
Reporter: Daniel Ulfe Email Updates:
Status: Closed Impact on me:
None 
Category:Connector / NET Severity:S3 (Non-critical)
Version:6.3.2 OS:Windows (W7 x64 - VS 2010 Pro)
Assigned to: Reggie Burnett CPU Architecture:Any

[12 Jul 2010 1:16] Daniel Ulfe
Description:
Visual Studio Plug in cannot edit Store Procedures using MySQL 5.0.45 (but it works on 5.1)

"Alter Routine" shows the error "Unable to load object with error: Object reference not set to an instance of an object" and then open the "edit window" with only "ed" in it.

I have also tried changing the connection string to "Use Procedure Bodies" to FALSE.

FYI.. the Entity Framework Generator cannot load stored procedures (Unable to generate the model because of the following exception: 'Object must implement IConvertible.)... that could also be caused by the same problem.

How to repeat:
Use MySQL 5.0.45 with a user with FULL privileges to a DB.

- Open Visual Studio 2010
- Create a new "Data Connection" using the "Server Explorer" window.
- Create an Stored Procedure
*** It will save the SP... but it will show an error.
- Refresh the "Stored Procedures" list
- Right-click on the newly created SP and select "Alter Routine".

Suggested fix:
N/A
[27 Jul 2010 19:33] Bugs System
A patch for this bug has been committed. After review, it may
be pushed to the relevant source trees for release in the next
version. You can access the patch from:

  http://lists.mysql.com/commits/114465

826 Reggie Burnett	2010-07-27
      - added code to default 'respect binary flags' in the visual studio wizard so that older
        versions of MySQL will work when creating/editing stored procedures (bug #55170)
[27 Jul 2010 19:44] Bugs System
A patch for this bug has been committed. After review, it may
be pushed to the relevant source trees for release in the next
version. You can access the patch from:

  http://lists.mysql.com/commits/114467

827 Reggie Burnett	2010-07-27
      thought of a better way to fix bug #55170 right after the last push.  Here is the better version.
[27 Jul 2010 19:49] Reggie Burnett
Fixed in 6.0.6, 6.1.5, 6.2.4, 6.3.4+
[29 Jul 2010 15:20] Tony Bedford
An entry has been added to the 6.0.6, 6.1.5, 6.2.4, 6.3.4 changelogs:

If using MySQL Server 5.0.x it was not possible to alter stored routines in Visual Studio. If the stored routine was clicked, and the context sensitive menu option, Alter Routine, selected, the following error was generated:

Unable to load object with error: Object reference not
set to an instance of an object