Summary: | [SQL strict mode] MARC records will stage, but Manage for import shows 'no data in table' | ||
---|---|---|---|
Product: | Koha | Reporter: | gale <gale> |
Component: | MARC Bibliographic record staging/import | Assignee: | Galen Charlton <gmcharlt> |
Status: | RESOLVED DUPLICATE | QA Contact: | Testopia <testopia> |
Severity: | normal | ||
Priority: | P1 - high | CC: | gale, jonathan.druart, schachne |
Version: | unspecified | ||
Hardware: | PC | ||
OS: | Linux | ||
Change sponsored?: | --- | Patch complexity: | --- |
Documentation contact: | Documentation submission: | ||
Text to go in the release notes: | Version(s) released in: | ||
Circulation function: | |||
Bug Depends on: | |||
Bug Blocks: | 17258 | ||
Attachments: | error log produced after attempt to stage and manage MARC records |
Description
gale@rabbat.net
2017-01-06 16:07:11 UTC
Created attachment 58653 [details]
error log produced after attempt to stage and manage MARC records
Hello, The relevant message is "stage-marc-import.pl: DBD::mysql::st execute failed: Field 'marcxml_old' doesn't have a default value". Indeed we have a sql query inserting a row in the import_records without specifying a value for this marcxml_old column (C4/ImportBatch.pm:1560 in _create_import_record). Take a look at this entry on the wiki page to know how to fix this problem: https://wiki.koha-community.org/wiki/Koha_on_ubuntu_-_packages#Ubuntu_16.04_and_MySQL_5.7 Hi there, it seems that i have exactly the same problem here. execute failed: Field 'marcxml_old' doesn't have a default value [for Statement "INSERT INTO import_records (import_batch_id, record_sequence, marc, marcxml, : /usr/share/koha/intranet/cgi-bin/tools/stage-marc-import.pl, referer: http://localhost:8080/cgi-bin/koha/tools/stage-marc-import. I am using MariaDB and I am quite a newbie. I am not able to locate the right file in MariaDB to add sql-mode="IGNORE_SPACE,NO_ZERO_IN_DATE,NO_ZERO_DATE,ERROR_FOR_DIVISION_BY_ZERO,NO_AUTO_CREATE_USER,NO_ENGINE_SUBSTITUTION" nor I am sure it is necessary in MariaDB. Can You give me a hint, please... to be more specific about my test-Installation: Ubuntu-16.04 Koha version: 17.05.06.000 MySQL version: mysql Ver 15.1 Distrib 10.2.11-MariaDB, for debian-linux-gnu (x86_64) using readline 5.2 found it: /etc/mysql/conf.d/mariadb.cnf restarted the mysq-server. now it works. the documentation here implies that this problem is not present with MariaDB. This seems to be wrong!? (In reply to niko from comment #5) > found it: > /etc/mysql/conf.d/mariadb.cnf > restarted the mysq-server. > > now it works. > > the documentation here implies that this problem is not present with MariaDB. > This seems to be wrong!? Indeed, https://mariadb.com/kb/en/library/sql-mode/: """ Since MariaDB 10.2.4, SQL_MODE is by default set to NO_AUTO_CREATE_USER,NO_ENGINE_SUBSTITUTION,STRICT_TRANS_TABLES,ERROR_FOR_DIVISION_BY_ZERO. In earlier versions of MariaDB 10.2, and since MariaDB 10.1.7, SQL_MODE is by default set to NO_ENGINE_SUBSTITUTION,NO_AUTO_CREATE_USER. For earlier versions of MariaDB 10.1, and MariaDB 10.0 and before, no default is set. """ |