Commit 74a32b0f authored by unknown's avatar unknown

Merge pilot.blaudden:/home/msvensson/mysql/mysql-5.0-maint

into  pilot.blaudden:/home/msvensson/mysql/mysql-5.1-maint


mysql-test/t/create.test:
  Auto merged
sql/table.cc:
  Auto merged
storage/myisam/mi_open.c:
  Auto merged
mysql-test/mysql-test-run.pl:
  Manual merge
mysql-test/r/create.result:
  Manual merge of revert
parents a0699cd8 44d4940f
This diff is collapsed.
This diff is collapsed.
......@@ -2143,18 +2143,7 @@ File create_frm(THD *thd, const char *name, const char *db,
ha_checktype(thd,ha_legacy_type(create_info->db_type),0,0));
fileinfo[4]=1;
int2store(fileinfo+6,IO_SIZE); /* Next block starts here */
/*
For each key (see unireg.cc::pack_keys()):
8 bytes for the key header
9 bytes for each key-part (MAX_REF_PARTS)
NAME_LEN bytes for the name
1 byte for the NAMES_SEP_CHAR (before the name)
For all keys:
6 bytes for the header
1 byte for the NAMES_SEP_CHAR (after the last name)
9 extra bytes (padding for safety? alignment?)
*/
key_length= keys * (8 + MAX_REF_PARTS * 9 + NAME_LEN + 1) + 16;
key_length=keys*(7+NAME_LEN+MAX_REF_PARTS*9)+16;
length= next_io_size((ulong) (IO_SIZE+key_length+reclength+
create_info->extra_size));
int4store(fileinfo+10,length);
......
......@@ -236,7 +236,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;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment