#193 SQL strict mode compatibility

1.3.1
open
nobody
2016-11-09
2016-10-13
No

In opendmarc-import we should never set values to NULL (or anywhere else for that matter).

$dbi_s = $dbi_h->prepare("UPDATE requests SET repuri = NULL WHERE id = ?");

Should be

$dbi_s = $dbi_h->prepare("UPDATE requests SET repuri = '' WHERE id = ?");

Could not find any other locations (didn't dig very deep), however we should always ensure we NEVER set a value to null as to ensure strict mode compatibility and ensure matching on empty records remains sane.

Discussion

  • Juri Haberland

    Juri Haberland - 2016-11-08

    The attached patch fixes the incompatibility with MySQL's strict mode. It obsoletes also ticket #192.

     
  • Michiel Hazelhof

    Looks good to me, don't forget to run aclocal and automake if your system doesn't have automake-1.13 anymore.

     

Log in to post a comment.

Get latest updates about Open Source Projects, Conferences and News.

Sign up for the SourceForge newsletter:





No, thanks