diff options
author | gkodinov/kgeorge@magare.gmz <> | 2007-06-27 14:35:49 +0300 |
---|---|---|
committer | gkodinov/kgeorge@magare.gmz <> | 2007-06-27 14:35:49 +0300 |
commit | 0b421fad4a3b23a0304a5ff75a1ced060dbf68df (patch) | |
tree | d80e17c0c5da470c174748ea9e75d11232310913 /myisam | |
parent | 6a4b2343dbd1767797a55abd1ba69b8aa6494f08 (diff) | |
download | mariadb-git-0b421fad4a3b23a0304a5ff75a1ced060dbf68df.tar.gz |
Bug #26642: create index corrupts table definition in .frm
Thanks to Martin Friebe for finding and submitting a fix for this bug!
A table with maximum number of key segments and maximum length key name
would have a corrupted .frm file, due to an incorrect calculation of the
complete key length. Now the key length is computed correctly (I hope) :-)
MyISAM would reject a table with the maximum number of keys and the maximum
number of key segments in all keys. It would allow one less than this total
maximum. Now MyISAM accepts a table defined with the maximum. (This is a
very minor issue.)
Diffstat (limited to 'myisam')
-rw-r--r-- | myisam/mi_open.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/myisam/mi_open.c b/myisam/mi_open.c index 274933679ef..28258af57a2 100644 --- a/myisam/mi_open.c +++ b/myisam/mi_open.c @@ -225,7 +225,7 @@ MI_INFO *mi_open(const char *name, int mode, uint open_flags) key_parts+=fulltext_keys*FT_SEGS; if (share->base.max_key_length > MI_MAX_KEY_BUFF || keys > MI_MAX_KEY || - key_parts >= MI_MAX_KEY * MI_MAX_KEY_SEG) + key_parts > MI_MAX_KEY * MI_MAX_KEY_SEG) { DBUG_PRINT("error",("Wrong key info: Max_key_length: %d keys: %d key_parts: %d", share->base.max_key_length, keys, key_parts)); my_errno=HA_ERR_UNSUPPORTED; |