[MDEV-20452] DO SLEEP() incorrect evaluation when running procedure for long time Created: 2019-08-30  Updated: 2020-06-19

Status: Open
Project: MariaDB Server
Component/s: Stored routines
Affects Version/s: 10.1
Fix Version/s: None

Type: Bug Priority: Critical
Reporter: Emiliano Paterlini Assignee: Unassigned
Resolution: Unresolved Votes: 0
Labels: need_verification
Environment:

Linux


Attachments: File test.sql     File test_2.sql    

 Description   

When running long stored procedures with lots of DO SLEEP() (with variable argument), randomly the evaluation of the argument produces incorrect results, effectively returning from the SLEEP function much beforehand the intented time.



 Comments   
Comment by Alice Sherepa [ 2019-09-02 ]

Could you please add the test case to demonstrate the problem?

Comment by Emiliano Paterlini [ 2019-09-22 ]

Hello Alice,
I attached two SQL files to this bug.
The files represents two databases that I use in my system.
You can import both of them in your MariaDB server to test.
One database will be called "solaris_1_control" and the other "solaris_server"
In "solaris_1_control" there is a stored procedure called "logic_procedure_1",
it is very complex but basically do some sleeps and some updates on "solaris_1_control".
After some hours of running (not always) the SLEEP functions inside the procedure starts to return
much beforehand, approximately the wait time lasts 5 seconds (instead of some hours...).

Please let me know, I think that maybe this can be a bug with the interpretation of the argument or
with threads interruption...scratching my head

Generated at Thu Feb 08 08:59:35 UTC 2024 using Jira 8.20.16#820016-sha1:9d11dbea5f4be3d4cc21f03a88dd11d8c8687422.