views:

31

answers:

2

I think that MySQL or ASP.NET is caching my queries.

I edited my MySQL sproc to remove some parameters but it keeps saying that those parameters are missing. How do I fix this or make it work again?

Edit:

I'm experiencing this problem : http://stackoverflow.com/questions/286585/mysql-caching

Except that I don't have permissions to execute RESET QUERY CACHE What else can I do?

A: 

That error means that the parameter is being accessed in the parameter collection on the asp.net code-side. Have you modified the code-behind or class or whatever to not try to set those parameters?

Robert C. Barth
The MySQL sproc is nonexistent (deleted it to see if it was caching) , and all references to those deleted parameters commented out in the ASP.NET code. And just a cool FYI - that error means a lot of things. There is also a known MySQL bug that gives that very same error message (documented here, http://dev.mysql.com/doc/refman/5.1/en/connector-net-news-5-2-8.html search Parameter 'foo' not found in the collection ). This same error message can also occur if variables differ in casing or even order (!) between ASP.NET calling code and MySQL procedure.
rlb.usa
A: 

What you need to know about MySQL Stored Procedure Caching

Every single connection to the MySQL server maintains it’s own stored procedure cache.
from The Art of SQL

What that means is that restarting your browser, computer, modifying the procedure further, etc, etc, all will not work.

You have a few options:

  • restart the MySQL database server or the MySQL database server computer
  • RESET QUERY CACHE in MySQL if you have the priveladges
  • force your ASP.NET app to recompile by re-uploading the web.config, global.asax, or entire application

The third is the easiest and best bet.

rlb.usa