Description:
I was working with a stored procedure, and to avoid destroying the original I created a test procedure. This time I DID NOT enter a name for the stored procedure, and forgot to do so after I was finished writing it. I was able to save the procedure, but this kills the MySQL service, and requires it to be restarted to continue. Anytime I try to access the stored procedure the MySQL service crashes. This has crippled my database and access to anyother database on my server. My Visual studio Just intime debugger pops up when I try to access it and displays the following error message: 'An unhandled win32 exception occurred in mysqld-nt.exe [1988].'. Then I stepped into the debugger and received the following error message: 'Unhandled exception at 0x004ee740 in mysqld-nt.exe: 0xC0000005 Access violation reading location 0x00000000.' The mySQL error reads: 'Lost connection to MySQL server during query' Error number 2013.
How to repeat:
How to Repeat
Create a stored procedure with MySQL Administrator.
Do not enter a name for the stored procedure when prompted to
Write a simple stored procedure, mine was took in 3 parms and used an if, ifelse, else to choose between 3 select statements.
Save the stored procedure
Result
Stored Procedure should appear to be added to the database
stored procedures list will not refresh
Can not connect to MySQL database, connection lost, service killed
Can ping server
Restart service
Open re-connect to MySQL Admin
view Stored procedures list
stored procedures list will not refresh
Can not connect to MySQL database, connection lost, service killed
Can ping server
Restart service
Connect to MySQL Query Browser, connect to information_schema database
Execute 'SELECT * FROM information_schema.ROUTINES R;'
Can not connect to MySQL database, connection lost, service killed
Can ping server
Restart service
Connect to MySQL Query Browser, connect to mySQL database
Execute 'SELECT * FROM mysql.proc p;'
Edit the table
Delete the row containing the stored procedure with no name
Apply the changes
Open mySQL adminsitrator
Open the database that contained the problem
View the stored procedures list
Everything is now ok
Suggested fix:
Do not allow stored procedures, functions, triggers to be saved without a name.
Its good I don't have to add a name in that popup that prompts me to because sometimes I copy and paste an old procedure I created