diff options
author | heikki@hundin.mysql.fi <> | 2004-10-08 15:25:59 +0300 |
---|---|---|
committer | heikki@hundin.mysql.fi <> | 2004-10-08 15:25:59 +0300 |
commit | 67ce68acb937712b010e4b4421efe315a15cc89e (patch) | |
tree | f05a64bd28e8fb822c6747672f6a5a909e8b5dc1 /innobase/row/row0row.c | |
parent | 05c01360e312752395ec1ac5bede8473eb442694 (diff) | |
download | mariadb-git-67ce68acb937712b010e4b4421efe315a15cc89e.tar.gz |
row0sel.c, row0row.c:
Fix bug #5975 about UTF-8 chars and prefix indexes; do not print warnings if a column prefix is > 255 bytes
Diffstat (limited to 'innobase/row/row0row.c')
-rw-r--r-- | innobase/row/row0row.c | 16 |
1 files changed, 10 insertions, 6 deletions
diff --git a/innobase/row/row0row.c b/innobase/row/row0row.c index 2de7ffc79c0..38714b0c49b 100644 --- a/innobase/row/row0row.c +++ b/innobase/row/row0row.c @@ -386,10 +386,12 @@ row_build_row_ref( dict_index_get_nth_field(clust_index, i)->prefix_len; if (clust_col_prefix_len > 0) { - if (len != UNIV_SQL_NULL - && len > clust_col_prefix_len) { + if (len != UNIV_SQL_NULL) { - dfield_set_len(dfield, clust_col_prefix_len); + dfield_set_len(dfield, + dtype_get_at_most_n_mbchars( + dfield_get_type(dfield), + clust_col_prefix_len, len, field)); } } } @@ -471,10 +473,12 @@ row_build_row_ref_in_tuple( dict_index_get_nth_field(clust_index, i)->prefix_len; if (clust_col_prefix_len > 0) { - if (len != UNIV_SQL_NULL - && len > clust_col_prefix_len) { + if (len != UNIV_SQL_NULL) { - dfield_set_len(dfield, clust_col_prefix_len); + dfield_set_len(dfield, + dtype_get_at_most_n_mbchars( + dfield_get_type(dfield), + clust_col_prefix_len, len, field)); } } } |