diff options
author | Sergei Golubchik <sergii@pisem.net> | 2010-05-21 17:25:40 +0200 |
---|---|---|
committer | Sergei Golubchik <sergii@pisem.net> | 2010-05-21 17:25:40 +0200 |
commit | 5379038af9f279b3ad15e74c7147608fd8f899ea (patch) | |
tree | 2cc2a631d5ebaeb9a91a0a3bf9a0b01cde06fde5 /client | |
parent | 38b3218c4d372f6b0c5de7e4c81c824a1f308e55 (diff) | |
download | mariadb-git-5379038af9f279b3ad15e74c7147608fd8f899ea.tar.gz |
mysql: don't crash when --show-warnings is enabled
and the server suddenly goes away
Diffstat (limited to 'client')
-rw-r--r-- | client/mysql.cc | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/client/mysql.cc b/client/mysql.cc index bfaed00b49f..f7ef9a652fb 100644 --- a/client/mysql.cc +++ b/client/mysql.cc @@ -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); |