Bug #99610 Stored Routines Corrupted
Submitted: 18 May 2020 4:18 Modified: 21 Jun 2020 6:41
Reporter: Deenesh dawodharry Email Updates:
Status: No Feedback Impact on me:
None 
Category:MySQL Server: Stored Routines Severity:S3 (Non-critical)
Version:5.6 OS:CentOS
Assigned to: MySQL Verification Team CPU Architecture:x86
Tags: Stored Procedures Corrupt

[18 May 2020 4:18] Deenesh dawodharry
Description:
A database with stored procedures running properly for several months on an IBM Cloud. After some time stored procedure gets corrupt. When calling the stored procedure, no error is obtained but the procedure does not run fully and logically generates an error.

How to repeat:
Restore the image of the IBM Cloud, Run the stored Procedure.

Suggested fix:
Re run the stored procedure script without any changes on the database.
[20 May 2020 5:36] MySQL Verification Team
Hi,

I'm not sure what can we do about this? The SP gets corrupted just like anything in the data directory can get corrupted (namely data) usually due to hardware error. You have it on IBM cloud so probably something there happened (memory corruption, io corruption..). We cannot reproduce this. You maybe have already corrupted image but that does not help. You could report the problem to IBM that your image got corrupted but that has nothing to do with MySQL.

What is your expectation here, what can we do to help?

Thanks
Bogdan
[21 May 2020 5:55] Deenesh dawodharry
Hello Bogdan,

Is the SP getting corrupted something which you have seen on other platforms because the SP is not inaccessible, it responds when being called. For some reason it does not execute the whole stored proc before returning a value. 

I would assume that if there is data corruption at VM level, calling the stored procedure will generate an error and not partially run the stored procedure and return garbage value.

Regards
Deenesh
[21 May 2020 6:41] MySQL Verification Team
Hi,

> Is the SP getting corrupted something which you have seen on other platforms 

I'v seen SP getting corrupted on a dead hard drive, dead hard drive cache controller, dead ram... 

> because the SP is not inaccessible, it responds when being called. For some reason it does not execute the whole stored proc before returning a value. 

when you retrieve the SP do you get the whole SP or only a part?

> I would assume that if there is data corruption at VM level, calling the stored procedure will generate an error and not partially run the stored procedure and return garbage value.

It depends on the corruption. If there is garbage in the SP it would but if the SP is truncated... 

The main question is what you get when you try to retrieve SP source.

That will explain what happened. Now, I still don't see how that will help us "solve the future issues" as I doubt there's a reproducible way to corrupt a SP

all best
Bogdan
[22 Jun 2020 1:00] Bugs System
No feedback was provided for this bug for over a month, so it is
being suspended automatically. If you are able to provide the
information that was originally requested, please do so and change
the status of the bug back to "Open".