List:Internals« Previous MessageNext Message »
From:Patrick Lau Date:March 18 2009 11:14am
Subject:Deep copy of Item
View as plain text  
Hi

For our purpose we want to free Items during query execution.

So my idea would be:

1) instantiate item with malloc:

Item* tmp_item = (Item*)malloc(sizeof(Item));

2) invoke copy constructor
List_iterator_fast<Item> it(*join->fields);
item1=it++;
tmp_item->Item(*item1);

now the question:
- how would the copy constructor Item(& item) look like - especially
for join->result->send_data(...)....
- Is it a good idea?


Does a similiar method already exist?

Thanks for any comments in advance.
--
Patrick
Thread
Deep copy of ItemPatrick Lau18 Mar
  • re: Deep copy of ItemMichael Widenius8 Apr