diff options
| author | hugetoad <hugetoad@97f52cf1-0a1b-0410-bd0e-c28be96e8082> | 2002-07-23 17:06:33 +0000 |
|---|---|---|
| committer | hugetoad <hugetoad@97f52cf1-0a1b-0410-bd0e-c28be96e8082> | 2002-07-23 17:06:33 +0000 |
| commit | ce2bf1099ecb5b4087184a88c8cf648a034ab690 (patch) | |
| tree | d1658c16a0f82736c5543d3564e2580ed6d18258 /include | |
| parent | 18f62b7d06dedf74b30899302019e847ab287183 (diff) | |
- fixed crash in case if MySQL server gone (support for signal PIPE) (Alexei)
Thanks to Arturs.
- fixed duplicate triggers in Availability Report (Alexei)
- fixed division by zero in Availability Report (Alexei)
git-svn-id: svn://svn.zabbix.com/trunk@440 97f52cf1-0a1b-0410-bd0e-c28be96e8082
Diffstat (limited to 'include')
| -rw-r--r-- | include/db.c | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/include/db.c b/include/db.c index c5488b3c..2a8ca233 100644 --- a/include/db.c +++ b/include/db.c @@ -153,6 +153,11 @@ char *DBget_field(DB_RESULT *result, int rownum, int fieldnum) mysql_data_seek(result, rownum); row=mysql_fetch_row(result); + if(row == NULL) + { + zabbix_log(LOG_LEVEL_ERR, "Error while mysql_fetch_row():[%s]", mysql_error(&mysql) ); + exit(FAIL); + } zabbix_log(LOG_LEVEL_DEBUG, "Got field:%s", row[fieldnum] ); return row[fieldnum]; #endif |
