Details
-
Task
-
Status: Open (View Workflow)
-
Major
-
Resolution: Unresolved
-
None
Description
mysqltest has a lot of historical problems:
- ad hoc parser, weird limitations
- commands added as needed with no view over the total language structure
- historical code issues (e.g. casts that become unnecessary ~10 years ago)
etc
A lot can be done to improve it.
Ideas
to simplify writing tests
- control structures, else in if, break and continue in while, for (or foreach) loop
- proper expression support in let, if, etc
- letenv command to set environment variables instead of having let do it.
- ${var} and ${${var}} variable expansion
- rich enough expressions to make resorting to sql unnecessary in most cases
- in particular, see rpl_init.inc
- remove unused and redundant commands (e.g. system vs exec, query_vertical vs vertical_results ONCE)
- remove complex commands that do many sql statements under the hood, if they can be scripted, e.g. sync_slave_with_master
- scoped variables
- parameters for the source command
- remove dead code
- returning values from perl command (in some easier way than writing a new file and sourcing it)
- e.g. stderr is stored in $perl ?
- running many test files on one server connection. They are supposed to be independent, so for performance reasons we can avoid restarting mysqltest for them
to simplify debugging
- make `echo` automatically print `#` at the start of every line (optionally, don't do it if it's explicitly specified — for backward compatibility)
- make most commands print itself to the log.
- os and file operations, like exec/remove_file, etc, should strip MYSQL_VAR_DIR from paths.
remove over-verbose treatment of rpl test failures(already done in 64dd3969481)
Attachments
Issue Links
- duplicates
-
MDEV-25209 Improve mysqltest language
- Closed
- relates to
-
MDEV-12138 mysqltest: source inside a loop
- Open
-
MDEV-12139 mysqltest: errors in source in a loop
- Open
-
MDEV-21271 Switching off/on separate tests in mysql-test-run suite
- Open
-
MDEV-28914 MTR commands do not support "assert", "force_cpdir" and "copy_files_wildcard"
- Open