summaryrefslogtreecommitdiff
path: root/innobase/row
diff options
context:
space:
mode:
authorunknown <heikki@hundin.mysql.fi>2004-10-01 20:01:25 +0300
committerunknown <heikki@hundin.mysql.fi>2004-10-01 20:01:25 +0300
commitd822c6f7efbf01a3c7dc257b2e65aab8187b6098 (patch)
treeb99f5669c6448da9932bab0ed49e52fe9d08db47 /innobase/row
parent0db72d6e335d89a734bceff5f2d1a8617f5557e6 (diff)
downloadmariadb-git-d822c6f7efbf01a3c7dc257b2e65aab8187b6098.tar.gz
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
Diffstat (limited to 'innobase/row')
-rw-r--r--innobase/row/row0ins.c10
-rw-r--r--innobase/row/row0row.c20
-rw-r--r--innobase/row/row0sel.c9
-rw-r--r--innobase/row/row0upd.c38
4 files changed, 30 insertions, 47 deletions
diff --git a/innobase/row/row0ins.c b/innobase/row/row0ins.c
index c5d90524fdd..7b0beb9d183 100644
--- a/innobase/row/row0ins.c
+++ b/innobase/row/row0ins.c
@@ -2019,16 +2019,12 @@ row_ins_index_entry_set_vals(
if (ind_field->prefix_len > 0
&& dfield_get_len(row_field) != 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(ind_field));
- field->len = innobase_get_at_most_n_mbchars(
- dtype_get_charset_coll(cur_type->prtype),
- ind_field->prefix_len,
- dfield_get_len(row_field),row_field->data);
+ field->len = dtype_get_at_most_n_mbchars(cur_type,
+ ind_field->prefix_len,
+ dfield_get_len(row_field), row_field->data);
} else {
field->len = row_field->len;
}
diff --git a/innobase/row/row0row.c b/innobase/row/row0row.c
index a02fbe67f73..e7b39f0fe52 100644
--- a/innobase/row/row0row.c
+++ b/innobase/row/row0row.c
@@ -143,18 +143,15 @@ row_build_index_entry(
if (ind_field->prefix_len > 0
&& dfield_get_len(dfield2) != 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(ind_field));
- storage_len = innobase_get_at_most_n_mbchars(
- dtype_get_charset_coll(cur_type->prtype),
+ storage_len = dtype_get_at_most_n_mbchars(
+ cur_type,
ind_field->prefix_len,
- dfield_get_len(dfield2),dfield2->data);
+ dfield_get_len(dfield2), dfield2->data);
- dfield_set_len(dfield,storage_len);
+ dfield_set_len(dfield, storage_len);
}
}
@@ -497,16 +494,13 @@ row_build_row_ref_from_row(
if (field->prefix_len > 0
&& dfield->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),
+ dfield->len = dtype_get_at_most_n_mbchars(
+ cur_type,
field->prefix_len,
- dfield->len,dfield->data);
+ dfield->len, dfield->data);
}
}
diff --git a/innobase/row/row0sel.c b/innobase/row/row0sel.c
index 8e011047dad..16c0a1eaa32 100644
--- a/innobase/row/row0sel.c
+++ b/innobase/row/row0sel.c
@@ -94,16 +94,13 @@ row_sel_sec_rec_is_for_clust_rec(
if (ifield->prefix_len > 0
&& clust_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(ifield));
- clust_len = innobase_get_at_most_n_mbchars(
- dtype_get_charset_coll(cur_type->prtype),
+ clust_len = dtype_get_at_most_n_mbchars(
+ cur_type,
ifield->prefix_len,
- clust_len,clust_field);
+ clust_len, clust_field);
}
if (0 != cmp_data_data(dict_col_get_type(col),
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);
}
}
}