From 8949b3e2b6a351a8382dd0fe02bfdd9be10ddc18 Mon Sep 17 00:00:00 2001 From: unknown Date: Fri, 1 Oct 2004 20:01:25 +0300 Subject: Many files: Fix bug introduced by the prefix key + multibyte charsets patch today sql/ha_innodb.cc: Fix bug introduced by the prefix key + multibyte charsets patch today innobase/include/data0type.h: Fix bug introduced by the prefix key + multibyte charsets patch today innobase/include/fsp0fsp.h: Fix bug introduced by the prefix key + multibyte charsets patch today innobase/data/data0type.c: Fix bug introduced by the prefix key + multibyte charsets patch today innobase/row/row0ins.c: Fix bug introduced by the prefix key + multibyte charsets patch today innobase/row/row0row.c: Fix bug introduced by the prefix key + multibyte charsets patch today innobase/row/row0sel.c: Fix bug introduced by the prefix key + multibyte charsets patch today innobase/row/row0upd.c: Fix bug introduced by the prefix key + multibyte charsets patch today --- innobase/row/row0upd.c | 38 +++++++++++++++++--------------------- 1 file changed, 17 insertions(+), 21 deletions(-) (limited to 'innobase/row/row0upd.c') diff --git a/innobase/row/row0upd.c b/innobase/row/row0upd.c index 34c45204167..a449b9f1736 100644 --- a/innobase/row/row0upd.c +++ b/innobase/row/row0upd.c @@ -876,17 +876,15 @@ row_upd_index_replace_new_col_vals_index_pos( if (field->prefix_len > 0 && new_val->len != UNIV_SQL_NULL) { - /* For prefix keys get the storage length - for the prefix_len characters. */ - - cur_type = dict_col_get_type( - dict_field_get_col(field)); - - dfield->len = - innobase_get_at_most_n_mbchars( - dtype_get_charset_coll(cur_type->prtype), - field->prefix_len, - new_val->len,new_val->data); + cur_type = dict_col_get_type( + dict_field_get_col(field)); + + dfield->len = + dtype_get_at_most_n_mbchars( + cur_type, + field->prefix_len, + new_val->len, + new_val->data); } } } @@ -948,17 +946,15 @@ row_upd_index_replace_new_col_vals( if (field->prefix_len > 0 && new_val->len != UNIV_SQL_NULL) { - /* For prefix keys get the storage length - for the prefix_len characters. */ - - cur_type = dict_col_get_type( - dict_field_get_col(field)); + cur_type = dict_col_get_type( + dict_field_get_col(field)); - dfield->len = - innobase_get_at_most_n_mbchars( - dtype_get_charset_coll(cur_type->prtype), - field->prefix_len, - new_val->len,new_val->data); + dfield->len = + dtype_get_at_most_n_mbchars( + cur_type, + field->prefix_len, + new_val->len, + new_val->data); } } } -- cgit v1.2.1