Commit b45c551e authored by Sergei Golubchik's avatar Sergei Golubchik

MDEV-448 Memory loss warnings in mysqldump when more than one schema is dumped

parent 7dad5363
......@@ -4180,6 +4180,7 @@ static int dump_all_databases()
if (dump_all_tables_in_db(row[0]))
result=1;
}
mysql_free_result(tableres);
if (seen_views)
{
if (mysql_query(mysql, "SHOW DATABASES") ||
......@@ -4202,6 +4203,7 @@ static int dump_all_databases()
if (dump_all_views_in_db(row[0]))
result=1;
}
mysql_free_result(tableres);
}
return result;
}
......@@ -4330,8 +4332,6 @@ static int init_dumping(char *database, int init_func(char*))
check_io(md_result_file);
}
}
if (extended_insert)
init_dynamic_string_checked(&extended_row, "", 1024, 1024);
return 0;
} /* init_dumping */
......@@ -5608,6 +5608,9 @@ int main(int argc, char **argv)
if (opt_alltspcs)
dump_all_tablespaces();
if (extended_insert)
init_dynamic_string_checked(&extended_row, "", 1024, 1024);
if (opt_alldbs)
{
if (!opt_alltspcs && !opt_notspcs)
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment