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

add partition should not reset data directory back to default

    XMLWordPrintable

Details

    • New Feature
    • Status: Open (View Workflow)
    • Major
    • Resolution: Unresolved
    • None
    • None

    Description

      This is a new feature request of MDEV-27065. Copying the same scenario from MDEV-27065
      What we want here is that alter table <tablename> partition... statement should not change previously configured data directory option for the table.

       
      create table partest(
      id int(10) unsigned not null auto_increment,
      val int(10) unsigned not null default 0,
      primary key (id, val)
      ) engine=InnoDB
      default charset=utf8mb4
      data directory='/tmp/maria-partest/';
       
      insert into partest(val) values(1);
      insert into partest(val) values(1001);
       
      ~# ls -alh /tmp/maria-partest/test/
      total 128K
      drwxrwx--- 2 mysql mysql   25 Nov 16 23:01 .
      drwxrwx--- 3 mysql mysql   18 Nov 16 22:55 ..
      -rw-rw---- 1 mysql mysql 128K Nov 16 23:01 partest.ibd
       
      ~# ls -alh /var/lib/mysql/test/
      total 12K
      drwx------ 2 mysql mysql  58 Nov 16 23:22 .
      drwxr-xr-x 5 mysql mysql 289 Nov 16 22:49 ..
      -rw-rw---- 1 mysql mysql  65 Nov 16 21:39 db.opt
      -rw-rw---- 1 mysql mysql 947 Nov 16 23:22 partest.frm
      -rw-rw---- 1 mysql mysql  35 Nov 16 23:22 partest.isl
       
      alter table partest partition by range(val)(
      partition p0 values less than (1000),
      partition p1 values less than (2000),
      partition pFFFF values less than maxvalue
      );
       
      ~# ls -alh /tmp/maria-partest/test/
      total 0
      drwxrwx--- 2 mysql mysql  6 Nov 16 23:09 .
      drwxrwx--- 3 mysql mysql 18 Nov 16 22:55 ..
       
      ~# ls -alh /var/lib/mysql/test/
      total 300K
      drwx------ 2 mysql mysql  133 Nov 16 23:11 .
      drwxr-xr-x 5 mysql mysql  289 Nov 16 22:49 ..
      -rw-rw---- 1 mysql mysql   65 Nov 16 21:39 db.opt
      -rw-rw---- 1 mysql mysql 1.2K Nov 16 23:11 partest.frm
      -rw-rw---- 1 mysql mysql   44 Nov 16 23:11 partest.par
      -rw-rw---- 1 mysql mysql  96K Nov 16 23:09 partest#P#p0.ibd
      -rw-rw---- 1 mysql mysql  96K Nov 16 23:09 partest#P#p1.ibd
      -rw-rw---- 1 mysql mysql  96K Nov 16 23:09 partest#P#pFFFF.ibd

      Attachments

        Issue Links

          Activity

            People

              ralf.gebhardt Ralf Gebhardt
              allen.lee@mariadb.com Allen Lee (Inactive)
              Votes:
              0 Vote for this issue
              Watchers:
              4 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.