Details

    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 ~20 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

          Activity

            amolholani Amol Holani added a comment -

            Hi,
            I'm amol holani, computer science student from College of Engineering, Pune(COEP, India). I would love to contribute to this project. Can you explain more about ad hoc parser. Also, How can I get some documentation about mysqltest?

            Thank you.

            amolholani Amol Holani added a comment - Hi, I'm amol holani, computer science student from College of Engineering, Pune(COEP, India). I would love to contribute to this project. Can you explain more about ad hoc parser. Also, How can I get some documentation about mysqltest? Thank you.

            yes, but, please, ask this question on maria-developers@ mailing list

            serg Sergei Golubchik added a comment - yes, but, please, ask this question on maria-developers@ mailing list
            amolholani Amol Holani added a comment -

            sure, I will ask on the mailing list.

            amolholani Amol Holani added a comment - sure, I will ask on the mailing list.
            amolholani Amol Holani added a comment -

            Hi Sergei,
            I have submitted proposal for GSoC based on this project. Please review it.

            amolholani Amol Holani added a comment - Hi Sergei, I have submitted proposal for GSoC based on this project. Please review it.

            Break has now been implemented in 11.3.

            TheLinuxJedi Andrew Hutchings (Inactive) added a comment - Break has now been implemented in 11.3.

            Reset contribution label as there are no active pull requests.

            svoj Sergey Vojtovich added a comment - Reset contribution label as there are no active pull requests.

            People

              serg Sergei Golubchik
              serg Sergei Golubchik
              Votes:
              1 Vote for this issue
              Watchers:
              7 Start watching this issue

              Dates

                Created:
                Updated:

                Git Integration

                  Error rendering 'com.xiplink.jira.git.jira_git_plugin:git-issue-webpanel'. Please contact your Jira administrators.