bug #251 - destroyed object reused - fixed
This commit is contained in:
parent
041b0819c2
commit
002d842012
@ -134,6 +134,7 @@ public:
|
|||||||
virtual void sort_string(char *buff,uint length)=0;
|
virtual void sort_string(char *buff,uint length)=0;
|
||||||
virtual bool optimize_range(uint idx);
|
virtual bool optimize_range(uint idx);
|
||||||
virtual bool store_for_compare() { return 0; }
|
virtual bool store_for_compare() { return 0; }
|
||||||
|
virtual void free() {}
|
||||||
Field *new_field(MEM_ROOT *root, struct st_table *new_table)
|
Field *new_field(MEM_ROOT *root, struct st_table *new_table)
|
||||||
{
|
{
|
||||||
Field *tmp= (Field*) memdup_root(root,(char*) this,size_of());
|
Field *tmp= (Field*) memdup_root(root,(char*) this,size_of());
|
||||||
@ -937,7 +938,7 @@ public:
|
|||||||
int pack_cmp(const char *b, uint key_length);
|
int pack_cmp(const char *b, uint key_length);
|
||||||
uint packed_col_length(const char *col_ptr, uint length);
|
uint packed_col_length(const char *col_ptr, uint length);
|
||||||
uint max_packed_col_length(uint max_length);
|
uint max_packed_col_length(uint max_length);
|
||||||
inline void free() { value.free(); }
|
void free() { value.free(); }
|
||||||
inline void clear_temporary() { bzero((char*) &value,sizeof(value)); }
|
inline void clear_temporary() { bzero((char*) &value,sizeof(value)); }
|
||||||
friend void field_conv(Field *to,Field *from);
|
friend void field_conv(Field *to,Field *from);
|
||||||
uint size_of() const { return sizeof(*this); }
|
uint size_of() const { return sizeof(*this); }
|
||||||
|
@ -4791,7 +4791,7 @@ free_tmp_table(THD *thd, TABLE *entry)
|
|||||||
(void) ha_delete_table(entry->db_type,entry->real_name);
|
(void) ha_delete_table(entry->db_type,entry->real_name);
|
||||||
/* free blobs */
|
/* free blobs */
|
||||||
for (Field **ptr=entry->field ; *ptr ; ptr++)
|
for (Field **ptr=entry->field ; *ptr ; ptr++)
|
||||||
delete *ptr;
|
(*ptr)->free();
|
||||||
my_free((gptr) entry->record[0],MYF(0));
|
my_free((gptr) entry->record[0],MYF(0));
|
||||||
free_io_cache(entry);
|
free_io_cache(entry);
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user