summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--storage/innobase/include/dict0mem.h12
-rw-r--r--storage/innobase/row/row0ins.cc3
2 files changed, 14 insertions, 1 deletions
diff --git a/storage/innobase/include/dict0mem.h b/storage/innobase/include/dict0mem.h
index 0b690bb865e..9bccd6b2afa 100644
--- a/storage/innobase/include/dict0mem.h
+++ b/storage/innobase/include/dict0mem.h
@@ -2382,6 +2382,18 @@ public:
static dict_table_t *create(const span<const char> &name, fil_space_t *space,
ulint n_cols, ulint n_v_cols, ulint flags,
ulint flags2);
+
+ /** Check whether the table has any spatial indexes */
+ bool has_spatial_index()
+ {
+ for (auto i= UT_LIST_GET_FIRST(indexes);
+ (i= UT_LIST_GET_NEXT(indexes, i)) != nullptr; )
+ {
+ if (i->type & DICT_SPATIAL)
+ return true;
+ }
+ return false;
+ }
};
inline void dict_index_t::set_modified(mtr_t& mtr) const
diff --git a/storage/innobase/row/row0ins.cc b/storage/innobase/row/row0ins.cc
index 1967ec42154..0db0ffdd094 100644
--- a/storage/innobase/row/row0ins.cc
+++ b/storage/innobase/row/row0ins.cc
@@ -2638,7 +2638,8 @@ commit_exit:
&& !index->table->skip_alter_undo
&& !index->table->n_rec_locks
&& !trx->is_wsrep() /* FIXME: MDEV-24623 */
- && !thd_is_slave(trx->mysql_thd) /* FIXME: MDEV-24622 */) {
+ && !thd_is_slave(trx->mysql_thd) /* FIXME: MDEV-24622 */
+ && !index->table->has_spatial_index()) {
DEBUG_SYNC_C("empty_root_page_insert");
trx->bulk_insert = true;