feature: Add mysql failed query logging + fixed queries that break ONLY_FULL_GROUP_BY (#5327)

* feature: Add mysql failed query logging + fixed queries that break ONLY_FULL_GROUP_BY

* fix all schema errors and update system
This commit is contained in:
Neil Lathwood
2017-01-07 17:32:38 +00:00
committed by Tony Murray
parent 8936d9503b
commit da5783d917
33 changed files with 67 additions and 247 deletions

View File

@@ -78,8 +78,10 @@ foreach ($vlans_db as $domain_id => $vlans) {
}
// remove non-existent port-vlan mappings
$num = dbDelete('ports_vlans', '`device_id`=? AND `port_vlan_id` NOT IN ('.join(',', $valid_vlan_port).')', array($device['device_id']));
d_echo("Deleted $num vlan mappings\n");
if (is_array($valid_vlan_port) && count($valid_vlan_port) > 0) {
$num = dbDelete('ports_vlans', '`device_id`=? AND `port_vlan_id` NOT IN ('.join(',', $valid_vlan_port).')', array($device['device_id']));
d_echo("Deleted $num vlan mappings\n");
}
unset($device['vlans']);
unset($base_to_index, $tmp_base_indexes, $index_to_base, $per_vlan_data, $valid_vlan_port, $num);