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

REORGANIZE PARTITION is not working well on LIST COLUMNS partition type

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Confirmed (View Workflow)
    • Priority: Major
    • Resolution: Unresolved
    • Affects Version/s: 10.2, 10.3, 10.4, 10.3.13
    • Fix Version/s: 10.2, 10.3, 10.4
    • Component/s: Partitioning
    • Labels:
      None
    • Environment:
      centos7

      Description

      Hi, I have a question about partition reorganizing while I'm trying to test.

      I use LIST COLUMNS type and DEFAULT partition.

      I want to split (reorganize) specific value of DEFAULT partition into other new partitions.

      Here is the script.

      ---------------------------------------------------------------------------------------------------

      CREATE TABLE PAR_TEST
      (
      COL VARCHAR(6)
      );

      ALTER TABLE PAR_TEST PARTITION BY LIST COLUMNS (COL) (
      PARTITION P_00000 VALUES IN ('00000'),
      PARTITION P_00001 VALUES IN ('00001'),
      PARTITION P_00002 VALUES IN ('00002'),
      PARTITION P_00003 VALUES IN ('00003'),
      PARTITION P_00004 VALUES IN ('00004'),
      PARTITION P_DEFAULT DEFAULT);

      INSERT INTO PAR_TEST
      VALUES ('00000'),('00001'),('00002'),('00003'),('00004'),('11111'),('22222'),('22222'), ('TEST'), ('TEST1');

      -------------------------------------------------------------------------------------------------

      <TEST1>
      ALTER TABLE PAR_TEST
      REORGANIZE PARTITION P_DEFAULT INTO
      (PARTITION P_DEFAULT DEFAULT, PARTITION P_11111 VALUES IN ('11111'), PARTITION P_22222 VALUES IN ('22222')
      );

      <TEST2>
      ALTER TABLE PAR_TEST
      REORGANIZE PARTITION P_DEFAULT INTO
      (PARTITION P_11111 VALUES IN ('11111'), PARTITION P_22222 VALUES IN ('22222'),PARTITION P_DEFAULT DEFAULT
      );

      --------------------------------------------------------------------------------------------------

      The only difference between TEST1 AND TEST2 is just the order of 'P_11111' and 'P_DEFAULT'

      in REORGANIZE PARTITION clause.

      When I select a certain partition, TEST1 shows the result what I expected.

      But, If I select DEFAULT partition, it shows nothing.
      (SELECT * FROM PAR_TEST PARTITION(P_DEFAULT); -> no result)

      And the values which should be in DEFAULT partition are in 'P_11111' partition.
      (SELECT * FROM PAR_TEST PARTITION(P_11111); -> 11111, TEST, TEST1 (3 rows))

      I wonder if it is intended or bug.

      Thank you.

        Attachments

          Activity

            People

            Assignee:
            igor Igor Babaev
            Reporter:
            snipersaga Cho
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Dates

              Created:
              Updated: