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

max_key_length MyISAM bugfix

This commit is contained in:
serg@sergbook.mysql.com
2002-09-10 21:40:01 +02:00
parent e8c6e2717d
commit 888d3cf757
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);