diff options
author | gluh@gluh.mysql.r18.ru <> | 2005-03-16 18:09:01 +0300 |
---|---|---|
committer | gluh@gluh.mysql.r18.ru <> | 2005-03-16 18:09:01 +0300 |
commit | cb29afef037c9be0a2630e7e0d84aabed51cc774 (patch) | |
tree | a4a4dfcdc7f075c9f6e8aa9dda601ac6909b30b6 | |
parent | a93db6c052a07057964402555663c1c5670c3a98 (diff) | |
parent | 9975f533592131e1560983efa4ea7e27c6ca5a62 (diff) | |
download | mariadb-git-cb29afef037c9be0a2630e7e0d84aabed51cc774.tar.gz |
Merge sgluhov@bk-internal.mysql.com:/home/bk/mysql-5.0
into gluh.mysql.r18.ru:/home/gluh/MySQL-MERGE/mysql-5.0
-rw-r--r-- | sql/ha_innodb.cc | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/sql/ha_innodb.cc b/sql/ha_innodb.cc index f33931c6645..870ad1af52b 100644 --- a/sql/ha_innodb.cc +++ b/sql/ha_innodb.cc @@ -4037,7 +4037,11 @@ create_index( col_type = get_innobase_type_from_mysql_type(key_part->field); if (DATA_BLOB == col_type - || key_part->length < field->pack_length()) { + || (key_part->length < field->pack_length() + && field->type() != MYSQL_TYPE_VARCHAR) + || (field->type() == MYSQL_TYPE_VARCHAR + && key_part->length < field->pack_length() + - ((Field_varstring*)field)->length_bytes)) { prefix_len = key_part->length; |