Fixing mysql_strict issues / errors #521

merged 22 commits into from Mar 1, 2015


None yet

4 participants

laf commented Feb 26, 2015

This was initially PRd via #476 by @mchasteen.

I've tidied this up as much as I can. Will run it for 24 hours on my test box to make sure.

@paulgear can you review please so we can merge once tested.

mchasteen and others added some commits Feb 12, 2015
@mchasteen @laf mchasteen Fixed the INSERT line in build.sql so that graph order is always an i…
…nt value of 0.
@mchasteen @laf mchasteen Fixed the mysql auth include and the db schema. I set the desc field …
…to be a varchar(200) and set it to be NULL by default (this is a personal preference but since it was not set in the code...). I fixed adduser function in html/includes/authentication/ I added $description and $twofactor to the function argument with default values and added descr and twofactor elements in the array passed to the dbInsert function call. OpenSuSE 13.2
@mchasteen @laf mchasteen Fixed UpadteDB function. It didn't seem to work. I fixed the syntax a…
…nd hopefullt this won't break other things, but I guess as I test I'll find out.
@mchasteen @laf mchasteen Fixed vlan discover so there isn't any more SQL errors. Will need fur…
…ther testing.
@mchasteen @laf mchasteen Fixed entity-physical. Fixed the ifindex logic. Also fixed the update…
… and insert function calls.
@mchasteen @laf mchasteen Fixed processor discovery. SQL correctly inserts and updates now. Als…
…o fixed usage field for cisco devices.
@mchasteen @laf mchasteen Fixed mempools function. d47952f
@mchasteen @laf mchasteen Fixed SQL statement so things don't go broke. 03ad4b7
@mchasteen @laf mchasteen Fixed the discover_links function so that it can not blow up with NUL…
…L values.
@mchasteen @laf mchasteen Fixed the discovered_last field update thing. 4781e6d
@mchasteen @laf mchasteen Fixed polling mempool thing so that NULL values don't break things. d7ea7e7
@mchasteen @laf mchasteen Fixed polling ports so that NULL values don't break stuff. Basically …
…I just have a foreach loop to unset any NULL values. Also fixed the NOW() SQL statements at the end of polling.
@mchasteen @laf mchasteen Fixed SQL error relating to the temperature in the…
…hp in discovery.
@mchasteen @laf mchasteen Rethought this code. Added some logic to detect a temperature value t…
…hat contains more than numbers.
@mchasteen @laf mchasteen Added some logic to keep a mac address that has no associated port fr…
…om being added to the ipv4_mac table. I found that a cisco device was trying to add a loop-back mac address (000000000000).
@mchasteen @laf mchasteen This probably should have been commited earlier. Added some logic to …
…remove NULL values from sensor DB inserts.
@mchasteen @laf mchasteen Fixed the global alert_rull add SQL. Added a default value for disabl…
…ed (set to 0). This could probably be fixed in the schema if the default value is set.
@laf laf test e0fbcb9
@laf laf Tidying up 15cc00c
@laf laf Tidying up ba5eb4e
@laf laf Tidying up e1b4603
@laf laf Adding more updates found by f0o 7f823b6
@f0o f0o merged commit cb9d3d1 into librenms:master Mar 1, 2015

1 check passed

Scrutinizer 2 new issues
@laf laf deleted the unknown repository branch Mar 1, 2015
paulgear commented Mar 8, 2015

This merge seems to have picked up a lot more than MySQL strict issues; there's quite a bit of reformatting and stylistic code changes, and even whitespace changes. Let's try to keep these in separate PRs in future.

laf commented Mar 8, 2015

I tidied up as much as I could on this, especially from the initial commit.

We're all guilty of it though:

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment