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

Slave SQL: Error 'Table 't' is specified twice (ER_UPDATE_TABLE_USED) upon CREATE TABLE .. SELECT

    XMLWordPrintable

Details

    Description

      --source include/master-slave.inc
      CREATE TEMPORARY TABLE t (i INT);
      CREATE TABLE t AS SELECT * FROM t;
       
      --sync_slave_with_master
       
      # Cleanup
      --connection master
      DROP TEMPORARY TABLE t;
      DROP TABLE t;
      --source include/rpl_end.inc
      

      10.2 36c0116720

      2018-04-13 20:16:21 139886080214784 [ERROR] Slave SQL: Error 'Table 't' is specified twice, both as a target for 'CREATE' and as a separate source for data' on query. Default database: 'test'. Query: 'CREATE TABLE t AS SELECT * FROM t', Gtid 0-1-2, Internal MariaDB error code: 1093
      2018-04-13 20:16:21 139886080214784 [Warning] Slave: Table 't' is specified twice, both as a target for 'CREATE' and as a separate source for data Error_code: 1093
      2018-04-13 20:16:21 139886080214784 [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 470
      

      Reproducible on 10.2, 10.3. Not reproducible on 10.1.

      Attachments

        1. a.txt
          20 kB
          Sachin Setiya

        Issue Links

          Activity

            People

              sachin.setiya.007 Sachin Setiya (Inactive)
              elenst Elena Stepanova
              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.