[MDEV-23783] Get rid of FreeConsole() call on mariadbd startup Created: 2020-09-21  Updated: 2020-10-01  Resolved: 2020-09-21

Status: Closed
Project: MariaDB Server
Component/s: Platform Windows, Server
Affects Version/s: None
Fix Version/s: 10.6.0

Type: Bug Priority: Major
Reporter: Vladislav Vaintroub Assignee: Vladislav Vaintroub
Resolution: Fixed Votes: 0
Labels: None


 Description   

This function has some properties that are not very nice.

  • Sometimes, it throws INVALID_HANDLE exception, particularly, when it mariadbd runs under debugger.
  • Sometimes, it closes error log in the middle, particularly when debugging service.
  • It does not close console, if the console was not created by mariadbd itself
  • Ctrl-C stops working, and mariadbd can only be killed "hard" with taskkill /force

The only functionality it provides is remove the window when a GUI application launches mysqld in a user session, but this does not seem to have huge importance. That very same functionality is available with CreateProcess() with dwCreationFlags = CREATE_NO_WINDOW Also available on many scripting languages on Windows, and as a shortcut property for the Windows shortcuts.

Also note, that MySQL 8.0 got rid of FreeConsole() as well.


Generated at Thu Feb 08 09:25:01 UTC 2024 using Jira 8.20.16#820016-sha1:9d11dbea5f4be3d4cc21f03a88dd11d8c8687422.