Bug #31741 mysqltest - deprecate "system" command
Submitted: 22 Oct 2007 8:53 Modified: 21 Mar 2011 19:00
Reporter: Magnus Blåudd Email Updates:
Status: Closed Impact on me:
None 
Category:Tools: MTR / mysql-test-run Severity:S3 (Non-critical)
Version:mysql-5.0 OS:Any
Assigned to: Magnus Blåudd CPU Architecture:Any

[22 Oct 2007 8:53] Magnus Blåudd
Description:
The "system" command used in mysqltest is useful only in a non portable way(ex "system rm <filename>", "system mkdir"), it's an old  legacy and should be replaced by the new portable commands "remove_file", "file_exists" etc. that now exists in mysqltest. Having it around as a command in mysqltest will just fool developers to use it, which will break Windows testing.

How to repeat:
system rm <filename>

Suggested fix:
Deprecate the command so if it's used in a .test file, the error message "'system' command is deprecated - see the manual for a list of portable commands to use"
[22 Oct 2007 8:55] Bugs System
A patch for this bug has been committed. After review, it may
be pushed to the relevant source trees for release in the next
version. You can access the patch from:

  http://lists.mysql.com/commits/36010

ChangeSet@1.2523, 2007-10-22 10:56:26+02:00, msvensson@pilot.mysql.com +10 -0
  Bug#31741 mysqltest - deprecate "system" command
[22 Oct 2007 18:58] Guilhem Bichot
Another reason, specific to "system rm": if the file has only read permissions
(like rpl_mixed.dat in suite/rpl/include/rpl_mixed_dml.inc can be),
the "rm" goes into interactive mode (warning you that it's write-protected,
yes/no?) and the test hangs and times out
[1 Nov 2007 9:32] Bugs System
A patch for this bug has been committed. After review, it may
be pushed to the relevant source trees for release in the next
version. You can access the patch from:

  http://lists.mysql.com/commits/36830

ChangeSet@1.2540, 2007-11-01 10:31:44+01:00, msvensson@pilot.mysql.com +9 -0
  Bug#31741 mysqltest - deprecate "system" command
[1 Nov 2007 16:14] Bugs System
A patch for this bug has been committed. After review, it may
be pushed to the relevant source trees for release in the next
version. You can access the patch from:

  http://lists.mysql.com/commits/36900

ChangeSet@1.2601, 2007-11-01 17:14:15+01:00, msvensson@pilot.mysql.com +8 -0
  Bug#31741 mysqltest - deprecate "system" command
   - Additional changes for 5.1
[18 Dec 2007 8:32] Guilhem Bichot
Magnus: http://lists.mysql.com/commits/36900 is ok to push, provided it is not a problem to remove the killall call.
[18 Dec 2008 13:39] Guilhem Bichot
Hi Magnus. I still see some "system" commands in mysql-test/t in 5.1 and 6.0. Do you know what happened? Did something prevent your patch from being pushed?
[18 Dec 2008 14:46] Magnus Blåudd
Still not pushed, it's so many changes to mtr and mysqltest anyway so  decided to hold it.
[21 Mar 2011 19:00] Paul DuBois
Change to test suite. No changelog entry needed.

CHANGESET - http://lists.mysql.com/commits/132547