From 1be451ca797f59b23e70edf02d9c17a29c19e608 Mon Sep 17 00:00:00 2001 From: Alexander Barkov Date: Fri, 7 Oct 2022 13:39:02 +0400 Subject: Revert "MDEV-28727 ALTER TABLE ALGORITHM=NOCOPY does not work after upgrade" This reverts commit 1ea5e402a89a1e3fb9ba8045e58570d23837714a --- mysql-test/std_data/mdev-28727-pet4.frm | Bin 934 -> 0 bytes 1 file changed, 0 insertions(+), 0 deletions(-) delete mode 100644 mysql-test/std_data/mdev-28727-pet4.frm (limited to 'mysql-test/std_data') diff --git a/mysql-test/std_data/mdev-28727-pet4.frm b/mysql-test/std_data/mdev-28727-pet4.frm deleted file mode 100644 index 3ff86d1dca1..00000000000 Binary files a/mysql-test/std_data/mdev-28727-pet4.frm and /dev/null differ -- cgit v1.2.1 From 2a57396e59e42cbfac51bed5231c2bdb2d7fe39a Mon Sep 17 00:00:00 2001 From: Alexander Barkov Date: Fri, 21 Oct 2022 12:33:22 +0400 Subject: MDEV-29481 mariadb-upgrade prints confusing statement This is a new version of the patch instead of the reverted: MDEV-28727 ALTER TABLE ALGORITHM=NOCOPY does not work after upgrade Ignore the difference in key packing flags HA_BINARY_PACK_KEY and HA_PACK_KEY during ALTER to allow ALGORITHM=INSTANT and ALGORITHM=NOCOPY in more cases. If for some reasons (e.g. due to a bug fix such as MDEV-20704) these cumulative (over all segments) flags in KEY::flags are different for the old and new table inside compare_keys_but_name(), the difference in HA_BINARY_PACK_KEY and HA_PACK_KEY in KEY::flags is not really important: MyISAM and Aria can handle such cases well: per-segment flags are stored in MYI and MAI files anyway and they are read during ha_myisam::open() ha_maria::open() time. So indexes get opened with correct per-segment flags that were calculated during the table CREATE time, no matter what the old (CREATE time) and new (ALTER TIME) per-index compression flags are, and no matter if they are equal or not. All other engine ignore key compression flags, so this change is safe for other engines as well. --- .../std_data/mysql_upgrade/mdev29481_100104_aria.MAD | Bin 0 -> 8192 bytes .../std_data/mysql_upgrade/mdev29481_100104_aria.MAI | Bin 0 -> 8192 bytes .../std_data/mysql_upgrade/mdev29481_100104_aria.frm | Bin 0 -> 923 bytes .../std_data/mysql_upgrade/mdev29481_100104_innodb.frm | Bin 0 -> 934 bytes .../std_data/mysql_upgrade/mdev29481_100104_myisam.MYD | 0 .../std_data/mysql_upgrade/mdev29481_100104_myisam.MYI | Bin 0 -> 1024 bytes .../std_data/mysql_upgrade/mdev29481_100104_myisam.frm | Bin 0 -> 925 bytes 7 files changed, 0 insertions(+), 0 deletions(-) create mode 100644 mysql-test/std_data/mysql_upgrade/mdev29481_100104_aria.MAD create mode 100644 mysql-test/std_data/mysql_upgrade/mdev29481_100104_aria.MAI create mode 100644 mysql-test/std_data/mysql_upgrade/mdev29481_100104_aria.frm create mode 100644 mysql-test/std_data/mysql_upgrade/mdev29481_100104_innodb.frm create mode 100644 mysql-test/std_data/mysql_upgrade/mdev29481_100104_myisam.MYD create mode 100644 mysql-test/std_data/mysql_upgrade/mdev29481_100104_myisam.MYI create mode 100644 mysql-test/std_data/mysql_upgrade/mdev29481_100104_myisam.frm (limited to 'mysql-test/std_data') diff --git a/mysql-test/std_data/mysql_upgrade/mdev29481_100104_aria.MAD b/mysql-test/std_data/mysql_upgrade/mdev29481_100104_aria.MAD new file mode 100644 index 00000000000..3dcc005ec0d Binary files /dev/null and b/mysql-test/std_data/mysql_upgrade/mdev29481_100104_aria.MAD differ diff --git a/mysql-test/std_data/mysql_upgrade/mdev29481_100104_aria.MAI b/mysql-test/std_data/mysql_upgrade/mdev29481_100104_aria.MAI new file mode 100644 index 00000000000..d11da43bf2b Binary files /dev/null and b/mysql-test/std_data/mysql_upgrade/mdev29481_100104_aria.MAI differ diff --git a/mysql-test/std_data/mysql_upgrade/mdev29481_100104_aria.frm b/mysql-test/std_data/mysql_upgrade/mdev29481_100104_aria.frm new file mode 100644 index 00000000000..81d7672c405 Binary files /dev/null and b/mysql-test/std_data/mysql_upgrade/mdev29481_100104_aria.frm differ diff --git a/mysql-test/std_data/mysql_upgrade/mdev29481_100104_innodb.frm b/mysql-test/std_data/mysql_upgrade/mdev29481_100104_innodb.frm new file mode 100644 index 00000000000..3ff86d1dca1 Binary files /dev/null and b/mysql-test/std_data/mysql_upgrade/mdev29481_100104_innodb.frm differ diff --git a/mysql-test/std_data/mysql_upgrade/mdev29481_100104_myisam.MYD b/mysql-test/std_data/mysql_upgrade/mdev29481_100104_myisam.MYD new file mode 100644 index 00000000000..e69de29bb2d diff --git a/mysql-test/std_data/mysql_upgrade/mdev29481_100104_myisam.MYI b/mysql-test/std_data/mysql_upgrade/mdev29481_100104_myisam.MYI new file mode 100644 index 00000000000..d36f27ac0cf Binary files /dev/null and b/mysql-test/std_data/mysql_upgrade/mdev29481_100104_myisam.MYI differ diff --git a/mysql-test/std_data/mysql_upgrade/mdev29481_100104_myisam.frm b/mysql-test/std_data/mysql_upgrade/mdev29481_100104_myisam.frm new file mode 100644 index 00000000000..afffafabbb1 Binary files /dev/null and b/mysql-test/std_data/mysql_upgrade/mdev29481_100104_myisam.frm differ -- cgit v1.2.1