1
0
mirror of https://github.com/MariaDB/server.git synced 2025-07-30 16:24:05 +03:00

Making a better fix for double released pointers and safe

TMP_TABLE_PARAM.
This involved moving things around in include files.
All tests, including the ones with Valgrind passed.
This commit is contained in:
unknown
2003-04-26 15:12:14 +03:00
parent 8078280c76
commit 18a321adce
6 changed files with 55 additions and 66 deletions

View File

@ -113,45 +113,6 @@ typedef struct st_position { /* Used in find_best */
} POSITION;
/* Param to create temporary tables when doing SELECT:s */
class TMP_TABLE_PARAM :public Sql_alloc
{
public:
List<Item> copy_funcs;
List<Item> save_copy_funcs;
List_iterator_fast<Item> copy_funcs_it;
Copy_field *copy_field, *copy_field_end;
Copy_field *save_copy_field, *save_copy_field_end;
byte *group_buff;
Item **items_to_copy; /* Fields in tmp table */
MI_COLUMNDEF *recinfo,*start_recinfo;
KEY *keyinfo;
ha_rows end_write_records;
uint field_count,sum_func_count,func_count;
uint hidden_field_count;
uint group_parts,group_length,group_null_parts;
uint quick_group;
bool using_indirect_summary_function;
TMP_TABLE_PARAM()
:copy_funcs_it(copy_funcs), copy_field(0), group_parts(0),
group_length(0), group_null_parts(0)
{}
~TMP_TABLE_PARAM()
{
cleanup();
}
inline void cleanup(void)
{
if (copy_field) /* Fix for Intel compiler */
{
delete [] copy_field;
copy_field=0;
}
}
};
class JOIN :public Sql_alloc
{
public: