Uploaded image for project: 'Percona Server'
  1. Percona Server
  2. PS-4125

MyRocks does not support ALTER TABLE ... EXCHANGE PARTITION

    XMLWordPrintable

    Details

      Description

      show create table test.byrange_tbl;
      show create table test.regular_tbl;
      ALTER TABLE test.byrange_tbl EXCHANGE PARTITION pa100 WITH TABLE test.regular_tbl;
      

      The error is:

      CURRENT_TEST: rocksdb.rpl.rpl_rocksdb_partition
      mysqltest: In included file ./suite/rpl/include/rpl_partition.inc at line 73:
      included from /ssd/percona/myrocks/percona-server-install-5.7/mysql-test/suite/rocksdb.rpl/t/rpl_rocksdb_partition.test at line 11:
      At line 73: query 'ALTER TABLE test.byrange_tbl EXCHANGE PARTITION pa100 WITH TABLE test.regular_tbl' failed: 1736: Tables have different definitions
      

      The snippet from the failure log shows a pretty simple and clear failure:

      SELECT count() as "Master regular" FROM test.regular_tbl;
      Master regular
      99
      CALL test.proc_byrange();
      SELECT count() as "Master byrange" FROM test.byrange_tbl;
      Master byrange
      200
      show create table test.byrange_tbl;
      Table Create Table
      byrange_tbl CREATE TABLE byrange_tbl (
      id int(11) NOT NULL AUTO_INCREMENT,
      dt timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP,
      user char(255) DEFAULT NULL,
      uuidf varbinary(255) DEFAULT NULL,
      fkid int(11) DEFAULT NULL,
      filler varchar(255) DEFAULT NULL,
      PRIMARY KEY (id)
      ) ENGINE=ROCKSDB AUTO_INCREMENT=201 DEFAULT CHARSET=latin1
      /*!50100 PARTITION BY RANGE (id)
      (PARTITION pa100 VALUES LESS THAN (100) ENGINE = ROCKSDB,
      PARTITION paMax VALUES LESS THAN MAXVALUE ENGINE = ROCKSDB) */
      show create table test.regular_tbl;
      Table Create Table
      regular_tbl CREATE TABLE regular_tbl (
      id int(11) NOT NULL AUTO_INCREMENT,
      dt timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP,
      user char(255) DEFAULT NULL,
      uuidf varbinary(255) DEFAULT NULL,
      fkid int(11) DEFAULT NULL,
      filler varchar(255) DEFAULT NULL,
      PRIMARY KEY (id)
      ) ENGINE=ROCKSDB AUTO_INCREMENT=100 DEFAULT CHARSET=latin1
      

        Smart Checklist

          Attachments

            Issue Links

              Activity

                People

                • Assignee:
                  Unassigned
                  Reporter:
                  george.lorch George Lorch
                • Votes:
                  0 Vote for this issue
                  Watchers:
                  1 Start watching this issue

                  Dates

                  • Created:
                    Updated: