[Koha-bugs] [Bug 13523] New: AddBiblio fails on mysql with STRICT_TRANS_TABLES

bugzilla-daemon at bugs.koha-community.org bugzilla-daemon at bugs.koha-community.org
Tue Jan 6 15:15:07 CET 2015


http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=13523

            Bug ID: 13523
           Summary: AddBiblio fails on mysql with STRICT_TRANS_TABLES
 Change sponsored?: ---
           Product: Koha
           Version: unspecified
          Hardware: All
                OS: All
            Status: NEW
          Severity: major
          Priority: P5 - low
         Component: Cataloging
          Assignee: gmcharlt at gmail.com
          Reporter: benjamin.rokseth at kul.oslo.kommune.no
        QA Contact: testopia at bugs.koha-community.org
                CC: m.de.rooy at rijksmuseum.nl

Adding a biblio either via /svc endpoint or via Cataloguing interface fails on
mysql versions > 5.3.21 because of a change in the default settings in
GLOBAL.sql_mode to add STRICT_TRANS_TABLES.

when adding a biblio in Cataloguing or via /svc API: 
---
Software error:

Can't call method "fields" on an undefined value at
/usr/share/koha/intranet/cgi-bin/cataloguing/additem.pl line 683.
---

Doing this manually in SQL results in:
---
ERROR 1364 (HY000): Field 'marcxml' doesn't have a default value
---

This is probably a change that will live (Mysql becomes stricter in v5.7) and
is purposefully added to better handle syntax checks in the SQL.

bugs #10732, #5366 and #10215 all relate to the same but do not propose a fix.

This particular bug proposes to fix the particular issue with adding biblios,
either by

1) changing the database schema to NOT set field `marcxml` to NOT NULL
   (field `marc` in the same table is NULLABLE)
2) changing the AddBiblio code in Biblio.pm so it doesn't require multiple 
   INSERT statements

-- 
You are receiving this mail because:
You are watching all bug changes.


More information about the Koha-bugs mailing list