summaryrefslogtreecommitdiff
path: root/client
diff options
context:
space:
mode:
authorunknown <monty@mysql.com>2004-12-09 12:47:20 +0200
committerunknown <monty@mysql.com>2004-12-09 12:47:20 +0200
commit5535fa96fbbee28558bb2fccbc8eecf4872b37ff (patch)
tree704efc4e05901529199765305291c2172efce817 /client
parent878a155e50f396069ff0f2cb9a66e5f3e042ddb4 (diff)
downloadmariadb-git-5535fa96fbbee28558bb2fccbc8eecf4872b37ff.tar.gz
Ensure that we free memory used with --order-by-primary (in mysqldump)
Simple, non critical, fix to mysql_fix_privilege_tables client/mysqldump.c: Ensure that we free memory used with --order-by-primary mysql-test/t/system_mysql_db_fix.test: Remove warnings when compiled with support for ISAM scripts/mysql_fix_privilege_tables.sh: Ensure that 'my_print_defaults' is called correctly sql/set_var.cc: Code style cleanups sql/sql_db.cc: Fixed comments sql/udf_example.cc: Fixed comments
Diffstat (limited to 'client')
-rw-r--r--client/mysqldump.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/client/mysqldump.c b/client/mysqldump.c
index 489063ffc73..d7cdf5c6624 100644
--- a/client/mysqldump.c
+++ b/client/mysqldump.c
@@ -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)
{