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

mysqldump: dump history in XML

    XMLWordPrintable

Details

    Description

      myqldump should support dump-history in --xml mode. This imposes following requirements:

      1. --xml option produces history. System fields contain Extra="ROW START/END GENERATED" option. If system fields are system-hidden they are included in <table_structure> anyway with Extra="SYSTEM INVISIBLE ROW START/END GENERATED" option. <table_structure> includes System_versioning="Y" option.

      Example:

      <?xml version="1.0"?>
      <mysqldump xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
      <database name="test">
              <table_structure name="t1" System_versioning="Y">
                      <field Field="x" Type="int(11)" Null="YES" Key="" Default="NULL" Extra="" Comment="" />
                      <field Field="row_start" Type="timestamp(6)" Null="NO" Key="" Extra="SYSTEM INVISIBLE ROW START GENERATED" Comment="" />
                      <field Field="row_end" Type="timestamp(6)" Null="NO" Key="" Extra="SYSTEM INVISIBLE ROW END GENERATED" Comment="" />
                      <options Name="t1" Engine="MyISAM" Version="10" Row_format="Fixed" Rows="2" Avg_row_length="19" Data_length="38" Max_data_length="5348024557502463" Index_length="1024" Data_free="0" Create_time="2018-07-03 09:30:09" Update_time="2018-07-03 09:30:09" Collation="latin1_swedish_ci" Create_options="" Comment="" Max_index_length="17179868160" Temporary="N" />
              </table_structure>
              <table_data name="t1">
              <row>   
                      <field name="x">1</field>
                      <field name="row_start">2018-07-03 09:30:09.491532</field>
                      <field name="row_end">2018-07-03 09:30:09.491928</field>
              </row>
              <row>   
                      <field name="x">2</field>
                      <field name="row_start">2018-07-03 09:30:09.491532</field>
                      <field name="row_end">2038-01-19 03:14:07.999999</field>
              </row>
              </table_data>
      </database>
      </mysqldump>
      

      2. LOAD XML loads such data in case system_versioning_modify_history is ON. When system_versioning_modify_history is OFF LOAD XML fails to set row_start, row_end fields.

      3. mysqlimport imports such tables with history.

      Attachments

        Issue Links

          Activity

            People

              midenok Aleksey Midenkov
              midenok Aleksey Midenkov
              Votes:
              0 Vote for this issue
              Watchers:
              3 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.