diff options
author | unknown <marko@hundin.mysql.fi> | 2004-12-03 17:57:44 +0200 |
---|---|---|
committer | unknown <marko@hundin.mysql.fi> | 2004-12-03 17:57:44 +0200 |
commit | f09c8b35f4d36de42be7ced51f1200727385ce79 (patch) | |
tree | b32c4cc4107240ca3ea5b1f70a93f02fa49fc0f5 /innobase/row/row0ins.c | |
parent | 6865b71c73d2af3e5b06bc92c563aeb3ba6db4ff (diff) | |
download | mariadb-git-f09c8b35f4d36de42be7ced51f1200727385ce79.tar.gz |
InnoDB: Fix ctype_utf8 test failure caused by the new record format.
innobase/btr/btr0btr.c:
Cache the value of dtype_get_fixed_size(type) in order to avoid
repeated calls to an external function innobase_is_mb_cset()
innobase/include/data0type.ic:
Declare innobase_is_mb_cset().
dtype_get_fixed_size(): Invoke innobase_is_mb_cset() for DATA_MYSQL.
innobase/row/row0ins.c:
Cache the value of dtype_get_fixed_size(type) in order to avoid
repeated calls to an external function innobase_is_mb_cset()
innobase/row/row0sel.c:
row_search_for_mysql(): Added a missing rec_reget_offsets() call
that caused an InnoDB debug assertion failure in ctype_utf8 test.
sql/ha_innodb.cc:
Define innobase_is_mb_cset().
Diffstat (limited to 'innobase/row/row0ins.c')
-rw-r--r-- | innobase/row/row0ins.c | 16 |
1 files changed, 9 insertions, 7 deletions
diff --git a/innobase/row/row0ins.c b/innobase/row/row0ins.c index c3149401f3c..1c55005dcfa 100644 --- a/innobase/row/row0ins.c +++ b/innobase/row/row0ins.c @@ -473,6 +473,8 @@ row_ins_cascade_calc_update_vec( if (parent_ufield->field_no == parent_field_no) { + ulint fixed_size; + /* A field in the parent index record is updated. Let us make the update vector field for the child table. */ @@ -512,22 +514,22 @@ row_ins_cascade_calc_update_vec( need to pad with spaces the new value of the child column */ - if (dtype_is_fixed_size(type) + fixed_size = dtype_get_fixed_size(type); + + if (fixed_size && ufield->new_val.len != UNIV_SQL_NULL - && ufield->new_val.len - < dtype_get_fixed_size(type)) { + && ufield->new_val.len < fixed_size) { ufield->new_val.data = mem_heap_alloc(heap, - dtype_get_fixed_size(type)); - ufield->new_val.len = - dtype_get_fixed_size(type); + fixed_size); + ufield->new_val.len = fixed_size; ut_a(dtype_get_pad_char(type) != ULINT_UNDEFINED); memset(ufield->new_val.data, (byte)dtype_get_pad_char(type), - dtype_get_fixed_size(type)); + fixed_size); ut_memcpy(ufield->new_val.data, parent_ufield->new_val.data, parent_ufield->new_val.len); |