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

ALGORITHM=INSTANT does not work for partitioned tables on indexed column

Details

    Description

      If a table have partitions and you try to change a column
      (modify or change) with an index, which is not the partitions key,
      algorithm = instant not work.

      MariaDB [l1]> ALTER online TABLE t1 MODIFY COLUMN `f4`  VARCHAR(500) , ALGORITHM=INSTANT, LOCK=NONE;
      ERROR 1846 (0A000): ALGORITHM=INSTANT is not supported. Reason: ADD INDEX. Try ALGORITHM=NOCOPY
      

      To reproduce:

       
       
      drop table if exists t1;
       
       
      CREATE TABLE `t1` ( 
          `f1` datetime , 
          `f2` VARCHAR(2)  , 
          `f3` VARCHAR(200) ,
          `f4` VARCHAR(100)  ,
          INDEX `i3` (`f4`)  ) 
          /*!50100 PARTITION BY RANGE COLUMNS(`f2`) (PARTITION `p_01` VALUES LESS THAN ('02') ENGINE = InnoDB,  PARTITION `p_31` VALUES LESS THAN (MAXVALUE) ENGINE = InnoDB) */;
       
       
      ALTER online TABLE t1 MODIFY COLUMN `f4`  VARCHAR(500) , ALGORITHM=INSTANT, LOCK=NONE;
      

      If you do the testcase without index
      OR !
      without partition term,
      it works.

      Attachments

        Issue Links

          Activity

            Richard Richard Stracke created issue -
            Richard Richard Stracke made changes -
            Field Original Value New Value
            mariadb-jira-automation Jira Automation (IT) made changes -
            Zendesk Related Tickets 204836
            Zendesk active tickets 204836
            marko Marko Mäkelä made changes -
            JIraAutomate JiraAutomate made changes -
            Fix Version/s 10.5 [ 23123 ]
            Fix Version/s 10.6 [ 24028 ]
            julien.fritsch Julien Fritsch made changes -
            Fix Version/s 10.5 [ 23123 ]
            julien.fritsch Julien Fritsch made changes -
            Assignee Oleksandr Byelkin [ sanja ]
            julien.fritsch Julien Fritsch made changes -
            Status Open [ 1 ] Confirmed [ 10101 ]
            julien.fritsch Julien Fritsch made changes -
            Priority Major [ 3 ] Critical [ 2 ]
            thiru Thirunarayanan Balathandayuthapani made changes -
            Assignee Oleksandr Byelkin [ sanja ] Yuchen Pei [ JIRAUSER52627 ]
            thiru Thirunarayanan Balathandayuthapani made changes -
            thiru Thirunarayanan Balathandayuthapani made changes -
            julien.fritsch Julien Fritsch made changes -
            Affects Version/s 10.5 [ 23123 ]
            julien.fritsch Julien Fritsch made changes -
            Fix Version/s 10.5 [ 23123 ]
            ycp Yuchen Pei made changes -
            Assignee Yuchen Pei [ JIRAUSER52627 ] Alexey Botchkov [ holyfoot ]
            Status Confirmed [ 10101 ] In Review [ 10002 ]
            holyfoot Alexey Botchkov made changes -
            Assignee Alexey Botchkov [ holyfoot ] Yuchen Pei [ JIRAUSER52627 ]
            Status In Review [ 10002 ] Stalled [ 10000 ]
            ycp Yuchen Pei made changes -
            Fix Version/s 10.5.28 [ 29952 ]
            Fix Version/s 10.5 [ 23123 ]
            Fix Version/s 10.6 [ 24028 ]
            Resolution Fixed [ 1 ]
            Status Stalled [ 10000 ] Closed [ 6 ]
            JIraAutomate JiraAutomate made changes -
            Fix Version/s 10.6.21 [ 29953 ]
            Fix Version/s 10.11.11 [ 29954 ]
            Fix Version/s 11.4.5 [ 29956 ]
            Fix Version/s 11.7.2 [ 29914 ]

            People

              ycp Yuchen Pei
              Richard Richard Stracke
              Votes:
              1 Vote for this issue
              Watchers:
              7 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.