[MDEV-27227] mysqltest, Windows - support background execution in 'exec' command Created: 2021-12-11  Updated: 2022-01-18  Resolved: 2022-01-18

Status: Closed
Project: MariaDB Server
Component/s: Platform Windows, Tests
Fix Version/s: 10.8.1

Type: Task Priority: Critical
Reporter: Vladislav Vaintroub Assignee: Vladislav Vaintroub
Resolution: Fixed Votes: 0
Labels: None

Issue Links:
PartOf
is part of MDEV-26713 Windows - improve i18n support Closed

 Description   

If last character in command is ampersand, do not use my_popen/my_pclose
in "exec", instead do CreateProcess() without a window.

The effect of this is background execution of exec command, ampersand is chosen as to emulate to Unix shell behavior.

Background execution had been already used in a test, which so far exclude Windows, see 10.5+ mysql-test/main/shutdown_not_windows.inc

 
exec $MYSQL -e 'select sleep(3600)' >/dev/null 2>&1 &;

There is another special case
To test MDEV-26713, we want to start a server, with Unicode command line, and with characters outside of current ANSI codepage, e.g for the datadir . Normally, one could use MTR's "restart" functionality which would launch process via mysql-test-run.pl, i.e from Perl.
But in this case, perl shows an i18n deficiency - Unicode would get lost/replaced with question marks.
As a workaround for Perl deficiency, "exec $MYSQLD.. &" can be used.


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