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 ba3f9acf
...@@ -424,10 +424,13 @@ row_create_prebuilt( ...@@ -424,10 +424,13 @@ row_create_prebuilt(
prebuilt->sel_graph = NULL; prebuilt->sel_graph = NULL;
prebuilt->search_tuple = dtuple_create(heap, 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); 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_len = dict_index_get_n_unique(clust_index);
ref = dtuple_create(heap, ref_len); 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