Documentation Home
MySQL Internals Manual
Download this Manual
EPUB - 1.2Mb


26.3.4 Use of OS-Specific Commands

The exec and system commands enable tests to execute external commands. However, many of such commands are available only on certain platforms. (For example, rm is Unix-specific and not available on Windows.) Please avoid these commands if possible. They harm the portability and stability of tests.

Have a look at the mysqltest manual and the t/mysqltest.test test file. There are now several mysqltest built-in commands such as

"--write_file", "--cat_file", "--remove_file", ... 

which are reliable on all operating systems. Sometimes OS commands could be also replaced by SQL statement sequences writing to and reading from files and some SQL string functions.


User Comments
Sign Up Login You must be logged in to post a comment.