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

Create "Sql_cmd_show_slave_status" class for "SHOW SLAVE STATUS" command.

    XMLWordPrintable

Details

    • Task
    • Status: Closed (View Workflow)
    • Critical
    • Resolution: Fixed
    • 10.5.0
    • Parser
    • None

    Description

      As part of MDEV-18777 new alias named "REPLICA" is added for "SLAVE".

      One possible option is to add a new member to Lex to capture the name specified for
      secondary server.

      Like thd->lex->secondary_name= SLAVE/REPLICA. But there are following limitations
      in implementing this solution.

      LEX is so huge, it uses a lot of memory.
      Inside SP, many statements, for example an assignment statement,
      use their own LEX per statement. As a result, stored procedures use too
      much memory. Also, LEX initialization is very expensive. Currently
      server spends too much CPU to initalize LEXes, especially in stored
      procedures.

      We're doing the other way around: remove all specific members from LEX.

      Please do the following way:

      1. Add a new class Sql_cmd_show_slave_status
      2. Move this code:
      case SQLCOM_SHOW_SLAVE_STAT:

      { ... }

      from mysql_execute_command() to Sql_cmd_show_slave_status::execute().
      3. Add a new member which will distinguish between SLAVE and REPLICA
      into this new class Sql_cmd_show_slave_status, instead of LEX.
      4. Adjust the rest of the code to use the new class instead
      of a "case" in mysql_execute_command().
      For example, add "new Sql_cmd_show_slave_status" into sql_yacc.yy and sql_yacc_ora.yy

      Please also add a member "verbose" in Sql_cmd_show_slave_status
      and use it instead of LEX::verbose for SHOW SLAVE purposes.

      Attachments

        Issue Links

          Activity

            People

              sujatha.sivakumar Sujatha Sivakumar (Inactive)
              sujatha.sivakumar Sujatha Sivakumar (Inactive)
              Votes:
              0 Vote for this issue
              Watchers:
              3 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.