Fix to bug #673, http://bugs.skysql.com/show_bug.cgi?id=673
dcb.c:dcb_hashtable_stats:division by zero hashtable.c:hashtable_get_stats: NULL-pointer reference service.c:serviceStartPort:set service->users NULL to avoid referring to freed memory users.c:dcb_usersPrintf: NULL-pointer reference debugcmd.c:convert_arg: changed return value to 1 in case of error, 0 (==NULL) is valid but it indicates that there are no users loaded. execute_cmd: fixed command handling
This commit is contained in:
@ -1610,7 +1610,9 @@ void dcb_hashtable_stats(
|
||||
hashsize);
|
||||
|
||||
dcb_printf(dcb, "\tNo. of entries: %d\n", total);
|
||||
dcb_printf(dcb, "\tAverage chain length: %.1f\n", (float)total / hashsize);
|
||||
dcb_printf(dcb,
|
||||
"\tAverage chain length: %.1f\n",
|
||||
(hashsize == 0 ? (float)hashsize : (float)total / hashsize));
|
||||
dcb_printf(dcb, "\tLongest chain length: %d\n", longest);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user