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

Replication aborts with ER_SLAVE_CONVERSION_FAILED upon CREATE ... SELECT in ORACLE mode

Details

    Description

      Test case 1

      --source include/have_binlog_format_row.inc
      --source include/master-slave.inc
       
      CREATE TABLE t1 (a BLOB);
      INSERT INTO t1 VALUES (0);
      SET SQL_MODE= 'ORACLE';
      CREATE TABLE t2 SELECT * FROM t1;
      --sync_slave_with_master
       
      # Cleanup
      --connection master
      DROP TABLE t1, t2;
      --source include/rpl_end.inc
      

      10.3 617d34ae

      2019-05-29 15:19:53 13 [ERROR] Slave SQL: Column 0 of table 'test.t2' cannot be converted from type 'tinyblob' to type 'longblob', Gtid 0-1-3, Internal MariaDB error code: 1677
      2019-05-29 15:19:53 13 [ERROR] Error running query, slave SQL thread aborted. Fix the problem, and restart the slave SQL thread with "SLAVE START". We stopped at log 'master-bin.000001' position 708
      

      master-bin.000001	708	Gtid	1	750	BEGIN GTID 0-1-3
      master-bin.000001	750	Query	1	862	use `test`; CREATE TABLE "t2" (
        "a" blob DEFAULT NULL
      )
      master-bin.000001	862	Annotate_rows	1	917	CREATE TABLE t2 SELECT * FROM t1
      master-bin.000001	917	Table_map	1	963	table_id: 33 (test.t2)
      master-bin.000001	963	Write_rows_v1	1	1000	table_id: 33 flags: STMT_END_F
      master-bin.000001	1000	Query	1	1073	COMMIT
      

      Same idea, different types:

      Test case 2

      --source include/have_binlog_format_row.inc
      --source include/master-slave.inc
       
      CREATE TABLE t1 (a DATE);
      INSERT INTO t1 VALUES (NULL);
      SET SQL_MODE= 'ORACLE';
      CREATE TABLE t2 SELECT * FROM t1;
      --sync_slave_with_master
       
      # Cleanup
      --connection master
      DROP TABLE t1, t2;
      --source include/rpl_end.inc
      

      2019-05-29 19:53:05 13 [ERROR] Slave SQL: Column 0 of table 'test.t2' cannot be converted from type 'date' to type 'datetime', Gtid 0-1-3, Internal MariaDB error code: 1677
      2019-05-29 19:53:05 13 [ERROR] Error running query, slave SQL thread aborted. Fix the problem, and restart the slave SQL thread with "SLAVE START". We stopped at log 'master-bin.000001' position 707
      

      Attachments

        Issue Links

          Activity

            elenst Elena Stepanova created issue -
            elenst Elena Stepanova made changes -
            Field Original Value New Value
            Description {code:sql}
            --source include/have_binlog_format_row.inc
            --source include/master-slave.inc

            CREATE TABLE t1 (a BLOB);
            INSERT INTO t1 VALUES (0);
            SET SQL_MODE= 'ORACLE';
            CREATE TABLE t2 SELECT * FROM t1;
            --sync_slave_with_master

            # Cleanup
            --connection master
            DROP TABLE t1, t2;
            --source include/rpl_end.inc
            {code}

            {noformat:title=10.3 617d34ae}
            2019-05-29 15:19:53 13 [ERROR] Slave SQL: Column 0 of table 'test.t2' cannot be converted from type 'tinyblob' to type 'longblob', Gtid 0-1-3, Internal MariaDB error code: 1677
            2019-05-29 15:19:53 13 [ERROR] Error running query, slave SQL thread aborted. Fix the problem, and restart the slave SQL thread with "SLAVE START". We stopped at log 'master-bin.000001' position 708
            {noformat}
            {noformat}
            master-bin.000001 708 Gtid 1 750 BEGIN GTID 0-1-3
            master-bin.000001 750 Query 1 862 use `test`; CREATE TABLE "t2" (
              "a" blob DEFAULT NULL
            )
            master-bin.000001 862 Annotate_rows 1 917 CREATE TABLE t2 SELECT * FROM t1
            master-bin.000001 917 Table_map 1 963 table_id: 33 (test.t2)
            master-bin.000001 963 Write_rows_v1 1 1000 table_id: 33 flags: STMT_END_F
            master-bin.000001 1000 Query 1 1073 COMMIT
            {noformat}
            {code:sql|title=Test case 1}
            --source include/have_binlog_format_row.inc
            --source include/master-slave.inc

            CREATE TABLE t1 (a BLOB);
            INSERT INTO t1 VALUES (0);
            SET SQL_MODE= 'ORACLE';
            CREATE TABLE t2 SELECT * FROM t1;
            --sync_slave_with_master

            # Cleanup
            --connection master
            DROP TABLE t1, t2;
            --source include/rpl_end.inc
            {code}

            {noformat:title=10.3 617d34ae}
            2019-05-29 15:19:53 13 [ERROR] Slave SQL: Column 0 of table 'test.t2' cannot be converted from type 'tinyblob' to type 'longblob', Gtid 0-1-3, Internal MariaDB error code: 1677
            2019-05-29 15:19:53 13 [ERROR] Error running query, slave SQL thread aborted. Fix the problem, and restart the slave SQL thread with "SLAVE START". We stopped at log 'master-bin.000001' position 708
            {noformat}
            {noformat}
            master-bin.000001 708 Gtid 1 750 BEGIN GTID 0-1-3
            master-bin.000001 750 Query 1 862 use `test`; CREATE TABLE "t2" (
              "a" blob DEFAULT NULL
            )
            master-bin.000001 862 Annotate_rows 1 917 CREATE TABLE t2 SELECT * FROM t1
            master-bin.000001 917 Table_map 1 963 table_id: 33 (test.t2)
            master-bin.000001 963 Write_rows_v1 1 1000 table_id: 33 flags: STMT_END_F
            master-bin.000001 1000 Query 1 1073 COMMIT
            {noformat}

            Same idea, different types:
            {code:sql|title=Test case 2}
            --source include/have_binlog_format_row.inc
            --source include/master-slave.inc

            CREATE TABLE t1 (a DATE);
            INSERT INTO t1 VALUES (NULL);
            SET SQL_MODE= 'ORACLE';
            CREATE TABLE t2 SELECT * FROM t1;
            --sync_slave_with_master

            # Cleanup
            --connection master
            DROP TABLE t1, t2;
            --source include/rpl_end.inc
            {code}

            {noformat}
            2019-05-29 19:53:05 13 [ERROR] Slave SQL: Column 0 of table 'test.t2' cannot be converted from type 'date' to type 'datetime', Gtid 0-1-3, Internal MariaDB error code: 1677
            2019-05-29 19:53:05 13 [ERROR] Error running query, slave SQL thread aborted. Fix the problem, and restart the slave SQL thread with "SLAVE START". We stopped at log 'master-bin.000001' position 707
            {noformat}
            sujatha.sivakumar Sujatha Sivakumar (Inactive) made changes -
            Status Open [ 1 ] Confirmed [ 10101 ]
            sujatha.sivakumar Sujatha Sivakumar (Inactive) made changes -
            Assignee Andrei Elkin [ elkin ] Sujatha Sivakumar [ sujatha.sivakumar ]
            sujatha.sivakumar Sujatha Sivakumar (Inactive) made changes -
            Status Confirmed [ 10101 ] In Progress [ 3 ]
            bar Alexander Barkov made changes -
            ralf.gebhardt Ralf Gebhardt made changes -
            Affects Version/s 10.3.18 [ 23719 ]
            Affects Version/s 10.3.16 [ 23410 ]
            julien.fritsch Julien Fritsch made changes -
            Priority Major [ 3 ] Critical [ 2 ]
            bar Alexander Barkov made changes -
            bar Alexander Barkov made changes -
            Assignee Sujatha Sivakumar [ sujatha.sivakumar ] Alexander Barkov [ bar ]
            bar Alexander Barkov made changes -
            bar Alexander Barkov made changes -
            Assignee Alexander Barkov [ bar ] Sergei Golubchik [ serg ]
            Status In Progress [ 3 ] In Review [ 10002 ]
            serg Sergei Golubchik made changes -
            Assignee Sergei Golubchik [ serg ] Alexander Barkov [ bar ]
            Status In Review [ 10002 ] Stalled [ 10000 ]
            bar Alexander Barkov made changes -
            bar Alexander Barkov made changes -
            Fix Version/s 10.3.24 [ 24306 ]
            Fix Version/s 10.4.14 [ 24305 ]
            Fix Version/s 10.5.5 [ 24423 ]
            Fix Version/s 10.3 [ 22126 ]
            Fix Version/s 10.4 [ 22408 ]
            Resolution Fixed [ 1 ]
            Status Stalled [ 10000 ] Closed [ 6 ]
            Elkin Andrei Elkin made changes -
            Labels oracle
            serg Sergei Golubchik made changes -
            Workflow MariaDB v3 [ 97136 ] MariaDB v4 [ 156283 ]
            mariadb-jira-automation Jira Automation (IT) made changes -
            Zendesk Related Tickets 112216 146398

            People

              bar Alexander Barkov
              elenst Elena Stepanova
              Votes:
              1 Vote for this issue
              Watchers:
              11 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.