1
0
mirror of https://github.com/MariaDB/server.git synced 2025-07-29 05:21:33 +03:00

In CREATE syntax: KEY a (field_name(10))

10 now means "number of characters", not number of bytes.
This commit is contained in:
bar@bar.mysql.r18.ru
2003-09-15 14:45:42 +05:00
parent 9a5e82ad64
commit f55b05e2cf
4 changed files with 51 additions and 3 deletions

View File

@ -1214,7 +1214,9 @@ store_create_info(THD *thd, TABLE *table, String *packet)
!(key_info->flags & HA_FULLTEXT)))
{
buff[0] = '(';
char* end=int10_to_str((long) key_part->length, buff + 1,10);
char* end=int10_to_str((long) key_part->length /
key_part->field->charset()->mbmaxlen,
buff + 1,10);
*end++ = ')';
packet->append(buff,(uint) (end-buff));
}