Details

    Description

      Implement binary changes enumerated in MDEV-26946

      Proposed texts as per MDEV-26946:

      $ ./bin/mysqldump --help --verbose | grep -A3 -m1 'as-of' 
        --as-of=name        Dump system versioned tables as of the specified timestamp. 
                            Note that table structures are always dumped, irrespective of 
                            the date/time specified. Note that the timestamp is interpreted 
                            according to the --tz-utc setting (ref MDEV-26943 and --tz-utc).
       
      $ ./bin/mysqldump --help --verbose | grep -A5 -m1 'tz-utc' 
        --tz-utc            This option enables TIMESTAMP columns to be dumped and 
                            reloaded between servers in different time zones. 
                            mysqldump sets its connection time zone to UTC before 
                            commencing the dump, and adds SET TIME_ZONE=´+00:00´ 
                            to the top of the dump file.
      

      Attachments

        Issue Links

          Activity

            Roel Roel Van de Paar created issue -

            --help is not the man page. --help briefly describes what each option does. Brevity is the main feature here: basically it lists what the options are available long and short for the user to interact. When the user wants details he reads the man page. That's the common UNIX practice!

            If you think differently, please suggest the text for the p.4 and approve this ticket with serg.

            midenok Aleksey Midenkov added a comment - --help is not the man page. --help briefly describes what each option does. Brevity is the main feature here: basically it lists what the options are available long and short for the user to interact. When the user wants details he reads the man page. That's the common UNIX practice! If you think differently, please suggest the text for the p.4 and approve this ticket with serg .
            midenok Aleksey Midenkov made changes -
            Field Original Value New Value
            Assignee Aleksey Midenkov [ midenok ] Roel Van de Paar [ roel ]
            midenok Aleksey Midenkov made changes -
            Status Open [ 1 ] Needs Feedback [ 10501 ]

            midenok sorry to say, but did you even read the bug report I wrote? A proposed text is/was already there, and is exactly one line longer than the current text.

            Roel Roel Van de Paar added a comment - midenok sorry to say, but did you even read the bug report I wrote? A proposed text is/was already there, and is exactly one line longer than the current text.
            Roel Roel Van de Paar made changes -
            Assignee Roel Van de Paar [ roel ] Aleksey Midenkov [ midenok ]
            Roel Roel Van de Paar made changes -
            Status Needs Feedback [ 10501 ] Open [ 1 ]
            midenok Aleksey Midenkov added a comment - - edited

            Roel Maybe I read wrong this:

            4. The mysqldump binary's help for -as-of should be changed in a similar matter as items 1 to 3 above.

            So it requires to include this:
            ---------
            1. It needs to be clarified that this option is only applicable to the data, not the table structure. The table structure is always dumped, irrespective of the date/time specified. @serg fyi, in case this is considered a bug.

            CREATE TABLE t1 (a INT) WITH SYSTEM VERSIONING;
            INSERT t1 (a) VALUES (1),(2),(3);
            DELETE FROM t1 WHERE a=1;
            

            Followed by:

            ./bin/mysqldump -uroot -S./socket.sock --compact --as-of="1990-01-01 00:01" test t1
            

            Will dump the table structure but not the data.

            2. In regards timestamps, the connection with -tz-utc / -skip-tz-utc would best be clarified to make it easier for users to understand why their timestamps are not working when dumping data. Perhaps something like:

            Please note the interaction of this option with <a href="https://jira.mariadb.org/browse/MDEV-26943">--tz-utc</a>.
            

            ----------------
            And where is the proposed text for the above? I see two p.4 though in your list so I referred to the first one.

            midenok Aleksey Midenkov added a comment - - edited Roel Maybe I read wrong this: 4. The mysqldump binary's help for -as-of should be changed in a similar matter as items 1 to 3 above. So it requires to include this: --------- 1. It needs to be clarified that this option is only applicable to the data, not the table structure. The table structure is always dumped, irrespective of the date/time specified. @serg fyi, in case this is considered a bug. CREATE TABLE t1 (a INT ) WITH SYSTEM VERSIONING; INSERT t1 (a) VALUES (1),(2),(3); DELETE FROM t1 WHERE a=1; Followed by: ./bin/mysqldump -uroot -S./socket.sock --compact --as-of="1990-01-01 00:01" test t1 Will dump the table structure but not the data. 2. In regards timestamps, the connection with -tz-utc / -skip-tz-utc would best be clarified to make it easier for users to understand why their timestamps are not working when dumping data. Perhaps something like: Please note the interaction of this option with < a href = "https://jira.mariadb.org/browse/MDEV-26943" >--tz-utc</ a >. ---------------- And where is the proposed text for the above? I see two p.4 though in your list so I referred to the first one.
            midenok Aleksey Midenkov made changes -
            Assignee Aleksey Midenkov [ midenok ] Roel Van de Paar [ roel ]
            midenok Aleksey Midenkov made changes -
            Status Open [ 1 ] Needs Feedback [ 10501 ]

            Roel to avoid further misunderstanding please update this task description with exact instructions for this task only.

            midenok Aleksey Midenkov added a comment - Roel to avoid further misunderstanding please update this task description with exact instructions for this task only.
            Roel Roel Van de Paar made changes -
            Description Implement binary changes enumerated in MDEV-26946 Implement binary changes enumerated in MDEV-26946

            Proposed texts as per MDEV-26946:

            {noformat}
            $ ./bin/mysqldump --help --verbose | grep 'as-of'
              --as-of=name Dump system versioned tables as of the specified timestamp. Note that table
                                  structures are always dumped, irrespective of the date/time specified.
                                  Note the interaction of this option with --tz-utc (ref MDEV-26943).

            $ ./bin/mysqldump --help --verbose | grep -A5 -m1 'tz-utc'
              --tz-utc This option enables TIMESTAMP columns to be dumped and
                                  reloaded between servers in different time zones.
                                  mysqldump sets its connection time zone to UTC before
                                  commencing the dump, and adds SET TIME_ZONE=´+00:00´
                                  to the top of the dump file.
            {noformat}
            Roel Roel Van de Paar added a comment - - edited

            midenok Again, the proposed text for --tz-utc was already there and for --as-of I simply used the sentences which were also already there. I've added it into the description above for you.

            Roel Roel Van de Paar added a comment - - edited midenok Again, the proposed text for --tz-utc was already there and for --as-of I simply used the sentences which were also already there. I've added it into the description above for you.
            Roel Roel Van de Paar added a comment - - edited

            midenok serg As mentioned in MDEV-26946, before documenting this, it needs to be validated that it is correct and expected behavior to dump table structures always. i.e. when a user dumps with an --as-of set to 1990 it will dump a table structure created in 2022, even if no data is included.

            Roel Roel Van de Paar added a comment - - edited midenok serg As mentioned in MDEV-26946 , before documenting this, it needs to be validated that it is correct and expected behavior to dump table structures always. i.e. when a user dumps with an --as-of set to 1990 it will dump a table structure created in 2022, even if no data is included.
            Roel Roel Van de Paar made changes -
            Description Implement binary changes enumerated in MDEV-26946

            Proposed texts as per MDEV-26946:

            {noformat}
            $ ./bin/mysqldump --help --verbose | grep 'as-of'
              --as-of=name Dump system versioned tables as of the specified timestamp. Note that table
                                  structures are always dumped, irrespective of the date/time specified.
                                  Note the interaction of this option with --tz-utc (ref MDEV-26943).

            $ ./bin/mysqldump --help --verbose | grep -A5 -m1 'tz-utc'
              --tz-utc This option enables TIMESTAMP columns to be dumped and
                                  reloaded between servers in different time zones.
                                  mysqldump sets its connection time zone to UTC before
                                  commencing the dump, and adds SET TIME_ZONE=´+00:00´
                                  to the top of the dump file.
            {noformat}
            Implement binary changes enumerated in MDEV-26946

            Proposed texts as per MDEV-26946:

            {noformat}
            $ ./bin/mysqldump --help --verbose | grep -A2 -m1 'as-of'
              --as-of=name Dump system versioned tables as of the specified timestamp. Note that table
                                  structures are always dumped, irrespective of the date/time specified.
                                  Note the interaction of this option with --tz-utc (ref MDEV-26943).

            $ ./bin/mysqldump --help --verbose | grep -A5 -m1 'tz-utc'
              --tz-utc This option enables TIMESTAMP columns to be dumped and
                                  reloaded between servers in different time zones.
                                  mysqldump sets its connection time zone to UTC before
                                  commencing the dump, and adds SET TIME_ZONE=´+00:00´
                                  to the top of the dump file.
            {noformat}
            Roel Roel Van de Paar made changes -
            Roel Roel Van de Paar made changes -
            Status Needs Feedback [ 10501 ] Open [ 1 ]

            yes, as far as table structure is concerned — it's definitely correct and expected.

            as far as --as-of help text is concerned — I agree that it could benefit from a second statement, like "Timestamp is interpreted according to the --tz-utc setting".

            serg Sergei Golubchik added a comment - yes, as far as table structure is concerned — it's definitely correct and expected. as far as --as-of help text is concerned — I agree that it could benefit from a second statement, like "Timestamp is interpreted according to the --tz-utc setting".
            Roel Roel Van de Paar made changes -
            Description Implement binary changes enumerated in MDEV-26946

            Proposed texts as per MDEV-26946:

            {noformat}
            $ ./bin/mysqldump --help --verbose | grep -A2 -m1 'as-of'
              --as-of=name Dump system versioned tables as of the specified timestamp. Note that table
                                  structures are always dumped, irrespective of the date/time specified.
                                  Note the interaction of this option with --tz-utc (ref MDEV-26943).

            $ ./bin/mysqldump --help --verbose | grep -A5 -m1 'tz-utc'
              --tz-utc This option enables TIMESTAMP columns to be dumped and
                                  reloaded between servers in different time zones.
                                  mysqldump sets its connection time zone to UTC before
                                  commencing the dump, and adds SET TIME_ZONE=´+00:00´
                                  to the top of the dump file.
            {noformat}
            Implement binary changes enumerated in MDEV-26946

            Proposed texts as per MDEV-26946:

            {noformat}
            $ ./bin/mysqldump --help --verbose | grep -A3 -m1 'as-of'
              --as-of=name Dump system versioned tables as of the specified timestamp.
                                  Note that table structures are always dumped, irrespective of the
                                  date/time specified. Note that the timestamp is interpreted according
                                  to the --tz-utc setting (ref MDEV-26943).

            $ ./bin/mysqldump --help --verbose | grep -A5 -m1 'tz-utc'
              --tz-utc This option enables TIMESTAMP columns to be dumped and
                                  reloaded between servers in different time zones.
                                  mysqldump sets its connection time zone to UTC before
                                  commencing the dump, and adds SET TIME_ZONE=´+00:00´
                                  to the top of the dump file.
            {noformat}
            Roel Roel Van de Paar made changes -
            Description Implement binary changes enumerated in MDEV-26946

            Proposed texts as per MDEV-26946:

            {noformat}
            $ ./bin/mysqldump --help --verbose | grep -A3 -m1 'as-of'
              --as-of=name Dump system versioned tables as of the specified timestamp.
                                  Note that table structures are always dumped, irrespective of the
                                  date/time specified. Note that the timestamp is interpreted according
                                  to the --tz-utc setting (ref MDEV-26943).

            $ ./bin/mysqldump --help --verbose | grep -A5 -m1 'tz-utc'
              --tz-utc This option enables TIMESTAMP columns to be dumped and
                                  reloaded between servers in different time zones.
                                  mysqldump sets its connection time zone to UTC before
                                  commencing the dump, and adds SET TIME_ZONE=´+00:00´
                                  to the top of the dump file.
            {noformat}
            Implement binary changes enumerated in MDEV-26946

            Proposed texts as per MDEV-26946:

            {noformat}
            $ ./bin/mysqldump --help --verbose | grep -A3 -m1 'as-of'
              --as-of=name Dump system versioned tables as of the specified timestamp.
                                  Note that table structures are always dumped, irrespective of
                                  the date/time specified. Note that the timestamp is interpreted
                                  according to the --tz-utc setting (ref MDEV-26943 and --tz-utc).

            $ ./bin/mysqldump --help --verbose | grep -A5 -m1 'tz-utc'
              --tz-utc This option enables TIMESTAMP columns to be dumped and
                                  reloaded between servers in different time zones.
                                  mysqldump sets its connection time zone to UTC before
                                  commencing the dump, and adds SET TIME_ZONE=´+00:00´
                                  to the top of the dump file.
            {noformat}

            Updated description to match, thank you!

            Roel Roel Van de Paar added a comment - Updated description to match, thank you!
            midenok Aleksey Midenkov made changes -
            Summary Implement binary changes enumerated in MDEV-26946 Binary changes for --as-of and --tz-utc options

            Please review bb-10.7-midenok

            midenok Aleksey Midenkov added a comment - Please review bb-10.7-midenok
            midenok Aleksey Midenkov made changes -
            Assignee Roel Van de Paar [ roel ] Sergei Golubchik [ serg ]

            IMHO, the original proposed text above has two advantages not present in the proposed patch;
            1) MDEV-26943 is a helpful reference
            2) "This option enables TIMESTAMP columns to be dumped and reloaded between servers in different time zones." is (and was) helpful

            There is also a typo: "versioned table" should read "versioned table(s)" as it can be more than one.

            Roel Roel Van de Paar added a comment - IMHO, the original proposed text above has two advantages not present in the proposed patch; 1) MDEV-26943 is a helpful reference 2) "This option enables TIMESTAMP columns to be dumped and reloaded between servers in different time zones." is (and was) helpful There is also a typo: "versioned table" should read "versioned table(s)" as it can be more than one.

            Roel We do not specify MDEV references in the UI, do we?
            As for 2) this is obvious for SA having servers in different time zones. Like I said, --help is not man page.

            midenok Aleksey Midenkov added a comment - Roel We do not specify MDEV references in the UI, do we? As for 2) this is obvious for SA having servers in different time zones. Like I said, --help is not man page.
            serg Sergei Golubchik made changes -
            Status Open [ 1 ] In Progress [ 3 ]
            serg Sergei Golubchik made changes -
            Status In Progress [ 3 ] In Review [ 10002 ]

            b8a66d853cb4ba52c0ab09074f34f566ae25bf52 is ok to push, thanks

            serg Sergei Golubchik added a comment - b8a66d853cb4ba52c0ab09074f34f566ae25bf52 is ok to push, thanks
            serg Sergei Golubchik made changes -
            Assignee Sergei Golubchik [ serg ] Aleksey Midenkov [ midenok ]
            Status In Review [ 10002 ] Stalled [ 10000 ]
            midenok Aleksey Midenkov made changes -
            Status Stalled [ 10000 ] In Progress [ 3 ]
            midenok Aleksey Midenkov made changes -
            Fix Version/s 10.7.4 [ 27504 ]
            Fix Version/s 10.8.3 [ 27502 ]
            Fix Version/s 10.7 [ 24805 ]
            Resolution Fixed [ 1 ]
            Status In Progress [ 3 ] Closed [ 6 ]
            midenok Aleksey Midenkov made changes -

            People

              midenok Aleksey Midenkov
              Roel Roel Van de Paar
              Votes:
              0 Vote for this issue
              Watchers:
              4 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.