diff options
author | unknown <serg@infomag.ape.relarn.ru> | 2000-08-28 17:43:58 +0400 |
---|---|---|
committer | unknown <serg@infomag.ape.relarn.ru> | 2000-08-28 17:43:58 +0400 |
commit | ca04c0eca770ebc50bb336f3ec3d66eb2fe46b58 (patch) | |
tree | 485c3b99b43fae8c2b58b7a5ab72b383265423d2 /myisam/mi_check.c | |
parent | fe26eac2198e79de6e23c17c5033a5c7bc8e1d41 (diff) | |
download | mariadb-git-ca04c0eca770ebc50bb336f3ec3d66eb2fe46b58.tar.gz |
ft_optimization: identical queries merging. collection -> fulltext. Bugs fixed.
**************** !!! NOTE EVERYBODY: SYNTAX CHANGED !!! ********************
There's no COLLECTIONs now, full-text indexes can be created via the word
FULLTEXT, which should be used like UNIQUE.
myisam/mi_check.c:
comments added
sql/lex.h:
COLLECTION -> FULLTEXT
sql/item_func.h:
ft-optimization: identical queries merging
sql/sql_select.cc:
ft-optimization
sql/item_func.cc:
ft-optimization: identical queries merging
sql/sql_base.cc:
ft_optimization: identical queries merging
sql/sql_yacc.yy:
COLLECTION -> FULLTEXT
myisam/ft_search.c:
info->lastpot dealing
Docs/manual.texi:
COLLECTION -> FULLTEXT
Diffstat (limited to 'myisam/mi_check.c')
-rw-r--r-- | myisam/mi_check.c | 20 |
1 files changed, 19 insertions, 1 deletions
diff --git a/myisam/mi_check.c b/myisam/mi_check.c index c6bd9f67c65..2b5a14f1e87 100644 --- a/myisam/mi_check.c +++ b/myisam/mi_check.c @@ -1141,7 +1141,13 @@ int mi_repair(MI_CHECK *param, register MI_INFO *info, for (i=0 ; i < share->state.header.max_block_size ; i++) share->state.key_del[i]= HA_OFFSET_ERROR; - share->state.key_map= ((ulonglong)1L << share->base.keys)-1; /* Should I ? */ + /* I think mi_repair and mi_repair_by_sort should do the same + (according, e.g. to ha_myisam::repair), but as mi_repair doesn't + touch key_map it cannot be used to T_CREATE_MISSING_KEYS. + That is the next line for... (serg) + */ + + share->state.key_map= ((ulonglong)1L << share->base.keys)-1; info->state->key_file_length=share->base.keystart; @@ -1935,6 +1941,11 @@ static int sort_key_read(SORT_INFO *sort_info, void *key) "Found too many records; Can`t continue"); DBUG_RETURN(1); } + /* Hmm, repair_by_sort uses find_all_keys, and find_all_keys strictly + implies "one row - one key per keynr", while for ft_key one row/keynr + can produce as many keys as the number of unique words in the text + that's why I disabled repair_by_sort for ft-keys. (serg) + */ if (sort_info->keyinfo->flag & HA_FULLTEXT ) { mi_check_print_error(sort_info->param, @@ -3009,6 +3020,13 @@ my_bool mi_test_if_sort_rep(MI_INFO *info, ha_rows rows) return FALSE; /* Can't use sort */ for (i=0 ; i < share->base.keys ; i++,key++) { +/* It's to disable repair_by_sort for ft-keys. + Another solution would be to make ft-keys just too_big_key_for_sort, + but then they won't be disabled by dectivate_non_unique_index + and so they will be created at the first stage. As ft-key creation + is very time-consuming process, it's better to leave it to repair stage + but this repair shouldn't be repair_by_sort (serg) + */ if (mi_too_big_key_for_sort(key,rows) || (key->flag & HA_FULLTEXT)) return FALSE; } |