summaryrefslogtreecommitdiff
path: root/myisam/mi_create.c
diff options
context:
space:
mode:
authorunknown <serg@sergbook.mysql.com>2002-09-10 21:40:01 +0200
committerunknown <serg@sergbook.mysql.com>2002-09-10 21:40:01 +0200
commit80bc840f53b34090106e694769a3a316290c6b60 (patch)
treef6046d93ce37f0e80f7537f352e3da3790a3b2d6 /myisam/mi_create.c
parenta106f9ea4329b6c54ade14862ffc3f6f9f628c70 (diff)
downloadmariadb-git-80bc840f53b34090106e694769a3a316290c6b60.tar.gz
max_key_length MyISAM bugfix
myisam/mi_create.c: check for MI_MAX_KEY_LENGTH in mi_create() sql/sql_table.cc: fix obvious typo
Diffstat (limited to 'myisam/mi_create.c')
-rw-r--r--myisam/mi_create.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/myisam/mi_create.c b/myisam/mi_create.c
index 2202587702b..0996c110eea 100644
--- a/myisam/mi_create.c
+++ b/myisam/mi_create.c
@@ -370,7 +370,8 @@ int mi_create(const char *name,uint keys,MI_KEYDEF *keydefs,
share.state.rec_per_key_part[key_segs-1]=1L;
length+=key_length;
keydef->block_length= MI_BLOCK_SIZE(length,pointer,MI_MAX_KEYPTR_SIZE);
- if (keydef->block_length > MI_MAX_KEY_BLOCK_LENGTH)
+ if (keydef->block_length > MI_MAX_KEY_BLOCK_LENGTH ||
+ length > MI_MAX_KEY_LENGTH)
{
my_errno=HA_WRONG_CREATE_OPTION;
goto err;