Commit 02df9f40 authored by Zardosht Kasheff's avatar Zardosht Kasheff Committed by Yoni Fogel

addresses #1684

set buffer used in add_index to be table->record[0]
so that blobs can unpack to it.

git-svn-id: file:///svn/mysql/tokudb-engine/src@11423 c7de825b-a66e-492c-adef-691d508d4ae1
parent 88523ecd
...@@ -4917,7 +4917,6 @@ int ha_tokudb::add_index(TABLE *table_arg, KEY *key_info, uint num_of_keys) { ...@@ -4917,7 +4917,6 @@ int ha_tokudb::add_index(TABLE *table_arg, KEY *key_info, uint num_of_keys) {
uchar* tmp_prim_key_buff = NULL; uchar* tmp_prim_key_buff = NULL;
uchar* tmp_record = NULL; uchar* tmp_record = NULL;
THD* thd = ha_thd(); THD* thd = ha_thd();
uchar* tmp_record2 = NULL;
uchar* row_desc_buff = NULL; uchar* row_desc_buff = NULL;
DBT row_descriptor; DBT row_descriptor;
bzero(&row_descriptor, sizeof(row_descriptor)); bzero(&row_descriptor, sizeof(row_descriptor));
...@@ -4941,14 +4940,12 @@ int ha_tokudb::add_index(TABLE *table_arg, KEY *key_info, uint num_of_keys) { ...@@ -4941,14 +4940,12 @@ int ha_tokudb::add_index(TABLE *table_arg, KEY *key_info, uint num_of_keys) {
newname = (char *)my_malloc(share->table_name_length + NAME_CHAR_LEN, MYF(MY_WME)); newname = (char *)my_malloc(share->table_name_length + NAME_CHAR_LEN, MYF(MY_WME));
tmp_key_buff = (uchar *)my_malloc(2*table_arg->s->rec_buff_length, MYF(MY_WME)); tmp_key_buff = (uchar *)my_malloc(2*table_arg->s->rec_buff_length, MYF(MY_WME));
tmp_prim_key_buff = (uchar *)my_malloc(2*table_arg->s->rec_buff_length, MYF(MY_WME)); tmp_prim_key_buff = (uchar *)my_malloc(2*table_arg->s->rec_buff_length, MYF(MY_WME));
tmp_record = (uchar *)my_malloc(table_arg->s->rec_buff_length,MYF(MY_WME)); tmp_record = table->record[0];
tmp_record2 = (uchar *)my_malloc(2*table_arg->s->rec_buff_length,MYF(MY_WME));
row_desc_buff = (uchar *)my_malloc(2*(table_share->fields * 6)+10 ,MYF(MY_WME)); row_desc_buff = (uchar *)my_malloc(2*(table_share->fields * 6)+10 ,MYF(MY_WME));
if (newname == NULL || if (newname == NULL ||
tmp_key_buff == NULL || tmp_key_buff == NULL ||
tmp_prim_key_buff == NULL || tmp_prim_key_buff == NULL ||
tmp_record == NULL || tmp_record == NULL ||
tmp_record2 == NULL ||
row_desc_buff == NULL) { row_desc_buff == NULL) {
error = ENOMEM; error = ENOMEM;
goto cleanup; goto cleanup;
...@@ -5238,8 +5235,6 @@ cleanup: ...@@ -5238,8 +5235,6 @@ cleanup:
my_free(newname,MYF(MY_ALLOW_ZERO_PTR)); my_free(newname,MYF(MY_ALLOW_ZERO_PTR));
my_free(tmp_key_buff,MYF(MY_ALLOW_ZERO_PTR)); my_free(tmp_key_buff,MYF(MY_ALLOW_ZERO_PTR));
my_free(tmp_prim_key_buff,MYF(MY_ALLOW_ZERO_PTR)); my_free(tmp_prim_key_buff,MYF(MY_ALLOW_ZERO_PTR));
my_free(tmp_record,MYF(MY_ALLOW_ZERO_PTR));
my_free(tmp_record2,MYF(MY_ALLOW_ZERO_PTR));
my_free(row_desc_buff,MYF(MY_ALLOW_ZERO_PTR)); my_free(row_desc_buff,MYF(MY_ALLOW_ZERO_PTR));
TOKUDB_DBUG_RETURN(error); TOKUDB_DBUG_RETURN(error);
} }
......
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