Bug #95825 Function does not exist but it does
Submitted: 15 Jun 12:50 Modified: 21 Jun 13:28
Reporter: Dave Pullin (Basic Quality Contributor) Email Updates:
Status: Need Feedback Impact on me:
None 
Category:MySQL Server Severity:S2 (Serious)
Version:5.7.26 OS:CentOS (.10.0-514.6.2.el7.x86_64)
Assigned to: CPU Architecture:x86

[15 Jun 12:50] Dave Pullin
Description:
I apologize that I can't give you a reproducible test case.

I am running multiple servers in production and this is killing production.

Our implementation is functions and procedures calling functions and procedures, nested deeply.

A procedure will calls a function (that exists). At a rate between approximate one per thousand and one per million,  it fails with "function does not exists".

All test to confirm that the function actually exists are positive immediately after a failure with "function does not exist".

We have programmed tight loops  to retry the same JDBC base call and it found succeed immediately after it failed. 

The problem occurs in batches across many functions and callers and then stops happening after an hour or so, and then might not happen for another day.

The problem occurs on in many different places with different procedures calling different functions.  If we recode the target from being a function to being a semantically equivalent procedure then the problem does not occur.

There are no logs entries, no dumps.
It occurs on multiple instances of the database server (running essentially the same logic).

I appreciate you cant do much with this bug report. BUt if you can tell me what to do to provide you with help I will.

My guess is that this is a memory or pointer management problem deep in MySQL 

How to repeat:

Sorry you can't. 

I have run a tight test case loop that produced the failure, and then did not produce the failure again in more than 25 million retries. (with no code changes)

Suggested fix:
You can't, at least no yet. Give me guidance on what you need to find the bug.
[21 Jun 13:28] Sinisa Milivojevic
Hi,

Thank you for your bug report.

You are already aware that we need a repeatable test case.

However, I will try to provide you a way to try to make it reproducible ... It is possible that you have a problem in your Java application, or that there is a bug in the JDBC API that you are using.

Hence, please try to make SQL scripts with all (or most) of the stored routines that are on the top on the calling stack. That might solve your problem or provide a test case.