diff options
author | Alexander Barkov <bar@mariadb.com> | 2022-10-21 12:33:22 +0400 |
---|---|---|
committer | Alexander Barkov <bar@mariadb.com> | 2022-10-22 14:22:20 +0400 |
commit | 2a57396e59e42cbfac51bed5231c2bdb2d7fe39a (patch) | |
tree | b6b93788f54e1449f0f72cba156cb622df83c4c8 /include | |
parent | 1be451ca797f59b23e70edf02d9c17a29c19e608 (diff) | |
download | mariadb-git-2a57396e59e42cbfac51bed5231c2bdb2d7fe39a.tar.gz |
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.
Diffstat (limited to 'include')
-rw-r--r-- | include/my_base.h | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/include/my_base.h b/include/my_base.h index 7016766ce58..d045251778f 100644 --- a/include/my_base.h +++ b/include/my_base.h @@ -272,8 +272,8 @@ enum ha_base_keytype { #define HA_GENERATED_KEY 8192U /* Automatically generated key */ /* The combination of the above can be used for key type comparison. */ -#define HA_KEYFLAG_MASK (HA_NOSAME | HA_PACK_KEY | HA_AUTO_KEY | \ - HA_BINARY_PACK_KEY | HA_FULLTEXT | HA_UNIQUE_CHECK | \ +#define HA_KEYFLAG_MASK (HA_NOSAME | HA_AUTO_KEY | \ + HA_FULLTEXT | HA_UNIQUE_CHECK | \ HA_SPATIAL | HA_NULL_ARE_EQUAL | HA_GENERATED_KEY) /* |