summaryrefslogtreecommitdiff
path: root/include/myisam.h
diff options
context:
space:
mode:
authorSachin <sachin.setiya@mariadb.com>2019-10-09 21:16:31 +0530
committerSachin <sachin.setiya@mariadb.com>2020-02-03 12:44:31 +0530
commiteed6d215f13cae8b84d9381918a3bd56dcf16188 (patch)
treeeda4beb45c9f485f04662e4801011ddc1c728a51 /include/myisam.h
parentb615d275b8c26ecec943003e1275ee19f94d9887 (diff)
downloadmariadb-git-eed6d215f13cae8b84d9381918a3bd56dcf16188.tar.gz
MDEV-20001 Potential dangerous regression: INSERT INTO >=100 rows fail for myisam table with HASH indexes
Problem:- So the issue is when we do bulk insert with rows > MI_MIN_ROWS_TO_DISABLE_INDEXES(100) , We try to disable the indexes to speedup insert. But current logic also disables the long unique indexes. Solution:- In ha_myisam::start_bulk_insert if we find long hash index (HA_KEY_ALG_LONG_HASH) we will not disable the index. This commit also refactors the mi_disable_indexes_for_rebuild function, Since this is function is called at only one place, it is inlined into start_bulk_insert mi_clear_key_active is added into myisamdef.h because now it is also used in ha_myisam.cc file. (Same is done for Aria Storage engine)
Diffstat (limited to 'include/myisam.h')
-rw-r--r--include/myisam.h1
1 files changed, 1 insertions, 0 deletions
diff --git a/include/myisam.h b/include/myisam.h
index 216f041c8a9..f2e31bb9f60 100644
--- a/include/myisam.h
+++ b/include/myisam.h
@@ -430,6 +430,7 @@ int sort_ft_buf_flush(MI_SORT_PARAM *sort_param);
int thr_write_keys(MI_SORT_PARAM *sort_param);
int sort_write_record(MI_SORT_PARAM *sort_param);
int _create_index_by_sort(MI_SORT_PARAM *info,my_bool no_messages, ulonglong);
+my_bool mi_too_big_key_for_sort(MI_KEYDEF *key, ha_rows rows);
#ifdef __cplusplus
}