1
0
mirror of https://github.com/MariaDB/server.git synced 2025-07-30 16:24:05 +03:00

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

and the server suddenly goes away
This commit is contained in:
Sergei Golubchik
2010-05-21 17:25:40 +02:00
parent 38b3218c4d
commit 5379038af9

View File

@ -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);