diff options
author | Marko Mäkelä <marko.makela@mariadb.com> | 2017-09-20 16:52:11 +0300 |
---|---|---|
committer | Marko Mäkelä <marko.makela@mariadb.com> | 2017-09-20 16:53:34 +0300 |
commit | 96f06f952d087bd47225cc2784edbb0510fad818 (patch) | |
tree | 129c696188132e3661f60218dae29994778dee08 /sql/handler.h | |
parent | e53e58d4e49cb2d4d9deacdc9f1979dbaffbfdba (diff) | |
download | mariadb-git-96f06f952d087bd47225cc2784edbb0510fad818.tar.gz |
MDEV-13847 Allow ALTER TABLE…ADD SPATIAL INDEX…ALGORITHM=INPLACE
MDEV-13851 Always check table options in ALTER TABLE…ALGORITHM=INPLACE
In the merge of MySQL 5.7.9 to MariaDB 10.2.2, some code was included
that prevents ADD SPATIAL INDEX from being executed with ALGORITHM=INPLACE.
Also, the constant ADD_SPATIAL_INDEX was introduced as an alias
to ADD_INDEX. We will remove that alias now, and properly implement
the same ADD SPATIAL INDEX restrictions as MySQL 5.7 does:
1. table-rebuilding operations are not allowed if SPATIAL INDEX survive it
2. ALTER TABLE…ADD SPATIAL INDEX…LOCK=NONE is not allowed
ha_innobase::prepare_inplace_alter_table(): If the ALTER TABLE
requires actions within InnoDB, enforce the table options (MDEV-13851).
In this way, we will keep denying ADD SPATIAL INDEX for tables
that use encryption (MDEV-11974), even if ALGORITHM=INPLACE is used.
Diffstat (limited to 'sql/handler.h')
-rw-r--r-- | sql/handler.h | 4 |
1 files changed, 0 insertions, 4 deletions
diff --git a/sql/handler.h b/sql/handler.h index d021edf28d2..e64d407f202 100644 --- a/sql/handler.h +++ b/sql/handler.h @@ -1852,10 +1852,6 @@ public: // Add non-unique, non-primary index static const HA_ALTER_FLAGS ADD_INDEX = 1ULL << 0; - // - // Adds a spatial index. At the moment all engines treat it - // identically to the ADD_INDEX, so it gets the same code - static const HA_ALTER_FLAGS ADD_SPATIAL_INDEX = ADD_INDEX; // Drop non-unique, non-primary index static const HA_ALTER_FLAGS DROP_INDEX = 1ULL << 1; |