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

ERROR 1731 (HY000): Non matching attribute 'TABLE OPTION' between partition and table

    XMLWordPrintable

Details

    • Not for Release Notes

    Description

      13.0.1-opt>CREATE TABLE pt (id INT, a VARCHAR) ENGINE=InnoDB
          ->   PARTITION BY RANGE (id) (PARTITION p0 VALUES LESS THAN (100),
          ->                            PARTITION pm VALUES LESS THAN MAXVALUE);
      Query OK, 0 rows affected (0.025 sec)
       
      13.0.1-opt>
      13.0.1-opt>CREATE TABLE swap (id INT, a VARCHAR) ENGINE=InnoDB;
      Query OK, 0 rows affected (0.009 sec)
       
      13.0.1-opt>ALTER TABLE pt EXCHANGE PARTITION p0 WITH TABLE swap;
      ERROR 1731 (HY000): Non matching attribute 'TABLE OPTION' between partition and table
      13.0.1-opt>
      

      MTR test

      --source include/have_innodb.inc
      --source include/have_partition.inc
       
      # with datatype TEXT exchanges successfully.
      CREATE TABLE pt (id INT, a TEXT) ENGINE=InnoDB
        PARTITION BY RANGE (id) (PARTITION p0 VALUES LESS THAN (100),
                                 PARTITION pm VALUES LESS THAN MAXVALUE);
      CREATE TABLE swap (id INT, a TEXT) ENGINE=InnoDB;
      ALTER TABLE pt EXCHANGE PARTITION p0 WITH TABLE swap;   # OK
      DROP TABLE pt, swap;
       
      # identical structure declared with a no-length VARCHAR fails with 1731.
       
      CREATE TABLE pt (id INT, a VARCHAR) ENGINE=InnoDB
        PARTITION BY RANGE (id) (PARTITION p0 VALUES LESS THAN (100),
                                 PARTITION pm VALUES LESS THAN MAXVALUE);
      CREATE TABLE swap (id INT, a VARCHAR) ENGINE=InnoDB;
      ALTER TABLE pt EXCHANGE PARTITION p0 WITH TABLE swap;
       
      # Cleanup
      DROP TABLE pt, swap;
      

      Attachments

        Issue Links

          Activity

            People

              gkodinov Georgi Kodinov
              ramesh Ramesh Sivaraman
              Votes:
              0 Vote for this issue
              Watchers:
              1 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.