Bug #31004 mysqltest needs a --mkdir command
Submitted: 13 Sep 2007 20:39 Modified: 12 Feb 21:34
Reporter: Marc Alff
Status: Closed
Category:Server: Tests Severity:S4 (Feature request)
Version:5.0 OS:Any
Assigned to: Magnus Svensson Target Version:5.0+
Triage: D3 (Medium)

[13 Sep 2007 20:39] Marc Alff
Description:

mysqltest already provide
--copy_file
--append_file
and similar commands

Some tests scripts already use:
--system mkdir
--system rmdir
but these tests do not run on Windows platform.

Please provide the following commands in mysqltest:
--mkdir
--rmdir

How to repeat:

Use
--system mkdir
in a test that runs on windows,
see that it fails.

Suggested fix:

Implement the new commands listed
[16 Sep 2007 7:23] Valeriy Kravchuk
Thank you for a reasonable feature request.
[1 Nov 2007 15:42] 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/36883

ChangeSet@1.2541, 2007-11-01 15:42:19+01:00, msvensson@pilot.mysql.com +4 -0
  Bug#31004 mysqltest needs a --mkdir command
   - Add new mysqltest command "mkdir" and "rmdir"
[1 Nov 2007 15:42] Magnus Svensson
In 5.1 there is a "hack" in upgrade.test that need to be removed.
[1 Nov 2007 17:10] 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/36899

ChangeSet@1.2601, 2007-11-01 17:09:49+01:00, msvensson@pilot.mysql.com +1 -0
  Bug#31004 mysqltest needs a --mkdir command
[11 Feb 17:21] Bugs System
Pushed into 5.0.58
[11 Feb 17:24] Bugs System
Pushed into 5.1.24-rc
[11 Feb 17:26] Bugs System
Pushed into 6.0.5-alpha
[11 Feb 19:00] Paul DuBois
What are the semantics for these commands? Success if they succeed, I suppose, but what
if:

- The directory already exists for mkdir? Is there a special error code?
- The directory is not empty for rmdir? Is there a special error code?
- The directory does not exist for rmdir? Is there a special error code? (It's reasonable
to suppose that you'd want to ignore an error for rmdir if the error is that the directory
doesn't exist.)
[12 Feb 11:31] Magnus Svensson
0 in case of success and 1 in case of any error, the same as for other file system
commands.
[12 Feb 21:34] Paul DuBois
Noted in 5.0.58, 5.1.24, 6.0.5 changelogs.

mysqltest now has mkdir and rmdir commands for creating and removing
directories.
[6 Mar 10:48] Jon Stephens
Also documented fix for 5.1.23-ndb-6.2.14.
[30 Mar 21:48] Jon Stephens
Also documented for 5.1.23-ndb-6.3.11.