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

Logging of DDL statements during backup

    Details

    • Type: Task
    • Status: Closed (View Workflow)
    • Priority: Major
    • Resolution: Fixed
    • Fix Version/s: N/A
    • Component/s: Backup
    • Labels:
      None

      Description

      Implement logging of DDL statements that happened between BACKUP STAGE start and BACKUP STAGE end.

      The log will be written in data_dir/ddl.log. This file will be dropped (if exists) and created for each BACKUP START command.

      The log file is a tab separated file with new line between commands.

      The log format is:
      datetime <tab> query <tab> original_storage_engine <tab> original_database <tab> original_table_name <tab> table_version <tab> new_storage_engine <tab> new_database <tab> new_table_name <tab> new_version_id <nl>

      • The fields named new_... are only filled in case of rename or alter table rename
      • table_version may be empty in case of very old .frm files (before MariaDB 10.0)
      • original_storage_engine may be 'DATABASE' in case of CREATE/DROP database, 'VIEW' in case of CREATE/DROP VIEW or 'TRIGGER' in case of CREATE/DROP TRIGGER.
      • original_table_name is empty in case of CREATE/DROP DATABASE.
      • All table and database name are written in file name format (to ensure that there are no tabs in the names). This means that a table of name 't 1' is logged as 't@00201'. One can use the
        filename_to_tablename() and tablename_to_filename() functions to convert between table and file names.

      The possible values for query are:

      • ALTER
      • BULK_INSERT
      • CHANGE_INDEX
      • CREATE ; The storage engine field contains either storage engine name, DATABASE, VIEW or TRIGGER
      • DROP ; The storage engine field contains either storage engine name, DATABASE, VIEW or TRIGGER
      • DROP_AFTER_CREATE
      • RENAME
      • TRUNCATE
      • optimize
      • repair

        Attachments

          Issue Links

            Activity

              People

              • Assignee:
                monty Michael Widenius
                Reporter:
                monty Michael Widenius
              • Votes:
                0 Vote for this issue
                Watchers:
                3 Start watching this issue

                Dates

                • Due:
                  Created:
                  Updated:
                  Resolved: