Uploaded image for project: 'MariaDB Server'
  1. MariaDB Server
  2. MDEV-16355

Add option for mysqldump to read data as of specific timestamp from system-versioned tables

Details

    Description

      It would be great to have an option for mysqldump to read data as of specific timestamp from system-versioned tables. One should just use:

      SELECT * FROM <t> FOR SYSTEM_TIME AS OF TIMESTAMP '...';
      

      Instead of simple SELECT for such tables if the option is provided.

      I think it makes sense to implement this separately from MDEV-16029

      Attachments

        Issue Links

          Activity

            Roel Roel Van de Paar added a comment - - edited

            Lol. The comments above mentioned --asof... not --as-of.... Thanks!

            Roel Roel Van de Paar added a comment - - edited Lol. The comments above mentioned --asof... not --as-of... . Thanks!
            Roel Roel Van de Paar added a comment - - edited

            To clarify, --dump-history was (eventually) not added here, only --as-of.

            The --as-of option was documented.

            Roel Roel Van de Paar added a comment - - edited To clarify, --dump-history was (eventually) not added here, only --as-of . The --as-of option was documented .

            Logged MDEV-26943 mysqldump --as-of option ignores hour/minute precision

            Roel Roel Van de Paar added a comment - Logged MDEV-26943 mysqldump --as-of option ignores hour/minute precision
            Roel Roel Van de Paar added a comment - - edited

            For any customers/users reviewing the implementation of -as-of please note there is up-to microsecond precision:

            $ ./bin/mysqldump -uroot -S./socket.sock --compact test t1 --as-of="2021-11-01 06:23:43.5" --skip-tz-utc
            ...
            INSERT INTO `t1` VALUES
            (1),
            (2),
            (3);
            $ ./bin/mysqldump -uroot -S./socket.sock --compact test t1 --as-of="2021-11-01 06:23:43.7" --skip-tz-utc
            ...
            INSERT INTO `t1` VALUES
            (2),
            (3);
            

            Roel Roel Van de Paar added a comment - - edited For any customers/users reviewing the implementation of -as-of please note there is up-to microsecond precision: $ ./bin/mysqldump -uroot -S./socket.sock --compact test t1 --as-of="2021-11-01 06:23:43.5" --skip-tz-utc ... INSERT INTO `t1` VALUES (1), (2), (3); $ ./bin/mysqldump -uroot -S./socket.sock --compact test t1 --as-of="2021-11-01 06:23:43.7" --skip-tz-utc ... INSERT INTO `t1` VALUES (2), (3);

            Logged MDEV-26946 Various small mysqldump manual improvements for the --as-of and --tz-utc options

            Roel Roel Van de Paar added a comment - Logged MDEV-26946 Various small mysqldump manual improvements for the --as-of and --tz-utc options

            People

              serg Sergei Golubchik
              valerii Valerii Kravchuk
              Votes:
              3 Vote for this issue
              Watchers:
              10 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved:

                Git Integration

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