NULL behavior changed after upgrading 4.0.0 -> 4.3.4

(7 posts) (2 voices)

Tags:

No tags yet.

  1. localhots, Member

    Hi,

    we've upgraded myDBR version from 4.0.0 to 4.3.4 which exposed a bug in a couple of our reports with missing coalesce() call around aggregate functions. Now aggregate functions work properly returning NULL if no rows were matched and it turns out it was not behaving like this on 4.0.0 version casting some NULL values to zeros.

    Did you fix or change anything relevant to this issue between two releases mentioned above?
    We're using MySQL Community Edition 5.5.41

    BR, Gregory

  2. myDBR Team, Key Master

    Could you provide more details where you experience the problem? In parameter handling or just in plain query? What aggregate functions are you referring to?

    --
    myDBR Team

  3. localhots, Member

    I'm talking about NULLs in query results which are later encoded to JSON

  4. myDBR Team, Key Master

    which are later encoded to JSON

    Do you mean how myDBR handles NULL values when exporting into JSON (&export=json)?

    --
    myDBR Team

  5. localhots, Member

    Yep

  6. myDBR Team, Key Master

    OK,
    that was considered as a bug (myDBR inadvertedly converted NULLs to zeros when exporting numbers). Now (from build 2556) it will retain the NULL values.

    if you want to convert NULLs into zeros, you can use ifnull/isnull in query.

    --
    myDBR Team

  7. localhots, Member

    Sure, we use coalesce() for this. Thanks!


Reply

You must log in to post.