Commit 5379038a authored by Sergei Golubchik's avatar Sergei Golubchik

mysql: don't crash when --show-warnings is enabled

and the server suddenly goes away
parent 38b3218c
......@@ -3588,7 +3588,7 @@ static void print_warnings()
mysql_store_result_for_lazy(&result);
/* Bail out when no warnings */
if (!(num_rows= mysql_num_rows(result)))
if (!result || !(num_rows= mysql_num_rows(result)))
goto end;
cur= mysql_fetch_row(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