summaryrefslogtreecommitdiff
path: root/myisam
diff options
context:
space:
mode:
authorunknown <serg@serg.mylan>2003-08-26 23:52:15 +0200
committerunknown <serg@serg.mylan>2003-08-26 23:52:15 +0200
commitcc7b3c8269a761a848c26f2c6365a8cd5636f97a (patch)
treeb874acb49518e06d3f9374adb29458c823cb21e7 /myisam
parentec4d0edf85b414bc817b81f9cbae01299f2fa463 (diff)
downloadmariadb-git-cc7b3c8269a761a848c26f2c6365a8cd5636f97a.tar.gz
fix ANALYZE TBALE to never generate rec_per_key_part < 1, as it prevent the table from being marked as analyzed (and the value is meaningless anyway)
Diffstat (limited to 'myisam')
-rw-r--r--myisam/mi_check.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/myisam/mi_check.c b/myisam/mi_check.c
index 0d7d7fae628..735c54c4cf6 100644
--- a/myisam/mi_check.c
+++ b/myisam/mi_check.c
@@ -36,7 +36,7 @@
/* Functions defined in this file */
static int check_k_link(MI_CHECK *param, MI_INFO *info,uint nr);
-static int chk_index(MI_CHECK *param, MI_INFO *info, MI_KEYDEF *keyinfo,
+static int chk_index(MI_CHECK *param, MI_INFO *info,MI_KEYDEF *keyinfo,
my_off_t page, uchar *buff, ha_rows *keys,
ha_checksum *key_checksum, uint level);
static uint isam_key_length(MI_INFO *info,MI_KEYDEF *keyinfo);
@@ -3681,6 +3681,9 @@ void update_key_parts(MI_KEYDEF *keyinfo, ulong *rec_per_key_part,
tmp=records;
else
tmp= (records + (count+1)/2) / (count+1);
+ /* for some weird keys (e.g. FULLTEXT) tmp can be <1 here.
+ let's ensure it is not */
+ set_if_bigger(tmp,1);
if (tmp >= (ulonglong) ~(ulong) 0)
tmp=(ulonglong) ~(ulong) 0;
*rec_per_key_part=(ulong) tmp;