Workaround for storage bigint (#9049)

Fix is to use mysqlnd driver instead of mysqli.
This commit is contained in:
Tony Murray
2018-08-20 17:58:26 -05:00
committed by Neil Lathwood
parent 1e55601409
commit 2e3aef6929

View File

@@ -36,7 +36,8 @@ foreach (dbFetchRows('SELECT * FROM storage WHERE device_id = ?', array($device[
$tags = compact('mib', 'descr', 'rrd_name', 'rrd_def');
data_update($device, 'storage', $tags, $fields);
$update = dbUpdate(array('storage_used' => $storage['used'], 'storage_free' => $storage['free'], 'storage_size' => $storage['size'], 'storage_units' => $storage['units'], 'storage_perc' => $percent), 'storage', '`storage_id` = ?', array($storage['storage_id']));
// NOTE: casting to string for mysqli bug (fixed by mysqlnd)
$update = dbUpdate(array('storage_used' => (string)$storage['used'], 'storage_free' => (string)$storage['free'], 'storage_size' => (string)$storage['size'], 'storage_units' => $storage['units'], 'storage_perc' => $percent), 'storage', '`storage_id` = ?', array($storage['storage_id']));
echo "\n";
}//end foreach