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

ALTER TABLE ... DELAY_KEY_WRITE=1 creates table copy for partitioned MyISAM table with DATA DIRECTORY/INDEX DIRECTORY options

    Details

    • Sprint:
      10.2.12

      Description

      It seems MDEV-13636 was NOT fixed for the case of partitioned MyISAM table that uses DATA DIRECTORY/INDEX DIRECTORY to store partitions. Check the following:

      MariaDB [test]> create table tmi_part_dd ( c1 int, c2 int, c3 varchar(100)) engine=MyISAM delay_key_write=1 partition by key(c1) (partition p01 data directory = '/tmp' index directory = '/tmp' engine = MyISAM, partition p02 data directory = '/tmp' index directory = '/tmp' engine=MyISAM);
      Query OK, 0 rows affected (0.07 sec)
       
      MariaDB [test]> insert into tmi_part_dd values (1, 1, repeat('a', 100));
      Query OK, 1 row affected (0.03 sec)
       
      MariaDB [test]> insert into tmi_part_dd select rand()*1000, rand()*1000, repeat('b', 100) from tmi_part_dd;
      Query OK, 1 row affected (0.01 sec)
      Records: 1  Duplicates: 0  Warnings: 0
       
      MariaDB [test]> insert into tmi_part_dd select rand()*1000, rand()*1000, repeat('b', 100) from tmi_part_dd;
      Query OK, 2 rows affected (0.00 sec)
      Records: 2  Duplicates: 0  Warnings: 0
       
      MariaDB [test]> insert into tmi_part_dd select rand()*1000, rand()*1000, repeat('b', 100) from tmi_part_dd;
      Query OK, 4 rows affected (0.00 sec)
      Records: 4  Duplicates: 0  Warnings: 0
       
      ...
       
      MariaDB [test]> alter table tmi_part_dd delay_key_write=0;
      Stage: 2 of 2 'enabling keys'      0% of stage done
       
      Query OK, 2097152 rows affected (3.24 sec)
      Records: 2097152  Duplicates: 0  Warnings: 0
       
      MariaDB [test]> alter table tmi_part_dd delay_key_write=1;
      Query OK, 2097152 rows affected (1.94 sec)
      Records: 2097152  Duplicates: 0  Warnings: 0
       
      MariaDB [test]> select version();
      +----------------+
      | version()      |
      +----------------+
      | 10.2.9-MariaDB |
      +----------------+
      1 row in set (0.00 sec)
       
      MariaDB [test]> \! ls /tmp/*.M*
      /tmp/tmi_part_dd#P#p01.MYD  /tmp/tmi_part_dd#P#p02.MYD
      /tmp/tmi_part_dd#P#p01.MYI  /tmp/tmi_part_dd#P#p02.MYI
      

        Attachments

          Issue Links

            Activity

              People

              • Assignee:
                serg Sergei Golubchik
                Reporter:
                valerii Valerii Kravchuk
              • Votes:
                0 Vote for this issue
                Watchers:
                3 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved: