1
0
mirror of https://github.com/MariaDB/server.git synced 2026-01-06 05:22:24 +03:00

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
This commit is contained in:
unknown
2002-09-10 21:40:01 +02:00
parent a106f9ea43
commit 80bc840f53
2 changed files with 3 additions and 2 deletions

View File

@@ -627,7 +627,7 @@ int mysql_create_table(THD *thd,const char *db, const char *table_name,
if (!(key_info->flags & HA_NULL_PART_KEY))
unique_key=1;
key_info->key_length=(uint16) key_length;
uint max_key_length= max(file->max_key_length(), MAX_KEY_LENGTH);
uint max_key_length= min(file->max_key_length(), MAX_KEY_LENGTH);
if (key_length > max_key_length && key->type != Key::FULLTEXT)
{
my_error(ER_TOO_LONG_KEY,MYF(0),max_key_length);