Commit 602d9a03 authored by unknown's avatar unknown

row0mysql.c:

  Fix memory corruption bug reported by Georg Richter: if one created a table whose primary key contained at least 2 column prefixes, that could corrupt the memory heap of prebuilt_t


innobase/row/row0mysql.c:
  Fix memory corruption bug reported by Georg Richter: if one created a table whose primary key contained at least 2 column prefixes, that could corrupt the memory heap of prebuilt_t
parent f37290b9
......@@ -424,10 +424,13 @@ row_create_prebuilt(
prebuilt->sel_graph = NULL;
prebuilt->search_tuple = dtuple_create(heap,
dict_table_get_n_cols(table));
2 * dict_table_get_n_cols(table));
clust_index = dict_table_get_first_index(table);
/* Make sure that search_tuple is long enough for clustered index */
ut_a(2 * dict_table_get_n_cols(table) >= clust_index->n_fields);
ref_len = dict_index_get_n_unique(clust_index);
ref = dtuple_create(heap, ref_len);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment