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

ALTER DATA DIRECTORY in PARTITIONS of InnoDB storage does nothing silently

    XMLWordPrintable

    Details

      Description

      It is documented that InnoDB ignores DATA DIRECTORY for partitions on ALTER TABLE. But it ignores it silently and that's an issue. In contrast altering DATA DIRECTORY for table (not partitions) issues a warning for both InnoDB and MyISAM.

      https://mariadb.com/kb/en/library/create-table/#data-directoryindex-directory

      CREATE TABLE t (
      a INT NOT NULL
      ) ENGINE=INNODB
      PARTITION BY HASH (a) (
      PARTITION p1 DATA DIRECTORY = 'MYSQLTEST_VARDIR/tmp/partitions_here/' ENGINE = INNODB,
      PARTITION p2 DATA DIRECTORY = 'MYSQLTEST_VARDIR/tmp/partitions_here/' ENGINE = INNODB
      );
      INSERT INTO t VALUES (1);
      ALTER TABLE t REORGANIZE PARTITION p1,p2 INTO (
      PARTITION p1 DATA DIRECTORY = 'MYSQLTEST_VARDIR/tmp/partitions_somewhere_else/' ENGINE = INNODB,
      PARTITION p2 DATA DIRECTORY = 'MYSQLTEST_VARDIR/tmp/partitions_somewhere_else/' ENGINE = INNODB
      );
      SHOW CREATE TABLE t;
      Table	Create Table
      t	CREATE TABLE `t` (
        `a` int(11) NOT NULL
      ) ENGINE=InnoDB DEFAULT CHARSET=latin1
      /*!50100 PARTITION BY HASH (a)
      (PARTITION p1 DATA DIRECTORY = 'MYSQLTEST_VARDIR/tmp/partitions_here' ENGINE = InnoDB,
       PARTITION p2 DATA DIRECTORY = 'MYSQLTEST_VARDIR/tmp/partitions_here' ENGINE = InnoDB) */
      select * from t;
      a
      1
      DROP TABLE t;
      

      The fix is to add a warning for that case.

        Attachments

          Issue Links

            Activity

              People

              Assignee:
              holyfoot Alexey Botchkov
              Reporter:
              kevg Eugene Kosov
              Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

                Dates

                Created:
                Updated:
                Resolved: