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

Master slave replication break CREATE OR REPLACE Table in stored procedure

    XMLWordPrintable

Details

    Description

      With master slave replication, after this script run on master, on the slave got error:
      Replication IO:Yes SQL:No ERR: Error 'Table 'tmp.tmp1' doesn't exist' on query. Default database: 'tmp'. Query: 'INSERT INTO tmp1 SELECT "1"'

      use tmp;
      DROP PROCEDURE if EXISTS p_test_x;
      DELIMITER //
      CREATE PROCEDURE p_test_x()
      BEGIN
      DROP TABLE IF EXISTS t1; 
      CREATE TABLE t1 (a1 VARCHAR(10), PRIMARY KEY (a1)); 
      CREATE 	OR REPLACE TABLE t2 LIKE t1;
      DROP	TEMPORARY TABLE IF EXISTS tmp1; 
      CREATE TEMPORARY TABLE tmp1 ( a2 VARCHAR (10),PRIMARY KEY (a2)); 
      INSERT INTO tmp1 SELECT "1"; 
      END;
      //
       
      DELIMITER ;
       
      CALL p_test_x();
      
      

      Without stored procedure no error. WIth simple create table no error, only after CREATE OR REPLACE TABLE

      binlog_format=row
      binlog_row_image=full
      log-bin-trust-function-creators=1

      Attachments

        Activity

          People

            bnestere Brandon Nesterenko
            bulepage bulepage
            Votes:
            0 Vote for this issue
            Watchers:
            4 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.