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

multi-source-replication support mysql syntax(for channel)

Details

    Description

      MariaDB and MySQL both implement the multi-source replication, but their usage and internal implementation are different. In order to facilitate the migration of MySQL users to MariaDB, we want to support MySQL syntax

      describe

      • For CHANGE MASTER/FLUSH RELAY LOG/RESET SLAVE/SHOW RELAY LOG EVENT/SHOW SLAVE STATUS/START SLAVE/STOP SLAVE commands support FOR CHANNEL syntax
      • "FOR CHANNEL" is just an alias for connection_name, does not change the original implementation, all behaviors are consistent with MariaDB, so some operations are not compatible with MySQL, For example:
        (MySQL) When a replica has multiple channels and a FOR CHANNEL channel option is not specified, a valid statement generally acts on all available channels, with some specific exceptions.
        (MariaDB) You specify which primary connection you want to work with by either specifying the connection name in the command or setting default_master_connection to the connection you want to work with
      • The channel name supports up to 64 bytes, and is not case sensitive
      • The connection name and for channel syntax cannot be used at the same time, otherwise an error will be reported
      • MariaDB syntax is highly compatible with MySQL, so there is no special SQL_MODE set like Oracle/SQL Server and other databases, FOR CHANNEL is not affected by SQL_MODE

      new syntax for MariaDB

      CHANGE MASTER

      CHANGE MASTER ['connection_name'] TO master_def [, master_def] ... [FOR CHANNEL 'connection_name'] 
      

      FLUSH RELAY LOG

      FLUSH RELAY LOGS ['connection_name' | FOR CHANNEL 'connection_name']
      

      RESET SLAVE

      RESET SLAVE ['connection_name'] [ALL] [FOR CHANNEL 'connection_name'] 
      

      SHOW RELAY LOG EVENT

      SHOW RELAYLOG ['connection_name'] EVENTS [IN 'log_name'] [FROM pos] [LIMIT [offset,] row_count] [ FOR CHANNEL 'connection_name']
      

      SHOW SLAVE STATUS

      SHOW SLAVE ['connection_name'] STATUS [FOR CHANNEL 'connection_name'] 
      

      START SLAVE

      START SLAVE ['connection_name'] [thread_type [, thread_type] ... ] [FOR CHANNEL 'connection_name']
      

      STOP SLAVE

      STOP SLAVE ['connection_name'] [thread_type [, thread_type] ... ] [FOR CHANNEL 'connection_name']
      

      Attachments

        Issue Links

          Activity

            woqutech.com woqutech.com created issue -
            woqutech.com woqutech.com made changes -
            Field Original Value New Value
            Description # backugroud
            MariaDB and MySQL both implement the multi-source replication, but their usage and internal implementation are different. In order to facilitate the migration of MySQL users to MariaDB, we want to support MySQL syntax

            # describe
            * For CHANGE MASTER/FLUSH RELAY LOG/RESET SLAVE/SHOW RELAY LOG EVENT/SHOW SLAVE STATUS/START SLAVE/STOP SLAVE commands support FOR CHANNEL syntax
            * "FOR CHANNEL" is just an alias for connection\_name, does not change the original implementation, all behaviors are consistent with MariaDB, so some operations are not compatible with MySQL, For example:
              (MySQL) When a replica has multiple channels and a FOR CHANNEL channel option is not specified, a valid statement generally acts on all available channels, with some specific exceptions.
              (MariaDB) You specify which primary connection you want to work with by either specifying the connection name in the command or setting default_master_connection to the connection you want to work with
            * The channel name supports up to 64 bytes, and is not case sensitive
            * The connection name and for channel syntax cannot be used at the same time, otherwise an error will be reported
            * MariaDB syntax is highly compatible with MySQL, so there is no special SQL_MODE set like Oracle/SQL Server and other databases, FOR CHANNEL is not affected by SQL_MODE

            # new syntax for MariaDB
            ## CHANGE MASTER
            {code:java}
            CHANGE MASTER ['connection_name'] TO master_def [, master_def] ... [FOR CHANNEL 'channel_name']
            {code}

            ## FLUSH RELAY LOG

            {code:java}
            FLUSH RELAY LOGS ['connection_name' | FOR CHANNEL 'channel_name']
            {code}

            ## RESET SLAVE

            {code:java}
            RESET SLAVE ['connection_name'] [ALL] [FOR CHANNEL 'channel_name']
            {code}

            ## SHOW RELAY LOG EVENT

            {code:java}
            SHOW RELAYLOG ['connection_name'] EVENTS [IN 'log_name'] [FROM pos] [LIMIT [offset,] row_count] [ FOR CHANNEL 'channel_name']
            {code}

            ## SHOW SLAVE STATUS

            {code:java}
            SHOW SLAVE ['connection_name'] STATUS [FOR CHANNEL 'channel_name']
            {code}

            ## START SLAVE

            {code:java}
            START SLAVE ['connection_name'] [thread_type [, thread_type] ... ] [FOR CHANNEL 'channel_name']
            {code}

            ## STOP SLAVE

            {code:java}
            STOP SLAVE ['connection_name'] [thread_type [, thread_type] ... ] [FOR CHANNEL 'channel_name']
            {code}

            h1. backugroud
            MariaDB and MySQL both implement the multi-source replication, but their usage and internal implementation are different. In order to facilitate the migration of MySQL users to MariaDB, we want to support MySQL syntax

            h1. describe
            * For CHANGE MASTER/FLUSH RELAY LOG/RESET SLAVE/SHOW RELAY LOG EVENT/SHOW SLAVE STATUS/START SLAVE/STOP SLAVE commands support FOR CHANNEL syntax
            * "FOR CHANNEL" is just an alias for connection\_name, does not change the original implementation, all behaviors are consistent with MariaDB, so some operations are not compatible with MySQL, For example:
              (MySQL) When a replica has multiple channels and a FOR CHANNEL channel option is not specified, a valid statement generally acts on all available channels, with some specific exceptions.
              (MariaDB) You specify which primary connection you want to work with by either specifying the connection name in the command or setting default_master_connection to the connection you want to work with
            * The channel name supports up to 64 bytes, and is not case sensitive
            * The connection name and for channel syntax cannot be used at the same time, otherwise an error will be reported
            * MariaDB syntax is highly compatible with MySQL, so there is no special SQL_MODE set like Oracle/SQL Server and other databases, FOR CHANNEL is not affected by SQL_MODE

            h1. new syntax for MariaDB
            h2. CHANGE MASTER
            {code:java}
            CHANGE MASTER ['connection_name'] TO master_def [, master_def] ... [FOR CHANNEL 'channel_name']
            {code}

            h2. FLUSH RELAY LOG

            {code:java}
            FLUSH RELAY LOGS ['connection_name' | FOR CHANNEL 'channel_name']
            {code}

            h2. RESET SLAVE

            {code:java}
            RESET SLAVE ['connection_name'] [ALL] [FOR CHANNEL 'channel_name']
            {code}

            h2. SHOW RELAY LOG EVENT

            {code:java}
            SHOW RELAYLOG ['connection_name'] EVENTS [IN 'log_name'] [FROM pos] [LIMIT [offset,] row_count] [ FOR CHANNEL 'channel_name']
            {code}

            h2. SHOW SLAVE STATUS

            {code:java}
            SHOW SLAVE ['connection_name'] STATUS [FOR CHANNEL 'channel_name']
            {code}

            h2. START SLAVE

            {code:java}
            START SLAVE ['connection_name'] [thread_type [, thread_type] ... ] [FOR CHANNEL 'channel_name']
            {code}

            h2. STOP SLAVE

            {code:java}
            STOP SLAVE ['connection_name'] [thread_type [, thread_type] ... ] [FOR CHANNEL 'channel_name']
            {code}

            woqutech.com woqutech.com made changes -
            Description h1. backugroud
            MariaDB and MySQL both implement the multi-source replication, but their usage and internal implementation are different. In order to facilitate the migration of MySQL users to MariaDB, we want to support MySQL syntax

            h1. describe
            * For CHANGE MASTER/FLUSH RELAY LOG/RESET SLAVE/SHOW RELAY LOG EVENT/SHOW SLAVE STATUS/START SLAVE/STOP SLAVE commands support FOR CHANNEL syntax
            * "FOR CHANNEL" is just an alias for connection\_name, does not change the original implementation, all behaviors are consistent with MariaDB, so some operations are not compatible with MySQL, For example:
              (MySQL) When a replica has multiple channels and a FOR CHANNEL channel option is not specified, a valid statement generally acts on all available channels, with some specific exceptions.
              (MariaDB) You specify which primary connection you want to work with by either specifying the connection name in the command or setting default_master_connection to the connection you want to work with
            * The channel name supports up to 64 bytes, and is not case sensitive
            * The connection name and for channel syntax cannot be used at the same time, otherwise an error will be reported
            * MariaDB syntax is highly compatible with MySQL, so there is no special SQL_MODE set like Oracle/SQL Server and other databases, FOR CHANNEL is not affected by SQL_MODE

            h1. new syntax for MariaDB
            h2. CHANGE MASTER
            {code:java}
            CHANGE MASTER ['connection_name'] TO master_def [, master_def] ... [FOR CHANNEL 'channel_name']
            {code}

            h2. FLUSH RELAY LOG

            {code:java}
            FLUSH RELAY LOGS ['connection_name' | FOR CHANNEL 'channel_name']
            {code}

            h2. RESET SLAVE

            {code:java}
            RESET SLAVE ['connection_name'] [ALL] [FOR CHANNEL 'channel_name']
            {code}

            h2. SHOW RELAY LOG EVENT

            {code:java}
            SHOW RELAYLOG ['connection_name'] EVENTS [IN 'log_name'] [FROM pos] [LIMIT [offset,] row_count] [ FOR CHANNEL 'channel_name']
            {code}

            h2. SHOW SLAVE STATUS

            {code:java}
            SHOW SLAVE ['connection_name'] STATUS [FOR CHANNEL 'channel_name']
            {code}

            h2. START SLAVE

            {code:java}
            START SLAVE ['connection_name'] [thread_type [, thread_type] ... ] [FOR CHANNEL 'channel_name']
            {code}

            h2. STOP SLAVE

            {code:java}
            STOP SLAVE ['connection_name'] [thread_type [, thread_type] ... ] [FOR CHANNEL 'channel_name']
            {code}

            _emphasized text_h1. backugroud
            MariaDB and MySQL both implement the multi-source replication, but their usage and internal implementation are different. In order to facilitate the migration of MySQL users to MariaDB, we want to support MySQL syntax

            h1. describe
            * For CHANGE MASTER/FLUSH RELAY LOG/RESET SLAVE/SHOW RELAY LOG EVENT/SHOW SLAVE STATUS/START SLAVE/STOP SLAVE commands support FOR CHANNEL syntax
            * "FOR CHANNEL" is just an alias for connection\_name, does not change the original implementation, all behaviors are consistent with MariaDB, so some operations are not compatible with MySQL, For example:
              (MySQL) When a replica has multiple channels and a FOR CHANNEL channel option is not specified, a valid statement generally acts on all available channels, with some specific exceptions.
              (MariaDB) You specify which primary connection you want to work with by either specifying the connection name in the command or setting default_master_connection to the connection you want to work with
            * The channel name supports up to 64 bytes, and is not case sensitive
            * The connection name and for channel syntax cannot be used at the same time, otherwise an error will be reported
            * MariaDB syntax is highly compatible with MySQL, so there is no special SQL_MODE set like Oracle/SQL Server and other databases, FOR CHANNEL is not affected by SQL_MODE

            h1. new syntax for MariaDB
            h2. CHANGE MASTER
            {code:java}
            CHANGE MASTER ['connection_name'] TO master_def [, master_def] ... [FOR CHANNEL 'channel_name']
            {code}

            h2. FLUSH RELAY LOG

            {code:java}
            FLUSH RELAY LOGS ['connection_name' | FOR CHANNEL 'channel_name']
            {code}

            h2. RESET SLAVE

            {code:java}
            RESET SLAVE ['connection_name'] [ALL] [FOR CHANNEL 'channel_name']
            {code}

            h2. SHOW RELAY LOG EVENT

            {code:java}
            SHOW RELAYLOG ['connection_name'] EVENTS [IN 'log_name'] [FROM pos] [LIMIT [offset,] row_count] [ FOR CHANNEL 'channel_name']
            {code}

            h2. SHOW SLAVE STATUS

            {code:java}
            SHOW SLAVE ['connection_name'] STATUS [FOR CHANNEL 'channel_name']
            {code}

            h2. START SLAVE

            {code:java}
            START SLAVE ['connection_name'] [thread_type [, thread_type] ... ] [FOR CHANNEL 'channel_name']
            {code}

            h2. STOP SLAVE

            {code:java}
            STOP SLAVE ['connection_name'] [thread_type [, thread_type] ... ] [FOR CHANNEL 'channel_name']
            {code}

            woqutech.com woqutech.com made changes -
            Comment [

            - Without changing the original implementation of MariaDB, it is compatible with MySQL syntax, so we can only modify yacc and lex
            - Define CHANNEL related tokens in yacc and lex
              - sql_yacc.yy
                  %token <kwd> CHANNEL_SYM
              - lex.h
                  { "CHANNEL", SYM(CHANNEL_SYM)},
              
            - Modify the detection of the rule part, and the corresponding results, so that MariaDB performs the same operation after detecting [FOR CHANNEL'channel_name'] and after detecting ['connection_name'].
              - define [FOR CHANNEL'channel_name']
                  optional_for_channel:
                          /* empty */
                            {
                              /*do nothing */
                            }
                          | for_channel
                  
                          ;
                  
                  for_channel:
                          FOR_SYM CHANNEL_SYM TEXT_STRING_sys
                          {
                            if (Lex->mi.connection_name.str != NULL)
                            {
                              my_yyabort_error((ER_WRONG_ARGUMENTS, MYF(0), "CONNECTION_NAME AND FOR CHANNEL CAN NOT BE SPECIFIED AT THE SAME TIME)"));
                            }
                            else
                            {
                              Lex->mi.connection_name= $3;
                  #ifdef HAVE_REPLICATION
                             if (unlikely(check_master_connection_name(&$3)))
                                my_yyabort_error((ER_WRONG_ARGUMENTS, MYF(0), "MASTER_CONNECTION_NAME"));
                  #endif
                            }
                  
                           }
                           ;
              
              - CHANGE MASTER
              CHANGE MASTER ['connection_name'] TO master_def [, master_def] ... [FOR CHANNEL 'channel_name']
                  change:
                            CHANGE MASTER_SYM optional_connection_name TO_SYM
                            {
                              Lex->sql_command = SQLCOM_CHANGE_MASTER;
                            }
                            master_defs
                            { }
                            optional_for_channel
                            { }
                          ;
              
              - FLUSH RELAY LOGS
              FLUSH RELAY LOGS ['connection_name' | FOR CHANNEL 'channel_name']
                  | RELAY LOGS_SYM optional_connection_name optional_for_channel
                  {
                      LEX *lex= Lex;
                      if (unlikely(lex->type & REFRESH_RELAY_LOG))
                        my_yyabort_error((ER_WRONG_USAGE, MYF(0), "FLUSH", "RELAY LOGS"));
                      lex->type|= REFRESH_RELAY_LOG;
                      lex->relay_log_connection_name= lex->mi.connection_name;
                  }
              
              - RESET SLAVE
              RESET SLAVE ['connection_name'] [ALL] [FOR CHANNEL 'channel_name']
                  reset_option:
                            SLAVE { Lex->type|= REFRESH_SLAVE; }
                            optional_connection_name
                            slave_reset_options optional_for_channel
                            { }
              
              - SHOW RELAYLOG
              SHOW RELAYLOG ['connection_name'] EVENTS [IN 'log_name'] [FROM pos] [LIMIT [offset,] row_count] [ FOR CHANNEL 'channel_name']
                  | RELAYLOG_SYM optional_connection_name EVENTS_SYM binlog_in binlog_from
                  {
                      LEX *lex= Lex;
                      lex->sql_command= SQLCOM_SHOW_RELAYLOG_EVENTS;
                  }
                  opt_global_limit_clause optional_for_channel
                  { }
              
              - SHOW SLAVE STATUS
              SHOW SLAVE ['connection_name'] STATUS [FOR CHANNEL 'channel_name']
                   | SLAVE optional_connection_name STATUS_SYM optional_for_channel
                   {
                      if (!(Lex->m_sql_cmd= new (thd->mem_root)
                        Sql_cmd_show_slave_status()))
                      MYSQL_YYABORT;
                      Lex->sql_command = SQLCOM_SHOW_SLAVE_STAT;
                   }
              
              - START SLAVE
              START SLAVE ['connection_name'] [thread_type [, thread_type] ... ] [FOR CHANNEL 'channel_name']
                  START_SYM SLAVE optional_connection_name slave_thread_opts optional_for_channel
                  {
                      LEX *lex=Lex;
                      lex->sql_command = SQLCOM_SLAVE_START;
                      lex->type = 0;
                      /* If you change this code don't forget to update SLAVE START too */
                  }
                  slave_until
                  {}
              
              - STOP SLAVE
              STOP SLAVE ['connection_name'] [thread_type [, thread_type] ... ] [FOR CHANNEL 'channel_name']
                  | STOP_SYM SLAVE optional_connection_name slave_thread_opts optional_for_channel
                  {
                      LEX *lex=Lex;
                      lex->sql_command = SQLCOM_SLAVE_STOP;
                      lex->type = 0;
                      /* If you change this code don't forget to update SLAVE STOP too */
                  }
              



            ]
            woqutech.com woqutech.com made changes -
            Attachment for_channel.patch [ 58582 ]
            woqutech.com woqutech.com made changes -
            Description _emphasized text_h1. backugroud
            MariaDB and MySQL both implement the multi-source replication, but their usage and internal implementation are different. In order to facilitate the migration of MySQL users to MariaDB, we want to support MySQL syntax

            h1. describe
            * For CHANGE MASTER/FLUSH RELAY LOG/RESET SLAVE/SHOW RELAY LOG EVENT/SHOW SLAVE STATUS/START SLAVE/STOP SLAVE commands support FOR CHANNEL syntax
            * "FOR CHANNEL" is just an alias for connection\_name, does not change the original implementation, all behaviors are consistent with MariaDB, so some operations are not compatible with MySQL, For example:
              (MySQL) When a replica has multiple channels and a FOR CHANNEL channel option is not specified, a valid statement generally acts on all available channels, with some specific exceptions.
              (MariaDB) You specify which primary connection you want to work with by either specifying the connection name in the command or setting default_master_connection to the connection you want to work with
            * The channel name supports up to 64 bytes, and is not case sensitive
            * The connection name and for channel syntax cannot be used at the same time, otherwise an error will be reported
            * MariaDB syntax is highly compatible with MySQL, so there is no special SQL_MODE set like Oracle/SQL Server and other databases, FOR CHANNEL is not affected by SQL_MODE

            h1. new syntax for MariaDB
            h2. CHANGE MASTER
            {code:java}
            CHANGE MASTER ['connection_name'] TO master_def [, master_def] ... [FOR CHANNEL 'channel_name']
            {code}

            h2. FLUSH RELAY LOG

            {code:java}
            FLUSH RELAY LOGS ['connection_name' | FOR CHANNEL 'channel_name']
            {code}

            h2. RESET SLAVE

            {code:java}
            RESET SLAVE ['connection_name'] [ALL] [FOR CHANNEL 'channel_name']
            {code}

            h2. SHOW RELAY LOG EVENT

            {code:java}
            SHOW RELAYLOG ['connection_name'] EVENTS [IN 'log_name'] [FROM pos] [LIMIT [offset,] row_count] [ FOR CHANNEL 'channel_name']
            {code}

            h2. SHOW SLAVE STATUS

            {code:java}
            SHOW SLAVE ['connection_name'] STATUS [FOR CHANNEL 'channel_name']
            {code}

            h2. START SLAVE

            {code:java}
            START SLAVE ['connection_name'] [thread_type [, thread_type] ... ] [FOR CHANNEL 'channel_name']
            {code}

            h2. STOP SLAVE

            {code:java}
            STOP SLAVE ['connection_name'] [thread_type [, thread_type] ... ] [FOR CHANNEL 'channel_name']
            {code}

            _emphasized text_h1. backugroud
            MariaDB and MySQL both implement the multi-source replication, but their usage and internal implementation are different. In order to facilitate the migration of MySQL users to MariaDB, we want to support MySQL syntax

            h1. describe
            * For CHANGE MASTER/FLUSH RELAY LOG/RESET SLAVE/SHOW RELAY LOG EVENT/SHOW SLAVE STATUS/START SLAVE/STOP SLAVE commands support FOR CHANNEL syntax
            * "FOR CHANNEL" is just an alias for connection\_name, does not change the original implementation, all behaviors are consistent with MariaDB, so some operations are not compatible with MySQL, For example:
              (MySQL) When a replica has multiple channels and a FOR CHANNEL channel option is not specified, a valid statement generally acts on all available channels, with some specific exceptions.
              (MariaDB) You specify which primary connection you want to work with by either specifying the connection name in the command or setting default_master_connection to the connection you want to work with
            * The channel name supports up to 64 bytes, and is not case sensitive
            * The connection name and for channel syntax cannot be used at the same time, otherwise an error will be reported
            * MariaDB syntax is highly compatible with MySQL, so there is no special SQL_MODE set like Oracle/SQL Server and other databases, FOR CHANNEL is not affected by SQL_MODE

            h1. new syntax for MariaDB
            h2. CHANGE MASTER
            {code:java}
            CHANGE MASTER ['connection_name'] TO master_def [, master_def] ... [FOR CHANNEL 'connection_name']
            {code}

            h2. FLUSH RELAY LOG

            {code:java}
            FLUSH RELAY LOGS ['connection_name' | FOR CHANNEL 'connection_name']
            {code}

            h2. RESET SLAVE

            {code:java}
            RESET SLAVE ['connection_name'] [ALL] [FOR CHANNEL 'connection_name']
            {code}

            h2. SHOW RELAY LOG EVENT

            {code:java}
            SHOW RELAYLOG ['connection_name'] EVENTS [IN 'log_name'] [FROM pos] [LIMIT [offset,] row_count] [ FOR CHANNEL 'connection_name']
            {code}

            h2. SHOW SLAVE STATUS

            {code:java}
            SHOW SLAVE ['connection_name'] STATUS [FOR CHANNEL 'connection_name']
            {code}

            h2. START SLAVE

            {code:java}
            START SLAVE ['connection_name'] [thread_type [, thread_type] ... ] [FOR CHANNEL 'connection_name']
            {code}

            h2. STOP SLAVE

            {code:java}
            STOP SLAVE ['connection_name'] [thread_type [, thread_type] ... ] [FOR CHANNEL 'connection_name']
            {code}

            woqutech.com woqutech.com made changes -
            Description _emphasized text_h1. backugroud
            MariaDB and MySQL both implement the multi-source replication, but their usage and internal implementation are different. In order to facilitate the migration of MySQL users to MariaDB, we want to support MySQL syntax

            h1. describe
            * For CHANGE MASTER/FLUSH RELAY LOG/RESET SLAVE/SHOW RELAY LOG EVENT/SHOW SLAVE STATUS/START SLAVE/STOP SLAVE commands support FOR CHANNEL syntax
            * "FOR CHANNEL" is just an alias for connection\_name, does not change the original implementation, all behaviors are consistent with MariaDB, so some operations are not compatible with MySQL, For example:
              (MySQL) When a replica has multiple channels and a FOR CHANNEL channel option is not specified, a valid statement generally acts on all available channels, with some specific exceptions.
              (MariaDB) You specify which primary connection you want to work with by either specifying the connection name in the command or setting default_master_connection to the connection you want to work with
            * The channel name supports up to 64 bytes, and is not case sensitive
            * The connection name and for channel syntax cannot be used at the same time, otherwise an error will be reported
            * MariaDB syntax is highly compatible with MySQL, so there is no special SQL_MODE set like Oracle/SQL Server and other databases, FOR CHANNEL is not affected by SQL_MODE

            h1. new syntax for MariaDB
            h2. CHANGE MASTER
            {code:java}
            CHANGE MASTER ['connection_name'] TO master_def [, master_def] ... [FOR CHANNEL 'connection_name']
            {code}

            h2. FLUSH RELAY LOG

            {code:java}
            FLUSH RELAY LOGS ['connection_name' | FOR CHANNEL 'connection_name']
            {code}

            h2. RESET SLAVE

            {code:java}
            RESET SLAVE ['connection_name'] [ALL] [FOR CHANNEL 'connection_name']
            {code}

            h2. SHOW RELAY LOG EVENT

            {code:java}
            SHOW RELAYLOG ['connection_name'] EVENTS [IN 'log_name'] [FROM pos] [LIMIT [offset,] row_count] [ FOR CHANNEL 'connection_name']
            {code}

            h2. SHOW SLAVE STATUS

            {code:java}
            SHOW SLAVE ['connection_name'] STATUS [FOR CHANNEL 'connection_name']
            {code}

            h2. START SLAVE

            {code:java}
            START SLAVE ['connection_name'] [thread_type [, thread_type] ... ] [FOR CHANNEL 'connection_name']
            {code}

            h2. STOP SLAVE

            {code:java}
            STOP SLAVE ['connection_name'] [thread_type [, thread_type] ... ] [FOR CHANNEL 'connection_name']
            {code}


            MariaDB and MySQL both implement the multi-source replication, but their usage and internal implementation are different. In order to facilitate the migration of MySQL users to MariaDB, we want to support MySQL syntax

            h1. describe
            * For CHANGE MASTER/FLUSH RELAY LOG/RESET SLAVE/SHOW RELAY LOG EVENT/SHOW SLAVE STATUS/START SLAVE/STOP SLAVE commands support FOR CHANNEL syntax
            * "FOR CHANNEL" is just an alias for connection\_name, does not change the original implementation, all behaviors are consistent with MariaDB, so some operations are not compatible with MySQL, For example:
              (MySQL) When a replica has multiple channels and a FOR CHANNEL channel option is not specified, a valid statement generally acts on all available channels, with some specific exceptions.
              (MariaDB) You specify which primary connection you want to work with by either specifying the connection name in the command or setting default_master_connection to the connection you want to work with
            * The channel name supports up to 64 bytes, and is not case sensitive
            * The connection name and for channel syntax cannot be used at the same time, otherwise an error will be reported
            * MariaDB syntax is highly compatible with MySQL, so there is no special SQL_MODE set like Oracle/SQL Server and other databases, FOR CHANNEL is not affected by SQL_MODE

            h1. new syntax for MariaDB
            h2. CHANGE MASTER
            {code:java}
            CHANGE MASTER ['connection_name'] TO master_def [, master_def] ... [FOR CHANNEL 'connection_name']
            {code}

            h2. FLUSH RELAY LOG

            {code:java}
            FLUSH RELAY LOGS ['connection_name' | FOR CHANNEL 'connection_name']
            {code}

            h2. RESET SLAVE

            {code:java}
            RESET SLAVE ['connection_name'] [ALL] [FOR CHANNEL 'connection_name']
            {code}

            h2. SHOW RELAY LOG EVENT

            {code:java}
            SHOW RELAYLOG ['connection_name'] EVENTS [IN 'log_name'] [FROM pos] [LIMIT [offset,] row_count] [ FOR CHANNEL 'connection_name']
            {code}

            h2. SHOW SLAVE STATUS

            {code:java}
            SHOW SLAVE ['connection_name'] STATUS [FOR CHANNEL 'connection_name']
            {code}

            h2. START SLAVE

            {code:java}
            START SLAVE ['connection_name'] [thread_type [, thread_type] ... ] [FOR CHANNEL 'connection_name']
            {code}

            h2. STOP SLAVE

            {code:java}
            STOP SLAVE ['connection_name'] [thread_type [, thread_type] ... ] [FOR CHANNEL 'connection_name']
            {code}

            woqutech.com woqutech.com made changes -
            Comment [ A comment with security level 'Users' was removed. ]
            monty Michael Widenius made changes -
            Assignee Michael Widenius [ monty ]
            monty Michael Widenius made changes -
            Fix Version/s 10.7.0 [ 26072 ]
            monty Michael Widenius made changes -
            Status Open [ 1 ] In Progress [ 3 ]
            serg Sergei Golubchik made changes -
            Fix Version/s 10.7 [ 24805 ]
            Fix Version/s 10.7.0 [ 26072 ]
            elenst Elena Stepanova made changes -
            woqutech.com woqutech.com made changes -
            Attachment for_chanel_210904.diff [ 58848 ]
            serg Sergei Golubchik made changes -
            Priority Major [ 3 ] Critical [ 2 ]
            serg Sergei Golubchik made changes -
            serg Sergei Golubchik made changes -
            Assignee Michael Widenius [ monty ] Sergei Golubchik [ serg ]
            serg Sergei Golubchik made changes -
            Status In Progress [ 3 ] Stalled [ 10000 ]
            serg Sergei Golubchik made changes -
            Assignee Sergei Golubchik [ serg ] Alice Sherepa [ alice ]
            serg Sergei Golubchik made changes -
            serg Sergei Golubchik made changes -
            Fix Version/s 10.7.0 [ 26072 ]
            Fix Version/s 10.7 [ 24805 ]
            Resolution Fixed [ 1 ]
            Status Stalled [ 10000 ] Closed [ 6 ]
            serg Sergei Golubchik made changes -
            Assignee Alice Sherepa [ alice ] Michael Widenius [ monty ]
            woqutech.com woqutech.com made changes -
            Attachment for_channel_test_210915.diff [ 58988 ]
            serg Sergei Golubchik made changes -
            Workflow MariaDB v3 [ 124110 ] MariaDB v4 [ 134460 ]
            angelique.sklavounos Angelique Sklavounos (Inactive) made changes -
            ralf.gebhardt Ralf Gebhardt made changes -
            Fix Version/s 10.7.1 [ 26120 ]
            Fix Version/s 10.7.0 [ 26072 ]

            People

              monty Michael Widenius
              woqutech.com woqutech.com
              Votes:
              1 Vote for this issue
              Watchers:
              5 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.