[Bug 19492] New: Field 'lowestPriority' doesn't have a default value ( MariaDB)
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=19492 Bug ID: 19492 Summary: Field 'lowestPriority' doesn't have a default value (MariaDB) Change sponsored?: --- Product: Koha Version: master Hardware: All OS: All Status: NEW Severity: normal Priority: P5 - low Component: Hold requests Assignee: koha-bugs@lists.koha-community.org Reporter: magnus@libriotech.no QA Contact: testopia@bugs.koha-community.org CC: gmcharlt@gmail.com Running Koha with MariaDB on Ubuntu 16.04, I get an "internal server error" when I try to add a hold. The Plack log says: DBD::mysql::st execute failed: Field 'lowestPriority' doesn't have a default value [for Statement "INSERT INTO `reserves` ( `biblionumber`, `borrowernumber`, `branchcode`, `expirationdate`, `found`, `itemnumber`, `itemtype`, `priority`, `reservedate`, `reservenotes`, `waitingdate`) VALUES ( ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ? )" with ParamValues: 0="16303", 1='1', 2="LIB", 3=undef, 4=undef, 5=undef, 6=undef, 7="1", 8='2017-10-19', 9="", 10=undef] at /usr/share/perl5/DBIx/Class/Storage/DBI.pm line 1834. DBIx::Class::Storage::DBI::_dbh_execute(): Field 'lowestPriority' doesn't have a default value at /home/kohaadmin/kohaclone/Koha/Object.pm line 121 And reserves.lowestPriority does indeed not have a default value (from installer/data/mysql/kohastructure.sql): `lowestPriority` tinyint(1) NOT NULL, Adding a default value of 0 makes the "internal server error" go away: ALTER TABLE reserves ALTER COLUMN lowestPriority SET DEFAULT 0; -- You are receiving this mail because: You are the assignee for the bug. You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=19492 Jonathan Druart <jonathan.druart@bugs.koha-community.org> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |jonathan.druart@bugs.koha-c | |ommunity.org --- Comment #1 from Jonathan Druart <jonathan.druart@bugs.koha-community.org> --- What is the version of MariaDB? Did you modify my.cnf? Does `grep -r sql-mode /etc/mysql` return something? -- You are receiving this mail because: You are watching all bug changes. You are the assignee for the bug.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=19492 --- Comment #2 from Magnus Enger <magnus@libriotech.no> --- (In reply to Jonathan Druart from comment #1)
What is the version of MariaDB?
10.2.9-MariaDB-10.2.9+maria~xenial
Did you modify my.cnf?
Don't think so.
Does `grep -r sql-mode /etc/mysql` return something?
$ sudo grep -r sql-mode /etc/mysql /etc/mysql/mysql.conf.d/mysqld.cnf:sql-mode="IGNORE_SPACE,NO_ZERO_IN_DATE,NO_ZERO_DATE,ERROR_FOR_DIVISION_BY_ZERO,NO_AUTO_CREATE_USER,NO_ENGINE_SUBSTITUTION" -- You are receiving this mail because: You are watching all bug changes. You are the assignee for the bug.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=19492 Jonathan Druart <jonathan.druart@bugs.koha-community.org> changed: What |Removed |Added ---------------------------------------------------------------------------- Blocks| |17258 --- Comment #3 from Jonathan Druart <jonathan.druart@bugs.koha-community.org> --- The "doesn't have a default value" is related to the STRICT_TRANS_TABLES mode, with NO_ENGINE_SUBSTITUTION you should not get this error. Can you confirm you restarted the service and you still get this error? Referenced Bugs: https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=17258 [Bug 17258] [OMNIBUS] MySQL 5.7 -- You are receiving this mail because: You are watching all bug changes. You are the assignee for the bug.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=19492 Jonathan Druart <jonathan.druart@bugs.koha-community.org> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|NEW |RESOLVED Resolution|--- |DUPLICATE --- Comment #4 from Jonathan Druart <jonathan.druart@bugs.koha-community.org> --- Will be fixed by bug 20144. *** This bug has been marked as a duplicate of bug 20144 *** -- You are receiving this mail because: You are watching all bug changes. You are the assignee for the bug.
participants (1)
-
bugzilla-daemon@bugs.koha-community.org