Bug #23803 upgrade without restart
Submitted: 31 Oct 2006 13:11 Modified: 31 Oct 2006 15:05
Reporter: Amr Hamdy Email Updates:
Status: Won't fix Impact on me:
None 
Category:MySQL Server Severity:S4 (Feature request)
Version: OS:
Assigned to: CPU Architecture:Any

[31 Oct 2006 13:11] Amr Hamdy
Description:
Hello great mysql people :),
As a system administrator I've to upgrade mysql server to the latest version from time to time when new releases or bug fixes are there ..
I usually use the "rpm" packages .. when I upgrade, the server stops then restarts ... I hope that I can be able to upgrade mysql server without any need to restart the server ... sometime these very few seconds are very valuable and I don't want things to stop ... while at the same time maybe I cannot set high availability solution for some reason ..
so I'm just imagining that after upgrading I can execute the new server without killing or stopping the previous one and the new process can recognize the situation and let the old process finish what it was doing smoothly while the new server is handling new queries .. then it kills the old server after it finishes what it was doing ... 
binding to port and socket the old server was using should be transparent and managed smoothly  ... 
I've no idea how can this be made exactly but I'm just sharing thoughts, maybe you've a solution .. 

How to repeat:
try to upgrade you mysql server by rpm for example ..
You server will stop for moments until the installation is over then it starts again

Suggested fix:
To be able to upgrade the mysql server without restart ..
[31 Oct 2006 13:39] Valeriy Kravchuk
Thank you for the feature request. I am not sure it is possible to implement it soon, though. Although it is theoretically possible, according to man execve, to keep file handles open (for a new image with the SAME PID!), what shell we do with in-memory information of old server? Here is what you suggest:

"I can execute the new server without killing or stopping the previous one and the new process can recognize the situation and let the old process finish what it was doing smoothly while the new server is handling new queries .. then it kills the old server after it finishes what it was doing ..."

That is impossible (you can not bind 2 processes to the same socket!). And if you let the old process finish all it was doing, how is it different from restart?
[31 Oct 2006 15:06] Amr Hamdy
Thanks lot :)
 ... I know that it's not possible for two processes to bind to the same socket but I was just sharing thoughts .. maybe there can be some work around that can solve this ... 
Any way I hope that you can implement that in the future .. maybe in mysql 6 :)
Thanks again with my best greetings and wishes to you and other MySQL staff :)