1
0
mirror of https://github.com/MariaDB/server.git synced 2025-08-08 11:22:35 +03:00

Copy arguments given to mysql_server_init()

Made keybuff_size longlong (To make show variables work similar on 32
and 64 bit systems)
Fixed some 'not initalized variable errors' in multi-table-update.
Fixed memory leak in multi-table-update.
Now all tests works under valgrind without any errors.
This commit is contained in:
monty@mashka.mysql.fi
2002-12-05 16:38:49 +02:00
parent 2435dce96d
commit 7d681c4449
10 changed files with 109 additions and 25 deletions

View File

@@ -412,9 +412,10 @@ end:
multi_update::multi_update(THD *thd_arg, TABLE_LIST *table_list,
List<Item> *field_list, List<Item> *value_list,
enum enum_duplicates handle_duplicates_arg)
:all_tables(table_list), thd(thd_arg), tmp_tables(0), updated(0),
found(0), fields(field_list), values(value_list), table_count(0),
handle_duplicates(handle_duplicates_arg), do_update(1)
:all_tables(table_list), update_tables(0), thd(thd_arg), tmp_tables(0),
updated(0), found(0), fields(field_list), values(value_list),
table_count(0), copy_field(0), handle_duplicates(handle_duplicates_arg),
do_update(1), trans_safe(0)
{}
@@ -594,9 +595,14 @@ multi_update::~multi_update()
if (tmp_tables)
{
for (uint counter = 0; counter < table_count; counter++)
if (tmp_tables[counter])
free_tmp_table(thd,tmp_tables[counter]);
for (uint cnt = 0; cnt < table_count; cnt++)
{
if (tmp_tables[cnt])
{
free_tmp_table(thd, tmp_tables[cnt]);
tmp_table_param[cnt].cleanup();
}
}
}
if (copy_field)
delete [] copy_field;