Commit a1152058 authored by unknown's avatar unknown

Fix mysqldump crash when encountering a VIEW (when used against a

5.0 or later server, obviously). (Bug #16389)


client/mysqldump.c:
  Prevent dumping data from a view (and crashing when we see one)
parent 3b0c9e45
......@@ -2557,8 +2557,11 @@ static const char *check_if_ignore_table(const char *table_name)
mysql_free_result(res);
return 0; /* assume table is ok */
}
if (strcmp(row[1], (result= "MRG_MyISAM")) &&
strcmp(row[1], (result= "MRG_ISAM")))
/* Some forward-compatibility: don't dump data from a VIEW */
if (!row[1])
result= "VIEW";
else if (strcmp(row[1], (result= "MRG_MyISAM")) &&
strcmp(row[1], (result= "MRG_ISAM")))
result= 0;
mysql_free_result(res);
return result;
......
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