diff options
author | unknown <jani@ua141d10.elisa.omakaista.fi> | 2005-10-27 23:43:20 +0300 |
---|---|---|
committer | unknown <jani@ua141d10.elisa.omakaista.fi> | 2005-10-27 23:43:20 +0300 |
commit | 7911c50718fa27c2fa56e99d765b54267481a8d2 (patch) | |
tree | ff71298ae3c57caff8ca7c70666d60292290e366 /include | |
parent | 6196a746116b4de60414f717eabcc243a7a3beb6 (diff) | |
parent | 987c33a97501ccd064ee2e68df44ad1d1e4618e6 (diff) | |
download | mariadb-git-7911c50718fa27c2fa56e99d765b54267481a8d2.tar.gz |
Merge ua141d10.elisa.omakaista.fi:/home/my/bk/mysql-4.1
into ua141d10.elisa.omakaista.fi:/home/my/bk/mysql-5.0-tmp
heap/_check.c:
Auto merged
heap/hp_create.c:
Auto merged
include/config-netware.h:
Auto merged
include/my_base.h:
Auto merged
include/my_handler.h:
Auto merged
include/myisam.h:
Auto merged
innobase/include/Makefile.am:
Auto merged
myisam/mi_check.c:
Auto merged
myisam/mi_delete.c:
Auto merged
myisam/mi_rnext_same.c:
Auto merged
myisam/mi_search.c:
Auto merged
myisam/mi_write.c:
Auto merged
myisam/myisamdef.h:
Auto merged
myisam/sort.c:
Auto merged
mysql-test/mysql-test-run.sh:
Auto merged
mysql-test/r/date_formats.result:
Auto merged
mysql-test/r/update.result:
Auto merged
mysql-test/t/date_formats.test:
Auto merged
mysql-test/t/select.test:
Auto merged
mysql-test/t/update.test:
Auto merged
mysys/my_getopt.c:
Auto merged
mysys/my_handler.c:
Auto merged
scripts/make_binary_distribution.sh:
Auto merged
sql/ha_myisam.cc:
Auto merged
sql/item_timefunc.cc:
Auto merged
sql/records.cc:
Auto merged
sql/sql_load.cc:
Auto merged
sql/sql_select.cc:
Auto merged
sql/structs.h:
Auto merged
strings/conf_to_src.c:
Auto merged
strings/ctype-win1250ch.c:
Auto merged
Makefile.am:
Merged from 4.1
myisam/myisamchk.c:
Merged from 4.1
mysql-test/mysql-test-run.pl:
Merged from 4.1
mysql-test/r/insert_select.result:
Merged from 4.1
mysql-test/r/myisam.result:
Merged from 4.1
mysql-test/r/select.result:
Merged from 4.1
mysql-test/t/insert_select.test:
Merged from 4.1
mysql-test/t/myisam.test:
Merged from 4.1
netware/mysql_test_run.c:
Merged from 4.1
sql/item.cc:
Merged from 4.1
sql/mysqld.cc:
Merged from 4.1
sql/sql_update.cc:
Merged from 4.1
tests/mysql_client_test.c:
Merged from 4.1
Diffstat (limited to 'include')
-rw-r--r-- | include/my_handler.h | 2 | ||||
-rw-r--r-- | include/myisam.h | 14 |
2 files changed, 14 insertions, 2 deletions
diff --git a/include/my_handler.h b/include/my_handler.h index c076ba0c2c9..d531e0fb3e1 100644 --- a/include/my_handler.h +++ b/include/my_handler.h @@ -88,4 +88,6 @@ extern int ha_key_cmp(register HA_KEYSEG *keyseg, register uchar *a, register uchar *b, uint key_length, uint nextflag, uint *diff_pos); +extern HA_KEYSEG *ha_find_null(HA_KEYSEG *keyseg, uchar *a); + #endif /* _my_handler_h */ diff --git a/include/myisam.h b/include/myisam.h index 39cc61ad204..56717524bb2 100644 --- a/include/myisam.h +++ b/include/myisam.h @@ -392,7 +392,9 @@ typedef enum /* Treat NULLs as inequal when collecting statistics (default for 4.1/5.0) */ MI_STATS_METHOD_NULLS_NOT_EQUAL, /* Treat NULLs as equal when collecting statistics (like 4.0 did) */ - MI_STATS_METHOD_NULLS_EQUAL + MI_STATS_METHOD_NULLS_EQUAL, + /* Ignore NULLs - count only tuples without NULLs in the index components */ + MI_STATS_METHOD_IGNORE_NULLS } enum_mi_stats_method; typedef struct st_mi_check_param @@ -419,7 +421,14 @@ typedef struct st_mi_check_param int tmpfile_createflag; myf myf_rw; IO_CACHE read_cache; + + /* + The next two are used to collect statistics, see update_key_parts for + description. + */ ulonglong unique_count[MI_MAX_KEY_SEG+1]; + ulonglong notnull_count[MI_MAX_KEY_SEG+1]; + ha_checksum key_crc[MI_MAX_POSSIBLE_KEY]; ulong rec_per_key_part[MI_MAX_KEY_SEG*MI_MAX_POSSIBLE_KEY]; void *thd; @@ -479,7 +488,8 @@ void update_auto_increment_key(MI_CHECK *param, MI_INFO *info, my_bool repair); int update_state_info(MI_CHECK *param, MI_INFO *info,uint update); void update_key_parts(MI_KEYDEF *keyinfo, ulong *rec_per_key_part, - ulonglong *unique, ulonglong records); + ulonglong *unique, ulonglong *notnull, + ulonglong records); int filecopy(MI_CHECK *param, File to,File from,my_off_t start, my_off_t length, const char *type); int movepoint(MI_INFO *info,byte *record,my_off_t oldpos, |