From 499deb9c442d621a1613713a05c624abcc4f24b1 Mon Sep 17 00:00:00 2001 From: unknown Date: Wed, 29 Dec 2004 23:22:25 +0200 Subject: InnoDB: fix bug in insert buffer merge of prefix columns in new-style InnoDB tables. (Bug #7578) innobase/ibuf/ibuf0ibuf.c: ibuf_dummy_index_add_col(): Add parameter "len" --- innobase/ibuf/ibuf0ibuf.c | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) (limited to 'innobase/ibuf') diff --git a/innobase/ibuf/ibuf0ibuf.c b/innobase/ibuf/ibuf0ibuf.c index 959c66159c5..cd5ac0da231 100644 --- a/innobase/ibuf/ibuf0ibuf.c +++ b/innobase/ibuf/ibuf0ibuf.c @@ -1140,7 +1140,8 @@ void ibuf_dummy_index_add_col( /*====================*/ dict_index_t* index, /* in: dummy index */ - dtype_t* type) /* in: the data type of the column */ + dtype_t* type, /* in: the data type of the column */ + ulint len) /* in: length of the column */ { ulint i = index->table->n_def; dict_mem_table_add_col(index->table, "DUMMY", @@ -1149,7 +1150,7 @@ ibuf_dummy_index_add_col( dtype_get_len(type), dtype_get_prec(type)); dict_index_add_col(index, - dict_table_get_nth_col(index->table, i), 0, 0); + dict_table_get_nth_col(index->table, i), 0, len); } /************************************************************************ Deallocates a dummy index for inserting a record to a non-clustered index. @@ -1259,7 +1260,7 @@ ibuf_build_entry_from_ibuf_rec( dfield_get_type(field), types + i * DATA_NEW_ORDER_NULL_TYPE_BUF_SIZE); - ibuf_dummy_index_add_col(index, dfield_get_type(field)); + ibuf_dummy_index_add_col(index, dfield_get_type(field), len); } *pindex = index; -- cgit v1.2.1