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

Add classes to handle DDL statements

    XMLWordPrintable

Details

    • Task
    • Status: Open (View Workflow)
    • Minor
    • Resolution: Unresolved
    • None
    • None
    • None

    Description

      There are four very similar pieces of the code in sql_parse.cc performed for SQLCOM_CREATE_DB, SQLCOM_DROP_DB, SQLCOM_ALTER_DB_UPGRADE,SQLCOM_ALTER_DB.

      It would be very nice to add classes that handle all sql_parse.cc events.

      This will allow to share similar pieces of the code not only between commands of the same database object (like in case of SCHEMA commands), but also between different database objects (e.g. tables, views, triggers, SP, all the rest).

      All SQL statements consist of these steps:

      • Check if statement can be executed (e.g. name in "CREATE SCHEMA name" is valid).
      • Check access
      • Apply filters for DDL statements (e.g. Rpl_filters on slave)
      • Perform WSREP_TO_ISOLATION
      • Execute the actual action
      • Do binary logging

      All these steps can be put into virtual methods of a new class.

      This task will wrap DDL related routines only (CREATE, DROP, ALTER).

      Attachments

        Activity

          People

            Unassigned Unassigned
            bar Alexander Barkov
            Votes:
            0 Vote for this issue
            Watchers:
            2 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.