Stored procedure failed to load
Posted by: Mark Sheeter
Date: September 13, 2010 09:46AM

I am using version MySQL version 5.0.22 accessing the database using the C API on a Linux server.

After executing the stored procedure changeRecordStatus no less than 60,000 times, I started to get the error message: Failed to load routine cardinal.changeRecordStatus. The table mysql.proc is missing, corrupt, or contains bad data (internal code -6). Other stored procedures in this database were executing ok.
I then began to receive the error messages:
Lost connection to MySQL server during query
- and -
Unable to connect to database: Can't connect to local MySQL server through socket '/var/lib/mysql/mysql.sock' (111)

As a partial fix to the problem, I did a "service mysqld restart" and it's been running ok ever since (7 days, executing this stored procedure (and a host of others) a little over 1,000 times a day).

I checked all instances where I connect to the database to ensure I'm closing the connection (mysql_close()) to make sure the problem is not in my code. That all checks out.

I did notice a bug where MySQL will report the proc table to be 'missing, corrupt, or contains bad data', however, I don't believe this bug is the problem since the stored procedure was working prior to giving me the error messages.

Memory leak? This MySQL server had been running for over a year.

Options: ReplyQuote


Subject
Views
Written By
Posted
Stored procedure failed to load
1951
September 13, 2010 09:46AM


Sorry, you can't reply to this topic. It has been closed.

Content reproduced on this site is the property of the respective copyright holders. It is not reviewed in advance by Oracle and does not necessarily represent the opinion of Oracle or any other party.