*** sql/table.cc Sat Feb 24 14:14:12 2007 --- ../mysql-5.0.bk-key_len/sql/table.cc Mon Feb 26 16:21:22 2007 *************** *** 1442,1448 **** fileinfo[3]= (uchar) ha_checktype(thd,create_info->db_type,0,0); fileinfo[4]=1; int2store(fileinfo+6,IO_SIZE); /* Next block starts here */ ! 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); --- 1442,1459 ---- fileinfo[3]= (uchar) ha_checktype(thd,create_info->db_type,0,0); fileinfo[4]=1; int2store(fileinfo+6,IO_SIZE); /* Next block starts here */ ! /* ! for each key: (see unireq.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 (in front of the name) ! For all keys ! 6 for the header ! 1 for the NAMES_SEP_CHAR (behind the last name) ! Not sure why it is 16? ! */ ! key_length= keys * (8 + MAX_REF_PARTS * 9 + NAME_LEN + 1) + 16; length= next_io_size((ulong) (IO_SIZE+key_length+reclength+ create_info->extra_size)); int4store(fileinfo+10,length); *** myisam/mi_open.c Sat Feb 24 14:14:08 2007 --- ../mysql-5.0.bk-key_len/myisam/mi_open.c Mon Feb 26 17:01:50 2007 *************** *** 225,231 **** 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) { 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; --- 225,231 ---- 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) { 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;