kohastructure.sql makes auth_subfield_structure.linkid a tinyint(1) NOT NULL, but then authorities_normal_marc21.sql tries to insert an null string value for that field. From kohastructure.sql: DROP TABLE IF EXISTS `auth_subfield_structure`; CREATE TABLE `auth_subfield_structure` ( ... `linkid` tinyint(1) NOT NULL default 0, ... From authorities_normal_marc21.sql : INSERT INTO `auth_subfield_structure` (`authtypecode`, `tagfield`, `tagsubfield`, `liblibrarian`, `libopac`, `repeatable`, `mandatory`, `tab`, `authorised_value`, `value_builder`, `seealso`, `isurl`, `hidden`, `linkid`, `kohafield`, `frameworkcode`) VALUES ('', '000', '@', 'fixed length control field', 'fixed length control field', 0, 1, 0, NULL, 'marc21_leader_authorities.pl', NULL, 0, 0, '', '', '') ...
Bug still valid in 3.6 I think the NOT NULL is not necessary, so I propose we change to NULL
The files described here appear to remain unchanged from when this bug was reported but obviously there are not critical consequences since the bug has not been touched in years. Is this bug really valid? If so, is it really a critical bug?
For information: MariaDB [koha]> INSERT INTO `auth_subfield_structure` (`authtypecode`, `tagfield`, `tagsubfield`, `liblibrarian`, `libopac`, `repeatable`, `mandatory`, `tab`, `authorised_value`, `value_builder`, `seealso`, `isu rl`, `hidden`, `linkid`, `kohafield`, `frameworkcode`) VALUES -> ('', '000', '@', 'fixed length control field', 'fixed length control field', 0, 1, 0, NULL, 'marc21_leader_authorities.pl', NULL, 0, 0, '', '', ''); Query OK, 1 row affected, 1 warning (0.08 sec) MariaDB [koha]> show warnings; +---------+------+----------------------------------------------------------+ | Level | Code | Message | +---------+------+----------------------------------------------------------+ | Warning | 1366 | Incorrect integer value: '' for column 'linkid' at row 1 | +---------+------+----------------------------------------------------------+ 1 row in set (0.00 sec) MariaDB [koha]> select linkid from auth_subfield_structure where tagfield='000'; +--------+ | linkid | +--------+ | 0 | +--------+ 1 row in set (0.00 sec)
Not critical at all, considered as minor. Feel free to change it if you disagree.
*** This bug has been marked as a duplicate of bug 22919 ***