1
0
mirror of https://github.com/MariaDB/server.git synced 2025-07-29 05:21:33 +03:00

Ensure that we free memory used with --order-by-primary (in mysqldump)

Simple, non critical, fix to mysql_fix_privilege_tables
This commit is contained in:
monty@mysql.com
2004-12-09 12:47:20 +02:00
parent 4753641048
commit 01e4740f4c
6 changed files with 44 additions and 31 deletions

View File

@ -1825,8 +1825,6 @@ static void dumpTable(uint numFields, char *table)
err:
if (query != query_buf)
my_free(query, MYF(MY_ALLOW_ZERO_PTR));
if (order_by)
my_free(order_by, MYF(0));
safe_exit(error);
return;
} /* dumpTable */
@ -1978,6 +1976,8 @@ static int dump_all_tables_in_db(char *database)
numrows = getTableStructure(table, database);
if (!dFlag && numrows > 0)
dumpTable(numrows,table);
my_free(order_by, MYF(MY_ALLOW_ZERO_PTR));
order_by= 0;
}
if (opt_xml)
{
@ -2027,6 +2027,8 @@ static int dump_selected_tables(char *db, char **table_names, int tables)
numrows = getTableStructure(*table_names, db);
if (!dFlag && numrows > 0)
dumpTable(numrows, *table_names);
my_free(order_by, MYF(MY_ALLOW_ZERO_PTR));
order_by= 0;
}
if (opt_xml)
{